@kedem/okdb 1.8.2 → 1.8.3

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 (3) hide show
  1. package/bin/okdb.js +1 -1
  2. package/okdb.js +1 -1
  3. package/package.json +1 -1
package/bin/okdb.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- 'use strict';const _0x1a8470=_0x50b0;(function(_0x4bb8d5,_0x55e8b4){const _0x46dd29=_0x50b0,_0xc851b5=_0x4bb8d5();while(!![]){try{const _0x4c4aa8=-parseInt(_0x46dd29(0x479))/0x1+-parseInt(_0x46dd29(0x275))/0x2+-parseInt(_0x46dd29(0x236))/0x3+-parseInt(_0x46dd29(0x1b6))/0x4+-parseInt(_0x46dd29(0x414))/0x5*(-parseInt(_0x46dd29(0x1b1))/0x6)+-parseInt(_0x46dd29(0x3b6))/0x7*(parseInt(_0x46dd29(0x368))/0x8)+-parseInt(_0x46dd29(0x208))/0x9*(-parseInt(_0x46dd29(0x3b5))/0xa);if(_0x4c4aa8===_0x55e8b4)break;else _0xc851b5['push'](_0xc851b5['shift']());}catch(_0x56e869){_0xc851b5['push'](_0xc851b5['shift']());}}}(_0x4181,0x1e8ef));var require$$1$1=require(_0x1a8470(0x31b)),require$$1=require('fs'),require$$3=require(_0x1a8470(0x43e)),require$$0$2=require('readline'),require$$5=require(_0x1a8470(0x3a9)),require$$0=require('crypto'),require$$0$1=require(_0x1a8470(0x477)),require$$2$1=require('os'),require$$4=require('child_process');function getDefaultExportFromCjs(_0x1407a9){const _0x276e4c=_0x1a8470;return _0x1407a9&&_0x1407a9[_0x276e4c(0x1c0)]&&Object[_0x276e4c(0x3f1)][_0x276e4c(0x1f6)]['call'](_0x1407a9,'default')?_0x1407a9['default']:_0x1407a9;}var okdb$1={},version=_0x1a8470(0x282),require$$2={'version':version},okdbAuthTokens,hasRequiredOkdbAuthTokens;function requireOkdbAuthTokens(){if(hasRequiredOkdbAuthTokens)return okdbAuthTokens;hasRequiredOkdbAuthTokens=0x1;const _0x4346ab=require$$0;function _0x3419ab(_0x515660,_0x41d322){const _0xa07c66=_0x50b0;return _0x4346ab[_0xa07c66(0x2d4)](_0xa07c66(0x43f),_0x41d322)[_0xa07c66(0x3bb)](_0x515660)[_0xa07c66(0x1d7)]('base64url');}function _0x13e30d(_0x2b6262,_0x2f0080){const _0x219fbd=_0x50b0;if(typeof _0x2b6262!=='string'||typeof _0x2f0080!==_0x219fbd(0x2c0))return![];if(Buffer[_0x219fbd(0x321)](_0x2b6262)!==Buffer['byteLength'](_0x2f0080))return![];return _0x4346ab[_0x219fbd(0x34e)](Buffer[_0x219fbd(0x41c)](_0x2b6262),Buffer[_0x219fbd(0x41c)](_0x2f0080));}function _0x1a693c(_0x5853bd){const _0x31f053=_0x50b0;if(!_0x5853bd?.[_0x31f053(0x3ae)](_0x31f053(0x386)))return null;return _0x5853bd[_0x31f053(0x2da)](0x7);}function _0x182884(_0xd54e31=0x20){const _0x479f5b=_0x50b0;return _0x4346ab[_0x479f5b(0x24a)](_0xd54e31)[_0x479f5b(0x450)](_0x479f5b(0x284));}function _0x337ab6(_0x41b901){const _0x2034dd=_0x50b0;return _0x4346ab[_0x2034dd(0x333)]('sha256')[_0x2034dd(0x3bb)](_0x41b901)[_0x2034dd(0x1d7)](_0x2034dd(0x1da));}function _0xaa8479(_0x3c89e6,_0x432617,_0x5e4ba5=0x36ee80){const _0x14ec82=_0x50b0;if(!_0x432617)throw new Error(_0x14ec82(0x363));const _0x285068=Date[_0x14ec82(0x495)](),_0xd22e00=Buffer[_0x14ec82(0x41c)](JSON[_0x14ec82(0x1c6)]({'iat':_0x285068,'exp':_0x285068+_0x5e4ba5,'sub':_0x3c89e6?.['id']??_0x3c89e6?.[_0x14ec82(0x28f)]??null,'username':_0x3c89e6?.[_0x14ec82(0x367)]??_0x3c89e6?.[_0x14ec82(0x307)]??null,'roles':Array['isArray'](_0x3c89e6?.[_0x14ec82(0x28c)])?_0x3c89e6[_0x14ec82(0x28c)]:[]}))['toString'](_0x14ec82(0x284)),_0x121e22=_0x3419ab(_0xd22e00,_0x432617);return _0xd22e00+'.'+_0x121e22;}function _0x2b9e34(_0x629e4d,_0x35e5f6){const _0x49c224=_0x50b0;if(!_0x35e5f6||typeof _0x629e4d!==_0x49c224(0x2c0))return null;const [_0x24db64,_0x2e0146]=_0x629e4d[_0x49c224(0x23a)]('.');if(!_0x24db64||!_0x2e0146)return null;const _0x404440=_0x3419ab(_0x24db64,_0x35e5f6);if(!_0x13e30d(_0x2e0146,_0x404440))return null;try{const _0x58a974=JSON['parse'](Buffer[_0x49c224(0x41c)](_0x24db64,_0x49c224(0x284))[_0x49c224(0x450)]()),_0x53ba83=0x7530;if(Date['now']()>Number(_0x58a974?.[_0x49c224(0x2e5)]??0x0)+_0x53ba83)return null;return _0x58a974;}catch{return null;}}async function _0x2c0428(_0x1ac9ba){return new Promise((_0x42b275,_0x4eba37)=>{const _0x36a40c=_0x50b0,_0x526086=_0x4346ab[_0x36a40c(0x24a)](0x10);_0x4346ab[_0x36a40c(0x41f)](_0x1ac9ba,_0x526086,0x40,(_0x3d0843,_0xa08d78)=>{const _0x5d05e8=_0x36a40c;if(_0x3d0843)_0x4eba37(_0x3d0843);_0x42b275(_0x526086[_0x5d05e8(0x450)](_0x5d05e8(0x1da))+':'+_0xa08d78[_0x5d05e8(0x450)](_0x5d05e8(0x1da)));});});}async function _0x5c8055(_0x41313a,_0x1f44dc){const _0x1fb29f=_0x50b0,[_0x16d050,_0x2fdd73]=_0x1f44dc[_0x1fb29f(0x23a)](':');if(!_0x16d050||!_0x2fdd73)return![];const _0xa80c2=Buffer['from'](_0x16d050,_0x1fb29f(0x1da));return new Promise((_0x125585,_0x2b7177)=>{const _0x169cbb=_0x1fb29f;_0x4346ab[_0x169cbb(0x41f)](_0x41313a,_0xa80c2,0x40,(_0x46bcb9,_0x7417c)=>{const _0xdd8cbd=_0x169cbb;if(_0x46bcb9)_0x2b7177(_0x46bcb9);_0x125585(_0x4346ab['timingSafeEqual'](_0x7417c,Buffer[_0xdd8cbd(0x41c)](_0x2fdd73,'hex')));});});}return okdbAuthTokens={'hmac':_0x3419ab,'timingSafeEqual':_0x13e30d,'parseBearer':_0x1a693c,'randomToken':_0x182884,'hashToken':_0x337ab6,'issueToken':_0xaa8479,'authenticateToken':_0x2b9e34,'hashPassword':_0x2c0428,'verifyPassword':_0x5c8055},okdbAuthTokens;}var okdbLicenseCodec,hasRequiredOkdbLicenseCodec;function requireOkdbLicenseCodec(){const _0x4fd16d=_0x1a8470;if(hasRequiredOkdbLicenseCodec)return okdbLicenseCodec;hasRequiredOkdbLicenseCodec=0x1;const _0x957a7e=require$$0$1,_0x4287e0=_0x4fd16d(0x269),_0x428df5=new Uint8Array(0x100)['fill'](0xff);for(let _0x12f13c=0x0;_0x12f13c<_0x4287e0[_0x4fd16d(0x2bd)];_0x12f13c++){_0x428df5[_0x4287e0[_0x4fd16d(0x223)](_0x12f13c)]=_0x12f13c,_0x428df5[_0x4287e0[_0x4fd16d(0x223)](_0x12f13c)+0x20]=_0x12f13c;}_0x428df5['O'['charCodeAt'](0x0)]=0x0,_0x428df5['o'[_0x4fd16d(0x223)](0x0)]=0x0,_0x428df5['I'[_0x4fd16d(0x223)](0x0)]=0x1,_0x428df5['i'[_0x4fd16d(0x223)](0x0)]=0x1,_0x428df5['L'['charCodeAt'](0x0)]=0x1,_0x428df5['l'[_0x4fd16d(0x223)](0x0)]=0x1;function _0xe3b9f9(_0x16f221){let _0x1367f2=0x0,_0x4604ce=0x0,_0xcfb807='';for(let _0x409cf6=0x0;_0x409cf6<_0x16f221['length'];_0x409cf6++){_0x4604ce=_0x4604ce<<0x8|_0x16f221[_0x409cf6],_0x1367f2+=0x8;while(_0x1367f2>=0x5){_0x1367f2-=0x5,_0xcfb807+=_0x4287e0[_0x4604ce>>>_0x1367f2&0x1f];}}return _0x1367f2>0x0&&(_0xcfb807+=_0x4287e0[_0x4604ce<<0x5-_0x1367f2&0x1f]),_0xcfb807;}function _0x215a94(_0x4bfb39){const _0x24f28c=_0x4fd16d;_0x4bfb39=_0x4bfb39[_0x24f28c(0x426)](/-/g,'')['toUpperCase']();let _0x1e4c13=0x0,_0x26b1de=0x0;const _0x315b88=[];for(let _0x37feea=0x0;_0x37feea<_0x4bfb39[_0x24f28c(0x2bd)];_0x37feea++){const _0x3e174b=_0x428df5[_0x4bfb39[_0x24f28c(0x223)](_0x37feea)];if(_0x3e174b===0xff)continue;_0x26b1de=_0x26b1de<<0x5|_0x3e174b,_0x1e4c13+=0x5,_0x1e4c13>=0x8&&(_0x1e4c13-=0x8,_0x315b88[_0x24f28c(0x365)](_0x26b1de>>>_0x1e4c13&0xff));}return Buffer[_0x24f28c(0x41c)](_0x315b88);}const _0x309ac5=[_0x4fd16d(0x2e3),'embeddings','engines',_0x4fd16d(0x432),'timeMachine',_0x4fd16d(0x2d9),_0x4fd16d(0x2c4),_0x4fd16d(0x3a8)],_0x1d466=0x0,_0x3b6ee4=0x1,_0x28d445=0x2,_0x18a026=0x6*0x1e*0x18*0x3c*0x3c*0x3e8;function _0x9dad89({issuedAt:_0x4d850b,expiresAt:_0x5fb296,licensee:licensee='',features:features={},limits:limits={},licenseType:licenseType=_0x1d466}){const _0x59b963=_0x4fd16d,_0x255c24=Buffer['from'](licensee,_0x59b963(0x391))[_0x59b963(0x2da)](0x0,0x40),_0x119331=0x1+0x1+0x4+0x4+0x1+_0x255c24[_0x59b963(0x2bd)]+0x2+0x10,_0x4deb5b=Buffer[_0x59b963(0x201)](_0x119331);let _0x47c8f8=0x0;_0x4deb5b[_0x59b963(0x3ca)](0x1,_0x47c8f8++),_0x4deb5b[_0x59b963(0x3ca)](licenseType,_0x47c8f8++),_0x4deb5b[_0x59b963(0x30c)](Math[_0x59b963(0x39b)](_0x4d850b/0x3e8),_0x47c8f8),_0x47c8f8+=0x4,_0x4deb5b[_0x59b963(0x30c)](Math[_0x59b963(0x39b)](_0x5fb296/0x3e8),_0x47c8f8),_0x47c8f8+=0x4,_0x4deb5b[_0x59b963(0x3ca)](_0x255c24[_0x59b963(0x2bd)],_0x47c8f8++),_0x255c24[_0x59b963(0x47f)](_0x4deb5b,_0x47c8f8),_0x47c8f8+=_0x255c24[_0x59b963(0x2bd)];let _0x57dab3=0x0;for(let _0x702bae=0x0;_0x702bae<_0x309ac5[_0x59b963(0x2bd)];_0x702bae++){if(features[_0x309ac5[_0x702bae]])_0x57dab3|=0x1<<_0x702bae;}_0x4deb5b[_0x59b963(0x23f)](_0x57dab3,_0x47c8f8),_0x47c8f8+=0x2;const _0x2181b8=[_0x59b963(0x2b3),'typesPerEnv','syncPeers','maxWrites'];for(const _0x4cec37 of _0x2181b8){_0x4deb5b['writeUInt32BE'](limits[_0x4cec37]||0x0,_0x47c8f8),_0x47c8f8+=0x4;}return _0x4deb5b;}function _0x327cd7(_0x3bc134){const _0x43780f=_0x4fd16d;let _0x3078b6=0x0;const _0xbad967=_0x3bc134[_0x43780f(0x435)](_0x3078b6++),_0x5b52e3=_0x3bc134[_0x43780f(0x435)](_0x3078b6++),_0x3da56a=_0x3bc134[_0x43780f(0x1d2)](_0x3078b6);_0x3078b6+=0x4;const _0x4a9571=_0x3bc134[_0x43780f(0x1d2)](_0x3078b6);_0x3078b6+=0x4;const _0x59f73f=_0x3bc134[_0x43780f(0x435)](_0x3078b6++),_0x459847=_0x3bc134['slice'](_0x3078b6,_0x3078b6+_0x59f73f)[_0x43780f(0x450)](_0x43780f(0x391));_0x3078b6+=_0x59f73f;const _0xf00e4b=_0x3bc134['readUInt16BE'](_0x3078b6);_0x3078b6+=0x2;const _0x376b2f={};for(let _0x28e35f=0x0;_0x28e35f<_0x309ac5['length'];_0x28e35f++){_0x376b2f[_0x309ac5[_0x28e35f]]=Boolean(_0xf00e4b&0x1<<_0x28e35f);}const _0x5eb9b2=[_0x43780f(0x2b3),_0x43780f(0x3b7),_0x43780f(0x419),_0x43780f(0x36c)],_0xfb908f={};for(const _0x3fe9cc of _0x5eb9b2){const _0x3514ad=_0x3bc134[_0x43780f(0x1d2)](_0x3078b6);_0x3078b6+=0x4,_0xfb908f[_0x3fe9cc]=_0x3514ad===0x0?null:_0x3514ad;}return{'v':_0xbad967,'licenseType':_0x5b52e3,'issuedAt':_0x3da56a*0x3e8,'expiresAt':_0x4a9571*0x3e8,'licensee':_0x459847,'features':_0x376b2f,'limits':_0xfb908f};}function _0x1d5ca2(_0x28612e,_0x3eb3ac){const _0x1536ff=_0x4fd16d,_0x26a2bd=Buffer[_0x1536ff(0x2cd)]([_0x28612e,_0x3eb3ac]),_0x4a2300=_0xe3b9f9(_0x26a2bd),_0x9782f0=[];for(let _0x1a6d21=0x0;_0x1a6d21<_0x4a2300[_0x1536ff(0x2bd)];_0x1a6d21+=0x8){_0x9782f0[_0x1536ff(0x365)](_0x4a2300[_0x1536ff(0x2da)](_0x1a6d21,_0x1a6d21+0x8));}return _0x9782f0[_0x1536ff(0x475)]('-');}function _0x4f3535(_0x219610){const _0x1ab63d=_0x4fd16d;if(typeof _0x219610!==_0x1ab63d(0x2c0))throw new Error(_0x1ab63d(0x25e));const _0x39bd05=_0x215a94(_0x219610[_0x1ab63d(0x426)](/-/g,''));if(_0x39bd05['length']<0x41)throw new Error(_0x1ab63d(0x3d9)+_0x39bd05[_0x1ab63d(0x2bd)]+'\x20bytes,\x20need\x20>=\x2065)');const _0x37f582=_0x39bd05[_0x1ab63d(0x2da)](0x0,_0x39bd05['length']-0x40),_0x17fa1c=_0x39bd05[_0x1ab63d(0x2da)](_0x39bd05['length']-0x40);let _0x1753cc;try{_0x1753cc=_0x327cd7(_0x37f582);}catch(_0x47eb60){throw new Error(_0x1ab63d(0x445)+_0x47eb60[_0x1ab63d(0x2b8)]);}return{'rawBuf':_0x39bd05,'payload':_0x37f582,'sig':_0x17fa1c,'decoded':_0x1753cc};}function _0x174396(_0x509fe7){const _0x1a5f68=_0x4fd16d;return _0x957a7e['createHash'](_0x1a5f68(0x43f))[_0x1a5f68(0x3bb)](_0x509fe7)[_0x1a5f68(0x1d7)]()[_0x1a5f68(0x2da)](0x0,0x8);}function _0x593782(_0x17c4a1,_0x908289,_0x8ff9ec){const _0x24f2eb=_0x4fd16d,_0x2095ce=_0x24f2eb(0x49a)+_0x8ff9ec,_0x5954df=Buffer[_0x24f2eb(0x2cd)]([Buffer['from'](_0x17c4a1,_0x24f2eb(0x391)),_0x908289]),_0x4d1b97=_0x957a7e['createHmac'](_0x24f2eb(0x43f),_0x2095ce)[_0x24f2eb(0x3bb)](_0x5954df)[_0x24f2eb(0x1d7)](),_0x110938=_0xe3b9f9(_0x4d1b97[_0x24f2eb(0x2da)](0x0,0x5));return{'pin':_0x110938,'pinHmac':_0x4d1b97};}function _0x414812(_0x342320,_0x20e6d1,_0x138dbf){const _0x5b4c2c=_0x4fd16d,_0x7458cd=Buffer[_0x5b4c2c(0x201)](0x4d);let _0x129c6c=0x0;_0x7458cd[_0x5b4c2c(0x3ca)](0x1,_0x129c6c++),_0x342320[_0x5b4c2c(0x47f)](_0x7458cd,_0x129c6c),_0x129c6c+=0x8,_0x7458cd[_0x5b4c2c(0x30c)](_0x20e6d1,_0x129c6c),_0x129c6c+=0x4,_0x138dbf[_0x5b4c2c(0x47f)](_0x7458cd,_0x129c6c);const _0x2f98c3=_0xe3b9f9(_0x7458cd),_0x156679=[];for(let _0x26ab0f=0x0;_0x26ab0f<_0x2f98c3['length'];_0x26ab0f+=0x6){_0x156679[_0x5b4c2c(0x365)](_0x2f98c3['slice'](_0x26ab0f,_0x26ab0f+0x6));}return _0x156679[_0x5b4c2c(0x475)]('-');}function _0x52cb7f(_0x2af397){const _0x17a735=_0x4fd16d;if(typeof _0x2af397!==_0x17a735(0x2c0))throw new Error(_0x17a735(0x347));const _0x3617c5=_0x215a94(_0x2af397[_0x17a735(0x426)](/-/g,''));if(_0x3617c5[_0x17a735(0x2bd)]!==0x4d)throw new Error(_0x17a735(0x1ef)+_0x3617c5[_0x17a735(0x2bd)]);let _0x5510bb=0x0;const _0x3fd225=_0x3617c5['readUInt8'](_0x5510bb++),_0x46c973=_0x3617c5[_0x17a735(0x2da)](_0x5510bb,_0x5510bb+0x8);_0x5510bb+=0x8;const _0x38eff6=_0x3617c5[_0x17a735(0x1d2)](_0x5510bb);_0x5510bb+=0x4;const _0x5d02e0=_0x3617c5['slice'](_0x5510bb);return{'v':_0x3fd225,'licenseHash':_0x46c973,'expiry':_0x38eff6,'sig':_0x5d02e0};}function _0x4d27cf({tokenString:_0x420c02,nodeId:_0x5d9813,rawBlobBuf:_0x2b9a16,pubKeyPem:_0x92ef94,pubFingerprint:_0x539156}){const _0xa60f63=_0x4fd16d;let _0x9bf5fe;try{_0x9bf5fe=_0x52cb7f(_0x420c02);}catch(_0x5ea11c){return{'valid':![],'reason':_0xa60f63(0x2f2)};}const _0x5841db=_0x174396(_0x2b9a16);if(!_0x5841db[_0xa60f63(0x238)](_0x9bf5fe['licenseHash']))return{'valid':![],'reason':_0xa60f63(0x3e3)};const {pinHmac:_0x44bc74}=_0x593782(_0x5d9813,_0x5841db,_0x539156),_0x328711=Buffer['allocUnsafe'](0x4);_0x328711[_0xa60f63(0x30c)](_0x9bf5fe[_0xa60f63(0x357)],0x0);const _0x2c289f=Buffer[_0xa60f63(0x2cd)]([Buffer['from']([_0x9bf5fe['v']]),_0x44bc74['slice'](0x0,0x5),_0x9bf5fe[_0xa60f63(0x319)],_0x328711]);try{const _0x262569=_0x957a7e[_0xa60f63(0x2fb)](null,_0x2c289f,_0x92ef94,_0x9bf5fe[_0xa60f63(0x21d)]);if(!_0x262569)return{'valid':![],'reason':'SIG_INVALID'};}catch(_0x3cfd4c){return{'valid':![],'reason':_0xa60f63(0x28a)};}if(_0x9bf5fe[_0xa60f63(0x357)]<Date['now']()/0x3e8)return{'valid':![],'reason':_0xa60f63(0x476)};return{'valid':!![],'reason':'ok'};}function _0x352b73(_0x5ebc7e){const _0x5e9aa1=_0x4fd16d;if(typeof _0x5ebc7e!=='string')return _0x5e9aa1(0x2d3);const _0x33caf5=_0x5ebc7e[_0x5e9aa1(0x42a)]();if(_0x33caf5[_0x5e9aa1(0x3ae)]('/')||_0x33caf5[_0x5e9aa1(0x3ae)]('./')||_0x33caf5[_0x5e9aa1(0x3ae)]('../')||/^[A-Za-z]:[\\/]/[_0x5e9aa1(0x23e)](_0x33caf5))return'path';if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i[_0x5e9aa1(0x23e)](_0x33caf5))return'uuid';const _0x3eec24=_0x33caf5[_0x5e9aa1(0x426)](/[\s-]+/g,'')['length'];if(_0x3eec24===0x7c)return _0x5e9aa1(0x26e);if(_0x3eec24>=0x95&&_0x3eec24<=0xfc)return _0x5e9aa1(0x1ed);return _0x5e9aa1(0x2d3);}return okdbLicenseCodec={'toBase32':_0xe3b9f9,'fromBase32':_0x215a94,'encodeLicensePayload':_0x9dad89,'decodeLicensePayload':_0x327cd7,'encodeLicenseBlob':_0x1d5ca2,'decodeLicenseBlob':_0x4f3535,'licenseHash':_0x174396,'derivePin':_0x593782,'encodeActivationToken':_0x414812,'decodeActivationToken':_0x52cb7f,'verifyActivation':_0x4d27cf,'detectInputType':_0x352b73,'FEATURE_NAMES':_0x309ac5,'LICENSE_TYPE_STANDARD':_0x1d466,'LICENSE_TYPE_OPEN':_0x3b6ee4,'LICENSE_TYPE_INTERNAL':_0x28d445,'OPEN_LICENSE_MAX_DURATION_MS':_0x18a026},okdbLicenseCodec;}var okdbError,hasRequiredOkdbError;function requireOkdbError(){if(hasRequiredOkdbError)return okdbError;hasRequiredOkdbError=0x1;class _0x1e9f00 extends Error{constructor(_0x5873d7,_0x4e4eb3,_0x30ef07={}){const _0x44ce0e=_0x50b0;super(_0x5873d7),this['name']=_0x44ce0e(0x329),this[_0x44ce0e(0x2f4)]=_0x4e4eb3,this[_0x44ce0e(0x2e0)]=_0x30ef07,_0x30ef07[_0x44ce0e(0x237)]&&(this['cause']=_0x30ef07[_0x44ce0e(0x237)]),Error[_0x44ce0e(0x42b)](this,this[_0x44ce0e(0x1c8)]);}}class _0x1b330b extends _0x1e9f00{constructor(_0x16f530,_0x1d14d3,_0x3e0a27,_0x61101){const _0x6c77fb=_0x50b0;super(_0x6c77fb(0x2ce)+_0x16f530+'@'+_0x1d14d3+_0x6c77fb(0x30d)+_0x3e0a27+_0x6c77fb(0x40b)+_0x61101,_0x6c77fb(0x3e4),{'type':_0x16f530,'key':_0x1d14d3,'expectedVersion':_0x3e0a27,'actualVersion':_0x61101}),this[_0x6c77fb(0x307)]=_0x6c77fb(0x235);}}class _0x164cbf extends _0x1e9f00{constructor(_0x33f8a6,_0x49c446){const _0x5c1c57=_0x50b0;super(_0x33f8a6+'@'+_0x49c446+_0x5c1c57(0x26b),'NOT_FOUND',{'type':_0x33f8a6,'key':_0x49c446}),this[_0x5c1c57(0x307)]='OKDBNotFoundError';}}class _0x17d7d9 extends _0x1e9f00{constructor(_0x42b239,_0x327416){const _0x1f3624=_0x50b0;super(_0x42b239+'@'+_0x327416+_0x1f3624(0x1f5),'ALREADY_EXISTS',{'type':_0x42b239,'key':_0x327416}),this['name']=_0x1f3624(0x1e4);}}class _0x63a9fa extends _0x1e9f00{constructor(_0x253ffd,_0x5aa19a){const _0x3b5bce=_0x50b0,_0x24b2e0=typeof _0x5aa19a;super(_0x3b5bce(0x1cd)+_0x253ffd+'\x27:\x20'+_0x24b2e0+_0x3b5bce(0x45e)+_0x5aa19a,_0x3b5bce(0x331),{'index':_0x253ffd,'key':_0x5aa19a,'keyType':_0x24b2e0}),this[_0x3b5bce(0x307)]='OKDBInvalidIndexKeyError';}}class _0x5ab677 extends _0x1e9f00{constructor(_0x2eb92e){const _0x17dfba=_0x50b0,_0x3a3d1f=typeof _0x2eb92e;super(_0x17dfba(0x3b9)+_0x3a3d1f+'.\x20Primary\x20keys\x20must\x20be\x20string\x20or\x20number.\x20Got:\x20'+_0x2eb92e,'INVALID_PRIMARY_KEY',{'key':_0x2eb92e,'keyType':_0x3a3d1f}),this[_0x17dfba(0x307)]=_0x17dfba(0x33d);}}class _0xb5c55c extends _0x1e9f00{constructor(_0x4f3811){const _0x5d1067=_0x50b0;super('Type\x20\x27'+_0x4f3811+_0x5d1067(0x3da),_0x5d1067(0x2fc),{'type':_0x4f3811}),this[_0x5d1067(0x307)]='OKDBTypeNotRegisteredError';}}class _0x452b50 extends _0x1e9f00{constructor(_0x336320){const _0x2369ef=_0x50b0;super(_0x2369ef(0x425)+_0x336320+_0x2369ef(0x3b0),'TYPE_ALREADY_REGISTERED',{'type':_0x336320}),this[_0x2369ef(0x307)]=_0x2369ef(0x280);}}class _0x5f2df6 extends _0x1e9f00{constructor(_0x32140e,_0x76de6e){const _0x13dfdf=_0x50b0;super(_0x13dfdf(0x374)+_0x76de6e+_0x13dfdf(0x263)+_0x32140e+_0x13dfdf(0x3da),_0x13dfdf(0x2f9),{'type':_0x32140e,'index':_0x76de6e}),this[_0x13dfdf(0x307)]='OKDBIndexNotRegisteredError';}}class _0x59c7b7 extends _0x1e9f00{constructor(_0x239377,_0x4ae8a1){const _0x268044=_0x50b0;super(_0x268044(0x374)+_0x4ae8a1+'\x27\x20on\x20type\x20\x27'+_0x239377+_0x268044(0x295),'INDEX_ALREADY_REGISTERED',{'type':_0x239377,'index':_0x4ae8a1}),this[_0x268044(0x307)]=_0x268044(0x44b);}}class _0x2bcd0a extends _0x1e9f00{constructor(_0x4091b9,_0x58543e={}){const _0x30579e=_0x50b0;super(_0x4091b9,_0x30579e(0x249),_0x58543e),this[_0x30579e(0x307)]=_0x30579e(0x371);}}class _0x3c9caf extends _0x1e9f00{constructor(_0x2d9b4f,_0x4cd82c,_0x2dbc71,_0x5c398f,_0x5b0c17){const _0x3c0517=_0x50b0;super(_0x3c0517(0x1d9)+_0x2d9b4f+'@'+_0x4cd82c+_0x3c0517(0x381)+_0x2dbc71+']\x20already\x20maps\x20to\x20\x27'+_0x5c398f+_0x3c0517(0x322)+_0x5b0c17+'\x27',_0x3c0517(0x231),{'type':_0x2d9b4f,'index':_0x4cd82c,'indexKey':_0x2dbc71,'existingKey':_0x5c398f,'conflictingKey':_0x5b0c17}),this[_0x3c0517(0x307)]=_0x3c0517(0x47c);}}class _0xf6a6da extends _0x1e9f00{constructor(_0x5e04ea,_0x1cbc8e,_0x14d0f0){const _0x58d995=_0x50b0;super(_0x58d995(0x330)+_0x5e04ea+'@'+_0x1cbc8e,'SCHEMA_VALIDATION_FAILED',{'type':_0x5e04ea,'key':_0x1cbc8e,'errors':_0x14d0f0}),this[_0x58d995(0x307)]='OKDBSchemaValidationError',this[_0x58d995(0x43a)]=_0x5e04ea,this[_0x58d995(0x325)]=_0x1cbc8e,this[_0x58d995(0x239)]=_0x14d0f0;}}class _0x24811a extends _0x1e9f00{constructor(_0x371a7d,_0x329a22){const _0x289bad=_0x50b0;super(_0x289bad(0x276)+_0x371a7d+':\x20'+_0x329a22[_0x289bad(0x2bd)]+'\x20documents\x20fail\x20validation',_0x289bad(0x27c),{'type':_0x371a7d,'failures':_0x329a22}),this['name']='OKDBSchemaCollectionError',this[_0x289bad(0x43a)]=_0x371a7d,this[_0x289bad(0x1b7)]=_0x329a22;}}class _0x21fd4f extends _0x1e9f00{constructor(_0x378940,_0x3a9794,_0xdb5f14,_0x4bdec2,_0x50635c){const _0x45777e=_0x50b0;super(_0x45777e(0x2bc)+_0x378940+'@'+_0x3a9794+'.'+_0xdb5f14+_0x45777e(0x225)+_0x4bdec2+'@'+_0x50635c+'\x20which\x20does\x20not\x20exist','FOREIGN_KEY_VIOLATION',{'sourceType':_0x378940,'sourceKey':_0x3a9794,'fieldPath':_0xdb5f14,'targetType':_0x4bdec2,'targetKey':_0x50635c}),this[_0x45777e(0x307)]=_0x45777e(0x306),this[_0x45777e(0x310)]=_0x378940,this[_0x45777e(0x21a)]=_0x3a9794,this['fieldPath']=_0xdb5f14,this[_0x45777e(0x2d0)]=_0x4bdec2,this[_0x45777e(0x1bb)]=_0x50635c;}}class _0xb441e4 extends _0x1e9f00{constructor(_0x1ee1c7,_0x4e1ab0,_0x461207){const _0x503bd9=_0x50b0;super('Cannot\x20delete\x20'+_0x1ee1c7+'@'+_0x4e1ab0+':\x20'+_0x461207[_0x503bd9(0x2bd)]+'\x20document(s)\x20reference\x20it\x20with\x20onDelete:restrict','FOREIGN_KEY_DELETE_RESTRICTED',{'targetType':_0x1ee1c7,'targetKey':_0x4e1ab0,'references':_0x461207}),this[_0x503bd9(0x307)]=_0x503bd9(0x2f7),this['targetType']=_0x1ee1c7,this[_0x503bd9(0x1bb)]=_0x4e1ab0,this['references']=_0x461207;}}class _0x490dc3 extends _0x1e9f00{constructor(_0x1fe4b0,_0x4bc156,_0x8cd602){const _0x538c60=_0x50b0;super(_0x538c60(0x3ee)+_0x4bc156+_0x538c60(0x1f1)+_0x1fe4b0+_0x538c60(0x302)+_0x8cd602[_0x538c60(0x3a3)](_0x48a527=>_0x48a527[_0x538c60(0x1f4)]+':'+_0x48a527[_0x538c60(0x307)])[_0x538c60(0x475)](',\x20'),_0x538c60(0x470),{'type':_0x1fe4b0,'index':_0x4bc156,'usedBy':_0x8cd602}),this[_0x538c60(0x307)]='OKDBIndexHasConsumersError';}}return okdbError={'OKDBError':_0x1e9f00,'OKDBVersionMismatchError':_0x1b330b,'OKDBNotFoundError':_0x164cbf,'OKDBAlreadyExistsError':_0x17d7d9,'OKDBInvalidIndexKeyError':_0x63a9fa,'OKDBInvalidPrimaryKeyError':_0x5ab677,'OKDBTypeNotRegisteredError':_0xb5c55c,'OKDBTypeAlreadyRegisteredError':_0x452b50,'OKDBIndexNotRegisteredError':_0x5f2df6,'OKDBIndexAlreadyRegisteredError':_0x59c7b7,'OKDBInvalidValueError':_0x2bcd0a,'OKDBUniqueConstraintError':_0x3c9caf,'OKDBSchemaValidationError':_0xf6a6da,'OKDBSchemaCollectionError':_0x24811a,'OKDBForeignKeyError':_0x21fd4f,'OKDBForeignKeyDeleteError':_0xb441e4,'OKDBIndexHasConsumersError':_0x490dc3},okdbError;}var okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x467c1a=_0x1a8470;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x2c36e5={'PUT':_0x467c1a(0x389),'REMOVE':_0x467c1a(0x332),'INDEX_DROP':'dropIndex','INDEX_REGISTER':_0x467c1a(0x370),'INDEX_RESET':_0x467c1a(0x352),'TYPE_REGISTER':_0x467c1a(0x493),'TYPE_DROP':_0x467c1a(0x292),'FTS_REGISTER':_0x467c1a(0x2c3),'FTS_DROP':_0x467c1a(0x3b2),'FTS_RESET':_0x467c1a(0x1fc),'SCHEMA_SET':_0x467c1a(0x1f2),'SCHEMA_DROP':'dropSchema','TTL_SET':_0x467c1a(0x22e),'TTL_CLEAR':_0x467c1a(0x2c6)},_0x440b4f={'SYSTEM_READY':'system:ready','SYSTEM_STOPPED':'system:stopped','SYSTEM_CLOCK_CHANGE':'system:clock_change','SYSTEM_POKE':_0x467c1a(0x33f),'SYSTEM_DRAIN':_0x467c1a(0x2cc),'SYSTEM_BUS_STATE_CHANGE':'system:bus_state_change','ITEM_CREATE':'item:create','ITEM_UPDATE':_0x467c1a(0x3fc),'ITEM_REMOVE':_0x467c1a(0x3e6),'INDEX_RESET':'index:reset','INDEX_READY':'index:ready','INDEX_PROGRESS':'index:progress','VIEW_PROGRESS':_0x467c1a(0x240),'INDEX_DROP':_0x467c1a(0x438),'INDEX_REGISTERED':'index:registered','FTS_REGISTERED':_0x467c1a(0x228),'FTS_DROP':_0x467c1a(0x22a),'FTS_RESET':_0x467c1a(0x34a),'SCHEMA_SET':_0x467c1a(0x3dc),'SCHEMA_DROP':_0x467c1a(0x2a4),'UNIQUE_VIOLATION':_0x467c1a(0x452),'UNIQUE_VIOLATION_RESOLVED':_0x467c1a(0x3d5),'REF_VIOLATION':_0x467c1a(0x317),'REF_VIOLATION_RESOLVED':_0x467c1a(0x25b),'SYNC_APPLY':_0x467c1a(0x28e),'TXN_START':'txn:start','TXN_END':_0x467c1a(0x324),'TXN_ROLLBACK':_0x467c1a(0x1e1),'TYPE_REGISTERED':_0x467c1a(0x3a6),'TYPE_DROP':_0x467c1a(0x467),'ENV_OPENED':_0x467c1a(0x2de),'ENV_REMOVED':_0x467c1a(0x460),'TTL_EXPIRED':_0x467c1a(0x334),'TTL_SET':_0x467c1a(0x1fa),'TTL_CLEAR':_0x467c1a(0x40e),'LICENSE_INVALID':'license:invalid','LICENSE_ADDED':'license:added','LICENSE_ACTIVATED':_0x467c1a(0x447),'LICENSE_REMOVED':_0x467c1a(0x3ab)},_0x4564c8={'CREATING':_0x467c1a(0x3d3),'RESETTING':_0x467c1a(0x3eb),'READY':_0x467c1a(0x2ba),'DROPPING':_0x467c1a(0x37f),'WAITING':_0x467c1a(0x2d6)},_0x2fe94d={'CREATED':_0x467c1a(0x487),'STARTING':'starting','STARTED':_0x467c1a(0x440),'STOPPING':'stopping','STOPPED':_0x467c1a(0x1ab)},_0x5e4182={'CREATING':_0x467c1a(0x3d3),'READY':_0x467c1a(0x2ba),'HALTED':'halted','STOPPED':_0x467c1a(0x1ab),'RESETTING':'resetting'},_0x2e30e3=Object[_0x467c1a(0x1b2)]({'POKE':_0x467c1a(0x497),'DRAIN':_0x467c1a(0x1df)});return okdbEnums={'BUS_EVENTS':_0x2e30e3,'CHANGE_ACTIONS':_0x2c36e5,'EVENTS':_0x440b4f,'INDEX_STATE':_0x4564c8,'OKDB_STATE':_0x2fe94d,'VIEW_STATE':_0x5e4182},okdbEnums;}var okdbPubkey,hasRequiredOkdbPubkey;function requireOkdbPubkey(){const _0x2ef4f7=_0x1a8470;if(hasRequiredOkdbPubkey)return okdbPubkey;hasRequiredOkdbPubkey=0x1;const _0x274404=require$$1,_0x3813ba=require$$1$1,_0x1251fb=require$$0,_0x4ccecd=_0x274404[_0x2ef4f7(0x312)](_0x3813ba[_0x2ef4f7(0x475)](__dirname,_0x2ef4f7(0x3fb)),_0x2ef4f7(0x391))[_0x2ef4f7(0x42a)](),_0x2daf31=_0x1251fb[_0x2ef4f7(0x24b)](_0x4ccecd)[_0x2ef4f7(0x3f0)]({'type':_0x2ef4f7(0x234),'format':_0x2ef4f7(0x39f)}),_0xca28b7=_0x1251fb[_0x2ef4f7(0x333)](_0x2ef4f7(0x43f))['update'](_0x2daf31)[_0x2ef4f7(0x1d7)](_0x2ef4f7(0x1da))[_0x2ef4f7(0x2da)](0x0,0x10);return okdbPubkey={'PUBLIC_KEY_PEM':_0x4ccecd,'PUB_FINGERPRINT':_0xca28b7},okdbPubkey;}var okdbLicense,hasRequiredOkdbLicense;function requireOkdbLicense(){const _0x1e2d4e=_0x1a8470;if(hasRequiredOkdbLicense)return okdbLicense;hasRequiredOkdbLicense=0x1;const _0x511237=require$$0,{OKDBError:_0x5e13dd}=requireOkdbError(),{EVENTS:_0x5650fc}=requireOkdbEnums(),_0x102ddc=requireOkdbLicenseCodec(),{LICENSE_TYPE_OPEN:_0x3480b1,LICENSE_TYPE_INTERNAL:_0x312806,OPEN_LICENSE_MAX_DURATION_MS:_0x1ed4c4}=_0x102ddc,_0x6264a7=requireOkdbPubkey(),_0x4b0983={'LICENSED_BUILD':_0x1e2d4e(0x29e),'PUBLIC_KEY_PEM':_0x6264a7[_0x1e2d4e(0x206)],'PUB_FINGERPRINT':_0x6264a7[_0x1e2d4e(0x229)],'LICENSE_EXPIRED_ACTION':'log'},_0x85b808=_0x1e2d4e(0x362),_0x4343ff={'features':{'sync':![],'embeddings':![],'engines':![],'fts':!![],'timeMachine':![],'views':!![],'mcp':!![],'files':!![]},'limits':{'envs':0x2,'typesPerEnv':0xa,'syncPeers':0x0,'maxWrites':0xf4240},'_isFree':!![]};async function _0x52a6b8(_0x40022b){const _0x48d717=_0x1e2d4e;!_0x40022b[_0x48d717(0x1d6)](_0x85b808)&&await _0x40022b[_0x48d717(0x493)](_0x85b808);}class _0x55de55{constructor(_0x4609e9){const _0x25c5ea=_0x1e2d4e;this[_0x25c5ea(0x265)]=_0x4609e9,this[_0x25c5ea(0x2f0)]=null;}async[_0x1e2d4e(0x1ae)](){const _0x168c31=_0x1e2d4e,_0x4a6198=this[_0x168c31(0x265)][_0x168c31(0x1e0)];if(!_0x4a6198||!_0x4a6198[_0x168c31(0x1d6)](_0x85b808)){this[_0x168c31(0x2f0)]=null;return;}const _0x50bef0=this[_0x168c31(0x265)]['id'];let _0x1f4afb=null;for(const {key:_0x4f2bbd,value:_0x23bcef}of _0x4a6198[_0x168c31(0x358)](_0x85b808)){const _0x51ecf9=this['_computeStatus'](_0x23bcef,_0x50bef0);_0x51ecf9==='active'&&!_0x1f4afb&&(_0x1f4afb={..._0x23bcef,'id':_0x4f2bbd,'status':_0x51ecf9});}this[_0x168c31(0x2f0)]=_0x1f4afb;if(this[_0x168c31(0x2f0)]&&this[_0x168c31(0x2f0)]['licenseType']===_0x3480b1){const _0xb08157=Math['ceil']((this['_active'][_0x168c31(0x270)]-Date[_0x168c31(0x495)]())/0x5265c00);this['okdb'][_0x168c31(0x2b1)]?.[_0x168c31(0x29c)](_0x168c31(0x245)+_0xb08157+_0x168c31(0x31e),{'feature':_0x168c31(0x2ed),'licensee':this[_0x168c31(0x2f0)][_0x168c31(0x486)],'expiresAt':new Date(this[_0x168c31(0x2f0)][_0x168c31(0x270)])[_0x168c31(0x3ea)]()});}this[_0x168c31(0x2f0)]&&this[_0x168c31(0x2f0)][_0x168c31(0x448)]===_0x312806&&this[_0x168c31(0x265)][_0x168c31(0x2b1)]?.[_0x168c31(0x29c)](_0x168c31(0x37e),{'feature':'license','licensee':this[_0x168c31(0x2f0)][_0x168c31(0x486)]});}[_0x1e2d4e(0x474)](_0x63b5ca,_0x188d85){const _0x411248=_0x1e2d4e;if(!_0x63b5ca['blob'])return _0x411248(0x252);let _0x5cae84;try{_0x5cae84=_0x102ddc[_0x411248(0x298)](_0x63b5ca[_0x411248(0x1ed)]);}catch(_0x421e12){return'invalid';}try{const _0x25bee0=_0x511237['verify'](null,_0x5cae84[_0x411248(0x3b3)],_0x4b0983[_0x411248(0x206)],_0x5cae84[_0x411248(0x21d)]);if(!_0x25bee0)return _0x411248(0x252);}catch(_0x45c7e8){return _0x411248(0x252);}if(_0x5cae84[_0x411248(0x469)][_0x411248(0x448)]===_0x312806)return _0x411248(0x42f);if(_0x5cae84[_0x411248(0x469)][_0x411248(0x270)]<=Date[_0x411248(0x495)]())return'expired';if(_0x5cae84['decoded']['licenseType']===_0x3480b1)return _0x411248(0x42f);if(!_0x63b5ca[_0x411248(0x26e)])return'pending';const _0x49532d=_0x102ddc[_0x411248(0x3db)]({'tokenString':_0x63b5ca[_0x411248(0x26e)],'nodeId':_0x188d85,'rawBlobBuf':_0x5cae84[_0x411248(0x443)],'pubKeyPem':_0x4b0983[_0x411248(0x206)],'pubFingerprint':_0x4b0983[_0x411248(0x229)]});if(_0x49532d[_0x411248(0x1b5)]===_0x411248(0x3e3)||_0x49532d[_0x411248(0x1b5)]==='SIG_INVALID')return _0x411248(0x20f);if(_0x49532d[_0x411248(0x1b5)]==='ACTIVATION_EXPIRED')return _0x411248(0x384);if(!_0x49532d[_0x411248(0x200)])return _0x411248(0x20f);return _0x411248(0x42f);}get[_0x1e2d4e(0x42f)](){const _0x18f267=_0x1e2d4e;return this[_0x18f267(0x2f0)];}get[_0x1e2d4e(0x48f)](){const _0x8c5de9=_0x1e2d4e;return this[_0x8c5de9(0x2f0)]??_0x4343ff;}[_0x1e2d4e(0x2a2)](_0x134d0d){const _0x3c80d1=_0x1e2d4e;if(_0x4b0983[_0x3c80d1(0x230)]!==_0x3c80d1(0x29e))return;const _0x39c370=this[_0x3c80d1(0x48f)];if(!_0x39c370[_0x3c80d1(0x3c5)]?.[_0x134d0d]){const _0x5b67df=_0x39c370[_0x3c80d1(0x232)]?'Feature\x20not\x20available\x20on\x20free\x20tier:\x20'+_0x134d0d+'.\x20Add\x20a\x20license\x20that\x20includes\x20\x22'+_0x134d0d+_0x3c80d1(0x2b9):_0x3c80d1(0x2d5)+_0x134d0d+'.\x20The\x20active\x20license\x20does\x20not\x20enable\x20\x22'+_0x134d0d+'\x22.';throw new _0x5e13dd(_0x5b67df,_0x3c80d1(0x38b),{'feature':_0x134d0d});}}[_0x1e2d4e(0x380)](_0x4f94ed){const _0x36c312=_0x1e2d4e;if(_0x4b0983[_0x36c312(0x230)]!==_0x36c312(0x29e))return!![];return!!this['effective'][_0x36c312(0x3c5)]?.[_0x4f94ed];}[_0x1e2d4e(0x3c3)](_0x4308e2,_0x4d41c2){const _0x1860c5=_0x1e2d4e;if(_0x4b0983[_0x1860c5(0x230)]!==_0x1860c5(0x29e))return;const _0x4faaa0=this[_0x1860c5(0x48f)],_0x2833a9=_0x4faaa0['limits']?.[_0x4308e2];if(_0x2833a9===null||_0x2833a9===undefined||_0x2833a9===0x0)return;if(_0x4d41c2>=_0x2833a9)throw new _0x5e13dd(_0x1860c5(0x3e0)+_0x4308e2+'\x20('+_0x4d41c2+'/'+_0x2833a9+')',_0x1860c5(0x42e),{'limit':_0x4308e2,'current':_0x4d41c2,'max':_0x2833a9});}async[_0x1e2d4e(0x1cc)](_0x59ef20){const _0x1b2a38=_0x1e2d4e;let _0x1df8a0;try{_0x1df8a0=_0x102ddc['decodeLicenseBlob'](_0x59ef20);}catch(_0x29b9f9){throw new _0x5e13dd(_0x1b2a38(0x409)+_0x29b9f9[_0x1b2a38(0x2b8)],'LICENSE_INVALID');}let _0x57325b;try{_0x57325b=_0x511237['verify'](null,_0x1df8a0[_0x1b2a38(0x3b3)],_0x4b0983['PUBLIC_KEY_PEM'],_0x1df8a0[_0x1b2a38(0x21d)]);}catch(_0x448f81){throw new _0x5e13dd(_0x1b2a38(0x364)+_0x448f81['message'],_0x1b2a38(0x3a1));}if(!_0x57325b)throw new _0x5e13dd('License\x20signature\x20invalid\x20—\x20this\x20license\x20was\x20not\x20signed\x20by\x20the\x20key\x20paired\x20with\x20this\x20build.\x20'+(_0x1b2a38(0x412)+_0x4b0983[_0x1b2a38(0x229)]+'.\x20')+_0x1b2a38(0x2b4),_0x1b2a38(0x3a1),{'expectedFingerprint':_0x4b0983[_0x1b2a38(0x229)]});if(_0x1df8a0[_0x1b2a38(0x469)]['licenseType']===_0x3480b1){const _0x1eb09c=_0x1df8a0[_0x1b2a38(0x469)][_0x1b2a38(0x270)]-_0x1df8a0[_0x1b2a38(0x469)][_0x1b2a38(0x227)];if(_0x1eb09c>_0x1ed4c4)throw new _0x5e13dd('Open\x20licenses\x20cannot\x20exceed\x206\x20months\x20duration\x20(this\x20license\x20expires\x20'+Math['ceil'](_0x1eb09c/(0x1e*0x5265c00))+_0x1b2a38(0x35f),_0x1b2a38(0x3a1));}const _0x3e18e5=this['okdb']['_systemEnv'];await _0x52a6b8(_0x3e18e5);const _0x336587=_0x102ddc['licenseHash'](_0x1df8a0[_0x1b2a38(0x443)])[_0x1b2a38(0x450)](_0x1b2a38(0x1da));for(const {value:_0x174a84}of _0x3e18e5[_0x1b2a38(0x358)](_0x85b808)){if(_0x174a84[_0x1b2a38(0x2a8)]===_0x336587)throw new _0x5e13dd('License\x20already\x20stored',_0x1b2a38(0x3a1));}const _0x37a310=_0x511237['randomUUID'](),_0x2b0821={'blob':_0x59ef20,'activation':null,'addedAt':Date['now'](),'_licenseHash':_0x336587,'licensee':_0x1df8a0[_0x1b2a38(0x469)]['licensee'],'expiresAt':_0x1df8a0[_0x1b2a38(0x469)][_0x1b2a38(0x270)],'features':_0x1df8a0[_0x1b2a38(0x469)][_0x1b2a38(0x3c5)],'limits':_0x1df8a0[_0x1b2a38(0x469)]['limits'],'licenseType':_0x1df8a0[_0x1b2a38(0x469)][_0x1b2a38(0x448)]};return await _0x3e18e5['put'](_0x85b808,_0x37a310,_0x2b0821),{'id':_0x37a310,..._0x2b0821};}async[_0x1e2d4e(0x3f3)](_0x1a23cb){const _0x396236=_0x1e2d4e;let _0x39c119;try{_0x39c119=_0x102ddc[_0x396236(0x3c4)](_0x1a23cb);}catch(_0x3d2fb0){throw new _0x5e13dd(_0x396236(0x20d)+_0x3d2fb0[_0x396236(0x2b8)],'LICENSE_ACTIVATION_INVALID');}const _0x4f046d=_0x39c119[_0x396236(0x319)][_0x396236(0x450)](_0x396236(0x1da)),_0x2ce85=this['okdb'][_0x396236(0x1e0)];if(!_0x2ce85||!_0x2ce85[_0x396236(0x1d6)](_0x85b808))throw new _0x5e13dd(_0x396236(0x211),_0x396236(0x2ab));let _0x171243=null,_0x1f2d26=null;for(const {key:_0xc8a0df,value:_0x451bd1}of _0x2ce85[_0x396236(0x358)](_0x85b808)){if(_0x451bd1[_0x396236(0x2a8)]===_0x4f046d){_0x171243=_0xc8a0df,_0x1f2d26=_0x451bd1;break;}}if(!_0x171243)throw new _0x5e13dd(_0x396236(0x211),_0x396236(0x2ab));const {rawBuf:_0x3149b0}=_0x102ddc[_0x396236(0x298)](_0x1f2d26[_0x396236(0x1ed)]),_0x46a031=_0x102ddc[_0x396236(0x3db)]({'tokenString':_0x1a23cb,'nodeId':this['okdb']['id'],'rawBlobBuf':_0x3149b0,'pubKeyPem':_0x4b0983[_0x396236(0x206)],'pubFingerprint':_0x4b0983[_0x396236(0x229)]});if(!_0x46a031[_0x396236(0x200)])throw new _0x5e13dd('Activation\x20invalid:\x20'+_0x46a031['reason'],_0x396236(0x2ab),{'reason':_0x46a031[_0x396236(0x1b5)]});const _0x306ee9={..._0x1f2d26,'activation':_0x1a23cb};return await _0x2ce85[_0x396236(0x3bb)](_0x85b808,_0x171243,_0x306ee9),{'id':_0x171243,..._0x306ee9};}async[_0x1e2d4e(0x1e2)](_0x45a00f){const _0x300b86=_0x1e2d4e,_0x46f72c=this['okdb'][_0x300b86(0x1e0)];if(!_0x46f72c||!_0x46f72c[_0x300b86(0x1d6)](_0x85b808))return;await _0x46f72c[_0x300b86(0x332)](_0x85b808,_0x45a00f);}async['listLicenses'](){const _0x3020ed=_0x1e2d4e,_0x25b4e1=this[_0x3020ed(0x265)][_0x3020ed(0x1e0)];if(!_0x25b4e1||!_0x25b4e1['hasType'](_0x85b808))return[];const _0x46cc8d=this['okdb']['id'],_0x103c36=[];for(const {key:_0x3a7b27,value:_0x227a5b}of _0x25b4e1[_0x3020ed(0x358)](_0x85b808)){const _0x40c811=this[_0x3020ed(0x474)](_0x227a5b,_0x46cc8d);_0x103c36[_0x3020ed(0x365)]({..._0x227a5b,'id':_0x3a7b27,'status':_0x40c811});}return _0x103c36;}['getPins'](){const _0x178e14=_0x1e2d4e,_0x49c9be=this[_0x178e14(0x265)]['_systemEnv'];if(!_0x49c9be||!_0x49c9be[_0x178e14(0x1d6)](_0x85b808))return[];const _0x5e29b7=this[_0x178e14(0x265)]['id'],_0x5654f9=[];for(const {key:_0x434cac,value:_0x1d2d12}of _0x49c9be[_0x178e14(0x358)](_0x85b808)){if(_0x1d2d12['_licenseHash']){if(_0x1d2d12[_0x178e14(0x448)]===_0x3480b1)_0x5654f9[_0x178e14(0x365)]({'licenseId':_0x434cac,'pin':null});else{const _0x9186c9=Buffer['from'](_0x1d2d12[_0x178e14(0x2a8)],'hex'),{pin:_0x3e11dc}=_0x102ddc[_0x178e14(0x26a)](_0x5e29b7,_0x9186c9,_0x4b0983[_0x178e14(0x229)]);_0x5654f9[_0x178e14(0x365)]({'licenseId':_0x434cac,'pin':_0x3e11dc});}}}return _0x5654f9;}async['recheck'](){const _0x4705c0=_0x1e2d4e,_0xe0614f=this['_active'];await this['reload']();if(this['_active']&&this[_0x4705c0(0x2f0)][_0x4705c0(0x448)]===_0x3480b1){const _0x1ec3a1=Math[_0x4705c0(0x399)]((this['_active'][_0x4705c0(0x270)]-Date[_0x4705c0(0x495)]())/0x5265c00);this['okdb'][_0x4705c0(0x2b1)]?.[_0x4705c0(0x29c)](_0x4705c0(0x245)+_0x1ec3a1+'\x20day(s).',{'feature':'license','licensee':this[_0x4705c0(0x2f0)][_0x4705c0(0x486)],'expiresAt':new Date(this['_active']['expiresAt'])[_0x4705c0(0x3ea)]()});}this[_0x4705c0(0x2f0)]&&this[_0x4705c0(0x2f0)]['licenseType']===_0x312806&&this[_0x4705c0(0x265)][_0x4705c0(0x2b1)]?.['warn'](_0x4705c0(0x37e),{'feature':'license','licensee':this['_active'][_0x4705c0(0x486)]});if(_0xe0614f&&!this[_0x4705c0(0x2f0)]){this[_0x4705c0(0x265)][_0x4705c0(0x2b1)]?.[_0x4705c0(0x29c)](_0x4705c0(0x2be),{'feature':_0x4705c0(0x2ed)}),this['okdb']['events']?.[_0x4705c0(0x31f)](_0x5650fc['LICENSE_INVALID'],{'previous':_0xe0614f});const _0x61608c=this['okdb'][_0x4705c0(0x32b)]?.[_0x4705c0(0x444)]??_0x4b0983[_0x4705c0(0x393)];_0x61608c==='shutdown'&&(this['okdb'][_0x4705c0(0x2b1)]?.['error'](_0x4705c0(0x405),{'feature':_0x4705c0(0x2ed)}),this[_0x4705c0(0x265)][_0x4705c0(0x226)]()[_0x4705c0(0x47b)](()=>{})[_0x4705c0(0x254)](()=>process[_0x4705c0(0x3e8)](0x1)));}}}return okdbLicense={'LicenseChecker':_0x55de55,'_C':_0x4b0983},okdbLicense;}var okdbShell,hasRequiredOkdbShell;function requireOkdbShell(){const _0x4dcaca=_0x1a8470;if(hasRequiredOkdbShell)return okdbShell;hasRequiredOkdbShell=0x1;const _0x51c94d=require$$0$2,_0x1bc55f=require$$1,_0x224e2a=require$$2$1,_0x11bd4a=require$$1$1,_0x23c018=_0x11bd4a['join'](_0x224e2a[_0x4dcaca(0x489)](),_0x4dcaca(0x344)),_0x1ab8fc=0x3e8,_0x266989={'reset':_0x4dcaca(0x373),'bold':'\x1b[1m','dim':'\x1b[2m','red':_0x4dcaca(0x2e6),'green':'\x1b[32m','yellow':_0x4dcaca(0x2ef),'blue':_0x4dcaca(0x428),'magenta':'\x1b[35m','cyan':_0x4dcaca(0x243),'white':'\x1b[37m','gray':_0x4dcaca(0x278)},_0x124cff=!process['stdout'][_0x4dcaca(0x1d3)]||!!process.env.NO_COLOR,_0x53323c=(_0x2b062b,_0x297714)=>_0x124cff?_0x297714:''+_0x2b062b+_0x297714+_0x266989[_0x4dcaca(0x3d1)],_0x1feaae={'error':_0x266989[_0x4dcaca(0x2dc)],'warn':_0x266989[_0x4dcaca(0x24d)],'info':_0x266989[_0x4dcaca(0x266)],'debug':_0x266989[_0x4dcaca(0x2c7)]},_0x4ea99c={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3};function _0x5d819d(_0x3049b8,_0x41a12c=_0x4dcaca(0x247)){const _0x372175=_0x4dcaca,{level:_0x130614,msg:_0x5cd8bc,meta:_0x2f4a6e,context:_0x1b334d,ts:_0xef52ce}=_0x3049b8;if((_0x4ea99c[_0x130614]??0x1)<(_0x4ea99c[_0x41a12c]??0x1))return;const _0x126c79=_0x53323c(_0x266989['gray'],new Date(_0xef52ce)[_0x372175(0x3ea)]()),_0x2d7c27=_0x53323c(_0x1feaae[_0x130614]??_0x266989[_0x372175(0x499)],_0x130614[_0x372175(0x1ea)](0x5));let _0xdc3520='\x20\x20'+_0x126c79+'\x20'+_0x53323c(_0x266989['bold'],_0x2d7c27)+'\x20'+_0x5cd8bc;if(_0x2f4a6e&&Object[_0x372175(0x44d)](_0x2f4a6e)['length']>0x0){const _0xd5281c=Object[_0x372175(0x3c2)](_0x2f4a6e)[_0x372175(0x3a3)](([_0x14ff4d,_0x3615dc])=>_0x14ff4d+'='+_0x3615dc)[_0x372175(0x475)]('\x20');_0xdc3520+=_0x53323c(_0x266989[_0x372175(0x484)],'\x20\x20['+_0xd5281c+']');}if(_0x1b334d!==undefined){const _0x27ad19=typeof _0x1b334d===_0x372175(0x35b)?JSON['stringify'](_0x1b334d):String(_0x1b334d);_0xdc3520+=_0x53323c(_0x266989[_0x372175(0x484)],'\x20\x20'+_0x27ad19);}const _0x205be1=_0x130614===_0x372175(0x1d4)||_0x130614===_0x372175(0x29c)?process['stderr']['write'][_0x372175(0x300)](process[_0x372175(0x256)]):process[_0x372175(0x204)][_0x372175(0x480)]['bind'](process[_0x372175(0x204)]);_0x205be1(_0xdc3520+'\x0a');}function _0x4b80f2(_0x15b01b,_0x58fc8f){const _0x35bc83=_0x4dcaca;if(_0x15b01b===0xcc||_0x15b01b>=0xc8&&_0x15b01b<0x12c&&!_0x58fc8f){console['log'](_0x35bc83(0x38d)+_0x53323c(_0x266989[_0x35bc83(0x277)],'✓')+'\x0a');return;}if(_0x15b01b>=0x190||_0x58fc8f?.[_0x35bc83(0x1d4)]){const _0x4c709b=_0x58fc8f?.[_0x35bc83(0x1d4)]??_0x58fc8f?.[_0x35bc83(0x2b8)]??'HTTP\x20'+_0x15b01b;console[_0x35bc83(0x2b1)](_0x35bc83(0x38d)+_0x53323c(_0x266989[_0x35bc83(0x2dc)],'✗')+'\x20'+_0x53323c(_0x266989[_0x35bc83(0x45c)]+_0x266989[_0x35bc83(0x2dc)],String(_0x15b01b))+'\x20\x20'+_0x4c709b+'\x0a');return;}const _0x4e23a4=Object[_0x35bc83(0x3f1)][_0x35bc83(0x1f6)][_0x35bc83(0x31c)](_0x58fc8f??{},_0x35bc83(0x464))?_0x58fc8f[_0x35bc83(0x464)]:_0x58fc8f,_0x5f4783=_0x58fc8f?.[_0x35bc83(0x2cf)];console['log'](''),_0x48de05(_0x4e23a4,'\x20\x20');if(_0x5f4783?.[_0x35bc83(0x420)]!=null||_0x5f4783?.['time']!=null){const _0x3a1b61=[];if(_0x5f4783[_0x35bc83(0x420)]!=null)_0x3a1b61[_0x35bc83(0x365)](_0x5f4783[_0x35bc83(0x420)]+'\x20result'+(_0x5f4783[_0x35bc83(0x420)]!==0x1?'s':''));if(_0x5f4783[_0x35bc83(0x38c)]!=null)_0x3a1b61[_0x35bc83(0x365)](_0x5f4783['time']+'ms');console[_0x35bc83(0x2b1)]('\x0a\x20\x20'+_0x53323c(_0x266989[_0x35bc83(0x484)],_0x3a1b61[_0x35bc83(0x475)](_0x35bc83(0x38f))));}console[_0x35bc83(0x2b1)]('');}function _0x48de05(_0x4bf8b6,_0x18d6f4=''){const _0x44adf7=_0x4dcaca;if(_0x4bf8b6===null||_0x4bf8b6===undefined){console['log'](_0x18d6f4+_0x53323c(_0x266989['dim'],_0x44adf7(0x455)));return;}if(Array[_0x44adf7(0x22b)](_0x4bf8b6)){if(_0x4bf8b6[_0x44adf7(0x2bd)]===0x0){console[_0x44adf7(0x2b1)](_0x18d6f4+_0x53323c(_0x266989[_0x44adf7(0x484)],_0x44adf7(0x482)));return;}if(_0x4bf8b6[_0x44adf7(0x1c2)](_0x1b3d61=>_0x1b3d61&&typeof _0x1b3d61===_0x44adf7(0x35b)&&_0x44adf7(0x325)in _0x1b3d61&&_0x44adf7(0x349)in _0x1b3d61)){_0x4a7ad1(_0x4bf8b6,_0x18d6f4);return;}if(_0x4bf8b6[_0x44adf7(0x1c2)](_0x4cc42b=>_0x4cc42b&&typeof _0x4cc42b==='object'&&'type'in _0x4cc42b&&'count'in _0x4cc42b)){_0x59b02a(_0x4bf8b6,_0x18d6f4);return;}if(_0x4bf8b6[_0x44adf7(0x1c2)](_0x289e9c=>typeof _0x289e9c!==_0x44adf7(0x35b)||_0x289e9c===null)){_0x4bf8b6[_0x44adf7(0x49d)]((_0x2d0809,_0x36d459)=>console[_0x44adf7(0x2b1)](_0x18d6f4+_0x53323c(_0x266989[_0x44adf7(0x2c7)],_0x36d459+0x1+'.')+'\x20'+_0x53323c(_0x266989[_0x44adf7(0x499)],String(_0x2d0809))));return;}_0x4bf8b6[_0x44adf7(0x49d)]((_0x512c53,_0x5019ff)=>{const _0x2eeaa7=_0x44adf7;console[_0x2eeaa7(0x2b1)](_0x18d6f4+_0x53323c(_0x266989[_0x2eeaa7(0x484)],'['+_0x5019ff+']'));if(typeof _0x512c53===_0x2eeaa7(0x35b)&&_0x512c53!==null)_0x12a5b7(_0x512c53,_0x18d6f4+'\x20\x20');else console['log'](_0x18d6f4+'\x20\x20'+String(_0x512c53));});return;}if(typeof _0x4bf8b6===_0x44adf7(0x35b)){if(_0x44adf7(0x325)in _0x4bf8b6&&_0x44adf7(0x349)in _0x4bf8b6&&Object[_0x44adf7(0x44d)](_0x4bf8b6)[_0x44adf7(0x2bd)]<=0x3){console['log'](_0x18d6f4+_0x53323c(_0x266989[_0x44adf7(0x45c)]+_0x266989[_0x44adf7(0x266)],String(_0x4bf8b6[_0x44adf7(0x325)])));const _0x221fa9=_0x4bf8b6[_0x44adf7(0x349)];if(_0x221fa9&&typeof _0x221fa9===_0x44adf7(0x35b))_0x12a5b7(_0x221fa9,_0x18d6f4);else console[_0x44adf7(0x2b1)](_0x18d6f4+_0x53323c(_0x266989['white'],String(_0x221fa9)));return;}_0x12a5b7(_0x4bf8b6,_0x18d6f4);return;}console[_0x44adf7(0x2b1)](_0x18d6f4+_0x53323c(_0x266989[_0x44adf7(0x499)],String(_0x4bf8b6)));}function _0x12a5b7(_0x2e1af3,_0x2dff40=''){const _0x5f552d=_0x4dcaca,_0x2b51f0=Object[_0x5f552d(0x3c2)](_0x2e1af3);if(_0x2b51f0[_0x5f552d(0x2bd)]===0x0){console[_0x5f552d(0x2b1)](_0x2dff40+_0x53323c(_0x266989[_0x5f552d(0x484)],'{}'));return;}const _0x433979=Math[_0x5f552d(0x36d)](0x1c,Math[_0x5f552d(0x22d)](..._0x2b51f0['map'](([_0x1a560e])=>_0x1a560e[_0x5f552d(0x2bd)])));for(const [_0x447d43,_0x53be62]of _0x2b51f0){const _0x3cba82=_0x53323c(_0x266989[_0x5f552d(0x266)],_0x447d43[_0x5f552d(0x1ea)](_0x433979));if(_0x53be62===null||_0x53be62===undefined)console[_0x5f552d(0x2b1)](_0x2dff40+_0x3cba82+'\x20\x20'+_0x53323c(_0x266989[_0x5f552d(0x484)],_0x5f552d(0x35a)));else{if(typeof _0x53be62===_0x5f552d(0x35b)){const _0x3803d2=JSON[_0x5f552d(0x1c6)](_0x53be62);_0x3803d2[_0x5f552d(0x2bd)]<=0x50?console['log'](_0x2dff40+_0x3cba82+'\x20\x20'+_0x53323c(_0x266989[_0x5f552d(0x484)],_0x3803d2)):(console[_0x5f552d(0x2b1)](_0x2dff40+_0x3cba82),_0x48de05(_0x53be62,_0x2dff40+'\x20\x20'));}else{const _0x590b2e=typeof _0x53be62===_0x5f552d(0x351)?_0x53323c(_0x53be62?_0x266989[_0x5f552d(0x277)]:_0x266989[_0x5f552d(0x24d)],String(_0x53be62)):typeof _0x53be62===_0x5f552d(0x315)?_0x53323c(_0x266989[_0x5f552d(0x261)],String(_0x53be62)):_0x53323c(_0x266989[_0x5f552d(0x499)],String(_0x53be62));console[_0x5f552d(0x2b1)](_0x2dff40+_0x3cba82+'\x20\x20'+_0x590b2e);}}}}function _0x4a7ad1(_0xbb91c0,_0xbec38b=''){const _0x58820b=_0x4dcaca,_0x150789=Math[_0x58820b(0x36d)](0x20,Math[_0x58820b(0x22d)](..._0xbb91c0[_0x58820b(0x3a3)](_0x56f3a2=>String(_0x56f3a2['key'])[_0x58820b(0x2bd)])));for(const {key:_0x42e38b,value:_0x51d62c,score:_0xd0eb93,clock:_0x38a8f1}of _0xbb91c0){const _0x2d5284=_0x53323c(_0x266989['bold']+_0x266989[_0x58820b(0x266)],String(_0x42e38b)[_0x58820b(0x1ea)](_0x150789)),_0x2343c8=_0x51d62c==null?_0x53323c(_0x266989[_0x58820b(0x484)],_0x58820b(0x35a)):typeof _0x51d62c==='object'?_0x53323c(_0x266989[_0x58820b(0x484)],JSON[_0x58820b(0x1c6)](_0x51d62c)):_0x53323c(_0x266989[_0x58820b(0x499)],String(_0x51d62c)),_0x4e6f5c=_0xd0eb93!=null?_0x53323c(_0x266989['gray'],'\x20\x20score:'+_0xd0eb93[_0x58820b(0x246)](0x4)):'',_0x128ce5=_0x38a8f1!=null?_0x53323c(_0x266989['gray'],_0x58820b(0x415)+_0x38a8f1):'';console[_0x58820b(0x2b1)](_0xbec38b+_0x2d5284+'\x20\x20'+_0x2343c8+_0x4e6f5c+_0x128ce5);}}function _0x59b02a(_0x13fa8a,_0x418817=''){const _0x4bdfa5=_0x4dcaca,_0xefed4c=Math[_0x4bdfa5(0x36d)](0x20,Math[_0x4bdfa5(0x22d)](..._0x13fa8a['map'](_0x15535d=>_0x15535d[_0x4bdfa5(0x43a)]['length'])));for(const {type:_0x137261,count:_0x4aa05f,fields:_0x4f4c28}of _0x13fa8a){if(_0x137261[_0x4bdfa5(0x3ae)]('~'))continue;const _0x3502a4=_0x53323c(_0x266989[_0x4bdfa5(0x45c)]+_0x266989[_0x4bdfa5(0x266)],_0x137261[_0x4bdfa5(0x1ea)](_0xefed4c)),_0x4adc2e=_0x53323c(_0x266989[_0x4bdfa5(0x261)],String(_0x4aa05f)['padStart'](0x6))+_0x53323c(_0x266989['dim'],_0x4bdfa5(0x422)),_0xc994c2=_0x4f4c28&&Object[_0x4bdfa5(0x44d)](_0x4f4c28)[_0x4bdfa5(0x2bd)]?_0x53323c(_0x266989[_0x4bdfa5(0x484)],_0x4bdfa5(0x260)+Object[_0x4bdfa5(0x44d)](_0x4f4c28)['slice'](0x0,0x6)[_0x4bdfa5(0x475)](',\x20')+(Object[_0x4bdfa5(0x44d)](_0x4f4c28)[_0x4bdfa5(0x2bd)]>0x6?'…':'')):'';console['log'](_0x418817+_0x3502a4+'\x20\x20'+_0x4adc2e+_0xc994c2);}}const _0x3f336d=[_0x4dcaca(0x483),'type/',_0x4dcaca(0x3d4),_0x4dcaca(0x3a5),_0x4dcaca(0x32e),_0x4dcaca(0x41e)];function _0x48002c(_0xeb4ca6,_0x30d408){const _0x1af9f5=_0x4dcaca;if(_0xeb4ca6[_0x1af9f5(0x3ae)](_0x1af9f5(0x279)))return _0xeb4ca6;if(_0xeb4ca6[_0x1af9f5(0x3ae)]('/'))return _0x1af9f5(0x38e)+_0xeb4ca6;if(_0xeb4ca6[_0x1af9f5(0x3ae)](_0x1af9f5(0x456)))return'/api/'+_0xeb4ca6;const _0x111ceb=_0x3f336d[_0x1af9f5(0x382)](_0x241461=>_0xeb4ca6===_0x241461[_0x1af9f5(0x426)](/\/$/,'')||_0xeb4ca6[_0x1af9f5(0x3ae)](_0x241461));return _0x111ceb?'/api/env/'+_0x30d408+'/'+_0xeb4ca6:'/api/'+_0xeb4ca6;}function _0x3ee385(_0x11ad97){const _0x1bb0d6=_0x4dcaca,_0x19be4f={},_0x27a990=[];let _0x7156ea=0x0;while(_0x7156ea<_0x11ad97[_0x1bb0d6(0x2bd)]){if((_0x11ad97[_0x7156ea]===_0x1bb0d6(0x442)||_0x11ad97[_0x7156ea]==='-e')&&_0x11ad97[_0x7156ea+0x1]&&!_0x11ad97[_0x7156ea+0x1]['startsWith']('-'))_0x19be4f[_0x1bb0d6(0x485)]=_0x11ad97[++_0x7156ea];else _0x11ad97[_0x7156ea]===_0x1bb0d6(0x47d)||_0x11ad97[_0x7156ea]==='-h'?_0x19be4f[_0x1bb0d6(0x46c)]=!![]:_0x27a990[_0x1bb0d6(0x365)](_0x11ad97[_0x7156ea]);_0x7156ea++;}return{'flags':_0x19be4f,'rest':_0x27a990};}const _0x4bf6f5={'system':_0x4dcaca(0x449),'envs':_0x4dcaca(0x446),'types':_0x4dcaca(0x250),'data':'Records','indexes':_0x4dcaca(0x2df),'fts':_0x4dcaca(0x1b9),'sync':_0x4dcaca(0x1b0),'queue':'Queue','files':_0x4dcaca(0x498),'embeddings':'Embeddings','engines':_0x4dcaca(0x241),'admin':'Admin','event':_0x4dcaca(0x267),'processor':_0x4dcaca(0x38a)},_0x4abc8d=[_0x4dcaca(0x439),'envs','types',_0x4dcaca(0x216),_0x4dcaca(0x3df),'fts',_0x4dcaca(0x2e3),_0x4dcaca(0x220),_0x4dcaca(0x3a8),_0x4dcaca(0x383),_0x4dcaca(0x472),_0x4dcaca(0x26f)];function _0x271620(_0x12c16b){const _0x596928=_0x4dcaca;return _0x12c16b['replace'](/^\/api/,'')[_0x596928(0x426)](/^\[\/env\/:env=[^\]]*\]/,_0x596928(0x1ca))[_0x596928(0x426)](/^\/env\/:env/,_0x596928(0x2c2))['replace'](/^\//,'');}function _0x305d6e(_0x4a38ff,_0x52730f=''){const _0x910ef1=_0x4dcaca,_0xeb352e=_0x4a38ff[_0x910ef1(0x375)][_0x910ef1(0x305)]()[_0x910ef1(0x30f)](_0x1de4b7=>!_0x1de4b7[_0x910ef1(0x2cf)]?.[_0x910ef1(0x49b)]),_0x13b415=_0x52730f?_0xeb352e[_0x910ef1(0x30f)](_0x3ebc95=>_0x3ebc95[_0x910ef1(0x31b)][_0x910ef1(0x1fe)]()['includes'](_0x52730f[_0x910ef1(0x1fe)]())||(_0x18f6d1(_0x3ebc95)??'')[_0x910ef1(0x1fe)]()['includes'](_0x52730f['toLowerCase']())||_0x438774(_0x3ebc95)[_0x910ef1(0x382)](_0x4d4ac9=>_0x4d4ac9[_0x910ef1(0x1fe)]()['includes'](_0x52730f[_0x910ef1(0x1fe)]()))):_0xeb352e;if(!_0x13b415[_0x910ef1(0x2bd)]){console[_0x910ef1(0x2b1)](_0x53323c(_0x266989['yellow'],_0x910ef1(0x32f)+_0x52730f+'\x22\x0a'));return;}const _0x15879a=new Map();for(const _0x494b4b of _0x13b415){const _0x4a08fd=_0x438774(_0x494b4b)[0x0]??_0x910ef1(0x35e);if(!_0x15879a['has'](_0x4a08fd))_0x15879a[_0x910ef1(0x297)](_0x4a08fd,[]);_0x15879a[_0x910ef1(0x354)](_0x4a08fd)[_0x910ef1(0x365)](_0x494b4b);}const _0x223fd5=[..._0x4abc8d[_0x910ef1(0x30f)](_0x416f14=>_0x15879a['has'](_0x416f14)),...[..._0x15879a[_0x910ef1(0x44d)]()][_0x910ef1(0x30f)](_0x563518=>!_0x4abc8d['includes'](_0x563518))];console[_0x910ef1(0x2b1)]('');for(const _0x2d1539 of _0x223fd5){const _0x200ba4=_0x15879a[_0x910ef1(0x354)](_0x2d1539);if(!_0x200ba4?.[_0x910ef1(0x2bd)])continue;console[_0x910ef1(0x2b1)](_0x53323c(_0x266989[_0x910ef1(0x45c)],'\x20\x20'+(_0x4bf6f5[_0x2d1539]??_0x2d1539)));for(const _0x3dc5a2 of _0x200ba4){const _0xeec5f5=_0x53323c(_0x266989[_0x910ef1(0x261)],_0x3dc5a2[_0x910ef1(0x218)]['padEnd'](0x7)),_0x3251dd=_0x53323c(_0x266989['cyan'],_0x271620(_0x3dc5a2[_0x910ef1(0x31b)])),_0x4aceaf=_0x18f6d1(_0x3dc5a2)?_0x53323c(_0x266989[_0x910ef1(0x484)],'\x20\x20'+_0x18f6d1(_0x3dc5a2)):'',_0x1dd058=_0x3dc5a2['operation']?.['id']?_0x53323c(_0x266989['gray'],_0x910ef1(0x20c)+_0x3dc5a2[_0x910ef1(0x40c)]['id']+']'):'';console[_0x910ef1(0x2b1)]('\x20\x20\x20\x20'+_0xeec5f5+'\x20'+_0x3251dd+_0x4aceaf+_0x1dd058);}console[_0x910ef1(0x2b1)]('');}}function _0xe4ad74(_0x4ec36d,_0x16a65d){const _0x4864a7=_0x4dcaca,_0x342761=_0x16a65d[_0x4864a7(0x426)](/^\/api(\/env\/[^/]+)?\//,'')[_0x4864a7(0x23a)]('/')[0x0],_0x216d54=_0x4ec36d[_0x4864a7(0x375)][_0x4864a7(0x305)]()[_0x4864a7(0x30f)](_0x3663d1=>_0x3663d1[_0x4864a7(0x31b)][_0x4864a7(0x1fe)]()[_0x4864a7(0x242)](_0x342761['toLowerCase']()));if(!_0x216d54[_0x4864a7(0x2bd)]){console['log'](_0x53323c(_0x266989[_0x4864a7(0x24d)],_0x4864a7(0x3c8)+_0x16a65d+'\x0a'));return;}console[_0x4864a7(0x2b1)]('');for(const _0x3f1709 of _0x216d54[_0x4864a7(0x2da)](0x0,0xc)){for(const _0x1a159f of _0x2ba489(_0x3f1709)){console[_0x4864a7(0x2b1)](_0x1a159f);}console[_0x4864a7(0x2b1)]('');}}function _0x18f6d1(_0x3efb0b){const _0x56fb31=_0x4dcaca;return _0x3efb0b[_0x56fb31(0x40c)]?.['summary']??_0x3efb0b[_0x56fb31(0x2cf)]?.[_0x56fb31(0x1bd)]??'';}function _0x540f61(_0x343b73){const _0x1dc279=_0x4dcaca;return _0x343b73[_0x1dc279(0x40c)]?.['description']??_0x343b73[_0x1dc279(0x2cf)]?.['description']??'';}function _0x438774(_0x37232f){const _0xea9c45=_0x4dcaca;return _0x37232f['operation']?.[_0xea9c45(0x3d2)]?.['length']?_0x37232f[_0xea9c45(0x40c)][_0xea9c45(0x3d2)]:_0x37232f[_0xea9c45(0x2cf)]?.[_0xea9c45(0x3d2)]??[];}function _0x2ba489(_0x5a5531){const _0x351f55=_0x4dcaca,_0x353bd1=[];_0x353bd1[_0x351f55(0x365)]('\x20\x20'+_0x53323c(_0x266989[_0x351f55(0x45c)]+_0x266989['magenta'],_0x5a5531[_0x351f55(0x218)]['padEnd'](0x7))+'\x20'+_0x53323c(_0x266989[_0x351f55(0x45c)]+_0x266989['cyan'],_0x5a5531[_0x351f55(0x31b)]));_0x5a5531[_0x351f55(0x40c)]?.['id']&&_0x353bd1[_0x351f55(0x365)](_0x351f55(0x37a)+_0x53323c(_0x266989[_0x351f55(0x2c7)],'id:\x20'+_0x5a5531[_0x351f55(0x40c)]['id']));_0x18f6d1(_0x5a5531)&&_0x353bd1[_0x351f55(0x365)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x53323c(_0x266989[_0x351f55(0x499)],_0x18f6d1(_0x5a5531)));_0x540f61(_0x5a5531)&&_0x353bd1['push']('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x53323c(_0x266989[_0x351f55(0x484)],_0x540f61(_0x5a5531)));_0x438774(_0x5a5531)[_0x351f55(0x2bd)]&&_0x353bd1[_0x351f55(0x365)](_0x351f55(0x37a)+_0x53323c(_0x266989[_0x351f55(0x2c7)],'tags:\x20'+_0x438774(_0x5a5531)[_0x351f55(0x475)](',\x20')));_0x5a5531[_0x351f55(0x40c)]?.[_0x351f55(0x1ce)]?.[_0x351f55(0x1f0)]&&_0x353bd1[_0x351f55(0x365)](_0x351f55(0x37a)+_0x53323c(_0x266989['gray'],_0x351f55(0x413)+_0x5a5531[_0x351f55(0x40c)][_0x351f55(0x1ce)][_0x351f55(0x1f0)]));_0x5a5531[_0x351f55(0x40c)]?.['http']?.[_0x351f55(0x434)]&&_0x5a5531[_0x351f55(0x40c)]['http'][_0x351f55(0x434)]!=='standard'&&_0x353bd1['push'](_0x351f55(0x37a)+_0x53323c(_0x266989[_0x351f55(0x2c7)],_0x351f55(0x34d)+_0x5a5531[_0x351f55(0x40c)][_0x351f55(0x375)][_0x351f55(0x434)]));if(_0x5a5531[_0x351f55(0x40c)]?.[_0x351f55(0x1d1)]){const _0x1b3df7=Object[_0x351f55(0x44d)](_0x5a5531[_0x351f55(0x40c)]['inputSchema'][_0x351f55(0x318)]||{});if(_0x1b3df7['length'])_0x353bd1[_0x351f55(0x365)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x53323c(_0x266989[_0x351f55(0x2c7)],'input:\x20'+_0x1b3df7[_0x351f55(0x475)](',\x20')));}return _0x5a5531[_0x351f55(0x2cf)]?.[_0x351f55(0x264)]&&_0x353bd1['push'](_0x351f55(0x37a)+_0x53323c(_0x266989[_0x351f55(0x2c7)],'body:\x20'+JSON['stringify'](_0x5a5531[_0x351f55(0x2cf)][_0x351f55(0x264)]))),_0x353bd1;}async function _0x288cab(_0x518631,_0x5debbc,_0x3d9af6,_0x629645=null){const _0x3eb955=_0x4dcaca,_0x3728a1=_0x3d9af6[_0x3eb955(0x2ad)]('?'),_0x291479=_0x3728a1>=0x0?_0x3d9af6['slice'](0x0,_0x3728a1):_0x3d9af6,_0x451081=_0x3728a1>=0x0?_0x3d9af6[_0x3eb955(0x2da)](_0x3728a1+0x1):'',_0x3e70df=Object[_0x3eb955(0x262)](new URLSearchParams(_0x451081)[_0x3eb955(0x3c2)]());return _0x518631[_0x3eb955(0x375)][_0x3eb955(0x1aa)](_0x5debbc,_0x291479,{'body':_0x629645,'query':_0x3e70df,'headers':{'content-type':'application/json'}},{'internal':!![]});}function _0x40302f(_0x3b56e4){const _0x13253c=_0x4dcaca;if(!_0x3b56e4)return null;const _0x3e2e38=_0x3b56e4['trim']();if(!_0x3e2e38)return null;try{return JSON['parse'](_0x3e2e38);}catch{}try{return JSON[_0x13253c(0x369)](_0x24e6ff(_0x3e2e38));}catch(_0x156c71){throw new SyntaxError(_0x156c71[_0x13253c(0x2b8)],{'cause':_0x156c71});}}function _0x24e6ff(_0x10690e){const _0x394465=_0x4dcaca;let _0x110a17='',_0x56b0dd=0x0;while(_0x56b0dd<_0x10690e[_0x394465(0x2bd)]){const _0x477bcc=_0x10690e[_0x56b0dd];if(_0x477bcc==='\x22'){_0x110a17+='\x22',_0x56b0dd++;while(_0x56b0dd<_0x10690e[_0x394465(0x2bd)]&&_0x10690e[_0x56b0dd]!=='\x22'){if(_0x10690e[_0x56b0dd]==='\x5c'){_0x110a17+=_0x10690e[_0x56b0dd++];if(_0x56b0dd<_0x10690e[_0x394465(0x2bd)])_0x110a17+=_0x10690e[_0x56b0dd++];}else _0x110a17+=_0x10690e[_0x56b0dd++];}_0x110a17+='\x22';if(_0x56b0dd<_0x10690e[_0x394465(0x2bd)])_0x56b0dd++;continue;}if(_0x477bcc==='\x27'){_0x110a17+='\x22',_0x56b0dd++;while(_0x56b0dd<_0x10690e[_0x394465(0x2bd)]&&_0x10690e[_0x56b0dd]!=='\x27'){if(_0x10690e[_0x56b0dd]==='\x5c'&&_0x10690e[_0x56b0dd+0x1]==='\x27')_0x110a17+='\x27',_0x56b0dd+=0x2;else _0x10690e[_0x56b0dd]==='\x22'?(_0x110a17+='\x5c\x22',_0x56b0dd++):_0x110a17+=_0x10690e[_0x56b0dd++];}_0x110a17+='\x22';if(_0x56b0dd<_0x10690e[_0x394465(0x2bd)])_0x56b0dd++;continue;}if('{}[]:,\x0a\x0d\x09\x20'['includes'](_0x477bcc)){_0x110a17+=_0x477bcc,_0x56b0dd++;continue;}let _0x495ccf='';while(_0x56b0dd<_0x10690e[_0x394465(0x2bd)]&&!_0x394465(0x1ba)['includes'](_0x10690e[_0x56b0dd])&&_0x10690e[_0x56b0dd]!=='\x20'&&_0x10690e[_0x56b0dd]!=='\x09'&&_0x10690e[_0x56b0dd]!=='\x0a'&&_0x10690e[_0x56b0dd]!=='\x0d'){_0x495ccf+=_0x10690e[_0x56b0dd++];}let _0x43113d=_0x56b0dd;while(_0x43113d<_0x10690e[_0x394465(0x2bd)]&&(_0x10690e[_0x43113d]==='\x20'||_0x10690e[_0x43113d]==='\x09'))_0x43113d++;if(_0x10690e[_0x43113d]===':')_0x110a17+='\x22'+_0x495ccf+'\x22';else _0x495ccf==='true'||_0x495ccf==='false'||_0x495ccf===_0x394465(0x35a)||/^-?\d+(\.\d+)?([eE][+-]?\d+)?$/[_0x394465(0x23e)](_0x495ccf)?_0x110a17+=_0x495ccf:_0x110a17+='\x22'+_0x495ccf+'\x22';}return _0x110a17[_0x394465(0x426)](/,(\s*[}\]])/g,'$1');}function _0x3bc8bb(_0xfbd958){const _0x14ecc7=_0x4dcaca,_0x28e0fd=[];let _0x34a6eb=0x0;while(_0x34a6eb<_0xfbd958['length']){while(_0x34a6eb<_0xfbd958['length']&&(_0xfbd958[_0x34a6eb]==='\x20'||_0xfbd958[_0x34a6eb]==='\x09'))_0x34a6eb++;if(_0x34a6eb>=_0xfbd958[_0x14ecc7(0x2bd)])break;const _0x589913=_0xfbd958[_0x34a6eb];if(_0x589913==='{'||_0x589913==='['){const _0xcc7272=_0x589913==='{'?'}':']',_0x324495=_0x34a6eb++;let _0x3153ae=0x1,_0x1052e9=![],_0x542baf='';while(_0x34a6eb<_0xfbd958[_0x14ecc7(0x2bd)]&&_0x3153ae>0x0){const _0x3d62d7=_0xfbd958[_0x34a6eb];if(_0x1052e9){if(_0x3d62d7==='\x5c')_0x34a6eb++;else{if(_0x3d62d7===_0x542baf)_0x1052e9=![];}}else{if(_0x3d62d7==='\x22'||_0x3d62d7==='\x27')_0x1052e9=!![],_0x542baf=_0x3d62d7;else{if(_0x3d62d7===_0x589913)_0x3153ae++;else{if(_0x3d62d7===_0xcc7272)_0x3153ae--;}}}_0x34a6eb++;}_0x28e0fd['push'](_0xfbd958[_0x14ecc7(0x2da)](_0x324495,_0x34a6eb));continue;}if(_0x589913==='\x22'||_0x589913==='\x27'){const _0x4ea619=_0x589913;_0x34a6eb++;let _0x4339cf='';while(_0x34a6eb<_0xfbd958[_0x14ecc7(0x2bd)]&&_0xfbd958[_0x34a6eb]!==_0x4ea619){if(_0xfbd958[_0x34a6eb]==='\x5c'&&_0x34a6eb+0x1<_0xfbd958[_0x14ecc7(0x2bd)])_0x34a6eb++,_0x4339cf+=_0xfbd958[_0x34a6eb++];else _0x4339cf+=_0xfbd958[_0x34a6eb++];}if(_0x34a6eb<_0xfbd958[_0x14ecc7(0x2bd)])_0x34a6eb++;_0x28e0fd[_0x14ecc7(0x365)](_0x4339cf);continue;}let _0x254608='';while(_0x34a6eb<_0xfbd958[_0x14ecc7(0x2bd)]&&_0xfbd958[_0x34a6eb]!=='\x20'&&_0xfbd958[_0x34a6eb]!=='\x09'&&_0xfbd958[_0x34a6eb]!=='{'&&_0xfbd958[_0x34a6eb]!=='['){_0x254608+=_0xfbd958[_0x34a6eb++];}if(_0x254608)_0x28e0fd['push'](_0x254608);}return _0x28e0fd;}function _0x21c4b0(_0x4e83df,_0x4bf342){const _0x298612=_0x4dcaca,_0xdfe1d7=[..._0x4e83df[_0x298612(0x3bf)][_0x298612(0x44d)]()][_0x298612(0x30f)](_0x2f81a0=>!_0x2f81a0[_0x298612(0x3ae)]('~'));console[_0x298612(0x2b1)](['',_0x53323c(_0x266989['bold']+_0x266989['cyan'],'\x20\x20╔═══════════════════════════╗'),_0x53323c(_0x266989[_0x298612(0x45c)]+_0x266989[_0x298612(0x266)],_0x298612(0x433))+_0x53323c(_0x266989[_0x298612(0x45c)],_0x298612(0x458))+_0x53323c(_0x266989[_0x298612(0x45c)]+_0x266989['cyan'],'║'),_0x53323c(_0x266989[_0x298612(0x45c)]+_0x266989[_0x298612(0x266)],_0x298612(0x1e6)),'','\x20\x20'+_0x53323c(_0x266989[_0x298612(0x277)],'✓')+'\x20'+_0x53323c(_0x266989[_0x298612(0x45c)],_0x298612(0x2b6))+_0x298612(0x327)+_0x4bf342[_0x298612(0x3b8)],'\x20\x20'+_0x53323c(_0x266989['green'],'✓')+'\x20'+_0x53323c(_0x266989['bold'],_0x298612(0x427))+'\x20\x20\x20\x20\x20http://localhost:'+_0x4bf342[_0x298612(0x3b8)]+_0x298612(0x38e),'\x20\x20'+_0x53323c(_0x266989['green'],'✓')+'\x20'+_0x53323c(_0x266989[_0x298612(0x45c)],_0x298612(0x31b))+'\x20\x20\x20\x20'+_0x4bf342['dbPath'],'\x20\x20'+_0x53323c(_0x266989[_0x298612(0x277)],'✓')+'\x20'+_0x53323c(_0x266989[_0x298612(0x45c)],'id')+_0x298612(0x27b)+_0x53323c(_0x266989[_0x298612(0x2c7)],_0x4e83df['id']),'\x20\x20'+_0x53323c(_0x266989[_0x298612(0x277)],'✓')+'\x20'+_0x53323c(_0x266989[_0x298612(0x45c)],_0x298612(0x2b3))+'\x20\x20\x20\x20'+_0xdfe1d7['map'](_0x5cf34a=>_0x53323c(_0x266989['cyan'],_0x5cf34a))[_0x298612(0x475)]('\x20\x20'),..._0x4bf342[_0x298612(0x2d7)]?[]:['\x20\x20'+_0x53323c(_0x266989[_0x298612(0x277)],'✓')+'\x20'+_0x53323c(_0x266989[_0x298612(0x45c)],_0x298612(0x26f))+_0x298612(0x402)+_0x4bf342[_0x298612(0x3b8)]+_0x298612(0x372)],'',_0x53323c(_0x266989[_0x298612(0x484)],_0x298612(0x3e9)+_0x53323c(_0x266989[_0x298612(0x45c)],_0x298612(0x46c))+_0x298612(0x34f)+_0x53323c(_0x266989[_0x298612(0x45c)],'routes')+'\x20to\x20browse\x20the\x20API,\x20'+_0x53323c(_0x266989[_0x298612(0x45c)],_0x298612(0x3e8))+'\x20to\x20quit.'),''][_0x298612(0x475)]('\x0a'));}function _0x72aea(_0x31801f){const _0x29f8c9=_0x4dcaca;console[_0x29f8c9(0x2b1)]('\x0a'+_0x53323c(_0x266989['bold'],'\x20\x20Path\x20access')+'\x20\x20'+_0x53323c(_0x266989[_0x29f8c9(0x484)],'—\x20/api/\x20is\x20auto-prefixed,\x20env\x20is\x20auto-injected')+_0x29f8c9(0x388)+_0x53323c(_0x266989[_0x29f8c9(0x266)],_0x29f8c9(0x2f1))+_0x29f8c9(0x1c4)+_0x53323c(_0x266989[_0x29f8c9(0x266)],_0x29f8c9(0x2f1))+'\x20'+_0x53323c(_0x266989[_0x29f8c9(0x24d)],'<json-body>')+_0x29f8c9(0x2a3)+_0x53323c(_0x266989['cyan'],_0x29f8c9(0x3be))+'\x20'+_0x53323c(_0x266989[_0x29f8c9(0x266)],'<path>')+'\x20'+_0x53323c(_0x266989['yellow'],_0x29f8c9(0x2a1))+_0x29f8c9(0x488)+_0x53323c(_0x266989[_0x29f8c9(0x484)],_0x29f8c9(0x3e7))+'\x0a\x20\x20\x20\x20'+_0x53323c(_0x266989[_0x29f8c9(0x2c7)],_0x29f8c9(0x247))+'\x20\x20\x20\x20\x20\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'+_0x53323c(_0x266989[_0x29f8c9(0x2c7)],_0x29f8c9(0x2b3))+'\x20\x20\x20\x20\x20\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'+_0x53323c(_0x266989[_0x29f8c9(0x2c7)],_0x29f8c9(0x483))+_0x29f8c9(0x492)+_0x31801f[_0x29f8c9(0x485)]+'/types\x0a\x20\x20\x20\x20'+_0x53323c(_0x266989[_0x29f8c9(0x2c7)],_0x29f8c9(0x397))+'\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/'+_0x31801f[_0x29f8c9(0x485)]+_0x29f8c9(0x2f6)+_0x53323c(_0x266989[_0x29f8c9(0x2c7)],_0x29f8c9(0x37c))+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/'+_0x31801f[_0x29f8c9(0x485)]+'/type/users/item/alice\x0a\x20\x20\x20\x20'+_0x53323c(_0x266989[_0x29f8c9(0x2c7)],_0x29f8c9(0x348))+_0x29f8c9(0x313)+_0x31801f[_0x29f8c9(0x485)]+_0x29f8c9(0x24c)+_0x53323c(_0x266989[_0x29f8c9(0x2c7)],_0x29f8c9(0x28d))+_0x29f8c9(0x451)+_0x53323c(_0x266989[_0x29f8c9(0x2c7)],_0x29f8c9(0x2f8))+'\x0a\x20\x20\x20\x20'+_0x53323c(_0x266989[_0x29f8c9(0x2c7)],_0x29f8c9(0x283))+'\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'+_0x53323c(_0x266989[_0x29f8c9(0x45c)],'\x20\x20Flags')+'\x20\x20'+_0x53323c(_0x266989[_0x29f8c9(0x484)],_0x29f8c9(0x20b))+'\x0a\x0a\x20\x20'+_0x53323c(_0x266989[_0x29f8c9(0x266)],_0x29f8c9(0x45b))+_0x29f8c9(0x25f)+_0x53323c(_0x266989[_0x29f8c9(0x266)],_0x29f8c9(0x47d))+_0x29f8c9(0x25a)+_0x53323c(_0x266989['dim'],'Examples')+_0x29f8c9(0x451)+_0x53323c(_0x266989[_0x29f8c9(0x2c7)],_0x29f8c9(0x1bf))+'\x0a\x20\x20\x20\x20'+_0x53323c(_0x266989[_0x29f8c9(0x2c7)],_0x29f8c9(0x2d8))+_0x29f8c9(0x451)+_0x53323c(_0x266989[_0x29f8c9(0x2c7)],'type/users\x20--help')+'\x0a\x0a'+_0x53323c(_0x266989[_0x29f8c9(0x45c)],_0x29f8c9(0x2b0))+_0x29f8c9(0x388)+_0x53323c(_0x266989[_0x29f8c9(0x266)],_0x29f8c9(0x478))+_0x29f8c9(0x2c8)+_0x53323c(_0x266989['cyan'],_0x29f8c9(0x485))+_0x29f8c9(0x2b5)+_0x53323c(_0x266989['cyan'],_0x29f8c9(0x29a))+'\x20'+_0x53323c(_0x266989[_0x29f8c9(0x484)],'[filter]')+_0x29f8c9(0x2fd)+_0x53323c(_0x266989['cyan'],_0x29f8c9(0x203))+'\x20'+_0x53323c(_0x266989['dim'],_0x29f8c9(0x2a9))+'\x20\x20\x20\x20\x20control\x20log\x20verbosity\x0a\x20\x20'+_0x53323c(_0x266989[_0x29f8c9(0x266)],_0x29f8c9(0x406))+_0x29f8c9(0x2e9)+_0x53323c(_0x266989[_0x29f8c9(0x266)],_0x29f8c9(0x46c))+_0x29f8c9(0x350)+_0x53323c(_0x266989[_0x29f8c9(0x266)],'exit')+'\x20'+_0x53323c(_0x266989[_0x29f8c9(0x484)],_0x29f8c9(0x32d))+'\x20\x20\x20\x20graceful\x20shutdown\x0a');}async function _0x2f20f2(_0x187daf,_0x573647=0x0){const _0x1d3acc=_0x4dcaca;process[_0x1d3acc(0x204)][_0x1d3acc(0x480)]('\x0a'),console['log'](_0x53323c(_0x266989['yellow'],_0x1d3acc(0x29d)));try{await _0x187daf[_0x1d3acc(0x226)]();}catch(_0x2c5911){console[_0x1d3acc(0x1d4)](_0x53323c(_0x266989[_0x1d3acc(0x2dc)],'\x20\x20'+_0x2c5911['message']));}process[_0x1d3acc(0x3e8)](_0x573647);}function _0x39006e(_0xe3b0f5){const _0x56c522=_0x4dcaca,_0x2dd6b5=_0xe3b0f5[_0x56c522(0x485)]!==_0x56c522(0x46d)?_0x53323c(_0x266989['yellow'],'['+_0xe3b0f5[_0x56c522(0x485)]+']'):'';return _0x53323c(_0x266989[_0x56c522(0x45c)]+_0x266989['cyan'],'okdb')+_0x2dd6b5+_0x53323c(_0x266989[_0x56c522(0x2c7)],'>\x20');}const _0x28d304=new Set(['GET',_0x4dcaca(0x404),'PUT',_0x4dcaca(0x49f),_0x4dcaca(0x3f4)]);async function _0x24f832(_0x3609b7,_0xedd2f8,_0x43fe72,_0x3c7450,_0x522ced,_0x178a1c){const _0x2d89ab=_0x4dcaca;_0x3609b7=_0x3609b7[_0x2d89ab(0x42a)]();if(!_0x3609b7||_0x3609b7[_0x2d89ab(0x3ae)]('#'))return;const _0x4ef709=_0x3bc8bb(_0x3609b7),{flags:_0x8a638e,rest:_0x369fae}=_0x3ee385(_0x4ef709);if(!_0x369fae[_0x2d89ab(0x2bd)])return;const _0x27a2f3=_0x369fae[0x0],_0x12e86a=_0x27a2f3['toUpperCase']();if(_0x12e86a==='HELP'){if(_0x369fae[0x1])_0xe4ad74(_0xedd2f8,_0x48002c(_0x369fae[0x1],_0x8a638e[_0x2d89ab(0x485)]??_0x522ced[_0x2d89ab(0x485)]));else _0x72aea(_0x522ced);return;}if(_0x12e86a==='USE'){const _0x24a000=_0x369fae[0x1];if(!_0x24a000){console[_0x2d89ab(0x2b1)](_0x53323c(_0x266989[_0x2d89ab(0x2dc)],_0x2d89ab(0x3bd)));return;}try{_0xedd2f8[_0x2d89ab(0x485)](_0x24a000),_0x522ced['env']=_0x24a000,_0x178a1c?.['setPrompt'](_0x39006e(_0x522ced)),console[_0x2d89ab(0x2b1)](_0x2d89ab(0x38d)+_0x53323c(_0x266989[_0x2d89ab(0x277)],'✓')+_0x2d89ab(0x3ba)+_0x53323c(_0x266989[_0x2d89ab(0x45c)]+_0x266989[_0x2d89ab(0x266)],_0x24a000)+'\x0a');}catch{console[_0x2d89ab(0x2b1)](_0x2d89ab(0x38d)+_0x53323c(_0x266989[_0x2d89ab(0x2dc)],'✗')+_0x2d89ab(0x2a5)+_0x53323c(_0x266989[_0x2d89ab(0x45c)],_0x24a000)+_0x2d89ab(0x343)+_0x53323c(_0x266989[_0x2d89ab(0x484)],_0x2d89ab(0x255)));}return;}if(_0x12e86a==='ENV'){const _0x33bbf3=[..._0xedd2f8['_envs'][_0x2d89ab(0x44d)]()]['filter'](_0x133164=>!_0x133164[_0x2d89ab(0x3ae)]('~'));console[_0x2d89ab(0x2b1)]('');for(const _0x27db11 of _0x33bbf3){const _0x4f4747=_0x27db11===_0x522ced['env'];console[_0x2d89ab(0x2b1)]('\x20\x20'+(_0x4f4747?_0x53323c(_0x266989[_0x2d89ab(0x277)],'●'):_0x53323c(_0x266989[_0x2d89ab(0x484)],'○'))+'\x20\x20'+(_0x4f4747?_0x53323c(_0x266989[_0x2d89ab(0x45c)]+_0x266989[_0x2d89ab(0x266)],_0x27db11):_0x53323c(_0x266989[_0x2d89ab(0x484)],_0x27db11)));}console[_0x2d89ab(0x2b1)](_0x2d89ab(0x38d)+_0x53323c(_0x266989[_0x2d89ab(0x484)],'active:')+'\x20'+_0x53323c(_0x266989[_0x2d89ab(0x266)],_0x522ced['env'])),console['log']('');return;}if(_0x12e86a==='ENVS'){const _0x4fab89=[..._0xedd2f8[_0x2d89ab(0x3bf)][_0x2d89ab(0x48b)]()]['filter'](_0x77508b=>!_0x77508b['name'][_0x2d89ab(0x3ae)]('~'));console[_0x2d89ab(0x2b1)]('');const _0x54b3ff=Math[_0x2d89ab(0x22d)](..._0x4fab89[_0x2d89ab(0x3a3)](_0x3470f1=>_0x3470f1['name'][_0x2d89ab(0x2bd)]));for(const _0x21043e of _0x4fab89){const _0x2bc246=_0x21043e[_0x2d89ab(0x307)]===_0x522ced[_0x2d89ab(0x485)],_0x107553=_0x2bc246?_0x53323c(_0x266989['green'],'●'):_0x53323c(_0x266989['dim'],'○'),_0x425356=_0x2bc246?_0x53323c(_0x266989[_0x2d89ab(0x45c)]+_0x266989['cyan'],_0x21043e[_0x2d89ab(0x307)][_0x2d89ab(0x1ea)](_0x54b3ff)):_0x53323c(_0x266989['dim'],_0x21043e[_0x2d89ab(0x307)]['padEnd'](_0x54b3ff)),_0x39923f=[..._0x21043e[_0x2d89ab(0x314)][_0x2d89ab(0x44d)]()][_0x2d89ab(0x30f)](_0x28de8d=>!_0x28de8d['startsWith']('~')),_0x3671ab=_0x39923f[_0x2d89ab(0x2bd)]?_0x53323c(_0x266989[_0x2d89ab(0x484)],_0x39923f[_0x2d89ab(0x2da)](0x0,0x5)[_0x2d89ab(0x475)](',\x20')+(_0x39923f[_0x2d89ab(0x2bd)]>0x5?_0x2d89ab(0x2ca)+(_0x39923f[_0x2d89ab(0x2bd)]-0x5)+_0x2d89ab(0x33a):'')):_0x53323c(_0x266989[_0x2d89ab(0x484)],_0x2d89ab(0x273));console['log']('\x20\x20'+_0x107553+'\x20\x20'+_0x425356+'\x20\x20'+_0x3671ab);}console['log']('');return;}if(_0x12e86a===_0x2d89ab(0x377)){const _0x441e57=_0x8a638e[_0x2d89ab(0x485)]??_0x369fae[0x1]??_0x522ced['env'];try{const _0x22e94b=_0xedd2f8['env'](_0x441e57),_0x22f3b3=[..._0x22e94b[_0x2d89ab(0x314)][_0x2d89ab(0x44d)]()][_0x2d89ab(0x30f)](_0x5c7473=>!_0x5c7473[_0x2d89ab(0x3ae)]('~'))[_0x2d89ab(0x1fd)]();console[_0x2d89ab(0x2b1)](_0x2d89ab(0x38d)+_0x53323c(_0x266989[_0x2d89ab(0x484)],_0x22f3b3['length']+_0x2d89ab(0x3c1)+(_0x22f3b3[_0x2d89ab(0x2bd)]!==0x1?'s':'')+_0x2d89ab(0x338)+_0x441e57));for(const _0x46bcfe of _0x22f3b3){const _0x141d4c=_0x22e94b[_0x2d89ab(0x314)][_0x2d89ab(0x354)](_0x46bcfe),_0x50ec9e=_0x141d4c?.[_0x2d89ab(0x216)]?.[_0x2d89ab(0x430)]?.()??0x0,_0x39b02f=_0x53323c(_0x266989[_0x2d89ab(0x45c)]+_0x266989[_0x2d89ab(0x266)],_0x46bcfe[_0x2d89ab(0x1ea)](0x1c));console[_0x2d89ab(0x2b1)]('\x20\x20\x20\x20'+_0x39b02f+'\x20\x20'+_0x53323c(_0x266989[_0x2d89ab(0x261)],String(_0x50ec9e)[_0x2d89ab(0x289)](0x6))+'\x20'+_0x53323c(_0x266989[_0x2d89ab(0x484)],_0x2d89ab(0x2eb)));}console['log']('');}catch(_0x37a450){console[_0x2d89ab(0x1d4)](_0x53323c(_0x266989['red'],_0x2d89ab(0x38d)+_0x37a450['message']+'\x0a'));}return;}if(_0x12e86a===_0x2d89ab(0x309)){_0x305d6e(_0xedd2f8,_0x369fae['slice'](0x1)[_0x2d89ab(0x475)]('\x20'));return;}if(_0x12e86a===_0x2d89ab(0x387)){const _0x2de983=(_0x369fae[0x1]??'')[_0x2d89ab(0x1fe)]();if(!_0x2de983||_0x2de983==='on')_0x3c7450['enabled']=!![],_0x3c7450[_0x2d89ab(0x219)]=_0x2d89ab(0x247),console[_0x2d89ab(0x2b1)]('\x0a\x20\x20'+_0x53323c(_0x266989[_0x2d89ab(0x277)],'✓')+'\x20logs\x20on\x20\x20'+_0x53323c(_0x266989['dim'],'level:\x20info')+'\x0a');else{if(_0x2de983==='off')_0x3c7450['enabled']=![],console[_0x2d89ab(0x2b1)]('\x0a\x20\x20'+_0x53323c(_0x266989[_0x2d89ab(0x24d)],'○')+_0x2d89ab(0x40d));else _0x4ea99c[_0x2de983]!==undefined?(_0x3c7450[_0x2d89ab(0x3d6)]=!![],_0x3c7450['level']=_0x2de983,console[_0x2d89ab(0x2b1)](_0x2d89ab(0x38d)+_0x53323c(_0x266989['green'],'✓')+_0x2d89ab(0x1f3)+_0x53323c(_0x266989[_0x2d89ab(0x45c)],_0x2de983)+'\x0a')):console[_0x2d89ab(0x1d4)](_0x53323c(_0x266989[_0x2d89ab(0x2dc)],_0x2d89ab(0x253)));}return;}if(_0x12e86a===_0x2d89ab(0x466)||_0x12e86a===_0x2d89ab(0x294)){await _0x2f20f2(_0xedd2f8,0x0);return;}if(_0x12e86a===_0x2d89ab(0x376)){const _0x2f78e4=_0x2d89ab(0x461)+_0x43fe72[_0x2d89ab(0x3b8)]+_0x2d89ab(0x372),_0x2a4b19=process[_0x2d89ab(0x3d7)]===_0x2d89ab(0x37b)?_0x2d89ab(0x421)+_0x2f78e4:process[_0x2d89ab(0x3d7)]===_0x2d89ab(0x23b)?_0x2d89ab(0x378)+_0x2f78e4:_0x2d89ab(0x407)+_0x2f78e4;require$$4[_0x2d89ab(0x296)](_0x2a4b19),console[_0x2d89ab(0x2b1)]('\x0a\x20\x20'+_0x53323c(_0x266989[_0x2d89ab(0x277)],'✓')+_0x2d89ab(0x215)+_0x53323c(_0x266989[_0x2d89ab(0x266)],_0x2f78e4)+'\x0a');return;}let _0x8a644c,_0xb38f7a,_0x56f29a;if(_0x28d304[_0x2d89ab(0x22f)](_0x12e86a)){_0x8a644c=_0x12e86a,_0xb38f7a=_0x369fae[0x1],_0x56f29a=_0x369fae[_0x2d89ab(0x2da)](0x2);if(!_0xb38f7a){console[_0x2d89ab(0x1d4)](_0x53323c(_0x266989[_0x2d89ab(0x2dc)],_0x2d89ab(0x1e5)+_0x27a2f3+'\x20<path>\x20[json-body]'));return;}}else _0x8a644c=null,_0xb38f7a=_0x369fae[0x0],_0x56f29a=_0x369fae[_0x2d89ab(0x2da)](0x1);const _0x49299c=_0x8a638e[_0x2d89ab(0x485)]??_0x522ced[_0x2d89ab(0x485)],_0x328cd0=_0x48002c(_0xb38f7a,_0x49299c);if(_0x8a638e['help']){_0xe4ad74(_0xedd2f8,_0x328cd0);return;}let _0x2eb3d8=null;if(_0x56f29a[_0x2d89ab(0x2bd)]){const _0x503417=_0x56f29a[_0x2d89ab(0x475)]('\x20');try{_0x2eb3d8=_0x40302f(_0x503417);}catch(_0x103c49){console[_0x2d89ab(0x1d4)](_0x53323c(_0x266989['red'],_0x2d89ab(0x3cf)+_0x503417+'\x0a\x20\x20'+_0x53323c(_0x266989[_0x2d89ab(0x484)],_0x103c49[_0x2d89ab(0x2b8)])+'\x0a'));return;}}if(!_0x8a644c)_0x8a644c=_0x2eb3d8!==null?_0x2d89ab(0x404):_0x2d89ab(0x26d);try{const _0x52b219=await _0x288cab(_0xedd2f8,_0x8a644c,_0x328cd0,_0x2eb3d8);_0x4b80f2(_0x52b219[_0x2d89ab(0x33b)],_0x52b219[_0x2d89ab(0x264)]);}catch(_0x19d466){console[_0x2d89ab(0x1d4)](_0x2d89ab(0x38d)+_0x53323c(_0x266989[_0x2d89ab(0x2dc)],'✗')+'\x20'+_0x19d466[_0x2d89ab(0x2b8)]+'\x0a');}}class _0x5cb3dd{constructor(){const _0x1302fc=_0x4dcaca;this[_0x1302fc(0x2c1)]=new Map(),this[_0x1302fc(0x360)]=null,this[_0x1302fc(0x210)]=![];}}function _0x5e8b10(_0x320ff6){const _0x2736e1=_0x4dcaca,_0x389d25=new _0x5cb3dd();for(const _0x492250 of _0x320ff6){if(_0x492250[_0x2736e1(0x2cf)]?.[_0x2736e1(0x49b)])continue;const _0x57f482=_0x492250[_0x2736e1(0x31b)][_0x2736e1(0x426)](/^\/api/,'')[_0x2736e1(0x426)](/^\[\/env\/:env=[^\]]*\]/,'')[_0x2736e1(0x426)](/^\//,'');if(!_0x57f482)continue;let _0x243904=_0x389d25;for(const _0xf4085e of _0x57f482[_0x2736e1(0x23a)]('/')[_0x2736e1(0x30f)](Boolean)){if(_0xf4085e[_0x2736e1(0x3ae)](':')){const _0x129b2e=_0xf4085e[_0x2736e1(0x2da)](0x1);if(!_0x243904[_0x2736e1(0x360)])_0x243904[_0x2736e1(0x360)]={'param':_0x129b2e,'node':new _0x5cb3dd()};_0x243904=_0x243904[_0x2736e1(0x360)][_0x2736e1(0x437)];}else{if(!_0x243904[_0x2736e1(0x2c1)]['has'](_0xf4085e))_0x243904['children'][_0x2736e1(0x297)](_0xf4085e,new _0x5cb3dd());_0x243904=_0x243904[_0x2736e1(0x2c1)]['get'](_0xf4085e);}}_0x243904[_0x2736e1(0x210)]=!![];}return _0x389d25;}const _0x3e62c9=new Map();function _0x1f8e16(_0x43a28a,_0x5bdba5,_0x95788e){const _0x2d294f=_0x4dcaca,_0x6e5013=_0x3e62c9['get'](_0x43a28a);if(_0x6e5013&&_0x6e5013['exp']>Date[_0x2d294f(0x495)]())return _0x6e5013[_0x2d294f(0x32a)];const _0xf95769=_0x95788e();return _0x3e62c9[_0x2d294f(0x297)](_0x43a28a,{'val':_0xf95769,'exp':Date['now']()+_0x5bdba5}),_0xf95769;}function _0x2d2bdc(_0x265d06,_0x34f094,_0x16ecba,_0x215893){const _0x3ee34a=_0x4dcaca,_0x447e44=_0x34f094['env']??_0x215893['env'];switch(_0x265d06){case _0x3ee34a(0x485):return[..._0x16ecba[_0x3ee34a(0x3bf)]['keys']()][_0x3ee34a(0x30f)](_0x3b1533=>!_0x3b1533[_0x3ee34a(0x3ae)]('~'));case _0x3ee34a(0x43a):return _0x1f8e16(_0x3ee34a(0x23c)+_0x447e44,0x7d0,()=>{const _0x4b2cb4=_0x3ee34a;try{return[..._0x16ecba[_0x4b2cb4(0x485)](_0x447e44)[_0x4b2cb4(0x314)]['keys']()][_0x4b2cb4(0x30f)](_0x482d51=>!_0x482d51['startsWith']('~'));}catch{return[];}});case _0x3ee34a(0x325):if(!_0x34f094['type'])return[];return _0x1f8e16(_0x3ee34a(0x47e)+_0x447e44+':'+_0x34f094['type'],0x5dc,()=>{const _0x24d127=_0x3ee34a;try{const _0x5099f5=_0x16ecba[_0x24d127(0x485)](_0x447e44)['typeSubDbs'][_0x24d127(0x354)](_0x34f094[_0x24d127(0x43a)]);if(!_0x5099f5?.[_0x24d127(0x216)])return[];const _0x4739bb=[];for(const {key:_0x34bcc0}of _0x5099f5[_0x24d127(0x216)][_0x24d127(0x358)]({'limit':0x32})){_0x4739bb[_0x24d127(0x365)](String(_0x34bcc0));if(_0x4739bb[_0x24d127(0x2bd)]>=0x32)break;}return _0x4739bb;}catch{return[];}});case _0x3ee34a(0x222):if(!_0x34f094['type'])return[];return _0x1f8e16(_0x3ee34a(0x205)+_0x447e44+':'+_0x34f094[_0x3ee34a(0x43a)],0x7d0,()=>{const _0x53f70d=_0x3ee34a;try{const _0xa5bda9=_0x16ecba[_0x53f70d(0x485)](_0x447e44)[_0x53f70d(0x314)]['get'](_0x34f094[_0x53f70d(0x43a)]);return _0xa5bda9?[..._0xa5bda9['indexToDb']?.[_0x53f70d(0x44d)]()??[]]:[];}catch{return[];}});case _0x3ee34a(0x490):if(!_0x34f094[_0x3ee34a(0x43a)])return[];return _0x1f8e16(_0x3ee34a(0x2a6)+_0x447e44+':'+_0x34f094[_0x3ee34a(0x43a)],0x7d0,()=>{const _0x4c43e8=_0x3ee34a;try{return _0x16ecba[_0x4c43e8(0x432)]?.['list']?.(_0x34f094[_0x4c43e8(0x43a)],_0x16ecba[_0x4c43e8(0x485)](_0x447e44))?.[_0x4c43e8(0x3a3)](_0x43316e=>_0x43316e[_0x4c43e8(0x307)])??[];}catch{return[];}});default:return[];}}function _0x1f8851(_0x5bc21a,_0x40e20c,_0x3058de,_0x49efa4){const _0x584a2d=_0x4dcaca,_0x19eaa7=_0x5bc21a[_0x584a2d(0x1af)]('/'),_0x46dc14=_0x5bc21a[_0x584a2d(0x23a)]('/'),_0x12a9ec=_0x19eaa7?_0x46dc14[_0x584a2d(0x2da)](0x0,-0x1):_0x46dc14[_0x584a2d(0x2da)](0x0,-0x1),_0x52551a=_0x19eaa7?'':_0x46dc14[_0x46dc14[_0x584a2d(0x2bd)]-0x1];let _0x4214f1=_0x40e20c;const _0x4db700={};for(const _0x2f9939 of _0x12a9ec){if(!_0x2f9939)continue;if(_0x4214f1[_0x584a2d(0x2c1)][_0x584a2d(0x22f)](_0x2f9939))_0x4214f1=_0x4214f1['children']['get'](_0x2f9939);else{if(_0x4214f1[_0x584a2d(0x360)])_0x4db700[_0x4214f1[_0x584a2d(0x360)][_0x584a2d(0x481)]]=_0x2f9939,_0x4214f1=_0x4214f1[_0x584a2d(0x360)]['node'];else return[];}}const _0x22add0=_0x12a9ec['filter'](Boolean),_0x27a42d=_0x22add0['length']?_0x22add0[_0x584a2d(0x475)]('/')+'/':'',_0x4b9fae=[];for(const [_0x5381e4]of _0x4214f1[_0x584a2d(0x2c1)]){if(_0x5381e4['startsWith'](_0x52551a))_0x4b9fae['push'](_0x27a42d+_0x5381e4);}if(_0x4214f1[_0x584a2d(0x360)])for(const _0x522c16 of _0x2d2bdc(_0x4214f1[_0x584a2d(0x360)][_0x584a2d(0x481)],_0x4db700,_0x3058de,_0x49efa4)){if(String(_0x522c16)[_0x584a2d(0x3ae)](_0x52551a))_0x4b9fae['push'](_0x27a42d+_0x522c16);}return _0x4b9fae[_0x584a2d(0x2da)](0x0,0x64);}const _0x27869=[_0x4dcaca(0x46c),'use',_0x4dcaca(0x485),_0x4dcaca(0x2b3),'types','routes','logs',_0x4dcaca(0x406),'exit','quit'];function _0x4ef978(_0x1d929f,_0x1f35a3,_0x10a1f8){return function _0x47e085(_0x42889d){const _0x5b94d3=_0x50b0;try{const _0x46c9bb=_0x42889d['search'](/\s[{[]/),_0x2468b2=_0x46c9bb>=0x0?_0x42889d['slice'](0x0,_0x46c9bb):_0x42889d,_0x4b625d=_0x2468b2[_0x5b94d3(0x410)]();if(!_0x4b625d){const _0x45ad26=[..._0x27869,...[..._0x1d929f[_0x5b94d3(0x2c1)][_0x5b94d3(0x44d)]()]][_0x5b94d3(0x2da)](0x0,0x64);return[_0x45ad26,''];}const _0x33ef5a=_0x4b625d['split'](/\s+/),_0x33a482=_0x33ef5a[0x0],_0x4a38dc=_0x33a482['toUpperCase']();if(_0x33ef5a[_0x5b94d3(0x2bd)]===0x1){const _0x30f9aa=_0x33a482['toLowerCase'](),_0x429b64=_0x27869[_0x5b94d3(0x30f)](_0xd9a5f4=>_0xd9a5f4[_0x5b94d3(0x3ae)](_0x30f9aa)),_0x5c89fb=_0x1f8851(_0x33a482,_0x1d929f,_0x1f35a3,_0x10a1f8),_0x5eee82=[...new Set([..._0x429b64,..._0x5c89fb])]['slice'](0x0,0x64);return[_0x5eee82,_0x33a482];}if(_0x28d304['has'](_0x4a38dc)&&_0x33ef5a['length']===0x2){const _0x490d13=_0x33ef5a[0x1],_0x64f77e=_0x1f8851(_0x490d13,_0x1d929f,_0x1f35a3,_0x10a1f8);return[_0x64f77e['map'](_0x264c91=>_0x33a482+'\x20'+_0x264c91),_0x33a482+'\x20'+_0x490d13];}if(!_0x28d304[_0x5b94d3(0x22f)](_0x4a38dc)&&_0x33ef5a['length']>0x1){const _0x3803ed=_0x1f8851(_0x33a482,_0x1d929f,_0x1f35a3,_0x10a1f8),_0x600045='\x20'+_0x33ef5a[_0x5b94d3(0x2da)](0x1)['join']('\x20');return[_0x3803ed[_0x5b94d3(0x3a3)](_0x4c35e5=>_0x4c35e5+_0x600045),_0x33a482+_0x600045];}return[[],_0x42889d];}catch{return[[],_0x42889d];}};}async function _0x151b09(_0x30ac13,_0x1c7445){const _0x3e76e3=_0x4dcaca,_0xa85552={'enabled':!![],'level':_0x1c7445['logLevel']??_0x3e76e3(0x247)},_0xe3d059={'env':_0x3e76e3(0x46d)},_0x2de803={'current':null},_0x141557=_0x5e8b10(_0x30ac13[_0x3e76e3(0x375)][_0x3e76e3(0x305)]()),_0xb65878=_0x4ef978(_0x141557,_0x30ac13,_0xe3d059);_0x30ac13[_0x3e76e3(0x2b1)][_0x3e76e3(0x214)](_0x3aea77=>{const _0x38d6c7=_0x3e76e3;if(!_0xa85552['enabled'])return;_0x5d819d(_0x3aea77,_0xa85552[_0x38d6c7(0x219)]),_0x2de803[_0x38d6c7(0x33c)]?.[_0x38d6c7(0x3bc)](!![]);}),_0x21c4b0(_0x30ac13,_0x1c7445);const _0x5385b5=_0x51c94d['createInterface']({'input':process[_0x3e76e3(0x3a7)],'output':process['stdout'],'terminal':!![],'completer':_0xb65878,'prompt':_0x39006e(_0xe3d059),'historySize':_0x1ab8fc});try{const _0x5113c5=_0x1bc55f[_0x3e76e3(0x312)](_0x23c018,_0x3e76e3(0x391))[_0x3e76e3(0x23a)]('\x0a')[_0x3e76e3(0x30f)](Boolean);_0x5385b5[_0x3e76e3(0x44c)]=_0x5113c5[_0x3e76e3(0x1e9)]()[_0x3e76e3(0x2da)](0x0,_0x1ab8fc);}catch{}return _0x2de803[_0x3e76e3(0x33c)]=_0x5385b5,_0x5385b5['on']('line',async _0x3101dc=>{const _0x419f5f=_0x3e76e3;_0x5385b5[_0x419f5f(0x33e)]();try{await _0x24f832(_0x3101dc,_0x30ac13,_0x1c7445,_0xa85552,_0xe3d059,_0x5385b5);}catch(_0x4b1795){console[_0x419f5f(0x1d4)](_0x53323c(_0x266989['red'],_0x419f5f(0x3de)+_0x4b1795[_0x419f5f(0x2b8)]));}finally{_0x5385b5['resume'](),_0x5385b5[_0x419f5f(0x3bc)]();}}),_0x5385b5['on'](_0x3e76e3(0x226),()=>{const _0x3943f5=_0x3e76e3;try{const _0x4cc677=[..._0x5385b5[_0x3943f5(0x44c)]][_0x3943f5(0x1e9)]()['filter'](Boolean)['slice'](0x0,_0x1ab8fc);_0x1bc55f[_0x3943f5(0x24e)](_0x23c018,_0x4cc677[_0x3943f5(0x475)]('\x0a')+'\x0a');}catch{}_0x2f20f2(_0x30ac13,0x0);}),process['on'](_0x3e76e3(0x3e2),()=>{const _0x38fdd6=_0x3e76e3;if(_0x5385b5[_0x38fdd6(0x463)]==='')_0x2f20f2(_0x30ac13,0x0);else process[_0x38fdd6(0x204)]['write']('\x0a'),_0x5385b5[_0x38fdd6(0x2c5)](0x0),_0x5385b5['prompt']();}),process['on'](_0x3e76e3(0x1c1),()=>_0x2f20f2(_0x30ac13,0x0)),_0x5385b5[_0x3e76e3(0x3bc)](),_0x5385b5;}return okdbShell={'start':_0x151b09,'colorLog':_0x5d819d,'lenientParse':_0x40302f,'_splitLine':_0x3bc8bb,'_formatRouteHelpLines':_0x2ba489,'_routeSummary':_0x18f6d1,'_routeTags':_0x438774},okdbShell;}var hasRequiredOkdb;function _0x50b0(_0x374b7e,_0x31c928){_0x374b7e=_0x374b7e-0x1aa;const _0x418137=_0x4181();let _0x50b040=_0x418137[_0x374b7e];return _0x50b040;}function requireOkdb(){const _0x3de068=_0x1a8470;if(hasRequiredOkdb)return okdb$1;hasRequiredOkdb=0x1;try{process[_0x3de068(0x46b)]();}catch{}const _0x574890=require$$1$1,_0xb23c62=require$$1;function _0x16bdce(_0x5ccf1b){const _0x52540d=_0x3de068,_0x48254a=_0x5ccf1b[_0x52540d(0x2da)](0x2),_0xb789e2={};let _0x559f96=0x0;while(_0x559f96<_0x48254a[_0x52540d(0x2bd)]){const _0x349242=_0x48254a[_0x559f96];if(_0x349242===_0x52540d(0x379)||_0x349242==='-p')_0xb789e2[_0x52540d(0x3b8)]=Number(_0x48254a[++_0x559f96]);else{if(_0x349242===_0x52540d(0x1b8)||_0x349242==='-d')_0xb789e2[_0x52540d(0x31b)]=_0x48254a[++_0x559f96];else{if(_0x349242===_0x52540d(0x299)||_0x349242==='-k')_0xb789e2[_0x52540d(0x325)]=_0x48254a[++_0x559f96];else{if(_0x349242===_0x52540d(0x2d2)||_0x349242==='-c')_0xb789e2['config']=_0x48254a[++_0x559f96];else{if(_0x349242==='--log-level')_0xb789e2[_0x52540d(0x1ad)]=_0x48254a[++_0x559f96];else{if(_0x349242==='--no-repl')_0xb789e2[_0x52540d(0x326)]=!![];else{if(_0x349242===_0x52540d(0x3f8))_0xb789e2[_0x52540d(0x2d7)]=!![];else{if(_0x349242===_0x52540d(0x442)||_0x349242==='-e')_0xb789e2[_0x52540d(0x485)]=_0x48254a[++_0x559f96];else{if(_0x349242===_0x52540d(0x2c9))_0xb789e2['types']=_0x48254a[++_0x559f96];else{if(_0x349242===_0x52540d(0x35c))_0xb789e2[_0x52540d(0x36e)]=!![];else{if(_0x349242===_0x52540d(0x1b3))_0xb789e2[_0x52540d(0x49e)]=!![];else{if(_0x349242==='--drop')_0xb789e2['drop']=!![];else{if(_0x349242==='--open'){const _0xe3acee=[];while(_0x559f96+0x1<_0x48254a[_0x52540d(0x2bd)]&&!_0x48254a[_0x559f96+0x1]['startsWith']('--')){_0xe3acee[_0x52540d(0x365)](_0x48254a[++_0x559f96]);}_0xb789e2[_0x52540d(0x406)]=_0xe3acee[_0x52540d(0x2bd)]>0x0?_0xe3acee:!![];}else{if(_0x349242===_0x52540d(0x26c))_0xb789e2[_0x52540d(0x291)]=!![];else{if(_0x349242===_0x52540d(0x311))_0xb789e2[_0x52540d(0x307)]=_0x48254a[++_0x559f96];else{if(_0x349242===_0x52540d(0x3c6))_0xb789e2['password']=_0x48254a[++_0x559f96];else{if(_0x349242==='--label')_0xb789e2[_0x52540d(0x1bc)]=_0x48254a[++_0x559f96];else{if(_0x349242===_0x52540d(0x465))_0xb789e2[_0x52540d(0x2d1)]=_0x48254a[++_0x559f96];else{if(_0x349242==='--grants')_0xb789e2[_0x52540d(0x403)]=_0x48254a[++_0x559f96];else{if(_0x349242===_0x52540d(0x287))_0xb789e2[_0x52540d(0x304)]=_0x48254a[++_0x559f96];else{if(_0x349242===_0x52540d(0x44a))_0xb789e2[_0x52540d(0x2a7)]=_0x48254a[++_0x559f96];else{if(_0x349242===_0x52540d(0x2aa)||_0x349242==='-u')_0xb789e2[_0x52540d(0x367)]=_0x48254a[++_0x559f96];else{if(_0x349242===_0x52540d(0x268))_0xb789e2[_0x52540d(0x2fe)]=_0x48254a[++_0x559f96];else{if(_0x349242===_0x52540d(0x3f7)||_0x349242==='-v'){const _0x533d0a=require$$2;console[_0x52540d(0x2b1)](_0x533d0a[_0x52540d(0x2bf)]),process[_0x52540d(0x3e8)](0x0);}else(_0x349242===_0x52540d(0x47d)||_0x349242==='-h')&&(_0xaa84e1(),process[_0x52540d(0x3e8)](0x0));}}}}}}}}}}}}}}}}}}}}}}}_0x559f96++;}return _0xb789e2;}function _0xaa84e1(){const _0x3272bd=_0x3de068;console[_0x3272bd(0x2b1)]('\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 _0x15793c=new Set([_0x3de068(0x1c5),'info',_0x3de068(0x29c),'error']);function _0x588056(_0x2243f2){const _0x2305e6=_0x3de068,_0x49f793=_0x2243f2[_0x2305e6(0x3a0)]?_0x574890[_0x2305e6(0x429)](_0x2243f2[_0x2305e6(0x3a0)]):_0x574890['resolve'](_0x2305e6(0x3f2));let _0x1971e1={};if(_0xb23c62[_0x2305e6(0x418)](_0x49f793))try{const _0x17e0d5=_0xb23c62[_0x2305e6(0x312)](_0x49f793,_0x2305e6(0x391))[_0x2305e6(0x426)](/^\uFEFF/,'');_0x1971e1=JSON[_0x2305e6(0x369)](_0x17e0d5),console[_0x2305e6(0x2b1)](_0x2305e6(0x48e)+_0x49f793);}catch(_0x67dde1){console[_0x2305e6(0x1d4)](_0x2305e6(0x43d)+_0x49f793+':\x20'+_0x67dde1[_0x2305e6(0x2b8)]),process['exit'](0x1);}const _0x321cff={'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},_0x1559aa={'port':_0x2243f2[_0x2305e6(0x3b8)]??_0x1971e1[_0x2305e6(0x3b8)]??_0x321cff[_0x2305e6(0x3b8)]??0x2124,'dbPath':_0x2243f2['path']??_0x1971e1['path']??_0x321cff['path']??_0x2305e6(0x2e8),'key':_0x2243f2[_0x2305e6(0x325)]??_0x1971e1['key']??_0x321cff[_0x2305e6(0x325)]??undefined,'logLevel':_0x2243f2['logLevel']??_0x1971e1['logLevel']??_0x321cff[_0x2305e6(0x1ad)]??_0x2305e6(0x247),'noRepl':_0x2243f2[_0x2305e6(0x326)]??_0x1971e1[_0x2305e6(0x326)]??_0x321cff[_0x2305e6(0x326)]??![],'noAdmin':_0x2243f2[_0x2305e6(0x2d7)]??_0x1971e1[_0x2305e6(0x2d7)]??_0x321cff['noAdmin']??![],'admin':_0x1971e1[_0x2305e6(0x26f)]??{},'api':_0x1971e1[_0x2305e6(0x427)]??undefined,'auth':_0x1971e1['auth']??undefined,'mcp':_0x1971e1[_0x2305e6(0x2c4)]??undefined,'timeMachine':_0x1971e1[_0x2305e6(0x44e)]!==![]?_0x1971e1['timeMachine']??{}:![]};return _0x2243f2[_0x2305e6(0x406)]!==undefined&&(_0x1559aa[_0x2305e6(0x22c)]=_0x1559aa['auth']||{},_0x1559aa[_0x2305e6(0x22c)][_0x2305e6(0x406)]=_0x2243f2[_0x2305e6(0x406)]),_0x2243f2[_0x2305e6(0x291)]&&(_0x1559aa['debug']=_0x1559aa[_0x2305e6(0x1c5)]||{},_0x1559aa[_0x2305e6(0x1c5)][_0x2305e6(0x291)]=!![]),(!Number[_0x2305e6(0x423)](_0x1559aa['port'])||_0x1559aa[_0x2305e6(0x3b8)]<0x1||_0x1559aa[_0x2305e6(0x3b8)]>0xffff)&&(console[_0x2305e6(0x1d4)](_0x2305e6(0x1ee)+_0x1559aa[_0x2305e6(0x3b8)]+_0x2305e6(0x20e)),process[_0x2305e6(0x3e8)](0x1)),!_0x15793c[_0x2305e6(0x22f)](_0x1559aa['logLevel'])&&(console[_0x2305e6(0x1d4)](_0x2305e6(0x1e3)+_0x1559aa[_0x2305e6(0x1ad)]+_0x2305e6(0x42d)),process[_0x2305e6(0x3e8)](0x1)),_0x1559aa;}function _0x1c2f72(_0x4ea8fe){const _0x25db66=_0x3de068;return!!(_0x4ea8fe&&typeof _0x4ea8fe===_0x25db66(0x35b)&&!Array[_0x25db66(0x22b)](_0x4ea8fe)&&Object[_0x25db66(0x44d)](_0x4ea8fe)[_0x25db66(0x2bd)]>0x0);}const _0x2b85a0=!process[_0x3de068(0x204)]['isTTY']||!!process.env.NO_COLOR;function _0x1ce0e3(_0x285349,_0x1796b9){const _0x6d8a16=_0x3de068;return _0x2b85a0?_0x1796b9:'\x1b['+_0x285349+'m'+_0x1796b9+_0x6d8a16(0x373);}function _0x2d9065(_0x4c33e2){const _0x4af58c=_0x3de068;if(!_0x4c33e2||_0x4c33e2[_0x4af58c(0x2bd)]===0x0)return;const _0x1adc17='─'['repeat'](0x38);process['stderr'][_0x4af58c(0x480)]('\x0a'),process[_0x4af58c(0x256)][_0x4af58c(0x480)](_0x1ce0e3('33',_0x4af58c(0x2dd)+_0x4c33e2[_0x4af58c(0x2bd)]+_0x4af58c(0x293)+(_0x4c33e2[_0x4af58c(0x2bd)]>0x1?'S':'')+'\x0a')),process[_0x4af58c(0x256)][_0x4af58c(0x480)]('\x20\x20'+_0x1adc17+'\x0a');for(const _0x3c90d1 of _0x4c33e2){const _0x4910b5=_0x3c90d1['level']==='error'?_0x1ce0e3('31',_0x4af58c(0x2e2)):_0x1ce0e3('33',_0x4af58c(0x21b));process[_0x4af58c(0x256)][_0x4af58c(0x480)](_0x4910b5+'\x20\x20'+_0x1ce0e3('1',_0x3c90d1[_0x4af58c(0x28b)])+'\x0a'),process[_0x4af58c(0x256)]['write'](_0x4af58c(0x248)+_0x3c90d1[_0x4af58c(0x2b8)]+'\x0a');if(_0x3c90d1[_0x4af58c(0x454)])process[_0x4af58c(0x256)][_0x4af58c(0x480)](_0x4af58c(0x248)+_0x1ce0e3('2','Hint:\x20'+_0x3c90d1[_0x4af58c(0x454)])+'\x0a');process[_0x4af58c(0x256)][_0x4af58c(0x480)]('\x0a');}process[_0x4af58c(0x256)][_0x4af58c(0x480)]('\x20\x20'+_0x1adc17+'\x0a\x0a');}function _0x420d2f(_0x54020f,_0x58d15d){const _0x220d49=_0x3de068,_0x77e619=_0x54020f[_0x220d49(0x375)][_0x220d49(0x359)](_0x58d15d);return new Promise((_0xf6458,_0xfcefa0)=>{const _0x5e6ba0=_0x220d49;_0x77e619[_0x5e6ba0(0x3fe)](_0x5e6ba0(0x2b7),_0xf6458),_0x77e619[_0x5e6ba0(0x3fe)]('error',_0xfcefa0);});}async function _0x49a24b(_0x41e396){const _0x4db63c=_0x3de068,_0x330c4e=require$$3;console[_0x4db63c(0x2b1)](_0x4db63c(0x1ff));let _0x59567a=!![];const _0xb74f65=(_0x8f6253,_0x5dac6d)=>{const _0x5cd5d5=_0x4db63c;console[_0x5cd5d5(0x2b1)]('\x20\x20'+(_0x8f6253?'✓':'✗')+'\x20'+_0x5dac6d);if(!_0x8f6253)_0x59567a=![];},_0x3b0115=Number(process[_0x4db63c(0x2bf)]['replace']('v','')[_0x4db63c(0x23a)]('.')[0x0]);_0xb74f65(_0x3b0115>=0x12,_0x4db63c(0x366)+process[_0x4db63c(0x2bf)]+(_0x3b0115<0x12?_0x4db63c(0x36b):''));const _0x2ce382=_0x574890['resolve'](_0x41e396[_0x4db63c(0x1ec)]);try{_0xb23c62[_0x4db63c(0x1d8)](_0x2ce382,{'recursive':!![]});const _0x2461fb=_0x574890['join'](_0x2ce382,_0x4db63c(0x3cc));_0xb23c62[_0x4db63c(0x24e)](_0x2461fb,''),_0xb23c62[_0x4db63c(0x27d)](_0x2461fb),_0xb74f65(!![],_0x4db63c(0x316)+_0x2ce382);}catch(_0x42023d){_0xb74f65(![],'database\x20path\x20not\x20writable:\x20'+_0x2ce382+_0x4db63c(0x285)+_0x42023d[_0x4db63c(0x2b8)]+')');}const _0x58ba85=await new Promise(_0x42031e=>{const _0x4a59e6=_0x4db63c,_0x428f0a=_0x330c4e[_0x4a59e6(0x30a)]();_0x428f0a[_0x4a59e6(0x3fe)]('error',()=>_0x42031e(![])),_0x428f0a[_0x4a59e6(0x3fe)]('listening',()=>{const _0x3d1008=_0x4a59e6;_0x428f0a[_0x3d1008(0x226)](),_0x42031e(!![]);}),_0x428f0a[_0x4a59e6(0x359)](_0x41e396[_0x4a59e6(0x3b8)],'127.0.0.1');});_0xb74f65(_0x58ba85,_0x4db63c(0x3c9)+_0x41e396[_0x4db63c(0x3b8)]+'\x20'+(_0x58ba85?_0x4db63c(0x390):_0x4db63c(0x3d8)));const _0x3aa159=_0x574890[_0x4db63c(0x429)](_0x4db63c(0x3f2));if(_0xb23c62[_0x4db63c(0x418)](_0x3aa159))try{JSON[_0x4db63c(0x369)](_0xb23c62['readFileSync'](_0x3aa159,_0x4db63c(0x391))['replace'](/^\uFEFF/,'')),_0xb74f65(!![],'config\x20file\x20valid:\x20'+_0x3aa159);}catch(_0x4b2cc9){_0xb74f65(![],'config\x20file\x20invalid:\x20'+_0x4b2cc9['message']);}else _0xb74f65(!![],_0x4db63c(0x3ce));console['log'](''),_0x59567a?console[_0x4db63c(0x2b1)](_0x4db63c(0x494)):(console['log'](_0x4db63c(0x1f8)),process[_0x4db63c(0x3e8)](0x1));}async function _0x176d50(){const _0x357fc0=_0x3de068,_0x5f1dae=_0x574890['resolve']('.kdbconfig');!_0xb23c62['existsSync'](_0x5f1dae)?(_0xb23c62[_0x357fc0(0x24e)](_0x5f1dae,JSON[_0x357fc0(0x1c6)]({'port':0x2124,'path':_0x357fc0(0x2e8),'logLevel':_0x357fc0(0x247),'noRepl':![],'noAdmin':![]},null,0x2)+'\x0a'),console[_0x357fc0(0x2b1)](_0x357fc0(0x3e1))):console[_0x357fc0(0x2b1)](_0x357fc0(0x23d));const _0x298a5d=_0x574890['resolve'](_0x357fc0(0x2e8));!_0xb23c62['existsSync'](_0x298a5d)?(_0xb23c62[_0x357fc0(0x1d8)](_0x298a5d,{'recursive':!![]}),console['log']('[okdb]\x20created\x20./okdb-data')):console[_0x357fc0(0x2b1)]('[okdb]\x20./okdb-data\x20already\x20exists\x20—\x20skipping'),console['log'](_0x357fc0(0x3c0));}async function _0x2f1989(_0x3814a2){const _0x17ce6d=_0x3de068,_0x545fb4=_0x574890['resolve'](_0x3814a2['dbPath']);if(!_0xb23c62[_0x17ce6d(0x418)](_0x545fb4)){console['log'](_0x17ce6d(0x48a)+_0x545fb4+_0x17ce6d(0x26b));return;}const _0x163128=require$$0$2,_0x491828=_0x163128[_0x17ce6d(0x286)]({'input':process[_0x17ce6d(0x3a7)],'output':process[_0x17ce6d(0x204)]}),_0x7514b0=await new Promise(_0x1ba750=>_0x491828[_0x17ce6d(0x2db)](_0x17ce6d(0x217)+_0x545fb4+'?\x0a\x20\x20Type\x20\x22yes\x22\x20to\x20confirm:\x20',_0x1ba750));_0x491828[_0x17ce6d(0x226)](),console['log']('');if(_0x7514b0[_0x17ce6d(0x42a)]()[_0x17ce6d(0x1fe)]()!==_0x17ce6d(0x2ac)){console[_0x17ce6d(0x2b1)](_0x17ce6d(0x24f));return;}_0xb23c62['rmSync'](_0x545fb4,{'recursive':!![],'force':!![]}),console[_0x17ce6d(0x2b1)](_0x17ce6d(0x281)+_0x545fb4+_0x17ce6d(0x303));}async function _0x15a7dc(_0xa35a70,_0x3951ee){const _0x3d0ea3=_0x3de068,_0x2e8208=require$$5,_0x5b0d26=_0x574890[_0x3d0ea3(0x429)](_0x3951ee['dbPath']);console[_0x3d0ea3(0x2b1)](_0x3d0ea3(0x21f)+_0x5b0d26+'…');const _0x688f3f=new _0x2e8208(_0x5b0d26,_0x3951ee[_0x3d0ea3(0x325)]?{'encryptionKey':_0x3951ee[_0x3d0ea3(0x325)]}:{});await _0x688f3f[_0x3d0ea3(0x406)](),console[_0x3d0ea3(0x2b1)](_0x3d0ea3(0x39e)+_0xa35a70+'…');const {envs:_0xd7495d}=await _0x688f3f[_0x3d0ea3(0x335)][_0x3d0ea3(0x2f3)](_0xa35a70);for(const _0x28b046 of _0xd7495d){const _0x4a34e4=_0x28b046['sizeBefore']>0x0?_0x3d0ea3(0x285)+(_0x28b046[_0x3d0ea3(0x271)]/0x400/0x400)[_0x3d0ea3(0x246)](0x2)+'\x20MB\x20→\x20'+(_0x28b046[_0x3d0ea3(0x3b4)]/0x400/0x400)[_0x3d0ea3(0x246)](0x2)+'\x20MB)':'';console[_0x3d0ea3(0x2b1)]('\x20\x20✓\x20'+_0x28b046[_0x3d0ea3(0x307)]+_0x3d0ea3(0x3f5)+_0x28b046[_0x3d0ea3(0x3aa)]+_0x4a34e4);}await _0x688f3f[_0x3d0ea3(0x226)](),console[_0x3d0ea3(0x2b1)](_0x3d0ea3(0x336));}async function _0x4b1e96(_0x5022f8,_0x536cfa,_0x18276f){const _0x3f3d45=_0x3de068,_0x1a452c=require$$5,_0x4bfd47=_0x574890[_0x3f3d45(0x429)](_0x536cfa[_0x3f3d45(0x1ec)]),_0x5c9163=_0x18276f[_0x3f3d45(0x485)]??_0x3f3d45(0x46d),_0x4ba43b=_0x18276f[_0x3f3d45(0x483)]?_0x18276f['types'][_0x3f3d45(0x23a)](',')[_0x3f3d45(0x3a3)](_0x539368=>_0x539368[_0x3f3d45(0x42a)]()):null;console[_0x3f3d45(0x2b1)]('[okdb]\x20opening\x20'+_0x4bfd47+'…');const _0xa7d69c=new _0x1a452c(_0x4bfd47,_0x536cfa[_0x3f3d45(0x325)]?{'encryptionKey':_0x536cfa[_0x3f3d45(0x325)]}:{});await _0xa7d69c[_0x3f3d45(0x406)](),console[_0x3f3d45(0x2b1)](_0x3f3d45(0x20a)+_0x5c9163+_0x3f3d45(0x394)+_0x5022f8+'…');const _0x2b3c03=await _0xa7d69c[_0x3f3d45(0x335)][_0x3f3d45(0x2b2)](_0x5022f8,{'envName':_0x5c9163,'types':_0x4ba43b,'includeChanges':!!_0x18276f[_0x3f3d45(0x36e)]});console[_0x3f3d45(0x2b1)](_0x3f3d45(0x400)+_0x2b3c03[_0x3f3d45(0x483)]+_0x3f3d45(0x395)+_0x2b3c03[_0x3f3d45(0x2eb)]+'\x20\x20changes='+_0x2b3c03[_0x3f3d45(0x36e)]);if(_0x18276f[_0x3f3d45(0x49e)]){const _0x4148da=_0x574890[_0x3f3d45(0x475)](_0x574890[_0x3f3d45(0x202)](_0x5022f8),_0x3f3d45(0x49e));process['stdout']['write'](_0x3f3d45(0x27a));const {count:_0x525373,bytes:_0x1eca30}=await _0xa7d69c[_0x3f3d45(0x335)][_0x3f3d45(0x436)](_0x4148da);console[_0x3f3d45(0x2b1)](_0x3f3d45(0x2ec)+_0x4148da+'\x20\x20('+_0x525373+_0x3f3d45(0x453)+(_0x525373!==0x1?'s':'')+',\x20'+(_0x1eca30/0x400/0x400)[_0x3f3d45(0x246)](0x2)+'\x20MB)');}await _0xa7d69c[_0x3f3d45(0x226)](),console[_0x3f3d45(0x2b1)]('[okdb]\x20export\x20complete');}async function _0x2f9d02(_0xc1a95,_0x47fb58,_0x1ec8f2){const _0x37e15a=_0x3de068,_0x388f64=require$$5,_0x3cec6a=_0x574890[_0x37e15a(0x429)](_0x47fb58['dbPath']),_0x146f17=_0x1ec8f2[_0x37e15a(0x485)]??null,_0x1afc7c=_0x1ec8f2[_0x37e15a(0x483)]?_0x1ec8f2[_0x37e15a(0x483)][_0x37e15a(0x23a)](',')[_0x37e15a(0x3a3)](_0x421d50=>_0x421d50[_0x37e15a(0x42a)]()):null,_0x2a7ad5=!!_0x1ec8f2[_0x37e15a(0x48c)];console['log'](_0x37e15a(0x21f)+_0x3cec6a+'…');const _0x70295=new _0x388f64(_0x3cec6a,_0x47fb58[_0x37e15a(0x325)]?{'encryptionKey':_0x47fb58['key']}:{});await _0x70295['open'](),console[_0x37e15a(0x2b1)]('[okdb]\x20importing\x20'+_0xc1a95+'…');const _0x43180b=await _0x70295['migrate']['importFromFile'](_0xc1a95,{'envName':_0x146f17,'types':_0x1afc7c,'dropExisting':_0x2a7ad5,'includeChanges':!!_0x1ec8f2[_0x37e15a(0x36e)],'onProgress':({type:_0x5e92dc,count:_0x5b781f})=>{const _0x22ad2b=_0x37e15a;process[_0x22ad2b(0x204)][_0x22ad2b(0x480)](_0x22ad2b(0x43b)+_0x5e92dc+':\x20'+_0x5b781f+_0x22ad2b(0x29b));}});process[_0x37e15a(0x204)]['write']('\x0a'),console['log'](_0x37e15a(0x244)+_0x43180b[_0x37e15a(0x483)]+_0x37e15a(0x395)+_0x43180b[_0x37e15a(0x2eb)]+_0x37e15a(0x46a)+_0x43180b[_0x37e15a(0x36e)]);if(_0x1ec8f2['blobs']){const _0x19bb3f=_0x574890[_0x37e15a(0x475)](_0x574890[_0x37e15a(0x202)](_0xc1a95),_0x37e15a(0x49e));if(_0xb23c62[_0x37e15a(0x418)](_0x19bb3f)){const {imported:_0x3170cb,skipped:_0x56c5cc}=await _0x70295['migrate'][_0x37e15a(0x39d)](_0x19bb3f);console['log'](_0x37e15a(0x385)+_0x3170cb+'\x20\x20skipped='+_0x56c5cc);}}await _0x70295[_0x37e15a(0x226)](),console[_0x37e15a(0x2b1)](_0x37e15a(0x31d));}async function _0x29dbfc(_0x4b6104,_0x13b5ef){const _0x3cdac3=_0x3de068;_0x13b5ef[_0x3cdac3(0x1cf)]&&!_0x13b5ef[_0x3cdac3(0x307)]&&(console['error'](_0x3cdac3(0x40a)),process[_0x3cdac3(0x3e8)](0x1));const _0x34abdc=_0x13b5ef[_0x3cdac3(0x2d1)]?_0x13b5ef[_0x3cdac3(0x2d1)][_0x3cdac3(0x23a)](',')[_0x3cdac3(0x3a3)](_0x4e6cab=>_0x4e6cab['trim']())['filter'](Boolean):[];let _0x2828c8={};if(_0x13b5ef[_0x3cdac3(0x403)])try{_0x2828c8=JSON[_0x3cdac3(0x369)](_0x13b5ef[_0x3cdac3(0x403)]);if(typeof _0x2828c8!=='object'||Array[_0x3cdac3(0x22b)](_0x2828c8)||_0x2828c8===null)throw new Error();}catch{console[_0x3cdac3(0x1d4)]('[okdb]\x20error:\x20--grants\x20must\x20be\x20valid\x20JSON\x20object'),process[_0x3cdac3(0x3e8)](0x1);}const _0x2e4340=require$$5,{randomToken:_0x1f811c,hashToken:_0x301a4d,hashPassword:_0x2d5df2}=requireOkdbAuthTokens(),_0x416b5b=require$$0,_0x53ca14=_0x574890[_0x3cdac3(0x429)](_0x4b6104[_0x3cdac3(0x1ec)]),_0x2637b9=new _0x2e4340(_0x53ca14,_0x4b6104[_0x3cdac3(0x325)]?{'encryptionKey':_0x4b6104['key']}:{});await _0x2637b9[_0x3cdac3(0x406)]();try{await _0x2637b9[_0x3cdac3(0x22c)][_0x3cdac3(0x2e4)]();if(_0x13b5ef[_0x3cdac3(0x307)]){const _0x4e417d=await _0x2637b9[_0x3cdac3(0x22c)]['_lookupByName'](_0x13b5ef['name']);_0x4e417d&&(console[_0x3cdac3(0x1d4)](_0x3cdac3(0x491)+_0x13b5ef['name']+'\x22\x20already\x20exists'),process[_0x3cdac3(0x3e8)](0x1));}const _0x75b35b=_0x1f811c(0x20),_0x20e0b7=_0x301a4d(_0x75b35b),_0x361c66=_0x13b5ef[_0x3cdac3(0x1cf)]?await _0x2d5df2(_0x13b5ef[_0x3cdac3(0x1cf)]):null,_0x236c38=_0x416b5b['randomUUID'](),_0xde5569={'tokenHash':_0x20e0b7,'name':_0x13b5ef[_0x3cdac3(0x307)]||null,'passwordHash':_0x361c66,'label':_0x13b5ef[_0x3cdac3(0x1bc)]||null,'permissions':_0x34abdc,'grants':_0x2828c8,'createdAt':Date['now'](),'lastUsedAt':null},_0x3dd484=_0x13b5ef[_0x3cdac3(0x304)]?{'ttl':Number(_0x13b5ef[_0x3cdac3(0x304)])}:undefined;await _0x2637b9[_0x3cdac3(0x1e0)]['put'](_0x3cdac3(0x221),_0x236c38,_0xde5569,_0x3dd484),console[_0x3cdac3(0x2b1)]('\x0a\x20\x20✓\x20Token\x20created'),console[_0x3cdac3(0x2b1)]('\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x236c38),console['log']('\x20\x20\x20\x20name:\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x13b5ef['name']||_0x3cdac3(0x417))),console[_0x3cdac3(0x2b1)](_0x3cdac3(0x337)+(_0x13b5ef[_0x3cdac3(0x1bc)]||'(unset)')),console['log'](_0x3cdac3(0x34c)+(_0x34abdc['join'](',\x20')||'(none)')),console['log'](_0x3cdac3(0x1fb)),console[_0x3cdac3(0x2b1)](_0x3cdac3(0x2a0)+_0x75b35b+'\x0a');}finally{await _0x2637b9[_0x3cdac3(0x226)]();}}async function _0x44b89f(_0x10d7a2){const _0x3912ce=_0x3de068,_0xd1abaf=require$$5,_0x536f95=_0x574890[_0x3912ce(0x429)](_0x10d7a2[_0x3912ce(0x1ec)]),_0xc63447=new _0xd1abaf(_0x536f95,_0x10d7a2['key']?{'encryptionKey':_0x10d7a2[_0x3912ce(0x325)]}:{});await _0xc63447[_0x3912ce(0x406)]();try{const _0x32984f=_0xc63447[_0x3912ce(0x1e0)];if(!_0x32984f||!_0x32984f[_0x3912ce(0x1d6)]('~tokens')){console[_0x3912ce(0x2b1)](_0x3912ce(0x1db));return;}const _0x582772=[];for(const {key:_0xb1c4a,value:_0x7f2d3b}of _0x32984f[_0x3912ce(0x358)](_0x3912ce(0x221))){_0x582772[_0x3912ce(0x365)]({'id':_0xb1c4a,'name':_0x7f2d3b[_0x3912ce(0x307)]||_0x3912ce(0x417),'label':_0x7f2d3b[_0x3912ce(0x1bc)]||_0x3912ce(0x417),'permissions':Array[_0x3912ce(0x22b)](_0x7f2d3b[_0x3912ce(0x2d1)])?_0x7f2d3b['permissions']['join'](','):'','created':_0x7f2d3b['createdAt']?new Date(_0x7f2d3b[_0x3912ce(0x356)])[_0x3912ce(0x3ea)]()['slice'](0x0,0xa):''});}if(_0x582772['length']===0x0){console[_0x3912ce(0x2b1)](_0x3912ce(0x1db));return;}const _0x233b31=!process[_0x3912ce(0x204)][_0x3912ce(0x45d)]||process[_0x3912ce(0x204)][_0x3912ce(0x45d)]>=0x64,_0xd80bbc=_0x233b31?0x24:0xa,_0x3da279=['ID'['padEnd'](_0xd80bbc),'NAME'[_0x3912ce(0x1ea)](0x10),_0x3912ce(0x31a)[_0x3912ce(0x1ea)](0x14),'PERMISSIONS'[_0x3912ce(0x1ea)](0x14),_0x3912ce(0x39a)]['join']('\x20\x20');console['log']('\x0a'+_0x3da279),console[_0x3912ce(0x2b1)]('-'[_0x3912ce(0x396)](_0x3da279[_0x3912ce(0x2bd)]));for(const _0x11a328 of _0x582772){const _0x419703=_0x233b31?_0x11a328['id']:_0x11a328['id'][_0x3912ce(0x2da)](0x0,0x8)+'…';console[_0x3912ce(0x2b1)]([_0x419703[_0x3912ce(0x1ea)](_0xd80bbc),_0x11a328[_0x3912ce(0x307)]['slice'](0x0,0x10)[_0x3912ce(0x1ea)](0x10),_0x11a328['label'][_0x3912ce(0x2da)](0x0,0x14)[_0x3912ce(0x1ea)](0x14),_0x11a328[_0x3912ce(0x2d1)][_0x3912ce(0x2da)](0x0,0x14)[_0x3912ce(0x1ea)](0x14),_0x11a328[_0x3912ce(0x487)]][_0x3912ce(0x475)]('\x20\x20'));}console['log']('');}finally{await _0xc63447[_0x3912ce(0x226)]();}}async function _0x3640a0(_0x3466a9,_0x3442e1){const _0x4a442c=_0x3de068;!_0x3466a9&&(console[_0x4a442c(0x1d4)]('[okdb]\x20error:\x20revoke\x20requires\x20an\x20id\x20argument'),process[_0x4a442c(0x3e8)](0x1));const _0x4bf829=require$$5,_0x19831a=_0x574890['resolve'](_0x3442e1[_0x4a442c(0x1ec)]),_0x11f6a2=new _0x4bf829(_0x19831a,_0x3442e1[_0x4a442c(0x325)]?{'encryptionKey':_0x3442e1['key']}:{});await _0x11f6a2[_0x4a442c(0x406)]();try{const _0x49bb42=_0x11f6a2[_0x4a442c(0x1e0)];(!_0x49bb42||!_0x49bb42[_0x4a442c(0x1d6)](_0x4a442c(0x221)))&&(console['error']('[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22'+_0x3466a9+'\x22'),process[_0x4a442c(0x3e8)](0x1));let _0x6d22a3=null,_0xdc7cf7=null;const _0x568ce0=_0x49bb42[_0x4a442c(0x354)](_0x4a442c(0x221),_0x3466a9);if(_0x568ce0)_0x6d22a3=_0x3466a9,_0xdc7cf7=_0x568ce0;else{const _0x807974=[];for(const {key:_0x308ea7,value:_0x2a6c92}of _0x49bb42[_0x4a442c(0x358)](_0x4a442c(0x221))){if(_0x308ea7[_0x4a442c(0x3ae)](_0x3466a9))_0x807974['push']({'key':_0x308ea7,'value':_0x2a6c92});}_0x807974[_0x4a442c(0x2bd)]===0x0&&(console[_0x4a442c(0x1d4)](_0x4a442c(0x3ef)+_0x3466a9+'\x22'),process[_0x4a442c(0x3e8)](0x1));if(_0x807974['length']>0x1){console[_0x4a442c(0x1d4)]('[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22'+_0x3466a9+'\x22\x20matches\x20'+_0x807974[_0x4a442c(0x2bd)]+_0x4a442c(0x2af));for(const _0x55c7c6 of _0x807974){console[_0x4a442c(0x1d4)]('\x20\x20'+_0x55c7c6['key']+_0x4a442c(0x398)+(_0x55c7c6[_0x4a442c(0x349)][_0x4a442c(0x307)]||_0x4a442c(0x417))+')');}process[_0x4a442c(0x3e8)](0x1);}_0x6d22a3=_0x807974[0x0][_0x4a442c(0x325)],_0xdc7cf7=_0x807974[0x0]['value'];}await _0x49bb42[_0x4a442c(0x332)]('~tokens',_0x6d22a3),console['log'](_0x4a442c(0x35d)+_0x6d22a3+'\x20\x20(name:\x20'+(_0xdc7cf7[_0x4a442c(0x307)]||_0x4a442c(0x417))+_0x4a442c(0x3a2)+(_0xdc7cf7[_0x4a442c(0x1bc)]||_0x4a442c(0x417))+')');}finally{await _0x11f6a2['close']();}}function _0xf0fac6(_0x6f20af,_0x230dc3){const _0x424a49=_0x3de068;if(!_0x6f20af[_0x424a49(0x26e)])return _0x424a49(0x462);const _0x3fa9d3=_0x6f20af[_0x424a49(0x270)];if(!_0x3fa9d3)return'active';if(_0x230dc3>_0x3fa9d3)return _0x424a49(0x384);return'active';}function _0x5f4e3d(_0x20f22e){const _0x6c0f99=_0x3de068;if(!_0x20f22e||typeof _0x20f22e!==_0x6c0f99(0x35b))return'';const _0xaa90ef=Object['entries'](_0x20f22e)[_0x6c0f99(0x30f)](([,_0x3399b0])=>_0x3399b0)['map'](([_0x31228c])=>_0x31228c);if(_0xaa90ef[_0x6c0f99(0x2bd)]===0x0)return'(none)';if(_0xaa90ef[_0x6c0f99(0x2bd)]<=0x3)return _0xaa90ef[_0x6c0f99(0x475)]('\x20');return _0xaa90ef[_0x6c0f99(0x2da)](0x0,0x3)['join']('\x20')+('\x20+'+(_0xaa90ef['length']-0x3));}async function _0xb7b86d(_0x36ecbd){const _0x5b5c91=_0x3de068,_0x4d4bee=require$$5,_0x289a6d=requireOkdbLicenseCodec(),{_C:_0x3d1d1d}=requireOkdbLicense(),_0x3f9fec=_0x574890[_0x5b5c91(0x429)](_0x36ecbd[_0x5b5c91(0x1ec)]),_0xebbfcb=new _0x4d4bee(_0x3f9fec,_0x36ecbd[_0x5b5c91(0x325)]?{'encryptionKey':_0x36ecbd[_0x5b5c91(0x325)]}:{});await _0xebbfcb[_0x5b5c91(0x406)]();try{const _0x490b38=_0xebbfcb[_0x5b5c91(0x1e0)],_0x61ace6=_0x490b38?.['db']?.[_0x5b5c91(0x354)]?.(_0x5b5c91(0x3c7))??0x0,_0x3dca5e=[..._0xebbfcb['_envs'][_0x5b5c91(0x44d)]()][_0x5b5c91(0x30f)](_0x2dc777=>!_0x2dc777[_0x5b5c91(0x3ae)]('~'))['length'],_0x4a5bf8=_0xebbfcb[_0x5b5c91(0x3f6)]?.[_0x5b5c91(0x48f)];if(_0x4a5bf8){const _0x1c2df4=_0x4a5bf8[_0x5b5c91(0x232)]===!![],_0x101f5c=_0x1c2df4?_0x5b5c91(0x2bb):_0xebbfcb['_license'][_0x5b5c91(0x42f)]?.[_0x5b5c91(0x486)]||_0x5b5c91(0x209);console[_0x5b5c91(0x2b1)](''),console[_0x5b5c91(0x2b1)](_0x5b5c91(0x3ac)+_0x101f5c);const _0xb9a58c=_0x4a5bf8['limits']||{};if(_0xb9a58c['maxWrites']){const _0x4e1a29=Math['round'](_0x61ace6/_0xb9a58c['maxWrites']*0x64);console[_0x5b5c91(0x2b1)](_0x5b5c91(0x1f7)+_0x61ace6[_0x5b5c91(0x496)]()+'\x20/\x20'+_0xb9a58c['maxWrites'][_0x5b5c91(0x496)]()+_0x5b5c91(0x285)+_0x4e1a29+'%)');}else console[_0x5b5c91(0x2b1)](_0x5b5c91(0x1f7)+_0x61ace6['toLocaleString']());_0xb9a58c[_0x5b5c91(0x2b3)]?console[_0x5b5c91(0x2b1)](_0x5b5c91(0x1cb)+_0x3dca5e+'\x20/\x20'+_0xb9a58c[_0x5b5c91(0x2b3)]):console[_0x5b5c91(0x2b1)](_0x5b5c91(0x1cb)+_0x3dca5e),_0x3d1d1d?.['PUB_FINGERPRINT']&&console[_0x5b5c91(0x2b1)](_0x5b5c91(0x3dd)+_0x3d1d1d[_0x5b5c91(0x229)]+_0x5b5c91(0x224));}if(!_0x490b38||!_0x490b38[_0x5b5c91(0x1d6)](_0x5b5c91(0x362))){console[_0x5b5c91(0x2b1)](''),console[_0x5b5c91(0x2b1)]('\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.'),console[_0x5b5c91(0x2b1)]('');return;}const _0x435655=[],_0x4372ba=Date[_0x5b5c91(0x495)](),_0x189597=_0xebbfcb['id'],_0x51dcdf=_0x5b5c91(0x251);for(const {key:_0x152352,value:_0x24eb2a}of _0x490b38['getRange'](_0x5b5c91(0x362))){const _0x4f42c5=_0x24eb2a[_0x5b5c91(0x2a8)]?Buffer[_0x5b5c91(0x41c)](_0x24eb2a[_0x5b5c91(0x2a8)],_0x5b5c91(0x1da)):Buffer['alloc'](0x8);let _0x429bc9='';try{_0x429bc9=_0x289a6d['derivePin'](_0x189597,_0x4f42c5,_0x51dcdf)['pin'];}catch{}_0x435655[_0x5b5c91(0x365)]({'id':_0x152352,'licensee':_0x24eb2a['licensee']||'','expires':_0x24eb2a['expiresAt']?new Date(_0x24eb2a['expiresAt'])[_0x5b5c91(0x3ea)]()[_0x5b5c91(0x2da)](0x0,0xa):'','features':_0x5f4e3d(_0x24eb2a[_0x5b5c91(0x3c5)]),'pin':_0x429bc9,'status':_0xf0fac6(_0x24eb2a,_0x4372ba)});}if(_0x435655[_0x5b5c91(0x2bd)]===0x0){console[_0x5b5c91(0x2b1)](''),console[_0x5b5c91(0x2b1)](_0x5b5c91(0x40f)),console[_0x5b5c91(0x2b1)]('');return;}const _0x1e1873=['\x20\x20'+'ID'[_0x5b5c91(0x1ea)](0xe),_0x5b5c91(0x46e)[_0x5b5c91(0x1ea)](0xe),_0x5b5c91(0x1c7)[_0x5b5c91(0x1ea)](0xc),_0x5b5c91(0x288)[_0x5b5c91(0x1ea)](0x1e),_0x5b5c91(0x468)['padEnd'](0xa),_0x5b5c91(0x25c)][_0x5b5c91(0x475)]('\x20');console[_0x5b5c91(0x2b1)]('\x0a'+_0x1e1873);for(const _0x15cc82 of _0x435655){const _0x3e350e=_0x15cc82['id'][_0x5b5c91(0x2da)](0x0,0x8)+'…';console[_0x5b5c91(0x2b1)](['\x20\x20'+_0x3e350e[_0x5b5c91(0x1ea)](0xe),_0x15cc82[_0x5b5c91(0x486)][_0x5b5c91(0x2da)](0x0,0xe)['padEnd'](0xe),_0x15cc82[_0x5b5c91(0x30e)]['padEnd'](0xc),_0x15cc82[_0x5b5c91(0x3c5)][_0x5b5c91(0x2da)](0x0,0x1e)[_0x5b5c91(0x1ea)](0x1e),_0x15cc82['pin'][_0x5b5c91(0x1ea)](0xa),_0x15cc82[_0x5b5c91(0x33b)]][_0x5b5c91(0x475)]('\x20'));}console['log']('');}finally{await _0xebbfcb[_0x5b5c91(0x226)]();}}async function _0x4bad3d(_0x5c96b4,_0x2b8c95){const _0x18015d=_0x3de068,_0x59e604=require$$5,_0x37fb74=requireOkdbLicenseCodec();let _0x34a7af=_0x5c96b4;(_0x37fb74[_0x18015d(0x37d)](_0x5c96b4)===_0x18015d(0x31b)||_0xb23c62[_0x18015d(0x418)](_0x5c96b4)&&_0xb23c62[_0x18015d(0x49c)](_0x5c96b4)[_0x18015d(0x2ae)]())&&(_0x34a7af=_0xb23c62['readFileSync'](_0x5c96b4,'utf8')[_0x18015d(0x42a)]());const _0x6cebaa=_0x574890[_0x18015d(0x429)](_0x2b8c95[_0x18015d(0x1ec)]),_0x44740c=new _0x59e604(_0x6cebaa,_0x2b8c95[_0x18015d(0x325)]?{'encryptionKey':_0x2b8c95[_0x18015d(0x325)]}:{});await _0x44740c['open']();try{!_0x44740c[_0x18015d(0x3f6)]&&(console['error'](_0x18015d(0x32c)),process['exit'](0x1));let _0x3ce576;try{_0x3ce576=await _0x44740c[_0x18015d(0x3f6)][_0x18015d(0x1cc)](_0x34a7af);}catch(_0x5d2e94){console[_0x18015d(0x1d4)](_0x18015d(0x339)+_0x5d2e94[_0x18015d(0x2b8)]),process[_0x18015d(0x3e8)](0x1);}const _0x3ef3d6=_0x44740c[_0x18015d(0x3f6)]['getPins'](),_0xfad056=_0x3ef3d6[_0x18015d(0x408)](_0x1e8248=>_0x1e8248[_0x18015d(0x258)]===_0x3ce576['id'])?.['pin']||'',_0xbac2e9=Object[_0x18015d(0x3c2)](_0x3ce576[_0x18015d(0x3c5)]||{})[_0x18015d(0x30f)](([,_0x58b348])=>_0x58b348)[_0x18015d(0x3a3)](([_0x22b0ec])=>_0x22b0ec),_0x205761=_0x3ce576[_0x18015d(0x1e8)]||{},_0x474d02=[_0x205761['envs']?_0x18015d(0x3a4)+_0x205761[_0x18015d(0x2b3)]:null,_0x205761[_0x18015d(0x3b7)]?_0x18015d(0x41d)+_0x205761[_0x18015d(0x3b7)]:null,_0x205761[_0x18015d(0x419)]?_0x18015d(0x345)+_0x205761[_0x18015d(0x419)]:null,_0x205761[_0x18015d(0x36c)]?_0x18015d(0x346)+_0x205761[_0x18015d(0x36c)][_0x18015d(0x496)]():null][_0x18015d(0x30f)](Boolean)[_0x18015d(0x475)]('\x20\x20'),_0x3626a5=_0x3ce576[_0x18015d(0x448)]===_0x37fb74[_0x18015d(0x274)];console[_0x18015d(0x2b1)](_0x18015d(0x411)),console[_0x18015d(0x2b1)](_0x18015d(0x328)+_0x3ce576['id']),console[_0x18015d(0x2b1)](_0x18015d(0x361)+_0x3ce576[_0x18015d(0x486)]),console[_0x18015d(0x2b1)](_0x18015d(0x323)+new Date(_0x3ce576[_0x18015d(0x270)])[_0x18015d(0x3ea)]()[_0x18015d(0x2da)](0x0,0xa)),console[_0x18015d(0x2b1)](_0x18015d(0x401)+(_0xbac2e9[_0x18015d(0x475)](',\x20')||_0x18015d(0x21e)));if(_0x474d02)console['log']('\x20\x20\x20\x20limits:\x20\x20\x20\x20'+_0x474d02);_0x3626a5?(console[_0x18015d(0x2b1)](_0x18015d(0x30b)),console[_0x18015d(0x2b1)]('')):(console[_0x18015d(0x2b1)]('\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20'+_0xfad056),console[_0x18015d(0x2b1)]('\x20\x20\x20\x20status:\x20\x20\x20\x20pending\x20activation'),console['log'](''),console[_0x18015d(0x2b1)](_0x18015d(0x1b4)),console['log']('\x20\x20\x20\x201.\x20Send\x20the\x20PIN\x20above\x20('+_0xfad056+')\x20to\x20your\x20license\x20vendor.'),console[_0x18015d(0x2b1)]('\x20\x20\x20\x202.\x20The\x20vendor\x20returns\x20an\x20activation\x20token.'),console[_0x18015d(0x2b1)](_0x18015d(0x43c)),console[_0x18015d(0x2b1)](''));}finally{await _0x44740c[_0x18015d(0x226)]();}}async function _0x1ffb31(_0x172048,_0x42b06d){const _0x1cef2d=_0x3de068,_0x138714=require$$5,_0x54950e=_0x574890[_0x1cef2d(0x429)](_0x42b06d[_0x1cef2d(0x1ec)]),_0x18b791=new _0x138714(_0x54950e,_0x42b06d[_0x1cef2d(0x325)]?{'encryptionKey':_0x42b06d[_0x1cef2d(0x325)]}:{});await _0x18b791[_0x1cef2d(0x406)]();try{!_0x18b791[_0x1cef2d(0x3f6)]&&(console[_0x1cef2d(0x1d4)]('[okdb]\x20error:\x20license\x20management\x20is\x20only\x20available\x20in\x20licensed\x20builds\x20(npm\x20run\x20build:prod).'),process['exit'](0x1));let _0x97e337;try{_0x97e337=await _0x18b791[_0x1cef2d(0x3f6)][_0x1cef2d(0x3f3)](_0x172048[_0x1cef2d(0x42a)]());}catch(_0x2e2d20){console[_0x1cef2d(0x1d4)](_0x1cef2d(0x339)+_0x2e2d20[_0x1cef2d(0x2b8)]),console[_0x1cef2d(0x1d4)](''),console[_0x1cef2d(0x1d4)](_0x1cef2d(0x36a)),console[_0x1cef2d(0x1d4)](_0x1cef2d(0x1ac)),console['error'](_0x1cef2d(0x416)),console['error'](_0x1cef2d(0x1c3)),console['error'](''),process['exit'](0x1);}console['log'](_0x1cef2d(0x3e5)),console[_0x1cef2d(0x2b1)]('\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x97e337['id']),console[_0x1cef2d(0x2b1)](_0x1cef2d(0x361)+_0x97e337[_0x1cef2d(0x486)]),console['log'](_0x1cef2d(0x323)+new Date(_0x97e337[_0x1cef2d(0x270)])[_0x1cef2d(0x3ea)]()[_0x1cef2d(0x2da)](0x0,0xa)),console[_0x1cef2d(0x2b1)](_0x1cef2d(0x45a)),console['log']('');}finally{await _0x18b791[_0x1cef2d(0x226)]();}}async function _0x45b716(_0x2e3223,_0x2e8284){const _0x2001ba=_0x3de068;!_0x2e3223&&(console[_0x2001ba(0x1d4)](_0x2001ba(0x2e7)),process[_0x2001ba(0x3e8)](0x1));const _0xcd9382=require$$5,_0x28eb2a=requireOkdbLicenseCodec(),_0x55553f=_0x574890[_0x2001ba(0x429)](_0x2e8284[_0x2001ba(0x1ec)]),_0x1c29e0=new _0xcd9382(_0x55553f,_0x2e8284[_0x2001ba(0x325)]?{'encryptionKey':_0x2e8284[_0x2001ba(0x325)]}:{});await _0x1c29e0['open']();try{const _0x29ba38=_0x1c29e0[_0x2001ba(0x1e0)];(!_0x29ba38||!_0x29ba38[_0x2001ba(0x1d6)]('~licenses'))&&(console[_0x2001ba(0x1d4)](_0x2001ba(0x257)+_0x2e3223+'\x22'),process['exit'](0x1));let _0x453e24=null,_0x28320c=null;const _0x43932c=_0x29ba38[_0x2001ba(0x354)](_0x2001ba(0x362),_0x2e3223);if(_0x43932c)_0x453e24=_0x2e3223,_0x28320c=_0x43932c;else{const _0x58d709=[];for(const {key:_0x96ed11,value:_0x558a1e}of _0x29ba38[_0x2001ba(0x358)]('~licenses')){if(_0x96ed11[_0x2001ba(0x3ae)](_0x2e3223))_0x58d709[_0x2001ba(0x365)]({'key':_0x96ed11,'value':_0x558a1e});}_0x58d709[_0x2001ba(0x2bd)]===0x0&&(console['error']('[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22'+_0x2e3223+'\x22'),process['exit'](0x1)),_0x58d709[_0x2001ba(0x2bd)]>0x1&&(console[_0x2001ba(0x1d4)](_0x2001ba(0x29f)+_0x2e3223+'\x22\x20matches\x20'+_0x58d709[_0x2001ba(0x2bd)]+_0x2001ba(0x3cb)),process['exit'](0x1)),_0x453e24=_0x58d709[0x0][_0x2001ba(0x325)],_0x28320c=_0x58d709[0x0][_0x2001ba(0x349)];}const _0x543ae5=Date[_0x2001ba(0x495)](),_0x22e6ec=_0xf0fac6(_0x28320c,_0x543ae5),_0x29b806=_0x1c29e0['id'],_0x3a0711=_0x2001ba(0x251);let _0x2768dd='';try{const _0x16a699=Buffer['from'](_0x28320c[_0x2001ba(0x2a8)],_0x2001ba(0x1da));_0x2768dd=_0x28eb2a[_0x2001ba(0x26a)](_0x29b806,_0x16a699,_0x3a0711)['pin'];}catch{}const _0x5481ed=_0x28320c[_0x2001ba(0x3c5)]?Object['entries'](_0x28320c[_0x2001ba(0x3c5)])[_0x2001ba(0x30f)](([,_0x152c14])=>_0x152c14)[_0x2001ba(0x3a3)](([_0x4e171a])=>_0x4e171a):[],_0x26411c=_0x28320c[_0x2001ba(0x1e8)]||{},_0x573d29=_0x29ba38?.['db']?.['get']?.(_0x2001ba(0x3c7))??0x0,_0x1f62b3=[..._0x1c29e0[_0x2001ba(0x3bf)][_0x2001ba(0x44d)]()][_0x2001ba(0x30f)](_0x3c5e65=>!_0x3c5e65[_0x2001ba(0x3ae)]('~'))[_0x2001ba(0x2bd)];console[_0x2001ba(0x2b1)](_0x2001ba(0x3cd)),console['log'](_0x2001ba(0x328)+_0x453e24),console[_0x2001ba(0x2b1)]('\x20\x20\x20\x20licensee:\x20\x20'+(_0x28320c[_0x2001ba(0x486)]||'')),console[_0x2001ba(0x2b1)]('\x20\x20\x20\x20expires:\x20\x20\x20'+(_0x28320c[_0x2001ba(0x270)]?new Date(_0x28320c[_0x2001ba(0x270)])[_0x2001ba(0x3ea)]()['slice'](0x0,0xa):'')),console['log'](_0x2001ba(0x401)+(_0x5481ed[_0x2001ba(0x475)](',\x20')||'(none)')),console[_0x2001ba(0x2b1)](_0x2001ba(0x342)+_0x2768dd),console[_0x2001ba(0x2b1)](_0x2001ba(0x308)+_0x22e6ec),console[_0x2001ba(0x2b1)]('\x20\x20\x20\x20addedAt:\x20\x20\x20'+new Date(_0x28320c['addedAt'])[_0x2001ba(0x3ea)]());if(_0x22e6ec===_0x2001ba(0x42f)){console[_0x2001ba(0x2b1)](''),console['log'](_0x2001ba(0x3af));if(_0x26411c[_0x2001ba(0x36c)]){const _0x167ac1=Math[_0x2001ba(0x1d5)](_0x573d29/_0x26411c[_0x2001ba(0x36c)]*0x64);console[_0x2001ba(0x2b1)]('\x20\x20\x20\x20writes:\x20\x20\x20\x20'+_0x573d29[_0x2001ba(0x496)]()+_0x2001ba(0x47a)+_0x26411c[_0x2001ba(0x36c)][_0x2001ba(0x496)]()+'\x20\x20('+_0x167ac1+'%)');}else console[_0x2001ba(0x2b1)](_0x2001ba(0x213)+_0x573d29[_0x2001ba(0x496)]()+'\x20\x20(unlimited)');_0x26411c[_0x2001ba(0x2b3)]?console[_0x2001ba(0x2b1)](_0x2001ba(0x392)+_0x1f62b3+'\x20/\x20'+_0x26411c['envs']):console[_0x2001ba(0x2b1)](_0x2001ba(0x392)+_0x1f62b3+_0x2001ba(0x1c9));}console[_0x2001ba(0x2b1)]('');}finally{await _0x1c29e0['close']();}}async function _0x533347(_0x5a05e5,_0x2394a7){const _0x21b35c=_0x3de068;!_0x5a05e5&&(console[_0x21b35c(0x1d4)](_0x21b35c(0x459)),process['exit'](0x1));const _0x3f8fcc=require$$5,_0x33c669=_0x574890[_0x21b35c(0x429)](_0x2394a7[_0x21b35c(0x1ec)]),_0x20dcac=new _0x3f8fcc(_0x33c669,_0x2394a7[_0x21b35c(0x325)]?{'encryptionKey':_0x2394a7['key']}:{});await _0x20dcac['open']();try{const _0x283d4c=_0x20dcac[_0x21b35c(0x1e0)];(!_0x283d4c||!_0x283d4c[_0x21b35c(0x1d6)](_0x21b35c(0x362)))&&(console[_0x21b35c(0x1d4)](_0x21b35c(0x257)+_0x5a05e5+'\x22'),process[_0x21b35c(0x3e8)](0x1));let _0x59a75b=null,_0x180ee9=null;const _0x290783=_0x283d4c[_0x21b35c(0x354)](_0x21b35c(0x362),_0x5a05e5);if(_0x290783)_0x59a75b=_0x5a05e5,_0x180ee9=_0x290783;else{const _0x32e766=[];for(const {key:_0x967049,value:_0x2220aa}of _0x283d4c[_0x21b35c(0x358)]('~licenses')){if(_0x967049[_0x21b35c(0x3ae)](_0x5a05e5))_0x32e766[_0x21b35c(0x365)]({'key':_0x967049,'value':_0x2220aa});}_0x32e766[_0x21b35c(0x2bd)]===0x0&&(console['error'](_0x21b35c(0x257)+_0x5a05e5+'\x22'),process[_0x21b35c(0x3e8)](0x1)),_0x32e766[_0x21b35c(0x2bd)]>0x1&&(console[_0x21b35c(0x1d4)](_0x21b35c(0x29f)+_0x5a05e5+_0x21b35c(0x431)+_0x32e766['length']+_0x21b35c(0x3cb)),process[_0x21b35c(0x3e8)](0x1)),_0x59a75b=_0x32e766[0x0][_0x21b35c(0x325)],_0x180ee9=_0x32e766[0x0][_0x21b35c(0x349)];}await _0x283d4c['remove'](_0x21b35c(0x362),_0x59a75b),console[_0x21b35c(0x2b1)](_0x21b35c(0x46f)+_0x59a75b+_0x21b35c(0x441)+(_0x180ee9['licensee']||_0x21b35c(0x417))+')');}finally{await _0x20dcac[_0x21b35c(0x226)]();}}async function _0x16a73e(_0x353d4a,_0x232d76,_0x5f3f4e){const _0x538b51=_0x3de068;!_0x353d4a&&(console[_0x538b51(0x1d4)](_0x538b51(0x34b)),process['exit'](0x1));!_0x5f3f4e[_0x538b51(0x2a7)]&&!(_0x5f3f4e[_0x538b51(0x367)]&&_0x5f3f4e['password'])&&(console['error'](_0x538b51(0x3ec)),process[_0x538b51(0x3e8)](0x1));const _0x1561cf=_0x5f3f4e['selfAddress']||_0x232d76[_0x538b51(0x2e3)]?.['address'];!_0x1561cf&&(console['error'](_0x538b51(0x290)+_0x538b51(0x473)+'\x20\x20Or\x20set\x20sync.address\x20in\x20.kdbconfig'),process[_0x538b51(0x3e8)](0x1));const _0x4ce4d=require$$5,_0x2ef01f=new _0x4ce4d(_0x232d76[_0x538b51(0x1ec)],{'sync':{'address':_0x1561cf,'auto_reconcile':![]}});await _0x2ef01f[_0x538b51(0x406)]();try{const _0x36a5ea=_0x2ef01f[_0x538b51(0x1e0)];if(_0x36a5ea&&_0x36a5ea[_0x538b51(0x1d6)](_0x538b51(0x221))){let _0x41a878=![];for(const _0x134c61 of _0x36a5ea[_0x538b51(0x358)]('~tokens')){_0x41a878=!![];break;}_0x41a878&&console['log'](_0x538b51(0x471)+'\x20\x20after\x20sync.\x20Duplicate\x20names\x20will\x20surface\x20as\x20ambiguous\x20logins\x20to\x20clean\x20up.');}console[_0x538b51(0x2b1)](_0x538b51(0x233)+_0x353d4a+'…'),await _0x2ef01f[_0x538b51(0x2e3)][_0x538b51(0x475)](_0x353d4a[_0x538b51(0x426)](/\/+$/,''),{'token':_0x5f3f4e['token'],'username':_0x5f3f4e['username'],'password':_0x5f3f4e['password']}),console[_0x538b51(0x2b1)](_0x538b51(0x21c)),console['log'](_0x538b51(0x45f));}finally{await _0x2ef01f['close']();}}async function _0x38052(){const _0x45448c=_0x3de068,_0xff9d7e=Date[_0x45448c(0x495)](),_0x4a6d94=_0x16bdce(process[_0x45448c(0x259)]),_0x26cf36=_0x588056(_0x4a6d94),_0x3867b5=_0x574890[_0x45448c(0x429)](_0x26cf36[_0x45448c(0x1ec)]);!_0x26cf36[_0x45448c(0x326)]&&!process[_0x45448c(0x3a7)][_0x45448c(0x1d3)]&&(_0x26cf36['noRepl']=!![]);const _0x784fe1=require$$5,{start:_0x446553,colorLog:_0x9774c0}=requireOkdbShell(),_0x2c07a6={..._0x26cf36[_0x45448c(0x325)]?{'encryptionKey':_0x26cf36[_0x45448c(0x325)]}:{},..._0x26cf36[_0x45448c(0x2d7)]?{'admin':![]}:_0x1c2f72(_0x26cf36[_0x45448c(0x26f)])?{'admin':_0x26cf36[_0x45448c(0x26f)]}:{},..._0x1c2f72(_0x26cf36[_0x45448c(0x427)])?{'api':_0x26cf36[_0x45448c(0x427)]}:{},..._0x1c2f72(_0x26cf36[_0x45448c(0x22c)])?{'auth':_0x26cf36[_0x45448c(0x22c)]}:{},..._0x1c2f72(_0x26cf36[_0x45448c(0x2c4)])?{'mcp':_0x26cf36[_0x45448c(0x2c4)]}:{},..._0x26cf36[_0x45448c(0x44e)]!==![]?{'timeMachine':_0x26cf36[_0x45448c(0x44e)]}:{}},_0x33f719=new _0x784fe1(_0x3867b5,_0x2c07a6);_0x33f719[_0x45448c(0x2b1)]['detachConsole']?.();const _0x4bf385=_0x33f719[_0x45448c(0x2b1)][_0x45448c(0x214)](_0xe2d53c=>_0x9774c0(_0xe2d53c,_0x26cf36[_0x45448c(0x1ad)]));if(_0x26cf36[_0x45448c(0x326)])process[_0x45448c(0x204)][_0x45448c(0x480)](_0x45448c(0x3d0));await _0x33f719['open']();if(_0x26cf36[_0x45448c(0x326)])process[_0x45448c(0x204)][_0x45448c(0x480)]('\x20\x20✓\x20database\x20opened\x0a');try{await _0x420d2f(_0x33f719,_0x26cf36[_0x45448c(0x3b8)]);}catch(_0x2ff148){_0x2ff148[_0x45448c(0x2f4)]===_0x45448c(0x3ed)&&(console[_0x45448c(0x1d4)](_0x45448c(0x1dd)+_0x26cf36[_0x45448c(0x3b8)]+_0x45448c(0x272)),process[_0x45448c(0x3e8)](0x1));throw _0x2ff148;}if(_0x26cf36[_0x45448c(0x326)])process[_0x45448c(0x204)][_0x45448c(0x480)](_0x45448c(0x3ad)+_0x26cf36[_0x45448c(0x3b8)]+'\x0a');if(!_0x26cf36[_0x45448c(0x326)])_0x33f719['log'][_0x45448c(0x1e7)]?.(),_0x4bf385?.(),_0x2d9065(_0x33f719[_0x45448c(0x22c)]?.[_0x45448c(0x41b)]?.()??[]),await _0x446553(_0x33f719,_0x26cf36);else{const _0x13db05=_0x574890['join'](_0x3867b5,_0x45448c(0x27f));try{_0xb23c62[_0x45448c(0x24e)](_0x13db05,String(process['pid']));}catch{}const _0x3d4c95=Date['now']()-_0xff9d7e;console['log'](''),console['log'](_0x45448c(0x1be)),console['log'](_0x45448c(0x341)+_0x26cf36[_0x45448c(0x3b8)]),console['log'](_0x45448c(0x212)+_0x3867b5),console[_0x45448c(0x2b1)](_0x45448c(0x424)+_0x33f719['id']);{const _0x91817a=_0x33f719[_0x45448c(0x1e0)]?.['db']?.[_0x45448c(0x354)]?.(_0x45448c(0x3c7))??0x0,_0x5d360f=[..._0x33f719[_0x45448c(0x3bf)][_0x45448c(0x44d)]()][_0x45448c(0x30f)](_0x5aaa96=>!_0x5aaa96[_0x45448c(0x3ae)]('~'))[_0x45448c(0x2bd)];if(_0x33f719[_0x45448c(0x3f6)]?.[_0x45448c(0x42f)]?.[_0x45448c(0x448)]===0x1){const _0x277a78=Math['ceil']((_0x33f719[_0x45448c(0x3f6)][_0x45448c(0x42f)][_0x45448c(0x270)]-Date[_0x45448c(0x495)]())/0x5265c00);console['log']('\x20\x20\x20\x20license:\x20⚠\x20OPEN\x20—\x20'+_0x33f719[_0x45448c(0x3f6)][_0x45448c(0x42f)][_0x45448c(0x486)]+'\x20(expires\x20in\x20'+_0x277a78+_0x45448c(0x355));}else{if(_0x33f719[_0x45448c(0x3f6)]?.[_0x45448c(0x42f)]){const _0x655197=_0x33f719[_0x45448c(0x3f6)][_0x45448c(0x42f)];console['log']('\x20\x20\x20\x20license:\x20'+_0x655197['licensee']+_0x45448c(0x3ff)+new Date(_0x655197[_0x45448c(0x270)])[_0x45448c(0x3ea)]()['slice'](0x0,0xa)+')');const _0xa1a76a=_0x655197[_0x45448c(0x1e8)]||{};if(_0xa1a76a[_0x45448c(0x36c)]){const _0x27f143=Math[_0x45448c(0x1d5)](_0x91817a/_0xa1a76a['maxWrites']*0x64);console[_0x45448c(0x2b1)]('\x20\x20\x20\x20usage:\x20\x20\x20'+_0x91817a[_0x45448c(0x496)]()+_0x45448c(0x47a)+_0xa1a76a[_0x45448c(0x36c)][_0x45448c(0x496)]()+_0x45448c(0x2cb)+_0x27f143+_0x45448c(0x340)+_0x5d360f+(_0xa1a76a[_0x45448c(0x2b3)]?'/'+_0xa1a76a['envs']:'')+'\x20env'+(_0x5d360f===0x1?'':'s'));}}else{if(_0x33f719[_0x45448c(0x3f6)]){const _0x27315f=_0x33f719[_0x45448c(0x3f6)][_0x45448c(0x42c)](),_0x4720ed=_0x27315f[_0x45448c(0x2bd)]?_0x27315f[_0x45448c(0x3a3)](_0x2edfe4=>_0x2edfe4[_0x45448c(0x41a)])['join'](',\x20'):_0x45448c(0x2ff),_0x2f5fb7=_0x33f719['_license'][_0x45448c(0x48f)],_0x4f9d45=_0x2f5fb7[_0x45448c(0x1e8)][_0x45448c(0x36c)]?Math[_0x45448c(0x1d5)](_0x91817a/_0x2f5fb7['limits']['maxWrites']*0x64):0x0;console['log'](_0x45448c(0x2f5)),console['log']('\x20\x20\x20\x20usage:\x20\x20\x20'+_0x91817a[_0x45448c(0x496)]()+_0x45448c(0x47a)+_0x2f5fb7[_0x45448c(0x1e8)]['maxWrites'][_0x45448c(0x496)]()+_0x45448c(0x2cb)+_0x4f9d45+_0x45448c(0x340)+_0x5d360f+_0x45448c(0x47a)+_0x2f5fb7[_0x45448c(0x1e8)][_0x45448c(0x2b3)]+_0x45448c(0x36f)),console['log']('\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20'+_0x4720ed);}}}}console[_0x45448c(0x2b1)](_0x45448c(0x27e)+_0x26cf36[_0x45448c(0x3b8)]+'/api');!_0x26cf36[_0x45448c(0x2d7)]&&console[_0x45448c(0x2b1)](_0x45448c(0x39c)+_0x26cf36[_0x45448c(0x3b8)]+_0x45448c(0x372));console[_0x45448c(0x2b1)](''),console[_0x45448c(0x2b1)](_0x45448c(0x320)+_0x3d4c95+'ms'),_0x2d9065(_0x33f719[_0x45448c(0x22c)]?.[_0x45448c(0x41b)]?.()??[]);async function _0x1e6f53(){const _0x22483f=_0x45448c;process[_0x22483f(0x204)]['write'](_0x22483f(0x457));try{_0xb23c62[_0x22483f(0x27d)](_0x13db05);}catch{}await _0x33f719[_0x22483f(0x226)](),process['exit'](0x0);}process['on'](_0x45448c(0x3e2),_0x1e6f53),process['on']('SIGTERM',_0x1e6f53);}}const _0x47deb4=new Set([_0x3de068(0x2bf),_0x3de068(0x3b1),_0x3de068(0x2ea),_0x3de068(0x2f3),_0x3de068(0x3f0),_0x3de068(0x2fa),_0x3de068(0x3d1),_0x3de068(0x2a7),_0x3de068(0x475),_0x3de068(0x2ed)]),_0x37a369=process[_0x3de068(0x259)][0x2];if(_0x37a369===_0x3de068(0x2bf))console['log'](require$$2[_0x3de068(0x2bf)]),process[_0x3de068(0x3e8)](0x0);else{if(_0x37a369&&_0x47deb4[_0x3de068(0x22f)](_0x37a369)){const _0x388293=process[_0x3de068(0x259)][_0x3de068(0x2da)](0x3),_0x2cda42=_0x16bdce([_0x3de068(0x437),_0x3de068(0x265),..._0x388293]),_0x57a9e0=_0x588056(_0x2cda42),_0x2a630d=new Set([_0x3de068(0x1b8),'-d','--key','-k','--config','-c',_0x3de068(0x379),'-p',_0x3de068(0x207),'--env','-e',_0x3de068(0x2c9),_0x3de068(0x311),_0x3de068(0x3c6),_0x3de068(0x2e1),_0x3de068(0x465),_0x3de068(0x1de),_0x3de068(0x287),_0x3de068(0x44a),_0x3de068(0x2aa),'-u',_0x3de068(0x268)]);let _0x378b4e=null;for(let _0x3dac1b=0x0;_0x3dac1b<_0x388293[_0x3de068(0x2bd)];_0x3dac1b++){if(_0x2a630d[_0x3de068(0x22f)](_0x388293[_0x3dac1b])){_0x3dac1b++;continue;}if(!_0x388293[_0x3dac1b][_0x3de068(0x3ae)]('-')){_0x378b4e=_0x388293[_0x3dac1b];break;}}(async()=>{const _0x13fb6e=_0x3de068;if(_0x37a369===_0x13fb6e(0x2a7)){const _0x5a951b=process[_0x13fb6e(0x259)][0x3],_0x476c22=process[_0x13fb6e(0x259)][_0x13fb6e(0x2da)](0x4),_0x626ad=_0x16bdce([_0x13fb6e(0x437),_0x13fb6e(0x265),..._0x476c22]),_0x43a1dd=_0x588056(_0x626ad),_0x9e983c=new Set([_0x13fb6e(0x1b8),'-d','--key','-k',_0x13fb6e(0x2d2),'-c','--port','-p',_0x13fb6e(0x311),_0x13fb6e(0x3c6),_0x13fb6e(0x2e1),_0x13fb6e(0x465),_0x13fb6e(0x1de),_0x13fb6e(0x287),_0x13fb6e(0x207),_0x13fb6e(0x442),'-e',_0x13fb6e(0x2c9)]),_0x13ecb1=[];for(let _0x1a954c=0x0;_0x1a954c<_0x476c22['length'];_0x1a954c++){if(_0x9e983c[_0x13fb6e(0x22f)](_0x476c22[_0x1a954c])){_0x1a954c++;continue;}if(_0x476c22[_0x1a954c][_0x13fb6e(0x3ae)]('-'))continue;_0x13ecb1['push'](_0x476c22[_0x1a954c]);}switch(_0x5a951b){case _0x13fb6e(0x3f9):await _0x29dbfc(_0x43a1dd,_0x626ad);break;case'list':await _0x44b89f(_0x43a1dd);break;case _0x13fb6e(0x1d0):await _0x3640a0(_0x13ecb1[0x0],_0x43a1dd);break;default:console['error'](_0x13fb6e(0x44f)+_0x5a951b+_0x13fb6e(0x25d)),process['exit'](0x1);}return;}if(_0x37a369===_0x13fb6e(0x2ed)){const _0x587269=requireOkdbLicenseCodec(),_0x587edb=process['argv'][_0x13fb6e(0x2da)](0x3),_0x131210=_0x16bdce([_0x13fb6e(0x437),_0x13fb6e(0x265),..._0x587edb]),_0x15eb8b=_0x588056(_0x131210),_0x458fcf=new Set(['--path','-d','--key','-k',_0x13fb6e(0x2d2),'-c',_0x13fb6e(0x379),'-p',_0x13fb6e(0x207)]),_0x1bffa8=[];for(let _0x35e498=0x0;_0x35e498<_0x587edb['length'];_0x35e498++){if(_0x458fcf[_0x13fb6e(0x22f)](_0x587edb[_0x35e498])){_0x35e498++;continue;}if(_0x587edb[_0x35e498][_0x13fb6e(0x3ae)]('-'))continue;_0x1bffa8[_0x13fb6e(0x365)](_0x587edb[_0x35e498]);}const _0x29b627=_0x1bffa8[0x0]??null;if(_0x29b627===_0x13fb6e(0x332))await _0x533347(_0x1bffa8[0x1],_0x15eb8b);else{if(!_0x29b627)await _0xb7b86d(_0x15eb8b);else{let _0x10008c=_0x587269[_0x13fb6e(0x37d)](_0x29b627);if(_0x10008c===_0x13fb6e(0x2d3)&&_0xb23c62['existsSync'](_0x29b627))_0x10008c=_0x13fb6e(0x31b);if(_0x10008c===_0x13fb6e(0x31b))try{const _0x3e00c4=_0xb23c62['readFileSync'](_0x29b627,_0x13fb6e(0x391))[_0x13fb6e(0x42a)](),_0x3137ab=_0x587269['detectInputType'](_0x3e00c4);if(_0x3137ab===_0x13fb6e(0x26e)){await _0x1ffb31(_0x3e00c4,_0x15eb8b);return;}await _0x4bad3d(_0x29b627,_0x15eb8b);return;}catch(_0x605c78){console[_0x13fb6e(0x1d4)]('[okdb]\x20error:\x20failed\x20to\x20read\x20'+_0x29b627+':\x20'+_0x605c78[_0x13fb6e(0x2b8)]),process['exit'](0x1);}switch(_0x10008c){case'blob':await _0x4bad3d(_0x29b627,_0x15eb8b);break;case _0x13fb6e(0x26e):await _0x1ffb31(_0x29b627,_0x15eb8b);break;case _0x13fb6e(0x353):await _0x45b716(_0x29b627,_0x15eb8b);break;default:console[_0x13fb6e(0x1d4)](_0x13fb6e(0x3fd)+_0x29b627+'\x22'),console[_0x13fb6e(0x1d4)](''),console[_0x13fb6e(0x1d4)]('\x20\x20Expected\x20one\x20of:'),console[_0x13fb6e(0x1d4)](_0x13fb6e(0x1f9)),console[_0x13fb6e(0x1d4)](_0x13fb6e(0x1dc)),console['error']('\x20\x20\x20\x20•\x20a\x20license\x20id\x20\x20\x20\x20\x20(uuid)'),console[_0x13fb6e(0x1d4)](_0x13fb6e(0x3fa)),console[_0x13fb6e(0x1d4)](''),console[_0x13fb6e(0x1d4)]('\x20\x20Usage:\x20okdb\x20license\x20[<blob|path|uuid|activation-token>]'),process[_0x13fb6e(0x3e8)](0x1);}}}return;}switch(_0x37a369){case'doctor':await _0x49a24b(_0x57a9e0);break;case _0x13fb6e(0x2ea):await _0x176d50();break;case'reset':await _0x2f1989(_0x57a9e0);break;case _0x13fb6e(0x2f3):await _0x15a7dc(_0x378b4e??_0x574890[_0x13fb6e(0x429)]('./okdb-backup'),_0x57a9e0);break;case _0x13fb6e(0x3f0):await _0x4b1e96(_0x378b4e??_0x574890['resolve'](_0x13fb6e(0x2ee)),_0x57a9e0,_0x2cda42);break;case _0x13fb6e(0x2fa):await _0x2f9d02(_0x378b4e??_0x574890[_0x13fb6e(0x429)](_0x13fb6e(0x2ee)),_0x57a9e0,_0x2cda42);break;case'join':await _0x16a73e(_0x378b4e,_0x57a9e0,_0x2cda42);break;}})()['then'](()=>process[_0x3de068(0x3e8)](0x0))[_0x3de068(0x47b)](_0x2ab541=>{const _0x3494df=_0x3de068;console[_0x3494df(0x1d4)]('\x0a[okdb]\x20error:\x20'+(_0x2ab541['message']||_0x2ab541)+'\x0a'),process[_0x3494df(0x3e8)](0x1);});}else _0x38052()['catch'](_0x493abf=>{const _0x274248=_0x3de068;console[_0x274248(0x1d4)](_0x274248(0x1eb)),console[_0x274248(0x1d4)](_0x493abf[_0x274248(0x301)]||_0x493abf),process['exit'](0x1);});}return okdb$1;}var okdbExports=requireOkdb(),okdb=getDefaultExportFromCjs(okdbExports);function _0x4181(){const _0x4492bf=['floor','\x20\x20\x20\x20admin:\x20http://localhost:','importBlobs','[okdb]\x20backing\x20up\x20to\x20','der','config','LICENSE_INVALID',',\x20label:\x20','map','envs=','files/','type:registered','stdin','files','../okdb','dest','license:removed','\x20\x20Tier:\x20\x20\x20\x20','\x20\x20✓\x20http\x20listening\x20on\x20:','startsWith','\x20\x20Usage:','\x27\x20already\x20registered','doctor','dropFts','payload','sizeAfter','7418240QzXetx','7RpaFJF','typesPerEnv','port','Invalid\x20primary\x20key\x20type:\x20','\x20active\x20env:\x20','update','prompt','\x0a\x20\x20Usage:\x20use\x20<env-name>\x0a','VERB','_envs','\x0a\x20\x20Run\x20okdb\x20to\x20start\x20the\x20server.\x0a','\x20type','entries','assertLimit','decodeActivationToken','features','--password','__writeCounter','\x0a\x20\x20No\x20documentation\x20found\x20for:\x20','port\x20','writeUInt8','\x20licenses','.okdb-write-test','\x0a\x20\x20License\x20details:','no\x20.kdbconfig\x20(using\x20defaults)','\x0a\x20\x20Invalid\x20JSON:\x20','[okdb]\x20starting…\x0a','reset','tags','creating','queue/','unique:violation_resolved','enabled','platform','already\x20in\x20use','decodeLicenseBlob:\x20blob\x20too\x20short\x20(','\x27\x20doesn\x27t\x20exist','verifyActivation','schema:set','\x20\x20Build:\x20\x20\x20key\x20fingerprint\x20','\x20\x20Error:\x20','indexes','License\x20limit\x20exceeded:\x20','[okdb]\x20created\x20.kdbconfig','SIGINT','LICENSE_HASH_MISMATCH','VERSION_MISMATCH','\x0a\x20\x20✓\x20License\x20activated','item:remove','Examples','exit','\x20\x20Type\x20','toISOString','resetting','[okdb]\x20error:\x20join\x20requires\x20credentials.\x20Provide\x20--token\x20<t>\x20or\x20--username\x20<u>\x20--password\x20<p>','EADDRINUSE','Index\x20\x22','[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22','export','prototype','.kdbconfig','activateLicense','DELETE','\x20\x20→\x20\x20','_license','--version','--no-admin','create','\x20\x20\x20\x20•\x20a\x20path\x20to\x20a\x20.license\x20file','keys/public.pem','item:update','[okdb]\x20error:\x20unrecognized\x20input:\x20\x22','once','\x20(expires\x20','[okdb]\x20exported\x20\x20types=','\x20\x20\x20\x20features:\x20\x20','\x20\x20\x20http://localhost:','grants','POST','Shutting\x20down\x20due\x20to\x20license\x20expiry','open','xdg-open\x20','find','Invalid\x20license\x20blob:\x20','[okdb]\x20error:\x20--password\x20requires\x20--name',',\x20got\x20','operation','\x20logs\x20off\x0a','ttl:clear','\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.','trimStart','\x0a\x20\x20✓\x20License\x20added','Build\x20expects\x20public\x20key\x20fingerprint\x20','access:\x20','235AeXXde','\x20\x20@','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20was\x20issued\x20for\x20a\x20different\x20node\x20—\x20share\x20this\x20node\x27s\x20PIN\x20with\x20the\x20vendor.','(unset)','existsSync','syncPeers','pin','getSecurityNotices','from','types/env=','processors/','scrypt','count','start\x20','\x20records','isInteger','\x20\x20\x20\x20id:\x20\x20\x20\x20','Type\x20\x27','replace','api','\x1b[34m','resolve','trim','captureStackTrace','getPins','\x22\x20(must\x20be\x20debug|info|warn|error)','LICENSE_LIMIT_EXCEEDED','active','getCount','\x22\x20matches\x20','fts','\x20\x20║','transport','readUInt8','exportBlobs','node','index:drop','system','type','\x0d[okdb]\x20','\x20\x20\x20\x203.\x20Run:\x20\x20okdb\x20license\x20<activation-token>','[okdb]\x20failed\x20to\x20parse\x20config\x20file\x20','net','sha256','started','\x20\x20(licensee:\x20','--env','rawBuf','onLicenseExpired','decodeLicenseBlob:\x20failed\x20to\x20decode\x20payload:\x20','Environments','license:activated','licenseType','System','--token','OKDBIndexAlreadyRegisteredError','history','keys','timeMachine','[okdb]\x20unknown\x20token\x20action:\x20\x22','toString','\x0a\x20\x20\x20\x20','unique:violation','\x20file','hint','(null)','env/','\x0a[okdb]\x20shutting\x20down…\x0a','\x20\x20\x20\x20\x20\x20\x20\x20\x20OKDB\x20SHELL\x20\x20\x20\x20\x20\x20\x20\x20\x20','[okdb]\x20error:\x20remove\x20requires\x20an\x20id\x20argument','\x20\x20\x20\x20status:\x20\x20\x20\x20active','--env\x20<name>','bold','columns','.\x20Only\x20primitives,\x20null,\x20Buffers,\x20and\x20arrays\x20are\x20allowed.\x20Got:\x20','\x0a\x20\x20Joined.\x20Remote\x20tokens\x20replicated.\x20You\x20can\x20now\x20log\x20in\x20with\x20cluster\x20credentials.\x0a','env:removed','http://localhost:','pending','line','result','--permissions','EXIT','type:drop','PIN','decoded','\x20\x20changes=','loadEnvFile','help','default','LICENSEE','\x20\x20✓\x20Removed\x20license\x20','INDEX_HAS_CONSUMERS','\x20\x20Note:\x20this\x20node\x20has\x20existing\x20tokens.\x20They\x20will\x20coexist\x20with\x20cluster\x20tokens\x0a','engines','\x20\x20Example:\x20okdb\x20join\x20https://node-a.example.com\x20--token\x20<t>\x20--address\x20http://myhost:8484\x0a','_computeStatus','join','ACTIVATION_EXPIRED','node:crypto','use\x20<env>','202153SxaNmw','\x20/\x20','catch','OKDBUniqueConstraintError','--help','keys:','copy','write','param','(empty)','types','dim','env','licensee','created','\x20\x20\x20\x20\x20explicit\x20method\x0a\x0a\x20\x20','homedir','[okdb]\x20nothing\x20to\x20reset\x20—\x20','values','drop','exports','[okdb]\x20loaded\x20config:\x20','effective','ftsName','[okdb]\x20error:\x20token\x20with\x20name\x20\x22','\x20\x20\x20\x20\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/','registerType','\x20\x20All\x20checks\x20passed.\x0a','now','toLocaleString','bus:poke','Files','white','OKDB-PIN-V1:','hidden','statSync','forEach','blobs','PATCH','handle','stopped','\x20\x20\x20\x20-\x20The\x20license\x20blob\x20has\x20not\x20been\x20added\x20yet\x20—\x20run\x20`okdb\x20license\x20<blob>`\x20first.','logLevel','reload','endsWith','Sync','2952PVquHW','freeze','--blobs','\x20\x20Next\x20step\x20—\x20activate\x20the\x20license:','reason','171772IngNlY','failures','--path','Full-text\x20search','{}[]:,\x27\x22','targetKey','label','summary','\x20\x20✓\x20OKDB\x20server\x20running','types\x20--env\x20staging','__esModule','SIGTERM','every','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20has\x20expired\x20—\x20request\x20a\x20fresh\x20one.','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20GET\x20(implicit)\x0a\x20\x20','debug','stringify','EXPIRES','constructor','\x20\x20(unlimited)','[env]','\x20\x20Envs:\x20\x20\x20\x20','addLicense','Invalid\x20index\x20key\x20type\x20for\x20\x27','safety','password','revoke','inputSchema','readUInt32BE','isTTY','error','round','hasType','digest','mkdirSync','Unique\x20constraint\x20violated\x20on\x20','hex','No\x20tokens.','\x20\x20\x20\x20•\x20an\x20activation\x20token\x20\x20(124\x20chars)','[okdb]\x20port\x20','--grants','bus:drain','_systemEnv','txn:rollback','removeLicense','[okdb]\x20invalid\x20log\x20level:\x20\x22','OKDBAlreadyExistsError','\x20\x20Usage:\x20','\x20\x20╚═══════════════════════════╝','detachConsole','limits','reverse','padEnd','\x0a[okdb]\x20fatal\x20error:','dbPath','blob','[okdb]\x20invalid\x20port:\x20','decodeActivationToken:\x20expected\x2077\x20bytes,\x20got\x20','access','\x22\x20on\x20\x22','setSchema','\x20log\x20level:\x20','kind','\x20already\x20exists','hasOwnProperty','\x20\x20Writes:\x20\x20','\x20\x20Some\x20checks\x20failed.\x0a','\x20\x20\x20\x20•\x20a\x20license\x20blob\x20\x20\x20(Crockford\x20base32,\x20~150–250\x20chars)','ttl:set','\x0a\x20\x20Raw\x20token\x20(shown\x20once,\x20save\x20it\x20now):\x0a','resetFts','sort','toLowerCase','\x0a\x20\x20okdb\x20doctor\x0a','valid','allocUnsafe','dirname','logs','stdout','idx:','PUBLIC_KEY_PEM','--log-level','9gMXlFc','licensed','[okdb]\x20exporting\x20env\x20\x22','(on\x20any\x20path\x20command)','\x20\x20[','Invalid\x20activation\x20token:\x20','\x20(must\x20be\x201–65535)','wrong_node','terminal','No\x20license\x20found\x20matching\x20this\x20activation\x20token','\x20\x20\x20\x20path:\x20\x20','\x20\x20\x20\x20writes:\x20\x20\x20\x20','attach','\x20opening\x20','data','\x0a\x20\x20Delete\x20ALL\x20data\x20in\x20','method','level','sourceKey','\x20\x20⚠','\x20\x20✓\x20joined\x20and\x20reconciliation\x20initiated','sig','(none)','[okdb]\x20opening\x20','queue','~tokens','index','charCodeAt','\x20\x20(licenses\x20must\x20be\x20signed\x20by\x20the\x20matching\x20private\x20key)','\x20references\x20','close','issuedAt','fts:registered','PUB_FINGERPRINT','fts:drop','isArray','auth','max','setTtl','has','LICENSED_BUILD','UNIQUE_CONSTRAINT','_isFree','\x0a\x20\x20Joining\x20cluster\x20at\x20','spki','OKDBVersionMismatchError','733272bkZBmr','cause','equals','errors','split','darwin','types:','[okdb]\x20.kdbconfig\x20already\x20exists\x20—\x20skipping','test','writeUInt16BE','view:progress','Engines','includes','\x1b[36m','[okdb]\x20imported\x20\x20types=','⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20','toFixed','info','\x20\x20\x20\x20\x20\x20\x20','INVALID_VALUE','randomBytes','createPublicKey','/type/users/query\x0a\x20\x20\x20\x20','yellow','writeFileSync','[okdb]\x20reset\x20aborted','Types','__OKDB_PUB_FINGERPRINT__','invalid','\x20\x20Usage:\x20logs\x20[on|off|debug|info|warn|error]','finally','\x20—\x20type\x20env\x20to\x20list\x20available\x0a','stderr','[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22','licenseId','argv','\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','ref:violation_resolved','STATUS','\x22.\x20Use:\x20create,\x20list,\x20revoke','decodeLicenseBlob:\x20input\x20must\x20be\x20a\x20string','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20override\x20active\x20environment\x20for\x20this\x20call\x0a\x20\x20','\x20\x20·\x20','magenta','fromEntries','\x27\x20on\x20type\x20\x27','body','okdb','cyan','Events','--address','0123456789ABCDEFGHJKMNPQRSTVWXYZ','derivePin','\x20does\x20not\x20exist','--log-requests','GET','activation','admin','expiresAt','sizeBefore','\x20already\x20in\x20use','(no\x20types)','LICENSE_TYPE_OPEN','196082wkVNcE','Cannot\x20set\x20enforce\x20schema\x20on\x20','green','\x1b[90m','/api/','[okdb]\x20exporting\x20blobs…','\x20\x20\x20\x20\x20\x20','SCHEMA_COLLECTION_INVALID','unlinkSync','\x20\x20\x20\x20api:\x20\x20\x20http://localhost:','okdb.pid','OKDBTypeAlreadyRegisteredError','[okdb]\x20reset:\x20','1.8.2','env/staging/info','base64url','\x20\x20(','createInterface','--ttl','FEATURES','padStart','SIG_INVALID','title','roles','PUT\x20type/users/item/x\x20{\x22n\x22:1}','sync:apply','sub','[okdb]\x20error:\x20--address\x20is\x20required\x20for\x20join\x20(this\x20node\x27s\x20reachable\x20sync\x20address).\x0a','logRequests','dropType','\x20SECURITY\x20NOTICE','QUIT','\x27\x20is\x20already\x20registered','exec','set','decodeLicenseBlob','--key','routes','\x20records…','warn','\x20\x20[okdb]\x20shutting\x20down…','true','[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22','\x20\x20\x20\x20','[body]','assertFeature','\x20\x20\x20\x20\x20\x20\x20POST\x20(body\x20implies\x20POST)\x0a\x20\x20','schema:drop','\x20environment\x20','fts:','token','_licenseHash','[on|off|level]','--username','LICENSE_ACTIVATION_INVALID','yes','indexOf','isFile','\x20tokens:','\x20\x20Shell\x20commands','log','exportToFile','envs','Either\x20the\x20build\x20was\x20made\x20with\x20a\x20different\x20keypair,\x20or\x20the\x20license\x20was\x20issued\x20with\x20a\x20different\x20private\x20key.','\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','server','listening','message','\x22\x20to\x20enable\x20it.','ready','free\x20tier','Foreign\x20key\x20violation:\x20','length','License\x20expired\x20or\x20invalidated','version','string','children','env/:env','registerFts','mcp','clearLine','clearTtl','gray','\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','--types','\x20\x20+','\x20writes\x20(','system:drain','concat','Version\x20mismatch\x20for\x20','meta','targetType','permissions','--config','unknown','createHmac','Feature\x20not\x20licensed:\x20','waiting','noAdmin','type/users/item/alice\x20--env\x20staging','views','slice','question','red','\x20\x20⚠\x20\x20','env:opened','Indexes','details','--label','\x20\x20✗','sync','_ensureTokensType','exp','\x1b[31m','[okdb]\x20error:\x20show\x20requires\x20an\x20id\x20argument','./okdb-data','\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','init','records','\x0d[okdb]\x20blobs:\x20','license','./okdb-export.ndjson','\x1b[33m','_active','<path>','MALFORMED_TOKEN','backup','code','\x20\x20\x20\x20license:\x20free\x20tier\x20—\x20add\x20a\x20license\x20to\x20unlock\x20sync,\x20embeddings,\x20engines,\x20time-machine','/type/users\x0a\x20\x20\x20\x20','OKDBForeignKeyDeleteError','DELETE\x20type/users/item/x','INDEX_NOT_REGISTERED','import','verify','TYPE_NOT_REGISTERED','\x20\x20\x20\x20\x20\x20\x20\x20\x20browse\x20API\x20routes,\x20grouped\x20by\x20area\x0a\x20\x20','selfAddress','(add\x20a\x20license\x20first)','bind','stack','\x22\x20is\x20used\x20by:\x20','\x20deleted','ttl','listRoutes','OKDBForeignKeyError','name','\x20\x20\x20\x20status:\x20\x20\x20\x20','ROUTES','createServer','\x20\x20\x20\x20status:\x20\x20\x20\x20active\x20\x20(open\x20license\x20—\x20no\x20activation\x20needed)','writeUInt32BE',':\x20expected\x20','expires','filter','sourceType','--name','readFileSync','\x20→\x20POST\x20/api/env/','typeSubDbs','number','database\x20path\x20writable:\x20','ref:violation','properties','licenseHash','LABEL','path','call','[okdb]\x20import\x20complete','\x20day(s).','emit','[okdb]\x20started\x20in\x20','byteLength','\x27,\x20cannot\x20map\x20to\x20\x27','\x20\x20\x20\x20expires:\x20\x20\x20','txn:end','key','noRepl','\x20\x20http://localhost:','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20','OKDBError','val','options','[okdb]\x20error:\x20license\x20management\x20is\x20only\x20available\x20in\x20licensed\x20builds\x20(npm\x20run\x20build:prod).','/\x20quit\x20/\x20Ctrl+C','transaction','\x0a\x20\x20No\x20routes\x20matching\x20\x22','Schema\x20validation\x20failed\x20for\x20','INVALID_INDEX_KEY','remove','createHash','ttl:expired','migrate','[okdb]\x20backup\x20complete','\x20\x20\x20\x20label:\x20\x20\x20\x20\x20\x20\x20','\x20in\x20','[okdb]\x20error:\x20','\x20more','status','current','OKDBInvalidPrimaryKeyError','pause','system:poke','%),\x20','\x20\x20\x20\x20port:\x20\x20','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20','\x20not\x20found','.kdb_history','peers=','writes=','decodeActivationToken:\x20input\x20must\x20be\x20a\x20string','type/users/query\x20{\x22active\x22:true}','value','fts:reset','[okdb]\x20error:\x20join\x20requires\x20a\x20remote\x20address.\x20Usage:\x20okdb\x20join\x20<address>\x20--token\x20<t>','\x20\x20\x20\x20permissions:\x20','transport:\x20','timingSafeEqual','\x20for\x20commands,\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','boolean','resetIndex','uuid','get','\x20days\x20—\x20POC/demo\x20only,\x20not\x20node-bound)','createdAt','expiry','getRange','listen','null','object','--changes','\x20\x20✓\x20Revoked\x20token\x20','other','\x20months\x20from\x20issuance)','dynamic','\x20\x20\x20\x20licensee:\x20\x20','~licenses','Token\x20secret\x20not\x20configured','License\x20signature\x20invalid:\x20','push','node\x20','username','417760wvdOXz','parse','\x20\x20Common\x20causes:','\x20\x20(need\x20≥\x2018)','maxWrites','min','changes','\x20envs','registerIndex','OKDBInvalidValueError','/admin/index.html','\x1b[0m','Index\x20\x27','http','OPEN','TYPES','open\x20','--port','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','win32','type/users/item/alice','detectInputType','⚠\x20INTERNAL\x20LICENSE\x20ACTIVE\x20—\x20all\x20features\x20and\x20limits\x20are\x20unlocked.\x20For\x20vendor/internal\x20use\x20only.','dropping','isFeatureEnabled',':\x20key\x20[','some','embeddings','expired','[okdb]\x20blobs:\x20imported=','Bearer\x20','LOGS','\x0a\x0a\x20\x20','put','Processors','LICENSE_FEATURE_DISABLED','time','\x0a\x20\x20','/api','\x20\x20·\x20\x20','available','utf8','\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20','LICENSE_EXPIRED_ACTION','\x22\x20→\x20','\x20\x20records=','repeat','type/users','\x20\x20(name:\x20','ceil','CREATED'];_0x4181=function(){return _0x4492bf;};return _0x4181();}module[_0x1a8470(0x48d)]=okdb;
2
+ 'use strict';function _0x4bd8(){const _0x2a69e2=['value','\x20\x20╚═══════════════════════════╝','\x20\x20changes=','revoke','resume','isTTY','[okdb]\x20started\x20in\x20','PUBLIC_KEY_PEM','equals','scrypt','Admin','OKDBIndexHasConsumersError','(no\x20types)','\x22\x20→\x20','find','License\x20signature\x20invalid\x20—\x20this\x20license\x20was\x20not\x20signed\x20by\x20the\x20key\x20paired\x20with\x20this\x20build.\x20','--grants','exports','[okdb]\x20created\x20./okdb-data','map','toUpperCase','Examples','{}[]:,\x27\x22','[env]','\x20/\x20','onLicenseExpired','decodeLicenseBlob:\x20input\x20must\x20be\x20a\x20string','some','--env\x20<name>','ttl',']\x20already\x20maps\x20to\x20\x27','logs','\x22\x20already\x20exists','Token\x20secret\x20not\x20configured','byteLength','system','NAME','[okdb]\x20exporting\x20blobs…','\x20\x20\x20\x20license:\x20free\x20tier\x20—\x20add\x20a\x20license\x20to\x20unlock\x20sync,\x20embeddings,\x20engines,\x20time-machine','Feature\x20not\x20available\x20on\x20free\x20tier:\x20','activateLicense','spki','\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.','\x1b[36m','\x20\x20(licensee:\x20','platform','<path>','\x1b[1m','\x20active\x20env:\x20','OKDBTypeAlreadyRegisteredError','License\x20expired\x20or\x20invalidated','logRequests','[okdb]\x20reset\x20aborted','free\x20tier','fts:drop','inputSchema','green','\x22\x20is\x20used\x20by:\x20','bus:drain','decodeLicenseBlob','system:bus_state_change','standard','Version\x20mismatch\x20for\x20','\x20to\x20quit.','username','\x1b[37m','handle','start\x20','\x20writes\x20(','[okdb]\x20error:\x20unrecognized\x20input:\x20\x22','\x0a\x20\x20\x20\x20','types:','\x20\x20\x20\x20expires:\x20\x20\x20','open','dropIndex','title','/type/users/item/alice\x0a\x20\x20\x20\x20','type/users/item/alice','node','[okdb]\x20error:\x20--password\x20requires\x20--name','enabled','/api/','\x20deleted','safety','key','warn','\x20\x20\x20\x20\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/','\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','env','\x0a\x0a\x20\x20','stderr','message','split','\x20\x20\x20\x20\x20\x20\x20POST\x20(body\x20implies\x20POST)\x0a\x20\x20','\x27\x20doesn\x27t\x20exist','stopped','verify','\x20\x20(name:\x20','LICENSE_TYPE_OPEN','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','from',':\x20expected\x20','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','blobs','[okdb]\x20failed\x20to\x20parse\x20config\x20file\x20','\x20<path>\x20[json-body]','\x20already\x20exists','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','repeat','6238865gUMKoe','\x20\x20·\x20','migrate','\x20\x20(unlimited)','Types','view:progress','\x20in\x20','\x0a\x20\x20','(unset)','⚠\x20INTERNAL\x20LICENSE\x20ACTIVE\x20—\x20all\x20features\x20and\x20limits\x20are\x20unlocked.\x20For\x20vendor/internal\x20use\x20only.','\x0a\x20\x20✓\x20Token\x20created','selfAddress','input:\x20','\x1b[90m','230nKcoAm','\x20\x20⚠','\x20\x20\x20\x20writes:\x20\x20\x20\x20','stdin','remove','\x20\x20\x20\x20','time','noRepl','limits','captureStackTrace','OKDBError','pause','\x20\x20\x20\x20\x20http://localhost:','\x20\x20\x20\x20api:\x20\x20\x20http://localhost:','fromEntries','\x20\x20(need\x20≥\x2018)','Index\x20\x22','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20','addedAt','(empty)','--types','history','prompt','\x20tokens:','backup','ENVS','min','2132wIxoib','import','logLevel','0123456789ABCDEFGHJKMNPQRSTVWXYZ','okdb.pid','/type/users\x0a\x20\x20\x20\x20','index:reset','files','\x20\x20✓\x20http\x20listening\x20on\x20:','env/staging/info','max','\x20—\x20type\x20env\x20to\x20list\x20available\x0a','--permissions','features','string','%),\x20','tags:\x20','--help','\x20\x20\x20\x20usage:\x20\x20\x20','startsWith','listRoutes','\x0a\x20\x20✓\x20License\x20added','\x20\x20\x20\x20license:\x20','access','assertFeature','stdout','License\x20limit\x20exceeded:\x20','\x20log\x20level:\x20','concat','license:added','reload','toLowerCase','toFixed','ENV','records','writeFileSync','\x20\x20\x20\x203.\x20Run:\x20\x20okdb\x20license\x20<activation-token>','call','Engines','sync:apply','targetKey','getRange','\x20\x20\x20\x20license:\x20⚠\x20OPEN\x20—\x20','randomBytes','replace','port','current','\x0a\x20\x20No\x20documentation\x20found\x20for:\x20','⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20','references','1.8.3','registerType','magenta','timingSafeEqual','[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22','resetFts','\x20\x20Tier:\x20\x20\x20\x20','\x20\x20\x20\x20features:\x20\x20','477765aQKiOp','HELP','\x20\x20\x20\x20\x20\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','sig','\x20\x20\x20\x20limits:\x20\x20\x20\x20','INVALID_VALUE','_ensureTokensType','6789864qBFTka','\x20\x20✓\x20OKDB\x20server\x20running','[okdb]\x20error:\x20remove\x20requires\x20an\x20id\x20argument','SIGTERM','object','ALREADY_EXISTS','unknown','\x20\x20Usage:\x20okdb\x20license\x20[<blob|path|uuid|activation-token>]','verifyActivation','SIGINT','now','Cannot\x20delete\x20','type','readUInt32BE','fts','OKDBNotFoundError','hex','\x20\x20\x20\x20id:\x20\x20\x20\x20','552FgFgri','POST','EXIT','dest','\x20records','transport:\x20','decodeActivationToken:\x20input\x20must\x20be\x20a\x20string','existsSync','\x20(expires\x20in\x20','decoded','routes','listening','licensee','\x0a\x20\x20✓\x20License\x20activated','api','CREATED','\x20\x20→\x20\x20','length','isInteger','Open\x20licenses\x20cannot\x20exceed\x206\x20months\x20duration\x20(this\x20license\x20expires\x20','\x20\x20\x20\x20addedAt:\x20\x20\x20','decodeLicenseBlob:\x20failed\x20to\x20decode\x20payload:\x20','val','padStart','\x20→\x20POST\x20/api/env/','okdb','password','quit','\x20\x20\x20\x20name:\x20\x20\x20\x20\x20\x20\x20\x20','detachConsole','white','listLicenses','resetting','INVALID_INDEX_KEY','dim','Events','\x20\x20\x20\x20status:\x20\x20\x20\x20active\x20\x20(open\x20license\x20—\x20no\x20activation\x20needed)','OKDBTypeNotRegisteredError','writes=','[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22','true','--address','\x1b[31m','resolve','node:crypto','http','\x20\x20Type\x20','UNIQUE_CONSTRAINT','toLocaleString','txn:end','hasType','body:\x20','type:drop','properties','status','slice','{}[]:,\x0a\x0d\x09\x20','constructor','Bearer\x20','peers=','\x27,\x20cannot\x20map\x20to\x20\x27','OKDBUniqueConstraintError','\x20\x20\x20\x20status:\x20\x20\x20\x20active','expiresAt','[okdb]\x20import\x20complete','__OKDB_PUB_FINGERPRINT__','removeLicense','createServer','envs','utf8','\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','Build\x20expects\x20public\x20key\x20fingerprint\x20','[okdb]\x20backing\x20up\x20to\x20','\x20\x20Next\x20step\x20—\x20activate\x20the\x20license:','Invalid\x20activation\x20token:\x20','stopping','createPublicKey','line','163evrjyk','\x20\x20✓\x20','fts:registered','round','5805930BJHxCG','hasOwnProperty','\x20\x20skipped=','question','config','log','test','\x20\x20\x20\x20•\x20a\x20path\x20to\x20a\x20.license\x20file','embeddings','listen','\x20(must\x20be\x201–65535)','\x20\x20\x20\x202.\x20The\x20vendor\x20returns\x20an\x20activation\x20token.','sourceKey','tags','\x20\x20[','__esModule','\x22\x20to\x20enable\x20it.','types\x20--env\x20staging','\x27\x20on\x20type\x20\x27','[okdb]\x20backup\x20complete','Full-text\x20search','\x20\x20\x20\x20\x20\x20\x20','\x0a\x20\x20Run\x20okdb\x20to\x20start\x20the\x20server.\x0a','--log-level','_computeStatus','\x22\x20on\x20\x22','summary','unlinkSync','child_process','fts:reset','createHmac','setSchema','\x20day(s).','[okdb]\x20error:\x20--grants\x20must\x20be\x20valid\x20JSON\x20object','transport','\x20months\x20from\x20issuance)','Invalid\x20index\x20key\x20type\x20for\x20\x27','PUT','\x20\x20\x20\x20status:\x20\x20\x20\x20pending\x20activation','OKDBForeignKeyError','\x20\x20\x20\x20permissions:\x20','/\x20quit\x20/\x20Ctrl+C','auth','already\x20in\x20use','\x0d[okdb]\x20blobs:\x20','events','once','unique:violation','\x20\x20\x20\x20•\x20an\x20activation\x20token\x20\x20(124\x20chars)','fts:','writeUInt8','push','null','label','LICENSE_ACTIVATION_INVALID','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20','SCHEMA_COLLECTION_INVALID','NOT_FOUND','Schema\x20validation\x20failed\x20for\x20','item:update','LICENSED_BUILD','export','\x20\x20\x20\x20\x20control\x20log\x20verbosity\x0a\x20\x20','get','createdAt','licenseId','env/','data','--env','isArray','/type/users/query\x0a\x20\x20\x20\x20','engines','\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','\x20\x20✗','env:removed','\x20\x20[okdb]\x20shutting\x20down…','\x20\x20score:','[okdb]\x20error:\x20join\x20requires\x20a\x20remote\x20address.\x20Usage:\x20okdb\x20join\x20<address>\x20--token\x20<t>','uuid','\x20opening\x20','floor','\x0d[okdb]\x20','--no-admin','config\x20file\x20valid:\x20','246537dUzjtE','freeze','(none)','default','hidden','failures','INDEX_HAS_CONSUMERS','net','./okdb-export.ndjson','OKDB-PIN-V1:','License\x20signature\x20invalid:\x20','includes','system:drain','use',',\x20label:\x20','put','Sync','[on|off|level]','\x0a\x20\x20No\x20routes\x20matching\x20\x22','has','effective','PUB_FINGERPRINT','readUInt16BE','~tokens','description','registerFts','\x20\x20Flags','\x20logs\x20off\x0a','\x20for\x20commands,\x20','.kdbconfig','\x20\x20Path\x20access','\x20\x20\x20\x20•\x20a\x20license\x20blob\x20\x20\x20(Crockford\x20base32,\x20~150–250\x20chars)','method','blob','expiry','keys','Type\x20\x27','--token','payload','types','shutdown','created','body','clearLine','clearTtl','argv','--ttl','(add\x20a\x20license\x20first)','item:remove','setTtl','toString','copy','readline','sha256','count','catch','Embeddings','idx:','../','VERSION_MISMATCH','_license','resetIndex','init','<json-body>','OKDBInvalidValueError','txn:start','dropType','sourceType','set',',\x20got\x20','pending','license:activated','\x20\x20Usage:\x20','.\x20Primary\x20keys\x20must\x20be\x20string\x20or\x20number.\x20Got:\x20','type/users/query\x20{\x22active\x22:true}','[okdb]\x20error:\x20','VERB','reason','details','mkdirSync','list','--password','result','OKDBInvalidPrimaryKeyError','No\x20license\x20found\x20matching\x20this\x20activation\x20token','INVALID_PRIMARY_KEY','loadEnvFile','path','syncPeers','--label','options','charCodeAt','Invalid\x20primary\x20key\x20type:\x20','halted','trim','errors','close','.\x20The\x20active\x20license\x20does\x20not\x20enable\x20\x22','typesPerEnv','OKDBSchemaValidationError','index','gray','OKDBAlreadyExistsError','\x20\x20Note:\x20this\x20node\x20has\x20existing\x20tokens.\x20They\x20will\x20coexist\x20with\x20cluster\x20tokens\x0a','TYPES','\x22\x20matches\x20','\x20\x20\x20\x20label:\x20\x20\x20\x20\x20\x20\x20','types/env=','--path','\x0a\x20\x20Raw\x20token\x20(shown\x20once,\x20save\x20it\x20now):\x0a','~licenses','./okdb-data','padEnd','system:ready','/types\x0a\x20\x20\x20\x20','ttl:expired','debug','system:stopped','\x20\x20\x20\x20licensee:\x20\x20','activation','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20has\x20expired\x20—\x20request\x20a\x20fresh\x20one.','\x0a\x20\x20Invalid\x20JSON:\x20','\x0a[okdb]\x20shutting\x20down…\x0a','grants','--username','[okdb]\x20importing\x20','\x20\x20\x20http://localhost:','ceil','_licenseHash','SIG_INVALID','\x20\x20All\x20checks\x20passed.\x0a','http://localhost:','\x20\x20Usage:\x20logs\x20[on|off|debug|info|warn|error]','LICENSE_INVALID','\x20logs\x20on\x20\x20','(on\x20any\x20path\x20command)','terminal','_isFree','readFileSync','--blobs','admin','base64url','creating','\x1b[35m','OKDBIndexAlreadyRegisteredError','\x20\x20╔═══════════════════════════╗','\x20\x20Shell\x20commands','finally','/api/env/',')\x20to\x20your\x20license\x20vendor.','permissions','createHash','stack','level:\x20info','sub','queue','toISOString','Shutting\x20down\x20due\x20to\x20license\x20expiry','\x20\x20\x20\x20graceful\x20shutdown\x0a','info','expires','exit','allocUnsafe','[okdb]\x20error:\x20show\x20requires\x20an\x20id\x20argument','GET','dbPath','\x0a\x20\x20License\x20details:','[okdb]\x20.kdbconfig\x20already\x20exists\x20—\x20skipping','trimStart','mcp','typeSubDbs','Indexes','LICENSEE','sort','\x20SECURITY\x20NOTICE','writeUInt32BE','decodeLicenseBlob:\x20blob\x20too\x20short\x20(','txn:rollback','Queue','red','starting','ready','\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/staging/info\x0a\x0a','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20','Activation\x20invalid:\x20','license','/api','index:registered','[okdb]\x20export\x20complete','digest','\x20\x20║','code','\x27\x20is\x20already\x20registered','\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','bold','wrong_node','\x1b[0m','\x27:\x20','port\x20','exportBlobs','meta','[okdb]\x20loaded\x20config:\x20','\x1b[2m','keys/public.pem','--key','randomUUID','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20GET\x20(implicit)\x0a\x20\x20','exp','registerIndex','_active','\x0a[okdb]\x20fatal\x20error:','address','_systemEnv','ftsName','143143EXXrat','pid','open\x20','[okdb]\x20imported\x20\x20types=','FOREIGN_KEY_DELETE_RESTRICTED','pin','\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','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20was\x20issued\x20for\x20a\x20different\x20node\x20—\x20share\x20this\x20node\x27s\x20PIN\x20with\x20the\x20vendor.','name','SCHEMA_VALIDATION_FAILED','\x20\x20⚠\x20\x20','detectInputType','version','id:\x20','filter','getPins','\x20\x20\x20\x20status:\x20\x20\x20\x20','param','[okdb]\x20opening\x20','write','--name','[filter]','\x20\x20Writes:\x20\x20','waiting','rawBuf','—\x20/api/\x20is\x20auto-prefixed,\x20env\x20is\x20auto-injected','importFromFile','roles','\x0a\x20\x20Usage:\x20use\x20<env-name>\x0a','attach','doctor','_envs','\x20\x20records=','\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20','every','active','files/','false','\x20\x20\x20\x20\x20\x20','.kdb_history','[okdb]\x20created\x20.kdbconfig','[okdb]\x20error:\x20license\x20management\x20is\x20only\x20available\x20in\x20licensed\x20builds\x20(npm\x20run\x20build:prod).','error','access:\x20','drop','LICENSE_FEATURE_DISABLED','entries','\x20\x20✓\x20Revoked\x20token\x20','reset','operation','item:create','hint','HTTP\x20','\x20\x20\x20\x20-\x20The\x20license\x20blob\x20has\x20not\x20been\x20added\x20yet\x20—\x20run\x20`okdb\x20license\x20<blob>`\x20first.','\x20\x20✓\x20Removed\x20license\x20','\x20\x20http://localhost:','off','--port','\x20already\x20in\x20use','QUIT','bind','env:opened','timeMachine','valid','yellow','getSecurityNotices','number','\x22.\x20Use:\x20create,\x20list,\x20revoke','[okdb]\x20error:\x20token\x20with\x20name\x20\x22','ACTIVATION_EXPIRED','--changes','\x20\x20+','dropFts','EADDRINUSE','index:progress','\x20\x20(licenses\x20must\x20be\x20signed\x20by\x20the\x20matching\x20private\x20key)','token','TYPE_ALREADY_REGISTERED','__writeCounter','index:ready','reverse','children','\x0a\x20\x20okdb\x20doctor\x0a','STATUS','rmSync','[body]',':\x20key\x20[','recheck','\x20records…','endsWith','queue/','env/:env','type/users','use\x20<env>','\x20MB)','[okdb]\x20exporting\x20env\x20\x22','prototype','noAdmin','[okdb]\x20invalid\x20log\x20level:\x20\x22','\x20result','licenseHash','readUInt8','OKDBInvalidIndexKeyError','crypto','parse','columns','cyan','expired','[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22','sync','\x20\x20(','cause','licensed','stringify','update','changes','invalid','TYPE_NOT_REGISTERED','join','ttl:set','derivePin','\x20env','Unique\x20constraint\x20violated\x20on\x20','help','type/','maxWrites','\x0a\x20\x20Joined.\x20Remote\x20tokens\x20replicated.\x20You\x20can\x20now\x20log\x20in\x20with\x20cluster\x20credentials.\x0a','--config','licenseType','dynamic','fill','license:removed','Index\x20\x27','\x20\x20\x20\x20•\x20a\x20license\x20id\x20\x20\x20\x20\x20(uuid)','system:poke','dropping','/admin/index.html','issuedAt','other','DELETE\x20type/users/item/x','addLicense','getCount'];_0x4bd8=function(){return _0x2a69e2;};return _0x4bd8();}const _0x5d02f6=_0x4ad1;(function(_0x274e50,_0x1fe939){const _0x215c06=_0x4ad1,_0x4f471d=_0x274e50();while(!![]){try{const _0x4d963c=-parseInt(_0x215c06(0x436))/0x1*(-parseInt(_0x215c06(0x395))/0x2)+parseInt(_0x215c06(0x19a))/0x3+-parseInt(_0x215c06(0x3d6))/0x4+parseInt(_0x215c06(0x36c))/0x5+parseInt(_0x215c06(0x43a))/0x6+parseInt(_0x215c06(0x271))/0x7*(parseInt(_0x215c06(0x3e8))/0x8)+parseInt(_0x215c06(0x3cf))/0x9*(-parseInt(_0x215c06(0x37a))/0xa);if(_0x4d963c===_0x1fe939)break;else _0x4f471d['push'](_0x4f471d['shift']());}catch(_0x175364){_0x4f471d['push'](_0x4f471d['shift']());}}}(_0x4bd8,0xeb555));var require$$1$1=require(_0x5d02f6(0x1f1)),require$$1=require('fs'),require$$3=require(_0x5d02f6(0x1a1)),require$$0$2=require(_0x5d02f6(0x1ce)),require$$5=require('../okdb'),require$$0=require(_0x5d02f6(0x2d8)),require$$0$1=require(_0x5d02f6(0x414)),require$$2$1=require('os'),require$$4=require(_0x5d02f6(0x456));function getDefaultExportFromCjs(_0x10c17a){const _0x222ed8=_0x5d02f6;return _0x10c17a&&_0x10c17a[_0x222ed8(0x449)]&&Object[_0x222ed8(0x2d1)][_0x222ed8(0x43b)][_0x222ed8(0x3ba)](_0x10c17a,'default')?_0x10c17a[_0x222ed8(0x19d)]:_0x10c17a;}var okdb$1={},version=_0x5d02f6(0x3c7),require$$2={'version':version},okdbAuthTokens,hasRequiredOkdbAuthTokens;function requireOkdbAuthTokens(){if(hasRequiredOkdbAuthTokens)return okdbAuthTokens;hasRequiredOkdbAuthTokens=0x1;const _0x19f3e4=require$$0;function _0x1bc006(_0x2ef40b,_0x15ca1d){const _0x179a43=_0x4ad1;return _0x19f3e4[_0x179a43(0x458)](_0x179a43(0x1cf),_0x15ca1d)[_0x179a43(0x2e3)](_0x2ef40b)[_0x179a43(0x258)](_0x179a43(0x227));}function _0x18476e(_0x473e24,_0x380584){const _0x574a0e=_0x4ad1;if(typeof _0x473e24!==_0x574a0e(0x3a3)||typeof _0x380584!==_0x574a0e(0x3a3))return![];if(Buffer[_0x574a0e(0x321)](_0x473e24)!==Buffer['byteLength'](_0x380584))return![];return _0x19f3e4[_0x574a0e(0x3ca)](Buffer[_0x574a0e(0x363)](_0x473e24),Buffer[_0x574a0e(0x363)](_0x380584));}function _0x3e93f6(_0x230728){const _0x14d0e7=_0x4ad1;if(!_0x230728?.['startsWith'](_0x14d0e7(0x422)))return null;return _0x230728[_0x14d0e7(0x41f)](0x7);}function _0x11fd0c(_0x4d0c77=0x20){const _0x33849c=_0x4ad1;return _0x19f3e4[_0x33849c(0x3c0)](_0x4d0c77)[_0x33849c(0x1cc)](_0x33849c(0x227));}function _0x4b9565(_0x890d8e){const _0x11b6c2=_0x4ad1;return _0x19f3e4[_0x11b6c2(0x231)](_0x11b6c2(0x1cf))[_0x11b6c2(0x2e3)](_0x890d8e)['digest']('hex');}function _0x5a6e9c(_0x1191a9,_0x410324,_0x27e76a=0x36ee80){const _0x4c5f9f=_0x4ad1;if(!_0x410324)throw new Error(_0x4c5f9f(0x320));const _0x35727c=Date[_0x4c5f9f(0x3e0)](),_0x4e1da8=Buffer['from'](JSON['stringify']({'iat':_0x35727c,'exp':_0x35727c+_0x27e76a,'sub':_0x1191a9?.['id']??_0x1191a9?.[_0x4c5f9f(0x234)]??null,'username':_0x1191a9?.[_0x4c5f9f(0x33f)]??_0x1191a9?.[_0x4c5f9f(0x279)]??null,'roles':Array[_0x4c5f9f(0x47f)](_0x1191a9?.[_0x4c5f9f(0x28c)])?_0x1191a9['roles']:[]}))['toString']('base64url'),_0x446791=_0x1bc006(_0x4e1da8,_0x410324);return _0x4e1da8+'.'+_0x446791;}function _0x1491a2(_0x3bba97,_0x319793){const _0x349943=_0x4ad1;if(!_0x319793||typeof _0x3bba97!==_0x349943(0x3a3))return null;const [_0x766898,_0xf11bba]=_0x3bba97[_0x349943(0x35b)]('.');if(!_0x766898||!_0xf11bba)return null;const _0x5df9e7=_0x1bc006(_0x766898,_0x319793);if(!_0x18476e(_0xf11bba,_0x5df9e7))return null;try{const _0x34b854=JSON[_0x349943(0x2d9)](Buffer[_0x349943(0x363)](_0x766898,_0x349943(0x227))[_0x349943(0x1cc)]()),_0x3b6fc4=0x7530;if(Date[_0x349943(0x3e0)]()>Number(_0x34b854?.[_0x349943(0x26a)]??0x0)+_0x3b6fc4)return null;return _0x34b854;}catch{return null;}}async function _0x1c81f3(_0x4ad667){return new Promise((_0x264800,_0x483171)=>{const _0x549f15=_0x4ad1,_0x5da959=_0x19f3e4['randomBytes'](0x10);_0x19f3e4[_0x549f15(0x308)](_0x4ad667,_0x5da959,0x40,(_0x2c863c,_0x554ded)=>{const _0x7f9e2f=_0x549f15;if(_0x2c863c)_0x483171(_0x2c863c);_0x264800(_0x5da959[_0x7f9e2f(0x1cc)](_0x7f9e2f(0x3e6))+':'+_0x554ded['toString']('hex'));});});}async function _0x35bb8b(_0x47802d,_0x308aa7){const _0x343ae7=_0x4ad1,[_0x477acc,_0x2926f3]=_0x308aa7[_0x343ae7(0x35b)](':');if(!_0x477acc||!_0x2926f3)return![];const _0x52e1b3=Buffer[_0x343ae7(0x363)](_0x477acc,_0x343ae7(0x3e6));return new Promise((_0x1b0d84,_0x542b67)=>{const _0x12966f=_0x343ae7;_0x19f3e4[_0x12966f(0x308)](_0x47802d,_0x52e1b3,0x40,(_0x60df64,_0x443c85)=>{const _0x10a6d4=_0x12966f;if(_0x60df64)_0x542b67(_0x60df64);_0x1b0d84(_0x19f3e4['timingSafeEqual'](_0x443c85,Buffer[_0x10a6d4(0x363)](_0x2926f3,_0x10a6d4(0x3e6))));});});}return okdbAuthTokens={'hmac':_0x1bc006,'timingSafeEqual':_0x18476e,'parseBearer':_0x3e93f6,'randomToken':_0x11fd0c,'hashToken':_0x4b9565,'issueToken':_0x5a6e9c,'authenticateToken':_0x1491a2,'hashPassword':_0x1c81f3,'verifyPassword':_0x35bb8b},okdbAuthTokens;}var okdbLicenseCodec,hasRequiredOkdbLicenseCodec;function requireOkdbLicenseCodec(){const _0x185896=_0x5d02f6;if(hasRequiredOkdbLicenseCodec)return okdbLicenseCodec;hasRequiredOkdbLicenseCodec=0x1;const _0x2d80fa=require$$0$1,_0x455a56=_0x185896(0x398),_0x534cd6=new Uint8Array(0x100)[_0x185896(0x2f3)](0xff);for(let _0x29ee7e=0x0;_0x29ee7e<_0x455a56[_0x185896(0x3f9)];_0x29ee7e++){_0x534cd6[_0x455a56['charCodeAt'](_0x29ee7e)]=_0x29ee7e,_0x534cd6[_0x455a56['charCodeAt'](_0x29ee7e)+0x20]=_0x29ee7e;}_0x534cd6['O'[_0x185896(0x1f5)](0x0)]=0x0,_0x534cd6['o'[_0x185896(0x1f5)](0x0)]=0x0,_0x534cd6['I'[_0x185896(0x1f5)](0x0)]=0x1,_0x534cd6['i'['charCodeAt'](0x0)]=0x1,_0x534cd6['L'['charCodeAt'](0x0)]=0x1,_0x534cd6['l'[_0x185896(0x1f5)](0x0)]=0x1;function _0x5c26b(_0x59be7b){const _0x553c2d=_0x185896;let _0x115f35=0x0,_0x46cb15=0x0,_0x41ce2f='';for(let _0x48290a=0x0;_0x48290a<_0x59be7b[_0x553c2d(0x3f9)];_0x48290a++){_0x46cb15=_0x46cb15<<0x8|_0x59be7b[_0x48290a],_0x115f35+=0x8;while(_0x115f35>=0x5){_0x115f35-=0x5,_0x41ce2f+=_0x455a56[_0x46cb15>>>_0x115f35&0x1f];}}return _0x115f35>0x0&&(_0x41ce2f+=_0x455a56[_0x46cb15<<0x5-_0x115f35&0x1f]),_0x41ce2f;}function _0x405bc2(_0x54db9d){const _0x48fa58=_0x185896;_0x54db9d=_0x54db9d['replace'](/-/g,'')['toUpperCase']();let _0xd425b7=0x0,_0x1ae12d=0x0;const _0x5e0c53=[];for(let _0x590cc2=0x0;_0x590cc2<_0x54db9d[_0x48fa58(0x3f9)];_0x590cc2++){const _0x509164=_0x534cd6[_0x54db9d[_0x48fa58(0x1f5)](_0x590cc2)];if(_0x509164===0xff)continue;_0x1ae12d=_0x1ae12d<<0x5|_0x509164,_0xd425b7+=0x5,_0xd425b7>=0x8&&(_0xd425b7-=0x8,_0x5e0c53[_0x48fa58(0x46d)](_0x1ae12d>>>_0xd425b7&0xff));}return Buffer[_0x48fa58(0x363)](_0x5e0c53);}const _0x11c817=[_0x185896(0x2de),_0x185896(0x442),_0x185896(0x18d),_0x185896(0x3e4),_0x185896(0x2af),'views','mcp','files'],_0x4de984=0x0,_0x461070=0x1,_0xe0d2b5=0x2,_0x230bd9=0x6*0x1e*0x18*0x3c*0x3c*0x3e8;function _0xf6559f({issuedAt:_0x3096ec,expiresAt:_0xb6b740,licensee:licensee='',features:features={},limits:limits={},licenseType:licenseType=_0x4de984}){const _0x241721=_0x185896,_0x44a82b=Buffer['from'](licensee,_0x241721(0x42d))[_0x241721(0x41f)](0x0,0x40),_0x2d491f=0x1+0x1+0x4+0x4+0x1+_0x44a82b['length']+0x2+0x10,_0x53b14e=Buffer['allocUnsafe'](_0x2d491f);let _0x12118d=0x0;_0x53b14e[_0x241721(0x46c)](0x1,_0x12118d++),_0x53b14e[_0x241721(0x46c)](licenseType,_0x12118d++),_0x53b14e[_0x241721(0x249)](Math[_0x241721(0x196)](_0x3096ec/0x3e8),_0x12118d),_0x12118d+=0x4,_0x53b14e[_0x241721(0x249)](Math[_0x241721(0x196)](_0xb6b740/0x3e8),_0x12118d),_0x12118d+=0x4,_0x53b14e[_0x241721(0x46c)](_0x44a82b['length'],_0x12118d++),_0x44a82b['copy'](_0x53b14e,_0x12118d),_0x12118d+=_0x44a82b[_0x241721(0x3f9)];let _0x7a7fb0=0x0;for(let _0x18884e=0x0;_0x18884e<_0x11c817[_0x241721(0x3f9)];_0x18884e++){if(features[_0x11c817[_0x18884e]])_0x7a7fb0|=0x1<<_0x18884e;}_0x53b14e['writeUInt16BE'](_0x7a7fb0,_0x12118d),_0x12118d+=0x2;const _0x41916f=[_0x241721(0x42c),_0x241721(0x1fc),'syncPeers','maxWrites'];for(const _0x49934c of _0x41916f){_0x53b14e['writeUInt32BE'](limits[_0x49934c]||0x0,_0x12118d),_0x12118d+=0x4;}return _0x53b14e;}function _0x487d1e(_0x134c38){const _0x494f19=_0x185896;let _0x8319a9=0x0;const _0x4ab717=_0x134c38['readUInt8'](_0x8319a9++),_0x5f9728=_0x134c38[_0x494f19(0x2d6)](_0x8319a9++),_0xaec06d=_0x134c38['readUInt32BE'](_0x8319a9);_0x8319a9+=0x4;const _0x9a54bf=_0x134c38[_0x494f19(0x3e3)](_0x8319a9);_0x8319a9+=0x4;const _0x2227f9=_0x134c38[_0x494f19(0x2d6)](_0x8319a9++),_0xd027f3=_0x134c38[_0x494f19(0x41f)](_0x8319a9,_0x8319a9+_0x2227f9)[_0x494f19(0x1cc)](_0x494f19(0x42d));_0x8319a9+=_0x2227f9;const _0x5ee718=_0x134c38[_0x494f19(0x1b0)](_0x8319a9);_0x8319a9+=0x2;const _0x12ffc7={};for(let _0x2aa0cc=0x0;_0x2aa0cc<_0x11c817[_0x494f19(0x3f9)];_0x2aa0cc++){_0x12ffc7[_0x11c817[_0x2aa0cc]]=Boolean(_0x5ee718&0x1<<_0x2aa0cc);}const _0x59e7e6=[_0x494f19(0x42c),_0x494f19(0x1fc),_0x494f19(0x1f2),_0x494f19(0x2ee)],_0x303496={};for(const _0x60e353 of _0x59e7e6){const _0x13aa93=_0x134c38[_0x494f19(0x3e3)](_0x8319a9);_0x8319a9+=0x4,_0x303496[_0x60e353]=_0x13aa93===0x0?null:_0x13aa93;}return{'v':_0x4ab717,'licenseType':_0x5f9728,'issuedAt':_0xaec06d*0x3e8,'expiresAt':_0x9a54bf*0x3e8,'licensee':_0xd027f3,'features':_0x12ffc7,'limits':_0x303496};}function _0x56fc22(_0x2359d1,_0x583841){const _0x49e51f=_0x185896,_0x9011f1=Buffer[_0x49e51f(0x3b1)]([_0x2359d1,_0x583841]),_0x3fedcc=_0x5c26b(_0x9011f1),_0x2f39c8=[];for(let _0x596f66=0x0;_0x596f66<_0x3fedcc['length'];_0x596f66+=0x8){_0x2f39c8[_0x49e51f(0x46d)](_0x3fedcc[_0x49e51f(0x41f)](_0x596f66,_0x596f66+0x8));}return _0x2f39c8[_0x49e51f(0x2e7)]('-');}function _0x170f54(_0x201f3c){const _0x1dc897=_0x185896;if(typeof _0x201f3c!==_0x1dc897(0x3a3))throw new Error(_0x1dc897(0x319));const _0x2202d4=_0x405bc2(_0x201f3c[_0x1dc897(0x3c1)](/-/g,''));if(_0x2202d4[_0x1dc897(0x3f9)]<0x41)throw new Error(_0x1dc897(0x24a)+_0x2202d4[_0x1dc897(0x3f9)]+'\x20bytes,\x20need\x20>=\x2065)');const _0x19f666=_0x2202d4[_0x1dc897(0x41f)](0x0,_0x2202d4[_0x1dc897(0x3f9)]-0x40),_0x20ecd0=_0x2202d4['slice'](_0x2202d4[_0x1dc897(0x3f9)]-0x40);let _0x44a056;try{_0x44a056=_0x487d1e(_0x19f666);}catch(_0x595943){throw new Error(_0x1dc897(0x3fd)+_0x595943[_0x1dc897(0x35a)]);}return{'rawBuf':_0x2202d4,'payload':_0x19f666,'sig':_0x20ecd0,'decoded':_0x44a056};}function _0x5059e7(_0x10258d){const _0x1c6efb=_0x185896;return _0x2d80fa['createHash'](_0x1c6efb(0x1cf))['update'](_0x10258d)['digest']()[_0x1c6efb(0x41f)](0x0,0x8);}function _0x29d00e(_0x30efed,_0x3771fd,_0x1fd731){const _0x960423=_0x185896,_0x5d07f7=_0x960423(0x1a3)+_0x1fd731,_0x38e093=Buffer[_0x960423(0x3b1)]([Buffer[_0x960423(0x363)](_0x30efed,_0x960423(0x42d)),_0x3771fd]),_0x1e54c0=_0x2d80fa[_0x960423(0x458)](_0x960423(0x1cf),_0x5d07f7)[_0x960423(0x2e3)](_0x38e093)[_0x960423(0x258)](),_0x32ef04=_0x5c26b(_0x1e54c0[_0x960423(0x41f)](0x0,0x5));return{'pin':_0x32ef04,'pinHmac':_0x1e54c0};}function _0x162a8(_0x54408e,_0x321384,_0x4a755f){const _0x1fa433=_0x185896,_0x31c794=Buffer['allocUnsafe'](0x4d);let _0x49f6aa=0x0;_0x31c794[_0x1fa433(0x46c)](0x1,_0x49f6aa++),_0x54408e[_0x1fa433(0x1cd)](_0x31c794,_0x49f6aa),_0x49f6aa+=0x8,_0x31c794[_0x1fa433(0x249)](_0x321384,_0x49f6aa),_0x49f6aa+=0x4,_0x4a755f['copy'](_0x31c794,_0x49f6aa);const _0x2706e5=_0x5c26b(_0x31c794),_0x51193d=[];for(let _0x39f86f=0x0;_0x39f86f<_0x2706e5[_0x1fa433(0x3f9)];_0x39f86f+=0x6){_0x51193d[_0x1fa433(0x46d)](_0x2706e5[_0x1fa433(0x41f)](_0x39f86f,_0x39f86f+0x6));}return _0x51193d[_0x1fa433(0x2e7)]('-');}function _0xdf0d0e(_0x2aecc1){const _0x1790c9=_0x185896;if(typeof _0x2aecc1!==_0x1790c9(0x3a3))throw new Error(_0x1790c9(0x3ee));const _0x22de6b=_0x405bc2(_0x2aecc1['replace'](/-/g,''));if(_0x22de6b[_0x1790c9(0x3f9)]!==0x4d)throw new Error('decodeActivationToken:\x20expected\x2077\x20bytes,\x20got\x20'+_0x22de6b[_0x1790c9(0x3f9)]);let _0x4f08d9=0x0;const _0x3188ed=_0x22de6b[_0x1790c9(0x2d6)](_0x4f08d9++),_0x33b49b=_0x22de6b[_0x1790c9(0x41f)](_0x4f08d9,_0x4f08d9+0x8);_0x4f08d9+=0x8;const _0xc97b63=_0x22de6b[_0x1790c9(0x3e3)](_0x4f08d9);_0x4f08d9+=0x4;const _0x22fed8=_0x22de6b[_0x1790c9(0x41f)](_0x4f08d9);return{'v':_0x3188ed,'licenseHash':_0x33b49b,'expiry':_0xc97b63,'sig':_0x22fed8};}function _0x427835({tokenString:_0x5350c4,nodeId:_0x4d3d33,rawBlobBuf:_0x2a42ef,pubKeyPem:_0x1ab586,pubFingerprint:_0x17cf55}){const _0x50b1c1=_0x185896;let _0x52b72c;try{_0x52b72c=_0xdf0d0e(_0x5350c4);}catch(_0x1572b4){return{'valid':![],'reason':'MALFORMED_TOKEN'};}const _0x34d2b9=_0x5059e7(_0x2a42ef);if(!_0x34d2b9[_0x50b1c1(0x307)](_0x52b72c[_0x50b1c1(0x2d5)]))return{'valid':![],'reason':'LICENSE_HASH_MISMATCH'};const {pinHmac:_0x2dcb2e}=_0x29d00e(_0x4d3d33,_0x34d2b9,_0x17cf55),_0x403e5e=Buffer[_0x50b1c1(0x23c)](0x4);_0x403e5e['writeUInt32BE'](_0x52b72c[_0x50b1c1(0x1bc)],0x0);const _0x56a4b2=Buffer[_0x50b1c1(0x3b1)]([Buffer[_0x50b1c1(0x363)]([_0x52b72c['v']]),_0x2dcb2e['slice'](0x0,0x5),_0x52b72c[_0x50b1c1(0x2d5)],_0x403e5e]);try{const _0x2c4b07=_0x2d80fa['verify'](null,_0x56a4b2,_0x1ab586,_0x52b72c['sig']);if(!_0x2c4b07)return{'valid':![],'reason':_0x50b1c1(0x21b)};}catch(_0x16cfb4){return{'valid':![],'reason':_0x50b1c1(0x21b)};}if(_0x52b72c[_0x50b1c1(0x1bc)]<Date['now']()/0x3e8)return{'valid':![],'reason':_0x50b1c1(0x2b6)};return{'valid':!![],'reason':'ok'};}function _0x20e804(_0x3fa397){const _0x2bf199=_0x185896;if(typeof _0x3fa397!==_0x2bf199(0x3a3))return'unknown';const _0x2d1f52=_0x3fa397[_0x2bf199(0x1f8)]();if(_0x2d1f52[_0x2bf199(0x3a8)]('/')||_0x2d1f52[_0x2bf199(0x3a8)]('./')||_0x2d1f52[_0x2bf199(0x3a8)](_0x2bf199(0x1d4))||/^[A-Za-z]:[\\/]/[_0x2bf199(0x440)](_0x2d1f52))return _0x2bf199(0x1f1);if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i[_0x2bf199(0x440)](_0x2d1f52))return'uuid';const _0x44ee66=_0x2d1f52[_0x2bf199(0x3c1)](/[\s-]+/g,'')[_0x2bf199(0x3f9)];if(_0x44ee66===0x7c)return _0x2bf199(0x211);if(_0x44ee66>=0x95&&_0x44ee66<=0xfc)return _0x2bf199(0x1bb);return'unknown';}return okdbLicenseCodec={'toBase32':_0x5c26b,'fromBase32':_0x405bc2,'encodeLicensePayload':_0xf6559f,'decodeLicensePayload':_0x487d1e,'encodeLicenseBlob':_0x56fc22,'decodeLicenseBlob':_0x170f54,'licenseHash':_0x5059e7,'derivePin':_0x29d00e,'encodeActivationToken':_0x162a8,'decodeActivationToken':_0xdf0d0e,'verifyActivation':_0x427835,'detectInputType':_0x20e804,'FEATURE_NAMES':_0x11c817,'LICENSE_TYPE_STANDARD':_0x4de984,'LICENSE_TYPE_OPEN':_0x461070,'LICENSE_TYPE_INTERNAL':_0xe0d2b5,'OPEN_LICENSE_MAX_DURATION_MS':_0x230bd9},okdbLicenseCodec;}var okdbError,hasRequiredOkdbError;function requireOkdbError(){if(hasRequiredOkdbError)return okdbError;hasRequiredOkdbError=0x1;class _0x3cbcad extends Error{constructor(_0x190c62,_0x5142fb,_0x3b294e={}){const _0x2526c0=_0x4ad1;super(_0x190c62),this[_0x2526c0(0x279)]=_0x2526c0(0x384),this[_0x2526c0(0x25a)]=_0x5142fb,this[_0x2526c0(0x1e8)]=_0x3b294e,_0x3b294e[_0x2526c0(0x2e0)]&&(this[_0x2526c0(0x2e0)]=_0x3b294e[_0x2526c0(0x2e0)]),Error[_0x2526c0(0x383)](this,this[_0x2526c0(0x421)]);}}class _0x3a137d extends _0x3cbcad{constructor(_0x30a50a,_0x3f9672,_0x37b59e,_0x219d37){const _0x1a1abd=_0x4ad1;super(_0x1a1abd(0x33d)+_0x30a50a+'@'+_0x3f9672+_0x1a1abd(0x364)+_0x37b59e+_0x1a1abd(0x1df)+_0x219d37,_0x1a1abd(0x1d5),{'type':_0x30a50a,'key':_0x3f9672,'expectedVersion':_0x37b59e,'actualVersion':_0x219d37}),this[_0x1a1abd(0x279)]='OKDBVersionMismatchError';}}class _0x8c7e46 extends _0x3cbcad{constructor(_0x53e3a4,_0x7981c6){const _0x243977=_0x4ad1;super(_0x53e3a4+'@'+_0x7981c6+'\x20does\x20not\x20exist',_0x243977(0x473),{'type':_0x53e3a4,'key':_0x7981c6}),this['name']=_0x243977(0x3e5);}}class _0x441600 extends _0x3cbcad{constructor(_0x2aacec,_0x1f66a2){const _0x372fe0=_0x4ad1;super(_0x2aacec+'@'+_0x1f66a2+_0x372fe0(0x369),_0x372fe0(0x3db),{'type':_0x2aacec,'key':_0x1f66a2}),this[_0x372fe0(0x279)]=_0x372fe0(0x200);}}class _0x15cfbd extends _0x3cbcad{constructor(_0x5747a2,_0x523073){const _0x5ad5c1=_0x4ad1,_0x3a81f3=typeof _0x523073;super(_0x5ad5c1(0x45e)+_0x5747a2+_0x5ad5c1(0x260)+_0x3a81f3+'.\x20Only\x20primitives,\x20null,\x20Buffers,\x20and\x20arrays\x20are\x20allowed.\x20Got:\x20'+_0x523073,_0x5ad5c1(0x409),{'index':_0x5747a2,'key':_0x523073,'keyType':_0x3a81f3}),this[_0x5ad5c1(0x279)]=_0x5ad5c1(0x2d7);}}class _0x159963 extends _0x3cbcad{constructor(_0x2fc3d2){const _0x152716=_0x4ad1,_0x5d705d=typeof _0x2fc3d2;super(_0x152716(0x1f6)+_0x5d705d+_0x152716(0x1e3)+_0x2fc3d2,_0x152716(0x1ef),{'key':_0x2fc3d2,'keyType':_0x5d705d}),this[_0x152716(0x279)]=_0x152716(0x1ed);}}class _0x337b97 extends _0x3cbcad{constructor(_0x53b349){const _0x48dad4=_0x4ad1;super(_0x48dad4(0x1be)+_0x53b349+_0x48dad4(0x35d),_0x48dad4(0x2e6),{'type':_0x53b349}),this[_0x48dad4(0x279)]=_0x48dad4(0x40d);}}class _0x1c7d61 extends _0x3cbcad{constructor(_0x4de035){const _0x366cea=_0x4ad1;super(_0x366cea(0x1be)+_0x4de035+'\x27\x20already\x20registered',_0x366cea(0x2be),{'type':_0x4de035}),this[_0x366cea(0x279)]=_0x366cea(0x330);}}class _0x2f5534 extends _0x3cbcad{constructor(_0x172fb5,_0x2076e7){const _0x4f94cd=_0x4ad1;super(_0x4f94cd(0x2f5)+_0x2076e7+_0x4f94cd(0x44c)+_0x172fb5+_0x4f94cd(0x35d),'INDEX_NOT_REGISTERED',{'type':_0x172fb5,'index':_0x2076e7}),this[_0x4f94cd(0x279)]='OKDBIndexNotRegisteredError';}}class _0x440665 extends _0x3cbcad{constructor(_0x5ee78f,_0x20f930){const _0x2a8d84=_0x4ad1;super(_0x2a8d84(0x2f5)+_0x20f930+'\x27\x20on\x20type\x20\x27'+_0x5ee78f+_0x2a8d84(0x25b),'INDEX_ALREADY_REGISTERED',{'type':_0x5ee78f,'index':_0x20f930}),this[_0x2a8d84(0x279)]=_0x2a8d84(0x22a);}}class _0x490488 extends _0x3cbcad{constructor(_0x4c3124,_0xc8f8c9={}){const _0x49c3fa=_0x4ad1;super(_0x4c3124,_0x49c3fa(0x3d4),_0xc8f8c9),this[_0x49c3fa(0x279)]=_0x49c3fa(0x1da);}}class _0x2180cf extends _0x3cbcad{constructor(_0x57ccdc,_0x1e06fd,_0x1c4b9c,_0x1f2543,_0x169709){const _0x19e1e3=_0x4ad1;super(_0x19e1e3(0x2eb)+_0x57ccdc+'@'+_0x1e06fd+_0x19e1e3(0x2c7)+_0x1c4b9c+_0x19e1e3(0x31d)+_0x1f2543+_0x19e1e3(0x424)+_0x169709+'\x27',_0x19e1e3(0x417),{'type':_0x57ccdc,'index':_0x1e06fd,'indexKey':_0x1c4b9c,'existingKey':_0x1f2543,'conflictingKey':_0x169709}),this['name']=_0x19e1e3(0x425);}}class _0x19028a extends _0x3cbcad{constructor(_0x17decc,_0x3b279d,_0x2857d){const _0x3aedad=_0x4ad1;super(_0x3aedad(0x474)+_0x17decc+'@'+_0x3b279d,_0x3aedad(0x27a),{'type':_0x17decc,'key':_0x3b279d,'errors':_0x2857d}),this['name']=_0x3aedad(0x1fd),this[_0x3aedad(0x3e2)]=_0x17decc,this['key']=_0x3b279d,this[_0x3aedad(0x1f9)]=_0x2857d;}}class _0xf45657 extends _0x3cbcad{constructor(_0x20a69e,_0x50c998){const _0x13e844=_0x4ad1;super('Cannot\x20set\x20enforce\x20schema\x20on\x20'+_0x20a69e+':\x20'+_0x50c998[_0x13e844(0x3f9)]+'\x20documents\x20fail\x20validation',_0x13e844(0x472),{'type':_0x20a69e,'failures':_0x50c998}),this['name']='OKDBSchemaCollectionError',this[_0x13e844(0x3e2)]=_0x20a69e,this[_0x13e844(0x19f)]=_0x50c998;}}class _0x42f1e3 extends _0x3cbcad{constructor(_0x9bd65e,_0x58df1e,_0x87285c,_0x38fc20,_0x576b7f){const _0x38cb00=_0x4ad1;super('Foreign\x20key\x20violation:\x20'+_0x9bd65e+'@'+_0x58df1e+'.'+_0x87285c+'\x20references\x20'+_0x38fc20+'@'+_0x576b7f+'\x20which\x20does\x20not\x20exist','FOREIGN_KEY_VIOLATION',{'sourceType':_0x9bd65e,'sourceKey':_0x58df1e,'fieldPath':_0x87285c,'targetType':_0x38fc20,'targetKey':_0x576b7f}),this[_0x38cb00(0x279)]=_0x38cb00(0x461),this[_0x38cb00(0x1dd)]=_0x9bd65e,this[_0x38cb00(0x446)]=_0x58df1e,this['fieldPath']=_0x87285c,this['targetType']=_0x38fc20,this[_0x38cb00(0x3bd)]=_0x576b7f;}}class _0x5cab5e extends _0x3cbcad{constructor(_0xe83d00,_0x5e742d,_0x4fa4ec){const _0x8172bd=_0x4ad1;super(_0x8172bd(0x3e1)+_0xe83d00+'@'+_0x5e742d+':\x20'+_0x4fa4ec[_0x8172bd(0x3f9)]+'\x20document(s)\x20reference\x20it\x20with\x20onDelete:restrict',_0x8172bd(0x275),{'targetType':_0xe83d00,'targetKey':_0x5e742d,'references':_0x4fa4ec}),this['name']='OKDBForeignKeyDeleteError',this['targetType']=_0xe83d00,this['targetKey']=_0x5e742d,this[_0x8172bd(0x3c6)]=_0x4fa4ec;}}class _0x43cce7 extends _0x3cbcad{constructor(_0x2bafe2,_0x47bb6a,_0x2e485e){const _0x456180=_0x4ad1;super(_0x456180(0x38a)+_0x47bb6a+_0x456180(0x453)+_0x2bafe2+_0x456180(0x338)+_0x2e485e[_0x456180(0x312)](_0x8133df=>_0x8133df['kind']+':'+_0x8133df[_0x456180(0x279)])[_0x456180(0x2e7)](',\x20'),_0x456180(0x1a0),{'type':_0x2bafe2,'index':_0x47bb6a,'usedBy':_0x2e485e}),this[_0x456180(0x279)]=_0x456180(0x30a);}}return okdbError={'OKDBError':_0x3cbcad,'OKDBVersionMismatchError':_0x3a137d,'OKDBNotFoundError':_0x8c7e46,'OKDBAlreadyExistsError':_0x441600,'OKDBInvalidIndexKeyError':_0x15cfbd,'OKDBInvalidPrimaryKeyError':_0x159963,'OKDBTypeNotRegisteredError':_0x337b97,'OKDBTypeAlreadyRegisteredError':_0x1c7d61,'OKDBIndexNotRegisteredError':_0x2f5534,'OKDBIndexAlreadyRegisteredError':_0x440665,'OKDBInvalidValueError':_0x490488,'OKDBUniqueConstraintError':_0x2180cf,'OKDBSchemaValidationError':_0x19028a,'OKDBSchemaCollectionError':_0xf45657,'OKDBForeignKeyError':_0x42f1e3,'OKDBForeignKeyDeleteError':_0x5cab5e,'OKDBIndexHasConsumersError':_0x43cce7},okdbError;}var okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x44aefe=_0x5d02f6;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x9b76d1={'PUT':_0x44aefe(0x1a9),'REMOVE':'remove','INDEX_DROP':_0x44aefe(0x349),'INDEX_REGISTER':_0x44aefe(0x26b),'INDEX_RESET':_0x44aefe(0x1d7),'TYPE_REGISTER':_0x44aefe(0x3c8),'TYPE_DROP':_0x44aefe(0x1dc),'FTS_REGISTER':_0x44aefe(0x1b3),'FTS_DROP':_0x44aefe(0x2b9),'FTS_RESET':_0x44aefe(0x3cc),'SCHEMA_SET':_0x44aefe(0x459),'SCHEMA_DROP':'dropSchema','TTL_SET':_0x44aefe(0x1cb),'TTL_CLEAR':_0x44aefe(0x1c6)},_0x2cf111={'SYSTEM_READY':_0x44aefe(0x20b),'SYSTEM_STOPPED':_0x44aefe(0x20f),'SYSTEM_CLOCK_CHANGE':'system:clock_change','SYSTEM_POKE':_0x44aefe(0x2f7),'SYSTEM_DRAIN':_0x44aefe(0x1a6),'SYSTEM_BUS_STATE_CHANGE':_0x44aefe(0x33b),'ITEM_CREATE':_0x44aefe(0x2a3),'ITEM_UPDATE':_0x44aefe(0x475),'ITEM_REMOVE':_0x44aefe(0x1ca),'INDEX_RESET':_0x44aefe(0x39b),'INDEX_READY':_0x44aefe(0x2c0),'INDEX_PROGRESS':_0x44aefe(0x2bb),'VIEW_PROGRESS':_0x44aefe(0x371),'INDEX_DROP':'index:drop','INDEX_REGISTERED':_0x44aefe(0x256),'FTS_REGISTERED':_0x44aefe(0x438),'FTS_DROP':_0x44aefe(0x335),'FTS_RESET':_0x44aefe(0x457),'SCHEMA_SET':'schema:set','SCHEMA_DROP':'schema:drop','UNIQUE_VIOLATION':_0x44aefe(0x469),'UNIQUE_VIOLATION_RESOLVED':'unique:violation_resolved','REF_VIOLATION':'ref:violation','REF_VIOLATION_RESOLVED':'ref:violation_resolved','SYNC_APPLY':_0x44aefe(0x3bc),'TXN_START':_0x44aefe(0x1db),'TXN_END':_0x44aefe(0x419),'TXN_ROLLBACK':_0x44aefe(0x24b),'TYPE_REGISTERED':'type:registered','TYPE_DROP':_0x44aefe(0x41c),'ENV_OPENED':_0x44aefe(0x2ae),'ENV_REMOVED':_0x44aefe(0x190),'TTL_EXPIRED':_0x44aefe(0x20d),'TTL_SET':_0x44aefe(0x2e8),'TTL_CLEAR':'ttl:clear','LICENSE_INVALID':'license:invalid','LICENSE_ADDED':_0x44aefe(0x3b2),'LICENSE_ACTIVATED':_0x44aefe(0x1e1),'LICENSE_REMOVED':_0x44aefe(0x2f4)},_0x41104e={'CREATING':_0x44aefe(0x228),'RESETTING':_0x44aefe(0x408),'READY':_0x44aefe(0x24f),'DROPPING':_0x44aefe(0x2f8),'WAITING':_0x44aefe(0x288)},_0x66c1c7={'CREATED':'created','STARTING':_0x44aefe(0x24e),'STARTED':'started','STOPPING':_0x44aefe(0x433),'STOPPED':_0x44aefe(0x35e)},_0x37cd7a={'CREATING':_0x44aefe(0x228),'READY':_0x44aefe(0x24f),'HALTED':_0x44aefe(0x1f7),'STOPPED':'stopped','RESETTING':'resetting'},_0x5a8784=Object[_0x44aefe(0x19b)]({'POKE':'bus:poke','DRAIN':_0x44aefe(0x339)});return okdbEnums={'BUS_EVENTS':_0x5a8784,'CHANGE_ACTIONS':_0x9b76d1,'EVENTS':_0x2cf111,'INDEX_STATE':_0x41104e,'OKDB_STATE':_0x66c1c7,'VIEW_STATE':_0x37cd7a},okdbEnums;}var okdbPubkey,hasRequiredOkdbPubkey;function requireOkdbPubkey(){const _0x48af61=_0x5d02f6;if(hasRequiredOkdbPubkey)return okdbPubkey;hasRequiredOkdbPubkey=0x1;const _0x3d47dc=require$$1,_0x3c2b30=require$$1$1,_0x1d70d9=require$$0,_0x2831e7=_0x3d47dc[_0x48af61(0x224)](_0x3c2b30[_0x48af61(0x2e7)](__dirname,_0x48af61(0x266)),_0x48af61(0x42d))[_0x48af61(0x1f8)](),_0x37e032=_0x1d70d9[_0x48af61(0x434)](_0x2831e7)[_0x48af61(0x477)]({'type':_0x48af61(0x328),'format':'der'}),_0x59bf7a=_0x1d70d9['createHash']('sha256')[_0x48af61(0x2e3)](_0x37e032)['digest'](_0x48af61(0x3e6))['slice'](0x0,0x10);return okdbPubkey={'PUBLIC_KEY_PEM':_0x2831e7,'PUB_FINGERPRINT':_0x59bf7a},okdbPubkey;}var okdbLicense,hasRequiredOkdbLicense;function requireOkdbLicense(){const _0x44257d=_0x5d02f6;if(hasRequiredOkdbLicense)return okdbLicense;hasRequiredOkdbLicense=0x1;const _0xea3a87=require$$0,{OKDBError:_0x828996}=requireOkdbError(),{EVENTS:_0x503186}=requireOkdbEnums(),_0xa35622=requireOkdbLicenseCodec(),{LICENSE_TYPE_OPEN:_0x47b0d5,LICENSE_TYPE_INTERNAL:_0x4bb2ba,OPEN_LICENSE_MAX_DURATION_MS:_0x15fe64}=_0xa35622,_0x256a81=requireOkdbPubkey(),_0x568bf6={'LICENSED_BUILD':'true','PUBLIC_KEY_PEM':_0x256a81['PUBLIC_KEY_PEM'],'PUB_FINGERPRINT':_0x256a81[_0x44257d(0x1af)],'LICENSE_EXPIRED_ACTION':'log'},_0xfa9028='~licenses',_0x50328d={'features':{'sync':![],'embeddings':![],'engines':![],'fts':!![],'timeMachine':![],'views':!![],'mcp':!![],'files':!![]},'limits':{'envs':0x2,'typesPerEnv':0xa,'syncPeers':0x0,'maxWrites':0xf4240},'_isFree':!![]};async function _0x51c12(_0x371c70){const _0x41d0e9=_0x44257d;!_0x371c70[_0x41d0e9(0x41a)](_0xfa9028)&&await _0x371c70[_0x41d0e9(0x3c8)](_0xfa9028);}class _0x3534cb{constructor(_0x5b6492){const _0x23edc0=_0x44257d;this['okdb']=_0x5b6492,this[_0x23edc0(0x26c)]=null;}async[_0x44257d(0x3b3)](){const _0xe96224=_0x44257d,_0x13db57=this['okdb'][_0xe96224(0x26f)];if(!_0x13db57||!_0x13db57[_0xe96224(0x41a)](_0xfa9028)){this[_0xe96224(0x26c)]=null;return;}const _0x2b5b7d=this[_0xe96224(0x401)]['id'];let _0x30401a=null;for(const {key:_0x24dbf8,value:_0x27931b}of _0x13db57[_0xe96224(0x3be)](_0xfa9028)){const _0x13200a=this['_computeStatus'](_0x27931b,_0x2b5b7d);_0x13200a===_0xe96224(0x294)&&!_0x30401a&&(_0x30401a={..._0x27931b,'id':_0x24dbf8,'status':_0x13200a});}this[_0xe96224(0x26c)]=_0x30401a;if(this[_0xe96224(0x26c)]&&this[_0xe96224(0x26c)][_0xe96224(0x2f1)]===_0x47b0d5){const _0x15b77=Math[_0xe96224(0x219)]((this['_active']['expiresAt']-Date[_0xe96224(0x3e0)]())/0x5265c00);this[_0xe96224(0x401)][_0xe96224(0x43f)]?.[_0xe96224(0x354)](_0xe96224(0x3c5)+_0x15b77+_0xe96224(0x45a),{'feature':_0xe96224(0x254),'licensee':this[_0xe96224(0x26c)]['licensee'],'expiresAt':new Date(this[_0xe96224(0x26c)][_0xe96224(0x427)])['toISOString']()});}this[_0xe96224(0x26c)]&&this['_active'][_0xe96224(0x2f1)]===_0x4bb2ba&&this['okdb']['log']?.[_0xe96224(0x354)]('⚠\x20INTERNAL\x20LICENSE\x20ACTIVE\x20—\x20all\x20features\x20and\x20limits\x20are\x20unlocked.\x20For\x20vendor/internal\x20use\x20only.',{'feature':_0xe96224(0x254),'licensee':this[_0xe96224(0x26c)][_0xe96224(0x3f4)]});}[_0x44257d(0x452)](_0x34fbe4,_0x590e9a){const _0x45b4d3=_0x44257d;if(!_0x34fbe4[_0x45b4d3(0x1bb)])return _0x45b4d3(0x2e5);let _0x16f1ee;try{_0x16f1ee=_0xa35622[_0x45b4d3(0x33a)](_0x34fbe4[_0x45b4d3(0x1bb)]);}catch(_0x5c7184){return'invalid';}try{const _0x397f02=_0xea3a87[_0x45b4d3(0x35f)](null,_0x16f1ee[_0x45b4d3(0x1c0)],_0x568bf6[_0x45b4d3(0x306)],_0x16f1ee[_0x45b4d3(0x3d2)]);if(!_0x397f02)return _0x45b4d3(0x2e5);}catch(_0x36e3ad){return _0x45b4d3(0x2e5);}if(_0x16f1ee[_0x45b4d3(0x3f1)]['licenseType']===_0x4bb2ba)return _0x45b4d3(0x294);if(_0x16f1ee['decoded'][_0x45b4d3(0x427)]<=Date[_0x45b4d3(0x3e0)]())return _0x45b4d3(0x2dc);if(_0x16f1ee['decoded']['licenseType']===_0x47b0d5)return _0x45b4d3(0x294);if(!_0x34fbe4[_0x45b4d3(0x211)])return _0x45b4d3(0x1e0);const _0x313dff=_0xa35622['verifyActivation']({'tokenString':_0x34fbe4[_0x45b4d3(0x211)],'nodeId':_0x590e9a,'rawBlobBuf':_0x16f1ee['rawBuf'],'pubKeyPem':_0x568bf6[_0x45b4d3(0x306)],'pubFingerprint':_0x568bf6[_0x45b4d3(0x1af)]});if(_0x313dff[_0x45b4d3(0x1e7)]==='LICENSE_HASH_MISMATCH'||_0x313dff['reason']==='SIG_INVALID')return _0x45b4d3(0x25e);if(_0x313dff[_0x45b4d3(0x1e7)]===_0x45b4d3(0x2b6))return _0x45b4d3(0x2dc);if(!_0x313dff[_0x45b4d3(0x2b0)])return _0x45b4d3(0x25e);return'active';}get[_0x44257d(0x294)](){const _0x4061a0=_0x44257d;return this[_0x4061a0(0x26c)];}get[_0x44257d(0x1ae)](){const _0x222ce3=_0x44257d;return this[_0x222ce3(0x26c)]??_0x50328d;}[_0x44257d(0x3ad)](_0x131743){const _0x358962=_0x44257d;if(_0x568bf6['LICENSED_BUILD']!==_0x358962(0x410))return;const _0xc79222=this[_0x358962(0x1ae)];if(!_0xc79222[_0x358962(0x3a2)]?.[_0x131743]){const _0x2e8414=_0xc79222[_0x358962(0x223)]?_0x358962(0x326)+_0x131743+'.\x20Add\x20a\x20license\x20that\x20includes\x20\x22'+_0x131743+_0x358962(0x44a):'Feature\x20not\x20licensed:\x20'+_0x131743+_0x358962(0x1fb)+_0x131743+'\x22.';throw new _0x828996(_0x2e8414,_0x358962(0x29e),{'feature':_0x131743});}}['isFeatureEnabled'](_0x49c9c2){const _0x4c0744=_0x44257d;if(_0x568bf6['LICENSED_BUILD']!==_0x4c0744(0x410))return!![];return!!this['effective'][_0x4c0744(0x3a2)]?.[_0x49c9c2];}['assertLimit'](_0xa6be8f,_0x32f455){const _0x2c9f7a=_0x44257d;if(_0x568bf6[_0x2c9f7a(0x476)]!==_0x2c9f7a(0x410))return;const _0x15ecf7=this[_0x2c9f7a(0x1ae)],_0x573fab=_0x15ecf7[_0x2c9f7a(0x382)]?.[_0xa6be8f];if(_0x573fab===null||_0x573fab===undefined||_0x573fab===0x0)return;if(_0x32f455>=_0x573fab)throw new _0x828996(_0x2c9f7a(0x3af)+_0xa6be8f+'\x20('+_0x32f455+'/'+_0x573fab+')','LICENSE_LIMIT_EXCEEDED',{'limit':_0xa6be8f,'current':_0x32f455,'max':_0x573fab});}async[_0x44257d(0x2fd)](_0x2f6204){const _0x1076e8=_0x44257d;let _0x4e6b9a;try{_0x4e6b9a=_0xa35622['decodeLicenseBlob'](_0x2f6204);}catch(_0x1d531d){throw new _0x828996('Invalid\x20license\x20blob:\x20'+_0x1d531d[_0x1076e8(0x35a)],_0x1076e8(0x21f));}let _0x3224a0;try{_0x3224a0=_0xea3a87[_0x1076e8(0x35f)](null,_0x4e6b9a[_0x1076e8(0x1c0)],_0x568bf6[_0x1076e8(0x306)],_0x4e6b9a['sig']);}catch(_0x33dd3d){throw new _0x828996(_0x1076e8(0x1a4)+_0x33dd3d[_0x1076e8(0x35a)],'LICENSE_INVALID');}if(!_0x3224a0)throw new _0x828996(_0x1076e8(0x30e)+(_0x1076e8(0x42f)+_0x568bf6[_0x1076e8(0x1af)]+'.\x20')+'Either\x20the\x20build\x20was\x20made\x20with\x20a\x20different\x20keypair,\x20or\x20the\x20license\x20was\x20issued\x20with\x20a\x20different\x20private\x20key.',_0x1076e8(0x21f),{'expectedFingerprint':_0x568bf6[_0x1076e8(0x1af)]});if(_0x4e6b9a[_0x1076e8(0x3f1)][_0x1076e8(0x2f1)]===_0x47b0d5){const _0x54f872=_0x4e6b9a['decoded'][_0x1076e8(0x427)]-_0x4e6b9a[_0x1076e8(0x3f1)][_0x1076e8(0x2fa)];if(_0x54f872>_0x15fe64)throw new _0x828996(_0x1076e8(0x3fb)+Math[_0x1076e8(0x219)](_0x54f872/(0x1e*0x5265c00))+_0x1076e8(0x45d),_0x1076e8(0x21f));}const _0x5417e7=this[_0x1076e8(0x401)][_0x1076e8(0x26f)];await _0x51c12(_0x5417e7);const _0xe1cb0a=_0xa35622[_0x1076e8(0x2d5)](_0x4e6b9a[_0x1076e8(0x289)])['toString']('hex');for(const {value:_0x1c18f7}of _0x5417e7[_0x1076e8(0x3be)](_0xfa9028)){if(_0x1c18f7['_licenseHash']===_0xe1cb0a)throw new _0x828996('License\x20already\x20stored',_0x1076e8(0x21f));}const _0x1603bf=_0xea3a87[_0x1076e8(0x268)](),_0x249393={'blob':_0x2f6204,'activation':null,'addedAt':Date['now'](),'_licenseHash':_0xe1cb0a,'licensee':_0x4e6b9a[_0x1076e8(0x3f1)][_0x1076e8(0x3f4)],'expiresAt':_0x4e6b9a[_0x1076e8(0x3f1)][_0x1076e8(0x427)],'features':_0x4e6b9a[_0x1076e8(0x3f1)][_0x1076e8(0x3a2)],'limits':_0x4e6b9a['decoded'][_0x1076e8(0x382)],'licenseType':_0x4e6b9a[_0x1076e8(0x3f1)]['licenseType']};return await _0x5417e7[_0x1076e8(0x1a9)](_0xfa9028,_0x1603bf,_0x249393),{'id':_0x1603bf,..._0x249393};}async[_0x44257d(0x327)](_0x1b56a0){const _0x18dce9=_0x44257d;let _0x82603b;try{_0x82603b=_0xa35622['decodeActivationToken'](_0x1b56a0);}catch(_0x341c54){throw new _0x828996(_0x18dce9(0x432)+_0x341c54[_0x18dce9(0x35a)],_0x18dce9(0x470));}const _0x16cdb6=_0x82603b[_0x18dce9(0x2d5)][_0x18dce9(0x1cc)](_0x18dce9(0x3e6)),_0x50dda4=this[_0x18dce9(0x401)][_0x18dce9(0x26f)];if(!_0x50dda4||!_0x50dda4[_0x18dce9(0x41a)](_0xfa9028))throw new _0x828996(_0x18dce9(0x1ee),_0x18dce9(0x470));let _0x3d1306=null,_0x2c15ac=null;for(const {key:_0x1fd537,value:_0x4e3602}of _0x50dda4[_0x18dce9(0x3be)](_0xfa9028)){if(_0x4e3602['_licenseHash']===_0x16cdb6){_0x3d1306=_0x1fd537,_0x2c15ac=_0x4e3602;break;}}if(!_0x3d1306)throw new _0x828996(_0x18dce9(0x1ee),'LICENSE_ACTIVATION_INVALID');const {rawBuf:_0x2b081d}=_0xa35622[_0x18dce9(0x33a)](_0x2c15ac[_0x18dce9(0x1bb)]),_0x229a21=_0xa35622[_0x18dce9(0x3de)]({'tokenString':_0x1b56a0,'nodeId':this[_0x18dce9(0x401)]['id'],'rawBlobBuf':_0x2b081d,'pubKeyPem':_0x568bf6['PUBLIC_KEY_PEM'],'pubFingerprint':_0x568bf6[_0x18dce9(0x1af)]});if(!_0x229a21[_0x18dce9(0x2b0)])throw new _0x828996(_0x18dce9(0x253)+_0x229a21[_0x18dce9(0x1e7)],_0x18dce9(0x470),{'reason':_0x229a21[_0x18dce9(0x1e7)]});const _0x325327={..._0x2c15ac,'activation':_0x1b56a0};return await _0x50dda4[_0x18dce9(0x2e3)](_0xfa9028,_0x3d1306,_0x325327),{'id':_0x3d1306,..._0x325327};}async[_0x44257d(0x42a)](_0x54ed37){const _0x1f488d=_0x44257d,_0x2359bb=this[_0x1f488d(0x401)][_0x1f488d(0x26f)];if(!_0x2359bb||!_0x2359bb[_0x1f488d(0x41a)](_0xfa9028))return;await _0x2359bb['remove'](_0xfa9028,_0x54ed37);}async[_0x44257d(0x407)](){const _0xf21b26=_0x44257d,_0x2afc6d=this[_0xf21b26(0x401)]['_systemEnv'];if(!_0x2afc6d||!_0x2afc6d[_0xf21b26(0x41a)](_0xfa9028))return[];const _0xdcff7d=this['okdb']['id'],_0x3def3b=[];for(const {key:_0x52f5e3,value:_0x2b9446}of _0x2afc6d[_0xf21b26(0x3be)](_0xfa9028)){const _0x3ec066=this['_computeStatus'](_0x2b9446,_0xdcff7d);_0x3def3b[_0xf21b26(0x46d)]({..._0x2b9446,'id':_0x52f5e3,'status':_0x3ec066});}return _0x3def3b;}[_0x44257d(0x280)](){const _0x1f9a32=_0x44257d,_0x156861=this[_0x1f9a32(0x401)]['_systemEnv'];if(!_0x156861||!_0x156861[_0x1f9a32(0x41a)](_0xfa9028))return[];const _0x1ddbe8=this[_0x1f9a32(0x401)]['id'],_0x5cb68e=[];for(const {key:_0x1d60d4,value:_0xe4a424}of _0x156861['getRange'](_0xfa9028)){if(_0xe4a424[_0x1f9a32(0x21a)]){if(_0xe4a424[_0x1f9a32(0x2f1)]===_0x47b0d5)_0x5cb68e['push']({'licenseId':_0x1d60d4,'pin':null});else{const _0x18f359=Buffer[_0x1f9a32(0x363)](_0xe4a424['_licenseHash'],'hex'),{pin:_0x53ab39}=_0xa35622['derivePin'](_0x1ddbe8,_0x18f359,_0x568bf6['PUB_FINGERPRINT']);_0x5cb68e['push']({'licenseId':_0x1d60d4,'pin':_0x53ab39});}}}return _0x5cb68e;}async[_0x44257d(0x2c8)](){const _0x32c891=_0x44257d,_0x349006=this[_0x32c891(0x26c)];await this[_0x32c891(0x3b3)]();if(this['_active']&&this[_0x32c891(0x26c)]['licenseType']===_0x47b0d5){const _0xaf5f52=Math[_0x32c891(0x219)]((this[_0x32c891(0x26c)][_0x32c891(0x427)]-Date[_0x32c891(0x3e0)]())/0x5265c00);this['okdb'][_0x32c891(0x43f)]?.[_0x32c891(0x354)](_0x32c891(0x3c5)+_0xaf5f52+_0x32c891(0x45a),{'feature':'license','licensee':this[_0x32c891(0x26c)]['licensee'],'expiresAt':new Date(this[_0x32c891(0x26c)][_0x32c891(0x427)])['toISOString']()});}this['_active']&&this[_0x32c891(0x26c)][_0x32c891(0x2f1)]===_0x4bb2ba&&this[_0x32c891(0x401)][_0x32c891(0x43f)]?.[_0x32c891(0x354)](_0x32c891(0x375),{'feature':_0x32c891(0x254),'licensee':this[_0x32c891(0x26c)][_0x32c891(0x3f4)]});if(_0x349006&&!this[_0x32c891(0x26c)]){this[_0x32c891(0x401)][_0x32c891(0x43f)]?.['warn'](_0x32c891(0x331),{'feature':_0x32c891(0x254)}),this[_0x32c891(0x401)][_0x32c891(0x467)]?.['emit'](_0x503186[_0x32c891(0x21f)],{'previous':_0x349006});const _0x22464c=this[_0x32c891(0x401)][_0x32c891(0x1f4)]?.[_0x32c891(0x318)]??_0x568bf6['LICENSE_EXPIRED_ACTION'];_0x22464c===_0x32c891(0x1c2)&&(this[_0x32c891(0x401)][_0x32c891(0x43f)]?.[_0x32c891(0x29b)](_0x32c891(0x237),{'feature':_0x32c891(0x254)}),this[_0x32c891(0x401)][_0x32c891(0x1fa)]()[_0x32c891(0x1d1)](()=>{})[_0x32c891(0x22d)](()=>process[_0x32c891(0x23b)](0x1)));}}}return okdbLicense={'LicenseChecker':_0x3534cb,'_C':_0x568bf6},okdbLicense;}function _0x4ad1(_0x36ce93,_0x3f5d95){_0x36ce93=_0x36ce93-0x18c;const _0x4bd89e=_0x4bd8();let _0x4ad173=_0x4bd89e[_0x36ce93];return _0x4ad173;}var okdbShell,hasRequiredOkdbShell;function requireOkdbShell(){const _0x87fc2e=_0x5d02f6;if(hasRequiredOkdbShell)return okdbShell;hasRequiredOkdbShell=0x1;const _0x2c2b1d=require$$0$2,_0x5280af=require$$1,_0x15577e=require$$2$1,_0x8fabdb=require$$1$1,_0x2245ef=_0x8fabdb[_0x87fc2e(0x2e7)](_0x15577e['homedir'](),_0x87fc2e(0x298)),_0xce65b2=0x3e8,_0x3fafb0={'reset':_0x87fc2e(0x25f),'bold':_0x87fc2e(0x32e),'dim':_0x87fc2e(0x265),'red':_0x87fc2e(0x412),'green':'\x1b[32m','yellow':'\x1b[33m','blue':'\x1b[34m','magenta':_0x87fc2e(0x229),'cyan':_0x87fc2e(0x32a),'white':_0x87fc2e(0x340),'gray':_0x87fc2e(0x379)},_0x5b3acd=!process[_0x87fc2e(0x3ae)]['isTTY']||!!process.env.NO_COLOR,_0x11f3aa=(_0x3acbff,_0x38454e)=>_0x5b3acd?_0x38454e:''+_0x3acbff+_0x38454e+_0x3fafb0['reset'],_0x71aa13={'error':_0x3fafb0[_0x87fc2e(0x24d)],'warn':_0x3fafb0['yellow'],'info':_0x3fafb0[_0x87fc2e(0x2db)],'debug':_0x3fafb0[_0x87fc2e(0x1ff)]},_0x2f3abe={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3};function _0x3fca22(_0x5e66d4,_0x259f98='info'){const _0x3765d6=_0x87fc2e,{level:_0x26dfb4,msg:_0x5b6873,meta:_0x572434,context:_0x12b188,ts:_0x2ad265}=_0x5e66d4;if((_0x2f3abe[_0x26dfb4]??0x1)<(_0x2f3abe[_0x259f98]??0x1))return;const _0x58b093=_0x11f3aa(_0x3fafb0[_0x3765d6(0x1ff)],new Date(_0x2ad265)[_0x3765d6(0x236)]()),_0x172944=_0x11f3aa(_0x71aa13[_0x26dfb4]??_0x3fafb0['white'],_0x26dfb4[_0x3765d6(0x20a)](0x5));let _0x339e3c='\x20\x20'+_0x58b093+'\x20'+_0x11f3aa(_0x3fafb0[_0x3765d6(0x25d)],_0x172944)+'\x20'+_0x5b6873;if(_0x572434&&Object[_0x3765d6(0x1bd)](_0x572434)[_0x3765d6(0x3f9)]>0x0){const _0x200895=Object['entries'](_0x572434)[_0x3765d6(0x312)](([_0x1a7fc3,_0x38137f])=>_0x1a7fc3+'='+_0x38137f)[_0x3765d6(0x2e7)]('\x20');_0x339e3c+=_0x11f3aa(_0x3fafb0[_0x3765d6(0x40a)],'\x20\x20['+_0x200895+']');}if(_0x12b188!==undefined){const _0x39709a=typeof _0x12b188===_0x3765d6(0x3da)?JSON[_0x3765d6(0x2e2)](_0x12b188):String(_0x12b188);_0x339e3c+=_0x11f3aa(_0x3fafb0['dim'],'\x20\x20'+_0x39709a);}const _0x1871f6=_0x26dfb4===_0x3765d6(0x29b)||_0x26dfb4===_0x3765d6(0x354)?process[_0x3765d6(0x359)][_0x3765d6(0x284)]['bind'](process[_0x3765d6(0x359)]):process[_0x3765d6(0x3ae)]['write'][_0x3765d6(0x2ad)](process[_0x3765d6(0x3ae)]);_0x1871f6(_0x339e3c+'\x0a');}function _0x2c8a8c(_0x54f805,_0x5a8765){const _0x1da991=_0x87fc2e;if(_0x54f805===0xcc||_0x54f805>=0xc8&&_0x54f805<0x12c&&!_0x5a8765){console['log'](_0x1da991(0x373)+_0x11f3aa(_0x3fafb0[_0x1da991(0x337)],'✓')+'\x0a');return;}if(_0x54f805>=0x190||_0x5a8765?.['error']){const _0x394415=_0x5a8765?.[_0x1da991(0x29b)]??_0x5a8765?.[_0x1da991(0x35a)]??_0x1da991(0x2a5)+_0x54f805;console[_0x1da991(0x43f)](_0x1da991(0x373)+_0x11f3aa(_0x3fafb0[_0x1da991(0x24d)],'✗')+'\x20'+_0x11f3aa(_0x3fafb0['bold']+_0x3fafb0['red'],String(_0x54f805))+'\x20\x20'+_0x394415+'\x0a');return;}const _0x129f3d=Object[_0x1da991(0x2d1)][_0x1da991(0x43b)][_0x1da991(0x3ba)](_0x5a8765??{},_0x1da991(0x1ec))?_0x5a8765['result']:_0x5a8765,_0x1a82ec=_0x5a8765?.['meta'];console[_0x1da991(0x43f)](''),_0x38facd(_0x129f3d,'\x20\x20');if(_0x1a82ec?.['count']!=null||_0x1a82ec?.[_0x1da991(0x380)]!=null){const _0x555a71=[];if(_0x1a82ec[_0x1da991(0x1d0)]!=null)_0x555a71[_0x1da991(0x46d)](_0x1a82ec['count']+_0x1da991(0x2d4)+(_0x1a82ec[_0x1da991(0x1d0)]!==0x1?'s':''));if(_0x1a82ec['time']!=null)_0x555a71['push'](_0x1a82ec['time']+'ms');console[_0x1da991(0x43f)](_0x1da991(0x373)+_0x11f3aa(_0x3fafb0[_0x1da991(0x40a)],_0x555a71[_0x1da991(0x2e7)](_0x1da991(0x250))));}console['log']('');}function _0x38facd(_0x21b6f0,_0x4f4813=''){const _0x1bc44a=_0x87fc2e;if(_0x21b6f0===null||_0x21b6f0===undefined){console[_0x1bc44a(0x43f)](_0x4f4813+_0x11f3aa(_0x3fafb0[_0x1bc44a(0x40a)],'(null)'));return;}if(Array[_0x1bc44a(0x47f)](_0x21b6f0)){if(_0x21b6f0[_0x1bc44a(0x3f9)]===0x0){console[_0x1bc44a(0x43f)](_0x4f4813+_0x11f3aa(_0x3fafb0[_0x1bc44a(0x40a)],_0x1bc44a(0x38d)));return;}if(_0x21b6f0[_0x1bc44a(0x293)](_0x199096=>_0x199096&&typeof _0x199096==='object'&&_0x1bc44a(0x353)in _0x199096&&_0x1bc44a(0x2ff)in _0x199096)){_0x3e9a37(_0x21b6f0,_0x4f4813);return;}if(_0x21b6f0['every'](_0x266997=>_0x266997&&typeof _0x266997===_0x1bc44a(0x3da)&&_0x1bc44a(0x3e2)in _0x266997&&'count'in _0x266997)){_0x32bafa(_0x21b6f0,_0x4f4813);return;}if(_0x21b6f0['every'](_0x950e23=>typeof _0x950e23!==_0x1bc44a(0x3da)||_0x950e23===null)){_0x21b6f0['forEach']((_0xa5a23c,_0x50cb5f)=>console[_0x1bc44a(0x43f)](_0x4f4813+_0x11f3aa(_0x3fafb0['gray'],_0x50cb5f+0x1+'.')+'\x20'+_0x11f3aa(_0x3fafb0[_0x1bc44a(0x406)],String(_0xa5a23c))));return;}_0x21b6f0['forEach']((_0x4a73ff,_0x368054)=>{const _0x2e2e1a=_0x1bc44a;console['log'](_0x4f4813+_0x11f3aa(_0x3fafb0[_0x2e2e1a(0x40a)],'['+_0x368054+']'));if(typeof _0x4a73ff==='object'&&_0x4a73ff!==null)_0x26553d(_0x4a73ff,_0x4f4813+'\x20\x20');else console[_0x2e2e1a(0x43f)](_0x4f4813+'\x20\x20'+String(_0x4a73ff));});return;}if(typeof _0x21b6f0==='object'){if('key'in _0x21b6f0&&'value'in _0x21b6f0&&Object['keys'](_0x21b6f0)[_0x1bc44a(0x3f9)]<=0x3){console[_0x1bc44a(0x43f)](_0x4f4813+_0x11f3aa(_0x3fafb0['bold']+_0x3fafb0[_0x1bc44a(0x2db)],String(_0x21b6f0[_0x1bc44a(0x353)])));const _0x2a52f8=_0x21b6f0['value'];if(_0x2a52f8&&typeof _0x2a52f8===_0x1bc44a(0x3da))_0x26553d(_0x2a52f8,_0x4f4813);else console[_0x1bc44a(0x43f)](_0x4f4813+_0x11f3aa(_0x3fafb0[_0x1bc44a(0x406)],String(_0x2a52f8)));return;}_0x26553d(_0x21b6f0,_0x4f4813);return;}console[_0x1bc44a(0x43f)](_0x4f4813+_0x11f3aa(_0x3fafb0[_0x1bc44a(0x406)],String(_0x21b6f0)));}function _0x26553d(_0xc0c647,_0xc4c303=''){const _0x94d2fb=_0x87fc2e,_0x2c07b4=Object[_0x94d2fb(0x29f)](_0xc0c647);if(_0x2c07b4[_0x94d2fb(0x3f9)]===0x0){console[_0x94d2fb(0x43f)](_0xc4c303+_0x11f3aa(_0x3fafb0[_0x94d2fb(0x40a)],'{}'));return;}const _0x4ca74e=Math[_0x94d2fb(0x394)](0x1c,Math[_0x94d2fb(0x39f)](..._0x2c07b4['map'](([_0x1b6cc2])=>_0x1b6cc2['length'])));for(const [_0x4a4626,_0x253da4]of _0x2c07b4){const _0x30d143=_0x11f3aa(_0x3fafb0[_0x94d2fb(0x2db)],_0x4a4626[_0x94d2fb(0x20a)](_0x4ca74e));if(_0x253da4===null||_0x253da4===undefined)console[_0x94d2fb(0x43f)](_0xc4c303+_0x30d143+'\x20\x20'+_0x11f3aa(_0x3fafb0['dim'],_0x94d2fb(0x46e)));else{if(typeof _0x253da4===_0x94d2fb(0x3da)){const _0x30216b=JSON[_0x94d2fb(0x2e2)](_0x253da4);_0x30216b[_0x94d2fb(0x3f9)]<=0x50?console[_0x94d2fb(0x43f)](_0xc4c303+_0x30d143+'\x20\x20'+_0x11f3aa(_0x3fafb0['dim'],_0x30216b)):(console[_0x94d2fb(0x43f)](_0xc4c303+_0x30d143),_0x38facd(_0x253da4,_0xc4c303+'\x20\x20'));}else{const _0x59a864=typeof _0x253da4==='boolean'?_0x11f3aa(_0x253da4?_0x3fafb0[_0x94d2fb(0x337)]:_0x3fafb0[_0x94d2fb(0x2b1)],String(_0x253da4)):typeof _0x253da4===_0x94d2fb(0x2b3)?_0x11f3aa(_0x3fafb0['magenta'],String(_0x253da4)):_0x11f3aa(_0x3fafb0[_0x94d2fb(0x406)],String(_0x253da4));console[_0x94d2fb(0x43f)](_0xc4c303+_0x30d143+'\x20\x20'+_0x59a864);}}}}function _0x3e9a37(_0x5f738,_0x1f7b34=''){const _0x4585e1=_0x87fc2e,_0x2bfb48=Math[_0x4585e1(0x394)](0x20,Math['max'](..._0x5f738[_0x4585e1(0x312)](_0x428447=>String(_0x428447['key'])[_0x4585e1(0x3f9)])));for(const {key:_0x2372d8,value:_0x43bd46,score:_0x5f45ad,clock:_0x4369e8}of _0x5f738){const _0x4c316c=_0x11f3aa(_0x3fafb0['bold']+_0x3fafb0[_0x4585e1(0x2db)],String(_0x2372d8)[_0x4585e1(0x20a)](_0x2bfb48)),_0x51e779=_0x43bd46==null?_0x11f3aa(_0x3fafb0[_0x4585e1(0x40a)],_0x4585e1(0x46e)):typeof _0x43bd46==='object'?_0x11f3aa(_0x3fafb0[_0x4585e1(0x40a)],JSON[_0x4585e1(0x2e2)](_0x43bd46)):_0x11f3aa(_0x3fafb0['white'],String(_0x43bd46)),_0x5df8a=_0x5f45ad!=null?_0x11f3aa(_0x3fafb0[_0x4585e1(0x1ff)],_0x4585e1(0x192)+_0x5f45ad[_0x4585e1(0x3b5)](0x4)):'',_0x1171e6=_0x4369e8!=null?_0x11f3aa(_0x3fafb0[_0x4585e1(0x1ff)],'\x20\x20@'+_0x4369e8):'';console[_0x4585e1(0x43f)](_0x1f7b34+_0x4c316c+'\x20\x20'+_0x51e779+_0x5df8a+_0x1171e6);}}function _0x32bafa(_0x3da3da,_0x39c1cd=''){const _0x5bda06=_0x87fc2e,_0x310390=Math[_0x5bda06(0x394)](0x20,Math[_0x5bda06(0x39f)](..._0x3da3da[_0x5bda06(0x312)](_0xc4aaef=>_0xc4aaef[_0x5bda06(0x3e2)]['length'])));for(const {type:_0x5ad141,count:_0x1f5070,fields:_0x282a0f}of _0x3da3da){if(_0x5ad141[_0x5bda06(0x3a8)]('~'))continue;const _0xd4e16a=_0x11f3aa(_0x3fafb0['bold']+_0x3fafb0['cyan'],_0x5ad141[_0x5bda06(0x20a)](_0x310390)),_0x6dc5eb=_0x11f3aa(_0x3fafb0[_0x5bda06(0x3c9)],String(_0x1f5070)[_0x5bda06(0x3ff)](0x6))+_0x11f3aa(_0x3fafb0[_0x5bda06(0x40a)],_0x5bda06(0x3ec)),_0x23cb83=_0x282a0f&&Object['keys'](_0x282a0f)[_0x5bda06(0x3f9)]?_0x11f3aa(_0x3fafb0[_0x5bda06(0x40a)],_0x5bda06(0x36d)+Object[_0x5bda06(0x1bd)](_0x282a0f)[_0x5bda06(0x41f)](0x0,0x6)[_0x5bda06(0x2e7)](',\x20')+(Object['keys'](_0x282a0f)['length']>0x6?'…':'')):'';console[_0x5bda06(0x43f)](_0x39c1cd+_0xd4e16a+'\x20\x20'+_0x6dc5eb+_0x23cb83);}}const _0x2484e1=[_0x87fc2e(0x1c1),_0x87fc2e(0x2ed),_0x87fc2e(0x2cb),_0x87fc2e(0x295),'transaction','processors/'];function _0x14585d(_0x5b5bbe,_0x15edfd){const _0x3a1c9d=_0x87fc2e;if(_0x5b5bbe['startsWith'](_0x3a1c9d(0x350)))return _0x5b5bbe;if(_0x5b5bbe[_0x3a1c9d(0x3a8)]('/'))return _0x3a1c9d(0x255)+_0x5b5bbe;if(_0x5b5bbe[_0x3a1c9d(0x3a8)](_0x3a1c9d(0x47c)))return _0x3a1c9d(0x350)+_0x5b5bbe;const _0x17fcea=_0x2484e1[_0x3a1c9d(0x31a)](_0x58256b=>_0x5b5bbe===_0x58256b[_0x3a1c9d(0x3c1)](/\/$/,'')||_0x5b5bbe['startsWith'](_0x58256b));return _0x17fcea?_0x3a1c9d(0x22e)+_0x15edfd+'/'+_0x5b5bbe:_0x3a1c9d(0x350)+_0x5b5bbe;}function _0x3098fb(_0x26bcd){const _0xc473fd=_0x87fc2e,_0x407638={},_0x5873ca=[];let _0xf3b761=0x0;while(_0xf3b761<_0x26bcd[_0xc473fd(0x3f9)]){if((_0x26bcd[_0xf3b761]===_0xc473fd(0x47e)||_0x26bcd[_0xf3b761]==='-e')&&_0x26bcd[_0xf3b761+0x1]&&!_0x26bcd[_0xf3b761+0x1]['startsWith']('-'))_0x407638[_0xc473fd(0x357)]=_0x26bcd[++_0xf3b761];else _0x26bcd[_0xf3b761]===_0xc473fd(0x3a6)||_0x26bcd[_0xf3b761]==='-h'?_0x407638[_0xc473fd(0x2ec)]=!![]:_0x5873ca['push'](_0x26bcd[_0xf3b761]);_0xf3b761++;}return{'flags':_0x407638,'rest':_0x5873ca};}const _0x36f769={'system':'System','envs':'Environments','types':_0x87fc2e(0x370),'data':'Records','indexes':_0x87fc2e(0x245),'fts':_0x87fc2e(0x44e),'sync':_0x87fc2e(0x1aa),'queue':_0x87fc2e(0x24c),'files':'Files','embeddings':_0x87fc2e(0x1d2),'engines':_0x87fc2e(0x3bb),'admin':_0x87fc2e(0x309),'event':_0x87fc2e(0x40b),'processor':'Processors'},_0x1d35bc=[_0x87fc2e(0x322),'envs',_0x87fc2e(0x1c1),_0x87fc2e(0x47d),'indexes',_0x87fc2e(0x3e4),_0x87fc2e(0x2de),_0x87fc2e(0x235),_0x87fc2e(0x39c),'embeddings',_0x87fc2e(0x18d),'admin'];function _0x32d379(_0x5f1e35){const _0x33a610=_0x87fc2e;return _0x5f1e35[_0x33a610(0x3c1)](/^\/api/,'')[_0x33a610(0x3c1)](/^\[\/env\/:env=[^\]]*\]/,_0x33a610(0x316))[_0x33a610(0x3c1)](/^\/env\/:env/,_0x33a610(0x2cc))[_0x33a610(0x3c1)](/^\//,'');}function _0x30c87f(_0x1eb0bb,_0x1ec343=''){const _0x5d9ba8=_0x87fc2e,_0xa17818=_0x1eb0bb[_0x5d9ba8(0x415)][_0x5d9ba8(0x3a9)]()[_0x5d9ba8(0x27f)](_0x3d4efe=>!_0x3d4efe[_0x5d9ba8(0x263)]?.[_0x5d9ba8(0x19e)]),_0x2f8c7c=_0x1ec343?_0xa17818[_0x5d9ba8(0x27f)](_0x462ec9=>_0x462ec9[_0x5d9ba8(0x1f1)][_0x5d9ba8(0x3b4)]()[_0x5d9ba8(0x1a5)](_0x1ec343[_0x5d9ba8(0x3b4)]())||(_0x31865b(_0x462ec9)??'')['toLowerCase']()['includes'](_0x1ec343[_0x5d9ba8(0x3b4)]())||_0x1da1cd(_0x462ec9)[_0x5d9ba8(0x31a)](_0x2d57e1=>_0x2d57e1['toLowerCase']()[_0x5d9ba8(0x1a5)](_0x1ec343[_0x5d9ba8(0x3b4)]()))):_0xa17818;if(!_0x2f8c7c[_0x5d9ba8(0x3f9)]){console[_0x5d9ba8(0x43f)](_0x11f3aa(_0x3fafb0[_0x5d9ba8(0x2b1)],_0x5d9ba8(0x1ac)+_0x1ec343+'\x22\x0a'));return;}const _0x34cb21=new Map();for(const _0x3693df of _0x2f8c7c){const _0x5734ba=_0x1da1cd(_0x3693df)[0x0]??_0x5d9ba8(0x2fb);if(!_0x34cb21[_0x5d9ba8(0x1ad)](_0x5734ba))_0x34cb21['set'](_0x5734ba,[]);_0x34cb21[_0x5d9ba8(0x479)](_0x5734ba)[_0x5d9ba8(0x46d)](_0x3693df);}const _0xf8434=[..._0x1d35bc[_0x5d9ba8(0x27f)](_0x48c6b6=>_0x34cb21[_0x5d9ba8(0x1ad)](_0x48c6b6)),...[..._0x34cb21['keys']()]['filter'](_0x38b9c2=>!_0x1d35bc[_0x5d9ba8(0x1a5)](_0x38b9c2))];console[_0x5d9ba8(0x43f)]('');for(const _0x30f0cb of _0xf8434){const _0x52df2b=_0x34cb21[_0x5d9ba8(0x479)](_0x30f0cb);if(!_0x52df2b?.['length'])continue;console[_0x5d9ba8(0x43f)](_0x11f3aa(_0x3fafb0[_0x5d9ba8(0x25d)],'\x20\x20'+(_0x36f769[_0x30f0cb]??_0x30f0cb)));for(const _0x4f2d34 of _0x52df2b){const _0x27db5b=_0x11f3aa(_0x3fafb0[_0x5d9ba8(0x3c9)],_0x4f2d34[_0x5d9ba8(0x1ba)][_0x5d9ba8(0x20a)](0x7)),_0x55c350=_0x11f3aa(_0x3fafb0[_0x5d9ba8(0x2db)],_0x32d379(_0x4f2d34['path'])),_0xb024=_0x31865b(_0x4f2d34)?_0x11f3aa(_0x3fafb0[_0x5d9ba8(0x40a)],'\x20\x20'+_0x31865b(_0x4f2d34)):'',_0x171ba9=_0x4f2d34['operation']?.['id']?_0x11f3aa(_0x3fafb0[_0x5d9ba8(0x1ff)],_0x5d9ba8(0x448)+_0x4f2d34[_0x5d9ba8(0x2a2)]['id']+']'):'';console[_0x5d9ba8(0x43f)](_0x5d9ba8(0x37f)+_0x27db5b+'\x20'+_0x55c350+_0xb024+_0x171ba9);}console[_0x5d9ba8(0x43f)]('');}}function _0x59fcd5(_0x5d7fa2,_0x382d65){const _0x116463=_0x87fc2e,_0x1e1861=_0x382d65['replace'](/^\/api(\/env\/[^/]+)?\//,'')[_0x116463(0x35b)]('/')[0x0],_0xb35985=_0x5d7fa2[_0x116463(0x415)]['listRoutes']()['filter'](_0x4993ab=>_0x4993ab[_0x116463(0x1f1)][_0x116463(0x3b4)]()[_0x116463(0x1a5)](_0x1e1861[_0x116463(0x3b4)]()));if(!_0xb35985[_0x116463(0x3f9)]){console['log'](_0x11f3aa(_0x3fafb0['yellow'],_0x116463(0x3c4)+_0x382d65+'\x0a'));return;}console[_0x116463(0x43f)]('');for(const _0x16b1a8 of _0xb35985[_0x116463(0x41f)](0x0,0xc)){for(const _0x12b2a3 of _0x1d5374(_0x16b1a8)){console[_0x116463(0x43f)](_0x12b2a3);}console[_0x116463(0x43f)]('');}}function _0x31865b(_0x334759){const _0x4385e1=_0x87fc2e;return _0x334759[_0x4385e1(0x2a2)]?.[_0x4385e1(0x454)]??_0x334759[_0x4385e1(0x263)]?.['summary']??'';}function _0x3dea11(_0x41dbe4){const _0x1233bc=_0x87fc2e;return _0x41dbe4[_0x1233bc(0x2a2)]?.[_0x1233bc(0x1b2)]??_0x41dbe4[_0x1233bc(0x263)]?.[_0x1233bc(0x1b2)]??'';}function _0x1da1cd(_0x4e15d0){const _0x16356d=_0x87fc2e;return _0x4e15d0[_0x16356d(0x2a2)]?.['tags']?.['length']?_0x4e15d0[_0x16356d(0x2a2)][_0x16356d(0x447)]:_0x4e15d0[_0x16356d(0x263)]?.[_0x16356d(0x447)]??[];}function _0x1d5374(_0x1d2ea2){const _0x5da293=_0x87fc2e,_0x5a1a9e=[];_0x5a1a9e[_0x5da293(0x46d)]('\x20\x20'+_0x11f3aa(_0x3fafb0[_0x5da293(0x25d)]+_0x3fafb0[_0x5da293(0x3c9)],_0x1d2ea2[_0x5da293(0x1ba)][_0x5da293(0x20a)](0x7))+'\x20'+_0x11f3aa(_0x3fafb0[_0x5da293(0x25d)]+_0x3fafb0['cyan'],_0x1d2ea2[_0x5da293(0x1f1)]));_0x1d2ea2[_0x5da293(0x2a2)]?.['id']&&_0x5a1a9e['push']('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x11f3aa(_0x3fafb0[_0x5da293(0x1ff)],_0x5da293(0x27e)+_0x1d2ea2[_0x5da293(0x2a2)]['id']));_0x31865b(_0x1d2ea2)&&_0x5a1a9e[_0x5da293(0x46d)](_0x5da293(0x362)+_0x11f3aa(_0x3fafb0[_0x5da293(0x406)],_0x31865b(_0x1d2ea2)));_0x3dea11(_0x1d2ea2)&&_0x5a1a9e[_0x5da293(0x46d)](_0x5da293(0x362)+_0x11f3aa(_0x3fafb0['dim'],_0x3dea11(_0x1d2ea2)));_0x1da1cd(_0x1d2ea2)[_0x5da293(0x3f9)]&&_0x5a1a9e[_0x5da293(0x46d)](_0x5da293(0x362)+_0x11f3aa(_0x3fafb0[_0x5da293(0x1ff)],_0x5da293(0x3a5)+_0x1da1cd(_0x1d2ea2)[_0x5da293(0x2e7)](',\x20')));_0x1d2ea2['operation']?.[_0x5da293(0x352)]?.[_0x5da293(0x3ac)]&&_0x5a1a9e['push'](_0x5da293(0x362)+_0x11f3aa(_0x3fafb0[_0x5da293(0x1ff)],_0x5da293(0x29c)+_0x1d2ea2['operation'][_0x5da293(0x352)][_0x5da293(0x3ac)]));_0x1d2ea2[_0x5da293(0x2a2)]?.['http']?.[_0x5da293(0x45c)]&&_0x1d2ea2[_0x5da293(0x2a2)][_0x5da293(0x415)][_0x5da293(0x45c)]!==_0x5da293(0x33c)&&_0x5a1a9e[_0x5da293(0x46d)](_0x5da293(0x362)+_0x11f3aa(_0x3fafb0[_0x5da293(0x1ff)],_0x5da293(0x3ed)+_0x1d2ea2[_0x5da293(0x2a2)][_0x5da293(0x415)][_0x5da293(0x45c)]));if(_0x1d2ea2[_0x5da293(0x2a2)]?.[_0x5da293(0x336)]){const _0x519a82=Object[_0x5da293(0x1bd)](_0x1d2ea2['operation'][_0x5da293(0x336)][_0x5da293(0x41d)]||{});if(_0x519a82['length'])_0x5a1a9e[_0x5da293(0x46d)](_0x5da293(0x362)+_0x11f3aa(_0x3fafb0[_0x5da293(0x1ff)],_0x5da293(0x378)+_0x519a82[_0x5da293(0x2e7)](',\x20')));}return _0x1d2ea2['meta']?.[_0x5da293(0x1c4)]&&_0x5a1a9e['push'](_0x5da293(0x362)+_0x11f3aa(_0x3fafb0[_0x5da293(0x1ff)],_0x5da293(0x41b)+JSON[_0x5da293(0x2e2)](_0x1d2ea2[_0x5da293(0x263)][_0x5da293(0x1c4)]))),_0x5a1a9e;}async function _0x172d0c(_0x2bc6f0,_0x773a8,_0x4a374c,_0xdb1e6a=null){const _0x139925=_0x87fc2e,_0x442911=_0x4a374c['indexOf']('?'),_0x2b9740=_0x442911>=0x0?_0x4a374c['slice'](0x0,_0x442911):_0x4a374c,_0x15db15=_0x442911>=0x0?_0x4a374c[_0x139925(0x41f)](_0x442911+0x1):'',_0x320ae9=Object[_0x139925(0x388)](new URLSearchParams(_0x15db15)[_0x139925(0x29f)]());return _0x2bc6f0[_0x139925(0x415)][_0x139925(0x341)](_0x773a8,_0x2b9740,{'body':_0xdb1e6a,'query':_0x320ae9,'headers':{'content-type':'application/json'}},{'internal':!![]});}function _0x3639fb(_0x16733f){const _0x56553b=_0x87fc2e;if(!_0x16733f)return null;const _0x5ee0aa=_0x16733f[_0x56553b(0x1f8)]();if(!_0x5ee0aa)return null;try{return JSON[_0x56553b(0x2d9)](_0x5ee0aa);}catch{}try{return JSON['parse'](_0x337ed1(_0x5ee0aa));}catch(_0x291621){throw new SyntaxError(_0x291621[_0x56553b(0x35a)],{'cause':_0x291621});}}function _0x337ed1(_0xcc332e){const _0x11bed9=_0x87fc2e;let _0x56bcd4='',_0x5af083=0x0;while(_0x5af083<_0xcc332e[_0x11bed9(0x3f9)]){const _0x5059c6=_0xcc332e[_0x5af083];if(_0x5059c6==='\x22'){_0x56bcd4+='\x22',_0x5af083++;while(_0x5af083<_0xcc332e[_0x11bed9(0x3f9)]&&_0xcc332e[_0x5af083]!=='\x22'){if(_0xcc332e[_0x5af083]==='\x5c'){_0x56bcd4+=_0xcc332e[_0x5af083++];if(_0x5af083<_0xcc332e[_0x11bed9(0x3f9)])_0x56bcd4+=_0xcc332e[_0x5af083++];}else _0x56bcd4+=_0xcc332e[_0x5af083++];}_0x56bcd4+='\x22';if(_0x5af083<_0xcc332e['length'])_0x5af083++;continue;}if(_0x5059c6==='\x27'){_0x56bcd4+='\x22',_0x5af083++;while(_0x5af083<_0xcc332e[_0x11bed9(0x3f9)]&&_0xcc332e[_0x5af083]!=='\x27'){if(_0xcc332e[_0x5af083]==='\x5c'&&_0xcc332e[_0x5af083+0x1]==='\x27')_0x56bcd4+='\x27',_0x5af083+=0x2;else _0xcc332e[_0x5af083]==='\x22'?(_0x56bcd4+='\x5c\x22',_0x5af083++):_0x56bcd4+=_0xcc332e[_0x5af083++];}_0x56bcd4+='\x22';if(_0x5af083<_0xcc332e[_0x11bed9(0x3f9)])_0x5af083++;continue;}if(_0x11bed9(0x420)['includes'](_0x5059c6)){_0x56bcd4+=_0x5059c6,_0x5af083++;continue;}let _0x17df0d='';while(_0x5af083<_0xcc332e[_0x11bed9(0x3f9)]&&!_0x11bed9(0x315)[_0x11bed9(0x1a5)](_0xcc332e[_0x5af083])&&_0xcc332e[_0x5af083]!=='\x20'&&_0xcc332e[_0x5af083]!=='\x09'&&_0xcc332e[_0x5af083]!=='\x0a'&&_0xcc332e[_0x5af083]!=='\x0d'){_0x17df0d+=_0xcc332e[_0x5af083++];}let _0x29b2ad=_0x5af083;while(_0x29b2ad<_0xcc332e[_0x11bed9(0x3f9)]&&(_0xcc332e[_0x29b2ad]==='\x20'||_0xcc332e[_0x29b2ad]==='\x09'))_0x29b2ad++;if(_0xcc332e[_0x29b2ad]===':')_0x56bcd4+='\x22'+_0x17df0d+'\x22';else _0x17df0d===_0x11bed9(0x410)||_0x17df0d===_0x11bed9(0x296)||_0x17df0d===_0x11bed9(0x46e)||/^-?\d+(\.\d+)?([eE][+-]?\d+)?$/['test'](_0x17df0d)?_0x56bcd4+=_0x17df0d:_0x56bcd4+='\x22'+_0x17df0d+'\x22';}return _0x56bcd4[_0x11bed9(0x3c1)](/,(\s*[}\]])/g,'$1');}function _0x499593(_0x9cacaa){const _0xbb9547=_0x87fc2e,_0x532a77=[];let _0x4bdcb8=0x0;while(_0x4bdcb8<_0x9cacaa[_0xbb9547(0x3f9)]){while(_0x4bdcb8<_0x9cacaa['length']&&(_0x9cacaa[_0x4bdcb8]==='\x20'||_0x9cacaa[_0x4bdcb8]==='\x09'))_0x4bdcb8++;if(_0x4bdcb8>=_0x9cacaa['length'])break;const _0x2f7813=_0x9cacaa[_0x4bdcb8];if(_0x2f7813==='{'||_0x2f7813==='['){const _0xc0c9fa=_0x2f7813==='{'?'}':']',_0x5b690c=_0x4bdcb8++;let _0x1e81cf=0x1,_0x47a737=![],_0x2ef12b='';while(_0x4bdcb8<_0x9cacaa[_0xbb9547(0x3f9)]&&_0x1e81cf>0x0){const _0x2ab8d9=_0x9cacaa[_0x4bdcb8];if(_0x47a737){if(_0x2ab8d9==='\x5c')_0x4bdcb8++;else{if(_0x2ab8d9===_0x2ef12b)_0x47a737=![];}}else{if(_0x2ab8d9==='\x22'||_0x2ab8d9==='\x27')_0x47a737=!![],_0x2ef12b=_0x2ab8d9;else{if(_0x2ab8d9===_0x2f7813)_0x1e81cf++;else{if(_0x2ab8d9===_0xc0c9fa)_0x1e81cf--;}}}_0x4bdcb8++;}_0x532a77[_0xbb9547(0x46d)](_0x9cacaa['slice'](_0x5b690c,_0x4bdcb8));continue;}if(_0x2f7813==='\x22'||_0x2f7813==='\x27'){const _0x1ee9f0=_0x2f7813;_0x4bdcb8++;let _0x3e0794='';while(_0x4bdcb8<_0x9cacaa['length']&&_0x9cacaa[_0x4bdcb8]!==_0x1ee9f0){if(_0x9cacaa[_0x4bdcb8]==='\x5c'&&_0x4bdcb8+0x1<_0x9cacaa[_0xbb9547(0x3f9)])_0x4bdcb8++,_0x3e0794+=_0x9cacaa[_0x4bdcb8++];else _0x3e0794+=_0x9cacaa[_0x4bdcb8++];}if(_0x4bdcb8<_0x9cacaa[_0xbb9547(0x3f9)])_0x4bdcb8++;_0x532a77[_0xbb9547(0x46d)](_0x3e0794);continue;}let _0x38930c='';while(_0x4bdcb8<_0x9cacaa[_0xbb9547(0x3f9)]&&_0x9cacaa[_0x4bdcb8]!=='\x20'&&_0x9cacaa[_0x4bdcb8]!=='\x09'&&_0x9cacaa[_0x4bdcb8]!=='{'&&_0x9cacaa[_0x4bdcb8]!=='['){_0x38930c+=_0x9cacaa[_0x4bdcb8++];}if(_0x38930c)_0x532a77['push'](_0x38930c);}return _0x532a77;}function _0x46becb(_0x51c185,_0x95de6e){const _0x5d2f49=_0x87fc2e,_0x316336=[..._0x51c185['_envs'][_0x5d2f49(0x1bd)]()][_0x5d2f49(0x27f)](_0x2c8bb0=>!_0x2c8bb0[_0x5d2f49(0x3a8)]('~'));console[_0x5d2f49(0x43f)](['',_0x11f3aa(_0x3fafb0['bold']+_0x3fafb0[_0x5d2f49(0x2db)],_0x5d2f49(0x22b)),_0x11f3aa(_0x3fafb0['bold']+_0x3fafb0[_0x5d2f49(0x2db)],_0x5d2f49(0x259))+_0x11f3aa(_0x3fafb0['bold'],'\x20\x20\x20\x20\x20\x20\x20\x20\x20OKDB\x20SHELL\x20\x20\x20\x20\x20\x20\x20\x20\x20')+_0x11f3aa(_0x3fafb0[_0x5d2f49(0x25d)]+_0x3fafb0['cyan'],'║'),_0x11f3aa(_0x3fafb0[_0x5d2f49(0x25d)]+_0x3fafb0['cyan'],_0x5d2f49(0x300)),'','\x20\x20'+_0x11f3aa(_0x3fafb0[_0x5d2f49(0x337)],'✓')+'\x20'+_0x11f3aa(_0x3fafb0['bold'],'server')+_0x5d2f49(0x2a8)+_0x95de6e['port'],'\x20\x20'+_0x11f3aa(_0x3fafb0['green'],'✓')+'\x20'+_0x11f3aa(_0x3fafb0[_0x5d2f49(0x25d)],'api')+_0x5d2f49(0x386)+_0x95de6e[_0x5d2f49(0x3c2)]+_0x5d2f49(0x255),'\x20\x20'+_0x11f3aa(_0x3fafb0[_0x5d2f49(0x337)],'✓')+'\x20'+_0x11f3aa(_0x3fafb0['bold'],_0x5d2f49(0x1f1))+_0x5d2f49(0x37f)+_0x95de6e[_0x5d2f49(0x23f)],'\x20\x20'+_0x11f3aa(_0x3fafb0[_0x5d2f49(0x337)],'✓')+'\x20'+_0x11f3aa(_0x3fafb0['bold'],'id')+_0x5d2f49(0x297)+_0x11f3aa(_0x3fafb0[_0x5d2f49(0x1ff)],_0x51c185['id']),'\x20\x20'+_0x11f3aa(_0x3fafb0[_0x5d2f49(0x337)],'✓')+'\x20'+_0x11f3aa(_0x3fafb0[_0x5d2f49(0x25d)],'envs')+_0x5d2f49(0x37f)+_0x316336[_0x5d2f49(0x312)](_0x394f22=>_0x11f3aa(_0x3fafb0[_0x5d2f49(0x2db)],_0x394f22))[_0x5d2f49(0x2e7)]('\x20\x20'),..._0x95de6e[_0x5d2f49(0x2d2)]?[]:['\x20\x20'+_0x11f3aa(_0x3fafb0[_0x5d2f49(0x337)],'✓')+'\x20'+_0x11f3aa(_0x3fafb0[_0x5d2f49(0x25d)],'admin')+_0x5d2f49(0x218)+_0x95de6e[_0x5d2f49(0x3c2)]+_0x5d2f49(0x2f9)],'',_0x11f3aa(_0x3fafb0['dim'],_0x5d2f49(0x416)+_0x11f3aa(_0x3fafb0[_0x5d2f49(0x25d)],_0x5d2f49(0x2ec))+_0x5d2f49(0x1b6)+_0x11f3aa(_0x3fafb0[_0x5d2f49(0x25d)],'routes')+'\x20to\x20browse\x20the\x20API,\x20'+_0x11f3aa(_0x3fafb0[_0x5d2f49(0x25d)],_0x5d2f49(0x23b))+_0x5d2f49(0x33e)),''][_0x5d2f49(0x2e7)]('\x0a'));}function _0xa8e066(_0x581199){const _0x34f0b2=_0x87fc2e;console[_0x34f0b2(0x43f)]('\x0a'+_0x11f3aa(_0x3fafb0[_0x34f0b2(0x25d)],_0x34f0b2(0x1b8))+'\x20\x20'+_0x11f3aa(_0x3fafb0['dim'],_0x34f0b2(0x28a))+_0x34f0b2(0x358)+_0x11f3aa(_0x3fafb0[_0x34f0b2(0x2db)],_0x34f0b2(0x32d))+_0x34f0b2(0x269)+_0x11f3aa(_0x3fafb0[_0x34f0b2(0x2db)],_0x34f0b2(0x32d))+'\x20'+_0x11f3aa(_0x3fafb0[_0x34f0b2(0x2b1)],_0x34f0b2(0x1d9))+_0x34f0b2(0x35c)+_0x11f3aa(_0x3fafb0[_0x34f0b2(0x2db)],_0x34f0b2(0x1e6))+'\x20'+_0x11f3aa(_0x3fafb0[_0x34f0b2(0x2db)],_0x34f0b2(0x32d))+'\x20'+_0x11f3aa(_0x3fafb0[_0x34f0b2(0x2b1)],_0x34f0b2(0x2c6))+'\x20\x20\x20\x20\x20explicit\x20method\x0a\x0a\x20\x20'+_0x11f3aa(_0x3fafb0[_0x34f0b2(0x40a)],'Examples')+_0x34f0b2(0x345)+_0x11f3aa(_0x3fafb0['gray'],_0x34f0b2(0x239))+'\x20\x20\x20\x20\x20\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'+_0x11f3aa(_0x3fafb0[_0x34f0b2(0x1ff)],_0x34f0b2(0x42c))+_0x34f0b2(0x3d1)+_0x11f3aa(_0x3fafb0[_0x34f0b2(0x1ff)],_0x34f0b2(0x1c1))+_0x34f0b2(0x355)+_0x581199[_0x34f0b2(0x357)]+_0x34f0b2(0x20c)+_0x11f3aa(_0x3fafb0['gray'],_0x34f0b2(0x2cd))+'\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/'+_0x581199['env']+_0x34f0b2(0x39a)+_0x11f3aa(_0x3fafb0[_0x34f0b2(0x1ff)],_0x34f0b2(0x34c))+_0x34f0b2(0x36a)+_0x581199[_0x34f0b2(0x357)]+_0x34f0b2(0x34b)+_0x11f3aa(_0x3fafb0[_0x34f0b2(0x1ff)],_0x34f0b2(0x1e4))+_0x34f0b2(0x400)+_0x581199['env']+_0x34f0b2(0x18c)+_0x11f3aa(_0x3fafb0[_0x34f0b2(0x1ff)],'PUT\x20type/users/item/x\x20{\x22n\x22:1}')+_0x34f0b2(0x345)+_0x11f3aa(_0x3fafb0['gray'],_0x34f0b2(0x2fc))+_0x34f0b2(0x345)+_0x11f3aa(_0x3fafb0['gray'],_0x34f0b2(0x39e))+_0x34f0b2(0x251)+_0x11f3aa(_0x3fafb0[_0x34f0b2(0x25d)],_0x34f0b2(0x1b4))+'\x20\x20'+_0x11f3aa(_0x3fafb0[_0x34f0b2(0x40a)],_0x34f0b2(0x221))+_0x34f0b2(0x358)+_0x11f3aa(_0x3fafb0[_0x34f0b2(0x2db)],_0x34f0b2(0x31b))+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20override\x20active\x20environment\x20for\x20this\x20call\x0a\x20\x20'+_0x11f3aa(_0x3fafb0[_0x34f0b2(0x2db)],_0x34f0b2(0x3a6))+_0x34f0b2(0x42e)+_0x11f3aa(_0x3fafb0[_0x34f0b2(0x40a)],_0x34f0b2(0x314))+_0x34f0b2(0x345)+_0x11f3aa(_0x3fafb0[_0x34f0b2(0x1ff)],_0x34f0b2(0x44b))+_0x34f0b2(0x345)+_0x11f3aa(_0x3fafb0[_0x34f0b2(0x1ff)],'type/users/item/alice\x20--env\x20staging')+_0x34f0b2(0x345)+_0x11f3aa(_0x3fafb0[_0x34f0b2(0x1ff)],'type/users\x20--help')+'\x0a\x0a'+_0x11f3aa(_0x3fafb0[_0x34f0b2(0x25d)],_0x34f0b2(0x22c))+_0x34f0b2(0x358)+_0x11f3aa(_0x3fafb0[_0x34f0b2(0x2db)],_0x34f0b2(0x2ce))+'\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'+_0x11f3aa(_0x3fafb0[_0x34f0b2(0x2db)],'env')+_0x34f0b2(0x277)+_0x11f3aa(_0x3fafb0[_0x34f0b2(0x2db)],_0x34f0b2(0x3f2))+'\x20'+_0x11f3aa(_0x3fafb0[_0x34f0b2(0x40a)],_0x34f0b2(0x286))+'\x20\x20\x20\x20\x20\x20\x20\x20\x20browse\x20API\x20routes,\x20grouped\x20by\x20area\x0a\x20\x20'+_0x11f3aa(_0x3fafb0[_0x34f0b2(0x2db)],_0x34f0b2(0x31e))+'\x20'+_0x11f3aa(_0x3fafb0[_0x34f0b2(0x40a)],_0x34f0b2(0x1ab))+_0x34f0b2(0x478)+_0x11f3aa(_0x3fafb0[_0x34f0b2(0x2db)],'open')+_0x34f0b2(0x25c)+_0x11f3aa(_0x3fafb0[_0x34f0b2(0x2db)],_0x34f0b2(0x2ec))+_0x34f0b2(0x356)+_0x11f3aa(_0x3fafb0[_0x34f0b2(0x2db)],'exit')+'\x20'+_0x11f3aa(_0x3fafb0[_0x34f0b2(0x40a)],_0x34f0b2(0x463))+_0x34f0b2(0x238));}async function _0x274d60(_0x34455d,_0x3fddd8=0x0){const _0x28832b=_0x87fc2e;process[_0x28832b(0x3ae)]['write']('\x0a'),console[_0x28832b(0x43f)](_0x11f3aa(_0x3fafb0[_0x28832b(0x2b1)],_0x28832b(0x191)));try{await _0x34455d['close']();}catch(_0x3e4824){console[_0x28832b(0x29b)](_0x11f3aa(_0x3fafb0[_0x28832b(0x24d)],'\x20\x20'+_0x3e4824[_0x28832b(0x35a)]));}process[_0x28832b(0x23b)](_0x3fddd8);}function _0x3f3c8d(_0x3f4e83){const _0x240c9d=_0x87fc2e,_0x3e6ee8=_0x3f4e83[_0x240c9d(0x357)]!=='default'?_0x11f3aa(_0x3fafb0[_0x240c9d(0x2b1)],'['+_0x3f4e83[_0x240c9d(0x357)]+']'):'';return _0x11f3aa(_0x3fafb0[_0x240c9d(0x25d)]+_0x3fafb0[_0x240c9d(0x2db)],'okdb')+_0x3e6ee8+_0x11f3aa(_0x3fafb0[_0x240c9d(0x1ff)],'>\x20');}const _0x255dff=new Set([_0x87fc2e(0x23e),_0x87fc2e(0x3e9),_0x87fc2e(0x45f),'PATCH','DELETE']);async function _0x17742f(_0x1ca8cc,_0x3c019c,_0x515867,_0x1ae856,_0x5210c4,_0x1fc65c){const _0x50c928=_0x87fc2e;_0x1ca8cc=_0x1ca8cc[_0x50c928(0x1f8)]();if(!_0x1ca8cc||_0x1ca8cc[_0x50c928(0x3a8)]('#'))return;const _0x5a3497=_0x499593(_0x1ca8cc),{flags:_0x595e90,rest:_0x5265ea}=_0x3098fb(_0x5a3497);if(!_0x5265ea[_0x50c928(0x3f9)])return;const _0x4ddc34=_0x5265ea[0x0],_0x5507a6=_0x4ddc34[_0x50c928(0x313)]();if(_0x5507a6===_0x50c928(0x3d0)){if(_0x5265ea[0x1])_0x59fcd5(_0x3c019c,_0x14585d(_0x5265ea[0x1],_0x595e90[_0x50c928(0x357)]??_0x5210c4[_0x50c928(0x357)]));else _0xa8e066(_0x5210c4);return;}if(_0x5507a6==='USE'){const _0x1496a9=_0x5265ea[0x1];if(!_0x1496a9){console[_0x50c928(0x43f)](_0x11f3aa(_0x3fafb0[_0x50c928(0x24d)],_0x50c928(0x28d)));return;}try{_0x3c019c['env'](_0x1496a9),_0x5210c4['env']=_0x1496a9,_0x1fc65c?.['setPrompt'](_0x3f3c8d(_0x5210c4)),console[_0x50c928(0x43f)]('\x0a\x20\x20'+_0x11f3aa(_0x3fafb0[_0x50c928(0x337)],'✓')+_0x50c928(0x32f)+_0x11f3aa(_0x3fafb0[_0x50c928(0x25d)]+_0x3fafb0['cyan'],_0x1496a9)+'\x0a');}catch{console['log'](_0x50c928(0x373)+_0x11f3aa(_0x3fafb0[_0x50c928(0x24d)],'✗')+'\x20environment\x20'+_0x11f3aa(_0x3fafb0[_0x50c928(0x25d)],_0x1496a9)+'\x20not\x20found'+_0x11f3aa(_0x3fafb0[_0x50c928(0x40a)],_0x50c928(0x3a0)));}return;}if(_0x5507a6===_0x50c928(0x3b6)){const _0x263c14=[..._0x3c019c[_0x50c928(0x290)]['keys']()][_0x50c928(0x27f)](_0x509584=>!_0x509584['startsWith']('~'));console[_0x50c928(0x43f)]('');for(const _0x393930 of _0x263c14){const _0x47d2cd=_0x393930===_0x5210c4[_0x50c928(0x357)];console[_0x50c928(0x43f)]('\x20\x20'+(_0x47d2cd?_0x11f3aa(_0x3fafb0['green'],'●'):_0x11f3aa(_0x3fafb0[_0x50c928(0x40a)],'○'))+'\x20\x20'+(_0x47d2cd?_0x11f3aa(_0x3fafb0[_0x50c928(0x25d)]+_0x3fafb0[_0x50c928(0x2db)],_0x393930):_0x11f3aa(_0x3fafb0['dim'],_0x393930)));}console['log'](_0x50c928(0x373)+_0x11f3aa(_0x3fafb0[_0x50c928(0x40a)],'active:')+'\x20'+_0x11f3aa(_0x3fafb0['cyan'],_0x5210c4['env'])),console[_0x50c928(0x43f)]('');return;}if(_0x5507a6===_0x50c928(0x393)){const _0x2668b9=[..._0x3c019c[_0x50c928(0x290)]['values']()][_0x50c928(0x27f)](_0x4c920c=>!_0x4c920c['name'][_0x50c928(0x3a8)]('~'));console['log']('');const _0x54ae99=Math[_0x50c928(0x39f)](..._0x2668b9['map'](_0x32e1c1=>_0x32e1c1[_0x50c928(0x279)][_0x50c928(0x3f9)]));for(const _0x5ecb19 of _0x2668b9){const _0x5cef68=_0x5ecb19[_0x50c928(0x279)]===_0x5210c4['env'],_0x11fc93=_0x5cef68?_0x11f3aa(_0x3fafb0[_0x50c928(0x337)],'●'):_0x11f3aa(_0x3fafb0['dim'],'○'),_0x33392e=_0x5cef68?_0x11f3aa(_0x3fafb0['bold']+_0x3fafb0[_0x50c928(0x2db)],_0x5ecb19['name'][_0x50c928(0x20a)](_0x54ae99)):_0x11f3aa(_0x3fafb0['dim'],_0x5ecb19['name'][_0x50c928(0x20a)](_0x54ae99)),_0x50bfe6=[..._0x5ecb19['typeSubDbs'][_0x50c928(0x1bd)]()][_0x50c928(0x27f)](_0x4a15ae=>!_0x4a15ae[_0x50c928(0x3a8)]('~')),_0x25f2e1=_0x50bfe6[_0x50c928(0x3f9)]?_0x11f3aa(_0x3fafb0[_0x50c928(0x40a)],_0x50bfe6[_0x50c928(0x41f)](0x0,0x5)['join'](',\x20')+(_0x50bfe6[_0x50c928(0x3f9)]>0x5?_0x50c928(0x2b8)+(_0x50bfe6[_0x50c928(0x3f9)]-0x5)+'\x20more':'')):_0x11f3aa(_0x3fafb0[_0x50c928(0x40a)],_0x50c928(0x30b));console[_0x50c928(0x43f)]('\x20\x20'+_0x11fc93+'\x20\x20'+_0x33392e+'\x20\x20'+_0x25f2e1);}console[_0x50c928(0x43f)]('');return;}if(_0x5507a6===_0x50c928(0x202)){const _0x2d9ba7=_0x595e90[_0x50c928(0x357)]??_0x5265ea[0x1]??_0x5210c4['env'];try{const _0x38e042=_0x3c019c[_0x50c928(0x357)](_0x2d9ba7),_0x5acd5b=[..._0x38e042['typeSubDbs'][_0x50c928(0x1bd)]()][_0x50c928(0x27f)](_0x2de52a=>!_0x2de52a[_0x50c928(0x3a8)]('~'))[_0x50c928(0x247)]();console[_0x50c928(0x43f)](_0x50c928(0x373)+_0x11f3aa(_0x3fafb0[_0x50c928(0x40a)],_0x5acd5b[_0x50c928(0x3f9)]+'\x20type'+(_0x5acd5b['length']!==0x1?'s':'')+_0x50c928(0x372)+_0x2d9ba7));for(const _0x88a3c3 of _0x5acd5b){const _0x2e4580=_0x38e042['typeSubDbs'][_0x50c928(0x479)](_0x88a3c3),_0x496881=_0x2e4580?.[_0x50c928(0x47d)]?.[_0x50c928(0x2fe)]?.()??0x0,_0x1619d3=_0x11f3aa(_0x3fafb0[_0x50c928(0x25d)]+_0x3fafb0[_0x50c928(0x2db)],_0x88a3c3['padEnd'](0x1c));console['log'](_0x50c928(0x37f)+_0x1619d3+'\x20\x20'+_0x11f3aa(_0x3fafb0['magenta'],String(_0x496881)[_0x50c928(0x3ff)](0x6))+'\x20'+_0x11f3aa(_0x3fafb0[_0x50c928(0x40a)],'records'));}console[_0x50c928(0x43f)]('');}catch(_0x400977){console[_0x50c928(0x29b)](_0x11f3aa(_0x3fafb0['red'],_0x50c928(0x373)+_0x400977['message']+'\x0a'));}return;}if(_0x5507a6==='ROUTES'){_0x30c87f(_0x3c019c,_0x5265ea['slice'](0x1)[_0x50c928(0x2e7)]('\x20'));return;}if(_0x5507a6==='LOGS'){const _0x294852=(_0x5265ea[0x1]??'')[_0x50c928(0x3b4)]();if(!_0x294852||_0x294852==='on')_0x1ae856[_0x50c928(0x34f)]=!![],_0x1ae856['level']=_0x50c928(0x239),console[_0x50c928(0x43f)]('\x0a\x20\x20'+_0x11f3aa(_0x3fafb0[_0x50c928(0x337)],'✓')+_0x50c928(0x220)+_0x11f3aa(_0x3fafb0['dim'],_0x50c928(0x233))+'\x0a');else{if(_0x294852===_0x50c928(0x2a9))_0x1ae856[_0x50c928(0x34f)]=![],console[_0x50c928(0x43f)](_0x50c928(0x373)+_0x11f3aa(_0x3fafb0['yellow'],'○')+_0x50c928(0x1b5));else _0x2f3abe[_0x294852]!==undefined?(_0x1ae856[_0x50c928(0x34f)]=!![],_0x1ae856['level']=_0x294852,console[_0x50c928(0x43f)](_0x50c928(0x373)+_0x11f3aa(_0x3fafb0[_0x50c928(0x337)],'✓')+_0x50c928(0x3b0)+_0x11f3aa(_0x3fafb0['bold'],_0x294852)+'\x0a')):console[_0x50c928(0x29b)](_0x11f3aa(_0x3fafb0[_0x50c928(0x24d)],_0x50c928(0x21e)));}return;}if(_0x5507a6===_0x50c928(0x3ea)||_0x5507a6===_0x50c928(0x2ac)){await _0x274d60(_0x3c019c,0x0);return;}if(_0x5507a6==='OPEN'){const _0x10dad7=_0x50c928(0x21d)+_0x515867['port']+'/admin/index.html',_0x1dba73=process[_0x50c928(0x32c)]==='win32'?_0x50c928(0x342)+_0x10dad7:process[_0x50c928(0x32c)]==='darwin'?_0x50c928(0x273)+_0x10dad7:'xdg-open\x20'+_0x10dad7;require$$4['exec'](_0x1dba73),console[_0x50c928(0x43f)](_0x50c928(0x373)+_0x11f3aa(_0x3fafb0[_0x50c928(0x337)],'✓')+_0x50c928(0x195)+_0x11f3aa(_0x3fafb0[_0x50c928(0x2db)],_0x10dad7)+'\x0a');return;}let _0x40f3ca,_0x7d44de,_0x5ab89f;if(_0x255dff[_0x50c928(0x1ad)](_0x5507a6)){_0x40f3ca=_0x5507a6,_0x7d44de=_0x5265ea[0x1],_0x5ab89f=_0x5265ea[_0x50c928(0x41f)](0x2);if(!_0x7d44de){console['error'](_0x11f3aa(_0x3fafb0['red'],_0x50c928(0x1e2)+_0x4ddc34+_0x50c928(0x368)));return;}}else _0x40f3ca=null,_0x7d44de=_0x5265ea[0x0],_0x5ab89f=_0x5265ea[_0x50c928(0x41f)](0x1);const _0x509b11=_0x595e90[_0x50c928(0x357)]??_0x5210c4[_0x50c928(0x357)],_0x1c37e2=_0x14585d(_0x7d44de,_0x509b11);if(_0x595e90[_0x50c928(0x2ec)]){_0x59fcd5(_0x3c019c,_0x1c37e2);return;}let _0x1c0080=null;if(_0x5ab89f[_0x50c928(0x3f9)]){const _0x3f997f=_0x5ab89f[_0x50c928(0x2e7)]('\x20');try{_0x1c0080=_0x3639fb(_0x3f997f);}catch(_0x36dcf3){console[_0x50c928(0x29b)](_0x11f3aa(_0x3fafb0['red'],_0x50c928(0x213)+_0x3f997f+'\x0a\x20\x20'+_0x11f3aa(_0x3fafb0[_0x50c928(0x40a)],_0x36dcf3['message'])+'\x0a'));return;}}if(!_0x40f3ca)_0x40f3ca=_0x1c0080!==null?_0x50c928(0x3e9):'GET';try{const _0x3bc799=await _0x172d0c(_0x3c019c,_0x40f3ca,_0x1c37e2,_0x1c0080);_0x2c8a8c(_0x3bc799[_0x50c928(0x41e)],_0x3bc799[_0x50c928(0x1c4)]);}catch(_0x203010){console['error'](_0x50c928(0x373)+_0x11f3aa(_0x3fafb0['red'],'✗')+'\x20'+_0x203010[_0x50c928(0x35a)]+'\x0a');}}class _0x1e7c08{constructor(){const _0x199205=_0x87fc2e;this[_0x199205(0x2c2)]=new Map(),this[_0x199205(0x2f2)]=null,this[_0x199205(0x222)]=![];}}function _0x1cf843(_0x103c27){const _0x5143ad=_0x87fc2e,_0x59f6d8=new _0x1e7c08();for(const _0x4a4afd of _0x103c27){if(_0x4a4afd[_0x5143ad(0x263)]?.[_0x5143ad(0x19e)])continue;const _0x2f04ab=_0x4a4afd[_0x5143ad(0x1f1)][_0x5143ad(0x3c1)](/^\/api/,'')[_0x5143ad(0x3c1)](/^\[\/env\/:env=[^\]]*\]/,'')[_0x5143ad(0x3c1)](/^\//,'');if(!_0x2f04ab)continue;let _0x130552=_0x59f6d8;for(const _0x4df902 of _0x2f04ab[_0x5143ad(0x35b)]('/')['filter'](Boolean)){if(_0x4df902[_0x5143ad(0x3a8)](':')){const _0xca1d1=_0x4df902['slice'](0x1);if(!_0x130552[_0x5143ad(0x2f2)])_0x130552[_0x5143ad(0x2f2)]={'param':_0xca1d1,'node':new _0x1e7c08()};_0x130552=_0x130552['dynamic'][_0x5143ad(0x34d)];}else{if(!_0x130552[_0x5143ad(0x2c2)][_0x5143ad(0x1ad)](_0x4df902))_0x130552[_0x5143ad(0x2c2)][_0x5143ad(0x1de)](_0x4df902,new _0x1e7c08());_0x130552=_0x130552['children'][_0x5143ad(0x479)](_0x4df902);}}_0x130552['terminal']=!![];}return _0x59f6d8;}const _0x18f767=new Map();function _0xb79fef(_0x1ba3c0,_0x26edb7,_0x4e9590){const _0x3e0c18=_0x87fc2e,_0x12547c=_0x18f767[_0x3e0c18(0x479)](_0x1ba3c0);if(_0x12547c&&_0x12547c[_0x3e0c18(0x26a)]>Date['now']())return _0x12547c[_0x3e0c18(0x3fe)];const _0x293400=_0x4e9590();return _0x18f767[_0x3e0c18(0x1de)](_0x1ba3c0,{'val':_0x293400,'exp':Date[_0x3e0c18(0x3e0)]()+_0x26edb7}),_0x293400;}function _0x13398f(_0x4c7401,_0x52930b,_0x1bdfec,_0x4cdade){const _0xe5497e=_0x87fc2e,_0x16a31c=_0x52930b[_0xe5497e(0x357)]??_0x4cdade[_0xe5497e(0x357)];switch(_0x4c7401){case _0xe5497e(0x357):return[..._0x1bdfec[_0xe5497e(0x290)][_0xe5497e(0x1bd)]()][_0xe5497e(0x27f)](_0x130704=>!_0x130704[_0xe5497e(0x3a8)]('~'));case _0xe5497e(0x3e2):return _0xb79fef(_0xe5497e(0x346)+_0x16a31c,0x7d0,()=>{const _0xb7aee2=_0xe5497e;try{return[..._0x1bdfec[_0xb7aee2(0x357)](_0x16a31c)[_0xb7aee2(0x244)][_0xb7aee2(0x1bd)]()][_0xb7aee2(0x27f)](_0x50f072=>!_0x50f072['startsWith']('~'));}catch{return[];}});case _0xe5497e(0x353):if(!_0x52930b['type'])return[];return _0xb79fef('keys:'+_0x16a31c+':'+_0x52930b[_0xe5497e(0x3e2)],0x5dc,()=>{const _0x1cc4d3=_0xe5497e;try{const _0x475e6a=_0x1bdfec[_0x1cc4d3(0x357)](_0x16a31c)[_0x1cc4d3(0x244)][_0x1cc4d3(0x479)](_0x52930b['type']);if(!_0x475e6a?.[_0x1cc4d3(0x47d)])return[];const _0x41da13=[];for(const {key:_0x3f5013}of _0x475e6a[_0x1cc4d3(0x47d)][_0x1cc4d3(0x3be)]({'limit':0x32})){_0x41da13['push'](String(_0x3f5013));if(_0x41da13['length']>=0x32)break;}return _0x41da13;}catch{return[];}});case _0xe5497e(0x1fe):if(!_0x52930b[_0xe5497e(0x3e2)])return[];return _0xb79fef(_0xe5497e(0x1d3)+_0x16a31c+':'+_0x52930b[_0xe5497e(0x3e2)],0x7d0,()=>{const _0x43aa5d=_0xe5497e;try{const _0x339266=_0x1bdfec['env'](_0x16a31c)[_0x43aa5d(0x244)]['get'](_0x52930b['type']);return _0x339266?[..._0x339266['indexToDb']?.[_0x43aa5d(0x1bd)]()??[]]:[];}catch{return[];}});case _0xe5497e(0x270):if(!_0x52930b[_0xe5497e(0x3e2)])return[];return _0xb79fef(_0xe5497e(0x46b)+_0x16a31c+':'+_0x52930b['type'],0x7d0,()=>{const _0x3f9ebe=_0xe5497e;try{return _0x1bdfec['fts']?.['list']?.(_0x52930b[_0x3f9ebe(0x3e2)],_0x1bdfec[_0x3f9ebe(0x357)](_0x16a31c))?.[_0x3f9ebe(0x312)](_0x37ab0f=>_0x37ab0f['name'])??[];}catch{return[];}});default:return[];}}function _0x33e041(_0x28e014,_0x1cf41a,_0x2af6b6,_0xa787bf){const _0x49331c=_0x87fc2e,_0x96db78=_0x28e014[_0x49331c(0x2ca)]('/'),_0x3b9b4e=_0x28e014[_0x49331c(0x35b)]('/'),_0x17a1a1=_0x96db78?_0x3b9b4e[_0x49331c(0x41f)](0x0,-0x1):_0x3b9b4e[_0x49331c(0x41f)](0x0,-0x1),_0x2c547f=_0x96db78?'':_0x3b9b4e[_0x3b9b4e[_0x49331c(0x3f9)]-0x1];let _0x1d2764=_0x1cf41a;const _0x515ba5={};for(const _0x50cc17 of _0x17a1a1){if(!_0x50cc17)continue;if(_0x1d2764[_0x49331c(0x2c2)][_0x49331c(0x1ad)](_0x50cc17))_0x1d2764=_0x1d2764[_0x49331c(0x2c2)][_0x49331c(0x479)](_0x50cc17);else{if(_0x1d2764[_0x49331c(0x2f2)])_0x515ba5[_0x1d2764['dynamic'][_0x49331c(0x282)]]=_0x50cc17,_0x1d2764=_0x1d2764[_0x49331c(0x2f2)]['node'];else return[];}}const _0x1802b3=_0x17a1a1['filter'](Boolean),_0x1b997a=_0x1802b3[_0x49331c(0x3f9)]?_0x1802b3[_0x49331c(0x2e7)]('/')+'/':'',_0x332b84=[];for(const [_0x157bf9]of _0x1d2764[_0x49331c(0x2c2)]){if(_0x157bf9['startsWith'](_0x2c547f))_0x332b84[_0x49331c(0x46d)](_0x1b997a+_0x157bf9);}if(_0x1d2764[_0x49331c(0x2f2)])for(const _0x29aa07 of _0x13398f(_0x1d2764['dynamic'][_0x49331c(0x282)],_0x515ba5,_0x2af6b6,_0xa787bf)){if(String(_0x29aa07)[_0x49331c(0x3a8)](_0x2c547f))_0x332b84[_0x49331c(0x46d)](_0x1b997a+_0x29aa07);}return _0x332b84[_0x49331c(0x41f)](0x0,0x64);}const _0x2fb167=[_0x87fc2e(0x2ec),_0x87fc2e(0x1a7),_0x87fc2e(0x357),_0x87fc2e(0x42c),_0x87fc2e(0x1c1),'routes',_0x87fc2e(0x31e),_0x87fc2e(0x348),_0x87fc2e(0x23b),_0x87fc2e(0x403)];function _0x364115(_0x572c07,_0x4e67b6,_0x4c345f){return function _0x2da232(_0x24f850){const _0x41ddcd=_0x4ad1;try{const _0x362ead=_0x24f850['search'](/\s[{[]/),_0x375fc2=_0x362ead>=0x0?_0x24f850[_0x41ddcd(0x41f)](0x0,_0x362ead):_0x24f850,_0x4ccec7=_0x375fc2[_0x41ddcd(0x242)]();if(!_0x4ccec7){const _0x1c403e=[..._0x2fb167,...[..._0x572c07['children']['keys']()]][_0x41ddcd(0x41f)](0x0,0x64);return[_0x1c403e,''];}const _0x443000=_0x4ccec7[_0x41ddcd(0x35b)](/\s+/),_0x1b5037=_0x443000[0x0],_0x2b318a=_0x1b5037[_0x41ddcd(0x313)]();if(_0x443000[_0x41ddcd(0x3f9)]===0x1){const _0x15ac8f=_0x1b5037[_0x41ddcd(0x3b4)](),_0xddce77=_0x2fb167['filter'](_0x4a73ee=>_0x4a73ee['startsWith'](_0x15ac8f)),_0x74a454=_0x33e041(_0x1b5037,_0x572c07,_0x4e67b6,_0x4c345f),_0x279ef4=[...new Set([..._0xddce77,..._0x74a454])][_0x41ddcd(0x41f)](0x0,0x64);return[_0x279ef4,_0x1b5037];}if(_0x255dff[_0x41ddcd(0x1ad)](_0x2b318a)&&_0x443000['length']===0x2){const _0x53433a=_0x443000[0x1],_0x117414=_0x33e041(_0x53433a,_0x572c07,_0x4e67b6,_0x4c345f);return[_0x117414[_0x41ddcd(0x312)](_0x5c30ea=>_0x1b5037+'\x20'+_0x5c30ea),_0x1b5037+'\x20'+_0x53433a];}if(!_0x255dff[_0x41ddcd(0x1ad)](_0x2b318a)&&_0x443000['length']>0x1){const _0x1eaef7=_0x33e041(_0x1b5037,_0x572c07,_0x4e67b6,_0x4c345f),_0x40b73f='\x20'+_0x443000[_0x41ddcd(0x41f)](0x1)[_0x41ddcd(0x2e7)]('\x20');return[_0x1eaef7[_0x41ddcd(0x312)](_0x51772d=>_0x51772d+_0x40b73f),_0x1b5037+_0x40b73f];}return[[],_0x24f850];}catch{return[[],_0x24f850];}};}async function _0x37ab74(_0x2f3c61,_0x3bbdc3){const _0x19f4e7=_0x87fc2e,_0x606a3d={'enabled':!![],'level':_0x3bbdc3['logLevel']??_0x19f4e7(0x239)},_0x296fad={'env':_0x19f4e7(0x19d)},_0x565084={'current':null},_0x196509=_0x1cf843(_0x2f3c61[_0x19f4e7(0x415)][_0x19f4e7(0x3a9)]()),_0x5d2793=_0x364115(_0x196509,_0x2f3c61,_0x296fad);_0x2f3c61[_0x19f4e7(0x43f)][_0x19f4e7(0x28e)](_0x158e82=>{const _0x1ccddf=_0x19f4e7;if(!_0x606a3d['enabled'])return;_0x3fca22(_0x158e82,_0x606a3d['level']),_0x565084['current']?.[_0x1ccddf(0x390)](!![]);}),_0x46becb(_0x2f3c61,_0x3bbdc3);const _0x32682b=_0x2c2b1d['createInterface']({'input':process[_0x19f4e7(0x37d)],'output':process[_0x19f4e7(0x3ae)],'terminal':!![],'completer':_0x5d2793,'prompt':_0x3f3c8d(_0x296fad),'historySize':_0xce65b2});try{const _0x50ed21=_0x5280af[_0x19f4e7(0x224)](_0x2245ef,_0x19f4e7(0x42d))[_0x19f4e7(0x35b)]('\x0a')[_0x19f4e7(0x27f)](Boolean);_0x32682b['history']=_0x50ed21[_0x19f4e7(0x2c1)]()['slice'](0x0,_0xce65b2);}catch{}return _0x565084[_0x19f4e7(0x3c3)]=_0x32682b,_0x32682b['on'](_0x19f4e7(0x435),async _0x47aad6=>{const _0x3c85a4=_0x19f4e7;_0x32682b[_0x3c85a4(0x385)]();try{await _0x17742f(_0x47aad6,_0x2f3c61,_0x3bbdc3,_0x606a3d,_0x296fad,_0x32682b);}catch(_0x20ca20){console[_0x3c85a4(0x29b)](_0x11f3aa(_0x3fafb0[_0x3c85a4(0x24d)],'\x20\x20Error:\x20'+_0x20ca20[_0x3c85a4(0x35a)]));}finally{_0x32682b[_0x3c85a4(0x303)](),_0x32682b[_0x3c85a4(0x390)]();}}),_0x32682b['on'](_0x19f4e7(0x1fa),()=>{const _0x4e0af5=_0x19f4e7;try{const _0x53e3ff=[..._0x32682b[_0x4e0af5(0x38f)]]['reverse']()[_0x4e0af5(0x27f)](Boolean)['slice'](0x0,_0xce65b2);_0x5280af[_0x4e0af5(0x3b8)](_0x2245ef,_0x53e3ff[_0x4e0af5(0x2e7)]('\x0a')+'\x0a');}catch{}_0x274d60(_0x2f3c61,0x0);}),process['on']('SIGINT',()=>{const _0x5d4c0e=_0x19f4e7;if(_0x32682b['line']==='')_0x274d60(_0x2f3c61,0x0);else process[_0x5d4c0e(0x3ae)]['write']('\x0a'),_0x32682b[_0x5d4c0e(0x1c5)](0x0),_0x32682b[_0x5d4c0e(0x390)]();}),process['on'](_0x19f4e7(0x3d9),()=>_0x274d60(_0x2f3c61,0x0)),_0x32682b[_0x19f4e7(0x390)](),_0x32682b;}return okdbShell={'start':_0x37ab74,'colorLog':_0x3fca22,'lenientParse':_0x3639fb,'_splitLine':_0x499593,'_formatRouteHelpLines':_0x1d5374,'_routeSummary':_0x31865b,'_routeTags':_0x1da1cd},okdbShell;}var hasRequiredOkdb;function requireOkdb(){const _0x348b78=_0x5d02f6;if(hasRequiredOkdb)return okdb$1;hasRequiredOkdb=0x1;try{process[_0x348b78(0x1f0)]();}catch{}const _0x2bd16a=require$$1$1,_0x2655fc=require$$1;function _0x22c27d(_0x265316){const _0x19ddcd=_0x348b78,_0x2853b6=_0x265316[_0x19ddcd(0x41f)](0x2),_0x4c4ef6={};let _0x2a21c0=0x0;while(_0x2a21c0<_0x2853b6[_0x19ddcd(0x3f9)]){const _0x1127a1=_0x2853b6[_0x2a21c0];if(_0x1127a1===_0x19ddcd(0x2aa)||_0x1127a1==='-p')_0x4c4ef6[_0x19ddcd(0x3c2)]=Number(_0x2853b6[++_0x2a21c0]);else{if(_0x1127a1===_0x19ddcd(0x206)||_0x1127a1==='-d')_0x4c4ef6[_0x19ddcd(0x1f1)]=_0x2853b6[++_0x2a21c0];else{if(_0x1127a1==='--key'||_0x1127a1==='-k')_0x4c4ef6['key']=_0x2853b6[++_0x2a21c0];else{if(_0x1127a1===_0x19ddcd(0x2f0)||_0x1127a1==='-c')_0x4c4ef6[_0x19ddcd(0x43e)]=_0x2853b6[++_0x2a21c0];else{if(_0x1127a1===_0x19ddcd(0x451))_0x4c4ef6[_0x19ddcd(0x397)]=_0x2853b6[++_0x2a21c0];else{if(_0x1127a1==='--no-repl')_0x4c4ef6[_0x19ddcd(0x381)]=!![];else{if(_0x1127a1===_0x19ddcd(0x198))_0x4c4ef6['noAdmin']=!![];else{if(_0x1127a1===_0x19ddcd(0x47e)||_0x1127a1==='-e')_0x4c4ef6['env']=_0x2853b6[++_0x2a21c0];else{if(_0x1127a1===_0x19ddcd(0x38e))_0x4c4ef6[_0x19ddcd(0x1c1)]=_0x2853b6[++_0x2a21c0];else{if(_0x1127a1===_0x19ddcd(0x2b7))_0x4c4ef6[_0x19ddcd(0x2e4)]=!![];else{if(_0x1127a1===_0x19ddcd(0x225))_0x4c4ef6[_0x19ddcd(0x366)]=!![];else{if(_0x1127a1==='--drop')_0x4c4ef6[_0x19ddcd(0x29d)]=!![];else{if(_0x1127a1==='--open'){const _0x1508fe=[];while(_0x2a21c0+0x1<_0x2853b6['length']&&!_0x2853b6[_0x2a21c0+0x1][_0x19ddcd(0x3a8)]('--')){_0x1508fe['push'](_0x2853b6[++_0x2a21c0]);}_0x4c4ef6[_0x19ddcd(0x348)]=_0x1508fe[_0x19ddcd(0x3f9)]>0x0?_0x1508fe:!![];}else{if(_0x1127a1==='--log-requests')_0x4c4ef6['logRequests']=!![];else{if(_0x1127a1===_0x19ddcd(0x285))_0x4c4ef6['name']=_0x2853b6[++_0x2a21c0];else{if(_0x1127a1==='--password')_0x4c4ef6[_0x19ddcd(0x402)]=_0x2853b6[++_0x2a21c0];else{if(_0x1127a1===_0x19ddcd(0x1f3))_0x4c4ef6[_0x19ddcd(0x46f)]=_0x2853b6[++_0x2a21c0];else{if(_0x1127a1==='--permissions')_0x4c4ef6[_0x19ddcd(0x230)]=_0x2853b6[++_0x2a21c0];else{if(_0x1127a1===_0x19ddcd(0x30f))_0x4c4ef6[_0x19ddcd(0x215)]=_0x2853b6[++_0x2a21c0];else{if(_0x1127a1===_0x19ddcd(0x1c8))_0x4c4ef6[_0x19ddcd(0x31c)]=_0x2853b6[++_0x2a21c0];else{if(_0x1127a1==='--token')_0x4c4ef6[_0x19ddcd(0x2bd)]=_0x2853b6[++_0x2a21c0];else{if(_0x1127a1===_0x19ddcd(0x216)||_0x1127a1==='-u')_0x4c4ef6[_0x19ddcd(0x33f)]=_0x2853b6[++_0x2a21c0];else{if(_0x1127a1===_0x19ddcd(0x411))_0x4c4ef6[_0x19ddcd(0x377)]=_0x2853b6[++_0x2a21c0];else{if(_0x1127a1==='--version'||_0x1127a1==='-v'){const _0x4e078a=require$$2;console[_0x19ddcd(0x43f)](_0x4e078a[_0x19ddcd(0x27d)]),process[_0x19ddcd(0x23b)](0x0);}else(_0x1127a1===_0x19ddcd(0x3a6)||_0x1127a1==='-h')&&(_0x4323e2(),process[_0x19ddcd(0x23b)](0x0));}}}}}}}}}}}}}}}}}}}}}}}_0x2a21c0++;}return _0x4c4ef6;}function _0x4323e2(){const _0xc1b9f2=_0x348b78;console['log'](_0xc1b9f2(0x18e));}const _0x530f7c=new Set([_0x348b78(0x20e),_0x348b78(0x239),_0x348b78(0x354),_0x348b78(0x29b)]);function _0x4ff8a7(_0x4dcfe4){const _0x2fd8b9=_0x348b78,_0x5d4803=_0x4dcfe4[_0x2fd8b9(0x43e)]?_0x2bd16a['resolve'](_0x4dcfe4[_0x2fd8b9(0x43e)]):_0x2bd16a['resolve'](_0x2fd8b9(0x1b7));let _0x22514d={};if(_0x2655fc['existsSync'](_0x5d4803))try{const _0x306293=_0x2655fc[_0x2fd8b9(0x224)](_0x5d4803,_0x2fd8b9(0x42d))['replace'](/^\uFEFF/,'');_0x22514d=JSON[_0x2fd8b9(0x2d9)](_0x306293),console[_0x2fd8b9(0x43f)](_0x2fd8b9(0x264)+_0x5d4803);}catch(_0x213786){console[_0x2fd8b9(0x29b)](_0x2fd8b9(0x367)+_0x5d4803+':\x20'+_0x213786[_0x2fd8b9(0x35a)]),process[_0x2fd8b9(0x23b)](0x1);}const _0x738f76={'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},_0x2d947f={'port':_0x4dcfe4[_0x2fd8b9(0x3c2)]??_0x22514d[_0x2fd8b9(0x3c2)]??_0x738f76[_0x2fd8b9(0x3c2)]??0x2124,'dbPath':_0x4dcfe4[_0x2fd8b9(0x1f1)]??_0x22514d[_0x2fd8b9(0x1f1)]??_0x738f76[_0x2fd8b9(0x1f1)]??_0x2fd8b9(0x209),'key':_0x4dcfe4[_0x2fd8b9(0x353)]??_0x22514d[_0x2fd8b9(0x353)]??_0x738f76[_0x2fd8b9(0x353)]??undefined,'logLevel':_0x4dcfe4[_0x2fd8b9(0x397)]??_0x22514d['logLevel']??_0x738f76[_0x2fd8b9(0x397)]??_0x2fd8b9(0x239),'noRepl':_0x4dcfe4[_0x2fd8b9(0x381)]??_0x22514d[_0x2fd8b9(0x381)]??_0x738f76['noRepl']??![],'noAdmin':_0x4dcfe4[_0x2fd8b9(0x2d2)]??_0x22514d[_0x2fd8b9(0x2d2)]??_0x738f76[_0x2fd8b9(0x2d2)]??![],'admin':_0x22514d[_0x2fd8b9(0x226)]??{},'api':_0x22514d['api']??undefined,'auth':_0x22514d[_0x2fd8b9(0x464)]??undefined,'mcp':_0x22514d[_0x2fd8b9(0x243)]??undefined,'timeMachine':_0x22514d['timeMachine']!==![]?_0x22514d[_0x2fd8b9(0x2af)]??{}:![]};return _0x4dcfe4[_0x2fd8b9(0x348)]!==undefined&&(_0x2d947f[_0x2fd8b9(0x464)]=_0x2d947f[_0x2fd8b9(0x464)]||{},_0x2d947f[_0x2fd8b9(0x464)]['open']=_0x4dcfe4[_0x2fd8b9(0x348)]),_0x4dcfe4[_0x2fd8b9(0x332)]&&(_0x2d947f[_0x2fd8b9(0x20e)]=_0x2d947f[_0x2fd8b9(0x20e)]||{},_0x2d947f[_0x2fd8b9(0x20e)]['logRequests']=!![]),(!Number[_0x2fd8b9(0x3fa)](_0x2d947f[_0x2fd8b9(0x3c2)])||_0x2d947f[_0x2fd8b9(0x3c2)]<0x1||_0x2d947f[_0x2fd8b9(0x3c2)]>0xffff)&&(console['error']('[okdb]\x20invalid\x20port:\x20'+_0x2d947f[_0x2fd8b9(0x3c2)]+_0x2fd8b9(0x444)),process['exit'](0x1)),!_0x530f7c[_0x2fd8b9(0x1ad)](_0x2d947f[_0x2fd8b9(0x397)])&&(console['error'](_0x2fd8b9(0x2d3)+_0x2d947f[_0x2fd8b9(0x397)]+'\x22\x20(must\x20be\x20debug|info|warn|error)'),process[_0x2fd8b9(0x23b)](0x1)),_0x2d947f;}function _0x972172(_0x32c00b){const _0x506806=_0x348b78;return!!(_0x32c00b&&typeof _0x32c00b===_0x506806(0x3da)&&!Array['isArray'](_0x32c00b)&&Object[_0x506806(0x1bd)](_0x32c00b)['length']>0x0);}const _0x41fe9f=!process['stdout'][_0x348b78(0x304)]||!!process.env.NO_COLOR;function _0x665352(_0x1480ba,_0x3b6a40){const _0x2947dd=_0x348b78;return _0x41fe9f?_0x3b6a40:'\x1b['+_0x1480ba+'m'+_0x3b6a40+_0x2947dd(0x25f);}function _0x1f9562(_0x206f5a){const _0x15b671=_0x348b78;if(!_0x206f5a||_0x206f5a[_0x15b671(0x3f9)]===0x0)return;const _0x3758c3='─'[_0x15b671(0x36b)](0x38);process[_0x15b671(0x359)][_0x15b671(0x284)]('\x0a'),process['stderr'][_0x15b671(0x284)](_0x665352('33',_0x15b671(0x27b)+_0x206f5a[_0x15b671(0x3f9)]+_0x15b671(0x248)+(_0x206f5a[_0x15b671(0x3f9)]>0x1?'S':'')+'\x0a')),process['stderr']['write']('\x20\x20'+_0x3758c3+'\x0a');for(const _0x4ed073 of _0x206f5a){const _0x41482a=_0x4ed073['level']===_0x15b671(0x29b)?_0x665352('31',_0x15b671(0x18f)):_0x665352('33',_0x15b671(0x37b));process[_0x15b671(0x359)]['write'](_0x41482a+'\x20\x20'+_0x665352('1',_0x4ed073[_0x15b671(0x34a)])+'\x0a'),process[_0x15b671(0x359)][_0x15b671(0x284)](_0x15b671(0x44f)+_0x4ed073[_0x15b671(0x35a)]+'\x0a');if(_0x4ed073[_0x15b671(0x2a4)])process['stderr'][_0x15b671(0x284)](_0x15b671(0x44f)+_0x665352('2','Hint:\x20'+_0x4ed073[_0x15b671(0x2a4)])+'\x0a');process[_0x15b671(0x359)][_0x15b671(0x284)]('\x0a');}process[_0x15b671(0x359)][_0x15b671(0x284)]('\x20\x20'+_0x3758c3+'\x0a\x0a');}function _0x2a2ed1(_0x3f729a,_0x57889a){const _0x35eea2=_0x348b78,_0x58a020=_0x3f729a[_0x35eea2(0x415)][_0x35eea2(0x443)](_0x57889a);return new Promise((_0x13e4ee,_0x13b8ff)=>{const _0x61af72=_0x35eea2;_0x58a020['once'](_0x61af72(0x3f3),_0x13e4ee),_0x58a020[_0x61af72(0x468)](_0x61af72(0x29b),_0x13b8ff);});}async function _0x30d6b7(_0x1c371e){const _0x2aa514=_0x348b78,_0x203453=require$$3;console[_0x2aa514(0x43f)](_0x2aa514(0x2c3));let _0x376715=!![];const _0x50cf54=(_0x2a79b0,_0x4760ba)=>{const _0x4956f8=_0x2aa514;console[_0x4956f8(0x43f)]('\x20\x20'+(_0x2a79b0?'✓':'✗')+'\x20'+_0x4760ba);if(!_0x2a79b0)_0x376715=![];},_0x1651a1=Number(process['version'][_0x2aa514(0x3c1)]('v','')[_0x2aa514(0x35b)]('.')[0x0]);_0x50cf54(_0x1651a1>=0x12,'node\x20'+process['version']+(_0x1651a1<0x12?_0x2aa514(0x389):''));const _0x1af36e=_0x2bd16a[_0x2aa514(0x413)](_0x1c371e[_0x2aa514(0x23f)]);try{_0x2655fc['mkdirSync'](_0x1af36e,{'recursive':!![]});const _0x8b5c78=_0x2bd16a[_0x2aa514(0x2e7)](_0x1af36e,'.okdb-write-test');_0x2655fc[_0x2aa514(0x3b8)](_0x8b5c78,''),_0x2655fc[_0x2aa514(0x455)](_0x8b5c78),_0x50cf54(!![],'database\x20path\x20writable:\x20'+_0x1af36e);}catch(_0x41abb2){_0x50cf54(![],'database\x20path\x20not\x20writable:\x20'+_0x1af36e+_0x2aa514(0x2df)+_0x41abb2['message']+')');}const _0x19e603=await new Promise(_0xf1403c=>{const _0x243b0b=_0x2aa514,_0x318049=_0x203453[_0x243b0b(0x42b)]();_0x318049[_0x243b0b(0x468)]('error',()=>_0xf1403c(![])),_0x318049[_0x243b0b(0x468)]('listening',()=>{const _0x3d964a=_0x243b0b;_0x318049[_0x3d964a(0x1fa)](),_0xf1403c(!![]);}),_0x318049[_0x243b0b(0x443)](_0x1c371e['port'],'127.0.0.1');});_0x50cf54(_0x19e603,_0x2aa514(0x261)+_0x1c371e[_0x2aa514(0x3c2)]+'\x20'+(_0x19e603?'available':_0x2aa514(0x465)));const _0x5da5be=_0x2bd16a[_0x2aa514(0x413)]('.kdbconfig');if(_0x2655fc[_0x2aa514(0x3ef)](_0x5da5be))try{JSON[_0x2aa514(0x2d9)](_0x2655fc['readFileSync'](_0x5da5be,'utf8')['replace'](/^\uFEFF/,'')),_0x50cf54(!![],_0x2aa514(0x199)+_0x5da5be);}catch(_0x128867){_0x50cf54(![],'config\x20file\x20invalid:\x20'+_0x128867[_0x2aa514(0x35a)]);}else _0x50cf54(!![],'no\x20.kdbconfig\x20(using\x20defaults)');console['log'](''),_0x376715?console[_0x2aa514(0x43f)](_0x2aa514(0x21c)):(console[_0x2aa514(0x43f)]('\x20\x20Some\x20checks\x20failed.\x0a'),process[_0x2aa514(0x23b)](0x1));}async function _0x38885d(){const _0x448370=_0x348b78,_0x2ccf51=_0x2bd16a[_0x448370(0x413)]('.kdbconfig');!_0x2655fc[_0x448370(0x3ef)](_0x2ccf51)?(_0x2655fc[_0x448370(0x3b8)](_0x2ccf51,JSON[_0x448370(0x2e2)]({'port':0x2124,'path':_0x448370(0x209),'logLevel':_0x448370(0x239),'noRepl':![],'noAdmin':![]},null,0x2)+'\x0a'),console[_0x448370(0x43f)](_0x448370(0x299))):console[_0x448370(0x43f)](_0x448370(0x241));const _0x430834=_0x2bd16a['resolve'](_0x448370(0x209));!_0x2655fc[_0x448370(0x3ef)](_0x430834)?(_0x2655fc[_0x448370(0x1e9)](_0x430834,{'recursive':!![]}),console['log'](_0x448370(0x311))):console[_0x448370(0x43f)]('[okdb]\x20./okdb-data\x20already\x20exists\x20—\x20skipping'),console['log'](_0x448370(0x450));}async function _0x52676b(_0x1544f3){const _0x5aac5c=_0x348b78,_0x1e062c=_0x2bd16a[_0x5aac5c(0x413)](_0x1544f3[_0x5aac5c(0x23f)]);if(!_0x2655fc[_0x5aac5c(0x3ef)](_0x1e062c)){console[_0x5aac5c(0x43f)]('[okdb]\x20nothing\x20to\x20reset\x20—\x20'+_0x1e062c+'\x20does\x20not\x20exist');return;}const _0x472d93=require$$0$2,_0x19f989=_0x472d93['createInterface']({'input':process[_0x5aac5c(0x37d)],'output':process[_0x5aac5c(0x3ae)]}),_0x136f5f=await new Promise(_0x126789=>_0x19f989[_0x5aac5c(0x43d)]('\x0a\x20\x20Delete\x20ALL\x20data\x20in\x20'+_0x1e062c+'?\x0a\x20\x20Type\x20\x22yes\x22\x20to\x20confirm:\x20',_0x126789));_0x19f989[_0x5aac5c(0x1fa)](),console[_0x5aac5c(0x43f)]('');if(_0x136f5f[_0x5aac5c(0x1f8)]()[_0x5aac5c(0x3b4)]()!=='yes'){console[_0x5aac5c(0x43f)](_0x5aac5c(0x333));return;}_0x2655fc[_0x5aac5c(0x2c5)](_0x1e062c,{'recursive':!![],'force':!![]}),console[_0x5aac5c(0x43f)]('[okdb]\x20reset:\x20'+_0x1e062c+_0x5aac5c(0x351));}async function _0x383d3b(_0x4befcb,_0x308fd7){const _0x3e8716=_0x348b78,_0x59766b=require$$5,_0x2e0130=_0x2bd16a[_0x3e8716(0x413)](_0x308fd7[_0x3e8716(0x23f)]);console[_0x3e8716(0x43f)](_0x3e8716(0x283)+_0x2e0130+'…');const _0x54395d=new _0x59766b(_0x2e0130,_0x308fd7[_0x3e8716(0x353)]?{'encryptionKey':_0x308fd7[_0x3e8716(0x353)]}:{});await _0x54395d['open'](),console['log'](_0x3e8716(0x430)+_0x4befcb+'…');const {envs:_0x2dc397}=await _0x54395d[_0x3e8716(0x36e)]['backup'](_0x4befcb);for(const _0x152cab of _0x2dc397){const _0x36da10=_0x152cab['sizeBefore']>0x0?_0x3e8716(0x2df)+(_0x152cab['sizeBefore']/0x400/0x400)[_0x3e8716(0x3b5)](0x2)+'\x20MB\x20→\x20'+(_0x152cab['sizeAfter']/0x400/0x400)[_0x3e8716(0x3b5)](0x2)+_0x3e8716(0x2cf):'';console[_0x3e8716(0x43f)](_0x3e8716(0x437)+_0x152cab[_0x3e8716(0x279)]+_0x3e8716(0x3f8)+_0x152cab[_0x3e8716(0x3eb)]+_0x36da10);}await _0x54395d[_0x3e8716(0x1fa)](),console[_0x3e8716(0x43f)](_0x3e8716(0x44d));}async function _0x17efbd(_0x40f155,_0x272205,_0x271a27){const _0x204caa=_0x348b78,_0x31244c=require$$5,_0x4a1040=_0x2bd16a['resolve'](_0x272205[_0x204caa(0x23f)]),_0x4ce9e7=_0x271a27['env']??_0x204caa(0x19d),_0x5c20e6=_0x271a27[_0x204caa(0x1c1)]?_0x271a27[_0x204caa(0x1c1)][_0x204caa(0x35b)](',')[_0x204caa(0x312)](_0x44c72b=>_0x44c72b[_0x204caa(0x1f8)]()):null;console[_0x204caa(0x43f)](_0x204caa(0x283)+_0x4a1040+'…');const _0x25df98=new _0x31244c(_0x4a1040,_0x272205[_0x204caa(0x353)]?{'encryptionKey':_0x272205[_0x204caa(0x353)]}:{});await _0x25df98['open'](),console[_0x204caa(0x43f)](_0x204caa(0x2d0)+_0x4ce9e7+_0x204caa(0x30c)+_0x40f155+'…');const _0x1a55fb=await _0x25df98[_0x204caa(0x36e)]['exportToFile'](_0x40f155,{'envName':_0x4ce9e7,'types':_0x5c20e6,'includeChanges':!!_0x271a27[_0x204caa(0x2e4)]});console[_0x204caa(0x43f)]('[okdb]\x20exported\x20\x20types='+_0x1a55fb[_0x204caa(0x1c1)]+_0x204caa(0x291)+_0x1a55fb[_0x204caa(0x3b7)]+_0x204caa(0x301)+_0x1a55fb['changes']);if(_0x271a27[_0x204caa(0x366)]){const _0x4f5b80=_0x2bd16a[_0x204caa(0x2e7)](_0x2bd16a['dirname'](_0x40f155),_0x204caa(0x366));process[_0x204caa(0x3ae)][_0x204caa(0x284)](_0x204caa(0x324));const {count:_0x2c305e,bytes:_0x42741f}=await _0x25df98['migrate'][_0x204caa(0x262)](_0x4f5b80);console['log'](_0x204caa(0x466)+_0x4f5b80+_0x204caa(0x2df)+_0x2c305e+'\x20file'+(_0x2c305e!==0x1?'s':'')+',\x20'+(_0x42741f/0x400/0x400)[_0x204caa(0x3b5)](0x2)+'\x20MB)');}await _0x25df98[_0x204caa(0x1fa)](),console[_0x204caa(0x43f)](_0x204caa(0x257));}async function _0x5e9711(_0x30d81b,_0x144249,_0x54393a){const _0x2a8a58=_0x348b78,_0x248f5d=require$$5,_0x41e981=_0x2bd16a[_0x2a8a58(0x413)](_0x144249[_0x2a8a58(0x23f)]),_0x7595f2=_0x54393a[_0x2a8a58(0x357)]??null,_0x2e85ac=_0x54393a[_0x2a8a58(0x1c1)]?_0x54393a[_0x2a8a58(0x1c1)]['split'](',')[_0x2a8a58(0x312)](_0x13c070=>_0x13c070[_0x2a8a58(0x1f8)]()):null,_0x4a9204=!!_0x54393a['drop'];console[_0x2a8a58(0x43f)](_0x2a8a58(0x283)+_0x41e981+'…');const _0x3bfa77=new _0x248f5d(_0x41e981,_0x144249['key']?{'encryptionKey':_0x144249[_0x2a8a58(0x353)]}:{});await _0x3bfa77[_0x2a8a58(0x348)](),console[_0x2a8a58(0x43f)](_0x2a8a58(0x217)+_0x30d81b+'…');const _0xd9f1a=await _0x3bfa77[_0x2a8a58(0x36e)][_0x2a8a58(0x28b)](_0x30d81b,{'envName':_0x7595f2,'types':_0x2e85ac,'dropExisting':_0x4a9204,'includeChanges':!!_0x54393a[_0x2a8a58(0x2e4)],'onProgress':({type:_0x247e55,count:_0x40f876})=>{const _0x342af2=_0x2a8a58;process[_0x342af2(0x3ae)][_0x342af2(0x284)](_0x342af2(0x197)+_0x247e55+':\x20'+_0x40f876+_0x342af2(0x2c9));}});process[_0x2a8a58(0x3ae)][_0x2a8a58(0x284)]('\x0a'),console[_0x2a8a58(0x43f)](_0x2a8a58(0x274)+_0xd9f1a[_0x2a8a58(0x1c1)]+'\x20\x20records='+_0xd9f1a[_0x2a8a58(0x3b7)]+_0x2a8a58(0x301)+_0xd9f1a[_0x2a8a58(0x2e4)]);if(_0x54393a['blobs']){const _0x1963c1=_0x2bd16a[_0x2a8a58(0x2e7)](_0x2bd16a['dirname'](_0x30d81b),'blobs');if(_0x2655fc[_0x2a8a58(0x3ef)](_0x1963c1)){const {imported:_0x48c974,skipped:_0x44252e}=await _0x3bfa77[_0x2a8a58(0x36e)]['importBlobs'](_0x1963c1);console[_0x2a8a58(0x43f)]('[okdb]\x20blobs:\x20imported='+_0x48c974+_0x2a8a58(0x43c)+_0x44252e);}}await _0x3bfa77[_0x2a8a58(0x1fa)](),console[_0x2a8a58(0x43f)](_0x2a8a58(0x428));}async function _0x4e53e1(_0x52e889,_0x21055b){const _0x21422f=_0x348b78;_0x21055b[_0x21422f(0x402)]&&!_0x21055b[_0x21422f(0x279)]&&(console['error'](_0x21422f(0x34e)),process[_0x21422f(0x23b)](0x1));const _0xa786a5=_0x21055b['permissions']?_0x21055b[_0x21422f(0x230)][_0x21422f(0x35b)](',')['map'](_0x474304=>_0x474304[_0x21422f(0x1f8)]())[_0x21422f(0x27f)](Boolean):[];let _0x564cd3={};if(_0x21055b[_0x21422f(0x215)])try{_0x564cd3=JSON[_0x21422f(0x2d9)](_0x21055b[_0x21422f(0x215)]);if(typeof _0x564cd3!==_0x21422f(0x3da)||Array[_0x21422f(0x47f)](_0x564cd3)||_0x564cd3===null)throw new Error();}catch{console[_0x21422f(0x29b)](_0x21422f(0x45b)),process[_0x21422f(0x23b)](0x1);}const _0x3a2fb7=require$$5,{randomToken:_0x43f2b0,hashToken:_0x1d22f4,hashPassword:_0x592827}=requireOkdbAuthTokens(),_0x2b3ed4=require$$0,_0x5378ff=_0x2bd16a[_0x21422f(0x413)](_0x52e889['dbPath']),_0x431858=new _0x3a2fb7(_0x5378ff,_0x52e889[_0x21422f(0x353)]?{'encryptionKey':_0x52e889[_0x21422f(0x353)]}:{});await _0x431858[_0x21422f(0x348)]();try{await _0x431858[_0x21422f(0x464)][_0x21422f(0x3d5)]();if(_0x21055b[_0x21422f(0x279)]){const _0x21a745=await _0x431858[_0x21422f(0x464)]['_lookupByName'](_0x21055b['name']);_0x21a745&&(console[_0x21422f(0x29b)](_0x21422f(0x2b5)+_0x21055b[_0x21422f(0x279)]+_0x21422f(0x31f)),process[_0x21422f(0x23b)](0x1));}const _0x354c60=_0x43f2b0(0x20),_0x2c4070=_0x1d22f4(_0x354c60),_0x29c8a6=_0x21055b[_0x21422f(0x402)]?await _0x592827(_0x21055b[_0x21422f(0x402)]):null,_0x292e8c=_0x2b3ed4['randomUUID'](),_0x5af1f7={'tokenHash':_0x2c4070,'name':_0x21055b['name']||null,'passwordHash':_0x29c8a6,'label':_0x21055b[_0x21422f(0x46f)]||null,'permissions':_0xa786a5,'grants':_0x564cd3,'createdAt':Date['now'](),'lastUsedAt':null},_0xeaac85=_0x21055b[_0x21422f(0x31c)]?{'ttl':Number(_0x21055b[_0x21422f(0x31c)])}:undefined;await _0x431858[_0x21422f(0x26f)]['put']('~tokens',_0x292e8c,_0x5af1f7,_0xeaac85),console[_0x21422f(0x43f)](_0x21422f(0x376)),console['log'](_0x21422f(0x365)+_0x292e8c),console[_0x21422f(0x43f)](_0x21422f(0x404)+(_0x21055b[_0x21422f(0x279)]||_0x21422f(0x374))),console[_0x21422f(0x43f)](_0x21422f(0x204)+(_0x21055b[_0x21422f(0x46f)]||_0x21422f(0x374))),console[_0x21422f(0x43f)](_0x21422f(0x462)+(_0xa786a5[_0x21422f(0x2e7)](',\x20')||'(none)')),console['log'](_0x21422f(0x207)),console[_0x21422f(0x43f)](_0x21422f(0x37f)+_0x354c60+'\x0a');}finally{await _0x431858['close']();}}async function _0x51135d(_0x5b479c){const _0x314a09=_0x348b78,_0x3a197d=require$$5,_0x4f6650=_0x2bd16a[_0x314a09(0x413)](_0x5b479c[_0x314a09(0x23f)]),_0x5e1a03=new _0x3a197d(_0x4f6650,_0x5b479c[_0x314a09(0x353)]?{'encryptionKey':_0x5b479c[_0x314a09(0x353)]}:{});await _0x5e1a03[_0x314a09(0x348)]();try{const _0x1bcb5b=_0x5e1a03[_0x314a09(0x26f)];if(!_0x1bcb5b||!_0x1bcb5b['hasType'](_0x314a09(0x1b1))){console['log']('No\x20tokens.');return;}const _0x41f33b=[];for(const {key:_0x3eba22,value:_0x1b0c82}of _0x1bcb5b[_0x314a09(0x3be)](_0x314a09(0x1b1))){_0x41f33b['push']({'id':_0x3eba22,'name':_0x1b0c82[_0x314a09(0x279)]||'(unset)','label':_0x1b0c82[_0x314a09(0x46f)]||_0x314a09(0x374),'permissions':Array['isArray'](_0x1b0c82[_0x314a09(0x230)])?_0x1b0c82[_0x314a09(0x230)][_0x314a09(0x2e7)](','):'','created':_0x1b0c82['createdAt']?new Date(_0x1b0c82[_0x314a09(0x47a)])[_0x314a09(0x236)]()[_0x314a09(0x41f)](0x0,0xa):''});}if(_0x41f33b[_0x314a09(0x3f9)]===0x0){console['log']('No\x20tokens.');return;}const _0x56c3d9=!process[_0x314a09(0x3ae)][_0x314a09(0x2da)]||process[_0x314a09(0x3ae)][_0x314a09(0x2da)]>=0x64,_0x9ea33b=_0x56c3d9?0x24:0xa,_0x50ab19=['ID'[_0x314a09(0x20a)](_0x9ea33b),_0x314a09(0x323)[_0x314a09(0x20a)](0x10),'LABEL'[_0x314a09(0x20a)](0x14),'PERMISSIONS'[_0x314a09(0x20a)](0x14),_0x314a09(0x3f7)][_0x314a09(0x2e7)]('\x20\x20');console[_0x314a09(0x43f)]('\x0a'+_0x50ab19),console[_0x314a09(0x43f)]('-'[_0x314a09(0x36b)](_0x50ab19[_0x314a09(0x3f9)]));for(const _0x286987 of _0x41f33b){const _0x126015=_0x56c3d9?_0x286987['id']:_0x286987['id'][_0x314a09(0x41f)](0x0,0x8)+'…';console['log']([_0x126015[_0x314a09(0x20a)](_0x9ea33b),_0x286987[_0x314a09(0x279)][_0x314a09(0x41f)](0x0,0x10)['padEnd'](0x10),_0x286987['label'][_0x314a09(0x41f)](0x0,0x14)[_0x314a09(0x20a)](0x14),_0x286987['permissions'][_0x314a09(0x41f)](0x0,0x14)[_0x314a09(0x20a)](0x14),_0x286987[_0x314a09(0x1c3)]]['join']('\x20\x20'));}console['log']('');}finally{await _0x5e1a03['close']();}}async function _0xafa5f9(_0xd52f68,_0x178c51){const _0xaf0f8b=_0x348b78;!_0xd52f68&&(console[_0xaf0f8b(0x29b)]('[okdb]\x20error:\x20revoke\x20requires\x20an\x20id\x20argument'),process[_0xaf0f8b(0x23b)](0x1));const _0x214d91=require$$5,_0x243a85=_0x2bd16a[_0xaf0f8b(0x413)](_0x178c51[_0xaf0f8b(0x23f)]),_0x7c9e6=new _0x214d91(_0x243a85,_0x178c51[_0xaf0f8b(0x353)]?{'encryptionKey':_0x178c51['key']}:{});await _0x7c9e6[_0xaf0f8b(0x348)]();try{const _0x2989fc=_0x7c9e6['_systemEnv'];(!_0x2989fc||!_0x2989fc['hasType'](_0xaf0f8b(0x1b1)))&&(console['error'](_0xaf0f8b(0x2dd)+_0xd52f68+'\x22'),process['exit'](0x1));let _0x27443f=null,_0x402c0e=null;const _0x1d4ef6=_0x2989fc[_0xaf0f8b(0x479)](_0xaf0f8b(0x1b1),_0xd52f68);if(_0x1d4ef6)_0x27443f=_0xd52f68,_0x402c0e=_0x1d4ef6;else{const _0x530b6c=[];for(const {key:_0x4f1969,value:_0x12be61}of _0x2989fc[_0xaf0f8b(0x3be)](_0xaf0f8b(0x1b1))){if(_0x4f1969[_0xaf0f8b(0x3a8)](_0xd52f68))_0x530b6c[_0xaf0f8b(0x46d)]({'key':_0x4f1969,'value':_0x12be61});}_0x530b6c['length']===0x0&&(console[_0xaf0f8b(0x29b)]('[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22'+_0xd52f68+'\x22'),process[_0xaf0f8b(0x23b)](0x1));if(_0x530b6c[_0xaf0f8b(0x3f9)]>0x1){console['error'](_0xaf0f8b(0x40f)+_0xd52f68+_0xaf0f8b(0x203)+_0x530b6c[_0xaf0f8b(0x3f9)]+_0xaf0f8b(0x391));for(const _0x1b8a9b of _0x530b6c){console[_0xaf0f8b(0x29b)]('\x20\x20'+_0x1b8a9b['key']+_0xaf0f8b(0x360)+(_0x1b8a9b['value'][_0xaf0f8b(0x279)]||_0xaf0f8b(0x374))+')');}process[_0xaf0f8b(0x23b)](0x1);}_0x27443f=_0x530b6c[0x0]['key'],_0x402c0e=_0x530b6c[0x0][_0xaf0f8b(0x2ff)];}await _0x2989fc['remove'](_0xaf0f8b(0x1b1),_0x27443f),console[_0xaf0f8b(0x43f)](_0xaf0f8b(0x2a0)+_0x27443f+_0xaf0f8b(0x360)+(_0x402c0e[_0xaf0f8b(0x279)]||'(unset)')+_0xaf0f8b(0x1a8)+(_0x402c0e['label']||'(unset)')+')');}finally{await _0x7c9e6[_0xaf0f8b(0x1fa)]();}}function _0xa870c3(_0x526608,_0x1ccc80){const _0x4a38e9=_0x348b78;if(!_0x526608[_0x4a38e9(0x211)])return _0x4a38e9(0x1e0);const _0x2d7069=_0x526608[_0x4a38e9(0x427)];if(!_0x2d7069)return _0x4a38e9(0x294);if(_0x1ccc80>_0x2d7069)return _0x4a38e9(0x2dc);return _0x4a38e9(0x294);}function _0x488b97(_0x27e8a3){const _0x3a7b4e=_0x348b78;if(!_0x27e8a3||typeof _0x27e8a3!==_0x3a7b4e(0x3da))return'';const _0x4e0c77=Object['entries'](_0x27e8a3)[_0x3a7b4e(0x27f)](([,_0x118f85])=>_0x118f85)[_0x3a7b4e(0x312)](([_0x479514])=>_0x479514);if(_0x4e0c77[_0x3a7b4e(0x3f9)]===0x0)return _0x3a7b4e(0x19c);if(_0x4e0c77['length']<=0x3)return _0x4e0c77[_0x3a7b4e(0x2e7)]('\x20');return _0x4e0c77[_0x3a7b4e(0x41f)](0x0,0x3)[_0x3a7b4e(0x2e7)]('\x20')+('\x20+'+(_0x4e0c77[_0x3a7b4e(0x3f9)]-0x3));}async function _0x1650ef(_0x410263){const _0x5a55b7=_0x348b78,_0x594b73=require$$5,_0x48f8ec=requireOkdbLicenseCodec(),{_C:_0x56babb}=requireOkdbLicense(),_0x370813=_0x2bd16a['resolve'](_0x410263[_0x5a55b7(0x23f)]),_0x40ea4b=new _0x594b73(_0x370813,_0x410263['key']?{'encryptionKey':_0x410263[_0x5a55b7(0x353)]}:{});await _0x40ea4b[_0x5a55b7(0x348)]();try{const _0xb9649a=_0x40ea4b[_0x5a55b7(0x26f)],_0x27318e=_0xb9649a?.['db']?.[_0x5a55b7(0x479)]?.(_0x5a55b7(0x2bf))??0x0,_0x142167=[..._0x40ea4b[_0x5a55b7(0x290)][_0x5a55b7(0x1bd)]()][_0x5a55b7(0x27f)](_0x43dccd=>!_0x43dccd[_0x5a55b7(0x3a8)]('~'))[_0x5a55b7(0x3f9)],_0x1024e8=_0x40ea4b['_license']?.[_0x5a55b7(0x1ae)];if(_0x1024e8){const _0x34edb9=_0x1024e8[_0x5a55b7(0x223)]===!![],_0x5a81e4=_0x34edb9?_0x5a55b7(0x334):_0x40ea4b[_0x5a55b7(0x1d6)]['active']?.[_0x5a55b7(0x3f4)]||_0x5a55b7(0x2e1);console['log'](''),console[_0x5a55b7(0x43f)](_0x5a55b7(0x3cd)+_0x5a81e4);const _0x35b19d=_0x1024e8[_0x5a55b7(0x382)]||{};if(_0x35b19d[_0x5a55b7(0x2ee)]){const _0x4d2457=Math['round'](_0x27318e/_0x35b19d['maxWrites']*0x64);console[_0x5a55b7(0x43f)](_0x5a55b7(0x287)+_0x27318e[_0x5a55b7(0x418)]()+'\x20/\x20'+_0x35b19d[_0x5a55b7(0x2ee)]['toLocaleString']()+_0x5a55b7(0x2df)+_0x4d2457+'%)');}else console[_0x5a55b7(0x43f)]('\x20\x20Writes:\x20\x20'+_0x27318e[_0x5a55b7(0x418)]());_0x35b19d[_0x5a55b7(0x42c)]?console[_0x5a55b7(0x43f)]('\x20\x20Envs:\x20\x20\x20\x20'+_0x142167+_0x5a55b7(0x317)+_0x35b19d[_0x5a55b7(0x42c)]):console[_0x5a55b7(0x43f)]('\x20\x20Envs:\x20\x20\x20\x20'+_0x142167),_0x56babb?.[_0x5a55b7(0x1af)]&&console[_0x5a55b7(0x43f)]('\x20\x20Build:\x20\x20\x20key\x20fingerprint\x20'+_0x56babb['PUB_FINGERPRINT']+_0x5a55b7(0x2bc));}if(!_0xb9649a||!_0xb9649a[_0x5a55b7(0x41a)](_0x5a55b7(0x208))){console[_0x5a55b7(0x43f)](''),console[_0x5a55b7(0x43f)](_0x5a55b7(0x329)),console['log']('');return;}const _0x28f8f6=[],_0x65530b=Date[_0x5a55b7(0x3e0)](),_0x8edd2f=_0x40ea4b['id'],_0x251cb6=_0x5a55b7(0x429);for(const {key:_0x3ca53a,value:_0x3c8856}of _0xb9649a[_0x5a55b7(0x3be)](_0x5a55b7(0x208))){const _0x51f689=_0x3c8856[_0x5a55b7(0x21a)]?Buffer[_0x5a55b7(0x363)](_0x3c8856['_licenseHash'],_0x5a55b7(0x3e6)):Buffer['alloc'](0x8);let _0x1a1004='';try{_0x1a1004=_0x48f8ec[_0x5a55b7(0x2e9)](_0x8edd2f,_0x51f689,_0x251cb6)[_0x5a55b7(0x276)];}catch{}_0x28f8f6[_0x5a55b7(0x46d)]({'id':_0x3ca53a,'licensee':_0x3c8856[_0x5a55b7(0x3f4)]||'','expires':_0x3c8856['expiresAt']?new Date(_0x3c8856[_0x5a55b7(0x427)])['toISOString']()['slice'](0x0,0xa):'','features':_0x488b97(_0x3c8856[_0x5a55b7(0x3a2)]),'pin':_0x1a1004,'status':_0xa870c3(_0x3c8856,_0x65530b)});}if(_0x28f8f6[_0x5a55b7(0x3f9)]===0x0){console[_0x5a55b7(0x43f)](''),console[_0x5a55b7(0x43f)](_0x5a55b7(0x329)),console[_0x5a55b7(0x43f)]('');return;}const _0x4ca432=['\x20\x20'+'ID'[_0x5a55b7(0x20a)](0xe),_0x5a55b7(0x246)[_0x5a55b7(0x20a)](0xe),'EXPIRES'[_0x5a55b7(0x20a)](0xc),'FEATURES'['padEnd'](0x1e),'PIN'['padEnd'](0xa),_0x5a55b7(0x2c4)][_0x5a55b7(0x2e7)]('\x20');console[_0x5a55b7(0x43f)]('\x0a'+_0x4ca432);for(const _0x8a2085 of _0x28f8f6){const _0x2d7de3=_0x8a2085['id'][_0x5a55b7(0x41f)](0x0,0x8)+'…';console[_0x5a55b7(0x43f)](['\x20\x20'+_0x2d7de3[_0x5a55b7(0x20a)](0xe),_0x8a2085[_0x5a55b7(0x3f4)][_0x5a55b7(0x41f)](0x0,0xe)[_0x5a55b7(0x20a)](0xe),_0x8a2085[_0x5a55b7(0x23a)][_0x5a55b7(0x20a)](0xc),_0x8a2085[_0x5a55b7(0x3a2)][_0x5a55b7(0x41f)](0x0,0x1e)[_0x5a55b7(0x20a)](0x1e),_0x8a2085[_0x5a55b7(0x276)][_0x5a55b7(0x20a)](0xa),_0x8a2085[_0x5a55b7(0x41e)]][_0x5a55b7(0x2e7)]('\x20'));}console[_0x5a55b7(0x43f)]('');}finally{await _0x40ea4b['close']();}}async function _0x3c2e49(_0x4a3625,_0x1a2276){const _0x2b0dfb=_0x348b78,_0x395b68=require$$5,_0x5245bb=requireOkdbLicenseCodec();let _0x432837=_0x4a3625;(_0x5245bb[_0x2b0dfb(0x27c)](_0x4a3625)==='path'||_0x2655fc[_0x2b0dfb(0x3ef)](_0x4a3625)&&_0x2655fc['statSync'](_0x4a3625)['isFile']())&&(_0x432837=_0x2655fc[_0x2b0dfb(0x224)](_0x4a3625,_0x2b0dfb(0x42d))[_0x2b0dfb(0x1f8)]());const _0x4b4702=_0x2bd16a[_0x2b0dfb(0x413)](_0x1a2276[_0x2b0dfb(0x23f)]),_0x2339c3=new _0x395b68(_0x4b4702,_0x1a2276['key']?{'encryptionKey':_0x1a2276['key']}:{});await _0x2339c3[_0x2b0dfb(0x348)]();try{!_0x2339c3[_0x2b0dfb(0x1d6)]&&(console['error']('[okdb]\x20error:\x20license\x20management\x20is\x20only\x20available\x20in\x20licensed\x20builds\x20(npm\x20run\x20build:prod).'),process[_0x2b0dfb(0x23b)](0x1));let _0x278133;try{_0x278133=await _0x2339c3[_0x2b0dfb(0x1d6)]['addLicense'](_0x432837);}catch(_0x29e526){console[_0x2b0dfb(0x29b)](_0x2b0dfb(0x1e5)+_0x29e526[_0x2b0dfb(0x35a)]),process['exit'](0x1);}const _0xd6dc9b=_0x2339c3[_0x2b0dfb(0x1d6)]['getPins'](),_0x2f622f=_0xd6dc9b[_0x2b0dfb(0x30d)](_0x4412e2=>_0x4412e2[_0x2b0dfb(0x47b)]===_0x278133['id'])?.[_0x2b0dfb(0x276)]||'',_0x4de691=Object['entries'](_0x278133['features']||{})[_0x2b0dfb(0x27f)](([,_0x160271])=>_0x160271)[_0x2b0dfb(0x312)](([_0x4c3db1])=>_0x4c3db1),_0x3a927a=_0x278133[_0x2b0dfb(0x382)]||{},_0x2b60d9=[_0x3a927a['envs']?'envs='+_0x3a927a[_0x2b0dfb(0x42c)]:null,_0x3a927a[_0x2b0dfb(0x1fc)]?_0x2b0dfb(0x205)+_0x3a927a[_0x2b0dfb(0x1fc)]:null,_0x3a927a['syncPeers']?_0x2b0dfb(0x423)+_0x3a927a[_0x2b0dfb(0x1f2)]:null,_0x3a927a['maxWrites']?_0x2b0dfb(0x40e)+_0x3a927a[_0x2b0dfb(0x2ee)][_0x2b0dfb(0x418)]():null][_0x2b0dfb(0x27f)](Boolean)[_0x2b0dfb(0x2e7)]('\x20\x20'),_0x195f71=_0x278133[_0x2b0dfb(0x2f1)]===_0x5245bb[_0x2b0dfb(0x361)];console[_0x2b0dfb(0x43f)](_0x2b0dfb(0x3aa)),console[_0x2b0dfb(0x43f)]('\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x278133['id']),console[_0x2b0dfb(0x43f)]('\x20\x20\x20\x20licensee:\x20\x20'+_0x278133[_0x2b0dfb(0x3f4)]),console['log'](_0x2b0dfb(0x347)+new Date(_0x278133[_0x2b0dfb(0x427)])['toISOString']()['slice'](0x0,0xa)),console[_0x2b0dfb(0x43f)](_0x2b0dfb(0x3ce)+(_0x4de691[_0x2b0dfb(0x2e7)](',\x20')||_0x2b0dfb(0x19c)));if(_0x2b60d9)console[_0x2b0dfb(0x43f)](_0x2b0dfb(0x3d3)+_0x2b60d9);_0x195f71?(console[_0x2b0dfb(0x43f)](_0x2b0dfb(0x40c)),console[_0x2b0dfb(0x43f)]('')):(console[_0x2b0dfb(0x43f)](_0x2b0dfb(0x38b)+_0x2f622f),console[_0x2b0dfb(0x43f)](_0x2b0dfb(0x460)),console[_0x2b0dfb(0x43f)](''),console[_0x2b0dfb(0x43f)](_0x2b0dfb(0x431)),console[_0x2b0dfb(0x43f)]('\x20\x20\x20\x201.\x20Send\x20the\x20PIN\x20above\x20('+_0x2f622f+_0x2b0dfb(0x22f)),console[_0x2b0dfb(0x43f)](_0x2b0dfb(0x445)),console[_0x2b0dfb(0x43f)](_0x2b0dfb(0x3b9)),console[_0x2b0dfb(0x43f)](''));}finally{await _0x2339c3['close']();}}async function _0x394837(_0x54861a,_0x5b0b52){const _0x3c370f=_0x348b78,_0x46c7d8=require$$5,_0x338c2f=_0x2bd16a[_0x3c370f(0x413)](_0x5b0b52[_0x3c370f(0x23f)]),_0x4abc40=new _0x46c7d8(_0x338c2f,_0x5b0b52[_0x3c370f(0x353)]?{'encryptionKey':_0x5b0b52[_0x3c370f(0x353)]}:{});await _0x4abc40[_0x3c370f(0x348)]();try{!_0x4abc40[_0x3c370f(0x1d6)]&&(console[_0x3c370f(0x29b)](_0x3c370f(0x29a)),process['exit'](0x1));let _0x2b141c;try{_0x2b141c=await _0x4abc40[_0x3c370f(0x1d6)][_0x3c370f(0x327)](_0x54861a[_0x3c370f(0x1f8)]());}catch(_0x55859b){console[_0x3c370f(0x29b)]('[okdb]\x20error:\x20'+_0x55859b[_0x3c370f(0x35a)]),console[_0x3c370f(0x29b)](''),console[_0x3c370f(0x29b)]('\x20\x20Common\x20causes:'),console[_0x3c370f(0x29b)](_0x3c370f(0x2a6)),console[_0x3c370f(0x29b)](_0x3c370f(0x278)),console['error'](_0x3c370f(0x212)),console['error'](''),process[_0x3c370f(0x23b)](0x1);}console[_0x3c370f(0x43f)](_0x3c370f(0x3f5)),console[_0x3c370f(0x43f)]('\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x2b141c['id']),console[_0x3c370f(0x43f)](_0x3c370f(0x210)+_0x2b141c[_0x3c370f(0x3f4)]),console[_0x3c370f(0x43f)](_0x3c370f(0x347)+new Date(_0x2b141c[_0x3c370f(0x427)])['toISOString']()['slice'](0x0,0xa)),console['log'](_0x3c370f(0x426)),console[_0x3c370f(0x43f)]('');}finally{await _0x4abc40[_0x3c370f(0x1fa)]();}}async function _0xc85c9a(_0x44d03c,_0x4556f5){const _0x489aff=_0x348b78;!_0x44d03c&&(console[_0x489aff(0x29b)](_0x489aff(0x23d)),process[_0x489aff(0x23b)](0x1));const _0x5262b2=require$$5,_0x44e697=requireOkdbLicenseCodec(),_0x5f30e0=_0x2bd16a[_0x489aff(0x413)](_0x4556f5[_0x489aff(0x23f)]),_0x4ce200=new _0x5262b2(_0x5f30e0,_0x4556f5[_0x489aff(0x353)]?{'encryptionKey':_0x4556f5['key']}:{});await _0x4ce200[_0x489aff(0x348)]();try{const _0x748feb=_0x4ce200[_0x489aff(0x26f)];(!_0x748feb||!_0x748feb['hasType'](_0x489aff(0x208)))&&(console['error'](_0x489aff(0x3cb)+_0x44d03c+'\x22'),process[_0x489aff(0x23b)](0x1));let _0x32b0b6=null,_0x46aac1=null;const _0x5b8b8e=_0x748feb[_0x489aff(0x479)](_0x489aff(0x208),_0x44d03c);if(_0x5b8b8e)_0x32b0b6=_0x44d03c,_0x46aac1=_0x5b8b8e;else{const _0x1b2e4b=[];for(const {key:_0x15fea2,value:_0x65c142}of _0x748feb[_0x489aff(0x3be)]('~licenses')){if(_0x15fea2[_0x489aff(0x3a8)](_0x44d03c))_0x1b2e4b[_0x489aff(0x46d)]({'key':_0x15fea2,'value':_0x65c142});}_0x1b2e4b[_0x489aff(0x3f9)]===0x0&&(console[_0x489aff(0x29b)](_0x489aff(0x3cb)+_0x44d03c+'\x22'),process[_0x489aff(0x23b)](0x1)),_0x1b2e4b[_0x489aff(0x3f9)]>0x1&&(console[_0x489aff(0x29b)](_0x489aff(0x40f)+_0x44d03c+_0x489aff(0x203)+_0x1b2e4b[_0x489aff(0x3f9)]+'\x20licenses'),process[_0x489aff(0x23b)](0x1)),_0x32b0b6=_0x1b2e4b[0x0]['key'],_0x46aac1=_0x1b2e4b[0x0][_0x489aff(0x2ff)];}const _0x7a7a8d=Date[_0x489aff(0x3e0)](),_0x319785=_0xa870c3(_0x46aac1,_0x7a7a8d),_0x414d20=_0x4ce200['id'],_0x116609=_0x489aff(0x429);let _0x220f27='';try{const _0x281719=Buffer[_0x489aff(0x363)](_0x46aac1[_0x489aff(0x21a)],_0x489aff(0x3e6));_0x220f27=_0x44e697[_0x489aff(0x2e9)](_0x414d20,_0x281719,_0x116609)[_0x489aff(0x276)];}catch{}const _0x2e82fc=_0x46aac1[_0x489aff(0x3a2)]?Object['entries'](_0x46aac1['features'])[_0x489aff(0x27f)](([,_0x2d831d])=>_0x2d831d)[_0x489aff(0x312)](([_0x5d6d1f])=>_0x5d6d1f):[],_0x4ac498=_0x46aac1[_0x489aff(0x382)]||{},_0x505336=_0x748feb?.['db']?.[_0x489aff(0x479)]?.('__writeCounter')??0x0,_0x4d8c3d=[..._0x4ce200[_0x489aff(0x290)][_0x489aff(0x1bd)]()]['filter'](_0x1481d8=>!_0x1481d8[_0x489aff(0x3a8)]('~'))[_0x489aff(0x3f9)];console['log'](_0x489aff(0x240)),console[_0x489aff(0x43f)](_0x489aff(0x252)+_0x32b0b6),console['log']('\x20\x20\x20\x20licensee:\x20\x20'+(_0x46aac1['licensee']||'')),console[_0x489aff(0x43f)](_0x489aff(0x347)+(_0x46aac1[_0x489aff(0x427)]?new Date(_0x46aac1[_0x489aff(0x427)])[_0x489aff(0x236)]()['slice'](0x0,0xa):'')),console[_0x489aff(0x43f)](_0x489aff(0x3ce)+(_0x2e82fc[_0x489aff(0x2e7)](',\x20')||_0x489aff(0x19c))),console[_0x489aff(0x43f)]('\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20'+_0x220f27),console[_0x489aff(0x43f)](_0x489aff(0x281)+_0x319785),console[_0x489aff(0x43f)](_0x489aff(0x3fc)+new Date(_0x46aac1[_0x489aff(0x38c)])['toISOString']());if(_0x319785===_0x489aff(0x294)){console[_0x489aff(0x43f)](''),console[_0x489aff(0x43f)]('\x20\x20Usage:');if(_0x4ac498[_0x489aff(0x2ee)]){const _0x588f23=Math[_0x489aff(0x439)](_0x505336/_0x4ac498[_0x489aff(0x2ee)]*0x64);console[_0x489aff(0x43f)](_0x489aff(0x37c)+_0x505336[_0x489aff(0x418)]()+_0x489aff(0x317)+_0x4ac498['maxWrites'][_0x489aff(0x418)]()+_0x489aff(0x2df)+_0x588f23+'%)');}else console[_0x489aff(0x43f)](_0x489aff(0x37c)+_0x505336[_0x489aff(0x418)]()+_0x489aff(0x36f));_0x4ac498[_0x489aff(0x42c)]?console['log'](_0x489aff(0x292)+_0x4d8c3d+_0x489aff(0x317)+_0x4ac498[_0x489aff(0x42c)]):console[_0x489aff(0x43f)](_0x489aff(0x292)+_0x4d8c3d+_0x489aff(0x36f));}console['log']('');}finally{await _0x4ce200['close']();}}async function _0x5bfdb6(_0x999ec,_0x6cf623){const _0x82d02f=_0x348b78;!_0x999ec&&(console[_0x82d02f(0x29b)](_0x82d02f(0x3d8)),process[_0x82d02f(0x23b)](0x1));const _0x2d9df6=require$$5,_0x4c67fb=_0x2bd16a[_0x82d02f(0x413)](_0x6cf623['dbPath']),_0x1bc7ff=new _0x2d9df6(_0x4c67fb,_0x6cf623[_0x82d02f(0x353)]?{'encryptionKey':_0x6cf623[_0x82d02f(0x353)]}:{});await _0x1bc7ff['open']();try{const _0x32a0d9=_0x1bc7ff[_0x82d02f(0x26f)];(!_0x32a0d9||!_0x32a0d9[_0x82d02f(0x41a)](_0x82d02f(0x208)))&&(console[_0x82d02f(0x29b)](_0x82d02f(0x3cb)+_0x999ec+'\x22'),process[_0x82d02f(0x23b)](0x1));let _0x2ed8cc=null,_0x33ddd0=null;const _0xabb465=_0x32a0d9[_0x82d02f(0x479)](_0x82d02f(0x208),_0x999ec);if(_0xabb465)_0x2ed8cc=_0x999ec,_0x33ddd0=_0xabb465;else{const _0x638952=[];for(const {key:_0x452649,value:_0x491fd7}of _0x32a0d9['getRange'](_0x82d02f(0x208))){if(_0x452649[_0x82d02f(0x3a8)](_0x999ec))_0x638952[_0x82d02f(0x46d)]({'key':_0x452649,'value':_0x491fd7});}_0x638952[_0x82d02f(0x3f9)]===0x0&&(console[_0x82d02f(0x29b)]('[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22'+_0x999ec+'\x22'),process[_0x82d02f(0x23b)](0x1)),_0x638952['length']>0x1&&(console[_0x82d02f(0x29b)](_0x82d02f(0x40f)+_0x999ec+_0x82d02f(0x203)+_0x638952[_0x82d02f(0x3f9)]+'\x20licenses'),process[_0x82d02f(0x23b)](0x1)),_0x2ed8cc=_0x638952[0x0]['key'],_0x33ddd0=_0x638952[0x0][_0x82d02f(0x2ff)];}await _0x32a0d9['remove'](_0x82d02f(0x208),_0x2ed8cc),console[_0x82d02f(0x43f)](_0x82d02f(0x2a7)+_0x2ed8cc+_0x82d02f(0x32b)+(_0x33ddd0[_0x82d02f(0x3f4)]||_0x82d02f(0x374))+')');}finally{await _0x1bc7ff[_0x82d02f(0x1fa)]();}}async function _0x3642b3(_0x6d4ce2,_0x4211eb,_0x39aa4b){const _0x2a72ec=_0x348b78;!_0x6d4ce2&&(console['error'](_0x2a72ec(0x193)),process[_0x2a72ec(0x23b)](0x1));!_0x39aa4b[_0x2a72ec(0x2bd)]&&!(_0x39aa4b[_0x2a72ec(0x33f)]&&_0x39aa4b[_0x2a72ec(0x402)])&&(console[_0x2a72ec(0x29b)]('[okdb]\x20error:\x20join\x20requires\x20credentials.\x20Provide\x20--token\x20<t>\x20or\x20--username\x20<u>\x20--password\x20<p>'),process[_0x2a72ec(0x23b)](0x1));const _0x66f12b=_0x39aa4b[_0x2a72ec(0x377)]||_0x4211eb['sync']?.[_0x2a72ec(0x26e)];!_0x66f12b&&(console[_0x2a72ec(0x29b)]('[okdb]\x20error:\x20--address\x20is\x20required\x20for\x20join\x20(this\x20node\x27s\x20reachable\x20sync\x20address).\x0a'+'\x20\x20Example:\x20okdb\x20join\x20https://node-a.example.com\x20--token\x20<t>\x20--address\x20http://myhost:8484\x0a'+'\x20\x20Or\x20set\x20sync.address\x20in\x20.kdbconfig'),process[_0x2a72ec(0x23b)](0x1));const _0x10d465=require$$5,_0x49fd8b=new _0x10d465(_0x4211eb['dbPath'],{'sync':{'address':_0x66f12b,'auto_reconcile':![]}});await _0x49fd8b[_0x2a72ec(0x348)]();try{const _0x5bb227=_0x49fd8b[_0x2a72ec(0x26f)];if(_0x5bb227&&_0x5bb227[_0x2a72ec(0x41a)](_0x2a72ec(0x1b1))){let _0x1bb4ab=![];for(const _0x30936e of _0x5bb227[_0x2a72ec(0x3be)](_0x2a72ec(0x1b1))){_0x1bb4ab=!![];break;}_0x1bb4ab&&console['log'](_0x2a72ec(0x201)+'\x20\x20after\x20sync.\x20Duplicate\x20names\x20will\x20surface\x20as\x20ambiguous\x20logins\x20to\x20clean\x20up.');}console['log']('\x0a\x20\x20Joining\x20cluster\x20at\x20'+_0x6d4ce2+'…'),await _0x49fd8b[_0x2a72ec(0x2de)][_0x2a72ec(0x2e7)](_0x6d4ce2[_0x2a72ec(0x3c1)](/\/+$/,''),{'token':_0x39aa4b[_0x2a72ec(0x2bd)],'username':_0x39aa4b[_0x2a72ec(0x33f)],'password':_0x39aa4b[_0x2a72ec(0x402)]}),console[_0x2a72ec(0x43f)]('\x20\x20✓\x20joined\x20and\x20reconciliation\x20initiated'),console[_0x2a72ec(0x43f)](_0x2a72ec(0x2ef));}finally{await _0x49fd8b['close']();}}async function _0xf627d5(){const _0x331896=_0x348b78,_0x1a5991=Date[_0x331896(0x3e0)](),_0x54d427=_0x22c27d(process[_0x331896(0x1c7)]),_0x50e6f9=_0x4ff8a7(_0x54d427),_0xb72e3=_0x2bd16a[_0x331896(0x413)](_0x50e6f9[_0x331896(0x23f)]);!_0x50e6f9[_0x331896(0x381)]&&!process['stdin']['isTTY']&&(_0x50e6f9[_0x331896(0x381)]=!![]);const _0x16b945=require$$5,{start:_0x5e3694,colorLog:_0xc8386d}=requireOkdbShell(),_0x5824af={..._0x50e6f9[_0x331896(0x353)]?{'encryptionKey':_0x50e6f9[_0x331896(0x353)]}:{},..._0x50e6f9[_0x331896(0x2d2)]?{'admin':![]}:_0x972172(_0x50e6f9[_0x331896(0x226)])?{'admin':_0x50e6f9[_0x331896(0x226)]}:{},..._0x972172(_0x50e6f9[_0x331896(0x3f6)])?{'api':_0x50e6f9[_0x331896(0x3f6)]}:{},..._0x972172(_0x50e6f9[_0x331896(0x464)])?{'auth':_0x50e6f9['auth']}:{},..._0x972172(_0x50e6f9[_0x331896(0x243)])?{'mcp':_0x50e6f9[_0x331896(0x243)]}:{},..._0x50e6f9[_0x331896(0x2af)]!==![]?{'timeMachine':_0x50e6f9[_0x331896(0x2af)]}:{}},_0x1e5cc7=new _0x16b945(_0xb72e3,_0x5824af);_0x1e5cc7[_0x331896(0x43f)][_0x331896(0x405)]?.();const _0x11a74a=_0x1e5cc7[_0x331896(0x43f)][_0x331896(0x28e)](_0xbe91c7=>_0xc8386d(_0xbe91c7,_0x50e6f9[_0x331896(0x397)]));if(_0x50e6f9['noRepl'])process[_0x331896(0x3ae)][_0x331896(0x284)]('[okdb]\x20starting…\x0a');await _0x1e5cc7[_0x331896(0x348)]();if(_0x50e6f9[_0x331896(0x381)])process[_0x331896(0x3ae)][_0x331896(0x284)]('\x20\x20✓\x20database\x20opened\x0a');try{await _0x2a2ed1(_0x1e5cc7,_0x50e6f9['port']);}catch(_0x5969ec){_0x5969ec['code']===_0x331896(0x2ba)&&(console[_0x331896(0x29b)]('[okdb]\x20port\x20'+_0x50e6f9['port']+_0x331896(0x2ab)),process[_0x331896(0x23b)](0x1));throw _0x5969ec;}if(_0x50e6f9[_0x331896(0x381)])process[_0x331896(0x3ae)][_0x331896(0x284)](_0x331896(0x39d)+_0x50e6f9[_0x331896(0x3c2)]+'\x0a');if(!_0x50e6f9['noRepl'])_0x1e5cc7[_0x331896(0x43f)][_0x331896(0x405)]?.(),_0x11a74a?.(),_0x1f9562(_0x1e5cc7[_0x331896(0x464)]?.[_0x331896(0x2b2)]?.()??[]),await _0x5e3694(_0x1e5cc7,_0x50e6f9);else{const _0x415184=_0x2bd16a[_0x331896(0x2e7)](_0xb72e3,_0x331896(0x399));try{_0x2655fc[_0x331896(0x3b8)](_0x415184,String(process[_0x331896(0x272)]));}catch{}const _0x17a04a=Date[_0x331896(0x3e0)]()-_0x1a5991;console[_0x331896(0x43f)](''),console['log'](_0x331896(0x3d7)),console['log']('\x20\x20\x20\x20port:\x20\x20'+_0x50e6f9[_0x331896(0x3c2)]),console[_0x331896(0x43f)]('\x20\x20\x20\x20path:\x20\x20'+_0xb72e3),console[_0x331896(0x43f)](_0x331896(0x3e7)+_0x1e5cc7['id']);{const _0x251eb3=_0x1e5cc7['_systemEnv']?.['db']?.[_0x331896(0x479)]?.(_0x331896(0x2bf))??0x0,_0x486ce2=[..._0x1e5cc7[_0x331896(0x290)][_0x331896(0x1bd)]()]['filter'](_0x19fdef=>!_0x19fdef[_0x331896(0x3a8)]('~'))[_0x331896(0x3f9)];if(_0x1e5cc7[_0x331896(0x1d6)]?.[_0x331896(0x294)]?.[_0x331896(0x2f1)]===0x1){const _0x3145e0=Math['ceil']((_0x1e5cc7['_license'][_0x331896(0x294)]['expiresAt']-Date[_0x331896(0x3e0)]())/0x5265c00);console[_0x331896(0x43f)](_0x331896(0x3bf)+_0x1e5cc7[_0x331896(0x1d6)]['active'][_0x331896(0x3f4)]+_0x331896(0x3f0)+_0x3145e0+'\x20days\x20—\x20POC/demo\x20only,\x20not\x20node-bound)');}else{if(_0x1e5cc7[_0x331896(0x1d6)]?.[_0x331896(0x294)]){const _0x1f9470=_0x1e5cc7[_0x331896(0x1d6)]['active'];console[_0x331896(0x43f)](_0x331896(0x3ab)+_0x1f9470[_0x331896(0x3f4)]+'\x20(expires\x20'+new Date(_0x1f9470[_0x331896(0x427)])['toISOString']()['slice'](0x0,0xa)+')');const _0x4ef8cc=_0x1f9470[_0x331896(0x382)]||{};if(_0x4ef8cc[_0x331896(0x2ee)]){const _0x490d91=Math[_0x331896(0x439)](_0x251eb3/_0x4ef8cc[_0x331896(0x2ee)]*0x64);console[_0x331896(0x43f)](_0x331896(0x3a7)+_0x251eb3[_0x331896(0x418)]()+_0x331896(0x317)+_0x4ef8cc[_0x331896(0x2ee)]['toLocaleString']()+_0x331896(0x343)+_0x490d91+_0x331896(0x3a4)+_0x486ce2+(_0x4ef8cc['envs']?'/'+_0x4ef8cc[_0x331896(0x42c)]:'')+_0x331896(0x2ea)+(_0x486ce2===0x1?'':'s'));}}else{if(_0x1e5cc7['_license']){const _0x30a17d=_0x1e5cc7[_0x331896(0x1d6)]['getPins'](),_0x1da73f=_0x30a17d[_0x331896(0x3f9)]?_0x30a17d['map'](_0x2c5b2f=>_0x2c5b2f[_0x331896(0x276)])['join'](',\x20'):_0x331896(0x1c9),_0x369c2d=_0x1e5cc7[_0x331896(0x1d6)]['effective'],_0x2a53af=_0x369c2d['limits'][_0x331896(0x2ee)]?Math['round'](_0x251eb3/_0x369c2d[_0x331896(0x382)][_0x331896(0x2ee)]*0x64):0x0;console['log'](_0x331896(0x325)),console[_0x331896(0x43f)]('\x20\x20\x20\x20usage:\x20\x20\x20'+_0x251eb3[_0x331896(0x418)]()+'\x20/\x20'+_0x369c2d['limits'][_0x331896(0x2ee)][_0x331896(0x418)]()+_0x331896(0x343)+_0x2a53af+_0x331896(0x3a4)+_0x486ce2+_0x331896(0x317)+_0x369c2d[_0x331896(0x382)][_0x331896(0x42c)]+'\x20envs'),console[_0x331896(0x43f)](_0x331896(0x471)+_0x1da73f);}}}}console[_0x331896(0x43f)](_0x331896(0x387)+_0x50e6f9[_0x331896(0x3c2)]+'/api');!_0x50e6f9[_0x331896(0x2d2)]&&console['log']('\x20\x20\x20\x20admin:\x20http://localhost:'+_0x50e6f9[_0x331896(0x3c2)]+_0x331896(0x2f9));console[_0x331896(0x43f)](''),console[_0x331896(0x43f)](_0x331896(0x305)+_0x17a04a+'ms'),_0x1f9562(_0x1e5cc7[_0x331896(0x464)]?.[_0x331896(0x2b2)]?.()??[]);async function _0x3eb20c(){const _0x3863c0=_0x331896;process[_0x3863c0(0x3ae)][_0x3863c0(0x284)](_0x3863c0(0x214));try{_0x2655fc[_0x3863c0(0x455)](_0x415184);}catch{}await _0x1e5cc7['close'](),process[_0x3863c0(0x23b)](0x0);}process['on'](_0x331896(0x3df),_0x3eb20c),process['on'](_0x331896(0x3d9),_0x3eb20c);}}const _0x45cf7e=new Set([_0x348b78(0x27d),_0x348b78(0x28f),_0x348b78(0x1d8),'backup',_0x348b78(0x477),'import',_0x348b78(0x2a1),_0x348b78(0x2bd),_0x348b78(0x2e7),'license']),_0x4a6319=process[_0x348b78(0x1c7)][0x2];if(_0x4a6319===_0x348b78(0x27d))console[_0x348b78(0x43f)](require$$2[_0x348b78(0x27d)]),process[_0x348b78(0x23b)](0x0);else{if(_0x4a6319&&_0x45cf7e[_0x348b78(0x1ad)](_0x4a6319)){const _0x2b384e=process[_0x348b78(0x1c7)]['slice'](0x3),_0x47a5ac=_0x22c27d(['node','okdb',..._0x2b384e]),_0x2abd88=_0x4ff8a7(_0x47a5ac),_0x2cba87=new Set([_0x348b78(0x206),'-d','--key','-k',_0x348b78(0x2f0),'-c','--port','-p',_0x348b78(0x451),_0x348b78(0x47e),'-e',_0x348b78(0x38e),'--name','--password',_0x348b78(0x1f3),_0x348b78(0x3a1),'--grants',_0x348b78(0x1c8),_0x348b78(0x1bf),_0x348b78(0x216),'-u',_0x348b78(0x411)]);let _0x44b179=null;for(let _0x3f5c8c=0x0;_0x3f5c8c<_0x2b384e['length'];_0x3f5c8c++){if(_0x2cba87['has'](_0x2b384e[_0x3f5c8c])){_0x3f5c8c++;continue;}if(!_0x2b384e[_0x3f5c8c][_0x348b78(0x3a8)]('-')){_0x44b179=_0x2b384e[_0x3f5c8c];break;}}(async()=>{const _0x3adf3e=_0x348b78;if(_0x4a6319===_0x3adf3e(0x2bd)){const _0x17c82d=process['argv'][0x3],_0xb87c49=process[_0x3adf3e(0x1c7)][_0x3adf3e(0x41f)](0x4),_0xd6b872=_0x22c27d([_0x3adf3e(0x34d),_0x3adf3e(0x401),..._0xb87c49]),_0x18de1a=_0x4ff8a7(_0xd6b872),_0x1e2570=new Set([_0x3adf3e(0x206),'-d',_0x3adf3e(0x267),'-k',_0x3adf3e(0x2f0),'-c',_0x3adf3e(0x2aa),'-p',_0x3adf3e(0x285),_0x3adf3e(0x1eb),'--label',_0x3adf3e(0x3a1),_0x3adf3e(0x30f),'--ttl',_0x3adf3e(0x451),_0x3adf3e(0x47e),'-e',_0x3adf3e(0x38e)]),_0x430619=[];for(let _0xfd8d54=0x0;_0xfd8d54<_0xb87c49[_0x3adf3e(0x3f9)];_0xfd8d54++){if(_0x1e2570[_0x3adf3e(0x1ad)](_0xb87c49[_0xfd8d54])){_0xfd8d54++;continue;}if(_0xb87c49[_0xfd8d54][_0x3adf3e(0x3a8)]('-'))continue;_0x430619[_0x3adf3e(0x46d)](_0xb87c49[_0xfd8d54]);}switch(_0x17c82d){case'create':await _0x4e53e1(_0x18de1a,_0xd6b872);break;case _0x3adf3e(0x1ea):await _0x51135d(_0x18de1a);break;case _0x3adf3e(0x302):await _0xafa5f9(_0x430619[0x0],_0x18de1a);break;default:console[_0x3adf3e(0x29b)]('[okdb]\x20unknown\x20token\x20action:\x20\x22'+_0x17c82d+_0x3adf3e(0x2b4)),process[_0x3adf3e(0x23b)](0x1);}return;}if(_0x4a6319===_0x3adf3e(0x254)){const _0x3f402e=requireOkdbLicenseCodec(),_0x3e7a51=process['argv'][_0x3adf3e(0x41f)](0x3),_0xafbfb4=_0x22c27d(['node',_0x3adf3e(0x401),..._0x3e7a51]),_0x564dbc=_0x4ff8a7(_0xafbfb4),_0x10ab9b=new Set([_0x3adf3e(0x206),'-d',_0x3adf3e(0x267),'-k',_0x3adf3e(0x2f0),'-c',_0x3adf3e(0x2aa),'-p',_0x3adf3e(0x451)]),_0x48dd08=[];for(let _0x5cc19c=0x0;_0x5cc19c<_0x3e7a51['length'];_0x5cc19c++){if(_0x10ab9b['has'](_0x3e7a51[_0x5cc19c])){_0x5cc19c++;continue;}if(_0x3e7a51[_0x5cc19c]['startsWith']('-'))continue;_0x48dd08[_0x3adf3e(0x46d)](_0x3e7a51[_0x5cc19c]);}const _0x2a2a43=_0x48dd08[0x0]??null;if(_0x2a2a43===_0x3adf3e(0x37e))await _0x5bfdb6(_0x48dd08[0x1],_0x564dbc);else{if(!_0x2a2a43)await _0x1650ef(_0x564dbc);else{let _0x3805b7=_0x3f402e['detectInputType'](_0x2a2a43);if(_0x3805b7===_0x3adf3e(0x3dc)&&_0x2655fc[_0x3adf3e(0x3ef)](_0x2a2a43))_0x3805b7=_0x3adf3e(0x1f1);if(_0x3805b7===_0x3adf3e(0x1f1))try{const _0x1b9f30=_0x2655fc['readFileSync'](_0x2a2a43,_0x3adf3e(0x42d))['trim'](),_0xbe0869=_0x3f402e['detectInputType'](_0x1b9f30);if(_0xbe0869===_0x3adf3e(0x211)){await _0x394837(_0x1b9f30,_0x564dbc);return;}await _0x3c2e49(_0x2a2a43,_0x564dbc);return;}catch(_0x21b032){console[_0x3adf3e(0x29b)]('[okdb]\x20error:\x20failed\x20to\x20read\x20'+_0x2a2a43+':\x20'+_0x21b032[_0x3adf3e(0x35a)]),process[_0x3adf3e(0x23b)](0x1);}switch(_0x3805b7){case _0x3adf3e(0x1bb):await _0x3c2e49(_0x2a2a43,_0x564dbc);break;case _0x3adf3e(0x211):await _0x394837(_0x2a2a43,_0x564dbc);break;case _0x3adf3e(0x194):await _0xc85c9a(_0x2a2a43,_0x564dbc);break;default:console[_0x3adf3e(0x29b)](_0x3adf3e(0x344)+_0x2a2a43+'\x22'),console[_0x3adf3e(0x29b)](''),console[_0x3adf3e(0x29b)]('\x20\x20Expected\x20one\x20of:'),console['error'](_0x3adf3e(0x1b9)),console[_0x3adf3e(0x29b)](_0x3adf3e(0x46a)),console[_0x3adf3e(0x29b)](_0x3adf3e(0x2f6)),console[_0x3adf3e(0x29b)](_0x3adf3e(0x441)),console[_0x3adf3e(0x29b)](''),console['error'](_0x3adf3e(0x3dd)),process[_0x3adf3e(0x23b)](0x1);}}}return;}switch(_0x4a6319){case _0x3adf3e(0x28f):await _0x30d6b7(_0x2abd88);break;case'init':await _0x38885d();break;case _0x3adf3e(0x2a1):await _0x52676b(_0x2abd88);break;case _0x3adf3e(0x392):await _0x383d3b(_0x44b179??_0x2bd16a['resolve']('./okdb-backup'),_0x2abd88);break;case _0x3adf3e(0x477):await _0x17efbd(_0x44b179??_0x2bd16a[_0x3adf3e(0x413)](_0x3adf3e(0x1a2)),_0x2abd88,_0x47a5ac);break;case _0x3adf3e(0x396):await _0x5e9711(_0x44b179??_0x2bd16a['resolve'](_0x3adf3e(0x1a2)),_0x2abd88,_0x47a5ac);break;case _0x3adf3e(0x2e7):await _0x3642b3(_0x44b179,_0x2abd88,_0x47a5ac);break;}})()['then'](()=>process[_0x348b78(0x23b)](0x0))['catch'](_0x1aeb64=>{const _0x51f2fb=_0x348b78;console[_0x51f2fb(0x29b)]('\x0a[okdb]\x20error:\x20'+(_0x1aeb64['message']||_0x1aeb64)+'\x0a'),process[_0x51f2fb(0x23b)](0x1);});}else _0xf627d5()[_0x348b78(0x1d1)](_0x5a7be6=>{const _0xd95394=_0x348b78;console['error'](_0xd95394(0x26d)),console[_0xd95394(0x29b)](_0x5a7be6[_0xd95394(0x232)]||_0x5a7be6),process['exit'](0x1);});}return okdb$1;}var okdbExports=requireOkdb(),okdb=getDefaultExportFromCjs(okdbExports);module[_0x5d02f6(0x310)]=okdb;