@kedem/okdb 1.8.18 → 1.9.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 (39) hide show
  1. package/bin/okdb.js +1 -1
  2. package/docs/change-log.md +16 -16
  3. package/docs/embeddings.md +1 -1
  4. package/docs/functions.md +26 -25
  5. package/docs/http-cluster.md +157 -0
  6. package/docs/index.md +1 -0
  7. package/docs/manifest.json +5 -1
  8. package/docs/process-registry.md +185 -0
  9. package/docs/processors.md +61 -65
  10. package/docs/queue.md +23 -13
  11. package/docs/subscriptions.md +230 -0
  12. package/docs/worker-fleet.md +139 -0
  13. package/okdb-functions-runner-child.js +1 -1
  14. package/okdb-functions-sandbox-worker.js +1 -0
  15. package/okdb-http-worker-child.js +1 -0
  16. package/okdb-queue-load-handler.js +1 -0
  17. package/okdb-queue-spawn-child.js +1 -1
  18. package/okdb-views-bootstrap-worker.js +1 -1
  19. package/okdb-worker-child.js +1 -0
  20. package/okdb.js +1 -1
  21. package/package.json +1 -1
  22. package/public/sections/db/parts/db-overview.ok.js +1 -1
  23. package/public/sections/embeddings/parts/pipeline-create-panel.ok.js +1 -1
  24. package/public/sections/queue/parts/queue-jobs.ok.js +1 -1
  25. package/public/sections/system/index.ok.html +1 -1
  26. package/public/sections/system/modals/data-ops-modal.ok.js +1 -1
  27. package/public/sections/system/parts/system-process-panel.ok.js +1 -0
  28. package/public/sections/system/parts/system-processing-panel.ok.js +1 -0
  29. package/public/sections/system/parts/system-runtime-overview.ok.js +1 -0
  30. package/public/sections/system/parts/system-workers-panel.ok.js +1 -0
  31. package/types/environment.d.ts +21 -4
  32. package/types/features/embeddings.d.ts +11 -2
  33. package/types/features/queue.d.ts +27 -5
  34. package/types/features/views.d.ts +10 -10
  35. package/types/index.d.ts +54 -6
  36. package/types/options.d.ts +12 -0
  37. package/okdb-fts-handler.js +0 -1
  38. package/okdb-processor-worker.js +0 -1
  39. package/public/sections/processors/index.ok.html +0 -1
package/bin/okdb.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- 'use strict';const _0x422f41=_0xd32f;(function(_0x14f396,_0x58b865){const _0x564041=_0xd32f,_0x5ab270=_0x14f396();while(!![]){try{const _0x1c2dcb=-parseInt(_0x564041(0x18a))/0x1*(parseInt(_0x564041(0x39d))/0x2)+-parseInt(_0x564041(0x29c))/0x3*(parseInt(_0x564041(0x196))/0x4)+parseInt(_0x564041(0x1e4))/0x5+-parseInt(_0x564041(0x243))/0x6*(parseInt(_0x564041(0x332))/0x7)+parseInt(_0x564041(0x3b1))/0x8+-parseInt(_0x564041(0x35e))/0x9*(parseInt(_0x564041(0x38e))/0xa)+parseInt(_0x564041(0x36d))/0xb;if(_0x1c2dcb===_0x58b865)break;else _0x5ab270['push'](_0x5ab270['shift']());}catch(_0x4a7049){_0x5ab270['push'](_0x5ab270['shift']());}}}(_0x3a98,0x4247a));var require$$1$1=require(_0x422f41(0x188)),require$$1=require('fs'),require$$3=require('net'),require$$0$2=require(_0x422f41(0x1c1)),require$$5=require('../okdb'),require$$0=require(_0x422f41(0x3f0)),require$$0$1=require(_0x422f41(0x255)),require$$2$1=require('os'),require$$4=require('child_process');function getDefaultExportFromCjs(_0x416bc7){const _0x546bf2=_0x422f41;return _0x416bc7&&_0x416bc7[_0x546bf2(0x285)]&&Object['prototype'][_0x546bf2(0x474)][_0x546bf2(0x33e)](_0x416bc7,_0x546bf2(0x1f0))?_0x416bc7[_0x546bf2(0x1f0)]:_0x416bc7;}var okdb$1={},version=_0x422f41(0x175),require$$2={'version':version},okdbAuthTokens,hasRequiredOkdbAuthTokens;function requireOkdbAuthTokens(){if(hasRequiredOkdbAuthTokens)return okdbAuthTokens;hasRequiredOkdbAuthTokens=0x1;const _0x487181=require$$0;function _0x725cba(_0x47d8ea,_0x11f55f){const _0x5cfab4=_0xd32f;return _0x487181[_0x5cfab4(0x31b)](_0x5cfab4(0x43a),_0x11f55f)[_0x5cfab4(0x35b)](_0x47d8ea)[_0x5cfab4(0x393)](_0x5cfab4(0x2bd));}function _0x4da096(_0x18a390,_0x47d172){const _0x30c418=_0xd32f;if(typeof _0x18a390!=='string'||typeof _0x47d172!=='string')return![];if(Buffer[_0x30c418(0x32e)](_0x18a390)!==Buffer[_0x30c418(0x32e)](_0x47d172))return![];return _0x487181[_0x30c418(0x190)](Buffer['from'](_0x18a390),Buffer[_0x30c418(0x1b5)](_0x47d172));}function _0x4b3787(_0x56c19a){const _0x20bc01=_0xd32f;if(!_0x56c19a?.[_0x20bc01(0x442)]('Bearer\x20'))return null;return _0x56c19a[_0x20bc01(0x423)](0x7);}function _0x155549(_0x5282f4=0x20){const _0x2b923b=_0xd32f;return _0x487181[_0x2b923b(0x232)](_0x5282f4)['toString'](_0x2b923b(0x2bd));}function _0x2831a7(_0x244241){const _0x5d4f60=_0xd32f;return _0x487181['createHash'](_0x5d4f60(0x43a))[_0x5d4f60(0x35b)](_0x244241)['digest']('hex');}function _0x49644b(_0x1184e3,_0x1eaaa7,_0xf315d3=0x36ee80){const _0x92654f=_0xd32f;if(!_0x1eaaa7)throw new Error(_0x92654f(0x35c));const _0x307e67=Date[_0x92654f(0x1b8)](),_0x3fc990=Buffer['from'](JSON['stringify']({'iat':_0x307e67,'exp':_0x307e67+_0xf315d3,'sub':_0x1184e3?.['id']??_0x1184e3?.[_0x92654f(0x1aa)]??null,'username':_0x1184e3?.[_0x92654f(0x459)]??_0x1184e3?.[_0x92654f(0x251)]??null,'roles':Array[_0x92654f(0x2cf)](_0x1184e3?.['roles'])?_0x1184e3[_0x92654f(0x1cf)]:[]}))['toString']('base64url'),_0x294c2f=_0x725cba(_0x3fc990,_0x1eaaa7);return _0x3fc990+'.'+_0x294c2f;}function _0x4d865d(_0x38e447,_0x372524){const _0x237c38=_0xd32f;if(!_0x372524||typeof _0x38e447!=='string')return null;const [_0x4e6433,_0x28d65d]=_0x38e447[_0x237c38(0x1df)]('.');if(!_0x4e6433||!_0x28d65d)return null;const _0x282d9f=_0x725cba(_0x4e6433,_0x372524);if(!_0x4da096(_0x28d65d,_0x282d9f))return null;try{const _0x11745b=JSON[_0x237c38(0x369)](Buffer[_0x237c38(0x1b5)](_0x4e6433,_0x237c38(0x2bd))[_0x237c38(0x253)]()),_0x1feae8=0x7530;if(Date['now']()>Number(_0x11745b?.['exp']??0x0)+_0x1feae8)return null;return _0x11745b;}catch{return null;}}async function _0x6d0c63(_0x104348){return new Promise((_0x42f8e4,_0x443d9e)=>{const _0x42f09c=_0xd32f,_0x1b579f=_0x487181['randomBytes'](0x10);_0x487181[_0x42f09c(0x3bd)](_0x104348,_0x1b579f,0x40,(_0x48459d,_0x2256cc)=>{const _0x59362f=_0x42f09c;if(_0x48459d)_0x443d9e(_0x48459d);_0x42f8e4(_0x1b579f['toString'](_0x59362f(0x2d3))+':'+_0x2256cc[_0x59362f(0x253)](_0x59362f(0x2d3)));});});}async function _0x4089c0(_0x4053ce,_0x15af6b){const _0x1feb3b=_0xd32f,[_0xcdf645,_0xa460d2]=_0x15af6b['split'](':');if(!_0xcdf645||!_0xa460d2)return![];const _0x2ab9b3=Buffer[_0x1feb3b(0x1b5)](_0xcdf645,'hex');return new Promise((_0x557e50,_0x4c00ec)=>{_0x487181['scrypt'](_0x4053ce,_0x2ab9b3,0x40,(_0x5ee2cd,_0x159cbd)=>{const _0x49e835=_0xd32f;if(_0x5ee2cd)_0x4c00ec(_0x5ee2cd);_0x557e50(_0x487181[_0x49e835(0x190)](_0x159cbd,Buffer[_0x49e835(0x1b5)](_0xa460d2,_0x49e835(0x2d3))));});});}return okdbAuthTokens={'hmac':_0x725cba,'timingSafeEqual':_0x4da096,'parseBearer':_0x4b3787,'randomToken':_0x155549,'hashToken':_0x2831a7,'issueToken':_0x49644b,'authenticateToken':_0x4d865d,'hashPassword':_0x6d0c63,'verifyPassword':_0x4089c0},okdbAuthTokens;}var okdbLicenseCodec,hasRequiredOkdbLicenseCodec;function requireOkdbLicenseCodec(){const _0x3a873a=_0x422f41;if(hasRequiredOkdbLicenseCodec)return okdbLicenseCodec;hasRequiredOkdbLicenseCodec=0x1;const _0x6fa560=require$$0$1,_0x236cf3=_0x3a873a(0x2ea),_0xe9c73c=new Uint8Array(0x100)[_0x3a873a(0x3ff)](0xff);for(let _0x1a9591=0x0;_0x1a9591<_0x236cf3[_0x3a873a(0x191)];_0x1a9591++){_0xe9c73c[_0x236cf3[_0x3a873a(0x18b)](_0x1a9591)]=_0x1a9591,_0xe9c73c[_0x236cf3[_0x3a873a(0x18b)](_0x1a9591)+0x20]=_0x1a9591;}_0xe9c73c['O'[_0x3a873a(0x18b)](0x0)]=0x0,_0xe9c73c['o'[_0x3a873a(0x18b)](0x0)]=0x0,_0xe9c73c['I'['charCodeAt'](0x0)]=0x1,_0xe9c73c['i'[_0x3a873a(0x18b)](0x0)]=0x1,_0xe9c73c['L'[_0x3a873a(0x18b)](0x0)]=0x1,_0xe9c73c['l'[_0x3a873a(0x18b)](0x0)]=0x1;function _0x3f6138(_0x5b2c06){const _0xfabcbf=_0x3a873a;let _0x2f3cc3=0x0,_0x2e44be=0x0,_0x262c85='';for(let _0x38b759=0x0;_0x38b759<_0x5b2c06[_0xfabcbf(0x191)];_0x38b759++){_0x2e44be=_0x2e44be<<0x8|_0x5b2c06[_0x38b759],_0x2f3cc3+=0x8;while(_0x2f3cc3>=0x5){_0x2f3cc3-=0x5,_0x262c85+=_0x236cf3[_0x2e44be>>>_0x2f3cc3&0x1f];}}return _0x2f3cc3>0x0&&(_0x262c85+=_0x236cf3[_0x2e44be<<0x5-_0x2f3cc3&0x1f]),_0x262c85;}function _0x36b3f1(_0xfea83c){const _0x5cdc1b=_0x3a873a;_0xfea83c=_0xfea83c[_0x5cdc1b(0x3e1)](/-/g,'')['toUpperCase']();let _0x5759e5=0x0,_0x27aae5=0x0;const _0x56755b=[];for(let _0x517e42=0x0;_0x517e42<_0xfea83c['length'];_0x517e42++){const _0xb960de=_0xe9c73c[_0xfea83c['charCodeAt'](_0x517e42)];if(_0xb960de===0xff)continue;_0x27aae5=_0x27aae5<<0x5|_0xb960de,_0x5759e5+=0x5,_0x5759e5>=0x8&&(_0x5759e5-=0x8,_0x56755b[_0x5cdc1b(0x3c6)](_0x27aae5>>>_0x5759e5&0xff));}return Buffer[_0x5cdc1b(0x1b5)](_0x56755b);}const _0x33c5a8=[_0x3a873a(0x20e),_0x3a873a(0x2ec),_0x3a873a(0x224),_0x3a873a(0x435),_0x3a873a(0x310),_0x3a873a(0x3bc),_0x3a873a(0x3ce),_0x3a873a(0x259)],_0x26cdd4=0x0,_0x470817=0x1,_0x542f05=0x2,_0x2d2774=0x6*0x1e*0x18*0x3c*0x3c*0x3e8;function _0x3c950e({issuedAt:_0x4f170a,expiresAt:_0x5c96cf,licensee:licensee='',features:features={},limits:limits={},licenseType:licenseType=_0x26cdd4}){const _0x1d6aa9=_0x3a873a,_0x1d6b7d=Buffer[_0x1d6aa9(0x1b5)](licensee,'utf8')['slice'](0x0,0x40),_0x5b124d=0x1+0x1+0x4+0x4+0x1+_0x1d6b7d[_0x1d6aa9(0x191)]+0x2+0x10,_0x10541b=Buffer[_0x1d6aa9(0x24a)](_0x5b124d);let _0x18f196=0x0;_0x10541b[_0x1d6aa9(0x22f)](0x1,_0x18f196++),_0x10541b['writeUInt8'](licenseType,_0x18f196++),_0x10541b[_0x1d6aa9(0x1a1)](Math[_0x1d6aa9(0x365)](_0x4f170a/0x3e8),_0x18f196),_0x18f196+=0x4,_0x10541b[_0x1d6aa9(0x1a1)](Math[_0x1d6aa9(0x365)](_0x5c96cf/0x3e8),_0x18f196),_0x18f196+=0x4,_0x10541b[_0x1d6aa9(0x22f)](_0x1d6b7d[_0x1d6aa9(0x191)],_0x18f196++),_0x1d6b7d[_0x1d6aa9(0x1a0)](_0x10541b,_0x18f196),_0x18f196+=_0x1d6b7d[_0x1d6aa9(0x191)];let _0x80f21b=0x0;for(let _0x2e8f9b=0x0;_0x2e8f9b<_0x33c5a8[_0x1d6aa9(0x191)];_0x2e8f9b++){if(features[_0x33c5a8[_0x2e8f9b]])_0x80f21b|=0x1<<_0x2e8f9b;}_0x10541b[_0x1d6aa9(0x414)](_0x80f21b,_0x18f196),_0x18f196+=0x2;const _0x2f97ca=[_0x1d6aa9(0x479),_0x1d6aa9(0x3a7),_0x1d6aa9(0x265),_0x1d6aa9(0x256)];for(const _0xbb1a24 of _0x2f97ca){_0x10541b[_0x1d6aa9(0x1a1)](limits[_0xbb1a24]||0x0,_0x18f196),_0x18f196+=0x4;}return _0x10541b;}function _0x17df66(_0x358eb8){const _0x5da17a=_0x3a873a;let _0x11eb28=0x0;const _0x1bb912=_0x358eb8[_0x5da17a(0x349)](_0x11eb28++),_0x5c475e=_0x358eb8[_0x5da17a(0x349)](_0x11eb28++),_0x2df958=_0x358eb8[_0x5da17a(0x3b6)](_0x11eb28);_0x11eb28+=0x4;const _0x37e41e=_0x358eb8['readUInt32BE'](_0x11eb28);_0x11eb28+=0x4;const _0x3dbc8c=_0x358eb8[_0x5da17a(0x349)](_0x11eb28++),_0x1b3a36=_0x358eb8[_0x5da17a(0x423)](_0x11eb28,_0x11eb28+_0x3dbc8c)['toString'](_0x5da17a(0x37e));_0x11eb28+=_0x3dbc8c;const _0x49fa34=_0x358eb8[_0x5da17a(0x44b)](_0x11eb28);_0x11eb28+=0x2;const _0xe80651={};for(let _0x2ec684=0x0;_0x2ec684<_0x33c5a8[_0x5da17a(0x191)];_0x2ec684++){_0xe80651[_0x33c5a8[_0x2ec684]]=Boolean(_0x49fa34&0x1<<_0x2ec684);}const _0x477056=[_0x5da17a(0x479),_0x5da17a(0x3a7),'syncPeers',_0x5da17a(0x256)],_0x470a7f={};for(const _0x2ff50c of _0x477056){const _0x2dad5a=_0x358eb8[_0x5da17a(0x3b6)](_0x11eb28);_0x11eb28+=0x4,_0x470a7f[_0x2ff50c]=_0x2dad5a===0x0?null:_0x2dad5a;}return{'v':_0x1bb912,'licenseType':_0x5c475e,'issuedAt':_0x2df958*0x3e8,'expiresAt':_0x37e41e*0x3e8,'licensee':_0x1b3a36,'features':_0xe80651,'limits':_0x470a7f};}function _0x3943aa(_0x133469,_0x4ad3fe){const _0x1f0da3=_0x3a873a,_0x436d8e=Buffer[_0x1f0da3(0x2d7)]([_0x133469,_0x4ad3fe]),_0x63228b=_0x3f6138(_0x436d8e),_0x52510c=[];for(let _0x3cd7ad=0x0;_0x3cd7ad<_0x63228b[_0x1f0da3(0x191)];_0x3cd7ad+=0x8){_0x52510c[_0x1f0da3(0x3c6)](_0x63228b[_0x1f0da3(0x423)](_0x3cd7ad,_0x3cd7ad+0x8));}return _0x52510c[_0x1f0da3(0x2da)]('-');}function _0x2c9bd1(_0x46d207){const _0x31b946=_0x3a873a;if(typeof _0x46d207!==_0x31b946(0x415))throw new Error(_0x31b946(0x1e1));const _0x43acf6=_0x36b3f1(_0x46d207['replace'](/-/g,''));if(_0x43acf6['length']<0x41)throw new Error('decodeLicenseBlob:\x20blob\x20too\x20short\x20('+_0x43acf6[_0x31b946(0x191)]+_0x31b946(0x434));const _0x205f80=_0x43acf6[_0x31b946(0x423)](0x0,_0x43acf6['length']-0x40),_0x465f52=_0x43acf6[_0x31b946(0x423)](_0x43acf6[_0x31b946(0x191)]-0x40);let _0x15af4d;try{_0x15af4d=_0x17df66(_0x205f80);}catch(_0x1c1840){throw new Error(_0x31b946(0x2e8)+_0x1c1840[_0x31b946(0x356)]);}return{'rawBuf':_0x43acf6,'payload':_0x205f80,'sig':_0x465f52,'decoded':_0x15af4d};}function _0x2d3963(_0x463d37){const _0xb92dca=_0x3a873a;return _0x6fa560['createHash'](_0xb92dca(0x43a))['update'](_0x463d37)[_0xb92dca(0x393)]()[_0xb92dca(0x423)](0x0,0x8);}function _0x20b8b0(_0x282968,_0x3de3cf,_0x1634d4){const _0x4771b8=_0x3a873a,_0x459efd=_0x4771b8(0x406)+_0x1634d4,_0x507227=Buffer[_0x4771b8(0x2d7)]([Buffer['from'](_0x282968,'utf8'),_0x3de3cf]),_0x1f0c88=_0x6fa560['createHmac']('sha256',_0x459efd)[_0x4771b8(0x35b)](_0x507227)[_0x4771b8(0x393)](),_0x49d62f=_0x3f6138(_0x1f0c88[_0x4771b8(0x423)](0x0,0x5));return{'pin':_0x49d62f,'pinHmac':_0x1f0c88};}function _0x1559f5(_0x31aecc,_0x32d1b9,_0x4c1523){const _0x1c9790=_0x3a873a,_0x390c9c=Buffer[_0x1c9790(0x24a)](0x4d);let _0x536b1e=0x0;_0x390c9c[_0x1c9790(0x22f)](0x1,_0x536b1e++),_0x31aecc['copy'](_0x390c9c,_0x536b1e),_0x536b1e+=0x8,_0x390c9c['writeUInt32BE'](_0x32d1b9,_0x536b1e),_0x536b1e+=0x4,_0x4c1523[_0x1c9790(0x1a0)](_0x390c9c,_0x536b1e);const _0x42b829=_0x3f6138(_0x390c9c),_0x18c51a=[];for(let _0x508334=0x0;_0x508334<_0x42b829[_0x1c9790(0x191)];_0x508334+=0x6){_0x18c51a['push'](_0x42b829[_0x1c9790(0x423)](_0x508334,_0x508334+0x6));}return _0x18c51a[_0x1c9790(0x2da)]('-');}function _0x55d54d(_0x4cad43){const _0x1134c2=_0x3a873a;if(typeof _0x4cad43!==_0x1134c2(0x415))throw new Error(_0x1134c2(0x1c3));const _0x59724b=_0x36b3f1(_0x4cad43[_0x1134c2(0x3e1)](/-/g,''));if(_0x59724b[_0x1134c2(0x191)]!==0x4d)throw new Error(_0x1134c2(0x221)+_0x59724b[_0x1134c2(0x191)]);let _0x3d2b29=0x0;const _0x2a762e=_0x59724b[_0x1134c2(0x349)](_0x3d2b29++),_0xe6bb5=_0x59724b['slice'](_0x3d2b29,_0x3d2b29+0x8);_0x3d2b29+=0x8;const _0x42405c=_0x59724b[_0x1134c2(0x3b6)](_0x3d2b29);_0x3d2b29+=0x4;const _0x198b15=_0x59724b[_0x1134c2(0x423)](_0x3d2b29);return{'v':_0x2a762e,'licenseHash':_0xe6bb5,'expiry':_0x42405c,'sig':_0x198b15};}function _0xd1f5c5({tokenString:_0x1ea38c,nodeId:_0x233cf8,rawBlobBuf:_0x3ee4b3,pubKeyPem:_0xda4113,pubFingerprint:_0x26e78e}){const _0x2b0131=_0x3a873a;let _0x27b0e5;try{_0x27b0e5=_0x55d54d(_0x1ea38c);}catch(_0x58f444){return{'valid':![],'reason':_0x2b0131(0x297)};}const _0x102e09=_0x2d3963(_0x3ee4b3);if(!_0x102e09[_0x2b0131(0x3dd)](_0x27b0e5[_0x2b0131(0x170)]))return{'valid':![],'reason':'LICENSE_HASH_MISMATCH'};const {pinHmac:_0x1a1baf}=_0x20b8b0(_0x233cf8,_0x102e09,_0x26e78e),_0x410a53=Buffer[_0x2b0131(0x24a)](0x4);_0x410a53[_0x2b0131(0x1a1)](_0x27b0e5[_0x2b0131(0x219)],0x0);const _0x1962c8=Buffer[_0x2b0131(0x2d7)]([Buffer[_0x2b0131(0x1b5)]([_0x27b0e5['v']]),_0x1a1baf[_0x2b0131(0x423)](0x0,0x5),_0x27b0e5[_0x2b0131(0x170)],_0x410a53]);try{const _0x525528=_0x6fa560['verify'](null,_0x1962c8,_0xda4113,_0x27b0e5[_0x2b0131(0x3c8)]);if(!_0x525528)return{'valid':![],'reason':_0x2b0131(0x319)};}catch(_0x4e908d){return{'valid':![],'reason':_0x2b0131(0x319)};}if(_0x27b0e5[_0x2b0131(0x219)]<Date[_0x2b0131(0x1b8)]()/0x3e8)return{'valid':![],'reason':_0x2b0131(0x1fe)};return{'valid':!![],'reason':'ok'};}function _0x4151f3(_0x5d1e7f){const _0x5d416b=_0x3a873a;if(typeof _0x5d1e7f!==_0x5d416b(0x415))return _0x5d416b(0x1b0);const _0x1fa307=_0x5d1e7f[_0x5d416b(0x473)]();if(_0x1fa307[_0x5d416b(0x442)]('/')||_0x1fa307[_0x5d416b(0x442)]('./')||_0x1fa307[_0x5d416b(0x442)](_0x5d416b(0x2b6))||/^[A-Za-z]:[\\/]/[_0x5d416b(0x20b)](_0x1fa307))return _0x5d416b(0x188);if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i[_0x5d416b(0x20b)](_0x1fa307))return _0x5d416b(0x35d);const _0x4bd4ab=_0x1fa307[_0x5d416b(0x3e1)](/[\s-]+/g,'')[_0x5d416b(0x191)];if(_0x4bd4ab===0x7c)return _0x5d416b(0x281);if(_0x4bd4ab>=0x95&&_0x4bd4ab<=0xfc)return _0x5d416b(0x23b);return'unknown';}return okdbLicenseCodec={'toBase32':_0x3f6138,'fromBase32':_0x36b3f1,'encodeLicensePayload':_0x3c950e,'decodeLicensePayload':_0x17df66,'encodeLicenseBlob':_0x3943aa,'decodeLicenseBlob':_0x2c9bd1,'licenseHash':_0x2d3963,'derivePin':_0x20b8b0,'encodeActivationToken':_0x1559f5,'decodeActivationToken':_0x55d54d,'verifyActivation':_0xd1f5c5,'detectInputType':_0x4151f3,'FEATURE_NAMES':_0x33c5a8,'LICENSE_TYPE_STANDARD':_0x26cdd4,'LICENSE_TYPE_OPEN':_0x470817,'LICENSE_TYPE_INTERNAL':_0x542f05,'OPEN_LICENSE_MAX_DURATION_MS':_0x2d2774},okdbLicenseCodec;}var okdbError,hasRequiredOkdbError;function requireOkdbError(){if(hasRequiredOkdbError)return okdbError;hasRequiredOkdbError=0x1;class _0x5d0a43 extends Error{constructor(_0x3bad65,_0x39295d,_0x97165e={}){const _0x4f1a6c=_0xd32f;super(_0x3bad65),this[_0x4f1a6c(0x251)]='OKDBError',this[_0x4f1a6c(0x2b8)]=_0x39295d,this[_0x4f1a6c(0x363)]=_0x97165e,_0x97165e['cause']&&(this['cause']=_0x97165e['cause']),Error[_0x4f1a6c(0x3f6)](this,this[_0x4f1a6c(0x267)]);}}class _0x44aed1 extends _0x5d0a43{constructor(_0x3dfae7,_0x497e62,_0x279cef,_0x5e4b4c){const _0x3406d0=_0xd32f;super(_0x3406d0(0x1e6)+_0x3dfae7+'@'+_0x497e62+':\x20expected\x20'+_0x279cef+',\x20got\x20'+_0x5e4b4c,_0x3406d0(0x306),{'type':_0x3dfae7,'key':_0x497e62,'expectedVersion':_0x279cef,'actualVersion':_0x5e4b4c}),this[_0x3406d0(0x251)]=_0x3406d0(0x34b);}}class _0x27ed2a extends _0x5d0a43{constructor(_0x57a04d,_0x3109e5){const _0x38f963=_0xd32f;super(_0x57a04d+'@'+_0x3109e5+_0x38f963(0x431),_0x38f963(0x2ac),{'type':_0x57a04d,'key':_0x3109e5}),this[_0x38f963(0x251)]='OKDBNotFoundError';}}class _0x386653 extends _0x5d0a43{constructor(_0x4212f6,_0x34574a){const _0x5089b8=_0xd32f;super(_0x4212f6+'@'+_0x34574a+_0x5089b8(0x36e),_0x5089b8(0x29d),{'type':_0x4212f6,'key':_0x34574a}),this['name']=_0x5089b8(0x2ee);}}class _0x2e8188 extends _0x5d0a43{constructor(_0x29a568,_0x5a2a56){const _0x260a3d=_0xd32f,_0x783cfe=typeof _0x5a2a56;super(_0x260a3d(0x1b3)+_0x29a568+_0x260a3d(0x27a)+_0x783cfe+_0x260a3d(0x1e2)+_0x5a2a56,'INVALID_INDEX_KEY',{'index':_0x29a568,'key':_0x5a2a56,'keyType':_0x783cfe}),this['name']=_0x260a3d(0x418);}}class _0x462bda extends _0x5d0a43{constructor(_0x4a32a2){const _0x444b3e=_0xd32f,_0x51fbdb=typeof _0x4a32a2;super(_0x444b3e(0x476)+_0x51fbdb+_0x444b3e(0x1c2)+_0x4a32a2,_0x444b3e(0x40b),{'key':_0x4a32a2,'keyType':_0x51fbdb}),this[_0x444b3e(0x251)]=_0x444b3e(0x2b2);}}class _0x13661c extends _0x5d0a43{constructor(_0x4b28a5){const _0x36faa4=_0xd32f;super(_0x36faa4(0x1ae)+_0x4b28a5+_0x36faa4(0x32c),'TYPE_NOT_REGISTERED',{'type':_0x4b28a5}),this['name']=_0x36faa4(0x3aa);}}class _0x5ac39e extends _0x5d0a43{constructor(_0x30ee26){const _0x4d7b21=_0xd32f;super('Type\x20\x27'+_0x30ee26+_0x4d7b21(0x345),_0x4d7b21(0x348),{'type':_0x30ee26}),this[_0x4d7b21(0x251)]='OKDBTypeAlreadyRegisteredError';}}class _0x56dd37 extends _0x5d0a43{constructor(_0x5e7ba7,_0x15d4e4){const _0x57c78e=_0xd32f;super('Index\x20\x27'+_0x15d4e4+_0x57c78e(0x189)+_0x5e7ba7+_0x57c78e(0x32c),_0x57c78e(0x443),{'type':_0x5e7ba7,'index':_0x15d4e4}),this[_0x57c78e(0x251)]=_0x57c78e(0x300);}}class _0x1043fa extends _0x5d0a43{constructor(_0x2bef96,_0x7af96e){const _0x1edf84=_0xd32f;super(_0x1edf84(0x3b0)+_0x7af96e+_0x1edf84(0x189)+_0x2bef96+_0x1edf84(0x230),_0x1edf84(0x19e),{'type':_0x2bef96,'index':_0x7af96e}),this[_0x1edf84(0x251)]=_0x1edf84(0x3cf);}}class _0x483761 extends _0x5d0a43{constructor(_0x3c744e,_0x234525={}){const _0x13ef54=_0xd32f;super(_0x3c744e,_0x13ef54(0x46c),_0x234525),this[_0x13ef54(0x251)]=_0x13ef54(0x3fe);}}class _0x377084 extends _0x5d0a43{constructor(_0x115d02,_0x3b1148,_0x3b1b87,_0x382904,_0x11bd5c){const _0x10299a=_0xd32f;super(_0x10299a(0x364)+_0x115d02+'@'+_0x3b1148+_0x10299a(0x290)+_0x3b1b87+_0x10299a(0x3b7)+_0x382904+_0x10299a(0x456)+_0x11bd5c+'\x27',_0x10299a(0x249),{'type':_0x115d02,'index':_0x3b1148,'indexKey':_0x3b1b87,'existingKey':_0x382904,'conflictingKey':_0x11bd5c}),this[_0x10299a(0x251)]=_0x10299a(0x45e);}}class _0x11e51d extends _0x5d0a43{constructor(_0x1467bb,_0x465bf6,_0x1ab9e7){const _0x30d3aa=_0xd32f;super(_0x30d3aa(0x312)+_0x1467bb+'@'+_0x465bf6,_0x30d3aa(0x46f),{'type':_0x1467bb,'key':_0x465bf6,'errors':_0x1ab9e7}),this[_0x30d3aa(0x251)]=_0x30d3aa(0x3f5),this['type']=_0x1467bb,this[_0x30d3aa(0x17f)]=_0x465bf6,this[_0x30d3aa(0x172)]=_0x1ab9e7;}}class _0x5b513f extends _0x5d0a43{constructor(_0x531d83,_0x1498c2){const _0x5e7a5f=_0xd32f;super(_0x5e7a5f(0x432)+_0x531d83+':\x20'+_0x1498c2[_0x5e7a5f(0x191)]+_0x5e7a5f(0x274),_0x5e7a5f(0x1cb),{'type':_0x531d83,'failures':_0x1498c2}),this['name']=_0x5e7a5f(0x1cc),this['type']=_0x531d83,this[_0x5e7a5f(0x1ba)]=_0x1498c2;}}class _0x3068f6 extends _0x5d0a43{constructor(_0x203a5e,_0x309c46,_0x45ef22,_0x25a55a,_0x3d64a1){const _0x28800f=_0xd32f;super('Foreign\x20key\x20violation:\x20'+_0x203a5e+'@'+_0x309c46+'.'+_0x45ef22+_0x28800f(0x454)+_0x25a55a+'@'+_0x3d64a1+_0x28800f(0x1bd),_0x28800f(0x315),{'sourceType':_0x203a5e,'sourceKey':_0x309c46,'fieldPath':_0x45ef22,'targetType':_0x25a55a,'targetKey':_0x3d64a1}),this[_0x28800f(0x251)]='OKDBForeignKeyError',this['sourceType']=_0x203a5e,this[_0x28800f(0x2a2)]=_0x309c46,this['fieldPath']=_0x45ef22,this[_0x28800f(0x33a)]=_0x25a55a,this['targetKey']=_0x3d64a1;}}class _0x5cc5b8 extends _0x5d0a43{constructor(_0x325b9b,_0x35cc98,_0x3a9197){const _0x30db5c=_0xd32f;super(_0x30db5c(0x405)+_0x325b9b+'@'+_0x35cc98+':\x20'+_0x3a9197['length']+_0x30db5c(0x32d),_0x30db5c(0x244),{'targetType':_0x325b9b,'targetKey':_0x35cc98,'references':_0x3a9197}),this['name']=_0x30db5c(0x239),this[_0x30db5c(0x33a)]=_0x325b9b,this[_0x30db5c(0x38b)]=_0x35cc98,this[_0x30db5c(0x23e)]=_0x3a9197;}}class _0x3930c9 extends _0x5d0a43{constructor(_0x9b4509,_0x298875,_0x555773){const _0x55c4a7=_0xd32f;super(_0x55c4a7(0x2f5)+_0x298875+_0x55c4a7(0x344)+_0x9b4509+_0x55c4a7(0x460)+_0x555773[_0x55c4a7(0x3a5)](_0x45a847=>_0x45a847[_0x55c4a7(0x3bf)]+':'+_0x45a847[_0x55c4a7(0x251)])[_0x55c4a7(0x2da)](',\x20'),_0x55c4a7(0x250),{'type':_0x9b4509,'index':_0x298875,'usedBy':_0x555773}),this['name']=_0x55c4a7(0x1d5);}}return okdbError={'OKDBError':_0x5d0a43,'OKDBVersionMismatchError':_0x44aed1,'OKDBNotFoundError':_0x27ed2a,'OKDBAlreadyExistsError':_0x386653,'OKDBInvalidIndexKeyError':_0x2e8188,'OKDBInvalidPrimaryKeyError':_0x462bda,'OKDBTypeNotRegisteredError':_0x13661c,'OKDBTypeAlreadyRegisteredError':_0x5ac39e,'OKDBIndexNotRegisteredError':_0x56dd37,'OKDBIndexAlreadyRegisteredError':_0x1043fa,'OKDBInvalidValueError':_0x483761,'OKDBUniqueConstraintError':_0x377084,'OKDBSchemaValidationError':_0x11e51d,'OKDBSchemaCollectionError':_0x5b513f,'OKDBForeignKeyError':_0x3068f6,'OKDBForeignKeyDeleteError':_0x5cc5b8,'OKDBIndexHasConsumersError':_0x3930c9},okdbError;}var okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x20a5b1=_0x422f41;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x220b73={'PUT':_0x20a5b1(0x1b9),'REMOVE':'remove','INDEX_DROP':'dropIndex','INDEX_REGISTER':'registerIndex','INDEX_RESET':'resetIndex','TYPE_REGISTER':_0x20a5b1(0x3ca),'TYPE_DROP':_0x20a5b1(0x179),'FTS_REGISTER':'registerFts','FTS_DROP':_0x20a5b1(0x30c),'FTS_RESET':'resetFts','SCHEMA_SET':_0x20a5b1(0x1b1),'SCHEMA_DROP':_0x20a5b1(0x411),'TTL_SET':_0x20a5b1(0x40d),'TTL_CLEAR':_0x20a5b1(0x272)},_0x5a612a={'SYSTEM_READY':_0x20a5b1(0x335),'SYSTEM_STOPPED':_0x20a5b1(0x3cd),'SYSTEM_CLOCK_CHANGE':_0x20a5b1(0x246),'SYSTEM_POKE':_0x20a5b1(0x377),'SYSTEM_DRAIN':_0x20a5b1(0x2eb),'SYSTEM_TYPE_DROP':_0x20a5b1(0x462),'SYSTEM_BUS_STATE_CHANGE':'system:bus_state_change','ITEM_CREATE':'item:create','ITEM_UPDATE':'item:update','ITEM_REMOVE':'item:remove','INDEX_RESET':_0x20a5b1(0x18f),'INDEX_READY':_0x20a5b1(0x3f2),'INDEX_PROGRESS':_0x20a5b1(0x28e),'VIEW_PROGRESS':'view:progress','INDEX_DROP':_0x20a5b1(0x182),'INDEX_REGISTERED':_0x20a5b1(0x17b),'FTS_REGISTERED':'fts:registered','FTS_DROP':_0x20a5b1(0x47d),'FTS_RESET':_0x20a5b1(0x16d),'SCHEMA_SET':_0x20a5b1(0x35f),'SCHEMA_DROP':_0x20a5b1(0x301),'UNIQUE_VIOLATION':'unique:violation','UNIQUE_VIOLATION_RESOLVED':_0x20a5b1(0x445),'REF_VIOLATION':_0x20a5b1(0x29f),'REF_VIOLATION_RESOLVED':'ref:violation_resolved','SYNC_APPLY':_0x20a5b1(0x240),'TXN_START':_0x20a5b1(0x3d0),'TXN_END':'txn:end','TXN_ROLLBACK':'txn:rollback','TYPE_REGISTERED':'type:registered','TYPE_DROP':'type:drop','ENV_OPENED':_0x20a5b1(0x404),'ENV_REMOVED':'env:removed','TTL_EXPIRED':_0x20a5b1(0x388),'TTL_SET':_0x20a5b1(0x1d8),'TTL_CLEAR':_0x20a5b1(0x2ab),'LICENSE_INVALID':_0x20a5b1(0x42e),'LICENSE_ADDED':_0x20a5b1(0x2ae),'LICENSE_ACTIVATED':_0x20a5b1(0x201),'LICENSE_REMOVED':_0x20a5b1(0x184)},_0x493165={'CREATING':_0x20a5b1(0x218),'RESETTING':_0x20a5b1(0x3d1),'READY':_0x20a5b1(0x282),'DROPPING':_0x20a5b1(0x1de),'WAITING':_0x20a5b1(0x3f9)},_0x599449={'CREATED':'created','STARTING':'starting','STARTED':'started','STOPPING':_0x20a5b1(0x413),'STOPPED':_0x20a5b1(0x2db)},_0x505a3f={'CREATING':'creating','READY':_0x20a5b1(0x282),'HALTED':_0x20a5b1(0x429),'STOPPED':_0x20a5b1(0x2db),'RESETTING':_0x20a5b1(0x3d1)},_0x5e6bfc=Object['freeze']({'POKE':_0x20a5b1(0x2b3),'DRAIN':_0x20a5b1(0x254),'TYPE_DROP':_0x20a5b1(0x37c)});return okdbEnums={'BUS_EVENTS':_0x5e6bfc,'CHANGE_ACTIONS':_0x220b73,'EVENTS':_0x5a612a,'INDEX_STATE':_0x493165,'OKDB_STATE':_0x599449,'VIEW_STATE':_0x505a3f},okdbEnums;}var okdbPubkey,hasRequiredOkdbPubkey;function requireOkdbPubkey(){const _0xa5f7bb=_0x422f41;if(hasRequiredOkdbPubkey)return okdbPubkey;hasRequiredOkdbPubkey=0x1;const _0x357fc1=require$$1,_0x3bb55a=require$$1$1,_0x316dfe=require$$0,_0x1894e8=_0x357fc1[_0xa5f7bb(0x401)](_0x3bb55a['join'](__dirname,_0xa5f7bb(0x227)),'utf8')[_0xa5f7bb(0x473)](),_0x32d1fe=_0x316dfe[_0xa5f7bb(0x3d6)](_0x1894e8)[_0xa5f7bb(0x20d)]({'type':_0xa5f7bb(0x2f7),'format':_0xa5f7bb(0x2a8)}),_0x3fdcf5=_0x316dfe[_0xa5f7bb(0x2e2)](_0xa5f7bb(0x43a))[_0xa5f7bb(0x35b)](_0x32d1fe)[_0xa5f7bb(0x393)]('hex')[_0xa5f7bb(0x423)](0x0,0x10);return okdbPubkey={'PUBLIC_KEY_PEM':_0x1894e8,'PUB_FINGERPRINT':_0x3fdcf5},okdbPubkey;}var okdbLicense,hasRequiredOkdbLicense;function _0x3a98(){const _0xcd5d4c=['Admin','--path','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20has\x20expired\x20—\x20request\x20a\x20fresh\x20one.','\x0a\x20\x20Usage:\x20use\x20<env-name>\x0a','DELETE\x20type/users/item/x','permissions','idx:','isArray','\x0a\x20\x20✓\x20License\x20added','set','VERB','hex','node','Sync','--ttl','concat','[okdb]\x20exporting\x20env\x20\x22','_envs','join','stopped','~tokens','wrong_node','type/users\x20--help','transport:\x20','label','\x20\x20\x20\x20license:\x20','createHash','/type/users/query\x0a\x20\x20\x20\x20','grants','toUpperCase','argv','onLicenseExpired','decodeLicenseBlob:\x20failed\x20to\x20decode\x20payload:\x20','\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.','0123456789ABCDEFGHJKMNPQRSTVWXYZ','system:drain','embeddings','\x20\x20[okdb]\x20','OKDBAlreadyExistsError','object','win32','changes','null','warn','Queue','Index\x20\x22','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','spki','current','\x20\x20score:','\x20\x20\x20\x20licensee:\x20\x20','./okdb-data','\x20—\x20type\x20env\x20to\x20list\x20available\x0a','\x20\x20(press\x20Ctrl+C\x20again\x20to\x20exit)\x0a','ROUTES','[okdb]\x20error:\x20remove\x20requires\x20an\x20id\x20argument','OKDBIndexNotRegisteredError','schema:drop','_license','emit','valid','reason','VERSION_MISMATCH','database\x20path\x20writable:\x20','\x20\x20⚠','\x20\x20Usage:\x20logs\x20[on|off|debug|info|warn|error]','exportToFile','\x20\x20Path\x20access','dropFts','\x20\x20✓\x20http\x20listening\x20on\x20:','license','Indexes','timeMachine','loadEnvFile','Schema\x20validation\x20failed\x20for\x20','\x0a\x20\x20✓\x20License\x20activated','sizeBefore','FOREIGN_KEY_VIOLATION','available','catch','\x20\x20http://localhost:','SIG_INVALID','Activation\x20invalid:\x20','createHmac','\x20\x20[okdb]\x20closed\x20cleanly\x0a','.okdb-write-test','\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','\x20\x20╔═══════════════════════════╗','ftsName','writeFileSync','[okdb]\x20.kdbconfig\x20already\x20exists\x20—\x20skipping','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20override\x20active\x20environment\x20for\x20this\x20call\x0a\x20\x20','[okdb]\x20error:\x20token\x20with\x20name\x20\x22','\x20\x20Usage:\x20','expired','tags','search','\x1b[35m','licensee','[okdb]\x20failed\x20to\x20parse\x20config\x20file\x20','\x27\x20doesn\x27t\x20exist','\x20document(s)\x20reference\x20it\x20with\x20onDelete:restrict','byteLength','(add\x20a\x20license\x20first)','green','logLevel','51331tjhKxC','--config','\x20\x20\x20\x20status:\x20\x20\x20\x20active\x20\x20(open\x20license\x20—\x20no\x20activation\x20needed)','system:ready','\x20SECURITY\x20NOTICE','\x0a\x20\x20✓\x20Token\x20created','migrate','remove','targetType','\x20\x20[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a','\x20already\x20in\x20use','\x0a\x20\x20Run\x20okdb\x20to\x20start\x20the\x20server.\x0a','call','\x20MB\x20→\x20','padEnd','\x20\x20\x20\x20•\x20a\x20license\x20blob\x20\x20\x20(Crockford\x20base32,\x20~150–250\x20chars)','some','repeat','\x22\x20on\x20\x22','\x27\x20already\x20registered','doctor','decodeLicenseBlob','TYPE_ALREADY_REGISTERED','readUInt8','PUT','OKDBVersionMismatchError','http','type/users/item/alice','\x20→\x20POST\x20/api/env/','operation','forEach','\x20\x20·\x20','[filter]','log','\x22\x20(must\x20be\x20debug|info|warn|error)','reverse','message','Invalid\x20activation\x20token:\x20','\x1b[31m','LICENSE_EXPIRED_ACTION','rmSync','update','Token\x20secret\x20not\x20configured','uuid','228033nEFFFd','schema:set','type','\x20\x20(unlimited)','[okdb]\x20unknown\x20token\x20action:\x20\x22','details','Unique\x20constraint\x20violated\x20on\x20','floor','\x20\x20\x20\x20usage:\x20\x20\x20','\x20\x20·\x20\x20','createInterface','parse','off','\x1b[37m','\x20for\x20commands,\x20','12788963oVrLCB','\x20already\x20exists','exports','question','--help','dirname','red','[okdb]\x20blobs:\x20imported=','clearLine','open','system:poke','USE','type/users','peers=','shutting\x20down…\x0a','bus:type_drop','PATCH','utf8','stdin','queue/','ttl','setPrompt','properties','\x0a\x20\x20[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a','--blobs','resume','effective','ttl:expired','get','detachConsole','targetKey','[okdb]\x20close\x20error:\x20','licenseType','140HCrJXp','importBlobs','toISOString','types','terminal','digest','tags:\x20','~licenses','\x20logs\x20off\x0a','records','\x20\x20All\x20checks\x20passed.\x0a','--key','__writeCounter','\x20\x20\x20\x20\x20control\x20log\x20verbosity\x0a\x20\x20','stringify','416nAYvKI','write','token','listening','\x20licenses','--log-level','isFile','\x20\x20\x20\x20','map','summary','typesPerEnv','[okdb]\x20opening\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/','OKDBTypeNotRegisteredError','[okdb]\x20created\x20.kdbconfig','--changes','port','\x20\x20(name:\x20','issuedAt','Index\x20\x27','767240qgrbHL','--drop','\x20\x20\x20\x20limits:\x20\x20\x20\x20','OPEN','[okdb]\x20error:\x20show\x20requires\x20an\x20id\x20argument','readUInt32BE',']\x20already\x20maps\x20to\x20\x27','Files','Examples','indexes','getRange','views','scrypt','exit','kind','\x20day(s).','\x0a\x20\x20Delete\x20ALL\x20data\x20in\x20','createServer','types/env=','\x0a\x20\x20\x20\x20','<path>','push','\x20log\x20level:\x20','sig','application/json','registerType','stderr','\x20\x20\x20\x20\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/','system:stopped','mcp','OKDBIndexAlreadyRegisteredError','txn:start','resetting','\x20\x20⚠\x20\x20','\x20\x20Next\x20step\x20—\x20activate\x20the\x20license:','\x20\x20Shell\x20commands','\x20\x20✓\x20OKDB\x20server\x20running','createPublicKey','\x20\x20(','License\x20expired\x20or\x20invalidated','options','PUB_FINGERPRINT','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','list','equals','[okdb]\x20exporting\x20blobs…','.\x20Add\x20a\x20license\x20that\x20includes\x20\x22','PUT\x20type/users/item/x\x20{\x22n\x22:1}','replace','\x20envs','dynamic','\x20file','\x20\x20\x20\x20\x20\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\x20Writes:\x20\x20','\x20deleted','\x0a\x20\x20okdb\x20doctor\x0a','indexToDb','{}[]:,\x27\x22','__OKDB_PUB_FINGERPRINT__','once','\x20\x20\x20\x203.\x20Run:\x20\x20okdb\x20license\x20<activation-token>','\x20\x20\x20\x20admin:\x20http://localhost:','param','crypto','\x20\x20Example:\x20okdb\x20join\x20https://node-a.example.com\x20--token\x20<t>\x20--address\x20http://myhost:8484\x0a','index:ready','\x20\x20\x20\x20\x20explicit\x20method\x0a\x0a\x20\x20','\x20(expires\x20in\x20','OKDBSchemaValidationError','captureStackTrace','\x20\x20Or\x20set\x20sync.address\x20in\x20.kdbconfig','sort','waiting','dim','\x20writes\x20(','expiresAt','values','OKDBInvalidValueError','fill','\x20\x20(licenses\x20must\x20be\x20signed\x20by\x20the\x20matching\x20private\x20key)','readFileSync','.\x20The\x20active\x20license\x20does\x20not\x20enable\x20\x22','PERMISSIONS','env:opened','Cannot\x20delete\x20','OKDB-PIN-V1:','Feature\x20not\x20licensed:\x20','DELETE','--password','server','INVALID_PRIMARY_KEY','method','setTtl','Environments','[body]','\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','dropSchema','Feature\x20not\x20available\x20on\x20free\x20tier:\x20','stopping','writeUInt16BE','string','\x20\x20\x20\x20permissions:\x20','routes','OKDBInvalidIndexKeyError','handle','LICENSE_ACTIVATION_INVALID','LICENSED_BUILD','detectInputType','resolve','\x20\x20\x20\x20\x20\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','hidden','noAdmin','\x20to\x20browse\x20the\x20API,\x20','/api','slice','other','events','POST','endsWith','init','halted','Processors','Types','NAME','—\x20/api/\x20is\x20auto-prefixed,\x20env\x20is\x20auto-injected','license:invalid','--open','[okdb]\x20imported\x20\x20types=','\x20does\x20not\x20exist','Cannot\x20set\x20enforce\x20schema\x20on\x20','gray','\x20bytes,\x20need\x20>=\x2065)','fts','address','[okdb]\x20loaded\x20config:\x20','_active','\x20\x20Common\x20causes:','sha256','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20','\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','\x20in\x20','mkdirSync','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20','platform','.kdb_history','startsWith','INDEX_NOT_REGISTERED','boolean','unique:violation_resolved','[okdb]\x20closed\x20cleanly\x0a','\x0a\x20\x20Joining\x20cluster\x20at\x20','yes','reset','\x22.\x20Use:\x20create,\x20list,\x20revoke','readUInt16BE','HTTP\x20','ceil','\x1b[34m','\x20\x20Usage:','magenta','has','auth','body','\x20references\x20','/api/','\x27,\x20cannot\x20map\x20to\x20\x27','\x20type','open\x20','username','index','level:\x20info','processors/','hasType','OKDBUniqueConstraintError','\x0a\x20\x20No\x20documentation\x20found\x20for:\x20','\x22\x20is\x20used\x20by:\x20','toLocaleString','system:type_drop','cyan','getCount','\x22\x20to\x20enable\x20it.','\x20\x20skipped=','\x20\x20\x20\x20status:\x20\x20\x20\x20active','\x20\x20✗','includes','[okdb]\x20reset\x20aborted','stdout','INVALID_VALUE','[okdb]\x20error:\x20license\x20management\x20is\x20only\x20available\x20in\x20licensed\x20builds\x20(npm\x20run\x20build:prod).','type/users/query\x20{\x22active\x22:true}','SCHEMA_VALIDATION_FAILED','(unset)','verify','round','trim','hasOwnProperty','Invalid\x20license\x20blob:\x20','Invalid\x20primary\x20key\x20type:\x20','listLicenses','No\x20license\x20found\x20matching\x20this\x20activation\x20token','envs','env','\x20months\x20from\x20issuance)','every','fts:drop','\x20\x20║','pin','PIN','Open\x20licenses\x20cannot\x20exceed\x206\x20months\x20duration\x20(this\x20license\x20expires\x20','--grants','listRoutes','files/','alloc','\x20\x20\x20\x20expires:\x20\x20\x20','fts:reset','noRepl','\x0a\x20\x20Raw\x20token\x20(shown\x20once,\x20save\x20it\x20now):\x0a','licenseHash','\x20\x20\x20\x20graceful\x20shutdown\x0a','errors','access:\x20','{}[]:,\x0a\x0d\x09\x20','1.8.18','\x0a[okdb]\x20error:\x20','[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22','\x20\x20\x20\x20addedAt:\x20\x20\x20','dropType','getSecurityNotices','index:registered','data','createdAt','selfAddress','key','\x1b[33m','\x20\x20Tier:\x20\x20\x20\x20','index:drop','\x20\x20\x20\x20\x20\x20\x20','license:removed','\x20\x20Type\x20','meta','prompt','path','\x27\x20on\x20type\x20\x27','1087eBMYkh','charCodeAt','debug','description','features','index:reset','timingSafeEqual','length','result','admin','min','\x20\x20records=','403924xCXmdj','EXPIRES','\x20\x20\x20http://localhost:','--no-repl','\x20\x20\x20\x20status:\x20\x20\x20\x20','white','./okdb-export.ndjson','\x22\x20→\x20','INDEX_ALREADY_REGISTERED','\x20\x20\x20\x20license:\x20free\x20tier\x20—\x20add\x20a\x20license\x20to\x20unlock\x20sync,\x20embeddings,\x20engines,\x20time-machine','copy','writeUInt32BE','pending','\x20<path>\x20[json-body]','shutdown','LICENSE_INVALID','logRequests','pause','_licenseHash','\x20\x20Expected\x20one\x20of:','sub','\x20\x20Note:\x20this\x20node\x20has\x20existing\x20tokens.\x20They\x20will\x20coexist\x20with\x20cluster\x20tokens\x0a','reload','\x20\x20changes=','Type\x20\x27','\x20\x20(licensee:\x20','unknown','setSchema','[okdb]\x20invalid\x20port:\x20','Invalid\x20index\x20key\x20type\x20for\x20\x27','--types','from','revoke','access','now','put','failures','127.0.0.1','active','\x20which\x20does\x20not\x20exist','_ensureTokensType','yellow','GET','readline','.\x20Primary\x20keys\x20must\x20be\x20string\x20or\x20number.\x20Got:\x20','decodeActivationToken:\x20input\x20must\x20be\x20a\x20string','[okdb]\x20backup\x20complete','Build\x20expects\x20public\x20key\x20fingerprint\x20','verifyActivation','children','toLowerCase','FEATURES','trimStart','SCHEMA_COLLECTION_INVALID','OKDBSchemaCollectionError','--token','help','roles','inputSchema','blobs','isInteger','Either\x20the\x20build\x20was\x20made\x20with\x20a\x20different\x20keypair,\x20or\x20the\x20license\x20was\x20issued\x20with\x20a\x20different\x20private\x20key.','\x20\x20\x20\x20-\x20The\x20license\x20blob\x20has\x20not\x20been\x20added\x20yet\x20—\x20run\x20`okdb\x20license\x20<blob>`\x20first.','OKDBIndexHasConsumersError','--label','--env\x20<name>','ttl:set','randomUUID','--port','info','\x1b[36m','count','dropping','split','isTTY','decodeLicenseBlob:\x20input\x20must\x20be\x20a\x20string','.\x20Only\x20primitives,\x20null,\x20Buffers,\x20and\x20arrays\x20are\x20allowed.\x20Got:\x20','getPins','995175LvyBah','Hint:\x20','Version\x20mismatch\x20for\x20','config','filter','\x20\x20\x20\x202.\x20The\x20vendor\x20returns\x20an\x20activation\x20token.','.kdbconfig','\x20environment\x20','type/users/item/alice\x20--env\x20staging','\x1b[32m','_computeStatus','statSync','default','env/',')\x20to\x20your\x20license\x20vendor.','[okdb]\x20created\x20./okdb-data','\x20\x20Envs:\x20\x20\x20\x20','\x20\x20after\x20sync.\x20Duplicate\x20names\x20will\x20surface\x20as\x20ambiguous\x20logins\x20to\x20clean\x20up.','error','padStart','\x20\x20\x20\x20\x20\x20','LICENSE_TYPE_OPEN','fts:','time','\x0a\x0a\x20\x20','License\x20signature\x20invalid\x20—\x20this\x20license\x20was\x20not\x20signed\x20by\x20the\x20key\x20paired\x20with\x20this\x20build.\x20','ACTIVATION_EXPIRED','\x20to\x20quit.','QUIT','license:activated','xdg-open\x20','License\x20signature\x20invalid:\x20','_isFree','\x22\x20matches\x20','HELP','database\x20path\x20not\x20writable:\x20','(none)','\x20not\x20found','dest','test','[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22','export','sync','max','recheck','dbPath','use\x20<env>','config\x20file\x20valid:\x20','LABEL','\x0a\x20\x20License\x20details:','[okdb]\x20error:\x20unrecognized\x20input:\x20\x22','./okdb-backup','creating','expiry','[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22','already\x20in\x20use','⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20','\x20\x20✓\x20Revoked\x20token\x20','_systemEnv','PUBLIC_KEY_PEM','types:','decodeActivationToken:\x20expected\x2077\x20bytes,\x20got\x20','/\x20quit\x20/\x20Ctrl+C','logs','engines','\x0a\x20\x20No\x20routes\x20matching\x20\x22','enabled','keys/public.pem','TYPES','status','\x22\x20already\x20exists','\x20\x20╚═══════════════════════════╝','received\x20','No\x20tokens.','standard','writeUInt8','\x27\x20is\x20already\x20registered','\x20\x20\x20\x20\x20http://localhost:','randomBytes','\x20\x20(need\x20≥\x2018)','prototype','[okdb]\x20importing\x20','LOGS','okdb','LICENSE_HASH_MISMATCH','OKDBForeignKeyDeleteError','rawBuf','blob','invalid','typeSubDbs','references','SIGBREAK','sync:apply','level','\x20\x20✓\x20Removed\x20license\x20','330winZmX','FOREIGN_KEY_DELETE_RESTRICTED','bind','system:clock_change','safety','number','UNIQUE_CONSTRAINT','allocUnsafe','node\x20','--log-requests','(no\x20types)','[okdb]\x20error:\x20--grants\x20must\x20be\x20valid\x20JSON\x20object','SIGTERM','INDEX_HAS_CONSUMERS','name','\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','toString','bus:drain','node:crypto','maxWrites','okdb.pid','attach','files','transport','\x20records','[okdb]\x20started\x20in\x20','keys','env/:env','unlinkSync','[env]','--address','history','expires','\x0a[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a','syncPeers','homedir','constructor','--env','\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20','[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a','[okdb]\x20error:\x20--address\x20is\x20required\x20for\x20join\x20(this\x20node\x27s\x20reachable\x20sync\x20address).\x0a','\x20more','password','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20','\x0a\x20\x20Joined.\x20Remote\x20tokens\x20replicated.\x20You\x20can\x20now\x20log\x20in\x20with\x20cluster\x20credentials.\x0a','bold','existsSync','clearTtl','entries','\x20documents\x20fail\x20validation','\x0d[okdb]\x20blobs:\x20','/api/env/','toFixed','licensed','SIGINT','\x27:\x20','import','derivePin','create','api','darwin','License\x20limit\x20exceeded:\x20','activation','ready','free\x20tier','addLicense','__esModule','close','writes=','\x20result','Events','\x20\x20✓\x20database\x20opened\x0a','licenseId','/admin/index.html','backup','index:progress','\x20\x20+',':\x20key\x20[','addedAt','CREATED','find','[okdb]\x20./okdb-data\x20already\x20exists\x20—\x20skipping','no\x20.kdbconfig\x20(using\x20defaults)','\x20\x20\x20\x20•\x20a\x20path\x20to\x20a\x20.license\x20file','MALFORMED_TOKEN','\x20\x20Some\x20checks\x20failed.\x0a','\x20/\x20','/types\x0a\x20\x20\x20\x20','[okdb]\x20error:\x20','6cLZjwr','ALREADY_EXISTS','type/','ref:violation','line','\x0a\x20\x20','sourceKey','--no-admin','body:\x20','drop','exportBlobs','[okdb]\x20starting…\x0a','der','--name','EXIT','ttl:clear','NOT_FOUND','\x20\x20\x20\x20port:\x20\x20','license:added','\x20\x20\x20\x20writes:\x20\x20\x20\x20','value','(on\x20any\x20path\x20command)','OKDBInvalidPrimaryKeyError','bus:poke','\x20\x20\x20\x20features:\x20\x20','limits','../','false','code','decoded','[okdb]\x20invalid\x20log\x20level:\x20\x22','active:','version','base64url','port\x20','--permissions','LICENSEE','\x20MB)','true','indexOf','\x1b[0m','assertLimit','<json-body>',',\x20label:\x20'];_0x3a98=function(){return _0xcd5d4c;};return _0x3a98();}function _0xd32f(_0x34d07b,_0x2ebe3d){_0x34d07b=_0x34d07b-0x166;const _0x3a9865=_0x3a98();let _0xd32f2=_0x3a9865[_0x34d07b];return _0xd32f2;}function requireOkdbLicense(){const _0xc6e317=_0x422f41;if(hasRequiredOkdbLicense)return okdbLicense;hasRequiredOkdbLicense=0x1;const _0x47d6f9=require$$0,{OKDBError:_0x1bfcf9}=requireOkdbError(),{EVENTS:_0x1d8202}=requireOkdbEnums(),_0x16889d=requireOkdbLicenseCodec(),{LICENSE_TYPE_OPEN:_0x53a1b4,LICENSE_TYPE_INTERNAL:_0x4402ba,OPEN_LICENSE_MAX_DURATION_MS:_0x521c11}=_0x16889d,_0x5eb73d=requireOkdbPubkey(),_0xcafdf5={'LICENSED_BUILD':'true','PUBLIC_KEY_PEM':_0x5eb73d[_0xc6e317(0x21f)],'PUB_FINGERPRINT':_0x5eb73d[_0xc6e317(0x3da)],'LICENSE_EXPIRED_ACTION':_0xc6e317(0x353)},_0x334a2b='~licenses',_0x1ca9bb={'features':{'sync':![],'embeddings':![],'engines':![],'fts':!![],'timeMachine':![],'views':!![],'mcp':!![],'files':!![]},'limits':{'envs':0x2,'typesPerEnv':0xa,'syncPeers':0x0,'maxWrites':0xf4240},'_isFree':!![]};async function _0x2319fa(_0x5a00b2){const _0x5c8cc9=_0xc6e317;!_0x5a00b2['hasType'](_0x334a2b)&&await _0x5a00b2[_0x5c8cc9(0x3ca)](_0x334a2b);}class _0x8ebc6a{constructor(_0x1d581c){const _0x278c8c=_0xc6e317;this[_0x278c8c(0x237)]=_0x1d581c,this['_active']=null;}async[_0xc6e317(0x1ac)](){const _0x48a15b=_0xc6e317,_0x546a1e=this[_0x48a15b(0x237)][_0x48a15b(0x21e)];if(!_0x546a1e||!_0x546a1e[_0x48a15b(0x45d)](_0x334a2b)){this[_0x48a15b(0x438)]=null;return;}const _0x180f8a=this[_0x48a15b(0x237)]['id'];let _0x51df7b=null;for(const {key:_0x50b7e1,value:_0x4372a5}of _0x546a1e[_0x48a15b(0x3bb)](_0x334a2b)){const _0x2ba932=this[_0x48a15b(0x1ee)](_0x4372a5,_0x180f8a);_0x2ba932===_0x48a15b(0x1bc)&&!_0x51df7b&&(_0x51df7b={..._0x4372a5,'id':_0x50b7e1,'status':_0x2ba932});}this['_active']=_0x51df7b;if(this[_0x48a15b(0x438)]&&this['_active'][_0x48a15b(0x38d)]===_0x53a1b4){const _0x4084b1=Math[_0x48a15b(0x44d)]((this['_active']['expiresAt']-Date[_0x48a15b(0x1b8)]())/0x5265c00);this['okdb'][_0x48a15b(0x353)]?.[_0x48a15b(0x2f3)]('⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20'+_0x4084b1+_0x48a15b(0x3c0),{'feature':_0x48a15b(0x30e),'licensee':this[_0x48a15b(0x438)][_0x48a15b(0x32a)],'expiresAt':new Date(this[_0x48a15b(0x438)][_0x48a15b(0x3fc)])[_0x48a15b(0x390)]()});}this[_0x48a15b(0x438)]&&this[_0x48a15b(0x438)][_0x48a15b(0x38d)]===_0x4402ba&&this[_0x48a15b(0x237)][_0x48a15b(0x353)]?.[_0x48a15b(0x2f3)]('⚠\x20INTERNAL\x20LICENSE\x20ACTIVE\x20—\x20all\x20features\x20and\x20limits\x20are\x20unlocked.\x20For\x20vendor/internal\x20use\x20only.',{'feature':_0x48a15b(0x30e),'licensee':this[_0x48a15b(0x438)][_0x48a15b(0x32a)]});}['_computeStatus'](_0x571903,_0x37e003){const _0x59b8e8=_0xc6e317;if(!_0x571903['blob'])return _0x59b8e8(0x23c);let _0x422b60;try{_0x422b60=_0x16889d['decodeLicenseBlob'](_0x571903['blob']);}catch(_0xf83118){return _0x59b8e8(0x23c);}try{const _0x14cd8a=_0x47d6f9[_0x59b8e8(0x471)](null,_0x422b60['payload'],_0xcafdf5['PUBLIC_KEY_PEM'],_0x422b60[_0x59b8e8(0x3c8)]);if(!_0x14cd8a)return'invalid';}catch(_0x41fb76){return'invalid';}if(_0x422b60[_0x59b8e8(0x2b9)][_0x59b8e8(0x38d)]===_0x4402ba)return'active';if(_0x422b60[_0x59b8e8(0x2b9)][_0x59b8e8(0x3fc)]<=Date[_0x59b8e8(0x1b8)]())return _0x59b8e8(0x326);if(_0x422b60[_0x59b8e8(0x2b9)][_0x59b8e8(0x38d)]===_0x53a1b4)return _0x59b8e8(0x1bc);if(!_0x571903['activation'])return _0x59b8e8(0x1a2);const _0x4af16f=_0x16889d[_0x59b8e8(0x1c6)]({'tokenString':_0x571903[_0x59b8e8(0x281)],'nodeId':_0x37e003,'rawBlobBuf':_0x422b60[_0x59b8e8(0x23a)],'pubKeyPem':_0xcafdf5[_0x59b8e8(0x21f)],'pubFingerprint':_0xcafdf5[_0x59b8e8(0x3da)]});if(_0x4af16f[_0x59b8e8(0x305)]===_0x59b8e8(0x238)||_0x4af16f[_0x59b8e8(0x305)]===_0x59b8e8(0x319))return _0x59b8e8(0x2dd);if(_0x4af16f[_0x59b8e8(0x305)]===_0x59b8e8(0x1fe))return _0x59b8e8(0x326);if(!_0x4af16f['valid'])return _0x59b8e8(0x2dd);return _0x59b8e8(0x1bc);}get['active'](){const _0x168e78=_0xc6e317;return this[_0x168e78(0x438)];}get[_0xc6e317(0x387)](){return this['_active']??_0x1ca9bb;}['assertFeature'](_0x22c03a){const _0x4dcaa8=_0xc6e317;if(_0xcafdf5[_0x4dcaa8(0x41b)]!==_0x4dcaa8(0x2c2))return;const _0x111c00=this[_0x4dcaa8(0x387)];if(!_0x111c00[_0x4dcaa8(0x18e)]?.[_0x22c03a]){const _0x5c1c1b=_0x111c00[_0x4dcaa8(0x204)]?_0x4dcaa8(0x412)+_0x22c03a+_0x4dcaa8(0x3df)+_0x22c03a+_0x4dcaa8(0x465):_0x4dcaa8(0x407)+_0x22c03a+_0x4dcaa8(0x402)+_0x22c03a+'\x22.';throw new _0x1bfcf9(_0x5c1c1b,'LICENSE_FEATURE_DISABLED',{'feature':_0x22c03a});}}['isFeatureEnabled'](_0x16537c){const _0x171444=_0xc6e317;if(_0xcafdf5['LICENSED_BUILD']!==_0x171444(0x2c2))return!![];return!!this['effective'][_0x171444(0x18e)]?.[_0x16537c];}[_0xc6e317(0x2c5)](_0x1e9bed,_0x599552){const _0xe929aa=_0xc6e317;if(_0xcafdf5['LICENSED_BUILD']!==_0xe929aa(0x2c2))return;const _0x58ca32=this[_0xe929aa(0x387)],_0x4c4846=_0x58ca32[_0xe929aa(0x2b5)]?.[_0x1e9bed];if(_0x4c4846===null||_0x4c4846===undefined||_0x4c4846===0x0)return;if(_0x599552>=_0x4c4846)throw new _0x1bfcf9(_0xe929aa(0x280)+_0x1e9bed+'\x20('+_0x599552+'/'+_0x4c4846+')','LICENSE_LIMIT_EXCEEDED',{'limit':_0x1e9bed,'current':_0x599552,'max':_0x4c4846});}async[_0xc6e317(0x284)](_0x52c465){const _0x4bd1a4=_0xc6e317;let _0x30ad8e;try{_0x30ad8e=_0x16889d[_0x4bd1a4(0x347)](_0x52c465);}catch(_0x65c433){throw new _0x1bfcf9(_0x4bd1a4(0x475)+_0x65c433['message'],_0x4bd1a4(0x1a5));}let _0x8c945c;try{_0x8c945c=_0x47d6f9[_0x4bd1a4(0x471)](null,_0x30ad8e['payload'],_0xcafdf5[_0x4bd1a4(0x21f)],_0x30ad8e['sig']);}catch(_0x454e6d){throw new _0x1bfcf9(_0x4bd1a4(0x203)+_0x454e6d['message'],_0x4bd1a4(0x1a5));}if(!_0x8c945c)throw new _0x1bfcf9(_0x4bd1a4(0x1fd)+(_0x4bd1a4(0x1c5)+_0xcafdf5['PUB_FINGERPRINT']+'.\x20')+_0x4bd1a4(0x1d3),_0x4bd1a4(0x1a5),{'expectedFingerprint':_0xcafdf5['PUB_FINGERPRINT']});if(_0x30ad8e['decoded']['licenseType']===_0x53a1b4){const _0x2c1c13=_0x30ad8e[_0x4bd1a4(0x2b9)][_0x4bd1a4(0x3fc)]-_0x30ad8e[_0x4bd1a4(0x2b9)][_0x4bd1a4(0x3af)];if(_0x2c1c13>_0x521c11)throw new _0x1bfcf9(_0x4bd1a4(0x167)+Math[_0x4bd1a4(0x44d)](_0x2c1c13/(0x1e*0x5265c00))+_0x4bd1a4(0x47b),_0x4bd1a4(0x1a5));}const _0x11d05b=this[_0x4bd1a4(0x237)][_0x4bd1a4(0x21e)];await _0x2319fa(_0x11d05b);const _0x4219a7=_0x16889d[_0x4bd1a4(0x170)](_0x30ad8e[_0x4bd1a4(0x23a)])[_0x4bd1a4(0x253)](_0x4bd1a4(0x2d3));for(const {value:_0x52da7c}of _0x11d05b['getRange'](_0x334a2b)){if(_0x52da7c[_0x4bd1a4(0x1a8)]===_0x4219a7)throw new _0x1bfcf9('License\x20already\x20stored',_0x4bd1a4(0x1a5));}const _0x270d6c=_0x47d6f9['randomUUID'](),_0x15f31e={'blob':_0x52c465,'activation':null,'addedAt':Date[_0x4bd1a4(0x1b8)](),'_licenseHash':_0x4219a7,'licensee':_0x30ad8e['decoded'][_0x4bd1a4(0x32a)],'expiresAt':_0x30ad8e[_0x4bd1a4(0x2b9)][_0x4bd1a4(0x3fc)],'features':_0x30ad8e[_0x4bd1a4(0x2b9)][_0x4bd1a4(0x18e)],'limits':_0x30ad8e[_0x4bd1a4(0x2b9)]['limits'],'licenseType':_0x30ad8e[_0x4bd1a4(0x2b9)][_0x4bd1a4(0x38d)]};return await _0x11d05b['put'](_0x334a2b,_0x270d6c,_0x15f31e),{'id':_0x270d6c,..._0x15f31e};}async['activateLicense'](_0x22c3fa){const _0x188ad4=_0xc6e317;let _0x362dfa;try{_0x362dfa=_0x16889d['decodeActivationToken'](_0x22c3fa);}catch(_0x23d797){throw new _0x1bfcf9(_0x188ad4(0x357)+_0x23d797[_0x188ad4(0x356)],'LICENSE_ACTIVATION_INVALID');}const _0x674274=_0x362dfa[_0x188ad4(0x170)][_0x188ad4(0x253)](_0x188ad4(0x2d3)),_0xa48336=this[_0x188ad4(0x237)][_0x188ad4(0x21e)];if(!_0xa48336||!_0xa48336['hasType'](_0x334a2b))throw new _0x1bfcf9('No\x20license\x20found\x20matching\x20this\x20activation\x20token','LICENSE_ACTIVATION_INVALID');let _0xe587cc=null,_0x36caf4=null;for(const {key:_0x491075,value:_0x387720}of _0xa48336[_0x188ad4(0x3bb)](_0x334a2b)){if(_0x387720[_0x188ad4(0x1a8)]===_0x674274){_0xe587cc=_0x491075,_0x36caf4=_0x387720;break;}}if(!_0xe587cc)throw new _0x1bfcf9(_0x188ad4(0x478),_0x188ad4(0x41a));const {rawBuf:_0x53f6ed}=_0x16889d[_0x188ad4(0x347)](_0x36caf4[_0x188ad4(0x23b)]),_0x164df3=_0x16889d[_0x188ad4(0x1c6)]({'tokenString':_0x22c3fa,'nodeId':this['okdb']['id'],'rawBlobBuf':_0x53f6ed,'pubKeyPem':_0xcafdf5['PUBLIC_KEY_PEM'],'pubFingerprint':_0xcafdf5[_0x188ad4(0x3da)]});if(!_0x164df3[_0x188ad4(0x304)])throw new _0x1bfcf9(_0x188ad4(0x31a)+_0x164df3['reason'],_0x188ad4(0x41a),{'reason':_0x164df3[_0x188ad4(0x305)]});const _0x473245={..._0x36caf4,'activation':_0x22c3fa};return await _0xa48336[_0x188ad4(0x35b)](_0x334a2b,_0xe587cc,_0x473245),{'id':_0xe587cc,..._0x473245};}async['removeLicense'](_0x44ffbe){const _0x37d073=_0xc6e317,_0xb8c8df=this[_0x37d073(0x237)][_0x37d073(0x21e)];if(!_0xb8c8df||!_0xb8c8df['hasType'](_0x334a2b))return;await _0xb8c8df['remove'](_0x334a2b,_0x44ffbe);}async[_0xc6e317(0x477)](){const _0x5b638f=_0xc6e317,_0x3fe3c1=this[_0x5b638f(0x237)][_0x5b638f(0x21e)];if(!_0x3fe3c1||!_0x3fe3c1[_0x5b638f(0x45d)](_0x334a2b))return[];const _0x5d0295=this[_0x5b638f(0x237)]['id'],_0x4a4ac6=[];for(const {key:_0x1ac3b3,value:_0x2458d2}of _0x3fe3c1[_0x5b638f(0x3bb)](_0x334a2b)){const _0x5ec4da=this[_0x5b638f(0x1ee)](_0x2458d2,_0x5d0295);_0x4a4ac6[_0x5b638f(0x3c6)]({..._0x2458d2,'id':_0x1ac3b3,'status':_0x5ec4da});}return _0x4a4ac6;}['getPins'](){const _0x5c73a9=_0xc6e317,_0x3de8b7=this[_0x5c73a9(0x237)][_0x5c73a9(0x21e)];if(!_0x3de8b7||!_0x3de8b7['hasType'](_0x334a2b))return[];const _0x2cd13c=this[_0x5c73a9(0x237)]['id'],_0x21b09b=[];for(const {key:_0x4c015d,value:_0x172ca9}of _0x3de8b7['getRange'](_0x334a2b)){if(_0x172ca9['_licenseHash']){if(_0x172ca9[_0x5c73a9(0x38d)]===_0x53a1b4)_0x21b09b['push']({'licenseId':_0x4c015d,'pin':null});else{const _0x5a474b=Buffer['from'](_0x172ca9['_licenseHash'],_0x5c73a9(0x2d3)),{pin:_0xd2e4be}=_0x16889d['derivePin'](_0x2cd13c,_0x5a474b,_0xcafdf5[_0x5c73a9(0x3da)]);_0x21b09b[_0x5c73a9(0x3c6)]({'licenseId':_0x4c015d,'pin':_0xd2e4be});}}}return _0x21b09b;}async[_0xc6e317(0x210)](){const _0x2cf76b=_0xc6e317,_0x656e7f=this[_0x2cf76b(0x438)];await this[_0x2cf76b(0x1ac)]();if(this['_active']&&this[_0x2cf76b(0x438)][_0x2cf76b(0x38d)]===_0x53a1b4){const _0x3ac977=Math[_0x2cf76b(0x44d)]((this[_0x2cf76b(0x438)][_0x2cf76b(0x3fc)]-Date[_0x2cf76b(0x1b8)]())/0x5265c00);this['okdb'][_0x2cf76b(0x353)]?.['warn'](_0x2cf76b(0x21c)+_0x3ac977+'\x20day(s).',{'feature':_0x2cf76b(0x30e),'licensee':this[_0x2cf76b(0x438)][_0x2cf76b(0x32a)],'expiresAt':new Date(this[_0x2cf76b(0x438)][_0x2cf76b(0x3fc)])[_0x2cf76b(0x390)]()});}this[_0x2cf76b(0x438)]&&this['_active'][_0x2cf76b(0x38d)]===_0x4402ba&&this['okdb'][_0x2cf76b(0x353)]?.[_0x2cf76b(0x2f3)]('⚠\x20INTERNAL\x20LICENSE\x20ACTIVE\x20—\x20all\x20features\x20and\x20limits\x20are\x20unlocked.\x20For\x20vendor/internal\x20use\x20only.',{'feature':_0x2cf76b(0x30e),'licensee':this['_active'][_0x2cf76b(0x32a)]});if(_0x656e7f&&!this[_0x2cf76b(0x438)]){this[_0x2cf76b(0x237)][_0x2cf76b(0x353)]?.[_0x2cf76b(0x2f3)](_0x2cf76b(0x3d8),{'feature':_0x2cf76b(0x30e)}),this['okdb'][_0x2cf76b(0x425)]?.[_0x2cf76b(0x303)](_0x1d8202['LICENSE_INVALID'],{'previous':_0x656e7f});const _0x15185b=this[_0x2cf76b(0x237)][_0x2cf76b(0x3d9)]?.[_0x2cf76b(0x2e7)]??_0xcafdf5[_0x2cf76b(0x359)];_0x15185b===_0x2cf76b(0x1a4)&&(this['okdb']['log']?.[_0x2cf76b(0x1f6)]('Shutting\x20down\x20due\x20to\x20license\x20expiry',{'feature':_0x2cf76b(0x30e)}),this[_0x2cf76b(0x237)][_0x2cf76b(0x286)]()[_0x2cf76b(0x317)](()=>{})['finally'](()=>process[_0x2cf76b(0x3be)](0x1)));}}}return okdbLicense={'LicenseChecker':_0x8ebc6a,'_C':_0xcafdf5},okdbLicense;}var okdbShell,hasRequiredOkdbShell;function requireOkdbShell(){const _0x3bb26a=_0x422f41;if(hasRequiredOkdbShell)return okdbShell;hasRequiredOkdbShell=0x1;const _0x52bd33=require$$0$2,_0x2a57c6=require$$1,_0x43f37a=require$$2$1,_0x42074e=require$$1$1,_0x2c7065=_0x42074e['join'](_0x43f37a[_0x3bb26a(0x266)](),_0x3bb26a(0x441)),_0x67b89c=0x3e8,_0x246609={'reset':_0x3bb26a(0x2c4),'bold':'\x1b[1m','dim':'\x1b[2m','red':_0x3bb26a(0x358),'green':_0x3bb26a(0x1ed),'yellow':_0x3bb26a(0x180),'blue':_0x3bb26a(0x44e),'magenta':_0x3bb26a(0x329),'cyan':_0x3bb26a(0x1dc),'white':_0x3bb26a(0x36b),'gray':'\x1b[90m'},_0x3d83ae=!process['stdout'][_0x3bb26a(0x1e0)]||!!process.env.NO_COLOR,_0x1ace35=(_0x26a0f7,_0x2f42e2)=>_0x3d83ae?_0x2f42e2:''+_0x26a0f7+_0x2f42e2+_0x246609[_0x3bb26a(0x449)],_0x2628d8={'error':_0x246609['red'],'warn':_0x246609['yellow'],'info':_0x246609[_0x3bb26a(0x463)],'debug':_0x246609['gray']},_0x4d2bf2={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3};function _0x3b94e9(_0x180949,_0x714af5=_0x3bb26a(0x1db)){const _0x549daf=_0x3bb26a,{level:_0x6f8eef,msg:_0x2c5e90,meta:_0x405f8c,context:_0x20d6ae,ts:_0x264dcb}=_0x180949;if((_0x4d2bf2[_0x6f8eef]??0x1)<(_0x4d2bf2[_0x714af5]??0x1))return;const _0x63901b=_0x1ace35(_0x246609[_0x549daf(0x433)],new Date(_0x264dcb)['toISOString']()),_0x26cd76=_0x1ace35(_0x2628d8[_0x6f8eef]??_0x246609[_0x549daf(0x19b)],_0x6f8eef['padEnd'](0x5));let _0x34b16e='\x20\x20'+_0x63901b+'\x20'+_0x1ace35(_0x246609[_0x549daf(0x270)],_0x26cd76)+'\x20'+_0x2c5e90;if(_0x405f8c&&Object['keys'](_0x405f8c)['length']>0x0){const _0x4269d3=Object[_0x549daf(0x273)](_0x405f8c)[_0x549daf(0x3a5)](([_0x49f5b9,_0x30089c])=>_0x49f5b9+'='+_0x30089c)[_0x549daf(0x2da)]('\x20');_0x34b16e+=_0x1ace35(_0x246609[_0x549daf(0x3fa)],'\x20\x20['+_0x4269d3+']');}if(_0x20d6ae!==undefined){const _0x4a164f=typeof _0x20d6ae==='object'?JSON[_0x549daf(0x39c)](_0x20d6ae):String(_0x20d6ae);_0x34b16e+=_0x1ace35(_0x246609['dim'],'\x20\x20'+_0x4a164f);}const _0x48c56b=_0x6f8eef===_0x549daf(0x1f6)||_0x6f8eef===_0x549daf(0x2f3)?process[_0x549daf(0x3cb)][_0x549daf(0x39e)]['bind'](process['stderr']):process[_0x549daf(0x46b)][_0x549daf(0x39e)][_0x549daf(0x245)](process['stdout']);_0x48c56b(_0x34b16e+'\x0a');}function _0x477450(_0x23813d,_0x11e64e){const _0xc05d34=_0x3bb26a;if(_0x23813d===0xcc||_0x23813d>=0xc8&&_0x23813d<0x12c&&!_0x11e64e){console[_0xc05d34(0x353)]('\x0a\x20\x20'+_0x1ace35(_0x246609[_0xc05d34(0x330)],'✓')+'\x0a');return;}if(_0x23813d>=0x190||_0x11e64e?.['error']){const _0x4b27d9=_0x11e64e?.[_0xc05d34(0x1f6)]??_0x11e64e?.[_0xc05d34(0x356)]??_0xc05d34(0x44c)+_0x23813d;console['log'](_0xc05d34(0x2a1)+_0x1ace35(_0x246609[_0xc05d34(0x373)],'✗')+'\x20'+_0x1ace35(_0x246609[_0xc05d34(0x270)]+_0x246609[_0xc05d34(0x373)],String(_0x23813d))+'\x20\x20'+_0x4b27d9+'\x0a');return;}const _0x46b023=Object[_0xc05d34(0x234)]['hasOwnProperty']['call'](_0x11e64e??{},'result')?_0x11e64e[_0xc05d34(0x192)]:_0x11e64e,_0x504dc2=_0x11e64e?.[_0xc05d34(0x186)];console[_0xc05d34(0x353)](''),_0x4136ce(_0x46b023,'\x20\x20');if(_0x504dc2?.[_0xc05d34(0x1dd)]!=null||_0x504dc2?.[_0xc05d34(0x1fb)]!=null){const _0x1f0f69=[];if(_0x504dc2['count']!=null)_0x1f0f69['push'](_0x504dc2['count']+_0xc05d34(0x288)+(_0x504dc2['count']!==0x1?'s':''));if(_0x504dc2[_0xc05d34(0x1fb)]!=null)_0x1f0f69[_0xc05d34(0x3c6)](_0x504dc2[_0xc05d34(0x1fb)]+'ms');console[_0xc05d34(0x353)]('\x0a\x20\x20'+_0x1ace35(_0x246609[_0xc05d34(0x3fa)],_0x1f0f69[_0xc05d34(0x2da)](_0xc05d34(0x367))));}console['log']('');}function _0x4136ce(_0x13e002,_0x3c0e86=''){const _0x89603e=_0x3bb26a;if(_0x13e002===null||_0x13e002===undefined){console[_0x89603e(0x353)](_0x3c0e86+_0x1ace35(_0x246609[_0x89603e(0x3fa)],'(null)'));return;}if(Array['isArray'](_0x13e002)){if(_0x13e002[_0x89603e(0x191)]===0x0){console[_0x89603e(0x353)](_0x3c0e86+_0x1ace35(_0x246609['dim'],'(empty)'));return;}if(_0x13e002[_0x89603e(0x47c)](_0x48db2f=>_0x48db2f&&typeof _0x48db2f==='object'&&_0x89603e(0x17f)in _0x48db2f&&_0x89603e(0x2b0)in _0x48db2f)){_0x4d1fde(_0x13e002,_0x3c0e86);return;}if(_0x13e002[_0x89603e(0x47c)](_0x5c0826=>_0x5c0826&&typeof _0x5c0826===_0x89603e(0x2ef)&&_0x89603e(0x360)in _0x5c0826&&_0x89603e(0x1dd)in _0x5c0826)){_0x3e2ffc(_0x13e002,_0x3c0e86);return;}if(_0x13e002[_0x89603e(0x47c)](_0x2131e7=>typeof _0x2131e7!==_0x89603e(0x2ef)||_0x2131e7===null)){_0x13e002[_0x89603e(0x350)]((_0x521756,_0x3c38c0)=>console['log'](_0x3c0e86+_0x1ace35(_0x246609[_0x89603e(0x433)],_0x3c38c0+0x1+'.')+'\x20'+_0x1ace35(_0x246609[_0x89603e(0x19b)],String(_0x521756))));return;}_0x13e002[_0x89603e(0x350)]((_0x367911,_0x26b2e2)=>{const _0x4eb34c=_0x89603e;console['log'](_0x3c0e86+_0x1ace35(_0x246609['dim'],'['+_0x26b2e2+']'));if(typeof _0x367911===_0x4eb34c(0x2ef)&&_0x367911!==null)_0x4cf32f(_0x367911,_0x3c0e86+'\x20\x20');else console['log'](_0x3c0e86+'\x20\x20'+String(_0x367911));});return;}if(typeof _0x13e002==='object'){if(_0x89603e(0x17f)in _0x13e002&&'value'in _0x13e002&&Object['keys'](_0x13e002)[_0x89603e(0x191)]<=0x3){console['log'](_0x3c0e86+_0x1ace35(_0x246609[_0x89603e(0x270)]+_0x246609[_0x89603e(0x463)],String(_0x13e002[_0x89603e(0x17f)])));const _0x17dbf5=_0x13e002[_0x89603e(0x2b0)];if(_0x17dbf5&&typeof _0x17dbf5==='object')_0x4cf32f(_0x17dbf5,_0x3c0e86);else console[_0x89603e(0x353)](_0x3c0e86+_0x1ace35(_0x246609['white'],String(_0x17dbf5)));return;}_0x4cf32f(_0x13e002,_0x3c0e86);return;}console[_0x89603e(0x353)](_0x3c0e86+_0x1ace35(_0x246609[_0x89603e(0x19b)],String(_0x13e002)));}function _0x4cf32f(_0x43d8ea,_0x23bb85=''){const _0x20e28a=_0x3bb26a,_0x33393e=Object[_0x20e28a(0x273)](_0x43d8ea);if(_0x33393e[_0x20e28a(0x191)]===0x0){console[_0x20e28a(0x353)](_0x23bb85+_0x1ace35(_0x246609[_0x20e28a(0x3fa)],'{}'));return;}const _0x3aed86=Math[_0x20e28a(0x194)](0x1c,Math[_0x20e28a(0x20f)](..._0x33393e['map'](([_0xd5a064])=>_0xd5a064[_0x20e28a(0x191)])));for(const [_0x251c34,_0x4d3046]of _0x33393e){const _0x722eb=_0x1ace35(_0x246609[_0x20e28a(0x463)],_0x251c34[_0x20e28a(0x340)](_0x3aed86));if(_0x4d3046===null||_0x4d3046===undefined)console[_0x20e28a(0x353)](_0x23bb85+_0x722eb+'\x20\x20'+_0x1ace35(_0x246609['dim'],_0x20e28a(0x2f2)));else{if(typeof _0x4d3046==='object'){const _0x1aa191=JSON['stringify'](_0x4d3046);_0x1aa191[_0x20e28a(0x191)]<=0x50?console['log'](_0x23bb85+_0x722eb+'\x20\x20'+_0x1ace35(_0x246609[_0x20e28a(0x3fa)],_0x1aa191)):(console[_0x20e28a(0x353)](_0x23bb85+_0x722eb),_0x4136ce(_0x4d3046,_0x23bb85+'\x20\x20'));}else{const _0x29d8fc=typeof _0x4d3046===_0x20e28a(0x444)?_0x1ace35(_0x4d3046?_0x246609[_0x20e28a(0x330)]:_0x246609['yellow'],String(_0x4d3046)):typeof _0x4d3046===_0x20e28a(0x248)?_0x1ace35(_0x246609[_0x20e28a(0x450)],String(_0x4d3046)):_0x1ace35(_0x246609[_0x20e28a(0x19b)],String(_0x4d3046));console[_0x20e28a(0x353)](_0x23bb85+_0x722eb+'\x20\x20'+_0x29d8fc);}}}}function _0x4d1fde(_0x1b7bb2,_0x134f0c=''){const _0x509ccb=_0x3bb26a,_0x408d2e=Math[_0x509ccb(0x194)](0x20,Math['max'](..._0x1b7bb2['map'](_0x78bea2=>String(_0x78bea2[_0x509ccb(0x17f)])[_0x509ccb(0x191)])));for(const {key:_0x15485d,value:_0x24d3c7,score:_0x393871,clock:_0x254765}of _0x1b7bb2){const _0xa84ab3=_0x1ace35(_0x246609[_0x509ccb(0x270)]+_0x246609['cyan'],String(_0x15485d)['padEnd'](_0x408d2e)),_0x4e68bd=_0x24d3c7==null?_0x1ace35(_0x246609['dim'],_0x509ccb(0x2f2)):typeof _0x24d3c7==='object'?_0x1ace35(_0x246609[_0x509ccb(0x3fa)],JSON['stringify'](_0x24d3c7)):_0x1ace35(_0x246609[_0x509ccb(0x19b)],String(_0x24d3c7)),_0x2d2415=_0x393871!=null?_0x1ace35(_0x246609[_0x509ccb(0x433)],_0x509ccb(0x2f9)+_0x393871[_0x509ccb(0x277)](0x4)):'',_0x39d6b3=_0x254765!=null?_0x1ace35(_0x246609[_0x509ccb(0x433)],'\x20\x20@'+_0x254765):'';console['log'](_0x134f0c+_0xa84ab3+'\x20\x20'+_0x4e68bd+_0x2d2415+_0x39d6b3);}}function _0x3e2ffc(_0x58ca5b,_0x348990=''){const _0x1c6769=_0x3bb26a,_0xfffd30=Math[_0x1c6769(0x194)](0x20,Math[_0x1c6769(0x20f)](..._0x58ca5b[_0x1c6769(0x3a5)](_0x44f6a0=>_0x44f6a0[_0x1c6769(0x360)][_0x1c6769(0x191)])));for(const {type:_0x9dc5e8,count:_0x1d0ec4,fields:_0x568428}of _0x58ca5b){if(_0x9dc5e8[_0x1c6769(0x442)]('~'))continue;const _0x6825b6=_0x1ace35(_0x246609[_0x1c6769(0x270)]+_0x246609[_0x1c6769(0x463)],_0x9dc5e8[_0x1c6769(0x340)](_0xfffd30)),_0x26787f=_0x1ace35(_0x246609[_0x1c6769(0x450)],String(_0x1d0ec4)[_0x1c6769(0x1f7)](0x6))+_0x1ace35(_0x246609[_0x1c6769(0x3fa)],_0x1c6769(0x25b)),_0x36d0c8=_0x568428&&Object[_0x1c6769(0x25d)](_0x568428)[_0x1c6769(0x191)]?_0x1ace35(_0x246609[_0x1c6769(0x3fa)],_0x1c6769(0x351)+Object['keys'](_0x568428)['slice'](0x0,0x6)[_0x1c6769(0x2da)](',\x20')+(Object[_0x1c6769(0x25d)](_0x568428)[_0x1c6769(0x191)]>0x6?'…':'')):'';console[_0x1c6769(0x353)](_0x348990+_0x6825b6+'\x20\x20'+_0x26787f+_0x36d0c8);}}const _0x1c8036=[_0x3bb26a(0x391),_0x3bb26a(0x29e),_0x3bb26a(0x380),_0x3bb26a(0x16a),'transaction',_0x3bb26a(0x45c)];function _0x52490c(_0x2e3802,_0x2a565e){const _0x56084c=_0x3bb26a;if(_0x2e3802[_0x56084c(0x442)](_0x56084c(0x455)))return _0x2e3802;if(_0x2e3802['startsWith']('/'))return'/api'+_0x2e3802;if(_0x2e3802[_0x56084c(0x442)](_0x56084c(0x1f1)))return'/api/'+_0x2e3802;const _0x44c76e=_0x1c8036['some'](_0x47f7af=>_0x2e3802===_0x47f7af[_0x56084c(0x3e1)](/\/$/,'')||_0x2e3802[_0x56084c(0x442)](_0x47f7af));return _0x44c76e?_0x56084c(0x276)+_0x2a565e+'/'+_0x2e3802:_0x56084c(0x455)+_0x2e3802;}function _0x4fe31e(_0x184133){const _0x2c5a65=_0x3bb26a,_0xca19={},_0x2c2587=[];let _0xdaa3b6=0x0;while(_0xdaa3b6<_0x184133[_0x2c5a65(0x191)]){if((_0x184133[_0xdaa3b6]===_0x2c5a65(0x268)||_0x184133[_0xdaa3b6]==='-e')&&_0x184133[_0xdaa3b6+0x1]&&!_0x184133[_0xdaa3b6+0x1]['startsWith']('-'))_0xca19[_0x2c5a65(0x47a)]=_0x184133[++_0xdaa3b6];else _0x184133[_0xdaa3b6]===_0x2c5a65(0x371)||_0x184133[_0xdaa3b6]==='-h'?_0xca19['help']=!![]:_0x2c2587[_0x2c5a65(0x3c6)](_0x184133[_0xdaa3b6]);_0xdaa3b6++;}return{'flags':_0xca19,'rest':_0x2c2587};}const _0x3a94ff={'system':'System','envs':_0x3bb26a(0x40e),'types':_0x3bb26a(0x42b),'data':'Records','indexes':_0x3bb26a(0x30f),'fts':'Full-text\x20search','sync':_0x3bb26a(0x2d5),'queue':_0x3bb26a(0x2f4),'files':_0x3bb26a(0x3b8),'embeddings':'Embeddings','engines':'Engines','admin':_0x3bb26a(0x2c8),'event':_0x3bb26a(0x289),'processor':_0x3bb26a(0x42a)},_0x483b65=['system',_0x3bb26a(0x479),_0x3bb26a(0x391),_0x3bb26a(0x17c),_0x3bb26a(0x3ba),_0x3bb26a(0x435),_0x3bb26a(0x20e),'queue','files',_0x3bb26a(0x2ec),_0x3bb26a(0x224),_0x3bb26a(0x193)];function _0x1ec167(_0x5e33e4){const _0x38b0c4=_0x3bb26a;return _0x5e33e4[_0x38b0c4(0x3e1)](/^\/api/,'')[_0x38b0c4(0x3e1)](/^\[\/env\/:env=[^\]]*\]/,_0x38b0c4(0x260))['replace'](/^\/env\/:env/,_0x38b0c4(0x25e))[_0x38b0c4(0x3e1)](/^\//,'');}function _0x5f3333(_0x5c9394,_0x575fde=''){const _0x48b8a3=_0x3bb26a,_0x207afb=_0x5c9394[_0x48b8a3(0x34c)][_0x48b8a3(0x169)]()[_0x48b8a3(0x1e8)](_0x578325=>!_0x578325[_0x48b8a3(0x186)]?.['hidden']),_0x35e73c=_0x575fde?_0x207afb[_0x48b8a3(0x1e8)](_0x579039=>_0x579039[_0x48b8a3(0x188)][_0x48b8a3(0x1c8)]()[_0x48b8a3(0x469)](_0x575fde['toLowerCase']())||(_0x2c1041(_0x579039)??'')['toLowerCase']()[_0x48b8a3(0x469)](_0x575fde[_0x48b8a3(0x1c8)]())||_0x3ae22d(_0x579039)[_0x48b8a3(0x342)](_0x11cb1e=>_0x11cb1e[_0x48b8a3(0x1c8)]()[_0x48b8a3(0x469)](_0x575fde[_0x48b8a3(0x1c8)]()))):_0x207afb;if(!_0x35e73c[_0x48b8a3(0x191)]){console[_0x48b8a3(0x353)](_0x1ace35(_0x246609['yellow'],_0x48b8a3(0x225)+_0x575fde+'\x22\x0a'));return;}const _0x1dfa83=new Map();for(const _0x370bdc of _0x35e73c){const _0x3fb6f6=_0x3ae22d(_0x370bdc)[0x0]??_0x48b8a3(0x424);if(!_0x1dfa83[_0x48b8a3(0x451)](_0x3fb6f6))_0x1dfa83[_0x48b8a3(0x2d1)](_0x3fb6f6,[]);_0x1dfa83[_0x48b8a3(0x389)](_0x3fb6f6)[_0x48b8a3(0x3c6)](_0x370bdc);}const _0x56a2e4=[..._0x483b65[_0x48b8a3(0x1e8)](_0x215b18=>_0x1dfa83['has'](_0x215b18)),...[..._0x1dfa83[_0x48b8a3(0x25d)]()][_0x48b8a3(0x1e8)](_0x42d4c5=>!_0x483b65['includes'](_0x42d4c5))];console['log']('');for(const _0x50db69 of _0x56a2e4){const _0x2bf5f1=_0x1dfa83['get'](_0x50db69);if(!_0x2bf5f1?.[_0x48b8a3(0x191)])continue;console[_0x48b8a3(0x353)](_0x1ace35(_0x246609[_0x48b8a3(0x270)],'\x20\x20'+(_0x3a94ff[_0x50db69]??_0x50db69)));for(const _0x3c3487 of _0x2bf5f1){const _0x57345f=_0x1ace35(_0x246609['magenta'],_0x3c3487[_0x48b8a3(0x40c)][_0x48b8a3(0x340)](0x7)),_0x2803e5=_0x1ace35(_0x246609[_0x48b8a3(0x463)],_0x1ec167(_0x3c3487[_0x48b8a3(0x188)])),_0x21db2a=_0x2c1041(_0x3c3487)?_0x1ace35(_0x246609['dim'],'\x20\x20'+_0x2c1041(_0x3c3487)):'',_0x11f2e4=_0x3c3487[_0x48b8a3(0x34f)]?.['id']?_0x1ace35(_0x246609[_0x48b8a3(0x433)],'\x20\x20['+_0x3c3487[_0x48b8a3(0x34f)]['id']+']'):'';console[_0x48b8a3(0x353)](_0x48b8a3(0x3a4)+_0x57345f+'\x20'+_0x2803e5+_0x21db2a+_0x11f2e4);}console[_0x48b8a3(0x353)]('');}}function _0x4539f3(_0x1da8ce,_0x24ff14){const _0x352780=_0x3bb26a,_0x5b9057=_0x24ff14['replace'](/^\/api(\/env\/[^/]+)?\//,'')['split']('/')[0x0],_0x4ca578=_0x1da8ce[_0x352780(0x34c)][_0x352780(0x169)]()[_0x352780(0x1e8)](_0x361bc1=>_0x361bc1[_0x352780(0x188)]['toLowerCase']()[_0x352780(0x469)](_0x5b9057[_0x352780(0x1c8)]()));if(!_0x4ca578['length']){console['log'](_0x1ace35(_0x246609[_0x352780(0x1bf)],_0x352780(0x45f)+_0x24ff14+'\x0a'));return;}console[_0x352780(0x353)]('');for(const _0x35a0c3 of _0x4ca578[_0x352780(0x423)](0x0,0xc)){for(const _0x1ce2d4 of _0x592e60(_0x35a0c3)){console[_0x352780(0x353)](_0x1ce2d4);}console[_0x352780(0x353)]('');}}function _0x2c1041(_0x502735){const _0x244c11=_0x3bb26a;return _0x502735[_0x244c11(0x34f)]?.['summary']??_0x502735[_0x244c11(0x186)]?.[_0x244c11(0x3a6)]??'';}function _0x5573e2(_0x3ca9b0){const _0x4ab367=_0x3bb26a;return _0x3ca9b0['operation']?.[_0x4ab367(0x18d)]??_0x3ca9b0[_0x4ab367(0x186)]?.[_0x4ab367(0x18d)]??'';}function _0x3ae22d(_0x12145c){const _0x38f68b=_0x3bb26a;return _0x12145c[_0x38f68b(0x34f)]?.[_0x38f68b(0x327)]?.[_0x38f68b(0x191)]?_0x12145c[_0x38f68b(0x34f)]['tags']:_0x12145c['meta']?.[_0x38f68b(0x327)]??[];}function _0x592e60(_0x1cddc1){const _0xa3698c=_0x3bb26a,_0x27402c=[];_0x27402c[_0xa3698c(0x3c6)]('\x20\x20'+_0x1ace35(_0x246609['bold']+_0x246609[_0xa3698c(0x450)],_0x1cddc1[_0xa3698c(0x40c)][_0xa3698c(0x340)](0x7))+'\x20'+_0x1ace35(_0x246609['bold']+_0x246609[_0xa3698c(0x463)],_0x1cddc1[_0xa3698c(0x188)]));_0x1cddc1[_0xa3698c(0x34f)]?.['id']&&_0x27402c[_0xa3698c(0x3c6)](_0xa3698c(0x3db)+_0x1ace35(_0x246609[_0xa3698c(0x433)],'id:\x20'+_0x1cddc1['operation']['id']));_0x2c1041(_0x1cddc1)&&_0x27402c[_0xa3698c(0x3c6)](_0xa3698c(0x3db)+_0x1ace35(_0x246609[_0xa3698c(0x19b)],_0x2c1041(_0x1cddc1)));_0x5573e2(_0x1cddc1)&&_0x27402c['push'](_0xa3698c(0x3db)+_0x1ace35(_0x246609['dim'],_0x5573e2(_0x1cddc1)));_0x3ae22d(_0x1cddc1)['length']&&_0x27402c[_0xa3698c(0x3c6)](_0xa3698c(0x3db)+_0x1ace35(_0x246609[_0xa3698c(0x433)],_0xa3698c(0x394)+_0x3ae22d(_0x1cddc1)[_0xa3698c(0x2da)](',\x20')));_0x1cddc1[_0xa3698c(0x34f)]?.[_0xa3698c(0x247)]?.[_0xa3698c(0x1b7)]&&_0x27402c['push'](_0xa3698c(0x3db)+_0x1ace35(_0x246609[_0xa3698c(0x433)],_0xa3698c(0x173)+_0x1cddc1[_0xa3698c(0x34f)][_0xa3698c(0x247)][_0xa3698c(0x1b7)]));_0x1cddc1[_0xa3698c(0x34f)]?.[_0xa3698c(0x34c)]?.['transport']&&_0x1cddc1[_0xa3698c(0x34f)][_0xa3698c(0x34c)][_0xa3698c(0x25a)]!==_0xa3698c(0x22e)&&_0x27402c[_0xa3698c(0x3c6)](_0xa3698c(0x3db)+_0x1ace35(_0x246609['gray'],_0xa3698c(0x2df)+_0x1cddc1['operation'][_0xa3698c(0x34c)][_0xa3698c(0x25a)]));if(_0x1cddc1['operation']?.[_0xa3698c(0x1d0)]){const _0x1e6cc0=Object[_0xa3698c(0x25d)](_0x1cddc1[_0xa3698c(0x34f)][_0xa3698c(0x1d0)][_0xa3698c(0x383)]||{});if(_0x1e6cc0[_0xa3698c(0x191)])_0x27402c[_0xa3698c(0x3c6)](_0xa3698c(0x3db)+_0x1ace35(_0x246609[_0xa3698c(0x433)],'input:\x20'+_0x1e6cc0[_0xa3698c(0x2da)](',\x20')));}return _0x1cddc1[_0xa3698c(0x186)]?.[_0xa3698c(0x453)]&&_0x27402c[_0xa3698c(0x3c6)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x1ace35(_0x246609['gray'],_0xa3698c(0x2a4)+JSON[_0xa3698c(0x39c)](_0x1cddc1[_0xa3698c(0x186)][_0xa3698c(0x453)]))),_0x27402c;}async function _0x925a66(_0x25a410,_0x212087,_0x12fc51,_0x591d5e=null){const _0x42039a=_0x3bb26a,_0x56a930=_0x12fc51[_0x42039a(0x2c3)]('?'),_0x1ce8e0=_0x56a930>=0x0?_0x12fc51[_0x42039a(0x423)](0x0,_0x56a930):_0x12fc51,_0x3ab248=_0x56a930>=0x0?_0x12fc51['slice'](_0x56a930+0x1):'',_0x2f9793=Object['fromEntries'](new URLSearchParams(_0x3ab248)['entries']());return _0x25a410[_0x42039a(0x34c)][_0x42039a(0x419)](_0x212087,_0x1ce8e0,{'body':_0x591d5e,'query':_0x2f9793,'headers':{'content-type':_0x42039a(0x3c9)}},{'internal':!![]});}function _0x404889(_0x4dc8b7){const _0x78e9c4=_0x3bb26a;if(!_0x4dc8b7)return null;const _0x56fdbb=_0x4dc8b7['trim']();if(!_0x56fdbb)return null;try{return JSON[_0x78e9c4(0x369)](_0x56fdbb);}catch{}try{return JSON[_0x78e9c4(0x369)](_0x18f513(_0x56fdbb));}catch(_0x288dab){throw new SyntaxError(_0x288dab['message'],{'cause':_0x288dab});}}function _0x18f513(_0x5bf601){const _0x431358=_0x3bb26a;let _0x3efe66='',_0xf616fa=0x0;while(_0xf616fa<_0x5bf601[_0x431358(0x191)]){const _0x5f5760=_0x5bf601[_0xf616fa];if(_0x5f5760==='\x22'){_0x3efe66+='\x22',_0xf616fa++;while(_0xf616fa<_0x5bf601[_0x431358(0x191)]&&_0x5bf601[_0xf616fa]!=='\x22'){if(_0x5bf601[_0xf616fa]==='\x5c'){_0x3efe66+=_0x5bf601[_0xf616fa++];if(_0xf616fa<_0x5bf601[_0x431358(0x191)])_0x3efe66+=_0x5bf601[_0xf616fa++];}else _0x3efe66+=_0x5bf601[_0xf616fa++];}_0x3efe66+='\x22';if(_0xf616fa<_0x5bf601[_0x431358(0x191)])_0xf616fa++;continue;}if(_0x5f5760==='\x27'){_0x3efe66+='\x22',_0xf616fa++;while(_0xf616fa<_0x5bf601[_0x431358(0x191)]&&_0x5bf601[_0xf616fa]!=='\x27'){if(_0x5bf601[_0xf616fa]==='\x5c'&&_0x5bf601[_0xf616fa+0x1]==='\x27')_0x3efe66+='\x27',_0xf616fa+=0x2;else _0x5bf601[_0xf616fa]==='\x22'?(_0x3efe66+='\x5c\x22',_0xf616fa++):_0x3efe66+=_0x5bf601[_0xf616fa++];}_0x3efe66+='\x22';if(_0xf616fa<_0x5bf601[_0x431358(0x191)])_0xf616fa++;continue;}if(_0x431358(0x174)[_0x431358(0x469)](_0x5f5760)){_0x3efe66+=_0x5f5760,_0xf616fa++;continue;}let _0x1dff21='';while(_0xf616fa<_0x5bf601[_0x431358(0x191)]&&!_0x431358(0x3ea)[_0x431358(0x469)](_0x5bf601[_0xf616fa])&&_0x5bf601[_0xf616fa]!=='\x20'&&_0x5bf601[_0xf616fa]!=='\x09'&&_0x5bf601[_0xf616fa]!=='\x0a'&&_0x5bf601[_0xf616fa]!=='\x0d'){_0x1dff21+=_0x5bf601[_0xf616fa++];}let _0x6854ec=_0xf616fa;while(_0x6854ec<_0x5bf601['length']&&(_0x5bf601[_0x6854ec]==='\x20'||_0x5bf601[_0x6854ec]==='\x09'))_0x6854ec++;if(_0x5bf601[_0x6854ec]===':')_0x3efe66+='\x22'+_0x1dff21+'\x22';else _0x1dff21===_0x431358(0x2c2)||_0x1dff21===_0x431358(0x2b7)||_0x1dff21===_0x431358(0x2f2)||/^-?\d+(\.\d+)?([eE][+-]?\d+)?$/[_0x431358(0x20b)](_0x1dff21)?_0x3efe66+=_0x1dff21:_0x3efe66+='\x22'+_0x1dff21+'\x22';}return _0x3efe66[_0x431358(0x3e1)](/,(\s*[}\]])/g,'$1');}function _0x1ebac8(_0x59ff7a){const _0x330bdc=_0x3bb26a,_0x1ae1ad=[];let _0x2de710=0x0;while(_0x2de710<_0x59ff7a['length']){while(_0x2de710<_0x59ff7a[_0x330bdc(0x191)]&&(_0x59ff7a[_0x2de710]==='\x20'||_0x59ff7a[_0x2de710]==='\x09'))_0x2de710++;if(_0x2de710>=_0x59ff7a[_0x330bdc(0x191)])break;const _0x7e9231=_0x59ff7a[_0x2de710];if(_0x7e9231==='{'||_0x7e9231==='['){const _0x4d51ae=_0x7e9231==='{'?'}':']',_0x1739ef=_0x2de710++;let _0x1d2630=0x1,_0xfc6d80=![],_0x2c4197='';while(_0x2de710<_0x59ff7a[_0x330bdc(0x191)]&&_0x1d2630>0x0){const _0x2e4078=_0x59ff7a[_0x2de710];if(_0xfc6d80){if(_0x2e4078==='\x5c')_0x2de710++;else{if(_0x2e4078===_0x2c4197)_0xfc6d80=![];}}else{if(_0x2e4078==='\x22'||_0x2e4078==='\x27')_0xfc6d80=!![],_0x2c4197=_0x2e4078;else{if(_0x2e4078===_0x7e9231)_0x1d2630++;else{if(_0x2e4078===_0x4d51ae)_0x1d2630--;}}}_0x2de710++;}_0x1ae1ad['push'](_0x59ff7a[_0x330bdc(0x423)](_0x1739ef,_0x2de710));continue;}if(_0x7e9231==='\x22'||_0x7e9231==='\x27'){const _0x265158=_0x7e9231;_0x2de710++;let _0x12632f='';while(_0x2de710<_0x59ff7a[_0x330bdc(0x191)]&&_0x59ff7a[_0x2de710]!==_0x265158){if(_0x59ff7a[_0x2de710]==='\x5c'&&_0x2de710+0x1<_0x59ff7a[_0x330bdc(0x191)])_0x2de710++,_0x12632f+=_0x59ff7a[_0x2de710++];else _0x12632f+=_0x59ff7a[_0x2de710++];}if(_0x2de710<_0x59ff7a['length'])_0x2de710++;_0x1ae1ad['push'](_0x12632f);continue;}let _0x43555e='';while(_0x2de710<_0x59ff7a[_0x330bdc(0x191)]&&_0x59ff7a[_0x2de710]!=='\x20'&&_0x59ff7a[_0x2de710]!=='\x09'&&_0x59ff7a[_0x2de710]!=='{'&&_0x59ff7a[_0x2de710]!=='['){_0x43555e+=_0x59ff7a[_0x2de710++];}if(_0x43555e)_0x1ae1ad[_0x330bdc(0x3c6)](_0x43555e);}return _0x1ae1ad;}function _0x12a58e(_0x5c4d5c,_0x4a1b9e){const _0x526daa=_0x3bb26a,_0x3936d4=[..._0x5c4d5c[_0x526daa(0x2d9)][_0x526daa(0x25d)]()][_0x526daa(0x1e8)](_0x2d1e4c=>!_0x2d1e4c[_0x526daa(0x442)]('~'));console[_0x526daa(0x353)](['',_0x1ace35(_0x246609[_0x526daa(0x270)]+_0x246609[_0x526daa(0x463)],_0x526daa(0x31f)),_0x1ace35(_0x246609[_0x526daa(0x270)]+_0x246609[_0x526daa(0x463)],_0x526daa(0x47e))+_0x1ace35(_0x246609['bold'],'\x20\x20\x20\x20\x20\x20\x20\x20\x20OKDB\x20SHELL\x20\x20\x20\x20\x20\x20\x20\x20\x20')+_0x1ace35(_0x246609[_0x526daa(0x270)]+_0x246609[_0x526daa(0x463)],'║'),_0x1ace35(_0x246609[_0x526daa(0x270)]+_0x246609[_0x526daa(0x463)],_0x526daa(0x22b)),'','\x20\x20'+_0x1ace35(_0x246609[_0x526daa(0x330)],'✓')+'\x20'+_0x1ace35(_0x246609[_0x526daa(0x270)],_0x526daa(0x40a))+_0x526daa(0x318)+_0x4a1b9e['port'],'\x20\x20'+_0x1ace35(_0x246609[_0x526daa(0x330)],'✓')+'\x20'+_0x1ace35(_0x246609[_0x526daa(0x270)],_0x526daa(0x27e))+_0x526daa(0x231)+_0x4a1b9e[_0x526daa(0x3ad)]+_0x526daa(0x422),'\x20\x20'+_0x1ace35(_0x246609['green'],'✓')+'\x20'+_0x1ace35(_0x246609[_0x526daa(0x270)],_0x526daa(0x188))+_0x526daa(0x3a4)+_0x4a1b9e[_0x526daa(0x211)],'\x20\x20'+_0x1ace35(_0x246609['green'],'✓')+'\x20'+_0x1ace35(_0x246609['bold'],'id')+_0x526daa(0x1f8)+_0x1ace35(_0x246609[_0x526daa(0x433)],_0x5c4d5c['id']),'\x20\x20'+_0x1ace35(_0x246609['green'],'✓')+'\x20'+_0x1ace35(_0x246609[_0x526daa(0x270)],_0x526daa(0x479))+'\x20\x20\x20\x20'+_0x3936d4[_0x526daa(0x3a5)](_0xa1a728=>_0x1ace35(_0x246609[_0x526daa(0x463)],_0xa1a728))[_0x526daa(0x2da)]('\x20\x20'),..._0x4a1b9e['noAdmin']?[]:['\x20\x20'+_0x1ace35(_0x246609[_0x526daa(0x330)],'✓')+'\x20'+_0x1ace35(_0x246609[_0x526daa(0x270)],_0x526daa(0x193))+_0x526daa(0x198)+_0x4a1b9e[_0x526daa(0x3ad)]+'/admin/index.html'],'',_0x1ace35(_0x246609[_0x526daa(0x3fa)],_0x526daa(0x185)+_0x1ace35(_0x246609['bold'],'help')+_0x526daa(0x36c)+_0x1ace35(_0x246609[_0x526daa(0x270)],_0x526daa(0x417))+_0x526daa(0x421)+_0x1ace35(_0x246609[_0x526daa(0x270)],_0x526daa(0x3be))+_0x526daa(0x1ff)),''][_0x526daa(0x2da)]('\x0a'));}function _0x5a763d(_0x5e4911){const _0x4830e1=_0x3bb26a;console[_0x4830e1(0x353)]('\x0a'+_0x1ace35(_0x246609[_0x4830e1(0x270)],_0x4830e1(0x30b))+'\x20\x20'+_0x1ace35(_0x246609[_0x4830e1(0x3fa)],_0x4830e1(0x42d))+'\x0a\x0a\x20\x20'+_0x1ace35(_0x246609[_0x4830e1(0x463)],'<path>')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20GET\x20(implicit)\x0a\x20\x20'+_0x1ace35(_0x246609[_0x4830e1(0x463)],_0x4830e1(0x3c5))+'\x20'+_0x1ace35(_0x246609[_0x4830e1(0x1bf)],_0x4830e1(0x2c6))+'\x20\x20\x20\x20\x20\x20\x20POST\x20(body\x20implies\x20POST)\x0a\x20\x20'+_0x1ace35(_0x246609[_0x4830e1(0x463)],_0x4830e1(0x2d2))+'\x20'+_0x1ace35(_0x246609[_0x4830e1(0x463)],'<path>')+'\x20'+_0x1ace35(_0x246609[_0x4830e1(0x1bf)],_0x4830e1(0x40f))+_0x4830e1(0x3f3)+_0x1ace35(_0x246609[_0x4830e1(0x3fa)],_0x4830e1(0x3b9))+_0x4830e1(0x3c4)+_0x1ace35(_0x246609[_0x4830e1(0x433)],_0x4830e1(0x1db))+_0x4830e1(0x3e5)+_0x1ace35(_0x246609[_0x4830e1(0x433)],_0x4830e1(0x479))+_0x4830e1(0x41e)+_0x1ace35(_0x246609[_0x4830e1(0x433)],_0x4830e1(0x391))+_0x4830e1(0x3cc)+_0x5e4911[_0x4830e1(0x47a)]+_0x4830e1(0x29a)+_0x1ace35(_0x246609[_0x4830e1(0x433)],_0x4830e1(0x379))+_0x4830e1(0x3a9)+_0x5e4911['env']+'/type/users\x0a\x20\x20\x20\x20'+_0x1ace35(_0x246609[_0x4830e1(0x433)],_0x4830e1(0x34d))+_0x4830e1(0x2f6)+_0x5e4911[_0x4830e1(0x47a)]+'/type/users/item/alice\x0a\x20\x20\x20\x20'+_0x1ace35(_0x246609[_0x4830e1(0x433)],_0x4830e1(0x46e))+_0x4830e1(0x34e)+_0x5e4911[_0x4830e1(0x47a)]+_0x4830e1(0x2e3)+_0x1ace35(_0x246609[_0x4830e1(0x433)],_0x4830e1(0x3e0))+_0x4830e1(0x3c4)+_0x1ace35(_0x246609['gray'],_0x4830e1(0x2cc))+'\x0a\x20\x20\x20\x20'+_0x1ace35(_0x246609[_0x4830e1(0x433)],'env/staging/info')+'\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'+_0x1ace35(_0x246609[_0x4830e1(0x270)],'\x20\x20Flags')+'\x20\x20'+_0x1ace35(_0x246609[_0x4830e1(0x3fa)],_0x4830e1(0x2b1))+_0x4830e1(0x1fc)+_0x1ace35(_0x246609[_0x4830e1(0x463)],_0x4830e1(0x1d7))+_0x4830e1(0x323)+_0x1ace35(_0x246609[_0x4830e1(0x463)],_0x4830e1(0x371))+_0x4830e1(0x252)+_0x1ace35(_0x246609[_0x4830e1(0x3fa)],_0x4830e1(0x3b9))+_0x4830e1(0x3c4)+_0x1ace35(_0x246609[_0x4830e1(0x433)],'types\x20--env\x20staging')+_0x4830e1(0x3c4)+_0x1ace35(_0x246609[_0x4830e1(0x433)],_0x4830e1(0x1ec))+'\x0a\x20\x20\x20\x20'+_0x1ace35(_0x246609['gray'],_0x4830e1(0x2de))+'\x0a\x0a'+_0x1ace35(_0x246609['bold'],_0x4830e1(0x3d4))+_0x4830e1(0x1fc)+_0x1ace35(_0x246609[_0x4830e1(0x463)],_0x4830e1(0x212))+_0x4830e1(0x31e)+_0x1ace35(_0x246609[_0x4830e1(0x463)],'env')+'\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'+_0x1ace35(_0x246609[_0x4830e1(0x463)],_0x4830e1(0x417))+'\x20'+_0x1ace35(_0x246609[_0x4830e1(0x3fa)],_0x4830e1(0x352))+'\x20\x20\x20\x20\x20\x20\x20\x20\x20browse\x20API\x20routes,\x20grouped\x20by\x20area\x0a\x20\x20'+_0x1ace35(_0x246609['cyan'],'logs')+'\x20'+_0x1ace35(_0x246609['dim'],'[on|off|level]')+_0x4830e1(0x39b)+_0x1ace35(_0x246609[_0x4830e1(0x463)],'open')+_0x4830e1(0x410)+_0x1ace35(_0x246609['cyan'],_0x4830e1(0x1ce))+_0x4830e1(0x43c)+_0x1ace35(_0x246609[_0x4830e1(0x463)],_0x4830e1(0x3be))+'\x20'+_0x1ace35(_0x246609[_0x4830e1(0x3fa)],_0x4830e1(0x222))+_0x4830e1(0x171));}let _0x98c29c=![];async function _0x2a0490(_0x1a1f3c,_0x21a16f=0x0,_0x492540=null){const _0x2286bf=_0x3bb26a;_0x98c29c&&(process[_0x2286bf(0x3cb)][_0x2286bf(0x39e)](_0x1ace35(_0x246609[_0x2286bf(0x373)],_0x2286bf(0x384))),process['exit'](0x82));_0x98c29c=!![],process['stdout'][_0x2286bf(0x39e)]('\x0a'),process[_0x2286bf(0x3cb)][_0x2286bf(0x39e)](_0x1ace35(_0x246609[_0x2286bf(0x1bf)],_0x2286bf(0x2ed)+(_0x492540?_0x2286bf(0x22c)+_0x492540+',\x20':'')+_0x2286bf(0x37b)));const _0x1f9d1e=setTimeout(()=>{const _0x27441b=_0x2286bf;process[_0x27441b(0x3cb)][_0x27441b(0x39e)](_0x1ace35(_0x246609[_0x27441b(0x373)],_0x27441b(0x33b))),process[_0x27441b(0x3be)](0x1);},0x1388);try{await _0x1a1f3c['close']();}catch(_0x36ef8a){console['error'](_0x1ace35(_0x246609[_0x2286bf(0x373)],'\x20\x20'+_0x36ef8a[_0x2286bf(0x356)]));}clearTimeout(_0x1f9d1e),process[_0x2286bf(0x3cb)]['write'](_0x1ace35(_0x246609[_0x2286bf(0x3fa)],_0x2286bf(0x31c))),process[_0x2286bf(0x3be)](_0x21a16f);}function _0x829a8e(_0x57e916){const _0x36240f=_0x3bb26a,_0x135f60=_0x57e916[_0x36240f(0x47a)]!=='default'?_0x1ace35(_0x246609[_0x36240f(0x1bf)],'['+_0x57e916[_0x36240f(0x47a)]+']'):'';return _0x1ace35(_0x246609[_0x36240f(0x270)]+_0x246609[_0x36240f(0x463)],_0x36240f(0x237))+_0x135f60+_0x1ace35(_0x246609[_0x36240f(0x433)],'>\x20');}const _0x1f4a81=new Set([_0x3bb26a(0x1c0),_0x3bb26a(0x426),_0x3bb26a(0x34a),_0x3bb26a(0x37d),_0x3bb26a(0x408)]);async function _0x5f49fd(_0x3aa5bb,_0x1bbcf3,_0x380215,_0x4336e4,_0x35be49,_0x2f6f57){const _0x5d371e=_0x3bb26a;_0x3aa5bb=_0x3aa5bb[_0x5d371e(0x473)]();if(!_0x3aa5bb||_0x3aa5bb[_0x5d371e(0x442)]('#'))return;const _0x45387b=_0x1ebac8(_0x3aa5bb),{flags:_0x55bb54,rest:_0x2b582d}=_0x4fe31e(_0x45387b);if(!_0x2b582d[_0x5d371e(0x191)])return;const _0x48076c=_0x2b582d[0x0],_0x4b1f6b=_0x48076c[_0x5d371e(0x2e5)]();if(_0x4b1f6b===_0x5d371e(0x206)){if(_0x2b582d[0x1])_0x4539f3(_0x1bbcf3,_0x52490c(_0x2b582d[0x1],_0x55bb54['env']??_0x35be49[_0x5d371e(0x47a)]));else _0x5a763d(_0x35be49);return;}if(_0x4b1f6b===_0x5d371e(0x378)){const _0x302e53=_0x2b582d[0x1];if(!_0x302e53){console[_0x5d371e(0x353)](_0x1ace35(_0x246609[_0x5d371e(0x373)],_0x5d371e(0x2cb)));return;}try{_0x1bbcf3[_0x5d371e(0x47a)](_0x302e53),_0x35be49['env']=_0x302e53,_0x2f6f57?.[_0x5d371e(0x382)](_0x829a8e(_0x35be49)),console[_0x5d371e(0x353)](_0x5d371e(0x2a1)+_0x1ace35(_0x246609[_0x5d371e(0x330)],'✓')+'\x20active\x20env:\x20'+_0x1ace35(_0x246609[_0x5d371e(0x270)]+_0x246609[_0x5d371e(0x463)],_0x302e53)+'\x0a');}catch{console[_0x5d371e(0x353)](_0x5d371e(0x2a1)+_0x1ace35(_0x246609[_0x5d371e(0x373)],'✗')+_0x5d371e(0x1eb)+_0x1ace35(_0x246609[_0x5d371e(0x270)],_0x302e53)+_0x5d371e(0x209)+_0x1ace35(_0x246609[_0x5d371e(0x3fa)],_0x5d371e(0x2fc)));}return;}if(_0x4b1f6b==='ENV'){const _0x48230a=[..._0x1bbcf3[_0x5d371e(0x2d9)][_0x5d371e(0x25d)]()]['filter'](_0x10cc07=>!_0x10cc07['startsWith']('~'));console[_0x5d371e(0x353)]('');for(const _0x5878f8 of _0x48230a){const _0x30b8fb=_0x5878f8===_0x35be49[_0x5d371e(0x47a)];console['log']('\x20\x20'+(_0x30b8fb?_0x1ace35(_0x246609['green'],'●'):_0x1ace35(_0x246609[_0x5d371e(0x3fa)],'○'))+'\x20\x20'+(_0x30b8fb?_0x1ace35(_0x246609['bold']+_0x246609[_0x5d371e(0x463)],_0x5878f8):_0x1ace35(_0x246609[_0x5d371e(0x3fa)],_0x5878f8)));}console[_0x5d371e(0x353)]('\x0a\x20\x20'+_0x1ace35(_0x246609[_0x5d371e(0x3fa)],_0x5d371e(0x2bb))+'\x20'+_0x1ace35(_0x246609[_0x5d371e(0x463)],_0x35be49[_0x5d371e(0x47a)])),console[_0x5d371e(0x353)]('');return;}if(_0x4b1f6b==='ENVS'){const _0x4ccd18=[..._0x1bbcf3[_0x5d371e(0x2d9)][_0x5d371e(0x3fd)]()][_0x5d371e(0x1e8)](_0x17f4a4=>!_0x17f4a4[_0x5d371e(0x251)][_0x5d371e(0x442)]('~'));console['log']('');const _0x47a8c1=Math['max'](..._0x4ccd18['map'](_0x407c7c=>_0x407c7c[_0x5d371e(0x251)]['length']));for(const _0xf55f23 of _0x4ccd18){const _0x5c6127=_0xf55f23[_0x5d371e(0x251)]===_0x35be49['env'],_0x4934e6=_0x5c6127?_0x1ace35(_0x246609[_0x5d371e(0x330)],'●'):_0x1ace35(_0x246609[_0x5d371e(0x3fa)],'○'),_0x17c24e=_0x5c6127?_0x1ace35(_0x246609[_0x5d371e(0x270)]+_0x246609['cyan'],_0xf55f23[_0x5d371e(0x251)][_0x5d371e(0x340)](_0x47a8c1)):_0x1ace35(_0x246609[_0x5d371e(0x3fa)],_0xf55f23[_0x5d371e(0x251)][_0x5d371e(0x340)](_0x47a8c1)),_0x4a170b=[..._0xf55f23[_0x5d371e(0x23d)]['keys']()]['filter'](_0xd915ca=>!_0xd915ca['startsWith']('~')),_0x37544c=_0x4a170b[_0x5d371e(0x191)]?_0x1ace35(_0x246609[_0x5d371e(0x3fa)],_0x4a170b[_0x5d371e(0x423)](0x0,0x5)[_0x5d371e(0x2da)](',\x20')+(_0x4a170b[_0x5d371e(0x191)]>0x5?_0x5d371e(0x28f)+(_0x4a170b[_0x5d371e(0x191)]-0x5)+_0x5d371e(0x26c):'')):_0x1ace35(_0x246609['dim'],_0x5d371e(0x24d));console[_0x5d371e(0x353)]('\x20\x20'+_0x4934e6+'\x20\x20'+_0x17c24e+'\x20\x20'+_0x37544c);}console['log']('');return;}if(_0x4b1f6b===_0x5d371e(0x228)){const _0x57e208=_0x55bb54[_0x5d371e(0x47a)]??_0x2b582d[0x1]??_0x35be49[_0x5d371e(0x47a)];try{const _0x4d8885=_0x1bbcf3[_0x5d371e(0x47a)](_0x57e208),_0x51ab3b=[..._0x4d8885[_0x5d371e(0x23d)][_0x5d371e(0x25d)]()][_0x5d371e(0x1e8)](_0x1d4cde=>!_0x1d4cde[_0x5d371e(0x442)]('~'))[_0x5d371e(0x3f8)]();console[_0x5d371e(0x353)]('\x0a\x20\x20'+_0x1ace35(_0x246609[_0x5d371e(0x3fa)],_0x51ab3b['length']+_0x5d371e(0x457)+(_0x51ab3b[_0x5d371e(0x191)]!==0x1?'s':'')+_0x5d371e(0x43d)+_0x57e208));for(const _0x4fb8de of _0x51ab3b){const _0x6f1ae6=_0x4d8885['typeSubDbs']['get'](_0x4fb8de),_0x5781a3=_0x6f1ae6?.[_0x5d371e(0x17c)]?.[_0x5d371e(0x464)]?.()??0x0,_0x4c2c29=_0x1ace35(_0x246609['bold']+_0x246609['cyan'],_0x4fb8de[_0x5d371e(0x340)](0x1c));console[_0x5d371e(0x353)](_0x5d371e(0x3a4)+_0x4c2c29+'\x20\x20'+_0x1ace35(_0x246609['magenta'],String(_0x5781a3)[_0x5d371e(0x1f7)](0x6))+'\x20'+_0x1ace35(_0x246609[_0x5d371e(0x3fa)],_0x5d371e(0x397)));}console[_0x5d371e(0x353)]('');}catch(_0x525bde){console['error'](_0x1ace35(_0x246609[_0x5d371e(0x373)],_0x5d371e(0x2a1)+_0x525bde[_0x5d371e(0x356)]+'\x0a'));}return;}if(_0x4b1f6b===_0x5d371e(0x2fe)){_0x5f3333(_0x1bbcf3,_0x2b582d[_0x5d371e(0x423)](0x1)['join']('\x20'));return;}if(_0x4b1f6b===_0x5d371e(0x236)){const _0x237dc3=(_0x2b582d[0x1]??'')['toLowerCase']();if(!_0x237dc3||_0x237dc3==='on')_0x4336e4[_0x5d371e(0x226)]=!![],_0x4336e4[_0x5d371e(0x241)]=_0x5d371e(0x1db),console[_0x5d371e(0x353)](_0x5d371e(0x2a1)+_0x1ace35(_0x246609[_0x5d371e(0x330)],'✓')+'\x20logs\x20on\x20\x20'+_0x1ace35(_0x246609[_0x5d371e(0x3fa)],_0x5d371e(0x45b))+'\x0a');else{if(_0x237dc3===_0x5d371e(0x36a))_0x4336e4['enabled']=![],console[_0x5d371e(0x353)](_0x5d371e(0x2a1)+_0x1ace35(_0x246609[_0x5d371e(0x1bf)],'○')+_0x5d371e(0x396));else _0x4d2bf2[_0x237dc3]!==undefined?(_0x4336e4[_0x5d371e(0x226)]=!![],_0x4336e4[_0x5d371e(0x241)]=_0x237dc3,console[_0x5d371e(0x353)]('\x0a\x20\x20'+_0x1ace35(_0x246609[_0x5d371e(0x330)],'✓')+_0x5d371e(0x3c7)+_0x1ace35(_0x246609['bold'],_0x237dc3)+'\x0a')):console['error'](_0x1ace35(_0x246609[_0x5d371e(0x373)],_0x5d371e(0x309)));}return;}if(_0x4b1f6b===_0x5d371e(0x2aa)||_0x4b1f6b===_0x5d371e(0x200)){await _0x2a0490(_0x1bbcf3,0x0);return;}if(_0x4b1f6b===_0x5d371e(0x3b4)){const _0x2b1190='http://localhost:'+_0x380215['port']+_0x5d371e(0x28c),_0x5dcd0b=process[_0x5d371e(0x440)]===_0x5d371e(0x2f0)?'start\x20'+_0x2b1190:process[_0x5d371e(0x440)]===_0x5d371e(0x27f)?_0x5d371e(0x458)+_0x2b1190:_0x5d371e(0x202)+_0x2b1190;require$$4['exec'](_0x5dcd0b),console[_0x5d371e(0x353)](_0x5d371e(0x2a1)+_0x1ace35(_0x246609['green'],'✓')+'\x20opening\x20'+_0x1ace35(_0x246609['cyan'],_0x2b1190)+'\x0a');return;}let _0x1f2ea2,_0x584fbf,_0x57a00f;if(_0x1f4a81[_0x5d371e(0x451)](_0x4b1f6b)){_0x1f2ea2=_0x4b1f6b,_0x584fbf=_0x2b582d[0x1],_0x57a00f=_0x2b582d[_0x5d371e(0x423)](0x2);if(!_0x584fbf){console[_0x5d371e(0x1f6)](_0x1ace35(_0x246609[_0x5d371e(0x373)],_0x5d371e(0x325)+_0x48076c+_0x5d371e(0x1a3)));return;}}else _0x1f2ea2=null,_0x584fbf=_0x2b582d[0x0],_0x57a00f=_0x2b582d[_0x5d371e(0x423)](0x1);const _0x47ec50=_0x55bb54[_0x5d371e(0x47a)]??_0x35be49[_0x5d371e(0x47a)],_0xa6cb86=_0x52490c(_0x584fbf,_0x47ec50);if(_0x55bb54['help']){_0x4539f3(_0x1bbcf3,_0xa6cb86);return;}let _0x4d0e81=null;if(_0x57a00f['length']){const _0x52d2f7=_0x57a00f[_0x5d371e(0x2da)]('\x20');try{_0x4d0e81=_0x404889(_0x52d2f7);}catch(_0x2a195f){console[_0x5d371e(0x1f6)](_0x1ace35(_0x246609[_0x5d371e(0x373)],'\x0a\x20\x20Invalid\x20JSON:\x20'+_0x52d2f7+_0x5d371e(0x2a1)+_0x1ace35(_0x246609[_0x5d371e(0x3fa)],_0x2a195f[_0x5d371e(0x356)])+'\x0a'));return;}}if(!_0x1f2ea2)_0x1f2ea2=_0x4d0e81!==null?'POST':_0x5d371e(0x1c0);try{const _0x2ebbeb=await _0x925a66(_0x1bbcf3,_0x1f2ea2,_0xa6cb86,_0x4d0e81);_0x477450(_0x2ebbeb['status'],_0x2ebbeb[_0x5d371e(0x453)]);}catch(_0x25f6d8){console[_0x5d371e(0x1f6)]('\x0a\x20\x20'+_0x1ace35(_0x246609[_0x5d371e(0x373)],'✗')+'\x20'+_0x25f6d8['message']+'\x0a');}}class _0x45f8d1{constructor(){const _0x2a19f3=_0x3bb26a;this[_0x2a19f3(0x1c7)]=new Map(),this[_0x2a19f3(0x3e3)]=null,this[_0x2a19f3(0x392)]=![];}}function _0xaf3d78(_0x2d0a8f){const _0x3d79a0=_0x3bb26a,_0x374459=new _0x45f8d1();for(const _0xa057dd of _0x2d0a8f){if(_0xa057dd['meta']?.[_0x3d79a0(0x41f)])continue;const _0x3261bd=_0xa057dd[_0x3d79a0(0x188)][_0x3d79a0(0x3e1)](/^\/api/,'')[_0x3d79a0(0x3e1)](/^\[\/env\/:env=[^\]]*\]/,'')[_0x3d79a0(0x3e1)](/^\//,'');if(!_0x3261bd)continue;let _0x4490a6=_0x374459;for(const _0x2aff4a of _0x3261bd[_0x3d79a0(0x1df)]('/')[_0x3d79a0(0x1e8)](Boolean)){if(_0x2aff4a['startsWith'](':')){const _0x206deb=_0x2aff4a[_0x3d79a0(0x423)](0x1);if(!_0x4490a6[_0x3d79a0(0x3e3)])_0x4490a6['dynamic']={'param':_0x206deb,'node':new _0x45f8d1()};_0x4490a6=_0x4490a6[_0x3d79a0(0x3e3)][_0x3d79a0(0x2d4)];}else{if(!_0x4490a6[_0x3d79a0(0x1c7)][_0x3d79a0(0x451)](_0x2aff4a))_0x4490a6[_0x3d79a0(0x1c7)][_0x3d79a0(0x2d1)](_0x2aff4a,new _0x45f8d1());_0x4490a6=_0x4490a6[_0x3d79a0(0x1c7)][_0x3d79a0(0x389)](_0x2aff4a);}}_0x4490a6[_0x3d79a0(0x392)]=!![];}return _0x374459;}const _0x53853d=new Map();function _0x2e8530(_0x11f988,_0x205875,_0x33a5bd){const _0x2f3482=_0x3bb26a,_0x41a5c1=_0x53853d['get'](_0x11f988);if(_0x41a5c1&&_0x41a5c1['exp']>Date[_0x2f3482(0x1b8)]())return _0x41a5c1['val'];const _0x1723b1=_0x33a5bd();return _0x53853d[_0x2f3482(0x2d1)](_0x11f988,{'val':_0x1723b1,'exp':Date[_0x2f3482(0x1b8)]()+_0x205875}),_0x1723b1;}function _0x47ebb4(_0x558201,_0x293feb,_0x10b198,_0x28da63){const _0x2e34c3=_0x3bb26a,_0x493fa2=_0x293feb['env']??_0x28da63[_0x2e34c3(0x47a)];switch(_0x558201){case _0x2e34c3(0x47a):return[..._0x10b198[_0x2e34c3(0x2d9)]['keys']()][_0x2e34c3(0x1e8)](_0x157cdb=>!_0x157cdb[_0x2e34c3(0x442)]('~'));case _0x2e34c3(0x360):return _0x2e8530(_0x2e34c3(0x220)+_0x493fa2,0x7d0,()=>{const _0x3455d9=_0x2e34c3;try{return[..._0x10b198[_0x3455d9(0x47a)](_0x493fa2)[_0x3455d9(0x23d)][_0x3455d9(0x25d)]()][_0x3455d9(0x1e8)](_0x5a7d8b=>!_0x5a7d8b['startsWith']('~'));}catch{return[];}});case _0x2e34c3(0x17f):if(!_0x293feb[_0x2e34c3(0x360)])return[];return _0x2e8530('keys:'+_0x493fa2+':'+_0x293feb[_0x2e34c3(0x360)],0x5dc,()=>{const _0x311ed2=_0x2e34c3;try{const _0x4f9c8b=_0x10b198[_0x311ed2(0x47a)](_0x493fa2)[_0x311ed2(0x23d)]['get'](_0x293feb[_0x311ed2(0x360)]);if(!_0x4f9c8b?.[_0x311ed2(0x17c)])return[];const _0x54caed=[];for(const {key:_0x1edee6}of _0x4f9c8b[_0x311ed2(0x17c)]['getRange']({'limit':0x32})){_0x54caed[_0x311ed2(0x3c6)](String(_0x1edee6));if(_0x54caed[_0x311ed2(0x191)]>=0x32)break;}return _0x54caed;}catch{return[];}});case _0x2e34c3(0x45a):if(!_0x293feb['type'])return[];return _0x2e8530(_0x2e34c3(0x2ce)+_0x493fa2+':'+_0x293feb[_0x2e34c3(0x360)],0x7d0,()=>{const _0x3eca87=_0x2e34c3;try{const _0x21ce01=_0x10b198[_0x3eca87(0x47a)](_0x493fa2)['typeSubDbs'][_0x3eca87(0x389)](_0x293feb['type']);return _0x21ce01?[..._0x21ce01[_0x3eca87(0x3e9)]?.[_0x3eca87(0x25d)]()??[]]:[];}catch{return[];}});case _0x2e34c3(0x320):if(!_0x293feb[_0x2e34c3(0x360)])return[];return _0x2e8530(_0x2e34c3(0x1fa)+_0x493fa2+':'+_0x293feb['type'],0x7d0,()=>{const _0x52e29b=_0x2e34c3;try{return _0x10b198[_0x52e29b(0x435)]?.[_0x52e29b(0x3dc)]?.(_0x293feb[_0x52e29b(0x360)],_0x10b198[_0x52e29b(0x47a)](_0x493fa2))?.[_0x52e29b(0x3a5)](_0x2324ae=>_0x2324ae['name'])??[];}catch{return[];}});default:return[];}}function _0x4134f6(_0x397cf5,_0x52ccd4,_0x27dd10,_0x2d3bb8){const _0x3ee706=_0x3bb26a,_0x5a6363=_0x397cf5[_0x3ee706(0x427)]('/'),_0x35063e=_0x397cf5['split']('/'),_0xbf2265=_0x5a6363?_0x35063e['slice'](0x0,-0x1):_0x35063e[_0x3ee706(0x423)](0x0,-0x1),_0xac7046=_0x5a6363?'':_0x35063e[_0x35063e[_0x3ee706(0x191)]-0x1];let _0x2bb3fe=_0x52ccd4;const _0x1370ae={};for(const _0x5db650 of _0xbf2265){if(!_0x5db650)continue;if(_0x2bb3fe[_0x3ee706(0x1c7)][_0x3ee706(0x451)](_0x5db650))_0x2bb3fe=_0x2bb3fe['children'][_0x3ee706(0x389)](_0x5db650);else{if(_0x2bb3fe['dynamic'])_0x1370ae[_0x2bb3fe[_0x3ee706(0x3e3)][_0x3ee706(0x3ef)]]=_0x5db650,_0x2bb3fe=_0x2bb3fe['dynamic'][_0x3ee706(0x2d4)];else return[];}}const _0x3367eb=_0xbf2265[_0x3ee706(0x1e8)](Boolean),_0xed2e38=_0x3367eb[_0x3ee706(0x191)]?_0x3367eb[_0x3ee706(0x2da)]('/')+'/':'',_0x14acc0=[];for(const [_0x16931f]of _0x2bb3fe[_0x3ee706(0x1c7)]){if(_0x16931f[_0x3ee706(0x442)](_0xac7046))_0x14acc0['push'](_0xed2e38+_0x16931f);}if(_0x2bb3fe[_0x3ee706(0x3e3)])for(const _0x1ef481 of _0x47ebb4(_0x2bb3fe[_0x3ee706(0x3e3)][_0x3ee706(0x3ef)],_0x1370ae,_0x27dd10,_0x2d3bb8)){if(String(_0x1ef481)[_0x3ee706(0x442)](_0xac7046))_0x14acc0[_0x3ee706(0x3c6)](_0xed2e38+_0x1ef481);}return _0x14acc0[_0x3ee706(0x423)](0x0,0x64);}const _0x3a3da4=[_0x3bb26a(0x1ce),'use',_0x3bb26a(0x47a),_0x3bb26a(0x479),'types',_0x3bb26a(0x417),_0x3bb26a(0x223),_0x3bb26a(0x376),'exit','quit'];function _0x4ac6f9(_0x5defc8,_0x23f64c,_0x1de2e9){return function _0x34f815(_0xa471b1){const _0x340bf3=_0xd32f;try{const _0x5cb6dc=_0xa471b1[_0x340bf3(0x328)](/\s[{[]/),_0x3a1178=_0x5cb6dc>=0x0?_0xa471b1[_0x340bf3(0x423)](0x0,_0x5cb6dc):_0xa471b1,_0x2b2ea1=_0x3a1178[_0x340bf3(0x1ca)]();if(!_0x2b2ea1){const _0x2e0901=[..._0x3a3da4,...[..._0x5defc8[_0x340bf3(0x1c7)]['keys']()]][_0x340bf3(0x423)](0x0,0x64);return[_0x2e0901,''];}const _0x426d89=_0x2b2ea1[_0x340bf3(0x1df)](/\s+/),_0x137705=_0x426d89[0x0],_0x5a0bb1=_0x137705[_0x340bf3(0x2e5)]();if(_0x426d89['length']===0x1){const _0x47b41a=_0x137705[_0x340bf3(0x1c8)](),_0x40557e=_0x3a3da4['filter'](_0x284729=>_0x284729[_0x340bf3(0x442)](_0x47b41a)),_0x1ae80c=_0x4134f6(_0x137705,_0x5defc8,_0x23f64c,_0x1de2e9),_0x4d5b28=[...new Set([..._0x40557e,..._0x1ae80c])][_0x340bf3(0x423)](0x0,0x64);return[_0x4d5b28,_0x137705];}if(_0x1f4a81['has'](_0x5a0bb1)&&_0x426d89[_0x340bf3(0x191)]===0x2){const _0x505ead=_0x426d89[0x1],_0x4f0981=_0x4134f6(_0x505ead,_0x5defc8,_0x23f64c,_0x1de2e9);return[_0x4f0981[_0x340bf3(0x3a5)](_0x557824=>_0x137705+'\x20'+_0x557824),_0x137705+'\x20'+_0x505ead];}if(!_0x1f4a81[_0x340bf3(0x451)](_0x5a0bb1)&&_0x426d89[_0x340bf3(0x191)]>0x1){const _0x57e858=_0x4134f6(_0x137705,_0x5defc8,_0x23f64c,_0x1de2e9),_0x5904d9='\x20'+_0x426d89[_0x340bf3(0x423)](0x1)[_0x340bf3(0x2da)]('\x20');return[_0x57e858['map'](_0x353b93=>_0x353b93+_0x5904d9),_0x137705+_0x5904d9];}return[[],_0xa471b1];}catch{return[[],_0xa471b1];}};}async function _0x98fe05(_0x374e65,_0x39057a){const _0x2d69f5=_0x3bb26a,_0x43344f={'enabled':!![],'level':_0x39057a[_0x2d69f5(0x331)]??'info'},_0x26c648={'env':'default'},_0x1927f4={'current':null},_0x3ddf4a=_0xaf3d78(_0x374e65[_0x2d69f5(0x34c)][_0x2d69f5(0x169)]()),_0x5e23c2=_0x4ac6f9(_0x3ddf4a,_0x374e65,_0x26c648);_0x374e65[_0x2d69f5(0x353)][_0x2d69f5(0x258)](_0x2e7602=>{const _0x57a309=_0x2d69f5;if(!_0x43344f[_0x57a309(0x226)])return;_0x3b94e9(_0x2e7602,_0x43344f[_0x57a309(0x241)]),_0x1927f4[_0x57a309(0x2f8)]?.[_0x57a309(0x187)](!![]);}),_0x12a58e(_0x374e65,_0x39057a);const _0x2af048=_0x52bd33[_0x2d69f5(0x368)]({'input':process[_0x2d69f5(0x37f)],'output':process[_0x2d69f5(0x46b)],'terminal':!![],'completer':_0x5e23c2,'prompt':_0x829a8e(_0x26c648),'historySize':_0x67b89c});try{const _0x426f78=_0x2a57c6[_0x2d69f5(0x401)](_0x2c7065,_0x2d69f5(0x37e))[_0x2d69f5(0x1df)]('\x0a')[_0x2d69f5(0x1e8)](Boolean);_0x2af048[_0x2d69f5(0x262)]=_0x426f78[_0x2d69f5(0x355)]()[_0x2d69f5(0x423)](0x0,_0x67b89c);}catch{}_0x1927f4[_0x2d69f5(0x2f8)]=_0x2af048,_0x2af048['on'](_0x2d69f5(0x2a0),async _0x4b8903=>{const _0x265e8c=_0x2d69f5;_0x2af048[_0x265e8c(0x1a7)]();try{await _0x5f49fd(_0x4b8903,_0x374e65,_0x39057a,_0x43344f,_0x26c648,_0x2af048);}catch(_0x55486f){console[_0x265e8c(0x1f6)](_0x1ace35(_0x246609['red'],'\x20\x20Error:\x20'+_0x55486f['message']));}finally{_0x2af048[_0x265e8c(0x386)](),_0x2af048[_0x265e8c(0x187)]();}}),_0x2af048['on'](_0x2d69f5(0x286),()=>{const _0x5dd03c=_0x2d69f5;try{const _0x2ce784=[..._0x2af048[_0x5dd03c(0x262)]][_0x5dd03c(0x355)]()['filter'](Boolean)[_0x5dd03c(0x423)](0x0,_0x67b89c);_0x2a57c6['writeFileSync'](_0x2c7065,_0x2ce784['join']('\x0a')+'\x0a');}catch{}_0x2a0490(_0x374e65,0x0);});let _0x16f676=0x0;return process['on'](_0x2d69f5(0x279),()=>{const _0x5df590=_0x2d69f5;if(_0x98c29c)return _0x2a0490(_0x374e65,0x82,_0x5df590(0x279));if(_0x2af048[_0x5df590(0x2a0)]==='')return _0x2a0490(_0x374e65,0x0,_0x5df590(0x279));const _0x2691ff=Date[_0x5df590(0x1b8)]();if(_0x2691ff-_0x16f676<0x5dc)return _0x2a0490(_0x374e65,0x0,'SIGINT\x20(double-tap)');_0x16f676=_0x2691ff,process['stdout'][_0x5df590(0x39e)]('\x0a'),_0x2af048[_0x5df590(0x375)](0x0),_0x2af048['prompt'](),process[_0x5df590(0x3cb)][_0x5df590(0x39e)](_0x1ace35(_0x246609['dim'],_0x5df590(0x2fd)));}),process['on'](_0x2d69f5(0x24f),()=>_0x2a0490(_0x374e65,0x0,_0x2d69f5(0x24f))),process['on'](_0x2d69f5(0x23f),()=>_0x2a0490(_0x374e65,0x0,_0x2d69f5(0x23f))),_0x2af048['prompt'](),_0x2af048;}return okdbShell={'start':_0x98fe05,'colorLog':_0x3b94e9,'lenientParse':_0x404889,'_splitLine':_0x1ebac8,'_formatRouteHelpLines':_0x592e60,'_routeSummary':_0x2c1041,'_routeTags':_0x3ae22d},okdbShell;}var hasRequiredOkdb;function requireOkdb(){const _0x12f1ea=_0x422f41;if(hasRequiredOkdb)return okdb$1;hasRequiredOkdb=0x1;try{process[_0x12f1ea(0x311)]();}catch{}const _0x3efdde=require$$1$1,_0x435b18=require$$1;function _0x5c0174(_0x4ebb5f){const _0x364365=_0x12f1ea,_0x4ba900=_0x4ebb5f['slice'](0x2),_0x1925bd={};let _0x3fe02d=0x0;while(_0x3fe02d<_0x4ba900[_0x364365(0x191)]){const _0x3ba23e=_0x4ba900[_0x3fe02d];if(_0x3ba23e===_0x364365(0x1da)||_0x3ba23e==='-p')_0x1925bd[_0x364365(0x3ad)]=Number(_0x4ba900[++_0x3fe02d]);else{if(_0x3ba23e===_0x364365(0x2c9)||_0x3ba23e==='-d')_0x1925bd[_0x364365(0x188)]=_0x4ba900[++_0x3fe02d];else{if(_0x3ba23e===_0x364365(0x399)||_0x3ba23e==='-k')_0x1925bd[_0x364365(0x17f)]=_0x4ba900[++_0x3fe02d];else{if(_0x3ba23e==='--config'||_0x3ba23e==='-c')_0x1925bd['config']=_0x4ba900[++_0x3fe02d];else{if(_0x3ba23e===_0x364365(0x3a2))_0x1925bd[_0x364365(0x331)]=_0x4ba900[++_0x3fe02d];else{if(_0x3ba23e===_0x364365(0x199))_0x1925bd[_0x364365(0x16e)]=!![];else{if(_0x3ba23e===_0x364365(0x2a3))_0x1925bd[_0x364365(0x420)]=!![];else{if(_0x3ba23e===_0x364365(0x268)||_0x3ba23e==='-e')_0x1925bd['env']=_0x4ba900[++_0x3fe02d];else{if(_0x3ba23e===_0x364365(0x1b4))_0x1925bd[_0x364365(0x391)]=_0x4ba900[++_0x3fe02d];else{if(_0x3ba23e===_0x364365(0x3ac))_0x1925bd['changes']=!![];else{if(_0x3ba23e===_0x364365(0x385))_0x1925bd[_0x364365(0x1d1)]=!![];else{if(_0x3ba23e===_0x364365(0x3b2))_0x1925bd[_0x364365(0x2a5)]=!![];else{if(_0x3ba23e===_0x364365(0x42f)){const _0x21541d=[];while(_0x3fe02d+0x1<_0x4ba900['length']&&!_0x4ba900[_0x3fe02d+0x1][_0x364365(0x442)]('--')){_0x21541d[_0x364365(0x3c6)](_0x4ba900[++_0x3fe02d]);}_0x1925bd[_0x364365(0x376)]=_0x21541d[_0x364365(0x191)]>0x0?_0x21541d:!![];}else{if(_0x3ba23e===_0x364365(0x24c))_0x1925bd[_0x364365(0x1a6)]=!![];else{if(_0x3ba23e==='--name')_0x1925bd[_0x364365(0x251)]=_0x4ba900[++_0x3fe02d];else{if(_0x3ba23e==='--password')_0x1925bd['password']=_0x4ba900[++_0x3fe02d];else{if(_0x3ba23e===_0x364365(0x1d6))_0x1925bd[_0x364365(0x2e0)]=_0x4ba900[++_0x3fe02d];else{if(_0x3ba23e==='--permissions')_0x1925bd['permissions']=_0x4ba900[++_0x3fe02d];else{if(_0x3ba23e===_0x364365(0x168))_0x1925bd[_0x364365(0x2e4)]=_0x4ba900[++_0x3fe02d];else{if(_0x3ba23e==='--ttl')_0x1925bd['ttl']=_0x4ba900[++_0x3fe02d];else{if(_0x3ba23e==='--token')_0x1925bd[_0x364365(0x39f)]=_0x4ba900[++_0x3fe02d];else{if(_0x3ba23e==='--username'||_0x3ba23e==='-u')_0x1925bd[_0x364365(0x459)]=_0x4ba900[++_0x3fe02d];else{if(_0x3ba23e===_0x364365(0x261))_0x1925bd[_0x364365(0x17e)]=_0x4ba900[++_0x3fe02d];else{if(_0x3ba23e==='--version'||_0x3ba23e==='-v'){const _0xed065f=require$$2;console[_0x364365(0x353)](_0xed065f['version']),process['exit'](0x0);}else(_0x3ba23e==='--help'||_0x3ba23e==='-h')&&(_0x595080(),process[_0x364365(0x3be)](0x0));}}}}}}}}}}}}}}}}}}}}}}}_0x3fe02d++;}return _0x1925bd;}function _0x595080(){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-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\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\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 _0x187576=new Set([_0x12f1ea(0x18c),_0x12f1ea(0x1db),_0x12f1ea(0x2f3),'error']);function _0xeb9cca(_0x21d978){const _0x15cd22=_0x12f1ea,_0x5abb6d=_0x21d978[_0x15cd22(0x1e7)]?_0x3efdde[_0x15cd22(0x41d)](_0x21d978[_0x15cd22(0x1e7)]):_0x3efdde['resolve']('.kdbconfig');let _0x3819ba={};if(_0x435b18[_0x15cd22(0x271)](_0x5abb6d))try{const _0x1cac20=_0x435b18[_0x15cd22(0x401)](_0x5abb6d,'utf8')[_0x15cd22(0x3e1)](/^\uFEFF/,'');_0x3819ba=JSON[_0x15cd22(0x369)](_0x1cac20),console[_0x15cd22(0x353)](_0x15cd22(0x437)+_0x5abb6d);}catch(_0x601124){console[_0x15cd22(0x1f6)](_0x15cd22(0x32b)+_0x5abb6d+':\x20'+_0x601124[_0x15cd22(0x356)]),process[_0x15cd22(0x3be)](0x1);}const _0x4192c2={'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},_0x283e6a={'port':_0x21d978[_0x15cd22(0x3ad)]??_0x3819ba['port']??_0x4192c2[_0x15cd22(0x3ad)]??0x2124,'dbPath':_0x21d978['path']??_0x3819ba[_0x15cd22(0x188)]??_0x4192c2[_0x15cd22(0x188)]??_0x15cd22(0x2fb),'key':_0x21d978['key']??_0x3819ba[_0x15cd22(0x17f)]??_0x4192c2[_0x15cd22(0x17f)]??undefined,'logLevel':_0x21d978['logLevel']??_0x3819ba[_0x15cd22(0x331)]??_0x4192c2[_0x15cd22(0x331)]??'info','noRepl':_0x21d978['noRepl']??_0x3819ba[_0x15cd22(0x16e)]??_0x4192c2[_0x15cd22(0x16e)]??![],'noAdmin':_0x21d978['noAdmin']??_0x3819ba[_0x15cd22(0x420)]??_0x4192c2[_0x15cd22(0x420)]??![],'admin':_0x3819ba[_0x15cd22(0x193)]??{},'api':_0x3819ba[_0x15cd22(0x27e)]??undefined,'auth':_0x3819ba['auth']??undefined,'mcp':_0x3819ba[_0x15cd22(0x3ce)]??undefined,'timeMachine':_0x3819ba[_0x15cd22(0x310)]!==![]?_0x3819ba[_0x15cd22(0x310)]??{}:![]};return _0x21d978[_0x15cd22(0x376)]!==undefined&&(_0x283e6a['auth']=_0x283e6a[_0x15cd22(0x452)]||{},_0x283e6a[_0x15cd22(0x452)][_0x15cd22(0x376)]=_0x21d978[_0x15cd22(0x376)]),_0x21d978[_0x15cd22(0x1a6)]&&(_0x283e6a[_0x15cd22(0x18c)]=_0x283e6a[_0x15cd22(0x18c)]||{},_0x283e6a['debug'][_0x15cd22(0x1a6)]=!![]),(!Number[_0x15cd22(0x1d2)](_0x283e6a['port'])||_0x283e6a[_0x15cd22(0x3ad)]<0x1||_0x283e6a[_0x15cd22(0x3ad)]>0xffff)&&(console[_0x15cd22(0x1f6)](_0x15cd22(0x1b2)+_0x283e6a[_0x15cd22(0x3ad)]+'\x20(must\x20be\x201–65535)'),process[_0x15cd22(0x3be)](0x1)),!_0x187576[_0x15cd22(0x451)](_0x283e6a[_0x15cd22(0x331)])&&(console[_0x15cd22(0x1f6)](_0x15cd22(0x2ba)+_0x283e6a[_0x15cd22(0x331)]+_0x15cd22(0x354)),process[_0x15cd22(0x3be)](0x1)),_0x283e6a;}function _0x2ce1f8(_0x3c4119){const _0x4d08b0=_0x12f1ea;return!!(_0x3c4119&&typeof _0x3c4119==='object'&&!Array[_0x4d08b0(0x2cf)](_0x3c4119)&&Object[_0x4d08b0(0x25d)](_0x3c4119)[_0x4d08b0(0x191)]>0x0);}const _0x3e526b=!process[_0x12f1ea(0x46b)][_0x12f1ea(0x1e0)]||!!process.env.NO_COLOR;function _0x533d13(_0x577317,_0x12bc70){const _0x4442d1=_0x12f1ea;return _0x3e526b?_0x12bc70:'\x1b['+_0x577317+'m'+_0x12bc70+_0x4442d1(0x2c4);}function _0x5b2181(_0x5ddc73){const _0x2886aa=_0x12f1ea;if(!_0x5ddc73||_0x5ddc73[_0x2886aa(0x191)]===0x0)return;const _0x195d47='─'[_0x2886aa(0x343)](0x38);process[_0x2886aa(0x3cb)][_0x2886aa(0x39e)]('\x0a'),process[_0x2886aa(0x3cb)][_0x2886aa(0x39e)](_0x533d13('33',_0x2886aa(0x3d2)+_0x5ddc73[_0x2886aa(0x191)]+_0x2886aa(0x336)+(_0x5ddc73['length']>0x1?'S':'')+'\x0a')),process['stderr']['write']('\x20\x20'+_0x195d47+'\x0a');for(const _0x44383b of _0x5ddc73){const _0x7ff032=_0x44383b[_0x2886aa(0x241)]==='error'?_0x533d13('31',_0x2886aa(0x468)):_0x533d13('33',_0x2886aa(0x308));process[_0x2886aa(0x3cb)][_0x2886aa(0x39e)](_0x7ff032+'\x20\x20'+_0x533d13('1',_0x44383b['title'])+'\x0a'),process[_0x2886aa(0x3cb)][_0x2886aa(0x39e)](_0x2886aa(0x183)+_0x44383b[_0x2886aa(0x356)]+'\x0a');if(_0x44383b['hint'])process['stderr']['write']('\x20\x20\x20\x20\x20\x20\x20'+_0x533d13('2',_0x2886aa(0x1e5)+_0x44383b['hint'])+'\x0a');process['stderr'][_0x2886aa(0x39e)]('\x0a');}process[_0x2886aa(0x3cb)][_0x2886aa(0x39e)]('\x20\x20'+_0x195d47+'\x0a\x0a');}function _0x40b556(_0x423575,_0x55e9cc){const _0x4aa790=_0x12f1ea,_0x188694=_0x423575[_0x4aa790(0x34c)]['listen'](_0x55e9cc);return new Promise((_0x5af110,_0x459eb2)=>{const _0x33bad0=_0x4aa790;_0x188694[_0x33bad0(0x3ec)](_0x33bad0(0x3a0),_0x5af110),_0x188694[_0x33bad0(0x3ec)](_0x33bad0(0x1f6),_0x459eb2);});}async function _0x2c8cb8(_0x5abebc){const _0x130e44=_0x12f1ea,_0x16d212=require$$3;console['log'](_0x130e44(0x3e8));let _0x1a182f=!![];const _0x3cbd06=(_0xa66326,_0x1e795e)=>{const _0x566020=_0x130e44;console[_0x566020(0x353)]('\x20\x20'+(_0xa66326?'✓':'✗')+'\x20'+_0x1e795e);if(!_0xa66326)_0x1a182f=![];},_0x22ea31=Number(process['version']['replace']('v','')[_0x130e44(0x1df)]('.')[0x0]);_0x3cbd06(_0x22ea31>=0x12,_0x130e44(0x24b)+process[_0x130e44(0x2bc)]+(_0x22ea31<0x12?_0x130e44(0x233):''));const _0x51e08=_0x3efdde[_0x130e44(0x41d)](_0x5abebc[_0x130e44(0x211)]);try{_0x435b18['mkdirSync'](_0x51e08,{'recursive':!![]});const _0x2a0675=_0x3efdde['join'](_0x51e08,_0x130e44(0x31d));_0x435b18[_0x130e44(0x321)](_0x2a0675,''),_0x435b18[_0x130e44(0x25f)](_0x2a0675),_0x3cbd06(!![],_0x130e44(0x307)+_0x51e08);}catch(_0x4e2356){_0x3cbd06(![],_0x130e44(0x207)+_0x51e08+_0x130e44(0x3d7)+_0x4e2356[_0x130e44(0x356)]+')');}const _0x198168=await new Promise(_0x54e0a1=>{const _0x4875f8=_0x130e44,_0x4e7f1b=_0x16d212[_0x4875f8(0x3c2)]();_0x4e7f1b[_0x4875f8(0x3ec)](_0x4875f8(0x1f6),()=>_0x54e0a1(![])),_0x4e7f1b[_0x4875f8(0x3ec)](_0x4875f8(0x3a0),()=>{const _0x5192d1=_0x4875f8;_0x4e7f1b[_0x5192d1(0x286)](),_0x54e0a1(!![]);}),_0x4e7f1b['listen'](_0x5abebc['port'],_0x4875f8(0x1bb));});_0x3cbd06(_0x198168,_0x130e44(0x2be)+_0x5abebc[_0x130e44(0x3ad)]+'\x20'+(_0x198168?_0x130e44(0x316):_0x130e44(0x21b)));const _0x2739f0=_0x3efdde[_0x130e44(0x41d)]('.kdbconfig');if(_0x435b18[_0x130e44(0x271)](_0x2739f0))try{JSON[_0x130e44(0x369)](_0x435b18[_0x130e44(0x401)](_0x2739f0,_0x130e44(0x37e))['replace'](/^\uFEFF/,'')),_0x3cbd06(!![],_0x130e44(0x213)+_0x2739f0);}catch(_0x209d06){_0x3cbd06(![],'config\x20file\x20invalid:\x20'+_0x209d06[_0x130e44(0x356)]);}else _0x3cbd06(!![],_0x130e44(0x295));console[_0x130e44(0x353)](''),_0x1a182f?console[_0x130e44(0x353)](_0x130e44(0x398)):(console[_0x130e44(0x353)](_0x130e44(0x298)),process[_0x130e44(0x3be)](0x1));}async function _0x5b2fba(){const _0x46804f=_0x12f1ea,_0x4b3c7e=_0x3efdde[_0x46804f(0x41d)](_0x46804f(0x1ea));!_0x435b18['existsSync'](_0x4b3c7e)?(_0x435b18[_0x46804f(0x321)](_0x4b3c7e,JSON['stringify']({'port':0x2124,'path':_0x46804f(0x2fb),'logLevel':'info','noRepl':![],'noAdmin':![]},null,0x2)+'\x0a'),console['log'](_0x46804f(0x3ab))):console[_0x46804f(0x353)](_0x46804f(0x322));const _0x5f3dcf=_0x3efdde[_0x46804f(0x41d)](_0x46804f(0x2fb));!_0x435b18['existsSync'](_0x5f3dcf)?(_0x435b18[_0x46804f(0x43e)](_0x5f3dcf,{'recursive':!![]}),console['log'](_0x46804f(0x1f3))):console[_0x46804f(0x353)](_0x46804f(0x294)),console[_0x46804f(0x353)](_0x46804f(0x33d));}async function _0x3a0fd2(_0x44457f){const _0x518e87=_0x12f1ea,_0x1bc9fd=_0x3efdde[_0x518e87(0x41d)](_0x44457f['dbPath']);if(!_0x435b18[_0x518e87(0x271)](_0x1bc9fd)){console[_0x518e87(0x353)]('[okdb]\x20nothing\x20to\x20reset\x20—\x20'+_0x1bc9fd+_0x518e87(0x431));return;}const _0x2c9674=require$$0$2,_0x27655d=_0x2c9674[_0x518e87(0x368)]({'input':process[_0x518e87(0x37f)],'output':process[_0x518e87(0x46b)]}),_0x30a484=await new Promise(_0xdc425c=>_0x27655d[_0x518e87(0x370)](_0x518e87(0x3c1)+_0x1bc9fd+'?\x0a\x20\x20Type\x20\x22yes\x22\x20to\x20confirm:\x20',_0xdc425c));_0x27655d[_0x518e87(0x286)](),console['log']('');if(_0x30a484[_0x518e87(0x473)]()[_0x518e87(0x1c8)]()!==_0x518e87(0x448)){console[_0x518e87(0x353)](_0x518e87(0x46a));return;}_0x435b18[_0x518e87(0x35a)](_0x1bc9fd,{'recursive':!![],'force':!![]}),console[_0x518e87(0x353)]('[okdb]\x20reset:\x20'+_0x1bc9fd+_0x518e87(0x3e7));}async function _0xb79b04(_0x5bfcbc,_0x1f8253){const _0x44279e=_0x12f1ea,_0x524a6b=require$$5,_0x449018=_0x3efdde['resolve'](_0x1f8253[_0x44279e(0x211)]);console[_0x44279e(0x353)](_0x44279e(0x3a8)+_0x449018+'…');const _0x5d9b63=new _0x524a6b(_0x449018,_0x1f8253['key']?{'encryptionKey':_0x1f8253[_0x44279e(0x17f)]}:{});await _0x5d9b63[_0x44279e(0x376)](),console[_0x44279e(0x353)]('[okdb]\x20backing\x20up\x20to\x20'+_0x5bfcbc+'…');const {envs:_0x136ddf}=await _0x5d9b63[_0x44279e(0x338)]['backup'](_0x5bfcbc);for(const _0x2ffd56 of _0x136ddf){const _0x53d3bc=_0x2ffd56['sizeBefore']>0x0?'\x20\x20('+(_0x2ffd56[_0x44279e(0x314)]/0x400/0x400)[_0x44279e(0x277)](0x2)+_0x44279e(0x33f)+(_0x2ffd56['sizeAfter']/0x400/0x400)['toFixed'](0x2)+'\x20MB)':'';console[_0x44279e(0x353)]('\x20\x20✓\x20'+_0x2ffd56['name']+'\x20\x20→\x20\x20'+_0x2ffd56[_0x44279e(0x20a)]+_0x53d3bc);}await _0x5d9b63[_0x44279e(0x286)](),console[_0x44279e(0x353)](_0x44279e(0x1c4));}async function _0x18303d(_0x2d88d9,_0xc4e564,_0x79aa60){const _0x22dc3a=_0x12f1ea,_0x5c8b7e=require$$5,_0x3f1db2=_0x3efdde[_0x22dc3a(0x41d)](_0xc4e564['dbPath']),_0x1c4dfb=_0x79aa60['env']??'default',_0x4ebc6a=_0x79aa60[_0x22dc3a(0x391)]?_0x79aa60[_0x22dc3a(0x391)]['split'](',')[_0x22dc3a(0x3a5)](_0x59db74=>_0x59db74[_0x22dc3a(0x473)]()):null;console[_0x22dc3a(0x353)](_0x22dc3a(0x3a8)+_0x3f1db2+'…');const _0x400e5c=new _0x5c8b7e(_0x3f1db2,_0xc4e564['key']?{'encryptionKey':_0xc4e564[_0x22dc3a(0x17f)]}:{});await _0x400e5c[_0x22dc3a(0x376)](),console[_0x22dc3a(0x353)](_0x22dc3a(0x2d8)+_0x1c4dfb+_0x22dc3a(0x19d)+_0x2d88d9+'…');const _0x363152=await _0x400e5c[_0x22dc3a(0x338)][_0x22dc3a(0x30a)](_0x2d88d9,{'envName':_0x1c4dfb,'types':_0x4ebc6a,'includeChanges':!!_0x79aa60['changes']});console[_0x22dc3a(0x353)]('[okdb]\x20exported\x20\x20types='+_0x363152[_0x22dc3a(0x391)]+_0x22dc3a(0x195)+_0x363152[_0x22dc3a(0x397)]+'\x20\x20changes='+_0x363152[_0x22dc3a(0x2f1)]);if(_0x79aa60['blobs']){const _0x3bbfe9=_0x3efdde[_0x22dc3a(0x2da)](_0x3efdde[_0x22dc3a(0x372)](_0x2d88d9),'blobs');process[_0x22dc3a(0x46b)][_0x22dc3a(0x39e)](_0x22dc3a(0x3de));const {count:_0x11eb14,bytes:_0xf3b662}=await _0x400e5c['migrate'][_0x22dc3a(0x2a6)](_0x3bbfe9);console[_0x22dc3a(0x353)](_0x22dc3a(0x275)+_0x3bbfe9+_0x22dc3a(0x3d7)+_0x11eb14+_0x22dc3a(0x3e4)+(_0x11eb14!==0x1?'s':'')+',\x20'+(_0xf3b662/0x400/0x400)[_0x22dc3a(0x277)](0x2)+_0x22dc3a(0x2c1));}await _0x400e5c['close'](),console[_0x22dc3a(0x353)]('[okdb]\x20export\x20complete');}async function _0x417ef9(_0x4491a0,_0x1f21da,_0x537cc2){const _0x2027f9=_0x12f1ea,_0x54d166=require$$5,_0x50bc90=_0x3efdde[_0x2027f9(0x41d)](_0x1f21da[_0x2027f9(0x211)]),_0x404857=_0x537cc2[_0x2027f9(0x47a)]??null,_0x121a70=_0x537cc2[_0x2027f9(0x391)]?_0x537cc2[_0x2027f9(0x391)][_0x2027f9(0x1df)](',')[_0x2027f9(0x3a5)](_0x6120fd=>_0x6120fd[_0x2027f9(0x473)]()):null,_0xe821ec=!!_0x537cc2[_0x2027f9(0x2a5)];console[_0x2027f9(0x353)](_0x2027f9(0x3a8)+_0x50bc90+'…');const _0x5af8a0=new _0x54d166(_0x50bc90,_0x1f21da[_0x2027f9(0x17f)]?{'encryptionKey':_0x1f21da[_0x2027f9(0x17f)]}:{});await _0x5af8a0[_0x2027f9(0x376)](),console['log'](_0x2027f9(0x235)+_0x4491a0+'…');const _0x551422=await _0x5af8a0[_0x2027f9(0x338)]['importFromFile'](_0x4491a0,{'envName':_0x404857,'types':_0x121a70,'dropExisting':_0xe821ec,'includeChanges':!!_0x537cc2['changes'],'onProgress':({type:_0x4f0158,count:_0x3fbdae})=>{const _0x4cbcf5=_0x2027f9;process[_0x4cbcf5(0x46b)]['write']('\x0d[okdb]\x20'+_0x4f0158+':\x20'+_0x3fbdae+'\x20records…');}});process[_0x2027f9(0x46b)][_0x2027f9(0x39e)]('\x0a'),console[_0x2027f9(0x353)](_0x2027f9(0x430)+_0x551422[_0x2027f9(0x391)]+'\x20\x20records='+_0x551422[_0x2027f9(0x397)]+_0x2027f9(0x1ad)+_0x551422[_0x2027f9(0x2f1)]);if(_0x537cc2[_0x2027f9(0x1d1)]){const _0x21612e=_0x3efdde[_0x2027f9(0x2da)](_0x3efdde['dirname'](_0x4491a0),_0x2027f9(0x1d1));if(_0x435b18[_0x2027f9(0x271)](_0x21612e)){const {imported:_0x35a00c,skipped:_0xad86f5}=await _0x5af8a0[_0x2027f9(0x338)][_0x2027f9(0x38f)](_0x21612e);console[_0x2027f9(0x353)](_0x2027f9(0x374)+_0x35a00c+_0x2027f9(0x466)+_0xad86f5);}}await _0x5af8a0[_0x2027f9(0x286)](),console['log']('[okdb]\x20import\x20complete');}async function _0x26fc69(_0x439356,_0x173641){const _0x175394=_0x12f1ea;_0x173641[_0x175394(0x26d)]&&!_0x173641['name']&&(console[_0x175394(0x1f6)]('[okdb]\x20error:\x20--password\x20requires\x20--name'),process['exit'](0x1));const _0x6310e7=_0x173641[_0x175394(0x2cd)]?_0x173641[_0x175394(0x2cd)][_0x175394(0x1df)](',')[_0x175394(0x3a5)](_0x30fb02=>_0x30fb02[_0x175394(0x473)]())['filter'](Boolean):[];let _0x1562a0={};if(_0x173641['grants'])try{_0x1562a0=JSON['parse'](_0x173641[_0x175394(0x2e4)]);if(typeof _0x1562a0!==_0x175394(0x2ef)||Array['isArray'](_0x1562a0)||_0x1562a0===null)throw new Error();}catch{console[_0x175394(0x1f6)](_0x175394(0x24e)),process[_0x175394(0x3be)](0x1);}const _0x28bee6=require$$5,{randomToken:_0x5bf097,hashToken:_0x31efcd,hashPassword:_0xadb520}=requireOkdbAuthTokens(),_0x42274a=require$$0,_0x149480=_0x3efdde['resolve'](_0x439356[_0x175394(0x211)]),_0x1a1cf4=new _0x28bee6(_0x149480,_0x439356[_0x175394(0x17f)]?{'encryptionKey':_0x439356[_0x175394(0x17f)]}:{});await _0x1a1cf4['open']();try{await _0x1a1cf4[_0x175394(0x452)][_0x175394(0x1be)]();if(_0x173641[_0x175394(0x251)]){const _0x9cd745=await _0x1a1cf4[_0x175394(0x452)]['_lookupByName'](_0x173641[_0x175394(0x251)]);_0x9cd745&&(console[_0x175394(0x1f6)](_0x175394(0x324)+_0x173641[_0x175394(0x251)]+_0x175394(0x22a)),process[_0x175394(0x3be)](0x1));}const _0x9686f9=_0x5bf097(0x20),_0x461174=_0x31efcd(_0x9686f9),_0x31eefa=_0x173641[_0x175394(0x26d)]?await _0xadb520(_0x173641[_0x175394(0x26d)]):null,_0x45087f=_0x42274a[_0x175394(0x1d9)](),_0x4c715b={'tokenHash':_0x461174,'name':_0x173641['name']||null,'passwordHash':_0x31eefa,'label':_0x173641[_0x175394(0x2e0)]||null,'permissions':_0x6310e7,'grants':_0x1562a0,'createdAt':Date[_0x175394(0x1b8)](),'lastUsedAt':null},_0x1db4e0=_0x173641['ttl']?{'ttl':Number(_0x173641[_0x175394(0x381)])}:undefined;await _0x1a1cf4[_0x175394(0x21e)][_0x175394(0x1b9)]('~tokens',_0x45087f,_0x4c715b,_0x1db4e0),console[_0x175394(0x353)](_0x175394(0x337)),console[_0x175394(0x353)]('\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x45087f),console[_0x175394(0x353)]('\x20\x20\x20\x20name:\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x173641[_0x175394(0x251)]||'(unset)')),console[_0x175394(0x353)]('\x20\x20\x20\x20label:\x20\x20\x20\x20\x20\x20\x20'+(_0x173641['label']||_0x175394(0x470))),console[_0x175394(0x353)](_0x175394(0x416)+(_0x6310e7['join'](',\x20')||_0x175394(0x208))),console[_0x175394(0x353)](_0x175394(0x16f)),console[_0x175394(0x353)]('\x20\x20\x20\x20'+_0x9686f9+'\x0a');}finally{await _0x1a1cf4[_0x175394(0x286)]();}}async function _0x1a0751(_0x346bee){const _0x127c55=_0x12f1ea,_0x3fe101=require$$5,_0x4069f5=_0x3efdde['resolve'](_0x346bee['dbPath']),_0x42269b=new _0x3fe101(_0x4069f5,_0x346bee[_0x127c55(0x17f)]?{'encryptionKey':_0x346bee[_0x127c55(0x17f)]}:{});await _0x42269b['open']();try{const _0x3ca1b6=_0x42269b['_systemEnv'];if(!_0x3ca1b6||!_0x3ca1b6[_0x127c55(0x45d)](_0x127c55(0x2dc))){console[_0x127c55(0x353)](_0x127c55(0x22d));return;}const _0x363006=[];for(const {key:_0x1414ea,value:_0x707fb8}of _0x3ca1b6[_0x127c55(0x3bb)](_0x127c55(0x2dc))){_0x363006['push']({'id':_0x1414ea,'name':_0x707fb8[_0x127c55(0x251)]||_0x127c55(0x470),'label':_0x707fb8[_0x127c55(0x2e0)]||_0x127c55(0x470),'permissions':Array[_0x127c55(0x2cf)](_0x707fb8[_0x127c55(0x2cd)])?_0x707fb8[_0x127c55(0x2cd)][_0x127c55(0x2da)](','):'','created':_0x707fb8[_0x127c55(0x17d)]?new Date(_0x707fb8[_0x127c55(0x17d)])[_0x127c55(0x390)]()['slice'](0x0,0xa):''});}if(_0x363006[_0x127c55(0x191)]===0x0){console[_0x127c55(0x353)]('No\x20tokens.');return;}const _0x3d948f=!process[_0x127c55(0x46b)]['columns']||process[_0x127c55(0x46b)]['columns']>=0x64,_0x1665a6=_0x3d948f?0x24:0xa,_0x5c1d50=['ID'[_0x127c55(0x340)](_0x1665a6),_0x127c55(0x42c)[_0x127c55(0x340)](0x10),_0x127c55(0x214)[_0x127c55(0x340)](0x14),_0x127c55(0x403)['padEnd'](0x14),_0x127c55(0x292)]['join']('\x20\x20');console['log']('\x0a'+_0x5c1d50),console[_0x127c55(0x353)]('-'['repeat'](_0x5c1d50[_0x127c55(0x191)]));for(const _0x3b8bf0 of _0x363006){const _0x84c4b9=_0x3d948f?_0x3b8bf0['id']:_0x3b8bf0['id'][_0x127c55(0x423)](0x0,0x8)+'…';console[_0x127c55(0x353)]([_0x84c4b9[_0x127c55(0x340)](_0x1665a6),_0x3b8bf0[_0x127c55(0x251)][_0x127c55(0x423)](0x0,0x10)[_0x127c55(0x340)](0x10),_0x3b8bf0[_0x127c55(0x2e0)]['slice'](0x0,0x14)[_0x127c55(0x340)](0x14),_0x3b8bf0['permissions'][_0x127c55(0x423)](0x0,0x14)[_0x127c55(0x340)](0x14),_0x3b8bf0['created']][_0x127c55(0x2da)]('\x20\x20'));}console[_0x127c55(0x353)]('');}finally{await _0x42269b[_0x127c55(0x286)]();}}async function _0x5341fe(_0x533d6c,_0x54c140){const _0x447118=_0x12f1ea;!_0x533d6c&&(console['error']('[okdb]\x20error:\x20revoke\x20requires\x20an\x20id\x20argument'),process['exit'](0x1));const _0x554aa7=require$$5,_0x16d18e=_0x3efdde[_0x447118(0x41d)](_0x54c140['dbPath']),_0x14f65a=new _0x554aa7(_0x16d18e,_0x54c140[_0x447118(0x17f)]?{'encryptionKey':_0x54c140[_0x447118(0x17f)]}:{});await _0x14f65a['open']();try{const _0x540622=_0x14f65a[_0x447118(0x21e)];(!_0x540622||!_0x540622['hasType'](_0x447118(0x2dc)))&&(console['error']('[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22'+_0x533d6c+'\x22'),process['exit'](0x1));let _0x1b3ebc=null,_0x2248bb=null;const _0x5e0417=_0x540622[_0x447118(0x389)](_0x447118(0x2dc),_0x533d6c);if(_0x5e0417)_0x1b3ebc=_0x533d6c,_0x2248bb=_0x5e0417;else{const _0x585388=[];for(const {key:_0x2a919e,value:_0x29570f}of _0x540622['getRange'](_0x447118(0x2dc))){if(_0x2a919e[_0x447118(0x442)](_0x533d6c))_0x585388['push']({'key':_0x2a919e,'value':_0x29570f});}_0x585388[_0x447118(0x191)]===0x0&&(console[_0x447118(0x1f6)](_0x447118(0x177)+_0x533d6c+'\x22'),process[_0x447118(0x3be)](0x1));if(_0x585388['length']>0x1){console[_0x447118(0x1f6)](_0x447118(0x20c)+_0x533d6c+_0x447118(0x205)+_0x585388[_0x447118(0x191)]+'\x20tokens:');for(const _0x557cee of _0x585388){console[_0x447118(0x1f6)]('\x20\x20'+_0x557cee[_0x447118(0x17f)]+'\x20\x20(name:\x20'+(_0x557cee[_0x447118(0x2b0)][_0x447118(0x251)]||_0x447118(0x470))+')');}process[_0x447118(0x3be)](0x1);}_0x1b3ebc=_0x585388[0x0][_0x447118(0x17f)],_0x2248bb=_0x585388[0x0][_0x447118(0x2b0)];}await _0x540622['remove'](_0x447118(0x2dc),_0x1b3ebc),console['log'](_0x447118(0x21d)+_0x1b3ebc+_0x447118(0x3ae)+(_0x2248bb[_0x447118(0x251)]||_0x447118(0x470))+_0x447118(0x2c7)+(_0x2248bb[_0x447118(0x2e0)]||_0x447118(0x470))+')');}finally{await _0x14f65a[_0x447118(0x286)]();}}function _0x75155b(_0x2184e5,_0x5d8290){const _0x164173=_0x12f1ea;if(!_0x2184e5['activation'])return _0x164173(0x1a2);const _0x273d57=_0x2184e5['expiresAt'];if(!_0x273d57)return _0x164173(0x1bc);if(_0x5d8290>_0x273d57)return'expired';return'active';}function _0x453b61(_0xb4a6e9){const _0x3bfaa2=_0x12f1ea;if(!_0xb4a6e9||typeof _0xb4a6e9!==_0x3bfaa2(0x2ef))return'';const _0x143daf=Object[_0x3bfaa2(0x273)](_0xb4a6e9)[_0x3bfaa2(0x1e8)](([,_0x196d08])=>_0x196d08)['map'](([_0x52705c])=>_0x52705c);if(_0x143daf['length']===0x0)return _0x3bfaa2(0x208);if(_0x143daf['length']<=0x3)return _0x143daf[_0x3bfaa2(0x2da)]('\x20');return _0x143daf['slice'](0x0,0x3)[_0x3bfaa2(0x2da)]('\x20')+('\x20+'+(_0x143daf['length']-0x3));}async function _0x56c67d(_0x38c88){const _0x30e548=_0x12f1ea,_0x10bd24=require$$5,_0x3a3028=requireOkdbLicenseCodec(),{_C:_0x513d16}=requireOkdbLicense(),_0x1bae67=_0x3efdde['resolve'](_0x38c88['dbPath']),_0x4a053b=new _0x10bd24(_0x1bae67,_0x38c88[_0x30e548(0x17f)]?{'encryptionKey':_0x38c88[_0x30e548(0x17f)]}:{});await _0x4a053b[_0x30e548(0x376)]();try{const _0x116917=_0x4a053b[_0x30e548(0x21e)],_0x30125a=_0x116917?.['db']?.[_0x30e548(0x389)]?.(_0x30e548(0x39a))??0x0,_0x5219a7=[..._0x4a053b[_0x30e548(0x2d9)][_0x30e548(0x25d)]()][_0x30e548(0x1e8)](_0x1062a7=>!_0x1062a7[_0x30e548(0x442)]('~'))[_0x30e548(0x191)],_0x396d64=_0x4a053b[_0x30e548(0x302)]?.['effective'];if(_0x396d64){const _0x1a157f=_0x396d64['_isFree']===!![],_0x12aad8=_0x1a157f?_0x30e548(0x283):_0x4a053b[_0x30e548(0x302)]['active']?.[_0x30e548(0x32a)]||_0x30e548(0x278);console['log'](''),console[_0x30e548(0x353)](_0x30e548(0x181)+_0x12aad8);const _0xfd5970=_0x396d64[_0x30e548(0x2b5)]||{};if(_0xfd5970[_0x30e548(0x256)]){const _0x23fc90=Math[_0x30e548(0x472)](_0x30125a/_0xfd5970['maxWrites']*0x64);console[_0x30e548(0x353)](_0x30e548(0x3e6)+_0x30125a[_0x30e548(0x461)]()+_0x30e548(0x299)+_0xfd5970[_0x30e548(0x256)][_0x30e548(0x461)]()+_0x30e548(0x3d7)+_0x23fc90+'%)');}else console[_0x30e548(0x353)](_0x30e548(0x3e6)+_0x30125a['toLocaleString']());_0xfd5970[_0x30e548(0x479)]?console[_0x30e548(0x353)]('\x20\x20Envs:\x20\x20\x20\x20'+_0x5219a7+_0x30e548(0x299)+_0xfd5970[_0x30e548(0x479)]):console[_0x30e548(0x353)](_0x30e548(0x1f4)+_0x5219a7),_0x513d16?.[_0x30e548(0x3da)]&&console[_0x30e548(0x353)]('\x20\x20Build:\x20\x20\x20key\x20fingerprint\x20'+_0x513d16[_0x30e548(0x3da)]+_0x30e548(0x400));}if(!_0x116917||!_0x116917[_0x30e548(0x45d)](_0x30e548(0x395))){console[_0x30e548(0x353)](''),console[_0x30e548(0x353)](_0x30e548(0x2e9)),console[_0x30e548(0x353)]('');return;}const _0x5b7e7d=[],_0x236f27=Date[_0x30e548(0x1b8)](),_0x2068f7=_0x4a053b['id'],_0x5d357b='__OKDB_PUB_FINGERPRINT__';for(const {key:_0x48162c,value:_0x19c5f2}of _0x116917[_0x30e548(0x3bb)](_0x30e548(0x395))){const _0x210b52=_0x19c5f2['_licenseHash']?Buffer[_0x30e548(0x1b5)](_0x19c5f2[_0x30e548(0x1a8)],_0x30e548(0x2d3)):Buffer[_0x30e548(0x16b)](0x8);let _0x45afa4='';try{_0x45afa4=_0x3a3028[_0x30e548(0x27c)](_0x2068f7,_0x210b52,_0x5d357b)[_0x30e548(0x47f)];}catch{}_0x5b7e7d['push']({'id':_0x48162c,'licensee':_0x19c5f2[_0x30e548(0x32a)]||'','expires':_0x19c5f2[_0x30e548(0x3fc)]?new Date(_0x19c5f2[_0x30e548(0x3fc)])[_0x30e548(0x390)]()[_0x30e548(0x423)](0x0,0xa):'','features':_0x453b61(_0x19c5f2[_0x30e548(0x18e)]),'pin':_0x45afa4,'status':_0x75155b(_0x19c5f2,_0x236f27)});}if(_0x5b7e7d[_0x30e548(0x191)]===0x0){console[_0x30e548(0x353)](''),console[_0x30e548(0x353)](_0x30e548(0x2e9)),console[_0x30e548(0x353)]('');return;}const _0x594a8f=['\x20\x20'+'ID'[_0x30e548(0x340)](0xe),_0x30e548(0x2c0)[_0x30e548(0x340)](0xe),_0x30e548(0x197)[_0x30e548(0x340)](0xc),_0x30e548(0x1c9)[_0x30e548(0x340)](0x1e),_0x30e548(0x166)[_0x30e548(0x340)](0xa),'STATUS']['join']('\x20');console['log']('\x0a'+_0x594a8f);for(const _0x21e38d of _0x5b7e7d){const _0x42362c=_0x21e38d['id'][_0x30e548(0x423)](0x0,0x8)+'…';console[_0x30e548(0x353)](['\x20\x20'+_0x42362c[_0x30e548(0x340)](0xe),_0x21e38d[_0x30e548(0x32a)][_0x30e548(0x423)](0x0,0xe)[_0x30e548(0x340)](0xe),_0x21e38d[_0x30e548(0x263)][_0x30e548(0x340)](0xc),_0x21e38d[_0x30e548(0x18e)][_0x30e548(0x423)](0x0,0x1e)['padEnd'](0x1e),_0x21e38d[_0x30e548(0x47f)][_0x30e548(0x340)](0xa),_0x21e38d[_0x30e548(0x229)]]['join']('\x20'));}console['log']('');}finally{await _0x4a053b[_0x30e548(0x286)]();}}async function _0x5f2fff(_0x5c8fd3,_0xd86c03){const _0x7ea126=_0x12f1ea,_0x1e7fef=require$$5,_0x3dc7ed=requireOkdbLicenseCodec();let _0x560f30=_0x5c8fd3;(_0x3dc7ed[_0x7ea126(0x41c)](_0x5c8fd3)==='path'||_0x435b18[_0x7ea126(0x271)](_0x5c8fd3)&&_0x435b18[_0x7ea126(0x1ef)](_0x5c8fd3)[_0x7ea126(0x3a3)]())&&(_0x560f30=_0x435b18[_0x7ea126(0x401)](_0x5c8fd3,'utf8')['trim']());const _0x1248c0=_0x3efdde[_0x7ea126(0x41d)](_0xd86c03[_0x7ea126(0x211)]),_0x22ff1b=new _0x1e7fef(_0x1248c0,_0xd86c03['key']?{'encryptionKey':_0xd86c03['key']}:{});await _0x22ff1b[_0x7ea126(0x376)]();try{!_0x22ff1b[_0x7ea126(0x302)]&&(console[_0x7ea126(0x1f6)](_0x7ea126(0x46d)),process[_0x7ea126(0x3be)](0x1));let _0x50b1d9;try{_0x50b1d9=await _0x22ff1b['_license'][_0x7ea126(0x284)](_0x560f30);}catch(_0x1a2663){console[_0x7ea126(0x1f6)](_0x7ea126(0x29b)+_0x1a2663[_0x7ea126(0x356)]),process[_0x7ea126(0x3be)](0x1);}const _0xf9df14=_0x22ff1b['_license'][_0x7ea126(0x1e3)](),_0x3f0da4=_0xf9df14[_0x7ea126(0x293)](_0x33fca8=>_0x33fca8[_0x7ea126(0x28b)]===_0x50b1d9['id'])?.[_0x7ea126(0x47f)]||'',_0x11bd1b=Object['entries'](_0x50b1d9[_0x7ea126(0x18e)]||{})['filter'](([,_0x44f679])=>_0x44f679)[_0x7ea126(0x3a5)](([_0x1fb2be])=>_0x1fb2be),_0x183fa5=_0x50b1d9[_0x7ea126(0x2b5)]||{},_0x530370=[_0x183fa5[_0x7ea126(0x479)]?'envs='+_0x183fa5[_0x7ea126(0x479)]:null,_0x183fa5[_0x7ea126(0x3a7)]?_0x7ea126(0x3c3)+_0x183fa5[_0x7ea126(0x3a7)]:null,_0x183fa5[_0x7ea126(0x265)]?_0x7ea126(0x37a)+_0x183fa5[_0x7ea126(0x265)]:null,_0x183fa5[_0x7ea126(0x256)]?_0x7ea126(0x287)+_0x183fa5[_0x7ea126(0x256)]['toLocaleString']():null]['filter'](Boolean)[_0x7ea126(0x2da)]('\x20\x20'),_0x2de240=_0x50b1d9['licenseType']===_0x3dc7ed[_0x7ea126(0x1f9)];console[_0x7ea126(0x353)](_0x7ea126(0x2d0)),console[_0x7ea126(0x353)](_0x7ea126(0x43b)+_0x50b1d9['id']),console['log']('\x20\x20\x20\x20licensee:\x20\x20'+_0x50b1d9[_0x7ea126(0x32a)]),console[_0x7ea126(0x353)](_0x7ea126(0x16c)+new Date(_0x50b1d9[_0x7ea126(0x3fc)])[_0x7ea126(0x390)]()[_0x7ea126(0x423)](0x0,0xa)),console[_0x7ea126(0x353)](_0x7ea126(0x2b4)+(_0x11bd1b[_0x7ea126(0x2da)](',\x20')||_0x7ea126(0x208)));if(_0x530370)console[_0x7ea126(0x353)](_0x7ea126(0x3b3)+_0x530370);_0x2de240?(console[_0x7ea126(0x353)](_0x7ea126(0x334)),console['log']('')):(console['log'](_0x7ea126(0x43f)+_0x3f0da4),console[_0x7ea126(0x353)]('\x20\x20\x20\x20status:\x20\x20\x20\x20pending\x20activation'),console['log'](''),console[_0x7ea126(0x353)](_0x7ea126(0x3d3)),console['log']('\x20\x20\x20\x201.\x20Send\x20the\x20PIN\x20above\x20('+_0x3f0da4+_0x7ea126(0x1f2)),console['log'](_0x7ea126(0x1e9)),console['log'](_0x7ea126(0x3ed)),console[_0x7ea126(0x353)](''));}finally{await _0x22ff1b[_0x7ea126(0x286)]();}}async function _0x387f01(_0x654108,_0x5c18ed){const _0x5bcfd8=_0x12f1ea,_0x1b5b55=require$$5,_0x40eb5a=_0x3efdde[_0x5bcfd8(0x41d)](_0x5c18ed[_0x5bcfd8(0x211)]),_0x2fb004=new _0x1b5b55(_0x40eb5a,_0x5c18ed[_0x5bcfd8(0x17f)]?{'encryptionKey':_0x5c18ed['key']}:{});await _0x2fb004['open']();try{!_0x2fb004[_0x5bcfd8(0x302)]&&(console[_0x5bcfd8(0x1f6)](_0x5bcfd8(0x46d)),process[_0x5bcfd8(0x3be)](0x1));let _0x2792f4;try{_0x2792f4=await _0x2fb004[_0x5bcfd8(0x302)]['activateLicense'](_0x654108[_0x5bcfd8(0x473)]());}catch(_0x4c256b){console[_0x5bcfd8(0x1f6)]('[okdb]\x20error:\x20'+_0x4c256b[_0x5bcfd8(0x356)]),console[_0x5bcfd8(0x1f6)](''),console['error'](_0x5bcfd8(0x439)),console[_0x5bcfd8(0x1f6)](_0x5bcfd8(0x1d4)),console[_0x5bcfd8(0x1f6)]('\x20\x20\x20\x20-\x20The\x20activation\x20token\x20was\x20issued\x20for\x20a\x20different\x20node\x20—\x20share\x20this\x20node\x27s\x20PIN\x20with\x20the\x20vendor.'),console['error'](_0x5bcfd8(0x2ca)),console['error'](''),process[_0x5bcfd8(0x3be)](0x1);}console[_0x5bcfd8(0x353)](_0x5bcfd8(0x313)),console[_0x5bcfd8(0x353)](_0x5bcfd8(0x43b)+_0x2792f4['id']),console[_0x5bcfd8(0x353)]('\x20\x20\x20\x20licensee:\x20\x20'+_0x2792f4[_0x5bcfd8(0x32a)]),console[_0x5bcfd8(0x353)]('\x20\x20\x20\x20expires:\x20\x20\x20'+new Date(_0x2792f4[_0x5bcfd8(0x3fc)])[_0x5bcfd8(0x390)]()[_0x5bcfd8(0x423)](0x0,0xa)),console[_0x5bcfd8(0x353)](_0x5bcfd8(0x467)),console[_0x5bcfd8(0x353)]('');}finally{await _0x2fb004[_0x5bcfd8(0x286)]();}}async function _0x93e565(_0x443f20,_0x2c6a5c){const _0x593ac2=_0x12f1ea;!_0x443f20&&(console[_0x593ac2(0x1f6)](_0x593ac2(0x3b5)),process[_0x593ac2(0x3be)](0x1));const _0x338764=require$$5,_0x4a43f3=requireOkdbLicenseCodec(),_0x2435bd=_0x3efdde[_0x593ac2(0x41d)](_0x2c6a5c['dbPath']),_0x25db43=new _0x338764(_0x2435bd,_0x2c6a5c[_0x593ac2(0x17f)]?{'encryptionKey':_0x2c6a5c[_0x593ac2(0x17f)]}:{});await _0x25db43[_0x593ac2(0x376)]();try{const _0x328d0d=_0x25db43[_0x593ac2(0x21e)];(!_0x328d0d||!_0x328d0d['hasType']('~licenses'))&&(console[_0x593ac2(0x1f6)](_0x593ac2(0x21a)+_0x443f20+'\x22'),process[_0x593ac2(0x3be)](0x1));let _0x4256da=null,_0xc0d0f4=null;const _0x28f803=_0x328d0d[_0x593ac2(0x389)](_0x593ac2(0x395),_0x443f20);if(_0x28f803)_0x4256da=_0x443f20,_0xc0d0f4=_0x28f803;else{const _0x40e60c=[];for(const {key:_0x56c512,value:_0x10eb43}of _0x328d0d[_0x593ac2(0x3bb)]('~licenses')){if(_0x56c512[_0x593ac2(0x442)](_0x443f20))_0x40e60c[_0x593ac2(0x3c6)]({'key':_0x56c512,'value':_0x10eb43});}_0x40e60c[_0x593ac2(0x191)]===0x0&&(console[_0x593ac2(0x1f6)](_0x593ac2(0x21a)+_0x443f20+'\x22'),process[_0x593ac2(0x3be)](0x1)),_0x40e60c[_0x593ac2(0x191)]>0x1&&(console[_0x593ac2(0x1f6)](_0x593ac2(0x20c)+_0x443f20+_0x593ac2(0x205)+_0x40e60c[_0x593ac2(0x191)]+'\x20licenses'),process[_0x593ac2(0x3be)](0x1)),_0x4256da=_0x40e60c[0x0][_0x593ac2(0x17f)],_0xc0d0f4=_0x40e60c[0x0]['value'];}const _0x13b3be=Date[_0x593ac2(0x1b8)](),_0x54e874=_0x75155b(_0xc0d0f4,_0x13b3be),_0x4aa943=_0x25db43['id'],_0x2105b7=_0x593ac2(0x3eb);let _0x30767b='';try{const _0x2fdf79=Buffer[_0x593ac2(0x1b5)](_0xc0d0f4['_licenseHash'],_0x593ac2(0x2d3));_0x30767b=_0x4a43f3['derivePin'](_0x4aa943,_0x2fdf79,_0x2105b7)[_0x593ac2(0x47f)];}catch{}const _0x3badde=_0xc0d0f4['features']?Object[_0x593ac2(0x273)](_0xc0d0f4['features'])['filter'](([,_0x242eef])=>_0x242eef)[_0x593ac2(0x3a5)](([_0x21cf35])=>_0x21cf35):[],_0x5b896c=_0xc0d0f4[_0x593ac2(0x2b5)]||{},_0x496de6=_0x328d0d?.['db']?.['get']?.('__writeCounter')??0x0,_0x1a64f1=[..._0x25db43[_0x593ac2(0x2d9)][_0x593ac2(0x25d)]()][_0x593ac2(0x1e8)](_0x97c3f=>!_0x97c3f['startsWith']('~'))[_0x593ac2(0x191)];console[_0x593ac2(0x353)](_0x593ac2(0x215)),console[_0x593ac2(0x353)](_0x593ac2(0x43b)+_0x4256da),console['log'](_0x593ac2(0x2fa)+(_0xc0d0f4['licensee']||'')),console[_0x593ac2(0x353)]('\x20\x20\x20\x20expires:\x20\x20\x20'+(_0xc0d0f4['expiresAt']?new Date(_0xc0d0f4[_0x593ac2(0x3fc)])[_0x593ac2(0x390)]()['slice'](0x0,0xa):'')),console[_0x593ac2(0x353)](_0x593ac2(0x2b4)+(_0x3badde[_0x593ac2(0x2da)](',\x20')||'(none)')),console[_0x593ac2(0x353)](_0x593ac2(0x43f)+_0x30767b),console[_0x593ac2(0x353)](_0x593ac2(0x19a)+_0x54e874),console['log'](_0x593ac2(0x178)+new Date(_0xc0d0f4[_0x593ac2(0x291)])[_0x593ac2(0x390)]());if(_0x54e874==='active'){console[_0x593ac2(0x353)](''),console[_0x593ac2(0x353)](_0x593ac2(0x44f));if(_0x5b896c[_0x593ac2(0x256)]){const _0x1f3fbb=Math[_0x593ac2(0x472)](_0x496de6/_0x5b896c[_0x593ac2(0x256)]*0x64);console[_0x593ac2(0x353)](_0x593ac2(0x2af)+_0x496de6[_0x593ac2(0x461)]()+_0x593ac2(0x299)+_0x5b896c['maxWrites'][_0x593ac2(0x461)]()+_0x593ac2(0x3d7)+_0x1f3fbb+'%)');}else console[_0x593ac2(0x353)](_0x593ac2(0x2af)+_0x496de6[_0x593ac2(0x461)]()+_0x593ac2(0x361));_0x5b896c[_0x593ac2(0x479)]?console[_0x593ac2(0x353)](_0x593ac2(0x269)+_0x1a64f1+_0x593ac2(0x299)+_0x5b896c[_0x593ac2(0x479)]):console[_0x593ac2(0x353)]('\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20'+_0x1a64f1+_0x593ac2(0x361));}console[_0x593ac2(0x353)]('');}finally{await _0x25db43[_0x593ac2(0x286)]();}}async function _0xd7019f(_0x581f74,_0x32ef2f){const _0x4f7699=_0x12f1ea;!_0x581f74&&(console[_0x4f7699(0x1f6)](_0x4f7699(0x2ff)),process[_0x4f7699(0x3be)](0x1));const _0x18b143=require$$5,_0x12b7ce=_0x3efdde[_0x4f7699(0x41d)](_0x32ef2f[_0x4f7699(0x211)]),_0x5a9d18=new _0x18b143(_0x12b7ce,_0x32ef2f['key']?{'encryptionKey':_0x32ef2f[_0x4f7699(0x17f)]}:{});await _0x5a9d18['open']();try{const _0x4c5f93=_0x5a9d18['_systemEnv'];(!_0x4c5f93||!_0x4c5f93[_0x4f7699(0x45d)](_0x4f7699(0x395)))&&(console[_0x4f7699(0x1f6)](_0x4f7699(0x21a)+_0x581f74+'\x22'),process['exit'](0x1));let _0x27edb6=null,_0x50d6e5=null;const _0x50d021=_0x4c5f93[_0x4f7699(0x389)](_0x4f7699(0x395),_0x581f74);if(_0x50d021)_0x27edb6=_0x581f74,_0x50d6e5=_0x50d021;else{const _0x12f4b2=[];for(const {key:_0xb598b7,value:_0x541d3c}of _0x4c5f93[_0x4f7699(0x3bb)](_0x4f7699(0x395))){if(_0xb598b7[_0x4f7699(0x442)](_0x581f74))_0x12f4b2['push']({'key':_0xb598b7,'value':_0x541d3c});}_0x12f4b2['length']===0x0&&(console[_0x4f7699(0x1f6)]('[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22'+_0x581f74+'\x22'),process[_0x4f7699(0x3be)](0x1)),_0x12f4b2[_0x4f7699(0x191)]>0x1&&(console['error'](_0x4f7699(0x20c)+_0x581f74+_0x4f7699(0x205)+_0x12f4b2[_0x4f7699(0x191)]+_0x4f7699(0x3a1)),process[_0x4f7699(0x3be)](0x1)),_0x27edb6=_0x12f4b2[0x0][_0x4f7699(0x17f)],_0x50d6e5=_0x12f4b2[0x0]['value'];}await _0x4c5f93[_0x4f7699(0x339)](_0x4f7699(0x395),_0x27edb6),console[_0x4f7699(0x353)](_0x4f7699(0x242)+_0x27edb6+_0x4f7699(0x1af)+(_0x50d6e5[_0x4f7699(0x32a)]||_0x4f7699(0x470))+')');}finally{await _0x5a9d18[_0x4f7699(0x286)]();}}async function _0x1f5de3(_0x24bb3f,_0x266431,_0x527cf3){const _0xb7be2b=_0x12f1ea;!_0x24bb3f&&(console[_0xb7be2b(0x1f6)]('[okdb]\x20error:\x20join\x20requires\x20a\x20remote\x20address.\x20Usage:\x20okdb\x20join\x20<address>\x20--token\x20<t>'),process[_0xb7be2b(0x3be)](0x1));!_0x527cf3[_0xb7be2b(0x39f)]&&!(_0x527cf3[_0xb7be2b(0x459)]&&_0x527cf3[_0xb7be2b(0x26d)])&&(console['error']('[okdb]\x20error:\x20join\x20requires\x20credentials.\x20Provide\x20--token\x20<t>\x20or\x20--username\x20<u>\x20--password\x20<p>'),process[_0xb7be2b(0x3be)](0x1));const _0xacdc65=_0x527cf3[_0xb7be2b(0x17e)]||_0x266431['sync']?.[_0xb7be2b(0x436)];!_0xacdc65&&(console['error'](_0xb7be2b(0x26b)+_0xb7be2b(0x3f1)+_0xb7be2b(0x3f7)),process[_0xb7be2b(0x3be)](0x1));const _0x2ecb23=require$$5,_0x5b8785=new _0x2ecb23(_0x266431[_0xb7be2b(0x211)],{'sync':{'address':_0xacdc65,'auto_reconcile':![]}});await _0x5b8785[_0xb7be2b(0x376)]();try{const _0x5790b0=_0x5b8785[_0xb7be2b(0x21e)];if(_0x5790b0&&_0x5790b0[_0xb7be2b(0x45d)](_0xb7be2b(0x2dc))){let _0xe3532=![];for(const _0x2f4a37 of _0x5790b0[_0xb7be2b(0x3bb)](_0xb7be2b(0x2dc))){_0xe3532=!![];break;}_0xe3532&&console[_0xb7be2b(0x353)](_0xb7be2b(0x1ab)+_0xb7be2b(0x1f5));}console[_0xb7be2b(0x353)](_0xb7be2b(0x447)+_0x24bb3f+'…'),await _0x5b8785[_0xb7be2b(0x20e)][_0xb7be2b(0x2da)](_0x24bb3f[_0xb7be2b(0x3e1)](/\/+$/,''),{'token':_0x527cf3[_0xb7be2b(0x39f)],'username':_0x527cf3['username'],'password':_0x527cf3[_0xb7be2b(0x26d)]}),console['log']('\x20\x20✓\x20joined\x20and\x20reconciliation\x20initiated'),console[_0xb7be2b(0x353)](_0xb7be2b(0x26f));}finally{await _0x5b8785[_0xb7be2b(0x286)]();}}async function _0x524fce(){const _0x4d576e=_0x12f1ea,_0x3f77cf=Date[_0x4d576e(0x1b8)](),_0x2a78d4=_0x5c0174(process[_0x4d576e(0x2e6)]),_0x342fe0=_0xeb9cca(_0x2a78d4),_0x2f5379=_0x3efdde[_0x4d576e(0x41d)](_0x342fe0['dbPath']);!_0x342fe0[_0x4d576e(0x16e)]&&!process[_0x4d576e(0x37f)][_0x4d576e(0x1e0)]&&(_0x342fe0['noRepl']=!![]);const _0x3fe44b=require$$5,{start:_0x5f3ddf,colorLog:_0x3d6689}=requireOkdbShell(),_0x1e8c4f={..._0x342fe0[_0x4d576e(0x17f)]?{'encryptionKey':_0x342fe0['key']}:{},..._0x342fe0[_0x4d576e(0x420)]?{'admin':![]}:_0x2ce1f8(_0x342fe0[_0x4d576e(0x193)])?{'admin':_0x342fe0[_0x4d576e(0x193)]}:{},..._0x2ce1f8(_0x342fe0['api'])?{'api':_0x342fe0[_0x4d576e(0x27e)]}:{},..._0x2ce1f8(_0x342fe0[_0x4d576e(0x452)])?{'auth':_0x342fe0[_0x4d576e(0x452)]}:{},..._0x2ce1f8(_0x342fe0[_0x4d576e(0x3ce)])?{'mcp':_0x342fe0[_0x4d576e(0x3ce)]}:{},..._0x342fe0[_0x4d576e(0x310)]!==![]?{'timeMachine':_0x342fe0[_0x4d576e(0x310)]}:{}},_0x362244=new _0x3fe44b(_0x2f5379,_0x1e8c4f);_0x362244[_0x4d576e(0x353)]['detachConsole']?.();const _0xbdb54=_0x362244[_0x4d576e(0x353)][_0x4d576e(0x258)](_0x404b55=>_0x3d6689(_0x404b55,_0x342fe0[_0x4d576e(0x331)]));if(_0x342fe0[_0x4d576e(0x16e)])process[_0x4d576e(0x46b)]['write'](_0x4d576e(0x2a7));await _0x362244[_0x4d576e(0x376)]();if(_0x342fe0[_0x4d576e(0x16e)])process[_0x4d576e(0x46b)][_0x4d576e(0x39e)](_0x4d576e(0x28a));try{await _0x40b556(_0x362244,_0x342fe0[_0x4d576e(0x3ad)]);}catch(_0x446e7f){_0x446e7f[_0x4d576e(0x2b8)]==='EADDRINUSE'&&(console['error']('[okdb]\x20port\x20'+_0x342fe0['port']+_0x4d576e(0x33c)),process[_0x4d576e(0x3be)](0x1));throw _0x446e7f;}if(_0x342fe0[_0x4d576e(0x16e)])process[_0x4d576e(0x46b)][_0x4d576e(0x39e)](_0x4d576e(0x30d)+_0x342fe0[_0x4d576e(0x3ad)]+'\x0a');if(!_0x342fe0[_0x4d576e(0x16e)])_0x362244[_0x4d576e(0x353)][_0x4d576e(0x38a)]?.(),_0xbdb54?.(),_0x5b2181(_0x362244[_0x4d576e(0x452)]?.[_0x4d576e(0x17a)]?.()??[]),await _0x5f3ddf(_0x362244,_0x342fe0);else{const _0x45ebbd=_0x3efdde['join'](_0x2f5379,_0x4d576e(0x257));try{_0x435b18['writeFileSync'](_0x45ebbd,String(process['pid']));}catch{}const _0x47baa4=Date['now']()-_0x3f77cf;console['log'](''),console[_0x4d576e(0x353)](_0x4d576e(0x3d5)),console[_0x4d576e(0x353)](_0x4d576e(0x2ad)+_0x342fe0[_0x4d576e(0x3ad)]),console[_0x4d576e(0x353)]('\x20\x20\x20\x20path:\x20\x20'+_0x2f5379),console[_0x4d576e(0x353)]('\x20\x20\x20\x20id:\x20\x20\x20\x20'+_0x362244['id']);{const _0x94cbe3=_0x362244[_0x4d576e(0x21e)]?.['db']?.['get']?.(_0x4d576e(0x39a))??0x0,_0x3e9413=[..._0x362244['_envs'][_0x4d576e(0x25d)]()][_0x4d576e(0x1e8)](_0x1c1148=>!_0x1c1148[_0x4d576e(0x442)]('~'))[_0x4d576e(0x191)];if(_0x362244[_0x4d576e(0x302)]?.['active']?.[_0x4d576e(0x38d)]===0x1){const _0x23cf9c=Math['ceil']((_0x362244[_0x4d576e(0x302)][_0x4d576e(0x1bc)][_0x4d576e(0x3fc)]-Date['now']())/0x5265c00);console[_0x4d576e(0x353)]('\x20\x20\x20\x20license:\x20⚠\x20OPEN\x20—\x20'+_0x362244['_license']['active'][_0x4d576e(0x32a)]+_0x4d576e(0x3f4)+_0x23cf9c+'\x20days\x20—\x20POC/demo\x20only,\x20not\x20node-bound)');}else{if(_0x362244[_0x4d576e(0x302)]?.[_0x4d576e(0x1bc)]){const _0x5d760c=_0x362244[_0x4d576e(0x302)]['active'];console[_0x4d576e(0x353)](_0x4d576e(0x2e1)+_0x5d760c[_0x4d576e(0x32a)]+'\x20(expires\x20'+new Date(_0x5d760c[_0x4d576e(0x3fc)])[_0x4d576e(0x390)]()['slice'](0x0,0xa)+')');const _0x1f44bd=_0x5d760c[_0x4d576e(0x2b5)]||{};if(_0x1f44bd[_0x4d576e(0x256)]){const _0x548019=Math[_0x4d576e(0x472)](_0x94cbe3/_0x1f44bd[_0x4d576e(0x256)]*0x64);console[_0x4d576e(0x353)](_0x4d576e(0x366)+_0x94cbe3[_0x4d576e(0x461)]()+_0x4d576e(0x299)+_0x1f44bd['maxWrites']['toLocaleString']()+_0x4d576e(0x3fb)+_0x548019+'%),\x20'+_0x3e9413+(_0x1f44bd['envs']?'/'+_0x1f44bd[_0x4d576e(0x479)]:'')+'\x20env'+(_0x3e9413===0x1?'':'s'));}}else{if(_0x362244[_0x4d576e(0x302)]){const _0x74f825=_0x362244[_0x4d576e(0x302)][_0x4d576e(0x1e3)](),_0x4204fa=_0x74f825[_0x4d576e(0x191)]?_0x74f825[_0x4d576e(0x3a5)](_0x462a50=>_0x462a50[_0x4d576e(0x47f)])[_0x4d576e(0x2da)](',\x20'):_0x4d576e(0x32f),_0x52c878=_0x362244[_0x4d576e(0x302)][_0x4d576e(0x387)],_0x144bab=_0x52c878[_0x4d576e(0x2b5)][_0x4d576e(0x256)]?Math[_0x4d576e(0x472)](_0x94cbe3/_0x52c878['limits']['maxWrites']*0x64):0x0;console[_0x4d576e(0x353)](_0x4d576e(0x19f)),console[_0x4d576e(0x353)]('\x20\x20\x20\x20usage:\x20\x20\x20'+_0x94cbe3['toLocaleString']()+'\x20/\x20'+_0x52c878[_0x4d576e(0x2b5)][_0x4d576e(0x256)][_0x4d576e(0x461)]()+_0x4d576e(0x3fb)+_0x144bab+'%),\x20'+_0x3e9413+_0x4d576e(0x299)+_0x52c878[_0x4d576e(0x2b5)]['envs']+_0x4d576e(0x3e2)),console[_0x4d576e(0x353)](_0x4d576e(0x26e)+_0x4204fa);}}}}console[_0x4d576e(0x353)]('\x20\x20\x20\x20api:\x20\x20\x20http://localhost:'+_0x342fe0['port']+'/api');!_0x342fe0[_0x4d576e(0x420)]&&console[_0x4d576e(0x353)](_0x4d576e(0x3ee)+_0x342fe0[_0x4d576e(0x3ad)]+_0x4d576e(0x28c));console[_0x4d576e(0x353)](''),console['log'](_0x4d576e(0x25c)+_0x47baa4+'ms'),_0x5b2181(_0x362244[_0x4d576e(0x452)]?.[_0x4d576e(0x17a)]?.()??[]);let _0x247d46=![];async function _0x500108(_0xb9eb9d){const _0x287000=_0x4d576e;_0x247d46&&(process['stderr'][_0x287000(0x39e)](_0x287000(0x264)),process[_0x287000(0x3be)](0x82));_0x247d46=!![],process[_0x287000(0x3cb)][_0x287000(0x39e)]('\x0a[okdb]\x20received\x20'+(_0xb9eb9d||_0x287000(0x1a4))+',\x20closing…\x0a');const _0x4e7df6=setTimeout(()=>{const _0x2473db=_0x287000;process[_0x2473db(0x3cb)][_0x2473db(0x39e)](_0x2473db(0x26a)),process['exit'](0x1);},0x1388);try{_0x435b18[_0x287000(0x25f)](_0x45ebbd);}catch{}try{await _0x362244[_0x287000(0x286)]();}catch(_0x596fc3){process[_0x287000(0x3cb)][_0x287000(0x39e)](_0x287000(0x38c)+(_0x596fc3?.[_0x287000(0x356)]??_0x596fc3)+'\x0a');}clearTimeout(_0x4e7df6),process['stderr'][_0x287000(0x39e)](_0x287000(0x446)),process[_0x287000(0x3be)](0x0);}process['on']('SIGINT',()=>_0x500108('SIGINT')),process['on'](_0x4d576e(0x24f),()=>_0x500108(_0x4d576e(0x24f))),process['on'](_0x4d576e(0x23f),()=>_0x500108(_0x4d576e(0x23f)));}}const _0xf92bd6=new Set(['version',_0x12f1ea(0x346),_0x12f1ea(0x428),'backup','export','import',_0x12f1ea(0x449),_0x12f1ea(0x39f),_0x12f1ea(0x2da),'license']),_0x1852ac=process[_0x12f1ea(0x2e6)][0x2];if(_0x1852ac===_0x12f1ea(0x2bc))console[_0x12f1ea(0x353)](require$$2['version']),process[_0x12f1ea(0x3be)](0x0);else{if(_0x1852ac&&_0xf92bd6[_0x12f1ea(0x451)](_0x1852ac)){const _0x631a56=process[_0x12f1ea(0x2e6)]['slice'](0x3),_0x26486b=_0x5c0174(['node',_0x12f1ea(0x237),..._0x631a56]),_0x2d4e9c=_0xeb9cca(_0x26486b),_0x270b6b=new Set([_0x12f1ea(0x2c9),'-d',_0x12f1ea(0x399),'-k',_0x12f1ea(0x333),'-c',_0x12f1ea(0x1da),'-p','--log-level',_0x12f1ea(0x268),'-e',_0x12f1ea(0x1b4),_0x12f1ea(0x2a9),_0x12f1ea(0x409),_0x12f1ea(0x1d6),_0x12f1ea(0x2bf),_0x12f1ea(0x168),'--ttl',_0x12f1ea(0x1cd),'--username','-u',_0x12f1ea(0x261)]);let _0x18816e=null;for(let _0x1571fd=0x0;_0x1571fd<_0x631a56[_0x12f1ea(0x191)];_0x1571fd++){if(_0x270b6b['has'](_0x631a56[_0x1571fd])){_0x1571fd++;continue;}if(!_0x631a56[_0x1571fd]['startsWith']('-')){_0x18816e=_0x631a56[_0x1571fd];break;}}(async()=>{const _0x50ee6=_0x12f1ea;if(_0x1852ac===_0x50ee6(0x39f)){const _0x34fd97=process[_0x50ee6(0x2e6)][0x3],_0x4c3b8f=process[_0x50ee6(0x2e6)][_0x50ee6(0x423)](0x4),_0xa39e95=_0x5c0174([_0x50ee6(0x2d4),'okdb',..._0x4c3b8f]),_0x14dff0=_0xeb9cca(_0xa39e95),_0x3a4e51=new Set([_0x50ee6(0x2c9),'-d',_0x50ee6(0x399),'-k','--config','-c','--port','-p',_0x50ee6(0x2a9),_0x50ee6(0x409),_0x50ee6(0x1d6),_0x50ee6(0x2bf),_0x50ee6(0x168),_0x50ee6(0x2d6),'--log-level',_0x50ee6(0x268),'-e','--types']),_0x27027e=[];for(let _0x5ed64b=0x0;_0x5ed64b<_0x4c3b8f[_0x50ee6(0x191)];_0x5ed64b++){if(_0x3a4e51[_0x50ee6(0x451)](_0x4c3b8f[_0x5ed64b])){_0x5ed64b++;continue;}if(_0x4c3b8f[_0x5ed64b]['startsWith']('-'))continue;_0x27027e[_0x50ee6(0x3c6)](_0x4c3b8f[_0x5ed64b]);}switch(_0x34fd97){case _0x50ee6(0x27d):await _0x26fc69(_0x14dff0,_0xa39e95);break;case _0x50ee6(0x3dc):await _0x1a0751(_0x14dff0);break;case _0x50ee6(0x1b6):await _0x5341fe(_0x27027e[0x0],_0x14dff0);break;default:console[_0x50ee6(0x1f6)](_0x50ee6(0x362)+_0x34fd97+_0x50ee6(0x44a)),process['exit'](0x1);}return;}if(_0x1852ac===_0x50ee6(0x30e)){const _0x2753bf=requireOkdbLicenseCodec(),_0x5138c4=process[_0x50ee6(0x2e6)]['slice'](0x3),_0x5ab852=_0x5c0174(['node',_0x50ee6(0x237),..._0x5138c4]),_0x428440=_0xeb9cca(_0x5ab852),_0x22dc12=new Set([_0x50ee6(0x2c9),'-d',_0x50ee6(0x399),'-k',_0x50ee6(0x333),'-c',_0x50ee6(0x1da),'-p',_0x50ee6(0x3a2)]),_0x2694cf=[];for(let _0x43cdbd=0x0;_0x43cdbd<_0x5138c4['length'];_0x43cdbd++){if(_0x22dc12['has'](_0x5138c4[_0x43cdbd])){_0x43cdbd++;continue;}if(_0x5138c4[_0x43cdbd][_0x50ee6(0x442)]('-'))continue;_0x2694cf[_0x50ee6(0x3c6)](_0x5138c4[_0x43cdbd]);}const _0x2dbe9f=_0x2694cf[0x0]??null;if(_0x2dbe9f===_0x50ee6(0x339))await _0xd7019f(_0x2694cf[0x1],_0x428440);else{if(!_0x2dbe9f)await _0x56c67d(_0x428440);else{let _0x2daefc=_0x2753bf[_0x50ee6(0x41c)](_0x2dbe9f);if(_0x2daefc===_0x50ee6(0x1b0)&&_0x435b18[_0x50ee6(0x271)](_0x2dbe9f))_0x2daefc=_0x50ee6(0x188);if(_0x2daefc===_0x50ee6(0x188))try{const _0x465920=_0x435b18[_0x50ee6(0x401)](_0x2dbe9f,_0x50ee6(0x37e))['trim'](),_0x232b69=_0x2753bf[_0x50ee6(0x41c)](_0x465920);if(_0x232b69===_0x50ee6(0x281)){await _0x387f01(_0x465920,_0x428440);return;}await _0x5f2fff(_0x2dbe9f,_0x428440);return;}catch(_0x3ffa37){console[_0x50ee6(0x1f6)]('[okdb]\x20error:\x20failed\x20to\x20read\x20'+_0x2dbe9f+':\x20'+_0x3ffa37[_0x50ee6(0x356)]),process[_0x50ee6(0x3be)](0x1);}switch(_0x2daefc){case'blob':await _0x5f2fff(_0x2dbe9f,_0x428440);break;case _0x50ee6(0x281):await _0x387f01(_0x2dbe9f,_0x428440);break;case'uuid':await _0x93e565(_0x2dbe9f,_0x428440);break;default:console[_0x50ee6(0x1f6)](_0x50ee6(0x216)+_0x2dbe9f+'\x22'),console[_0x50ee6(0x1f6)](''),console['error'](_0x50ee6(0x1a9)),console['error'](_0x50ee6(0x341)),console[_0x50ee6(0x1f6)]('\x20\x20\x20\x20•\x20an\x20activation\x20token\x20\x20(124\x20chars)'),console[_0x50ee6(0x1f6)]('\x20\x20\x20\x20•\x20a\x20license\x20id\x20\x20\x20\x20\x20(uuid)'),console[_0x50ee6(0x1f6)](_0x50ee6(0x296)),console[_0x50ee6(0x1f6)](''),console[_0x50ee6(0x1f6)]('\x20\x20Usage:\x20okdb\x20license\x20[<blob|path|uuid|activation-token>]'),process[_0x50ee6(0x3be)](0x1);}}}return;}switch(_0x1852ac){case'doctor':await _0x2c8cb8(_0x2d4e9c);break;case _0x50ee6(0x428):await _0x5b2fba();break;case'reset':await _0x3a0fd2(_0x2d4e9c);break;case _0x50ee6(0x28d):await _0xb79b04(_0x18816e??_0x3efdde[_0x50ee6(0x41d)](_0x50ee6(0x217)),_0x2d4e9c);break;case _0x50ee6(0x20d):await _0x18303d(_0x18816e??_0x3efdde['resolve'](_0x50ee6(0x19c)),_0x2d4e9c,_0x26486b);break;case _0x50ee6(0x27b):await _0x417ef9(_0x18816e??_0x3efdde[_0x50ee6(0x41d)](_0x50ee6(0x19c)),_0x2d4e9c,_0x26486b);break;case'join':await _0x1f5de3(_0x18816e,_0x2d4e9c,_0x26486b);break;}})()['then'](()=>process[_0x12f1ea(0x3be)](0x0))[_0x12f1ea(0x317)](_0x4c7ccc=>{const _0x2fc6d1=_0x12f1ea;console[_0x2fc6d1(0x1f6)](_0x2fc6d1(0x176)+(_0x4c7ccc[_0x2fc6d1(0x356)]||_0x4c7ccc)+'\x0a'),process['exit'](0x1);});}else _0x524fce()[_0x12f1ea(0x317)](_0xde50fb=>{const _0x2c5b0d=_0x12f1ea;console['error']('\x0a[okdb]\x20fatal\x20error:'),console[_0x2c5b0d(0x1f6)](_0xde50fb['stack']||_0xde50fb),process[_0x2c5b0d(0x3be)](0x1);});}return okdb$1;}var okdbExports=requireOkdb(),okdb=getDefaultExportFromCjs(okdbExports);module[_0x422f41(0x36f)]=okdb;
2
+ 'use strict';const _0x4b361c=_0x2368;(function(_0x1f184f,_0x618959){const _0x15427f=_0x2368,_0x273e40=_0x1f184f();while(!![]){try{const _0x361008=parseInt(_0x15427f(0x158))/0x1+parseInt(_0x15427f(0x100))/0x2+parseInt(_0x15427f(0x534))/0x3+-parseInt(_0x15427f(0x223))/0x4*(parseInt(_0x15427f(0x434))/0x5)+parseInt(_0x15427f(0x38d))/0x6*(parseInt(_0x15427f(0x48c))/0x7)+-parseInt(_0x15427f(0x4e3))/0x8+-parseInt(_0x15427f(0x30c))/0x9*(parseInt(_0x15427f(0x22c))/0xa);if(_0x361008===_0x618959)break;else _0x273e40['push'](_0x273e40['shift']());}catch(_0x43c3d3){_0x273e40['push'](_0x273e40['shift']());}}}(_0x5b4d,0x387ab));var require$$1=require(_0x4b361c(0x42d)),require$$1$1=require('fs'),require$$0=require('os'),require$$4$1=require(_0x4b361c(0x636)),require$$5=require('../okdb'),require$$0$2=require('readline'),require$$2=require(_0x4b361c(0x35e)),require$$0$1=require('node:crypto'),require$$4=require(_0x4b361c(0x442)),require$$1$2=require(_0x4b361c(0xfe)),require$$0$3=require(_0x4b361c(0x42a)),require$$0$4=require(_0x4b361c(0x328)),require$$0$5=require(_0x4b361c(0x5d0)),require$$1$3=require(_0x4b361c(0x19b)),require$$2$1=require(_0x4b361c(0x2c4)),require$$8=require(_0x4b361c(0x25a)),commonjsGlobal=typeof globalThis!==_0x4b361c(0x1eb)?globalThis:typeof window!=='undefined'?window:typeof global!==_0x4b361c(0x1eb)?global:typeof self!==_0x4b361c(0x1eb)?self:{};function getDefaultExportFromCjs(_0x41eff4){const _0x279468=_0x4b361c;return _0x41eff4&&_0x41eff4['__esModule']&&Object['prototype'][_0x279468(0x51a)]['call'](_0x41eff4,'default')?_0x41eff4['default']:_0x41eff4;}function _0x5b4d(){const _0x21cdbc=['map','ceil','--env\x20<name>','dest','Gate\x20flag\x20required\x20to\x20touch\x20system\x20types\x20(those\x20whose\x20name\x20starts\x20with\x20\x22~\x22).\x20Combined\x20with\x20the\x20underlying\x20namespace\x20permission.','\x1b[35m','putNode','primary','\x20\x20+','\x20\x20\x20\x20license:\x20free\x20tier\x20—\x20add\x20a\x20license\x20to\x20unlock\x20sync,\x20embeddings,\x20engines,\x20time-machine','maxMs','isWorker','Route\x20','code','api','issueToken','\x20\x20✓\x20http\x20listening\x20on\x20:','forEach','Cannot\x20set\x20enforce\x20schema\x20on\x20','push','sync:apply','use\x20<env>','\x20\x20\x20\x20•\x20a\x20path\x20to\x20a\x20.license\x20file','_seen','type:drop','SIGTERM','⚠\x20INTERNAL\x20LICENSE\x20ACTIVE\x20—\x20all\x20features\x20and\x20limits\x20are\x20unlocked.\x20For\x20vendor/internal\x20use\x20only.','stdin','add','rowKey','/admin/index.html','toLocaleString','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','fts:drop','_cookieName','values','verifyCookie','status','\x20\x20Build:\x20\x20\x20key\x20fingerprint\x20','\x0a[okdb]\x20error:\x20','Search','validateRouteInput','INDEX_READY','end','Forbidden\x20—\x20no\x20permissions\x20available','maxBodyBytes','authorizationUrl','removeNode','open\x20','typeSubDbs','okdb-http-worker-child.js','import','SIGINT\x20(double-tap)','net','\x20\x20·\x20\x20','processKey','assertFeature','\x20\x20\x20\x20\x20\x20\x20',';\x20shmbuf\x20native\x20missing\x20→\x20forced\x20single-process','expiresAt','importFromFile','mode','No\x20license\x20found\x20matching\x20this\x20activation\x20token','OKDBSchemaValidationError','caps','rawResponse','Activation\x20invalid:\x20','(worst\x20','\x0d[okdb]\x20blobs:\x20','_validateOperationRequest','field','_listenAddr','attach','Invalid\x20activation\x20token:\x20','\x20\x20Or\x20set\x20sync.address\x20in\x20.kdbconfig','dbPath','_nodeDbFor','\x20\x20\x20\x20limits:\x20\x20\x20\x20','INTERNAL_ERROR','List\x20types,\x20get\x20type\x20schema,\x20list\x20registered\x20indexes.','querySchema','\x20active\x20env:\x20','_log','valid','licenseHash','outputSchema','result','resetting','_buckets','[okdb]\x20port\x20','cookies','getClock','startHeartbeat','getAuthOptions','HTTP\x20server\x20already\x20running','userAdded','okdb.pid','cookieName','type/users/item/alice\x20--env\x20staging','meta','identity','isBuffer','asyncProcessors','req','changes','--types','Type\x20\x27','event','FOREIGN_KEY_DELETE_RESTRICTED','Run','_report','License\x20expired\x20or\x20invalidated','resetFts','View\x20peer\x20status\x20and\x20replication\x20stats.','noAdmin','JWT\x20is\x20missing\x20kid','\x0a\x20\x20','txn:start','.okdb-write-test','last-event-id','[okdb]\x20exporting\x20env\x20\x22','OIDC\x20discovery\x20missing\x20jwks_uri',')\x20to\x20your\x20license\x20vendor.','matcher','isInteger','allowMethods','inputSchema','pathname','\x20binding\x20references\x20missing\x20input\x20field:\x20','\x20has\x20ambiguous\x20binding\x20for\x20query\x20field:\x20','\x20\x20(press\x20Ctrl+C\x20again\x20to\x20exit)\x0a','CHANGEFEED_QUANTUM','[okdb]\x20shutdown\x20drain\x20exceeded\x203000ms\x20—\x20hard-exiting\x0a','readFileSync','listenAddr','_licenseHash','ESRCH','rmSync','envs','_computeStatus','\x20\x20\x20\x20•\x20a\x20license\x20id\x20\x20\x20\x20\x20(uuid)','Foreign\x20key\x20violation:\x20','\x20/\x20','tierList','[okdb]\x20backup\x20complete','[okdb]\x20close\x20error:\x20','running','Invalid\x20license\x20blob:\x20','isDead','[okdb]\x20reset\x20aborted','search:query','\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','\x20records','sizeBefore','instanceId','exp','cluster','\x20\x20Expected\x20one\x20of:','368122BGFdOR','bus:poke','--workers','Register,\x20update,\x20and\x20delete\x20function\x20definitions.','http.workers','verifyActivation','__OKDB_PUB_FINGERPRINT__','authorization_endpoint','details','transport','closures\x20in\x20THIS\x20process\x20—\x20forked\x20workers\x20cannot\x20serve\x20them\x20(cluster\x20distributes\x20','kid','readUInt32BE','\x0a[okdb]\x20fatal\x20error:','PUB_FINGERPRINT','cause','Validation\x20failed:\x20','cf-ray','username','Bearer\x20$1…','Run\x20searches\x20against\x20registered\x20FTS\x20and\x20vector\x20indexes.','concat','Validation\x20failed','_dedupeKey','\x20\x20✓\x20','available','processingStatusView','—\x20/api/\x20is\x20auto-prefixed,\x20env\x20is\x20auto-injected','[env]','Index\x20\x27','issuer','role','fieldPath','_maybePublish','Content-Type','active:','handler','[okdb]\x20imported\x20\x20types=','_flushDebounce','SYSTEM_POKE','Records\x20inside\x20your\x20types\x20—\x20the\x20actual\x20rows\x20you\x20store.','\x20\x20(','hostname','[okdb]\x20invalid\x20port:\x20','OKDBAlreadyExistsError','\x20\x20⚠','stopHeartbeat','reap','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','__okdbCluster','_getJwkKey','ACTIVATION_EXPIRED','uuid','cpuPct',',\x20got\x20','\x20<path>\x20[json-body]','min','\x20\x20✓\x20Revoked\x20token\x20','_supervisorKey','raw','Schema\x20&\x20Indexes',',\x20stopping\x20workers…\x0a','\x20documents\x20fail\x20validation','_getOidcDiscovery','LOGS','(code=','\x1b[90m','socket','_admissionTimer','gray','expiry','.\x20The\x20active\x20license\x20does\x20not\x20enable\x20\x22','protected:write','[okdb]\x20shmbuf\x20native\x20binding\x20unavailable\x20—\x20multi-process\x20clustering\x20is\x20unsafe\x20','\x20\x20[okdb]\x20','integer','force','dropIndex','ENVS','OKDBNotFoundError','files','_buildProcessingFacet','pause','content-type','Hint:\x20','NOT_FOUND','dropFts','startedAt','459169bAzJeC',':\x20ping\x0a\x0a','createInterface','val','connected','(primary\x20=\x20processor)','\x20more)','_onItem','--label','types','_removeRowAsync','Background\x20job\x20queue:\x20enqueue\x20work,\x20observe\x20state,\x20and\x20process\x20jobs.','waiting','_totalWrites','fill','destroy','_startAdmission','\x22.\x20Use:\x20create,\x20list,\x20revoke','now','\x20\x20✓\x20Removed\x20license\x20','\x0a\x20\x20✓\x20License\x20activated','[okdb]\x20invalid\x20log\x20level:\x20\x22','getCount','stderr','verify','every','Records','ID\x20token\x20is\x20not\x20accepted','key','\x20licenses','readUInt8','Files','maxWrites','token_use','--eval','_activateProcesses','number','_handleInProcess','\x27\x20on\x20type\x20\x27','Data','\x0a[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\x20\x20\x20\x20show\x20active\x20environment\x20+\x20list\x20all\x20envs\x0a\x20\x20','middlewares','\x0a\x20\x20✓\x20Token\x20created','LENGTH_REQUIRED','\x1b[33m','\x20file','_dispatch','\x20references\x20','config\x20http.workers','\x20has\x20illegal\x20binding\x20target\x20for\x20','_threadStats','ephemeral','open','createPublicKey','_systemEnv','none','\x22\x20on\x20\x22','\x20\x20[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a','payload','workersFlag','ftsName','_rotateBucket','Token\x20must\x20be\x20a\x20JWT','signCookie','current','\x20\x20\x20\x20-\x20The\x20license\x20blob\x20has\x20not\x20been\x20added\x20yet\x20—\x20run\x20`okdb\x20license\x20<blob>`\x20first.','https','license:invalid','fetch','change','runtimeProcessesView','killable','worker','state','Unique\x20constraint\x20violated\x20on\x20','hint','.\x20Only\x20primitives,\x20null,\x20Buffers,\x20and\x20arrays\x20are\x20allowed.\x20Got:\x20','\x20\x20\x20\x20features:\x20\x20','policy','\x20does\x20not\x20exist','[okdb-cluster]\x20worker\x20pid=','responseStatuses','xdg-open\x20','idx:','http://localhost:','\x20\x20\x20\x20\x20control\x20log\x20verbosity\x0a\x20\x20','\x20worker(s)\x20still\x20serving','_drain','remove','Machine-to-machine\x20cluster\x20protocol\x20(join\x20handshake,\x20replication\x20channel,\x20traffic).\x20Grant\x20only\x20to\x20peer\x20nodes\x20—\x20not\x20to\x20humans.','exports','ieee-p1363','\x20\x20\x20\x203.\x20Run:\x20\x20okdb\x20license\x20<activation-token>','Sync','\x20which\x20does\x20not\x20exist','JWT\x20signature\x20verification\x20failed','[okdb]\x20reset:\x20','_started','host','dim','\x20\x20Next\x20step\x20—\x20activate\x20the\x20license:','/api/env/','\x20cf-ray=','setSchema','cookie','reset','bumpCmd','base64url','\x20\x20Tier:\x20\x20\x20\x20','filter','other','\x20\x20\x20\x202.\x20The\x20vendor\x20returns\x20an\x20activation\x20token.','\x1b[32m','license:activated','[okdb]\x20opening\x20','\x20\x20Error:\x20','_role','\x0a\x20\x20okdb\x20doctor\x0a','[okdb]\x20created\x20.kdbconfig','~processes:desired','_lastPublishAt','_bucketIdx','bootstrapBlocked','protected:read','\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','_desired','REMOVE','blob','issuedAt','(none)','\x20\x20·\x20','syncPeers','\x20\x20Some\x20checks\x20failed.\x0a','decodeLicenseBlob:\x20failed\x20to\x20decode\x20payload:\x20','round','decommission',']\x20already\x20maps\x20to\x20\x27','auth=','_dedupeMax','default','--version','_ensureTokensType','_license','[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22','cluster:','processes:\x20','undefined','--no-admin','response','./okdb-data','authenticateToken','lifecycle','\x20\x20score:','getSecurityNotices','stack','Events','threads','[okdb]\x20blobs:\x20imported=','decommissioning','~processes','cyan','OKDBIndexHasConsumersError','cors','context','question','--path','audience','destroyed','_ensureDesired','typesPerEnv',':\x20key\x20[','txn:rollback','_authOptions','data','unlinkSync','\x20\x20(licenses\x20must\x20be\x20signed\x20by\x20the\x20matching\x20private\x20key)','time','\x20fetching\x20','Examples','processor:retry','\x20env','object','bus:type_drop','\x20\x20\x20\x20\x20\x20\x20\x20\x20browse\x20API\x20routes,\x20grouped\x20by\x20area\x0a\x20\x20','_selfKey','x5c','confirm','_kind','[okdb-cluster]\x20slot=',')\x20exited\x20','_runMiddlewares','\x20records…','must\x20be\x20','\x20envs','effective','/([^/]+)','getDesired','\x27:\x20','Access-Control-Request-Headers','\x20HTTP\x20workers,\x20primary\x20=\x20processor)','HELP','detachConsole','1605252XRNNIR','fts:','\x22\x20→\x20','transactionSync','OKDBInvalidPrimaryKeyError','--inspect','\x20\x20\x20\x20status:\x20\x20\x20\x20active\x20\x20(open\x20license\x20—\x20no\x20activation\x20needed)','process','green','2894290UaHMJH','active','requests','processor:error','loop-lag\x20','--key','timeMachine','[req]\x20','ITEM_UPDATE','flatMap','grants','STATUS','engines','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','getPins','decodeActivationToken:\x20expected\x2077\x20bytes,\x20got\x20','License\x20limit\x20exceeded:\x20','[okdb]\x20http\x20workers:\x20','remaining-fields','_enforceOperationAccess','envs=','close','\x1b[34m','_caps','_scheduleFlush','License\x20signature\x20invalid:\x20','\x20day(s).','system:type_drop','../okdb','guard','\x20\x20(need\x20≥\x2018)','%),\x20','history','padStart','\x20to\x20browse\x20the\x20API,\x20','_clusterWorkerAttached','\x20\x20\x20\x20\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/','update','setDesired','/api','internalOnly','catch','_lastCpuUsage','level:\x20info','prototype','Origin','stream','list','hasDesired','register','__writeCounter','\x20\x20Flags','all','toString','cursorKey','BOOTSTRAP_LOCALHOST_ONLY','\x20(must\x20be\x201–65535)','INDEX_RESET','[okdb]\x20warning:\x20failed\x20to\x20restore\x20identity/licenses\x20after\x20reset:\x20','safety','system','kill','free\x20tier','function','enabled','features','The\x20following\x20routes\x20require\x20auth\x20but\x20declare\x20no\x20permission:\x0a\x20\x20','port','send','is\x20invalid','_validateOidcAccessToken','[okdb]\x20error:\x20--password\x20requires\x20--name','pipe','Feature\x20not\x20available\x20on\x20free\x20tier:\x20','text/event-stream;\x20charset=utf-8','_startedAt','_adminRelay','parseInt','starting','statusCode','\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20','[okdb]\x20error:\x20join\x20requires\x20a\x20remote\x20address.\x20Usage:\x20okdb\x20join\x20<address>\x20--token\x20<t>','warn','admin','Create,\x20delete,\x20and\x20compact\x20environments.','[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a','\x20\x20skipped=',';\x20SameSite=','\x20deleted','assertLimit','\x20cf-ip=','writes=','form\x20listen(port,\x20{\x20workers,\x20makeOkdb\x20})\x20and\x20register\x20the\x20routes\x20inside\x20makeOkdb,\x20','noCluster','queue/','copy','some','keep-alive','Invalid\x20token','_isReader','argv','createHash','once','ITEM_CREATE','level','\x27,\x20cannot\x20map\x20to\x20\x27','Functions','--print','dropType','decodeLicenseBlob:\x20blob\x20too\x20short\x20(','find','decodeActivationToken:\x20input\x20must\x20be\x20a\x20string','message','resume','OKDB_HTTP_WORKERS','access:\x20','listening','EXPIRES','ES256','Peer','timingSafeEqual','writes','_sampleOwnStats','createServer','supervisorKey','respawnTimer','options','\x20\x20✓\x20OKDB\x20server\x20running','Queue','LICENSE_TYPE_OPEN','fast','consumeLoginState','.kdb_history','is\x20required','[okdb]\x20error:\x20unrecognized\x20input:\x20\x22','\x20(expires\x20in\x20','DELETE','scrypt','[okdb]\x20error:\x20--grants\x20must\x20be\x20valid\x20JSON\x20object','UNAUTHORIZED','config','INDEX_REGISTERED','writeMs','jwk','openDB','noRepl','created','_statusEnv','x-forwarded-for','QUIT','set','publishChildRow','url','_active','[okdb]\x20import\x20complete','tags:\x20','EADDRINUSE','padEnd','use','unique:violation_resolved','name','node\x20','pushEphemeral','mkdirSync','Server\x20is\x20in\x20bootstrap\x20mode\x20and\x20only\x20accepts\x20localhost\x20connections\x20until\x20the\x20first\x20token\x20is\x20created.','\x20\x20changes=','--address','okdb','maxAge','_pending','export','\x20origin=','_normalizeOAuthAuthResult','shutdown','FORBIDDEN','authMode','Work','registry-publish','mcp-session-id','_lookupByName','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20','cpuUsage','help','platform','writeUInt8','bodyMode','SCHEMA_COLLECTION_INVALID','UNPROCESSABLE_ENTITY','null','stop','version','length','examples','JWT\x20audience\x20mismatch','Invalid\x20primary\x20key\x20type:\x20','index:drop','listNodes','keys','makeOkdb','configureAuth','ms/','header','Types','inst:','processing','_nodeDbCache','\x20(expires\x20','trimStart','expired','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20has\x20expired\x20—\x20request\x20a\x20fresh\x20one.','No\x20tokens.','\x20\x20→\x20\x20','--no-cluster','_timer',':\x20connected\x0a\x0a','reportThreadStats','array','{}[]:,\x0a\x0d\x09\x20','\x22\x20is\x20used\x20by:\x20','\x20\x20✗','May\x20write\x20system\x20types\x20when\x20also\x20granted\x20the\x20underlying\x20write\x20permission.','\x20worker\x20slot=','invalid','randomBytes','9WpKnuJ','test','port\x20','sort','build','http-server','shmbuf.node','addLicense','\x0a\x0a\x20\x20','hard-killed','\x20has\x20invalid\x20http.bodyMode:\x20','_isClusterController','signature','summary','__okdbSlot','error','\x0a\x20\x20[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a','_okdb','OKDBIndexAlreadyRegisteredError','listen','offWindow','\x20\x20records=','--port','_rootDb','endsWith','noteListenAddr','unknown','setTtl','node:events','backup','read','mcp','\x20MB\x20→\x20','sync','ingest','listen({\x20workers\x20>\x201\x20})\x20without\x20makeOkdb\x20requires\x20an\x20OPEN\x20okdb\x20—\x20call\x20after\x20open()\x20','roles','children','email','allowHeaders','SERVICE_UNAVAILABLE','origins','JWT\x20issuer\x20mismatch','\x1b[0m','revoke','decommissioned','./okdb-export.ndjson','sha256','listRoutes',',\x20closing…\x0a','okdb_session_',';\x20Path=','\x20days\x20—\x20POC/demo\x20only,\x20not\x20node-bound)','floor','treeView','ppid','Unknown\x20error','\x20\x20\x20\x20status:\x20\x20\x20\x20','OPTIONS',');\x20','jwks_uri','[okdb]\x20unknown\x20token\x20action:\x20\x22','der','server','digest','\x20user-registered\x20route(s)\x20are\x20','_processingPolicy','parse','hidden','\x0d[okdb]\x20','maxExtra','Either\x20the\x20build\x20was\x20made\x20with\x20a\x20different\x20keypair,\x20or\x20the\x20license\x20was\x20issued\x20with\x20a\x20different\x20private\x20key.','licensed','bus:proc','HTTP\x20','\x20\x20\x20\x20port:\x20\x20','decodeLicenseBlob','token','_lastCpuWindowMs','(null)','\x22\x20to\x20enable\x20it.','access','crypto','token_endpoint','record','ENV','equals','\x20opening\x20','\x20\x20\x20\x20licensee:\x20\x20','utf8','Execute\x20full-text\x20and\x20vector\x20searches.','LICENSE_FEATURE_DISABLED','Lax','license:removed','PIN','setHeader','_processStartedAt','from','SYSTEM_STOPPED','fts:reset','[okdb]\x20export\x20complete','\x20\x20⚠\x20\x20','targetType','[res]\x20','\x20bytes,\x20need\x20>=\x2065)','createdAt','_isWriter','activation','quit','INDEX_ALREADY_REGISTERED','rss','payload-or-self','split','auth','shmbufNative','TYPES','string','https:','txn:end','shmbuf/package.json','index:progress','[okdb]\x20error:\x20--address\x20is\x20required\x20for\x20join\x20(this\x20node\x27s\x20reachable\x20sync\x20address).\x0a','unref','\x20\x20\x20\x20admin:\x20\x20\x20http://localhost:','_hbTimer','isConnected','clusterStatusView','replace','false','1708872oigNhQ','Payload\x20too\x20large','or\x20serve\x20single-process.','Index\x20\x22','getRange','value','http://','system:drain','stopping','INVALID_INDEX_KEY','decoded','listen({\x20workers:\x20','bus:drain','RSA-SHA256','isFeatureEnabled','_fetchJwks','[okdb]\x20error:\x20token\x20with\x20name\x20\x22','\x20writes\x20(','has','Release','ms\x20p99=','system:stopped','removeSync','join','ITEM_REMOVE','~licenses',';\x20Expires=','enable','pending','get','METHOD_NOT_ALLOWED','\x20\x20\x20\x20permissions:\x20','single','\x20\x20(name:\x20','_flushTimer','PUBLIC_KEY_PEM','/api/','reload','cli','allocUnsafe','/type/users\x0a\x20\x20\x20\x20','HTTP_','(?:/(.*))?$','Internal\x20error','ms\x20max=','randomUUID','LICENSED_BUILD','received\x20','Views','_rowKey','_wrapApiResponse','/.well-known/openid-configuration','workersConfigured','\x20logs\x20on\x20\x20','?\x0a\x20\x20(node\x20identity\x20and\x20licenses\x20are\x20preserved)\x0a\x20\x20Type\x20\x22yes\x22\x20to\x20confirm:\x20','--env','query','\x20cannot\x20be\x20MCP-exposed\x20without\x20an\x20explicit\x20adapter\x20because\x20it\x20uses\x20','_nodeDb','_jwksNegativeCache','getCmd','CONFLICT','logRequests','startsWith','\x20to\x20quit.','clearLine','\x20\x20\x20\x20','_matchRoute','Unknown\x20JWKS\x20kid:\x20','env/','List\x20environments\x20and\x20read\x20environment\x20info.','exposeHeaders','operation','--password','info','ms\x20(attempt\x20','stringify','\x0a\x20\x20Delete\x20ALL\x20data\x20in\x20','_clusterOnMessage','msg','must\x20not\x20be\x20null','stats','slot','[okdb]\x20primary\x20okdb\x20close\x20error:\x20','\x20querySchema\x20references\x20missing\x20input\x20field:\x20','halted','\x20\x20║','Materialized\x20views:\x20query\x20definitions\x20that\x20are\x20continuously\x20maintained\x20and\x20queryable.','fromEntries','_buildOwnRow','pid','--token','embedded','size','LICENSE_INVALID','\x20\x20Writes:\x20\x20','--watch','<path>','ref:violation','Forbidden','toLowerCase','prompt','permissions','groups','\x20\x20\x20\x20api:\x20\x20\x20\x20\x20http://localhost:','\x20\x20\x20\x20\x20\x20\x20\x20\x20OKDB\x20SHELL\x20\x20\x20\x20\x20\x20\x20\x20','epoch','OKDBInvalidValueError','\x0a\x20\x20Usage:\x20use\x20<env-name>\x0a','node','\x20\x20after\x20sync.\x20Duplicate\x20names\x20will\x20surface\x20as\x20ambiguous\x20logins\x20to\x20clean\x20up.','LICENSEE','<json-body>','\x0a\x20\x20Joining\x20cluster\x20at\x20','\x20times\x20in\x20','licenseType','hasCanonical','memoryUsage','List\x20jobs,\x20view\x20stats,\x20list\x20buckets.','closeIdleConnections','win32','(unset)','node/','debug','content-length','data:read','\x20+\x20','--no-repl','_onTick','./okdb-backup','getProcess','\x20\x20╔═══════════════════════════╗','[okdb]\x20error:\x20license\x20management\x20is\x20only\x20available\x20in\x20licensed\x20builds\x20(npm\x20run\x20build:prod).','route','description','reverse','view:progress','cf-connecting-ip','--log-level','Environment\x20lifecycle.\x20Listing\x20and\x20creating\x20envs\x20is\x20system-level.','next','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20','pin','\x20\x20✓\x20OKDB\x20cluster\x20running','registerIndex','Read','lastClock','\x20\x20\x20\x20writes:\x20\x20\x20\x20','\x20—\x20type\x20env\x20to\x20list\x20available\x0a','homedir','_publishNow','origin','SYSTEM_PROC','\x20\x20\x20\x20status:\x20\x20\x20\x20active','entries','registerType','Token\x20secret\x20not\x20configured','node:perf_hooks','indexOf','bind','path','claims','put','\x0a\x20\x20No\x20routes\x20matching\x20\x22','hasType','~processes:cmd','item:remove','5kkolJy','isSystem','targetKey','isSetupMode','registerFts','hex','body.','gate','readMs','\x22\x20already\x20exists','dirname','_totalWriteMs','\x20MB)','operations','child_process','\x20\x20(licensee:\x20','errors','SIG_INVALID','View\x20server\x20info,\x20logs,\x20SSE\x20event\x20streams,\x20processor\x20status,\x20backup\x20list.','_getType','properties','(no\x20types)','_putRowAsync','--help','index:ready','[okdb]\x20started\x20in\x20','[okdb]\x20importing\x20','start\x20','fts:registered','assign','statuses','\x20\x20Usage:\x20logs\x20[on|off|debug|info|warn|error]','\x20\x20\x20\x20\x20\x20\x20POST\x20(body\x20implies\x20POST)\x0a\x20\x20','boolean','call','ttl:expired','fts','NOT_IMPLEMENTED','ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20','nbf','license:added','logLevel','slice','[okdb-cluster]\x20primary\x20pid=',',\x20signal=','writeUInt32BE','RS256','--username','emit','INDEX_PROGRESS','system:clock_change','access-control-allow-credentials','Cluster\x20replication.\x20The\x20\x22peer\x22\x20op\x20is\x20for\x20cluster\x20nodes,\x20not\x20human\x20users.','wrong_node','POST','default:\x20cores−1\x20=\x20','discoveryTtlMs','\x20\x20\x20\x20addedAt:\x20\x20\x20','env','password','\x0a\x20\x20License\x20details:','~tokens','nodeKey','repeat','Full-text\x20search','_windowCbs','_oidcDiscoveryCache','_cmd','exportToFile','clear','cpuWindowMs','FTS_DROP','processors','okdb_session','max','address','note','building','_runGuards','queue-worker','OKDBTypeNotRegisteredError','\x20\x20╚═══════════════════════════╝','trim','Pause/resume\x20processor,\x20trigger\x20backups,\x20restore.','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','jwksUri','INDEX_HAS_CONSUMERS',';\x20Secure','7zLtcuR','PUT','no\x20.kdbconfig\x20(using\x20defaults)','isPrimary','keys/public.pem','_sockets','cluster:\x20ready\x20(','removeSupervisedChild','authorization','create','\x20log\x20level:\x20','\x20\x20\x20\x20status:\x20\x20\x20\x20pending\x20activation','doctor','audiences','readUInt16BE','type','_groupByProcess','_onPoke','writeUInt16BE','config\x20file\x20valid:\x20','external','resolve','Register,\x20configure,\x20and\x20remove\x20cluster\x20peers.','bindings','dead','Invalid\x20index\x20key\x20type\x20for\x20\x27','[okdb]\x20error:\x20show\x20requires\x20an\x20id\x20argument','ttl','toFixed','createEnvironment','[okdb]\x20cluster\x20close\x20error:\x20','loop-lag','online','primaryOkdb','write','slotKey','\x20\x20Common\x20causes:','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20GET\x20(implicit)\x0a\x20\x20','processorsView','\x0a\x20\x20Raw\x20token\x20(shown\x20once,\x20save\x20it\x20now):\x0a','clearTtl','Schema\x20validation\x20failed\x20for\x20','[okdb]\x20error:\x20','dynamic','tags','\x20type','_instanceId','reason','\x20\x20\x20\x20\x20explicit\x20method\x0a\x0a\x20\x20','(workers\x20can\x27t\x20share\x20the\x20cross-process\x20HLC/clock).\x20Forcing\x20single-process\x20(was\x20','OKDBForeignKeyError','type/','\x20already\x20in\x20use','closeAllConnections','_userPhase','listen({\x20workers\x20}):\x20okdb\x20options\x20are\x20not\x20serializable\x20for\x20workers:\x20','tokenTtl','metrics',';\x20HttpOnly','exec','toISOString','processor:resumed','PATCH','_jwksCache','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20','\x20\x20[okdb]\x20closed\x20cleanly\x0a','\x20\x20✓\x20joined\x20and\x20reconciliation\x20initiated','no-cache,\x20no-transform','uptime','params.','\x20already\x20exists','Environments','_loginStates','HTTP_WORKERS_REQUIRE_PORTABLE_ROUTES','kind','category','heapTotal','1ofN:','[okdb]\x20preserved:\x20','_nodeDead',',\x20label:\x20','logs','event:\x20','red','env:removed','Unauthorized','\x20\x20\x20\x20usage:\x20\x20\x20','1714312NHahpF','[okdb]\x20error:\x20join\x20requires\x20credentials.\x20Provide\x20--token\x20<t>\x20or\x20--username\x20<u>\x20--password\x20<p>','events','charCodeAt','searchParams','\x20\x20(unlimited)','isFile','TOO_MANY_REQUESTS','../','passive\x20HTTP\x20worker(s)\x20serving\x20:','_quantum','_buildChildRow','OKDB_HTTP_WORKERS\x20env','credentials','\x0a\x20\x20Joined.\x20Remote\x20tokens\x20replicated.\x20You\x20can\x20now\x20log\x20in\x20with\x20cluster\x20credentials.\x0a','fn-runner','handle','\x20worker(s)\x20remaining','base64','types/env=','log','scope','_children','\x20\x20\x20\x20port:\x20\x20\x20\x20','\x20\x20Usage:\x20okdb\x20license\x20[<blob|path|uuid|activation-token>]','(?:','user','alloc','sig','\x22\x20matches\x20','addSupervisedChild','type:registered','Get\x20and\x20list\x20records,\x20run\x20byIndex\x20queries.','\x20supervised)','[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22','blobs','search','label','application/json','\x20forked\x20','processor:paused','List\x20tokens\x20and\x20users.','\x27\x20doesn\x27t\x20exist','Enqueue,\x20cancel,\x20retry,\x20remove\x20jobs;\x20manage\x20buckets;\x20reconcile\x20and\x20rebuild\x20stats.','consecutiveFailures','then','access-control-max-age','\x20\x20\x20\x20graceful\x20shutdown\x0a','ms\x20busy=','\x20\x20@','known\x20field','_totalReadMs','set-cookie','getHeader','guards','hasOwnProperty','rawBuf','BAD_GATEWAY','_totalRequests','VERB','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20override\x20active\x20environment\x20for\x20this\x20call\x0a\x20\x20','records','authenticateRequest','tokenType','standard','forceAfterMs','Write','\x20(slot=','method','SCHEMA_VALIDATION_FAILED','LICENSE_ACTIVATION_INVALID','_totalErrors','isTTY','clusterWorkers','\x20more','_shouldWrapResponse','terminal','cluster-wide','\x20\x20\x20\x20path:\x20\x20\x20\x20','processes','Not\x20Found','624984LXJmsZ','attachFeed','[okdb]\x20exported\x20\x20types=','cpus','pathParams','\x20\x20Envs:\x20\x20\x20\x20','standalone','SIGINT','isAuthenticated','kdb_admin_csrf','\x20\x20\x20\x201.\x20Send\x20the\x20PIN\x20above\x20(','--permissions','white','activateLicense','exit','ms\x0a','\x20for\x20system\x20env','start','limits','parseBearer','x-requested-with','Unsupported\x20JWT\x20alg:\x20','sse','processors/','reads','disconnect','_onProcEvent','_lastCpuPct','LICENSE_HASH_MISMATCH','__identity','[okdb]\x20created\x20./okdb-data','formatCookie','\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','GATEWAY_TIMEOUT','\x20(id:\x20','EXIT','darwin','stdout','sync-node','onLicenseExpired','connection','deaths','cluster:\x20unavailable\x20(shmbuf\x20native\x20missing)\x20—\x20running\x20single-process','views','\x20\x20Usage:\x20','_cursors','[okdb]\x20failed\x20to\x20parse\x20config\x20file\x20','body:\x20','/types\x0a\x20\x20\x20\x20','_activateProcessesReader','--blobs','internal','License\x20signature\x20invalid\x20—\x20this\x20license\x20was\x20not\x20signed\x20by\x20the\x20key\x20paired\x20with\x20this\x20build.\x20','System','execArgv','mean','licensee',':\x20expected\x20','\x20\x20[','additionalProperties','Admin','\x20\x20\x20\x20expires:\x20\x20\x20','processor:progress','passive','FTS_REGISTERED','alg','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20','yellow','index:reset','isArray','licenseId','_totalReads','[okdb]\x20starting…\x0a','0123456789ABCDEFGHJKMNPQRSTVWXYZ','\x0a[okdb]\x20received\x20','sub','\x20\x20Usage:','publishOwnRow','clearCookie','List,\x20download,\x20and\x20inspect\x20file\x20metadata.','ttl:set','connections\x20blindly;\x20a\x20worker\x20lacking\x20the\x20route\x20404s).\x20Either\x20use\x20the\x20cooperative\x20','127.0.0.1','\x20environment\x20','\x20\x20Note:\x20this\x20node\x20has\x20existing\x20tokens.\x20They\x20will\x20coexist\x20with\x20cluster\x20tokens\x0a','id:\x20','Server-side\x20user-defined\x20functions\x20registered\x20per\x20environment.','\x20\x20Path\x20access','license','List\x20views,\x20query\x20view\x20output,\x20inspect\x20metadata\x20and\x20definition.','--grants','GET','ttl:clear','embeddings','licenses','index','HEAD','\x20not\x20found','resetIndex','failures','permission','_lastTick','byteLength','allowedAlgs','\x20\x20\x20\x20license:\x20','writeFileSync','columns','_isOpen','magenta','setOwnMeta','\x20│\x20','[okdb]\x20nothing\x20to\x20reset\x20—\x20','USE','Upload,\x20update\x20metadata,\x20and\x20delete\x20files.','\x20license(s)','_draining','_userRouteCount','.kdbconfig','[okdb-cluster]\x20recommissioned\x20worker\x20slot=','clearThreadStats','_markSeen','_ownMeta','\x1b[31m','\x20ipc\x20error:\x20','DELETE\x20type/users/item/x','headers','data:write','--config','Type\x20definitions,\x20all\x20index\x20registrations\x20(byIndex,\x20FTS,\x20vector),\x20and\x20TTL\x20policy.','PUT\x20type/users/item/x\x20{\x22n\x22:1}','\x20has\x20ambiguous\x20binding\x20for\x20path\x20field:\x20','items','\x20in\x20','heapUsed','percentile','migrate','item:update','_envs','creating','workers','includes','lag','sourceType','\x20\x20Shell\x20commands','\x20}):\x20','OKDBError','addedAt','\x0a\x20\x20\x20\x20','include','VERSION_MISMATCH','defaults','methods','setupPrimary','\x20\x20✓\x20database\x20opened\x0a','line','_lastCpuAt','http','setNoDelay','regex','[okdb-cluster]\x20','VALIDATION_ERROR','selfAddress','authRequired','routes','off','detectInputType','fanout','_onStop','deregisterSelf','OPEN','ready','shell','getChanges','true','flushDebounce','derivePin','recheck','processor:ready',';\x20Max-Age=0;\x20Expires=Thu,\x2001\x20Jan\x201970\x2000:00:00\x20GMT','SIGBREAK','bold','body','listDesired','Shutting\x20down\x20due\x20to\x20license\x20expiry','count','delete','existsSync','toUpperCase','selfKey','toUTCString','Forbidden\x20—\x20requires\x20','keys:','--ttl','Register/update/delete\x20types,\x20register/drop/rebuild\x20indexes,\x20set\x20TTL\x20policy.','⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20','[okdb]\x20backing\x20up\x20to\x20','isFinite','unique:violation','headClock','JWT\x20not\x20yet\x20valid','transport:\x20','_baselines','params','entry','GONE'];_0x5b4d=function(){return _0x21cdbc;};return _0x5b4d();}var okdb$1={},okdbWorkers,hasRequiredOkdbWorkers;function requireOkdbWorkers(){if(hasRequiredOkdbWorkers)return okdbWorkers;hasRequiredOkdbWorkers=0x1;const _0xfb8a20=require$$0,_0x265cb8=require$$1$1,_0x1ad243=require$$1;let _0x2fed05;function _0x444b4a(){const _0x4d07a7=_0x2368;if(process.env.OKDB_FORCE_SHMBUF_FALLBACK==='1')return![];if(_0x2fed05!==undefined)return _0x2fed05;try{const _0x222e2f=_0x1ad243[_0x4d07a7(0x43e)](require['resolve'](_0x4d07a7(0x383)));_0x2fed05=_0x265cb8[_0x4d07a7(0x5ee)](_0x1ad243[_0x4d07a7(0x3a4)](_0x222e2f,_0x4d07a7(0x310),_0x4d07a7(0x3a0),_0x4d07a7(0x312)));}catch{_0x2fed05=![];}return _0x2fed05;}function _0xba226c(){const _0x59717e=_0xfb8a20['cpus']()['length'];return Math['max'](0x1,_0x59717e-0x1);}function _0x243b88(_0x2ab767,_0x5eecff={}){const _0x186416=_0x2368,_0x4cc5ae=_0x5eecff['shmbufNative']!==undefined?_0x5eecff[_0x186416(0x37e)]:_0x444b4a();let _0x4f677e;if(_0x2ab767?.[_0x186416(0x289)])_0x4f677e=0x1;else{let _0x181734,_0xc0dddb;if(_0x2ab767?.[_0x186416(0x194)]!==undefined&&_0x2ab767['workersFlag']!==null&&_0x2ab767[_0x186416(0x194)]!=='')_0x181734=_0x2ab767[_0x186416(0x194)],_0xc0dddb=_0x186416(0x102);else{if(process.env.OKDB_HTTP_WORKERS!==undefined&&process.env.OKDB_HTTP_WORKERS!=='')_0x181734=process.env.OKDB_HTTP_WORKERS,_0xc0dddb=_0x186416(0x29e);else _0x2ab767?.[_0x186416(0x5d0)]?.[_0x186416(0x5bf)]!==undefined&&_0x2ab767[_0x186416(0x5d0)][_0x186416(0x5bf)]!==null&&_0x2ab767['http'][_0x186416(0x5bf)]!==''&&(_0x181734=_0x2ab767[_0x186416(0x5d0)][_0x186416(0x5bf)],_0xc0dddb=_0x186416(0x104));}if(_0x181734===undefined)_0x4f677e=_0xba226c();else{const _0x355114=Number(_0x181734);!Number['isInteger'](_0x355114)||_0x355114<0x1?(console[_0x186416(0x27e)]('[okdb]\x20invalid\x20'+_0xc0dddb+'='+JSON[_0x186416(0x3d9)](_0x181734)+'\x20(must\x20be\x20an\x20integer\x20>=\x201)\x20—\x20using\x201'),_0x4f677e=0x1):_0x4f677e=_0x355114;}}return!_0x4cc5ae&&_0x4f677e>0x1&&(console[_0x186416(0x27e)](_0x186416(0x149)+(_0x186416(0x4bd)+_0x4f677e+').')),_0x4f677e=0x1),_0x4f677e;}return okdbWorkers={'isShmbufNative':_0x444b4a,'defaultWorkers':_0xba226c,'resolveWorkers':_0x243b88},okdbWorkers;}var version='1.9.0',require$$3={'version':version},okdbAuthTokens,hasRequiredOkdbAuthTokens;function requireOkdbAuthTokens(){if(hasRequiredOkdbAuthTokens)return okdbAuthTokens;hasRequiredOkdbAuthTokens=0x1;const _0xa8518b=require$$2;function _0x1597f9(_0x418388,_0x29f2cd){const _0x22483c=_0x2368;return _0xa8518b['createHmac'](_0x22483c(0x33b),_0x29f2cd)[_0x22483c(0x251)](_0x418388)[_0x22483c(0x34c)](_0x22483c(0x1c4));}function _0x4f1de5(_0x2a7c83,_0x42b473){const _0x4f6fdc=_0x2368;if(typeof _0x2a7c83!==_0x4f6fdc(0x380)||typeof _0x42b473!=='string')return![];if(Buffer[_0x4f6fdc(0x59a)](_0x2a7c83)!==Buffer['byteLength'](_0x42b473))return![];return _0xa8518b[_0x4f6fdc(0x2a4)](Buffer['from'](_0x2a7c83),Buffer['from'](_0x42b473));}function _0x3d694a(_0x3a3661){const _0x2442ef=_0x2368;if(!_0x3a3661?.['startsWith']('Bearer\x20'))return null;return _0x3a3661[_0x2442ef(0x45e)](0x7);}function _0x5f22e4(_0x20648e=0x20){const _0x8fc8e8=_0x2368;return _0xa8518b['randomBytes'](_0x20648e)[_0x8fc8e8(0x261)](_0x8fc8e8(0x1c4));}function _0x17643b(_0x2ce688){const _0x3a7522=_0x2368;return _0xa8518b[_0x3a7522(0x291)]('sha256')[_0x3a7522(0x251)](_0x2ce688)['digest'](_0x3a7522(0x439));}function _0x30ce30(_0x33ec23,_0x53a9c7,_0x46468f=0x36ee80){const _0x1ecd2e=_0x2368;if(!_0x53a9c7)throw new Error(_0x1ecd2e(0x429));const _0x5830a5=Date['now'](),_0x33c712=Buffer[_0x1ecd2e(0x36d)](JSON[_0x1ecd2e(0x3d9)]({'iat':_0x5830a5,'exp':_0x5830a5+_0x46468f,'sub':_0x33ec23?.['id']??_0x33ec23?.['sub']??null,'username':_0x33ec23?.[_0x1ecd2e(0x112)]??_0x33ec23?.['name']??null,'roles':Array['isArray'](_0x33ec23?.['roles'])?_0x33ec23[_0x1ecd2e(0x330)]:[]}))['toString'](_0x1ecd2e(0x1c4)),_0x112073=_0x1597f9(_0x33c712,_0x53a9c7);return _0x33c712+'.'+_0x112073;}function _0x4aa26b(_0x308ce5,_0x48a9e5){const _0x13cfc3=_0x2368;if(!_0x48a9e5||typeof _0x308ce5!==_0x13cfc3(0x380))return null;const [_0x337c4d,_0x16bea8]=_0x308ce5[_0x13cfc3(0x37c)]('.');if(!_0x337c4d||!_0x16bea8)return null;const _0x407d86=_0x1597f9(_0x337c4d,_0x48a9e5);if(!_0x4f1de5(_0x16bea8,_0x407d86))return null;try{const _0x396480=JSON[_0x13cfc3(0x34f)](Buffer['from'](_0x337c4d,_0x13cfc3(0x1c4))['toString']()),_0x5718ca=0x7530;if(Date[_0x13cfc3(0x16a)]()>Number(_0x396480?.[_0x13cfc3(0xfd)]??0x0)+_0x5718ca)return null;return _0x396480;}catch{return null;}}async function _0x3d42fe(_0x29d337){return new Promise((_0x517805,_0x4cb221)=>{const _0x23cc3c=_0x2368,_0xb7d691=_0xa8518b[_0x23cc3c(0x30b)](0x10);_0xa8518b[_0x23cc3c(0x2b5)](_0x29d337,_0xb7d691,0x40,(_0x50bac6,_0x453921)=>{const _0x2fe43e=_0x23cc3c;if(_0x50bac6)_0x4cb221(_0x50bac6);_0x517805(_0xb7d691[_0x2fe43e(0x261)](_0x2fe43e(0x439))+':'+_0x453921['toString'](_0x2fe43e(0x439)));});});}async function _0x2055a3(_0x77c073,_0x1f2e31){const _0x2ffc50=_0x2368,[_0x1cb861,_0x406ad0]=_0x1f2e31[_0x2ffc50(0x37c)](':');if(!_0x1cb861||!_0x406ad0)return![];const _0x7bfb91=Buffer[_0x2ffc50(0x36d)](_0x1cb861,_0x2ffc50(0x439));return new Promise((_0x189a51,_0x3ce84e)=>{_0xa8518b['scrypt'](_0x77c073,_0x7bfb91,0x40,(_0x227466,_0x184b72)=>{const _0x5b3d4e=_0x2368;if(_0x227466)_0x3ce84e(_0x227466);_0x189a51(_0xa8518b[_0x5b3d4e(0x2a4)](_0x184b72,Buffer['from'](_0x406ad0,_0x5b3d4e(0x439))));});});}return okdbAuthTokens={'hmac':_0x1597f9,'timingSafeEqual':_0x4f1de5,'parseBearer':_0x3d694a,'randomToken':_0x5f22e4,'hashToken':_0x17643b,'issueToken':_0x30ce30,'authenticateToken':_0x4aa26b,'hashPassword':_0x3d42fe,'verifyPassword':_0x2055a3},okdbAuthTokens;}var okdbLicenseCodec,hasRequiredOkdbLicenseCodec;function requireOkdbLicenseCodec(){const _0x565ecd=_0x4b361c;if(hasRequiredOkdbLicenseCodec)return okdbLicenseCodec;hasRequiredOkdbLicenseCodec=0x1;const _0x4febc8=require$$0$1,_0x257e26=_0x565ecd(0x57d),_0x153ca2=new Uint8Array(0x100)[_0x565ecd(0x166)](0xff);for(let _0x36c4ec=0x0;_0x36c4ec<_0x257e26[_0x565ecd(0x2eb)];_0x36c4ec++){_0x153ca2[_0x257e26['charCodeAt'](_0x36c4ec)]=_0x36c4ec,_0x153ca2[_0x257e26[_0x565ecd(0x4e6)](_0x36c4ec)+0x20]=_0x36c4ec;}_0x153ca2['O'[_0x565ecd(0x4e6)](0x0)]=0x0,_0x153ca2['o'[_0x565ecd(0x4e6)](0x0)]=0x0,_0x153ca2['I'[_0x565ecd(0x4e6)](0x0)]=0x1,_0x153ca2['i'[_0x565ecd(0x4e6)](0x0)]=0x1,_0x153ca2['L'[_0x565ecd(0x4e6)](0x0)]=0x1,_0x153ca2['l'[_0x565ecd(0x4e6)](0x0)]=0x1;function _0x52d4d1(_0x1f4fd7){let _0x2a4e97=0x0,_0x5024f7=0x0,_0x520f3e='';for(let _0x192a60=0x0;_0x192a60<_0x1f4fd7['length'];_0x192a60++){_0x5024f7=_0x5024f7<<0x8|_0x1f4fd7[_0x192a60],_0x2a4e97+=0x8;while(_0x2a4e97>=0x5){_0x2a4e97-=0x5,_0x520f3e+=_0x257e26[_0x5024f7>>>_0x2a4e97&0x1f];}}return _0x2a4e97>0x0&&(_0x520f3e+=_0x257e26[_0x5024f7<<0x5-_0x2a4e97&0x1f]),_0x520f3e;}function _0x13ca8f(_0x24f29b){const _0x107f27=_0x565ecd;_0x24f29b=_0x24f29b[_0x107f27(0x38b)](/-/g,'')[_0x107f27(0x5ef)]();let _0xe56562=0x0,_0x21129c=0x0;const _0x179ef2=[];for(let _0x43c40f=0x0;_0x43c40f<_0x24f29b[_0x107f27(0x2eb)];_0x43c40f++){const _0x29eba6=_0x153ca2[_0x24f29b[_0x107f27(0x4e6)](_0x43c40f)];if(_0x29eba6===0xff)continue;_0x21129c=_0x21129c<<0x5|_0x29eba6,_0xe56562+=0x5,_0xe56562>=0x8&&(_0xe56562-=0x8,_0x179ef2[_0x107f27(0x614)](_0x21129c>>>_0xe56562&0xff));}return Buffer['from'](_0x179ef2);}const _0x61bd1a=[_0x565ecd(0x32d),_0x565ecd(0x591),_0x565ecd(0x238),_0x565ecd(0x458),'timeMachine',_0x565ecd(0x55f),_0x565ecd(0x32b),'files'],_0x3ca68d=0x0,_0x448090=0x1,_0x5e316a=0x2,_0x9cc9b5=0x6*0x1e*0x18*0x3c*0x3c*0x3e8;function _0x10ede0({issuedAt:_0x1cf6a7,expiresAt:_0x99a7ac,licensee:licensee='',features:features={},limits:limits={},licenseType:licenseType=_0x3ca68d}){const _0x3199e7=_0x565ecd,_0x5a78d8=Buffer['from'](licensee,_0x3199e7(0x365))[_0x3199e7(0x45e)](0x0,0x40),_0x54b5da=0x1+0x1+0x4+0x4+0x1+_0x5a78d8[_0x3199e7(0x2eb)]+0x2+0x10,_0x48c274=Buffer[_0x3199e7(0x3b4)](_0x54b5da);let _0x37430b=0x0;_0x48c274[_0x3199e7(0x2e4)](0x1,_0x37430b++),_0x48c274[_0x3199e7(0x2e4)](licenseType,_0x37430b++),_0x48c274[_0x3199e7(0x461)](Math[_0x3199e7(0x341)](_0x1cf6a7/0x3e8),_0x37430b),_0x37430b+=0x4,_0x48c274[_0x3199e7(0x461)](Math[_0x3199e7(0x341)](_0x99a7ac/0x3e8),_0x37430b),_0x37430b+=0x4,_0x48c274[_0x3199e7(0x2e4)](_0x5a78d8[_0x3199e7(0x2eb)],_0x37430b++),_0x5a78d8['copy'](_0x48c274,_0x37430b),_0x37430b+=_0x5a78d8['length'];let _0x5270a4=0x0;for(let _0x17bc54=0x0;_0x17bc54<_0x61bd1a['length'];_0x17bc54++){if(features[_0x61bd1a[_0x17bc54]])_0x5270a4|=0x1<<_0x17bc54;}_0x48c274[_0x3199e7(0x49e)](_0x5270a4,_0x37430b),_0x37430b+=0x2;const _0xb792d5=['envs',_0x3199e7(0x202),_0x3199e7(0x1dc),_0x3199e7(0x178)];for(const _0x480803 of _0xb792d5){_0x48c274['writeUInt32BE'](limits[_0x480803]||0x0,_0x37430b),_0x37430b+=0x4;}return _0x48c274;}function _0x4f58c0(_0xa7340a){const _0x2f2685=_0x565ecd;let _0x4e9dfa=0x0;const _0x14eb1f=_0xa7340a[_0x2f2685(0x176)](_0x4e9dfa++),_0x3fef41=_0xa7340a[_0x2f2685(0x176)](_0x4e9dfa++),_0x5f123e=_0xa7340a[_0x2f2685(0x10c)](_0x4e9dfa);_0x4e9dfa+=0x4;const _0x18e6c0=_0xa7340a[_0x2f2685(0x10c)](_0x4e9dfa);_0x4e9dfa+=0x4;const _0x35e88e=_0xa7340a['readUInt8'](_0x4e9dfa++),_0x29e571=_0xa7340a[_0x2f2685(0x45e)](_0x4e9dfa,_0x4e9dfa+_0x35e88e)[_0x2f2685(0x261)](_0x2f2685(0x365));_0x4e9dfa+=_0x35e88e;const _0x3f535d=_0xa7340a[_0x2f2685(0x49a)](_0x4e9dfa);_0x4e9dfa+=0x2;const _0x55e12b={};for(let _0x57473d=0x0;_0x57473d<_0x61bd1a[_0x2f2685(0x2eb)];_0x57473d++){_0x55e12b[_0x61bd1a[_0x57473d]]=Boolean(_0x3f535d&0x1<<_0x57473d);}const _0x25888d=[_0x2f2685(0xec),'typesPerEnv',_0x2f2685(0x1dc),_0x2f2685(0x178)],_0x1ee51f={};for(const _0x43bdfc of _0x25888d){const _0x1b4159=_0xa7340a[_0x2f2685(0x10c)](_0x4e9dfa);_0x4e9dfa+=0x4,_0x1ee51f[_0x43bdfc]=_0x1b4159===0x0?null:_0x1b4159;}return{'v':_0x14eb1f,'licenseType':_0x3fef41,'issuedAt':_0x5f123e*0x3e8,'expiresAt':_0x18e6c0*0x3e8,'licensee':_0x29e571,'features':_0x55e12b,'limits':_0x1ee51f};}function _0x2abc25(_0x5a56ea,_0xe8497a){const _0x242a20=_0x565ecd,_0x275efd=Buffer[_0x242a20(0x115)]([_0x5a56ea,_0xe8497a]),_0x4c3608=_0x52d4d1(_0x275efd),_0x3ae566=[];for(let _0x359474=0x0;_0x359474<_0x4c3608[_0x242a20(0x2eb)];_0x359474+=0x8){_0x3ae566['push'](_0x4c3608[_0x242a20(0x45e)](_0x359474,_0x359474+0x8));}return _0x3ae566[_0x242a20(0x3a4)]('-');}function _0x1251fc(_0x24cfaf){const _0x398ba7=_0x565ecd;if(typeof _0x24cfaf!==_0x398ba7(0x380))throw new Error('decodeLicenseBlob:\x20input\x20must\x20be\x20a\x20string');const _0x533a02=_0x13ca8f(_0x24cfaf[_0x398ba7(0x38b)](/-/g,''));if(_0x533a02['length']<0x41)throw new Error(_0x398ba7(0x299)+_0x533a02[_0x398ba7(0x2eb)]+_0x398ba7(0x374));const _0x42d8be=_0x533a02[_0x398ba7(0x45e)](0x0,_0x533a02[_0x398ba7(0x2eb)]-0x40),_0x53edfb=_0x533a02[_0x398ba7(0x45e)](_0x533a02[_0x398ba7(0x2eb)]-0x40);let _0x220191;try{_0x220191=_0x4f58c0(_0x42d8be);}catch(_0x419ad5){throw new Error(_0x398ba7(0x1de)+_0x419ad5['message']);}return{'rawBuf':_0x533a02,'payload':_0x42d8be,'sig':_0x53edfb,'decoded':_0x220191};}function _0x572f3c(_0x5857c8){const _0xe4db47=_0x565ecd;return _0x4febc8[_0xe4db47(0x291)]('sha256')[_0xe4db47(0x251)](_0x5857c8)['digest']()[_0xe4db47(0x45e)](0x0,0x8);}function _0xdb96dc(_0x5891eb,_0x2f3980,_0x13b0e5){const _0x3dc917=_0x565ecd,_0x50324a='OKDB-PIN-V1:'+_0x13b0e5,_0x5e814e=Buffer['concat']([Buffer['from'](_0x5891eb,_0x3dc917(0x365)),_0x2f3980]),_0x4a6705=_0x4febc8['createHmac']('sha256',_0x50324a)[_0x3dc917(0x251)](_0x5e814e)[_0x3dc917(0x34c)](),_0x2fd411=_0x52d4d1(_0x4a6705[_0x3dc917(0x45e)](0x0,0x5));return{'pin':_0x2fd411,'pinHmac':_0x4a6705};}function _0x5a6dd0(_0xa941a4,_0x2c99f2,_0x49d473){const _0x3cf6b2=_0x565ecd,_0x4a5e56=Buffer[_0x3cf6b2(0x3b4)](0x4d);let _0x3b88b4=0x0;_0x4a5e56['writeUInt8'](0x1,_0x3b88b4++),_0xa941a4['copy'](_0x4a5e56,_0x3b88b4),_0x3b88b4+=0x8,_0x4a5e56[_0x3cf6b2(0x461)](_0x2c99f2,_0x3b88b4),_0x3b88b4+=0x4,_0x49d473[_0x3cf6b2(0x28b)](_0x4a5e56,_0x3b88b4);const _0x5adba3=_0x52d4d1(_0x4a5e56),_0x1a2bcd=[];for(let _0x30aee7=0x0;_0x30aee7<_0x5adba3['length'];_0x30aee7+=0x6){_0x1a2bcd[_0x3cf6b2(0x614)](_0x5adba3[_0x3cf6b2(0x45e)](_0x30aee7,_0x30aee7+0x6));}return _0x1a2bcd['join']('-');}function _0xbf9911(_0x5017e4){const _0x3879b8=_0x565ecd;if(typeof _0x5017e4!==_0x3879b8(0x380))throw new Error(_0x3879b8(0x29b));const _0x514e90=_0x13ca8f(_0x5017e4['replace'](/-/g,''));if(_0x514e90[_0x3879b8(0x2eb)]!==0x4d)throw new Error(_0x3879b8(0x23b)+_0x514e90[_0x3879b8(0x2eb)]);let _0x51e75e=0x0;const _0x3eb37f=_0x514e90[_0x3879b8(0x176)](_0x51e75e++),_0x33b048=_0x514e90[_0x3879b8(0x45e)](_0x51e75e,_0x51e75e+0x8);_0x51e75e+=0x8;const _0x3b58a9=_0x514e90[_0x3879b8(0x10c)](_0x51e75e);_0x51e75e+=0x4;const _0x3fdbf0=_0x514e90[_0x3879b8(0x45e)](_0x51e75e);return{'v':_0x3eb37f,'licenseHash':_0x33b048,'expiry':_0x3b58a9,'sig':_0x3fdbf0};}function _0x239512({tokenString:_0x1c4e11,nodeId:_0x3b94f1,rawBlobBuf:_0x59b74a,pubKeyPem:_0x1098f6,pubFingerprint:_0x4e401d}){const _0x315c41=_0x565ecd;let _0x18fa21;try{_0x18fa21=_0xbf9911(_0x1c4e11);}catch(_0x37f9eb){return{'valid':![],'reason':'MALFORMED_TOKEN'};}const _0x82ba79=_0x572f3c(_0x59b74a);if(!_0x82ba79[_0x315c41(0x362)](_0x18fa21[_0x315c41(0x655)]))return{'valid':![],'reason':_0x315c41(0x550)};const {pinHmac:_0x49491a}=_0xdb96dc(_0x3b94f1,_0x82ba79,_0x4e401d),_0xce1430=Buffer['allocUnsafe'](0x4);_0xce1430['writeUInt32BE'](_0x18fa21['expiry'],0x0);const _0x20a59d=Buffer[_0x315c41(0x115)]([Buffer[_0x315c41(0x36d)]([_0x18fa21['v']]),_0x49491a[_0x315c41(0x45e)](0x0,0x5),_0x18fa21[_0x315c41(0x655)],_0xce1430]);try{const _0xc0c9aa=_0x4febc8[_0x315c41(0x170)](null,_0x20a59d,_0x1098f6,_0x18fa21['sig']);if(!_0xc0c9aa)return{'valid':![],'reason':_0x315c41(0x445)};}catch(_0x546a02){return{'valid':![],'reason':'SIG_INVALID'};}if(_0x18fa21[_0x315c41(0x146)]<Date['now']()/0x3e8)return{'valid':![],'reason':_0x315c41(0x133)};return{'valid':!![],'reason':'ok'};}function _0x109b45(_0x17eba3){const _0x36f284=_0x565ecd;if(typeof _0x17eba3!==_0x36f284(0x380))return'unknown';const _0x2955d2=_0x17eba3[_0x36f284(0x486)]();if(_0x2955d2[_0x36f284(0x3cc)]('/')||_0x2955d2[_0x36f284(0x3cc)]('./')||_0x2955d2[_0x36f284(0x3cc)](_0x36f284(0x4eb))||/^[A-Za-z]:[\\/]/[_0x36f284(0x30d)](_0x2955d2))return _0x36f284(0x42d);if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i[_0x36f284(0x30d)](_0x2955d2))return _0x36f284(0x134);const _0x185682=_0x2955d2[_0x36f284(0x38b)](/[\s-]+/g,'')[_0x36f284(0x2eb)];if(_0x185682===0x7c)return _0x36f284(0x377);if(_0x185682>=0x95&&_0x185682<=0xfc)return _0x36f284(0x1d8);return _0x36f284(0x326);}return okdbLicenseCodec={'toBase32':_0x52d4d1,'fromBase32':_0x13ca8f,'encodeLicensePayload':_0x10ede0,'decodeLicensePayload':_0x4f58c0,'encodeLicenseBlob':_0x2abc25,'decodeLicenseBlob':_0x1251fc,'licenseHash':_0x572f3c,'derivePin':_0xdb96dc,'encodeActivationToken':_0x5a6dd0,'decodeActivationToken':_0xbf9911,'verifyActivation':_0x239512,'detectInputType':_0x109b45,'FEATURE_NAMES':_0x61bd1a,'LICENSE_TYPE_STANDARD':_0x3ca68d,'LICENSE_TYPE_OPEN':_0x448090,'LICENSE_TYPE_INTERNAL':_0x5e316a,'OPEN_LICENSE_MAX_DURATION_MS':_0x9cc9b5},okdbLicenseCodec;}var okdbError,hasRequiredOkdbError;function requireOkdbError(){if(hasRequiredOkdbError)return okdbError;hasRequiredOkdbError=0x1;class _0x24cdc6 extends Error{constructor(_0x42f50e,_0x1c4a9b,_0x37faec={}){const _0x3dacf9=_0x2368;super(_0x42f50e),this['name']=_0x3dacf9(0x5c5),this[_0x3dacf9(0x60e)]=_0x1c4a9b,this[_0x3dacf9(0x108)]=_0x37faec,_0x37faec[_0x3dacf9(0x10f)]&&(this['cause']=_0x37faec[_0x3dacf9(0x10f)]),Error['captureStackTrace'](this,this['constructor']);}}class _0x4354fa extends _0x24cdc6{constructor(_0x25fdce,_0x373d2a,_0x21d618,_0xa44c60){const _0x4675ce=_0x2368;super('Version\x20mismatch\x20for\x20'+_0x25fdce+'@'+_0x373d2a+_0x4675ce(0x56d)+_0x21d618+_0x4675ce(0x136)+_0xa44c60,_0x4675ce(0x5c9),{'type':_0x25fdce,'key':_0x373d2a,'expectedVersion':_0x21d618,'actualVersion':_0xa44c60}),this[_0x4675ce(0x2cc)]='OKDBVersionMismatchError';}}class _0x2a7149 extends _0x24cdc6{constructor(_0x167bb5,_0x1a4360){const _0x3255a3=_0x2368;super(_0x167bb5+'@'+_0x1a4360+_0x3255a3(0x1a8),_0x3255a3(0x155),{'type':_0x167bb5,'key':_0x1a4360}),this[_0x3255a3(0x2cc)]=_0x3255a3(0x14f);}}class _0x641a67 extends _0x24cdc6{constructor(_0x25ad3f,_0x7e2074){const _0xb69159=_0x2368;super(_0x25ad3f+'@'+_0x7e2074+_0xb69159(0x4d2),'ALREADY_EXISTS',{'type':_0x25ad3f,'key':_0x7e2074}),this[_0xb69159(0x2cc)]=_0xb69159(0x12c);}}class _0x4b5f56 extends _0x24cdc6{constructor(_0x366337,_0x42452f){const _0x2050e9=_0x2368,_0x193237=typeof _0x42452f;super(_0x2050e9(0x4a5)+_0x366337+_0x2050e9(0x21e)+_0x193237+_0x2050e9(0x1a5)+_0x42452f,_0x2050e9(0x396),{'index':_0x366337,'key':_0x42452f,'keyType':_0x193237}),this[_0x2050e9(0x2cc)]='OKDBInvalidIndexKeyError';}}class _0xb68d6d extends _0x24cdc6{constructor(_0xbe77a){const _0xbeabe3=_0x2368,_0x578114=typeof _0xbe77a;super(_0xbeabe3(0x2ee)+_0x578114+'.\x20Primary\x20keys\x20must\x20be\x20string\x20or\x20number.\x20Got:\x20'+_0xbe77a,'INVALID_PRIMARY_KEY',{'key':_0xbe77a,'keyType':_0x578114}),this[_0xbeabe3(0x2cc)]=_0xbeabe3(0x227);}}class _0x1056ba extends _0x24cdc6{constructor(_0x2f13c8){const _0x594c28=_0x2368;super(_0x594c28(0x66b)+_0x2f13c8+_0x594c28(0x50d),'TYPE_NOT_REGISTERED',{'type':_0x2f13c8}),this['name']=_0x594c28(0x484);}}class _0xac327a extends _0x24cdc6{constructor(_0x5d6773){const _0x5d8635=_0x2368;super('Type\x20\x27'+_0x5d6773+'\x27\x20already\x20registered','TYPE_ALREADY_REGISTERED',{'type':_0x5d6773}),this[_0x5d8635(0x2cc)]='OKDBTypeAlreadyRegisteredError';}}class _0x157879 extends _0x24cdc6{constructor(_0x16eecd,_0x3585e9){const _0x19bd05=_0x2368;super(_0x19bd05(0x11d)+_0x3585e9+_0x19bd05(0x17e)+_0x16eecd+'\x27\x20doesn\x27t\x20exist','INDEX_NOT_REGISTERED',{'type':_0x16eecd,'index':_0x3585e9}),this['name']='OKDBIndexNotRegisteredError';}}class _0x489c95 extends _0x24cdc6{constructor(_0x516dd4,_0x24051c){const _0x468171=_0x2368;super(_0x468171(0x11d)+_0x24051c+_0x468171(0x17e)+_0x516dd4+'\x27\x20is\x20already\x20registered',_0x468171(0x379),{'type':_0x516dd4,'index':_0x24051c}),this[_0x468171(0x2cc)]=_0x468171(0x31e);}}class _0xe2d01 extends _0x24cdc6{constructor(_0x57d0ac,_0x4a995e={}){const _0x518813=_0x2368;super(_0x57d0ac,'INVALID_VALUE',_0x4a995e),this[_0x518813(0x2cc)]=_0x518813(0x3f8);}}class _0x158880 extends _0x24cdc6{constructor(_0x56e109,_0x2e47f7,_0x25dd4a,_0x1110d9,_0x5b3b4d){const _0x4d9289=_0x2368;super(_0x4d9289(0x1a3)+_0x56e109+'@'+_0x2e47f7+_0x4d9289(0x203)+_0x25dd4a+_0x4d9289(0x1e1)+_0x1110d9+_0x4d9289(0x295)+_0x5b3b4d+'\x27','UNIQUE_CONSTRAINT',{'type':_0x56e109,'index':_0x2e47f7,'indexKey':_0x25dd4a,'existingKey':_0x1110d9,'conflictingKey':_0x5b3b4d}),this[_0x4d9289(0x2cc)]='OKDBUniqueConstraintError';}}class _0xb43cf5 extends _0x24cdc6{constructor(_0x20d98b,_0x4285fa,_0x4b13c9){const _0x1764fd=_0x2368;super(_0x1764fd(0x4b5)+_0x20d98b+'@'+_0x4285fa,_0x1764fd(0x528),{'type':_0x20d98b,'key':_0x4285fa,'errors':_0x4b13c9}),this[_0x1764fd(0x2cc)]=_0x1764fd(0x640),this[_0x1764fd(0x49b)]=_0x20d98b,this[_0x1764fd(0x174)]=_0x4285fa,this[_0x1764fd(0x444)]=_0x4b13c9;}}class _0x3db255 extends _0x24cdc6{constructor(_0x1068f7,_0x4ba1f0){const _0x477822=_0x2368;super(_0x477822(0x613)+_0x1068f7+':\x20'+_0x4ba1f0[_0x477822(0x2eb)]+_0x477822(0x13e),_0x477822(0x2e6),{'type':_0x1068f7,'failures':_0x4ba1f0}),this[_0x477822(0x2cc)]='OKDBSchemaCollectionError',this[_0x477822(0x49b)]=_0x1068f7,this[_0x477822(0x597)]=_0x4ba1f0;}}class _0x15c33f extends _0x24cdc6{constructor(_0x4a7cab,_0x26703e,_0x4a1ebb,_0x26f8f8,_0x35f38b){const _0xe2f450=_0x2368;super(_0xe2f450(0xef)+_0x4a7cab+'@'+_0x26703e+'.'+_0x4a1ebb+_0xe2f450(0x188)+_0x26f8f8+'@'+_0x35f38b+_0xe2f450(0x1b7),'FOREIGN_KEY_VIOLATION',{'sourceType':_0x4a7cab,'sourceKey':_0x26703e,'fieldPath':_0x4a1ebb,'targetType':_0x26f8f8,'targetKey':_0x35f38b}),this[_0xe2f450(0x2cc)]=_0xe2f450(0x4be),this[_0xe2f450(0x5c2)]=_0x4a7cab,this['sourceKey']=_0x26703e,this[_0xe2f450(0x120)]=_0x4a1ebb,this[_0xe2f450(0x372)]=_0x26f8f8,this['targetKey']=_0x35f38b;}}class _0x5df77e extends _0x24cdc6{constructor(_0x5bcfa0,_0x2a0522,_0x10c8f3){const _0x327039=_0x2368;super('Cannot\x20delete\x20'+_0x5bcfa0+'@'+_0x2a0522+':\x20'+_0x10c8f3['length']+'\x20document(s)\x20reference\x20it\x20with\x20onDelete:restrict',_0x327039(0x66d),{'targetType':_0x5bcfa0,'targetKey':_0x2a0522,'references':_0x10c8f3}),this[_0x327039(0x2cc)]='OKDBForeignKeyDeleteError',this[_0x327039(0x372)]=_0x5bcfa0,this[_0x327039(0x436)]=_0x2a0522,this['references']=_0x10c8f3;}}class _0x4ca79f extends _0x24cdc6{constructor(_0x4de81a,_0x4611c8,_0x5c1f00){const _0x4d7a45=_0x2368;super(_0x4d7a45(0x390)+_0x4611c8+_0x4d7a45(0x191)+_0x4de81a+_0x4d7a45(0x306)+_0x5c1f00[_0x4d7a45(0x601)](_0x9172c5=>_0x9172c5[_0x4d7a45(0x4d6)]+':'+_0x9172c5[_0x4d7a45(0x2cc)])[_0x4d7a45(0x3a4)](',\x20'),_0x4d7a45(0x48a),{'type':_0x4de81a,'index':_0x4611c8,'usedBy':_0x5c1f00}),this[_0x4d7a45(0x2cc)]=_0x4d7a45(0x1fa);}}return okdbError={'OKDBError':_0x24cdc6,'OKDBVersionMismatchError':_0x4354fa,'OKDBNotFoundError':_0x2a7149,'OKDBAlreadyExistsError':_0x641a67,'OKDBInvalidIndexKeyError':_0x4b5f56,'OKDBInvalidPrimaryKeyError':_0xb68d6d,'OKDBTypeNotRegisteredError':_0x1056ba,'OKDBTypeAlreadyRegisteredError':_0xac327a,'OKDBIndexNotRegisteredError':_0x157879,'OKDBIndexAlreadyRegisteredError':_0x489c95,'OKDBInvalidValueError':_0xe2d01,'OKDBUniqueConstraintError':_0x158880,'OKDBSchemaValidationError':_0xb43cf5,'OKDBSchemaCollectionError':_0x3db255,'OKDBForeignKeyError':_0x15c33f,'OKDBForeignKeyDeleteError':_0x5df77e,'OKDBIndexHasConsumersError':_0x4ca79f},okdbError;}var okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x5adc1c=_0x4b361c;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x5073ab={'PUT':_0x5adc1c(0x42f),'REMOVE':_0x5adc1c(0x1b1),'INDEX_DROP':_0x5adc1c(0x14d),'INDEX_REGISTER':_0x5adc1c(0x41d),'INDEX_RESET':_0x5adc1c(0x596),'TYPE_REGISTER':'registerType','TYPE_DROP':_0x5adc1c(0x298),'FTS_REGISTER':_0x5adc1c(0x438),'FTS_DROP':_0x5adc1c(0x156),'FTS_RESET':_0x5adc1c(0x671),'SCHEMA_SET':_0x5adc1c(0x1c0),'SCHEMA_DROP':'dropSchema','TTL_SET':_0x5adc1c(0x327),'TTL_CLEAR':_0x5adc1c(0x4b4)},_0x46c743={'SYSTEM_READY':'system:ready','SYSTEM_STOPPED':_0x5adc1c(0x3a2),'SYSTEM_CLOCK_CHANGE':_0x5adc1c(0x466),'SYSTEM_POKE':'system:poke','SYSTEM_DRAIN':_0x5adc1c(0x394),'SYSTEM_TYPE_DROP':_0x5adc1c(0x247),'SYSTEM_PROC':'system:proc','SYSTEM_BUS_STATE_CHANGE':'system:bus_state_change','ITEM_CREATE':'item:create','ITEM_UPDATE':_0x5adc1c(0x5bc),'ITEM_REMOVE':_0x5adc1c(0x433),'INDEX_RESET':_0x5adc1c(0x578),'INDEX_READY':_0x5adc1c(0x44c),'INDEX_PROGRESS':_0x5adc1c(0x384),'VIEW_PROGRESS':_0x5adc1c(0x415),'INDEX_DROP':_0x5adc1c(0x2ef),'INDEX_REGISTERED':'index:registered','FTS_REGISTERED':_0x5adc1c(0x450),'FTS_DROP':_0x5adc1c(0x622),'FTS_RESET':_0x5adc1c(0x36f),'SCHEMA_SET':'schema:set','SCHEMA_DROP':'schema:drop','UNIQUE_VIOLATION':_0x5adc1c(0x5f9),'UNIQUE_VIOLATION_RESOLVED':_0x5adc1c(0x2cb),'REF_VIOLATION':_0x5adc1c(0x3ef),'REF_VIOLATION_RESOLVED':'ref:violation_resolved','SYNC_APPLY':_0x5adc1c(0x615),'TXN_START':_0x5adc1c(0x676),'TXN_END':_0x5adc1c(0x382),'TXN_ROLLBACK':_0x5adc1c(0x204),'TYPE_REGISTERED':_0x5adc1c(0x502),'TYPE_DROP':_0x5adc1c(0x619),'ENV_OPENED':'env:opened','ENV_REMOVED':_0x5adc1c(0x4e0),'TTL_EXPIRED':_0x5adc1c(0x457),'TTL_SET':_0x5adc1c(0x584),'TTL_CLEAR':_0x5adc1c(0x590),'LICENSE_INVALID':_0x5adc1c(0x19c),'LICENSE_ADDED':_0x5adc1c(0x45c),'LICENSE_ACTIVATED':_0x5adc1c(0x1ca),'LICENSE_REMOVED':_0x5adc1c(0x369)},_0x20d21b={'CREATING':'creating','RESETTING':_0x5adc1c(0x658),'READY':_0x5adc1c(0x5de),'DROPPING':'dropping','WAITING':_0x5adc1c(0x164)},_0x4a5770={'CREATED':_0x5adc1c(0x2be),'STARTING':_0x5adc1c(0x27a),'STARTED':'started','STOPPING':_0x5adc1c(0x395),'STOPPED':'stopped'},_0x2a622d={'CREATING':_0x5adc1c(0x5be),'READY':_0x5adc1c(0x5de),'HALTED':_0x5adc1c(0x3e2),'STOPPED':'stopped','RESETTING':'resetting'},_0x46fc38=Object['freeze']({'POKE':_0x5adc1c(0x101),'DRAIN':_0x5adc1c(0x399),'TYPE_DROP':_0x5adc1c(0x20f),'PROC':_0x5adc1c(0x355)});return okdbEnums={'BUS_EVENTS':_0x46fc38,'CHANGE_ACTIONS':_0x5073ab,'EVENTS':_0x46c743,'INDEX_STATE':_0x20d21b,'OKDB_STATE':_0x4a5770,'VIEW_STATE':_0x2a622d},okdbEnums;}var okdbPubkey,hasRequiredOkdbPubkey;function requireOkdbPubkey(){const _0x4d578a=_0x4b361c;if(hasRequiredOkdbPubkey)return okdbPubkey;hasRequiredOkdbPubkey=0x1;const _0x1b810b=require$$1$1,_0x395870=require$$1,_0x52acb3=require$$2,_0x2c99c0=_0x1b810b[_0x4d578a(0xe7)](_0x395870[_0x4d578a(0x3a4)](__dirname,_0x4d578a(0x490)),_0x4d578a(0x365))[_0x4d578a(0x486)](),_0x5bac0f=_0x52acb3[_0x4d578a(0x18e)](_0x2c99c0)[_0x4d578a(0x2d6)]({'type':'spki','format':_0x4d578a(0x34a)}),_0x23aabf=_0x52acb3['createHash']('sha256')[_0x4d578a(0x251)](_0x5bac0f)[_0x4d578a(0x34c)](_0x4d578a(0x439))[_0x4d578a(0x45e)](0x0,0x10);return okdbPubkey={'PUBLIC_KEY_PEM':_0x2c99c0,'PUB_FINGERPRINT':_0x23aabf},okdbPubkey;}var okdbLicense,hasRequiredOkdbLicense;function requireOkdbLicense(){const _0x196ac9=_0x4b361c;if(hasRequiredOkdbLicense)return okdbLicense;hasRequiredOkdbLicense=0x1;const _0xaf761=require$$2,{OKDBError:_0x4640cd}=requireOkdbError(),{EVENTS:_0x551069}=requireOkdbEnums(),_0x535a30=requireOkdbLicenseCodec(),{LICENSE_TYPE_OPEN:_0x1b43e4,LICENSE_TYPE_INTERNAL:_0x43264b,OPEN_LICENSE_MAX_DURATION_MS:_0x395586}=_0x535a30,_0xd89aac=requireOkdbPubkey(),_0x4e1b2f={'LICENSED_BUILD':'true','PUBLIC_KEY_PEM':_0xd89aac[_0x196ac9(0x3b0)],'PUB_FINGERPRINT':_0xd89aac[_0x196ac9(0x10e)],'LICENSE_EXPIRED_ACTION':_0x196ac9(0x4f7)},_0x48b8b8='~licenses',_0x38eeef={'features':{'sync':![],'embeddings':![],'engines':![],'fts':!![],'timeMachine':![],'views':!![],'mcp':!![],'files':!![]},'limits':{'envs':0x2,'typesPerEnv':0xa,'syncPeers':0x0,'maxWrites':0xf4240},'_isFree':!![]};async function _0x196631(_0x4c14c5){const _0x3e88b6=_0x196ac9;!_0x4c14c5[_0x3e88b6(0x431)](_0x48b8b8)&&await _0x4c14c5[_0x3e88b6(0x428)](_0x48b8b8);}class _0x12dd99{constructor(_0x3a4d39){const _0x1382b9=_0x196ac9;this['okdb']=_0x3a4d39,this[_0x1382b9(0x2c5)]=null;}async[_0x196ac9(0x3b2)](){const _0x563fdc=_0x196ac9,_0x17a302=this[_0x563fdc(0x2d3)][_0x563fdc(0x18f)];if(!_0x17a302||!_0x17a302['hasType'](_0x48b8b8)){this['_active']=null;return;}const _0x315c24=this['okdb']['id'];let _0x19295f=null;for(const {key:_0x4aba3e,value:_0x2bd270}of _0x17a302[_0x563fdc(0x391)](_0x48b8b8)){const _0x46f4eb=this[_0x563fdc(0xed)](_0x2bd270,_0x315c24);_0x46f4eb==='active'&&!_0x19295f&&(_0x19295f={..._0x2bd270,'id':_0x4aba3e,'status':_0x46f4eb});}this[_0x563fdc(0x2c5)]=_0x19295f;if(this['_active']&&this[_0x563fdc(0x2c5)][_0x563fdc(0x400)]===_0x1b43e4){const _0x4e4d1a=Math[_0x563fdc(0x602)]((this[_0x563fdc(0x2c5)]['expiresAt']-Date[_0x563fdc(0x16a)]())/0x5265c00);this[_0x563fdc(0x2d3)][_0x563fdc(0x4f7)]?.[_0x563fdc(0x27e)](_0x563fdc(0x5f6)+_0x4e4d1a+_0x563fdc(0x246),{'feature':_0x563fdc(0x58c),'licensee':this[_0x563fdc(0x2c5)][_0x563fdc(0x56c)],'expiresAt':new Date(this['_active'][_0x563fdc(0x63c)])[_0x563fdc(0x4c8)]()});}this[_0x563fdc(0x2c5)]&&this['_active'][_0x563fdc(0x400)]===_0x43264b&&this[_0x563fdc(0x2d3)][_0x563fdc(0x4f7)]?.[_0x563fdc(0x27e)](_0x563fdc(0x61b),{'feature':_0x563fdc(0x58c),'licensee':this['_active']['licensee']});}[_0x196ac9(0xed)](_0xe07c7e,_0x373277){const _0x34dadb=_0x196ac9;if(!_0xe07c7e['blob'])return _0x34dadb(0x30a);let _0x4d2a95;try{_0x4d2a95=_0x535a30[_0x34dadb(0x358)](_0xe07c7e[_0x34dadb(0x1d8)]);}catch(_0x3fe73a){return _0x34dadb(0x30a);}try{const _0x5d3deb=_0xaf761['verify'](null,_0x4d2a95['payload'],_0x4e1b2f['PUBLIC_KEY_PEM'],_0x4d2a95[_0x34dadb(0x4ff)]);if(!_0x5d3deb)return _0x34dadb(0x30a);}catch(_0x1bf032){return _0x34dadb(0x30a);}if(_0x4d2a95[_0x34dadb(0x397)][_0x34dadb(0x400)]===_0x43264b)return _0x34dadb(0x22d);if(_0x4d2a95[_0x34dadb(0x397)][_0x34dadb(0x63c)]<=Date[_0x34dadb(0x16a)]())return _0x34dadb(0x2fc);if(_0x4d2a95[_0x34dadb(0x397)]['licenseType']===_0x1b43e4)return _0x34dadb(0x22d);if(!_0xe07c7e[_0x34dadb(0x377)])return'pending';const _0x5234ea=_0x535a30[_0x34dadb(0x105)]({'tokenString':_0xe07c7e[_0x34dadb(0x377)],'nodeId':_0x373277,'rawBlobBuf':_0x4d2a95[_0x34dadb(0x51b)],'pubKeyPem':_0x4e1b2f[_0x34dadb(0x3b0)],'pubFingerprint':_0x4e1b2f['PUB_FINGERPRINT']});if(_0x5234ea['reason']==='LICENSE_HASH_MISMATCH'||_0x5234ea[_0x34dadb(0x4bb)]===_0x34dadb(0x445))return _0x34dadb(0x469);if(_0x5234ea[_0x34dadb(0x4bb)]===_0x34dadb(0x133))return _0x34dadb(0x2fc);if(!_0x5234ea[_0x34dadb(0x654)])return'wrong_node';return _0x34dadb(0x22d);}get[_0x196ac9(0x22d)](){const _0x5bb9a8=_0x196ac9;return this[_0x5bb9a8(0x2c5)];}get[_0x196ac9(0x21b)](){const _0x2e6b02=_0x196ac9;return this[_0x2e6b02(0x2c5)]??_0x38eeef;}[_0x196ac9(0x639)](_0x289922){const _0x5cd16d=_0x196ac9;if(_0x4e1b2f[_0x5cd16d(0x3bb)]!==_0x5cd16d(0x5e1))return;const _0x44afa0=this[_0x5cd16d(0x21b)];if(!_0x44afa0[_0x5cd16d(0x26d)]?.[_0x289922]){const _0xe2ea72=_0x44afa0['_isFree']?_0x5cd16d(0x275)+_0x289922+'.\x20Add\x20a\x20license\x20that\x20includes\x20\x22'+_0x289922+_0x5cd16d(0x35c):'Feature\x20not\x20licensed:\x20'+_0x289922+_0x5cd16d(0x147)+_0x289922+'\x22.';throw new _0x4640cd(_0xe2ea72,_0x5cd16d(0x367),{'feature':_0x289922});}}[_0x196ac9(0x39b)](_0x46fc31){const _0x272d02=_0x196ac9;if(_0x4e1b2f[_0x272d02(0x3bb)]!==_0x272d02(0x5e1))return!![];return!!this[_0x272d02(0x21b)][_0x272d02(0x26d)]?.[_0x46fc31];}[_0x196ac9(0x285)](_0x23a68a,_0x483542){const _0x1c377f=_0x196ac9;if(_0x4e1b2f['LICENSED_BUILD']!==_0x1c377f(0x5e1))return;const _0x52b7b3=this[_0x1c377f(0x21b)],_0x155cf3=_0x52b7b3[_0x1c377f(0x546)]?.[_0x23a68a];if(_0x155cf3===null||_0x155cf3===undefined||_0x155cf3===0x0)return;if(_0x483542>=_0x155cf3)throw new _0x4640cd(_0x1c377f(0x23c)+_0x23a68a+'\x20('+_0x483542+'/'+_0x155cf3+')','LICENSE_LIMIT_EXCEEDED',{'limit':_0x23a68a,'current':_0x483542,'max':_0x155cf3});}async[_0x196ac9(0x313)](_0x154cf7){const _0x35ba2c=_0x196ac9;let _0x1b3a5d;try{_0x1b3a5d=_0x535a30[_0x35ba2c(0x358)](_0x154cf7);}catch(_0x196aef){throw new _0x4640cd(_0x35ba2c(0xf5)+_0x196aef[_0x35ba2c(0x29c)],_0x35ba2c(0x3eb));}let _0x34c1b9;try{_0x34c1b9=_0xaf761['verify'](null,_0x1b3a5d['payload'],_0x4e1b2f[_0x35ba2c(0x3b0)],_0x1b3a5d[_0x35ba2c(0x4ff)]);}catch(_0x5b6dde){throw new _0x4640cd(_0x35ba2c(0x245)+_0x5b6dde['message'],'LICENSE_INVALID');}if(!_0x34c1b9)throw new _0x4640cd(_0x35ba2c(0x568)+('Build\x20expects\x20public\x20key\x20fingerprint\x20'+_0x4e1b2f[_0x35ba2c(0x10e)]+'.\x20')+_0x35ba2c(0x353),_0x35ba2c(0x3eb),{'expectedFingerprint':_0x4e1b2f[_0x35ba2c(0x10e)]});if(_0x1b3a5d[_0x35ba2c(0x397)][_0x35ba2c(0x400)]===_0x1b43e4){const _0x4a6500=_0x1b3a5d[_0x35ba2c(0x397)][_0x35ba2c(0x63c)]-_0x1b3a5d['decoded'][_0x35ba2c(0x1d9)];if(_0x4a6500>_0x395586)throw new _0x4640cd('Open\x20licenses\x20cannot\x20exceed\x206\x20months\x20duration\x20(this\x20license\x20expires\x20'+Math[_0x35ba2c(0x602)](_0x4a6500/(0x1e*0x5265c00))+'\x20months\x20from\x20issuance)',_0x35ba2c(0x3eb));}const _0x36f8af=this[_0x35ba2c(0x2d3)][_0x35ba2c(0x18f)];await _0x196631(_0x36f8af);const _0x37c967=_0x535a30[_0x35ba2c(0x655)](_0x1b3a5d[_0x35ba2c(0x51b)])[_0x35ba2c(0x261)](_0x35ba2c(0x439));for(const {value:_0x7fdfe3}of _0x36f8af[_0x35ba2c(0x391)](_0x48b8b8)){if(_0x7fdfe3[_0x35ba2c(0xe9)]===_0x37c967)throw new _0x4640cd('License\x20already\x20stored',_0x35ba2c(0x3eb));}const _0x5068b1=_0xaf761[_0x35ba2c(0x3ba)](),_0x29e0b7={'blob':_0x154cf7,'activation':null,'addedAt':Date['now'](),'_licenseHash':_0x37c967,'licensee':_0x1b3a5d[_0x35ba2c(0x397)]['licensee'],'expiresAt':_0x1b3a5d[_0x35ba2c(0x397)][_0x35ba2c(0x63c)],'features':_0x1b3a5d[_0x35ba2c(0x397)]['features'],'limits':_0x1b3a5d[_0x35ba2c(0x397)][_0x35ba2c(0x546)],'licenseType':_0x1b3a5d[_0x35ba2c(0x397)][_0x35ba2c(0x400)]};return await _0x36f8af[_0x35ba2c(0x42f)](_0x48b8b8,_0x5068b1,_0x29e0b7),{'id':_0x5068b1,..._0x29e0b7};}async[_0x196ac9(0x541)](_0x544d5d){const _0x92c3ac=_0x196ac9;let _0x5d7230;try{_0x5d7230=_0x535a30['decodeActivationToken'](_0x544d5d);}catch(_0x44be7e){throw new _0x4640cd(_0x92c3ac(0x64a)+_0x44be7e[_0x92c3ac(0x29c)],_0x92c3ac(0x529));}const _0x190241=_0x5d7230['licenseHash'][_0x92c3ac(0x261)](_0x92c3ac(0x439)),_0x5186de=this[_0x92c3ac(0x2d3)][_0x92c3ac(0x18f)];if(!_0x5186de||!_0x5186de[_0x92c3ac(0x431)](_0x48b8b8))throw new _0x4640cd(_0x92c3ac(0x63f),_0x92c3ac(0x529));let _0x22f60d=null,_0x79b29b=null;for(const {key:_0x48dc30,value:_0xeeb963}of _0x5186de['getRange'](_0x48b8b8)){if(_0xeeb963[_0x92c3ac(0xe9)]===_0x190241){_0x22f60d=_0x48dc30,_0x79b29b=_0xeeb963;break;}}if(!_0x22f60d)throw new _0x4640cd(_0x92c3ac(0x63f),_0x92c3ac(0x529));const {rawBuf:_0x1b26fa}=_0x535a30['decodeLicenseBlob'](_0x79b29b[_0x92c3ac(0x1d8)]),_0x48689f=_0x535a30[_0x92c3ac(0x105)]({'tokenString':_0x544d5d,'nodeId':this[_0x92c3ac(0x2d3)]['id'],'rawBlobBuf':_0x1b26fa,'pubKeyPem':_0x4e1b2f[_0x92c3ac(0x3b0)],'pubFingerprint':_0x4e1b2f[_0x92c3ac(0x10e)]});if(!_0x48689f[_0x92c3ac(0x654)])throw new _0x4640cd(_0x92c3ac(0x643)+_0x48689f[_0x92c3ac(0x4bb)],_0x92c3ac(0x529),{'reason':_0x48689f[_0x92c3ac(0x4bb)]});const _0x2b4b44={..._0x79b29b,'activation':_0x544d5d};return await _0x5186de['update'](_0x48b8b8,_0x22f60d,_0x2b4b44),{'id':_0x22f60d,..._0x2b4b44};}async['removeLicense'](_0x1047ca){const _0x2772ae=_0x196ac9,_0x50d9a1=this[_0x2772ae(0x2d3)][_0x2772ae(0x18f)];if(!_0x50d9a1||!_0x50d9a1[_0x2772ae(0x431)](_0x48b8b8))return;await _0x50d9a1[_0x2772ae(0x1b1)](_0x48b8b8,_0x1047ca);}async['listLicenses'](){const _0x1f85ad=_0x196ac9,_0xb7519b=this['okdb'][_0x1f85ad(0x18f)];if(!_0xb7519b||!_0xb7519b[_0x1f85ad(0x431)](_0x48b8b8))return[];const _0x4a99b3=this[_0x1f85ad(0x2d3)]['id'],_0x25bf36=[];for(const {key:_0x17dc33,value:_0x430044}of _0xb7519b['getRange'](_0x48b8b8)){const _0x35abed=this[_0x1f85ad(0xed)](_0x430044,_0x4a99b3);_0x25bf36[_0x1f85ad(0x614)]({..._0x430044,'id':_0x17dc33,'status':_0x35abed});}return _0x25bf36;}[_0x196ac9(0x23a)](){const _0x4ca620=_0x196ac9,_0x3a8d22=this[_0x4ca620(0x2d3)][_0x4ca620(0x18f)];if(!_0x3a8d22||!_0x3a8d22[_0x4ca620(0x431)](_0x48b8b8))return[];const _0x3e527c=this[_0x4ca620(0x2d3)]['id'],_0x48461e=[];for(const {key:_0x3922d4,value:_0x17e1b6}of _0x3a8d22[_0x4ca620(0x391)](_0x48b8b8)){if(_0x17e1b6['_licenseHash']){if(_0x17e1b6[_0x4ca620(0x400)]===_0x1b43e4)_0x48461e['push']({'licenseId':_0x3922d4,'pin':null});else{const _0x32a221=Buffer['from'](_0x17e1b6['_licenseHash'],_0x4ca620(0x439)),{pin:_0x4bf445}=_0x535a30['derivePin'](_0x3e527c,_0x32a221,_0x4e1b2f[_0x4ca620(0x10e)]);_0x48461e[_0x4ca620(0x614)]({'licenseId':_0x3922d4,'pin':_0x4bf445});}}}return _0x48461e;}async[_0x196ac9(0x5e4)](){const _0x3d9cc6=_0x196ac9,_0x1e4f16=this['_active'];await this[_0x3d9cc6(0x3b2)]();if(this[_0x3d9cc6(0x2c5)]&&this[_0x3d9cc6(0x2c5)]['licenseType']===_0x1b43e4){const _0xf928f0=Math[_0x3d9cc6(0x602)]((this[_0x3d9cc6(0x2c5)]['expiresAt']-Date[_0x3d9cc6(0x16a)]())/0x5265c00);this[_0x3d9cc6(0x2d3)][_0x3d9cc6(0x4f7)]?.[_0x3d9cc6(0x27e)](_0x3d9cc6(0x5f6)+_0xf928f0+_0x3d9cc6(0x246),{'feature':_0x3d9cc6(0x58c),'licensee':this[_0x3d9cc6(0x2c5)]['licensee'],'expiresAt':new Date(this[_0x3d9cc6(0x2c5)][_0x3d9cc6(0x63c)])[_0x3d9cc6(0x4c8)]()});}this[_0x3d9cc6(0x2c5)]&&this[_0x3d9cc6(0x2c5)][_0x3d9cc6(0x400)]===_0x43264b&&this[_0x3d9cc6(0x2d3)][_0x3d9cc6(0x4f7)]?.[_0x3d9cc6(0x27e)](_0x3d9cc6(0x61b),{'feature':_0x3d9cc6(0x58c),'licensee':this['_active'][_0x3d9cc6(0x56c)]});if(_0x1e4f16&&!this[_0x3d9cc6(0x2c5)]){this[_0x3d9cc6(0x2d3)][_0x3d9cc6(0x4f7)]?.[_0x3d9cc6(0x27e)](_0x3d9cc6(0x670),{'feature':_0x3d9cc6(0x58c)}),this[_0x3d9cc6(0x2d3)][_0x3d9cc6(0x4e5)]?.['emit'](_0x551069[_0x3d9cc6(0x3eb)],{'previous':_0x1e4f16});const _0x439c39=this['okdb']['options']?.[_0x3d9cc6(0x55b)]??_0x4e1b2f['LICENSE_EXPIRED_ACTION'];_0x439c39===_0x3d9cc6(0x2d9)&&(this[_0x3d9cc6(0x2d3)][_0x3d9cc6(0x4f7)]?.[_0x3d9cc6(0x31b)](_0x3d9cc6(0x5eb),{'feature':_0x3d9cc6(0x58c)}),this[_0x3d9cc6(0x2d3)][_0x3d9cc6(0x241)]()[_0x3d9cc6(0x255)](()=>{})['finally'](()=>process[_0x3d9cc6(0x542)](0x1)));}}}return okdbLicense={'LicenseChecker':_0x12dd99,'_C':_0x4e1b2f},okdbLicense;}var okdbShell,hasRequiredOkdbShell;function requireOkdbShell(){const _0x4cdaa0=_0x4b361c;if(hasRequiredOkdbShell)return okdbShell;hasRequiredOkdbShell=0x1;const _0x722dec=require$$0$2,_0x1f435f=require$$1$1,_0x1c9745=require$$0,_0x2addee=require$$1,_0x32c291=_0x2addee['join'](_0x1c9745[_0x4cdaa0(0x422)](),_0x4cdaa0(0x2b0)),_0x2536e3=0x3e8,_0x21ec5b={'reset':_0x4cdaa0(0x337),'bold':'\x1b[1m','dim':'\x1b[2m','red':_0x4cdaa0(0x5ae),'green':_0x4cdaa0(0x1c9),'yellow':_0x4cdaa0(0x185),'blue':_0x4cdaa0(0x242),'magenta':_0x4cdaa0(0x606),'cyan':'\x1b[36m','white':'\x1b[37m','gray':_0x4cdaa0(0x142)},_0x38ab9a=!process['stdout']['isTTY']||!!process.env.NO_COLOR,_0x2ad0ce=(_0x2464a7,_0xb53040)=>_0x38ab9a?_0xb53040:''+_0x2464a7+_0xb53040+_0x21ec5b[_0x4cdaa0(0x1c2)],_0x4f3a9b={'error':_0x21ec5b[_0x4cdaa0(0x4df)],'warn':_0x21ec5b['yellow'],'info':_0x21ec5b[_0x4cdaa0(0x1f9)],'debug':_0x21ec5b[_0x4cdaa0(0x145)]},_0x43e787={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3};function _0x4c4864(_0x47cf56,_0x5190ee=_0x4cdaa0(0x3d7)){const _0x1f09d6=_0x4cdaa0,{level:_0x138f39,msg:_0x58fe47,meta:_0x2f542b,context:_0x443596,ts:_0x374779}=_0x47cf56;if((_0x43e787[_0x138f39]??0x1)<(_0x43e787[_0x5190ee]??0x1))return;const _0x12f1af=_0x2ad0ce(_0x21ec5b[_0x1f09d6(0x145)],new Date(_0x374779)['toISOString']()),_0x2c2e3b=_0x2ad0ce(_0x4f3a9b[_0x138f39]??_0x21ec5b[_0x1f09d6(0x540)],_0x138f39['padEnd'](0x5));let _0x49aa76='\x20\x20'+_0x12f1af+'\x20'+_0x2ad0ce(_0x21ec5b[_0x1f09d6(0x5e8)],_0x2c2e3b)+'\x20'+_0x58fe47;if(_0x2f542b&&Object[_0x1f09d6(0x2f1)](_0x2f542b)['length']>0x0){const _0x9299b=Object[_0x1f09d6(0x427)](_0x2f542b)['map'](([_0x1184bd,_0x24a78a])=>_0x1184bd+'='+_0x24a78a)['join']('\x20');_0x49aa76+=_0x2ad0ce(_0x21ec5b[_0x1f09d6(0x1bc)],_0x1f09d6(0x56e)+_0x9299b+']');}if(_0x443596!==undefined){const _0x3c7da8=typeof _0x443596===_0x1f09d6(0x20e)?JSON[_0x1f09d6(0x3d9)](_0x443596):String(_0x443596);_0x49aa76+=_0x2ad0ce(_0x21ec5b[_0x1f09d6(0x1bc)],'\x20\x20'+_0x3c7da8);}const _0x102c96=_0x138f39==='error'||_0x138f39===_0x1f09d6(0x27e)?process[_0x1f09d6(0x16f)][_0x1f09d6(0x4ae)][_0x1f09d6(0x42c)](process[_0x1f09d6(0x16f)]):process[_0x1f09d6(0x559)][_0x1f09d6(0x4ae)]['bind'](process[_0x1f09d6(0x559)]);_0x102c96(_0x49aa76+'\x0a');}function _0x17e613(_0x488e8a,_0x122b5b){const _0x3dd784=_0x4cdaa0;if(_0x488e8a===0xcc||_0x488e8a>=0xc8&&_0x488e8a<0x12c&&!_0x122b5b){console['log']('\x0a\x20\x20'+_0x2ad0ce(_0x21ec5b[_0x3dd784(0x22b)],'✓')+'\x0a');return;}if(_0x488e8a>=0x190||_0x122b5b?.[_0x3dd784(0x31b)]){const _0x49bcc9=_0x122b5b?.[_0x3dd784(0x31b)]??_0x122b5b?.['message']??_0x3dd784(0x356)+_0x488e8a;console['log'](_0x3dd784(0x675)+_0x2ad0ce(_0x21ec5b[_0x3dd784(0x4df)],'✗')+'\x20'+_0x2ad0ce(_0x21ec5b[_0x3dd784(0x5e8)]+_0x21ec5b[_0x3dd784(0x4df)],String(_0x488e8a))+'\x20\x20'+_0x49bcc9+'\x0a');return;}const _0x5137f0=Object[_0x3dd784(0x258)][_0x3dd784(0x51a)]['call'](_0x122b5b??{},_0x3dd784(0x657))?_0x122b5b[_0x3dd784(0x657)]:_0x122b5b,_0xdcdc8e=_0x122b5b?.['meta'];console[_0x3dd784(0x4f7)](''),_0x58e442(_0x5137f0,'\x20\x20');if(_0xdcdc8e?.['count']!=null||_0xdcdc8e?.[_0x3dd784(0x209)]!=null){const _0x6a9ba9=[];if(_0xdcdc8e[_0x3dd784(0x5ec)]!=null)_0x6a9ba9['push'](_0xdcdc8e[_0x3dd784(0x5ec)]+'\x20result'+(_0xdcdc8e[_0x3dd784(0x5ec)]!==0x1?'s':''));if(_0xdcdc8e['time']!=null)_0x6a9ba9[_0x3dd784(0x614)](_0xdcdc8e[_0x3dd784(0x209)]+'ms');console[_0x3dd784(0x4f7)]('\x0a\x20\x20'+_0x2ad0ce(_0x21ec5b[_0x3dd784(0x1bc)],_0x6a9ba9['join'](_0x3dd784(0x637))));}console[_0x3dd784(0x4f7)]('');}function _0x58e442(_0x3f2f93,_0x24863e=''){const _0x73dfb6=_0x4cdaa0;if(_0x3f2f93===null||_0x3f2f93===undefined){console[_0x73dfb6(0x4f7)](_0x24863e+_0x2ad0ce(_0x21ec5b['dim'],_0x73dfb6(0x35b)));return;}if(Array[_0x73dfb6(0x579)](_0x3f2f93)){if(_0x3f2f93[_0x73dfb6(0x2eb)]===0x0){console['log'](_0x24863e+_0x2ad0ce(_0x21ec5b[_0x73dfb6(0x1bc)],'(empty)'));return;}if(_0x3f2f93[_0x73dfb6(0x171)](_0x3a51e3=>_0x3a51e3&&typeof _0x3a51e3===_0x73dfb6(0x20e)&&_0x73dfb6(0x174)in _0x3a51e3&&_0x73dfb6(0x392)in _0x3a51e3)){_0x485521(_0x3f2f93,_0x24863e);return;}if(_0x3f2f93[_0x73dfb6(0x171)](_0x58d8fe=>_0x58d8fe&&typeof _0x58d8fe===_0x73dfb6(0x20e)&&_0x73dfb6(0x49b)in _0x58d8fe&&_0x73dfb6(0x5ec)in _0x58d8fe)){_0x3edbf0(_0x3f2f93,_0x24863e);return;}if(_0x3f2f93[_0x73dfb6(0x171)](_0x2a41d5=>typeof _0x2a41d5!==_0x73dfb6(0x20e)||_0x2a41d5===null)){_0x3f2f93[_0x73dfb6(0x612)]((_0x1311d3,_0x444354)=>console['log'](_0x24863e+_0x2ad0ce(_0x21ec5b[_0x73dfb6(0x145)],_0x444354+0x1+'.')+'\x20'+_0x2ad0ce(_0x21ec5b[_0x73dfb6(0x540)],String(_0x1311d3))));return;}_0x3f2f93[_0x73dfb6(0x612)]((_0x45908d,_0x2bee75)=>{const _0x58761c=_0x73dfb6;console[_0x58761c(0x4f7)](_0x24863e+_0x2ad0ce(_0x21ec5b[_0x58761c(0x1bc)],'['+_0x2bee75+']'));if(typeof _0x45908d===_0x58761c(0x20e)&&_0x45908d!==null)_0xd22dc3(_0x45908d,_0x24863e+'\x20\x20');else console[_0x58761c(0x4f7)](_0x24863e+'\x20\x20'+String(_0x45908d));});return;}if(typeof _0x3f2f93===_0x73dfb6(0x20e)){if('key'in _0x3f2f93&&'value'in _0x3f2f93&&Object[_0x73dfb6(0x2f1)](_0x3f2f93)['length']<=0x3){console[_0x73dfb6(0x4f7)](_0x24863e+_0x2ad0ce(_0x21ec5b[_0x73dfb6(0x5e8)]+_0x21ec5b[_0x73dfb6(0x1f9)],String(_0x3f2f93[_0x73dfb6(0x174)])));const _0x3c3e2b=_0x3f2f93[_0x73dfb6(0x392)];if(_0x3c3e2b&&typeof _0x3c3e2b==='object')_0xd22dc3(_0x3c3e2b,_0x24863e);else console[_0x73dfb6(0x4f7)](_0x24863e+_0x2ad0ce(_0x21ec5b[_0x73dfb6(0x540)],String(_0x3c3e2b)));return;}_0xd22dc3(_0x3f2f93,_0x24863e);return;}console[_0x73dfb6(0x4f7)](_0x24863e+_0x2ad0ce(_0x21ec5b[_0x73dfb6(0x540)],String(_0x3f2f93)));}function _0xd22dc3(_0x37c2d5,_0x5587db=''){const _0x31722d=_0x4cdaa0,_0x493b7c=Object[_0x31722d(0x427)](_0x37c2d5);if(_0x493b7c[_0x31722d(0x2eb)]===0x0){console['log'](_0x5587db+_0x2ad0ce(_0x21ec5b['dim'],'{}'));return;}const _0x338c56=Math[_0x31722d(0x138)](0x1c,Math['max'](..._0x493b7c['map'](([_0x520f97])=>_0x520f97['length'])));for(const [_0x53be3a,_0x13ce78]of _0x493b7c){const _0x1ab362=_0x2ad0ce(_0x21ec5b[_0x31722d(0x1f9)],_0x53be3a[_0x31722d(0x2c9)](_0x338c56));if(_0x13ce78===null||_0x13ce78===undefined)console['log'](_0x5587db+_0x1ab362+'\x20\x20'+_0x2ad0ce(_0x21ec5b['dim'],_0x31722d(0x2e8)));else{if(typeof _0x13ce78===_0x31722d(0x20e)){const _0x26db24=JSON[_0x31722d(0x3d9)](_0x13ce78);_0x26db24[_0x31722d(0x2eb)]<=0x50?console[_0x31722d(0x4f7)](_0x5587db+_0x1ab362+'\x20\x20'+_0x2ad0ce(_0x21ec5b[_0x31722d(0x1bc)],_0x26db24)):(console[_0x31722d(0x4f7)](_0x5587db+_0x1ab362),_0x58e442(_0x13ce78,_0x5587db+'\x20\x20'));}else{const _0x166d60=typeof _0x13ce78===_0x31722d(0x455)?_0x2ad0ce(_0x13ce78?_0x21ec5b['green']:_0x21ec5b[_0x31722d(0x577)],String(_0x13ce78)):typeof _0x13ce78===_0x31722d(0x17c)?_0x2ad0ce(_0x21ec5b[_0x31722d(0x5a0)],String(_0x13ce78)):_0x2ad0ce(_0x21ec5b[_0x31722d(0x540)],String(_0x13ce78));console['log'](_0x5587db+_0x1ab362+'\x20\x20'+_0x166d60);}}}}function _0x485521(_0x1c1275,_0x3a0591=''){const _0x45d9b9=_0x4cdaa0,_0x29fe48=Math[_0x45d9b9(0x138)](0x20,Math[_0x45d9b9(0x47e)](..._0x1c1275[_0x45d9b9(0x601)](_0x11bb54=>String(_0x11bb54[_0x45d9b9(0x174)])[_0x45d9b9(0x2eb)])));for(const {key:_0x363eb7,value:_0x4916eb,score:_0x4b692d,clock:_0x47633e}of _0x1c1275){const _0x17c98d=_0x2ad0ce(_0x21ec5b['bold']+_0x21ec5b[_0x45d9b9(0x1f9)],String(_0x363eb7)['padEnd'](_0x29fe48)),_0x3a35e4=_0x4916eb==null?_0x2ad0ce(_0x21ec5b['dim'],_0x45d9b9(0x2e8)):typeof _0x4916eb===_0x45d9b9(0x20e)?_0x2ad0ce(_0x21ec5b[_0x45d9b9(0x1bc)],JSON[_0x45d9b9(0x3d9)](_0x4916eb)):_0x2ad0ce(_0x21ec5b['white'],String(_0x4916eb)),_0x2d1f87=_0x4b692d!=null?_0x2ad0ce(_0x21ec5b['gray'],_0x45d9b9(0x1f1)+_0x4b692d[_0x45d9b9(0x4a8)](0x4)):'',_0x233f6f=_0x47633e!=null?_0x2ad0ce(_0x21ec5b[_0x45d9b9(0x145)],_0x45d9b9(0x514)+_0x47633e):'';console['log'](_0x3a0591+_0x17c98d+'\x20\x20'+_0x3a35e4+_0x2d1f87+_0x233f6f);}}function _0x3edbf0(_0x16e3db,_0x112d4a=''){const _0x2f0ecd=_0x4cdaa0,_0x2672fa=Math[_0x2f0ecd(0x138)](0x20,Math[_0x2f0ecd(0x47e)](..._0x16e3db['map'](_0x478665=>_0x478665['type'][_0x2f0ecd(0x2eb)])));for(const {type:_0x1bee9c,count:_0x46443f,fields:_0x56e59e}of _0x16e3db){if(_0x1bee9c[_0x2f0ecd(0x3cc)]('~'))continue;const _0xf4a77c=_0x2ad0ce(_0x21ec5b['bold']+_0x21ec5b['cyan'],_0x1bee9c[_0x2f0ecd(0x2c9)](_0x2672fa)),_0x2a25e9=_0x2ad0ce(_0x21ec5b[_0x2f0ecd(0x5a0)],String(_0x46443f)[_0x2f0ecd(0x24d)](0x6))+_0x2ad0ce(_0x21ec5b[_0x2f0ecd(0x1bc)],_0x2f0ecd(0xfa)),_0x59dd5d=_0x56e59e&&Object['keys'](_0x56e59e)[_0x2f0ecd(0x2eb)]?_0x2ad0ce(_0x21ec5b[_0x2f0ecd(0x1bc)],_0x2f0ecd(0x1db)+Object['keys'](_0x56e59e)[_0x2f0ecd(0x45e)](0x0,0x6)[_0x2f0ecd(0x3a4)](',\x20')+(Object[_0x2f0ecd(0x2f1)](_0x56e59e)['length']>0x6?'…':'')):'';console[_0x2f0ecd(0x4f7)](_0x112d4a+_0xf4a77c+'\x20\x20'+_0x2a25e9+_0x59dd5d);}}const _0x19fec0=[_0x4cdaa0(0x161),_0x4cdaa0(0x4bf),_0x4cdaa0(0x28a),'files/','transaction',_0x4cdaa0(0x54b)];function _0x121b52(_0x25e6ff,_0x157e94){const _0x599f81=_0x4cdaa0;if(_0x25e6ff[_0x599f81(0x3cc)](_0x599f81(0x3b1)))return _0x25e6ff;if(_0x25e6ff['startsWith']('/'))return _0x599f81(0x253)+_0x25e6ff;if(_0x25e6ff[_0x599f81(0x3cc)](_0x599f81(0x3d2)))return'/api/'+_0x25e6ff;const _0xdbecb8=_0x19fec0[_0x599f81(0x28c)](_0x325f5f=>_0x25e6ff===_0x325f5f[_0x599f81(0x38b)](/\/$/,'')||_0x25e6ff['startsWith'](_0x325f5f));return _0xdbecb8?_0x599f81(0x1be)+_0x157e94+'/'+_0x25e6ff:_0x599f81(0x3b1)+_0x25e6ff;}function _0x4454a8(_0x3ea845){const _0x231f42=_0x4cdaa0,_0x5773db={},_0x1f150b=[];let _0x93f7fe=0x0;while(_0x93f7fe<_0x3ea845[_0x231f42(0x2eb)]){if((_0x3ea845[_0x93f7fe]===_0x231f42(0x3c4)||_0x3ea845[_0x93f7fe]==='-e')&&_0x3ea845[_0x93f7fe+0x1]&&!_0x3ea845[_0x93f7fe+0x1][_0x231f42(0x3cc)]('-'))_0x5773db[_0x231f42(0x46e)]=_0x3ea845[++_0x93f7fe];else _0x3ea845[_0x93f7fe]===_0x231f42(0x44b)||_0x3ea845[_0x93f7fe]==='-h'?_0x5773db['help']=!![]:_0x1f150b[_0x231f42(0x614)](_0x3ea845[_0x93f7fe]);_0x93f7fe++;}return{'flags':_0x5773db,'rest':_0x1f150b};}const _0x7b0183={'system':_0x4cdaa0(0x569),'envs':_0x4cdaa0(0x4d3),'types':_0x4cdaa0(0x2f6),'data':_0x4cdaa0(0x172),'indexes':'Indexes','fts':_0x4cdaa0(0x474),'sync':_0x4cdaa0(0x1b6),'queue':_0x4cdaa0(0x2ac),'files':_0x4cdaa0(0x177),'embeddings':'Embeddings','engines':'Engines','admin':_0x4cdaa0(0x570),'event':_0x4cdaa0(0x1f4),'processor':'Processors'},_0x1776aa=[_0x4cdaa0(0x268),_0x4cdaa0(0xec),_0x4cdaa0(0x161),_0x4cdaa0(0x206),'indexes',_0x4cdaa0(0x458),'sync','queue',_0x4cdaa0(0x150),'embeddings',_0x4cdaa0(0x238),_0x4cdaa0(0x27f)];function _0x40a1f5(_0x44adee){const _0x49808a=_0x4cdaa0;return _0x44adee[_0x49808a(0x38b)](/^\/api/,'')[_0x49808a(0x38b)](/^\[\/env\/:env=[^\]]*\]/,_0x49808a(0x11c))[_0x49808a(0x38b)](/^\/env\/:env/,'env/:env')[_0x49808a(0x38b)](/^\//,'');}function _0x192571(_0x56e948,_0x56b328=''){const _0x508034=_0x4cdaa0,_0x55df9f=_0x56e948[_0x508034(0x5d0)][_0x508034(0x33c)]()[_0x508034(0x1c6)](_0x496f6b=>!_0x496f6b[_0x508034(0x664)]?.['hidden']),_0x313e9a=_0x56b328?_0x55df9f[_0x508034(0x1c6)](_0xa2f633=>_0xa2f633[_0x508034(0x42d)][_0x508034(0x3f1)]()['includes'](_0x56b328[_0x508034(0x3f1)]())||(_0x196b8a(_0xa2f633)??'')[_0x508034(0x3f1)]()[_0x508034(0x5c0)](_0x56b328[_0x508034(0x3f1)]())||_0x212050(_0xa2f633)['some'](_0x34f643=>_0x34f643[_0x508034(0x3f1)]()[_0x508034(0x5c0)](_0x56b328['toLowerCase']()))):_0x55df9f;if(!_0x313e9a[_0x508034(0x2eb)]){console['log'](_0x2ad0ce(_0x21ec5b[_0x508034(0x577)],_0x508034(0x430)+_0x56b328+'\x22\x0a'));return;}const _0x4574ff=new Map();for(const _0x25cf5e of _0x313e9a){const _0x5950ff=_0x212050(_0x25cf5e)[0x0]??_0x508034(0x1c7);if(!_0x4574ff[_0x508034(0x39f)](_0x5950ff))_0x4574ff[_0x508034(0x2c2)](_0x5950ff,[]);_0x4574ff[_0x508034(0x3aa)](_0x5950ff)[_0x508034(0x614)](_0x25cf5e);}const _0x2e0a60=[..._0x1776aa[_0x508034(0x1c6)](_0x3a710c=>_0x4574ff[_0x508034(0x39f)](_0x3a710c)),...[..._0x4574ff[_0x508034(0x2f1)]()][_0x508034(0x1c6)](_0x237a2c=>!_0x1776aa[_0x508034(0x5c0)](_0x237a2c))];console[_0x508034(0x4f7)]('');for(const _0x3e9b52 of _0x2e0a60){const _0x3b993c=_0x4574ff[_0x508034(0x3aa)](_0x3e9b52);if(!_0x3b993c?.[_0x508034(0x2eb)])continue;console[_0x508034(0x4f7)](_0x2ad0ce(_0x21ec5b[_0x508034(0x5e8)],'\x20\x20'+(_0x7b0183[_0x3e9b52]??_0x3e9b52)));for(const _0x510c05 of _0x3b993c){const _0x2fa994=_0x2ad0ce(_0x21ec5b[_0x508034(0x5a0)],_0x510c05[_0x508034(0x527)][_0x508034(0x2c9)](0x7)),_0x47ca4e=_0x2ad0ce(_0x21ec5b[_0x508034(0x1f9)],_0x40a1f5(_0x510c05[_0x508034(0x42d)])),_0x53f8c6=_0x196b8a(_0x510c05)?_0x2ad0ce(_0x21ec5b[_0x508034(0x1bc)],'\x20\x20'+_0x196b8a(_0x510c05)):'',_0x46d2b8=_0x510c05[_0x508034(0x3d5)]?.['id']?_0x2ad0ce(_0x21ec5b[_0x508034(0x145)],'\x20\x20['+_0x510c05[_0x508034(0x3d5)]['id']+']'):'';console[_0x508034(0x4f7)](_0x508034(0x3cf)+_0x2fa994+'\x20'+_0x47ca4e+_0x53f8c6+_0x46d2b8);}console[_0x508034(0x4f7)]('');}}function _0x7df7db(_0x272928,_0x2f2c3d){const _0x290216=_0x4cdaa0,_0xe69ab2=_0x2f2c3d[_0x290216(0x38b)](/^\/api(\/env\/[^/]+)?\//,'')[_0x290216(0x37c)]('/')[0x0],_0x471867=_0x272928[_0x290216(0x5d0)][_0x290216(0x33c)]()[_0x290216(0x1c6)](_0x53d713=>_0x53d713[_0x290216(0x42d)][_0x290216(0x3f1)]()[_0x290216(0x5c0)](_0xe69ab2['toLowerCase']()));if(!_0x471867['length']){console['log'](_0x2ad0ce(_0x21ec5b['yellow'],'\x0a\x20\x20No\x20documentation\x20found\x20for:\x20'+_0x2f2c3d+'\x0a'));return;}console[_0x290216(0x4f7)]('');for(const _0xe31fc5 of _0x471867['slice'](0x0,0xc)){for(const _0x5bf1c2 of _0x5e930(_0xe31fc5)){console['log'](_0x5bf1c2);}console[_0x290216(0x4f7)]('');}}function _0x196b8a(_0xf143b){const _0x3659bc=_0x4cdaa0;return _0xf143b['operation']?.[_0x3659bc(0x319)]??_0xf143b[_0x3659bc(0x664)]?.[_0x3659bc(0x319)]??'';}function _0xd347e5(_0x409b0d){const _0x35836b=_0x4cdaa0;return _0x409b0d[_0x35836b(0x3d5)]?.[_0x35836b(0x413)]??_0x409b0d['meta']?.['description']??'';}function _0x212050(_0x5184b9){const _0x572338=_0x4cdaa0;return _0x5184b9[_0x572338(0x3d5)]?.[_0x572338(0x4b8)]?.[_0x572338(0x2eb)]?_0x5184b9['operation'][_0x572338(0x4b8)]:_0x5184b9[_0x572338(0x664)]?.[_0x572338(0x4b8)]??[];}function _0x5e930(_0x55aec5){const _0x1ca64e=_0x4cdaa0,_0x298d08=[];_0x298d08[_0x1ca64e(0x614)]('\x20\x20'+_0x2ad0ce(_0x21ec5b['bold']+_0x21ec5b['magenta'],_0x55aec5['method'][_0x1ca64e(0x2c9)](0x7))+'\x20'+_0x2ad0ce(_0x21ec5b[_0x1ca64e(0x5e8)]+_0x21ec5b[_0x1ca64e(0x1f9)],_0x55aec5['path']));_0x55aec5['operation']?.['id']&&_0x298d08[_0x1ca64e(0x614)](_0x1ca64e(0x488)+_0x2ad0ce(_0x21ec5b[_0x1ca64e(0x145)],_0x1ca64e(0x589)+_0x55aec5['operation']['id']));_0x196b8a(_0x55aec5)&&_0x298d08[_0x1ca64e(0x614)](_0x1ca64e(0x488)+_0x2ad0ce(_0x21ec5b['white'],_0x196b8a(_0x55aec5)));_0xd347e5(_0x55aec5)&&_0x298d08[_0x1ca64e(0x614)](_0x1ca64e(0x488)+_0x2ad0ce(_0x21ec5b[_0x1ca64e(0x1bc)],_0xd347e5(_0x55aec5)));_0x212050(_0x55aec5)['length']&&_0x298d08['push'](_0x1ca64e(0x488)+_0x2ad0ce(_0x21ec5b[_0x1ca64e(0x145)],_0x1ca64e(0x2c7)+_0x212050(_0x55aec5)[_0x1ca64e(0x3a4)](',\x20')));_0x55aec5[_0x1ca64e(0x3d5)]?.['safety']?.[_0x1ca64e(0x35d)]&&_0x298d08[_0x1ca64e(0x614)](_0x1ca64e(0x488)+_0x2ad0ce(_0x21ec5b['gray'],_0x1ca64e(0x29f)+_0x55aec5['operation'][_0x1ca64e(0x267)][_0x1ca64e(0x35d)]));_0x55aec5[_0x1ca64e(0x3d5)]?.[_0x1ca64e(0x5d0)]?.[_0x1ca64e(0x109)]&&_0x55aec5[_0x1ca64e(0x3d5)][_0x1ca64e(0x5d0)][_0x1ca64e(0x109)]!==_0x1ca64e(0x523)&&_0x298d08['push'](_0x1ca64e(0x488)+_0x2ad0ce(_0x21ec5b[_0x1ca64e(0x145)],_0x1ca64e(0x5fc)+_0x55aec5[_0x1ca64e(0x3d5)][_0x1ca64e(0x5d0)][_0x1ca64e(0x109)]));if(_0x55aec5[_0x1ca64e(0x3d5)]?.[_0x1ca64e(0xe0)]){const _0x26a4d3=Object[_0x1ca64e(0x2f1)](_0x55aec5['operation'][_0x1ca64e(0xe0)][_0x1ca64e(0x448)]||{});if(_0x26a4d3[_0x1ca64e(0x2eb)])_0x298d08[_0x1ca64e(0x614)](_0x1ca64e(0x488)+_0x2ad0ce(_0x21ec5b['gray'],'input:\x20'+_0x26a4d3[_0x1ca64e(0x3a4)](',\x20')));}return _0x55aec5[_0x1ca64e(0x664)]?.['body']&&_0x298d08[_0x1ca64e(0x614)](_0x1ca64e(0x488)+_0x2ad0ce(_0x21ec5b[_0x1ca64e(0x145)],_0x1ca64e(0x563)+JSON['stringify'](_0x55aec5[_0x1ca64e(0x664)]['body']))),_0x298d08;}async function _0x21c433(_0x4abbbe,_0x4097b1,_0x136b6b,_0x4f1342=null){const _0x570fa8=_0x4cdaa0,_0x2a0377=_0x136b6b[_0x570fa8(0x42b)]('?'),_0x1d6b01=_0x2a0377>=0x0?_0x136b6b[_0x570fa8(0x45e)](0x0,_0x2a0377):_0x136b6b,_0x52d314=_0x2a0377>=0x0?_0x136b6b[_0x570fa8(0x45e)](_0x2a0377+0x1):'',_0x5dca7c=Object[_0x570fa8(0x3e5)](new URLSearchParams(_0x52d314)[_0x570fa8(0x427)]());return _0x4abbbe['http'][_0x570fa8(0x4f3)](_0x4097b1,_0x1d6b01,{'body':_0x4f1342,'query':_0x5dca7c,'headers':{'content-type':_0x570fa8(0x509)}},{'internal':!![]});}function _0x198e98(_0x35b6bb){const _0x50030b=_0x4cdaa0;if(!_0x35b6bb)return null;const _0x38e7e5=_0x35b6bb[_0x50030b(0x486)]();if(!_0x38e7e5)return null;try{return JSON[_0x50030b(0x34f)](_0x38e7e5);}catch{}try{return JSON[_0x50030b(0x34f)](_0x42ddea(_0x38e7e5));}catch(_0x556864){throw new SyntaxError(_0x556864[_0x50030b(0x29c)],{'cause':_0x556864});}}function _0x42ddea(_0xf6cd99){const _0x3ee4b2=_0x4cdaa0;let _0x88f26a='',_0x3a2bba=0x0;while(_0x3a2bba<_0xf6cd99[_0x3ee4b2(0x2eb)]){const _0x25bd51=_0xf6cd99[_0x3a2bba];if(_0x25bd51==='\x22'){_0x88f26a+='\x22',_0x3a2bba++;while(_0x3a2bba<_0xf6cd99[_0x3ee4b2(0x2eb)]&&_0xf6cd99[_0x3a2bba]!=='\x22'){if(_0xf6cd99[_0x3a2bba]==='\x5c'){_0x88f26a+=_0xf6cd99[_0x3a2bba++];if(_0x3a2bba<_0xf6cd99[_0x3ee4b2(0x2eb)])_0x88f26a+=_0xf6cd99[_0x3a2bba++];}else _0x88f26a+=_0xf6cd99[_0x3a2bba++];}_0x88f26a+='\x22';if(_0x3a2bba<_0xf6cd99['length'])_0x3a2bba++;continue;}if(_0x25bd51==='\x27'){_0x88f26a+='\x22',_0x3a2bba++;while(_0x3a2bba<_0xf6cd99[_0x3ee4b2(0x2eb)]&&_0xf6cd99[_0x3a2bba]!=='\x27'){if(_0xf6cd99[_0x3a2bba]==='\x5c'&&_0xf6cd99[_0x3a2bba+0x1]==='\x27')_0x88f26a+='\x27',_0x3a2bba+=0x2;else _0xf6cd99[_0x3a2bba]==='\x22'?(_0x88f26a+='\x5c\x22',_0x3a2bba++):_0x88f26a+=_0xf6cd99[_0x3a2bba++];}_0x88f26a+='\x22';if(_0x3a2bba<_0xf6cd99['length'])_0x3a2bba++;continue;}if(_0x3ee4b2(0x305)[_0x3ee4b2(0x5c0)](_0x25bd51)){_0x88f26a+=_0x25bd51,_0x3a2bba++;continue;}let _0x4726d1='';while(_0x3a2bba<_0xf6cd99['length']&&!'{}[]:,\x27\x22'[_0x3ee4b2(0x5c0)](_0xf6cd99[_0x3a2bba])&&_0xf6cd99[_0x3a2bba]!=='\x20'&&_0xf6cd99[_0x3a2bba]!=='\x09'&&_0xf6cd99[_0x3a2bba]!=='\x0a'&&_0xf6cd99[_0x3a2bba]!=='\x0d'){_0x4726d1+=_0xf6cd99[_0x3a2bba++];}let _0x4af9d0=_0x3a2bba;while(_0x4af9d0<_0xf6cd99[_0x3ee4b2(0x2eb)]&&(_0xf6cd99[_0x4af9d0]==='\x20'||_0xf6cd99[_0x4af9d0]==='\x09'))_0x4af9d0++;if(_0xf6cd99[_0x4af9d0]===':')_0x88f26a+='\x22'+_0x4726d1+'\x22';else _0x4726d1===_0x3ee4b2(0x5e1)||_0x4726d1===_0x3ee4b2(0x38c)||_0x4726d1==='null'||/^-?\d+(\.\d+)?([eE][+-]?\d+)?$/[_0x3ee4b2(0x30d)](_0x4726d1)?_0x88f26a+=_0x4726d1:_0x88f26a+='\x22'+_0x4726d1+'\x22';}return _0x88f26a[_0x3ee4b2(0x38b)](/,(\s*[}\]])/g,'$1');}function _0x3c36dc(_0x2b7e7f){const _0x54e17a=_0x4cdaa0,_0x454451=[];let _0x370a7c=0x0;while(_0x370a7c<_0x2b7e7f['length']){while(_0x370a7c<_0x2b7e7f['length']&&(_0x2b7e7f[_0x370a7c]==='\x20'||_0x2b7e7f[_0x370a7c]==='\x09'))_0x370a7c++;if(_0x370a7c>=_0x2b7e7f[_0x54e17a(0x2eb)])break;const _0x56e6cf=_0x2b7e7f[_0x370a7c];if(_0x56e6cf==='{'||_0x56e6cf==='['){const _0x2385f0=_0x56e6cf==='{'?'}':']',_0x5adcab=_0x370a7c++;let _0x413481=0x1,_0x4f4570=![],_0x38702d='';while(_0x370a7c<_0x2b7e7f[_0x54e17a(0x2eb)]&&_0x413481>0x0){const _0x21f11a=_0x2b7e7f[_0x370a7c];if(_0x4f4570){if(_0x21f11a==='\x5c')_0x370a7c++;else{if(_0x21f11a===_0x38702d)_0x4f4570=![];}}else{if(_0x21f11a==='\x22'||_0x21f11a==='\x27')_0x4f4570=!![],_0x38702d=_0x21f11a;else{if(_0x21f11a===_0x56e6cf)_0x413481++;else{if(_0x21f11a===_0x2385f0)_0x413481--;}}}_0x370a7c++;}_0x454451[_0x54e17a(0x614)](_0x2b7e7f[_0x54e17a(0x45e)](_0x5adcab,_0x370a7c));continue;}if(_0x56e6cf==='\x22'||_0x56e6cf==='\x27'){const _0x18800e=_0x56e6cf;_0x370a7c++;let _0x1d8753='';while(_0x370a7c<_0x2b7e7f['length']&&_0x2b7e7f[_0x370a7c]!==_0x18800e){if(_0x2b7e7f[_0x370a7c]==='\x5c'&&_0x370a7c+0x1<_0x2b7e7f[_0x54e17a(0x2eb)])_0x370a7c++,_0x1d8753+=_0x2b7e7f[_0x370a7c++];else _0x1d8753+=_0x2b7e7f[_0x370a7c++];}if(_0x370a7c<_0x2b7e7f[_0x54e17a(0x2eb)])_0x370a7c++;_0x454451[_0x54e17a(0x614)](_0x1d8753);continue;}let _0x218d99='';while(_0x370a7c<_0x2b7e7f[_0x54e17a(0x2eb)]&&_0x2b7e7f[_0x370a7c]!=='\x20'&&_0x2b7e7f[_0x370a7c]!=='\x09'&&_0x2b7e7f[_0x370a7c]!=='{'&&_0x2b7e7f[_0x370a7c]!=='['){_0x218d99+=_0x2b7e7f[_0x370a7c++];}if(_0x218d99)_0x454451[_0x54e17a(0x614)](_0x218d99);}return _0x454451;}function _0x62d3fc(_0x3f84fe,_0x263393){const _0x2f9c8d=_0x4cdaa0,_0x1baafc=[..._0x3f84fe[_0x2f9c8d(0x5bd)][_0x2f9c8d(0x2f1)]()][_0x2f9c8d(0x1c6)](_0x5e6307=>!_0x5e6307['startsWith']('~'));console[_0x2f9c8d(0x4f7)](['',_0x2ad0ce(_0x21ec5b[_0x2f9c8d(0x5e8)]+_0x21ec5b['cyan'],_0x2f9c8d(0x410)),_0x2ad0ce(_0x21ec5b[_0x2f9c8d(0x5e8)]+_0x21ec5b[_0x2f9c8d(0x1f9)],_0x2f9c8d(0x3e3))+_0x2ad0ce(_0x21ec5b['bold'],_0x2f9c8d(0x3f6))+_0x2ad0ce(_0x21ec5b[_0x2f9c8d(0x5e8)]+_0x21ec5b[_0x2f9c8d(0x1f9)],'║'),_0x2ad0ce(_0x21ec5b[_0x2f9c8d(0x5e8)]+_0x21ec5b[_0x2f9c8d(0x1f9)],_0x2f9c8d(0x485)),'','\x20\x20'+_0x2ad0ce(_0x21ec5b['green'],'✓')+'\x20'+_0x2ad0ce(_0x21ec5b[_0x2f9c8d(0x5e8)],_0x2f9c8d(0x34b))+'\x20\x20http://localhost:'+_0x263393[_0x2f9c8d(0x26f)],..._0x263393[_0x2f9c8d(0x52c)]>0x1?['\x20\x20'+_0x2ad0ce(_0x21ec5b['green'],'✓')+'\x20'+_0x2ad0ce(_0x21ec5b[_0x2f9c8d(0x5e8)],_0x2f9c8d(0xfe))+'\x20'+_0x263393[_0x2f9c8d(0x52c)]+'\x20HTTP\x20workers\x20'+_0x2ad0ce(_0x21ec5b[_0x2f9c8d(0x145)],_0x2f9c8d(0x15d))]:[],'\x20\x20'+_0x2ad0ce(_0x21ec5b[_0x2f9c8d(0x22b)],'✓')+'\x20'+_0x2ad0ce(_0x21ec5b[_0x2f9c8d(0x5e8)],'api')+'\x20\x20\x20\x20\x20http://localhost:'+_0x263393[_0x2f9c8d(0x26f)]+_0x2f9c8d(0x253),'\x20\x20'+_0x2ad0ce(_0x21ec5b[_0x2f9c8d(0x22b)],'✓')+'\x20'+_0x2ad0ce(_0x21ec5b['bold'],_0x2f9c8d(0x42d))+_0x2f9c8d(0x3cf)+_0x263393[_0x2f9c8d(0x64c)],'\x20\x20'+_0x2ad0ce(_0x21ec5b[_0x2f9c8d(0x22b)],'✓')+'\x20'+_0x2ad0ce(_0x21ec5b[_0x2f9c8d(0x5e8)],'id')+'\x20\x20\x20\x20\x20\x20'+_0x2ad0ce(_0x21ec5b[_0x2f9c8d(0x145)],_0x3f84fe['id']),'\x20\x20'+_0x2ad0ce(_0x21ec5b['green'],'✓')+'\x20'+_0x2ad0ce(_0x21ec5b[_0x2f9c8d(0x5e8)],_0x2f9c8d(0xec))+'\x20\x20\x20\x20'+_0x1baafc[_0x2f9c8d(0x601)](_0x29f878=>_0x2ad0ce(_0x21ec5b['cyan'],_0x29f878))[_0x2f9c8d(0x3a4)]('\x20\x20'),..._0x263393[_0x2f9c8d(0x673)]?[]:['\x20\x20'+_0x2ad0ce(_0x21ec5b['green'],'✓')+'\x20'+_0x2ad0ce(_0x21ec5b[_0x2f9c8d(0x5e8)],'admin')+'\x20\x20\x20http://localhost:'+_0x263393[_0x2f9c8d(0x26f)]+_0x2f9c8d(0x61f)],'',_0x2ad0ce(_0x21ec5b[_0x2f9c8d(0x1bc)],'\x20\x20Type\x20'+_0x2ad0ce(_0x21ec5b[_0x2f9c8d(0x5e8)],_0x2f9c8d(0x2e2))+'\x20for\x20commands,\x20'+_0x2ad0ce(_0x21ec5b[_0x2f9c8d(0x5e8)],_0x2f9c8d(0x5d7))+_0x2f9c8d(0x24e)+_0x2ad0ce(_0x21ec5b['bold'],_0x2f9c8d(0x542))+_0x2f9c8d(0x3cd)),''][_0x2f9c8d(0x3a4)]('\x0a'));}function _0x4d9898(_0x2b2b54){const _0x5f555a=_0x4cdaa0;console[_0x5f555a(0x4f7)]('\x0a'+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x5e8)],_0x5f555a(0x58b))+'\x20\x20'+_0x2ad0ce(_0x21ec5b['dim'],_0x5f555a(0x11b))+_0x5f555a(0x314)+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x1f9)],_0x5f555a(0x3ee))+_0x5f555a(0x4b1)+_0x2ad0ce(_0x21ec5b['cyan'],_0x5f555a(0x3ee))+'\x20'+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x577)],_0x5f555a(0x3fd))+_0x5f555a(0x454)+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x1f9)],_0x5f555a(0x51e))+'\x20'+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x1f9)],'<path>')+'\x20'+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x577)],'[body]')+_0x5f555a(0x4bc)+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x1bc)],_0x5f555a(0x20b))+_0x5f555a(0x5c7)+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x145)],_0x5f555a(0x3d7))+'\x20\x20\x20\x20\x20\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'+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x145)],_0x5f555a(0xec))+'\x20\x20\x20\x20\x20\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'+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x145)],_0x5f555a(0x161))+_0x5f555a(0x250)+_0x2b2b54[_0x5f555a(0x46e)]+_0x5f555a(0x564)+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x145)],'type/users')+'\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/'+_0x2b2b54['env']+_0x5f555a(0x3b5)+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x145)],'type/users/item/alice')+_0x5f555a(0x239)+_0x2b2b54[_0x5f555a(0x46e)]+'/type/users/item/alice\x0a\x20\x20\x20\x20'+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x145)],'type/users/query\x20{\x22active\x22:true}')+'\x20→\x20POST\x20/api/env/'+_0x2b2b54['env']+'/type/users/query\x0a\x20\x20\x20\x20'+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x145)],_0x5f555a(0x5b5))+_0x5f555a(0x5c7)+_0x2ad0ce(_0x21ec5b['gray'],_0x5f555a(0x5b0))+'\x0a\x20\x20\x20\x20'+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x145)],'env/staging/info')+'\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'+_0x2ad0ce(_0x21ec5b['bold'],_0x5f555a(0x25f))+'\x20\x20'+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x1bc)],'(on\x20any\x20path\x20command)')+_0x5f555a(0x314)+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x1f9)],_0x5f555a(0x603))+_0x5f555a(0x51f)+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x1f9)],'--help')+_0x5f555a(0x554)+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x1bc)],_0x5f555a(0x20b))+'\x0a\x20\x20\x20\x20'+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x145)],'types\x20--env\x20staging')+'\x0a\x20\x20\x20\x20'+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x145)],_0x5f555a(0x663))+_0x5f555a(0x5c7)+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x145)],'type/users\x20--help')+'\x0a\x0a'+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x5e8)],_0x5f555a(0x5c3))+_0x5f555a(0x314)+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x1f9)],_0x5f555a(0x616))+_0x5f555a(0x1d5)+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x1f9)],_0x5f555a(0x46e))+_0x5f555a(0x181)+_0x2ad0ce(_0x21ec5b['cyan'],'routes')+'\x20'+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x1bc)],'[filter]')+_0x5f555a(0x210)+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x1f9)],_0x5f555a(0x4dd))+'\x20'+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x1bc)],'[on|off|level]')+_0x5f555a(0x1ae)+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x1f9)],_0x5f555a(0x18d))+'\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'+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x1f9)],_0x5f555a(0x2e2))+_0x5f555a(0xf9)+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x1f9)],_0x5f555a(0x542))+'\x20'+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x1bc)],'/\x20quit\x20/\x20Ctrl+C')+_0x5f555a(0x512));}let _0x1d6d38=![];async function _0x5e9f7e(_0x452ead,_0x22e5f0=0x0,_0x28f24d=null){const _0x1304cf=_0x4cdaa0;_0x1d6d38&&(process[_0x1304cf(0x16f)][_0x1304cf(0x4ae)](_0x2ad0ce(_0x21ec5b['red'],_0x1304cf(0x31c))),process[_0x1304cf(0x542)](0x82));_0x1d6d38=!![],process[_0x1304cf(0x559)][_0x1304cf(0x4ae)]('\x0a'),process['stderr']['write'](_0x2ad0ce(_0x21ec5b['yellow'],_0x1304cf(0x14a)+(_0x28f24d?_0x1304cf(0x3bc)+_0x28f24d+',\x20':'')+'shutting\x20down…\x0a'));const _0x5142ec=setTimeout(()=>{const _0xe3fbe4=_0x1304cf;process[_0xe3fbe4(0x16f)][_0xe3fbe4(0x4ae)](_0x2ad0ce(_0x21ec5b[_0xe3fbe4(0x4df)],_0xe3fbe4(0x192))),process[_0xe3fbe4(0x542)](0x1);},0x1388);try{await _0x452ead['close']();}catch(_0x2b69e2){console[_0x1304cf(0x31b)](_0x2ad0ce(_0x21ec5b['red'],'\x20\x20'+_0x2b69e2['message']));}clearTimeout(_0x5142ec),process[_0x1304cf(0x16f)]['write'](_0x2ad0ce(_0x21ec5b[_0x1304cf(0x1bc)],_0x1304cf(0x4cd))),process[_0x1304cf(0x542)](_0x22e5f0);}function _0x5976b2(_0x2cd0d0){const _0x10c3fb=_0x4cdaa0,_0x3ddd29=_0x2cd0d0[_0x10c3fb(0x46e)]!==_0x10c3fb(0x1e4)?_0x2ad0ce(_0x21ec5b[_0x10c3fb(0x577)],'['+_0x2cd0d0[_0x10c3fb(0x46e)]+']'):'';return _0x2ad0ce(_0x21ec5b[_0x10c3fb(0x5e8)]+_0x21ec5b[_0x10c3fb(0x1f9)],_0x10c3fb(0x2d3))+_0x3ddd29+_0x2ad0ce(_0x21ec5b[_0x10c3fb(0x145)],'>\x20');}const _0x53c4ad=new Set([_0x4cdaa0(0x58f),_0x4cdaa0(0x46a),_0x4cdaa0(0x48d),_0x4cdaa0(0x4ca),_0x4cdaa0(0x2b4)]);async function _0x1f8215(_0x3d395d,_0x514be6,_0x111adf,_0x49f561,_0xfcbcba,_0x1f0b56){const _0x40deef=_0x4cdaa0;_0x3d395d=_0x3d395d[_0x40deef(0x486)]();if(!_0x3d395d||_0x3d395d[_0x40deef(0x3cc)]('#'))return;const _0x3278d0=_0x3c36dc(_0x3d395d),{flags:_0x5dc510,rest:_0xb0d7e5}=_0x4454a8(_0x3278d0);if(!_0xb0d7e5['length'])return;const _0x393063=_0xb0d7e5[0x0],_0xa74ecb=_0x393063[_0x40deef(0x5ef)]();if(_0xa74ecb===_0x40deef(0x221)){if(_0xb0d7e5[0x1])_0x7df7db(_0x514be6,_0x121b52(_0xb0d7e5[0x1],_0x5dc510[_0x40deef(0x46e)]??_0xfcbcba[_0x40deef(0x46e)]));else _0x4d9898(_0xfcbcba);return;}if(_0xa74ecb===_0x40deef(0x5a4)){const _0x39d17b=_0xb0d7e5[0x1];if(!_0x39d17b){console[_0x40deef(0x4f7)](_0x2ad0ce(_0x21ec5b['red'],_0x40deef(0x3f9)));return;}try{_0x514be6[_0x40deef(0x46e)](_0x39d17b),_0xfcbcba[_0x40deef(0x46e)]=_0x39d17b,_0x1f0b56?.['setPrompt'](_0x5976b2(_0xfcbcba)),console[_0x40deef(0x4f7)](_0x40deef(0x675)+_0x2ad0ce(_0x21ec5b[_0x40deef(0x22b)],'✓')+_0x40deef(0x652)+_0x2ad0ce(_0x21ec5b[_0x40deef(0x5e8)]+_0x21ec5b[_0x40deef(0x1f9)],_0x39d17b)+'\x0a');}catch{console[_0x40deef(0x4f7)](_0x40deef(0x675)+_0x2ad0ce(_0x21ec5b[_0x40deef(0x4df)],'✗')+_0x40deef(0x587)+_0x2ad0ce(_0x21ec5b['bold'],_0x39d17b)+_0x40deef(0x595)+_0x2ad0ce(_0x21ec5b[_0x40deef(0x1bc)],_0x40deef(0x421)));}return;}if(_0xa74ecb===_0x40deef(0x361)){const _0xccfd0c=[..._0x514be6[_0x40deef(0x5bd)]['keys']()][_0x40deef(0x1c6)](_0x55e3a1=>!_0x55e3a1['startsWith']('~'));console[_0x40deef(0x4f7)]('');for(const _0x474cbc of _0xccfd0c){const _0x562f98=_0x474cbc===_0xfcbcba[_0x40deef(0x46e)];console[_0x40deef(0x4f7)]('\x20\x20'+(_0x562f98?_0x2ad0ce(_0x21ec5b[_0x40deef(0x22b)],'●'):_0x2ad0ce(_0x21ec5b[_0x40deef(0x1bc)],'○'))+'\x20\x20'+(_0x562f98?_0x2ad0ce(_0x21ec5b[_0x40deef(0x5e8)]+_0x21ec5b[_0x40deef(0x1f9)],_0x474cbc):_0x2ad0ce(_0x21ec5b[_0x40deef(0x1bc)],_0x474cbc)));}console[_0x40deef(0x4f7)](_0x40deef(0x675)+_0x2ad0ce(_0x21ec5b[_0x40deef(0x1bc)],_0x40deef(0x123))+'\x20'+_0x2ad0ce(_0x21ec5b[_0x40deef(0x1f9)],_0xfcbcba['env'])),console['log']('');return;}if(_0xa74ecb===_0x40deef(0x14e)){const _0x31c80e=[..._0x514be6['_envs'][_0x40deef(0x624)]()][_0x40deef(0x1c6)](_0x17ab5f=>!_0x17ab5f['name'][_0x40deef(0x3cc)]('~'));console[_0x40deef(0x4f7)]('');const _0x4cca3d=Math['max'](..._0x31c80e[_0x40deef(0x601)](_0x8092d7=>_0x8092d7['name'][_0x40deef(0x2eb)]));for(const _0x16f9c4 of _0x31c80e){const _0x4a46c1=_0x16f9c4['name']===_0xfcbcba[_0x40deef(0x46e)],_0x41553d=_0x4a46c1?_0x2ad0ce(_0x21ec5b['green'],'●'):_0x2ad0ce(_0x21ec5b[_0x40deef(0x1bc)],'○'),_0x57587b=_0x4a46c1?_0x2ad0ce(_0x21ec5b[_0x40deef(0x5e8)]+_0x21ec5b['cyan'],_0x16f9c4[_0x40deef(0x2cc)][_0x40deef(0x2c9)](_0x4cca3d)):_0x2ad0ce(_0x21ec5b[_0x40deef(0x1bc)],_0x16f9c4['name'][_0x40deef(0x2c9)](_0x4cca3d)),_0x5daa8f=[..._0x16f9c4[_0x40deef(0x632)][_0x40deef(0x2f1)]()]['filter'](_0x2fda21=>!_0x2fda21[_0x40deef(0x3cc)]('~')),_0x2370b6=_0x5daa8f[_0x40deef(0x2eb)]?_0x2ad0ce(_0x21ec5b[_0x40deef(0x1bc)],_0x5daa8f[_0x40deef(0x45e)](0x0,0x5)[_0x40deef(0x3a4)](',\x20')+(_0x5daa8f[_0x40deef(0x2eb)]>0x5?_0x40deef(0x609)+(_0x5daa8f['length']-0x5)+_0x40deef(0x52d):'')):_0x2ad0ce(_0x21ec5b[_0x40deef(0x1bc)],_0x40deef(0x449));console['log']('\x20\x20'+_0x41553d+'\x20\x20'+_0x57587b+'\x20\x20'+_0x2370b6);}console[_0x40deef(0x4f7)]('');return;}if(_0xa74ecb===_0x40deef(0x37f)){const _0x5b47fd=_0x5dc510[_0x40deef(0x46e)]??_0xb0d7e5[0x1]??_0xfcbcba[_0x40deef(0x46e)];try{const _0x1f69e0=_0x514be6[_0x40deef(0x46e)](_0x5b47fd),_0x236404=[..._0x1f69e0[_0x40deef(0x632)][_0x40deef(0x2f1)]()][_0x40deef(0x1c6)](_0x38d648=>!_0x38d648[_0x40deef(0x3cc)]('~'))[_0x40deef(0x30f)]();console[_0x40deef(0x4f7)](_0x40deef(0x675)+_0x2ad0ce(_0x21ec5b[_0x40deef(0x1bc)],_0x236404[_0x40deef(0x2eb)]+_0x40deef(0x4b9)+(_0x236404[_0x40deef(0x2eb)]!==0x1?'s':'')+_0x40deef(0x5b8)+_0x5b47fd));for(const _0x30c4f9 of _0x236404){const _0x3926ac=_0x1f69e0['typeSubDbs'][_0x40deef(0x3aa)](_0x30c4f9),_0x2ff6d0=_0x3926ac?.[_0x40deef(0x206)]?.[_0x40deef(0x16e)]?.()??0x0,_0x25cf5d=_0x2ad0ce(_0x21ec5b[_0x40deef(0x5e8)]+_0x21ec5b[_0x40deef(0x1f9)],_0x30c4f9[_0x40deef(0x2c9)](0x1c));console['log'](_0x40deef(0x3cf)+_0x25cf5d+'\x20\x20'+_0x2ad0ce(_0x21ec5b['magenta'],String(_0x2ff6d0)[_0x40deef(0x24d)](0x6))+'\x20'+_0x2ad0ce(_0x21ec5b[_0x40deef(0x1bc)],'records'));}console['log']('');}catch(_0x1cd0f7){console['error'](_0x2ad0ce(_0x21ec5b[_0x40deef(0x4df)],_0x40deef(0x675)+_0x1cd0f7[_0x40deef(0x29c)]+'\x0a'));}return;}if(_0xa74ecb==='ROUTES'){_0x192571(_0x514be6,_0xb0d7e5[_0x40deef(0x45e)](0x1)[_0x40deef(0x3a4)]('\x20'));return;}if(_0xa74ecb===_0x40deef(0x140)){const _0x1a8bdc=(_0xb0d7e5[0x1]??'')[_0x40deef(0x3f1)]();if(!_0x1a8bdc||_0x1a8bdc==='on')_0x49f561[_0x40deef(0x26c)]=!![],_0x49f561[_0x40deef(0x294)]=_0x40deef(0x3d7),console[_0x40deef(0x4f7)](_0x40deef(0x675)+_0x2ad0ce(_0x21ec5b['green'],'✓')+_0x40deef(0x3c2)+_0x2ad0ce(_0x21ec5b['dim'],_0x40deef(0x257))+'\x0a');else{if(_0x1a8bdc===_0x40deef(0x5d8))_0x49f561[_0x40deef(0x26c)]=![],console[_0x40deef(0x4f7)]('\x0a\x20\x20'+_0x2ad0ce(_0x21ec5b[_0x40deef(0x577)],'○')+'\x20logs\x20off\x0a');else _0x43e787[_0x1a8bdc]!==undefined?(_0x49f561[_0x40deef(0x26c)]=!![],_0x49f561['level']=_0x1a8bdc,console[_0x40deef(0x4f7)](_0x40deef(0x675)+_0x2ad0ce(_0x21ec5b[_0x40deef(0x22b)],'✓')+_0x40deef(0x496)+_0x2ad0ce(_0x21ec5b[_0x40deef(0x5e8)],_0x1a8bdc)+'\x0a')):console[_0x40deef(0x31b)](_0x2ad0ce(_0x21ec5b['red'],_0x40deef(0x453)));}return;}if(_0xa74ecb===_0x40deef(0x557)||_0xa74ecb===_0x40deef(0x2c1)){await _0x5e9f7e(_0x514be6,0x0);return;}if(_0xa74ecb===_0x40deef(0x5dd)){const _0x578eed=_0x40deef(0x1ad)+_0x111adf[_0x40deef(0x26f)]+'/admin/index.html',_0x36f1df=process[_0x40deef(0x2e3)]===_0x40deef(0x405)?_0x40deef(0x44f)+_0x578eed:process[_0x40deef(0x2e3)]===_0x40deef(0x558)?_0x40deef(0x631)+_0x578eed:_0x40deef(0x1ab)+_0x578eed;require$$4[_0x40deef(0x4c7)](_0x36f1df),console[_0x40deef(0x4f7)](_0x40deef(0x675)+_0x2ad0ce(_0x21ec5b[_0x40deef(0x22b)],'✓')+_0x40deef(0x363)+_0x2ad0ce(_0x21ec5b[_0x40deef(0x1f9)],_0x578eed)+'\x0a');return;}let _0x16fd29,_0x4674ef,_0x4343f8;if(_0x53c4ad['has'](_0xa74ecb)){_0x16fd29=_0xa74ecb,_0x4674ef=_0xb0d7e5[0x1],_0x4343f8=_0xb0d7e5[_0x40deef(0x45e)](0x2);if(!_0x4674ef){console[_0x40deef(0x31b)](_0x2ad0ce(_0x21ec5b['red'],_0x40deef(0x560)+_0x393063+_0x40deef(0x137)));return;}}else _0x16fd29=null,_0x4674ef=_0xb0d7e5[0x0],_0x4343f8=_0xb0d7e5['slice'](0x1);const _0x1487c9=_0x5dc510[_0x40deef(0x46e)]??_0xfcbcba[_0x40deef(0x46e)],_0x2c35ae=_0x121b52(_0x4674ef,_0x1487c9);if(_0x5dc510['help']){_0x7df7db(_0x514be6,_0x2c35ae);return;}let _0x4849e0=null;if(_0x4343f8['length']){const _0x2683a7=_0x4343f8[_0x40deef(0x3a4)]('\x20');try{_0x4849e0=_0x198e98(_0x2683a7);}catch(_0x3e9702){console[_0x40deef(0x31b)](_0x2ad0ce(_0x21ec5b[_0x40deef(0x4df)],'\x0a\x20\x20Invalid\x20JSON:\x20'+_0x2683a7+_0x40deef(0x675)+_0x2ad0ce(_0x21ec5b[_0x40deef(0x1bc)],_0x3e9702[_0x40deef(0x29c)])+'\x0a'));return;}}if(!_0x16fd29)_0x16fd29=_0x4849e0!==null?_0x40deef(0x46a):_0x40deef(0x58f);try{const _0x5f2798=await _0x21c433(_0x514be6,_0x16fd29,_0x2c35ae,_0x4849e0);_0x17e613(_0x5f2798[_0x40deef(0x626)],_0x5f2798[_0x40deef(0x5e9)]);}catch(_0x24a555){console[_0x40deef(0x31b)](_0x40deef(0x675)+_0x2ad0ce(_0x21ec5b['red'],'✗')+'\x20'+_0x24a555[_0x40deef(0x29c)]+'\x0a');}}class _0x36d363{constructor(){const _0x375166=_0x4cdaa0;this['children']=new Map(),this[_0x375166(0x4b7)]=null,this[_0x375166(0x52f)]=![];}}function _0x2af4fd(_0x3d3e42){const _0x205e7c=_0x4cdaa0,_0x4fa729=new _0x36d363();for(const _0xf23853 of _0x3d3e42){if(_0xf23853[_0x205e7c(0x664)]?.[_0x205e7c(0x350)])continue;const _0x3d87db=_0xf23853[_0x205e7c(0x42d)]['replace'](/^\/api/,'')[_0x205e7c(0x38b)](/^\[\/env\/:env=[^\]]*\]/,'')['replace'](/^\//,'');if(!_0x3d87db)continue;let _0x242291=_0x4fa729;for(const _0xbf785d of _0x3d87db['split']('/')[_0x205e7c(0x1c6)](Boolean)){if(_0xbf785d[_0x205e7c(0x3cc)](':')){const _0x348792=_0xbf785d[_0x205e7c(0x45e)](0x1);if(!_0x242291[_0x205e7c(0x4b7)])_0x242291[_0x205e7c(0x4b7)]={'param':_0x348792,'node':new _0x36d363()};_0x242291=_0x242291[_0x205e7c(0x4b7)][_0x205e7c(0x3fa)];}else{if(!_0x242291[_0x205e7c(0x331)][_0x205e7c(0x39f)](_0xbf785d))_0x242291[_0x205e7c(0x331)][_0x205e7c(0x2c2)](_0xbf785d,new _0x36d363());_0x242291=_0x242291[_0x205e7c(0x331)][_0x205e7c(0x3aa)](_0xbf785d);}}_0x242291['terminal']=!![];}return _0x4fa729;}const _0x25e579=new Map();function _0x40702b(_0x1c4315,_0x49a001,_0x3cd419){const _0x23756f=_0x4cdaa0,_0x1eb305=_0x25e579['get'](_0x1c4315);if(_0x1eb305&&_0x1eb305[_0x23756f(0xfd)]>Date[_0x23756f(0x16a)]())return _0x1eb305[_0x23756f(0x15b)];const _0x1d621c=_0x3cd419();return _0x25e579[_0x23756f(0x2c2)](_0x1c4315,{'val':_0x1d621c,'exp':Date['now']()+_0x49a001}),_0x1d621c;}function _0x3e2cdc(_0x35aafb,_0x4554fe,_0x37df23,_0x44c42a){const _0x2641c4=_0x4cdaa0,_0x23881f=_0x4554fe[_0x2641c4(0x46e)]??_0x44c42a[_0x2641c4(0x46e)];switch(_0x35aafb){case'env':return[..._0x37df23[_0x2641c4(0x5bd)]['keys']()][_0x2641c4(0x1c6)](_0x19c328=>!_0x19c328[_0x2641c4(0x3cc)]('~'));case'type':return _0x40702b('types:'+_0x23881f,0x7d0,()=>{const _0x580a14=_0x2641c4;try{return[..._0x37df23[_0x580a14(0x46e)](_0x23881f)['typeSubDbs'][_0x580a14(0x2f1)]()][_0x580a14(0x1c6)](_0xaac5dd=>!_0xaac5dd[_0x580a14(0x3cc)]('~'));}catch{return[];}});case _0x2641c4(0x174):if(!_0x4554fe[_0x2641c4(0x49b)])return[];return _0x40702b(_0x2641c4(0x5f3)+_0x23881f+':'+_0x4554fe[_0x2641c4(0x49b)],0x5dc,()=>{const _0x3e97f1=_0x2641c4;try{const _0x3db13e=_0x37df23[_0x3e97f1(0x46e)](_0x23881f)[_0x3e97f1(0x632)][_0x3e97f1(0x3aa)](_0x4554fe[_0x3e97f1(0x49b)]);if(!_0x3db13e?.[_0x3e97f1(0x206)])return[];const _0x1d7d73=[];for(const {key:_0x3e2e87}of _0x3db13e[_0x3e97f1(0x206)][_0x3e97f1(0x391)]({'limit':0x32})){_0x1d7d73[_0x3e97f1(0x614)](String(_0x3e2e87));if(_0x1d7d73[_0x3e97f1(0x2eb)]>=0x32)break;}return _0x1d7d73;}catch{return[];}});case _0x2641c4(0x593):if(!_0x4554fe[_0x2641c4(0x49b)])return[];return _0x40702b(_0x2641c4(0x1ac)+_0x23881f+':'+_0x4554fe[_0x2641c4(0x49b)],0x7d0,()=>{const _0x3070fc=_0x2641c4;try{const _0x3faac1=_0x37df23[_0x3070fc(0x46e)](_0x23881f)[_0x3070fc(0x632)]['get'](_0x4554fe[_0x3070fc(0x49b)]);return _0x3faac1?[..._0x3faac1['indexToDb']?.['keys']()??[]]:[];}catch{return[];}});case _0x2641c4(0x195):if(!_0x4554fe['type'])return[];return _0x40702b(_0x2641c4(0x224)+_0x23881f+':'+_0x4554fe['type'],0x7d0,()=>{const _0x44fca6=_0x2641c4;try{return _0x37df23[_0x44fca6(0x458)]?.[_0x44fca6(0x25b)]?.(_0x4554fe[_0x44fca6(0x49b)],_0x37df23['env'](_0x23881f))?.[_0x44fca6(0x601)](_0x203d08=>_0x203d08[_0x44fca6(0x2cc)])??[];}catch{return[];}});default:return[];}}function _0x130473(_0x228221,_0x61e623,_0x20065e,_0x46e3a4){const _0x569dd5=_0x4cdaa0,_0x4f51e6=_0x228221['endsWith']('/'),_0x56e768=_0x228221[_0x569dd5(0x37c)]('/'),_0x288062=_0x4f51e6?_0x56e768[_0x569dd5(0x45e)](0x0,-0x1):_0x56e768['slice'](0x0,-0x1),_0x263e7d=_0x4f51e6?'':_0x56e768[_0x56e768[_0x569dd5(0x2eb)]-0x1];let _0x18904a=_0x61e623;const _0x4a5d74={};for(const _0x410de0 of _0x288062){if(!_0x410de0)continue;if(_0x18904a[_0x569dd5(0x331)][_0x569dd5(0x39f)](_0x410de0))_0x18904a=_0x18904a['children']['get'](_0x410de0);else{if(_0x18904a[_0x569dd5(0x4b7)])_0x4a5d74[_0x18904a[_0x569dd5(0x4b7)]['param']]=_0x410de0,_0x18904a=_0x18904a['dynamic'][_0x569dd5(0x3fa)];else return[];}}const _0x37a4dc=_0x288062[_0x569dd5(0x1c6)](Boolean),_0x22f4e3=_0x37a4dc['length']?_0x37a4dc['join']('/')+'/':'',_0x3fd61f=[];for(const [_0x455c13]of _0x18904a[_0x569dd5(0x331)]){if(_0x455c13[_0x569dd5(0x3cc)](_0x263e7d))_0x3fd61f[_0x569dd5(0x614)](_0x22f4e3+_0x455c13);}if(_0x18904a['dynamic'])for(const _0x3b6a2a of _0x3e2cdc(_0x18904a['dynamic']['param'],_0x4a5d74,_0x20065e,_0x46e3a4)){if(String(_0x3b6a2a)[_0x569dd5(0x3cc)](_0x263e7d))_0x3fd61f[_0x569dd5(0x614)](_0x22f4e3+_0x3b6a2a);}return _0x3fd61f[_0x569dd5(0x45e)](0x0,0x64);}const _0x19ea08=[_0x4cdaa0(0x2e2),_0x4cdaa0(0x2ca),_0x4cdaa0(0x46e),'envs',_0x4cdaa0(0x161),_0x4cdaa0(0x5d7),_0x4cdaa0(0x4dd),'open',_0x4cdaa0(0x542),_0x4cdaa0(0x378)];function _0x550414(_0x3d09b4,_0x485daf,_0x3dda8f){return function _0x4076a0(_0x5e3d02){const _0x11cac4=_0x2368;try{const _0x53dc2d=_0x5e3d02[_0x11cac4(0x507)](/\s[{[]/),_0x3619a3=_0x53dc2d>=0x0?_0x5e3d02[_0x11cac4(0x45e)](0x0,_0x53dc2d):_0x5e3d02,_0xa82097=_0x3619a3[_0x11cac4(0x2fb)]();if(!_0xa82097){const _0x17c266=[..._0x19ea08,...[..._0x3d09b4['children'][_0x11cac4(0x2f1)]()]][_0x11cac4(0x45e)](0x0,0x64);return[_0x17c266,''];}const _0x58c287=_0xa82097[_0x11cac4(0x37c)](/\s+/),_0x318632=_0x58c287[0x0],_0x35e642=_0x318632[_0x11cac4(0x5ef)]();if(_0x58c287[_0x11cac4(0x2eb)]===0x1){const _0x153ed3=_0x318632['toLowerCase'](),_0x1bd30a=_0x19ea08[_0x11cac4(0x1c6)](_0x57203e=>_0x57203e[_0x11cac4(0x3cc)](_0x153ed3)),_0x10cb21=_0x130473(_0x318632,_0x3d09b4,_0x485daf,_0x3dda8f),_0x320f84=[...new Set([..._0x1bd30a,..._0x10cb21])]['slice'](0x0,0x64);return[_0x320f84,_0x318632];}if(_0x53c4ad[_0x11cac4(0x39f)](_0x35e642)&&_0x58c287[_0x11cac4(0x2eb)]===0x2){const _0xb4dd70=_0x58c287[0x1],_0x2651e2=_0x130473(_0xb4dd70,_0x3d09b4,_0x485daf,_0x3dda8f);return[_0x2651e2[_0x11cac4(0x601)](_0x1d5701=>_0x318632+'\x20'+_0x1d5701),_0x318632+'\x20'+_0xb4dd70];}if(!_0x53c4ad[_0x11cac4(0x39f)](_0x35e642)&&_0x58c287[_0x11cac4(0x2eb)]>0x1){const _0x442044=_0x130473(_0x318632,_0x3d09b4,_0x485daf,_0x3dda8f),_0x1a8a93='\x20'+_0x58c287[_0x11cac4(0x45e)](0x1)[_0x11cac4(0x3a4)]('\x20');return[_0x442044[_0x11cac4(0x601)](_0x230ba6=>_0x230ba6+_0x1a8a93),_0x318632+_0x1a8a93];}return[[],_0x5e3d02];}catch{return[[],_0x5e3d02];}};}async function _0x11044f(_0x3d9d54,_0x12188e){const _0x426dde=_0x4cdaa0,_0x5b0eb6={'enabled':!![],'level':_0x12188e['logLevel']??_0x426dde(0x3d7)},_0x3b8b2e={'env':'default'},_0x5d7caa={'current':null},_0x15f1c5=_0x2af4fd(_0x3d9d54[_0x426dde(0x5d0)][_0x426dde(0x33c)]()),_0x32a174=_0x550414(_0x15f1c5,_0x3d9d54,_0x3b8b2e);_0x3d9d54[_0x426dde(0x4f7)]['attach'](_0x2a2469=>{const _0x45f88c=_0x426dde;if(!_0x5b0eb6[_0x45f88c(0x26c)])return;_0x4c4864(_0x2a2469,_0x5b0eb6[_0x45f88c(0x294)]),_0x5d7caa[_0x45f88c(0x199)]?.['prompt'](!![]);}),_0x62d3fc(_0x3d9d54,_0x12188e);const _0x3c56b3=_0x722dec[_0x426dde(0x15a)]({'input':process[_0x426dde(0x61c)],'output':process[_0x426dde(0x559)],'terminal':!![],'completer':_0x32a174,'prompt':_0x5976b2(_0x3b8b2e),'historySize':_0x2536e3});try{const _0x311b03=_0x1f435f[_0x426dde(0xe7)](_0x32c291,_0x426dde(0x365))['split']('\x0a')[_0x426dde(0x1c6)](Boolean);_0x3c56b3[_0x426dde(0x24c)]=_0x311b03[_0x426dde(0x414)]()[_0x426dde(0x45e)](0x0,_0x2536e3);}catch{}_0x5d7caa[_0x426dde(0x199)]=_0x3c56b3,_0x3c56b3['on'](_0x426dde(0x5ce),async _0x3c02e5=>{const _0x66f1b4=_0x426dde;_0x3c56b3[_0x66f1b4(0x152)]();try{await _0x1f8215(_0x3c02e5,_0x3d9d54,_0x12188e,_0x5b0eb6,_0x3b8b2e,_0x3c56b3);}catch(_0x158da5){console[_0x66f1b4(0x31b)](_0x2ad0ce(_0x21ec5b[_0x66f1b4(0x4df)],_0x66f1b4(0x1cc)+_0x158da5[_0x66f1b4(0x29c)]));}finally{_0x3c56b3[_0x66f1b4(0x29d)](),_0x3c56b3[_0x66f1b4(0x3f2)]();}}),_0x3c56b3['on'](_0x426dde(0x241),()=>{const _0x382b09=_0x426dde;try{const _0x5bedfe=[..._0x3c56b3[_0x382b09(0x24c)]][_0x382b09(0x414)]()[_0x382b09(0x1c6)](Boolean)[_0x382b09(0x45e)](0x0,_0x2536e3);_0x1f435f['writeFileSync'](_0x32c291,_0x5bedfe[_0x382b09(0x3a4)]('\x0a')+'\x0a');}catch{}_0x5e9f7e(_0x3d9d54,0x0);});let _0x26c1fc=0x0;return process['on'](_0x426dde(0x53b),()=>{const _0x30e292=_0x426dde;if(_0x1d6d38)return _0x5e9f7e(_0x3d9d54,0x82,_0x30e292(0x53b));if(_0x3c56b3[_0x30e292(0x5ce)]==='')return _0x5e9f7e(_0x3d9d54,0x0,_0x30e292(0x53b));const _0x5957c1=Date[_0x30e292(0x16a)]();if(_0x5957c1-_0x26c1fc<0x5dc)return _0x5e9f7e(_0x3d9d54,0x0,_0x30e292(0x635));_0x26c1fc=_0x5957c1,process[_0x30e292(0x559)][_0x30e292(0x4ae)]('\x0a'),_0x3c56b3[_0x30e292(0x3ce)](0x0),_0x3c56b3['prompt'](),process[_0x30e292(0x16f)][_0x30e292(0x4ae)](_0x2ad0ce(_0x21ec5b[_0x30e292(0x1bc)],_0x30e292(0xe4)));}),process['on']('SIGTERM',()=>_0x5e9f7e(_0x3d9d54,0x0,'SIGTERM')),process['on'](_0x426dde(0x5e7),()=>_0x5e9f7e(_0x3d9d54,0x0,_0x426dde(0x5e7))),_0x3c56b3[_0x426dde(0x3f2)](),_0x3c56b3;}return okdbShell={'start':_0x11044f,'colorLog':_0x4c4864,'lenientParse':_0x198e98,'_splitLine':_0x3c36dc,'_formatRouteHelpLines':_0x5e930,'_routeSummary':_0x196b8a,'_routeTags':_0x212050},okdbShell;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x1ebffb=_0x4b361c;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x3fa839,performance:_0x20f3b8}=require$$0$3,_0x3f376a=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG===_0x1ebffb(0x5e1),_0x3b2a21=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x250321=process.env.OKDB_LOOP_LAG_ALL==='1',_0x48b3ae=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x2de414{constructor(){const _0x4be28d=_0x1ebffb;this['enabled']=_0x3f376a,this[_0x4be28d(0x659)]=new Map(),this['_h']=null,this[_0x4be28d(0x301)]=null,this[_0x4be28d(0x1ba)]=![],this[_0x4be28d(0x653)]=(_0x5997b9,_0x403f1d)=>process[_0x4be28d(0x16f)][_0x4be28d(0x4ae)](_0x5997b9+(_0x403f1d?'\x20'+JSON[_0x4be28d(0x3d9)](_0x403f1d):'')+'\x0a');}[_0x1ebffb(0x16a)](){const _0x3c29d6=_0x1ebffb;return _0x20f3b8[_0x3c29d6(0x16a)]();}['setLogger'](_0x3f2a21){const _0x4f2232=_0x1ebffb;if(typeof _0x3f2a21===_0x4f2232(0x26b))this[_0x4f2232(0x653)]=_0x3f2a21;}[_0x1ebffb(0x480)](_0x800bb4,_0x4b4861,_0x239771){const _0x4dccab=_0x1ebffb;if(!this[_0x4dccab(0x26c)])return;let _0x38b926=this[_0x4dccab(0x659)][_0x4dccab(0x3aa)](_0x800bb4);!_0x38b926&&(_0x38b926={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x4dccab(0x659)]['set'](_0x800bb4,_0x38b926)),_0x38b926['ms']+=_0x4b4861,_0x38b926[_0x4dccab(0x5ec)]+=0x1,_0x4b4861>_0x38b926[_0x4dccab(0x60b)]&&(_0x38b926[_0x4dccab(0x60b)]=_0x4b4861,_0x38b926['maxExtra']=_0x239771||'');}[_0x1ebffb(0x545)](_0x51621a){const _0x161a83=_0x1ebffb;if(!this['enabled']||this[_0x161a83(0x1ba)])return;this[_0x161a83(0x1ba)]=!![];if(_0x51621a)this[_0x161a83(0x653)]=_0x51621a;this['_h']=_0x3fa839({'resolution':0xa}),this['_h'][_0x161a83(0x3a8)](),this[_0x161a83(0x301)]=setInterval(()=>this[_0x161a83(0x66f)](),_0x3b2a21);if(this[_0x161a83(0x301)]['unref'])this[_0x161a83(0x301)][_0x161a83(0x386)]();}['onWindow'](_0x307a77){const _0x17213b=_0x1ebffb;if(!this[_0x17213b(0x475)])this[_0x17213b(0x475)]=new Set();this[_0x17213b(0x475)][_0x17213b(0x61d)](_0x307a77);if(!this[_0x17213b(0x1ba)])this['_startAdmission']();}[_0x1ebffb(0x320)](_0x2d89f2){const _0x39661d=_0x1ebffb;this['_windowCbs']?.[_0x39661d(0x5ed)](_0x2d89f2);}[_0x1ebffb(0x168)](){const _0x3dc4c5=_0x1ebffb;if(this['_admissionStarted'])return;this['_admissionStarted']=!![];!this['_h']&&(this['_h']=_0x3fa839({'resolution':0xa}),this['_h'][_0x3dc4c5(0x3a8)]());const _0x4f3a46=_0x3b2a21;this[_0x3dc4c5(0x144)]=setInterval(()=>{const _0x37dd50=_0x3dc4c5,_0x4a8c9b=this['_h'];if(!_0x4a8c9b)return;const _0xade6ef=_0x4a8c9b[_0x37dd50(0x5ba)](0x63)/0xf4240,_0xe12fca=_0x4a8c9b[_0x37dd50(0x47e)]/0xf4240,_0x13b1ff=_0x4a8c9b['mean']/0xf4240;_0x4a8c9b[_0x37dd50(0x1c2)]();if(this[_0x37dd50(0x475)])for(const _0x5477eb of this[_0x37dd50(0x475)]){try{_0x5477eb({'p99Ms':_0xade6ef,'maxMs':_0xe12fca,'meanMs':_0x13b1ff,'reportMs':_0x4f3a46});}catch{}}},_0x4f3a46);if(this['_admissionTimer'][_0x3dc4c5(0x386)])this[_0x3dc4c5(0x144)][_0x3dc4c5(0x386)]();}[_0x1ebffb(0x66f)](){const _0x5f6f74=_0x1ebffb,_0x317b94=this['_h'],_0x2d5d4c=_0x317b94[_0x5f6f74(0x47e)]/0xf4240,_0x1d3791=_0x317b94[_0x5f6f74(0x5ba)](0x63)/0xf4240,_0x1b8e36=_0x317b94[_0x5f6f74(0x56b)]/0xf4240;_0x317b94[_0x5f6f74(0x1c2)]();const _0x2981c1=[...this[_0x5f6f74(0x659)][_0x5f6f74(0x427)]()][_0x5f6f74(0x601)](([_0x79aade,_0x29e731])=>({'label':_0x79aade,..._0x29e731}))[_0x5f6f74(0x30f)]((_0x3f8529,_0x1dedd4)=>_0x1dedd4['ms']-_0x3f8529['ms'])[_0x5f6f74(0x45e)](0x0,0x8);this[_0x5f6f74(0x659)][_0x5f6f74(0x479)]();const _0x38d601=_0x2981c1['reduce']((_0x721540,_0x14d5fc)=>_0x721540+_0x14d5fc['ms'],0x0),_0x3d2991=_0x2981c1[_0x5f6f74(0x601)](_0x2d51a1=>_0x2d51a1[_0x5f6f74(0x508)]+'='+_0x2d51a1['ms'][_0x5f6f74(0x4a8)](0x0)+_0x5f6f74(0x2f4)+_0x2d51a1[_0x5f6f74(0x5ec)]+(_0x2d51a1['maxMs']>0x5?_0x5f6f74(0x644)+_0x2d51a1[_0x5f6f74(0x60b)]['toFixed'](0x0)+'ms'+(_0x2d51a1[_0x5f6f74(0x352)]?'\x20'+_0x2d51a1[_0x5f6f74(0x352)]:'')+')':''));(_0x250321||_0x2d5d4c>=_0x48b3ae)&&this[_0x5f6f74(0x653)](_0x5f6f74(0x230)+_0x3b2a21+_0x5f6f74(0x3b9)+_0x2d5d4c[_0x5f6f74(0x4a8)](0x0)+_0x5f6f74(0x3a1)+_0x1d3791[_0x5f6f74(0x4a8)](0x0)+'ms\x20mean='+_0x1b8e36[_0x5f6f74(0x4a8)](0x0)+_0x5f6f74(0x513)+_0x38d601['toFixed'](0x0)+'ms'+(_0x3d2991['length']?_0x5f6f74(0x5a2)+_0x3d2991[_0x5f6f74(0x3a4)]('\x20\x20'):''),{'feature':_0x5f6f74(0x4ab)});if(this[_0x5f6f74(0x475)])for(const _0xf5ed0a of this[_0x5f6f74(0x475)]){try{_0xf5ed0a({'p99Ms':_0x1d3791,'maxMs':_0x2d5d4c,'meanMs':_0x1b8e36,'reportMs':_0x3b2a21});}catch{}}}['stop'](){const _0x660071=_0x1ebffb;if(this[_0x660071(0x301)])clearInterval(this[_0x660071(0x301)]);if(this['_h'])this['_h']['disable']();this['_timer']=null,this['_h']=null,this[_0x660071(0x1ba)]=![];}}const _0x43c77b=new _0x2de414();if(_0x43c77b[_0x1ebffb(0x26c)])_0x43c77b['start']();return okdbLoopMonitor={'LOOP':_0x43c77b},okdbLoopMonitor;}var okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x42a870=_0x4b361c;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x297dda=require$$0,_0x5813e1=require$$1$2,_0x36f838=require$$2,{LOOP:_0x1b606f}=requireOkdbLoopMonitor(),_0x128dd8=_0x42a870(0x1f8),_0x22fe37=_0x42a870(0x3fa),_0x421837=_0x42a870(0x1d0),_0x2025ea=_0x42a870(0x432),_0x26e303=(_0x7cbb31,_0xa7293f)=>_0x7cbb31+':'+_0xa7293f,_0x3d454f=(_0x4661e2,_0x1a455f)=>_0x4661e2+'::'+_0x1a455f,_0x101cc0=(_0x545819,_0x1679cc)=>_0x545819+'/'+_0x1679cc,_0x38bc5b=(_0x45f68f,_0x3a3f6a)=>_0x45f68f+'#'+_0x3a3f6a,_0x46d10e=_0x4ee0d6=>{const _0x3d0956=_0x42a870;if(_0x4ee0d6?.[_0x3d0956(0x638)])return _0x4ee0d6[_0x3d0956(0x638)];const _0x9b1c37=_0x4ee0d6?.[_0x3d0956(0x472)];return typeof _0x9b1c37===_0x3d0956(0x380)&&_0x9b1c37[_0x3d0956(0x5c0)]('#')?_0x9b1c37[_0x3d0956(0x45e)](0x0,_0x9b1c37[_0x3d0956(0x42b)]('#')):_0x9b1c37;},_0x568dec=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x25d8d0=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x320f2c=_0x568dec*0x3,_0x23ce58=[_0x42a870(0x572),_0x42a870(0x5e5),'processor:retry',_0x42a870(0x22f)];let _0xb24364=null;function _0x22fb9b(){const _0x30012b=_0x42a870;if(_0xb24364==null)_0xb24364=Math[_0x30012b(0x1df)]((Date['now']()-process[_0x30012b(0x4d0)]()*0x3e8)/0x3e8)*0x3e8;return _0xb24364;}function _0x85fc2d(_0x57c5ce){const _0x4bf111=_0x42a870;if(process.env.OKDB_PROCESS_KILL==='off')return![];if(_0x57c5ce?.[_0x4bf111(0x2aa)]?.[_0x4bf111(0x532)]&&typeof _0x57c5ce['options'][_0x4bf111(0x532)]===_0x4bf111(0x20e)&&_0x57c5ce[_0x4bf111(0x2aa)]['processes'][_0x4bf111(0x269)]===![])return![];return!![];}function _0x3d73c2(_0x46a3ca,_0x4b2723){const _0x1ed14f=_0x42a870,_0x4d62b9=!!_0x4b2723?.['asyncProcessors'];switch(_0x46a3ca){case _0x1ed14f(0x608):return{'controllable':_0x4d62b9,'decommissionable':![],'killable':!![],'killConfirm':_0x1ed14f(0x530)};case'cli':case'standalone':return{'controllable':_0x4d62b9,'decommissionable':![],'killable':!![],'killConfirm':_0x1ed14f(0x213)};case'embedded':return{'controllable':![],'decommissionable':![],'killable':![]};case _0x1ed14f(0x311):case _0x1ed14f(0x483):case _0x1ed14f(0x4f2):case _0x1ed14f(0x1a1):return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':_0x1ed14f(0x14c)};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x59d1c0{constructor(_0x434dc7){const _0xe16ec2=_0x42a870;this['okdb']=_0x434dc7,this[_0xe16ec2(0x2bf)]=null,this['_desired']=null,this[_0xe16ec2(0x477)]=null,this['_isWriter']=![],this[_0xe16ec2(0x28f)]=![],this[_0xe16ec2(0x36c)]=_0x22fb9b(),this[_0xe16ec2(0x211)]=_0x26e303(process[_0xe16ec2(0x3e7)],this['_processStartedAt']),this[_0xe16ec2(0x4ba)]=_0x36f838[_0xe16ec2(0x3ba)]()[_0xe16ec2(0x45e)](0x0,0x8),this[_0xe16ec2(0x3be)]=_0x38bc5b(this[_0xe16ec2(0x211)],this[_0xe16ec2(0x4ba)]),this[_0xe16ec2(0x277)]=Date[_0xe16ec2(0x16a)](),this[_0xe16ec2(0x214)]=null,this['_supervisorKey']=null,this['_listenAddr']=null,this['_hbTimer']=null,this[_0xe16ec2(0x54e)]=null,this[_0xe16ec2(0x40d)]=null,this[_0xe16ec2(0x1d1)]=0x0,this[_0xe16ec2(0x5ad)]={},this[_0xe16ec2(0x4f9)]=new Map(),this[_0xe16ec2(0x256)]=process['cpuUsage'](),this[_0xe16ec2(0x5cf)]=Date[_0xe16ec2(0x16a)](),this['_lastCpuPct']=0x0,this[_0xe16ec2(0x18b)]=new Map();}get[_0x42a870(0x5f0)](){const _0xbbed6d=_0x42a870;return this[_0xbbed6d(0x211)];}get[_0x42a870(0x61e)](){const _0x120663=_0x42a870;return this[_0x120663(0x3be)];}[_0x42a870(0x243)](_0x2a9f8b,_0x243699){const _0x1343da=_0x42a870,_0x523126=_0x3d73c2(_0x2a9f8b,_0x243699);if(_0x523126[_0x1343da(0x1a0)]&&!_0x85fc2d(this['okdb']))return{..._0x523126,'killable':![],'killConfirm':undefined};return _0x523126;}['isActive'](){return!!this['_statusEnv'];}['setOwnMeta'](_0x2c7c49){const _0x9229b3=_0x42a870;Object[_0x9229b3(0x451)](this[_0x9229b3(0x5ad)],_0x2c7c49||{});}[_0x42a870(0x325)](_0x5aaf4b){const _0x3a3dbd=_0x42a870;if(_0x5aaf4b)this[_0x3a3dbd(0x648)]=_0x5aaf4b;}[_0x42a870(0x25d)](_0x3a9f72={}){const _0x23618d=_0x42a870;return this[_0x23618d(0x2d3)]['_activateProcesses'](_0x3a9f72);}[_0x42a870(0x11a)](){const _0x5a9b43=_0x42a870;let _0x5e246e=null;const _0xacdd5b={};for(const _0x502007 of this[_0x5a9b43(0x2f0)]()){const _0x5cda06=_0x502007[_0x5a9b43(0x2f8)];if(!_0x5cda06)continue;if(_0x5e246e==null)_0x5e246e=_0x5cda06[_0x5a9b43(0x1a7)];for(const _0x4ad8ac of _0x5cda06[_0x5a9b43(0x47c)]||[]){if(![_0x5a9b43(0x3ad),_0x5a9b43(0x5da),'worker','async'][_0x5a9b43(0x5c0)](_0x4ad8ac[_0x5a9b43(0x63e)]))continue;const _0x181a90=_0x4ad8ac['env']||_0x5a9b43(0x1e4);(_0xacdd5b[_0x181a90]||=[])[_0x5a9b43(0x614)]({'type':_0x4ad8ac[_0x5a9b43(0x49b)],'mode':_0x4ad8ac[_0x5a9b43(0x63e)],'state':_0x4ad8ac[_0x5a9b43(0x1a2)],'lastClock':_0x4ad8ac[_0x5a9b43(0x41f)],'headClock':_0x4ad8ac[_0x5a9b43(0x5fa)],'lag':_0x4ad8ac[_0x5a9b43(0x5c1)]});}}return{'envs':_0xacdd5b,'policy':_0x5e246e,'source':_0x5a9b43(0x5bf)};}[_0x42a870(0x4b2)](){const _0x3130ec=_0x42a870,_0x3ab08a=_0x3cd9f3=>{const _0x4f759e=_0x2368;if(_0x3cd9f3[_0x4f759e(0x1a2)]===_0x4f759e(0x4ac)||_0x3cd9f3[_0x4f759e(0x1a2)]===_0x4f759e(0x481)||_0x3cd9f3[_0x4f759e(0x1a2)]===_0x4f759e(0x31b))return 0x3;if(_0x3cd9f3['claimGated'])return 0x1;return 0x2;},_0x14d1a2=new Map();for(const _0x15029a of this[_0x3130ec(0x2f0)]()){for(const _0x194126 of _0x15029a['processing']?.[_0x3130ec(0x47c)]||[]){const _0x1da551={..._0x194126,'owner':{'pid':_0x15029a[_0x3130ec(0x3e7)]??null,'kind':_0x15029a[_0x3130ec(0x4d6)]??null,'host':_0x15029a['host']??null}},_0x3ce28d=_0x194126['mode']==='single'?_0x3130ec(0x4d9)+(_0x194126[_0x3130ec(0x46e)]??'')+'::'+(_0x194126[_0x3130ec(0x262)]??_0x194126[_0x3130ec(0x49b)]??_0x194126['id']):_0x3130ec(0x2f7)+(_0x15029a[_0x3130ec(0x472)]??_0x15029a[_0x3130ec(0x638)]??'')+'::'+(_0x194126[_0x3130ec(0x46e)]??'')+'::'+_0x194126['id'],_0x2fb827=_0x14d1a2[_0x3130ec(0x3aa)](_0x3ce28d);if(!_0x2fb827||_0x3ab08a(_0x1da551)>_0x3ab08a(_0x2fb827))_0x14d1a2[_0x3130ec(0x2c2)](_0x3ce28d,_0x1da551);}}return[..._0x14d1a2['values']()];}[_0x42a870(0x38a)](){const _0xcc191b=_0x42a870,_0x1024d2=Date[_0xcc191b(0x16a)](),_0x22b780=this[_0xcc191b(0x2f0)](),_0x8053db=_0x44ed5c=>Math[_0xcc191b(0x47e)](0x0,Math[_0xcc191b(0x1df)]((_0x1024d2-(_0x44ed5c[_0xcc191b(0x157)]||_0x1024d2))/0x3e8)),_0x80cf08=_0x22b780[_0xcc191b(0x29a)](_0x2f2291=>_0x2f2291[_0xcc191b(0x4d6)]===_0xcc191b(0x608)),_0x280f43=_0x22b780[_0xcc191b(0x1c6)](_0x3bf274=>_0x3bf274['kind']===_0xcc191b(0x311));if(_0x80cf08||_0x280f43[_0xcc191b(0x2eb)])return{'primary':_0x80cf08?{'pid':_0x80cf08['pid'],'uptime':_0x8053db(_0x80cf08)}:null,'workers':_0x280f43['map'](_0xd7e16f=>({'pid':_0xd7e16f[_0xcc191b(0x3e7)],'uptime':_0x8053db(_0xd7e16f)})),'workersConfigured':_0x80cf08?.[_0xcc191b(0x664)]?.[_0xcc191b(0x3c1)]??_0x280f43[_0xcc191b(0x2eb)],'mode':_0xcc191b(0xfe)};const _0x33bfa6=_0x22b780['find'](_0xb22a18=>_0xb22a18[_0xcc191b(0x4d6)]===_0xcc191b(0x3b3)||_0xb22a18[_0xcc191b(0x4d6)]===_0xcc191b(0x53a)||_0xb22a18['kind']===_0xcc191b(0x3e9)),_0x335360=_0x33bfa6?{'pid':_0x33bfa6['pid'],'uptime':_0x8053db(_0x33bfa6)}:{'pid':process[_0xcc191b(0x3e7)],'uptime':Math[_0xcc191b(0x47e)](0x0,Math[_0xcc191b(0x1df)](process[_0xcc191b(0x4d0)]()))};return{'primary':_0x335360,'workers':[_0x335360],'workersConfigured':0x1,'mode':_0xcc191b(0x3ad)};}['nodesView'](){const _0x3b1039=_0x42a870;return this[_0x3b1039(0x49c)]();}[_0x42a870(0x342)](){const _0x49dc5c=_0x42a870,_0x229075=new Map();for(const _0x57c442 of this[_0x49dc5c(0x49c)]())_0x229075[_0x49dc5c(0x2c2)](_0x57c442[_0x49dc5c(0x638)],{..._0x57c442,'children':[]});const _0xd0c2af=[];for(const _0x44c0ce of _0x229075[_0x49dc5c(0x624)]()){const _0x34acee=_0x44c0ce[_0x49dc5c(0x2a8)]?_0x229075[_0x49dc5c(0x3aa)](_0x44c0ce[_0x49dc5c(0x2a8)]):null;if(_0x34acee&&_0x34acee!==_0x44c0ce)_0x34acee[_0x49dc5c(0x331)]['push'](_0x44c0ce);else _0xd0c2af[_0x49dc5c(0x614)](_0x44c0ce);}const _0x501bcf=(_0x27c0a2,_0x2d93d2)=>_0x27c0a2[_0x49dc5c(0x4d6)]===_0x2d93d2[_0x49dc5c(0x4d6)]?(_0x27c0a2[_0x49dc5c(0x3e7)]||0x0)-(_0x2d93d2['pid']||0x0):(_0x27c0a2[_0x49dc5c(0x4d6)]??'')<(_0x2d93d2[_0x49dc5c(0x4d6)]??'')?-0x1:0x1,_0x3e17ac=_0x41d1de=>{const _0x2be9c7=_0x49dc5c;_0x41d1de[_0x2be9c7(0x30f)](_0x501bcf);for(const _0x32511a of _0x41d1de)if(_0x32511a[_0x2be9c7(0x331)][_0x2be9c7(0x2eb)])_0x3e17ac(_0x32511a['children']);};return _0x3e17ac(_0xd0c2af),_0xd0c2af;}[_0x42a870(0x40f)](_0x59dba8){const _0x3e0aaf=_0x42a870;return this[_0x3e0aaf(0x49c)]()[_0x3e0aaf(0x29a)](_0x3a25c6=>_0x3a25c6[_0x3e0aaf(0x638)]===_0x59dba8)??null;}[_0x42a870(0x49c)](_0x184a8a=Date[_0x42a870(0x16a)]()){const _0x1c336c=_0x42a870,_0x384df8=new Map();for(const _0x4ee032 of this[_0x1c336c(0x2f0)]()){const _0x11e55b=_0x46d10e(_0x4ee032);let _0x240aca=_0x384df8['get'](_0x11e55b);!_0x240aca&&(_0x240aca={'processKey':_0x11e55b,'nodeKey':_0x11e55b,'pid':_0x4ee032[_0x1c336c(0x3e7)],'ppid':_0x4ee032[_0x1c336c(0x343)]??null,'host':_0x4ee032['host']??null,'kind':_0x4ee032[_0x1c336c(0x4d6)],'role':null,'supervisorKey':_0x4ee032[_0x1c336c(0x2a8)]??null,'slot':_0x4ee032[_0x1c336c(0x3df)]??null,'slotKey':_0x4ee032[_0x1c336c(0x4af)]??null,'caps':_0x4ee032['caps']??null,'lifecycle':_0x4ee032[_0x1c336c(0x1f0)]??null,'uptime':Math['max'](0x0,Math[_0x1c336c(0x1df)]((_0x184a8a-(_0x4ee032['startedAt']||_0x184a8a))/0x3e8)),'startedAt':_0x4ee032[_0x1c336c(0x157)]??null,'meta':_0x4ee032[_0x1c336c(0x664)]??null,'listenAddr':null,'processing':null,'stats':null,'instances':[]},_0x384df8[_0x1c336c(0x2c2)](_0x11e55b,_0x240aca));_0x240aca['instances'][_0x1c336c(0x614)]({'instanceId':_0x4ee032[_0x1c336c(0xfc)]??null,'role':_0x4ee032[_0x1c336c(0x11f)]??null,'listenAddr':_0x4ee032[_0x1c336c(0xe8)]??null,'lifecycle':_0x4ee032['lifecycle']??null,'processing':_0x4ee032[_0x1c336c(0x2f8)]??null});if(!_0x240aca[_0x1c336c(0x11f)]&&_0x4ee032[_0x1c336c(0x11f)])_0x240aca[_0x1c336c(0x11f)]=_0x4ee032[_0x1c336c(0x11f)];if(!_0x240aca[_0x1c336c(0xe8)]&&_0x4ee032[_0x1c336c(0xe8)])_0x240aca[_0x1c336c(0xe8)]=_0x4ee032[_0x1c336c(0xe8)];if(!_0x240aca[_0x1c336c(0x2f8)]&&_0x4ee032[_0x1c336c(0x2f8)])_0x240aca[_0x1c336c(0x2f8)]=_0x4ee032[_0x1c336c(0x2f8)];if(_0x240aca['caps']==null&&_0x4ee032[_0x1c336c(0x641)])_0x240aca[_0x1c336c(0x641)]=_0x4ee032[_0x1c336c(0x641)];if(_0x4ee032[_0x1c336c(0x3de)]&&(!_0x240aca['stats']||(_0x4ee032['stats']['at']??0x0)>(_0x240aca[_0x1c336c(0x3de)]['at']??0x0)))_0x240aca[_0x1c336c(0x3de)]=_0x4ee032[_0x1c336c(0x3de)];}return[..._0x384df8[_0x1c336c(0x624)]()];}[_0x42a870(0x19f)](){const _0x2f98bc=_0x42a870,_0x5223ee=[],_0x3c1b0a={'rss':0x0,'heapUsed':0x0,'processes':0x0};for(const _0x40fd8d of this[_0x2f98bc(0x49c)]()){_0x5223ee[_0x2f98bc(0x614)]({'processKey':_0x40fd8d['processKey'],'kind':_0x40fd8d[_0x2f98bc(0x4d6)],'pid':_0x40fd8d[_0x2f98bc(0x3e7)],'supervisorKey':_0x40fd8d['supervisorKey'],'meta':_0x40fd8d[_0x2f98bc(0x664)]??null,'uptime':_0x40fd8d[_0x2f98bc(0x4d0)],'stats':_0x40fd8d[_0x2f98bc(0x3de)]??null}),_0x3c1b0a[_0x2f98bc(0x532)]++,_0x40fd8d['stats']&&(_0x3c1b0a[_0x2f98bc(0x37a)]+=_0x40fd8d[_0x2f98bc(0x3de)]['rss']||0x0,_0x3c1b0a['heapUsed']+=(_0x40fd8d[_0x2f98bc(0x3de)][_0x2f98bc(0x5b9)]||0x0)+(_0x40fd8d[_0x2f98bc(0x3de)][_0x2f98bc(0x1f5)]?.[_0x2f98bc(0x5b9)]||0x0));}return{'totals':_0x3c1b0a,'nodes':_0x5223ee};}async[_0x42a870(0x18d)]({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x5ef415=_0x42a870;this[_0x5ef415(0x376)]=this[_0x5ef415(0x376)]||!!writer,this[_0x5ef415(0x28f)]=this[_0x5ef415(0x28f)]||!!reader,this[_0x5ef415(0x214)]=kind||this['_kind']||(_0x5813e1[_0x5ef415(0x60c)]?_0x5ef415(0x311):_0x5ef415(0x3b3)),this[_0x5ef415(0x13a)]=supervisorKey??this[_0x5ef415(0x13a)],this[_0x5ef415(0x648)]=listenAddr??this[_0x5ef415(0x648)],this['_ensureDesired']();if(!writer&&!reader)return null;if(!this[_0x5ef415(0x2bf)]){const _0x4b3ba8=await this[_0x5ef415(0x2d3)][_0x5ef415(0x4a9)](_0x128dd8,{'sync':![],'durability':_0x5ef415(0x2ae)});if(!_0x4b3ba8[_0x5ef415(0x431)](_0x22fe37))await _0x4b3ba8[_0x5ef415(0x428)](_0x22fe37);this[_0x5ef415(0x2bf)]=_0x4b3ba8;}return this[_0x5ef415(0x2bf)];}[_0x42a870(0x3c7)](){const _0x39887f=_0x42a870;return this[_0x39887f(0x64d)]!==this[_0x39887f(0x2bf)]&&(this[_0x39887f(0x64d)]=this[_0x39887f(0x2bf)],this[_0x39887f(0x2f9)]=this[_0x39887f(0x2bf)][_0x39887f(0x447)](_0x22fe37)[_0x39887f(0x206)]),this[_0x39887f(0x2f9)];}[_0x42a870(0x44a)](_0x4be30f){const _0x59402e=_0x42a870,_0x3478f1=this['_nodeDb']()[_0x59402e(0x42f)](_0x4be30f['nodeKey'],_0x4be30f,0x1);if(_0x3478f1&&typeof _0x3478f1[_0x59402e(0x510)]===_0x59402e(0x26b))_0x3478f1[_0x59402e(0x510)](undefined,()=>{});return _0x3478f1;}[_0x42a870(0x162)](_0x446a04){const _0x592f95=_0x42a870,_0x3e9e83=this[_0x592f95(0x3c7)]()[_0x592f95(0x1b1)](_0x446a04);if(_0x3e9e83&&typeof _0x3e9e83[_0x592f95(0x510)]===_0x592f95(0x26b))_0x3e9e83[_0x592f95(0x510)](undefined,()=>{});return _0x3e9e83;}async[_0x42a870(0x607)](_0x4ee01b){const _0x57a0cf=_0x42a870;if(!this['_statusEnv']||!this[_0x57a0cf(0x376)]||!_0x4ee01b?.[_0x57a0cf(0x472)])return;return this[_0x57a0cf(0x44a)](_0x4ee01b);}async[_0x42a870(0x630)](_0x185427){const _0x1096c6=_0x42a870;if(!this['_statusEnv']||!this[_0x1096c6(0x376)]||!_0x185427)return;const _0x3448c1=_0x185427[_0x1096c6(0x5c0)]('#'),_0x577530=[];for(const {key:_0x1bba77}of this['_statusEnv'][_0x1096c6(0x391)](_0x22fe37)){if(_0x1bba77===_0x185427||!_0x3448c1&&typeof _0x1bba77===_0x1096c6(0x380)&&_0x1bba77[_0x1096c6(0x3cc)](_0x185427+'#'))_0x577530[_0x1096c6(0x614)](_0x1bba77);}return Promise[_0x1096c6(0x260)](_0x577530[_0x1096c6(0x601)](_0xac5b65=>this['_removeRowAsync'](_0xac5b65)));}[_0x42a870(0x4db)](_0x8e2c70){const _0x5342c6=_0x42a870;if(typeof _0x8e2c70?.[_0x5342c6(0x3e7)]!==_0x5342c6(0x17c))return![];if(_0x8e2c70[_0x5342c6(0x1bb)]!==_0x297dda[_0x5342c6(0x12a)]())return![];if(_0x8e2c70[_0x5342c6(0x3e7)]===process[_0x5342c6(0x3e7)])return![];try{return process[_0x5342c6(0x269)](_0x8e2c70['pid'],0x0),![];}catch(_0x4032a3){return _0x4032a3[_0x5342c6(0x60e)]===_0x5342c6(0xea);}}[_0x42a870(0x2f0)](){const _0x4fb214=_0x42a870;if(!this[_0x4fb214(0x2bf)])return[];const _0x54b9b4=Date['now'](),_0x3924e0=[];for(const {value:_0x29b50a}of this[_0x4fb214(0x2bf)][_0x4fb214(0x391)](_0x22fe37)){if(_0x29b50a&&(_0x29b50a[_0x4fb214(0x63c)]==null||_0x29b50a[_0x4fb214(0x63c)]>=_0x54b9b4)&&!this['_nodeDead'](_0x29b50a))_0x3924e0[_0x4fb214(0x614)](_0x29b50a);}return _0x3924e0;}[_0x42a870(0x12f)](_0x532d26=0x0){const _0x5e22fe=_0x42a870;if(!this[_0x5e22fe(0x2bf)]||!this[_0x5e22fe(0x376)])return;const _0x34ee86=Date['now']()-_0x532d26,_0x1b5829=new Set(),_0x3d9fad=[];for(const {key:_0x174124,value:_0xd2d6c2}of this[_0x5e22fe(0x2bf)]['getRange'](_0x22fe37)){if(_0xd2d6c2&&(_0xd2d6c2[_0x5e22fe(0x63c)]!=null&&_0xd2d6c2[_0x5e22fe(0x63c)]<_0x34ee86||this['_nodeDead'](_0xd2d6c2)))_0x3d9fad['push'](_0x174124);else _0x1b5829[_0x5e22fe(0x61d)](_0x46d10e(_0xd2d6c2)??_0x174124);}for(const _0x4764eb of _0x3d9fad)this[_0x5e22fe(0x162)](_0x4764eb);if(this[_0x5e22fe(0x201)]())for(const {key:_0x534cea}of this['listDesired']('node')){if(!_0x1b5829['has'](_0x534cea))this['_desired'][_0x5e22fe(0x3a3)](_0x5e22fe(0x407)+_0x534cea);}}[_0x42a870(0x65d)](_0x5a4268=null){const _0x3acf5b=_0x42a870;if(this[_0x3acf5b(0x388)]||!this[_0x3acf5b(0x376)]||!this['_statusEnv'])return;this[_0x3acf5b(0x40d)]=_0x5a4268,this[_0x3acf5b(0x54e)]=()=>this[_0x3acf5b(0x121)]();for(const _0x3f8e9a of _0x23ce58)this[_0x3acf5b(0x2d3)][_0x3acf5b(0x4e5)]['on'](_0x3f8e9a,this[_0x3acf5b(0x54e)]);this[_0x3acf5b(0x423)]();const _0x5e11c0=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x568dec;this['_hbTimer']=setInterval(()=>{const _0x55dff3=_0x3acf5b;if(this[_0x55dff3(0x40d)])try{this[_0x55dff3(0x40d)]();}catch{}this[_0x55dff3(0x423)](),this[_0x55dff3(0x12f)]();},_0x5e11c0);if(this[_0x3acf5b(0x388)]['unref'])this[_0x3acf5b(0x388)]['unref']();}['_maybePublish'](){const _0x4d441a=_0x42a870;if(!this[_0x4d441a(0x376)]||!this['_statusEnv'])return;if(Date[_0x4d441a(0x16a)]()-this[_0x4d441a(0x1d1)]<_0x25d8d0)return;this[_0x4d441a(0x423)]();}['_publishNow'](){const _0x61b709=_0x42a870;if(!this[_0x61b709(0x376)]||!this[_0x61b709(0x2bf)])return;this[_0x61b709(0x1d1)]=Date['now']();try{const _0x2ed879=[this['_buildOwnRow']()];for(const _0x19c188 of this[_0x61b709(0x4f9)]['values']())_0x2ed879[_0x61b709(0x614)](this[_0x61b709(0x4ee)](_0x19c188));const _0x106216=_0x1b606f[_0x61b709(0x26c)]?_0x1b606f[_0x61b709(0x16a)]():0x0,_0x3369cd=Promise['all'](_0x2ed879[_0x61b709(0x601)](_0x342ac9=>this['_putRowAsync'](_0x342ac9)))['catch'](()=>{});if(_0x1b606f[_0x61b709(0x26c)])_0x1b606f[_0x61b709(0x480)](_0x61b709(0x2dd),_0x1b606f[_0x61b709(0x16a)]()-_0x106216,'rows='+_0x2ed879[_0x61b709(0x2eb)]);return _0x3369cd;}catch{}}async[_0x42a870(0x12e)](){const _0x3b5023=_0x42a870;if(this[_0x3b5023(0x54e)]){for(const _0x254f8c of _0x23ce58){try{this[_0x3b5023(0x2d3)][_0x3b5023(0x4e5)][_0x3b5023(0x5d8)](_0x254f8c,this[_0x3b5023(0x54e)]);}catch{}}this[_0x3b5023(0x54e)]=null;}this['_hbTimer']&&(clearInterval(this['_hbTimer']),this[_0x3b5023(0x388)]=null);try{if(this[_0x3b5023(0x2bf)]&&this[_0x3b5023(0x376)])await this[_0x3b5023(0x630)](this['_rowKey']);}catch{}}async[_0x42a870(0x5dc)](){const _0x417abe=_0x42a870;if(!this[_0x417abe(0x2bf)]||!this[_0x417abe(0x376)])return;try{await this[_0x417abe(0x630)](this[_0x417abe(0x3be)]);}catch{}try{const _0x2ea02f=[];for(const {value:_0x171d39}of this[_0x417abe(0x2bf)][_0x417abe(0x391)](_0x22fe37)){if(_0x171d39?.[_0x417abe(0x343)]===process[_0x417abe(0x3e7)]&&_0x171d39[_0x417abe(0x472)])_0x2ea02f[_0x417abe(0x614)](_0x171d39[_0x417abe(0x472)]);}for(const _0x2e414e of _0x2ea02f){try{await this[_0x417abe(0x630)](_0x2e414e);}catch{}}}catch{}}async[_0x42a870(0x581)](){const _0x376e03=_0x42a870;return this[_0x376e03(0x607)](this[_0x376e03(0x3e6)]());}async[_0x42a870(0x2c3)](_0x2ae359){const _0x1d398a=_0x42a870;if(!this[_0x1d398a(0x2bf)]||!this[_0x1d398a(0x376)])return;return this['putNode'](this['_buildChildRow'](_0x2ae359));}[_0x42a870(0x4ee)]({pid:_0x9fcc7a,startedAt:_0x1182c1,kind:_0x29cfa9,supervisorKey:_0x5f2923,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0x42a870(0xf4),meta:meta=null,stats:stats=null}){const _0x1427ee=_0x42a870,_0x2d4b4b=Date['now'](),_0x241e7d=_0x26e303(_0x9fcc7a,_0x1182c1);return{'nodeKey':_0x38bc5b(_0x241e7d,'0'),'processKey':_0x241e7d,'instanceId':'0','pid':_0x9fcc7a,'startedAt':_0x1182c1,'ppid':process[_0x1427ee(0x3e7)],'host':_0x297dda[_0x1427ee(0x12a)](),'supervisorKey':_0x5f2923,'slot':slot,'slotKey':slotKey,'kind':_0x29cfa9,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x2d4b4b,'expiresAt':_0x2d4b4b+_0x320f2c,'caps':this[_0x1427ee(0x243)](_0x29cfa9,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0x42a870(0x501)](_0x311ff9){const _0x3d1713=_0x42a870;if(!_0x311ff9?.[_0x3d1713(0x3e7)])return null;const _0x51a51e=_0x26e303(_0x311ff9[_0x3d1713(0x3e7)],_0x311ff9['startedAt']);this[_0x3d1713(0x4f9)]['set'](_0x51a51e,{..._0x311ff9,'supervisorKey':_0x311ff9[_0x3d1713(0x2a8)]??this[_0x3d1713(0x211)]});if(this[_0x3d1713(0x376)])await this['publishChildRow'](this[_0x3d1713(0x4f9)]['get'](_0x51a51e))[_0x3d1713(0x255)]?.(()=>{});return _0x51a51e;}[_0x42a870(0x493)](_0x331817){const _0x3c7455=_0x42a870;if(!_0x331817)return;return this[_0x3c7455(0x4f9)][_0x3c7455(0x5ed)](_0x331817),this[_0x3c7455(0x630)](_0x331817);}[_0x42a870(0x2a6)](){const _0x5275a2=_0x42a870,_0x4d73fe=Date['now'](),_0x1dcf36=process[_0x5275a2(0x2e1)](),_0x4836ac=(_0x4d73fe-this[_0x5275a2(0x5cf)])*0x3e8;if(_0x4836ac>=0x3d090){const _0x56bff2=_0x1dcf36[_0x5275a2(0x4fd)]-this['_lastCpuUsage'][_0x5275a2(0x4fd)]+(_0x1dcf36[_0x5275a2(0x268)]-this[_0x5275a2(0x256)][_0x5275a2(0x268)]),_0x33567f=_0x297dda['cpus']()[_0x5275a2(0x2eb)]||0x1;this[_0x5275a2(0x54f)]=Math['min'](0x64,Math['round'](_0x56bff2/(_0x4836ac*_0x33567f)*0x64)),this[_0x5275a2(0x35a)]=Math[_0x5275a2(0x1df)](_0x4836ac/0x3e8),this[_0x5275a2(0x256)]=_0x1dcf36,this['_lastCpuAt']=_0x4d73fe;}const _0x527296=process['memoryUsage']();let _0x5dd018=null;if(this[_0x5275a2(0x18b)][_0x5275a2(0x3ea)]>0x0){let _0x179bf6=0x0;for(const _0x446497 of this[_0x5275a2(0x18b)][_0x5275a2(0x624)]())_0x179bf6+=_0x446497[_0x5275a2(0x5b9)]||0x0;_0x5dd018={'count':this[_0x5275a2(0x18b)][_0x5275a2(0x3ea)],'heapUsed':_0x179bf6};}return{'rss':_0x527296[_0x5275a2(0x37a)],'heapUsed':_0x527296[_0x5275a2(0x5b9)],'heapTotal':_0x527296[_0x5275a2(0x4d8)],'external':_0x527296[_0x5275a2(0x4a0)],'cpuPct':this[_0x5275a2(0x54f)],'cpuWindowMs':this[_0x5275a2(0x35a)]??null,'threads':_0x5dd018,'at':_0x4d73fe};}[_0x42a870(0x303)](_0x13af51,_0x30a33d){const _0x3b75e4=_0x42a870;if(!_0x13af51||!_0x30a33d)return;this[_0x3b75e4(0x18b)][_0x3b75e4(0x2c2)](_0x13af51,_0x30a33d);}[_0x42a870(0x5ab)](_0x7480b4){const _0x3fbc3b=_0x42a870;this[_0x3fbc3b(0x18b)][_0x3fbc3b(0x5ed)](_0x7480b4);}['updateSupervisedChildStats'](_0x998655,_0x18c7fc,_0x3f61d6=undefined){const _0x45cfb6=_0x42a870,_0x222e56=this['_children'][_0x45cfb6(0x3aa)](_0x998655);if(!_0x222e56||!_0x18c7fc)return;if(_0x3f61d6!==undefined)_0x222e56[_0x45cfb6(0x2f8)]=_0x3f61d6;_0x222e56[_0x45cfb6(0x3de)]={'rss':_0x18c7fc[_0x45cfb6(0x37a)]??null,'heapUsed':_0x18c7fc[_0x45cfb6(0x5b9)]??null,'heapTotal':_0x18c7fc['heapTotal']??null,'external':_0x18c7fc[_0x45cfb6(0x4a0)]??null,'cpuPct':_0x18c7fc[_0x45cfb6(0x135)]??null,'cpuWindowMs':_0x18c7fc[_0x45cfb6(0x47a)]??null,'threads':_0x18c7fc['threads']??null,'claims':_0x18c7fc['claims']??null,'envsOpen':_0x18c7fc['envsOpen']??null,'at':Date[_0x45cfb6(0x16a)]()};}[_0x42a870(0x3e6)](){const _0x1503ce=_0x42a870,_0x1a7911=Date[_0x1503ce(0x16a)](),_0x25ef4f=this['okdb'][_0x1503ce(0x1cd)]||{},_0x4ec859=this[_0x1503ce(0x214)]||_0x1503ce(0x3b3);return{'nodeKey':this[_0x1503ce(0x3be)],'processKey':this[_0x1503ce(0x211)],'instanceId':this[_0x1503ce(0x4ba)],'pid':process[_0x1503ce(0x3e7)],'startedAt':this[_0x1503ce(0x36c)],'instanceStartedAt':this['_startedAt'],'ppid':typeof process[_0x1503ce(0x343)]===_0x1503ce(0x17c)?process['ppid']:null,'host':_0x297dda[_0x1503ce(0x12a)](),'supervisorKey':this[_0x1503ce(0x13a)]??null,'kind':_0x4ec859,'role':{'engines':!!_0x25ef4f['engines'],'asyncProcessors':!!_0x25ef4f[_0x1503ce(0x667)],'compaction':_0x25ef4f['compaction'],'http':_0x25ef4f[_0x1503ce(0x5d0)]},'listenAddr':this[_0x1503ce(0x648)]??null,'heartbeatAt':_0x1a7911,'expiresAt':_0x1a7911+_0x320f2c,'caps':this[_0x1503ce(0x243)](_0x4ec859,_0x25ef4f),'lifecycle':{'state':_0x1503ce(0xf4),'desiredVersionApplied':null},'meta':{...this[_0x1503ce(0x5ad)]},'processing':_0x25ef4f['asyncProcessors']?this[_0x1503ce(0x151)]():null,'stats':this[_0x1503ce(0x2a6)]()};}[_0x42a870(0x151)](){const _0x4b410e=_0x42a870,_0x35aa57=[];try{for(const [_0x2587a5,_0x34aecb]of this['okdb'][_0x4b410e(0x5bd)]){if(_0x2587a5[_0x4b410e(0x3cc)]('~'))continue;for(const _0x7840d of _0x34aecb['processor'][_0x4b410e(0xf1)]())_0x35aa57[_0x4b410e(0x614)]({..._0x7840d,'env':_0x2587a5});}}catch{}return{'policy':this['okdb'][_0x4b410e(0x34e)]??null,'processors':_0x35aa57};}[_0x42a870(0x201)](){const _0x17c1d6=_0x42a870;if(this[_0x17c1d6(0x1d6)])return!![];const _0x1ba4d1=this['okdb'][_0x17c1d6(0x323)];if(!_0x1ba4d1)return![];return this[_0x17c1d6(0x1d6)]=_0x1ba4d1[_0x17c1d6(0x2bc)](_0x421837,{'dupSort':![]}),this[_0x17c1d6(0x477)]=_0x1ba4d1[_0x17c1d6(0x2bc)](_0x2025ea,{'dupSort':![]}),!![];}[_0x42a870(0x25c)](){const _0x575644=_0x42a870;return!!this[_0x575644(0x1d6)];}[_0x42a870(0x21d)](_0x1fc893,_0xe43a76){const _0x57a40c=_0x42a870;if(!this[_0x57a40c(0x201)]())return null;return this[_0x57a40c(0x1d6)]['get'](_0x1fc893+'/'+_0xe43a76)??null;}[_0x42a870(0x252)](_0x3b2804,_0x50c6b9,_0x127357){const _0x13adf1=_0x42a870;if(!this[_0x13adf1(0x201)]())return null;const _0x240504=_0x3b2804+'/'+_0x50c6b9;let _0x153b03;return this[_0x13adf1(0x1d6)]['transactionSync'](()=>{const _0x6c90f6=_0x13adf1,_0x370921=this[_0x6c90f6(0x1d6)][_0x6c90f6(0x3aa)](_0x240504)||{'version':0x0};_0x153b03=(_0x370921[_0x6c90f6(0x2ea)]||0x0)+0x1,this[_0x6c90f6(0x1d6)][_0x6c90f6(0x42f)](_0x240504,{..._0x370921,..._0x127357,'version':_0x153b03,'updatedAt':Date[_0x6c90f6(0x16a)]()});}),_0x153b03;}[_0x42a870(0x5ea)](_0x5c135f){const _0x1dbb8b=_0x42a870;if(!this[_0x1dbb8b(0x201)]())return[];const _0x55f58c=_0x5c135f+'/',_0x5792e7=[];for(const {key:_0x16c1ee,value:_0x2e1bd2}of this['_desired']['getRange']({'start':_0x55f58c,'end':_0x55f58c+'ÿ'})){if(typeof _0x16c1ee!==_0x1dbb8b(0x380)||!_0x16c1ee['startsWith'](_0x55f58c))break;_0x5792e7['push']({'key':_0x16c1ee[_0x1dbb8b(0x45e)](_0x55f58c[_0x1dbb8b(0x2eb)]),'value':_0x2e1bd2});}return _0x5792e7;}[_0x42a870(0x3c9)](_0xd371db){if(!this['_ensureDesired']())return null;return this['_cmd']['get'](_0xd371db)??null;}[_0x42a870(0x1c3)](_0x478ebf,_0x1d9c8e,_0x2f772e={}){const _0x22faab=_0x42a870;if(!this['_ensureDesired']())return null;let _0x370b32;return this['_cmd'][_0x22faab(0x226)](()=>{const _0xf15677=_0x22faab,_0x1fe9bd=this[_0xf15677(0x477)]['get'](_0x478ebf)||{'epoch':0x0};_0x370b32=(_0x1fe9bd[_0xf15677(0x3f7)]||0x0)+0x1,this[_0xf15677(0x477)][_0xf15677(0x42f)](_0x478ebf,{..._0x1fe9bd,..._0x2f772e,'cmd':_0x1d9c8e,'epoch':_0x370b32,'updatedAt':Date[_0xf15677(0x16a)]()});}),_0x370b32;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x59d1c0,'nodeKey':_0x26e303,'logicalKey':_0x3d454f,'slotKey':_0x101cc0,'PROCESS_ENV':_0x128dd8,'NODE_TYPE':_0x22fe37},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x5d9114=_0x4b361c;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x1f270e=require$$0$4,{EVENTS:_0xaa13c7,CHANGE_ACTIONS:_0x18930f}=requireOkdbEnums(),{LOOP:_0x28c49f}=requireOkdbLoopMonitor(),_0x4715d4=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x7fe3d=0x5,_0x3364cd=0x2710;class _0x3e5c11 extends _0x1f270e{constructor(_0x48d816,_0x1f8013={}){const _0x231e4a=_0x2368;super(),this[_0x231e4a(0x2d3)]=_0x48d816,this[_0x231e4a(0x4ed)]=_0x1f8013['quantum']??_0x4715d4,this[_0x231e4a(0x126)]=_0x1f8013[_0x231e4a(0x5e2)]??_0x7fe3d,this['_dedupeMax']=_0x1f8013['dedupeMax']??_0x3364cd,this[_0x231e4a(0x1ba)]=![],this[_0x231e4a(0x561)]=new Map(),this['_baselines']=new Map(),this[_0x231e4a(0x2d5)]=new Map(),this['_flushTimer']=null,this[_0x231e4a(0x5a7)]=![],this['_seen']=new Set(),this[_0x231e4a(0x15f)]=_0x307536=>this[_0x231e4a(0x17d)](_0x307536),this[_0x231e4a(0x49d)]=_0x257552=>this['_handlePoke'](_0x257552),this[_0x231e4a(0x5db)]=()=>this[_0x231e4a(0x2e9)]();}[_0x5d9114(0x545)](){const _0x4d5c24=_0x5d9114;if(this['_started'])return;this[_0x4d5c24(0x1ba)]=!![];for(const [_0xcf6370,_0x4c6b2e]of this['okdb'][_0x4d5c24(0x5bd)]){if(_0xcf6370[_0x4d5c24(0x3cc)]('~'))continue;try{this[_0x4d5c24(0x5fd)][_0x4d5c24(0x2c2)](_0xcf6370,_0x4c6b2e[_0x4d5c24(0x65c)]()||0x0);}catch{}}const {events:_0x44a88a}=this[_0x4d5c24(0x2d3)];_0x44a88a['on'](_0xaa13c7[_0x4d5c24(0x293)],this[_0x4d5c24(0x15f)]),_0x44a88a['on'](_0xaa13c7['ITEM_UPDATE'],this[_0x4d5c24(0x15f)]),_0x44a88a['on'](_0xaa13c7[_0x4d5c24(0x3a5)],this[_0x4d5c24(0x15f)]),_0x44a88a['on'](_0xaa13c7['SYSTEM_POKE'],this[_0x4d5c24(0x49d)]),_0x44a88a[_0x4d5c24(0x292)](_0xaa13c7[_0x4d5c24(0x36e)],this['_onStop']);}[_0x5d9114(0x2e9)](){const _0x3c5db5=_0x5d9114;if(!this[_0x3c5db5(0x1ba)])return;this[_0x3c5db5(0x1ba)]=![];const {events:_0x1b24f7}=this['okdb'];_0x1b24f7[_0x3c5db5(0x5d8)](_0xaa13c7[_0x3c5db5(0x293)],this[_0x3c5db5(0x15f)]),_0x1b24f7[_0x3c5db5(0x5d8)](_0xaa13c7[_0x3c5db5(0x234)],this['_onItem']),_0x1b24f7[_0x3c5db5(0x5d8)](_0xaa13c7[_0x3c5db5(0x3a5)],this[_0x3c5db5(0x15f)]),_0x1b24f7[_0x3c5db5(0x5d8)](_0xaa13c7[_0x3c5db5(0x127)],this[_0x3c5db5(0x49d)]);try{_0x1b24f7['off'](_0xaa13c7[_0x3c5db5(0x36e)],this['_onStop']);}catch{}this['_flushTimer']&&(clearTimeout(this['_flushTimer']),this['_flushTimer']=null),this[_0x3c5db5(0x2d5)]['clear'](),this[_0x3c5db5(0x561)][_0x3c5db5(0x479)](),this[_0x3c5db5(0x5fd)][_0x3c5db5(0x479)](),this[_0x3c5db5(0x618)][_0x3c5db5(0x479)]();}[_0x5d9114(0x117)](_0x19bc3f,_0x4ada7a,_0x8126e2,_0x254240){return _0x19bc3f+'\x00'+_0x4ada7a+'\x00'+_0x8126e2+'\x00'+_0x254240;}[_0x5d9114(0x5ac)](_0x189513,_0x832dc0,_0x389f9a,_0x3b41da){const _0x2933b9=_0x5d9114,_0x4eb80f=this['_dedupeKey'](_0x189513,_0x832dc0,_0x389f9a,_0x3b41da);if(this[_0x2933b9(0x618)]['has'](_0x4eb80f))return![];this[_0x2933b9(0x618)][_0x2933b9(0x61d)](_0x4eb80f);if(this[_0x2933b9(0x618)][_0x2933b9(0x3ea)]>this[_0x2933b9(0x1e3)]){const _0x5ac00e=this[_0x2933b9(0x618)][_0x2933b9(0x624)]()[_0x2933b9(0x419)]()['value'];this[_0x2933b9(0x618)]['delete'](_0x5ac00e);}return!![];}[_0x5d9114(0x17d)](_0x2f57f6){const _0x5e144e=_0x5d9114;if(!this[_0x5e144e(0x1ba)]||!_0x2f57f6)return;const {env:_0x3ff3cd,type:_0x4b618e,key:_0x44c2b7,clock:_0x491291,origin:_0x3542ce,action:_0x3430e6,newValue:_0x48ba28,oldValue:_0x56869c}=_0x2f57f6;if(_0x3ff3cd==null||_0x4b618e==null||_0x44c2b7==null)return;if(typeof _0x3ff3cd===_0x5e144e(0x380)&&_0x3ff3cd['startsWith']('~'))return;if(typeof _0x4b618e===_0x5e144e(0x380)&&_0x4b618e[_0x5e144e(0x3cc)]('~'))return;if(!this[_0x5e144e(0x5ac)](_0x3ff3cd,_0x4b618e,_0x44c2b7,_0x491291))return;const _0x100883=_0x3430e6===_0x18930f['REMOVE']?_0x5e144e(0x1b1):_0x5e144e(0x42f);this[_0x5e144e(0x464)](_0x5e144e(0x19e),{'env':_0x3ff3cd,'type':_0x4b618e,'key':_0x44c2b7,'op':_0x100883,'clock':_0x491291,'origin':_0x3542ce,'value':_0x100883===_0x5e144e(0x1b1)?null:_0x48ba28,'prevValue':_0x56869c});}['_handlePoke'](_0x147796){const _0x25afe5=_0x5d9114;if(!this[_0x25afe5(0x1ba)])return;if(!_0x147796||typeof _0x147796[_0x25afe5(0x46e)]!==_0x25afe5(0x380)||typeof _0x147796[_0x25afe5(0x49b)]!==_0x25afe5(0x380))return;const {env:_0x46c0ec,type:_0x45480a}=_0x147796;if(_0x46c0ec[_0x25afe5(0x3cc)]('~')||_0x45480a['startsWith']('~'))return;this[_0x25afe5(0x2d5)][_0x25afe5(0x2c2)](_0x46c0ec+'\x00'+_0x45480a,{'env':_0x46c0ec,'type':_0x45480a}),this['_scheduleFlush']();}['_scheduleFlush'](){const _0x42d346=_0x5d9114;if(this[_0x42d346(0x3af)])return;const _0x4d3fe2=()=>{const _0x363e3d=_0x42d346;this[_0x363e3d(0x3af)]=null,this[_0x363e3d(0x1b0)]()[_0x363e3d(0x255)](()=>{});};this[_0x42d346(0x3af)]=setTimeout(_0x4d3fe2,this[_0x42d346(0x126)]>0x0?this[_0x42d346(0x126)]:0x0);}async[_0x5d9114(0x1b0)](){const _0x176c58=_0x5d9114;if(this['_draining']){this[_0x176c58(0x244)]();return;}this['_draining']=!![];try{const _0x1f1bc9=[...this[_0x176c58(0x2d5)]['values']()];this[_0x176c58(0x2d5)][_0x176c58(0x479)]();let _0x4fe65d=![];for(const {env:_0xc9f7b2,type:_0x15c17b}of _0x1f1bc9){try{const _0x4c5fad=await this['_drainOne'](_0xc9f7b2,_0x15c17b);if(_0x4c5fad)_0x4fe65d=!![];}catch{this['_pending'][_0x176c58(0x2c2)](_0xc9f7b2+'\x00'+_0x15c17b,{'env':_0xc9f7b2,'type':_0x15c17b}),_0x4fe65d=!![];}}if(_0x4fe65d||this[_0x176c58(0x2d5)]['size']>0x0)this[_0x176c58(0x244)]();}finally{this[_0x176c58(0x5a7)]=![];}}async['_drainOne'](_0x550865,_0x1eb598){const _0x584f69=_0x5d9114,_0x505a12=await this[_0x584f69(0x2d3)]['_openEnvLazy'](_0x550865),_0x253bc9=_0x550865+'\x00'+_0x1eb598;!this['_cursors']['has'](_0x253bc9)&&(!this['_baselines']['has'](_0x550865)&&this[_0x584f69(0x5fd)][_0x584f69(0x2c2)](_0x550865,_0x505a12['getClock']()||0x0),this[_0x584f69(0x561)]['set'](_0x253bc9,this[_0x584f69(0x5fd)][_0x584f69(0x3aa)](_0x550865)));const _0x3d1383=this[_0x584f69(0x561)][_0x584f69(0x3aa)](_0x253bc9),_0x1b431b=_0x505a12['getClock'](_0x1eb598)||0x0;if(_0x1b431b<=_0x3d1383)return![];const _0x201616=_0x3d1383+this['_quantum'],_0x772b08=Math['min'](_0x1b431b,_0x201616),_0x33e32f=_0x28c49f['enabled']?_0x28c49f[_0x584f69(0x16a)]():0x0,_0x52eefa=Array[_0x584f69(0x36d)](_0x505a12[_0x584f69(0x5e0)](_0x1eb598,_0x3d1383+0x1,_0x772b08));let _0x32ed64=_0x3d1383;for(const _0x25a34e of _0x52eefa){const {clock:_0x3bcb64,key:_0x341b1a,action:_0x23b699,origin:_0x486659}=_0x25a34e;if(_0x3bcb64>_0x32ed64)_0x32ed64=_0x3bcb64;if(_0x341b1a==null)continue;if(!this['_markSeen'](_0x550865,_0x1eb598,_0x341b1a,_0x3bcb64))continue;let _0x5b3081,_0x2b4261;if(_0x23b699===_0x18930f[_0x584f69(0x1d7)])_0x5b3081=_0x584f69(0x1b1),_0x2b4261=null;else{const _0x1047a3=_0x505a12[_0x584f69(0x3aa)](_0x1eb598,_0x341b1a);_0x1047a3==null?(_0x5b3081='remove',_0x2b4261=null):(_0x5b3081=_0x584f69(0x42f),_0x2b4261=_0x1047a3);}this[_0x584f69(0x464)]('change',{'env':_0x550865,'type':_0x1eb598,'key':_0x341b1a,'op':_0x5b3081,'clock':_0x3bcb64,'origin':_0x486659,'value':_0x2b4261});}if(_0x28c49f[_0x584f69(0x26c)])_0x28c49f[_0x584f69(0x480)]('feed:'+_0x550865+':'+_0x1eb598,_0x28c49f[_0x584f69(0x16a)]()-_0x33e32f,'n='+_0x52eefa[_0x584f69(0x2eb)]);return this['_cursors'][_0x584f69(0x2c2)](_0x253bc9,Math[_0x584f69(0x47e)](_0x32ed64,_0x772b08)),_0x505a12[_0x584f69(0x65c)](_0x1eb598)>_0x772b08;}[_0x5d9114(0x626)](){const _0x2dc7c6=_0x5d9114;return{'started':this[_0x2dc7c6(0x1ba)],'quantum':this[_0x2dc7c6(0x4ed)],'flushDebounce':this['_flushDebounce'],'cursors':Object[_0x2dc7c6(0x3e5)]([...this[_0x2dc7c6(0x561)][_0x2dc7c6(0x427)]()][_0x2dc7c6(0x601)](([_0x43f316,_0x332e6b])=>[_0x43f316[_0x2dc7c6(0x38b)]('\x00',':'),_0x332e6b])),'pending':this[_0x2dc7c6(0x2d5)][_0x2dc7c6(0x3ea)],'seen':this[_0x2dc7c6(0x618)][_0x2dc7c6(0x3ea)]};}}return _0x3e5c11[_0x5d9114(0xe5)]=_0x4715d4,okdbChangefeed={'OKDBChangefeed':_0x3e5c11},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x40f568=_0x4b361c;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x5468af=require$$1$2,_0x376275=require$$1,{EVENTS:_0x54a1fc}=requireOkdbEnums(),_0x3fef7c=require$$0,{slotKey:_0xf72e58}=requireOkdbProcessRegistry(),_0xb6955d=0xfa,_0x16d07c=0xfa0,_0x1e1416=0x5,_0x4cae38=0x2710,_0x10ac10=0xbb8,_0x5b9bf5=0x7d0,_0x1d8ea3=_0x40f568(0x131),_0x102d63=_0x40f568(0x18c),_0xc2631='log',_0x4c5b04=_0x40f568(0x3de),_0x30b6a4=[_0x54a1fc['VIEW_PROGRESS'],_0x54a1fc[_0x40f568(0x574)],_0x54a1fc[_0x40f568(0x47b)],_0x54a1fc['FTS_RESET'],_0x54a1fc[_0x40f568(0x465)],_0x54a1fc[_0x40f568(0x62b)],_0x54a1fc[_0x40f568(0x265)],_0x54a1fc[_0x40f568(0x2b9)],_0x40f568(0x5e5),_0x40f568(0x572),'processor:error',_0x40f568(0x50b),_0x40f568(0x4c9),_0x40f568(0x20c)],_0x4d710c=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0;function _0x40ea2b({workers:_0x2fc46c,makeOkdb:_0x19dfc6,port:_0x5051b3,primaryOkdb:_0x12a268,childEntry:childEntry=![],workerEnv:workerEnv=null}={}){const _0x162a47=_0x40f568;if(_0x5468af[_0x162a47(0x48f)])return childEntry&&_0x5468af[_0x162a47(0x5cc)]({'exec':_0x376275[_0x162a47(0x3a4)](__dirname,_0x162a47(0x633)),'args':[],'execArgv':((()=>{const _0x45a56c=_0x162a47,_0x5133b7=[];for(let _0x171d1c=0x0;_0x171d1c<process[_0x45a56c(0x56a)][_0x45a56c(0x2eb)];_0x171d1c++){const _0x3d6e30=process['execArgv'][_0x171d1c];if(_0x3d6e30['startsWith']('--test')||_0x3d6e30[_0x45a56c(0x3cc)](_0x45a56c(0x3ed))||_0x3d6e30[_0x45a56c(0x3cc)](_0x45a56c(0x228)))continue;if(_0x3d6e30==='-e'||_0x3d6e30===_0x45a56c(0x17a)||_0x3d6e30==='-p'||_0x3d6e30===_0x45a56c(0x297)){_0x171d1c++;continue;}_0x5133b7[_0x45a56c(0x614)](_0x3d6e30);}return _0x5133b7;})())}),_0x59eeef({'workers':_0x2fc46c,'port':_0x5051b3,'primaryOkdb':_0x12a268,'workerEnv':workerEnv});return _0x4374ac({'makeOkdb':_0x19dfc6,'port':_0x5051b3});}function _0x59eeef({workers:_0x1626b0,port:_0x1b776b,primaryOkdb:_0x4f7da7,workerEnv:_0x5b6c74}){const _0x7eaec9=_0x40f568,_0x37706a=new Map(),_0x4f062c=new Map();let _0x2096bb=![];const _0x42692c=_0x29a3b3=>_0x29a3b3?.[_0x7eaec9(0x31a)],_0x56d543=_0x1ad2d1=>{const _0x17d7a3=_0x7eaec9,_0x202acb=_0x5468af['fork']({...process.env,..._0x5b6c74||{},'OKDB_CLUSTER_SLOT':String(_0x1ad2d1)});return _0x202acb[_0x17d7a3(0x31a)]=_0x1ad2d1,_0x37706a[_0x17d7a3(0x2c2)](_0x202acb[_0x17d7a3(0x22a)][_0x17d7a3(0x3e7)],{'worker':_0x202acb,'startedAt':Date[_0x17d7a3(0x16a)](),'slot':_0x1ad2d1}),_0x202acb['on'](_0x17d7a3(0x31b),_0x36eb3a=>{const _0x301393=_0x17d7a3;console[_0x301393(0x4f7)](_0x301393(0x1a9)+_0x202acb['process'][_0x301393(0x3e7)]+_0x301393(0x5af)+(_0x36eb3a?.['message']??_0x36eb3a));}),_0x202acb['on'](_0x17d7a3(0x4ac),()=>_0x3defd0()),_0x202acb;},_0x50e228=_0x103cc6=>{const _0x41e35b=_0x7eaec9;for(const {worker:_0x4ae217}of _0x37706a[_0x41e35b(0x624)]()){if(_0x4ae217['isDead']()||!_0x4ae217[_0x41e35b(0x389)]())continue;try{_0x4ae217['send'](_0x103cc6);}catch{}}};_0x4f7da7?.[_0x7eaec9(0x17b)]?.({'kind':_0x7eaec9(0x608),'listenAddr':':'+_0x1b776b})[_0x7eaec9(0x255)](()=>{}),_0x4f7da7?.[_0x7eaec9(0x532)]?.[_0x7eaec9(0x5a1)]?.({'workersConfigured':_0x1626b0});const _0x20c757={'engines':![],'asyncProcessors':![],'compaction':_0x7eaec9(0x573),'http':!![]},_0x3defd0=()=>{const _0x45e08e=_0x7eaec9,_0x1c5f7b=_0x4f7da7?.[_0x45e08e(0x532)];if(!_0x1c5f7b||!_0x1c5f7b[_0x45e08e(0x376)])return;const _0x31eef2=_0x1c5f7b['selfKey'];for(const {worker:_0xe936c0,startedAt:_0x53d54f,slot:_0x4d1264,stats:_0x955b45}of _0x37706a[_0x45e08e(0x624)]()){if(_0xe936c0[_0x45e08e(0xf6)]())continue;const _0x4ee4b0=_0x1c5f7b[_0x45e08e(0x25c)]?.()&&_0x1c5f7b[_0x45e08e(0x21d)]('slot',_0x5a0a58(_0x4d1264))?.[_0x45e08e(0x1e0)]===!![];_0x1c5f7b[_0x45e08e(0x2c3)]({'pid':_0xe936c0['process'][_0x45e08e(0x3e7)],'startedAt':_0x53d54f,'kind':_0x45e08e(0x311),'supervisorKey':_0x31eef2,'slot':_0x4d1264,'slotKey':_0x5a0a58(_0x4d1264),'role':_0x20c757,'listenAddr':':'+_0x1b776b,'lifecycle':_0x4ee4b0?_0x45e08e(0x1f7):_0x45e08e(0xf4),'stats':_0x955b45??null})['catch'](()=>{});}},_0x5a0a58=_0x1934e6=>_0xf72e58(_0x7eaec9(0x1e9)+_0x1b776b,_0x1934e6),_0x3de097=_0xacb531=>{const _0x41554b=_0x7eaec9,_0x21711e=_0x4f7da7?.['processes'];if(!_0x21711e?.['hasDesired']?.())return![];return _0x21711e[_0x41554b(0x21d)](_0x41554b(0x3df),_0x5a0a58(_0xacb531))?.[_0x41554b(0x1e0)]===!![];};for(let _0x5efc6d=0x0;_0x5efc6d<_0x1626b0;_0x5efc6d++){const _0x1b45ba=_0x3de097(_0x5efc6d);_0x4f062c[_0x7eaec9(0x2c2)](_0x5efc6d,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x1b45ba,'respawnTimer':null}),_0x1b45ba?console[_0x7eaec9(0x4f7)](_0x7eaec9(0x215)+_0x5efc6d+_0x7eaec9(0x130)):_0x56d543(_0x5efc6d);}const _0x226817=()=>{const _0x3a7b65=_0x7eaec9,_0x1191ed=_0x4f7da7?.[_0x3a7b65(0x532)];if(!_0x1191ed?.[_0x3a7b65(0x376)]||!_0x1191ed['hasDesired']?.())return;for(const [_0x192d43,_0x4ad7d8]of _0x4f062c[_0x3a7b65(0x427)]()){const _0x57264b=_0x1191ed[_0x3a7b65(0x21d)](_0x3a7b65(0x3df),_0x5a0a58(_0x192d43)),_0x38ed1f=_0x57264b?.[_0x3a7b65(0x1e0)]===!![],_0x503ce3=_0x57264b?.[_0x3a7b65(0x269)]===!![];if(_0x38ed1f&&!_0x4ad7d8['dead']){_0x4ad7d8[_0x3a7b65(0x4a4)]=!![];_0x4ad7d8[_0x3a7b65(0x2a9)]&&(clearTimeout(_0x4ad7d8[_0x3a7b65(0x2a9)]),_0x4ad7d8['respawnTimer']=null);for(const {worker:_0x2a3db8}of _0x37706a[_0x3a7b65(0x624)]()){if(_0x42692c(_0x2a3db8)!==_0x192d43||_0x2a3db8[_0x3a7b65(0xf6)]())continue;try{if(_0x503ce3)_0x2a3db8[_0x3a7b65(0x22a)][_0x3a7b65(0x269)]('SIGKILL');else _0x2a3db8[_0x3a7b65(0x389)]()&&_0x2a3db8[_0x3a7b65(0x54d)]();}catch{}}console[_0x3a7b65(0x4f7)](_0x3a7b65(0x5d3)+(_0x503ce3?_0x3a7b65(0x315):_0x3a7b65(0x339))+_0x3a7b65(0x309)+_0x192d43+'\x20(durable\x20desired-state)');}else{if(!_0x38ed1f&&_0x4ad7d8[_0x3a7b65(0x4a4)]&&_0x57264b){_0x4ad7d8[_0x3a7b65(0x4a4)]=![],_0x4ad7d8['deaths']=[],_0x4ad7d8[_0x3a7b65(0x50f)]=0x0;const _0x50d0d9=[..._0x37706a['values']()][_0x3a7b65(0x28c)](({worker:_0x1522a5})=>_0x42692c(_0x1522a5)===_0x192d43&&!_0x1522a5['isDead']());!_0x50d0d9&&!_0x2096bb&&(_0x56d543(_0x192d43),console['log'](_0x3a7b65(0x5aa)+_0x192d43));}}}},_0x25750c=()=>{try{_0x226817();}catch{}};_0x4f7da7?.['events']?.['on']?.(_0x54a1fc[_0x7eaec9(0x425)],_0x25750c);const _0x4a4971=[];if(_0x4f7da7?.[_0x7eaec9(0x4e5)]?.['on'])for(const _0x48b483 of _0x30b6a4){const _0x444c9d=_0x48b2b6=>{_0x50e228({[_0x1d8ea3]:_0x102d63,'event':_0x48b483,'data':_0x48b2b6??{}});};_0x4f7da7[_0x7eaec9(0x4e5)]['on'](_0x48b483,_0x444c9d),_0x4a4971[_0x7eaec9(0x614)]({'event':_0x48b483,'handler':_0x444c9d});}const _0x2c48b5=setInterval(()=>{_0x226817(),_0x3defd0();},_0x4d710c);_0x2c48b5['unref']?.();const _0x1deb65=(_0x15402a,_0x3be158)=>{const _0x3a8dde=_0x7eaec9;if(!_0x3be158||typeof _0x3be158!=='object'||_0x3be158[_0x1d8ea3]!==_0xc2631)return;if(!_0x4f7da7?.[_0x3a8dde(0x4f7)]?.['ingest'])return;const _0x247aa7=_0x3be158[_0x3a8dde(0x5ff)]||{};_0x4f7da7[_0x3a8dde(0x4f7)][_0x3a8dde(0x32e)]({..._0x247aa7,'msg':'[w'+_0x3be158[_0x3a8dde(0x3df)]+']\x20'+(_0x247aa7[_0x3a8dde(0x3dc)]??''),'meta':{..._0x247aa7[_0x3a8dde(0x664)]||{},'worker':_0x3be158[_0x3a8dde(0x3df)],'workerPid':_0x3be158[_0x3a8dde(0x3e7)]}});};_0x5468af['on'](_0x7eaec9(0x29c),_0x1deb65);const _0x1d07d1=(_0xa1861c,_0x4ed5f1)=>{const _0x392711=_0x7eaec9;if(!_0x4ed5f1||typeof _0x4ed5f1!==_0x392711(0x20e)||_0x4ed5f1[_0x1d8ea3]!==_0x4c5b04)return;const _0xbda037=_0x37706a[_0x392711(0x3aa)](_0xa1861c[_0x392711(0x22a)][_0x392711(0x3e7)]);if(_0xbda037)_0xbda037[_0x392711(0x3de)]={..._0x4ed5f1['stats'],'at':Date[_0x392711(0x16a)]()};};_0x5468af['on'](_0x7eaec9(0x29c),_0x1d07d1),_0x5468af['on'](_0x7eaec9(0x542),(_0x43c0f1,_0x5b2131,_0x39da6b)=>{const _0x3da6ca=_0x7eaec9,_0x33e0da=_0x43c0f1[_0x3da6ca(0x22a)][_0x3da6ca(0x3e7)],_0x327e6b=_0x42692c(_0x43c0f1),_0x5bc400=_0x37706a[_0x3da6ca(0x3aa)](_0x33e0da);if(_0x5bc400&&_0x4f7da7?.[_0x3da6ca(0x532)])_0x4f7da7['processes']['removeNode'](_0x33e0da+':'+_0x5bc400['startedAt'])[_0x3da6ca(0x255)](()=>{});_0x37706a[_0x3da6ca(0x5ed)](_0x33e0da),console['log'](_0x3da6ca(0x1a9)+_0x33e0da+_0x3da6ca(0x526)+(_0x327e6b??'?')+_0x3da6ca(0x216)+(_0x3da6ca(0x141)+_0x5b2131+_0x3da6ca(0x460)+(_0x39da6b??_0x3da6ca(0x190))+_0x3da6ca(0x347)+_0x37706a[_0x3da6ca(0x3ea)]+_0x3da6ca(0x4f4))),_0x3defd0();if(_0x2096bb||_0x327e6b==null)return;const _0x1e0fa2=_0x4f062c['get'](_0x327e6b);if(!_0x1e0fa2||_0x1e0fa2[_0x3da6ca(0x4a4)])return;const _0x4463ce=Date[_0x3da6ca(0x16a)]();_0x1e0fa2[_0x3da6ca(0x55d)][_0x3da6ca(0x614)](_0x4463ce),_0x1e0fa2['deaths']=_0x1e0fa2[_0x3da6ca(0x55d)][_0x3da6ca(0x1c6)](_0x67ca15=>_0x4463ce-_0x67ca15<=_0x4cae38);if(_0x1e0fa2['deaths']['length']>=_0x1e1416){_0x1e0fa2[_0x3da6ca(0x4a4)]=!![],console['error']('[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot='+_0x327e6b+'\x20died\x20'+_0x1e0fa2['deaths'][_0x3da6ca(0x2eb)]+_0x3da6ca(0x3ff)+(_0x4cae38+_0x3da6ca(0x45a)+_0x37706a[_0x3da6ca(0x3ea)]+_0x3da6ca(0x1af)));return;}_0x1e0fa2[_0x3da6ca(0x50f)]++;const _0x3d0713=Math[_0x3da6ca(0x138)](_0x16d07c,_0xb6955d*0x2**(_0x1e0fa2['consecutiveFailures']-0x1));console['log']('[okdb-cluster]\x20respawning\x20worker\x20slot='+_0x327e6b+'\x20in\x20'+_0x3d0713+_0x3da6ca(0x3d8)+_0x1e0fa2[_0x3da6ca(0x50f)]+')'),_0x1e0fa2[_0x3da6ca(0x2a9)]=setTimeout(()=>{const _0x4dbc0b=_0x3da6ca;_0x1e0fa2[_0x4dbc0b(0x2a9)]=null;if(_0x2096bb||_0x1e0fa2[_0x4dbc0b(0x4a4)])return;const _0x5028c2=_0x56d543(_0x327e6b);_0x5028c2[_0x4dbc0b(0x292)](_0x4dbc0b(0x2a0),()=>{const _0x127263=_0x4dbc0b;if(_0x4f062c[_0x127263(0x3aa)](_0x327e6b)===_0x1e0fa2)_0x1e0fa2['consecutiveFailures']=0x0;});},_0x3d0713),_0x1e0fa2['respawnTimer']['unref']?.();});const _0x27c711=[..._0x37706a[_0x7eaec9(0x2f1)]()];console[_0x7eaec9(0x4f7)](_0x7eaec9(0x45f)+process['pid']+_0x7eaec9(0x50a)+_0x1626b0+'\x20HTTP\x20server(s)\x20on\x20port\x20'+_0x1b776b+':\x20'+('['+_0x27c711[_0x7eaec9(0x3a4)](',\x20')+']'));const _0x4ffd24={'_isClusterController':!![],'port':_0x1b776b,'primaryOkdb':_0x4f7da7??null,'status'(){const _0x1b0f0e=_0x7eaec9;return{'clustered':!![],'primaryPid':process[_0x1b0f0e(0x3e7)],'port':_0x1b776b,'primaryRole':_0x4f7da7?.['role']??null,'processorPid':_0x4f7da7?process[_0x1b0f0e(0x3e7)]:null,'workers':[..._0x37706a[_0x1b0f0e(0x624)]()][_0x1b0f0e(0x601)](({worker:_0x5c9aed})=>({'pid':_0x5c9aed['process'][_0x1b0f0e(0x3e7)],'id':_0x5c9aed['id'],'dead':_0x5c9aed[_0x1b0f0e(0xf6)]()}))};},async 'close'(){const _0x5bb6e2=_0x7eaec9;_0x2096bb=!![];for(const _0x369539 of _0x4f062c['values']()){_0x369539[_0x5bb6e2(0x4a4)]=!![],_0x369539['respawnTimer']&&(clearTimeout(_0x369539['respawnTimer']),_0x369539['respawnTimer']=null);}clearInterval(_0x2c48b5),_0x5468af['off'](_0x5bb6e2(0x29c),_0x1deb65),_0x5468af[_0x5bb6e2(0x5d8)]('message',_0x1d07d1),_0x4f7da7?.[_0x5bb6e2(0x4e5)]?.[_0x5bb6e2(0x5d8)]?.(_0x54a1fc['SYSTEM_PROC'],_0x25750c);if(_0x4f7da7?.['events']?.['off'])for(const {event:_0x31f394,handler:_0x56cf38}of _0x4a4971){try{_0x4f7da7[_0x5bb6e2(0x4e5)][_0x5bb6e2(0x5d8)](_0x31f394,_0x56cf38);}catch{}}_0x4a4971[_0x5bb6e2(0x2eb)]=0x0;const _0x5eecad=[..._0x37706a[_0x5bb6e2(0x624)]()]['map'](({worker:_0x1f7829})=>_0x1f7829);if(_0x5eecad['length']===0x0)return;await Promise[_0x5bb6e2(0x260)](_0x5eecad['map'](_0x505c93=>new Promise(_0x482fb1=>{const _0x3f9a98=_0x5bb6e2;if(_0x505c93[_0x3f9a98(0xf6)]()){_0x482fb1();return;}let _0x3fdcd7=![];const _0x44a452=()=>{if(_0x3fdcd7)return;_0x3fdcd7=!![];if(_0x4f59ba)clearTimeout(_0x4f59ba);_0x482fb1();};_0x505c93['once'](_0x3f9a98(0x542),_0x44a452);const _0x4f59ba=setTimeout(()=>{try{_0x505c93['process']['kill']();}catch{}},_0x10ac10+0x1f4);_0x4f59ba[_0x3f9a98(0x386)]?.();try{_0x505c93[_0x3f9a98(0x54d)]();}catch{try{_0x505c93[_0x3f9a98(0x22a)]['kill']();}catch{}}})));}};return _0x4ffd24;}async function _0x4374ac({makeOkdb:_0x5380be,port:_0x5571e2}){const _0x5f4ca5=await _0x5380be();return _0x7d76e7(_0x5f4ca5),_0x5f4ca5['http']['listen'](_0x5571e2);}function _0x7d76e7(_0xf9a827){const _0x11ed7e=_0x40f568;if(!_0xf9a827||_0xf9a827[_0x11ed7e(0x24f)])return;_0xf9a827[_0x11ed7e(0x24f)]=!![];try{const {OKDBChangefeed:_0x5e84d1}=requireOkdbChangefeed(),_0x4f4703=_0xf9a827[_0x11ed7e(0x278)];if(_0x4f4703&&typeof _0x4f4703[_0x11ed7e(0x535)]===_0x11ed7e(0x26b)){const _0x45ae82=new _0x5e84d1(_0xf9a827);_0x45ae82[_0x11ed7e(0x545)](),_0x4f4703['attachFeed'](_0x45ae82),_0xf9a827['_changefeed']=_0x45ae82;}}catch(_0x5829c){_0xf9a827[_0x11ed7e(0x4f7)]?.[_0x11ed7e(0x27e)]?.('[okdb-cluster]\x20change-feed\x20init\x20failed:\x20'+(_0x5829c?.[_0x11ed7e(0x29c)]??_0x5829c),{'feature':_0x11ed7e(0xfe)});}const _0x5205b5=_0x374afb=>{const _0x1faf7b=_0x11ed7e;if(!_0x374afb||typeof _0x374afb!==_0x1faf7b(0x20e)||_0x374afb[_0x1d8ea3]==null)return;if(_0x374afb[_0x1d8ea3]===_0x102d63)try{_0xf9a827['_adminRelay']?.[_0x1faf7b(0x2ce)]?.(_0x374afb[_0x1faf7b(0x66c)],_0x374afb[_0x1faf7b(0x206)]);}catch{}};process['on'](_0x11ed7e(0x29c),_0x5205b5),_0xf9a827[_0x11ed7e(0x3db)]=_0x5205b5;{let _0x437525=process[_0x11ed7e(0x2e1)](),_0x551144=Date[_0x11ed7e(0x16a)]();const _0x163fb1=()=>{const _0x3b1c68=_0x11ed7e;if(typeof process[_0x3b1c68(0x270)]!==_0x3b1c68(0x26b)||!process[_0x3b1c68(0x15c)])return;const _0x43609e=Date[_0x3b1c68(0x16a)](),_0x4290ad=process[_0x3b1c68(0x2e1)](),_0x5864a8=(_0x43609e-_0x551144)*0x3e8,_0x1abf70=_0x4290ad[_0x3b1c68(0x4fd)]-_0x437525[_0x3b1c68(0x4fd)]+(_0x4290ad[_0x3b1c68(0x268)]-_0x437525[_0x3b1c68(0x268)]),_0xc7a131=_0x5864a8>0x0?Math[_0x3b1c68(0x138)](0x64,Math[_0x3b1c68(0x1df)](_0x1abf70/(_0x5864a8*(_0x3fef7c[_0x3b1c68(0x537)]()['length']||0x1))*0x64)):0x0;_0x437525=_0x4290ad,_0x551144=_0x43609e;const _0x20692c=process[_0x3b1c68(0x402)]();try{process[_0x3b1c68(0x270)]({[_0x1d8ea3]:_0x4c5b04,'stats':{'rss':_0x20692c['rss'],'heapUsed':_0x20692c[_0x3b1c68(0x5b9)],'heapTotal':_0x20692c[_0x3b1c68(0x4d8)],'external':_0x20692c[_0x3b1c68(0x4a0)],'cpuPct':_0xc7a131,'cpuWindowMs':Math[_0x3b1c68(0x1df)](_0x5864a8/0x3e8)||null}});}catch{}},_0x258e65=Math[_0x11ed7e(0x47e)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0xcd1c50=setInterval(_0x163fb1,_0x258e65);_0xcd1c50[_0x11ed7e(0x386)]?.(),_0x163fb1();}let _0x488ea5=![];const _0x183a99=async _0x5a9262=>{const _0x7ca366=_0x11ed7e;if(_0x488ea5)return;_0x488ea5=!![];const _0x5bfe6b=setTimeout(()=>process[_0x7ca366(0x542)](_0x5a9262),_0x10ac10);_0x5bfe6b[_0x7ca366(0x386)]?.();try{await _0xf9a827[_0x7ca366(0x241)]?.();}catch{}process[_0x7ca366(0x542)](_0x5a9262);};process['on'](_0x11ed7e(0x54d),()=>_0x183a99(0x0));if(process[_0x11ed7e(0x2e3)]!==_0x11ed7e(0x405)){const _0x56918b=setInterval(()=>{if(process['ppid']===0x1)_0x183a99(0x0);},_0x5b9bf5);_0x56918b[_0x11ed7e(0x386)]?.(),_0xf9a827['_clusterOrphanWatch']=_0x56918b;}}return okdbCluster={'runClustered':_0x40ea2b,'attachWorkerCluster':_0x7d76e7},okdbCluster;}var okdbHttp={'exports':{}},okdbMetrics,hasRequiredOkdbMetrics;function requireOkdbMetrics(){const _0x589270=_0x4b361c;if(hasRequiredOkdbMetrics)return okdbMetrics;hasRequiredOkdbMetrics=0x1;const _0x1d2355=0x3c;function _0x18ff3e(){return{'requests':0x0,'reads':0x0,'writes':0x0,'errors':0x0,'readMs':0x0,'writeMs':0x0};}class _0xf56716{constructor(){const _0x37d6f6=_0x2368;this[_0x37d6f6(0x51d)]=0x0,this[_0x37d6f6(0x57b)]=0x0,this[_0x37d6f6(0x165)]=0x0,this['_totalErrors']=0x0,this[_0x37d6f6(0x516)]=0x0,this['_totalWriteMs']=0x0,this['_buckets']=Array[_0x37d6f6(0x36d)]({'length':_0x1d2355},_0x18ff3e),this[_0x37d6f6(0x1d2)]=0x0,this[_0x37d6f6(0x599)]=Date[_0x37d6f6(0x16a)](),this[_0x37d6f6(0x301)]=setInterval(()=>this[_0x37d6f6(0x196)](),0x3e8);if(this[_0x37d6f6(0x301)][_0x37d6f6(0x386)])this[_0x37d6f6(0x301)][_0x37d6f6(0x386)]();}['_rotateBucket'](){const _0x46d9ce=_0x2368;this[_0x46d9ce(0x1d2)]=(this['_bucketIdx']+0x1)%_0x1d2355,this[_0x46d9ce(0x659)][this[_0x46d9ce(0x1d2)]]=_0x18ff3e(),this[_0x46d9ce(0x599)]=Date['now']();}[_0x589270(0x360)](_0x3c03aa,_0x45c09e,_0x3cff75){const _0x314dac=_0x589270,_0x5e8485=/^(POST|PUT|PATCH|DELETE)$/i[_0x314dac(0x30d)](_0x3c03aa),_0x200380=this[_0x314dac(0x659)][this['_bucketIdx']];this[_0x314dac(0x51d)]++,_0x200380[_0x314dac(0x22e)]++,_0x3cff75&&(this[_0x314dac(0x52a)]++,_0x200380[_0x314dac(0x444)]++),_0x5e8485?(this['_totalWrites']++,this[_0x314dac(0x43f)]+=_0x45c09e,_0x200380[_0x314dac(0x2a5)]++,_0x200380['writeMs']+=_0x45c09e):(this['_totalReads']++,this[_0x314dac(0x516)]+=_0x45c09e,_0x200380[_0x314dac(0x54c)]++,_0x200380[_0x314dac(0x43c)]+=_0x45c09e);}['stats'](){const _0x58a58d=_0x589270;let _0x1b7c12=0x0,_0x5d586e=0x0,_0x409879=0x0,_0x3c3374=0x0,_0x4879f0=0x0,_0xcba8a0=0x0;for(const _0x298637 of this['_buckets']){_0x1b7c12+=_0x298637[_0x58a58d(0x22e)],_0x5d586e+=_0x298637[_0x58a58d(0x54c)],_0x409879+=_0x298637[_0x58a58d(0x2a5)],_0x3c3374+=_0x298637[_0x58a58d(0x444)],_0x4879f0+=_0x298637[_0x58a58d(0x43c)],_0xcba8a0+=_0x298637[_0x58a58d(0x2ba)];}const _0x1af44d=_0x1d2355;return{'lifetime':{'requests':this[_0x58a58d(0x51d)],'reads':this[_0x58a58d(0x57b)],'writes':this[_0x58a58d(0x165)],'errors':this[_0x58a58d(0x52a)],'avgReadMs':this[_0x58a58d(0x57b)]>0x0?+(this['_totalReadMs']/this[_0x58a58d(0x57b)])[_0x58a58d(0x4a8)](0x2):null,'avgWriteMs':this['_totalWrites']>0x0?+(this[_0x58a58d(0x43f)]/this['_totalWrites'])[_0x58a58d(0x4a8)](0x2):null},'window':{'seconds':_0x1af44d,'requests':_0x1b7c12,'reads':_0x5d586e,'writes':_0x409879,'errors':_0x3c3374,'reqPerSec':+(_0x1b7c12/_0x1af44d)[_0x58a58d(0x4a8)](0x2),'readPerSec':+(_0x5d586e/_0x1af44d)[_0x58a58d(0x4a8)](0x2),'writePerSec':+(_0x409879/_0x1af44d)['toFixed'](0x2),'avgReadMs':_0x5d586e>0x0?+(_0x4879f0/_0x5d586e)[_0x58a58d(0x4a8)](0x2):null,'avgWriteMs':_0x409879>0x0?+(_0xcba8a0/_0x409879)['toFixed'](0x2):null}};}[_0x589270(0x241)](){const _0x1ab367=_0x589270;clearInterval(this[_0x1ab367(0x301)]);}}return okdbMetrics=_0xf56716,okdbMetrics;}var okdbAuthNamespaces,hasRequiredOkdbAuthNamespaces;function requireOkdbAuthNamespaces(){const _0x439f19=_0x4b361c;if(hasRequiredOkdbAuthNamespaces)return okdbAuthNamespaces;hasRequiredOkdbAuthNamespaces=0x1;const _0x1b9815={'data':{'label':_0x439f19(0x17f),'scope':_0x439f19(0x46e),'description':_0x439f19(0x128),'operations':{'read':{'label':_0x439f19(0x41e),'summary':_0x439f19(0x503)},'write':{'label':'Write','summary':'Create,\x20update,\x20and\x20delete\x20records\x20(including\x20bulk\x20import).'}}},'schema':{'label':_0x439f19(0x13c),'scope':_0x439f19(0x46e),'description':_0x439f19(0x5b4),'operations':{'read':{'label':_0x439f19(0x41e),'summary':_0x439f19(0x650)},'write':{'label':_0x439f19(0x525),'summary':_0x439f19(0x5f5)}}},'search':{'label':_0x439f19(0x629),'scope':_0x439f19(0x46e),'description':_0x439f19(0x114),'operations':{'query':{'label':'Query','summary':_0x439f19(0x366)}}},'queue':{'label':_0x439f19(0x2ac),'scope':_0x439f19(0x46e),'description':_0x439f19(0x163),'operations':{'read':{'label':_0x439f19(0x41e),'summary':_0x439f19(0x403)},'write':{'label':'Write','summary':_0x439f19(0x50e)},'work':{'label':_0x439f19(0x2dc),'summary':'Worker-side:\x20claim,\x20heartbeat,\x20complete,\x20fail,\x20progress.'}}},'files':{'label':'Files','scope':_0x439f19(0x46e),'description':'Blob\x20storage:\x20large\x20file\x20uploads\x20attached\x20to\x20records\x20or\x20stored\x20standalone.','operations':{'read':{'label':_0x439f19(0x41e),'summary':_0x439f19(0x583)},'write':{'label':_0x439f19(0x525),'summary':_0x439f19(0x5a5)}}},'functions':{'label':_0x439f19(0x296),'scope':'env','description':_0x439f19(0x58a),'operations':{'read':{'label':'Read','summary':'List\x20functions\x20and\x20inspect\x20their\x20source.'},'write':{'label':_0x439f19(0x525),'summary':_0x439f19(0x103)},'run':{'label':_0x439f19(0x66e),'summary':'Execute\x20functions\x20over\x20HTTP/MCP/shell.'}}},'views':{'label':_0x439f19(0x3bd),'scope':_0x439f19(0x46e),'description':_0x439f19(0x3e4),'operations':{'read':{'label':_0x439f19(0x41e),'summary':_0x439f19(0x58d)},'write':{'label':'Write','summary':'Create\x20and\x20delete\x20views,\x20start,\x20stop,\x20and\x20rebuild\x20them.'}}},'env':{'label':_0x439f19(0x4d3),'scope':'env','description':_0x439f19(0x418),'operations':{'read':{'label':'Read','summary':_0x439f19(0x3d3)},'write':{'label':'Write','summary':_0x439f19(0x280)}}},'auth':{'label':'Auth','scope':'system','description':'API\x20tokens,\x20users,\x20and\x20credentials.','operations':{'read':{'label':'Read','summary':_0x439f19(0x50c)},'write':{'label':_0x439f19(0x525),'summary':'Create,\x20update,\x20and\x20delete\x20tokens\x20and\x20users;\x20rotate\x20keys.'}}},'system':{'label':_0x439f19(0x569),'scope':_0x439f19(0x268),'description':'Operator\x20surface:\x20server\x20info,\x20logs,\x20event\x20streams,\x20processor\x20status,\x20backups.','operations':{'read':{'label':'Read','summary':_0x439f19(0x446)},'write':{'label':'Write','summary':_0x439f19(0x487)}}},'sync':{'label':'Sync','scope':_0x439f19(0x268),'description':_0x439f19(0x468),'operations':{'read':{'label':_0x439f19(0x41e),'summary':_0x439f19(0x672)},'write':{'label':'Write','summary':_0x439f19(0x4a2)},'peer':{'label':_0x439f19(0x2a3),'summary':_0x439f19(0x1b2),'machineOnly':!![]}}},'protected':{'label':'Protected\x20(gate)','scope':_0x439f19(0x43b),'description':_0x439f19(0x605),'operations':{'read':{'label':'Read','summary':'May\x20read\x20system\x20types\x20when\x20also\x20granted\x20the\x20underlying\x20read\x20permission.'},'write':{'label':_0x439f19(0x525),'summary':_0x439f19(0x308)}}}},_0x19ea4a={'schema:read':[_0x439f19(0x40a),_0x439f19(0x5b2),_0x439f19(0xf8)]},_0x43ab65=[_0x439f19(0x32a),_0x439f19(0x3c5),'run',_0x439f19(0x4ae),'work','peer'];function _0x12b6b3(){const _0x2a6f34=_0x439f19,_0x3b932f=[];for(const [_0x44f764,_0x92ad5d]of Object[_0x2a6f34(0x427)](_0x1b9815)){for(const _0x1391f4 of Object[_0x2a6f34(0x2f1)](_0x92ad5d[_0x2a6f34(0x441)])){_0x3b932f[_0x2a6f34(0x614)](_0x44f764+':'+_0x1391f4);}}return _0x3b932f;}function _0x4da5fc(_0xa63751){return _0x1b9815[_0xa63751]||null;}function _0x5f1243(_0x543ab7,_0x5b86f7){return _0x1b9815[_0x543ab7]?.['operations'][_0x5b86f7]||null;}return okdbAuthNamespaces={'NAMESPACES':_0x1b9815,'IMPLIED_BY':_0x19ea4a,'OP_ORDER':_0x43ab65,'listAllPermissions':_0x12b6b3,'getNamespaceMeta':_0x4da5fc,'getOperationMeta':_0x5f1243},okdbAuthNamespaces;}var okdbAuthPermissions,hasRequiredOkdbAuthPermissions;function requireOkdbAuthPermissions(){if(hasRequiredOkdbAuthPermissions)return okdbAuthPermissions;hasRequiredOkdbAuthPermissions=0x1;const {IMPLIED_BY:_0xfb0c40}=requireOkdbAuthNamespaces(),_0x25129d=new Set(['read','query']);function _0x41039a(_0x1ec797,_0x3ab167){const _0x25cc15=_0x2368;if(!Array[_0x25cc15(0x579)](_0x1ec797)||_0x1ec797['length']===0x0)return![];for(const _0x5adc0a of _0x1ec797){if(typeof _0x5adc0a!==_0x25cc15(0x380)||!_0x5adc0a[_0x25cc15(0x5c0)](':')){if(_0x5adc0a==='*')return!![];continue;}const [_0x5de594,_0x6eb8b1]=_0x5adc0a[_0x25cc15(0x37c)](':'),[_0x3615bb,_0x3501aa]=_0x3ab167[_0x25cc15(0x37c)](':'),_0x139a48=_0x5de594==='*'||_0x5de594===_0x3615bb,_0x52e90d=_0x6eb8b1==='*'||_0x6eb8b1===_0x3501aa;if(_0x139a48&&_0x52e90d)return!![];}const _0x535663=_0xfb0c40[_0x3ab167];if(_0x535663)for(const _0x154860 of _0x535663){if(_0x41039a(_0x1ec797,_0x154860))return!![];}return![];}function _0x46b56c(_0xdbd6c7,_0x2a5b56){const _0x53ae42=_0x2368,_0x2d1dbe=new Set();if(Array[_0x53ae42(0x579)](_0xdbd6c7)){for(const _0x226360 of _0xdbd6c7)_0x2d1dbe['add'](_0x226360);}if(Array['isArray'](_0x2a5b56)){for(const _0xaf3e51 of _0x2a5b56)_0x2d1dbe['add'](_0xaf3e51);}return Array['from'](_0x2d1dbe);}function _0x3bdb55(_0x1233dc){const _0x4ba40a=_0x2368;if(typeof _0x1233dc!==_0x4ba40a(0x380))return![];const [,_0x44ef93]=_0x1233dc['split'](':');return _0x25129d[_0x4ba40a(0x39f)](_0x44ef93);}function _0xfaeaaa(_0x2a7c5c){const _0x268648=_0x2368;return _0x3bdb55(_0x2a7c5c)?_0x268648(0x1d4):_0x268648(0x148);}function _0x1c32c1(_0x356e7d,_0x4060fd){const _0x5024e1=_0x2368;return _0x46b56c(_0x356e7d[_0x5024e1(0x3f3)]||[],_0x4060fd?(_0x356e7d['grants']||{})[_0x4060fd]||[]:[]);}function _0x444758(_0x4dfa14){const _0xcec091=_0x2368,_0x31f028=[];for(const _0x457c2d of _0x4dfa14[_0xcec091(0x33c)]()){const _0x49bbb6=_0x457c2d[_0xcec091(0x3d5)]?.[_0xcec091(0x35d)];if(!_0x49bbb6)continue;_0x49bbb6['authRequired']&&!_0x49bbb6[_0xcec091(0x598)]&&_0x31f028[_0xcec091(0x614)](_0x457c2d[_0xcec091(0x527)]+'\x20'+_0x457c2d['path']+_0xcec091(0x556)+(_0x457c2d[_0xcec091(0x3d5)]['id']??'?')+')');}if(_0x31f028[_0xcec091(0x2eb)])throw new Error(_0xcec091(0x26e)+_0x31f028[_0xcec091(0x3a4)](_0xcec091(0x675)));}return okdbAuthPermissions={'hasPermission':_0x41039a,'unionPermissions':_0x46b56c,'isReadOperation':_0x3bdb55,'resolveProtectedGate':_0xfaeaaa,'getEffectivePermissions':_0x1c32c1,'assertEveryRouteHasPermission':_0x444758},okdbAuthPermissions;}var okdbJwtUtils,hasRequiredOkdbJwtUtils;function requireOkdbJwtUtils(){if(hasRequiredOkdbJwtUtils)return okdbJwtUtils;hasRequiredOkdbJwtUtils=0x1;const _0x227c91=require$$0$5,_0x173eb3=require$$1$3,_0x331002=require$$2;function _0x586254(_0x59ddcd){const _0x9175e=_0x2368,_0x3818e3=String(_0x59ddcd||'')[_0x9175e(0x38b)](/-/g,'+')[_0x9175e(0x38b)](/_/g,'/'),_0x375952=_0x3818e3+'='[_0x9175e(0x473)]((0x4-(_0x3818e3[_0x9175e(0x2eb)]%0x4||0x4))%0x4);return Buffer[_0x9175e(0x36d)](_0x375952,_0x9175e(0x4f5));}function _0x316f19(_0x59ed3a){const _0xebc1db=_0x2368;if(typeof _0x59ed3a!==_0xebc1db(0x380))throw new Error(_0xebc1db(0x28e));const _0x533b02=_0x59ed3a[_0xebc1db(0x37c)]('.');if(_0x533b02[_0xebc1db(0x2eb)]!==0x3)throw new Error(_0xebc1db(0x197));const [_0x558002,_0x5a53a0,_0x199ca9]=_0x533b02,_0x132f5b=JSON[_0xebc1db(0x34f)](_0x586254(_0x558002)[_0xebc1db(0x261)](_0xebc1db(0x365))),_0x2ce88d=JSON['parse'](_0x586254(_0x5a53a0)['toString'](_0xebc1db(0x365)));return{'header':_0x132f5b,'payload':_0x2ce88d,'signature':_0x586254(_0x199ca9),'signingInput':Buffer['from'](_0x558002+'.'+_0x5a53a0),'encodedHeader':_0x558002,'encodedPayload':_0x5a53a0};}function _0x2c9614(_0x491e1c){const _0x2a3642=_0x2368;if(Array[_0x2a3642(0x579)](_0x491e1c))return _0x491e1c;if(_0x491e1c==null)return[];return[_0x491e1c];}function _0x1926eb(_0x4d2630){const _0x17562d=String(_0x4d2630||'')['match'](/.{1,64}/g)||[];return'-----BEGIN\x20CERTIFICATE-----\x0a'+_0x17562d['join']('\x0a')+'\x0a-----END\x20CERTIFICATE-----\x0a';}function _0xd2fa04(_0x43efda={}){const _0x5bcf98=_0x2368;if(_0x43efda['x5c']?.[0x0])return _0x331002[_0x5bcf98(0x18e)](_0x1926eb(_0x43efda[_0x5bcf98(0x212)][0x0]));return _0x331002['createPublicKey']({'key':_0x43efda,'format':_0x5bcf98(0x2bb)});}function _0x20ae5c(_0x43702e,_0x642925,_0x37fb25,_0x3bc3a4){const _0x4c600f=_0x2368;if(_0x43702e==='RS256')return _0x331002[_0x4c600f(0x170)](_0x4c600f(0x39a),_0x37fb25,_0x642925,_0x3bc3a4);if(_0x43702e===_0x4c600f(0x2a2))return _0x331002[_0x4c600f(0x170)](_0x4c600f(0x33b),_0x37fb25,{'key':_0x642925,'dsaEncoding':_0x4c600f(0x1b4)},_0x3bc3a4);return![];}function _0x2b513b(_0x4b2967){const _0x4d5125=_0x2368;if(typeof commonjsGlobal[_0x4d5125(0x19d)]==='function')return commonjsGlobal[_0x4d5125(0x19d)](_0x4b2967,{'headers':{'accept':_0x4d5125(0x509)}})['then'](async _0x5ba232=>{const _0x544a72=_0x4d5125;if(!_0x5ba232['ok']){const _0x4b8db8=new Error(_0x544a72(0x356)+_0x5ba232[_0x544a72(0x626)]+_0x544a72(0x20a)+_0x4b2967);_0x4b8db8['status']=_0x5ba232['status'];throw _0x4b8db8;}return _0x5ba232['json']();});return new Promise((_0x3fbcbf,_0x27fec5)=>{const _0x22cfef=_0x4d5125,_0x3cb80f=String(_0x4b2967)[_0x22cfef(0x3cc)](_0x22cfef(0x381))?_0x173eb3:_0x227c91,_0x4aec26=_0x3cb80f[_0x22cfef(0x3aa)](_0x4b2967,{'headers':{'accept':'application/json'}},_0x5cf026=>{const _0x229d1c=_0x22cfef;let _0x3caa17='';_0x5cf026['setEncoding'](_0x229d1c(0x365)),_0x5cf026['on'](_0x229d1c(0x206),_0x1e02e0=>{_0x3caa17+=_0x1e02e0;}),_0x5cf026['on']('end',()=>{const _0x351b2b=_0x229d1c;if(_0x5cf026[_0x351b2b(0x27b)]<0xc8||_0x5cf026[_0x351b2b(0x27b)]>=0x12c){const _0x35e0de=new Error(_0x351b2b(0x356)+_0x5cf026['statusCode']+_0x351b2b(0x20a)+_0x4b2967);return _0x35e0de[_0x351b2b(0x626)]=_0x5cf026[_0x351b2b(0x27b)],_0x27fec5(_0x35e0de);}try{_0x3fbcbf(JSON['parse'](_0x3caa17||'{}'));}catch(_0x34eeb1){_0x27fec5(_0x34eeb1);}});});_0x4aec26['on'](_0x22cfef(0x31b),_0x27fec5),_0x4aec26[_0x22cfef(0x62c)]();});}return okdbJwtUtils={'base64UrlDecode':_0x586254,'parseJwt':_0x316f19,'normalizeAudience':_0x2c9614,'normalizePemCertificate':_0x1926eb,'jwkToKeyObject':_0xd2fa04,'verifyJwtSignature':_0x20ae5c,'fetchJson':_0x2b513b},okdbJwtUtils;}var hasRequiredOkdbHttp;function requireOkdbHttp(){const _0x404a63=_0x4b361c;if(hasRequiredOkdbHttp)return okdbHttp[_0x404a63(0x1b3)];hasRequiredOkdbHttp=0x1;const _0x53a26f=require$$0$5,{URL:_0x451322}=require$$2$1,_0x19a34d=requireOkdbMetrics(),_0x391527=requireOkdbAuthTokens(),{hasPermission:_0x19937c,unionPermissions:_0x11a074,resolveProtectedGate:_0x3c5d4e}=requireOkdbAuthPermissions(),_0x552970={0x190:'BAD_REQUEST',0x191:_0x404a63(0x2b7),0x193:_0x404a63(0x2da),0x194:'NOT_FOUND',0x195:_0x404a63(0x3ab),0x198:'REQUEST_TIMEOUT',0x199:_0x404a63(0x3ca),0x19a:_0x404a63(0x600),0x19b:_0x404a63(0x184),0x19d:'PAYLOAD_TOO_LARGE',0x19f:'UNSUPPORTED_MEDIA_TYPE',0x1a6:_0x404a63(0x2e7),0x1ad:_0x404a63(0x4ea),0x1f4:_0x404a63(0x64f),0x1f5:_0x404a63(0x459),0x1f6:_0x404a63(0x51c),0x1f7:_0x404a63(0x334),0x1f8:_0x404a63(0x555)},_0x3da15a={'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:_0x1d100f,timingSafeEqual:_0x54f11b,parseBearer:_0x3c10e5,randomToken:_0xf804a3,issueToken:_0x580b0f,authenticateToken:_0x3e87bf}=_0x391527,{base64UrlDecode:_0x28871b,parseJwt:_0x10c589,normalizeAudience:_0x35ee01,normalizePemCertificate:_0x57b06b,jwkToKeyObject:_0x41a13a,verifyJwtSignature:_0xba07c4,fetchJson:_0x5b4187}=requireOkdbJwtUtils();function _0x34134f(_0x29ae15){const _0x2aea87=_0x404a63;return(_0x29ae15||_0x2aea87(0x58f))[_0x2aea87(0x5ef)]();}function _0xdc08e4(_0x5d447f){const _0x36becd=_0x404a63;if(Array['isArray'](_0x5d447f))return _0x5d447f['flatMap'](_0xdc08e4);return String(_0x5d447f||'')['split'](',')[_0x36becd(0x601)](_0x2c61cd=>_0x2c61cd['trim']())['filter'](Boolean);}function _0x303df2(..._0x3204f1){const _0x356750=_0x404a63;return[...new Set(_0x3204f1[_0x356750(0x235)](_0xdc08e4))]['join'](',\x20');}function _0x1eeb11(_0x236f4b,_0x5f4b7c){const _0x51b338=_0x404a63;if(!_0x236f4b)return![];if(_0x5f4b7c==='*')return!![];if(_0x5f4b7c instanceof RegExp)return _0x5f4b7c[_0x51b338(0x30d)](_0x236f4b);if(typeof _0x5f4b7c===_0x51b338(0x26b))return!!_0x5f4b7c(_0x236f4b);if(Array[_0x51b338(0x579)](_0x5f4b7c))return _0x5f4b7c[_0x51b338(0x5c0)](_0x236f4b);return _0x5f4b7c===_0x236f4b;}function _0x2a8e64(_0x37c385={},_0x38b5c9={},_0x487b8c=null){const _0x11d35a=_0x404a63;if(!_0x38b5c9)return null;const _0x24c484=_0x37c385[_0x11d35a(0x424)],_0x1a0c64=_0x38b5c9[_0x11d35a(0x335)]??_0x38b5c9[_0x11d35a(0x424)]??'*',_0x4d2958=_0x1a0c64==='*'?'*':_0x1eeb11(_0x24c484,_0x1a0c64)?_0x24c484:null;if(!_0x4d2958)return null;const _0x1f0450=_0x37c385['access-control-request-headers'],_0x246e54=_0x38b5c9[_0x11d35a(0x5b1)]??_0x38b5c9[_0x11d35a(0x333)]??['content-type',_0x11d35a(0x494),_0x11d35a(0x2de),_0x11d35a(0x678),_0x11d35a(0x548)],_0x221cc2=_0x38b5c9[_0x11d35a(0x5cb)]??_0x38b5c9[_0x11d35a(0xdf)]??(_0x487b8c?[_0x487b8c,'OPTIONS']:[_0x11d35a(0x58f),_0x11d35a(0x46a),_0x11d35a(0x346)]),_0x20d09a=_0x38b5c9[_0x11d35a(0x3d4)]??['mcp-session-id'],_0x625526={'access-control-allow-origin':_0x4d2958,'access-control-allow-methods':Array['isArray'](_0x221cc2)?_0x221cc2[_0x11d35a(0x3a4)](',\x20'):String(_0x221cc2),'access-control-allow-headers':_0x1f0450?_0x303df2(_0x246e54,_0x1f0450):Array[_0x11d35a(0x579)](_0x246e54)?_0x246e54[_0x11d35a(0x3a4)](',\x20'):String(_0x246e54),'access-control-expose-headers':Array[_0x11d35a(0x579)](_0x20d09a)?_0x20d09a[_0x11d35a(0x3a4)](',\x20'):String(_0x20d09a),'vary':_0x303df2('Origin',_0x4d2958==='*'?'':_0x11d35a(0x259),_0x1f0450?_0x11d35a(0x21f):'')};if(_0x38b5c9[_0x11d35a(0x4f0)])_0x625526[_0x11d35a(0x467)]='true';if(Number[_0x11d35a(0x5f8)](_0x38b5c9[_0x11d35a(0x2d4)]))_0x625526[_0x11d35a(0x511)]=String(_0x38b5c9[_0x11d35a(0x2d4)]);return _0x625526;}function _0x50387f(_0x343cb3){const _0x4918dc=_0x404a63,_0x11a7b0=[],_0x5553b2={};let _0x1c6184=![];_0x343cb3[_0x4918dc(0x324)]('/*')&&(_0x1c6184=!![],_0x343cb3=_0x343cb3[_0x4918dc(0x45e)](0x0,-0x2),_0x11a7b0['push']('*'));let _0x1a96d5=_0x343cb3[_0x4918dc(0x38b)](/\/+$/,'')['replace'](/\[([^\]]*)\]/g,(_0x414b55,_0x22d01a)=>{const _0x5b3eba=_0x4918dc,_0x50aee4=_0x22d01a[_0x5b3eba(0x38b)](/\/:(\w+)(?:=([^/\]\s]*))?/g,(_0x4a3017,_0x412c0b,_0x3ccf79)=>{const _0x54fd62=_0x5b3eba;_0x11a7b0[_0x54fd62(0x614)](_0x412c0b);if(_0x3ccf79!==undefined)_0x5553b2[_0x412c0b]=_0x3ccf79;return'/([^/]+)';});return _0x5b3eba(0x4fc)+_0x50aee4+')?';})['replace'](/\/:(\w+)/g,(_0x3a12fe,_0x160609)=>{const _0x38bd06=_0x4918dc;return _0x11a7b0[_0x38bd06(0x614)](_0x160609),_0x38bd06(0x21c);});if(_0x1a96d5==='')_0x1a96d5='/';return{'keys':_0x11a7b0,'defaults':_0x5553b2,'wildcard':_0x1c6184,'regex':new RegExp(_0x1c6184?'^'+_0x1a96d5+_0x4918dc(0x3b7):'^'+_0x1a96d5+'$')};}function _0x1de9c7(_0x32eb32){const _0x522928=_0x404a63;if(_0x32eb32==null)return _0x32eb32;return JSON[_0x522928(0x34f)](JSON['stringify'](_0x32eb32));}function _0x51f60e(_0x5cb894){const _0x4ce0b6=_0x404a63;if(_0x5cb894==null)return null;if(_0x5cb894['type']==='object'&&_0x5cb894[_0x4ce0b6(0x448)]&&!Array[_0x4ce0b6(0x579)](_0x5cb894[_0x4ce0b6(0x448)]))return _0x1de9c7(_0x5cb894);const _0x499368=Object['values'](_0x5cb894),_0x3f213a=_0x499368[_0x4ce0b6(0x2eb)]>0x0&&_0x499368[_0x4ce0b6(0x171)](_0xa9c61=>{const _0x2e8829=_0x4ce0b6;return _0xa9c61&&typeof _0xa9c61===_0x2e8829(0x20e)&&!Array[_0x2e8829(0x579)](_0xa9c61)&&(Object[_0x2e8829(0x258)]['hasOwnProperty'][_0x2e8829(0x456)](_0xa9c61,_0x2e8829(0x49b))||Object[_0x2e8829(0x258)][_0x2e8829(0x51a)][_0x2e8829(0x456)](_0xa9c61,_0x2e8829(0x448))||Object[_0x2e8829(0x258)][_0x2e8829(0x51a)][_0x2e8829(0x456)](_0xa9c61,_0x2e8829(0x5b7))||Object[_0x2e8829(0x258)][_0x2e8829(0x51a)][_0x2e8829(0x456)](_0xa9c61,'default'));});if(_0x3f213a)return{'type':_0x4ce0b6(0x20e),'properties':_0x1de9c7(_0x5cb894),'required':[],'additionalProperties':![]};const _0x6880d8={},_0x352029=[];for(const [_0x35c60a,_0x3187ba]of Object[_0x4ce0b6(0x427)](_0x5cb894)){_0x6880d8[_0x35c60a]=_0x5ab5b8(_0x3187ba);if(_0x3187ba!==null&&_0x3187ba!==undefined)_0x352029[_0x4ce0b6(0x614)](_0x35c60a);}return{'type':_0x4ce0b6(0x20e),'properties':_0x6880d8,'required':_0x352029,'additionalProperties':![]};}function _0x5ab5b8(_0x618d9e){const _0x3ffc4c=_0x404a63;if(_0x618d9e===null)return{'type':[_0x3ffc4c(0x2e8),_0x3ffc4c(0x380),'number',_0x3ffc4c(0x455),_0x3ffc4c(0x20e),_0x3ffc4c(0x304)]};if(Array[_0x3ffc4c(0x579)](_0x618d9e))return{'type':_0x3ffc4c(0x304),'items':_0x618d9e[_0x3ffc4c(0x2eb)]>0x0?_0x5ab5b8(_0x618d9e[0x0]):{}};switch(typeof _0x618d9e){case _0x3ffc4c(0x380):return{'type':'string','default':_0x618d9e};case _0x3ffc4c(0x17c):return{'type':Number[_0x3ffc4c(0xde)](_0x618d9e)?_0x3ffc4c(0x14b):_0x3ffc4c(0x17c),'default':_0x618d9e};case'boolean':return{'type':'boolean','default':_0x618d9e};case _0x3ffc4c(0x20e):{const _0x2ce015={};for(const [_0x390287,_0x5666b3]of Object[_0x3ffc4c(0x427)](_0x618d9e))_0x2ce015[_0x390287]=_0x5ab5b8(_0x5666b3);return{'type':'object','properties':_0x2ce015,'additionalProperties':!![],'default':_0x1de9c7(_0x618d9e)};}default:return{};}}function _0x40d518(_0xde597f,_0x42e729){const _0x433062=_0x404a63,_0x3f7e82=[];for(const _0x97dae9 of _0x42e729[_0x433062(0x2f1)]){if(_0x97dae9==='*')continue;_0x3f7e82['push']({'name':_0x97dae9,'required':!Object[_0x433062(0x258)][_0x433062(0x51a)][_0x433062(0x456)](_0x42e729['defaults'],_0x97dae9),'default':_0x42e729['defaults'][_0x97dae9]});}return _0x3f7e82;}function _0x44ff79(_0x1b23c8={},_0x449761){const _0x4aa600=_0x404a63,_0x5af02c=_0x51f60e(_0x1b23c8[_0x4aa600(0x5d0)]?.[_0x4aa600(0x651)]??_0x1b23c8[_0x4aa600(0x3c5)]??null),_0xfd4c43=_0x1b23c8[_0x4aa600(0x5d0)]?.[_0x4aa600(0x2e5)]??(_0x1b23c8[_0x4aa600(0x13b)]?_0x4aa600(0x13b):_0x449761[_0x4aa600(0x527)]==='GET'||_0x449761['method']===_0x4aa600(0x594)?_0x4aa600(0x190):'remaining-fields');return{'querySchema':_0x5af02c,'bodyMode':_0xfd4c43,'bindings':_0x1de9c7(_0x1b23c8[_0x4aa600(0x5d0)]?.['bindings']??{}),'statuses':_0x1de9c7(_0x1b23c8['http']?.[_0x4aa600(0x452)]??(_0x1b23c8[_0x4aa600(0x1aa)]||[])),'transport':_0x1b23c8['http']?.['transport']??(_0x1b23c8[_0x4aa600(0x54a)]?'sse':_0x1b23c8['raw']?_0x4aa600(0x13b):_0x4aa600(0x523)),'rawResponse':_0x1b23c8[_0x4aa600(0x5d0)]?.['rawResponse']??!!_0x1b23c8['rawResponse'],'cors':_0x1de9c7(_0x1b23c8[_0x4aa600(0x5d0)]?.['cors']??_0x1b23c8['cors']??null)};}function _0x34f30f(_0x203e1f){const _0x3cf5d3=_0x404a63,_0x47ffb1=_0x203e1f[_0x3cf5d3(0x664)]||{},_0x3223de=_0x40d518(_0x203e1f['path'],_0x203e1f[_0x3cf5d3(0xdd)]),_0x196a92=!!(_0x47ffb1['id']||_0x47ffb1[_0x3cf5d3(0xe0)]||_0x47ffb1[_0x3cf5d3(0x656)]||_0x47ffb1['http']||_0x47ffb1[_0x3cf5d3(0x32b)]||_0x47ffb1[_0x3cf5d3(0x3b3)]||_0x47ffb1[_0x3cf5d3(0x35d)]||_0x47ffb1[_0x3cf5d3(0x267)]),_0x132c5a=_0x44ff79(_0x47ffb1,_0x203e1f),_0xcbf908=_0x47ffb1[_0x3cf5d3(0xe0)]?_0x1de9c7(_0x47ffb1[_0x3cf5d3(0xe0)]):null;return{'id':_0x47ffb1['id']??null,'summary':_0x47ffb1[_0x3cf5d3(0x319)]??null,'description':_0x47ffb1[_0x3cf5d3(0x413)]??null,'tags':_0x1de9c7(_0x47ffb1['tags']??[]),'category':_0x47ffb1[_0x3cf5d3(0x4d7)]??null,'safety':_0x1de9c7(_0x47ffb1[_0x3cf5d3(0x267)]??null),'access':_0x1de9c7(_0x47ffb1[_0x3cf5d3(0x35d)]??null),'inputSchema':_0xcbf908,'outputSchema':_0x1de9c7(_0x47ffb1[_0x3cf5d3(0x656)]??null),'examples':_0x1de9c7(_0x47ffb1[_0x3cf5d3(0x2ec)]??[]),'pathParams':_0x3223de,'http':_0x132c5a,'cli':_0x1de9c7(_0x47ffb1[_0x3cf5d3(0x3b3)]??null),'mcp':_0x1de9c7(_0x47ffb1[_0x3cf5d3(0x32b)]??null),'legacy':{'params':_0x1de9c7(_0x47ffb1[_0x3cf5d3(0x5fe)]??null),'query':_0x1de9c7(_0x47ffb1['query']??null),'body':_0x1de9c7(_0x47ffb1[_0x3cf5d3(0x5e9)]??null),'response':_0x1de9c7(_0x47ffb1[_0x3cf5d3(0x1ed)]??null)},'transport':{'raw':!!_0x47ffb1[_0x3cf5d3(0x13b)],'sse':!!_0x47ffb1[_0x3cf5d3(0x54a)],'rawResponse':!!_0x47ffb1[_0x3cf5d3(0x642)],'cors':_0x1de9c7(_0x47ffb1[_0x3cf5d3(0x1fb)]??null)},'hasCanonical':_0x196a92};}function _0x39e179(_0xcbfb3e,_0x3f876c){const _0x1fcd82=_0x404a63;if(!_0x3f876c?.[_0x1fcd82(0x401)])return;if(!_0x3f876c[_0x1fcd82(0xe0)]||_0x3f876c[_0x1fcd82(0xe0)]['type']!==_0x1fcd82(0x20e)||!_0x3f876c[_0x1fcd82(0xe0)][_0x1fcd82(0x448)])throw new Error('Route\x20'+_0xcbfb3e[_0x1fcd82(0x527)]+'\x20'+_0xcbfb3e[_0x1fcd82(0x42d)]+'\x20has\x20canonical\x20metadata\x20but\x20missing\x20valid\x20inputSchema');const _0x22ac43=_0x3f876c[_0x1fcd82(0xe0)][_0x1fcd82(0x448)]||{},_0x21171a=new Set(_0x3f876c['pathParams'][_0x1fcd82(0x601)](_0x15a203=>_0x15a203[_0x1fcd82(0x2cc)])),_0x2e08c9=new Set(Object[_0x1fcd82(0x2f1)](_0x3f876c[_0x1fcd82(0x5d0)]?.[_0x1fcd82(0x651)]?.[_0x1fcd82(0x448)]||{})),_0x277482=new Set(Object[_0x1fcd82(0x2f1)](_0x3f876c[_0x1fcd82(0x5d0)]?.[_0x1fcd82(0x4a3)]||{}));for(const _0x3d06d5 of _0x3f876c['pathParams']){if(!_0x22ac43[_0x3d06d5[_0x1fcd82(0x2cc)]])throw new Error('Route\x20'+_0xcbfb3e[_0x1fcd82(0x527)]+'\x20'+_0xcbfb3e[_0x1fcd82(0x42d)]+'\x20missing\x20path\x20field\x20in\x20inputSchema:\x20'+_0x3d06d5[_0x1fcd82(0x2cc)]);}for(const _0x470a4c of _0x2e08c9){if(!_0x22ac43[_0x470a4c])throw new Error(_0x1fcd82(0x60d)+_0xcbfb3e[_0x1fcd82(0x527)]+'\x20'+_0xcbfb3e[_0x1fcd82(0x42d)]+_0x1fcd82(0x3e1)+_0x470a4c);}for(const _0x13ec4d of _0x277482){if(!_0x22ac43[_0x13ec4d])throw new Error(_0x1fcd82(0x60d)+_0xcbfb3e[_0x1fcd82(0x527)]+'\x20'+_0xcbfb3e[_0x1fcd82(0x42d)]+_0x1fcd82(0xe2)+_0x13ec4d);}for(const _0x38e4a1 of _0x277482){if(_0x21171a[_0x1fcd82(0x39f)](_0x38e4a1))throw new Error(_0x1fcd82(0x60d)+_0xcbfb3e[_0x1fcd82(0x527)]+'\x20'+_0xcbfb3e[_0x1fcd82(0x42d)]+_0x1fcd82(0x5b6)+_0x38e4a1);if(_0x2e08c9[_0x1fcd82(0x39f)](_0x38e4a1))throw new Error(_0x1fcd82(0x60d)+_0xcbfb3e[_0x1fcd82(0x527)]+'\x20'+_0xcbfb3e[_0x1fcd82(0x42d)]+_0x1fcd82(0xe3)+_0x38e4a1);const _0xdd0a4f=_0x3f876c[_0x1fcd82(0x5d0)]['bindings'][_0x38e4a1];if(!/^params\.[A-Za-z0-9_*.-]+$/[_0x1fcd82(0x30d)](_0xdd0a4f)&&!/^query\.[A-Za-z0-9_*.-]+$/['test'](_0xdd0a4f)&&!/^body(?:\.[A-Za-z0-9_*.-]+)?$/[_0x1fcd82(0x30d)](_0xdd0a4f)&&!/^headers\.[A-Za-z0-9_*.-]+$/[_0x1fcd82(0x30d)](_0xdd0a4f))throw new Error(_0x1fcd82(0x60d)+_0xcbfb3e[_0x1fcd82(0x527)]+'\x20'+_0xcbfb3e[_0x1fcd82(0x42d)]+_0x1fcd82(0x18a)+_0x38e4a1+':\x20'+_0xdd0a4f);}for(const _0x4af07b of _0x2e08c9){if(_0x21171a['has'](_0x4af07b))throw new Error('Route\x20'+_0xcbfb3e[_0x1fcd82(0x527)]+'\x20'+_0xcbfb3e[_0x1fcd82(0x42d)]+'\x20has\x20ambiguous\x20query/path\x20field:\x20'+_0x4af07b);}const _0x25f25b=_0x3f876c[_0x1fcd82(0x5d0)]?.[_0x1fcd82(0x2e5)],_0x5beee3=new Set(['none',_0x1fcd82(0x23e),_0x1fcd82(0x20e),_0x1fcd82(0x37b),'array',_0x1fcd82(0x13b)]);if(!_0x5beee3[_0x1fcd82(0x39f)](_0x25f25b))throw new Error(_0x1fcd82(0x60d)+_0xcbfb3e[_0x1fcd82(0x527)]+'\x20'+_0xcbfb3e[_0x1fcd82(0x42d)]+_0x1fcd82(0x316)+_0x25f25b);if(_0x25f25b==='raw'&&!_0xcbfb3e[_0x1fcd82(0x664)]?.[_0x1fcd82(0x13b)])throw new Error(_0x1fcd82(0x60d)+_0xcbfb3e[_0x1fcd82(0x527)]+'\x20'+_0xcbfb3e[_0x1fcd82(0x42d)]+'\x20uses\x20raw\x20bodyMode\x20without\x20addRaw/raw\x20route\x20metadata');if(_0x3f876c[_0x1fcd82(0x32b)]?.[_0x1fcd82(0x5c8)]!==![]&&(_0xcbfb3e['meta']?.['raw']||_0xcbfb3e[_0x1fcd82(0x664)]?.[_0x1fcd82(0x54a)]||_0x3f876c[_0x1fcd82(0x5d0)]?.['transport']===_0x1fcd82(0x25a)))throw new Error(_0x1fcd82(0x60d)+_0xcbfb3e['method']+'\x20'+_0xcbfb3e[_0x1fcd82(0x42d)]+_0x1fcd82(0x3c6)+_0x3f876c[_0x1fcd82(0x5d0)]?.[_0x1fcd82(0x109)]);const _0xee6aed=Object[_0x1fcd82(0x2f1)](_0x22ac43)[_0x1fcd82(0x1c6)](_0x16a9d2=>{const _0x51fd41=_0x1fcd82;if(_0x21171a[_0x51fd41(0x39f)](_0x16a9d2))return![];if(_0x2e08c9['has'](_0x16a9d2))return![];if(_0x277482[_0x51fd41(0x39f)](_0x16a9d2))return![];return!![];});if(_0x25f25b===_0x1fcd82(0x190)&&_0xee6aed['length']>0x0)throw new Error('Route\x20'+_0xcbfb3e['method']+'\x20'+_0xcbfb3e[_0x1fcd82(0x42d)]+'\x20has\x20unbound\x20input\x20fields\x20with\x20bodyMode:none:\x20'+_0xee6aed[_0x1fcd82(0x3a4)](',\x20'));}function _0x30ca70(_0x2fd64e){if(Array['isArray'](_0x2fd64e))return _0x2fd64e;if(_0x2fd64e==null)return[];return[_0x2fd64e];}function _0xcc8d80(_0x55a093,_0x10d643){const _0x5b0326=_0x404a63;return _0x30ca70(_0x55a093?.['type'])[_0x5b0326(0x5c0)](_0x10d643);}function _0x4d7513(_0x2e3b28,_0x4ec6fe){const _0x3ecb1e=_0x404a63;if(_0x2e3b28==null||typeof _0x2e3b28!==_0x3ecb1e(0x380))return _0x2e3b28;const _0x14a31e=_0x30ca70(_0x4ec6fe?.[_0x3ecb1e(0x49b)]);if(_0x14a31e['length']===0x0)return _0x2e3b28;if(_0x14a31e[_0x3ecb1e(0x5c0)](_0x3ecb1e(0x2e8))&&_0x2e3b28===_0x3ecb1e(0x2e8))return null;if(_0x14a31e[_0x3ecb1e(0x5c0)](_0x3ecb1e(0x455))){if(_0x2e3b28===_0x3ecb1e(0x5e1))return!![];if(_0x2e3b28===_0x3ecb1e(0x38c))return![];}if(_0x14a31e[_0x3ecb1e(0x5c0)](_0x3ecb1e(0x14b))&&/^-?\d+$/['test'](_0x2e3b28))return Number[_0x3ecb1e(0x279)](_0x2e3b28,0xa);if(_0x14a31e['includes'](_0x3ecb1e(0x17c))&&/^-?(?:\d+|\d*\.\d+)$/['test'](_0x2e3b28))return Number(_0x2e3b28);return _0x2e3b28;}function _0x127e06(_0x55869c){return _0x1de9c7(_0x55869c);}function _0x3414aa(_0x3283c6,_0x277164={},_0xef39e2={},_0x42f934=null,_0x4e031d={}){const _0x309df0=_0x404a63,_0x590fd1=_0x3283c6?.['operation'];if(!_0x590fd1?.['hasCanonical']||!_0x590fd1[_0x309df0(0xe0)])return null;const _0x14e54c=_0x590fd1[_0x309df0(0xe0)][_0x309df0(0x448)]||{},_0x6b5496=_0x590fd1[_0x309df0(0x5d0)]?.['querySchema']?.['properties']||{},_0x313cb4=_0x590fd1[_0x309df0(0x5d0)]?.[_0x309df0(0x4a3)]||{},_0x26e236=new Set((_0x590fd1[_0x309df0(0x538)]||[])[_0x309df0(0x601)](_0x568b5d=>_0x568b5d[_0x309df0(0x2cc)])),_0x465bf9=new Set(Object[_0x309df0(0x2f1)](_0x6b5496)),_0x4a756f={};for(const [_0x11aa84,_0x5951d0]of Object[_0x309df0(0x427)](_0x14e54c)){Object['prototype'][_0x309df0(0x51a)][_0x309df0(0x456)](_0x5951d0||{},_0x309df0(0x1e4))&&(_0x4a756f[_0x11aa84]=_0x127e06(_0x5951d0['default']));}for(const _0x4673a1 of _0x590fd1[_0x309df0(0x538)]||[]){if(!Object[_0x309df0(0x258)]['hasOwnProperty']['call'](_0x277164,_0x4673a1[_0x309df0(0x2cc)]))continue;const _0x5a2bbd=_0x14e54c[_0x4673a1[_0x309df0(0x2cc)]]||{};_0x4a756f[_0x4673a1[_0x309df0(0x2cc)]]=_0x4d7513(_0x277164[_0x4673a1[_0x309df0(0x2cc)]],_0x5a2bbd);}for(const [_0x5e92d0,_0x4a5675]of Object[_0x309df0(0x427)](_0x6b5496)){if(!Object['prototype'][_0x309df0(0x51a)][_0x309df0(0x456)](_0xef39e2,_0x5e92d0))continue;_0x4a756f[_0x5e92d0]=_0x4d7513(_0xef39e2[_0x5e92d0],_0x4a5675||_0x14e54c[_0x5e92d0]||{});}for(const [_0x435a08,_0x32238d]of Object[_0x309df0(0x427)](_0x313cb4)){if(typeof _0x32238d!==_0x309df0(0x380))continue;let _0x5b34e3;if(_0x32238d['startsWith'](_0x309df0(0x4d1)))_0x5b34e3=_0x277164[_0x32238d[_0x309df0(0x45e)](0x7)];else{if(_0x32238d[_0x309df0(0x3cc)]('query.'))_0x5b34e3=_0xef39e2[_0x32238d[_0x309df0(0x45e)](0x6)];else{if(_0x32238d===_0x309df0(0x5e9))_0x5b34e3=_0x42f934;else{if(_0x32238d[_0x309df0(0x3cc)](_0x309df0(0x43a)))_0x5b34e3=_0x42f934?.[_0x32238d[_0x309df0(0x45e)](0x5)];else{if(_0x32238d[_0x309df0(0x3cc)]('headers.'))_0x5b34e3=_0x4e031d?.[_0x32238d[_0x309df0(0x45e)](0x8)[_0x309df0(0x3f1)]()]??_0x4e031d?.[_0x32238d[_0x309df0(0x45e)](0x8)];}}}}if(_0x5b34e3!==undefined)_0x4a756f[_0x435a08]=_0x5b34e3;}const _0x28d437=_0x590fd1[_0x309df0(0x5d0)]?.[_0x309df0(0x2e5)];if(_0x28d437!==_0x309df0(0x190)&&_0x28d437!=='raw'&&_0x42f934!=null){if(_0x28d437===_0x309df0(0x20e))for(const [_0x2c1069,_0x28fa9e]of Object[_0x309df0(0x427)](_0x14e54c)){if(_0x26e236['has'](_0x2c1069)||_0x465bf9[_0x309df0(0x39f)](_0x2c1069)||Object[_0x309df0(0x258)]['hasOwnProperty']['call'](_0x313cb4,_0x2c1069))continue;if(Object[_0x309df0(0x258)][_0x309df0(0x51a)][_0x309df0(0x456)](_0x42f934,_0x2c1069))_0x4a756f[_0x2c1069]=_0x42f934[_0x2c1069];else{if(_0xcc8d80(_0x28fa9e,_0x309df0(0x20e)))_0x4a756f[_0x2c1069]=_0x42f934;}}else for(const [_0x342bcf,_0x3f3d95]of Object[_0x309df0(0x427)](_0x42f934)){if(_0x26e236['has'](_0x342bcf)||_0x465bf9[_0x309df0(0x39f)](_0x342bcf)||Object[_0x309df0(0x258)]['hasOwnProperty']['call'](_0x313cb4,_0x342bcf))continue;_0x4a756f[_0x342bcf]=_0x3f3d95;}}return _0x4a756f;}function _0x1b37ef(_0x103491,_0x55f4f7,_0x4e5071,_0x1abcb7){const _0x3b447b=_0x404a63;if(!_0x55f4f7)return;const _0x2f7362=_0x30ca70(_0x55f4f7[_0x3b447b(0x49b)]);if(_0x103491===undefined)return;if(_0x103491===null){_0x2f7362[_0x3b447b(0x2eb)]>0x0&&!_0x2f7362['includes'](_0x3b447b(0x2e8))&&_0x1abcb7[_0x3b447b(0x614)]({'field':_0x4e5071,'message':_0x3b447b(0x3dd),'expected':_0x2f7362[_0x3b447b(0x3a4)]('|'),'actual':null});return;}if(_0x2f7362[_0x3b447b(0x2eb)]===0x0)return;const _0x1a003d=_0x2f7362[_0x3b447b(0x28c)](_0x38c013=>{const _0x9ecf66=_0x3b447b;switch(_0x38c013){case _0x9ecf66(0x380):return typeof _0x103491===_0x9ecf66(0x380);case _0x9ecf66(0x14b):return Number['isInteger'](_0x103491);case _0x9ecf66(0x17c):return typeof _0x103491==='number'&&Number['isFinite'](_0x103491);case _0x9ecf66(0x455):return typeof _0x103491===_0x9ecf66(0x455);case _0x9ecf66(0x20e):return _0x103491&&typeof _0x103491===_0x9ecf66(0x20e)&&!Array[_0x9ecf66(0x579)](_0x103491);case'array':return Array['isArray'](_0x103491);case _0x9ecf66(0x2e8):return _0x103491===null;default:return!![];}});if(!_0x1a003d){_0x1abcb7[_0x3b447b(0x614)]({'field':_0x4e5071,'message':_0x3b447b(0x219)+_0x2f7362[_0x3b447b(0x3a4)]('|'),'expected':_0x2f7362[_0x3b447b(0x3a4)]('|'),'actual':_0x103491});return;}Array[_0x3b447b(0x579)](_0x103491)&&_0x55f4f7[_0x3b447b(0x5b7)]&&_0x103491[_0x3b447b(0x612)]((_0x1d5aef,_0x118307)=>_0x1b37ef(_0x1d5aef,_0x55f4f7[_0x3b447b(0x5b7)],_0x4e5071+'['+_0x118307+']',_0x1abcb7));}function _0x51c91b(_0xc9069f,_0x4386bf){const _0x4804c6=_0x404a63,_0x4fc8e6=_0xc9069f?.['operation'];if(!_0x4fc8e6?.['hasCanonical']||!_0x4fc8e6['inputSchema'])return null;const _0x2a7484=_0x4fc8e6[_0x4804c6(0xe0)],_0x41dad6=_0x2a7484[_0x4804c6(0x448)]||{},_0x2f4508=new Set(_0x2a7484['required']||[]),_0xa5500a=[];for(const _0x28a9ea of _0x2f4508){_0x4386bf[_0x28a9ea]===undefined&&_0xa5500a[_0x4804c6(0x614)]({'field':_0x28a9ea,'message':_0x4804c6(0x2b1),'expected':'present','actual':undefined});}if(_0x2a7484[_0x4804c6(0x56f)]===![])for(const _0x1ebfe4 of Object['keys'](_0x4386bf||{})){!Object[_0x4804c6(0x258)][_0x4804c6(0x51a)][_0x4804c6(0x456)](_0x41dad6,_0x1ebfe4)&&_0xa5500a[_0x4804c6(0x614)]({'field':_0x1ebfe4,'message':'is\x20not\x20allowed','expected':_0x4804c6(0x515),'actual':_0x4386bf[_0x1ebfe4]});}for(const [_0x569aa4,_0x40871e]of Object[_0x4804c6(0x427)](_0x41dad6)){_0x1b37ef(_0x4386bf[_0x569aa4],_0x40871e,_0x569aa4,_0xa5500a);}if(_0xa5500a[_0x4804c6(0x2eb)]===0x0)return null;return{'code':_0x4804c6(0x5d4),'errors':_0xa5500a};}function _0x19f9b4(_0x1aec5a=[]){const _0x38badc=_0x404a63;if(!Array[_0x38badc(0x579)](_0x1aec5a)||_0x1aec5a['length']===0x0)return null;const _0x2b662d=_0x1aec5a['slice'](0x0,0x3)['map']((_0x5a379f={})=>{const _0x160585=_0x38badc,_0x3dbf57=_0x5a379f[_0x160585(0x647)]?_0x5a379f[_0x160585(0x647)]+'\x20':'';return(''+_0x3dbf57+(_0x5a379f[_0x160585(0x29c)]||_0x160585(0x271)))[_0x160585(0x486)]();})[_0x38badc(0x3a4)](';\x20');return _0x1aec5a[_0x38badc(0x2eb)]>0x3?_0x2b662d+'\x20(+'+(_0x1aec5a[_0x38badc(0x2eb)]-0x3)+_0x38badc(0x15e):_0x2b662d;}function _0x4f037b(_0x24e315,_0x1b2021={}){const _0x22eaf3=_0x404a63,_0x4445c1=_0x1b2021?.[_0x22eaf3(0x657)]?.[_0x22eaf3(0x31b)]??_0x1b2021?.['error']??_0x22eaf3(0x344),_0x505c90=_0x1b2021?.[_0x22eaf3(0x657)]?.[_0x22eaf3(0x108)]??_0x1b2021?.[_0x22eaf3(0x108)]??_0x4445c1?.['details']??null,_0xe70de9=_0x1b2021?.['result']?.[_0x22eaf3(0x60e)]??_0x1b2021?.[_0x22eaf3(0x60e)]??_0x4445c1?.[_0x22eaf3(0x60e)]??null,_0x4c5fb0=_0x1b2021?.[_0x22eaf3(0x657)]?.[_0x22eaf3(0x29c)]??_0x1b2021?.[_0x22eaf3(0x29c)]??_0x4445c1?.[_0x22eaf3(0x29c)]??null,_0x394774=typeof _0x4445c1===_0x22eaf3(0x380)?_0x4445c1:null,_0x1e6d08=typeof _0x394774===_0x22eaf3(0x380)&&/^[A-Z0-9_]+$/[_0x22eaf3(0x30d)](_0x394774),_0x5d9d6=_0xe70de9??(_0x1e6d08?_0x394774:null)??(_0x552970[_0x24e315]||_0x22eaf3(0x3b6)+_0x24e315);let _0x49189b=_0x4c5fb0;!_0x49189b&&typeof _0x394774===_0x22eaf3(0x380)&&!_0x1e6d08&&(_0x49189b=_0x394774);if(!_0x49189b&&_0x5d9d6===_0x22eaf3(0x5d4)){const _0x1952f5=_0x19f9b4(_0x505c90);_0x49189b=_0x1952f5?_0x22eaf3(0x110)+_0x1952f5:_0x22eaf3(0x116);}if(!_0x49189b&&Array[_0x22eaf3(0x579)](_0x505c90)&&_0x505c90['length']>0x0){const _0x202d06=_0x19f9b4(_0x505c90);if(_0x202d06)_0x49189b=_0x202d06;}if(!_0x49189b)_0x49189b=_0x552970[_0x24e315]||_0x22eaf3(0x344);const _0x360537={'code':_0x5d9d6,'message':_0x49189b};if(_0x505c90!=null)_0x360537[_0x22eaf3(0x108)]=_0x505c90;return _0x360537;}function _0x9f9de8(_0x1a454a){const _0x1c7695=_0x404a63,_0x1998e5={};if(!_0x1a454a)return _0x1998e5;for(const _0x19f750 of _0x1a454a[_0x1c7695(0x37c)](';')){const _0x41be89=_0x19f750[_0x1c7695(0x42b)]('=');if(_0x41be89===-0x1)continue;const _0x503dea=_0x19f750[_0x1c7695(0x45e)](0x0,_0x41be89)[_0x1c7695(0x486)](),_0x3020c9=_0x19f750[_0x1c7695(0x45e)](_0x41be89+0x1)['trim']();_0x1998e5[_0x503dea]=decodeURIComponent(_0x3020c9);}return _0x1998e5;}function _0x7db96a(_0x2770cc,_0xe0488d){const _0x212040=_0x404a63;return _0xe0488d=_0x5b8fc6(_0xe0488d),{'status':_0xe0488d[_0x212040(0x626)]??_0x2770cc[_0x212040(0x626)],'headers':{..._0x2770cc[_0x212040(0x5b1)]||{},..._0xe0488d[_0x212040(0x5b1)]||{}},'body':_0xe0488d[_0x212040(0x5e9)]??_0x2770cc['body']};}function _0x3efcfe(_0x30a88a={}){const _0x1ad1fa=_0x404a63;return _0x30a88a[_0x1ad1fa(0x109)]||(_0x30a88a[_0x1ad1fa(0x567)]?_0x1ad1fa(0x567):_0x1ad1fa(0x5d0));}function _0x1ba266(_0xb12e4b){const _0x265069=_0x404a63;if(_0xb12e4b[_0x265069(0x1fc)]?.['internal']===!![])return!![];if(_0xb12e4b[_0x265069(0x1fc)]?.['auth']?.[_0x265069(0x53c)]===!![])return!![];if(_0xb12e4b[_0x265069(0x1fc)]?.[_0x265069(0x37d)]?.['ok']===!![])return!![];return![];}function _0x267036(_0x4406d5,_0x9033a8){const _0x564e74=_0x404a63,_0x2982ea=_0x9033a8[_0x564e74(0x37c)]('.');let _0x35ba41=_0x4406d5;for(const _0x19f97a of _0x2982ea){_0x35ba41=_0x35ba41?.[_0x19f97a];}return _0x35ba41||null;}class _0x38c7a0{constructor(){const _0x272f51=_0x404a63;this[_0x272f51(0x182)]=[],this['guards']=[],this[_0x272f51(0x5d7)]=[],this[_0x272f51(0x62e)]=0x5*0x400*0x400,this['server']=null,this['_sockets']=new Set(),this['auth']={'cookieName':'okdb_session','stateCookieName':'kdb_admin_oauth_state','csrfCookieName':_0x272f51(0x53d)},this['_authOptions']={},this[_0x272f51(0x4d4)]=new Map(),this[_0x272f51(0x476)]=null,this[_0x272f51(0x4cb)]=null,this[_0x272f51(0x3c8)]=new Map(),this[_0x272f51(0x4c5)]=new _0x19a34d(),this[_0x272f51(0x4c2)]=![],this[_0x272f51(0x5a8)]=0x0;}[_0x404a63(0x2f3)](_0x515c7f={}){const _0x1cfd04=_0x404a63;return this['_authOptions']=_0x515c7f||{},this[_0x1cfd04(0x2db)]=_0x515c7f[_0x1cfd04(0x63e)]??'open',this[_0x1cfd04(0x205)];}get['isSetupMode'](){const _0x14cc4f=_0x404a63;if(this[_0x14cc4f(0x31d)]?.['auth'])return this[_0x14cc4f(0x31d)][_0x14cc4f(0x37d)][_0x14cc4f(0x437)];return![];}[_0x404a63(0x65e)](){const _0x5d4295=_0x404a63;if(this['_okdb']?.[_0x5d4295(0x37d)])return this['_okdb'][_0x5d4295(0x37d)][_0x5d4295(0x65e)]();return this[_0x5d4295(0x205)]||{};}['use'](_0x3d3579){const _0xa2affc=_0x404a63;this['middlewares'][_0xa2affc(0x614)](_0x3d3579);}[_0x404a63(0x249)](_0x5793a9,_0x2c3c4d){const _0x4078ea=_0x404a63;this[_0x4078ea(0x519)][_0x4078ea(0x614)]({'match':_0x5793a9,'handler':_0x2c3c4d});}[_0x404a63(0x61d)](_0x192313,_0x14020d,_0x5ba12c,_0x16dbd9={}){const _0x30b292=_0x404a63,_0x52af51={'method':_0x34134f(_0x192313),'path':_0x14020d,'matcher':_0x50387f(_0x14020d),'handler':_0x5ba12c,'meta':_0x16dbd9||{}},_0x598d06=_0x34f30f(_0x52af51);_0x39e179(_0x52af51,_0x598d06),_0x52af51[_0x30b292(0x3d5)]=_0x598d06,_0x52af51[_0x30b292(0x660)]=this[_0x30b292(0x4c2)]===!![];if(_0x52af51['userAdded'])this[_0x30b292(0x5a8)]++;this[_0x30b292(0x5d7)][_0x30b292(0x614)](_0x52af51);}['addRaw'](_0x5e1146,_0x4d0ce4,_0xa7e4af,_0x46a0cb={}){this['add'](_0x5e1146,_0x4d0ce4,_0xa7e4af,{..._0x46a0cb,'raw':!![]});}[_0x404a63(0x3d0)](_0xd49fd5,_0x40120c){const _0x5650ec=_0x404a63;for(const _0x163509 of this['routes']){if(_0x163509[_0x5650ec(0x527)]!==_0x34134f(_0xd49fd5))continue;if(_0x163509[_0x5650ec(0xdd)]['regex'][_0x5650ec(0x30d)](_0x40120c))return _0x163509;}if(_0x34134f(_0xd49fd5)===_0x5650ec(0x346))for(const _0x5c0903 of this['routes']){if(_0x5c0903['matcher']['regex']['test'](_0x40120c)&&_0x5c0903[_0x5650ec(0x664)]?.[_0x5650ec(0x1fb)])return _0x5c0903;}return null;}[_0x404a63(0x52e)](_0x1f839b,_0x51ce1f){const _0x407c5d=_0x404a63;if(_0x1f839b?.['meta']?.[_0x407c5d(0x642)])return![];if(_0x51ce1f?.[_0x407c5d(0x5b1)]?.['x-okdb-raw-response'])return![];return!![];}[_0x404a63(0x33c)](){const _0x8fd44=_0x404a63;return this[_0x8fd44(0x5d7)][_0x8fd44(0x1c6)](_0x3fdeca=>!_0x3fdeca['meta']?.[_0x8fd44(0x350)])[_0x8fd44(0x601)](_0x1c34da=>({'method':_0x1c34da[_0x8fd44(0x527)],'path':_0x1c34da[_0x8fd44(0x42d)],'defaults':_0x1c34da[_0x8fd44(0xdd)]['defaults'],'meta':_0x1c34da['meta'],'operation':_0x1c34da[_0x8fd44(0x3d5)]}));}['addSSE'](_0x2b4d1d,_0x2caf11,_0x389560={}){const _0x56107c=_0x404a63,{PassThrough:_0x1bb23d}=require$$8;this[_0x56107c(0x61d)](_0x56107c(0x58f),_0x2b4d1d,({params:_0x265d40,query:_0x565899,headers:_0x119d21,context:_0x2cb12c})=>{const _0x48ed5f=_0x56107c,_0x59df6a=new _0x1bb23d();let _0x5a5610=null;const _0x508130={};try{_0x2cb12c?.['req']?.[_0x48ed5f(0x143)]?.[_0x48ed5f(0x5d1)](!![]);}catch{}_0x59df6a[_0x48ed5f(0x4ae)](_0x48ed5f(0x302)),_0x5a5610=setInterval(()=>{const _0x1c7a27=_0x48ed5f;try{_0x59df6a['write'](_0x1c7a27(0x159));}catch{}},0x3a98);const _0x163d86=(_0x59bab3,_0x3d8fd0,_0x4cb1e6={})=>{const _0x43efab=_0x48ed5f;try{const _0x44cc26=_0x4cb1e6[_0x43efab(0x13b)]?String(_0x3d8fd0??''):JSON['stringify'](_0x3d8fd0);_0x4cb1e6['id']!=null&&_0x59df6a[_0x43efab(0x4ae)]('id:\x20'+_0x4cb1e6['id']+'\x0a');_0x59df6a[_0x43efab(0x4ae)](_0x43efab(0x4de)+_0x59bab3+'\x0a');for(const _0x28ccac of _0x44cc26[_0x43efab(0x37c)]('\x0a')){_0x59df6a[_0x43efab(0x4ae)]('data:\x20'+_0x28ccac+'\x0a');}_0x59df6a[_0x43efab(0x4ae)]('\x0a');}catch{}},_0x454c97=()=>{const _0x2f3fb9=_0x48ed5f;_0x5a5610&&(clearInterval(_0x5a5610),_0x5a5610=null);try{_0x59df6a[_0x2f3fb9(0x167)]();}catch{}},_0x5e0469=(_0x1883c0,_0x54b510)=>{_0x508130[_0x1883c0]=_0x54b510;};_0x2cb12c?.[_0x48ed5f(0x668)]?.['on'](_0x48ed5f(0x241),_0x454c97),_0x59df6a['on'](_0x48ed5f(0x241),_0x454c97);const _0x403c42=_0x2caf11({'send':_0x163d86,'close':_0x454c97,'params':_0x265d40??{},'query':_0x565899??{},'headers':_0x119d21??{},'context':_0x2cb12c,'setHeader':_0x5e0469});return typeof _0x403c42==='function'&&_0x59df6a['on'](_0x48ed5f(0x241),_0x403c42),{'status':0xc8,'headers':{'content-type':_0x48ed5f(0x276),'cache-control':_0x48ed5f(0x4cf),'connection':_0x48ed5f(0x28d),'x-accel-buffering':'no',..._0x508130},'body':_0x59df6a};},{..._0x389560,'sse':!![]});}async[_0x404a63(0x482)](_0x139878,_0x3b4da1){const _0x195b6d=_0x404a63;for(const _0x383cdd of this['guards']){if(!_0x383cdd['match'](_0x139878))continue;const _0x36ba45=await _0x383cdd[_0x195b6d(0x124)](_0x139878,_0x3b4da1);if(_0x36ba45===![])return![];}return!![];}async[_0x404a63(0x217)](_0x350bcf,_0xe27361,_0x2d2cfb){let _0x4d2f5b=0x0;const _0x407cda=async()=>{const _0x3e80a3=_0x2368,_0x2d6dd5=this[_0x3e80a3(0x182)][_0x4d2f5b++];if(!_0x2d6dd5)return _0x2d2cfb();return _0x2d6dd5(_0x350bcf,_0xe27361,_0x407cda);};return _0x407cda();}[_0x404a63(0x3bf)](_0x513b69,_0x3aa2a3){const _0x1e0a69=_0x404a63,{status:status=0xc8,headers:headers={},body:_0x1a5a9b}=_0x513b69;if(status>=0x12c&&status<0x190)return _0x513b69;if(_0x3e2d4c(_0x1a5a9b))return _0x513b69;if(Buffer[_0x1e0a69(0x666)](_0x1a5a9b))return _0x513b69;if(typeof _0x1a5a9b===_0x1e0a69(0x380))return _0x513b69;const _0xa2d628={'time':+_0x3aa2a3['toFixed'](0x2)};if(_0x1a5a9b?.[_0x1e0a69(0x664)]&&typeof _0x1a5a9b['meta']===_0x1e0a69(0x20e)){const {time:_0x5bddf8,..._0x3f67fb}=_0x1a5a9b[_0x1e0a69(0x664)];Object[_0x1e0a69(0x451)](_0xa2d628,_0x3f67fb);}let _0x5b9e2f;if(status>=0x190){const _0x5d8007=_0x4f037b(status,_0x1a5a9b);_0x5b9e2f={'data':null,'error':_0x5d8007,'meta':_0xa2d628};}else{if(status===0xcc||_0x1a5a9b==null)_0x5b9e2f={'data':null,'error':null,'meta':_0xa2d628};else{let _0x17450e;if(_0x1e0a69(0x657)in _0x1a5a9b)_0x17450e=_0x1a5a9b[_0x1e0a69(0x657)];else{const {meta:_0x4d4fc5,..._0x179d18}=_0x1a5a9b;_0x17450e=Object[_0x1e0a69(0x2f1)](_0x179d18)[_0x1e0a69(0x2eb)]>0x0?_0x179d18:null;}_0x5b9e2f={'data':_0x17450e,'error':null,'meta':_0xa2d628};}}return{'status':status===0xcc?0xc8:status,'headers':headers,'body':_0x5b9e2f};}async[_0x404a63(0x4f3)](_0x24172e,_0x51558c,_0x3591ff={},_0x7df325={}){const _0x5d9a1a=_0x404a63;_0x24172e=_0x34134f(_0x24172e);const _0x5f1097=this['_matchRoute'](_0x24172e,_0x51558c),_0x28cfc2={'method':_0x24172e,'path':_0x51558c,'headers':_0x3591ff[_0x5d9a1a(0x5b1)]??{},'body':_0x3591ff[_0x5d9a1a(0x5e9)]??null,'query':_0x3591ff[_0x5d9a1a(0x3c5)]??{},'context':_0x7df325,'cookies':_0x9f9de8(_0x3591ff[_0x5d9a1a(0x5b1)]?.[_0x5d9a1a(0x1c1)]),'route':_0x5f1097,'socket':{'remoteAddress':_0x3591ff['remoteAddress']??_0x5d9a1a(0x586)}};_0x28cfc2[_0x5d9a1a(0x1fc)]=_0x28cfc2[_0x5d9a1a(0x1fc)]||{};!_0x28cfc2[_0x5d9a1a(0x1fc)][_0x5d9a1a(0x37d)]&&(_0x28cfc2[_0x5d9a1a(0x1fc)][_0x5d9a1a(0x37d)]=await this['authenticateRequest'](_0x28cfc2));if(_0x28cfc2[_0x5d9a1a(0x1fc)][_0x5d9a1a(0x37d)]?.[_0x5d9a1a(0x1d3)])return _0x5b8fc6({'status':0x193,'body':{'error':{'code':_0x5d9a1a(0x263),'message':_0x5d9a1a(0x2d0)}}});_0x28cfc2[_0x5d9a1a(0x1fc)][_0x5d9a1a(0x37d)]?.['user']&&!_0x28cfc2['context'][_0x5d9a1a(0x4fd)]&&(_0x28cfc2[_0x5d9a1a(0x1fc)][_0x5d9a1a(0x4fd)]=_0x28cfc2[_0x5d9a1a(0x1fc)]['auth']['user']);let _0x4bb1eb=null;const _0x15e957={'status'(_0x67693d){const _0x4e31e4=_0x5d9a1a;_0x4bb1eb=_0x4bb1eb||{},_0x4bb1eb[_0x4e31e4(0x626)]=_0x67693d;},'setHeader'(_0x1b3617,_0x331ae3){const _0x29cf5b=_0x5d9a1a;_0x4bb1eb=_0x4bb1eb||{},_0x4bb1eb[_0x29cf5b(0x5b1)]=_0x4bb1eb['headers']||{};const _0x5aa0c0=String(_0x1b3617)[_0x29cf5b(0x3f1)]();if(_0x5aa0c0===_0x29cf5b(0x517)){const _0x25bdf7=_0x4bb1eb[_0x29cf5b(0x5b1)][_0x1b3617];if(!_0x25bdf7)_0x4bb1eb[_0x29cf5b(0x5b1)][_0x1b3617]=_0x331ae3;else{if(Array[_0x29cf5b(0x579)](_0x25bdf7))_0x25bdf7[_0x29cf5b(0x614)](_0x331ae3);else _0x4bb1eb['headers'][_0x1b3617]=[_0x25bdf7,_0x331ae3];}return;}_0x4bb1eb['headers'][_0x1b3617]=_0x331ae3;},'send'(_0x4e413b){const _0x3366e6=_0x5d9a1a;_0x4bb1eb=_0x4bb1eb||{},_0x4bb1eb[_0x3366e6(0x5e9)]=_0x4e413b;}},_0x19dad9=await this[_0x5d9a1a(0x482)](_0x28cfc2,_0x15e957);if(!_0x19dad9)return _0x5b8fc6(_0x4bb1eb??{'status':0x193});const _0x38537b=this[_0x5d9a1a(0x23f)](_0x28cfc2);if(_0x38537b)return _0x5b8fc6(_0x38537b);const _0x1d232a=this[_0x5d9a1a(0x646)](_0x28cfc2);if(_0x1d232a)return _0x5b8fc6(_0x1d232a);return await this[_0x5d9a1a(0x217)](_0x28cfc2,_0x15e957,async()=>{const _0x2a4222=_0x5d9a1a,_0x2184a5=await this[_0x2a4222(0x187)](_0x28cfc2);if(_0x4bb1eb==null){_0x4bb1eb=_0x2184a5;return;}_0x4bb1eb=_0x7db96a(_0x4bb1eb,_0x2184a5);}),_0x5b8fc6(_0x4bb1eb);}[_0x404a63(0x23f)](_0x565d26){const _0x35eb0c=_0x404a63,_0x2ca852=_0x565d26[_0x35eb0c(0x412)]?.[_0x35eb0c(0x3d5)],_0x1c4bd7=_0x2ca852?.['access'];if(!_0x2ca852?.[_0x35eb0c(0x401)]||!_0x1c4bd7)return null;if(_0x565d26[_0x35eb0c(0x1fc)]?.[_0x35eb0c(0x37d)]?.[_0x35eb0c(0x18d)]===!![]||_0x565d26['context']?.[_0x35eb0c(0x37d)]?.[_0x35eb0c(0x435)]===!![])return null;const _0x5828dc=_0x3efcfe(_0x565d26[_0x35eb0c(0x1fc)]),_0x54eef7=Array[_0x35eb0c(0x579)](_0x1c4bd7[_0x35eb0c(0x499)])?_0x1c4bd7['audiences']:null;if(_0x1c4bd7[_0x35eb0c(0x254)]&&_0x565d26[_0x35eb0c(0x1fc)]?.[_0x35eb0c(0x567)]!==!![])return{'status':0x193,'body':{'error':_0x35eb0c(0x3f0)}};if(_0x54eef7&&_0x54eef7[_0x35eb0c(0x2eb)]>0x0&&!_0x54eef7[_0x35eb0c(0x5c0)](_0x5828dc)&&!(_0x5828dc===_0x35eb0c(0x567)&&_0x54eef7['includes'](_0x35eb0c(0x5df))))return{'status':0x193,'body':{'error':'Forbidden'}};if(_0x1c4bd7[_0x35eb0c(0x5d6)]&&!_0x1ba266(_0x565d26))return{'status':0x191,'body':{'error':_0x35eb0c(0x4e1)}};const _0x444a6b=_0x1c4bd7[_0x35eb0c(0x598)];if(!_0x444a6b)return null;if(_0x565d26[_0x35eb0c(0x1fc)]?.[_0x35eb0c(0x37d)]?.[_0x35eb0c(0x49b)]===_0x35eb0c(0x55a))return null;const _0x1fabb9=_0x565d26['context']?.[_0x35eb0c(0x37d)]?.[_0x35eb0c(0x359)];if(!_0x1fabb9){if(_0x565d26[_0x35eb0c(0x1fc)]?.[_0x35eb0c(0x37d)]?.['ok']===!![])return null;return{'status':0x193,'body':{'error':_0x35eb0c(0x62d)}};}if(!_0x565d26['params']&&_0x565d26[_0x35eb0c(0x412)]?.['matcher']){const _0x1ed1e0=_0x565d26['route']['matcher']['regex'][_0x35eb0c(0x4c7)](_0x565d26[_0x35eb0c(0x42d)]);_0x1ed1e0&&(_0x565d26[_0x35eb0c(0x5fe)]={},_0x565d26[_0x35eb0c(0x412)][_0x35eb0c(0xdd)][_0x35eb0c(0x2f1)]['forEach']((_0x597a5c,_0x12e6bc)=>{const _0xe95d6d=_0x35eb0c,_0x2a64a9=_0x1ed1e0[_0x12e6bc+0x1];_0x565d26[_0xe95d6d(0x5fe)][_0x597a5c]=_0x2a64a9?decodeURIComponent(_0x2a64a9):_0x565d26['route'][_0xe95d6d(0xdd)][_0xe95d6d(0x5ca)][_0x597a5c]??undefined;}));}let _0x2ce10a=null;_0x1c4bd7[_0x35eb0c(0x4f8)]?.[_0x35eb0c(0x46e)]&&(_0x2ce10a=_0x267036(_0x565d26,_0x1c4bd7[_0x35eb0c(0x4f8)][_0x35eb0c(0x46e)]));if(_0x2ce10a&&_0x2ce10a['startsWith']('~')){const _0x2c593c=_0x3c5d4e(_0x444a6b),_0x11fd10=_0x11a074(_0x1fabb9[_0x35eb0c(0x3f3)]||[],(_0x1fabb9[_0x35eb0c(0x236)]||{})[_0x2ce10a]||[]);if(!_0x19937c(_0x11fd10,_0x2c593c))return{'status':0x193,'body':{'error':_0x35eb0c(0x5f2)+_0x2c593c+_0x35eb0c(0x544)}};}const _0x37d06b=_0x11a074(_0x1fabb9[_0x35eb0c(0x3f3)]||[],_0x2ce10a?(_0x1fabb9[_0x35eb0c(0x236)]||{})[_0x2ce10a]||[]:[]);if(!_0x19937c(_0x37d06b,_0x444a6b))return{'status':0x193,'body':{'error':_0x35eb0c(0x5f2)+_0x444a6b}};return null;}[_0x404a63(0x646)](_0x5ea775){const _0x20c9fa=_0x404a63,_0x411bb4=_0x5ea775[_0x20c9fa(0x412)],_0x205dae=_0x411bb4?.[_0x20c9fa(0x3d5)];if(!_0x205dae?.[_0x20c9fa(0x401)]||!_0x205dae['inputSchema'])return null;let _0x13c76a=_0x5ea775[_0x20c9fa(0x5fe)]??null;if(!_0x13c76a&&_0x411bb4?.[_0x20c9fa(0xdd)]){const _0x57714a=_0x411bb4[_0x20c9fa(0xdd)][_0x20c9fa(0x5d2)][_0x20c9fa(0x4c7)](_0x5ea775[_0x20c9fa(0x42d)]);_0x57714a&&(_0x13c76a={},_0x411bb4[_0x20c9fa(0xdd)][_0x20c9fa(0x2f1)][_0x20c9fa(0x612)]((_0x3faf64,_0x33749)=>{const _0x5990d0=_0x20c9fa,_0x5c4d0a=_0x57714a[_0x33749+0x1];_0x13c76a[_0x3faf64]=_0x5c4d0a?decodeURIComponent(_0x5c4d0a):_0x411bb4[_0x5990d0(0xdd)]['defaults'][_0x3faf64]??undefined;}));}const _0x55e132=_0x3414aa(_0x411bb4,_0x13c76a??{},_0x5ea775[_0x20c9fa(0x3c5)]??{},_0x5ea775[_0x20c9fa(0x5e9)],_0x5ea775[_0x20c9fa(0x5b1)]??{}),_0x7e8e6a=_0x51c91b(_0x411bb4,_0x55e132||{});if(!_0x7e8e6a)return null;const _0x2a1db0=_0x19f9b4(_0x7e8e6a[_0x20c9fa(0x444)]);return{'status':0x190,'body':{'error':_0x7e8e6a[_0x20c9fa(0x60e)],'code':_0x7e8e6a[_0x20c9fa(0x60e)],'message':_0x2a1db0?_0x20c9fa(0x110)+_0x2a1db0:'Validation\x20failed','details':_0x7e8e6a[_0x20c9fa(0x444)]}};}[_0x404a63(0x62a)](_0x1ecc06,_0x57e5a9){const _0x5f07ce=_0x404a63,_0x1abcaf=_0x51c91b(_0x1ecc06,_0x57e5a9||{});if(!_0x1abcaf)return null;return{'code':_0x1abcaf[_0x5f07ce(0x60e)],'message':_0x19f9b4(_0x1abcaf[_0x5f07ce(0x444)])?_0x5f07ce(0x110)+_0x19f9b4(_0x1abcaf[_0x5f07ce(0x444)]):_0x5f07ce(0x116),'details':_0x1abcaf[_0x5f07ce(0x444)]};}async['_dispatch'](_0x3d6cc0){const _0x180213=_0x404a63;if(_0x3d6cc0[_0x180213(0x527)]==='OPTIONS')for(const _0x173b11 of this[_0x180213(0x5d7)]){const _0xf1d153=_0x173b11['matcher'][_0x180213(0x5d2)][_0x180213(0x4c7)](_0x3d6cc0[_0x180213(0x42d)]);if(!_0xf1d153||!_0x173b11[_0x180213(0x664)]?.[_0x180213(0x1fb)])continue;return{'status':0xcc,'headers':_0x2a8e64(_0x3d6cc0['headers'],_0x173b11[_0x180213(0x664)]['cors'],_0x173b11[_0x180213(0x527)])||{}};}for(const _0x411a81 of this[_0x180213(0x5d7)]){if(_0x411a81[_0x180213(0x527)]!==_0x3d6cc0[_0x180213(0x527)])continue;const _0x55bb9c=_0x411a81[_0x180213(0xdd)][_0x180213(0x5d2)][_0x180213(0x4c7)](_0x3d6cc0[_0x180213(0x42d)]);if(!_0x55bb9c)continue;const _0x2f2d1b={};_0x411a81['matcher'][_0x180213(0x2f1)][_0x180213(0x612)]((_0x5d581e,_0x295b09)=>{const _0x5730e5=_0x180213,_0x5d6c57=_0x55bb9c[_0x295b09+0x1];_0x2f2d1b[_0x5d581e]=_0x5d6c57?decodeURIComponent(_0x5d6c57):_0x411a81['matcher'][_0x5730e5(0x5ca)][_0x5d581e]??undefined;}),_0x3d6cc0[_0x180213(0x5fe)]=_0x2f2d1b;try{const _0x26aca0=await _0x411a81[_0x180213(0x124)]({'params':_0x2f2d1b,'body':_0x3d6cc0[_0x180213(0x5e9)],'query':_0x3d6cc0[_0x180213(0x3c5)],'headers':_0x3d6cc0['headers'],'context':_0x3d6cc0[_0x180213(0x1fc)]}),_0x20b9c7=_0x5b8fc6(_0x26aca0),_0x3cb5bb=_0x2a8e64(_0x3d6cc0[_0x180213(0x5b1)],_0x411a81[_0x180213(0x664)]?.[_0x180213(0x1fb)],_0x411a81[_0x180213(0x527)]);if(!_0x3cb5bb)return _0x20b9c7;return{..._0x20b9c7,'headers':{..._0x20b9c7['headers']||{},..._0x3cb5bb}};}catch(_0x12567c){const _0x5bb3ef=_0x12567c?.['status']||_0x3da15a[_0x12567c?.[_0x180213(0x60e)]]||0x1f4;return{'status':_0x5bb3ef,'body':{'error':_0x12567c[_0x180213(0x29c)]||'Internal\x20error','code':_0x12567c?.['code']||_0x552970[_0x5bb3ef]||_0x180213(0x3b6)+_0x5bb3ef,'message':_0x12567c?.[_0x180213(0x29c)]||_0x180213(0x3b8),..._0x12567c?.[_0x180213(0x108)]!=null?{'details':_0x12567c[_0x180213(0x108)]}:{}}};}}return{'status':0x194,'body':{'error':_0x180213(0x533)}};}[_0x404a63(0x31f)](_0x42317c,_0x3a9588={}){const _0x434338=_0x404a63,_0x3631b4=require$$1$2,_0x174f71=Number(_0x3a9588[_0x434338(0x5bf)])||0x0,_0x39ef88=_0x3a9588[_0x434338(0x2f2)],_0x47f526=_0x3631b4[_0x434338(0x48f)]&&(typeof _0x39ef88===_0x434338(0x26b)?_0x174f71>0x1:_0x174f71>=0x1);if(_0x47f526){if(this[_0x434338(0x34b)])throw new Error(_0x434338(0x65f));const {runClustered:_0x585703}=requireOkdbCluster();if(typeof _0x39ef88==='function')return this[_0x434338(0x34b)]=_0x585703({'workers':_0x174f71,'makeOkdb':_0x39ef88,'port':_0x42317c,'primaryOkdb':_0x3a9588[_0x434338(0x4ad)]}),this['server'];const _0xc25e25=this[_0x434338(0x31d)];if(!_0xc25e25?.[_0x434338(0x59f)])throw new Error(_0x434338(0x32f)+'(open-before-fork\x20seeds\x20the\x20shared\x20__tokenSecret\x20and\x20gives\x20workers\x20the\x20root\x20path).');if(this[_0x434338(0x5a8)]>0x0){const _0x32dd19=new Error(_0x434338(0x398)+_0x174f71+_0x434338(0x5c4)+this['_userRouteCount']+_0x434338(0x34d)+_0x434338(0x10a)+_0x434338(0x585)+_0x434338(0x288)+_0x434338(0x38f));_0x32dd19[_0x434338(0x60e)]=_0x434338(0x4d5);throw _0x32dd19;}let _0x204b8b;try{_0x204b8b=JSON[_0x434338(0x34f)](JSON[_0x434338(0x3d9)](_0xc25e25[_0x434338(0x2aa)]??{}));}catch(_0x16ead7){throw new Error(_0x434338(0x4c3)+_0x16ead7['message']);}return this[_0x434338(0x34b)]=_0x585703({'workers':_0x174f71,'port':_0x42317c,'primaryOkdb':_0xc25e25,'childEntry':!![],'workerEnv':{'OKDB_HTTP_CHILD':JSON[_0x434338(0x3d9)]({'rootPath':_0xc25e25[_0x434338(0x42d)],'port':_0x42317c,'options':_0x204b8b,'logLevel':_0xc25e25[_0x434338(0x2aa)]?.[_0x434338(0x45d)]??_0x434338(0x3d7)})}}),this[_0x434338(0x34b)];}if(this[_0x434338(0x34b)])throw new Error('HTTP\x20server\x20already\x20running');_0x42317c&&this[_0x434338(0x37d)][_0x434338(0x662)]===_0x434338(0x47d)&&(this[_0x434338(0x37d)][_0x434338(0x662)]=_0x434338(0x33e)+_0x42317c,this[_0x434338(0x31d)]?.['auth']&&(this[_0x434338(0x31d)]['auth'][_0x434338(0x623)]=this['auth'][_0x434338(0x662)]));const _0x29a689=this['_okdb']?.[_0x434338(0x2aa)]?.[_0x434338(0x408)]?.[_0x434338(0x3cb)]??![];this[_0x434338(0x34b)]=_0x53a26f[_0x434338(0x2a7)](async(_0x169714,_0x5f332d)=>{const _0x2d8cac=_0x434338,_0x16f343=Date[_0x2d8cac(0x16a)]();if(_0x29a689){const _0x47fabf=_0x169714['url']||'/',_0x46546f=_0x169714['headers']?.[_0x2d8cac(0x494)]?_0x169714[_0x2d8cac(0x5b1)][_0x2d8cac(0x494)][_0x2d8cac(0x38b)](/^Bearer\s+(\S{0,8})\S*/i,_0x2d8cac(0x113)):'-',_0x4de6e1=_0x169714[_0x2d8cac(0x5b1)]?.[_0x2d8cac(0x111)]||'-',_0x13c9f9=_0x169714['headers']?.[_0x2d8cac(0x416)]||_0x169714[_0x2d8cac(0x5b1)]?.[_0x2d8cac(0x2c0)]||'-',_0x438661=_0x169714[_0x2d8cac(0x5b1)]?.[_0x2d8cac(0x424)]||'-';process['stdout'][_0x2d8cac(0x4ae)](_0x2d8cac(0x233)+_0x169714[_0x2d8cac(0x527)]['padEnd'](0x7)+'\x20'+_0x47fabf[_0x2d8cac(0x2c9)](0x2d)+'\x20'+(_0x2d8cac(0x1e2)+_0x46546f+_0x2d8cac(0x2d7)+_0x438661+_0x2d8cac(0x1bf)+_0x4de6e1+_0x2d8cac(0x286)+_0x13c9f9+'\x0a'));}try{const _0x18fe3c=new _0x451322(_0x169714[_0x2d8cac(0x2c4)],_0x2d8cac(0x393)+_0x169714[_0x2d8cac(0x5b1)]['host']),_0x2d8eb5=this[_0x2d8cac(0x3d0)](_0x169714[_0x2d8cac(0x527)],_0x18fe3c[_0x2d8cac(0xe1)]),_0x5b45f0=_0x2d8eb5?.[_0x2d8cac(0x664)]?.[_0x2d8cac(0x13b)]===!![];if(_0x5b45f0){const _0x37b38e=_0x169714['headers']?.[_0x2d8cac(0x409)];if(_0x37b38e!=null){const _0x1d6082=Number(_0x37b38e);if(Number[_0x2d8cac(0x5f8)](_0x1d6082)&&_0x1d6082>this[_0x2d8cac(0x62e)]){_0x5f332d[_0x2d8cac(0x27b)]=0x19d,_0x5f332d[_0x2d8cac(0x62c)]('Payload\x20too\x20large');return;}}}const _0x391b71=_0x5b45f0?null:await _0x559c79(_0x169714,this['maxBodyBytes']),_0x2154db=_0x5b45f0?_0x2003a(_0x169714,this[_0x2d8cac(0x62e)]):undefined,_0x317af5=await this['handle'](_0x169714[_0x2d8cac(0x527)],_0x18fe3c[_0x2d8cac(0xe1)],{'body':_0x391b71,'query':Object[_0x2d8cac(0x3e5)](_0x18fe3c[_0x2d8cac(0x4e7)]['entries']()),'headers':_0x169714[_0x2d8cac(0x5b1)]},{'req':_0x169714,'res':_0x5f332d,'rawStream':_0x2154db}),_0xd06c33=this[_0x2d8cac(0x3d0)](_0x169714[_0x2d8cac(0x527)],_0x18fe3c['pathname']),_0x2d236d=Date['now']()-_0x16f343,_0x136119=this[_0x2d8cac(0x52e)](_0xd06c33,_0x317af5)?this['_wrapApiResponse'](_0x317af5,_0x2d236d):_0x5b8fc6(_0x317af5),_0x31d72a=(_0x136119[_0x2d8cac(0x626)]||0xc8)>=0x190;this[_0x2d8cac(0x4c5)]['record'](_0x169714[_0x2d8cac(0x527)],_0x2d236d,_0x31d72a),_0x287734(_0x5f332d,_0x136119);if(_0x29a689){const _0x533aa8=_0x136119[_0x2d8cac(0x626)]||0xc8,_0x3784f5=Date[_0x2d8cac(0x16a)]()-_0x16f343;process[_0x2d8cac(0x559)][_0x2d8cac(0x4ae)](_0x2d8cac(0x373)+_0x169714[_0x2d8cac(0x527)]['padEnd'](0x7)+'\x20'+_0x18fe3c['pathname'][_0x2d8cac(0x2c9)](0x2d)+'\x20'+_0x533aa8+'\x20\x20'+_0x3784f5+_0x2d8cac(0x543));}}catch(_0x537888){const _0x21d72c=Date[_0x2d8cac(0x16a)]()-_0x16f343;this[_0x2d8cac(0x4c5)]['record'](_0x169714[_0x2d8cac(0x527)],_0x21d72c,!![]);const _0x1ffc72=_0x537888?.[_0x2d8cac(0x626)]||0x1f4;_0x5f332d[_0x2d8cac(0x27b)]=_0x1ffc72,_0x1ffc72===0x19d?_0x5f332d[_0x2d8cac(0x62c)]('Payload\x20too\x20large'):_0x5f332d['end'](_0x537888[_0x2d8cac(0x29c)]||_0x2d8cac(0x3b8));}}),this['server']['on'](_0x434338(0x55c),_0x914894=>{const _0x357629=_0x434338;this[_0x357629(0x491)][_0x357629(0x61d)](_0x914894),_0x914894['on'](_0x357629(0x241),()=>this[_0x357629(0x491)][_0x357629(0x5ed)](_0x914894));}),this[_0x434338(0x34b)]['listen'](_0x42317c);const _0x5b6a57=this['_okdb'];return _0x5b6a57?.[_0x434338(0x532)]&&(_0x5b6a57[_0x434338(0x532)][_0x434338(0x325)](':'+_0x42317c),_0x3631b4[_0x434338(0x60c)]?_0x5b6a57[_0x434338(0x565)]?.({'kind':_0x434338(0x311)})[_0x434338(0x255)](()=>{}):_0x5b6a57[_0x434338(0x17b)]?.({'kind':_0x434338(0x53a),'listenAddr':':'+_0x42317c})['catch'](()=>{})),this[_0x434338(0x34b)];}async[_0x404a63(0x241)](_0x1c0b8f={}){const _0xf5f01f=_0x404a63,_0x51f764=this[_0xf5f01f(0x34b)];this['server']=null;if(_0x51f764&&_0x51f764[_0xf5f01f(0x317)]){try{await _0x51f764[_0xf5f01f(0x241)]();}catch{}this[_0xf5f01f(0x4c5)]&&this['metrics'][_0xf5f01f(0x241)]();return;}if(_0x51f764){const _0x2a7bc9=Number[_0xf5f01f(0x5f8)](_0x1c0b8f[_0xf5f01f(0x524)])?Math[_0xf5f01f(0x47e)](0x0,_0x1c0b8f[_0xf5f01f(0x524)]):0x3e8;await new Promise(_0x3056f7=>{const _0x36fec4=_0xf5f01f;let _0x4489b3=![],_0x495a10=null,_0x58f437=null;const _0xd8ac63=()=>{if(_0x4489b3)return;_0x4489b3=!![];if(_0x495a10)clearTimeout(_0x495a10);if(_0x58f437)clearTimeout(_0x58f437);_0x3056f7();};try{_0x51f764[_0x36fec4(0x241)](_0xd8ac63);}catch{_0xd8ac63();return;}try{_0x51f764[_0x36fec4(0x404)]?.();}catch{}_0x495a10=setTimeout(()=>{const _0x1cf0f3=_0x36fec4;try{_0x51f764[_0x1cf0f3(0x4c1)]?.();}catch{}for(const _0x84a19a of this[_0x1cf0f3(0x491)]){try{_0x84a19a[_0x1cf0f3(0x167)]();}catch{}}_0x58f437=setTimeout(_0xd8ac63,0x64),_0x58f437['unref']?.();},_0x2a7bc9),_0x495a10[_0x36fec4(0x386)]?.();});}this[_0xf5f01f(0x4c5)]&&this[_0xf5f01f(0x4c5)][_0xf5f01f(0x241)]();}[_0x404a63(0x198)](_0x5d3a62,_0x211f68,_0x2cf2db=0x36ee80){const _0x34eb2d=_0x404a63,_0x45e125=Date['now'](),_0x317cb2=Buffer[_0x34eb2d(0x36d)](JSON[_0x34eb2d(0x3d9)]({'iat':_0x45e125,'exp':_0x45e125+_0x2cf2db,..._0x5d3a62}))[_0x34eb2d(0x261)](_0x34eb2d(0x1c4)),_0x1cb073=_0x1d100f(_0x317cb2,_0x211f68);return _0x317cb2+'.'+_0x1cb073;}[_0x404a63(0x553)](_0x809ad9,_0x3eeb41={}){const _0x52f790=_0x404a63,{httpOnly:httpOnly=!![],sameSite:sameSite=_0x52f790(0x368),path:path='/',secure:secure=![],maxAge:maxAge=null,expires:expires=null}=_0x3eeb41;let _0x955ae5=this[_0x52f790(0x37d)]['cookieName']+'='+_0x809ad9;if(httpOnly)_0x955ae5+=_0x52f790(0x4c6);if(sameSite)_0x955ae5+=_0x52f790(0x283)+sameSite;if(path)_0x955ae5+=_0x52f790(0x33f)+path;if(secure)_0x955ae5+=_0x52f790(0x48b);if(Number[_0x52f790(0x5f8)](maxAge))_0x955ae5+=';\x20Max-Age='+Math[_0x52f790(0x47e)](0x0,Math[_0x52f790(0x341)](maxAge));if(expires instanceof Date)_0x955ae5+=_0x52f790(0x3a7)+expires[_0x52f790(0x5f1)]();return _0x955ae5;}[_0x404a63(0x582)](_0x189d88=this[_0x404a63(0x37d)][_0x404a63(0x662)],_0xfc0858={}){const _0x173056=_0x404a63,{path:path='/',sameSite:sameSite='Lax',secure:secure=![],httpOnly:httpOnly=!![]}=_0xfc0858;let _0xf1145f=_0x189d88+'=';if(httpOnly)_0xf1145f+=_0x173056(0x4c6);if(sameSite)_0xf1145f+=';\x20SameSite='+sameSite;if(path)_0xf1145f+=';\x20Path='+path;if(secure)_0xf1145f+=';\x20Secure';return _0xf1145f+=_0x173056(0x5e6),_0xf1145f;}[_0x404a63(0x625)](_0x2ea90f,_0x13b64d){const _0x4be9da=_0x404a63;if(!_0x2ea90f)return null;const [_0x446456,_0x5b4e90]=String(_0x2ea90f)[_0x4be9da(0x37c)]('.');if(!_0x446456||!_0x5b4e90)return null;const _0x1df725=_0x1d100f(_0x446456,_0x13b64d);if(!_0x54f11b(_0x5b4e90,_0x1df725))return null;try{const _0x4ba4be=JSON[_0x4be9da(0x34f)](Buffer['from'](_0x446456,_0x4be9da(0x1c4))[_0x4be9da(0x261)]());if(_0x4ba4be[_0x4be9da(0xfd)]<=Date[_0x4be9da(0x16a)]())return null;return _0x4ba4be;}catch{return null;}}[_0x404a63(0x547)](_0x1477dd){const _0x3239e0=_0x404a63;if(this[_0x3239e0(0x31d)]?.[_0x3239e0(0x37d)])return this['_okdb'][_0x3239e0(0x37d)][_0x3239e0(0x547)](_0x1477dd);return _0x3c10e5(_0x1477dd);}['issueToken'](_0x42f95b){const _0x181832=_0x404a63;if(this[_0x181832(0x31d)]?.[_0x181832(0x37d)])return this[_0x181832(0x31d)][_0x181832(0x37d)][_0x181832(0x610)](_0x42f95b);const _0x1f8ef5=this[_0x181832(0x205)]?.[_0x181832(0x4c4)]??0x36ee80,_0x41f575=this[_0x181832(0x205)]?.['tokenSecret'];return _0x580b0f(_0x42f95b,_0x41f575,_0x1f8ef5);}[_0x404a63(0x1ef)](_0x46c3f6){const _0x6bcd86=_0x404a63;if(this[_0x6bcd86(0x31d)]?.['auth'])return this['_okdb'][_0x6bcd86(0x37d)][_0x6bcd86(0x1ef)](_0x46c3f6);const _0x46ef26=this['_authOptions']?.['tokenSecret'];return _0x3e87bf(_0x46c3f6,_0x46ef26);}async[_0x404a63(0x521)](_0x2b974f){const _0x39923a=_0x404a63;if(this[_0x39923a(0x31d)]?.[_0x39923a(0x37d)])return this[_0x39923a(0x31d)]['auth'][_0x39923a(0x521)](_0x2b974f);if(_0x2b974f[_0x39923a(0x1fc)]?.[_0x39923a(0x567)]===!![]||this[_0x39923a(0x2db)]===_0x39923a(0x18d))return{'id':_0x39923a(0x268),'username':'system','roles':[_0x39923a(0x27f)],'isAuthenticated':!![],'isSystem':!![],'user':{'id':_0x39923a(0x268),'username':_0x39923a(0x268),'roles':[_0x39923a(0x27f)],'isAuthenticated':!![],'isSystem':!![]}};const _0x1e7a2d=this[_0x39923a(0x547)](_0x2b974f['headers']?.[_0x39923a(0x494)]),_0x55f5a3=_0x2b974f[_0x39923a(0x65b)]?.[this['auth']['cookieName']],_0x4973ce=_0x1e7a2d||_0x55f5a3;if(!_0x4973ce)return{'isAuthenticated':![],'isSystem':![],'user':null};const _0x2bba77=this[_0x39923a(0x1ef)](_0x4973ce);if(!_0x2bba77)return{'isAuthenticated':![],'isSystem':![],'user':null};const _0x116eae={'id':_0x2bba77[_0x39923a(0x57f)]??null,'username':_0x2bba77[_0x39923a(0x112)]??null,'roles':Array[_0x39923a(0x579)](_0x2bba77[_0x39923a(0x330)])?_0x2bba77[_0x39923a(0x330)]:[],'isAuthenticated':!![],'isSystem':![]};return{'id':_0x116eae['id'],'username':_0x116eae[_0x39923a(0x112)],'roles':_0x116eae[_0x39923a(0x330)],'isAuthenticated':!![],'isSystem':![],'user':_0x116eae,'claims':_0x2bba77,'subject':_0x116eae['id']};}async[_0x404a63(0x272)](_0xf4ce4a,_0x455793={}){const _0x5d8a3a=_0x404a63,_0x17a644=_0x10c589(_0xf4ce4a),_0x29e035=Array[_0x5d8a3a(0x579)](_0x455793['allowedAlgs'])&&_0x455793[_0x5d8a3a(0x59b)][_0x5d8a3a(0x2eb)]>0x0?_0x455793[_0x5d8a3a(0x59b)]:[_0x5d8a3a(0x462),_0x5d8a3a(0x2a2)],_0x1e85dd=_0x17a644[_0x5d8a3a(0x2f5)]?.[_0x5d8a3a(0x575)];if(!_0x29e035[_0x5d8a3a(0x5c0)](_0x1e85dd))throw new Error(_0x5d8a3a(0x549)+_0x1e85dd);if(!_0x17a644['header']?.[_0x5d8a3a(0x10b)])throw new Error(_0x5d8a3a(0x674));const _0x161549=await this[_0x5d8a3a(0x13f)](_0x455793);if(!_0x161549?.[_0x5d8a3a(0x348)])throw new Error(_0x5d8a3a(0xdb));const _0x1b4247=await this[_0x5d8a3a(0x132)](_0x161549[_0x5d8a3a(0x348)],_0x17a644[_0x5d8a3a(0x2f5)][_0x5d8a3a(0x10b)],_0x455793);if(!_0xba07c4(_0x1e85dd,_0x1b4247,_0x17a644['signingInput'],_0x17a644[_0x5d8a3a(0x318)]))throw new Error(_0x5d8a3a(0x1b8));const _0x59e01c=Math[_0x5d8a3a(0x341)](Date[_0x5d8a3a(0x16a)]()/0x3e8),_0x41a039=_0x17a644[_0x5d8a3a(0x193)]||{};if(_0x41a039['iss']!==_0x161549[_0x5d8a3a(0x11e)])throw new Error(_0x5d8a3a(0x336));const _0x3ca8b1=_0x455793[_0x5d8a3a(0x1ff)];if(_0x3ca8b1){const _0x3ec115=_0x35ee01(_0x41a039['aud']);if(!_0x3ec115[_0x5d8a3a(0x5c0)](_0x3ca8b1))throw new Error(_0x5d8a3a(0x2ed));}if(typeof _0x41a039[_0x5d8a3a(0xfd)]!==_0x5d8a3a(0x17c)||_0x41a039[_0x5d8a3a(0xfd)]<=_0x59e01c)throw new Error('JWT\x20expired');if(_0x41a039[_0x5d8a3a(0x45b)]!=null&&_0x41a039[_0x5d8a3a(0x45b)]>_0x59e01c)throw new Error(_0x5d8a3a(0x5fb));if(_0x41a039[_0x5d8a3a(0x179)]==='id')throw new Error(_0x5d8a3a(0x173));return{'subject':_0x41a039[_0x5d8a3a(0x57f)]??null,'email':_0x41a039[_0x5d8a3a(0x332)]??null,'scopes':typeof _0x41a039[_0x5d8a3a(0x4f8)]==='string'?_0x41a039[_0x5d8a3a(0x4f8)][_0x5d8a3a(0x37c)](/\s+/)[_0x5d8a3a(0x1c6)](Boolean):[],'claims':_0x41a039,'tokenType':_0x5d8a3a(0x35d)};}async['_getOidcDiscovery'](_0x5cad45={}){const _0x366acf=_0x404a63,_0x32d4f6=String(_0x5cad45[_0x366acf(0x11e)]||'')[_0x366acf(0x38b)](/\/+$/,'');if(!_0x32d4f6)return null;const _0x3305f4=Number['isFinite'](_0x5cad45[_0x366acf(0x46c)])?_0x5cad45['discoveryTtlMs']:0xa*0x3c*0x3e8;if(this[_0x366acf(0x476)]?.[_0x366acf(0x11e)]===_0x32d4f6&&this[_0x366acf(0x476)]['expiresAt']>Date[_0x366acf(0x16a)]())return this[_0x366acf(0x476)][_0x366acf(0x392)];const _0x41f8bb=await _0x5b4187(_0x32d4f6+_0x366acf(0x3c0)),_0x409517={'issuer':_0x41f8bb['issuer']||_0x32d4f6,'authorization_endpoint':_0x5cad45[_0x366acf(0x62f)]||_0x41f8bb[_0x366acf(0x107)],'token_endpoint':_0x5cad45['tokenUrl']||_0x41f8bb[_0x366acf(0x35f)],'jwks_uri':_0x5cad45[_0x366acf(0x489)]||_0x41f8bb[_0x366acf(0x348)]};return this[_0x366acf(0x476)]={'issuer':_0x32d4f6,'value':_0x409517,'expiresAt':Date[_0x366acf(0x16a)]()+_0x3305f4},_0x409517;}async[_0x404a63(0x39c)](_0x10efb9,_0x28feea=0x5*0x3c*0x3e8){const _0x4f1427=_0x404a63,_0x25004f=await _0x5b4187(_0x10efb9),_0x2117d6=new Map();for(const _0x48edaa of _0x25004f['keys']||[]){if(!_0x48edaa?.[_0x4f1427(0x10b)])continue;_0x2117d6['set'](_0x48edaa['kid'],_0x41a13a(_0x48edaa));}return this['_jwksCache']={'uri':_0x10efb9,'keys':_0x2117d6,'expiresAt':Date[_0x4f1427(0x16a)]()+_0x28feea},this['_jwksCache'];}async[_0x404a63(0x132)](_0x128044,_0x500ab4,_0x5a7c43={}){const _0x33d9f2=_0x404a63,_0x29eff3=Number[_0x33d9f2(0x5f8)](_0x5a7c43['jwksTtlMs'])?_0x5a7c43['jwksTtlMs']:0x5*0x3c*0x3e8,_0x558df5=0x1e*0x3e8,_0x5d8d38=this[_0x33d9f2(0x3c8)]['get'](_0x500ab4);if(_0x5d8d38!==undefined&&_0x5d8d38>Date[_0x33d9f2(0x16a)]())throw new Error(_0x33d9f2(0x3d1)+_0x500ab4);(!this[_0x33d9f2(0x4cb)]||this[_0x33d9f2(0x4cb)]['uri']!==_0x128044||this['_jwksCache'][_0x33d9f2(0x63c)]<=Date['now']())&&await this[_0x33d9f2(0x39c)](_0x128044,_0x29eff3);let _0x3bc1fd=this[_0x33d9f2(0x4cb)]?.[_0x33d9f2(0x2f1)]?.[_0x33d9f2(0x3aa)](_0x500ab4);if(_0x3bc1fd)return _0x3bc1fd;await this[_0x33d9f2(0x39c)](_0x128044,_0x29eff3),_0x3bc1fd=this[_0x33d9f2(0x4cb)]?.[_0x33d9f2(0x2f1)]?.[_0x33d9f2(0x3aa)](_0x500ab4);if(!_0x3bc1fd){this[_0x33d9f2(0x3c8)][_0x33d9f2(0x2c2)](_0x500ab4,Date[_0x33d9f2(0x16a)]()+_0x558df5);throw new Error(_0x33d9f2(0x3d1)+_0x500ab4);}return _0x3bc1fd;}[_0x404a63(0x2d8)](_0x3d33b7){const _0x2b9200=_0x404a63;if(this[_0x2b9200(0x31d)]?.[_0x2b9200(0x37d)])return this[_0x2b9200(0x31d)][_0x2b9200(0x37d)][_0x2b9200(0x2d8)](_0x3d33b7);const _0x150317=_0x3d33b7?.[_0x2b9200(0x42e)]||{},_0x2fba03={'sub':_0x3d33b7?.['subject']??_0x150317[_0x2b9200(0x57f)]??null,'email':_0x3d33b7?.['email']??_0x150317[_0x2b9200(0x332)]??null,'name':_0x3d33b7?.[_0x2b9200(0x2cc)]??_0x150317[_0x2b9200(0x2cc)]??_0x150317['preferred_username']??null,'groups':_0x3d33b7?.[_0x2b9200(0x3f4)]??_0x150317['groups']??[],'roles':_0x3d33b7?.[_0x2b9200(0x330)]??_0x150317[_0x2b9200(0x330)]??[]};return{'type':'oauth','tokenType':_0x3d33b7?.[_0x2b9200(0x522)]??_0x2b9200(0x35d),'subject':_0x2fba03['sub'],'email':_0x2fba03['email'],'scopes':_0x3d33b7?.['scopes']??_0x150317[_0x2b9200(0x4f8)]?.['split']?.('\x20')?.[_0x2b9200(0x1c6)](Boolean)??[],'claims':_0x150317,'user':_0x2fba03,'isAuthenticated':!![]};}['createLoginState'](_0x5c2525={},_0x3702ef=0x927c0){const _0x149173=_0x404a63;if(this['_okdb']?.['auth'])return this[_0x149173(0x31d)]['auth']['createLoginState'](_0x5c2525,_0x3702ef);const _0x1bdf03=_0xf804a3(0x18);this['_loginStates'][_0x149173(0x2c2)](_0x1bdf03,{..._0x5c2525,'exp':Date['now']()+_0x3702ef});if(this['_loginStates'][_0x149173(0x3ea)]%0x32===0x0){const _0x18a367=Date[_0x149173(0x16a)]();for(const [_0x45e61f,_0x1d6dc8]of this[_0x149173(0x4d4)]){if(_0x1d6dc8[_0x149173(0xfd)]<=_0x18a367)this[_0x149173(0x4d4)][_0x149173(0x5ed)](_0x45e61f);}}return _0x1bdf03;}[_0x404a63(0x2af)](_0x5bce6e){const _0x18f6dd=_0x404a63;if(this[_0x18f6dd(0x31d)]?.[_0x18f6dd(0x37d)])return this[_0x18f6dd(0x31d)][_0x18f6dd(0x37d)][_0x18f6dd(0x2af)](_0x5bce6e);if(!_0x5bce6e)return null;const _0x344a66=this[_0x18f6dd(0x4d4)]['get'](_0x5bce6e);this[_0x18f6dd(0x4d4)][_0x18f6dd(0x5ed)](_0x5bce6e);if(!_0x344a66)return null;if(_0x344a66['exp']<=Date[_0x18f6dd(0x16a)]())return null;return _0x344a66;}}function _0x5b8fc6(_0x625d95){const _0x404a0d=_0x404a63;if(_0x625d95==null)return{'status':0xcc};if(Buffer[_0x404a0d(0x666)](_0x625d95)||_0x3e2d4c(_0x625d95))return{'status':0xc8,'body':_0x625d95};if(typeof _0x625d95==='object'&&'status'in _0x625d95){if(!(_0x404a0d(0x5e9)in _0x625d95)&&!_0x3e2d4c(_0x625d95['body'])){const {status:_0x26774a,headers:_0x4bcd53,..._0x8c4776}=_0x625d95;if(Object[_0x404a0d(0x2f1)](_0x8c4776)['length']>0x0)return{'status':_0x26774a,'headers':_0x4bcd53,'body':_0x8c4776};}return _0x625d95;}return{'status':0xc8,'body':_0x625d95};}function _0x3e2d4c(_0x3ff921){const _0x50aa67=_0x404a63;return _0x3ff921&&typeof _0x3ff921[_0x50aa67(0x274)]===_0x50aa67(0x26b);}function _0x2003a(_0x4dd012,_0x4708f2){const _0x31678d=_0x404a63,{PassThrough:_0x40abb1}=require$$8;let _0x473ef6=0x0,_0x30e5d7=![];const _0x58a056=new _0x40abb1();return _0x4dd012['on'](_0x31678d(0x206),_0xa53f38=>{const _0x2fde96=_0x31678d;if(_0x30e5d7)return;_0x473ef6+=_0xa53f38[_0x2fde96(0x2eb)];if(_0x473ef6>_0x4708f2){_0x30e5d7=!![];const _0x38b06c=new Error('Payload\x20too\x20large');_0x38b06c['status']=0x19d,_0x58a056[_0x2fde96(0x167)](_0x38b06c);return;}if(!_0x58a056[_0x2fde96(0x200)])_0x58a056[_0x2fde96(0x614)](_0xa53f38);}),_0x4dd012['on'](_0x31678d(0x62c),()=>{const _0x3fb3bf=_0x31678d;!_0x30e5d7&&!_0x58a056[_0x3fb3bf(0x200)]&&(_0x30e5d7=!![],_0x58a056[_0x3fb3bf(0x62c)]());}),_0x4dd012['on'](_0x31678d(0x31b),_0x1d1b89=>{const _0x47e74c=_0x31678d;if(!_0x58a056[_0x47e74c(0x200)])_0x58a056[_0x47e74c(0x167)](_0x1d1b89);}),_0x4dd012[_0x31678d(0x152)](),_0x58a056['on'](_0x31678d(0x29d),()=>{const _0x78ab8f=_0x31678d;if(!_0x58a056[_0x78ab8f(0x200)])_0x4dd012[_0x78ab8f(0x29d)]();}),_0x58a056;}function _0x559c79(_0x4a3167,_0x5e7094){const _0x196dea=_0x404a63;if(_0x4a3167[_0x196dea(0x527)]===_0x196dea(0x58f)||_0x4a3167[_0x196dea(0x527)]===_0x196dea(0x594))return null;const _0x4a8c9c=_0x4a3167[_0x196dea(0x5b1)]?.['content-length'];if(_0x4a8c9c!=null){const _0x208fd1=Number(_0x4a8c9c);if(Number[_0x196dea(0x5f8)](_0x208fd1)&&_0x208fd1>_0x5e7094){const _0x1d787a=new Error(_0x196dea(0x38e));_0x1d787a[_0x196dea(0x626)]=0x19d;throw _0x1d787a;}}return new Promise((_0x662fe7,_0x1b0345)=>{const _0x529241=_0x196dea;let _0x5e9d78='',_0x4033b4=0x0;_0x4a3167['on'](_0x529241(0x206),_0x280bf4=>{const _0x42bbbe=_0x529241;_0x4033b4+=_0x280bf4[_0x42bbbe(0x2eb)];if(_0x4033b4>_0x5e7094){try{_0x4a3167[_0x42bbbe(0x167)]();}catch{}const _0x47168d=new Error('Payload\x20too\x20large');_0x47168d[_0x42bbbe(0x626)]=0x19d,_0x1b0345(_0x47168d);return;}_0x5e9d78+=_0x280bf4;}),_0x4a3167['on'](_0x529241(0x62c),()=>{const _0x3d1e4f=_0x529241;if(!_0x5e9d78)return _0x662fe7(null);const _0x50d9b9=_0x4a3167['headers']?.[_0x3d1e4f(0x153)]||'';if(_0x50d9b9['includes']('application/x-www-form-urlencoded')){const _0x4e9b7a={};for(const [_0x2ab30d,_0x1902ca]of new URLSearchParams(_0x5e9d78))_0x4e9b7a[_0x2ab30d]=_0x1902ca;return _0x662fe7(_0x4e9b7a);}try{_0x662fe7(JSON['parse'](_0x5e9d78));}catch(_0x40ecdb){_0x1b0345(_0x40ecdb);}}),_0x4a3167['on']('error',_0x1b0345);});}function _0x287734(_0x3edeb5,_0x155a5e){const _0xf129de=_0x404a63,{status:status=0xc8,headers:headers={},body:_0x56ffe3}=_0x155a5e;_0x3edeb5['statusCode']=status;for(const [_0x1dccc1,_0x37523b]of Object[_0xf129de(0x427)](headers)){_0x3edeb5[_0xf129de(0x36b)](_0x1dccc1,_0x37523b);}if(_0x56ffe3==null){_0x3edeb5[_0xf129de(0x62c)]();return;}if(_0x3e2d4c(_0x56ffe3)){_0x56ffe3['pipe'](_0x3edeb5);return;}if(Buffer[_0xf129de(0x666)](_0x56ffe3)){_0x3edeb5[_0xf129de(0x62c)](_0x56ffe3);return;}if(typeof _0x56ffe3===_0xf129de(0x20e)){!_0x3edeb5[_0xf129de(0x518)](_0xf129de(0x122))&&_0x3edeb5[_0xf129de(0x36b)](_0xf129de(0x122),_0xf129de(0x509));_0x3edeb5['end'](JSON[_0xf129de(0x3d9)](_0x56ffe3));return;}_0x3edeb5[_0xf129de(0x62c)](String(_0x56ffe3));}return okdbHttp[_0x404a63(0x1b3)]=_0x38c7a0,okdbHttp[_0x404a63(0x1b3)]['OKDB_CODE_TO_HTTP_STATUS']=_0x3da15a,okdbHttp[_0x404a63(0x1b3)];}function _0x2368(_0x43d7b3,_0x46a43e){_0x43d7b3=_0x43d7b3-0xdb;const _0x5b4d2d=_0x5b4d();let _0x2368bf=_0x5b4d2d[_0x43d7b3];return _0x2368bf;}var hasRequiredOkdb;function requireOkdb(){const _0x2feb2b=_0x4b361c;if(hasRequiredOkdb)return okdb$1;hasRequiredOkdb=0x1;try{process['loadEnvFile']();}catch{}const _0x1b65f1=require$$1,_0x56a80a=require$$1$1,{resolveWorkers:_0x2c44bd,isShmbufNative:_0x4b1d13}=requireOkdbWorkers();function _0x4f700b(_0x53e6d6){const _0xa1e032=_0x2368,_0x14c20d=_0x53e6d6[_0xa1e032(0x45e)](0x2),_0x44ee19={};let _0x32303b=0x0;while(_0x32303b<_0x14c20d['length']){const _0x5f5585=_0x14c20d[_0x32303b];if(_0x5f5585===_0xa1e032(0x322)||_0x5f5585==='-p')_0x44ee19[_0xa1e032(0x26f)]=Number(_0x14c20d[++_0x32303b]);else{if(_0x5f5585==='--path'||_0x5f5585==='-d')_0x44ee19['path']=_0x14c20d[++_0x32303b];else{if(_0x5f5585==='--key'||_0x5f5585==='-k')_0x44ee19[_0xa1e032(0x174)]=_0x14c20d[++_0x32303b];else{if(_0x5f5585===_0xa1e032(0x5b3)||_0x5f5585==='-c')_0x44ee19[_0xa1e032(0x2b8)]=_0x14c20d[++_0x32303b];else{if(_0x5f5585===_0xa1e032(0x417))_0x44ee19[_0xa1e032(0x45d)]=_0x14c20d[++_0x32303b];else{if(_0x5f5585===_0xa1e032(0x40c))_0x44ee19['noRepl']=!![];else{if(_0x5f5585===_0xa1e032(0x1ec))_0x44ee19[_0xa1e032(0x673)]=!![];else{if(_0x5f5585===_0xa1e032(0x102))_0x44ee19[_0xa1e032(0x5bf)]=_0x14c20d[++_0x32303b];else{if(_0x5f5585===_0xa1e032(0x300))_0x44ee19[_0xa1e032(0x289)]=!![];else{if(_0x5f5585==='--env'||_0x5f5585==='-e')_0x44ee19['env']=_0x14c20d[++_0x32303b];else{if(_0x5f5585===_0xa1e032(0x66a))_0x44ee19[_0xa1e032(0x161)]=_0x14c20d[++_0x32303b];else{if(_0x5f5585==='--changes')_0x44ee19[_0xa1e032(0x669)]=!![];else{if(_0x5f5585===_0xa1e032(0x566))_0x44ee19[_0xa1e032(0x506)]=!![];else{if(_0x5f5585==='--drop')_0x44ee19['drop']=!![];else{if(_0x5f5585==='--open'){const _0x5341bc=[];while(_0x32303b+0x1<_0x14c20d[_0xa1e032(0x2eb)]&&!_0x14c20d[_0x32303b+0x1]['startsWith']('--')){_0x5341bc[_0xa1e032(0x614)](_0x14c20d[++_0x32303b]);}_0x44ee19['open']=_0x5341bc[_0xa1e032(0x2eb)]>0x0?_0x5341bc:!![];}else{if(_0x5f5585==='--log-requests')_0x44ee19[_0xa1e032(0x3cb)]=!![];else{if(_0x5f5585==='--name')_0x44ee19['name']=_0x14c20d[++_0x32303b];else{if(_0x5f5585===_0xa1e032(0x3d6))_0x44ee19[_0xa1e032(0x46f)]=_0x14c20d[++_0x32303b];else{if(_0x5f5585===_0xa1e032(0x160))_0x44ee19[_0xa1e032(0x508)]=_0x14c20d[++_0x32303b];else{if(_0x5f5585==='--permissions')_0x44ee19[_0xa1e032(0x3f3)]=_0x14c20d[++_0x32303b];else{if(_0x5f5585===_0xa1e032(0x58e))_0x44ee19[_0xa1e032(0x236)]=_0x14c20d[++_0x32303b];else{if(_0x5f5585===_0xa1e032(0x5f4))_0x44ee19[_0xa1e032(0x4a7)]=_0x14c20d[++_0x32303b];else{if(_0x5f5585==='--token')_0x44ee19[_0xa1e032(0x359)]=_0x14c20d[++_0x32303b];else{if(_0x5f5585===_0xa1e032(0x463)||_0x5f5585==='-u')_0x44ee19[_0xa1e032(0x112)]=_0x14c20d[++_0x32303b];else{if(_0x5f5585==='--address')_0x44ee19[_0xa1e032(0x5d5)]=_0x14c20d[++_0x32303b];else{if(_0x5f5585===_0xa1e032(0x1e5)||_0x5f5585==='-v'){const _0x4a709f=require$$3;console['log'](_0x4a709f['version']),process['exit'](0x0);}else(_0x5f5585===_0xa1e032(0x44b)||_0x5f5585==='-h')&&(_0xcf29f7(),process['exit'](0x0));}}}}}}}}}}}}}}}}}}}}}}}}}_0x32303b++;}return _0x44ee19;}function _0xcf29f7(){const _0x19c3c2=_0x2368;console[_0x19c3c2(0x4f7)]('\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 _0x5eb53f=new Set([_0x2feb2b(0x408),'info',_0x2feb2b(0x27e),_0x2feb2b(0x31b)]);function _0x58293d(_0x20873b){const _0x45668b=_0x2feb2b,_0x3adf30=_0x20873b[_0x45668b(0x2b8)]?_0x1b65f1[_0x45668b(0x4a1)](_0x20873b[_0x45668b(0x2b8)]):_0x1b65f1[_0x45668b(0x4a1)](_0x45668b(0x5a9));let _0x40e4cd={};if(_0x56a80a[_0x45668b(0x5ee)](_0x3adf30))try{const _0x4d2f97=_0x56a80a['readFileSync'](_0x3adf30,_0x45668b(0x365))[_0x45668b(0x38b)](/^\uFEFF/,'');_0x40e4cd=JSON[_0x45668b(0x34f)](_0x4d2f97),console[_0x45668b(0x4f7)]('[okdb]\x20loaded\x20config:\x20'+_0x3adf30);}catch(_0x4676ee){console['error'](_0x45668b(0x562)+_0x3adf30+':\x20'+_0x4676ee[_0x45668b(0x29c)]),process['exit'](0x1);}const _0x2e65f9={'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},_0x7be6de={'port':_0x20873b[_0x45668b(0x26f)]??_0x40e4cd[_0x45668b(0x26f)]??_0x2e65f9[_0x45668b(0x26f)]??0x2124,'dbPath':_0x20873b[_0x45668b(0x42d)]??_0x40e4cd['path']??_0x2e65f9[_0x45668b(0x42d)]??_0x45668b(0x1ee),'key':_0x20873b['key']??_0x40e4cd[_0x45668b(0x174)]??_0x2e65f9[_0x45668b(0x174)]??undefined,'logLevel':_0x20873b[_0x45668b(0x45d)]??_0x40e4cd[_0x45668b(0x45d)]??_0x2e65f9[_0x45668b(0x45d)]??_0x45668b(0x3d7),'noRepl':_0x20873b[_0x45668b(0x2bd)]??_0x40e4cd[_0x45668b(0x2bd)]??_0x2e65f9[_0x45668b(0x2bd)]??![],'noAdmin':_0x20873b['noAdmin']??_0x40e4cd[_0x45668b(0x673)]??_0x2e65f9['noAdmin']??![],'admin':_0x40e4cd[_0x45668b(0x27f)]??{},'api':_0x40e4cd[_0x45668b(0x60f)]??undefined,'auth':_0x40e4cd['auth']??undefined,'mcp':_0x40e4cd['mcp']??undefined,'http':_0x40e4cd[_0x45668b(0x5d0)]??undefined,'timeMachine':_0x40e4cd[_0x45668b(0x232)]!==![]?_0x40e4cd[_0x45668b(0x232)]??{}:![]};if(_0x20873b['noCluster'])_0x7be6de[_0x45668b(0x289)]=!![];if(_0x20873b['workers']!==undefined)_0x7be6de[_0x45668b(0x194)]=_0x20873b[_0x45668b(0x5bf)];return _0x20873b[_0x45668b(0x18d)]!==undefined&&(_0x7be6de['auth']=_0x7be6de['auth']||{},_0x7be6de[_0x45668b(0x37d)]['open']=_0x20873b[_0x45668b(0x18d)]),_0x20873b[_0x45668b(0x3cb)]&&(_0x7be6de[_0x45668b(0x408)]=_0x7be6de[_0x45668b(0x408)]||{},_0x7be6de[_0x45668b(0x408)]['logRequests']=!![]),(!Number[_0x45668b(0xde)](_0x7be6de[_0x45668b(0x26f)])||_0x7be6de[_0x45668b(0x26f)]<0x1||_0x7be6de[_0x45668b(0x26f)]>0xffff)&&(console[_0x45668b(0x31b)](_0x45668b(0x12b)+_0x7be6de['port']+_0x45668b(0x264)),process[_0x45668b(0x542)](0x1)),!_0x5eb53f[_0x45668b(0x39f)](_0x7be6de[_0x45668b(0x45d)])&&(console[_0x45668b(0x31b)](_0x45668b(0x16d)+_0x7be6de[_0x45668b(0x45d)]+'\x22\x20(must\x20be\x20debug|info|warn|error)'),process[_0x45668b(0x542)](0x1)),_0x7be6de;}function _0x2b35c1(_0x5b8243){const _0x417be4=_0x2feb2b;return!!(_0x5b8243&&typeof _0x5b8243===_0x417be4(0x20e)&&!Array[_0x417be4(0x579)](_0x5b8243)&&Object[_0x417be4(0x2f1)](_0x5b8243)[_0x417be4(0x2eb)]>0x0);}const _0xb6fba5=!process[_0x2feb2b(0x559)][_0x2feb2b(0x52b)]||!!process.env.NO_COLOR;function _0x48ad76(_0x83c403,_0xc57ff6){return _0xb6fba5?_0xc57ff6:'\x1b['+_0x83c403+'m'+_0xc57ff6+'\x1b[0m';}function _0x5b43a0(_0x444caa){const _0x394236=_0x2feb2b;if(!_0x444caa||_0x444caa[_0x394236(0x2eb)]===0x0)return;const _0x5cf756='─'[_0x394236(0x473)](0x38);process['stderr'][_0x394236(0x4ae)]('\x0a'),process[_0x394236(0x16f)][_0x394236(0x4ae)](_0x48ad76('33',_0x394236(0x371)+_0x444caa[_0x394236(0x2eb)]+'\x20SECURITY\x20NOTICE'+(_0x444caa[_0x394236(0x2eb)]>0x1?'S':'')+'\x0a')),process[_0x394236(0x16f)][_0x394236(0x4ae)]('\x20\x20'+_0x5cf756+'\x0a');for(const _0x227fef of _0x444caa){const _0x20c330=_0x227fef[_0x394236(0x294)]===_0x394236(0x31b)?_0x48ad76('31',_0x394236(0x307)):_0x48ad76('33',_0x394236(0x12d));process['stderr'][_0x394236(0x4ae)](_0x20c330+'\x20\x20'+_0x48ad76('1',_0x227fef['title'])+'\x0a'),process[_0x394236(0x16f)]['write'](_0x394236(0x63a)+_0x227fef['message']+'\x0a');if(_0x227fef[_0x394236(0x1a4)])process['stderr']['write'](_0x394236(0x63a)+_0x48ad76('2',_0x394236(0x154)+_0x227fef[_0x394236(0x1a4)])+'\x0a');process[_0x394236(0x16f)][_0x394236(0x4ae)]('\x0a');}process['stderr'][_0x394236(0x4ae)]('\x20\x20'+_0x5cf756+'\x0a\x0a');}function _0x47de7d(_0x2f7381,_0x20686c,_0x17b9a8={}){const _0x40e962=_0x2feb2b,_0x31c77b=_0x2f7381[_0x40e962(0x5d0)][_0x40e962(0x31f)](_0x20686c,_0x17b9a8);if(_0x31c77b&&_0x31c77b[_0x40e962(0x317)])return Promise['resolve'](_0x31c77b);return new Promise((_0x5d7547,_0x35af26)=>{const _0x5b7c7a=_0x40e962;_0x31c77b[_0x5b7c7a(0x292)]('listening',_0x5d7547),_0x31c77b['once'](_0x5b7c7a(0x31b),_0x35af26);});}async function _0x3a8f5c(_0x28e023){const _0x1991b8=_0x2feb2b,_0x2856cf=require$$4$1;console[_0x1991b8(0x4f7)](_0x1991b8(0x1ce));let _0x151427=!![];const _0x314fa7=(_0x202188,_0x2ae8f1)=>{console['log']('\x20\x20'+(_0x202188?'✓':'✗')+'\x20'+_0x2ae8f1);if(!_0x202188)_0x151427=![];},_0x2e609b=Number(process[_0x1991b8(0x2ea)][_0x1991b8(0x38b)]('v','')['split']('.')[0x0]);_0x314fa7(_0x2e609b>=0x12,_0x1991b8(0x2cd)+process[_0x1991b8(0x2ea)]+(_0x2e609b<0x12?_0x1991b8(0x24a):''));const _0x334f4e=_0x1b65f1[_0x1991b8(0x4a1)](_0x28e023[_0x1991b8(0x64c)]);try{_0x56a80a[_0x1991b8(0x2cf)](_0x334f4e,{'recursive':!![]});const _0xb23b33=_0x1b65f1['join'](_0x334f4e,_0x1991b8(0x677));_0x56a80a[_0x1991b8(0x59d)](_0xb23b33,''),_0x56a80a[_0x1991b8(0x207)](_0xb23b33),_0x314fa7(!![],'database\x20path\x20writable:\x20'+_0x334f4e);}catch(_0x2b4225){_0x314fa7(![],'database\x20path\x20not\x20writable:\x20'+_0x334f4e+_0x1991b8(0x129)+_0x2b4225[_0x1991b8(0x29c)]+')');}const _0x420ef2=await new Promise(_0x87d6d9=>{const _0x30530d=_0x1991b8,_0x56656c=_0x2856cf[_0x30530d(0x2a7)]();_0x56656c[_0x30530d(0x292)](_0x30530d(0x31b),()=>_0x87d6d9(![])),_0x56656c['once']('listening',()=>{const _0x1cc671=_0x30530d;_0x56656c[_0x1cc671(0x241)](),_0x87d6d9(!![]);}),_0x56656c[_0x30530d(0x31f)](_0x28e023['port'],_0x30530d(0x586));});_0x314fa7(_0x420ef2,_0x1991b8(0x30e)+_0x28e023['port']+'\x20'+(_0x420ef2?_0x1991b8(0x119):'already\x20in\x20use'));const _0x4ae031=_0x1b65f1[_0x1991b8(0x4a1)](_0x1991b8(0x5a9));if(_0x56a80a['existsSync'](_0x4ae031))try{JSON[_0x1991b8(0x34f)](_0x56a80a[_0x1991b8(0xe7)](_0x4ae031,'utf8')['replace'](/^\uFEFF/,'')),_0x314fa7(!![],_0x1991b8(0x49f)+_0x4ae031);}catch(_0x35d536){_0x314fa7(![],'config\x20file\x20invalid:\x20'+_0x35d536['message']);}else _0x314fa7(!![],_0x1991b8(0x48e));if(_0x4b1d13()){const _0x1922ad=_0x2c44bd(_0x28e023,{'shmbufNative':!![]});_0x314fa7(!![],_0x1991b8(0x492)+_0x1922ad+'\x20worker'+(_0x1922ad===0x1?'':'s')+')');}else _0x314fa7(!![],_0x1991b8(0x55e));if(!_0x420ef2)try{const _0x2d4d85=require(_0x1991b8(0x248)),_0x17f5f8=new _0x2d4d85(_0x334f4e,{'engines':![],'asyncProcessors':![],'compaction':_0x1991b8(0x573),'http':![],'bus':![],'auth':{'open':!![]}});await _0x17f5f8[_0x1991b8(0x18d)]();try{await _0x17f5f8[_0x1991b8(0x532)]['open']({'reader':!![]});const _0x8b2530=_0x17f5f8[_0x1991b8(0x532)]['listNodes'](),_0x2f3989=_0x8b2530[_0x1991b8(0x1c6)](_0x20b7c3=>_0x20b7c3['supervisorKey']!=null)[_0x1991b8(0x2eb)];_0x314fa7(!![],_0x1991b8(0x1ea)+_0x8b2530[_0x1991b8(0x2eb)]+'\x20process'+(_0x8b2530[_0x1991b8(0x2eb)]===0x1?'':'es')+'\x20('+_0x2f3989+_0x1991b8(0x504));}finally{await _0x17f5f8['close']();}}catch{}console[_0x1991b8(0x4f7)](''),_0x151427?console['log']('\x20\x20All\x20checks\x20passed.\x0a'):(console['log'](_0x1991b8(0x1dd)),process[_0x1991b8(0x542)](0x1));}async function _0x35ffc0(){const _0x54a9a8=_0x2feb2b,_0xffe557=_0x1b65f1['resolve'](_0x54a9a8(0x5a9));!_0x56a80a[_0x54a9a8(0x5ee)](_0xffe557)?(_0x56a80a[_0x54a9a8(0x59d)](_0xffe557,JSON[_0x54a9a8(0x3d9)]({'port':0x2124,'path':_0x54a9a8(0x1ee),'logLevel':'info','noRepl':![],'noAdmin':![]},null,0x2)+'\x0a'),console[_0x54a9a8(0x4f7)](_0x54a9a8(0x1cf))):console['log']('[okdb]\x20.kdbconfig\x20already\x20exists\x20—\x20skipping');const _0x4d2c7b=_0x1b65f1[_0x54a9a8(0x4a1)](_0x54a9a8(0x1ee));!_0x56a80a[_0x54a9a8(0x5ee)](_0x4d2c7b)?(_0x56a80a[_0x54a9a8(0x2cf)](_0x4d2c7b,{'recursive':!![]}),console[_0x54a9a8(0x4f7)](_0x54a9a8(0x552))):console[_0x54a9a8(0x4f7)]('[okdb]\x20./okdb-data\x20already\x20exists\x20—\x20skipping'),console[_0x54a9a8(0x4f7)]('\x0a\x20\x20Run\x20okdb\x20to\x20start\x20the\x20server.\x0a');}async function _0x44b834(_0x7f2725){const _0x5be37f=_0x2feb2b,_0x38ee1b=_0x1b65f1[_0x5be37f(0x4a1)](_0x7f2725['dbPath']);if(!_0x56a80a[_0x5be37f(0x5ee)](_0x38ee1b)){console['log'](_0x5be37f(0x5a3)+_0x38ee1b+_0x5be37f(0x1a8));return;}const _0x513721=require$$0$2,_0x3f48d9=_0x513721[_0x5be37f(0x15a)]({'input':process[_0x5be37f(0x61c)],'output':process[_0x5be37f(0x559)]}),_0x34af10=await new Promise(_0x1a47fa=>_0x3f48d9[_0x5be37f(0x1fd)](_0x5be37f(0x3da)+_0x38ee1b+_0x5be37f(0x3c3),_0x1a47fa));_0x3f48d9[_0x5be37f(0x241)](),console['log']('');if(_0x34af10[_0x5be37f(0x486)]()['toLowerCase']()!=='yes'){console[_0x5be37f(0x4f7)](_0x5be37f(0xf7));return;}let _0x2e987c=null;try{_0x2e987c=await _0x3d51a4(_0x38ee1b,_0x7f2725,async _0x318ce5=>{const _0x44a7a5=_0x5be37f,_0x516b30=_0x318ce5[_0x44a7a5(0x18f)],_0x3aee24=_0x516b30?.['db']?.['get'](_0x44a7a5(0x551))??null,_0x219294=[];if(_0x516b30?.[_0x44a7a5(0x431)]('~licenses'))for(const {key:_0x406f41,value:_0xfa4961}of _0x516b30[_0x44a7a5(0x391)](_0x44a7a5(0x3a6))){_0x219294[_0x44a7a5(0x614)]({'key':_0x406f41,'value':_0xfa4961});}return{'identity':_0x3aee24,'licenses':_0x219294};});}catch(_0x2df5ee){console['log']('[okdb]\x20warning:\x20could\x20not\x20read\x20node\x20identity/licenses\x20before\x20reset\x20('+_0x2df5ee[_0x5be37f(0x29c)]+')\x20—\x20they\x20will\x20NOT\x20be\x20preserved');}_0x56a80a[_0x5be37f(0xeb)](_0x38ee1b,{'recursive':!![],'force':!![]}),console[_0x5be37f(0x4f7)](_0x5be37f(0x1b9)+_0x38ee1b+_0x5be37f(0x284));if(_0x2e987c&&(_0x2e987c['identity']||_0x2e987c[_0x5be37f(0x592)][_0x5be37f(0x2eb)]>0x0))try{await _0x3d51a4(_0x38ee1b,_0x7f2725,async _0x44ccbb=>{const _0x56e6a4=_0x5be37f,_0x5f13b9=_0x44ccbb[_0x56e6a4(0x18f)];_0x2e987c[_0x56e6a4(0x665)]&&_0x5f13b9['db']['putSync'](_0x56e6a4(0x551),_0x2e987c[_0x56e6a4(0x665)]);if(_0x2e987c[_0x56e6a4(0x592)][_0x56e6a4(0x2eb)]>0x0){if(!_0x5f13b9[_0x56e6a4(0x431)]('~licenses'))await _0x5f13b9[_0x56e6a4(0x428)](_0x56e6a4(0x3a6));for(const {key:_0x406bf0,value:_0x2107b1}of _0x2e987c[_0x56e6a4(0x592)]){await _0x5f13b9[_0x56e6a4(0x42f)]('~licenses',_0x406bf0,_0x2107b1);}}});const _0x502d5e=[];if(_0x2e987c[_0x5be37f(0x665)])_0x502d5e['push']('node\x20identity');if(_0x2e987c[_0x5be37f(0x592)]['length']>0x0)_0x502d5e['push'](_0x2e987c[_0x5be37f(0x592)][_0x5be37f(0x2eb)]+_0x5be37f(0x5a6));console[_0x5be37f(0x4f7)](_0x5be37f(0x4da)+_0x502d5e[_0x5be37f(0x3a4)](_0x5be37f(0x40b)));}catch(_0x23ed7b){console[_0x5be37f(0x4f7)](_0x5be37f(0x266)+_0x23ed7b[_0x5be37f(0x29c)]);}}async function _0x3d51a4(_0xe4748e,_0x5da162,_0x3f1cb2){const _0x1f370c=_0x2feb2b,_0x5f085a=require$$5,_0xc10287=new _0x5f085a(_0xe4748e,{'admin':![],'mcp':![],'http':![],'timeMachine':![],'engines':![],'asyncProcessors':![],'compaction':_0x1f370c(0x573),'bus':![],'_skipBootRuntime':!![],..._0x5da162[_0x1f370c(0x174)]?{'encryptionKey':_0x5da162[_0x1f370c(0x174)]}:{}});await _0xc10287[_0x1f370c(0x18d)]();try{return await _0x3f1cb2(_0xc10287);}finally{await _0xc10287['close']();}}async function _0x1eecf7(_0x4bc9d8,_0x5621c5){const _0x845b32=_0x2feb2b,_0x4aa841=require$$5,_0x51813c=_0x1b65f1[_0x845b32(0x4a1)](_0x5621c5['dbPath']);console[_0x845b32(0x4f7)]('[okdb]\x20opening\x20'+_0x51813c+'…');const _0x5a6255=new _0x4aa841(_0x51813c,_0x5621c5[_0x845b32(0x174)]?{'encryptionKey':_0x5621c5[_0x845b32(0x174)]}:{});await _0x5a6255['open'](),console['log'](_0x845b32(0x5f7)+_0x4bc9d8+'…');const {envs:_0x24e36f}=await _0x5a6255[_0x845b32(0x5bb)][_0x845b32(0x329)](_0x4bc9d8);for(const _0x37888c of _0x24e36f){const _0x4ee6ff=_0x37888c[_0x845b32(0xfb)]>0x0?_0x845b32(0x129)+(_0x37888c[_0x845b32(0xfb)]/0x400/0x400)[_0x845b32(0x4a8)](0x2)+_0x845b32(0x32c)+(_0x37888c['sizeAfter']/0x400/0x400)[_0x845b32(0x4a8)](0x2)+_0x845b32(0x440):'';console[_0x845b32(0x4f7)](_0x845b32(0x118)+_0x37888c[_0x845b32(0x2cc)]+_0x845b32(0x2ff)+_0x37888c[_0x845b32(0x604)]+_0x4ee6ff);}await _0x5a6255[_0x845b32(0x241)](),console[_0x845b32(0x4f7)](_0x845b32(0xf2));}async function _0x27c3f3(_0x34c5f9,_0x13de21,_0x4be405){const _0x359289=_0x2feb2b,_0x3b19fb=require$$5,_0x47f23a=_0x1b65f1[_0x359289(0x4a1)](_0x13de21[_0x359289(0x64c)]),_0x5970c3=_0x4be405[_0x359289(0x46e)]??_0x359289(0x1e4),_0x518056=_0x4be405['types']?_0x4be405['types']['split'](',')[_0x359289(0x601)](_0x5ac672=>_0x5ac672[_0x359289(0x486)]()):null;console[_0x359289(0x4f7)](_0x359289(0x1cb)+_0x47f23a+'…');const _0x26c496=new _0x3b19fb(_0x47f23a,_0x13de21[_0x359289(0x174)]?{'encryptionKey':_0x13de21['key']}:{});await _0x26c496[_0x359289(0x18d)](),console['log'](_0x359289(0x679)+_0x5970c3+_0x359289(0x225)+_0x34c5f9+'…');const _0x26365e=await _0x26c496[_0x359289(0x5bb)][_0x359289(0x478)](_0x34c5f9,{'envName':_0x5970c3,'types':_0x518056,'includeChanges':!!_0x4be405[_0x359289(0x669)]});console[_0x359289(0x4f7)](_0x359289(0x536)+_0x26365e['types']+_0x359289(0x321)+_0x26365e[_0x359289(0x520)]+_0x359289(0x2d1)+_0x26365e[_0x359289(0x669)]);if(_0x4be405['blobs']){const _0x4ec6e1=_0x1b65f1[_0x359289(0x3a4)](_0x1b65f1['dirname'](_0x34c5f9),_0x359289(0x506));process[_0x359289(0x559)][_0x359289(0x4ae)]('[okdb]\x20exporting\x20blobs…');const {count:_0x47987d,bytes:_0x1cdadf}=await _0x26c496[_0x359289(0x5bb)]['exportBlobs'](_0x4ec6e1);console[_0x359289(0x4f7)](_0x359289(0x645)+_0x4ec6e1+_0x359289(0x129)+_0x47987d+_0x359289(0x186)+(_0x47987d!==0x1?'s':'')+',\x20'+(_0x1cdadf/0x400/0x400)[_0x359289(0x4a8)](0x2)+_0x359289(0x440));}await _0x26c496['close'](),console[_0x359289(0x4f7)](_0x359289(0x370));}async function _0x58e636(_0x5e67b7,_0xdc6aa5,_0x2613fd){const _0x541a65=_0x2feb2b,_0xadc158=require$$5,_0x3c1c57=_0x1b65f1[_0x541a65(0x4a1)](_0xdc6aa5['dbPath']),_0x39ce2e=_0x2613fd['env']??null,_0x4f8b81=_0x2613fd['types']?_0x2613fd[_0x541a65(0x161)][_0x541a65(0x37c)](',')[_0x541a65(0x601)](_0x19d7f3=>_0x19d7f3[_0x541a65(0x486)]()):null,_0x838679=!!_0x2613fd['drop'];console['log'](_0x541a65(0x1cb)+_0x3c1c57+'…');const _0x45f7b0=new _0xadc158(_0x3c1c57,_0xdc6aa5[_0x541a65(0x174)]?{'encryptionKey':_0xdc6aa5['key']}:{});await _0x45f7b0[_0x541a65(0x18d)](),console[_0x541a65(0x4f7)](_0x541a65(0x44e)+_0x5e67b7+'…');const _0x414bcd=await _0x45f7b0['migrate'][_0x541a65(0x63d)](_0x5e67b7,{'envName':_0x39ce2e,'types':_0x4f8b81,'dropExisting':_0x838679,'includeChanges':!!_0x2613fd[_0x541a65(0x669)],'onProgress':({type:_0x17bdb8,count:_0x392269})=>{const _0x5a8233=_0x541a65;process[_0x5a8233(0x559)]['write'](_0x5a8233(0x351)+_0x17bdb8+':\x20'+_0x392269+_0x5a8233(0x218));}});process['stdout']['write']('\x0a'),console['log'](_0x541a65(0x125)+_0x414bcd[_0x541a65(0x161)]+_0x541a65(0x321)+_0x414bcd[_0x541a65(0x520)]+_0x541a65(0x2d1)+_0x414bcd['changes']);if(_0x2613fd[_0x541a65(0x506)]){const _0x42d906=_0x1b65f1[_0x541a65(0x3a4)](_0x1b65f1[_0x541a65(0x43e)](_0x5e67b7),_0x541a65(0x506));if(_0x56a80a[_0x541a65(0x5ee)](_0x42d906)){const {imported:_0x52cbe4,skipped:_0x2457c0}=await _0x45f7b0['migrate']['importBlobs'](_0x42d906);console[_0x541a65(0x4f7)](_0x541a65(0x1f6)+_0x52cbe4+_0x541a65(0x282)+_0x2457c0);}}await _0x45f7b0[_0x541a65(0x241)](),console[_0x541a65(0x4f7)](_0x541a65(0x2c6));}async function _0x3217eb(_0x59dddb,_0x584e4b){const _0x1e5644=_0x2feb2b;_0x584e4b[_0x1e5644(0x46f)]&&!_0x584e4b[_0x1e5644(0x2cc)]&&(console[_0x1e5644(0x31b)](_0x1e5644(0x273)),process[_0x1e5644(0x542)](0x1));const _0x5c842a=_0x584e4b[_0x1e5644(0x3f3)]?_0x584e4b[_0x1e5644(0x3f3)]['split'](',')[_0x1e5644(0x601)](_0x2d5616=>_0x2d5616[_0x1e5644(0x486)]())[_0x1e5644(0x1c6)](Boolean):[];let _0xf5f55f={};if(_0x584e4b['grants'])try{_0xf5f55f=JSON[_0x1e5644(0x34f)](_0x584e4b['grants']);if(typeof _0xf5f55f!=='object'||Array[_0x1e5644(0x579)](_0xf5f55f)||_0xf5f55f===null)throw new Error();}catch{console[_0x1e5644(0x31b)](_0x1e5644(0x2b6)),process[_0x1e5644(0x542)](0x1);}const _0x21e0a6=require$$5,{randomToken:_0x318445,hashToken:_0x23c126,hashPassword:_0x28c77b}=requireOkdbAuthTokens(),_0x3830ad=require$$2,_0xdd64c8=_0x1b65f1['resolve'](_0x59dddb[_0x1e5644(0x64c)]),_0x830200=new _0x21e0a6(_0xdd64c8,_0x59dddb['key']?{'encryptionKey':_0x59dddb[_0x1e5644(0x174)]}:{});await _0x830200[_0x1e5644(0x18d)]();try{await _0x830200[_0x1e5644(0x37d)][_0x1e5644(0x1e6)]();if(_0x584e4b[_0x1e5644(0x2cc)]){const _0x19e6b2=await _0x830200[_0x1e5644(0x37d)][_0x1e5644(0x2df)](_0x584e4b[_0x1e5644(0x2cc)]);_0x19e6b2&&(console[_0x1e5644(0x31b)](_0x1e5644(0x39d)+_0x584e4b['name']+_0x1e5644(0x43d)),process[_0x1e5644(0x542)](0x1));}const _0xf1f171=_0x318445(0x20),_0x5713f5=_0x23c126(_0xf1f171),_0x2d4d2c=_0x584e4b[_0x1e5644(0x46f)]?await _0x28c77b(_0x584e4b[_0x1e5644(0x46f)]):null,_0xdffca4=_0x3830ad[_0x1e5644(0x3ba)](),_0x217149={'tokenHash':_0x5713f5,'name':_0x584e4b[_0x1e5644(0x2cc)]||null,'passwordHash':_0x2d4d2c,'label':_0x584e4b[_0x1e5644(0x508)]||null,'permissions':_0x5c842a,'grants':_0xf5f55f,'createdAt':Date[_0x1e5644(0x16a)](),'lastUsedAt':null},_0x5538f8=_0x584e4b[_0x1e5644(0x4a7)]?{'ttl':Number(_0x584e4b[_0x1e5644(0x4a7)])}:undefined;await _0x830200['_systemEnv']['put'](_0x1e5644(0x471),_0xdffca4,_0x217149,_0x5538f8),console['log'](_0x1e5644(0x183)),console[_0x1e5644(0x4f7)](_0x1e5644(0x621)+_0xdffca4),console['log']('\x20\x20\x20\x20name:\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x584e4b[_0x1e5644(0x2cc)]||_0x1e5644(0x406))),console[_0x1e5644(0x4f7)]('\x20\x20\x20\x20label:\x20\x20\x20\x20\x20\x20\x20'+(_0x584e4b[_0x1e5644(0x508)]||_0x1e5644(0x406))),console[_0x1e5644(0x4f7)](_0x1e5644(0x3ac)+(_0x5c842a[_0x1e5644(0x3a4)](',\x20')||_0x1e5644(0x1da))),console['log'](_0x1e5644(0x4b3)),console[_0x1e5644(0x4f7)](_0x1e5644(0x3cf)+_0xf1f171+'\x0a');}finally{await _0x830200[_0x1e5644(0x241)]();}}async function _0x21c86d(_0x27c195){const _0x5421bb=_0x2feb2b,_0x3dd9df=require$$5,_0x8140b9=_0x1b65f1['resolve'](_0x27c195['dbPath']),_0x4a761a=new _0x3dd9df(_0x8140b9,_0x27c195[_0x5421bb(0x174)]?{'encryptionKey':_0x27c195[_0x5421bb(0x174)]}:{});await _0x4a761a['open']();try{const _0x44fc96=_0x4a761a[_0x5421bb(0x18f)];if(!_0x44fc96||!_0x44fc96['hasType'](_0x5421bb(0x471))){console[_0x5421bb(0x4f7)](_0x5421bb(0x2fe));return;}const _0x23f114=[];for(const {key:_0x3a4ec2,value:_0x2842ee}of _0x44fc96[_0x5421bb(0x391)]('~tokens')){_0x23f114[_0x5421bb(0x614)]({'id':_0x3a4ec2,'name':_0x2842ee['name']||_0x5421bb(0x406),'label':_0x2842ee[_0x5421bb(0x508)]||_0x5421bb(0x406),'permissions':Array[_0x5421bb(0x579)](_0x2842ee[_0x5421bb(0x3f3)])?_0x2842ee[_0x5421bb(0x3f3)]['join'](','):'','created':_0x2842ee[_0x5421bb(0x375)]?new Date(_0x2842ee[_0x5421bb(0x375)])[_0x5421bb(0x4c8)]()[_0x5421bb(0x45e)](0x0,0xa):''});}if(_0x23f114[_0x5421bb(0x2eb)]===0x0){console[_0x5421bb(0x4f7)](_0x5421bb(0x2fe));return;}const _0x37f545=!process[_0x5421bb(0x559)][_0x5421bb(0x59e)]||process[_0x5421bb(0x559)][_0x5421bb(0x59e)]>=0x64,_0x301b7c=_0x37f545?0x24:0xa,_0x185908=['ID'[_0x5421bb(0x2c9)](_0x301b7c),'NAME'['padEnd'](0x10),'LABEL'[_0x5421bb(0x2c9)](0x14),'PERMISSIONS'[_0x5421bb(0x2c9)](0x14),'CREATED'][_0x5421bb(0x3a4)]('\x20\x20');console[_0x5421bb(0x4f7)]('\x0a'+_0x185908),console[_0x5421bb(0x4f7)]('-'[_0x5421bb(0x473)](_0x185908[_0x5421bb(0x2eb)]));for(const _0xfee115 of _0x23f114){const _0x474259=_0x37f545?_0xfee115['id']:_0xfee115['id'][_0x5421bb(0x45e)](0x0,0x8)+'…';console[_0x5421bb(0x4f7)]([_0x474259[_0x5421bb(0x2c9)](_0x301b7c),_0xfee115[_0x5421bb(0x2cc)][_0x5421bb(0x45e)](0x0,0x10)[_0x5421bb(0x2c9)](0x10),_0xfee115[_0x5421bb(0x508)]['slice'](0x0,0x14)[_0x5421bb(0x2c9)](0x14),_0xfee115[_0x5421bb(0x3f3)]['slice'](0x0,0x14)[_0x5421bb(0x2c9)](0x14),_0xfee115[_0x5421bb(0x2be)]][_0x5421bb(0x3a4)]('\x20\x20'));}console[_0x5421bb(0x4f7)]('');}finally{await _0x4a761a[_0x5421bb(0x241)]();}}async function _0x2e0358(_0xd6c2b8,_0x166adb){const _0x26b541=_0x2feb2b;!_0xd6c2b8&&(console[_0x26b541(0x31b)]('[okdb]\x20error:\x20revoke\x20requires\x20an\x20id\x20argument'),process[_0x26b541(0x542)](0x1));const _0x2352d4=require$$5,_0x1007dd=_0x1b65f1[_0x26b541(0x4a1)](_0x166adb[_0x26b541(0x64c)]),_0x4787ec=new _0x2352d4(_0x1007dd,_0x166adb[_0x26b541(0x174)]?{'encryptionKey':_0x166adb[_0x26b541(0x174)]}:{});await _0x4787ec[_0x26b541(0x18d)]();try{const _0x4b1c73=_0x4787ec[_0x26b541(0x18f)];(!_0x4b1c73||!_0x4b1c73['hasType'](_0x26b541(0x471)))&&(console[_0x26b541(0x31b)]('[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22'+_0xd6c2b8+'\x22'),process[_0x26b541(0x542)](0x1));let _0x17af17=null,_0x1425ce=null;const _0x3b1733=_0x4b1c73[_0x26b541(0x3aa)](_0x26b541(0x471),_0xd6c2b8);if(_0x3b1733)_0x17af17=_0xd6c2b8,_0x1425ce=_0x3b1733;else{const _0x20dda8=[];for(const {key:_0x351bbf,value:_0xd922d7}of _0x4b1c73[_0x26b541(0x391)]('~tokens')){if(_0x351bbf[_0x26b541(0x3cc)](_0xd6c2b8))_0x20dda8['push']({'key':_0x351bbf,'value':_0xd922d7});}_0x20dda8[_0x26b541(0x2eb)]===0x0&&(console[_0x26b541(0x31b)](_0x26b541(0x505)+_0xd6c2b8+'\x22'),process['exit'](0x1));if(_0x20dda8['length']>0x1){console[_0x26b541(0x31b)]('[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22'+_0xd6c2b8+_0x26b541(0x500)+_0x20dda8[_0x26b541(0x2eb)]+'\x20tokens:');for(const _0x2af5a7 of _0x20dda8){console[_0x26b541(0x31b)]('\x20\x20'+_0x2af5a7['key']+'\x20\x20(name:\x20'+(_0x2af5a7[_0x26b541(0x392)][_0x26b541(0x2cc)]||_0x26b541(0x406))+')');}process['exit'](0x1);}_0x17af17=_0x20dda8[0x0][_0x26b541(0x174)],_0x1425ce=_0x20dda8[0x0]['value'];}await _0x4b1c73['remove']('~tokens',_0x17af17),console['log'](_0x26b541(0x139)+_0x17af17+_0x26b541(0x3ae)+(_0x1425ce[_0x26b541(0x2cc)]||_0x26b541(0x406))+_0x26b541(0x4dc)+(_0x1425ce['label']||_0x26b541(0x406))+')');}finally{await _0x4787ec['close']();}}function _0x1eeb01(_0x4fefa9,_0x59ffab){const _0x56c18e=_0x2feb2b;if(!_0x4fefa9[_0x56c18e(0x377)])return _0x56c18e(0x3a9);const _0x45e678=_0x4fefa9[_0x56c18e(0x63c)];if(!_0x45e678)return _0x56c18e(0x22d);if(_0x59ffab>_0x45e678)return _0x56c18e(0x2fc);return _0x56c18e(0x22d);}function _0x581cc9(_0x37bcfc){const _0x52a0ac=_0x2feb2b;if(!_0x37bcfc||typeof _0x37bcfc!==_0x52a0ac(0x20e))return'';const _0x5c6902=Object['entries'](_0x37bcfc)[_0x52a0ac(0x1c6)](([,_0x3c7ff4])=>_0x3c7ff4)[_0x52a0ac(0x601)](([_0x3ed2a2])=>_0x3ed2a2);if(_0x5c6902[_0x52a0ac(0x2eb)]===0x0)return _0x52a0ac(0x1da);if(_0x5c6902['length']<=0x3)return _0x5c6902[_0x52a0ac(0x3a4)]('\x20');return _0x5c6902[_0x52a0ac(0x45e)](0x0,0x3)[_0x52a0ac(0x3a4)]('\x20')+('\x20+'+(_0x5c6902[_0x52a0ac(0x2eb)]-0x3));}async function _0x2c9abf(_0x31aa83){const _0x173144=_0x2feb2b,_0x595094=require$$5,_0x29b1f7=requireOkdbLicenseCodec(),{_C:_0x5c5b1a}=requireOkdbLicense(),_0x102fce=_0x1b65f1[_0x173144(0x4a1)](_0x31aa83['dbPath']),_0x467745=new _0x595094(_0x102fce,_0x31aa83[_0x173144(0x174)]?{'encryptionKey':_0x31aa83[_0x173144(0x174)]}:{});await _0x467745[_0x173144(0x18d)]();try{const _0xc195b9=_0x467745[_0x173144(0x18f)],_0x563002=_0xc195b9?.['db']?.[_0x173144(0x3aa)]?.(_0x173144(0x25e))??0x0,_0x3bcdde=[..._0x467745[_0x173144(0x5bd)][_0x173144(0x2f1)]()][_0x173144(0x1c6)](_0x4e323a=>!_0x4e323a[_0x173144(0x3cc)]('~'))[_0x173144(0x2eb)],_0x314839=_0x467745[_0x173144(0x1e7)]?.['effective'];if(_0x314839){const _0x147a8f=_0x314839['_isFree']===!![],_0x505b64=_0x147a8f?_0x173144(0x26a):_0x467745['_license'][_0x173144(0x22d)]?.[_0x173144(0x56c)]||_0x173144(0x354);console[_0x173144(0x4f7)](''),console[_0x173144(0x4f7)](_0x173144(0x1c5)+_0x505b64);const _0xa64902=_0x314839[_0x173144(0x546)]||{};if(_0xa64902['maxWrites']){const _0x22574f=Math[_0x173144(0x1df)](_0x563002/_0xa64902[_0x173144(0x178)]*0x64);console[_0x173144(0x4f7)](_0x173144(0x3ec)+_0x563002[_0x173144(0x620)]()+_0x173144(0xf0)+_0xa64902[_0x173144(0x178)][_0x173144(0x620)]()+_0x173144(0x129)+_0x22574f+'%)');}else console[_0x173144(0x4f7)](_0x173144(0x3ec)+_0x563002[_0x173144(0x620)]());_0xa64902[_0x173144(0xec)]?console[_0x173144(0x4f7)](_0x173144(0x539)+_0x3bcdde+_0x173144(0xf0)+_0xa64902[_0x173144(0xec)]):console[_0x173144(0x4f7)](_0x173144(0x539)+_0x3bcdde),_0x5c5b1a?.[_0x173144(0x10e)]&&console[_0x173144(0x4f7)](_0x173144(0x627)+_0x5c5b1a[_0x173144(0x10e)]+_0x173144(0x208));}if(!_0xc195b9||!_0xc195b9[_0x173144(0x431)](_0x173144(0x3a6))){console[_0x173144(0x4f7)](''),console[_0x173144(0x4f7)]('\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.'),console[_0x173144(0x4f7)]('');return;}const _0x22bcf9=[],_0x449f44=Date[_0x173144(0x16a)](),_0x2c17dc=_0x467745['id'],_0x3707dc=_0x173144(0x106);for(const {key:_0x58089a,value:_0x2e132f}of _0xc195b9[_0x173144(0x391)](_0x173144(0x3a6))){const _0x54f0fa=_0x2e132f[_0x173144(0xe9)]?Buffer[_0x173144(0x36d)](_0x2e132f[_0x173144(0xe9)],_0x173144(0x439)):Buffer[_0x173144(0x4fe)](0x8);let _0x573bdd='';try{_0x573bdd=_0x29b1f7[_0x173144(0x5e3)](_0x2c17dc,_0x54f0fa,_0x3707dc)[_0x173144(0x41b)];}catch{}_0x22bcf9[_0x173144(0x614)]({'id':_0x58089a,'licensee':_0x2e132f[_0x173144(0x56c)]||'','expires':_0x2e132f[_0x173144(0x63c)]?new Date(_0x2e132f[_0x173144(0x63c)])[_0x173144(0x4c8)]()[_0x173144(0x45e)](0x0,0xa):'','features':_0x581cc9(_0x2e132f[_0x173144(0x26d)]),'pin':_0x573bdd,'status':_0x1eeb01(_0x2e132f,_0x449f44)});}if(_0x22bcf9[_0x173144(0x2eb)]===0x0){console['log'](''),console[_0x173144(0x4f7)]('\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.'),console[_0x173144(0x4f7)]('');return;}const _0x295280=['\x20\x20'+'ID'[_0x173144(0x2c9)](0xe),_0x173144(0x3fc)[_0x173144(0x2c9)](0xe),_0x173144(0x2a1)[_0x173144(0x2c9)](0xc),'FEATURES'[_0x173144(0x2c9)](0x1e),_0x173144(0x36a)[_0x173144(0x2c9)](0xa),_0x173144(0x237)][_0x173144(0x3a4)]('\x20');console[_0x173144(0x4f7)]('\x0a'+_0x295280);for(const _0x357335 of _0x22bcf9){const _0x8c003e=_0x357335['id']['slice'](0x0,0x8)+'…';console[_0x173144(0x4f7)](['\x20\x20'+_0x8c003e[_0x173144(0x2c9)](0xe),_0x357335[_0x173144(0x56c)]['slice'](0x0,0xe)[_0x173144(0x2c9)](0xe),_0x357335['expires'][_0x173144(0x2c9)](0xc),_0x357335['features']['slice'](0x0,0x1e)[_0x173144(0x2c9)](0x1e),_0x357335[_0x173144(0x41b)][_0x173144(0x2c9)](0xa),_0x357335['status']][_0x173144(0x3a4)]('\x20'));}console[_0x173144(0x4f7)]('');}finally{await _0x467745['close']();}}async function _0x595de3(_0x2e957d,_0x204b71){const _0x5cceef=_0x2feb2b,_0xd9e739=require$$5,_0x36c56e=requireOkdbLicenseCodec();let _0x1a8a8c=_0x2e957d;(_0x36c56e[_0x5cceef(0x5d9)](_0x2e957d)==='path'||_0x56a80a[_0x5cceef(0x5ee)](_0x2e957d)&&_0x56a80a['statSync'](_0x2e957d)[_0x5cceef(0x4e9)]())&&(_0x1a8a8c=_0x56a80a[_0x5cceef(0xe7)](_0x2e957d,'utf8')[_0x5cceef(0x486)]());const _0x3d9d68=_0x1b65f1[_0x5cceef(0x4a1)](_0x204b71[_0x5cceef(0x64c)]),_0x2a0eb3=new _0xd9e739(_0x3d9d68,_0x204b71[_0x5cceef(0x174)]?{'encryptionKey':_0x204b71[_0x5cceef(0x174)]}:{});await _0x2a0eb3['open']();try{!_0x2a0eb3[_0x5cceef(0x1e7)]&&(console[_0x5cceef(0x31b)](_0x5cceef(0x411)),process[_0x5cceef(0x542)](0x1));let _0x133d70;try{_0x133d70=await _0x2a0eb3['_license'][_0x5cceef(0x313)](_0x1a8a8c);}catch(_0x2d6f75){console[_0x5cceef(0x31b)](_0x5cceef(0x4b6)+_0x2d6f75[_0x5cceef(0x29c)]),process[_0x5cceef(0x542)](0x1);}const _0x4faeaa=_0x2a0eb3[_0x5cceef(0x1e7)][_0x5cceef(0x23a)](),_0x4b5222=_0x4faeaa[_0x5cceef(0x29a)](_0x5df53a=>_0x5df53a[_0x5cceef(0x57a)]===_0x133d70['id'])?.[_0x5cceef(0x41b)]||'',_0x57af43=Object['entries'](_0x133d70[_0x5cceef(0x26d)]||{})[_0x5cceef(0x1c6)](([,_0x4f6d58])=>_0x4f6d58)[_0x5cceef(0x601)](([_0x2083b7])=>_0x2083b7),_0x4a7d6a=_0x133d70[_0x5cceef(0x546)]||{},_0x58afd0=[_0x4a7d6a[_0x5cceef(0xec)]?_0x5cceef(0x240)+_0x4a7d6a['envs']:null,_0x4a7d6a[_0x5cceef(0x202)]?_0x5cceef(0x4f6)+_0x4a7d6a['typesPerEnv']:null,_0x4a7d6a['syncPeers']?'peers='+_0x4a7d6a[_0x5cceef(0x1dc)]:null,_0x4a7d6a[_0x5cceef(0x178)]?_0x5cceef(0x287)+_0x4a7d6a[_0x5cceef(0x178)][_0x5cceef(0x620)]():null][_0x5cceef(0x1c6)](Boolean)['join']('\x20\x20'),_0x4d5872=_0x133d70[_0x5cceef(0x400)]===_0x36c56e[_0x5cceef(0x2ad)];console[_0x5cceef(0x4f7)]('\x0a\x20\x20✓\x20License\x20added'),console[_0x5cceef(0x4f7)](_0x5cceef(0x41a)+_0x133d70['id']),console[_0x5cceef(0x4f7)](_0x5cceef(0x364)+_0x133d70[_0x5cceef(0x56c)]),console[_0x5cceef(0x4f7)]('\x20\x20\x20\x20expires:\x20\x20\x20'+new Date(_0x133d70['expiresAt'])['toISOString']()[_0x5cceef(0x45e)](0x0,0xa)),console[_0x5cceef(0x4f7)](_0x5cceef(0x1a6)+(_0x57af43['join'](',\x20')||'(none)'));if(_0x58afd0)console['log'](_0x5cceef(0x64e)+_0x58afd0);_0x4d5872?(console[_0x5cceef(0x4f7)](_0x5cceef(0x229)),console['log']('')):(console[_0x5cceef(0x4f7)]('\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20'+_0x4b5222),console['log'](_0x5cceef(0x497)),console[_0x5cceef(0x4f7)](''),console['log'](_0x5cceef(0x1bd)),console[_0x5cceef(0x4f7)](_0x5cceef(0x53e)+_0x4b5222+_0x5cceef(0xdc)),console[_0x5cceef(0x4f7)](_0x5cceef(0x1c8)),console[_0x5cceef(0x4f7)](_0x5cceef(0x1b5)),console[_0x5cceef(0x4f7)](''));}finally{await _0x2a0eb3['close']();}}async function _0x4e05a9(_0x2744fd,_0x4ac45b){const _0x22b8b5=_0x2feb2b,_0xc3fc1d=require$$5,_0x573ee4=_0x1b65f1[_0x22b8b5(0x4a1)](_0x4ac45b[_0x22b8b5(0x64c)]),_0x25eff4=new _0xc3fc1d(_0x573ee4,_0x4ac45b[_0x22b8b5(0x174)]?{'encryptionKey':_0x4ac45b[_0x22b8b5(0x174)]}:{});await _0x25eff4[_0x22b8b5(0x18d)]();try{!_0x25eff4[_0x22b8b5(0x1e7)]&&(console[_0x22b8b5(0x31b)]('[okdb]\x20error:\x20license\x20management\x20is\x20only\x20available\x20in\x20licensed\x20builds\x20(npm\x20run\x20build:prod).'),process[_0x22b8b5(0x542)](0x1));let _0x112ab0;try{_0x112ab0=await _0x25eff4[_0x22b8b5(0x1e7)]['activateLicense'](_0x2744fd['trim']());}catch(_0x35e7ef){console[_0x22b8b5(0x31b)](_0x22b8b5(0x4b6)+_0x35e7ef[_0x22b8b5(0x29c)]),console['error'](''),console[_0x22b8b5(0x31b)](_0x22b8b5(0x4b0)),console['error'](_0x22b8b5(0x19a)),console[_0x22b8b5(0x31b)]('\x20\x20\x20\x20-\x20The\x20activation\x20token\x20was\x20issued\x20for\x20a\x20different\x20node\x20—\x20share\x20this\x20node\x27s\x20PIN\x20with\x20the\x20vendor.'),console[_0x22b8b5(0x31b)](_0x22b8b5(0x2fd)),console[_0x22b8b5(0x31b)](''),process[_0x22b8b5(0x542)](0x1);}console[_0x22b8b5(0x4f7)](_0x22b8b5(0x16c)),console[_0x22b8b5(0x4f7)](_0x22b8b5(0x41a)+_0x112ab0['id']),console[_0x22b8b5(0x4f7)]('\x20\x20\x20\x20licensee:\x20\x20'+_0x112ab0['licensee']),console[_0x22b8b5(0x4f7)](_0x22b8b5(0x571)+new Date(_0x112ab0[_0x22b8b5(0x63c)])['toISOString']()[_0x22b8b5(0x45e)](0x0,0xa)),console['log'](_0x22b8b5(0x426)),console[_0x22b8b5(0x4f7)]('');}finally{await _0x25eff4[_0x22b8b5(0x241)]();}}async function _0x56c23b(_0x16052e,_0x54622c){const _0x496b5f=_0x2feb2b;!_0x16052e&&(console['error'](_0x496b5f(0x4a6)),process[_0x496b5f(0x542)](0x1));const _0x514cfc=require$$5,_0x5042d6=requireOkdbLicenseCodec(),_0x58b713=_0x1b65f1[_0x496b5f(0x4a1)](_0x54622c[_0x496b5f(0x64c)]),_0x4e104d=new _0x514cfc(_0x58b713,_0x54622c[_0x496b5f(0x174)]?{'encryptionKey':_0x54622c[_0x496b5f(0x174)]}:{});await _0x4e104d['open']();try{const _0x248b43=_0x4e104d['_systemEnv'];(!_0x248b43||!_0x248b43['hasType'](_0x496b5f(0x3a6)))&&(console['error']('[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22'+_0x16052e+'\x22'),process[_0x496b5f(0x542)](0x1));let _0x38638f=null,_0xfbd70a=null;const _0x3b866d=_0x248b43[_0x496b5f(0x3aa)](_0x496b5f(0x3a6),_0x16052e);if(_0x3b866d)_0x38638f=_0x16052e,_0xfbd70a=_0x3b866d;else{const _0x4d3995=[];for(const {key:_0x309fd0,value:_0x2cc05a}of _0x248b43[_0x496b5f(0x391)](_0x496b5f(0x3a6))){if(_0x309fd0[_0x496b5f(0x3cc)](_0x16052e))_0x4d3995['push']({'key':_0x309fd0,'value':_0x2cc05a});}_0x4d3995[_0x496b5f(0x2eb)]===0x0&&(console[_0x496b5f(0x31b)](_0x496b5f(0x1e8)+_0x16052e+'\x22'),process[_0x496b5f(0x542)](0x1)),_0x4d3995[_0x496b5f(0x2eb)]>0x1&&(console['error']('[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22'+_0x16052e+_0x496b5f(0x500)+_0x4d3995['length']+_0x496b5f(0x175)),process['exit'](0x1)),_0x38638f=_0x4d3995[0x0][_0x496b5f(0x174)],_0xfbd70a=_0x4d3995[0x0][_0x496b5f(0x392)];}const _0x1de12b=Date[_0x496b5f(0x16a)](),_0x47f1bc=_0x1eeb01(_0xfbd70a,_0x1de12b),_0x3ebe65=_0x4e104d['id'],_0xc4be21=_0x496b5f(0x106);let _0x328628='';try{const _0x542fd7=Buffer[_0x496b5f(0x36d)](_0xfbd70a[_0x496b5f(0xe9)],'hex');_0x328628=_0x5042d6[_0x496b5f(0x5e3)](_0x3ebe65,_0x542fd7,_0xc4be21)[_0x496b5f(0x41b)];}catch{}const _0x49ea2c=_0xfbd70a[_0x496b5f(0x26d)]?Object[_0x496b5f(0x427)](_0xfbd70a[_0x496b5f(0x26d)])['filter'](([,_0x4c182d])=>_0x4c182d)[_0x496b5f(0x601)](([_0x3018bc])=>_0x3018bc):[],_0x1e6a3a=_0xfbd70a[_0x496b5f(0x546)]||{},_0x1131c8=_0x248b43?.['db']?.[_0x496b5f(0x3aa)]?.(_0x496b5f(0x25e))??0x0,_0x2b57f2=[..._0x4e104d[_0x496b5f(0x5bd)]['keys']()][_0x496b5f(0x1c6)](_0x1f68f8=>!_0x1f68f8[_0x496b5f(0x3cc)]('~'))[_0x496b5f(0x2eb)];console[_0x496b5f(0x4f7)](_0x496b5f(0x470)),console[_0x496b5f(0x4f7)](_0x496b5f(0x41a)+_0x38638f),console[_0x496b5f(0x4f7)](_0x496b5f(0x364)+(_0xfbd70a[_0x496b5f(0x56c)]||'')),console[_0x496b5f(0x4f7)](_0x496b5f(0x571)+(_0xfbd70a['expiresAt']?new Date(_0xfbd70a[_0x496b5f(0x63c)])[_0x496b5f(0x4c8)]()[_0x496b5f(0x45e)](0x0,0xa):'')),console['log'](_0x496b5f(0x1a6)+(_0x49ea2c['join'](',\x20')||_0x496b5f(0x1da))),console[_0x496b5f(0x4f7)](_0x496b5f(0x576)+_0x328628),console[_0x496b5f(0x4f7)](_0x496b5f(0x345)+_0x47f1bc),console[_0x496b5f(0x4f7)](_0x496b5f(0x46d)+new Date(_0xfbd70a[_0x496b5f(0x5c6)])[_0x496b5f(0x4c8)]());if(_0x47f1bc==='active'){console['log'](''),console[_0x496b5f(0x4f7)](_0x496b5f(0x580));if(_0x1e6a3a['maxWrites']){const _0x4a29b5=Math[_0x496b5f(0x1df)](_0x1131c8/_0x1e6a3a[_0x496b5f(0x178)]*0x64);console[_0x496b5f(0x4f7)](_0x496b5f(0x420)+_0x1131c8[_0x496b5f(0x620)]()+'\x20/\x20'+_0x1e6a3a[_0x496b5f(0x178)][_0x496b5f(0x620)]()+_0x496b5f(0x129)+_0x4a29b5+'%)');}else console[_0x496b5f(0x4f7)](_0x496b5f(0x420)+_0x1131c8['toLocaleString']()+'\x20\x20(unlimited)');_0x1e6a3a['envs']?console[_0x496b5f(0x4f7)](_0x496b5f(0x27c)+_0x2b57f2+_0x496b5f(0xf0)+_0x1e6a3a[_0x496b5f(0xec)]):console[_0x496b5f(0x4f7)]('\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20'+_0x2b57f2+_0x496b5f(0x4e8));}console[_0x496b5f(0x4f7)]('');}finally{await _0x4e104d[_0x496b5f(0x241)]();}}async function _0x5d17e7(_0x45bd23,_0x40eff9){const _0x496960=_0x2feb2b;!_0x45bd23&&(console['error']('[okdb]\x20error:\x20remove\x20requires\x20an\x20id\x20argument'),process[_0x496960(0x542)](0x1));const _0x3df4f6=require$$5,_0xd5bade=_0x1b65f1[_0x496960(0x4a1)](_0x40eff9[_0x496960(0x64c)]),_0xd0295f=new _0x3df4f6(_0xd5bade,_0x40eff9['key']?{'encryptionKey':_0x40eff9[_0x496960(0x174)]}:{});await _0xd0295f[_0x496960(0x18d)]();try{const _0x3c91fe=_0xd0295f[_0x496960(0x18f)];(!_0x3c91fe||!_0x3c91fe[_0x496960(0x431)](_0x496960(0x3a6)))&&(console[_0x496960(0x31b)](_0x496960(0x1e8)+_0x45bd23+'\x22'),process[_0x496960(0x542)](0x1));let _0x46dfad=null,_0xcb9448=null;const _0x460282=_0x3c91fe[_0x496960(0x3aa)]('~licenses',_0x45bd23);if(_0x460282)_0x46dfad=_0x45bd23,_0xcb9448=_0x460282;else{const _0x30b505=[];for(const {key:_0x17eb85,value:_0x379dd8}of _0x3c91fe[_0x496960(0x391)](_0x496960(0x3a6))){if(_0x17eb85[_0x496960(0x3cc)](_0x45bd23))_0x30b505[_0x496960(0x614)]({'key':_0x17eb85,'value':_0x379dd8});}_0x30b505[_0x496960(0x2eb)]===0x0&&(console[_0x496960(0x31b)]('[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22'+_0x45bd23+'\x22'),process[_0x496960(0x542)](0x1)),_0x30b505[_0x496960(0x2eb)]>0x1&&(console[_0x496960(0x31b)]('[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22'+_0x45bd23+_0x496960(0x500)+_0x30b505['length']+_0x496960(0x175)),process[_0x496960(0x542)](0x1)),_0x46dfad=_0x30b505[0x0][_0x496960(0x174)],_0xcb9448=_0x30b505[0x0][_0x496960(0x392)];}await _0x3c91fe[_0x496960(0x1b1)](_0x496960(0x3a6),_0x46dfad),console[_0x496960(0x4f7)](_0x496960(0x16b)+_0x46dfad+_0x496960(0x443)+(_0xcb9448[_0x496960(0x56c)]||_0x496960(0x406))+')');}finally{await _0xd0295f[_0x496960(0x241)]();}}async function _0x1da8e5(_0x554add,_0x4cd400,_0x10c82d){const _0x4896ec=_0x2feb2b;!_0x554add&&(console[_0x4896ec(0x31b)](_0x4896ec(0x27d)),process[_0x4896ec(0x542)](0x1));!_0x10c82d[_0x4896ec(0x359)]&&!(_0x10c82d[_0x4896ec(0x112)]&&_0x10c82d[_0x4896ec(0x46f)])&&(console['error'](_0x4896ec(0x4e4)),process['exit'](0x1));const _0x2d9d87=_0x10c82d[_0x4896ec(0x5d5)]||_0x4cd400[_0x4896ec(0x32d)]?.[_0x4896ec(0x47f)];!_0x2d9d87&&(console[_0x4896ec(0x31b)](_0x4896ec(0x385)+'\x20\x20Example:\x20okdb\x20join\x20https://node-a.example.com\x20--token\x20<t>\x20--address\x20http://myhost:8484\x0a'+_0x4896ec(0x64b)),process[_0x4896ec(0x542)](0x1));const _0x96f882=require$$5,_0x9a78d0=new _0x96f882(_0x4cd400[_0x4896ec(0x64c)],{'sync':{'address':_0x2d9d87,'auto_reconcile':![]}});await _0x9a78d0[_0x4896ec(0x18d)]();try{const _0x3559ea=_0x9a78d0[_0x4896ec(0x18f)];if(_0x3559ea&&_0x3559ea['hasType'](_0x4896ec(0x471))){let _0x29871f=![];for(const _0x327bcd of _0x3559ea[_0x4896ec(0x391)](_0x4896ec(0x471))){_0x29871f=!![];break;}_0x29871f&&console['log'](_0x4896ec(0x588)+_0x4896ec(0x3fb));}console[_0x4896ec(0x4f7)](_0x4896ec(0x3fe)+_0x554add+'…'),await _0x9a78d0[_0x4896ec(0x32d)][_0x4896ec(0x3a4)](_0x554add['replace'](/\/+$/,''),{'token':_0x10c82d[_0x4896ec(0x359)],'username':_0x10c82d[_0x4896ec(0x112)],'password':_0x10c82d[_0x4896ec(0x46f)]}),console[_0x4896ec(0x4f7)](_0x4896ec(0x4ce)),console[_0x4896ec(0x4f7)](_0x4896ec(0x4f1));}finally{await _0x9a78d0[_0x4896ec(0x241)]();}}async function _0x508cad(){const _0x183505=_0x2feb2b,_0x2792ff=Date[_0x183505(0x16a)](),_0x3dfbf5=_0x4f700b(process[_0x183505(0x290)]),_0x1dded1=_0x58293d(_0x3dfbf5),_0x40578e=_0x1b65f1[_0x183505(0x4a1)](_0x1dded1[_0x183505(0x64c)]);!_0x1dded1['noRepl']&&!process[_0x183505(0x61c)][_0x183505(0x52b)]&&(_0x1dded1[_0x183505(0x2bd)]=!![]);const _0x1adc04=require$$5,{start:_0x226790,colorLog:_0x4d883a}=requireOkdbShell(),_0x46ba31=require$$1$2,_0x144a5={..._0x1dded1[_0x183505(0x174)]?{'encryptionKey':_0x1dded1['key']}:{},..._0x1dded1[_0x183505(0x673)]?{'admin':![]}:_0x2b35c1(_0x1dded1[_0x183505(0x27f)])?{'admin':_0x1dded1['admin']}:{},..._0x2b35c1(_0x1dded1[_0x183505(0x60f)])?{'api':_0x1dded1[_0x183505(0x60f)]}:{},..._0x2b35c1(_0x1dded1[_0x183505(0x37d)])?{'auth':_0x1dded1['auth']}:{},..._0x2b35c1(_0x1dded1['mcp'])?{'mcp':_0x1dded1[_0x183505(0x32b)]}:{},..._0x1dded1[_0x183505(0x232)]!==![]?{'timeMachine':_0x1dded1['timeMachine']}:{}},_0x43bbbe=_0x2c44bd(_0x1dded1);if(!_0x46ba31[_0x183505(0x60c)]){const _0x5caf19=_0x4b1d13(),_0x2b5083=_0x1dded1[_0x183505(0x289)]?_0x183505(0x300):_0x1dded1[_0x183505(0x194)]!=null&&_0x1dded1['workersFlag']!==''?_0x183505(0x102):process.env.OKDB_HTTP_WORKERS?_0x183505(0x4ef):_0x1dded1[_0x183505(0x5d0)]?.['workers']!=null?_0x183505(0x189):_0x183505(0x46b)+Math[_0x183505(0x47e)](0x1,require$$0['cpus']()[_0x183505(0x2eb)]-0x1);process['stdout'][_0x183505(0x4ae)](_0x183505(0x23d)+_0x43bbbe+'\x20('+_0x2b5083+(!_0x5caf19?_0x183505(0x63b):'')+')\x0a');}if(_0x46ba31[_0x183505(0x60c)]){const _0x3b7da6={..._0x144a5,'engines':![],'asyncProcessors':![],'compaction':_0x183505(0x573),'bus':!![]},_0x53d82b=new _0x1adc04(_0x40578e,_0x3b7da6);_0x53d82b['log']['detachConsole']?.();const _0x12bbea=process.env.OKDB_CLUSTER_SLOT??'?',_0x3dd986={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x34b7f0=_0x3dd986[_0x1dded1[_0x183505(0x45d)]]??_0x3dd986[_0x183505(0x3d7)];_0x53d82b[_0x183505(0x4f7)][_0x183505(0x649)](_0x40964c=>{const _0x188fb0=_0x183505;if((_0x3dd986[_0x40964c[_0x188fb0(0x294)]]??0x1)<_0x34b7f0)return;try{process[_0x188fb0(0x270)]?.({'__okdbCluster':_0x188fb0(0x4f7),'slot':_0x12bbea,'pid':process[_0x188fb0(0x3e7)],'entry':_0x40964c});}catch{}}),await _0x53d82b['open']();const {attachWorkerCluster:_0x383239}=requireOkdbCluster();_0x383239(_0x53d82b),await _0x47de7d(_0x53d82b,_0x1dded1[_0x183505(0x26f)]);return;}if(_0x43bbbe>0x1){const _0x2efce5=requireOkdbHttp(),_0x3a4707=new _0x2efce5(),_0x4a4128=new _0x1adc04(_0x40578e,_0x144a5);await _0x4a4128[_0x183505(0x18d)]();const _0x31c885=async()=>{const _0x6e1ad9=_0x183505,_0x725ef1={..._0x144a5,'engines':![],'asyncProcessors':![],'compaction':_0x6e1ad9(0x573),'bus':!![]},_0x4316f7=new _0x1adc04(_0x40578e,_0x725ef1);return await _0x4316f7[_0x6e1ad9(0x18d)](),_0x4316f7;},_0x2a773a=_0x3a4707[_0x183505(0x31f)](_0x1dded1[_0x183505(0x26f)],{'workers':_0x43bbbe,'makeOkdb':_0x31c885,'primaryOkdb':_0x4a4128});let _0x476897=![];async function _0x304e73(_0x178a13){const _0x2469c6=_0x183505;_0x476897&&(process['stderr'][_0x2469c6(0x4ae)](_0x2469c6(0x180)),process[_0x2469c6(0x542)](0x82));_0x476897=!![],process['stderr'][_0x2469c6(0x4ae)]('\x0a[okdb]\x20received\x20'+(_0x178a13||_0x2469c6(0x2d9))+_0x2469c6(0x13d));const _0x35a565=setTimeout(()=>{const _0x37443a=_0x2469c6;process[_0x37443a(0x16f)]['write'](_0x37443a(0xe6)),process[_0x37443a(0x542)](0x0);},0xbb8);_0x35a565[_0x2469c6(0x386)]?.();try{await _0x2a773a[_0x2469c6(0x241)]();}catch(_0x3670ff){process[_0x2469c6(0x16f)][_0x2469c6(0x4ae)](_0x2469c6(0x4aa)+(_0x3670ff?.['message']??_0x3670ff)+'\x0a');}try{await _0x4a4128[_0x2469c6(0x241)]();}catch(_0x44b80d){process[_0x2469c6(0x16f)][_0x2469c6(0x4ae)](_0x2469c6(0x3e0)+(_0x44b80d?.[_0x2469c6(0x29c)]??_0x44b80d)+'\x0a');}process[_0x2469c6(0x542)](0x0);}_0x1dded1[_0x183505(0x52c)]=_0x43bbbe;if(!_0x1dded1[_0x183505(0x2bd)]){_0x4a4128['log'][_0x183505(0x222)]?.(),_0x5b43a0(_0x4a4128[_0x183505(0x37d)]?.[_0x183505(0x1f2)]?.()??[]),await _0x226790(_0x4a4128,_0x1dded1);return;}process[_0x183505(0x559)][_0x183505(0x4ae)]('[okdb]\x20cluster\x20primary\x20pid='+process[_0x183505(0x3e7)]+':\x20processor\x20(HTTP-silent),\x20'+_0x43bbbe+'\x20'+(_0x183505(0x4ec)+_0x1dded1[_0x183505(0x26f)]+'\x0a')),console[_0x183505(0x4f7)](''),console[_0x183505(0x4f7)](_0x183505(0x41c)),console[_0x183505(0x4f7)](_0x183505(0x4fa)+_0x1dded1[_0x183505(0x26f)]+_0x183505(0x129)+_0x43bbbe+_0x183505(0x220)),console[_0x183505(0x4f7)](_0x183505(0x531)+_0x40578e),console[_0x183505(0x4f7)](_0x183505(0x2e0)+_0x4a4128['id']),console[_0x183505(0x4f7)](_0x183505(0x3f5)+_0x1dded1[_0x183505(0x26f)]+'/api');!_0x1dded1['noAdmin']&&console[_0x183505(0x4f7)](_0x183505(0x387)+_0x1dded1[_0x183505(0x26f)]+_0x183505(0x61f));console[_0x183505(0x4f7)](''),_0x5b43a0(_0x4a4128[_0x183505(0x37d)]?.[_0x183505(0x1f2)]?.()??[]),process['on']('SIGINT',()=>_0x304e73(_0x183505(0x53b))),process['on']('SIGTERM',()=>_0x304e73(_0x183505(0x61a))),process['on'](_0x183505(0x5e7),()=>_0x304e73('SIGBREAK'));return;}const _0x395adb=new _0x1adc04(_0x40578e,_0x144a5);_0x395adb[_0x183505(0x4f7)][_0x183505(0x222)]?.();const _0x36c564=_0x395adb[_0x183505(0x4f7)][_0x183505(0x649)](_0x122b18=>_0x4d883a(_0x122b18,_0x1dded1[_0x183505(0x45d)]));if(_0x1dded1[_0x183505(0x2bd)])process[_0x183505(0x559)]['write'](_0x183505(0x57c));await _0x395adb['open']();if(_0x1dded1[_0x183505(0x2bd)])process[_0x183505(0x559)][_0x183505(0x4ae)](_0x183505(0x5cd));try{await _0x47de7d(_0x395adb,_0x1dded1['port']);}catch(_0x2b99ee){_0x2b99ee[_0x183505(0x60e)]===_0x183505(0x2c8)&&(console[_0x183505(0x31b)](_0x183505(0x65a)+_0x1dded1[_0x183505(0x26f)]+_0x183505(0x4c0)),process[_0x183505(0x542)](0x1));throw _0x2b99ee;}if(_0x1dded1[_0x183505(0x2bd)])process[_0x183505(0x559)][_0x183505(0x4ae)](_0x183505(0x611)+_0x1dded1[_0x183505(0x26f)]+'\x0a');if(!_0x1dded1[_0x183505(0x2bd)])_0x395adb[_0x183505(0x4f7)]['detachConsole']?.(),_0x36c564?.(),_0x5b43a0(_0x395adb['auth']?.['getSecurityNotices']?.()??[]),await _0x226790(_0x395adb,_0x1dded1);else{const _0x523df3=_0x1b65f1[_0x183505(0x3a4)](_0x40578e,_0x183505(0x661));try{_0x56a80a[_0x183505(0x59d)](_0x523df3,String(process[_0x183505(0x3e7)]));}catch{}const _0x3259f2=Date[_0x183505(0x16a)]()-_0x2792ff;console[_0x183505(0x4f7)](''),console[_0x183505(0x4f7)](_0x183505(0x2ab)),console[_0x183505(0x4f7)](_0x183505(0x357)+_0x1dded1[_0x183505(0x26f)]),console[_0x183505(0x4f7)]('\x20\x20\x20\x20path:\x20\x20'+_0x40578e),console[_0x183505(0x4f7)]('\x20\x20\x20\x20id:\x20\x20\x20\x20'+_0x395adb['id']);{const _0xf315dd=_0x395adb[_0x183505(0x18f)]?.['db']?.[_0x183505(0x3aa)]?.(_0x183505(0x25e))??0x0,_0x2b7ea0=[..._0x395adb[_0x183505(0x5bd)][_0x183505(0x2f1)]()][_0x183505(0x1c6)](_0x2288fe=>!_0x2288fe[_0x183505(0x3cc)]('~'))[_0x183505(0x2eb)];if(_0x395adb[_0x183505(0x1e7)]?.['active']?.['licenseType']===0x1){const _0x1ac8f0=Math[_0x183505(0x602)]((_0x395adb[_0x183505(0x1e7)][_0x183505(0x22d)]['expiresAt']-Date[_0x183505(0x16a)]())/0x5265c00);console[_0x183505(0x4f7)]('\x20\x20\x20\x20license:\x20⚠\x20OPEN\x20—\x20'+_0x395adb['_license'][_0x183505(0x22d)][_0x183505(0x56c)]+_0x183505(0x2b3)+_0x1ac8f0+_0x183505(0x340));}else{if(_0x395adb[_0x183505(0x1e7)]?.[_0x183505(0x22d)]){const _0x5b1f38=_0x395adb['_license'][_0x183505(0x22d)];console[_0x183505(0x4f7)](_0x183505(0x59c)+_0x5b1f38[_0x183505(0x56c)]+_0x183505(0x2fa)+new Date(_0x5b1f38[_0x183505(0x63c)])[_0x183505(0x4c8)]()['slice'](0x0,0xa)+')');const _0x27f171=_0x5b1f38[_0x183505(0x546)]||{};if(_0x27f171[_0x183505(0x178)]){const _0x4e0c8e=Math[_0x183505(0x1df)](_0xf315dd/_0x27f171[_0x183505(0x178)]*0x64);console['log'](_0x183505(0x4e2)+_0xf315dd[_0x183505(0x620)]()+_0x183505(0xf0)+_0x27f171[_0x183505(0x178)][_0x183505(0x620)]()+_0x183505(0x39e)+_0x4e0c8e+_0x183505(0x24b)+_0x2b7ea0+(_0x27f171[_0x183505(0xec)]?'/'+_0x27f171[_0x183505(0xec)]:'')+_0x183505(0x20d)+(_0x2b7ea0===0x1?'':'s'));}}else{if(_0x395adb[_0x183505(0x1e7)]){const _0x34fb0f=_0x395adb[_0x183505(0x1e7)][_0x183505(0x23a)](),_0xafcaca=_0x34fb0f['length']?_0x34fb0f['map'](_0x1551c5=>_0x1551c5[_0x183505(0x41b)])[_0x183505(0x3a4)](',\x20'):'(add\x20a\x20license\x20first)',_0x198d4d=_0x395adb[_0x183505(0x1e7)]['effective'],_0x8b65c9=_0x198d4d['limits']['maxWrites']?Math['round'](_0xf315dd/_0x198d4d['limits'][_0x183505(0x178)]*0x64):0x0;console[_0x183505(0x4f7)](_0x183505(0x60a)),console[_0x183505(0x4f7)](_0x183505(0x4e2)+_0xf315dd[_0x183505(0x620)]()+_0x183505(0xf0)+_0x198d4d[_0x183505(0x546)]['maxWrites'][_0x183505(0x620)]()+_0x183505(0x39e)+_0x8b65c9+_0x183505(0x24b)+_0x2b7ea0+_0x183505(0xf0)+_0x198d4d[_0x183505(0x546)][_0x183505(0xec)]+_0x183505(0x21a)),console[_0x183505(0x4f7)](_0x183505(0x4cc)+_0xafcaca);}}}}console[_0x183505(0x4f7)]('\x20\x20\x20\x20api:\x20\x20\x20http://localhost:'+_0x1dded1[_0x183505(0x26f)]+_0x183505(0x253));!_0x1dded1[_0x183505(0x673)]&&console[_0x183505(0x4f7)]('\x20\x20\x20\x20admin:\x20http://localhost:'+_0x1dded1[_0x183505(0x26f)]+'/admin/index.html');console[_0x183505(0x4f7)](''),console[_0x183505(0x4f7)](_0x183505(0x44d)+_0x3259f2+'ms'),_0x5b43a0(_0x395adb['auth']?.[_0x183505(0x1f2)]?.()??[]);let _0x54fbeb=![];async function _0x4b2b2a(_0x22f448){const _0x39fbca=_0x183505;_0x54fbeb&&(process[_0x39fbca(0x16f)]['write'](_0x39fbca(0x180)),process[_0x39fbca(0x542)](0x82));_0x54fbeb=!![],process[_0x39fbca(0x16f)][_0x39fbca(0x4ae)](_0x39fbca(0x57e)+(_0x22f448||_0x39fbca(0x2d9))+_0x39fbca(0x33d));const _0x179129=setTimeout(()=>{const _0x5a0177=_0x39fbca;process[_0x5a0177(0x16f)][_0x5a0177(0x4ae)](_0x5a0177(0x281)),process[_0x5a0177(0x542)](0x1);},0x1388);try{_0x56a80a[_0x39fbca(0x207)](_0x523df3);}catch{}try{await _0x395adb['close']();}catch(_0x4b89bf){process[_0x39fbca(0x16f)][_0x39fbca(0x4ae)](_0x39fbca(0xf3)+(_0x4b89bf?.[_0x39fbca(0x29c)]??_0x4b89bf)+'\x0a');}clearTimeout(_0x179129),process[_0x39fbca(0x16f)][_0x39fbca(0x4ae)]('[okdb]\x20closed\x20cleanly\x0a'),process[_0x39fbca(0x542)](0x0);}process['on'](_0x183505(0x53b),()=>_0x4b2b2a(_0x183505(0x53b))),process['on'](_0x183505(0x61a),()=>_0x4b2b2a(_0x183505(0x61a))),process['on'](_0x183505(0x5e7),()=>_0x4b2b2a('SIGBREAK'));}}const _0x1482fe=new Set([_0x2feb2b(0x2ea),'doctor','init','backup',_0x2feb2b(0x2d6),_0x2feb2b(0x634),'reset',_0x2feb2b(0x359),'join',_0x2feb2b(0x58c)]),_0x584a2f=process[_0x2feb2b(0x290)][0x2];if(_0x584a2f===_0x2feb2b(0x2ea))console[_0x2feb2b(0x4f7)](require$$3[_0x2feb2b(0x2ea)]),process[_0x2feb2b(0x542)](0x0);else{if(_0x584a2f&&_0x1482fe[_0x2feb2b(0x39f)](_0x584a2f)){const _0x1932e0=process['argv'][_0x2feb2b(0x45e)](0x3),_0x2523dd=_0x4f700b([_0x2feb2b(0x3fa),_0x2feb2b(0x2d3),..._0x1932e0]),_0x11abeb=_0x58293d(_0x2523dd),_0x27e279=new Set([_0x2feb2b(0x1fe),'-d','--key','-k',_0x2feb2b(0x5b3),'-c','--port','-p',_0x2feb2b(0x417),_0x2feb2b(0x3c4),'-e',_0x2feb2b(0x66a),'--name','--password',_0x2feb2b(0x160),_0x2feb2b(0x53f),_0x2feb2b(0x58e),_0x2feb2b(0x5f4),_0x2feb2b(0x3e8),_0x2feb2b(0x463),'-u',_0x2feb2b(0x2d2)]);let _0x15f6f4=null;for(let _0x1a5c9b=0x0;_0x1a5c9b<_0x1932e0['length'];_0x1a5c9b++){if(_0x27e279[_0x2feb2b(0x39f)](_0x1932e0[_0x1a5c9b])){_0x1a5c9b++;continue;}if(!_0x1932e0[_0x1a5c9b][_0x2feb2b(0x3cc)]('-')){_0x15f6f4=_0x1932e0[_0x1a5c9b];break;}}(async()=>{const _0x53bdce=_0x2feb2b;if(_0x584a2f===_0x53bdce(0x359)){const _0xf734da=process['argv'][0x3],_0x2e8c81=process[_0x53bdce(0x290)]['slice'](0x4),_0x1e9039=_0x4f700b([_0x53bdce(0x3fa),_0x53bdce(0x2d3),..._0x2e8c81]),_0x287f08=_0x58293d(_0x1e9039),_0x5a5036=new Set(['--path','-d',_0x53bdce(0x231),'-k',_0x53bdce(0x5b3),'-c',_0x53bdce(0x322),'-p','--name',_0x53bdce(0x3d6),_0x53bdce(0x160),_0x53bdce(0x53f),_0x53bdce(0x58e),_0x53bdce(0x5f4),'--log-level',_0x53bdce(0x3c4),'-e',_0x53bdce(0x66a)]),_0x317a64=[];for(let _0xd4187e=0x0;_0xd4187e<_0x2e8c81[_0x53bdce(0x2eb)];_0xd4187e++){if(_0x5a5036[_0x53bdce(0x39f)](_0x2e8c81[_0xd4187e])){_0xd4187e++;continue;}if(_0x2e8c81[_0xd4187e][_0x53bdce(0x3cc)]('-'))continue;_0x317a64['push'](_0x2e8c81[_0xd4187e]);}switch(_0xf734da){case _0x53bdce(0x495):await _0x3217eb(_0x287f08,_0x1e9039);break;case _0x53bdce(0x25b):await _0x21c86d(_0x287f08);break;case _0x53bdce(0x338):await _0x2e0358(_0x317a64[0x0],_0x287f08);break;default:console[_0x53bdce(0x31b)](_0x53bdce(0x349)+_0xf734da+_0x53bdce(0x169)),process[_0x53bdce(0x542)](0x1);}return;}if(_0x584a2f==='license'){const _0x4c4573=requireOkdbLicenseCodec(),_0x251df0=process[_0x53bdce(0x290)][_0x53bdce(0x45e)](0x3),_0x3c8575=_0x4f700b([_0x53bdce(0x3fa),'okdb',..._0x251df0]),_0x412e5e=_0x58293d(_0x3c8575),_0xe065d7=new Set(['--path','-d',_0x53bdce(0x231),'-k',_0x53bdce(0x5b3),'-c',_0x53bdce(0x322),'-p','--log-level']),_0x2882f7=[];for(let _0x142229=0x0;_0x142229<_0x251df0[_0x53bdce(0x2eb)];_0x142229++){if(_0xe065d7[_0x53bdce(0x39f)](_0x251df0[_0x142229])){_0x142229++;continue;}if(_0x251df0[_0x142229][_0x53bdce(0x3cc)]('-'))continue;_0x2882f7[_0x53bdce(0x614)](_0x251df0[_0x142229]);}const _0x4489e2=_0x2882f7[0x0]??null;if(_0x4489e2===_0x53bdce(0x1b1))await _0x5d17e7(_0x2882f7[0x1],_0x412e5e);else{if(!_0x4489e2)await _0x2c9abf(_0x412e5e);else{let _0x46e21c=_0x4c4573['detectInputType'](_0x4489e2);if(_0x46e21c===_0x53bdce(0x326)&&_0x56a80a[_0x53bdce(0x5ee)](_0x4489e2))_0x46e21c='path';if(_0x46e21c===_0x53bdce(0x42d))try{const _0x4195a4=_0x56a80a[_0x53bdce(0xe7)](_0x4489e2,_0x53bdce(0x365))[_0x53bdce(0x486)](),_0x52ab52=_0x4c4573[_0x53bdce(0x5d9)](_0x4195a4);if(_0x52ab52===_0x53bdce(0x377)){await _0x4e05a9(_0x4195a4,_0x412e5e);return;}await _0x595de3(_0x4489e2,_0x412e5e);return;}catch(_0x87ab15){console[_0x53bdce(0x31b)]('[okdb]\x20error:\x20failed\x20to\x20read\x20'+_0x4489e2+':\x20'+_0x87ab15[_0x53bdce(0x29c)]),process[_0x53bdce(0x542)](0x1);}switch(_0x46e21c){case _0x53bdce(0x1d8):await _0x595de3(_0x4489e2,_0x412e5e);break;case _0x53bdce(0x377):await _0x4e05a9(_0x4489e2,_0x412e5e);break;case _0x53bdce(0x134):await _0x56c23b(_0x4489e2,_0x412e5e);break;default:console[_0x53bdce(0x31b)](_0x53bdce(0x2b2)+_0x4489e2+'\x22'),console[_0x53bdce(0x31b)](''),console[_0x53bdce(0x31b)](_0x53bdce(0xff)),console[_0x53bdce(0x31b)]('\x20\x20\x20\x20•\x20a\x20license\x20blob\x20\x20\x20(Crockford\x20base32,\x20~150–250\x20chars)'),console[_0x53bdce(0x31b)]('\x20\x20\x20\x20•\x20an\x20activation\x20token\x20\x20(124\x20chars)'),console[_0x53bdce(0x31b)](_0x53bdce(0xee)),console['error'](_0x53bdce(0x617)),console[_0x53bdce(0x31b)](''),console[_0x53bdce(0x31b)](_0x53bdce(0x4fb)),process[_0x53bdce(0x542)](0x1);}}}return;}switch(_0x584a2f){case _0x53bdce(0x498):await _0x3a8f5c(_0x11abeb);break;case'init':await _0x35ffc0();break;case _0x53bdce(0x1c2):await _0x44b834(_0x11abeb);break;case _0x53bdce(0x329):await _0x1eecf7(_0x15f6f4??_0x1b65f1[_0x53bdce(0x4a1)](_0x53bdce(0x40e)),_0x11abeb);break;case'export':await _0x27c3f3(_0x15f6f4??_0x1b65f1['resolve'](_0x53bdce(0x33a)),_0x11abeb,_0x2523dd);break;case _0x53bdce(0x634):await _0x58e636(_0x15f6f4??_0x1b65f1[_0x53bdce(0x4a1)](_0x53bdce(0x33a)),_0x11abeb,_0x2523dd);break;case'join':await _0x1da8e5(_0x15f6f4,_0x11abeb,_0x2523dd);break;}})()['then'](()=>process['exit'](0x0))[_0x2feb2b(0x255)](_0x3ae1c8=>{const _0x5dcbb8=_0x2feb2b;console[_0x5dcbb8(0x31b)](_0x5dcbb8(0x628)+(_0x3ae1c8[_0x5dcbb8(0x29c)]||_0x3ae1c8)+'\x0a'),process[_0x5dcbb8(0x542)](0x1);});}else _0x508cad()[_0x2feb2b(0x255)](_0x15cf91=>{const _0x1bc5ef=_0x2feb2b;console[_0x1bc5ef(0x31b)](_0x1bc5ef(0x10d)),console[_0x1bc5ef(0x31b)](_0x15cf91[_0x1bc5ef(0x1f3)]||_0x15cf91),process[_0x1bc5ef(0x542)](0x1);});}return okdb$1;}var okdbExports=requireOkdb(),okdb=getDefaultExportFromCjs(okdbExports);module[_0x4b361c(0x1b3)]=okdb;