@kedem/okdb 1.9.1 → 2.0.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 (48) hide show
  1. package/README.md +3 -2
  2. package/bin/okdb.js +1 -1
  3. package/docs/deployment.md +155 -0
  4. package/docs/diagnostics.md +115 -0
  5. package/docs/embeddings.md +1 -1
  6. package/docs/functions.md +30 -27
  7. package/docs/getting-started.md +14 -3
  8. package/docs/http-api.md +3 -3
  9. package/docs/http-cluster.md +93 -60
  10. package/docs/index.md +13 -1
  11. package/docs/manifest.json +6 -3
  12. package/docs/pipelines.md +1 -1
  13. package/docs/process-registry.md +5 -5
  14. package/docs/processors.md +35 -18
  15. package/docs/queue.md +112 -42
  16. package/docs/sync.md +10 -7
  17. package/docs/ttl.md +1 -1
  18. package/docs/upgrade-2.0.md +290 -0
  19. package/okdb-functions-sandbox-worker.js +1 -1
  20. package/okdb-http-worker-child.js +1 -1
  21. package/okdb-views-bootstrap-worker.js +1 -1
  22. package/okdb.js +1 -1
  23. package/package.json +1 -1
  24. package/public/layouts/_default.ok.html +1 -1
  25. package/public/sections/db/modals/create-env-modal.ok.js +1 -1
  26. package/public/sections/db/modals/demo-env-modal.ok.js +1 -1
  27. package/public/sections/db/parts/db-overview.ok.js +1 -1
  28. package/public/sections/engines/engine-ui-utils.js +1 -1
  29. package/public/sections/engines/parts/engine-declaration-editor.ok.js +1 -1
  30. package/public/sections/engines/parts/generic-engine-panel.ok.js +1 -1
  31. package/public/sections/queue/parts/code-panel.ok.js +1 -1
  32. package/public/sections/queue/parts/job-log-panel.ok.js +1 -1
  33. package/public/sections/queue/parts/queue-jobs.ok.js +1 -1
  34. package/public/sections/sync/parts/sync-topology.ok.js +1 -1
  35. package/public/sections/system/index.ok.html +1 -1
  36. package/public/sections/system/parts/system-process-panel.ok.js +1 -1
  37. package/public/sections/system/parts/system-processing-panel.ok.js +1 -1
  38. package/public/sections/system/parts/system-runtime-overview.ok.js +1 -1
  39. package/public/setup-app.js +1 -1
  40. package/public/setup.html +116 -55
  41. package/types/index.d.ts +33 -3
  42. package/types/options.d.ts +19 -10
  43. package/docs/worker-fleet.md +0 -139
  44. package/okdb-functions-runner-child.js +0 -1
  45. package/okdb-queue-load-handler.js +0 -1
  46. package/okdb-queue-spawn-child.js +0 -1
  47. package/okdb-worker-child.js +0 -1
  48. package/public/sections/system/parts/system-workers-panel.ok.js +0 -1
package/bin/okdb.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- 'use strict';const _0x264626=_0x1da2;(function(_0x450922,_0x4cf9a5){const _0x1633b7=_0x1da2,_0x49a01b=_0x450922();while(!![]){try{const _0x29bf4d=parseInt(_0x1633b7(0x53d))/0x1+-parseInt(_0x1633b7(0x14d))/0x2*(parseInt(_0x1633b7(0x608))/0x3)+parseInt(_0x1633b7(0x46f))/0x4*(-parseInt(_0x1633b7(0x426))/0x5)+parseInt(_0x1633b7(0x5ec))/0x6*(-parseInt(_0x1633b7(0x4cf))/0x7)+-parseInt(_0x1633b7(0x152))/0x8+-parseInt(_0x1633b7(0x631))/0x9*(-parseInt(_0x1633b7(0x1f6))/0xa)+parseInt(_0x1633b7(0x39b))/0xb;if(_0x29bf4d===_0x4cf9a5)break;else _0x49a01b['push'](_0x49a01b['shift']());}catch(_0x1e1cb3){_0x49a01b['push'](_0x49a01b['shift']());}}}(_0x2edd,0x4b9a0));var require$$1=require(_0x264626(0x4d4)),require$$1$1=require('fs'),require$$0=require('os'),require$$4$1=require(_0x264626(0x49d)),require$$5=require(_0x264626(0x3b9)),require$$0$2=require(_0x264626(0x5bd)),require$$2=require(_0x264626(0x138)),require$$0$1=require('node:crypto'),require$$4=require(_0x264626(0x1c1)),require$$1$2=require(_0x264626(0x281)),require$$0$3=require(_0x264626(0x19e)),require$$0$4=require(_0x264626(0x253)),require$$0$5=require(_0x264626(0x48f)),require$$1$3=require(_0x264626(0x292)),require$$2$1=require(_0x264626(0x5e6)),require$$8=require('stream'),commonjsGlobal=typeof globalThis!==_0x264626(0x4f3)?globalThis:typeof window!==_0x264626(0x4f3)?window:typeof global!==_0x264626(0x4f3)?global:typeof self!==_0x264626(0x4f3)?self:{};function getDefaultExportFromCjs(_0xa4e7da){const _0x5dbb7f=_0x264626;return _0xa4e7da&&_0xa4e7da['__esModule']&&Object[_0x5dbb7f(0x699)][_0x5dbb7f(0x689)][_0x5dbb7f(0x50a)](_0xa4e7da,_0x5dbb7f(0x429))?_0xa4e7da[_0x5dbb7f(0x429)]:_0xa4e7da;}var okdb$1={},okdbWorkers,hasRequiredOkdbWorkers;function requireOkdbWorkers(){if(hasRequiredOkdbWorkers)return okdbWorkers;hasRequiredOkdbWorkers=0x1;const _0x18e382=require$$0,_0x259b77=require$$1$1,_0x247e21=require$$1;let _0x53f394;function _0x262161(){const _0x57306e=_0x1da2;if(process.env.OKDB_FORCE_SHMBUF_FALLBACK==='1')return![];if(_0x53f394!==undefined)return _0x53f394;try{const _0x2d6183=_0x247e21[_0x57306e(0x5f4)](require[_0x57306e(0x3af)](_0x57306e(0x52e)));_0x53f394=_0x259b77['existsSync'](_0x247e21[_0x57306e(0x2c7)](_0x2d6183,_0x57306e(0x1a1),_0x57306e(0x50f),'shmbuf.node'));}catch{_0x53f394=![];}return _0x53f394;}function _0x4c88a1(){const _0x122268=_0x1da2,_0x5926fa=_0x18e382[_0x122268(0x316)]()['length'];return Math['max'](0x1,_0x5926fa-0x1);}function _0x276136(_0x3b15f2,_0x2ac8b4={}){const _0x46c914=_0x1da2,_0x5d43d5=_0x2ac8b4[_0x46c914(0x3b2)]!==undefined?_0x2ac8b4['shmbufNative']:_0x262161();let _0x4a3e64;if(_0x3b15f2?.[_0x46c914(0x174)])_0x4a3e64=0x1;else{let _0x3191c8,_0x2d6127;if(_0x3b15f2?.[_0x46c914(0x4b3)]!==undefined&&_0x3b15f2['workersFlag']!==null&&_0x3b15f2[_0x46c914(0x4b3)]!=='')_0x3191c8=_0x3b15f2['workersFlag'],_0x2d6127='--workers';else{if(process.env.OKDB_HTTP_WORKERS!==undefined&&process.env.OKDB_HTTP_WORKERS!=='')_0x3191c8=process.env.OKDB_HTTP_WORKERS,_0x2d6127=_0x46c914(0x25f);else _0x3b15f2?.[_0x46c914(0x48f)]?.[_0x46c914(0x6b7)]!==undefined&&_0x3b15f2[_0x46c914(0x48f)]['workers']!==null&&_0x3b15f2['http']['workers']!==''&&(_0x3191c8=_0x3b15f2[_0x46c914(0x48f)][_0x46c914(0x6b7)],_0x2d6127='http.workers');}if(_0x3191c8===undefined)_0x4a3e64=_0x4c88a1();else{const _0x211578=Number(_0x3191c8);!Number[_0x46c914(0x256)](_0x211578)||_0x211578<0x1?(console[_0x46c914(0x4b5)](_0x46c914(0x1a4)+_0x2d6127+'='+JSON['stringify'](_0x3191c8)+'\x20(must\x20be\x20an\x20integer\x20>=\x201)\x20—\x20using\x201'),_0x4a3e64=0x1):_0x4a3e64=_0x211578;}}return!_0x5d43d5&&_0x4a3e64>0x1&&(console[_0x46c914(0x4b5)](_0x46c914(0x214)+('(workers\x20can\x27t\x20share\x20the\x20cross-process\x20HLC/clock).\x20Forcing\x20single-process\x20(was\x20'+_0x4a3e64+').')),_0x4a3e64=0x1),_0x4a3e64;}return okdbWorkers={'isShmbufNative':_0x262161,'defaultWorkers':_0x4c88a1,'resolveWorkers':_0x276136},okdbWorkers;}var version=_0x264626(0x4b1),require$$3={'version':version},okdbAuthTokens,hasRequiredOkdbAuthTokens;function requireOkdbAuthTokens(){if(hasRequiredOkdbAuthTokens)return okdbAuthTokens;hasRequiredOkdbAuthTokens=0x1;const _0x321ead=require$$2;function _0x599420(_0x15405c,_0x4a1bb3){const _0x4b2191=_0x1da2;return _0x321ead[_0x4b2191(0x5f5)]('sha256',_0x4a1bb3)['update'](_0x15405c)['digest'](_0x4b2191(0x14b));}function _0x293aa6(_0x1ffbb3,_0x529d95){const _0xe459d3=_0x1da2;if(typeof _0x1ffbb3!==_0xe459d3(0x3c1)||typeof _0x529d95!==_0xe459d3(0x3c1))return![];if(Buffer[_0xe459d3(0x2e5)](_0x1ffbb3)!==Buffer[_0xe459d3(0x2e5)](_0x529d95))return![];return _0x321ead[_0xe459d3(0x670)](Buffer[_0xe459d3(0x4ce)](_0x1ffbb3),Buffer[_0xe459d3(0x4ce)](_0x529d95));}function _0x4b53ab(_0x60a73b){const _0x48dd95=_0x1da2;if(!_0x60a73b?.[_0x48dd95(0x15f)](_0x48dd95(0x34e)))return null;return _0x60a73b[_0x48dd95(0x149)](0x7);}function _0x259291(_0x98cd59=0x20){const _0x5125b0=_0x1da2;return _0x321ead[_0x5125b0(0x548)](_0x98cd59)['toString'](_0x5125b0(0x14b));}function _0x234a93(_0x1fea16){const _0x339404=_0x1da2;return _0x321ead[_0x339404(0x59a)](_0x339404(0x1a3))['update'](_0x1fea16)[_0x339404(0x19a)](_0x339404(0x22e));}function _0x195b80(_0x9bb689,_0x4f5895,_0x34dbdf=0x36ee80){const _0x3eadad=_0x1da2;if(!_0x4f5895)throw new Error('Token\x20secret\x20not\x20configured');const _0x4670e4=Date[_0x3eadad(0x263)](),_0x4fec8d=Buffer['from'](JSON[_0x3eadad(0x6ae)]({'iat':_0x4670e4,'exp':_0x4670e4+_0x34dbdf,'sub':_0x9bb689?.['id']??_0x9bb689?.['sub']??null,'username':_0x9bb689?.[_0x3eadad(0x67a)]??_0x9bb689?.['name']??null,'roles':Array[_0x3eadad(0x478)](_0x9bb689?.['roles'])?_0x9bb689[_0x3eadad(0x438)]:[]}))[_0x3eadad(0x3ec)](_0x3eadad(0x14b)),_0x22703c=_0x599420(_0x4fec8d,_0x4f5895);return _0x4fec8d+'.'+_0x22703c;}function _0x1bc003(_0x90ec1c,_0x2f2772){const _0xcd9520=_0x1da2;if(!_0x2f2772||typeof _0x90ec1c!==_0xcd9520(0x3c1))return null;const [_0x1528e0,_0x3ec2ad]=_0x90ec1c[_0xcd9520(0x428)]('.');if(!_0x1528e0||!_0x3ec2ad)return null;const _0x300e26=_0x599420(_0x1528e0,_0x2f2772);if(!_0x293aa6(_0x3ec2ad,_0x300e26))return null;try{const _0x11d2a5=JSON[_0xcd9520(0x2cc)](Buffer[_0xcd9520(0x4ce)](_0x1528e0,'base64url')[_0xcd9520(0x3ec)]()),_0x287f48=0x7530;if(Date[_0xcd9520(0x263)]()>Number(_0x11d2a5?.[_0xcd9520(0x279)]??0x0)+_0x287f48)return null;return _0x11d2a5;}catch{return null;}}async function _0x12a776(_0x316fa2){return new Promise((_0x27920b,_0x1e23a1)=>{const _0x49fd5f=_0x1da2,_0xe9e9c6=_0x321ead[_0x49fd5f(0x548)](0x10);_0x321ead['scrypt'](_0x316fa2,_0xe9e9c6,0x40,(_0x4ba7cd,_0x55bc3b)=>{const _0x26308b=_0x49fd5f;if(_0x4ba7cd)_0x1e23a1(_0x4ba7cd);_0x27920b(_0xe9e9c6[_0x26308b(0x3ec)](_0x26308b(0x22e))+':'+_0x55bc3b[_0x26308b(0x3ec)](_0x26308b(0x22e)));});});}async function _0x3b53a6(_0x1dd454,_0x230f21){const _0x326757=_0x1da2,[_0x30b8e2,_0x541f03]=_0x230f21[_0x326757(0x428)](':');if(!_0x30b8e2||!_0x541f03)return![];const _0x287301=Buffer[_0x326757(0x4ce)](_0x30b8e2,_0x326757(0x22e));return new Promise((_0x16feff,_0x365c7f)=>{const _0x1b9390=_0x326757;_0x321ead[_0x1b9390(0x448)](_0x1dd454,_0x287301,0x40,(_0x306212,_0x3dabf1)=>{const _0x4117f7=_0x1b9390;if(_0x306212)_0x365c7f(_0x306212);_0x16feff(_0x321ead['timingSafeEqual'](_0x3dabf1,Buffer[_0x4117f7(0x4ce)](_0x541f03,_0x4117f7(0x22e))));});});}return okdbAuthTokens={'hmac':_0x599420,'timingSafeEqual':_0x293aa6,'parseBearer':_0x4b53ab,'randomToken':_0x259291,'hashToken':_0x234a93,'issueToken':_0x195b80,'authenticateToken':_0x1bc003,'hashPassword':_0x12a776,'verifyPassword':_0x3b53a6},okdbAuthTokens;}var okdbLicenseCodec,hasRequiredOkdbLicenseCodec;function requireOkdbLicenseCodec(){const _0x107d68=_0x264626;if(hasRequiredOkdbLicenseCodec)return okdbLicenseCodec;hasRequiredOkdbLicenseCodec=0x1;const _0x21d835=require$$0$1,_0x575c2f=_0x107d68(0x5c0),_0xc39d93=new Uint8Array(0x100)[_0x107d68(0x3e9)](0xff);for(let _0x36e401=0x0;_0x36e401<_0x575c2f['length'];_0x36e401++){_0xc39d93[_0x575c2f['charCodeAt'](_0x36e401)]=_0x36e401,_0xc39d93[_0x575c2f[_0x107d68(0x25b)](_0x36e401)+0x20]=_0x36e401;}_0xc39d93['O'['charCodeAt'](0x0)]=0x0,_0xc39d93['o'[_0x107d68(0x25b)](0x0)]=0x0,_0xc39d93['I'[_0x107d68(0x25b)](0x0)]=0x1,_0xc39d93['i'[_0x107d68(0x25b)](0x0)]=0x1,_0xc39d93['L'[_0x107d68(0x25b)](0x0)]=0x1,_0xc39d93['l'['charCodeAt'](0x0)]=0x1;function _0x1d2b3c(_0xaf664f){const _0x5290e7=_0x107d68;let _0xd89703=0x0,_0x4c4375=0x0,_0x34543b='';for(let _0x5c4a23=0x0;_0x5c4a23<_0xaf664f[_0x5290e7(0x4e2)];_0x5c4a23++){_0x4c4375=_0x4c4375<<0x8|_0xaf664f[_0x5c4a23],_0xd89703+=0x8;while(_0xd89703>=0x5){_0xd89703-=0x5,_0x34543b+=_0x575c2f[_0x4c4375>>>_0xd89703&0x1f];}}return _0xd89703>0x0&&(_0x34543b+=_0x575c2f[_0x4c4375<<0x5-_0xd89703&0x1f]),_0x34543b;}function _0x53dfa8(_0x11bc99){const _0x35b37b=_0x107d68;_0x11bc99=_0x11bc99['replace'](/-/g,'')[_0x35b37b(0x6ad)]();let _0x19a705=0x0,_0x26b02a=0x0;const _0x2e858d=[];for(let _0x1b63e1=0x0;_0x1b63e1<_0x11bc99[_0x35b37b(0x4e2)];_0x1b63e1++){const _0xb4728d=_0xc39d93[_0x11bc99[_0x35b37b(0x25b)](_0x1b63e1)];if(_0xb4728d===0xff)continue;_0x26b02a=_0x26b02a<<0x5|_0xb4728d,_0x19a705+=0x5,_0x19a705>=0x8&&(_0x19a705-=0x8,_0x2e858d[_0x35b37b(0x3fd)](_0x26b02a>>>_0x19a705&0xff));}return Buffer[_0x35b37b(0x4ce)](_0x2e858d);}const _0x423078=[_0x107d68(0x2a5),'embeddings',_0x107d68(0x6a8),_0x107d68(0x4d6),_0x107d68(0x59e),_0x107d68(0x2e8),_0x107d68(0x427),_0x107d68(0x35f)],_0x507585=0x0,_0x2d5759=0x1,_0x337d3f=0x2,_0x56651b=0x6*0x1e*0x18*0x3c*0x3c*0x3e8;function _0x5dcf49({issuedAt:_0x15837a,expiresAt:_0x1e8b2c,licensee:licensee='',features:features={},limits:limits={},licenseType:licenseType=_0x507585}){const _0x2ea121=_0x107d68,_0x3106d6=Buffer[_0x2ea121(0x4ce)](licensee,_0x2ea121(0x192))[_0x2ea121(0x149)](0x0,0x40),_0x53c839=0x1+0x1+0x4+0x4+0x1+_0x3106d6[_0x2ea121(0x4e2)]+0x2+0x10,_0x174ca3=Buffer[_0x2ea121(0x5ab)](_0x53c839);let _0x5a5d41=0x0;_0x174ca3[_0x2ea121(0x6bc)](0x1,_0x5a5d41++),_0x174ca3[_0x2ea121(0x6bc)](licenseType,_0x5a5d41++),_0x174ca3[_0x2ea121(0x3b1)](Math[_0x2ea121(0x5f7)](_0x15837a/0x3e8),_0x5a5d41),_0x5a5d41+=0x4,_0x174ca3['writeUInt32BE'](Math[_0x2ea121(0x5f7)](_0x1e8b2c/0x3e8),_0x5a5d41),_0x5a5d41+=0x4,_0x174ca3[_0x2ea121(0x6bc)](_0x3106d6['length'],_0x5a5d41++),_0x3106d6['copy'](_0x174ca3,_0x5a5d41),_0x5a5d41+=_0x3106d6[_0x2ea121(0x4e2)];let _0x14218f=0x0;for(let _0x39c762=0x0;_0x39c762<_0x423078[_0x2ea121(0x4e2)];_0x39c762++){if(features[_0x423078[_0x39c762]])_0x14218f|=0x1<<_0x39c762;}_0x174ca3[_0x2ea121(0x57e)](_0x14218f,_0x5a5d41),_0x5a5d41+=0x2;const _0x4bb6ea=[_0x2ea121(0x2cf),_0x2ea121(0x590),_0x2ea121(0x492),_0x2ea121(0x688)];for(const _0x1b8477 of _0x4bb6ea){_0x174ca3[_0x2ea121(0x3b1)](limits[_0x1b8477]||0x0,_0x5a5d41),_0x5a5d41+=0x4;}return _0x174ca3;}function _0x276bbe(_0x2b4cde){const _0x49e391=_0x107d68;let _0x3584d6=0x0;const _0xd9c5d=_0x2b4cde['readUInt8'](_0x3584d6++),_0x2556fa=_0x2b4cde[_0x49e391(0x360)](_0x3584d6++),_0x3ac0ba=_0x2b4cde[_0x49e391(0x236)](_0x3584d6);_0x3584d6+=0x4;const _0x11e89d=_0x2b4cde[_0x49e391(0x236)](_0x3584d6);_0x3584d6+=0x4;const _0x4c9312=_0x2b4cde[_0x49e391(0x360)](_0x3584d6++),_0x4581c5=_0x2b4cde[_0x49e391(0x149)](_0x3584d6,_0x3584d6+_0x4c9312)[_0x49e391(0x3ec)](_0x49e391(0x192));_0x3584d6+=_0x4c9312;const _0x126376=_0x2b4cde[_0x49e391(0x2ba)](_0x3584d6);_0x3584d6+=0x2;const _0x4f7624={};for(let _0x42ec26=0x0;_0x42ec26<_0x423078[_0x49e391(0x4e2)];_0x42ec26++){_0x4f7624[_0x423078[_0x42ec26]]=Boolean(_0x126376&0x1<<_0x42ec26);}const _0x22c6a4=['envs','typesPerEnv',_0x49e391(0x492),'maxWrites'],_0x44b03f={};for(const _0x7a9344 of _0x22c6a4){const _0x470fe6=_0x2b4cde[_0x49e391(0x236)](_0x3584d6);_0x3584d6+=0x4,_0x44b03f[_0x7a9344]=_0x470fe6===0x0?null:_0x470fe6;}return{'v':_0xd9c5d,'licenseType':_0x2556fa,'issuedAt':_0x3ac0ba*0x3e8,'expiresAt':_0x11e89d*0x3e8,'licensee':_0x4581c5,'features':_0x4f7624,'limits':_0x44b03f};}function _0xa8d3f9(_0x37a947,_0x205d78){const _0x54e3c4=_0x107d68,_0x588bf4=Buffer['concat']([_0x37a947,_0x205d78]),_0x5c2176=_0x1d2b3c(_0x588bf4),_0x12238f=[];for(let _0xf70e30=0x0;_0xf70e30<_0x5c2176[_0x54e3c4(0x4e2)];_0xf70e30+=0x8){_0x12238f[_0x54e3c4(0x3fd)](_0x5c2176[_0x54e3c4(0x149)](_0xf70e30,_0xf70e30+0x8));}return _0x12238f['join']('-');}function _0x1b9513(_0x45c1ec){const _0x3b4939=_0x107d68;if(typeof _0x45c1ec!=='string')throw new Error(_0x3b4939(0x5fc));const _0x4b516d=_0x53dfa8(_0x45c1ec[_0x3b4939(0x32d)](/-/g,''));if(_0x4b516d[_0x3b4939(0x4e2)]<0x41)throw new Error(_0x3b4939(0x304)+_0x4b516d['length']+_0x3b4939(0x651));const _0xdf73df=_0x4b516d[_0x3b4939(0x149)](0x0,_0x4b516d[_0x3b4939(0x4e2)]-0x40),_0x3b5757=_0x4b516d[_0x3b4939(0x149)](_0x4b516d[_0x3b4939(0x4e2)]-0x40);let _0x19a79c;try{_0x19a79c=_0x276bbe(_0xdf73df);}catch(_0x229ae2){throw new Error(_0x3b4939(0x641)+_0x229ae2[_0x3b4939(0x69b)]);}return{'rawBuf':_0x4b516d,'payload':_0xdf73df,'sig':_0x3b5757,'decoded':_0x19a79c};}function _0x57bf33(_0x290533){const _0x474099=_0x107d68;return _0x21d835[_0x474099(0x59a)](_0x474099(0x1a3))[_0x474099(0x64c)](_0x290533)[_0x474099(0x19a)]()[_0x474099(0x149)](0x0,0x8);}function _0x36baf6(_0x53b44c,_0x121dc2,_0x500e11){const _0x11a7d2=_0x107d68,_0x49914a=_0x11a7d2(0x6ac)+_0x500e11,_0x318393=Buffer['concat']([Buffer[_0x11a7d2(0x4ce)](_0x53b44c,_0x11a7d2(0x192)),_0x121dc2]),_0x5864ab=_0x21d835[_0x11a7d2(0x5f5)](_0x11a7d2(0x1a3),_0x49914a)[_0x11a7d2(0x64c)](_0x318393)[_0x11a7d2(0x19a)](),_0x32150b=_0x1d2b3c(_0x5864ab['slice'](0x0,0x5));return{'pin':_0x32150b,'pinHmac':_0x5864ab};}function _0x53eda8(_0x2f5b8c,_0x1367d7,_0x2fba09){const _0x359697=_0x107d68,_0x2fa763=Buffer[_0x359697(0x5ab)](0x4d);let _0x42fe8d=0x0;_0x2fa763[_0x359697(0x6bc)](0x1,_0x42fe8d++),_0x2f5b8c[_0x359697(0x5f2)](_0x2fa763,_0x42fe8d),_0x42fe8d+=0x8,_0x2fa763[_0x359697(0x3b1)](_0x1367d7,_0x42fe8d),_0x42fe8d+=0x4,_0x2fba09[_0x359697(0x5f2)](_0x2fa763,_0x42fe8d);const _0x54350f=_0x1d2b3c(_0x2fa763),_0x4acb1a=[];for(let _0x4e77e4=0x0;_0x4e77e4<_0x54350f['length'];_0x4e77e4+=0x6){_0x4acb1a[_0x359697(0x3fd)](_0x54350f[_0x359697(0x149)](_0x4e77e4,_0x4e77e4+0x6));}return _0x4acb1a['join']('-');}function _0x27d367(_0x35a846){const _0x4d211e=_0x107d68;if(typeof _0x35a846!==_0x4d211e(0x3c1))throw new Error(_0x4d211e(0x338));const _0x3be4c1=_0x53dfa8(_0x35a846[_0x4d211e(0x32d)](/-/g,''));if(_0x3be4c1[_0x4d211e(0x4e2)]!==0x4d)throw new Error('decodeActivationToken:\x20expected\x2077\x20bytes,\x20got\x20'+_0x3be4c1[_0x4d211e(0x4e2)]);let _0x14bd25=0x0;const _0x2560de=_0x3be4c1[_0x4d211e(0x360)](_0x14bd25++),_0x48c6ce=_0x3be4c1['slice'](_0x14bd25,_0x14bd25+0x8);_0x14bd25+=0x8;const _0xb01ed5=_0x3be4c1[_0x4d211e(0x236)](_0x14bd25);_0x14bd25+=0x4;const _0x46ecca=_0x3be4c1[_0x4d211e(0x149)](_0x14bd25);return{'v':_0x2560de,'licenseHash':_0x48c6ce,'expiry':_0xb01ed5,'sig':_0x46ecca};}function _0x5c0dd7({tokenString:_0xebe0ab,nodeId:_0x51f80e,rawBlobBuf:_0x492716,pubKeyPem:_0x1b0119,pubFingerprint:_0x175c83}){const _0x304dcb=_0x107d68;let _0x784fd4;try{_0x784fd4=_0x27d367(_0xebe0ab);}catch(_0x270437){return{'valid':![],'reason':'MALFORMED_TOKEN'};}const _0x1f86d2=_0x57bf33(_0x492716);if(!_0x1f86d2[_0x304dcb(0x571)](_0x784fd4[_0x304dcb(0x38d)]))return{'valid':![],'reason':_0x304dcb(0x257)};const {pinHmac:_0x2322d2}=_0x36baf6(_0x51f80e,_0x1f86d2,_0x175c83),_0x583c09=Buffer['allocUnsafe'](0x4);_0x583c09[_0x304dcb(0x3b1)](_0x784fd4[_0x304dcb(0x144)],0x0);const _0x2479a5=Buffer[_0x304dcb(0x1c8)]([Buffer[_0x304dcb(0x4ce)]([_0x784fd4['v']]),_0x2322d2[_0x304dcb(0x149)](0x0,0x5),_0x784fd4['licenseHash'],_0x583c09]);try{const _0x2de2f3=_0x21d835[_0x304dcb(0x39e)](null,_0x2479a5,_0x1b0119,_0x784fd4[_0x304dcb(0x1ab)]);if(!_0x2de2f3)return{'valid':![],'reason':_0x304dcb(0x5ff)};}catch(_0x21d5ca){return{'valid':![],'reason':_0x304dcb(0x5ff)};}if(_0x784fd4[_0x304dcb(0x144)]<Date[_0x304dcb(0x263)]()/0x3e8)return{'valid':![],'reason':_0x304dcb(0x546)};return{'valid':!![],'reason':'ok'};}function _0x48a335(_0x2db0fc){const _0x203475=_0x107d68;if(typeof _0x2db0fc!==_0x203475(0x3c1))return _0x203475(0x3fc);const _0x18f7d9=_0x2db0fc['trim']();if(_0x18f7d9['startsWith']('/')||_0x18f7d9['startsWith']('./')||_0x18f7d9['startsWith'](_0x203475(0x54f))||/^[A-Za-z]:[\\/]/[_0x203475(0x38c)](_0x18f7d9))return _0x203475(0x4d4);if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i[_0x203475(0x38c)](_0x18f7d9))return _0x203475(0x6c1);const _0x5248ea=_0x18f7d9[_0x203475(0x32d)](/[\s-]+/g,'')[_0x203475(0x4e2)];if(_0x5248ea===0x7c)return _0x203475(0x6a1);if(_0x5248ea>=0x95&&_0x5248ea<=0xfc)return _0x203475(0x1da);return _0x203475(0x3fc);}return okdbLicenseCodec={'toBase32':_0x1d2b3c,'fromBase32':_0x53dfa8,'encodeLicensePayload':_0x5dcf49,'decodeLicensePayload':_0x276bbe,'encodeLicenseBlob':_0xa8d3f9,'decodeLicenseBlob':_0x1b9513,'licenseHash':_0x57bf33,'derivePin':_0x36baf6,'encodeActivationToken':_0x53eda8,'decodeActivationToken':_0x27d367,'verifyActivation':_0x5c0dd7,'detectInputType':_0x48a335,'FEATURE_NAMES':_0x423078,'LICENSE_TYPE_STANDARD':_0x507585,'LICENSE_TYPE_OPEN':_0x2d5759,'LICENSE_TYPE_INTERNAL':_0x337d3f,'OPEN_LICENSE_MAX_DURATION_MS':_0x56651b},okdbLicenseCodec;}var okdbError,hasRequiredOkdbError;function requireOkdbError(){if(hasRequiredOkdbError)return okdbError;hasRequiredOkdbError=0x1;class _0x5be8ef extends Error{constructor(_0x10d8c1,_0x2e1774,_0x28fd54={}){const _0x2bcdbd=_0x1da2;super(_0x10d8c1),this[_0x2bcdbd(0x44d)]=_0x2bcdbd(0x232),this[_0x2bcdbd(0x2f9)]=_0x2e1774,this[_0x2bcdbd(0x52d)]=_0x28fd54,_0x28fd54[_0x2bcdbd(0x661)]&&(this[_0x2bcdbd(0x661)]=_0x28fd54['cause']),Error[_0x2bcdbd(0x697)](this,this[_0x2bcdbd(0x549)]);}}class _0x458fc4 extends _0x5be8ef{constructor(_0x2d84cb,_0xa60ce9,_0x505248,_0x3af969){const _0xdf3fa5=_0x1da2;super(_0xdf3fa5(0x51e)+_0x2d84cb+'@'+_0xa60ce9+_0xdf3fa5(0x503)+_0x505248+',\x20got\x20'+_0x3af969,_0xdf3fa5(0x444),{'type':_0x2d84cb,'key':_0xa60ce9,'expectedVersion':_0x505248,'actualVersion':_0x3af969}),this['name']=_0xdf3fa5(0x1ed);}}class _0x1b9d4e extends _0x5be8ef{constructor(_0x3c16e9,_0x527838){const _0x3e76f7=_0x1da2;super(_0x3c16e9+'@'+_0x527838+_0x3e76f7(0x4fe),_0x3e76f7(0x5f1),{'type':_0x3c16e9,'key':_0x527838}),this['name']=_0x3e76f7(0x148);}}class _0x404d65 extends _0x5be8ef{constructor(_0x1d6cce,_0x370f21){const _0x44c054=_0x1da2;super(_0x1d6cce+'@'+_0x370f21+_0x44c054(0x43c),_0x44c054(0x5af),{'type':_0x1d6cce,'key':_0x370f21}),this[_0x44c054(0x44d)]=_0x44c054(0x1b7);}}class _0x12176c extends _0x5be8ef{constructor(_0x19469a,_0x534f18){const _0x5500a4=_0x1da2,_0x51cb24=typeof _0x534f18;super(_0x5500a4(0x3b5)+_0x19469a+'\x27:\x20'+_0x51cb24+_0x5500a4(0x5a9)+_0x534f18,_0x5500a4(0x614),{'index':_0x19469a,'key':_0x534f18,'keyType':_0x51cb24}),this['name']=_0x5500a4(0x580);}}class _0x21a8de extends _0x5be8ef{constructor(_0x54466d){const _0x53023b=_0x1da2,_0x2e4e11=typeof _0x54466d;super(_0x53023b(0x668)+_0x2e4e11+_0x53023b(0x166)+_0x54466d,'INVALID_PRIMARY_KEY',{'key':_0x54466d,'keyType':_0x2e4e11}),this['name']=_0x53023b(0x4c1);}}class _0x52c54f extends _0x5be8ef{constructor(_0x5c17a7){const _0x1afae1=_0x1da2;super(_0x1afae1(0x4f9)+_0x5c17a7+_0x1afae1(0x424),_0x1afae1(0x247),{'type':_0x5c17a7}),this[_0x1afae1(0x44d)]=_0x1afae1(0x241);}}class _0x37384d extends _0x5be8ef{constructor(_0x56f1fa){const _0x2f6482=_0x1da2;super('Type\x20\x27'+_0x56f1fa+_0x2f6482(0x231),_0x2f6482(0x2ce),{'type':_0x56f1fa}),this[_0x2f6482(0x44d)]=_0x2f6482(0x51a);}}class _0x12768e extends _0x5be8ef{constructor(_0x233f98,_0x16413c){const _0x1679dc=_0x1da2;super(_0x1679dc(0x6a0)+_0x16413c+_0x1679dc(0x49b)+_0x233f98+_0x1679dc(0x424),_0x1679dc(0x1f8),{'type':_0x233f98,'index':_0x16413c}),this[_0x1679dc(0x44d)]=_0x1679dc(0x4c2);}}class _0x52f999 extends _0x5be8ef{constructor(_0x65a3ff,_0xe580bb){const _0x3a3ac2=_0x1da2;super(_0x3a3ac2(0x6a0)+_0xe580bb+'\x27\x20on\x20type\x20\x27'+_0x65a3ff+_0x3a3ac2(0x1ef),'INDEX_ALREADY_REGISTERED',{'type':_0x65a3ff,'index':_0xe580bb}),this[_0x3a3ac2(0x44d)]=_0x3a3ac2(0x39c);}}class _0x5eca6f extends _0x5be8ef{constructor(_0x1c9fad,_0x275072={}){const _0x403aad=_0x1da2;super(_0x1c9fad,_0x403aad(0x68c),_0x275072),this[_0x403aad(0x44d)]=_0x403aad(0x302);}}class _0x5d0536 extends _0x5be8ef{constructor(_0x3b2fca,_0x2ee71e,_0x13c707,_0x3badb4,_0x31c561){const _0x2523af=_0x1da2;super('Unique\x20constraint\x20violated\x20on\x20'+_0x3b2fca+'@'+_0x2ee71e+':\x20key\x20['+_0x13c707+_0x2523af(0x4c9)+_0x3badb4+_0x2523af(0x3a7)+_0x31c561+'\x27',_0x2523af(0x1e2),{'type':_0x3b2fca,'index':_0x2ee71e,'indexKey':_0x13c707,'existingKey':_0x3badb4,'conflictingKey':_0x31c561}),this[_0x2523af(0x44d)]=_0x2523af(0x513);}}class _0x5c0edc extends _0x5be8ef{constructor(_0x217faf,_0x4daba1,_0xd36bd0){const _0x4407a0=_0x1da2;super('Schema\x20validation\x20failed\x20for\x20'+_0x217faf+'@'+_0x4daba1,_0x4407a0(0x1ad),{'type':_0x217faf,'key':_0x4daba1,'errors':_0xd36bd0}),this[_0x4407a0(0x44d)]=_0x4407a0(0x223),this[_0x4407a0(0x1f7)]=_0x217faf,this[_0x4407a0(0x2dc)]=_0x4daba1,this['errors']=_0xd36bd0;}}class _0x35d634 extends _0x5be8ef{constructor(_0x5a07ae,_0x4cc063){const _0x20a52a=_0x1da2;super(_0x20a52a(0x47a)+_0x5a07ae+':\x20'+_0x4cc063['length']+_0x20a52a(0x43e),'SCHEMA_COLLECTION_INVALID',{'type':_0x5a07ae,'failures':_0x4cc063}),this[_0x20a52a(0x44d)]=_0x20a52a(0x5b0),this[_0x20a52a(0x1f7)]=_0x5a07ae,this['failures']=_0x4cc063;}}class _0x354d63 extends _0x5be8ef{constructor(_0x59dcfd,_0x5c4076,_0xc152be,_0x10c42e,_0x25c103){const _0x3e73ca=_0x1da2;super(_0x3e73ca(0x40d)+_0x59dcfd+'@'+_0x5c4076+'.'+_0xc152be+_0x3e73ca(0x4f2)+_0x10c42e+'@'+_0x25c103+_0x3e73ca(0x528),'FOREIGN_KEY_VIOLATION',{'sourceType':_0x59dcfd,'sourceKey':_0x5c4076,'fieldPath':_0xc152be,'targetType':_0x10c42e,'targetKey':_0x25c103}),this['name']=_0x3e73ca(0x639),this[_0x3e73ca(0x475)]=_0x59dcfd,this[_0x3e73ca(0x6d6)]=_0x5c4076,this['fieldPath']=_0xc152be,this[_0x3e73ca(0x60d)]=_0x10c42e,this['targetKey']=_0x25c103;}}class _0x1a3486 extends _0x5be8ef{constructor(_0x46e153,_0x3b711a,_0x42435b){const _0x5e9b81=_0x1da2;super('Cannot\x20delete\x20'+_0x46e153+'@'+_0x3b711a+':\x20'+_0x42435b[_0x5e9b81(0x4e2)]+'\x20document(s)\x20reference\x20it\x20with\x20onDelete:restrict',_0x5e9b81(0x6bb),{'targetType':_0x46e153,'targetKey':_0x3b711a,'references':_0x42435b}),this[_0x5e9b81(0x44d)]='OKDBForeignKeyDeleteError',this[_0x5e9b81(0x60d)]=_0x46e153,this[_0x5e9b81(0x66c)]=_0x3b711a,this[_0x5e9b81(0x13f)]=_0x42435b;}}class _0x430488 extends _0x5be8ef{constructor(_0x3ed7cf,_0x422556,_0x13c333){const _0x4bf981=_0x1da2;super(_0x4bf981(0x455)+_0x422556+'\x22\x20on\x20\x22'+_0x3ed7cf+_0x4bf981(0x1c2)+_0x13c333[_0x4bf981(0x145)](_0x112c0d=>_0x112c0d[_0x4bf981(0x3f0)]+':'+_0x112c0d['name'])[_0x4bf981(0x2c7)](',\x20'),_0x4bf981(0x65d),{'type':_0x3ed7cf,'index':_0x422556,'usedBy':_0x13c333}),this['name']='OKDBIndexHasConsumersError';}}return okdbError={'OKDBError':_0x5be8ef,'OKDBVersionMismatchError':_0x458fc4,'OKDBNotFoundError':_0x1b9d4e,'OKDBAlreadyExistsError':_0x404d65,'OKDBInvalidIndexKeyError':_0x12176c,'OKDBInvalidPrimaryKeyError':_0x21a8de,'OKDBTypeNotRegisteredError':_0x52c54f,'OKDBTypeAlreadyRegisteredError':_0x37384d,'OKDBIndexNotRegisteredError':_0x12768e,'OKDBIndexAlreadyRegisteredError':_0x52f999,'OKDBInvalidValueError':_0x5eca6f,'OKDBUniqueConstraintError':_0x5d0536,'OKDBSchemaValidationError':_0x5c0edc,'OKDBSchemaCollectionError':_0x35d634,'OKDBForeignKeyError':_0x354d63,'OKDBForeignKeyDeleteError':_0x1a3486,'OKDBIndexHasConsumersError':_0x430488},okdbError;}var okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x8778fa=_0x264626;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x24e741={'PUT':'put','REMOVE':_0x8778fa(0x280),'INDEX_DROP':'dropIndex','INDEX_REGISTER':_0x8778fa(0x320),'INDEX_RESET':_0x8778fa(0x42b),'TYPE_REGISTER':_0x8778fa(0x497),'TYPE_DROP':'dropType','FTS_REGISTER':_0x8778fa(0x4d9),'FTS_DROP':'dropFts','FTS_RESET':_0x8778fa(0x644),'SCHEMA_SET':_0x8778fa(0x16b),'SCHEMA_DROP':_0x8778fa(0x213),'TTL_SET':_0x8778fa(0x6ba),'TTL_CLEAR':'clearTtl'},_0x1da305={'SYSTEM_READY':_0x8778fa(0x625),'SYSTEM_STOPPED':'system:stopped','SYSTEM_CLOCK_CHANGE':_0x8778fa(0x5a8),'SYSTEM_POKE':_0x8778fa(0x55c),'SYSTEM_DRAIN':'system:drain','SYSTEM_TYPE_DROP':_0x8778fa(0x28b),'SYSTEM_PROC':'system:proc','SYSTEM_BUS_STATE_CHANGE':_0x8778fa(0x2fc),'ITEM_CREATE':_0x8778fa(0x5c2),'ITEM_UPDATE':'item:update','ITEM_REMOVE':_0x8778fa(0x618),'INDEX_RESET':_0x8778fa(0x41c),'INDEX_READY':_0x8778fa(0x611),'INDEX_PROGRESS':_0x8778fa(0x659),'VIEW_PROGRESS':_0x8778fa(0x1c4),'INDEX_DROP':_0x8778fa(0x599),'INDEX_REGISTERED':'index:registered','FTS_REGISTERED':'fts:registered','FTS_DROP':_0x8778fa(0x3cc),'FTS_RESET':_0x8778fa(0x4b4),'SCHEMA_SET':_0x8778fa(0x5dc),'SCHEMA_DROP':_0x8778fa(0x294),'UNIQUE_VIOLATION':_0x8778fa(0x55e),'UNIQUE_VIOLATION_RESOLVED':_0x8778fa(0x2e3),'REF_VIOLATION':'ref:violation','REF_VIOLATION_RESOLVED':_0x8778fa(0x2a3),'SYNC_APPLY':_0x8778fa(0x5eb),'TXN_START':_0x8778fa(0x142),'TXN_END':_0x8778fa(0x59c),'TXN_ROLLBACK':_0x8778fa(0x436),'TYPE_REGISTERED':_0x8778fa(0x2eb),'TYPE_DROP':_0x8778fa(0x3cb),'ENV_OPENED':_0x8778fa(0x410),'ENV_REMOVED':'env:removed','TTL_EXPIRED':_0x8778fa(0x45e),'TTL_SET':'ttl:set','TTL_CLEAR':'ttl:clear','LICENSE_INVALID':_0x8778fa(0x13c),'LICENSE_ADDED':_0x8778fa(0x30c),'LICENSE_ACTIVATED':_0x8778fa(0x4ae),'LICENSE_REMOVED':'license:removed'},_0x2a40c0={'CREATING':'creating','RESETTING':_0x8778fa(0x60e),'READY':'ready','DROPPING':_0x8778fa(0x6a7),'WAITING':_0x8778fa(0x61f)},_0x53b3e8={'CREATED':_0x8778fa(0x16f),'STARTING':_0x8778fa(0x1e6),'STARTED':_0x8778fa(0x4bb),'STOPPING':'stopping','STOPPED':'stopped'},_0x352b49={'CREATING':_0x8778fa(0x45d),'READY':'ready','HALTED':'halted','STOPPED':_0x8778fa(0x299),'RESETTING':_0x8778fa(0x60e)},_0x2b1472=Object[_0x8778fa(0x490)]({'POKE':'bus:poke','DRAIN':_0x8778fa(0x2fe),'TYPE_DROP':_0x8778fa(0x408),'PROC':_0x8778fa(0x53e)});return okdbEnums={'BUS_EVENTS':_0x2b1472,'CHANGE_ACTIONS':_0x24e741,'EVENTS':_0x1da305,'INDEX_STATE':_0x2a40c0,'OKDB_STATE':_0x53b3e8,'VIEW_STATE':_0x352b49},okdbEnums;}var okdbPubkey,hasRequiredOkdbPubkey;function requireOkdbPubkey(){const _0x56f598=_0x264626;if(hasRequiredOkdbPubkey)return okdbPubkey;hasRequiredOkdbPubkey=0x1;const _0x1a1aa2=require$$1$1,_0x5d89d8=require$$1,_0x548189=require$$2,_0x5e889b=_0x1a1aa2[_0x56f598(0x690)](_0x5d89d8['join'](__dirname,_0x56f598(0x24f)),_0x56f598(0x192))[_0x56f598(0x2c3)](),_0x37ad06=_0x548189[_0x56f598(0x5cb)](_0x5e889b)[_0x56f598(0x28f)]({'type':_0x56f598(0x594),'format':_0x56f598(0x1b6)}),_0x2a7720=_0x548189[_0x56f598(0x59a)](_0x56f598(0x1a3))[_0x56f598(0x64c)](_0x37ad06)[_0x56f598(0x19a)]('hex')[_0x56f598(0x149)](0x0,0x10);return okdbPubkey={'PUBLIC_KEY_PEM':_0x5e889b,'PUB_FINGERPRINT':_0x2a7720},okdbPubkey;}var okdbLicense,hasRequiredOkdbLicense;function requireOkdbLicense(){const _0x220087=_0x264626;if(hasRequiredOkdbLicense)return okdbLicense;hasRequiredOkdbLicense=0x1;const _0x254aab=require$$2,{OKDBError:_0x447cc2}=requireOkdbError(),{EVENTS:_0x28e0c2}=requireOkdbEnums(),_0x4e3889=requireOkdbLicenseCodec(),{LICENSE_TYPE_OPEN:_0x37866d,LICENSE_TYPE_INTERNAL:_0x2f507e,OPEN_LICENSE_MAX_DURATION_MS:_0x1bac7e}=_0x4e3889,_0x3c72e5=requireOkdbPubkey(),_0x5d41b9={'LICENSED_BUILD':_0x220087(0x296),'PUBLIC_KEY_PEM':_0x3c72e5['PUBLIC_KEY_PEM'],'PUB_FINGERPRINT':_0x3c72e5[_0x220087(0x1e9)],'LICENSE_EXPIRED_ACTION':_0x220087(0x3e8)},_0x2f57da=_0x220087(0x654),_0x252708={'features':{'sync':![],'embeddings':![],'engines':![],'fts':!![],'timeMachine':![],'views':!![],'mcp':!![],'files':!![]},'limits':{'envs':0x2,'typesPerEnv':0xa,'syncPeers':0x0,'maxWrites':0xf4240},'_isFree':!![]};async function _0x5b0c15(_0x3f2c40){const _0x1014c7=_0x220087;!_0x3f2c40[_0x1014c7(0x365)](_0x2f57da)&&await _0x3f2c40['registerType'](_0x2f57da);}class _0x2a85a0{constructor(_0x9cf54d){const _0x183d92=_0x220087;this['okdb']=_0x9cf54d,this[_0x183d92(0x212)]=null;}async[_0x220087(0x3e4)](){const _0x13f038=_0x220087,_0x5e7e2f=this['okdb'][_0x13f038(0x485)];if(!_0x5e7e2f||!_0x5e7e2f[_0x13f038(0x365)](_0x2f57da)){this[_0x13f038(0x212)]=null;return;}const _0x1a5690=this[_0x13f038(0x2db)]['id'];let _0x2747ba=null;for(const {key:_0x373120,value:_0x375804}of _0x5e7e2f[_0x13f038(0x47b)](_0x2f57da)){const _0x119c5d=this['_computeStatus'](_0x375804,_0x1a5690);_0x119c5d===_0x13f038(0x4f5)&&!_0x2747ba&&(_0x2747ba={..._0x375804,'id':_0x373120,'status':_0x119c5d});}this[_0x13f038(0x212)]=_0x2747ba;if(this[_0x13f038(0x212)]&&this[_0x13f038(0x212)]['licenseType']===_0x37866d){const _0x48a1c0=Math[_0x13f038(0x31d)]((this['_active'][_0x13f038(0x653)]-Date[_0x13f038(0x263)]())/0x5265c00);this[_0x13f038(0x2db)][_0x13f038(0x3e8)]?.[_0x13f038(0x4b5)](_0x13f038(0x3b0)+_0x48a1c0+'\x20day(s).',{'feature':_0x13f038(0x3bd),'licensee':this['_active'][_0x13f038(0x576)],'expiresAt':new Date(this[_0x13f038(0x212)]['expiresAt'])[_0x13f038(0x514)]()});}this['_active']&&this[_0x13f038(0x212)]['licenseType']===_0x2f507e&&this[_0x13f038(0x2db)][_0x13f038(0x3e8)]?.[_0x13f038(0x4b5)](_0x13f038(0x60a),{'feature':_0x13f038(0x3bd),'licensee':this[_0x13f038(0x212)][_0x13f038(0x576)]});}[_0x220087(0x392)](_0x16f554,_0x3f67fa){const _0xbb1c9=_0x220087;if(!_0x16f554[_0xbb1c9(0x1da)])return _0xbb1c9(0x4df);let _0x2fee52;try{_0x2fee52=_0x4e3889[_0xbb1c9(0x240)](_0x16f554[_0xbb1c9(0x1da)]);}catch(_0x4b3cdb){return _0xbb1c9(0x4df);}try{const _0x2b7ed=_0x254aab['verify'](null,_0x2fee52[_0xbb1c9(0x2b5)],_0x5d41b9[_0xbb1c9(0x68f)],_0x2fee52[_0xbb1c9(0x1ab)]);if(!_0x2b7ed)return _0xbb1c9(0x4df);}catch(_0x53de8d){return _0xbb1c9(0x4df);}if(_0x2fee52['decoded']['licenseType']===_0x2f507e)return'active';if(_0x2fee52['decoded'][_0xbb1c9(0x653)]<=Date[_0xbb1c9(0x263)]())return'expired';if(_0x2fee52[_0xbb1c9(0x638)][_0xbb1c9(0x415)]===_0x37866d)return'active';if(!_0x16f554['activation'])return _0xbb1c9(0x345);const _0x587f6a=_0x4e3889[_0xbb1c9(0x34b)]({'tokenString':_0x16f554[_0xbb1c9(0x6a1)],'nodeId':_0x3f67fa,'rawBlobBuf':_0x2fee52[_0xbb1c9(0x355)],'pubKeyPem':_0x5d41b9[_0xbb1c9(0x68f)],'pubFingerprint':_0x5d41b9[_0xbb1c9(0x1e9)]});if(_0x587f6a[_0xbb1c9(0x616)]===_0xbb1c9(0x257)||_0x587f6a[_0xbb1c9(0x616)]==='SIG_INVALID')return _0xbb1c9(0x4be);if(_0x587f6a[_0xbb1c9(0x616)]===_0xbb1c9(0x546))return _0xbb1c9(0x2b7);if(!_0x587f6a['valid'])return _0xbb1c9(0x4be);return _0xbb1c9(0x4f5);}get['active'](){return this['_active'];}get[_0x220087(0x1d3)](){return this['_active']??_0x252708;}['assertFeature'](_0x2217c2){const _0x4fb7d7=_0x220087;if(_0x5d41b9['LICENSED_BUILD']!==_0x4fb7d7(0x296))return;const _0x4841b7=this['effective'];if(!_0x4841b7['features']?.[_0x2217c2]){const _0x26573d=_0x4841b7[_0x4fb7d7(0x3db)]?_0x4fb7d7(0x25e)+_0x2217c2+_0x4fb7d7(0x494)+_0x2217c2+_0x4fb7d7(0x43b):_0x4fb7d7(0x500)+_0x2217c2+_0x4fb7d7(0x516)+_0x2217c2+'\x22.';throw new _0x447cc2(_0x26573d,'LICENSE_FEATURE_DISABLED',{'feature':_0x2217c2});}}[_0x220087(0x5cf)](_0x40f6d4){const _0x39b356=_0x220087;if(_0x5d41b9[_0x39b356(0x570)]!==_0x39b356(0x296))return!![];return!!this[_0x39b356(0x1d3)][_0x39b356(0x26e)]?.[_0x40f6d4];}['assertLimit'](_0x56f9d0,_0x3e3942){const _0x36939f=_0x220087;if(_0x5d41b9[_0x36939f(0x570)]!==_0x36939f(0x296))return;const _0xbddfda=this['effective'],_0x1b06aa=_0xbddfda[_0x36939f(0x4b2)]?.[_0x56f9d0];if(_0x1b06aa===null||_0x1b06aa===undefined||_0x1b06aa===0x0)return;if(_0x3e3942>=_0x1b06aa)throw new _0x447cc2(_0x36939f(0x1a2)+_0x56f9d0+'\x20('+_0x3e3942+'/'+_0x1b06aa+')',_0x36939f(0x1bc),{'limit':_0x56f9d0,'current':_0x3e3942,'max':_0x1b06aa});}async[_0x220087(0x24a)](_0x1f2177){const _0x589793=_0x220087;let _0x10024d;try{_0x10024d=_0x4e3889[_0x589793(0x240)](_0x1f2177);}catch(_0x4cecbe){throw new _0x447cc2('Invalid\x20license\x20blob:\x20'+_0x4cecbe['message'],'LICENSE_INVALID');}let _0x27c0fc;try{_0x27c0fc=_0x254aab[_0x589793(0x39e)](null,_0x10024d[_0x589793(0x2b5)],_0x5d41b9[_0x589793(0x68f)],_0x10024d['sig']);}catch(_0x321cc6){throw new _0x447cc2('License\x20signature\x20invalid:\x20'+_0x321cc6[_0x589793(0x69b)],_0x589793(0x5a4));}if(!_0x27c0fc)throw new _0x447cc2(_0x589793(0x195)+(_0x589793(0x12f)+_0x5d41b9[_0x589793(0x1e9)]+'.\x20')+_0x589793(0x4f1),'LICENSE_INVALID',{'expectedFingerprint':_0x5d41b9['PUB_FINGERPRINT']});if(_0x10024d[_0x589793(0x638)][_0x589793(0x415)]===_0x37866d){const _0x567a9b=_0x10024d[_0x589793(0x638)][_0x589793(0x653)]-_0x10024d[_0x589793(0x638)][_0x589793(0x378)];if(_0x567a9b>_0x1bac7e)throw new _0x447cc2(_0x589793(0x534)+Math['ceil'](_0x567a9b/(0x1e*0x5265c00))+_0x589793(0x31f),_0x589793(0x5a4));}const _0x41f91f=this[_0x589793(0x2db)][_0x589793(0x485)];await _0x5b0c15(_0x41f91f);const _0x36ab7f=_0x4e3889[_0x589793(0x38d)](_0x10024d['rawBuf'])['toString'](_0x589793(0x22e));for(const {value:_0x2c4982}of _0x41f91f[_0x589793(0x47b)](_0x2f57da)){if(_0x2c4982['_licenseHash']===_0x36ab7f)throw new _0x447cc2(_0x589793(0x29e),'LICENSE_INVALID');}const _0x1c94f0=_0x254aab['randomUUID'](),_0x432fe2={'blob':_0x1f2177,'activation':null,'addedAt':Date['now'](),'_licenseHash':_0x36ab7f,'licensee':_0x10024d[_0x589793(0x638)][_0x589793(0x576)],'expiresAt':_0x10024d[_0x589793(0x638)]['expiresAt'],'features':_0x10024d[_0x589793(0x638)][_0x589793(0x26e)],'limits':_0x10024d[_0x589793(0x638)][_0x589793(0x4b2)],'licenseType':_0x10024d['decoded'][_0x589793(0x415)]};return await _0x41f91f[_0x589793(0x26b)](_0x2f57da,_0x1c94f0,_0x432fe2),{'id':_0x1c94f0,..._0x432fe2};}async[_0x220087(0x2b2)](_0x4d845a){const _0xf7be3b=_0x220087;let _0x106a74;try{_0x106a74=_0x4e3889[_0xf7be3b(0x68a)](_0x4d845a);}catch(_0x5a7ad6){throw new _0x447cc2(_0xf7be3b(0x13e)+_0x5a7ad6[_0xf7be3b(0x69b)],_0xf7be3b(0x642));}const _0x4c01e5=_0x106a74[_0xf7be3b(0x38d)][_0xf7be3b(0x3ec)](_0xf7be3b(0x22e)),_0x163d7a=this[_0xf7be3b(0x2db)][_0xf7be3b(0x485)];if(!_0x163d7a||!_0x163d7a[_0xf7be3b(0x365)](_0x2f57da))throw new _0x447cc2(_0xf7be3b(0x274),'LICENSE_ACTIVATION_INVALID');let _0x92ac65=null,_0x572fd0=null;for(const {key:_0x341ea2,value:_0x1b938a}of _0x163d7a['getRange'](_0x2f57da)){if(_0x1b938a['_licenseHash']===_0x4c01e5){_0x92ac65=_0x341ea2,_0x572fd0=_0x1b938a;break;}}if(!_0x92ac65)throw new _0x447cc2('No\x20license\x20found\x20matching\x20this\x20activation\x20token','LICENSE_ACTIVATION_INVALID');const {rawBuf:_0x5233d1}=_0x4e3889[_0xf7be3b(0x240)](_0x572fd0['blob']),_0x1133ab=_0x4e3889['verifyActivation']({'tokenString':_0x4d845a,'nodeId':this[_0xf7be3b(0x2db)]['id'],'rawBlobBuf':_0x5233d1,'pubKeyPem':_0x5d41b9[_0xf7be3b(0x68f)],'pubFingerprint':_0x5d41b9[_0xf7be3b(0x1e9)]});if(!_0x1133ab[_0xf7be3b(0x682)])throw new _0x447cc2(_0xf7be3b(0x5ba)+_0x1133ab[_0xf7be3b(0x616)],'LICENSE_ACTIVATION_INVALID',{'reason':_0x1133ab['reason']});const _0x1f1a9c={..._0x572fd0,'activation':_0x4d845a};return await _0x163d7a['update'](_0x2f57da,_0x92ac65,_0x1f1a9c),{'id':_0x92ac65,..._0x1f1a9c};}async[_0x220087(0x229)](_0x542e96){const _0x2c2a56=_0x220087,_0x53a091=this[_0x2c2a56(0x2db)][_0x2c2a56(0x485)];if(!_0x53a091||!_0x53a091[_0x2c2a56(0x365)](_0x2f57da))return;await _0x53a091[_0x2c2a56(0x280)](_0x2f57da,_0x542e96);}async[_0x220087(0x17a)](){const _0x5e4d2c=_0x220087,_0x4264e9=this[_0x5e4d2c(0x2db)][_0x5e4d2c(0x485)];if(!_0x4264e9||!_0x4264e9[_0x5e4d2c(0x365)](_0x2f57da))return[];const _0xa2e691=this['okdb']['id'],_0x27cc0a=[];for(const {key:_0x59b5bc,value:_0x201ed3}of _0x4264e9[_0x5e4d2c(0x47b)](_0x2f57da)){const _0x24a8f6=this[_0x5e4d2c(0x392)](_0x201ed3,_0xa2e691);_0x27cc0a[_0x5e4d2c(0x3fd)]({..._0x201ed3,'id':_0x59b5bc,'status':_0x24a8f6});}return _0x27cc0a;}['getPins'](){const _0x33b357=_0x220087,_0x3d938e=this[_0x33b357(0x2db)][_0x33b357(0x485)];if(!_0x3d938e||!_0x3d938e[_0x33b357(0x365)](_0x2f57da))return[];const _0x5caef1=this[_0x33b357(0x2db)]['id'],_0x279d54=[];for(const {key:_0x308f2a,value:_0x2c192c}of _0x3d938e[_0x33b357(0x47b)](_0x2f57da)){if(_0x2c192c[_0x33b357(0x32b)]){if(_0x2c192c[_0x33b357(0x415)]===_0x37866d)_0x279d54[_0x33b357(0x3fd)]({'licenseId':_0x308f2a,'pin':null});else{const _0x240319=Buffer['from'](_0x2c192c[_0x33b357(0x32b)],_0x33b357(0x22e)),{pin:_0x1d82f3}=_0x4e3889['derivePin'](_0x5caef1,_0x240319,_0x5d41b9['PUB_FINGERPRINT']);_0x279d54[_0x33b357(0x3fd)]({'licenseId':_0x308f2a,'pin':_0x1d82f3});}}}return _0x279d54;}async[_0x220087(0x17b)](){const _0x4c5b31=_0x220087,_0x59777d=this[_0x4c5b31(0x212)];await this['reload']();if(this[_0x4c5b31(0x212)]&&this[_0x4c5b31(0x212)][_0x4c5b31(0x415)]===_0x37866d){const _0x21cd57=Math['ceil']((this[_0x4c5b31(0x212)][_0x4c5b31(0x653)]-Date[_0x4c5b31(0x263)]())/0x5265c00);this[_0x4c5b31(0x2db)]['log']?.['warn']('⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20'+_0x21cd57+'\x20day(s).',{'feature':_0x4c5b31(0x3bd),'licensee':this[_0x4c5b31(0x212)][_0x4c5b31(0x576)],'expiresAt':new Date(this[_0x4c5b31(0x212)][_0x4c5b31(0x653)])[_0x4c5b31(0x514)]()});}this[_0x4c5b31(0x212)]&&this[_0x4c5b31(0x212)]['licenseType']===_0x2f507e&&this[_0x4c5b31(0x2db)][_0x4c5b31(0x3e8)]?.['warn'](_0x4c5b31(0x60a),{'feature':_0x4c5b31(0x3bd),'licensee':this[_0x4c5b31(0x212)][_0x4c5b31(0x576)]});if(_0x59777d&&!this[_0x4c5b31(0x212)]){this[_0x4c5b31(0x2db)]['log']?.[_0x4c5b31(0x4b5)](_0x4c5b31(0x64f),{'feature':_0x4c5b31(0x3bd)}),this[_0x4c5b31(0x2db)][_0x4c5b31(0x397)]?.['emit'](_0x28e0c2[_0x4c5b31(0x5a4)],{'previous':_0x59777d});const _0x3b78be=this[_0x4c5b31(0x2db)]['options']?.[_0x4c5b31(0x314)]??_0x5d41b9['LICENSE_EXPIRED_ACTION'];_0x3b78be===_0x4c5b31(0x69c)&&(this[_0x4c5b31(0x2db)][_0x4c5b31(0x3e8)]?.[_0x4c5b31(0x5bb)](_0x4c5b31(0x5b2),{'feature':'license'}),this['okdb'][_0x4c5b31(0x5f3)]()[_0x4c5b31(0x606)](()=>{})['finally'](()=>process[_0x4c5b31(0x4ba)](0x1)));}}}return okdbLicense={'LicenseChecker':_0x2a85a0,'_C':_0x5d41b9},okdbLicense;}var okdbShell,hasRequiredOkdbShell;function requireOkdbShell(){const _0x2390ad=_0x264626;if(hasRequiredOkdbShell)return okdbShell;hasRequiredOkdbShell=0x1;const _0x4b71e9=require$$0$2,_0x3dcfb2=require$$1$1,_0x585a72=require$$0,_0x141775=require$$1,_0x3cb6e0=_0x141775[_0x2390ad(0x2c7)](_0x585a72[_0x2390ad(0x607)](),_0x2390ad(0x629)),_0xc99daf=0x3e8,_0x26d36b={'reset':_0x2390ad(0x1f2),'bold':_0x2390ad(0x396),'dim':_0x2390ad(0x5e5),'red':_0x2390ad(0x2c1),'green':'\x1b[32m','yellow':_0x2390ad(0x387),'blue':_0x2390ad(0x5c5),'magenta':_0x2390ad(0x4e0),'cyan':_0x2390ad(0x2d7),'white':'\x1b[37m','gray':_0x2390ad(0x59b)},_0x2fe756=!process[_0x2390ad(0x54a)][_0x2390ad(0x319)]||!!process.env.NO_COLOR,_0x172227=(_0x205d3f,_0x3a561e)=>_0x2fe756?_0x3a561e:''+_0x205d3f+_0x3a561e+_0x26d36b['reset'],_0x47e35f={'error':_0x26d36b[_0x2390ad(0x3ba)],'warn':_0x26d36b[_0x2390ad(0x593)],'info':_0x26d36b['cyan'],'debug':_0x26d36b[_0x2390ad(0x5d9)]},_0x425245={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3};function _0x674415(_0x1abdcf,_0x2d1ecc=_0x2390ad(0x400)){const _0x562817=_0x2390ad,{level:_0x21542f,msg:_0x4c1ba6,meta:_0x4d2de3,context:_0x1bc88b,ts:_0x430b8f}=_0x1abdcf;if((_0x425245[_0x21542f]??0x1)<(_0x425245[_0x2d1ecc]??0x1))return;const _0x1e67aa=_0x172227(_0x26d36b[_0x562817(0x5d9)],new Date(_0x430b8f)[_0x562817(0x514)]()),_0x34763f=_0x172227(_0x47e35f[_0x21542f]??_0x26d36b['white'],_0x21542f[_0x562817(0x3be)](0x5));let _0xea0f4c='\x20\x20'+_0x1e67aa+'\x20'+_0x172227(_0x26d36b[_0x562817(0x554)],_0x34763f)+'\x20'+_0x4c1ba6;if(_0x4d2de3&&Object[_0x562817(0x5fb)](_0x4d2de3)[_0x562817(0x4e2)]>0x0){const _0x17851f=Object[_0x562817(0x65b)](_0x4d2de3)[_0x562817(0x145)](([_0x40dc00,_0x2f70da])=>_0x40dc00+'='+_0x2f70da)[_0x562817(0x2c7)]('\x20');_0xea0f4c+=_0x172227(_0x26d36b[_0x562817(0x403)],_0x562817(0x194)+_0x17851f+']');}if(_0x1bc88b!==undefined){const _0x7eb1be=typeof _0x1bc88b===_0x562817(0x652)?JSON[_0x562817(0x6ae)](_0x1bc88b):String(_0x1bc88b);_0xea0f4c+=_0x172227(_0x26d36b[_0x562817(0x403)],'\x20\x20'+_0x7eb1be);}const _0x27bf97=_0x21542f===_0x562817(0x5bb)||_0x21542f==='warn'?process[_0x562817(0x63c)]['write']['bind'](process[_0x562817(0x63c)]):process[_0x562817(0x54a)]['write']['bind'](process[_0x562817(0x54a)]);_0x27bf97(_0xea0f4c+'\x0a');}function _0x21588d(_0x483b67,_0x467245){const _0x2e537b=_0x2390ad;if(_0x483b67===0xcc||_0x483b67>=0xc8&&_0x483b67<0x12c&&!_0x467245){console[_0x2e537b(0x3e8)](_0x2e537b(0x482)+_0x172227(_0x26d36b['green'],'✓')+'\x0a');return;}if(_0x483b67>=0x190||_0x467245?.[_0x2e537b(0x5bb)]){const _0x4014ea=_0x467245?.[_0x2e537b(0x5bb)]??_0x467245?.[_0x2e537b(0x69b)]??'HTTP\x20'+_0x483b67;console[_0x2e537b(0x3e8)](_0x2e537b(0x482)+_0x172227(_0x26d36b[_0x2e537b(0x3ba)],'✗')+'\x20'+_0x172227(_0x26d36b['bold']+_0x26d36b[_0x2e537b(0x3ba)],String(_0x483b67))+'\x20\x20'+_0x4014ea+'\x0a');return;}const _0xc23095=Object['prototype'][_0x2e537b(0x689)][_0x2e537b(0x50a)](_0x467245??{},_0x2e537b(0x2dd))?_0x467245['result']:_0x467245,_0x34d01f=_0x467245?.[_0x2e537b(0x423)];console[_0x2e537b(0x3e8)](''),_0x88461a(_0xc23095,'\x20\x20');if(_0x34d01f?.[_0x2e537b(0x5be)]!=null||_0x34d01f?.['time']!=null){const _0x2e92ed=[];if(_0x34d01f[_0x2e537b(0x5be)]!=null)_0x2e92ed[_0x2e537b(0x3fd)](_0x34d01f[_0x2e537b(0x5be)]+_0x2e537b(0x56e)+(_0x34d01f['count']!==0x1?'s':''));if(_0x34d01f[_0x2e537b(0x139)]!=null)_0x2e92ed[_0x2e537b(0x3fd)](_0x34d01f[_0x2e537b(0x139)]+'ms');console['log'](_0x2e537b(0x482)+_0x172227(_0x26d36b[_0x2e537b(0x403)],_0x2e92ed['join'](_0x2e537b(0x1e1))));}console[_0x2e537b(0x3e8)]('');}function _0x88461a(_0x5ae306,_0x243f8c=''){const _0x1e4445=_0x2390ad;if(_0x5ae306===null||_0x5ae306===undefined){console[_0x1e4445(0x3e8)](_0x243f8c+_0x172227(_0x26d36b[_0x1e4445(0x403)],_0x1e4445(0x205)));return;}if(Array['isArray'](_0x5ae306)){if(_0x5ae306[_0x1e4445(0x4e2)]===0x0){console[_0x1e4445(0x3e8)](_0x243f8c+_0x172227(_0x26d36b[_0x1e4445(0x403)],_0x1e4445(0x592)));return;}if(_0x5ae306[_0x1e4445(0x62f)](_0x2d8b93=>_0x2d8b93&&typeof _0x2d8b93===_0x1e4445(0x652)&&_0x1e4445(0x2dc)in _0x2d8b93&&'value'in _0x2d8b93)){_0x562ac3(_0x5ae306,_0x243f8c);return;}if(_0x5ae306[_0x1e4445(0x62f)](_0x46ff1a=>_0x46ff1a&&typeof _0x46ff1a===_0x1e4445(0x652)&&_0x1e4445(0x1f7)in _0x46ff1a&&_0x1e4445(0x5be)in _0x46ff1a)){_0x4b4738(_0x5ae306,_0x243f8c);return;}if(_0x5ae306['every'](_0x398e08=>typeof _0x398e08!==_0x1e4445(0x652)||_0x398e08===null)){_0x5ae306[_0x1e4445(0x442)]((_0xd08074,_0x390f3d)=>console[_0x1e4445(0x3e8)](_0x243f8c+_0x172227(_0x26d36b[_0x1e4445(0x5d9)],_0x390f3d+0x1+'.')+'\x20'+_0x172227(_0x26d36b[_0x1e4445(0x3bf)],String(_0xd08074))));return;}_0x5ae306['forEach']((_0x1c3919,_0x75c770)=>{const _0x2c0879=_0x1e4445;console[_0x2c0879(0x3e8)](_0x243f8c+_0x172227(_0x26d36b[_0x2c0879(0x403)],'['+_0x75c770+']'));if(typeof _0x1c3919===_0x2c0879(0x652)&&_0x1c3919!==null)_0x5dc23c(_0x1c3919,_0x243f8c+'\x20\x20');else console[_0x2c0879(0x3e8)](_0x243f8c+'\x20\x20'+String(_0x1c3919));});return;}if(typeof _0x5ae306===_0x1e4445(0x652)){if(_0x1e4445(0x2dc)in _0x5ae306&&_0x1e4445(0x222)in _0x5ae306&&Object[_0x1e4445(0x5fb)](_0x5ae306)[_0x1e4445(0x4e2)]<=0x3){console[_0x1e4445(0x3e8)](_0x243f8c+_0x172227(_0x26d36b[_0x1e4445(0x554)]+_0x26d36b[_0x1e4445(0x488)],String(_0x5ae306['key'])));const _0x56a45f=_0x5ae306[_0x1e4445(0x222)];if(_0x56a45f&&typeof _0x56a45f==='object')_0x5dc23c(_0x56a45f,_0x243f8c);else console[_0x1e4445(0x3e8)](_0x243f8c+_0x172227(_0x26d36b[_0x1e4445(0x3bf)],String(_0x56a45f)));return;}_0x5dc23c(_0x5ae306,_0x243f8c);return;}console[_0x1e4445(0x3e8)](_0x243f8c+_0x172227(_0x26d36b[_0x1e4445(0x3bf)],String(_0x5ae306)));}function _0x5dc23c(_0x4bf738,_0x3fbb12=''){const _0x15f05b=_0x2390ad,_0x37e4aa=Object[_0x15f05b(0x65b)](_0x4bf738);if(_0x37e4aa['length']===0x0){console['log'](_0x3fbb12+_0x172227(_0x26d36b[_0x15f05b(0x403)],'{}'));return;}const _0x2ff60a=Math['min'](0x1c,Math['max'](..._0x37e4aa[_0x15f05b(0x145)](([_0x26af2d])=>_0x26af2d[_0x15f05b(0x4e2)])));for(const [_0x2d6c2a,_0x48a962]of _0x37e4aa){const _0x4dab09=_0x172227(_0x26d36b[_0x15f05b(0x488)],_0x2d6c2a[_0x15f05b(0x3be)](_0x2ff60a));if(_0x48a962===null||_0x48a962===undefined)console['log'](_0x3fbb12+_0x4dab09+'\x20\x20'+_0x172227(_0x26d36b['dim'],'null'));else{if(typeof _0x48a962==='object'){const _0x1df9f6=JSON['stringify'](_0x48a962);_0x1df9f6[_0x15f05b(0x4e2)]<=0x50?console[_0x15f05b(0x3e8)](_0x3fbb12+_0x4dab09+'\x20\x20'+_0x172227(_0x26d36b[_0x15f05b(0x403)],_0x1df9f6)):(console[_0x15f05b(0x3e8)](_0x3fbb12+_0x4dab09),_0x88461a(_0x48a962,_0x3fbb12+'\x20\x20'));}else{const _0x252a4c=typeof _0x48a962===_0x15f05b(0x37f)?_0x172227(_0x48a962?_0x26d36b[_0x15f05b(0x413)]:_0x26d36b[_0x15f05b(0x593)],String(_0x48a962)):typeof _0x48a962==='number'?_0x172227(_0x26d36b[_0x15f05b(0x3ac)],String(_0x48a962)):_0x172227(_0x26d36b[_0x15f05b(0x3bf)],String(_0x48a962));console[_0x15f05b(0x3e8)](_0x3fbb12+_0x4dab09+'\x20\x20'+_0x252a4c);}}}}function _0x562ac3(_0x4749b5,_0x4c4392=''){const _0x308c20=_0x2390ad,_0x37047a=Math[_0x308c20(0x660)](0x20,Math[_0x308c20(0x2d6)](..._0x4749b5[_0x308c20(0x145)](_0x2416e3=>String(_0x2416e3['key'])[_0x308c20(0x4e2)])));for(const {key:_0x358e96,value:_0x225f02,score:_0x3213c7,clock:_0x224bb2}of _0x4749b5){const _0x154482=_0x172227(_0x26d36b[_0x308c20(0x554)]+_0x26d36b[_0x308c20(0x488)],String(_0x358e96)['padEnd'](_0x37047a)),_0xfb26c=_0x225f02==null?_0x172227(_0x26d36b[_0x308c20(0x403)],_0x308c20(0x3d4)):typeof _0x225f02===_0x308c20(0x652)?_0x172227(_0x26d36b['dim'],JSON[_0x308c20(0x6ae)](_0x225f02)):_0x172227(_0x26d36b[_0x308c20(0x3bf)],String(_0x225f02)),_0xec6d0a=_0x3213c7!=null?_0x172227(_0x26d36b['gray'],'\x20\x20score:'+_0x3213c7[_0x308c20(0x367)](0x4)):'',_0x2f5cb1=_0x224bb2!=null?_0x172227(_0x26d36b[_0x308c20(0x5d9)],_0x308c20(0x234)+_0x224bb2):'';console['log'](_0x4c4392+_0x154482+'\x20\x20'+_0xfb26c+_0xec6d0a+_0x2f5cb1);}}function _0x4b4738(_0x531620,_0x5a1e21=''){const _0x5ed4e7=_0x2390ad,_0x336663=Math[_0x5ed4e7(0x660)](0x20,Math['max'](..._0x531620[_0x5ed4e7(0x145)](_0x6ab041=>_0x6ab041['type'][_0x5ed4e7(0x4e2)])));for(const {type:_0x2a6ce7,count:_0x440099,fields:_0x5a47ef}of _0x531620){if(_0x2a6ce7[_0x5ed4e7(0x15f)]('~'))continue;const _0x22af42=_0x172227(_0x26d36b['bold']+_0x26d36b[_0x5ed4e7(0x488)],_0x2a6ce7[_0x5ed4e7(0x3be)](_0x336663)),_0x4a9714=_0x172227(_0x26d36b['magenta'],String(_0x440099)[_0x5ed4e7(0x354)](0x6))+_0x172227(_0x26d36b[_0x5ed4e7(0x403)],'\x20records'),_0x17902a=_0x5a47ef&&Object['keys'](_0x5a47ef)[_0x5ed4e7(0x4e2)]?_0x172227(_0x26d36b[_0x5ed4e7(0x403)],_0x5ed4e7(0x266)+Object['keys'](_0x5a47ef)['slice'](0x0,0x6)['join'](',\x20')+(Object[_0x5ed4e7(0x5fb)](_0x5a47ef)['length']>0x6?'…':'')):'';console[_0x5ed4e7(0x3e8)](_0x5a1e21+_0x22af42+'\x20\x20'+_0x4a9714+_0x17902a);}}const _0x1aa270=[_0x2390ad(0x523),'type/',_0x2390ad(0x44e),_0x2390ad(0x215),_0x2390ad(0x393),_0x2390ad(0x67c)];function _0x4fe0d6(_0x1f22ec,_0x4234f8){const _0x5b632b=_0x2390ad;if(_0x1f22ec[_0x5b632b(0x15f)]('/api/'))return _0x1f22ec;if(_0x1f22ec[_0x5b632b(0x15f)]('/'))return'/api'+_0x1f22ec;if(_0x1f22ec[_0x5b632b(0x15f)](_0x5b632b(0x4d2)))return _0x5b632b(0x519)+_0x1f22ec;const _0x52d640=_0x1aa270[_0x5b632b(0x175)](_0x25db08=>_0x1f22ec===_0x25db08[_0x5b632b(0x32d)](/\/$/,'')||_0x1f22ec[_0x5b632b(0x15f)](_0x25db08));return _0x52d640?_0x5b632b(0x531)+_0x4234f8+'/'+_0x1f22ec:_0x5b632b(0x519)+_0x1f22ec;}function _0x2f7c2b(_0x66ac29){const _0x10feb5=_0x2390ad,_0x45b0ea={},_0x41eb3e=[];let _0xe66b43=0x0;while(_0xe66b43<_0x66ac29[_0x10feb5(0x4e2)]){if((_0x66ac29[_0xe66b43]===_0x10feb5(0x22b)||_0x66ac29[_0xe66b43]==='-e')&&_0x66ac29[_0xe66b43+0x1]&&!_0x66ac29[_0xe66b43+0x1][_0x10feb5(0x15f)]('-'))_0x45b0ea['env']=_0x66ac29[++_0xe66b43];else _0x66ac29[_0xe66b43]===_0x10feb5(0x383)||_0x66ac29[_0xe66b43]==='-h'?_0x45b0ea[_0x10feb5(0x4a2)]=!![]:_0x41eb3e['push'](_0x66ac29[_0xe66b43]);_0xe66b43++;}return{'flags':_0x45b0ea,'rest':_0x41eb3e};}const _0x3cc2bd={'system':_0x2390ad(0x3ed),'envs':_0x2390ad(0x52f),'types':_0x2390ad(0x5d0),'data':'Records','indexes':'Indexes','fts':'Full-text\x20search','sync':_0x2390ad(0x32c),'queue':_0x2390ad(0x615),'files':_0x2390ad(0x33a),'embeddings':_0x2390ad(0x1d2),'engines':_0x2390ad(0x4db),'admin':_0x2390ad(0x201),'event':'Events','processor':_0x2390ad(0x42e)},_0x1c63f0=[_0x2390ad(0x193),_0x2390ad(0x2cf),'types',_0x2390ad(0x1df),_0x2390ad(0x2b9),_0x2390ad(0x4d6),_0x2390ad(0x2a5),_0x2390ad(0x42d),_0x2390ad(0x35f),_0x2390ad(0x464),_0x2390ad(0x6a8),_0x2390ad(0x35b)];function _0x1f8e17(_0x33ac78){const _0x39c73b=_0x2390ad;return _0x33ac78[_0x39c73b(0x32d)](/^\/api/,'')[_0x39c73b(0x32d)](/^\[\/env\/:env=[^\]]*\]/,'[env]')[_0x39c73b(0x32d)](/^\/env\/:env/,'env/:env')['replace'](/^\//,'');}function _0x3b5d5e(_0x12a64f,_0x1a487c=''){const _0x23edc4=_0x2390ad,_0x29988d=_0x12a64f[_0x23edc4(0x48f)][_0x23edc4(0x627)]()[_0x23edc4(0x3d5)](_0x14f862=>!_0x14f862[_0x23edc4(0x423)]?.[_0x23edc4(0x621)]),_0x53ea3c=_0x1a487c?_0x29988d[_0x23edc4(0x3d5)](_0x4fc1fc=>_0x4fc1fc[_0x23edc4(0x4d4)][_0x23edc4(0x246)]()[_0x23edc4(0x3b7)](_0x1a487c[_0x23edc4(0x246)]())||(_0x19a341(_0x4fc1fc)??'')[_0x23edc4(0x246)]()[_0x23edc4(0x3b7)](_0x1a487c[_0x23edc4(0x246)]())||_0x329b16(_0x4fc1fc)[_0x23edc4(0x175)](_0x3de9c9=>_0x3de9c9[_0x23edc4(0x246)]()[_0x23edc4(0x3b7)](_0x1a487c[_0x23edc4(0x246)]()))):_0x29988d;if(!_0x53ea3c['length']){console['log'](_0x172227(_0x26d36b[_0x23edc4(0x593)],_0x23edc4(0x24e)+_0x1a487c+'\x22\x0a'));return;}const _0x4dec0d=new Map();for(const _0x27c274 of _0x53ea3c){const _0x47c163=_0x329b16(_0x27c274)[0x0]??_0x23edc4(0x32a);if(!_0x4dec0d[_0x23edc4(0x34a)](_0x47c163))_0x4dec0d[_0x23edc4(0x244)](_0x47c163,[]);_0x4dec0d[_0x23edc4(0x165)](_0x47c163)[_0x23edc4(0x3fd)](_0x27c274);}const _0xe99b45=[..._0x1c63f0[_0x23edc4(0x3d5)](_0x269272=>_0x4dec0d[_0x23edc4(0x34a)](_0x269272)),...[..._0x4dec0d[_0x23edc4(0x5fb)]()]['filter'](_0x41f439=>!_0x1c63f0['includes'](_0x41f439))];console['log']('');for(const _0xd5a60f of _0xe99b45){const _0x4d2559=_0x4dec0d[_0x23edc4(0x165)](_0xd5a60f);if(!_0x4d2559?.[_0x23edc4(0x4e2)])continue;console['log'](_0x172227(_0x26d36b[_0x23edc4(0x554)],'\x20\x20'+(_0x3cc2bd[_0xd5a60f]??_0xd5a60f)));for(const _0x4cf213 of _0x4d2559){const _0xe6bf00=_0x172227(_0x26d36b[_0x23edc4(0x3ac)],_0x4cf213[_0x23edc4(0x1b1)]['padEnd'](0x7)),_0x3c695b=_0x172227(_0x26d36b['cyan'],_0x1f8e17(_0x4cf213['path'])),_0x22fbd3=_0x19a341(_0x4cf213)?_0x172227(_0x26d36b['dim'],'\x20\x20'+_0x19a341(_0x4cf213)):'',_0x504037=_0x4cf213[_0x23edc4(0x3c8)]?.['id']?_0x172227(_0x26d36b[_0x23edc4(0x5d9)],_0x23edc4(0x194)+_0x4cf213['operation']['id']+']'):'';console[_0x23edc4(0x3e8)](_0x23edc4(0x53a)+_0xe6bf00+'\x20'+_0x3c695b+_0x22fbd3+_0x504037);}console['log']('');}}function _0x4eab17(_0x333cff,_0xf5fe7a){const _0x457401=_0x2390ad,_0x3a9ac0=_0xf5fe7a[_0x457401(0x32d)](/^\/api(\/env\/[^/]+)?\//,'')['split']('/')[0x0],_0x41dfc0=_0x333cff['http']['listRoutes']()[_0x457401(0x3d5)](_0x33580c=>_0x33580c[_0x457401(0x4d4)]['toLowerCase']()['includes'](_0x3a9ac0[_0x457401(0x246)]()));if(!_0x41dfc0[_0x457401(0x4e2)]){console[_0x457401(0x3e8)](_0x172227(_0x26d36b[_0x457401(0x593)],_0x457401(0x45c)+_0xf5fe7a+'\x0a'));return;}console[_0x457401(0x3e8)]('');for(const _0x28b7a9 of _0x41dfc0[_0x457401(0x149)](0x0,0xc)){for(const _0x38413a of _0x52c801(_0x28b7a9)){console[_0x457401(0x3e8)](_0x38413a);}console[_0x457401(0x3e8)]('');}}function _0x19a341(_0xd018b6){const _0x3c54c3=_0x2390ad;return _0xd018b6['operation']?.['summary']??_0xd018b6[_0x3c54c3(0x423)]?.[_0x3c54c3(0x379)]??'';}function _0x5bc333(_0x462475){const _0x26d7c7=_0x2390ad;return _0x462475[_0x26d7c7(0x3c8)]?.[_0x26d7c7(0x1b8)]??_0x462475[_0x26d7c7(0x423)]?.[_0x26d7c7(0x1b8)]??'';}function _0x329b16(_0xe29e25){const _0x49446f=_0x2390ad;return _0xe29e25['operation']?.[_0x49446f(0x200)]?.[_0x49446f(0x4e2)]?_0xe29e25['operation'][_0x49446f(0x200)]:_0xe29e25[_0x49446f(0x423)]?.['tags']??[];}function _0x52c801(_0x43c74f){const _0x557ef3=_0x2390ad,_0x2963da=[];_0x2963da['push']('\x20\x20'+_0x172227(_0x26d36b[_0x557ef3(0x554)]+_0x26d36b['magenta'],_0x43c74f[_0x557ef3(0x1b1)]['padEnd'](0x7))+'\x20'+_0x172227(_0x26d36b['bold']+_0x26d36b[_0x557ef3(0x488)],_0x43c74f[_0x557ef3(0x4d4)]));_0x43c74f[_0x557ef3(0x3c8)]?.['id']&&_0x2963da[_0x557ef3(0x3fd)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x172227(_0x26d36b[_0x557ef3(0x5d9)],_0x557ef3(0x1d8)+_0x43c74f[_0x557ef3(0x3c8)]['id']));_0x19a341(_0x43c74f)&&_0x2963da[_0x557ef3(0x3fd)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x172227(_0x26d36b[_0x557ef3(0x3bf)],_0x19a341(_0x43c74f)));_0x5bc333(_0x43c74f)&&_0x2963da[_0x557ef3(0x3fd)](_0x557ef3(0x26c)+_0x172227(_0x26d36b[_0x557ef3(0x403)],_0x5bc333(_0x43c74f)));_0x329b16(_0x43c74f)['length']&&_0x2963da['push']('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x172227(_0x26d36b[_0x557ef3(0x5d9)],_0x557ef3(0x60f)+_0x329b16(_0x43c74f)['join'](',\x20')));_0x43c74f['operation']?.[_0x557ef3(0x671)]?.[_0x557ef3(0x56f)]&&_0x2963da['push'](_0x557ef3(0x26c)+_0x172227(_0x26d36b[_0x557ef3(0x5d9)],_0x557ef3(0x171)+_0x43c74f[_0x557ef3(0x3c8)][_0x557ef3(0x671)][_0x557ef3(0x56f)]));_0x43c74f[_0x557ef3(0x3c8)]?.['http']?.['transport']&&_0x43c74f[_0x557ef3(0x3c8)][_0x557ef3(0x48f)]['transport']!==_0x557ef3(0x1e7)&&_0x2963da['push'](_0x557ef3(0x26c)+_0x172227(_0x26d36b[_0x557ef3(0x5d9)],_0x557ef3(0x32e)+_0x43c74f[_0x557ef3(0x3c8)]['http'][_0x557ef3(0x37d)]));if(_0x43c74f['operation']?.[_0x557ef3(0x57a)]){const _0x46298b=Object['keys'](_0x43c74f[_0x557ef3(0x3c8)][_0x557ef3(0x57a)][_0x557ef3(0x371)]||{});if(_0x46298b[_0x557ef3(0x4e2)])_0x2963da[_0x557ef3(0x3fd)](_0x557ef3(0x26c)+_0x172227(_0x26d36b['gray'],'input:\x20'+_0x46298b[_0x557ef3(0x2c7)](',\x20')));}return _0x43c74f['meta']?.['body']&&_0x2963da['push'](_0x557ef3(0x26c)+_0x172227(_0x26d36b[_0x557ef3(0x5d9)],'body:\x20'+JSON[_0x557ef3(0x6ae)](_0x43c74f[_0x557ef3(0x423)][_0x557ef3(0x553)]))),_0x2963da;}async function _0x146a74(_0x261ba3,_0xc6839,_0x35b0cc,_0x20a2c7=null){const _0x1c363e=_0x2390ad,_0x5d7e6a=_0x35b0cc[_0x1c363e(0x51b)]('?'),_0x135ee4=_0x5d7e6a>=0x0?_0x35b0cc[_0x1c363e(0x149)](0x0,_0x5d7e6a):_0x35b0cc,_0x22380c=_0x5d7e6a>=0x0?_0x35b0cc[_0x1c363e(0x149)](_0x5d7e6a+0x1):'',_0x5d1c5c=Object[_0x1c363e(0x5df)](new URLSearchParams(_0x22380c)[_0x1c363e(0x65b)]());return _0x261ba3[_0x1c363e(0x48f)][_0x1c363e(0x4fd)](_0xc6839,_0x135ee4,{'body':_0x20a2c7,'query':_0x5d1c5c,'headers':{'content-type':'application/json'}},{'internal':!![]});}function _0x44ca7e(_0x3dd4c9){const _0x45caa4=_0x2390ad;if(!_0x3dd4c9)return null;const _0x539082=_0x3dd4c9[_0x45caa4(0x2c3)]();if(!_0x539082)return null;try{return JSON[_0x45caa4(0x2cc)](_0x539082);}catch{}try{return JSON[_0x45caa4(0x2cc)](_0x3bb806(_0x539082));}catch(_0x3b8a2b){throw new SyntaxError(_0x3b8a2b[_0x45caa4(0x69b)],{'cause':_0x3b8a2b});}}function _0x3bb806(_0x34d629){const _0x53192d=_0x2390ad;let _0x5cc6d7='',_0x23e77f=0x0;while(_0x23e77f<_0x34d629[_0x53192d(0x4e2)]){const _0x18e894=_0x34d629[_0x23e77f];if(_0x18e894==='\x22'){_0x5cc6d7+='\x22',_0x23e77f++;while(_0x23e77f<_0x34d629[_0x53192d(0x4e2)]&&_0x34d629[_0x23e77f]!=='\x22'){if(_0x34d629[_0x23e77f]==='\x5c'){_0x5cc6d7+=_0x34d629[_0x23e77f++];if(_0x23e77f<_0x34d629['length'])_0x5cc6d7+=_0x34d629[_0x23e77f++];}else _0x5cc6d7+=_0x34d629[_0x23e77f++];}_0x5cc6d7+='\x22';if(_0x23e77f<_0x34d629[_0x53192d(0x4e2)])_0x23e77f++;continue;}if(_0x18e894==='\x27'){_0x5cc6d7+='\x22',_0x23e77f++;while(_0x23e77f<_0x34d629[_0x53192d(0x4e2)]&&_0x34d629[_0x23e77f]!=='\x27'){if(_0x34d629[_0x23e77f]==='\x5c'&&_0x34d629[_0x23e77f+0x1]==='\x27')_0x5cc6d7+='\x27',_0x23e77f+=0x2;else _0x34d629[_0x23e77f]==='\x22'?(_0x5cc6d7+='\x5c\x22',_0x23e77f++):_0x5cc6d7+=_0x34d629[_0x23e77f++];}_0x5cc6d7+='\x22';if(_0x23e77f<_0x34d629['length'])_0x23e77f++;continue;}if('{}[]:,\x0a\x0d\x09\x20'[_0x53192d(0x3b7)](_0x18e894)){_0x5cc6d7+=_0x18e894,_0x23e77f++;continue;}let _0x5e3346='';while(_0x23e77f<_0x34d629[_0x53192d(0x4e2)]&&!_0x53192d(0x51c)[_0x53192d(0x3b7)](_0x34d629[_0x23e77f])&&_0x34d629[_0x23e77f]!=='\x20'&&_0x34d629[_0x23e77f]!=='\x09'&&_0x34d629[_0x23e77f]!=='\x0a'&&_0x34d629[_0x23e77f]!=='\x0d'){_0x5e3346+=_0x34d629[_0x23e77f++];}let _0x48f8d6=_0x23e77f;while(_0x48f8d6<_0x34d629[_0x53192d(0x4e2)]&&(_0x34d629[_0x48f8d6]==='\x20'||_0x34d629[_0x48f8d6]==='\x09'))_0x48f8d6++;if(_0x34d629[_0x48f8d6]===':')_0x5cc6d7+='\x22'+_0x5e3346+'\x22';else _0x5e3346===_0x53192d(0x296)||_0x5e3346===_0x53192d(0x3ef)||_0x5e3346==='null'||/^-?\d+(\.\d+)?([eE][+-]?\d+)?$/['test'](_0x5e3346)?_0x5cc6d7+=_0x5e3346:_0x5cc6d7+='\x22'+_0x5e3346+'\x22';}return _0x5cc6d7[_0x53192d(0x32d)](/,(\s*[}\]])/g,'$1');}function _0x54d9cc(_0x58e527){const _0x13bffe=_0x2390ad,_0x5be353=[];let _0x18c82c=0x0;while(_0x18c82c<_0x58e527[_0x13bffe(0x4e2)]){while(_0x18c82c<_0x58e527['length']&&(_0x58e527[_0x18c82c]==='\x20'||_0x58e527[_0x18c82c]==='\x09'))_0x18c82c++;if(_0x18c82c>=_0x58e527[_0x13bffe(0x4e2)])break;const _0x23b0f9=_0x58e527[_0x18c82c];if(_0x23b0f9==='{'||_0x23b0f9==='['){const _0x5046d5=_0x23b0f9==='{'?'}':']',_0x14fe09=_0x18c82c++;let _0x54487a=0x1,_0x4a99cc=![],_0x5b2bfb='';while(_0x18c82c<_0x58e527[_0x13bffe(0x4e2)]&&_0x54487a>0x0){const _0x403244=_0x58e527[_0x18c82c];if(_0x4a99cc){if(_0x403244==='\x5c')_0x18c82c++;else{if(_0x403244===_0x5b2bfb)_0x4a99cc=![];}}else{if(_0x403244==='\x22'||_0x403244==='\x27')_0x4a99cc=!![],_0x5b2bfb=_0x403244;else{if(_0x403244===_0x23b0f9)_0x54487a++;else{if(_0x403244===_0x5046d5)_0x54487a--;}}}_0x18c82c++;}_0x5be353[_0x13bffe(0x3fd)](_0x58e527[_0x13bffe(0x149)](_0x14fe09,_0x18c82c));continue;}if(_0x23b0f9==='\x22'||_0x23b0f9==='\x27'){const _0x4caa42=_0x23b0f9;_0x18c82c++;let _0x4c5ddb='';while(_0x18c82c<_0x58e527[_0x13bffe(0x4e2)]&&_0x58e527[_0x18c82c]!==_0x4caa42){if(_0x58e527[_0x18c82c]==='\x5c'&&_0x18c82c+0x1<_0x58e527[_0x13bffe(0x4e2)])_0x18c82c++,_0x4c5ddb+=_0x58e527[_0x18c82c++];else _0x4c5ddb+=_0x58e527[_0x18c82c++];}if(_0x18c82c<_0x58e527[_0x13bffe(0x4e2)])_0x18c82c++;_0x5be353['push'](_0x4c5ddb);continue;}let _0x1bfb5e='';while(_0x18c82c<_0x58e527['length']&&_0x58e527[_0x18c82c]!=='\x20'&&_0x58e527[_0x18c82c]!=='\x09'&&_0x58e527[_0x18c82c]!=='{'&&_0x58e527[_0x18c82c]!=='['){_0x1bfb5e+=_0x58e527[_0x18c82c++];}if(_0x1bfb5e)_0x5be353[_0x13bffe(0x3fd)](_0x1bfb5e);}return _0x5be353;}function _0x57851b(_0x535278,_0x4cc4c3){const _0x22cb81=_0x2390ad,_0x21037f=[..._0x535278[_0x22cb81(0x4fa)]['keys']()][_0x22cb81(0x3d5)](_0x2dc0f6=>!_0x2dc0f6[_0x22cb81(0x15f)]('~'));console['log'](['',_0x172227(_0x26d36b[_0x22cb81(0x554)]+_0x26d36b[_0x22cb81(0x488)],_0x22cb81(0x4bd)),_0x172227(_0x26d36b[_0x22cb81(0x554)]+_0x26d36b[_0x22cb81(0x488)],_0x22cb81(0x4f7))+_0x172227(_0x26d36b[_0x22cb81(0x554)],_0x22cb81(0x267))+_0x172227(_0x26d36b[_0x22cb81(0x554)]+_0x26d36b[_0x22cb81(0x488)],'║'),_0x172227(_0x26d36b[_0x22cb81(0x554)]+_0x26d36b[_0x22cb81(0x488)],'\x20\x20╚═══════════════════════════╝'),'','\x20\x20'+_0x172227(_0x26d36b[_0x22cb81(0x413)],'✓')+'\x20'+_0x172227(_0x26d36b['bold'],_0x22cb81(0x287))+_0x22cb81(0x220)+_0x4cc4c3[_0x22cb81(0x1e5)],..._0x4cc4c3[_0x22cb81(0x3de)]>0x1?['\x20\x20'+_0x172227(_0x26d36b[_0x22cb81(0x413)],'✓')+'\x20'+_0x172227(_0x26d36b[_0x22cb81(0x554)],'cluster')+'\x20'+_0x4cc4c3['clusterWorkers']+'\x20HTTP\x20workers\x20'+_0x172227(_0x26d36b[_0x22cb81(0x5d9)],_0x22cb81(0x3d3))]:[],'\x20\x20'+_0x172227(_0x26d36b[_0x22cb81(0x413)],'✓')+'\x20'+_0x172227(_0x26d36b['bold'],'api')+'\x20\x20\x20\x20\x20http://localhost:'+_0x4cc4c3[_0x22cb81(0x1e5)]+_0x22cb81(0x2b8),'\x20\x20'+_0x172227(_0x26d36b['green'],'✓')+'\x20'+_0x172227(_0x26d36b[_0x22cb81(0x554)],'path')+'\x20\x20\x20\x20'+_0x4cc4c3['dbPath'],'\x20\x20'+_0x172227(_0x26d36b['green'],'✓')+'\x20'+_0x172227(_0x26d36b['bold'],'id')+_0x22cb81(0x586)+_0x172227(_0x26d36b[_0x22cb81(0x5d9)],_0x535278['id']),'\x20\x20'+_0x172227(_0x26d36b[_0x22cb81(0x413)],'✓')+'\x20'+_0x172227(_0x26d36b[_0x22cb81(0x554)],_0x22cb81(0x2cf))+_0x22cb81(0x53a)+_0x21037f[_0x22cb81(0x145)](_0x17d1a4=>_0x172227(_0x26d36b[_0x22cb81(0x488)],_0x17d1a4))[_0x22cb81(0x2c7)]('\x20\x20'),..._0x4cc4c3[_0x22cb81(0x575)]?[]:['\x20\x20'+_0x172227(_0x26d36b['green'],'✓')+'\x20'+_0x172227(_0x26d36b['bold'],_0x22cb81(0x35b))+_0x22cb81(0x26f)+_0x4cc4c3[_0x22cb81(0x1e5)]+_0x22cb81(0x44b)],'',_0x172227(_0x26d36b[_0x22cb81(0x403)],_0x22cb81(0x162)+_0x172227(_0x26d36b[_0x22cb81(0x554)],_0x22cb81(0x4a2))+_0x22cb81(0x5f0)+_0x172227(_0x26d36b[_0x22cb81(0x554)],'routes')+_0x22cb81(0x286)+_0x172227(_0x26d36b['bold'],'exit')+_0x22cb81(0x3f4)),''][_0x22cb81(0x2c7)]('\x0a'));}function _0x24e437(_0x3de6cb){const _0x198524=_0x2390ad;console[_0x198524(0x3e8)]('\x0a'+_0x172227(_0x26d36b[_0x198524(0x554)],_0x198524(0x551))+'\x20\x20'+_0x172227(_0x26d36b[_0x198524(0x403)],_0x198524(0x4de))+_0x198524(0x4c5)+_0x172227(_0x26d36b['cyan'],_0x198524(0x5c8))+_0x198524(0x368)+_0x172227(_0x26d36b[_0x198524(0x488)],_0x198524(0x5c8))+'\x20'+_0x172227(_0x26d36b[_0x198524(0x593)],'<json-body>')+_0x198524(0x3aa)+_0x172227(_0x26d36b[_0x198524(0x488)],_0x198524(0x566))+'\x20'+_0x172227(_0x26d36b[_0x198524(0x488)],_0x198524(0x5c8))+'\x20'+_0x172227(_0x26d36b[_0x198524(0x593)],_0x198524(0x335))+_0x198524(0x4bf)+_0x172227(_0x26d36b[_0x198524(0x403)],_0x198524(0x31a))+'\x0a\x20\x20\x20\x20'+_0x172227(_0x26d36b['gray'],'info')+_0x198524(0x308)+_0x172227(_0x26d36b['gray'],_0x198524(0x2cf))+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/envs\x0a\x20\x20\x20\x20'+_0x172227(_0x26d36b[_0x198524(0x5d9)],_0x198524(0x523))+_0x198524(0x675)+_0x3de6cb[_0x198524(0x5c4)]+'/types\x0a\x20\x20\x20\x20'+_0x172227(_0x26d36b[_0x198524(0x5d9)],_0x198524(0x31e))+_0x198524(0x20b)+_0x3de6cb['env']+'/type/users\x0a\x20\x20\x20\x20'+_0x172227(_0x26d36b[_0x198524(0x5d9)],_0x198524(0x186))+_0x198524(0x3d1)+_0x3de6cb[_0x198524(0x5c4)]+_0x198524(0x619)+_0x172227(_0x26d36b[_0x198524(0x5d9)],_0x198524(0x23c))+_0x198524(0x48d)+_0x3de6cb[_0x198524(0x5c4)]+'/type/users/query\x0a\x20\x20\x20\x20'+_0x172227(_0x26d36b['gray'],'PUT\x20type/users/item/x\x20{\x22n\x22:1}')+'\x0a\x20\x20\x20\x20'+_0x172227(_0x26d36b['gray'],_0x198524(0x4c6))+_0x198524(0x3ab)+_0x172227(_0x26d36b[_0x198524(0x5d9)],_0x198524(0x235))+_0x198524(0x664)+_0x172227(_0x26d36b['bold'],'\x20\x20Flags')+'\x20\x20'+_0x172227(_0x26d36b[_0x198524(0x403)],'(on\x20any\x20path\x20command)')+_0x198524(0x4c5)+_0x172227(_0x26d36b[_0x198524(0x488)],_0x198524(0x2f3))+_0x198524(0x53f)+_0x172227(_0x26d36b[_0x198524(0x488)],_0x198524(0x383))+_0x198524(0x1ff)+_0x172227(_0x26d36b[_0x198524(0x403)],'Examples')+_0x198524(0x3ab)+_0x172227(_0x26d36b[_0x198524(0x5d9)],'types\x20--env\x20staging')+'\x0a\x20\x20\x20\x20'+_0x172227(_0x26d36b[_0x198524(0x5d9)],'type/users/item/alice\x20--env\x20staging')+_0x198524(0x3ab)+_0x172227(_0x26d36b[_0x198524(0x5d9)],_0x198524(0x14e))+'\x0a\x0a'+_0x172227(_0x26d36b[_0x198524(0x554)],_0x198524(0x2bb))+'\x0a\x0a\x20\x20'+_0x172227(_0x26d36b[_0x198524(0x488)],_0x198524(0x1bd))+_0x198524(0x4dc)+_0x172227(_0x26d36b[_0x198524(0x488)],_0x198524(0x5c4))+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20show\x20active\x20environment\x20+\x20list\x20all\x20envs\x0a\x20\x20'+_0x172227(_0x26d36b['cyan'],_0x198524(0x1f4))+'\x20'+_0x172227(_0x26d36b['dim'],'[filter]')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20browse\x20API\x20routes,\x20grouped\x20by\x20area\x0a\x20\x20'+_0x172227(_0x26d36b[_0x198524(0x488)],'logs')+'\x20'+_0x172227(_0x26d36b['dim'],_0x198524(0x23a))+_0x198524(0x547)+_0x172227(_0x26d36b['cyan'],'open')+_0x198524(0x6a3)+_0x172227(_0x26d36b[_0x198524(0x488)],_0x198524(0x4a2))+_0x198524(0x22f)+_0x172227(_0x26d36b[_0x198524(0x488)],_0x198524(0x4ba))+'\x20'+_0x172227(_0x26d36b['dim'],'/\x20quit\x20/\x20Ctrl+C')+_0x198524(0x130));}let _0x59a835=![];async function _0x14d70e(_0xd1e7a1,_0x158443=0x0,_0x1bf0f8=null){const _0x22c1d4=_0x2390ad;_0x59a835&&(process['stderr']['write'](_0x172227(_0x26d36b['red'],_0x22c1d4(0x6bd))),process['exit'](0x82));_0x59a835=!![],process[_0x22c1d4(0x54a)][_0x22c1d4(0x1d5)]('\x0a'),process[_0x22c1d4(0x63c)][_0x22c1d4(0x1d5)](_0x172227(_0x26d36b[_0x22c1d4(0x593)],_0x22c1d4(0x3f7)+(_0x1bf0f8?_0x22c1d4(0x4ca)+_0x1bf0f8+',\x20':'')+'shutting\x20down…\x0a'));const _0x418c75=setTimeout(()=>{const _0x1e0773=_0x22c1d4;process['stderr'][_0x1e0773(0x1d5)](_0x172227(_0x26d36b[_0x1e0773(0x3ba)],_0x1e0773(0x386))),process[_0x1e0773(0x4ba)](0x1);},0x1388);try{await _0xd1e7a1[_0x22c1d4(0x5f3)]();}catch(_0x2ab93b){console[_0x22c1d4(0x5bb)](_0x172227(_0x26d36b['red'],'\x20\x20'+_0x2ab93b[_0x22c1d4(0x69b)]));}clearTimeout(_0x418c75),process[_0x22c1d4(0x63c)][_0x22c1d4(0x1d5)](_0x172227(_0x26d36b[_0x22c1d4(0x403)],_0x22c1d4(0x2ad))),process[_0x22c1d4(0x4ba)](_0x158443);}function _0x47e129(_0x134405){const _0x440fab=_0x2390ad,_0x30e1f9=_0x134405[_0x440fab(0x5c4)]!==_0x440fab(0x429)?_0x172227(_0x26d36b['yellow'],'['+_0x134405[_0x440fab(0x5c4)]+']'):'';return _0x172227(_0x26d36b[_0x440fab(0x554)]+_0x26d36b[_0x440fab(0x488)],_0x440fab(0x2db))+_0x30e1f9+_0x172227(_0x26d36b['gray'],'>\x20');}const _0x1e93b4=new Set([_0x2390ad(0x325),_0x2390ad(0x1aa),'PUT',_0x2390ad(0x163),_0x2390ad(0x1c7)]);async function _0x5e1699(_0x570537,_0x507a48,_0x323920,_0x2a9206,_0xc97676,_0x25bd59){const _0x425f81=_0x2390ad;_0x570537=_0x570537[_0x425f81(0x2c3)]();if(!_0x570537||_0x570537['startsWith']('#'))return;const _0x2c00af=_0x54d9cc(_0x570537),{flags:_0x47ba96,rest:_0x476372}=_0x2f7c2b(_0x2c00af);if(!_0x476372[_0x425f81(0x4e2)])return;const _0x240622=_0x476372[0x0],_0x396a39=_0x240622[_0x425f81(0x6ad)]();if(_0x396a39==='HELP'){if(_0x476372[0x1])_0x4eab17(_0x507a48,_0x4fe0d6(_0x476372[0x1],_0x47ba96[_0x425f81(0x5c4)]??_0xc97676[_0x425f81(0x5c4)]));else _0x24e437(_0xc97676);return;}if(_0x396a39===_0x425f81(0x43f)){const _0x23bd3d=_0x476372[0x1];if(!_0x23bd3d){console[_0x425f81(0x3e8)](_0x172227(_0x26d36b[_0x425f81(0x3ba)],_0x425f81(0x515)));return;}try{_0x507a48['env'](_0x23bd3d),_0xc97676[_0x425f81(0x5c4)]=_0x23bd3d,_0x25bd59?.[_0x425f81(0x372)](_0x47e129(_0xc97676)),console[_0x425f81(0x3e8)](_0x425f81(0x482)+_0x172227(_0x26d36b[_0x425f81(0x413)],'✓')+_0x425f81(0x41b)+_0x172227(_0x26d36b['bold']+_0x26d36b['cyan'],_0x23bd3d)+'\x0a');}catch{console[_0x425f81(0x3e8)]('\x0a\x20\x20'+_0x172227(_0x26d36b[_0x425f81(0x3ba)],'✗')+_0x425f81(0x68d)+_0x172227(_0x26d36b['bold'],_0x23bd3d)+_0x425f81(0x375)+_0x172227(_0x26d36b[_0x425f81(0x403)],_0x425f81(0x242)));}return;}if(_0x396a39==='ENV'){const _0x2a5f7a=[..._0x507a48[_0x425f81(0x4fa)][_0x425f81(0x5fb)]()][_0x425f81(0x3d5)](_0x14b428=>!_0x14b428[_0x425f81(0x15f)]('~'));console[_0x425f81(0x3e8)]('');for(const _0x16c149 of _0x2a5f7a){const _0x57a41c=_0x16c149===_0xc97676[_0x425f81(0x5c4)];console[_0x425f81(0x3e8)]('\x20\x20'+(_0x57a41c?_0x172227(_0x26d36b['green'],'●'):_0x172227(_0x26d36b['dim'],'○'))+'\x20\x20'+(_0x57a41c?_0x172227(_0x26d36b[_0x425f81(0x554)]+_0x26d36b[_0x425f81(0x488)],_0x16c149):_0x172227(_0x26d36b[_0x425f81(0x403)],_0x16c149)));}console['log'](_0x425f81(0x482)+_0x172227(_0x26d36b[_0x425f81(0x403)],'active:')+'\x20'+_0x172227(_0x26d36b['cyan'],_0xc97676[_0x425f81(0x5c4)])),console[_0x425f81(0x3e8)]('');return;}if(_0x396a39===_0x425f81(0x421)){const _0x1b1a97=[..._0x507a48[_0x425f81(0x4fa)][_0x425f81(0x37e)]()]['filter'](_0x4cf81d=>!_0x4cf81d['name'][_0x425f81(0x15f)]('~'));console[_0x425f81(0x3e8)]('');const _0x466fd6=Math['max'](..._0x1b1a97['map'](_0x1e0be9=>_0x1e0be9['name']['length']));for(const _0x56abf4 of _0x1b1a97){const _0x35dce7=_0x56abf4[_0x425f81(0x44d)]===_0xc97676[_0x425f81(0x5c4)],_0x1edd0e=_0x35dce7?_0x172227(_0x26d36b[_0x425f81(0x413)],'●'):_0x172227(_0x26d36b['dim'],'○'),_0x43654c=_0x35dce7?_0x172227(_0x26d36b[_0x425f81(0x554)]+_0x26d36b[_0x425f81(0x488)],_0x56abf4[_0x425f81(0x44d)][_0x425f81(0x3be)](_0x466fd6)):_0x172227(_0x26d36b['dim'],_0x56abf4['name'][_0x425f81(0x3be)](_0x466fd6)),_0x364367=[..._0x56abf4[_0x425f81(0x559)]['keys']()][_0x425f81(0x3d5)](_0x5e037c=>!_0x5e037c[_0x425f81(0x15f)]('~')),_0x589ebb=_0x364367[_0x425f81(0x4e2)]?_0x172227(_0x26d36b[_0x425f81(0x403)],_0x364367[_0x425f81(0x149)](0x0,0x5)[_0x425f81(0x2c7)](',\x20')+(_0x364367[_0x425f81(0x4e2)]>0x5?'\x20\x20+'+(_0x364367[_0x425f81(0x4e2)]-0x5)+_0x425f81(0x45f):'')):_0x172227(_0x26d36b['dim'],_0x425f81(0x62b));console[_0x425f81(0x3e8)]('\x20\x20'+_0x1edd0e+'\x20\x20'+_0x43654c+'\x20\x20'+_0x589ebb);}console[_0x425f81(0x3e8)]('');return;}if(_0x396a39==='TYPES'){const _0x4ec0d2=_0x47ba96['env']??_0x476372[0x1]??_0xc97676[_0x425f81(0x5c4)];try{const _0x1af4e9=_0x507a48[_0x425f81(0x5c4)](_0x4ec0d2),_0x23ff1d=[..._0x1af4e9[_0x425f81(0x559)]['keys']()][_0x425f81(0x3d5)](_0x6e6d24=>!_0x6e6d24[_0x425f81(0x15f)]('~'))[_0x425f81(0x3e1)]();console[_0x425f81(0x3e8)]('\x0a\x20\x20'+_0x172227(_0x26d36b[_0x425f81(0x403)],_0x23ff1d[_0x425f81(0x4e2)]+'\x20type'+(_0x23ff1d[_0x425f81(0x4e2)]!==0x1?'s':'')+'\x20in\x20'+_0x4ec0d2));for(const _0x29298e of _0x23ff1d){const _0x56e47c=_0x1af4e9[_0x425f81(0x559)][_0x425f81(0x165)](_0x29298e),_0x31ef34=_0x56e47c?.[_0x425f81(0x1df)]?.[_0x425f81(0x258)]?.()??0x0,_0x9470a9=_0x172227(_0x26d36b[_0x425f81(0x554)]+_0x26d36b[_0x425f81(0x488)],_0x29298e[_0x425f81(0x3be)](0x1c));console['log']('\x20\x20\x20\x20'+_0x9470a9+'\x20\x20'+_0x172227(_0x26d36b[_0x425f81(0x3ac)],String(_0x31ef34)[_0x425f81(0x354)](0x6))+'\x20'+_0x172227(_0x26d36b[_0x425f81(0x403)],_0x425f81(0x432)));}console[_0x425f81(0x3e8)]('');}catch(_0xa47a75){console[_0x425f81(0x5bb)](_0x172227(_0x26d36b['red'],_0x425f81(0x482)+_0xa47a75['message']+'\x0a'));}return;}if(_0x396a39===_0x425f81(0x1a7)){_0x3b5d5e(_0x507a48,_0x476372[_0x425f81(0x149)](0x1)[_0x425f81(0x2c7)]('\x20'));return;}if(_0x396a39==='LOGS'){const _0x3b799c=(_0x476372[0x1]??'')['toLowerCase']();if(!_0x3b799c||_0x3b799c==='on')_0x2a9206['enabled']=!![],_0x2a9206[_0x425f81(0x62e)]=_0x425f81(0x400),console[_0x425f81(0x3e8)](_0x425f81(0x482)+_0x172227(_0x26d36b[_0x425f81(0x413)],'✓')+_0x425f81(0x36e)+_0x172227(_0x26d36b[_0x425f81(0x403)],_0x425f81(0x293))+'\x0a');else{if(_0x3b799c===_0x425f81(0x307))_0x2a9206[_0x425f81(0x630)]=![],console[_0x425f81(0x3e8)]('\x0a\x20\x20'+_0x172227(_0x26d36b[_0x425f81(0x593)],'○')+'\x20logs\x20off\x0a');else _0x425245[_0x3b799c]!==undefined?(_0x2a9206[_0x425f81(0x630)]=!![],_0x2a9206[_0x425f81(0x62e)]=_0x3b799c,console[_0x425f81(0x3e8)](_0x425f81(0x482)+_0x172227(_0x26d36b[_0x425f81(0x413)],'✓')+_0x425f81(0x4e1)+_0x172227(_0x26d36b[_0x425f81(0x554)],_0x3b799c)+'\x0a')):console[_0x425f81(0x5bb)](_0x172227(_0x26d36b['red'],'\x20\x20Usage:\x20logs\x20[on|off|debug|info|warn|error]'));}return;}if(_0x396a39===_0x425f81(0x313)||_0x396a39===_0x425f81(0x4e3)){await _0x14d70e(_0x507a48,0x0);return;}if(_0x396a39==='OPEN'){const _0x52bcba=_0x425f81(0x147)+_0x323920['port']+_0x425f81(0x44b),_0x297e6e=process[_0x425f81(0x677)]==='win32'?_0x425f81(0x1b2)+_0x52bcba:process[_0x425f81(0x677)]==='darwin'?'open\x20'+_0x52bcba:_0x425f81(0x1a8)+_0x52bcba;require$$4['exec'](_0x297e6e),console['log'](_0x425f81(0x482)+_0x172227(_0x26d36b[_0x425f81(0x413)],'✓')+'\x20opening\x20'+_0x172227(_0x26d36b[_0x425f81(0x488)],_0x52bcba)+'\x0a');return;}let _0x797c3c,_0x1f9177,_0x4c6178;if(_0x1e93b4[_0x425f81(0x34a)](_0x396a39)){_0x797c3c=_0x396a39,_0x1f9177=_0x476372[0x1],_0x4c6178=_0x476372[_0x425f81(0x149)](0x2);if(!_0x1f9177){console[_0x425f81(0x5bb)](_0x172227(_0x26d36b[_0x425f81(0x3ba)],_0x425f81(0x1f3)+_0x240622+_0x425f81(0x683)));return;}}else _0x797c3c=null,_0x1f9177=_0x476372[0x0],_0x4c6178=_0x476372[_0x425f81(0x149)](0x1);const _0x30dd5d=_0x47ba96[_0x425f81(0x5c4)]??_0xc97676[_0x425f81(0x5c4)],_0x5da0db=_0x4fe0d6(_0x1f9177,_0x30dd5d);if(_0x47ba96[_0x425f81(0x4a2)]){_0x4eab17(_0x507a48,_0x5da0db);return;}let _0x3c1d66=null;if(_0x4c6178[_0x425f81(0x4e2)]){const _0x55c950=_0x4c6178[_0x425f81(0x2c7)]('\x20');try{_0x3c1d66=_0x44ca7e(_0x55c950);}catch(_0x5017f3){console[_0x425f81(0x5bb)](_0x172227(_0x26d36b[_0x425f81(0x3ba)],_0x425f81(0x4aa)+_0x55c950+_0x425f81(0x482)+_0x172227(_0x26d36b['dim'],_0x5017f3[_0x425f81(0x69b)])+'\x0a'));return;}}if(!_0x797c3c)_0x797c3c=_0x3c1d66!==null?'POST':_0x425f81(0x325);try{const _0x297bc9=await _0x146a74(_0x507a48,_0x797c3c,_0x5da0db,_0x3c1d66);_0x21588d(_0x297bc9['status'],_0x297bc9['body']);}catch(_0x108cf2){console[_0x425f81(0x5bb)](_0x425f81(0x482)+_0x172227(_0x26d36b[_0x425f81(0x3ba)],'✗')+'\x20'+_0x108cf2['message']+'\x0a');}}class _0x1a0a57{constructor(){const _0x3c3e65=_0x2390ad;this['children']=new Map(),this[_0x3c3e65(0x141)]=null,this[_0x3c3e65(0x435)]=![];}}function _0x127721(_0x56d7c5){const _0x26d2e3=_0x2390ad,_0x589846=new _0x1a0a57();for(const _0xa17f85 of _0x56d7c5){if(_0xa17f85[_0x26d2e3(0x423)]?.[_0x26d2e3(0x621)])continue;const _0x5bb35f=_0xa17f85[_0x26d2e3(0x4d4)][_0x26d2e3(0x32d)](/^\/api/,'')[_0x26d2e3(0x32d)](/^\[\/env\/:env=[^\]]*\]/,'')[_0x26d2e3(0x32d)](/^\//,'');if(!_0x5bb35f)continue;let _0x5b9da5=_0x589846;for(const _0xd5b868 of _0x5bb35f[_0x26d2e3(0x428)]('/')[_0x26d2e3(0x3d5)](Boolean)){if(_0xd5b868[_0x26d2e3(0x15f)](':')){const _0x4bcf24=_0xd5b868['slice'](0x1);if(!_0x5b9da5['dynamic'])_0x5b9da5[_0x26d2e3(0x141)]={'param':_0x4bcf24,'node':new _0x1a0a57()};_0x5b9da5=_0x5b9da5[_0x26d2e3(0x141)]['node'];}else{if(!_0x5b9da5[_0x26d2e3(0x15e)]['has'](_0xd5b868))_0x5b9da5[_0x26d2e3(0x15e)][_0x26d2e3(0x244)](_0xd5b868,new _0x1a0a57());_0x5b9da5=_0x5b9da5[_0x26d2e3(0x15e)][_0x26d2e3(0x165)](_0xd5b868);}}_0x5b9da5[_0x26d2e3(0x435)]=!![];}return _0x589846;}const _0x35435f=new Map();function _0x27d8c1(_0x5729d9,_0x550aa2,_0x2d799d){const _0x5e4a51=_0x2390ad,_0x2310a1=_0x35435f[_0x5e4a51(0x165)](_0x5729d9);if(_0x2310a1&&_0x2310a1[_0x5e4a51(0x279)]>Date[_0x5e4a51(0x263)]())return _0x2310a1[_0x5e4a51(0x183)];const _0x1a9e32=_0x2d799d();return _0x35435f[_0x5e4a51(0x244)](_0x5729d9,{'val':_0x1a9e32,'exp':Date[_0x5e4a51(0x263)]()+_0x550aa2}),_0x1a9e32;}function _0x418507(_0x217937,_0x446a07,_0x437b03,_0xc21d82){const _0x4a14ad=_0x2390ad,_0x214c64=_0x446a07[_0x4a14ad(0x5c4)]??_0xc21d82[_0x4a14ad(0x5c4)];switch(_0x217937){case _0x4a14ad(0x5c4):return[..._0x437b03[_0x4a14ad(0x4fa)][_0x4a14ad(0x5fb)]()][_0x4a14ad(0x3d5)](_0x52dd83=>!_0x52dd83[_0x4a14ad(0x15f)]('~'));case'type':return _0x27d8c1('types:'+_0x214c64,0x7d0,()=>{const _0x4ea47e=_0x4a14ad;try{return[..._0x437b03[_0x4ea47e(0x5c4)](_0x214c64)[_0x4ea47e(0x559)][_0x4ea47e(0x5fb)]()]['filter'](_0x263477=>!_0x263477[_0x4ea47e(0x15f)]('~'));}catch{return[];}});case _0x4a14ad(0x2dc):if(!_0x446a07['type'])return[];return _0x27d8c1(_0x4a14ad(0x55d)+_0x214c64+':'+_0x446a07[_0x4a14ad(0x1f7)],0x5dc,()=>{const _0x2a258d=_0x4a14ad;try{const _0xd16af8=_0x437b03[_0x2a258d(0x5c4)](_0x214c64)[_0x2a258d(0x559)]['get'](_0x446a07[_0x2a258d(0x1f7)]);if(!_0xd16af8?.[_0x2a258d(0x1df)])return[];const _0x524a39=[];for(const {key:_0x35c179}of _0xd16af8[_0x2a258d(0x1df)][_0x2a258d(0x47b)]({'limit':0x32})){_0x524a39[_0x2a258d(0x3fd)](String(_0x35c179));if(_0x524a39[_0x2a258d(0x4e2)]>=0x32)break;}return _0x524a39;}catch{return[];}});case _0x4a14ad(0x4c4):if(!_0x446a07['type'])return[];return _0x27d8c1(_0x4a14ad(0x3a1)+_0x214c64+':'+_0x446a07[_0x4a14ad(0x1f7)],0x7d0,()=>{const _0x29e973=_0x4a14ad;try{const _0x562c3c=_0x437b03[_0x29e973(0x5c4)](_0x214c64)[_0x29e973(0x559)]['get'](_0x446a07[_0x29e973(0x1f7)]);return _0x562c3c?[..._0x562c3c[_0x29e973(0x64d)]?.[_0x29e973(0x5fb)]()??[]]:[];}catch{return[];}});case _0x4a14ad(0x395):if(!_0x446a07[_0x4a14ad(0x1f7)])return[];return _0x27d8c1(_0x4a14ad(0x14c)+_0x214c64+':'+_0x446a07[_0x4a14ad(0x1f7)],0x7d0,()=>{const _0x29d6f9=_0x4a14ad;try{return _0x437b03[_0x29d6f9(0x4d6)]?.[_0x29d6f9(0x2c8)]?.(_0x446a07[_0x29d6f9(0x1f7)],_0x437b03[_0x29d6f9(0x5c4)](_0x214c64))?.[_0x29d6f9(0x145)](_0x289107=>_0x289107[_0x29d6f9(0x44d)])??[];}catch{return[];}});default:return[];}}function _0x5cf414(_0x4a705f,_0xa9b53,_0x1c08f2,_0x3708e2){const _0x566884=_0x2390ad,_0x4199a8=_0x4a705f[_0x566884(0x40e)]('/'),_0x1157c3=_0x4a705f[_0x566884(0x428)]('/'),_0x34fbaf=_0x4199a8?_0x1157c3['slice'](0x0,-0x1):_0x1157c3[_0x566884(0x149)](0x0,-0x1),_0x2fe2c4=_0x4199a8?'':_0x1157c3[_0x1157c3['length']-0x1];let _0x313f2f=_0xa9b53;const _0x1012c3={};for(const _0xdf95da of _0x34fbaf){if(!_0xdf95da)continue;if(_0x313f2f[_0x566884(0x15e)][_0x566884(0x34a)](_0xdf95da))_0x313f2f=_0x313f2f['children'][_0x566884(0x165)](_0xdf95da);else{if(_0x313f2f[_0x566884(0x141)])_0x1012c3[_0x313f2f[_0x566884(0x141)]['param']]=_0xdf95da,_0x313f2f=_0x313f2f['dynamic'][_0x566884(0x4b8)];else return[];}}const _0x440f17=_0x34fbaf[_0x566884(0x3d5)](Boolean),_0x54afc9=_0x440f17[_0x566884(0x4e2)]?_0x440f17[_0x566884(0x2c7)]('/')+'/':'',_0x5146ab=[];for(const [_0x2284e4]of _0x313f2f[_0x566884(0x15e)]){if(_0x2284e4['startsWith'](_0x2fe2c4))_0x5146ab[_0x566884(0x3fd)](_0x54afc9+_0x2284e4);}if(_0x313f2f['dynamic'])for(const _0x49d461 of _0x418507(_0x313f2f['dynamic']['param'],_0x1012c3,_0x1c08f2,_0x3708e2)){if(String(_0x49d461)[_0x566884(0x15f)](_0x2fe2c4))_0x5146ab[_0x566884(0x3fd)](_0x54afc9+_0x49d461);}return _0x5146ab[_0x566884(0x149)](0x0,0x64);}const _0x23019c=[_0x2390ad(0x4a2),_0x2390ad(0x440),_0x2390ad(0x5c4),_0x2390ad(0x2cf),_0x2390ad(0x523),'routes',_0x2390ad(0x443),_0x2390ad(0x5a7),'exit',_0x2390ad(0x273)];function _0x2288e3(_0x495881,_0x382f9d,_0x46d9b2){return function _0x9b5fc0(_0x69bb5b){const _0x1a8347=_0x1da2;try{const _0x1b9126=_0x69bb5b[_0x1a8347(0x315)](/\s[{[]/),_0x25280e=_0x1b9126>=0x0?_0x69bb5b[_0x1a8347(0x149)](0x0,_0x1b9126):_0x69bb5b,_0x316ad5=_0x25280e[_0x1a8347(0x278)]();if(!_0x316ad5){const _0x3b7c87=[..._0x23019c,...[..._0x495881['children'][_0x1a8347(0x5fb)]()]]['slice'](0x0,0x64);return[_0x3b7c87,''];}const _0x3c3c62=_0x316ad5[_0x1a8347(0x428)](/\s+/),_0x432be0=_0x3c3c62[0x0],_0x1bb198=_0x432be0['toUpperCase']();if(_0x3c3c62[_0x1a8347(0x4e2)]===0x1){const _0x1241c7=_0x432be0['toLowerCase'](),_0x1ea53e=_0x23019c[_0x1a8347(0x3d5)](_0x9b4568=>_0x9b4568[_0x1a8347(0x15f)](_0x1241c7)),_0x397853=_0x5cf414(_0x432be0,_0x495881,_0x382f9d,_0x46d9b2),_0x3e0f6f=[...new Set([..._0x1ea53e,..._0x397853])][_0x1a8347(0x149)](0x0,0x64);return[_0x3e0f6f,_0x432be0];}if(_0x1e93b4[_0x1a8347(0x34a)](_0x1bb198)&&_0x3c3c62[_0x1a8347(0x4e2)]===0x2){const _0x3985ef=_0x3c3c62[0x1],_0x7c2530=_0x5cf414(_0x3985ef,_0x495881,_0x382f9d,_0x46d9b2);return[_0x7c2530['map'](_0x4755f9=>_0x432be0+'\x20'+_0x4755f9),_0x432be0+'\x20'+_0x3985ef];}if(!_0x1e93b4[_0x1a8347(0x34a)](_0x1bb198)&&_0x3c3c62[_0x1a8347(0x4e2)]>0x1){const _0x5a964d=_0x5cf414(_0x432be0,_0x495881,_0x382f9d,_0x46d9b2),_0x2d7aac='\x20'+_0x3c3c62[_0x1a8347(0x149)](0x1)[_0x1a8347(0x2c7)]('\x20');return[_0x5a964d[_0x1a8347(0x145)](_0x18ffcd=>_0x18ffcd+_0x2d7aac),_0x432be0+_0x2d7aac];}return[[],_0x69bb5b];}catch{return[[],_0x69bb5b];}};}async function _0x5ef63f(_0x4f1be9,_0x2b4d2b){const _0x4ff789=_0x2390ad,_0x53b716={'enabled':!![],'level':_0x2b4d2b[_0x4ff789(0x3f2)]??_0x4ff789(0x400)},_0x4a983f={'env':_0x4ff789(0x429)},_0x2fee6a={'current':null},_0x1f4799=_0x127721(_0x4f1be9[_0x4ff789(0x48f)]['listRoutes']()),_0x105698=_0x2288e3(_0x1f4799,_0x4f1be9,_0x4a983f);_0x4f1be9[_0x4ff789(0x3e8)][_0x4ff789(0x565)](_0x3bee0e=>{const _0x33595d=_0x4ff789;if(!_0x53b716[_0x33595d(0x630)])return;_0x674415(_0x3bee0e,_0x53b716[_0x33595d(0x62e)]),_0x2fee6a[_0x33595d(0x473)]?.['prompt'](!![]);}),_0x57851b(_0x4f1be9,_0x2b4d2b);const _0x1dc710=_0x4b71e9[_0x4ff789(0x6be)]({'input':process[_0x4ff789(0x5ce)],'output':process[_0x4ff789(0x54a)],'terminal':!![],'completer':_0x105698,'prompt':_0x47e129(_0x4a983f),'historySize':_0xc99daf});try{const _0xdedc79=_0x3dcfb2[_0x4ff789(0x690)](_0x3cb6e0,'utf8')[_0x4ff789(0x428)]('\x0a')[_0x4ff789(0x3d5)](Boolean);_0x1dc710['history']=_0xdedc79[_0x4ff789(0x491)]()['slice'](0x0,_0xc99daf);}catch{}_0x2fee6a['current']=_0x1dc710,_0x1dc710['on']('line',async _0x15cf9b=>{const _0x570024=_0x4ff789;_0x1dc710[_0x570024(0x4a5)]();try{await _0x5e1699(_0x15cf9b,_0x4f1be9,_0x2b4d2b,_0x53b716,_0x4a983f,_0x1dc710);}catch(_0x29a2e8){console[_0x570024(0x5bb)](_0x172227(_0x26d36b[_0x570024(0x3ba)],_0x570024(0x61e)+_0x29a2e8['message']));}finally{_0x1dc710['resume'](),_0x1dc710[_0x570024(0x28c)]();}}),_0x1dc710['on'](_0x4ff789(0x5f3),()=>{const _0x447983=_0x4ff789;try{const _0x275452=[..._0x1dc710['history']][_0x447983(0x491)]()[_0x447983(0x3d5)](Boolean)[_0x447983(0x149)](0x0,_0xc99daf);_0x3dcfb2[_0x447983(0x406)](_0x3cb6e0,_0x275452[_0x447983(0x2c7)]('\x0a')+'\x0a');}catch{}_0x14d70e(_0x4f1be9,0x0);});let _0x442aed=0x0;return process['on']('SIGINT',()=>{const _0x3cdde4=_0x4ff789;if(_0x59a835)return _0x14d70e(_0x4f1be9,0x82,_0x3cdde4(0x44c));if(_0x1dc710[_0x3cdde4(0x610)]==='')return _0x14d70e(_0x4f1be9,0x0,_0x3cdde4(0x44c));const _0x271475=Date[_0x3cdde4(0x263)]();if(_0x271475-_0x442aed<0x5dc)return _0x14d70e(_0x4f1be9,0x0,'SIGINT\x20(double-tap)');_0x442aed=_0x271475,process[_0x3cdde4(0x54a)][_0x3cdde4(0x1d5)]('\x0a'),_0x1dc710[_0x3cdde4(0x5a2)](0x0),_0x1dc710[_0x3cdde4(0x28c)](),process[_0x3cdde4(0x63c)][_0x3cdde4(0x1d5)](_0x172227(_0x26d36b[_0x3cdde4(0x403)],'\x20\x20(press\x20Ctrl+C\x20again\x20to\x20exit)\x0a'));}),process['on'](_0x4ff789(0x65f),()=>_0x14d70e(_0x4f1be9,0x0,_0x4ff789(0x65f))),process['on'](_0x4ff789(0x28e),()=>_0x14d70e(_0x4f1be9,0x0,'SIGBREAK')),_0x1dc710[_0x4ff789(0x28c)](),_0x1dc710;}return okdbShell={'start':_0x5ef63f,'colorLog':_0x674415,'lenientParse':_0x44ca7e,'_splitLine':_0x54d9cc,'_formatRouteHelpLines':_0x52c801,'_routeSummary':_0x19a341,'_routeTags':_0x329b16},okdbShell;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x48dd47=_0x264626;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x3bd6c1,performance:_0x5007cb}=require$$0$3,_0x1c98ec=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG===_0x48dd47(0x296),_0x4cf0c2=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x264691=process.env.OKDB_LOOP_LAG_ALL==='1',_0xf1ec46=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x478df0{constructor(){const _0x314566=_0x48dd47;this[_0x314566(0x630)]=_0x1c98ec,this[_0x314566(0x155)]=new Map(),this['_h']=null,this[_0x314566(0x49e)]=null,this[_0x314566(0x36d)]=![],this[_0x314566(0x617)]=(_0x575b8a,_0x3cfcce)=>process[_0x314566(0x63c)][_0x314566(0x1d5)](_0x575b8a+(_0x3cfcce?'\x20'+JSON[_0x314566(0x6ae)](_0x3cfcce):'')+'\x0a');}[_0x48dd47(0x263)](){const _0x32e440=_0x48dd47;return _0x5007cb[_0x32e440(0x263)]();}[_0x48dd47(0x1bb)](_0x3c53b3){const _0x13be9a=_0x48dd47;if(typeof _0x3c53b3===_0x13be9a(0x318))this['_log']=_0x3c53b3;}[_0x48dd47(0x168)](_0x269adb,_0x5cddde,_0x405a4f){const _0x3ed2b0=_0x48dd47;if(!this['enabled'])return;let _0x3ab216=this[_0x3ed2b0(0x155)][_0x3ed2b0(0x165)](_0x269adb);!_0x3ab216&&(_0x3ab216={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x3ed2b0(0x155)][_0x3ed2b0(0x244)](_0x269adb,_0x3ab216)),_0x3ab216['ms']+=_0x5cddde,_0x3ab216[_0x3ed2b0(0x5be)]+=0x1,_0x5cddde>_0x3ab216[_0x3ed2b0(0x1d7)]&&(_0x3ab216[_0x3ed2b0(0x1d7)]=_0x5cddde,_0x3ab216[_0x3ed2b0(0x541)]=_0x405a4f||'');}[_0x48dd47(0x650)](_0x32a733){const _0x55ce36=_0x48dd47;if(!this[_0x55ce36(0x630)]||this[_0x55ce36(0x36d)])return;this['_started']=!![];if(_0x32a733)this[_0x55ce36(0x617)]=_0x32a733;this['_h']=_0x3bd6c1({'resolution':0xa}),this['_h']['enable'](),this['_timer']=setInterval(()=>this['_report'](),_0x4cf0c2);if(this[_0x55ce36(0x49e)][_0x55ce36(0x434)])this['_timer'][_0x55ce36(0x434)]();}['onWindow'](_0xb42095){const _0x16bc75=_0x48dd47;if(!this[_0x16bc75(0x153)])this[_0x16bc75(0x153)]=new Set();this[_0x16bc75(0x153)][_0x16bc75(0x5de)](_0xb42095);if(!this[_0x16bc75(0x36d)])this[_0x16bc75(0x49a)]();}[_0x48dd47(0x3a2)](_0x5f33c4){const _0xa5837d=_0x48dd47;this[_0xa5837d(0x153)]?.[_0xa5837d(0x522)](_0x5f33c4);}[_0x48dd47(0x49a)](){const _0x59877e=_0x48dd47;if(this[_0x59877e(0x3e2)])return;this[_0x59877e(0x3e2)]=!![];!this['_h']&&(this['_h']=_0x3bd6c1({'resolution':0xa}),this['_h']['enable']());const _0x3f2270=_0x4cf0c2;this[_0x59877e(0x452)]=setInterval(()=>{const _0x2bf271=_0x59877e,_0x12b8a6=this['_h'];if(!_0x12b8a6)return;const _0x252d0b=_0x12b8a6[_0x2bf271(0x59d)](0x63)/0xf4240,_0x17ebc1=_0x12b8a6['max']/0xf4240,_0x5cb871=_0x12b8a6[_0x2bf271(0x27f)]/0xf4240;_0x12b8a6[_0x2bf271(0x596)]();if(this[_0x2bf271(0x153)])for(const _0x25cdb8 of this[_0x2bf271(0x153)]){try{_0x25cdb8({'p99Ms':_0x252d0b,'maxMs':_0x17ebc1,'meanMs':_0x5cb871,'reportMs':_0x3f2270});}catch{}}},_0x3f2270);if(this['_admissionTimer']['unref'])this[_0x59877e(0x452)][_0x59877e(0x434)]();}['_report'](){const _0x43ce47=_0x48dd47,_0x48d43d=this['_h'],_0x477b4c=_0x48d43d[_0x43ce47(0x2d6)]/0xf4240,_0x5f431c=_0x48d43d[_0x43ce47(0x59d)](0x63)/0xf4240,_0x505a58=_0x48d43d[_0x43ce47(0x27f)]/0xf4240;_0x48d43d[_0x43ce47(0x596)]();const _0x2c4eac=[...this[_0x43ce47(0x155)][_0x43ce47(0x65b)]()][_0x43ce47(0x145)](([_0x263800,_0x5a85f3])=>({'label':_0x263800,..._0x5a85f3}))[_0x43ce47(0x3e1)]((_0x5420cd,_0x95cd08)=>_0x95cd08['ms']-_0x5420cd['ms'])['slice'](0x0,0x8);this['_buckets']['clear']();const _0x21858c=_0x2c4eac[_0x43ce47(0x3eb)]((_0x5686d1,_0x8ca8cf)=>_0x5686d1+_0x8ca8cf['ms'],0x0),_0x320adf=_0x2c4eac[_0x43ce47(0x145)](_0x503c54=>_0x503c54[_0x43ce47(0x28a)]+'='+_0x503c54['ms']['toFixed'](0x0)+_0x43ce47(0x3da)+_0x503c54[_0x43ce47(0x5be)]+(_0x503c54['maxMs']>0x5?_0x43ce47(0x454)+_0x503c54[_0x43ce47(0x1d7)][_0x43ce47(0x367)](0x0)+'ms'+(_0x503c54[_0x43ce47(0x541)]?'\x20'+_0x503c54['maxExtra']:'')+')':''));(_0x264691||_0x477b4c>=_0xf1ec46)&&this[_0x43ce47(0x617)](_0x43ce47(0x3d9)+_0x4cf0c2+_0x43ce47(0x3b6)+_0x477b4c[_0x43ce47(0x367)](0x0)+_0x43ce47(0x23e)+_0x5f431c[_0x43ce47(0x367)](0x0)+'ms\x20mean='+_0x505a58[_0x43ce47(0x367)](0x0)+'ms\x20busy='+_0x21858c['toFixed'](0x0)+'ms'+(_0x320adf['length']?'\x20│\x20'+_0x320adf[_0x43ce47(0x2c7)]('\x20\x20'):''),{'feature':_0x43ce47(0x2af)});if(this[_0x43ce47(0x153)])for(const _0x4a0a04 of this[_0x43ce47(0x153)]){try{_0x4a0a04({'p99Ms':_0x5f431c,'maxMs':_0x477b4c,'meanMs':_0x505a58,'reportMs':_0x4cf0c2});}catch{}}}[_0x48dd47(0x158)](){const _0x542c6a=_0x48dd47;if(this[_0x542c6a(0x49e)])clearInterval(this['_timer']);if(this['_h'])this['_h'][_0x542c6a(0x254)]();this[_0x542c6a(0x49e)]=null,this['_h']=null,this['_started']=![];}}const _0x163370=new _0x478df0();if(_0x163370[_0x48dd47(0x630)])_0x163370['start']();return okdbLoopMonitor={'LOOP':_0x163370},okdbLoopMonitor;}var okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x40d67b=_0x264626;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x365bcb=require$$0,_0xf64ca7=require$$1$2,_0x1db1d5=require$$2,{LOOP:_0x3ca510}=requireOkdbLoopMonitor(),_0x36bcc0='~processes',_0x47d7dd=_0x40d67b(0x4b8),_0x596aa0=_0x40d67b(0x693),_0x29f3cb=_0x40d67b(0x1ec),_0x4a7e60=(_0x2b00a3,_0x1d92dc)=>_0x2b00a3+':'+_0x1d92dc,_0x4d7c6e=(_0x560ef5,_0xcf73c3)=>_0x560ef5+'::'+_0xcf73c3,_0x200f4c=(_0x28f294,_0x4501c7)=>_0x28f294+'/'+_0x4501c7,_0x3023b7=(_0x1501f4,_0x489e44)=>_0x1501f4+'#'+_0x489e44,_0x5de25b=_0x5721dc=>{const _0x35f78c=_0x40d67b;if(_0x5721dc?.[_0x35f78c(0x4e6)])return _0x5721dc[_0x35f78c(0x4e6)];const _0x4d4837=_0x5721dc?.[_0x35f78c(0x1c5)];return typeof _0x4d4837===_0x35f78c(0x3c1)&&_0x4d4837[_0x35f78c(0x3b7)]('#')?_0x4d4837[_0x35f78c(0x149)](0x0,_0x4d4837['indexOf']('#')):_0x4d4837;},_0x3f0b0a=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x1692a4=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x5b8622=_0x3f0b0a*0x3,_0x120da6=[_0x40d67b(0x480),_0x40d67b(0x245),'processor:retry',_0x40d67b(0x2fb)];let _0x2d44ab=null;function _0xb4fa96(){const _0x13fb6a=_0x40d67b;if(_0x2d44ab==null)_0x2d44ab=Math['round']((Date[_0x13fb6a(0x263)]()-process[_0x13fb6a(0x20c)]()*0x3e8)/0x3e8)*0x3e8;return _0x2d44ab;}function _0xaef81b(_0x4019c5){const _0x3d3a82=_0x40d67b;if(process.env.OKDB_PROCESS_KILL===_0x3d3a82(0x307))return![];if(_0x4019c5?.['options']?.[_0x3d3a82(0x57c)]&&typeof _0x4019c5['options'][_0x3d3a82(0x57c)]===_0x3d3a82(0x652)&&_0x4019c5[_0x3d3a82(0x57d)][_0x3d3a82(0x57c)][_0x3d3a82(0x19c)]===![])return![];return!![];}function _0x36855c(_0x4c971f,_0x567503){const _0x2a8b91=_0x40d67b,_0x5b9b79=!!_0x567503?.[_0x2a8b91(0x58c)];switch(_0x4c971f){case _0x2a8b91(0x340):return{'controllable':_0x5b9b79,'decommissionable':![],'killable':!![],'killConfirm':'cluster-wide'};case'cli':case _0x2a8b91(0x38a):return{'controllable':_0x5b9b79,'decommissionable':![],'killable':!![],'killConfirm':_0x2a8b91(0x579)};case _0x2a8b91(0x157):return{'controllable':![],'decommissionable':![],'killable':![]};case _0x2a8b91(0x1fd):case _0x2a8b91(0x550):case _0x2a8b91(0x25a):case'worker':return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':_0x2a8b91(0x453)};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0xb4ce5b{constructor(_0x36b45e){const _0x2e0d73=_0x40d67b;this[_0x2e0d73(0x2db)]=_0x36b45e,this[_0x2e0d73(0x678)]=null,this[_0x2e0d73(0x39d)]=null,this[_0x2e0d73(0x2b4)]=null,this['_isWriter']=![],this[_0x2e0d73(0x66f)]=![],this[_0x2e0d73(0x5ad)]=_0xb4fa96(),this[_0x2e0d73(0x61c)]=_0x4a7e60(process[_0x2e0d73(0x262)],this[_0x2e0d73(0x5ad)]),this['_instanceId']=_0x1db1d5[_0x2e0d73(0x21b)]()[_0x2e0d73(0x149)](0x0,0x8),this[_0x2e0d73(0x495)]=_0x3023b7(this[_0x2e0d73(0x61c)],this[_0x2e0d73(0x628)]),this['_startedAt']=Date[_0x2e0d73(0x263)](),this['_kind']=null,this[_0x2e0d73(0x50e)]=null,this['_listenAddr']=null,this['_hbTimer']=null,this['_onProcEvent']=null,this['_onTick']=null,this[_0x2e0d73(0x467)]=0x0,this[_0x2e0d73(0x622)]={},this[_0x2e0d73(0x2d2)]=new Map(),this[_0x2e0d73(0x154)]=process[_0x2e0d73(0x46d)](),this['_lastCpuAt']=Date[_0x2e0d73(0x263)](),this[_0x2e0d73(0x349)]=0x0,this[_0x2e0d73(0x64e)]=new Map();}get[_0x40d67b(0x177)](){const _0x34aeb9=_0x40d67b;return this[_0x34aeb9(0x61c)];}get[_0x40d67b(0x4b7)](){const _0x1e2c8b=_0x40d67b;return this[_0x1e2c8b(0x495)];}[_0x40d67b(0x249)](_0x53f296,_0x3ebd78){const _0x42018a=_0x40d67b,_0x3c2b48=_0x36855c(_0x53f296,_0x3ebd78);if(_0x3c2b48[_0x42018a(0x5b5)]&&!_0xaef81b(this[_0x42018a(0x2db)]))return{..._0x3c2b48,'killable':![],'killConfirm':undefined};return _0x3c2b48;}[_0x40d67b(0x326)](){return!!this['_statusEnv'];}[_0x40d67b(0x5fd)](_0x2ea3cf){const _0x5c040a=_0x40d67b;Object[_0x5c040a(0x4b9)](this['_ownMeta'],_0x2ea3cf||{});}['noteListenAddr'](_0x57ec0b){const _0x5121d9=_0x40d67b;if(_0x57ec0b)this[_0x5121d9(0x173)]=_0x57ec0b;}[_0x40d67b(0x6a5)](_0x68ea66={}){const _0x27c968=_0x40d67b;return this[_0x27c968(0x2db)][_0x27c968(0x69f)](_0x68ea66);}[_0x40d67b(0x30f)](){const _0xd9d40=_0x40d67b;let _0x4698fe=null;const _0x402084={};for(const _0x26446e of this['listNodes']()){const _0x30fcfa=_0x26446e[_0xd9d40(0x5ef)];if(!_0x30fcfa)continue;if(_0x4698fe==null)_0x4698fe=_0x30fcfa[_0xd9d40(0x6d7)];for(const _0x5b688d of _0x30fcfa[_0xd9d40(0x255)]||[]){if(![_0xd9d40(0x472),_0xd9d40(0x536),_0xd9d40(0x470),_0xd9d40(0x505)][_0xd9d40(0x3b7)](_0x5b688d[_0xd9d40(0x6c7)]))continue;const _0x544846=_0x5b688d[_0xd9d40(0x5c4)]||_0xd9d40(0x429);(_0x402084[_0x544846]||=[])[_0xd9d40(0x3fd)]({'type':_0x5b688d['type'],'mode':_0x5b688d[_0xd9d40(0x6c7)],'state':_0x5b688d[_0xd9d40(0x264)],'lastClock':_0x5b688d['lastClock'],'headClock':_0x5b688d[_0xd9d40(0x5a6)],'lag':_0x5b688d[_0xd9d40(0x411)]});}}return{'envs':_0x402084,'policy':_0x4698fe,'source':_0xd9d40(0x6b7)};}[_0x40d67b(0x510)](){const _0x3ab019=_0x40d67b,_0x4c2188=_0x548bf0=>{const _0x935203=_0x1da2;if(_0x548bf0[_0x935203(0x264)]===_0x935203(0x251)||_0x548bf0[_0x935203(0x264)]===_0x935203(0x401)||_0x548bf0[_0x935203(0x264)]===_0x935203(0x5bb))return 0x3;if(_0x548bf0[_0x935203(0x6c3)])return 0x1;return 0x2;},_0x9f98f7=new Map();for(const _0x416a8e of this['listNodes']()){for(const _0xa17d83 of _0x416a8e['processing']?.[_0x3ab019(0x255)]||[]){const _0x2ce89e={..._0xa17d83,'owner':{'pid':_0x416a8e['pid']??null,'kind':_0x416a8e[_0x3ab019(0x3f0)]??null,'host':_0x416a8e[_0x3ab019(0x227)]??null}},_0x27482f=_0xa17d83[_0x3ab019(0x6c7)]==='single'?'1ofN:'+(_0xa17d83[_0x3ab019(0x5c4)]??'')+'::'+(_0xa17d83[_0x3ab019(0x189)]??_0xa17d83[_0x3ab019(0x1f7)]??_0xa17d83['id']):_0x3ab019(0x218)+(_0x416a8e[_0x3ab019(0x1c5)]??_0x416a8e[_0x3ab019(0x4e6)]??'')+'::'+(_0xa17d83['env']??'')+'::'+_0xa17d83['id'],_0x4b185b=_0x9f98f7[_0x3ab019(0x165)](_0x27482f);if(!_0x4b185b||_0x4c2188(_0x2ce89e)>_0x4c2188(_0x4b185b))_0x9f98f7[_0x3ab019(0x244)](_0x27482f,_0x2ce89e);}}return[..._0x9f98f7[_0x3ab019(0x37e)]()];}[_0x40d67b(0x6b6)](){const _0x546399=_0x40d67b,_0x44d603=Date[_0x546399(0x263)](),_0x518618=this[_0x546399(0x30b)](),_0x162959=_0xbeb1e3=>Math[_0x546399(0x2d6)](0x0,Math[_0x546399(0x1db)]((_0x44d603-(_0xbeb1e3[_0x546399(0x187)]||_0x44d603))/0x3e8)),_0x2f2604=_0x518618[_0x546399(0x323)](_0x2a0f3f=>_0x2a0f3f[_0x546399(0x3f0)]==='primary'),_0x5ebe35=_0x518618[_0x546399(0x3d5)](_0x22dc08=>_0x22dc08['kind']===_0x546399(0x1fd));if(_0x2f2604||_0x5ebe35[_0x546399(0x4e2)])return{'primary':_0x2f2604?{'pid':_0x2f2604[_0x546399(0x262)],'uptime':_0x162959(_0x2f2604)}:null,'workers':_0x5ebe35['map'](_0x4fff88=>({'pid':_0x4fff88[_0x546399(0x262)],'uptime':_0x162959(_0x4fff88)})),'workersConfigured':_0x2f2604?.[_0x546399(0x423)]?.['workersConfigured']??_0x5ebe35[_0x546399(0x4e2)],'mode':_0x546399(0x281)};const _0x309622=_0x518618[_0x546399(0x323)](_0x19d785=>_0x19d785[_0x546399(0x3f0)]===_0x546399(0x283)||_0x19d785[_0x546399(0x3f0)]===_0x546399(0x38a)||_0x19d785['kind']==='embedded'),_0x2ed071=_0x309622?{'pid':_0x309622[_0x546399(0x262)],'uptime':_0x162959(_0x309622)}:{'pid':process[_0x546399(0x262)],'uptime':Math[_0x546399(0x2d6)](0x0,Math[_0x546399(0x1db)](process[_0x546399(0x20c)]()))};return{'primary':_0x2ed071,'workers':[_0x2ed071],'workersConfigured':0x1,'mode':_0x546399(0x472)};}[_0x40d67b(0x6c0)](){return this['_groupByProcess']();}[_0x40d67b(0x6d0)](){const _0x4439ec=_0x40d67b,_0xafff6f=new Map();for(const _0x31620b of this[_0x4439ec(0x49c)]())_0xafff6f[_0x4439ec(0x244)](_0x31620b['processKey'],{..._0x31620b,'children':[]});const _0x45e55c=[];for(const _0x47656c of _0xafff6f['values']()){const _0x98e167=_0x47656c[_0x4439ec(0x404)]?_0xafff6f[_0x4439ec(0x165)](_0x47656c[_0x4439ec(0x404)]):null;if(_0x98e167&&_0x98e167!==_0x47656c)_0x98e167['children'][_0x4439ec(0x3fd)](_0x47656c);else _0x45e55c[_0x4439ec(0x3fd)](_0x47656c);}const _0xa553ed=(_0x116cbb,_0x408ed7)=>_0x116cbb[_0x4439ec(0x3f0)]===_0x408ed7[_0x4439ec(0x3f0)]?(_0x116cbb[_0x4439ec(0x262)]||0x0)-(_0x408ed7[_0x4439ec(0x262)]||0x0):(_0x116cbb[_0x4439ec(0x3f0)]??'')<(_0x408ed7[_0x4439ec(0x3f0)]??'')?-0x1:0x1,_0x47c73e=_0x147ee5=>{const _0x3ceb15=_0x4439ec;_0x147ee5['sort'](_0xa553ed);for(const _0x42b014 of _0x147ee5)if(_0x42b014['children'][_0x3ceb15(0x4e2)])_0x47c73e(_0x42b014[_0x3ceb15(0x15e)]);};return _0x47c73e(_0x45e55c),_0x45e55c;}[_0x40d67b(0x332)](_0x68255c){const _0x55de6c=_0x40d67b;return this[_0x55de6c(0x49c)]()[_0x55de6c(0x323)](_0x579b65=>_0x579b65[_0x55de6c(0x4e6)]===_0x68255c)??null;}[_0x40d67b(0x49c)](_0x4b1a30=Date[_0x40d67b(0x263)]()){const _0xa1c8b9=_0x40d67b,_0x15f4ef=new Map();for(const _0x17ffaa of this[_0xa1c8b9(0x30b)]()){const _0x2166ee=_0x5de25b(_0x17ffaa);let _0x5ba0e2=_0x15f4ef['get'](_0x2166ee);!_0x5ba0e2&&(_0x5ba0e2={'processKey':_0x2166ee,'nodeKey':_0x2166ee,'pid':_0x17ffaa[_0xa1c8b9(0x262)],'ppid':_0x17ffaa[_0xa1c8b9(0x537)]??null,'host':_0x17ffaa[_0xa1c8b9(0x227)]??null,'kind':_0x17ffaa[_0xa1c8b9(0x3f0)],'role':null,'supervisorKey':_0x17ffaa['supervisorKey']??null,'slot':_0x17ffaa[_0xa1c8b9(0x437)]??null,'slotKey':_0x17ffaa['slotKey']??null,'caps':_0x17ffaa[_0xa1c8b9(0x666)]??null,'lifecycle':_0x17ffaa[_0xa1c8b9(0x1b0)]??null,'uptime':Math[_0xa1c8b9(0x2d6)](0x0,Math[_0xa1c8b9(0x1db)]((_0x4b1a30-(_0x17ffaa[_0xa1c8b9(0x187)]||_0x4b1a30))/0x3e8)),'startedAt':_0x17ffaa[_0xa1c8b9(0x187)]??null,'meta':_0x17ffaa[_0xa1c8b9(0x423)]??null,'listenAddr':null,'processing':null,'stats':null,'instances':[]},_0x15f4ef[_0xa1c8b9(0x244)](_0x2166ee,_0x5ba0e2));_0x5ba0e2[_0xa1c8b9(0x176)][_0xa1c8b9(0x3fd)]({'instanceId':_0x17ffaa[_0xa1c8b9(0x23d)]??null,'role':_0x17ffaa[_0xa1c8b9(0x4ef)]??null,'listenAddr':_0x17ffaa['listenAddr']??null,'lifecycle':_0x17ffaa[_0xa1c8b9(0x1b0)]??null,'processing':_0x17ffaa[_0xa1c8b9(0x5ef)]??null});if(!_0x5ba0e2[_0xa1c8b9(0x4ef)]&&_0x17ffaa[_0xa1c8b9(0x4ef)])_0x5ba0e2[_0xa1c8b9(0x4ef)]=_0x17ffaa[_0xa1c8b9(0x4ef)];if(!_0x5ba0e2[_0xa1c8b9(0x63f)]&&_0x17ffaa[_0xa1c8b9(0x63f)])_0x5ba0e2[_0xa1c8b9(0x63f)]=_0x17ffaa[_0xa1c8b9(0x63f)];if(!_0x5ba0e2[_0xa1c8b9(0x5ef)]&&_0x17ffaa[_0xa1c8b9(0x5ef)])_0x5ba0e2[_0xa1c8b9(0x5ef)]=_0x17ffaa['processing'];if(_0x5ba0e2[_0xa1c8b9(0x666)]==null&&_0x17ffaa['caps'])_0x5ba0e2['caps']=_0x17ffaa[_0xa1c8b9(0x666)];if(_0x17ffaa[_0xa1c8b9(0x1e0)]&&(!_0x5ba0e2['stats']||(_0x17ffaa[_0xa1c8b9(0x1e0)]['at']??0x0)>(_0x5ba0e2['stats']['at']??0x0)))_0x5ba0e2['stats']=_0x17ffaa['stats'];}return[..._0x15f4ef[_0xa1c8b9(0x37e)]()];}[_0x40d67b(0x414)](){const _0x8b1140=_0x40d67b,_0x23edf1=[],_0x58fd65={'rss':0x0,'heapUsed':0x0,'processes':0x0};for(const _0x18ad68 of this[_0x8b1140(0x49c)]()){_0x23edf1['push']({'processKey':_0x18ad68['processKey'],'kind':_0x18ad68[_0x8b1140(0x3f0)],'pid':_0x18ad68[_0x8b1140(0x262)],'supervisorKey':_0x18ad68[_0x8b1140(0x404)],'meta':_0x18ad68[_0x8b1140(0x423)]??null,'uptime':_0x18ad68[_0x8b1140(0x20c)],'stats':_0x18ad68['stats']??null}),_0x58fd65[_0x8b1140(0x57c)]++,_0x18ad68['stats']&&(_0x58fd65['rss']+=_0x18ad68[_0x8b1140(0x1e0)][_0x8b1140(0x558)]||0x0,_0x58fd65['heapUsed']+=(_0x18ad68[_0x8b1140(0x1e0)][_0x8b1140(0x2a7)]||0x0)+(_0x18ad68[_0x8b1140(0x1e0)][_0x8b1140(0x3fb)]?.[_0x8b1140(0x2a7)]||0x0));}return{'totals':_0x58fd65,'nodes':_0x23edf1};}async[_0x40d67b(0x5a7)]({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x5f4791=_0x40d67b;this[_0x5f4791(0x533)]=this['_isWriter']||!!writer,this[_0x5f4791(0x66f)]=this['_isReader']||!!reader,this[_0x5f4791(0x35a)]=kind||this[_0x5f4791(0x35a)]||(_0xf64ca7[_0x5f4791(0x1d1)]?_0x5f4791(0x1fd):_0x5f4791(0x283)),this[_0x5f4791(0x50e)]=supervisorKey??this[_0x5f4791(0x50e)],this[_0x5f4791(0x173)]=listenAddr??this[_0x5f4791(0x173)],this[_0x5f4791(0x5f6)]();if(!writer&&!reader)return null;if(!this['_statusEnv']){const _0x3827e7=await this[_0x5f4791(0x2db)][_0x5f4791(0x15a)](_0x36bcc0,{'sync':![],'durability':_0x5f4791(0x3d7)});if(!_0x3827e7['hasType'](_0x47d7dd))await _0x3827e7[_0x5f4791(0x497)](_0x47d7dd);this[_0x5f4791(0x678)]=_0x3827e7;}return this[_0x5f4791(0x678)];}['_nodeDb'](){const _0x5f4406=_0x40d67b;return this[_0x5f4406(0x203)]!==this[_0x5f4406(0x678)]&&(this[_0x5f4406(0x203)]=this['_statusEnv'],this[_0x5f4406(0x450)]=this[_0x5f4406(0x678)][_0x5f4406(0x5bc)](_0x47d7dd)[_0x5f4406(0x1df)]),this['_nodeDbCache'];}[_0x40d67b(0x6c6)](_0x243f27){const _0x386b3f=_0x40d67b,_0x3761d9=this[_0x386b3f(0x22a)]()['put'](_0x243f27[_0x386b3f(0x1c5)],_0x243f27,0x1);if(_0x3761d9&&typeof _0x3761d9[_0x386b3f(0x41e)]==='function')_0x3761d9[_0x386b3f(0x41e)](undefined,()=>{});return _0x3761d9;}[_0x40d67b(0x623)](_0x2f666d){const _0x452761=_0x40d67b,_0x43aae5=this['_nodeDb']()[_0x452761(0x280)](_0x2f666d);if(_0x43aae5&&typeof _0x43aae5[_0x452761(0x41e)]===_0x452761(0x318))_0x43aae5[_0x452761(0x41e)](undefined,()=>{});return _0x43aae5;}async['putNode'](_0x14259e){const _0x5638ce=_0x40d67b;if(!this[_0x5638ce(0x678)]||!this[_0x5638ce(0x533)]||!_0x14259e?.['nodeKey'])return;return this[_0x5638ce(0x6c6)](_0x14259e);}async[_0x40d67b(0x21c)](_0xfcbea3){const _0x46d86e=_0x40d67b;if(!this[_0x46d86e(0x678)]||!this[_0x46d86e(0x533)]||!_0xfcbea3)return;const _0x3a061d=_0xfcbea3[_0x46d86e(0x3b7)]('#'),_0x105e20=[];for(const {key:_0x139251}of this[_0x46d86e(0x678)][_0x46d86e(0x47b)](_0x47d7dd)){if(_0x139251===_0xfcbea3||!_0x3a061d&&typeof _0x139251==='string'&&_0x139251[_0x46d86e(0x15f)](_0xfcbea3+'#'))_0x105e20[_0x46d86e(0x3fd)](_0x139251);}return Promise[_0x46d86e(0x33b)](_0x105e20[_0x46d86e(0x145)](_0x488eef=>this['_removeRowAsync'](_0x488eef)));}['_nodeDead'](_0x1278d0){const _0x152a32=_0x40d67b;if(typeof _0x1278d0?.[_0x152a32(0x262)]!==_0x152a32(0x44a))return![];if(_0x1278d0[_0x152a32(0x227)]!==_0x365bcb[_0x152a32(0x5a1)]())return![];if(_0x1278d0[_0x152a32(0x262)]===process[_0x152a32(0x262)])return![];try{return process[_0x152a32(0x19c)](_0x1278d0['pid'],0x0),![];}catch(_0x34ba3f){return _0x34ba3f[_0x152a32(0x2f9)]==='ESRCH';}}['listNodes'](){const _0x4093eb=_0x40d67b;if(!this['_statusEnv'])return[];const _0x4d70c4=Date[_0x4093eb(0x263)](),_0x58234a=[];for(const {value:_0x3a69ff}of this['_statusEnv'][_0x4093eb(0x47b)](_0x47d7dd)){if(_0x3a69ff&&(_0x3a69ff[_0x4093eb(0x653)]==null||_0x3a69ff[_0x4093eb(0x653)]>=_0x4d70c4)&&!this[_0x4093eb(0x61a)](_0x3a69ff))_0x58234a[_0x4093eb(0x3fd)](_0x3a69ff);}return _0x58234a;}['reap'](_0x1374f2=0x0){const _0x1bc693=_0x40d67b;if(!this['_statusEnv']||!this[_0x1bc693(0x533)])return;const _0x3dd2e2=Date[_0x1bc693(0x263)]()-_0x1374f2,_0x4ba5d9=new Set(),_0x78a0b=[];for(const {key:_0x4277d5,value:_0xa38d5}of this[_0x1bc693(0x678)]['getRange'](_0x47d7dd)){if(_0xa38d5&&(_0xa38d5[_0x1bc693(0x653)]!=null&&_0xa38d5[_0x1bc693(0x653)]<_0x3dd2e2||this[_0x1bc693(0x61a)](_0xa38d5)))_0x78a0b[_0x1bc693(0x3fd)](_0x4277d5);else _0x4ba5d9[_0x1bc693(0x5de)](_0x5de25b(_0xa38d5)??_0x4277d5);}for(const _0x339d38 of _0x78a0b)this[_0x1bc693(0x623)](_0x339d38);if(this[_0x1bc693(0x5f6)]())for(const {key:_0x5bba5f}of this[_0x1bc693(0x25c)](_0x1bc693(0x4b8))){if(!_0x4ba5d9['has'](_0x5bba5f))this[_0x1bc693(0x39d)][_0x1bc693(0x2ef)]('node/'+_0x5bba5f);}}[_0x40d67b(0x647)](_0x44a035=null){const _0x2fcacc=_0x40d67b;if(this[_0x2fcacc(0x573)]||!this[_0x2fcacc(0x533)]||!this[_0x2fcacc(0x678)])return;this[_0x2fcacc(0x41f)]=_0x44a035,this[_0x2fcacc(0x56b)]=()=>this[_0x2fcacc(0x535)]();for(const _0x2f9962 of _0x120da6)this['okdb']['events']['on'](_0x2f9962,this[_0x2fcacc(0x56b)]);this[_0x2fcacc(0x243)]();const _0x5d35ac=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x3f0b0a;this[_0x2fcacc(0x573)]=setInterval(()=>{const _0x37e971=_0x2fcacc;if(this[_0x37e971(0x41f)])try{this[_0x37e971(0x41f)]();}catch{}this[_0x37e971(0x243)](),this['reap']();},_0x5d35ac);if(this['_hbTimer'][_0x2fcacc(0x434)])this[_0x2fcacc(0x573)][_0x2fcacc(0x434)]();}[_0x40d67b(0x535)](){const _0x766cdc=_0x40d67b;if(!this[_0x766cdc(0x533)]||!this[_0x766cdc(0x678)])return;if(Date[_0x766cdc(0x263)]()-this['_lastPublishAt']<_0x1692a4)return;this[_0x766cdc(0x243)]();}[_0x40d67b(0x243)](){const _0x36a32e=_0x40d67b;if(!this[_0x36a32e(0x533)]||!this['_statusEnv'])return;this[_0x36a32e(0x467)]=Date[_0x36a32e(0x263)]();try{const _0x2f6da4=[this[_0x36a32e(0x1ca)]()];for(const _0x1a25e5 of this[_0x36a32e(0x2d2)][_0x36a32e(0x37e)]())_0x2f6da4[_0x36a32e(0x3fd)](this[_0x36a32e(0x306)](_0x1a25e5));const _0x1e49d6=_0x3ca510['enabled']?_0x3ca510['now']():0x0,_0x5e0038=Promise['all'](_0x2f6da4[_0x36a32e(0x145)](_0x51a35d=>this[_0x36a32e(0x6c6)](_0x51a35d)))[_0x36a32e(0x606)](()=>{});if(_0x3ca510['enabled'])_0x3ca510[_0x36a32e(0x168)](_0x36a32e(0x451),_0x3ca510[_0x36a32e(0x263)]()-_0x1e49d6,_0x36a32e(0x4f6)+_0x2f6da4[_0x36a32e(0x4e2)]);return _0x5e0038;}catch{}}async[_0x40d67b(0x356)](){const _0x2967cf=_0x40d67b;if(this[_0x2967cf(0x56b)]){for(const _0x51cbf6 of _0x120da6){try{this[_0x2967cf(0x2db)]['events'][_0x2967cf(0x307)](_0x51cbf6,this[_0x2967cf(0x56b)]);}catch{}}this[_0x2967cf(0x56b)]=null;}this[_0x2967cf(0x573)]&&(clearInterval(this[_0x2967cf(0x573)]),this['_hbTimer']=null);try{if(this['_statusEnv']&&this[_0x2967cf(0x533)])await this[_0x2967cf(0x21c)](this[_0x2967cf(0x495)]);}catch{}}async[_0x40d67b(0x582)](){const _0x806b26=_0x40d67b;if(!this[_0x806b26(0x678)]||!this['_isWriter'])return;try{await this[_0x806b26(0x21c)](this[_0x806b26(0x495)]);}catch{}try{const _0x3780aa=[];for(const {value:_0x53f84e}of this[_0x806b26(0x678)][_0x806b26(0x47b)](_0x47d7dd)){if(_0x53f84e?.['ppid']===process[_0x806b26(0x262)]&&_0x53f84e[_0x806b26(0x1c5)])_0x3780aa['push'](_0x53f84e[_0x806b26(0x1c5)]);}for(const _0x194f5f of _0x3780aa){try{await this[_0x806b26(0x21c)](_0x194f5f);}catch{}}}catch{}}async['publishOwnRow'](){const _0x3d0bc9=_0x40d67b;return this[_0x3d0bc9(0x27d)](this['_buildOwnRow']());}async[_0x40d67b(0x601)](_0x4f8c54){const _0x334176=_0x40d67b;if(!this[_0x334176(0x678)]||!this['_isWriter'])return;return this[_0x334176(0x27d)](this[_0x334176(0x306)](_0x4f8c54));}[_0x40d67b(0x306)]({pid:_0x383e4c,startedAt:_0x219f99,kind:_0x2060a6,supervisorKey:_0x184b7e,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0x40d67b(0x216),meta:meta=null,stats:stats=null}){const _0x289d58=_0x40d67b,_0x30b47e=Date[_0x289d58(0x263)](),_0x22f996=_0x4a7e60(_0x383e4c,_0x219f99);return{'nodeKey':_0x3023b7(_0x22f996,'0'),'processKey':_0x22f996,'instanceId':'0','pid':_0x383e4c,'startedAt':_0x219f99,'ppid':process[_0x289d58(0x262)],'host':_0x365bcb['hostname'](),'supervisorKey':_0x184b7e,'slot':slot,'slotKey':slotKey,'kind':_0x2060a6,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x30b47e,'expiresAt':_0x30b47e+_0x5b8622,'caps':this[_0x289d58(0x249)](_0x2060a6,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0x40d67b(0x5ae)](_0x19846a){const _0x2382f7=_0x40d67b;if(!_0x19846a?.[_0x2382f7(0x262)])return null;const _0x5d3ee8=_0x4a7e60(_0x19846a[_0x2382f7(0x262)],_0x19846a['startedAt']);this[_0x2382f7(0x2d2)][_0x2382f7(0x244)](_0x5d3ee8,{..._0x19846a,'supervisorKey':_0x19846a[_0x2382f7(0x404)]??this['_selfKey']});if(this[_0x2382f7(0x533)])await this['publishChildRow'](this['_children'][_0x2382f7(0x165)](_0x5d3ee8))[_0x2382f7(0x606)]?.(()=>{});return _0x5d3ee8;}[_0x40d67b(0x291)](_0x928a4){const _0x10d851=_0x40d67b;if(!_0x928a4)return;return this[_0x10d851(0x2d2)][_0x10d851(0x522)](_0x928a4),this['removeNode'](_0x928a4);}[_0x40d67b(0x1a5)](){const _0xa07953=_0x40d67b,_0x3da38e=Date[_0xa07953(0x263)](),_0xd87452=process[_0xa07953(0x46d)](),_0x2ddcef=(_0x3da38e-this[_0xa07953(0x529)])*0x3e8;if(_0x2ddcef>=0x3d090){const _0x22f327=_0xd87452[_0xa07953(0x359)]-this[_0xa07953(0x154)][_0xa07953(0x359)]+(_0xd87452[_0xa07953(0x193)]-this['_lastCpuUsage']['system']),_0x51a9aa=_0x365bcb[_0xa07953(0x316)]()[_0xa07953(0x4e2)]||0x1;this[_0xa07953(0x349)]=Math[_0xa07953(0x660)](0x64,Math[_0xa07953(0x1db)](_0x22f327/(_0x2ddcef*_0x51a9aa)*0x64)),this[_0xa07953(0x63a)]=Math[_0xa07953(0x1db)](_0x2ddcef/0x3e8),this[_0xa07953(0x154)]=_0xd87452,this[_0xa07953(0x529)]=_0x3da38e;}const _0x2f5357=process[_0xa07953(0x350)]();let _0xc9102e=null;if(this[_0xa07953(0x64e)][_0xa07953(0x6d2)]>0x0){let _0x17b286=0x0;for(const _0x21b581 of this['_threadStats']['values']())_0x17b286+=_0x21b581[_0xa07953(0x2a7)]||0x0;_0xc9102e={'count':this[_0xa07953(0x64e)][_0xa07953(0x6d2)],'heapUsed':_0x17b286};}return{'rss':_0x2f5357['rss'],'heapUsed':_0x2f5357['heapUsed'],'heapTotal':_0x2f5357[_0xa07953(0x6bf)],'external':_0x2f5357[_0xa07953(0x3c4)],'cpuPct':this[_0xa07953(0x349)],'cpuWindowMs':this[_0xa07953(0x63a)]??null,'threads':_0xc9102e,'at':_0x3da38e};}[_0x40d67b(0x65a)](_0x15425d,_0x58a69e){const _0x2240a2=_0x40d67b;if(!_0x15425d||!_0x58a69e)return;this['_threadStats'][_0x2240a2(0x244)](_0x15425d,_0x58a69e);}[_0x40d67b(0x353)](_0x5ca5e1){this['_threadStats']['delete'](_0x5ca5e1);}[_0x40d67b(0x3b4)](_0x4c8ea9,_0x3a9cdf,_0x410e2c=undefined){const _0x37eb02=_0x40d67b,_0x4dabd3=this[_0x37eb02(0x2d2)][_0x37eb02(0x165)](_0x4c8ea9);if(!_0x4dabd3||!_0x3a9cdf)return;if(_0x410e2c!==undefined)_0x4dabd3[_0x37eb02(0x5ef)]=_0x410e2c;_0x4dabd3[_0x37eb02(0x1e0)]={'rss':_0x3a9cdf[_0x37eb02(0x558)]??null,'heapUsed':_0x3a9cdf[_0x37eb02(0x2a7)]??null,'heapTotal':_0x3a9cdf[_0x37eb02(0x6bf)]??null,'external':_0x3a9cdf[_0x37eb02(0x3c4)]??null,'cpuPct':_0x3a9cdf[_0x37eb02(0x557)]??null,'cpuWindowMs':_0x3a9cdf['cpuWindowMs']??null,'threads':_0x3a9cdf['threads']??null,'claims':_0x3a9cdf[_0x37eb02(0x2ec)]??null,'envsOpen':_0x3a9cdf[_0x37eb02(0x402)]??null,'at':Date['now']()};}[_0x40d67b(0x1ca)](){const _0x1b95b5=_0x40d67b,_0x48d7fc=Date[_0x1b95b5(0x263)](),_0x33cb1d=this[_0x1b95b5(0x2db)][_0x1b95b5(0x27a)]||{},_0x23b08a=this[_0x1b95b5(0x35a)]||_0x1b95b5(0x283);return{'nodeKey':this[_0x1b95b5(0x495)],'processKey':this[_0x1b95b5(0x61c)],'instanceId':this[_0x1b95b5(0x628)],'pid':process[_0x1b95b5(0x262)],'startedAt':this[_0x1b95b5(0x5ad)],'instanceStartedAt':this[_0x1b95b5(0x2d0)],'ppid':typeof process[_0x1b95b5(0x537)]==='number'?process[_0x1b95b5(0x537)]:null,'host':_0x365bcb['hostname'](),'supervisorKey':this[_0x1b95b5(0x50e)]??null,'kind':_0x23b08a,'role':{'engines':!!_0x33cb1d['engines'],'asyncProcessors':!!_0x33cb1d['asyncProcessors'],'compaction':_0x33cb1d[_0x1b95b5(0x613)],'http':_0x33cb1d[_0x1b95b5(0x48f)]},'listenAddr':this[_0x1b95b5(0x173)]??null,'heartbeatAt':_0x48d7fc,'expiresAt':_0x48d7fc+_0x5b8622,'caps':this[_0x1b95b5(0x249)](_0x23b08a,_0x33cb1d),'lifecycle':{'state':_0x1b95b5(0x216),'desiredVersionApplied':null},'meta':{...this[_0x1b95b5(0x622)]},'processing':_0x33cb1d[_0x1b95b5(0x58c)]?this[_0x1b95b5(0x2ea)]():null,'stats':this[_0x1b95b5(0x1a5)]()};}[_0x40d67b(0x2ea)](){const _0x25c7cb=_0x40d67b,_0xd4cbbe=[];try{for(const [_0x10c8ac,_0xd1605d]of this['okdb']['_envs']){if(_0x10c8ac['startsWith']('~'))continue;for(const _0x166d33 of _0xd1605d[_0x25c7cb(0x481)][_0x25c7cb(0x22c)]())_0xd4cbbe['push']({..._0x166d33,'env':_0x10c8ac});}}catch{}return{'policy':this['okdb']['_processingPolicy']??null,'processors':_0xd4cbbe};}[_0x40d67b(0x5f6)](){const _0x469e7e=_0x40d67b;if(this[_0x469e7e(0x39d)])return!![];const _0x16c221=this[_0x469e7e(0x2db)][_0x469e7e(0x4cb)];if(!_0x16c221)return![];return this['_desired']=_0x16c221[_0x469e7e(0x37c)](_0x596aa0,{'dupSort':![]}),this['_cmd']=_0x16c221['openDB'](_0x29f3cb,{'dupSort':![]}),!![];}[_0x40d67b(0x584)](){const _0x40a366=_0x40d67b;return!!this[_0x40a366(0x39d)];}[_0x40d67b(0x4ea)](_0x50d2b9,_0x19de72){const _0x36b023=_0x40d67b;if(!this[_0x36b023(0x5f6)]())return null;return this[_0x36b023(0x39d)]['get'](_0x50d2b9+'/'+_0x19de72)??null;}[_0x40d67b(0x36f)](_0x3ee61e,_0x20a68d,_0x5a4a1b){const _0x520867=_0x40d67b;if(!this[_0x520867(0x5f6)]())return null;const _0x1a82fc=_0x3ee61e+'/'+_0x20a68d;let _0x38497d;return this[_0x520867(0x39d)][_0x520867(0x6c5)](()=>{const _0x448944=_0x520867,_0x2a6983=this[_0x448944(0x39d)][_0x448944(0x165)](_0x1a82fc)||{'version':0x0};_0x38497d=(_0x2a6983['version']||0x0)+0x1,this[_0x448944(0x39d)][_0x448944(0x26b)](_0x1a82fc,{..._0x2a6983,..._0x5a4a1b,'version':_0x38497d,'updatedAt':Date[_0x448944(0x263)]()});}),_0x38497d;}[_0x40d67b(0x25c)](_0x2e8a72){const _0x49eab7=_0x40d67b;if(!this['_ensureDesired']())return[];const _0x2f1692=_0x2e8a72+'/',_0x5f0821=[];for(const {key:_0xd8af3b,value:_0x44574f}of this[_0x49eab7(0x39d)][_0x49eab7(0x47b)]({'start':_0x2f1692,'end':_0x2f1692+'ÿ'})){if(typeof _0xd8af3b!==_0x49eab7(0x3c1)||!_0xd8af3b[_0x49eab7(0x15f)](_0x2f1692))break;_0x5f0821[_0x49eab7(0x3fd)]({'key':_0xd8af3b[_0x49eab7(0x149)](_0x2f1692[_0x49eab7(0x4e2)]),'value':_0x44574f});}return _0x5f0821;}['getCmd'](_0x5e1317){const _0x273f25=_0x40d67b;if(!this[_0x273f25(0x5f6)]())return null;return this[_0x273f25(0x2b4)][_0x273f25(0x165)](_0x5e1317)??null;}['bumpCmd'](_0xe3025e,_0x294715,_0x5c8c0d={}){const _0x1c54b4=_0x40d67b;if(!this[_0x1c54b4(0x5f6)]())return null;let _0x41ee68;return this[_0x1c54b4(0x2b4)][_0x1c54b4(0x6c5)](()=>{const _0x26c1e1=_0x1c54b4,_0x36bce9=this[_0x26c1e1(0x2b4)]['get'](_0xe3025e)||{'epoch':0x0};_0x41ee68=(_0x36bce9[_0x26c1e1(0x5f9)]||0x0)+0x1,this['_cmd']['put'](_0xe3025e,{..._0x36bce9,..._0x5c8c0d,'cmd':_0x294715,'epoch':_0x41ee68,'updatedAt':Date['now']()});}),_0x41ee68;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0xb4ce5b,'nodeKey':_0x4a7e60,'logicalKey':_0x4d7c6e,'slotKey':_0x200f4c,'PROCESS_ENV':_0x36bcc0,'NODE_TYPE':_0x47d7dd},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x31b07b=_0x264626;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x5e81af=require$$0$4,{EVENTS:_0x4c1240,CHANGE_ACTIONS:_0xadb7f9}=requireOkdbEnums(),{LOOP:_0x2e9606}=requireOkdbLoopMonitor(),_0x2be9b8=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x914e18=0x5,_0x2ad497=0x2710;class _0x3e1c6e extends _0x5e81af{constructor(_0xf47227,_0x53e307={}){const _0x53c896=_0x1da2;super(),this['okdb']=_0xf47227,this[_0x53c896(0x4a1)]=_0x53e307[_0x53c896(0x309)]??_0x2be9b8,this[_0x53c896(0x524)]=_0x53e307[_0x53c896(0x456)]??_0x914e18,this[_0x53c896(0x2c5)]=_0x53e307[_0x53c896(0x5b4)]??_0x2ad497,this[_0x53c896(0x36d)]=![],this[_0x53c896(0x20e)]=new Map(),this[_0x53c896(0x238)]=new Map(),this[_0x53c896(0x30d)]=new Map(),this['_flushTimer']=null,this['_draining']=![],this['_seen']=new Set(),this[_0x53c896(0x43d)]=_0x361c02=>this[_0x53c896(0x361)](_0x361c02),this[_0x53c896(0x18e)]=_0x8f03c2=>this[_0x53c896(0x311)](_0x8f03c2),this['_onStop']=()=>this[_0x53c896(0x158)]();}['start'](){const _0xc37da1=_0x1da2;if(this['_started'])return;this['_started']=!![];for(const [_0x44694c,_0x1bf144]of this[_0xc37da1(0x2db)][_0xc37da1(0x4fa)]){if(_0x44694c[_0xc37da1(0x15f)]('~'))continue;try{this[_0xc37da1(0x238)]['set'](_0x44694c,_0x1bf144[_0xc37da1(0x59f)]()||0x0);}catch{}}const {events:_0x33943c}=this['okdb'];_0x33943c['on'](_0x4c1240['ITEM_CREATE'],this[_0xc37da1(0x43d)]),_0x33943c['on'](_0x4c1240['ITEM_UPDATE'],this[_0xc37da1(0x43d)]),_0x33943c['on'](_0x4c1240['ITEM_REMOVE'],this[_0xc37da1(0x43d)]),_0x33943c['on'](_0x4c1240[_0xc37da1(0x521)],this[_0xc37da1(0x18e)]),_0x33943c[_0xc37da1(0x228)](_0x4c1240[_0xc37da1(0x5b9)],this[_0xc37da1(0x344)]);}[_0x31b07b(0x158)](){const _0x3cfe48=_0x31b07b;if(!this[_0x3cfe48(0x36d)])return;this[_0x3cfe48(0x36d)]=![];const {events:_0x49a3d6}=this[_0x3cfe48(0x2db)];_0x49a3d6[_0x3cfe48(0x307)](_0x4c1240['ITEM_CREATE'],this['_onItem']),_0x49a3d6[_0x3cfe48(0x307)](_0x4c1240[_0x3cfe48(0x5e2)],this[_0x3cfe48(0x43d)]),_0x49a3d6[_0x3cfe48(0x307)](_0x4c1240[_0x3cfe48(0x409)],this[_0x3cfe48(0x43d)]),_0x49a3d6['off'](_0x4c1240[_0x3cfe48(0x521)],this[_0x3cfe48(0x18e)]);try{_0x49a3d6[_0x3cfe48(0x307)](_0x4c1240[_0x3cfe48(0x5b9)],this[_0x3cfe48(0x344)]);}catch{}this[_0x3cfe48(0x496)]&&(clearTimeout(this[_0x3cfe48(0x496)]),this['_flushTimer']=null),this['_pending']['clear'](),this['_cursors'][_0x3cfe48(0x2e9)](),this[_0x3cfe48(0x238)][_0x3cfe48(0x2e9)](),this[_0x3cfe48(0x381)]['clear']();}[_0x31b07b(0x56c)](_0x202fcb,_0x223bfc,_0x2f6a43,_0x5b6a75){return _0x202fcb+'\x00'+_0x223bfc+'\x00'+_0x2f6a43+'\x00'+_0x5b6a75;}[_0x31b07b(0x357)](_0x16bb62,_0x510985,_0x337ffe,_0x21ca9f){const _0x4b2652=_0x31b07b,_0x137719=this[_0x4b2652(0x56c)](_0x16bb62,_0x510985,_0x337ffe,_0x21ca9f);if(this['_seen']['has'](_0x137719))return![];this['_seen'][_0x4b2652(0x5de)](_0x137719);if(this[_0x4b2652(0x381)][_0x4b2652(0x6d2)]>this['_dedupeMax']){const _0x1a78ae=this[_0x4b2652(0x381)][_0x4b2652(0x37e)]()[_0x4b2652(0x1a6)]()[_0x4b2652(0x222)];this[_0x4b2652(0x381)][_0x4b2652(0x522)](_0x1a78ae);}return!![];}[_0x31b07b(0x361)](_0x44c2c8){const _0x14ec59=_0x31b07b;if(!this['_started']||!_0x44c2c8)return;const {env:_0x447068,type:_0x34b019,key:_0xc7b75c,clock:_0x1b138c,origin:_0x3fb230,action:_0x4e151f,newValue:_0x2a525c,oldValue:_0x5e20f9}=_0x44c2c8;if(_0x447068==null||_0x34b019==null||_0xc7b75c==null)return;if(typeof _0x447068===_0x14ec59(0x3c1)&&_0x447068[_0x14ec59(0x15f)]('~'))return;if(typeof _0x34b019==='string'&&_0x34b019[_0x14ec59(0x15f)]('~'))return;if(!this[_0x14ec59(0x357)](_0x447068,_0x34b019,_0xc7b75c,_0x1b138c))return;const _0x28ba06=_0x4e151f===_0xadb7f9[_0x14ec59(0x431)]?_0x14ec59(0x280):_0x14ec59(0x26b);this[_0x14ec59(0x6c9)]('change',{'env':_0x447068,'type':_0x34b019,'key':_0xc7b75c,'op':_0x28ba06,'clock':_0x1b138c,'origin':_0x3fb230,'value':_0x28ba06===_0x14ec59(0x280)?null:_0x2a525c,'prevValue':_0x5e20f9});}['_handlePoke'](_0x35fa31){const _0xb09a7d=_0x31b07b;if(!this['_started'])return;if(!_0x35fa31||typeof _0x35fa31[_0xb09a7d(0x5c4)]!=='string'||typeof _0x35fa31[_0xb09a7d(0x1f7)]!==_0xb09a7d(0x3c1))return;const {env:_0x31420a,type:_0xb28a26}=_0x35fa31;if(_0x31420a['startsWith']('~')||_0xb28a26[_0xb09a7d(0x15f)]('~'))return;this['_pending']['set'](_0x31420a+'\x00'+_0xb28a26,{'env':_0x31420a,'type':_0xb28a26}),this['_scheduleFlush']();}['_scheduleFlush'](){const _0x2a2e9d=_0x31b07b;if(this[_0x2a2e9d(0x496)])return;const _0x4c9a72=()=>{const _0x2bd841=_0x2a2e9d;this['_flushTimer']=null,this[_0x2bd841(0x331)]()[_0x2bd841(0x606)](()=>{});};this[_0x2a2e9d(0x496)]=setTimeout(_0x4c9a72,this[_0x2a2e9d(0x524)]>0x0?this['_flushDebounce']:0x0);}async[_0x31b07b(0x331)](){const _0x480597=_0x31b07b;if(this[_0x480597(0x5c7)]){this[_0x480597(0x1b9)]();return;}this['_draining']=!![];try{const _0x3f8480=[...this[_0x480597(0x30d)][_0x480597(0x37e)]()];this[_0x480597(0x30d)][_0x480597(0x2e9)]();let _0x32d969=![];for(const {env:_0x59d6db,type:_0x592c3d}of _0x3f8480){try{const _0x2ce5c2=await this[_0x480597(0x422)](_0x59d6db,_0x592c3d);if(_0x2ce5c2)_0x32d969=!![];}catch{this[_0x480597(0x30d)][_0x480597(0x244)](_0x59d6db+'\x00'+_0x592c3d,{'env':_0x59d6db,'type':_0x592c3d}),_0x32d969=!![];}}if(_0x32d969||this['_pending'][_0x480597(0x6d2)]>0x0)this[_0x480597(0x1b9)]();}finally{this[_0x480597(0x5c7)]=![];}}async[_0x31b07b(0x422)](_0x61e16,_0x3d9ab5){const _0x282db5=_0x31b07b,_0x2fd81e=await this[_0x282db5(0x2db)][_0x282db5(0x23b)](_0x61e16),_0x2b4263=_0x61e16+'\x00'+_0x3d9ab5;!this[_0x282db5(0x20e)]['has'](_0x2b4263)&&(!this[_0x282db5(0x238)]['has'](_0x61e16)&&this['_baselines'][_0x282db5(0x244)](_0x61e16,_0x2fd81e['getClock']()||0x0),this[_0x282db5(0x20e)][_0x282db5(0x244)](_0x2b4263,this['_baselines'][_0x282db5(0x165)](_0x61e16)));const _0x29037a=this[_0x282db5(0x20e)][_0x282db5(0x165)](_0x2b4263),_0x45cc10=_0x2fd81e['getClock'](_0x3d9ab5)||0x0;if(_0x45cc10<=_0x29037a)return![];const _0xa1a1e4=_0x29037a+this[_0x282db5(0x4a1)],_0x3d29ca=Math['min'](_0x45cc10,_0xa1a1e4),_0x4ff410=_0x2e9606[_0x282db5(0x630)]?_0x2e9606[_0x282db5(0x263)]():0x0,_0x1636a6=Array[_0x282db5(0x4ce)](_0x2fd81e[_0x282db5(0x3a9)](_0x3d9ab5,_0x29037a+0x1,_0x3d29ca));let _0x11217b=_0x29037a;for(const _0x3def85 of _0x1636a6){const {clock:_0x1a5155,key:_0x5678de,action:_0x27544f,origin:_0x2450f4}=_0x3def85;if(_0x1a5155>_0x11217b)_0x11217b=_0x1a5155;if(_0x5678de==null)continue;if(!this[_0x282db5(0x357)](_0x61e16,_0x3d9ab5,_0x5678de,_0x1a5155))continue;let _0x1469c0,_0x23257d;if(_0x27544f===_0xadb7f9[_0x282db5(0x431)])_0x1469c0=_0x282db5(0x280),_0x23257d=null;else{const _0x15da09=_0x2fd81e['get'](_0x3d9ab5,_0x5678de);_0x15da09==null?(_0x1469c0=_0x282db5(0x280),_0x23257d=null):(_0x1469c0=_0x282db5(0x26b),_0x23257d=_0x15da09);}this[_0x282db5(0x6c9)](_0x282db5(0x597),{'env':_0x61e16,'type':_0x3d9ab5,'key':_0x5678de,'op':_0x1469c0,'clock':_0x1a5155,'origin':_0x2450f4,'value':_0x23257d});}if(_0x2e9606[_0x282db5(0x630)])_0x2e9606[_0x282db5(0x168)](_0x282db5(0x36c)+_0x61e16+':'+_0x3d9ab5,_0x2e9606['now']()-_0x4ff410,'n='+_0x1636a6['length']);return this[_0x282db5(0x20e)][_0x282db5(0x244)](_0x2b4263,Math[_0x282db5(0x2d6)](_0x11217b,_0x3d29ca)),_0x2fd81e['getClock'](_0x3d9ab5)>_0x3d29ca;}['status'](){const _0x3855bf=_0x31b07b;return{'started':this[_0x3855bf(0x36d)],'quantum':this[_0x3855bf(0x4a1)],'flushDebounce':this['_flushDebounce'],'cursors':Object[_0x3855bf(0x5df)]([...this[_0x3855bf(0x20e)][_0x3855bf(0x65b)]()][_0x3855bf(0x145)](([_0x3e65a4,_0x27ba50])=>[_0x3e65a4[_0x3855bf(0x32d)]('\x00',':'),_0x27ba50])),'pending':this[_0x3855bf(0x30d)]['size'],'seen':this[_0x3855bf(0x381)][_0x3855bf(0x6d2)]};}}return _0x3e1c6e[_0x31b07b(0x34d)]=_0x2be9b8,okdbChangefeed={'OKDBChangefeed':_0x3e1c6e},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function _0x1da2(_0x3622c5,_0x25de55){_0x3622c5=_0x3622c5-0x12f;const _0x2eddd4=_0x2edd();let _0x1da215=_0x2eddd4[_0x3622c5];return _0x1da215;}function requireOkdbCluster(){const _0x19f36c=_0x264626;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x32c2a6=require$$1$2,_0x4b7da9=require$$1,{EVENTS:_0x16c1f3}=requireOkdbEnums(),_0x429864=require$$0,{slotKey:_0xaeee53}=requireOkdbProcessRegistry(),_0x52e904=0xfa,_0x2996ee=0xfa0,_0x2db9eb=0x5,_0x53595c=0x2710,_0x101548=0xbb8,_0x12bb60=0x7d0,_0xce3264=_0x19f36c(0x133),_0x2421b1='ephemeral',_0x28d4ba=_0x19f36c(0x3e8),_0x2811f6=_0x19f36c(0x1e0),_0xd30889=[_0x16c1f3[_0x19f36c(0x2f2)],_0x16c1f3['FTS_REGISTERED'],_0x16c1f3['FTS_DROP'],_0x16c1f3['FTS_RESET'],_0x16c1f3['INDEX_PROGRESS'],_0x16c1f3[_0x19f36c(0x591)],_0x16c1f3[_0x19f36c(0x1f1)],_0x16c1f3[_0x19f36c(0x374)],'processor:ready',_0x19f36c(0x480),'processor:error',_0x19f36c(0x6a2),'processor:resumed',_0x19f36c(0x40a)],_0x4525d3=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0;function _0x5bf882({workers:_0x3f760e,makeOkdb:_0x1c1ffc,port:_0x1fc1a9,primaryOkdb:_0x3edf6b,childEntry:childEntry=![],workerEnv:workerEnv=null}={}){const _0x5c64f0=_0x19f36c;if(_0x32c2a6[_0x5c64f0(0x498)])return childEntry&&_0x32c2a6[_0x5c64f0(0x3a0)]({'exec':_0x4b7da9[_0x5c64f0(0x2c7)](__dirname,_0x5c64f0(0x27c)),'args':[],'execArgv':((()=>{const _0x374167=_0x5c64f0,_0x2357a6=[];for(let _0x585f0=0x0;_0x585f0<process['execArgv'][_0x374167(0x4e2)];_0x585f0++){const _0x3aa445=process[_0x374167(0x680)][_0x585f0];if(_0x3aa445[_0x374167(0x15f)](_0x374167(0x53c))||_0x3aa445[_0x374167(0x15f)]('--watch')||_0x3aa445['startsWith'](_0x374167(0x180)))continue;if(_0x3aa445==='-e'||_0x3aa445==='--eval'||_0x3aa445==='-p'||_0x3aa445===_0x374167(0x46a)){_0x585f0++;continue;}_0x2357a6['push'](_0x3aa445);}return _0x2357a6;})())}),_0xc0739a({'workers':_0x3f760e,'port':_0x1fc1a9,'primaryOkdb':_0x3edf6b,'workerEnv':workerEnv});return _0x2e42e2({'makeOkdb':_0x1c1ffc,'port':_0x1fc1a9});}function _0xc0739a({workers:_0x5baf36,port:_0x178b6e,primaryOkdb:_0x4b35a1,workerEnv:_0x13e3f9}){const _0x3d4791=_0x19f36c,_0x23de1d=new Map(),_0x2108eb=new Map();let _0x2f719d=![];const _0x350dc8=_0x1147c8=>_0x1147c8?.[_0x3d4791(0x66b)],_0x5826a1=_0xd45251=>{const _0x5c57c2=_0x3d4791,_0x5c8269=_0x32c2a6[_0x5c57c2(0x34f)]({...process.env,..._0x13e3f9||{},'OKDB_CLUSTER_SLOT':String(_0xd45251)});return _0x5c8269[_0x5c57c2(0x66b)]=_0xd45251,_0x23de1d[_0x5c57c2(0x244)](_0x5c8269[_0x5c57c2(0x1a0)]['pid'],{'worker':_0x5c8269,'startedAt':Date[_0x5c57c2(0x263)](),'slot':_0xd45251}),_0x5c8269['on'](_0x5c57c2(0x5bb),_0x3953d4=>{const _0x5294d9=_0x5c57c2;console[_0x5294d9(0x3e8)]('[okdb-cluster]\x20worker\x20pid='+_0x5c8269[_0x5294d9(0x1a0)][_0x5294d9(0x262)]+'\x20ipc\x20error:\x20'+(_0x3953d4?.[_0x5294d9(0x69b)]??_0x3953d4));}),_0x5c8269['on']('online',()=>_0x3cf0f7()),_0x5c8269;},_0x31cac7=_0x4ec69d=>{const _0x21d27f=_0x3d4791;for(const {worker:_0x58df36}of _0x23de1d[_0x21d27f(0x37e)]()){if(_0x58df36[_0x21d27f(0x466)]()||!_0x58df36[_0x21d27f(0x1fc)]())continue;try{_0x58df36[_0x21d27f(0x1ee)](_0x4ec69d);}catch{}}};_0x4b35a1?.['_activateProcesses']?.({'kind':_0x3d4791(0x340),'listenAddr':':'+_0x178b6e})[_0x3d4791(0x606)](()=>{}),_0x4b35a1?.[_0x3d4791(0x57c)]?.['setOwnMeta']?.({'workersConfigured':_0x5baf36});const _0x582cdc={'engines':![],'asyncProcessors':![],'compaction':_0x3d4791(0x288),'http':!![]},_0x3cf0f7=()=>{const _0xb1579b=_0x3d4791,_0xd69117=_0x4b35a1?.[_0xb1579b(0x57c)];if(!_0xd69117||!_0xd69117['_isWriter'])return;const _0xac5656=_0xd69117[_0xb1579b(0x177)];for(const {worker:_0x22aeb3,startedAt:_0x3d71b6,slot:_0x5e87a,stats:_0x40dce2}of _0x23de1d['values']()){if(_0x22aeb3['isDead']())continue;const _0x51c943=_0xd69117['hasDesired']?.()&&_0xd69117[_0xb1579b(0x4ea)]('slot',_0x19def6(_0x5e87a))?.[_0xb1579b(0x5c9)]===!![];_0xd69117[_0xb1579b(0x601)]({'pid':_0x22aeb3['process'][_0xb1579b(0x262)],'startedAt':_0x3d71b6,'kind':_0xb1579b(0x1fd),'supervisorKey':_0xac5656,'slot':_0x5e87a,'slotKey':_0x19def6(_0x5e87a),'role':_0x582cdc,'listenAddr':':'+_0x178b6e,'lifecycle':_0x51c943?'decommissioning':_0xb1579b(0x216),'stats':_0x40dce2??null})['catch'](()=>{});}},_0x19def6=_0x3702e8=>_0xaeee53('cluster:'+_0x178b6e,_0x3702e8),_0x2290a7=_0xb00a8e=>{const _0xe74241=_0x3d4791,_0x21fb7d=_0x4b35a1?.[_0xe74241(0x57c)];if(!_0x21fb7d?.['hasDesired']?.())return![];return _0x21fb7d[_0xe74241(0x4ea)]('slot',_0x19def6(_0xb00a8e))?.['decommission']===!![];};for(let _0x16cffe=0x0;_0x16cffe<_0x5baf36;_0x16cffe++){const _0x3c7107=_0x2290a7(_0x16cffe);_0x2108eb[_0x3d4791(0x244)](_0x16cffe,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x3c7107,'respawnTimer':null}),_0x3c7107?console[_0x3d4791(0x3e8)](_0x3d4791(0x634)+_0x16cffe+_0x3d4791(0x48e)):_0x5826a1(_0x16cffe);}const _0x44c045=()=>{const _0x64dc1f=_0x3d4791,_0x3ca967=_0x4b35a1?.[_0x64dc1f(0x57c)];if(!_0x3ca967?.[_0x64dc1f(0x533)]||!_0x3ca967[_0x64dc1f(0x584)]?.())return;for(const [_0x3af2a2,_0x17bd22]of _0x2108eb[_0x64dc1f(0x65b)]()){const _0x156fc5=_0x3ca967[_0x64dc1f(0x4ea)]('slot',_0x19def6(_0x3af2a2)),_0x51c0ee=_0x156fc5?.['decommission']===!![],_0x2f596c=_0x156fc5?.[_0x64dc1f(0x19c)]===!![];if(_0x51c0ee&&!_0x17bd22[_0x64dc1f(0x6b3)]){_0x17bd22[_0x64dc1f(0x6b3)]=!![];_0x17bd22[_0x64dc1f(0x1e8)]&&(clearTimeout(_0x17bd22['respawnTimer']),_0x17bd22[_0x64dc1f(0x1e8)]=null);for(const {worker:_0x11cc60}of _0x23de1d['values']()){if(_0x350dc8(_0x11cc60)!==_0x3af2a2||_0x11cc60[_0x64dc1f(0x466)]())continue;try{if(_0x2f596c)_0x11cc60['process'][_0x64dc1f(0x19c)]('SIGKILL');else _0x11cc60[_0x64dc1f(0x1fc)]()&&_0x11cc60['disconnect']();}catch{}}console['log']('[okdb-cluster]\x20'+(_0x2f596c?_0x64dc1f(0x58e):_0x64dc1f(0x18b))+_0x64dc1f(0x1c3)+_0x3af2a2+_0x64dc1f(0x182));}else{if(!_0x51c0ee&&_0x17bd22[_0x64dc1f(0x6b3)]&&_0x156fc5){_0x17bd22[_0x64dc1f(0x6b3)]=![],_0x17bd22[_0x64dc1f(0x3a6)]=[],_0x17bd22[_0x64dc1f(0x633)]=0x0;const _0x46ffa1=[..._0x23de1d[_0x64dc1f(0x37e)]()][_0x64dc1f(0x175)](({worker:_0x37356e})=>_0x350dc8(_0x37356e)===_0x3af2a2&&!_0x37356e[_0x64dc1f(0x466)]());!_0x46ffa1&&!_0x2f719d&&(_0x5826a1(_0x3af2a2),console[_0x64dc1f(0x3e8)]('[okdb-cluster]\x20recommissioned\x20worker\x20slot='+_0x3af2a2));}}}},_0x34c143=()=>{try{_0x44c045();}catch{}};_0x4b35a1?.['events']?.['on']?.(_0x16c1f3[_0x3d4791(0x4d8)],_0x34c143);const _0x12095a=[];if(_0x4b35a1?.[_0x3d4791(0x397)]?.['on'])for(const _0x23ebed of _0xd30889){const _0x56afb7=_0x5b49b2=>{_0x31cac7({[_0xce3264]:_0x2421b1,'event':_0x23ebed,'data':_0x5b49b2??{}});};_0x4b35a1[_0x3d4791(0x397)]['on'](_0x23ebed,_0x56afb7),_0x12095a[_0x3d4791(0x3fd)]({'event':_0x23ebed,'handler':_0x56afb7});}const _0x4b5a71=setInterval(()=>{_0x44c045(),_0x3cf0f7();},_0x4525d3);_0x4b5a71[_0x3d4791(0x434)]?.();const _0x4fe1dd=(_0x5e4548,_0x1ce3fd)=>{const _0x27beaa=_0x3d4791;if(!_0x1ce3fd||typeof _0x1ce3fd!=='object'||_0x1ce3fd[_0xce3264]!==_0x28d4ba)return;if(!_0x4b35a1?.[_0x27beaa(0x3e8)]?.[_0x27beaa(0x196)])return;const _0x3322a6=_0x1ce3fd[_0x27beaa(0x351)]||{};_0x4b35a1[_0x27beaa(0x3e8)][_0x27beaa(0x196)]({..._0x3322a6,'msg':'[w'+_0x1ce3fd[_0x27beaa(0x437)]+']\x20'+(_0x3322a6[_0x27beaa(0x268)]??''),'meta':{..._0x3322a6[_0x27beaa(0x423)]||{},'worker':_0x1ce3fd['slot'],'workerPid':_0x1ce3fd[_0x27beaa(0x262)]}});};_0x32c2a6['on']('message',_0x4fe1dd);const _0x47b82e=(_0x3c6d48,_0x532637)=>{const _0x84476b=_0x3d4791;if(!_0x532637||typeof _0x532637!==_0x84476b(0x652)||_0x532637[_0xce3264]!==_0x2811f6)return;const _0x5deff4=_0x23de1d[_0x84476b(0x165)](_0x3c6d48[_0x84476b(0x1a0)][_0x84476b(0x262)]);if(_0x5deff4)_0x5deff4[_0x84476b(0x1e0)]={..._0x532637[_0x84476b(0x1e0)],'at':Date[_0x84476b(0x263)]()};};_0x32c2a6['on'](_0x3d4791(0x69b),_0x47b82e),_0x32c2a6['on'](_0x3d4791(0x4ba),(_0x4b59e4,_0x34894b,_0x438d69)=>{const _0x28615f=_0x3d4791,_0x3934f9=_0x4b59e4[_0x28615f(0x1a0)]['pid'],_0x104c2b=_0x350dc8(_0x4b59e4),_0x58256a=_0x23de1d[_0x28615f(0x165)](_0x3934f9);if(_0x58256a&&_0x4b35a1?.[_0x28615f(0x57c)])_0x4b35a1['processes']['removeNode'](_0x3934f9+':'+_0x58256a[_0x28615f(0x187)])[_0x28615f(0x606)](()=>{});_0x23de1d['delete'](_0x3934f9),console['log']('[okdb-cluster]\x20worker\x20pid='+_0x3934f9+_0x28615f(0x252)+(_0x104c2b??'?')+_0x28615f(0x1d0)+(_0x28615f(0x358)+_0x34894b+_0x28615f(0x1fa)+(_0x438d69??_0x28615f(0x2f6))+_0x28615f(0x504)+_0x23de1d[_0x28615f(0x6d2)]+_0x28615f(0x583))),_0x3cf0f7();if(_0x2f719d||_0x104c2b==null)return;const _0x48bf92=_0x2108eb[_0x28615f(0x165)](_0x104c2b);if(!_0x48bf92||_0x48bf92['dead'])return;const _0x11c048=Date[_0x28615f(0x263)]();_0x48bf92[_0x28615f(0x3a6)][_0x28615f(0x3fd)](_0x11c048),_0x48bf92[_0x28615f(0x3a6)]=_0x48bf92[_0x28615f(0x3a6)][_0x28615f(0x3d5)](_0x2e878f=>_0x11c048-_0x2e878f<=_0x53595c);if(_0x48bf92[_0x28615f(0x3a6)]['length']>=_0x2db9eb){_0x48bf92['dead']=!![],console[_0x28615f(0x5bb)](_0x28615f(0x63b)+_0x104c2b+_0x28615f(0x538)+_0x48bf92[_0x28615f(0x3a6)][_0x28615f(0x4e2)]+_0x28615f(0x3c9)+(_0x53595c+'ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20'+_0x23de1d[_0x28615f(0x6d2)]+_0x28615f(0x501)));return;}_0x48bf92[_0x28615f(0x633)]++;const _0x387633=Math[_0x28615f(0x660)](_0x2996ee,_0x52e904*0x2**(_0x48bf92['consecutiveFailures']-0x1));console[_0x28615f(0x3e8)](_0x28615f(0x562)+_0x104c2b+_0x28615f(0x17e)+_0x387633+_0x28615f(0x1fe)+_0x48bf92[_0x28615f(0x633)]+')'),_0x48bf92['respawnTimer']=setTimeout(()=>{const _0x3b16ff=_0x28615f;_0x48bf92['respawnTimer']=null;if(_0x2f719d||_0x48bf92['dead'])return;const _0x355b82=_0x5826a1(_0x104c2b);_0x355b82['once'](_0x3b16ff(0x687),()=>{const _0x2c3af3=_0x3b16ff;if(_0x2108eb[_0x2c3af3(0x165)](_0x104c2b)===_0x48bf92)_0x48bf92[_0x2c3af3(0x633)]=0x0;});},_0x387633),_0x48bf92[_0x28615f(0x1e8)]['unref']?.();});const _0x1730c4=[..._0x23de1d[_0x3d4791(0x5fb)]()];console[_0x3d4791(0x3e8)]('[okdb-cluster]\x20primary\x20pid='+process[_0x3d4791(0x262)]+'\x20forked\x20'+_0x5baf36+_0x3d4791(0x164)+_0x178b6e+':\x20'+('['+_0x1730c4[_0x3d4791(0x2c7)](',\x20')+']'));const _0x5aa025={'_isClusterController':!![],'port':_0x178b6e,'primaryOkdb':_0x4b35a1??null,'status'(){const _0xc640b6=_0x3d4791;return{'clustered':!![],'primaryPid':process[_0xc640b6(0x262)],'port':_0x178b6e,'primaryRole':_0x4b35a1?.[_0xc640b6(0x4ef)]??null,'processorPid':_0x4b35a1?process[_0xc640b6(0x262)]:null,'workers':[..._0x23de1d['values']()]['map'](({worker:_0x2e4c83})=>({'pid':_0x2e4c83[_0xc640b6(0x1a0)]['pid'],'id':_0x2e4c83['id'],'dead':_0x2e4c83[_0xc640b6(0x466)]()}))};},async 'close'(){const _0x54a649=_0x3d4791;_0x2f719d=!![];for(const _0x1cdfd7 of _0x2108eb[_0x54a649(0x37e)]()){_0x1cdfd7['dead']=!![],_0x1cdfd7['respawnTimer']&&(clearTimeout(_0x1cdfd7[_0x54a649(0x1e8)]),_0x1cdfd7[_0x54a649(0x1e8)]=null);}clearInterval(_0x4b5a71),_0x32c2a6[_0x54a649(0x307)](_0x54a649(0x69b),_0x4fe1dd),_0x32c2a6[_0x54a649(0x307)]('message',_0x47b82e),_0x4b35a1?.['events']?.[_0x54a649(0x307)]?.(_0x16c1f3[_0x54a649(0x4d8)],_0x34c143);if(_0x4b35a1?.[_0x54a649(0x397)]?.[_0x54a649(0x307)])for(const {event:_0x5952e9,handler:_0x2f12c0}of _0x12095a){try{_0x4b35a1['events']['off'](_0x5952e9,_0x2f12c0);}catch{}}_0x12095a[_0x54a649(0x4e2)]=0x0;const _0x4ac919=[..._0x23de1d[_0x54a649(0x37e)]()][_0x54a649(0x145)](({worker:_0x127897})=>_0x127897);if(_0x4ac919[_0x54a649(0x4e2)]===0x0)return;await Promise[_0x54a649(0x33b)](_0x4ac919[_0x54a649(0x145)](_0x5c4149=>new Promise(_0x3ddcc8=>{const _0xe8e1fd=_0x54a649;if(_0x5c4149['isDead']()){_0x3ddcc8();return;}let _0x112e9e=![];const _0x1ad22c=()=>{if(_0x112e9e)return;_0x112e9e=!![];if(_0x36c7e6)clearTimeout(_0x36c7e6);_0x3ddcc8();};_0x5c4149['once']('exit',_0x1ad22c);const _0x36c7e6=setTimeout(()=>{const _0x46cc64=_0x1da2;try{_0x5c4149[_0x46cc64(0x1a0)][_0x46cc64(0x19c)]();}catch{}},_0x101548+0x1f4);_0x36c7e6[_0xe8e1fd(0x434)]?.();try{_0x5c4149[_0xe8e1fd(0x2d5)]();}catch{try{_0x5c4149['process'][_0xe8e1fd(0x19c)]();}catch{}}})));}};return _0x5aa025;}async function _0x2e42e2({makeOkdb:_0x532590,port:_0x319c82}){const _0x41ef31=_0x19f36c,_0x3fb8f3=await _0x532590();return _0x2a81a0(_0x3fb8f3),_0x3fb8f3[_0x41ef31(0x48f)]['listen'](_0x319c82);}function _0x2a81a0(_0x43da63){const _0x3bc131=_0x19f36c;if(!_0x43da63||_0x43da63[_0x3bc131(0x540)])return;_0x43da63['_clusterWorkerAttached']=!![];try{const {OKDBChangefeed:_0x10f982}=requireOkdbChangefeed(),_0x894dbb=_0x43da63[_0x3bc131(0x50b)];if(_0x894dbb&&typeof _0x894dbb['attachFeed']==='function'){const _0x3465d2=new _0x10f982(_0x43da63);_0x3465d2['start'](),_0x894dbb[_0x3bc131(0x2ff)](_0x3465d2),_0x43da63['_changefeed']=_0x3465d2;}}catch(_0x25953b){_0x43da63['log']?.['warn']?.(_0x3bc131(0x24b)+(_0x25953b?.[_0x3bc131(0x69b)]??_0x25953b),{'feature':_0x3bc131(0x281)});}const _0x1cf027=_0x225234=>{const _0x3d2d30=_0x3bc131;if(!_0x225234||typeof _0x225234!==_0x3d2d30(0x652)||_0x225234[_0xce3264]==null)return;if(_0x225234[_0xce3264]===_0x2421b1)try{_0x43da63[_0x3d2d30(0x50b)]?.[_0x3d2d30(0x38f)]?.(_0x225234[_0x3d2d30(0x4a0)],_0x225234[_0x3d2d30(0x1df)]);}catch{}};process['on']('message',_0x1cf027),_0x43da63[_0x3bc131(0x66a)]=_0x1cf027;{let _0x3acfff=process[_0x3bc131(0x46d)](),_0x131ac5=Date[_0x3bc131(0x263)]();const _0x58f460=()=>{const _0x4c366d=_0x3bc131;if(typeof process[_0x4c366d(0x1ee)]!==_0x4c366d(0x318)||!process[_0x4c366d(0x2c0)])return;const _0x172648=Date['now'](),_0x1f1f13=process[_0x4c366d(0x46d)](),_0x41cf5c=(_0x172648-_0x131ac5)*0x3e8,_0x3ad41f=_0x1f1f13[_0x4c366d(0x359)]-_0x3acfff[_0x4c366d(0x359)]+(_0x1f1f13[_0x4c366d(0x193)]-_0x3acfff[_0x4c366d(0x193)]),_0x562053=_0x41cf5c>0x0?Math[_0x4c366d(0x660)](0x64,Math[_0x4c366d(0x1db)](_0x3ad41f/(_0x41cf5c*(_0x429864[_0x4c366d(0x316)]()[_0x4c366d(0x4e2)]||0x1))*0x64)):0x0;_0x3acfff=_0x1f1f13,_0x131ac5=_0x172648;const _0x3efe15=process[_0x4c366d(0x350)]();try{process[_0x4c366d(0x1ee)]({[_0xce3264]:_0x2811f6,'stats':{'rss':_0x3efe15[_0x4c366d(0x558)],'heapUsed':_0x3efe15[_0x4c366d(0x2a7)],'heapTotal':_0x3efe15[_0x4c366d(0x6bf)],'external':_0x3efe15[_0x4c366d(0x3c4)],'cpuPct':_0x562053,'cpuWindowMs':Math['round'](_0x41cf5c/0x3e8)||null}});}catch{}},_0x36313d=Math[_0x3bc131(0x2d6)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x5a5f29=setInterval(_0x58f460,_0x36313d);_0x5a5f29[_0x3bc131(0x434)]?.(),_0x58f460();}let _0x4a31e0=![];const _0x407bd9=async _0x2c06da=>{const _0xbd11d1=_0x3bc131;if(_0x4a31e0)return;_0x4a31e0=!![];const _0x5bd71e=setTimeout(()=>process[_0xbd11d1(0x4ba)](_0x2c06da),_0x101548);_0x5bd71e['unref']?.();try{await _0x43da63[_0xbd11d1(0x5f3)]?.();}catch{}process[_0xbd11d1(0x4ba)](_0x2c06da);};process['on'](_0x3bc131(0x2d5),()=>_0x407bd9(0x0));if(process[_0x3bc131(0x677)]!=='win32'){const _0x23fafb=setInterval(()=>{if(process['ppid']===0x1)_0x407bd9(0x0);},_0x12bb60);_0x23fafb['unref']?.(),_0x43da63[_0x3bc131(0x643)]=_0x23fafb;}}return okdbCluster={'runClustered':_0x5bf882,'attachWorkerCluster':_0x2a81a0},okdbCluster;}var okdbHttp={'exports':{}},okdbMetrics,hasRequiredOkdbMetrics;function requireOkdbMetrics(){const _0x2ff389=_0x264626;if(hasRequiredOkdbMetrics)return okdbMetrics;hasRequiredOkdbMetrics=0x1;const _0x27c6ff=0x3c;function _0xb0e8fd(){return{'requests':0x0,'reads':0x0,'writes':0x0,'errors':0x0,'readMs':0x0,'writeMs':0x0};}class _0x4efc8a{constructor(){const _0x98e82f=_0x1da2;this['_totalRequests']=0x0,this['_totalReads']=0x0,this['_totalWrites']=0x0,this[_0x98e82f(0x4e9)]=0x0,this[_0x98e82f(0x65c)]=0x0,this[_0x98e82f(0x29f)]=0x0,this[_0x98e82f(0x155)]=Array[_0x98e82f(0x4ce)]({'length':_0x27c6ff},_0xb0e8fd),this[_0x98e82f(0x5ac)]=0x0,this[_0x98e82f(0x282)]=Date[_0x98e82f(0x263)](),this[_0x98e82f(0x49e)]=setInterval(()=>this[_0x98e82f(0x23f)](),0x3e8);if(this[_0x98e82f(0x49e)][_0x98e82f(0x434)])this[_0x98e82f(0x49e)][_0x98e82f(0x434)]();}[_0x2ff389(0x23f)](){const _0x9f4a92=_0x2ff389;this[_0x9f4a92(0x5ac)]=(this[_0x9f4a92(0x5ac)]+0x1)%_0x27c6ff,this[_0x9f4a92(0x155)][this[_0x9f4a92(0x5ac)]]=_0xb0e8fd(),this[_0x9f4a92(0x282)]=Date[_0x9f4a92(0x263)]();}[_0x2ff389(0x16a)](_0x30cb8f,_0x1fab00,_0x2c09e0){const _0x2b12ef=_0x2ff389,_0x29013f=/^(POST|PUT|PATCH|DELETE)$/i[_0x2b12ef(0x38c)](_0x30cb8f),_0x1a1e9c=this[_0x2b12ef(0x155)][this[_0x2b12ef(0x5ac)]];this[_0x2b12ef(0x3e3)]++,_0x1a1e9c[_0x2b12ef(0x5cc)]++,_0x2c09e0&&(this[_0x2b12ef(0x4e9)]++,_0x1a1e9c['errors']++),_0x29013f?(this[_0x2b12ef(0x674)]++,this['_totalWriteMs']+=_0x1fab00,_0x1a1e9c[_0x2b12ef(0x4ed)]++,_0x1a1e9c[_0x2b12ef(0x4d1)]+=_0x1fab00):(this[_0x2b12ef(0x45b)]++,this[_0x2b12ef(0x65c)]+=_0x1fab00,_0x1a1e9c[_0x2b12ef(0x568)]++,_0x1a1e9c[_0x2b12ef(0x2b3)]+=_0x1fab00);}[_0x2ff389(0x1e0)](){const _0x156ea1=_0x2ff389;let _0x3bd128=0x0,_0x487dab=0x0,_0x406ec4=0x0,_0x34fb11=0x0,_0x3fbfcf=0x0,_0x17fe97=0x0;for(const _0x143339 of this[_0x156ea1(0x155)]){_0x3bd128+=_0x143339[_0x156ea1(0x5cc)],_0x487dab+=_0x143339['reads'],_0x406ec4+=_0x143339[_0x156ea1(0x4ed)],_0x34fb11+=_0x143339[_0x156ea1(0x4c3)],_0x3fbfcf+=_0x143339[_0x156ea1(0x2b3)],_0x17fe97+=_0x143339['writeMs'];}const _0x547670=_0x27c6ff;return{'lifetime':{'requests':this['_totalRequests'],'reads':this[_0x156ea1(0x45b)],'writes':this[_0x156ea1(0x674)],'errors':this[_0x156ea1(0x4e9)],'avgReadMs':this[_0x156ea1(0x45b)]>0x0?+(this['_totalReadMs']/this[_0x156ea1(0x45b)])[_0x156ea1(0x367)](0x2):null,'avgWriteMs':this[_0x156ea1(0x674)]>0x0?+(this[_0x156ea1(0x29f)]/this[_0x156ea1(0x674)])[_0x156ea1(0x367)](0x2):null},'window':{'seconds':_0x547670,'requests':_0x3bd128,'reads':_0x487dab,'writes':_0x406ec4,'errors':_0x34fb11,'reqPerSec':+(_0x3bd128/_0x547670)[_0x156ea1(0x367)](0x2),'readPerSec':+(_0x487dab/_0x547670)[_0x156ea1(0x367)](0x2),'writePerSec':+(_0x406ec4/_0x547670)[_0x156ea1(0x367)](0x2),'avgReadMs':_0x487dab>0x0?+(_0x3fbfcf/_0x487dab)[_0x156ea1(0x367)](0x2):null,'avgWriteMs':_0x406ec4>0x0?+(_0x17fe97/_0x406ec4)[_0x156ea1(0x367)](0x2):null}};}[_0x2ff389(0x5f3)](){clearInterval(this['_timer']);}}return okdbMetrics=_0x4efc8a,okdbMetrics;}var okdbAuthNamespaces,hasRequiredOkdbAuthNamespaces;function requireOkdbAuthNamespaces(){const _0x4e2c63=_0x264626;if(hasRequiredOkdbAuthNamespaces)return okdbAuthNamespaces;hasRequiredOkdbAuthNamespaces=0x1;const _0x509d95={'data':{'label':_0x4e2c63(0x4d7),'scope':'env','description':_0x4e2c63(0x2e0),'operations':{'read':{'label':_0x4e2c63(0x507),'summary':_0x4e2c63(0x691)},'write':{'label':'Write','summary':_0x4e2c63(0x3c7)}}},'schema':{'label':_0x4e2c63(0x239),'scope':_0x4e2c63(0x5c4),'description':_0x4e2c63(0x333),'operations':{'read':{'label':_0x4e2c63(0x507),'summary':_0x4e2c63(0x207)},'write':{'label':'Write','summary':'Register/update/delete\x20types,\x20register/drop/rebuild\x20indexes,\x20set\x20TTL\x20policy.'}}},'search':{'label':_0x4e2c63(0x539),'scope':_0x4e2c63(0x5c4),'description':_0x4e2c63(0x588),'operations':{'query':{'label':'Query','summary':_0x4e2c63(0x6c8)}}},'queue':{'label':'Queue','scope':'env','description':_0x4e2c63(0x417),'operations':{'read':{'label':_0x4e2c63(0x507),'summary':'List\x20jobs,\x20view\x20stats,\x20list\x20buckets.'},'write':{'label':_0x4e2c63(0x6aa),'summary':'Enqueue,\x20cancel,\x20retry,\x20remove\x20jobs;\x20manage\x20buckets;\x20reconcile\x20and\x20rebuild\x20stats.'},'work':{'label':_0x4e2c63(0x669),'summary':_0x4e2c63(0x4fb)}}},'files':{'label':_0x4e2c63(0x33a),'scope':_0x4e2c63(0x5c4),'description':_0x4e2c63(0x6ca),'operations':{'read':{'label':_0x4e2c63(0x507),'summary':_0x4e2c63(0x493)},'write':{'label':'Write','summary':_0x4e2c63(0x289)}}},'functions':{'label':_0x4e2c63(0x2aa),'scope':_0x4e2c63(0x5c4),'description':_0x4e2c63(0x462),'operations':{'read':{'label':_0x4e2c63(0x507),'summary':_0x4e2c63(0x5d2)},'write':{'label':_0x4e2c63(0x6aa),'summary':_0x4e2c63(0x679)},'run':{'label':_0x4e2c63(0x53b),'summary':'Execute\x20functions\x20over\x20HTTP/MCP/shell.'}}},'views':{'label':_0x4e2c63(0x2e1),'scope':_0x4e2c63(0x5c4),'description':'Materialized\x20views:\x20query\x20definitions\x20that\x20are\x20continuously\x20maintained\x20and\x20queryable.','operations':{'read':{'label':_0x4e2c63(0x507),'summary':'List\x20views,\x20query\x20view\x20output,\x20inspect\x20metadata\x20and\x20definition.'},'write':{'label':_0x4e2c63(0x6aa),'summary':_0x4e2c63(0x40b)}}},'env':{'label':_0x4e2c63(0x52f),'scope':'env','description':'Environment\x20lifecycle.\x20Listing\x20and\x20creating\x20envs\x20is\x20system-level.','operations':{'read':{'label':_0x4e2c63(0x507),'summary':_0x4e2c63(0x407)},'write':{'label':_0x4e2c63(0x6aa),'summary':_0x4e2c63(0x284)}}},'auth':{'label':_0x4e2c63(0x373),'scope':_0x4e2c63(0x193),'description':_0x4e2c63(0x5b7),'operations':{'read':{'label':'Read','summary':_0x4e2c63(0x3d0)},'write':{'label':_0x4e2c63(0x6aa),'summary':_0x4e2c63(0x665)}}},'system':{'label':'System','scope':_0x4e2c63(0x193),'description':_0x4e2c63(0x376),'operations':{'read':{'label':'Read','summary':_0x4e2c63(0x1ac)},'write':{'label':_0x4e2c63(0x6aa),'summary':'Pause/resume\x20processor,\x20trigger\x20backups,\x20restore.'}}},'sync':{'label':'Sync','scope':_0x4e2c63(0x193),'description':_0x4e2c63(0x46e),'operations':{'read':{'label':_0x4e2c63(0x507),'summary':'View\x20peer\x20status\x20and\x20replication\x20stats.'},'write':{'label':_0x4e2c63(0x6aa),'summary':_0x4e2c63(0x64b)},'peer':{'label':'Peer','summary':_0x4e2c63(0x3c5),'machineOnly':!![]}}},'protected':{'label':'Protected\x20(gate)','scope':'gate','description':_0x4e2c63(0x230),'operations':{'read':{'label':_0x4e2c63(0x507),'summary':_0x4e2c63(0x5b1)},'write':{'label':_0x4e2c63(0x6aa),'summary':_0x4e2c63(0x425)}}}},_0x3f3519={'schema:read':[_0x4e2c63(0x418),_0x4e2c63(0x5ca),_0x4e2c63(0x35d)]},_0x17fc1f=['read',_0x4e2c63(0x191),_0x4e2c63(0x224),_0x4e2c63(0x1d5),_0x4e2c63(0x5c6),_0x4e2c63(0x667)];function _0x15a0e7(){const _0x43a0c1=_0x4e2c63,_0x1eeaab=[];for(const [_0x99a84b,_0x44be96]of Object[_0x43a0c1(0x65b)](_0x509d95)){for(const _0x55553e of Object[_0x43a0c1(0x5fb)](_0x44be96[_0x43a0c1(0x4dd)])){_0x1eeaab[_0x43a0c1(0x3fd)](_0x99a84b+':'+_0x55553e);}}return _0x1eeaab;}function _0x6ff7f2(_0x94394){return _0x509d95[_0x94394]||null;}function _0x382a05(_0x5a7fca,_0x12489e){const _0x398b39=_0x4e2c63;return _0x509d95[_0x5a7fca]?.[_0x398b39(0x4dd)][_0x12489e]||null;}return okdbAuthNamespaces={'NAMESPACES':_0x509d95,'IMPLIED_BY':_0x3f3519,'OP_ORDER':_0x17fc1f,'listAllPermissions':_0x15a0e7,'getNamespaceMeta':_0x6ff7f2,'getOperationMeta':_0x382a05},okdbAuthNamespaces;}var okdbAuthPermissions,hasRequiredOkdbAuthPermissions;function requireOkdbAuthPermissions(){const _0x39439e=_0x264626;if(hasRequiredOkdbAuthPermissions)return okdbAuthPermissions;hasRequiredOkdbAuthPermissions=0x1;const {IMPLIED_BY:_0x2f812f}=requireOkdbAuthNamespaces(),_0x3a2646=new Set([_0x39439e(0x206),_0x39439e(0x191)]);function _0x3b4a92(_0x17f63a,_0x2693be){const _0x468a16=_0x39439e;if(!Array['isArray'](_0x17f63a)||_0x17f63a[_0x468a16(0x4e2)]===0x0)return![];for(const _0x254b01 of _0x17f63a){if(typeof _0x254b01!=='string'||!_0x254b01[_0x468a16(0x3b7)](':')){if(_0x254b01==='*')return!![];continue;}const [_0x392568,_0x25e599]=_0x254b01[_0x468a16(0x428)](':'),[_0x1bbc8f,_0x51f305]=_0x2693be[_0x468a16(0x428)](':'),_0x80d40d=_0x392568==='*'||_0x392568===_0x1bbc8f,_0x146c61=_0x25e599==='*'||_0x25e599===_0x51f305;if(_0x80d40d&&_0x146c61)return!![];}const _0x44d14c=_0x2f812f[_0x2693be];if(_0x44d14c)for(const _0x53a1e7 of _0x44d14c){if(_0x3b4a92(_0x17f63a,_0x53a1e7))return!![];}return![];}function _0x626d32(_0x355594,_0x4b2e26){const _0x255c0d=_0x39439e,_0x465cc9=new Set();if(Array['isArray'](_0x355594)){for(const _0x15ae3f of _0x355594)_0x465cc9[_0x255c0d(0x5de)](_0x15ae3f);}if(Array[_0x255c0d(0x478)](_0x4b2e26)){for(const _0x27bfc9 of _0x4b2e26)_0x465cc9[_0x255c0d(0x5de)](_0x27bfc9);}return Array['from'](_0x465cc9);}function _0x448d8b(_0x3af032){const _0x386093=_0x39439e;if(typeof _0x3af032!==_0x386093(0x3c1))return![];const [,_0x2b9ac9]=_0x3af032[_0x386093(0x428)](':');return _0x3a2646['has'](_0x2b9ac9);}function _0x4c21e0(_0x1d038a){const _0x167ad8=_0x39439e;return _0x448d8b(_0x1d038a)?_0x167ad8(0x60b):'protected:write';}function _0x3f8d49(_0x2b353b,_0x3c7aa2){const _0x123e04=_0x39439e;return _0x626d32(_0x2b353b[_0x123e04(0x2c4)]||[],_0x3c7aa2?(_0x2b353b['grants']||{})[_0x3c7aa2]||[]:[]);}function _0xc04cab(_0x31ac41){const _0x524763=_0x39439e,_0xc88e9c=[];for(const _0x228e6c of _0x31ac41['listRoutes']()){const _0x33f98f=_0x228e6c['operation']?.['access'];if(!_0x33f98f)continue;_0x33f98f[_0x524763(0x37b)]&&!_0x33f98f[_0x524763(0x272)]&&_0xc88e9c[_0x524763(0x3fd)](_0x228e6c[_0x524763(0x1b1)]+'\x20'+_0x228e6c['path']+'\x20(id:\x20'+(_0x228e6c[_0x524763(0x3c8)]['id']??'?')+')');}if(_0xc88e9c[_0x524763(0x4e2)])throw new Error(_0x524763(0x4f8)+_0xc88e9c[_0x524763(0x2c7)]('\x0a\x20\x20'));}return okdbAuthPermissions={'hasPermission':_0x3b4a92,'unionPermissions':_0x626d32,'isReadOperation':_0x448d8b,'resolveProtectedGate':_0x4c21e0,'getEffectivePermissions':_0x3f8d49,'assertEveryRouteHasPermission':_0xc04cab},okdbAuthPermissions;}var okdbJwtUtils,hasRequiredOkdbJwtUtils;function requireOkdbJwtUtils(){if(hasRequiredOkdbJwtUtils)return okdbJwtUtils;hasRequiredOkdbJwtUtils=0x1;const _0x496040=require$$0$5,_0x3f730c=require$$1$3,_0x390f48=require$$2;function _0x433213(_0x1109b2){const _0x5117cc=_0x1da2,_0x4c2fa9=String(_0x1109b2||'')[_0x5117cc(0x32d)](/-/g,'+')[_0x5117cc(0x32d)](/_/g,'/'),_0x44892d=_0x4c2fa9+'='['repeat']((0x4-(_0x4c2fa9[_0x5117cc(0x4e2)]%0x4||0x4))%0x4);return Buffer[_0x5117cc(0x4ce)](_0x44892d,_0x5117cc(0x552));}function _0x3e458c(_0x5ad0a8){const _0x224870=_0x1da2;if(typeof _0x5ad0a8!==_0x224870(0x3c1))throw new Error(_0x224870(0x329));const _0x3aebab=_0x5ad0a8[_0x224870(0x428)]('.');if(_0x3aebab[_0x224870(0x4e2)]!==0x3)throw new Error(_0x224870(0x398));const [_0x2675c1,_0xeaff52,_0x3b70da]=_0x3aebab,_0x148d03=JSON[_0x224870(0x2cc)](_0x433213(_0x2675c1)['toString'](_0x224870(0x192))),_0x5e1dd7=JSON[_0x224870(0x2cc)](_0x433213(_0xeaff52)[_0x224870(0x3ec)](_0x224870(0x192)));return{'header':_0x148d03,'payload':_0x5e1dd7,'signature':_0x433213(_0x3b70da),'signingInput':Buffer[_0x224870(0x4ce)](_0x2675c1+'.'+_0xeaff52),'encodedHeader':_0x2675c1,'encodedPayload':_0xeaff52};}function _0xe04bf2(_0x3b3910){const _0x4bfff0=_0x1da2;if(Array[_0x4bfff0(0x478)](_0x3b3910))return _0x3b3910;if(_0x3b3910==null)return[];return[_0x3b3910];}function _0x373ebe(_0x6112f8){const _0x301152=_0x1da2,_0x3b2672=String(_0x6112f8||'')[_0x301152(0x342)](/.{1,64}/g)||[];return _0x301152(0x188)+_0x3b2672[_0x301152(0x2c7)]('\x0a')+'\x0a-----END\x20CERTIFICATE-----\x0a';}function _0x904b0f(_0x48ffb5={}){const _0x6be5b1=_0x1da2;if(_0x48ffb5[_0x6be5b1(0x29d)]?.[0x0])return _0x390f48['createPublicKey'](_0x373ebe(_0x48ffb5[_0x6be5b1(0x29d)][0x0]));return _0x390f48[_0x6be5b1(0x5cb)]({'key':_0x48ffb5,'format':'jwk'});}function _0x4fbba0(_0x1b06c9,_0x550b9d,_0x56577e,_0x18c534){const _0x5e9f53=_0x1da2;if(_0x1b06c9===_0x5e9f53(0x13a))return _0x390f48[_0x5e9f53(0x39e)]('RSA-SHA256',_0x56577e,_0x550b9d,_0x18c534);if(_0x1b06c9===_0x5e9f53(0x198))return _0x390f48['verify'](_0x5e9f53(0x1a3),_0x56577e,{'key':_0x550b9d,'dsaEncoding':_0x5e9f53(0x305)},_0x18c534);return![];}function _0x50b88d(_0x3285d9){const _0xc37021=_0x1da2;if(typeof commonjsGlobal[_0xc37021(0x5d8)]===_0xc37021(0x318))return commonjsGlobal[_0xc37021(0x5d8)](_0x3285d9,{'headers':{'accept':_0xc37021(0x3a5)}})[_0xc37021(0x41e)](async _0x35ec94=>{const _0x1d5a07=_0xc37021;if(!_0x35ec94['ok']){const _0x27e2db=new Error(_0x1d5a07(0x1a9)+_0x35ec94[_0x1d5a07(0x4f0)]+_0x1d5a07(0x526)+_0x3285d9);_0x27e2db[_0x1d5a07(0x4f0)]=_0x35ec94[_0x1d5a07(0x4f0)];throw _0x27e2db;}return _0x35ec94[_0x1d5a07(0x4a6)]();});return new Promise((_0x58228d,_0x41b150)=>{const _0x370ff9=_0xc37021,_0x4e4f6e=String(_0x3285d9)['startsWith'](_0x370ff9(0x337))?_0x3f730c:_0x496040,_0x5ac426=_0x4e4f6e['get'](_0x3285d9,{'headers':{'accept':_0x370ff9(0x3a5)}},_0x21cddd=>{const _0x23c994=_0x370ff9;let _0x1a933f='';_0x21cddd[_0x23c994(0x511)](_0x23c994(0x192)),_0x21cddd['on'](_0x23c994(0x1df),_0x38f2ce=>{_0x1a933f+=_0x38f2ce;}),_0x21cddd['on'](_0x23c994(0x47d),()=>{const _0x290815=_0x23c994;if(_0x21cddd[_0x290815(0x42f)]<0xc8||_0x21cddd[_0x290815(0x42f)]>=0x12c){const _0x47be5b=new Error('HTTP\x20'+_0x21cddd['statusCode']+_0x290815(0x526)+_0x3285d9);return _0x47be5b[_0x290815(0x4f0)]=_0x21cddd[_0x290815(0x42f)],_0x41b150(_0x47be5b);}try{_0x58228d(JSON[_0x290815(0x2cc)](_0x1a933f||'{}'));}catch(_0x43fff9){_0x41b150(_0x43fff9);}});});_0x5ac426['on']('error',_0x41b150),_0x5ac426['end']();});}return okdbJwtUtils={'base64UrlDecode':_0x433213,'parseJwt':_0x3e458c,'normalizeAudience':_0xe04bf2,'normalizePemCertificate':_0x373ebe,'jwkToKeyObject':_0x904b0f,'verifyJwtSignature':_0x4fbba0,'fetchJson':_0x50b88d},okdbJwtUtils;}var hasRequiredOkdbHttp;function requireOkdbHttp(){const _0x151c84=_0x264626;if(hasRequiredOkdbHttp)return okdbHttp[_0x151c84(0x4ad)];hasRequiredOkdbHttp=0x1;const _0x5b0260=require$$0$5,{URL:_0x204e6d}=require$$2$1,_0xc440d7=requireOkdbMetrics(),_0x324f58=requireOkdbAuthTokens(),{hasPermission:_0x2d2fc6,unionPermissions:_0x104275,resolveProtectedGate:_0x28a770}=requireOkdbAuthPermissions(),_0xb8deee={0x190:_0x151c84(0x366),0x191:_0x151c84(0x179),0x193:_0x151c84(0x51d),0x194:_0x151c84(0x5f1),0x195:'METHOD_NOT_ALLOWED',0x198:'REQUEST_TIMEOUT',0x199:_0x151c84(0x662),0x19a:_0x151c84(0x2f1),0x19b:'LENGTH_REQUIRED',0x19d:'PAYLOAD_TOO_LARGE',0x19f:_0x151c84(0x2c2),0x1a6:_0x151c84(0x47c),0x1ad:_0x151c84(0x50c),0x1f4:_0x151c84(0x542),0x1f5:_0x151c84(0x1c6),0x1f6:_0x151c84(0x530),0x1f7:_0x151c84(0x334),0x1f8:_0x151c84(0x35e)},_0x2f9167={'INVALID_VALUE':0x190,'BAD_CONFIG':0x190,'INVALID_PRIMARY_KEY':0x190,'INVALID_INDEX_KEY':0x190,'TYPE_NOT_REGISTERED':0x194,'INDEX_NOT_REGISTERED':0x194,'NOT_FOUND':0x194,'ALREADY_EXISTS':0x199,'VERSION_MISMATCH':0x199,'UNIQUE_CONSTRAINT':0x199,'TYPE_ALREADY_REGISTERED':0x199,'INDEX_ALREADY_REGISTERED':0x199,'FK_ERROR':0x199,'FK_DELETE_ERROR':0x199,'FOREIGN_KEY_VIOLATION':0x199,'FOREIGN_KEY_DELETE_RESTRICTED':0x199,'ENV_NOT_FOUND':0x194,'ENV_PROTECTED':0x193,'ENGINE_CONFIG_PATCH_UNSUPPORTED':0x190,'QUEUE_WORKER_JOB_TYPE_CONFLICT':0x199,'SCHEMA_VALIDATION_FAILED':0x1a6,'SCHEMA_COLLECTION_INVALID':0x199,'INVALID_SCHEMA':0x190,'BUCKET_CONFIG_INVALID':0x190,'BUCKET_INVALID_TIME_VALUE':0x1a6,'BUCKET_PROJECT_NOT_SYNCABLE':0x190,'RESERVED_VIEW_NAME':0x190,'VIEW_NOT_BUCKETED':0x190,'VIEW_NOT_FOUND':0x194,'VIEW_RANGE_GRANULARITY_MISMATCH':0x190,'VIEW_RANGE_GRANULARITY_REQUIRED':0x190,'VIEW_REF_UNSUPPORTED_REDUCER':0x190},{hmac:_0x5286c6,timingSafeEqual:_0x54a595,parseBearer:_0x23b312,randomToken:_0x3b3bd,issueToken:_0x436537,authenticateToken:_0x300bca}=_0x324f58,{base64UrlDecode:_0xabc08,parseJwt:_0x6d00b5,normalizeAudience:_0x498f8d,normalizePemCertificate:_0x53f705,jwkToKeyObject:_0x4164e8,verifyJwtSignature:_0x43be14,fetchJson:_0x4a2c64}=requireOkdbJwtUtils();function _0x15e83c(_0x309630){const _0x7e5ce7=_0x151c84;return(_0x309630||_0x7e5ce7(0x325))[_0x7e5ce7(0x6ad)]();}function _0x28d9d4(_0x22927b){const _0xb00b9b=_0x151c84;if(Array[_0xb00b9b(0x478)](_0x22927b))return _0x22927b[_0xb00b9b(0x1ce)](_0x28d9d4);return String(_0x22927b||'')[_0xb00b9b(0x428)](',')[_0xb00b9b(0x145)](_0x307f72=>_0x307f72[_0xb00b9b(0x2c3)]())[_0xb00b9b(0x3d5)](Boolean);}function _0x249f61(..._0x34d19d){const _0x2e825a=_0x151c84;return[...new Set(_0x34d19d[_0x2e825a(0x1ce)](_0x28d9d4))][_0x2e825a(0x2c7)](',\x20');}function _0x3aa2d6(_0x43333c,_0x4a803d){const _0x33ad30=_0x151c84;if(!_0x43333c)return![];if(_0x4a803d==='*')return!![];if(_0x4a803d instanceof RegExp)return _0x4a803d[_0x33ad30(0x38c)](_0x43333c);if(typeof _0x4a803d===_0x33ad30(0x318))return!!_0x4a803d(_0x43333c);if(Array[_0x33ad30(0x478)](_0x4a803d))return _0x4a803d[_0x33ad30(0x3b7)](_0x43333c);return _0x4a803d===_0x43333c;}function _0x5db0c1(_0x2d6c0e={},_0x3de51c={},_0x3dabc3=null){const _0x3be80e=_0x151c84;if(!_0x3de51c)return null;const _0x596ab2=_0x2d6c0e[_0x3be80e(0x346)],_0x22f8af=_0x3de51c['origins']??_0x3de51c[_0x3be80e(0x346)]??'*',_0x4654a0=_0x22f8af==='*'?'*':_0x3aa2d6(_0x596ab2,_0x22f8af)?_0x596ab2:null;if(!_0x4654a0)return null;const _0x193f69=_0x2d6c0e[_0x3be80e(0x6cd)],_0x147b47=_0x3de51c[_0x3be80e(0x4eb)]??_0x3de51c['allowHeaders']??['content-type','authorization',_0x3be80e(0x6d1),_0x3be80e(0x3b8),_0x3be80e(0x419)],_0x4760f9=_0x3de51c[_0x3be80e(0x63e)]??_0x3de51c[_0x3be80e(0x4d0)]??(_0x3dabc3?[_0x3dabc3,'OPTIONS']:[_0x3be80e(0x325),'POST','OPTIONS']),_0x4ad12b=_0x3de51c[_0x3be80e(0x2bc)]??[_0x3be80e(0x6d1)],_0x2a6b4b={'access-control-allow-origin':_0x4654a0,'access-control-allow-methods':Array[_0x3be80e(0x478)](_0x4760f9)?_0x4760f9[_0x3be80e(0x2c7)](',\x20'):String(_0x4760f9),'access-control-allow-headers':_0x193f69?_0x249f61(_0x147b47,_0x193f69):Array[_0x3be80e(0x478)](_0x147b47)?_0x147b47['join'](',\x20'):String(_0x147b47),'access-control-expose-headers':Array[_0x3be80e(0x478)](_0x4ad12b)?_0x4ad12b[_0x3be80e(0x2c7)](',\x20'):String(_0x4ad12b),'vary':_0x249f61('Origin',_0x4654a0==='*'?'':'Origin',_0x193f69?_0x3be80e(0x60c):'')};if(_0x3de51c[_0x3be80e(0x58a)])_0x2a6b4b['access-control-allow-credentials']=_0x3be80e(0x296);if(Number[_0x3be80e(0x5e1)](_0x3de51c[_0x3be80e(0x4d5)]))_0x2a6b4b[_0x3be80e(0x69e)]=String(_0x3de51c[_0x3be80e(0x4d5)]);return _0x2a6b4b;}function _0x1e319f(_0x38e029){const _0x30c913=_0x151c84,_0x3b0673=[],_0x20fcd1={};let _0x5b3754=![];_0x38e029['endsWith']('/*')&&(_0x5b3754=!![],_0x38e029=_0x38e029['slice'](0x0,-0x2),_0x3b0673[_0x30c913(0x3fd)]('*'));let _0x17a98c=_0x38e029[_0x30c913(0x32d)](/\/+$/,'')['replace'](/\[([^\]]*)\]/g,(_0x2bd76f,_0x5b8c9c)=>{const _0x3e9f45=_0x30c913,_0x17e681=_0x5b8c9c[_0x3e9f45(0x32d)](/\/:(\w+)(?:=([^/\]\s]*))?/g,(_0xc76377,_0x2bfa25,_0x483b3d)=>{const _0x59942e=_0x3e9f45;_0x3b0673[_0x59942e(0x3fd)](_0x2bfa25);if(_0x483b3d!==undefined)_0x20fcd1[_0x2bfa25]=_0x483b3d;return _0x59942e(0x55f);});return _0x3e9f45(0x1cb)+_0x17e681+')?';})['replace'](/\/:(\w+)/g,(_0x1029e7,_0x29045e)=>{const _0x266de3=_0x30c913;return _0x3b0673[_0x266de3(0x3fd)](_0x29045e),_0x266de3(0x55f);});if(_0x17a98c==='')_0x17a98c='/';return{'keys':_0x3b0673,'defaults':_0x20fcd1,'wildcard':_0x5b3754,'regex':new RegExp(_0x5b3754?'^'+_0x17a98c+_0x30c913(0x609):'^'+_0x17a98c+'$')};}function _0x2f0157(_0x3efd26){const _0x2c75b4=_0x151c84;if(_0x3efd26==null)return _0x3efd26;return JSON[_0x2c75b4(0x2cc)](JSON[_0x2c75b4(0x6ae)](_0x3efd26));}function _0x5b5d90(_0x3b977f){const _0x31d61e=_0x151c84;if(_0x3b977f==null)return null;if(_0x3b977f[_0x31d61e(0x1f7)]===_0x31d61e(0x652)&&_0x3b977f[_0x31d61e(0x371)]&&!Array[_0x31d61e(0x478)](_0x3b977f['properties']))return _0x2f0157(_0x3b977f);const _0xa3b5e8=Object['values'](_0x3b977f),_0x555625=_0xa3b5e8[_0x31d61e(0x4e2)]>0x0&&_0xa3b5e8[_0x31d61e(0x62f)](_0x26893f=>{const _0x37d844=_0x31d61e;return _0x26893f&&typeof _0x26893f===_0x37d844(0x652)&&!Array[_0x37d844(0x478)](_0x26893f)&&(Object['prototype'][_0x37d844(0x689)][_0x37d844(0x50a)](_0x26893f,_0x37d844(0x1f7))||Object[_0x37d844(0x699)][_0x37d844(0x689)]['call'](_0x26893f,_0x37d844(0x371))||Object[_0x37d844(0x699)][_0x37d844(0x689)][_0x37d844(0x50a)](_0x26893f,'items')||Object[_0x37d844(0x699)][_0x37d844(0x689)][_0x37d844(0x50a)](_0x26893f,_0x37d844(0x429)));});if(_0x555625)return{'type':'object','properties':_0x2f0157(_0x3b977f),'required':[],'additionalProperties':![]};const _0x3de4f1={},_0xefa2b4=[];for(const [_0x59925d,_0x33682c]of Object[_0x31d61e(0x65b)](_0x3b977f)){_0x3de4f1[_0x59925d]=_0x3a9144(_0x33682c);if(_0x33682c!==null&&_0x33682c!==undefined)_0xefa2b4['push'](_0x59925d);}return{'type':'object','properties':_0x3de4f1,'required':_0xefa2b4,'additionalProperties':![]};}function _0x3a9144(_0x47088c){const _0x502088=_0x151c84;if(_0x47088c===null)return{'type':[_0x502088(0x3d4),_0x502088(0x3c1),_0x502088(0x44a),_0x502088(0x37f),_0x502088(0x652),_0x502088(0x312)]};if(Array[_0x502088(0x478)](_0x47088c))return{'type':'array','items':_0x47088c['length']>0x0?_0x3a9144(_0x47088c[0x0]):{}};switch(typeof _0x47088c){case'string':return{'type':_0x502088(0x3c1),'default':_0x47088c};case _0x502088(0x44a):return{'type':Number[_0x502088(0x256)](_0x47088c)?_0x502088(0x202):_0x502088(0x44a),'default':_0x47088c};case _0x502088(0x37f):return{'type':_0x502088(0x37f),'default':_0x47088c};case _0x502088(0x652):{const _0x44e4e9={};for(const [_0x27926d,_0x119859]of Object[_0x502088(0x65b)](_0x47088c))_0x44e4e9[_0x27926d]=_0x3a9144(_0x119859);return{'type':'object','properties':_0x44e4e9,'additionalProperties':!![],'default':_0x2f0157(_0x47088c)};}default:return{};}}function _0x4d38a5(_0x1a71d5,_0x3ec47e){const _0x36a11d=_0x151c84,_0x201fcc=[];for(const _0x563f45 of _0x3ec47e[_0x36a11d(0x5fb)]){if(_0x563f45==='*')continue;_0x201fcc['push']({'name':_0x563f45,'required':!Object[_0x36a11d(0x699)][_0x36a11d(0x689)][_0x36a11d(0x50a)](_0x3ec47e['defaults'],_0x563f45),'default':_0x3ec47e[_0x36a11d(0x636)][_0x563f45]});}return _0x201fcc;}function _0x36240a(_0x3e66a0={},_0x21a363){const _0x3d827d=_0x151c84,_0x53bbb6=_0x5b5d90(_0x3e66a0['http']?.['querySchema']??_0x3e66a0['query']??null),_0x3186d7=_0x3e66a0[_0x3d827d(0x48f)]?.['bodyMode']??(_0x3e66a0['raw']?_0x3d827d(0x655):_0x21a363['method']===_0x3d827d(0x325)||_0x21a363[_0x3d827d(0x1b1)]===_0x3d827d(0x46b)?_0x3d827d(0x2f6):'remaining-fields');return{'querySchema':_0x53bbb6,'bodyMode':_0x3186d7,'bindings':_0x2f0157(_0x3e66a0[_0x3d827d(0x48f)]?.[_0x3d827d(0x5ea)]??{}),'statuses':_0x2f0157(_0x3e66a0[_0x3d827d(0x48f)]?.[_0x3d827d(0x2ca)]??(_0x3e66a0[_0x3d827d(0x6b5)]||[])),'transport':_0x3e66a0[_0x3d827d(0x48f)]?.[_0x3d827d(0x37d)]??(_0x3e66a0[_0x3d827d(0x42a)]?_0x3d827d(0x42a):_0x3e66a0[_0x3d827d(0x655)]?_0x3d827d(0x655):_0x3d827d(0x1e7)),'rawResponse':_0x3e66a0['http']?.[_0x3d827d(0x487)]??!!_0x3e66a0[_0x3d827d(0x487)],'cors':_0x2f0157(_0x3e66a0[_0x3d827d(0x48f)]?.['cors']??_0x3e66a0[_0x3d827d(0x527)]??null)};}function _0x577bd7(_0x1ffd5a){const _0x41ef8f=_0x151c84,_0x5ebad4=_0x1ffd5a[_0x41ef8f(0x423)]||{},_0x38c300=_0x4d38a5(_0x1ffd5a[_0x41ef8f(0x4d4)],_0x1ffd5a[_0x41ef8f(0x30a)]),_0x597fb2=!!(_0x5ebad4['id']||_0x5ebad4[_0x41ef8f(0x57a)]||_0x5ebad4[_0x41ef8f(0x416)]||_0x5ebad4['http']||_0x5ebad4[_0x41ef8f(0x427)]||_0x5ebad4[_0x41ef8f(0x283)]||_0x5ebad4[_0x41ef8f(0x56f)]||_0x5ebad4[_0x41ef8f(0x671)]),_0x568cbe=_0x36240a(_0x5ebad4,_0x1ffd5a),_0x5e9266=_0x5ebad4[_0x41ef8f(0x57a)]?_0x2f0157(_0x5ebad4['inputSchema']):null;return{'id':_0x5ebad4['id']??null,'summary':_0x5ebad4[_0x41ef8f(0x379)]??null,'description':_0x5ebad4[_0x41ef8f(0x1b8)]??null,'tags':_0x2f0157(_0x5ebad4['tags']??[]),'category':_0x5ebad4[_0x41ef8f(0x532)]??null,'safety':_0x2f0157(_0x5ebad4[_0x41ef8f(0x671)]??null),'access':_0x2f0157(_0x5ebad4['access']??null),'inputSchema':_0x5e9266,'outputSchema':_0x2f0157(_0x5ebad4[_0x41ef8f(0x416)]??null),'examples':_0x2f0157(_0x5ebad4['examples']??[]),'pathParams':_0x38c300,'http':_0x568cbe,'cli':_0x2f0157(_0x5ebad4[_0x41ef8f(0x283)]??null),'mcp':_0x2f0157(_0x5ebad4['mcp']??null),'legacy':{'params':_0x2f0157(_0x5ebad4[_0x41ef8f(0x2d4)]??null),'query':_0x2f0157(_0x5ebad4[_0x41ef8f(0x191)]??null),'body':_0x2f0157(_0x5ebad4[_0x41ef8f(0x553)]??null),'response':_0x2f0157(_0x5ebad4[_0x41ef8f(0x489)]??null)},'transport':{'raw':!!_0x5ebad4['raw'],'sse':!!_0x5ebad4[_0x41ef8f(0x42a)],'rawResponse':!!_0x5ebad4[_0x41ef8f(0x487)],'cors':_0x2f0157(_0x5ebad4[_0x41ef8f(0x527)]??null)},'hasCanonical':_0x597fb2};}function _0x500e7b(_0x2fb871,_0x413e76){const _0x1986e9=_0x151c84;if(!_0x413e76?.['hasCanonical'])return;if(!_0x413e76['inputSchema']||_0x413e76[_0x1986e9(0x57a)][_0x1986e9(0x1f7)]!==_0x1986e9(0x652)||!_0x413e76[_0x1986e9(0x57a)][_0x1986e9(0x371)])throw new Error('Route\x20'+_0x2fb871[_0x1986e9(0x1b1)]+'\x20'+_0x2fb871[_0x1986e9(0x4d4)]+'\x20has\x20canonical\x20metadata\x20but\x20missing\x20valid\x20inputSchema');const _0x75fa9d=_0x413e76['inputSchema'][_0x1986e9(0x371)]||{},_0x2b5176=new Set(_0x413e76[_0x1986e9(0x569)][_0x1986e9(0x145)](_0x409526=>_0x409526['name'])),_0x47c488=new Set(Object[_0x1986e9(0x5fb)](_0x413e76['http']?.[_0x1986e9(0x5ee)]?.['properties']||{})),_0x4552e0=new Set(Object[_0x1986e9(0x5fb)](_0x413e76[_0x1986e9(0x48f)]?.[_0x1986e9(0x5ea)]||{}));for(const _0x4cbe45 of _0x413e76['pathParams']){if(!_0x75fa9d[_0x4cbe45[_0x1986e9(0x44d)]])throw new Error(_0x1986e9(0x3e6)+_0x2fb871[_0x1986e9(0x1b1)]+'\x20'+_0x2fb871['path']+_0x1986e9(0x5d5)+_0x4cbe45[_0x1986e9(0x44d)]);}for(const _0x2ac865 of _0x47c488){if(!_0x75fa9d[_0x2ac865])throw new Error(_0x1986e9(0x3e6)+_0x2fb871[_0x1986e9(0x1b1)]+'\x20'+_0x2fb871[_0x1986e9(0x4d4)]+'\x20querySchema\x20references\x20missing\x20input\x20field:\x20'+_0x2ac865);}for(const _0x99c7ed of _0x4552e0){if(!_0x75fa9d[_0x99c7ed])throw new Error(_0x1986e9(0x3e6)+_0x2fb871[_0x1986e9(0x1b1)]+'\x20'+_0x2fb871[_0x1986e9(0x4d4)]+_0x1986e9(0x1dc)+_0x99c7ed);}for(const _0x143757 of _0x4552e0){if(_0x2b5176[_0x1986e9(0x34a)](_0x143757))throw new Error(_0x1986e9(0x3e6)+_0x2fb871[_0x1986e9(0x1b1)]+'\x20'+_0x2fb871[_0x1986e9(0x4d4)]+_0x1986e9(0x237)+_0x143757);if(_0x47c488[_0x1986e9(0x34a)](_0x143757))throw new Error(_0x1986e9(0x3e6)+_0x2fb871['method']+'\x20'+_0x2fb871['path']+_0x1986e9(0x67f)+_0x143757);const _0x4d87ee=_0x413e76['http'][_0x1986e9(0x5ea)][_0x143757];if(!/^params\.[A-Za-z0-9_*.-]+$/[_0x1986e9(0x38c)](_0x4d87ee)&&!/^query\.[A-Za-z0-9_*.-]+$/[_0x1986e9(0x38c)](_0x4d87ee)&&!/^body(?:\.[A-Za-z0-9_*.-]+)?$/['test'](_0x4d87ee)&&!/^headers\.[A-Za-z0-9_*.-]+$/[_0x1986e9(0x38c)](_0x4d87ee))throw new Error(_0x1986e9(0x3e6)+_0x2fb871[_0x1986e9(0x1b1)]+'\x20'+_0x2fb871[_0x1986e9(0x4d4)]+_0x1986e9(0x459)+_0x143757+':\x20'+_0x4d87ee);}for(const _0x23d34f of _0x47c488){if(_0x2b5176[_0x1986e9(0x34a)](_0x23d34f))throw new Error(_0x1986e9(0x3e6)+_0x2fb871[_0x1986e9(0x1b1)]+'\x20'+_0x2fb871[_0x1986e9(0x4d4)]+_0x1986e9(0x657)+_0x23d34f);}const _0x2a37a2=_0x413e76[_0x1986e9(0x48f)]?.['bodyMode'],_0x1811ec=new Set(['none',_0x1986e9(0x2be),_0x1986e9(0x652),'payload-or-self',_0x1986e9(0x312),'raw']);if(!_0x1811ec[_0x1986e9(0x34a)](_0x2a37a2))throw new Error(_0x1986e9(0x3e6)+_0x2fb871[_0x1986e9(0x1b1)]+'\x20'+_0x2fb871[_0x1986e9(0x4d4)]+_0x1986e9(0x4ee)+_0x2a37a2);if(_0x2a37a2===_0x1986e9(0x655)&&!_0x2fb871['meta']?.[_0x1986e9(0x655)])throw new Error(_0x1986e9(0x3e6)+_0x2fb871[_0x1986e9(0x1b1)]+'\x20'+_0x2fb871[_0x1986e9(0x4d4)]+'\x20uses\x20raw\x20bodyMode\x20without\x20addRaw/raw\x20route\x20metadata');if(_0x413e76[_0x1986e9(0x427)]?.[_0x1986e9(0x6cc)]!==![]&&(_0x2fb871[_0x1986e9(0x423)]?.[_0x1986e9(0x655)]||_0x2fb871[_0x1986e9(0x423)]?.[_0x1986e9(0x42a)]||_0x413e76[_0x1986e9(0x48f)]?.[_0x1986e9(0x37d)]==='stream'))throw new Error('Route\x20'+_0x2fb871[_0x1986e9(0x1b1)]+'\x20'+_0x2fb871['path']+_0x1986e9(0x204)+_0x413e76[_0x1986e9(0x48f)]?.[_0x1986e9(0x37d)]);const _0x1812e4=Object['keys'](_0x75fa9d)[_0x1986e9(0x3d5)](_0x3b8c05=>{const _0x414c66=_0x1986e9;if(_0x2b5176['has'](_0x3b8c05))return![];if(_0x47c488[_0x414c66(0x34a)](_0x3b8c05))return![];if(_0x4552e0[_0x414c66(0x34a)](_0x3b8c05))return![];return!![];});if(_0x2a37a2===_0x1986e9(0x2f6)&&_0x1812e4[_0x1986e9(0x4e2)]>0x0)throw new Error('Route\x20'+_0x2fb871[_0x1986e9(0x1b1)]+'\x20'+_0x2fb871[_0x1986e9(0x4d4)]+'\x20has\x20unbound\x20input\x20fields\x20with\x20bodyMode:none:\x20'+_0x1812e4[_0x1986e9(0x2c7)](',\x20'));}function _0x22696e(_0x3007fc){if(Array['isArray'](_0x3007fc))return _0x3007fc;if(_0x3007fc==null)return[];return[_0x3007fc];}function _0x534737(_0x3ae1ab,_0x58ba4c){const _0x5488ed=_0x151c84;return _0x22696e(_0x3ae1ab?.[_0x5488ed(0x1f7)])[_0x5488ed(0x3b7)](_0x58ba4c);}function _0x456b5c(_0x2649f7,_0x4c315e){const _0x4ad08e=_0x151c84;if(_0x2649f7==null||typeof _0x2649f7!==_0x4ad08e(0x3c1))return _0x2649f7;const _0x230932=_0x22696e(_0x4c315e?.[_0x4ad08e(0x1f7)]);if(_0x230932[_0x4ad08e(0x4e2)]===0x0)return _0x2649f7;if(_0x230932[_0x4ad08e(0x3b7)](_0x4ad08e(0x3d4))&&_0x2649f7===_0x4ad08e(0x3d4))return null;if(_0x230932['includes'](_0x4ad08e(0x37f))){if(_0x2649f7===_0x4ad08e(0x296))return!![];if(_0x2649f7==='false')return![];}if(_0x230932[_0x4ad08e(0x3b7)](_0x4ad08e(0x202))&&/^-?\d+$/['test'](_0x2649f7))return Number['parseInt'](_0x2649f7,0xa);if(_0x230932[_0x4ad08e(0x3b7)](_0x4ad08e(0x44a))&&/^-?(?:\d+|\d*\.\d+)$/['test'](_0x2649f7))return Number(_0x2649f7);return _0x2649f7;}function _0x4b88a9(_0x4404c6){return _0x2f0157(_0x4404c6);}function _0x49630e(_0x5e84a5,_0x459409={},_0x43be0b={},_0x569f0f=null,_0x162b79={}){const _0x2003dc=_0x151c84,_0x7fafed=_0x5e84a5?.[_0x2003dc(0x3c8)];if(!_0x7fafed?.[_0x2003dc(0x16c)]||!_0x7fafed[_0x2003dc(0x57a)])return null;const _0x35aedd=_0x7fafed['inputSchema'][_0x2003dc(0x371)]||{},_0x548ba3=_0x7fafed[_0x2003dc(0x48f)]?.[_0x2003dc(0x5ee)]?.['properties']||{},_0x3b5e80=_0x7fafed['http']?.[_0x2003dc(0x5ea)]||{},_0x31f33a=new Set((_0x7fafed[_0x2003dc(0x569)]||[])['map'](_0x37aa07=>_0x37aa07[_0x2003dc(0x44d)])),_0x1b86b5=new Set(Object['keys'](_0x548ba3)),_0x30ec6c={};for(const [_0x1730ee,_0x329483]of Object['entries'](_0x35aedd)){Object['prototype']['hasOwnProperty']['call'](_0x329483||{},_0x2003dc(0x429))&&(_0x30ec6c[_0x1730ee]=_0x4b88a9(_0x329483[_0x2003dc(0x429)]));}for(const _0x34246b of _0x7fafed[_0x2003dc(0x569)]||[]){if(!Object[_0x2003dc(0x699)][_0x2003dc(0x689)][_0x2003dc(0x50a)](_0x459409,_0x34246b[_0x2003dc(0x44d)]))continue;const _0x55acd6=_0x35aedd[_0x34246b[_0x2003dc(0x44d)]]||{};_0x30ec6c[_0x34246b['name']]=_0x456b5c(_0x459409[_0x34246b[_0x2003dc(0x44d)]],_0x55acd6);}for(const [_0x116b91,_0x3cf706]of Object['entries'](_0x548ba3)){if(!Object[_0x2003dc(0x699)][_0x2003dc(0x689)][_0x2003dc(0x50a)](_0x43be0b,_0x116b91))continue;_0x30ec6c[_0x116b91]=_0x456b5c(_0x43be0b[_0x116b91],_0x3cf706||_0x35aedd[_0x116b91]||{});}for(const [_0x5c9b1b,_0x18eac8]of Object[_0x2003dc(0x65b)](_0x3b5e80)){if(typeof _0x18eac8!=='string')continue;let _0x2408cb;if(_0x18eac8[_0x2003dc(0x15f)](_0x2003dc(0x4e7)))_0x2408cb=_0x459409[_0x18eac8[_0x2003dc(0x149)](0x7)];else{if(_0x18eac8[_0x2003dc(0x15f)](_0x2003dc(0x41d)))_0x2408cb=_0x43be0b[_0x18eac8[_0x2003dc(0x149)](0x6)];else{if(_0x18eac8==='body')_0x2408cb=_0x569f0f;else{if(_0x18eac8['startsWith'](_0x2003dc(0x433)))_0x2408cb=_0x569f0f?.[_0x18eac8[_0x2003dc(0x149)](0x5)];else{if(_0x18eac8['startsWith']('headers.'))_0x2408cb=_0x162b79?.[_0x18eac8[_0x2003dc(0x149)](0x8)[_0x2003dc(0x246)]()]??_0x162b79?.[_0x18eac8['slice'](0x8)];}}}}if(_0x2408cb!==undefined)_0x30ec6c[_0x5c9b1b]=_0x2408cb;}const _0x39dda7=_0x7fafed[_0x2003dc(0x48f)]?.[_0x2003dc(0x3ee)];if(_0x39dda7!=='none'&&_0x39dda7!=='raw'&&_0x569f0f!=null){if(_0x39dda7===_0x2003dc(0x652))for(const [_0x44ed61,_0x3e7410]of Object['entries'](_0x35aedd)){if(_0x31f33a['has'](_0x44ed61)||_0x1b86b5[_0x2003dc(0x34a)](_0x44ed61)||Object[_0x2003dc(0x699)]['hasOwnProperty'][_0x2003dc(0x50a)](_0x3b5e80,_0x44ed61))continue;if(Object[_0x2003dc(0x699)][_0x2003dc(0x689)][_0x2003dc(0x50a)](_0x569f0f,_0x44ed61))_0x30ec6c[_0x44ed61]=_0x569f0f[_0x44ed61];else{if(_0x534737(_0x3e7410,_0x2003dc(0x652)))_0x30ec6c[_0x44ed61]=_0x569f0f;}}else for(const [_0x4c573a,_0x49a95a]of Object['entries'](_0x569f0f)){if(_0x31f33a['has'](_0x4c573a)||_0x1b86b5[_0x2003dc(0x34a)](_0x4c573a)||Object[_0x2003dc(0x699)][_0x2003dc(0x689)][_0x2003dc(0x50a)](_0x3b5e80,_0x4c573a))continue;_0x30ec6c[_0x4c573a]=_0x49a95a;}}return _0x30ec6c;}function _0x4c9e6f(_0x2488bc,_0xf0f2ad,_0x526db5,_0x4fde86){const _0x15bd76=_0x151c84;if(!_0xf0f2ad)return;const _0x1c920e=_0x22696e(_0xf0f2ad[_0x15bd76(0x1f7)]);if(_0x2488bc===undefined)return;if(_0x2488bc===null){_0x1c920e[_0x15bd76(0x4e2)]>0x0&&!_0x1c920e[_0x15bd76(0x3b7)](_0x15bd76(0x3d4))&&_0x4fde86[_0x15bd76(0x3fd)]({'field':_0x526db5,'message':'must\x20not\x20be\x20null','expected':_0x1c920e[_0x15bd76(0x2c7)]('|'),'actual':null});return;}if(_0x1c920e[_0x15bd76(0x4e2)]===0x0)return;const _0x21ae55=_0x1c920e['some'](_0x276bae=>{const _0x52577a=_0x15bd76;switch(_0x276bae){case _0x52577a(0x3c1):return typeof _0x2488bc===_0x52577a(0x3c1);case _0x52577a(0x202):return Number['isInteger'](_0x2488bc);case _0x52577a(0x44a):return typeof _0x2488bc===_0x52577a(0x44a)&&Number[_0x52577a(0x5e1)](_0x2488bc);case _0x52577a(0x37f):return typeof _0x2488bc===_0x52577a(0x37f);case _0x52577a(0x652):return _0x2488bc&&typeof _0x2488bc===_0x52577a(0x652)&&!Array['isArray'](_0x2488bc);case _0x52577a(0x312):return Array['isArray'](_0x2488bc);case _0x52577a(0x3d4):return _0x2488bc===null;default:return!![];}});if(!_0x21ae55){_0x4fde86[_0x15bd76(0x3fd)]({'field':_0x526db5,'message':_0x15bd76(0x21e)+_0x1c920e[_0x15bd76(0x2c7)]('|'),'expected':_0x1c920e[_0x15bd76(0x2c7)]('|'),'actual':_0x2488bc});return;}Array[_0x15bd76(0x478)](_0x2488bc)&&_0xf0f2ad[_0x15bd76(0x1eb)]&&_0x2488bc[_0x15bd76(0x442)]((_0x5cd3b0,_0x2143fe)=>_0x4c9e6f(_0x5cd3b0,_0xf0f2ad[_0x15bd76(0x1eb)],_0x526db5+'['+_0x2143fe+']',_0x4fde86));}function _0x913ef3(_0x17c9fa,_0x1f5f24){const _0x39edce=_0x151c84,_0x143478=_0x17c9fa?.[_0x39edce(0x3c8)];if(!_0x143478?.[_0x39edce(0x16c)]||!_0x143478[_0x39edce(0x57a)])return null;const _0x45b86b=_0x143478['inputSchema'],_0x3d85cb=_0x45b86b[_0x39edce(0x371)]||{},_0x504445=new Set(_0x45b86b[_0x39edce(0x54c)]||[]),_0x33f21a=[];for(const _0x3f9dad of _0x504445){_0x1f5f24[_0x3f9dad]===undefined&&_0x33f21a['push']({'field':_0x3f9dad,'message':_0x39edce(0x686),'expected':'present','actual':undefined});}if(_0x45b86b[_0x39edce(0x161)]===![])for(const _0x3b46d4 of Object[_0x39edce(0x5fb)](_0x1f5f24||{})){!Object[_0x39edce(0x699)][_0x39edce(0x689)]['call'](_0x3d85cb,_0x3b46d4)&&_0x33f21a['push']({'field':_0x3b46d4,'message':_0x39edce(0x369),'expected':_0x39edce(0x626),'actual':_0x1f5f24[_0x3b46d4]});}for(const [_0x28f789,_0x59a3c5]of Object[_0x39edce(0x65b)](_0x3d85cb)){_0x4c9e6f(_0x1f5f24[_0x28f789],_0x59a3c5,_0x28f789,_0x33f21a);}if(_0x33f21a[_0x39edce(0x4e2)]===0x0)return null;return{'code':_0x39edce(0x502),'errors':_0x33f21a};}function _0x15feca(_0x21fd70=[]){const _0x3f0fd3=_0x151c84;if(!Array['isArray'](_0x21fd70)||_0x21fd70['length']===0x0)return null;const _0xe23b08=_0x21fd70[_0x3f0fd3(0x149)](0x0,0x3)['map']((_0x48b104={})=>{const _0x1b8e60=_0x3f0fd3,_0x515839=_0x48b104[_0x1b8e60(0x1d6)]?_0x48b104['field']+'\x20':'';return(''+_0x515839+(_0x48b104[_0x1b8e60(0x69b)]||_0x1b8e60(0x46c)))[_0x1b8e60(0x2c3)]();})[_0x3f0fd3(0x2c7)](';\x20');return _0x21fd70[_0x3f0fd3(0x4e2)]>0x3?_0xe23b08+_0x3f0fd3(0x14f)+(_0x21fd70[_0x3f0fd3(0x4e2)]-0x3)+'\x20more)':_0xe23b08;}function _0x3aa9c2(_0x569d5c,_0x47f8f8={}){const _0x3e9e4c=_0x151c84,_0x5cbea1=_0x47f8f8?.['result']?.[_0x3e9e4c(0x5bb)]??_0x47f8f8?.[_0x3e9e4c(0x5bb)]??_0x3e9e4c(0x3d2),_0x1c5e17=_0x47f8f8?.[_0x3e9e4c(0x2dd)]?.['details']??_0x47f8f8?.['details']??_0x5cbea1?.['details']??null,_0x1980e4=_0x47f8f8?.[_0x3e9e4c(0x2dd)]?.[_0x3e9e4c(0x2f9)]??_0x47f8f8?.[_0x3e9e4c(0x2f9)]??_0x5cbea1?.[_0x3e9e4c(0x2f9)]??null,_0x524d71=_0x47f8f8?.[_0x3e9e4c(0x2dd)]?.[_0x3e9e4c(0x69b)]??_0x47f8f8?.['message']??_0x5cbea1?.[_0x3e9e4c(0x69b)]??null,_0x325d8f=typeof _0x5cbea1===_0x3e9e4c(0x3c1)?_0x5cbea1:null,_0x233bcb=typeof _0x325d8f===_0x3e9e4c(0x3c1)&&/^[A-Z0-9_]+$/[_0x3e9e4c(0x38c)](_0x325d8f),_0x14df1e=_0x1980e4??(_0x233bcb?_0x325d8f:null)??(_0xb8deee[_0x569d5c]||_0x3e9e4c(0x6cb)+_0x569d5c);let _0x3c26e2=_0x524d71;!_0x3c26e2&&typeof _0x325d8f===_0x3e9e4c(0x3c1)&&!_0x233bcb&&(_0x3c26e2=_0x325d8f);if(!_0x3c26e2&&_0x14df1e===_0x3e9e4c(0x502)){const _0x4f452d=_0x15feca(_0x1c5e17);_0x3c26e2=_0x4f452d?_0x3e9e4c(0x3a4)+_0x4f452d:_0x3e9e4c(0x51f);}if(!_0x3c26e2&&Array['isArray'](_0x1c5e17)&&_0x1c5e17[_0x3e9e4c(0x4e2)]>0x0){const _0x572ae1=_0x15feca(_0x1c5e17);if(_0x572ae1)_0x3c26e2=_0x572ae1;}if(!_0x3c26e2)_0x3c26e2=_0xb8deee[_0x569d5c]||'Unknown\x20error';const _0x4980b8={'code':_0x14df1e,'message':_0x3c26e2};if(_0x1c5e17!=null)_0x4980b8[_0x3e9e4c(0x52d)]=_0x1c5e17;return _0x4980b8;}function _0x203b6c(_0xcb9881){const _0x85dcdc=_0x151c84,_0xa13a84={};if(!_0xcb9881)return _0xa13a84;for(const _0xd75faf of _0xcb9881[_0x85dcdc(0x428)](';')){const _0x6af5d9=_0xd75faf['indexOf']('=');if(_0x6af5d9===-0x1)continue;const _0x457db2=_0xd75faf[_0x85dcdc(0x149)](0x0,_0x6af5d9)[_0x85dcdc(0x2c3)](),_0x2d0e75=_0xd75faf[_0x85dcdc(0x149)](_0x6af5d9+0x1)[_0x85dcdc(0x2c3)]();_0xa13a84[_0x457db2]=decodeURIComponent(_0x2d0e75);}return _0xa13a84;}function _0x4b8a11(_0xa17fbd,_0x40cd92){const _0x6850bb=_0x151c84;return _0x40cd92=_0x19e963(_0x40cd92),{'status':_0x40cd92[_0x6850bb(0x4f0)]??_0xa17fbd['status'],'headers':{..._0xa17fbd[_0x6850bb(0x4eb)]||{},..._0x40cd92[_0x6850bb(0x4eb)]||{}},'body':_0x40cd92[_0x6850bb(0x553)]??_0xa17fbd[_0x6850bb(0x553)]};}function _0x18bc84(_0xa583ab={}){const _0x1cab23=_0x151c84;return _0xa583ab[_0x1cab23(0x37d)]||(_0xa583ab[_0x1cab23(0x2fd)]?_0x1cab23(0x2fd):_0x1cab23(0x48f));}function _0x3d833f(_0x3411bb){const _0xce7724=_0x151c84;if(_0x3411bb[_0xce7724(0x509)]?.['internal']===!![])return!![];if(_0x3411bb[_0xce7724(0x509)]?.['auth']?.[_0xce7724(0x3ce)]===!![])return!![];if(_0x3411bb[_0xce7724(0x509)]?.[_0xce7724(0x5c3)]?.['ok']===!![])return!![];return![];}function _0xbfd361(_0x1710e8,_0x554d6a){const _0x36fe93=_0x151c84,_0x2eb89c=_0x554d6a[_0x36fe93(0x428)]('.');let _0x388c51=_0x1710e8;for(const _0x436992 of _0x2eb89c){_0x388c51=_0x388c51?.[_0x436992];}return _0x388c51||null;}class _0x2a9613{constructor(){const _0x4c6f75=_0x151c84;this[_0x4c6f75(0x3d8)]=[],this['guards']=[],this[_0x4c6f75(0x1f4)]=[],this[_0x4c6f75(0x420)]=0x5*0x400*0x400,this[_0x4c6f75(0x287)]=null,this[_0x4c6f75(0x463)]=new Set(),this[_0x4c6f75(0x5c3)]={'cookieName':_0x4c6f75(0x5da),'stateCookieName':_0x4c6f75(0x692),'csrfCookieName':_0x4c6f75(0x233)},this[_0x4c6f75(0x620)]={},this[_0x4c6f75(0x696)]=new Map(),this[_0x4c6f75(0x649)]=null,this[_0x4c6f75(0x160)]=null,this[_0x4c6f75(0x577)]=new Map(),this['metrics']=new _0xc440d7(),this[_0x4c6f75(0x31c)]=![],this[_0x4c6f75(0x31b)]=0x0;}[_0x151c84(0x4a7)](_0x1350fc={}){const _0x252493=_0x151c84;return this['_authOptions']=_0x1350fc||{},this[_0x252493(0x32f)]=_0x1350fc['mode']??_0x252493(0x5a7),this[_0x252493(0x620)];}get['isSetupMode'](){const _0x1366b0=_0x151c84;if(this[_0x1366b0(0x377)]?.[_0x1366b0(0x5c3)])return this[_0x1366b0(0x377)]['auth']['isSetupMode'];return![];}['getAuthOptions'](){const _0x3de8dc=_0x151c84;if(this['_okdb']?.[_0x3de8dc(0x5c3)])return this['_okdb'][_0x3de8dc(0x5c3)][_0x3de8dc(0x3c0)]();return this['_authOptions']||{};}[_0x151c84(0x440)](_0x104d91){const _0x65df66=_0x151c84;this[_0x65df66(0x3d8)][_0x65df66(0x3fd)](_0x104d91);}['guard'](_0x540dda,_0x59795f){const _0x164b16=_0x151c84;this[_0x164b16(0x28d)][_0x164b16(0x3fd)]({'match':_0x540dda,'handler':_0x59795f});}[_0x151c84(0x5de)](_0x5f15fe,_0x1a6634,_0x42c6ae,_0x2d1045={}){const _0x240bcc=_0x151c84,_0x15ae48={'method':_0x15e83c(_0x5f15fe),'path':_0x1a6634,'matcher':_0x1e319f(_0x1a6634),'handler':_0x42c6ae,'meta':_0x2d1045||{}},_0x556f29=_0x577bd7(_0x15ae48);_0x500e7b(_0x15ae48,_0x556f29),_0x15ae48[_0x240bcc(0x3c8)]=_0x556f29,_0x15ae48[_0x240bcc(0x364)]=this['_userPhase']===!![];if(_0x15ae48[_0x240bcc(0x364)])this[_0x240bcc(0x31b)]++;this['routes'][_0x240bcc(0x3fd)](_0x15ae48);}[_0x151c84(0x33e)](_0x14adf1,_0xff7817,_0x2d201f,_0xdb7364={}){const _0x3db529=_0x151c84;this[_0x3db529(0x5de)](_0x14adf1,_0xff7817,_0x2d201f,{..._0xdb7364,'raw':!![]});}[_0x151c84(0x3f5)](_0x5290da,_0x591fab){const _0x4d6586=_0x151c84;for(const _0x484d0a of this['routes']){if(_0x484d0a[_0x4d6586(0x1b1)]!==_0x15e83c(_0x5290da))continue;if(_0x484d0a[_0x4d6586(0x30a)]['regex'][_0x4d6586(0x38c)](_0x591fab))return _0x484d0a;}if(_0x15e83c(_0x5290da)===_0x4d6586(0x348))for(const _0x1bea35 of this['routes']){if(_0x1bea35[_0x4d6586(0x30a)][_0x4d6586(0x26a)][_0x4d6586(0x38c)](_0x591fab)&&_0x1bea35[_0x4d6586(0x423)]?.[_0x4d6586(0x527)])return _0x1bea35;}return null;}[_0x151c84(0x673)](_0x35150b,_0x7f1dfd){const _0x285630=_0x151c84;if(_0x35150b?.['meta']?.['rawResponse'])return![];if(_0x7f1dfd?.[_0x285630(0x4eb)]?.[_0x285630(0x4c0)])return![];return!![];}[_0x151c84(0x627)](){const _0x5c410a=_0x151c84;return this[_0x5c410a(0x1f4)][_0x5c410a(0x3d5)](_0x5151fe=>!_0x5151fe[_0x5c410a(0x423)]?.['hidden'])[_0x5c410a(0x145)](_0x39c8ae=>({'method':_0x39c8ae[_0x5c410a(0x1b1)],'path':_0x39c8ae[_0x5c410a(0x4d4)],'defaults':_0x39c8ae[_0x5c410a(0x30a)][_0x5c410a(0x636)],'meta':_0x39c8ae[_0x5c410a(0x423)],'operation':_0x39c8ae['operation']}));}[_0x151c84(0x2df)](_0x20fb53,_0xcfd2da,_0x22e840={}){const _0x45de8e=_0x151c84,{PassThrough:_0x3788ce}=require$$8;this[_0x45de8e(0x5de)](_0x45de8e(0x325),_0x20fb53,({params:_0x27d9eb,query:_0xa2fc71,headers:_0x534dac,context:_0x2a2152})=>{const _0x379253=_0x45de8e,_0xe276f9=new _0x3788ce();let _0x154d56=null;const _0x2091ec={};try{_0x2a2152?.[_0x379253(0x19d)]?.['socket']?.[_0x379253(0x3fa)](!![]);}catch{}_0xe276f9[_0x379253(0x1d5)](_0x379253(0x574)),_0x154d56=setInterval(()=>{const _0x4dfb83=_0x379253;try{_0xe276f9[_0x4dfb83(0x1d5)](_0x4dfb83(0x3c2));}catch{}},0x3a98);const _0x294147=(_0x18a87c,_0x14ec80,_0x3157de={})=>{const _0x5bd89a=_0x379253;try{const _0x266bc7=_0x3157de['raw']?String(_0x14ec80??''):JSON[_0x5bd89a(0x6ae)](_0x14ec80);_0x3157de['id']!=null&&_0xe276f9[_0x5bd89a(0x1d5)](_0x5bd89a(0x1d8)+_0x3157de['id']+'\x0a');_0xe276f9[_0x5bd89a(0x1d5)](_0x5bd89a(0x4ac)+_0x18a87c+'\x0a');for(const _0x321f60 of _0x266bc7[_0x5bd89a(0x428)]('\x0a')){_0xe276f9['write'](_0x5bd89a(0x1cd)+_0x321f60+'\x0a');}_0xe276f9[_0x5bd89a(0x1d5)]('\x0a');}catch{}},_0x34de81=()=>{const _0x477626=_0x379253;_0x154d56&&(clearInterval(_0x154d56),_0x154d56=null);try{_0xe276f9[_0x477626(0x322)]();}catch{}},_0x265299=(_0x23f813,_0x86b3cf)=>{_0x2091ec[_0x23f813]=_0x86b3cf;};_0x2a2152?.[_0x379253(0x19d)]?.['on'](_0x379253(0x5f3),_0x34de81),_0xe276f9['on'](_0x379253(0x5f3),_0x34de81);const _0xb7ee97=_0xcfd2da({'send':_0x294147,'close':_0x34de81,'params':_0x27d9eb??{},'query':_0xa2fc71??{},'headers':_0x534dac??{},'context':_0x2a2152,'setHeader':_0x265299});return typeof _0xb7ee97===_0x379253(0x318)&&_0xe276f9['on']('close',_0xb7ee97),{'status':0xc8,'headers':{'content-type':_0x379253(0x4fc),'cache-control':'no-cache,\x20no-transform','connection':_0x379253(0x61b),'x-accel-buffering':'no',..._0x2091ec},'body':_0xe276f9};},{..._0x22e840,'sse':!![]});}async[_0x151c84(0x600)](_0x310195,_0x16fc75){const _0x3a7623=_0x151c84;for(const _0x4e8765 of this[_0x3a7623(0x28d)]){if(!_0x4e8765[_0x3a7623(0x342)](_0x310195))continue;const _0x3fe11d=await _0x4e8765[_0x3a7623(0x518)](_0x310195,_0x16fc75);if(_0x3fe11d===![])return![];}return!![];}async['_runMiddlewares'](_0x5c7789,_0x24d5e5,_0x102fed){let _0x192b17=0x0;const _0x3282f2=async()=>{const _0x3da79a=_0x1da2,_0x433046=this[_0x3da79a(0x3d8)][_0x192b17++];if(!_0x433046)return _0x102fed();return _0x433046(_0x5c7789,_0x24d5e5,_0x3282f2);};return _0x3282f2();}[_0x151c84(0x4cc)](_0x13bdf6,_0x4c733a){const _0x7d613f=_0x151c84,{status:status=0xc8,headers:headers={},body:_0x3bb82b}=_0x13bdf6;if(status>=0x12c&&status<0x190)return _0x13bdf6;if(_0xed8590(_0x3bb82b))return _0x13bdf6;if(Buffer['isBuffer'](_0x3bb82b))return _0x13bdf6;if(typeof _0x3bb82b==='string')return _0x13bdf6;const _0x172ace={'time':+_0x4c733a[_0x7d613f(0x367)](0x2)};if(_0x3bb82b?.[_0x7d613f(0x423)]&&typeof _0x3bb82b[_0x7d613f(0x423)]===_0x7d613f(0x652)){const {time:_0x19ef40,..._0x1c03bd}=_0x3bb82b[_0x7d613f(0x423)];Object[_0x7d613f(0x4b9)](_0x172ace,_0x1c03bd);}let _0x8cc896;if(status>=0x190){const _0x5dabb3=_0x3aa9c2(status,_0x3bb82b);_0x8cc896={'data':null,'error':_0x5dabb3,'meta':_0x172ace};}else{if(status===0xcc||_0x3bb82b==null)_0x8cc896={'data':null,'error':null,'meta':_0x172ace};else{let _0x4eb5e5;if(_0x7d613f(0x2dd)in _0x3bb82b)_0x4eb5e5=_0x3bb82b['result'];else{const {meta:_0xab63af,..._0x1f94e5}=_0x3bb82b;_0x4eb5e5=Object['keys'](_0x1f94e5)[_0x7d613f(0x4e2)]>0x0?_0x1f94e5:null;}_0x8cc896={'data':_0x4eb5e5,'error':null,'meta':_0x172ace};}}return{'status':status===0xcc?0xc8:status,'headers':headers,'body':_0x8cc896};}async[_0x151c84(0x4fd)](_0x481a93,_0x1fa93d,_0x290960={},_0x4c4812={}){const _0x55e0ef=_0x151c84;_0x481a93=_0x15e83c(_0x481a93);const _0x54c62b=this[_0x55e0ef(0x3f5)](_0x481a93,_0x1fa93d),_0x5d12bd={'method':_0x481a93,'path':_0x1fa93d,'headers':_0x290960[_0x55e0ef(0x4eb)]??{},'body':_0x290960[_0x55e0ef(0x553)]??null,'query':_0x290960['query']??{},'context':_0x4c4812,'cookies':_0x203b6c(_0x290960[_0x55e0ef(0x4eb)]?.['cookie']),'route':_0x54c62b,'socket':{'remoteAddress':_0x290960[_0x55e0ef(0x295)]??_0x55e0ef(0x297)}};_0x5d12bd[_0x55e0ef(0x509)]=_0x5d12bd[_0x55e0ef(0x509)]||{};!_0x5d12bd[_0x55e0ef(0x509)][_0x55e0ef(0x5c3)]&&(_0x5d12bd[_0x55e0ef(0x509)][_0x55e0ef(0x5c3)]=await this[_0x55e0ef(0x5b8)](_0x5d12bd));if(_0x5d12bd[_0x55e0ef(0x509)][_0x55e0ef(0x5c3)]?.[_0x55e0ef(0x18a)])return _0x19e963({'status':0x193,'body':{'error':{'code':_0x55e0ef(0x3a3),'message':_0x55e0ef(0x5dd)}}});_0x5d12bd[_0x55e0ef(0x509)]['auth']?.[_0x55e0ef(0x359)]&&!_0x5d12bd[_0x55e0ef(0x509)][_0x55e0ef(0x359)]&&(_0x5d12bd[_0x55e0ef(0x509)]['user']=_0x5d12bd['context'][_0x55e0ef(0x5c3)][_0x55e0ef(0x359)]);let _0x5de20e=null;const _0x570da1={'status'(_0x487c5b){const _0x1dd768=_0x55e0ef;_0x5de20e=_0x5de20e||{},_0x5de20e[_0x1dd768(0x4f0)]=_0x487c5b;},'setHeader'(_0x53513c,_0x1f43cd){const _0x554009=_0x55e0ef;_0x5de20e=_0x5de20e||{},_0x5de20e[_0x554009(0x4eb)]=_0x5de20e['headers']||{};const _0x3bd2d0=String(_0x53513c)['toLowerCase']();if(_0x3bd2d0===_0x554009(0x4bc)){const _0x4b20fb=_0x5de20e[_0x554009(0x4eb)][_0x53513c];if(!_0x4b20fb)_0x5de20e[_0x554009(0x4eb)][_0x53513c]=_0x1f43cd;else{if(Array[_0x554009(0x478)](_0x4b20fb))_0x4b20fb[_0x554009(0x3fd)](_0x1f43cd);else _0x5de20e[_0x554009(0x4eb)][_0x53513c]=[_0x4b20fb,_0x1f43cd];}return;}_0x5de20e[_0x554009(0x4eb)][_0x53513c]=_0x1f43cd;},'send'(_0x47a94a){const _0x48188b=_0x55e0ef;_0x5de20e=_0x5de20e||{},_0x5de20e[_0x48188b(0x553)]=_0x47a94a;}},_0x3d592d=await this[_0x55e0ef(0x600)](_0x5d12bd,_0x570da1);if(!_0x3d592d)return _0x19e963(_0x5de20e??{'status':0x193});const _0xed5df0=this['_enforceOperationAccess'](_0x5d12bd);if(_0xed5df0)return _0x19e963(_0xed5df0);const _0x37d0a0=this[_0x55e0ef(0x6d3)](_0x5d12bd);if(_0x37d0a0)return _0x19e963(_0x37d0a0);return await this[_0x55e0ef(0x1c9)](_0x5d12bd,_0x570da1,async()=>{const _0x23aa64=await this['_dispatch'](_0x5d12bd);if(_0x5de20e==null){_0x5de20e=_0x23aa64;return;}_0x5de20e=_0x4b8a11(_0x5de20e,_0x23aa64);}),_0x19e963(_0x5de20e);}[_0x151c84(0x370)](_0x396759){const _0x1717f0=_0x151c84,_0x17a611=_0x396759[_0x1717f0(0x317)]?.[_0x1717f0(0x3c8)],_0x41ce92=_0x17a611?.[_0x1717f0(0x56f)];if(!_0x17a611?.[_0x1717f0(0x16c)]||!_0x41ce92)return null;if(_0x396759['context']?.['auth']?.['open']===!![]||_0x396759['context']?.['auth']?.[_0x1717f0(0x36a)]===!![])return null;const _0x532623=_0x18bc84(_0x396759[_0x1717f0(0x509)]),_0x394d46=Array[_0x1717f0(0x478)](_0x41ce92[_0x1717f0(0x221)])?_0x41ce92[_0x1717f0(0x221)]:null;if(_0x41ce92['internalOnly']&&_0x396759[_0x1717f0(0x509)]?.[_0x1717f0(0x2fd)]!==!![])return{'status':0x193,'body':{'error':_0x1717f0(0x5db)}};if(_0x394d46&&_0x394d46['length']>0x0&&!_0x394d46[_0x1717f0(0x3b7)](_0x532623)&&!(_0x532623===_0x1717f0(0x2fd)&&_0x394d46['includes'](_0x1717f0(0x2cd))))return{'status':0x193,'body':{'error':'Forbidden'}};if(_0x41ce92[_0x1717f0(0x37b)]&&!_0x3d833f(_0x396759))return{'status':0x191,'body':{'error':_0x1717f0(0x645)}};const _0x128488=_0x41ce92[_0x1717f0(0x272)];if(!_0x128488)return null;if(_0x396759['context']?.[_0x1717f0(0x5c3)]?.[_0x1717f0(0x1f7)]===_0x1717f0(0x2bd))return null;const _0x4895d3=_0x396759['context']?.[_0x1717f0(0x5c3)]?.[_0x1717f0(0x612)];if(!_0x4895d3){if(_0x396759['context']?.[_0x1717f0(0x5c3)]?.['ok']===!![])return null;return{'status':0x193,'body':{'error':'Forbidden\x20—\x20no\x20permissions\x20available'}};}if(!_0x396759[_0x1717f0(0x2d4)]&&_0x396759[_0x1717f0(0x317)]?.[_0x1717f0(0x30a)]){const _0x30c515=_0x396759['route'][_0x1717f0(0x30a)]['regex'][_0x1717f0(0x1be)](_0x396759[_0x1717f0(0x4d4)]);_0x30c515&&(_0x396759[_0x1717f0(0x2d4)]={},_0x396759[_0x1717f0(0x317)][_0x1717f0(0x30a)][_0x1717f0(0x5fb)][_0x1717f0(0x442)]((_0x166148,_0xe94d98)=>{const _0x5c07df=_0x1717f0,_0x13d270=_0x30c515[_0xe94d98+0x1];_0x396759[_0x5c07df(0x2d4)][_0x166148]=_0x13d270?decodeURIComponent(_0x13d270):_0x396759[_0x5c07df(0x317)][_0x5c07df(0x30a)][_0x5c07df(0x636)][_0x166148]??undefined;}));}let _0x59fc6d=null;_0x41ce92[_0x1717f0(0x544)]?.[_0x1717f0(0x5c4)]&&(_0x59fc6d=_0xbfd361(_0x396759,_0x41ce92[_0x1717f0(0x544)][_0x1717f0(0x5c4)]));if(_0x59fc6d&&_0x59fc6d[_0x1717f0(0x15f)]('~')){const _0x4d419f=_0x28a770(_0x128488),_0xaad88c=_0x104275(_0x4895d3[_0x1717f0(0x2c4)]||[],(_0x4895d3[_0x1717f0(0x40f)]||{})[_0x59fc6d]||[]);if(!_0x2d2fc6(_0xaad88c,_0x4d419f))return{'status':0x193,'body':{'error':_0x1717f0(0x477)+_0x4d419f+'\x20for\x20system\x20env'}};}const _0x5c6750=_0x104275(_0x4895d3[_0x1717f0(0x2c4)]||[],_0x59fc6d?(_0x4895d3[_0x1717f0(0x40f)]||{})[_0x59fc6d]||[]:[]);if(!_0x2d2fc6(_0x5c6750,_0x128488))return{'status':0x193,'body':{'error':_0x1717f0(0x477)+_0x128488}};return null;}[_0x151c84(0x6d3)](_0x1f7e05){const _0x37d38a=_0x151c84,_0x35a577=_0x1f7e05['route'],_0x1b5db3=_0x35a577?.[_0x37d38a(0x3c8)];if(!_0x1b5db3?.[_0x37d38a(0x16c)]||!_0x1b5db3[_0x37d38a(0x57a)])return null;let _0x24d963=_0x1f7e05[_0x37d38a(0x2d4)]??null;if(!_0x24d963&&_0x35a577?.[_0x37d38a(0x30a)]){const _0x3e8cb4=_0x35a577[_0x37d38a(0x30a)][_0x37d38a(0x26a)][_0x37d38a(0x1be)](_0x1f7e05[_0x37d38a(0x4d4)]);_0x3e8cb4&&(_0x24d963={},_0x35a577[_0x37d38a(0x30a)]['keys']['forEach']((_0x31b95b,_0x128916)=>{const _0x5256f1=_0x37d38a,_0xcb5a72=_0x3e8cb4[_0x128916+0x1];_0x24d963[_0x31b95b]=_0xcb5a72?decodeURIComponent(_0xcb5a72):_0x35a577['matcher'][_0x5256f1(0x636)][_0x31b95b]??undefined;}));}const _0x4a3c05=_0x49630e(_0x35a577,_0x24d963??{},_0x1f7e05[_0x37d38a(0x191)]??{},_0x1f7e05[_0x37d38a(0x553)],_0x1f7e05[_0x37d38a(0x4eb)]??{}),_0x59811a=_0x913ef3(_0x35a577,_0x4a3c05||{});if(!_0x59811a)return null;const _0x368e94=_0x15feca(_0x59811a[_0x37d38a(0x4c3)]);return{'status':0x190,'body':{'error':_0x59811a[_0x37d38a(0x2f9)],'code':_0x59811a['code'],'message':_0x368e94?'Validation\x20failed:\x20'+_0x368e94:_0x37d38a(0x51f),'details':_0x59811a[_0x37d38a(0x4c3)]}};}['validateRouteInput'](_0x1dc1c7,_0x1efc12){const _0x28ef53=_0x151c84,_0x405953=_0x913ef3(_0x1dc1c7,_0x1efc12||{});if(!_0x405953)return null;return{'code':_0x405953[_0x28ef53(0x2f9)],'message':_0x15feca(_0x405953[_0x28ef53(0x4c3)])?_0x28ef53(0x3a4)+_0x15feca(_0x405953['errors']):_0x28ef53(0x51f),'details':_0x405953[_0x28ef53(0x4c3)]};}async[_0x151c84(0x4a9)](_0x30996b){const _0x6b1f8b=_0x151c84;if(_0x30996b[_0x6b1f8b(0x1b1)]==='OPTIONS')for(const _0x265b67 of this[_0x6b1f8b(0x1f4)]){const _0x5ae616=_0x265b67[_0x6b1f8b(0x30a)][_0x6b1f8b(0x26a)][_0x6b1f8b(0x1be)](_0x30996b['path']);if(!_0x5ae616||!_0x265b67[_0x6b1f8b(0x423)]?.[_0x6b1f8b(0x527)])continue;return{'status':0xcc,'headers':_0x5db0c1(_0x30996b[_0x6b1f8b(0x4eb)],_0x265b67[_0x6b1f8b(0x423)][_0x6b1f8b(0x527)],_0x265b67[_0x6b1f8b(0x1b1)])||{}};}for(const _0x56363f of this[_0x6b1f8b(0x1f4)]){if(_0x56363f[_0x6b1f8b(0x1b1)]!==_0x30996b[_0x6b1f8b(0x1b1)])continue;const _0x37b97a=_0x56363f[_0x6b1f8b(0x30a)][_0x6b1f8b(0x26a)]['exec'](_0x30996b[_0x6b1f8b(0x4d4)]);if(!_0x37b97a)continue;const _0x40d448={};_0x56363f[_0x6b1f8b(0x30a)]['keys'][_0x6b1f8b(0x442)]((_0x378f46,_0x53db35)=>{const _0x5b6b77=_0x6b1f8b,_0x1b8994=_0x37b97a[_0x53db35+0x1];_0x40d448[_0x378f46]=_0x1b8994?decodeURIComponent(_0x1b8994):_0x56363f[_0x5b6b77(0x30a)][_0x5b6b77(0x636)][_0x378f46]??undefined;}),_0x30996b[_0x6b1f8b(0x2d4)]=_0x40d448;try{const _0x1bff0a=await _0x56363f[_0x6b1f8b(0x518)]({'params':_0x40d448,'body':_0x30996b['body'],'query':_0x30996b['query'],'headers':_0x30996b[_0x6b1f8b(0x4eb)],'context':_0x30996b[_0x6b1f8b(0x509)]}),_0x12e7dc=_0x19e963(_0x1bff0a),_0x3bf05c=_0x5db0c1(_0x30996b['headers'],_0x56363f[_0x6b1f8b(0x423)]?.['cors'],_0x56363f[_0x6b1f8b(0x1b1)]);if(!_0x3bf05c)return _0x12e7dc;return{..._0x12e7dc,'headers':{..._0x12e7dc['headers']||{},..._0x3bf05c}};}catch(_0x414e8d){const _0x5cc2c0=_0x414e8d?.['status']||_0x2f9167[_0x414e8d?.['code']]||0x1f4;return{'status':_0x5cc2c0,'body':{'error':_0x414e8d[_0x6b1f8b(0x69b)]||_0x6b1f8b(0x3cf),'code':_0x414e8d?.['code']||_0xb8deee[_0x5cc2c0]||'HTTP_'+_0x5cc2c0,'message':_0x414e8d?.[_0x6b1f8b(0x69b)]||_0x6b1f8b(0x3cf),..._0x414e8d?.[_0x6b1f8b(0x52d)]!=null?{'details':_0x414e8d[_0x6b1f8b(0x52d)]}:{}}};}}return{'status':0x194,'body':{'error':_0x6b1f8b(0x2b1)}};}[_0x151c84(0x2da)](_0x29dca9,_0x1f7276={}){const _0x565eed=_0x151c84,_0x2ee0b4=require$$1$2,_0x3d535e=Number(_0x1f7276['workers'])||0x0,_0xf7c686=_0x1f7276['makeOkdb'],_0x408cca=_0x2ee0b4[_0x565eed(0x498)]&&(typeof _0xf7c686==='function'?_0x3d535e>0x1:_0x3d535e>=0x1);if(_0x408cca){if(this[_0x565eed(0x287)])throw new Error(_0x565eed(0x208));const {runClustered:_0x420c74}=requireOkdbCluster();if(typeof _0xf7c686===_0x565eed(0x318))return this[_0x565eed(0x287)]=_0x420c74({'workers':_0x3d535e,'makeOkdb':_0xf7c686,'port':_0x29dca9,'primaryOkdb':_0x1f7276[_0x565eed(0x2a4)]}),this['server'];const _0x24e09d=this[_0x565eed(0x377)];if(!_0x24e09d?.[_0x565eed(0x1b4)])throw new Error(_0x565eed(0x330)+_0x565eed(0x197));if(this[_0x565eed(0x31b)]>0x0){const _0x27f996=new Error(_0x565eed(0x327)+_0x3d535e+_0x565eed(0x52b)+this[_0x565eed(0x31b)]+_0x565eed(0x2fa)+_0x565eed(0x663)+_0x565eed(0x6b8)+_0x565eed(0x405)+'or\x20serve\x20single-process.');_0x27f996[_0x565eed(0x2f9)]=_0x565eed(0x48b);throw _0x27f996;}let _0x3ecbf8;try{_0x3ecbf8=JSON[_0x565eed(0x2cc)](JSON[_0x565eed(0x6ae)](_0x24e09d[_0x565eed(0x57d)]??{}));}catch(_0x3a0535){throw new Error(_0x565eed(0x21d)+_0x3a0535[_0x565eed(0x69b)]);}return this[_0x565eed(0x287)]=_0x420c74({'workers':_0x3d535e,'port':_0x29dca9,'primaryOkdb':_0x24e09d,'childEntry':!![],'workerEnv':{'OKDB_HTTP_CHILD':JSON[_0x565eed(0x6ae)]({'rootPath':_0x24e09d[_0x565eed(0x4d4)],'port':_0x29dca9,'options':_0x3ecbf8,'logLevel':_0x24e09d['options']?.[_0x565eed(0x3f2)]??_0x565eed(0x400)})}}),this['server'];}if(this[_0x565eed(0x287)])throw new Error(_0x565eed(0x208));_0x29dca9&&this[_0x565eed(0x5c3)][_0x565eed(0x384)]===_0x565eed(0x5da)&&(this[_0x565eed(0x5c3)][_0x565eed(0x384)]=_0x565eed(0x3c3)+_0x29dca9,this['_okdb']?.[_0x565eed(0x5c3)]&&(this[_0x565eed(0x377)][_0x565eed(0x5c3)]['_cookieName']=this[_0x565eed(0x5c3)][_0x565eed(0x384)]));const _0xc44f36=this['_okdb']?.['options']?.['debug']?.[_0x565eed(0x603)]??![];this['server']=_0x5b0260[_0x565eed(0x271)](async(_0x356f39,_0x543564)=>{const _0x1913fa=_0x565eed,_0xcef4a1=Date[_0x1913fa(0x263)]();if(_0xc44f36){const _0x1ceeb0=_0x356f39['url']||'/',_0x345a13=_0x356f39[_0x1913fa(0x4eb)]?.[_0x1913fa(0x67b)]?_0x356f39[_0x1913fa(0x4eb)][_0x1913fa(0x67b)][_0x1913fa(0x32d)](/^Bearer\s+(\S{0,8})\S*/i,'Bearer\x20$1…'):'-',_0xa5bc4f=_0x356f39[_0x1913fa(0x4eb)]?.['cf-ray']||'-',_0x1082e7=_0x356f39['headers']?.[_0x1913fa(0x474)]||_0x356f39['headers']?.[_0x1913fa(0x461)]||'-',_0x1fc97e=_0x356f39[_0x1913fa(0x4eb)]?.[_0x1913fa(0x346)]||'-';process[_0x1913fa(0x54a)][_0x1913fa(0x1d5)](_0x1913fa(0x3d6)+_0x356f39['method'][_0x1913fa(0x3be)](0x7)+'\x20'+_0x1ceeb0[_0x1913fa(0x3be)](0x2d)+'\x20'+(_0x1913fa(0x37a)+_0x345a13+_0x1913fa(0x471)+_0x1fc97e+_0x1913fa(0x457)+_0xa5bc4f+'\x20cf-ip='+_0x1082e7+'\x0a'));}try{const _0x5f1711=new _0x204e6d(_0x356f39['url'],_0x1913fa(0x2de)+_0x356f39[_0x1913fa(0x4eb)]['host']),_0x43d4ee=this[_0x1913fa(0x3f5)](_0x356f39[_0x1913fa(0x1b1)],_0x5f1711[_0x1913fa(0x5e3)]),_0x5007c4=_0x43d4ee?.[_0x1913fa(0x423)]?.['raw']===!![];if(_0x5007c4){const _0x16d9a9=_0x356f39[_0x1913fa(0x4eb)]?.['content-length'];if(_0x16d9a9!=null){const _0x2c5f35=Number(_0x16d9a9);if(Number[_0x1913fa(0x5e1)](_0x2c5f35)&&_0x2c5f35>this['maxBodyBytes']){_0x543564[_0x1913fa(0x42f)]=0x19d,_0x543564[_0x1913fa(0x47d)](_0x1913fa(0x545));return;}}}const _0x5d0121=_0x5007c4?null:await _0x4a098c(_0x356f39,this[_0x1913fa(0x420)]),_0x406b65=_0x5007c4?_0xaf5c3c(_0x356f39,this[_0x1913fa(0x420)]):undefined,_0x8638d0=await this[_0x1913fa(0x4fd)](_0x356f39[_0x1913fa(0x1b1)],_0x5f1711['pathname'],{'body':_0x5d0121,'query':Object[_0x1913fa(0x5df)](_0x5f1711[_0x1913fa(0x6b1)][_0x1913fa(0x65b)]()),'headers':_0x356f39[_0x1913fa(0x4eb)]},{'req':_0x356f39,'res':_0x543564,'rawStream':_0x406b65}),_0x2cade6=this['_matchRoute'](_0x356f39['method'],_0x5f1711['pathname']),_0x451084=Date[_0x1913fa(0x263)]()-_0xcef4a1,_0x2cdb4d=this[_0x1913fa(0x673)](_0x2cade6,_0x8638d0)?this['_wrapApiResponse'](_0x8638d0,_0x451084):_0x19e963(_0x8638d0),_0x426b49=(_0x2cdb4d[_0x1913fa(0x4f0)]||0xc8)>=0x190;this[_0x1913fa(0x275)][_0x1913fa(0x16a)](_0x356f39[_0x1913fa(0x1b1)],_0x451084,_0x426b49),_0x9b2a1c(_0x543564,_0x2cdb4d);if(_0xc44f36){const _0x542d25=_0x2cdb4d[_0x1913fa(0x4f0)]||0xc8,_0x4bed75=Date[_0x1913fa(0x263)]()-_0xcef4a1;process[_0x1913fa(0x54a)][_0x1913fa(0x1d5)](_0x1913fa(0x5e7)+_0x356f39[_0x1913fa(0x1b1)]['padEnd'](0x7)+'\x20'+_0x5f1711[_0x1913fa(0x5e3)][_0x1913fa(0x3be)](0x2d)+'\x20'+_0x542d25+'\x20\x20'+_0x4bed75+_0x1913fa(0x4c8));}}catch(_0x56605f){const _0x5df969=Date['now']()-_0xcef4a1;this[_0x1913fa(0x275)][_0x1913fa(0x16a)](_0x356f39[_0x1913fa(0x1b1)],_0x5df969,!![]);const _0x2d4326=_0x56605f?.[_0x1913fa(0x4f0)]||0x1f4;_0x543564['statusCode']=_0x2d4326,_0x2d4326===0x19d?_0x543564[_0x1913fa(0x47d)](_0x1913fa(0x545)):_0x543564[_0x1913fa(0x47d)](_0x56605f['message']||_0x1913fa(0x3cf));}}),this['server']['on'](_0x565eed(0x17f),_0x1ac2d8=>{const _0x3ef27d=_0x565eed;this['_sockets']['add'](_0x1ac2d8),_0x1ac2d8['on'](_0x3ef27d(0x5f3),()=>this['_sockets'][_0x3ef27d(0x522)](_0x1ac2d8));}),this[_0x565eed(0x287)][_0x565eed(0x2da)](_0x29dca9);const _0x4e58b2=this[_0x565eed(0x377)];return _0x4e58b2?.[_0x565eed(0x57c)]&&(_0x4e58b2[_0x565eed(0x57c)][_0x565eed(0x132)](':'+_0x29dca9),_0x2ee0b4[_0x565eed(0x1d1)]?_0x4e58b2[_0x565eed(0x15b)]?.({'kind':_0x565eed(0x1fd)})[_0x565eed(0x606)](()=>{}):_0x4e58b2[_0x565eed(0x69f)]?.({'kind':_0x565eed(0x38a),'listenAddr':':'+_0x29dca9})[_0x565eed(0x606)](()=>{})),this[_0x565eed(0x287)];}async[_0x151c84(0x5f3)](_0x25c779={}){const _0xb1543b=_0x151c84,_0x47f9c7=this[_0xb1543b(0x287)];this['server']=null;if(_0x47f9c7&&_0x47f9c7[_0xb1543b(0x259)]){try{await _0x47f9c7[_0xb1543b(0x5f3)]();}catch{}this['metrics']&&this[_0xb1543b(0x275)][_0xb1543b(0x5f3)]();return;}if(_0x47f9c7){const _0x1eadfc=Number[_0xb1543b(0x5e1)](_0x25c779[_0xb1543b(0x21a)])?Math[_0xb1543b(0x2d6)](0x0,_0x25c779[_0xb1543b(0x21a)]):0x3e8;await new Promise(_0x21f3bf=>{let _0x9e392=![],_0x697aea=null,_0x21154e=null;const _0x4c6d39=()=>{if(_0x9e392)return;_0x9e392=!![];if(_0x697aea)clearTimeout(_0x697aea);if(_0x21154e)clearTimeout(_0x21154e);_0x21f3bf();};try{_0x47f9c7['close'](_0x4c6d39);}catch{_0x4c6d39();return;}try{_0x47f9c7['closeIdleConnections']?.();}catch{}_0x697aea=setTimeout(()=>{const _0x4670a4=_0x1da2;try{_0x47f9c7[_0x4670a4(0x1fb)]?.();}catch{}for(const _0x1c0a2f of this[_0x4670a4(0x463)]){try{_0x1c0a2f[_0x4670a4(0x322)]();}catch{}}_0x21154e=setTimeout(_0x4c6d39,0x64),_0x21154e[_0x4670a4(0x434)]?.();},_0x1eadfc),_0x697aea['unref']?.();});}this[_0xb1543b(0x275)]&&this[_0xb1543b(0x275)][_0xb1543b(0x5f3)]();}[_0x151c84(0x2f4)](_0x4770e9,_0x15364a,_0x1fc2ee=0x36ee80){const _0x41660d=_0x151c84,_0xf244e5=Date[_0x41660d(0x263)](),_0x135d8e=Buffer[_0x41660d(0x4ce)](JSON[_0x41660d(0x6ae)]({'iat':_0xf244e5,'exp':_0xf244e5+_0x1fc2ee,..._0x4770e9}))[_0x41660d(0x3ec)](_0x41660d(0x14b)),_0x55996f=_0x5286c6(_0x135d8e,_0x15364a);return _0x135d8e+'.'+_0x55996f;}[_0x151c84(0x560)](_0x36a079,_0x253c2a={}){const _0xaca3b6=_0x151c84,{httpOnly:httpOnly=!![],sameSite:sameSite='Lax',path:path='/',secure:secure=![],maxAge:maxAge=null,expires:expires=null}=_0x253c2a;let _0x2f66ca=this['auth'][_0xaca3b6(0x384)]+'='+_0x36a079;if(httpOnly)_0x2f66ca+=_0xaca3b6(0x58b);if(sameSite)_0x2f66ca+=';\x20SameSite='+sameSite;if(path)_0x2f66ca+=_0xaca3b6(0x58f)+path;if(secure)_0x2f66ca+=';\x20Secure';if(Number[_0xaca3b6(0x5e1)](maxAge))_0x2f66ca+=';\x20Max-Age='+Math[_0xaca3b6(0x2d6)](0x0,Math[_0xaca3b6(0x5f7)](maxAge));if(expires instanceof Date)_0x2f66ca+=_0xaca3b6(0x2d3)+expires[_0xaca3b6(0x572)]();return _0x2f66ca;}['clearCookie'](_0x231805=this[_0x151c84(0x5c3)][_0x151c84(0x384)],_0x146d57={}){const _0x18453c=_0x151c84,{path:path='/',sameSite:sameSite=_0x18453c(0x6ce),secure:secure=![],httpOnly:httpOnly=!![]}=_0x146d57;let _0x116fc7=_0x231805+'=';if(httpOnly)_0x116fc7+=_0x18453c(0x58b);if(sameSite)_0x116fc7+=_0x18453c(0x68e)+sameSite;if(path)_0x116fc7+=_0x18453c(0x58f)+path;if(secure)_0x116fc7+=_0x18453c(0x2e4);return _0x116fc7+=_0x18453c(0x2e2),_0x116fc7;}[_0x151c84(0x1d4)](_0x483de3,_0xa68c70){const _0x2dec1f=_0x151c84;if(!_0x483de3)return null;const [_0x5d181b,_0x26b454]=String(_0x483de3)[_0x2dec1f(0x428)]('.');if(!_0x5d181b||!_0x26b454)return null;const _0x384b97=_0x5286c6(_0x5d181b,_0xa68c70);if(!_0x54a595(_0x26b454,_0x384b97))return null;try{const _0x23d3e5=JSON[_0x2dec1f(0x2cc)](Buffer[_0x2dec1f(0x4ce)](_0x5d181b,_0x2dec1f(0x14b))['toString']());if(_0x23d3e5['exp']<=Date[_0x2dec1f(0x263)]())return null;return _0x23d3e5;}catch{return null;}}[_0x151c84(0x1d9)](_0x1e3f0e){const _0x51f5af=_0x151c84;if(this[_0x51f5af(0x377)]?.[_0x51f5af(0x5c3)])return this[_0x51f5af(0x377)][_0x51f5af(0x5c3)][_0x51f5af(0x1d9)](_0x1e3f0e);return _0x23b312(_0x1e3f0e);}[_0x151c84(0x167)](_0x11de62){const _0x388173=_0x151c84;if(this['_okdb']?.[_0x388173(0x5c3)])return this['_okdb'][_0x388173(0x5c3)][_0x388173(0x167)](_0x11de62);const _0x4bd346=this[_0x388173(0x620)]?.[_0x388173(0x131)]??0x36ee80,_0x442ec7=this['_authOptions']?.[_0x388173(0x40c)];return _0x436537(_0x11de62,_0x442ec7,_0x4bd346);}[_0x151c84(0x5aa)](_0x3bbf80){const _0x2b00e8=_0x151c84;if(this[_0x2b00e8(0x377)]?.[_0x2b00e8(0x5c3)])return this[_0x2b00e8(0x377)][_0x2b00e8(0x5c3)][_0x2b00e8(0x5aa)](_0x3bbf80);const _0x4247de=this[_0x2b00e8(0x620)]?.[_0x2b00e8(0x40c)];return _0x300bca(_0x3bbf80,_0x4247de);}async[_0x151c84(0x5b8)](_0x59e7d1){const _0x185134=_0x151c84;if(this['_okdb']?.[_0x185134(0x5c3)])return this['_okdb'][_0x185134(0x5c3)][_0x185134(0x5b8)](_0x59e7d1);if(_0x59e7d1[_0x185134(0x509)]?.[_0x185134(0x2fd)]===!![]||this['authMode']==='open')return{'id':_0x185134(0x193),'username':'system','roles':[_0x185134(0x35b)],'isAuthenticated':!![],'isSystem':!![],'user':{'id':'system','username':_0x185134(0x193),'roles':['admin'],'isAuthenticated':!![],'isSystem':!![]}};const _0x5dbbde=this[_0x185134(0x1d9)](_0x59e7d1[_0x185134(0x4eb)]?.[_0x185134(0x67b)]),_0x4416b3=_0x59e7d1[_0x185134(0x5e9)]?.[this[_0x185134(0x5c3)][_0x185134(0x384)]],_0x2832ab=_0x5dbbde||_0x4416b3;if(!_0x2832ab)return{'isAuthenticated':![],'isSystem':![],'user':null};const _0x4eb9e7=this[_0x185134(0x5aa)](_0x2832ab);if(!_0x4eb9e7)return{'isAuthenticated':![],'isSystem':![],'user':null};const _0x5179e3={'id':_0x4eb9e7[_0x185134(0x1f9)]??null,'username':_0x4eb9e7[_0x185134(0x67a)]??null,'roles':Array[_0x185134(0x478)](_0x4eb9e7[_0x185134(0x438)])?_0x4eb9e7[_0x185134(0x438)]:[],'isAuthenticated':!![],'isSystem':![]};return{'id':_0x5179e3['id'],'username':_0x5179e3[_0x185134(0x67a)],'roles':_0x5179e3[_0x185134(0x438)],'isAuthenticated':!![],'isSystem':![],'user':_0x5179e3,'claims':_0x4eb9e7,'subject':_0x5179e3['id']};}async[_0x151c84(0x2f5)](_0x8fe59b,_0x5588b8={}){const _0x11648d=_0x151c84,_0x505cc5=_0x6d00b5(_0x8fe59b),_0x583a52=Array['isArray'](_0x5588b8['allowedAlgs'])&&_0x5588b8[_0x11648d(0x646)]['length']>0x0?_0x5588b8['allowedAlgs']:[_0x11648d(0x13a),_0x11648d(0x198)],_0x2498bc=_0x505cc5['header']?.[_0x11648d(0x134)];if(!_0x583a52[_0x11648d(0x3b7)](_0x2498bc))throw new Error(_0x11648d(0x564)+_0x2498bc);if(!_0x505cc5[_0x11648d(0x55a)]?.['kid'])throw new Error(_0x11648d(0x3cd));const _0x2c287a=await this[_0x11648d(0x21f)](_0x5588b8);if(!_0x2c287a?.[_0x11648d(0x4e5)])throw new Error(_0x11648d(0x684));const _0x2ef52d=await this[_0x11648d(0x5fa)](_0x2c287a[_0x11648d(0x4e5)],_0x505cc5['header'][_0x11648d(0x339)],_0x5588b8);if(!_0x43be14(_0x2498bc,_0x2ef52d,_0x505cc5['signingInput'],_0x505cc5['signature']))throw new Error(_0x11648d(0x468));const _0x1adc6f=Math[_0x11648d(0x5f7)](Date['now']()/0x3e8),_0x1b2713=_0x505cc5[_0x11648d(0x2b5)]||{};if(_0x1b2713[_0x11648d(0x336)]!==_0x2c287a['issuer'])throw new Error('JWT\x20issuer\x20mismatch');const _0xd3e583=_0x5588b8[_0x11648d(0x5e4)];if(_0xd3e583){const _0x226984=_0x498f8d(_0x1b2713[_0x11648d(0x347)]);if(!_0x226984[_0x11648d(0x3b7)](_0xd3e583))throw new Error(_0x11648d(0x3e7));}if(typeof _0x1b2713['exp']!==_0x11648d(0x44a)||_0x1b2713[_0x11648d(0x279)]<=_0x1adc6f)throw new Error(_0x11648d(0x585));if(_0x1b2713['nbf']!=null&&_0x1b2713[_0x11648d(0x4da)]>_0x1adc6f)throw new Error(_0x11648d(0x2a1));if(_0x1b2713[_0x11648d(0x178)]==='id')throw new Error(_0x11648d(0x385));return{'subject':_0x1b2713[_0x11648d(0x1f9)]??null,'email':_0x1b2713[_0x11648d(0x44f)]??null,'scopes':typeof _0x1b2713[_0x11648d(0x544)]==='string'?_0x1b2713[_0x11648d(0x544)]['split'](/\s+/)['filter'](Boolean):[],'claims':_0x1b2713,'tokenType':_0x11648d(0x56f)};}async[_0x151c84(0x21f)](_0x41738a={}){const _0x30fdcd=_0x151c84,_0x22bd93=String(_0x41738a[_0x30fdcd(0x3dc)]||'')[_0x30fdcd(0x32d)](/\/+$/,'');if(!_0x22bd93)return null;const _0x36e48b=Number[_0x30fdcd(0x5e1)](_0x41738a[_0x30fdcd(0x151)])?_0x41738a[_0x30fdcd(0x151)]:0xa*0x3c*0x3e8;if(this[_0x30fdcd(0x649)]?.[_0x30fdcd(0x3dc)]===_0x22bd93&&this[_0x30fdcd(0x649)][_0x30fdcd(0x653)]>Date[_0x30fdcd(0x263)]())return this['_oidcDiscoveryCache'][_0x30fdcd(0x222)];const _0x174784=await _0x4a2c64(_0x22bd93+_0x30fdcd(0x656)),_0x566e0a={'issuer':_0x174784[_0x30fdcd(0x3dc)]||_0x22bd93,'authorization_endpoint':_0x41738a[_0x30fdcd(0x156)]||_0x174784['authorization_endpoint'],'token_endpoint':_0x41738a['tokenUrl']||_0x174784[_0x30fdcd(0x447)],'jwks_uri':_0x41738a[_0x30fdcd(0x276)]||_0x174784['jwks_uri']};return this['_oidcDiscoveryCache']={'issuer':_0x22bd93,'value':_0x566e0a,'expiresAt':Date[_0x30fdcd(0x263)]()+_0x36e48b},_0x566e0a;}async['_fetchJwks'](_0x5b7def,_0x2576b2=0x5*0x3c*0x3e8){const _0x3075c0=_0x151c84,_0x5702b1=await _0x4a2c64(_0x5b7def),_0x4bb15a=new Map();for(const _0x3f55b8 of _0x5702b1[_0x3075c0(0x5fb)]||[]){if(!_0x3f55b8?.[_0x3075c0(0x339)])continue;_0x4bb15a[_0x3075c0(0x244)](_0x3f55b8[_0x3075c0(0x339)],_0x4164e8(_0x3f55b8));}return this[_0x3075c0(0x160)]={'uri':_0x5b7def,'keys':_0x4bb15a,'expiresAt':Date['now']()+_0x2576b2},this['_jwksCache'];}async[_0x151c84(0x5fa)](_0x4c959e,_0xbdffb3,_0x10bb6b={}){const _0x36e5fa=_0x151c84,_0x179116=Number[_0x36e5fa(0x5e1)](_0x10bb6b[_0x36e5fa(0x389)])?_0x10bb6b[_0x36e5fa(0x389)]:0x5*0x3c*0x3e8,_0x1df468=0x1e*0x3e8,_0x2b49ed=this[_0x36e5fa(0x577)]['get'](_0xbdffb3);if(_0x2b49ed!==undefined&&_0x2b49ed>Date[_0x36e5fa(0x263)]())throw new Error(_0x36e5fa(0x567)+_0xbdffb3);(!this[_0x36e5fa(0x160)]||this[_0x36e5fa(0x160)][_0x36e5fa(0x6b4)]!==_0x4c959e||this[_0x36e5fa(0x160)][_0x36e5fa(0x653)]<=Date[_0x36e5fa(0x263)]())&&await this[_0x36e5fa(0x57f)](_0x4c959e,_0x179116);let _0x3bcf73=this[_0x36e5fa(0x160)]?.[_0x36e5fa(0x5fb)]?.[_0x36e5fa(0x165)](_0xbdffb3);if(_0x3bcf73)return _0x3bcf73;await this[_0x36e5fa(0x57f)](_0x4c959e,_0x179116),_0x3bcf73=this['_jwksCache']?.['keys']?.['get'](_0xbdffb3);if(!_0x3bcf73){this[_0x36e5fa(0x577)][_0x36e5fa(0x244)](_0xbdffb3,Date[_0x36e5fa(0x263)]()+_0x1df468);throw new Error(_0x36e5fa(0x567)+_0xbdffb3);}return _0x3bcf73;}['_normalizeOAuthAuthResult'](_0x166977){const _0x1cca13=_0x151c84;if(this[_0x1cca13(0x377)]?.[_0x1cca13(0x5c3)])return this[_0x1cca13(0x377)]['auth']['_normalizeOAuthAuthResult'](_0x166977);const _0x2a2d0a=_0x166977?.[_0x1cca13(0x2ec)]||{},_0x139eb5={'sub':_0x166977?.[_0x1cca13(0x16d)]??_0x2a2d0a[_0x1cca13(0x1f9)]??null,'email':_0x166977?.['email']??_0x2a2d0a[_0x1cca13(0x44f)]??null,'name':_0x166977?.[_0x1cca13(0x44d)]??_0x2a2d0a['name']??_0x2a2d0a['preferred_username']??null,'groups':_0x166977?.['groups']??_0x2a2d0a[_0x1cca13(0x321)]??[],'roles':_0x166977?.[_0x1cca13(0x438)]??_0x2a2d0a['roles']??[]};return{'type':_0x1cca13(0x62a),'tokenType':_0x166977?.['tokenType']??_0x1cca13(0x56f),'subject':_0x139eb5[_0x1cca13(0x1f9)],'email':_0x139eb5[_0x1cca13(0x44f)],'scopes':_0x166977?.[_0x1cca13(0x483)]??_0x2a2d0a['scope']?.[_0x1cca13(0x428)]?.('\x20')?.[_0x1cca13(0x3d5)](Boolean)??[],'claims':_0x2a2d0a,'user':_0x139eb5,'isAuthenticated':!![]};}[_0x151c84(0x184)](_0x5926ee={},_0x1e62a8=0x927c0){const _0x304a7b=_0x151c84;if(this['_okdb']?.[_0x304a7b(0x5c3)])return this[_0x304a7b(0x377)]['auth']['createLoginState'](_0x5926ee,_0x1e62a8);const _0x5b1a3d=_0x3b3bd(0x18);this[_0x304a7b(0x696)][_0x304a7b(0x244)](_0x5b1a3d,{..._0x5926ee,'exp':Date[_0x304a7b(0x263)]()+_0x1e62a8});if(this[_0x304a7b(0x696)][_0x304a7b(0x6d2)]%0x32===0x0){const _0x535a27=Date['now']();for(const [_0x21ca98,_0x302d36]of this[_0x304a7b(0x696)]){if(_0x302d36[_0x304a7b(0x279)]<=_0x535a27)this['_loginStates'][_0x304a7b(0x522)](_0x21ca98);}}return _0x5b1a3d;}[_0x151c84(0x1cc)](_0x79d70c){const _0xe15542=_0x151c84;if(this[_0xe15542(0x377)]?.[_0xe15542(0x5c3)])return this['_okdb']['auth'][_0xe15542(0x1cc)](_0x79d70c);if(!_0x79d70c)return null;const _0x5241cd=this['_loginStates']['get'](_0x79d70c);this['_loginStates']['delete'](_0x79d70c);if(!_0x5241cd)return null;if(_0x5241cd[_0xe15542(0x279)]<=Date[_0xe15542(0x263)]())return null;return _0x5241cd;}}function _0x19e963(_0x2758c1){const _0x292afb=_0x151c84;if(_0x2758c1==null)return{'status':0xcc};if(Buffer[_0x292afb(0x190)](_0x2758c1)||_0xed8590(_0x2758c1))return{'status':0xc8,'body':_0x2758c1};if(typeof _0x2758c1==='object'&&'status'in _0x2758c1){if(!(_0x292afb(0x553)in _0x2758c1)&&!_0xed8590(_0x2758c1[_0x292afb(0x553)])){const {status:_0x5a3241,headers:_0x29b1ea,..._0x1eb89f}=_0x2758c1;if(Object[_0x292afb(0x5fb)](_0x1eb89f)[_0x292afb(0x4e2)]>0x0)return{'status':_0x5a3241,'headers':_0x29b1ea,'body':_0x1eb89f};}return _0x2758c1;}return{'status':0xc8,'body':_0x2758c1};}function _0xed8590(_0x5432b1){const _0x2777bc=_0x151c84;return _0x5432b1&&typeof _0x5432b1[_0x2777bc(0x47e)]==='function';}function _0xaf5c3c(_0x4ca0ff,_0x39b674){const _0x3e7ef9=_0x151c84,{PassThrough:_0x56d169}=require$$8;let _0x516ab1=0x0,_0x1cf0fd=![];const _0x3d3f0c=new _0x56d169();return _0x4ca0ff['on'](_0x3e7ef9(0x1df),_0x127745=>{const _0x1d63ac=_0x3e7ef9;if(_0x1cf0fd)return;_0x516ab1+=_0x127745['length'];if(_0x516ab1>_0x39b674){_0x1cf0fd=!![];const _0x3625a4=new Error('Payload\x20too\x20large');_0x3625a4[_0x1d63ac(0x4f0)]=0x19d,_0x3d3f0c[_0x1d63ac(0x322)](_0x3625a4);return;}if(!_0x3d3f0c[_0x1d63ac(0x3ff)])_0x3d3f0c[_0x1d63ac(0x3fd)](_0x127745);}),_0x4ca0ff['on'](_0x3e7ef9(0x47d),()=>{const _0x466998=_0x3e7ef9;!_0x1cf0fd&&!_0x3d3f0c[_0x466998(0x3ff)]&&(_0x1cf0fd=!![],_0x3d3f0c['end']());}),_0x4ca0ff['on'](_0x3e7ef9(0x5bb),_0x36dd9b=>{const _0x3934da=_0x3e7ef9;if(!_0x3d3f0c[_0x3934da(0x3ff)])_0x3d3f0c[_0x3934da(0x322)](_0x36dd9b);}),_0x4ca0ff[_0x3e7ef9(0x4a5)](),_0x3d3f0c['on'](_0x3e7ef9(0x1af),()=>{const _0x21ccc9=_0x3e7ef9;if(!_0x3d3f0c[_0x21ccc9(0x3ff)])_0x4ca0ff[_0x21ccc9(0x1af)]();}),_0x3d3f0c;}function _0x4a098c(_0x25d850,_0x59ef08){const _0x3db799=_0x151c84;if(_0x25d850['method']==='GET'||_0x25d850['method']===_0x3db799(0x46b))return null;const _0x38c402=_0x25d850[_0x3db799(0x4eb)]?.[_0x3db799(0x211)];if(_0x38c402!=null){const _0x21ed70=Number(_0x38c402);if(Number[_0x3db799(0x5e1)](_0x21ed70)&&_0x21ed70>_0x59ef08){const _0x18207e=new Error(_0x3db799(0x545));_0x18207e['status']=0x19d;throw _0x18207e;}}return new Promise((_0x459b8a,_0x4a3332)=>{const _0x38c553=_0x3db799;let _0x57902b='',_0x433334=0x0;_0x25d850['on']('data',_0x1697cd=>{const _0x56469e=_0x1da2;_0x433334+=_0x1697cd[_0x56469e(0x4e2)];if(_0x433334>_0x59ef08){try{_0x25d850[_0x56469e(0x322)]();}catch{}const _0x11b7b4=new Error(_0x56469e(0x545));_0x11b7b4['status']=0x19d,_0x4a3332(_0x11b7b4);return;}_0x57902b+=_0x1697cd;}),_0x25d850['on'](_0x38c553(0x47d),()=>{const _0x27613e=_0x38c553;if(!_0x57902b)return _0x459b8a(null);const _0x261f5e=_0x25d850[_0x27613e(0x4eb)]?.[_0x27613e(0x3c6)]||'';if(_0x261f5e[_0x27613e(0x3b7)](_0x27613e(0x2ab))){const _0x4a1ca7={};for(const [_0x43cb90,_0x4b4ad2]of new URLSearchParams(_0x57902b))_0x4a1ca7[_0x43cb90]=_0x4b4ad2;return _0x459b8a(_0x4a1ca7);}try{_0x459b8a(JSON['parse'](_0x57902b));}catch(_0x3ebf9d){_0x4a3332(_0x3ebf9d);}}),_0x25d850['on'](_0x38c553(0x5bb),_0x4a3332);});}function _0x9b2a1c(_0x10935d,_0x49a251){const _0x504867=_0x151c84,{status:status=0xc8,headers:headers={},body:_0x5888a7}=_0x49a251;_0x10935d[_0x504867(0x42f)]=status;for(const [_0x543a53,_0x115e0f]of Object[_0x504867(0x65b)](headers)){_0x10935d[_0x504867(0x42c)](_0x543a53,_0x115e0f);}if(_0x5888a7==null){_0x10935d[_0x504867(0x47d)]();return;}if(_0xed8590(_0x5888a7)){_0x5888a7['pipe'](_0x10935d);return;}if(Buffer[_0x504867(0x190)](_0x5888a7)){_0x10935d[_0x504867(0x47d)](_0x5888a7);return;}if(typeof _0x5888a7===_0x504867(0x652)){!_0x10935d[_0x504867(0x412)](_0x504867(0x159))&&_0x10935d[_0x504867(0x42c)]('Content-Type',_0x504867(0x3a5));_0x10935d['end'](JSON[_0x504867(0x6ae)](_0x5888a7));return;}_0x10935d[_0x504867(0x47d)](String(_0x5888a7));}return okdbHttp['exports']=_0x2a9613,okdbHttp[_0x151c84(0x4ad)][_0x151c84(0x6b0)]=_0x2f9167,okdbHttp[_0x151c84(0x4ad)];}var hasRequiredOkdb;function requireOkdb(){const _0x3d2baa=_0x264626;if(hasRequiredOkdb)return okdb$1;hasRequiredOkdb=0x1;try{process['loadEnvFile']();}catch{}const _0x486778=require$$1,_0x1b4cbf=require$$1$1,{resolveWorkers:_0x23e5e4,isShmbufNative:_0x50aa77}=requireOkdbWorkers();function _0x137d80(_0x2cc390){const _0x10c43e=_0x1da2,_0xa9dc4a=_0x2cc390[_0x10c43e(0x149)](0x2),_0x52bc1d={};let _0x25d6a3=0x0;while(_0x25d6a3<_0xa9dc4a[_0x10c43e(0x4e2)]){const _0x42c700=_0xa9dc4a[_0x25d6a3];if(_0x42c700==='--port'||_0x42c700==='-p')_0x52bc1d[_0x10c43e(0x1e5)]=Number(_0xa9dc4a[++_0x25d6a3]);else{if(_0x42c700===_0x10c43e(0x581)||_0x42c700==='-d')_0x52bc1d[_0x10c43e(0x4d4)]=_0xa9dc4a[++_0x25d6a3];else{if(_0x42c700===_0x10c43e(0x3ea)||_0x42c700==='-k')_0x52bc1d[_0x10c43e(0x2dc)]=_0xa9dc4a[++_0x25d6a3];else{if(_0x42c700===_0x10c43e(0x2d1)||_0x42c700==='-c')_0x52bc1d[_0x10c43e(0x199)]=_0xa9dc4a[++_0x25d6a3];else{if(_0x42c700===_0x10c43e(0x62d))_0x52bc1d[_0x10c43e(0x3f2)]=_0xa9dc4a[++_0x25d6a3];else{if(_0x42c700===_0x10c43e(0x5a0))_0x52bc1d[_0x10c43e(0x4ec)]=!![];else{if(_0x42c700===_0x10c43e(0x635))_0x52bc1d[_0x10c43e(0x575)]=!![];else{if(_0x42c700===_0x10c43e(0x52c))_0x52bc1d[_0x10c43e(0x6b7)]=_0xa9dc4a[++_0x25d6a3];else{if(_0x42c700===_0x10c43e(0x2cb))_0x52bc1d['noCluster']=!![];else{if(_0x42c700===_0x10c43e(0x22b)||_0x42c700==='-e')_0x52bc1d['env']=_0xa9dc4a[++_0x25d6a3];else{if(_0x42c700===_0x10c43e(0x2b6))_0x52bc1d[_0x10c43e(0x523)]=_0xa9dc4a[++_0x25d6a3];else{if(_0x42c700===_0x10c43e(0x20d))_0x52bc1d[_0x10c43e(0x556)]=!![];else{if(_0x42c700===_0x10c43e(0x6d4))_0x52bc1d['blobs']=!![];else{if(_0x42c700==='--drop')_0x52bc1d[_0x10c43e(0x589)]=!![];else{if(_0x42c700===_0x10c43e(0x676)){const _0x5af486=[];while(_0x25d6a3+0x1<_0xa9dc4a[_0x10c43e(0x4e2)]&&!_0xa9dc4a[_0x25d6a3+0x1]['startsWith']('--')){_0x5af486[_0x10c43e(0x3fd)](_0xa9dc4a[++_0x25d6a3]);}_0x52bc1d['open']=_0x5af486[_0x10c43e(0x4e2)]>0x0?_0x5af486:!![];}else{if(_0x42c700===_0x10c43e(0x4d3))_0x52bc1d[_0x10c43e(0x603)]=!![];else{if(_0x42c700===_0x10c43e(0x449))_0x52bc1d['name']=_0xa9dc4a[++_0x25d6a3];else{if(_0x42c700===_0x10c43e(0x5bf))_0x52bc1d[_0x10c43e(0x5d6)]=_0xa9dc4a[++_0x25d6a3];else{if(_0x42c700===_0x10c43e(0x499))_0x52bc1d['label']=_0xa9dc4a[++_0x25d6a3];else{if(_0x42c700===_0x10c43e(0x4e8))_0x52bc1d[_0x10c43e(0x2c4)]=_0xa9dc4a[++_0x25d6a3];else{if(_0x42c700===_0x10c43e(0x1c0))_0x52bc1d[_0x10c43e(0x40f)]=_0xa9dc4a[++_0x25d6a3];else{if(_0x42c700==='--ttl')_0x52bc1d['ttl']=_0xa9dc4a[++_0x25d6a3];else{if(_0x42c700==='--token')_0x52bc1d[_0x10c43e(0x612)]=_0xa9dc4a[++_0x25d6a3];else{if(_0x42c700===_0x10c43e(0x34c)||_0x42c700==='-u')_0x52bc1d[_0x10c43e(0x67a)]=_0xa9dc4a[++_0x25d6a3];else{if(_0x42c700===_0x10c43e(0x458))_0x52bc1d[_0x10c43e(0x2bf)]=_0xa9dc4a[++_0x25d6a3];else{if(_0x42c700===_0x10c43e(0x136)||_0x42c700==='-v'){const _0x46e8b9=require$$3;console[_0x10c43e(0x3e8)](_0x46e8b9['version']),process[_0x10c43e(0x4ba)](0x0);}else(_0x42c700===_0x10c43e(0x383)||_0x42c700==='-h')&&(_0x1522bf(),process[_0x10c43e(0x4ba)](0x0));}}}}}}}}}}}}}}}}}}}}}}}}}_0x25d6a3++;}return _0x52bc1d;}function _0x1522bf(){console['log']('\x0a\x20\x20okdb\x20—\x20standalone\x20OKDB\x20server\x0a\x0a\x20\x20Usage:\x0a\x20\x20\x20\x20okdb\x20[options]\x0a\x20\x20\x20\x20okdb\x20<command>\x0a\x0a\x20\x20Options:\x0a\x20\x20\x20\x20-p,\x20--port\x20<port>\x20\x20\x20\x20\x20\x20\x20\x20HTTP\x20port\x20(default:\x208484)\x0a\x20\x20\x20\x20-d,\x20--path\x20<dir>\x20\x20\x20\x20\x20\x20\x20\x20\x20Database\x20directory\x20(default:\x20./okdb-data)\x0a\x20\x20\x20\x20-k,\x20--key\x20\x20<secret>\x20\x20\x20\x20\x20\x20Encryption\x20key\x20for\x20data\x20at\x20rest\x0a\x20\x20\x20\x20-c,\x20--config\x20<file>\x20\x20\x20\x20\x20\x20Config\x20file\x20path\x20(default:\x20.kdbconfig)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--log-level\x20<level>\x20\x20Log\x20level:\x20debug\x20|\x20info\x20|\x20warn\x20|\x20error\x20(default:\x20info)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-repl\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Start\x20server\x20without\x20interactive\x20shell\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-admin\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20admin\x20UI\x0a\x20\x20\x20\x20\x20\x20\x20\x20--open\x20[ip\x20...]\x20\x20\x20\x20\x20\x20Open\x20mode:\x20bypass\x20auth\x20for\x20listed\x20IPs\x20(default:\x20localhost).\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Examples:\x20--open\x20\x20--open\x20192.168.1.0/24\x20\x20--open\x20*\x0a\x20\x20\x20\x20\x20\x20\x20\x20--log-requests\x20\x20\x20\x20\x20\x20\x20Print\x20every\x20HTTP\x20request\x20to\x20stdout\x20(for\x20debugging)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--workers\x20<n>\x20\x20\x20\x20\x20\x20\x20\x20Number\x20of\x20passive\x20HTTP\x20worker\x20processes\x20(default:\x20cores\x20−\x201).\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20The\x20primary\x20runs\x20processing;\x20workers\x20serve\x20HTTP\x20+\x20SSE.\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-cluster\x20\x20\x20\x20\x20\x20\x20\x20\x20Run\x20single-process\x20(equivalent\x20to\x20--workers\x201)\x0a\x20\x20\x20\x20-v,\x20--version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Print\x20version\x20and\x20exit\x0a\x20\x20\x20\x20-h,\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x0a\x0a\x20\x20Commands:\x0a\x20\x20\x20\x20version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Print\x20version\x20and\x20exit\x0a\x20\x20\x20\x20doctor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Run\x20health\x20checks\x0a\x20\x20\x20\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Create\x20.kdbconfig\x20and\x20okdb-data/\x0a\x20\x20\x20\x20token\x20create\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Create\x20a\x20token\x20in\x20the\x20local\x20DB\x20(direct\x20access,\x20no\x20HTTP)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--name\x20<name>\x20\x20\x20\x20\x20\x20For\x20password\x20login\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--password\x20<pass>\x20\x20Password\x20(requires\x20--name)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--label\x20<text>\x20\x20\x20\x20\x20Human\x20description\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--permissions\x20<l>\x20\x20Comma-separated\x20baseline\x20permissions\x20(e.g.\x20\x22*\x22\x20or\x20\x22data:read\x22)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--grants\x20<json>\x20\x20\x20\x20Per-env\x20grants\x20as\x20JSON\x20(e.g.\x20\x27{\x22orders\x22:[\x22data:*\x22]}\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--ttl\x20<ms>\x20\x20\x20\x20\x20\x20\x20\x20\x20Optional\x20TTL\x20in\x20milliseconds\x0a\x20\x20\x20\x20token\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20List\x20all\x20tokens\x20in\x20the\x20local\x20DB\x0a\x20\x20\x20\x20token\x20revoke\x20<id>\x20\x20\x20\x20\x20\x20\x20\x20Revoke\x20(delete)\x20a\x20token\x20by\x20id\x20(full\x20uuid\x20or\x20unique\x20prefix)\x0a\x20\x20\x20\x20join\x20<address>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Join\x20an\x20existing\x20cluster\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--token\x20<t>\x20\x20\x20\x20\x20\x20\x20\x20Bearer\x20token\x20from\x20the\x20cluster\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--username\x20<u>\x20\x20\x20\x20\x20Or,\x20username\x20for\x20login\x20exchange\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--password\x20<p>\x20\x20\x20\x20\x20Password\x20for\x20login\x20exchange\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--address\x20<addr>\x20\x20\x20This\x20node\x27s\x20reachable\x20sync\x20address\x20(required)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--path\x20<dir>\x20\x20\x20\x20\x20\x20\x20Local\x20DB\x20path\x0a\x20\x20\x20\x20backup\x20[dir]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Hot\x20filesystem\x20backup\x20via\x20LMDB\x20native\x20copy\x20(default:\x20./okdb-backup)\x0a\x20\x20\x20\x20export\x20<file>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Streaming\x20NDJSON\x20logical\x20export\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env\x20<name>\x20\x20\x20\x20\x20\x20env\x20to\x20export\x20(default:\x20default)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--types\x20<a,b,...>\x20comma-separated\x20type\x20filter\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--changes\x20\x20\x20\x20\x20\x20\x20\x20\x20include\x20changelog\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--blobs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20also\x20export\x20blob\x20files\x20alongside\x0a\x20\x20\x20\x20import\x20<file>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Streaming\x20NDJSON\x20logical\x20import\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env\x20<name>\x20\x20\x20\x20\x20\x20target\x20env\x20override\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--types\x20<a,b,...>\x20import\x20only\x20these\x20types\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--drop\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20drop\x20&\x20recreate\x20existing\x20types\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--changes\x20\x20\x20\x20\x20\x20\x20\x20\x20restore\x20changelog\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--blobs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20also\x20import\x20blob\x20files\x20alongside\x0a\x20\x20\x20\x20reset\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Delete\x20and\x20recreate\x20database\x20(with\x20confirmation);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20node\x20identity\x20and\x20licenses\x20are\x20preserved\x0a\x20\x20\x20\x20license\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20List\x20stored\x20licenses,\x20current\x20tier,\x20and\x20usage\x0a\x20\x20\x20\x20license\x20<blob|path>\x20\x20\x20\x20\x20\x20Add\x20a\x20license\x20blob\x20(or\x20read\x20from\x20a\x20.license\x20file)\x0a\x20\x20\x20\x20license\x20<activation>\x20\x20\x20\x20\x20Activate\x20a\x20previously-added\x20license\x20with\x20the\x20vendor\x27s\x20token\x0a\x20\x20\x20\x20license\x20<id>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20details\x20for\x20one\x20stored\x20license\x20(by\x20uuid\x20or\x20prefix)\x0a\x20\x20\x20\x20license\x20remove\x20<id>\x20\x20\x20\x20\x20\x20Remove\x20a\x20stored\x20license\x0a\x0a\x20\x20Environment\x20variables:\x0a\x20\x20\x20\x20OKDB_PORT\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20HTTP\x20port\x0a\x20\x20\x20\x20OKDB_PATH\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Database\x20directory\x0a\x20\x20\x20\x20OKDB_LOG_LEVEL\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Log\x20level\x20(debug|info|warn|error)\x0a\x20\x20\x20\x20OKDB_KEY\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Encryption\x20key\x0a\x20\x20\x20\x20OKDB_NO_REPL=1\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20REPL\x0a\x20\x20\x20\x20OKDB_NO_ADMIN=1\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20admin\x20UI\x0a\x20\x20\x20\x20OKDB_HTTP_WORKERS\x20\x20\x20\x20\x20\x20\x20\x20\x20Number\x20of\x20passive\x20HTTP\x20worker\x20processes\x20(default:\x20cores\x20−\x201;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20forced\x20to\x201\x20if\x20the\x20shmbuf\x20native\x20binding\x20is\x20unavailable)\x0a\x0a\x20\x20Config\x20file\x20(.kdbconfig)\x20—\x20JSON,\x20all\x20keys\x20optional:\x0a\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22port\x22:\x20\x20\x20\x20\x208484,\x0a\x20\x20\x20\x20\x20\x20\x22path\x22:\x20\x20\x20\x20\x20\x22./okdb-data\x22,\x0a\x20\x20\x20\x20\x20\x20\x22key\x22:\x20\x20\x20\x20\x20\x20\x22...\x22,\x0a\x20\x20\x20\x20\x20\x20\x22logLevel\x22:\x20\x22info\x22,\x0a\x20\x20\x20\x20\x20\x20\x22noAdmin\x22:\x20\x20false,\x0a\x20\x20\x20\x20\x20\x20\x22noRepl\x22:\x20\x20\x20false,\x0a\x20\x20\x20\x20\x20\x20\x22auth\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22open\x22:\x20false\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20Examples:\x0a\x20\x20\x20\x20okdb\x0a\x20\x20\x20\x20okdb\x20--port\x209000\x20--path\x20./mydb\x0a\x20\x20\x20\x20okdb\x20--no-repl\x20--port\x208080\x0a\x20\x20\x20\x20okdb\x20--open\x0a\x20\x20\x20\x20okdb\x20--open\x20192.168.1.0/24\x0a\x20\x20\x20\x20okdb\x20doctor\x0a\x20\x20\x20\x20okdb\x20backup\x20./my-backup\x0a');}const _0xffcb35=new Set([_0x3d2baa(0x2ac),'info','warn',_0x3d2baa(0x5bb)]);function _0x4a75c5(_0x39fccb){const _0x951dc3=_0x3d2baa,_0x2d11e3=_0x39fccb[_0x951dc3(0x199)]?_0x486778[_0x951dc3(0x3af)](_0x39fccb[_0x951dc3(0x199)]):_0x486778[_0x951dc3(0x3af)](_0x951dc3(0x48a));let _0x2f6d6f={};if(_0x1b4cbf[_0x951dc3(0x16e)](_0x2d11e3))try{const _0x1841e6=_0x1b4cbf[_0x951dc3(0x690)](_0x2d11e3,_0x951dc3(0x192))[_0x951dc3(0x32d)](/^\uFEFF/,'');_0x2f6d6f=JSON[_0x951dc3(0x2cc)](_0x1841e6),console[_0x951dc3(0x3e8)]('[okdb]\x20loaded\x20config:\x20'+_0x2d11e3);}catch(_0x4e9319){console[_0x951dc3(0x5bb)](_0x951dc3(0x26d)+_0x2d11e3+':\x20'+_0x4e9319['message']),process[_0x951dc3(0x4ba)](0x1);}const _0x222b84={'port':process.env.OKDB_PORT?Number(process.env.OKDB_PORT):undefined,'path':process.env.OKDB_PATH??undefined,'key':process.env.OKDB_KEY??undefined,'logLevel':process.env.OKDB_LOG_LEVEL??undefined,'noRepl':process.env.OKDB_NO_REPL==='1'?!![]:undefined,'noAdmin':process.env.OKDB_NO_ADMIN==='1'?!![]:undefined},_0x5c761d={'port':_0x39fccb[_0x951dc3(0x1e5)]??_0x2f6d6f[_0x951dc3(0x1e5)]??_0x222b84['port']??0x2124,'dbPath':_0x39fccb[_0x951dc3(0x4d4)]??_0x2f6d6f[_0x951dc3(0x4d4)]??_0x222b84[_0x951dc3(0x4d4)]??_0x951dc3(0x43a),'key':_0x39fccb[_0x951dc3(0x2dc)]??_0x2f6d6f[_0x951dc3(0x2dc)]??_0x222b84['key']??undefined,'logLevel':_0x39fccb['logLevel']??_0x2f6d6f['logLevel']??_0x222b84[_0x951dc3(0x3f2)]??_0x951dc3(0x400),'noRepl':_0x39fccb[_0x951dc3(0x4ec)]??_0x2f6d6f[_0x951dc3(0x4ec)]??_0x222b84[_0x951dc3(0x4ec)]??![],'noAdmin':_0x39fccb[_0x951dc3(0x575)]??_0x2f6d6f[_0x951dc3(0x575)]??_0x222b84[_0x951dc3(0x575)]??![],'admin':_0x2f6d6f['admin']??{},'api':_0x2f6d6f[_0x951dc3(0x29a)]??undefined,'auth':_0x2f6d6f[_0x951dc3(0x5c3)]??undefined,'mcp':_0x2f6d6f['mcp']??undefined,'http':_0x2f6d6f[_0x951dc3(0x48f)]??undefined,'timeMachine':_0x2f6d6f['timeMachine']!==![]?_0x2f6d6f[_0x951dc3(0x59e)]??{}:![]};if(_0x39fccb[_0x951dc3(0x174)])_0x5c761d[_0x951dc3(0x174)]=!![];if(_0x39fccb[_0x951dc3(0x6b7)]!==undefined)_0x5c761d['workersFlag']=_0x39fccb['workers'];return _0x39fccb[_0x951dc3(0x5a7)]!==undefined&&(_0x5c761d[_0x951dc3(0x5c3)]=_0x5c761d[_0x951dc3(0x5c3)]||{},_0x5c761d[_0x951dc3(0x5c3)][_0x951dc3(0x5a7)]=_0x39fccb[_0x951dc3(0x5a7)]),_0x39fccb[_0x951dc3(0x603)]&&(_0x5c761d[_0x951dc3(0x2ac)]=_0x5c761d[_0x951dc3(0x2ac)]||{},_0x5c761d['debug'][_0x951dc3(0x603)]=!![]),(!Number['isInteger'](_0x5c761d[_0x951dc3(0x1e5)])||_0x5c761d[_0x951dc3(0x1e5)]<0x1||_0x5c761d[_0x951dc3(0x1e5)]>0xffff)&&(console[_0x951dc3(0x5bb)](_0x951dc3(0x58d)+_0x5c761d[_0x951dc3(0x1e5)]+_0x951dc3(0x250)),process[_0x951dc3(0x4ba)](0x1)),!_0xffcb35[_0x951dc3(0x34a)](_0x5c761d['logLevel'])&&(console[_0x951dc3(0x5bb)](_0x951dc3(0x685)+_0x5c761d[_0x951dc3(0x3f2)]+_0x951dc3(0x68b)),process['exit'](0x1)),_0x5c761d;}function _0x5ead76(_0x1175d0){const _0x111ce3=_0x3d2baa;return!!(_0x1175d0&&typeof _0x1175d0===_0x111ce3(0x652)&&!Array['isArray'](_0x1175d0)&&Object['keys'](_0x1175d0)[_0x111ce3(0x4e2)]>0x0);}const _0x1327a3=!process[_0x3d2baa(0x54a)][_0x3d2baa(0x319)]||!!process.env.NO_COLOR;function _0x40b246(_0x1b1fd3,_0x2544cf){return _0x1327a3?_0x2544cf:'\x1b['+_0x1b1fd3+'m'+_0x2544cf+'\x1b[0m';}function _0x4fc8b6(_0x4088a5){const _0x43601f=_0x3d2baa;if(!_0x4088a5||_0x4088a5['length']===0x0)return;const _0x5d09a4='─'[_0x43601f(0x27e)](0x38);process['stderr'][_0x43601f(0x1d5)]('\x0a'),process[_0x43601f(0x63c)][_0x43601f(0x1d5)](_0x40b246('33','\x20\x20⚠\x20\x20'+_0x4088a5['length']+'\x20SECURITY\x20NOTICE'+(_0x4088a5[_0x43601f(0x4e2)]>0x1?'S':'')+'\x0a')),process[_0x43601f(0x63c)]['write']('\x20\x20'+_0x5d09a4+'\x0a');for(const _0xea65ac of _0x4088a5){const _0x25ec8a=_0xea65ac[_0x43601f(0x62e)]===_0x43601f(0x5bb)?_0x40b246('31',_0x43601f(0x217)):_0x40b246('33','\x20\x20⚠');process[_0x43601f(0x63c)][_0x43601f(0x1d5)](_0x25ec8a+'\x20\x20'+_0x40b246('1',_0xea65ac[_0x43601f(0x3dd)])+'\x0a'),process[_0x43601f(0x63c)][_0x43601f(0x1d5)](_0x43601f(0x54d)+_0xea65ac[_0x43601f(0x69b)]+'\x0a');if(_0xea65ac[_0x43601f(0x3f1)])process[_0x43601f(0x63c)][_0x43601f(0x1d5)](_0x43601f(0x54d)+_0x40b246('2',_0x43601f(0x430)+_0xea65ac[_0x43601f(0x3f1)])+'\x0a');process[_0x43601f(0x63c)][_0x43601f(0x1d5)]('\x0a');}process[_0x43601f(0x63c)][_0x43601f(0x1d5)]('\x20\x20'+_0x5d09a4+'\x0a\x0a');}function _0x5c20e9(_0xfbf130,_0x5cf5d5,_0x272c91={}){const _0x219ce6=_0x3d2baa,_0x4a80dc=_0xfbf130[_0x219ce6(0x48f)][_0x219ce6(0x2da)](_0x5cf5d5,_0x272c91);if(_0x4a80dc&&_0x4a80dc[_0x219ce6(0x259)])return Promise['resolve'](_0x4a80dc);return new Promise((_0x1af447,_0x395747)=>{const _0x5c4777=_0x219ce6;_0x4a80dc[_0x5c4777(0x228)](_0x5c4777(0x687),_0x1af447),_0x4a80dc['once'](_0x5c4777(0x5bb),_0x395747);});}async function _0x157ea3(_0x3ae33b){const _0x59a1a5=_0x3d2baa,_0x50da9b=require$$4$1;console[_0x59a1a5(0x3e8)](_0x59a1a5(0x18f));let _0x352baf=!![];const _0x4686ff=(_0x17b0e3,_0x42ee51)=>{const _0x1fbbc8=_0x59a1a5;console[_0x1fbbc8(0x3e8)]('\x20\x20'+(_0x17b0e3?'✓':'✗')+'\x20'+_0x42ee51);if(!_0x17b0e3)_0x352baf=![];},_0x11bb0d=Number(process[_0x59a1a5(0x143)]['replace']('v','')[_0x59a1a5(0x428)]('.')[0x0]);_0x4686ff(_0x11bb0d>=0x12,_0x59a1a5(0x3f6)+process['version']+(_0x11bb0d<0x12?_0x59a1a5(0x33d):''));const _0x1eeeaa=_0x486778[_0x59a1a5(0x3af)](_0x3ae33b[_0x59a1a5(0x1e3)]);try{_0x1b4cbf[_0x59a1a5(0x1f0)](_0x1eeeaa,{'recursive':!![]});const _0x5745e8=_0x486778['join'](_0x1eeeaa,_0x59a1a5(0x30e));_0x1b4cbf['writeFileSync'](_0x5745e8,''),_0x1b4cbf[_0x59a1a5(0x2f8)](_0x5745e8),_0x4686ff(!![],_0x59a1a5(0x328)+_0x1eeeaa);}catch(_0x4c9e4f){_0x4686ff(![],_0x59a1a5(0x2a0)+_0x1eeeaa+_0x59a1a5(0x4a4)+_0x4c9e4f['message']+')');}const _0x4c5915=await new Promise(_0x2ec384=>{const _0x2165d2=_0x59a1a5,_0x5467a0=_0x50da9b['createServer']();_0x5467a0[_0x2165d2(0x228)](_0x2165d2(0x5bb),()=>_0x2ec384(![])),_0x5467a0[_0x2165d2(0x228)](_0x2165d2(0x687),()=>{const _0x54aa59=_0x2165d2;_0x5467a0[_0x54aa59(0x5f3)](),_0x2ec384(!![]);}),_0x5467a0[_0x2165d2(0x2da)](_0x3ae33b['port'],_0x2165d2(0x297));});_0x4686ff(_0x4c5915,_0x59a1a5(0x508)+_0x3ae33b[_0x59a1a5(0x1e5)]+'\x20'+(_0x4c5915?'available':'already\x20in\x20use'));const _0x2d142f=_0x486778[_0x59a1a5(0x3af)](_0x59a1a5(0x48a));if(_0x1b4cbf[_0x59a1a5(0x16e)](_0x2d142f))try{JSON[_0x59a1a5(0x2cc)](_0x1b4cbf[_0x59a1a5(0x690)](_0x2d142f,_0x59a1a5(0x192))[_0x59a1a5(0x32d)](/^\uFEFF/,'')),_0x4686ff(!![],_0x59a1a5(0x4c7)+_0x2d142f);}catch(_0x42500c){_0x4686ff(![],_0x59a1a5(0x363)+_0x42500c[_0x59a1a5(0x69b)]);}else _0x4686ff(!![],_0x59a1a5(0x65e));if(_0x50aa77()){const _0x14e186=_0x23e5e4(_0x3ae33b,{'shmbufNative':!![]});_0x4686ff(!![],_0x59a1a5(0x52a)+_0x14e186+_0x59a1a5(0x525)+(_0x14e186===0x1?'':'s')+')');}else _0x4686ff(!![],_0x59a1a5(0x2a6));if(!_0x4c5915)try{const _0x580a9a=require('../okdb'),_0x25326c=new _0x580a9a(_0x1eeeaa,{'engines':![],'asyncProcessors':![],'compaction':'passive','http':![],'bus':![],'auth':{'open':!![]}});await _0x25326c[_0x59a1a5(0x5a7)]();try{await _0x25326c[_0x59a1a5(0x57c)][_0x59a1a5(0x5a7)]({'reader':!![]});const _0x34ee26=_0x25326c['processes'][_0x59a1a5(0x30b)](),_0x50f9d6=_0x34ee26[_0x59a1a5(0x3d5)](_0x406e83=>_0x406e83[_0x59a1a5(0x404)]!=null)[_0x59a1a5(0x4e2)];_0x4686ff(!![],'processes:\x20'+_0x34ee26[_0x59a1a5(0x4e2)]+_0x59a1a5(0x598)+(_0x34ee26['length']===0x1?'':'es')+'\x20('+_0x50f9d6+_0x59a1a5(0x2b0));}finally{await _0x25326c[_0x59a1a5(0x5f3)]();}}catch{}console[_0x59a1a5(0x3e8)](''),_0x352baf?console[_0x59a1a5(0x3e8)](_0x59a1a5(0x5b6)):(console[_0x59a1a5(0x3e8)](_0x59a1a5(0x1bf)),process[_0x59a1a5(0x4ba)](0x1));}async function _0x312d3d(){const _0x44ce22=_0x3d2baa,_0x16dfca=_0x486778['resolve'](_0x44ce22(0x48a));!_0x1b4cbf[_0x44ce22(0x16e)](_0x16dfca)?(_0x1b4cbf['writeFileSync'](_0x16dfca,JSON['stringify']({'port':0x2124,'path':_0x44ce22(0x43a),'logLevel':_0x44ce22(0x400),'noRepl':![],'noAdmin':![]},null,0x2)+'\x0a'),console[_0x44ce22(0x3e8)](_0x44ce22(0x67e))):console[_0x44ce22(0x3e8)](_0x44ce22(0x301));const _0xa15f9b=_0x486778[_0x44ce22(0x3af)](_0x44ce22(0x43a));!_0x1b4cbf['existsSync'](_0xa15f9b)?(_0x1b4cbf[_0x44ce22(0x1f0)](_0xa15f9b,{'recursive':!![]}),console[_0x44ce22(0x3e8)](_0x44ce22(0x563))):console[_0x44ce22(0x3e8)](_0x44ce22(0x4e4)),console['log'](_0x44ce22(0x486));}async function _0xb6d1cd(_0x9700fb){const _0x4d1c49=_0x3d2baa,_0x3b1107=_0x486778['resolve'](_0x9700fb[_0x4d1c49(0x1e3)]);if(!_0x1b4cbf[_0x4d1c49(0x16e)](_0x3b1107)){console[_0x4d1c49(0x3e8)]('[okdb]\x20nothing\x20to\x20reset\x20—\x20'+_0x3b1107+_0x4d1c49(0x4fe));return;}const _0x542eeb=require$$0$2,_0x898b61=_0x542eeb['createInterface']({'input':process[_0x4d1c49(0x5ce)],'output':process[_0x4d1c49(0x54a)]}),_0x4e2497=await new Promise(_0x19cb74=>_0x898b61['question'](_0x4d1c49(0x18d)+_0x3b1107+'?\x0a\x20\x20(node\x20identity\x20and\x20licenses\x20are\x20preserved)\x0a\x20\x20Type\x20\x22yes\x22\x20to\x20confirm:\x20',_0x19cb74));_0x898b61[_0x4d1c49(0x5f3)](),console[_0x4d1c49(0x3e8)]('');if(_0x4e2497[_0x4d1c49(0x2c3)]()[_0x4d1c49(0x246)]()!==_0x4d1c49(0x18c)){console[_0x4d1c49(0x3e8)](_0x4d1c49(0x248));return;}let _0x26f13e=null;try{_0x26f13e=await _0x1da471(_0x3b1107,_0x9700fb,async _0x48e95b=>{const _0xe473be=_0x4d1c49,_0x558982=_0x48e95b[_0xe473be(0x485)],_0x5742c7=_0x558982?.['db']?.[_0xe473be(0x165)](_0xe473be(0x38e))??null,_0xfe5269=[];if(_0x558982?.[_0xe473be(0x365)](_0xe473be(0x654)))for(const {key:_0x235094,value:_0x359f49}of _0x558982['getRange'](_0xe473be(0x654))){_0xfe5269['push']({'key':_0x235094,'value':_0x359f49});}return{'identity':_0x5742c7,'licenses':_0xfe5269};});}catch(_0x32ae7c){console[_0x4d1c49(0x3e8)](_0x4d1c49(0x24d)+_0x32ae7c[_0x4d1c49(0x69b)]+_0x4d1c49(0x2a9));}_0x1b4cbf['rmSync'](_0x3b1107,{'recursive':!![],'force':!![]}),console[_0x4d1c49(0x3e8)](_0x4d1c49(0x587)+_0x3b1107+_0x4d1c49(0x15c));if(_0x26f13e&&(_0x26f13e[_0x4d1c49(0x5b3)]||_0x26f13e[_0x4d1c49(0x137)][_0x4d1c49(0x4e2)]>0x0))try{await _0x1da471(_0x3b1107,_0x9700fb,async _0x3f8ed5=>{const _0x1a4c34=_0x4d1c49,_0x3ec0d3=_0x3f8ed5[_0x1a4c34(0x485)];_0x26f13e[_0x1a4c34(0x5b3)]&&_0x3ec0d3['db'][_0x1a4c34(0x261)](_0x1a4c34(0x38e),_0x26f13e['identity']);if(_0x26f13e['licenses'][_0x1a4c34(0x4e2)]>0x0){if(!_0x3ec0d3[_0x1a4c34(0x365)]('~licenses'))await _0x3ec0d3[_0x1a4c34(0x497)]('~licenses');for(const {key:_0xbe954a,value:_0x2a5e24}of _0x26f13e['licenses']){await _0x3ec0d3[_0x1a4c34(0x26b)]('~licenses',_0xbe954a,_0x2a5e24);}}});const _0x5cc1a0=[];if(_0x26f13e[_0x4d1c49(0x5b3)])_0x5cc1a0[_0x4d1c49(0x3fd)](_0x4d1c49(0x185));if(_0x26f13e[_0x4d1c49(0x137)]['length']>0x0)_0x5cc1a0['push'](_0x26f13e[_0x4d1c49(0x137)][_0x4d1c49(0x4e2)]+_0x4d1c49(0x45a));console[_0x4d1c49(0x3e8)]('[okdb]\x20preserved:\x20'+_0x5cc1a0[_0x4d1c49(0x2c7)]('\x20+\x20'));}catch(_0x3e69a7){console['log']('[okdb]\x20warning:\x20failed\x20to\x20restore\x20identity/licenses\x20after\x20reset:\x20'+_0x3e69a7[_0x4d1c49(0x69b)]);}}async function _0x1da471(_0x49ffea,_0x4a3daf,_0x2d19ab){const _0x44507b=_0x3d2baa,_0x820c5f=require$$5,_0x190bef=new _0x820c5f(_0x49ffea,{'admin':![],'mcp':![],'http':![],'timeMachine':![],'engines':![],'asyncProcessors':![],'compaction':_0x44507b(0x288),'bus':![],'_skipBootRuntime':!![],..._0x4a3daf[_0x44507b(0x2dc)]?{'encryptionKey':_0x4a3daf[_0x44507b(0x2dc)]}:{}});await _0x190bef[_0x44507b(0x5a7)]();try{return await _0x2d19ab(_0x190bef);}finally{await _0x190bef[_0x44507b(0x5f3)]();}}async function _0x4219dc(_0x582c11,_0x99ad78){const _0x41283c=_0x3d2baa,_0x1e62bb=require$$5,_0xf296de=_0x486778[_0x41283c(0x3af)](_0x99ad78[_0x41283c(0x1e3)]);console[_0x41283c(0x3e8)]('[okdb]\x20opening\x20'+_0xf296de+'…');const _0x4c9a09=new _0x1e62bb(_0xf296de,_0x99ad78[_0x41283c(0x2dc)]?{'encryptionKey':_0x99ad78[_0x41283c(0x2dc)]}:{});await _0x4c9a09[_0x41283c(0x5a7)](),console[_0x41283c(0x3e8)](_0x41283c(0x54b)+_0x582c11+'…');const {envs:_0x3af28b}=await _0x4c9a09[_0x41283c(0x595)]['backup'](_0x582c11);for(const _0x36109f of _0x3af28b){const _0x2dba39=_0x36109f['sizeBefore']>0x0?'\x20\x20('+(_0x36109f['sizeBefore']/0x400/0x400)['toFixed'](0x2)+_0x41283c(0x55b)+(_0x36109f[_0x41283c(0x3ae)]/0x400/0x400)[_0x41283c(0x367)](0x2)+_0x41283c(0x38b):'';console['log'](_0x41283c(0x561)+_0x36109f[_0x41283c(0x44d)]+'\x20\x20→\x20\x20'+_0x36109f[_0x41283c(0x439)]+_0x2dba39);}await _0x4c9a09[_0x41283c(0x5f3)](),console[_0x41283c(0x3e8)]('[okdb]\x20backup\x20complete');}async function _0x570ecb(_0x4605e7,_0x4e8ea2,_0x2ec3e9){const _0x2cce9e=_0x3d2baa,_0x27df11=require$$5,_0x5bd6b6=_0x486778[_0x2cce9e(0x3af)](_0x4e8ea2[_0x2cce9e(0x1e3)]),_0x204ac4=_0x2ec3e9[_0x2cce9e(0x5c4)]??_0x2cce9e(0x429),_0x4c5695=_0x2ec3e9[_0x2cce9e(0x523)]?_0x2ec3e9[_0x2cce9e(0x523)][_0x2cce9e(0x428)](',')[_0x2cce9e(0x145)](_0x4183f5=>_0x4183f5[_0x2cce9e(0x2c3)]()):null;console[_0x2cce9e(0x3e8)](_0x2cce9e(0x5a5)+_0x5bd6b6+'…');const _0x56b154=new _0x27df11(_0x5bd6b6,_0x4e8ea2[_0x2cce9e(0x2dc)]?{'encryptionKey':_0x4e8ea2['key']}:{});await _0x56b154[_0x2cce9e(0x5a7)](),console[_0x2cce9e(0x3e8)](_0x2cce9e(0x4ff)+_0x204ac4+_0x2cce9e(0x2e7)+_0x4605e7+'…');const _0x36998d=await _0x56b154[_0x2cce9e(0x595)][_0x2cce9e(0x1b3)](_0x4605e7,{'envName':_0x204ac4,'types':_0x4c5695,'includeChanges':!!_0x2ec3e9['changes']});console[_0x2cce9e(0x3e8)](_0x2cce9e(0x648)+_0x36998d['types']+_0x2cce9e(0x50d)+_0x36998d[_0x2cce9e(0x432)]+'\x20\x20changes='+_0x36998d[_0x2cce9e(0x556)]);if(_0x2ec3e9['blobs']){const _0x71dd63=_0x486778[_0x2cce9e(0x2c7)](_0x486778[_0x2cce9e(0x5f4)](_0x4605e7),'blobs');process['stdout'][_0x2cce9e(0x1d5)](_0x2cce9e(0x6c4));const {count:_0x5dfc47,bytes:_0x11a490}=await _0x56b154[_0x2cce9e(0x595)][_0x2cce9e(0x47f)](_0x71dd63);console['log'](_0x2cce9e(0x270)+_0x71dd63+'\x20\x20('+_0x5dfc47+_0x2cce9e(0x520)+(_0x5dfc47!==0x1?'s':'')+',\x20'+(_0x11a490/0x400/0x400)['toFixed'](0x2)+_0x2cce9e(0x38b));}await _0x56b154[_0x2cce9e(0x5f3)](),console[_0x2cce9e(0x3e8)](_0x2cce9e(0x56a));}async function _0x15f18b(_0x52ab42,_0x2fc7f7,_0x49d0c8){const _0x40bbff=_0x3d2baa,_0x4011ce=require$$5,_0x2b863a=_0x486778[_0x40bbff(0x3af)](_0x2fc7f7[_0x40bbff(0x1e3)]),_0x2a1823=_0x49d0c8['env']??null,_0xd1bf=_0x49d0c8['types']?_0x49d0c8['types'][_0x40bbff(0x428)](',')[_0x40bbff(0x145)](_0x54674c=>_0x54674c[_0x40bbff(0x2c3)]()):null,_0x495585=!!_0x49d0c8[_0x40bbff(0x589)];console[_0x40bbff(0x3e8)](_0x40bbff(0x5a5)+_0x2b863a+'…');const _0x4a17b8=new _0x4011ce(_0x2b863a,_0x2fc7f7[_0x40bbff(0x2dc)]?{'encryptionKey':_0x2fc7f7[_0x40bbff(0x2dc)]}:{});await _0x4a17b8['open'](),console['log']('[okdb]\x20importing\x20'+_0x52ab42+'…');const _0x5d43fb=await _0x4a17b8[_0x40bbff(0x595)][_0x40bbff(0x465)](_0x52ab42,{'envName':_0x2a1823,'types':_0xd1bf,'dropExisting':_0x495585,'includeChanges':!!_0x49d0c8[_0x40bbff(0x556)],'onProgress':({type:_0x303057,count:_0x23d61a})=>{const _0x37f804=_0x40bbff;process[_0x37f804(0x54a)][_0x37f804(0x1d5)](_0x37f804(0x2ae)+_0x303057+':\x20'+_0x23d61a+'\x20records…');}});process[_0x40bbff(0x54a)][_0x40bbff(0x1d5)]('\x0a'),console[_0x40bbff(0x3e8)](_0x40bbff(0x210)+_0x5d43fb[_0x40bbff(0x523)]+_0x40bbff(0x50d)+_0x5d43fb[_0x40bbff(0x432)]+'\x20\x20changes='+_0x5d43fb[_0x40bbff(0x556)]);if(_0x49d0c8[_0x40bbff(0x3bb)]){const _0x1f6495=_0x486778[_0x40bbff(0x2c7)](_0x486778[_0x40bbff(0x5f4)](_0x52ab42),_0x40bbff(0x3bb));if(_0x1b4cbf[_0x40bbff(0x16e)](_0x1f6495)){const {imported:_0x2466b3,skipped:_0x54cd5b}=await _0x4a17b8['migrate'][_0x40bbff(0x290)](_0x1f6495);console[_0x40bbff(0x3e8)]('[okdb]\x20blobs:\x20imported='+_0x2466b3+'\x20\x20skipped='+_0x54cd5b);}}await _0x4a17b8['close'](),console['log'](_0x40bbff(0x5d3));}async function _0x31046f(_0x5cde25,_0x23326b){const _0x372fe1=_0x3d2baa;_0x23326b[_0x372fe1(0x5d6)]&&!_0x23326b['name']&&(console[_0x372fe1(0x5bb)]('[okdb]\x20error:\x20--password\x20requires\x20--name'),process[_0x372fe1(0x4ba)](0x1));const _0x3949dc=_0x23326b[_0x372fe1(0x2c4)]?_0x23326b[_0x372fe1(0x2c4)][_0x372fe1(0x428)](',')[_0x372fe1(0x145)](_0x130d5e=>_0x130d5e[_0x372fe1(0x2c3)]())[_0x372fe1(0x3d5)](Boolean):[];let _0x1a8b3f={};if(_0x23326b['grants'])try{_0x1a8b3f=JSON[_0x372fe1(0x2cc)](_0x23326b[_0x372fe1(0x40f)]);if(typeof _0x1a8b3f!=='object'||Array[_0x372fe1(0x478)](_0x1a8b3f)||_0x1a8b3f===null)throw new Error();}catch{console[_0x372fe1(0x5bb)]('[okdb]\x20error:\x20--grants\x20must\x20be\x20valid\x20JSON\x20object'),process[_0x372fe1(0x4ba)](0x1);}const _0x4f31ec=require$$5,{randomToken:_0x52f3e3,hashToken:_0x4d4628,hashPassword:_0x13ba28}=requireOkdbAuthTokens(),_0xb490a=require$$2,_0xb86dab=_0x486778[_0x372fe1(0x3af)](_0x5cde25[_0x372fe1(0x1e3)]),_0xbfb723=new _0x4f31ec(_0xb86dab,_0x5cde25['key']?{'encryptionKey':_0x5cde25[_0x372fe1(0x2dc)]}:{});await _0xbfb723['open']();try{await _0xbfb723[_0x372fe1(0x5c3)][_0x372fe1(0x54e)]();if(_0x23326b[_0x372fe1(0x44d)]){const _0x220032=await _0xbfb723[_0x372fe1(0x5c3)][_0x372fe1(0x41a)](_0x23326b['name']);_0x220032&&(console['error'](_0x372fe1(0x29b)+_0x23326b['name']+_0x372fe1(0x3b3)),process['exit'](0x1));}const _0xa507ec=_0x52f3e3(0x20),_0x3e1b06=_0x4d4628(_0xa507ec),_0x2b13ea=_0x23326b[_0x372fe1(0x5d6)]?await _0x13ba28(_0x23326b['password']):null,_0x12174d=_0xb490a[_0x372fe1(0x21b)](),_0x162aa1={'tokenHash':_0x3e1b06,'name':_0x23326b[_0x372fe1(0x44d)]||null,'passwordHash':_0x2b13ea,'label':_0x23326b[_0x372fe1(0x28a)]||null,'permissions':_0x3949dc,'grants':_0x1a8b3f,'createdAt':Date[_0x372fe1(0x263)](),'lastUsedAt':null},_0x5436b4=_0x23326b['ttl']?{'ttl':Number(_0x23326b[_0x372fe1(0x382)])}:undefined;await _0xbfb723[_0x372fe1(0x485)][_0x372fe1(0x26b)](_0x372fe1(0x1ea),_0x12174d,_0x162aa1,_0x5436b4),console['log'](_0x372fe1(0x5d1)),console[_0x372fe1(0x3e8)]('\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x12174d),console['log'](_0x372fe1(0x3fe)+(_0x23326b[_0x372fe1(0x44d)]||_0x372fe1(0x388))),console[_0x372fe1(0x3e8)](_0x372fe1(0x62c)+(_0x23326b[_0x372fe1(0x28a)]||_0x372fe1(0x388))),console[_0x372fe1(0x3e8)]('\x20\x20\x20\x20permissions:\x20'+(_0x3949dc[_0x372fe1(0x2c7)](',\x20')||_0x372fe1(0x17d))),console[_0x372fe1(0x3e8)]('\x0a\x20\x20Raw\x20token\x20(shown\x20once,\x20save\x20it\x20now):\x0a'),console[_0x372fe1(0x3e8)](_0x372fe1(0x53a)+_0xa507ec+'\x0a');}finally{await _0xbfb723[_0x372fe1(0x5f3)]();}}async function _0x48b763(_0x24eb9b){const _0x95d143=_0x3d2baa,_0x2bcd23=require$$5,_0x4625db=_0x486778[_0x95d143(0x3af)](_0x24eb9b[_0x95d143(0x1e3)]),_0x2da8e8=new _0x2bcd23(_0x4625db,_0x24eb9b[_0x95d143(0x2dc)]?{'encryptionKey':_0x24eb9b['key']}:{});await _0x2da8e8[_0x95d143(0x5a7)]();try{const _0xf92aec=_0x2da8e8[_0x95d143(0x485)];if(!_0xf92aec||!_0xf92aec[_0x95d143(0x365)](_0x95d143(0x1ea))){console['log'](_0x95d143(0x640));return;}const _0x3fc9a0=[];for(const {key:_0x3b06b3,value:_0x5f0f97}of _0xf92aec[_0x95d143(0x47b)](_0x95d143(0x1ea))){_0x3fc9a0[_0x95d143(0x3fd)]({'id':_0x3b06b3,'name':_0x5f0f97[_0x95d143(0x44d)]||_0x95d143(0x388),'label':_0x5f0f97['label']||_0x95d143(0x388),'permissions':Array[_0x95d143(0x478)](_0x5f0f97[_0x95d143(0x2c4)])?_0x5f0f97[_0x95d143(0x2c4)][_0x95d143(0x2c7)](','):'','created':_0x5f0f97['createdAt']?new Date(_0x5f0f97[_0x95d143(0x4b6)])[_0x95d143(0x514)]()[_0x95d143(0x149)](0x0,0xa):''});}if(_0x3fc9a0[_0x95d143(0x4e2)]===0x0){console[_0x95d143(0x3e8)](_0x95d143(0x640));return;}const _0x7646e5=!process[_0x95d143(0x54a)][_0x95d143(0x632)]||process[_0x95d143(0x54a)]['columns']>=0x64,_0x2451c7=_0x7646e5?0x24:0xa,_0x4b23a5=['ID'[_0x95d143(0x3be)](_0x2451c7),_0x95d143(0x5e8)[_0x95d143(0x3be)](0x10),_0x95d143(0x61d)[_0x95d143(0x3be)](0x14),_0x95d143(0x6d5)[_0x95d143(0x3be)](0x14),_0x95d143(0x150)][_0x95d143(0x2c7)]('\x20\x20');console[_0x95d143(0x3e8)]('\x0a'+_0x4b23a5),console[_0x95d143(0x3e8)]('-'[_0x95d143(0x27e)](_0x4b23a5['length']));for(const _0x158abc of _0x3fc9a0){const _0x1d7288=_0x7646e5?_0x158abc['id']:_0x158abc['id']['slice'](0x0,0x8)+'…';console['log']([_0x1d7288[_0x95d143(0x3be)](_0x2451c7),_0x158abc[_0x95d143(0x44d)][_0x95d143(0x149)](0x0,0x10)['padEnd'](0x10),_0x158abc[_0x95d143(0x28a)]['slice'](0x0,0x14)[_0x95d143(0x3be)](0x14),_0x158abc['permissions'][_0x95d143(0x149)](0x0,0x14)[_0x95d143(0x3be)](0x14),_0x158abc['created']]['join']('\x20\x20'));}console[_0x95d143(0x3e8)]('');}finally{await _0x2da8e8[_0x95d143(0x5f3)]();}}async function _0x42690d(_0x557c6a,_0x4f4414){const _0xf2842f=_0x3d2baa;!_0x557c6a&&(console['error'](_0xf2842f(0x390)),process[_0xf2842f(0x4ba)](0x1));const _0x15014d=require$$5,_0x6c13e9=_0x486778['resolve'](_0x4f4414[_0xf2842f(0x1e3)]),_0x4f7a95=new _0x15014d(_0x6c13e9,_0x4f4414[_0xf2842f(0x2dc)]?{'encryptionKey':_0x4f4414[_0xf2842f(0x2dc)]}:{});await _0x4f7a95[_0xf2842f(0x5a7)]();try{const _0x37ae11=_0x4f7a95[_0xf2842f(0x485)];(!_0x37ae11||!_0x37ae11['hasType'](_0xf2842f(0x1ea)))&&(console[_0xf2842f(0x5bb)](_0xf2842f(0x602)+_0x557c6a+'\x22'),process[_0xf2842f(0x4ba)](0x1));let _0x45810c=null,_0x5774cc=null;const _0x343810=_0x37ae11[_0xf2842f(0x165)](_0xf2842f(0x1ea),_0x557c6a);if(_0x343810)_0x45810c=_0x557c6a,_0x5774cc=_0x343810;else{const _0x107ba8=[];for(const {key:_0x66dca5,value:_0x3b505c}of _0x37ae11[_0xf2842f(0x47b)](_0xf2842f(0x1ea))){if(_0x66dca5[_0xf2842f(0x15f)](_0x557c6a))_0x107ba8[_0xf2842f(0x3fd)]({'key':_0x66dca5,'value':_0x3b505c});}_0x107ba8[_0xf2842f(0x4e2)]===0x0&&(console[_0xf2842f(0x5bb)](_0xf2842f(0x602)+_0x557c6a+'\x22'),process['exit'](0x1));if(_0x107ba8[_0xf2842f(0x4e2)]>0x1){console[_0xf2842f(0x5bb)](_0xf2842f(0x69d)+_0x557c6a+_0xf2842f(0x2c9)+_0x107ba8[_0xf2842f(0x4e2)]+_0xf2842f(0x1ae));for(const _0x5f152c of _0x107ba8){console[_0xf2842f(0x5bb)]('\x20\x20'+_0x5f152c['key']+_0xf2842f(0x5a3)+(_0x5f152c[_0xf2842f(0x222)][_0xf2842f(0x44d)]||_0xf2842f(0x388))+')');}process[_0xf2842f(0x4ba)](0x1);}_0x45810c=_0x107ba8[0x0][_0xf2842f(0x2dc)],_0x5774cc=_0x107ba8[0x0]['value'];}await _0x37ae11[_0xf2842f(0x280)](_0xf2842f(0x1ea),_0x45810c),console[_0xf2842f(0x3e8)](_0xf2842f(0x469)+_0x45810c+'\x20\x20(name:\x20'+(_0x5774cc[_0xf2842f(0x44d)]||_0xf2842f(0x388))+_0xf2842f(0x67d)+(_0x5774cc[_0xf2842f(0x28a)]||'(unset)')+')');}finally{await _0x4f7a95[_0xf2842f(0x5f3)]();}}function _0x4ca556(_0xc8e509,_0x45be28){const _0x1621de=_0x3d2baa;if(!_0xc8e509[_0x1621de(0x6a1)])return'pending';const _0x124980=_0xc8e509[_0x1621de(0x653)];if(!_0x124980)return _0x1621de(0x4f5);if(_0x45be28>_0x124980)return _0x1621de(0x2b7);return _0x1621de(0x4f5);}function _0x684ecf(_0x58169b){const _0x18e6a9=_0x3d2baa;if(!_0x58169b||typeof _0x58169b!=='object')return'';const _0x357eb3=Object[_0x18e6a9(0x65b)](_0x58169b)[_0x18e6a9(0x3d5)](([,_0x30c547])=>_0x30c547)['map'](([_0x326a1a])=>_0x326a1a);if(_0x357eb3[_0x18e6a9(0x4e2)]===0x0)return _0x18e6a9(0x17d);if(_0x357eb3['length']<=0x3)return _0x357eb3[_0x18e6a9(0x2c7)]('\x20');return _0x357eb3[_0x18e6a9(0x149)](0x0,0x3)[_0x18e6a9(0x2c7)]('\x20')+('\x20+'+(_0x357eb3[_0x18e6a9(0x4e2)]-0x3));}async function _0x26de81(_0x2db11c){const _0x2b78f3=_0x3d2baa,_0x18cf62=require$$5,_0x383d26=requireOkdbLicenseCodec(),{_C:_0x3364ea}=requireOkdbLicense(),_0x588501=_0x486778[_0x2b78f3(0x3af)](_0x2db11c['dbPath']),_0x2976ac=new _0x18cf62(_0x588501,_0x2db11c[_0x2b78f3(0x2dc)]?{'encryptionKey':_0x2db11c[_0x2b78f3(0x2dc)]}:{});await _0x2976ac[_0x2b78f3(0x5a7)]();try{const _0x16f049=_0x2976ac[_0x2b78f3(0x485)],_0x34bb27=_0x16f049?.['db']?.[_0x2b78f3(0x165)]?.(_0x2b78f3(0x1dd))??0x0,_0x3223af=[..._0x2976ac[_0x2b78f3(0x4fa)]['keys']()][_0x2b78f3(0x3d5)](_0xb35f8d=>!_0xb35f8d[_0x2b78f3(0x15f)]('~'))[_0x2b78f3(0x4e2)],_0x132b35=_0x2976ac[_0x2b78f3(0x343)]?.[_0x2b78f3(0x1d3)];if(_0x132b35){const _0x329168=_0x132b35[_0x2b78f3(0x3db)]===!![],_0x637e67=_0x329168?_0x2b78f3(0x1ba):_0x2976ac[_0x2b78f3(0x343)][_0x2b78f3(0x4f5)]?.[_0x2b78f3(0x576)]||_0x2b78f3(0x225);console[_0x2b78f3(0x3e8)](''),console[_0x2b78f3(0x3e8)](_0x2b78f3(0x484)+_0x637e67);const _0x54552e=_0x132b35['limits']||{};if(_0x54552e[_0x2b78f3(0x688)]){const _0x53b316=Math[_0x2b78f3(0x1db)](_0x34bb27/_0x54552e[_0x2b78f3(0x688)]*0x64);console['log'](_0x2b78f3(0x324)+_0x34bb27[_0x2b78f3(0x5cd)]()+_0x2b78f3(0x441)+_0x54552e[_0x2b78f3(0x688)][_0x2b78f3(0x5cd)]()+'\x20\x20('+_0x53b316+'%)');}else console[_0x2b78f3(0x3e8)]('\x20\x20Writes:\x20\x20'+_0x34bb27[_0x2b78f3(0x5cd)]());_0x54552e[_0x2b78f3(0x2cf)]?console[_0x2b78f3(0x3e8)](_0x2b78f3(0x698)+_0x3223af+_0x2b78f3(0x441)+_0x54552e[_0x2b78f3(0x2cf)]):console[_0x2b78f3(0x3e8)](_0x2b78f3(0x698)+_0x3223af),_0x3364ea?.[_0x2b78f3(0x1e9)]&&console[_0x2b78f3(0x3e8)](_0x2b78f3(0x219)+_0x3364ea[_0x2b78f3(0x1e9)]+_0x2b78f3(0x555));}if(!_0x16f049||!_0x16f049['hasType'](_0x2b78f3(0x654))){console[_0x2b78f3(0x3e8)](''),console[_0x2b78f3(0x3e8)](_0x2b78f3(0x694)),console[_0x2b78f3(0x3e8)]('');return;}const _0x596802=[],_0x23ca8d=Date[_0x2b78f3(0x263)](),_0xd85419=_0x2976ac['id'],_0x29f312=_0x2b78f3(0x39a);for(const {key:_0x20aa8c,value:_0x23853b}of _0x16f049[_0x2b78f3(0x47b)](_0x2b78f3(0x654))){const _0x5f1c05=_0x23853b[_0x2b78f3(0x32b)]?Buffer[_0x2b78f3(0x4ce)](_0x23853b[_0x2b78f3(0x32b)],'hex'):Buffer['alloc'](0x8);let _0x501623='';try{_0x501623=_0x383d26[_0x2b78f3(0x56d)](_0xd85419,_0x5f1c05,_0x29f312)[_0x2b78f3(0x460)];}catch{}_0x596802[_0x2b78f3(0x3fd)]({'id':_0x20aa8c,'licensee':_0x23853b[_0x2b78f3(0x576)]||'','expires':_0x23853b[_0x2b78f3(0x653)]?new Date(_0x23853b['expiresAt'])['toISOString']()['slice'](0x0,0xa):'','features':_0x684ecf(_0x23853b[_0x2b78f3(0x26e)]),'pin':_0x501623,'status':_0x4ca556(_0x23853b,_0x23ca8d)});}if(_0x596802[_0x2b78f3(0x4e2)]===0x0){console[_0x2b78f3(0x3e8)](''),console['log'](_0x2b78f3(0x694)),console['log']('');return;}const _0x27fed4=['\x20\x20'+'ID'[_0x2b78f3(0x3be)](0xe),_0x2b78f3(0x479)[_0x2b78f3(0x3be)](0xe),_0x2b78f3(0x3f9)[_0x2b78f3(0x3be)](0xc),'FEATURES'['padEnd'](0x1e),_0x2b78f3(0x5c1)[_0x2b78f3(0x3be)](0xa),'STATUS'][_0x2b78f3(0x2c7)]('\x20');console['log']('\x0a'+_0x27fed4);for(const _0x225be7 of _0x596802){const _0x507e77=_0x225be7['id'][_0x2b78f3(0x149)](0x0,0x8)+'…';console[_0x2b78f3(0x3e8)](['\x20\x20'+_0x507e77[_0x2b78f3(0x3be)](0xe),_0x225be7['licensee'][_0x2b78f3(0x149)](0x0,0xe)[_0x2b78f3(0x3be)](0xe),_0x225be7[_0x2b78f3(0x298)][_0x2b78f3(0x3be)](0xc),_0x225be7[_0x2b78f3(0x26e)][_0x2b78f3(0x149)](0x0,0x1e)[_0x2b78f3(0x3be)](0x1e),_0x225be7['pin'][_0x2b78f3(0x3be)](0xa),_0x225be7['status']][_0x2b78f3(0x2c7)]('\x20'));}console[_0x2b78f3(0x3e8)]('');}finally{await _0x2976ac[_0x2b78f3(0x5f3)]();}}async function _0x5e8017(_0x5b1266,_0x4c30ff){const _0x585336=_0x3d2baa,_0x7aa005=require$$5,_0x3e90cc=requireOkdbLicenseCodec();let _0x1bcbf3=_0x5b1266;(_0x3e90cc[_0x585336(0x341)](_0x5b1266)===_0x585336(0x4d4)||_0x1b4cbf[_0x585336(0x16e)](_0x5b1266)&&_0x1b4cbf[_0x585336(0x391)](_0x5b1266)[_0x585336(0x49f)]())&&(_0x1bcbf3=_0x1b4cbf[_0x585336(0x690)](_0x5b1266,_0x585336(0x192))[_0x585336(0x2c3)]());const _0x35f9d6=_0x486778[_0x585336(0x3af)](_0x4c30ff['dbPath']),_0x546d11=new _0x7aa005(_0x35f9d6,_0x4c30ff['key']?{'encryptionKey':_0x4c30ff['key']}:{});await _0x546d11['open']();try{!_0x546d11['_license']&&(console[_0x585336(0x5bb)]('[okdb]\x20error:\x20license\x20management\x20is\x20only\x20available\x20in\x20licensed\x20builds\x20(npm\x20run\x20build:prod).'),process[_0x585336(0x4ba)](0x1));let _0x229371;try{_0x229371=await _0x546d11[_0x585336(0x343)][_0x585336(0x24a)](_0x1bcbf3);}catch(_0x576a02){console['error'](_0x585336(0x2f7)+_0x576a02[_0x585336(0x69b)]),process[_0x585336(0x4ba)](0x1);}const _0x28ae22=_0x546d11['_license'][_0x585336(0x5d7)](),_0x3f8c65=_0x28ae22[_0x585336(0x323)](_0x2aaa11=>_0x2aaa11[_0x585336(0x605)]===_0x229371['id'])?.['pin']||'',_0x955bae=Object['entries'](_0x229371[_0x585336(0x26e)]||{})[_0x585336(0x3d5)](([,_0x17ec5f])=>_0x17ec5f)[_0x585336(0x145)](([_0x33d3da])=>_0x33d3da),_0x408c4f=_0x229371[_0x585336(0x4b2)]||{},_0xd982c0=[_0x408c4f[_0x585336(0x2cf)]?_0x585336(0x6b2)+_0x408c4f[_0x585336(0x2cf)]:null,_0x408c4f['typesPerEnv']?'types/env='+_0x408c4f[_0x585336(0x590)]:null,_0x408c4f[_0x585336(0x492)]?_0x585336(0x27b)+_0x408c4f['syncPeers']:null,_0x408c4f[_0x585336(0x688)]?_0x585336(0x4ab)+_0x408c4f[_0x585336(0x688)][_0x585336(0x5cd)]():null][_0x585336(0x3d5)](Boolean)[_0x585336(0x2c7)]('\x20\x20'),_0x45060c=_0x229371['licenseType']===_0x3e90cc['LICENSE_TYPE_OPEN'];console[_0x585336(0x3e8)](_0x585336(0x3f3)),console[_0x585336(0x3e8)](_0x585336(0x1f5)+_0x229371['id']),console[_0x585336(0x3e8)]('\x20\x20\x20\x20licensee:\x20\x20'+_0x229371[_0x585336(0x576)]),console[_0x585336(0x3e8)](_0x585336(0x181)+new Date(_0x229371[_0x585336(0x653)])[_0x585336(0x514)]()[_0x585336(0x149)](0x0,0xa)),console[_0x585336(0x3e8)](_0x585336(0x209)+(_0x955bae['join'](',\x20')||_0x585336(0x17d)));if(_0xd982c0)console[_0x585336(0x3e8)](_0x585336(0x2d9)+_0xd982c0);_0x45060c?(console[_0x585336(0x3e8)]('\x20\x20\x20\x20status:\x20\x20\x20\x20active\x20\x20(open\x20license\x20—\x20no\x20activation\x20needed)'),console[_0x585336(0x3e8)]('')):(console[_0x585336(0x3e8)](_0x585336(0x2c6)+_0x3f8c65),console[_0x585336(0x3e8)](_0x585336(0x6c2)),console[_0x585336(0x3e8)](''),console[_0x585336(0x3e8)](_0x585336(0x2a2)),console[_0x585336(0x3e8)](_0x585336(0x1e4)+_0x3f8c65+_0x585336(0x19f)),console['log'](_0x585336(0x33c)),console['log'](_0x585336(0x310)),console[_0x585336(0x3e8)](''));}finally{await _0x546d11[_0x585336(0x5f3)]();}}async function _0x1febb7(_0x31037b,_0x2d2a75){const _0x18020b=_0x3d2baa,_0x18d52a=require$$5,_0x442063=_0x486778[_0x18020b(0x3af)](_0x2d2a75[_0x18020b(0x1e3)]),_0x1c26d8=new _0x18d52a(_0x442063,_0x2d2a75[_0x18020b(0x2dc)]?{'encryptionKey':_0x2d2a75[_0x18020b(0x2dc)]}:{});await _0x1c26d8['open']();try{!_0x1c26d8[_0x18020b(0x343)]&&(console['error'](_0x18020b(0x543)),process[_0x18020b(0x4ba)](0x1));let _0x484ef6;try{_0x484ef6=await _0x1c26d8[_0x18020b(0x343)][_0x18020b(0x2b2)](_0x31037b['trim']());}catch(_0x12b575){console[_0x18020b(0x5bb)](_0x18020b(0x2f7)+_0x12b575['message']),console[_0x18020b(0x5bb)](''),console['error']('\x20\x20Common\x20causes:'),console[_0x18020b(0x5bb)](_0x18020b(0x5f8)),console[_0x18020b(0x5bb)](_0x18020b(0x578)),console['error']('\x20\x20\x20\x20-\x20The\x20activation\x20token\x20has\x20expired\x20—\x20request\x20a\x20fresh\x20one.'),console[_0x18020b(0x5bb)](''),process[_0x18020b(0x4ba)](0x1);}console[_0x18020b(0x3e8)]('\x0a\x20\x20✓\x20License\x20activated'),console[_0x18020b(0x3e8)](_0x18020b(0x1f5)+_0x484ef6['id']),console['log'](_0x18020b(0x6a9)+_0x484ef6[_0x18020b(0x576)]),console['log'](_0x18020b(0x181)+new Date(_0x484ef6[_0x18020b(0x653)])['toISOString']()['slice'](0x0,0xa)),console[_0x18020b(0x3e8)](_0x18020b(0x1cf)),console[_0x18020b(0x3e8)]('');}finally{await _0x1c26d8[_0x18020b(0x5f3)]();}}async function _0x2ccdf4(_0x9dcd2c,_0x2bd8e5){const _0x39d2c2=_0x3d2baa;!_0x9dcd2c&&(console[_0x39d2c2(0x5bb)]('[okdb]\x20error:\x20show\x20requires\x20an\x20id\x20argument'),process[_0x39d2c2(0x4ba)](0x1));const _0x17a175=require$$5,_0x3d01bb=requireOkdbLicenseCodec(),_0x1af82a=_0x486778['resolve'](_0x2bd8e5[_0x39d2c2(0x1e3)]),_0x47ba3a=new _0x17a175(_0x1af82a,_0x2bd8e5[_0x39d2c2(0x2dc)]?{'encryptionKey':_0x2bd8e5[_0x39d2c2(0x2dc)]}:{});await _0x47ba3a[_0x39d2c2(0x5a7)]();try{const _0xde7b3d=_0x47ba3a['_systemEnv'];(!_0xde7b3d||!_0xde7b3d[_0x39d2c2(0x365)](_0x39d2c2(0x654)))&&(console[_0x39d2c2(0x5bb)]('[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22'+_0x9dcd2c+'\x22'),process[_0x39d2c2(0x4ba)](0x1));let _0x3dadf7=null,_0x535e8d=null;const _0x1d7272=_0xde7b3d[_0x39d2c2(0x165)]('~licenses',_0x9dcd2c);if(_0x1d7272)_0x3dadf7=_0x9dcd2c,_0x535e8d=_0x1d7272;else{const _0x45e626=[];for(const {key:_0x93c5e5,value:_0x4020f2}of _0xde7b3d[_0x39d2c2(0x47b)](_0x39d2c2(0x654))){if(_0x93c5e5[_0x39d2c2(0x15f)](_0x9dcd2c))_0x45e626[_0x39d2c2(0x3fd)]({'key':_0x93c5e5,'value':_0x4020f2});}_0x45e626['length']===0x0&&(console[_0x39d2c2(0x5bb)](_0x39d2c2(0x624)+_0x9dcd2c+'\x22'),process[_0x39d2c2(0x4ba)](0x1)),_0x45e626[_0x39d2c2(0x4e2)]>0x1&&(console[_0x39d2c2(0x5bb)](_0x39d2c2(0x69d)+_0x9dcd2c+_0x39d2c2(0x2c9)+_0x45e626[_0x39d2c2(0x4e2)]+_0x39d2c2(0x2ee)),process[_0x39d2c2(0x4ba)](0x1)),_0x3dadf7=_0x45e626[0x0][_0x39d2c2(0x2dc)],_0x535e8d=_0x45e626[0x0][_0x39d2c2(0x222)];}const _0x48d1d7=Date[_0x39d2c2(0x263)](),_0x306363=_0x4ca556(_0x535e8d,_0x48d1d7),_0x4917c1=_0x47ba3a['id'],_0x440c91=_0x39d2c2(0x39a);let _0x6ed10d='';try{const _0x3b56b0=Buffer['from'](_0x535e8d[_0x39d2c2(0x32b)],'hex');_0x6ed10d=_0x3d01bb[_0x39d2c2(0x56d)](_0x4917c1,_0x3b56b0,_0x440c91)[_0x39d2c2(0x460)];}catch{}const _0x408f90=_0x535e8d['features']?Object[_0x39d2c2(0x65b)](_0x535e8d[_0x39d2c2(0x26e)])[_0x39d2c2(0x3d5)](([,_0x4a39ba])=>_0x4a39ba)[_0x39d2c2(0x145)](([_0x4b2ecb])=>_0x4b2ecb):[],_0x38a9e7=_0x535e8d[_0x39d2c2(0x4b2)]||{},_0x2013cb=_0xde7b3d?.['db']?.[_0x39d2c2(0x165)]?.(_0x39d2c2(0x1dd))??0x0,_0x1fd05a=[..._0x47ba3a['_envs']['keys']()][_0x39d2c2(0x3d5)](_0x52a7f3=>!_0x52a7f3[_0x39d2c2(0x15f)]('~'))['length'];console[_0x39d2c2(0x3e8)](_0x39d2c2(0x57b)),console['log'](_0x39d2c2(0x1f5)+_0x3dadf7),console[_0x39d2c2(0x3e8)](_0x39d2c2(0x6a9)+(_0x535e8d[_0x39d2c2(0x576)]||'')),console[_0x39d2c2(0x3e8)](_0x39d2c2(0x181)+(_0x535e8d['expiresAt']?new Date(_0x535e8d[_0x39d2c2(0x653)])[_0x39d2c2(0x514)]()[_0x39d2c2(0x149)](0x0,0xa):'')),console[_0x39d2c2(0x3e8)](_0x39d2c2(0x209)+(_0x408f90['join'](',\x20')||'(none)')),console[_0x39d2c2(0x3e8)](_0x39d2c2(0x2c6)+_0x6ed10d),console[_0x39d2c2(0x3e8)]('\x20\x20\x20\x20status:\x20\x20\x20\x20'+_0x306363),console[_0x39d2c2(0x3e8)](_0x39d2c2(0x13d)+new Date(_0x535e8d[_0x39d2c2(0x64a)])[_0x39d2c2(0x514)]());if(_0x306363===_0x39d2c2(0x4f5)){console['log'](''),console[_0x39d2c2(0x3e8)](_0x39d2c2(0x13b));if(_0x38a9e7['maxWrites']){const _0xa88cdf=Math[_0x39d2c2(0x1db)](_0x2013cb/_0x38a9e7[_0x39d2c2(0x688)]*0x64);console[_0x39d2c2(0x3e8)](_0x39d2c2(0x24c)+_0x2013cb[_0x39d2c2(0x5cd)]()+_0x39d2c2(0x441)+_0x38a9e7['maxWrites'][_0x39d2c2(0x5cd)]()+_0x39d2c2(0x4a4)+_0xa88cdf+'%)');}else console['log']('\x20\x20\x20\x20writes:\x20\x20\x20\x20'+_0x2013cb[_0x39d2c2(0x5cd)]()+_0x39d2c2(0x169));_0x38a9e7[_0x39d2c2(0x2cf)]?console[_0x39d2c2(0x3e8)](_0x39d2c2(0x6ab)+_0x1fd05a+_0x39d2c2(0x441)+_0x38a9e7[_0x39d2c2(0x2cf)]):console[_0x39d2c2(0x3e8)](_0x39d2c2(0x6ab)+_0x1fd05a+'\x20\x20(unlimited)');}console[_0x39d2c2(0x3e8)]('');}finally{await _0x47ba3a['close']();}}async function _0x42e5fb(_0x3920ca,_0x33f89a){const _0x53453f=_0x3d2baa;!_0x3920ca&&(console[_0x53453f(0x5bb)](_0x53453f(0x2e6)),process[_0x53453f(0x4ba)](0x1));const _0x169003=require$$5,_0x514f0e=_0x486778[_0x53453f(0x3af)](_0x33f89a[_0x53453f(0x1e3)]),_0x1c8ebc=new _0x169003(_0x514f0e,_0x33f89a[_0x53453f(0x2dc)]?{'encryptionKey':_0x33f89a['key']}:{});await _0x1c8ebc[_0x53453f(0x5a7)]();try{const _0x5af5df=_0x1c8ebc['_systemEnv'];(!_0x5af5df||!_0x5af5df[_0x53453f(0x365)](_0x53453f(0x654)))&&(console[_0x53453f(0x5bb)](_0x53453f(0x624)+_0x3920ca+'\x22'),process[_0x53453f(0x4ba)](0x1));let _0x1951bf=null,_0x278ff7=null;const _0xbe44e1=_0x5af5df[_0x53453f(0x165)](_0x53453f(0x654),_0x3920ca);if(_0xbe44e1)_0x1951bf=_0x3920ca,_0x278ff7=_0xbe44e1;else{const _0x3e02e8=[];for(const {key:_0x373acd,value:_0x5e5654}of _0x5af5df[_0x53453f(0x47b)]('~licenses')){if(_0x373acd[_0x53453f(0x15f)](_0x3920ca))_0x3e02e8['push']({'key':_0x373acd,'value':_0x5e5654});}_0x3e02e8['length']===0x0&&(console['error'](_0x53453f(0x624)+_0x3920ca+'\x22'),process[_0x53453f(0x4ba)](0x1)),_0x3e02e8[_0x53453f(0x4e2)]>0x1&&(console[_0x53453f(0x5bb)](_0x53453f(0x69d)+_0x3920ca+_0x53453f(0x2c9)+_0x3e02e8['length']+_0x53453f(0x2ee)),process[_0x53453f(0x4ba)](0x1)),_0x1951bf=_0x3e02e8[0x0][_0x53453f(0x2dc)],_0x278ff7=_0x3e02e8[0x0]['value'];}await _0x5af5df['remove'](_0x53453f(0x654),_0x1951bf),console[_0x53453f(0x3e8)](_0x53453f(0x4af)+_0x1951bf+_0x53453f(0x476)+(_0x278ff7['licensee']||'(unset)')+')');}finally{await _0x1c8ebc[_0x53453f(0x5f3)]();}}async function _0x5a009d(_0x820f1d,_0x2f2c32,_0x4ae102){const _0x535f74=_0x3d2baa;!_0x820f1d&&(console[_0x535f74(0x5bb)]('[okdb]\x20error:\x20join\x20requires\x20a\x20remote\x20address.\x20Usage:\x20okdb\x20join\x20<address>\x20--token\x20<t>'),process['exit'](0x1));!_0x4ae102[_0x535f74(0x612)]&&!(_0x4ae102[_0x535f74(0x67a)]&&_0x4ae102[_0x535f74(0x5d6)])&&(console[_0x535f74(0x5bb)]('[okdb]\x20error:\x20join\x20requires\x20credentials.\x20Provide\x20--token\x20<t>\x20or\x20--username\x20<u>\x20--password\x20<p>'),process[_0x535f74(0x4ba)](0x1));const _0x14bccb=_0x4ae102[_0x535f74(0x2bf)]||_0x2f2c32[_0x535f74(0x2a5)]?.[_0x535f74(0x303)];!_0x14bccb&&(console[_0x535f74(0x5bb)](_0x535f74(0x380)+_0x535f74(0x695)+_0x535f74(0x3e0)),process[_0x535f74(0x4ba)](0x1));const _0x24ddd6=require$$5,_0x2fe6bf=new _0x24ddd6(_0x2f2c32[_0x535f74(0x1e3)],{'sync':{'address':_0x14bccb,'auto_reconcile':![]}});await _0x2fe6bf['open']();try{const _0x2b07b5=_0x2fe6bf[_0x535f74(0x485)];if(_0x2b07b5&&_0x2b07b5[_0x535f74(0x365)]('~tokens')){let _0x5745ff=![];for(const _0x31d6cd of _0x2b07b5['getRange'](_0x535f74(0x1ea))){_0x5745ff=!![];break;}_0x5745ff&&console[_0x535f74(0x3e8)](_0x535f74(0x300)+_0x535f74(0x3ad));}console['log'](_0x535f74(0x17c)+_0x820f1d+'…'),await _0x2fe6bf[_0x535f74(0x2a5)]['join'](_0x820f1d[_0x535f74(0x32d)](/\/+$/,''),{'token':_0x4ae102[_0x535f74(0x612)],'username':_0x4ae102[_0x535f74(0x67a)],'password':_0x4ae102[_0x535f74(0x5d6)]}),console['log'](_0x535f74(0x3a8)),console[_0x535f74(0x3e8)]('\x0a\x20\x20Joined.\x20Remote\x20tokens\x20replicated.\x20You\x20can\x20now\x20log\x20in\x20with\x20cluster\x20credentials.\x0a');}finally{await _0x2fe6bf[_0x535f74(0x5f3)]();}}async function _0x1c35df(){const _0x5e66fb=_0x3d2baa,_0x3a620c=Date[_0x5e66fb(0x263)](),_0x10e3af=_0x137d80(process['argv']),_0x414d41=_0x4a75c5(_0x10e3af),_0x47a35b=_0x486778[_0x5e66fb(0x3af)](_0x414d41[_0x5e66fb(0x1e3)]);!_0x414d41[_0x5e66fb(0x4ec)]&&!process[_0x5e66fb(0x5ce)][_0x5e66fb(0x319)]&&(_0x414d41[_0x5e66fb(0x4ec)]=!![]);const _0x12db1a=require$$5,{start:_0x3c8edc,colorLog:_0x4461f8}=requireOkdbShell(),_0x130a6b=require$$1$2,_0x4c9f16={..._0x414d41[_0x5e66fb(0x2dc)]?{'encryptionKey':_0x414d41[_0x5e66fb(0x2dc)]}:{},..._0x414d41['noAdmin']?{'admin':![]}:_0x5ead76(_0x414d41[_0x5e66fb(0x35b)])?{'admin':_0x414d41['admin']}:{},..._0x5ead76(_0x414d41[_0x5e66fb(0x29a)])?{'api':_0x414d41[_0x5e66fb(0x29a)]}:{},..._0x5ead76(_0x414d41[_0x5e66fb(0x5c3)])?{'auth':_0x414d41[_0x5e66fb(0x5c3)]}:{},..._0x5ead76(_0x414d41[_0x5e66fb(0x427)])?{'mcp':_0x414d41[_0x5e66fb(0x427)]}:{},..._0x414d41[_0x5e66fb(0x59e)]!==![]?{'timeMachine':_0x414d41['timeMachine']}:{}},_0x15b0eb=_0x23e5e4(_0x414d41);if(!_0x130a6b['isWorker']){const _0x116d8d=_0x50aa77(),_0x34eacf=_0x414d41[_0x5e66fb(0x174)]?_0x5e66fb(0x2cb):_0x414d41[_0x5e66fb(0x4b3)]!=null&&_0x414d41[_0x5e66fb(0x4b3)]!==''?_0x5e66fb(0x52c):process.env.OKDB_HTTP_WORKERS?_0x5e66fb(0x285):_0x414d41[_0x5e66fb(0x48f)]?.['workers']!=null?_0x5e66fb(0x25d):_0x5e66fb(0x4a3)+Math[_0x5e66fb(0x2d6)](0x1,require$$0[_0x5e66fb(0x316)]()['length']-0x1);process[_0x5e66fb(0x54a)]['write'](_0x5e66fb(0x20a)+_0x15b0eb+'\x20('+_0x34eacf+(!_0x116d8d?_0x5e66fb(0x226):'')+')\x0a');}if(_0x130a6b[_0x5e66fb(0x1d1)]){const _0x5db5b2={..._0x4c9f16,'engines':![],'asyncProcessors':![],'compaction':'passive','bus':!![]},_0x1cf6cc=new _0x12db1a(_0x47a35b,_0x5db5b2);_0x1cf6cc[_0x5e66fb(0x3e8)][_0x5e66fb(0x33f)]?.();const _0x2e849c=process.env.OKDB_CLUSTER_SLOT??'?',_0x5b09bd={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x553ae6=_0x5b09bd[_0x414d41[_0x5e66fb(0x3f2)]]??_0x5b09bd[_0x5e66fb(0x400)];_0x1cf6cc[_0x5e66fb(0x3e8)][_0x5e66fb(0x565)](_0x3b1fee=>{const _0x53883b=_0x5e66fb;if((_0x5b09bd[_0x3b1fee['level']]??0x1)<_0x553ae6)return;try{process[_0x53883b(0x1ee)]?.({'__okdbCluster':_0x53883b(0x3e8),'slot':_0x2e849c,'pid':process[_0x53883b(0x262)],'entry':_0x3b1fee});}catch{}}),await _0x1cf6cc['open']();const {attachWorkerCluster:_0x31b85a}=requireOkdbCluster();_0x31b85a(_0x1cf6cc),await _0x5c20e9(_0x1cf6cc,_0x414d41[_0x5e66fb(0x1e5)]);return;}if(_0x15b0eb>0x1){const _0x4a819a=requireOkdbHttp(),_0x2ed8db=new _0x4a819a(),_0x3614f8=new _0x12db1a(_0x47a35b,_0x4c9f16);await _0x3614f8['open']();const _0x59deb9=async()=>{const _0x25feb4=_0x5e66fb,_0x536099={..._0x4c9f16,'engines':![],'asyncProcessors':![],'compaction':_0x25feb4(0x288),'bus':!![]},_0xc298b7=new _0x12db1a(_0x47a35b,_0x536099);return await _0xc298b7[_0x25feb4(0x5a7)](),_0xc298b7;},_0x44c3a3=_0x2ed8db[_0x5e66fb(0x2da)](_0x414d41[_0x5e66fb(0x1e5)],{'workers':_0x15b0eb,'makeOkdb':_0x59deb9,'primaryOkdb':_0x3614f8});let _0x5b1462=![];async function _0x4f6954(_0x58a85f){const _0x29612c=_0x5e66fb;_0x5b1462&&(process[_0x29612c(0x63c)][_0x29612c(0x1d5)]('\x0a[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a'),process[_0x29612c(0x4ba)](0x82));_0x5b1462=!![],process[_0x29612c(0x63c)][_0x29612c(0x1d5)]('\x0a[okdb]\x20received\x20'+(_0x58a85f||_0x29612c(0x69c))+',\x20stopping\x20workers…\x0a');const _0xb47d0c=setTimeout(()=>{const _0x324e6b=_0x29612c;process[_0x324e6b(0x63c)]['write'](_0x324e6b(0x277)),process[_0x324e6b(0x4ba)](0x0);},0xbb8);_0xb47d0c[_0x29612c(0x434)]?.();try{await _0x44c3a3[_0x29612c(0x5f3)]();}catch(_0x1db0bc){process[_0x29612c(0x63c)][_0x29612c(0x1d5)](_0x29612c(0x5ed)+(_0x1db0bc?.['message']??_0x1db0bc)+'\x0a');}try{await _0x3614f8['close']();}catch(_0x2f1739){process['stderr']['write']('[okdb]\x20primary\x20okdb\x20close\x20error:\x20'+(_0x2f1739?.['message']??_0x2f1739)+'\x0a');}process[_0x29612c(0x4ba)](0x0);}_0x414d41[_0x5e66fb(0x3de)]=_0x15b0eb;if(!_0x414d41[_0x5e66fb(0x4ec)]){_0x3614f8['log'][_0x5e66fb(0x33f)]?.(),_0x4fc8b6(_0x3614f8[_0x5e66fb(0x5c3)]?.[_0x5e66fb(0x35c)]?.()??[]),await _0x3c8edc(_0x3614f8,_0x414d41);return;}process[_0x5e66fb(0x54a)][_0x5e66fb(0x1d5)](_0x5e66fb(0x681)+process[_0x5e66fb(0x262)]+':\x20processor\x20(HTTP-silent),\x20'+_0x15b0eb+'\x20'+(_0x5e66fb(0x63d)+_0x414d41['port']+'\x0a')),console[_0x5e66fb(0x3e8)](''),console[_0x5e66fb(0x3e8)](_0x5e66fb(0x170)),console[_0x5e66fb(0x3e8)](_0x5e66fb(0x36b)+_0x414d41[_0x5e66fb(0x1e5)]+_0x5e66fb(0x4a4)+_0x15b0eb+_0x5e66fb(0x5fe)),console[_0x5e66fb(0x3e8)](_0x5e66fb(0x5d4)+_0x47a35b),console[_0x5e66fb(0x3e8)]('\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20'+_0x3614f8['id']),console[_0x5e66fb(0x3e8)](_0x5e66fb(0x6a6)+_0x414d41['port']+_0x5e66fb(0x2b8));!_0x414d41['noAdmin']&&console['log'](_0x5e66fb(0x14a)+_0x414d41['port']+_0x5e66fb(0x44b));console[_0x5e66fb(0x3e8)](''),_0x4fc8b6(_0x3614f8[_0x5e66fb(0x5c3)]?.[_0x5e66fb(0x35c)]?.()??[]),process['on'](_0x5e66fb(0x44c),()=>_0x4f6954('SIGINT')),process['on'](_0x5e66fb(0x65f),()=>_0x4f6954('SIGTERM')),process['on'](_0x5e66fb(0x28e),()=>_0x4f6954(_0x5e66fb(0x28e)));return;}const _0x2526a6=new _0x12db1a(_0x47a35b,_0x4c9f16);_0x2526a6[_0x5e66fb(0x3e8)][_0x5e66fb(0x33f)]?.();const _0xf385d7=_0x2526a6[_0x5e66fb(0x3e8)]['attach'](_0x4b806a=>_0x4461f8(_0x4b806a,_0x414d41[_0x5e66fb(0x3f2)]));if(_0x414d41[_0x5e66fb(0x4ec)])process[_0x5e66fb(0x54a)][_0x5e66fb(0x1d5)](_0x5e66fb(0x506));await _0x2526a6['open']();if(_0x414d41[_0x5e66fb(0x4ec)])process[_0x5e66fb(0x54a)]['write']('\x20\x20✓\x20database\x20opened\x0a');try{await _0x5c20e9(_0x2526a6,_0x414d41['port']);}catch(_0x5109f2){_0x5109f2[_0x5e66fb(0x2f9)]===_0x5e66fb(0x512)&&(console[_0x5e66fb(0x5bb)](_0x5e66fb(0x3df)+_0x414d41['port']+_0x5e66fb(0x446)),process[_0x5e66fb(0x4ba)](0x1));throw _0x5109f2;}if(_0x414d41['noRepl'])process[_0x5e66fb(0x54a)][_0x5e66fb(0x1d5)](_0x5e66fb(0x66e)+_0x414d41[_0x5e66fb(0x1e5)]+'\x0a');if(!_0x414d41['noRepl'])_0x2526a6[_0x5e66fb(0x3e8)]['detachConsole']?.(),_0xf385d7?.(),_0x4fc8b6(_0x2526a6['auth']?.['getSecurityNotices']?.()??[]),await _0x3c8edc(_0x2526a6,_0x414d41);else{const _0x253306=_0x486778[_0x5e66fb(0x2c7)](_0x47a35b,_0x5e66fb(0x445));try{_0x1b4cbf[_0x5e66fb(0x406)](_0x253306,String(process[_0x5e66fb(0x262)]));}catch{}const _0x1aac3a=Date[_0x5e66fb(0x263)]()-_0x3a620c;console['log'](''),console[_0x5e66fb(0x3e8)](_0x5e66fb(0x66d)),console[_0x5e66fb(0x3e8)](_0x5e66fb(0x146)+_0x414d41[_0x5e66fb(0x1e5)]),console[_0x5e66fb(0x3e8)](_0x5e66fb(0x39f)+_0x47a35b),console[_0x5e66fb(0x3e8)]('\x20\x20\x20\x20id:\x20\x20\x20\x20'+_0x2526a6['id']);{const _0x1722f8=_0x2526a6['_systemEnv']?.['db']?.[_0x5e66fb(0x165)]?.(_0x5e66fb(0x1dd))??0x0,_0x27d5a3=[..._0x2526a6['_envs']['keys']()][_0x5e66fb(0x3d5)](_0x41c64a=>!_0x41c64a['startsWith']('~'))[_0x5e66fb(0x4e2)];if(_0x2526a6['_license']?.[_0x5e66fb(0x4f5)]?.[_0x5e66fb(0x415)]===0x1){const _0x146379=Math['ceil']((_0x2526a6['_license'][_0x5e66fb(0x4f5)][_0x5e66fb(0x653)]-Date[_0x5e66fb(0x263)]())/0x5265c00);console[_0x5e66fb(0x3e8)](_0x5e66fb(0x352)+_0x2526a6[_0x5e66fb(0x343)][_0x5e66fb(0x4f5)][_0x5e66fb(0x576)]+'\x20(expires\x20in\x20'+_0x146379+_0x5e66fb(0x15d));}else{if(_0x2526a6[_0x5e66fb(0x343)]?.['active']){const _0x3b5c85=_0x2526a6['_license'][_0x5e66fb(0x4f5)];console[_0x5e66fb(0x3e8)](_0x5e66fb(0x265)+_0x3b5c85[_0x5e66fb(0x576)]+_0x5e66fb(0x2a8)+new Date(_0x3b5c85[_0x5e66fb(0x653)])[_0x5e66fb(0x514)]()[_0x5e66fb(0x149)](0x0,0xa)+')');const _0x35514d=_0x3b5c85[_0x5e66fb(0x4b2)]||{};if(_0x35514d['maxWrites']){const _0x1ec684=Math[_0x5e66fb(0x1db)](_0x1722f8/_0x35514d[_0x5e66fb(0x688)]*0x64);console[_0x5e66fb(0x3e8)](_0x5e66fb(0x20f)+_0x1722f8[_0x5e66fb(0x5cd)]()+_0x5e66fb(0x441)+_0x35514d[_0x5e66fb(0x688)][_0x5e66fb(0x5cd)]()+'\x20writes\x20('+_0x1ec684+_0x5e66fb(0x1b5)+_0x27d5a3+(_0x35514d['envs']?'/'+_0x35514d['envs']:'')+_0x5e66fb(0x6cf)+(_0x27d5a3===0x1?'':'s'));}}else{if(_0x2526a6[_0x5e66fb(0x343)]){const _0x4f0bdf=_0x2526a6[_0x5e66fb(0x343)][_0x5e66fb(0x5d7)](),_0x150b7d=_0x4f0bdf[_0x5e66fb(0x4e2)]?_0x4f0bdf[_0x5e66fb(0x145)](_0x32e37d=>_0x32e37d[_0x5e66fb(0x460)])[_0x5e66fb(0x2c7)](',\x20'):_0x5e66fb(0x4f4),_0x59b6df=_0x2526a6[_0x5e66fb(0x343)][_0x5e66fb(0x1d3)],_0x195592=_0x59b6df[_0x5e66fb(0x4b2)][_0x5e66fb(0x688)]?Math[_0x5e66fb(0x1db)](_0x1722f8/_0x59b6df[_0x5e66fb(0x4b2)][_0x5e66fb(0x688)]*0x64):0x0;console[_0x5e66fb(0x3e8)](_0x5e66fb(0x672)),console[_0x5e66fb(0x3e8)](_0x5e66fb(0x20f)+_0x1722f8[_0x5e66fb(0x5cd)]()+'\x20/\x20'+_0x59b6df['limits'][_0x5e66fb(0x688)][_0x5e66fb(0x5cd)]()+_0x5e66fb(0x1de)+_0x195592+_0x5e66fb(0x1b5)+_0x27d5a3+'\x20/\x20'+_0x59b6df[_0x5e66fb(0x4b2)]['envs']+'\x20envs'),console['log'](_0x5e66fb(0x658)+_0x150b7d);}}}}console[_0x5e66fb(0x3e8)](_0x5e66fb(0x604)+_0x414d41[_0x5e66fb(0x1e5)]+'/api');!_0x414d41[_0x5e66fb(0x575)]&&console[_0x5e66fb(0x3e8)]('\x20\x20\x20\x20admin:\x20http://localhost:'+_0x414d41[_0x5e66fb(0x1e5)]+_0x5e66fb(0x44b));console[_0x5e66fb(0x3e8)](''),console[_0x5e66fb(0x3e8)](_0x5e66fb(0x135)+_0x1aac3a+'ms'),_0x4fc8b6(_0x2526a6[_0x5e66fb(0x5c3)]?.[_0x5e66fb(0x35c)]?.()??[]);let _0x576686=![];async function _0x23011a(_0x385c60){const _0x75d6dc=_0x5e66fb;_0x576686&&(process[_0x75d6dc(0x63c)][_0x75d6dc(0x1d5)](_0x75d6dc(0x4b0)),process[_0x75d6dc(0x4ba)](0x82));_0x576686=!![],process[_0x75d6dc(0x63c)][_0x75d6dc(0x1d5)](_0x75d6dc(0x6b9)+(_0x385c60||'shutdown')+_0x75d6dc(0x362));const _0x6bb7fb=setTimeout(()=>{const _0x1115d3=_0x75d6dc;process['stderr'][_0x1115d3(0x1d5)](_0x1115d3(0x29c)),process[_0x1115d3(0x4ba)](0x1);},0x1388);try{_0x1b4cbf['unlinkSync'](_0x253306);}catch{}try{await _0x2526a6[_0x75d6dc(0x5f3)]();}catch(_0x4ff7c2){process[_0x75d6dc(0x63c)][_0x75d6dc(0x1d5)]('[okdb]\x20close\x20error:\x20'+(_0x4ff7c2?.['message']??_0x4ff7c2)+'\x0a');}clearTimeout(_0x6bb7fb),process[_0x75d6dc(0x63c)][_0x75d6dc(0x1d5)](_0x75d6dc(0x637)),process[_0x75d6dc(0x4ba)](0x0);}process['on'](_0x5e66fb(0x44c),()=>_0x23011a(_0x5e66fb(0x44c))),process['on'](_0x5e66fb(0x65f),()=>_0x23011a(_0x5e66fb(0x65f))),process['on'](_0x5e66fb(0x28e),()=>_0x23011a('SIGBREAK'));}}const _0x70a686=new Set(['version',_0x3d2baa(0x517),_0x3d2baa(0x3e5),_0x3d2baa(0x269),_0x3d2baa(0x28f),'import',_0x3d2baa(0x596),_0x3d2baa(0x612),_0x3d2baa(0x2c7),_0x3d2baa(0x3bd)]),_0x4e79ac=process[_0x3d2baa(0x3f8)][0x2];if(_0x4e79ac==='version')console[_0x3d2baa(0x3e8)](require$$3[_0x3d2baa(0x143)]),process[_0x3d2baa(0x4ba)](0x0);else{if(_0x4e79ac&&_0x70a686['has'](_0x4e79ac)){const _0x4984df=process[_0x3d2baa(0x3f8)][_0x3d2baa(0x149)](0x3),_0x25ddf1=_0x137d80([_0x3d2baa(0x4b8),_0x3d2baa(0x2db),..._0x4984df]),_0x1d2ade=_0x4a75c5(_0x25ddf1),_0x199ca9=new Set([_0x3d2baa(0x581),'-d','--key','-k','--config','-c',_0x3d2baa(0x2f0),'-p','--log-level',_0x3d2baa(0x22b),'-e',_0x3d2baa(0x2b6),_0x3d2baa(0x449),_0x3d2baa(0x5bf),_0x3d2baa(0x499),_0x3d2baa(0x4e8),_0x3d2baa(0x1c0),_0x3d2baa(0x399),_0x3d2baa(0x48c),_0x3d2baa(0x34c),'-u',_0x3d2baa(0x458)]);let _0x2358a7=null;for(let _0x3dadf4=0x0;_0x3dadf4<_0x4984df[_0x3d2baa(0x4e2)];_0x3dadf4++){if(_0x199ca9[_0x3d2baa(0x34a)](_0x4984df[_0x3dadf4])){_0x3dadf4++;continue;}if(!_0x4984df[_0x3dadf4][_0x3d2baa(0x15f)]('-')){_0x2358a7=_0x4984df[_0x3dadf4];break;}}(async()=>{const _0x534cf9=_0x3d2baa;if(_0x4e79ac==='token'){const _0xf64a73=process[_0x534cf9(0x3f8)][0x3],_0x37f588=process['argv']['slice'](0x4),_0x341d54=_0x137d80([_0x534cf9(0x4b8),_0x534cf9(0x2db),..._0x37f588]),_0x2e34a0=_0x4a75c5(_0x341d54),_0x1b5547=new Set([_0x534cf9(0x581),'-d','--key','-k',_0x534cf9(0x2d1),'-c',_0x534cf9(0x2f0),'-p',_0x534cf9(0x449),_0x534cf9(0x5bf),_0x534cf9(0x499),'--permissions',_0x534cf9(0x1c0),_0x534cf9(0x399),'--log-level','--env','-e',_0x534cf9(0x2b6)]),_0x25c79d=[];for(let _0x5ca065=0x0;_0x5ca065<_0x37f588[_0x534cf9(0x4e2)];_0x5ca065++){if(_0x1b5547[_0x534cf9(0x34a)](_0x37f588[_0x5ca065])){_0x5ca065++;continue;}if(_0x37f588[_0x5ca065][_0x534cf9(0x15f)]('-'))continue;_0x25c79d[_0x534cf9(0x3fd)](_0x37f588[_0x5ca065]);}switch(_0xf64a73){case _0x534cf9(0x4a8):await _0x31046f(_0x2e34a0,_0x341d54);break;case'list':await _0x48b763(_0x2e34a0);break;case _0x534cf9(0x19b):await _0x42690d(_0x25c79d[0x0],_0x2e34a0);break;default:console[_0x534cf9(0x5bb)](_0x534cf9(0x6af)+_0xf64a73+_0x534cf9(0x22d)),process[_0x534cf9(0x4ba)](0x1);}return;}if(_0x4e79ac===_0x534cf9(0x3bd)){const _0x375c0c=requireOkdbLicenseCodec(),_0x2eedc5=process[_0x534cf9(0x3f8)]['slice'](0x3),_0x517753=_0x137d80([_0x534cf9(0x4b8),_0x534cf9(0x2db),..._0x2eedc5]),_0x1c1ee7=_0x4a75c5(_0x517753),_0x34b58e=new Set([_0x534cf9(0x581),'-d',_0x534cf9(0x3ea),'-k',_0x534cf9(0x2d1),'-c',_0x534cf9(0x2f0),'-p',_0x534cf9(0x62d)]),_0x5610e4=[];for(let _0x2faaff=0x0;_0x2faaff<_0x2eedc5[_0x534cf9(0x4e2)];_0x2faaff++){if(_0x34b58e['has'](_0x2eedc5[_0x2faaff])){_0x2faaff++;continue;}if(_0x2eedc5[_0x2faaff]['startsWith']('-'))continue;_0x5610e4[_0x534cf9(0x3fd)](_0x2eedc5[_0x2faaff]);}const _0x3c4eb=_0x5610e4[0x0]??null;if(_0x3c4eb===_0x534cf9(0x280))await _0x42e5fb(_0x5610e4[0x1],_0x1c1ee7);else{if(!_0x3c4eb)await _0x26de81(_0x1c1ee7);else{let _0x70479f=_0x375c0c[_0x534cf9(0x341)](_0x3c4eb);if(_0x70479f==='unknown'&&_0x1b4cbf[_0x534cf9(0x16e)](_0x3c4eb))_0x70479f='path';if(_0x70479f===_0x534cf9(0x4d4))try{const _0x222521=_0x1b4cbf['readFileSync'](_0x3c4eb,_0x534cf9(0x192))[_0x534cf9(0x2c3)](),_0x51c53e=_0x375c0c[_0x534cf9(0x341)](_0x222521);if(_0x51c53e===_0x534cf9(0x6a1)){await _0x1febb7(_0x222521,_0x1c1ee7);return;}await _0x5e8017(_0x3c4eb,_0x1c1ee7);return;}catch(_0x2ea3c6){console['error']('[okdb]\x20error:\x20failed\x20to\x20read\x20'+_0x3c4eb+':\x20'+_0x2ea3c6[_0x534cf9(0x69b)]),process[_0x534cf9(0x4ba)](0x1);}switch(_0x70479f){case _0x534cf9(0x1da):await _0x5e8017(_0x3c4eb,_0x1c1ee7);break;case'activation':await _0x1febb7(_0x3c4eb,_0x1c1ee7);break;case'uuid':await _0x2ccdf4(_0x3c4eb,_0x1c1ee7);break;default:console[_0x534cf9(0x5bb)](_0x534cf9(0x260)+_0x3c4eb+'\x22'),console['error'](''),console['error']('\x20\x20Expected\x20one\x20of:'),console['error'](_0x534cf9(0x3bc)),console['error'](_0x534cf9(0x5e0)),console[_0x534cf9(0x5bb)](_0x534cf9(0x6a4)),console['error'](_0x534cf9(0x140)),console['error'](''),console[_0x534cf9(0x5bb)](_0x534cf9(0x394)),process[_0x534cf9(0x4ba)](0x1);}}}return;}switch(_0x4e79ac){case _0x534cf9(0x517):await _0x157ea3(_0x1d2ade);break;case _0x534cf9(0x3e5):await _0x312d3d();break;case _0x534cf9(0x596):await _0xb6d1cd(_0x1d2ade);break;case _0x534cf9(0x269):await _0x4219dc(_0x2358a7??_0x486778[_0x534cf9(0x3af)](_0x534cf9(0x2d8)),_0x1d2ade);break;case _0x534cf9(0x28f):await _0x570ecb(_0x2358a7??_0x486778[_0x534cf9(0x3af)]('./okdb-export.ndjson'),_0x1d2ade,_0x25ddf1);break;case _0x534cf9(0x3ca):await _0x15f18b(_0x2358a7??_0x486778[_0x534cf9(0x3af)](_0x534cf9(0x2ed)),_0x1d2ade,_0x25ddf1);break;case _0x534cf9(0x2c7):await _0x5a009d(_0x2358a7,_0x1d2ade,_0x25ddf1);break;}})()[_0x3d2baa(0x41e)](()=>process[_0x3d2baa(0x4ba)](0x0))[_0x3d2baa(0x606)](_0xbf58bb=>{const _0xa34d79=_0x3d2baa;console[_0xa34d79(0x5bb)](_0xa34d79(0x69a)+(_0xbf58bb[_0xa34d79(0x69b)]||_0xbf58bb)+'\x0a'),process[_0xa34d79(0x4ba)](0x1);});}else _0x1c35df()[_0x3d2baa(0x606)](_0x4dc946=>{const _0x2200cf=_0x3d2baa;console[_0x2200cf(0x5bb)](_0x2200cf(0x172)),console[_0x2200cf(0x5bb)](_0x4dc946[_0x2200cf(0x4cd)]||_0x4dc946),process[_0x2200cf(0x4ba)](0x1);});}return okdb$1;}function _0x2edd(){const _0x5bbcea=['_jwksNegativeCache','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20was\x20issued\x20for\x20a\x20different\x20node\x20—\x20share\x20this\x20node\x27s\x20PIN\x20with\x20the\x20vendor.','confirm','inputSchema','\x0a\x20\x20License\x20details:','processes','options','writeUInt16BE','_fetchJwks','OKDBInvalidIndexKeyError','--path','deregisterSelf','\x20worker(s)\x20remaining','hasDesired','JWT\x20expired','\x20\x20\x20\x20\x20\x20','[okdb]\x20reset:\x20','Run\x20searches\x20against\x20registered\x20FTS\x20and\x20vector\x20indexes.','drop','credentials',';\x20HttpOnly','asyncProcessors','[okdb]\x20invalid\x20port:\x20','hard-killed',';\x20Path=','typesPerEnv','INDEX_READY','(empty)','yellow','spki','migrate','reset','change','\x20process','index:drop','createHash','\x1b[90m','txn:end','percentile','timeMachine','getClock','--no-repl','hostname','clearLine','\x20\x20(name:\x20','LICENSE_INVALID','[okdb]\x20opening\x20','headClock','open','system:clock_change','.\x20Only\x20primitives,\x20null,\x20Buffers,\x20and\x20arrays\x20are\x20allowed.\x20Got:\x20','authenticateToken','allocUnsafe','_bucketIdx','_processStartedAt','addSupervisedChild','ALREADY_EXISTS','OKDBSchemaCollectionError','May\x20read\x20system\x20types\x20when\x20also\x20granted\x20the\x20underlying\x20read\x20permission.','Shutting\x20down\x20due\x20to\x20license\x20expiry','identity','dedupeMax','killable','\x20\x20All\x20checks\x20passed.\x0a','API\x20tokens,\x20users,\x20and\x20credentials.','authenticateRequest','SYSTEM_STOPPED','Activation\x20invalid:\x20','error','_getType','readline','count','--password','0123456789ABCDEFGHJKMNPQRSTVWXYZ','PIN','item:create','auth','env','\x1b[34m','work','_draining','<path>','decommission','data:write','createPublicKey','requests','toLocaleString','stdin','isFeatureEnabled','Types','\x0a\x20\x20✓\x20Token\x20created','List\x20functions\x20and\x20inspect\x20their\x20source.','[okdb]\x20import\x20complete','\x20\x20\x20\x20path:\x20\x20\x20\x20','\x20missing\x20path\x20field\x20in\x20inputSchema:\x20','password','getPins','fetch','gray','okdb_session','Forbidden','schema:set','Server\x20is\x20in\x20bootstrap\x20mode\x20and\x20only\x20accepts\x20localhost\x20connections\x20until\x20the\x20first\x20token\x20is\x20created.','add','fromEntries','\x20\x20\x20\x20•\x20an\x20activation\x20token\x20\x20(124\x20chars)','isFinite','ITEM_UPDATE','pathname','audience','\x1b[2m','url','[res]\x20','NAME','cookies','bindings','sync:apply','6zoQdOJ','[okdb]\x20cluster\x20close\x20error:\x20','querySchema','processing','\x20for\x20commands,\x20','NOT_FOUND','copy','close','dirname','createHmac','_ensureDesired','floor','\x20\x20\x20\x20-\x20The\x20license\x20blob\x20has\x20not\x20been\x20added\x20yet\x20—\x20run\x20`okdb\x20license\x20<blob>`\x20first.','epoch','_getJwkKey','keys','decodeLicenseBlob:\x20input\x20must\x20be\x20a\x20string','setOwnMeta','\x20HTTP\x20workers,\x20primary\x20=\x20processor)','SIG_INVALID','_runGuards','publishChildRow','[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22','logRequests','\x20\x20\x20\x20api:\x20\x20\x20http://localhost:','licenseId','catch','homedir','3dLuIqN','(?:/(.*))?$','⚠\x20INTERNAL\x20LICENSE\x20ACTIVE\x20—\x20all\x20features\x20and\x20limits\x20are\x20unlocked.\x20For\x20vendor/internal\x20use\x20only.','protected:read','Access-Control-Request-Headers','targetType','resetting','tags:\x20','line','index:ready','token','compaction','INVALID_INDEX_KEY','Queue','reason','_log','item:remove','/type/users/item/alice\x0a\x20\x20\x20\x20','_nodeDead','keep-alive','_selfKey','LABEL','\x20\x20Error:\x20','waiting','_authOptions','hidden','_ownMeta','_removeRowAsync','[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22','system:ready','known\x20field','listRoutes','_instanceId','.kdb_history','oauth','(no\x20types)','\x20\x20\x20\x20label:\x20\x20\x20\x20\x20\x20\x20','--log-level','level','every','enabled','9DCWpga','columns','consecutiveFailures','[okdb-cluster]\x20slot=','--no-admin','defaults','[okdb]\x20closed\x20cleanly\x0a','decoded','OKDBForeignKeyError','_lastCpuWindowMs','[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot=','stderr','passive\x20HTTP\x20worker(s)\x20serving\x20:','methods','listenAddr','No\x20tokens.','decodeLicenseBlob:\x20failed\x20to\x20decode\x20payload:\x20','LICENSE_ACTIVATION_INVALID','_clusterOrphanWatch','resetFts','Unauthorized','allowedAlgs','startHeartbeat','[okdb]\x20exported\x20\x20types=','_oidcDiscoveryCache','addedAt','Register,\x20configure,\x20and\x20remove\x20cluster\x20peers.','update','indexToDb','_threadStats','License\x20expired\x20or\x20invalidated','start','\x20bytes,\x20need\x20>=\x2065)','object','expiresAt','~licenses','raw','/.well-known/openid-configuration','\x20has\x20ambiguous\x20query/path\x20field:\x20','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20','index:progress','reportThreadStats','entries','_totalReadMs','INDEX_HAS_CONSUMERS','no\x20.kdbconfig\x20(using\x20defaults)','SIGTERM','min','cause','CONFLICT','closures\x20in\x20THIS\x20process\x20—\x20forked\x20workers\x20cannot\x20serve\x20them\x20(cluster\x20distributes\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/staging/info\x0a\x0a','Create,\x20update,\x20and\x20delete\x20tokens\x20and\x20users;\x20rotate\x20keys.','caps','peer','Invalid\x20primary\x20key\x20type:\x20','Work','_clusterOnMessage','__okdbSlot','targetKey','\x20\x20✓\x20OKDB\x20server\x20running','\x20\x20✓\x20http\x20listening\x20on\x20:','_isReader','timingSafeEqual','safety','\x20\x20\x20\x20license:\x20free\x20tier\x20—\x20add\x20a\x20license\x20to\x20unlock\x20sync,\x20embeddings,\x20engines,\x20time-machine','_shouldWrapResponse','_totalWrites','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','--open','platform','_statusEnv','Register,\x20update,\x20and\x20delete\x20function\x20definitions.','username','authorization','processors/',',\x20label:\x20','[okdb]\x20created\x20.kdbconfig','\x20has\x20ambiguous\x20binding\x20for\x20query\x20field:\x20','execArgv','[okdb]\x20cluster\x20primary\x20pid=','valid','\x20<path>\x20[json-body]','OIDC\x20discovery\x20missing\x20jwks_uri','[okdb]\x20invalid\x20log\x20level:\x20\x22','is\x20required','listening','maxWrites','hasOwnProperty','decodeActivationToken','\x22\x20(must\x20be\x20debug|info|warn|error)','INVALID_VALUE','\x20environment\x20',';\x20SameSite=','PUBLIC_KEY_PEM','readFileSync','Get\x20and\x20list\x20records,\x20run\x20byIndex\x20queries.','kdb_admin_oauth_state','~processes:desired','\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.','\x20\x20Example:\x20okdb\x20join\x20https://node-a.example.com\x20--token\x20<t>\x20--address\x20http://myhost:8484\x0a','_loginStates','captureStackTrace','\x20\x20Envs:\x20\x20\x20\x20','prototype','\x0a[okdb]\x20error:\x20','message','shutdown','[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22','access-control-max-age','_activateProcesses','Index\x20\x27','activation','processor:paused','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20open\x20admin\x20UI\x20in\x20browser\x0a\x20\x20','\x20\x20\x20\x20•\x20a\x20license\x20id\x20\x20\x20\x20\x20(uuid)','register','\x20\x20\x20\x20api:\x20\x20\x20\x20\x20http://localhost:','dropping','engines','\x20\x20\x20\x20licensee:\x20\x20','Write','\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20','OKDB-PIN-V1:','toUpperCase','stringify','[okdb]\x20unknown\x20token\x20action:\x20\x22','OKDB_CODE_TO_HTTP_STATUS','searchParams','envs=','dead','uri','responseStatuses','clusterStatusView','workers','connections\x20blindly;\x20a\x20worker\x20lacking\x20the\x20route\x20404s).\x20Either\x20use\x20the\x20cooperative\x20','\x0a[okdb]\x20received\x20','setTtl','FOREIGN_KEY_DELETE_RESTRICTED','writeUInt8','\x0a\x20\x20[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a','createInterface','heapTotal','nodesView','uuid','\x20\x20\x20\x20status:\x20\x20\x20\x20pending\x20activation','claimGated','[okdb]\x20exporting\x20blobs…','transactionSync','_putRowAsync','mode','Execute\x20full-text\x20and\x20vector\x20searches.','emit','Blob\x20storage:\x20large\x20file\x20uploads\x20attached\x20to\x20records\x20or\x20stored\x20standalone.','HTTP_','include','access-control-request-headers','Lax','\x20env','treeView','mcp-session-id','size','_validateOperationRequest','--blobs','PERMISSIONS','sourceKey','policy','Build\x20expects\x20public\x20key\x20fingerprint\x20','\x20\x20\x20\x20graceful\x20shutdown\x0a','tokenTtl','noteListenAddr','__okdbCluster','alg','[okdb]\x20started\x20in\x20','--version','licenses','crypto','time','RS256','\x20\x20Usage:','license:invalid','\x20\x20\x20\x20addedAt:\x20\x20\x20','Invalid\x20activation\x20token:\x20','references','\x20\x20\x20\x20•\x20a\x20path\x20to\x20a\x20.license\x20file','dynamic','txn:start','version','expiry','map','\x20\x20\x20\x20port:\x20\x20','http://localhost:','OKDBNotFoundError','slice','\x20\x20\x20\x20admin:\x20\x20\x20http://localhost:','base64url','fts:','388834XIkCyy','type/users\x20--help','\x20(+','CREATED','discoveryTtlMs','3893856AkcepE','_windowCbs','_lastCpuUsage','_buckets','authorizationUrl','embedded','stop','Content-Type','createEnvironment','_activateProcessesReader','\x20deleted','\x20days\x20—\x20POC/demo\x20only,\x20not\x20node-bound)','children','startsWith','_jwksCache','additionalProperties','\x20\x20Type\x20','PATCH','\x20HTTP\x20server(s)\x20on\x20port\x20','get','.\x20Primary\x20keys\x20must\x20be\x20string\x20or\x20number.\x20Got:\x20','issueToken','note','\x20\x20(unlimited)','record','setSchema','hasCanonical','subject','existsSync','created','\x20\x20✓\x20OKDB\x20cluster\x20running','access:\x20','\x0a[okdb]\x20fatal\x20error:','_listenAddr','noCluster','some','instances','selfKey','token_use','UNAUTHORIZED','listLicenses','recheck','\x0a\x20\x20Joining\x20cluster\x20at\x20','(none)','\x20in\x20','connection','--inspect','\x20\x20\x20\x20expires:\x20\x20\x20','\x20(durable\x20desired-state)','val','createLoginState','node\x20identity','type/users/item/alice','startedAt','-----BEGIN\x20CERTIFICATE-----\x0a','cursorKey','bootstrapBlocked','decommissioned','yes','\x0a\x20\x20Delete\x20ALL\x20data\x20in\x20','_onPoke','\x0a\x20\x20okdb\x20doctor\x0a','isBuffer','query','utf8','system','\x20\x20[','License\x20signature\x20invalid\x20—\x20this\x20license\x20was\x20not\x20signed\x20by\x20the\x20key\x20paired\x20with\x20this\x20build.\x20','ingest','(open-before-fork\x20seeds\x20the\x20shared\x20__tokenSecret\x20and\x20gives\x20workers\x20the\x20root\x20path).','ES256','config','digest','revoke','kill','req','node:perf_hooks',')\x20to\x20your\x20license\x20vendor.','process','build','License\x20limit\x20exceeded:\x20','sha256','[okdb]\x20invalid\x20','_sampleOwnStats','next','ROUTES','xdg-open\x20','HTTP\x20','POST','sig','View\x20server\x20info,\x20logs,\x20SSE\x20event\x20streams,\x20processor\x20status,\x20backup\x20list.','SCHEMA_VALIDATION_FAILED','\x20tokens:','resume','lifecycle','method','start\x20','exportToFile','_isOpen','%),\x20','der','OKDBAlreadyExistsError','description','_scheduleFlush','free\x20tier','setLogger','LICENSE_LIMIT_EXCEEDED','use\x20<env>','exec','\x20\x20Some\x20checks\x20failed.\x0a','--grants','child_process','\x22\x20is\x20used\x20by:\x20','\x20worker\x20slot=','view:progress','nodeKey','NOT_IMPLEMENTED','DELETE','concat','_runMiddlewares','_buildOwnRow','(?:','consumeLoginState','data:\x20','flatMap','\x20\x20\x20\x20status:\x20\x20\x20\x20active',')\x20exited\x20','isWorker','Embeddings','effective','verifyCookie','write','field','maxMs','id:\x20','parseBearer','blob','round','\x20binding\x20references\x20missing\x20input\x20field:\x20','__writeCounter','\x20writes\x20(','data','stats','\x20\x20·\x20\x20','UNIQUE_CONSTRAINT','dbPath','\x20\x20\x20\x201.\x20Send\x20the\x20PIN\x20above\x20(','port','starting','standard','respawnTimer','PUB_FINGERPRINT','~tokens','items','~processes:cmd','OKDBVersionMismatchError','send','\x27\x20is\x20already\x20registered','mkdirSync','INDEX_RESET','\x1b[0m','\x20\x20Usage:\x20','routes','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20','180920jWIhRv','type','INDEX_NOT_REGISTERED','sub',',\x20signal=','closeAllConnections','isConnected','http-server','ms\x20(attempt\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20show\x20API\x20docs\x20for\x20a\x20path\x0a\x0a\x20\x20','tags','Admin','integer','_nodeDbFor','\x20cannot\x20be\x20MCP-exposed\x20without\x20an\x20explicit\x20adapter\x20because\x20it\x20uses\x20','(null)','read','List\x20types,\x20get\x20type\x20schema,\x20list\x20registered\x20indexes.','HTTP\x20server\x20already\x20running','\x20\x20\x20\x20features:\x20\x20','[okdb]\x20http\x20workers:\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','uptime','--changes','_cursors','\x20\x20\x20\x20usage:\x20\x20\x20','[okdb]\x20imported\x20\x20types=','content-length','_active','dropSchema','[okdb]\x20shmbuf\x20native\x20binding\x20unavailable\x20—\x20multi-process\x20clustering\x20is\x20unsafe\x20','files/','running','\x20\x20✗','inst:','\x20\x20Build:\x20\x20\x20key\x20fingerprint\x20','forceAfterMs','randomUUID','removeNode','listen({\x20workers\x20}):\x20okdb\x20options\x20are\x20not\x20serializable\x20for\x20workers:\x20','must\x20be\x20','_getOidcDiscovery','\x20\x20http://localhost:','audiences','value','OKDBSchemaValidationError','run','licensed',';\x20shmbuf\x20native\x20missing\x20→\x20forced\x20single-process','host','once','removeLicense','_nodeDb','--env','tierList','\x22.\x20Use:\x20create,\x20list,\x20revoke','hex','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20show\x20this\x20help\x0a\x20\x20','Gate\x20flag\x20required\x20to\x20touch\x20system\x20types\x20(those\x20whose\x20name\x20starts\x20with\x20\x22~\x22).\x20Combined\x20with\x20the\x20underlying\x20namespace\x20permission.','\x27\x20already\x20registered','OKDBError','kdb_admin_csrf','\x20\x20@','env/staging/info','readUInt32BE','\x20has\x20ambiguous\x20binding\x20for\x20path\x20field:\x20','_baselines','Schema\x20&\x20Indexes','[on|off|level]','_openEnvLazy','type/users/query\x20{\x22active\x22:true}','instanceId','ms\x20p99=','_rotateBucket','decodeLicenseBlob','OKDBTypeNotRegisteredError','\x20—\x20type\x20env\x20to\x20list\x20available\x0a','_publishNow','set','processor:ready','toLowerCase','TYPE_NOT_REGISTERED','[okdb]\x20reset\x20aborted','_caps','addLicense','[okdb-cluster]\x20change-feed\x20init\x20failed:\x20','\x20\x20\x20\x20writes:\x20\x20\x20\x20','[okdb]\x20warning:\x20could\x20not\x20read\x20node\x20identity/licenses\x20before\x20reset\x20(','\x0a\x20\x20No\x20routes\x20matching\x20\x22','keys/public.pem','\x20(must\x20be\x201–65535)','online','\x20(slot=','node:events','disable','processors','isInteger','LICENSE_HASH_MISMATCH','getCount','_isClusterController','fn-runner','charCodeAt','listDesired','config\x20http.workers','Feature\x20not\x20available\x20on\x20free\x20tier:\x20','OKDB_HTTP_WORKERS','[okdb]\x20error:\x20unrecognized\x20input:\x20\x22','putSync','pid','now','state','\x20\x20\x20\x20license:\x20','\x20\x20·\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20OKDB\x20SHELL\x20\x20\x20\x20\x20\x20\x20\x20','msg','backup','regex','put','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','[okdb]\x20failed\x20to\x20parse\x20config\x20file\x20','features','\x20\x20\x20http://localhost:','\x0d[okdb]\x20blobs:\x20','createServer','permission','quit','No\x20license\x20found\x20matching\x20this\x20activation\x20token','metrics','jwksUri','[okdb]\x20shutdown\x20drain\x20exceeded\x203000ms\x20—\x20hard-exiting\x0a','trimStart','exp','_role','peers=','okdb-http-worker-child.js','putNode','repeat','mean','remove','cluster','_lastTick','cli','Create,\x20delete,\x20and\x20compact\x20environments.','OKDB_HTTP_WORKERS\x20env','\x20to\x20browse\x20the\x20API,\x20','server','passive','Upload,\x20update\x20metadata,\x20and\x20delete\x20files.','label','system:type_drop','prompt','guards','SIGBREAK','export','importBlobs','removeSupervisedChild','https','level:\x20info','schema:drop','remoteAddress','true','127.0.0.1','expires','stopped','api','[okdb]\x20error:\x20token\x20with\x20name\x20\x22','[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a','x5c','License\x20already\x20stored','_totalWriteMs','database\x20path\x20not\x20writable:\x20','JWT\x20not\x20yet\x20valid','\x20\x20Next\x20step\x20—\x20activate\x20the\x20license:','ref:violation_resolved','primaryOkdb','sync','cluster:\x20unavailable\x20(shmbuf\x20native\x20missing)\x20—\x20running\x20single-process','heapUsed','\x20(expires\x20',')\x20—\x20they\x20will\x20NOT\x20be\x20preserved','Functions','application/x-www-form-urlencoded','debug','\x20\x20[okdb]\x20closed\x20cleanly\x0a','\x0d[okdb]\x20','loop-lag','\x20supervised)','Not\x20Found','activateLicense','readMs','_cmd','payload','--types','expired','/api','indexes','readUInt16BE','\x20\x20Shell\x20commands','exposeHeaders','sync-node','remaining-fields','selfAddress','connected','\x1b[31m','UNSUPPORTED_MEDIA_TYPE','trim','permissions','_dedupeMax','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20','join','list','\x22\x20matches\x20','statuses','--no-cluster','parse','shell','TYPE_ALREADY_REGISTERED','envs','_startedAt','--config','_children',';\x20Expires=','params','disconnect','max','\x1b[36m','./okdb-backup','\x20\x20\x20\x20limits:\x20\x20\x20\x20','listen','okdb','key','result','http://','addSSE','Records\x20inside\x20your\x20types\x20—\x20the\x20actual\x20rows\x20you\x20store.','Views',';\x20Max-Age=0;\x20Expires=Thu,\x2001\x20Jan\x201970\x2000:00:00\x20GMT','unique:violation_resolved',';\x20Secure','byteLength','[okdb]\x20error:\x20remove\x20requires\x20an\x20id\x20argument','\x22\x20→\x20','views','clear','_buildProcessingFacet','type:registered','claims','./okdb-export.ndjson','\x20licenses','removeSync','--port','GONE','VIEW_PROGRESS','--env\x20<name>','signCookie','_validateOidcAccessToken','none','[okdb]\x20error:\x20','unlinkSync','code','\x20user-registered\x20route(s)\x20are\x20','processor:error','system:bus_state_change','internal','bus:drain','attachFeed','\x20\x20Note:\x20this\x20node\x20has\x20existing\x20tokens.\x20They\x20will\x20coexist\x20with\x20cluster\x20tokens\x0a','[okdb]\x20.kdbconfig\x20already\x20exists\x20—\x20skipping','OKDBInvalidValueError','address','decodeLicenseBlob:\x20blob\x20too\x20short\x20(','ieee-p1363','_buildChildRow','off','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/info\x0a\x20\x20\x20\x20','quantum','matcher','listNodes','license:added','_pending','.okdb-write-test','processingStatusView','\x20\x20\x20\x203.\x20Run:\x20\x20okdb\x20license\x20<activation-token>','_handlePoke','array','EXIT','onLicenseExpired','search','cpus','route','function','isTTY','Examples','_userRouteCount','_userPhase','ceil','type/users','\x20months\x20from\x20issuance)','registerIndex','groups','destroy','find','\x20\x20Writes:\x20\x20','GET','isActive','listen({\x20workers:\x20','database\x20path\x20writable:\x20','Invalid\x20token','other','_licenseHash','Sync','replace','transport:\x20','authMode','listen({\x20workers\x20>\x201\x20})\x20without\x20makeOkdb\x20requires\x20an\x20OPEN\x20okdb\x20—\x20call\x20after\x20open()\x20','_drain','getProcess','Type\x20definitions,\x20all\x20index\x20registrations\x20(byIndex,\x20FTS,\x20vector),\x20and\x20TTL\x20policy.','SERVICE_UNAVAILABLE','[body]','iss','https:','decodeActivationToken:\x20input\x20must\x20be\x20a\x20string','kid','Files','all','\x20\x20\x20\x202.\x20The\x20vendor\x20returns\x20an\x20activation\x20token.','\x20\x20(need\x20≥\x2018)','addRaw','detachConsole','primary','detectInputType','match','_license','_onStop','pending','origin','aud','OPTIONS','_lastCpuPct','has','verifyActivation','--username','CHANGEFEED_QUANTUM','Bearer\x20','fork','memoryUsage','entry','\x20\x20\x20\x20license:\x20⚠\x20OPEN\x20—\x20','clearThreadStats','padStart','rawBuf','stopHeartbeat','_markSeen','(code=','user','_kind','admin','getSecurityNotices','search:query','GATEWAY_TIMEOUT','files','readUInt8','_handleInProcess',',\x20closing…\x0a','config\x20file\x20invalid:\x20','userAdded','hasType','BAD_REQUEST','toFixed','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20GET\x20(implicit)\x0a\x20\x20','is\x20not\x20allowed','isSystem','\x20\x20\x20\x20port:\x20\x20\x20\x20','feed:','_started','\x20logs\x20on\x20\x20','setDesired','_enforceOperationAccess','properties','setPrompt','Auth','INDEX_REGISTERED','\x20not\x20found','Operator\x20surface:\x20server\x20info,\x20logs,\x20event\x20streams,\x20processor\x20status,\x20backups.','_okdb','issuedAt','summary','auth=','authRequired','openDB','transport','values','boolean','[okdb]\x20error:\x20--address\x20is\x20required\x20for\x20join\x20(this\x20node\x27s\x20reachable\x20sync\x20address).\x0a','_seen','ttl','--help','cookieName','ID\x20token\x20is\x20not\x20accepted','\x20\x20[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a','\x1b[33m','(unset)','jwksTtlMs','standalone','\x20MB)','test','licenseHash','__identity','pushEphemeral','[okdb]\x20error:\x20revoke\x20requires\x20an\x20id\x20argument','statSync','_computeStatus','transaction','\x20\x20Usage:\x20okdb\x20license\x20[<blob|path|uuid|activation-token>]','ftsName','\x1b[1m','events','Token\x20must\x20be\x20a\x20JWT','--ttl','__OKDB_PUB_FINGERPRINT__','13351173VNEOUW','OKDBIndexAlreadyRegisteredError','_desired','verify','\x20\x20\x20\x20path:\x20\x20','setupPrimary','idx:','offWindow','BOOTSTRAP_LOCALHOST_ONLY','Validation\x20failed:\x20','application/json','deaths','\x27,\x20cannot\x20map\x20to\x20\x27','\x20\x20✓\x20joined\x20and\x20reconciliation\x20initiated','getChanges','\x20\x20\x20\x20\x20\x20\x20POST\x20(body\x20implies\x20POST)\x0a\x20\x20','\x0a\x20\x20\x20\x20','magenta','\x20\x20after\x20sync.\x20Duplicate\x20names\x20will\x20surface\x20as\x20ambiguous\x20logins\x20to\x20clean\x20up.','sizeAfter','resolve','⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20','writeUInt32BE','shmbufNative','\x22\x20already\x20exists','updateSupervisedChildStats','Invalid\x20index\x20key\x20type\x20for\x20\x27','ms\x20max=','includes','last-event-id','../okdb','red','blobs','\x20\x20\x20\x20•\x20a\x20license\x20blob\x20\x20\x20(Crockford\x20base32,\x20~150–250\x20chars)','license','padEnd','white','getAuthOptions','string',':\x20ping\x0a\x0a','okdb_session_','external','Machine-to-machine\x20cluster\x20protocol\x20(join\x20handshake,\x20replication\x20channel,\x20traffic).\x20Grant\x20only\x20to\x20peer\x20nodes\x20—\x20not\x20to\x20humans.','content-type','Create,\x20update,\x20and\x20delete\x20records\x20(including\x20bulk\x20import).','operation','\x20times\x20in\x20','import','type:drop','fts:drop','JWT\x20is\x20missing\x20kid','isAuthenticated','Internal\x20error','List\x20tokens\x20and\x20users.','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','Unknown\x20error','(primary\x20=\x20processor)','null','filter','[req]\x20','fast','middlewares','loop-lag\x20','ms/','_isFree','issuer','title','clusterWorkers','[okdb]\x20port\x20','\x20\x20Or\x20set\x20sync.address\x20in\x20.kdbconfig','sort','_admissionStarted','_totalRequests','reload','init','Route\x20','JWT\x20audience\x20mismatch','log','fill','--key','reduce','toString','System','bodyMode','false','kind','hint','logLevel','\x0a\x20\x20✓\x20License\x20added','\x20to\x20quit.','_matchRoute','node\x20','\x20\x20[okdb]\x20','argv','EXPIRES','setNoDelay','threads','unknown','push','\x20\x20\x20\x20name:\x20\x20\x20\x20\x20\x20\x20\x20','destroyed','info','building','envsOpen','dim','supervisorKey','form\x20listen(port,\x20{\x20workers,\x20makeOkdb\x20})\x20and\x20register\x20the\x20routes\x20inside\x20makeOkdb,\x20','writeFileSync','List\x20environments\x20and\x20read\x20environment\x20info.','bus:type_drop','ITEM_REMOVE','processor:retry','Create\x20and\x20delete\x20views,\x20start,\x20stop,\x20and\x20rebuild\x20them.','tokenSecret','Foreign\x20key\x20violation:\x20','endsWith','grants','env:opened','lag','getHeader','green','runtimeProcessesView','licenseType','outputSchema','Background\x20job\x20queue:\x20enqueue\x20work,\x20observe\x20state,\x20and\x20process\x20jobs.','data:read','x-requested-with','_lookupByName','\x20active\x20env:\x20','index:reset','query.','then','_onTick','maxBodyBytes','ENVS','_drainOne','meta','\x27\x20doesn\x27t\x20exist','May\x20write\x20system\x20types\x20when\x20also\x20granted\x20the\x20underlying\x20write\x20permission.','5mwdmMW','mcp','split','default','sse','resetIndex','setHeader','queue','Processors','statusCode','Hint:\x20','REMOVE','records','body.','unref','terminal','txn:rollback','slot','roles','dest','./okdb-data','\x22\x20to\x20enable\x20it.','\x20already\x20exists','_onItem','\x20documents\x20fail\x20validation','USE','use','\x20/\x20','forEach','logs','VERSION_MISMATCH','okdb.pid','\x20already\x20in\x20use','token_endpoint','scrypt','--name','number','/admin/index.html','SIGINT','name','queue/','email','_nodeDbCache','registry-publish','_admissionTimer','force','(worst\x20','Index\x20\x22','flushDebounce','\x20cf-ray=','--address','\x20has\x20illegal\x20binding\x20target\x20for\x20','\x20license(s)','_totalReads','\x0a\x20\x20No\x20documentation\x20found\x20for:\x20','creating','ttl:expired','\x20more','pin','x-forwarded-for','Server-side\x20user-defined\x20functions\x20registered\x20per\x20environment.','_sockets','embeddings','importFromFile','isDead','_lastPublishAt','JWT\x20signature\x20verification\x20failed','\x20\x20✓\x20Revoked\x20token\x20','--print','HEAD','is\x20invalid','cpuUsage','Cluster\x20replication.\x20The\x20\x22peer\x22\x20op\x20is\x20for\x20cluster\x20nodes,\x20not\x20human\x20users.','435476WbGihT','worker','\x20origin=','single','current','cf-connecting-ip','sourceType','\x20\x20(licensee:\x20','Forbidden\x20—\x20requires\x20','isArray','LICENSEE','Cannot\x20set\x20enforce\x20schema\x20on\x20','getRange','UNPROCESSABLE_ENTITY','end','pipe','exportBlobs','processor:progress','processor','\x0a\x20\x20','scopes','\x20\x20Tier:\x20\x20\x20\x20','_systemEnv','\x0a\x20\x20Run\x20okdb\x20to\x20start\x20the\x20server.\x0a','rawResponse','cyan','response','.kdbconfig','HTTP_WORKERS_REQUIRE_PORTABLE_ROUTES','--token','\x20→\x20POST\x20/api/env/','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','http','freeze','reverse','syncPeers','List,\x20download,\x20and\x20inspect\x20file\x20metadata.','.\x20Add\x20a\x20license\x20that\x20includes\x20\x22','_rowKey','_flushTimer','registerType','isPrimary','--label','_startAdmission','\x27\x20on\x20type\x20\x27','_groupByProcess','net','_timer','isFile','event','_quantum','help','default:\x20cores−1\x20=\x20','\x20\x20(','pause','json','configureAuth','create','_dispatch','\x0a\x20\x20Invalid\x20JSON:\x20','writes=','event:\x20','exports','license:activated','\x20\x20✓\x20Removed\x20license\x20','\x0a[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a','1.9.1','limits','workersFlag','fts:reset','warn','createdAt','rowKey','node','assign','exit','started','set-cookie','\x20\x20╔═══════════════════════════╗','wrong_node','\x20\x20\x20\x20\x20explicit\x20method\x0a\x0a\x20\x20','x-okdb-raw-response','OKDBInvalidPrimaryKeyError','OKDBIndexNotRegisteredError','errors','index','\x0a\x0a\x20\x20','DELETE\x20type/users/item/x','config\x20file\x20valid:\x20','ms\x0a',']\x20already\x20maps\x20to\x20\x27','received\x20','_rootDb','_wrapApiResponse','stack','from','3703497TeKnIK','allowMethods','writeMs','env/','--log-requests','path','maxAge','fts','Data','SYSTEM_PROC','registerFts','nbf','Engines','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20set\x20active\x20environment\x20(persists\x20in\x20session)\x0a\x20\x20','operations','—\x20/api/\x20is\x20auto-prefixed,\x20env\x20is\x20auto-injected','invalid','\x1b[35m','\x20log\x20level:\x20','length','QUIT','[okdb]\x20./okdb-data\x20already\x20exists\x20—\x20skipping','jwks_uri','processKey','params.','--permissions','_totalErrors','getDesired','headers','noRepl','writes','\x20has\x20invalid\x20http.bodyMode:\x20','role','status','Either\x20the\x20build\x20was\x20made\x20with\x20a\x20different\x20keypair,\x20or\x20the\x20license\x20was\x20issued\x20with\x20a\x20different\x20private\x20key.','\x20references\x20','undefined','(add\x20a\x20license\x20first)','active','rows=','\x20\x20║','The\x20following\x20routes\x20require\x20auth\x20but\x20declare\x20no\x20permission:\x0a\x20\x20','Type\x20\x27','_envs','Worker-side:\x20claim,\x20heartbeat,\x20complete,\x20fail,\x20progress.','text/event-stream;\x20charset=utf-8','handle','\x20does\x20not\x20exist','[okdb]\x20exporting\x20env\x20\x22','Feature\x20not\x20licensed:\x20','\x20worker(s)\x20still\x20serving','VALIDATION_ERROR',':\x20expected\x20',');\x20','async','[okdb]\x20starting…\x0a','Read','port\x20','context','call','_adminRelay','TOO_MANY_REQUESTS','\x20\x20records=','_supervisorKey','Release','processorsView','setEncoding','EADDRINUSE','OKDBUniqueConstraintError','toISOString','\x0a\x20\x20Usage:\x20use\x20<env-name>\x0a','.\x20The\x20active\x20license\x20does\x20not\x20enable\x20\x22','doctor','handler','/api/','OKDBTypeAlreadyRegisteredError','indexOf','{}[]:,\x27\x22','FORBIDDEN','Version\x20mismatch\x20for\x20','Validation\x20failed','\x20file','SYSTEM_POKE','delete','types','_flushDebounce','\x20worker','\x20fetching\x20','cors','\x20which\x20does\x20not\x20exist','_lastCpuAt','cluster:\x20ready\x20(','\x20}):\x20','--workers','details','shmbuf/package.json','Environments','BAD_GATEWAY','/api/env/','category','_isWriter','Open\x20licenses\x20cannot\x20exceed\x206\x20months\x20duration\x20(this\x20license\x20expires\x20','_maybePublish','fanout','ppid','\x20died\x20','Search','\x20\x20\x20\x20','Run','--test','396918DJmeGw','bus:proc','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20override\x20active\x20environment\x20for\x20this\x20call\x0a\x20\x20','_clusterWorkerAttached','maxExtra','INTERNAL_ERROR','[okdb]\x20error:\x20license\x20management\x20is\x20only\x20available\x20in\x20licensed\x20builds\x20(npm\x20run\x20build:prod).','scope','Payload\x20too\x20large','ACTIVATION_EXPIRED','\x20\x20\x20\x20\x20control\x20log\x20verbosity\x0a\x20\x20','randomBytes','constructor','stdout','[okdb]\x20backing\x20up\x20to\x20','required','\x20\x20\x20\x20\x20\x20\x20','_ensureTokensType','../','queue-worker','\x20\x20Path\x20access','base64','body','bold','\x20\x20(licenses\x20must\x20be\x20signed\x20by\x20the\x20matching\x20private\x20key)','changes','cpuPct','rss','typeSubDbs','header','\x20MB\x20→\x20','system:poke','keys:','unique:violation','/([^/]+)','formatCookie','\x20\x20✓\x20','[okdb-cluster]\x20respawning\x20worker\x20slot=','[okdb]\x20created\x20./okdb-data','Unsupported\x20JWT\x20alg:\x20','attach','VERB','Unknown\x20JWKS\x20kid:\x20','reads','pathParams','[okdb]\x20export\x20complete','_onProcEvent','_dedupeKey','derivePin','\x20result','access','LICENSED_BUILD','equals','toUTCString','_hbTimer',':\x20connected\x0a\x0a','noAdmin','licensee'];_0x2edd=function(){return _0x5bbcea;};return _0x2edd();}var okdbExports=requireOkdb(),okdb=getDefaultExportFromCjs(okdbExports);module['exports']=okdb;
2
+ 'use strict';const _0x42e206=_0x4d7d;(function(_0xfe35c,_0xfc0d86){const _0x43c101=_0x4d7d,_0x507f52=_0xfe35c();while(!![]){try{const _0x5a5395=parseInt(_0x43c101(0x3fa))/0x1*(parseInt(_0x43c101(0x5b0))/0x2)+parseInt(_0x43c101(0x5c3))/0x3+-parseInt(_0x43c101(0x41e))/0x4*(parseInt(_0x43c101(0x6ac))/0x5)+-parseInt(_0x43c101(0x56a))/0x6+parseInt(_0x43c101(0x5a8))/0x7*(-parseInt(_0x43c101(0x20c))/0x8)+-parseInt(_0x43c101(0x34a))/0x9+parseInt(_0x43c101(0x401))/0xa;if(_0x5a5395===_0xfc0d86)break;else _0x507f52['push'](_0x507f52['shift']());}catch(_0x96c1a2){_0x507f52['push'](_0x507f52['shift']());}}}(_0x4c6a,0xe9bfe));var require$$1=require(_0x42e206(0x47b)),require$$1$1=require('fs'),require$$0=require('os'),require$$4$1=require('net'),require$$5=require(_0x42e206(0x292)),require$$0$3=require(_0x42e206(0x542)),require$$0$1=require(_0x42e206(0x68c)),require$$0$2=require(_0x42e206(0x58b)),require$$4=require('child_process'),require$$1$2=require(_0x42e206(0x409)),require$$0$4=require(_0x42e206(0x613)),require$$0$5=require('perf_hooks'),require$$0$6=require(_0x42e206(0x240));function _0x4c6a(){const _0x14e427=['[okdb]\x20port\x20','_key','bus:type_drop','_adminRelay','view:progress','\x1b[31m','⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20','\x27,\x20cannot\x20map\x20to\x20\x27','\x20supervised)','note','isInteger','execArgv','commitP99Ms','object','embeddings','_scheduleFlush','1112727KnDngO','\x20\x20Expected\x20one\x20of:','[okdb]\x20reset:\x20','Version\x20mismatch\x20for\x20','_publishFailWarned','slot','EXIT','procmodeack/','EADDRINUSE','_cmd','ephemeral','--log-level','keys','\x20\x20\x20\x20features:\x20\x20','SCHEMA_VALIDATION_FAILED','transactionSync','exp','padEnd','--password','_rawDb','\x20writes\x20(','__okdbCluster','Feature\x20not\x20licensed:\x20','\x20\x20\x20\x20•\x20a\x20path\x20to\x20a\x20.license\x20file','_pending','node','[env]','time','registry\x20publish\x20failing:\x20','OKDBTypeNotRegisteredError','\x0a\x20\x20✓\x20License\x20activated','[okdb]\x20failed\x20to\x20parse\x20config\x20file\x20','type/users/item/alice','detachConsole','_log','processes','\x20in\x20','starting','[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22','base64url','export','disable','history','createInterface','\x20\x20Path\x20access','OKDBTypeAlreadyRegisteredError','toUpperCase','\x20\x20records=','\x0a[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a','Foreign\x20key\x20violation:\x20','expiresAt','import','received\x20','\x1b[1m','decommission','push','running','\x20\x20Usage:\x20logs\x20[on|off|debug|info|warn|error]','derivePin','\x20worker\x20slot=','repeat','extend','{}[]:,\x27\x22','stack','cursorKey','bus:poke','INDEX_PROGRESS','logs','_dedupeKey','slice','dropIndex','resetting','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20show\x20active\x20environment\x20+\x20list\x20all\x20envs\x0a\x20\x20','randomUUID','race','body:\x20','[okdb-cluster]\x20slot=','\x0d[okdb]\x20','_dedupeMax','SYSTEM_POKE','node:perf_hooks','busy','OKDBForeignKeyDeleteError','\x20\x20Usage:\x20','Engines','\x0a\x20\x20[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20show\x20API\x20docs\x20for\x20a\x20path\x0a\x0a\x20\x20','use\x20<env>','_kind','No\x20tokens.','LICENSE_LIMIT_EXCEEDED','none','putSync','\x20\x20\x20\x203.\x20Run:\x20\x20okdb\x20license\x20<activation-token>','stringify','\x20\x20✓\x20Removed\x20license\x20','commitsPerSec','\x20months\x20from\x20issuance)','once','LICENSE_TYPE_OPEN','hex','summary','confirm','PUT\x20type/users/item/x\x20{\x22n\x22:1}','removeSync','type/users/query\x20{\x22active\x22:true}','message','doctor','\x20already\x20in\x20use','SYSTEM_PROC','length','index','NAME','_nodeDead','LICENSED_BUILD','bus:proc','add','\x0a\x20\x20\x20\x20\x20\x20','config\x20file\x20invalid:\x20','\x20pid=','\x20\x20\x20\x20\x20\x20\x20\x20\x20browse\x20API\x20routes,\x20grouped\x20by\x20area\x0a\x20\x20','host','INDEX_REGISTERED','hasType','\x20\x20\x20\x20','no\x20.kdbconfig\x20(using\x20defaults)','_lockDb','migrate','treeView','OKDBInvalidIndexKeyError','functions','\x0a\x20\x20Joining\x20cluster\x20at\x20','existsSync','USE','node\x20','--permissions','activation','license:activated','dumpedAt','boolean','effective','committed','ceil','operation','reset','_instanceId','allocUnsafe','fts:registered','\x0a\x20\x20','system:proc','flushed','__identity','_highWater','api','OKDBSchemaCollectionError','description','\x20log\x20level:\x20','\x20to\x20browse\x20the\x20API,\x20','<path>','resetReadTxn','\x0a\x20\x20Joined.\x20Remote\x20tokens\x20replicated.\x20You\x20can\x20now\x20log\x20in\x20with\x20cluster\x20credentials.\x0a','fn-runner','\x22.\x20Use:\x20create,\x20list,\x20revoke','[okdb]\x20warning:\x20failed\x20to\x20restore\x20identity/licenses\x20after\x20reset:\x20','[okdb]\x20error:\x20','\x20\x20\x20\x20license:\x20','/\x20quit\x20/\x20Ctrl+C','seq','\x20\x20✓\x20joined\x20and\x20reconciliation\x20initiated','\x1b[36m',':\x20expected\x20','invalid','_clusterWorkerAttached','_maybePublish','writeUInt32BE','\x20licenses','[okdb]\x20closed\x20cleanly\x0a','system:drain','startHeartbeat','processor:error','--print','default','\x20\x20\x20\x20name:\x20\x20\x20\x20\x20\x20\x20\x20','createServer','platform','Index\x20\x22','blobs','uuid','references','waiting','\x20\x20\x20\x20usage:\x20\x20\x20','_desiredOverlay','_ensureDesired','processor:retry','[okdb]\x20close\x20error:\x20','_released','\x20writer{depth=','terminal','\x20@\x20','process','readUInt8','crypto','claimGated','CREATED','number','list','\x20\x20╔═══════════════════════════╗','unique:violation_resolved','\x20\x20→\x20\x20','children','connected','detectInputType','listLicenses','getRange','entries','deaths','decommissioned','FOREIGN_KEY_DELETE_RESTRICTED','/api','every','\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20','log','ref:violation','_onPoke','enable','License\x20signature\x20invalid\x20—\x20this\x20license\x20was\x20not\x20signed\x20by\x20the\x20key\x20paired\x20with\x20this\x20build.\x20','scrypt','started','active','_selfKey','_windowCbs','build','ITEM_UPDATE','15XqIfFv','dropFts','init','open','\x20\x20✓\x20http\x20listening\x20on\x20:','lifecycle','_db','--drop','search','singletonClaims','ms\x20(attempt\x20','\x20\x20after\x20sync.\x20Duplicate\x20names\x20will\x20surface\x20as\x20ambiguous\x20logins\x20to\x20clean\x20up.','clusterStatusView','system:ready','types','sandbox','\x20license(s)','ms/','maxWrites','ingest','INDEX_READY','_listenAddr','drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):','[okdb-cluster]\x20worker\x20pid=','toString',',\x20got\x20','OKDBInvalidValueError','_groupByProcess','\x20\x20\x20\x20api:\x20\x20\x20\x20\x20http://localhost:','processKey','[okdb]\x20error:\x20unrecognized\x20input:\x20\x22','\x20does\x20not\x20exist','txn:start','isWorker','_refreshDesiredSnapshot','pause','TYPE_ALREADY_REGISTERED','permissions','_committed','startedAt','LICENSE_HASH_MISMATCH','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','\x0a\x20\x20Run\x20okdb\x20to\x20start\x20the\x20server.\x0a','halted','_buckets','reload','registerType','data','meta','okdb','OKDBInvalidPrimaryKeyError','POST','15320MXXgta','holder','ms\x20p99=','\x22\x20→\x20','okdb.pid','\x20\x20(licensee:\x20','Token\x20secret\x20not\x20configured','_admissionTimer','register','trim','blob','\x20worker(s)\x20remaining','isConnected','%),\x20','types/env=','--config','\x20phase=','create','homedir','true','_nodeDbCache','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/info\x0a\x20\x20\x20\x20','\x20\x20(unlimited)','payload','byteLength','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20','\x20environment\x20','.okdb-write-test','licenses','getDesired','bus:drain','_sampleOwnStats',',\x20stopping\x20workers…\x0a','[okdb]\x20error:\x20license\x20management\x20is\x20only\x20available\x20in\x20licensed\x20builds\x20(npm\x20run\x20build:prod).','NOT_FOUND','then','clearLine','method','resetFts','available','exit','Feature\x20not\x20available\x20on\x20free\x20tier:\x20','label','type:drop','_flushDebounce','\x20\x20[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a','cpus','isPrimary','/api/env/','INDEX_NOT_REGISTERED','--username','load','node:events','entry','SIGKILL','config\x20file\x20valid:\x20','_heartbeatTimer','keys:','\x1b[35m','dynamic','\x20\x20changes=','dedupeMax',');\x20','_drain','[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22','Cannot\x20delete\x20','input:\x20','appendFileSync','pid','_markSeen','engines','\x1b[90m','Open\x20licenses\x20cannot\x20exceed\x206\x20months\x20duration\x20(this\x20license\x20expires\x20','exports','feed:','\x20\x20\x20\x20•\x20a\x20license\x20id\x20\x20\x20\x20\x20(uuid)','has','\x20sync','_isClusterController','[okdb]\x20opening\x20','processorsView','\x20\x20Writes:\x20\x20','ms\x20env=','\x20\x20All\x20checks\x20passed.\x0a','\x20(must\x20be\x20an\x20integer\x20>=\x201)\x20—\x20using\x201','type/users/item/alice\x20--env\x20staging','env:removed','\x20\x20\x20\x20•\x20an\x20activation\x20token\x20\x20(124\x20chars)','[okdb]\x20shutdown\x20drain\x20exceeded\x203000ms\x20—\x20hard-exiting\x0a','quit','\x20type','type','Build\x20expects\x20public\x20key\x20fingerprint\x20','role','\x20\x20Usage:\x20okdb\x20license\x20[<blob|path|uuid|activation-token>]','drop','_putRowSync','\x20(must\x20be\x201–65535)','recheck','\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.','env/staging/info','\x20\x20✗','map','\x20\x20·\x20','_onProcEvent','transport','[okdb]\x20blobs:\x20imported=','_license','pin','writeUInt8','\x20\x20\x20\x20license:\x20free\x20tier\x20—\x20add\x20a\x20license\x20to\x20unlock\x20sync,\x20embeddings,\x20engines,\x20time-machine','\x20\x20Type\x20','statSync','_caps','decommissioning','createEnvironment','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20GET\x20(implicit)\x0a\x20\x20','\x20\x20\x20\x20label:\x20\x20\x20\x20\x20\x20\x20','participate','[okdb]\x20invalid\x20port:\x20','workers','clusterWorkers','workersFlag','isFeatureEnabled','peers=','node\x20identity','Examples','properties','_report','_active','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20','license:added','node/','stdin','../okdb','ms\x20on\x20env=','draining','[okdb]\x20error:\x20failed\x20to\x20read\x20','--grants','env/:env','_ownMeta','ms\x20activeWriters=','version','processor:progress','disconnect','\x20process','bind','\x27\x20already\x20registered','_quantum','\x20\x20\x20\x20path:\x20\x20\x20\x20','_clusterOnMessage','listAll','test','_flushTimer','randomBytes','access','readUInt16BE','(null)','replace','cpuWindowMs','[on|off|level]','--token','.\x20Primary\x20keys\x20must\x20be\x20string\x20or\x20number.\x20Got:\x20','putNode','from','\x20(slot=','events','Unique\x20constraint\x20violated\x20on\x20','constructor','type:registered','item:update','\x22\x20is\x20used\x20by:\x20','pending','_systemEnv','Schema\x20validation\x20failed\x20for\x20','_timer','ITEM_REMOVE','readFileSync','safety','addLicense','parkedNow','\x20\x20⚠\x20\x20','verify','[okdb]\x20.kdbconfig\x20already\x20exists\x20—\x20skipping','darwin','rowKey','assertLimit','./okdb-export.ndjson','null','HELP','views','sync:apply','win32','worker','importBlobs','_activateProcesses','write','FTS_REGISTERED','roles','rss','ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)','concat','acquiredAt','prependListener','count','_wantDb','tags:\x20','PUB_FINGERPRINT','LICENSE_FEATURE_DISABLED','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20','fast','inflightAgesMs','_threadStats','_bpWaiters','_nodeDbFor','\x20\x20\x20\x20permissions:\x20','/api/','error','drain','keys/public.pem','reverse','argv','SCHEMA_COLLECTION_INVALID','LICENSE_ACTIVATION_INVALID','--no-cluster','[okdb]\x20error:\x20--grants\x20must\x20be\x20valid\x20JSON\x20object','info','_nodeDb','—\x20/api/\x20is\x20auto-prefixed,\x20env\x20is\x20auto-injected','writeUInt16BE','primary','prototype','\x20MB)','[okdb]\x20nothing\x20to\x20reset\x20—\x20','\x20│\x20','childTransaction','\x20records…','resolve','ESRCH','round','rmSync','OKDBNotFoundError','gray','ms\x20mean=','processor:ready','attach','getSecurityNotices','\x20oldestPendingMs=','flushLmdb','admin','_statusEnv','/type/users\x0a\x20\x20\x20\x20','.\x20The\x20active\x20license\x20does\x20not\x20enable\x20\x22','cluster:\x20unavailable\x20(shmbuf\x20native\x20missing)\x20—\x20running\x20single-process','captureStackTrace','\x20\x20\x20\x20graceful\x20shutdown\x0a','\x20already\x20exists','[okdb]\x20error:\x20join\x20requires\x20credentials.\x20Provide\x20--token\x20<t>\x20or\x20--username\x20<u>\x20--password\x20<p>','[okdb]\x20loaded\x20config:\x20','__OKDB_PUB_FINGERPRINT__','_removeRowAsync','License\x20already\x20stored','PUT','--label','\x20\x20\x20\x20api:\x20\x20\x20http://localhost:','isWanted','warn','type/users','_lock','dropping','_startAdmission','registerFts','ttlMs','_startedAt','_lastCpuAt','slotKey','\x20forked\x20','\x20active\x20env:\x20','SIGINT','ALREADY_EXISTS','\x20\x20Build:\x20\x20\x20key\x20fingerprint\x20','createHmac','fts:reset','decoded','reason','noCluster','writes=','FEATURES','\x20<path>\x20[json-body]','processors','_cursors','/admin/index.html','bus:env_release','signalWant','\x20drainAge=','respawnTimer','MALFORMED_TOKEN','envsOpen','~licenses','online','uncaughtException','/type/users/query\x0a\x20\x20\x20\x20','OPEN','(empty)','toFixed','columns','default:\x20cores−1\x20=\x20','options','ms\x20busy=','beforeWrite','FTS_RESET','shift','_enableChangelog','\x20\x20\x20\x20expires:\x20\x20\x20','abs','Processors','http.workers','types:','9822744OuSeyY','_publishNow','PUBLIC_KEY_PEM','\x20\x20Envs:\x20\x20\x20\x20','grants','ref:violation_resolved','reduce','licensed','\x20\x20Some\x20checks\x20failed.\x0a','writeFileSync','[okdb-cluster]\x20change-feed\x20init\x20failed:\x20','string','listNodes','indexes','raw-put','system:env_release','sig','index:registered','envs','[okdb]\x20created\x20.kdbconfig','env','\x22\x20matches\x20','\x20\x20\x20\x20id:\x20\x20\x20\x20','[okdb]\x20http\x20workers:\x20','[okdb-cluster]\x20respawning\x20worker\x20slot=','get','\x20day(s).','\x0a[okdb]\x20error:\x20','_isReader','current','min','find','\x20HTTP\x20server(s)\x20on\x20port\x20','\x20\x20✓\x20OKDB\x20server\x20running','files','--env\x20<name>','_done','sourceKey','VERSION_MISMATCH','⚠\x20INTERNAL\x20LICENSE\x20ACTIVE\x20—\x20all\x20features\x20and\x20limits\x20are\x20unlocked.\x20For\x20vendor/internal\x20use\x20only.','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20has\x20expired\x20—\x20request\x20a\x20fresh\x20one.','--inspect','index:ready','Records','INDEX_ALREADY_REGISTERED','database\x20path\x20not\x20writable:\x20','some','async','system:clock_change','\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20','\x20\x20\x20\x20status:\x20\x20\x20\x20active','allSettled','_computeStatus','\x20\x20\x20\x20status:\x20\x20\x20\x20active\x20\x20(open\x20license\x20—\x20no\x20activation\x20needed)','licenseHash','types\x20--env\x20staging','Events','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20show\x20this\x20help\x0a\x20\x20','\x20(expires\x20','level','licenseType','green','clearTtl','param','mean','timeMachine','hasDesired','event','selfKey','expired','decodeLicenseBlob','LOGS','--open','call','--eval','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','change','_processStartedAt','[okdb]\x20error:\x20--address\x20is\x20required\x20for\x20join\x20(this\x20node\x27s\x20reachable\x20sync\x20address).\x0a','\x20\x20Error:\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20open\x20admin\x20UI\x20in\x20browser\x0a\x20\x20','(unset)','startsWith','unknown','config','_seen','tags','_coordinator','processingStatusView','_servingEngines','line','\x1b[37m','toLowerCase','~processes:cmd','deregisterSelf','licensee','hidden','_onTick','oldestPendingMs','ttl:set','Either\x20the\x20build\x20was\x20made\x20with\x20a\x20different\x20keypair,\x20or\x20the\x20license\x20was\x20issued\x20with\x20a\x20different\x20private\x20key.','[okdb]\x20cluster\x20close\x20error:\x20','--test','user','sizeBefore','commit','database\x20path\x20writable:\x20','--address','\x20/\x20','\x20HTTP\x20workers,\x20primary\x20=\x20processor)','supervisorKey','\x20\x20\x20\x201.\x20Send\x20the\x20PIN\x20above\x20(','[okdb]\x20error:\x20token\x20with\x20name\x20\x22','_started','maxExtra','server','includes','schema:set','~processes','syncPeers','\x20\x20\x20\x20license:\x20⚠\x20OPEN\x20—\x20','_wantDbHandle','createdAt','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','_singletonLocks','INVALID_PRIMARY_KEY','password','charCodeAt','_envs','\x20\x20\x20\x20\x20\x20\x20POST\x20(body\x20implies\x20POST)\x0a\x20\x20','setDesired','trimStart','enabled','--path','_onStop','SIG_INVALID','Invalid\x20activation\x20token:\x20','ITEM_CREATE','dirname','\x20references\x20','\x20\x20\x20\x20\x20\x20','depth','_changefeed','--help','_lastPublishAt','\x20\x20[okdb]\x20closed\x20cleanly\x0a','fanout','[okdb]\x20imported\x20\x20types=','processor:paused','noteListenAddr','http://localhost:','HTTP\x20','No\x20license\x20found\x20matching\x20this\x20activation\x20token','\x0a===\x20OKDB_DIAG\x20','[okdb]\x20cluster\x20primary\x20pid=','sync','xdg-open\x20','--types','_heartbeatInFlight','_children','ACTIVATION_EXPIRED','\x0a\x20\x20License\x20details:','function','importFromFile','__writeCounter','help','decodeLicenseBlob:\x20input\x20must\x20be\x20a\x20string','_isStale','STATUS','\x20\x20\x20\x20\x20explicit\x20method\x0a\x0a\x20\x20','inputSchema','listen','_closed','set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)','selfAddress','token','2WmmRjU','okdb-writer:\x20env\x20closing\x20—\x20retry','\x20\x20\x20\x20-\x20The\x20license\x20blob\x20has\x20not\x20been\x20added\x20yet\x20—\x20run\x20`okdb\x20license\x20<blob>`\x20first.','[body]','TYPES','processorId','_buildProcessingFacet','37109270zwSfRY','percentile','updatedAt','127.0.0.1','idx:','\x0a[okdb]\x20received\x20','processing','\x0a\x0a\x20\x20','cluster','targetKey','[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a','type/','namespace','TYPE_NOT_REGISTERED','msg','[okdb]\x20exporting\x20env\x20\x22','--ttl','VIEW_PROGRESS','values','OKDBIndexNotRegisteredError','clearThreadStats','SYNC_COMMITS','QUIT','\x20file','onLicenseExpired','_rootDb','\x20logs\x20off\x0a','__okdbSlot','ORPHAN\x20(env-closed\x20write)','777960uHLNOy','[okdb]\x20primary\x20okdb\x20close\x20error:\x20','\x20\x20(','features','der','Type\x20\x27','verifyActivation','spki','embedded','identity','\x20\x20(licenses\x20must\x20be\x20signed\x20by\x20the\x20matching\x20private\x20key)','username','parse','update','\x20\x20(name:\x20','OKDBAlreadyExistsError','sha256','setOwnMeta',':\x20key\x20[','[okdb]\x20error:\x20remove\x20requires\x20an\x20id\x20argument','\x20\x20@','\x20\x20\x20\x20\x20control\x20log\x20verbosity\x0a\x20\x20','stderr','valid',',\x20signal=','question','okdb-http-worker-child.js','mcp',';\x20shmbuf\x20native\x20missing\x20→\x20forced\x20single-process',',\x20closing…\x0a','port','copy','(workers\x20can\x27t\x20share\x20the\x20cross-process\x20HLC/clock).\x20Forcing\x20single-process\x20(was\x20','status','\x27\x20doesn\x27t\x20exist','debug','kill','offWindow','publishChildRow','stdout','--blobs','\x20\x20\x20\x20status:\x20\x20\x20\x20','\x20\x20✓\x20Revoked\x20token\x20','?\x0a\x20\x20(node\x20identity\x20and\x20licenses\x20are\x20preserved)\x0a\x20\x20Type\x20\x22yes\x22\x20to\x20confirm:\x20','loop-lag\x20','\x20(expires\x20in\x20','ttl:expired','--name','access:\x20','dropType','(add\x20a\x20license\x20first)','--version','set','(on\x20any\x20path\x20command)','[okdb-cluster]\x20','nodeKey','[okdb]\x20created\x20./okdb-data','item:remove','activateLicense','Release','_lastCpuWindowMs','catch','[okdb]\x20error:\x20revoke\x20requires\x20an\x20id\x20argument','assertFeature','\x20\x20\x20\x20status:\x20\x20\x20\x20pending\x20activation','License\x20expired\x20or\x20invalidated','\x0a\x20\x20✓\x20Token\x20created','\x20\x20✓\x20','_buildChildRow','inst:','--key','\x0a\x20\x20✓\x20License\x20added','white','loop-lag','\x20days\x20—\x20POC/demo\x20only,\x20not\x20node-bound)','sub','\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site','getCmd','uptime','[okdb-cluster]\x20primary\x20pid=','firstTs','\x20records','_lastCpuUsage','clear','delete','put','<json-body>','\x20statusEnv=','1ofN:','~processes:desired','_bpParkedTotal','setLogger','Indexes','path','emit','--changes','[okdb]\x20reset\x20aborted','\x20worker','cyan','\x0a\x20\x20Invalid\x20JSON:\x20','logLevel','Queue','cluster:\x20ready\x20(','attachFeed','logRequests','ready','external','[okdb]\x20error:\x20--password\x20requires\x20--name','Environments','getCount','http','cluster:','issuedAt','--watch','__vocab/version','mkdirSync','backup','EXPIRES','_acquiredAt','_hbTimer','_lastCpuPct','noAdmin','_supervisorKey','listDesired','bumpCmd','maxMs','killable','Sync','PATCH','\x20\x20\x20http://localhost:','sort','\x20died\x20','ENV_CLOSING_RETRY','LICENSEE','\x20\x20Note:\x20this\x20node\x20has\x20existing\x20tokens.\x20They\x20will\x20coexist\x20with\x20cluster\x20tokens\x0a','sizeAfter','shutdown','createHash','getClock','size','dropSchema','./okdb-backup','bold','exportBlobs','\x20\x20\x20\x20port:\x20\x20\x20\x20','(none)','_role','getProcess','nodesView','expires','[okdb]\x20shmbuf\x20native\x20binding\x20unavailable\x20—\x20multi-process\x20clustering\x20is\x20unsafe\x20','_isWriter','send','DELETE','code','FOREIGN_KEY_VIOLATION','shmbufNative','shmbuf/package.json','errors','unref','records','~tokens','\x20\x20+','_inflight','_holderDead','shutting\x20down…\x0a','removeSupervisedChild','(primary\x20=\x20processor)','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20','files/','_draining',':want','cpuUsage','stopped',')\x20exited\x20','publishOwnRow','hint','open\x20','addSupervisedChild','openDB','red','env:opened','getPins','INDEX_RESET','state','hard-killed','splice','magenta','.\x20Only\x20primitives,\x20null,\x20Buffers,\x20and\x20arrays\x20are\x20allowed.\x20Got:\x20','toLocaleString','.kdbconfig','isTTY','quantum','Full-text\x20search','filter','hostname','_licenseHash','isDead','index:progress','Index\x20\x27','_outstanding','SYSTEM_STOPPED','\x22\x20to\x20enable\x20it.','cli','now','listenAddr','free\x20tier','recordWrite','_sandbox','updateSupervisedChildStats','split','dim',')\x20—\x20they\x20will\x20NOT\x20be\x20preserved','\x20\x20[','\x20\x20\x20\x20limits:\x20\x20\x20\x20','fieldPath','exec','processes:\x20','result','threads','off','system:poke','padStart','changes','\x20\x20╚═══════════════════════════╝','pushEphemeral','caps','compact','prompt','other','heartbeatMs','key','decodeLicenseBlob:\x20failed\x20to\x20decode\x20payload:\x20','[okdb]\x20import\x20complete','_baselines','Admin','OKDB-PIN-V1:','mode','force','\x20\x20Or\x20set\x20sync.address\x20in\x20.kdbconfig','_singletonLock','application/json','transaction','already\x20in\x20use','\x20for\x20commands,\x20','\x20tokens:','license','listRoutes','Activation\x20invalid:\x20','[okdb]\x20export\x20complete','timingSafeEqual','close','markClosed','UNIQUE_CONSTRAINT','\x20\x20⚠','setTtl','single','licenseId','ms\x20max=','stats','flushDebounce','kind','assign','_buildOwnRow','_isFree','expiry','\x1b[0m','ttl','fork','\x20\x20\x20\x20\x20\x20\x20\x20\x20OKDB\x20SHELL\x20\x20\x20\x20\x20\x20\x20\x20','id:\x20','schema:drop','value','\x20\x20\x20\x20licensee:\x20\x20','\x20\x20\x20\x20path:\x20\x20','building','SIGINT\x20(double-tap)','unique:violation','\x20worker(s)\x20still\x20serving','--workers','_desired','digest','routes','getChanges','OKDBVersionMismatchError','\x20result','\x27\x20is\x20already\x20registered','dead','LICENSE_INVALID','INDEX_HAS_CONSUMERS','processor:resumed','typeSubDbs','readline','OKDBForeignKeyError','_writer','\x20\x20\x20\x20\x20\x20\x20','use','_startHeartbeat','standalone','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20override\x20active\x20environment\x20for\x20this\x20call\x0a\x20\x20','GET','[okdb]\x20invalid\x20log\x20level:\x20\x22','.kdb_history','Files','floor','registerIndex','consecutiveFailures','\x20\x20\x20\x20admin:\x20http://localhost:','LABEL','join','ppid','max','System','_collectSingletonClaims','_getType','config\x20http.workers','_rowKey','created','fts','--env','--no-repl','val','\x20===','heapUsed','SIGBREAK','start','typesPerEnv','memoryUsage','active:','\x20\x20\x20\x20writes:\x20\x20\x20\x20','_enqueuedAt','OKDB_HTTP_WORKERS\x20env','6379464IPHfBV','cause','_handleInProcess','\x20ipc\x20error:\x20','heapTotal','\x20\x20\x20\x20port:\x20\x20','\x20document(s)\x20reference\x20it\x20with\x20onDelete:restrict','ftsName','limits','forEach','SIGTERM','\x27:\x20','remove','\x20which\x20does\x20not\x20exist','readUInt32BE','0123456789ABCDEFGHJKMNPQRSTVWXYZ','_drainOne','dbPath','\x20HTTP\x20workers\x20','_migrateVocab','INVALID_VALUE','REMOVE','revoke','\x1b[32m','_collectWriterFacet','setupPrimary','level:\x20info','unlinkSync','recent\x20writes\x20(newest\x20first)','indexOf',']\x20already\x20maps\x20to\x20\x27','removeNode','system','node:crypto','body','\x20\x20http://localhost:','\x0a\x20\x20okdb\x20doctor\x0a','name','http-server','\x0a\x20\x20No\x20documentation\x20found\x20for:\x20','\x20\x20skipped=','~lock','[okdb]\x20invalid\x20','_onItem',')\x20to\x20your\x20license\x20vendor.','fts:drop','[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22','[okdb]\x20error:\x20show\x20requires\x20an\x20id\x20argument','isArray','ENVS','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','\x0a\x20\x20\x20\x20','fts:','./okdb-data','auth','stop','env/','afterWrite','_durs','targetType','utf8',':\x20processor\x20(HTTP-silent),\x20','3682FetqAB','yellow','indexToDb','rows=','toISOString','OKDB_HTTP_WORKERS','noRepl','\x20\x20env=','621022XWizzo','--port','_putRowAsync'];_0x4c6a=function(){return _0x14e427;};return _0x4c6a();}function getDefaultExportFromCjs(_0x3b706f){const _0x4bd46d=_0x42e206;return _0x3b706f&&_0x3b706f['__esModule']&&Object[_0x4bd46d(0x2f3)]['hasOwnProperty'][_0x4bd46d(0x393)](_0x3b706f,_0x4bd46d(0x678))?_0x3b706f[_0x4bd46d(0x678)]:_0x3b706f;}var okdb$1={},okdbWorkers,hasRequiredOkdbWorkers;function requireOkdbWorkers(){if(hasRequiredOkdbWorkers)return okdbWorkers;hasRequiredOkdbWorkers=0x1;const _0x55b36a=require$$0,_0xf8275=require$$1$1,_0xf99ba4=require$$1;let _0x4df4c3;function _0xcc3f05(){const _0x33b4f6=_0x4d7d;if(process.env.OKDB_FORCE_SHMBUF_FALLBACK==='1')return![];if(_0x4df4c3!==undefined)return _0x4df4c3;try{const _0x1271f4=_0xf99ba4[_0x33b4f6(0x3d4)](require[_0x33b4f6(0x2f9)](_0x33b4f6(0x4bb)));_0x4df4c3=_0xf8275[_0x33b4f6(0x647)](_0xf99ba4[_0x33b4f6(0x553)](_0x1271f4,_0x33b4f6(0x6aa),_0x33b4f6(0x459),'shmbuf.node'));}catch{_0x4df4c3=![];}return _0x4df4c3;}function _0x229c22(){const _0x1168f1=_0x4d7d,_0x57df2c=_0x55b36a[_0x1168f1(0x23a)]()[_0x1168f1(0x631)];return Math[_0x1168f1(0x555)](0x1,_0x57df2c-0x1);}function _0x3caf81(_0x25e3fa,_0x1bf42e={}){const _0x2f4222=_0x4d7d,_0x4f7a99=_0x1bf42e[_0x2f4222(0x4ba)]!==undefined?_0x1bf42e[_0x2f4222(0x4ba)]:_0xcc3f05();let _0x447f29;if(_0x25e3fa?.[_0x2f4222(0x329)])_0x447f29=0x1;else{let _0x272312,_0x220890;if(_0x25e3fa?.[_0x2f4222(0x286)]!==undefined&&_0x25e3fa['workersFlag']!==null&&_0x25e3fa[_0x2f4222(0x286)]!=='')_0x272312=_0x25e3fa[_0x2f4222(0x286)],_0x220890=_0x2f4222(0x535);else{if(process.env.OKDB_HTTP_WORKERS!==undefined&&process.env.OKDB_HTTP_WORKERS!=='')_0x272312=process.env.OKDB_HTTP_WORKERS,_0x220890=_0x2f4222(0x5ad);else _0x25e3fa?.[_0x2f4222(0x48c)]?.[_0x2f4222(0x284)]!==undefined&&_0x25e3fa[_0x2f4222(0x48c)][_0x2f4222(0x284)]!==null&&_0x25e3fa['http'][_0x2f4222(0x284)]!==''&&(_0x272312=_0x25e3fa[_0x2f4222(0x48c)][_0x2f4222(0x284)],_0x220890=_0x2f4222(0x348));}if(_0x272312===undefined)_0x447f29=_0x229c22();else{const _0x40bf64=Number(_0x272312);!Number[_0x2f4222(0x5bd)](_0x40bf64)||_0x40bf64<0x1?(console['warn'](_0x2f4222(0x594)+_0x220890+'='+JSON[_0x2f4222(0x621)](_0x272312)+_0x2f4222(0x260)),_0x447f29=0x1):_0x447f29=_0x40bf64;}}return!_0x4f7a99&&_0x447f29>0x1&&(console[_0x2f4222(0x316)](_0x2f4222(0x4b4)+(_0x2f4222(0x43e)+_0x447f29+').')),_0x447f29=0x1),_0x447f29;}return okdbWorkers={'isShmbufNative':_0xcc3f05,'defaultWorkers':_0x229c22,'resolveWorkers':_0x3caf81},okdbWorkers;}var version='2.0.0',require$$3={'version':version},okdbAuthTokens,hasRequiredOkdbAuthTokens;function requireOkdbAuthTokens(){if(hasRequiredOkdbAuthTokens)return okdbAuthTokens;hasRequiredOkdbAuthTokens=0x1;const _0x15db89=require$$0$1;function _0x259e2b(_0x540119,_0x32c608){const _0x6c1fe9=_0x4d7d;return _0x15db89[_0x6c1fe9(0x325)](_0x6c1fe9(0x42e),_0x32c608)[_0x6c1fe9(0x42b)](_0x540119)[_0x6c1fe9(0x537)]('base64url');}function _0x240fa4(_0x2a3e66,_0x67b902){const _0x1809ef=_0x4d7d;if(typeof _0x2a3e66!==_0x1809ef(0x355)||typeof _0x67b902!==_0x1809ef(0x355))return![];if(Buffer[_0x1809ef(0x224)](_0x2a3e66)!==Buffer['byteLength'](_0x67b902))return![];return _0x15db89['timingSafeEqual'](Buffer['from'](_0x2a3e66),Buffer[_0x1809ef(0x2b0)](_0x67b902));}function _0x3a5f6b(_0x133b42){const _0x45f854=_0x4d7d;if(!_0x133b42?.[_0x45f854(0x39c)]('Bearer\x20'))return null;return _0x133b42[_0x45f854(0x608)](0x7);}function _0x5c9b77(_0x29aabd=0x20){const _0x45c9d5=_0x4d7d;return _0x15db89[_0x45c9d5(0x2a6)](_0x29aabd)[_0x45c9d5(0x1f0)]('base64url');}function _0x5f208c(_0xa22d67){const _0x18aa50=_0x4d7d;return _0x15db89[_0x18aa50(0x4a7)](_0x18aa50(0x42e))[_0x18aa50(0x42b)](_0xa22d67)[_0x18aa50(0x537)](_0x18aa50(0x627));}function _0x4469ca(_0x34e978,_0x20d610,_0x5a26f8=0x36ee80){const _0x17e81a=_0x4d7d;if(!_0x20d610)throw new Error(_0x17e81a(0x212));const _0x3d14bb=Date[_0x17e81a(0x4ea)](),_0x3233f2=Buffer['from'](JSON[_0x17e81a(0x621)]({'iat':_0x3d14bb,'exp':_0x3d14bb+_0x5a26f8,'sub':_0x34e978?.['id']??_0x34e978?.[_0x17e81a(0x469)]??null,'username':_0x34e978?.[_0x17e81a(0x429)]??_0x34e978?.['name']??null,'roles':Array[_0x17e81a(0x59a)](_0x34e978?.[_0x17e81a(0x2d2)])?_0x34e978[_0x17e81a(0x2d2)]:[]}))[_0x17e81a(0x1f0)](_0x17e81a(0x5ea)),_0xb023c0=_0x259e2b(_0x3233f2,_0x20d610);return _0x3233f2+'.'+_0xb023c0;}function _0x13d9aa(_0x59825a,_0x19194b){const _0x4fb065=_0x4d7d;if(!_0x19194b||typeof _0x59825a!==_0x4fb065(0x355))return null;const [_0x14f1b0,_0x241b20]=_0x59825a[_0x4fb065(0x4f0)]('.');if(!_0x14f1b0||!_0x241b20)return null;const _0x571284=_0x259e2b(_0x14f1b0,_0x19194b);if(!_0x240fa4(_0x241b20,_0x571284))return null;try{const _0x10c5be=JSON[_0x4fb065(0x42a)](Buffer[_0x4fb065(0x2b0)](_0x14f1b0,'base64url')[_0x4fb065(0x1f0)]()),_0x5ef2f2=0x7530;if(Date[_0x4fb065(0x4ea)]()>Number(_0x10c5be?.['exp']??0x0)+_0x5ef2f2)return null;return _0x10c5be;}catch{return null;}}async function _0x233c67(_0x3fe55c){return new Promise((_0x30b11f,_0x478b23)=>{const _0x4a9b89=_0x4d7d,_0x3acd66=_0x15db89['randomBytes'](0x10);_0x15db89[_0x4a9b89(0x6a5)](_0x3fe55c,_0x3acd66,0x40,(_0x299ae3,_0x2edb03)=>{const _0x5d1adb=_0x4a9b89;if(_0x299ae3)_0x478b23(_0x299ae3);_0x30b11f(_0x3acd66[_0x5d1adb(0x1f0)](_0x5d1adb(0x627))+':'+_0x2edb03[_0x5d1adb(0x1f0)](_0x5d1adb(0x627)));});});}async function _0x3d6c4f(_0x138c12,_0x1cc734){const _0x3a4105=_0x4d7d,[_0x5ebb1e,_0x56cd15]=_0x1cc734['split'](':');if(!_0x5ebb1e||!_0x56cd15)return![];const _0x2cb431=Buffer['from'](_0x5ebb1e,_0x3a4105(0x627));return new Promise((_0x19bddd,_0x1dfa7a)=>{const _0x23dcb3=_0x3a4105;_0x15db89[_0x23dcb3(0x6a5)](_0x138c12,_0x2cb431,0x40,(_0x6fbf9f,_0xa735d3)=>{const _0x30d80e=_0x23dcb3;if(_0x6fbf9f)_0x1dfa7a(_0x6fbf9f);_0x19bddd(_0x15db89[_0x30d80e(0x518)](_0xa735d3,Buffer['from'](_0x56cd15,_0x30d80e(0x627))));});});}return okdbAuthTokens={'hmac':_0x259e2b,'timingSafeEqual':_0x240fa4,'parseBearer':_0x3a5f6b,'randomToken':_0x5c9b77,'hashToken':_0x5f208c,'issueToken':_0x4469ca,'authenticateToken':_0x13d9aa,'hashPassword':_0x233c67,'verifyPassword':_0x3d6c4f},okdbAuthTokens;}var okdbLicenseCodec,hasRequiredOkdbLicenseCodec;function requireOkdbLicenseCodec(){const _0x5a523e=_0x42e206;if(hasRequiredOkdbLicenseCodec)return okdbLicenseCodec;hasRequiredOkdbLicenseCodec=0x1;const _0x42c98c=require$$0$2,_0x17ca14=_0x5a523e(0x579),_0xe4b1d4=new Uint8Array(0x100)['fill'](0xff);for(let _0x118cdf=0x0;_0x118cdf<_0x17ca14[_0x5a523e(0x631)];_0x118cdf++){_0xe4b1d4[_0x17ca14[_0x5a523e(0x3c9)](_0x118cdf)]=_0x118cdf,_0xe4b1d4[_0x17ca14[_0x5a523e(0x3c9)](_0x118cdf)+0x20]=_0x118cdf;}_0xe4b1d4['O'[_0x5a523e(0x3c9)](0x0)]=0x0,_0xe4b1d4['o'['charCodeAt'](0x0)]=0x0,_0xe4b1d4['I'[_0x5a523e(0x3c9)](0x0)]=0x1,_0xe4b1d4['i'[_0x5a523e(0x3c9)](0x0)]=0x1,_0xe4b1d4['L'[_0x5a523e(0x3c9)](0x0)]=0x1,_0xe4b1d4['l'[_0x5a523e(0x3c9)](0x0)]=0x1;function _0x54f5cb(_0x2e2970){const _0x59613d=_0x5a523e;let _0x3cfc4d=0x0,_0x245bc6=0x0,_0x48df60='';for(let _0x252922=0x0;_0x252922<_0x2e2970[_0x59613d(0x631)];_0x252922++){_0x245bc6=_0x245bc6<<0x8|_0x2e2970[_0x252922],_0x3cfc4d+=0x8;while(_0x3cfc4d>=0x5){_0x3cfc4d-=0x5,_0x48df60+=_0x17ca14[_0x245bc6>>>_0x3cfc4d&0x1f];}}return _0x3cfc4d>0x0&&(_0x48df60+=_0x17ca14[_0x245bc6<<0x5-_0x3cfc4d&0x1f]),_0x48df60;}function _0x5aeefa(_0xe93cef){const _0x11678e=_0x5a523e;_0xe93cef=_0xe93cef['replace'](/-/g,'')[_0x11678e(0x5f1)]();let _0x5acbd2=0x0,_0x58aeeb=0x0;const _0x143539=[];for(let _0x2911e0=0x0;_0x2911e0<_0xe93cef['length'];_0x2911e0++){const _0x15330e=_0xe4b1d4[_0xe93cef['charCodeAt'](_0x2911e0)];if(_0x15330e===0xff)continue;_0x58aeeb=_0x58aeeb<<0x5|_0x15330e,_0x5acbd2+=0x5,_0x5acbd2>=0x8&&(_0x5acbd2-=0x8,_0x143539[_0x11678e(0x5fa)](_0x58aeeb>>>_0x5acbd2&0xff));}return Buffer[_0x11678e(0x2b0)](_0x143539);}const _0x168d3d=[_0x5a523e(0x3e5),_0x5a523e(0x5c1),_0x5a523e(0x252),_0x5a523e(0x55c),'timeMachine',_0x5a523e(0x2ca),_0x5a523e(0x439),_0x5a523e(0x36c)],_0x301e8c=0x0,_0x464063=0x1,_0x49f215=0x2,_0x35a2c4=0x6*0x1e*0x18*0x3c*0x3c*0x3e8;function _0x47b2b5({issuedAt:_0x1f859e,expiresAt:_0x1c6090,licensee:licensee='',features:features={},limits:limits={},licenseType:licenseType=_0x301e8c}){const _0x4a6a32=_0x5a523e,_0x1b78f1=Buffer[_0x4a6a32(0x2b0)](licensee,_0x4a6a32(0x5a6))[_0x4a6a32(0x608)](0x0,0x40),_0xa49df9=0x1+0x1+0x4+0x4+0x1+_0x1b78f1[_0x4a6a32(0x631)]+0x2+0x10,_0xcd392b=Buffer[_0x4a6a32(0x655)](_0xa49df9);let _0x546198=0x0;_0xcd392b[_0x4a6a32(0x279)](0x1,_0x546198++),_0xcd392b[_0x4a6a32(0x279)](licenseType,_0x546198++),_0xcd392b[_0x4a6a32(0x671)](Math['floor'](_0x1f859e/0x3e8),_0x546198),_0x546198+=0x4,_0xcd392b[_0x4a6a32(0x671)](Math[_0x4a6a32(0x54e)](_0x1c6090/0x3e8),_0x546198),_0x546198+=0x4,_0xcd392b[_0x4a6a32(0x279)](_0x1b78f1[_0x4a6a32(0x631)],_0x546198++),_0x1b78f1[_0x4a6a32(0x43d)](_0xcd392b,_0x546198),_0x546198+=_0x1b78f1[_0x4a6a32(0x631)];let _0xfae173=0x0;for(let _0x366f96=0x0;_0x366f96<_0x168d3d[_0x4a6a32(0x631)];_0x366f96++){if(features[_0x168d3d[_0x366f96]])_0xfae173|=0x1<<_0x366f96;}_0xcd392b[_0x4a6a32(0x2f1)](_0xfae173,_0x546198),_0x546198+=0x2;const _0x2d530e=['envs',_0x4a6a32(0x564),_0x4a6a32(0x3c1),'maxWrites'];for(const _0x46d6a6 of _0x2d530e){_0xcd392b[_0x4a6a32(0x671)](limits[_0x46d6a6]||0x0,_0x546198),_0x546198+=0x4;}return _0xcd392b;}function _0x24778b(_0x2fc953){const _0x35999b=_0x5a523e;let _0x1704e1=0x0;const _0x113a32=_0x2fc953[_0x35999b(0x68b)](_0x1704e1++),_0x4c86ab=_0x2fc953['readUInt8'](_0x1704e1++),_0x258cde=_0x2fc953[_0x35999b(0x578)](_0x1704e1);_0x1704e1+=0x4;const _0x3b5e31=_0x2fc953[_0x35999b(0x578)](_0x1704e1);_0x1704e1+=0x4;const _0xfe205a=_0x2fc953[_0x35999b(0x68b)](_0x1704e1++),_0x540706=_0x2fc953[_0x35999b(0x608)](_0x1704e1,_0x1704e1+_0xfe205a)[_0x35999b(0x1f0)](_0x35999b(0x5a6));_0x1704e1+=_0xfe205a;const _0x217a3d=_0x2fc953[_0x35999b(0x2a8)](_0x1704e1);_0x1704e1+=0x2;const _0x52021b={};for(let _0x4744c2=0x0;_0x4744c2<_0x168d3d[_0x35999b(0x631)];_0x4744c2++){_0x52021b[_0x168d3d[_0x4744c2]]=Boolean(_0x217a3d&0x1<<_0x4744c2);}const _0x4006a3=[_0x35999b(0x35c),_0x35999b(0x564),'syncPeers','maxWrites'],_0x2edd81={};for(const _0x99ce56 of _0x4006a3){const _0x52788e=_0x2fc953[_0x35999b(0x578)](_0x1704e1);_0x1704e1+=0x4,_0x2edd81[_0x99ce56]=_0x52788e===0x0?null:_0x52788e;}return{'v':_0x113a32,'licenseType':_0x4c86ab,'issuedAt':_0x258cde*0x3e8,'expiresAt':_0x3b5e31*0x3e8,'licensee':_0x540706,'features':_0x52021b,'limits':_0x2edd81};}function _0x51fc07(_0xbf28f4,_0x5d6bdd){const _0x978dd3=_0x5a523e,_0x18c210=Buffer[_0x978dd3(0x2d5)]([_0xbf28f4,_0x5d6bdd]),_0x41a708=_0x54f5cb(_0x18c210),_0x18d48e=[];for(let _0x39fb75=0x0;_0x39fb75<_0x41a708[_0x978dd3(0x631)];_0x39fb75+=0x8){_0x18d48e[_0x978dd3(0x5fa)](_0x41a708[_0x978dd3(0x608)](_0x39fb75,_0x39fb75+0x8));}return _0x18d48e[_0x978dd3(0x553)]('-');}function _0x55e509(_0x4277fe){const _0x1778a6=_0x5a523e;if(typeof _0x4277fe!==_0x1778a6(0x355))throw new Error(_0x1778a6(0x3f0));const _0x56bf35=_0x5aeefa(_0x4277fe[_0x1778a6(0x2aa)](/-/g,''));if(_0x56bf35[_0x1778a6(0x631)]<0x41)throw new Error('decodeLicenseBlob:\x20blob\x20too\x20short\x20('+_0x56bf35['length']+'\x20bytes,\x20need\x20>=\x2065)');const _0x43dc93=_0x56bf35[_0x1778a6(0x608)](0x0,_0x56bf35[_0x1778a6(0x631)]-0x40),_0x56c14c=_0x56bf35[_0x1778a6(0x608)](_0x56bf35['length']-0x40);let _0x4614ad;try{_0x4614ad=_0x24778b(_0x43dc93);}catch(_0x3ae0b0){throw new Error(_0x1778a6(0x506)+_0x3ae0b0['message']);}return{'rawBuf':_0x56bf35,'payload':_0x43dc93,'sig':_0x56c14c,'decoded':_0x4614ad};}function _0x1b8e69(_0x49d2a2){const _0x149058=_0x5a523e;return _0x42c98c[_0x149058(0x4a7)](_0x149058(0x42e))[_0x149058(0x42b)](_0x49d2a2)[_0x149058(0x537)]()[_0x149058(0x608)](0x0,0x8);}function _0x76bd12(_0x337011,_0x3e4d3d,_0x4b9974){const _0x1b184e=_0x5a523e,_0x3a4ae0=_0x1b184e(0x50a)+_0x4b9974,_0xd16d97=Buffer[_0x1b184e(0x2d5)]([Buffer[_0x1b184e(0x2b0)](_0x337011,_0x1b184e(0x5a6)),_0x3e4d3d]),_0x50b57f=_0x42c98c[_0x1b184e(0x325)]('sha256',_0x3a4ae0)[_0x1b184e(0x42b)](_0xd16d97)[_0x1b184e(0x537)](),_0x48d760=_0x54f5cb(_0x50b57f[_0x1b184e(0x608)](0x0,0x5));return{'pin':_0x48d760,'pinHmac':_0x50b57f};}function _0xa6ed7f(_0x5e5b33,_0x4038bb,_0x576a29){const _0x37d81c=_0x5a523e,_0x4b714a=Buffer[_0x37d81c(0x655)](0x4d);let _0x2286e5=0x0;_0x4b714a[_0x37d81c(0x279)](0x1,_0x2286e5++),_0x5e5b33[_0x37d81c(0x43d)](_0x4b714a,_0x2286e5),_0x2286e5+=0x8,_0x4b714a['writeUInt32BE'](_0x4038bb,_0x2286e5),_0x2286e5+=0x4,_0x576a29['copy'](_0x4b714a,_0x2286e5);const _0x417002=_0x54f5cb(_0x4b714a),_0x484f6d=[];for(let _0x4082e8=0x0;_0x4082e8<_0x417002[_0x37d81c(0x631)];_0x4082e8+=0x6){_0x484f6d['push'](_0x417002[_0x37d81c(0x608)](_0x4082e8,_0x4082e8+0x6));}return _0x484f6d['join']('-');}function _0x39229f(_0x118676){const _0x54463a=_0x5a523e;if(typeof _0x118676!==_0x54463a(0x355))throw new Error('decodeActivationToken:\x20input\x20must\x20be\x20a\x20string');const _0x3fdf45=_0x5aeefa(_0x118676['replace'](/-/g,''));if(_0x3fdf45[_0x54463a(0x631)]!==0x4d)throw new Error('decodeActivationToken:\x20expected\x2077\x20bytes,\x20got\x20'+_0x3fdf45[_0x54463a(0x631)]);let _0x5dbe73=0x0;const _0xda97b=_0x3fdf45['readUInt8'](_0x5dbe73++),_0x401551=_0x3fdf45[_0x54463a(0x608)](_0x5dbe73,_0x5dbe73+0x8);_0x5dbe73+=0x8;const _0x4b0dcd=_0x3fdf45[_0x54463a(0x578)](_0x5dbe73);_0x5dbe73+=0x4;const _0x266b6b=_0x3fdf45[_0x54463a(0x608)](_0x5dbe73);return{'v':_0xda97b,'licenseHash':_0x401551,'expiry':_0x4b0dcd,'sig':_0x266b6b};}function _0x5be6bd({tokenString:_0x21785b,nodeId:_0x3dd096,rawBlobBuf:_0x286f71,pubKeyPem:_0x26f056,pubFingerprint:_0x5b27fe}){const _0x3bd42f=_0x5a523e;let _0x3148d2;try{_0x3148d2=_0x39229f(_0x21785b);}catch(_0x1acd3a){return{'valid':![],'reason':_0x3bd42f(0x334)};}const _0x2d1d15=_0x1b8e69(_0x286f71);if(!_0x2d1d15['equals'](_0x3148d2[_0x3bd42f(0x380)]))return{'valid':![],'reason':_0x3bd42f(0x200)};const {pinHmac:_0x1f32e5}=_0x76bd12(_0x3dd096,_0x2d1d15,_0x5b27fe),_0x4e4bc5=Buffer['allocUnsafe'](0x4);_0x4e4bc5[_0x3bd42f(0x671)](_0x3148d2[_0x3bd42f(0x527)],0x0);const _0x1a2caf=Buffer[_0x3bd42f(0x2d5)]([Buffer[_0x3bd42f(0x2b0)]([_0x3148d2['v']]),_0x1f32e5[_0x3bd42f(0x608)](0x0,0x5),_0x3148d2[_0x3bd42f(0x380)],_0x4e4bc5]);try{const _0x5bdfea=_0x42c98c[_0x3bd42f(0x2c2)](null,_0x1a2caf,_0x26f056,_0x3148d2[_0x3bd42f(0x35a)]);if(!_0x5bdfea)return{'valid':![],'reason':_0x3bd42f(0x3d1)};}catch(_0x4e9d00){return{'valid':![],'reason':_0x3bd42f(0x3d1)};}if(_0x3148d2[_0x3bd42f(0x527)]<Date[_0x3bd42f(0x4ea)]()/0x3e8)return{'valid':![],'reason':'ACTIVATION_EXPIRED'};return{'valid':!![],'reason':'ok'};}function _0x50b1cf(_0x180346){const _0x5b63ce=_0x5a523e;if(typeof _0x180346!==_0x5b63ce(0x355))return _0x5b63ce(0x39d);const _0x5c2894=_0x180346[_0x5b63ce(0x215)]();if(_0x5c2894[_0x5b63ce(0x39c)]('/')||_0x5c2894[_0x5b63ce(0x39c)]('./')||_0x5c2894[_0x5b63ce(0x39c)]('../')||/^[A-Za-z]:[\\/]/[_0x5b63ce(0x2a4)](_0x5c2894))return _0x5b63ce(0x47b);if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i[_0x5b63ce(0x2a4)](_0x5c2894))return _0x5b63ce(0x67e);const _0x5bcfd3=_0x5c2894[_0x5b63ce(0x2aa)](/[\s-]+/g,'')['length'];if(_0x5bcfd3===0x7c)return _0x5b63ce(0x64b);if(_0x5bcfd3>=0x95&&_0x5bcfd3<=0xfc)return _0x5b63ce(0x216);return _0x5b63ce(0x39d);}return okdbLicenseCodec={'toBase32':_0x54f5cb,'fromBase32':_0x5aeefa,'encodeLicensePayload':_0x47b2b5,'decodeLicensePayload':_0x24778b,'encodeLicenseBlob':_0x51fc07,'decodeLicenseBlob':_0x55e509,'licenseHash':_0x1b8e69,'derivePin':_0x76bd12,'encodeActivationToken':_0xa6ed7f,'decodeActivationToken':_0x39229f,'verifyActivation':_0x5be6bd,'detectInputType':_0x50b1cf,'FEATURE_NAMES':_0x168d3d,'LICENSE_TYPE_STANDARD':_0x301e8c,'LICENSE_TYPE_OPEN':_0x464063,'LICENSE_TYPE_INTERNAL':_0x49f215,'OPEN_LICENSE_MAX_DURATION_MS':_0x35a2c4},okdbLicenseCodec;}var okdbError,hasRequiredOkdbError;function requireOkdbError(){if(hasRequiredOkdbError)return okdbError;hasRequiredOkdbError=0x1;class _0x30babc extends Error{constructor(_0x24539f,_0x170d22,_0x57da03={}){const _0xd92436=_0x4d7d;super(_0x24539f),this[_0xd92436(0x58f)]='OKDBError',this[_0xd92436(0x4b8)]=_0x170d22,this['details']=_0x57da03,_0x57da03[_0xd92436(0x56b)]&&(this[_0xd92436(0x56b)]=_0x57da03[_0xd92436(0x56b)]),Error[_0xd92436(0x30a)](this,this[_0xd92436(0x2b4)]);}}class _0x35de5f extends _0x30babc{constructor(_0x228e61,_0x5e2718,_0x493c71,_0x101b9e){const _0x554844=_0x4d7d;super(_0x554844(0x5c6)+_0x228e61+'@'+_0x5e2718+_0x554844(0x66d)+_0x493c71+_0x554844(0x1f1)+_0x101b9e,_0x554844(0x370),{'type':_0x228e61,'key':_0x5e2718,'expectedVersion':_0x493c71,'actualVersion':_0x101b9e}),this[_0x554844(0x58f)]=_0x554844(0x53a);}}class _0x5623d8 extends _0x30babc{constructor(_0xb92564,_0x562425){const _0x440cdf=_0x4d7d;super(_0xb92564+'@'+_0x562425+_0x440cdf(0x1f7),_0x440cdf(0x22e),{'type':_0xb92564,'key':_0x562425}),this[_0x440cdf(0x58f)]=_0x440cdf(0x2fd);}}class _0x34b1ea extends _0x30babc{constructor(_0xd22b94,_0xf42050){const _0x456cfa=_0x4d7d;super(_0xd22b94+'@'+_0xf42050+_0x456cfa(0x30c),_0x456cfa(0x323),{'type':_0xd22b94,'key':_0xf42050}),this[_0x456cfa(0x58f)]=_0x456cfa(0x42d);}}class _0x3feada extends _0x30babc{constructor(_0x44e0c0,_0x15c623){const _0x1d4996=_0x4d7d,_0x143915=typeof _0x15c623;super('Invalid\x20index\x20key\x20type\x20for\x20\x27'+_0x44e0c0+_0x1d4996(0x575)+_0x143915+_0x1d4996(0x4da)+_0x15c623,'INVALID_INDEX_KEY',{'index':_0x44e0c0,'key':_0x15c623,'keyType':_0x143915}),this[_0x1d4996(0x58f)]=_0x1d4996(0x644);}}class _0x125702 extends _0x30babc{constructor(_0x4783db){const _0x318491=_0x4d7d,_0x31a1ee=typeof _0x4783db;super('Invalid\x20primary\x20key\x20type:\x20'+_0x31a1ee+_0x318491(0x2ae)+_0x4783db,_0x318491(0x3c7),{'key':_0x4783db,'keyType':_0x31a1ee}),this[_0x318491(0x58f)]=_0x318491(0x20a);}}class _0x4441d9 extends _0x30babc{constructor(_0x138346){const _0x6204fb=_0x4d7d;super(_0x6204fb(0x423)+_0x138346+_0x6204fb(0x440),_0x6204fb(0x40e),{'type':_0x138346}),this['name']=_0x6204fb(0x5e0);}}class _0x85ba21 extends _0x30babc{constructor(_0x7abba3){const _0x2123c3=_0x4d7d;super(_0x2123c3(0x423)+_0x7abba3+_0x2123c3(0x29f),_0x2123c3(0x1fc),{'type':_0x7abba3}),this[_0x2123c3(0x58f)]=_0x2123c3(0x5f0);}}class _0x39e97f extends _0x30babc{constructor(_0x1ffd07,_0x10f97c){const _0x5d3849=_0x4d7d;super(_0x5d3849(0x4e5)+_0x10f97c+'\x27\x20on\x20type\x20\x27'+_0x1ffd07+'\x27\x20doesn\x27t\x20exist',_0x5d3849(0x23d),{'type':_0x1ffd07,'index':_0x10f97c}),this['name']=_0x5d3849(0x414);}}class _0x45b9b7 extends _0x30babc{constructor(_0x42ab89,_0x6ec8ad){const _0x2ad2b4=_0x4d7d;super('Index\x20\x27'+_0x6ec8ad+'\x27\x20on\x20type\x20\x27'+_0x42ab89+_0x2ad2b4(0x53c),_0x2ad2b4(0x376),{'type':_0x42ab89,'index':_0x6ec8ad}),this[_0x2ad2b4(0x58f)]='OKDBIndexAlreadyRegisteredError';}}class _0x401f8a extends _0x30babc{constructor(_0x490e9a,_0x2e2bf9={}){const _0x28e2ce=_0x4d7d;super(_0x490e9a,_0x28e2ce(0x57e),_0x2e2bf9),this[_0x28e2ce(0x58f)]=_0x28e2ce(0x1f2);}}class _0x57c96b extends _0x30babc{constructor(_0x21db8f,_0x2fb2ae,_0x27ae6e,_0x172e50,_0x149323){const _0x2523e7=_0x4d7d;super(_0x2523e7(0x2b3)+_0x21db8f+'@'+_0x2fb2ae+_0x2523e7(0x430)+_0x27ae6e+_0x2523e7(0x588)+_0x172e50+_0x2523e7(0x5ba)+_0x149323+'\x27',_0x2523e7(0x51b),{'type':_0x21db8f,'index':_0x2fb2ae,'indexKey':_0x27ae6e,'existingKey':_0x172e50,'conflictingKey':_0x149323}),this[_0x2523e7(0x58f)]='OKDBUniqueConstraintError';}}class _0x3cbe7a extends _0x30babc{constructor(_0x15ee56,_0x137379,_0x14ba99){const _0x142eca=_0x4d7d;super(_0x142eca(0x2ba)+_0x15ee56+'@'+_0x137379,_0x142eca(0x5d1),{'type':_0x15ee56,'key':_0x137379,'errors':_0x14ba99}),this[_0x142eca(0x58f)]='OKDBSchemaValidationError',this[_0x142eca(0x267)]=_0x15ee56,this[_0x142eca(0x505)]=_0x137379,this[_0x142eca(0x4bc)]=_0x14ba99;}}class _0x16c857 extends _0x30babc{constructor(_0x14c7f2,_0xcd711b){const _0x233385=_0x4d7d;super('Cannot\x20set\x20enforce\x20schema\x20on\x20'+_0x14c7f2+':\x20'+_0xcd711b[_0x233385(0x631)]+'\x20documents\x20fail\x20validation',_0x233385(0x2ea),{'type':_0x14c7f2,'failures':_0xcd711b}),this[_0x233385(0x58f)]=_0x233385(0x65d),this['type']=_0x14c7f2,this['failures']=_0xcd711b;}}class _0x14a141 extends _0x30babc{constructor(_0x4e7144,_0x2a1841,_0x5e1161,_0x5b10f0,_0x535574){const _0x20ad13=_0x4d7d;super(_0x20ad13(0x5f4)+_0x4e7144+'@'+_0x2a1841+'.'+_0x5e1161+_0x20ad13(0x3d5)+_0x5b10f0+'@'+_0x535574+_0x20ad13(0x577),_0x20ad13(0x4b9),{'sourceType':_0x4e7144,'sourceKey':_0x2a1841,'fieldPath':_0x5e1161,'targetType':_0x5b10f0,'targetKey':_0x535574}),this['name']=_0x20ad13(0x543),this['sourceType']=_0x4e7144,this[_0x20ad13(0x36f)]=_0x2a1841,this[_0x20ad13(0x4f5)]=_0x5e1161,this[_0x20ad13(0x5a5)]=_0x5b10f0,this[_0x20ad13(0x40a)]=_0x535574;}}class _0x153641 extends _0x30babc{constructor(_0x44cbf1,_0x3e37e8,_0x4cd721){const _0x38dd4f=_0x4d7d;super(_0x38dd4f(0x24d)+_0x44cbf1+'@'+_0x3e37e8+':\x20'+_0x4cd721['length']+_0x38dd4f(0x570),_0x38dd4f(0x69c),{'targetType':_0x44cbf1,'targetKey':_0x3e37e8,'references':_0x4cd721}),this[_0x38dd4f(0x58f)]=_0x38dd4f(0x615),this[_0x38dd4f(0x5a5)]=_0x44cbf1,this[_0x38dd4f(0x40a)]=_0x3e37e8,this[_0x38dd4f(0x67f)]=_0x4cd721;}}class _0x3b8cf3 extends _0x30babc{constructor(_0x4246bd,_0x11ba1f,_0x2ff46e){const _0x417bd7=_0x4d7d;super(_0x417bd7(0x67c)+_0x11ba1f+'\x22\x20on\x20\x22'+_0x4246bd+_0x417bd7(0x2b7)+_0x2ff46e[_0x417bd7(0x272)](_0x424e96=>_0x424e96['kind']+':'+_0x424e96[_0x417bd7(0x58f)])[_0x417bd7(0x553)](',\x20'),_0x417bd7(0x53f),{'type':_0x4246bd,'index':_0x11ba1f,'usedBy':_0x2ff46e}),this['name']='OKDBIndexHasConsumersError';}}return okdbError={'OKDBError':_0x30babc,'OKDBVersionMismatchError':_0x35de5f,'OKDBNotFoundError':_0x5623d8,'OKDBAlreadyExistsError':_0x34b1ea,'OKDBInvalidIndexKeyError':_0x3feada,'OKDBInvalidPrimaryKeyError':_0x125702,'OKDBTypeNotRegisteredError':_0x4441d9,'OKDBTypeAlreadyRegisteredError':_0x85ba21,'OKDBIndexNotRegisteredError':_0x39e97f,'OKDBIndexAlreadyRegisteredError':_0x45b9b7,'OKDBInvalidValueError':_0x401f8a,'OKDBUniqueConstraintError':_0x57c96b,'OKDBSchemaValidationError':_0x3cbe7a,'OKDBSchemaCollectionError':_0x16c857,'OKDBForeignKeyError':_0x14a141,'OKDBForeignKeyDeleteError':_0x153641,'OKDBIndexHasConsumersError':_0x3b8cf3},okdbError;}var okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x2875c9=_0x42e206;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x3a8177={'PUT':'put','REMOVE':_0x2875c9(0x576),'INDEX_DROP':_0x2875c9(0x609),'INDEX_REGISTER':_0x2875c9(0x54f),'INDEX_RESET':'resetIndex','TYPE_REGISTER':_0x2875c9(0x206),'TYPE_DROP':_0x2875c9(0x44f),'FTS_REGISTER':_0x2875c9(0x31b),'FTS_DROP':_0x2875c9(0x6ad),'FTS_RESET':_0x2875c9(0x232),'SCHEMA_SET':'setSchema','SCHEMA_DROP':_0x2875c9(0x4aa),'TTL_SET':_0x2875c9(0x51d),'TTL_CLEAR':_0x2875c9(0x388)},_0x10c418={'SYSTEM_READY':_0x2875c9(0x1e5),'SYSTEM_STOPPED':'system:stopped','SYSTEM_CLOCK_CHANGE':_0x2875c9(0x37a),'SYSTEM_POKE':_0x2875c9(0x4fb),'SYSTEM_DRAIN':_0x2875c9(0x674),'SYSTEM_TYPE_DROP':'system:type_drop','SYSTEM_PROC':_0x2875c9(0x658),'SYSTEM_BUS_STATE_CHANGE':'system:bus_state_change','ITEM_CREATE':'item:create','ITEM_UPDATE':_0x2875c9(0x2b6),'ITEM_REMOVE':_0x2875c9(0x457),'INDEX_RESET':'index:reset','INDEX_READY':_0x2875c9(0x374),'INDEX_PROGRESS':_0x2875c9(0x4e4),'VIEW_PROGRESS':_0x2875c9(0x5b7),'INDEX_DROP':'index:drop','INDEX_REGISTERED':_0x2875c9(0x35b),'FTS_REGISTERED':_0x2875c9(0x656),'FTS_DROP':_0x2875c9(0x597),'FTS_RESET':_0x2875c9(0x326),'SCHEMA_SET':_0x2875c9(0x3bf),'SCHEMA_DROP':_0x2875c9(0x52d),'UNIQUE_VIOLATION':_0x2875c9(0x533),'UNIQUE_VIOLATION_RESOLVED':_0x2875c9(0x692),'REF_VIOLATION':_0x2875c9(0x6a1),'REF_VIOLATION_RESOLVED':_0x2875c9(0x34f),'SYNC_APPLY':_0x2875c9(0x2cb),'TXN_START':_0x2875c9(0x1f8),'TXN_END':'txn:end','TXN_ROLLBACK':'txn:rollback','TYPE_REGISTERED':_0x2875c9(0x2b5),'TYPE_DROP':_0x2875c9(0x237),'ENV_OPENED':_0x2875c9(0x4d3),'ENV_REMOVED':_0x2875c9(0x262),'SYSTEM_ENV_RELEASE':_0x2875c9(0x359),'TTL_EXPIRED':_0x2875c9(0x44c),'TTL_SET':_0x2875c9(0x3ad),'TTL_CLEAR':'ttl:clear','LICENSE_INVALID':'license:invalid','LICENSE_ADDED':_0x2875c9(0x28f),'LICENSE_ACTIVATED':_0x2875c9(0x64c),'LICENSE_REMOVED':'license:removed'},_0x5e2783={'CREATING':'creating','RESETTING':_0x2875c9(0x60a),'READY':_0x2875c9(0x487),'DROPPING':_0x2875c9(0x319),'WAITING':_0x2875c9(0x680)},_0x5f1518={'CREATED':_0x2875c9(0x55b),'STARTING':_0x2875c9(0x5e8),'STARTED':_0x2875c9(0x6a6),'STOPPING':'stopping','STOPPED':'stopped'},_0x51846d={'CREATING':'creating','READY':'ready','HALTED':_0x2875c9(0x203),'STOPPED':_0x2875c9(0x4cb),'RESETTING':_0x2875c9(0x60a)},_0x195d81=Object['freeze']({'POKE':_0x2875c9(0x604),'DRAIN':_0x2875c9(0x22a),'TYPE_DROP':_0x2875c9(0x5b5),'PROC':_0x2875c9(0x636),'ENV_RELEASE':_0x2875c9(0x330)});return okdbEnums={'BUS_EVENTS':_0x195d81,'CHANGE_ACTIONS':_0x3a8177,'EVENTS':_0x10c418,'INDEX_STATE':_0x5e2783,'OKDB_STATE':_0x5f1518,'VIEW_STATE':_0x51846d},okdbEnums;}var okdbPubkey,hasRequiredOkdbPubkey;function requireOkdbPubkey(){const _0x2f3162=_0x42e206;if(hasRequiredOkdbPubkey)return okdbPubkey;hasRequiredOkdbPubkey=0x1;const _0x8afb68=require$$1$1,_0x50fcfd=require$$1,_0x24b7c0=require$$0$1,_0x4db096=_0x8afb68[_0x2f3162(0x2bd)](_0x50fcfd[_0x2f3162(0x553)](__dirname,_0x2f3162(0x2e7)),_0x2f3162(0x5a6))[_0x2f3162(0x215)](),_0x4ca098=_0x24b7c0['createPublicKey'](_0x4db096)[_0x2f3162(0x5eb)]({'type':_0x2f3162(0x425),'format':_0x2f3162(0x422)}),_0x634931=_0x24b7c0[_0x2f3162(0x4a7)](_0x2f3162(0x42e))[_0x2f3162(0x42b)](_0x4ca098)[_0x2f3162(0x537)](_0x2f3162(0x627))[_0x2f3162(0x608)](0x0,0x10);return okdbPubkey={'PUBLIC_KEY_PEM':_0x4db096,'PUB_FINGERPRINT':_0x634931},okdbPubkey;}var okdbLicense,hasRequiredOkdbLicense;function requireOkdbLicense(){const _0x5a5fca=_0x42e206;if(hasRequiredOkdbLicense)return okdbLicense;hasRequiredOkdbLicense=0x1;const _0x1570b2=require$$0$1,{OKDBError:_0x5a5abe}=requireOkdbError(),{EVENTS:_0x3fe5c8}=requireOkdbEnums(),_0x30343e=requireOkdbLicenseCodec(),{LICENSE_TYPE_OPEN:_0xe475a2,LICENSE_TYPE_INTERNAL:_0x5a6c95,OPEN_LICENSE_MAX_DURATION_MS:_0x140483}=_0x30343e,_0x1fe4b7=requireOkdbPubkey(),_0x24917c={'LICENSED_BUILD':_0x5a5fca(0x21f),'PUBLIC_KEY_PEM':_0x1fe4b7[_0x5a5fca(0x34c)],'PUB_FINGERPRINT':_0x1fe4b7[_0x5a5fca(0x2db)],'LICENSE_EXPIRED_ACTION':_0x5a5fca(0x6a0)},_0x397aae='~licenses',_0x549c15={'features':{'sync':![],'embeddings':![],'engines':![],'fts':!![],'timeMachine':![],'views':!![],'mcp':!![],'files':!![]},'limits':{'envs':0x2,'typesPerEnv':0xa,'syncPeers':0x0,'maxWrites':0xf4240},'_isFree':!![]};async function _0x97be83(_0x5b9627){const _0x150826=_0x5a5fca;!_0x5b9627[_0x150826(0x63e)](_0x397aae)&&await _0x5b9627[_0x150826(0x206)](_0x397aae);}class _0x12c1b9{constructor(_0x27e03b){const _0x3cd48d=_0x5a5fca;this[_0x3cd48d(0x209)]=_0x27e03b,this[_0x3cd48d(0x28d)]=null;}async[_0x5a5fca(0x205)](){const _0x5d76ab=_0x5a5fca,_0x2684f6=this[_0x5d76ab(0x209)][_0x5d76ab(0x2b9)];if(!_0x2684f6||!_0x2684f6['hasType'](_0x397aae)){this[_0x5d76ab(0x28d)]=null;return;}const _0x4230a6=this[_0x5d76ab(0x209)]['id'];let _0x2d077f=null;for(const {key:_0x2b0fc3,value:_0x24c3f2}of _0x2684f6['getRange'](_0x397aae)){const _0x37a669=this[_0x5d76ab(0x37e)](_0x24c3f2,_0x4230a6);_0x37a669===_0x5d76ab(0x6a7)&&!_0x2d077f&&(_0x2d077f={..._0x24c3f2,'id':_0x2b0fc3,'status':_0x37a669});}this['_active']=_0x2d077f;if(this[_0x5d76ab(0x28d)]&&this[_0x5d76ab(0x28d)]['licenseType']===_0xe475a2){const _0xfc79e4=Math[_0x5d76ab(0x651)]((this[_0x5d76ab(0x28d)][_0x5d76ab(0x5f5)]-Date['now']())/0x5265c00);this[_0x5d76ab(0x209)]['log']?.[_0x5d76ab(0x316)](_0x5d76ab(0x5b9)+_0xfc79e4+_0x5d76ab(0x364),{'feature':_0x5d76ab(0x514),'licensee':this[_0x5d76ab(0x28d)][_0x5d76ab(0x3a9)],'expiresAt':new Date(this[_0x5d76ab(0x28d)]['expiresAt'])[_0x5d76ab(0x5ac)]()});}this[_0x5d76ab(0x28d)]&&this[_0x5d76ab(0x28d)][_0x5d76ab(0x386)]===_0x5a6c95&&this[_0x5d76ab(0x209)][_0x5d76ab(0x6a0)]?.[_0x5d76ab(0x316)](_0x5d76ab(0x371),{'feature':_0x5d76ab(0x514),'licensee':this[_0x5d76ab(0x28d)][_0x5d76ab(0x3a9)]});}['_computeStatus'](_0x1663b4,_0x33a073){const _0x6c7ef7=_0x5a5fca;if(!_0x1663b4[_0x6c7ef7(0x216)])return _0x6c7ef7(0x66e);let _0x471f67;try{_0x471f67=_0x30343e[_0x6c7ef7(0x390)](_0x1663b4[_0x6c7ef7(0x216)]);}catch(_0x538678){return _0x6c7ef7(0x66e);}try{const _0x4c7eb9=_0x1570b2['verify'](null,_0x471f67[_0x6c7ef7(0x223)],_0x24917c[_0x6c7ef7(0x34c)],_0x471f67['sig']);if(!_0x4c7eb9)return _0x6c7ef7(0x66e);}catch(_0x3e57a5){return _0x6c7ef7(0x66e);}if(_0x471f67[_0x6c7ef7(0x327)][_0x6c7ef7(0x386)]===_0x5a6c95)return _0x6c7ef7(0x6a7);if(_0x471f67[_0x6c7ef7(0x327)][_0x6c7ef7(0x5f5)]<=Date[_0x6c7ef7(0x4ea)]())return _0x6c7ef7(0x38f);if(_0x471f67['decoded'][_0x6c7ef7(0x386)]===_0xe475a2)return _0x6c7ef7(0x6a7);if(!_0x1663b4[_0x6c7ef7(0x64b)])return _0x6c7ef7(0x2b8);const _0xb1abaa=_0x30343e['verifyActivation']({'tokenString':_0x1663b4[_0x6c7ef7(0x64b)],'nodeId':_0x33a073,'rawBlobBuf':_0x471f67['rawBuf'],'pubKeyPem':_0x24917c[_0x6c7ef7(0x34c)],'pubFingerprint':_0x24917c[_0x6c7ef7(0x2db)]});if(_0xb1abaa['reason']===_0x6c7ef7(0x200)||_0xb1abaa[_0x6c7ef7(0x328)]==='SIG_INVALID')return'wrong_node';if(_0xb1abaa['reason']===_0x6c7ef7(0x3ea))return'expired';if(!_0xb1abaa[_0x6c7ef7(0x435)])return'wrong_node';return _0x6c7ef7(0x6a7);}get['active'](){const _0xecfdde=_0x5a5fca;return this[_0xecfdde(0x28d)];}get['effective'](){const _0x293393=_0x5a5fca;return this[_0x293393(0x28d)]??_0x549c15;}[_0x5a5fca(0x45d)](_0x3edd86){const _0x1e26c3=_0x5a5fca;if(_0x24917c[_0x1e26c3(0x635)]!==_0x1e26c3(0x21f))return;const _0x381db4=this[_0x1e26c3(0x64f)];if(!_0x381db4[_0x1e26c3(0x421)]?.[_0x3edd86]){const _0x3580f0=_0x381db4['_isFree']?_0x1e26c3(0x235)+_0x3edd86+'.\x20Add\x20a\x20license\x20that\x20includes\x20\x22'+_0x3edd86+_0x1e26c3(0x4e8):_0x1e26c3(0x5d9)+_0x3edd86+_0x1e26c3(0x308)+_0x3edd86+'\x22.';throw new _0x5a5abe(_0x3580f0,_0x1e26c3(0x2dc),{'feature':_0x3edd86});}}[_0x5a5fca(0x287)](_0x23d0b0){const _0xd93ecb=_0x5a5fca;if(_0x24917c['LICENSED_BUILD']!==_0xd93ecb(0x21f))return!![];return!!this[_0xd93ecb(0x64f)][_0xd93ecb(0x421)]?.[_0x23d0b0];}[_0x5a5fca(0x2c6)](_0xf5b6c3,_0x4f61ba){const _0x461d2a=_0x5a5fca;if(_0x24917c['LICENSED_BUILD']!==_0x461d2a(0x21f))return;const _0x5a37dc=this[_0x461d2a(0x64f)],_0x495b28=_0x5a37dc['limits']?.[_0xf5b6c3];if(_0x495b28===null||_0x495b28===undefined||_0x495b28===0x0)return;if(_0x4f61ba>=_0x495b28)throw new _0x5a5abe('License\x20limit\x20exceeded:\x20'+_0xf5b6c3+'\x20('+_0x4f61ba+'/'+_0x495b28+')',_0x461d2a(0x61d),{'limit':_0xf5b6c3,'current':_0x4f61ba,'max':_0x495b28});}async[_0x5a5fca(0x2bf)](_0x2989be){const _0x55127a=_0x5a5fca;let _0x30f333;try{_0x30f333=_0x30343e[_0x55127a(0x390)](_0x2989be);}catch(_0x36490c){throw new _0x5a5abe('Invalid\x20license\x20blob:\x20'+_0x36490c[_0x55127a(0x62d)],_0x55127a(0x53e));}let _0x4eb028;try{_0x4eb028=_0x1570b2['verify'](null,_0x30f333['payload'],_0x24917c[_0x55127a(0x34c)],_0x30f333[_0x55127a(0x35a)]);}catch(_0x20ee3e){throw new _0x5a5abe('License\x20signature\x20invalid:\x20'+_0x20ee3e[_0x55127a(0x62d)],_0x55127a(0x53e));}if(!_0x4eb028)throw new _0x5a5abe(_0x55127a(0x6a4)+(_0x55127a(0x268)+_0x24917c['PUB_FINGERPRINT']+'.\x20')+_0x55127a(0x3ae),_0x55127a(0x53e),{'expectedFingerprint':_0x24917c['PUB_FINGERPRINT']});if(_0x30f333[_0x55127a(0x327)][_0x55127a(0x386)]===_0xe475a2){const _0x31c8e5=_0x30f333[_0x55127a(0x327)][_0x55127a(0x5f5)]-_0x30f333[_0x55127a(0x327)][_0x55127a(0x48e)];if(_0x31c8e5>_0x140483)throw new _0x5a5abe(_0x55127a(0x254)+Math['ceil'](_0x31c8e5/(0x1e*0x5265c00))+_0x55127a(0x624),'LICENSE_INVALID');}const _0x5f3b62=this[_0x55127a(0x209)][_0x55127a(0x2b9)];await _0x97be83(_0x5f3b62);const _0x1cfb23=_0x30343e[_0x55127a(0x380)](_0x30f333['rawBuf'])[_0x55127a(0x1f0)](_0x55127a(0x627));for(const {value:_0x15823c}of _0x5f3b62[_0x55127a(0x698)](_0x397aae)){if(_0x15823c[_0x55127a(0x4e2)]===_0x1cfb23)throw new _0x5a5abe(_0x55127a(0x311),_0x55127a(0x53e));}const _0x23ca0f=_0x1570b2[_0x55127a(0x60c)](),_0x5d2f09={'blob':_0x2989be,'activation':null,'addedAt':Date[_0x55127a(0x4ea)](),'_licenseHash':_0x1cfb23,'licensee':_0x30f333[_0x55127a(0x327)][_0x55127a(0x3a9)],'expiresAt':_0x30f333[_0x55127a(0x327)][_0x55127a(0x5f5)],'features':_0x30f333['decoded'][_0x55127a(0x421)],'limits':_0x30f333[_0x55127a(0x327)][_0x55127a(0x572)],'licenseType':_0x30f333['decoded']['licenseType']};return await _0x5f3b62[_0x55127a(0x473)](_0x397aae,_0x23ca0f,_0x5d2f09),{'id':_0x23ca0f,..._0x5d2f09};}async[_0x5a5fca(0x458)](_0x48980f){const _0x483886=_0x5a5fca;let _0x1a5038;try{_0x1a5038=_0x30343e['decodeActivationToken'](_0x48980f);}catch(_0x33dccb){throw new _0x5a5abe(_0x483886(0x3d2)+_0x33dccb[_0x483886(0x62d)],_0x483886(0x2eb));}const _0x3649ca=_0x1a5038[_0x483886(0x380)][_0x483886(0x1f0)](_0x483886(0x627)),_0x1817e8=this[_0x483886(0x209)]['_systemEnv'];if(!_0x1817e8||!_0x1817e8['hasType'](_0x397aae))throw new _0x5a5abe(_0x483886(0x3e2),_0x483886(0x2eb));let _0xeffe3f=null,_0x1b5ad0=null;for(const {key:_0x3868d5,value:_0x577f65}of _0x1817e8[_0x483886(0x698)](_0x397aae)){if(_0x577f65['_licenseHash']===_0x3649ca){_0xeffe3f=_0x3868d5,_0x1b5ad0=_0x577f65;break;}}if(!_0xeffe3f)throw new _0x5a5abe(_0x483886(0x3e2),_0x483886(0x2eb));const {rawBuf:_0x33e2a8}=_0x30343e[_0x483886(0x390)](_0x1b5ad0['blob']),_0x1530bb=_0x30343e[_0x483886(0x424)]({'tokenString':_0x48980f,'nodeId':this[_0x483886(0x209)]['id'],'rawBlobBuf':_0x33e2a8,'pubKeyPem':_0x24917c[_0x483886(0x34c)],'pubFingerprint':_0x24917c['PUB_FINGERPRINT']});if(!_0x1530bb[_0x483886(0x435)])throw new _0x5a5abe(_0x483886(0x516)+_0x1530bb['reason'],_0x483886(0x2eb),{'reason':_0x1530bb[_0x483886(0x328)]});const _0x39396e={..._0x1b5ad0,'activation':_0x48980f};return await _0x1817e8['update'](_0x397aae,_0xeffe3f,_0x39396e),{'id':_0xeffe3f,..._0x39396e};}async['removeLicense'](_0x571340){const _0x110a9a=_0x5a5fca,_0x4ee942=this[_0x110a9a(0x209)][_0x110a9a(0x2b9)];if(!_0x4ee942||!_0x4ee942[_0x110a9a(0x63e)](_0x397aae))return;await _0x4ee942[_0x110a9a(0x576)](_0x397aae,_0x571340);}async[_0x5a5fca(0x697)](){const _0x5044b5=_0x5a5fca,_0x4fd2c9=this[_0x5044b5(0x209)][_0x5044b5(0x2b9)];if(!_0x4fd2c9||!_0x4fd2c9['hasType'](_0x397aae))return[];const _0x5178b6=this[_0x5044b5(0x209)]['id'],_0x1d5de9=[];for(const {key:_0x56e6b1,value:_0x5465fe}of _0x4fd2c9[_0x5044b5(0x698)](_0x397aae)){const _0x2af397=this[_0x5044b5(0x37e)](_0x5465fe,_0x5178b6);_0x1d5de9[_0x5044b5(0x5fa)]({..._0x5465fe,'id':_0x56e6b1,'status':_0x2af397});}return _0x1d5de9;}[_0x5a5fca(0x4d4)](){const _0x92e4c=_0x5a5fca,_0x3c47e4=this[_0x92e4c(0x209)]['_systemEnv'];if(!_0x3c47e4||!_0x3c47e4[_0x92e4c(0x63e)](_0x397aae))return[];const _0x4b2ad9=this[_0x92e4c(0x209)]['id'],_0x33583a=[];for(const {key:_0x2cde9b,value:_0x413941}of _0x3c47e4[_0x92e4c(0x698)](_0x397aae)){if(_0x413941['_licenseHash']){if(_0x413941[_0x92e4c(0x386)]===_0xe475a2)_0x33583a[_0x92e4c(0x5fa)]({'licenseId':_0x2cde9b,'pin':null});else{const _0x2caf2d=Buffer[_0x92e4c(0x2b0)](_0x413941[_0x92e4c(0x4e2)],'hex'),{pin:_0x4dc4e5}=_0x30343e[_0x92e4c(0x5fd)](_0x4b2ad9,_0x2caf2d,_0x24917c['PUB_FINGERPRINT']);_0x33583a[_0x92e4c(0x5fa)]({'licenseId':_0x2cde9b,'pin':_0x4dc4e5});}}}return _0x33583a;}async[_0x5a5fca(0x26e)](){const _0x405c8d=_0x5a5fca,_0x14b6c3=this['_active'];await this[_0x405c8d(0x205)]();if(this['_active']&&this[_0x405c8d(0x28d)]['licenseType']===_0xe475a2){const _0x36cc1e=Math['ceil']((this['_active'][_0x405c8d(0x5f5)]-Date['now']())/0x5265c00);this[_0x405c8d(0x209)]['log']?.[_0x405c8d(0x316)]('⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20'+_0x36cc1e+'\x20day(s).',{'feature':_0x405c8d(0x514),'licensee':this[_0x405c8d(0x28d)][_0x405c8d(0x3a9)],'expiresAt':new Date(this[_0x405c8d(0x28d)][_0x405c8d(0x5f5)])[_0x405c8d(0x5ac)]()});}this['_active']&&this[_0x405c8d(0x28d)][_0x405c8d(0x386)]===_0x5a6c95&&this[_0x405c8d(0x209)][_0x405c8d(0x6a0)]?.['warn']('⚠\x20INTERNAL\x20LICENSE\x20ACTIVE\x20—\x20all\x20features\x20and\x20limits\x20are\x20unlocked.\x20For\x20vendor/internal\x20use\x20only.',{'feature':'license','licensee':this[_0x405c8d(0x28d)][_0x405c8d(0x3a9)]});if(_0x14b6c3&&!this[_0x405c8d(0x28d)]){this[_0x405c8d(0x209)]['log']?.[_0x405c8d(0x316)](_0x405c8d(0x45f),{'feature':'license'}),this[_0x405c8d(0x209)]['events']?.[_0x405c8d(0x47c)](_0x3fe5c8[_0x405c8d(0x53e)],{'previous':_0x14b6c3});const _0x394c7c=this[_0x405c8d(0x209)]['options']?.[_0x405c8d(0x419)]??_0x24917c['LICENSE_EXPIRED_ACTION'];_0x394c7c==='shutdown'&&(this[_0x405c8d(0x209)][_0x405c8d(0x6a0)]?.[_0x405c8d(0x2e5)]('Shutting\x20down\x20due\x20to\x20license\x20expiry',{'feature':_0x405c8d(0x514)}),this[_0x405c8d(0x209)][_0x405c8d(0x519)]()[_0x405c8d(0x45b)](()=>{})['finally'](()=>process[_0x405c8d(0x234)](0x1)));}}}return okdbLicense={'LicenseChecker':_0x12c1b9,'_C':_0x24917c},okdbLicense;}var okdbShell,hasRequiredOkdbShell;function requireOkdbShell(){const _0x1d7d3b=_0x42e206;if(hasRequiredOkdbShell)return okdbShell;hasRequiredOkdbShell=0x1;const _0x4e0420=require$$0$3,_0x1b3471=require$$1$1,_0x504cdc=require$$0,_0x54d959=require$$1,_0x35cdc1=_0x54d959[_0x1d7d3b(0x553)](_0x504cdc[_0x1d7d3b(0x21e)](),_0x1d7d3b(0x54c)),_0x53d0b0=0x3e8,_0x277272={'reset':_0x1d7d3b(0x528),'bold':_0x1d7d3b(0x5f8),'dim':'\x1b[2m','red':_0x1d7d3b(0x5b8),'green':_0x1d7d3b(0x581),'yellow':'\x1b[33m','blue':'\x1b[34m','magenta':_0x1d7d3b(0x246),'cyan':_0x1d7d3b(0x66c),'white':_0x1d7d3b(0x3a5),'gray':_0x1d7d3b(0x253)},_0x5dde43=!process[_0x1d7d3b(0x445)]['isTTY']||!!process.env.NO_COLOR,_0x1e379c=(_0x28da6d,_0x59797a)=>_0x5dde43?_0x59797a:''+_0x28da6d+_0x59797a+_0x277272[_0x1d7d3b(0x653)],_0x2e5ff4={'error':_0x277272['red'],'warn':_0x277272[_0x1d7d3b(0x5a9)],'info':_0x277272['cyan'],'debug':_0x277272[_0x1d7d3b(0x2fe)]},_0x2f6c53={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3};function _0xeec79e(_0x468fde,_0x252349=_0x1d7d3b(0x2ee)){const _0x24a1bf=_0x1d7d3b,{level:_0x1aea21,msg:_0x398293,meta:_0x2dbd03,context:_0x443307,ts:_0x59b841}=_0x468fde;if((_0x2f6c53[_0x1aea21]??0x1)<(_0x2f6c53[_0x252349]??0x1))return;const _0x135b87=_0x1e379c(_0x277272['gray'],new Date(_0x59b841)['toISOString']()),_0x5ebc7f=_0x1e379c(_0x2e5ff4[_0x1aea21]??_0x277272[_0x24a1bf(0x466)],_0x1aea21[_0x24a1bf(0x5d4)](0x5));let _0x1ab342='\x20\x20'+_0x135b87+'\x20'+_0x1e379c(_0x277272[_0x24a1bf(0x4ac)],_0x5ebc7f)+'\x20'+_0x398293;if(_0x2dbd03&&Object[_0x24a1bf(0x5cf)](_0x2dbd03)[_0x24a1bf(0x631)]>0x0){const _0x10e7ac=Object['entries'](_0x2dbd03)[_0x24a1bf(0x272)](([_0x435765,_0x5b6577])=>_0x435765+'='+_0x5b6577)['join']('\x20');_0x1ab342+=_0x1e379c(_0x277272[_0x24a1bf(0x4f1)],_0x24a1bf(0x4f3)+_0x10e7ac+']');}if(_0x443307!==undefined){const _0x553611=typeof _0x443307==='object'?JSON[_0x24a1bf(0x621)](_0x443307):String(_0x443307);_0x1ab342+=_0x1e379c(_0x277272[_0x24a1bf(0x4f1)],'\x20\x20'+_0x553611);}const _0x12133c=_0x1aea21==='error'||_0x1aea21===_0x24a1bf(0x316)?process[_0x24a1bf(0x434)][_0x24a1bf(0x2d0)][_0x24a1bf(0x29e)](process[_0x24a1bf(0x434)]):process[_0x24a1bf(0x445)][_0x24a1bf(0x2d0)][_0x24a1bf(0x29e)](process[_0x24a1bf(0x445)]);_0x12133c(_0x1ab342+'\x0a');}function _0x587774(_0x42ae59,_0x5292eb){const _0x5656bc=_0x1d7d3b;if(_0x42ae59===0xcc||_0x42ae59>=0xc8&&_0x42ae59<0x12c&&!_0x5292eb){console[_0x5656bc(0x6a0)](_0x5656bc(0x657)+_0x1e379c(_0x277272[_0x5656bc(0x387)],'✓')+'\x0a');return;}if(_0x42ae59>=0x190||_0x5292eb?.[_0x5656bc(0x2e5)]){const _0x2d2d7d=_0x5292eb?.[_0x5656bc(0x2e5)]??_0x5292eb?.['message']??_0x5656bc(0x3e1)+_0x42ae59;console['log'](_0x5656bc(0x657)+_0x1e379c(_0x277272[_0x5656bc(0x4d2)],'✗')+'\x20'+_0x1e379c(_0x277272[_0x5656bc(0x4ac)]+_0x277272[_0x5656bc(0x4d2)],String(_0x42ae59))+'\x20\x20'+_0x2d2d7d+'\x0a');return;}const _0x2a140e=Object[_0x5656bc(0x2f3)]['hasOwnProperty'][_0x5656bc(0x393)](_0x5292eb??{},'result')?_0x5292eb[_0x5656bc(0x4f8)]:_0x5292eb,_0x1187b7=_0x5292eb?.[_0x5656bc(0x208)];console['log'](''),_0x1620b3(_0x2a140e,'\x20\x20');if(_0x1187b7?.['count']!=null||_0x1187b7?.['time']!=null){const _0x452cb6=[];if(_0x1187b7['count']!=null)_0x452cb6['push'](_0x1187b7['count']+_0x5656bc(0x53b)+(_0x1187b7[_0x5656bc(0x2d8)]!==0x1?'s':''));if(_0x1187b7[_0x5656bc(0x5de)]!=null)_0x452cb6[_0x5656bc(0x5fa)](_0x1187b7[_0x5656bc(0x5de)]+'ms');console[_0x5656bc(0x6a0)](_0x5656bc(0x657)+_0x1e379c(_0x277272[_0x5656bc(0x4f1)],_0x452cb6[_0x5656bc(0x553)]('\x20\x20·\x20\x20')));}console['log']('');}function _0x1620b3(_0x334936,_0x4b1171=''){const _0x3bb119=_0x1d7d3b;if(_0x334936===null||_0x334936===undefined){console[_0x3bb119(0x6a0)](_0x4b1171+_0x1e379c(_0x277272[_0x3bb119(0x4f1)],_0x3bb119(0x2a9)));return;}if(Array[_0x3bb119(0x59a)](_0x334936)){if(_0x334936[_0x3bb119(0x631)]===0x0){console[_0x3bb119(0x6a0)](_0x4b1171+_0x1e379c(_0x277272[_0x3bb119(0x4f1)],_0x3bb119(0x33b)));return;}if(_0x334936[_0x3bb119(0x69e)](_0x2103e7=>_0x2103e7&&typeof _0x2103e7===_0x3bb119(0x5c0)&&_0x3bb119(0x505)in _0x2103e7&&_0x3bb119(0x52e)in _0x2103e7)){_0x4fa610(_0x334936,_0x4b1171);return;}if(_0x334936[_0x3bb119(0x69e)](_0x4a0c8a=>_0x4a0c8a&&typeof _0x4a0c8a===_0x3bb119(0x5c0)&&_0x3bb119(0x267)in _0x4a0c8a&&_0x3bb119(0x2d8)in _0x4a0c8a)){_0x361baa(_0x334936,_0x4b1171);return;}if(_0x334936[_0x3bb119(0x69e)](_0x1e4b6e=>typeof _0x1e4b6e!==_0x3bb119(0x5c0)||_0x1e4b6e===null)){_0x334936[_0x3bb119(0x573)]((_0x175603,_0x4a1e39)=>console[_0x3bb119(0x6a0)](_0x4b1171+_0x1e379c(_0x277272['gray'],_0x4a1e39+0x1+'.')+'\x20'+_0x1e379c(_0x277272[_0x3bb119(0x466)],String(_0x175603))));return;}_0x334936[_0x3bb119(0x573)]((_0x57279a,_0x1545eb)=>{const _0xd1c9c2=_0x3bb119;console[_0xd1c9c2(0x6a0)](_0x4b1171+_0x1e379c(_0x277272[_0xd1c9c2(0x4f1)],'['+_0x1545eb+']'));if(typeof _0x57279a==='object'&&_0x57279a!==null)_0x18be6f(_0x57279a,_0x4b1171+'\x20\x20');else console[_0xd1c9c2(0x6a0)](_0x4b1171+'\x20\x20'+String(_0x57279a));});return;}if(typeof _0x334936===_0x3bb119(0x5c0)){if(_0x3bb119(0x505)in _0x334936&&_0x3bb119(0x52e)in _0x334936&&Object['keys'](_0x334936)[_0x3bb119(0x631)]<=0x3){console[_0x3bb119(0x6a0)](_0x4b1171+_0x1e379c(_0x277272[_0x3bb119(0x4ac)]+_0x277272[_0x3bb119(0x480)],String(_0x334936['key'])));const _0x18396e=_0x334936[_0x3bb119(0x52e)];if(_0x18396e&&typeof _0x18396e===_0x3bb119(0x5c0))_0x18be6f(_0x18396e,_0x4b1171);else console['log'](_0x4b1171+_0x1e379c(_0x277272['white'],String(_0x18396e)));return;}_0x18be6f(_0x334936,_0x4b1171);return;}console['log'](_0x4b1171+_0x1e379c(_0x277272[_0x3bb119(0x466)],String(_0x334936)));}function _0x18be6f(_0xcc9da0,_0x41167d=''){const _0x426a3e=_0x1d7d3b,_0x4d4a84=Object['entries'](_0xcc9da0);if(_0x4d4a84[_0x426a3e(0x631)]===0x0){console[_0x426a3e(0x6a0)](_0x41167d+_0x1e379c(_0x277272['dim'],'{}'));return;}const _0x137a76=Math['min'](0x1c,Math[_0x426a3e(0x555)](..._0x4d4a84[_0x426a3e(0x272)](([_0x5a9d89])=>_0x5a9d89[_0x426a3e(0x631)])));for(const [_0x36e852,_0x20ecd8]of _0x4d4a84){const _0xf740ed=_0x1e379c(_0x277272[_0x426a3e(0x480)],_0x36e852[_0x426a3e(0x5d4)](_0x137a76));if(_0x20ecd8===null||_0x20ecd8===undefined)console[_0x426a3e(0x6a0)](_0x41167d+_0xf740ed+'\x20\x20'+_0x1e379c(_0x277272[_0x426a3e(0x4f1)],_0x426a3e(0x2c8)));else{if(typeof _0x20ecd8===_0x426a3e(0x5c0)){const _0x20f887=JSON['stringify'](_0x20ecd8);_0x20f887['length']<=0x50?console[_0x426a3e(0x6a0)](_0x41167d+_0xf740ed+'\x20\x20'+_0x1e379c(_0x277272[_0x426a3e(0x4f1)],_0x20f887)):(console['log'](_0x41167d+_0xf740ed),_0x1620b3(_0x20ecd8,_0x41167d+'\x20\x20'));}else{const _0x22df2a=typeof _0x20ecd8===_0x426a3e(0x64e)?_0x1e379c(_0x20ecd8?_0x277272[_0x426a3e(0x387)]:_0x277272[_0x426a3e(0x5a9)],String(_0x20ecd8)):typeof _0x20ecd8===_0x426a3e(0x68f)?_0x1e379c(_0x277272[_0x426a3e(0x4d9)],String(_0x20ecd8)):_0x1e379c(_0x277272[_0x426a3e(0x466)],String(_0x20ecd8));console['log'](_0x41167d+_0xf740ed+'\x20\x20'+_0x22df2a);}}}}function _0x4fa610(_0x364b40,_0x366ee4=''){const _0xfff7dd=_0x1d7d3b,_0x3c37f9=Math[_0xfff7dd(0x368)](0x20,Math[_0xfff7dd(0x555)](..._0x364b40[_0xfff7dd(0x272)](_0x70078d=>String(_0x70078d[_0xfff7dd(0x505)])['length'])));for(const {key:_0x325f5a,value:_0x1c1aec,score:_0x9471b3,clock:_0x5ba337}of _0x364b40){const _0x16b06c=_0x1e379c(_0x277272[_0xfff7dd(0x4ac)]+_0x277272[_0xfff7dd(0x480)],String(_0x325f5a)['padEnd'](_0x3c37f9)),_0x1c9025=_0x1c1aec==null?_0x1e379c(_0x277272[_0xfff7dd(0x4f1)],'null'):typeof _0x1c1aec==='object'?_0x1e379c(_0x277272['dim'],JSON[_0xfff7dd(0x621)](_0x1c1aec)):_0x1e379c(_0x277272['white'],String(_0x1c1aec)),_0x31fb0a=_0x9471b3!=null?_0x1e379c(_0x277272[_0xfff7dd(0x2fe)],'\x20\x20score:'+_0x9471b3['toFixed'](0x4)):'',_0x58c25d=_0x5ba337!=null?_0x1e379c(_0x277272[_0xfff7dd(0x2fe)],_0xfff7dd(0x432)+_0x5ba337):'';console['log'](_0x366ee4+_0x16b06c+'\x20\x20'+_0x1c9025+_0x31fb0a+_0x58c25d);}}function _0x361baa(_0x213f79,_0x1bd492=''){const _0x84e0b1=_0x1d7d3b,_0x1f6fd1=Math[_0x84e0b1(0x368)](0x20,Math['max'](..._0x213f79[_0x84e0b1(0x272)](_0x54d9ab=>_0x54d9ab[_0x84e0b1(0x267)][_0x84e0b1(0x631)])));for(const {type:_0xec9930,count:_0x214563,fields:_0x139075}of _0x213f79){if(_0xec9930[_0x84e0b1(0x39c)]('~'))continue;const _0x3a0c90=_0x1e379c(_0x277272[_0x84e0b1(0x4ac)]+_0x277272['cyan'],_0xec9930[_0x84e0b1(0x5d4)](_0x1f6fd1)),_0x4b8293=_0x1e379c(_0x277272['magenta'],String(_0x214563)['padStart'](0x6))+_0x1e379c(_0x277272[_0x84e0b1(0x4f1)],_0x84e0b1(0x46f)),_0x34b031=_0x139075&&Object[_0x84e0b1(0x5cf)](_0x139075)['length']?_0x1e379c(_0x277272[_0x84e0b1(0x4f1)],_0x84e0b1(0x273)+Object[_0x84e0b1(0x5cf)](_0x139075)[_0x84e0b1(0x608)](0x0,0x6)[_0x84e0b1(0x553)](',\x20')+(Object[_0x84e0b1(0x5cf)](_0x139075)[_0x84e0b1(0x631)]>0x6?'…':'')):'';console[_0x84e0b1(0x6a0)](_0x1bd492+_0x3a0c90+'\x20\x20'+_0x4b8293+_0x34b031);}}const _0x4543da=[_0x1d7d3b(0x1e6),_0x1d7d3b(0x40c),'queue/',_0x1d7d3b(0x4c7),_0x1d7d3b(0x510),'processors/'];function _0x3bdcf7(_0x144d01,_0x380f8c){const _0x240dc2=_0x1d7d3b;if(_0x144d01[_0x240dc2(0x39c)]('/api/'))return _0x144d01;if(_0x144d01[_0x240dc2(0x39c)]('/'))return _0x240dc2(0x69d)+_0x144d01;if(_0x144d01[_0x240dc2(0x39c)](_0x240dc2(0x5a2)))return _0x240dc2(0x2e4)+_0x144d01;const _0x2d2dae=_0x4543da['some'](_0x5ebd80=>_0x144d01===_0x5ebd80[_0x240dc2(0x2aa)](/\/$/,'')||_0x144d01[_0x240dc2(0x39c)](_0x5ebd80));return _0x2d2dae?_0x240dc2(0x23c)+_0x380f8c+'/'+_0x144d01:_0x240dc2(0x2e4)+_0x144d01;}function _0x7084de(_0x52cc5f){const _0x5d3195=_0x1d7d3b,_0x884f70={},_0x5360b4=[];let _0x302fbf=0x0;while(_0x302fbf<_0x52cc5f[_0x5d3195(0x631)]){if((_0x52cc5f[_0x302fbf]==='--env'||_0x52cc5f[_0x302fbf]==='-e')&&_0x52cc5f[_0x302fbf+0x1]&&!_0x52cc5f[_0x302fbf+0x1][_0x5d3195(0x39c)]('-'))_0x884f70[_0x5d3195(0x35e)]=_0x52cc5f[++_0x302fbf];else _0x52cc5f[_0x302fbf]===_0x5d3195(0x3d9)||_0x52cc5f[_0x302fbf]==='-h'?_0x884f70[_0x5d3195(0x3ef)]=!![]:_0x5360b4[_0x5d3195(0x5fa)](_0x52cc5f[_0x302fbf]);_0x302fbf++;}return{'flags':_0x884f70,'rest':_0x5360b4};}const _0xa45ebd={'system':_0x1d7d3b(0x556),'envs':_0x1d7d3b(0x48a),'types':'Types','data':_0x1d7d3b(0x375),'indexes':_0x1d7d3b(0x47a),'fts':_0x1d7d3b(0x4df),'sync':_0x1d7d3b(0x49d),'queue':_0x1d7d3b(0x483),'files':_0x1d7d3b(0x54d),'embeddings':'Embeddings','engines':_0x1d7d3b(0x617),'admin':_0x1d7d3b(0x509),'event':_0x1d7d3b(0x382),'processor':_0x1d7d3b(0x347)},_0x5136d9=[_0x1d7d3b(0x58a),_0x1d7d3b(0x35c),'types','data',_0x1d7d3b(0x357),_0x1d7d3b(0x55c),'sync','queue',_0x1d7d3b(0x36c),_0x1d7d3b(0x5c1),_0x1d7d3b(0x252),_0x1d7d3b(0x305)];function _0x1153c4(_0x6be221){const _0x87b1f6=_0x1d7d3b;return _0x6be221[_0x87b1f6(0x2aa)](/^\/api/,'')[_0x87b1f6(0x2aa)](/^\[\/env\/:env=[^\]]*\]/,_0x87b1f6(0x5dd))[_0x87b1f6(0x2aa)](/^\/env\/:env/,_0x87b1f6(0x297))[_0x87b1f6(0x2aa)](/^\//,'');}function _0x37fc17(_0x43da7c,_0x4b7611=''){const _0x4aab12=_0x1d7d3b,_0x59e79f=_0x43da7c[_0x4aab12(0x48c)][_0x4aab12(0x515)]()['filter'](_0x498cd6=>!_0x498cd6['meta']?.[_0x4aab12(0x3aa)]),_0x234cf2=_0x4b7611?_0x59e79f[_0x4aab12(0x4e0)](_0x3c4756=>_0x3c4756[_0x4aab12(0x47b)][_0x4aab12(0x3a6)]()[_0x4aab12(0x3be)](_0x4b7611[_0x4aab12(0x3a6)]())||(_0xf7851(_0x3c4756)??'')[_0x4aab12(0x3a6)]()[_0x4aab12(0x3be)](_0x4b7611[_0x4aab12(0x3a6)]())||_0x33344b(_0x3c4756)[_0x4aab12(0x378)](_0x4e183d=>_0x4e183d[_0x4aab12(0x3a6)]()[_0x4aab12(0x3be)](_0x4b7611[_0x4aab12(0x3a6)]()))):_0x59e79f;if(!_0x234cf2['length']){console[_0x4aab12(0x6a0)](_0x1e379c(_0x277272['yellow'],'\x0a\x20\x20No\x20routes\x20matching\x20\x22'+_0x4b7611+'\x22\x0a'));return;}const _0x259fae=new Map();for(const _0x19ddb0 of _0x234cf2){const _0x256568=_0x33344b(_0x19ddb0)[0x0]??_0x4aab12(0x503);if(!_0x259fae[_0x4aab12(0x258)](_0x256568))_0x259fae['set'](_0x256568,[]);_0x259fae['get'](_0x256568)['push'](_0x19ddb0);}const _0x156a2c=[..._0x5136d9[_0x4aab12(0x4e0)](_0x2a90da=>_0x259fae[_0x4aab12(0x258)](_0x2a90da)),...[..._0x259fae[_0x4aab12(0x5cf)]()][_0x4aab12(0x4e0)](_0x46e943=>!_0x5136d9[_0x4aab12(0x3be)](_0x46e943))];console['log']('');for(const _0x193741 of _0x156a2c){const _0x21bcd3=_0x259fae[_0x4aab12(0x363)](_0x193741);if(!_0x21bcd3?.['length'])continue;console['log'](_0x1e379c(_0x277272[_0x4aab12(0x4ac)],'\x20\x20'+(_0xa45ebd[_0x193741]??_0x193741)));for(const _0x33a78a of _0x21bcd3){const _0x5330e2=_0x1e379c(_0x277272[_0x4aab12(0x4d9)],_0x33a78a[_0x4aab12(0x231)][_0x4aab12(0x5d4)](0x7)),_0x27fb01=_0x1e379c(_0x277272[_0x4aab12(0x480)],_0x1153c4(_0x33a78a[_0x4aab12(0x47b)])),_0x18e5e5=_0xf7851(_0x33a78a)?_0x1e379c(_0x277272[_0x4aab12(0x4f1)],'\x20\x20'+_0xf7851(_0x33a78a)):'',_0x945344=_0x33a78a[_0x4aab12(0x652)]?.['id']?_0x1e379c(_0x277272[_0x4aab12(0x2fe)],_0x4aab12(0x4f3)+_0x33a78a['operation']['id']+']'):'';console[_0x4aab12(0x6a0)](_0x4aab12(0x63f)+_0x5330e2+'\x20'+_0x27fb01+_0x18e5e5+_0x945344);}console[_0x4aab12(0x6a0)]('');}}function _0x1fccd0(_0x492351,_0x88fcbe){const _0x3bc63e=_0x1d7d3b,_0x55bfc9=_0x88fcbe[_0x3bc63e(0x2aa)](/^\/api(\/env\/[^/]+)?\//,'')[_0x3bc63e(0x4f0)]('/')[0x0],_0x1d5712=_0x492351['http'][_0x3bc63e(0x515)]()['filter'](_0x5848eb=>_0x5848eb[_0x3bc63e(0x47b)][_0x3bc63e(0x3a6)]()[_0x3bc63e(0x3be)](_0x55bfc9[_0x3bc63e(0x3a6)]()));if(!_0x1d5712[_0x3bc63e(0x631)]){console[_0x3bc63e(0x6a0)](_0x1e379c(_0x277272[_0x3bc63e(0x5a9)],_0x3bc63e(0x591)+_0x88fcbe+'\x0a'));return;}console['log']('');for(const _0x4af2b5 of _0x1d5712['slice'](0x0,0xc)){for(const _0x1cd1fd of _0x3a7bbc(_0x4af2b5)){console[_0x3bc63e(0x6a0)](_0x1cd1fd);}console[_0x3bc63e(0x6a0)]('');}}function _0xf7851(_0x186840){const _0x9a0512=_0x1d7d3b;return _0x186840[_0x9a0512(0x652)]?.[_0x9a0512(0x628)]??_0x186840[_0x9a0512(0x208)]?.[_0x9a0512(0x628)]??'';}function _0x4b3370(_0x17e8fb){const _0x49f6e7=_0x1d7d3b;return _0x17e8fb['operation']?.[_0x49f6e7(0x65e)]??_0x17e8fb[_0x49f6e7(0x208)]?.[_0x49f6e7(0x65e)]??'';}function _0x33344b(_0x45efd1){const _0x4c5899=_0x1d7d3b;return _0x45efd1[_0x4c5899(0x652)]?.[_0x4c5899(0x3a0)]?.[_0x4c5899(0x631)]?_0x45efd1[_0x4c5899(0x652)]['tags']:_0x45efd1[_0x4c5899(0x208)]?.['tags']??[];}function _0x3a7bbc(_0x5be48e){const _0x5f3bcd=_0x1d7d3b,_0x48a557=[];_0x48a557[_0x5f3bcd(0x5fa)]('\x20\x20'+_0x1e379c(_0x277272['bold']+_0x277272[_0x5f3bcd(0x4d9)],_0x5be48e[_0x5f3bcd(0x231)]['padEnd'](0x7))+'\x20'+_0x1e379c(_0x277272['bold']+_0x277272['cyan'],_0x5be48e[_0x5f3bcd(0x47b)]));_0x5be48e[_0x5f3bcd(0x652)]?.['id']&&_0x48a557['push'](_0x5f3bcd(0x395)+_0x1e379c(_0x277272[_0x5f3bcd(0x2fe)],_0x5f3bcd(0x52c)+_0x5be48e[_0x5f3bcd(0x652)]['id']));_0xf7851(_0x5be48e)&&_0x48a557[_0x5f3bcd(0x5fa)](_0x5f3bcd(0x395)+_0x1e379c(_0x277272[_0x5f3bcd(0x466)],_0xf7851(_0x5be48e)));_0x4b3370(_0x5be48e)&&_0x48a557[_0x5f3bcd(0x5fa)](_0x5f3bcd(0x395)+_0x1e379c(_0x277272[_0x5f3bcd(0x4f1)],_0x4b3370(_0x5be48e)));_0x33344b(_0x5be48e)[_0x5f3bcd(0x631)]&&_0x48a557['push'](_0x5f3bcd(0x395)+_0x1e379c(_0x277272[_0x5f3bcd(0x2fe)],_0x5f3bcd(0x2da)+_0x33344b(_0x5be48e)[_0x5f3bcd(0x553)](',\x20')));_0x5be48e[_0x5f3bcd(0x652)]?.[_0x5f3bcd(0x2be)]?.[_0x5f3bcd(0x2a7)]&&_0x48a557[_0x5f3bcd(0x5fa)](_0x5f3bcd(0x395)+_0x1e379c(_0x277272[_0x5f3bcd(0x2fe)],_0x5f3bcd(0x44e)+_0x5be48e[_0x5f3bcd(0x652)][_0x5f3bcd(0x2be)][_0x5f3bcd(0x2a7)]));_0x5be48e['operation']?.[_0x5f3bcd(0x48c)]?.['transport']&&_0x5be48e[_0x5f3bcd(0x652)][_0x5f3bcd(0x48c)][_0x5f3bcd(0x275)]!=='standard'&&_0x48a557[_0x5f3bcd(0x5fa)](_0x5f3bcd(0x395)+_0x1e379c(_0x277272[_0x5f3bcd(0x2fe)],'transport:\x20'+_0x5be48e[_0x5f3bcd(0x652)]['http']['transport']));if(_0x5be48e[_0x5f3bcd(0x652)]?.[_0x5f3bcd(0x3f4)]){const _0x33bc73=Object[_0x5f3bcd(0x5cf)](_0x5be48e[_0x5f3bcd(0x652)][_0x5f3bcd(0x3f4)][_0x5f3bcd(0x28b)]||{});if(_0x33bc73[_0x5f3bcd(0x631)])_0x48a557['push']('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x1e379c(_0x277272['gray'],_0x5f3bcd(0x24e)+_0x33bc73[_0x5f3bcd(0x553)](',\x20')));}return _0x5be48e['meta']?.['body']&&_0x48a557['push'](_0x5f3bcd(0x395)+_0x1e379c(_0x277272[_0x5f3bcd(0x2fe)],_0x5f3bcd(0x60e)+JSON[_0x5f3bcd(0x621)](_0x5be48e[_0x5f3bcd(0x208)][_0x5f3bcd(0x58c)]))),_0x48a557;}async function _0x42b3fd(_0x12ab6b,_0x2c5155,_0x56200c,_0x484e5e=null){const _0x45746c=_0x1d7d3b,_0x3a9a2f=_0x56200c[_0x45746c(0x587)]('?'),_0x34dfbb=_0x3a9a2f>=0x0?_0x56200c['slice'](0x0,_0x3a9a2f):_0x56200c,_0x9d01ab=_0x3a9a2f>=0x0?_0x56200c['slice'](_0x3a9a2f+0x1):'',_0x22d710=Object['fromEntries'](new URLSearchParams(_0x9d01ab)[_0x45746c(0x699)]());return _0x12ab6b[_0x45746c(0x48c)]['handle'](_0x2c5155,_0x34dfbb,{'body':_0x484e5e,'query':_0x22d710,'headers':{'content-type':_0x45746c(0x50f)}},{'internal':!![]});}function _0x4368d4(_0x981f25){const _0x391f58=_0x1d7d3b;if(!_0x981f25)return null;const _0x5185f0=_0x981f25[_0x391f58(0x215)]();if(!_0x5185f0)return null;try{return JSON[_0x391f58(0x42a)](_0x5185f0);}catch{}try{return JSON['parse'](_0x50050e(_0x5185f0));}catch(_0x3485b2){throw new SyntaxError(_0x3485b2[_0x391f58(0x62d)],{'cause':_0x3485b2});}}function _0x50050e(_0x156724){const _0x26dd30=_0x1d7d3b;let _0x2f1c93='',_0xd962d8=0x0;while(_0xd962d8<_0x156724[_0x26dd30(0x631)]){const _0x4132da=_0x156724[_0xd962d8];if(_0x4132da==='\x22'){_0x2f1c93+='\x22',_0xd962d8++;while(_0xd962d8<_0x156724[_0x26dd30(0x631)]&&_0x156724[_0xd962d8]!=='\x22'){if(_0x156724[_0xd962d8]==='\x5c'){_0x2f1c93+=_0x156724[_0xd962d8++];if(_0xd962d8<_0x156724[_0x26dd30(0x631)])_0x2f1c93+=_0x156724[_0xd962d8++];}else _0x2f1c93+=_0x156724[_0xd962d8++];}_0x2f1c93+='\x22';if(_0xd962d8<_0x156724[_0x26dd30(0x631)])_0xd962d8++;continue;}if(_0x4132da==='\x27'){_0x2f1c93+='\x22',_0xd962d8++;while(_0xd962d8<_0x156724[_0x26dd30(0x631)]&&_0x156724[_0xd962d8]!=='\x27'){if(_0x156724[_0xd962d8]==='\x5c'&&_0x156724[_0xd962d8+0x1]==='\x27')_0x2f1c93+='\x27',_0xd962d8+=0x2;else _0x156724[_0xd962d8]==='\x22'?(_0x2f1c93+='\x5c\x22',_0xd962d8++):_0x2f1c93+=_0x156724[_0xd962d8++];}_0x2f1c93+='\x22';if(_0xd962d8<_0x156724[_0x26dd30(0x631)])_0xd962d8++;continue;}if('{}[]:,\x0a\x0d\x09\x20'[_0x26dd30(0x3be)](_0x4132da)){_0x2f1c93+=_0x4132da,_0xd962d8++;continue;}let _0x20520a='';while(_0xd962d8<_0x156724['length']&&!_0x26dd30(0x601)[_0x26dd30(0x3be)](_0x156724[_0xd962d8])&&_0x156724[_0xd962d8]!=='\x20'&&_0x156724[_0xd962d8]!=='\x09'&&_0x156724[_0xd962d8]!=='\x0a'&&_0x156724[_0xd962d8]!=='\x0d'){_0x20520a+=_0x156724[_0xd962d8++];}let _0x36470a=_0xd962d8;while(_0x36470a<_0x156724[_0x26dd30(0x631)]&&(_0x156724[_0x36470a]==='\x20'||_0x156724[_0x36470a]==='\x09'))_0x36470a++;if(_0x156724[_0x36470a]===':')_0x2f1c93+='\x22'+_0x20520a+'\x22';else _0x20520a===_0x26dd30(0x21f)||_0x20520a==='false'||_0x20520a==='null'||/^-?\d+(\.\d+)?([eE][+-]?\d+)?$/['test'](_0x20520a)?_0x2f1c93+=_0x20520a:_0x2f1c93+='\x22'+_0x20520a+'\x22';}return _0x2f1c93['replace'](/,(\s*[}\]])/g,'$1');}function _0xeda9f(_0x15747a){const _0x5181e9=_0x1d7d3b,_0x5ead9e=[];let _0xb7efec=0x0;while(_0xb7efec<_0x15747a[_0x5181e9(0x631)]){while(_0xb7efec<_0x15747a[_0x5181e9(0x631)]&&(_0x15747a[_0xb7efec]==='\x20'||_0x15747a[_0xb7efec]==='\x09'))_0xb7efec++;if(_0xb7efec>=_0x15747a[_0x5181e9(0x631)])break;const _0x57124d=_0x15747a[_0xb7efec];if(_0x57124d==='{'||_0x57124d==='['){const _0xeed60e=_0x57124d==='{'?'}':']',_0x119d46=_0xb7efec++;let _0x40b264=0x1,_0x95f182=![],_0x570353='';while(_0xb7efec<_0x15747a[_0x5181e9(0x631)]&&_0x40b264>0x0){const _0x2a635d=_0x15747a[_0xb7efec];if(_0x95f182){if(_0x2a635d==='\x5c')_0xb7efec++;else{if(_0x2a635d===_0x570353)_0x95f182=![];}}else{if(_0x2a635d==='\x22'||_0x2a635d==='\x27')_0x95f182=!![],_0x570353=_0x2a635d;else{if(_0x2a635d===_0x57124d)_0x40b264++;else{if(_0x2a635d===_0xeed60e)_0x40b264--;}}}_0xb7efec++;}_0x5ead9e['push'](_0x15747a[_0x5181e9(0x608)](_0x119d46,_0xb7efec));continue;}if(_0x57124d==='\x22'||_0x57124d==='\x27'){const _0x362234=_0x57124d;_0xb7efec++;let _0x2bb001='';while(_0xb7efec<_0x15747a[_0x5181e9(0x631)]&&_0x15747a[_0xb7efec]!==_0x362234){if(_0x15747a[_0xb7efec]==='\x5c'&&_0xb7efec+0x1<_0x15747a[_0x5181e9(0x631)])_0xb7efec++,_0x2bb001+=_0x15747a[_0xb7efec++];else _0x2bb001+=_0x15747a[_0xb7efec++];}if(_0xb7efec<_0x15747a[_0x5181e9(0x631)])_0xb7efec++;_0x5ead9e[_0x5181e9(0x5fa)](_0x2bb001);continue;}let _0x381330='';while(_0xb7efec<_0x15747a[_0x5181e9(0x631)]&&_0x15747a[_0xb7efec]!=='\x20'&&_0x15747a[_0xb7efec]!=='\x09'&&_0x15747a[_0xb7efec]!=='{'&&_0x15747a[_0xb7efec]!=='['){_0x381330+=_0x15747a[_0xb7efec++];}if(_0x381330)_0x5ead9e[_0x5181e9(0x5fa)](_0x381330);}return _0x5ead9e;}function _0x497048(_0xd4ebfc,_0x462a05){const _0xacd28a=_0x1d7d3b,_0x355489=[..._0xd4ebfc['_envs'][_0xacd28a(0x5cf)]()]['filter'](_0x53c3f8=>!_0x53c3f8[_0xacd28a(0x39c)]('~'));console[_0xacd28a(0x6a0)](['',_0x1e379c(_0x277272[_0xacd28a(0x4ac)]+_0x277272[_0xacd28a(0x480)],_0xacd28a(0x691)),_0x1e379c(_0x277272[_0xacd28a(0x4ac)]+_0x277272[_0xacd28a(0x480)],'\x20\x20║')+_0x1e379c(_0x277272[_0xacd28a(0x4ac)],_0xacd28a(0x52b))+_0x1e379c(_0x277272[_0xacd28a(0x4ac)]+_0x277272[_0xacd28a(0x480)],'║'),_0x1e379c(_0x277272[_0xacd28a(0x4ac)]+_0x277272[_0xacd28a(0x480)],_0xacd28a(0x4fe)),'','\x20\x20'+_0x1e379c(_0x277272[_0xacd28a(0x387)],'✓')+'\x20'+_0x1e379c(_0x277272[_0xacd28a(0x4ac)],_0xacd28a(0x3bd))+_0xacd28a(0x58d)+_0x462a05[_0xacd28a(0x43c)],..._0x462a05[_0xacd28a(0x285)]>0x1?['\x20\x20'+_0x1e379c(_0x277272[_0xacd28a(0x387)],'✓')+'\x20'+_0x1e379c(_0x277272[_0xacd28a(0x4ac)],_0xacd28a(0x409))+'\x20'+_0x462a05['clusterWorkers']+_0xacd28a(0x57c)+_0x1e379c(_0x277272['gray'],_0xacd28a(0x4c5))]:[],'\x20\x20'+_0x1e379c(_0x277272['green'],'✓')+'\x20'+_0x1e379c(_0x277272[_0xacd28a(0x4ac)],_0xacd28a(0x65c))+'\x20\x20\x20\x20\x20http://localhost:'+_0x462a05[_0xacd28a(0x43c)]+_0xacd28a(0x69d),'\x20\x20'+_0x1e379c(_0x277272[_0xacd28a(0x387)],'✓')+'\x20'+_0x1e379c(_0x277272[_0xacd28a(0x4ac)],_0xacd28a(0x47b))+_0xacd28a(0x63f)+_0x462a05[_0xacd28a(0x57b)],'\x20\x20'+_0x1e379c(_0x277272[_0xacd28a(0x387)],'✓')+'\x20'+_0x1e379c(_0x277272[_0xacd28a(0x4ac)],'id')+_0xacd28a(0x3d6)+_0x1e379c(_0x277272[_0xacd28a(0x2fe)],_0xd4ebfc['id']),'\x20\x20'+_0x1e379c(_0x277272[_0xacd28a(0x387)],'✓')+'\x20'+_0x1e379c(_0x277272[_0xacd28a(0x4ac)],_0xacd28a(0x35c))+_0xacd28a(0x63f)+_0x355489[_0xacd28a(0x272)](_0x5e7919=>_0x1e379c(_0x277272[_0xacd28a(0x480)],_0x5e7919))[_0xacd28a(0x553)]('\x20\x20'),..._0x462a05[_0xacd28a(0x497)]?[]:['\x20\x20'+_0x1e379c(_0x277272[_0xacd28a(0x387)],'✓')+'\x20'+_0x1e379c(_0x277272['bold'],_0xacd28a(0x305))+_0xacd28a(0x49f)+_0x462a05[_0xacd28a(0x43c)]+_0xacd28a(0x32f)],'',_0x1e379c(_0x277272[_0xacd28a(0x4f1)],_0xacd28a(0x27b)+_0x1e379c(_0x277272[_0xacd28a(0x4ac)],_0xacd28a(0x3ef))+_0xacd28a(0x512)+_0x1e379c(_0x277272[_0xacd28a(0x4ac)],_0xacd28a(0x538))+_0xacd28a(0x660)+_0x1e379c(_0x277272[_0xacd28a(0x4ac)],_0xacd28a(0x234))+'\x20to\x20quit.'),'']['join']('\x0a'));}function _0xcfda15(_0x362c76){const _0x4dea81=_0x1d7d3b;console['log']('\x0a'+_0x1e379c(_0x277272[_0x4dea81(0x4ac)],_0x4dea81(0x5ef))+'\x20\x20'+_0x1e379c(_0x277272[_0x4dea81(0x4f1)],_0x4dea81(0x2f0))+'\x0a\x0a\x20\x20'+_0x1e379c(_0x277272[_0x4dea81(0x480)],_0x4dea81(0x661))+_0x4dea81(0x280)+_0x1e379c(_0x277272[_0x4dea81(0x480)],'<path>')+'\x20'+_0x1e379c(_0x277272[_0x4dea81(0x5a9)],_0x4dea81(0x474))+_0x4dea81(0x3cb)+_0x1e379c(_0x277272[_0x4dea81(0x480)],'VERB')+'\x20'+_0x1e379c(_0x277272[_0x4dea81(0x480)],_0x4dea81(0x661))+'\x20'+_0x1e379c(_0x277272[_0x4dea81(0x5a9)],_0x4dea81(0x3fd))+_0x4dea81(0x3f3)+_0x1e379c(_0x277272[_0x4dea81(0x4f1)],_0x4dea81(0x28a))+_0x4dea81(0x59d)+_0x1e379c(_0x277272[_0x4dea81(0x2fe)],'info')+_0x4dea81(0x221)+_0x1e379c(_0x277272['gray'],'envs')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/envs\x0a\x20\x20\x20\x20'+_0x1e379c(_0x277272[_0x4dea81(0x2fe)],_0x4dea81(0x1e6))+_0x4dea81(0x3c5)+_0x362c76[_0x4dea81(0x35e)]+'/types\x0a\x20\x20\x20\x20'+_0x1e379c(_0x277272[_0x4dea81(0x2fe)],_0x4dea81(0x317))+_0x4dea81(0x201)+_0x362c76['env']+_0x4dea81(0x307)+_0x1e379c(_0x277272[_0x4dea81(0x2fe)],_0x4dea81(0x5e3))+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/'+_0x362c76[_0x4dea81(0x35e)]+'/type/users/item/alice\x0a\x20\x20\x20\x20'+_0x1e379c(_0x277272[_0x4dea81(0x2fe)],_0x4dea81(0x62c))+'\x20→\x20POST\x20/api/env/'+_0x362c76[_0x4dea81(0x35e)]+_0x4dea81(0x339)+_0x1e379c(_0x277272['gray'],_0x4dea81(0x62a))+_0x4dea81(0x59d)+_0x1e379c(_0x277272[_0x4dea81(0x2fe)],'DELETE\x20type/users/item/x')+_0x4dea81(0x59d)+_0x1e379c(_0x277272[_0x4dea81(0x2fe)],_0x4dea81(0x270))+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/staging/info\x0a\x0a'+_0x1e379c(_0x277272[_0x4dea81(0x4ac)],'\x20\x20Flags')+'\x20\x20'+_0x1e379c(_0x277272[_0x4dea81(0x4f1)],_0x4dea81(0x453))+_0x4dea81(0x408)+_0x1e379c(_0x277272['cyan'],_0x4dea81(0x36d))+_0x4dea81(0x549)+_0x1e379c(_0x277272[_0x4dea81(0x480)],_0x4dea81(0x3d9))+_0x4dea81(0x619)+_0x1e379c(_0x277272['dim'],_0x4dea81(0x28a))+'\x0a\x20\x20\x20\x20'+_0x1e379c(_0x277272[_0x4dea81(0x2fe)],_0x4dea81(0x381))+_0x4dea81(0x59d)+_0x1e379c(_0x277272['gray'],_0x4dea81(0x261))+_0x4dea81(0x59d)+_0x1e379c(_0x277272['gray'],'type/users\x20--help')+'\x0a\x0a'+_0x1e379c(_0x277272[_0x4dea81(0x4ac)],'\x20\x20Shell\x20commands')+'\x0a\x0a\x20\x20'+_0x1e379c(_0x277272[_0x4dea81(0x480)],_0x4dea81(0x61a))+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20set\x20active\x20environment\x20(persists\x20in\x20session)\x0a\x20\x20'+_0x1e379c(_0x277272[_0x4dea81(0x480)],_0x4dea81(0x35e))+_0x4dea81(0x60b)+_0x1e379c(_0x277272[_0x4dea81(0x480)],'routes')+'\x20'+_0x1e379c(_0x277272[_0x4dea81(0x4f1)],'[filter]')+_0x4dea81(0x63b)+_0x1e379c(_0x277272[_0x4dea81(0x480)],'logs')+'\x20'+_0x1e379c(_0x277272['dim'],_0x4dea81(0x2ac))+_0x4dea81(0x433)+_0x1e379c(_0x277272[_0x4dea81(0x480)],_0x4dea81(0x1db))+_0x4dea81(0x39a)+_0x1e379c(_0x277272[_0x4dea81(0x480)],_0x4dea81(0x3ef))+_0x4dea81(0x383)+_0x1e379c(_0x277272['cyan'],_0x4dea81(0x234))+'\x20'+_0x1e379c(_0x277272[_0x4dea81(0x4f1)],_0x4dea81(0x669))+_0x4dea81(0x30b));}let _0x5e1c76=![];async function _0x1a3a41(_0x525d10,_0x4077da=0x0,_0x56d700=null){const _0x2e29c5=_0x1d7d3b;_0x5e1c76&&(process[_0x2e29c5(0x434)][_0x2e29c5(0x2d0)](_0x1e379c(_0x277272[_0x2e29c5(0x4d2)],_0x2e29c5(0x618))),process['exit'](0x82));_0x5e1c76=!![],process[_0x2e29c5(0x445)][_0x2e29c5(0x2d0)]('\x0a'),process[_0x2e29c5(0x434)][_0x2e29c5(0x2d0)](_0x1e379c(_0x277272[_0x2e29c5(0x5a9)],'\x20\x20[okdb]\x20'+(_0x56d700?_0x2e29c5(0x5f7)+_0x56d700+',\x20':'')+_0x2e29c5(0x4c3)));const _0x138545=setTimeout(()=>{const _0x2168dd=_0x2e29c5;process[_0x2168dd(0x434)]['write'](_0x1e379c(_0x277272[_0x2168dd(0x4d2)],_0x2168dd(0x239))),process[_0x2168dd(0x234)](0x1);},0x1388);try{await _0x525d10['close']();}catch(_0x135e79){console[_0x2e29c5(0x2e5)](_0x1e379c(_0x277272[_0x2e29c5(0x4d2)],'\x20\x20'+_0x135e79['message']));}clearTimeout(_0x138545),process[_0x2e29c5(0x434)][_0x2e29c5(0x2d0)](_0x1e379c(_0x277272[_0x2e29c5(0x4f1)],_0x2e29c5(0x3db))),process[_0x2e29c5(0x234)](_0x4077da);}function _0x27e82e(_0x214d20){const _0x3b5609=_0x1d7d3b,_0x394c41=_0x214d20[_0x3b5609(0x35e)]!==_0x3b5609(0x678)?_0x1e379c(_0x277272['yellow'],'['+_0x214d20[_0x3b5609(0x35e)]+']'):'';return _0x1e379c(_0x277272['bold']+_0x277272['cyan'],_0x3b5609(0x209))+_0x394c41+_0x1e379c(_0x277272['gray'],'>\x20');}const _0x194ac3=new Set([_0x1d7d3b(0x54a),'POST',_0x1d7d3b(0x312),_0x1d7d3b(0x49e),_0x1d7d3b(0x4b7)]);async function _0x18f35c(_0x5316bc,_0x3d3740,_0x3e0f3f,_0x1e420d,_0x3fbd8f,_0x12320c){const _0x532a25=_0x1d7d3b;_0x5316bc=_0x5316bc['trim']();if(!_0x5316bc||_0x5316bc[_0x532a25(0x39c)]('#'))return;const _0x3eba9f=_0xeda9f(_0x5316bc),{flags:_0x400c02,rest:_0x2c5316}=_0x7084de(_0x3eba9f);if(!_0x2c5316[_0x532a25(0x631)])return;const _0x2b55fa=_0x2c5316[0x0],_0x3cbd26=_0x2b55fa[_0x532a25(0x5f1)]();if(_0x3cbd26===_0x532a25(0x2c9)){if(_0x2c5316[0x1])_0x1fccd0(_0x3d3740,_0x3bdcf7(_0x2c5316[0x1],_0x400c02[_0x532a25(0x35e)]??_0x3fbd8f[_0x532a25(0x35e)]));else _0xcfda15(_0x3fbd8f);return;}if(_0x3cbd26===_0x532a25(0x648)){const _0x2d3b41=_0x2c5316[0x1];if(!_0x2d3b41){console[_0x532a25(0x6a0)](_0x1e379c(_0x277272[_0x532a25(0x4d2)],'\x0a\x20\x20Usage:\x20use\x20<env-name>\x0a'));return;}try{_0x3d3740[_0x532a25(0x35e)](_0x2d3b41),_0x3fbd8f[_0x532a25(0x35e)]=_0x2d3b41,_0x12320c?.['setPrompt'](_0x27e82e(_0x3fbd8f)),console['log'](_0x532a25(0x657)+_0x1e379c(_0x277272[_0x532a25(0x387)],'✓')+_0x532a25(0x321)+_0x1e379c(_0x277272[_0x532a25(0x4ac)]+_0x277272[_0x532a25(0x480)],_0x2d3b41)+'\x0a');}catch{console[_0x532a25(0x6a0)](_0x532a25(0x657)+_0x1e379c(_0x277272['red'],'✗')+_0x532a25(0x226)+_0x1e379c(_0x277272['bold'],_0x2d3b41)+'\x20not\x20found'+_0x1e379c(_0x277272['dim'],'\x20—\x20type\x20env\x20to\x20list\x20available\x0a'));}return;}if(_0x3cbd26==='ENV'){const _0x3e73fb=[..._0x3d3740['_envs'][_0x532a25(0x5cf)]()]['filter'](_0x12b1cc=>!_0x12b1cc[_0x532a25(0x39c)]('~'));console[_0x532a25(0x6a0)]('');for(const _0x1320bc of _0x3e73fb){const _0x5aa71d=_0x1320bc===_0x3fbd8f['env'];console[_0x532a25(0x6a0)]('\x20\x20'+(_0x5aa71d?_0x1e379c(_0x277272[_0x532a25(0x387)],'●'):_0x1e379c(_0x277272[_0x532a25(0x4f1)],'○'))+'\x20\x20'+(_0x5aa71d?_0x1e379c(_0x277272[_0x532a25(0x4ac)]+_0x277272[_0x532a25(0x480)],_0x1320bc):_0x1e379c(_0x277272['dim'],_0x1320bc)));}console[_0x532a25(0x6a0)]('\x0a\x20\x20'+_0x1e379c(_0x277272['dim'],_0x532a25(0x566))+'\x20'+_0x1e379c(_0x277272[_0x532a25(0x480)],_0x3fbd8f[_0x532a25(0x35e)])),console[_0x532a25(0x6a0)]('');return;}if(_0x3cbd26===_0x532a25(0x59b)){const _0x41af44=[..._0x3d3740[_0x532a25(0x3ca)]['values']()][_0x532a25(0x4e0)](_0x38a477=>!_0x38a477[_0x532a25(0x58f)]['startsWith']('~'));console[_0x532a25(0x6a0)]('');const _0x472e09=Math[_0x532a25(0x555)](..._0x41af44[_0x532a25(0x272)](_0x327c20=>_0x327c20['name'][_0x532a25(0x631)]));for(const _0x404a3c of _0x41af44){const _0x3ab9e1=_0x404a3c[_0x532a25(0x58f)]===_0x3fbd8f[_0x532a25(0x35e)],_0x20ded4=_0x3ab9e1?_0x1e379c(_0x277272[_0x532a25(0x387)],'●'):_0x1e379c(_0x277272[_0x532a25(0x4f1)],'○'),_0x42e32a=_0x3ab9e1?_0x1e379c(_0x277272[_0x532a25(0x4ac)]+_0x277272['cyan'],_0x404a3c[_0x532a25(0x58f)][_0x532a25(0x5d4)](_0x472e09)):_0x1e379c(_0x277272[_0x532a25(0x4f1)],_0x404a3c[_0x532a25(0x58f)][_0x532a25(0x5d4)](_0x472e09)),_0x55e06d=[..._0x404a3c[_0x532a25(0x541)]['keys']()]['filter'](_0x3af115=>!_0x3af115[_0x532a25(0x39c)]('~')),_0x4a2c2d=_0x55e06d['length']?_0x1e379c(_0x277272['dim'],_0x55e06d[_0x532a25(0x608)](0x0,0x5)[_0x532a25(0x553)](',\x20')+(_0x55e06d['length']>0x5?_0x532a25(0x4c0)+(_0x55e06d[_0x532a25(0x631)]-0x5)+'\x20more':'')):_0x1e379c(_0x277272[_0x532a25(0x4f1)],'(no\x20types)');console[_0x532a25(0x6a0)]('\x20\x20'+_0x20ded4+'\x20\x20'+_0x42e32a+'\x20\x20'+_0x4a2c2d);}console[_0x532a25(0x6a0)]('');return;}if(_0x3cbd26===_0x532a25(0x3fe)){const _0x9ae323=_0x400c02[_0x532a25(0x35e)]??_0x2c5316[0x1]??_0x3fbd8f[_0x532a25(0x35e)];try{const _0x4b1c8d=_0x3d3740[_0x532a25(0x35e)](_0x9ae323),_0x106358=[..._0x4b1c8d['typeSubDbs'][_0x532a25(0x5cf)]()][_0x532a25(0x4e0)](_0x187bbf=>!_0x187bbf[_0x532a25(0x39c)]('~'))[_0x532a25(0x4a0)]();console[_0x532a25(0x6a0)](_0x532a25(0x657)+_0x1e379c(_0x277272['dim'],_0x106358[_0x532a25(0x631)]+_0x532a25(0x266)+(_0x106358[_0x532a25(0x631)]!==0x1?'s':'')+_0x532a25(0x5e7)+_0x9ae323));for(const _0x5ec013 of _0x106358){const _0x2f9b78=_0x4b1c8d[_0x532a25(0x541)][_0x532a25(0x363)](_0x5ec013),_0x363530=_0x2f9b78?.[_0x532a25(0x207)]?.[_0x532a25(0x48b)]?.()??0x0,_0x52ffc8=_0x1e379c(_0x277272[_0x532a25(0x4ac)]+_0x277272[_0x532a25(0x480)],_0x5ec013[_0x532a25(0x5d4)](0x1c));console[_0x532a25(0x6a0)](_0x532a25(0x63f)+_0x52ffc8+'\x20\x20'+_0x1e379c(_0x277272[_0x532a25(0x4d9)],String(_0x363530)[_0x532a25(0x4fc)](0x6))+'\x20'+_0x1e379c(_0x277272[_0x532a25(0x4f1)],_0x532a25(0x4be)));}console[_0x532a25(0x6a0)]('');}catch(_0x1c564e){console[_0x532a25(0x2e5)](_0x1e379c(_0x277272[_0x532a25(0x4d2)],'\x0a\x20\x20'+_0x1c564e[_0x532a25(0x62d)]+'\x0a'));}return;}if(_0x3cbd26==='ROUTES'){_0x37fc17(_0x3d3740,_0x2c5316['slice'](0x1)['join']('\x20'));return;}if(_0x3cbd26===_0x532a25(0x391)){const _0x35fc5e=(_0x2c5316[0x1]??'')[_0x532a25(0x3a6)]();if(!_0x35fc5e||_0x35fc5e==='on')_0x1e420d[_0x532a25(0x3ce)]=!![],_0x1e420d[_0x532a25(0x385)]=_0x532a25(0x2ee),console[_0x532a25(0x6a0)](_0x532a25(0x657)+_0x1e379c(_0x277272[_0x532a25(0x387)],'✓')+'\x20logs\x20on\x20\x20'+_0x1e379c(_0x277272[_0x532a25(0x4f1)],_0x532a25(0x584))+'\x0a');else{if(_0x35fc5e===_0x532a25(0x4fa))_0x1e420d[_0x532a25(0x3ce)]=![],console['log'](_0x532a25(0x657)+_0x1e379c(_0x277272[_0x532a25(0x5a9)],'○')+_0x532a25(0x41b));else _0x2f6c53[_0x35fc5e]!==undefined?(_0x1e420d[_0x532a25(0x3ce)]=!![],_0x1e420d[_0x532a25(0x385)]=_0x35fc5e,console['log']('\x0a\x20\x20'+_0x1e379c(_0x277272[_0x532a25(0x387)],'✓')+_0x532a25(0x65f)+_0x1e379c(_0x277272[_0x532a25(0x4ac)],_0x35fc5e)+'\x0a')):console[_0x532a25(0x2e5)](_0x1e379c(_0x277272[_0x532a25(0x4d2)],_0x532a25(0x5fc)));}return;}if(_0x3cbd26===_0x532a25(0x5c9)||_0x3cbd26===_0x532a25(0x417)){await _0x1a3a41(_0x3d3740,0x0);return;}if(_0x3cbd26===_0x532a25(0x33a)){const _0x1fab4a=_0x532a25(0x3e0)+_0x3e0f3f[_0x532a25(0x43c)]+_0x532a25(0x32f),_0x1a7933=process['platform']==='win32'?'start\x20'+_0x1fab4a:process[_0x532a25(0x67b)]===_0x532a25(0x2c4)?_0x532a25(0x4cf)+_0x1fab4a:_0x532a25(0x3e6)+_0x1fab4a;require$$4[_0x532a25(0x4f6)](_0x1a7933),console['log'](_0x532a25(0x657)+_0x1e379c(_0x277272[_0x532a25(0x387)],'✓')+'\x20opening\x20'+_0x1e379c(_0x277272[_0x532a25(0x480)],_0x1fab4a)+'\x0a');return;}let _0x3056c1,_0x1789d7,_0x431466;if(_0x194ac3[_0x532a25(0x258)](_0x3cbd26)){_0x3056c1=_0x3cbd26,_0x1789d7=_0x2c5316[0x1],_0x431466=_0x2c5316[_0x532a25(0x608)](0x2);if(!_0x1789d7){console['error'](_0x1e379c(_0x277272[_0x532a25(0x4d2)],_0x532a25(0x616)+_0x2b55fa+_0x532a25(0x32c)));return;}}else _0x3056c1=null,_0x1789d7=_0x2c5316[0x0],_0x431466=_0x2c5316[_0x532a25(0x608)](0x1);const _0x2b4254=_0x400c02['env']??_0x3fbd8f[_0x532a25(0x35e)],_0x3e68e4=_0x3bdcf7(_0x1789d7,_0x2b4254);if(_0x400c02[_0x532a25(0x3ef)]){_0x1fccd0(_0x3d3740,_0x3e68e4);return;}let _0x1660ff=null;if(_0x431466['length']){const _0x16a860=_0x431466[_0x532a25(0x553)]('\x20');try{_0x1660ff=_0x4368d4(_0x16a860);}catch(_0xc9fd1d){console[_0x532a25(0x2e5)](_0x1e379c(_0x277272['red'],_0x532a25(0x481)+_0x16a860+_0x532a25(0x657)+_0x1e379c(_0x277272[_0x532a25(0x4f1)],_0xc9fd1d[_0x532a25(0x62d)])+'\x0a'));return;}}if(!_0x3056c1)_0x3056c1=_0x1660ff!==null?_0x532a25(0x20b):'GET';try{const _0x18fea9=await _0x42b3fd(_0x3d3740,_0x3056c1,_0x3e68e4,_0x1660ff);_0x587774(_0x18fea9['status'],_0x18fea9['body']);}catch(_0x301177){console[_0x532a25(0x2e5)](_0x532a25(0x657)+_0x1e379c(_0x277272[_0x532a25(0x4d2)],'✗')+'\x20'+_0x301177[_0x532a25(0x62d)]+'\x0a');}}class _0x50a42f{constructor(){const _0x14ec79=_0x1d7d3b;this[_0x14ec79(0x694)]=new Map(),this[_0x14ec79(0x247)]=null,this[_0x14ec79(0x688)]=![];}}function _0x4ba7c0(_0x17d083){const _0x2f18f9=_0x1d7d3b,_0x17e706=new _0x50a42f();for(const _0xda2b79 of _0x17d083){if(_0xda2b79[_0x2f18f9(0x208)]?.[_0x2f18f9(0x3aa)])continue;const _0x2f66ed=_0xda2b79[_0x2f18f9(0x47b)][_0x2f18f9(0x2aa)](/^\/api/,'')[_0x2f18f9(0x2aa)](/^\[\/env\/:env=[^\]]*\]/,'')[_0x2f18f9(0x2aa)](/^\//,'');if(!_0x2f66ed)continue;let _0x18cb78=_0x17e706;for(const _0x359f88 of _0x2f66ed[_0x2f18f9(0x4f0)]('/')[_0x2f18f9(0x4e0)](Boolean)){if(_0x359f88['startsWith'](':')){const _0x414602=_0x359f88[_0x2f18f9(0x608)](0x1);if(!_0x18cb78['dynamic'])_0x18cb78[_0x2f18f9(0x247)]={'param':_0x414602,'node':new _0x50a42f()};_0x18cb78=_0x18cb78[_0x2f18f9(0x247)][_0x2f18f9(0x5dc)];}else{if(!_0x18cb78[_0x2f18f9(0x694)][_0x2f18f9(0x258)](_0x359f88))_0x18cb78[_0x2f18f9(0x694)]['set'](_0x359f88,new _0x50a42f());_0x18cb78=_0x18cb78[_0x2f18f9(0x694)][_0x2f18f9(0x363)](_0x359f88);}}_0x18cb78[_0x2f18f9(0x688)]=!![];}return _0x17e706;}const _0x4c69fd=new Map();function _0x5b517f(_0xdb2a75,_0x484b2b,_0x573604){const _0x45a7a2=_0x1d7d3b,_0x324039=_0x4c69fd['get'](_0xdb2a75);if(_0x324039&&_0x324039[_0x45a7a2(0x5d3)]>Date['now']())return _0x324039[_0x45a7a2(0x55f)];const _0xae3240=_0x573604();return _0x4c69fd[_0x45a7a2(0x452)](_0xdb2a75,{'val':_0xae3240,'exp':Date[_0x45a7a2(0x4ea)]()+_0x484b2b}),_0xae3240;}function _0x4432e7(_0x5ab087,_0x4c3abe,_0x3a4754,_0x273b7d){const _0xcf1650=_0x1d7d3b,_0x5b4bb4=_0x4c3abe['env']??_0x273b7d[_0xcf1650(0x35e)];switch(_0x5ab087){case'env':return[..._0x3a4754[_0xcf1650(0x3ca)][_0xcf1650(0x5cf)]()][_0xcf1650(0x4e0)](_0x1a949b=>!_0x1a949b['startsWith']('~'));case _0xcf1650(0x267):return _0x5b517f(_0xcf1650(0x349)+_0x5b4bb4,0x7d0,()=>{const _0xeddd24=_0xcf1650;try{return[..._0x3a4754['env'](_0x5b4bb4)[_0xeddd24(0x541)][_0xeddd24(0x5cf)]()]['filter'](_0x2e3585=>!_0x2e3585['startsWith']('~'));}catch{return[];}});case _0xcf1650(0x505):if(!_0x4c3abe[_0xcf1650(0x267)])return[];return _0x5b517f(_0xcf1650(0x245)+_0x5b4bb4+':'+_0x4c3abe[_0xcf1650(0x267)],0x5dc,()=>{const _0xe24ff0=_0xcf1650;try{const _0x4c913f=_0x3a4754[_0xe24ff0(0x35e)](_0x5b4bb4)[_0xe24ff0(0x541)][_0xe24ff0(0x363)](_0x4c3abe['type']);if(!_0x4c913f?.[_0xe24ff0(0x207)])return[];const _0x4434ab=[];for(const {key:_0x7f014c}of _0x4c913f[_0xe24ff0(0x207)][_0xe24ff0(0x698)]({'limit':0x32})){_0x4434ab[_0xe24ff0(0x5fa)](String(_0x7f014c));if(_0x4434ab[_0xe24ff0(0x631)]>=0x32)break;}return _0x4434ab;}catch{return[];}});case _0xcf1650(0x632):if(!_0x4c3abe['type'])return[];return _0x5b517f(_0xcf1650(0x405)+_0x5b4bb4+':'+_0x4c3abe[_0xcf1650(0x267)],0x7d0,()=>{const _0x2d7455=_0xcf1650;try{const _0x418b2d=_0x3a4754[_0x2d7455(0x35e)](_0x5b4bb4)[_0x2d7455(0x541)][_0x2d7455(0x363)](_0x4c3abe[_0x2d7455(0x267)]);return _0x418b2d?[..._0x418b2d[_0x2d7455(0x5aa)]?.['keys']()??[]]:[];}catch{return[];}});case _0xcf1650(0x571):if(!_0x4c3abe[_0xcf1650(0x267)])return[];return _0x5b517f(_0xcf1650(0x59e)+_0x5b4bb4+':'+_0x4c3abe['type'],0x7d0,()=>{const _0x50a1f3=_0xcf1650;try{return _0x3a4754[_0x50a1f3(0x55c)]?.[_0x50a1f3(0x690)]?.(_0x4c3abe[_0x50a1f3(0x267)],_0x3a4754['env'](_0x5b4bb4))?.['map'](_0x4d8107=>_0x4d8107[_0x50a1f3(0x58f)])??[];}catch{return[];}});default:return[];}}function _0x7643d1(_0x351e18,_0x4cd57d,_0x245244,_0x2c2485){const _0x379ef0=_0x1d7d3b,_0x1e5c2d=_0x351e18['endsWith']('/'),_0x224467=_0x351e18[_0x379ef0(0x4f0)]('/'),_0x4a528c=_0x1e5c2d?_0x224467[_0x379ef0(0x608)](0x0,-0x1):_0x224467[_0x379ef0(0x608)](0x0,-0x1),_0x5f4478=_0x1e5c2d?'':_0x224467[_0x224467[_0x379ef0(0x631)]-0x1];let _0x292a12=_0x4cd57d;const _0x85abf4={};for(const _0x44a00a of _0x4a528c){if(!_0x44a00a)continue;if(_0x292a12[_0x379ef0(0x694)][_0x379ef0(0x258)](_0x44a00a))_0x292a12=_0x292a12[_0x379ef0(0x694)][_0x379ef0(0x363)](_0x44a00a);else{if(_0x292a12[_0x379ef0(0x247)])_0x85abf4[_0x292a12[_0x379ef0(0x247)][_0x379ef0(0x389)]]=_0x44a00a,_0x292a12=_0x292a12[_0x379ef0(0x247)][_0x379ef0(0x5dc)];else return[];}}const _0x380497=_0x4a528c['filter'](Boolean),_0x345031=_0x380497[_0x379ef0(0x631)]?_0x380497[_0x379ef0(0x553)]('/')+'/':'',_0x4bfc79=[];for(const [_0x4499e5]of _0x292a12[_0x379ef0(0x694)]){if(_0x4499e5['startsWith'](_0x5f4478))_0x4bfc79['push'](_0x345031+_0x4499e5);}if(_0x292a12[_0x379ef0(0x247)])for(const _0x22d497 of _0x4432e7(_0x292a12[_0x379ef0(0x247)][_0x379ef0(0x389)],_0x85abf4,_0x245244,_0x2c2485)){if(String(_0x22d497)[_0x379ef0(0x39c)](_0x5f4478))_0x4bfc79['push'](_0x345031+_0x22d497);}return _0x4bfc79[_0x379ef0(0x608)](0x0,0x64);}const _0x2f4968=[_0x1d7d3b(0x3ef),_0x1d7d3b(0x546),_0x1d7d3b(0x35e),_0x1d7d3b(0x35c),_0x1d7d3b(0x1e6),_0x1d7d3b(0x538),_0x1d7d3b(0x606),'open',_0x1d7d3b(0x234),_0x1d7d3b(0x265)];function _0xc298ac(_0x1eef3f,_0x5d31ec,_0x384064){return function _0x29365f(_0x1aa4e1){const _0x2ec028=_0x4d7d;try{const _0x502e8d=_0x1aa4e1[_0x2ec028(0x1e0)](/\s[{[]/),_0x4d260=_0x502e8d>=0x0?_0x1aa4e1[_0x2ec028(0x608)](0x0,_0x502e8d):_0x1aa4e1,_0x4748db=_0x4d260[_0x2ec028(0x3cd)]();if(!_0x4748db){const _0x582151=[..._0x2f4968,...[..._0x1eef3f[_0x2ec028(0x694)][_0x2ec028(0x5cf)]()]]['slice'](0x0,0x64);return[_0x582151,''];}const _0x28fa9c=_0x4748db[_0x2ec028(0x4f0)](/\s+/),_0x443a56=_0x28fa9c[0x0],_0x115310=_0x443a56['toUpperCase']();if(_0x28fa9c[_0x2ec028(0x631)]===0x1){const _0x32d8a8=_0x443a56[_0x2ec028(0x3a6)](),_0x5ce858=_0x2f4968[_0x2ec028(0x4e0)](_0x10b726=>_0x10b726[_0x2ec028(0x39c)](_0x32d8a8)),_0x2e9714=_0x7643d1(_0x443a56,_0x1eef3f,_0x5d31ec,_0x384064),_0x421bff=[...new Set([..._0x5ce858,..._0x2e9714])]['slice'](0x0,0x64);return[_0x421bff,_0x443a56];}if(_0x194ac3[_0x2ec028(0x258)](_0x115310)&&_0x28fa9c[_0x2ec028(0x631)]===0x2){const _0x3fc6f7=_0x28fa9c[0x1],_0x2ce04b=_0x7643d1(_0x3fc6f7,_0x1eef3f,_0x5d31ec,_0x384064);return[_0x2ce04b[_0x2ec028(0x272)](_0x387d3d=>_0x443a56+'\x20'+_0x387d3d),_0x443a56+'\x20'+_0x3fc6f7];}if(!_0x194ac3[_0x2ec028(0x258)](_0x115310)&&_0x28fa9c['length']>0x1){const _0x4b3d13=_0x7643d1(_0x443a56,_0x1eef3f,_0x5d31ec,_0x384064),_0x4436a3='\x20'+_0x28fa9c[_0x2ec028(0x608)](0x1)['join']('\x20');return[_0x4b3d13[_0x2ec028(0x272)](_0x17e7ad=>_0x17e7ad+_0x4436a3),_0x443a56+_0x4436a3];}return[[],_0x1aa4e1];}catch{return[[],_0x1aa4e1];}};}async function _0x16fc2f(_0x1d3b78,_0x262de9){const _0x3c955b=_0x1d7d3b,_0x4527c8={'enabled':!![],'level':_0x262de9[_0x3c955b(0x482)]??_0x3c955b(0x2ee)},_0x333dd3={'env':_0x3c955b(0x678)},_0x4f879e={'current':null},_0x1e7221=_0x4ba7c0(_0x1d3b78['http']['listRoutes']()),_0x2c3e2d=_0xc298ac(_0x1e7221,_0x1d3b78,_0x333dd3);_0x1d3b78[_0x3c955b(0x6a0)][_0x3c955b(0x301)](_0x988103=>{const _0x583bbd=_0x3c955b;if(!_0x4527c8[_0x583bbd(0x3ce)])return;_0xeec79e(_0x988103,_0x4527c8[_0x583bbd(0x385)]),_0x4f879e[_0x583bbd(0x367)]?.[_0x583bbd(0x502)](!![]);}),_0x497048(_0x1d3b78,_0x262de9);const _0x9b0eac=_0x4e0420[_0x3c955b(0x5ee)]({'input':process[_0x3c955b(0x291)],'output':process[_0x3c955b(0x445)],'terminal':!![],'completer':_0x2c3e2d,'prompt':_0x27e82e(_0x333dd3),'historySize':_0x53d0b0});try{const _0x46ff6f=_0x1b3471[_0x3c955b(0x2bd)](_0x35cdc1,'utf8')['split']('\x0a')[_0x3c955b(0x4e0)](Boolean);_0x9b0eac[_0x3c955b(0x5ed)]=_0x46ff6f['reverse']()[_0x3c955b(0x608)](0x0,_0x53d0b0);}catch{}_0x4f879e[_0x3c955b(0x367)]=_0x9b0eac,_0x9b0eac['on'](_0x3c955b(0x3a4),async _0x34f6ec=>{const _0x11179c=_0x3c955b;_0x9b0eac[_0x11179c(0x1fb)]();try{await _0x18f35c(_0x34f6ec,_0x1d3b78,_0x262de9,_0x4527c8,_0x333dd3,_0x9b0eac);}catch(_0x3a7d7b){console['error'](_0x1e379c(_0x277272[_0x11179c(0x4d2)],_0x11179c(0x399)+_0x3a7d7b[_0x11179c(0x62d)]));}finally{_0x9b0eac['resume'](),_0x9b0eac[_0x11179c(0x502)]();}}),_0x9b0eac['on'](_0x3c955b(0x519),()=>{const _0x396654=_0x3c955b;try{const _0x183843=[..._0x9b0eac['history']][_0x396654(0x2e8)]()['filter'](Boolean)[_0x396654(0x608)](0x0,_0x53d0b0);_0x1b3471[_0x396654(0x353)](_0x35cdc1,_0x183843['join']('\x0a')+'\x0a');}catch{}_0x1a3a41(_0x1d3b78,0x0);});let _0x1bda4a=0x0;return process['on'](_0x3c955b(0x322),()=>{const _0x17e6bc=_0x3c955b;if(_0x5e1c76)return _0x1a3a41(_0x1d3b78,0x82,'SIGINT');if(_0x9b0eac[_0x17e6bc(0x3a4)]==='')return _0x1a3a41(_0x1d3b78,0x0,'SIGINT');const _0x2b799d=Date['now']();if(_0x2b799d-_0x1bda4a<0x5dc)return _0x1a3a41(_0x1d3b78,0x0,_0x17e6bc(0x532));_0x1bda4a=_0x2b799d,process['stdout'][_0x17e6bc(0x2d0)]('\x0a'),_0x9b0eac[_0x17e6bc(0x230)](0x0),_0x9b0eac[_0x17e6bc(0x502)](),process[_0x17e6bc(0x434)][_0x17e6bc(0x2d0)](_0x1e379c(_0x277272['dim'],'\x20\x20(press\x20Ctrl+C\x20again\x20to\x20exit)\x0a'));}),process['on'](_0x3c955b(0x574),()=>_0x1a3a41(_0x1d3b78,0x0,'SIGTERM')),process['on'](_0x3c955b(0x562),()=>_0x1a3a41(_0x1d3b78,0x0,'SIGBREAK')),_0x9b0eac[_0x3c955b(0x502)](),_0x9b0eac;}return okdbShell={'start':_0x16fc2f,'colorLog':_0xeec79e,'lenientParse':_0x4368d4,'_splitLine':_0xeda9f,'_formatRouteHelpLines':_0x3a7bbc,'_routeSummary':_0xf7851,'_routeTags':_0x33344b},okdbShell;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x5426a9=_0x42e206;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x430b45,performance:_0x32d819}=require$$0$4,_0x36dbff=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG==='true',_0x360646=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x3d7f69=process.env.OKDB_LOOP_LAG_ALL==='1',_0x4fabb7=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x28256e{constructor(){const _0x261fff=_0x4d7d;this['enabled']=_0x36dbff,this[_0x261fff(0x204)]=new Map(),this['_h']=null,this[_0x261fff(0x2bb)]=null,this['_started']=![],this['_log']=(_0x11a84b,_0x51338d)=>process[_0x261fff(0x434)]['write'](_0x11a84b+(_0x51338d?'\x20'+JSON['stringify'](_0x51338d):'')+'\x0a');}['now'](){return _0x32d819['now']();}[_0x5426a9(0x479)](_0x1c548e){const _0x4b7199=_0x5426a9;if(typeof _0x1c548e===_0x4b7199(0x3ec))this[_0x4b7199(0x5e5)]=_0x1c548e;}[_0x5426a9(0x5bc)](_0x52e195,_0x1dff4c,_0x2ef3ab){const _0x124cf3=_0x5426a9;if(!this['enabled'])return;let _0x28fcd8=this[_0x124cf3(0x204)][_0x124cf3(0x363)](_0x52e195);!_0x28fcd8&&(_0x28fcd8={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this['_buckets'][_0x124cf3(0x452)](_0x52e195,_0x28fcd8)),_0x28fcd8['ms']+=_0x1dff4c,_0x28fcd8['count']+=0x1,_0x1dff4c>_0x28fcd8[_0x124cf3(0x49b)]&&(_0x28fcd8[_0x124cf3(0x49b)]=_0x1dff4c,_0x28fcd8[_0x124cf3(0x3bc)]=_0x2ef3ab||'');}[_0x5426a9(0x563)](_0x4d742d){const _0x98e3c6=_0x5426a9;if(!this['enabled']||this[_0x98e3c6(0x3bb)])return;this[_0x98e3c6(0x3bb)]=!![];if(_0x4d742d)this[_0x98e3c6(0x5e5)]=_0x4d742d;this['_h']=_0x430b45({'resolution':0xa}),this['_h'][_0x98e3c6(0x6a3)](),this[_0x98e3c6(0x2bb)]=setInterval(()=>this['_report'](),_0x360646);if(this[_0x98e3c6(0x2bb)][_0x98e3c6(0x4bd)])this[_0x98e3c6(0x2bb)][_0x98e3c6(0x4bd)]();}['onWindow'](_0x3f573d){const _0x14d50e=_0x5426a9;if(!this['_windowCbs'])this[_0x14d50e(0x6a9)]=new Set();this[_0x14d50e(0x6a9)][_0x14d50e(0x637)](_0x3f573d);if(!this['_started'])this['_startAdmission']();}[_0x5426a9(0x443)](_0x26f3ec){const _0x3f7344=_0x5426a9;this[_0x3f7344(0x6a9)]?.['delete'](_0x26f3ec);}[_0x5426a9(0x31a)](){const _0xdf2760=_0x5426a9;if(this['_admissionStarted'])return;this['_admissionStarted']=!![];!this['_h']&&(this['_h']=_0x430b45({'resolution':0xa}),this['_h'][_0xdf2760(0x6a3)]());const _0xbb805=_0x360646;this[_0xdf2760(0x213)]=setInterval(()=>{const _0xb18a66=_0xdf2760,_0xa49b19=this['_h'];if(!_0xa49b19)return;const _0x154deb=_0xa49b19['percentile'](0x63)/0xf4240,_0x12a24f=_0xa49b19[_0xb18a66(0x555)]/0xf4240,_0x81bc9e=_0xa49b19[_0xb18a66(0x38a)]/0xf4240;_0xa49b19[_0xb18a66(0x653)]();if(this['_windowCbs'])for(const _0x5e3f49 of this[_0xb18a66(0x6a9)]){try{_0x5e3f49({'p99Ms':_0x154deb,'maxMs':_0x12a24f,'meanMs':_0x81bc9e,'reportMs':_0xbb805});}catch{}}},_0xbb805);if(this['_admissionTimer']['unref'])this[_0xdf2760(0x213)][_0xdf2760(0x4bd)]();}[_0x5426a9(0x28c)](){const _0x1bfa7d=_0x5426a9,_0x3a4cbe=this['_h'],_0x1a95d1=_0x3a4cbe[_0x1bfa7d(0x555)]/0xf4240,_0x4f3b76=_0x3a4cbe[_0x1bfa7d(0x402)](0x63)/0xf4240,_0x9fdc51=_0x3a4cbe['mean']/0xf4240;_0x3a4cbe[_0x1bfa7d(0x653)]();const _0x3b5f8c=[...this[_0x1bfa7d(0x204)][_0x1bfa7d(0x699)]()][_0x1bfa7d(0x272)](([_0x403ec0,_0x586953])=>({'label':_0x403ec0,..._0x586953}))[_0x1bfa7d(0x4a0)]((_0x5b16dc,_0x48b455)=>_0x48b455['ms']-_0x5b16dc['ms'])[_0x1bfa7d(0x608)](0x0,0x8);this[_0x1bfa7d(0x204)][_0x1bfa7d(0x471)]();const _0x38df2c=_0x3b5f8c[_0x1bfa7d(0x350)]((_0x41f72e,_0x41f6eb)=>_0x41f72e+_0x41f6eb['ms'],0x0),_0x39eee2=_0x3b5f8c[_0x1bfa7d(0x272)](_0x337949=>_0x337949[_0x1bfa7d(0x236)]+'='+_0x337949['ms'][_0x1bfa7d(0x33c)](0x0)+_0x1bfa7d(0x1e9)+_0x337949[_0x1bfa7d(0x2d8)]+(_0x337949[_0x1bfa7d(0x49b)]>0x5?'(worst\x20'+_0x337949['maxMs'][_0x1bfa7d(0x33c)](0x0)+'ms'+(_0x337949[_0x1bfa7d(0x3bc)]?'\x20'+_0x337949[_0x1bfa7d(0x3bc)]:'')+')':''));(_0x3d7f69||_0x1a95d1>=_0x4fabb7)&&this['_log'](_0x1bfa7d(0x44a)+_0x360646+_0x1bfa7d(0x520)+_0x1a95d1[_0x1bfa7d(0x33c)](0x0)+_0x1bfa7d(0x20e)+_0x4f3b76[_0x1bfa7d(0x33c)](0x0)+_0x1bfa7d(0x2ff)+_0x9fdc51[_0x1bfa7d(0x33c)](0x0)+_0x1bfa7d(0x340)+_0x38df2c[_0x1bfa7d(0x33c)](0x0)+'ms'+(_0x39eee2[_0x1bfa7d(0x631)]?_0x1bfa7d(0x2f6)+_0x39eee2['join']('\x20\x20'):''),{'feature':_0x1bfa7d(0x467)});if(this[_0x1bfa7d(0x6a9)])for(const _0x16769d of this[_0x1bfa7d(0x6a9)]){try{_0x16769d({'p99Ms':_0x4f3b76,'maxMs':_0x1a95d1,'meanMs':_0x9fdc51,'reportMs':_0x360646});}catch{}}}[_0x5426a9(0x5a1)](){const _0x571ece=_0x5426a9;if(this[_0x571ece(0x2bb)])clearInterval(this[_0x571ece(0x2bb)]);if(this['_h'])this['_h'][_0x571ece(0x5ec)]();this[_0x571ece(0x2bb)]=null,this['_h']=null,this[_0x571ece(0x3bb)]=![];}}const _0x6efb3f=new _0x28256e();if(_0x6efb3f['enabled'])_0x6efb3f[_0x5426a9(0x563)]();return okdbLoopMonitor={'LOOP':_0x6efb3f},okdbLoopMonitor;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x519ad5=require$$1$1,_0x415b58=require$$1;let _0x35a3ec,_0x3c7834,_0x2742a1,_0x2190cd,_0x5a4ff1,_0xad1aca,_0x40e52b,_0x1620c1=![];const _0x4bc678=new Set();let _0x220528=null;const _0xef7e02=new Map();function _0xbee054(){const _0x4f0e90=_0x4d7d;if(_0x35a3ec!==undefined)return _0x35a3ec;_0x35a3ec=process.env.OKDB_DIAG==='1';if(!_0x35a3ec)return![];_0x3c7834=process.env.OKDB_DIAG_STACK==='1',_0x2190cd=Math[_0x4f0e90(0x555)](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x2742a1=new Array(_0x2190cd),_0x5a4ff1=0x0,_0xad1aca=0x0,_0x40e52b=process.env.OKDB_DIAG_DIR||null;if(_0x40e52b)try{_0x519ad5['mkdirSync'](_0x40e52b,{'recursive':!![]});}catch{}return!![];}function _0x39b814(){return _0x35a3ec===undefined?_0xbee054():_0x35a3ec;}function _0x39946d(_0x250842,_0x47256f){const _0x393a03=_0x4d7d;if(_0x35a3ec===undefined?!_0xbee054():!_0x35a3ec)return;let _0x57df15;if(_0x3c7834){const _0x135c1f=new Error()[_0x393a03(0x602)]||'';_0x57df15=_0x135c1f[_0x393a03(0x4f0)]('\x0a')[_0x393a03(0x608)](0x3)[_0x393a03(0x272)](_0x156c48=>_0x156c48[_0x393a03(0x215)]())[_0x393a03(0x4e0)](Boolean)['slice'](0x0,0x8);}_0x2742a1[_0x5a4ff1]={'seq':_0xad1aca++,'t':Date[_0x393a03(0x4ea)](),'env':_0x250842,'kind':_0x47256f||_0x393a03(0x3b3),'stack':_0x57df15},_0x5a4ff1=(_0x5a4ff1+0x1)%_0x2190cd;}function _0x1465ff(_0x7d5433){const _0x1043be=_0x4d7d,_0x3a989d=[];for(let _0x5956f4=0x0;_0x5956f4<_0x2190cd;_0x5956f4++){const _0x3cb55c=_0x2742a1[(_0x5a4ff1-0x1-_0x5956f4+_0x2190cd*0x2)%_0x2190cd];if(!_0x3cb55c)continue;_0x3a989d['push'](_0x3cb55c);if(_0x3a989d[_0x1043be(0x631)]>=_0x7d5433)break;}return _0x3a989d;}function _0x264648(_0x46fa96){const _0x3729c0=_0x4d7d;try{process[_0x3729c0(0x434)][_0x3729c0(0x2d0)](_0x46fa96+'\x0a');}catch{}if(_0x40e52b)try{_0x519ad5[_0x3729c0(0x24f)](_0x415b58[_0x3729c0(0x553)](_0x40e52b,'okdb-diag.'+process[_0x3729c0(0x250)]+'.log'),_0x46fa96+'\x0a');}catch{}}function _0x56ea00(_0x26c993){const _0x52ba84=_0x4d7d,_0x4f0a66=_0x1465ff(_0x26c993);if(!_0x4f0a66[_0x52ba84(0x631)])return'\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)';const _0x58265d=Date['now']();return _0x4f0a66[_0x52ba84(0x272)](_0x476b45=>{const _0x5c6759=_0x52ba84,_0x4a541f='\x20\x20#'+_0x476b45[_0x5c6759(0x66a)]+'\x20-'+(_0x58265d-_0x476b45['t'])+_0x5c6759(0x25e)+_0x476b45['env']+'\x20'+_0x476b45['kind'];return _0x476b45[_0x5c6759(0x602)]&&_0x476b45[_0x5c6759(0x602)][_0x5c6759(0x631)]?_0x4a541f+_0x5c6759(0x638)+_0x476b45[_0x5c6759(0x602)][_0x5c6759(0x553)](_0x5c6759(0x638)):_0x4a541f;})[_0x52ba84(0x553)]('\x0a');}function _0x63bb7d(_0x45e2e2,_0x44a9eb){const _0x5a53f5=_0x4d7d,_0x837c1f=_0x5a53f5(0x3e3)+_0x45e2e2+_0x5a53f5(0x689)+new Date()[_0x5a53f5(0x5ac)]()+_0x5a53f5(0x63a)+process[_0x5a53f5(0x250)]+_0x5a53f5(0x560),_0x41430e=[_0x837c1f,'error:\x20'+(_0x44a9eb&&_0x44a9eb[_0x5a53f5(0x602)]?_0x44a9eb['stack']['split']('\x0a')[0x0]:_0x44a9eb),_0x5a53f5(0x586)+(_0x3c7834?'':_0x5a53f5(0x46a))+':',_0x56ea00(0x18),_0x29eab9(),'='[_0x5a53f5(0x5ff)](_0x837c1f['length']-0x1)];_0x264648(_0x41430e['join']('\x0a'));}function _0x11f6cc(_0x4514f7){const _0x2ad46b=_0x4d7d;if(!_0x39b814())return;const _0x33c073=String(_0x4514f7&&_0x4514f7[_0x2ad46b(0x62d)]||_0x4514f7||''),_0x41ec31=/already closed|environment is already|invalid read txn|reset an invalid/i['test'](_0x33c073);_0x63bb7d(_0x41ec31?_0x2ad46b(0x41d):_0x2ad46b(0x338),_0x4514f7);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x41ec31)return;try{console[_0x2ad46b(0x2e5)](_0x4514f7&&_0x4514f7[_0x2ad46b(0x602)]?_0x4514f7['stack']:_0x4514f7);}catch{}process[_0x2ad46b(0x234)](0x1);}function _0x5a6596(_0x8284bc){const _0x4a015e=_0x4d7d;if(!_0x39b814())return;const _0x1af0d8=String(_0x8284bc&&_0x8284bc[_0x4a015e(0x62d)]||_0x8284bc||'');/already closed|environment is already|invalid read txn|reset an invalid/i[_0x4a015e(0x2a4)](_0x1af0d8)&&_0x63bb7d(_0x4a015e(0x2d4),_0x8284bc);}function _0x29eab9(){const _0x7ada45=_0x4d7d,_0x1191cb=[_0x7ada45(0x1ee)];let _0x9fe1e4=![];for(const _0x48b3fc of _0x4bc678){const _0x202594=_0x48b3fc&&_0x48b3fc[_0x7ada45(0x3ca)];if(!_0x202594)continue;for(const [_0x584b1f,_0x1f0a0a]of _0x202594){const _0x67a41e=_0x1f0a0a&&_0x1f0a0a[_0x7ada45(0x3a1)]&&_0x1f0a0a[_0x7ada45(0x3a1)]['view'];if(!_0x67a41e)continue;let _0x12ec5d,_0x3d965a;try{_0x12ec5d=Atomics[_0x7ada45(0x23f)](_0x67a41e,0x0),_0x3d965a=Atomics['load'](_0x67a41e,0x1);}catch{continue;}if(_0x12ec5d===0x0)continue;_0x9fe1e4=!![];const _0x15aa56=_0x12ec5d>0x0?'SWAP':'copy',_0x412b2b=Date[_0x7ada45(0x4ea)]()-Math[_0x7ada45(0x346)](_0x12ec5d)*0x3e8,_0x4da916=((()=>{const _0x575fad=_0x7ada45;try{return _0x1f0a0a[_0x575fad(0x544)]&&_0x1f0a0a['_writer'][_0x575fad(0x43f)]?_0x1f0a0a[_0x575fad(0x544)][_0x575fad(0x43f)]():null;}catch{return null;}})());_0x1191cb[_0x7ada45(0x5fa)](_0x7ada45(0x5af)+_0x584b1f+_0x7ada45(0x21c)+_0x15aa56+_0x7ada45(0x332)+_0x412b2b+_0x7ada45(0x299)+_0x3d965a+(_0x4da916?_0x7ada45(0x687)+_0x4da916[_0x7ada45(0x3d7)]+_0x7ada45(0x303)+_0x4da916[_0x7ada45(0x3ac)]+'\x20parkedNow='+_0x4da916[_0x7ada45(0x2c0)]+'}':''));}}if(!_0x9fe1e4)_0x1191cb[_0x7ada45(0x5fa)]('\x20\x20(no\x20env\x20draining)');return _0x1191cb['join']('\x0a');}function _0x2d3101(){const _0xdf96cd=_0x4d7d;if(!_0x39b814())return;const _0x2b867c=Math[_0xdf96cd(0x555)](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0xef38f6=Date['now']();for(const _0x37f7f8 of _0x4bc678){const _0x116b5f=_0x37f7f8&&_0x37f7f8[_0xdf96cd(0x3ca)];if(!_0x116b5f)continue;for(const [_0x477ba8,_0x314a6a]of _0x116b5f){const _0x18fc87=_0x314a6a&&_0x314a6a[_0xdf96cd(0x3a1)]&&_0x314a6a[_0xdf96cd(0x3a1)]['view'];if(!_0x18fc87)continue;let _0x1396e1;try{_0x1396e1=Atomics[_0xdf96cd(0x23f)](_0x18fc87,0x0);}catch{continue;}const _0x228200=_0x37f7f8[_0xdf96cd(0x47b)]+'|'+_0x477ba8;if(_0x1396e1<=0x0){_0xef7e02['delete'](_0x228200);continue;}const _0x556592=_0xef38f6-_0x1396e1*0x3e8,_0x29936f=_0xef7e02[_0xdf96cd(0x363)](_0x228200);if(_0x556592<_0x2b867c)continue;if(_0x29936f&&_0xef38f6-_0x29936f[_0xdf96cd(0x64d)]<_0x2b867c)continue;_0xef7e02[_0xdf96cd(0x452)](_0x228200,{'firstTs':_0x29936f?_0x29936f[_0xdf96cd(0x46e)]:_0x1396e1,'dumpedAt':_0xef38f6});const _0x2bd582=_0xdf96cd(0x37b)+_0x556592+_0xdf96cd(0x293)+_0x477ba8+_0xdf96cd(0x689)+new Date()[_0xdf96cd(0x5ac)]()+_0xdf96cd(0x63a)+process[_0xdf96cd(0x250)]+_0xdf96cd(0x560);_0x264648([_0x2bd582,_0x29eab9(),'='[_0xdf96cd(0x5ff)](_0x2bd582['length']-0x1)]['join']('\x0a'));}}}function _0xc7d3ef(){const _0x4bf4fe=_0x4d7d;if(!_0x39b814()||_0x1620c1)return;_0x1620c1=!![],process[_0x4bf4fe(0x2d7)](_0x4bf4fe(0x338),_0x11f6cc),process[_0x4bf4fe(0x2d7)]('unhandledRejection',_0x5a6596);const _0x5b89c0=Math[_0x4bf4fe(0x555)](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x220528=setInterval(_0x2d3101,_0x5b89c0);if(_0x220528[_0x4bf4fe(0x4bd)])_0x220528['unref']();}function _0x240092(_0x76ab38){const _0x1fee53=_0x4d7d;if(!_0x39b814()||!_0x76ab38)return;_0x4bc678[_0x1fee53(0x637)](_0x76ab38),_0xc7d3ef();}function _0xbb690a(_0x258147){const _0x46b009=_0x4d7d;_0x4bc678[_0x46b009(0x472)](_0x258147);}function _0x2b84c9(){const _0x1c88c2=_0x4d7d;if(!_0x39b814())return{'enabled':![],'hint':_0x1c88c2(0x3f7)};return{'enabled':!![],'stackCapture':!!_0x3c7834,'recentWrites':_0x1465ff(0x10),'drain':_0x29eab9()};}return okdbDiag={'isEnabled':_0x39b814,'recordWrite':_0x39946d,'installDiag':_0xc7d3ef,'registerOkdb':_0x240092,'unregisterOkdb':_0xbb690a,'snapshot':_0x2b84c9},okdbDiag;}function _0x4d7d(_0x247743,_0x2da275){_0x247743=_0x247743-0x1db;const _0x4c6a1b=_0x4c6a();let _0x4d7d77=_0x4c6a1b[_0x247743];return _0x4d7d77;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x202fa2=_0x42e206;if(hasRequiredOkdbWriter)return okdbWriter[_0x202fa2(0x255)];hasRequiredOkdbWriter=0x1;const {performance:_0xa3e298}=require$$0$5,_0x153e41=requireOkdbDiag(),_0x37d98e=process.env.OKDB_COMMIT_MODE==='sync';class _0x5478e8{constructor(_0x46b3d0){const _0x368ddc=_0x202fa2;this[_0x368ddc(0x35e)]=_0x46b3d0,this[_0x368ddc(0x4c1)]=new Set(),this[_0x368ddc(0x568)]=new Map(),this[_0x368ddc(0x1fe)]=0x0,this[_0x368ddc(0x5a4)]=[],this['_done']=[],this['_highWater']=Math[_0x368ddc(0x555)](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this[_0x368ddc(0x4e6)]=0x0,this['_bpWaiters']=[],this[_0x368ddc(0x478)]=0x0;}async['transaction'](_0x5d4e35,_0x126b7d){const _0x544f7b=_0x202fa2;if(_0x153e41['isEnabled']())_0x153e41[_0x544f7b(0x4ed)](this[_0x544f7b(0x35e)]?.[_0x544f7b(0x58f)],_0x126b7d);if(this[_0x544f7b(0x3f6)]){const _0x4463b5=new Error(_0x544f7b(0x3fb));_0x4463b5[_0x544f7b(0x4b8)]=_0x544f7b(0x4a2);throw _0x4463b5;}if(this[_0x544f7b(0x65b)]>0x0){let _0x59e6ff=![];while(this[_0x544f7b(0x4e6)]>=this['_highWater']&&!this[_0x544f7b(0x3f6)]){!_0x59e6ff&&(_0x59e6ff=!![],this[_0x544f7b(0x478)]++),await new Promise(_0x212bc8=>this[_0x544f7b(0x2e1)]['push'](_0x212bc8));}if(this[_0x544f7b(0x3f6)]){const _0x43b2ab=new Error('okdb-writer:\x20env\x20closing\x20—\x20retry');_0x43b2ab[_0x544f7b(0x4b8)]='ENV_CLOSING_RETRY';throw _0x43b2ab;}}this[_0x544f7b(0x4e6)]++;const _0x2ad64b=this[_0x544f7b(0x35e)][_0x544f7b(0x3a1)];if(_0x2ad64b)await _0x2ad64b[_0x544f7b(0x341)]();if(this[_0x544f7b(0x3f6)]){if(_0x2ad64b)_0x2ad64b[_0x544f7b(0x5a3)]();this[_0x544f7b(0x4e6)]--;if(this[_0x544f7b(0x2e1)][_0x544f7b(0x631)]&&this[_0x544f7b(0x4e6)]<this[_0x544f7b(0x65b)])this[_0x544f7b(0x2e1)][_0x544f7b(0x343)]()();const _0x3908e9=new Error(_0x544f7b(0x3fb));_0x3908e9[_0x544f7b(0x4b8)]=_0x544f7b(0x4a2);throw _0x3908e9;}const _0x480621=_0xa3e298[_0x544f7b(0x4ea)]();if(_0x37d98e)try{const _0x3d3119=this[_0x544f7b(0x35e)]['db'][_0x544f7b(0x5d2)](_0x5d4e35);this[_0x544f7b(0x1fe)]++;if(this[_0x544f7b(0x5a4)][_0x544f7b(0x5fa)](_0xa3e298[_0x544f7b(0x4ea)]()-_0x480621)>0x100)this['_durs'][_0x544f7b(0x343)]();if(this[_0x544f7b(0x36e)][_0x544f7b(0x5fa)](_0xa3e298[_0x544f7b(0x4ea)]())>0x800)this['_done'][_0x544f7b(0x343)]();return _0x3d3119;}finally{this[_0x544f7b(0x4e6)]--;if(this[_0x544f7b(0x2e1)][_0x544f7b(0x631)]&&this[_0x544f7b(0x4e6)]<this['_highWater'])this[_0x544f7b(0x2e1)][_0x544f7b(0x343)]()();if(_0x2ad64b)_0x2ad64b[_0x544f7b(0x5a3)]();}const _0x37232b=this['env']['db'][_0x544f7b(0x2f7)](_0x5d4e35);this[_0x544f7b(0x4c1)][_0x544f7b(0x637)](_0x37232b),this[_0x544f7b(0x568)][_0x544f7b(0x452)](_0x37232b,_0x480621);const _0x2d179b=()=>{const _0x61991b=_0x544f7b;this[_0x61991b(0x4c1)]['delete'](_0x37232b),this[_0x61991b(0x568)]['delete'](_0x37232b),this[_0x61991b(0x1fe)]++,this['_outstanding']--;this['_bpWaiters'][_0x61991b(0x631)]&&this[_0x61991b(0x4e6)]<this[_0x61991b(0x65b)]&&this[_0x61991b(0x2e1)][_0x61991b(0x343)]()();if(this['_durs'][_0x61991b(0x5fa)](_0xa3e298[_0x61991b(0x4ea)]()-_0x480621)>0x100)this[_0x61991b(0x5a4)]['shift']();if(this[_0x61991b(0x36e)]['push'](_0xa3e298['now']())>0x800)this[_0x61991b(0x36e)][_0x61991b(0x343)]();};_0x37232b[_0x544f7b(0x22f)](_0x2d179b,_0x2d179b);try{return await _0x37232b;}finally{if(_0x2ad64b)_0x2ad64b[_0x544f7b(0x5a3)]();}}[_0x202fa2(0x43f)](){const _0x46def0=_0x202fa2,_0x12adf5=_0xa3e298[_0x46def0(0x4ea)]();let _0x5c9900=0x0;for(const _0x12ff3d of this[_0x46def0(0x568)][_0x46def0(0x413)]()){const _0x542308=_0x12adf5-_0x12ff3d;if(_0x542308>_0x5c9900)_0x5c9900=_0x542308;}let _0x26930d=0x0;for(let _0x5cb724=this['_done'][_0x46def0(0x631)]-0x1;_0x5cb724>=0x0;_0x5cb724--){if(_0x12adf5-this[_0x46def0(0x36e)][_0x5cb724]>0x3e8)break;_0x26930d++;}let _0x1d68f9=0x0;if(this[_0x46def0(0x5a4)][_0x46def0(0x631)]){const _0x239c9a=[...this[_0x46def0(0x5a4)]]['sort']((_0x1412d5,_0x44f04a)=>_0x1412d5-_0x44f04a);_0x1d68f9=_0x239c9a[Math[_0x46def0(0x368)](_0x239c9a[_0x46def0(0x631)]-0x1,Math[_0x46def0(0x54e)](_0x239c9a[_0x46def0(0x631)]*0.99))];}return{'depth':this[_0x46def0(0x4c1)][_0x46def0(0x4a9)],'oldestPendingMs':Math[_0x46def0(0x2fb)](_0x5c9900),'committed':this[_0x46def0(0x1fe)],'commitsPerSec':_0x26930d,'commitP99Ms':Math['round'](_0x1d68f9),'parkedNow':this['_bpWaiters'][_0x46def0(0x631)],'parkedTotal':this[_0x46def0(0x478)],'highWater':this[_0x46def0(0x65b)]};}[_0x202fa2(0x2df)](){const _0x20e646=_0x202fa2,_0x54fe2e=_0xa3e298[_0x20e646(0x4ea)]();return[...this[_0x20e646(0x568)][_0x20e646(0x413)]()][_0x20e646(0x272)](_0x3f86fa=>Math[_0x20e646(0x2fb)](_0x54fe2e-_0x3f86fa))[_0x20e646(0x4a0)]((_0x4a5b0b,_0x1e2edd)=>_0x1e2edd-_0x4a5b0b);}[_0x202fa2(0x51a)](){const _0x112516=_0x202fa2;this[_0x112516(0x3f6)]=!![];for(const _0x5a130f of this['_bpWaiters'][_0x112516(0x4d8)](0x0))_0x5a130f();}async[_0x202fa2(0x2e6)](){const _0x52f11a=_0x202fa2;let _0x11ac2a=0x0;while(this['_inflight'][_0x52f11a(0x4a9)]&&_0x11ac2a++<0x3e8){await Promise[_0x52f11a(0x37d)]([...this[_0x52f11a(0x4c1)]]);}}async[_0x202fa2(0x473)](_0x4165a7,_0x27fec3,_0x309c68,_0x1462ab){const _0x28ee65=_0x202fa2;return this[_0x28ee65(0x510)](()=>{const _0x50503b=_0x28ee65;if(_0x1462ab===undefined)_0x4165a7[_0x50503b(0x61f)](_0x27fec3,_0x309c68);else _0x4165a7[_0x50503b(0x61f)](_0x27fec3,_0x309c68,_0x1462ab);},_0x28ee65(0x358));}async['remove'](_0x47af97,_0x3a0875){const _0x2dba98=_0x202fa2;return this[_0x2dba98(0x510)](()=>_0x47af97[_0x2dba98(0x62b)](_0x3a0875),'raw-remove');}}async function _0x511dd3(_0x28be46,_0x1833c6){const _0x3d2596=_0x202fa2;if(_0x1833c6==null)_0x1833c6=Math[_0x3d2596(0x555)](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0x318f7b=_0x28be46?.[_0x3d2596(0x659)];if(!_0x318f7b||typeof _0x318f7b[_0x3d2596(0x22f)]!==_0x3d2596(0x3ec))return;await Promise[_0x3d2596(0x60d)]([Promise[_0x3d2596(0x2f9)](_0x318f7b)[_0x3d2596(0x45b)](()=>{}),new Promise(_0x44d8db=>{const _0x151342=_0x3d2596,_0x4cc2b0=setTimeout(_0x44d8db,_0x1833c6);if(_0x4cc2b0['unref'])_0x4cc2b0[_0x151342(0x4bd)]();})]);}catch{}}function _0x697143(_0x282036){const _0x1cceeb=_0x202fa2;if(_0x37d98e)return Promise['resolve']();const _0x2d80e2=_0x282036?.['committed'];return _0x2d80e2&&typeof _0x2d80e2[_0x1cceeb(0x22f)]===_0x1cceeb(0x3ec)?_0x2d80e2:Promise['resolve']();}return okdbWriter[_0x202fa2(0x255)]=_0x5478e8,okdbWriter[_0x202fa2(0x255)][_0x202fa2(0x304)]=_0x511dd3,okdbWriter['exports']['committed']=_0x697143,okdbWriter[_0x202fa2(0x255)][_0x202fa2(0x416)]=_0x37d98e,okdbWriter['exports'];}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0x13b861=_0x42e206;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x2a6643=require$$0,{SYNC_COMMITS:_0x20fc55}=requireOkdbWriter(),_0x1357c8=_0x13b861(0x593);class _0x33abb5{constructor(_0x18e59d,_0x515d8a,_0x1b535a){const _0x3e0991=_0x13b861;this[_0x3e0991(0x318)]=_0x18e59d,this[_0x3e0991(0x5b4)]=_0x515d8a,this[_0x3e0991(0x494)]=_0x1b535a,this[_0x3e0991(0x686)]=![],this['_heartbeatTimer']=null,this[_0x3e0991(0x3e8)]=null;}['isHeld'](){const _0x190230=_0x13b861;if(this[_0x190230(0x686)])return![];try{const _0x5858fa=this[_0x190230(0x318)][_0x190230(0x1de)]()[_0x190230(0x363)](this['_key']);if(!_0x5858fa||_0x5858fa[_0x190230(0x2d6)]!==this[_0x190230(0x494)])return![];const _0x1243ef=_0x5858fa['updatedAt']??_0x5858fa[_0x190230(0x2d6)];if(_0x1243ef+_0x5858fa['ttlMs']<Date[_0x190230(0x4ea)]())return![];return!![];}catch{return!this[_0x190230(0x686)];}}['holder'](){const _0x3638f3=_0x13b861;if(this[_0x3638f3(0x686)])return null;try{return this[_0x3638f3(0x318)]['_db']()[_0x3638f3(0x363)](this[_0x3638f3(0x5b4)])??null;}catch{return null;}}async[_0x13b861(0x600)](_0x24f08b){const _0x3de222=_0x13b861;if(this['_released'])return;try{const _0xd038aa=this[_0x3de222(0x318)][_0x3de222(0x1de)]()[_0x3de222(0x363)](this[_0x3de222(0x5b4)]);if(!_0xd038aa||_0xd038aa[_0x3de222(0x2d6)]!==this[_0x3de222(0x494)])return;if(_0x20fc55)this[_0x3de222(0x318)][_0x3de222(0x1de)]()[_0x3de222(0x61f)](this['_key'],{..._0xd038aa,'ttlMs':_0xd038aa[_0x3de222(0x31c)]+_0x24f08b});else await this[_0x3de222(0x318)][_0x3de222(0x1de)]()[_0x3de222(0x473)](this['_key'],{..._0xd038aa,'ttlMs':_0xd038aa['ttlMs']+_0x24f08b});}catch{}}async['release'](){const _0x1fd7da=_0x13b861;if(this[_0x1fd7da(0x686)])return;if(this[_0x1fd7da(0x3e8)])try{await this[_0x1fd7da(0x3e8)];}catch{}clearInterval(this[_0x1fd7da(0x244)]),this[_0x1fd7da(0x244)]=null,this['_released']=!![];try{const _0x29f7df=this[_0x1fd7da(0x318)][_0x1fd7da(0x1de)]()[_0x1fd7da(0x363)](this[_0x1fd7da(0x5b4)]);if(_0x29f7df&&_0x29f7df[_0x1fd7da(0x2d6)]===this[_0x1fd7da(0x494)]){if(_0x20fc55)this[_0x1fd7da(0x318)][_0x1fd7da(0x1de)]()['removeSync'](this[_0x1fd7da(0x5b4)]);else await this[_0x1fd7da(0x318)][_0x1fd7da(0x1de)]()[_0x1fd7da(0x576)](this[_0x1fd7da(0x5b4)]);}}catch{}}[_0x13b861(0x547)](_0x4136ab,_0x3f2566){const _0x558fd5=_0x13b861,_0x1de0ac=_0x3f2566??Math['floor'](_0x4136ab/0x3);this[_0x558fd5(0x244)]=setInterval(()=>{const _0x3432cf=_0x558fd5;if(this[_0x3432cf(0x686)])return;this['_heartbeatInFlight']=((async()=>{const _0x34fc03=_0x3432cf;try{const _0x29d0fb=this['_lock']['_db']()[_0x34fc03(0x363)](this[_0x34fc03(0x5b4)]);if(!_0x29d0fb||_0x29d0fb['acquiredAt']!==this[_0x34fc03(0x494)]){this[_0x34fc03(0x686)]=!![],clearInterval(this[_0x34fc03(0x244)]),this['_heartbeatTimer']=null;return;}if(_0x20fc55)this['_lock'][_0x34fc03(0x1de)]()['putSync'](this[_0x34fc03(0x5b4)],{..._0x29d0fb,'updatedAt':Date[_0x34fc03(0x4ea)]()});else await this[_0x34fc03(0x318)]['_db']()['put'](this['_key'],{..._0x29d0fb,'updatedAt':Date['now']()});}catch{}this['_heartbeatInFlight']=null;})());},_0x1de0ac);if(this[_0x558fd5(0x244)]['unref'])this['_heartbeatTimer']['unref']();}}class _0x4d2c67{constructor(_0x2bdf84,{namespace:_0x3f3517,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x3309bc=_0x13b861;this[_0x3309bc(0x5d6)]=_0x2bdf84,this['namespace']=_0x3f3517,this[_0x3309bc(0x31c)]=ttlMs,this[_0x3309bc(0x504)]=heartbeatMs,this[_0x3309bc(0x641)]=null;}[_0x13b861(0x1de)](){const _0x1c39a1=_0x13b861;return!this[_0x1c39a1(0x641)]&&(this[_0x1c39a1(0x641)]=this['_rawDb'][_0x1c39a1(0x4d1)](_0x1357c8,{'dupSort':![]})),this[_0x1c39a1(0x641)];}[_0x13b861(0x2d9)](){const _0x3a3da8=_0x13b861;return!this[_0x3a3da8(0x3c3)]&&(this[_0x3a3da8(0x3c3)]=this[_0x3a3da8(0x5d6)]['openDB'](_0x1357c8+_0x3a3da8(0x4c9),{'dupSort':![]})),this[_0x3a3da8(0x3c3)];}[_0x13b861(0x5b4)](_0x16e1c0){const _0x17c945=_0x13b861;return this[_0x17c945(0x40d)]+':'+_0x16e1c0;}[_0x13b861(0x331)](_0x35bb1a){const _0x8e3d8e=_0x13b861;try{_0x20fc55?this[_0x8e3d8e(0x2d9)]()[_0x8e3d8e(0x61f)](this[_0x8e3d8e(0x5b4)](_0x35bb1a),Date[_0x8e3d8e(0x4ea)]()):this[_0x8e3d8e(0x2d9)]()[_0x8e3d8e(0x473)](this[_0x8e3d8e(0x5b4)](_0x35bb1a),Date[_0x8e3d8e(0x4ea)]())?.['catch']?.(()=>{});}catch{}}[_0x13b861(0x315)](_0x11f7ea,_0x19c5ef=0x3e8){const _0x2ea562=_0x13b861;try{const _0x401eb3=this[_0x2ea562(0x2d9)]()[_0x2ea562(0x363)](this[_0x2ea562(0x5b4)](_0x11f7ea));return typeof _0x401eb3==='number'&&Date[_0x2ea562(0x4ea)]()-_0x401eb3<_0x19c5ef;}catch{return![];}}[_0x13b861(0x3f1)](_0x378d4d){const _0x10f672=_0x13b861,_0xf198a9=_0x378d4d[_0x10f672(0x403)]??_0x378d4d[_0x10f672(0x2d6)];return _0xf198a9+_0x378d4d[_0x10f672(0x31c)]<Date[_0x10f672(0x4ea)]();}static['_holderDead'](_0x28eed6){const _0x172aeb=_0x13b861,_0x5538ca=_0x28eed6?.[_0x172aeb(0x20d)];if(!_0x5538ca||typeof _0x5538ca[_0x172aeb(0x250)]!==_0x172aeb(0x68f))return![];if(_0x5538ca[_0x172aeb(0x4e1)]!==_0x2a6643[_0x172aeb(0x4e1)]())return![];if(_0x5538ca[_0x172aeb(0x250)]===process[_0x172aeb(0x250)])return![];try{return process[_0x172aeb(0x442)](_0x5538ca[_0x172aeb(0x250)],0x0),![];}catch(_0x1400b5){return _0x1400b5[_0x172aeb(0x4b8)]==='ESRCH';}}async['tryAcquire'](_0x4e1b88,_0x5bb41a={},_0x2ec731={}){const _0x1fbbf2=_0x13b861,_0xa1f783=this['_key'](_0x4e1b88),_0x25d140=_0x2ec731[_0x1fbbf2(0x31c)]??this[_0x1fbbf2(0x31c)],_0x2efd2f=Date[_0x1fbbf2(0x4ea)](),_0x101e06={'holder':{'pid':process[_0x1fbbf2(0x250)],'hostname':_0x2a6643[_0x1fbbf2(0x4e1)](),..._0x5bb41a},'acquiredAt':_0x2efd2f,'updatedAt':_0x2efd2f,'ttlMs':_0x25d140};let _0x456356=![],_0x6a18ae=null;try{const _0x1bd59f=()=>{const _0x548d07=_0x1fbbf2,_0x4e67be=this[_0x548d07(0x1de)]()['get'](_0xa1f783);if(_0x4e67be&&!this[_0x548d07(0x3f1)](_0x4e67be)&&!_0x4d2c67[_0x548d07(0x4c2)](_0x4e67be)){const _0x262c36=_0x5bb41a[_0x548d07(0x3ff)]!=null&&_0x4e67be[_0x548d07(0x20d)]['pid']===process[_0x548d07(0x250)]&&_0x4e67be[_0x548d07(0x20d)][_0x548d07(0x3ff)]===_0x5bb41a[_0x548d07(0x3ff)];if(!_0x262c36){_0x456356=![],_0x6a18ae=_0x4e67be;return;}_0x101e06[_0x548d07(0x2d6)]<=_0x4e67be[_0x548d07(0x2d6)]&&(_0x101e06[_0x548d07(0x2d6)]=_0x4e67be[_0x548d07(0x2d6)]+0x1,_0x101e06['updatedAt']=_0x101e06[_0x548d07(0x2d6)]);}this[_0x548d07(0x1de)]()[_0x548d07(0x473)](_0xa1f783,_0x101e06),_0x456356=!![],_0x6a18ae=_0x101e06;};if(_0x20fc55)this[_0x1fbbf2(0x1de)]()[_0x1fbbf2(0x5d2)](_0x1bd59f);else await this[_0x1fbbf2(0x1de)]()[_0x1fbbf2(0x2f7)](_0x1bd59f);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x456356)return{'acquired':![],'handle':null,'current':_0x6a18ae};const _0x4529aa=new _0x33abb5(this,_0xa1f783,_0x101e06[_0x1fbbf2(0x2d6)]);return _0x4529aa['_startHeartbeat'](_0x25d140,this[_0x1fbbf2(0x504)]),{'acquired':!![],'handle':_0x4529aa,'current':_0x6a18ae};}['inspect'](_0x41a090){const _0x443c8b=_0x13b861;try{return this[_0x443c8b(0x1de)]()[_0x443c8b(0x363)](this[_0x443c8b(0x5b4)](_0x41a090))??null;}catch{return null;}}[_0x13b861(0x690)](){const _0x544796=_0x13b861,_0x1f9390=this[_0x544796(0x40d)]+':',_0x1f506b=[];try{for(const {key:_0x3387e1,value:_0x2b6b1e}of this[_0x544796(0x1de)]()[_0x544796(0x698)]({'start':_0x1f9390,'end':_0x1f9390+'ÿ'})){typeof _0x3387e1===_0x544796(0x355)&&_0x3387e1[_0x544796(0x39c)](_0x1f9390)&&_0x1f506b[_0x544796(0x5fa)]({'id':_0x3387e1['slice'](_0x1f9390[_0x544796(0x631)]),'entry':_0x2b6b1e});}}catch{}return _0x1f506b;}static[_0x13b861(0x2a3)](_0x4228ef){const _0x308327=_0x13b861,_0x3160c4=[];try{const _0xea4b23=_0x4228ef[_0x308327(0x4d1)](_0x1357c8,{'dupSort':![]});for(const {key:_0x5f40ad,value:_0x1e94b5}of _0xea4b23[_0x308327(0x698)]({})){if(typeof _0x5f40ad!==_0x308327(0x355))continue;const _0x2390df=_0x5f40ad[_0x308327(0x587)](':');if(_0x2390df<0x1)continue;_0x3160c4[_0x308327(0x5fa)]({'namespace':_0x5f40ad['slice'](0x0,_0x2390df),'id':_0x5f40ad[_0x308327(0x608)](_0x2390df+0x1),'entry':_0x1e94b5});}}catch{}return _0x3160c4;}}return okdbLock={'OKDBLock':_0x4d2c67},okdbLock;}var okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x2abca6=_0x42e206;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x1d68a6=require$$0,_0x358dcc=require$$1$2,_0x5d2613=require$$0$1,{LOOP:_0xf9a4e4}=requireOkdbLoopMonitor(),{OKDBLock:_0x1b97b8}=requireOkdbLock(),{SYNC_COMMITS:_0x28292d}=requireOkdbWriter(),_0x2d9299=_0x2abca6(0x3c0),_0x11509d=_0x2abca6(0x5dc),_0xf981bc=_0x2abca6(0x477),_0x4f792f=_0x2abca6(0x3a7),_0x4eb881=(_0x39d049,_0x2edb4f)=>_0x39d049+':'+_0x2edb4f,_0x24edd4=(_0x514c91,_0x2c10fc)=>_0x514c91+'::'+_0x2c10fc,_0x18169a=(_0x24453e,_0x1690db)=>_0x24453e+'/'+_0x1690db,_0x2af523=(_0x3ec0c3,_0xa21d7a)=>_0x3ec0c3+'#'+_0xa21d7a,_0x39989=_0x3cc9b3=>{const _0x3ec331=_0x2abca6;if(_0x3cc9b3?.[_0x3ec331(0x1f5)])return _0x3cc9b3['processKey'];const _0x465e80=_0x3cc9b3?.['nodeKey'];return typeof _0x465e80===_0x3ec331(0x355)&&_0x465e80[_0x3ec331(0x3be)]('#')?_0x465e80[_0x3ec331(0x608)](0x0,_0x465e80[_0x3ec331(0x587)]('#')):_0x465e80;},_0x3cfa14=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x3023d7=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x2786f2=_0x3cfa14*0x3,_0x2e5957=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math[_0x2abca6(0x555)](0x927c0,_0x2786f2*0x14),_0x31e02c=[_0x2abca6(0x29b),_0x2abca6(0x300),_0x2abca6(0x684),_0x2abca6(0x676),'processor:paused',_0x2abca6(0x540)];let _0x156045=null;function _0x1a8d2b(){const _0x2c18d2=_0x2abca6;if(_0x156045==null)_0x156045=Math[_0x2c18d2(0x2fb)]((Date[_0x2c18d2(0x4ea)]()-process[_0x2c18d2(0x46c)]()*0x3e8)/0x3e8)*0x3e8;return _0x156045;}function _0x593760(_0x2321c6){const _0x2aefcf=_0x2abca6;if(process.env.OKDB_PROCESS_KILL===_0x2aefcf(0x4fa))return![];if(_0x2321c6?.[_0x2aefcf(0x33f)]?.[_0x2aefcf(0x5e6)]&&typeof _0x2321c6[_0x2aefcf(0x33f)]['processes']===_0x2aefcf(0x5c0)&&_0x2321c6[_0x2aefcf(0x33f)][_0x2aefcf(0x5e6)][_0x2aefcf(0x442)]===![])return![];return!![];}function _0x1446c4(_0xd07fde,_0xf0eb14){const _0xdc4256=_0x2abca6,_0x1cb5e9=!!_0xf0eb14?.[_0xdc4256(0x32d)];switch(_0xd07fde){case _0xdc4256(0x2f2):return{'controllable':_0x1cb5e9,'decommissionable':![],'killable':!![],'killConfirm':'cluster-wide'};case _0xdc4256(0x4e9):case _0xdc4256(0x548):return{'controllable':_0x1cb5e9,'decommissionable':![],'killable':!![],'killConfirm':_0xdc4256(0x629)};case _0xdc4256(0x426):return{'controllable':![],'decommissionable':![],'killable':![]};case _0xdc4256(0x590):case'queue-worker':case _0xdc4256(0x664):case _0xdc4256(0x2cd):return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':_0xdc4256(0x50c)};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x3d0ed1{constructor(_0xaf6381){const _0x5d7ff3=_0x2abca6;this[_0x5d7ff3(0x209)]=_0xaf6381,this[_0x5d7ff3(0x306)]=null,this[_0x5d7ff3(0x536)]=null,this[_0x5d7ff3(0x682)]=new Map(),this[_0x5d7ff3(0x5cc)]=null,this[_0x5d7ff3(0x4b5)]=![],this[_0x5d7ff3(0x366)]=![],this['_processStartedAt']=_0x1a8d2b(),this['_selfKey']=_0x4eb881(process[_0x5d7ff3(0x250)],this[_0x5d7ff3(0x397)]),this[_0x5d7ff3(0x654)]=_0x5d2613[_0x5d7ff3(0x60c)]()[_0x5d7ff3(0x608)](0x0,0x8),this['_rowKey']=_0x2af523(this['_selfKey'],this[_0x5d7ff3(0x654)]),this[_0x5d7ff3(0x31d)]=Date[_0x5d7ff3(0x4ea)](),this[_0x5d7ff3(0x61b)]=null,this[_0x5d7ff3(0x498)]=null,this[_0x5d7ff3(0x1ed)]=null,this['_hbTimer']=null,this[_0x5d7ff3(0x274)]=null,this[_0x5d7ff3(0x3ab)]=null,this[_0x5d7ff3(0x3da)]=0x0,this[_0x5d7ff3(0x298)]={},this[_0x5d7ff3(0x3e9)]=new Map(),this[_0x5d7ff3(0x470)]=process[_0x5d7ff3(0x4ca)](),this[_0x5d7ff3(0x31e)]=Date[_0x5d7ff3(0x4ea)](),this[_0x5d7ff3(0x496)]=0x0,this[_0x5d7ff3(0x2e0)]=new Map();}get[_0x2abca6(0x38e)](){const _0x2b9149=_0x2abca6;return this[_0x2b9149(0x6a8)];}get[_0x2abca6(0x2c5)](){return this['_rowKey'];}[_0x2abca6(0x27d)](_0x3b9235,_0x110371){const _0x37fdaf=_0x2abca6,_0x583a21=_0x1446c4(_0x3b9235,_0x110371);if(_0x583a21[_0x37fdaf(0x49c)]&&!_0x593760(this[_0x37fdaf(0x209)]))return{..._0x583a21,'killable':![],'killConfirm':undefined};return _0x583a21;}['isActive'](){const _0x16831f=_0x2abca6;return!!this[_0x16831f(0x306)];}[_0x2abca6(0x42f)](_0xb1bfa5){const _0x1d2a2f=_0x2abca6;Object[_0x1d2a2f(0x524)](this['_ownMeta'],_0xb1bfa5||{});}[_0x2abca6(0x3df)](_0x4a1779){const _0x4187df=_0x2abca6;if(_0x4a1779)this[_0x4187df(0x1ed)]=_0x4a1779;}[_0x2abca6(0x214)](_0x59265a={}){return this['okdb']['_activateProcesses'](_0x59265a);}[_0x2abca6(0x3a2)](){const _0xe2f735=_0x2abca6,_0x54c110={};let _0x13ba9a=0x0,_0xecdbd9=0x0;const _0x2bb0b0=new Set();for(const _0x5f2e65 of this[_0xe2f735(0x356)]()){_0xecdbd9++;const _0x479a7f=_0x5f2e65['processing'];if(!_0x479a7f)continue;if(_0x479a7f[_0xe2f735(0x282)])_0x13ba9a++;for(const _0xbfa34a of _0x479a7f['processors']||[]){if(![_0xe2f735(0x51e),_0xe2f735(0x3dc)][_0xe2f735(0x3be)](_0xbfa34a[_0xe2f735(0x50b)]))continue;(_0xbfa34a['state']===_0xe2f735(0x337)||_0xbfa34a['state']===_0xe2f735(0x531))&&_0xbfa34a['cursorKey']&&_0x2bb0b0['add']((_0xbfa34a[_0xe2f735(0x35e)]||'default')+':'+_0xbfa34a[_0xe2f735(0x603)]);const _0x368d9e=_0xbfa34a[_0xe2f735(0x35e)]||_0xe2f735(0x678);(_0x54c110[_0x368d9e]||=[])[_0xe2f735(0x5fa)]({..._0xbfa34a,'env':_0x368d9e,'owner':{'pid':_0x5f2e65[_0xe2f735(0x250)]??null,'kind':_0x5f2e65[_0xe2f735(0x523)]??null}});}}for(const [_0x565819,_0x11a902]of Object[_0xe2f735(0x699)](_0x54c110)){for(const _0x1fb30d of _0x11a902){if(_0x1fb30d[_0xe2f735(0x50b)]===_0xe2f735(0x51e)&&!_0x1fb30d['claimGated']){const _0x31bc51=_0x565819+':'+(_0x1fb30d['cursorKey']??'');if(!_0x2bb0b0['has'](_0x31bc51))_0x1fb30d['unclaimed']=!![];}}}return{'envs':_0x54c110,'policy':null,'participation':{'participating':_0x13ba9a,'total':_0xecdbd9},'source':_0xe2f735(0x284)};}[_0x2abca6(0x25c)](){const _0x5360a3=_0x2abca6,_0x5f0bce=_0x31af6e=>{const _0x174aa7=_0x4d7d;if(_0x31af6e[_0x174aa7(0x4d6)]===_0x174aa7(0x337)||_0x31af6e[_0x174aa7(0x4d6)]===_0x174aa7(0x531)||_0x31af6e['state']===_0x174aa7(0x2e5))return 0x3;if(_0x31af6e[_0x174aa7(0x68d)])return 0x1;return 0x2;},_0x51ad2b=new Map();for(const _0xfd6d0f of this['listNodes']()){for(const _0x1f3bcc of _0xfd6d0f[_0x5360a3(0x407)]?.[_0x5360a3(0x32d)]||[]){const _0xf1b77={..._0x1f3bcc,'owner':{'pid':_0xfd6d0f[_0x5360a3(0x250)]??null,'kind':_0xfd6d0f[_0x5360a3(0x523)]??null,'host':_0xfd6d0f[_0x5360a3(0x63c)]??null}},_0x22ef66=_0x1f3bcc[_0x5360a3(0x50b)]==='single'?_0x5360a3(0x476)+(_0x1f3bcc['env']??'')+'::'+(_0x1f3bcc['cursorKey']??_0x1f3bcc['type']??_0x1f3bcc['id']):_0x5360a3(0x463)+(_0xfd6d0f[_0x5360a3(0x455)]??_0xfd6d0f[_0x5360a3(0x1f5)]??'')+'::'+(_0x1f3bcc['env']??'')+'::'+_0x1f3bcc['id'],_0x3d8a12=_0x51ad2b[_0x5360a3(0x363)](_0x22ef66);if(!_0x3d8a12||_0x5f0bce(_0xf1b77)>_0x5f0bce(_0x3d8a12))_0x51ad2b['set'](_0x22ef66,_0xf1b77);}}return[..._0x51ad2b[_0x5360a3(0x413)]()];}[_0x2abca6(0x1e4)](){const _0x5aacbe=_0x2abca6,_0x15377a=Date[_0x5aacbe(0x4ea)](),_0xcc08d8=this[_0x5aacbe(0x356)](),_0x1dc12d=_0x25ddb7=>Math[_0x5aacbe(0x555)](0x0,Math['round']((_0x15377a-(_0x25ddb7[_0x5aacbe(0x1ff)]||_0x15377a))/0x3e8)),_0x385b81=_0xcc08d8[_0x5aacbe(0x369)](_0x47ac8a=>_0x47ac8a['kind']===_0x5aacbe(0x2f2)),_0x42b522=_0xcc08d8[_0x5aacbe(0x4e0)](_0x334ff5=>_0x334ff5['kind']==='http-server');if(_0x385b81||_0x42b522[_0x5aacbe(0x631)])return{'primary':_0x385b81?{'pid':_0x385b81[_0x5aacbe(0x250)],'uptime':_0x1dc12d(_0x385b81)}:null,'workers':_0x42b522[_0x5aacbe(0x272)](_0x4f7b46=>({'pid':_0x4f7b46[_0x5aacbe(0x250)],'uptime':_0x1dc12d(_0x4f7b46)})),'workersConfigured':_0x385b81?.[_0x5aacbe(0x208)]?.['workersConfigured']??_0x42b522[_0x5aacbe(0x631)],'mode':_0x5aacbe(0x409)};const _0x392ff2=_0xcc08d8[_0x5aacbe(0x369)](_0x3aa00e=>_0x3aa00e[_0x5aacbe(0x523)]===_0x5aacbe(0x4e9)||_0x3aa00e[_0x5aacbe(0x523)]===_0x5aacbe(0x548)||_0x3aa00e['kind']==='embedded'),_0x17556e=_0x392ff2?{'pid':_0x392ff2['pid'],'uptime':_0x1dc12d(_0x392ff2)}:{'pid':process['pid'],'uptime':Math[_0x5aacbe(0x555)](0x0,Math[_0x5aacbe(0x2fb)](process[_0x5aacbe(0x46c)]()))};return{'primary':_0x17556e,'workers':[_0x17556e],'workersConfigured':0x1,'mode':_0x5aacbe(0x51e)};}[_0x2abca6(0x4b2)](){const _0x1c32fb=_0x2abca6;return this[_0x1c32fb(0x1f3)]();}[_0x2abca6(0x643)](){const _0x378bbc=_0x2abca6,_0x262c5b=new Map();for(const _0x409671 of this[_0x378bbc(0x1f3)]())_0x262c5b[_0x378bbc(0x452)](_0x409671['processKey'],{..._0x409671,'children':[]});const _0x30e606=[];for(const _0x43338e of _0x262c5b[_0x378bbc(0x413)]()){const _0x30a03c=_0x43338e[_0x378bbc(0x3b8)]?_0x262c5b[_0x378bbc(0x363)](_0x43338e[_0x378bbc(0x3b8)]):null;if(_0x30a03c&&_0x30a03c!==_0x43338e)_0x30a03c['children'][_0x378bbc(0x5fa)](_0x43338e);else _0x30e606[_0x378bbc(0x5fa)](_0x43338e);}const _0x5df047=(_0xcd634e,_0x431e6a)=>_0xcd634e[_0x378bbc(0x523)]===_0x431e6a[_0x378bbc(0x523)]?(_0xcd634e[_0x378bbc(0x250)]||0x0)-(_0x431e6a[_0x378bbc(0x250)]||0x0):(_0xcd634e[_0x378bbc(0x523)]??'')<(_0x431e6a['kind']??'')?-0x1:0x1,_0x3e8da3=_0x3a6f7f=>{const _0x398514=_0x378bbc;_0x3a6f7f['sort'](_0x5df047);for(const _0x597e37 of _0x3a6f7f)if(_0x597e37[_0x398514(0x694)]['length'])_0x3e8da3(_0x597e37[_0x398514(0x694)]);};return _0x3e8da3(_0x30e606),_0x30e606;}[_0x2abca6(0x4b1)](_0x5ec8f6){const _0x3d849e=_0x2abca6;return this[_0x3d849e(0x1f3)]()[_0x3d849e(0x369)](_0x519f24=>_0x519f24[_0x3d849e(0x1f5)]===_0x5ec8f6)??null;}['_groupByProcess'](_0x2a7c7f=Date[_0x2abca6(0x4ea)]()){const _0xe6b69d=_0x2abca6,_0x272096=new Map();for(const _0x5a774c of this[_0xe6b69d(0x356)]()){const _0x3f3524=_0x39989(_0x5a774c);let _0x1d76c3=_0x272096[_0xe6b69d(0x363)](_0x3f3524);!_0x1d76c3&&(_0x1d76c3={'processKey':_0x3f3524,'nodeKey':_0x3f3524,'pid':_0x5a774c[_0xe6b69d(0x250)],'ppid':_0x5a774c['ppid']??null,'host':_0x5a774c[_0xe6b69d(0x63c)]??null,'kind':_0x5a774c[_0xe6b69d(0x523)],'role':null,'supervisorKey':_0x5a774c[_0xe6b69d(0x3b8)]??null,'slot':_0x5a774c[_0xe6b69d(0x5c8)]??null,'slotKey':_0x5a774c[_0xe6b69d(0x31f)]??null,'caps':_0x5a774c[_0xe6b69d(0x500)]??null,'lifecycle':_0x5a774c[_0xe6b69d(0x1dd)]??null,'uptime':Math['max'](0x0,Math['round']((_0x2a7c7f-(_0x5a774c[_0xe6b69d(0x1ff)]||_0x2a7c7f))/0x3e8)),'startedAt':_0x5a774c[_0xe6b69d(0x1ff)]??null,'meta':_0x5a774c[_0xe6b69d(0x208)]??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x272096['set'](_0x3f3524,_0x1d76c3));_0x1d76c3['instances'][_0xe6b69d(0x5fa)]({'instanceId':_0x5a774c['instanceId']??null,'role':_0x5a774c[_0xe6b69d(0x269)]??null,'listenAddr':_0x5a774c[_0xe6b69d(0x4eb)]??null,'lifecycle':_0x5a774c['lifecycle']??null,'processing':_0x5a774c['processing']??null});if(!_0x1d76c3[_0xe6b69d(0x269)]&&_0x5a774c[_0xe6b69d(0x269)])_0x1d76c3[_0xe6b69d(0x269)]=_0x5a774c[_0xe6b69d(0x269)];if(!_0x1d76c3[_0xe6b69d(0x4eb)]&&_0x5a774c['listenAddr'])_0x1d76c3[_0xe6b69d(0x4eb)]=_0x5a774c['listenAddr'];if(!_0x1d76c3[_0xe6b69d(0x407)]&&_0x5a774c['processing'])_0x1d76c3[_0xe6b69d(0x407)]=_0x5a774c['processing'];if(!_0x1d76c3[_0xe6b69d(0x252)]&&_0x5a774c['engines'])_0x1d76c3[_0xe6b69d(0x252)]=_0x5a774c[_0xe6b69d(0x252)];if(!_0x1d76c3[_0xe6b69d(0x1e1)]&&_0x5a774c['singletonClaims'])_0x1d76c3[_0xe6b69d(0x1e1)]=_0x5a774c[_0xe6b69d(0x1e1)];if(_0x1d76c3[_0xe6b69d(0x500)]==null&&_0x5a774c['caps'])_0x1d76c3['caps']=_0x5a774c[_0xe6b69d(0x500)];if(_0x5a774c['stats']&&(!_0x1d76c3[_0xe6b69d(0x521)]||(_0x5a774c[_0xe6b69d(0x521)]['at']??0x0)>(_0x1d76c3[_0xe6b69d(0x521)]['at']??0x0)))_0x1d76c3[_0xe6b69d(0x521)]=_0x5a774c[_0xe6b69d(0x521)];}return[..._0x272096[_0xe6b69d(0x413)]()];}['runtimeProcessesView'](){const _0x1c7da8=_0x2abca6,_0x103639=[],_0x10e2d0={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x2884c8 of this[_0x1c7da8(0x1f3)]()){_0x103639[_0x1c7da8(0x5fa)]({'processKey':_0x2884c8['processKey'],'kind':_0x2884c8[_0x1c7da8(0x523)],'pid':_0x2884c8[_0x1c7da8(0x250)],'supervisorKey':_0x2884c8[_0x1c7da8(0x3b8)],'meta':_0x2884c8[_0x1c7da8(0x208)]??null,'uptime':_0x2884c8[_0x1c7da8(0x46c)],'stats':_0x2884c8[_0x1c7da8(0x521)]??null}),_0x10e2d0[_0x1c7da8(0x5e6)]++;if(_0x2884c8[_0x1c7da8(0x521)]){_0x10e2d0[_0x1c7da8(0x2d3)]+=_0x2884c8[_0x1c7da8(0x521)][_0x1c7da8(0x2d3)]||0x0,_0x10e2d0[_0x1c7da8(0x561)]+=(_0x2884c8[_0x1c7da8(0x521)][_0x1c7da8(0x561)]||0x0)+(_0x2884c8[_0x1c7da8(0x521)]['threads']?.[_0x1c7da8(0x561)]||0x0);const _0x32258f=_0x2884c8[_0x1c7da8(0x521)][_0x1c7da8(0x4f9)];_0x32258f&&(_0x10e2d0[_0x1c7da8(0x4f9)][_0x1c7da8(0x2d8)]+=_0x32258f['count']||0x0,_0x10e2d0[_0x1c7da8(0x4f9)][_0x1c7da8(0x1e7)]+=_0x32258f[_0x1c7da8(0x1e7)]||0x0,_0x10e2d0[_0x1c7da8(0x4f9)][_0x1c7da8(0x614)]+=_0x32258f[_0x1c7da8(0x614)]||0x0);}}return{'totals':_0x10e2d0,'nodes':_0x103639};}async[_0x2abca6(0x1db)]({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x4ee014=_0x2abca6;this[_0x4ee014(0x4b5)]=this[_0x4ee014(0x4b5)]||!!writer,this[_0x4ee014(0x366)]=this['_isReader']||!!reader,this[_0x4ee014(0x61b)]=kind||this['_kind']||(_0x358dcc['isWorker']?_0x4ee014(0x590):'cli'),this['_supervisorKey']=supervisorKey??this[_0x4ee014(0x498)],this['_listenAddr']=listenAddr??this[_0x4ee014(0x1ed)],this['_ensureDesired'](),await this['_migrateVocab']();if(!writer&&!reader)return null;if(!this[_0x4ee014(0x306)]){const _0x263376=await this['okdb'][_0x4ee014(0x27f)](_0x2d9299,{'sync':![],'durability':_0x4ee014(0x2de)});if(!_0x263376['hasType'](_0x11509d))await _0x263376[_0x4ee014(0x206)](_0x11509d);this[_0x4ee014(0x306)]=_0x263376;}return this[_0x4ee014(0x306)];}[_0x2abca6(0x2ef)](){const _0x3783c1=_0x2abca6;return this[_0x3783c1(0x2e2)]!==this['_statusEnv']&&(this[_0x3783c1(0x2e2)]=this[_0x3783c1(0x306)],this[_0x3783c1(0x220)]=this['_statusEnv'][_0x3783c1(0x558)](_0x11509d)[_0x3783c1(0x207)]),this[_0x3783c1(0x220)];}[_0x2abca6(0x5b2)](_0x217b38){const _0xb53aad=_0x2abca6;if(_0x28292d)return this[_0xb53aad(0x2ef)]()[_0xb53aad(0x61f)](_0x217b38[_0xb53aad(0x455)],_0x217b38,0x1);const _0x4167b0=this[_0xb53aad(0x2ef)]()['put'](_0x217b38[_0xb53aad(0x455)],_0x217b38,0x1);if(_0x4167b0&&typeof _0x4167b0[_0xb53aad(0x22f)]==='function')_0x4167b0[_0xb53aad(0x22f)](undefined,()=>{});return _0x4167b0;}['_putRowSync'](_0x5c54b2){const _0x5b2fff=_0x2abca6;return this[_0x5b2fff(0x2ef)]()[_0x5b2fff(0x61f)](_0x5c54b2['nodeKey'],_0x5c54b2,0x1);}[_0x2abca6(0x310)](_0x13a750){const _0x49dba1=_0x2abca6;if(_0x28292d)try{return this['_nodeDb']()['removeSync'](_0x13a750);}catch{return![];}const _0x563fc3=this['_nodeDb']()[_0x49dba1(0x576)](_0x13a750);if(_0x563fc3&&typeof _0x563fc3[_0x49dba1(0x22f)]==='function')_0x563fc3['then'](undefined,()=>{});return _0x563fc3;}async['putNode'](_0x32e837){const _0x34fe96=_0x2abca6;if(!this[_0x34fe96(0x306)]||!this[_0x34fe96(0x4b5)]||!_0x32e837?.[_0x34fe96(0x455)])return;return this['_putRowAsync'](_0x32e837);}async[_0x2abca6(0x589)](_0x37ad2a){const _0x4c5c79=_0x2abca6;if(!this[_0x4c5c79(0x306)]||!this[_0x4c5c79(0x4b5)]||!_0x37ad2a)return;const _0x1d15eb=_0x37ad2a[_0x4c5c79(0x3be)]('#'),_0x7c3eb=[];for(const {key:_0x2b121c}of this[_0x4c5c79(0x306)][_0x4c5c79(0x698)](_0x11509d)){if(_0x2b121c===_0x37ad2a||!_0x1d15eb&&typeof _0x2b121c==='string'&&_0x2b121c[_0x4c5c79(0x39c)](_0x37ad2a+'#'))_0x7c3eb[_0x4c5c79(0x5fa)](_0x2b121c);}for(const _0x389e60 of _0x7c3eb){try{this['_nodeDb']()['removeSync'](_0x389e60);}catch{}}}[_0x2abca6(0x634)](_0x2bc689){const _0x1b8953=_0x2abca6;if(typeof _0x2bc689?.[_0x1b8953(0x250)]!=='number')return![];if(_0x2bc689[_0x1b8953(0x63c)]!==_0x1d68a6[_0x1b8953(0x4e1)]())return![];if(_0x2bc689[_0x1b8953(0x250)]===process[_0x1b8953(0x250)])return![];if(_0x2bc689[_0x1b8953(0x5f5)]!=null&&_0x2bc689[_0x1b8953(0x5f5)]<Date['now']()-_0x2e5957)return!![];try{return process[_0x1b8953(0x442)](_0x2bc689['pid'],0x0),![];}catch(_0x100631){return _0x100631['code']===_0x1b8953(0x2fa);}}[_0x2abca6(0x356)](){const _0x11998e=_0x2abca6;if(!this[_0x11998e(0x306)])return[];try{this[_0x11998e(0x306)]['db']?.[_0x11998e(0x662)]?.();}catch{}const _0xb0b010=Date[_0x11998e(0x4ea)](),_0x494dce=_0x1d68a6[_0x11998e(0x4e1)](),_0x1a6250=[];for(const {value:_0x14ffe5}of this[_0x11998e(0x306)]['getRange'](_0x11509d)){if(!_0x14ffe5)continue;let _0x2037f9=null;_0x14ffe5['host']===_0x494dce&&typeof _0x14ffe5[_0x11998e(0x250)]===_0x11998e(0x68f)&&(_0x2037f9=!this[_0x11998e(0x634)](_0x14ffe5));if(_0x2037f9===![])continue;const _0x413da9=_0x14ffe5[_0x11998e(0x5f5)]==null||_0x14ffe5[_0x11998e(0x5f5)]>=_0xb0b010;if(_0x2037f9===!![]||_0x413da9)_0x1a6250[_0x11998e(0x5fa)](_0x14ffe5);}return _0x1a6250;}async['reap'](_0x51db31=0x0){const _0x3a292b=_0x2abca6;if(!this[_0x3a292b(0x306)]||!this[_0x3a292b(0x4b5)])return;const _0x2c735e=Date[_0x3a292b(0x4ea)]()-_0x51db31,_0x32883b=new Set(),_0x47571b=[],_0x8ad641=_0x1d68a6['hostname']();for(const {key:_0x2f3168,value:_0x34ee6a}of this[_0x3a292b(0x306)]['getRange'](_0x11509d)){if(!_0x34ee6a)continue;const _0x2ad41e=_0x34ee6a[_0x3a292b(0x63c)]===_0x8ad641&&typeof _0x34ee6a['pid']===_0x3a292b(0x68f),_0x486b5a=_0x2ad41e?this[_0x3a292b(0x634)](_0x34ee6a):_0x34ee6a[_0x3a292b(0x5f5)]!=null&&_0x34ee6a[_0x3a292b(0x5f5)]<_0x2c735e;if(_0x486b5a)_0x47571b['push'](_0x2f3168);else _0x32883b[_0x3a292b(0x637)](_0x39989(_0x34ee6a)??_0x2f3168);}for(const _0x558312 of _0x47571b)this[_0x3a292b(0x310)](_0x558312);if(this[_0x3a292b(0x683)]()){const _0x50d324=[];for(const {key:_0x40b7a3}of this['listDesired'](_0x3a292b(0x5dc))){if(!_0x32883b[_0x3a292b(0x258)](_0x40b7a3)){if(_0x28292d)try{this[_0x3a292b(0x536)][_0x3a292b(0x62b)](_0x3a292b(0x290)+_0x40b7a3);}catch{}else _0x50d324[_0x3a292b(0x5fa)](this[_0x3a292b(0x536)][_0x3a292b(0x576)]('node/'+_0x40b7a3));}}if(_0x50d324[_0x3a292b(0x631)])await Promise[_0x3a292b(0x37d)](_0x50d324);}}[_0x2abca6(0x675)](_0x2bff12=null){const _0x31019b=_0x2abca6;if(this[_0x31019b(0x495)])return;if(!this[_0x31019b(0x4b5)]||!this[_0x31019b(0x306)]){this[_0x31019b(0x209)]?.['log']?.[_0x31019b(0x316)]?.('registry\x20heartbeat\x20skipped\x20(writer='+this['_isWriter']+_0x31019b(0x475)+!!this['_statusEnv']+')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census',{'feature':_0x31019b(0x5e6)});return;}this[_0x31019b(0x3ab)]=_0x2bff12,this[_0x31019b(0x274)]=()=>this[_0x31019b(0x670)]();for(const _0xb4f39d of _0x31e02c)this[_0x31019b(0x209)][_0x31019b(0x2b2)]['on'](_0xb4f39d,this['_onProcEvent']);this[_0x31019b(0x34b)]();const _0x2f0b2e=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x3cfa14;this[_0x31019b(0x495)]=setInterval(()=>{const _0x429cc4=_0x31019b;if(this[_0x429cc4(0x3ab)])try{this[_0x429cc4(0x3ab)]();}catch{}this[_0x429cc4(0x34b)](),this['reap']()[_0x429cc4(0x45b)](()=>{});},_0x2f0b2e);if(this[_0x31019b(0x495)][_0x31019b(0x4bd)])this[_0x31019b(0x495)][_0x31019b(0x4bd)]();}['_maybePublish'](){const _0x50170a=_0x2abca6;if(!this[_0x50170a(0x4b5)]||!this[_0x50170a(0x306)])return;if(Date[_0x50170a(0x4ea)]()-this[_0x50170a(0x3da)]<_0x3023d7)return;this[_0x50170a(0x34b)]();}[_0x2abca6(0x34b)](){const _0x1d1550=_0x2abca6;if(!this[_0x1d1550(0x4b5)]||!this[_0x1d1550(0x306)])return;this[_0x1d1550(0x3da)]=Date['now']();try{const _0x1a77b1=[this['_buildOwnRow']()];for(const _0x398859 of this[_0x1d1550(0x3e9)]['values']())_0x1a77b1[_0x1d1550(0x5fa)](this[_0x1d1550(0x462)](_0x398859));const _0x19c3f6=_0xf9a4e4[_0x1d1550(0x3ce)]?_0xf9a4e4[_0x1d1550(0x4ea)]():0x0;for(const _0x21caad of _0x1a77b1){try{this[_0x1d1550(0x26c)](_0x21caad),this[_0x1d1550(0x5c7)]=![];}catch(_0x4309d7){!this[_0x1d1550(0x5c7)]&&(this[_0x1d1550(0x5c7)]=!![],this[_0x1d1550(0x209)]?.[_0x1d1550(0x6a0)]?.[_0x1d1550(0x316)]?.('registry\x20publish\x20failing:\x20'+_0x4309d7[_0x1d1550(0x62d)],{'feature':_0x1d1550(0x5e6)}));}}if(_0xf9a4e4[_0x1d1550(0x3ce)])_0xf9a4e4['note']('registry-publish',_0xf9a4e4[_0x1d1550(0x4ea)]()-_0x19c3f6,_0x1d1550(0x5ab)+_0x1a77b1[_0x1d1550(0x631)]+_0x1d1550(0x259));}catch(_0xf6da5b){!this[_0x1d1550(0x5c7)]&&(this[_0x1d1550(0x5c7)]=!![],this['okdb']?.[_0x1d1550(0x6a0)]?.[_0x1d1550(0x316)]?.(_0x1d1550(0x5df)+_0xf6da5b[_0x1d1550(0x62d)],{'feature':'processes'}));}}async['stopHeartbeat'](){const _0x2a22d0=_0x2abca6;if(this[_0x2a22d0(0x274)]){for(const _0x884b97 of _0x31e02c){try{this[_0x2a22d0(0x209)]['events'][_0x2a22d0(0x4fa)](_0x884b97,this[_0x2a22d0(0x274)]);}catch{}}this[_0x2a22d0(0x274)]=null;}this['_hbTimer']&&(clearInterval(this[_0x2a22d0(0x495)]),this['_hbTimer']=null);try{if(this['_statusEnv']&&this[_0x2a22d0(0x4b5)])await this[_0x2a22d0(0x589)](this['_rowKey']);}catch{}}async[_0x2abca6(0x3a8)](){const _0x4df451=_0x2abca6;if(!this['_statusEnv']||!this['_isWriter'])return;try{await this[_0x4df451(0x589)](this[_0x4df451(0x55a)]);}catch{}try{const _0x367285=[];for(const {value:_0xec1eaf}of this[_0x4df451(0x306)][_0x4df451(0x698)](_0x11509d)){if(_0xec1eaf?.['ppid']===process[_0x4df451(0x250)]&&_0xec1eaf[_0x4df451(0x455)])_0x367285['push'](_0xec1eaf[_0x4df451(0x455)]);}for(const _0x4e9213 of _0x367285){try{await this[_0x4df451(0x589)](_0x4e9213);}catch{}}}catch{}}async[_0x2abca6(0x4cd)](){const _0x3edc41=_0x2abca6;return this[_0x3edc41(0x2af)](this['_buildOwnRow']());}async[_0x2abca6(0x444)](_0x3f922e){const _0x33ad6f=_0x2abca6;if(!this[_0x33ad6f(0x306)]||!this['_isWriter'])return;return this[_0x33ad6f(0x2af)](this[_0x33ad6f(0x462)](_0x3f922e));}[_0x2abca6(0x462)]({pid:_0x51bdf5,startedAt:_0x2976f9,kind:_0x1d295a,supervisorKey:_0x2aea8f,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0x2abca6(0x5fb),meta:meta=null,stats:stats=null}){const _0x17d7a9=_0x2abca6,_0x2a115e=Date[_0x17d7a9(0x4ea)](),_0xfea973=_0x4eb881(_0x51bdf5,_0x2976f9);return{'nodeKey':_0x2af523(_0xfea973,'0'),'processKey':_0xfea973,'instanceId':'0','pid':_0x51bdf5,'startedAt':_0x2976f9,'ppid':process[_0x17d7a9(0x250)],'host':_0x1d68a6[_0x17d7a9(0x4e1)](),'supervisorKey':_0x2aea8f,'slot':slot,'slotKey':slotKey,'kind':_0x1d295a,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x2a115e,'expiresAt':_0x2a115e+_0x2786f2,'caps':this['_caps'](_0x1d295a,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0x2abca6(0x4d0)](_0x1cc33){const _0x3b6c4d=_0x2abca6;if(!_0x1cc33?.['pid'])return null;const _0x5a6d3e=_0x4eb881(_0x1cc33[_0x3b6c4d(0x250)],_0x1cc33[_0x3b6c4d(0x1ff)]);this[_0x3b6c4d(0x3e9)][_0x3b6c4d(0x452)](_0x5a6d3e,{..._0x1cc33,'supervisorKey':_0x1cc33[_0x3b6c4d(0x3b8)]??this[_0x3b6c4d(0x6a8)]});if(this[_0x3b6c4d(0x4b5)])await this[_0x3b6c4d(0x444)](this[_0x3b6c4d(0x3e9)][_0x3b6c4d(0x363)](_0x5a6d3e))['catch']?.(()=>{});return _0x5a6d3e;}[_0x2abca6(0x4c4)](_0x1f8442){const _0x50ad50=_0x2abca6;if(!_0x1f8442)return;return this[_0x50ad50(0x3e9)]['delete'](_0x1f8442),this[_0x50ad50(0x589)](_0x1f8442);}['_sampleOwnStats'](){const _0x109f72=_0x2abca6,_0x5593ac=Date[_0x109f72(0x4ea)](),_0x33d8cc=process[_0x109f72(0x4ca)](),_0xc96819=(_0x5593ac-this[_0x109f72(0x31e)])*0x3e8;if(_0xc96819>=0x3d090){const _0x3f2e38=_0x33d8cc[_0x109f72(0x3b1)]-this[_0x109f72(0x470)][_0x109f72(0x3b1)]+(_0x33d8cc[_0x109f72(0x58a)]-this[_0x109f72(0x470)][_0x109f72(0x58a)]),_0x1ec769=_0x1d68a6[_0x109f72(0x23a)]()[_0x109f72(0x631)]||0x1;this['_lastCpuPct']=Math['min'](0x64,Math['round'](_0x3f2e38/(_0xc96819*_0x1ec769)*0x64)),this[_0x109f72(0x45a)]=Math[_0x109f72(0x2fb)](_0xc96819/0x3e8),this[_0x109f72(0x470)]=_0x33d8cc,this[_0x109f72(0x31e)]=_0x5593ac;}const _0x48e905=process[_0x109f72(0x565)](),_0x4530af=this[_0x109f72(0x2e0)][_0x109f72(0x4a9)];let _0xc43bd4=0x0;if(_0x4530af>0x0){const _0x551f55=[this[_0x109f72(0x209)],...this['okdb']['_envs']?.['values']?.()??[]];for(const _0x337dc1 of _0x551f55){const _0x4b4227=_0x337dc1[_0x109f72(0x645)]?.[_0x109f72(0x4ee)];if(_0x4b4227)_0xc43bd4+=_0x4b4227['liveThreadStats'][_0x109f72(0x614)];}}let _0x14134c=null;const _0x1b7dfe=_0x4530af;if(_0x1b7dfe>0x0){let _0x18922c=0x0;for(const _0x190904 of this[_0x109f72(0x2e0)][_0x109f72(0x413)]())_0x18922c+=_0x190904['heapUsed']||0x0;_0x14134c={'count':_0x1b7dfe,'heapUsed':_0x18922c,'sandbox':_0x4530af,'busy':_0xc43bd4};}return{'rss':_0x48e905[_0x109f72(0x2d3)],'heapUsed':_0x48e905[_0x109f72(0x561)],'heapTotal':_0x48e905['heapTotal'],'external':_0x48e905[_0x109f72(0x488)],'cpuPct':this[_0x109f72(0x496)],'cpuWindowMs':this['_lastCpuWindowMs']??null,'threads':_0x14134c,'at':_0x5593ac};}['reportThreadStats'](_0x595b05,_0x5b2ebe){const _0x527d57=_0x2abca6;if(!_0x595b05||!_0x5b2ebe)return;this[_0x527d57(0x2e0)][_0x527d57(0x452)](_0x595b05,_0x5b2ebe);}[_0x2abca6(0x415)](_0x1f8412){this['_threadStats']['delete'](_0x1f8412);}[_0x2abca6(0x4ef)](_0x3b8fe1,_0x2b2600,_0x4af49c=undefined){const _0x31f506=_0x2abca6,_0x533b89=this['_children']['get'](_0x3b8fe1);if(!_0x533b89||!_0x2b2600)return;if(_0x4af49c!==undefined)_0x533b89[_0x31f506(0x407)]=_0x4af49c;_0x533b89['stats']={'rss':_0x2b2600[_0x31f506(0x2d3)]??null,'heapUsed':_0x2b2600[_0x31f506(0x561)]??null,'heapTotal':_0x2b2600[_0x31f506(0x56e)]??null,'external':_0x2b2600[_0x31f506(0x488)]??null,'cpuPct':_0x2b2600['cpuPct']??null,'cpuWindowMs':_0x2b2600[_0x31f506(0x2ab)]??null,'threads':_0x2b2600[_0x31f506(0x4f9)]??null,'claims':_0x2b2600['claims']??null,'envsOpen':_0x2b2600[_0x31f506(0x335)]??null,'at':Date[_0x31f506(0x4ea)]()};}[_0x2abca6(0x525)](){const _0xfd9371=_0x2abca6,_0x49a380=Date[_0xfd9371(0x4ea)](),_0x31fa9e=this['okdb'][_0xfd9371(0x4b0)]||{},_0x183957=this[_0xfd9371(0x61b)]||_0xfd9371(0x4e9);return{'nodeKey':this[_0xfd9371(0x55a)],'processKey':this[_0xfd9371(0x6a8)],'instanceId':this[_0xfd9371(0x654)],'pid':process['pid'],'startedAt':this[_0xfd9371(0x397)],'instanceStartedAt':this['_startedAt'],'ppid':typeof process[_0xfd9371(0x554)]===_0xfd9371(0x68f)?process[_0xfd9371(0x554)]:null,'host':_0x1d68a6[_0xfd9371(0x4e1)](),'supervisorKey':this['_supervisorKey']??null,'kind':_0x183957,'role':{'engines':!!_0x31fa9e[_0xfd9371(0x252)],'processors':!!_0x31fa9e[_0xfd9371(0x32d)],'compaction':_0x31fa9e['compaction'],'http':_0x31fa9e[_0xfd9371(0x48c)]},'listenAddr':this[_0xfd9371(0x1ed)]??null,'heartbeatAt':_0x49a380,'expiresAt':_0x49a380+_0x2786f2,'caps':this[_0xfd9371(0x27d)](_0x183957,_0x31fa9e),'lifecycle':{'state':_0xfd9371(0x5fb),'desiredVersionApplied':null},'meta':{...this[_0xfd9371(0x298)]},'processing':_0x31fa9e[_0xfd9371(0x32d)]?this[_0xfd9371(0x400)]():null,'engines':_0x31fa9e['engines']?[...this[_0xfd9371(0x209)][_0xfd9371(0x3a3)]??[]]:null,'singletonClaims':this[_0xfd9371(0x557)](),'stats':this[_0xfd9371(0x22b)](),'writers':this['_collectWriterFacet']()};}[_0x2abca6(0x582)](){const _0x23d1a4=_0x2abca6,_0x2e0c79={};try{for(const [_0x56bf97,_0x105e9c]of this['okdb']['_envs']){try{const _0x203280=_0x105e9c['writerStatus']?.();if(!_0x203280)continue;if(!_0x203280[_0x23d1a4(0x3d7)]&&!_0x203280[_0x23d1a4(0x650)]&&!(_0x203280['parkedNow']??0x0)&&!_0x203280[_0x23d1a4(0x294)])continue;_0x2e0c79[_0x56bf97]={'depth':_0x203280[_0x23d1a4(0x3d7)],'oldestPendingMs':_0x203280[_0x23d1a4(0x3ac)],'committed':_0x203280[_0x23d1a4(0x650)],'commitsPerSec':_0x203280[_0x23d1a4(0x623)],'commitP99Ms':_0x203280[_0x23d1a4(0x5bf)],'parkedNow':_0x203280[_0x23d1a4(0x2c0)]??0x0,'draining':!!_0x203280[_0x23d1a4(0x294)]};}catch{}}}catch{}return Object[_0x23d1a4(0x5cf)](_0x2e0c79)['length']?_0x2e0c79:null;}['_collectSingletonClaims'](){const _0x11a32f=_0x2abca6,_0x358a5e=process['pid'],_0x5d666d=Date[_0x11a32f(0x4ea)](),_0x4e26de=_0x4f8aa6=>{const _0x34a8f0=_0x11a32f;if(!_0x4f8aa6)return[];const _0xd6b438=[];try{for(const {id:_0x2a845c,entry:_0x2de124}of _0x4f8aa6['list']()){if(_0x2de124?.[_0x34a8f0(0x20d)]?.[_0x34a8f0(0x250)]!==_0x358a5e)continue;const _0x2e202c=_0x2de124['updatedAt']??_0x2de124['acquiredAt']??0x0;if(_0x2e202c+(_0x2de124[_0x34a8f0(0x31c)]??0x0)<_0x5d666d)continue;_0xd6b438[_0x34a8f0(0x5fa)](_0x2a845c);}}catch{}return _0xd6b438;},_0x357c5a=_0x4e26de(this[_0x11a32f(0x50e)](_0x11a32f(0x501))),_0x3f5bc7=_0x4e26de(this[_0x11a32f(0x50e)](_0x11a32f(0x3e5)));if(!_0x357c5a['length']&&!_0x3f5bc7['length'])return null;return{'compact':_0x357c5a,'replicate':_0x3f5bc7};}[_0x2abca6(0x50e)](_0x11418b){const _0x617e98=_0x2abca6;if(!this[_0x617e98(0x209)]?.['_rootDb'])return null;if(!this[_0x617e98(0x3c6)])this[_0x617e98(0x3c6)]=new Map();let _0x1e0f08=this[_0x617e98(0x3c6)][_0x617e98(0x363)](_0x11418b);if(!_0x1e0f08)try{_0x1e0f08=new _0x1b97b8(this[_0x617e98(0x209)]['_rootDb'],{'namespace':_0x11418b}),this[_0x617e98(0x3c6)][_0x617e98(0x452)](_0x11418b,_0x1e0f08);}catch{return null;}return _0x1e0f08;}[_0x2abca6(0x400)](){const _0x52a2f9=_0x2abca6,_0x551a9c=[];try{for(const [_0x359368,_0x54ff91]of this[_0x52a2f9(0x209)][_0x52a2f9(0x3ca)]){if(_0x359368['startsWith']('~'))continue;for(const _0x1fd53e of _0x54ff91['processor']['tierList']())_0x551a9c[_0x52a2f9(0x5fa)]({..._0x1fd53e,'env':_0x359368});}}catch{}return{'participate':this[_0x52a2f9(0x209)][_0x52a2f9(0x32d)]?.['_participate']??![],'processors':_0x551a9c};}[_0x2abca6(0x683)](){const _0xbe51f8=_0x2abca6;if(this[_0xbe51f8(0x536)])return!![];const _0x2b18fe=this['okdb'][_0xbe51f8(0x41a)];if(!_0x2b18fe)return![];return this[_0xbe51f8(0x536)]=_0x2b18fe['openDB'](_0xf981bc,{'dupSort':![]}),this[_0xbe51f8(0x5cc)]=_0x2b18fe[_0xbe51f8(0x4d1)](_0x4f792f,{'dupSort':![]}),!![];}async[_0x2abca6(0x57d)](){const _0x4d6c0e=_0x2abca6;if(!this[_0x4d6c0e(0x683)]())return;const _0x1a2dd3=_0x4d6c0e(0x490),_0x496a4c=0x1,_0x139630=this['_desired']['get'](_0x1a2dd3)??0x0;if(_0x139630>=_0x496a4c)return;const _0x59bd78=_0x1c49a9=>{const _0x3ea440=_0x4d6c0e;if(_0x1c49a9==='worker')return'single';if(_0x1c49a9===_0x3ea440(0x379))return _0x3ea440(0x3dc);return _0x1c49a9;};await this[_0x4d6c0e(0x209)][_0x4d6c0e(0x2b9)][_0x4d6c0e(0x544)]['transaction'](()=>{const _0x4b5b46=_0x4d6c0e;for(const _0x5d801b of['procmode/',_0x4b5b46(0x5ca)]){for(const {key:_0x3b4b25,value:_0x3a1813}of this['_desired'][_0x4b5b46(0x698)]({'start':_0x5d801b,'end':_0x5d801b+'ÿ'})){if(typeof _0x3b4b25!=='string'||!_0x3b4b25[_0x4b5b46(0x39c)](_0x5d801b))break;const _0x599906=_0x59bd78(_0x3a1813[_0x4b5b46(0x50b)]);if(_0x599906!==_0x3a1813[_0x4b5b46(0x50b)])this['_desired'][_0x4b5b46(0x473)](_0x3b4b25,{..._0x3a1813,'mode':_0x599906});}}this[_0x4b5b46(0x536)][_0x4b5b46(0x473)](_0x1a2dd3,_0x496a4c);});}['hasDesired'](){const _0x3f6fe7=_0x2abca6;return!!this[_0x3f6fe7(0x536)];}['getDesired'](_0x5d8b14,_0x39bde6){const _0x366621=_0x2abca6;if(!this[_0x366621(0x683)]())return null;const _0x415f0c=_0x5d8b14+'/'+_0x39bde6;return this[_0x366621(0x1fa)](),this[_0x366621(0x682)][_0x366621(0x363)](_0x415f0c)??this[_0x366621(0x536)][_0x366621(0x363)](_0x415f0c)??null;}[_0x2abca6(0x1fa)](){const _0x5487ab=_0x2abca6;if(!_0x28292d)return;try{this[_0x5487ab(0x209)]['_systemEnv']?.['db']?.[_0x5487ab(0x662)]?.();}catch{}}async[_0x2abca6(0x3cc)](_0x2c37a0,_0x334244,_0x146499){const _0x2c015c=_0x2abca6;if(!this[_0x2c015c(0x683)]())return null;const _0xc71270=_0x2c37a0+'/'+_0x334244;this['_refreshDesiredSnapshot']();const _0x3249ad=this[_0x2c015c(0x682)]['get'](_0xc71270)??this[_0x2c015c(0x536)][_0x2c015c(0x363)](_0xc71270)??{'version':0x0},_0x3439ed=(_0x3249ad[_0x2c015c(0x29a)]||0x0)+0x1,_0x17e160={..._0x3249ad,..._0x146499,'version':_0x3439ed,'updatedAt':Date[_0x2c015c(0x4ea)]()};this[_0x2c015c(0x682)]['set'](_0xc71270,_0x17e160);try{await this[_0x2c015c(0x209)][_0x2c015c(0x2b9)]['_writer']['transaction'](()=>{const _0x26d6c2=_0x2c015c;this[_0x26d6c2(0x536)][_0x26d6c2(0x473)](_0xc71270,_0x17e160);});}finally{if(this[_0x2c015c(0x682)][_0x2c015c(0x363)](_0xc71270)===_0x17e160)this[_0x2c015c(0x682)]['delete'](_0xc71270);}return _0x3439ed;}[_0x2abca6(0x499)](_0x1ae449){const _0x4e5ae2=_0x2abca6;if(!this[_0x4e5ae2(0x683)]())return[];this[_0x4e5ae2(0x1fa)]();const _0x353be2=_0x1ae449+'/',_0x40ea9d=[];for(const {key:_0x328f2d,value:_0x2b2ca5}of this['_desired'][_0x4e5ae2(0x698)]({'start':_0x353be2,'end':_0x353be2+'ÿ'})){if(typeof _0x328f2d!==_0x4e5ae2(0x355)||!_0x328f2d['startsWith'](_0x353be2))break;_0x40ea9d['push']({'key':_0x328f2d[_0x4e5ae2(0x608)](_0x353be2[_0x4e5ae2(0x631)]),'value':_0x2b2ca5});}return _0x40ea9d;}[_0x2abca6(0x46b)](_0x4e5eeb){const _0x1c9190=_0x2abca6;if(!this[_0x1c9190(0x683)]())return null;return this[_0x1c9190(0x5cc)]['get'](_0x4e5eeb)??null;}async[_0x2abca6(0x49a)](_0x218b7d,_0x54d652,_0xe3d2fe={}){const _0x8b3393=_0x2abca6;if(!this[_0x8b3393(0x683)]())return null;let _0x4ea620;return await this[_0x8b3393(0x209)][_0x8b3393(0x2b9)][_0x8b3393(0x544)]['transaction'](()=>{const _0x36532e=_0x8b3393,_0x22c1a4=this['_cmd'][_0x36532e(0x363)](_0x218b7d)||{'epoch':0x0};_0x4ea620=(_0x22c1a4['epoch']||0x0)+0x1,this['_cmd'][_0x36532e(0x473)](_0x218b7d,{..._0x22c1a4,..._0xe3d2fe,'cmd':_0x54d652,'epoch':_0x4ea620,'updatedAt':Date[_0x36532e(0x4ea)]()});}),_0x4ea620;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x3d0ed1,'nodeKey':_0x4eb881,'logicalKey':_0x24edd4,'slotKey':_0x18169a,'PROCESS_ENV':_0x2d9299,'NODE_TYPE':_0x11509d},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x2747f0=_0x42e206;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x5295c8=require$$0$6,{EVENTS:_0x1d3450,CHANGE_ACTIONS:_0x1dbba3}=requireOkdbEnums(),{LOOP:_0x176160}=requireOkdbLoopMonitor(),_0xe27fe8=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x5d8a3a=0x5,_0x277e92=0x2710;class _0x45a1ff extends _0x5295c8{constructor(_0x166c79,_0x10c324={}){const _0x5e1434=_0x4d7d;super(),this[_0x5e1434(0x209)]=_0x166c79,this['_quantum']=_0x10c324[_0x5e1434(0x4de)]??_0xe27fe8,this[_0x5e1434(0x238)]=_0x10c324[_0x5e1434(0x522)]??_0x5d8a3a,this[_0x5e1434(0x611)]=_0x10c324[_0x5e1434(0x249)]??_0x277e92,this[_0x5e1434(0x3bb)]=![],this[_0x5e1434(0x32e)]=new Map(),this[_0x5e1434(0x508)]=new Map(),this[_0x5e1434(0x5db)]=new Map(),this['_flushTimer']=null,this[_0x5e1434(0x4c8)]=![],this[_0x5e1434(0x39f)]=new Set(),this['_onItem']=_0x46f15d=>this['_handleInProcess'](_0x46f15d),this[_0x5e1434(0x6a2)]=_0x54dfca=>this['_handlePoke'](_0x54dfca),this[_0x5e1434(0x3d0)]=()=>this['stop']();}[_0x2747f0(0x563)](){const _0x190795=_0x2747f0;if(this[_0x190795(0x3bb)])return;this['_started']=!![];for(const [_0x397547,_0x51b53f]of this['okdb'][_0x190795(0x3ca)]){if(_0x397547[_0x190795(0x39c)]('~'))continue;try{_0x51b53f[_0x190795(0x344)]();}catch{}}for(const [_0x475df9,_0x4abcc5]of this[_0x190795(0x209)][_0x190795(0x3ca)]){if(_0x475df9[_0x190795(0x39c)]('~'))continue;try{this[_0x190795(0x508)]['set'](_0x475df9,_0x4abcc5[_0x190795(0x4a8)]()||0x0);}catch{}}const {events:_0x156721}=this[_0x190795(0x209)];_0x156721['on'](_0x1d3450[_0x190795(0x3d3)],this[_0x190795(0x595)]),_0x156721['on'](_0x1d3450[_0x190795(0x6ab)],this[_0x190795(0x595)]),_0x156721['on'](_0x1d3450[_0x190795(0x2bc)],this[_0x190795(0x595)]),_0x156721['on'](_0x1d3450[_0x190795(0x612)],this[_0x190795(0x6a2)]),_0x156721[_0x190795(0x625)](_0x1d3450[_0x190795(0x4e7)],this[_0x190795(0x3d0)]);}[_0x2747f0(0x5a1)](){const _0xe41405=_0x2747f0;if(!this['_started'])return;this[_0xe41405(0x3bb)]=![];const {events:_0x1a0333}=this[_0xe41405(0x209)];_0x1a0333['off'](_0x1d3450[_0xe41405(0x3d3)],this[_0xe41405(0x595)]),_0x1a0333[_0xe41405(0x4fa)](_0x1d3450[_0xe41405(0x6ab)],this['_onItem']),_0x1a0333[_0xe41405(0x4fa)](_0x1d3450[_0xe41405(0x2bc)],this[_0xe41405(0x595)]),_0x1a0333[_0xe41405(0x4fa)](_0x1d3450['SYSTEM_POKE'],this['_onPoke']);try{_0x1a0333[_0xe41405(0x4fa)](_0x1d3450[_0xe41405(0x4e7)],this[_0xe41405(0x3d0)]);}catch{}this[_0xe41405(0x2a5)]&&(clearTimeout(this[_0xe41405(0x2a5)]),this[_0xe41405(0x2a5)]=null),this[_0xe41405(0x5db)][_0xe41405(0x471)](),this[_0xe41405(0x32e)][_0xe41405(0x471)](),this[_0xe41405(0x508)][_0xe41405(0x471)](),this[_0xe41405(0x39f)][_0xe41405(0x471)]();}[_0x2747f0(0x607)](_0x325d87,_0x201b0a,_0x904d5c,_0x47fb83){return _0x325d87+'\x00'+_0x201b0a+'\x00'+_0x904d5c+'\x00'+_0x47fb83;}['_markSeen'](_0x1140fa,_0x30d7d2,_0x321a5f,_0x10de7c){const _0x47bd2e=_0x2747f0,_0x545ab9=this[_0x47bd2e(0x607)](_0x1140fa,_0x30d7d2,_0x321a5f,_0x10de7c);if(this['_seen'][_0x47bd2e(0x258)](_0x545ab9))return![];this[_0x47bd2e(0x39f)][_0x47bd2e(0x637)](_0x545ab9);if(this[_0x47bd2e(0x39f)][_0x47bd2e(0x4a9)]>this[_0x47bd2e(0x611)]){const _0xe8c807=this[_0x47bd2e(0x39f)][_0x47bd2e(0x413)]()['next']()[_0x47bd2e(0x52e)];this[_0x47bd2e(0x39f)][_0x47bd2e(0x472)](_0xe8c807);}return!![];}[_0x2747f0(0x56c)](_0x3e7331){const _0x37ab27=_0x2747f0;if(!this[_0x37ab27(0x3bb)]||!_0x3e7331)return;const {env:_0x119779,type:_0x143284,key:_0x559ead,clock:_0x1f25e5,origin:_0x5e4375,action:_0x39c180,newValue:_0x40dc25,oldValue:_0x58876c}=_0x3e7331;if(_0x119779==null||_0x143284==null||_0x559ead==null)return;if(typeof _0x119779===_0x37ab27(0x355)&&_0x119779['startsWith']('~'))return;if(typeof _0x143284===_0x37ab27(0x355)&&_0x143284[_0x37ab27(0x39c)]('~'))return;if(!this[_0x37ab27(0x251)](_0x119779,_0x143284,_0x559ead,_0x1f25e5))return;const _0x26f38c=_0x39c180===_0x1dbba3['REMOVE']?'remove':_0x37ab27(0x473);this['emit'](_0x37ab27(0x396),{'env':_0x119779,'type':_0x143284,'key':_0x559ead,'op':_0x26f38c,'clock':_0x1f25e5,'origin':_0x5e4375,'value':_0x26f38c===_0x37ab27(0x576)?null:_0x40dc25,'prevValue':_0x58876c});}['_handlePoke'](_0xa3a337){const _0x5c0f80=_0x2747f0;if(!this[_0x5c0f80(0x3bb)])return;if(!_0xa3a337||typeof _0xa3a337['env']!==_0x5c0f80(0x355)||typeof _0xa3a337[_0x5c0f80(0x267)]!==_0x5c0f80(0x355))return;const {env:_0x29e8f5,type:_0x4fa86f}=_0xa3a337;if(_0x29e8f5[_0x5c0f80(0x39c)]('~')||_0x4fa86f['startsWith']('~'))return;this['_pending'][_0x5c0f80(0x452)](_0x29e8f5+'\x00'+_0x4fa86f,{'env':_0x29e8f5,'type':_0x4fa86f}),this[_0x5c0f80(0x5c2)]();}[_0x2747f0(0x5c2)](){const _0x4d558b=_0x2747f0;if(this[_0x4d558b(0x2a5)])return;const _0x10cdbe=()=>{const _0x557fdd=_0x4d558b;this[_0x557fdd(0x2a5)]=null,this[_0x557fdd(0x24b)]()['catch'](()=>{});};this[_0x4d558b(0x2a5)]=setTimeout(_0x10cdbe,this[_0x4d558b(0x238)]>0x0?this[_0x4d558b(0x238)]:0x0);}async[_0x2747f0(0x24b)](){const _0x3c8b78=_0x2747f0;if(this[_0x3c8b78(0x4c8)]){this['_scheduleFlush']();return;}this[_0x3c8b78(0x4c8)]=!![];try{const _0x34a0c2=[...this[_0x3c8b78(0x5db)][_0x3c8b78(0x413)]()];this[_0x3c8b78(0x5db)][_0x3c8b78(0x471)]();let _0x532f69=![];for(const {env:_0x179b89,type:_0x496a50}of _0x34a0c2){try{const _0xcebaf8=await this['_drainOne'](_0x179b89,_0x496a50);if(_0xcebaf8)_0x532f69=!![];}catch{this[_0x3c8b78(0x5db)]['set'](_0x179b89+'\x00'+_0x496a50,{'env':_0x179b89,'type':_0x496a50}),_0x532f69=!![];}}if(_0x532f69||this[_0x3c8b78(0x5db)]['size']>0x0)this[_0x3c8b78(0x5c2)]();}finally{this['_draining']=![];}}async[_0x2747f0(0x57a)](_0x4fac03,_0x2fd6aa){const _0x2e3b66=_0x2747f0,_0x2832db=await this[_0x2e3b66(0x209)]['_openEnvLazy'](_0x4fac03),_0x3e14aa=_0x4fac03+'\x00'+_0x2fd6aa;!this[_0x2e3b66(0x32e)]['has'](_0x3e14aa)&&(!this['_baselines']['has'](_0x4fac03)&&(_0x2832db[_0x2e3b66(0x344)](),this[_0x2e3b66(0x508)]['set'](_0x4fac03,_0x2832db['getClock']()||0x0)),this['_cursors'][_0x2e3b66(0x452)](_0x3e14aa,this[_0x2e3b66(0x508)]['get'](_0x4fac03)));const _0x43c308=this[_0x2e3b66(0x32e)]['get'](_0x3e14aa),_0xa7a47c=_0x2832db['getClock'](_0x2fd6aa)||0x0;if(_0xa7a47c<=_0x43c308)return![];const _0x366345=_0x43c308+this['_quantum'],_0x351a89=Math['min'](_0xa7a47c,_0x366345),_0x28baf1=_0x176160['enabled']?_0x176160[_0x2e3b66(0x4ea)]():0x0,_0x4ed3dc=Array[_0x2e3b66(0x2b0)](_0x2832db[_0x2e3b66(0x539)](_0x2fd6aa,_0x43c308+0x1,_0x351a89));let _0xd9cd27=_0x43c308;for(const _0x53eee8 of _0x4ed3dc){const {clock:_0x5be8ff,key:_0x2f1dd6,action:_0x142f20,origin:_0x30fa31}=_0x53eee8;if(_0x5be8ff>_0xd9cd27)_0xd9cd27=_0x5be8ff;if(_0x2f1dd6==null)continue;if(!this['_markSeen'](_0x4fac03,_0x2fd6aa,_0x2f1dd6,_0x5be8ff))continue;let _0x24f961,_0x163545;if(_0x142f20===_0x1dbba3[_0x2e3b66(0x57f)])_0x24f961=_0x2e3b66(0x576),_0x163545=null;else{const _0x5e0971=_0x2832db[_0x2e3b66(0x363)](_0x2fd6aa,_0x2f1dd6);_0x5e0971==null?(_0x24f961=_0x2e3b66(0x576),_0x163545=null):(_0x24f961=_0x2e3b66(0x473),_0x163545=_0x5e0971);}this[_0x2e3b66(0x47c)](_0x2e3b66(0x396),{'env':_0x4fac03,'type':_0x2fd6aa,'key':_0x2f1dd6,'op':_0x24f961,'clock':_0x5be8ff,'origin':_0x30fa31,'value':_0x163545});}if(_0x176160[_0x2e3b66(0x3ce)])_0x176160[_0x2e3b66(0x5bc)](_0x2e3b66(0x256)+_0x4fac03+':'+_0x2fd6aa,_0x176160[_0x2e3b66(0x4ea)]()-_0x28baf1,'n='+_0x4ed3dc[_0x2e3b66(0x631)]);return this[_0x2e3b66(0x32e)][_0x2e3b66(0x452)](_0x3e14aa,Math[_0x2e3b66(0x555)](_0xd9cd27,_0x351a89)),_0x2832db[_0x2e3b66(0x4a8)](_0x2fd6aa)>_0x351a89;}[_0x2747f0(0x43f)](){const _0x25133d=_0x2747f0;return{'started':this[_0x25133d(0x3bb)],'quantum':this[_0x25133d(0x2a0)],'flushDebounce':this[_0x25133d(0x238)],'cursors':Object['fromEntries']([...this[_0x25133d(0x32e)][_0x25133d(0x699)]()][_0x25133d(0x272)](([_0xe02fb8,_0x4e9067])=>[_0xe02fb8[_0x25133d(0x2aa)]('\x00',':'),_0x4e9067])),'pending':this[_0x25133d(0x5db)][_0x25133d(0x4a9)],'seen':this[_0x25133d(0x39f)][_0x25133d(0x4a9)]};}}return _0x45a1ff['CHANGEFEED_QUANTUM']=_0xe27fe8,okdbChangefeed={'OKDBChangefeed':_0x45a1ff},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x5560ca=_0x42e206;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0xbe5340=require$$1$2,_0x2dd387=require$$1,{EVENTS:_0x386ea9}=requireOkdbEnums(),_0x10707d=require$$0,{slotKey:_0x228c70}=requireOkdbProcessRegistry(),_0x44f4c2=0xfa,_0xcdeae5=0xfa0,_0x8e97f8=0x5,_0x125526=0x2710,_0x62df41=0xbb8,_0x3d23e1=0x7d0,_0x2d146a=_0x5560ca(0x5d8),_0x16603e=_0x5560ca(0x5cd),_0x358db4=_0x5560ca(0x6a0),_0xa85062=_0x5560ca(0x521),_0x2a2c21=[_0x386ea9[_0x5560ca(0x412)],_0x386ea9[_0x5560ca(0x2d1)],_0x386ea9['FTS_DROP'],_0x386ea9[_0x5560ca(0x342)],_0x386ea9[_0x5560ca(0x605)],_0x386ea9[_0x5560ca(0x1ec)],_0x386ea9[_0x5560ca(0x4d5)],_0x386ea9[_0x5560ca(0x63d)],'processor:ready','processor:progress','processor:error','processor:paused','processor:resumed',_0x5560ca(0x684)],_0x4601b5=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0;function _0xe47d76({workers:_0x14a5e2,makeOkdb:_0x5cbdba,port:_0xa968e8,primaryOkdb:_0x4e6b8d,childEntry:childEntry=![],workerEnv:workerEnv=null}={}){const _0x223ef9=_0x5560ca;if(_0xbe5340[_0x223ef9(0x23b)])return childEntry&&_0xbe5340[_0x223ef9(0x583)]({'exec':_0x2dd387[_0x223ef9(0x553)](__dirname,_0x223ef9(0x438)),'args':[],'execArgv':((()=>{const _0x28c04d=_0x223ef9,_0xf761cd=[];for(let _0x57c889=0x0;_0x57c889<process[_0x28c04d(0x5be)]['length'];_0x57c889++){const _0x4138bf=process[_0x28c04d(0x5be)][_0x57c889];if(_0x4138bf[_0x28c04d(0x39c)](_0x28c04d(0x3b0))||_0x4138bf[_0x28c04d(0x39c)](_0x28c04d(0x48f))||_0x4138bf[_0x28c04d(0x39c)](_0x28c04d(0x373)))continue;if(_0x4138bf==='-e'||_0x4138bf===_0x28c04d(0x394)||_0x4138bf==='-p'||_0x4138bf===_0x28c04d(0x677)){_0x57c889++;continue;}_0xf761cd[_0x28c04d(0x5fa)](_0x4138bf);}return _0xf761cd;})())}),_0x47be19({'workers':_0x14a5e2,'port':_0xa968e8,'primaryOkdb':_0x4e6b8d,'workerEnv':workerEnv});return _0x3cb0e4({'makeOkdb':_0x5cbdba,'port':_0xa968e8});}function _0x47be19({workers:_0x35d665,port:_0x59fbce,primaryOkdb:_0x43369e,workerEnv:_0x2df347}){const _0x37885e=_0x5560ca,_0x17a5be=new Map(),_0x2d6190=new Map();let _0x5ef346=![];const _0x188249=_0x3b5703=>_0x3b5703?.['__okdbSlot'],_0x1845c7=_0x1b5f49=>{const _0xc39557=_0x4d7d,_0x1fec63=_0xbe5340[_0xc39557(0x52a)]({...process.env,..._0x2df347||{},'OKDB_CLUSTER_SLOT':String(_0x1b5f49)});return _0x1fec63[_0xc39557(0x41c)]=_0x1b5f49,_0x17a5be[_0xc39557(0x452)](_0x1fec63[_0xc39557(0x68a)][_0xc39557(0x250)],{'worker':_0x1fec63,'startedAt':Date[_0xc39557(0x4ea)](),'slot':_0x1b5f49}),_0x1fec63['on'](_0xc39557(0x2e5),_0x22151c=>{const _0x20a45f=_0xc39557;console['log']('[okdb-cluster]\x20worker\x20pid='+_0x1fec63[_0x20a45f(0x68a)][_0x20a45f(0x250)]+_0x20a45f(0x56d)+(_0x22151c?.[_0x20a45f(0x62d)]??_0x22151c));}),_0x1fec63['on'](_0xc39557(0x337),()=>_0x1ef082()),_0x1fec63;},_0x17d13f=_0x11dcbd=>{const _0x1227d1=_0x4d7d;for(const {worker:_0x190d73}of _0x17a5be['values']()){if(_0x190d73[_0x1227d1(0x4e3)]()||!_0x190d73[_0x1227d1(0x218)]())continue;try{_0x190d73[_0x1227d1(0x4b6)](_0x11dcbd);}catch{}}};_0x43369e?.[_0x37885e(0x2cf)]?.({'kind':'primary','listenAddr':':'+_0x59fbce})[_0x37885e(0x45b)](()=>{}),_0x43369e?.['processes']?.[_0x37885e(0x42f)]?.({'workersConfigured':_0x35d665});const _0x4d71a0={'engines':!![],'processors':!![],'compaction':!![],'http':!![]},_0x1ef082=()=>{const _0x572446=_0x37885e,_0x13ca06=_0x43369e?.[_0x572446(0x5e6)];if(!_0x13ca06||!_0x13ca06[_0x572446(0x4b5)])return;const _0xbae90e=_0x13ca06[_0x572446(0x38e)];for(const {worker:_0x32c121,startedAt:_0x28766b,slot:_0x4a86c7,stats:_0x86bee7,processing:_0x2c0283}of _0x17a5be['values']()){if(_0x32c121[_0x572446(0x4e3)]())continue;const _0x170faa=_0x13ca06[_0x572446(0x38c)]?.()&&_0x13ca06[_0x572446(0x229)]('slot',_0x39793c(_0x4a86c7))?.[_0x572446(0x5f9)]===!![];_0x13ca06[_0x572446(0x444)]({'pid':_0x32c121[_0x572446(0x68a)]['pid'],'startedAt':_0x28766b,'kind':'http-server','supervisorKey':_0xbae90e,'slot':_0x4a86c7,'slotKey':_0x39793c(_0x4a86c7),'role':_0x4d71a0,'listenAddr':':'+_0x59fbce,'lifecycle':_0x170faa?_0x572446(0x27e):_0x572446(0x5fb),'processing':_0x2c0283??null,'stats':_0x86bee7??null})['catch'](()=>{});}},_0x39793c=_0x590ca4=>_0x228c70(_0x37885e(0x48d)+_0x59fbce,_0x590ca4),_0x3f28e6=_0x10a558=>{const _0x26cd91=_0x37885e,_0x2831af=_0x43369e?.[_0x26cd91(0x5e6)];if(!_0x2831af?.[_0x26cd91(0x38c)]?.())return![];return _0x2831af[_0x26cd91(0x229)](_0x26cd91(0x5c8),_0x39793c(_0x10a558))?.['decommission']===!![];};for(let _0x36aab7=0x0;_0x36aab7<_0x35d665;_0x36aab7++){const _0x315f6f=_0x3f28e6(_0x36aab7);_0x2d6190[_0x37885e(0x452)](_0x36aab7,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x315f6f,'respawnTimer':null}),_0x315f6f?console[_0x37885e(0x6a0)](_0x37885e(0x60f)+_0x36aab7+_0x37885e(0x59c)):_0x1845c7(_0x36aab7);}const _0x12fcfb=()=>{const _0x48fd8c=_0x37885e,_0x534bfc=_0x43369e?.[_0x48fd8c(0x5e6)];if(!_0x534bfc?.['_isWriter']||!_0x534bfc[_0x48fd8c(0x38c)]?.())return;for(const [_0x12be8a,_0x65d95]of _0x2d6190[_0x48fd8c(0x699)]()){const _0x2ea5c2=_0x534bfc[_0x48fd8c(0x229)](_0x48fd8c(0x5c8),_0x39793c(_0x12be8a)),_0x32d22a=_0x2ea5c2?.[_0x48fd8c(0x5f9)]===!![],_0x2dc4dd=_0x2ea5c2?.['kill']===!![];if(_0x32d22a&&!_0x65d95[_0x48fd8c(0x53d)]){_0x65d95['dead']=!![];_0x65d95[_0x48fd8c(0x333)]&&(clearTimeout(_0x65d95[_0x48fd8c(0x333)]),_0x65d95['respawnTimer']=null);for(const {worker:_0xf6b2ce}of _0x17a5be['values']()){if(_0x188249(_0xf6b2ce)!==_0x12be8a||_0xf6b2ce[_0x48fd8c(0x4e3)]())continue;try{if(_0x2dc4dd)_0xf6b2ce[_0x48fd8c(0x68a)][_0x48fd8c(0x442)](_0x48fd8c(0x242));else _0xf6b2ce[_0x48fd8c(0x218)]()&&_0xf6b2ce[_0x48fd8c(0x29c)]();}catch{}}console[_0x48fd8c(0x6a0)](_0x48fd8c(0x454)+(_0x2dc4dd?_0x48fd8c(0x4d7):_0x48fd8c(0x69b))+_0x48fd8c(0x5fe)+_0x12be8a+'\x20(durable\x20desired-state)');}else{if(!_0x32d22a&&_0x65d95['dead']&&_0x2ea5c2){_0x65d95[_0x48fd8c(0x53d)]=![],_0x65d95[_0x48fd8c(0x69a)]=[],_0x65d95[_0x48fd8c(0x550)]=0x0;const _0x2f6e8d=[..._0x17a5be[_0x48fd8c(0x413)]()]['some'](({worker:_0x2051a1})=>_0x188249(_0x2051a1)===_0x12be8a&&!_0x2051a1[_0x48fd8c(0x4e3)]());!_0x2f6e8d&&!_0x5ef346&&(_0x1845c7(_0x12be8a),console[_0x48fd8c(0x6a0)]('[okdb-cluster]\x20recommissioned\x20worker\x20slot='+_0x12be8a));}}}},_0x4a3c68=()=>{try{_0x12fcfb();}catch{}};_0x43369e?.[_0x37885e(0x2b2)]?.['on']?.(_0x386ea9['SYSTEM_PROC'],_0x4a3c68);const _0x468124=[];if(_0x43369e?.[_0x37885e(0x2b2)]?.['on'])for(const _0x454558 of _0x2a2c21){const _0x33bfd4=_0x507b09=>{_0x17d13f({[_0x2d146a]:_0x16603e,'event':_0x454558,'data':_0x507b09??{}});};_0x43369e[_0x37885e(0x2b2)]['on'](_0x454558,_0x33bfd4),_0x468124[_0x37885e(0x5fa)]({'event':_0x454558,'handler':_0x33bfd4});}const _0xa3f56c=setInterval(()=>{_0x12fcfb(),_0x1ef082();},_0x4601b5);_0xa3f56c[_0x37885e(0x4bd)]?.();const _0x3f7b88=(_0x1e7022,_0x322c27)=>{const _0x41236d=_0x37885e;if(!_0x322c27||typeof _0x322c27!=='object'||_0x322c27[_0x2d146a]!==_0x358db4)return;if(!_0x43369e?.['log']?.[_0x41236d(0x1eb)])return;const _0x1d0ce8=_0x322c27[_0x41236d(0x241)]||{};_0x43369e[_0x41236d(0x6a0)][_0x41236d(0x1eb)]({..._0x1d0ce8,'msg':'[w'+_0x322c27[_0x41236d(0x5c8)]+']\x20'+(_0x1d0ce8[_0x41236d(0x40f)]??''),'meta':{..._0x1d0ce8[_0x41236d(0x208)]||{},'worker':_0x322c27['slot'],'workerPid':_0x322c27['pid']}});};_0xbe5340['on'](_0x37885e(0x62d),_0x3f7b88);const _0x52eda8=(_0x5bfa28,_0x26ceb0)=>{const _0x3992c0=_0x37885e;if(!_0x26ceb0||typeof _0x26ceb0!==_0x3992c0(0x5c0)||_0x26ceb0[_0x2d146a]!==_0xa85062)return;const _0x530001=_0x17a5be['get'](_0x5bfa28[_0x3992c0(0x68a)][_0x3992c0(0x250)]);if(_0x530001){_0x530001['stats']={..._0x26ceb0[_0x3992c0(0x521)],'at':Date[_0x3992c0(0x4ea)]()};if(_0x26ceb0['processing']!==undefined)_0x530001[_0x3992c0(0x407)]=_0x26ceb0[_0x3992c0(0x407)];}};_0xbe5340['on'](_0x37885e(0x62d),_0x52eda8),_0xbe5340['on'](_0x37885e(0x234),(_0x18bd3f,_0x260f09,_0x431f3a)=>{const _0x37ef72=_0x37885e,_0x512b11=_0x18bd3f[_0x37ef72(0x68a)][_0x37ef72(0x250)],_0x2226b4=_0x188249(_0x18bd3f),_0x4bd94d=_0x17a5be[_0x37ef72(0x363)](_0x512b11);if(_0x4bd94d&&_0x43369e?.[_0x37ef72(0x5e6)])_0x43369e[_0x37ef72(0x5e6)]['removeNode'](_0x512b11+':'+_0x4bd94d['startedAt'])[_0x37ef72(0x45b)](()=>{});_0x17a5be[_0x37ef72(0x472)](_0x512b11),console[_0x37ef72(0x6a0)](_0x37ef72(0x1ef)+_0x512b11+_0x37ef72(0x2b1)+(_0x2226b4??'?')+_0x37ef72(0x4cc)+('(code='+_0x260f09+_0x37ef72(0x436)+(_0x431f3a??_0x37ef72(0x61e))+_0x37ef72(0x24a)+_0x17a5be['size']+_0x37ef72(0x217))),_0x1ef082();if(_0x5ef346||_0x2226b4==null)return;const _0x127d16=_0x2d6190[_0x37ef72(0x363)](_0x2226b4);if(!_0x127d16||_0x127d16[_0x37ef72(0x53d)])return;const _0x2045b4=Date[_0x37ef72(0x4ea)]();_0x127d16[_0x37ef72(0x69a)][_0x37ef72(0x5fa)](_0x2045b4),_0x127d16[_0x37ef72(0x69a)]=_0x127d16['deaths'][_0x37ef72(0x4e0)](_0x35f2c8=>_0x2045b4-_0x35f2c8<=_0x125526);if(_0x127d16[_0x37ef72(0x69a)][_0x37ef72(0x631)]>=_0x8e97f8){_0x127d16['dead']=!![],console[_0x37ef72(0x2e5)]('[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot='+_0x2226b4+_0x37ef72(0x4a1)+_0x127d16[_0x37ef72(0x69a)][_0x37ef72(0x631)]+'\x20times\x20in\x20'+(_0x125526+'ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20'+_0x17a5be[_0x37ef72(0x4a9)]+_0x37ef72(0x534)));return;}_0x127d16[_0x37ef72(0x550)]++;const _0x39341f=Math[_0x37ef72(0x368)](_0xcdeae5,_0x44f4c2*0x2**(_0x127d16[_0x37ef72(0x550)]-0x1));console[_0x37ef72(0x6a0)](_0x37ef72(0x362)+_0x2226b4+'\x20in\x20'+_0x39341f+_0x37ef72(0x1e2)+_0x127d16[_0x37ef72(0x550)]+')'),_0x127d16[_0x37ef72(0x333)]=setTimeout(()=>{const _0xaa2bea=_0x37ef72;_0x127d16[_0xaa2bea(0x333)]=null;if(_0x5ef346||_0x127d16[_0xaa2bea(0x53d)])return;const _0x47f1d4=_0x1845c7(_0x2226b4);_0x47f1d4[_0xaa2bea(0x625)]('listening',()=>{const _0x3a107b=_0xaa2bea;if(_0x2d6190[_0x3a107b(0x363)](_0x2226b4)===_0x127d16)_0x127d16[_0x3a107b(0x550)]=0x0;});},_0x39341f),_0x127d16[_0x37ef72(0x333)][_0x37ef72(0x4bd)]?.();});const _0x386c76=[..._0x17a5be['keys']()];console[_0x37885e(0x6a0)](_0x37885e(0x46d)+process[_0x37885e(0x250)]+_0x37885e(0x320)+_0x35d665+_0x37885e(0x36a)+_0x59fbce+':\x20'+('['+_0x386c76[_0x37885e(0x553)](',\x20')+']'));const _0x1f83e1={'_isClusterController':!![],'port':_0x59fbce,'primaryOkdb':_0x43369e??null,'status'(){const _0x589a5f=_0x37885e;return{'clustered':!![],'primaryPid':process[_0x589a5f(0x250)],'port':_0x59fbce,'primaryRole':_0x43369e?.['role']??null,'processorPid':null,'supervisorPid':process['pid'],'workers':[..._0x17a5be[_0x589a5f(0x413)]()][_0x589a5f(0x272)](({worker:_0xe73860})=>({'pid':_0xe73860[_0x589a5f(0x68a)]['pid'],'id':_0xe73860['id'],'dead':_0xe73860[_0x589a5f(0x4e3)]()}))};},async 'close'(){const _0x3c4f02=_0x37885e;_0x5ef346=!![];for(const _0x229ccf of _0x2d6190['values']()){_0x229ccf[_0x3c4f02(0x53d)]=!![],_0x229ccf['respawnTimer']&&(clearTimeout(_0x229ccf['respawnTimer']),_0x229ccf[_0x3c4f02(0x333)]=null);}clearInterval(_0xa3f56c),_0xbe5340[_0x3c4f02(0x4fa)](_0x3c4f02(0x62d),_0x3f7b88),_0xbe5340[_0x3c4f02(0x4fa)](_0x3c4f02(0x62d),_0x52eda8),_0x43369e?.[_0x3c4f02(0x2b2)]?.[_0x3c4f02(0x4fa)]?.(_0x386ea9[_0x3c4f02(0x630)],_0x4a3c68);if(_0x43369e?.['events']?.[_0x3c4f02(0x4fa)])for(const {event:_0x133323,handler:_0x3c7c60}of _0x468124){try{_0x43369e['events']['off'](_0x133323,_0x3c7c60);}catch{}}_0x468124[_0x3c4f02(0x631)]=0x0;const _0xc18537=[..._0x17a5be[_0x3c4f02(0x413)]()]['map'](({worker:_0x2fd7d9})=>_0x2fd7d9);if(_0xc18537[_0x3c4f02(0x631)]===0x0)return;await Promise['all'](_0xc18537[_0x3c4f02(0x272)](_0x4d0008=>new Promise(_0x764599=>{const _0x273f63=_0x3c4f02;if(_0x4d0008[_0x273f63(0x4e3)]()){_0x764599();return;}let _0x4ffcc6=![];const _0xe35075=()=>{if(_0x4ffcc6)return;_0x4ffcc6=!![];if(_0x7f59f6)clearTimeout(_0x7f59f6);_0x764599();};_0x4d0008[_0x273f63(0x625)](_0x273f63(0x234),_0xe35075);const _0x7f59f6=setTimeout(()=>{const _0x2c72d8=_0x273f63;try{_0x4d0008[_0x2c72d8(0x68a)]['kill']();}catch{}},_0x62df41+0x1f4);_0x7f59f6[_0x273f63(0x4bd)]?.();try{_0x4d0008[_0x273f63(0x29c)]();}catch{try{_0x4d0008[_0x273f63(0x68a)][_0x273f63(0x442)]();}catch{}}})));}};return _0x1f83e1;}async function _0x3cb0e4({makeOkdb:_0x186e1d,port:_0x504c3e}){const _0x44a40b=_0x5560ca,_0x4d0792=await _0x186e1d();return _0x323786(_0x4d0792),_0x4d0792[_0x44a40b(0x48c)][_0x44a40b(0x3f5)](_0x504c3e);}function _0x323786(_0x50322b){const _0x302851=_0x5560ca;if(!_0x50322b||_0x50322b[_0x302851(0x66f)])return;_0x50322b[_0x302851(0x66f)]=!![];try{const {OKDBChangefeed:_0x10ba82}=requireOkdbChangefeed(),_0x179960=_0x50322b[_0x302851(0x5b6)];if(_0x179960&&typeof _0x179960['attachFeed']===_0x302851(0x3ec)){const _0x4db714=new _0x10ba82(_0x50322b);_0x4db714['start'](),_0x179960[_0x302851(0x485)](_0x4db714),_0x50322b[_0x302851(0x3d8)]=_0x4db714;}}catch(_0x262e33){_0x50322b[_0x302851(0x6a0)]?.[_0x302851(0x316)]?.(_0x302851(0x354)+(_0x262e33?.[_0x302851(0x62d)]??_0x262e33),{'feature':_0x302851(0x409)});}const _0x2e091c=_0x2c0d05=>{const _0x3bdfa5=_0x302851;if(!_0x2c0d05||typeof _0x2c0d05!==_0x3bdfa5(0x5c0)||_0x2c0d05[_0x2d146a]==null)return;if(_0x2c0d05[_0x2d146a]===_0x16603e)try{_0x50322b[_0x3bdfa5(0x5b6)]?.[_0x3bdfa5(0x4ff)]?.(_0x2c0d05[_0x3bdfa5(0x38d)],_0x2c0d05[_0x3bdfa5(0x207)]);}catch{}};process['on']('message',_0x2e091c),_0x50322b[_0x302851(0x2a2)]=_0x2e091c;{let _0x5543f4=process['cpuUsage'](),_0x40293b=Date['now']();const _0x17a696=()=>{const _0x53b446=_0x302851;if(typeof process[_0x53b446(0x4b6)]!==_0x53b446(0x3ec)||!process[_0x53b446(0x695)])return;const _0x4d3c80=Date[_0x53b446(0x4ea)](),_0x17e42b=process[_0x53b446(0x4ca)](),_0x224ce1=(_0x4d3c80-_0x40293b)*0x3e8,_0x17521b=_0x17e42b[_0x53b446(0x3b1)]-_0x5543f4[_0x53b446(0x3b1)]+(_0x17e42b[_0x53b446(0x58a)]-_0x5543f4['system']),_0x5ed037=_0x224ce1>0x0?Math[_0x53b446(0x368)](0x64,Math[_0x53b446(0x2fb)](_0x17521b/(_0x224ce1*(_0x10707d[_0x53b446(0x23a)]()[_0x53b446(0x631)]||0x1))*0x64)):0x0;_0x5543f4=_0x17e42b,_0x40293b=_0x4d3c80;const _0x5d602a=process[_0x53b446(0x565)]();let _0x9b74f=null;try{_0x9b74f=_0x50322b[_0x53b446(0x269)]?.['processors']?_0x50322b[_0x53b446(0x5e6)]?.[_0x53b446(0x400)]?.()??null:null;}catch{}try{process[_0x53b446(0x4b6)]({[_0x2d146a]:_0xa85062,'stats':{'rss':_0x5d602a[_0x53b446(0x2d3)],'heapUsed':_0x5d602a['heapUsed'],'heapTotal':_0x5d602a[_0x53b446(0x56e)],'external':_0x5d602a[_0x53b446(0x488)],'cpuPct':_0x5ed037,'cpuWindowMs':Math[_0x53b446(0x2fb)](_0x224ce1/0x3e8)||null},'processing':_0x9b74f});}catch{}},_0x1d06e6=Math['max'](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0xe26996=setInterval(_0x17a696,_0x1d06e6);_0xe26996[_0x302851(0x4bd)]?.(),_0x17a696();for(const _0x5c02f2 of[_0x302851(0x3de),_0x302851(0x540)]){_0x50322b[_0x302851(0x2b2)]?.['on']?.(_0x5c02f2,()=>{try{_0x17a696();}catch{}});}}let _0x49704c=![];const _0x1f136c=async _0x5e864e=>{const _0x5eaf05=_0x302851;if(_0x49704c)return;_0x49704c=!![];const _0xb51edc=setTimeout(()=>process['exit'](_0x5e864e),_0x62df41);_0xb51edc[_0x5eaf05(0x4bd)]?.();try{await _0x50322b[_0x5eaf05(0x519)]?.();}catch{}process[_0x5eaf05(0x234)](_0x5e864e);};process['on'](_0x302851(0x29c),()=>_0x1f136c(0x0));if(process[_0x302851(0x67b)]!==_0x302851(0x2cc)){const _0x417aa4=setInterval(()=>{const _0x405293=_0x302851;if(process[_0x405293(0x554)]===0x1)_0x1f136c(0x0);},_0x3d23e1);_0x417aa4[_0x302851(0x4bd)]?.(),_0x50322b['_clusterOrphanWatch']=_0x417aa4;}}return okdbCluster={'runClustered':_0xe47d76,'attachWorkerCluster':_0x323786},okdbCluster;}var hasRequiredOkdb;function requireOkdb(){const _0x448381=_0x42e206;if(hasRequiredOkdb)return okdb$1;hasRequiredOkdb=0x1;try{process['loadEnvFile']();}catch{}const _0xf46ca3=require$$1,_0x3d0262=require$$1$1,{resolveWorkers:_0x23bf33,isShmbufNative:_0x47ed2b}=requireOkdbWorkers();function _0xfc27a3(_0x4622a9){const _0x43826d=_0x4d7d,_0x39c042=_0x4622a9[_0x43826d(0x608)](0x2),_0x75b74d={};let _0x44ddba=0x0;while(_0x44ddba<_0x39c042[_0x43826d(0x631)]){const _0x2ba684=_0x39c042[_0x44ddba];if(_0x2ba684===_0x43826d(0x5b1)||_0x2ba684==='-p')_0x75b74d[_0x43826d(0x43c)]=Number(_0x39c042[++_0x44ddba]);else{if(_0x2ba684==='--path'||_0x2ba684==='-d')_0x75b74d['path']=_0x39c042[++_0x44ddba];else{if(_0x2ba684===_0x43826d(0x464)||_0x2ba684==='-k')_0x75b74d[_0x43826d(0x505)]=_0x39c042[++_0x44ddba];else{if(_0x2ba684===_0x43826d(0x21b)||_0x2ba684==='-c')_0x75b74d[_0x43826d(0x39e)]=_0x39c042[++_0x44ddba];else{if(_0x2ba684===_0x43826d(0x5ce))_0x75b74d['logLevel']=_0x39c042[++_0x44ddba];else{if(_0x2ba684===_0x43826d(0x55e))_0x75b74d[_0x43826d(0x5ae)]=!![];else{if(_0x2ba684==='--no-admin')_0x75b74d[_0x43826d(0x497)]=!![];else{if(_0x2ba684===_0x43826d(0x535))_0x75b74d[_0x43826d(0x284)]=_0x39c042[++_0x44ddba];else{if(_0x2ba684===_0x43826d(0x2ec))_0x75b74d['noCluster']=!![];else{if(_0x2ba684===_0x43826d(0x55d)||_0x2ba684==='-e')_0x75b74d[_0x43826d(0x35e)]=_0x39c042[++_0x44ddba];else{if(_0x2ba684===_0x43826d(0x3e7))_0x75b74d[_0x43826d(0x1e6)]=_0x39c042[++_0x44ddba];else{if(_0x2ba684===_0x43826d(0x47d))_0x75b74d[_0x43826d(0x4fd)]=!![];else{if(_0x2ba684===_0x43826d(0x446))_0x75b74d['blobs']=!![];else{if(_0x2ba684===_0x43826d(0x1df))_0x75b74d[_0x43826d(0x26b)]=!![];else{if(_0x2ba684===_0x43826d(0x392)){const _0x2aef59=[];while(_0x44ddba+0x1<_0x39c042[_0x43826d(0x631)]&&!_0x39c042[_0x44ddba+0x1][_0x43826d(0x39c)]('--')){_0x2aef59[_0x43826d(0x5fa)](_0x39c042[++_0x44ddba]);}_0x75b74d[_0x43826d(0x1db)]=_0x2aef59[_0x43826d(0x631)]>0x0?_0x2aef59:!![];}else{if(_0x2ba684==='--log-requests')_0x75b74d[_0x43826d(0x486)]=!![];else{if(_0x2ba684===_0x43826d(0x44d))_0x75b74d[_0x43826d(0x58f)]=_0x39c042[++_0x44ddba];else{if(_0x2ba684===_0x43826d(0x5d5))_0x75b74d[_0x43826d(0x3c8)]=_0x39c042[++_0x44ddba];else{if(_0x2ba684===_0x43826d(0x313))_0x75b74d[_0x43826d(0x236)]=_0x39c042[++_0x44ddba];else{if(_0x2ba684===_0x43826d(0x64a))_0x75b74d[_0x43826d(0x1fd)]=_0x39c042[++_0x44ddba];else{if(_0x2ba684==='--grants')_0x75b74d[_0x43826d(0x34e)]=_0x39c042[++_0x44ddba];else{if(_0x2ba684===_0x43826d(0x411))_0x75b74d[_0x43826d(0x529)]=_0x39c042[++_0x44ddba];else{if(_0x2ba684===_0x43826d(0x2ad))_0x75b74d[_0x43826d(0x3f9)]=_0x39c042[++_0x44ddba];else{if(_0x2ba684==='--username'||_0x2ba684==='-u')_0x75b74d['username']=_0x39c042[++_0x44ddba];else{if(_0x2ba684==='--address')_0x75b74d[_0x43826d(0x3f8)]=_0x39c042[++_0x44ddba];else{if(_0x2ba684===_0x43826d(0x451)||_0x2ba684==='-v'){const _0x33867c=require$$3;console[_0x43826d(0x6a0)](_0x33867c['version']),process[_0x43826d(0x234)](0x0);}else(_0x2ba684===_0x43826d(0x3d9)||_0x2ba684==='-h')&&(_0x19f71a(),process[_0x43826d(0x234)](0x0));}}}}}}}}}}}}}}}}}}}}}}}}}_0x44ddba++;}return _0x75b74d;}function _0x19f71a(){console['log']('\x0a\x20\x20okdb\x20—\x20standalone\x20OKDB\x20server\x0a\x0a\x20\x20Usage:\x0a\x20\x20\x20\x20okdb\x20[options]\x0a\x20\x20\x20\x20okdb\x20<command>\x0a\x0a\x20\x20Options:\x0a\x20\x20\x20\x20-p,\x20--port\x20<port>\x20\x20\x20\x20\x20\x20\x20\x20HTTP\x20port\x20(default:\x208484)\x0a\x20\x20\x20\x20-d,\x20--path\x20<dir>\x20\x20\x20\x20\x20\x20\x20\x20\x20Database\x20directory\x20(default:\x20./okdb-data)\x0a\x20\x20\x20\x20-k,\x20--key\x20\x20<secret>\x20\x20\x20\x20\x20\x20Encryption\x20key\x20for\x20data\x20at\x20rest\x0a\x20\x20\x20\x20-c,\x20--config\x20<file>\x20\x20\x20\x20\x20\x20Config\x20file\x20path\x20(default:\x20.kdbconfig)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--log-level\x20<level>\x20\x20Log\x20level:\x20debug\x20|\x20info\x20|\x20warn\x20|\x20error\x20(default:\x20info)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-repl\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Start\x20server\x20without\x20interactive\x20shell\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-admin\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20admin\x20UI\x0a\x20\x20\x20\x20\x20\x20\x20\x20--open\x20[ip\x20...]\x20\x20\x20\x20\x20\x20Open\x20mode:\x20bypass\x20auth\x20for\x20listed\x20IPs\x20(default:\x20localhost).\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Examples:\x20--open\x20\x20--open\x20192.168.1.0/24\x20\x20--open\x20*\x0a\x20\x20\x20\x20\x20\x20\x20\x20--log-requests\x20\x20\x20\x20\x20\x20\x20Print\x20every\x20HTTP\x20request\x20to\x20stdout\x20(for\x20debugging)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--workers\x20<n>\x20\x20\x20\x20\x20\x20\x20\x20Number\x20of\x20capable\x20worker\x20processes\x20sharing\x20the\x20listen\x20socket\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20(default:\x20cores\x20−\x201).\x20Each\x20worker\x20serves\x20HTTP\x20+\x20SSE\x20AND\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20processes\x20(claims\x20leases,\x20drains\x20on\x20its\x20own\x20loop);\x20the\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20cluster\x20primary\x20is\x20a\x20thin\x20passive\x20supervisor.\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-cluster\x20\x20\x20\x20\x20\x20\x20\x20\x20Run\x20single-process\x20(equivalent\x20to\x20--workers\x201)\x0a\x20\x20\x20\x20-v,\x20--version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Print\x20version\x20and\x20exit\x0a\x20\x20\x20\x20-h,\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x0a\x0a\x20\x20Commands:\x0a\x20\x20\x20\x20version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Print\x20version\x20and\x20exit\x0a\x20\x20\x20\x20doctor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Run\x20health\x20checks\x0a\x20\x20\x20\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Create\x20.kdbconfig\x20and\x20okdb-data/\x0a\x20\x20\x20\x20token\x20create\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Create\x20a\x20token\x20in\x20the\x20local\x20DB\x20(direct\x20access,\x20no\x20HTTP)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--name\x20<name>\x20\x20\x20\x20\x20\x20For\x20password\x20login\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--password\x20<pass>\x20\x20Password\x20(requires\x20--name)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--label\x20<text>\x20\x20\x20\x20\x20Human\x20description\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--permissions\x20<l>\x20\x20Comma-separated\x20baseline\x20permissions\x20(e.g.\x20\x22*\x22\x20or\x20\x22data:read\x22)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--grants\x20<json>\x20\x20\x20\x20Per-env\x20grants\x20as\x20JSON\x20(e.g.\x20\x27{\x22orders\x22:[\x22data:*\x22]}\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--ttl\x20<ms>\x20\x20\x20\x20\x20\x20\x20\x20\x20Optional\x20TTL\x20in\x20milliseconds\x0a\x20\x20\x20\x20token\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20List\x20all\x20tokens\x20in\x20the\x20local\x20DB\x0a\x20\x20\x20\x20token\x20revoke\x20<id>\x20\x20\x20\x20\x20\x20\x20\x20Revoke\x20(delete)\x20a\x20token\x20by\x20id\x20(full\x20uuid\x20or\x20unique\x20prefix)\x0a\x20\x20\x20\x20join\x20<address>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Join\x20an\x20existing\x20cluster\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--token\x20<t>\x20\x20\x20\x20\x20\x20\x20\x20Bearer\x20token\x20from\x20the\x20cluster\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--username\x20<u>\x20\x20\x20\x20\x20Or,\x20username\x20for\x20login\x20exchange\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--password\x20<p>\x20\x20\x20\x20\x20Password\x20for\x20login\x20exchange\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--address\x20<addr>\x20\x20\x20This\x20node\x27s\x20reachable\x20sync\x20address\x20(required)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--path\x20<dir>\x20\x20\x20\x20\x20\x20\x20Local\x20DB\x20path\x0a\x20\x20\x20\x20backup\x20[dir]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Hot\x20filesystem\x20backup\x20via\x20LMDB\x20native\x20copy\x20(default:\x20./okdb-backup)\x0a\x20\x20\x20\x20export\x20<file>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Streaming\x20NDJSON\x20logical\x20export\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env\x20<name>\x20\x20\x20\x20\x20\x20env\x20to\x20export\x20(default:\x20default)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--types\x20<a,b,...>\x20comma-separated\x20type\x20filter\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--changes\x20\x20\x20\x20\x20\x20\x20\x20\x20include\x20changelog\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--blobs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20also\x20export\x20blob\x20files\x20alongside\x0a\x20\x20\x20\x20import\x20<file>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Streaming\x20NDJSON\x20logical\x20import\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env\x20<name>\x20\x20\x20\x20\x20\x20target\x20env\x20override\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--types\x20<a,b,...>\x20import\x20only\x20these\x20types\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--drop\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20drop\x20&\x20recreate\x20existing\x20types\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--changes\x20\x20\x20\x20\x20\x20\x20\x20\x20restore\x20changelog\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--blobs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20also\x20import\x20blob\x20files\x20alongside\x0a\x20\x20\x20\x20reset\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Delete\x20and\x20recreate\x20database\x20(with\x20confirmation);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20node\x20identity\x20and\x20licenses\x20are\x20preserved\x0a\x20\x20\x20\x20license\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20List\x20stored\x20licenses,\x20current\x20tier,\x20and\x20usage\x0a\x20\x20\x20\x20license\x20<blob|path>\x20\x20\x20\x20\x20\x20Add\x20a\x20license\x20blob\x20(or\x20read\x20from\x20a\x20.license\x20file)\x0a\x20\x20\x20\x20license\x20<activation>\x20\x20\x20\x20\x20Activate\x20a\x20previously-added\x20license\x20with\x20the\x20vendor\x27s\x20token\x0a\x20\x20\x20\x20license\x20<id>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20details\x20for\x20one\x20stored\x20license\x20(by\x20uuid\x20or\x20prefix)\x0a\x20\x20\x20\x20license\x20remove\x20<id>\x20\x20\x20\x20\x20\x20Remove\x20a\x20stored\x20license\x0a\x0a\x20\x20Environment\x20variables:\x0a\x20\x20\x20\x20OKDB_PORT\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20HTTP\x20port\x0a\x20\x20\x20\x20OKDB_PATH\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Database\x20directory\x0a\x20\x20\x20\x20OKDB_LOG_LEVEL\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Log\x20level\x20(debug|info|warn|error)\x0a\x20\x20\x20\x20OKDB_KEY\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Encryption\x20key\x0a\x20\x20\x20\x20OKDB_NO_REPL=1\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20REPL\x0a\x20\x20\x20\x20OKDB_NO_ADMIN=1\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20admin\x20UI\x0a\x20\x20\x20\x20OKDB_HTTP_WORKERS\x20\x20\x20\x20\x20\x20\x20\x20\x20Number\x20of\x20passive\x20HTTP\x20worker\x20processes\x20(default:\x20cores\x20−\x201;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20forced\x20to\x201\x20if\x20the\x20shmbuf\x20native\x20binding\x20is\x20unavailable)\x0a\x0a\x20\x20Config\x20file\x20(.kdbconfig)\x20—\x20JSON,\x20all\x20keys\x20optional:\x0a\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22port\x22:\x20\x20\x20\x20\x208484,\x0a\x20\x20\x20\x20\x20\x20\x22path\x22:\x20\x20\x20\x20\x20\x22./okdb-data\x22,\x0a\x20\x20\x20\x20\x20\x20\x22key\x22:\x20\x20\x20\x20\x20\x20\x22...\x22,\x0a\x20\x20\x20\x20\x20\x20\x22logLevel\x22:\x20\x22info\x22,\x0a\x20\x20\x20\x20\x20\x20\x22noAdmin\x22:\x20\x20false,\x0a\x20\x20\x20\x20\x20\x20\x22noRepl\x22:\x20\x20\x20false,\x0a\x20\x20\x20\x20\x20\x20\x22auth\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22open\x22:\x20false\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20Examples:\x0a\x20\x20\x20\x20okdb\x0a\x20\x20\x20\x20okdb\x20--port\x209000\x20--path\x20./mydb\x0a\x20\x20\x20\x20okdb\x20--no-repl\x20--port\x208080\x0a\x20\x20\x20\x20okdb\x20--open\x0a\x20\x20\x20\x20okdb\x20--open\x20192.168.1.0/24\x0a\x20\x20\x20\x20okdb\x20doctor\x0a\x20\x20\x20\x20okdb\x20backup\x20./my-backup\x0a');}const _0x29ed62=new Set(['debug','info',_0x448381(0x316),_0x448381(0x2e5)]);function _0x1f8f79(_0x89df29){const _0x497843=_0x448381,_0x37cbc0=_0x89df29['config']?_0xf46ca3[_0x497843(0x2f9)](_0x89df29[_0x497843(0x39e)]):_0xf46ca3[_0x497843(0x2f9)](_0x497843(0x4dc));let _0x411da4={};if(_0x3d0262[_0x497843(0x647)](_0x37cbc0))try{const _0x5c8620=_0x3d0262[_0x497843(0x2bd)](_0x37cbc0,_0x497843(0x5a6))['replace'](/^\uFEFF/,'');_0x411da4=JSON[_0x497843(0x42a)](_0x5c8620),console[_0x497843(0x6a0)](_0x497843(0x30e)+_0x37cbc0);}catch(_0x50556c){console[_0x497843(0x2e5)](_0x497843(0x5e2)+_0x37cbc0+':\x20'+_0x50556c['message']),process['exit'](0x1);}const _0x3ccc9d={'port':process.env.OKDB_PORT?Number(process.env.OKDB_PORT):undefined,'path':process.env.OKDB_PATH??undefined,'key':process.env.OKDB_KEY??undefined,'logLevel':process.env.OKDB_LOG_LEVEL??undefined,'noRepl':process.env.OKDB_NO_REPL==='1'?!![]:undefined,'noAdmin':process.env.OKDB_NO_ADMIN==='1'?!![]:undefined},_0x1d6173={'port':_0x89df29[_0x497843(0x43c)]??_0x411da4[_0x497843(0x43c)]??_0x3ccc9d[_0x497843(0x43c)]??0x2124,'dbPath':_0x89df29[_0x497843(0x47b)]??_0x411da4[_0x497843(0x47b)]??_0x3ccc9d[_0x497843(0x47b)]??_0x497843(0x59f),'key':_0x89df29['key']??_0x411da4[_0x497843(0x505)]??_0x3ccc9d[_0x497843(0x505)]??undefined,'logLevel':_0x89df29[_0x497843(0x482)]??_0x411da4[_0x497843(0x482)]??_0x3ccc9d[_0x497843(0x482)]??_0x497843(0x2ee),'noRepl':_0x89df29[_0x497843(0x5ae)]??_0x411da4['noRepl']??_0x3ccc9d['noRepl']??![],'noAdmin':_0x89df29['noAdmin']??_0x411da4[_0x497843(0x497)]??_0x3ccc9d[_0x497843(0x497)]??![],'admin':_0x411da4['admin']??{},'api':_0x411da4[_0x497843(0x65c)]??undefined,'auth':_0x411da4[_0x497843(0x5a0)]??undefined,'mcp':_0x411da4['mcp']??undefined,'http':_0x411da4[_0x497843(0x48c)]??undefined,'timeMachine':_0x411da4[_0x497843(0x38b)]!==![]?_0x411da4[_0x497843(0x38b)]??{}:![]};if(_0x89df29['noCluster'])_0x1d6173[_0x497843(0x329)]=!![];if(_0x89df29[_0x497843(0x284)]!==undefined)_0x1d6173[_0x497843(0x286)]=_0x89df29[_0x497843(0x284)];return _0x89df29[_0x497843(0x1db)]!==undefined&&(_0x1d6173['auth']=_0x1d6173[_0x497843(0x5a0)]||{},_0x1d6173[_0x497843(0x5a0)][_0x497843(0x1db)]=_0x89df29[_0x497843(0x1db)]),_0x89df29[_0x497843(0x486)]&&(_0x1d6173['debug']=_0x1d6173[_0x497843(0x441)]||{},_0x1d6173[_0x497843(0x441)]['logRequests']=!![]),(!Number[_0x497843(0x5bd)](_0x1d6173[_0x497843(0x43c)])||_0x1d6173[_0x497843(0x43c)]<0x1||_0x1d6173['port']>0xffff)&&(console[_0x497843(0x2e5)](_0x497843(0x283)+_0x1d6173[_0x497843(0x43c)]+_0x497843(0x26d)),process[_0x497843(0x234)](0x1)),!_0x29ed62[_0x497843(0x258)](_0x1d6173[_0x497843(0x482)])&&(console[_0x497843(0x2e5)](_0x497843(0x54b)+_0x1d6173['logLevel']+'\x22\x20(must\x20be\x20debug|info|warn|error)'),process[_0x497843(0x234)](0x1)),_0x1d6173;}function _0x256bf3(_0x5ac21d){const _0x59983c=_0x448381;return!!(_0x5ac21d&&typeof _0x5ac21d===_0x59983c(0x5c0)&&!Array[_0x59983c(0x59a)](_0x5ac21d)&&Object[_0x59983c(0x5cf)](_0x5ac21d)['length']>0x0);}function _0x38d5ca(_0x1f9505){const _0x2f5c87=_0x448381;return{..._0x1f9505[_0x2f5c87(0x505)]?{'encryptionKey':_0x1f9505[_0x2f5c87(0x505)]}:{},'engines':![],'processors':![],'compaction':![]};}const _0x1bca5c=!process[_0x448381(0x445)]['isTTY']||!!process.env.NO_COLOR;function _0x201346(_0x1ddd6f,_0x49211d){const _0x3e0e6a=_0x448381;return _0x1bca5c?_0x49211d:'\x1b['+_0x1ddd6f+'m'+_0x49211d+_0x3e0e6a(0x528);}function _0x1235e7(_0x45bdcf){const _0x49ae72=_0x448381;if(!_0x45bdcf||_0x45bdcf[_0x49ae72(0x631)]===0x0)return;const _0xaad2fd='─'['repeat'](0x38);process[_0x49ae72(0x434)][_0x49ae72(0x2d0)]('\x0a'),process[_0x49ae72(0x434)][_0x49ae72(0x2d0)](_0x201346('33',_0x49ae72(0x2c1)+_0x45bdcf['length']+'\x20SECURITY\x20NOTICE'+(_0x45bdcf['length']>0x1?'S':'')+'\x0a')),process[_0x49ae72(0x434)][_0x49ae72(0x2d0)]('\x20\x20'+_0xaad2fd+'\x0a');for(const _0x208235 of _0x45bdcf){const _0x3289fe=_0x208235[_0x49ae72(0x385)]===_0x49ae72(0x2e5)?_0x201346('31',_0x49ae72(0x271)):_0x201346('33',_0x49ae72(0x51c));process[_0x49ae72(0x434)]['write'](_0x3289fe+'\x20\x20'+_0x201346('1',_0x208235['title'])+'\x0a'),process['stderr']['write'](_0x49ae72(0x545)+_0x208235[_0x49ae72(0x62d)]+'\x0a');if(_0x208235[_0x49ae72(0x4ce)])process['stderr']['write'](_0x49ae72(0x545)+_0x201346('2','Hint:\x20'+_0x208235[_0x49ae72(0x4ce)])+'\x0a');process[_0x49ae72(0x434)][_0x49ae72(0x2d0)]('\x0a');}process[_0x49ae72(0x434)][_0x49ae72(0x2d0)]('\x20\x20'+_0xaad2fd+'\x0a\x0a');}function _0x43c2d5(_0x3b7ecc,_0x3c9b53,_0x5abc5e={}){const _0x83ef31=_0x448381,_0x2d8999=_0x3b7ecc[_0x83ef31(0x48c)][_0x83ef31(0x3f5)](_0x3c9b53,_0x5abc5e);if(_0x2d8999&&_0x2d8999[_0x83ef31(0x25a)])return Promise[_0x83ef31(0x2f9)](_0x2d8999);return new Promise((_0x15a803,_0x19a6d1)=>{const _0xd67fb=_0x83ef31;_0x2d8999['once']('listening',_0x15a803),_0x2d8999[_0xd67fb(0x625)](_0xd67fb(0x2e5),_0x19a6d1);});}async function _0x2f5a4b(_0x358570){const _0x3f55cf=_0x448381,_0x133c58=require$$4$1;console[_0x3f55cf(0x6a0)](_0x3f55cf(0x58e));let _0x4538e1=!![];const _0x4e8d89=(_0x1f19ce,_0x1718b6)=>{const _0x580866=_0x3f55cf;console[_0x580866(0x6a0)]('\x20\x20'+(_0x1f19ce?'✓':'✗')+'\x20'+_0x1718b6);if(!_0x1f19ce)_0x4538e1=![];},_0x4e0969=Number(process[_0x3f55cf(0x29a)]['replace']('v','')[_0x3f55cf(0x4f0)]('.')[0x0]);_0x4e8d89(_0x4e0969>=0x12,_0x3f55cf(0x649)+process[_0x3f55cf(0x29a)]+(_0x4e0969<0x12?'\x20\x20(need\x20≥\x2018)':''));const _0x293197=_0xf46ca3[_0x3f55cf(0x2f9)](_0x358570[_0x3f55cf(0x57b)]);try{_0x3d0262[_0x3f55cf(0x491)](_0x293197,{'recursive':!![]});const _0x2b5ba5=_0xf46ca3[_0x3f55cf(0x553)](_0x293197,_0x3f55cf(0x227));_0x3d0262[_0x3f55cf(0x353)](_0x2b5ba5,''),_0x3d0262[_0x3f55cf(0x585)](_0x2b5ba5),_0x4e8d89(!![],_0x3f55cf(0x3b4)+_0x293197);}catch(_0x203d4d){_0x4e8d89(![],_0x3f55cf(0x377)+_0x293197+_0x3f55cf(0x420)+_0x203d4d[_0x3f55cf(0x62d)]+')');}const _0x476775=await new Promise(_0x4f757d=>{const _0x5c819b=_0x3f55cf,_0x13e301=_0x133c58[_0x5c819b(0x67a)]();_0x13e301[_0x5c819b(0x625)](_0x5c819b(0x2e5),()=>_0x4f757d(![])),_0x13e301[_0x5c819b(0x625)]('listening',()=>{_0x13e301['close'](),_0x4f757d(!![]);}),_0x13e301[_0x5c819b(0x3f5)](_0x358570['port'],_0x5c819b(0x404));});_0x4e8d89(_0x476775,'port\x20'+_0x358570[_0x3f55cf(0x43c)]+'\x20'+(_0x476775?_0x3f55cf(0x233):_0x3f55cf(0x511)));const _0x2abba8=_0xf46ca3['resolve'](_0x3f55cf(0x4dc));if(_0x3d0262['existsSync'](_0x2abba8))try{JSON[_0x3f55cf(0x42a)](_0x3d0262['readFileSync'](_0x2abba8,_0x3f55cf(0x5a6))[_0x3f55cf(0x2aa)](/^\uFEFF/,'')),_0x4e8d89(!![],_0x3f55cf(0x243)+_0x2abba8);}catch(_0x11f1de){_0x4e8d89(![],_0x3f55cf(0x639)+_0x11f1de['message']);}else _0x4e8d89(!![],_0x3f55cf(0x640));if(_0x47ed2b()){const _0x598e13=_0x23bf33(_0x358570,{'shmbufNative':!![]});_0x4e8d89(!![],_0x3f55cf(0x484)+_0x598e13+_0x3f55cf(0x47f)+(_0x598e13===0x1?'':'s')+')');}else _0x4e8d89(!![],_0x3f55cf(0x309));if(!_0x476775)try{const _0x8660ab=require('../okdb'),_0x3b85b9=new _0x8660ab(_0x293197,{'engines':![],'processors':![],'compaction':![],'http':![],'auth':{'open':!![]}});await _0x3b85b9[_0x3f55cf(0x1db)]();try{await _0x3b85b9[_0x3f55cf(0x5e6)][_0x3f55cf(0x1db)]({'reader':!![]});const _0x1456e9=_0x3b85b9['processes'][_0x3f55cf(0x356)](),_0x5b5426=_0x1456e9[_0x3f55cf(0x4e0)](_0x80fc33=>_0x80fc33['supervisorKey']!=null)[_0x3f55cf(0x631)];_0x4e8d89(!![],_0x3f55cf(0x4f7)+_0x1456e9[_0x3f55cf(0x631)]+_0x3f55cf(0x29d)+(_0x1456e9[_0x3f55cf(0x631)]===0x1?'':'es')+'\x20('+_0x5b5426+_0x3f55cf(0x5bb));}finally{await _0x3b85b9[_0x3f55cf(0x519)]();}}catch{}console[_0x3f55cf(0x6a0)](''),_0x4538e1?console['log'](_0x3f55cf(0x25f)):(console[_0x3f55cf(0x6a0)](_0x3f55cf(0x352)),process['exit'](0x1));}async function _0x30faec(){const _0x245cdf=_0x448381,_0x3627fc=_0xf46ca3[_0x245cdf(0x2f9)](_0x245cdf(0x4dc));!_0x3d0262['existsSync'](_0x3627fc)?(_0x3d0262[_0x245cdf(0x353)](_0x3627fc,JSON['stringify']({'port':0x2124,'path':'./okdb-data','logLevel':'info','noRepl':![],'noAdmin':![]},null,0x2)+'\x0a'),console[_0x245cdf(0x6a0)](_0x245cdf(0x35d))):console[_0x245cdf(0x6a0)](_0x245cdf(0x2c3));const _0x10d6ef=_0xf46ca3[_0x245cdf(0x2f9)](_0x245cdf(0x59f));!_0x3d0262[_0x245cdf(0x647)](_0x10d6ef)?(_0x3d0262[_0x245cdf(0x491)](_0x10d6ef,{'recursive':!![]}),console[_0x245cdf(0x6a0)](_0x245cdf(0x456))):console[_0x245cdf(0x6a0)]('[okdb]\x20./okdb-data\x20already\x20exists\x20—\x20skipping'),console[_0x245cdf(0x6a0)](_0x245cdf(0x202));}async function _0x4e9aba(_0x1d5ad1){const _0xef2a56=_0x448381,_0x53be8f=_0xf46ca3[_0xef2a56(0x2f9)](_0x1d5ad1[_0xef2a56(0x57b)]);if(!_0x3d0262[_0xef2a56(0x647)](_0x53be8f)){console['log'](_0xef2a56(0x2f5)+_0x53be8f+'\x20does\x20not\x20exist');return;}const _0x30d5dd=require$$0$3,_0x1db263=_0x30d5dd[_0xef2a56(0x5ee)]({'input':process[_0xef2a56(0x291)],'output':process[_0xef2a56(0x445)]}),_0xc91b3b=await new Promise(_0x43e6db=>_0x1db263[_0xef2a56(0x437)]('\x0a\x20\x20Delete\x20ALL\x20data\x20in\x20'+_0x53be8f+_0xef2a56(0x449),_0x43e6db));_0x1db263[_0xef2a56(0x519)](),console[_0xef2a56(0x6a0)]('');if(_0xc91b3b[_0xef2a56(0x215)]()[_0xef2a56(0x3a6)]()!=='yes'){console['log'](_0xef2a56(0x47e));return;}let _0x5d0c40=null;try{_0x5d0c40=await _0x165c56(_0x53be8f,_0x1d5ad1,async _0x1622f4=>{const _0x4279a6=_0xef2a56,_0x42717c=_0x1622f4['_systemEnv'],_0x37971a=_0x42717c?.['db']?.['get'](_0x4279a6(0x65a))??null,_0x2a3179=[];if(_0x42717c?.[_0x4279a6(0x63e)](_0x4279a6(0x336)))for(const {key:_0x843633,value:_0x215f31}of _0x42717c['getRange'](_0x4279a6(0x336))){_0x2a3179['push']({'key':_0x843633,'value':_0x215f31});}return{'identity':_0x37971a,'licenses':_0x2a3179};});}catch(_0x9799ed){console['log']('[okdb]\x20warning:\x20could\x20not\x20read\x20node\x20identity/licenses\x20before\x20reset\x20('+_0x9799ed['message']+_0xef2a56(0x4f2));}_0x3d0262[_0xef2a56(0x2fc)](_0x53be8f,{'recursive':!![],'force':!![]}),console['log'](_0xef2a56(0x5c5)+_0x53be8f+'\x20deleted');if(_0x5d0c40&&(_0x5d0c40[_0xef2a56(0x427)]||_0x5d0c40['licenses'][_0xef2a56(0x631)]>0x0))try{await _0x165c56(_0x53be8f,_0x1d5ad1,async _0x1207f3=>{const _0x2a8c9a=_0xef2a56,_0x145a3c=_0x1207f3[_0x2a8c9a(0x2b9)];_0x5d0c40[_0x2a8c9a(0x427)]&&_0x145a3c['db']['putSync'](_0x2a8c9a(0x65a),_0x5d0c40[_0x2a8c9a(0x427)]);if(_0x5d0c40[_0x2a8c9a(0x228)][_0x2a8c9a(0x631)]>0x0){if(!_0x145a3c['hasType'](_0x2a8c9a(0x336)))await _0x145a3c[_0x2a8c9a(0x206)](_0x2a8c9a(0x336));for(const {key:_0xe6068,value:_0x1f38a9}of _0x5d0c40[_0x2a8c9a(0x228)]){await _0x145a3c[_0x2a8c9a(0x473)](_0x2a8c9a(0x336),_0xe6068,_0x1f38a9);}}});const _0x28419f=[];if(_0x5d0c40[_0xef2a56(0x427)])_0x28419f[_0xef2a56(0x5fa)](_0xef2a56(0x289));if(_0x5d0c40[_0xef2a56(0x228)][_0xef2a56(0x631)]>0x0)_0x28419f[_0xef2a56(0x5fa)](_0x5d0c40['licenses'][_0xef2a56(0x631)]+_0xef2a56(0x1e8));console[_0xef2a56(0x6a0)]('[okdb]\x20preserved:\x20'+_0x28419f['join']('\x20+\x20'));}catch(_0x4da1f4){console[_0xef2a56(0x6a0)](_0xef2a56(0x666)+_0x4da1f4[_0xef2a56(0x62d)]);}}async function _0x165c56(_0x13b2d1,_0x38cd62,_0x30b863){const _0x4cdcae=_0x448381,_0x45fb11=require$$5,_0xc676c2=new _0x45fb11(_0x13b2d1,{'admin':![],'mcp':![],'http':![],'timeMachine':![],'engines':![],'processors':![],'compaction':![],'_skipBootRuntime':!![],..._0x38d5ca(_0x38cd62)});await _0xc676c2['open']();try{return await _0x30b863(_0xc676c2);}finally{await _0xc676c2[_0x4cdcae(0x519)]();}}async function _0x3daf70(_0x3e9fd5,_0xee8b0e){const _0x390e52=_0x448381,_0x2755a7=require$$5,_0x5955d9=_0xf46ca3[_0x390e52(0x2f9)](_0xee8b0e['dbPath']);console[_0x390e52(0x6a0)](_0x390e52(0x25b)+_0x5955d9+'…');const _0x2ea228=new _0x2755a7(_0x5955d9,_0x38d5ca(_0xee8b0e));await _0x2ea228[_0x390e52(0x1db)](),console[_0x390e52(0x6a0)]('[okdb]\x20backing\x20up\x20to\x20'+_0x3e9fd5+'…');const {envs:_0x5e0fd6}=await _0x2ea228['migrate']['backup'](_0x3e9fd5);for(const _0x327e0e of _0x5e0fd6){const _0x141a77=_0x327e0e['sizeBefore']>0x0?_0x390e52(0x420)+(_0x327e0e[_0x390e52(0x3b2)]/0x400/0x400)[_0x390e52(0x33c)](0x2)+'\x20MB\x20→\x20'+(_0x327e0e[_0x390e52(0x4a5)]/0x400/0x400)['toFixed'](0x2)+_0x390e52(0x2f4):'';console['log'](_0x390e52(0x461)+_0x327e0e[_0x390e52(0x58f)]+_0x390e52(0x693)+_0x327e0e['dest']+_0x141a77);}await _0x2ea228[_0x390e52(0x519)](),console['log']('[okdb]\x20backup\x20complete');}async function _0x5dea01(_0x2333a1,_0x59e76c,_0x321d63){const _0x554bd5=_0x448381,_0x3e68e6=require$$5,_0x48aad7=_0xf46ca3[_0x554bd5(0x2f9)](_0x59e76c[_0x554bd5(0x57b)]),_0x4d67d7=_0x321d63[_0x554bd5(0x35e)]??'default',_0xeef9f9=_0x321d63[_0x554bd5(0x1e6)]?_0x321d63[_0x554bd5(0x1e6)]['split'](',')[_0x554bd5(0x272)](_0x48b8ea=>_0x48b8ea['trim']()):null;console[_0x554bd5(0x6a0)](_0x554bd5(0x25b)+_0x48aad7+'…');const _0x390b0e=new _0x3e68e6(_0x48aad7,_0x38d5ca(_0x59e76c));await _0x390b0e[_0x554bd5(0x1db)](),console[_0x554bd5(0x6a0)](_0x554bd5(0x410)+_0x4d67d7+_0x554bd5(0x20f)+_0x2333a1+'…');const _0x41700e=await _0x390b0e[_0x554bd5(0x642)]['exportToFile'](_0x2333a1,{'envName':_0x4d67d7,'types':_0xeef9f9,'includeChanges':!!_0x321d63['changes']});console[_0x554bd5(0x6a0)]('[okdb]\x20exported\x20\x20types='+_0x41700e[_0x554bd5(0x1e6)]+'\x20\x20records='+_0x41700e[_0x554bd5(0x4be)]+_0x554bd5(0x248)+_0x41700e[_0x554bd5(0x4fd)]);if(_0x321d63[_0x554bd5(0x67d)]){const _0xc6b201=_0xf46ca3[_0x554bd5(0x553)](_0xf46ca3[_0x554bd5(0x3d4)](_0x2333a1),_0x554bd5(0x67d));process[_0x554bd5(0x445)][_0x554bd5(0x2d0)]('[okdb]\x20exporting\x20blobs…');const {count:_0x473376,bytes:_0x228706}=await _0x390b0e[_0x554bd5(0x642)][_0x554bd5(0x4ad)](_0xc6b201);console[_0x554bd5(0x6a0)]('\x0d[okdb]\x20blobs:\x20'+_0xc6b201+_0x554bd5(0x420)+_0x473376+_0x554bd5(0x418)+(_0x473376!==0x1?'s':'')+',\x20'+(_0x228706/0x400/0x400)[_0x554bd5(0x33c)](0x2)+_0x554bd5(0x2f4));}await _0x390b0e[_0x554bd5(0x519)](),console[_0x554bd5(0x6a0)](_0x554bd5(0x517));}async function _0x1287f2(_0x24b510,_0x58baf9,_0x28ee28){const _0x489cbc=_0x448381,_0x334f59=require$$5,_0x3e9876=_0xf46ca3[_0x489cbc(0x2f9)](_0x58baf9['dbPath']),_0x406770=_0x28ee28[_0x489cbc(0x35e)]??null,_0x751927=_0x28ee28[_0x489cbc(0x1e6)]?_0x28ee28[_0x489cbc(0x1e6)]['split'](',')[_0x489cbc(0x272)](_0x224b87=>_0x224b87[_0x489cbc(0x215)]()):null,_0x5265cd=!!_0x28ee28[_0x489cbc(0x26b)];console[_0x489cbc(0x6a0)](_0x489cbc(0x25b)+_0x3e9876+'…');const _0x3a9613=new _0x334f59(_0x3e9876,_0x38d5ca(_0x58baf9));await _0x3a9613[_0x489cbc(0x1db)](),console[_0x489cbc(0x6a0)]('[okdb]\x20importing\x20'+_0x24b510+'…');const _0x3e8923=await _0x3a9613[_0x489cbc(0x642)][_0x489cbc(0x3ed)](_0x24b510,{'envName':_0x406770,'types':_0x751927,'dropExisting':_0x5265cd,'includeChanges':!!_0x28ee28[_0x489cbc(0x4fd)],'onProgress':({type:_0x5f3862,count:_0x2d2f78})=>{const _0x14fa3b=_0x489cbc;process[_0x14fa3b(0x445)][_0x14fa3b(0x2d0)](_0x14fa3b(0x610)+_0x5f3862+':\x20'+_0x2d2f78+_0x14fa3b(0x2f8));}});process[_0x489cbc(0x445)]['write']('\x0a'),console[_0x489cbc(0x6a0)](_0x489cbc(0x3dd)+_0x3e8923[_0x489cbc(0x1e6)]+_0x489cbc(0x5f2)+_0x3e8923[_0x489cbc(0x4be)]+_0x489cbc(0x248)+_0x3e8923[_0x489cbc(0x4fd)]);if(_0x28ee28[_0x489cbc(0x67d)]){const _0x3f6c55=_0xf46ca3[_0x489cbc(0x553)](_0xf46ca3['dirname'](_0x24b510),'blobs');if(_0x3d0262[_0x489cbc(0x647)](_0x3f6c55)){const {imported:_0x2d7a6b,skipped:_0x5eeffe}=await _0x3a9613[_0x489cbc(0x642)][_0x489cbc(0x2ce)](_0x3f6c55);console[_0x489cbc(0x6a0)](_0x489cbc(0x276)+_0x2d7a6b+_0x489cbc(0x592)+_0x5eeffe);}}await _0x3a9613[_0x489cbc(0x519)](),console['log'](_0x489cbc(0x507));}async function _0x132b69(_0x2c993e,_0x1e0b7d){const _0x9c68db=_0x448381;_0x1e0b7d[_0x9c68db(0x3c8)]&&!_0x1e0b7d[_0x9c68db(0x58f)]&&(console[_0x9c68db(0x2e5)](_0x9c68db(0x489)),process[_0x9c68db(0x234)](0x1));const _0x3d7c76=_0x1e0b7d['permissions']?_0x1e0b7d['permissions']['split'](',')['map'](_0x9ec129=>_0x9ec129[_0x9c68db(0x215)]())[_0x9c68db(0x4e0)](Boolean):[];let _0x4ba2a3={};if(_0x1e0b7d[_0x9c68db(0x34e)])try{_0x4ba2a3=JSON[_0x9c68db(0x42a)](_0x1e0b7d[_0x9c68db(0x34e)]);if(typeof _0x4ba2a3!==_0x9c68db(0x5c0)||Array[_0x9c68db(0x59a)](_0x4ba2a3)||_0x4ba2a3===null)throw new Error();}catch{console['error'](_0x9c68db(0x2ed)),process[_0x9c68db(0x234)](0x1);}const _0x8e4af9=require$$5,{randomToken:_0x1655ff,hashToken:_0x912ae8,hashPassword:_0x3b18c3}=requireOkdbAuthTokens(),_0x2a1984=require$$0$1,_0xb8d415=_0xf46ca3['resolve'](_0x2c993e['dbPath']),_0x41847c=new _0x8e4af9(_0xb8d415,_0x38d5ca(_0x2c993e));await _0x41847c[_0x9c68db(0x1db)]();try{await _0x41847c[_0x9c68db(0x5a0)]['_ensureTokensType']();if(_0x1e0b7d[_0x9c68db(0x58f)]){const _0x5df451=await _0x41847c['auth']['_lookupByName'](_0x1e0b7d[_0x9c68db(0x58f)]);_0x5df451&&(console[_0x9c68db(0x2e5)](_0x9c68db(0x3ba)+_0x1e0b7d['name']+'\x22\x20already\x20exists'),process[_0x9c68db(0x234)](0x1));}const _0x231e82=_0x1655ff(0x20),_0x2ab78e=_0x912ae8(_0x231e82),_0x3d3d5e=_0x1e0b7d[_0x9c68db(0x3c8)]?await _0x3b18c3(_0x1e0b7d[_0x9c68db(0x3c8)]):null,_0x138f75=_0x2a1984[_0x9c68db(0x60c)](),_0x3bce25={'tokenHash':_0x2ab78e,'name':_0x1e0b7d['name']||null,'passwordHash':_0x3d3d5e,'label':_0x1e0b7d[_0x9c68db(0x236)]||null,'permissions':_0x3d7c76,'grants':_0x4ba2a3,'createdAt':Date['now'](),'lastUsedAt':null},_0x291a79=_0x1e0b7d[_0x9c68db(0x529)]?{'ttl':Number(_0x1e0b7d[_0x9c68db(0x529)])}:undefined;await _0x41847c[_0x9c68db(0x2b9)][_0x9c68db(0x473)](_0x9c68db(0x4bf),_0x138f75,_0x3bce25,_0x291a79),console[_0x9c68db(0x6a0)](_0x9c68db(0x460)),console[_0x9c68db(0x6a0)]('\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x138f75),console['log'](_0x9c68db(0x679)+(_0x1e0b7d[_0x9c68db(0x58f)]||_0x9c68db(0x39b))),console[_0x9c68db(0x6a0)](_0x9c68db(0x281)+(_0x1e0b7d[_0x9c68db(0x236)]||'(unset)')),console['log'](_0x9c68db(0x2e3)+(_0x3d7c76[_0x9c68db(0x553)](',\x20')||_0x9c68db(0x4af))),console['log']('\x0a\x20\x20Raw\x20token\x20(shown\x20once,\x20save\x20it\x20now):\x0a'),console['log'](_0x9c68db(0x63f)+_0x231e82+'\x0a');}finally{await _0x41847c[_0x9c68db(0x519)]();}}async function _0x46da84(_0x2fa216){const _0x1169e9=_0x448381,_0x5bde7d=require$$5,_0x49608f=_0xf46ca3[_0x1169e9(0x2f9)](_0x2fa216['dbPath']),_0x3dcf0a=new _0x5bde7d(_0x49608f,_0x38d5ca(_0x2fa216));await _0x3dcf0a['open']();try{const _0x367130=_0x3dcf0a[_0x1169e9(0x2b9)];if(!_0x367130||!_0x367130[_0x1169e9(0x63e)]('~tokens')){console['log'](_0x1169e9(0x61c));return;}const _0x680b8a=[];for(const {key:_0xe0a1e4,value:_0x3ff369}of _0x367130[_0x1169e9(0x698)](_0x1169e9(0x4bf))){_0x680b8a[_0x1169e9(0x5fa)]({'id':_0xe0a1e4,'name':_0x3ff369[_0x1169e9(0x58f)]||_0x1169e9(0x39b),'label':_0x3ff369['label']||_0x1169e9(0x39b),'permissions':Array[_0x1169e9(0x59a)](_0x3ff369[_0x1169e9(0x1fd)])?_0x3ff369[_0x1169e9(0x1fd)][_0x1169e9(0x553)](','):'','created':_0x3ff369[_0x1169e9(0x3c4)]?new Date(_0x3ff369[_0x1169e9(0x3c4)])['toISOString']()[_0x1169e9(0x608)](0x0,0xa):''});}if(_0x680b8a['length']===0x0){console[_0x1169e9(0x6a0)](_0x1169e9(0x61c));return;}const _0x3db275=!process[_0x1169e9(0x445)][_0x1169e9(0x33d)]||process[_0x1169e9(0x445)]['columns']>=0x64,_0x192d0f=_0x3db275?0x24:0xa,_0x3a6ea6=['ID'['padEnd'](_0x192d0f),_0x1169e9(0x633)['padEnd'](0x10),_0x1169e9(0x552)[_0x1169e9(0x5d4)](0x14),'PERMISSIONS'['padEnd'](0x14),_0x1169e9(0x68e)][_0x1169e9(0x553)]('\x20\x20');console[_0x1169e9(0x6a0)]('\x0a'+_0x3a6ea6),console[_0x1169e9(0x6a0)]('-'[_0x1169e9(0x5ff)](_0x3a6ea6['length']));for(const _0x57f98e of _0x680b8a){const _0x1af8a0=_0x3db275?_0x57f98e['id']:_0x57f98e['id'][_0x1169e9(0x608)](0x0,0x8)+'…';console[_0x1169e9(0x6a0)]([_0x1af8a0[_0x1169e9(0x5d4)](_0x192d0f),_0x57f98e[_0x1169e9(0x58f)]['slice'](0x0,0x10)[_0x1169e9(0x5d4)](0x10),_0x57f98e[_0x1169e9(0x236)][_0x1169e9(0x608)](0x0,0x14)[_0x1169e9(0x5d4)](0x14),_0x57f98e[_0x1169e9(0x1fd)][_0x1169e9(0x608)](0x0,0x14)[_0x1169e9(0x5d4)](0x14),_0x57f98e[_0x1169e9(0x55b)]][_0x1169e9(0x553)]('\x20\x20'));}console[_0x1169e9(0x6a0)]('');}finally{await _0x3dcf0a[_0x1169e9(0x519)]();}}async function _0xb26cd(_0x367896,_0x4dd59d){const _0x30db6f=_0x448381;!_0x367896&&(console['error'](_0x30db6f(0x45c)),process[_0x30db6f(0x234)](0x1));const _0xc1d246=require$$5,_0x3a9bcb=_0xf46ca3['resolve'](_0x4dd59d[_0x30db6f(0x57b)]),_0x209e86=new _0xc1d246(_0x3a9bcb,_0x38d5ca(_0x4dd59d));await _0x209e86['open']();try{const _0x34eca6=_0x209e86[_0x30db6f(0x2b9)];(!_0x34eca6||!_0x34eca6[_0x30db6f(0x63e)](_0x30db6f(0x4bf)))&&(console[_0x30db6f(0x2e5)](_0x30db6f(0x598)+_0x367896+'\x22'),process[_0x30db6f(0x234)](0x1));let _0xc93fbb=null,_0x3d9441=null;const _0x55401b=_0x34eca6['get']('~tokens',_0x367896);if(_0x55401b)_0xc93fbb=_0x367896,_0x3d9441=_0x55401b;else{const _0x5a836e=[];for(const {key:_0x33c996,value:_0x6dd016}of _0x34eca6[_0x30db6f(0x698)](_0x30db6f(0x4bf))){if(_0x33c996['startsWith'](_0x367896))_0x5a836e[_0x30db6f(0x5fa)]({'key':_0x33c996,'value':_0x6dd016});}_0x5a836e[_0x30db6f(0x631)]===0x0&&(console[_0x30db6f(0x2e5)](_0x30db6f(0x598)+_0x367896+'\x22'),process[_0x30db6f(0x234)](0x1));if(_0x5a836e[_0x30db6f(0x631)]>0x1){console['error'](_0x30db6f(0x5e9)+_0x367896+_0x30db6f(0x35f)+_0x5a836e[_0x30db6f(0x631)]+_0x30db6f(0x513));for(const _0x497fa5 of _0x5a836e){console[_0x30db6f(0x2e5)]('\x20\x20'+_0x497fa5['key']+_0x30db6f(0x42c)+(_0x497fa5[_0x30db6f(0x52e)][_0x30db6f(0x58f)]||_0x30db6f(0x39b))+')');}process[_0x30db6f(0x234)](0x1);}_0xc93fbb=_0x5a836e[0x0]['key'],_0x3d9441=_0x5a836e[0x0][_0x30db6f(0x52e)];}await _0x34eca6[_0x30db6f(0x576)]('~tokens',_0xc93fbb),console['log'](_0x30db6f(0x448)+_0xc93fbb+_0x30db6f(0x42c)+(_0x3d9441[_0x30db6f(0x58f)]||_0x30db6f(0x39b))+',\x20label:\x20'+(_0x3d9441[_0x30db6f(0x236)]||_0x30db6f(0x39b))+')');}finally{await _0x209e86['close']();}}function _0x405c89(_0x3984b6,_0x4b9867){const _0x13c871=_0x448381;if(!_0x3984b6[_0x13c871(0x64b)])return _0x13c871(0x2b8);const _0x22e305=_0x3984b6[_0x13c871(0x5f5)];if(!_0x22e305)return _0x13c871(0x6a7);if(_0x4b9867>_0x22e305)return _0x13c871(0x38f);return _0x13c871(0x6a7);}function _0xf58339(_0x1ba707){const _0x3bf27c=_0x448381;if(!_0x1ba707||typeof _0x1ba707!==_0x3bf27c(0x5c0))return'';const _0x388331=Object[_0x3bf27c(0x699)](_0x1ba707)[_0x3bf27c(0x4e0)](([,_0x209bdc])=>_0x209bdc)[_0x3bf27c(0x272)](([_0x1dc688])=>_0x1dc688);if(_0x388331[_0x3bf27c(0x631)]===0x0)return _0x3bf27c(0x4af);if(_0x388331['length']<=0x3)return _0x388331[_0x3bf27c(0x553)]('\x20');return _0x388331[_0x3bf27c(0x608)](0x0,0x3)[_0x3bf27c(0x553)]('\x20')+('\x20+'+(_0x388331['length']-0x3));}async function _0xb32db8(_0x2ed6aa){const _0x179c7f=_0x448381,_0x5a96df=require$$5,_0x1624a0=requireOkdbLicenseCodec(),{_C:_0x4fda89}=requireOkdbLicense(),_0x5ea3f2=_0xf46ca3['resolve'](_0x2ed6aa[_0x179c7f(0x57b)]),_0x268cfc=new _0x5a96df(_0x5ea3f2,_0x38d5ca(_0x2ed6aa));await _0x268cfc['open']();try{const _0x2856f3=_0x268cfc[_0x179c7f(0x2b9)],_0x58b33b=_0x2856f3?.['db']?.[_0x179c7f(0x363)]?.('__writeCounter')??0x0,_0x35ef82=[..._0x268cfc[_0x179c7f(0x3ca)]['keys']()][_0x179c7f(0x4e0)](_0x1b613c=>!_0x1b613c[_0x179c7f(0x39c)]('~'))[_0x179c7f(0x631)],_0x599a00=_0x268cfc[_0x179c7f(0x277)]?.[_0x179c7f(0x64f)];if(_0x599a00){const _0x2798c0=_0x599a00[_0x179c7f(0x526)]===!![],_0x2b24c0=_0x2798c0?_0x179c7f(0x4ec):_0x268cfc[_0x179c7f(0x277)]['active']?.[_0x179c7f(0x3a9)]||_0x179c7f(0x351);console[_0x179c7f(0x6a0)](''),console[_0x179c7f(0x6a0)]('\x20\x20Tier:\x20\x20\x20\x20'+_0x2b24c0);const _0x513f2e=_0x599a00['limits']||{};if(_0x513f2e[_0x179c7f(0x1ea)]){const _0x3b55fd=Math['round'](_0x58b33b/_0x513f2e[_0x179c7f(0x1ea)]*0x64);console['log'](_0x179c7f(0x25d)+_0x58b33b[_0x179c7f(0x4db)]()+_0x179c7f(0x3b6)+_0x513f2e[_0x179c7f(0x1ea)][_0x179c7f(0x4db)]()+_0x179c7f(0x420)+_0x3b55fd+'%)');}else console['log']('\x20\x20Writes:\x20\x20'+_0x58b33b[_0x179c7f(0x4db)]());_0x513f2e['envs']?console['log']('\x20\x20Envs:\x20\x20\x20\x20'+_0x35ef82+_0x179c7f(0x3b6)+_0x513f2e['envs']):console[_0x179c7f(0x6a0)](_0x179c7f(0x34d)+_0x35ef82),_0x4fda89?.[_0x179c7f(0x2db)]&&console[_0x179c7f(0x6a0)](_0x179c7f(0x324)+_0x4fda89[_0x179c7f(0x2db)]+_0x179c7f(0x428));}if(!_0x2856f3||!_0x2856f3[_0x179c7f(0x63e)]('~licenses')){console[_0x179c7f(0x6a0)](''),console[_0x179c7f(0x6a0)](_0x179c7f(0x26f)),console[_0x179c7f(0x6a0)]('');return;}const _0x46764d=[],_0x3a85d4=Date['now'](),_0x4588f6=_0x268cfc['id'],_0x390037=_0x179c7f(0x30f);for(const {key:_0xf978d2,value:_0x37334d}of _0x2856f3['getRange']('~licenses')){const _0x322ce6=_0x37334d[_0x179c7f(0x4e2)]?Buffer['from'](_0x37334d[_0x179c7f(0x4e2)],_0x179c7f(0x627)):Buffer['alloc'](0x8);let _0x481c53='';try{_0x481c53=_0x1624a0[_0x179c7f(0x5fd)](_0x4588f6,_0x322ce6,_0x390037)['pin'];}catch{}_0x46764d[_0x179c7f(0x5fa)]({'id':_0xf978d2,'licensee':_0x37334d[_0x179c7f(0x3a9)]||'','expires':_0x37334d['expiresAt']?new Date(_0x37334d[_0x179c7f(0x5f5)])[_0x179c7f(0x5ac)]()[_0x179c7f(0x608)](0x0,0xa):'','features':_0xf58339(_0x37334d['features']),'pin':_0x481c53,'status':_0x405c89(_0x37334d,_0x3a85d4)});}if(_0x46764d[_0x179c7f(0x631)]===0x0){console[_0x179c7f(0x6a0)](''),console[_0x179c7f(0x6a0)](_0x179c7f(0x26f)),console[_0x179c7f(0x6a0)]('');return;}const _0x23cc47=['\x20\x20'+'ID'[_0x179c7f(0x5d4)](0xe),_0x179c7f(0x4a3)[_0x179c7f(0x5d4)](0xe),_0x179c7f(0x493)[_0x179c7f(0x5d4)](0xc),_0x179c7f(0x32b)[_0x179c7f(0x5d4)](0x1e),'PIN'[_0x179c7f(0x5d4)](0xa),_0x179c7f(0x3f2)][_0x179c7f(0x553)]('\x20');console[_0x179c7f(0x6a0)]('\x0a'+_0x23cc47);for(const _0x3de39b of _0x46764d){const _0x2021ff=_0x3de39b['id'][_0x179c7f(0x608)](0x0,0x8)+'…';console['log'](['\x20\x20'+_0x2021ff[_0x179c7f(0x5d4)](0xe),_0x3de39b[_0x179c7f(0x3a9)][_0x179c7f(0x608)](0x0,0xe)[_0x179c7f(0x5d4)](0xe),_0x3de39b[_0x179c7f(0x4b3)][_0x179c7f(0x5d4)](0xc),_0x3de39b[_0x179c7f(0x421)][_0x179c7f(0x608)](0x0,0x1e)['padEnd'](0x1e),_0x3de39b[_0x179c7f(0x278)]['padEnd'](0xa),_0x3de39b[_0x179c7f(0x43f)]][_0x179c7f(0x553)]('\x20'));}console[_0x179c7f(0x6a0)]('');}finally{await _0x268cfc['close']();}}async function _0x3b66e7(_0x23bc43,_0x3d2d1a){const _0x1a6de3=_0x448381,_0x39d194=require$$5,_0x4dd9ef=requireOkdbLicenseCodec();let _0x2839a4=_0x23bc43;(_0x4dd9ef[_0x1a6de3(0x696)](_0x23bc43)===_0x1a6de3(0x47b)||_0x3d0262[_0x1a6de3(0x647)](_0x23bc43)&&_0x3d0262[_0x1a6de3(0x27c)](_0x23bc43)['isFile']())&&(_0x2839a4=_0x3d0262[_0x1a6de3(0x2bd)](_0x23bc43,_0x1a6de3(0x5a6))[_0x1a6de3(0x215)]());const _0x21c088=_0xf46ca3[_0x1a6de3(0x2f9)](_0x3d2d1a[_0x1a6de3(0x57b)]),_0x2acfba=new _0x39d194(_0x21c088,_0x38d5ca(_0x3d2d1a));await _0x2acfba[_0x1a6de3(0x1db)]();try{!_0x2acfba[_0x1a6de3(0x277)]&&(console[_0x1a6de3(0x2e5)]('[okdb]\x20error:\x20license\x20management\x20is\x20only\x20available\x20in\x20licensed\x20builds\x20(npm\x20run\x20build:prod).'),process[_0x1a6de3(0x234)](0x1));let _0x176442;try{_0x176442=await _0x2acfba['_license'][_0x1a6de3(0x2bf)](_0x2839a4);}catch(_0x1b3fe5){console[_0x1a6de3(0x2e5)](_0x1a6de3(0x667)+_0x1b3fe5['message']),process[_0x1a6de3(0x234)](0x1);}const _0x28888a=_0x2acfba[_0x1a6de3(0x277)][_0x1a6de3(0x4d4)](),_0x157a8d=_0x28888a[_0x1a6de3(0x369)](_0x11d0e0=>_0x11d0e0[_0x1a6de3(0x51f)]===_0x176442['id'])?.[_0x1a6de3(0x278)]||'',_0x66b6e3=Object[_0x1a6de3(0x699)](_0x176442[_0x1a6de3(0x421)]||{})['filter'](([,_0x875e70])=>_0x875e70)[_0x1a6de3(0x272)](([_0x759fa3])=>_0x759fa3),_0x13e179=_0x176442[_0x1a6de3(0x572)]||{},_0x58871f=[_0x13e179[_0x1a6de3(0x35c)]?'envs='+_0x13e179[_0x1a6de3(0x35c)]:null,_0x13e179['typesPerEnv']?_0x1a6de3(0x21a)+_0x13e179[_0x1a6de3(0x564)]:null,_0x13e179['syncPeers']?_0x1a6de3(0x288)+_0x13e179[_0x1a6de3(0x3c1)]:null,_0x13e179['maxWrites']?_0x1a6de3(0x32a)+_0x13e179[_0x1a6de3(0x1ea)][_0x1a6de3(0x4db)]():null][_0x1a6de3(0x4e0)](Boolean)[_0x1a6de3(0x553)]('\x20\x20'),_0x137a4c=_0x176442['licenseType']===_0x4dd9ef[_0x1a6de3(0x626)];console[_0x1a6de3(0x6a0)](_0x1a6de3(0x465)),console[_0x1a6de3(0x6a0)](_0x1a6de3(0x28e)+_0x176442['id']),console[_0x1a6de3(0x6a0)](_0x1a6de3(0x52f)+_0x176442['licensee']),console[_0x1a6de3(0x6a0)](_0x1a6de3(0x345)+new Date(_0x176442[_0x1a6de3(0x5f5)])[_0x1a6de3(0x5ac)]()[_0x1a6de3(0x608)](0x0,0xa)),console['log'](_0x1a6de3(0x5d0)+(_0x66b6e3['join'](',\x20')||_0x1a6de3(0x4af)));if(_0x58871f)console[_0x1a6de3(0x6a0)](_0x1a6de3(0x4f4)+_0x58871f);_0x137a4c?(console[_0x1a6de3(0x6a0)](_0x1a6de3(0x37f)),console[_0x1a6de3(0x6a0)]('')):(console[_0x1a6de3(0x6a0)](_0x1a6de3(0x2dd)+_0x157a8d),console[_0x1a6de3(0x6a0)](_0x1a6de3(0x45e)),console[_0x1a6de3(0x6a0)](''),console[_0x1a6de3(0x6a0)]('\x20\x20Next\x20step\x20—\x20activate\x20the\x20license:'),console['log'](_0x1a6de3(0x3b9)+_0x157a8d+_0x1a6de3(0x596)),console[_0x1a6de3(0x6a0)]('\x20\x20\x20\x202.\x20The\x20vendor\x20returns\x20an\x20activation\x20token.'),console[_0x1a6de3(0x6a0)](_0x1a6de3(0x620)),console[_0x1a6de3(0x6a0)](''));}finally{await _0x2acfba[_0x1a6de3(0x519)]();}}async function _0x20f640(_0xf19872,_0x4b8078){const _0x401986=_0x448381,_0x3af075=require$$5,_0x4005bd=_0xf46ca3[_0x401986(0x2f9)](_0x4b8078[_0x401986(0x57b)]),_0x5d46c3=new _0x3af075(_0x4005bd,_0x38d5ca(_0x4b8078));await _0x5d46c3[_0x401986(0x1db)]();try{!_0x5d46c3[_0x401986(0x277)]&&(console[_0x401986(0x2e5)](_0x401986(0x22d)),process['exit'](0x1));let _0xb0d53b;try{_0xb0d53b=await _0x5d46c3[_0x401986(0x277)]['activateLicense'](_0xf19872[_0x401986(0x215)]());}catch(_0xc7c419){console[_0x401986(0x2e5)](_0x401986(0x667)+_0xc7c419[_0x401986(0x62d)]),console['error'](''),console[_0x401986(0x2e5)]('\x20\x20Common\x20causes:'),console[_0x401986(0x2e5)](_0x401986(0x3fc)),console[_0x401986(0x2e5)]('\x20\x20\x20\x20-\x20The\x20activation\x20token\x20was\x20issued\x20for\x20a\x20different\x20node\x20—\x20share\x20this\x20node\x27s\x20PIN\x20with\x20the\x20vendor.'),console[_0x401986(0x2e5)](_0x401986(0x372)),console[_0x401986(0x2e5)](''),process[_0x401986(0x234)](0x1);}console['log'](_0x401986(0x5e1)),console[_0x401986(0x6a0)](_0x401986(0x28e)+_0xb0d53b['id']),console['log']('\x20\x20\x20\x20licensee:\x20\x20'+_0xb0d53b[_0x401986(0x3a9)]),console[_0x401986(0x6a0)](_0x401986(0x345)+new Date(_0xb0d53b[_0x401986(0x5f5)])['toISOString']()[_0x401986(0x608)](0x0,0xa)),console[_0x401986(0x6a0)](_0x401986(0x37c)),console[_0x401986(0x6a0)]('');}finally{await _0x5d46c3[_0x401986(0x519)]();}}async function _0xdd6e6a(_0x22863e,_0x582983){const _0x2c81db=_0x448381;!_0x22863e&&(console[_0x2c81db(0x2e5)](_0x2c81db(0x599)),process[_0x2c81db(0x234)](0x1));const _0x53aca6=require$$5,_0x50fcf1=requireOkdbLicenseCodec(),_0x43145b=_0xf46ca3[_0x2c81db(0x2f9)](_0x582983[_0x2c81db(0x57b)]),_0x1abb69=new _0x53aca6(_0x43145b,_0x38d5ca(_0x582983));await _0x1abb69['open']();try{const _0x5dcd9a=_0x1abb69[_0x2c81db(0x2b9)];(!_0x5dcd9a||!_0x5dcd9a['hasType'](_0x2c81db(0x336)))&&(console[_0x2c81db(0x2e5)]('[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22'+_0x22863e+'\x22'),process['exit'](0x1));let _0x2e2bb5=null,_0x47d000=null;const _0x3c3094=_0x5dcd9a['get'](_0x2c81db(0x336),_0x22863e);if(_0x3c3094)_0x2e2bb5=_0x22863e,_0x47d000=_0x3c3094;else{const _0x331e17=[];for(const {key:_0x5f357c,value:_0x5f1384}of _0x5dcd9a[_0x2c81db(0x698)](_0x2c81db(0x336))){if(_0x5f357c[_0x2c81db(0x39c)](_0x22863e))_0x331e17[_0x2c81db(0x5fa)]({'key':_0x5f357c,'value':_0x5f1384});}_0x331e17['length']===0x0&&(console[_0x2c81db(0x2e5)](_0x2c81db(0x24c)+_0x22863e+'\x22'),process[_0x2c81db(0x234)](0x1)),_0x331e17['length']>0x1&&(console[_0x2c81db(0x2e5)]('[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22'+_0x22863e+_0x2c81db(0x35f)+_0x331e17[_0x2c81db(0x631)]+_0x2c81db(0x672)),process[_0x2c81db(0x234)](0x1)),_0x2e2bb5=_0x331e17[0x0]['key'],_0x47d000=_0x331e17[0x0][_0x2c81db(0x52e)];}const _0x49beb3=Date[_0x2c81db(0x4ea)](),_0x34ff6a=_0x405c89(_0x47d000,_0x49beb3),_0x16da03=_0x1abb69['id'],_0x1f055a=_0x2c81db(0x30f);let _0x50c5f2='';try{const _0x2c9c6b=Buffer[_0x2c81db(0x2b0)](_0x47d000[_0x2c81db(0x4e2)],_0x2c81db(0x627));_0x50c5f2=_0x50fcf1['derivePin'](_0x16da03,_0x2c9c6b,_0x1f055a)[_0x2c81db(0x278)];}catch{}const _0x1f0527=_0x47d000['features']?Object[_0x2c81db(0x699)](_0x47d000['features'])['filter'](([,_0x4d010f])=>_0x4d010f)[_0x2c81db(0x272)](([_0x363374])=>_0x363374):[],_0x5d1445=_0x47d000[_0x2c81db(0x572)]||{},_0x2bcbb4=_0x5dcd9a?.['db']?.['get']?.(_0x2c81db(0x3ee))??0x0,_0x18332a=[..._0x1abb69[_0x2c81db(0x3ca)]['keys']()][_0x2c81db(0x4e0)](_0xbdaf8a=>!_0xbdaf8a[_0x2c81db(0x39c)]('~'))[_0x2c81db(0x631)];console[_0x2c81db(0x6a0)](_0x2c81db(0x3eb)),console[_0x2c81db(0x6a0)](_0x2c81db(0x28e)+_0x2e2bb5),console['log'](_0x2c81db(0x52f)+(_0x47d000[_0x2c81db(0x3a9)]||'')),console[_0x2c81db(0x6a0)](_0x2c81db(0x345)+(_0x47d000[_0x2c81db(0x5f5)]?new Date(_0x47d000['expiresAt'])['toISOString']()[_0x2c81db(0x608)](0x0,0xa):'')),console['log'](_0x2c81db(0x5d0)+(_0x1f0527[_0x2c81db(0x553)](',\x20')||_0x2c81db(0x4af))),console['log']('\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20'+_0x50c5f2),console[_0x2c81db(0x6a0)](_0x2c81db(0x447)+_0x34ff6a),console[_0x2c81db(0x6a0)]('\x20\x20\x20\x20addedAt:\x20\x20\x20'+new Date(_0x47d000['addedAt'])[_0x2c81db(0x5ac)]());if(_0x34ff6a==='active'){console[_0x2c81db(0x6a0)](''),console[_0x2c81db(0x6a0)]('\x20\x20Usage:');if(_0x5d1445[_0x2c81db(0x1ea)]){const _0x9cf5b2=Math['round'](_0x2bcbb4/_0x5d1445[_0x2c81db(0x1ea)]*0x64);console[_0x2c81db(0x6a0)](_0x2c81db(0x567)+_0x2bcbb4[_0x2c81db(0x4db)]()+_0x2c81db(0x3b6)+_0x5d1445['maxWrites'][_0x2c81db(0x4db)]()+'\x20\x20('+_0x9cf5b2+'%)');}else console[_0x2c81db(0x6a0)]('\x20\x20\x20\x20writes:\x20\x20\x20\x20'+_0x2bcbb4[_0x2c81db(0x4db)]()+'\x20\x20(unlimited)');_0x5d1445[_0x2c81db(0x35c)]?console[_0x2c81db(0x6a0)](_0x2c81db(0x69f)+_0x18332a+_0x2c81db(0x3b6)+_0x5d1445[_0x2c81db(0x35c)]):console[_0x2c81db(0x6a0)](_0x2c81db(0x69f)+_0x18332a+_0x2c81db(0x222));}console[_0x2c81db(0x6a0)]('');}finally{await _0x1abb69[_0x2c81db(0x519)]();}}async function _0xa0a66f(_0x40d84b,_0x42fd99){const _0x2e5469=_0x448381;!_0x40d84b&&(console['error'](_0x2e5469(0x431)),process[_0x2e5469(0x234)](0x1));const _0x1a89c3=require$$5,_0x3a8a36=_0xf46ca3[_0x2e5469(0x2f9)](_0x42fd99[_0x2e5469(0x57b)]),_0x1caf6f=new _0x1a89c3(_0x3a8a36,_0x38d5ca(_0x42fd99));await _0x1caf6f[_0x2e5469(0x1db)]();try{const _0xd40ce4=_0x1caf6f['_systemEnv'];(!_0xd40ce4||!_0xd40ce4[_0x2e5469(0x63e)](_0x2e5469(0x336)))&&(console[_0x2e5469(0x2e5)](_0x2e5469(0x24c)+_0x40d84b+'\x22'),process[_0x2e5469(0x234)](0x1));let _0x5ea65c=null,_0x5ad5d9=null;const _0x2ee913=_0xd40ce4[_0x2e5469(0x363)](_0x2e5469(0x336),_0x40d84b);if(_0x2ee913)_0x5ea65c=_0x40d84b,_0x5ad5d9=_0x2ee913;else{const _0x381696=[];for(const {key:_0x12019e,value:_0x48c643}of _0xd40ce4[_0x2e5469(0x698)](_0x2e5469(0x336))){if(_0x12019e[_0x2e5469(0x39c)](_0x40d84b))_0x381696[_0x2e5469(0x5fa)]({'key':_0x12019e,'value':_0x48c643});}_0x381696[_0x2e5469(0x631)]===0x0&&(console[_0x2e5469(0x2e5)]('[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22'+_0x40d84b+'\x22'),process[_0x2e5469(0x234)](0x1)),_0x381696[_0x2e5469(0x631)]>0x1&&(console[_0x2e5469(0x2e5)]('[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22'+_0x40d84b+_0x2e5469(0x35f)+_0x381696['length']+_0x2e5469(0x672)),process[_0x2e5469(0x234)](0x1)),_0x5ea65c=_0x381696[0x0][_0x2e5469(0x505)],_0x5ad5d9=_0x381696[0x0][_0x2e5469(0x52e)];}await _0xd40ce4[_0x2e5469(0x576)]('~licenses',_0x5ea65c),console[_0x2e5469(0x6a0)](_0x2e5469(0x622)+_0x5ea65c+_0x2e5469(0x211)+(_0x5ad5d9['licensee']||_0x2e5469(0x39b))+')');}finally{await _0x1caf6f[_0x2e5469(0x519)]();}}async function _0x1ca934(_0x4ee2ca,_0x318a94,_0x37c6a9){const _0x51b394=_0x448381;!_0x4ee2ca&&(console[_0x51b394(0x2e5)]('[okdb]\x20error:\x20join\x20requires\x20a\x20remote\x20address.\x20Usage:\x20okdb\x20join\x20<address>\x20--token\x20<t>'),process[_0x51b394(0x234)](0x1));!_0x37c6a9[_0x51b394(0x3f9)]&&!(_0x37c6a9[_0x51b394(0x429)]&&_0x37c6a9[_0x51b394(0x3c8)])&&(console['error'](_0x51b394(0x30d)),process[_0x51b394(0x234)](0x1));const _0x73b466=_0x37c6a9[_0x51b394(0x3f8)]||_0x318a94[_0x51b394(0x3e5)]?.['address'];!_0x73b466&&(console[_0x51b394(0x2e5)](_0x51b394(0x398)+'\x20\x20Example:\x20okdb\x20join\x20https://node-a.example.com\x20--token\x20<t>\x20--address\x20http://myhost:8484\x0a'+_0x51b394(0x50d)),process['exit'](0x1));const _0x76ec60=require$$5,_0x18b8ea=new _0x76ec60(_0x318a94[_0x51b394(0x57b)],{'sync':{'address':_0x73b466,'auto_reconcile':![]}});await _0x18b8ea['open']();try{const _0x40b220=_0x18b8ea[_0x51b394(0x2b9)];if(_0x40b220&&_0x40b220['hasType'](_0x51b394(0x4bf))){let _0x224361=![];for(const _0x4a9d31 of _0x40b220[_0x51b394(0x698)](_0x51b394(0x4bf))){_0x224361=!![];break;}_0x224361&&console['log'](_0x51b394(0x4a4)+_0x51b394(0x1e3));}console[_0x51b394(0x6a0)](_0x51b394(0x646)+_0x4ee2ca+'…'),await _0x18b8ea[_0x51b394(0x3e5)][_0x51b394(0x553)](_0x4ee2ca[_0x51b394(0x2aa)](/\/+$/,''),{'token':_0x37c6a9[_0x51b394(0x3f9)],'username':_0x37c6a9['username'],'password':_0x37c6a9[_0x51b394(0x3c8)]}),console['log'](_0x51b394(0x66b)),console[_0x51b394(0x6a0)](_0x51b394(0x663));}finally{await _0x18b8ea[_0x51b394(0x519)]();}}async function _0x5cb532(){const _0x163a29=_0x448381,_0x132d07=Date[_0x163a29(0x4ea)](),_0x586650=_0xfc27a3(process[_0x163a29(0x2e9)]),_0x4fc3f0=_0x1f8f79(_0x586650),_0x37a7e8=_0xf46ca3[_0x163a29(0x2f9)](_0x4fc3f0[_0x163a29(0x57b)]);!_0x4fc3f0[_0x163a29(0x5ae)]&&!process[_0x163a29(0x291)][_0x163a29(0x4dd)]&&(_0x4fc3f0[_0x163a29(0x5ae)]=!![]);const _0x7e9a10=require$$5,{start:_0x51794f,colorLog:_0x57c998}=requireOkdbShell(),_0x202504=require$$1$2,_0x1fa17c={..._0x4fc3f0['key']?{'encryptionKey':_0x4fc3f0[_0x163a29(0x505)]}:{},..._0x4fc3f0[_0x163a29(0x497)]?{'admin':![]}:_0x256bf3(_0x4fc3f0['admin'])?{'admin':_0x4fc3f0[_0x163a29(0x305)]}:{},..._0x256bf3(_0x4fc3f0['api'])?{'api':_0x4fc3f0[_0x163a29(0x65c)]}:{},..._0x256bf3(_0x4fc3f0['auth'])?{'auth':_0x4fc3f0[_0x163a29(0x5a0)]}:{},..._0x256bf3(_0x4fc3f0['mcp'])?{'mcp':_0x4fc3f0['mcp']}:{},..._0x4fc3f0[_0x163a29(0x38b)]!==![]?{'timeMachine':_0x4fc3f0[_0x163a29(0x38b)]}:{}},_0xc5a210=_0x23bf33(_0x4fc3f0);if(!_0x202504['isWorker']){const _0x2a7b69=_0x47ed2b(),_0x3bfd35=_0x4fc3f0[_0x163a29(0x329)]?_0x163a29(0x2ec):_0x4fc3f0['workersFlag']!=null&&_0x4fc3f0[_0x163a29(0x286)]!==''?_0x163a29(0x535):process.env.OKDB_HTTP_WORKERS?_0x163a29(0x569):_0x4fc3f0['http']?.[_0x163a29(0x284)]!=null?_0x163a29(0x559):_0x163a29(0x33e)+Math[_0x163a29(0x555)](0x1,require$$0['cpus']()['length']-0x1);process['stdout'][_0x163a29(0x2d0)](_0x163a29(0x361)+_0xc5a210+'\x20('+_0x3bfd35+(!_0x2a7b69?_0x163a29(0x43a):'')+')\x0a');}if(_0x202504[_0x163a29(0x1f9)]){const _0x36d54b={..._0x1fa17c},_0x287490=new _0x7e9a10(_0x37a7e8,_0x36d54b);_0x287490['log'][_0x163a29(0x5e4)]?.();const _0x8d0a64=process.env.OKDB_CLUSTER_SLOT??'?',_0x143624={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x291140=_0x143624[_0x4fc3f0[_0x163a29(0x482)]]??_0x143624[_0x163a29(0x2ee)];_0x287490[_0x163a29(0x6a0)][_0x163a29(0x301)](_0x34db8d=>{const _0x95312f=_0x163a29;if((_0x143624[_0x34db8d[_0x95312f(0x385)]]??0x1)<_0x291140)return;try{process[_0x95312f(0x4b6)]?.({'__okdbCluster':_0x95312f(0x6a0),'slot':_0x8d0a64,'pid':process[_0x95312f(0x250)],'entry':_0x34db8d});}catch{}}),await _0x287490['open']();const {attachWorkerCluster:_0x45358c}=requireOkdbCluster();_0x45358c(_0x287490),await _0x43c2d5(_0x287490,_0x4fc3f0[_0x163a29(0x43c)]);return;}if(_0xc5a210>0x1){const {runClustered:_0x4a9297}=requireOkdbCluster(),_0x498493=new _0x7e9a10(_0x37a7e8,{..._0x1fa17c,'engines':![],'processors':![],'compaction':![]});await _0x498493['open']();const _0x49d70d=async()=>{const _0x235813=_0x163a29,_0x58695b=new _0x7e9a10(_0x37a7e8,{..._0x1fa17c});return await _0x58695b[_0x235813(0x1db)](),_0x58695b;},_0x45b3c5=_0x4a9297({'workers':_0xc5a210,'makeOkdb':_0x49d70d,'port':_0x4fc3f0[_0x163a29(0x43c)],'primaryOkdb':_0x498493});let _0x5bdf10=![];async function _0x1ba113(_0x54884b){const _0xf62714=_0x163a29;_0x5bdf10&&(process[_0xf62714(0x434)][_0xf62714(0x2d0)](_0xf62714(0x5f3)),process['exit'](0x82));_0x5bdf10=!![],process[_0xf62714(0x434)][_0xf62714(0x2d0)]('\x0a[okdb]\x20received\x20'+(_0x54884b||_0xf62714(0x4a6))+_0xf62714(0x22c));const _0x48dfb7=setTimeout(()=>{const _0x2ce48d=_0xf62714;process[_0x2ce48d(0x434)][_0x2ce48d(0x2d0)](_0x2ce48d(0x264)),process[_0x2ce48d(0x234)](0x0);},0xbb8);_0x48dfb7['unref']?.();try{await _0x45b3c5[_0xf62714(0x519)]();}catch(_0x5baf69){process['stderr']['write'](_0xf62714(0x3af)+(_0x5baf69?.[_0xf62714(0x62d)]??_0x5baf69)+'\x0a');}try{await _0x498493[_0xf62714(0x519)]();}catch(_0x5d03bb){process['stderr'][_0xf62714(0x2d0)](_0xf62714(0x41f)+(_0x5d03bb?.[_0xf62714(0x62d)]??_0x5d03bb)+'\x0a');}process['exit'](0x0);}_0x4fc3f0[_0x163a29(0x285)]=_0xc5a210;if(!_0x4fc3f0['noRepl']){_0x498493[_0x163a29(0x6a0)][_0x163a29(0x5e4)]?.(),_0x1235e7(_0x498493[_0x163a29(0x5a0)]?.['getSecurityNotices']?.()??[]),await _0x51794f(_0x498493,_0x4fc3f0);return;}process[_0x163a29(0x445)]['write'](_0x163a29(0x3e4)+process[_0x163a29(0x250)]+_0x163a29(0x5a7)+_0xc5a210+'\x20'+('passive\x20HTTP\x20worker(s)\x20serving\x20:'+_0x4fc3f0[_0x163a29(0x43c)]+'\x0a')),console[_0x163a29(0x6a0)](''),console[_0x163a29(0x6a0)]('\x20\x20✓\x20OKDB\x20cluster\x20running'),console['log'](_0x163a29(0x4ae)+_0x4fc3f0[_0x163a29(0x43c)]+_0x163a29(0x420)+_0xc5a210+_0x163a29(0x3b7)),console[_0x163a29(0x6a0)](_0x163a29(0x2a1)+_0x37a7e8),console[_0x163a29(0x6a0)](_0x163a29(0x225)+_0x498493['id']),console[_0x163a29(0x6a0)](_0x163a29(0x1f4)+_0x4fc3f0[_0x163a29(0x43c)]+_0x163a29(0x69d));!_0x4fc3f0[_0x163a29(0x497)]&&console[_0x163a29(0x6a0)]('\x20\x20\x20\x20admin:\x20\x20\x20http://localhost:'+_0x4fc3f0[_0x163a29(0x43c)]+_0x163a29(0x32f));console[_0x163a29(0x6a0)](''),_0x1235e7(_0x498493['auth']?.[_0x163a29(0x302)]?.()??[]),process['on'](_0x163a29(0x322),()=>_0x1ba113(_0x163a29(0x322))),process['on']('SIGTERM',()=>_0x1ba113(_0x163a29(0x574))),process['on']('SIGBREAK',()=>_0x1ba113('SIGBREAK'));return;}const _0xd3d8c=new _0x7e9a10(_0x37a7e8,_0x1fa17c);_0xd3d8c['log']['detachConsole']?.();const _0x4e5777=_0xd3d8c[_0x163a29(0x6a0)]['attach'](_0xd51bc1=>_0x57c998(_0xd51bc1,_0x4fc3f0[_0x163a29(0x482)]));if(_0x4fc3f0[_0x163a29(0x5ae)])process[_0x163a29(0x445)][_0x163a29(0x2d0)]('[okdb]\x20starting…\x0a');await _0xd3d8c['open']();if(_0x4fc3f0[_0x163a29(0x5ae)])process[_0x163a29(0x445)][_0x163a29(0x2d0)]('\x20\x20✓\x20database\x20opened\x0a');try{await _0x43c2d5(_0xd3d8c,_0x4fc3f0['port']);}catch(_0x4d936f){_0x4d936f['code']===_0x163a29(0x5cb)&&(console[_0x163a29(0x2e5)](_0x163a29(0x5b3)+_0x4fc3f0['port']+_0x163a29(0x62f)),process[_0x163a29(0x234)](0x1));throw _0x4d936f;}if(_0x4fc3f0[_0x163a29(0x5ae)])process[_0x163a29(0x445)][_0x163a29(0x2d0)](_0x163a29(0x1dc)+_0x4fc3f0[_0x163a29(0x43c)]+'\x0a');if(!_0x4fc3f0[_0x163a29(0x5ae)])_0xd3d8c[_0x163a29(0x6a0)][_0x163a29(0x5e4)]?.(),_0x4e5777?.(),_0x1235e7(_0xd3d8c[_0x163a29(0x5a0)]?.[_0x163a29(0x302)]?.()??[]),await _0x51794f(_0xd3d8c,_0x4fc3f0);else{const _0x394b9a=_0xf46ca3[_0x163a29(0x553)](_0x37a7e8,_0x163a29(0x210));try{_0x3d0262['writeFileSync'](_0x394b9a,String(process[_0x163a29(0x250)]));}catch{}const _0x4ac93a=Date[_0x163a29(0x4ea)]()-_0x132d07;console[_0x163a29(0x6a0)](''),console[_0x163a29(0x6a0)](_0x163a29(0x36b)),console[_0x163a29(0x6a0)](_0x163a29(0x56f)+_0x4fc3f0[_0x163a29(0x43c)]),console['log'](_0x163a29(0x530)+_0x37a7e8),console['log'](_0x163a29(0x360)+_0xd3d8c['id']);{const _0x4af6f7=_0xd3d8c['_systemEnv']?.['db']?.[_0x163a29(0x363)]?.('__writeCounter')??0x0,_0x79041d=[..._0xd3d8c['_envs']['keys']()][_0x163a29(0x4e0)](_0x1d91ea=>!_0x1d91ea['startsWith']('~'))[_0x163a29(0x631)];if(_0xd3d8c[_0x163a29(0x277)]?.['active']?.[_0x163a29(0x386)]===0x1){const _0x216767=Math[_0x163a29(0x651)]((_0xd3d8c['_license'][_0x163a29(0x6a7)][_0x163a29(0x5f5)]-Date['now']())/0x5265c00);console[_0x163a29(0x6a0)](_0x163a29(0x3c2)+_0xd3d8c[_0x163a29(0x277)]['active'][_0x163a29(0x3a9)]+_0x163a29(0x44b)+_0x216767+_0x163a29(0x468));}else{if(_0xd3d8c[_0x163a29(0x277)]?.[_0x163a29(0x6a7)]){const _0xba25e7=_0xd3d8c[_0x163a29(0x277)][_0x163a29(0x6a7)];console[_0x163a29(0x6a0)](_0x163a29(0x668)+_0xba25e7[_0x163a29(0x3a9)]+_0x163a29(0x384)+new Date(_0xba25e7[_0x163a29(0x5f5)])[_0x163a29(0x5ac)]()[_0x163a29(0x608)](0x0,0xa)+')');const _0x29b291=_0xba25e7['limits']||{};if(_0x29b291['maxWrites']){const _0x5b4fe7=Math['round'](_0x4af6f7/_0x29b291[_0x163a29(0x1ea)]*0x64);console[_0x163a29(0x6a0)](_0x163a29(0x681)+_0x4af6f7['toLocaleString']()+_0x163a29(0x3b6)+_0x29b291['maxWrites'][_0x163a29(0x4db)]()+_0x163a29(0x5d7)+_0x5b4fe7+_0x163a29(0x219)+_0x79041d+(_0x29b291[_0x163a29(0x35c)]?'/'+_0x29b291[_0x163a29(0x35c)]:'')+'\x20env'+(_0x79041d===0x1?'':'s'));}}else{if(_0xd3d8c['_license']){const _0xb5d816=_0xd3d8c[_0x163a29(0x277)][_0x163a29(0x4d4)](),_0xf9e884=_0xb5d816[_0x163a29(0x631)]?_0xb5d816[_0x163a29(0x272)](_0x2defd1=>_0x2defd1[_0x163a29(0x278)])['join'](',\x20'):_0x163a29(0x450),_0x13c436=_0xd3d8c[_0x163a29(0x277)][_0x163a29(0x64f)],_0x3bdecb=_0x13c436[_0x163a29(0x572)][_0x163a29(0x1ea)]?Math['round'](_0x4af6f7/_0x13c436[_0x163a29(0x572)][_0x163a29(0x1ea)]*0x64):0x0;console['log'](_0x163a29(0x27a)),console[_0x163a29(0x6a0)](_0x163a29(0x681)+_0x4af6f7[_0x163a29(0x4db)]()+_0x163a29(0x3b6)+_0x13c436['limits']['maxWrites']['toLocaleString']()+_0x163a29(0x5d7)+_0x3bdecb+'%),\x20'+_0x79041d+'\x20/\x20'+_0x13c436[_0x163a29(0x572)]['envs']+'\x20envs'),console[_0x163a29(0x6a0)](_0x163a29(0x4c6)+_0xf9e884);}}}}console[_0x163a29(0x6a0)](_0x163a29(0x314)+_0x4fc3f0[_0x163a29(0x43c)]+'/api');!_0x4fc3f0[_0x163a29(0x497)]&&console[_0x163a29(0x6a0)](_0x163a29(0x551)+_0x4fc3f0[_0x163a29(0x43c)]+'/admin/index.html');console['log'](''),console['log']('[okdb]\x20started\x20in\x20'+_0x4ac93a+'ms'),_0x1235e7(_0xd3d8c[_0x163a29(0x5a0)]?.['getSecurityNotices']?.()??[]);let _0x4ec13c=![];async function _0x2f4941(_0x4bda66){const _0x461c45=_0x163a29;_0x4ec13c&&(process[_0x461c45(0x434)][_0x461c45(0x2d0)](_0x461c45(0x5f3)),process[_0x461c45(0x234)](0x82));_0x4ec13c=!![],process[_0x461c45(0x434)][_0x461c45(0x2d0)](_0x461c45(0x406)+(_0x4bda66||_0x461c45(0x4a6))+_0x461c45(0x43b));const _0x447376=setTimeout(()=>{const _0x1e3cd2=_0x461c45;process[_0x1e3cd2(0x434)]['write'](_0x1e3cd2(0x40b)),process[_0x1e3cd2(0x234)](0x1);},0x1388);try{_0x3d0262['unlinkSync'](_0x394b9a);}catch{}try{await _0xd3d8c['close']();}catch(_0x277a2e){process[_0x461c45(0x434)]['write'](_0x461c45(0x685)+(_0x277a2e?.[_0x461c45(0x62d)]??_0x277a2e)+'\x0a');}clearTimeout(_0x447376),process[_0x461c45(0x434)][_0x461c45(0x2d0)](_0x461c45(0x673)),process['exit'](0x0);}process['on']('SIGINT',()=>_0x2f4941(_0x163a29(0x322))),process['on'](_0x163a29(0x574),()=>_0x2f4941(_0x163a29(0x574))),process['on'](_0x163a29(0x562),()=>_0x2f4941(_0x163a29(0x562)));}}const _0x1128cb=new Set([_0x448381(0x29a),_0x448381(0x62e),_0x448381(0x6ae),_0x448381(0x492),_0x448381(0x5eb),_0x448381(0x5f6),_0x448381(0x653),_0x448381(0x3f9),_0x448381(0x553),'license']),_0x4cb051=process[_0x448381(0x2e9)][0x2];if(_0x4cb051===_0x448381(0x29a))console['log'](require$$3[_0x448381(0x29a)]),process[_0x448381(0x234)](0x0);else{if(_0x4cb051&&_0x1128cb[_0x448381(0x258)](_0x4cb051)){const _0x45e3e2=process[_0x448381(0x2e9)]['slice'](0x3),_0x316d6b=_0xfc27a3([_0x448381(0x5dc),'okdb',..._0x45e3e2]),_0x1e8607=_0x1f8f79(_0x316d6b),_0x1dfb7b=new Set([_0x448381(0x3cf),'-d','--key','-k','--config','-c','--port','-p',_0x448381(0x5ce),_0x448381(0x55d),'-e',_0x448381(0x3e7),_0x448381(0x44d),_0x448381(0x5d5),_0x448381(0x313),_0x448381(0x64a),'--grants',_0x448381(0x411),_0x448381(0x2ad),_0x448381(0x23e),'-u',_0x448381(0x3b5)]);let _0x32b4ac=null;for(let _0x3fcfab=0x0;_0x3fcfab<_0x45e3e2['length'];_0x3fcfab++){if(_0x1dfb7b[_0x448381(0x258)](_0x45e3e2[_0x3fcfab])){_0x3fcfab++;continue;}if(!_0x45e3e2[_0x3fcfab][_0x448381(0x39c)]('-')){_0x32b4ac=_0x45e3e2[_0x3fcfab];break;}}(async()=>{const _0x453bb2=_0x448381;if(_0x4cb051===_0x453bb2(0x3f9)){const _0x22041e=process['argv'][0x3],_0x437514=process[_0x453bb2(0x2e9)][_0x453bb2(0x608)](0x4),_0x4bcb73=_0xfc27a3([_0x453bb2(0x5dc),'okdb',..._0x437514]),_0x5bdbfa=_0x1f8f79(_0x4bcb73),_0x5b83c2=new Set([_0x453bb2(0x3cf),'-d',_0x453bb2(0x464),'-k',_0x453bb2(0x21b),'-c','--port','-p',_0x453bb2(0x44d),'--password','--label',_0x453bb2(0x64a),_0x453bb2(0x296),_0x453bb2(0x411),_0x453bb2(0x5ce),_0x453bb2(0x55d),'-e',_0x453bb2(0x3e7)]),_0x3ae028=[];for(let _0x88a1ba=0x0;_0x88a1ba<_0x437514[_0x453bb2(0x631)];_0x88a1ba++){if(_0x5b83c2['has'](_0x437514[_0x88a1ba])){_0x88a1ba++;continue;}if(_0x437514[_0x88a1ba][_0x453bb2(0x39c)]('-'))continue;_0x3ae028[_0x453bb2(0x5fa)](_0x437514[_0x88a1ba]);}switch(_0x22041e){case _0x453bb2(0x21d):await _0x132b69(_0x5bdbfa,_0x4bcb73);break;case _0x453bb2(0x690):await _0x46da84(_0x5bdbfa);break;case _0x453bb2(0x580):await _0xb26cd(_0x3ae028[0x0],_0x5bdbfa);break;default:console[_0x453bb2(0x2e5)]('[okdb]\x20unknown\x20token\x20action:\x20\x22'+_0x22041e+_0x453bb2(0x665)),process['exit'](0x1);}return;}if(_0x4cb051===_0x453bb2(0x514)){const _0x5ea612=requireOkdbLicenseCodec(),_0x5da57b=process['argv'][_0x453bb2(0x608)](0x3),_0x3a23cd=_0xfc27a3([_0x453bb2(0x5dc),'okdb',..._0x5da57b]),_0x4c0d0c=_0x1f8f79(_0x3a23cd),_0x5132e2=new Set([_0x453bb2(0x3cf),'-d',_0x453bb2(0x464),'-k','--config','-c','--port','-p',_0x453bb2(0x5ce)]),_0x48b4dd=[];for(let _0x167ee1=0x0;_0x167ee1<_0x5da57b[_0x453bb2(0x631)];_0x167ee1++){if(_0x5132e2[_0x453bb2(0x258)](_0x5da57b[_0x167ee1])){_0x167ee1++;continue;}if(_0x5da57b[_0x167ee1]['startsWith']('-'))continue;_0x48b4dd['push'](_0x5da57b[_0x167ee1]);}const _0x3b4b70=_0x48b4dd[0x0]??null;if(_0x3b4b70===_0x453bb2(0x576))await _0xa0a66f(_0x48b4dd[0x1],_0x4c0d0c);else{if(!_0x3b4b70)await _0xb32db8(_0x4c0d0c);else{let _0x3d6320=_0x5ea612[_0x453bb2(0x696)](_0x3b4b70);if(_0x3d6320===_0x453bb2(0x39d)&&_0x3d0262[_0x453bb2(0x647)](_0x3b4b70))_0x3d6320=_0x453bb2(0x47b);if(_0x3d6320===_0x453bb2(0x47b))try{const _0x3e7865=_0x3d0262[_0x453bb2(0x2bd)](_0x3b4b70,_0x453bb2(0x5a6))['trim'](),_0x5d857b=_0x5ea612[_0x453bb2(0x696)](_0x3e7865);if(_0x5d857b===_0x453bb2(0x64b)){await _0x20f640(_0x3e7865,_0x4c0d0c);return;}await _0x3b66e7(_0x3b4b70,_0x4c0d0c);return;}catch(_0xc8c17a){console[_0x453bb2(0x2e5)](_0x453bb2(0x295)+_0x3b4b70+':\x20'+_0xc8c17a[_0x453bb2(0x62d)]),process[_0x453bb2(0x234)](0x1);}switch(_0x3d6320){case _0x453bb2(0x216):await _0x3b66e7(_0x3b4b70,_0x4c0d0c);break;case _0x453bb2(0x64b):await _0x20f640(_0x3b4b70,_0x4c0d0c);break;case'uuid':await _0xdd6e6a(_0x3b4b70,_0x4c0d0c);break;default:console['error'](_0x453bb2(0x1f6)+_0x3b4b70+'\x22'),console[_0x453bb2(0x2e5)](''),console[_0x453bb2(0x2e5)](_0x453bb2(0x5c4)),console[_0x453bb2(0x2e5)]('\x20\x20\x20\x20•\x20a\x20license\x20blob\x20\x20\x20(Crockford\x20base32,\x20~150–250\x20chars)'),console[_0x453bb2(0x2e5)](_0x453bb2(0x263)),console[_0x453bb2(0x2e5)](_0x453bb2(0x257)),console[_0x453bb2(0x2e5)](_0x453bb2(0x5da)),console[_0x453bb2(0x2e5)](''),console[_0x453bb2(0x2e5)](_0x453bb2(0x26a)),process[_0x453bb2(0x234)](0x1);}}}return;}switch(_0x4cb051){case'doctor':await _0x2f5a4b(_0x1e8607);break;case _0x453bb2(0x6ae):await _0x30faec();break;case _0x453bb2(0x653):await _0x4e9aba(_0x1e8607);break;case _0x453bb2(0x492):await _0x3daf70(_0x32b4ac??_0xf46ca3[_0x453bb2(0x2f9)](_0x453bb2(0x4ab)),_0x1e8607);break;case _0x453bb2(0x5eb):await _0x5dea01(_0x32b4ac??_0xf46ca3[_0x453bb2(0x2f9)](_0x453bb2(0x2c7)),_0x1e8607,_0x316d6b);break;case _0x453bb2(0x5f6):await _0x1287f2(_0x32b4ac??_0xf46ca3[_0x453bb2(0x2f9)](_0x453bb2(0x2c7)),_0x1e8607,_0x316d6b);break;case'join':await _0x1ca934(_0x32b4ac,_0x1e8607,_0x316d6b);break;}})()['then'](()=>process[_0x448381(0x234)](0x0))[_0x448381(0x45b)](_0x1bdac1=>{const _0x5c1c44=_0x448381;console[_0x5c1c44(0x2e5)](_0x5c1c44(0x365)+(_0x1bdac1[_0x5c1c44(0x62d)]||_0x1bdac1)+'\x0a'),process[_0x5c1c44(0x234)](0x1);});}else _0x5cb532()[_0x448381(0x45b)](_0x59e70f=>{const _0x65fad1=_0x448381;console[_0x65fad1(0x2e5)]('\x0a[okdb]\x20fatal\x20error:'),console[_0x65fad1(0x2e5)](_0x59e70f[_0x65fad1(0x602)]||_0x59e70f),process['exit'](0x1);});}return okdb$1;}var okdbExports=requireOkdb(),okdb=getDefaultExportFromCjs(okdbExports);module[_0x42e206(0x255)]=okdb;