@kedem/okdb 1.1.1 → 1.1.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.
- package/bin/okdb.js +1 -1
- package/okdb.js +1 -1
- package/package.json +1 -1
- package/public/sections/views/parts/view-detail.ok.js +1 -1
package/bin/okdb.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
'use strict';const _0x60de39=_0x1936;(function(_0x9bc201,_0x2eb632){const _0x3bf68a=_0x1936,_0x10e08b=_0x9bc201();while(!![]){try{const _0x433fef=-parseInt(_0x3bf68a(0x19c))/0x1+parseInt(_0x3bf68a(0x361))/0x2*(-parseInt(_0x3bf68a(0x19a))/0x3)+-parseInt(_0x3bf68a(0x2cc))/0x4*(parseInt(_0x3bf68a(0x237))/0x5)+-parseInt(_0x3bf68a(0x291))/0x6*(-parseInt(_0x3bf68a(0x2c6))/0x7)+-parseInt(_0x3bf68a(0x409))/0x8+parseInt(_0x3bf68a(0x343))/0x9+parseInt(_0x3bf68a(0x1a2))/0xa;if(_0x433fef===_0x2eb632)break;else _0x10e08b['push'](_0x10e08b['shift']());}catch(_0x54a9c7){_0x10e08b['push'](_0x10e08b['shift']());}}}(_0x1224,0x36928));var require$$1$1=require(_0x60de39(0x33c)),require$$1=require('fs'),require$$3=require(_0x60de39(0x3d7)),require$$0$2=require('readline'),require$$5=require('../okdb'),require$$0=require('crypto'),require$$0$1=require('node:crypto'),require$$2$1=require('os'),require$$4=require('child_process');function getDefaultExportFromCjs(_0x134db4){const _0x32c245=_0x60de39;return _0x134db4&&_0x134db4['__esModule']&&Object['prototype'][_0x32c245(0x323)]['call'](_0x134db4,'default')?_0x134db4[_0x32c245(0x113)]:_0x134db4;}var okdb$1={},version=_0x60de39(0x3a4),require$$2={'version':version},okdbAuthTokens,hasRequiredOkdbAuthTokens;function requireOkdbAuthTokens(){if(hasRequiredOkdbAuthTokens)return okdbAuthTokens;hasRequiredOkdbAuthTokens=0x1;const _0x447a8d=require$$0;function _0x6dfbc5(_0x39f86a,_0x483e17){const _0x4e5ecb=_0x1936;return _0x447a8d[_0x4e5ecb(0x3d6)](_0x4e5ecb(0x298),_0x483e17)[_0x4e5ecb(0x138)](_0x39f86a)['digest']('base64url');}function _0xb63987(_0xf9774,_0x1aa04a){const _0x2be67d=_0x1936;if(typeof _0xf9774!=='string'||typeof _0x1aa04a!==_0x2be67d(0x27f))return![];if(Buffer['byteLength'](_0xf9774)!==Buffer['byteLength'](_0x1aa04a))return![];return _0x447a8d[_0x2be67d(0x321)](Buffer[_0x2be67d(0x1b4)](_0xf9774),Buffer[_0x2be67d(0x1b4)](_0x1aa04a));}function _0x5ed673(_0x3f8560){const _0xd84bb7=_0x1936;if(!_0x3f8560?.[_0xd84bb7(0x3d9)](_0xd84bb7(0x322)))return null;return _0x3f8560[_0xd84bb7(0x400)](0x7);}function _0x21fae4(_0x2239ae=0x20){const _0x18970b=_0x1936;return _0x447a8d[_0x18970b(0x270)](_0x2239ae)[_0x18970b(0x225)](_0x18970b(0x3ab));}function _0x137117(_0x2fcc66){const _0x24c4b7=_0x1936;return _0x447a8d[_0x24c4b7(0x1ea)](_0x24c4b7(0x298))[_0x24c4b7(0x138)](_0x2fcc66)['digest'](_0x24c4b7(0x30f));}function _0x19da44(_0x59e7e1,_0x2b8dea,_0x45c3a4=0x36ee80){const _0x57a2a6=_0x1936;if(!_0x2b8dea)throw new Error(_0x57a2a6(0x2bc));const _0x374a8a=Date[_0x57a2a6(0x38b)](),_0x3e97b3=Buffer[_0x57a2a6(0x1b4)](JSON[_0x57a2a6(0x1ed)]({'iat':_0x374a8a,'exp':_0x374a8a+_0x45c3a4,'sub':_0x59e7e1?.['id']??_0x59e7e1?.[_0x57a2a6(0x15a)]??null,'username':_0x59e7e1?.['username']??_0x59e7e1?.[_0x57a2a6(0x3df)]??null,'roles':Array['isArray'](_0x59e7e1?.[_0x57a2a6(0x2f2)])?_0x59e7e1['roles']:[]}))[_0x57a2a6(0x225)](_0x57a2a6(0x3ab)),_0x224c9a=_0x6dfbc5(_0x3e97b3,_0x2b8dea);return _0x3e97b3+'.'+_0x224c9a;}function _0xfd60d3(_0x16cafd,_0x11a6df){const _0x368afa=_0x1936;if(!_0x11a6df||typeof _0x16cafd!==_0x368afa(0x27f))return null;const [_0x59fa71,_0x3362e7]=_0x16cafd[_0x368afa(0x2ab)]('.');if(!_0x59fa71||!_0x3362e7)return null;const _0xd6cc8b=_0x6dfbc5(_0x59fa71,_0x11a6df);if(!_0xb63987(_0x3362e7,_0xd6cc8b))return null;try{const _0x3e28fc=JSON[_0x368afa(0x1ee)](Buffer[_0x368afa(0x1b4)](_0x59fa71,_0x368afa(0x3ab))['toString']()),_0x2b8fef=0x7530;if(Date[_0x368afa(0x38b)]()>Number(_0x3e28fc?.[_0x368afa(0x3e2)]??0x0)+_0x2b8fef)return null;return _0x3e28fc;}catch{return null;}}async function _0x31e4db(_0x3805fa){return new Promise((_0x3542fb,_0x1a248a)=>{const _0x45f810=_0x1936,_0x31a1ed=_0x447a8d[_0x45f810(0x270)](0x10);_0x447a8d[_0x45f810(0x1f9)](_0x3805fa,_0x31a1ed,0x40,(_0x55821f,_0x22d381)=>{const _0x571ec2=_0x45f810;if(_0x55821f)_0x1a248a(_0x55821f);_0x3542fb(_0x31a1ed['toString'](_0x571ec2(0x30f))+':'+_0x22d381[_0x571ec2(0x225)](_0x571ec2(0x30f)));});});}async function _0x569678(_0x673dba,_0x47a5e8){const _0x4ecf0d=_0x1936,[_0x36f4e3,_0x17de2f]=_0x47a5e8[_0x4ecf0d(0x2ab)](':');if(!_0x36f4e3||!_0x17de2f)return![];const _0x19b570=Buffer[_0x4ecf0d(0x1b4)](_0x36f4e3,_0x4ecf0d(0x30f));return new Promise((_0xea2901,_0x1f0e47)=>{_0x447a8d['scrypt'](_0x673dba,_0x19b570,0x40,(_0x1e7299,_0x1752cf)=>{const _0x2ab0d4=_0x1936;if(_0x1e7299)_0x1f0e47(_0x1e7299);_0xea2901(_0x447a8d[_0x2ab0d4(0x321)](_0x1752cf,Buffer[_0x2ab0d4(0x1b4)](_0x17de2f,_0x2ab0d4(0x30f))));});});}return okdbAuthTokens={'hmac':_0x6dfbc5,'timingSafeEqual':_0xb63987,'parseBearer':_0x5ed673,'randomToken':_0x21fae4,'hashToken':_0x137117,'issueToken':_0x19da44,'authenticateToken':_0xfd60d3,'hashPassword':_0x31e4db,'verifyPassword':_0x569678},okdbAuthTokens;}var okdbLicenseCodec,hasRequiredOkdbLicenseCodec;function requireOkdbLicenseCodec(){const _0x23c5cf=_0x60de39;if(hasRequiredOkdbLicenseCodec)return okdbLicenseCodec;hasRequiredOkdbLicenseCodec=0x1;const _0x4c16a2=require$$0$1,_0x39d3ee='0123456789ABCDEFGHJKMNPQRSTVWXYZ',_0x30f13a=new Uint8Array(0x100)[_0x23c5cf(0x402)](0xff);for(let _0x248050=0x0;_0x248050<_0x39d3ee['length'];_0x248050++){_0x30f13a[_0x39d3ee[_0x23c5cf(0x182)](_0x248050)]=_0x248050,_0x30f13a[_0x39d3ee[_0x23c5cf(0x182)](_0x248050)+0x20]=_0x248050;}_0x30f13a['O'[_0x23c5cf(0x182)](0x0)]=0x0,_0x30f13a['o'[_0x23c5cf(0x182)](0x0)]=0x0,_0x30f13a['I'['charCodeAt'](0x0)]=0x1,_0x30f13a['i'[_0x23c5cf(0x182)](0x0)]=0x1,_0x30f13a['L'[_0x23c5cf(0x182)](0x0)]=0x1,_0x30f13a['l'['charCodeAt'](0x0)]=0x1;function _0x418c0d(_0x118bc8){let _0x4a87ea=0x0,_0x1a1c88=0x0,_0x148a63='';for(let _0x1b6e0d=0x0;_0x1b6e0d<_0x118bc8['length'];_0x1b6e0d++){_0x1a1c88=_0x1a1c88<<0x8|_0x118bc8[_0x1b6e0d],_0x4a87ea+=0x8;while(_0x4a87ea>=0x5){_0x4a87ea-=0x5,_0x148a63+=_0x39d3ee[_0x1a1c88>>>_0x4a87ea&0x1f];}}return _0x4a87ea>0x0&&(_0x148a63+=_0x39d3ee[_0x1a1c88<<0x5-_0x4a87ea&0x1f]),_0x148a63;}function _0x7d5abb(_0x9cd845){const _0x582d87=_0x23c5cf;_0x9cd845=_0x9cd845['replace'](/-/g,'')[_0x582d87(0x22d)]();let _0x54d72b=0x0,_0x419df7=0x0;const _0x367103=[];for(let _0x16874f=0x0;_0x16874f<_0x9cd845[_0x582d87(0x3f0)];_0x16874f++){const _0x47ad3d=_0x30f13a[_0x9cd845[_0x582d87(0x182)](_0x16874f)];if(_0x47ad3d===0xff)continue;_0x419df7=_0x419df7<<0x5|_0x47ad3d,_0x54d72b+=0x5,_0x54d72b>=0x8&&(_0x54d72b-=0x8,_0x367103[_0x582d87(0x3fc)](_0x419df7>>>_0x54d72b&0xff));}return Buffer[_0x582d87(0x1b4)](_0x367103);}const _0x10a500=[_0x23c5cf(0x39a),_0x23c5cf(0x1ab),_0x23c5cf(0x285),_0x23c5cf(0x1c6),_0x23c5cf(0x247),_0x23c5cf(0x1eb),'mcp','files'],_0x42b426=0x0,_0xb32584=0x1,_0x420157=0x6*0x1e*0x18*0x3c*0x3c*0x3e8;function _0x44b02c({issuedAt:_0x132884,expiresAt:_0x1be9e7,licensee:licensee='',features:features={},limits:limits={},licenseType:licenseType=_0x42b426}){const _0x42b50e=_0x23c5cf,_0x56c5b7=Buffer[_0x42b50e(0x1b4)](licensee,_0x42b50e(0x3fb))[_0x42b50e(0x400)](0x0,0x40),_0x1e87f5=0x1+0x1+0x4+0x4+0x1+_0x56c5b7[_0x42b50e(0x3f0)]+0x2+0x10,_0x4122c9=Buffer['allocUnsafe'](_0x1e87f5);let _0x35fb81=0x0;_0x4122c9[_0x42b50e(0x347)](0x1,_0x35fb81++),_0x4122c9[_0x42b50e(0x347)](licenseType,_0x35fb81++),_0x4122c9[_0x42b50e(0x325)](Math[_0x42b50e(0x214)](_0x132884/0x3e8),_0x35fb81),_0x35fb81+=0x4,_0x4122c9[_0x42b50e(0x325)](Math['floor'](_0x1be9e7/0x3e8),_0x35fb81),_0x35fb81+=0x4,_0x4122c9[_0x42b50e(0x347)](_0x56c5b7[_0x42b50e(0x3f0)],_0x35fb81++),_0x56c5b7[_0x42b50e(0x2ca)](_0x4122c9,_0x35fb81),_0x35fb81+=_0x56c5b7[_0x42b50e(0x3f0)];let _0x61bbb0=0x0;for(let _0x4c0451=0x0;_0x4c0451<_0x10a500[_0x42b50e(0x3f0)];_0x4c0451++){if(features[_0x10a500[_0x4c0451]])_0x61bbb0|=0x1<<_0x4c0451;}_0x4122c9[_0x42b50e(0x17e)](_0x61bbb0,_0x35fb81),_0x35fb81+=0x2;const _0x2de73c=[_0x42b50e(0x3b1),_0x42b50e(0x381),_0x42b50e(0x385),'maxWrites'];for(const _0x40db6f of _0x2de73c){_0x4122c9[_0x42b50e(0x325)](limits[_0x40db6f]||0x0,_0x35fb81),_0x35fb81+=0x4;}return _0x4122c9;}function _0x59ceff(_0x4d2774){const _0x1e868f=_0x23c5cf;let _0x32a6ee=0x0;const _0x1ea7bb=_0x4d2774[_0x1e868f(0x3b6)](_0x32a6ee++),_0x215def=_0x4d2774[_0x1e868f(0x3b6)](_0x32a6ee++),_0xabdb36=_0x4d2774[_0x1e868f(0x3ba)](_0x32a6ee);_0x32a6ee+=0x4;const _0x10e46b=_0x4d2774[_0x1e868f(0x3ba)](_0x32a6ee);_0x32a6ee+=0x4;const _0x1f09ba=_0x4d2774[_0x1e868f(0x3b6)](_0x32a6ee++),_0x4500f5=_0x4d2774[_0x1e868f(0x400)](_0x32a6ee,_0x32a6ee+_0x1f09ba)[_0x1e868f(0x225)](_0x1e868f(0x3fb));_0x32a6ee+=_0x1f09ba;const _0x215816=_0x4d2774['readUInt16BE'](_0x32a6ee);_0x32a6ee+=0x2;const _0x151992={};for(let _0x480931=0x0;_0x480931<_0x10a500[_0x1e868f(0x3f0)];_0x480931++){_0x151992[_0x10a500[_0x480931]]=Boolean(_0x215816&0x1<<_0x480931);}const _0x10ecc0=[_0x1e868f(0x3b1),_0x1e868f(0x381),_0x1e868f(0x385),_0x1e868f(0x123)],_0x1285d6={};for(const _0x4ca5fe of _0x10ecc0){const _0x2a1782=_0x4d2774[_0x1e868f(0x3ba)](_0x32a6ee);_0x32a6ee+=0x4,_0x1285d6[_0x4ca5fe]=_0x2a1782===0x0?null:_0x2a1782;}return{'v':_0x1ea7bb,'licenseType':_0x215def,'issuedAt':_0xabdb36*0x3e8,'expiresAt':_0x10e46b*0x3e8,'licensee':_0x4500f5,'features':_0x151992,'limits':_0x1285d6};}function _0x48d83f(_0x11371f,_0xdc39c5){const _0x2fe3fe=_0x23c5cf,_0x304bec=Buffer[_0x2fe3fe(0x256)]([_0x11371f,_0xdc39c5]),_0x3f3c4c=_0x418c0d(_0x304bec),_0x2f4b54=[];for(let _0xbb432e=0x0;_0xbb432e<_0x3f3c4c[_0x2fe3fe(0x3f0)];_0xbb432e+=0x8){_0x2f4b54[_0x2fe3fe(0x3fc)](_0x3f3c4c['slice'](_0xbb432e,_0xbb432e+0x8));}return _0x2f4b54[_0x2fe3fe(0x2fe)]('-');}function _0x3904e2(_0x3c0638){const _0x372665=_0x23c5cf;if(typeof _0x3c0638!==_0x372665(0x27f))throw new Error('decodeLicenseBlob:\x20input\x20must\x20be\x20a\x20string');const _0x1ba655=_0x7d5abb(_0x3c0638[_0x372665(0x210)](/-/g,''));if(_0x1ba655['length']<0x41)throw new Error(_0x372665(0x231)+_0x1ba655[_0x372665(0x3f0)]+_0x372665(0x3fe));const _0x21bd86=_0x1ba655[_0x372665(0x400)](0x0,_0x1ba655['length']-0x40),_0x4367a2=_0x1ba655['slice'](_0x1ba655[_0x372665(0x3f0)]-0x40);let _0x592cdc;try{_0x592cdc=_0x59ceff(_0x21bd86);}catch(_0x2fd420){throw new Error(_0x372665(0x184)+_0x2fd420[_0x372665(0x213)]);}return{'rawBuf':_0x1ba655,'payload':_0x21bd86,'sig':_0x4367a2,'decoded':_0x592cdc};}function _0x87b92c(_0x2ea5be){const _0x295c76=_0x23c5cf;return _0x4c16a2[_0x295c76(0x1ea)]('sha256')[_0x295c76(0x138)](_0x2ea5be)[_0x295c76(0x1ec)]()[_0x295c76(0x400)](0x0,0x8);}function _0x58ab95(_0x30a267,_0x55ee23,_0x305cab){const _0x7826be=_0x23c5cf,_0x2c7205=_0x7826be(0x174)+_0x305cab,_0x14b0a9=Buffer[_0x7826be(0x256)]([Buffer[_0x7826be(0x1b4)](_0x30a267,_0x7826be(0x3fb)),_0x55ee23]),_0x522c53=_0x4c16a2[_0x7826be(0x3d6)]('sha256',_0x2c7205)['update'](_0x14b0a9)[_0x7826be(0x1ec)](),_0x1d246b=_0x418c0d(_0x522c53['slice'](0x0,0x5));return{'pin':_0x1d246b,'pinHmac':_0x522c53};}function _0xac0260(_0x1d5ff8,_0x3954c2,_0x33d784){const _0xa4f72a=_0x23c5cf,_0x23739b=Buffer[_0xa4f72a(0x189)](0x4d);let _0x4028b3=0x0;_0x23739b['writeUInt8'](0x1,_0x4028b3++),_0x1d5ff8['copy'](_0x23739b,_0x4028b3),_0x4028b3+=0x8,_0x23739b[_0xa4f72a(0x325)](_0x3954c2,_0x4028b3),_0x4028b3+=0x4,_0x33d784[_0xa4f72a(0x2ca)](_0x23739b,_0x4028b3);const _0x11c3aa=_0x418c0d(_0x23739b),_0x34b79b=[];for(let _0xa81c25=0x0;_0xa81c25<_0x11c3aa[_0xa4f72a(0x3f0)];_0xa81c25+=0x6){_0x34b79b[_0xa4f72a(0x3fc)](_0x11c3aa[_0xa4f72a(0x400)](_0xa81c25,_0xa81c25+0x6));}return _0x34b79b[_0xa4f72a(0x2fe)]('-');}function _0x3c81fc(_0x741994){const _0x416832=_0x23c5cf;if(typeof _0x741994!==_0x416832(0x27f))throw new Error(_0x416832(0x23c));const _0x5ec450=_0x7d5abb(_0x741994[_0x416832(0x210)](/-/g,''));if(_0x5ec450[_0x416832(0x3f0)]!==0x4d)throw new Error('decodeActivationToken:\x20expected\x2077\x20bytes,\x20got\x20'+_0x5ec450[_0x416832(0x3f0)]);let _0x390b12=0x0;const _0x2633c0=_0x5ec450['readUInt8'](_0x390b12++),_0x4420be=_0x5ec450[_0x416832(0x400)](_0x390b12,_0x390b12+0x8);_0x390b12+=0x8;const _0x169c25=_0x5ec450[_0x416832(0x3ba)](_0x390b12);_0x390b12+=0x4;const _0x1c2f21=_0x5ec450[_0x416832(0x400)](_0x390b12);return{'v':_0x2633c0,'licenseHash':_0x4420be,'expiry':_0x169c25,'sig':_0x1c2f21};}function _0x603360({tokenString:_0x1c61e0,nodeId:_0x5d75ba,rawBlobBuf:_0x58611d,pubKeyPem:_0x1a1b01,pubFingerprint:_0x23b4a8}){const _0x2b4dc1=_0x23c5cf;let _0x110b3f;try{_0x110b3f=_0x3c81fc(_0x1c61e0);}catch(_0x1b7867){return{'valid':![],'reason':_0x2b4dc1(0x3da)};}const _0x2faa50=_0x87b92c(_0x58611d);if(!_0x2faa50[_0x2b4dc1(0x287)](_0x110b3f[_0x2b4dc1(0x324)]))return{'valid':![],'reason':'LICENSE_HASH_MISMATCH'};const {pinHmac:_0x567874}=_0x58ab95(_0x5d75ba,_0x2faa50,_0x23b4a8),_0x489ee0=Buffer[_0x2b4dc1(0x189)](0x4);_0x489ee0[_0x2b4dc1(0x325)](_0x110b3f['expiry'],0x0);const _0x52c8be=Buffer[_0x2b4dc1(0x256)]([Buffer['from']([_0x110b3f['v']]),_0x567874[_0x2b4dc1(0x400)](0x0,0x5),_0x110b3f[_0x2b4dc1(0x324)],_0x489ee0]);try{const _0x10d6d8=_0x4c16a2['verify'](null,_0x52c8be,_0x1a1b01,_0x110b3f[_0x2b4dc1(0x373)]);if(!_0x10d6d8)return{'valid':![],'reason':'SIG_INVALID'};}catch(_0x3b83d5){return{'valid':![],'reason':'SIG_INVALID'};}if(_0x110b3f['expiry']<Date[_0x2b4dc1(0x38b)]()/0x3e8)return{'valid':![],'reason':_0x2b4dc1(0x11d)};return{'valid':!![],'reason':'ok'};}function _0x45f2e7(_0x5730c4){const _0x9caa95=_0x23c5cf;if(typeof _0x5730c4!==_0x9caa95(0x27f))return _0x9caa95(0x163);const _0xe0ef6f=_0x5730c4['trim']();if(_0xe0ef6f['startsWith']('/')||_0xe0ef6f['startsWith']('./')||_0xe0ef6f[_0x9caa95(0x3d9)](_0x9caa95(0x307))||/^[A-Za-z]:[\\/]/[_0x9caa95(0x26e)](_0xe0ef6f))return _0x9caa95(0x33c);if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i[_0x9caa95(0x26e)](_0xe0ef6f))return _0x9caa95(0x248);const _0x284da=_0xe0ef6f[_0x9caa95(0x210)](/[\s-]+/g,'')[_0x9caa95(0x3f0)];if(_0x284da===0x7c)return _0x9caa95(0x317);if(_0x284da>=0x95&&_0x284da<=0xfc)return _0x9caa95(0x1cf);return _0x9caa95(0x163);}return okdbLicenseCodec={'toBase32':_0x418c0d,'fromBase32':_0x7d5abb,'encodeLicensePayload':_0x44b02c,'decodeLicensePayload':_0x59ceff,'encodeLicenseBlob':_0x48d83f,'decodeLicenseBlob':_0x3904e2,'licenseHash':_0x87b92c,'derivePin':_0x58ab95,'encodeActivationToken':_0xac0260,'decodeActivationToken':_0x3c81fc,'verifyActivation':_0x603360,'detectInputType':_0x45f2e7,'FEATURE_NAMES':_0x10a500,'LICENSE_TYPE_STANDARD':_0x42b426,'LICENSE_TYPE_OPEN':_0xb32584,'OPEN_LICENSE_MAX_DURATION_MS':_0x420157},okdbLicenseCodec;}var okdbError,hasRequiredOkdbError;function requireOkdbError(){if(hasRequiredOkdbError)return okdbError;hasRequiredOkdbError=0x1;class _0x476f66 extends Error{constructor(_0x28b372,_0x15e92b,_0x50736b={}){const _0x55f62d=_0x1936;super(_0x28b372),this[_0x55f62d(0x3df)]=_0x55f62d(0x1f4),this[_0x55f62d(0x358)]=_0x15e92b,this[_0x55f62d(0x3af)]=_0x50736b,_0x50736b['cause']&&(this[_0x55f62d(0x2bf)]=_0x50736b[_0x55f62d(0x2bf)]),Error['captureStackTrace'](this,this[_0x55f62d(0x369)]);}}class _0x201413 extends _0x476f66{constructor(_0x271dde,_0x4e1bc8,_0x43bd68,_0x3c98a6){const _0x57c258=_0x1936;super('Version\x20mismatch\x20for\x20'+_0x271dde+'@'+_0x4e1bc8+':\x20expected\x20'+_0x43bd68+_0x57c258(0x392)+_0x3c98a6,_0x57c258(0x207),{'type':_0x271dde,'key':_0x4e1bc8,'expectedVersion':_0x43bd68,'actualVersion':_0x3c98a6}),this[_0x57c258(0x3df)]='OKDBVersionMismatchError';}}class _0x8af305 extends _0x476f66{constructor(_0x43eecf,_0x335de6){const _0x22f13b=_0x1936;super(_0x43eecf+'@'+_0x335de6+_0x22f13b(0x3fd),_0x22f13b(0x3e0),{'type':_0x43eecf,'key':_0x335de6}),this[_0x22f13b(0x3df)]=_0x22f13b(0x1a5);}}class _0x21b866 extends _0x476f66{constructor(_0x55e174,_0x181f3b){const _0x315cc5=_0x1936;super(_0x55e174+'@'+_0x181f3b+_0x315cc5(0x15d),_0x315cc5(0x3bf),{'type':_0x55e174,'key':_0x181f3b}),this['name']=_0x315cc5(0x1d7);}}class _0x2d306f extends _0x476f66{constructor(_0x47fbbc,_0x37ece2){const _0x45370b=_0x1936,_0x200610=typeof _0x37ece2;super(_0x45370b(0x134)+_0x47fbbc+_0x45370b(0x139)+_0x200610+_0x45370b(0x28f)+_0x37ece2,_0x45370b(0x159),{'index':_0x47fbbc,'key':_0x37ece2,'keyType':_0x200610}),this[_0x45370b(0x3df)]='OKDBInvalidIndexKeyError';}}class _0x1aebd6 extends _0x476f66{constructor(_0x5308ce){const _0x284902=_0x1936,_0x34ccec=typeof _0x5308ce;super(_0x284902(0x151)+_0x34ccec+_0x284902(0x367)+_0x5308ce,_0x284902(0x404),{'key':_0x5308ce,'keyType':_0x34ccec}),this['name']=_0x284902(0x37c);}}class _0x23bf59 extends _0x476f66{constructor(_0x1765f6){const _0x57a8dc=_0x1936;super(_0x57a8dc(0x2a3)+_0x1765f6+'\x27\x20doesn\x27t\x20exist',_0x57a8dc(0x13f),{'type':_0x1765f6}),this[_0x57a8dc(0x3df)]='OKDBTypeNotRegisteredError';}}class _0x4729f5 extends _0x476f66{constructor(_0x43ea72){const _0x4003f6=_0x1936;super(_0x4003f6(0x2a3)+_0x43ea72+'\x27\x20already\x20registered','TYPE_ALREADY_REGISTERED',{'type':_0x43ea72}),this['name']=_0x4003f6(0x2aa);}}class _0x119a99 extends _0x476f66{constructor(_0x33bf90,_0x13158e){const _0x37fb5f=_0x1936;super(_0x37fb5f(0x403)+_0x13158e+'\x27\x20on\x20type\x20\x27'+_0x33bf90+_0x37fb5f(0x1de),_0x37fb5f(0x160),{'type':_0x33bf90,'index':_0x13158e}),this['name']='OKDBIndexNotRegisteredError';}}class _0x7c701f extends _0x476f66{constructor(_0x364e38,_0x4c3913){const _0xf73f8a=_0x1936;super(_0xf73f8a(0x403)+_0x4c3913+_0xf73f8a(0x1cd)+_0x364e38+_0xf73f8a(0x1a7),_0xf73f8a(0x13c),{'type':_0x364e38,'index':_0x4c3913}),this['name']=_0xf73f8a(0x308);}}class _0x199396 extends _0x476f66{constructor(_0x2b3fd6,_0x29aeac={}){const _0x5fc345=_0x1936;super(_0x2b3fd6,'INVALID_VALUE',_0x29aeac),this[_0x5fc345(0x3df)]=_0x5fc345(0x1e6);}}class _0x4f6a62 extends _0x476f66{constructor(_0x5b4421,_0x2dea7e,_0x3d9db5,_0x125c93,_0x55420a){const _0x5524de=_0x1936;super(_0x5524de(0x2a5)+_0x5b4421+'@'+_0x2dea7e+':\x20key\x20['+_0x3d9db5+_0x5524de(0x3c8)+_0x125c93+_0x5524de(0x3c5)+_0x55420a+'\x27',_0x5524de(0x2d7),{'type':_0x5b4421,'index':_0x2dea7e,'indexKey':_0x3d9db5,'existingKey':_0x125c93,'conflictingKey':_0x55420a}),this['name']=_0x5524de(0x161);}}class _0x8755fe extends _0x476f66{constructor(_0x3aa6b1,_0x47961c,_0x2f5b31){const _0x2f10c8=_0x1936;super(_0x2f10c8(0x198)+_0x3aa6b1+'@'+_0x47961c,_0x2f10c8(0x2a4),{'type':_0x3aa6b1,'key':_0x47961c,'errors':_0x2f5b31}),this[_0x2f10c8(0x3df)]=_0x2f10c8(0x2c4),this[_0x2f10c8(0x154)]=_0x3aa6b1,this[_0x2f10c8(0x277)]=_0x47961c,this[_0x2f10c8(0x19d)]=_0x2f5b31;}}class _0x2db336 extends _0x476f66{constructor(_0xd680bc,_0x5d3abb){const _0x4f62c0=_0x1936;super(_0x4f62c0(0x1d1)+_0xd680bc+':\x20'+_0x5d3abb[_0x4f62c0(0x3f0)]+'\x20documents\x20fail\x20validation',_0x4f62c0(0x21e),{'type':_0xd680bc,'failures':_0x5d3abb}),this[_0x4f62c0(0x3df)]=_0x4f62c0(0x3aa),this[_0x4f62c0(0x154)]=_0xd680bc,this['failures']=_0x5d3abb;}}class _0x293023 extends _0x476f66{constructor(_0x173bae,_0x5bcf9e,_0x5319b2,_0x196877,_0x2b88b0){const _0x5e09ff=_0x1936;super(_0x5e09ff(0x14f)+_0x173bae+'@'+_0x5bcf9e+'.'+_0x5319b2+_0x5e09ff(0x275)+_0x196877+'@'+_0x2b88b0+'\x20which\x20does\x20not\x20exist',_0x5e09ff(0x1bb),{'sourceType':_0x173bae,'sourceKey':_0x5bcf9e,'fieldPath':_0x5319b2,'targetType':_0x196877,'targetKey':_0x2b88b0}),this[_0x5e09ff(0x3df)]=_0x5e09ff(0x348),this[_0x5e09ff(0x40c)]=_0x173bae,this[_0x5e09ff(0x28e)]=_0x5bcf9e,this[_0x5e09ff(0x311)]=_0x5319b2,this[_0x5e09ff(0x177)]=_0x196877,this[_0x5e09ff(0x175)]=_0x2b88b0;}}class _0x549f43 extends _0x476f66{constructor(_0x365fef,_0x5c4e3b,_0x35f398){const _0x355b46=_0x1936;super(_0x355b46(0x2d2)+_0x365fef+'@'+_0x5c4e3b+':\x20'+_0x35f398[_0x355b46(0x3f0)]+'\x20document(s)\x20reference\x20it\x20with\x20onDelete:restrict','FOREIGN_KEY_DELETE_RESTRICTED',{'targetType':_0x365fef,'targetKey':_0x5c4e3b,'references':_0x35f398}),this['name']=_0x355b46(0x3de),this['targetType']=_0x365fef,this['targetKey']=_0x5c4e3b,this[_0x355b46(0x11a)]=_0x35f398;}}class _0x23a7ee extends _0x476f66{constructor(_0x21440e,_0x2fb243,_0xe88ebd){const _0x3e4ee8=_0x1936;super(_0x3e4ee8(0x356)+_0x2fb243+_0x3e4ee8(0x40b)+_0x21440e+_0x3e4ee8(0x2e4)+_0xe88ebd[_0x3e4ee8(0x3a3)](_0x12e0e6=>_0x12e0e6[_0x3e4ee8(0x34a)]+':'+_0x12e0e6['name'])[_0x3e4ee8(0x2fe)](',\x20'),_0x3e4ee8(0x221),{'type':_0x21440e,'index':_0x2fb243,'usedBy':_0xe88ebd}),this[_0x3e4ee8(0x3df)]=_0x3e4ee8(0x1a1);}}return okdbError={'OKDBError':_0x476f66,'OKDBVersionMismatchError':_0x201413,'OKDBNotFoundError':_0x8af305,'OKDBAlreadyExistsError':_0x21b866,'OKDBInvalidIndexKeyError':_0x2d306f,'OKDBInvalidPrimaryKeyError':_0x1aebd6,'OKDBTypeNotRegisteredError':_0x23bf59,'OKDBTypeAlreadyRegisteredError':_0x4729f5,'OKDBIndexNotRegisteredError':_0x119a99,'OKDBIndexAlreadyRegisteredError':_0x7c701f,'OKDBInvalidValueError':_0x199396,'OKDBUniqueConstraintError':_0x4f6a62,'OKDBSchemaValidationError':_0x8755fe,'OKDBSchemaCollectionError':_0x2db336,'OKDBForeignKeyError':_0x293023,'OKDBForeignKeyDeleteError':_0x549f43,'OKDBIndexHasConsumersError':_0x23a7ee},okdbError;}var okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0xd52663=_0x60de39;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0xbf1302={'PUT':_0xd52663(0x3bd),'REMOVE':_0xd52663(0x391),'INDEX_DROP':_0xd52663(0x314),'INDEX_REGISTER':_0xd52663(0x257),'INDEX_RESET':_0xd52663(0x14d),'TYPE_REGISTER':_0xd52663(0x36f),'TYPE_DROP':'dropType','FTS_REGISTER':_0xd52663(0x1df),'FTS_DROP':_0xd52663(0x1e7),'FTS_RESET':_0xd52663(0x2fb),'SCHEMA_SET':_0xd52663(0x171),'SCHEMA_DROP':_0xd52663(0x284),'TTL_SET':_0xd52663(0x268),'TTL_CLEAR':'clearTtl'},_0x15908f={'SYSTEM_READY':_0xd52663(0x11b),'SYSTEM_STOPPED':_0xd52663(0x121),'SYSTEM_CLOCK_CHANGE':'system:clock_change','SYSTEM_POKE':_0xd52663(0x153),'SYSTEM_DRAIN':'system:drain','SYSTEM_BUS_STATE_CHANGE':_0xd52663(0x349),'ITEM_CREATE':_0xd52663(0x20e),'ITEM_UPDATE':_0xd52663(0x1d5),'ITEM_REMOVE':_0xd52663(0x3c1),'INDEX_RESET':'index:reset','INDEX_READY':_0xd52663(0x1fb),'INDEX_PROGRESS':'index:progress','INDEX_DROP':_0xd52663(0x2c9),'INDEX_REGISTERED':_0xd52663(0x32a),'FTS_REGISTERED':_0xd52663(0x22b),'FTS_DROP':'fts:drop','FTS_RESET':_0xd52663(0x2b6),'SCHEMA_SET':_0xd52663(0x29b),'SCHEMA_DROP':_0xd52663(0x2cd),'UNIQUE_VIOLATION':'unique:violation','UNIQUE_VIOLATION_RESOLVED':_0xd52663(0x386),'REF_VIOLATION':'ref:violation','REF_VIOLATION_RESOLVED':_0xd52663(0x34e),'SYNC_APPLY':_0xd52663(0x17d),'TXN_START':_0xd52663(0x1be),'TXN_END':'txn:end','TXN_ROLLBACK':'txn:rollback','TYPE_REGISTERED':_0xd52663(0x259),'TYPE_DROP':_0xd52663(0x2f1),'ENV_OPENED':'env:opened','ENV_REMOVED':_0xd52663(0x1ef),'TTL_EXPIRED':'ttl:expired','TTL_SET':'ttl:set','TTL_CLEAR':_0xd52663(0x396),'LICENSE_INVALID':_0xd52663(0x33b),'LICENSE_ADDED':'license:added','LICENSE_ACTIVATED':_0xd52663(0x3dd),'LICENSE_REMOVED':'license:removed'},_0x5cac6b={'CREATING':_0xd52663(0x118),'RESETTING':_0xd52663(0x39f),'READY':_0xd52663(0x2e0),'DROPPING':_0xd52663(0x278),'WAITING':'waiting'},_0x4b4fe0={'CREATED':_0xd52663(0x34b),'STARTING':_0xd52663(0x2a0),'STARTED':'started','STOPPING':'stopping','STOPPED':_0xd52663(0x310)},_0x475cfa={'CREATING':_0xd52663(0x118),'READY':_0xd52663(0x2e0),'HALTED':_0xd52663(0x1b2),'STOPPED':'stopped','RESETTING':_0xd52663(0x39f)},_0x58101a=Object[_0xd52663(0x370)]({'POKE':'bus:poke','DRAIN':'bus:drain'});return okdbEnums={'BUS_EVENTS':_0x58101a,'CHANGE_ACTIONS':_0xbf1302,'EVENTS':_0x15908f,'INDEX_STATE':_0x5cac6b,'OKDB_STATE':_0x4b4fe0,'VIEW_STATE':_0x475cfa},okdbEnums;}var okdbPubkey,hasRequiredOkdbPubkey;function _0x1936(_0x43cc85,_0x246b0d){_0x43cc85=_0x43cc85-0x113;const _0x1224e8=_0x1224();let _0x193666=_0x1224e8[_0x43cc85];return _0x193666;}function requireOkdbPubkey(){const _0x2150a2=_0x60de39;if(hasRequiredOkdbPubkey)return okdbPubkey;hasRequiredOkdbPubkey=0x1;const _0x5240e5=require$$1,_0x4f3394=require$$1$1,_0x221fb8=require$$0,_0x4bfe29=_0x5240e5[_0x2150a2(0x33f)](_0x4f3394[_0x2150a2(0x2fe)](__dirname,_0x2150a2(0x360)),_0x2150a2(0x3fb))[_0x2150a2(0x33a)](),_0x4502bb=_0x221fb8['createPublicKey'](_0x4bfe29)[_0x2150a2(0x316)]({'type':'spki','format':'der'}),_0x2da423=_0x221fb8[_0x2150a2(0x1ea)]('sha256')[_0x2150a2(0x138)](_0x4502bb)[_0x2150a2(0x1ec)](_0x2150a2(0x30f))['slice'](0x0,0x10);return okdbPubkey={'PUBLIC_KEY_PEM':_0x4bfe29,'PUB_FINGERPRINT':_0x2da423},okdbPubkey;}var okdbLicense,hasRequiredOkdbLicense;function requireOkdbLicense(){const _0x483118=_0x60de39;if(hasRequiredOkdbLicense)return okdbLicense;hasRequiredOkdbLicense=0x1;const _0xe661dd=require$$0,{OKDBError:_0x1d000d}=requireOkdbError(),{EVENTS:_0x32d443}=requireOkdbEnums(),_0x229bf7=requireOkdbLicenseCodec(),{LICENSE_TYPE_OPEN:_0x61d1c2,OPEN_LICENSE_MAX_DURATION_MS:_0x453a18}=_0x229bf7,_0x1329b1=requireOkdbPubkey(),_0x556bf0={'LICENSED_BUILD':_0x483118(0x17c),'PUBLIC_KEY_PEM':_0x1329b1[_0x483118(0x408)],'PUB_FINGERPRINT':_0x1329b1[_0x483118(0x2ae)],'LICENSE_EXPIRED_ACTION':_0x483118(0x22f)},_0x3383c8=_0x483118(0x263),_0x339e68={'features':{'sync':![],'embeddings':![],'engines':![],'fts':!![],'timeMachine':![],'views':!![],'mcp':!![],'files':!![]},'limits':{'envs':0x2,'typesPerEnv':0xa,'syncPeers':0x0,'maxWrites':0xf4240},'_isFree':!![]};async function _0x3d191e(_0x3f083c){const _0x5ada6e=_0x483118;!_0x3f083c[_0x5ada6e(0x3ef)](_0x3383c8)&&await _0x3f083c[_0x5ada6e(0x36f)](_0x3383c8);}class _0x53b607{constructor(_0x1b86e7){const _0x1aebab=_0x483118;this['okdb']=_0x1b86e7,this[_0x1aebab(0x2a2)]=null;}async[_0x483118(0x19f)](){const _0x388137=_0x483118,_0x19890b=this['okdb'][_0x388137(0x26c)];if(!_0x19890b||!_0x19890b[_0x388137(0x3ef)](_0x3383c8)){this[_0x388137(0x2a2)]=null;return;}const _0x516b48=this[_0x388137(0x2d4)]['id'];let _0x4a2230=null;for(const {key:_0x288312,value:_0x3b9b44}of _0x19890b['getRange'](_0x3383c8)){const _0x437f36=this[_0x388137(0x235)](_0x3b9b44,_0x516b48);_0x437f36===_0x388137(0x3db)&&!_0x4a2230&&(_0x4a2230={..._0x3b9b44,'id':_0x288312,'status':_0x437f36});}this['_active']=_0x4a2230;if(this[_0x388137(0x2a2)]&&this['_active'][_0x388137(0x24e)]===_0x61d1c2){const _0x4dac95=Math[_0x388137(0x155)]((this[_0x388137(0x2a2)][_0x388137(0x389)]-Date[_0x388137(0x38b)]())/0x5265c00);this['okdb'][_0x388137(0x22f)]?.[_0x388137(0x1b0)]('⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20'+_0x4dac95+_0x388137(0x1ac),{'feature':_0x388137(0x25c),'licensee':this[_0x388137(0x2a2)][_0x388137(0x3ce)],'expiresAt':new Date(this[_0x388137(0x2a2)]['expiresAt'])['toISOString']()});}}[_0x483118(0x235)](_0xf7a56e,_0x4962cd){const _0x282ff2=_0x483118;if(!_0xf7a56e[_0x282ff2(0x1cf)])return _0x282ff2(0x195);let _0x549655;try{_0x549655=_0x229bf7[_0x282ff2(0x250)](_0xf7a56e[_0x282ff2(0x1cf)]);}catch(_0x58689e){return _0x282ff2(0x195);}try{const _0x1b9b02=_0xe661dd[_0x282ff2(0x357)](null,_0x549655[_0x282ff2(0x3e3)],_0x556bf0['PUBLIC_KEY_PEM'],_0x549655[_0x282ff2(0x373)]);if(!_0x1b9b02)return'invalid';}catch(_0x45adcf){return _0x282ff2(0x195);}if(_0x549655['decoded'][_0x282ff2(0x389)]<=Date[_0x282ff2(0x38b)]())return'expired';if(_0x549655[_0x282ff2(0x3d4)]['licenseType']===_0x61d1c2)return _0x282ff2(0x3db);if(!_0xf7a56e['activation'])return _0x282ff2(0x2f8);const _0x422c42=_0x229bf7[_0x282ff2(0x162)]({'tokenString':_0xf7a56e['activation'],'nodeId':_0x4962cd,'rawBlobBuf':_0x549655[_0x282ff2(0x24c)],'pubKeyPem':_0x556bf0[_0x282ff2(0x408)],'pubFingerprint':_0x556bf0[_0x282ff2(0x2ae)]});if(_0x422c42[_0x282ff2(0x32e)]==='LICENSE_HASH_MISMATCH'||_0x422c42['reason']==='SIG_INVALID')return _0x282ff2(0x255);if(_0x422c42[_0x282ff2(0x32e)]===_0x282ff2(0x11d))return'expired';if(!_0x422c42['valid'])return'wrong_node';return _0x282ff2(0x3db);}get[_0x483118(0x3db)](){const _0x4ca417=_0x483118;return this[_0x4ca417(0x2a2)];}get['effective'](){return this['_active']??_0x339e68;}[_0x483118(0x23a)](_0x23915b){const _0x33fdd5=_0x483118;if(_0x556bf0[_0x33fdd5(0x2fa)]!=='true')return;const _0x160910=this[_0x33fdd5(0x32f)];if(!_0x160910[_0x33fdd5(0x2a9)]?.[_0x23915b]){const _0x51703e=_0x160910[_0x33fdd5(0x167)]?_0x33fdd5(0x32b)+_0x23915b+_0x33fdd5(0x1fa)+_0x23915b+_0x33fdd5(0x183):_0x33fdd5(0x1b6)+_0x23915b+_0x33fdd5(0x313)+_0x23915b+'\x22.';throw new _0x1d000d(_0x51703e,'LICENSE_FEATURE_DISABLED',{'feature':_0x23915b});}}[_0x483118(0x378)](_0x2e4f82){const _0x31c208=_0x483118;if(_0x556bf0[_0x31c208(0x2fa)]!==_0x31c208(0x17c))return!![];return!!this[_0x31c208(0x32f)][_0x31c208(0x2a9)]?.[_0x2e4f82];}[_0x483118(0x1f3)](_0x1db3d3,_0x2c5960){const _0x141fbd=_0x483118;if(_0x556bf0[_0x141fbd(0x2fa)]!=='true')return;const _0x1d6c1c=this[_0x141fbd(0x32f)],_0x31e620=_0x1d6c1c['limits']?.[_0x1db3d3];if(_0x31e620===null||_0x31e620===undefined||_0x31e620===0x0)return;if(_0x2c5960>=_0x31e620)throw new _0x1d000d('License\x20limit\x20exceeded:\x20'+_0x1db3d3+'\x20('+_0x2c5960+'/'+_0x31e620+')','LICENSE_LIMIT_EXCEEDED',{'limit':_0x1db3d3,'current':_0x2c5960,'max':_0x31e620});}async[_0x483118(0x2ff)](_0x5398b7){const _0x1f7686=_0x483118;let _0x115c52;try{_0x115c52=_0x229bf7[_0x1f7686(0x250)](_0x5398b7);}catch(_0x2ddcf2){throw new _0x1d000d(_0x1f7686(0x1f7)+_0x2ddcf2['message'],'LICENSE_INVALID');}let _0xe7e736;try{_0xe7e736=_0xe661dd[_0x1f7686(0x357)](null,_0x115c52[_0x1f7686(0x3e3)],_0x556bf0[_0x1f7686(0x408)],_0x115c52[_0x1f7686(0x373)]);}catch(_0x587d03){throw new _0x1d000d(_0x1f7686(0x2a7)+_0x587d03[_0x1f7686(0x213)],_0x1f7686(0x3dc));}if(!_0xe7e736)throw new _0x1d000d(_0x1f7686(0x215)+('Build\x20expects\x20public\x20key\x20fingerprint\x20'+_0x556bf0[_0x1f7686(0x2ae)]+'.\x20')+_0x1f7686(0x26a),_0x1f7686(0x3dc),{'expectedFingerprint':_0x556bf0['PUB_FINGERPRINT']});if(_0x115c52[_0x1f7686(0x3d4)][_0x1f7686(0x24e)]===_0x61d1c2){const _0x369f52=_0x115c52[_0x1f7686(0x3d4)][_0x1f7686(0x389)]-_0x115c52[_0x1f7686(0x3d4)][_0x1f7686(0x1e0)];if(_0x369f52>_0x453a18)throw new _0x1d000d(_0x1f7686(0x342)+Math['ceil'](_0x369f52/(0x1e*0x5265c00))+_0x1f7686(0x3d1),_0x1f7686(0x3dc));}const _0x551006=this[_0x1f7686(0x2d4)]['_systemEnv'];await _0x3d191e(_0x551006);const _0x58bb7c=_0x229bf7[_0x1f7686(0x324)](_0x115c52[_0x1f7686(0x24c)])[_0x1f7686(0x225)]('hex');for(const {value:_0xf9497d}of _0x551006[_0x1f7686(0x117)](_0x3383c8)){if(_0xf9497d[_0x1f7686(0x2ba)]===_0x58bb7c)throw new _0x1d000d(_0x1f7686(0x2fc),'LICENSE_INVALID');}const _0x425dba=_0xe661dd[_0x1f7686(0x1c1)](),_0x25b265={'blob':_0x5398b7,'activation':null,'addedAt':Date[_0x1f7686(0x38b)](),'_licenseHash':_0x58bb7c,'licensee':_0x115c52[_0x1f7686(0x3d4)][_0x1f7686(0x3ce)],'expiresAt':_0x115c52['decoded']['expiresAt'],'features':_0x115c52['decoded'][_0x1f7686(0x2a9)],'limits':_0x115c52['decoded'][_0x1f7686(0x35b)],'licenseType':_0x115c52[_0x1f7686(0x3d4)][_0x1f7686(0x24e)]};return await _0x551006[_0x1f7686(0x3bd)](_0x3383c8,_0x425dba,_0x25b265),{'id':_0x425dba,..._0x25b265};}async[_0x483118(0x2fd)](_0x15be0d){const _0x31becb=_0x483118;let _0x6d9a85;try{_0x6d9a85=_0x229bf7[_0x31becb(0x156)](_0x15be0d);}catch(_0x9c910a){throw new _0x1d000d(_0x31becb(0x1ae)+_0x9c910a[_0x31becb(0x213)],_0x31becb(0x133));}const _0x2c4c84=_0x6d9a85[_0x31becb(0x324)][_0x31becb(0x225)](_0x31becb(0x30f)),_0x37bb09=this[_0x31becb(0x2d4)][_0x31becb(0x26c)];if(!_0x37bb09||!_0x37bb09[_0x31becb(0x3ef)](_0x3383c8))throw new _0x1d000d(_0x31becb(0x219),_0x31becb(0x133));let _0x3319a6=null,_0x434fbc=null;for(const {key:_0x166636,value:_0x3eec8c}of _0x37bb09[_0x31becb(0x117)](_0x3383c8)){if(_0x3eec8c['_licenseHash']===_0x2c4c84){_0x3319a6=_0x166636,_0x434fbc=_0x3eec8c;break;}}if(!_0x3319a6)throw new _0x1d000d(_0x31becb(0x219),'LICENSE_ACTIVATION_INVALID');const {rawBuf:_0x58a9bd}=_0x229bf7[_0x31becb(0x250)](_0x434fbc[_0x31becb(0x1cf)]),_0x2fbec0=_0x229bf7[_0x31becb(0x162)]({'tokenString':_0x15be0d,'nodeId':this[_0x31becb(0x2d4)]['id'],'rawBlobBuf':_0x58a9bd,'pubKeyPem':_0x556bf0[_0x31becb(0x408)],'pubFingerprint':_0x556bf0[_0x31becb(0x2ae)]});if(!_0x2fbec0[_0x31becb(0x33e)])throw new _0x1d000d('Activation\x20invalid:\x20'+_0x2fbec0[_0x31becb(0x32e)],_0x31becb(0x133),{'reason':_0x2fbec0[_0x31becb(0x32e)]});const _0x299fe6={..._0x434fbc,'activation':_0x15be0d};return await _0x37bb09[_0x31becb(0x138)](_0x3383c8,_0x3319a6,_0x299fe6),{'id':_0x3319a6,..._0x299fe6};}async['removeLicense'](_0x3d62f9){const _0x213ed1=_0x483118,_0x4bfddf=this[_0x213ed1(0x2d4)][_0x213ed1(0x26c)];if(!_0x4bfddf||!_0x4bfddf[_0x213ed1(0x3ef)](_0x3383c8))return;await _0x4bfddf['remove'](_0x3383c8,_0x3d62f9);}async[_0x483118(0x1c3)](){const _0x456c33=_0x483118,_0xf68c8a=this[_0x456c33(0x2d4)][_0x456c33(0x26c)];if(!_0xf68c8a||!_0xf68c8a[_0x456c33(0x3ef)](_0x3383c8))return[];const _0x462488=this['okdb']['id'],_0x37383e=[];for(const {key:_0x271807,value:_0x1351d5}of _0xf68c8a['getRange'](_0x3383c8)){const _0x422abb=this[_0x456c33(0x235)](_0x1351d5,_0x462488);_0x37383e[_0x456c33(0x3fc)]({..._0x1351d5,'id':_0x271807,'status':_0x422abb});}return _0x37383e;}[_0x483118(0x200)](){const _0x2e0d18=_0x483118,_0x4ec805=this[_0x2e0d18(0x2d4)][_0x2e0d18(0x26c)];if(!_0x4ec805||!_0x4ec805[_0x2e0d18(0x3ef)](_0x3383c8))return[];const _0x21a83c=this[_0x2e0d18(0x2d4)]['id'],_0xe0c861=[];for(const {key:_0x59167f,value:_0x363777}of _0x4ec805[_0x2e0d18(0x117)](_0x3383c8)){if(_0x363777[_0x2e0d18(0x2ba)]){if(_0x363777[_0x2e0d18(0x24e)]===_0x61d1c2)_0xe0c861['push']({'licenseId':_0x59167f,'pin':null});else{const _0xd9ab29=Buffer[_0x2e0d18(0x1b4)](_0x363777[_0x2e0d18(0x2ba)],_0x2e0d18(0x30f)),{pin:_0x5f19a0}=_0x229bf7[_0x2e0d18(0x218)](_0x21a83c,_0xd9ab29,_0x556bf0[_0x2e0d18(0x2ae)]);_0xe0c861['push']({'licenseId':_0x59167f,'pin':_0x5f19a0});}}}return _0xe0c861;}async['recheck'](){const _0xe4a060=_0x483118,_0xba0e9a=this[_0xe4a060(0x2a2)];await this[_0xe4a060(0x19f)]();if(this['_active']&&this[_0xe4a060(0x2a2)][_0xe4a060(0x24e)]===_0x61d1c2){const _0x13d6e7=Math[_0xe4a060(0x155)]((this['_active'][_0xe4a060(0x389)]-Date['now']())/0x5265c00);this[_0xe4a060(0x2d4)][_0xe4a060(0x22f)]?.[_0xe4a060(0x1b0)]('⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20'+_0x13d6e7+_0xe4a060(0x1ac),{'feature':_0xe4a060(0x25c),'licensee':this['_active'][_0xe4a060(0x3ce)],'expiresAt':new Date(this['_active'][_0xe4a060(0x389)])[_0xe4a060(0x2c1)]()});}if(_0xba0e9a&&!this['_active']){this['okdb']['log']?.[_0xe4a060(0x1b0)](_0xe4a060(0x127),{'feature':'license'}),this[_0xe4a060(0x2d4)]['events']?.['emit'](_0x32d443[_0xe4a060(0x3dc)],{'previous':_0xba0e9a});const _0x498e34=this['okdb'][_0xe4a060(0x353)]?.['onLicenseExpired']??_0x556bf0[_0xe4a060(0x1e2)];_0x498e34===_0xe4a060(0x188)&&(this[_0xe4a060(0x2d4)]['log']?.[_0xe4a060(0x350)](_0xe4a060(0x205),{'feature':_0xe4a060(0x25c)}),this['okdb'][_0xe4a060(0x126)]()[_0xe4a060(0x17a)](()=>{})[_0xe4a060(0x299)](()=>process[_0xe4a060(0x209)](0x1)));}}}return okdbLicense={'LicenseChecker':_0x53b607,'_C':_0x556bf0},okdbLicense;}var okdbShell,hasRequiredOkdbShell;function requireOkdbShell(){const _0x2bedd6=_0x60de39;if(hasRequiredOkdbShell)return okdbShell;hasRequiredOkdbShell=0x1;const _0x2163f2=require$$0$2,_0x49ed69=require$$1,_0x30e81a=require$$2$1,_0x5b4dac=require$$1$1,_0x96dfe1=_0x5b4dac[_0x2bedd6(0x2fe)](_0x30e81a[_0x2bedd6(0x2b1)](),_0x2bedd6(0x282)),_0x2d3749=0x3e8,_0x46420b={'reset':_0x2bedd6(0x13b),'bold':_0x2bedd6(0x2b9),'dim':'\x1b[2m','red':_0x2bedd6(0x318),'green':'\x1b[32m','yellow':'\x1b[33m','blue':_0x2bedd6(0x20c),'magenta':_0x2bedd6(0x31c),'cyan':_0x2bedd6(0x1cc),'white':_0x2bedd6(0x1a6),'gray':'\x1b[90m'},_0x29972b=!process[_0x2bedd6(0x379)][_0x2bedd6(0x34f)]||!!process.env.NO_COLOR,_0x3b5ce0=(_0x5c0406,_0x1d4cd1)=>_0x29972b?_0x1d4cd1:''+_0x5c0406+_0x1d4cd1+_0x46420b['reset'],_0x3fc16d={'error':_0x46420b[_0x2bedd6(0x252)],'warn':_0x46420b[_0x2bedd6(0x3ae)],'info':_0x46420b[_0x2bedd6(0x2b4)],'debug':_0x46420b['gray']},_0xf5d4da={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3};function _0x27e487(_0x3b6988,_0x1c8fc8=_0x2bedd6(0x2ed)){const _0x31301b=_0x2bedd6,{level:_0x3e07c0,msg:_0x3b532b,meta:_0xdbc3de,context:_0x58ba8b,ts:_0x5626ee}=_0x3b6988;if((_0xf5d4da[_0x3e07c0]??0x1)<(_0xf5d4da[_0x1c8fc8]??0x1))return;const _0x1207bd=_0x3b5ce0(_0x46420b[_0x31301b(0x292)],new Date(_0x5626ee)[_0x31301b(0x2c1)]()),_0x483acb=_0x3b5ce0(_0x3fc16d[_0x3e07c0]??_0x46420b[_0x31301b(0x27b)],_0x3e07c0[_0x31301b(0x376)](0x5));let _0x4d7c75='\x20\x20'+_0x1207bd+'\x20'+_0x3b5ce0(_0x46420b[_0x31301b(0x2c5)],_0x483acb)+'\x20'+_0x3b532b;if(_0xdbc3de&&Object[_0x31301b(0x39c)](_0xdbc3de)[_0x31301b(0x3f0)]>0x0){const _0x3c4f60=Object[_0x31301b(0x145)](_0xdbc3de)['map'](([_0x57185b,_0x465d93])=>_0x57185b+'='+_0x465d93)[_0x31301b(0x2fe)]('\x20');_0x4d7c75+=_0x3b5ce0(_0x46420b[_0x31301b(0x3ca)],_0x31301b(0x37b)+_0x3c4f60+']');}if(_0x58ba8b!==undefined){const _0x5bf512=typeof _0x58ba8b===_0x31301b(0x371)?JSON['stringify'](_0x58ba8b):String(_0x58ba8b);_0x4d7c75+=_0x3b5ce0(_0x46420b['dim'],'\x20\x20'+_0x5bf512);}const _0x18d9b4=_0x3e07c0==='error'||_0x3e07c0===_0x31301b(0x1b0)?process[_0x31301b(0x383)][_0x31301b(0x375)]['bind'](process[_0x31301b(0x383)]):process[_0x31301b(0x379)][_0x31301b(0x375)]['bind'](process['stdout']);_0x18d9b4(_0x4d7c75+'\x0a');}function _0x422ef9(_0x320a34,_0x16a869){const _0x38346d=_0x2bedd6;if(_0x320a34===0xcc||_0x320a34>=0xc8&&_0x320a34<0x12c&&!_0x16a869){console[_0x38346d(0x22f)]('\x0a\x20\x20'+_0x3b5ce0(_0x46420b[_0x38346d(0x306)],'✓')+'\x0a');return;}if(_0x320a34>=0x190||_0x16a869?.['error']){const _0x385d11=_0x16a869?.[_0x38346d(0x350)]??_0x16a869?.[_0x38346d(0x213)]??_0x38346d(0x380)+_0x320a34;console[_0x38346d(0x22f)](_0x38346d(0x3f3)+_0x3b5ce0(_0x46420b[_0x38346d(0x252)],'✗')+'\x20'+_0x3b5ce0(_0x46420b['bold']+_0x46420b[_0x38346d(0x252)],String(_0x320a34))+'\x20\x20'+_0x385d11+'\x0a');return;}const _0x431170=Object[_0x38346d(0x2db)][_0x38346d(0x323)][_0x38346d(0x21b)](_0x16a869??{},_0x38346d(0x148))?_0x16a869[_0x38346d(0x148)]:_0x16a869,_0x226f9f=_0x16a869?.[_0x38346d(0x29e)];console[_0x38346d(0x22f)](''),_0x4abcdc(_0x431170,'\x20\x20');if(_0x226f9f?.[_0x38346d(0x25e)]!=null||_0x226f9f?.[_0x38346d(0x125)]!=null){const _0x93ed9e=[];if(_0x226f9f[_0x38346d(0x25e)]!=null)_0x93ed9e['push'](_0x226f9f['count']+'\x20result'+(_0x226f9f[_0x38346d(0x25e)]!==0x1?'s':''));if(_0x226f9f[_0x38346d(0x125)]!=null)_0x93ed9e[_0x38346d(0x3fc)](_0x226f9f['time']+'ms');console[_0x38346d(0x22f)](_0x38346d(0x3f3)+_0x3b5ce0(_0x46420b[_0x38346d(0x3ca)],_0x93ed9e[_0x38346d(0x2fe)](_0x38346d(0x33d))));}console[_0x38346d(0x22f)]('');}function _0x4abcdc(_0x43f3d5,_0x54aacc=''){const _0xaea61=_0x2bedd6;if(_0x43f3d5===null||_0x43f3d5===undefined){console[_0xaea61(0x22f)](_0x54aacc+_0x3b5ce0(_0x46420b[_0xaea61(0x3ca)],'(null)'));return;}if(Array[_0xaea61(0x217)](_0x43f3d5)){if(_0x43f3d5[_0xaea61(0x3f0)]===0x0){console['log'](_0x54aacc+_0x3b5ce0(_0x46420b[_0xaea61(0x3ca)],'(empty)'));return;}if(_0x43f3d5[_0xaea61(0x18e)](_0x5ba0b2=>_0x5ba0b2&&typeof _0x5ba0b2===_0xaea61(0x371)&&'key'in _0x5ba0b2&&_0xaea61(0x13a)in _0x5ba0b2)){_0xdcd86d(_0x43f3d5,_0x54aacc);return;}if(_0x43f3d5[_0xaea61(0x18e)](_0x5caa11=>_0x5caa11&&typeof _0x5caa11===_0xaea61(0x371)&&_0xaea61(0x154)in _0x5caa11&&_0xaea61(0x25e)in _0x5caa11)){_0x3f6f89(_0x43f3d5,_0x54aacc);return;}if(_0x43f3d5[_0xaea61(0x18e)](_0x292506=>typeof _0x292506!==_0xaea61(0x371)||_0x292506===null)){_0x43f3d5[_0xaea61(0x18c)]((_0x11bcf6,_0x51d54)=>console[_0xaea61(0x22f)](_0x54aacc+_0x3b5ce0(_0x46420b[_0xaea61(0x292)],_0x51d54+0x1+'.')+'\x20'+_0x3b5ce0(_0x46420b[_0xaea61(0x27b)],String(_0x11bcf6))));return;}_0x43f3d5[_0xaea61(0x18c)]((_0x3d2f46,_0x33b03c)=>{const _0x3349fe=_0xaea61;console['log'](_0x54aacc+_0x3b5ce0(_0x46420b['dim'],'['+_0x33b03c+']'));if(typeof _0x3d2f46==='object'&&_0x3d2f46!==null)_0x11c3d1(_0x3d2f46,_0x54aacc+'\x20\x20');else console[_0x3349fe(0x22f)](_0x54aacc+'\x20\x20'+String(_0x3d2f46));});return;}if(typeof _0x43f3d5===_0xaea61(0x371)){if(_0xaea61(0x277)in _0x43f3d5&&'value'in _0x43f3d5&&Object[_0xaea61(0x39c)](_0x43f3d5)[_0xaea61(0x3f0)]<=0x3){console[_0xaea61(0x22f)](_0x54aacc+_0x3b5ce0(_0x46420b[_0xaea61(0x2c5)]+_0x46420b['cyan'],String(_0x43f3d5[_0xaea61(0x277)])));const _0x183ddc=_0x43f3d5[_0xaea61(0x13a)];if(_0x183ddc&&typeof _0x183ddc===_0xaea61(0x371))_0x11c3d1(_0x183ddc,_0x54aacc);else console[_0xaea61(0x22f)](_0x54aacc+_0x3b5ce0(_0x46420b['white'],String(_0x183ddc)));return;}_0x11c3d1(_0x43f3d5,_0x54aacc);return;}console['log'](_0x54aacc+_0x3b5ce0(_0x46420b['white'],String(_0x43f3d5)));}function _0x11c3d1(_0x23a936,_0x182db1=''){const _0x19589a=_0x2bedd6,_0x53537b=Object[_0x19589a(0x145)](_0x23a936);if(_0x53537b[_0x19589a(0x3f0)]===0x0){console['log'](_0x182db1+_0x3b5ce0(_0x46420b[_0x19589a(0x3ca)],'{}'));return;}const _0x43f040=Math[_0x19589a(0x21f)](0x1c,Math['max'](..._0x53537b['map'](([_0x1180bc])=>_0x1180bc[_0x19589a(0x3f0)])));for(const [_0x5efb79,_0x4f4103]of _0x53537b){const _0x4b0ed4=_0x3b5ce0(_0x46420b[_0x19589a(0x2b4)],_0x5efb79['padEnd'](_0x43f040));if(_0x4f4103===null||_0x4f4103===undefined)console[_0x19589a(0x22f)](_0x182db1+_0x4b0ed4+'\x20\x20'+_0x3b5ce0(_0x46420b[_0x19589a(0x3ca)],_0x19589a(0x143)));else{if(typeof _0x4f4103===_0x19589a(0x371)){const _0x3c748a=JSON[_0x19589a(0x1ed)](_0x4f4103);_0x3c748a[_0x19589a(0x3f0)]<=0x50?console['log'](_0x182db1+_0x4b0ed4+'\x20\x20'+_0x3b5ce0(_0x46420b[_0x19589a(0x3ca)],_0x3c748a)):(console[_0x19589a(0x22f)](_0x182db1+_0x4b0ed4),_0x4abcdc(_0x4f4103,_0x182db1+'\x20\x20'));}else{const _0x39b2ec=typeof _0x4f4103===_0x19589a(0x1d0)?_0x3b5ce0(_0x4f4103?_0x46420b[_0x19589a(0x306)]:_0x46420b['yellow'],String(_0x4f4103)):typeof _0x4f4103===_0x19589a(0x2b2)?_0x3b5ce0(_0x46420b[_0x19589a(0x38c)],String(_0x4f4103)):_0x3b5ce0(_0x46420b[_0x19589a(0x27b)],String(_0x4f4103));console[_0x19589a(0x22f)](_0x182db1+_0x4b0ed4+'\x20\x20'+_0x39b2ec);}}}}function _0xdcd86d(_0x201bea,_0x52ad6a=''){const _0x2aab26=_0x2bedd6,_0x3d84f0=Math['min'](0x20,Math['max'](..._0x201bea[_0x2aab26(0x3a3)](_0xbac160=>String(_0xbac160['key'])[_0x2aab26(0x3f0)])));for(const {key:_0x2e21ef,value:_0x59e35f,score:_0x132442,clock:_0x3b79fe}of _0x201bea){const _0xec5a12=_0x3b5ce0(_0x46420b[_0x2aab26(0x2c5)]+_0x46420b[_0x2aab26(0x2b4)],String(_0x2e21ef)[_0x2aab26(0x376)](_0x3d84f0)),_0x237127=_0x59e35f==null?_0x3b5ce0(_0x46420b['dim'],_0x2aab26(0x143)):typeof _0x59e35f===_0x2aab26(0x371)?_0x3b5ce0(_0x46420b[_0x2aab26(0x3ca)],JSON[_0x2aab26(0x1ed)](_0x59e35f)):_0x3b5ce0(_0x46420b[_0x2aab26(0x27b)],String(_0x59e35f)),_0x43dcd7=_0x132442!=null?_0x3b5ce0(_0x46420b[_0x2aab26(0x292)],_0x2aab26(0x16a)+_0x132442['toFixed'](0x4)):'',_0x126957=_0x3b79fe!=null?_0x3b5ce0(_0x46420b['gray'],'\x20\x20@'+_0x3b79fe):'';console[_0x2aab26(0x22f)](_0x52ad6a+_0xec5a12+'\x20\x20'+_0x237127+_0x43dcd7+_0x126957);}}function _0x3f6f89(_0x2c88f5,_0x41a528=''){const _0x5825da=_0x2bedd6,_0x2d79a0=Math['min'](0x20,Math[_0x5825da(0x394)](..._0x2c88f5['map'](_0x42d319=>_0x42d319['type'][_0x5825da(0x3f0)])));for(const {type:_0x585846,count:_0x30e13a,fields:_0x3209cb}of _0x2c88f5){if(_0x585846[_0x5825da(0x3d9)]('~'))continue;const _0x379625=_0x3b5ce0(_0x46420b[_0x5825da(0x2c5)]+_0x46420b[_0x5825da(0x2b4)],_0x585846[_0x5825da(0x376)](_0x2d79a0)),_0x194f6a=_0x3b5ce0(_0x46420b['magenta'],String(_0x30e13a)['padStart'](0x6))+_0x3b5ce0(_0x46420b['dim'],_0x5825da(0x12b)),_0xa83a5e=_0x3209cb&&Object[_0x5825da(0x39c)](_0x3209cb)[_0x5825da(0x3f0)]?_0x3b5ce0(_0x46420b['dim'],_0x5825da(0x3a1)+Object['keys'](_0x3209cb)[_0x5825da(0x400)](0x0,0x6)[_0x5825da(0x2fe)](',\x20')+(Object[_0x5825da(0x39c)](_0x3209cb)[_0x5825da(0x3f0)]>0x6?'…':'')):'';console[_0x5825da(0x22f)](_0x41a528+_0x379625+'\x20\x20'+_0x194f6a+_0xa83a5e);}}const _0x6bcceb=[_0x2bedd6(0x18d),_0x2bedd6(0x29a),'queue/',_0x2bedd6(0x1f2),_0x2bedd6(0x37a),_0x2bedd6(0x2f6)];function _0x2aad1d(_0xab06d9,_0x553dc2){const _0x165dd7=_0x2bedd6;if(_0xab06d9['startsWith'](_0x165dd7(0x336)))return _0xab06d9;if(_0xab06d9['startsWith']('/'))return _0x165dd7(0x38a)+_0xab06d9;if(_0xab06d9[_0x165dd7(0x3d9)](_0x165dd7(0x30c)))return _0x165dd7(0x336)+_0xab06d9;const _0x478825=_0x6bcceb['some'](_0x23303c=>_0xab06d9===_0x23303c['replace'](/\/$/,'')||_0xab06d9['startsWith'](_0x23303c));return _0x478825?_0x165dd7(0x249)+_0x553dc2+'/'+_0xab06d9:_0x165dd7(0x336)+_0xab06d9;}function _0x52e39c(_0x3c5a6e){const _0x3286f9=_0x2bedd6,_0x579448={},_0x4f0e31=[];let _0x1e363c=0x0;while(_0x1e363c<_0x3c5a6e[_0x3286f9(0x3f0)]){if((_0x3c5a6e[_0x1e363c]==='--env'||_0x3c5a6e[_0x1e363c]==='-e')&&_0x3c5a6e[_0x1e363c+0x1]&&!_0x3c5a6e[_0x1e363c+0x1][_0x3286f9(0x3d9)]('-'))_0x579448[_0x3286f9(0x233)]=_0x3c5a6e[++_0x1e363c];else _0x3c5a6e[_0x1e363c]===_0x3286f9(0x227)||_0x3c5a6e[_0x1e363c]==='-h'?_0x579448[_0x3286f9(0x2b7)]=!![]:_0x4f0e31[_0x3286f9(0x3fc)](_0x3c5a6e[_0x1e363c]);_0x1e363c++;}return{'flags':_0x579448,'rest':_0x4f0e31};}const _0x5b1f63={'system':_0x2bedd6(0x3f8),'envs':_0x2bedd6(0x254),'types':_0x2bedd6(0x1c5),'data':_0x2bedd6(0x267),'indexes':'Indexes','fts':_0x2bedd6(0x294),'sync':_0x2bedd6(0x21a),'queue':_0x2bedd6(0x395),'files':'Files','embeddings':'Embeddings','engines':_0x2bedd6(0x26f),'admin':'Admin','event':'Events','processor':_0x2bedd6(0x246)},_0x2f8a12=['system','envs',_0x2bedd6(0x18d),_0x2bedd6(0x216),'indexes',_0x2bedd6(0x1c6),_0x2bedd6(0x39a),_0x2bedd6(0x2df),'files','embeddings',_0x2bedd6(0x285),_0x2bedd6(0x229)];function _0x799632(_0x744e58){const _0x23d63b=_0x2bedd6;return _0x744e58[_0x23d63b(0x210)](/^\/api/,'')[_0x23d63b(0x210)](/^\[\/env\/:env=[^\]]*\]/,_0x23d63b(0x1fc))[_0x23d63b(0x210)](/^\/env\/:env/,_0x23d63b(0x18f))[_0x23d63b(0x210)](/^\//,'');}function _0x1e30e7(_0x4984e5,_0x4a1062=''){const _0x485d97=_0x2bedd6,_0x9b1504=_0x4984e5[_0x485d97(0x226)]['listRoutes']()[_0x485d97(0x199)](_0x6da34c=>!_0x6da34c[_0x485d97(0x29e)]?.[_0x485d97(0x387)]),_0x1e8d5e=_0x4a1062?_0x9b1504[_0x485d97(0x199)](_0x1abea5=>_0x1abea5[_0x485d97(0x33c)][_0x485d97(0x1a0)]()[_0x485d97(0x320)](_0x4a1062[_0x485d97(0x1a0)]())||(_0x33c1be(_0x1abea5)??'')['toLowerCase']()[_0x485d97(0x320)](_0x4a1062[_0x485d97(0x1a0)]())||_0x54dc0a(_0x1abea5)[_0x485d97(0x3c3)](_0x1fde9f=>_0x1fde9f['toLowerCase']()['includes'](_0x4a1062[_0x485d97(0x1a0)]()))):_0x9b1504;if(!_0x1e8d5e[_0x485d97(0x3f0)]){console[_0x485d97(0x22f)](_0x3b5ce0(_0x46420b['yellow'],_0x485d97(0x301)+_0x4a1062+'\x22\x0a'));return;}const _0x2de1e6=new Map();for(const _0x393f9e of _0x1e8d5e){const _0x478a6a=_0x54dc0a(_0x393f9e)[0x0]??_0x485d97(0x2ef);if(!_0x2de1e6['has'](_0x478a6a))_0x2de1e6[_0x485d97(0x1ff)](_0x478a6a,[]);_0x2de1e6[_0x485d97(0x1dc)](_0x478a6a)['push'](_0x393f9e);}const _0xdc940f=[..._0x2f8a12[_0x485d97(0x199)](_0x1f71d7=>_0x2de1e6[_0x485d97(0x170)](_0x1f71d7)),...[..._0x2de1e6[_0x485d97(0x39c)]()]['filter'](_0x2c8a2b=>!_0x2f8a12[_0x485d97(0x320)](_0x2c8a2b))];console[_0x485d97(0x22f)]('');for(const _0x244cfd of _0xdc940f){const _0x33b146=_0x2de1e6['get'](_0x244cfd);if(!_0x33b146?.[_0x485d97(0x3f0)])continue;console['log'](_0x3b5ce0(_0x46420b[_0x485d97(0x2c5)],'\x20\x20'+(_0x5b1f63[_0x244cfd]??_0x244cfd)));for(const _0x2b77a3 of _0x33b146){const _0x1f6740=_0x3b5ce0(_0x46420b['magenta'],_0x2b77a3[_0x485d97(0x1d6)][_0x485d97(0x376)](0x7)),_0x273225=_0x3b5ce0(_0x46420b[_0x485d97(0x2b4)],_0x799632(_0x2b77a3[_0x485d97(0x33c)])),_0x2d0130=_0x33c1be(_0x2b77a3)?_0x3b5ce0(_0x46420b['dim'],'\x20\x20'+_0x33c1be(_0x2b77a3)):'',_0x9a4095=_0x2b77a3['operation']?.['id']?_0x3b5ce0(_0x46420b[_0x485d97(0x292)],_0x485d97(0x37b)+_0x2b77a3[_0x485d97(0x178)]['id']+']'):'';console['log'](_0x485d97(0x393)+_0x1f6740+'\x20'+_0x273225+_0x2d0130+_0x9a4095);}console['log']('');}}function _0x35a425(_0x1758c8,_0x2d59bd){const _0x305b21=_0x2bedd6,_0x43eb52=_0x2d59bd['replace'](/^\/api(\/env\/[^/]+)?\//,'')[_0x305b21(0x2ab)]('/')[0x0],_0x5b3d06=_0x1758c8[_0x305b21(0x226)][_0x305b21(0x2b3)]()['filter'](_0x4ad32f=>_0x4ad32f['path'][_0x305b21(0x1a0)]()['includes'](_0x43eb52[_0x305b21(0x1a0)]()));if(!_0x5b3d06['length']){console[_0x305b21(0x22f)](_0x3b5ce0(_0x46420b['yellow'],_0x305b21(0x197)+_0x2d59bd+'\x0a'));return;}console[_0x305b21(0x22f)]('');for(const _0x186c05 of _0x5b3d06[_0x305b21(0x400)](0x0,0xc)){for(const _0x1c9508 of _0x10a2c9(_0x186c05)){console[_0x305b21(0x22f)](_0x1c9508);}console[_0x305b21(0x22f)]('');}}function _0x33c1be(_0x363a4d){const _0x2c189b=_0x2bedd6;return _0x363a4d[_0x2c189b(0x178)]?.['summary']??_0x363a4d[_0x2c189b(0x29e)]?.[_0x2c189b(0x14b)]??'';}function _0x55b490(_0x4ced8d){const _0x189c0a=_0x2bedd6;return _0x4ced8d[_0x189c0a(0x178)]?.[_0x189c0a(0x293)]??_0x4ced8d[_0x189c0a(0x29e)]?.['description']??'';}function _0x54dc0a(_0xcfe06b){const _0x25d5d9=_0x2bedd6;return _0xcfe06b[_0x25d5d9(0x178)]?.[_0x25d5d9(0x20d)]?.[_0x25d5d9(0x3f0)]?_0xcfe06b['operation'][_0x25d5d9(0x20d)]:_0xcfe06b[_0x25d5d9(0x29e)]?.[_0x25d5d9(0x20d)]??[];}function _0x10a2c9(_0x39e15c){const _0x3c3a49=_0x2bedd6,_0x47bae2=[];_0x47bae2[_0x3c3a49(0x3fc)]('\x20\x20'+_0x3b5ce0(_0x46420b[_0x3c3a49(0x2c5)]+_0x46420b['magenta'],_0x39e15c[_0x3c3a49(0x1d6)][_0x3c3a49(0x376)](0x7))+'\x20'+_0x3b5ce0(_0x46420b['bold']+_0x46420b[_0x3c3a49(0x2b4)],_0x39e15c[_0x3c3a49(0x33c)]));_0x39e15c[_0x3c3a49(0x178)]?.['id']&&_0x47bae2['push'](_0x3c3a49(0x407)+_0x3b5ce0(_0x46420b[_0x3c3a49(0x292)],_0x3c3a49(0x3e6)+_0x39e15c[_0x3c3a49(0x178)]['id']));_0x33c1be(_0x39e15c)&&_0x47bae2['push'](_0x3c3a49(0x407)+_0x3b5ce0(_0x46420b[_0x3c3a49(0x27b)],_0x33c1be(_0x39e15c)));_0x55b490(_0x39e15c)&&_0x47bae2[_0x3c3a49(0x3fc)](_0x3c3a49(0x407)+_0x3b5ce0(_0x46420b[_0x3c3a49(0x3ca)],_0x55b490(_0x39e15c)));_0x54dc0a(_0x39e15c)['length']&&_0x47bae2['push'](_0x3c3a49(0x407)+_0x3b5ce0(_0x46420b[_0x3c3a49(0x292)],_0x3c3a49(0x3f5)+_0x54dc0a(_0x39e15c)[_0x3c3a49(0x2fe)](',\x20')));_0x39e15c[_0x3c3a49(0x178)]?.[_0x3c3a49(0x114)]?.[_0x3c3a49(0x191)]&&_0x47bae2[_0x3c3a49(0x3fc)](_0x3c3a49(0x407)+_0x3b5ce0(_0x46420b['gray'],_0x3c3a49(0x289)+_0x39e15c[_0x3c3a49(0x178)][_0x3c3a49(0x114)][_0x3c3a49(0x191)]));_0x39e15c[_0x3c3a49(0x178)]?.[_0x3c3a49(0x226)]?.[_0x3c3a49(0x1ba)]&&_0x39e15c['operation'][_0x3c3a49(0x226)][_0x3c3a49(0x1ba)]!=='standard'&&_0x47bae2[_0x3c3a49(0x3fc)](_0x3c3a49(0x407)+_0x3b5ce0(_0x46420b['gray'],_0x3c3a49(0x129)+_0x39e15c['operation'][_0x3c3a49(0x226)][_0x3c3a49(0x1ba)]));if(_0x39e15c[_0x3c3a49(0x178)]?.['inputSchema']){const _0x384e2a=Object[_0x3c3a49(0x39c)](_0x39e15c[_0x3c3a49(0x178)][_0x3c3a49(0x3d8)][_0x3c3a49(0x388)]||{});if(_0x384e2a[_0x3c3a49(0x3f0)])_0x47bae2['push'](_0x3c3a49(0x407)+_0x3b5ce0(_0x46420b[_0x3c3a49(0x292)],'input:\x20'+_0x384e2a[_0x3c3a49(0x2fe)](',\x20')));}return _0x39e15c[_0x3c3a49(0x29e)]?.[_0x3c3a49(0x3a9)]&&_0x47bae2[_0x3c3a49(0x3fc)](_0x3c3a49(0x407)+_0x3b5ce0(_0x46420b[_0x3c3a49(0x292)],'body:\x20'+JSON['stringify'](_0x39e15c[_0x3c3a49(0x29e)]['body']))),_0x47bae2;}async function _0x4d55d4(_0x4687e0,_0x556f93,_0x98165c,_0x3884bb=null){const _0x5ed00b=_0x2bedd6,_0x253c3e=_0x98165c[_0x5ed00b(0x2be)]('?'),_0x4143b0=_0x253c3e>=0x0?_0x98165c[_0x5ed00b(0x400)](0x0,_0x253c3e):_0x98165c,_0xeee559=_0x253c3e>=0x0?_0x98165c[_0x5ed00b(0x400)](_0x253c3e+0x1):'',_0x189336=Object[_0x5ed00b(0x14a)](new URLSearchParams(_0xeee559)[_0x5ed00b(0x145)]());return _0x4687e0[_0x5ed00b(0x226)][_0x5ed00b(0x27a)](_0x556f93,_0x4143b0,{'body':_0x3884bb,'query':_0x189336,'headers':{'content-type':_0x5ed00b(0x38f)}},{'internal':!![]});}function _0x5e0cdb(_0x584a27){const _0x3dca46=_0x2bedd6;if(!_0x584a27)return null;const _0x509022=_0x584a27[_0x3dca46(0x33a)]();if(!_0x509022)return null;try{return JSON['parse'](_0x509022);}catch{}try{return JSON['parse'](_0x741b75(_0x509022));}catch(_0x401d80){throw new SyntaxError(_0x401d80[_0x3dca46(0x213)],{'cause':_0x401d80});}}function _0x741b75(_0x15b9eb){const _0x4433ce=_0x2bedd6;let _0x1af9da='',_0x566898=0x0;while(_0x566898<_0x15b9eb[_0x4433ce(0x3f0)]){const _0x8cd2ab=_0x15b9eb[_0x566898];if(_0x8cd2ab==='\x22'){_0x1af9da+='\x22',_0x566898++;while(_0x566898<_0x15b9eb[_0x4433ce(0x3f0)]&&_0x15b9eb[_0x566898]!=='\x22'){if(_0x15b9eb[_0x566898]==='\x5c'){_0x1af9da+=_0x15b9eb[_0x566898++];if(_0x566898<_0x15b9eb['length'])_0x1af9da+=_0x15b9eb[_0x566898++];}else _0x1af9da+=_0x15b9eb[_0x566898++];}_0x1af9da+='\x22';if(_0x566898<_0x15b9eb[_0x4433ce(0x3f0)])_0x566898++;continue;}if(_0x8cd2ab==='\x27'){_0x1af9da+='\x22',_0x566898++;while(_0x566898<_0x15b9eb['length']&&_0x15b9eb[_0x566898]!=='\x27'){if(_0x15b9eb[_0x566898]==='\x5c'&&_0x15b9eb[_0x566898+0x1]==='\x27')_0x1af9da+='\x27',_0x566898+=0x2;else _0x15b9eb[_0x566898]==='\x22'?(_0x1af9da+='\x5c\x22',_0x566898++):_0x1af9da+=_0x15b9eb[_0x566898++];}_0x1af9da+='\x22';if(_0x566898<_0x15b9eb['length'])_0x566898++;continue;}if(_0x4433ce(0x14e)[_0x4433ce(0x320)](_0x8cd2ab)){_0x1af9da+=_0x8cd2ab,_0x566898++;continue;}let _0x55899='';while(_0x566898<_0x15b9eb[_0x4433ce(0x3f0)]&&!_0x4433ce(0x354)[_0x4433ce(0x320)](_0x15b9eb[_0x566898])&&_0x15b9eb[_0x566898]!=='\x20'&&_0x15b9eb[_0x566898]!=='\x09'&&_0x15b9eb[_0x566898]!=='\x0a'&&_0x15b9eb[_0x566898]!=='\x0d'){_0x55899+=_0x15b9eb[_0x566898++];}let _0x26f612=_0x566898;while(_0x26f612<_0x15b9eb[_0x4433ce(0x3f0)]&&(_0x15b9eb[_0x26f612]==='\x20'||_0x15b9eb[_0x26f612]==='\x09'))_0x26f612++;if(_0x15b9eb[_0x26f612]===':')_0x1af9da+='\x22'+_0x55899+'\x22';else _0x55899==='true'||_0x55899===_0x4433ce(0x366)||_0x55899===_0x4433ce(0x143)||/^-?\d+(\.\d+)?([eE][+-]?\d+)?$/[_0x4433ce(0x26e)](_0x55899)?_0x1af9da+=_0x55899:_0x1af9da+='\x22'+_0x55899+'\x22';}return _0x1af9da[_0x4433ce(0x210)](/,(\s*[}\]])/g,'$1');}function _0x38a97f(_0x124796){const _0x4b750d=_0x2bedd6,_0x144bf8=[];let _0x27a31a=0x0;while(_0x27a31a<_0x124796[_0x4b750d(0x3f0)]){while(_0x27a31a<_0x124796[_0x4b750d(0x3f0)]&&(_0x124796[_0x27a31a]==='\x20'||_0x124796[_0x27a31a]==='\x09'))_0x27a31a++;if(_0x27a31a>=_0x124796[_0x4b750d(0x3f0)])break;const _0x3d398c=_0x124796[_0x27a31a];if(_0x3d398c==='{'||_0x3d398c==='['){const _0x4c7954=_0x3d398c==='{'?'}':']',_0x4d3518=_0x27a31a++;let _0x464e1c=0x1,_0x25bc99=![],_0x1b9d83='';while(_0x27a31a<_0x124796[_0x4b750d(0x3f0)]&&_0x464e1c>0x0){const _0x46d08e=_0x124796[_0x27a31a];if(_0x25bc99){if(_0x46d08e==='\x5c')_0x27a31a++;else{if(_0x46d08e===_0x1b9d83)_0x25bc99=![];}}else{if(_0x46d08e==='\x22'||_0x46d08e==='\x27')_0x25bc99=!![],_0x1b9d83=_0x46d08e;else{if(_0x46d08e===_0x3d398c)_0x464e1c++;else{if(_0x46d08e===_0x4c7954)_0x464e1c--;}}}_0x27a31a++;}_0x144bf8[_0x4b750d(0x3fc)](_0x124796[_0x4b750d(0x400)](_0x4d3518,_0x27a31a));continue;}if(_0x3d398c==='\x22'||_0x3d398c==='\x27'){const _0x5bb186=_0x3d398c;_0x27a31a++;let _0x4830ea='';while(_0x27a31a<_0x124796[_0x4b750d(0x3f0)]&&_0x124796[_0x27a31a]!==_0x5bb186){if(_0x124796[_0x27a31a]==='\x5c'&&_0x27a31a+0x1<_0x124796[_0x4b750d(0x3f0)])_0x27a31a++,_0x4830ea+=_0x124796[_0x27a31a++];else _0x4830ea+=_0x124796[_0x27a31a++];}if(_0x27a31a<_0x124796[_0x4b750d(0x3f0)])_0x27a31a++;_0x144bf8[_0x4b750d(0x3fc)](_0x4830ea);continue;}let _0x2db61f='';while(_0x27a31a<_0x124796['length']&&_0x124796[_0x27a31a]!=='\x20'&&_0x124796[_0x27a31a]!=='\x09'&&_0x124796[_0x27a31a]!=='{'&&_0x124796[_0x27a31a]!=='['){_0x2db61f+=_0x124796[_0x27a31a++];}if(_0x2db61f)_0x144bf8[_0x4b750d(0x3fc)](_0x2db61f);}return _0x144bf8;}function _0x32e8b1(_0x47eba0,_0x13fd03){const _0x5e19fb=_0x2bedd6,_0x39e673=[..._0x47eba0[_0x5e19fb(0x28a)]['keys']()][_0x5e19fb(0x199)](_0x5c7590=>!_0x5c7590[_0x5e19fb(0x3d9)]('~'));console[_0x5e19fb(0x22f)](['',_0x3b5ce0(_0x46420b[_0x5e19fb(0x2c5)]+_0x46420b['cyan'],_0x5e19fb(0x190)),_0x3b5ce0(_0x46420b[_0x5e19fb(0x2c5)]+_0x46420b['cyan'],'\x20\x20║')+_0x3b5ce0(_0x46420b[_0x5e19fb(0x2c5)],_0x5e19fb(0x3e7))+_0x3b5ce0(_0x46420b['bold']+_0x46420b[_0x5e19fb(0x2b4)],'║'),_0x3b5ce0(_0x46420b['bold']+_0x46420b[_0x5e19fb(0x2b4)],'\x20\x20╚═══════════════════════════╝'),'','\x20\x20'+_0x3b5ce0(_0x46420b[_0x5e19fb(0x306)],'✓')+'\x20'+_0x3b5ce0(_0x46420b[_0x5e19fb(0x2c5)],_0x5e19fb(0x288))+_0x5e19fb(0x1d9)+_0x13fd03[_0x5e19fb(0x12e)],'\x20\x20'+_0x3b5ce0(_0x46420b['green'],'✓')+'\x20'+_0x3b5ce0(_0x46420b[_0x5e19fb(0x2c5)],'api')+_0x5e19fb(0x3f6)+_0x13fd03['port']+_0x5e19fb(0x38a),'\x20\x20'+_0x3b5ce0(_0x46420b[_0x5e19fb(0x306)],'✓')+'\x20'+_0x3b5ce0(_0x46420b['bold'],'path')+_0x5e19fb(0x393)+_0x13fd03[_0x5e19fb(0x352)],'\x20\x20'+_0x3b5ce0(_0x46420b[_0x5e19fb(0x306)],'✓')+'\x20'+_0x3b5ce0(_0x46420b[_0x5e19fb(0x2c5)],'id')+'\x20\x20\x20\x20\x20\x20'+_0x3b5ce0(_0x46420b['gray'],_0x47eba0['id']),'\x20\x20'+_0x3b5ce0(_0x46420b[_0x5e19fb(0x306)],'✓')+'\x20'+_0x3b5ce0(_0x46420b[_0x5e19fb(0x2c5)],_0x5e19fb(0x3b1))+_0x5e19fb(0x393)+_0x39e673[_0x5e19fb(0x3a3)](_0x365805=>_0x3b5ce0(_0x46420b['cyan'],_0x365805))[_0x5e19fb(0x2fe)]('\x20\x20'),..._0x13fd03['noAdmin']?[]:['\x20\x20'+_0x3b5ce0(_0x46420b['green'],'✓')+'\x20'+_0x3b5ce0(_0x46420b['bold'],_0x5e19fb(0x229))+_0x5e19fb(0x201)+_0x13fd03[_0x5e19fb(0x12e)]+_0x5e19fb(0x2c8)],'',_0x3b5ce0(_0x46420b['dim'],_0x5e19fb(0x24d)+_0x3b5ce0(_0x46420b[_0x5e19fb(0x2c5)],_0x5e19fb(0x2b7))+_0x5e19fb(0x2b8)+_0x3b5ce0(_0x46420b[_0x5e19fb(0x2c5)],_0x5e19fb(0x1c7))+'\x20to\x20browse\x20the\x20API,\x20'+_0x3b5ce0(_0x46420b[_0x5e19fb(0x2c5)],_0x5e19fb(0x209))+_0x5e19fb(0x3a6)),'']['join']('\x0a'));}function _0xfd25db(_0xd2b8e7){const _0x398b59=_0x2bedd6;console[_0x398b59(0x22f)]('\x0a'+_0x3b5ce0(_0x46420b[_0x398b59(0x2c5)],_0x398b59(0x16f))+'\x20\x20'+_0x3b5ce0(_0x46420b[_0x398b59(0x3ca)],_0x398b59(0x204))+_0x398b59(0x14c)+_0x3b5ce0(_0x46420b[_0x398b59(0x2b4)],'<path>')+_0x398b59(0x297)+_0x3b5ce0(_0x46420b[_0x398b59(0x2b4)],_0x398b59(0x3b0))+'\x20'+_0x3b5ce0(_0x46420b[_0x398b59(0x3ae)],_0x398b59(0x186))+_0x398b59(0x3a8)+_0x3b5ce0(_0x46420b[_0x398b59(0x2b4)],_0x398b59(0x1e3))+'\x20'+_0x3b5ce0(_0x46420b['cyan'],_0x398b59(0x3b0))+'\x20'+_0x3b5ce0(_0x46420b[_0x398b59(0x3ae)],_0x398b59(0x243))+_0x398b59(0x158)+_0x3b5ce0(_0x46420b['dim'],_0x398b59(0x130))+_0x398b59(0x172)+_0x3b5ce0(_0x46420b[_0x398b59(0x292)],'info')+_0x398b59(0x1db)+_0x3b5ce0(_0x46420b[_0x398b59(0x292)],'envs')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/envs\x0a\x20\x20\x20\x20'+_0x3b5ce0(_0x46420b['gray'],_0x398b59(0x18d))+_0x398b59(0x372)+_0xd2b8e7['env']+_0x398b59(0x25f)+_0x3b5ce0(_0x46420b['gray'],'type/users')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/'+_0xd2b8e7[_0x398b59(0x233)]+'/type/users\x0a\x20\x20\x20\x20'+_0x3b5ce0(_0x46420b[_0x398b59(0x292)],_0x398b59(0x137))+_0x398b59(0x1e9)+_0xd2b8e7[_0x398b59(0x233)]+'/type/users/item/alice\x0a\x20\x20\x20\x20'+_0x3b5ce0(_0x46420b[_0x398b59(0x292)],'type/users/query\x20{\x22active\x22:true}')+_0x398b59(0x15b)+_0xd2b8e7[_0x398b59(0x233)]+_0x398b59(0x305)+_0x3b5ce0(_0x46420b['gray'],_0x398b59(0x30e))+'\x0a\x20\x20\x20\x20'+_0x3b5ce0(_0x46420b[_0x398b59(0x292)],'DELETE\x20type/users/item/x')+_0x398b59(0x172)+_0x3b5ce0(_0x46420b[_0x398b59(0x292)],'env/staging/info')+_0x398b59(0x341)+_0x3b5ce0(_0x46420b[_0x398b59(0x2c5)],'\x20\x20Flags')+'\x20\x20'+_0x3b5ce0(_0x46420b[_0x398b59(0x3ca)],_0x398b59(0x2e6))+_0x398b59(0x14c)+_0x3b5ce0(_0x46420b['cyan'],_0x398b59(0x3d3))+_0x398b59(0x3c7)+_0x3b5ce0(_0x46420b[_0x398b59(0x2b4)],'--help')+_0x398b59(0x2b0)+_0x3b5ce0(_0x46420b[_0x398b59(0x3ca)],'Examples')+_0x398b59(0x172)+_0x3b5ce0(_0x46420b[_0x398b59(0x292)],'types\x20--env\x20staging')+_0x398b59(0x172)+_0x3b5ce0(_0x46420b['gray'],_0x398b59(0x39b))+_0x398b59(0x172)+_0x3b5ce0(_0x46420b[_0x398b59(0x292)],_0x398b59(0x272))+'\x0a\x0a'+_0x3b5ce0(_0x46420b[_0x398b59(0x2c5)],_0x398b59(0x2bb))+_0x398b59(0x14c)+_0x3b5ce0(_0x46420b['cyan'],_0x398b59(0x32d))+_0x398b59(0x1da)+_0x3b5ce0(_0x46420b['cyan'],_0x398b59(0x233))+'\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'+_0x3b5ce0(_0x46420b[_0x398b59(0x2b4)],_0x398b59(0x1c7))+'\x20'+_0x3b5ce0(_0x46420b['dim'],_0x398b59(0x345))+_0x398b59(0x3be)+_0x3b5ce0(_0x46420b[_0x398b59(0x2b4)],_0x398b59(0x3e1))+'\x20'+_0x3b5ce0(_0x46420b[_0x398b59(0x3ca)],_0x398b59(0x128))+'\x20\x20\x20\x20\x20control\x20log\x20verbosity\x0a\x20\x20'+_0x3b5ce0(_0x46420b[_0x398b59(0x2b4)],'open')+'\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'+_0x3b5ce0(_0x46420b[_0x398b59(0x2b4)],'help')+'\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'+_0x3b5ce0(_0x46420b[_0x398b59(0x2b4)],_0x398b59(0x209))+'\x20'+_0x3b5ce0(_0x46420b[_0x398b59(0x3ca)],_0x398b59(0x36b))+'\x20\x20\x20\x20graceful\x20shutdown\x0a');}async function _0x2f31e3(_0x2e2a4f,_0x5d6a41=0x0){const _0x1fd957=_0x2bedd6;process[_0x1fd957(0x379)][_0x1fd957(0x375)]('\x0a'),console[_0x1fd957(0x22f)](_0x3b5ce0(_0x46420b[_0x1fd957(0x3ae)],'\x20\x20[okdb]\x20shutting\x20down…'));try{await _0x2e2a4f[_0x1fd957(0x126)]();}catch(_0x3fb56c){console[_0x1fd957(0x350)](_0x3b5ce0(_0x46420b[_0x1fd957(0x252)],'\x20\x20'+_0x3fb56c[_0x1fd957(0x213)]));}process['exit'](_0x5d6a41);}function _0x219820(_0x1db3d6){const _0xb2a54d=_0x2bedd6,_0x5d3c52=_0x1db3d6['env']!==_0xb2a54d(0x113)?_0x3b5ce0(_0x46420b['yellow'],'['+_0x1db3d6[_0xb2a54d(0x233)]+']'):'';return _0x3b5ce0(_0x46420b[_0xb2a54d(0x2c5)]+_0x46420b['cyan'],'okdb')+_0x5d3c52+_0x3b5ce0(_0x46420b[_0xb2a54d(0x292)],'>\x20');}const _0x4e9927=new Set(['GET','POST',_0x2bedd6(0x23d),_0x2bedd6(0x11f),_0x2bedd6(0x3ad)]);async function _0x58128f(_0x1ca9a7,_0x502b41,_0x448d90,_0x33e375,_0xac21fd,_0x1ecc76){const _0x38302d=_0x2bedd6;_0x1ca9a7=_0x1ca9a7[_0x38302d(0x33a)]();if(!_0x1ca9a7||_0x1ca9a7[_0x38302d(0x3d9)]('#'))return;const _0x518531=_0x38a97f(_0x1ca9a7),{flags:_0x5721f3,rest:_0x529ede}=_0x52e39c(_0x518531);if(!_0x529ede[_0x38302d(0x3f0)])return;const _0x4e4ec9=_0x529ede[0x0],_0xbb0dfb=_0x4e4ec9[_0x38302d(0x22d)]();if(_0xbb0dfb===_0x38302d(0x340)){if(_0x529ede[0x1])_0x35a425(_0x502b41,_0x2aad1d(_0x529ede[0x1],_0x5721f3['env']??_0xac21fd[_0x38302d(0x233)]));else _0xfd25db(_0xac21fd);return;}if(_0xbb0dfb==='USE'){const _0x23c1e2=_0x529ede[0x1];if(!_0x23c1e2){console[_0x38302d(0x22f)](_0x3b5ce0(_0x46420b[_0x38302d(0x252)],'\x0a\x20\x20Usage:\x20use\x20<env-name>\x0a'));return;}try{_0x502b41[_0x38302d(0x233)](_0x23c1e2),_0xac21fd['env']=_0x23c1e2,_0x1ecc76?.[_0x38302d(0x337)](_0x219820(_0xac21fd)),console[_0x38302d(0x22f)]('\x0a\x20\x20'+_0x3b5ce0(_0x46420b[_0x38302d(0x306)],'✓')+_0x38302d(0x300)+_0x3b5ce0(_0x46420b['bold']+_0x46420b[_0x38302d(0x2b4)],_0x23c1e2)+'\x0a');}catch{console[_0x38302d(0x22f)](_0x38302d(0x3f3)+_0x3b5ce0(_0x46420b[_0x38302d(0x252)],'✗')+'\x20environment\x20'+_0x3b5ce0(_0x46420b['bold'],_0x23c1e2)+_0x38302d(0x2f9)+_0x3b5ce0(_0x46420b[_0x38302d(0x3ca)],'\x20—\x20type\x20env\x20to\x20list\x20available\x0a'));}return;}if(_0xbb0dfb===_0x38302d(0x37e)){const _0xf46799=[..._0x502b41[_0x38302d(0x28a)]['keys']()][_0x38302d(0x199)](_0x1209ac=>!_0x1209ac[_0x38302d(0x3d9)]('~'));console[_0x38302d(0x22f)]('');for(const _0x1fff8d of _0xf46799){const _0x47a372=_0x1fff8d===_0xac21fd['env'];console[_0x38302d(0x22f)]('\x20\x20'+(_0x47a372?_0x3b5ce0(_0x46420b[_0x38302d(0x306)],'●'):_0x3b5ce0(_0x46420b['dim'],'○'))+'\x20\x20'+(_0x47a372?_0x3b5ce0(_0x46420b[_0x38302d(0x2c5)]+_0x46420b[_0x38302d(0x2b4)],_0x1fff8d):_0x3b5ce0(_0x46420b[_0x38302d(0x3ca)],_0x1fff8d)));}console[_0x38302d(0x22f)](_0x38302d(0x3f3)+_0x3b5ce0(_0x46420b[_0x38302d(0x3ca)],_0x38302d(0x193))+'\x20'+_0x3b5ce0(_0x46420b[_0x38302d(0x2b4)],_0xac21fd[_0x38302d(0x233)])),console['log']('');return;}if(_0xbb0dfb===_0x38302d(0x3ed)){const _0x2bfdcd=[..._0x502b41[_0x38302d(0x28a)][_0x38302d(0x116)]()][_0x38302d(0x199)](_0x5418ae=>!_0x5418ae[_0x38302d(0x3df)][_0x38302d(0x3d9)]('~'));console[_0x38302d(0x22f)]('');const _0x2ea14d=Math[_0x38302d(0x394)](..._0x2bfdcd[_0x38302d(0x3a3)](_0x13c80b=>_0x13c80b['name'][_0x38302d(0x3f0)]));for(const _0xe6e933 of _0x2bfdcd){const _0x37fd9a=_0xe6e933[_0x38302d(0x3df)]===_0xac21fd[_0x38302d(0x233)],_0x118d70=_0x37fd9a?_0x3b5ce0(_0x46420b[_0x38302d(0x306)],'●'):_0x3b5ce0(_0x46420b[_0x38302d(0x3ca)],'○'),_0x5bbaac=_0x37fd9a?_0x3b5ce0(_0x46420b[_0x38302d(0x2c5)]+_0x46420b[_0x38302d(0x2b4)],_0xe6e933[_0x38302d(0x3df)]['padEnd'](_0x2ea14d)):_0x3b5ce0(_0x46420b[_0x38302d(0x3ca)],_0xe6e933[_0x38302d(0x3df)][_0x38302d(0x376)](_0x2ea14d)),_0x5b35da=[..._0xe6e933[_0x38302d(0x3c4)][_0x38302d(0x39c)]()][_0x38302d(0x199)](_0x6059ef=>!_0x6059ef[_0x38302d(0x3d9)]('~')),_0x1e45f7=_0x5b35da[_0x38302d(0x3f0)]?_0x3b5ce0(_0x46420b[_0x38302d(0x3ca)],_0x5b35da[_0x38302d(0x400)](0x0,0x5)[_0x38302d(0x2fe)](',\x20')+(_0x5b35da['length']>0x5?_0x38302d(0x3b2)+(_0x5b35da[_0x38302d(0x3f0)]-0x5)+_0x38302d(0x2d9):'')):_0x3b5ce0(_0x46420b['dim'],_0x38302d(0x3ee));console[_0x38302d(0x22f)]('\x20\x20'+_0x118d70+'\x20\x20'+_0x5bbaac+'\x20\x20'+_0x1e45f7);}console[_0x38302d(0x22f)]('');return;}if(_0xbb0dfb===_0x38302d(0x2d0)){const _0x199908=_0x5721f3[_0x38302d(0x233)]??_0x529ede[0x1]??_0xac21fd[_0x38302d(0x233)];try{const _0x3288c7=_0x502b41[_0x38302d(0x233)](_0x199908),_0x3ce387=[..._0x3288c7[_0x38302d(0x3c4)][_0x38302d(0x39c)]()][_0x38302d(0x199)](_0x3f8fe9=>!_0x3f8fe9[_0x38302d(0x3d9)]('~'))[_0x38302d(0x203)]();console['log']('\x0a\x20\x20'+_0x3b5ce0(_0x46420b[_0x38302d(0x3ca)],_0x3ce387[_0x38302d(0x3f0)]+'\x20type'+(_0x3ce387['length']!==0x1?'s':'')+_0x38302d(0x36d)+_0x199908));for(const _0xbfeb02 of _0x3ce387){const _0x32c7f4=_0x3288c7[_0x38302d(0x3c4)][_0x38302d(0x1dc)](_0xbfeb02),_0x55866d=_0x32c7f4?.[_0x38302d(0x216)]?.[_0x38302d(0x140)]?.()??0x0,_0x40cd5b=_0x3b5ce0(_0x46420b[_0x38302d(0x2c5)]+_0x46420b[_0x38302d(0x2b4)],_0xbfeb02[_0x38302d(0x376)](0x1c));console[_0x38302d(0x22f)](_0x38302d(0x393)+_0x40cd5b+'\x20\x20'+_0x3b5ce0(_0x46420b[_0x38302d(0x38c)],String(_0x55866d)[_0x38302d(0x296)](0x6))+'\x20'+_0x3b5ce0(_0x46420b[_0x38302d(0x3ca)],_0x38302d(0x220)));}console['log']('');}catch(_0x499485){console[_0x38302d(0x350)](_0x3b5ce0(_0x46420b['red'],_0x38302d(0x3f3)+_0x499485['message']+'\x0a'));}return;}if(_0xbb0dfb===_0x38302d(0x141)){_0x1e30e7(_0x502b41,_0x529ede['slice'](0x1)[_0x38302d(0x2fe)]('\x20'));return;}if(_0xbb0dfb===_0x38302d(0x1c4)){const _0x32a8ce=(_0x529ede[0x1]??'')[_0x38302d(0x1a0)]();if(!_0x32a8ce||_0x32a8ce==='on')_0x33e375[_0x38302d(0x15c)]=!![],_0x33e375[_0x38302d(0x273)]=_0x38302d(0x2ed),console['log'](_0x38302d(0x3f3)+_0x3b5ce0(_0x46420b['green'],'✓')+_0x38302d(0x3ff)+_0x3b5ce0(_0x46420b[_0x38302d(0x3ca)],_0x38302d(0x1bf))+'\x0a');else{if(_0x32a8ce==='off')_0x33e375[_0x38302d(0x15c)]=![],console[_0x38302d(0x22f)](_0x38302d(0x3f3)+_0x3b5ce0(_0x46420b[_0x38302d(0x3ae)],'○')+_0x38302d(0x262));else _0xf5d4da[_0x32a8ce]!==undefined?(_0x33e375['enabled']=!![],_0x33e375[_0x38302d(0x273)]=_0x32a8ce,console['log']('\x0a\x20\x20'+_0x3b5ce0(_0x46420b[_0x38302d(0x306)],'✓')+_0x38302d(0x276)+_0x3b5ce0(_0x46420b['bold'],_0x32a8ce)+'\x0a')):console[_0x38302d(0x350)](_0x3b5ce0(_0x46420b[_0x38302d(0x252)],_0x38302d(0x1c8)));}return;}if(_0xbb0dfb===_0x38302d(0x3b3)||_0xbb0dfb===_0x38302d(0x1b7)){await _0x2f31e3(_0x502b41,0x0);return;}if(_0xbb0dfb===_0x38302d(0x194)){const _0x3fc507=_0x38302d(0x2f5)+_0x448d90[_0x38302d(0x12e)]+_0x38302d(0x2c8),_0x4e11d4=process[_0x38302d(0x119)]===_0x38302d(0x181)?_0x38302d(0x338)+_0x3fc507:process['platform']===_0x38302d(0x3bb)?_0x38302d(0x245)+_0x3fc507:_0x38302d(0x1bd)+_0x3fc507;require$$4[_0x38302d(0x36a)](_0x4e11d4),console[_0x38302d(0x22f)](_0x38302d(0x3f3)+_0x3b5ce0(_0x46420b[_0x38302d(0x306)],'✓')+_0x38302d(0x28d)+_0x3b5ce0(_0x46420b[_0x38302d(0x2b4)],_0x3fc507)+'\x0a');return;}let _0x4c4f08,_0x34084b,_0x1c373f;if(_0x4e9927[_0x38302d(0x170)](_0xbb0dfb)){_0x4c4f08=_0xbb0dfb,_0x34084b=_0x529ede[0x1],_0x1c373f=_0x529ede[_0x38302d(0x400)](0x2);if(!_0x34084b){console[_0x38302d(0x350)](_0x3b5ce0(_0x46420b[_0x38302d(0x252)],_0x38302d(0x2da)+_0x4e4ec9+'\x20<path>\x20[json-body]'));return;}}else _0x4c4f08=null,_0x34084b=_0x529ede[0x0],_0x1c373f=_0x529ede['slice'](0x1);const _0x5ba282=_0x5721f3[_0x38302d(0x233)]??_0xac21fd[_0x38302d(0x233)],_0x2c1c78=_0x2aad1d(_0x34084b,_0x5ba282);if(_0x5721f3[_0x38302d(0x2b7)]){_0x35a425(_0x502b41,_0x2c1c78);return;}let _0x3cca99=null;if(_0x1c373f['length']){const _0x44fd97=_0x1c373f[_0x38302d(0x2fe)]('\x20');try{_0x3cca99=_0x5e0cdb(_0x44fd97);}catch(_0x3d30c2){console[_0x38302d(0x350)](_0x3b5ce0(_0x46420b[_0x38302d(0x252)],'\x0a\x20\x20Invalid\x20JSON:\x20'+_0x44fd97+_0x38302d(0x3f3)+_0x3b5ce0(_0x46420b[_0x38302d(0x3ca)],_0x3d30c2[_0x38302d(0x213)])+'\x0a'));return;}}if(!_0x4c4f08)_0x4c4f08=_0x3cca99!==null?_0x38302d(0x1e1):_0x38302d(0x18b);try{const _0x53400c=await _0x4d55d4(_0x502b41,_0x4c4f08,_0x2c1c78,_0x3cca99);_0x422ef9(_0x53400c[_0x38302d(0x30a)],_0x53400c[_0x38302d(0x3a9)]);}catch(_0x123f3a){console[_0x38302d(0x350)](_0x38302d(0x3f3)+_0x3b5ce0(_0x46420b[_0x38302d(0x252)],'✗')+'\x20'+_0x123f3a[_0x38302d(0x213)]+'\x0a');}}class _0x2619f7{constructor(){const _0x54a7a4=_0x2bedd6;this['children']=new Map(),this['dynamic']=null,this[_0x54a7a4(0x30d)]=![];}}function _0x452092(_0x557609){const _0x5b2720=_0x2bedd6,_0x5f06d9=new _0x2619f7();for(const _0x3a1bc1 of _0x557609){if(_0x3a1bc1[_0x5b2720(0x29e)]?.[_0x5b2720(0x387)])continue;const _0x3c7503=_0x3a1bc1[_0x5b2720(0x33c)][_0x5b2720(0x210)](/^\/api/,'')['replace'](/^\[\/env\/:env=[^\]]*\]/,'')[_0x5b2720(0x210)](/^\//,'');if(!_0x3c7503)continue;let _0x354c3c=_0x5f06d9;for(const _0xe1b3fa of _0x3c7503['split']('/')[_0x5b2720(0x199)](Boolean)){if(_0xe1b3fa[_0x5b2720(0x3d9)](':')){const _0x5e5f5c=_0xe1b3fa[_0x5b2720(0x400)](0x1);if(!_0x354c3c['dynamic'])_0x354c3c[_0x5b2720(0x115)]={'param':_0x5e5f5c,'node':new _0x2619f7()};_0x354c3c=_0x354c3c[_0x5b2720(0x115)]['node'];}else{if(!_0x354c3c['children'][_0x5b2720(0x170)](_0xe1b3fa))_0x354c3c[_0x5b2720(0x35c)]['set'](_0xe1b3fa,new _0x2619f7());_0x354c3c=_0x354c3c[_0x5b2720(0x35c)][_0x5b2720(0x1dc)](_0xe1b3fa);}}_0x354c3c['terminal']=!![];}return _0x5f06d9;}const _0x63d4d5=new Map();function _0x57bb3d(_0x3274cb,_0x49e218,_0x5c8c4c){const _0x4d00ac=_0x2bedd6,_0xc9cd18=_0x63d4d5[_0x4d00ac(0x1dc)](_0x3274cb);if(_0xc9cd18&&_0xc9cd18['exp']>Date[_0x4d00ac(0x38b)]())return _0xc9cd18['val'];const _0x449481=_0x5c8c4c();return _0x63d4d5[_0x4d00ac(0x1ff)](_0x3274cb,{'val':_0x449481,'exp':Date[_0x4d00ac(0x38b)]()+_0x49e218}),_0x449481;}function _0x478dbe(_0x21e346,_0x2590b5,_0x28e5e5,_0x5b86f9){const _0x38a546=_0x2bedd6,_0x5431b3=_0x2590b5[_0x38a546(0x233)]??_0x5b86f9['env'];switch(_0x21e346){case _0x38a546(0x233):return[..._0x28e5e5['_envs']['keys']()][_0x38a546(0x199)](_0x5d10bc=>!_0x5d10bc[_0x38a546(0x3d9)]('~'));case _0x38a546(0x154):return _0x57bb3d(_0x38a546(0x17f)+_0x5431b3,0x7d0,()=>{const _0x3469f9=_0x38a546;try{return[..._0x28e5e5['env'](_0x5431b3)[_0x3469f9(0x3c4)][_0x3469f9(0x39c)]()][_0x3469f9(0x199)](_0x3998e8=>!_0x3998e8[_0x3469f9(0x3d9)]('~'));}catch{return[];}});case _0x38a546(0x277):if(!_0x2590b5['type'])return[];return _0x57bb3d(_0x38a546(0x19e)+_0x5431b3+':'+_0x2590b5['type'],0x5dc,()=>{const _0x15a3da=_0x38a546;try{const _0x5198ad=_0x28e5e5['env'](_0x5431b3)[_0x15a3da(0x3c4)]['get'](_0x2590b5[_0x15a3da(0x154)]);if(!_0x5198ad?.[_0x15a3da(0x216)])return[];const _0x5819a9=[];for(const {key:_0x946436}of _0x5198ad[_0x15a3da(0x216)][_0x15a3da(0x117)]({'limit':0x32})){_0x5819a9[_0x15a3da(0x3fc)](String(_0x946436));if(_0x5819a9[_0x15a3da(0x3f0)]>=0x32)break;}return _0x5819a9;}catch{return[];}});case _0x38a546(0x146):if(!_0x2590b5[_0x38a546(0x154)])return[];return _0x57bb3d(_0x38a546(0x2f4)+_0x5431b3+':'+_0x2590b5[_0x38a546(0x154)],0x7d0,()=>{const _0x471105=_0x38a546;try{const _0x465584=_0x28e5e5[_0x471105(0x233)](_0x5431b3)['typeSubDbs'][_0x471105(0x1dc)](_0x2590b5[_0x471105(0x154)]);return _0x465584?[..._0x465584['indexToDb']?.[_0x471105(0x39c)]()??[]]:[];}catch{return[];}});case'ftsName':if(!_0x2590b5['type'])return[];return _0x57bb3d(_0x38a546(0x261)+_0x5431b3+':'+_0x2590b5[_0x38a546(0x154)],0x7d0,()=>{const _0x22b9ef=_0x38a546;try{return _0x28e5e5['fts']?.[_0x22b9ef(0x3cf)]?.(_0x2590b5[_0x22b9ef(0x154)],_0x28e5e5[_0x22b9ef(0x233)](_0x5431b3))?.[_0x22b9ef(0x3a3)](_0x3a436e=>_0x3a436e[_0x22b9ef(0x3df)])??[];}catch{return[];}});default:return[];}}function _0x4ba30b(_0x7bb997,_0x4846ac,_0x227d31,_0x5e3c91){const _0xb94f33=_0x2bedd6,_0x50fccb=_0x7bb997[_0xb94f33(0x3e9)]('/'),_0x3c5eed=_0x7bb997[_0xb94f33(0x2ab)]('/'),_0x28c285=_0x50fccb?_0x3c5eed[_0xb94f33(0x400)](0x0,-0x1):_0x3c5eed['slice'](0x0,-0x1),_0x112480=_0x50fccb?'':_0x3c5eed[_0x3c5eed['length']-0x1];let _0x49de44=_0x4846ac;const _0x43a6fb={};for(const _0x291ec5 of _0x28c285){if(!_0x291ec5)continue;if(_0x49de44[_0xb94f33(0x35c)][_0xb94f33(0x170)](_0x291ec5))_0x49de44=_0x49de44[_0xb94f33(0x35c)][_0xb94f33(0x1dc)](_0x291ec5);else{if(_0x49de44[_0xb94f33(0x115)])_0x43a6fb[_0x49de44['dynamic'][_0xb94f33(0x20f)]]=_0x291ec5,_0x49de44=_0x49de44[_0xb94f33(0x115)][_0xb94f33(0x2de)];else return[];}}const _0x320ccf=_0x28c285[_0xb94f33(0x199)](Boolean),_0x2f7688=_0x320ccf[_0xb94f33(0x3f0)]?_0x320ccf[_0xb94f33(0x2fe)]('/')+'/':'',_0x2c8daa=[];for(const [_0x39154d]of _0x49de44[_0xb94f33(0x35c)]){if(_0x39154d[_0xb94f33(0x3d9)](_0x112480))_0x2c8daa['push'](_0x2f7688+_0x39154d);}if(_0x49de44['dynamic'])for(const _0x34f8cc of _0x478dbe(_0x49de44['dynamic'][_0xb94f33(0x20f)],_0x43a6fb,_0x227d31,_0x5e3c91)){if(String(_0x34f8cc)[_0xb94f33(0x3d9)](_0x112480))_0x2c8daa[_0xb94f33(0x3fc)](_0x2f7688+_0x34f8cc);}return _0x2c8daa['slice'](0x0,0x64);}const _0x1f87f0=[_0x2bedd6(0x2b7),_0x2bedd6(0x192),'env',_0x2bedd6(0x3b1),_0x2bedd6(0x18d),_0x2bedd6(0x1c7),_0x2bedd6(0x3e1),_0x2bedd6(0x1b5),_0x2bedd6(0x209),'quit'];function _0x58002d(_0x5eb95c,_0x2e8b31,_0x2c25e1){return function _0x2b934d(_0x3a7af7){const _0x378354=_0x1936;try{const _0x5db98c=_0x3a7af7[_0x378354(0x3e4)](/\s[{[]/),_0x1eea31=_0x5db98c>=0x0?_0x3a7af7['slice'](0x0,_0x5db98c):_0x3a7af7,_0x1d1e8c=_0x1eea31[_0x378354(0x1af)]();if(!_0x1d1e8c){const _0x598f7b=[..._0x1f87f0,...[..._0x5eb95c[_0x378354(0x35c)]['keys']()]][_0x378354(0x400)](0x0,0x64);return[_0x598f7b,''];}const _0x35fa03=_0x1d1e8c['split'](/\s+/),_0x526904=_0x35fa03[0x0],_0x4d9f64=_0x526904[_0x378354(0x22d)]();if(_0x35fa03['length']===0x1){const _0x17fdf3=_0x526904[_0x378354(0x1a0)](),_0x12aef2=_0x1f87f0[_0x378354(0x199)](_0x3f3ca8=>_0x3f3ca8[_0x378354(0x3d9)](_0x17fdf3)),_0x274775=_0x4ba30b(_0x526904,_0x5eb95c,_0x2e8b31,_0x2c25e1),_0x579387=[...new Set([..._0x12aef2,..._0x274775])][_0x378354(0x400)](0x0,0x64);return[_0x579387,_0x526904];}if(_0x4e9927[_0x378354(0x170)](_0x4d9f64)&&_0x35fa03[_0x378354(0x3f0)]===0x2){const _0x363c69=_0x35fa03[0x1],_0x1fcd52=_0x4ba30b(_0x363c69,_0x5eb95c,_0x2e8b31,_0x2c25e1);return[_0x1fcd52[_0x378354(0x3a3)](_0x88181e=>_0x526904+'\x20'+_0x88181e),_0x526904+'\x20'+_0x363c69];}if(!_0x4e9927['has'](_0x4d9f64)&&_0x35fa03[_0x378354(0x3f0)]>0x1){const _0x27e643=_0x4ba30b(_0x526904,_0x5eb95c,_0x2e8b31,_0x2c25e1),_0x35b421='\x20'+_0x35fa03[_0x378354(0x400)](0x1)[_0x378354(0x2fe)]('\x20');return[_0x27e643[_0x378354(0x3a3)](_0x2029d8=>_0x2029d8+_0x35b421),_0x526904+_0x35b421];}return[[],_0x3a7af7];}catch{return[[],_0x3a7af7];}};}async function _0x5cfe4a(_0x402713,_0x1752af){const _0xa422f0=_0x2bedd6,_0x4dd907={'enabled':!![],'level':_0x1752af['logLevel']??_0xa422f0(0x2ed)},_0x362b66={'env':'default'},_0x2aa28d={'current':null},_0x234bf9=_0x452092(_0x402713[_0xa422f0(0x226)][_0xa422f0(0x2b3)]()),_0xa8fb24=_0x58002d(_0x234bf9,_0x402713,_0x362b66);_0x402713['log']['attach'](_0x2c8dba=>{const _0x16f378=_0xa422f0;if(!_0x4dd907[_0x16f378(0x15c)])return;_0x27e487(_0x2c8dba,_0x4dd907['level']),_0x2aa28d['current']?.[_0x16f378(0x1ce)](!![]);}),_0x32e8b1(_0x402713,_0x1752af);const _0x2d1858=_0x2163f2[_0xa422f0(0x38e)]({'input':process[_0xa422f0(0x27d)],'output':process[_0xa422f0(0x379)],'terminal':!![],'completer':_0xa8fb24,'prompt':_0x219820(_0x362b66),'historySize':_0x2d3749});try{const _0x28f041=_0x49ed69['readFileSync'](_0x96dfe1,_0xa422f0(0x3fb))[_0xa422f0(0x2ab)]('\x0a')['filter'](Boolean);_0x2d1858[_0xa422f0(0x3b4)]=_0x28f041[_0xa422f0(0x327)]()[_0xa422f0(0x400)](0x0,_0x2d3749);}catch{}return _0x2aa28d[_0xa422f0(0x234)]=_0x2d1858,_0x2d1858['on'](_0xa422f0(0x223),async _0xe472ef=>{const _0x3df708=_0xa422f0;_0x2d1858[_0x3df708(0x3f7)]();try{await _0x58128f(_0xe472ef,_0x402713,_0x1752af,_0x4dd907,_0x362b66,_0x2d1858);}catch(_0x5d9311){console[_0x3df708(0x350)](_0x3b5ce0(_0x46420b['red'],_0x3df708(0x144)+_0x5d9311[_0x3df708(0x213)]));}finally{_0x2d1858[_0x3df708(0x3d0)](),_0x2d1858['prompt']();}}),_0x2d1858['on'](_0xa422f0(0x126),()=>{const _0x6cf676=_0xa422f0;try{const _0x38f0a9=[..._0x2d1858[_0x6cf676(0x3b4)]][_0x6cf676(0x327)]()[_0x6cf676(0x199)](Boolean)['slice'](0x0,_0x2d3749);_0x49ed69[_0x6cf676(0x22e)](_0x96dfe1,_0x38f0a9[_0x6cf676(0x2fe)]('\x0a')+'\x0a');}catch{}_0x2f31e3(_0x402713,0x0);}),process['on']('SIGINT',()=>{const _0x3b5537=_0xa422f0;if(_0x2d1858[_0x3b5537(0x223)]==='')_0x2f31e3(_0x402713,0x0);else process[_0x3b5537(0x379)]['write']('\x0a'),_0x2d1858[_0x3b5537(0x179)](0x0),_0x2d1858[_0x3b5537(0x1ce)]();}),process['on'](_0xa422f0(0x31e),()=>_0x2f31e3(_0x402713,0x0)),_0x2d1858['prompt'](),_0x2d1858;}return okdbShell={'start':_0x5cfe4a,'colorLog':_0x27e487,'lenientParse':_0x5e0cdb,'_splitLine':_0x38a97f,'_formatRouteHelpLines':_0x10a2c9,'_routeSummary':_0x33c1be,'_routeTags':_0x54dc0a},okdbShell;}var hasRequiredOkdb;function requireOkdb(){const _0x4ed8a2=_0x60de39;if(hasRequiredOkdb)return okdb$1;hasRequiredOkdb=0x1;try{process[_0x4ed8a2(0x244)]();}catch{}const _0x3052ea=require$$1$1,_0x27aed7=require$$1;function _0x210bd0(_0x2e5914){const _0x39f9aa=_0x4ed8a2,_0x544992=_0x2e5914[_0x39f9aa(0x400)](0x2),_0x5e58b3={};let _0x4a2d97=0x0;while(_0x4a2d97<_0x544992[_0x39f9aa(0x3f0)]){const _0x305b0f=_0x544992[_0x4a2d97];if(_0x305b0f===_0x39f9aa(0x185)||_0x305b0f==='-p')_0x5e58b3[_0x39f9aa(0x12e)]=Number(_0x544992[++_0x4a2d97]);else{if(_0x305b0f===_0x39f9aa(0x1a9)||_0x305b0f==='-d')_0x5e58b3[_0x39f9aa(0x33c)]=_0x544992[++_0x4a2d97];else{if(_0x305b0f===_0x39f9aa(0x241)||_0x305b0f==='-k')_0x5e58b3['key']=_0x544992[++_0x4a2d97];else{if(_0x305b0f==='--config'||_0x305b0f==='-c')_0x5e58b3[_0x39f9aa(0x25b)]=_0x544992[++_0x4a2d97];else{if(_0x305b0f===_0x39f9aa(0x3cd))_0x5e58b3['logLevel']=_0x544992[++_0x4a2d97];else{if(_0x305b0f===_0x39f9aa(0x260))_0x5e58b3['noRepl']=!![];else{if(_0x305b0f===_0x39f9aa(0x2f0))_0x5e58b3[_0x39f9aa(0x1fe)]=!![];else{if(_0x305b0f===_0x39f9aa(0x2af)||_0x305b0f==='-e')_0x5e58b3[_0x39f9aa(0x233)]=_0x544992[++_0x4a2d97];else{if(_0x305b0f===_0x39f9aa(0x166))_0x5e58b3[_0x39f9aa(0x18d)]=_0x544992[++_0x4a2d97];else{if(_0x305b0f===_0x39f9aa(0x3b5))_0x5e58b3[_0x39f9aa(0x326)]=!![];else{if(_0x305b0f===_0x39f9aa(0x34c))_0x5e58b3[_0x39f9aa(0x17b)]=!![];else{if(_0x305b0f===_0x39f9aa(0x279))_0x5e58b3['drop']=!![];else{if(_0x305b0f===_0x39f9aa(0x274)){const _0x2c1df8=[];while(_0x4a2d97+0x1<_0x544992[_0x39f9aa(0x3f0)]&&!_0x544992[_0x4a2d97+0x1][_0x39f9aa(0x3d9)]('--')){_0x2c1df8[_0x39f9aa(0x3fc)](_0x544992[++_0x4a2d97]);}_0x5e58b3[_0x39f9aa(0x1b5)]=_0x2c1df8['length']>0x0?_0x2c1df8:!![];}else{if(_0x305b0f===_0x39f9aa(0x334))_0x5e58b3[_0x39f9aa(0x35a)]=!![];else{if(_0x305b0f===_0x39f9aa(0x196))_0x5e58b3[_0x39f9aa(0x3df)]=_0x544992[++_0x4a2d97];else{if(_0x305b0f===_0x39f9aa(0x224))_0x5e58b3[_0x39f9aa(0x368)]=_0x544992[++_0x4a2d97];else{if(_0x305b0f===_0x39f9aa(0x251))_0x5e58b3[_0x39f9aa(0x35e)]=_0x544992[++_0x4a2d97];else{if(_0x305b0f===_0x39f9aa(0x2d5))_0x5e58b3['permissions']=_0x544992[++_0x4a2d97];else{if(_0x305b0f==='--grants')_0x5e58b3[_0x39f9aa(0x1ad)]=_0x544992[++_0x4a2d97];else{if(_0x305b0f==='--ttl')_0x5e58b3[_0x39f9aa(0x2c0)]=_0x544992[++_0x4a2d97];else{if(_0x305b0f===_0x39f9aa(0x26b))_0x5e58b3[_0x39f9aa(0x359)]=_0x544992[++_0x4a2d97];else{if(_0x305b0f==='--username'||_0x305b0f==='-u')_0x5e58b3[_0x39f9aa(0x147)]=_0x544992[++_0x4a2d97];else{if(_0x305b0f==='--address')_0x5e58b3[_0x39f9aa(0x21c)]=_0x544992[++_0x4a2d97];else{if(_0x305b0f===_0x39f9aa(0x2ec)||_0x305b0f==='-v'){const _0x3fa0e8=require$$2;console['log'](_0x3fa0e8['version']),process[_0x39f9aa(0x209)](0x0);}else(_0x305b0f===_0x39f9aa(0x227)||_0x305b0f==='-h')&&(_0x17cd88(),process[_0x39f9aa(0x209)](0x0));}}}}}}}}}}}}}}}}}}}}}}}_0x4a2d97++;}return _0x5e58b3;}function _0x17cd88(){const _0x59e9bb=_0x4ed8a2;console[_0x59e9bb(0x22f)](_0x59e9bb(0x136));}const _0x1083e8=new Set(['debug',_0x4ed8a2(0x2ed),_0x4ed8a2(0x1b0),_0x4ed8a2(0x350)]);function _0x437348(_0x3d023b){const _0xd72c42=_0x4ed8a2,_0x40326f=_0x3d023b[_0xd72c42(0x25b)]?_0x3052ea['resolve'](_0x3d023b['config']):_0x3052ea[_0xd72c42(0x20b)](_0xd72c42(0x2d8));let _0x5b031e={};if(_0x27aed7['existsSync'](_0x40326f))try{const _0x11aaab=_0x27aed7[_0xd72c42(0x33f)](_0x40326f,'utf8')[_0xd72c42(0x210)](/^\uFEFF/,'');_0x5b031e=JSON[_0xd72c42(0x1ee)](_0x11aaab),console[_0xd72c42(0x22f)](_0xd72c42(0x355)+_0x40326f);}catch(_0x59aa2b){console['error']('[okdb]\x20failed\x20to\x20parse\x20config\x20file\x20'+_0x40326f+':\x20'+_0x59aa2b[_0xd72c42(0x213)]),process['exit'](0x1);}const _0x33df37={'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},_0x256124={'port':_0x3d023b[_0xd72c42(0x12e)]??_0x5b031e[_0xd72c42(0x12e)]??_0x33df37[_0xd72c42(0x12e)]??0x2124,'dbPath':_0x3d023b['path']??_0x5b031e[_0xd72c42(0x33c)]??_0x33df37[_0xd72c42(0x33c)]??_0xd72c42(0x398),'key':_0x3d023b[_0xd72c42(0x277)]??_0x5b031e[_0xd72c42(0x277)]??_0x33df37[_0xd72c42(0x277)]??undefined,'logLevel':_0x3d023b[_0xd72c42(0x286)]??_0x5b031e[_0xd72c42(0x286)]??_0x33df37['logLevel']??_0xd72c42(0x2ed),'noRepl':_0x3d023b[_0xd72c42(0x397)]??_0x5b031e[_0xd72c42(0x397)]??_0x33df37[_0xd72c42(0x397)]??![],'noAdmin':_0x3d023b['noAdmin']??_0x5b031e[_0xd72c42(0x1fe)]??_0x33df37[_0xd72c42(0x1fe)]??![],'admin':_0x5b031e[_0xd72c42(0x229)]??{},'api':_0x5b031e[_0xd72c42(0x206)]??undefined,'auth':_0x5b031e[_0xd72c42(0x3ac)]??undefined,'mcp':_0x5b031e[_0xd72c42(0x40a)]??undefined,'timeMachine':_0x5b031e[_0xd72c42(0x247)]!==![]?_0x5b031e[_0xd72c42(0x247)]??{}:![]};return _0x3d023b[_0xd72c42(0x1b5)]!==undefined&&(_0x256124[_0xd72c42(0x3ac)]=_0x256124[_0xd72c42(0x3ac)]||{},_0x256124[_0xd72c42(0x3ac)]['open']=_0x3d023b[_0xd72c42(0x1b5)]),_0x3d023b[_0xd72c42(0x35a)]&&(_0x256124[_0xd72c42(0x3f2)]=_0x256124[_0xd72c42(0x3f2)]||{},_0x256124[_0xd72c42(0x3f2)][_0xd72c42(0x35a)]=!![]),(!Number[_0xd72c42(0x23f)](_0x256124[_0xd72c42(0x12e)])||_0x256124[_0xd72c42(0x12e)]<0x1||_0x256124[_0xd72c42(0x12e)]>0xffff)&&(console[_0xd72c42(0x350)](_0xd72c42(0x12c)+_0x256124[_0xd72c42(0x12e)]+_0xd72c42(0x15f)),process['exit'](0x1)),!_0x1083e8[_0xd72c42(0x170)](_0x256124[_0xd72c42(0x286)])&&(console[_0xd72c42(0x350)](_0xd72c42(0x2dd)+_0x256124[_0xd72c42(0x286)]+'\x22\x20(must\x20be\x20debug|info|warn|error)'),process[_0xd72c42(0x209)](0x1)),_0x256124;}function _0x8b67c(_0x1da43c){const _0x479b9d=_0x4ed8a2;return!!(_0x1da43c&&typeof _0x1da43c===_0x479b9d(0x371)&&!Array[_0x479b9d(0x217)](_0x1da43c)&&Object['keys'](_0x1da43c)['length']>0x0);}const _0x53cbd7=!process[_0x4ed8a2(0x379)]['isTTY']||!!process.env.NO_COLOR;function _0x43cf5b(_0x323886,_0x402671){const _0x20f783=_0x4ed8a2;return _0x53cbd7?_0x402671:'\x1b['+_0x323886+'m'+_0x402671+_0x20f783(0x13b);}function _0x4e0816(_0xfd07ab){const _0x49efb3=_0x4ed8a2;if(!_0xfd07ab||_0xfd07ab[_0x49efb3(0x3f0)]===0x0)return;const _0x559255='─'[_0x49efb3(0x29c)](0x38);process[_0x49efb3(0x383)]['write']('\x0a'),process[_0x49efb3(0x383)][_0x49efb3(0x375)](_0x43cf5b('33',_0x49efb3(0x31d)+_0xfd07ab[_0x49efb3(0x3f0)]+'\x20SECURITY\x20NOTICE'+(_0xfd07ab[_0x49efb3(0x3f0)]>0x1?'S':'')+'\x0a')),process[_0x49efb3(0x383)]['write']('\x20\x20'+_0x559255+'\x0a');for(const _0x2dbba2 of _0xfd07ab){const _0x21c175=_0x2dbba2[_0x49efb3(0x273)]===_0x49efb3(0x350)?_0x43cf5b('31',_0x49efb3(0x1dd)):_0x43cf5b('33',_0x49efb3(0x239));process[_0x49efb3(0x383)][_0x49efb3(0x375)](_0x21c175+'\x20\x20'+_0x43cf5b('1',_0x2dbba2[_0x49efb3(0x39d)])+'\x0a'),process[_0x49efb3(0x383)][_0x49efb3(0x375)](_0x49efb3(0x27e)+_0x2dbba2[_0x49efb3(0x213)]+'\x0a');if(_0x2dbba2[_0x49efb3(0x362)])process[_0x49efb3(0x383)][_0x49efb3(0x375)](_0x49efb3(0x27e)+_0x43cf5b('2',_0x49efb3(0x332)+_0x2dbba2[_0x49efb3(0x362)])+'\x0a');process[_0x49efb3(0x383)][_0x49efb3(0x375)]('\x0a');}process['stderr']['write']('\x20\x20'+_0x559255+'\x0a\x0a');}function _0x30ea5d(_0x3d09b8,_0x5a6382){const _0x5782fd=_0x4ed8a2,_0x123ada=_0x3d09b8[_0x5782fd(0x226)]['listen'](_0x5a6382);return new Promise((_0xd02e41,_0x1aa5dc)=>{const _0x52c691=_0x5782fd;_0x123ada[_0x52c691(0x1d2)](_0x52c691(0x12d),_0xd02e41),_0x123ada[_0x52c691(0x1d2)]('error',_0x1aa5dc);});}async function _0x579f6d(_0x286ba5){const _0x4635fc=_0x4ed8a2,_0xf9550b=require$$3;console[_0x4635fc(0x22f)]('\x0a\x20\x20okdb\x20doctor\x0a');let _0x35e9ea=!![];const _0x512e6f=(_0x62b32e,_0x112514)=>{console['log']('\x20\x20'+(_0x62b32e?'✓':'✗')+'\x20'+_0x112514);if(!_0x62b32e)_0x35e9ea=![];},_0x44ee92=Number(process['version'][_0x4635fc(0x210)]('v','')[_0x4635fc(0x2ab)]('.')[0x0]);_0x512e6f(_0x44ee92>=0x12,_0x4635fc(0x266)+process[_0x4635fc(0x2a8)]+(_0x44ee92<0x12?'\x20\x20(need\x20≥\x2018)':''));const _0x3aeabb=_0x3052ea[_0x4635fc(0x20b)](_0x286ba5[_0x4635fc(0x352)]);try{_0x27aed7[_0x4635fc(0x1b9)](_0x3aeabb,{'recursive':!![]});const _0x2394b3=_0x3052ea[_0x4635fc(0x2fe)](_0x3aeabb,_0x4635fc(0x1cb));_0x27aed7[_0x4635fc(0x22e)](_0x2394b3,''),_0x27aed7[_0x4635fc(0x35d)](_0x2394b3),_0x512e6f(!![],'database\x20path\x20writable:\x20'+_0x3aeabb);}catch(_0x239c3a){_0x512e6f(![],_0x4635fc(0x309)+_0x3aeabb+'\x20\x20('+_0x239c3a['message']+')');}const _0x1a1a97=await new Promise(_0x3638f4=>{const _0x159618=_0x4635fc,_0x1d18a4=_0xf9550b[_0x159618(0x2d6)]();_0x1d18a4['once']('error',()=>_0x3638f4(![])),_0x1d18a4[_0x159618(0x1d2)](_0x159618(0x12d),()=>{const _0x439dd0=_0x159618;_0x1d18a4[_0x439dd0(0x126)](),_0x3638f4(!![]);}),_0x1d18a4[_0x159618(0x37d)](_0x286ba5[_0x159618(0x12e)],_0x159618(0x20a));});_0x512e6f(_0x1a1a97,_0x4635fc(0x19b)+_0x286ba5['port']+'\x20'+(_0x1a1a97?'available':_0x4635fc(0x131)));const _0x431dd=_0x3052ea[_0x4635fc(0x20b)](_0x4635fc(0x2d8));if(_0x27aed7[_0x4635fc(0x1c0)](_0x431dd))try{JSON[_0x4635fc(0x1ee)](_0x27aed7[_0x4635fc(0x33f)](_0x431dd,_0x4635fc(0x3fb))['replace'](/^\uFEFF/,'')),_0x512e6f(!![],'config\x20file\x20valid:\x20'+_0x431dd);}catch(_0xca49a4){_0x512e6f(![],_0x4635fc(0x32c)+_0xca49a4[_0x4635fc(0x213)]);}else _0x512e6f(!![],'no\x20.kdbconfig\x20(using\x20defaults)');console[_0x4635fc(0x22f)](''),_0x35e9ea?console['log'](_0x4635fc(0x31a)):(console['log'](_0x4635fc(0x406)),process[_0x4635fc(0x209)](0x1));}async function _0x407bf3(){const _0x4c142f=_0x4ed8a2,_0x242c61=_0x3052ea['resolve']('.kdbconfig');!_0x27aed7[_0x4c142f(0x1c0)](_0x242c61)?(_0x27aed7['writeFileSync'](_0x242c61,JSON[_0x4c142f(0x1ed)]({'port':0x2124,'path':'./okdb-data','logLevel':_0x4c142f(0x2ed),'noRepl':![],'noAdmin':![]},null,0x2)+'\x0a'),console['log'](_0x4c142f(0x29f))):console[_0x4c142f(0x22f)](_0x4c142f(0x11e));const _0x359caa=_0x3052ea[_0x4c142f(0x20b)](_0x4c142f(0x398));!_0x27aed7[_0x4c142f(0x1c0)](_0x359caa)?(_0x27aed7[_0x4c142f(0x1b9)](_0x359caa,{'recursive':!![]}),console[_0x4c142f(0x22f)]('[okdb]\x20created\x20./okdb-data')):console[_0x4c142f(0x22f)](_0x4c142f(0x1ca)),console[_0x4c142f(0x22f)](_0x4c142f(0x2e8));}async function _0x6a4746(_0x4c7f08){const _0x35ba63=_0x4ed8a2,_0x49ed2d=_0x3052ea[_0x35ba63(0x20b)](_0x4c7f08[_0x35ba63(0x352)]);if(!_0x27aed7[_0x35ba63(0x1c0)](_0x49ed2d)){console[_0x35ba63(0x22f)]('[okdb]\x20nothing\x20to\x20reset\x20—\x20'+_0x49ed2d+_0x35ba63(0x3fd));return;}const _0x43a699=require$$0$2,_0x529891=_0x43a699[_0x35ba63(0x38e)]({'input':process[_0x35ba63(0x27d)],'output':process['stdout']}),_0x1a29f9=await new Promise(_0x3c8d6f=>_0x529891[_0x35ba63(0x329)](_0x35ba63(0x2eb)+_0x49ed2d+'?\x0a\x20\x20Type\x20\x22yes\x22\x20to\x20confirm:\x20',_0x3c8d6f));_0x529891[_0x35ba63(0x126)](),console['log']('');if(_0x1a29f9['trim']()['toLowerCase']()!==_0x35ba63(0x2b5)){console[_0x35ba63(0x22f)]('[okdb]\x20reset\x20aborted');return;}_0x27aed7[_0x35ba63(0x157)](_0x49ed2d,{'recursive':!![],'force':!![]}),console[_0x35ba63(0x22f)]('[okdb]\x20reset:\x20'+_0x49ed2d+'\x20deleted');}async function _0x3b9607(_0x34620a,_0x5993a5){const _0x38cea7=_0x4ed8a2,_0x20eb1c=require$$5,_0x147cde=_0x3052ea[_0x38cea7(0x20b)](_0x5993a5['dbPath']);console[_0x38cea7(0x22f)](_0x38cea7(0x3cc)+_0x147cde+'…');const _0x2033f3=new _0x20eb1c(_0x147cde,_0x5993a5['key']?{'encryptionKey':_0x5993a5[_0x38cea7(0x277)]}:{});await _0x2033f3[_0x38cea7(0x1b5)](),console[_0x38cea7(0x22f)](_0x38cea7(0x280)+_0x34620a+'…');const {envs:_0x16eecb}=await _0x2033f3[_0x38cea7(0x150)][_0x38cea7(0x2cb)](_0x34620a);for(const _0x4a7200 of _0x16eecb){const _0x21b752=_0x4a7200['sizeBefore']>0x0?_0x38cea7(0x3d5)+(_0x4a7200[_0x38cea7(0x365)]/0x400/0x400)['toFixed'](0x2)+'\x20MB\x20→\x20'+(_0x4a7200[_0x38cea7(0x3f9)]/0x400/0x400)[_0x38cea7(0x1b8)](0x2)+'\x20MB)':'';console[_0x38cea7(0x22f)](_0x38cea7(0x304)+_0x4a7200['name']+_0x38cea7(0x303)+_0x4a7200['dest']+_0x21b752);}await _0x2033f3[_0x38cea7(0x126)](),console['log'](_0x38cea7(0x25d));}async function _0x1eb4b7(_0x5b8263,_0x2133c0,_0xe53570){const _0x3954a8=_0x4ed8a2,_0x462f4e=require$$5,_0x4ff05e=_0x3052ea['resolve'](_0x2133c0[_0x3954a8(0x352)]),_0x4a745b=_0xe53570[_0x3954a8(0x233)]??_0x3954a8(0x113),_0x585549=_0xe53570[_0x3954a8(0x18d)]?_0xe53570['types']['split'](',')[_0x3954a8(0x3a3)](_0x464f89=>_0x464f89[_0x3954a8(0x33a)]()):null;console[_0x3954a8(0x22f)](_0x3954a8(0x3cc)+_0x4ff05e+'…');const _0x41162d=new _0x462f4e(_0x4ff05e,_0x2133c0[_0x3954a8(0x277)]?{'encryptionKey':_0x2133c0['key']}:{});await _0x41162d[_0x3954a8(0x1b5)](),console[_0x3954a8(0x22f)](_0x3954a8(0x281)+_0x4a745b+_0x3954a8(0x34d)+_0x5b8263+'…');const _0x48f4bd=await _0x41162d[_0x3954a8(0x150)][_0x3954a8(0x168)](_0x5b8263,{'envName':_0x4a745b,'types':_0x585549,'includeChanges':!!_0xe53570[_0x3954a8(0x326)]});console['log'](_0x3954a8(0x3a5)+_0x48f4bd[_0x3954a8(0x18d)]+'\x20\x20records='+_0x48f4bd[_0x3954a8(0x220)]+_0x3954a8(0x2d1)+_0x48f4bd[_0x3954a8(0x326)]);if(_0xe53570[_0x3954a8(0x17b)]){const _0x3cc0db=_0x3052ea['join'](_0x3052ea[_0x3954a8(0x3a2)](_0x5b8263),_0x3954a8(0x17b));process[_0x3954a8(0x379)][_0x3954a8(0x375)](_0x3954a8(0x2ce));const {count:_0x4d2d9a,bytes:_0x3593db}=await _0x41162d[_0x3954a8(0x150)][_0x3954a8(0x1e5)](_0x3cc0db);console[_0x3954a8(0x22f)](_0x3954a8(0x2ee)+_0x3cc0db+_0x3954a8(0x3d5)+_0x4d2d9a+_0x3954a8(0x15e)+(_0x4d2d9a!==0x1?'s':'')+',\x20'+(_0x3593db/0x400/0x400)['toFixed'](0x2)+_0x3954a8(0x122));}await _0x41162d[_0x3954a8(0x126)](),console[_0x3954a8(0x22f)](_0x3954a8(0x2cf));}async function _0x50a5c8(_0x22d85c,_0x8a3bdd,_0x2185f5){const _0x1c2e5e=_0x4ed8a2,_0xe8fe12=require$$5,_0x47c874=_0x3052ea[_0x1c2e5e(0x20b)](_0x8a3bdd[_0x1c2e5e(0x352)]),_0x300aeb=_0x2185f5[_0x1c2e5e(0x233)]??null,_0xc40d7a=_0x2185f5[_0x1c2e5e(0x18d)]?_0x2185f5[_0x1c2e5e(0x18d)]['split'](',')[_0x1c2e5e(0x3a3)](_0xd1f7ff=>_0xd1f7ff[_0x1c2e5e(0x33a)]()):null,_0x3a9dd5=!!_0x2185f5[_0x1c2e5e(0x176)];console[_0x1c2e5e(0x22f)](_0x1c2e5e(0x3cc)+_0x47c874+'…');const _0x4f5c89=new _0xe8fe12(_0x47c874,_0x8a3bdd[_0x1c2e5e(0x277)]?{'encryptionKey':_0x8a3bdd[_0x1c2e5e(0x277)]}:{});await _0x4f5c89['open'](),console[_0x1c2e5e(0x22f)](_0x1c2e5e(0x2dc)+_0x22d85c+'…');const _0xc378fd=await _0x4f5c89[_0x1c2e5e(0x150)][_0x1c2e5e(0x1b3)](_0x22d85c,{'envName':_0x300aeb,'types':_0xc40d7a,'dropExisting':_0x3a9dd5,'includeChanges':!!_0x2185f5[_0x1c2e5e(0x326)],'onProgress':({type:_0x4be861,count:_0x302760})=>{const _0x486d09=_0x1c2e5e;process['stdout'][_0x486d09(0x375)](_0x486d09(0x222)+_0x4be861+':\x20'+_0x302760+'\x20records…');}});process['stdout']['write']('\x0a'),console[_0x1c2e5e(0x22f)](_0x1c2e5e(0x3c0)+_0xc378fd[_0x1c2e5e(0x18d)]+_0x1c2e5e(0x238)+_0xc378fd[_0x1c2e5e(0x220)]+_0x1c2e5e(0x2d1)+_0xc378fd['changes']);if(_0x2185f5[_0x1c2e5e(0x17b)]){const _0x2f6024=_0x3052ea[_0x1c2e5e(0x2fe)](_0x3052ea[_0x1c2e5e(0x3a2)](_0x22d85c),_0x1c2e5e(0x17b));if(_0x27aed7['existsSync'](_0x2f6024)){const {imported:_0xa5835e,skipped:_0x3c8357}=await _0x4f5c89[_0x1c2e5e(0x150)][_0x1c2e5e(0x3c2)](_0x2f6024);console['log'](_0x1c2e5e(0x27c)+_0xa5835e+_0x1c2e5e(0x240)+_0x3c8357);}}await _0x4f5c89[_0x1c2e5e(0x126)](),console[_0x1c2e5e(0x22f)](_0x1c2e5e(0x390));}async function _0x2e702d(_0xe29f10,_0x4a72e3){const _0x3ce806=_0x4ed8a2;_0x4a72e3[_0x3ce806(0x368)]&&!_0x4a72e3[_0x3ce806(0x3df)]&&(console[_0x3ce806(0x350)](_0x3ce806(0x3fa)),process[_0x3ce806(0x209)](0x1));const _0x494b35=_0x4a72e3[_0x3ce806(0x377)]?_0x4a72e3[_0x3ce806(0x377)]['split'](',')[_0x3ce806(0x3a3)](_0x14111b=>_0x14111b[_0x3ce806(0x33a)]())[_0x3ce806(0x199)](Boolean):[];let _0x1a92f1={};if(_0x4a72e3[_0x3ce806(0x1ad)])try{_0x1a92f1=JSON[_0x3ce806(0x1ee)](_0x4a72e3[_0x3ce806(0x1ad)]);if(typeof _0x1a92f1!==_0x3ce806(0x371)||Array[_0x3ce806(0x217)](_0x1a92f1)||_0x1a92f1===null)throw new Error();}catch{console[_0x3ce806(0x350)](_0x3ce806(0x253)),process['exit'](0x1);}const _0x405fd3=require$$5,{randomToken:_0x407322,hashToken:_0x4485b0,hashPassword:_0x13b464}=requireOkdbAuthTokens(),_0x20aef9=require$$0,_0x279775=_0x3052ea[_0x3ce806(0x20b)](_0xe29f10['dbPath']),_0x3f6606=new _0x405fd3(_0x279775,_0xe29f10[_0x3ce806(0x277)]?{'encryptionKey':_0xe29f10['key']}:{});await _0x3f6606['open']();try{await _0x3f6606[_0x3ce806(0x3ac)]['_ensureTokensType']();if(_0x4a72e3['name']){const _0x1a6d6f=await _0x3f6606[_0x3ce806(0x3ac)][_0x3ce806(0x1c2)](_0x4a72e3[_0x3ce806(0x3df)]);_0x1a6d6f&&(console[_0x3ce806(0x350)](_0x3ce806(0x202)+_0x4a72e3[_0x3ce806(0x3df)]+_0x3ce806(0x363)),process['exit'](0x1));}const _0x463ba8=_0x407322(0x20),_0x4c07dd=_0x4485b0(_0x463ba8),_0x14573c=_0x4a72e3[_0x3ce806(0x368)]?await _0x13b464(_0x4a72e3[_0x3ce806(0x368)]):null,_0x5416f4=_0x20aef9[_0x3ce806(0x1c1)](),_0x26f496={'tokenHash':_0x4c07dd,'name':_0x4a72e3['name']||null,'passwordHash':_0x14573c,'label':_0x4a72e3[_0x3ce806(0x35e)]||null,'permissions':_0x494b35,'grants':_0x1a92f1,'createdAt':Date[_0x3ce806(0x38b)](),'lastUsedAt':null},_0x5d135e=_0x4a72e3[_0x3ce806(0x2c0)]?{'ttl':Number(_0x4a72e3[_0x3ce806(0x2c0)])}:undefined;await _0x3f6606['_systemEnv'][_0x3ce806(0x3bd)]('~tokens',_0x5416f4,_0x26f496,_0x5d135e),console['log']('\x0a\x20\x20✓\x20Token\x20created'),console['log']('\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x5416f4),console[_0x3ce806(0x22f)](_0x3ce806(0x3d2)+(_0x4a72e3[_0x3ce806(0x3df)]||'(unset)')),console['log'](_0x3ce806(0x169)+(_0x4a72e3[_0x3ce806(0x35e)]||_0x3ce806(0x18a))),console[_0x3ce806(0x22f)](_0x3ce806(0x399)+(_0x494b35[_0x3ce806(0x2fe)](',\x20')||'(none)')),console[_0x3ce806(0x22f)]('\x0a\x20\x20Raw\x20token\x20(shown\x20once,\x20save\x20it\x20now):\x0a'),console[_0x3ce806(0x22f)](_0x3ce806(0x393)+_0x463ba8+'\x0a');}finally{await _0x3f6606[_0x3ce806(0x126)]();}}async function _0x2b83ed(_0x45087a){const _0x412132=_0x4ed8a2,_0x496e59=require$$5,_0x262aca=_0x3052ea[_0x412132(0x20b)](_0x45087a[_0x412132(0x352)]),_0x57ab76=new _0x496e59(_0x262aca,_0x45087a[_0x412132(0x277)]?{'encryptionKey':_0x45087a['key']}:{});await _0x57ab76[_0x412132(0x1b5)]();try{const _0x39a89c=_0x57ab76[_0x412132(0x26c)];if(!_0x39a89c||!_0x39a89c[_0x412132(0x3ef)](_0x412132(0x22c))){console[_0x412132(0x22f)]('No\x20tokens.');return;}const _0x39b77f=[];for(const {key:_0xeb89fe,value:_0x3a931c}of _0x39a89c[_0x412132(0x117)](_0x412132(0x22c))){_0x39b77f[_0x412132(0x3fc)]({'id':_0xeb89fe,'name':_0x3a931c[_0x412132(0x3df)]||_0x412132(0x18a),'label':_0x3a931c[_0x412132(0x35e)]||_0x412132(0x18a),'permissions':Array['isArray'](_0x3a931c[_0x412132(0x377)])?_0x3a931c[_0x412132(0x377)][_0x412132(0x2fe)](','):'','created':_0x3a931c[_0x412132(0x3c6)]?new Date(_0x3a931c[_0x412132(0x3c6)])['toISOString']()[_0x412132(0x400)](0x0,0xa):''});}if(_0x39b77f[_0x412132(0x3f0)]===0x0){console[_0x412132(0x22f)](_0x412132(0x331));return;}const _0x23a186=!process['stdout']['columns']||process[_0x412132(0x379)][_0x412132(0x1f1)]>=0x64,_0x5a748e=_0x23a186?0x24:0xa,_0x335524=['ID'[_0x412132(0x376)](_0x5a748e),_0x412132(0x401)[_0x412132(0x376)](0x10),_0x412132(0x3b8)[_0x412132(0x376)](0x14),_0x412132(0x2ac)[_0x412132(0x376)](0x14),_0x412132(0x165)][_0x412132(0x2fe)]('\x20\x20');console[_0x412132(0x22f)]('\x0a'+_0x335524),console[_0x412132(0x22f)]('-'['repeat'](_0x335524[_0x412132(0x3f0)]));for(const _0x5a0fef of _0x39b77f){const _0x530e1a=_0x23a186?_0x5a0fef['id']:_0x5a0fef['id'][_0x412132(0x400)](0x0,0x8)+'…';console[_0x412132(0x22f)]([_0x530e1a[_0x412132(0x376)](_0x5a748e),_0x5a0fef[_0x412132(0x3df)][_0x412132(0x400)](0x0,0x10)[_0x412132(0x376)](0x10),_0x5a0fef['label'][_0x412132(0x400)](0x0,0x14)['padEnd'](0x14),_0x5a0fef[_0x412132(0x377)][_0x412132(0x400)](0x0,0x14)[_0x412132(0x376)](0x14),_0x5a0fef['created']][_0x412132(0x2fe)]('\x20\x20'));}console['log']('');}finally{await _0x57ab76[_0x412132(0x126)]();}}async function _0x3e5bd4(_0x937a75,_0x2d0d19){const _0x1784b0=_0x4ed8a2;!_0x937a75&&(console[_0x1784b0(0x350)](_0x1784b0(0x2c7)),process[_0x1784b0(0x209)](0x1));const _0x577241=require$$5,_0x51227f=_0x3052ea[_0x1784b0(0x20b)](_0x2d0d19['dbPath']),_0x5a28cb=new _0x577241(_0x51227f,_0x2d0d19[_0x1784b0(0x277)]?{'encryptionKey':_0x2d0d19['key']}:{});await _0x5a28cb[_0x1784b0(0x1b5)]();try{const _0x3c78a0=_0x5a28cb[_0x1784b0(0x26c)];(!_0x3c78a0||!_0x3c78a0[_0x1784b0(0x3ef)](_0x1784b0(0x22c)))&&(console[_0x1784b0(0x350)](_0x1784b0(0x1f6)+_0x937a75+'\x22'),process[_0x1784b0(0x209)](0x1));let _0x29655d=null,_0x2cbfb5=null;const _0x523690=_0x3c78a0[_0x1784b0(0x1dc)](_0x1784b0(0x22c),_0x937a75);if(_0x523690)_0x29655d=_0x937a75,_0x2cbfb5=_0x523690;else{const _0xd70c64=[];for(const {key:_0x3cb58c,value:_0x5df110}of _0x3c78a0['getRange'](_0x1784b0(0x22c))){if(_0x3cb58c['startsWith'](_0x937a75))_0xd70c64[_0x1784b0(0x3fc)]({'key':_0x3cb58c,'value':_0x5df110});}_0xd70c64[_0x1784b0(0x3f0)]===0x0&&(console[_0x1784b0(0x350)](_0x1784b0(0x1f6)+_0x937a75+'\x22'),process[_0x1784b0(0x209)](0x1));if(_0xd70c64[_0x1784b0(0x3f0)]>0x1){console['error'](_0x1784b0(0x22a)+_0x937a75+'\x22\x20matches\x20'+_0xd70c64[_0x1784b0(0x3f0)]+_0x1784b0(0x351));for(const _0x495a64 of _0xd70c64){console['error']('\x20\x20'+_0x495a64[_0x1784b0(0x277)]+_0x1784b0(0x1a4)+(_0x495a64[_0x1784b0(0x13a)][_0x1784b0(0x3df)]||'(unset)')+')');}process[_0x1784b0(0x209)](0x1);}_0x29655d=_0xd70c64[0x0][_0x1784b0(0x277)],_0x2cbfb5=_0xd70c64[0x0][_0x1784b0(0x13a)];}await _0x3c78a0[_0x1784b0(0x391)](_0x1784b0(0x22c),_0x29655d),console[_0x1784b0(0x22f)](_0x1784b0(0x23e)+_0x29655d+'\x20\x20(name:\x20'+(_0x2cbfb5[_0x1784b0(0x3df)]||_0x1784b0(0x18a))+_0x1784b0(0x2c2)+(_0x2cbfb5[_0x1784b0(0x35e)]||_0x1784b0(0x18a))+')');}finally{await _0x5a28cb[_0x1784b0(0x126)]();}}function _0x3910d2(_0x79583a,_0x5154b9){const _0x14f8db=_0x4ed8a2;if(!_0x79583a['activation'])return _0x14f8db(0x2f8);const _0x755696=_0x79583a[_0x14f8db(0x389)];if(!_0x755696)return _0x14f8db(0x3db);if(_0x5154b9>_0x755696)return _0x14f8db(0x346);return'active';}function _0x2d1513(_0x3985f6){const _0x27e415=_0x4ed8a2;if(!_0x3985f6||typeof _0x3985f6!=='object')return'';const _0xf9f42d=Object[_0x27e415(0x145)](_0x3985f6)[_0x27e415(0x199)](([,_0x5ee4db])=>_0x5ee4db)['map'](([_0x15aec2])=>_0x15aec2);if(_0xf9f42d[_0x27e415(0x3f0)]===0x0)return'(none)';if(_0xf9f42d[_0x27e415(0x3f0)]<=0x3)return _0xf9f42d[_0x27e415(0x2fe)]('\x20');return _0xf9f42d[_0x27e415(0x400)](0x0,0x3)[_0x27e415(0x2fe)]('\x20')+('\x20+'+(_0xf9f42d['length']-0x3));}async function _0x53765b(_0x47c322){const _0x4dbbc6=_0x4ed8a2,_0x3053c7=require$$5,_0x4e4b2a=requireOkdbLicenseCodec(),{_C:_0x16fd7f}=requireOkdbLicense(),_0x22596f=_0x3052ea[_0x4dbbc6(0x20b)](_0x47c322[_0x4dbbc6(0x352)]),_0x333cbd=new _0x3053c7(_0x22596f,_0x47c322[_0x4dbbc6(0x277)]?{'encryptionKey':_0x47c322[_0x4dbbc6(0x277)]}:{});await _0x333cbd[_0x4dbbc6(0x1b5)]();try{const _0x1f6cc1=_0x333cbd[_0x4dbbc6(0x26c)],_0x5e7da9=_0x1f6cc1?.['db']?.['get']?.(_0x4dbbc6(0x2a6))??0x0,_0x1f27d8=[..._0x333cbd[_0x4dbbc6(0x28a)][_0x4dbbc6(0x39c)]()]['filter'](_0x4fa8fc=>!_0x4fa8fc[_0x4dbbc6(0x3d9)]('~'))[_0x4dbbc6(0x3f0)],_0x5b0e47=_0x333cbd[_0x4dbbc6(0x3ec)]?.[_0x4dbbc6(0x32f)];if(_0x5b0e47){const _0x1d7f2f=_0x5b0e47[_0x4dbbc6(0x167)]===!![],_0x35b1a8=_0x1d7f2f?_0x4dbbc6(0x2ad):_0x333cbd[_0x4dbbc6(0x3ec)][_0x4dbbc6(0x3db)]?.['licensee']||_0x4dbbc6(0x258);console[_0x4dbbc6(0x22f)](''),console[_0x4dbbc6(0x22f)](_0x4dbbc6(0x1fd)+_0x35b1a8);const _0x210f86=_0x5b0e47['limits']||{};if(_0x210f86[_0x4dbbc6(0x123)]){const _0x39206f=Math[_0x4dbbc6(0x1e8)](_0x5e7da9/_0x210f86[_0x4dbbc6(0x123)]*0x64);console[_0x4dbbc6(0x22f)]('\x20\x20Writes:\x20\x20'+_0x5e7da9[_0x4dbbc6(0x31b)]()+_0x4dbbc6(0x3e8)+_0x210f86[_0x4dbbc6(0x123)][_0x4dbbc6(0x31b)]()+_0x4dbbc6(0x3d5)+_0x39206f+'%)');}else console[_0x4dbbc6(0x22f)](_0x4dbbc6(0x1d8)+_0x5e7da9[_0x4dbbc6(0x31b)]());_0x210f86[_0x4dbbc6(0x3b1)]?console[_0x4dbbc6(0x22f)](_0x4dbbc6(0x3cb)+_0x1f27d8+_0x4dbbc6(0x3e8)+_0x210f86[_0x4dbbc6(0x3b1)]):console[_0x4dbbc6(0x22f)](_0x4dbbc6(0x3cb)+_0x1f27d8),_0x16fd7f?.[_0x4dbbc6(0x2ae)]&&console[_0x4dbbc6(0x22f)](_0x4dbbc6(0x208)+_0x16fd7f[_0x4dbbc6(0x2ae)]+_0x4dbbc6(0x2bd));}if(!_0x1f6cc1||!_0x1f6cc1[_0x4dbbc6(0x3ef)]('~licenses')){console[_0x4dbbc6(0x22f)](''),console[_0x4dbbc6(0x22f)](_0x4dbbc6(0x1e4)),console[_0x4dbbc6(0x22f)]('');return;}const _0x196221=[],_0x5e304f=Date[_0x4dbbc6(0x38b)](),_0x5dd12e=_0x333cbd['id'],_0x594a87=_0x4dbbc6(0x2f7);for(const {key:_0x18c2a9,value:_0x270c68}of _0x1f6cc1[_0x4dbbc6(0x117)]('~licenses')){const _0xdd99a1=_0x270c68[_0x4dbbc6(0x2ba)]?Buffer[_0x4dbbc6(0x1b4)](_0x270c68[_0x4dbbc6(0x2ba)],'hex'):Buffer['alloc'](0x8);let _0x59e795='';try{_0x59e795=_0x4e4b2a[_0x4dbbc6(0x218)](_0x5dd12e,_0xdd99a1,_0x594a87)['pin'];}catch{}_0x196221['push']({'id':_0x18c2a9,'licensee':_0x270c68[_0x4dbbc6(0x3ce)]||'','expires':_0x270c68[_0x4dbbc6(0x389)]?new Date(_0x270c68[_0x4dbbc6(0x389)])[_0x4dbbc6(0x2c1)]()[_0x4dbbc6(0x400)](0x0,0xa):'','features':_0x2d1513(_0x270c68[_0x4dbbc6(0x2a9)]),'pin':_0x59e795,'status':_0x3910d2(_0x270c68,_0x5e304f)});}if(_0x196221[_0x4dbbc6(0x3f0)]===0x0){console['log'](''),console[_0x4dbbc6(0x22f)](_0x4dbbc6(0x1e4)),console[_0x4dbbc6(0x22f)]('');return;}const _0x26e2dd=['\x20\x20'+'ID'[_0x4dbbc6(0x376)](0xe),'LICENSEE'[_0x4dbbc6(0x376)](0xe),_0x4dbbc6(0x1f8)['padEnd'](0xc),_0x4dbbc6(0x328)['padEnd'](0x1e),'PIN'['padEnd'](0xa),_0x4dbbc6(0x152)][_0x4dbbc6(0x2fe)]('\x20');console[_0x4dbbc6(0x22f)]('\x0a'+_0x26e2dd);for(const _0x4c2459 of _0x196221){const _0x2c07e7=_0x4c2459['id']['slice'](0x0,0x8)+'…';console[_0x4dbbc6(0x22f)](['\x20\x20'+_0x2c07e7[_0x4dbbc6(0x376)](0xe),_0x4c2459['licensee'][_0x4dbbc6(0x400)](0x0,0xe)[_0x4dbbc6(0x376)](0xe),_0x4c2459[_0x4dbbc6(0x2ea)][_0x4dbbc6(0x376)](0xc),_0x4c2459[_0x4dbbc6(0x2a9)][_0x4dbbc6(0x400)](0x0,0x1e)['padEnd'](0x1e),_0x4c2459[_0x4dbbc6(0x36e)][_0x4dbbc6(0x376)](0xa),_0x4c2459[_0x4dbbc6(0x30a)]][_0x4dbbc6(0x2fe)]('\x20'));}console[_0x4dbbc6(0x22f)]('');}finally{await _0x333cbd[_0x4dbbc6(0x126)]();}}async function _0x4b433c(_0x284563,_0x48872e){const _0x347671=_0x4ed8a2,_0x1e923e=require$$5,_0x3b8038=requireOkdbLicenseCodec();let _0x45e01e=_0x284563;(_0x3b8038['detectInputType'](_0x284563)==='path'||_0x27aed7['existsSync'](_0x284563)&&_0x27aed7['statSync'](_0x284563)[_0x347671(0x1d4)]())&&(_0x45e01e=_0x27aed7[_0x347671(0x33f)](_0x284563,_0x347671(0x3fb))[_0x347671(0x33a)]());const _0x47fac2=_0x3052ea[_0x347671(0x20b)](_0x48872e['dbPath']),_0x22fce0=new _0x1e923e(_0x47fac2,_0x48872e['key']?{'encryptionKey':_0x48872e[_0x347671(0x277)]}:{});await _0x22fce0[_0x347671(0x1b5)]();try{!_0x22fce0[_0x347671(0x3ec)]&&(console['error'](_0x347671(0x344)),process[_0x347671(0x209)](0x1));let _0xb8056b;try{_0xb8056b=await _0x22fce0[_0x347671(0x3ec)][_0x347671(0x2ff)](_0x45e01e);}catch(_0x190715){console['error'](_0x347671(0x405)+_0x190715['message']),process[_0x347671(0x209)](0x1);}const _0x18a6ad=_0x22fce0['_license'][_0x347671(0x200)](),_0x4887f6=_0x18a6ad[_0x347671(0x25a)](_0x542025=>_0x542025[_0x347671(0x13d)]===_0xb8056b['id'])?.[_0x347671(0x36e)]||'',_0x30e4fb=Object[_0x347671(0x145)](_0xb8056b[_0x347671(0x2a9)]||{})[_0x347671(0x199)](([,_0x4649a7])=>_0x4649a7)[_0x347671(0x3a3)](([_0x32c9de])=>_0x32c9de),_0x295c98=_0xb8056b[_0x347671(0x35b)]||{},_0x5cb252=[_0x295c98[_0x347671(0x3b1)]?_0x347671(0x120)+_0x295c98['envs']:null,_0x295c98[_0x347671(0x381)]?_0x347671(0x242)+_0x295c98[_0x347671(0x381)]:null,_0x295c98[_0x347671(0x385)]?_0x347671(0x2e5)+_0x295c98[_0x347671(0x385)]:null,_0x295c98[_0x347671(0x123)]?_0x347671(0x265)+_0x295c98[_0x347671(0x123)][_0x347671(0x31b)]():null]['filter'](Boolean)[_0x347671(0x2fe)]('\x20\x20'),_0x47bf58=_0xb8056b[_0x347671(0x24e)]===_0x3b8038[_0x347671(0x315)];console[_0x347671(0x22f)]('\x0a\x20\x20✓\x20License\x20added'),console['log'](_0x347671(0x236)+_0xb8056b['id']),console[_0x347671(0x22f)](_0x347671(0x1bc)+_0xb8056b[_0x347671(0x3ce)]),console['log'](_0x347671(0x271)+new Date(_0xb8056b['expiresAt'])[_0x347671(0x2c1)]()['slice'](0x0,0xa)),console[_0x347671(0x22f)]('\x20\x20\x20\x20features:\x20\x20'+(_0x30e4fb[_0x347671(0x2fe)](',\x20')||_0x347671(0x1f5)));if(_0x5cb252)console['log']('\x20\x20\x20\x20limits:\x20\x20\x20\x20'+_0x5cb252);_0x47bf58?(console[_0x347671(0x22f)](_0x347671(0x31f)),console['log']('')):(console[_0x347671(0x22f)](_0x347671(0x1b1)+_0x4887f6),console['log']('\x20\x20\x20\x20status:\x20\x20\x20\x20pending\x20activation'),console[_0x347671(0x22f)](''),console[_0x347671(0x22f)](_0x347671(0x12f)),console[_0x347671(0x22f)]('\x20\x20\x20\x201.\x20Send\x20the\x20PIN\x20above\x20('+_0x4887f6+_0x347671(0x16c)),console[_0x347671(0x22f)]('\x20\x20\x20\x202.\x20The\x20vendor\x20returns\x20an\x20activation\x20token.'),console[_0x347671(0x22f)](_0x347671(0x3ea)),console[_0x347671(0x22f)](''));}finally{await _0x22fce0[_0x347671(0x126)]();}}async function _0x10bec3(_0x50539a,_0x4b24bb){const _0x407915=_0x4ed8a2,_0x2d0723=require$$5,_0x189b60=_0x3052ea['resolve'](_0x4b24bb[_0x407915(0x352)]),_0x3ca4d1=new _0x2d0723(_0x189b60,_0x4b24bb[_0x407915(0x277)]?{'encryptionKey':_0x4b24bb[_0x407915(0x277)]}:{});await _0x3ca4d1[_0x407915(0x1b5)]();try{!_0x3ca4d1[_0x407915(0x3ec)]&&(console[_0x407915(0x350)](_0x407915(0x344)),process[_0x407915(0x209)](0x1));let _0x386cf6;try{_0x386cf6=await _0x3ca4d1[_0x407915(0x3ec)][_0x407915(0x2fd)](_0x50539a[_0x407915(0x33a)]());}catch(_0x169f86){console[_0x407915(0x350)](_0x407915(0x405)+_0x169f86['message']),console[_0x407915(0x350)](''),console[_0x407915(0x350)](_0x407915(0x26d)),console[_0x407915(0x350)](_0x407915(0x24b)),console['error']('\x20\x20\x20\x20-\x20The\x20activation\x20token\x20was\x20issued\x20for\x20a\x20different\x20node\x20—\x20share\x20this\x20node\x27s\x20PIN\x20with\x20the\x20vendor.'),console[_0x407915(0x350)](_0x407915(0x3a0)),console[_0x407915(0x350)](''),process[_0x407915(0x209)](0x1);}console[_0x407915(0x22f)](_0x407915(0x28b)),console[_0x407915(0x22f)](_0x407915(0x236)+_0x386cf6['id']),console[_0x407915(0x22f)](_0x407915(0x1bc)+_0x386cf6[_0x407915(0x3ce)]),console[_0x407915(0x22f)](_0x407915(0x271)+new Date(_0x386cf6[_0x407915(0x389)])[_0x407915(0x2c1)]()[_0x407915(0x400)](0x0,0xa)),console[_0x407915(0x22f)](_0x407915(0x211)),console['log']('');}finally{await _0x3ca4d1[_0x407915(0x126)]();}}async function _0x5a70ca(_0x5ee7dd,_0x1b550e){const _0x3baeab=_0x4ed8a2;!_0x5ee7dd&&(console[_0x3baeab(0x350)](_0x3baeab(0x1d3)),process[_0x3baeab(0x209)](0x1));const _0x41342b=require$$5,_0x5e5f7=requireOkdbLicenseCodec(),_0xf6bf6c=_0x3052ea[_0x3baeab(0x20b)](_0x1b550e[_0x3baeab(0x352)]),_0x47567e=new _0x41342b(_0xf6bf6c,_0x1b550e[_0x3baeab(0x277)]?{'encryptionKey':_0x1b550e['key']}:{});await _0x47567e[_0x3baeab(0x1b5)]();try{const _0x15c0bb=_0x47567e[_0x3baeab(0x26c)];(!_0x15c0bb||!_0x15c0bb['hasType']('~licenses'))&&(console[_0x3baeab(0x350)]('[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22'+_0x5ee7dd+'\x22'),process[_0x3baeab(0x209)](0x1));let _0x4296c=null,_0xf7ff09=null;const _0x3f5af0=_0x15c0bb[_0x3baeab(0x1dc)](_0x3baeab(0x263),_0x5ee7dd);if(_0x3f5af0)_0x4296c=_0x5ee7dd,_0xf7ff09=_0x3f5af0;else{const _0xbca414=[];for(const {key:_0x3464f4,value:_0x4423b6}of _0x15c0bb[_0x3baeab(0x117)](_0x3baeab(0x263))){if(_0x3464f4[_0x3baeab(0x3d9)](_0x5ee7dd))_0xbca414[_0x3baeab(0x3fc)]({'key':_0x3464f4,'value':_0x4423b6});}_0xbca414['length']===0x0&&(console[_0x3baeab(0x350)](_0x3baeab(0x382)+_0x5ee7dd+'\x22'),process[_0x3baeab(0x209)](0x1)),_0xbca414[_0x3baeab(0x3f0)]>0x1&&(console['error'](_0x3baeab(0x22a)+_0x5ee7dd+_0x3baeab(0x335)+_0xbca414[_0x3baeab(0x3f0)]+_0x3baeab(0x232)),process[_0x3baeab(0x209)](0x1)),_0x4296c=_0xbca414[0x0][_0x3baeab(0x277)],_0xf7ff09=_0xbca414[0x0][_0x3baeab(0x13a)];}const _0x1fcf8f=Date[_0x3baeab(0x38b)](),_0x3bffa4=_0x3910d2(_0xf7ff09,_0x1fcf8f),_0xbc8901=_0x47567e['id'],_0x576b09=_0x3baeab(0x2f7);let _0x2ede41='';try{const _0x544d38=Buffer[_0x3baeab(0x1b4)](_0xf7ff09[_0x3baeab(0x2ba)],_0x3baeab(0x30f));_0x2ede41=_0x5e5f7[_0x3baeab(0x218)](_0xbc8901,_0x544d38,_0x576b09)['pin'];}catch{}const _0x148a5b=_0xf7ff09[_0x3baeab(0x2a9)]?Object[_0x3baeab(0x145)](_0xf7ff09['features'])[_0x3baeab(0x199)](([,_0x11a0d4])=>_0x11a0d4)[_0x3baeab(0x3a3)](([_0x2560f5])=>_0x2560f5):[],_0x321b88=_0xf7ff09['limits']||{},_0x404543=_0x15c0bb?.['db']?.[_0x3baeab(0x1dc)]?.('__writeCounter')??0x0,_0x2a46ed=[..._0x47567e['_envs'][_0x3baeab(0x39c)]()][_0x3baeab(0x199)](_0x24def9=>!_0x24def9['startsWith']('~'))[_0x3baeab(0x3f0)];console[_0x3baeab(0x22f)]('\x0a\x20\x20License\x20details:'),console[_0x3baeab(0x22f)](_0x3baeab(0x236)+_0x4296c),console[_0x3baeab(0x22f)]('\x20\x20\x20\x20licensee:\x20\x20'+(_0xf7ff09['licensee']||'')),console[_0x3baeab(0x22f)](_0x3baeab(0x271)+(_0xf7ff09[_0x3baeab(0x389)]?new Date(_0xf7ff09[_0x3baeab(0x389)])[_0x3baeab(0x2c1)]()['slice'](0x0,0xa):'')),console[_0x3baeab(0x22f)](_0x3baeab(0x173)+(_0x148a5b[_0x3baeab(0x2fe)](',\x20')||_0x3baeab(0x1f5))),console[_0x3baeab(0x22f)](_0x3baeab(0x1b1)+_0x2ede41),console[_0x3baeab(0x22f)]('\x20\x20\x20\x20status:\x20\x20\x20\x20'+_0x3bffa4),console[_0x3baeab(0x22f)]('\x20\x20\x20\x20addedAt:\x20\x20\x20'+new Date(_0xf7ff09[_0x3baeab(0x330)])[_0x3baeab(0x2c1)]());if(_0x3bffa4==='active'){console[_0x3baeab(0x22f)](''),console[_0x3baeab(0x22f)](_0x3baeab(0x23b));if(_0x321b88[_0x3baeab(0x123)]){const _0x5cacd4=Math['round'](_0x404543/_0x321b88['maxWrites']*0x64);console['log'](_0x3baeab(0x11c)+_0x404543[_0x3baeab(0x31b)]()+_0x3baeab(0x3e8)+_0x321b88[_0x3baeab(0x123)][_0x3baeab(0x31b)]()+_0x3baeab(0x3d5)+_0x5cacd4+'%)');}else console[_0x3baeab(0x22f)](_0x3baeab(0x11c)+_0x404543[_0x3baeab(0x31b)]()+_0x3baeab(0x3f1));_0x321b88[_0x3baeab(0x3b1)]?console['log'](_0x3baeab(0x2e1)+_0x2a46ed+_0x3baeab(0x3e8)+_0x321b88['envs']):console['log'](_0x3baeab(0x2e1)+_0x2a46ed+_0x3baeab(0x3f1));}console[_0x3baeab(0x22f)]('');}finally{await _0x47567e[_0x3baeab(0x126)]();}}async function _0x396c4f(_0x49bb87,_0x33a74a){const _0x161d77=_0x4ed8a2;!_0x49bb87&&(console['error'](_0x161d77(0x3e5)),process[_0x161d77(0x209)](0x1));const _0x3e75c5=require$$5,_0x6d092f=_0x3052ea[_0x161d77(0x20b)](_0x33a74a[_0x161d77(0x352)]),_0x5b23c3=new _0x3e75c5(_0x6d092f,_0x33a74a[_0x161d77(0x277)]?{'encryptionKey':_0x33a74a['key']}:{});await _0x5b23c3[_0x161d77(0x1b5)]();try{const _0x58c1a3=_0x5b23c3[_0x161d77(0x26c)];(!_0x58c1a3||!_0x58c1a3[_0x161d77(0x3ef)](_0x161d77(0x263)))&&(console[_0x161d77(0x350)](_0x161d77(0x382)+_0x49bb87+'\x22'),process['exit'](0x1));let _0x5333b1=null,_0x1c0d93=null;const _0x47a430=_0x58c1a3[_0x161d77(0x1dc)]('~licenses',_0x49bb87);if(_0x47a430)_0x5333b1=_0x49bb87,_0x1c0d93=_0x47a430;else{const _0x29c4b3=[];for(const {key:_0x3cb1e2,value:_0x498b66}of _0x58c1a3[_0x161d77(0x117)]('~licenses')){if(_0x3cb1e2[_0x161d77(0x3d9)](_0x49bb87))_0x29c4b3[_0x161d77(0x3fc)]({'key':_0x3cb1e2,'value':_0x498b66});}_0x29c4b3[_0x161d77(0x3f0)]===0x0&&(console['error']('[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22'+_0x49bb87+'\x22'),process['exit'](0x1)),_0x29c4b3['length']>0x1&&(console[_0x161d77(0x350)]('[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22'+_0x49bb87+'\x22\x20matches\x20'+_0x29c4b3[_0x161d77(0x3f0)]+'\x20licenses'),process[_0x161d77(0x209)](0x1)),_0x5333b1=_0x29c4b3[0x0]['key'],_0x1c0d93=_0x29c4b3[0x0][_0x161d77(0x13a)];}await _0x58c1a3[_0x161d77(0x391)]('~licenses',_0x5333b1),console[_0x161d77(0x22f)](_0x161d77(0x264)+_0x5333b1+_0x161d77(0x2e2)+(_0x1c0d93['licensee']||_0x161d77(0x18a))+')');}finally{await _0x5b23c3[_0x161d77(0x126)]();}}async function _0x613088(_0x4bef95,_0x38055f,_0x109a24){const _0xdae8a9=_0x4ed8a2;!_0x4bef95&&(console[_0xdae8a9(0x350)]('[okdb]\x20error:\x20join\x20requires\x20a\x20remote\x20address.\x20Usage:\x20okdb\x20join\x20<address>\x20--token\x20<t>'),process['exit'](0x1));!_0x109a24[_0xdae8a9(0x359)]&&!(_0x109a24[_0xdae8a9(0x147)]&&_0x109a24[_0xdae8a9(0x368)])&&(console[_0xdae8a9(0x350)](_0xdae8a9(0x384)),process[_0xdae8a9(0x209)](0x1));const _0x1d7bc6=_0x109a24[_0xdae8a9(0x21c)]||_0x38055f['sync']?.[_0xdae8a9(0x36c)];!_0x1d7bc6&&(console[_0xdae8a9(0x350)]('[okdb]\x20error:\x20--address\x20is\x20required\x20for\x20join\x20(this\x20node\x27s\x20reachable\x20sync\x20address).\x0a'+_0xdae8a9(0x29d)+'\x20\x20Or\x20set\x20sync.address\x20in\x20.kdbconfig'),process[_0xdae8a9(0x209)](0x1));const _0x1f08b6=require$$5,_0x1f1519=new _0x1f08b6(_0x38055f['dbPath'],{'sync':{'address':_0x1d7bc6,'auto_reconcile':![]}});await _0x1f1519[_0xdae8a9(0x1b5)]();try{const _0x1be40a=_0x1f1519[_0xdae8a9(0x26c)];if(_0x1be40a&&_0x1be40a[_0xdae8a9(0x3ef)](_0xdae8a9(0x22c))){let _0x5946d7=![];for(const _0x41628b of _0x1be40a[_0xdae8a9(0x117)]('~tokens')){_0x5946d7=!![];break;}_0x5946d7&&console[_0xdae8a9(0x22f)](_0xdae8a9(0x21d)+_0xdae8a9(0x295));}console[_0xdae8a9(0x22f)](_0xdae8a9(0x3eb)+_0x4bef95+'…'),await _0x1f1519[_0xdae8a9(0x39a)][_0xdae8a9(0x2fe)](_0x4bef95[_0xdae8a9(0x210)](/\/+$/,''),{'token':_0x109a24[_0xdae8a9(0x359)],'username':_0x109a24[_0xdae8a9(0x147)],'password':_0x109a24[_0xdae8a9(0x368)]}),console[_0xdae8a9(0x22f)](_0xdae8a9(0x2c3)),console['log']('\x0a\x20\x20Joined.\x20Remote\x20tokens\x20replicated.\x20You\x20can\x20now\x20log\x20in\x20with\x20cluster\x20credentials.\x0a');}finally{await _0x1f1519[_0xdae8a9(0x126)]();}}async function _0x957551(){const _0x462806=_0x4ed8a2,_0x2101b8=Date[_0x462806(0x38b)](),_0x1c5b0f=_0x210bd0(process['argv']),_0x402e5f=_0x437348(_0x1c5b0f),_0x4559ef=_0x3052ea[_0x462806(0x20b)](_0x402e5f['dbPath']);!_0x402e5f['noRepl']&&!process['stdin'][_0x462806(0x34f)]&&(_0x402e5f[_0x462806(0x397)]=!![]);const _0x5d5810=require$$5,{start:_0x48e8a5,colorLog:_0x428a99}=requireOkdbShell(),_0x478076={..._0x402e5f[_0x462806(0x277)]?{'encryptionKey':_0x402e5f[_0x462806(0x277)]}:{},..._0x402e5f[_0x462806(0x1fe)]?{}:_0x8b67c(_0x402e5f[_0x462806(0x229)])?{'admin':_0x402e5f[_0x462806(0x229)]}:{},..._0x8b67c(_0x402e5f[_0x462806(0x206)])?{'api':_0x402e5f[_0x462806(0x206)]}:{},..._0x8b67c(_0x402e5f['auth'])?{'auth':_0x402e5f[_0x462806(0x3ac)]}:{},..._0x8b67c(_0x402e5f['mcp'])?{'mcp':_0x402e5f[_0x462806(0x40a)]}:{},..._0x402e5f[_0x462806(0x247)]!==![]?{'timeMachine':_0x402e5f['timeMachine']}:{}},_0x41748d=new _0x5d5810(_0x4559ef,_0x478076);_0x41748d['log'][_0x462806(0x142)]?.();const _0x4055c2=_0x41748d[_0x462806(0x22f)][_0x462806(0x132)](_0xd4f68e=>_0x428a99(_0xd4f68e,_0x402e5f['logLevel']));if(_0x402e5f[_0x462806(0x397)])process[_0x462806(0x379)][_0x462806(0x375)](_0x462806(0x364));await _0x41748d[_0x462806(0x1b5)]();if(_0x402e5f[_0x462806(0x397)])process[_0x462806(0x379)][_0x462806(0x375)](_0x462806(0x12a));try{await _0x30ea5d(_0x41748d,_0x402e5f[_0x462806(0x12e)]);}catch(_0x231304){_0x231304[_0x462806(0x358)]===_0x462806(0x3f4)&&(console['error']('[okdb]\x20port\x20'+_0x402e5f[_0x462806(0x12e)]+_0x462806(0x13e)),process[_0x462806(0x209)](0x1));throw _0x231304;}if(_0x402e5f[_0x462806(0x397)])process['stdout']['write'](_0x462806(0x312)+_0x402e5f['port']+'\x0a');if(!_0x402e5f['noRepl'])_0x41748d[_0x462806(0x22f)][_0x462806(0x142)]?.(),_0x4055c2?.(),_0x4e0816(_0x41748d[_0x462806(0x3ac)]?.[_0x462806(0x2e7)]?.()??[]),await _0x48e8a5(_0x41748d,_0x402e5f);else{const _0x4dc93b=_0x3052ea[_0x462806(0x2fe)](_0x4559ef,'okdb.pid');try{_0x27aed7[_0x462806(0x22e)](_0x4dc93b,String(process[_0x462806(0x35f)]));}catch{}const _0x40a3b4=Date[_0x462806(0x38b)]()-_0x2101b8;console[_0x462806(0x22f)](''),console[_0x462806(0x22f)](_0x462806(0x38d)),console['log']('\x20\x20\x20\x20port:\x20\x20'+_0x402e5f[_0x462806(0x12e)]),console['log'](_0x462806(0x2d3)+_0x4559ef),console[_0x462806(0x22f)]('\x20\x20\x20\x20id:\x20\x20\x20\x20'+_0x41748d['id']);{const _0x5c671c=_0x41748d[_0x462806(0x26c)]?.['db']?.['get']?.('__writeCounter')??0x0,_0x3cafce=[..._0x41748d['_envs'][_0x462806(0x39c)]()]['filter'](_0x3cd0a3=>!_0x3cd0a3['startsWith']('~'))[_0x462806(0x3f0)];if(_0x41748d[_0x462806(0x3ec)]?.['active']?.[_0x462806(0x24e)]===0x1){const _0x4160c1=Math[_0x462806(0x155)]((_0x41748d['_license'][_0x462806(0x3db)][_0x462806(0x389)]-Date[_0x462806(0x38b)]())/0x5265c00);console[_0x462806(0x22f)](_0x462806(0x187)+_0x41748d[_0x462806(0x3ec)][_0x462806(0x3db)][_0x462806(0x3ce)]+_0x462806(0x2e3)+_0x4160c1+_0x462806(0x16d));}else{if(_0x41748d['_license']?.[_0x462806(0x3db)]){const _0x359727=_0x41748d[_0x462806(0x3ec)][_0x462806(0x3db)];console[_0x462806(0x22f)](_0x462806(0x374)+_0x359727[_0x462806(0x3ce)]+'\x20(expires\x20'+new Date(_0x359727['expiresAt'])[_0x462806(0x2c1)]()[_0x462806(0x400)](0x0,0xa)+')');const _0x152fbe=_0x359727['limits']||{};if(_0x152fbe[_0x462806(0x123)]){const _0x16bc2d=Math[_0x462806(0x1e8)](_0x5c671c/_0x152fbe[_0x462806(0x123)]*0x64);console['log']('\x20\x20\x20\x20usage:\x20\x20\x20'+_0x5c671c['toLocaleString']()+_0x462806(0x3e8)+_0x152fbe[_0x462806(0x123)][_0x462806(0x31b)]()+_0x462806(0x283)+_0x16bc2d+_0x462806(0x135)+_0x3cafce+(_0x152fbe['envs']?'/'+_0x152fbe['envs']:'')+'\x20env'+(_0x3cafce===0x1?'':'s'));}}else{if(_0x41748d[_0x462806(0x3ec)]){const _0x5d18f4=_0x41748d[_0x462806(0x3ec)][_0x462806(0x200)](),_0x2146a3=_0x5d18f4['length']?_0x5d18f4[_0x462806(0x3a3)](_0x5d46f1=>_0x5d46f1[_0x462806(0x36e)])[_0x462806(0x2fe)](',\x20'):_0x462806(0x164),_0x518eda=_0x41748d['_license'][_0x462806(0x32f)],_0x5f7ac2=_0x518eda['limits'][_0x462806(0x123)]?Math[_0x462806(0x1e8)](_0x5c671c/_0x518eda[_0x462806(0x35b)][_0x462806(0x123)]*0x64):0x0;console[_0x462806(0x22f)]('\x20\x20\x20\x20license:\x20free\x20tier\x20—\x20add\x20a\x20license\x20to\x20unlock\x20sync,\x20embeddings,\x20engines,\x20time-machine'),console[_0x462806(0x22f)](_0x462806(0x230)+_0x5c671c[_0x462806(0x31b)]()+_0x462806(0x3e8)+_0x518eda[_0x462806(0x35b)][_0x462806(0x123)]['toLocaleString']()+_0x462806(0x283)+_0x5f7ac2+_0x462806(0x135)+_0x3cafce+_0x462806(0x3e8)+_0x518eda[_0x462806(0x35b)][_0x462806(0x3b1)]+_0x462806(0x16e)),console[_0x462806(0x22f)](_0x462806(0x180)+_0x2146a3);}}}}console[_0x462806(0x22f)]('\x20\x20\x20\x20api:\x20\x20\x20http://localhost:'+_0x402e5f[_0x462806(0x12e)]+_0x462806(0x38a));!_0x402e5f[_0x462806(0x1fe)]&&console[_0x462806(0x22f)](_0x462806(0x24f)+_0x402e5f[_0x462806(0x12e)]+_0x462806(0x2c8));console[_0x462806(0x22f)](''),console[_0x462806(0x22f)](_0x462806(0x1f0)+_0x40a3b4+'ms'),_0x4e0816(_0x41748d[_0x462806(0x3ac)]?.['getSecurityNotices']?.()??[]);async function _0x565f9b(){const _0x80d8af=_0x462806;process[_0x80d8af(0x379)]['write'](_0x80d8af(0x39e));try{_0x27aed7[_0x80d8af(0x35d)](_0x4dc93b);}catch{}await _0x41748d[_0x80d8af(0x126)](),process[_0x80d8af(0x209)](0x0);}process['on'](_0x462806(0x3b7),_0x565f9b),process['on'](_0x462806(0x31e),_0x565f9b);}}const _0x2a4962=new Set([_0x4ed8a2(0x2a8),_0x4ed8a2(0x3b9),_0x4ed8a2(0x2e9),_0x4ed8a2(0x2cb),'export','import',_0x4ed8a2(0x30b),_0x4ed8a2(0x359),'join','license']),_0x427d5e=process['argv'][0x2];if(_0x427d5e===_0x4ed8a2(0x2a8))console[_0x4ed8a2(0x22f)](require$$2[_0x4ed8a2(0x2a8)]),process['exit'](0x0);else{if(_0x427d5e&&_0x2a4962[_0x4ed8a2(0x170)](_0x427d5e)){const _0x22e956=process[_0x4ed8a2(0x302)][_0x4ed8a2(0x400)](0x3),_0x5258c6=_0x210bd0([_0x4ed8a2(0x2de),_0x4ed8a2(0x2d4),..._0x22e956]),_0x49a73e=_0x437348(_0x5258c6),_0x52d4e7=new Set([_0x4ed8a2(0x1a9),'-d',_0x4ed8a2(0x241),'-k',_0x4ed8a2(0x3a7),'-c','--port','-p','--log-level',_0x4ed8a2(0x2af),'-e',_0x4ed8a2(0x166),_0x4ed8a2(0x196),_0x4ed8a2(0x224),_0x4ed8a2(0x251),'--permissions','--grants',_0x4ed8a2(0x290),_0x4ed8a2(0x26b),_0x4ed8a2(0x319),'-u',_0x4ed8a2(0x339)]);let _0x1d8e01=null;for(let _0x256901=0x0;_0x256901<_0x22e956[_0x4ed8a2(0x3f0)];_0x256901++){if(_0x52d4e7[_0x4ed8a2(0x170)](_0x22e956[_0x256901])){_0x256901++;continue;}if(!_0x22e956[_0x256901][_0x4ed8a2(0x3d9)]('-')){_0x1d8e01=_0x22e956[_0x256901];break;}}(async()=>{const _0x42088a=_0x4ed8a2;if(_0x427d5e===_0x42088a(0x359)){const _0x32c64a=process[_0x42088a(0x302)][0x3],_0x5c4378=process[_0x42088a(0x302)][_0x42088a(0x400)](0x4),_0x1a5643=_0x210bd0([_0x42088a(0x2de),'okdb',..._0x5c4378]),_0x2d3ba0=_0x437348(_0x1a5643),_0x2a47f3=new Set([_0x42088a(0x1a9),'-d',_0x42088a(0x241),'-k',_0x42088a(0x3a7),'-c',_0x42088a(0x185),'-p','--name','--password',_0x42088a(0x251),_0x42088a(0x2d5),_0x42088a(0x3c9),'--ttl',_0x42088a(0x3cd),'--env','-e',_0x42088a(0x166)]),_0x3703ff=[];for(let _0x1f20e1=0x0;_0x1f20e1<_0x5c4378[_0x42088a(0x3f0)];_0x1f20e1++){if(_0x2a47f3[_0x42088a(0x170)](_0x5c4378[_0x1f20e1])){_0x1f20e1++;continue;}if(_0x5c4378[_0x1f20e1][_0x42088a(0x3d9)]('-'))continue;_0x3703ff[_0x42088a(0x3fc)](_0x5c4378[_0x1f20e1]);}switch(_0x32c64a){case'create':await _0x2e702d(_0x2d3ba0,_0x1a5643);break;case _0x42088a(0x3cf):await _0x2b83ed(_0x2d3ba0);break;case _0x42088a(0x333):await _0x3e5bd4(_0x3703ff[0x0],_0x2d3ba0);break;default:console['error']('[okdb]\x20unknown\x20token\x20action:\x20\x22'+_0x32c64a+_0x42088a(0x269)),process[_0x42088a(0x209)](0x1);}return;}if(_0x427d5e===_0x42088a(0x25c)){const _0x1f133a=requireOkdbLicenseCodec(),_0xa19093=process[_0x42088a(0x302)][_0x42088a(0x400)](0x3),_0x2ab1a9=_0x210bd0([_0x42088a(0x2de),_0x42088a(0x2d4),..._0xa19093]),_0x27c32b=_0x437348(_0x2ab1a9),_0x302f6a=new Set(['--path','-d',_0x42088a(0x241),'-k',_0x42088a(0x3a7),'-c',_0x42088a(0x185),'-p','--log-level']),_0x4b5f48=[];for(let _0x44108a=0x0;_0x44108a<_0xa19093['length'];_0x44108a++){if(_0x302f6a[_0x42088a(0x170)](_0xa19093[_0x44108a])){_0x44108a++;continue;}if(_0xa19093[_0x44108a]['startsWith']('-'))continue;_0x4b5f48[_0x42088a(0x3fc)](_0xa19093[_0x44108a]);}const _0x23bb63=_0x4b5f48[0x0]??null;if(_0x23bb63===_0x42088a(0x391))await _0x396c4f(_0x4b5f48[0x1],_0x27c32b);else{if(!_0x23bb63)await _0x53765b(_0x27c32b);else{let _0x468c19=_0x1f133a[_0x42088a(0x228)](_0x23bb63);if(_0x468c19==='unknown'&&_0x27aed7[_0x42088a(0x1c0)](_0x23bb63))_0x468c19=_0x42088a(0x33c);if(_0x468c19===_0x42088a(0x33c))try{const _0x105483=_0x27aed7[_0x42088a(0x33f)](_0x23bb63,_0x42088a(0x3fb))[_0x42088a(0x33a)](),_0xbcf8b4=_0x1f133a[_0x42088a(0x228)](_0x105483);if(_0xbcf8b4==='activation'){await _0x10bec3(_0x105483,_0x27c32b);return;}await _0x4b433c(_0x23bb63,_0x27c32b);return;}catch(_0x514e06){console['error'](_0x42088a(0x28c)+_0x23bb63+':\x20'+_0x514e06[_0x42088a(0x213)]),process['exit'](0x1);}switch(_0x468c19){case'blob':await _0x4b433c(_0x23bb63,_0x27c32b);break;case'activation':await _0x10bec3(_0x23bb63,_0x27c32b);break;case _0x42088a(0x248):await _0x5a70ca(_0x23bb63,_0x27c32b);break;default:console[_0x42088a(0x350)](_0x42088a(0x149)+_0x23bb63+'\x22'),console[_0x42088a(0x350)](''),console[_0x42088a(0x350)]('\x20\x20Expected\x20one\x20of:'),console['error'](_0x42088a(0x2a1)),console[_0x42088a(0x350)](_0x42088a(0x1c9)),console[_0x42088a(0x350)](_0x42088a(0x16b)),console[_0x42088a(0x350)](_0x42088a(0x1aa)),console[_0x42088a(0x350)](''),console['error'](_0x42088a(0x3bc)),process[_0x42088a(0x209)](0x1);}}}return;}switch(_0x427d5e){case _0x42088a(0x3b9):await _0x579f6d(_0x49a73e);break;case _0x42088a(0x2e9):await _0x407bf3();break;case'reset':await _0x6a4746(_0x49a73e);break;case'backup':await _0x3b9607(_0x1d8e01??_0x3052ea[_0x42088a(0x20b)](_0x42088a(0x1a3)),_0x49a73e);break;case _0x42088a(0x316):await _0x1eb4b7(_0x1d8e01??_0x3052ea[_0x42088a(0x20b)](_0x42088a(0x24a)),_0x49a73e,_0x5258c6);break;case _0x42088a(0x1a8):await _0x50a5c8(_0x1d8e01??_0x3052ea[_0x42088a(0x20b)](_0x42088a(0x24a)),_0x49a73e,_0x5258c6);break;case _0x42088a(0x2fe):await _0x613088(_0x1d8e01,_0x49a73e,_0x5258c6);break;}})()[_0x4ed8a2(0x2f3)](()=>process[_0x4ed8a2(0x209)](0x0))['catch'](_0x5e540c=>{const _0x3b03bf=_0x4ed8a2;console[_0x3b03bf(0x350)](_0x3b03bf(0x212)+(_0x5e540c[_0x3b03bf(0x213)]||_0x5e540c)+'\x0a'),process['exit'](0x1);});}else _0x957551()['catch'](_0x53385c=>{const _0x9f5a97=_0x4ed8a2;console[_0x9f5a97(0x350)](_0x9f5a97(0x124)),console[_0x9f5a97(0x350)](_0x53385c[_0x9f5a97(0x37f)]||_0x53385c),process['exit'](0x1);});}return okdb$1;}var okdbExports=requireOkdb(),okdb=getDefaultExportFromCjs(okdbExports);function _0x1224(){const _0x51c310=['stack','HTTP\x20','typesPerEnv','[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22','stderr','[okdb]\x20error:\x20join\x20requires\x20credentials.\x20Provide\x20--token\x20<t>\x20or\x20--username\x20<u>\x20--password\x20<p>','syncPeers','unique:violation_resolved','hidden','properties','expiresAt','/api','now','magenta','\x20\x20✓\x20OKDB\x20server\x20running','createInterface','application/json','[okdb]\x20import\x20complete','remove',',\x20got\x20','\x20\x20\x20\x20','max','Queue','ttl:clear','noRepl','./okdb-data','\x20\x20\x20\x20permissions:\x20','sync','type/users/item/alice\x20--env\x20staging','keys','title','\x0a[okdb]\x20shutting\x20down…\x0a','resetting','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20has\x20expired\x20—\x20request\x20a\x20fresh\x20one.','\x20\x20·\x20','dirname','map','1.1.1','[okdb]\x20exported\x20\x20types=','\x20to\x20quit.','--config','\x20\x20\x20\x20\x20\x20\x20POST\x20(body\x20implies\x20POST)\x0a\x20\x20','body','OKDBSchemaCollectionError','base64url','auth','DELETE','yellow','details','<path>','envs','\x20\x20+','EXIT','history','--changes','readUInt8','SIGINT','LABEL','doctor','readUInt32BE','darwin','\x20\x20Usage:\x20okdb\x20license\x20[<blob|path|uuid|activation-token>]','put','\x20\x20\x20\x20\x20\x20\x20\x20\x20browse\x20API\x20routes,\x20grouped\x20by\x20area\x0a\x20\x20','ALREADY_EXISTS','[okdb]\x20imported\x20\x20types=','item:remove','importBlobs','some','typeSubDbs','\x27,\x20cannot\x20map\x20to\x20\x27','createdAt','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20override\x20active\x20environment\x20for\x20this\x20call\x0a\x20\x20',']\x20already\x20maps\x20to\x20\x27','--grants','dim','\x20\x20Envs:\x20\x20\x20\x20','[okdb]\x20opening\x20','--log-level','licensee','list','resume','\x20months\x20from\x20issuance)','\x20\x20\x20\x20name:\x20\x20\x20\x20\x20\x20\x20\x20','--env\x20<name>','decoded','\x20\x20(','createHmac','net','inputSchema','startsWith','MALFORMED_TOKEN','active','LICENSE_INVALID','license:activated','OKDBForeignKeyDeleteError','name','NOT_FOUND','logs','exp','payload','search','[okdb]\x20error:\x20remove\x20requires\x20an\x20id\x20argument','id:\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20OKDB\x20SHELL\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20/\x20','endsWith','\x20\x20\x20\x203.\x20Run:\x20\x20okdb\x20license\x20<activation-token>','\x0a\x20\x20Joining\x20cluster\x20at\x20','_license','ENVS','(no\x20types)','hasType','length','\x20\x20(unlimited)','debug','\x0a\x20\x20','EADDRINUSE','tags:\x20','\x20\x20\x20\x20\x20http://localhost:','pause','System','sizeAfter','[okdb]\x20error:\x20--password\x20requires\x20--name','utf8','push','\x20does\x20not\x20exist','\x20bytes,\x20need\x20>=\x2065)','\x20logs\x20on\x20\x20','slice','NAME','fill','Index\x20\x27','INVALID_PRIMARY_KEY','[okdb]\x20error:\x20','\x20\x20Some\x20checks\x20failed.\x0a','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','PUBLIC_KEY_PEM','1204488EQhMqq','mcp','\x22\x20on\x20\x22','sourceType','default','safety','dynamic','values','getRange','creating','platform','references','system:ready','\x20\x20\x20\x20writes:\x20\x20\x20\x20','ACTIVATION_EXPIRED','[okdb]\x20.kdbconfig\x20already\x20exists\x20—\x20skipping','PATCH','envs=','system:stopped','\x20MB)','maxWrites','\x0a[okdb]\x20fatal\x20error:','time','close','License\x20expired\x20or\x20invalidated','[on|off|level]','transport:\x20','\x20\x20✓\x20database\x20opened\x0a','\x20records','[okdb]\x20invalid\x20port:\x20','listening','port','\x20\x20Next\x20step\x20—\x20activate\x20the\x20license:','Examples','already\x20in\x20use','attach','LICENSE_ACTIVATION_INVALID','Invalid\x20index\x20key\x20type\x20for\x20\x27','%),\x20','\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','type/users/item/alice','update','\x27:\x20','value','\x1b[0m','INDEX_ALREADY_REGISTERED','licenseId','\x20already\x20in\x20use','TYPE_NOT_REGISTERED','getCount','ROUTES','detachConsole','null','\x20\x20Error:\x20','entries','index','username','result','[okdb]\x20error:\x20unrecognized\x20input:\x20\x22','fromEntries','summary','\x0a\x0a\x20\x20','resetIndex','{}[]:,\x0a\x0d\x09\x20','Foreign\x20key\x20violation:\x20','migrate','Invalid\x20primary\x20key\x20type:\x20','STATUS','system:poke','type','ceil','decodeActivationToken','rmSync','\x20\x20\x20\x20\x20explicit\x20method\x0a\x0a\x20\x20','INVALID_INDEX_KEY','sub','\x20→\x20POST\x20/api/env/','enabled','\x20already\x20exists','\x20file','\x20(must\x20be\x201–65535)','INDEX_NOT_REGISTERED','OKDBUniqueConstraintError','verifyActivation','unknown','(add\x20a\x20license\x20first)','CREATED','--types','_isFree','exportToFile','\x20\x20\x20\x20label:\x20\x20\x20\x20\x20\x20\x20','\x20\x20score:','\x20\x20\x20\x20•\x20a\x20license\x20id\x20\x20\x20\x20\x20(uuid)',')\x20to\x20your\x20license\x20vendor.','\x20days\x20—\x20POC/demo\x20only,\x20not\x20node-bound)','\x20envs','\x20\x20Path\x20access','has','setSchema','\x0a\x20\x20\x20\x20','\x20\x20\x20\x20features:\x20\x20','OKDB-PIN-V1:','targetKey','drop','targetType','operation','clearLine','catch','blobs','true','sync:apply','writeUInt16BE','types:','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20','win32','charCodeAt','\x22\x20to\x20enable\x20it.','decodeLicenseBlob:\x20failed\x20to\x20decode\x20payload:\x20','--port','<json-body>','\x20\x20\x20\x20license:\x20⚠\x20OPEN\x20—\x20','shutdown','allocUnsafe','(unset)','GET','forEach','types','every','env/:env','\x20\x20╔═══════════════════════════╗','access','use','active:','OPEN','invalid','--name','\x0a\x20\x20No\x20documentation\x20found\x20for:\x20','Schema\x20validation\x20failed\x20for\x20','filter','654351jxRSwb','port\x20','343109ERxMaH','errors','keys:','reload','toLowerCase','OKDBIndexHasConsumersError','5462130TSSEHp','./okdb-backup','\x20\x20(name:\x20','OKDBNotFoundError','\x1b[37m','\x27\x20is\x20already\x20registered','import','--path','\x20\x20\x20\x20•\x20a\x20path\x20to\x20a\x20.license\x20file','embeddings','\x20day(s).','grants','Invalid\x20activation\x20token:\x20','trimStart','warn','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20','halted','importFromFile','from','open','Feature\x20not\x20licensed:\x20','QUIT','toFixed','mkdirSync','transport','FOREIGN_KEY_VIOLATION','\x20\x20\x20\x20licensee:\x20\x20','xdg-open\x20','txn:start','level:\x20info','existsSync','randomUUID','_lookupByName','listLicenses','LOGS','Types','fts','routes','\x20\x20Usage:\x20logs\x20[on|off|debug|info|warn|error]','\x20\x20\x20\x20•\x20an\x20activation\x20token\x20\x20(124\x20chars)','[okdb]\x20./okdb-data\x20already\x20exists\x20—\x20skipping','.okdb-write-test','\x1b[36m','\x27\x20on\x20type\x20\x27','prompt','blob','boolean','Cannot\x20set\x20enforce\x20schema\x20on\x20','once','[okdb]\x20error:\x20show\x20requires\x20an\x20id\x20argument','isFile','item:update','method','OKDBAlreadyExistsError','\x20\x20Writes:\x20\x20','\x20\x20http://localhost:','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20set\x20active\x20environment\x20(persists\x20in\x20session)\x0a\x20\x20','\x20\x20\x20\x20\x20\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','get','\x20\x20✗','\x27\x20doesn\x27t\x20exist','registerFts','issuedAt','POST','LICENSE_EXPIRED_ACTION','VERB','\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.','exportBlobs','OKDBInvalidValueError','dropFts','round','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','createHash','views','digest','stringify','parse','env:removed','[okdb]\x20started\x20in\x20','columns','files/','assertLimit','OKDBError','(none)','[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22','Invalid\x20license\x20blob:\x20','EXPIRES','scrypt','.\x20Add\x20a\x20license\x20that\x20includes\x20\x22','index:ready','[env]','\x20\x20Tier:\x20\x20\x20\x20','noAdmin','set','getPins','\x20\x20\x20http://localhost:','[okdb]\x20error:\x20token\x20with\x20name\x20\x22','sort','—\x20/api/\x20is\x20auto-prefixed,\x20env\x20is\x20auto-injected','Shutting\x20down\x20due\x20to\x20license\x20expiry','api','VERSION_MISMATCH','\x20\x20Build:\x20\x20\x20key\x20fingerprint\x20','exit','127.0.0.1','resolve','\x1b[34m','tags','item:create','param','replace','\x20\x20\x20\x20status:\x20\x20\x20\x20active','\x0a[okdb]\x20error:\x20','message','floor','License\x20signature\x20invalid\x20—\x20this\x20license\x20was\x20not\x20signed\x20by\x20the\x20key\x20paired\x20with\x20this\x20build.\x20','data','isArray','derivePin','No\x20license\x20found\x20matching\x20this\x20activation\x20token','Sync','call','selfAddress','\x20\x20Note:\x20this\x20node\x20has\x20existing\x20tokens.\x20They\x20will\x20coexist\x20with\x20cluster\x20tokens\x0a','SCHEMA_COLLECTION_INVALID','min','records','INDEX_HAS_CONSUMERS','\x0d[okdb]\x20','line','--password','toString','http','--help','detectInputType','admin','[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22','fts:registered','~tokens','toUpperCase','writeFileSync','log','\x20\x20\x20\x20usage:\x20\x20\x20','decodeLicenseBlob:\x20blob\x20too\x20short\x20(','\x20licenses','env','current','_computeStatus','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20','20GVkShL','\x20\x20records=','\x20\x20⚠','assertFeature','\x20\x20Usage:','decodeActivationToken:\x20input\x20must\x20be\x20a\x20string','PUT','\x20\x20✓\x20Revoked\x20token\x20','isInteger','\x20\x20skipped=','--key','types/env=','[body]','loadEnvFile','open\x20','Processors','timeMachine','uuid','/api/env/','./okdb-export.ndjson','\x20\x20\x20\x20-\x20The\x20license\x20blob\x20has\x20not\x20been\x20added\x20yet\x20—\x20run\x20`okdb\x20license\x20<blob>`\x20first.','rawBuf','\x20\x20Type\x20','licenseType','\x20\x20\x20\x20admin:\x20http://localhost:','decodeLicenseBlob','--label','red','[okdb]\x20error:\x20--grants\x20must\x20be\x20valid\x20JSON\x20object','Environments','wrong_node','concat','registerIndex','licensed','type:registered','find','config','license','[okdb]\x20backup\x20complete','count','/types\x0a\x20\x20\x20\x20','--no-repl','fts:','\x20logs\x20off\x0a','~licenses','\x20\x20✓\x20Removed\x20license\x20','writes=','node\x20','Records','setTtl','\x22.\x20Use:\x20create,\x20list,\x20revoke','Either\x20the\x20build\x20was\x20made\x20with\x20a\x20different\x20keypair,\x20or\x20the\x20license\x20was\x20issued\x20with\x20a\x20different\x20private\x20key.','--token','_systemEnv','\x20\x20Common\x20causes:','test','Engines','randomBytes','\x20\x20\x20\x20expires:\x20\x20\x20','type/users\x20--help','level','--open','\x20references\x20','\x20log\x20level:\x20','key','dropping','--drop','handle','white','[okdb]\x20blobs:\x20imported=','stdin','\x20\x20\x20\x20\x20\x20\x20','string','[okdb]\x20backing\x20up\x20to\x20','[okdb]\x20exporting\x20env\x20\x22','.kdb_history','\x20writes\x20(','dropSchema','engines','logLevel','equals','server','access:\x20','_envs','\x0a\x20\x20✓\x20License\x20activated','[okdb]\x20error:\x20failed\x20to\x20read\x20','\x20opening\x20','sourceKey','.\x20Only\x20primitives,\x20null,\x20Buffers,\x20and\x20arrays\x20are\x20allowed.\x20Got:\x20','--ttl','62256Lkowod','gray','description','Full-text\x20search','\x20\x20after\x20sync.\x20Duplicate\x20names\x20will\x20surface\x20as\x20ambiguous\x20logins\x20to\x20clean\x20up.','padStart','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20GET\x20(implicit)\x0a\x20\x20','sha256','finally','type/','schema:set','repeat','\x20\x20Example:\x20okdb\x20join\x20https://node-a.example.com\x20--token\x20<t>\x20--address\x20http://myhost:8484\x0a','meta','[okdb]\x20created\x20.kdbconfig','starting','\x20\x20\x20\x20•\x20a\x20license\x20blob\x20\x20\x20(Crockford\x20base32,\x20~150–250\x20chars)','_active','Type\x20\x27','SCHEMA_VALIDATION_FAILED','Unique\x20constraint\x20violated\x20on\x20','__writeCounter','License\x20signature\x20invalid:\x20','version','features','OKDBTypeAlreadyRegisteredError','split','PERMISSIONS','free\x20tier','PUB_FINGERPRINT','--env','\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','homedir','number','listRoutes','cyan','yes','fts:reset','help','\x20for\x20commands,\x20','\x1b[1m','_licenseHash','\x20\x20Shell\x20commands','Token\x20secret\x20not\x20configured','\x20\x20(licenses\x20must\x20be\x20signed\x20by\x20the\x20matching\x20private\x20key)','indexOf','cause','ttl','toISOString',',\x20label:\x20','\x20\x20✓\x20joined\x20and\x20reconciliation\x20initiated','OKDBSchemaValidationError','bold','112PIJSTN','[okdb]\x20error:\x20revoke\x20requires\x20an\x20id\x20argument','/admin/index.html','index:drop','copy','backup','70404MXUTKC','schema:drop','[okdb]\x20exporting\x20blobs…','[okdb]\x20export\x20complete','TYPES','\x20\x20changes=','Cannot\x20delete\x20','\x20\x20\x20\x20path:\x20\x20','okdb','--permissions','createServer','UNIQUE_CONSTRAINT','.kdbconfig','\x20more','\x20\x20Usage:\x20','prototype','[okdb]\x20importing\x20','[okdb]\x20invalid\x20log\x20level:\x20\x22','node','queue','ready','\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20','\x20\x20(licensee:\x20','\x20(expires\x20in\x20','\x22\x20is\x20used\x20by:\x20','peers=','(on\x20any\x20path\x20command)','getSecurityNotices','\x0a\x20\x20Run\x20okdb\x20to\x20start\x20the\x20server.\x0a','init','expires','\x0a\x20\x20Delete\x20ALL\x20data\x20in\x20','--version','info','\x0d[okdb]\x20blobs:\x20','other','--no-admin','type:drop','roles','then','idx:','http://localhost:','processors/','__OKDB_PUB_FINGERPRINT__','pending','\x20not\x20found','LICENSED_BUILD','resetFts','License\x20already\x20stored','activateLicense','join','addLicense','\x20active\x20env:\x20','\x0a\x20\x20No\x20routes\x20matching\x20\x22','argv','\x20\x20→\x20\x20','\x20\x20✓\x20','/type/users/query\x0a\x20\x20\x20\x20','green','../','OKDBIndexAlreadyRegisteredError','database\x20path\x20not\x20writable:\x20','status','reset','env/','terminal','PUT\x20type/users/item/x\x20{\x22n\x22:1}','hex','stopped','fieldPath','\x20\x20✓\x20http\x20listening\x20on\x20:','.\x20The\x20active\x20license\x20does\x20not\x20enable\x20\x22','dropIndex','LICENSE_TYPE_OPEN','export','activation','\x1b[31m','--username','\x20\x20All\x20checks\x20passed.\x0a','toLocaleString','\x1b[35m','\x20\x20⚠\x20\x20','SIGTERM','\x20\x20\x20\x20status:\x20\x20\x20\x20active\x20\x20(open\x20license\x20—\x20no\x20activation\x20needed)','includes','timingSafeEqual','Bearer\x20','hasOwnProperty','licenseHash','writeUInt32BE','changes','reverse','FEATURES','question','index:registered','Feature\x20not\x20available\x20on\x20free\x20tier:\x20','config\x20file\x20invalid:\x20','use\x20<env>','reason','effective','addedAt','No\x20tokens.','Hint:\x20','revoke','--log-requests','\x22\x20matches\x20','/api/','setPrompt','start\x20','--address','trim','license:invalid','path','\x20\x20·\x20\x20','valid','readFileSync','HELP','\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','Open\x20licenses\x20cannot\x20exceed\x206\x20months\x20duration\x20(this\x20license\x20expires\x20','2641410IdHpeY','[okdb]\x20error:\x20license\x20management\x20is\x20only\x20available\x20in\x20licensed\x20builds\x20(npm\x20run\x20build:prod).','[filter]','expired','writeUInt8','OKDBForeignKeyError','system:bus_state_change','kind','created','--blobs','\x22\x20→\x20','ref:violation_resolved','isTTY','error','\x20tokens:','dbPath','options','{}[]:,\x27\x22','[okdb]\x20loaded\x20config:\x20','Index\x20\x22','verify','code','token','logRequests','limits','children','unlinkSync','label','pid','keys/public.pem','2slhBLu','hint','\x22\x20already\x20exists','[okdb]\x20starting…\x0a','sizeBefore','false','.\x20Primary\x20keys\x20must\x20be\x20string\x20or\x20number.\x20Got:\x20','password','constructor','exec','/\x20quit\x20/\x20Ctrl+C','address','\x20in\x20','pin','registerType','freeze','object','\x20\x20\x20\x20\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/','sig','\x20\x20\x20\x20license:\x20','write','padEnd','permissions','isFeatureEnabled','stdout','transaction','\x20\x20[','OKDBInvalidPrimaryKeyError','listen','ENV'];_0x1224=function(){return _0x51c310;};return _0x1224();}module['exports']=okdb;
|
|
2
|
+
'use strict';const _0x3f7624=_0x5a91;(function(_0x30f38f,_0x88d99a){const _0x337555=_0x5a91,_0x1369e3=_0x30f38f();while(!![]){try{const _0x31a3fb=parseInt(_0x337555(0x146))/0x1+parseInt(_0x337555(0x2f7))/0x2+-parseInt(_0x337555(0x1b4))/0x3+parseInt(_0x337555(0x312))/0x4+-parseInt(_0x337555(0x1e0))/0x5+parseInt(_0x337555(0x175))/0x6*(-parseInt(_0x337555(0x257))/0x7)+-parseInt(_0x337555(0x36d))/0x8*(-parseInt(_0x337555(0x346))/0x9);if(_0x31a3fb===_0x88d99a)break;else _0x1369e3['push'](_0x1369e3['shift']());}catch(_0x25c031){_0x1369e3['push'](_0x1369e3['shift']());}}}(_0x75a2,0xafac3));var require$$1$1=require(_0x3f7624(0x294)),require$$1=require('fs'),require$$3=require(_0x3f7624(0x300)),require$$0$2=require(_0x3f7624(0x424)),require$$5=require('../okdb'),require$$0=require(_0x3f7624(0x34a)),require$$0$1=require(_0x3f7624(0x34c)),require$$2$1=require('os'),require$$4=require(_0x3f7624(0x27f));function getDefaultExportFromCjs(_0x54e1cd){const _0x325694=_0x3f7624;return _0x54e1cd&&_0x54e1cd['__esModule']&&Object[_0x325694(0x2a7)][_0x325694(0x21d)][_0x325694(0x19a)](_0x54e1cd,_0x325694(0x397))?_0x54e1cd[_0x325694(0x397)]:_0x54e1cd;}var okdb$1={},version=_0x3f7624(0x355),require$$2={'version':version},okdbAuthTokens,hasRequiredOkdbAuthTokens;function requireOkdbAuthTokens(){if(hasRequiredOkdbAuthTokens)return okdbAuthTokens;hasRequiredOkdbAuthTokens=0x1;const _0x58cca9=require$$0;function _0x1261f8(_0x11111d,_0xcc95f6){const _0x534c51=_0x5a91;return _0x58cca9[_0x534c51(0x341)](_0x534c51(0x2b4),_0xcc95f6)[_0x534c51(0x173)](_0x11111d)[_0x534c51(0x19d)](_0x534c51(0x345));}function _0x39ef30(_0x50336e,_0x5a26a2){const _0x8f4a70=_0x5a91;if(typeof _0x50336e!==_0x8f4a70(0x353)||typeof _0x5a26a2!==_0x8f4a70(0x353))return![];if(Buffer[_0x8f4a70(0x1e3)](_0x50336e)!==Buffer[_0x8f4a70(0x1e3)](_0x5a26a2))return![];return _0x58cca9[_0x8f4a70(0x2a4)](Buffer['from'](_0x50336e),Buffer['from'](_0x5a26a2));}function _0x4d0f75(_0x4e60df){const _0x2ccb7b=_0x5a91;if(!_0x4e60df?.[_0x2ccb7b(0x405)](_0x2ccb7b(0x1fa)))return null;return _0x4e60df[_0x2ccb7b(0x297)](0x7);}function _0x374e23(_0x950de6=0x20){const _0x260b9f=_0x5a91;return _0x58cca9['randomBytes'](_0x950de6)[_0x260b9f(0x17d)](_0x260b9f(0x345));}function _0x1d13c5(_0x4c9b70){const _0x20faab=_0x5a91;return _0x58cca9[_0x20faab(0x329)](_0x20faab(0x2b4))['update'](_0x4c9b70)[_0x20faab(0x19d)]('hex');}function _0x450cd5(_0x2621a6,_0x4d6a8b,_0x1a67f5=0x36ee80){const _0x1a8483=_0x5a91;if(!_0x4d6a8b)throw new Error(_0x1a8483(0x1aa));const _0x4b6a29=Date[_0x1a8483(0x3d3)](),_0x5141c0=Buffer['from'](JSON['stringify']({'iat':_0x4b6a29,'exp':_0x4b6a29+_0x1a67f5,'sub':_0x2621a6?.['id']??_0x2621a6?.[_0x1a8483(0x250)]??null,'username':_0x2621a6?.[_0x1a8483(0x27c)]??_0x2621a6?.[_0x1a8483(0x2f8)]??null,'roles':Array[_0x1a8483(0x2d2)](_0x2621a6?.[_0x1a8483(0x1c7)])?_0x2621a6[_0x1a8483(0x1c7)]:[]}))[_0x1a8483(0x17d)](_0x1a8483(0x345)),_0x526895=_0x1261f8(_0x5141c0,_0x4d6a8b);return _0x5141c0+'.'+_0x526895;}function _0xcaa119(_0x2c2d1b,_0x9c9c94){const _0x377c88=_0x5a91;if(!_0x9c9c94||typeof _0x2c2d1b!==_0x377c88(0x353))return null;const [_0x3fc6bd,_0x3a8770]=_0x2c2d1b['split']('.');if(!_0x3fc6bd||!_0x3a8770)return null;const _0x5b02c0=_0x1261f8(_0x3fc6bd,_0x9c9c94);if(!_0x39ef30(_0x3a8770,_0x5b02c0))return null;try{const _0x1c37ec=JSON[_0x377c88(0x421)](Buffer[_0x377c88(0x190)](_0x3fc6bd,_0x377c88(0x345))[_0x377c88(0x17d)]()),_0x32bafe=0x7530;if(Date['now']()>Number(_0x1c37ec?.[_0x377c88(0x211)]??0x0)+_0x32bafe)return null;return _0x1c37ec;}catch{return null;}}async function _0x495d92(_0x18e482){return new Promise((_0x9b1612,_0xf82c80)=>{const _0x502e48=_0x58cca9['randomBytes'](0x10);_0x58cca9['scrypt'](_0x18e482,_0x502e48,0x40,(_0x7e1c03,_0x4017cb)=>{const _0x324e58=_0x5a91;if(_0x7e1c03)_0xf82c80(_0x7e1c03);_0x9b1612(_0x502e48[_0x324e58(0x17d)](_0x324e58(0x40f))+':'+_0x4017cb[_0x324e58(0x17d)](_0x324e58(0x40f)));});});}async function _0x5388c6(_0x37775e,_0x3aa6a2){const _0x6165ed=_0x5a91,[_0x2770b0,_0x2c8d5a]=_0x3aa6a2[_0x6165ed(0x265)](':');if(!_0x2770b0||!_0x2c8d5a)return![];const _0x1abc70=Buffer['from'](_0x2770b0,_0x6165ed(0x40f));return new Promise((_0x4e8d21,_0x3ed9f1)=>{const _0x17f26e=_0x6165ed;_0x58cca9[_0x17f26e(0x33c)](_0x37775e,_0x1abc70,0x40,(_0x44e1c2,_0xc60051)=>{const _0xbde730=_0x17f26e;if(_0x44e1c2)_0x3ed9f1(_0x44e1c2);_0x4e8d21(_0x58cca9[_0xbde730(0x2a4)](_0xc60051,Buffer[_0xbde730(0x190)](_0x2c8d5a,_0xbde730(0x40f))));});});}return okdbAuthTokens={'hmac':_0x1261f8,'timingSafeEqual':_0x39ef30,'parseBearer':_0x4d0f75,'randomToken':_0x374e23,'hashToken':_0x1d13c5,'issueToken':_0x450cd5,'authenticateToken':_0xcaa119,'hashPassword':_0x495d92,'verifyPassword':_0x5388c6},okdbAuthTokens;}var okdbLicenseCodec,hasRequiredOkdbLicenseCodec;function requireOkdbLicenseCodec(){const _0x245ba5=_0x3f7624;if(hasRequiredOkdbLicenseCodec)return okdbLicenseCodec;hasRequiredOkdbLicenseCodec=0x1;const _0x365a7b=require$$0$1,_0x81c383=_0x245ba5(0x1e8),_0x19d6d2=new Uint8Array(0x100)[_0x245ba5(0x204)](0xff);for(let _0x5d675c=0x0;_0x5d675c<_0x81c383[_0x245ba5(0x2de)];_0x5d675c++){_0x19d6d2[_0x81c383[_0x245ba5(0x35f)](_0x5d675c)]=_0x5d675c,_0x19d6d2[_0x81c383[_0x245ba5(0x35f)](_0x5d675c)+0x20]=_0x5d675c;}_0x19d6d2['O'[_0x245ba5(0x35f)](0x0)]=0x0,_0x19d6d2['o'[_0x245ba5(0x35f)](0x0)]=0x0,_0x19d6d2['I'[_0x245ba5(0x35f)](0x0)]=0x1,_0x19d6d2['i'[_0x245ba5(0x35f)](0x0)]=0x1,_0x19d6d2['L'[_0x245ba5(0x35f)](0x0)]=0x1,_0x19d6d2['l'[_0x245ba5(0x35f)](0x0)]=0x1;function _0x267d4e(_0x489b60){const _0x5c9a36=_0x245ba5;let _0x256819=0x0,_0x45c41b=0x0,_0x38cdb3='';for(let _0x5aa1cc=0x0;_0x5aa1cc<_0x489b60[_0x5c9a36(0x2de)];_0x5aa1cc++){_0x45c41b=_0x45c41b<<0x8|_0x489b60[_0x5aa1cc],_0x256819+=0x8;while(_0x256819>=0x5){_0x256819-=0x5,_0x38cdb3+=_0x81c383[_0x45c41b>>>_0x256819&0x1f];}}return _0x256819>0x0&&(_0x38cdb3+=_0x81c383[_0x45c41b<<0x5-_0x256819&0x1f]),_0x38cdb3;}function _0x1942a1(_0x5cfdf7){const _0x10035e=_0x245ba5;_0x5cfdf7=_0x5cfdf7[_0x10035e(0x282)](/-/g,'')['toUpperCase']();let _0x48aa1d=0x0,_0x593d79=0x0;const _0x58f3b4=[];for(let _0x5dcaa2=0x0;_0x5dcaa2<_0x5cfdf7['length'];_0x5dcaa2++){const _0x11927c=_0x19d6d2[_0x5cfdf7['charCodeAt'](_0x5dcaa2)];if(_0x11927c===0xff)continue;_0x593d79=_0x593d79<<0x5|_0x11927c,_0x48aa1d+=0x5,_0x48aa1d>=0x8&&(_0x48aa1d-=0x8,_0x58f3b4[_0x10035e(0x197)](_0x593d79>>>_0x48aa1d&0xff));}return Buffer[_0x10035e(0x190)](_0x58f3b4);}const _0x354180=[_0x245ba5(0x2bc),'embeddings',_0x245ba5(0x33e),'fts',_0x245ba5(0x1b1),'views',_0x245ba5(0x1ca),_0x245ba5(0x342)],_0x123a07=0x0,_0x20c0b4=0x1,_0x388cdd=0x6*0x1e*0x18*0x3c*0x3c*0x3e8;function _0x17815c({issuedAt:_0x40393d,expiresAt:_0x1faaef,licensee:licensee='',features:features={},limits:limits={},licenseType:licenseType=_0x123a07}){const _0xbac1b5=_0x245ba5,_0x7329fb=Buffer[_0xbac1b5(0x190)](licensee,'utf8')[_0xbac1b5(0x297)](0x0,0x40),_0x284324=0x1+0x1+0x4+0x4+0x1+_0x7329fb['length']+0x2+0x10,_0x5a0110=Buffer[_0xbac1b5(0x1c2)](_0x284324);let _0x15676d=0x0;_0x5a0110[_0xbac1b5(0x2d6)](0x1,_0x15676d++),_0x5a0110[_0xbac1b5(0x2d6)](licenseType,_0x15676d++),_0x5a0110[_0xbac1b5(0x270)](Math['floor'](_0x40393d/0x3e8),_0x15676d),_0x15676d+=0x4,_0x5a0110[_0xbac1b5(0x270)](Math['floor'](_0x1faaef/0x3e8),_0x15676d),_0x15676d+=0x4,_0x5a0110[_0xbac1b5(0x2d6)](_0x7329fb[_0xbac1b5(0x2de)],_0x15676d++),_0x7329fb['copy'](_0x5a0110,_0x15676d),_0x15676d+=_0x7329fb['length'];let _0x22e62b=0x0;for(let _0x50bb26=0x0;_0x50bb26<_0x354180[_0xbac1b5(0x2de)];_0x50bb26++){if(features[_0x354180[_0x50bb26]])_0x22e62b|=0x1<<_0x50bb26;}_0x5a0110[_0xbac1b5(0x216)](_0x22e62b,_0x15676d),_0x15676d+=0x2;const _0x1aec09=[_0xbac1b5(0x343),_0xbac1b5(0x1ba),'syncPeers','maxWrites'];for(const _0x13e451 of _0x1aec09){_0x5a0110[_0xbac1b5(0x270)](limits[_0x13e451]||0x0,_0x15676d),_0x15676d+=0x4;}return _0x5a0110;}function _0x26f099(_0x57f32f){const _0x1bec31=_0x245ba5;let _0x7353ea=0x0;const _0x595054=_0x57f32f[_0x1bec31(0x1fe)](_0x7353ea++),_0x3a319c=_0x57f32f['readUInt8'](_0x7353ea++),_0x31812b=_0x57f32f[_0x1bec31(0x3d2)](_0x7353ea);_0x7353ea+=0x4;const _0x208952=_0x57f32f[_0x1bec31(0x3d2)](_0x7353ea);_0x7353ea+=0x4;const _0x3f8653=_0x57f32f[_0x1bec31(0x1fe)](_0x7353ea++),_0xc2cb77=_0x57f32f[_0x1bec31(0x297)](_0x7353ea,_0x7353ea+_0x3f8653)[_0x1bec31(0x17d)]('utf8');_0x7353ea+=_0x3f8653;const _0x24bf8e=_0x57f32f[_0x1bec31(0x193)](_0x7353ea);_0x7353ea+=0x2;const _0x39cc65={};for(let _0x37ffbc=0x0;_0x37ffbc<_0x354180[_0x1bec31(0x2de)];_0x37ffbc++){_0x39cc65[_0x354180[_0x37ffbc]]=Boolean(_0x24bf8e&0x1<<_0x37ffbc);}const _0x27786b=[_0x1bec31(0x343),_0x1bec31(0x1ba),_0x1bec31(0x3f0),_0x1bec31(0x314)],_0x5b7426={};for(const _0x4bf93e of _0x27786b){const _0xc7a2f6=_0x57f32f['readUInt32BE'](_0x7353ea);_0x7353ea+=0x4,_0x5b7426[_0x4bf93e]=_0xc7a2f6===0x0?null:_0xc7a2f6;}return{'v':_0x595054,'licenseType':_0x3a319c,'issuedAt':_0x31812b*0x3e8,'expiresAt':_0x208952*0x3e8,'licensee':_0xc2cb77,'features':_0x39cc65,'limits':_0x5b7426};}function _0x284b99(_0x111c0e,_0x200bd6){const _0x417b53=_0x245ba5,_0x5798be=Buffer[_0x417b53(0x149)]([_0x111c0e,_0x200bd6]),_0x5ba8ea=_0x267d4e(_0x5798be),_0x2e1b7f=[];for(let _0x1987b6=0x0;_0x1987b6<_0x5ba8ea['length'];_0x1987b6+=0x8){_0x2e1b7f[_0x417b53(0x197)](_0x5ba8ea[_0x417b53(0x297)](_0x1987b6,_0x1987b6+0x8));}return _0x2e1b7f[_0x417b53(0x277)]('-');}function _0x321f78(_0x1feb47){const _0x224dc0=_0x245ba5;if(typeof _0x1feb47!==_0x224dc0(0x353))throw new Error(_0x224dc0(0x160));const _0x1438e6=_0x1942a1(_0x1feb47[_0x224dc0(0x282)](/-/g,''));if(_0x1438e6[_0x224dc0(0x2de)]<0x41)throw new Error('decodeLicenseBlob:\x20blob\x20too\x20short\x20('+_0x1438e6[_0x224dc0(0x2de)]+'\x20bytes,\x20need\x20>=\x2065)');const _0x3292ea=_0x1438e6[_0x224dc0(0x297)](0x0,_0x1438e6[_0x224dc0(0x2de)]-0x40),_0x4068b7=_0x1438e6[_0x224dc0(0x297)](_0x1438e6[_0x224dc0(0x2de)]-0x40);let _0x10daae;try{_0x10daae=_0x26f099(_0x3292ea);}catch(_0x19e0fb){throw new Error(_0x224dc0(0x1dd)+_0x19e0fb[_0x224dc0(0x183)]);}return{'rawBuf':_0x1438e6,'payload':_0x3292ea,'sig':_0x4068b7,'decoded':_0x10daae};}function _0x33a6aa(_0x4f47b5){const _0x4e8175=_0x245ba5;return _0x365a7b[_0x4e8175(0x329)](_0x4e8175(0x2b4))[_0x4e8175(0x173)](_0x4f47b5)['digest']()[_0x4e8175(0x297)](0x0,0x8);}function _0x54fa17(_0x376f32,_0x3b2002,_0x5305ed){const _0x564661=_0x245ba5,_0x22ae19=_0x564661(0x32a)+_0x5305ed,_0x240ed1=Buffer[_0x564661(0x149)]([Buffer[_0x564661(0x190)](_0x376f32,_0x564661(0x378)),_0x3b2002]),_0x151106=_0x365a7b[_0x564661(0x341)]('sha256',_0x22ae19)[_0x564661(0x173)](_0x240ed1)[_0x564661(0x19d)](),_0x2af481=_0x267d4e(_0x151106[_0x564661(0x297)](0x0,0x5));return{'pin':_0x2af481,'pinHmac':_0x151106};}function _0x4601db(_0x42ace6,_0x4c0532,_0x548831){const _0x30bda5=_0x245ba5,_0xee2257=Buffer[_0x30bda5(0x1c2)](0x4d);let _0x4b5653=0x0;_0xee2257[_0x30bda5(0x2d6)](0x1,_0x4b5653++),_0x42ace6[_0x30bda5(0x18b)](_0xee2257,_0x4b5653),_0x4b5653+=0x8,_0xee2257[_0x30bda5(0x270)](_0x4c0532,_0x4b5653),_0x4b5653+=0x4,_0x548831['copy'](_0xee2257,_0x4b5653);const _0x59660a=_0x267d4e(_0xee2257),_0x1f99ec=[];for(let _0x559279=0x0;_0x559279<_0x59660a[_0x30bda5(0x2de)];_0x559279+=0x6){_0x1f99ec[_0x30bda5(0x197)](_0x59660a[_0x30bda5(0x297)](_0x559279,_0x559279+0x6));}return _0x1f99ec['join']('-');}function _0x302754(_0x5e733a){const _0x490cc2=_0x245ba5;if(typeof _0x5e733a!==_0x490cc2(0x353))throw new Error('decodeActivationToken:\x20input\x20must\x20be\x20a\x20string');const _0x5a92e0=_0x1942a1(_0x5e733a[_0x490cc2(0x282)](/-/g,''));if(_0x5a92e0['length']!==0x4d)throw new Error(_0x490cc2(0x16f)+_0x5a92e0[_0x490cc2(0x2de)]);let _0x42c2c8=0x0;const _0x16d5d4=_0x5a92e0[_0x490cc2(0x1fe)](_0x42c2c8++),_0x59befa=_0x5a92e0[_0x490cc2(0x297)](_0x42c2c8,_0x42c2c8+0x8);_0x42c2c8+=0x8;const _0x20c67e=_0x5a92e0[_0x490cc2(0x3d2)](_0x42c2c8);_0x42c2c8+=0x4;const _0x17a475=_0x5a92e0[_0x490cc2(0x297)](_0x42c2c8);return{'v':_0x16d5d4,'licenseHash':_0x59befa,'expiry':_0x20c67e,'sig':_0x17a475};}function _0x19e437({tokenString:_0x4ab3b9,nodeId:_0x125155,rawBlobBuf:_0x2620fc,pubKeyPem:_0x505c8e,pubFingerprint:_0x19aca2}){const _0x3766c2=_0x245ba5;let _0xf9b427;try{_0xf9b427=_0x302754(_0x4ab3b9);}catch(_0x349336){return{'valid':![],'reason':'MALFORMED_TOKEN'};}const _0x149394=_0x33a6aa(_0x2620fc);if(!_0x149394[_0x3766c2(0x28f)](_0xf9b427[_0x3766c2(0x362)]))return{'valid':![],'reason':_0x3766c2(0x2c4)};const {pinHmac:_0x107138}=_0x54fa17(_0x125155,_0x149394,_0x19aca2),_0x1b7888=Buffer[_0x3766c2(0x1c2)](0x4);_0x1b7888[_0x3766c2(0x270)](_0xf9b427[_0x3766c2(0x2fa)],0x0);const _0x435d76=Buffer[_0x3766c2(0x149)]([Buffer[_0x3766c2(0x190)]([_0xf9b427['v']]),_0x107138[_0x3766c2(0x297)](0x0,0x5),_0xf9b427['licenseHash'],_0x1b7888]);try{const _0x218122=_0x365a7b[_0x3766c2(0x361)](null,_0x435d76,_0x505c8e,_0xf9b427[_0x3766c2(0x1c9)]);if(!_0x218122)return{'valid':![],'reason':'SIG_INVALID'};}catch(_0xc126be){return{'valid':![],'reason':'SIG_INVALID'};}if(_0xf9b427[_0x3766c2(0x2fa)]<Date[_0x3766c2(0x3d3)]()/0x3e8)return{'valid':![],'reason':_0x3766c2(0x21b)};return{'valid':!![],'reason':'ok'};}function _0x4d18d8(_0x376b5b){const _0x33b109=_0x245ba5;if(typeof _0x376b5b!==_0x33b109(0x353))return'unknown';const _0x5ae9be=_0x376b5b[_0x33b109(0x374)]();if(_0x5ae9be[_0x33b109(0x405)]('/')||_0x5ae9be['startsWith']('./')||_0x5ae9be[_0x33b109(0x405)](_0x33b109(0x159))||/^[A-Za-z]:[\\/]/[_0x33b109(0x380)](_0x5ae9be))return _0x33b109(0x294);if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i[_0x33b109(0x380)](_0x5ae9be))return _0x33b109(0x20e);const _0x52e6cb=_0x5ae9be['replace'](/[\s-]+/g,'')[_0x33b109(0x2de)];if(_0x52e6cb===0x7c)return'activation';if(_0x52e6cb>=0x95&&_0x52e6cb<=0xfc)return _0x33b109(0x2d9);return _0x33b109(0x222);}return okdbLicenseCodec={'toBase32':_0x267d4e,'fromBase32':_0x1942a1,'encodeLicensePayload':_0x17815c,'decodeLicensePayload':_0x26f099,'encodeLicenseBlob':_0x284b99,'decodeLicenseBlob':_0x321f78,'licenseHash':_0x33a6aa,'derivePin':_0x54fa17,'encodeActivationToken':_0x4601db,'decodeActivationToken':_0x302754,'verifyActivation':_0x19e437,'detectInputType':_0x4d18d8,'FEATURE_NAMES':_0x354180,'LICENSE_TYPE_STANDARD':_0x123a07,'LICENSE_TYPE_OPEN':_0x20c0b4,'OPEN_LICENSE_MAX_DURATION_MS':_0x388cdd},okdbLicenseCodec;}var okdbError,hasRequiredOkdbError;function requireOkdbError(){if(hasRequiredOkdbError)return okdbError;hasRequiredOkdbError=0x1;class _0x10e782 extends Error{constructor(_0x5359eb,_0x30ed0d,_0x121414={}){const _0x47f9fd=_0x5a91;super(_0x5359eb),this['name']=_0x47f9fd(0x1a1),this['code']=_0x30ed0d,this[_0x47f9fd(0x2df)]=_0x121414,_0x121414[_0x47f9fd(0x1d0)]&&(this[_0x47f9fd(0x1d0)]=_0x121414[_0x47f9fd(0x1d0)]),Error[_0x47f9fd(0x1d3)](this,this['constructor']);}}class _0x578490 extends _0x10e782{constructor(_0x210e4b,_0x14733,_0x320ebc,_0x1d1e0a){const _0x2f4040=_0x5a91;super(_0x2f4040(0x2e5)+_0x210e4b+'@'+_0x14733+_0x2f4040(0x21c)+_0x320ebc+_0x2f4040(0x3e6)+_0x1d1e0a,'VERSION_MISMATCH',{'type':_0x210e4b,'key':_0x14733,'expectedVersion':_0x320ebc,'actualVersion':_0x1d1e0a}),this[_0x2f4040(0x2f8)]='OKDBVersionMismatchError';}}class _0x2d8d77 extends _0x10e782{constructor(_0x50d623,_0x273acb){const _0x586b24=_0x5a91;super(_0x50d623+'@'+_0x273acb+_0x586b24(0x383),'NOT_FOUND',{'type':_0x50d623,'key':_0x273acb}),this[_0x586b24(0x2f8)]='OKDBNotFoundError';}}class _0xd2a703 extends _0x10e782{constructor(_0x138e3c,_0x570e0e){const _0x2bb868=_0x5a91;super(_0x138e3c+'@'+_0x570e0e+'\x20already\x20exists',_0x2bb868(0x260),{'type':_0x138e3c,'key':_0x570e0e}),this[_0x2bb868(0x2f8)]='OKDBAlreadyExistsError';}}class _0x475b20 extends _0x10e782{constructor(_0x27b27d,_0xd38f80){const _0x3d6a93=_0x5a91,_0x59d346=typeof _0xd38f80;super(_0x3d6a93(0x291)+_0x27b27d+'\x27:\x20'+_0x59d346+_0x3d6a93(0x3dc)+_0xd38f80,_0x3d6a93(0x26c),{'index':_0x27b27d,'key':_0xd38f80,'keyType':_0x59d346}),this[_0x3d6a93(0x2f8)]='OKDBInvalidIndexKeyError';}}class _0x6b230a extends _0x10e782{constructor(_0x39fd74){const _0x3e1f2b=_0x5a91,_0x2c46f9=typeof _0x39fd74;super(_0x3e1f2b(0x3ed)+_0x2c46f9+_0x3e1f2b(0x2c2)+_0x39fd74,_0x3e1f2b(0x142),{'key':_0x39fd74,'keyType':_0x2c46f9}),this['name']=_0x3e1f2b(0x268);}}class _0x115c3d extends _0x10e782{constructor(_0x31e14e){const _0x1a2d1c=_0x5a91;super(_0x1a2d1c(0x379)+_0x31e14e+_0x1a2d1c(0x299),'TYPE_NOT_REGISTERED',{'type':_0x31e14e}),this[_0x1a2d1c(0x2f8)]='OKDBTypeNotRegisteredError';}}class _0x6297e8 extends _0x10e782{constructor(_0x215585){const _0x509630=_0x5a91;super(_0x509630(0x379)+_0x215585+_0x509630(0x2ed),_0x509630(0x3ff),{'type':_0x215585}),this[_0x509630(0x2f8)]=_0x509630(0x430);}}class _0x51ffd0 extends _0x10e782{constructor(_0x26b737,_0x492efc){const _0x2135f0=_0x5a91;super(_0x2135f0(0x3de)+_0x492efc+'\x27\x20on\x20type\x20\x27'+_0x26b737+_0x2135f0(0x299),'INDEX_NOT_REGISTERED',{'type':_0x26b737,'index':_0x492efc}),this[_0x2135f0(0x2f8)]=_0x2135f0(0x2f4);}}class _0xca30c5 extends _0x10e782{constructor(_0x3c8243,_0x568781){const _0x1bc89c=_0x5a91;super('Index\x20\x27'+_0x568781+_0x1bc89c(0x3a2)+_0x3c8243+_0x1bc89c(0x229),_0x1bc89c(0x323),{'type':_0x3c8243,'index':_0x568781}),this['name']=_0x1bc89c(0x393);}}class _0x33d6ab extends _0x10e782{constructor(_0x14fbb9,_0x433760={}){const _0x2219fa=_0x5a91;super(_0x14fbb9,_0x2219fa(0x40a),_0x433760),this['name']=_0x2219fa(0x209);}}class _0x47ecd3 extends _0x10e782{constructor(_0x274c3b,_0x5022cb,_0x5b38af,_0x2c04ee,_0x1d413b){const _0x52f7cd=_0x5a91;super(_0x52f7cd(0x21e)+_0x274c3b+'@'+_0x5022cb+_0x52f7cd(0x1f6)+_0x5b38af+_0x52f7cd(0x1fb)+_0x2c04ee+_0x52f7cd(0x217)+_0x1d413b+'\x27',_0x52f7cd(0x339),{'type':_0x274c3b,'index':_0x5022cb,'indexKey':_0x5b38af,'existingKey':_0x2c04ee,'conflictingKey':_0x1d413b}),this[_0x52f7cd(0x2f8)]=_0x52f7cd(0x396);}}class _0x18becb extends _0x10e782{constructor(_0x495150,_0x5a7e3f,_0x5c19d9){const _0x2ac318=_0x5a91;super('Schema\x20validation\x20failed\x20for\x20'+_0x495150+'@'+_0x5a7e3f,'SCHEMA_VALIDATION_FAILED',{'type':_0x495150,'key':_0x5a7e3f,'errors':_0x5c19d9}),this[_0x2ac318(0x2f8)]='OKDBSchemaValidationError',this[_0x2ac318(0x150)]=_0x495150,this[_0x2ac318(0x363)]=_0x5a7e3f,this[_0x2ac318(0x212)]=_0x5c19d9;}}class _0x5cfb49 extends _0x10e782{constructor(_0x3ad7d5,_0x5ed67b){const _0x20f81b=_0x5a91;super(_0x20f81b(0x38c)+_0x3ad7d5+':\x20'+_0x5ed67b[_0x20f81b(0x2de)]+_0x20f81b(0x384),_0x20f81b(0x275),{'type':_0x3ad7d5,'failures':_0x5ed67b}),this[_0x20f81b(0x2f8)]='OKDBSchemaCollectionError',this[_0x20f81b(0x150)]=_0x3ad7d5,this['failures']=_0x5ed67b;}}class _0x4d54da extends _0x10e782{constructor(_0x1a546e,_0x202c4b,_0x279d8d,_0x5ca47a,_0x29542a){const _0x50cb54=_0x5a91;super('Foreign\x20key\x20violation:\x20'+_0x1a546e+'@'+_0x202c4b+'.'+_0x279d8d+_0x50cb54(0x3b6)+_0x5ca47a+'@'+_0x29542a+_0x50cb54(0x1f4),_0x50cb54(0x42b),{'sourceType':_0x1a546e,'sourceKey':_0x202c4b,'fieldPath':_0x279d8d,'targetType':_0x5ca47a,'targetKey':_0x29542a}),this[_0x50cb54(0x2f8)]=_0x50cb54(0x3f1),this[_0x50cb54(0x2be)]=_0x1a546e,this[_0x50cb54(0x36a)]=_0x202c4b,this['fieldPath']=_0x279d8d,this[_0x50cb54(0x245)]=_0x5ca47a,this[_0x50cb54(0x269)]=_0x29542a;}}class _0x49ed8a extends _0x10e782{constructor(_0x204d18,_0x56cfbe,_0x4b1953){const _0x4a7d76=_0x5a91;super('Cannot\x20delete\x20'+_0x204d18+'@'+_0x56cfbe+':\x20'+_0x4b1953[_0x4a7d76(0x2de)]+_0x4a7d76(0x13f),_0x4a7d76(0x29d),{'targetType':_0x204d18,'targetKey':_0x56cfbe,'references':_0x4b1953}),this[_0x4a7d76(0x2f8)]=_0x4a7d76(0x226),this['targetType']=_0x204d18,this[_0x4a7d76(0x269)]=_0x56cfbe,this[_0x4a7d76(0x398)]=_0x4b1953;}}class _0xdca5b3 extends _0x10e782{constructor(_0x270987,_0x3dfc9b,_0x3a6c62){const _0x383417=_0x5a91;super(_0x383417(0x3d6)+_0x3dfc9b+_0x383417(0x2ee)+_0x270987+'\x22\x20is\x20used\x20by:\x20'+_0x3a6c62[_0x383417(0x152)](_0x2769b1=>_0x2769b1[_0x383417(0x26a)]+':'+_0x2769b1[_0x383417(0x2f8)])[_0x383417(0x277)](',\x20'),_0x383417(0x376),{'type':_0x270987,'index':_0x3dfc9b,'usedBy':_0x3a6c62}),this['name']=_0x383417(0x231);}}return okdbError={'OKDBError':_0x10e782,'OKDBVersionMismatchError':_0x578490,'OKDBNotFoundError':_0x2d8d77,'OKDBAlreadyExistsError':_0xd2a703,'OKDBInvalidIndexKeyError':_0x475b20,'OKDBInvalidPrimaryKeyError':_0x6b230a,'OKDBTypeNotRegisteredError':_0x115c3d,'OKDBTypeAlreadyRegisteredError':_0x6297e8,'OKDBIndexNotRegisteredError':_0x51ffd0,'OKDBIndexAlreadyRegisteredError':_0xca30c5,'OKDBInvalidValueError':_0x33d6ab,'OKDBUniqueConstraintError':_0x47ecd3,'OKDBSchemaValidationError':_0x18becb,'OKDBSchemaCollectionError':_0x5cfb49,'OKDBForeignKeyError':_0x4d54da,'OKDBForeignKeyDeleteError':_0x49ed8a,'OKDBIndexHasConsumersError':_0xdca5b3},okdbError;}var okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0xdb7ae5=_0x3f7624;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x3a7834={'PUT':_0xdb7ae5(0x16a),'REMOVE':_0xdb7ae5(0x18f),'INDEX_DROP':_0xdb7ae5(0x306),'INDEX_REGISTER':_0xdb7ae5(0x414),'INDEX_RESET':'resetIndex','TYPE_REGISTER':_0xdb7ae5(0x25d),'TYPE_DROP':'dropType','FTS_REGISTER':_0xdb7ae5(0x3c7),'FTS_DROP':_0xdb7ae5(0x42c),'FTS_RESET':_0xdb7ae5(0x423),'SCHEMA_SET':_0xdb7ae5(0x1ad),'SCHEMA_DROP':'dropSchema','TTL_SET':'setTtl','TTL_CLEAR':'clearTtl'},_0x321fad={'SYSTEM_READY':_0xdb7ae5(0x2e1),'SYSTEM_STOPPED':_0xdb7ae5(0x390),'SYSTEM_CLOCK_CHANGE':_0xdb7ae5(0x350),'SYSTEM_POKE':_0xdb7ae5(0x2cc),'SYSTEM_DRAIN':_0xdb7ae5(0x219),'SYSTEM_BUS_STATE_CHANGE':_0xdb7ae5(0x19f),'ITEM_CREATE':'item:create','ITEM_UPDATE':'item:update','ITEM_REMOVE':_0xdb7ae5(0x1f1),'INDEX_RESET':_0xdb7ae5(0x14c),'INDEX_READY':_0xdb7ae5(0x28e),'INDEX_PROGRESS':_0xdb7ae5(0x3fc),'INDEX_DROP':'index:drop','INDEX_REGISTERED':'index:registered','FTS_REGISTERED':_0xdb7ae5(0x164),'FTS_DROP':'fts:drop','FTS_RESET':_0xdb7ae5(0x191),'SCHEMA_SET':'schema:set','SCHEMA_DROP':'schema:drop','UNIQUE_VIOLATION':_0xdb7ae5(0x2aa),'UNIQUE_VIOLATION_RESOLVED':_0xdb7ae5(0x311),'REF_VIOLATION':_0xdb7ae5(0x304),'REF_VIOLATION_RESOLVED':_0xdb7ae5(0x3e3),'SYNC_APPLY':'sync:apply','TXN_START':_0xdb7ae5(0x181),'TXN_END':'txn:end','TXN_ROLLBACK':'txn:rollback','TYPE_REGISTERED':_0xdb7ae5(0x369),'TYPE_DROP':_0xdb7ae5(0x1a5),'ENV_OPENED':_0xdb7ae5(0x31e),'ENV_REMOVED':_0xdb7ae5(0x23b),'TTL_EXPIRED':'ttl:expired','TTL_SET':_0xdb7ae5(0x3ef),'TTL_CLEAR':'ttl:clear','LICENSE_INVALID':_0xdb7ae5(0x29e),'LICENSE_ADDED':_0xdb7ae5(0x1ab),'LICENSE_ACTIVATED':_0xdb7ae5(0x17a),'LICENSE_REMOVED':'license:removed'},_0x3ab7e1={'CREATING':'creating','RESETTING':_0xdb7ae5(0x3d5),'READY':_0xdb7ae5(0x18a),'DROPPING':_0xdb7ae5(0x33d),'WAITING':_0xdb7ae5(0x20c)},_0x43e439={'CREATED':_0xdb7ae5(0x1e9),'STARTING':_0xdb7ae5(0x156),'STARTED':_0xdb7ae5(0x1ec),'STOPPING':'stopping','STOPPED':_0xdb7ae5(0x1ed)},_0x3b9024={'CREATING':_0xdb7ae5(0x213),'READY':'ready','HALTED':_0xdb7ae5(0x1a3),'STOPPED':_0xdb7ae5(0x1ed),'RESETTING':'resetting'},_0x40fdb4=Object[_0xdb7ae5(0x279)]({'POKE':_0xdb7ae5(0x429),'DRAIN':_0xdb7ae5(0x3c8)});return okdbEnums={'BUS_EVENTS':_0x40fdb4,'CHANGE_ACTIONS':_0x3a7834,'EVENTS':_0x321fad,'INDEX_STATE':_0x3ab7e1,'OKDB_STATE':_0x43e439,'VIEW_STATE':_0x3b9024},okdbEnums;}var okdbPubkey,hasRequiredOkdbPubkey;function requireOkdbPubkey(){const _0x19cd98=_0x3f7624;if(hasRequiredOkdbPubkey)return okdbPubkey;hasRequiredOkdbPubkey=0x1;const _0x5d5738=require$$1,_0x10dbb5=require$$1$1,_0x53167a=require$$0,_0xdb6db2=_0x5d5738[_0x19cd98(0x3b7)](_0x10dbb5[_0x19cd98(0x277)](__dirname,_0x19cd98(0x1e6)),_0x19cd98(0x378))[_0x19cd98(0x374)](),_0x1c81f0=_0x53167a[_0x19cd98(0x2ef)](_0xdb6db2)[_0x19cd98(0x39a)]({'type':_0x19cd98(0x1d6),'format':_0x19cd98(0x273)}),_0xbdfd42=_0x53167a['createHash'](_0x19cd98(0x2b4))['update'](_0x1c81f0)[_0x19cd98(0x19d)](_0x19cd98(0x40f))[_0x19cd98(0x297)](0x0,0x10);return okdbPubkey={'PUBLIC_KEY_PEM':_0xdb6db2,'PUB_FINGERPRINT':_0xbdfd42},okdbPubkey;}var okdbLicense,hasRequiredOkdbLicense;function _0x5a91(_0x10d0ee,_0x27bcdf){_0x10d0ee=_0x10d0ee-0x13a;const _0x75a218=_0x75a2();let _0x5a9180=_0x75a218[_0x10d0ee];return _0x5a9180;}function _0x75a2(){const _0x3b6c3e=['meta','system:clock_change','resume','log','string','every','1.1.3','/types\x0a\x20\x20\x20\x20','\x20\x20Type\x20','node','[okdb]\x20error:\x20','\x20\x20✓\x20joined\x20and\x20reconciliation\x20initiated','LICENSE_LIMIT_EXCEEDED','USE','\x20\x20\x20\x20expires:\x20\x20\x20','open\x20','charCodeAt','SIGINT','verify','licenseHash','key','\x22\x20→\x20','use\x20<env>','\x20\x20Usage:\x20','\x20(expires\x20in\x20','padEnd','type:registered','sourceKey','/api/','toUpperCase','5257704UXMiZR','license','\x20\x20skipped=','\x20\x20(unlimited)','\x20\x20·\x20','License\x20already\x20stored','active:','trim','pin','INDEX_HAS_CONSUMERS','files/','utf8','Type\x20\x27','./okdb-export.ndjson','time','api','limits','--label','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','test','OPEN','HELP','\x20does\x20not\x20exist','\x20documents\x20fail\x20validation','\x20records…','exec','description','\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.','toFixed','database\x20path\x20writable:\x20','bind','Cannot\x20set\x20enforce\x20schema\x20on\x20','addLicense','\x20\x20⚠\x20\x20','application/json','system:stopped','already\x20in\x20use','quit','OKDBIndexAlreadyRegisteredError','type/users/query\x20{\x22active\x22:true}','access','OKDBUniqueConstraintError','default','references','\x20\x20(name:\x20','export','\x0a[okdb]\x20fatal\x20error:','\x20\x20→\x20\x20','columns','queue','\x20opening\x20','homedir','/api/env/','\x27\x20on\x20type\x20\x27','expires','--drop','No\x20license\x20found\x20matching\x20this\x20activation\x20token','[okdb]\x20error:\x20join\x20requires\x20credentials.\x20Provide\x20--token\x20<t>\x20or\x20--username\x20<u>\x20--password\x20<p>','\x20\x20\x20\x20\x20\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','System','[okdb]\x20error:\x20join\x20requires\x20a\x20remote\x20address.\x20Usage:\x20okdb\x20join\x20<address>\x20--token\x20<t>','decodeActivationToken','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20GET\x20(implicit)\x0a\x20\x20','password','.\x20The\x20active\x20license\x20does\x20not\x20enable\x20\x22','(none)','create','[okdb]\x20created\x20.kdbconfig','STATUS','count','\x20\x20\x20\x20api:\x20\x20\x20http://localhost:','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20was\x20issued\x20for\x20a\x20different\x20node\x20—\x20share\x20this\x20node\x27s\x20PIN\x20with\x20the\x20vendor.','expired','\x20references\x20','readFileSync','activation','\x20\x20\x20\x20licensee:\x20\x20','input:\x20','\x20\x20·\x20\x20','\x20\x20⚠','_licenseHash','listening','\x20\x20\x20\x203.\x20Run:\x20\x20okdb\x20license\x20<activation-token>','⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20','ENV','safety','properties','Either\x20the\x20build\x20was\x20made\x20with\x20a\x20different\x20keypair,\x20or\x20the\x20license\x20was\x20issued\x20with\x20a\x20different\x20private\x20key.','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20has\x20expired\x20—\x20request\x20a\x20fresh\x20one.','[okdb]\x20exported\x20\x20types=','registerFts','bus:drain','\x20\x20(licensee:\x20','argv','[okdb]\x20.kdbconfig\x20already\x20exists\x20—\x20skipping','\x20\x20\x20\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20OKDB\x20SHELL\x20\x20\x20\x20\x20\x20\x20\x20\x20','stderr','blobs','\x20\x20\x20\x20usage:\x20\x20\x20','\x20\x20Expected\x20one\x20of:','readUInt32BE','now','\x20\x20\x20\x20admin:\x20http://localhost:','resetting','Index\x20\x22','[okdb]\x20imported\x20\x20types=','\x20\x20changes=','\x20already\x20in\x20use','\x20log\x20level:\x20','\x0d[okdb]\x20','.\x20Only\x20primitives,\x20null,\x20Buffers,\x20and\x20arrays\x20are\x20allowed.\x20Got:\x20','PUT','Index\x20\x27','[okdb]\x20started\x20in\x20','importBlobs','\x20\x20\x20\x20permissions:\x20','yellow','ref:violation_resolved','darwin','\x0a\x20\x20Raw\x20token\x20(shown\x20once,\x20save\x20it\x20now):\x0a',',\x20got\x20','_systemEnv','free\x20tier','\x20\x20\x20\x20license:\x20free\x20tier\x20—\x20add\x20a\x20license\x20to\x20unlock\x20sync,\x20embeddings,\x20engines,\x20time-machine','GET','Full-text\x20search','\x20\x20✓\x20','Invalid\x20primary\x20key\x20type:\x20','alloc','ttl:set','syncPeers','OKDBForeignKeyError','Feature\x20not\x20licensed:\x20','/admin/index.html','history','type/','[okdb]\x20error:\x20remove\x20requires\x20an\x20id\x20argument','operation','Embeddings','filter','toLocaleString','start\x20','index:progress','false',')\x20to\x20your\x20license\x20vendor.','TYPE_ALREADY_REGISTERED','no\x20.kdbconfig\x20(using\x20defaults)','(unset)','\x20\x20\x20\x20path:\x20\x20','getSecurityNotices','.\x20Add\x20a\x20license\x20that\x20includes\x20\x22','startsWith','detectInputType','listRoutes','ttl','\x1b[32m','INVALID_VALUE','index','doctor','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20override\x20active\x20environment\x20for\x20this\x20call\x0a\x20\x20','boolean','hex','\x20\x20[','reload','dirname','summary','registerIndex','level:\x20info','--path','forEach','verifyActivation','features','config','rmSync','[okdb]\x20loaded\x20config:\x20','Sync','toLowerCase','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20','invalid','parse','migrate','resetFts','readline','TYPES','\x20\x20Envs:\x20\x20\x20\x20','\x20logs\x20on\x20\x20','Records','bus:poke','current','FOREIGN_KEY_VIOLATION','dropFts','\x0a\x20\x20Joining\x20cluster\x20at\x20','records','\x1b[36m','OKDBTypeAlreadyRegisteredError','pending','\x20\x20Flags','sizeBefore','toISOString','[okdb]\x20error:\x20--grants\x20must\x20be\x20valid\x20JSON\x20object','\x20document(s)\x20reference\x20it\x20with\x20onDelete:restrict','(on\x20any\x20path\x20command)','active','INVALID_PRIMARY_KEY','licensee','set','inputSchema','10659WmbgoH','\x20\x20score:','decodeLicenseBlob','concat','writeFileSync','help','index:reset','white','peers=','\x20\x20✗','type','val','map','keys','licenseType','dim','starting','?\x0a\x20\x20Type\x20\x22yes\x22\x20to\x20confirm:\x20','[okdb]\x20backing\x20up\x20to\x20','../','\x20\x20All\x20checks\x20passed.\x0a','once','question','stdout','\x0a\x20\x20No\x20documentation\x20found\x20for:\x20','(null)','decodeLicenseBlob:\x20input\x20must\x20be\x20a\x20string','LICENSE_FEATURE_DISABLED','admin','sort','fts:registered','[okdb]\x20blobs:\x20imported=','status','--log-requests','~licenses','embeddings','put','env/staging/info','\x20\x20\x20\x20•\x20a\x20license\x20blob\x20\x20\x20(Crockford\x20base32,\x20~150–250\x20chars)','./okdb-data','\x20months\x20from\x20issuance)','decodeActivationToken:\x20expected\x2077\x20bytes,\x20got\x20','null','exportBlobs','env/','update','logs','1019982PdHJou','LABEL','\x22\x20matches\x20','\x20\x20Shell\x20commands','\x0d[okdb]\x20blobs:\x20','license:activated','backup','typeSubDbs','toString','(add\x20a\x20license\x20first)','isFile','PIN','txn:start','isTTY','message','types','find','\x20\x20\x20\x20\x20\x20\x20POST\x20(body\x20implies\x20POST)\x0a\x20\x20','data','\x20\x20\x20\x20limits:\x20\x20\x20\x20','EADDRINUSE','ready','copy','\x20\x20\x20\x20•\x20a\x20path\x20to\x20a\x20.license\x20file','\x20\x20Or\x20set\x20sync.address\x20in\x20.kdbconfig','No\x20tokens.','remove','from','fts:reset','Indexes','readUInt16BE','LICENSE_INVALID','exportToFile','info','push','param','_ensureTokensType','call','\x20for\x20commands,\x20','Files','digest','auth','system:bus_state_change','type/users\x20--help','OKDBError','[okdb]\x20unknown\x20token\x20action:\x20\x22','halted','[okdb]\x20reset:\x20','type:drop','database\x20path\x20not\x20writable:\x20','\x20SECURITY\x20NOTICE','init','\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','Token\x20secret\x20not\x20configured','license:added','max','setSchema','list','number','\x20\x20Usage:\x20okdb\x20license\x20[<blob|path|uuid|activation-token>]','timeMachine','[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22','\x20to\x20browse\x20the\x20API,\x20','2436888hrVIKa','--token','platform','\x20file','\x20\x20Next\x20step\x20—\x20activate\x20the\x20license:','SIG_INVALID','typesPerEnv','then','unlinkSync','\x22\x20(must\x20be\x20debug|info|warn|error)','gray','padStart','yes','%),\x20','allocUnsafe','--password','hasType','types\x20--env\x20staging','\x20\x20\x20\x202.\x20The\x20vendor\x20returns\x20an\x20activation\x20token.','roles','object','sig','mcp','\x20\x20Tier:\x20\x20\x20\x20','_isFree','min','\x20\x20Build:\x20\x20\x20key\x20fingerprint\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','cause','queue/','value','captureStackTrace','NAME','--changes','spki','setPrompt','\x20\x20\x20\x20port:\x20\x20','\x20\x20✓\x20http\x20listening\x20on\x20:','decoded','logRequests','close','decodeLicenseBlob:\x20failed\x20to\x20decode\x20payload:\x20','transaction','http://localhost:','2720065rqcbWQ','Open\x20licenses\x20cannot\x20exceed\x206\x20months\x20duration\x20(this\x20license\x20expires\x20','\x22\x20to\x20enable\x20it.','byteLength','ENVS','\x20(must\x20be\x201–65535)','keys/public.pem','bold','0123456789ABCDEFGHJKMNPQRSTVWXYZ','created','\x20\x20\x20\x20\x20control\x20log\x20verbosity\x0a\x20\x20','HTTP\x20','started','stopped','writes=','[okdb]\x20created\x20./okdb-data','--name','item:remove','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20open\x20admin\x20UI\x20in\x20browser\x0a\x20\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','\x20which\x20does\x20not\x20exist','EXPIRES',':\x20key\x20[','--config','changes','PUT\x20type/users/item/x\x20{\x22n\x22:1}','Bearer\x20',']\x20already\x20maps\x20to\x20\x27','\x1b[90m','Environments','readUInt8','dest','fts','\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','_computeStatus','use','fill','existsSync','--no-admin','importFromFile','permissions','OKDBInvalidValueError','some','Activation\x20invalid:\x20','waiting','wrong_node','uuid','entries','--types','exp','errors','creating','\x20\x20╔═══════════════════════════╗','envs=','writeUInt16BE','\x27,\x20cannot\x20map\x20to\x20\x27','events','system:drain','licensed','ACTIVATION_EXPIRED',':\x20expected\x20','hasOwnProperty','Unique\x20constraint\x20violated\x20on\x20','(empty)','\x0a\x20\x20okdb\x20doctor\x0a','true','unknown','/type/users/query\x0a\x20\x20\x20\x20','warn','Hint:\x20','OKDBForeignKeyDeleteError','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','\x20\x20Usage:\x20logs\x20[on|off|debug|info|warn|error]','\x27\x20is\x20already\x20registered','\x20MB\x20→\x20','node\x20','\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20','Invalid\x20activation\x20token:\x20','\x20\x20Writes:\x20\x20','\x1b[1m','\x20\x20Example:\x20okdb\x20join\x20https://node-a.example.com\x20--token\x20<t>\x20--address\x20http://myhost:8484\x0a','OKDBIndexHasConsumersError','assertLimit','noRepl','\x20\x20\x20\x20addedAt:\x20\x20\x20','--port','port','createdAt','[okdb]\x20error:\x20--address\x20is\x20required\x20for\x20join\x20(this\x20node\x27s\x20reachable\x20sync\x20address).\x0a','config\x20file\x20valid:\x20','--open','env:removed','[okdb]\x20invalid\x20log\x20level:\x20\x22','error','routes','\x20(expires\x20','getPins','__writeCounter','version','[okdb]\x20error:\x20token\x20with\x20name\x20\x22','\x20day(s).','targetType','recheck','http','\x20\x20http://localhost:','.kdb_history','detachConsole','ROUTES','[okdb]\x20error:\x20--password\x20requires\x20--name','/api','PUBLIC_KEY_PEM','\x0a\x20\x20\x20\x20','sub','License\x20signature\x20invalid\x20—\x20this\x20license\x20was\x20not\x20signed\x20by\x20the\x20key\x20paired\x20with\x20this\x20build.\x20','_license','randomUUID','QUIT','getCount','\x1b[2m','28KgbMTe','--username','FEATURES','\x20\x20✓\x20OKDB\x20server\x20running','result','\x20\x20\x20\x20writes:\x20\x20\x20\x20','registerType','Examples','\x20\x20\x20\x20\x20\x20\x20','ALREADY_EXISTS','[okdb]\x20starting…\x0a','okdb','\x1b[37m','\x20MB)','split','LICENSE_ACTIVATION_INVALID','\x20environment\x20','OKDBInvalidPrimaryKeyError','targetKey','kind','[okdb]\x20error:\x20show\x20requires\x20an\x20id\x20argument','INVALID_INDEX_KEY','type/users','\x0a\x20\x20No\x20routes\x20matching\x20\x22','.kdbconfig','writeUInt32BE','\x20env','POST','der','addedAt','SCHEMA_COLLECTION_INVALID','transport:\x20','join','Shutting\x20down\x20due\x20to\x20license\x20expiry','freeze','[okdb]\x20import\x20complete','\x20\x20\x20\x201.\x20Send\x20the\x20PIN\x20above\x20(','username','\x20\x20\x20\x20license:\x20⚠\x20OPEN\x20—\x20','\x20\x20(need\x20≥\x2018)','child_process','logLevel','[filter]','replace','[okdb]\x20error:\x20failed\x20to\x20read\x20','payload','idx:','write','endsWith','License\x20expired\x20or\x20invalidated','ceil','enabled','\x20logs\x20off\x0a','level','drop','index:ready','equals','--address','Invalid\x20index\x20key\x20type\x20for\x20\x27','dbPath','_envs','path','stdin','cyan','slice','--key','\x27\x20doesn\x27t\x20exist','PUB_FINGERPRINT','noAdmin','processors/','FOREIGN_KEY_DELETE_RESTRICTED','license:invalid','round','--version','\x20\x20\x20\x20status:\x20\x20\x20\x20active\x20\x20(open\x20license\x20—\x20no\x20activation\x20needed)','green','types/env=','timingSafeEqual','exit','resolve','prototype','\x0a\x20\x20✓\x20License\x20activated','[okdb]\x20reset\x20aborted','unique:violation','fts:','dynamic','Queue','\x20\x20✓\x20database\x20opened\x0a','\x0a\x20\x20License\x20details:','./okdb-backup','[okdb]\x20error:\x20license\x20management\x20is\x20only\x20available\x20in\x20licensed\x20builds\x20(npm\x20run\x20build:prod).','licenseId','import','sha256','\x20\x20Usage:','\x0a\x20\x20','\x20\x20@','repeat','--help','\x20\x20║','\x1b[0m','sync','id:\x20','sourceType','children','[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22','env','.\x20Primary\x20keys\x20must\x20be\x20string\x20or\x20number.\x20Got:\x20','License\x20signature\x20invalid:\x20','LICENSE_HASH_MISMATCH','[okdb]\x20error:\x20unrecognized\x20input:\x20\x22','\x0a\x20\x20Joined.\x20Remote\x20tokens\x20replicated.\x20You\x20can\x20now\x20log\x20in\x20with\x20cluster\x20credentials.\x0a','indexes','[okdb]\x20export\x20complete','\x20/\x20','\x20\x20\x20\x20status:\x20\x20\x20\x20pending\x20activation','pid','system:poke','\x20<path>\x20[json-body]','includes','activateLicense','finally','body:\x20','isArray','\x0a\x0a\x20\x20','--ttl','[okdb]\x20backup\x20complete','writeUInt8','type/users/item/alice','--log-level','blob','magenta','debug','selfAddress','has','length','details','options','system:ready','License\x20limit\x20exceeded:\x20','\x20\x20\x20\x20•\x20a\x20license\x20id\x20\x20\x20\x20\x20(uuid)','\x20\x20Error:\x20','Version\x20mismatch\x20for\x20','expiresAt','onLicenseExpired','removeLicense','config\x20file\x20invalid:\x20','clearLine','\x1b[33m','token','\x27\x20already\x20registered','\x22\x20on\x20\x22','createPublicKey','createInterface','Engines','\x20\x20\x20\x20\x20explicit\x20method\x0a\x0a\x20\x20','LICENSED_BUILD','OKDBIndexNotRegisteredError','\x20writes\x20(','--permissions','724622jYaxSm','name','\x20type','expiry','\x0a[okdb]\x20error:\x20','reason','grants','label','stringify','net','mkdirSync','~tokens','access:\x20','ref:violation','transport','dropIndex','[okdb]\x20exporting\x20env\x20\x22','[env]','exports','PATCH','\x20\x20Some\x20checks\x20failed.\x0a','stack','\x20in\x20','\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\x20\x20\x20\x20\x20browse\x20API\x20routes,\x20grouped\x20by\x20area\x0a\x20\x20','[okdb]\x20opening\x20','unique:violation_resolved','4273824EyTyzE','\x0a\x20\x20Delete\x20ALL\x20data\x20in\x20','maxWrites','--env','emit','body','\x20\x20\x20\x20features:\x20\x20','\x20\x20Note:\x20this\x20node\x20has\x20existing\x20tokens.\x20They\x20will\x20coexist\x20with\x20cluster\x20tokens\x0a','\x20\x20records=','reverse','open','--grants','env:opened','listen','method','statSync','\x20\x20\x20\x20license:\x20','INDEX_ALREADY_REGISTERED','port\x20','getRange','terminal','other','prompt','createHash','OKDB-PIN-V1:','\x20\x20(','catch','red','[okdb]\x20port\x20','\x0a\x20\x20✓\x20Token\x20created','derivePin','attach','system','_active','tags','/\x20quit\x20/\x20Ctrl+C','get',',\x20label:\x20','line','UNIQUE_CONSTRAINT','reset','[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22','scrypt','dropping','engines','\x20result','\x20envs','createHmac','files','envs','<path>','base64url','18LOXTFM','LOGS','\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','valid','crypto','effective','node:crypto','SIGTERM','hint'];_0x75a2=function(){return _0x3b6c3e;};return _0x75a2();}function requireOkdbLicense(){const _0x16195b=_0x3f7624;if(hasRequiredOkdbLicense)return okdbLicense;hasRequiredOkdbLicense=0x1;const _0x2fb8fb=require$$0,{OKDBError:_0x57185d}=requireOkdbError(),{EVENTS:_0x4fc709}=requireOkdbEnums(),_0x1b2704=requireOkdbLicenseCodec(),{LICENSE_TYPE_OPEN:_0x5e3d93,OPEN_LICENSE_MAX_DURATION_MS:_0x1d9b45}=_0x1b2704,_0x2dc7ef=requireOkdbPubkey(),_0x2ef434={'LICENSED_BUILD':_0x16195b(0x221),'PUBLIC_KEY_PEM':_0x2dc7ef[_0x16195b(0x24e)],'PUB_FINGERPRINT':_0x2dc7ef['PUB_FINGERPRINT'],'LICENSE_EXPIRED_ACTION':_0x16195b(0x352)},_0x1e660d=_0x16195b(0x168),_0x981586={'features':{'sync':![],'embeddings':![],'engines':![],'fts':!![],'timeMachine':![],'views':!![],'mcp':!![],'files':!![]},'limits':{'envs':0x2,'typesPerEnv':0xa,'syncPeers':0x0,'maxWrites':0xf4240},'_isFree':!![]};async function _0x2094b9(_0x104a2b){const _0x5a88e7=_0x16195b;!_0x104a2b[_0x5a88e7(0x1c4)](_0x1e660d)&&await _0x104a2b['registerType'](_0x1e660d);}class _0x1edc46{constructor(_0x364f32){const _0x1e36ae=_0x16195b;this[_0x1e36ae(0x262)]=_0x364f32,this[_0x1e36ae(0x333)]=null;}async['reload'](){const _0x14a3cf=_0x16195b,_0x5ab1b0=this[_0x14a3cf(0x262)][_0x14a3cf(0x3e7)];if(!_0x5ab1b0||!_0x5ab1b0[_0x14a3cf(0x1c4)](_0x1e660d)){this[_0x14a3cf(0x333)]=null;return;}const _0x4c2666=this[_0x14a3cf(0x262)]['id'];let _0x53fa5f=null;for(const {key:_0x449c85,value:_0x33b0d7}of _0x5ab1b0[_0x14a3cf(0x325)](_0x1e660d)){const _0x1eeb32=this[_0x14a3cf(0x202)](_0x33b0d7,_0x4c2666);_0x1eeb32===_0x14a3cf(0x141)&&!_0x53fa5f&&(_0x53fa5f={..._0x33b0d7,'id':_0x449c85,'status':_0x1eeb32});}this[_0x14a3cf(0x333)]=_0x53fa5f;if(this['_active']&&this[_0x14a3cf(0x333)][_0x14a3cf(0x154)]===_0x5e3d93){const _0x1bb156=Math[_0x14a3cf(0x289)]((this[_0x14a3cf(0x333)]['expiresAt']-Date[_0x14a3cf(0x3d3)]())/0x5265c00);this[_0x14a3cf(0x262)][_0x14a3cf(0x352)]?.[_0x14a3cf(0x224)](_0x14a3cf(0x3c0)+_0x1bb156+'\x20day(s).',{'feature':_0x14a3cf(0x36e),'licensee':this[_0x14a3cf(0x333)]['licensee'],'expiresAt':new Date(this[_0x14a3cf(0x333)][_0x14a3cf(0x2e6)])[_0x14a3cf(0x13d)]()});}}[_0x16195b(0x202)](_0x17cb4b,_0x3694b4){const _0x5f54a9=_0x16195b;if(!_0x17cb4b[_0x5f54a9(0x2d9)])return _0x5f54a9(0x420);let _0x26a4cc;try{_0x26a4cc=_0x1b2704[_0x5f54a9(0x148)](_0x17cb4b[_0x5f54a9(0x2d9)]);}catch(_0x57141a){return _0x5f54a9(0x420);}try{const _0x16fca9=_0x2fb8fb[_0x5f54a9(0x361)](null,_0x26a4cc[_0x5f54a9(0x284)],_0x2ef434[_0x5f54a9(0x24e)],_0x26a4cc['sig']);if(!_0x16fca9)return _0x5f54a9(0x420);}catch(_0x1703b2){return'invalid';}if(_0x26a4cc[_0x5f54a9(0x1da)][_0x5f54a9(0x2e6)]<=Date['now']())return'expired';if(_0x26a4cc['decoded'][_0x5f54a9(0x154)]===_0x5e3d93)return _0x5f54a9(0x141);if(!_0x17cb4b[_0x5f54a9(0x3b8)])return _0x5f54a9(0x13a);const _0x239ff9=_0x1b2704[_0x5f54a9(0x418)]({'tokenString':_0x17cb4b[_0x5f54a9(0x3b8)],'nodeId':_0x3694b4,'rawBlobBuf':_0x26a4cc['rawBuf'],'pubKeyPem':_0x2ef434[_0x5f54a9(0x24e)],'pubFingerprint':_0x2ef434['PUB_FINGERPRINT']});if(_0x239ff9[_0x5f54a9(0x2fc)]===_0x5f54a9(0x2c4)||_0x239ff9[_0x5f54a9(0x2fc)]===_0x5f54a9(0x1b9))return _0x5f54a9(0x20d);if(_0x239ff9[_0x5f54a9(0x2fc)]==='ACTIVATION_EXPIRED')return _0x5f54a9(0x3b5);if(!_0x239ff9['valid'])return _0x5f54a9(0x20d);return _0x5f54a9(0x141);}get['active'](){const _0x53da67=_0x16195b;return this[_0x53da67(0x333)];}get['effective'](){return this['_active']??_0x981586;}['assertFeature'](_0x1d15ee){const _0xc1ba32=_0x16195b;if(_0x2ef434['LICENSED_BUILD']!==_0xc1ba32(0x221))return;const _0xaa01e5=this['effective'];if(!_0xaa01e5[_0xc1ba32(0x419)]?.[_0x1d15ee]){const _0x2d322f=_0xaa01e5[_0xc1ba32(0x1cc)]?'Feature\x20not\x20available\x20on\x20free\x20tier:\x20'+_0x1d15ee+_0xc1ba32(0x404)+_0x1d15ee+_0xc1ba32(0x1e2):_0xc1ba32(0x3f2)+_0x1d15ee+_0xc1ba32(0x3ad)+_0x1d15ee+'\x22.';throw new _0x57185d(_0x2d322f,_0xc1ba32(0x161),{'feature':_0x1d15ee});}}['isFeatureEnabled'](_0x1c0e3f){const _0x14118b=_0x16195b;if(_0x2ef434[_0x14118b(0x2f3)]!==_0x14118b(0x221))return!![];return!!this[_0x14118b(0x34b)][_0x14118b(0x419)]?.[_0x1c0e3f];}[_0x16195b(0x232)](_0x1ef8ff,_0x3ca945){const _0x317795=_0x16195b;if(_0x2ef434[_0x317795(0x2f3)]!==_0x317795(0x221))return;const _0x586646=this[_0x317795(0x34b)],_0x4524fa=_0x586646['limits']?.[_0x1ef8ff];if(_0x4524fa===null||_0x4524fa===undefined||_0x4524fa===0x0)return;if(_0x3ca945>=_0x4524fa)throw new _0x57185d(_0x317795(0x2e2)+_0x1ef8ff+'\x20('+_0x3ca945+'/'+_0x4524fa+')',_0x317795(0x35b),{'limit':_0x1ef8ff,'current':_0x3ca945,'max':_0x4524fa});}async[_0x16195b(0x38d)](_0x58043c){const _0x13a8b6=_0x16195b;let _0x165091;try{_0x165091=_0x1b2704['decodeLicenseBlob'](_0x58043c);}catch(_0x560752){throw new _0x57185d('Invalid\x20license\x20blob:\x20'+_0x560752[_0x13a8b6(0x183)],_0x13a8b6(0x194));}let _0x3afd50;try{_0x3afd50=_0x2fb8fb[_0x13a8b6(0x361)](null,_0x165091['payload'],_0x2ef434['PUBLIC_KEY_PEM'],_0x165091[_0x13a8b6(0x1c9)]);}catch(_0x53726d){throw new _0x57185d(_0x13a8b6(0x2c3)+_0x53726d['message'],'LICENSE_INVALID');}if(!_0x3afd50)throw new _0x57185d(_0x13a8b6(0x251)+('Build\x20expects\x20public\x20key\x20fingerprint\x20'+_0x2ef434['PUB_FINGERPRINT']+'.\x20')+_0x13a8b6(0x3c4),_0x13a8b6(0x194),{'expectedFingerprint':_0x2ef434['PUB_FINGERPRINT']});if(_0x165091[_0x13a8b6(0x1da)][_0x13a8b6(0x154)]===_0x5e3d93){const _0x56166f=_0x165091[_0x13a8b6(0x1da)][_0x13a8b6(0x2e6)]-_0x165091[_0x13a8b6(0x1da)]['issuedAt'];if(_0x56166f>_0x1d9b45)throw new _0x57185d(_0x13a8b6(0x1e1)+Math['ceil'](_0x56166f/(0x1e*0x5265c00))+_0x13a8b6(0x16e),'LICENSE_INVALID');}const _0x547254=this['okdb'][_0x13a8b6(0x3e7)];await _0x2094b9(_0x547254);const _0x5d0ba1=_0x1b2704['licenseHash'](_0x165091['rawBuf'])['toString']('hex');for(const {value:_0x174b81}of _0x547254['getRange'](_0x1e660d)){if(_0x174b81[_0x13a8b6(0x3bd)]===_0x5d0ba1)throw new _0x57185d(_0x13a8b6(0x372),_0x13a8b6(0x194));}const _0x10f821=_0x2fb8fb[_0x13a8b6(0x253)](),_0x52785f={'blob':_0x58043c,'activation':null,'addedAt':Date[_0x13a8b6(0x3d3)](),'_licenseHash':_0x5d0ba1,'licensee':_0x165091[_0x13a8b6(0x1da)][_0x13a8b6(0x143)],'expiresAt':_0x165091[_0x13a8b6(0x1da)]['expiresAt'],'features':_0x165091[_0x13a8b6(0x1da)][_0x13a8b6(0x419)],'limits':_0x165091[_0x13a8b6(0x1da)][_0x13a8b6(0x37d)],'licenseType':_0x165091[_0x13a8b6(0x1da)][_0x13a8b6(0x154)]};return await _0x547254[_0x13a8b6(0x16a)](_0x1e660d,_0x10f821,_0x52785f),{'id':_0x10f821,..._0x52785f};}async[_0x16195b(0x2cf)](_0x1cf098){const _0x1a69f0=_0x16195b;let _0x1953a5;try{_0x1953a5=_0x1b2704[_0x1a69f0(0x3aa)](_0x1cf098);}catch(_0x5886df){throw new _0x57185d(_0x1a69f0(0x22d)+_0x5886df[_0x1a69f0(0x183)],'LICENSE_ACTIVATION_INVALID');}const _0x5554d3=_0x1953a5['licenseHash'][_0x1a69f0(0x17d)](_0x1a69f0(0x40f)),_0x44ddcf=this['okdb'][_0x1a69f0(0x3e7)];if(!_0x44ddcf||!_0x44ddcf[_0x1a69f0(0x1c4)](_0x1e660d))throw new _0x57185d(_0x1a69f0(0x3a5),_0x1a69f0(0x266));let _0x332ddb=null,_0xe62105=null;for(const {key:_0x2ac7b4,value:_0xd57d3b}of _0x44ddcf[_0x1a69f0(0x325)](_0x1e660d)){if(_0xd57d3b[_0x1a69f0(0x3bd)]===_0x5554d3){_0x332ddb=_0x2ac7b4,_0xe62105=_0xd57d3b;break;}}if(!_0x332ddb)throw new _0x57185d(_0x1a69f0(0x3a5),'LICENSE_ACTIVATION_INVALID');const {rawBuf:_0x41ebc3}=_0x1b2704[_0x1a69f0(0x148)](_0xe62105[_0x1a69f0(0x2d9)]),_0x573843=_0x1b2704[_0x1a69f0(0x418)]({'tokenString':_0x1cf098,'nodeId':this['okdb']['id'],'rawBlobBuf':_0x41ebc3,'pubKeyPem':_0x2ef434[_0x1a69f0(0x24e)],'pubFingerprint':_0x2ef434[_0x1a69f0(0x29a)]});if(!_0x573843[_0x1a69f0(0x349)])throw new _0x57185d(_0x1a69f0(0x20b)+_0x573843[_0x1a69f0(0x2fc)],_0x1a69f0(0x266),{'reason':_0x573843[_0x1a69f0(0x2fc)]});const _0x27f2b2={..._0xe62105,'activation':_0x1cf098};return await _0x44ddcf[_0x1a69f0(0x173)](_0x1e660d,_0x332ddb,_0x27f2b2),{'id':_0x332ddb,..._0x27f2b2};}async[_0x16195b(0x2e8)](_0x554b50){const _0x27501b=_0x16195b,_0x5ba889=this[_0x27501b(0x262)]['_systemEnv'];if(!_0x5ba889||!_0x5ba889['hasType'](_0x1e660d))return;await _0x5ba889[_0x27501b(0x18f)](_0x1e660d,_0x554b50);}async['listLicenses'](){const _0xdb807c=_0x16195b,_0x469ca8=this['okdb'][_0xdb807c(0x3e7)];if(!_0x469ca8||!_0x469ca8[_0xdb807c(0x1c4)](_0x1e660d))return[];const _0x3323b8=this['okdb']['id'],_0x1fbc45=[];for(const {key:_0x3814b8,value:_0x369fa6}of _0x469ca8['getRange'](_0x1e660d)){const _0x15841c=this[_0xdb807c(0x202)](_0x369fa6,_0x3323b8);_0x1fbc45[_0xdb807c(0x197)]({..._0x369fa6,'id':_0x3814b8,'status':_0x15841c});}return _0x1fbc45;}[_0x16195b(0x240)](){const _0x274204=_0x16195b,_0x5efe98=this[_0x274204(0x262)][_0x274204(0x3e7)];if(!_0x5efe98||!_0x5efe98[_0x274204(0x1c4)](_0x1e660d))return[];const _0x5081cf=this['okdb']['id'],_0x378e50=[];for(const {key:_0x1baa5b,value:_0x11ebe4}of _0x5efe98[_0x274204(0x325)](_0x1e660d)){if(_0x11ebe4[_0x274204(0x3bd)]){if(_0x11ebe4[_0x274204(0x154)]===_0x5e3d93)_0x378e50[_0x274204(0x197)]({'licenseId':_0x1baa5b,'pin':null});else{const _0x55d8f3=Buffer['from'](_0x11ebe4['_licenseHash'],_0x274204(0x40f)),{pin:_0x187841}=_0x1b2704[_0x274204(0x330)](_0x5081cf,_0x55d8f3,_0x2ef434['PUB_FINGERPRINT']);_0x378e50[_0x274204(0x197)]({'licenseId':_0x1baa5b,'pin':_0x187841});}}}return _0x378e50;}async[_0x16195b(0x246)](){const _0xf1b1b9=_0x16195b,_0x172def=this[_0xf1b1b9(0x333)];await this[_0xf1b1b9(0x411)]();if(this[_0xf1b1b9(0x333)]&&this[_0xf1b1b9(0x333)]['licenseType']===_0x5e3d93){const _0x306935=Math['ceil']((this[_0xf1b1b9(0x333)]['expiresAt']-Date['now']())/0x5265c00);this['okdb'][_0xf1b1b9(0x352)]?.[_0xf1b1b9(0x224)](_0xf1b1b9(0x3c0)+_0x306935+_0xf1b1b9(0x244),{'feature':_0xf1b1b9(0x36e),'licensee':this['_active'][_0xf1b1b9(0x143)],'expiresAt':new Date(this[_0xf1b1b9(0x333)][_0xf1b1b9(0x2e6)])['toISOString']()});}if(_0x172def&&!this[_0xf1b1b9(0x333)]){this[_0xf1b1b9(0x262)][_0xf1b1b9(0x352)]?.['warn'](_0xf1b1b9(0x288),{'feature':_0xf1b1b9(0x36e)}),this[_0xf1b1b9(0x262)][_0xf1b1b9(0x218)]?.[_0xf1b1b9(0x316)](_0x4fc709[_0xf1b1b9(0x194)],{'previous':_0x172def});const _0x58457c=this[_0xf1b1b9(0x262)][_0xf1b1b9(0x2e0)]?.[_0xf1b1b9(0x2e7)]??_0x2ef434['LICENSE_EXPIRED_ACTION'];_0x58457c==='shutdown'&&(this[_0xf1b1b9(0x262)][_0xf1b1b9(0x352)]?.[_0xf1b1b9(0x23d)](_0xf1b1b9(0x278),{'feature':_0xf1b1b9(0x36e)}),this[_0xf1b1b9(0x262)][_0xf1b1b9(0x1dc)]()[_0xf1b1b9(0x32c)](()=>{})[_0xf1b1b9(0x2d0)](()=>process['exit'](0x1)));}}}return okdbLicense={'LicenseChecker':_0x1edc46,'_C':_0x2ef434},okdbLicense;}var okdbShell,hasRequiredOkdbShell;function requireOkdbShell(){const _0x18edac=_0x3f7624;if(hasRequiredOkdbShell)return okdbShell;hasRequiredOkdbShell=0x1;const _0x4aa632=require$$0$2,_0x6d8071=require$$1,_0x32cf55=require$$2$1,_0x5cf008=require$$1$1,_0x86d1dc=_0x5cf008['join'](_0x32cf55[_0x18edac(0x3a0)](),_0x18edac(0x249)),_0x4458c5=0x3e8,_0x53b34a={'reset':'\x1b[0m','bold':_0x18edac(0x22f),'dim':_0x18edac(0x256),'red':'\x1b[31m','green':_0x18edac(0x409),'yellow':_0x18edac(0x2eb),'blue':'\x1b[34m','magenta':'\x1b[35m','cyan':_0x18edac(0x42f),'white':_0x18edac(0x263),'gray':_0x18edac(0x1fc)},_0x5e9e28=!process[_0x18edac(0x15d)][_0x18edac(0x182)]||!!process.env.NO_COLOR,_0x1ce66c=(_0x390265,_0x5e6b62)=>_0x5e9e28?_0x5e6b62:''+_0x390265+_0x5e6b62+_0x53b34a[_0x18edac(0x33a)],_0x23ec88={'error':_0x53b34a['red'],'warn':_0x53b34a['yellow'],'info':_0x53b34a[_0x18edac(0x296)],'debug':_0x53b34a['gray']},_0x23b14f={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3};function _0x3d6045(_0x557ed1,_0x34242f=_0x18edac(0x196)){const _0x1cc976=_0x18edac,{level:_0x4ec4b3,msg:_0x528bdd,meta:_0x1574bb,context:_0x483f81,ts:_0x4a9462}=_0x557ed1;if((_0x23b14f[_0x4ec4b3]??0x1)<(_0x23b14f[_0x34242f]??0x1))return;const _0x4f376a=_0x1ce66c(_0x53b34a[_0x1cc976(0x1be)],new Date(_0x4a9462)[_0x1cc976(0x13d)]()),_0x5f3bad=_0x1ce66c(_0x23ec88[_0x4ec4b3]??_0x53b34a['white'],_0x4ec4b3[_0x1cc976(0x368)](0x5));let _0x538b95='\x20\x20'+_0x4f376a+'\x20'+_0x1ce66c(_0x53b34a['bold'],_0x5f3bad)+'\x20'+_0x528bdd;if(_0x1574bb&&Object[_0x1cc976(0x153)](_0x1574bb)['length']>0x0){const _0x10a3a5=Object[_0x1cc976(0x20f)](_0x1574bb)[_0x1cc976(0x152)](([_0x51ecf0,_0x26b6a9])=>_0x51ecf0+'='+_0x26b6a9)['join']('\x20');_0x538b95+=_0x1ce66c(_0x53b34a[_0x1cc976(0x155)],_0x1cc976(0x410)+_0x10a3a5+']');}if(_0x483f81!==undefined){const _0x5e4985=typeof _0x483f81===_0x1cc976(0x1c8)?JSON[_0x1cc976(0x2ff)](_0x483f81):String(_0x483f81);_0x538b95+=_0x1ce66c(_0x53b34a[_0x1cc976(0x155)],'\x20\x20'+_0x5e4985);}const _0x1ae940=_0x4ec4b3===_0x1cc976(0x23d)||_0x4ec4b3===_0x1cc976(0x224)?process[_0x1cc976(0x3ce)][_0x1cc976(0x286)][_0x1cc976(0x38b)](process['stderr']):process['stdout'][_0x1cc976(0x286)]['bind'](process[_0x1cc976(0x15d)]);_0x1ae940(_0x538b95+'\x0a');}function _0x39a1a7(_0xde0800,_0x570c67){const _0x4a548e=_0x18edac;if(_0xde0800===0xcc||_0xde0800>=0xc8&&_0xde0800<0x12c&&!_0x570c67){console[_0x4a548e(0x352)](_0x4a548e(0x2b6)+_0x1ce66c(_0x53b34a['green'],'✓')+'\x0a');return;}if(_0xde0800>=0x190||_0x570c67?.[_0x4a548e(0x23d)]){const _0x26c4c0=_0x570c67?.[_0x4a548e(0x23d)]??_0x570c67?.['message']??_0x4a548e(0x1eb)+_0xde0800;console['log']('\x0a\x20\x20'+_0x1ce66c(_0x53b34a['red'],'✗')+'\x20'+_0x1ce66c(_0x53b34a[_0x4a548e(0x1e7)]+_0x53b34a[_0x4a548e(0x32d)],String(_0xde0800))+'\x20\x20'+_0x26c4c0+'\x0a');return;}const _0x4daa4f=Object['prototype'][_0x4a548e(0x21d)][_0x4a548e(0x19a)](_0x570c67??{},_0x4a548e(0x25b))?_0x570c67['result']:_0x570c67,_0x5039a3=_0x570c67?.[_0x4a548e(0x34f)];console[_0x4a548e(0x352)](''),_0x4797a9(_0x4daa4f,'\x20\x20');if(_0x5039a3?.[_0x4a548e(0x3b2)]!=null||_0x5039a3?.[_0x4a548e(0x37b)]!=null){const _0x3444b9=[];if(_0x5039a3[_0x4a548e(0x3b2)]!=null)_0x3444b9[_0x4a548e(0x197)](_0x5039a3[_0x4a548e(0x3b2)]+_0x4a548e(0x33f)+(_0x5039a3[_0x4a548e(0x3b2)]!==0x1?'s':''));if(_0x5039a3['time']!=null)_0x3444b9[_0x4a548e(0x197)](_0x5039a3[_0x4a548e(0x37b)]+'ms');console[_0x4a548e(0x352)](_0x4a548e(0x2b6)+_0x1ce66c(_0x53b34a[_0x4a548e(0x155)],_0x3444b9[_0x4a548e(0x277)](_0x4a548e(0x3bb))));}console['log']('');}function _0x4797a9(_0x36888f,_0x1fdf04=''){const _0x408495=_0x18edac;if(_0x36888f===null||_0x36888f===undefined){console[_0x408495(0x352)](_0x1fdf04+_0x1ce66c(_0x53b34a[_0x408495(0x155)],_0x408495(0x15f)));return;}if(Array['isArray'](_0x36888f)){if(_0x36888f[_0x408495(0x2de)]===0x0){console[_0x408495(0x352)](_0x1fdf04+_0x1ce66c(_0x53b34a[_0x408495(0x155)],_0x408495(0x21f)));return;}if(_0x36888f[_0x408495(0x354)](_0x487424=>_0x487424&&typeof _0x487424===_0x408495(0x1c8)&&_0x408495(0x363)in _0x487424&&_0x408495(0x1d2)in _0x487424)){_0x1a910d(_0x36888f,_0x1fdf04);return;}if(_0x36888f['every'](_0xeef39e=>_0xeef39e&&typeof _0xeef39e==='object'&&_0x408495(0x150)in _0xeef39e&&'count'in _0xeef39e)){_0x3e2402(_0x36888f,_0x1fdf04);return;}if(_0x36888f[_0x408495(0x354)](_0x5cfd4f=>typeof _0x5cfd4f!=='object'||_0x5cfd4f===null)){_0x36888f[_0x408495(0x417)]((_0x4a439f,_0x104cd6)=>console[_0x408495(0x352)](_0x1fdf04+_0x1ce66c(_0x53b34a[_0x408495(0x1be)],_0x104cd6+0x1+'.')+'\x20'+_0x1ce66c(_0x53b34a['white'],String(_0x4a439f))));return;}_0x36888f[_0x408495(0x417)]((_0x2d0acb,_0x2ead28)=>{const _0x34f8d0=_0x408495;console['log'](_0x1fdf04+_0x1ce66c(_0x53b34a[_0x34f8d0(0x155)],'['+_0x2ead28+']'));if(typeof _0x2d0acb===_0x34f8d0(0x1c8)&&_0x2d0acb!==null)_0x1ec1ce(_0x2d0acb,_0x1fdf04+'\x20\x20');else console[_0x34f8d0(0x352)](_0x1fdf04+'\x20\x20'+String(_0x2d0acb));});return;}if(typeof _0x36888f===_0x408495(0x1c8)){if(_0x408495(0x363)in _0x36888f&&_0x408495(0x1d2)in _0x36888f&&Object[_0x408495(0x153)](_0x36888f)[_0x408495(0x2de)]<=0x3){console['log'](_0x1fdf04+_0x1ce66c(_0x53b34a[_0x408495(0x1e7)]+_0x53b34a[_0x408495(0x296)],String(_0x36888f[_0x408495(0x363)])));const _0x25be38=_0x36888f['value'];if(_0x25be38&&typeof _0x25be38===_0x408495(0x1c8))_0x1ec1ce(_0x25be38,_0x1fdf04);else console[_0x408495(0x352)](_0x1fdf04+_0x1ce66c(_0x53b34a[_0x408495(0x14d)],String(_0x25be38)));return;}_0x1ec1ce(_0x36888f,_0x1fdf04);return;}console[_0x408495(0x352)](_0x1fdf04+_0x1ce66c(_0x53b34a[_0x408495(0x14d)],String(_0x36888f)));}function _0x1ec1ce(_0x56f6bc,_0x588952=''){const _0x4d991d=_0x18edac,_0x467f0c=Object[_0x4d991d(0x20f)](_0x56f6bc);if(_0x467f0c[_0x4d991d(0x2de)]===0x0){console['log'](_0x588952+_0x1ce66c(_0x53b34a[_0x4d991d(0x155)],'{}'));return;}const _0xa14b2e=Math[_0x4d991d(0x1cd)](0x1c,Math[_0x4d991d(0x1ac)](..._0x467f0c[_0x4d991d(0x152)](([_0x2f581a])=>_0x2f581a[_0x4d991d(0x2de)])));for(const [_0x73ceb9,_0x3a25bc]of _0x467f0c){const _0xbbad8e=_0x1ce66c(_0x53b34a[_0x4d991d(0x296)],_0x73ceb9[_0x4d991d(0x368)](_0xa14b2e));if(_0x3a25bc===null||_0x3a25bc===undefined)console[_0x4d991d(0x352)](_0x588952+_0xbbad8e+'\x20\x20'+_0x1ce66c(_0x53b34a[_0x4d991d(0x155)],_0x4d991d(0x170)));else{if(typeof _0x3a25bc===_0x4d991d(0x1c8)){const _0x3e8419=JSON[_0x4d991d(0x2ff)](_0x3a25bc);_0x3e8419[_0x4d991d(0x2de)]<=0x50?console[_0x4d991d(0x352)](_0x588952+_0xbbad8e+'\x20\x20'+_0x1ce66c(_0x53b34a[_0x4d991d(0x155)],_0x3e8419)):(console[_0x4d991d(0x352)](_0x588952+_0xbbad8e),_0x4797a9(_0x3a25bc,_0x588952+'\x20\x20'));}else{const _0x2f44c9=typeof _0x3a25bc===_0x4d991d(0x40e)?_0x1ce66c(_0x3a25bc?_0x53b34a[_0x4d991d(0x2a2)]:_0x53b34a[_0x4d991d(0x3e2)],String(_0x3a25bc)):typeof _0x3a25bc===_0x4d991d(0x1af)?_0x1ce66c(_0x53b34a['magenta'],String(_0x3a25bc)):_0x1ce66c(_0x53b34a[_0x4d991d(0x14d)],String(_0x3a25bc));console[_0x4d991d(0x352)](_0x588952+_0xbbad8e+'\x20\x20'+_0x2f44c9);}}}}function _0x1a910d(_0x4c6a3e,_0x516039=''){const _0x570e62=_0x18edac,_0x378f61=Math[_0x570e62(0x1cd)](0x20,Math['max'](..._0x4c6a3e['map'](_0x444fa3=>String(_0x444fa3[_0x570e62(0x363)])[_0x570e62(0x2de)])));for(const {key:_0x5f4e4e,value:_0x636ded,score:_0x4bdc90,clock:_0x3ffa19}of _0x4c6a3e){const _0x33e1ed=_0x1ce66c(_0x53b34a[_0x570e62(0x1e7)]+_0x53b34a['cyan'],String(_0x5f4e4e)['padEnd'](_0x378f61)),_0x14264e=_0x636ded==null?_0x1ce66c(_0x53b34a[_0x570e62(0x155)],'null'):typeof _0x636ded===_0x570e62(0x1c8)?_0x1ce66c(_0x53b34a['dim'],JSON['stringify'](_0x636ded)):_0x1ce66c(_0x53b34a['white'],String(_0x636ded)),_0x4ba322=_0x4bdc90!=null?_0x1ce66c(_0x53b34a[_0x570e62(0x1be)],_0x570e62(0x147)+_0x4bdc90[_0x570e62(0x389)](0x4)):'',_0x18641e=_0x3ffa19!=null?_0x1ce66c(_0x53b34a[_0x570e62(0x1be)],_0x570e62(0x2b7)+_0x3ffa19):'';console[_0x570e62(0x352)](_0x516039+_0x33e1ed+'\x20\x20'+_0x14264e+_0x4ba322+_0x18641e);}}function _0x3e2402(_0x1eb686,_0x558d61=''){const _0x8ada74=_0x18edac,_0x1aebed=Math[_0x8ada74(0x1cd)](0x20,Math[_0x8ada74(0x1ac)](..._0x1eb686[_0x8ada74(0x152)](_0x2e82ce=>_0x2e82ce[_0x8ada74(0x150)]['length'])));for(const {type:_0x363fb1,count:_0x4b1bc8,fields:_0x28e532}of _0x1eb686){if(_0x363fb1[_0x8ada74(0x405)]('~'))continue;const _0x4e32d9=_0x1ce66c(_0x53b34a['bold']+_0x53b34a['cyan'],_0x363fb1[_0x8ada74(0x368)](_0x1aebed)),_0x4c7aec=_0x1ce66c(_0x53b34a['magenta'],String(_0x4b1bc8)[_0x8ada74(0x1bf)](0x6))+_0x1ce66c(_0x53b34a[_0x8ada74(0x155)],'\x20records'),_0x525e6b=_0x28e532&&Object[_0x8ada74(0x153)](_0x28e532)['length']?_0x1ce66c(_0x53b34a[_0x8ada74(0x155)],_0x8ada74(0x371)+Object[_0x8ada74(0x153)](_0x28e532)[_0x8ada74(0x297)](0x0,0x6)[_0x8ada74(0x277)](',\x20')+(Object['keys'](_0x28e532)[_0x8ada74(0x2de)]>0x6?'…':'')):'';console['log'](_0x558d61+_0x4e32d9+'\x20\x20'+_0x4c7aec+_0x525e6b);}}const _0x4ba513=[_0x18edac(0x184),_0x18edac(0x3f5),_0x18edac(0x1d1),_0x18edac(0x377),_0x18edac(0x1de),_0x18edac(0x29c)];function _0x39c5bb(_0x461de1,_0x41271a){const _0x37ca5e=_0x18edac;if(_0x461de1['startsWith']('/api/'))return _0x461de1;if(_0x461de1[_0x37ca5e(0x405)]('/'))return _0x37ca5e(0x24d)+_0x461de1;if(_0x461de1[_0x37ca5e(0x405)](_0x37ca5e(0x172)))return _0x37ca5e(0x36b)+_0x461de1;const _0x3e688c=_0x4ba513[_0x37ca5e(0x20a)](_0x5d9e7b=>_0x461de1===_0x5d9e7b['replace'](/\/$/,'')||_0x461de1[_0x37ca5e(0x405)](_0x5d9e7b));return _0x3e688c?_0x37ca5e(0x3a1)+_0x41271a+'/'+_0x461de1:_0x37ca5e(0x36b)+_0x461de1;}function _0x440d86(_0x306ca4){const _0x5f394a=_0x18edac,_0x4a4a2e={},_0x1ee22b=[];let _0x3f5773=0x0;while(_0x3f5773<_0x306ca4['length']){if((_0x306ca4[_0x3f5773]===_0x5f394a(0x315)||_0x306ca4[_0x3f5773]==='-e')&&_0x306ca4[_0x3f5773+0x1]&&!_0x306ca4[_0x3f5773+0x1][_0x5f394a(0x405)]('-'))_0x4a4a2e['env']=_0x306ca4[++_0x3f5773];else _0x306ca4[_0x3f5773]===_0x5f394a(0x2b9)||_0x306ca4[_0x3f5773]==='-h'?_0x4a4a2e[_0x5f394a(0x14b)]=!![]:_0x1ee22b[_0x5f394a(0x197)](_0x306ca4[_0x3f5773]);_0x3f5773++;}return{'flags':_0x4a4a2e,'rest':_0x1ee22b};}const _0x4ef29a={'system':_0x18edac(0x3a8),'envs':_0x18edac(0x1fd),'types':'Types','data':_0x18edac(0x428),'indexes':_0x18edac(0x192),'fts':_0x18edac(0x3eb),'sync':_0x18edac(0x41d),'queue':_0x18edac(0x2ad),'files':_0x18edac(0x19c),'embeddings':_0x18edac(0x3f8),'engines':_0x18edac(0x2f1),'admin':'Admin','event':'Events','processor':'Processors'},_0x2a32d0=[_0x18edac(0x332),_0x18edac(0x343),_0x18edac(0x184),_0x18edac(0x187),_0x18edac(0x2c7),_0x18edac(0x200),_0x18edac(0x2bc),_0x18edac(0x39e),_0x18edac(0x342),_0x18edac(0x169),_0x18edac(0x33e),_0x18edac(0x162)];function _0x53150c(_0x1083b9){const _0x543552=_0x18edac;return _0x1083b9[_0x543552(0x282)](/^\/api/,'')[_0x543552(0x282)](/^\[\/env\/:env=[^\]]*\]/,_0x543552(0x308))[_0x543552(0x282)](/^\/env\/:env/,'env/:env')[_0x543552(0x282)](/^\//,'');}function _0x3cd597(_0x5a21ca,_0x725f87=''){const _0x5bfa83=_0x18edac,_0x179f8c=_0x5a21ca[_0x5bfa83(0x247)][_0x5bfa83(0x407)]()['filter'](_0x4a0024=>!_0x4a0024['meta']?.['hidden']),_0x19b897=_0x725f87?_0x179f8c[_0x5bfa83(0x3f9)](_0x5d2757=>_0x5d2757[_0x5bfa83(0x294)][_0x5bfa83(0x41e)]()[_0x5bfa83(0x2ce)](_0x725f87[_0x5bfa83(0x41e)]())||(_0x1b6618(_0x5d2757)??'')[_0x5bfa83(0x41e)]()[_0x5bfa83(0x2ce)](_0x725f87[_0x5bfa83(0x41e)]())||_0x2298fe(_0x5d2757)['some'](_0xa9fc29=>_0xa9fc29[_0x5bfa83(0x41e)]()['includes'](_0x725f87[_0x5bfa83(0x41e)]()))):_0x179f8c;if(!_0x19b897['length']){console[_0x5bfa83(0x352)](_0x1ce66c(_0x53b34a['yellow'],_0x5bfa83(0x26e)+_0x725f87+'\x22\x0a'));return;}const _0x378013=new Map();for(const _0x279927 of _0x19b897){const _0x22b7b0=_0x2298fe(_0x279927)[0x0]??_0x5bfa83(0x327);if(!_0x378013['has'](_0x22b7b0))_0x378013[_0x5bfa83(0x144)](_0x22b7b0,[]);_0x378013[_0x5bfa83(0x336)](_0x22b7b0)[_0x5bfa83(0x197)](_0x279927);}const _0x5bae49=[..._0x2a32d0[_0x5bfa83(0x3f9)](_0x40d8da=>_0x378013[_0x5bfa83(0x2dd)](_0x40d8da)),...[..._0x378013[_0x5bfa83(0x153)]()][_0x5bfa83(0x3f9)](_0x11734a=>!_0x2a32d0[_0x5bfa83(0x2ce)](_0x11734a))];console[_0x5bfa83(0x352)]('');for(const _0x361351 of _0x5bae49){const _0x33f8fd=_0x378013[_0x5bfa83(0x336)](_0x361351);if(!_0x33f8fd?.['length'])continue;console['log'](_0x1ce66c(_0x53b34a['bold'],'\x20\x20'+(_0x4ef29a[_0x361351]??_0x361351)));for(const _0x399922 of _0x33f8fd){const _0x1a7205=_0x1ce66c(_0x53b34a[_0x5bfa83(0x2da)],_0x399922[_0x5bfa83(0x320)][_0x5bfa83(0x368)](0x7)),_0x22b53a=_0x1ce66c(_0x53b34a[_0x5bfa83(0x296)],_0x53150c(_0x399922[_0x5bfa83(0x294)])),_0x71b09f=_0x1b6618(_0x399922)?_0x1ce66c(_0x53b34a[_0x5bfa83(0x155)],'\x20\x20'+_0x1b6618(_0x399922)):'',_0x168765=_0x399922[_0x5bfa83(0x3f7)]?.['id']?_0x1ce66c(_0x53b34a[_0x5bfa83(0x1be)],'\x20\x20['+_0x399922[_0x5bfa83(0x3f7)]['id']+']'):'';console[_0x5bfa83(0x352)](_0x5bfa83(0x3cc)+_0x1a7205+'\x20'+_0x22b53a+_0x71b09f+_0x168765);}console[_0x5bfa83(0x352)]('');}}function _0x1b2c6f(_0x23ffd7,_0x1b8d29){const _0x4efb4b=_0x18edac,_0x5729f0=_0x1b8d29[_0x4efb4b(0x282)](/^\/api(\/env\/[^/]+)?\//,'')[_0x4efb4b(0x265)]('/')[0x0],_0x40c3a1=_0x23ffd7[_0x4efb4b(0x247)][_0x4efb4b(0x407)]()[_0x4efb4b(0x3f9)](_0x20517d=>_0x20517d[_0x4efb4b(0x294)][_0x4efb4b(0x41e)]()['includes'](_0x5729f0[_0x4efb4b(0x41e)]()));if(!_0x40c3a1['length']){console[_0x4efb4b(0x352)](_0x1ce66c(_0x53b34a[_0x4efb4b(0x3e2)],_0x4efb4b(0x15e)+_0x1b8d29+'\x0a'));return;}console[_0x4efb4b(0x352)]('');for(const _0x490180 of _0x40c3a1[_0x4efb4b(0x297)](0x0,0xc)){for(const _0x29ff02 of _0x2b7b49(_0x490180)){console['log'](_0x29ff02);}console['log']('');}}function _0x1b6618(_0x5c120f){const _0x1e1ebb=_0x18edac;return _0x5c120f[_0x1e1ebb(0x3f7)]?.[_0x1e1ebb(0x413)]??_0x5c120f['meta']?.[_0x1e1ebb(0x413)]??'';}function _0x26465a(_0x26ef68){const _0x50d190=_0x18edac;return _0x26ef68['operation']?.[_0x50d190(0x387)]??_0x26ef68[_0x50d190(0x34f)]?.['description']??'';}function _0x2298fe(_0x5539c6){const _0x17491a=_0x18edac;return _0x5539c6[_0x17491a(0x3f7)]?.[_0x17491a(0x334)]?.['length']?_0x5539c6[_0x17491a(0x3f7)][_0x17491a(0x334)]:_0x5539c6['meta']?.[_0x17491a(0x334)]??[];}function _0x2b7b49(_0x47ecd7){const _0x540ca4=_0x18edac,_0x3a0684=[];_0x3a0684[_0x540ca4(0x197)]('\x20\x20'+_0x1ce66c(_0x53b34a[_0x540ca4(0x1e7)]+_0x53b34a[_0x540ca4(0x2da)],_0x47ecd7[_0x540ca4(0x320)][_0x540ca4(0x368)](0x7))+'\x20'+_0x1ce66c(_0x53b34a['bold']+_0x53b34a[_0x540ca4(0x296)],_0x47ecd7[_0x540ca4(0x294)]));_0x47ecd7[_0x540ca4(0x3f7)]?.['id']&&_0x3a0684['push'](_0x540ca4(0x1cf)+_0x1ce66c(_0x53b34a[_0x540ca4(0x1be)],_0x540ca4(0x2bd)+_0x47ecd7[_0x540ca4(0x3f7)]['id']));_0x1b6618(_0x47ecd7)&&_0x3a0684[_0x540ca4(0x197)](_0x540ca4(0x1cf)+_0x1ce66c(_0x53b34a[_0x540ca4(0x14d)],_0x1b6618(_0x47ecd7)));_0x26465a(_0x47ecd7)&&_0x3a0684[_0x540ca4(0x197)](_0x540ca4(0x1cf)+_0x1ce66c(_0x53b34a[_0x540ca4(0x155)],_0x26465a(_0x47ecd7)));_0x2298fe(_0x47ecd7)[_0x540ca4(0x2de)]&&_0x3a0684[_0x540ca4(0x197)](_0x540ca4(0x1cf)+_0x1ce66c(_0x53b34a[_0x540ca4(0x1be)],'tags:\x20'+_0x2298fe(_0x47ecd7)[_0x540ca4(0x277)](',\x20')));_0x47ecd7['operation']?.[_0x540ca4(0x3c2)]?.[_0x540ca4(0x395)]&&_0x3a0684[_0x540ca4(0x197)](_0x540ca4(0x1cf)+_0x1ce66c(_0x53b34a[_0x540ca4(0x1be)],_0x540ca4(0x303)+_0x47ecd7['operation']['safety'][_0x540ca4(0x395)]));_0x47ecd7['operation']?.[_0x540ca4(0x247)]?.['transport']&&_0x47ecd7[_0x540ca4(0x3f7)][_0x540ca4(0x247)][_0x540ca4(0x305)]!=='standard'&&_0x3a0684[_0x540ca4(0x197)](_0x540ca4(0x1cf)+_0x1ce66c(_0x53b34a[_0x540ca4(0x1be)],_0x540ca4(0x276)+_0x47ecd7[_0x540ca4(0x3f7)][_0x540ca4(0x247)][_0x540ca4(0x305)]));if(_0x47ecd7['operation']?.[_0x540ca4(0x145)]){const _0x1a1f91=Object[_0x540ca4(0x153)](_0x47ecd7[_0x540ca4(0x3f7)]['inputSchema'][_0x540ca4(0x3c3)]||{});if(_0x1a1f91[_0x540ca4(0x2de)])_0x3a0684['push'](_0x540ca4(0x1cf)+_0x1ce66c(_0x53b34a[_0x540ca4(0x1be)],_0x540ca4(0x3ba)+_0x1a1f91[_0x540ca4(0x277)](',\x20')));}return _0x47ecd7['meta']?.[_0x540ca4(0x317)]&&_0x3a0684['push'](_0x540ca4(0x1cf)+_0x1ce66c(_0x53b34a['gray'],_0x540ca4(0x2d1)+JSON[_0x540ca4(0x2ff)](_0x47ecd7[_0x540ca4(0x34f)][_0x540ca4(0x317)]))),_0x3a0684;}async function _0x56b174(_0x3739bc,_0x197ec8,_0x1b109b,_0x322bed=null){const _0x4944ed=_0x18edac,_0x3d5fbc=_0x1b109b['indexOf']('?'),_0x2d1c18=_0x3d5fbc>=0x0?_0x1b109b['slice'](0x0,_0x3d5fbc):_0x1b109b,_0x725120=_0x3d5fbc>=0x0?_0x1b109b['slice'](_0x3d5fbc+0x1):'',_0x20a0dd=Object['fromEntries'](new URLSearchParams(_0x725120)[_0x4944ed(0x20f)]());return _0x3739bc[_0x4944ed(0x247)]['handle'](_0x197ec8,_0x2d1c18,{'body':_0x322bed,'query':_0x20a0dd,'headers':{'content-type':_0x4944ed(0x38f)}},{'internal':!![]});}function _0x265211(_0x449dbd){const _0x372625=_0x18edac;if(!_0x449dbd)return null;const _0x203343=_0x449dbd[_0x372625(0x374)]();if(!_0x203343)return null;try{return JSON[_0x372625(0x421)](_0x203343);}catch{}try{return JSON['parse'](_0x12ea45(_0x203343));}catch(_0x175219){throw new SyntaxError(_0x175219[_0x372625(0x183)],{'cause':_0x175219});}}function _0x12ea45(_0x443b43){const _0x1ab0c0=_0x18edac;let _0x1aaa8f='',_0x496443=0x0;while(_0x496443<_0x443b43[_0x1ab0c0(0x2de)]){const _0x4f2aa3=_0x443b43[_0x496443];if(_0x4f2aa3==='\x22'){_0x1aaa8f+='\x22',_0x496443++;while(_0x496443<_0x443b43[_0x1ab0c0(0x2de)]&&_0x443b43[_0x496443]!=='\x22'){if(_0x443b43[_0x496443]==='\x5c'){_0x1aaa8f+=_0x443b43[_0x496443++];if(_0x496443<_0x443b43['length'])_0x1aaa8f+=_0x443b43[_0x496443++];}else _0x1aaa8f+=_0x443b43[_0x496443++];}_0x1aaa8f+='\x22';if(_0x496443<_0x443b43['length'])_0x496443++;continue;}if(_0x4f2aa3==='\x27'){_0x1aaa8f+='\x22',_0x496443++;while(_0x496443<_0x443b43[_0x1ab0c0(0x2de)]&&_0x443b43[_0x496443]!=='\x27'){if(_0x443b43[_0x496443]==='\x5c'&&_0x443b43[_0x496443+0x1]==='\x27')_0x1aaa8f+='\x27',_0x496443+=0x2;else _0x443b43[_0x496443]==='\x22'?(_0x1aaa8f+='\x5c\x22',_0x496443++):_0x1aaa8f+=_0x443b43[_0x496443++];}_0x1aaa8f+='\x22';if(_0x496443<_0x443b43[_0x1ab0c0(0x2de)])_0x496443++;continue;}if('{}[]:,\x0a\x0d\x09\x20'[_0x1ab0c0(0x2ce)](_0x4f2aa3)){_0x1aaa8f+=_0x4f2aa3,_0x496443++;continue;}let _0x595257='';while(_0x496443<_0x443b43[_0x1ab0c0(0x2de)]&&!'{}[]:,\x27\x22'[_0x1ab0c0(0x2ce)](_0x443b43[_0x496443])&&_0x443b43[_0x496443]!=='\x20'&&_0x443b43[_0x496443]!=='\x09'&&_0x443b43[_0x496443]!=='\x0a'&&_0x443b43[_0x496443]!=='\x0d'){_0x595257+=_0x443b43[_0x496443++];}let _0x5700e2=_0x496443;while(_0x5700e2<_0x443b43[_0x1ab0c0(0x2de)]&&(_0x443b43[_0x5700e2]==='\x20'||_0x443b43[_0x5700e2]==='\x09'))_0x5700e2++;if(_0x443b43[_0x5700e2]===':')_0x1aaa8f+='\x22'+_0x595257+'\x22';else _0x595257==='true'||_0x595257===_0x1ab0c0(0x3fd)||_0x595257==='null'||/^-?\d+(\.\d+)?([eE][+-]?\d+)?$/[_0x1ab0c0(0x380)](_0x595257)?_0x1aaa8f+=_0x595257:_0x1aaa8f+='\x22'+_0x595257+'\x22';}return _0x1aaa8f['replace'](/,(\s*[}\]])/g,'$1');}function _0x3bc6c9(_0x1a3e28){const _0x1e242=_0x18edac,_0x2b096e=[];let _0x3d679b=0x0;while(_0x3d679b<_0x1a3e28[_0x1e242(0x2de)]){while(_0x3d679b<_0x1a3e28[_0x1e242(0x2de)]&&(_0x1a3e28[_0x3d679b]==='\x20'||_0x1a3e28[_0x3d679b]==='\x09'))_0x3d679b++;if(_0x3d679b>=_0x1a3e28[_0x1e242(0x2de)])break;const _0x543496=_0x1a3e28[_0x3d679b];if(_0x543496==='{'||_0x543496==='['){const _0x624be0=_0x543496==='{'?'}':']',_0x1d7eff=_0x3d679b++;let _0x1bb720=0x1,_0x28478b=![],_0x53df04='';while(_0x3d679b<_0x1a3e28[_0x1e242(0x2de)]&&_0x1bb720>0x0){const _0x143b8c=_0x1a3e28[_0x3d679b];if(_0x28478b){if(_0x143b8c==='\x5c')_0x3d679b++;else{if(_0x143b8c===_0x53df04)_0x28478b=![];}}else{if(_0x143b8c==='\x22'||_0x143b8c==='\x27')_0x28478b=!![],_0x53df04=_0x143b8c;else{if(_0x143b8c===_0x543496)_0x1bb720++;else{if(_0x143b8c===_0x624be0)_0x1bb720--;}}}_0x3d679b++;}_0x2b096e['push'](_0x1a3e28[_0x1e242(0x297)](_0x1d7eff,_0x3d679b));continue;}if(_0x543496==='\x22'||_0x543496==='\x27'){const _0x18bde3=_0x543496;_0x3d679b++;let _0x334aba='';while(_0x3d679b<_0x1a3e28[_0x1e242(0x2de)]&&_0x1a3e28[_0x3d679b]!==_0x18bde3){if(_0x1a3e28[_0x3d679b]==='\x5c'&&_0x3d679b+0x1<_0x1a3e28[_0x1e242(0x2de)])_0x3d679b++,_0x334aba+=_0x1a3e28[_0x3d679b++];else _0x334aba+=_0x1a3e28[_0x3d679b++];}if(_0x3d679b<_0x1a3e28[_0x1e242(0x2de)])_0x3d679b++;_0x2b096e['push'](_0x334aba);continue;}let _0x44478e='';while(_0x3d679b<_0x1a3e28[_0x1e242(0x2de)]&&_0x1a3e28[_0x3d679b]!=='\x20'&&_0x1a3e28[_0x3d679b]!=='\x09'&&_0x1a3e28[_0x3d679b]!=='{'&&_0x1a3e28[_0x3d679b]!=='['){_0x44478e+=_0x1a3e28[_0x3d679b++];}if(_0x44478e)_0x2b096e[_0x1e242(0x197)](_0x44478e);}return _0x2b096e;}function _0x2f220a(_0x4d6c04,_0xecf2d7){const _0x518054=_0x18edac,_0x350088=[..._0x4d6c04['_envs'][_0x518054(0x153)]()][_0x518054(0x3f9)](_0x51c5f4=>!_0x51c5f4[_0x518054(0x405)]('~'));console[_0x518054(0x352)](['',_0x1ce66c(_0x53b34a[_0x518054(0x1e7)]+_0x53b34a[_0x518054(0x296)],_0x518054(0x214)),_0x1ce66c(_0x53b34a[_0x518054(0x1e7)]+_0x53b34a[_0x518054(0x296)],_0x518054(0x2ba))+_0x1ce66c(_0x53b34a[_0x518054(0x1e7)],_0x518054(0x3cd))+_0x1ce66c(_0x53b34a[_0x518054(0x1e7)]+_0x53b34a[_0x518054(0x296)],'║'),_0x1ce66c(_0x53b34a[_0x518054(0x1e7)]+_0x53b34a['cyan'],'\x20\x20╚═══════════════════════════╝'),'','\x20\x20'+_0x1ce66c(_0x53b34a['green'],'✓')+'\x20'+_0x1ce66c(_0x53b34a[_0x518054(0x1e7)],'server')+_0x518054(0x248)+_0xecf2d7['port'],'\x20\x20'+_0x1ce66c(_0x53b34a[_0x518054(0x2a2)],'✓')+'\x20'+_0x1ce66c(_0x53b34a[_0x518054(0x1e7)],'api')+'\x20\x20\x20\x20\x20http://localhost:'+_0xecf2d7['port']+_0x518054(0x24d),'\x20\x20'+_0x1ce66c(_0x53b34a[_0x518054(0x2a2)],'✓')+'\x20'+_0x1ce66c(_0x53b34a[_0x518054(0x1e7)],_0x518054(0x294))+'\x20\x20\x20\x20'+_0xecf2d7[_0x518054(0x292)],'\x20\x20'+_0x1ce66c(_0x53b34a[_0x518054(0x2a2)],'✓')+'\x20'+_0x1ce66c(_0x53b34a['bold'],'id')+'\x20\x20\x20\x20\x20\x20'+_0x1ce66c(_0x53b34a[_0x518054(0x1be)],_0x4d6c04['id']),'\x20\x20'+_0x1ce66c(_0x53b34a[_0x518054(0x2a2)],'✓')+'\x20'+_0x1ce66c(_0x53b34a[_0x518054(0x1e7)],_0x518054(0x343))+_0x518054(0x3cc)+_0x350088['map'](_0x5a77c2=>_0x1ce66c(_0x53b34a['cyan'],_0x5a77c2))[_0x518054(0x277)]('\x20\x20'),..._0xecf2d7['noAdmin']?[]:['\x20\x20'+_0x1ce66c(_0x53b34a[_0x518054(0x2a2)],'✓')+'\x20'+_0x1ce66c(_0x53b34a['bold'],_0x518054(0x162))+'\x20\x20\x20http://localhost:'+_0xecf2d7[_0x518054(0x236)]+_0x518054(0x3f3)],'',_0x1ce66c(_0x53b34a[_0x518054(0x155)],_0x518054(0x357)+_0x1ce66c(_0x53b34a[_0x518054(0x1e7)],_0x518054(0x14b))+_0x518054(0x19b)+_0x1ce66c(_0x53b34a['bold'],_0x518054(0x23e))+_0x518054(0x1b3)+_0x1ce66c(_0x53b34a[_0x518054(0x1e7)],_0x518054(0x2a5))+'\x20to\x20quit.'),''][_0x518054(0x277)]('\x0a'));}function _0x13008e(_0x39622f){const _0x165acc=_0x18edac;console[_0x165acc(0x352)]('\x0a'+_0x1ce66c(_0x53b34a[_0x165acc(0x1e7)],'\x20\x20Path\x20access')+'\x20\x20'+_0x1ce66c(_0x53b34a[_0x165acc(0x155)],'—\x20/api/\x20is\x20auto-prefixed,\x20env\x20is\x20auto-injected')+'\x0a\x0a\x20\x20'+_0x1ce66c(_0x53b34a[_0x165acc(0x296)],_0x165acc(0x344))+_0x165acc(0x3ab)+_0x1ce66c(_0x53b34a['cyan'],_0x165acc(0x344))+'\x20'+_0x1ce66c(_0x53b34a[_0x165acc(0x3e2)],'<json-body>')+_0x165acc(0x186)+_0x1ce66c(_0x53b34a[_0x165acc(0x296)],'VERB')+'\x20'+_0x1ce66c(_0x53b34a[_0x165acc(0x296)],_0x165acc(0x344))+'\x20'+_0x1ce66c(_0x53b34a['yellow'],'[body]')+_0x165acc(0x2f2)+_0x1ce66c(_0x53b34a[_0x165acc(0x155)],_0x165acc(0x25e))+_0x165acc(0x24f)+_0x1ce66c(_0x53b34a['gray'],_0x165acc(0x196))+_0x165acc(0x3a7)+_0x1ce66c(_0x53b34a['gray'],_0x165acc(0x343))+'\x20\x20\x20\x20\x20\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'+_0x1ce66c(_0x53b34a[_0x165acc(0x1be)],_0x165acc(0x184))+'\x20\x20\x20\x20\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/'+_0x39622f[_0x165acc(0x2c1)]+_0x165acc(0x356)+_0x1ce66c(_0x53b34a[_0x165acc(0x1be)],_0x165acc(0x26d))+_0x165acc(0x1f3)+_0x39622f[_0x165acc(0x2c1)]+'/type/users\x0a\x20\x20\x20\x20'+_0x1ce66c(_0x53b34a['gray'],_0x165acc(0x2d7))+_0x165acc(0x227)+_0x39622f[_0x165acc(0x2c1)]+'/type/users/item/alice\x0a\x20\x20\x20\x20'+_0x1ce66c(_0x53b34a[_0x165acc(0x1be)],_0x165acc(0x394))+'\x20→\x20POST\x20/api/env/'+_0x39622f[_0x165acc(0x2c1)]+_0x165acc(0x223)+_0x1ce66c(_0x53b34a[_0x165acc(0x1be)],_0x165acc(0x1f9))+_0x165acc(0x24f)+_0x1ce66c(_0x53b34a[_0x165acc(0x1be)],'DELETE\x20type/users/item/x')+_0x165acc(0x24f)+_0x1ce66c(_0x53b34a['gray'],_0x165acc(0x16b))+'\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'+_0x1ce66c(_0x53b34a['bold'],_0x165acc(0x13b))+'\x20\x20'+_0x1ce66c(_0x53b34a[_0x165acc(0x155)],_0x165acc(0x140))+_0x165acc(0x2d3)+_0x1ce66c(_0x53b34a[_0x165acc(0x296)],'--env\x20<name>')+_0x165acc(0x40d)+_0x1ce66c(_0x53b34a[_0x165acc(0x296)],'--help')+_0x165acc(0x1a9)+_0x1ce66c(_0x53b34a['dim'],_0x165acc(0x25e))+_0x165acc(0x24f)+_0x1ce66c(_0x53b34a[_0x165acc(0x1be)],_0x165acc(0x1c5))+_0x165acc(0x24f)+_0x1ce66c(_0x53b34a['gray'],'type/users/item/alice\x20--env\x20staging')+_0x165acc(0x24f)+_0x1ce66c(_0x53b34a[_0x165acc(0x1be)],_0x165acc(0x1a0))+'\x0a\x0a'+_0x1ce66c(_0x53b34a[_0x165acc(0x1e7)],_0x165acc(0x178))+_0x165acc(0x2d3)+_0x1ce66c(_0x53b34a[_0x165acc(0x296)],_0x165acc(0x365))+_0x165acc(0x201)+_0x1ce66c(_0x53b34a['cyan'],_0x165acc(0x2c1))+_0x165acc(0x30e)+_0x1ce66c(_0x53b34a[_0x165acc(0x296)],_0x165acc(0x23e))+'\x20'+_0x1ce66c(_0x53b34a[_0x165acc(0x155)],_0x165acc(0x281))+_0x165acc(0x30f)+_0x1ce66c(_0x53b34a[_0x165acc(0x296)],_0x165acc(0x174))+'\x20'+_0x1ce66c(_0x53b34a['dim'],'[on|off|level]')+_0x165acc(0x1ea)+_0x1ce66c(_0x53b34a[_0x165acc(0x296)],_0x165acc(0x31c))+_0x165acc(0x1f2)+_0x1ce66c(_0x53b34a['cyan'],_0x165acc(0x14b))+'\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'+_0x1ce66c(_0x53b34a[_0x165acc(0x296)],'exit')+'\x20'+_0x1ce66c(_0x53b34a[_0x165acc(0x155)],_0x165acc(0x335))+'\x20\x20\x20\x20graceful\x20shutdown\x0a');}async function _0x3495be(_0x5c45e2,_0x55c001=0x0){const _0x52a759=_0x18edac;process[_0x52a759(0x15d)][_0x52a759(0x286)]('\x0a'),console[_0x52a759(0x352)](_0x1ce66c(_0x53b34a[_0x52a759(0x3e2)],'\x20\x20[okdb]\x20shutting\x20down…'));try{await _0x5c45e2[_0x52a759(0x1dc)]();}catch(_0x44a6fc){console[_0x52a759(0x23d)](_0x1ce66c(_0x53b34a[_0x52a759(0x32d)],'\x20\x20'+_0x44a6fc['message']));}process[_0x52a759(0x2a5)](_0x55c001);}function _0x4a7d91(_0x455140){const _0x27e7e7=_0x18edac,_0x5bb07c=_0x455140['env']!==_0x27e7e7(0x397)?_0x1ce66c(_0x53b34a[_0x27e7e7(0x3e2)],'['+_0x455140['env']+']'):'';return _0x1ce66c(_0x53b34a[_0x27e7e7(0x1e7)]+_0x53b34a[_0x27e7e7(0x296)],_0x27e7e7(0x262))+_0x5bb07c+_0x1ce66c(_0x53b34a[_0x27e7e7(0x1be)],'>\x20');}const _0x57ee57=new Set(['GET',_0x18edac(0x272),_0x18edac(0x3dd),_0x18edac(0x30a),'DELETE']);async function _0x1d6a8a(_0x2afe58,_0x41ba66,_0x4417ef,_0x321ecb,_0x39df38,_0x26f459){const _0x49ec92=_0x18edac;_0x2afe58=_0x2afe58[_0x49ec92(0x374)]();if(!_0x2afe58||_0x2afe58[_0x49ec92(0x405)]('#'))return;const _0x4ecc7f=_0x3bc6c9(_0x2afe58),{flags:_0x2d1225,rest:_0x3480d1}=_0x440d86(_0x4ecc7f);if(!_0x3480d1['length'])return;const _0x8d236=_0x3480d1[0x0],_0x2dda2d=_0x8d236[_0x49ec92(0x36c)]();if(_0x2dda2d===_0x49ec92(0x382)){if(_0x3480d1[0x1])_0x1b2c6f(_0x41ba66,_0x39c5bb(_0x3480d1[0x1],_0x2d1225[_0x49ec92(0x2c1)]??_0x39df38[_0x49ec92(0x2c1)]));else _0x13008e(_0x39df38);return;}if(_0x2dda2d===_0x49ec92(0x35c)){const _0x265011=_0x3480d1[0x1];if(!_0x265011){console[_0x49ec92(0x352)](_0x1ce66c(_0x53b34a[_0x49ec92(0x32d)],'\x0a\x20\x20Usage:\x20use\x20<env-name>\x0a'));return;}try{_0x41ba66['env'](_0x265011),_0x39df38[_0x49ec92(0x2c1)]=_0x265011,_0x26f459?.[_0x49ec92(0x1d7)](_0x4a7d91(_0x39df38)),console[_0x49ec92(0x352)]('\x0a\x20\x20'+_0x1ce66c(_0x53b34a[_0x49ec92(0x2a2)],'✓')+'\x20active\x20env:\x20'+_0x1ce66c(_0x53b34a[_0x49ec92(0x1e7)]+_0x53b34a['cyan'],_0x265011)+'\x0a');}catch{console[_0x49ec92(0x352)]('\x0a\x20\x20'+_0x1ce66c(_0x53b34a[_0x49ec92(0x32d)],'✗')+_0x49ec92(0x267)+_0x1ce66c(_0x53b34a[_0x49ec92(0x1e7)],_0x265011)+'\x20not\x20found'+_0x1ce66c(_0x53b34a[_0x49ec92(0x155)],'\x20—\x20type\x20env\x20to\x20list\x20available\x0a'));}return;}if(_0x2dda2d===_0x49ec92(0x3c1)){const _0x416089=[..._0x41ba66[_0x49ec92(0x293)]['keys']()]['filter'](_0x404c0b=>!_0x404c0b['startsWith']('~'));console[_0x49ec92(0x352)]('');for(const _0xb5504f of _0x416089){const _0x112462=_0xb5504f===_0x39df38[_0x49ec92(0x2c1)];console['log']('\x20\x20'+(_0x112462?_0x1ce66c(_0x53b34a[_0x49ec92(0x2a2)],'●'):_0x1ce66c(_0x53b34a[_0x49ec92(0x155)],'○'))+'\x20\x20'+(_0x112462?_0x1ce66c(_0x53b34a[_0x49ec92(0x1e7)]+_0x53b34a[_0x49ec92(0x296)],_0xb5504f):_0x1ce66c(_0x53b34a[_0x49ec92(0x155)],_0xb5504f)));}console[_0x49ec92(0x352)](_0x49ec92(0x2b6)+_0x1ce66c(_0x53b34a[_0x49ec92(0x155)],_0x49ec92(0x373))+'\x20'+_0x1ce66c(_0x53b34a[_0x49ec92(0x296)],_0x39df38[_0x49ec92(0x2c1)])),console[_0x49ec92(0x352)]('');return;}if(_0x2dda2d===_0x49ec92(0x1e4)){const _0x4fa08a=[..._0x41ba66['_envs']['values']()]['filter'](_0x2c6478=>!_0x2c6478['name'][_0x49ec92(0x405)]('~'));console[_0x49ec92(0x352)]('');const _0x498d9f=Math[_0x49ec92(0x1ac)](..._0x4fa08a[_0x49ec92(0x152)](_0xe80d39=>_0xe80d39['name'][_0x49ec92(0x2de)]));for(const _0x4d7a98 of _0x4fa08a){const _0x2e0e29=_0x4d7a98['name']===_0x39df38[_0x49ec92(0x2c1)],_0x5639f4=_0x2e0e29?_0x1ce66c(_0x53b34a[_0x49ec92(0x2a2)],'●'):_0x1ce66c(_0x53b34a[_0x49ec92(0x155)],'○'),_0x5f5385=_0x2e0e29?_0x1ce66c(_0x53b34a[_0x49ec92(0x1e7)]+_0x53b34a[_0x49ec92(0x296)],_0x4d7a98[_0x49ec92(0x2f8)][_0x49ec92(0x368)](_0x498d9f)):_0x1ce66c(_0x53b34a[_0x49ec92(0x155)],_0x4d7a98[_0x49ec92(0x2f8)][_0x49ec92(0x368)](_0x498d9f)),_0x5756cc=[..._0x4d7a98[_0x49ec92(0x17c)]['keys']()][_0x49ec92(0x3f9)](_0x48b425=>!_0x48b425['startsWith']('~')),_0xcf77f6=_0x5756cc['length']?_0x1ce66c(_0x53b34a[_0x49ec92(0x155)],_0x5756cc[_0x49ec92(0x297)](0x0,0x5)[_0x49ec92(0x277)](',\x20')+(_0x5756cc[_0x49ec92(0x2de)]>0x5?'\x20\x20+'+(_0x5756cc[_0x49ec92(0x2de)]-0x5)+'\x20more':'')):_0x1ce66c(_0x53b34a[_0x49ec92(0x155)],'(no\x20types)');console['log']('\x20\x20'+_0x5639f4+'\x20\x20'+_0x5f5385+'\x20\x20'+_0xcf77f6);}console[_0x49ec92(0x352)]('');return;}if(_0x2dda2d===_0x49ec92(0x425)){const _0x441543=_0x2d1225['env']??_0x3480d1[0x1]??_0x39df38[_0x49ec92(0x2c1)];try{const _0xb35474=_0x41ba66[_0x49ec92(0x2c1)](_0x441543),_0x406cbd=[..._0xb35474['typeSubDbs'][_0x49ec92(0x153)]()]['filter'](_0x5208aa=>!_0x5208aa[_0x49ec92(0x405)]('~'))[_0x49ec92(0x163)]();console[_0x49ec92(0x352)](_0x49ec92(0x2b6)+_0x1ce66c(_0x53b34a[_0x49ec92(0x155)],_0x406cbd[_0x49ec92(0x2de)]+_0x49ec92(0x2f9)+(_0x406cbd[_0x49ec92(0x2de)]!==0x1?'s':'')+_0x49ec92(0x30d)+_0x441543));for(const _0x52befd of _0x406cbd){const _0x1a525e=_0xb35474[_0x49ec92(0x17c)]['get'](_0x52befd),_0x477e53=_0x1a525e?.[_0x49ec92(0x187)]?.[_0x49ec92(0x255)]?.()??0x0,_0x513f56=_0x1ce66c(_0x53b34a['bold']+_0x53b34a[_0x49ec92(0x296)],_0x52befd[_0x49ec92(0x368)](0x1c));console[_0x49ec92(0x352)](_0x49ec92(0x3cc)+_0x513f56+'\x20\x20'+_0x1ce66c(_0x53b34a[_0x49ec92(0x2da)],String(_0x477e53)[_0x49ec92(0x1bf)](0x6))+'\x20'+_0x1ce66c(_0x53b34a[_0x49ec92(0x155)],'records'));}console[_0x49ec92(0x352)]('');}catch(_0x5d334f){console[_0x49ec92(0x23d)](_0x1ce66c(_0x53b34a[_0x49ec92(0x32d)],'\x0a\x20\x20'+_0x5d334f[_0x49ec92(0x183)]+'\x0a'));}return;}if(_0x2dda2d===_0x49ec92(0x24b)){_0x3cd597(_0x41ba66,_0x3480d1['slice'](0x1)[_0x49ec92(0x277)]('\x20'));return;}if(_0x2dda2d===_0x49ec92(0x347)){const _0x50c590=(_0x3480d1[0x1]??'')['toLowerCase']();if(!_0x50c590||_0x50c590==='on')_0x321ecb[_0x49ec92(0x28a)]=!![],_0x321ecb['level']='info',console['log'](_0x49ec92(0x2b6)+_0x1ce66c(_0x53b34a[_0x49ec92(0x2a2)],'✓')+_0x49ec92(0x427)+_0x1ce66c(_0x53b34a[_0x49ec92(0x155)],_0x49ec92(0x415))+'\x0a');else{if(_0x50c590==='off')_0x321ecb['enabled']=![],console[_0x49ec92(0x352)](_0x49ec92(0x2b6)+_0x1ce66c(_0x53b34a[_0x49ec92(0x3e2)],'○')+_0x49ec92(0x28b));else _0x23b14f[_0x50c590]!==undefined?(_0x321ecb[_0x49ec92(0x28a)]=!![],_0x321ecb[_0x49ec92(0x28c)]=_0x50c590,console['log'](_0x49ec92(0x2b6)+_0x1ce66c(_0x53b34a[_0x49ec92(0x2a2)],'✓')+_0x49ec92(0x3da)+_0x1ce66c(_0x53b34a['bold'],_0x50c590)+'\x0a')):console[_0x49ec92(0x23d)](_0x1ce66c(_0x53b34a[_0x49ec92(0x32d)],_0x49ec92(0x228)));}return;}if(_0x2dda2d==='EXIT'||_0x2dda2d===_0x49ec92(0x254)){await _0x3495be(_0x41ba66,0x0);return;}if(_0x2dda2d===_0x49ec92(0x381)){const _0x1b1687=_0x49ec92(0x1df)+_0x4417ef[_0x49ec92(0x236)]+'/admin/index.html',_0x48017a=process[_0x49ec92(0x1b6)]==='win32'?_0x49ec92(0x3fb)+_0x1b1687:process[_0x49ec92(0x1b6)]===_0x49ec92(0x3e4)?_0x49ec92(0x35e)+_0x1b1687:'xdg-open\x20'+_0x1b1687;require$$4[_0x49ec92(0x386)](_0x48017a),console[_0x49ec92(0x352)](_0x49ec92(0x2b6)+_0x1ce66c(_0x53b34a[_0x49ec92(0x2a2)],'✓')+_0x49ec92(0x39f)+_0x1ce66c(_0x53b34a['cyan'],_0x1b1687)+'\x0a');return;}let _0x114df2,_0x4f230e,_0xe9ae02;if(_0x57ee57[_0x49ec92(0x2dd)](_0x2dda2d)){_0x114df2=_0x2dda2d,_0x4f230e=_0x3480d1[0x1],_0xe9ae02=_0x3480d1['slice'](0x2);if(!_0x4f230e){console[_0x49ec92(0x23d)](_0x1ce66c(_0x53b34a['red'],_0x49ec92(0x366)+_0x8d236+_0x49ec92(0x2cd)));return;}}else _0x114df2=null,_0x4f230e=_0x3480d1[0x0],_0xe9ae02=_0x3480d1[_0x49ec92(0x297)](0x1);const _0x264b6c=_0x2d1225['env']??_0x39df38['env'],_0x2810bb=_0x39c5bb(_0x4f230e,_0x264b6c);if(_0x2d1225[_0x49ec92(0x14b)]){_0x1b2c6f(_0x41ba66,_0x2810bb);return;}let _0x1c5e16=null;if(_0xe9ae02[_0x49ec92(0x2de)]){const _0x1077d9=_0xe9ae02[_0x49ec92(0x277)]('\x20');try{_0x1c5e16=_0x265211(_0x1077d9);}catch(_0x158c07){console[_0x49ec92(0x23d)](_0x1ce66c(_0x53b34a[_0x49ec92(0x32d)],'\x0a\x20\x20Invalid\x20JSON:\x20'+_0x1077d9+_0x49ec92(0x2b6)+_0x1ce66c(_0x53b34a[_0x49ec92(0x155)],_0x158c07[_0x49ec92(0x183)])+'\x0a'));return;}}if(!_0x114df2)_0x114df2=_0x1c5e16!==null?_0x49ec92(0x272):_0x49ec92(0x3ea);try{const _0x15db20=await _0x56b174(_0x41ba66,_0x114df2,_0x2810bb,_0x1c5e16);_0x39a1a7(_0x15db20[_0x49ec92(0x166)],_0x15db20[_0x49ec92(0x317)]);}catch(_0x49f1e8){console[_0x49ec92(0x23d)](_0x49ec92(0x2b6)+_0x1ce66c(_0x53b34a[_0x49ec92(0x32d)],'✗')+'\x20'+_0x49f1e8['message']+'\x0a');}}class _0xb3bd7e{constructor(){const _0x58ca9b=_0x18edac;this['children']=new Map(),this['dynamic']=null,this[_0x58ca9b(0x326)]=![];}}function _0x4c6e53(_0x27aadb){const _0x167114=_0x18edac,_0x474ebb=new _0xb3bd7e();for(const _0x324f8d of _0x27aadb){if(_0x324f8d['meta']?.['hidden'])continue;const _0x245c1c=_0x324f8d['path'][_0x167114(0x282)](/^\/api/,'')['replace'](/^\[\/env\/:env=[^\]]*\]/,'')['replace'](/^\//,'');if(!_0x245c1c)continue;let _0x4f76ae=_0x474ebb;for(const _0x41ef4a of _0x245c1c[_0x167114(0x265)]('/')[_0x167114(0x3f9)](Boolean)){if(_0x41ef4a['startsWith'](':')){const _0x395455=_0x41ef4a[_0x167114(0x297)](0x1);if(!_0x4f76ae[_0x167114(0x2ac)])_0x4f76ae[_0x167114(0x2ac)]={'param':_0x395455,'node':new _0xb3bd7e()};_0x4f76ae=_0x4f76ae[_0x167114(0x2ac)][_0x167114(0x358)];}else{if(!_0x4f76ae[_0x167114(0x2bf)][_0x167114(0x2dd)](_0x41ef4a))_0x4f76ae[_0x167114(0x2bf)][_0x167114(0x144)](_0x41ef4a,new _0xb3bd7e());_0x4f76ae=_0x4f76ae[_0x167114(0x2bf)][_0x167114(0x336)](_0x41ef4a);}}_0x4f76ae[_0x167114(0x326)]=!![];}return _0x474ebb;}const _0x3c2bbb=new Map();function _0x2e213d(_0xd6dc0d,_0xd2b7f3,_0x566648){const _0x45917a=_0x18edac,_0x189e73=_0x3c2bbb['get'](_0xd6dc0d);if(_0x189e73&&_0x189e73['exp']>Date[_0x45917a(0x3d3)]())return _0x189e73[_0x45917a(0x151)];const _0x42f98f=_0x566648();return _0x3c2bbb[_0x45917a(0x144)](_0xd6dc0d,{'val':_0x42f98f,'exp':Date['now']()+_0xd2b7f3}),_0x42f98f;}function _0x5e9b83(_0x1e1780,_0x207e38,_0x26b2d8,_0x1fe042){const _0x23fb42=_0x18edac,_0x819351=_0x207e38[_0x23fb42(0x2c1)]??_0x1fe042['env'];switch(_0x1e1780){case _0x23fb42(0x2c1):return[..._0x26b2d8[_0x23fb42(0x293)]['keys']()]['filter'](_0x2592b9=>!_0x2592b9['startsWith']('~'));case _0x23fb42(0x150):return _0x2e213d('types:'+_0x819351,0x7d0,()=>{const _0x142368=_0x23fb42;try{return[..._0x26b2d8[_0x142368(0x2c1)](_0x819351)['typeSubDbs']['keys']()][_0x142368(0x3f9)](_0x33e2dc=>!_0x33e2dc['startsWith']('~'));}catch{return[];}});case _0x23fb42(0x363):if(!_0x207e38[_0x23fb42(0x150)])return[];return _0x2e213d('keys:'+_0x819351+':'+_0x207e38['type'],0x5dc,()=>{const _0x2268f5=_0x23fb42;try{const _0x2abcee=_0x26b2d8[_0x2268f5(0x2c1)](_0x819351)[_0x2268f5(0x17c)][_0x2268f5(0x336)](_0x207e38[_0x2268f5(0x150)]);if(!_0x2abcee?.[_0x2268f5(0x187)])return[];const _0x5ced5a=[];for(const {key:_0xcd08a0}of _0x2abcee['data'][_0x2268f5(0x325)]({'limit':0x32})){_0x5ced5a[_0x2268f5(0x197)](String(_0xcd08a0));if(_0x5ced5a[_0x2268f5(0x2de)]>=0x32)break;}return _0x5ced5a;}catch{return[];}});case _0x23fb42(0x40b):if(!_0x207e38[_0x23fb42(0x150)])return[];return _0x2e213d(_0x23fb42(0x285)+_0x819351+':'+_0x207e38['type'],0x7d0,()=>{const _0x5b9dff=_0x23fb42;try{const _0x6aac85=_0x26b2d8[_0x5b9dff(0x2c1)](_0x819351)['typeSubDbs'][_0x5b9dff(0x336)](_0x207e38['type']);return _0x6aac85?[..._0x6aac85['indexToDb']?.[_0x5b9dff(0x153)]()??[]]:[];}catch{return[];}});case'ftsName':if(!_0x207e38[_0x23fb42(0x150)])return[];return _0x2e213d(_0x23fb42(0x2ab)+_0x819351+':'+_0x207e38['type'],0x7d0,()=>{const _0x4f9fd2=_0x23fb42;try{return _0x26b2d8[_0x4f9fd2(0x200)]?.[_0x4f9fd2(0x1ae)]?.(_0x207e38[_0x4f9fd2(0x150)],_0x26b2d8[_0x4f9fd2(0x2c1)](_0x819351))?.[_0x4f9fd2(0x152)](_0xfc31a=>_0xfc31a[_0x4f9fd2(0x2f8)])??[];}catch{return[];}});default:return[];}}function _0x579822(_0x23fdba,_0x398f20,_0x5b04b4,_0x253ee0){const _0x502354=_0x18edac,_0x3f0285=_0x23fdba[_0x502354(0x287)]('/'),_0x4935db=_0x23fdba[_0x502354(0x265)]('/'),_0xb76f6a=_0x3f0285?_0x4935db['slice'](0x0,-0x1):_0x4935db[_0x502354(0x297)](0x0,-0x1),_0x18389e=_0x3f0285?'':_0x4935db[_0x4935db[_0x502354(0x2de)]-0x1];let _0x812ef2=_0x398f20;const _0x328fd0={};for(const _0x23dedc of _0xb76f6a){if(!_0x23dedc)continue;if(_0x812ef2['children'][_0x502354(0x2dd)](_0x23dedc))_0x812ef2=_0x812ef2['children'][_0x502354(0x336)](_0x23dedc);else{if(_0x812ef2[_0x502354(0x2ac)])_0x328fd0[_0x812ef2[_0x502354(0x2ac)][_0x502354(0x198)]]=_0x23dedc,_0x812ef2=_0x812ef2[_0x502354(0x2ac)]['node'];else return[];}}const _0x267f32=_0xb76f6a[_0x502354(0x3f9)](Boolean),_0x58edca=_0x267f32[_0x502354(0x2de)]?_0x267f32['join']('/')+'/':'',_0x3e7ce7=[];for(const [_0x4a3f26]of _0x812ef2[_0x502354(0x2bf)]){if(_0x4a3f26[_0x502354(0x405)](_0x18389e))_0x3e7ce7[_0x502354(0x197)](_0x58edca+_0x4a3f26);}if(_0x812ef2[_0x502354(0x2ac)])for(const _0x58db98 of _0x5e9b83(_0x812ef2[_0x502354(0x2ac)][_0x502354(0x198)],_0x328fd0,_0x5b04b4,_0x253ee0)){if(String(_0x58db98)[_0x502354(0x405)](_0x18389e))_0x3e7ce7[_0x502354(0x197)](_0x58edca+_0x58db98);}return _0x3e7ce7[_0x502354(0x297)](0x0,0x64);}const _0x195d86=[_0x18edac(0x14b),_0x18edac(0x203),_0x18edac(0x2c1),'envs',_0x18edac(0x184),_0x18edac(0x23e),'logs',_0x18edac(0x31c),'exit',_0x18edac(0x392)];function _0x39ff96(_0x57d5a8,_0x4bcae6,_0x3a757d){return function _0x4457b7(_0x1dc064){const _0x3fdfbe=_0x5a91;try{const _0x19af1f=_0x1dc064['search'](/\s[{[]/),_0x88ee1c=_0x19af1f>=0x0?_0x1dc064[_0x3fdfbe(0x297)](0x0,_0x19af1f):_0x1dc064,_0x5b48df=_0x88ee1c['trimStart']();if(!_0x5b48df){const _0x281273=[..._0x195d86,...[..._0x57d5a8[_0x3fdfbe(0x2bf)][_0x3fdfbe(0x153)]()]][_0x3fdfbe(0x297)](0x0,0x64);return[_0x281273,''];}const _0x53c22a=_0x5b48df[_0x3fdfbe(0x265)](/\s+/),_0x175763=_0x53c22a[0x0],_0x4b3827=_0x175763[_0x3fdfbe(0x36c)]();if(_0x53c22a[_0x3fdfbe(0x2de)]===0x1){const _0x456810=_0x175763[_0x3fdfbe(0x41e)](),_0x1fb1f0=_0x195d86[_0x3fdfbe(0x3f9)](_0x311eaf=>_0x311eaf['startsWith'](_0x456810)),_0x429fb9=_0x579822(_0x175763,_0x57d5a8,_0x4bcae6,_0x3a757d),_0x1a49b9=[...new Set([..._0x1fb1f0,..._0x429fb9])][_0x3fdfbe(0x297)](0x0,0x64);return[_0x1a49b9,_0x175763];}if(_0x57ee57[_0x3fdfbe(0x2dd)](_0x4b3827)&&_0x53c22a[_0x3fdfbe(0x2de)]===0x2){const _0x52471d=_0x53c22a[0x1],_0x54580e=_0x579822(_0x52471d,_0x57d5a8,_0x4bcae6,_0x3a757d);return[_0x54580e['map'](_0x163a62=>_0x175763+'\x20'+_0x163a62),_0x175763+'\x20'+_0x52471d];}if(!_0x57ee57[_0x3fdfbe(0x2dd)](_0x4b3827)&&_0x53c22a['length']>0x1){const _0x354075=_0x579822(_0x175763,_0x57d5a8,_0x4bcae6,_0x3a757d),_0x38420c='\x20'+_0x53c22a['slice'](0x1)['join']('\x20');return[_0x354075[_0x3fdfbe(0x152)](_0x37cdce=>_0x37cdce+_0x38420c),_0x175763+_0x38420c];}return[[],_0x1dc064];}catch{return[[],_0x1dc064];}};}async function _0x430aff(_0x4b75a3,_0x7b079e){const _0x5576f2=_0x18edac,_0x5e0337={'enabled':!![],'level':_0x7b079e[_0x5576f2(0x280)]??_0x5576f2(0x196)},_0x46405b={'env':'default'},_0x3279de={'current':null},_0x234ec0=_0x4c6e53(_0x4b75a3[_0x5576f2(0x247)][_0x5576f2(0x407)]()),_0x475044=_0x39ff96(_0x234ec0,_0x4b75a3,_0x46405b);_0x4b75a3[_0x5576f2(0x352)]['attach'](_0x3910ad=>{const _0x368e01=_0x5576f2;if(!_0x5e0337[_0x368e01(0x28a)])return;_0x3d6045(_0x3910ad,_0x5e0337[_0x368e01(0x28c)]),_0x3279de[_0x368e01(0x42a)]?.[_0x368e01(0x328)](!![]);}),_0x2f220a(_0x4b75a3,_0x7b079e);const _0x433a04=_0x4aa632[_0x5576f2(0x2f0)]({'input':process[_0x5576f2(0x295)],'output':process[_0x5576f2(0x15d)],'terminal':!![],'completer':_0x475044,'prompt':_0x4a7d91(_0x46405b),'historySize':_0x4458c5});try{const _0xcb1fa9=_0x6d8071[_0x5576f2(0x3b7)](_0x86d1dc,_0x5576f2(0x378))[_0x5576f2(0x265)]('\x0a')[_0x5576f2(0x3f9)](Boolean);_0x433a04[_0x5576f2(0x3f4)]=_0xcb1fa9[_0x5576f2(0x31b)]()['slice'](0x0,_0x4458c5);}catch{}return _0x3279de[_0x5576f2(0x42a)]=_0x433a04,_0x433a04['on'](_0x5576f2(0x338),async _0x1b7415=>{const _0x44aeb8=_0x5576f2;_0x433a04['pause']();try{await _0x1d6a8a(_0x1b7415,_0x4b75a3,_0x7b079e,_0x5e0337,_0x46405b,_0x433a04);}catch(_0x51024f){console[_0x44aeb8(0x23d)](_0x1ce66c(_0x53b34a[_0x44aeb8(0x32d)],_0x44aeb8(0x2e4)+_0x51024f[_0x44aeb8(0x183)]));}finally{_0x433a04[_0x44aeb8(0x351)](),_0x433a04[_0x44aeb8(0x328)]();}}),_0x433a04['on'](_0x5576f2(0x1dc),()=>{const _0x4d9e55=_0x5576f2;try{const _0x1a026d=[..._0x433a04[_0x4d9e55(0x3f4)]][_0x4d9e55(0x31b)]()[_0x4d9e55(0x3f9)](Boolean)[_0x4d9e55(0x297)](0x0,_0x4458c5);_0x6d8071[_0x4d9e55(0x14a)](_0x86d1dc,_0x1a026d[_0x4d9e55(0x277)]('\x0a')+'\x0a');}catch{}_0x3495be(_0x4b75a3,0x0);}),process['on']('SIGINT',()=>{const _0x429c56=_0x5576f2;if(_0x433a04['line']==='')_0x3495be(_0x4b75a3,0x0);else process['stdout'][_0x429c56(0x286)]('\x0a'),_0x433a04[_0x429c56(0x2ea)](0x0),_0x433a04['prompt']();}),process['on'](_0x5576f2(0x34d),()=>_0x3495be(_0x4b75a3,0x0)),_0x433a04[_0x5576f2(0x328)](),_0x433a04;}return okdbShell={'start':_0x430aff,'colorLog':_0x3d6045,'lenientParse':_0x265211,'_splitLine':_0x3bc6c9,'_formatRouteHelpLines':_0x2b7b49,'_routeSummary':_0x1b6618,'_routeTags':_0x2298fe},okdbShell;}var hasRequiredOkdb;function requireOkdb(){const _0x175560=_0x3f7624;if(hasRequiredOkdb)return okdb$1;hasRequiredOkdb=0x1;try{process['loadEnvFile']();}catch{}const _0x3b3cc7=require$$1$1,_0x3fdfe1=require$$1;function _0x1ae030(_0x2d0545){const _0x54ce4a=_0x5a91,_0x5b301a=_0x2d0545[_0x54ce4a(0x297)](0x2),_0x4b2d6a={};let _0x2984eb=0x0;while(_0x2984eb<_0x5b301a['length']){const _0x185ea5=_0x5b301a[_0x2984eb];if(_0x185ea5===_0x54ce4a(0x235)||_0x185ea5==='-p')_0x4b2d6a[_0x54ce4a(0x236)]=Number(_0x5b301a[++_0x2984eb]);else{if(_0x185ea5===_0x54ce4a(0x416)||_0x185ea5==='-d')_0x4b2d6a[_0x54ce4a(0x294)]=_0x5b301a[++_0x2984eb];else{if(_0x185ea5==='--key'||_0x185ea5==='-k')_0x4b2d6a[_0x54ce4a(0x363)]=_0x5b301a[++_0x2984eb];else{if(_0x185ea5===_0x54ce4a(0x1f7)||_0x185ea5==='-c')_0x4b2d6a[_0x54ce4a(0x41a)]=_0x5b301a[++_0x2984eb];else{if(_0x185ea5===_0x54ce4a(0x2d8))_0x4b2d6a[_0x54ce4a(0x280)]=_0x5b301a[++_0x2984eb];else{if(_0x185ea5==='--no-repl')_0x4b2d6a[_0x54ce4a(0x233)]=!![];else{if(_0x185ea5===_0x54ce4a(0x206))_0x4b2d6a[_0x54ce4a(0x29b)]=!![];else{if(_0x185ea5===_0x54ce4a(0x315)||_0x185ea5==='-e')_0x4b2d6a['env']=_0x5b301a[++_0x2984eb];else{if(_0x185ea5===_0x54ce4a(0x210))_0x4b2d6a[_0x54ce4a(0x184)]=_0x5b301a[++_0x2984eb];else{if(_0x185ea5===_0x54ce4a(0x1d5))_0x4b2d6a[_0x54ce4a(0x1f8)]=!![];else{if(_0x185ea5==='--blobs')_0x4b2d6a[_0x54ce4a(0x3cf)]=!![];else{if(_0x185ea5===_0x54ce4a(0x3a4))_0x4b2d6a[_0x54ce4a(0x28d)]=!![];else{if(_0x185ea5===_0x54ce4a(0x23a)){const _0x501daf=[];while(_0x2984eb+0x1<_0x5b301a[_0x54ce4a(0x2de)]&&!_0x5b301a[_0x2984eb+0x1][_0x54ce4a(0x405)]('--')){_0x501daf[_0x54ce4a(0x197)](_0x5b301a[++_0x2984eb]);}_0x4b2d6a['open']=_0x501daf['length']>0x0?_0x501daf:!![];}else{if(_0x185ea5===_0x54ce4a(0x167))_0x4b2d6a[_0x54ce4a(0x1db)]=!![];else{if(_0x185ea5===_0x54ce4a(0x1f0))_0x4b2d6a[_0x54ce4a(0x2f8)]=_0x5b301a[++_0x2984eb];else{if(_0x185ea5===_0x54ce4a(0x1c3))_0x4b2d6a['password']=_0x5b301a[++_0x2984eb];else{if(_0x185ea5===_0x54ce4a(0x37e))_0x4b2d6a[_0x54ce4a(0x2fe)]=_0x5b301a[++_0x2984eb];else{if(_0x185ea5===_0x54ce4a(0x2f6))_0x4b2d6a[_0x54ce4a(0x208)]=_0x5b301a[++_0x2984eb];else{if(_0x185ea5==='--grants')_0x4b2d6a[_0x54ce4a(0x2fd)]=_0x5b301a[++_0x2984eb];else{if(_0x185ea5==='--ttl')_0x4b2d6a[_0x54ce4a(0x408)]=_0x5b301a[++_0x2984eb];else{if(_0x185ea5===_0x54ce4a(0x1b5))_0x4b2d6a[_0x54ce4a(0x2ec)]=_0x5b301a[++_0x2984eb];else{if(_0x185ea5===_0x54ce4a(0x258)||_0x185ea5==='-u')_0x4b2d6a[_0x54ce4a(0x27c)]=_0x5b301a[++_0x2984eb];else{if(_0x185ea5==='--address')_0x4b2d6a[_0x54ce4a(0x2dc)]=_0x5b301a[++_0x2984eb];else{if(_0x185ea5===_0x54ce4a(0x2a0)||_0x185ea5==='-v'){const _0x21e779=require$$2;console['log'](_0x21e779[_0x54ce4a(0x242)]),process['exit'](0x0);}else(_0x185ea5==='--help'||_0x185ea5==='-h')&&(_0x981645(),process[_0x54ce4a(0x2a5)](0x0));}}}}}}}}}}}}}}}}}}}}}}}_0x2984eb++;}return _0x4b2d6a;}function _0x981645(){const _0x3bbe44=_0x5a91;console[_0x3bbe44(0x352)](_0x3bbe44(0x348));}const _0x6cd25=new Set([_0x175560(0x2db),_0x175560(0x196),_0x175560(0x224),'error']);function _0x1910d8(_0xe58fc1){const _0x113a45=_0x175560,_0xb98d3a=_0xe58fc1['config']?_0x3b3cc7[_0x113a45(0x2a6)](_0xe58fc1[_0x113a45(0x41a)]):_0x3b3cc7[_0x113a45(0x2a6)](_0x113a45(0x26f));let _0x2a02d8={};if(_0x3fdfe1[_0x113a45(0x205)](_0xb98d3a))try{const _0x4adf48=_0x3fdfe1['readFileSync'](_0xb98d3a,_0x113a45(0x378))['replace'](/^\uFEFF/,'');_0x2a02d8=JSON[_0x113a45(0x421)](_0x4adf48),console['log'](_0x113a45(0x41c)+_0xb98d3a);}catch(_0x1c3107){console[_0x113a45(0x23d)]('[okdb]\x20failed\x20to\x20parse\x20config\x20file\x20'+_0xb98d3a+':\x20'+_0x1c3107[_0x113a45(0x183)]),process['exit'](0x1);}const _0x514277={'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},_0x2cd3c0={'port':_0xe58fc1[_0x113a45(0x236)]??_0x2a02d8[_0x113a45(0x236)]??_0x514277['port']??0x2124,'dbPath':_0xe58fc1[_0x113a45(0x294)]??_0x2a02d8['path']??_0x514277[_0x113a45(0x294)]??_0x113a45(0x16d),'key':_0xe58fc1['key']??_0x2a02d8[_0x113a45(0x363)]??_0x514277[_0x113a45(0x363)]??undefined,'logLevel':_0xe58fc1['logLevel']??_0x2a02d8[_0x113a45(0x280)]??_0x514277[_0x113a45(0x280)]??_0x113a45(0x196),'noRepl':_0xe58fc1[_0x113a45(0x233)]??_0x2a02d8[_0x113a45(0x233)]??_0x514277['noRepl']??![],'noAdmin':_0xe58fc1[_0x113a45(0x29b)]??_0x2a02d8[_0x113a45(0x29b)]??_0x514277[_0x113a45(0x29b)]??![],'admin':_0x2a02d8[_0x113a45(0x162)]??{},'api':_0x2a02d8[_0x113a45(0x37c)]??undefined,'auth':_0x2a02d8[_0x113a45(0x19e)]??undefined,'mcp':_0x2a02d8[_0x113a45(0x1ca)]??undefined,'timeMachine':_0x2a02d8['timeMachine']!==![]?_0x2a02d8[_0x113a45(0x1b1)]??{}:![]};return _0xe58fc1[_0x113a45(0x31c)]!==undefined&&(_0x2cd3c0[_0x113a45(0x19e)]=_0x2cd3c0[_0x113a45(0x19e)]||{},_0x2cd3c0[_0x113a45(0x19e)]['open']=_0xe58fc1[_0x113a45(0x31c)]),_0xe58fc1[_0x113a45(0x1db)]&&(_0x2cd3c0[_0x113a45(0x2db)]=_0x2cd3c0[_0x113a45(0x2db)]||{},_0x2cd3c0[_0x113a45(0x2db)][_0x113a45(0x1db)]=!![]),(!Number['isInteger'](_0x2cd3c0[_0x113a45(0x236)])||_0x2cd3c0[_0x113a45(0x236)]<0x1||_0x2cd3c0[_0x113a45(0x236)]>0xffff)&&(console[_0x113a45(0x23d)]('[okdb]\x20invalid\x20port:\x20'+_0x2cd3c0[_0x113a45(0x236)]+_0x113a45(0x1e5)),process[_0x113a45(0x2a5)](0x1)),!_0x6cd25[_0x113a45(0x2dd)](_0x2cd3c0[_0x113a45(0x280)])&&(console[_0x113a45(0x23d)](_0x113a45(0x23c)+_0x2cd3c0[_0x113a45(0x280)]+_0x113a45(0x1bd)),process[_0x113a45(0x2a5)](0x1)),_0x2cd3c0;}function _0x20b7fe(_0xf0f369){const _0x4cb366=_0x175560;return!!(_0xf0f369&&typeof _0xf0f369===_0x4cb366(0x1c8)&&!Array['isArray'](_0xf0f369)&&Object[_0x4cb366(0x153)](_0xf0f369)['length']>0x0);}const _0x13a291=!process[_0x175560(0x15d)][_0x175560(0x182)]||!!process.env.NO_COLOR;function _0x14255c(_0x96c677,_0x2d3532){const _0xd3c132=_0x175560;return _0x13a291?_0x2d3532:'\x1b['+_0x96c677+'m'+_0x2d3532+_0xd3c132(0x2bb);}function _0x16bbdd(_0x4ab34f){const _0x4204ae=_0x175560;if(!_0x4ab34f||_0x4ab34f[_0x4204ae(0x2de)]===0x0)return;const _0x240401='─'[_0x4204ae(0x2b8)](0x38);process['stderr']['write']('\x0a'),process[_0x4204ae(0x3ce)][_0x4204ae(0x286)](_0x14255c('33',_0x4204ae(0x38e)+_0x4ab34f[_0x4204ae(0x2de)]+_0x4204ae(0x1a7)+(_0x4ab34f[_0x4204ae(0x2de)]>0x1?'S':'')+'\x0a')),process['stderr'][_0x4204ae(0x286)]('\x20\x20'+_0x240401+'\x0a');for(const _0x47778e of _0x4ab34f){const _0x55b9a2=_0x47778e['level']==='error'?_0x14255c('31',_0x4204ae(0x14f)):_0x14255c('33',_0x4204ae(0x3bc));process[_0x4204ae(0x3ce)][_0x4204ae(0x286)](_0x55b9a2+'\x20\x20'+_0x14255c('1',_0x47778e['title'])+'\x0a'),process[_0x4204ae(0x3ce)][_0x4204ae(0x286)](_0x4204ae(0x25f)+_0x47778e[_0x4204ae(0x183)]+'\x0a');if(_0x47778e[_0x4204ae(0x34e)])process[_0x4204ae(0x3ce)][_0x4204ae(0x286)](_0x4204ae(0x25f)+_0x14255c('2',_0x4204ae(0x225)+_0x47778e['hint'])+'\x0a');process['stderr'][_0x4204ae(0x286)]('\x0a');}process[_0x4204ae(0x3ce)][_0x4204ae(0x286)]('\x20\x20'+_0x240401+'\x0a\x0a');}function _0x1164f6(_0x221c45,_0x1ab00f){const _0x2a3328=_0x221c45['http']['listen'](_0x1ab00f);return new Promise((_0x47a541,_0x49f852)=>{const _0x4465c1=_0x5a91;_0x2a3328['once']('listening',_0x47a541),_0x2a3328[_0x4465c1(0x15b)](_0x4465c1(0x23d),_0x49f852);});}async function _0x704730(_0x3765c7){const _0x5bfa36=_0x175560,_0x254d29=require$$3;console[_0x5bfa36(0x352)](_0x5bfa36(0x220));let _0x5232ef=!![];const _0x291342=(_0x3d3527,_0x3cfc17)=>{const _0x51c538=_0x5bfa36;console[_0x51c538(0x352)]('\x20\x20'+(_0x3d3527?'✓':'✗')+'\x20'+_0x3cfc17);if(!_0x3d3527)_0x5232ef=![];},_0x31cded=Number(process[_0x5bfa36(0x242)][_0x5bfa36(0x282)]('v','')[_0x5bfa36(0x265)]('.')[0x0]);_0x291342(_0x31cded>=0x12,_0x5bfa36(0x22b)+process[_0x5bfa36(0x242)]+(_0x31cded<0x12?_0x5bfa36(0x27e):''));const _0x33e802=_0x3b3cc7[_0x5bfa36(0x2a6)](_0x3765c7[_0x5bfa36(0x292)]);try{_0x3fdfe1[_0x5bfa36(0x301)](_0x33e802,{'recursive':!![]});const _0x3c494f=_0x3b3cc7[_0x5bfa36(0x277)](_0x33e802,'.okdb-write-test');_0x3fdfe1[_0x5bfa36(0x14a)](_0x3c494f,''),_0x3fdfe1[_0x5bfa36(0x1bc)](_0x3c494f),_0x291342(!![],_0x5bfa36(0x38a)+_0x33e802);}catch(_0x393d22){_0x291342(![],_0x5bfa36(0x1a6)+_0x33e802+_0x5bfa36(0x32b)+_0x393d22[_0x5bfa36(0x183)]+')');}const _0xdd0edf=await new Promise(_0x3520cf=>{const _0x48113a=_0x5bfa36,_0x56c6ed=_0x254d29['createServer']();_0x56c6ed[_0x48113a(0x15b)]('error',()=>_0x3520cf(![])),_0x56c6ed[_0x48113a(0x15b)](_0x48113a(0x3be),()=>{_0x56c6ed['close'](),_0x3520cf(!![]);}),_0x56c6ed[_0x48113a(0x31f)](_0x3765c7['port'],'127.0.0.1');});_0x291342(_0xdd0edf,_0x5bfa36(0x324)+_0x3765c7['port']+'\x20'+(_0xdd0edf?'available':_0x5bfa36(0x391)));const _0x2f7798=_0x3b3cc7[_0x5bfa36(0x2a6)](_0x5bfa36(0x26f));if(_0x3fdfe1[_0x5bfa36(0x205)](_0x2f7798))try{JSON[_0x5bfa36(0x421)](_0x3fdfe1[_0x5bfa36(0x3b7)](_0x2f7798,'utf8')['replace'](/^\uFEFF/,'')),_0x291342(!![],_0x5bfa36(0x239)+_0x2f7798);}catch(_0x5745de){_0x291342(![],_0x5bfa36(0x2e9)+_0x5745de[_0x5bfa36(0x183)]);}else _0x291342(!![],_0x5bfa36(0x400));console['log'](''),_0x5232ef?console['log'](_0x5bfa36(0x15a)):(console[_0x5bfa36(0x352)](_0x5bfa36(0x30b)),process[_0x5bfa36(0x2a5)](0x1));}async function _0xcce4a4(){const _0x2d3bd4=_0x175560,_0x3e9ec2=_0x3b3cc7[_0x2d3bd4(0x2a6)](_0x2d3bd4(0x26f));!_0x3fdfe1[_0x2d3bd4(0x205)](_0x3e9ec2)?(_0x3fdfe1[_0x2d3bd4(0x14a)](_0x3e9ec2,JSON['stringify']({'port':0x2124,'path':_0x2d3bd4(0x16d),'logLevel':_0x2d3bd4(0x196),'noRepl':![],'noAdmin':![]},null,0x2)+'\x0a'),console[_0x2d3bd4(0x352)](_0x2d3bd4(0x3b0))):console[_0x2d3bd4(0x352)](_0x2d3bd4(0x3cb));const _0x4c22ae=_0x3b3cc7[_0x2d3bd4(0x2a6)](_0x2d3bd4(0x16d));!_0x3fdfe1[_0x2d3bd4(0x205)](_0x4c22ae)?(_0x3fdfe1['mkdirSync'](_0x4c22ae,{'recursive':!![]}),console[_0x2d3bd4(0x352)](_0x2d3bd4(0x1ef))):console[_0x2d3bd4(0x352)]('[okdb]\x20./okdb-data\x20already\x20exists\x20—\x20skipping'),console['log']('\x0a\x20\x20Run\x20okdb\x20to\x20start\x20the\x20server.\x0a');}async function _0x27902b(_0x1f8592){const _0x4f7ed1=_0x175560,_0x55601f=_0x3b3cc7[_0x4f7ed1(0x2a6)](_0x1f8592[_0x4f7ed1(0x292)]);if(!_0x3fdfe1[_0x4f7ed1(0x205)](_0x55601f)){console[_0x4f7ed1(0x352)]('[okdb]\x20nothing\x20to\x20reset\x20—\x20'+_0x55601f+_0x4f7ed1(0x383));return;}const _0x537c9a=require$$0$2,_0x560644=_0x537c9a[_0x4f7ed1(0x2f0)]({'input':process[_0x4f7ed1(0x295)],'output':process[_0x4f7ed1(0x15d)]}),_0x1278d9=await new Promise(_0x56a7eb=>_0x560644[_0x4f7ed1(0x15c)](_0x4f7ed1(0x313)+_0x55601f+_0x4f7ed1(0x157),_0x56a7eb));_0x560644[_0x4f7ed1(0x1dc)](),console['log']('');if(_0x1278d9[_0x4f7ed1(0x374)]()[_0x4f7ed1(0x41e)]()!==_0x4f7ed1(0x1c0)){console[_0x4f7ed1(0x352)](_0x4f7ed1(0x2a9));return;}_0x3fdfe1[_0x4f7ed1(0x41b)](_0x55601f,{'recursive':!![],'force':!![]}),console[_0x4f7ed1(0x352)](_0x4f7ed1(0x1a4)+_0x55601f+'\x20deleted');}async function _0xaeeeb9(_0x525932,_0x4b2b96){const _0x50ef65=_0x175560,_0x20ab9a=require$$5,_0x328328=_0x3b3cc7[_0x50ef65(0x2a6)](_0x4b2b96['dbPath']);console[_0x50ef65(0x352)]('[okdb]\x20opening\x20'+_0x328328+'…');const _0x542679=new _0x20ab9a(_0x328328,_0x4b2b96[_0x50ef65(0x363)]?{'encryptionKey':_0x4b2b96['key']}:{});await _0x542679[_0x50ef65(0x31c)](),console[_0x50ef65(0x352)](_0x50ef65(0x158)+_0x525932+'…');const {envs:_0x1e0c90}=await _0x542679[_0x50ef65(0x422)][_0x50ef65(0x17b)](_0x525932);for(const _0x1e779e of _0x1e0c90){const _0x10fc86=_0x1e779e[_0x50ef65(0x13c)]>0x0?'\x20\x20('+(_0x1e779e[_0x50ef65(0x13c)]/0x400/0x400)[_0x50ef65(0x389)](0x2)+_0x50ef65(0x22a)+(_0x1e779e['sizeAfter']/0x400/0x400)[_0x50ef65(0x389)](0x2)+_0x50ef65(0x264):'';console['log'](_0x50ef65(0x3ec)+_0x1e779e['name']+_0x50ef65(0x39c)+_0x1e779e[_0x50ef65(0x1ff)]+_0x10fc86);}await _0x542679['close'](),console[_0x50ef65(0x352)](_0x50ef65(0x2d5));}async function _0x9cb4d5(_0x16826e,_0x32a655,_0x28e65a){const _0x1ebee5=_0x175560,_0x565f22=require$$5,_0x2b54d7=_0x3b3cc7[_0x1ebee5(0x2a6)](_0x32a655['dbPath']),_0x388b65=_0x28e65a[_0x1ebee5(0x2c1)]??'default',_0x594e19=_0x28e65a[_0x1ebee5(0x184)]?_0x28e65a[_0x1ebee5(0x184)][_0x1ebee5(0x265)](',')[_0x1ebee5(0x152)](_0x572ca6=>_0x572ca6[_0x1ebee5(0x374)]()):null;console[_0x1ebee5(0x352)](_0x1ebee5(0x310)+_0x2b54d7+'…');const _0x395f09=new _0x565f22(_0x2b54d7,_0x32a655[_0x1ebee5(0x363)]?{'encryptionKey':_0x32a655[_0x1ebee5(0x363)]}:{});await _0x395f09[_0x1ebee5(0x31c)](),console[_0x1ebee5(0x352)](_0x1ebee5(0x307)+_0x388b65+_0x1ebee5(0x364)+_0x16826e+'…');const _0x40e637=await _0x395f09[_0x1ebee5(0x422)][_0x1ebee5(0x195)](_0x16826e,{'envName':_0x388b65,'types':_0x594e19,'includeChanges':!!_0x28e65a[_0x1ebee5(0x1f8)]});console['log'](_0x1ebee5(0x3c6)+_0x40e637[_0x1ebee5(0x184)]+_0x1ebee5(0x31a)+_0x40e637[_0x1ebee5(0x42e)]+_0x1ebee5(0x3d8)+_0x40e637[_0x1ebee5(0x1f8)]);if(_0x28e65a[_0x1ebee5(0x3cf)]){const _0x5e0b5f=_0x3b3cc7[_0x1ebee5(0x277)](_0x3b3cc7[_0x1ebee5(0x412)](_0x16826e),_0x1ebee5(0x3cf));process[_0x1ebee5(0x15d)]['write']('[okdb]\x20exporting\x20blobs…');const {count:_0xf1b4bf,bytes:_0x32cdc8}=await _0x395f09[_0x1ebee5(0x422)][_0x1ebee5(0x171)](_0x5e0b5f);console['log'](_0x1ebee5(0x179)+_0x5e0b5f+_0x1ebee5(0x32b)+_0xf1b4bf+_0x1ebee5(0x1b7)+(_0xf1b4bf!==0x1?'s':'')+',\x20'+(_0x32cdc8/0x400/0x400)['toFixed'](0x2)+_0x1ebee5(0x264));}await _0x395f09[_0x1ebee5(0x1dc)](),console['log'](_0x1ebee5(0x2c8));}async function _0x42a4a6(_0xe68573,_0x2b241f,_0x277047){const _0x33c48a=_0x175560,_0x371c36=require$$5,_0x35d7f9=_0x3b3cc7['resolve'](_0x2b241f[_0x33c48a(0x292)]),_0x126d70=_0x277047[_0x33c48a(0x2c1)]??null,_0x18e1bb=_0x277047[_0x33c48a(0x184)]?_0x277047[_0x33c48a(0x184)][_0x33c48a(0x265)](',')['map'](_0x3484e9=>_0x3484e9[_0x33c48a(0x374)]()):null,_0x5b64dd=!!_0x277047[_0x33c48a(0x28d)];console[_0x33c48a(0x352)](_0x33c48a(0x310)+_0x35d7f9+'…');const _0x2a4c26=new _0x371c36(_0x35d7f9,_0x2b241f['key']?{'encryptionKey':_0x2b241f['key']}:{});await _0x2a4c26[_0x33c48a(0x31c)](),console[_0x33c48a(0x352)]('[okdb]\x20importing\x20'+_0xe68573+'…');const _0x565a2c=await _0x2a4c26[_0x33c48a(0x422)][_0x33c48a(0x207)](_0xe68573,{'envName':_0x126d70,'types':_0x18e1bb,'dropExisting':_0x5b64dd,'includeChanges':!!_0x277047[_0x33c48a(0x1f8)],'onProgress':({type:_0x470e58,count:_0x29e57b})=>{const _0x369e62=_0x33c48a;process[_0x369e62(0x15d)][_0x369e62(0x286)](_0x369e62(0x3db)+_0x470e58+':\x20'+_0x29e57b+_0x369e62(0x385));}});process[_0x33c48a(0x15d)]['write']('\x0a'),console[_0x33c48a(0x352)](_0x33c48a(0x3d7)+_0x565a2c[_0x33c48a(0x184)]+_0x33c48a(0x31a)+_0x565a2c[_0x33c48a(0x42e)]+'\x20\x20changes='+_0x565a2c[_0x33c48a(0x1f8)]);if(_0x277047[_0x33c48a(0x3cf)]){const _0x1f996e=_0x3b3cc7['join'](_0x3b3cc7['dirname'](_0xe68573),_0x33c48a(0x3cf));if(_0x3fdfe1['existsSync'](_0x1f996e)){const {imported:_0x284c88,skipped:_0x3149d2}=await _0x2a4c26['migrate'][_0x33c48a(0x3e0)](_0x1f996e);console[_0x33c48a(0x352)](_0x33c48a(0x165)+_0x284c88+_0x33c48a(0x36f)+_0x3149d2);}}await _0x2a4c26['close'](),console[_0x33c48a(0x352)](_0x33c48a(0x27a));}async function _0xdb8390(_0x51a5f8,_0x49675f){const _0xe1633b=_0x175560;_0x49675f[_0xe1633b(0x3ac)]&&!_0x49675f[_0xe1633b(0x2f8)]&&(console[_0xe1633b(0x23d)](_0xe1633b(0x24c)),process[_0xe1633b(0x2a5)](0x1));const _0xc4d5e0=_0x49675f[_0xe1633b(0x208)]?_0x49675f[_0xe1633b(0x208)][_0xe1633b(0x265)](',')['map'](_0x97332f=>_0x97332f[_0xe1633b(0x374)]())['filter'](Boolean):[];let _0x20d0e4={};if(_0x49675f[_0xe1633b(0x2fd)])try{_0x20d0e4=JSON['parse'](_0x49675f[_0xe1633b(0x2fd)]);if(typeof _0x20d0e4!==_0xe1633b(0x1c8)||Array[_0xe1633b(0x2d2)](_0x20d0e4)||_0x20d0e4===null)throw new Error();}catch{console[_0xe1633b(0x23d)](_0xe1633b(0x13e)),process[_0xe1633b(0x2a5)](0x1);}const _0x320812=require$$5,{randomToken:_0x394be6,hashToken:_0x19f89e,hashPassword:_0x780b89}=requireOkdbAuthTokens(),_0x597bf8=require$$0,_0x2078bd=_0x3b3cc7[_0xe1633b(0x2a6)](_0x51a5f8[_0xe1633b(0x292)]),_0x569332=new _0x320812(_0x2078bd,_0x51a5f8[_0xe1633b(0x363)]?{'encryptionKey':_0x51a5f8[_0xe1633b(0x363)]}:{});await _0x569332[_0xe1633b(0x31c)]();try{await _0x569332[_0xe1633b(0x19e)][_0xe1633b(0x199)]();if(_0x49675f[_0xe1633b(0x2f8)]){const _0x391f53=await _0x569332[_0xe1633b(0x19e)]['_lookupByName'](_0x49675f['name']);_0x391f53&&(console[_0xe1633b(0x23d)](_0xe1633b(0x243)+_0x49675f[_0xe1633b(0x2f8)]+'\x22\x20already\x20exists'),process['exit'](0x1));}const _0x491238=_0x394be6(0x20),_0x1d3e4e=_0x19f89e(_0x491238),_0x2c3526=_0x49675f['password']?await _0x780b89(_0x49675f['password']):null,_0x5c5b4b=_0x597bf8[_0xe1633b(0x253)](),_0x1cabe8={'tokenHash':_0x1d3e4e,'name':_0x49675f[_0xe1633b(0x2f8)]||null,'passwordHash':_0x2c3526,'label':_0x49675f[_0xe1633b(0x2fe)]||null,'permissions':_0xc4d5e0,'grants':_0x20d0e4,'createdAt':Date[_0xe1633b(0x3d3)](),'lastUsedAt':null},_0x39a859=_0x49675f[_0xe1633b(0x408)]?{'ttl':Number(_0x49675f['ttl'])}:undefined;await _0x569332['_systemEnv'][_0xe1633b(0x16a)](_0xe1633b(0x302),_0x5c5b4b,_0x1cabe8,_0x39a859),console[_0xe1633b(0x352)](_0xe1633b(0x32f)),console['log'](_0xe1633b(0x37f)+_0x5c5b4b),console[_0xe1633b(0x352)]('\x20\x20\x20\x20name:\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x49675f[_0xe1633b(0x2f8)]||_0xe1633b(0x401))),console['log']('\x20\x20\x20\x20label:\x20\x20\x20\x20\x20\x20\x20'+(_0x49675f[_0xe1633b(0x2fe)]||_0xe1633b(0x401))),console['log'](_0xe1633b(0x3e1)+(_0xc4d5e0[_0xe1633b(0x277)](',\x20')||_0xe1633b(0x3ae))),console['log'](_0xe1633b(0x3e5)),console[_0xe1633b(0x352)]('\x20\x20\x20\x20'+_0x491238+'\x0a');}finally{await _0x569332[_0xe1633b(0x1dc)]();}}async function _0x528ec9(_0x7d3ed3){const _0xbbd1cd=_0x175560,_0x5ac0dd=require$$5,_0x1a5b87=_0x3b3cc7[_0xbbd1cd(0x2a6)](_0x7d3ed3[_0xbbd1cd(0x292)]),_0x9811d5=new _0x5ac0dd(_0x1a5b87,_0x7d3ed3['key']?{'encryptionKey':_0x7d3ed3[_0xbbd1cd(0x363)]}:{});await _0x9811d5['open']();try{const _0x2287d0=_0x9811d5[_0xbbd1cd(0x3e7)];if(!_0x2287d0||!_0x2287d0[_0xbbd1cd(0x1c4)](_0xbbd1cd(0x302))){console[_0xbbd1cd(0x352)]('No\x20tokens.');return;}const _0x58581e=[];for(const {key:_0x517efb,value:_0x170750}of _0x2287d0['getRange'](_0xbbd1cd(0x302))){_0x58581e[_0xbbd1cd(0x197)]({'id':_0x517efb,'name':_0x170750[_0xbbd1cd(0x2f8)]||_0xbbd1cd(0x401),'label':_0x170750[_0xbbd1cd(0x2fe)]||_0xbbd1cd(0x401),'permissions':Array[_0xbbd1cd(0x2d2)](_0x170750[_0xbbd1cd(0x208)])?_0x170750['permissions'][_0xbbd1cd(0x277)](','):'','created':_0x170750[_0xbbd1cd(0x237)]?new Date(_0x170750['createdAt'])[_0xbbd1cd(0x13d)]()[_0xbbd1cd(0x297)](0x0,0xa):''});}if(_0x58581e[_0xbbd1cd(0x2de)]===0x0){console['log'](_0xbbd1cd(0x18e));return;}const _0xde7aca=!process[_0xbbd1cd(0x15d)][_0xbbd1cd(0x39d)]||process[_0xbbd1cd(0x15d)][_0xbbd1cd(0x39d)]>=0x64,_0x3cf8c9=_0xde7aca?0x24:0xa,_0x443822=['ID'[_0xbbd1cd(0x368)](_0x3cf8c9),_0xbbd1cd(0x1d4)[_0xbbd1cd(0x368)](0x10),_0xbbd1cd(0x176)[_0xbbd1cd(0x368)](0x14),'PERMISSIONS'[_0xbbd1cd(0x368)](0x14),'CREATED'][_0xbbd1cd(0x277)]('\x20\x20');console[_0xbbd1cd(0x352)]('\x0a'+_0x443822),console[_0xbbd1cd(0x352)]('-'[_0xbbd1cd(0x2b8)](_0x443822['length']));for(const _0x914f0 of _0x58581e){const _0x21a88e=_0xde7aca?_0x914f0['id']:_0x914f0['id'][_0xbbd1cd(0x297)](0x0,0x8)+'…';console[_0xbbd1cd(0x352)]([_0x21a88e[_0xbbd1cd(0x368)](_0x3cf8c9),_0x914f0[_0xbbd1cd(0x2f8)][_0xbbd1cd(0x297)](0x0,0x10)[_0xbbd1cd(0x368)](0x10),_0x914f0[_0xbbd1cd(0x2fe)]['slice'](0x0,0x14)[_0xbbd1cd(0x368)](0x14),_0x914f0[_0xbbd1cd(0x208)][_0xbbd1cd(0x297)](0x0,0x14)[_0xbbd1cd(0x368)](0x14),_0x914f0[_0xbbd1cd(0x1e9)]][_0xbbd1cd(0x277)]('\x20\x20'));}console[_0xbbd1cd(0x352)]('');}finally{await _0x9811d5['close']();}}async function _0x3632ae(_0x1c4701,_0x19d18c){const _0x540261=_0x175560;!_0x1c4701&&(console['error']('[okdb]\x20error:\x20revoke\x20requires\x20an\x20id\x20argument'),process[_0x540261(0x2a5)](0x1));const _0x177897=require$$5,_0x3e817d=_0x3b3cc7[_0x540261(0x2a6)](_0x19d18c[_0x540261(0x292)]),_0xa7cebe=new _0x177897(_0x3e817d,_0x19d18c['key']?{'encryptionKey':_0x19d18c[_0x540261(0x363)]}:{});await _0xa7cebe[_0x540261(0x31c)]();try{const _0x1c2682=_0xa7cebe['_systemEnv'];(!_0x1c2682||!_0x1c2682[_0x540261(0x1c4)](_0x540261(0x302)))&&(console[_0x540261(0x23d)]('[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22'+_0x1c4701+'\x22'),process[_0x540261(0x2a5)](0x1));let _0x271a0a=null,_0x40e735=null;const _0x44b5b5=_0x1c2682['get']('~tokens',_0x1c4701);if(_0x44b5b5)_0x271a0a=_0x1c4701,_0x40e735=_0x44b5b5;else{const _0x18c757=[];for(const {key:_0x40f3c4,value:_0x24fb80}of _0x1c2682[_0x540261(0x325)](_0x540261(0x302))){if(_0x40f3c4[_0x540261(0x405)](_0x1c4701))_0x18c757[_0x540261(0x197)]({'key':_0x40f3c4,'value':_0x24fb80});}_0x18c757[_0x540261(0x2de)]===0x0&&(console[_0x540261(0x23d)](_0x540261(0x33b)+_0x1c4701+'\x22'),process[_0x540261(0x2a5)](0x1));if(_0x18c757[_0x540261(0x2de)]>0x1){console[_0x540261(0x23d)]('[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22'+_0x1c4701+_0x540261(0x177)+_0x18c757[_0x540261(0x2de)]+'\x20tokens:');for(const _0x2ad024 of _0x18c757){console[_0x540261(0x23d)]('\x20\x20'+_0x2ad024[_0x540261(0x363)]+'\x20\x20(name:\x20'+(_0x2ad024['value'][_0x540261(0x2f8)]||_0x540261(0x401))+')');}process[_0x540261(0x2a5)](0x1);}_0x271a0a=_0x18c757[0x0][_0x540261(0x363)],_0x40e735=_0x18c757[0x0]['value'];}await _0x1c2682['remove']('~tokens',_0x271a0a),console[_0x540261(0x352)]('\x20\x20✓\x20Revoked\x20token\x20'+_0x271a0a+_0x540261(0x399)+(_0x40e735['name']||_0x540261(0x401))+_0x540261(0x337)+(_0x40e735['label']||_0x540261(0x401))+')');}finally{await _0xa7cebe['close']();}}function _0x31633e(_0x1967ea,_0x435592){const _0x266e86=_0x175560;if(!_0x1967ea[_0x266e86(0x3b8)])return _0x266e86(0x13a);const _0x363540=_0x1967ea[_0x266e86(0x2e6)];if(!_0x363540)return'active';if(_0x435592>_0x363540)return _0x266e86(0x3b5);return _0x266e86(0x141);}function _0x4531f1(_0x664cd8){const _0x2fb5d9=_0x175560;if(!_0x664cd8||typeof _0x664cd8!==_0x2fb5d9(0x1c8))return'';const _0x110653=Object['entries'](_0x664cd8)[_0x2fb5d9(0x3f9)](([,_0x3c8e5a])=>_0x3c8e5a)['map'](([_0x4cb671])=>_0x4cb671);if(_0x110653['length']===0x0)return _0x2fb5d9(0x3ae);if(_0x110653[_0x2fb5d9(0x2de)]<=0x3)return _0x110653[_0x2fb5d9(0x277)]('\x20');return _0x110653[_0x2fb5d9(0x297)](0x0,0x3)[_0x2fb5d9(0x277)]('\x20')+('\x20+'+(_0x110653[_0x2fb5d9(0x2de)]-0x3));}async function _0x453718(_0x42d760){const _0x57a068=_0x175560,_0x216534=require$$5,_0x47d270=requireOkdbLicenseCodec(),{_C:_0xce0563}=requireOkdbLicense(),_0x12abbe=_0x3b3cc7['resolve'](_0x42d760[_0x57a068(0x292)]),_0x10cae4=new _0x216534(_0x12abbe,_0x42d760[_0x57a068(0x363)]?{'encryptionKey':_0x42d760[_0x57a068(0x363)]}:{});await _0x10cae4[_0x57a068(0x31c)]();try{const _0x46c14f=_0x10cae4['_systemEnv'],_0x588986=_0x46c14f?.['db']?.[_0x57a068(0x336)]?.(_0x57a068(0x241))??0x0,_0x528862=[..._0x10cae4[_0x57a068(0x293)][_0x57a068(0x153)]()][_0x57a068(0x3f9)](_0x1162ff=>!_0x1162ff[_0x57a068(0x405)]('~'))[_0x57a068(0x2de)],_0x4ca4b3=_0x10cae4[_0x57a068(0x252)]?.[_0x57a068(0x34b)];if(_0x4ca4b3){const _0x27b886=_0x4ca4b3['_isFree']===!![],_0x19babc=_0x27b886?_0x57a068(0x3e8):_0x10cae4[_0x57a068(0x252)][_0x57a068(0x141)]?.[_0x57a068(0x143)]||_0x57a068(0x21a);console[_0x57a068(0x352)](''),console[_0x57a068(0x352)](_0x57a068(0x1cb)+_0x19babc);const _0x197791=_0x4ca4b3['limits']||{};if(_0x197791[_0x57a068(0x314)]){const _0x2dde60=Math[_0x57a068(0x29f)](_0x588986/_0x197791[_0x57a068(0x314)]*0x64);console[_0x57a068(0x352)](_0x57a068(0x22e)+_0x588986[_0x57a068(0x3fa)]()+_0x57a068(0x2c9)+_0x197791['maxWrites'][_0x57a068(0x3fa)]()+'\x20\x20('+_0x2dde60+'%)');}else console[_0x57a068(0x352)](_0x57a068(0x22e)+_0x588986['toLocaleString']());_0x197791[_0x57a068(0x343)]?console['log'](_0x57a068(0x426)+_0x528862+'\x20/\x20'+_0x197791[_0x57a068(0x343)]):console[_0x57a068(0x352)](_0x57a068(0x426)+_0x528862),_0xce0563?.[_0x57a068(0x29a)]&&console[_0x57a068(0x352)](_0x57a068(0x1ce)+_0xce0563[_0x57a068(0x29a)]+'\x20\x20(licenses\x20must\x20be\x20signed\x20by\x20the\x20matching\x20private\x20key)');}if(!_0x46c14f||!_0x46c14f[_0x57a068(0x1c4)]('~licenses')){console[_0x57a068(0x352)](''),console[_0x57a068(0x352)](_0x57a068(0x388)),console[_0x57a068(0x352)]('');return;}const _0x58bcb0=[],_0x24123d=Date[_0x57a068(0x3d3)](),_0x724630=_0x10cae4['id'],_0x50d2ee='__OKDB_PUB_FINGERPRINT__';for(const {key:_0x26f0f7,value:_0x1408d6}of _0x46c14f['getRange']('~licenses')){const _0x235202=_0x1408d6[_0x57a068(0x3bd)]?Buffer['from'](_0x1408d6[_0x57a068(0x3bd)],_0x57a068(0x40f)):Buffer[_0x57a068(0x3ee)](0x8);let _0x35f9c8='';try{_0x35f9c8=_0x47d270[_0x57a068(0x330)](_0x724630,_0x235202,_0x50d2ee)[_0x57a068(0x375)];}catch{}_0x58bcb0[_0x57a068(0x197)]({'id':_0x26f0f7,'licensee':_0x1408d6['licensee']||'','expires':_0x1408d6[_0x57a068(0x2e6)]?new Date(_0x1408d6['expiresAt'])['toISOString']()[_0x57a068(0x297)](0x0,0xa):'','features':_0x4531f1(_0x1408d6[_0x57a068(0x419)]),'pin':_0x35f9c8,'status':_0x31633e(_0x1408d6,_0x24123d)});}if(_0x58bcb0[_0x57a068(0x2de)]===0x0){console['log'](''),console['log'](_0x57a068(0x388)),console[_0x57a068(0x352)]('');return;}const _0x423733=['\x20\x20'+'ID'['padEnd'](0xe),'LICENSEE'['padEnd'](0xe),_0x57a068(0x1f5)[_0x57a068(0x368)](0xc),_0x57a068(0x259)[_0x57a068(0x368)](0x1e),_0x57a068(0x180)[_0x57a068(0x368)](0xa),_0x57a068(0x3b1)][_0x57a068(0x277)]('\x20');console[_0x57a068(0x352)]('\x0a'+_0x423733);for(const _0x1f3d16 of _0x58bcb0){const _0x4bec00=_0x1f3d16['id'][_0x57a068(0x297)](0x0,0x8)+'…';console[_0x57a068(0x352)](['\x20\x20'+_0x4bec00[_0x57a068(0x368)](0xe),_0x1f3d16['licensee'][_0x57a068(0x297)](0x0,0xe)['padEnd'](0xe),_0x1f3d16[_0x57a068(0x3a3)]['padEnd'](0xc),_0x1f3d16[_0x57a068(0x419)]['slice'](0x0,0x1e)[_0x57a068(0x368)](0x1e),_0x1f3d16[_0x57a068(0x375)][_0x57a068(0x368)](0xa),_0x1f3d16[_0x57a068(0x166)]][_0x57a068(0x277)]('\x20'));}console[_0x57a068(0x352)]('');}finally{await _0x10cae4[_0x57a068(0x1dc)]();}}async function _0x3f84f4(_0x3bbe6b,_0x31dc44){const _0x38dfd0=_0x175560,_0x5f9d4d=require$$5,_0x3f0974=requireOkdbLicenseCodec();let _0x3bc109=_0x3bbe6b;(_0x3f0974[_0x38dfd0(0x406)](_0x3bbe6b)==='path'||_0x3fdfe1[_0x38dfd0(0x205)](_0x3bbe6b)&&_0x3fdfe1[_0x38dfd0(0x321)](_0x3bbe6b)[_0x38dfd0(0x17f)]())&&(_0x3bc109=_0x3fdfe1[_0x38dfd0(0x3b7)](_0x3bbe6b,_0x38dfd0(0x378))[_0x38dfd0(0x374)]());const _0x4f948a=_0x3b3cc7[_0x38dfd0(0x2a6)](_0x31dc44['dbPath']),_0x294574=new _0x5f9d4d(_0x4f948a,_0x31dc44[_0x38dfd0(0x363)]?{'encryptionKey':_0x31dc44[_0x38dfd0(0x363)]}:{});await _0x294574[_0x38dfd0(0x31c)]();try{!_0x294574[_0x38dfd0(0x252)]&&(console[_0x38dfd0(0x23d)](_0x38dfd0(0x2b1)),process[_0x38dfd0(0x2a5)](0x1));let _0x3e63fb;try{_0x3e63fb=await _0x294574[_0x38dfd0(0x252)][_0x38dfd0(0x38d)](_0x3bc109);}catch(_0x29726c){console[_0x38dfd0(0x23d)](_0x38dfd0(0x359)+_0x29726c[_0x38dfd0(0x183)]),process[_0x38dfd0(0x2a5)](0x1);}const _0x57453c=_0x294574['_license'][_0x38dfd0(0x240)](),_0x598222=_0x57453c[_0x38dfd0(0x185)](_0xb9e1e7=>_0xb9e1e7[_0x38dfd0(0x2b2)]===_0x3e63fb['id'])?.[_0x38dfd0(0x375)]||'',_0x3f1abe=Object[_0x38dfd0(0x20f)](_0x3e63fb[_0x38dfd0(0x419)]||{})[_0x38dfd0(0x3f9)](([,_0x45ee70])=>_0x45ee70)[_0x38dfd0(0x152)](([_0x665c7d])=>_0x665c7d),_0x47fbfb=_0x3e63fb[_0x38dfd0(0x37d)]||{},_0x289a57=[_0x47fbfb[_0x38dfd0(0x343)]?_0x38dfd0(0x215)+_0x47fbfb['envs']:null,_0x47fbfb[_0x38dfd0(0x1ba)]?_0x38dfd0(0x2a3)+_0x47fbfb[_0x38dfd0(0x1ba)]:null,_0x47fbfb['syncPeers']?_0x38dfd0(0x14e)+_0x47fbfb['syncPeers']:null,_0x47fbfb[_0x38dfd0(0x314)]?_0x38dfd0(0x1ee)+_0x47fbfb[_0x38dfd0(0x314)][_0x38dfd0(0x3fa)]():null]['filter'](Boolean)[_0x38dfd0(0x277)]('\x20\x20'),_0x3f60f2=_0x3e63fb[_0x38dfd0(0x154)]===_0x3f0974['LICENSE_TYPE_OPEN'];console[_0x38dfd0(0x352)]('\x0a\x20\x20✓\x20License\x20added'),console[_0x38dfd0(0x352)](_0x38dfd0(0x41f)+_0x3e63fb['id']),console[_0x38dfd0(0x352)](_0x38dfd0(0x3b9)+_0x3e63fb[_0x38dfd0(0x143)]),console['log'](_0x38dfd0(0x35d)+new Date(_0x3e63fb[_0x38dfd0(0x2e6)])[_0x38dfd0(0x13d)]()[_0x38dfd0(0x297)](0x0,0xa)),console[_0x38dfd0(0x352)](_0x38dfd0(0x318)+(_0x3f1abe[_0x38dfd0(0x277)](',\x20')||'(none)'));if(_0x289a57)console[_0x38dfd0(0x352)](_0x38dfd0(0x188)+_0x289a57);_0x3f60f2?(console[_0x38dfd0(0x352)](_0x38dfd0(0x2a1)),console[_0x38dfd0(0x352)]('')):(console[_0x38dfd0(0x352)]('\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20'+_0x598222),console[_0x38dfd0(0x352)](_0x38dfd0(0x2ca)),console[_0x38dfd0(0x352)](''),console[_0x38dfd0(0x352)](_0x38dfd0(0x1b8)),console['log'](_0x38dfd0(0x27b)+_0x598222+_0x38dfd0(0x3fe)),console[_0x38dfd0(0x352)](_0x38dfd0(0x1c6)),console['log'](_0x38dfd0(0x3bf)),console['log'](''));}finally{await _0x294574[_0x38dfd0(0x1dc)]();}}async function _0x5a3ccf(_0x84c420,_0xfeabd4){const _0x5e08de=_0x175560,_0x2678ab=require$$5,_0x49c1f1=_0x3b3cc7[_0x5e08de(0x2a6)](_0xfeabd4[_0x5e08de(0x292)]),_0x12f299=new _0x2678ab(_0x49c1f1,_0xfeabd4[_0x5e08de(0x363)]?{'encryptionKey':_0xfeabd4[_0x5e08de(0x363)]}:{});await _0x12f299['open']();try{!_0x12f299[_0x5e08de(0x252)]&&(console[_0x5e08de(0x23d)](_0x5e08de(0x2b1)),process['exit'](0x1));let _0x3467ff;try{_0x3467ff=await _0x12f299[_0x5e08de(0x252)]['activateLicense'](_0x84c420[_0x5e08de(0x374)]());}catch(_0x4b212f){console[_0x5e08de(0x23d)]('[okdb]\x20error:\x20'+_0x4b212f['message']),console[_0x5e08de(0x23d)](''),console[_0x5e08de(0x23d)]('\x20\x20Common\x20causes:'),console[_0x5e08de(0x23d)]('\x20\x20\x20\x20-\x20The\x20license\x20blob\x20has\x20not\x20been\x20added\x20yet\x20—\x20run\x20`okdb\x20license\x20<blob>`\x20first.'),console[_0x5e08de(0x23d)](_0x5e08de(0x3b4)),console[_0x5e08de(0x23d)](_0x5e08de(0x3c5)),console[_0x5e08de(0x23d)](''),process[_0x5e08de(0x2a5)](0x1);}console['log'](_0x5e08de(0x2a8)),console[_0x5e08de(0x352)]('\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x3467ff['id']),console[_0x5e08de(0x352)](_0x5e08de(0x3b9)+_0x3467ff[_0x5e08de(0x143)]),console[_0x5e08de(0x352)](_0x5e08de(0x35d)+new Date(_0x3467ff['expiresAt'])[_0x5e08de(0x13d)]()[_0x5e08de(0x297)](0x0,0xa)),console[_0x5e08de(0x352)]('\x20\x20\x20\x20status:\x20\x20\x20\x20active'),console[_0x5e08de(0x352)]('');}finally{await _0x12f299['close']();}}async function _0x53d84a(_0x457f07,_0x475cac){const _0x477a6c=_0x175560;!_0x457f07&&(console[_0x477a6c(0x23d)](_0x477a6c(0x26b)),process[_0x477a6c(0x2a5)](0x1));const _0x15b248=require$$5,_0x14ee99=requireOkdbLicenseCodec(),_0x1b7176=_0x3b3cc7[_0x477a6c(0x2a6)](_0x475cac['dbPath']),_0xd6c483=new _0x15b248(_0x1b7176,_0x475cac[_0x477a6c(0x363)]?{'encryptionKey':_0x475cac[_0x477a6c(0x363)]}:{});await _0xd6c483['open']();try{const _0x20fe5e=_0xd6c483['_systemEnv'];(!_0x20fe5e||!_0x20fe5e[_0x477a6c(0x1c4)](_0x477a6c(0x168)))&&(console[_0x477a6c(0x23d)]('[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22'+_0x457f07+'\x22'),process['exit'](0x1));let _0x3d1cc5=null,_0x4388f5=null;const _0x45b1bb=_0x20fe5e['get']('~licenses',_0x457f07);if(_0x45b1bb)_0x3d1cc5=_0x457f07,_0x4388f5=_0x45b1bb;else{const _0xb5bd7e=[];for(const {key:_0x415582,value:_0x550a7a}of _0x20fe5e[_0x477a6c(0x325)]('~licenses')){if(_0x415582[_0x477a6c(0x405)](_0x457f07))_0xb5bd7e['push']({'key':_0x415582,'value':_0x550a7a});}_0xb5bd7e['length']===0x0&&(console['error'](_0x477a6c(0x2c0)+_0x457f07+'\x22'),process[_0x477a6c(0x2a5)](0x1)),_0xb5bd7e['length']>0x1&&(console[_0x477a6c(0x23d)](_0x477a6c(0x1b2)+_0x457f07+_0x477a6c(0x177)+_0xb5bd7e['length']+'\x20licenses'),process[_0x477a6c(0x2a5)](0x1)),_0x3d1cc5=_0xb5bd7e[0x0][_0x477a6c(0x363)],_0x4388f5=_0xb5bd7e[0x0][_0x477a6c(0x1d2)];}const _0x5892f2=Date[_0x477a6c(0x3d3)](),_0x8b618c=_0x31633e(_0x4388f5,_0x5892f2),_0x1879ba=_0xd6c483['id'],_0x11deb1='__OKDB_PUB_FINGERPRINT__';let _0x1e2b53='';try{const _0x3910ea=Buffer[_0x477a6c(0x190)](_0x4388f5['_licenseHash'],'hex');_0x1e2b53=_0x14ee99[_0x477a6c(0x330)](_0x1879ba,_0x3910ea,_0x11deb1)[_0x477a6c(0x375)];}catch{}const _0x51be7e=_0x4388f5['features']?Object[_0x477a6c(0x20f)](_0x4388f5['features'])[_0x477a6c(0x3f9)](([,_0x282efc])=>_0x282efc)[_0x477a6c(0x152)](([_0x118e1c])=>_0x118e1c):[],_0x472ef1=_0x4388f5[_0x477a6c(0x37d)]||{},_0x3b25bf=_0x20fe5e?.['db']?.[_0x477a6c(0x336)]?.(_0x477a6c(0x241))??0x0,_0x5e968f=[..._0xd6c483[_0x477a6c(0x293)][_0x477a6c(0x153)]()][_0x477a6c(0x3f9)](_0x142087=>!_0x142087[_0x477a6c(0x405)]('~'))['length'];console[_0x477a6c(0x352)](_0x477a6c(0x2af)),console[_0x477a6c(0x352)](_0x477a6c(0x41f)+_0x3d1cc5),console[_0x477a6c(0x352)](_0x477a6c(0x3b9)+(_0x4388f5[_0x477a6c(0x143)]||'')),console[_0x477a6c(0x352)](_0x477a6c(0x35d)+(_0x4388f5[_0x477a6c(0x2e6)]?new Date(_0x4388f5[_0x477a6c(0x2e6)])[_0x477a6c(0x13d)]()['slice'](0x0,0xa):'')),console[_0x477a6c(0x352)](_0x477a6c(0x318)+(_0x51be7e[_0x477a6c(0x277)](',\x20')||_0x477a6c(0x3ae))),console[_0x477a6c(0x352)]('\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20'+_0x1e2b53),console[_0x477a6c(0x352)]('\x20\x20\x20\x20status:\x20\x20\x20\x20'+_0x8b618c),console['log'](_0x477a6c(0x234)+new Date(_0x4388f5[_0x477a6c(0x274)])[_0x477a6c(0x13d)]());if(_0x8b618c===_0x477a6c(0x141)){console['log'](''),console['log'](_0x477a6c(0x2b5));if(_0x472ef1[_0x477a6c(0x314)]){const _0x1624c5=Math[_0x477a6c(0x29f)](_0x3b25bf/_0x472ef1[_0x477a6c(0x314)]*0x64);console[_0x477a6c(0x352)](_0x477a6c(0x25c)+_0x3b25bf[_0x477a6c(0x3fa)]()+_0x477a6c(0x2c9)+_0x472ef1[_0x477a6c(0x314)][_0x477a6c(0x3fa)]()+_0x477a6c(0x32b)+_0x1624c5+'%)');}else console[_0x477a6c(0x352)](_0x477a6c(0x25c)+_0x3b25bf[_0x477a6c(0x3fa)]()+'\x20\x20(unlimited)');_0x472ef1[_0x477a6c(0x343)]?console['log'](_0x477a6c(0x22c)+_0x5e968f+'\x20/\x20'+_0x472ef1['envs']):console['log'](_0x477a6c(0x22c)+_0x5e968f+_0x477a6c(0x370));}console[_0x477a6c(0x352)]('');}finally{await _0xd6c483['close']();}}async function _0xaa3f45(_0x4ef5b9,_0x11f206){const _0x956f7b=_0x175560;!_0x4ef5b9&&(console[_0x956f7b(0x23d)](_0x956f7b(0x3f6)),process[_0x956f7b(0x2a5)](0x1));const _0x1fcf10=require$$5,_0x4b1452=_0x3b3cc7[_0x956f7b(0x2a6)](_0x11f206[_0x956f7b(0x292)]),_0x117c23=new _0x1fcf10(_0x4b1452,_0x11f206[_0x956f7b(0x363)]?{'encryptionKey':_0x11f206['key']}:{});await _0x117c23[_0x956f7b(0x31c)]();try{const _0x3cc019=_0x117c23[_0x956f7b(0x3e7)];(!_0x3cc019||!_0x3cc019[_0x956f7b(0x1c4)](_0x956f7b(0x168)))&&(console[_0x956f7b(0x23d)]('[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22'+_0x4ef5b9+'\x22'),process[_0x956f7b(0x2a5)](0x1));let _0x1cff8c=null,_0x1cf3c3=null;const _0x3cd517=_0x3cc019[_0x956f7b(0x336)](_0x956f7b(0x168),_0x4ef5b9);if(_0x3cd517)_0x1cff8c=_0x4ef5b9,_0x1cf3c3=_0x3cd517;else{const _0x1ffd5e=[];for(const {key:_0x143a62,value:_0x9ed813}of _0x3cc019[_0x956f7b(0x325)](_0x956f7b(0x168))){if(_0x143a62[_0x956f7b(0x405)](_0x4ef5b9))_0x1ffd5e[_0x956f7b(0x197)]({'key':_0x143a62,'value':_0x9ed813});}_0x1ffd5e['length']===0x0&&(console[_0x956f7b(0x23d)](_0x956f7b(0x2c0)+_0x4ef5b9+'\x22'),process[_0x956f7b(0x2a5)](0x1)),_0x1ffd5e['length']>0x1&&(console[_0x956f7b(0x23d)](_0x956f7b(0x1b2)+_0x4ef5b9+_0x956f7b(0x177)+_0x1ffd5e[_0x956f7b(0x2de)]+'\x20licenses'),process[_0x956f7b(0x2a5)](0x1)),_0x1cff8c=_0x1ffd5e[0x0]['key'],_0x1cf3c3=_0x1ffd5e[0x0][_0x956f7b(0x1d2)];}await _0x3cc019[_0x956f7b(0x18f)](_0x956f7b(0x168),_0x1cff8c),console[_0x956f7b(0x352)]('\x20\x20✓\x20Removed\x20license\x20'+_0x1cff8c+_0x956f7b(0x3c9)+(_0x1cf3c3[_0x956f7b(0x143)]||_0x956f7b(0x401))+')');}finally{await _0x117c23[_0x956f7b(0x1dc)]();}}async function _0x9faea9(_0xc7d7bd,_0x5dbce9,_0x1b3e08){const _0x5142a6=_0x175560;!_0xc7d7bd&&(console['error'](_0x5142a6(0x3a9)),process[_0x5142a6(0x2a5)](0x1));!_0x1b3e08[_0x5142a6(0x2ec)]&&!(_0x1b3e08[_0x5142a6(0x27c)]&&_0x1b3e08[_0x5142a6(0x3ac)])&&(console[_0x5142a6(0x23d)](_0x5142a6(0x3a6)),process[_0x5142a6(0x2a5)](0x1));const _0x2bbc7c=_0x1b3e08[_0x5142a6(0x2dc)]||_0x5dbce9['sync']?.['address'];!_0x2bbc7c&&(console[_0x5142a6(0x23d)](_0x5142a6(0x238)+_0x5142a6(0x230)+_0x5142a6(0x18d)),process['exit'](0x1));const _0xfacec1=require$$5,_0x434628=new _0xfacec1(_0x5dbce9[_0x5142a6(0x292)],{'sync':{'address':_0x2bbc7c,'auto_reconcile':![]}});await _0x434628[_0x5142a6(0x31c)]();try{const _0x1a84b0=_0x434628['_systemEnv'];if(_0x1a84b0&&_0x1a84b0[_0x5142a6(0x1c4)](_0x5142a6(0x302))){let _0x4e480b=![];for(const _0x235cc1 of _0x1a84b0[_0x5142a6(0x325)](_0x5142a6(0x302))){_0x4e480b=!![];break;}_0x4e480b&&console[_0x5142a6(0x352)](_0x5142a6(0x319)+'\x20\x20after\x20sync.\x20Duplicate\x20names\x20will\x20surface\x20as\x20ambiguous\x20logins\x20to\x20clean\x20up.');}console[_0x5142a6(0x352)](_0x5142a6(0x42d)+_0xc7d7bd+'…'),await _0x434628['sync'][_0x5142a6(0x277)](_0xc7d7bd[_0x5142a6(0x282)](/\/+$/,''),{'token':_0x1b3e08[_0x5142a6(0x2ec)],'username':_0x1b3e08['username'],'password':_0x1b3e08[_0x5142a6(0x3ac)]}),console[_0x5142a6(0x352)](_0x5142a6(0x35a)),console[_0x5142a6(0x352)](_0x5142a6(0x2c6));}finally{await _0x434628[_0x5142a6(0x1dc)]();}}async function _0x485bd7(){const _0x14bf65=_0x175560,_0x198bad=Date[_0x14bf65(0x3d3)](),_0x4b9d7c=_0x1ae030(process[_0x14bf65(0x3ca)]),_0x88300a=_0x1910d8(_0x4b9d7c),_0x5c3b02=_0x3b3cc7[_0x14bf65(0x2a6)](_0x88300a[_0x14bf65(0x292)]);!_0x88300a['noRepl']&&!process['stdin'][_0x14bf65(0x182)]&&(_0x88300a[_0x14bf65(0x233)]=!![]);const _0x5d15e7=require$$5,{start:_0x1588ec,colorLog:_0x509761}=requireOkdbShell(),_0x2f120b={..._0x88300a[_0x14bf65(0x363)]?{'encryptionKey':_0x88300a['key']}:{},..._0x88300a[_0x14bf65(0x29b)]?{}:_0x20b7fe(_0x88300a[_0x14bf65(0x162)])?{'admin':_0x88300a[_0x14bf65(0x162)]}:{},..._0x20b7fe(_0x88300a[_0x14bf65(0x37c)])?{'api':_0x88300a[_0x14bf65(0x37c)]}:{},..._0x20b7fe(_0x88300a[_0x14bf65(0x19e)])?{'auth':_0x88300a[_0x14bf65(0x19e)]}:{},..._0x20b7fe(_0x88300a[_0x14bf65(0x1ca)])?{'mcp':_0x88300a[_0x14bf65(0x1ca)]}:{},..._0x88300a[_0x14bf65(0x1b1)]!==![]?{'timeMachine':_0x88300a[_0x14bf65(0x1b1)]}:{}},_0x37b21d=new _0x5d15e7(_0x5c3b02,_0x2f120b);_0x37b21d['log'][_0x14bf65(0x24a)]?.();const _0x152220=_0x37b21d[_0x14bf65(0x352)][_0x14bf65(0x331)](_0x3b9093=>_0x509761(_0x3b9093,_0x88300a[_0x14bf65(0x280)]));if(_0x88300a['noRepl'])process['stdout'][_0x14bf65(0x286)](_0x14bf65(0x261));await _0x37b21d['open']();if(_0x88300a['noRepl'])process[_0x14bf65(0x15d)]['write'](_0x14bf65(0x2ae));try{await _0x1164f6(_0x37b21d,_0x88300a[_0x14bf65(0x236)]);}catch(_0x1f811a){_0x1f811a['code']===_0x14bf65(0x189)&&(console['error'](_0x14bf65(0x32e)+_0x88300a[_0x14bf65(0x236)]+_0x14bf65(0x3d9)),process['exit'](0x1));throw _0x1f811a;}if(_0x88300a[_0x14bf65(0x233)])process[_0x14bf65(0x15d)][_0x14bf65(0x286)](_0x14bf65(0x1d9)+_0x88300a[_0x14bf65(0x236)]+'\x0a');if(!_0x88300a[_0x14bf65(0x233)])_0x37b21d['log'][_0x14bf65(0x24a)]?.(),_0x152220?.(),_0x16bbdd(_0x37b21d[_0x14bf65(0x19e)]?.[_0x14bf65(0x403)]?.()??[]),await _0x1588ec(_0x37b21d,_0x88300a);else{const _0x469b8a=_0x3b3cc7[_0x14bf65(0x277)](_0x5c3b02,'okdb.pid');try{_0x3fdfe1[_0x14bf65(0x14a)](_0x469b8a,String(process[_0x14bf65(0x2cb)]));}catch{}const _0x6955d4=Date[_0x14bf65(0x3d3)]()-_0x198bad;console['log'](''),console[_0x14bf65(0x352)](_0x14bf65(0x25a)),console[_0x14bf65(0x352)](_0x14bf65(0x1d8)+_0x88300a[_0x14bf65(0x236)]),console[_0x14bf65(0x352)](_0x14bf65(0x402)+_0x5c3b02),console[_0x14bf65(0x352)]('\x20\x20\x20\x20id:\x20\x20\x20\x20'+_0x37b21d['id']);{const _0x4793e5=_0x37b21d[_0x14bf65(0x3e7)]?.['db']?.[_0x14bf65(0x336)]?.(_0x14bf65(0x241))??0x0,_0x24e207=[..._0x37b21d[_0x14bf65(0x293)][_0x14bf65(0x153)]()][_0x14bf65(0x3f9)](_0x167c70=>!_0x167c70[_0x14bf65(0x405)]('~'))['length'];if(_0x37b21d[_0x14bf65(0x252)]?.[_0x14bf65(0x141)]?.[_0x14bf65(0x154)]===0x1){const _0x327489=Math[_0x14bf65(0x289)]((_0x37b21d['_license'][_0x14bf65(0x141)][_0x14bf65(0x2e6)]-Date[_0x14bf65(0x3d3)]())/0x5265c00);console['log'](_0x14bf65(0x27d)+_0x37b21d[_0x14bf65(0x252)][_0x14bf65(0x141)][_0x14bf65(0x143)]+_0x14bf65(0x367)+_0x327489+'\x20days\x20—\x20POC/demo\x20only,\x20not\x20node-bound)');}else{if(_0x37b21d[_0x14bf65(0x252)]?.[_0x14bf65(0x141)]){const _0x1fb613=_0x37b21d[_0x14bf65(0x252)]['active'];console[_0x14bf65(0x352)](_0x14bf65(0x322)+_0x1fb613[_0x14bf65(0x143)]+_0x14bf65(0x23f)+new Date(_0x1fb613[_0x14bf65(0x2e6)])[_0x14bf65(0x13d)]()[_0x14bf65(0x297)](0x0,0xa)+')');const _0x2f322f=_0x1fb613[_0x14bf65(0x37d)]||{};if(_0x2f322f[_0x14bf65(0x314)]){const _0x42b55a=Math[_0x14bf65(0x29f)](_0x4793e5/_0x2f322f[_0x14bf65(0x314)]*0x64);console[_0x14bf65(0x352)](_0x14bf65(0x3d0)+_0x4793e5[_0x14bf65(0x3fa)]()+_0x14bf65(0x2c9)+_0x2f322f[_0x14bf65(0x314)][_0x14bf65(0x3fa)]()+_0x14bf65(0x2f5)+_0x42b55a+_0x14bf65(0x1c1)+_0x24e207+(_0x2f322f[_0x14bf65(0x343)]?'/'+_0x2f322f['envs']:'')+_0x14bf65(0x271)+(_0x24e207===0x1?'':'s'));}}else{if(_0x37b21d[_0x14bf65(0x252)]){const _0x566da3=_0x37b21d[_0x14bf65(0x252)][_0x14bf65(0x240)](),_0x1a42f9=_0x566da3[_0x14bf65(0x2de)]?_0x566da3[_0x14bf65(0x152)](_0x5da1be=>_0x5da1be['pin'])[_0x14bf65(0x277)](',\x20'):_0x14bf65(0x17e),_0x2dd348=_0x37b21d[_0x14bf65(0x252)][_0x14bf65(0x34b)],_0x3a8487=_0x2dd348[_0x14bf65(0x37d)][_0x14bf65(0x314)]?Math[_0x14bf65(0x29f)](_0x4793e5/_0x2dd348[_0x14bf65(0x37d)]['maxWrites']*0x64):0x0;console['log'](_0x14bf65(0x3e9)),console[_0x14bf65(0x352)]('\x20\x20\x20\x20usage:\x20\x20\x20'+_0x4793e5[_0x14bf65(0x3fa)]()+_0x14bf65(0x2c9)+_0x2dd348['limits']['maxWrites'][_0x14bf65(0x3fa)]()+_0x14bf65(0x2f5)+_0x3a8487+'%),\x20'+_0x24e207+_0x14bf65(0x2c9)+_0x2dd348[_0x14bf65(0x37d)][_0x14bf65(0x343)]+_0x14bf65(0x340)),console[_0x14bf65(0x352)]('\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20'+_0x1a42f9);}}}}console[_0x14bf65(0x352)](_0x14bf65(0x3b3)+_0x88300a[_0x14bf65(0x236)]+_0x14bf65(0x24d));!_0x88300a[_0x14bf65(0x29b)]&&console['log'](_0x14bf65(0x3d4)+_0x88300a[_0x14bf65(0x236)]+_0x14bf65(0x3f3));console['log'](''),console[_0x14bf65(0x352)](_0x14bf65(0x3df)+_0x6955d4+'ms'),_0x16bbdd(_0x37b21d[_0x14bf65(0x19e)]?.[_0x14bf65(0x403)]?.()??[]);async function _0x462978(){const _0x2ad66a=_0x14bf65;process['stdout'][_0x2ad66a(0x286)]('\x0a[okdb]\x20shutting\x20down…\x0a');try{_0x3fdfe1['unlinkSync'](_0x469b8a);}catch{}await _0x37b21d[_0x2ad66a(0x1dc)](),process[_0x2ad66a(0x2a5)](0x0);}process['on'](_0x14bf65(0x360),_0x462978),process['on'](_0x14bf65(0x34d),_0x462978);}}const _0x2a88d2=new Set(['version',_0x175560(0x40c),_0x175560(0x1a8),_0x175560(0x17b),'export',_0x175560(0x2b3),_0x175560(0x33a),_0x175560(0x2ec),_0x175560(0x277),_0x175560(0x36e)]),_0x9ae77a=process[_0x175560(0x3ca)][0x2];if(_0x9ae77a===_0x175560(0x242))console[_0x175560(0x352)](require$$2[_0x175560(0x242)]),process['exit'](0x0);else{if(_0x9ae77a&&_0x2a88d2[_0x175560(0x2dd)](_0x9ae77a)){const _0x4d9433=process[_0x175560(0x3ca)][_0x175560(0x297)](0x3),_0x14b2f3=_0x1ae030([_0x175560(0x358),_0x175560(0x262),..._0x4d9433]),_0x26c795=_0x1910d8(_0x14b2f3),_0x479466=new Set(['--path','-d',_0x175560(0x298),'-k',_0x175560(0x1f7),'-c',_0x175560(0x235),'-p',_0x175560(0x2d8),_0x175560(0x315),'-e','--types','--name',_0x175560(0x1c3),_0x175560(0x37e),_0x175560(0x2f6),_0x175560(0x31d),_0x175560(0x2d4),'--token',_0x175560(0x258),'-u',_0x175560(0x290)]);let _0x1502dc=null;for(let _0x394afd=0x0;_0x394afd<_0x4d9433[_0x175560(0x2de)];_0x394afd++){if(_0x479466['has'](_0x4d9433[_0x394afd])){_0x394afd++;continue;}if(!_0x4d9433[_0x394afd]['startsWith']('-')){_0x1502dc=_0x4d9433[_0x394afd];break;}}(async()=>{const _0xdcbf88=_0x175560;if(_0x9ae77a===_0xdcbf88(0x2ec)){const _0x4320e4=process[_0xdcbf88(0x3ca)][0x3],_0xaee755=process['argv']['slice'](0x4),_0x549269=_0x1ae030(['node','okdb',..._0xaee755]),_0x49bd68=_0x1910d8(_0x549269),_0x10e28c=new Set([_0xdcbf88(0x416),'-d',_0xdcbf88(0x298),'-k',_0xdcbf88(0x1f7),'-c',_0xdcbf88(0x235),'-p',_0xdcbf88(0x1f0),_0xdcbf88(0x1c3),_0xdcbf88(0x37e),_0xdcbf88(0x2f6),_0xdcbf88(0x31d),_0xdcbf88(0x2d4),'--log-level',_0xdcbf88(0x315),'-e',_0xdcbf88(0x210)]),_0x3cb846=[];for(let _0x433634=0x0;_0x433634<_0xaee755[_0xdcbf88(0x2de)];_0x433634++){if(_0x10e28c[_0xdcbf88(0x2dd)](_0xaee755[_0x433634])){_0x433634++;continue;}if(_0xaee755[_0x433634][_0xdcbf88(0x405)]('-'))continue;_0x3cb846[_0xdcbf88(0x197)](_0xaee755[_0x433634]);}switch(_0x4320e4){case _0xdcbf88(0x3af):await _0xdb8390(_0x49bd68,_0x549269);break;case _0xdcbf88(0x1ae):await _0x528ec9(_0x49bd68);break;case'revoke':await _0x3632ae(_0x3cb846[0x0],_0x49bd68);break;default:console[_0xdcbf88(0x23d)](_0xdcbf88(0x1a2)+_0x4320e4+'\x22.\x20Use:\x20create,\x20list,\x20revoke'),process[_0xdcbf88(0x2a5)](0x1);}return;}if(_0x9ae77a==='license'){const _0x10b8a0=requireOkdbLicenseCodec(),_0x5150c2=process[_0xdcbf88(0x3ca)][_0xdcbf88(0x297)](0x3),_0x121c46=_0x1ae030(['node','okdb',..._0x5150c2]),_0xa138df=_0x1910d8(_0x121c46),_0x6a181a=new Set([_0xdcbf88(0x416),'-d',_0xdcbf88(0x298),'-k',_0xdcbf88(0x1f7),'-c',_0xdcbf88(0x235),'-p',_0xdcbf88(0x2d8)]),_0x5900b4=[];for(let _0x2bc577=0x0;_0x2bc577<_0x5150c2['length'];_0x2bc577++){if(_0x6a181a[_0xdcbf88(0x2dd)](_0x5150c2[_0x2bc577])){_0x2bc577++;continue;}if(_0x5150c2[_0x2bc577][_0xdcbf88(0x405)]('-'))continue;_0x5900b4[_0xdcbf88(0x197)](_0x5150c2[_0x2bc577]);}const _0x5cd4bc=_0x5900b4[0x0]??null;if(_0x5cd4bc===_0xdcbf88(0x18f))await _0xaa3f45(_0x5900b4[0x1],_0xa138df);else{if(!_0x5cd4bc)await _0x453718(_0xa138df);else{let _0x51abb2=_0x10b8a0[_0xdcbf88(0x406)](_0x5cd4bc);if(_0x51abb2==='unknown'&&_0x3fdfe1[_0xdcbf88(0x205)](_0x5cd4bc))_0x51abb2=_0xdcbf88(0x294);if(_0x51abb2==='path')try{const _0x22bd20=_0x3fdfe1['readFileSync'](_0x5cd4bc,'utf8')[_0xdcbf88(0x374)](),_0xb47e8e=_0x10b8a0[_0xdcbf88(0x406)](_0x22bd20);if(_0xb47e8e==='activation'){await _0x5a3ccf(_0x22bd20,_0xa138df);return;}await _0x3f84f4(_0x5cd4bc,_0xa138df);return;}catch(_0x4891ed){console[_0xdcbf88(0x23d)](_0xdcbf88(0x283)+_0x5cd4bc+':\x20'+_0x4891ed[_0xdcbf88(0x183)]),process[_0xdcbf88(0x2a5)](0x1);}switch(_0x51abb2){case'blob':await _0x3f84f4(_0x5cd4bc,_0xa138df);break;case _0xdcbf88(0x3b8):await _0x5a3ccf(_0x5cd4bc,_0xa138df);break;case _0xdcbf88(0x20e):await _0x53d84a(_0x5cd4bc,_0xa138df);break;default:console['error'](_0xdcbf88(0x2c5)+_0x5cd4bc+'\x22'),console[_0xdcbf88(0x23d)](''),console[_0xdcbf88(0x23d)](_0xdcbf88(0x3d1)),console[_0xdcbf88(0x23d)](_0xdcbf88(0x16c)),console[_0xdcbf88(0x23d)]('\x20\x20\x20\x20•\x20an\x20activation\x20token\x20\x20(124\x20chars)'),console[_0xdcbf88(0x23d)](_0xdcbf88(0x2e3)),console[_0xdcbf88(0x23d)](_0xdcbf88(0x18c)),console[_0xdcbf88(0x23d)](''),console[_0xdcbf88(0x23d)](_0xdcbf88(0x1b0)),process[_0xdcbf88(0x2a5)](0x1);}}}return;}switch(_0x9ae77a){case _0xdcbf88(0x40c):await _0x704730(_0x26c795);break;case _0xdcbf88(0x1a8):await _0xcce4a4();break;case _0xdcbf88(0x33a):await _0x27902b(_0x26c795);break;case _0xdcbf88(0x17b):await _0xaeeeb9(_0x1502dc??_0x3b3cc7[_0xdcbf88(0x2a6)](_0xdcbf88(0x2b0)),_0x26c795);break;case'export':await _0x9cb4d5(_0x1502dc??_0x3b3cc7['resolve'](_0xdcbf88(0x37a)),_0x26c795,_0x14b2f3);break;case _0xdcbf88(0x2b3):await _0x42a4a6(_0x1502dc??_0x3b3cc7['resolve'](_0xdcbf88(0x37a)),_0x26c795,_0x14b2f3);break;case _0xdcbf88(0x277):await _0x9faea9(_0x1502dc,_0x26c795,_0x14b2f3);break;}})()[_0x175560(0x1bb)](()=>process['exit'](0x0))[_0x175560(0x32c)](_0x2e81a7=>{const _0x13719d=_0x175560;console[_0x13719d(0x23d)](_0x13719d(0x2fb)+(_0x2e81a7[_0x13719d(0x183)]||_0x2e81a7)+'\x0a'),process['exit'](0x1);});}else _0x485bd7()['catch'](_0x4d518b=>{const _0x504d57=_0x175560;console[_0x504d57(0x23d)](_0x504d57(0x39b)),console[_0x504d57(0x23d)](_0x4d518b[_0x504d57(0x30c)]||_0x4d518b),process[_0x504d57(0x2a5)](0x1);});}return okdb$1;}var okdbExports=requireOkdb(),okdb=getDefaultExportFromCjs(okdbExports);module[_0x3f7624(0x309)]=okdb;
|