@kedem/okdb 2.3.3 → 2.3.5
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/CHANGELOG.md +76 -0
- package/algorithm-worker-thread.js +1 -1
- package/bin/okdb.js +1 -1
- package/docs/auth-and-sync.md +170 -463
- package/docs/auth-permissions.md +3 -1
- package/docs/deployment.md +8 -0
- package/docs/embeddings.md +1 -0
- package/docs/files.md +176 -51
- package/docs/functions.md +1 -1
- package/docs/getting-started.md +40 -13
- package/docs/http-api.md +12 -3
- package/docs/http-cluster.md +25 -0
- package/docs/resolved-fields.md +2 -0
- package/okdb-functions-sandbox-worker.js +1 -1
- package/okdb-http-worker-child.js +1 -1
- package/okdb-views-bootstrap-worker.js +1 -1
- package/okdb.js +1 -1
- package/package.json +1 -1
- package/public/sections/files/parts/files-file-list.ok.js +1 -1
- package/public/sections/files/parts/files-preview.ok.js +1 -0
- package/types/features/files.d.ts +39 -3
- package/types/index.d.ts +18 -3
package/bin/okdb.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
'use strict';const _0x1577db=_0x38fc;(function(_0x59df39,_0x417842){const _0x184f75=_0x38fc,_0x52eb38=_0x59df39();while(!![]){try{const _0x1217f7=parseInt(_0x184f75(0x4ce))/0x1*(parseInt(_0x184f75(0x273))/0x2)+-parseInt(_0x184f75(0x3d7))/0x3+-parseInt(_0x184f75(0x4f7))/0x4*(parseInt(_0x184f75(0x228))/0x5)+parseInt(_0x184f75(0x126))/0x6*(-parseInt(_0x184f75(0x3a8))/0x7)+-parseInt(_0x184f75(0x39b))/0x8*(parseInt(_0x184f75(0x55f))/0x9)+parseInt(_0x184f75(0x2c1))/0xa+parseInt(_0x184f75(0x3fa))/0xb;if(_0x1217f7===_0x417842)break;else _0x52eb38['push'](_0x52eb38['shift']());}catch(_0x439640){_0x52eb38['push'](_0x52eb38['shift']());}}}(_0x1008,0xef254));var require$$1=require(_0x1577db(0x242)),require$$1$1=require('fs'),require$$0=require('os'),require$$4$1=require(_0x1577db(0x11c)),require$$5=require(_0x1577db(0x543)),require$$0$3=require(_0x1577db(0x526)),require$$0$1=require(_0x1577db(0x31c)),require$$0$2=require(_0x1577db(0x403)),require$$4=require(_0x1577db(0x426)),require$$1$2=require('cluster'),require$$0$4=require(_0x1577db(0x14d)),require$$0$5=require(_0x1577db(0x28b)),require$$0$6=require(_0x1577db(0x5e4));function getDefaultExportFromCjs(_0x14bbd4){const _0x33dae6=_0x1577db;return _0x14bbd4&&_0x14bbd4[_0x33dae6(0x192)]&&Object[_0x33dae6(0x21a)][_0x33dae6(0x52d)][_0x33dae6(0x5ad)](_0x14bbd4,'default')?_0x14bbd4[_0x33dae6(0x453)]:_0x14bbd4;}var okdb$1={},okdbWorkers,hasRequiredOkdbWorkers;function requireOkdbWorkers(){if(hasRequiredOkdbWorkers)return okdbWorkers;hasRequiredOkdbWorkers=0x1;const _0x286a11=require$$0,_0x5f2341=require$$1$1,_0x5dcab3=require$$1;let _0x3ebeae;function _0x286cfa(){const _0xfcad62=_0x38fc;if(process.env.OKDB_FORCE_SHMBUF_FALLBACK==='1')return![];if(_0x3ebeae!==undefined)return _0x3ebeae;try{const _0x761e77=_0x5dcab3['dirname'](require[_0xfcad62(0x547)](_0xfcad62(0x188)));_0x3ebeae=_0x5f2341[_0xfcad62(0x53b)](_0x5dcab3[_0xfcad62(0x24f)](_0x761e77,'build',_0xfcad62(0x261),_0xfcad62(0x48f)));}catch{_0x3ebeae=![];}return _0x3ebeae;}function _0x3060bb(){const _0x4ba3c6=_0x38fc,_0x555267=_0x286a11['cpus']()[_0x4ba3c6(0x1f7)];return Math[_0x4ba3c6(0x5bc)](0x1,_0x555267-0x1);}function _0x2f045d(_0x1d276f,_0x4a089e={}){const _0x28be67=_0x38fc,_0x494d29=_0x4a089e['shmbufNative']!==undefined?_0x4a089e[_0x28be67(0x406)]:_0x286cfa();let _0x360426;if(_0x1d276f?.[_0x28be67(0x49b)])_0x360426=0x1;else{let _0x2d5322,_0x225238;if(_0x1d276f?.[_0x28be67(0x180)]!==undefined&&_0x1d276f[_0x28be67(0x180)]!==null&&_0x1d276f[_0x28be67(0x180)]!=='')_0x2d5322=_0x1d276f[_0x28be67(0x180)],_0x225238=_0x28be67(0x195);else{if(process.env.OKDB_HTTP_WORKERS!==undefined&&process.env.OKDB_HTTP_WORKERS!=='')_0x2d5322=process.env.OKDB_HTTP_WORKERS,_0x225238=_0x28be67(0x45c);else _0x1d276f?.[_0x28be67(0x4cb)]?.[_0x28be67(0x540)]!==undefined&&_0x1d276f['http'][_0x28be67(0x540)]!==null&&_0x1d276f[_0x28be67(0x4cb)][_0x28be67(0x540)]!==''&&(_0x2d5322=_0x1d276f[_0x28be67(0x4cb)][_0x28be67(0x540)],_0x225238=_0x28be67(0x1ce));}if(_0x2d5322===undefined)_0x360426=_0x3060bb();else{const _0x3677b7=Number(_0x2d5322);!Number[_0x28be67(0x1c4)](_0x3677b7)||_0x3677b7<0x1?(console['warn'](_0x28be67(0x27b)+_0x225238+'='+JSON[_0x28be67(0x15f)](_0x2d5322)+_0x28be67(0x509)),_0x360426=0x1):_0x360426=_0x3677b7;}}return!_0x494d29&&_0x360426>0x1&&(console[_0x28be67(0x33b)](_0x28be67(0x1b8)+(_0x28be67(0x499)+_0x360426+').')),_0x360426=0x1),_0x360426;}return okdbWorkers={'isShmbufNative':_0x286cfa,'defaultWorkers':_0x3060bb,'resolveWorkers':_0x2f045d},okdbWorkers;}var version=_0x1577db(0x583),require$$3={'version':version},okdbAuthTokens,hasRequiredOkdbAuthTokens;function requireOkdbAuthTokens(){if(hasRequiredOkdbAuthTokens)return okdbAuthTokens;hasRequiredOkdbAuthTokens=0x1;const _0x3e8249=require$$0$1;function _0x2a9087(_0x6f2193,_0x238a16){const _0x569ed9=_0x38fc;return _0x3e8249[_0x569ed9(0x23d)]('sha256',_0x238a16)[_0x569ed9(0x40c)](_0x6f2193)[_0x569ed9(0x38c)]('base64url');}function _0x1b500c(_0x8d197b,_0x22888e){const _0x539a31=_0x38fc;if(typeof _0x8d197b!==_0x539a31(0x5c8)||typeof _0x22888e!==_0x539a31(0x5c8))return![];if(Buffer[_0x539a31(0x22a)](_0x8d197b)!==Buffer[_0x539a31(0x22a)](_0x22888e))return![];return _0x3e8249[_0x539a31(0x3ae)](Buffer['from'](_0x8d197b),Buffer['from'](_0x22888e));}function _0x5e39ec(_0x33d84b){const _0x2dd7ed=_0x38fc;if(!_0x33d84b?.[_0x2dd7ed(0x5b6)](_0x2dd7ed(0x25e)))return null;return _0x33d84b['slice'](0x7);}function _0x4085f6(_0x332d1a=0x20){const _0x462701=_0x38fc;return _0x3e8249[_0x462701(0x395)](_0x332d1a)[_0x462701(0x42a)](_0x462701(0x4ad));}function _0x539bb3(_0x59ba89){const _0x490fcb=_0x38fc;return _0x3e8249[_0x490fcb(0x5c6)]('sha256')['update'](_0x59ba89)[_0x490fcb(0x38c)](_0x490fcb(0x107));}function _0x4af965(_0x5c97f2,_0x2b8b5e,_0x279022=0x36ee80){const _0x33e7a7=_0x38fc;if(!_0x2b8b5e)throw new Error('Token\x20secret\x20not\x20configured');const _0x251855=Date[_0x33e7a7(0x477)](),_0x44d860=Buffer[_0x33e7a7(0x41c)](JSON[_0x33e7a7(0x15f)]({'iat':_0x251855,'exp':_0x251855+_0x279022,'sub':_0x5c97f2?.['id']??_0x5c97f2?.[_0x33e7a7(0x4d9)]??null,'username':_0x5c97f2?.[_0x33e7a7(0x396)]??_0x5c97f2?.['name']??null,'roles':Array[_0x33e7a7(0x14b)](_0x5c97f2?.[_0x33e7a7(0x4a3)])?_0x5c97f2['roles']:[]}))[_0x33e7a7(0x42a)](_0x33e7a7(0x4ad)),_0x192599=_0x2a9087(_0x44d860,_0x2b8b5e);return _0x44d860+'.'+_0x192599;}function _0x5d5741(_0x305e8d,_0x38aac9){const _0x7bc187=_0x38fc;if(!_0x38aac9||typeof _0x305e8d!==_0x7bc187(0x5c8))return null;const [_0x26582f,_0x138ed9]=_0x305e8d[_0x7bc187(0x1be)]('.');if(!_0x26582f||!_0x138ed9)return null;const _0x3cf422=_0x2a9087(_0x26582f,_0x38aac9);if(!_0x1b500c(_0x138ed9,_0x3cf422))return null;try{const _0x9cc305=JSON[_0x7bc187(0x2bc)](Buffer[_0x7bc187(0x41c)](_0x26582f,_0x7bc187(0x4ad))[_0x7bc187(0x42a)]()),_0x514483=0x7530;if(Date['now']()>Number(_0x9cc305?.['exp']??0x0)+_0x514483)return null;return _0x9cc305;}catch{return null;}}async function _0x1f8d1d(_0x3bbe0e){return new Promise((_0x308163,_0x540a88)=>{const _0x399068=_0x38fc,_0x45e590=_0x3e8249['randomBytes'](0x10);_0x3e8249[_0x399068(0x11e)](_0x3bbe0e,_0x45e590,0x40,(_0x1b08d7,_0x412e04)=>{const _0x276259=_0x399068;if(_0x1b08d7)_0x540a88(_0x1b08d7);_0x308163(_0x45e590[_0x276259(0x42a)](_0x276259(0x107))+':'+_0x412e04[_0x276259(0x42a)](_0x276259(0x107)));});});}async function _0x313558(_0x17c06c,_0x3cb794){const _0x28a255=_0x38fc,[_0x22581b,_0x5ed824]=_0x3cb794[_0x28a255(0x1be)](':');if(!_0x22581b||!_0x5ed824)return![];const _0x5c20be=Buffer[_0x28a255(0x41c)](_0x22581b,'hex');return new Promise((_0x21f956,_0x430129)=>{const _0x1902c2=_0x28a255;_0x3e8249[_0x1902c2(0x11e)](_0x17c06c,_0x5c20be,0x40,(_0x30c205,_0x546ed6)=>{const _0x2aebc5=_0x1902c2;if(_0x30c205)_0x430129(_0x30c205);_0x21f956(_0x3e8249[_0x2aebc5(0x3ae)](_0x546ed6,Buffer['from'](_0x5ed824,'hex')));});});}return okdbAuthTokens={'hmac':_0x2a9087,'timingSafeEqual':_0x1b500c,'parseBearer':_0x5e39ec,'randomToken':_0x4085f6,'hashToken':_0x539bb3,'issueToken':_0x4af965,'authenticateToken':_0x5d5741,'hashPassword':_0x1f8d1d,'verifyPassword':_0x313558},okdbAuthTokens;}var okdbLicenseCodec,hasRequiredOkdbLicenseCodec;function requireOkdbLicenseCodec(){const _0x16f4ad=_0x1577db;if(hasRequiredOkdbLicenseCodec)return okdbLicenseCodec;hasRequiredOkdbLicenseCodec=0x1;const _0x57412f=require$$0$2,_0x47bac6=_0x16f4ad(0x455),_0x9cc7bd=new Uint8Array(0x100)[_0x16f4ad(0x5a8)](0xff);for(let _0x164740=0x0;_0x164740<_0x47bac6['length'];_0x164740++){_0x9cc7bd[_0x47bac6[_0x16f4ad(0x335)](_0x164740)]=_0x164740,_0x9cc7bd[_0x47bac6[_0x16f4ad(0x335)](_0x164740)+0x20]=_0x164740;}_0x9cc7bd['O'[_0x16f4ad(0x335)](0x0)]=0x0,_0x9cc7bd['o'[_0x16f4ad(0x335)](0x0)]=0x0,_0x9cc7bd['I'[_0x16f4ad(0x335)](0x0)]=0x1,_0x9cc7bd['i'[_0x16f4ad(0x335)](0x0)]=0x1,_0x9cc7bd['L'[_0x16f4ad(0x335)](0x0)]=0x1,_0x9cc7bd['l'[_0x16f4ad(0x335)](0x0)]=0x1;function _0x25f313(_0x1b4821){const _0x1e85ff=_0x16f4ad;let _0x22517d=0x0,_0x3e4c85=0x0,_0x42b449='';for(let _0x963f6f=0x0;_0x963f6f<_0x1b4821[_0x1e85ff(0x1f7)];_0x963f6f++){_0x3e4c85=_0x3e4c85<<0x8|_0x1b4821[_0x963f6f],_0x22517d+=0x8;while(_0x22517d>=0x5){_0x22517d-=0x5,_0x42b449+=_0x47bac6[_0x3e4c85>>>_0x22517d&0x1f];}}return _0x22517d>0x0&&(_0x42b449+=_0x47bac6[_0x3e4c85<<0x5-_0x22517d&0x1f]),_0x42b449;}function _0x57164d(_0x15e11d){const _0x2346e2=_0x16f4ad;_0x15e11d=_0x15e11d['replace'](/-/g,'')[_0x2346e2(0x11d)]();let _0x519227=0x0,_0x5d75a9=0x0;const _0x3ceaf0=[];for(let _0x434d6a=0x0;_0x434d6a<_0x15e11d['length'];_0x434d6a++){const _0x30a37d=_0x9cc7bd[_0x15e11d['charCodeAt'](_0x434d6a)];if(_0x30a37d===0xff)continue;_0x5d75a9=_0x5d75a9<<0x5|_0x30a37d,_0x519227+=0x5,_0x519227>=0x8&&(_0x519227-=0x8,_0x3ceaf0[_0x2346e2(0x38d)](_0x5d75a9>>>_0x519227&0xff));}return Buffer[_0x2346e2(0x41c)](_0x3ceaf0);}const _0x390194=[_0x16f4ad(0x362),_0x16f4ad(0x3a7),_0x16f4ad(0x505),_0x16f4ad(0x331),_0x16f4ad(0x556),_0x16f4ad(0x121),'mcp','files'],_0x189657=0x0,_0x4431d5=0x1,_0xdd6e9e=0x2,_0x67c1bd=0x6*0x1e*0x18*0x3c*0x3c*0x3e8;function _0x33edfa({issuedAt:_0x34fc26,expiresAt:_0x5d216f,licensee:licensee='',features:features={},limits:limits={},licenseType:licenseType=_0x189657}){const _0x1d55e0=_0x16f4ad,_0xbd27dd=Buffer['from'](licensee,'utf8')[_0x1d55e0(0x19f)](0x0,0x40),_0x144622=0x1+0x1+0x4+0x4+0x1+_0xbd27dd[_0x1d55e0(0x1f7)]+0x2+0x10,_0xdd3996=Buffer[_0x1d55e0(0x2bd)](_0x144622);let _0x27a92a=0x0;_0xdd3996[_0x1d55e0(0x1a8)](0x1,_0x27a92a++),_0xdd3996['writeUInt8'](licenseType,_0x27a92a++),_0xdd3996[_0x1d55e0(0x1d1)](Math[_0x1d55e0(0x1eb)](_0x34fc26/0x3e8),_0x27a92a),_0x27a92a+=0x4,_0xdd3996[_0x1d55e0(0x1d1)](Math['floor'](_0x5d216f/0x3e8),_0x27a92a),_0x27a92a+=0x4,_0xdd3996[_0x1d55e0(0x1a8)](_0xbd27dd[_0x1d55e0(0x1f7)],_0x27a92a++),_0xbd27dd[_0x1d55e0(0x36a)](_0xdd3996,_0x27a92a),_0x27a92a+=_0xbd27dd[_0x1d55e0(0x1f7)];let _0x5e4939=0x0;for(let _0x179c63=0x0;_0x179c63<_0x390194[_0x1d55e0(0x1f7)];_0x179c63++){if(features[_0x390194[_0x179c63]])_0x5e4939|=0x1<<_0x179c63;}_0xdd3996[_0x1d55e0(0x3be)](_0x5e4939,_0x27a92a),_0x27a92a+=0x2;const _0x4fe7b7=[_0x1d55e0(0x1d4),_0x1d55e0(0x500),'syncPeers',_0x1d55e0(0x502)];for(const _0x51fb69 of _0x4fe7b7){_0xdd3996[_0x1d55e0(0x1d1)](limits[_0x51fb69]||0x0,_0x27a92a),_0x27a92a+=0x4;}return _0xdd3996;}function _0x5a1dfe(_0x20a2cc){const _0x30bda5=_0x16f4ad;let _0x165509=0x0;const _0x5474b1=_0x20a2cc[_0x30bda5(0x278)](_0x165509++),_0x433c5e=_0x20a2cc[_0x30bda5(0x278)](_0x165509++),_0x1c863a=_0x20a2cc[_0x30bda5(0x4ef)](_0x165509);_0x165509+=0x4;const _0x1bc565=_0x20a2cc[_0x30bda5(0x4ef)](_0x165509);_0x165509+=0x4;const _0x41489f=_0x20a2cc['readUInt8'](_0x165509++),_0x11a729=_0x20a2cc[_0x30bda5(0x19f)](_0x165509,_0x165509+_0x41489f)[_0x30bda5(0x42a)](_0x30bda5(0x2b8));_0x165509+=_0x41489f;const _0xdeb4fe=_0x20a2cc['readUInt16BE'](_0x165509);_0x165509+=0x2;const _0x1ccb1c={};for(let _0xf4694d=0x0;_0xf4694d<_0x390194[_0x30bda5(0x1f7)];_0xf4694d++){_0x1ccb1c[_0x390194[_0xf4694d]]=Boolean(_0xdeb4fe&0x1<<_0xf4694d);}const _0x185c9e=[_0x30bda5(0x1d4),'typesPerEnv','syncPeers',_0x30bda5(0x502)],_0x27a438={};for(const _0x591950 of _0x185c9e){const _0x5d5d58=_0x20a2cc[_0x30bda5(0x4ef)](_0x165509);_0x165509+=0x4,_0x27a438[_0x591950]=_0x5d5d58===0x0?null:_0x5d5d58;}return{'v':_0x5474b1,'licenseType':_0x433c5e,'issuedAt':_0x1c863a*0x3e8,'expiresAt':_0x1bc565*0x3e8,'licensee':_0x11a729,'features':_0x1ccb1c,'limits':_0x27a438};}function _0x1a6d55(_0x4ccc16,_0x1a2c5a){const _0x4208ec=_0x16f4ad,_0x53f75b=Buffer['concat']([_0x4ccc16,_0x1a2c5a]),_0x60f516=_0x25f313(_0x53f75b),_0x3a64f5=[];for(let _0x499af1=0x0;_0x499af1<_0x60f516['length'];_0x499af1+=0x8){_0x3a64f5[_0x4208ec(0x38d)](_0x60f516[_0x4208ec(0x19f)](_0x499af1,_0x499af1+0x8));}return _0x3a64f5[_0x4208ec(0x24f)]('-');}function _0x2f6c32(_0x2d3d26){const _0x1e5ab9=_0x16f4ad;if(typeof _0x2d3d26!==_0x1e5ab9(0x5c8))throw new Error('decodeLicenseBlob:\x20input\x20must\x20be\x20a\x20string');const _0x4e6ff1=_0x57164d(_0x2d3d26[_0x1e5ab9(0x288)](/-/g,''));if(_0x4e6ff1[_0x1e5ab9(0x1f7)]<0x41)throw new Error(_0x1e5ab9(0x467)+_0x4e6ff1[_0x1e5ab9(0x1f7)]+_0x1e5ab9(0x1af));const _0x5207ec=_0x4e6ff1[_0x1e5ab9(0x19f)](0x0,_0x4e6ff1['length']-0x40),_0xee186a=_0x4e6ff1['slice'](_0x4e6ff1[_0x1e5ab9(0x1f7)]-0x40);let _0x14c6c5;try{_0x14c6c5=_0x5a1dfe(_0x5207ec);}catch(_0x10d68d){throw new Error('decodeLicenseBlob:\x20failed\x20to\x20decode\x20payload:\x20'+_0x10d68d[_0x1e5ab9(0x141)]);}return{'rawBuf':_0x4e6ff1,'payload':_0x5207ec,'sig':_0xee186a,'decoded':_0x14c6c5};}function _0xa2794(_0x453878){const _0x489fac=_0x16f4ad;return _0x57412f['createHash'](_0x489fac(0x5f1))[_0x489fac(0x40c)](_0x453878)['digest']()[_0x489fac(0x19f)](0x0,0x8);}function _0x1afa3e(_0x1783ab,_0x4be07d,_0x41f037){const _0x575f13=_0x16f4ad,_0x22df8e=_0x575f13(0x342)+_0x41f037,_0x565d26=Buffer[_0x575f13(0x368)]([Buffer[_0x575f13(0x41c)](_0x1783ab,'utf8'),_0x4be07d]),_0x5089af=_0x57412f[_0x575f13(0x23d)]('sha256',_0x22df8e)[_0x575f13(0x40c)](_0x565d26)[_0x575f13(0x38c)](),_0x2ace44=_0x25f313(_0x5089af[_0x575f13(0x19f)](0x0,0x5));return{'pin':_0x2ace44,'pinHmac':_0x5089af};}function _0x42b0d0(_0xabc213,_0x3445e1,_0x1bfe27){const _0x38d957=_0x16f4ad,_0x517123=Buffer['allocUnsafe'](0x4d);let _0x3435b8=0x0;_0x517123['writeUInt8'](0x1,_0x3435b8++),_0xabc213[_0x38d957(0x36a)](_0x517123,_0x3435b8),_0x3435b8+=0x8,_0x517123[_0x38d957(0x1d1)](_0x3445e1,_0x3435b8),_0x3435b8+=0x4,_0x1bfe27['copy'](_0x517123,_0x3435b8);const _0x3f016b=_0x25f313(_0x517123),_0x2de105=[];for(let _0x5cb45b=0x0;_0x5cb45b<_0x3f016b[_0x38d957(0x1f7)];_0x5cb45b+=0x6){_0x2de105['push'](_0x3f016b[_0x38d957(0x19f)](_0x5cb45b,_0x5cb45b+0x6));}return _0x2de105[_0x38d957(0x24f)]('-');}function _0x5f3a4e(_0x342e94){const _0x464c4d=_0x16f4ad;if(typeof _0x342e94!==_0x464c4d(0x5c8))throw new Error('decodeActivationToken:\x20input\x20must\x20be\x20a\x20string');const _0x23d9a1=_0x57164d(_0x342e94[_0x464c4d(0x288)](/-/g,''));if(_0x23d9a1['length']!==0x4d)throw new Error(_0x464c4d(0x3cf)+_0x23d9a1[_0x464c4d(0x1f7)]);let _0x2d889d=0x0;const _0x3c31b1=_0x23d9a1['readUInt8'](_0x2d889d++),_0x5cf86a=_0x23d9a1[_0x464c4d(0x19f)](_0x2d889d,_0x2d889d+0x8);_0x2d889d+=0x8;const _0x2afbb4=_0x23d9a1[_0x464c4d(0x4ef)](_0x2d889d);_0x2d889d+=0x4;const _0x5790a1=_0x23d9a1[_0x464c4d(0x19f)](_0x2d889d);return{'v':_0x3c31b1,'licenseHash':_0x5cf86a,'expiry':_0x2afbb4,'sig':_0x5790a1};}function _0x47f4f6({tokenString:_0x3da22e,nodeId:_0x19c538,rawBlobBuf:_0x4179c5,pubKeyPem:_0x23620f,pubFingerprint:_0x34d0a6}){const _0x41ceff=_0x16f4ad;let _0x2292f7;try{_0x2292f7=_0x5f3a4e(_0x3da22e);}catch(_0x2b5677){return{'valid':![],'reason':'MALFORMED_TOKEN'};}const _0x18eb01=_0xa2794(_0x4179c5);if(!_0x18eb01[_0x41ceff(0x221)](_0x2292f7[_0x41ceff(0x1ac)]))return{'valid':![],'reason':'LICENSE_HASH_MISMATCH'};const {pinHmac:_0x173713}=_0x1afa3e(_0x19c538,_0x18eb01,_0x34d0a6),_0x5d1be4=Buffer['allocUnsafe'](0x4);_0x5d1be4[_0x41ceff(0x1d1)](_0x2292f7[_0x41ceff(0x50e)],0x0);const _0x27177b=Buffer[_0x41ceff(0x368)]([Buffer[_0x41ceff(0x41c)]([_0x2292f7['v']]),_0x173713['slice'](0x0,0x5),_0x2292f7[_0x41ceff(0x1ac)],_0x5d1be4]);try{const _0x3f18ba=_0x57412f[_0x41ceff(0x4c8)](null,_0x27177b,_0x23620f,_0x2292f7[_0x41ceff(0x3ba)]);if(!_0x3f18ba)return{'valid':![],'reason':'SIG_INVALID'};}catch(_0x1612de){return{'valid':![],'reason':_0x41ceff(0x4f3)};}if(_0x2292f7[_0x41ceff(0x50e)]<Date['now']()/0x3e8)return{'valid':![],'reason':_0x41ceff(0x565)};return{'valid':!![],'reason':'ok'};}function _0x22e29e(_0x4876dc){const _0x4c5c11=_0x16f4ad;if(typeof _0x4876dc!==_0x4c5c11(0x5c8))return'unknown';const _0x45062f=_0x4876dc[_0x4c5c11(0x25d)]();if(_0x45062f['startsWith']('/')||_0x45062f[_0x4c5c11(0x5b6)]('./')||_0x45062f[_0x4c5c11(0x5b6)](_0x4c5c11(0x2b3))||/^[A-Za-z]:[\\/]/['test'](_0x45062f))return'path';if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i[_0x4c5c11(0x41d)](_0x45062f))return _0x4c5c11(0x446);const _0x413be8=_0x45062f[_0x4c5c11(0x288)](/[\s-]+/g,'')[_0x4c5c11(0x1f7)];if(_0x413be8===0x7c)return'activation';if(_0x413be8>=0x95&&_0x413be8<=0xfc)return'blob';return _0x4c5c11(0x31b);}return okdbLicenseCodec={'toBase32':_0x25f313,'fromBase32':_0x57164d,'encodeLicensePayload':_0x33edfa,'decodeLicensePayload':_0x5a1dfe,'encodeLicenseBlob':_0x1a6d55,'decodeLicenseBlob':_0x2f6c32,'licenseHash':_0xa2794,'derivePin':_0x1afa3e,'encodeActivationToken':_0x42b0d0,'decodeActivationToken':_0x5f3a4e,'verifyActivation':_0x47f4f6,'detectInputType':_0x22e29e,'FEATURE_NAMES':_0x390194,'LICENSE_TYPE_STANDARD':_0x189657,'LICENSE_TYPE_OPEN':_0x4431d5,'LICENSE_TYPE_INTERNAL':_0xdd6e9e,'OPEN_LICENSE_MAX_DURATION_MS':_0x67c1bd},okdbLicenseCodec;}var okdbError,hasRequiredOkdbError;function requireOkdbError(){if(hasRequiredOkdbError)return okdbError;hasRequiredOkdbError=0x1;class _0x22826a extends Error{constructor(_0xf26107,_0x4b7eec,_0x46a121={}){const _0x475ae4=_0x38fc;super(_0xf26107),this[_0x475ae4(0x3f6)]=_0x475ae4(0x1cc),this['code']=_0x4b7eec,this[_0x475ae4(0x1bf)]=_0x46a121,_0x46a121[_0x475ae4(0x3b6)]&&(this[_0x475ae4(0x3b6)]=_0x46a121[_0x475ae4(0x3b6)]),Error['captureStackTrace'](this,this[_0x475ae4(0x591)]);}}class _0x399c1a extends _0x22826a{constructor(_0x189f3a,_0x1b6eca,_0x35cbd2,_0x22273b){const _0x54a80e=_0x38fc;super('Version\x20mismatch\x20for\x20'+_0x189f3a+'@'+_0x1b6eca+_0x54a80e(0x51c)+_0x35cbd2+_0x54a80e(0x386)+_0x22273b,_0x54a80e(0x1e6),{'type':_0x189f3a,'key':_0x1b6eca,'expectedVersion':_0x35cbd2,'actualVersion':_0x22273b}),this[_0x54a80e(0x3f6)]=_0x54a80e(0x3b7);}}class _0x4bf76e extends _0x22826a{constructor(_0x1ecc7a,_0x5f0dc1){const _0x3a9fea=_0x38fc;super(_0x1ecc7a+'@'+_0x5f0dc1+_0x3a9fea(0x437),'NOT_FOUND',{'type':_0x1ecc7a,'key':_0x5f0dc1}),this[_0x3a9fea(0x3f6)]='OKDBNotFoundError';}}class _0x7c30c4 extends _0x22826a{constructor(_0x282617,_0x4b7363){const _0x37b695=_0x38fc;super(_0x282617+'@'+_0x4b7363+_0x37b695(0x28a),_0x37b695(0x32c),{'type':_0x282617,'key':_0x4b7363}),this[_0x37b695(0x3f6)]=_0x37b695(0x5c9);}}class _0x2b0c1c extends _0x22826a{constructor(_0x42eddd,_0x3eaa7d){const _0x2a3931=_0x38fc,_0x47230e=typeof _0x3eaa7d;super(_0x2a3931(0x1f4)+_0x42eddd+_0x2a3931(0x114)+_0x47230e+_0x2a3931(0x3db)+_0x3eaa7d,'INVALID_INDEX_KEY',{'index':_0x42eddd,'key':_0x3eaa7d,'keyType':_0x47230e}),this['name']=_0x2a3931(0x490);}}class _0x2a3dae extends _0x22826a{constructor(_0x4142dc){const _0x4362a6=_0x38fc,_0x4d20e4=typeof _0x4142dc;super(_0x4362a6(0x1ed)+_0x4d20e4+_0x4362a6(0x534)+_0x4142dc,_0x4362a6(0x291),{'key':_0x4142dc,'keyType':_0x4d20e4}),this[_0x4362a6(0x3f6)]=_0x4362a6(0x55a);}}class _0x4f2946 extends _0x22826a{constructor(_0x366818){const _0x4f5bc6=_0x38fc;super(_0x4f5bc6(0x55d)+_0x366818+'\x27\x20doesn\x27t\x20exist',_0x4f5bc6(0x472),{'type':_0x366818}),this[_0x4f5bc6(0x3f6)]=_0x4f5bc6(0x1b7);}}class _0x788c1c extends _0x22826a{constructor(_0x268635){const _0x510c58=_0x38fc;super(_0x510c58(0x55d)+_0x268635+'\x27\x20already\x20registered',_0x510c58(0x26b),{'type':_0x268635}),this[_0x510c58(0x3f6)]='OKDBTypeAlreadyRegisteredError';}}class _0x32d879 extends _0x22826a{constructor(_0x4a276d,_0x2c4df0){const _0x4e7460=_0x38fc;super('Index\x20\x27'+_0x2c4df0+_0x4e7460(0x1ad)+_0x4a276d+_0x4e7460(0x2a9),_0x4e7460(0x5d3),{'type':_0x4a276d,'index':_0x2c4df0}),this[_0x4e7460(0x3f6)]=_0x4e7460(0x269);}}class _0x45ef82 extends _0x22826a{constructor(_0x2db587,_0xf6df33){const _0x4d407e=_0x38fc;super(_0x4d407e(0x3da)+_0xf6df33+_0x4d407e(0x1ad)+_0x2db587+'\x27\x20is\x20already\x20registered','INDEX_ALREADY_REGISTERED',{'type':_0x2db587,'index':_0xf6df33}),this[_0x4d407e(0x3f6)]='OKDBIndexAlreadyRegisteredError';}}class _0x68b8d5 extends _0x22826a{constructor(_0x23eb9d,_0x983cc9={}){const _0x27e38d=_0x38fc;super(_0x23eb9d,_0x27e38d(0x49c),_0x983cc9),this[_0x27e38d(0x3f6)]=_0x27e38d(0x580);}}class _0x5eb5e1 extends _0x22826a{constructor(_0x409720,_0x417010,_0x412172,_0x2e1296,_0xe0a315){const _0x3322c5=_0x38fc;super(_0x3322c5(0x397)+_0x409720+'@'+_0x417010+_0x3322c5(0x272)+_0x412172+_0x3322c5(0x336)+_0x2e1296+_0x3322c5(0x3c0)+_0xe0a315+'\x27','UNIQUE_CONSTRAINT',{'type':_0x409720,'index':_0x417010,'indexKey':_0x412172,'existingKey':_0x2e1296,'conflictingKey':_0xe0a315}),this[_0x3322c5(0x3f6)]='OKDBUniqueConstraintError';}}class _0x3a359a extends _0x22826a{constructor(_0x21c676,_0xa71875,_0x65228d){const _0xd21ae6=_0x38fc;super(_0xd21ae6(0x405)+_0x21c676+'@'+_0xa71875,_0xd21ae6(0x255),{'type':_0x21c676,'key':_0xa71875,'errors':_0x65228d}),this[_0xd21ae6(0x3f6)]=_0xd21ae6(0x290),this['type']=_0x21c676,this['key']=_0xa71875,this[_0xd21ae6(0x4eb)]=_0x65228d;}}class _0x198895 extends _0x22826a{constructor(_0x1d4607,_0x1a7130){const _0xfd65b0=_0x38fc;super(_0xfd65b0(0x329)+_0x1d4607+':\x20'+_0x1a7130[_0xfd65b0(0x1f7)]+_0xfd65b0(0x536),_0xfd65b0(0x508),{'type':_0x1d4607,'failures':_0x1a7130}),this['name']=_0xfd65b0(0x3d3),this[_0xfd65b0(0x153)]=_0x1d4607,this[_0xfd65b0(0x27c)]=_0x1a7130;}}class _0x2acda1 extends _0x22826a{constructor(_0x57c705,_0x387502,_0x4b90aa,_0xa34e03,_0x1cf4a7){const _0x5f59bf=_0x38fc;super(_0x5f59bf(0x5d1)+_0x57c705+'@'+_0x387502+'.'+_0x4b90aa+_0x5f59bf(0x578)+_0xa34e03+'@'+_0x1cf4a7+_0x5f59bf(0x532),_0x5f59bf(0x3ed),{'sourceType':_0x57c705,'sourceKey':_0x387502,'fieldPath':_0x4b90aa,'targetType':_0xa34e03,'targetKey':_0x1cf4a7}),this[_0x5f59bf(0x3f6)]=_0x5f59bf(0x2b5),this[_0x5f59bf(0x1a2)]=_0x57c705,this['sourceKey']=_0x387502,this[_0x5f59bf(0x151)]=_0x4b90aa,this[_0x5f59bf(0x5f2)]=_0xa34e03,this['targetKey']=_0x1cf4a7;}}class _0x671700 extends _0x22826a{constructor(_0x2c95a7,_0x2f9673,_0xb80d76){const _0x37bf68=_0x38fc;super('Cannot\x20delete\x20'+_0x2c95a7+'@'+_0x2f9673+':\x20'+_0xb80d76[_0x37bf68(0x1f7)]+_0x37bf68(0x2f6),_0x37bf68(0x271),{'targetType':_0x2c95a7,'targetKey':_0x2f9673,'references':_0xb80d76}),this[_0x37bf68(0x3f6)]='OKDBForeignKeyDeleteError',this[_0x37bf68(0x5f2)]=_0x2c95a7,this[_0x37bf68(0x246)]=_0x2f9673,this[_0x37bf68(0x513)]=_0xb80d76;}}class _0x25fe9b extends _0x22826a{constructor(_0x32c1b5,_0x205412,_0x36ff78){const _0xd02890=_0x38fc;super(_0xd02890(0x4cf)+_0x205412+_0xd02890(0x456)+_0x32c1b5+_0xd02890(0x47f)+_0x36ff78[_0xd02890(0x4d3)](_0x319aef=>_0x319aef[_0xd02890(0x3d2)]+':'+_0x319aef[_0xd02890(0x3f6)])[_0xd02890(0x24f)](',\x20'),_0xd02890(0x549),{'type':_0x32c1b5,'index':_0x205412,'usedBy':_0x36ff78}),this['name']=_0xd02890(0x454);}}return okdbError={'OKDBError':_0x22826a,'OKDBVersionMismatchError':_0x399c1a,'OKDBNotFoundError':_0x4bf76e,'OKDBAlreadyExistsError':_0x7c30c4,'OKDBInvalidIndexKeyError':_0x2b0c1c,'OKDBInvalidPrimaryKeyError':_0x2a3dae,'OKDBTypeNotRegisteredError':_0x4f2946,'OKDBTypeAlreadyRegisteredError':_0x788c1c,'OKDBIndexNotRegisteredError':_0x32d879,'OKDBIndexAlreadyRegisteredError':_0x45ef82,'OKDBInvalidValueError':_0x68b8d5,'OKDBUniqueConstraintError':_0x5eb5e1,'OKDBSchemaValidationError':_0x3a359a,'OKDBSchemaCollectionError':_0x198895,'OKDBForeignKeyError':_0x2acda1,'OKDBForeignKeyDeleteError':_0x671700,'OKDBIndexHasConsumersError':_0x25fe9b},okdbError;}var okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x20c6f8=_0x1577db;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x1c68dd={'PUT':'put','REMOVE':_0x20c6f8(0x361),'INDEX_DROP':_0x20c6f8(0x443),'INDEX_REGISTER':'registerIndex','INDEX_RESET':'resetIndex','TYPE_REGISTER':'registerType','TYPE_DROP':_0x20c6f8(0x129),'FTS_REGISTER':'registerFts','FTS_DROP':_0x20c6f8(0x152),'FTS_RESET':_0x20c6f8(0x571),'SCHEMA_SET':'setSchema','SCHEMA_DROP':_0x20c6f8(0x2b0),'TTL_SET':_0x20c6f8(0x407),'TTL_CLEAR':_0x20c6f8(0x117)},_0x529ae7={'SYSTEM_READY':'system:ready','FIELD_RESOLVER_REGISTERED':_0x20c6f8(0x14e),'SYSTEM_STOPPED':_0x20c6f8(0x325),'SYSTEM_CLOCK_CHANGE':_0x20c6f8(0x5a3),'SYSTEM_POKE':_0x20c6f8(0x116),'SYSTEM_DRAIN':_0x20c6f8(0x125),'SYSTEM_TYPE_DROP':'system:type_drop','SYSTEM_PROC':_0x20c6f8(0x198),'SYSTEM_BUS_STATE_CHANGE':_0x20c6f8(0x3b5),'ITEM_CREATE':_0x20c6f8(0x3f7),'ITEM_UPDATE':_0x20c6f8(0x12e),'ITEM_REMOVE':'item:remove','INDEX_RESET':_0x20c6f8(0x249),'INDEX_READY':_0x20c6f8(0x587),'INDEX_PROGRESS':'index:progress','VIEW_PROGRESS':_0x20c6f8(0x3cc),'INDEX_DROP':_0x20c6f8(0x18b),'INDEX_REGISTERED':_0x20c6f8(0x143),'FTS_REGISTERED':_0x20c6f8(0x527),'FTS_DROP':_0x20c6f8(0x376),'FTS_RESET':_0x20c6f8(0x25b),'SCHEMA_SET':'schema:set','SCHEMA_DROP':_0x20c6f8(0x13a),'UNIQUE_VIOLATION':_0x20c6f8(0x4ed),'UNIQUE_VIOLATION_RESOLVED':_0x20c6f8(0x32e),'REF_VIOLATION':_0x20c6f8(0x13e),'REF_VIOLATION_RESOLVED':_0x20c6f8(0x2d5),'SYNC_APPLY':_0x20c6f8(0x284),'TXN_START':_0x20c6f8(0x5de),'TXN_END':_0x20c6f8(0x3fc),'TXN_ROLLBACK':_0x20c6f8(0x381),'TYPE_REGISTERED':_0x20c6f8(0x4d1),'TYPE_DROP':_0x20c6f8(0x448),'ENV_OPENED':'env:opened','ENV_REMOVED':'env:removed','SYSTEM_ENV_RELEASE':'system:env_release','TTL_EXPIRED':_0x20c6f8(0x2fd),'TTL_SET':_0x20c6f8(0x5f5),'TTL_CLEAR':_0x20c6f8(0x298),'LICENSE_INVALID':'license:invalid','LICENSE_ADDED':_0x20c6f8(0x257),'LICENSE_ACTIVATED':_0x20c6f8(0x1b6),'LICENSE_REMOVED':_0x20c6f8(0x28c)},_0x2c845f={'CREATING':_0x20c6f8(0x2f8),'RESETTING':_0x20c6f8(0x2c4),'READY':_0x20c6f8(0x588),'DROPPING':'dropping','WAITING':_0x20c6f8(0x352),'ERROR':_0x20c6f8(0x54f)},_0x52e475={'CREATED':_0x20c6f8(0x45d),'STARTING':_0x20c6f8(0x388),'STARTED':_0x20c6f8(0x4f0),'STOPPING':_0x20c6f8(0x4c6),'STOPPED':_0x20c6f8(0x541)},_0x306ef3={'CREATING':_0x20c6f8(0x2f8),'READY':'ready','HALTED':_0x20c6f8(0x324),'STOPPED':_0x20c6f8(0x541),'RESETTING':_0x20c6f8(0x2c4)},_0x9084ec=Object[_0x20c6f8(0x449)]({'POKE':'bus:poke','DRAIN':_0x20c6f8(0x569),'TYPE_DROP':_0x20c6f8(0x2e6),'PROC':_0x20c6f8(0x3fb),'ENV_RELEASE':_0x20c6f8(0x370)});return okdbEnums={'BUS_EVENTS':_0x9084ec,'CHANGE_ACTIONS':_0x1c68dd,'EVENTS':_0x529ae7,'INDEX_STATE':_0x2c845f,'OKDB_STATE':_0x52e475,'VIEW_STATE':_0x306ef3},okdbEnums;}var okdbPubkey,hasRequiredOkdbPubkey;function requireOkdbPubkey(){const _0x42dfd2=_0x1577db;if(hasRequiredOkdbPubkey)return okdbPubkey;hasRequiredOkdbPubkey=0x1;const _0x201822=require$$1$1,_0x88f0a8=require$$1,_0x53dafd=require$$0$1,_0x2bab9c=_0x201822[_0x42dfd2(0x377)](_0x88f0a8['join'](__dirname,_0x42dfd2(0x451)),_0x42dfd2(0x2b8))['trim'](),_0xf44f29=_0x53dafd['createPublicKey'](_0x2bab9c)['export']({'type':_0x42dfd2(0x1c1),'format':_0x42dfd2(0x4b3)}),_0x268949=_0x53dafd[_0x42dfd2(0x5c6)](_0x42dfd2(0x5f1))[_0x42dfd2(0x40c)](_0xf44f29)[_0x42dfd2(0x38c)](_0x42dfd2(0x107))[_0x42dfd2(0x19f)](0x0,0x10);return okdbPubkey={'PUBLIC_KEY_PEM':_0x2bab9c,'PUB_FINGERPRINT':_0x268949},okdbPubkey;}var okdbLicense,hasRequiredOkdbLicense;function requireOkdbLicense(){const _0x402093=_0x1577db;if(hasRequiredOkdbLicense)return okdbLicense;hasRequiredOkdbLicense=0x1;const _0x559bb6=require$$0$1,{OKDBError:_0x253bef}=requireOkdbError(),{EVENTS:_0x39c416}=requireOkdbEnums(),_0x65480a=requireOkdbLicenseCodec(),{LICENSE_TYPE_OPEN:_0x3cb19d,LICENSE_TYPE_INTERNAL:_0x10fd18,OPEN_LICENSE_MAX_DURATION_MS:_0x54b52a}=_0x65480a,_0x43bbb6=requireOkdbPubkey(),_0x4117d1={'LICENSED_BUILD':_0x402093(0x24c),'PUBLIC_KEY_PEM':_0x43bbb6['PUBLIC_KEY_PEM'],'PUB_FINGERPRINT':_0x43bbb6[_0x402093(0x17f)],'LICENSE_EXPIRED_ACTION':_0x402093(0x18c)},_0x105ab8=_0x402093(0x4e8),_0x49a04={'features':{'sync':![],'embeddings':!![],'engines':![],'fts':!![],'timeMachine':![],'views':!![],'mcp':!![],'files':!![]},'limits':{'envs':0x5,'typesPerEnv':0xa,'syncPeers':0x0,'maxWrites':0xf4240,'pipelinesPerEnv':0x2},'_isFree':!![]};async function _0x4dc0f9(_0xb1484){await _0xb1484['ensureType'](_0x105ab8);}class _0x32dbed{constructor(_0x2bd006){const _0x1a991b=_0x402093;this[_0x1a991b(0x270)]=_0x2bd006,this[_0x1a991b(0x452)]=null;}async['reload'](){const _0x241800=_0x402093,_0x1bcc93=this[_0x241800(0x270)][_0x241800(0x320)];if(!_0x1bcc93||!_0x1bcc93['hasType'](_0x105ab8)){this[_0x241800(0x452)]=null;return;}const _0xdd8e1b=this[_0x241800(0x270)]['id'];let _0x2e36f7=null;for(const {key:_0x27460d,value:_0x22aaa4}of _0x1bcc93[_0x241800(0x5f9)](_0x105ab8)){const _0x4ccf0f=this['_computeStatus'](_0x22aaa4,_0xdd8e1b);_0x4ccf0f===_0x241800(0x50c)&&!_0x2e36f7&&(_0x2e36f7={..._0x22aaa4,'id':_0x27460d,'status':_0x4ccf0f});}this['_active']=_0x2e36f7;if(this['_active']&&this[_0x241800(0x452)][_0x241800(0x53c)]===_0x3cb19d){const _0x12fca2=Math[_0x241800(0x1ab)]((this[_0x241800(0x452)][_0x241800(0x5a2)]-Date[_0x241800(0x477)]())/0x5265c00);this['okdb'][_0x241800(0x18c)]?.['warn'](_0x241800(0x42b)+_0x12fca2+_0x241800(0x496),{'feature':_0x241800(0x15d),'licensee':this['_active'][_0x241800(0x413)],'expiresAt':new Date(this[_0x241800(0x452)][_0x241800(0x5a2)])[_0x241800(0x5c7)]()});}this[_0x241800(0x452)]&&this[_0x241800(0x452)][_0x241800(0x53c)]===_0x10fd18&&this[_0x241800(0x270)][_0x241800(0x18c)]?.[_0x241800(0x33b)]('⚠\x20INTERNAL\x20LICENSE\x20ACTIVE\x20—\x20all\x20features\x20and\x20limits\x20are\x20unlocked.\x20For\x20vendor/internal\x20use\x20only.',{'feature':_0x241800(0x15d),'licensee':this['_active'][_0x241800(0x413)]});}[_0x402093(0x2b4)](_0x5618ce,_0x206c67){const _0x1045b0=_0x402093;if(!_0x5618ce[_0x1045b0(0x2e8)])return _0x1045b0(0x20c);let _0x3c472a;try{_0x3c472a=_0x65480a[_0x1045b0(0x304)](_0x5618ce['blob']);}catch(_0x47f9b9){return'invalid';}try{const _0x34c391=_0x559bb6[_0x1045b0(0x4c8)](null,_0x3c472a['payload'],_0x4117d1[_0x1045b0(0x3c4)],_0x3c472a['sig']);if(!_0x34c391)return _0x1045b0(0x20c);}catch(_0x22dd3e){return _0x1045b0(0x20c);}if(_0x3c472a[_0x1045b0(0x4af)]['licenseType']===_0x10fd18)return _0x1045b0(0x50c);if(_0x3c472a[_0x1045b0(0x4af)]['expiresAt']<=Date[_0x1045b0(0x477)]())return _0x1045b0(0x28f);if(_0x3c472a[_0x1045b0(0x4af)][_0x1045b0(0x53c)]===_0x3cb19d)return _0x1045b0(0x50c);if(!_0x5618ce[_0x1045b0(0x398)])return _0x1045b0(0x2c8);const _0x4b3741=_0x65480a[_0x1045b0(0x299)]({'tokenString':_0x5618ce['activation'],'nodeId':_0x206c67,'rawBlobBuf':_0x3c472a[_0x1045b0(0x34e)],'pubKeyPem':_0x4117d1['PUBLIC_KEY_PEM'],'pubFingerprint':_0x4117d1['PUB_FINGERPRINT']});if(_0x4b3741[_0x1045b0(0x16e)]===_0x1045b0(0x344)||_0x4b3741[_0x1045b0(0x16e)]===_0x1045b0(0x4f3))return'wrong_node';if(_0x4b3741[_0x1045b0(0x16e)]===_0x1045b0(0x565))return'expired';if(!_0x4b3741[_0x1045b0(0x3c1)])return'wrong_node';return _0x1045b0(0x50c);}get['active'](){const _0x5ee71f=_0x402093;return this[_0x5ee71f(0x452)];}get[_0x402093(0x2c9)](){const _0x35bc15=_0x402093;return this[_0x35bc15(0x452)]??_0x49a04;}[_0x402093(0x193)](_0x45d108){const _0x466224=_0x402093;if(_0x4117d1[_0x466224(0x2aa)]!=='true')return;const _0x504d6e=this[_0x466224(0x2c9)];if(!_0x504d6e[_0x466224(0x174)]?.[_0x45d108]){const _0xe55793=_0x504d6e[_0x466224(0x26e)]?_0x466224(0x25f)+_0x45d108+_0x466224(0x183)+_0x45d108+_0x466224(0x4e6):_0x466224(0x20e)+_0x45d108+_0x466224(0x12a)+_0x45d108+'\x22.';throw new _0x253bef(_0xe55793,'LICENSE_FEATURE_DISABLED',{'feature':_0x45d108});}}[_0x402093(0x420)](_0x48da1f){const _0x39aa02=_0x402093;if(_0x4117d1[_0x39aa02(0x2aa)]!=='true')return!![];return!!this['effective']['features']?.[_0x48da1f];}['hasLimit'](_0x30f4cd){const _0x354278=_0x402093;if(_0x4117d1['LICENSED_BUILD']!==_0x354278(0x24c))return![];const _0x13e060=this['effective'][_0x354278(0x441)]?.[_0x30f4cd];return!(_0x13e060===null||_0x13e060===undefined||_0x13e060===0x0);}[_0x402093(0x3c2)](_0x3010c8,_0x303dda){const _0x11d4bb=_0x402093;if(_0x4117d1[_0x11d4bb(0x2aa)]!==_0x11d4bb(0x24c))return;const _0x59f8db=this[_0x11d4bb(0x2c9)],_0x485c6d=_0x59f8db[_0x11d4bb(0x441)]?.[_0x3010c8];if(_0x485c6d===null||_0x485c6d===undefined||_0x485c6d===0x0)return;if(_0x303dda>=_0x485c6d)throw new _0x253bef(_0x11d4bb(0x205)+_0x3010c8+'\x20('+_0x303dda+'/'+_0x485c6d+')',_0x11d4bb(0x4aa),{'limit':_0x3010c8,'current':_0x303dda,'max':_0x485c6d});}async[_0x402093(0x56f)](_0xad5a63){const _0x485776=_0x402093;let _0x599608;try{_0x599608=_0x65480a[_0x485776(0x304)](_0xad5a63);}catch(_0x7921f1){throw new _0x253bef(_0x485776(0x236)+_0x7921f1['message'],_0x485776(0x30c));}let _0x2d75ef;try{_0x2d75ef=_0x559bb6['verify'](null,_0x599608[_0x485776(0x3dd)],_0x4117d1[_0x485776(0x3c4)],_0x599608[_0x485776(0x3ba)]);}catch(_0x442590){throw new _0x253bef(_0x485776(0x219)+_0x442590['message'],_0x485776(0x30c));}if(!_0x2d75ef)throw new _0x253bef('License\x20signature\x20invalid\x20—\x20this\x20license\x20was\x20not\x20signed\x20by\x20the\x20key\x20paired\x20with\x20this\x20build.\x20'+(_0x485776(0x563)+_0x4117d1[_0x485776(0x17f)]+'.\x20')+_0x485776(0x128),_0x485776(0x30c),{'expectedFingerprint':_0x4117d1['PUB_FINGERPRINT']});if(_0x599608[_0x485776(0x4af)][_0x485776(0x53c)]===_0x3cb19d){const _0x44955b=_0x599608[_0x485776(0x4af)][_0x485776(0x5a2)]-_0x599608['decoded']['issuedAt'];if(_0x44955b>_0x54b52a)throw new _0x253bef(_0x485776(0x393)+Math[_0x485776(0x1ab)](_0x44955b/(0x1e*0x5265c00))+_0x485776(0x574),_0x485776(0x30c));}const _0x377f5d=this[_0x485776(0x270)][_0x485776(0x320)];await _0x4dc0f9(_0x377f5d);const _0x258e2d=_0x65480a['licenseHash'](_0x599608[_0x485776(0x34e)])[_0x485776(0x42a)](_0x485776(0x107));for(const {key:_0x5caae0,value:_0x351c45}of _0x377f5d[_0x485776(0x5f9)](_0x105ab8)){if(_0x351c45[_0x485776(0x468)]===_0x258e2d)throw new _0x253bef(_0x485776(0x19b),_0x485776(0x1fb),{'id':_0x5caae0});}const _0x79b30e=_0x559bb6[_0x485776(0x5c6)](_0x485776(0x5f1))[_0x485776(0x40c)](_0x485776(0x522))['update'](_0x599608[_0x485776(0x34e)])[_0x485776(0x38c)]('hex'),_0x21125e=_0x79b30e[_0x485776(0x19f)](0x0,0x8)+'-'+_0x79b30e[_0x485776(0x19f)](0x8,0xc)+'-5'+_0x79b30e[_0x485776(0x19f)](0xd,0x10)+'-'+(parseInt(_0x79b30e[0x10],0x10)&0x3|0x8)['toString'](0x10)+_0x79b30e[_0x485776(0x19f)](0x11,0x14)+'-'+_0x79b30e['slice'](0x14,0x20),_0x4fb174={'blob':_0xad5a63,'activation':null,'addedAt':Date[_0x485776(0x477)](),'_licenseHash':_0x258e2d,'licensee':_0x599608[_0x485776(0x4af)][_0x485776(0x413)],'expiresAt':_0x599608[_0x485776(0x4af)][_0x485776(0x5a2)],'features':_0x599608[_0x485776(0x4af)]['features'],'limits':_0x599608[_0x485776(0x4af)][_0x485776(0x441)],'licenseType':_0x599608[_0x485776(0x4af)][_0x485776(0x53c)]};return await _0x377f5d['put'](_0x105ab8,_0x21125e,_0x4fb174),{'id':_0x21125e,..._0x4fb174};}async[_0x402093(0x338)](_0xd12b4c){const _0x55ffe2=_0x402093;let _0x2a34e7;try{_0x2a34e7=_0x65480a['decodeActivationToken'](_0xd12b4c);}catch(_0x1659d3){throw new _0x253bef('Invalid\x20activation\x20token:\x20'+_0x1659d3[_0x55ffe2(0x141)],_0x55ffe2(0x333));}const _0x555383=_0x2a34e7[_0x55ffe2(0x1ac)][_0x55ffe2(0x42a)](_0x55ffe2(0x107)),_0x442501=this[_0x55ffe2(0x270)][_0x55ffe2(0x320)];if(!_0x442501||!_0x442501['hasType'](_0x105ab8))throw new _0x253bef(_0x55ffe2(0x191),_0x55ffe2(0x333));let _0x215e7d=null,_0x5ef356=null;for(const {key:_0x4f3641,value:_0x4b875d}of _0x442501[_0x55ffe2(0x5f9)](_0x105ab8)){if(_0x4b875d['_licenseHash']===_0x555383){_0x215e7d=_0x4f3641,_0x5ef356=_0x4b875d;break;}}if(!_0x215e7d)throw new _0x253bef(_0x55ffe2(0x191),'LICENSE_ACTIVATION_INVALID');const {rawBuf:_0xdee094}=_0x65480a[_0x55ffe2(0x304)](_0x5ef356[_0x55ffe2(0x2e8)]),_0x29fcf6=_0x65480a[_0x55ffe2(0x299)]({'tokenString':_0xd12b4c,'nodeId':this['okdb']['id'],'rawBlobBuf':_0xdee094,'pubKeyPem':_0x4117d1[_0x55ffe2(0x3c4)],'pubFingerprint':_0x4117d1[_0x55ffe2(0x17f)]});if(!_0x29fcf6[_0x55ffe2(0x3c1)])throw new _0x253bef(_0x55ffe2(0x27e)+_0x29fcf6[_0x55ffe2(0x16e)],_0x55ffe2(0x333),{'reason':_0x29fcf6[_0x55ffe2(0x16e)]});const _0x566dcb={..._0x5ef356,'activation':_0xd12b4c};return await _0x442501[_0x55ffe2(0x40c)](_0x105ab8,_0x215e7d,_0x566dcb),{'id':_0x215e7d,..._0x566dcb};}async[_0x402093(0x194)](_0x4af8cb){const _0x358224=_0x402093,_0x518cb8=this['okdb'][_0x358224(0x320)];if(!_0x518cb8||!_0x518cb8[_0x358224(0x4bf)](_0x105ab8))return;await _0x518cb8[_0x358224(0x361)](_0x105ab8,_0x4af8cb);}async['listLicenses'](){const _0x34f57b=_0x402093,_0x187e35=this[_0x34f57b(0x270)][_0x34f57b(0x320)];if(!_0x187e35||!_0x187e35['hasType'](_0x105ab8))return[];const _0x512411=this[_0x34f57b(0x270)]['id'],_0x467f52=[];for(const {key:_0x2f980,value:_0x653e89}of _0x187e35['getRange'](_0x105ab8)){const _0x3f0ee5=this[_0x34f57b(0x2b4)](_0x653e89,_0x512411);_0x467f52['push']({..._0x653e89,'id':_0x2f980,'status':_0x3f0ee5});}return _0x467f52;}[_0x402093(0x11f)](){const _0x58ca32=_0x402093,_0x31f2c8=this['okdb'][_0x58ca32(0x320)];if(!_0x31f2c8||!_0x31f2c8[_0x58ca32(0x4bf)](_0x105ab8))return[];const _0x4973dd=this[_0x58ca32(0x270)]['id'],_0x3c880a=[];for(const {key:_0x33f693,value:_0x3f78d5}of _0x31f2c8[_0x58ca32(0x5f9)](_0x105ab8)){if(_0x3f78d5[_0x58ca32(0x468)]){if(_0x3f78d5[_0x58ca32(0x53c)]===_0x3cb19d)_0x3c880a[_0x58ca32(0x38d)]({'licenseId':_0x33f693,'pin':null});else{const _0x1c44ba=Buffer[_0x58ca32(0x41c)](_0x3f78d5[_0x58ca32(0x468)],_0x58ca32(0x107)),{pin:_0x5972f2}=_0x65480a['derivePin'](_0x4973dd,_0x1c44ba,_0x4117d1['PUB_FINGERPRINT']);_0x3c880a[_0x58ca32(0x38d)]({'licenseId':_0x33f693,'pin':_0x5972f2});}}}return _0x3c880a;}async[_0x402093(0x5ca)](){const _0x251b83=_0x402093,_0x53843d=this[_0x251b83(0x452)];await this[_0x251b83(0x363)]();if(this[_0x251b83(0x452)]&&this[_0x251b83(0x452)][_0x251b83(0x53c)]===_0x3cb19d){const _0x5a546f=Math[_0x251b83(0x1ab)]((this[_0x251b83(0x452)][_0x251b83(0x5a2)]-Date[_0x251b83(0x477)]())/0x5265c00);this[_0x251b83(0x270)]['log']?.[_0x251b83(0x33b)](_0x251b83(0x42b)+_0x5a546f+'\x20day(s).',{'feature':_0x251b83(0x15d),'licensee':this[_0x251b83(0x452)][_0x251b83(0x413)],'expiresAt':new Date(this[_0x251b83(0x452)]['expiresAt'])['toISOString']()});}this[_0x251b83(0x452)]&&this[_0x251b83(0x452)]['licenseType']===_0x10fd18&&this[_0x251b83(0x270)][_0x251b83(0x18c)]?.[_0x251b83(0x33b)]('⚠\x20INTERNAL\x20LICENSE\x20ACTIVE\x20—\x20all\x20features\x20and\x20limits\x20are\x20unlocked.\x20For\x20vendor/internal\x20use\x20only.',{'feature':_0x251b83(0x15d),'licensee':this[_0x251b83(0x452)]['licensee']});if(_0x53843d&&!this['_active']){this['okdb'][_0x251b83(0x18c)]?.[_0x251b83(0x33b)](_0x251b83(0x4c3),{'feature':_0x251b83(0x15d)}),this['okdb']['events']?.[_0x251b83(0x1dc)](_0x39c416[_0x251b83(0x30c)],{'previous':_0x53843d});const _0x57d98f=this[_0x251b83(0x270)][_0x251b83(0x266)]?.[_0x251b83(0x5eb)]??_0x4117d1[_0x251b83(0x146)];_0x57d98f===_0x251b83(0x4ec)&&(this[_0x251b83(0x270)][_0x251b83(0x18c)]?.[_0x251b83(0x54f)](_0x251b83(0x112),{'feature':_0x251b83(0x15d)}),this[_0x251b83(0x270)]['close']()[_0x251b83(0x29f)](()=>{})[_0x251b83(0x418)](()=>process[_0x251b83(0x5d6)](0x1)));}}}return okdbLicense={'LicenseChecker':_0x32dbed,'_C':_0x4117d1,'FREE_TIER':_0x49a04},okdbLicense;}var okdbShell,hasRequiredOkdbShell;function requireOkdbShell(){const _0x58068e=_0x1577db;if(hasRequiredOkdbShell)return okdbShell;hasRequiredOkdbShell=0x1;const _0x2cde4b=require$$0$3,_0x52d525=require$$1$1,_0x143f7a=require$$0,_0x16cbfe=require$$1,_0x55eeb7=_0x16cbfe[_0x58068e(0x24f)](_0x143f7a[_0x58068e(0x1d3)](),_0x58068e(0x484)),_0x20a50d=0x3e8,_0x20a6d0={'reset':_0x58068e(0x476),'bold':_0x58068e(0x224),'dim':'\x1b[2m','red':_0x58068e(0x4b5),'green':_0x58068e(0x5af),'yellow':_0x58068e(0x457),'blue':_0x58068e(0x575),'magenta':_0x58068e(0x3e2),'cyan':_0x58068e(0x353),'white':'\x1b[37m','gray':_0x58068e(0x346)},_0x6e802b=!process['stdout']['isTTY']||!!process.env.NO_COLOR,_0x5179a4=(_0x16290a,_0x20070a)=>_0x6e802b?_0x20070a:''+_0x16290a+_0x20070a+_0x20a6d0[_0x58068e(0x5cc)],_0x2a39e5={'error':_0x20a6d0[_0x58068e(0x2d7)],'warn':_0x20a6d0['yellow'],'info':_0x20a6d0[_0x58068e(0x37d)],'debug':_0x20a6d0[_0x58068e(0x113)]},_0x515ae8={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3};function _0x5681ac(_0x38a91c,_0x6878eb=_0x58068e(0x296)){const _0x2b840a=_0x58068e,{level:_0x420ef9,msg:_0x43a0dd,meta:_0x441d9a,context:_0x360091,ts:_0x4abf03}=_0x38a91c;if((_0x515ae8[_0x420ef9]??0x1)<(_0x515ae8[_0x6878eb]??0x1))return;const _0x192995=_0x5179a4(_0x20a6d0[_0x2b840a(0x113)],new Date(_0x4abf03)['toISOString']()),_0x86231b=_0x5179a4(_0x2a39e5[_0x420ef9]??_0x20a6d0[_0x2b840a(0x155)],_0x420ef9[_0x2b840a(0x57b)](0x5));let _0x499b26='\x20\x20'+_0x192995+'\x20'+_0x5179a4(_0x20a6d0[_0x2b840a(0x41a)],_0x86231b)+'\x20'+_0x43a0dd;if(_0x441d9a&&Object['keys'](_0x441d9a)[_0x2b840a(0x1f7)]>0x0){const _0x5c1df6=Object[_0x2b840a(0x2fb)](_0x441d9a)['map'](([_0x3489fa,_0xf12c84])=>_0x3489fa+'='+_0xf12c84)[_0x2b840a(0x24f)]('\x20');_0x499b26+=_0x5179a4(_0x20a6d0[_0x2b840a(0x507)],'\x20\x20['+_0x5c1df6+']');}if(_0x360091!==undefined){const _0x177e28=typeof _0x360091===_0x2b840a(0x215)?JSON[_0x2b840a(0x15f)](_0x360091):String(_0x360091);_0x499b26+=_0x5179a4(_0x20a6d0[_0x2b840a(0x507)],'\x20\x20'+_0x177e28);}const _0x495cd0=_0x420ef9===_0x2b840a(0x54f)||_0x420ef9===_0x2b840a(0x33b)?process[_0x2b840a(0x29d)]['write'][_0x2b840a(0x229)](process[_0x2b840a(0x29d)]):process['stdout'][_0x2b840a(0x340)]['bind'](process['stdout']);_0x495cd0(_0x499b26+'\x0a');}function _0xbd0bb8(_0x4b104d,_0x1786df){const _0xf766b8=_0x58068e;if(_0x4b104d===0xcc||_0x4b104d>=0xc8&&_0x4b104d<0x12c&&!_0x1786df){console[_0xf766b8(0x18c)](_0xf766b8(0x23f)+_0x5179a4(_0x20a6d0[_0xf766b8(0x33c)],'✓')+'\x0a');return;}if(_0x4b104d>=0x190||_0x1786df?.[_0xf766b8(0x54f)]){const _0x130ee1=_0x1786df?.[_0xf766b8(0x54f)]??_0x1786df?.[_0xf766b8(0x141)]??_0xf766b8(0x2a2)+_0x4b104d;console[_0xf766b8(0x18c)](_0xf766b8(0x23f)+_0x5179a4(_0x20a6d0['red'],'✗')+'\x20'+_0x5179a4(_0x20a6d0[_0xf766b8(0x41a)]+_0x20a6d0[_0xf766b8(0x2d7)],String(_0x4b104d))+'\x20\x20'+_0x130ee1+'\x0a');return;}const _0x5ba54c=Object[_0xf766b8(0x21a)][_0xf766b8(0x52d)]['call'](_0x1786df??{},_0xf766b8(0x21e))?_0x1786df[_0xf766b8(0x21e)]:_0x1786df,_0x5e55f1=_0x1786df?.['meta'];console[_0xf766b8(0x18c)](''),_0x59c92d(_0x5ba54c,'\x20\x20');if(_0x5e55f1?.[_0xf766b8(0x2cc)]!=null||_0x5e55f1?.[_0xf766b8(0x2e4)]!=null){const _0x4b3d9b=[];if(_0x5e55f1[_0xf766b8(0x2cc)]!=null)_0x4b3d9b[_0xf766b8(0x38d)](_0x5e55f1['count']+_0xf766b8(0x3fe)+(_0x5e55f1['count']!==0x1?'s':''));if(_0x5e55f1[_0xf766b8(0x2e4)]!=null)_0x4b3d9b[_0xf766b8(0x38d)](_0x5e55f1[_0xf766b8(0x2e4)]+'ms');console['log'](_0xf766b8(0x23f)+_0x5179a4(_0x20a6d0[_0xf766b8(0x507)],_0x4b3d9b['join'](_0xf766b8(0x5dc))));}console['log']('');}function _0x59c92d(_0x39340e,_0x3c12fd=''){const _0x299494=_0x58068e;if(_0x39340e===null||_0x39340e===undefined){console['log'](_0x3c12fd+_0x5179a4(_0x20a6d0[_0x299494(0x507)],'(null)'));return;}if(Array[_0x299494(0x14b)](_0x39340e)){if(_0x39340e[_0x299494(0x1f7)]===0x0){console['log'](_0x3c12fd+_0x5179a4(_0x20a6d0[_0x299494(0x507)],'(empty)'));return;}if(_0x39340e[_0x299494(0x2d1)](_0xcd1d20=>_0xcd1d20&&typeof _0xcd1d20===_0x299494(0x215)&&'key'in _0xcd1d20&&'value'in _0xcd1d20)){_0xb3da4(_0x39340e,_0x3c12fd);return;}if(_0x39340e[_0x299494(0x2d1)](_0x8f3038=>_0x8f3038&&typeof _0x8f3038==='object'&&_0x299494(0x153)in _0x8f3038&&_0x299494(0x2cc)in _0x8f3038)){_0x1bb6bf(_0x39340e,_0x3c12fd);return;}if(_0x39340e[_0x299494(0x2d1)](_0x194540=>typeof _0x194540!==_0x299494(0x215)||_0x194540===null)){_0x39340e['forEach']((_0x34fdb4,_0x246c69)=>console[_0x299494(0x18c)](_0x3c12fd+_0x5179a4(_0x20a6d0[_0x299494(0x113)],_0x246c69+0x1+'.')+'\x20'+_0x5179a4(_0x20a6d0['white'],String(_0x34fdb4))));return;}_0x39340e[_0x299494(0x2f3)]((_0x4b7b9d,_0x1ad321)=>{const _0x27f886=_0x299494;console['log'](_0x3c12fd+_0x5179a4(_0x20a6d0[_0x27f886(0x507)],'['+_0x1ad321+']'));if(typeof _0x4b7b9d===_0x27f886(0x215)&&_0x4b7b9d!==null)_0x235d8c(_0x4b7b9d,_0x3c12fd+'\x20\x20');else console[_0x27f886(0x18c)](_0x3c12fd+'\x20\x20'+String(_0x4b7b9d));});return;}if(typeof _0x39340e===_0x299494(0x215)){if(_0x299494(0x4be)in _0x39340e&&_0x299494(0x32f)in _0x39340e&&Object[_0x299494(0x59d)](_0x39340e)[_0x299494(0x1f7)]<=0x3){console[_0x299494(0x18c)](_0x3c12fd+_0x5179a4(_0x20a6d0[_0x299494(0x41a)]+_0x20a6d0[_0x299494(0x37d)],String(_0x39340e[_0x299494(0x4be)])));const _0x3f4cdf=_0x39340e[_0x299494(0x32f)];if(_0x3f4cdf&&typeof _0x3f4cdf===_0x299494(0x215))_0x235d8c(_0x3f4cdf,_0x3c12fd);else console['log'](_0x3c12fd+_0x5179a4(_0x20a6d0[_0x299494(0x155)],String(_0x3f4cdf)));return;}_0x235d8c(_0x39340e,_0x3c12fd);return;}console[_0x299494(0x18c)](_0x3c12fd+_0x5179a4(_0x20a6d0[_0x299494(0x155)],String(_0x39340e)));}function _0x235d8c(_0x4546a6,_0x50b0eb=''){const _0x375104=_0x58068e,_0x570554=Object[_0x375104(0x2fb)](_0x4546a6);if(_0x570554[_0x375104(0x1f7)]===0x0){console[_0x375104(0x18c)](_0x50b0eb+_0x5179a4(_0x20a6d0[_0x375104(0x507)],'{}'));return;}const _0x482a50=Math[_0x375104(0x4a0)](0x1c,Math['max'](..._0x570554[_0x375104(0x4d3)](([_0x211e98])=>_0x211e98[_0x375104(0x1f7)])));for(const [_0x589144,_0x30e54c]of _0x570554){const _0x2b9beb=_0x5179a4(_0x20a6d0[_0x375104(0x37d)],_0x589144['padEnd'](_0x482a50));if(_0x30e54c===null||_0x30e54c===undefined)console['log'](_0x50b0eb+_0x2b9beb+'\x20\x20'+_0x5179a4(_0x20a6d0[_0x375104(0x507)],'null'));else{if(typeof _0x30e54c===_0x375104(0x215)){const _0x1bb6e9=JSON[_0x375104(0x15f)](_0x30e54c);_0x1bb6e9[_0x375104(0x1f7)]<=0x50?console[_0x375104(0x18c)](_0x50b0eb+_0x2b9beb+'\x20\x20'+_0x5179a4(_0x20a6d0[_0x375104(0x507)],_0x1bb6e9)):(console[_0x375104(0x18c)](_0x50b0eb+_0x2b9beb),_0x59c92d(_0x30e54c,_0x50b0eb+'\x20\x20'));}else{const _0x4f6361=typeof _0x30e54c===_0x375104(0x4d7)?_0x5179a4(_0x30e54c?_0x20a6d0[_0x375104(0x33c)]:_0x20a6d0['yellow'],String(_0x30e54c)):typeof _0x30e54c==='number'?_0x5179a4(_0x20a6d0[_0x375104(0x2e1)],String(_0x30e54c)):_0x5179a4(_0x20a6d0[_0x375104(0x155)],String(_0x30e54c));console[_0x375104(0x18c)](_0x50b0eb+_0x2b9beb+'\x20\x20'+_0x4f6361);}}}}function _0xb3da4(_0x3d9d00,_0x4118bd=''){const _0xc9dca4=_0x58068e,_0x27ba23=Math[_0xc9dca4(0x4a0)](0x20,Math[_0xc9dca4(0x5bc)](..._0x3d9d00['map'](_0x1b3a23=>String(_0x1b3a23['key'])['length'])));for(const {key:_0x19e6bf,value:_0x2601c0,score:_0x3a00cf,clock:_0x4fbac1}of _0x3d9d00){const _0x1f2f88=_0x5179a4(_0x20a6d0[_0xc9dca4(0x41a)]+_0x20a6d0[_0xc9dca4(0x37d)],String(_0x19e6bf)[_0xc9dca4(0x57b)](_0x27ba23)),_0x416492=_0x2601c0==null?_0x5179a4(_0x20a6d0[_0xc9dca4(0x507)],_0xc9dca4(0x50b)):typeof _0x2601c0===_0xc9dca4(0x215)?_0x5179a4(_0x20a6d0[_0xc9dca4(0x507)],JSON['stringify'](_0x2601c0)):_0x5179a4(_0x20a6d0[_0xc9dca4(0x155)],String(_0x2601c0)),_0x817b15=_0x3a00cf!=null?_0x5179a4(_0x20a6d0['gray'],'\x20\x20score:'+_0x3a00cf['toFixed'](0x4)):'',_0x4dd0e9=_0x4fbac1!=null?_0x5179a4(_0x20a6d0[_0xc9dca4(0x113)],_0xc9dca4(0x286)+_0x4fbac1):'';console[_0xc9dca4(0x18c)](_0x4118bd+_0x1f2f88+'\x20\x20'+_0x416492+_0x817b15+_0x4dd0e9);}}function _0x1bb6bf(_0x3bc336,_0x18008e=''){const _0x1fcf69=_0x58068e,_0x17c9ec=Math[_0x1fcf69(0x4a0)](0x20,Math['max'](..._0x3bc336[_0x1fcf69(0x4d3)](_0x39e2a9=>_0x39e2a9['type'][_0x1fcf69(0x1f7)])));for(const {type:_0x389481,count:_0x444c60,fields:_0x2b6a08}of _0x3bc336){if(_0x389481[_0x1fcf69(0x5b6)]('~'))continue;const _0x13965f=_0x5179a4(_0x20a6d0[_0x1fcf69(0x41a)]+_0x20a6d0[_0x1fcf69(0x37d)],_0x389481['padEnd'](_0x17c9ec)),_0x599e5f=_0x5179a4(_0x20a6d0[_0x1fcf69(0x2e1)],String(_0x444c60)[_0x1fcf69(0x379)](0x6))+_0x5179a4(_0x20a6d0[_0x1fcf69(0x507)],_0x1fcf69(0x208)),_0x2c1b07=_0x2b6a08&&Object[_0x1fcf69(0x59d)](_0x2b6a08)[_0x1fcf69(0x1f7)]?_0x5179a4(_0x20a6d0[_0x1fcf69(0x507)],_0x1fcf69(0x40d)+Object[_0x1fcf69(0x59d)](_0x2b6a08)[_0x1fcf69(0x19f)](0x0,0x6)[_0x1fcf69(0x24f)](',\x20')+(Object[_0x1fcf69(0x59d)](_0x2b6a08)['length']>0x6?'…':'')):'';console[_0x1fcf69(0x18c)](_0x18008e+_0x13965f+'\x20\x20'+_0x599e5f+_0x2c1b07);}}const _0x3501f7=[_0x58068e(0x22e),'type/',_0x58068e(0x12b),'files/',_0x58068e(0x5ab),_0x58068e(0x594)];function _0x2a61a0(_0x4744bb,_0x1e01bb){const _0x266dd4=_0x58068e;if(_0x4744bb[_0x266dd4(0x5b6)](_0x266dd4(0x48e)))return _0x4744bb;if(_0x4744bb['startsWith']('/'))return _0x266dd4(0x544)+_0x4744bb;if(_0x4744bb[_0x266dd4(0x5b6)](_0x266dd4(0x439)))return _0x266dd4(0x48e)+_0x4744bb;const _0xee3b6=_0x3501f7['some'](_0x541926=>_0x4744bb===_0x541926[_0x266dd4(0x288)](/\/$/,'')||_0x4744bb[_0x266dd4(0x5b6)](_0x541926));return _0xee3b6?_0x266dd4(0x204)+_0x1e01bb+'/'+_0x4744bb:_0x266dd4(0x48e)+_0x4744bb;}function _0x104353(_0x4b82c3){const _0x4d45d0=_0x58068e,_0x536277={},_0x44ff7b=[];let _0x8e123d=0x0;while(_0x8e123d<_0x4b82c3[_0x4d45d0(0x1f7)]){if((_0x4b82c3[_0x8e123d]==='--env'||_0x4b82c3[_0x8e123d]==='-e')&&_0x4b82c3[_0x8e123d+0x1]&&!_0x4b82c3[_0x8e123d+0x1][_0x4d45d0(0x5b6)]('-'))_0x536277['env']=_0x4b82c3[++_0x8e123d];else _0x4b82c3[_0x8e123d]==='--help'||_0x4b82c3[_0x8e123d]==='-h'?_0x536277[_0x4d45d0(0x400)]=!![]:_0x44ff7b[_0x4d45d0(0x38d)](_0x4b82c3[_0x8e123d]);_0x8e123d++;}return{'flags':_0x536277,'rest':_0x44ff7b};}const _0x97f0f0={'system':_0x58068e(0x5cb),'envs':_0x58068e(0x2a3),'types':_0x58068e(0x2d6),'data':_0x58068e(0x57c),'indexes':_0x58068e(0x2a6),'fts':_0x58068e(0x197),'sync':_0x58068e(0x263),'queue':'Queue','files':_0x58068e(0x482),'embeddings':_0x58068e(0x364),'engines':_0x58068e(0x5aa),'admin':'Admin','event':_0x58068e(0x130),'processor':'Processors'},_0x3f6fc7=[_0x58068e(0x297),_0x58068e(0x1d4),'types',_0x58068e(0x415),'indexes',_0x58068e(0x331),'sync',_0x58068e(0x3b0),_0x58068e(0x34a),_0x58068e(0x3a7),'engines',_0x58068e(0x46e)];function _0x5f38ed(_0x3368b4){const _0x37fb37=_0x58068e;return _0x3368b4['replace'](/^\/api/,'')[_0x37fb37(0x288)](/^\[\/env\/:env=[^\]]*\]/,_0x37fb37(0x56b))['replace'](/^\/env\/:env/,_0x37fb37(0x3c7))[_0x37fb37(0x288)](/^\//,'');}function _0x262214(_0x10a468,_0x2e4d7a=''){const _0x36f538=_0x58068e,_0x3b47e7=_0x10a468[_0x36f538(0x4cb)][_0x36f538(0x3a2)]()[_0x36f538(0x43d)](_0x48d685=>!_0x48d685[_0x36f538(0x1bc)]?.[_0x36f538(0x314)]),_0x1ff850=_0x2e4d7a?_0x3b47e7[_0x36f538(0x43d)](_0x2ad129=>_0x2ad129[_0x36f538(0x242)][_0x36f538(0x402)]()[_0x36f538(0x184)](_0x2e4d7a['toLowerCase']())||(_0x31e774(_0x2ad129)??'')['toLowerCase']()['includes'](_0x2e4d7a[_0x36f538(0x402)]())||_0x2dff2a(_0x2ad129)['some'](_0x7225bd=>_0x7225bd[_0x36f538(0x402)]()[_0x36f538(0x184)](_0x2e4d7a['toLowerCase']()))):_0x3b47e7;if(!_0x1ff850[_0x36f538(0x1f7)]){console[_0x36f538(0x18c)](_0x5179a4(_0x20a6d0[_0x36f538(0x429)],_0x36f538(0x436)+_0x2e4d7a+'\x22\x0a'));return;}const _0x1a5f8a=new Map();for(const _0x5129f0 of _0x1ff850){const _0x5044a1=_0x2dff2a(_0x5129f0)[0x0]??_0x36f538(0x22b);if(!_0x1a5f8a['has'](_0x5044a1))_0x1a5f8a[_0x36f538(0x339)](_0x5044a1,[]);_0x1a5f8a[_0x36f538(0x2e5)](_0x5044a1)[_0x36f538(0x38d)](_0x5129f0);}const _0x44a9ca=[..._0x3f6fc7[_0x36f538(0x43d)](_0x23ed40=>_0x1a5f8a['has'](_0x23ed40)),...[..._0x1a5f8a['keys']()]['filter'](_0x498fa1=>!_0x3f6fc7[_0x36f538(0x184)](_0x498fa1))];console[_0x36f538(0x18c)]('');for(const _0x4a686a of _0x44a9ca){const _0x4b0eda=_0x1a5f8a['get'](_0x4a686a);if(!_0x4b0eda?.['length'])continue;console[_0x36f538(0x18c)](_0x5179a4(_0x20a6d0['bold'],'\x20\x20'+(_0x97f0f0[_0x4a686a]??_0x4a686a)));for(const _0x537614 of _0x4b0eda){const _0x39edcd=_0x5179a4(_0x20a6d0[_0x36f538(0x2e1)],_0x537614[_0x36f538(0x5e6)][_0x36f538(0x57b)](0x7)),_0x4724ef=_0x5179a4(_0x20a6d0[_0x36f538(0x37d)],_0x5f38ed(_0x537614[_0x36f538(0x242)])),_0x9dd30a=_0x31e774(_0x537614)?_0x5179a4(_0x20a6d0[_0x36f538(0x507)],'\x20\x20'+_0x31e774(_0x537614)):'',_0x532e55=_0x537614[_0x36f538(0x13b)]?.['id']?_0x5179a4(_0x20a6d0[_0x36f538(0x113)],_0x36f538(0x5c3)+_0x537614['operation']['id']+']'):'';console[_0x36f538(0x18c)]('\x20\x20\x20\x20'+_0x39edcd+'\x20'+_0x4724ef+_0x9dd30a+_0x532e55);}console[_0x36f538(0x18c)]('');}}function _0x13da4c(_0x5a80bc,_0x2fd38b){const _0x370cbf=_0x58068e,_0x18aa3a=_0x2fd38b['replace'](/^\/api(\/env\/[^/]+)?\//,'')['split']('/')[0x0],_0x5d0f57=_0x5a80bc[_0x370cbf(0x4cb)][_0x370cbf(0x3a2)]()['filter'](_0x420453=>_0x420453[_0x370cbf(0x242)][_0x370cbf(0x402)]()[_0x370cbf(0x184)](_0x18aa3a[_0x370cbf(0x402)]()));if(!_0x5d0f57[_0x370cbf(0x1f7)]){console['log'](_0x5179a4(_0x20a6d0[_0x370cbf(0x429)],'\x0a\x20\x20No\x20documentation\x20found\x20for:\x20'+_0x2fd38b+'\x0a'));return;}console[_0x370cbf(0x18c)]('');for(const _0x201de8 of _0x5d0f57[_0x370cbf(0x19f)](0x0,0xc)){for(const _0x178283 of _0x1ad9e7(_0x201de8)){console['log'](_0x178283);}console[_0x370cbf(0x18c)]('');}}function _0x31e774(_0x4d06a6){const _0x3a4e84=_0x58068e;return _0x4d06a6[_0x3a4e84(0x13b)]?.['summary']??_0x4d06a6['meta']?.[_0x3a4e84(0x275)]??'';}function _0x4e2af9(_0x156ef3){const _0x3e9097=_0x58068e;return _0x156ef3[_0x3e9097(0x13b)]?.['description']??_0x156ef3[_0x3e9097(0x1bc)]?.[_0x3e9097(0x45e)]??'';}function _0x2dff2a(_0x33f5c4){const _0x579a45=_0x58068e;return _0x33f5c4[_0x579a45(0x13b)]?.[_0x579a45(0x46b)]?.[_0x579a45(0x1f7)]?_0x33f5c4['operation'][_0x579a45(0x46b)]:_0x33f5c4['meta']?.[_0x579a45(0x46b)]??[];}function _0x1ad9e7(_0x475577){const _0xc3be72=_0x58068e,_0x276bda=[];_0x276bda['push']('\x20\x20'+_0x5179a4(_0x20a6d0[_0xc3be72(0x41a)]+_0x20a6d0[_0xc3be72(0x2e1)],_0x475577[_0xc3be72(0x5e6)]['padEnd'](0x7))+'\x20'+_0x5179a4(_0x20a6d0[_0xc3be72(0x41a)]+_0x20a6d0['cyan'],_0x475577[_0xc3be72(0x242)]));_0x475577[_0xc3be72(0x13b)]?.['id']&&_0x276bda[_0xc3be72(0x38d)](_0xc3be72(0x1e8)+_0x5179a4(_0x20a6d0[_0xc3be72(0x113)],_0xc3be72(0x366)+_0x475577['operation']['id']));_0x31e774(_0x475577)&&_0x276bda[_0xc3be72(0x38d)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x5179a4(_0x20a6d0[_0xc3be72(0x155)],_0x31e774(_0x475577)));_0x4e2af9(_0x475577)&&_0x276bda[_0xc3be72(0x38d)](_0xc3be72(0x1e8)+_0x5179a4(_0x20a6d0[_0xc3be72(0x507)],_0x4e2af9(_0x475577)));_0x2dff2a(_0x475577)[_0xc3be72(0x1f7)]&&_0x276bda[_0xc3be72(0x38d)](_0xc3be72(0x1e8)+_0x5179a4(_0x20a6d0[_0xc3be72(0x113)],_0xc3be72(0x450)+_0x2dff2a(_0x475577)[_0xc3be72(0x24f)](',\x20')));_0x475577[_0xc3be72(0x13b)]?.['safety']?.[_0xc3be72(0x48d)]&&_0x276bda[_0xc3be72(0x38d)](_0xc3be72(0x1e8)+_0x5179a4(_0x20a6d0[_0xc3be72(0x113)],_0xc3be72(0x162)+_0x475577['operation'][_0xc3be72(0x5b1)]['access']));_0x475577[_0xc3be72(0x13b)]?.[_0xc3be72(0x4cb)]?.[_0xc3be72(0x4e4)]&&_0x475577[_0xc3be72(0x13b)][_0xc3be72(0x4cb)]['transport']!==_0xc3be72(0x394)&&_0x276bda['push'](_0xc3be72(0x1e8)+_0x5179a4(_0x20a6d0[_0xc3be72(0x113)],_0xc3be72(0x137)+_0x475577[_0xc3be72(0x13b)][_0xc3be72(0x4cb)]['transport']));if(_0x475577[_0xc3be72(0x13b)]?.['inputSchema']){const _0xd1fdcb=Object[_0xc3be72(0x59d)](_0x475577[_0xc3be72(0x13b)][_0xc3be72(0x416)][_0xc3be72(0x254)]||{});if(_0xd1fdcb[_0xc3be72(0x1f7)])_0x276bda[_0xc3be72(0x38d)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x5179a4(_0x20a6d0[_0xc3be72(0x113)],_0xc3be72(0x203)+_0xd1fdcb['join'](',\x20')));}return _0x475577[_0xc3be72(0x1bc)]?.[_0xc3be72(0x487)]&&_0x276bda[_0xc3be72(0x38d)](_0xc3be72(0x1e8)+_0x5179a4(_0x20a6d0[_0xc3be72(0x113)],_0xc3be72(0x182)+JSON['stringify'](_0x475577['meta'][_0xc3be72(0x487)]))),_0x276bda;}async function _0x23c5b4(_0x56a562,_0x50becb,_0x277aae,_0xc31db7=null){const _0x2b5131=_0x58068e,_0x4920ab=_0x277aae[_0x2b5131(0x5c4)]('?'),_0x26a949=_0x4920ab>=0x0?_0x277aae['slice'](0x0,_0x4920ab):_0x277aae,_0x235b54=_0x4920ab>=0x0?_0x277aae[_0x2b5131(0x19f)](_0x4920ab+0x1):'',_0x4c6b62=Object[_0x2b5131(0x25a)](new URLSearchParams(_0x235b54)['entries']());return _0x56a562[_0x2b5131(0x4cb)][_0x2b5131(0x243)](_0x50becb,_0x26a949,{'body':_0xc31db7,'query':_0x4c6b62,'headers':{'content-type':_0x2b5131(0x56d)}},{'internal':!![]});}function _0x1451cf(_0x2e8bf5){const _0x233f04=_0x58068e;if(!_0x2e8bf5)return null;const _0x485c7b=_0x2e8bf5[_0x233f04(0x25d)]();if(!_0x485c7b)return null;try{return JSON['parse'](_0x485c7b);}catch{}try{return JSON[_0x233f04(0x2bc)](_0x4dc666(_0x485c7b));}catch(_0x1bfbbe){throw new SyntaxError(_0x1bfbbe[_0x233f04(0x141)],{'cause':_0x1bfbbe});}}function _0x4dc666(_0x50feba){const _0x1e72d2=_0x58068e;let _0x15b701='',_0x5837c6=0x0;while(_0x5837c6<_0x50feba[_0x1e72d2(0x1f7)]){const _0x33646e=_0x50feba[_0x5837c6];if(_0x33646e==='\x22'){_0x15b701+='\x22',_0x5837c6++;while(_0x5837c6<_0x50feba[_0x1e72d2(0x1f7)]&&_0x50feba[_0x5837c6]!=='\x22'){if(_0x50feba[_0x5837c6]==='\x5c'){_0x15b701+=_0x50feba[_0x5837c6++];if(_0x5837c6<_0x50feba[_0x1e72d2(0x1f7)])_0x15b701+=_0x50feba[_0x5837c6++];}else _0x15b701+=_0x50feba[_0x5837c6++];}_0x15b701+='\x22';if(_0x5837c6<_0x50feba[_0x1e72d2(0x1f7)])_0x5837c6++;continue;}if(_0x33646e==='\x27'){_0x15b701+='\x22',_0x5837c6++;while(_0x5837c6<_0x50feba[_0x1e72d2(0x1f7)]&&_0x50feba[_0x5837c6]!=='\x27'){if(_0x50feba[_0x5837c6]==='\x5c'&&_0x50feba[_0x5837c6+0x1]==='\x27')_0x15b701+='\x27',_0x5837c6+=0x2;else _0x50feba[_0x5837c6]==='\x22'?(_0x15b701+='\x5c\x22',_0x5837c6++):_0x15b701+=_0x50feba[_0x5837c6++];}_0x15b701+='\x22';if(_0x5837c6<_0x50feba['length'])_0x5837c6++;continue;}if(_0x1e72d2(0x478)[_0x1e72d2(0x184)](_0x33646e)){_0x15b701+=_0x33646e,_0x5837c6++;continue;}let _0x5d3fad='';while(_0x5837c6<_0x50feba[_0x1e72d2(0x1f7)]&&!_0x1e72d2(0x2b2)['includes'](_0x50feba[_0x5837c6])&&_0x50feba[_0x5837c6]!=='\x20'&&_0x50feba[_0x5837c6]!=='\x09'&&_0x50feba[_0x5837c6]!=='\x0a'&&_0x50feba[_0x5837c6]!=='\x0d'){_0x5d3fad+=_0x50feba[_0x5837c6++];}let _0x4da5a3=_0x5837c6;while(_0x4da5a3<_0x50feba[_0x1e72d2(0x1f7)]&&(_0x50feba[_0x4da5a3]==='\x20'||_0x50feba[_0x4da5a3]==='\x09'))_0x4da5a3++;if(_0x50feba[_0x4da5a3]===':')_0x15b701+='\x22'+_0x5d3fad+'\x22';else _0x5d3fad===_0x1e72d2(0x24c)||_0x5d3fad==='false'||_0x5d3fad===_0x1e72d2(0x50b)||/^-?\d+(\.\d+)?([eE][+-]?\d+)?$/[_0x1e72d2(0x41d)](_0x5d3fad)?_0x15b701+=_0x5d3fad:_0x15b701+='\x22'+_0x5d3fad+'\x22';}return _0x15b701[_0x1e72d2(0x288)](/,(\s*[}\]])/g,'$1');}function _0x30a136(_0x3b5160){const _0x3cd9b1=_0x58068e,_0x33eb8e=[];let _0x482e75=0x0;while(_0x482e75<_0x3b5160[_0x3cd9b1(0x1f7)]){while(_0x482e75<_0x3b5160[_0x3cd9b1(0x1f7)]&&(_0x3b5160[_0x482e75]==='\x20'||_0x3b5160[_0x482e75]==='\x09'))_0x482e75++;if(_0x482e75>=_0x3b5160[_0x3cd9b1(0x1f7)])break;const _0x5f5ae5=_0x3b5160[_0x482e75];if(_0x5f5ae5==='{'||_0x5f5ae5==='['){const _0x2477a0=_0x5f5ae5==='{'?'}':']',_0x6d58f0=_0x482e75++;let _0xb2c117=0x1,_0x45aa80=![],_0x631165='';while(_0x482e75<_0x3b5160[_0x3cd9b1(0x1f7)]&&_0xb2c117>0x0){const _0x89bc38=_0x3b5160[_0x482e75];if(_0x45aa80){if(_0x89bc38==='\x5c')_0x482e75++;else{if(_0x89bc38===_0x631165)_0x45aa80=![];}}else{if(_0x89bc38==='\x22'||_0x89bc38==='\x27')_0x45aa80=!![],_0x631165=_0x89bc38;else{if(_0x89bc38===_0x5f5ae5)_0xb2c117++;else{if(_0x89bc38===_0x2477a0)_0xb2c117--;}}}_0x482e75++;}_0x33eb8e[_0x3cd9b1(0x38d)](_0x3b5160['slice'](_0x6d58f0,_0x482e75));continue;}if(_0x5f5ae5==='\x22'||_0x5f5ae5==='\x27'){const _0x5c1215=_0x5f5ae5;_0x482e75++;let _0x183a2d='';while(_0x482e75<_0x3b5160[_0x3cd9b1(0x1f7)]&&_0x3b5160[_0x482e75]!==_0x5c1215){if(_0x3b5160[_0x482e75]==='\x5c'&&_0x482e75+0x1<_0x3b5160[_0x3cd9b1(0x1f7)])_0x482e75++,_0x183a2d+=_0x3b5160[_0x482e75++];else _0x183a2d+=_0x3b5160[_0x482e75++];}if(_0x482e75<_0x3b5160[_0x3cd9b1(0x1f7)])_0x482e75++;_0x33eb8e[_0x3cd9b1(0x38d)](_0x183a2d);continue;}let _0x543f0f='';while(_0x482e75<_0x3b5160[_0x3cd9b1(0x1f7)]&&_0x3b5160[_0x482e75]!=='\x20'&&_0x3b5160[_0x482e75]!=='\x09'&&_0x3b5160[_0x482e75]!=='{'&&_0x3b5160[_0x482e75]!=='['){_0x543f0f+=_0x3b5160[_0x482e75++];}if(_0x543f0f)_0x33eb8e['push'](_0x543f0f);}return _0x33eb8e;}function _0x46b02b(_0x262718,_0x4afa4d){const _0x420df8=_0x58068e,_0x4c42d0=[..._0x262718[_0x420df8(0x35b)]['keys']()]['filter'](_0x24293c=>!_0x24293c[_0x420df8(0x5b6)]('~'));console[_0x420df8(0x18c)](['',_0x5179a4(_0x20a6d0[_0x420df8(0x41a)]+_0x20a6d0[_0x420df8(0x37d)],_0x420df8(0x190)),_0x5179a4(_0x20a6d0[_0x420df8(0x41a)]+_0x20a6d0['cyan'],'\x20\x20║')+_0x5179a4(_0x20a6d0[_0x420df8(0x41a)],_0x420df8(0x218))+_0x5179a4(_0x20a6d0['bold']+_0x20a6d0[_0x420df8(0x37d)],'║'),_0x5179a4(_0x20a6d0[_0x420df8(0x41a)]+_0x20a6d0['cyan'],_0x420df8(0x24b)),'','\x20\x20'+_0x5179a4(_0x20a6d0[_0x420df8(0x33c)],'✓')+'\x20'+_0x5179a4(_0x20a6d0[_0x420df8(0x41a)],_0x420df8(0x1c8))+_0x420df8(0x3f3)+_0x4afa4d[_0x420df8(0x599)],..._0x4afa4d[_0x420df8(0x55b)]>0x1?['\x20\x20'+_0x5179a4(_0x20a6d0[_0x420df8(0x33c)],'✓')+'\x20'+_0x5179a4(_0x20a6d0[_0x420df8(0x41a)],_0x420df8(0x4c9))+'\x20'+_0x4afa4d[_0x420df8(0x55b)]+'\x20HTTP\x20workers\x20'+_0x5179a4(_0x20a6d0[_0x420df8(0x113)],'(primary\x20=\x20processor)')]:[],'\x20\x20'+_0x5179a4(_0x20a6d0[_0x420df8(0x33c)],'✓')+'\x20'+_0x5179a4(_0x20a6d0[_0x420df8(0x41a)],_0x420df8(0x572))+'\x20\x20\x20\x20\x20http://localhost:'+_0x4afa4d[_0x420df8(0x599)]+_0x420df8(0x544),'\x20\x20'+_0x5179a4(_0x20a6d0[_0x420df8(0x33c)],'✓')+'\x20'+_0x5179a4(_0x20a6d0[_0x420df8(0x41a)],_0x420df8(0x242))+_0x420df8(0x597)+_0x4afa4d['dbPath'],'\x20\x20'+_0x5179a4(_0x20a6d0[_0x420df8(0x33c)],'✓')+'\x20'+_0x5179a4(_0x20a6d0['bold'],'id')+'\x20\x20\x20\x20\x20\x20'+_0x5179a4(_0x20a6d0[_0x420df8(0x113)],_0x262718['id']),'\x20\x20'+_0x5179a4(_0x20a6d0['green'],'✓')+'\x20'+_0x5179a4(_0x20a6d0[_0x420df8(0x41a)],_0x420df8(0x1d4))+_0x420df8(0x597)+_0x4c42d0[_0x420df8(0x4d3)](_0x52ab9b=>_0x5179a4(_0x20a6d0[_0x420df8(0x37d)],_0x52ab9b))[_0x420df8(0x24f)]('\x20\x20'),..._0x4afa4d[_0x420df8(0x1b9)]?[]:['\x20\x20'+_0x5179a4(_0x20a6d0[_0x420df8(0x33c)],'✓')+'\x20'+_0x5179a4(_0x20a6d0['bold'],'admin')+_0x420df8(0x258)+_0x4afa4d[_0x420df8(0x599)]+_0x420df8(0x4d8)],'',_0x5179a4(_0x20a6d0[_0x420df8(0x507)],_0x420df8(0x4ff)+_0x5179a4(_0x20a6d0[_0x420df8(0x41a)],_0x420df8(0x400))+_0x420df8(0x326)+_0x5179a4(_0x20a6d0['bold'],_0x420df8(0x58e))+_0x420df8(0x166)+_0x5179a4(_0x20a6d0[_0x420df8(0x41a)],'exit')+'\x20to\x20quit.'),'']['join']('\x0a'));}function _0x2c67a5(_0xc01cba){const _0x4a89f9=_0x58068e;console[_0x4a89f9(0x18c)]('\x0a'+_0x5179a4(_0x20a6d0[_0x4a89f9(0x41a)],'\x20\x20Path\x20access')+'\x20\x20'+_0x5179a4(_0x20a6d0['dim'],_0x4a89f9(0x4f2))+_0x4a89f9(0x280)+_0x5179a4(_0x20a6d0['cyan'],_0x4a89f9(0x253))+_0x4a89f9(0x469)+_0x5179a4(_0x20a6d0[_0x4a89f9(0x37d)],_0x4a89f9(0x253))+'\x20'+_0x5179a4(_0x20a6d0[_0x4a89f9(0x429)],_0x4a89f9(0x43b))+_0x4a89f9(0x2d0)+_0x5179a4(_0x20a6d0[_0x4a89f9(0x37d)],_0x4a89f9(0x4fb))+'\x20'+_0x5179a4(_0x20a6d0[_0x4a89f9(0x37d)],_0x4a89f9(0x253))+'\x20'+_0x5179a4(_0x20a6d0[_0x4a89f9(0x429)],_0x4a89f9(0x27a))+_0x4a89f9(0x4b1)+_0x5179a4(_0x20a6d0[_0x4a89f9(0x507)],_0x4a89f9(0x3bb))+_0x4a89f9(0x1d7)+_0x5179a4(_0x20a6d0[_0x4a89f9(0x113)],'info')+'\x20\x20\x20\x20\x20\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'+_0x5179a4(_0x20a6d0[_0x4a89f9(0x113)],_0x4a89f9(0x1d4))+_0x4a89f9(0x250)+_0x5179a4(_0x20a6d0['gray'],'types')+_0x4a89f9(0x409)+_0xc01cba[_0x4a89f9(0x2c2)]+_0x4a89f9(0x268)+_0x5179a4(_0x20a6d0[_0x4a89f9(0x113)],_0x4a89f9(0x2cd))+_0x4a89f9(0x538)+_0xc01cba[_0x4a89f9(0x2c2)]+_0x4a89f9(0x235)+_0x5179a4(_0x20a6d0[_0x4a89f9(0x113)],'type/users/item/alice')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/'+_0xc01cba[_0x4a89f9(0x2c2)]+_0x4a89f9(0x1d2)+_0x5179a4(_0x20a6d0[_0x4a89f9(0x113)],_0x4a89f9(0x1d8))+_0x4a89f9(0x5ed)+_0xc01cba[_0x4a89f9(0x2c2)]+_0x4a89f9(0x49e)+_0x5179a4(_0x20a6d0['gray'],_0x4a89f9(0x120))+'\x0a\x20\x20\x20\x20'+_0x5179a4(_0x20a6d0['gray'],_0x4a89f9(0x1f8))+_0x4a89f9(0x1d7)+_0x5179a4(_0x20a6d0[_0x4a89f9(0x113)],_0x4a89f9(0x493))+_0x4a89f9(0x51d)+_0x5179a4(_0x20a6d0[_0x4a89f9(0x41a)],_0x4a89f9(0x281))+'\x20\x20'+_0x5179a4(_0x20a6d0['dim'],_0x4a89f9(0x3a5))+'\x0a\x0a\x20\x20'+_0x5179a4(_0x20a6d0[_0x4a89f9(0x37d)],'--env\x20<name>')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20override\x20active\x20environment\x20for\x20this\x20call\x0a\x20\x20'+_0x5179a4(_0x20a6d0[_0x4a89f9(0x37d)],'--help')+_0x4a89f9(0x1c0)+_0x5179a4(_0x20a6d0[_0x4a89f9(0x507)],_0x4a89f9(0x3bb))+_0x4a89f9(0x1d7)+_0x5179a4(_0x20a6d0[_0x4a89f9(0x113)],'types\x20--env\x20staging')+'\x0a\x20\x20\x20\x20'+_0x5179a4(_0x20a6d0[_0x4a89f9(0x113)],_0x4a89f9(0x5a6))+'\x0a\x20\x20\x20\x20'+_0x5179a4(_0x20a6d0[_0x4a89f9(0x113)],_0x4a89f9(0x5a9))+'\x0a\x0a'+_0x5179a4(_0x20a6d0[_0x4a89f9(0x41a)],_0x4a89f9(0x1ff))+_0x4a89f9(0x280)+_0x5179a4(_0x20a6d0['cyan'],'use\x20<env>')+_0x4a89f9(0x590)+_0x5179a4(_0x20a6d0[_0x4a89f9(0x37d)],_0x4a89f9(0x2c2))+_0x4a89f9(0x327)+_0x5179a4(_0x20a6d0[_0x4a89f9(0x37d)],'routes')+'\x20'+_0x5179a4(_0x20a6d0['dim'],_0x4a89f9(0x431))+'\x20\x20\x20\x20\x20\x20\x20\x20\x20browse\x20API\x20routes,\x20grouped\x20by\x20area\x0a\x20\x20'+_0x5179a4(_0x20a6d0[_0x4a89f9(0x37d)],_0x4a89f9(0x486))+'\x20'+_0x5179a4(_0x20a6d0['dim'],'[on|off|level]')+_0x4a89f9(0x1fc)+_0x5179a4(_0x20a6d0[_0x4a89f9(0x37d)],_0x4a89f9(0x1b3))+_0x4a89f9(0x4dc)+_0x5179a4(_0x20a6d0[_0x4a89f9(0x37d)],_0x4a89f9(0x400))+_0x4a89f9(0x2b7)+_0x5179a4(_0x20a6d0[_0x4a89f9(0x37d)],_0x4a89f9(0x5d6))+'\x20'+_0x5179a4(_0x20a6d0['dim'],'/\x20quit\x20/\x20Ctrl+C')+_0x4a89f9(0x213));}let _0x3daa25=![];async function _0x5d54af(_0x14184d,_0x9d0102=0x0,_0x59527a=null){const _0xb96458=_0x58068e;_0x3daa25&&(process[_0xb96458(0x29d)][_0xb96458(0x340)](_0x5179a4(_0x20a6d0['red'],_0xb96458(0x26c))),process[_0xb96458(0x5d6)](0x82));_0x3daa25=!![],process['stdout'][_0xb96458(0x340)]('\x0a'),process[_0xb96458(0x29d)]['write'](_0x5179a4(_0x20a6d0[_0xb96458(0x429)],_0xb96458(0x2bf)+(_0x59527a?'received\x20'+_0x59527a+',\x20':'')+_0xb96458(0x58d)));const _0xd1da86=setTimeout(()=>{const _0x4e45f6=_0xb96458;process[_0x4e45f6(0x29d)]['write'](_0x5179a4(_0x20a6d0['red'],_0x4e45f6(0x156))),process[_0x4e45f6(0x5d6)](0x1);},0x1388);try{await _0x14184d[_0xb96458(0x10e)]();}catch(_0x3ea25d){console[_0xb96458(0x54f)](_0x5179a4(_0x20a6d0[_0xb96458(0x2d7)],'\x20\x20'+_0x3ea25d['message']));}clearTimeout(_0xd1da86),process['stderr'][_0xb96458(0x340)](_0x5179a4(_0x20a6d0[_0xb96458(0x507)],_0xb96458(0x4df))),process[_0xb96458(0x5d6)](_0x9d0102);}function _0x53ab1b(_0xc0f458){const _0x42eb0d=_0x58068e,_0x554975=_0xc0f458[_0x42eb0d(0x2c2)]!==_0x42eb0d(0x453)?_0x5179a4(_0x20a6d0[_0x42eb0d(0x429)],'['+_0xc0f458[_0x42eb0d(0x2c2)]+']'):'';return _0x5179a4(_0x20a6d0[_0x42eb0d(0x41a)]+_0x20a6d0[_0x42eb0d(0x37d)],'okdb')+_0x554975+_0x5179a4(_0x20a6d0[_0x42eb0d(0x113)],'>\x20');}const _0x461c03=new Set([_0x58068e(0x3ac),_0x58068e(0x16c),_0x58068e(0x497),_0x58068e(0x4e0),_0x58068e(0x24a)]);async function _0x1979f8(_0x38176d,_0x53c98c,_0x5add7c,_0xb54413,_0x3b50bb,_0x156793){const _0x13b943=_0x58068e;_0x38176d=_0x38176d['trim']();if(!_0x38176d||_0x38176d[_0x13b943(0x5b6)]('#'))return;const _0xe99afb=_0x30a136(_0x38176d),{flags:_0x412e63,rest:_0x1bd952}=_0x104353(_0xe99afb);if(!_0x1bd952[_0x13b943(0x1f7)])return;const _0x369c64=_0x1bd952[0x0],_0x11f5a1=_0x369c64[_0x13b943(0x11d)]();if(_0x11f5a1===_0x13b943(0x495)){if(_0x1bd952[0x1])_0x13da4c(_0x53c98c,_0x2a61a0(_0x1bd952[0x1],_0x412e63[_0x13b943(0x2c2)]??_0x3b50bb[_0x13b943(0x2c2)]));else _0x2c67a5(_0x3b50bb);return;}if(_0x11f5a1===_0x13b943(0x37f)){const _0x3884f7=_0x1bd952[0x1];if(!_0x3884f7){console[_0x13b943(0x18c)](_0x5179a4(_0x20a6d0[_0x13b943(0x2d7)],_0x13b943(0x1aa)));return;}try{_0x53c98c[_0x13b943(0x2c2)](_0x3884f7),_0x3b50bb[_0x13b943(0x2c2)]=_0x3884f7,_0x156793?.[_0x13b943(0x5bd)](_0x53ab1b(_0x3b50bb)),console['log'](_0x13b943(0x23f)+_0x5179a4(_0x20a6d0['green'],'✓')+_0x13b943(0x20a)+_0x5179a4(_0x20a6d0['bold']+_0x20a6d0[_0x13b943(0x37d)],_0x3884f7)+'\x0a');}catch{console[_0x13b943(0x18c)](_0x13b943(0x23f)+_0x5179a4(_0x20a6d0[_0x13b943(0x2d7)],'✗')+_0x13b943(0x582)+_0x5179a4(_0x20a6d0['bold'],_0x3884f7)+_0x13b943(0x53a)+_0x5179a4(_0x20a6d0[_0x13b943(0x507)],_0x13b943(0x58f)));}return;}if(_0x11f5a1===_0x13b943(0x4a1)){const _0x4aced8=[..._0x53c98c['_envs'][_0x13b943(0x59d)]()][_0x13b943(0x43d)](_0x393efc=>!_0x393efc['startsWith']('~'));console['log']('');for(const _0xd81b5e of _0x4aced8){const _0x4f8ae9=_0xd81b5e===_0x3b50bb[_0x13b943(0x2c2)];console[_0x13b943(0x18c)]('\x20\x20'+(_0x4f8ae9?_0x5179a4(_0x20a6d0[_0x13b943(0x33c)],'●'):_0x5179a4(_0x20a6d0[_0x13b943(0x507)],'○'))+'\x20\x20'+(_0x4f8ae9?_0x5179a4(_0x20a6d0[_0x13b943(0x41a)]+_0x20a6d0[_0x13b943(0x37d)],_0xd81b5e):_0x5179a4(_0x20a6d0[_0x13b943(0x507)],_0xd81b5e)));}console['log'](_0x13b943(0x23f)+_0x5179a4(_0x20a6d0['dim'],'active:')+'\x20'+_0x5179a4(_0x20a6d0['cyan'],_0x3b50bb['env'])),console[_0x13b943(0x18c)]('');return;}if(_0x11f5a1===_0x13b943(0x5c2)){const _0x555ad3=[..._0x53c98c['_envs'][_0x13b943(0x564)]()]['filter'](_0x43c80f=>!_0x43c80f[_0x13b943(0x3f6)]['startsWith']('~'));console[_0x13b943(0x18c)]('');const _0x57e38a=Math[_0x13b943(0x5bc)](..._0x555ad3['map'](_0x50390f=>_0x50390f['name']['length']));for(const _0x19c187 of _0x555ad3){const _0x34ccf3=_0x19c187[_0x13b943(0x3f6)]===_0x3b50bb['env'],_0x323c9a=_0x34ccf3?_0x5179a4(_0x20a6d0[_0x13b943(0x33c)],'●'):_0x5179a4(_0x20a6d0['dim'],'○'),_0x30ec9f=_0x34ccf3?_0x5179a4(_0x20a6d0[_0x13b943(0x41a)]+_0x20a6d0[_0x13b943(0x37d)],_0x19c187[_0x13b943(0x3f6)][_0x13b943(0x57b)](_0x57e38a)):_0x5179a4(_0x20a6d0['dim'],_0x19c187[_0x13b943(0x3f6)]['padEnd'](_0x57e38a)),_0x20c303=[..._0x19c187['typeSubDbs'][_0x13b943(0x59d)]()][_0x13b943(0x43d)](_0x189d09=>!_0x189d09[_0x13b943(0x5b6)]('~')),_0x212753=_0x20c303['length']?_0x5179a4(_0x20a6d0[_0x13b943(0x507)],_0x20c303[_0x13b943(0x19f)](0x0,0x5)['join'](',\x20')+(_0x20c303[_0x13b943(0x1f7)]>0x5?_0x13b943(0x14c)+(_0x20c303[_0x13b943(0x1f7)]-0x5)+_0x13b943(0x485):'')):_0x5179a4(_0x20a6d0[_0x13b943(0x507)],_0x13b943(0x1b2));console[_0x13b943(0x18c)]('\x20\x20'+_0x323c9a+'\x20\x20'+_0x30ec9f+'\x20\x20'+_0x212753);}console['log']('');return;}if(_0x11f5a1==='TYPES'){const _0x2da990=_0x412e63['env']??_0x1bd952[0x1]??_0x3b50bb['env'];try{const _0x4dabec=_0x53c98c['env'](_0x2da990),_0x27a5e7=[..._0x4dabec[_0x13b943(0x3e7)][_0x13b943(0x59d)]()][_0x13b943(0x43d)](_0x32f609=>!_0x32f609[_0x13b943(0x5b6)]('~'))[_0x13b943(0x434)]();console[_0x13b943(0x18c)]('\x0a\x20\x20'+_0x5179a4(_0x20a6d0['dim'],_0x27a5e7[_0x13b943(0x1f7)]+_0x13b943(0x501)+(_0x27a5e7[_0x13b943(0x1f7)]!==0x1?'s':'')+_0x13b943(0x2eb)+_0x2da990));for(const _0x1e58d4 of _0x27a5e7){const _0x240dfd=_0x4dabec[_0x13b943(0x3e7)][_0x13b943(0x2e5)](_0x1e58d4),_0x454c86=_0x240dfd?.['data']?.['getCount']?.()??0x0,_0x34f105=_0x5179a4(_0x20a6d0[_0x13b943(0x41a)]+_0x20a6d0['cyan'],_0x1e58d4[_0x13b943(0x57b)](0x1c));console[_0x13b943(0x18c)]('\x20\x20\x20\x20'+_0x34f105+'\x20\x20'+_0x5179a4(_0x20a6d0[_0x13b943(0x2e1)],String(_0x454c86)[_0x13b943(0x379)](0x6))+'\x20'+_0x5179a4(_0x20a6d0[_0x13b943(0x507)],_0x13b943(0x442)));}console[_0x13b943(0x18c)]('');}catch(_0x4d14ee){console['error'](_0x5179a4(_0x20a6d0[_0x13b943(0x2d7)],_0x13b943(0x23f)+_0x4d14ee[_0x13b943(0x141)]+'\x0a'));}return;}if(_0x11f5a1==='ROUTES'){_0x262214(_0x53c98c,_0x1bd952[_0x13b943(0x19f)](0x1)[_0x13b943(0x24f)]('\x20'));return;}if(_0x11f5a1===_0x13b943(0x596)){const _0x1d4a27=(_0x1bd952[0x1]??'')[_0x13b943(0x402)]();if(!_0x1d4a27||_0x1d4a27==='on')_0xb54413[_0x13b943(0x494)]=!![],_0xb54413[_0x13b943(0x187)]='info',console[_0x13b943(0x18c)]('\x0a\x20\x20'+_0x5179a4(_0x20a6d0[_0x13b943(0x33c)],'✓')+_0x13b943(0x5a5)+_0x5179a4(_0x20a6d0[_0x13b943(0x507)],'level:\x20info')+'\x0a');else{if(_0x1d4a27===_0x13b943(0x31a))_0xb54413[_0x13b943(0x494)]=![],console['log']('\x0a\x20\x20'+_0x5179a4(_0x20a6d0[_0x13b943(0x429)],'○')+_0x13b943(0x530));else _0x515ae8[_0x1d4a27]!==undefined?(_0xb54413[_0x13b943(0x494)]=!![],_0xb54413[_0x13b943(0x187)]=_0x1d4a27,console[_0x13b943(0x18c)](_0x13b943(0x23f)+_0x5179a4(_0x20a6d0[_0x13b943(0x33c)],'✓')+_0x13b943(0x3e3)+_0x5179a4(_0x20a6d0['bold'],_0x1d4a27)+'\x0a')):console[_0x13b943(0x54f)](_0x5179a4(_0x20a6d0[_0x13b943(0x2d7)],'\x20\x20Usage:\x20logs\x20[on|off|debug|info|warn|error]'));}return;}if(_0x11f5a1===_0x13b943(0x39d)||_0x11f5a1===_0x13b943(0x2bb)){await _0x5d54af(_0x53c98c,0x0);return;}if(_0x11f5a1===_0x13b943(0x424)){const _0x368c11=_0x13b943(0x2df)+_0x5add7c[_0x13b943(0x599)]+_0x13b943(0x4d8),_0x3a4318=process[_0x13b943(0x390)]===_0x13b943(0x2ba)?'start\x20'+_0x368c11:process[_0x13b943(0x390)]==='darwin'?_0x13b943(0x551)+_0x368c11:'xdg-open\x20'+_0x368c11;require$$4['exec'](_0x3a4318),console[_0x13b943(0x18c)]('\x0a\x20\x20'+_0x5179a4(_0x20a6d0[_0x13b943(0x33c)],'✓')+_0x13b943(0x525)+_0x5179a4(_0x20a6d0[_0x13b943(0x37d)],_0x368c11)+'\x0a');return;}let _0x2f2c50,_0x25b7bd,_0x2de8ff;if(_0x461c03[_0x13b943(0x399)](_0x11f5a1)){_0x2f2c50=_0x11f5a1,_0x25b7bd=_0x1bd952[0x1],_0x2de8ff=_0x1bd952['slice'](0x2);if(!_0x25b7bd){console['error'](_0x5179a4(_0x20a6d0[_0x13b943(0x2d7)],_0x13b943(0x4d2)+_0x369c64+_0x13b943(0x302)));return;}}else _0x2f2c50=null,_0x25b7bd=_0x1bd952[0x0],_0x2de8ff=_0x1bd952[_0x13b943(0x19f)](0x1);const _0x3f16ec=_0x412e63['env']??_0x3b50bb[_0x13b943(0x2c2)],_0x217623=_0x2a61a0(_0x25b7bd,_0x3f16ec);if(_0x412e63['help']){_0x13da4c(_0x53c98c,_0x217623);return;}let _0x27daa1=null;if(_0x2de8ff[_0x13b943(0x1f7)]){const _0xb76e6=_0x2de8ff[_0x13b943(0x24f)]('\x20');try{_0x27daa1=_0x1451cf(_0xb76e6);}catch(_0x257bb1){console[_0x13b943(0x54f)](_0x5179a4(_0x20a6d0['red'],'\x0a\x20\x20Invalid\x20JSON:\x20'+_0xb76e6+_0x13b943(0x23f)+_0x5179a4(_0x20a6d0[_0x13b943(0x507)],_0x257bb1[_0x13b943(0x141)])+'\x0a'));return;}}if(!_0x2f2c50)_0x2f2c50=_0x27daa1!==null?_0x13b943(0x16c):'GET';try{const _0x586463=await _0x23c5b4(_0x53c98c,_0x2f2c50,_0x217623,_0x27daa1);_0xbd0bb8(_0x586463[_0x13b943(0x2d9)],_0x586463[_0x13b943(0x487)]);}catch(_0x260038){console[_0x13b943(0x54f)](_0x13b943(0x23f)+_0x5179a4(_0x20a6d0[_0x13b943(0x2d7)],'✗')+'\x20'+_0x260038[_0x13b943(0x141)]+'\x0a');}}class _0x3fd9f5{constructor(){const _0x256d6c=_0x58068e;this[_0x256d6c(0x277)]=new Map(),this[_0x256d6c(0x175)]=null,this[_0x256d6c(0x17b)]=![];}}function _0x2d3df1(_0x571382){const _0x2c23db=_0x58068e,_0x2de36e=new _0x3fd9f5();for(const _0x4b8f42 of _0x571382){if(_0x4b8f42[_0x2c23db(0x1bc)]?.['hidden'])continue;const _0x4f2b91=_0x4b8f42[_0x2c23db(0x242)][_0x2c23db(0x288)](/^\/api/,'')['replace'](/^\[\/env\/:env=[^\]]*\]/,'')['replace'](/^\//,'');if(!_0x4f2b91)continue;let _0x1c9fc1=_0x2de36e;for(const _0x297ae1 of _0x4f2b91['split']('/')[_0x2c23db(0x43d)](Boolean)){if(_0x297ae1[_0x2c23db(0x5b6)](':')){const _0x4bdbd6=_0x297ae1['slice'](0x1);if(!_0x1c9fc1['dynamic'])_0x1c9fc1[_0x2c23db(0x175)]={'param':_0x4bdbd6,'node':new _0x3fd9f5()};_0x1c9fc1=_0x1c9fc1[_0x2c23db(0x175)][_0x2c23db(0x3dc)];}else{if(!_0x1c9fc1['children'][_0x2c23db(0x399)](_0x297ae1))_0x1c9fc1[_0x2c23db(0x277)][_0x2c23db(0x339)](_0x297ae1,new _0x3fd9f5());_0x1c9fc1=_0x1c9fc1[_0x2c23db(0x277)]['get'](_0x297ae1);}}_0x1c9fc1['terminal']=!![];}return _0x2de36e;}const _0x310068=new Map();function _0x27f51a(_0x6bc2e1,_0x276ea1,_0x47ea51){const _0x7455a=_0x58068e,_0x30fdf8=_0x310068[_0x7455a(0x2e5)](_0x6bc2e1);if(_0x30fdf8&&_0x30fdf8[_0x7455a(0x504)]>Date[_0x7455a(0x477)]())return _0x30fdf8['val'];const _0x53b824=_0x47ea51();return _0x310068['set'](_0x6bc2e1,{'val':_0x53b824,'exp':Date[_0x7455a(0x477)]()+_0x276ea1}),_0x53b824;}function _0x293100(_0x36fdfe,_0x58c287,_0x2af049,_0x5ddce5){const _0x1a0bce=_0x58068e,_0x5de1fe=_0x58c287[_0x1a0bce(0x2c2)]??_0x5ddce5['env'];switch(_0x36fdfe){case _0x1a0bce(0x2c2):return[..._0x2af049[_0x1a0bce(0x35b)][_0x1a0bce(0x59d)]()]['filter'](_0x4fcc7e=>!_0x4fcc7e[_0x1a0bce(0x5b6)]('~'));case _0x1a0bce(0x153):return _0x27f51a(_0x1a0bce(0x5b4)+_0x5de1fe,0x7d0,()=>{const _0x4bee91=_0x1a0bce;try{return[..._0x2af049['env'](_0x5de1fe)['typeSubDbs'][_0x4bee91(0x59d)]()][_0x4bee91(0x43d)](_0x59e4a4=>!_0x59e4a4[_0x4bee91(0x5b6)]('~'));}catch{return[];}});case'key':if(!_0x58c287[_0x1a0bce(0x153)])return[];return _0x27f51a(_0x1a0bce(0x2d8)+_0x5de1fe+':'+_0x58c287[_0x1a0bce(0x153)],0x5dc,()=>{const _0xc0dd39=_0x1a0bce;try{const _0x297d11=_0x2af049[_0xc0dd39(0x2c2)](_0x5de1fe)[_0xc0dd39(0x3e7)][_0xc0dd39(0x2e5)](_0x58c287[_0xc0dd39(0x153)]);if(!_0x297d11?.[_0xc0dd39(0x415)])return[];const _0x351901=[];for(const {key:_0x52eb61}of _0x297d11['data'][_0xc0dd39(0x5f9)]({'limit':0x32})){_0x351901['push'](String(_0x52eb61));if(_0x351901['length']>=0x32)break;}return _0x351901;}catch{return[];}});case _0x1a0bce(0x1e7):if(!_0x58c287[_0x1a0bce(0x153)])return[];return _0x27f51a(_0x1a0bce(0x5e7)+_0x5de1fe+':'+_0x58c287[_0x1a0bce(0x153)],0x7d0,()=>{const _0x32fb5e=_0x1a0bce;try{const _0x37e5bb=_0x2af049['env'](_0x5de1fe)[_0x32fb5e(0x3e7)][_0x32fb5e(0x2e5)](_0x58c287['type']);return _0x37e5bb?[..._0x37e5bb[_0x32fb5e(0x414)]?.[_0x32fb5e(0x59d)]()??[]]:[];}catch{return[];}});case _0x1a0bce(0x2fa):if(!_0x58c287[_0x1a0bce(0x153)])return[];return _0x27f51a(_0x1a0bce(0x49a)+_0x5de1fe+':'+_0x58c287[_0x1a0bce(0x153)],0x7d0,()=>{const _0x47b090=_0x1a0bce;try{return _0x2af049[_0x47b090(0x331)]?.[_0x47b090(0x566)]?.(_0x58c287[_0x47b090(0x153)],_0x2af049[_0x47b090(0x2c2)](_0x5de1fe))?.['map'](_0x21bc5f=>_0x21bc5f['name'])??[];}catch{return[];}});default:return[];}}function _0x24221a(_0x5bbe4d,_0x50813c,_0x323a22,_0x4eb08b){const _0x4f8643=_0x58068e,_0x59f392=_0x5bbe4d['endsWith']('/'),_0x2cf0f1=_0x5bbe4d[_0x4f8643(0x1be)]('/'),_0x31e892=_0x59f392?_0x2cf0f1[_0x4f8643(0x19f)](0x0,-0x1):_0x2cf0f1[_0x4f8643(0x19f)](0x0,-0x1),_0x4788b1=_0x59f392?'':_0x2cf0f1[_0x2cf0f1['length']-0x1];let _0x17152c=_0x50813c;const _0x20cc9f={};for(const _0x13fc70 of _0x31e892){if(!_0x13fc70)continue;if(_0x17152c[_0x4f8643(0x277)][_0x4f8643(0x399)](_0x13fc70))_0x17152c=_0x17152c[_0x4f8643(0x277)][_0x4f8643(0x2e5)](_0x13fc70);else{if(_0x17152c[_0x4f8643(0x175)])_0x20cc9f[_0x17152c[_0x4f8643(0x175)][_0x4f8643(0x31d)]]=_0x13fc70,_0x17152c=_0x17152c['dynamic'][_0x4f8643(0x3dc)];else return[];}}const _0x1f5459=_0x31e892[_0x4f8643(0x43d)](Boolean),_0x218c58=_0x1f5459[_0x4f8643(0x1f7)]?_0x1f5459['join']('/')+'/':'',_0x3528b6=[];for(const [_0x2318cc]of _0x17152c[_0x4f8643(0x277)]){if(_0x2318cc[_0x4f8643(0x5b6)](_0x4788b1))_0x3528b6[_0x4f8643(0x38d)](_0x218c58+_0x2318cc);}if(_0x17152c[_0x4f8643(0x175)])for(const _0x54c0f4 of _0x293100(_0x17152c[_0x4f8643(0x175)][_0x4f8643(0x31d)],_0x20cc9f,_0x323a22,_0x4eb08b)){if(String(_0x54c0f4)['startsWith'](_0x4788b1))_0x3528b6[_0x4f8643(0x38d)](_0x218c58+_0x54c0f4);}return _0x3528b6[_0x4f8643(0x19f)](0x0,0x64);}const _0x3815a7=[_0x58068e(0x400),_0x58068e(0x533),'env',_0x58068e(0x1d4),_0x58068e(0x22e),_0x58068e(0x58e),_0x58068e(0x486),_0x58068e(0x1b3),_0x58068e(0x5d6),_0x58068e(0x3f1)];function _0x1c6a65(_0xb4450c,_0x52765c,_0x3d5863){return function _0x10a5cc(_0x19c0bf){const _0x30b6c3=_0x38fc;try{const _0x4efcc0=_0x19c0bf['search'](/\s[{[]/),_0x1e06c9=_0x4efcc0>=0x0?_0x19c0bf[_0x30b6c3(0x19f)](0x0,_0x4efcc0):_0x19c0bf,_0x26e4ba=_0x1e06c9['trimStart']();if(!_0x26e4ba){const _0x59efcc=[..._0x3815a7,...[..._0xb4450c['children']['keys']()]]['slice'](0x0,0x64);return[_0x59efcc,''];}const _0x27550e=_0x26e4ba[_0x30b6c3(0x1be)](/\s+/),_0x242801=_0x27550e[0x0],_0x321932=_0x242801['toUpperCase']();if(_0x27550e['length']===0x1){const _0x5824a3=_0x242801[_0x30b6c3(0x402)](),_0xd9b1b9=_0x3815a7['filter'](_0x2f9224=>_0x2f9224[_0x30b6c3(0x5b6)](_0x5824a3)),_0x41a490=_0x24221a(_0x242801,_0xb4450c,_0x52765c,_0x3d5863),_0x58e1d0=[...new Set([..._0xd9b1b9,..._0x41a490])][_0x30b6c3(0x19f)](0x0,0x64);return[_0x58e1d0,_0x242801];}if(_0x461c03[_0x30b6c3(0x399)](_0x321932)&&_0x27550e[_0x30b6c3(0x1f7)]===0x2){const _0x42a7be=_0x27550e[0x1],_0x5d2a3a=_0x24221a(_0x42a7be,_0xb4450c,_0x52765c,_0x3d5863);return[_0x5d2a3a[_0x30b6c3(0x4d3)](_0x2e29c1=>_0x242801+'\x20'+_0x2e29c1),_0x242801+'\x20'+_0x42a7be];}if(!_0x461c03['has'](_0x321932)&&_0x27550e[_0x30b6c3(0x1f7)]>0x1){const _0x361ebd=_0x24221a(_0x242801,_0xb4450c,_0x52765c,_0x3d5863),_0x466ca4='\x20'+_0x27550e[_0x30b6c3(0x19f)](0x1)[_0x30b6c3(0x24f)]('\x20');return[_0x361ebd[_0x30b6c3(0x4d3)](_0xe1f10=>_0xe1f10+_0x466ca4),_0x242801+_0x466ca4];}return[[],_0x19c0bf];}catch{return[[],_0x19c0bf];}};}async function _0x2a462b(_0x23d99d,_0x5c58f0){const _0x20884a=_0x58068e,_0x505118={'enabled':!![],'level':_0x5c58f0[_0x20884a(0x5a0)]??'info'},_0x239bf0={'env':_0x20884a(0x453)},_0x210fe2={'current':null},_0xece3e7=_0x2d3df1(_0x23d99d['http'][_0x20884a(0x3a2)]()),_0x502319=_0x1c6a65(_0xece3e7,_0x23d99d,_0x239bf0);_0x23d99d[_0x20884a(0x18c)][_0x20884a(0x211)](_0x3f6fbb=>{const _0x20ba20=_0x20884a;if(!_0x505118[_0x20ba20(0x494)])return;_0x5681ac(_0x3f6fbb,_0x505118[_0x20ba20(0x187)]),_0x210fe2[_0x20ba20(0x10c)]?.[_0x20ba20(0x5b3)](!![]);}),_0x46b02b(_0x23d99d,_0x5c58f0);const _0x33e8c6=_0x2cde4b[_0x20884a(0x4ac)]({'input':process[_0x20884a(0x328)],'output':process[_0x20884a(0x589)],'terminal':!![],'completer':_0x502319,'prompt':_0x53ab1b(_0x239bf0),'historySize':_0x20a50d});try{const _0x1b4424=_0x52d525[_0x20884a(0x377)](_0x55eeb7,_0x20884a(0x2b8))[_0x20884a(0x1be)]('\x0a')[_0x20884a(0x43d)](Boolean);_0x33e8c6[_0x20884a(0x463)]=_0x1b4424['reverse']()[_0x20884a(0x19f)](0x0,_0x20a50d);}catch{}_0x210fe2['current']=_0x33e8c6,_0x33e8c6['on'](_0x20884a(0x1e3),async _0x31d4f1=>{const _0x2c28c2=_0x20884a;_0x33e8c6[_0x2c28c2(0x2c5)]();try{await _0x1979f8(_0x31d4f1,_0x23d99d,_0x5c58f0,_0x505118,_0x239bf0,_0x33e8c6);}catch(_0x16ef7e){console[_0x2c28c2(0x54f)](_0x5179a4(_0x20a6d0[_0x2c28c2(0x2d7)],'\x20\x20Error:\x20'+_0x16ef7e[_0x2c28c2(0x141)]));}finally{_0x33e8c6['resume'](),_0x33e8c6[_0x2c28c2(0x5b3)]();}}),_0x33e8c6['on'](_0x20884a(0x10e),()=>{const _0x46db1c=_0x20884a;try{const _0x50160f=[..._0x33e8c6[_0x46db1c(0x463)]][_0x46db1c(0x585)]()[_0x46db1c(0x43d)](Boolean)['slice'](0x0,_0x20a50d);_0x52d525[_0x46db1c(0x5b5)](_0x55eeb7,_0x50160f[_0x46db1c(0x24f)]('\x0a')+'\x0a');}catch{}_0x5d54af(_0x23d99d,0x0);});let _0x47b4d4=0x0;return process['on'](_0x20884a(0x595),()=>{const _0x472aac=_0x20884a;if(_0x3daa25)return _0x5d54af(_0x23d99d,0x82,_0x472aac(0x595));if(_0x33e8c6['line']==='')return _0x5d54af(_0x23d99d,0x0,_0x472aac(0x595));const _0x48f485=Date[_0x472aac(0x477)]();if(_0x48f485-_0x47b4d4<0x5dc)return _0x5d54af(_0x23d99d,0x0,_0x472aac(0x517));_0x47b4d4=_0x48f485,process[_0x472aac(0x589)]['write']('\x0a'),_0x33e8c6[_0x472aac(0x412)](0x0),_0x33e8c6[_0x472aac(0x5b3)](),process[_0x472aac(0x29d)]['write'](_0x5179a4(_0x20a6d0[_0x472aac(0x507)],_0x472aac(0x4a8)));}),process['on'](_0x20884a(0x157),()=>_0x5d54af(_0x23d99d,0x0,_0x20884a(0x157))),process['on']('SIGBREAK',()=>_0x5d54af(_0x23d99d,0x0,_0x20884a(0x1f9))),_0x33e8c6[_0x20884a(0x5b3)](),_0x33e8c6;}return okdbShell={'start':_0x2a462b,'colorLog':_0x5681ac,'lenientParse':_0x1451cf,'_splitLine':_0x30a136,'_formatRouteHelpLines':_0x1ad9e7,'_routeSummary':_0x31e774,'_routeTags':_0x2dff2a},okdbShell;}function _0x1008(){const _0x2da0c2=['License\x20expired\x20or\x20invalidated','_collectSingletonClaims','[okdb]\x20import\x20complete','stopping','[okdb]\x20warning:\x20failed\x20to\x20restore\x20identity/licenses\x20after\x20reset:\x20','verify','cluster','http-server','http','toFixed','_nestedTotal','44xbpHQU','Index\x20\x22','drop','type:registered','\x20\x20Usage:\x20','map','OKDB_HTTP_WORKERS\x20env','INDEX_RESET','--key','boolean','/admin/index.html','sub','[okdb]\x20failed\x20to\x20parse\x20config\x20file\x20','_buildProcessingFacet','\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\x20Tier:\x20\x20\x20\x20','_windowCbs','\x20\x20[okdb]\x20closed\x20cleanly\x0a','PATCH','dedupeMax','\x20\x20\x20\x203.\x20Run:\x20\x20okdb\x20license\x20<activation-token>','\x20died\x20','transport','_pending','\x22\x20to\x20enable\x20it.','PERMISSIONS','~licenses','rss','stop','errors','shutdown','unique:violation',',\x20signal=','readUInt32BE','started','\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.','—\x20/api/\x20is\x20auto-prefixed,\x20env\x20is\x20auto-injected','SIG_INVALID','\x0d[okdb]\x20','_putRowAsync','--types','14216cyadRw','runtimeProcessesView','resetReadTxn','_children','VERB','--changes','load','embedded','\x20\x20Type\x20','typesPerEnv','\x20type','maxWrites','[okdb]\x20./okdb-data\x20already\x20exists\x20—\x20skipping','exp','engines','__vocab/version','dim','SCHEMA_COLLECTION_INVALID','\x20(must\x20be\x20an\x20integer\x20>=\x201)\x20—\x20using\x201','removeSync','null','active','single','expiry','FTS_DROP','_admissionTimer','_isClusterController','error:\x20','references','_heartbeatInFlight','flushed','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20','SIGINT\x20(double-tap)','_bpWaiters','logRequests',',\x20closing…\x0a','[okdb]\x20exporting\x20env\x20\x22',':\x20expected\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/staging/info\x0a\x0a','release','\x20\x20\x20\x20admin:\x20\x20\x20http://localhost:','\x20(expires\x20in\x20','events','okdb-license-id:','oldestPendingMs','\x22\x20(must\x20be\x20debug|info|warn|error)','\x20opening\x20','readline','fts:registered','\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20','auth','_admissionStarted','_sampleOwnStats','offWindow','hasOwnProperty','\x20parkedNow=','\x20\x20(unlimited)','\x20logs\x20off\x0a','.kdbconfig','\x20which\x20does\x20not\x20exist','use','.\x20Primary\x20keys\x20must\x20be\x20string\x20or\x20number.\x20Got:\x20','_heartbeatTimer','\x20documents\x20fail\x20validation','set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)','\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/','_statusEnv','\x20not\x20found','existsSync','licenseType','instanceId','shift','--password','workers','stopped','listDesired','../okdb','/api','firstTs','noteListenAddr','resolve','licenses','INDEX_HAS_CONSUMERS','processor:resumed','heartbeatMs','_role','\x20envs','once','error','then','open\x20','CHANGEFEED_QUANTUM','[okdb-cluster]\x20','rows=','_publishFailWarned','timeMachine','\x0a\x20\x20Raw\x20token\x20(shown\x20once,\x20save\x20it\x20now):\x0a',',\x20label:\x20','processes:\x20','OKDBInvalidPrimaryKeyError','clusterWorkers','rowKey','Type\x20\x27','allSettled','18mxzeIr','selfAddress','ttlMs','_isStale','Build\x20expects\x20public\x20key\x20fingerprint\x20','values','ACTIVATION_EXPIRED','list','recordWrite','_wantDbHandle','bus:drain','dbPath','[env]','note','application/json','\x20/\x20','addLicense','\x20worker(s)\x20still\x20serving','resetFts','api','--ttl','\x20months\x20from\x20issuance)','\x1b[34m','commitsPerSec','\x20\x20✓\x20Revoked\x20token\x20','\x20references\x20','_refreshDesiredSnapshot','\x20\x20\x20\x202.\x20The\x20vendor\x20returns\x20an\x20activation\x20token.','padEnd','Records','licensed','--username','sandbox','OKDBInvalidValueError','online','\x20environment\x20','2.3.3','_instanceId','reverse','[okdb]\x20starting…\x0a','index:ready','ready','stdout','extend','config\x20http.workers','_buildChildRow','shutting\x20down…\x0a','routes','\x20—\x20type\x20env\x20to\x20list\x20available\x0a','\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','constructor','__identity','removeNode','processors/','SIGINT','LOGS','\x20\x20\x20\x20','_nodeDead','port','.okdb-write-test','parkedNow','~processes:cmd','keys','okdb-diag.','\x20(durable\x20desired-state)','logLevel','cluster:','expiresAt','system:clock_change','SYSTEM_STOPPED','\x20logs\x20on\x20\x20','type/users/item/alice\x20--env\x20staging','uptime','fill','type/users\x20--help','Engines','transaction','\x20HTTP\x20workers,\x20primary\x20=\x20processor)','call','\x0a[okdb]\x20received\x20','\x1b[32m','mean','safety','kill','prompt','types:','writeFileSync','startsWith','[okdb]\x20exporting\x20blobs…','processor:retry','loop-lag','_publishNow','_isReader','max','setPrompt','tryAcquire','cpuWindowMs','dumpedAt','_lastCpuPct','ENVS','\x20\x20[','indexOf','\x0a===\x20OKDB_DIAG\x20','createHash','toISOString','string','OKDBAlreadyExistsError','recheck','System','reset','_ensureDesired','./okdb-backup','\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20','ESRCH','Foreign\x20key\x20violation:\x20','\x20\x20skipped=','INDEX_NOT_REGISTERED','[okdb]\x20error:\x20token\x20with\x20name\x20\x22','_onPoke','exit','ITEM_CREATE','config\x20file\x20valid:\x20','registerType','_quantum','_seen','\x20\x20·\x20\x20','~lock','txn:start','\x20SECURITY\x20NOTICE','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20✓\x20joined\x20and\x20reconciliation\x20initiated','\x20\x20\x20\x20path:\x20\x20\x20\x20','processor:error','node:events','(add\x20a\x20license\x20first)','method','idx:','--blobs','\x20\x20Some\x20checks\x20failed.\x0a','\x20file','onLicenseExpired','[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22','\x20→\x20POST\x20/api/env/','\x20\x20Next\x20step\x20—\x20activate\x20the\x20license:','\x22.\x20Use:\x20create,\x20list,\x20revoke','FTS_REGISTERED','sha256','targetType','\x20\x20\x20\x20license:\x20free\x20tier\x20—\x20add\x20a\x20license\x20to\x20unlock\x20sync,\x20embeddings,\x20engines,\x20time-machine','processor:ready','ttl:set','password','(none)','--print','getRange','never','hex','_lastCpuAt','\x20\x20\x20\x20status:\x20\x20\x20\x20','(worst\x20','--log-level','current','_bpParkedTotal','close','signalWant','ms\x20max=','inspect','Shutting\x20down\x20due\x20to\x20license\x20expiry','gray','\x27:\x20','_nodeDbCache','system:poke','clearTtl','_markSeen','PIN','--test','_rootDb','net','toUpperCase','scrypt','getPins','PUT\x20type/users/item/x\x20{\x22n\x22:1}','views','hostname','singletonClaims','\x20\x20\x20\x20usage:\x20\x20\x20','system:drain','481638pJxfgO','expires','Either\x20the\x20build\x20was\x20made\x20with\x20a\x20different\x20keypair,\x20or\x20the\x20license\x20was\x20issued\x20with\x20a\x20different\x20private\x20key.','dropType','.\x20The\x20active\x20license\x20does\x20not\x20enable\x20\x22','queue/','_wantDb','\x20oldestPendingMs=','item:update','processes','Events','--address','_startHeartbeat','ppid','columns','permissions','_committed','transport:\x20','abs','[okdb]\x20error:\x20show\x20requires\x20an\x20id\x20argument','schema:drop','operation','Hint:\x20','_lastCpuWindowMs','ref:violation','version','\x20\x20\x20\x20-\x20The\x20license\x20blob\x20has\x20not\x20been\x20added\x20yet\x20—\x20run\x20`okdb\x20license\x20<blob>`\x20first.','message','config','index:registered','setOwnMeta','_durs','LICENSE_EXPIRED_ACTION','\x20\x20✗','ingest','busy','[okdb]\x20error:\x20--address\x20is\x20required\x20for\x20join\x20(this\x20node\x27s\x20reachable\x20sync\x20address).\x0a','isArray','\x20\x20+','node:perf_hooks','field:resolver_registered','addSupervisedChild','host','fieldPath','dropFts','type','slotKey','white','\x20\x20[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a','SIGTERM','[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22','\x20\x20\x20\x20admin:\x20http://localhost:','_lockDb','ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20','ENV_CLOSING_RETRY','license','putNode','stringify','exportToFile','flushDebounce','access:\x20','_highWater','compaction','\x20\x20\x20\x20features:\x20\x20','\x20to\x20browse\x20the\x20API,\x20','--no-cluster','[okdb]\x20.kdbconfig\x20already\x20exists\x20—\x20skipping','[okdb]\x20error:\x20failed\x20to\x20read\x20','claimGated','(unset)','POST','\x20writer{depth=','reason','removeSupervisedChild','fork','--watch','_versionSkewWarned','blobs','features','dynamic','export','unclaimed','_lastPublishAt','listen','raw-put','terminal','splice','_listenAddr','isActive','PUB_FINGERPRINT','workersFlag','consecutiveFailures','body:\x20','.\x20Add\x20a\x20license\x20that\x20includes\x20\x22','includes','lifecycle','question','level','shmbuf/package.json','supervisorKey','pid','index:drop','log','user','isConnected','clear','\x20\x20╔═══════════════════════════╗','No\x20license\x20found\x20matching\x20this\x20activation\x20token','__esModule','assertFeature','removeLicense','--workers','depth','Full-text\x20search','system:proc','mcp','\x0a\x20\x20okdb\x20—\x20standalone\x20OKDB\x20server\x0a\x0a\x20\x20Usage:\x0a\x20\x20\x20\x20okdb\x20[options]\x0a\x20\x20\x20\x20okdb\x20<command>\x0a\x0a\x20\x20Options:\x0a\x20\x20\x20\x20-p,\x20--port\x20<port>\x20\x20\x20\x20\x20\x20\x20\x20HTTP\x20port\x20(default:\x208484)\x0a\x20\x20\x20\x20-d,\x20--path\x20<dir>\x20\x20\x20\x20\x20\x20\x20\x20\x20Database\x20directory\x20(default:\x20./okdb-data)\x0a\x20\x20\x20\x20-k,\x20--key\x20\x20<secret>\x20\x20\x20\x20\x20\x20Encryption\x20key\x20for\x20data\x20at\x20rest\x0a\x20\x20\x20\x20-c,\x20--config\x20<file>\x20\x20\x20\x20\x20\x20Config\x20file\x20path\x20(default:\x20.kdbconfig)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--log-level\x20<level>\x20\x20Log\x20level:\x20debug\x20|\x20info\x20|\x20warn\x20|\x20error\x20(default:\x20info)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-repl\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Start\x20server\x20without\x20interactive\x20shell\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-admin\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20admin\x20UI\x0a\x20\x20\x20\x20\x20\x20\x20\x20--open\x20[ip\x20...]\x20\x20\x20\x20\x20\x20Open\x20mode:\x20bypass\x20auth\x20for\x20listed\x20IPs\x20(default:\x20localhost).\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Examples:\x20--open\x20\x20--open\x20192.168.1.0/24\x20\x20--open\x20*\x0a\x20\x20\x20\x20\x20\x20\x20\x20--log-requests\x20\x20\x20\x20\x20\x20\x20Print\x20every\x20HTTP\x20request\x20to\x20stdout\x20(for\x20debugging)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--workers\x20<n>\x20\x20\x20\x20\x20\x20\x20\x20Number\x20of\x20capable\x20worker\x20processes\x20sharing\x20the\x20listen\x20socket\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20(default:\x20cores\x20−\x201).\x20Each\x20worker\x20serves\x20HTTP\x20+\x20SSE\x20AND\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20processes\x20(claims\x20leases,\x20drains\x20on\x20its\x20own\x20loop);\x20the\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20cluster\x20primary\x20is\x20a\x20thin\x20passive\x20supervisor.\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-cluster\x20\x20\x20\x20\x20\x20\x20\x20\x20Run\x20single-process\x20(equivalent\x20to\x20--workers\x201)\x0a\x20\x20\x20\x20-v,\x20--version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Print\x20version\x20and\x20exit\x0a\x20\x20\x20\x20-h,\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x0a\x0a\x20\x20Commands:\x0a\x20\x20\x20\x20version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Print\x20version\x20and\x20exit\x0a\x20\x20\x20\x20doctor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Run\x20health\x20checks\x0a\x20\x20\x20\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Create\x20.kdbconfig\x20and\x20okdb-data/\x0a\x20\x20\x20\x20token\x20create\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Create\x20a\x20token\x20in\x20the\x20local\x20DB\x20(direct\x20access,\x20no\x20HTTP)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--name\x20<name>\x20\x20\x20\x20\x20\x20For\x20password\x20login\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--password\x20<pass>\x20\x20Password\x20(requires\x20--name)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--label\x20<text>\x20\x20\x20\x20\x20Human\x20description\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--permissions\x20<l>\x20\x20Comma-separated\x20baseline\x20permissions\x20(e.g.\x20\x22*\x22\x20or\x20\x22data:read\x22)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--grants\x20<json>\x20\x20\x20\x20Per-env\x20grants\x20as\x20JSON\x20(e.g.\x20\x27{\x22orders\x22:[\x22data:*\x22]}\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--ttl\x20<ms>\x20\x20\x20\x20\x20\x20\x20\x20\x20Optional\x20TTL\x20in\x20milliseconds\x0a\x20\x20\x20\x20token\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20List\x20all\x20tokens\x20in\x20the\x20local\x20DB\x0a\x20\x20\x20\x20token\x20revoke\x20<id>\x20\x20\x20\x20\x20\x20\x20\x20Revoke\x20(delete)\x20a\x20token\x20by\x20id\x20(full\x20uuid\x20or\x20unique\x20prefix)\x0a\x20\x20\x20\x20join\x20<address>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Join\x20an\x20existing\x20cluster\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--token\x20<t>\x20\x20\x20\x20\x20\x20\x20\x20Bearer\x20token\x20from\x20the\x20cluster\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--username\x20<u>\x20\x20\x20\x20\x20Or,\x20username\x20for\x20login\x20exchange\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--password\x20<p>\x20\x20\x20\x20\x20Password\x20for\x20login\x20exchange\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--address\x20<addr>\x20\x20\x20This\x20node\x27s\x20reachable\x20sync\x20address\x20(required)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--path\x20<dir>\x20\x20\x20\x20\x20\x20\x20Local\x20DB\x20path\x0a\x20\x20\x20\x20backup\x20[dir]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Hot\x20filesystem\x20backup\x20via\x20LMDB\x20native\x20copy\x20(default:\x20./okdb-backup)\x0a\x20\x20\x20\x20export\x20<file>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Streaming\x20NDJSON\x20logical\x20export\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env\x20<name>\x20\x20\x20\x20\x20\x20env\x20to\x20export\x20(default:\x20default)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--types\x20<a,b,...>\x20comma-separated\x20type\x20filter\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--changes\x20\x20\x20\x20\x20\x20\x20\x20\x20include\x20changelog\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--blobs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20also\x20export\x20blob\x20files\x20alongside\x0a\x20\x20\x20\x20import\x20<file>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Streaming\x20NDJSON\x20logical\x20import\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env\x20<name>\x20\x20\x20\x20\x20\x20target\x20env\x20override\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--types\x20<a,b,...>\x20import\x20only\x20these\x20types\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--drop\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20drop\x20&\x20recreate\x20existing\x20types\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--changes\x20\x20\x20\x20\x20\x20\x20\x20\x20restore\x20changelog\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--blobs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20also\x20import\x20blob\x20files\x20alongside\x0a\x20\x20\x20\x20reset\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Delete\x20and\x20recreate\x20database\x20(with\x20confirmation);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20node\x20identity\x20and\x20licenses\x20are\x20preserved\x0a\x20\x20\x20\x20license\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20List\x20stored\x20licenses,\x20current\x20tier,\x20and\x20usage\x0a\x20\x20\x20\x20license\x20<blob|path>\x20\x20\x20\x20\x20\x20Add\x20a\x20license\x20blob\x20(or\x20read\x20from\x20a\x20.license\x20file)\x0a\x20\x20\x20\x20license\x20<activation>\x20\x20\x20\x20\x20Activate\x20a\x20previously-added\x20license\x20with\x20the\x20vendor\x27s\x20token\x0a\x20\x20\x20\x20license\x20<id>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20details\x20for\x20one\x20stored\x20license\x20(by\x20uuid\x20or\x20prefix)\x0a\x20\x20\x20\x20license\x20remove\x20<id>\x20\x20\x20\x20\x20\x20Remove\x20a\x20stored\x20license\x0a\x0a\x20\x20Environment\x20variables:\x0a\x20\x20\x20\x20OKDB_PORT\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20HTTP\x20port\x0a\x20\x20\x20\x20OKDB_PATH\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Database\x20directory\x0a\x20\x20\x20\x20OKDB_LOG_LEVEL\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Log\x20level\x20(debug|info|warn|error)\x0a\x20\x20\x20\x20OKDB_KEY\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Encryption\x20key\x0a\x20\x20\x20\x20OKDB_NO_REPL=1\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20REPL\x0a\x20\x20\x20\x20OKDB_NO_ADMIN=1\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20admin\x20UI\x0a\x20\x20\x20\x20OKDB_HTTP_WORKERS\x20\x20\x20\x20\x20\x20\x20\x20\x20Number\x20of\x20passive\x20HTTP\x20worker\x20processes\x20(default:\x20cores\x20−\x201;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20forced\x20to\x201\x20if\x20the\x20shmbuf\x20native\x20binding\x20is\x20unavailable)\x0a\x0a\x20\x20Config\x20file\x20(.kdbconfig)\x20—\x20JSON,\x20all\x20keys\x20optional:\x0a\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22port\x22:\x20\x20\x20\x20\x208484,\x0a\x20\x20\x20\x20\x20\x20\x22path\x22:\x20\x20\x20\x20\x20\x22./okdb-data\x22,\x0a\x20\x20\x20\x20\x20\x20\x22key\x22:\x20\x20\x20\x20\x20\x20\x22...\x22,\x0a\x20\x20\x20\x20\x20\x20\x22logLevel\x22:\x20\x22info\x22,\x0a\x20\x20\x20\x20\x20\x20\x22noAdmin\x22:\x20\x20false,\x0a\x20\x20\x20\x20\x20\x20\x22noRepl\x22:\x20\x20\x20false,\x0a\x20\x20\x20\x20\x20\x20\x22auth\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22open\x22:\x20false\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20Examples:\x0a\x20\x20\x20\x20okdb\x0a\x20\x20\x20\x20okdb\x20--port\x209000\x20--path\x20./mydb\x0a\x20\x20\x20\x20okdb\x20--no-repl\x20--port\x208080\x0a\x20\x20\x20\x20okdb\x20--open\x0a\x20\x20\x20\x20okdb\x20--open\x20192.168.1.0/24\x0a\x20\x20\x20\x20okdb\x20doctor\x0a\x20\x20\x20\x20okdb\x20backup\x20./my-backup\x0a','License\x20already\x20stored','delete','\x20\x20records=','isWanted','slice','add','_handlePoke','sourceType','--help','listenAddr','_closed','_inflight','activate','writeUInt8','updatedAt','\x0a\x20\x20Usage:\x20use\x20<env-name>\x0a','ceil','licenseHash','\x27\x20on\x20type\x20\x27','[okdb-cluster]\x20change-feed\x20init\x20failed:\x20','\x20bytes,\x20need\x20>=\x2065)','setDesired','_activateProcesses','(no\x20types)','open','procmode/','_lock','license:activated','OKDBTypeNotRegisteredError','[okdb]\x20shmbuf\x20native\x20binding\x20unavailable\x20—\x20multi-process\x20clustering\x20is\x20unsafe\x20','noAdmin','~tokens','noRepl','meta','\x20\x20\x20\x20•\x20a\x20license\x20id\x20\x20\x20\x20\x20(uuid)','split','details','\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','spki','bumpCmd','\x20process','isInteger','\x22\x20→\x20','primary','drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):','server','\x20\x20Writes:\x20\x20','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20was\x20issued\x20for\x20a\x20different\x20node\x20—\x20share\x20this\x20node\x27s\x20PIN\x20with\x20the\x20vendor.','_onProcEvent','OKDBError','_heldTotal','http.workers','reportThreadStats','running','writeUInt32BE','/type/users/item/alice\x0a\x20\x20\x20\x20','homedir','envs','address','\x20\x20⚠','\x0a\x20\x20\x20\x20','type/users/query\x20{\x22active\x22:true}','getDesired','label','openDB','emit','\x0d[okdb]\x20blobs:\x20','assign','\x20\x20#','--port','\x20\x20\x20\x201.\x20Send\x20the\x20PIN\x20above\x20(','--inspect','line','_flushTimer','send','VERSION_MISMATCH','index','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','afterWrite','\x20\x20Common\x20causes:','floor','syncPeers','Invalid\x20primary\x20key\x20type:\x20','_supervisorKey','attachFeed','draining','types/env=','node\x20identity','putSync','Invalid\x20index\x20key\x20type\x20for\x20\x27','\x20===','cli','length','DELETE\x20type/users/item/x','SIGBREAK','isWorker','LICENSE_ALREADY_STORED','\x20\x20\x20\x20\x20control\x20log\x20verbosity\x0a\x20\x20','\x20—\x20','[okdb]\x20closed\x20cleanly\x0a','\x20\x20Shell\x20commands','\x0a\x20\x20\x20\x20\x20\x20','_buildOwnRow','processingStatusView','input:\x20','/api/env/','License\x20limit\x20exceeded:\x20','--env','importFromFile','\x20records','prependListener','\x20active\x20env:\x20','__writeCounter','invalid','_desired','Feature\x20not\x20licensed:\x20','deaths','heapUsed','attach','_onTick','\x20\x20\x20\x20graceful\x20shutdown\x0a','building','object','free\x20tier','\x20license\x20—\x20no\x20activation\x20needed)','\x20\x20\x20\x20\x20\x20\x20\x20\x20OKDB\x20SHELL\x20\x20\x20\x20\x20\x20\x20\x20','License\x20signature\x20invalid:\x20','prototype','procmodeack/','[okdb]\x20error:\x20--password\x20requires\x20--name','\x20\x20✓\x20Removed\x20license\x20','result','\x20pid=','__okdbSlot','equals','_dedupeMax','_baselines','\x1b[1m','\x20\x20\x20\x20limits:\x20\x20\x20\x20','randomUUID','acquiredAt','400fVguKf','bind','byteLength','other','_startAdmission','exportBlobs','types','[okdb]\x20export\x20complete','size','[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a','holder','token','[okdb]\x20error:\x20','/type/users\x0a\x20\x20\x20\x20','Invalid\x20license\x20blob:\x20','flushLmdb','\x20already\x20in\x20use','database\x20path\x20not\x20writable:\x20','view','writerStatus','\x20forked\x20','createHmac','_draining','\x0a\x20\x20','changes','identity','path','handle','_key','\x20\x20Usage:\x20okdb\x20license\x20[<blob|path|uuid|activation-token>]','targetKey','1ofN:','\x0a\x20\x20License\x20details:','index:reset','DELETE','\x20\x20╚═══════════════════════════╝','true','loadEnvFile','ITEM_REMOVE','join','\x20\x20\x20\x20\x20\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','execArgv','_drain','<path>','properties','SCHEMA_VALIDATION_FAILED','process\x20','license:added','\x20\x20\x20http://localhost:','_hbTimer','fromEntries','fts:reset','\x20while\x20this\x20process\x20runs\x20','trim','Bearer\x20','Feature\x20not\x20available\x20on\x20free\x20tier:\x20','[okdb]\x20close\x20error:\x20','Release','processors','Sync','_groupByProcess','127.0.0.1','options','setLogger','/types\x0a\x20\x20\x20\x20','OKDBIndexNotRegisteredError','--token','TYPE_ALREADY_REGISTERED','\x0a\x20\x20[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a','startHeartbeat','_isFree','pushEphemeral','okdb','FOREIGN_KEY_DELETE_RESTRICTED',':\x20key\x20[','40856jIkfMw','\x0a\x20\x20✓\x20Token\x20created','summary','commit','children','readUInt8','processorId','[body]','[okdb]\x20invalid\x20','failures','statSync','Activation\x20invalid:\x20','__OKDB_PUB_FINGERPRINT__','\x0a\x0a\x20\x20','\x20\x20Flags',');\x20','_coordinator','sync:apply','none','\x20\x20@','[okdb]\x20exported\x20\x20types=','replace',')\x20exited\x20','\x20already\x20exists','perf_hooks','license:removed','[okdb]\x20error:\x20unrecognized\x20input:\x20\x22','_dedupeKey','expired','OKDBSchemaValidationError','INVALID_PRIMARY_KEY','\x20\x20(no\x20env\x20draining)','_removeRowAsync','\x20\x20\x20\x20\x20\x20\x20','cpuPct','info','system','ttl:clear','verifyActivation','liveThreadStats','_openEnvLazy','--name','stderr','caps','catch','\x20MB\x20→\x20','unref','HTTP\x20','Environments','nodesView','needsActivation','Indexes','_done','\x20\x20✓\x20OKDB\x20cluster\x20running','\x27\x20doesn\x27t\x20exist','LICENSED_BUILD','publishChildRow','listening','_holderDead','memoryUsage','state','dropSchema','\x20records…','{}[]:,\x27\x22','../','_computeStatus','OKDBForeignKeyError','round','\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','utf8','envs=','win32','QUIT','parse','allocUnsafe','getProcess','\x20\x20[okdb]\x20','\x20\x20\x20\x20status:\x20\x20\x20\x20active','15196350cRBKZJ','env','\x20\x20(','resetting','pause','EADDRINUSE','fast','pending','effective','_participate','_startedAt','count','type/users','clusterStatusView','SYNC_COMMITS','\x20\x20\x20\x20\x20\x20\x20POST\x20(body\x20implies\x20POST)\x0a\x20\x20','every','_isWriter','fn-runner','alloc','ref:violation_resolved','Types','red','keys:','status','\x20\x20Or\x20set\x20sync.address\x20in\x20.kdbconfig','\x20\x20\x20\x20license:\x20⚠\x20OPEN\x20—\x20','maxExtra','\x20ipc\x20error:\x20','detectInputType','http://localhost:','decommission','magenta','[okdb]\x20backing\x20up\x20to\x20','_caps','time','get','bus:type_drop','[okdb]\x20http\x20workers:\x20','blob','_lastCpuUsage','percentile','\x20in\x20','deregisterSelf','addedAt','\x0a[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a','[okdb]\x20opening\x20','_scheduleFlush','\x0a\x20\x20✓\x20License\x20already\x20stored\x20(no\x20change)','\x20\x20\x20\x20writes:\x20\x20\x20\x20','forEach','\x20licenses','_rawDb','\x20document(s)\x20reference\x20it\x20with\x20onDelete:restrict','--eval','creating','_changefeed','ftsName','entries','VIEW_PROGRESS','ttl:expired','enable','exports','isPrimary','./okdb-export.ndjson','\x20<path>\x20[json-body]','_maybePublish','decodeLicenseBlob','nodeKey','participate','--config','\x20statusEnv=',')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census','init','--drop','LICENSE_INVALID','role','--log-requests','committed','function','namespace','hard-killed','_released','hidden','_writer','./okdb-data',';\x20shmbuf\x20native\x20missing\x20→\x20forced\x20single-process','_drainOne','_processStartedAt','off','unknown','crypto','param','\x20HTTP\x20server(s)\x20on\x20port\x20','commitP99Ms','_systemEnv','stack','_nodeDb','_timer','halted','system:stopped','\x20for\x20commands,\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','stdin','Cannot\x20set\x20enforce\x20schema\x20on\x20','[okdb-cluster]\x20worker\x20pid=','decommissioning','ALREADY_EXISTS','\x20\x20\x20\x20label:\x20\x20\x20\x20\x20\x20\x20','unique:violation_resolved','value','\x20\x20\x20\x20status:\x20\x20\x20\x20active\x20\x20(','fts','\x0a\x20\x20Joining\x20cluster\x20at\x20','LICENSE_ACTIVATION_INVALID','\x20\x20\x20\x20api:\x20\x20\x20\x20\x20http://localhost:','charCodeAt',']\x20already\x20maps\x20to\x20\x27','reap','activateLicense','set','[okdb]\x20cluster\x20close\x20error:\x20','warn','green','_ensureTokensType','_ownMeta','heapTotal','write','unhandledRejection','OKDB-PIN-V1:',']:\x20transaction\x20ran\x20nested\x20inside\x20a\x20write\x20txn\x20held\x20open\x20by\x20a\x20non-writer\x20caller','LICENSE_HASH_MISMATCH','cursorKey','\x1b[90m','\x20\x20All\x20checks\x20passed.\x0a','\x20\x20env=','_handleInProcess','files','__okdbCluster','mkdirSync','[okdb]\x20invalid\x20port:\x20','rawBuf','functions','no\x20.kdbconfig\x20(using\x20defaults)','compact','waiting','\x1b[36m','_cmd','stopHeartbeat','fanout','[okdb]\x20error:\x20remove\x20requires\x20an\x20id\x20argument','_servingEngines','_desiredOverlay','registry\x20heartbeat\x20skipped\x20(writer=','_envs','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20','toLocaleString','[okdb]\x20warning:\x20could\x20not\x20read\x20node\x20identity/licenses\x20before\x20reset\x20(','cpus','\x22\x20matches\x20','remove','sync','reload','Embeddings','_threadStats','id:\x20','\x20\x20(name:\x20','concat','processorsView','copy','\x20\x20\x20\x20•\x20a\x20path\x20to\x20a\x20.license\x20file','[okdb]\x20primary\x20okdb\x20close\x20error:\x20','next','[okdb]\x20backup\x20complete','argv','bus:env_release','\x20\x20Usage:','[okdb]\x20blobs:\x20imported=','isDead','\x20days\x20—\x20POC/demo\x20only,\x20not\x20node-bound)','registry\x20publish\x20failing:\x20','fts:drop','readFileSync','_nestedWarned','padStart',':want','dest','LABEL','cyan','event','USE','cpuUsage','txn:rollback','processor:progress','slot','clearThreadStats','--version',',\x20got\x20','_enqueuedAt','starting','disable','[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22','INDEX_PROGRESS','digest','push','\x20\x20\x20\x20expires:\x20\x20\x20','\x20(expires\x20','platform','ms\x20busy=','\x20times\x20in\x20','Open\x20licenses\x20cannot\x20exceed\x206\x20months\x20duration\x20(this\x20license\x20expires\x20','standard','randomBytes','username','Unique\x20constraint\x20violated\x20on\x20','activation','has','async','4901080TVetXh','\x20env','EXIT','migrations','listNodes','process','processing','listRoutes','getClock','[okdb]\x20nothing\x20to\x20reset\x20—\x20','(on\x20any\x20path\x20command)','\x0a\x20\x20Delete\x20ALL\x20data\x20in\x20','embeddings','105cfDeNY','number','writes=','_rowKey','GET','entry','timingSafeEqual','backup','queue','[okdb]\x20shutdown\x20drain\x20exceeded\x203000ms\x20—\x20hard-exiting\x0a','_singletonLocks','_nodeDbFor','some','system:bus_state_change','cause','OKDBVersionMismatchError','ms\x20activeWriters=','_license','sig','Examples','\x0a\x20\x20✓\x20License\x20added','\x20worker\x20slot=','writeUInt16BE','ttl','\x27,\x20cannot\x20map\x20to\x20\x27','valid','assertLimit','_flushDebounce','PUBLIC_KEY_PEM','disconnect','sizeBefore','env/:env','_held','getSecurityNotices','stats','respawnTimer','view:progress','derivePin','_putRowSync','decodeActivationToken:\x20expected\x2077\x20bytes,\x20got\x20','_adminRelay','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20','kind','OKDBSchemaCollectionError','SYSTEM_POKE','reduce','selfKey','85983QIQdkH','\x20\x20changes=','seq','Index\x20\x27','.\x20Only\x20primitives,\x20null,\x20Buffers,\x20and\x20arrays\x20are\x20allowed.\x20Got:\x20','node','payload','title','\x20\x20\x20\x20•\x20an\x20activation\x20token\x20\x20(124\x20chars)','uncaughtException','detachConsole','\x1b[35m','\x20log\x20level:\x20','connected','\x20(slot=','processKey','typeSubDbs','updateSupervisedChildStats','_log','_singletonLock','[okdb]\x20error:\x20join\x20requires\x20credentials.\x20Provide\x20--token\x20<t>\x20or\x20--username\x20<u>\x20--password\x20<p>','setupPrimary','FOREIGN_KEY_VIOLATION','[okdb]\x20imported\x20\x20types=','\x0a\x20\x20Run\x20okdb\x20to\x20start\x20the\x20server.\x0a','~processes','quit','change','\x20\x20http://localhost:','\x20\x20\x20\x20permissions:\x20','okdb.pid','name','item:create','createServer','treeView','14337609psWGnk','bus:proc','txn:end','appendFileSync','\x20result','passive\x20HTTP\x20worker(s)\x20serving\x20:','help','import','toLowerCase','node:crypto','[okdb]\x20error:\x20join\x20requires\x20a\x20remote\x20address.\x20Usage:\x20okdb\x20join\x20<address>\x20--token\x20<t>','Schema\x20validation\x20failed\x20for\x20','shmbufNative','setTtl','publishOwnRow','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','\x20\x20\x20\x20•\x20a\x20license\x20blob\x20\x20\x20(Crockford\x20base32,\x20~150–250\x20chars)','processor','update','\x20\x20·\x20','startedAt','ephemeral','\x20\x20\x20\x20id:\x20\x20\x20\x20','--permissions','clearLine','licensee','indexToDb','data','inputSchema','grants','finally','[okdb]\x20cluster\x20primary\x20pid=','bold','start','from','test','CREATED','_enableChangelog','isFeatureEnabled','[okdb]\x20error:\x20revoke\x20requires\x20an\x20id\x20argument','_outstanding','put','OPEN','\x20\x20Envs:\x20\x20\x20\x20','child_process','childTransaction','okdb-writer:\x20env\x20closing\x20—\x20retry','yellow','toString','⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20','[okdb]\x20created\x20./okdb-data','standalone','worker','createEnvironment','NAME','[filter]','ITEM_UPDATE','_report','sort','[okdb-cluster]\x20slot=','\x0a\x20\x20No\x20routes\x20matching\x20\x22','\x20does\x20not\x20exist','SYSTEM_PROC','env/','\x20\x20\x20\x20api:\x20\x20\x20http://localhost:','<json-body>','decommissioned','filter','[okdb]\x20port\x20','\x20sync','_onItem','limits','records','dropIndex','%),\x20','dead','uuid','mixed\x20versions\x20on\x20one\x20store\x20are\x20unsafe\x20across\x20storage\x20migrations;\x20align\x20versions\x20before\x20upgrading\x20further.','type:drop','freeze','\x20writes\x20(','_started','--no-admin','_acquiredAt','listAll','\x20\x20\x20\x20name:\x20\x20\x20\x20\x20\x20\x20\x20','tags:\x20','keys/public.pem','_active','default','OKDBIndexHasConsumersError','0123456789ABCDEFGHJKMNPQRSTVWXYZ','\x22\x20on\x20\x22','\x1b[33m','(code=','queue-worker','hasDesired','\x20\x20\x20\x20licensee:\x20\x20','OKDB_HTTP_WORKERS','created','description','pin','code','find','\x20\x20Example:\x20okdb\x20join\x20https://node-a.example.com\x20--token\x20<t>\x20--address\x20http://myhost:8484\x0a','history','\x0a\x20\x20✓\x20License\x20activated','isFile','\x20\x20✓\x20database\x20opened\x0a','decodeLicenseBlob:\x20blob\x20too\x20short\x20(','_licenseHash','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20GET\x20(implicit)\x0a\x20\x20','debug','tags','_onStop','migrate','admin','dirname','onWindow','mode','TYPE_NOT_REGISTERED','doctor','\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site','\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)','\x1b[0m','now','{}[]:,\x0a\x0d\x09\x20','\x20@\x20','\x20│\x20','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20','_getType','--label','_db','\x22\x20is\x20used\x20by:\x20','_selfKey','port\x20','Files','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20has\x20expired\x20—\x20request\x20a\x20fresh\x20one.','.kdb_history','\x20more','logs','body','\x20\x20\x20\x20port:\x20\x20','No\x20tokens.','ensureType','peers=','processor:paused','access','/api/','shmbuf.node','OKDBInvalidIndexKeyError','maxMs','threads','env/staging/info','enabled','HELP','\x20day(s).','PUT',')\x20to\x20your\x20license\x20vendor.','(workers\x20can\x27t\x20share\x20the\x20cross-process\x20HLC/clock).\x20Forcing\x20single-process\x20(was\x20','fts:','noCluster','INVALID_VALUE','_migrateVocab','/type/users/query\x0a\x20\x20\x20\x20',',\x20stopping\x20workers…\x0a','min','ENV','[okdb]\x20error:\x20--grants\x20must\x20be\x20valid\x20JSON\x20object','roles','\x0a[okdb]\x20fatal\x20error:','_clusterWorkerAttached','\x20\x20✓\x20http\x20listening\x20on\x20:','\x20\x20(need\x20≥\x2018)','\x20\x20(press\x20Ctrl+C\x20again\x20to\x20exit)\x0a','external','LICENSE_LIMIT_EXCEEDED','hint','createInterface','base64url','\x20\x20✓\x20OKDB\x20server\x20running','decoded','repeat','\x20\x20\x20\x20\x20explicit\x20method\x0a\x0a\x20\x20','--open','der','unlinkSync','\x1b[31m','_collectWriterFacet','_kind','\x0a[okdb]\x20error:\x20','--path','getChanges','_buckets','node/','\x20drainAge=','key','hasType','_cursors','\x20supervised)','epoch'];_0x1008=function(){return _0x2da0c2;};return _0x1008();}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x33d376=_0x1577db;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x55b84c,performance:_0x384974}=require$$0$4,_0x668866=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG===_0x33d376(0x24c),_0x2a7daf=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x14d856=process.env.OKDB_LOOP_LAG_ALL==='1',_0x5562bd=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x35bb55{constructor(){const _0x121bff=_0x33d376;this[_0x121bff(0x494)]=_0x668866,this[_0x121bff(0x4bb)]=new Map(),this['_h']=null,this['_timer']=null,this[_0x121bff(0x44b)]=![],this[_0x121bff(0x3e9)]=(_0x408bc3,_0x4c1eb3)=>process['stderr'][_0x121bff(0x340)](_0x408bc3+(_0x4c1eb3?'\x20'+JSON['stringify'](_0x4c1eb3):'')+'\x0a');}[_0x33d376(0x477)](){const _0x2b107f=_0x33d376;return _0x384974[_0x2b107f(0x477)]();}[_0x33d376(0x267)](_0x4b68e0){const _0x478dc7=_0x33d376;if(typeof _0x4b68e0===_0x478dc7(0x310))this[_0x478dc7(0x3e9)]=_0x4b68e0;}[_0x33d376(0x56c)](_0x2e5c3a,_0x3492bc,_0x9de145){const _0x5c7eea=_0x33d376;if(!this[_0x5c7eea(0x494)])return;let _0x3e23ce=this[_0x5c7eea(0x4bb)][_0x5c7eea(0x2e5)](_0x2e5c3a);!_0x3e23ce&&(_0x3e23ce={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this['_buckets'][_0x5c7eea(0x339)](_0x2e5c3a,_0x3e23ce)),_0x3e23ce['ms']+=_0x3492bc,_0x3e23ce['count']+=0x1,_0x3492bc>_0x3e23ce[_0x5c7eea(0x491)]&&(_0x3e23ce[_0x5c7eea(0x491)]=_0x3492bc,_0x3e23ce[_0x5c7eea(0x2dc)]=_0x9de145||'');}[_0x33d376(0x41b)](_0x2f4139){const _0x5d1af6=_0x33d376;if(!this[_0x5d1af6(0x494)]||this['_started'])return;this['_started']=!![];if(_0x2f4139)this['_log']=_0x2f4139;this['_h']=_0x55b84c({'resolution':0xa}),this['_h'][_0x5d1af6(0x2fe)](),this['_timer']=setInterval(()=>this[_0x5d1af6(0x433)](),_0x2a7daf);if(this[_0x5d1af6(0x323)][_0x5d1af6(0x2a1)])this[_0x5d1af6(0x323)][_0x5d1af6(0x2a1)]();}[_0x33d376(0x470)](_0x366977){const _0x28ae01=_0x33d376;if(!this['_windowCbs'])this[_0x28ae01(0x4de)]=new Set();this[_0x28ae01(0x4de)][_0x28ae01(0x1a0)](_0x366977);if(!this['_started'])this[_0x28ae01(0x22c)]();}[_0x33d376(0x52c)](_0x41b608){this['_windowCbs']?.['delete'](_0x41b608);}[_0x33d376(0x22c)](){const _0xfbc228=_0x33d376;if(this[_0xfbc228(0x52a)])return;this[_0xfbc228(0x52a)]=!![];!this['_h']&&(this['_h']=_0x55b84c({'resolution':0xa}),this['_h']['enable']());const _0x1c044f=_0x2a7daf;this[_0xfbc228(0x510)]=setInterval(()=>{const _0x1fe8a5=_0xfbc228,_0x218a4c=this['_h'];if(!_0x218a4c)return;const _0x52ade0=_0x218a4c[_0x1fe8a5(0x2ea)](0x63)/0xf4240,_0x32e1e9=_0x218a4c[_0x1fe8a5(0x5bc)]/0xf4240,_0x5ef5d7=_0x218a4c[_0x1fe8a5(0x5b0)]/0xf4240;_0x218a4c['reset']();if(this[_0x1fe8a5(0x4de)])for(const _0x250235 of this[_0x1fe8a5(0x4de)]){try{_0x250235({'p99Ms':_0x52ade0,'maxMs':_0x32e1e9,'meanMs':_0x5ef5d7,'reportMs':_0x1c044f});}catch{}}},_0x1c044f);if(this[_0xfbc228(0x510)][_0xfbc228(0x2a1)])this[_0xfbc228(0x510)][_0xfbc228(0x2a1)]();}[_0x33d376(0x433)](){const _0x245065=_0x33d376,_0x2c2b03=this['_h'],_0x1c25ca=_0x2c2b03[_0x245065(0x5bc)]/0xf4240,_0x214376=_0x2c2b03[_0x245065(0x2ea)](0x63)/0xf4240,_0x3cf107=_0x2c2b03[_0x245065(0x5b0)]/0xf4240;_0x2c2b03[_0x245065(0x5cc)]();const _0x48ad8f=[...this[_0x245065(0x4bb)][_0x245065(0x2fb)]()][_0x245065(0x4d3)](([_0x592518,_0x4d15da])=>({'label':_0x592518,..._0x4d15da}))['sort']((_0x421e47,_0x5099e0)=>_0x5099e0['ms']-_0x421e47['ms'])[_0x245065(0x19f)](0x0,0x8);this[_0x245065(0x4bb)][_0x245065(0x18f)]();const _0x2a68db=_0x48ad8f[_0x245065(0x3d5)]((_0x368794,_0x4af1cc)=>_0x368794+_0x4af1cc['ms'],0x0),_0x1a0a28=_0x48ad8f['map'](_0x2c8be=>_0x2c8be['label']+'='+_0x2c8be['ms'][_0x245065(0x4cc)](0x0)+'ms/'+_0x2c8be[_0x245065(0x2cc)]+(_0x2c8be[_0x245065(0x491)]>0x5?_0x245065(0x10a)+_0x2c8be[_0x245065(0x491)][_0x245065(0x4cc)](0x0)+'ms'+(_0x2c8be['maxExtra']?'\x20'+_0x2c8be[_0x245065(0x2dc)]:'')+')':''));(_0x14d856||_0x1c25ca>=_0x5562bd)&&this[_0x245065(0x3e9)]('loop-lag\x20'+_0x2a7daf+_0x245065(0x110)+_0x1c25ca['toFixed'](0x0)+'ms\x20p99='+_0x214376[_0x245065(0x4cc)](0x0)+'ms\x20mean='+_0x3cf107[_0x245065(0x4cc)](0x0)+_0x245065(0x391)+_0x2a68db['toFixed'](0x0)+'ms'+(_0x1a0a28[_0x245065(0x1f7)]?_0x245065(0x47a)+_0x1a0a28[_0x245065(0x24f)]('\x20\x20'):''),{'feature':_0x245065(0x5b9)});if(this[_0x245065(0x4de)])for(const _0x20fd17 of this[_0x245065(0x4de)]){try{_0x20fd17({'p99Ms':_0x214376,'maxMs':_0x1c25ca,'meanMs':_0x3cf107,'reportMs':_0x2a7daf});}catch{}}}[_0x33d376(0x4ea)](){const _0x4e3b84=_0x33d376;if(this['_timer'])clearInterval(this[_0x4e3b84(0x323)]);if(this['_h'])this['_h'][_0x4e3b84(0x389)]();this[_0x4e3b84(0x323)]=null,this['_h']=null,this[_0x4e3b84(0x44b)]=![];}}const _0x4a17fd=new _0x35bb55();if(_0x4a17fd[_0x33d376(0x494)])_0x4a17fd['start']();return okdbLoopMonitor={'LOOP':_0x4a17fd},okdbLoopMonitor;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x369c14=require$$1$1,_0x52fdd5=require$$1;let _0x22502c,_0x469067,_0x1f2dcf,_0x47c71a,_0x1300f5,_0x148278,_0x245a89,_0x36acbd=![];const _0x471662=new Set();let _0x2b1748=null;const _0x4fccfc=new Map();function _0x4f389d(){const _0x17770b=_0x38fc;if(_0x22502c!==undefined)return _0x22502c;_0x22502c=process.env.OKDB_DIAG==='1';if(!_0x22502c)return![];_0x469067=process.env.OKDB_DIAG_STACK==='1',_0x47c71a=Math[_0x17770b(0x5bc)](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x1f2dcf=new Array(_0x47c71a),_0x1300f5=0x0,_0x148278=0x0,_0x245a89=process.env.OKDB_DIAG_DIR||null;if(_0x245a89)try{_0x369c14[_0x17770b(0x34c)](_0x245a89,{'recursive':!![]});}catch{}return!![];}function _0x5df7e4(){return _0x22502c===undefined?_0x4f389d():_0x22502c;}function _0x5e4cdc(_0x59dd24,_0x4de2cc){const _0x52f5f6=_0x38fc;if(_0x22502c===undefined?!_0x4f389d():!_0x22502c)return;let _0x2ffdcc;if(_0x469067){const _0x5961f3=new Error()[_0x52f5f6(0x321)]||'';_0x2ffdcc=_0x5961f3[_0x52f5f6(0x1be)]('\x0a')['slice'](0x3)['map'](_0xf0d1b6=>_0xf0d1b6[_0x52f5f6(0x25d)]())[_0x52f5f6(0x43d)](Boolean)[_0x52f5f6(0x19f)](0x0,0x8);}_0x1f2dcf[_0x1300f5]={'seq':_0x148278++,'t':Date['now'](),'env':_0x59dd24,'kind':_0x4de2cc||_0x52f5f6(0x276),'stack':_0x2ffdcc},_0x1300f5=(_0x1300f5+0x1)%_0x47c71a;}function _0x3f893c(_0x5999d3){const _0x5067de=_0x38fc,_0x236f44=[];for(let _0x50a4fb=0x0;_0x50a4fb<_0x47c71a;_0x50a4fb++){const _0x4d8460=_0x1f2dcf[(_0x1300f5-0x1-_0x50a4fb+_0x47c71a*0x2)%_0x47c71a];if(!_0x4d8460)continue;_0x236f44[_0x5067de(0x38d)](_0x4d8460);if(_0x236f44['length']>=_0x5999d3)break;}return _0x236f44;}function _0x3db004(_0x2fdb71){const _0x4f9e5c=_0x38fc;try{process[_0x4f9e5c(0x29d)][_0x4f9e5c(0x340)](_0x2fdb71+'\x0a');}catch{}if(_0x245a89)try{_0x369c14[_0x4f9e5c(0x3fd)](_0x52fdd5['join'](_0x245a89,_0x4f9e5c(0x59e)+process['pid']+'.log'),_0x2fdb71+'\x0a');}catch{}}function _0x4d7e65(_0x111535){const _0x40bbd1=_0x38fc,_0x27f29c=_0x3f893c(_0x111535);if(!_0x27f29c[_0x40bbd1(0x1f7)])return _0x40bbd1(0x475);const _0x1ccc04=Date[_0x40bbd1(0x477)]();return _0x27f29c[_0x40bbd1(0x4d3)](_0x43f6db=>{const _0x23f43f=_0x40bbd1,_0x381cf6=_0x23f43f(0x1df)+_0x43f6db[_0x23f43f(0x3d9)]+'\x20-'+(_0x1ccc04-_0x43f6db['t'])+'ms\x20env='+_0x43f6db[_0x23f43f(0x2c2)]+'\x20'+_0x43f6db['kind'];return _0x43f6db[_0x23f43f(0x321)]&&_0x43f6db[_0x23f43f(0x321)]['length']?_0x381cf6+'\x0a\x20\x20\x20\x20\x20\x20'+_0x43f6db['stack'][_0x23f43f(0x24f)](_0x23f43f(0x200)):_0x381cf6;})[_0x40bbd1(0x24f)]('\x0a');}function _0x16a516(_0x39c776,_0x139b73){const _0x2675db=_0x38fc,_0x512284=_0x2675db(0x5c5)+_0x39c776+_0x2675db(0x479)+new Date()[_0x2675db(0x5c7)]()+_0x2675db(0x21f)+process[_0x2675db(0x18a)]+'\x20===',_0x332779=[_0x512284,_0x2675db(0x512)+(_0x139b73&&_0x139b73['stack']?_0x139b73[_0x2675db(0x321)]['split']('\x0a')[0x0]:_0x139b73),'recent\x20writes\x20(newest\x20first)'+(_0x469067?'':_0x2675db(0x474))+':',_0x4d7e65(0x18),_0x3c48b8(),'='[_0x2675db(0x4b0)](_0x512284[_0x2675db(0x1f7)]-0x1)];_0x3db004(_0x332779['join']('\x0a'));}function _0x47f3a1(_0x3d337d){const _0x46c0f8=_0x38fc;if(!_0x5df7e4())return;const _0x26798d=String(_0x3d337d&&_0x3d337d[_0x46c0f8(0x141)]||_0x3d337d||''),_0x4069e9=/already closed|environment is already|invalid read txn|reset an invalid/i[_0x46c0f8(0x41d)](_0x26798d);_0x16a516(_0x4069e9?'ORPHAN\x20(env-closed\x20write)':_0x46c0f8(0x3e0),_0x3d337d);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x4069e9)return;try{console[_0x46c0f8(0x54f)](_0x3d337d&&_0x3d337d[_0x46c0f8(0x321)]?_0x3d337d[_0x46c0f8(0x321)]:_0x3d337d);}catch{}process[_0x46c0f8(0x5d6)](0x1);}function _0x3c8826(_0x11a96f){const _0x10f1c1=_0x38fc;if(!_0x5df7e4())return;const _0xcd85b2=String(_0x11a96f&&_0x11a96f[_0x10f1c1(0x141)]||_0x11a96f||'');/already closed|environment is already|invalid read txn|reset an invalid/i['test'](_0xcd85b2)&&_0x16a516('ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)',_0x11a96f);}function _0x3c48b8(){const _0x32944d=_0x38fc,_0x1f6441=[_0x32944d(0x1c7)];let _0x37ee4d=![];for(const _0x509398 of _0x471662){const _0x25848e=_0x509398&&_0x509398['_envs'];if(!_0x25848e)continue;for(const [_0x145070,_0x2c0443]of _0x25848e){const _0x4eeae4=_0x2c0443&&_0x2c0443[_0x32944d(0x283)]&&_0x2c0443['_coordinator'][_0x32944d(0x23a)];if(!_0x4eeae4)continue;let _0x3b79ae,_0x24139d;try{_0x3b79ae=Atomics['load'](_0x4eeae4,0x0),_0x24139d=Atomics[_0x32944d(0x4fd)](_0x4eeae4,0x1);}catch{continue;}if(_0x3b79ae===0x0)continue;_0x37ee4d=!![];const _0x5d785d=_0x3b79ae>0x0?'SWAP':_0x32944d(0x36a),_0x23ab27=Date['now']()-Math[_0x32944d(0x138)](_0x3b79ae)*0x3e8,_0x2ad582=((()=>{const _0x1f9a0a=_0x32944d;try{return _0x2c0443[_0x1f9a0a(0x315)]&&_0x2c0443[_0x1f9a0a(0x315)][_0x1f9a0a(0x2d9)]?_0x2c0443[_0x1f9a0a(0x315)][_0x1f9a0a(0x2d9)]():null;}catch{return null;}})());_0x1f6441[_0x32944d(0x38d)](_0x32944d(0x348)+_0x145070+'\x20phase='+_0x5d785d+_0x32944d(0x4bd)+_0x23ab27+_0x32944d(0x3b8)+_0x24139d+(_0x2ad582?_0x32944d(0x16d)+_0x2ad582[_0x32944d(0x196)]+_0x32944d(0x12d)+_0x2ad582['oldestPendingMs']+_0x32944d(0x52e)+_0x2ad582[_0x32944d(0x59b)]+'}':''));}}if(!_0x37ee4d)_0x1f6441[_0x32944d(0x38d)](_0x32944d(0x292));return _0x1f6441[_0x32944d(0x24f)]('\x0a');}function _0x18e289(){const _0x350bbe=_0x38fc;if(!_0x5df7e4())return;const _0xc5b882=Math[_0x350bbe(0x5bc)](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x177ae2=Date[_0x350bbe(0x477)]();for(const _0x56150b of _0x471662){const _0x2abcf5=_0x56150b&&_0x56150b[_0x350bbe(0x35b)];if(!_0x2abcf5)continue;for(const [_0x3c03f1,_0x2e8217]of _0x2abcf5){const _0x34abb9=_0x2e8217&&_0x2e8217[_0x350bbe(0x283)]&&_0x2e8217[_0x350bbe(0x283)][_0x350bbe(0x23a)];if(!_0x34abb9)continue;let _0x1d9376;try{_0x1d9376=Atomics[_0x350bbe(0x4fd)](_0x34abb9,0x0);}catch{continue;}const _0x5f38f7=_0x56150b['path']+'|'+_0x3c03f1;if(_0x1d9376<=0x0){_0x4fccfc[_0x350bbe(0x19c)](_0x5f38f7);continue;}const _0x43e027=_0x177ae2-_0x1d9376*0x3e8,_0x36e866=_0x4fccfc[_0x350bbe(0x2e5)](_0x5f38f7);if(_0x43e027<_0xc5b882)continue;if(_0x36e866&&_0x177ae2-_0x36e866[_0x350bbe(0x5c0)]<_0xc5b882)continue;_0x4fccfc[_0x350bbe(0x339)](_0x5f38f7,{'firstTs':_0x36e866?_0x36e866[_0x350bbe(0x545)]:_0x1d9376,'dumpedAt':_0x177ae2});const _0x2d30f8=_0x350bbe(0x5cf)+_0x43e027+'ms\x20on\x20env='+_0x3c03f1+_0x350bbe(0x479)+new Date()[_0x350bbe(0x5c7)]()+_0x350bbe(0x21f)+process['pid']+_0x350bbe(0x1f5);_0x3db004([_0x2d30f8,_0x3c48b8(),'='['repeat'](_0x2d30f8[_0x350bbe(0x1f7)]-0x1)][_0x350bbe(0x24f)]('\x0a'));}}}function _0x27eec2(){const _0x34418c=_0x38fc;if(!_0x5df7e4()||_0x36acbd)return;_0x36acbd=!![],process[_0x34418c(0x209)]('uncaughtException',_0x47f3a1),process[_0x34418c(0x209)](_0x34418c(0x341),_0x3c8826);const _0x4a5cf7=Math[_0x34418c(0x5bc)](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x2b1748=setInterval(_0x18e289,_0x4a5cf7);if(_0x2b1748[_0x34418c(0x2a1)])_0x2b1748['unref']();}function _0xe01724(_0x27eda5){const _0x415cd3=_0x38fc;if(!_0x5df7e4()||!_0x27eda5)return;_0x471662[_0x415cd3(0x1a0)](_0x27eda5),_0x27eec2();}function _0x2fad05(_0x4f0497){const _0xbf6d04=_0x38fc;_0x471662[_0xbf6d04(0x19c)](_0x4f0497);}function _0x44bd30(){const _0x597a38=_0x38fc;if(!_0x5df7e4())return{'enabled':![],'hint':_0x597a38(0x537)};return{'enabled':!![],'stackCapture':!!_0x469067,'recentWrites':_0x3f893c(0x10),'drain':_0x3c48b8()};}return okdbDiag={'isEnabled':_0x5df7e4,'recordWrite':_0x5e4cdc,'installDiag':_0x27eec2,'registerOkdb':_0xe01724,'unregisterOkdb':_0x2fad05,'snapshot':_0x44bd30},okdbDiag;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x454ae4=_0x1577db;if(hasRequiredOkdbWriter)return okdbWriter['exports'];hasRequiredOkdbWriter=0x1;const {performance:_0xa16f0d}=require$$0$5,_0x5c58c3=requireOkdbDiag(),_0x340023=process.env.OKDB_COMMIT_MODE===_0x454ae4(0x362);class _0x3ce28d{constructor(_0x3ebe84){const _0x5098ad=_0x454ae4;this['env']=_0x3ebe84,this[_0x5098ad(0x1a6)]=new Set(),this[_0x5098ad(0x387)]=new Map(),this[_0x5098ad(0x136)]=0x0,this['_durs']=[],this[_0x5098ad(0x2a7)]=[],this[_0x5098ad(0x163)]=Math[_0x5098ad(0x5bc)](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this['_outstanding']=0x0,this['_bpWaiters']=[],this[_0x5098ad(0x10d)]=0x0,this[_0x5098ad(0x3c8)]=null,this[_0x5098ad(0x1cd)]=0x0,this[_0x5098ad(0x4cd)]=0x0,this[_0x5098ad(0x378)]=![];}async[_0x454ae4(0x5ab)](_0x3d4d88,_0x49f00b){const _0x5851ae=_0x454ae4;if(_0x5c58c3['isEnabled']())_0x5c58c3[_0x5851ae(0x567)](this[_0x5851ae(0x2c2)]?.[_0x5851ae(0x3f6)],_0x49f00b);if(this[_0x5851ae(0x1a5)]){const _0x292afb=new Error(_0x5851ae(0x428));_0x292afb['code']=_0x5851ae(0x15c);throw _0x292afb;}if(this[_0x5851ae(0x163)]>0x0){let _0x41b8f1=![];while(this[_0x5851ae(0x422)]>=this[_0x5851ae(0x163)]&&!this['_closed']){!_0x41b8f1&&(_0x41b8f1=!![],this['_bpParkedTotal']++),await new Promise(_0x5dd13b=>this[_0x5851ae(0x518)][_0x5851ae(0x38d)](_0x5dd13b));}if(this['_closed']){const _0x5cfcb8=new Error(_0x5851ae(0x428));_0x5cfcb8[_0x5851ae(0x460)]='ENV_CLOSING_RETRY';throw _0x5cfcb8;}}this['_outstanding']++;const _0x34c3a9=this[_0x5851ae(0x2c2)][_0x5851ae(0x283)];for(;;){while(this[_0x5851ae(0x3c8)])await this['_held'];if(_0x34c3a9)await _0x34c3a9['beforeWrite']();if(!this[_0x5851ae(0x3c8)])break;if(_0x34c3a9)_0x34c3a9[_0x5851ae(0x1e9)]();}if(this['_closed']){if(_0x34c3a9)_0x34c3a9[_0x5851ae(0x1e9)]();this[_0x5851ae(0x422)]--;if(this[_0x5851ae(0x518)][_0x5851ae(0x1f7)]&&this[_0x5851ae(0x422)]<this[_0x5851ae(0x163)])this[_0x5851ae(0x518)][_0x5851ae(0x53e)]()();const _0x588d4b=new Error('okdb-writer:\x20env\x20closing\x20—\x20retry');_0x588d4b[_0x5851ae(0x460)]=_0x5851ae(0x15c);throw _0x588d4b;}const _0x37f1e5=_0xa16f0d['now']();if(_0x340023)try{const _0x357b20=this['env']['db']['transactionSync'](_0x3d4d88);this[_0x5851ae(0x136)]++;if(this[_0x5851ae(0x145)][_0x5851ae(0x38d)](_0xa16f0d[_0x5851ae(0x477)]()-_0x37f1e5)>0x100)this[_0x5851ae(0x145)]['shift']();if(this['_done'][_0x5851ae(0x38d)](_0xa16f0d['now']())>0x800)this[_0x5851ae(0x2a7)][_0x5851ae(0x53e)]();return _0x357b20;}finally{this[_0x5851ae(0x422)]--;if(this[_0x5851ae(0x518)][_0x5851ae(0x1f7)]&&this['_outstanding']<this[_0x5851ae(0x163)])this[_0x5851ae(0x518)][_0x5851ae(0x53e)]()();if(_0x34c3a9)_0x34c3a9[_0x5851ae(0x1e9)]();}let _0x3cf0ed=null;const _0x2c3615=()=>{const _0x179cd7=_0x5851ae,_0x4f6435=_0x3d4d88();if(_0x4f6435&&typeof _0x4f6435[_0x179cd7(0x550)]==='function'&&!_0x3cf0ed){this['_heldTotal']++;let _0x4fc8e2;const _0xb6808=new Promise(_0x1a05a6=>_0x4fc8e2=_0x1a05a6);this[_0x179cd7(0x3c8)]=_0xb6808,_0x3cf0ed=()=>{const _0x4496b8=_0x179cd7;if(this['_held']===_0xb6808)this[_0x4496b8(0x3c8)]=null;_0x4fc8e2();};}return _0x4f6435;};let _0x3c71ad;try{_0x3c71ad=this[_0x5851ae(0x2c2)]['db'][_0x5851ae(0x427)](_0x2c3615);}catch(_0x168a04){_0x3c71ad=Promise['reject'](_0x168a04);}(!_0x3c71ad||typeof _0x3c71ad[_0x5851ae(0x550)]!==_0x5851ae(0x310))&&(this[_0x5851ae(0x4cd)]++,!this['_nestedWarned']&&(this[_0x5851ae(0x378)]=!![],console[_0x5851ae(0x33b)]('okdb-writer['+(this[_0x5851ae(0x2c2)]?.['name']??'?')+_0x5851ae(0x343))),_0x3c71ad=Promise[_0x5851ae(0x547)](_0x3c71ad));const _0x362079=()=>{if(_0x3cf0ed)_0x3cf0ed();};_0x3c71ad[_0x5851ae(0x550)](_0x362079,_0x362079),this[_0x5851ae(0x1a6)][_0x5851ae(0x1a0)](_0x3c71ad),this[_0x5851ae(0x387)][_0x5851ae(0x339)](_0x3c71ad,_0x37f1e5);const _0x1e55b8=()=>{const _0x3ef2c1=_0x5851ae;this['_inflight'][_0x3ef2c1(0x19c)](_0x3c71ad),this[_0x3ef2c1(0x387)][_0x3ef2c1(0x19c)](_0x3c71ad),this[_0x3ef2c1(0x136)]++,this['_outstanding']--;this[_0x3ef2c1(0x518)][_0x3ef2c1(0x1f7)]&&this[_0x3ef2c1(0x422)]<this[_0x3ef2c1(0x163)]&&this[_0x3ef2c1(0x518)][_0x3ef2c1(0x53e)]()();if(this[_0x3ef2c1(0x145)][_0x3ef2c1(0x38d)](_0xa16f0d[_0x3ef2c1(0x477)]()-_0x37f1e5)>0x100)this['_durs']['shift']();if(this[_0x3ef2c1(0x2a7)][_0x3ef2c1(0x38d)](_0xa16f0d[_0x3ef2c1(0x477)]())>0x800)this[_0x3ef2c1(0x2a7)]['shift']();};_0x3c71ad['then'](_0x1e55b8,_0x1e55b8);try{return await _0x3c71ad;}finally{if(_0x34c3a9)_0x34c3a9[_0x5851ae(0x1e9)]();}}[_0x454ae4(0x2d9)](){const _0x31a7aa=_0x454ae4,_0x42e1e9=_0xa16f0d[_0x31a7aa(0x477)]();let _0x28e250=0x0;for(const _0x452b48 of this['_enqueuedAt'][_0x31a7aa(0x564)]()){const _0x1b48f3=_0x42e1e9-_0x452b48;if(_0x1b48f3>_0x28e250)_0x28e250=_0x1b48f3;}let _0x40f147=0x0;for(let _0x210bb9=this[_0x31a7aa(0x2a7)][_0x31a7aa(0x1f7)]-0x1;_0x210bb9>=0x0;_0x210bb9--){if(_0x42e1e9-this[_0x31a7aa(0x2a7)][_0x210bb9]>0x3e8)break;_0x40f147++;}let _0x14a66a=0x0;if(this[_0x31a7aa(0x145)]['length']){const _0x47542e=[...this[_0x31a7aa(0x145)]]['sort']((_0x464e9,_0x2af763)=>_0x464e9-_0x2af763);_0x14a66a=_0x47542e[Math[_0x31a7aa(0x4a0)](_0x47542e['length']-0x1,Math[_0x31a7aa(0x1eb)](_0x47542e['length']*0.99))];}return{'depth':this[_0x31a7aa(0x1a6)][_0x31a7aa(0x230)],'oldestPendingMs':Math[_0x31a7aa(0x2b6)](_0x28e250),'committed':this[_0x31a7aa(0x136)],'commitsPerSec':_0x40f147,'commitP99Ms':Math[_0x31a7aa(0x2b6)](_0x14a66a),'parkedNow':this[_0x31a7aa(0x518)][_0x31a7aa(0x1f7)],'parkedTotal':this[_0x31a7aa(0x10d)],'highWater':this[_0x31a7aa(0x163)]};}['inflightAgesMs'](){const _0x26ba76=_0x454ae4,_0x1ea3a3=_0xa16f0d[_0x26ba76(0x477)]();return[...this[_0x26ba76(0x387)][_0x26ba76(0x564)]()][_0x26ba76(0x4d3)](_0x101ed1=>Math[_0x26ba76(0x2b6)](_0x1ea3a3-_0x101ed1))['sort']((_0x16fd1f,_0x4bd8e7)=>_0x4bd8e7-_0x16fd1f);}['markClosed'](){const _0x4ce061=_0x454ae4;this['_closed']=!![];for(const _0x365f3a of this['_bpWaiters'][_0x4ce061(0x17c)](0x0))_0x365f3a();}async['drain'](){const _0x5535b6=_0x454ae4;let _0x3b9126=0x0;while(this[_0x5535b6(0x1a6)]['size']&&_0x3b9126++<0x3e8){await Promise[_0x5535b6(0x55e)]([...this[_0x5535b6(0x1a6)]]);}}async['put'](_0x13f782,_0x5e0288,_0x23b674,_0x5b5aa4){const _0x45c37c=_0x454ae4;return this['transaction'](()=>{const _0x171f69=_0x38fc;if(_0x5b5aa4===undefined)_0x13f782[_0x171f69(0x1f3)](_0x5e0288,_0x23b674);else _0x13f782['putSync'](_0x5e0288,_0x23b674,_0x5b5aa4);},_0x45c37c(0x17a));}async[_0x454ae4(0x361)](_0x1fb5b1,_0x4a1bc5){const _0x5d9ce2=_0x454ae4;return this[_0x5d9ce2(0x5ab)](()=>_0x1fb5b1[_0x5d9ce2(0x50a)](_0x4a1bc5),'raw-remove');}}async function _0xaa149(_0x3f4aee,_0x46ba5a){const _0x4cf189=_0x454ae4;if(_0x46ba5a==null)_0x46ba5a=Math[_0x4cf189(0x5bc)](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0x581375=_0x3f4aee?.[_0x4cf189(0x515)];if(!_0x581375||typeof _0x581375['then']!==_0x4cf189(0x310))return;await Promise['race']([Promise[_0x4cf189(0x547)](_0x581375)['catch'](()=>{}),new Promise(_0x2a8009=>{const _0x22e775=_0x4cf189,_0x40bf7b=setTimeout(_0x2a8009,_0x46ba5a);if(_0x40bf7b[_0x22e775(0x2a1)])_0x40bf7b[_0x22e775(0x2a1)]();})]);}catch{}}function _0x2b5ad7(_0x3fdff1){const _0x354dd2=_0x454ae4;if(_0x340023)return Promise[_0x354dd2(0x547)]();const _0x2181fa=_0x3fdff1?.['committed'];return _0x2181fa&&typeof _0x2181fa[_0x354dd2(0x550)]===_0x354dd2(0x310)?_0x2181fa:Promise[_0x354dd2(0x547)]();}return okdbWriter[_0x454ae4(0x2ff)]=_0x3ce28d,okdbWriter[_0x454ae4(0x2ff)][_0x454ae4(0x237)]=_0xaa149,okdbWriter[_0x454ae4(0x2ff)]['committed']=_0x2b5ad7,okdbWriter[_0x454ae4(0x2ff)][_0x454ae4(0x2cf)]=_0x340023,okdbWriter['exports'];}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0xe73a6d=_0x1577db;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x4e7d75=require$$0,{SYNC_COMMITS:_0x2d4fc4}=requireOkdbWriter(),_0x1094d8=_0xe73a6d(0x5dd);class _0x2adfab{constructor(_0x41643b,_0x146b65,_0x1f08be){const _0x3c7d65=_0xe73a6d;this[_0x3c7d65(0x1b5)]=_0x41643b,this[_0x3c7d65(0x244)]=_0x146b65,this[_0x3c7d65(0x44d)]=_0x1f08be,this[_0x3c7d65(0x313)]=![],this['_heartbeatTimer']=null,this[_0x3c7d65(0x514)]=null;}['isHeld'](){const _0x28f5fd=_0xe73a6d;if(this[_0x28f5fd(0x313)])return![];try{const _0x500d6a=this[_0x28f5fd(0x1b5)]['_db']()['get'](this[_0x28f5fd(0x244)]);if(!_0x500d6a||_0x500d6a[_0x28f5fd(0x227)]!==this[_0x28f5fd(0x44d)])return![];const _0x221e3c=_0x500d6a[_0x28f5fd(0x1a9)]??_0x500d6a['acquiredAt'];if(_0x221e3c+_0x500d6a[_0x28f5fd(0x561)]<Date['now']())return![];return!![];}catch{return!this[_0x28f5fd(0x313)];}}['holder'](){const _0x19c161=_0xe73a6d;if(this[_0x19c161(0x313)])return null;try{return this['_lock'][_0x19c161(0x47e)]()[_0x19c161(0x2e5)](this[_0x19c161(0x244)])??null;}catch{return null;}}async[_0xe73a6d(0x58a)](_0x338841){const _0x5e1f29=_0xe73a6d;if(this['_released'])return;try{const _0x3ba053=this[_0x5e1f29(0x1b5)][_0x5e1f29(0x47e)]()['get'](this[_0x5e1f29(0x244)]);if(!_0x3ba053||_0x3ba053['acquiredAt']!==this[_0x5e1f29(0x44d)])return;if(_0x2d4fc4)this[_0x5e1f29(0x1b5)][_0x5e1f29(0x47e)]()[_0x5e1f29(0x1f3)](this[_0x5e1f29(0x244)],{..._0x3ba053,'ttlMs':_0x3ba053[_0x5e1f29(0x561)]+_0x338841});else await this['_lock'][_0x5e1f29(0x47e)]()[_0x5e1f29(0x423)](this['_key'],{..._0x3ba053,'ttlMs':_0x3ba053['ttlMs']+_0x338841});}catch{}}async[_0xe73a6d(0x51e)](){const _0x778854=_0xe73a6d;if(this[_0x778854(0x313)])return;if(this[_0x778854(0x514)])try{await this[_0x778854(0x514)];}catch{}clearInterval(this['_heartbeatTimer']),this[_0x778854(0x535)]=null,this[_0x778854(0x313)]=!![];try{const _0x14b624=this[_0x778854(0x1b5)][_0x778854(0x47e)]()[_0x778854(0x2e5)](this[_0x778854(0x244)]);if(_0x14b624&&_0x14b624[_0x778854(0x227)]===this[_0x778854(0x44d)]){if(_0x2d4fc4)this[_0x778854(0x1b5)][_0x778854(0x47e)]()[_0x778854(0x50a)](this[_0x778854(0x244)]);else await this[_0x778854(0x1b5)]['_db']()[_0x778854(0x361)](this[_0x778854(0x244)]);}}catch{}}[_0xe73a6d(0x132)](_0x1598d1,_0x187e8d){const _0x1346eb=_0xe73a6d,_0x33d2cd=_0x187e8d??Math[_0x1346eb(0x1eb)](_0x1598d1/0x3);this['_heartbeatTimer']=setInterval(()=>{const _0x12d113=_0x1346eb;if(this[_0x12d113(0x313)])return;this[_0x12d113(0x514)]=((async()=>{const _0x2aa2f1=_0x12d113;try{const _0x3b8535=this['_lock'][_0x2aa2f1(0x47e)]()[_0x2aa2f1(0x2e5)](this['_key']);if(!_0x3b8535||_0x3b8535[_0x2aa2f1(0x227)]!==this[_0x2aa2f1(0x44d)]){this['_released']=!![],clearInterval(this[_0x2aa2f1(0x535)]),this[_0x2aa2f1(0x535)]=null;return;}if(_0x2d4fc4)this[_0x2aa2f1(0x1b5)][_0x2aa2f1(0x47e)]()[_0x2aa2f1(0x1f3)](this[_0x2aa2f1(0x244)],{..._0x3b8535,'updatedAt':Date[_0x2aa2f1(0x477)]()});else await this[_0x2aa2f1(0x1b5)][_0x2aa2f1(0x47e)]()['put'](this['_key'],{..._0x3b8535,'updatedAt':Date['now']()});}catch{}this[_0x2aa2f1(0x514)]=null;})());},_0x33d2cd);if(this[_0x1346eb(0x535)]['unref'])this[_0x1346eb(0x535)][_0x1346eb(0x2a1)]();}}class _0x3b1a6f{constructor(_0x3b0579,{namespace:_0x57e543,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x10eb7d=_0xe73a6d;this[_0x10eb7d(0x2f5)]=_0x3b0579,this[_0x10eb7d(0x311)]=_0x57e543,this[_0x10eb7d(0x561)]=ttlMs,this[_0x10eb7d(0x54b)]=heartbeatMs,this[_0x10eb7d(0x15a)]=null;}[_0xe73a6d(0x47e)](){const _0xc889cf=_0xe73a6d;return!this['_lockDb']&&(this[_0xc889cf(0x15a)]=this[_0xc889cf(0x2f5)][_0xc889cf(0x1db)](_0x1094d8,{'dupSort':![]})),this['_lockDb'];}[_0xe73a6d(0x12c)](){const _0x3438b4=_0xe73a6d;return!this['_wantDbHandle']&&(this[_0x3438b4(0x568)]=this['_rawDb']['openDB'](_0x1094d8+_0x3438b4(0x37a),{'dupSort':![]})),this[_0x3438b4(0x568)];}['_key'](_0x2f2671){const _0x349429=_0xe73a6d;return this[_0x349429(0x311)]+':'+_0x2f2671;}[_0xe73a6d(0x10f)](_0xdd3583){const _0x25128b=_0xe73a6d;try{_0x2d4fc4?this[_0x25128b(0x12c)]()[_0x25128b(0x1f3)](this[_0x25128b(0x244)](_0xdd3583),Date[_0x25128b(0x477)]()):this[_0x25128b(0x12c)]()['put'](this[_0x25128b(0x244)](_0xdd3583),Date[_0x25128b(0x477)]())?.[_0x25128b(0x29f)]?.(()=>{});}catch{}}[_0xe73a6d(0x19e)](_0x3693b7,_0x510a4d=0x3e8){const _0x12aa47=_0xe73a6d;try{const _0x3c0ae9=this['_wantDb']()[_0x12aa47(0x2e5)](this[_0x12aa47(0x244)](_0x3693b7));return typeof _0x3c0ae9==='number'&&Date['now']()-_0x3c0ae9<_0x510a4d;}catch{return![];}}[_0xe73a6d(0x562)](_0x179499){const _0x1eddaa=_0xe73a6d,_0x9084d2=_0x179499[_0x1eddaa(0x1a9)]??_0x179499[_0x1eddaa(0x227)];return _0x9084d2+_0x179499[_0x1eddaa(0x561)]<Date['now']();}static[_0xe73a6d(0x2ad)](_0x326cdf){const _0x5f2afe=_0xe73a6d,_0x2dacbb=_0x326cdf?.[_0x5f2afe(0x232)];if(!_0x2dacbb||typeof _0x2dacbb[_0x5f2afe(0x18a)]!==_0x5f2afe(0x3a9))return![];if(_0x2dacbb[_0x5f2afe(0x122)]!==_0x4e7d75[_0x5f2afe(0x122)]())return![];if(_0x2dacbb[_0x5f2afe(0x18a)]===process['pid'])return![];try{return process[_0x5f2afe(0x5b2)](_0x2dacbb[_0x5f2afe(0x18a)],0x0),![];}catch(_0x7dff54){return _0x7dff54[_0x5f2afe(0x460)]===_0x5f2afe(0x5d0);}}async[_0xe73a6d(0x5be)](_0x21bec8,_0x2ad75d={},_0xfcc4ba={}){const _0x14012a=_0xe73a6d,_0x551afd=this[_0x14012a(0x244)](_0x21bec8),_0x204d4f=_0xfcc4ba['ttlMs']??this[_0x14012a(0x561)],_0x36c819=Date[_0x14012a(0x477)](),_0x5406fc={'holder':{'pid':process['pid'],'hostname':_0x4e7d75['hostname'](),..._0x2ad75d},'acquiredAt':_0x36c819,'updatedAt':_0x36c819,'ttlMs':_0x204d4f};let _0x45b04b=![],_0x5c3def=null;try{const _0x33e85e=()=>{const _0x42172b=_0x14012a,_0xd91f28=this[_0x42172b(0x47e)]()[_0x42172b(0x2e5)](_0x551afd);if(_0xd91f28&&!this['_isStale'](_0xd91f28)&&!_0x3b1a6f['_holderDead'](_0xd91f28)){const _0x1fefcb=_0x2ad75d[_0x42172b(0x279)]!=null&&_0xd91f28[_0x42172b(0x232)][_0x42172b(0x18a)]===process[_0x42172b(0x18a)]&&_0xd91f28[_0x42172b(0x232)]['processorId']===_0x2ad75d['processorId'];if(!_0x1fefcb){_0x45b04b=![],_0x5c3def=_0xd91f28;return;}_0x5406fc[_0x42172b(0x227)]<=_0xd91f28[_0x42172b(0x227)]&&(_0x5406fc[_0x42172b(0x227)]=_0xd91f28[_0x42172b(0x227)]+0x1,_0x5406fc['updatedAt']=_0x5406fc[_0x42172b(0x227)]);}this[_0x42172b(0x47e)]()['put'](_0x551afd,_0x5406fc),_0x45b04b=!![],_0x5c3def=_0x5406fc;};if(_0x2d4fc4)this[_0x14012a(0x47e)]()['transactionSync'](_0x33e85e);else await this[_0x14012a(0x47e)]()[_0x14012a(0x427)](_0x33e85e);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x45b04b)return{'acquired':![],'handle':null,'current':_0x5c3def};const _0x48d0cd=new _0x2adfab(this,_0x551afd,_0x5406fc[_0x14012a(0x227)]);return _0x48d0cd['_startHeartbeat'](_0x204d4f,this[_0x14012a(0x54b)]),{'acquired':!![],'handle':_0x48d0cd,'current':_0x5c3def};}[_0xe73a6d(0x111)](_0x11c77a){const _0x2b5236=_0xe73a6d;try{return this['_db']()['get'](this[_0x2b5236(0x244)](_0x11c77a))??null;}catch{return null;}}[_0xe73a6d(0x566)](){const _0x55e042=_0xe73a6d,_0x58dce5=this[_0x55e042(0x311)]+':',_0x3c72f6=[];try{for(const {key:_0xdab473,value:_0x2a934d}of this[_0x55e042(0x47e)]()['getRange']({'start':_0x58dce5,'end':_0x58dce5+'\xff'})){typeof _0xdab473==='string'&&_0xdab473[_0x55e042(0x5b6)](_0x58dce5)&&_0x3c72f6[_0x55e042(0x38d)]({'id':_0xdab473[_0x55e042(0x19f)](_0x58dce5[_0x55e042(0x1f7)]),'entry':_0x2a934d});}}catch{}return _0x3c72f6;}static[_0xe73a6d(0x44e)](_0x24284d){const _0x591cc7=_0xe73a6d,_0x576659=[];try{const _0x44ebad=_0x24284d['openDB'](_0x1094d8,{'dupSort':![]});for(const {key:_0xa632df,value:_0x19d402}of _0x44ebad[_0x591cc7(0x5f9)]({})){if(typeof _0xa632df!==_0x591cc7(0x5c8))continue;const _0x142f4f=_0xa632df[_0x591cc7(0x5c4)](':');if(_0x142f4f<0x1)continue;_0x576659[_0x591cc7(0x38d)]({'namespace':_0xa632df[_0x591cc7(0x19f)](0x0,_0x142f4f),'id':_0xa632df[_0x591cc7(0x19f)](_0x142f4f+0x1),'entry':_0x19d402});}}catch{}return _0x576659;}}return okdbLock={'OKDBLock':_0x3b1a6f},okdbLock;}var okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x1320a1=_0x1577db;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x3718c1=require$$0,_0x9705a5=require$$1$2,_0x37b2c0=require$$0$1,{LOOP:_0x586b2a}=requireOkdbLoopMonitor(),{OKDBLock:_0x4babe9}=requireOkdbLock(),{SYNC_COMMITS:_0x501df9}=requireOkdbWriter(),_0x6a0b75=_0x1320a1(0x3f0),_0x508ff2=_0x1320a1(0x3dc),_0x4a7dc5='~processes:desired',_0x47938c=_0x1320a1(0x59c),_0x3d5f0a=(_0x32f28b,_0x3d714c)=>_0x32f28b+':'+_0x3d714c,_0x198f7d=(_0x3423a8,_0x2f7e10)=>_0x3423a8+'::'+_0x2f7e10,_0x3682bc=(_0x56f2af,_0x5ae5f4)=>_0x56f2af+'/'+_0x5ae5f4,_0x48b66b=(_0x5978fe,_0x15d518)=>_0x5978fe+'#'+_0x15d518,_0x17e40a=_0x1f9f93=>{const _0x5744f5=_0x1320a1;if(_0x1f9f93?.['processKey'])return _0x1f9f93[_0x5744f5(0x3e6)];const _0x1b6630=_0x1f9f93?.['nodeKey'];return typeof _0x1b6630===_0x5744f5(0x5c8)&&_0x1b6630[_0x5744f5(0x184)]('#')?_0x1b6630[_0x5744f5(0x19f)](0x0,_0x1b6630[_0x5744f5(0x5c4)]('#')):_0x1b6630;},_0x2b33a7=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x388aee=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x1605bd=_0x2b33a7*0x3,_0x1d68e6=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math['max'](0x927c0,_0x1605bd*0x14),_0x44c837=[_0x1320a1(0x382),'processor:ready',_0x1320a1(0x5b8),_0x1320a1(0x5e3),_0x1320a1(0x48c),_0x1320a1(0x54a)];let _0xffc966=null;function _0x41a7e3(){const _0x271f80=_0x1320a1;if(_0xffc966==null)_0xffc966=Math[_0x271f80(0x2b6)]((Date[_0x271f80(0x477)]()-process[_0x271f80(0x5a7)]()*0x3e8)/0x3e8)*0x3e8;return _0xffc966;}function _0x24ba08(_0xfa8d6a){const _0x481fe1=_0x1320a1;if(process.env.OKDB_PROCESS_KILL===_0x481fe1(0x31a))return![];if(_0xfa8d6a?.[_0x481fe1(0x266)]?.[_0x481fe1(0x12f)]&&typeof _0xfa8d6a[_0x481fe1(0x266)][_0x481fe1(0x12f)]===_0x481fe1(0x215)&&_0xfa8d6a['options']['processes'][_0x481fe1(0x5b2)]===![])return![];return!![];}function _0x32b15f(_0x398b2a,_0x12ab05){const _0x2d004b=_0x1320a1,_0x2d005f=!!_0x12ab05?.[_0x2d004b(0x262)];switch(_0x398b2a){case'primary':return{'controllable':_0x2d005f,'decommissionable':![],'killable':!![],'killConfirm':'cluster-wide'};case _0x2d004b(0x1f6):case'standalone':return{'controllable':_0x2d005f,'decommissionable':![],'killable':!![],'killConfirm':'confirm'};case _0x2d004b(0x4fe):return{'controllable':![],'decommissionable':![],'killable':![]};case _0x2d004b(0x4ca):case _0x2d004b(0x459):case _0x2d004b(0x2d3):case _0x2d004b(0x42e):return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':'force'};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x32daf4{constructor(_0x3b4ffb){const _0x137e7c=_0x1320a1;this['okdb']=_0x3b4ffb,this['_statusEnv']=null,this[_0x137e7c(0x20d)]=null,this[_0x137e7c(0x359)]=new Map(),this[_0x137e7c(0x354)]=null,this['_isWriter']=![],this['_isReader']=![],this[_0x137e7c(0x319)]=_0x41a7e3(),this[_0x137e7c(0x480)]=_0x3d5f0a(process['pid'],this['_processStartedAt']),this[_0x137e7c(0x584)]=_0x37b2c0[_0x137e7c(0x226)]()[_0x137e7c(0x19f)](0x0,0x8),this[_0x137e7c(0x3ab)]=_0x48b66b(this[_0x137e7c(0x480)],this[_0x137e7c(0x584)]),this[_0x137e7c(0x2cb)]=Date[_0x137e7c(0x477)](),this['_kind']=null,this['_supervisorKey']=null,this['_listenAddr']=null,this[_0x137e7c(0x259)]=null,this[_0x137e7c(0x1cb)]=null,this[_0x137e7c(0x212)]=null,this['_lastPublishAt']=0x0,this[_0x137e7c(0x33e)]={},this[_0x137e7c(0x4fa)]=new Map(),this[_0x137e7c(0x2e9)]=process['cpuUsage'](),this[_0x137e7c(0x108)]=Date[_0x137e7c(0x477)](),this['_lastCpuPct']=0x0,this[_0x137e7c(0x365)]=new Map();}get[_0x1320a1(0x3d6)](){const _0x160f75=_0x1320a1;return this[_0x160f75(0x480)];}get[_0x1320a1(0x55c)](){return this['_rowKey'];}['_caps'](_0x43093a,_0x2fd5e8){const _0xd32557=_0x1320a1,_0x44cdd3=_0x32b15f(_0x43093a,_0x2fd5e8);if(_0x44cdd3['killable']&&!_0x24ba08(this[_0xd32557(0x270)]))return{..._0x44cdd3,'killable':![],'killConfirm':undefined};return _0x44cdd3;}[_0x1320a1(0x17e)](){return!!this['_statusEnv'];}[_0x1320a1(0x144)](_0x576fa7){const _0xdf04de=_0x1320a1;Object[_0xdf04de(0x1de)](this[_0xdf04de(0x33e)],_0x576fa7||{});}[_0x1320a1(0x546)](_0x560527){if(_0x560527)this['_listenAddr']=_0x560527;}['register'](_0x4929da={}){const _0x580c74=_0x1320a1;return this[_0x580c74(0x270)]['_activateProcesses'](_0x4929da);}[_0x1320a1(0x202)](){const _0x2a29ce=_0x1320a1,_0x38534c={};let _0x21ff0b=0x0,_0x35e923=0x0;const _0x223ae0=new Set();for(const _0x19ee6d of this['listNodes']()){_0x35e923++;const _0x46b089=_0x19ee6d['processing'];if(!_0x46b089)continue;if(_0x46b089[_0x2a29ce(0x306)])_0x21ff0b++;for(const _0xad96e1 of _0x46b089['processors']||[]){if(![_0x2a29ce(0x50d),_0x2a29ce(0x356)][_0x2a29ce(0x184)](_0xad96e1['mode']))continue;(_0xad96e1[_0x2a29ce(0x2af)]===_0x2a29ce(0x581)||_0xad96e1[_0x2a29ce(0x2af)]===_0x2a29ce(0x214))&&_0xad96e1[_0x2a29ce(0x345)]&&_0x223ae0[_0x2a29ce(0x1a0)]((_0xad96e1['env']||_0x2a29ce(0x453))+':'+_0xad96e1['cursorKey']);const _0x4635d7=_0xad96e1[_0x2a29ce(0x2c2)]||_0x2a29ce(0x453);(_0x38534c[_0x4635d7]||=[])[_0x2a29ce(0x38d)]({..._0xad96e1,'env':_0x4635d7,'owner':{'pid':_0x19ee6d[_0x2a29ce(0x18a)]??null,'kind':_0x19ee6d[_0x2a29ce(0x3d2)]??null}});}}for(const [_0x17326f,_0x30c51a]of Object[_0x2a29ce(0x2fb)](_0x38534c)){for(const _0x17837a of _0x30c51a){if(_0x17837a[_0x2a29ce(0x471)]==='single'&&!_0x17837a['claimGated']){const _0x18e4d9=_0x17326f+':'+(_0x17837a[_0x2a29ce(0x345)]??'');if(!_0x223ae0[_0x2a29ce(0x399)](_0x18e4d9))_0x17837a[_0x2a29ce(0x177)]=!![];}}}return{'envs':_0x38534c,'policy':null,'participation':{'participating':_0x21ff0b,'total':_0x35e923},'source':_0x2a29ce(0x540)};}[_0x1320a1(0x369)](){const _0x1a60c5=_0x1320a1,_0x4baac8=_0x267790=>{const _0x496292=_0x38fc;if(_0x267790[_0x496292(0x2af)]===_0x496292(0x581)||_0x267790[_0x496292(0x2af)]===_0x496292(0x214)||_0x267790[_0x496292(0x2af)]===_0x496292(0x54f))return 0x3;if(_0x267790[_0x496292(0x16a)])return 0x1;return 0x2;},_0x3e3344=new Map();for(const _0x132d35 of this[_0x1a60c5(0x39f)]()){for(const _0x3c06cd of _0x132d35[_0x1a60c5(0x3a1)]?.[_0x1a60c5(0x262)]||[]){const _0x301035={..._0x3c06cd,'owner':{'pid':_0x132d35[_0x1a60c5(0x18a)]??null,'kind':_0x132d35['kind']??null,'host':_0x132d35['host']??null}},_0x1121a4=_0x3c06cd[_0x1a60c5(0x471)]===_0x1a60c5(0x50d)?_0x1a60c5(0x247)+(_0x3c06cd['env']??'')+'::'+(_0x3c06cd[_0x1a60c5(0x345)]??_0x3c06cd[_0x1a60c5(0x153)]??_0x3c06cd['id']):'inst:'+(_0x132d35['nodeKey']??_0x132d35[_0x1a60c5(0x3e6)]??'')+'::'+(_0x3c06cd['env']??'')+'::'+_0x3c06cd['id'],_0x5e4637=_0x3e3344['get'](_0x1121a4);if(!_0x5e4637||_0x4baac8(_0x301035)>_0x4baac8(_0x5e4637))_0x3e3344[_0x1a60c5(0x339)](_0x1121a4,_0x301035);}}return[..._0x3e3344[_0x1a60c5(0x564)]()];}[_0x1320a1(0x2ce)](){const _0x49680d=_0x1320a1,_0x33abee=Date[_0x49680d(0x477)](),_0x5b82b7=this['listNodes'](),_0x484e20=_0xf6f873=>Math[_0x49680d(0x5bc)](0x0,Math['round']((_0x33abee-(_0xf6f873[_0x49680d(0x40e)]||_0x33abee))/0x3e8)),_0x46f1ff=_0x5b82b7[_0x49680d(0x461)](_0x3573d7=>_0x3573d7[_0x49680d(0x3d2)]===_0x49680d(0x1c6)),_0x4e903d=_0x5b82b7[_0x49680d(0x43d)](_0x6461b0=>_0x6461b0[_0x49680d(0x3d2)]===_0x49680d(0x4ca));if(_0x46f1ff||_0x4e903d[_0x49680d(0x1f7)])return{'primary':_0x46f1ff?{'pid':_0x46f1ff[_0x49680d(0x18a)],'uptime':_0x484e20(_0x46f1ff)}:null,'workers':_0x4e903d['map'](_0x41d24e=>({'pid':_0x41d24e[_0x49680d(0x18a)],'uptime':_0x484e20(_0x41d24e)})),'workersConfigured':_0x46f1ff?.['meta']?.['workersConfigured']??_0x4e903d[_0x49680d(0x1f7)],'mode':_0x49680d(0x4c9)};const _0x249b73=_0x5b82b7[_0x49680d(0x461)](_0x29effd=>_0x29effd[_0x49680d(0x3d2)]===_0x49680d(0x1f6)||_0x29effd[_0x49680d(0x3d2)]===_0x49680d(0x42d)||_0x29effd[_0x49680d(0x3d2)]==='embedded'),_0x3b1908=_0x249b73?{'pid':_0x249b73[_0x49680d(0x18a)],'uptime':_0x484e20(_0x249b73)}:{'pid':process[_0x49680d(0x18a)],'uptime':Math['max'](0x0,Math[_0x49680d(0x2b6)](process[_0x49680d(0x5a7)]()))};return{'primary':_0x3b1908,'workers':[_0x3b1908],'workersConfigured':0x1,'mode':'single'};}[_0x1320a1(0x2a4)](){const _0x13de43=_0x1320a1;return this[_0x13de43(0x264)]();}[_0x1320a1(0x3f9)](){const _0x40701b=_0x1320a1,_0x3c7745=new Map();for(const _0x117040 of this[_0x40701b(0x264)]())_0x3c7745[_0x40701b(0x339)](_0x117040['processKey'],{..._0x117040,'children':[]});const _0x28e189=[];for(const _0x4d08b6 of _0x3c7745[_0x40701b(0x564)]()){const _0x3d59f2=_0x4d08b6[_0x40701b(0x189)]?_0x3c7745[_0x40701b(0x2e5)](_0x4d08b6[_0x40701b(0x189)]):null;if(_0x3d59f2&&_0x3d59f2!==_0x4d08b6)_0x3d59f2['children'][_0x40701b(0x38d)](_0x4d08b6);else _0x28e189[_0x40701b(0x38d)](_0x4d08b6);}const _0x35b1f4=(_0x2ccc8a,_0x479067)=>_0x2ccc8a[_0x40701b(0x3d2)]===_0x479067[_0x40701b(0x3d2)]?(_0x2ccc8a[_0x40701b(0x18a)]||0x0)-(_0x479067['pid']||0x0):(_0x2ccc8a[_0x40701b(0x3d2)]??'')<(_0x479067[_0x40701b(0x3d2)]??'')?-0x1:0x1,_0x9e1dbb=_0x172d73=>{const _0x12f51e=_0x40701b;_0x172d73[_0x12f51e(0x434)](_0x35b1f4);for(const _0x21b464 of _0x172d73)if(_0x21b464[_0x12f51e(0x277)]['length'])_0x9e1dbb(_0x21b464['children']);};return _0x9e1dbb(_0x28e189),_0x28e189;}[_0x1320a1(0x2be)](_0x1a4827){const _0x561a07=_0x1320a1;return this[_0x561a07(0x264)]()['find'](_0x37e001=>_0x37e001[_0x561a07(0x3e6)]===_0x1a4827)??null;}[_0x1320a1(0x264)](_0x56cc8a=Date[_0x1320a1(0x477)]()){const _0x184282=_0x1320a1,_0x27b97c=new Map();for(const _0x1fbfea of this[_0x184282(0x39f)]()){const _0x1ef5ef=_0x17e40a(_0x1fbfea);let _0x21846e=_0x27b97c[_0x184282(0x2e5)](_0x1ef5ef);!_0x21846e&&(_0x21846e={'processKey':_0x1ef5ef,'nodeKey':_0x1ef5ef,'pid':_0x1fbfea['pid'],'ppid':_0x1fbfea['ppid']??null,'host':_0x1fbfea[_0x184282(0x150)]??null,'kind':_0x1fbfea[_0x184282(0x3d2)],'role':null,'supervisorKey':_0x1fbfea[_0x184282(0x189)]??null,'slot':_0x1fbfea[_0x184282(0x383)]??null,'slotKey':_0x1fbfea[_0x184282(0x154)]??null,'caps':_0x1fbfea[_0x184282(0x29e)]??null,'lifecycle':_0x1fbfea[_0x184282(0x185)]??null,'uptime':Math[_0x184282(0x5bc)](0x0,Math['round']((_0x56cc8a-(_0x1fbfea[_0x184282(0x40e)]||_0x56cc8a))/0x3e8)),'startedAt':_0x1fbfea[_0x184282(0x40e)]??null,'meta':_0x1fbfea['meta']??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x27b97c[_0x184282(0x339)](_0x1ef5ef,_0x21846e));_0x21846e['instances']['push']({'instanceId':_0x1fbfea[_0x184282(0x53d)]??null,'role':_0x1fbfea['role']??null,'listenAddr':_0x1fbfea[_0x184282(0x1a4)]??null,'lifecycle':_0x1fbfea[_0x184282(0x185)]??null,'processing':_0x1fbfea['processing']??null});if(!_0x21846e[_0x184282(0x30d)]&&_0x1fbfea[_0x184282(0x30d)])_0x21846e[_0x184282(0x30d)]=_0x1fbfea[_0x184282(0x30d)];if(!_0x21846e['listenAddr']&&_0x1fbfea[_0x184282(0x1a4)])_0x21846e[_0x184282(0x1a4)]=_0x1fbfea[_0x184282(0x1a4)];if(!_0x21846e[_0x184282(0x3a1)]&&_0x1fbfea[_0x184282(0x3a1)])_0x21846e[_0x184282(0x3a1)]=_0x1fbfea[_0x184282(0x3a1)];if(!_0x21846e[_0x184282(0x505)]&&_0x1fbfea['engines'])_0x21846e[_0x184282(0x505)]=_0x1fbfea['engines'];if(!_0x21846e[_0x184282(0x123)]&&_0x1fbfea[_0x184282(0x123)])_0x21846e[_0x184282(0x123)]=_0x1fbfea[_0x184282(0x123)];if(_0x21846e[_0x184282(0x29e)]==null&&_0x1fbfea[_0x184282(0x29e)])_0x21846e[_0x184282(0x29e)]=_0x1fbfea[_0x184282(0x29e)];if(_0x1fbfea['stats']&&(!_0x21846e[_0x184282(0x3ca)]||(_0x1fbfea[_0x184282(0x3ca)]['at']??0x0)>(_0x21846e[_0x184282(0x3ca)]['at']??0x0)))_0x21846e[_0x184282(0x3ca)]=_0x1fbfea['stats'];}return[..._0x27b97c[_0x184282(0x564)]()];}[_0x1320a1(0x4f8)](){const _0x508a5a=_0x1320a1,_0x186e7b=[],_0x135202={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x1c8449 of this[_0x508a5a(0x264)]()){_0x186e7b[_0x508a5a(0x38d)]({'processKey':_0x1c8449[_0x508a5a(0x3e6)],'kind':_0x1c8449[_0x508a5a(0x3d2)],'pid':_0x1c8449[_0x508a5a(0x18a)],'supervisorKey':_0x1c8449[_0x508a5a(0x189)],'meta':_0x1c8449[_0x508a5a(0x1bc)]??null,'uptime':_0x1c8449[_0x508a5a(0x5a7)],'stats':_0x1c8449[_0x508a5a(0x3ca)]??null}),_0x135202[_0x508a5a(0x12f)]++;if(_0x1c8449['stats']){_0x135202[_0x508a5a(0x4e9)]+=_0x1c8449[_0x508a5a(0x3ca)][_0x508a5a(0x4e9)]||0x0,_0x135202['heapUsed']+=(_0x1c8449[_0x508a5a(0x3ca)][_0x508a5a(0x210)]||0x0)+(_0x1c8449['stats'][_0x508a5a(0x492)]?.[_0x508a5a(0x210)]||0x0);const _0xdcd420=_0x1c8449[_0x508a5a(0x3ca)][_0x508a5a(0x492)];_0xdcd420&&(_0x135202['threads']['count']+=_0xdcd420['count']||0x0,_0x135202[_0x508a5a(0x492)][_0x508a5a(0x57f)]+=_0xdcd420['sandbox']||0x0,_0x135202[_0x508a5a(0x492)][_0x508a5a(0x149)]+=_0xdcd420['busy']||0x0);}}return{'totals':_0x135202,'nodes':_0x186e7b};}async[_0x1320a1(0x1b3)]({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x1d0590=_0x1320a1;this['_isWriter']=this[_0x1d0590(0x2d2)]||!!writer,this[_0x1d0590(0x5bb)]=this[_0x1d0590(0x5bb)]||!!reader,this[_0x1d0590(0x4b7)]=kind||this[_0x1d0590(0x4b7)]||(_0x9705a5[_0x1d0590(0x1fa)]?_0x1d0590(0x4ca):_0x1d0590(0x1f6)),this[_0x1d0590(0x1ee)]=supervisorKey??this[_0x1d0590(0x1ee)],this[_0x1d0590(0x17d)]=listenAddr??this['_listenAddr'],this[_0x1d0590(0x5cd)](),await this[_0x1d0590(0x49d)]();if(!writer&&!reader)return null;if(!this[_0x1d0590(0x539)]){const _0x2be655=await this[_0x1d0590(0x270)][_0x1d0590(0x42f)](_0x6a0b75,{'sync':![],'durability':_0x1d0590(0x2c7)});await _0x2be655[_0x1d0590(0x48a)](_0x508ff2),this['_statusEnv']=_0x2be655;}return this[_0x1d0590(0x539)];}[_0x1320a1(0x322)](){const _0x367ca2=_0x1320a1;return this[_0x367ca2(0x3b3)]!==this['_statusEnv']&&(this['_nodeDbFor']=this['_statusEnv'],this[_0x367ca2(0x115)]=this[_0x367ca2(0x539)][_0x367ca2(0x47c)](_0x508ff2)['data']),this[_0x367ca2(0x115)];}['_putRowAsync'](_0x33cdc3){const _0xaaf656=_0x1320a1;if(_0x501df9)return this[_0xaaf656(0x322)]()[_0xaaf656(0x1f3)](_0x33cdc3['nodeKey'],_0x33cdc3,0x1);const _0x201bd5=this['_nodeDb']()['put'](_0x33cdc3[_0xaaf656(0x305)],_0x33cdc3,0x1);if(_0x201bd5&&typeof _0x201bd5[_0xaaf656(0x550)]===_0xaaf656(0x310))_0x201bd5[_0xaaf656(0x550)](undefined,()=>{});return _0x201bd5;}[_0x1320a1(0x3ce)](_0x561547){const _0x2c041c=_0x1320a1;return this[_0x2c041c(0x322)]()[_0x2c041c(0x1f3)](_0x561547[_0x2c041c(0x305)],_0x561547,0x1);}['_removeRowAsync'](_0x245625){const _0x1dca77=_0x1320a1;if(_0x501df9)try{return this['_nodeDb']()[_0x1dca77(0x50a)](_0x245625);}catch{return![];}const _0x2b1795=this[_0x1dca77(0x322)]()[_0x1dca77(0x361)](_0x245625);if(_0x2b1795&&typeof _0x2b1795[_0x1dca77(0x550)]==='function')_0x2b1795['then'](undefined,()=>{});return _0x2b1795;}async['putNode'](_0x4b6861){const _0x3da52b=_0x1320a1;if(!this['_statusEnv']||!this['_isWriter']||!_0x4b6861?.[_0x3da52b(0x305)])return;return this[_0x3da52b(0x4f5)](_0x4b6861);}async['removeNode'](_0x571028){const _0x476170=_0x1320a1;if(!this[_0x476170(0x539)]||!this[_0x476170(0x2d2)]||!_0x571028)return;const _0x11568d=_0x571028[_0x476170(0x184)]('#'),_0x10b714=[];for(const {key:_0x2966c9}of this[_0x476170(0x539)]['getRange'](_0x508ff2)){if(_0x2966c9===_0x571028||!_0x11568d&&typeof _0x2966c9===_0x476170(0x5c8)&&_0x2966c9[_0x476170(0x5b6)](_0x571028+'#'))_0x10b714[_0x476170(0x38d)](_0x2966c9);}for(const _0x2c6b52 of _0x10b714){try{this[_0x476170(0x322)]()[_0x476170(0x50a)](_0x2c6b52);}catch{}}}['_nodeDead'](_0x5b9ba5){const _0xa5010b=_0x1320a1;if(typeof _0x5b9ba5?.[_0xa5010b(0x18a)]!==_0xa5010b(0x3a9))return![];if(_0x5b9ba5[_0xa5010b(0x150)]!==_0x3718c1[_0xa5010b(0x122)]())return![];if(_0x5b9ba5['pid']===process[_0xa5010b(0x18a)])return![];if(_0x5b9ba5[_0xa5010b(0x5a2)]!=null&&_0x5b9ba5[_0xa5010b(0x5a2)]<Date['now']()-_0x1d68e6)return!![];try{return process[_0xa5010b(0x5b2)](_0x5b9ba5[_0xa5010b(0x18a)],0x0),![];}catch(_0x2cc8bd){return _0x2cc8bd['code']===_0xa5010b(0x5d0);}}[_0x1320a1(0x39f)](){const _0xe03b44=_0x1320a1;if(!this[_0xe03b44(0x539)])return[];try{this[_0xe03b44(0x539)]['db']?.[_0xe03b44(0x4f9)]?.();}catch{}const _0x11d6f2=Date['now'](),_0x50c20f=_0x3718c1['hostname'](),_0x3158fe=[];for(const {value:_0xfbb3fb}of this['_statusEnv']['getRange'](_0x508ff2)){if(!_0xfbb3fb)continue;let _0x119d8b=null;_0xfbb3fb[_0xe03b44(0x150)]===_0x50c20f&&typeof _0xfbb3fb[_0xe03b44(0x18a)]===_0xe03b44(0x3a9)&&(_0x119d8b=!this[_0xe03b44(0x598)](_0xfbb3fb));if(_0x119d8b===![])continue;const _0x55ffbf=_0xfbb3fb[_0xe03b44(0x5a2)]==null||_0xfbb3fb[_0xe03b44(0x5a2)]>=_0x11d6f2;if(_0x119d8b===!![]||_0x55ffbf)_0x3158fe['push'](_0xfbb3fb);}return _0x3158fe;}async[_0x1320a1(0x337)](_0x367a8d=0x0){const _0x115636=_0x1320a1;if(!this[_0x115636(0x539)]||!this[_0x115636(0x2d2)])return;const _0x2e3eaf=Date[_0x115636(0x477)]()-_0x367a8d,_0x43befb=new Set(),_0x28e3fd=[],_0x5f0ee8=_0x3718c1['hostname'](),_0x3ce42d=require$$3[_0x115636(0x13f)];for(const {key:_0x240822,value:_0x4272e0}of this[_0x115636(0x539)]['getRange'](_0x508ff2)){if(!_0x4272e0)continue;const _0x136827=_0x4272e0[_0x115636(0x150)]===_0x5f0ee8&&typeof _0x4272e0[_0x115636(0x18a)]===_0x115636(0x3a9),_0x526185=_0x136827?this[_0x115636(0x598)](_0x4272e0):_0x4272e0[_0x115636(0x5a2)]!=null&&_0x4272e0['expiresAt']<_0x2e3eaf;if(_0x526185)_0x28e3fd['push'](_0x240822);else{_0x43befb['add'](_0x17e40a(_0x4272e0)??_0x240822);if(_0x4272e0[_0x115636(0x13f)]&&_0x4272e0[_0x115636(0x13f)]!==_0x3ce42d){if(!this['_versionSkewWarned'])this[_0x115636(0x172)]=new Set();!this[_0x115636(0x172)][_0x115636(0x399)](_0x4272e0[_0x115636(0x13f)])&&(this[_0x115636(0x172)]['add'](_0x4272e0[_0x115636(0x13f)]),this['okdb'][_0x115636(0x18c)]?.['warn']?.(_0x115636(0x256)+(_0x4272e0[_0x115636(0x18a)]??'?')+'\x20on\x20this\x20data\x20path\x20runs\x20okdb\x20'+_0x4272e0[_0x115636(0x13f)]+_0x115636(0x25c)+_0x3ce42d+_0x115636(0x1fd)+_0x115636(0x447),{'feature':_0x115636(0x39e)}));}}}for(const _0x2d3da7 of _0x28e3fd)this[_0x115636(0x293)](_0x2d3da7);if(this[_0x115636(0x5cd)]()){const _0x329b53=[];for(const {key:_0x281d87}of this['listDesired']('node')){if(!_0x43befb[_0x115636(0x399)](_0x281d87)){if(_0x501df9)try{this[_0x115636(0x20d)]['removeSync'](_0x115636(0x4bc)+_0x281d87);}catch{}else _0x329b53[_0x115636(0x38d)](this['_desired'][_0x115636(0x361)]('node/'+_0x281d87));}}if(_0x329b53[_0x115636(0x1f7)])await Promise[_0x115636(0x55e)](_0x329b53);}}[_0x1320a1(0x26d)](_0x58c19b=null){const _0x1a1848=_0x1320a1;if(this[_0x1a1848(0x259)])return;if(!this[_0x1a1848(0x2d2)]||!this['_statusEnv']){this['okdb']?.[_0x1a1848(0x18c)]?.[_0x1a1848(0x33b)]?.(_0x1a1848(0x35a)+this['_isWriter']+_0x1a1848(0x308)+!!this[_0x1a1848(0x539)]+_0x1a1848(0x309),{'feature':_0x1a1848(0x12f)});return;}this[_0x1a1848(0x212)]=_0x58c19b,this[_0x1a1848(0x1cb)]=()=>this[_0x1a1848(0x303)]();for(const _0x17eee2 of _0x44c837)this['okdb']['events']['on'](_0x17eee2,this[_0x1a1848(0x1cb)]);this['_publishNow']();const _0x33ae08=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x2b33a7;this[_0x1a1848(0x259)]=setInterval(()=>{const _0x544b95=_0x1a1848;if(this[_0x544b95(0x212)])try{this[_0x544b95(0x212)]();}catch{}this[_0x544b95(0x5ba)](),this[_0x544b95(0x337)]()[_0x544b95(0x29f)](()=>{});},_0x33ae08);if(this[_0x1a1848(0x259)]['unref'])this[_0x1a1848(0x259)][_0x1a1848(0x2a1)]();}[_0x1320a1(0x303)](){const _0x3c5fce=_0x1320a1;if(!this[_0x3c5fce(0x2d2)]||!this['_statusEnv'])return;if(Date[_0x3c5fce(0x477)]()-this[_0x3c5fce(0x178)]<_0x388aee)return;this[_0x3c5fce(0x5ba)]();}['_publishNow'](){const _0x1d01ca=_0x1320a1;if(!this[_0x1d01ca(0x2d2)]||!this[_0x1d01ca(0x539)])return;this[_0x1d01ca(0x178)]=Date[_0x1d01ca(0x477)]();try{const _0x16432f=[this['_buildOwnRow']()];for(const _0xd50ecf of this[_0x1d01ca(0x4fa)]['values']())_0x16432f['push'](this[_0x1d01ca(0x58c)](_0xd50ecf));const _0x16dbc0=_0x586b2a[_0x1d01ca(0x494)]?_0x586b2a['now']():0x0;for(const _0xc6e00 of _0x16432f){try{this[_0x1d01ca(0x3ce)](_0xc6e00),this['_publishFailWarned']=![];}catch(_0xf11fe3){!this[_0x1d01ca(0x555)]&&(this[_0x1d01ca(0x555)]=!![],this[_0x1d01ca(0x270)]?.['log']?.[_0x1d01ca(0x33b)]?.('registry\x20publish\x20failing:\x20'+_0xf11fe3[_0x1d01ca(0x141)],{'feature':_0x1d01ca(0x12f)}));}}if(_0x586b2a[_0x1d01ca(0x494)])_0x586b2a['note']('registry-publish',_0x586b2a['now']()-_0x16dbc0,_0x1d01ca(0x554)+_0x16432f[_0x1d01ca(0x1f7)]+_0x1d01ca(0x43f));}catch(_0x514c64){!this[_0x1d01ca(0x555)]&&(this[_0x1d01ca(0x555)]=!![],this[_0x1d01ca(0x270)]?.[_0x1d01ca(0x18c)]?.[_0x1d01ca(0x33b)]?.(_0x1d01ca(0x375)+_0x514c64[_0x1d01ca(0x141)],{'feature':_0x1d01ca(0x12f)}));}}async[_0x1320a1(0x355)](){const _0xb031f6=_0x1320a1;if(this[_0xb031f6(0x1cb)]){for(const _0x4788ce of _0x44c837){try{this['okdb'][_0xb031f6(0x521)]['off'](_0x4788ce,this['_onProcEvent']);}catch{}}this['_onProcEvent']=null;}this[_0xb031f6(0x259)]&&(clearInterval(this['_hbTimer']),this[_0xb031f6(0x259)]=null);try{if(this['_statusEnv']&&this['_isWriter'])await this[_0xb031f6(0x593)](this[_0xb031f6(0x3ab)]);}catch{}}async[_0x1320a1(0x2ec)](){const _0x184d5c=_0x1320a1;if(!this['_statusEnv']||!this[_0x184d5c(0x2d2)])return;try{await this[_0x184d5c(0x593)](this[_0x184d5c(0x3ab)]);}catch{}try{const _0x4194d8=[];for(const {value:_0x239e99}of this[_0x184d5c(0x539)][_0x184d5c(0x5f9)](_0x508ff2)){if(_0x239e99?.['ppid']===process[_0x184d5c(0x18a)]&&_0x239e99['nodeKey'])_0x4194d8[_0x184d5c(0x38d)](_0x239e99[_0x184d5c(0x305)]);}for(const _0x4c0001 of _0x4194d8){try{await this['removeNode'](_0x4c0001);}catch{}}}catch{}}async[_0x1320a1(0x408)](){const _0x3e15e8=_0x1320a1;return this[_0x3e15e8(0x15e)](this['_buildOwnRow']());}async[_0x1320a1(0x2ab)](_0x16a205){const _0x21c81d=_0x1320a1;if(!this['_statusEnv']||!this['_isWriter'])return;return this[_0x21c81d(0x15e)](this[_0x21c81d(0x58c)](_0x16a205));}['_buildChildRow']({pid:_0x565e68,startedAt:_0x25f73b,kind:_0x59929e,supervisorKey:_0x100933,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0x1320a1(0x1d0),meta:meta=null,stats:stats=null}){const _0x26dcb7=_0x1320a1,_0x1cc941=Date[_0x26dcb7(0x477)](),_0x15fd92=_0x3d5f0a(_0x565e68,_0x25f73b);return{'nodeKey':_0x48b66b(_0x15fd92,'0'),'processKey':_0x15fd92,'instanceId':'0','pid':_0x565e68,'startedAt':_0x25f73b,'ppid':process['pid'],'host':_0x3718c1[_0x26dcb7(0x122)](),'supervisorKey':_0x100933,'slot':slot,'slotKey':slotKey,'kind':_0x59929e,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x1cc941,'expiresAt':_0x1cc941+_0x1605bd,'caps':this[_0x26dcb7(0x2e3)](_0x59929e,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0x1320a1(0x14f)](_0x538a29){const _0x352efa=_0x1320a1;if(!_0x538a29?.[_0x352efa(0x18a)])return null;const _0xc85b97=_0x3d5f0a(_0x538a29[_0x352efa(0x18a)],_0x538a29[_0x352efa(0x40e)]);this[_0x352efa(0x4fa)][_0x352efa(0x339)](_0xc85b97,{..._0x538a29,'supervisorKey':_0x538a29['supervisorKey']??this['_selfKey']});if(this[_0x352efa(0x2d2)])await this[_0x352efa(0x2ab)](this[_0x352efa(0x4fa)][_0x352efa(0x2e5)](_0xc85b97))[_0x352efa(0x29f)]?.(()=>{});return _0xc85b97;}[_0x1320a1(0x16f)](_0x4a264c){const _0x1c8239=_0x1320a1;if(!_0x4a264c)return;return this[_0x1c8239(0x4fa)]['delete'](_0x4a264c),this[_0x1c8239(0x593)](_0x4a264c);}['_sampleOwnStats'](){const _0x54b558=_0x1320a1,_0x1008c8=Date[_0x54b558(0x477)](),_0x40a21d=process[_0x54b558(0x380)](),_0x583ad2=(_0x1008c8-this['_lastCpuAt'])*0x3e8;if(_0x583ad2>=0x3d090){const _0x3f650=_0x40a21d[_0x54b558(0x18d)]-this[_0x54b558(0x2e9)][_0x54b558(0x18d)]+(_0x40a21d['system']-this[_0x54b558(0x2e9)][_0x54b558(0x297)]),_0x4f5819=_0x3718c1[_0x54b558(0x35f)]()[_0x54b558(0x1f7)]||0x1;this[_0x54b558(0x5c1)]=Math[_0x54b558(0x4a0)](0x64,Math['round'](_0x3f650/(_0x583ad2*_0x4f5819)*0x64)),this[_0x54b558(0x13d)]=Math[_0x54b558(0x2b6)](_0x583ad2/0x3e8),this[_0x54b558(0x2e9)]=_0x40a21d,this[_0x54b558(0x108)]=_0x1008c8;}const _0x1127a1=process[_0x54b558(0x2ae)](),_0x305468=this[_0x54b558(0x365)][_0x54b558(0x230)];let _0x4f2eca=0x0;if(_0x305468>0x0){const _0x20cdb3=[this['okdb'],...this[_0x54b558(0x270)][_0x54b558(0x35b)]?.['values']?.()??[]];for(const _0x1cb27f of _0x20cdb3){const _0x20052a=_0x1cb27f[_0x54b558(0x34f)]?.['_sandbox'];if(_0x20052a)_0x4f2eca+=_0x20052a[_0x54b558(0x29a)][_0x54b558(0x149)];}}let _0x3a0c60=null;const _0x5ab077=_0x305468;if(_0x5ab077>0x0){let _0x1d68a5=0x0;for(const _0x326111 of this[_0x54b558(0x365)][_0x54b558(0x564)]())_0x1d68a5+=_0x326111[_0x54b558(0x210)]||0x0;_0x3a0c60={'count':_0x5ab077,'heapUsed':_0x1d68a5,'sandbox':_0x305468,'busy':_0x4f2eca};}return{'rss':_0x1127a1[_0x54b558(0x4e9)],'heapUsed':_0x1127a1[_0x54b558(0x210)],'heapTotal':_0x1127a1[_0x54b558(0x33f)],'external':_0x1127a1[_0x54b558(0x4a9)],'cpuPct':this[_0x54b558(0x5c1)],'cpuWindowMs':this[_0x54b558(0x13d)]??null,'threads':_0x3a0c60,'at':_0x1008c8};}[_0x1320a1(0x1cf)](_0x14e545,_0xe7c25a){const _0x536345=_0x1320a1;if(!_0x14e545||!_0xe7c25a)return;this['_threadStats'][_0x536345(0x339)](_0x14e545,_0xe7c25a);}[_0x1320a1(0x384)](_0x5d0cfb){const _0x354842=_0x1320a1;this[_0x354842(0x365)][_0x354842(0x19c)](_0x5d0cfb);}[_0x1320a1(0x3e8)](_0x51eae9,_0x409743,_0x1245a6=undefined){const _0x1f3b56=_0x1320a1,_0x130574=this[_0x1f3b56(0x4fa)][_0x1f3b56(0x2e5)](_0x51eae9);if(!_0x130574||!_0x409743)return;if(_0x1245a6!==undefined)_0x130574[_0x1f3b56(0x3a1)]=_0x1245a6;_0x130574['stats']={'rss':_0x409743[_0x1f3b56(0x4e9)]??null,'heapUsed':_0x409743['heapUsed']??null,'heapTotal':_0x409743[_0x1f3b56(0x33f)]??null,'external':_0x409743[_0x1f3b56(0x4a9)]??null,'cpuPct':_0x409743[_0x1f3b56(0x295)]??null,'cpuWindowMs':_0x409743[_0x1f3b56(0x5bf)]??null,'threads':_0x409743['threads']??null,'claims':_0x409743['claims']??null,'envsOpen':_0x409743['envsOpen']??null,'at':Date[_0x1f3b56(0x477)]()};}[_0x1320a1(0x201)](){const _0x67d0c2=_0x1320a1,_0x347585=Date[_0x67d0c2(0x477)](),_0x235823=this['okdb'][_0x67d0c2(0x54c)]||{},_0x27100d=this[_0x67d0c2(0x4b7)]||_0x67d0c2(0x1f6);return{'nodeKey':this['_rowKey'],'processKey':this['_selfKey'],'instanceId':this[_0x67d0c2(0x584)],'pid':process[_0x67d0c2(0x18a)],'startedAt':this[_0x67d0c2(0x319)],'instanceStartedAt':this[_0x67d0c2(0x2cb)],'ppid':typeof process[_0x67d0c2(0x133)]===_0x67d0c2(0x3a9)?process['ppid']:null,'host':_0x3718c1[_0x67d0c2(0x122)](),'supervisorKey':this[_0x67d0c2(0x1ee)]??null,'version':require$$3[_0x67d0c2(0x13f)],'kind':_0x27100d,'role':{'engines':!!_0x235823[_0x67d0c2(0x505)],'processors':!!_0x235823[_0x67d0c2(0x262)],'compaction':_0x235823[_0x67d0c2(0x164)],'http':_0x235823[_0x67d0c2(0x4cb)]},'listenAddr':this['_listenAddr']??null,'heartbeatAt':_0x347585,'expiresAt':_0x347585+_0x1605bd,'caps':this['_caps'](_0x27100d,_0x235823),'lifecycle':{'state':_0x67d0c2(0x1d0),'desiredVersionApplied':null},'meta':{...this[_0x67d0c2(0x33e)]},'processing':_0x235823[_0x67d0c2(0x262)]?this[_0x67d0c2(0x4db)]():null,'engines':_0x235823[_0x67d0c2(0x505)]?[...this[_0x67d0c2(0x270)][_0x67d0c2(0x358)]??[]]:null,'singletonClaims':this[_0x67d0c2(0x4c4)](),'stats':this[_0x67d0c2(0x52b)](),'writers':this[_0x67d0c2(0x4b6)]()};}[_0x1320a1(0x4b6)](){const _0x5c0460=_0x1320a1,_0x5387fe={};try{for(const [_0x2fba97,_0x1dfba1]of this[_0x5c0460(0x270)][_0x5c0460(0x35b)]){try{const _0x4c942d=_0x1dfba1[_0x5c0460(0x23b)]?.();if(!_0x4c942d)continue;if(!_0x4c942d[_0x5c0460(0x196)]&&!_0x4c942d[_0x5c0460(0x30f)]&&!(_0x4c942d[_0x5c0460(0x59b)]??0x0)&&!_0x4c942d[_0x5c0460(0x1f0)])continue;_0x5387fe[_0x2fba97]={'depth':_0x4c942d[_0x5c0460(0x196)],'oldestPendingMs':_0x4c942d[_0x5c0460(0x523)],'committed':_0x4c942d[_0x5c0460(0x30f)],'commitsPerSec':_0x4c942d[_0x5c0460(0x576)],'commitP99Ms':_0x4c942d[_0x5c0460(0x31f)],'parkedNow':_0x4c942d[_0x5c0460(0x59b)]??0x0,'draining':!!_0x4c942d['draining']};}catch{}}}catch{}return Object['keys'](_0x5387fe)['length']?_0x5387fe:null;}[_0x1320a1(0x4c4)](){const _0x52cb70=_0x1320a1,_0x532bde=process[_0x52cb70(0x18a)],_0x1af25c=Date[_0x52cb70(0x477)](),_0xc6530a=_0x6f0784=>{const _0xe38d85=_0x52cb70;if(!_0x6f0784)return[];const _0x56d453=[];try{for(const {id:_0x2a9919,entry:_0x4a45ac}of _0x6f0784['list']()){if(_0x4a45ac?.[_0xe38d85(0x232)]?.[_0xe38d85(0x18a)]!==_0x532bde)continue;const _0x21ab00=_0x4a45ac['updatedAt']??_0x4a45ac[_0xe38d85(0x227)]??0x0;if(_0x21ab00+(_0x4a45ac['ttlMs']??0x0)<_0x1af25c)continue;_0x56d453[_0xe38d85(0x38d)](_0x2a9919);}}catch{}return _0x56d453;},_0x5d891f=_0xc6530a(this[_0x52cb70(0x3ea)](_0x52cb70(0x351))),_0x3ab56e=_0xc6530a(this[_0x52cb70(0x3ea)](_0x52cb70(0x362)));if(!_0x5d891f[_0x52cb70(0x1f7)]&&!_0x3ab56e['length'])return null;return{'compact':_0x5d891f,'replicate':_0x3ab56e};}[_0x1320a1(0x3ea)](_0x2cc90a){const _0x36f132=_0x1320a1;if(!this[_0x36f132(0x270)]?.[_0x36f132(0x11b)])return null;if(!this[_0x36f132(0x3b2)])this[_0x36f132(0x3b2)]=new Map();let _0x4f12cc=this['_singletonLocks'][_0x36f132(0x2e5)](_0x2cc90a);if(!_0x4f12cc)try{_0x4f12cc=new _0x4babe9(this[_0x36f132(0x270)][_0x36f132(0x11b)],{'namespace':_0x2cc90a}),this[_0x36f132(0x3b2)]['set'](_0x2cc90a,_0x4f12cc);}catch{return null;}return _0x4f12cc;}['_buildProcessingFacet'](){const _0x1ce054=_0x1320a1,_0x511130=[];try{for(const [_0x376051,_0x1ed932]of this[_0x1ce054(0x270)]['_envs']){if(_0x376051[_0x1ce054(0x5b6)]('~'))continue;for(const _0x325cca of _0x1ed932[_0x1ce054(0x40b)]['tierList']())_0x511130[_0x1ce054(0x38d)]({..._0x325cca,'env':_0x376051});}}catch{}return{'participate':this['okdb'][_0x1ce054(0x262)]?.[_0x1ce054(0x2ca)]??![],'processors':_0x511130};}[_0x1320a1(0x5cd)](){const _0x24e006=_0x1320a1;if(this[_0x24e006(0x20d)])return!![];const _0x202f5f=this[_0x24e006(0x270)][_0x24e006(0x11b)];if(!_0x202f5f)return![];return this[_0x24e006(0x20d)]=_0x202f5f['openDB'](_0x4a7dc5,{'dupSort':![]}),this[_0x24e006(0x354)]=_0x202f5f['openDB'](_0x47938c,{'dupSort':![]}),!![];}async[_0x1320a1(0x49d)](){const _0x9619d2=_0x1320a1;if(!this[_0x9619d2(0x5cd)]())return;const _0x33abdf=_0x9619d2(0x506),_0xa1390=0x1,_0x4d6df4=this['_desired'][_0x9619d2(0x2e5)](_0x33abdf)??0x0;if(_0x4d6df4>=_0xa1390)return;const _0x4006ad=_0x295a21=>{const _0x33d730=_0x9619d2;if(_0x295a21==='worker')return'single';if(_0x295a21===_0x33d730(0x39a))return _0x33d730(0x356);return _0x295a21;};await this[_0x9619d2(0x270)][_0x9619d2(0x320)][_0x9619d2(0x315)][_0x9619d2(0x5ab)](()=>{const _0x1c5015=_0x9619d2;for(const _0x12f88c of[_0x1c5015(0x1b4),_0x1c5015(0x21b)]){for(const {key:_0x2d59a5,value:_0x26b6c6}of this['_desired'][_0x1c5015(0x5f9)]({'start':_0x12f88c,'end':_0x12f88c+'\xff'})){if(typeof _0x2d59a5!==_0x1c5015(0x5c8)||!_0x2d59a5[_0x1c5015(0x5b6)](_0x12f88c))break;const _0x33f864=_0x4006ad(_0x26b6c6['mode']);if(_0x33f864!==_0x26b6c6['mode'])this[_0x1c5015(0x20d)][_0x1c5015(0x423)](_0x2d59a5,{..._0x26b6c6,'mode':_0x33f864});}}this['_desired'][_0x1c5015(0x423)](_0x33abdf,_0xa1390);});}[_0x1320a1(0x45a)](){return!!this['_desired'];}[_0x1320a1(0x1d9)](_0x4f3e08,_0x311982){const _0x5117fd=_0x1320a1;if(!this[_0x5117fd(0x5cd)]())return null;const _0x1f2fd5=_0x4f3e08+'/'+_0x311982;return this['_refreshDesiredSnapshot'](),this[_0x5117fd(0x359)][_0x5117fd(0x2e5)](_0x1f2fd5)??this[_0x5117fd(0x20d)][_0x5117fd(0x2e5)](_0x1f2fd5)??null;}['_refreshDesiredSnapshot'](){const _0x381388=_0x1320a1;if(!_0x501df9)return;try{this[_0x381388(0x270)][_0x381388(0x320)]?.['db']?.[_0x381388(0x4f9)]?.();}catch{}}async[_0x1320a1(0x1b0)](_0x3e849a,_0x921c33,_0x1300a6){const _0x379d3e=_0x1320a1;if(!this[_0x379d3e(0x5cd)]())return null;const _0x1e81a7=_0x3e849a+'/'+_0x921c33;this[_0x379d3e(0x579)]();const _0x57f8c6=this[_0x379d3e(0x359)][_0x379d3e(0x2e5)](_0x1e81a7)??this['_desired']['get'](_0x1e81a7)??{'version':0x0},_0x42ef1c=(_0x57f8c6[_0x379d3e(0x13f)]||0x0)+0x1,_0x3bc643={..._0x57f8c6,..._0x1300a6,'version':_0x42ef1c,'updatedAt':Date[_0x379d3e(0x477)]()};this[_0x379d3e(0x359)]['set'](_0x1e81a7,_0x3bc643);try{await this[_0x379d3e(0x270)][_0x379d3e(0x320)]['_writer'][_0x379d3e(0x5ab)](()=>{const _0x43deee=_0x379d3e;this[_0x43deee(0x20d)][_0x43deee(0x423)](_0x1e81a7,_0x3bc643);});}finally{if(this[_0x379d3e(0x359)][_0x379d3e(0x2e5)](_0x1e81a7)===_0x3bc643)this[_0x379d3e(0x359)]['delete'](_0x1e81a7);}return _0x42ef1c;}[_0x1320a1(0x542)](_0x5a2bd5){const _0x5b6f65=_0x1320a1;if(!this[_0x5b6f65(0x5cd)]())return[];this['_refreshDesiredSnapshot']();const _0x30105f=_0x5a2bd5+'/',_0x1e92a2=[];for(const {key:_0x221010,value:_0x305f93}of this[_0x5b6f65(0x20d)][_0x5b6f65(0x5f9)]({'start':_0x30105f,'end':_0x30105f+'\xff'})){if(typeof _0x221010!==_0x5b6f65(0x5c8)||!_0x221010[_0x5b6f65(0x5b6)](_0x30105f))break;_0x1e92a2[_0x5b6f65(0x38d)]({'key':_0x221010[_0x5b6f65(0x19f)](_0x30105f[_0x5b6f65(0x1f7)]),'value':_0x305f93});}return _0x1e92a2;}['getCmd'](_0x3c2502){const _0x4019ad=_0x1320a1;if(!this[_0x4019ad(0x5cd)]())return null;return this['_cmd']['get'](_0x3c2502)??null;}async[_0x1320a1(0x1c2)](_0x1361e0,_0x248708,_0x423688={}){const _0x5d2e38=_0x1320a1;if(!this[_0x5d2e38(0x5cd)]())return null;let _0x633034;return await this[_0x5d2e38(0x270)][_0x5d2e38(0x320)]['_writer'][_0x5d2e38(0x5ab)](()=>{const _0x28ea7f=_0x5d2e38,_0x10f31a=this[_0x28ea7f(0x354)][_0x28ea7f(0x2e5)](_0x1361e0)||{'epoch':0x0};_0x633034=(_0x10f31a[_0x28ea7f(0x4c2)]||0x0)+0x1,this[_0x28ea7f(0x354)][_0x28ea7f(0x423)](_0x1361e0,{..._0x10f31a,..._0x423688,'cmd':_0x248708,'epoch':_0x633034,'updatedAt':Date[_0x28ea7f(0x477)]()});}),_0x633034;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x32daf4,'nodeKey':_0x3d5f0a,'logicalKey':_0x198f7d,'slotKey':_0x3682bc,'PROCESS_ENV':_0x6a0b75,'NODE_TYPE':_0x508ff2},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x1e8340=_0x1577db;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x5b859e=require$$0$6,{EVENTS:_0x56ba9e,CHANGE_ACTIONS:_0x511085}=requireOkdbEnums(),{LOOP:_0x3fb5da}=requireOkdbLoopMonitor(),_0x2d34f3=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0xa67587=0x5,_0xc63a89=0x2710;class _0x2c2d44 extends _0x5b859e{constructor(_0x23d416,_0x32a3c1={}){const _0x1bc919=_0x38fc;super(),this['okdb']=_0x23d416,this['_quantum']=_0x32a3c1['quantum']??_0x2d34f3,this[_0x1bc919(0x3c3)]=_0x32a3c1[_0x1bc919(0x161)]??_0xa67587,this[_0x1bc919(0x222)]=_0x32a3c1[_0x1bc919(0x4e1)]??_0xc63a89,this[_0x1bc919(0x44b)]=![],this[_0x1bc919(0x4c0)]=new Map(),this['_baselines']=new Map(),this['_pending']=new Map(),this[_0x1bc919(0x1e4)]=null,this[_0x1bc919(0x23e)]=![],this[_0x1bc919(0x5db)]=new Set(),this[_0x1bc919(0x440)]=_0x2d8a2b=>this[_0x1bc919(0x349)](_0x2d8a2b),this['_onPoke']=_0xa43943=>this[_0x1bc919(0x1a1)](_0xa43943),this[_0x1bc919(0x46c)]=()=>this[_0x1bc919(0x4ea)]();}['start'](){const _0x95f301=_0x38fc;if(this[_0x95f301(0x44b)])return;this[_0x95f301(0x44b)]=!![];for(const [_0x388dfa,_0x142a68]of this[_0x95f301(0x270)][_0x95f301(0x35b)]){if(_0x388dfa[_0x95f301(0x5b6)]('~'))continue;try{_0x142a68[_0x95f301(0x41f)]();}catch{}}for(const [_0x47afe6,_0x2cc47a]of this[_0x95f301(0x270)]['_envs']){if(_0x47afe6[_0x95f301(0x5b6)]('~'))continue;try{this[_0x95f301(0x223)]['set'](_0x47afe6,_0x2cc47a[_0x95f301(0x3a3)]()||0x0);}catch{}}const {events:_0x1f558e}=this['okdb'];_0x1f558e['on'](_0x56ba9e[_0x95f301(0x5d7)],this[_0x95f301(0x440)]),_0x1f558e['on'](_0x56ba9e[_0x95f301(0x432)],this[_0x95f301(0x440)]),_0x1f558e['on'](_0x56ba9e[_0x95f301(0x24e)],this[_0x95f301(0x440)]),_0x1f558e['on'](_0x56ba9e[_0x95f301(0x3d4)],this[_0x95f301(0x5d5)]),_0x1f558e[_0x95f301(0x54e)](_0x56ba9e[_0x95f301(0x5a4)],this['_onStop']);}[_0x1e8340(0x4ea)](){const _0x347ad2=_0x1e8340;if(!this[_0x347ad2(0x44b)])return;this[_0x347ad2(0x44b)]=![];const {events:_0x2fe152}=this[_0x347ad2(0x270)];_0x2fe152['off'](_0x56ba9e[_0x347ad2(0x5d7)],this[_0x347ad2(0x440)]),_0x2fe152[_0x347ad2(0x31a)](_0x56ba9e['ITEM_UPDATE'],this[_0x347ad2(0x440)]),_0x2fe152[_0x347ad2(0x31a)](_0x56ba9e['ITEM_REMOVE'],this[_0x347ad2(0x440)]),_0x2fe152[_0x347ad2(0x31a)](_0x56ba9e[_0x347ad2(0x3d4)],this[_0x347ad2(0x5d5)]);try{_0x2fe152[_0x347ad2(0x31a)](_0x56ba9e[_0x347ad2(0x5a4)],this['_onStop']);}catch{}this[_0x347ad2(0x1e4)]&&(clearTimeout(this[_0x347ad2(0x1e4)]),this[_0x347ad2(0x1e4)]=null),this[_0x347ad2(0x4e5)][_0x347ad2(0x18f)](),this[_0x347ad2(0x4c0)][_0x347ad2(0x18f)](),this[_0x347ad2(0x223)][_0x347ad2(0x18f)](),this[_0x347ad2(0x5db)][_0x347ad2(0x18f)]();}[_0x1e8340(0x28e)](_0x236314,_0x380f4a,_0x31eb78,_0x2c458c){return _0x236314+'\x00'+_0x380f4a+'\x00'+_0x31eb78+'\x00'+_0x2c458c;}[_0x1e8340(0x118)](_0x5798c4,_0x5c4fa0,_0x3b8f50,_0x4fb629){const _0x3116f8=_0x1e8340,_0x5af76e=this[_0x3116f8(0x28e)](_0x5798c4,_0x5c4fa0,_0x3b8f50,_0x4fb629);if(this[_0x3116f8(0x5db)]['has'](_0x5af76e))return![];this[_0x3116f8(0x5db)][_0x3116f8(0x1a0)](_0x5af76e);if(this[_0x3116f8(0x5db)][_0x3116f8(0x230)]>this[_0x3116f8(0x222)]){const _0xa56149=this[_0x3116f8(0x5db)][_0x3116f8(0x564)]()[_0x3116f8(0x36d)]()[_0x3116f8(0x32f)];this['_seen'][_0x3116f8(0x19c)](_0xa56149);}return!![];}[_0x1e8340(0x349)](_0x15046b){const _0x684721=_0x1e8340;if(!this[_0x684721(0x44b)]||!_0x15046b)return;const {env:_0x32bcee,type:_0x267133,key:_0xab5c0e,clock:_0x4d1e15,origin:_0x273bcc,action:_0x470c52,newValue:_0x10170f,oldValue:_0xcba6df}=_0x15046b;if(_0x32bcee==null||_0x267133==null||_0xab5c0e==null)return;if(typeof _0x32bcee===_0x684721(0x5c8)&&_0x32bcee[_0x684721(0x5b6)]('~'))return;if(typeof _0x267133===_0x684721(0x5c8)&&_0x267133[_0x684721(0x5b6)]('~'))return;if(!this[_0x684721(0x118)](_0x32bcee,_0x267133,_0xab5c0e,_0x4d1e15))return;const _0x1af5c9=_0x470c52===_0x511085['REMOVE']?_0x684721(0x361):_0x684721(0x423);this[_0x684721(0x1dc)](_0x684721(0x3f2),{'env':_0x32bcee,'type':_0x267133,'key':_0xab5c0e,'op':_0x1af5c9,'clock':_0x4d1e15,'origin':_0x273bcc,'value':_0x1af5c9===_0x684721(0x361)?null:_0x10170f,'prevValue':_0xcba6df});}[_0x1e8340(0x1a1)](_0x26a63d){const _0x3531f2=_0x1e8340;if(!this['_started'])return;if(!_0x26a63d||typeof _0x26a63d['env']!=='string'||typeof _0x26a63d[_0x3531f2(0x153)]!==_0x3531f2(0x5c8))return;const {env:_0xde2b1f,type:_0x1887aa}=_0x26a63d;if(_0xde2b1f[_0x3531f2(0x5b6)]('~')||_0x1887aa[_0x3531f2(0x5b6)]('~'))return;this[_0x3531f2(0x4e5)][_0x3531f2(0x339)](_0xde2b1f+'\x00'+_0x1887aa,{'env':_0xde2b1f,'type':_0x1887aa}),this[_0x3531f2(0x2f0)]();}[_0x1e8340(0x2f0)](){const _0x5a21d3=_0x1e8340;if(this[_0x5a21d3(0x1e4)])return;const _0x4a4c49=()=>{const _0xeedce5=_0x5a21d3;this[_0xeedce5(0x1e4)]=null,this['_drain']()['catch'](()=>{});};this[_0x5a21d3(0x1e4)]=setTimeout(_0x4a4c49,this[_0x5a21d3(0x3c3)]>0x0?this['_flushDebounce']:0x0);}async[_0x1e8340(0x252)](){const _0x1723a0=_0x1e8340;if(this[_0x1723a0(0x23e)]){this[_0x1723a0(0x2f0)]();return;}this['_draining']=!![];try{const _0x2cecc2=[...this[_0x1723a0(0x4e5)][_0x1723a0(0x564)]()];this[_0x1723a0(0x4e5)]['clear']();let _0x4995b4=![];for(const {env:_0x270596,type:_0x3abe87}of _0x2cecc2){try{const _0x3eb55c=await this[_0x1723a0(0x318)](_0x270596,_0x3abe87);if(_0x3eb55c)_0x4995b4=!![];}catch{this[_0x1723a0(0x4e5)][_0x1723a0(0x339)](_0x270596+'\x00'+_0x3abe87,{'env':_0x270596,'type':_0x3abe87}),_0x4995b4=!![];}}if(_0x4995b4||this[_0x1723a0(0x4e5)][_0x1723a0(0x230)]>0x0)this[_0x1723a0(0x2f0)]();}finally{this[_0x1723a0(0x23e)]=![];}}async['_drainOne'](_0x5e01fa,_0x4424ea){const _0x133104=_0x1e8340,_0x36f82f=await this[_0x133104(0x270)][_0x133104(0x29b)](_0x5e01fa),_0x47597e=_0x5e01fa+'\x00'+_0x4424ea;!this[_0x133104(0x4c0)][_0x133104(0x399)](_0x47597e)&&(!this[_0x133104(0x223)][_0x133104(0x399)](_0x5e01fa)&&(_0x36f82f[_0x133104(0x41f)](),this['_baselines']['set'](_0x5e01fa,_0x36f82f[_0x133104(0x3a3)]()||0x0)),this['_cursors'][_0x133104(0x339)](_0x47597e,this[_0x133104(0x223)]['get'](_0x5e01fa)));const _0x16e82f=this[_0x133104(0x4c0)]['get'](_0x47597e),_0x5ec9a2=_0x36f82f[_0x133104(0x3a3)](_0x4424ea)||0x0;if(_0x5ec9a2<=_0x16e82f)return![];const _0x54ff78=_0x16e82f+this[_0x133104(0x5da)],_0x207246=Math[_0x133104(0x4a0)](_0x5ec9a2,_0x54ff78),_0x33b0bb=_0x3fb5da[_0x133104(0x494)]?_0x3fb5da[_0x133104(0x477)]():0x0,_0x2e7ae6=Array[_0x133104(0x41c)](_0x36f82f[_0x133104(0x4ba)](_0x4424ea,_0x16e82f+0x1,_0x207246));let _0xb4a5a2=_0x16e82f;for(const _0x4be8a7 of _0x2e7ae6){const {clock:_0xe904c8,key:_0x499de3,action:_0x2448d4,origin:_0x183889}=_0x4be8a7;if(_0xe904c8>_0xb4a5a2)_0xb4a5a2=_0xe904c8;if(_0x499de3==null)continue;if(!this[_0x133104(0x118)](_0x5e01fa,_0x4424ea,_0x499de3,_0xe904c8))continue;let _0xc17be8,_0x205c31;if(_0x2448d4===_0x511085['REMOVE'])_0xc17be8=_0x133104(0x361),_0x205c31=null;else{const _0x5e7def=_0x36f82f['get'](_0x4424ea,_0x499de3);_0x5e7def==null?(_0xc17be8='remove',_0x205c31=null):(_0xc17be8=_0x133104(0x423),_0x205c31=_0x5e7def);}this[_0x133104(0x1dc)](_0x133104(0x3f2),{'env':_0x5e01fa,'type':_0x4424ea,'key':_0x499de3,'op':_0xc17be8,'clock':_0xe904c8,'origin':_0x183889,'value':_0x205c31});}if(_0x3fb5da[_0x133104(0x494)])_0x3fb5da[_0x133104(0x56c)]('feed:'+_0x5e01fa+':'+_0x4424ea,_0x3fb5da['now']()-_0x33b0bb,'n='+_0x2e7ae6[_0x133104(0x1f7)]);return this['_cursors'][_0x133104(0x339)](_0x47597e,Math['max'](_0xb4a5a2,_0x207246)),_0x36f82f['getClock'](_0x4424ea)>_0x207246;}[_0x1e8340(0x2d9)](){const _0x286e22=_0x1e8340;return{'started':this[_0x286e22(0x44b)],'quantum':this['_quantum'],'flushDebounce':this[_0x286e22(0x3c3)],'cursors':Object['fromEntries']([...this[_0x286e22(0x4c0)][_0x286e22(0x2fb)]()][_0x286e22(0x4d3)](([_0x7001a1,_0x5a9ecf])=>[_0x7001a1[_0x286e22(0x288)]('\x00',':'),_0x5a9ecf])),'pending':this[_0x286e22(0x4e5)][_0x286e22(0x230)],'seen':this[_0x286e22(0x5db)]['size']};}}return _0x2c2d44[_0x1e8340(0x552)]=_0x2d34f3,okdbChangefeed={'OKDBChangefeed':_0x2c2d44},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x45a43c=_0x1577db;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x3c26be=require$$1$2,_0x3a57a6=require$$1,{EVENTS:_0x389905}=requireOkdbEnums(),_0x428f76=require$$0,{slotKey:_0xc7044}=requireOkdbProcessRegistry(),_0x1688f2=0xfa,_0xed1c76=0xfa0,_0x48c2d6=0x5,_0x124d61=0x2710,_0xe9d7f2=0xbb8,_0x51d3bd=0x7d0,_0xb95c58=_0x45a43c(0x34b),_0x91343e=_0x45a43c(0x40f),_0x5e006e=_0x45a43c(0x18c),_0x59860b='stats',_0x21a845=[_0x389905[_0x45a43c(0x2fc)],_0x389905[_0x45a43c(0x5f0)],_0x389905[_0x45a43c(0x50f)],_0x389905['FTS_RESET'],_0x389905[_0x45a43c(0x38b)],_0x389905['INDEX_READY'],_0x389905[_0x45a43c(0x4d5)],_0x389905['INDEX_REGISTERED'],_0x45a43c(0x5f4),_0x45a43c(0x382),_0x45a43c(0x5e3),'processor:paused',_0x45a43c(0x54a),_0x45a43c(0x5b8)],_0x555059=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0;function _0x2e281a({workers:_0x70d6ec,makeOkdb:_0x154fb6,port:_0x5a6c7c,primaryOkdb:_0x4ee0a1,childEntry:childEntry=![],workerEnv:workerEnv=null}={}){const _0xe51911=_0x45a43c;if(_0x3c26be[_0xe51911(0x300)])return childEntry&&_0x3c26be[_0xe51911(0x3ec)]({'exec':_0x3a57a6['join'](__dirname,'okdb-http-worker-child.js'),'args':[],'execArgv':((()=>{const _0x194b37=_0xe51911,_0x52c6d9=[];for(let _0x1173fe=0x0;_0x1173fe<process[_0x194b37(0x251)][_0x194b37(0x1f7)];_0x1173fe++){const _0x502cbe=process[_0x194b37(0x251)][_0x1173fe];if(_0x502cbe['startsWith'](_0x194b37(0x11a))||_0x502cbe[_0x194b37(0x5b6)](_0x194b37(0x171))||_0x502cbe['startsWith'](_0x194b37(0x1e2)))continue;if(_0x502cbe==='-e'||_0x502cbe===_0x194b37(0x2f7)||_0x502cbe==='-p'||_0x502cbe===_0x194b37(0x5f8)){_0x1173fe++;continue;}_0x52c6d9[_0x194b37(0x38d)](_0x502cbe);}return _0x52c6d9;})())}),_0x4163ff({'workers':_0x70d6ec,'port':_0x5a6c7c,'primaryOkdb':_0x4ee0a1,'workerEnv':workerEnv});return _0x22bda2({'makeOkdb':_0x154fb6,'port':_0x5a6c7c});}function _0x4163ff({workers:_0x3f58fb,port:_0x41b1f3,primaryOkdb:_0x21c9df,workerEnv:_0x3e3ab6}){const _0x4a720f=_0x45a43c,_0x4dd8dc=new Map(),_0x25dac9=new Map();let _0x30fe09=![];const _0x5784d8=_0xded8ce=>_0xded8ce?.[_0x4a720f(0x220)],_0x1af732=_0x52d195=>{const _0x5521ef=_0x4a720f,_0x27512e=_0x3c26be[_0x5521ef(0x170)]({...process.env,..._0x3e3ab6||{},'OKDB_CLUSTER_SLOT':String(_0x52d195)});return _0x27512e[_0x5521ef(0x220)]=_0x52d195,_0x4dd8dc[_0x5521ef(0x339)](_0x27512e[_0x5521ef(0x3a0)][_0x5521ef(0x18a)],{'worker':_0x27512e,'startedAt':Date['now'](),'slot':_0x52d195}),_0x27512e['on']('error',_0x3292f5=>{const _0x550166=_0x5521ef;console[_0x550166(0x18c)](_0x550166(0x32a)+_0x27512e[_0x550166(0x3a0)][_0x550166(0x18a)]+_0x550166(0x2dd)+(_0x3292f5?.[_0x550166(0x141)]??_0x3292f5));}),_0x27512e['on'](_0x5521ef(0x581),()=>_0x36bf47()),_0x27512e;},_0x2e1a5f=_0x3f7dfc=>{const _0x5d1ecb=_0x4a720f;for(const {worker:_0x4ce51d}of _0x4dd8dc[_0x5d1ecb(0x564)]()){if(_0x4ce51d[_0x5d1ecb(0x373)]()||!_0x4ce51d[_0x5d1ecb(0x18e)]())continue;try{_0x4ce51d[_0x5d1ecb(0x1e5)](_0x3f7dfc);}catch{}}};_0x21c9df?.[_0x4a720f(0x1b1)]?.({'kind':_0x4a720f(0x1c6),'listenAddr':':'+_0x41b1f3})[_0x4a720f(0x29f)](()=>{}),_0x21c9df?.['processes']?.['setOwnMeta']?.({'workersConfigured':_0x3f58fb});const _0x4a1d7e={'engines':!![],'processors':!![],'compaction':!![],'http':!![]},_0x36bf47=()=>{const _0x2ff016=_0x4a720f,_0x43c6d6=_0x21c9df?.[_0x2ff016(0x12f)];if(!_0x43c6d6||!_0x43c6d6[_0x2ff016(0x2d2)])return;const _0x23d644=_0x43c6d6['selfKey'];for(const {worker:_0x3a0dcf,startedAt:_0x39b185,slot:_0x116eb1,stats:_0xd9c81b,processing:_0x282e7d}of _0x4dd8dc[_0x2ff016(0x564)]()){if(_0x3a0dcf['isDead']())continue;const _0x4939ff=_0x43c6d6[_0x2ff016(0x45a)]?.()&&_0x43c6d6[_0x2ff016(0x1d9)](_0x2ff016(0x383),_0x371a62(_0x116eb1))?.[_0x2ff016(0x2e0)]===!![];_0x43c6d6['publishChildRow']({'pid':_0x3a0dcf[_0x2ff016(0x3a0)][_0x2ff016(0x18a)],'startedAt':_0x39b185,'kind':_0x2ff016(0x4ca),'supervisorKey':_0x23d644,'slot':_0x116eb1,'slotKey':_0x371a62(_0x116eb1),'role':_0x4a1d7e,'listenAddr':':'+_0x41b1f3,'lifecycle':_0x4939ff?_0x2ff016(0x32b):_0x2ff016(0x1d0),'processing':_0x282e7d??null,'stats':_0xd9c81b??null})[_0x2ff016(0x29f)](()=>{});}},_0x371a62=_0x558876=>_0xc7044(_0x4a720f(0x5a1)+_0x41b1f3,_0x558876),_0x2d8bf0=_0x2455b9=>{const _0x1a75a8=_0x4a720f,_0x2883dd=_0x21c9df?.[_0x1a75a8(0x12f)];if(!_0x2883dd?.['hasDesired']?.())return![];return _0x2883dd['getDesired'](_0x1a75a8(0x383),_0x371a62(_0x2455b9))?.[_0x1a75a8(0x2e0)]===!![];};for(let _0x76f474=0x0;_0x76f474<_0x3f58fb;_0x76f474++){const _0x106773=_0x2d8bf0(_0x76f474);_0x25dac9['set'](_0x76f474,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x106773,'respawnTimer':null}),_0x106773?console[_0x4a720f(0x18c)](_0x4a720f(0x435)+_0x76f474+'\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)'):_0x1af732(_0x76f474);}const _0x1ad23c=()=>{const _0x44fd58=_0x4a720f,_0x467894=_0x21c9df?.['processes'];if(!_0x467894?.[_0x44fd58(0x2d2)]||!_0x467894[_0x44fd58(0x45a)]?.())return;for(const [_0x32b706,_0x26a725]of _0x25dac9[_0x44fd58(0x2fb)]()){const _0x4b0e3e=_0x467894['getDesired'](_0x44fd58(0x383),_0x371a62(_0x32b706)),_0x3be92f=_0x4b0e3e?.[_0x44fd58(0x2e0)]===!![],_0x25f9ac=_0x4b0e3e?.[_0x44fd58(0x5b2)]===!![];if(_0x3be92f&&!_0x26a725[_0x44fd58(0x445)]){_0x26a725[_0x44fd58(0x445)]=!![];_0x26a725['respawnTimer']&&(clearTimeout(_0x26a725[_0x44fd58(0x3cb)]),_0x26a725['respawnTimer']=null);for(const {worker:_0x393253}of _0x4dd8dc[_0x44fd58(0x564)]()){if(_0x5784d8(_0x393253)!==_0x32b706||_0x393253[_0x44fd58(0x373)]())continue;try{if(_0x25f9ac)_0x393253[_0x44fd58(0x3a0)][_0x44fd58(0x5b2)]('SIGKILL');else _0x393253['isConnected']()&&_0x393253[_0x44fd58(0x3c5)]();}catch{}}console[_0x44fd58(0x18c)](_0x44fd58(0x553)+(_0x25f9ac?_0x44fd58(0x312):_0x44fd58(0x43c))+_0x44fd58(0x3bd)+_0x32b706+_0x44fd58(0x59f));}else{if(!_0x3be92f&&_0x26a725[_0x44fd58(0x445)]&&_0x4b0e3e){_0x26a725['dead']=![],_0x26a725['deaths']=[],_0x26a725[_0x44fd58(0x181)]=0x0;const _0x472d88=[..._0x4dd8dc[_0x44fd58(0x564)]()][_0x44fd58(0x3b4)](({worker:_0x19badb})=>_0x5784d8(_0x19badb)===_0x32b706&&!_0x19badb[_0x44fd58(0x373)]());!_0x472d88&&!_0x30fe09&&(_0x1af732(_0x32b706),console['log']('[okdb-cluster]\x20recommissioned\x20worker\x20slot='+_0x32b706));}}}},_0x566b05=()=>{try{_0x1ad23c();}catch{}};_0x21c9df?.[_0x4a720f(0x521)]?.['on']?.(_0x389905[_0x4a720f(0x438)],_0x566b05);const _0x1f5880=[];if(_0x21c9df?.[_0x4a720f(0x521)]?.['on'])for(const _0x4ad4b7 of _0x21a845){const _0x4ec2c1=_0x3728b7=>{_0x2e1a5f({[_0xb95c58]:_0x91343e,'event':_0x4ad4b7,'data':_0x3728b7??{}});};_0x21c9df['events']['on'](_0x4ad4b7,_0x4ec2c1),_0x1f5880[_0x4a720f(0x38d)]({'event':_0x4ad4b7,'handler':_0x4ec2c1});}const _0x6d0cfc=setInterval(()=>{_0x1ad23c(),_0x36bf47();},_0x555059);_0x6d0cfc[_0x4a720f(0x2a1)]?.();const _0xc97e57=(_0x417cc5,_0x279009)=>{const _0xc10f37=_0x4a720f;if(!_0x279009||typeof _0x279009!==_0xc10f37(0x215)||_0x279009[_0xb95c58]!==_0x5e006e)return;if(!_0x21c9df?.[_0xc10f37(0x18c)]?.[_0xc10f37(0x148)])return;const _0x1d023d=_0x279009[_0xc10f37(0x3ad)]||{};_0x21c9df['log']['ingest']({..._0x1d023d,'msg':'[w'+_0x279009[_0xc10f37(0x383)]+']\x20'+(_0x1d023d['msg']??''),'meta':{..._0x1d023d[_0xc10f37(0x1bc)]||{},'worker':_0x279009[_0xc10f37(0x383)],'workerPid':_0x279009[_0xc10f37(0x18a)]}});};_0x3c26be['on'](_0x4a720f(0x141),_0xc97e57);const _0x3a108f=(_0x4806c3,_0x2c7b53)=>{const _0x5da580=_0x4a720f;if(!_0x2c7b53||typeof _0x2c7b53!==_0x5da580(0x215)||_0x2c7b53[_0xb95c58]!==_0x59860b)return;const _0x3b2f7b=_0x4dd8dc[_0x5da580(0x2e5)](_0x4806c3[_0x5da580(0x3a0)][_0x5da580(0x18a)]);if(_0x3b2f7b){_0x3b2f7b[_0x5da580(0x3ca)]={..._0x2c7b53[_0x5da580(0x3ca)],'at':Date['now']()};if(_0x2c7b53[_0x5da580(0x3a1)]!==undefined)_0x3b2f7b['processing']=_0x2c7b53['processing'];}};_0x3c26be['on']('message',_0x3a108f),_0x3c26be['on']('exit',(_0x96d19d,_0x3f0c91,_0x9ea2ab)=>{const _0x11e8ca=_0x4a720f,_0x4ec77b=_0x96d19d['process']['pid'],_0x23e39c=_0x5784d8(_0x96d19d),_0x1bd3bc=_0x4dd8dc['get'](_0x4ec77b);if(_0x1bd3bc&&_0x21c9df?.[_0x11e8ca(0x12f)])_0x21c9df[_0x11e8ca(0x12f)]['removeNode'](_0x4ec77b+':'+_0x1bd3bc[_0x11e8ca(0x40e)])[_0x11e8ca(0x29f)](()=>{});_0x4dd8dc['delete'](_0x4ec77b),console['log'](_0x11e8ca(0x32a)+_0x4ec77b+_0x11e8ca(0x3e5)+(_0x23e39c??'?')+_0x11e8ca(0x289)+(_0x11e8ca(0x458)+_0x3f0c91+_0x11e8ca(0x4ee)+(_0x9ea2ab??_0x11e8ca(0x285))+_0x11e8ca(0x282)+_0x4dd8dc[_0x11e8ca(0x230)]+'\x20worker(s)\x20remaining')),_0x36bf47();if(_0x30fe09||_0x23e39c==null)return;const _0x1c7ee8=_0x25dac9[_0x11e8ca(0x2e5)](_0x23e39c);if(!_0x1c7ee8||_0x1c7ee8[_0x11e8ca(0x445)])return;const _0x3e02ab=Date[_0x11e8ca(0x477)]();_0x1c7ee8[_0x11e8ca(0x20f)][_0x11e8ca(0x38d)](_0x3e02ab),_0x1c7ee8[_0x11e8ca(0x20f)]=_0x1c7ee8['deaths'][_0x11e8ca(0x43d)](_0x160b42=>_0x3e02ab-_0x160b42<=_0x124d61);if(_0x1c7ee8[_0x11e8ca(0x20f)][_0x11e8ca(0x1f7)]>=_0x48c2d6){_0x1c7ee8[_0x11e8ca(0x445)]=!![],console[_0x11e8ca(0x54f)]('[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot='+_0x23e39c+_0x11e8ca(0x4e3)+_0x1c7ee8[_0x11e8ca(0x20f)][_0x11e8ca(0x1f7)]+_0x11e8ca(0x392)+(_0x124d61+_0x11e8ca(0x15b)+_0x4dd8dc[_0x11e8ca(0x230)]+_0x11e8ca(0x570)));return;}_0x1c7ee8[_0x11e8ca(0x181)]++;const _0x473dc3=Math['min'](_0xed1c76,_0x1688f2*0x2**(_0x1c7ee8[_0x11e8ca(0x181)]-0x1));console['log']('[okdb-cluster]\x20respawning\x20worker\x20slot='+_0x23e39c+'\x20in\x20'+_0x473dc3+'ms\x20(attempt\x20'+_0x1c7ee8[_0x11e8ca(0x181)]+')'),_0x1c7ee8[_0x11e8ca(0x3cb)]=setTimeout(()=>{const _0x43b7a8=_0x11e8ca;_0x1c7ee8[_0x43b7a8(0x3cb)]=null;if(_0x30fe09||_0x1c7ee8[_0x43b7a8(0x445)])return;const _0x46c89c=_0x1af732(_0x23e39c);_0x46c89c[_0x43b7a8(0x54e)](_0x43b7a8(0x2ac),()=>{const _0x113f13=_0x43b7a8;if(_0x25dac9['get'](_0x23e39c)===_0x1c7ee8)_0x1c7ee8[_0x113f13(0x181)]=0x0;});},_0x473dc3),_0x1c7ee8['respawnTimer'][_0x11e8ca(0x2a1)]?.();});const _0x53a78d=[..._0x4dd8dc['keys']()];console[_0x4a720f(0x18c)]('[okdb-cluster]\x20primary\x20pid='+process['pid']+_0x4a720f(0x23c)+_0x3f58fb+_0x4a720f(0x31e)+_0x41b1f3+':\x20'+('['+_0x53a78d[_0x4a720f(0x24f)](',\x20')+']'));const _0x18dc6e={'_isClusterController':!![],'port':_0x41b1f3,'primaryOkdb':_0x21c9df??null,'status'(){const _0x23c2ef=_0x4a720f;return{'clustered':!![],'primaryPid':process[_0x23c2ef(0x18a)],'port':_0x41b1f3,'primaryRole':_0x21c9df?.[_0x23c2ef(0x30d)]??null,'processorPid':null,'supervisorPid':process[_0x23c2ef(0x18a)],'workers':[..._0x4dd8dc[_0x23c2ef(0x564)]()][_0x23c2ef(0x4d3)](({worker:_0x4023cb})=>({'pid':_0x4023cb[_0x23c2ef(0x3a0)][_0x23c2ef(0x18a)],'id':_0x4023cb['id'],'dead':_0x4023cb[_0x23c2ef(0x373)]()}))};},async 'close'(){const _0x3da6cd=_0x4a720f;_0x30fe09=!![];for(const _0x11de2c of _0x25dac9[_0x3da6cd(0x564)]()){_0x11de2c['dead']=!![],_0x11de2c[_0x3da6cd(0x3cb)]&&(clearTimeout(_0x11de2c[_0x3da6cd(0x3cb)]),_0x11de2c[_0x3da6cd(0x3cb)]=null);}clearInterval(_0x6d0cfc),_0x3c26be[_0x3da6cd(0x31a)](_0x3da6cd(0x141),_0xc97e57),_0x3c26be[_0x3da6cd(0x31a)](_0x3da6cd(0x141),_0x3a108f),_0x21c9df?.[_0x3da6cd(0x521)]?.[_0x3da6cd(0x31a)]?.(_0x389905[_0x3da6cd(0x438)],_0x566b05);if(_0x21c9df?.[_0x3da6cd(0x521)]?.[_0x3da6cd(0x31a)])for(const {event:_0x100913,handler:_0x5ecfd3}of _0x1f5880){try{_0x21c9df[_0x3da6cd(0x521)][_0x3da6cd(0x31a)](_0x100913,_0x5ecfd3);}catch{}}_0x1f5880['length']=0x0;const _0x2d8e21=[..._0x4dd8dc[_0x3da6cd(0x564)]()]['map'](({worker:_0x1d34ec})=>_0x1d34ec);if(_0x2d8e21[_0x3da6cd(0x1f7)]===0x0)return;await Promise['all'](_0x2d8e21[_0x3da6cd(0x4d3)](_0x12333c=>new Promise(_0x352787=>{const _0x4b3b49=_0x3da6cd;if(_0x12333c[_0x4b3b49(0x373)]()){_0x352787();return;}let _0x934630=![];const _0xada6a3=()=>{if(_0x934630)return;_0x934630=!![];if(_0x3c55ef)clearTimeout(_0x3c55ef);_0x352787();};_0x12333c[_0x4b3b49(0x54e)](_0x4b3b49(0x5d6),_0xada6a3);const _0x3c55ef=setTimeout(()=>{const _0x159dd4=_0x4b3b49;try{_0x12333c[_0x159dd4(0x3a0)][_0x159dd4(0x5b2)]();}catch{}},_0xe9d7f2+0x1f4);_0x3c55ef[_0x4b3b49(0x2a1)]?.();try{_0x12333c[_0x4b3b49(0x3c5)]();}catch{try{_0x12333c[_0x4b3b49(0x3a0)][_0x4b3b49(0x5b2)]();}catch{}}})));}};return _0x18dc6e;}async function _0x22bda2({makeOkdb:_0x172f66,port:_0x1dfaa2}){const _0x5e809e=_0x45a43c,_0x122bc9=await _0x172f66();return _0x6f6ea0(_0x122bc9),_0x122bc9[_0x5e809e(0x4cb)][_0x5e809e(0x179)](_0x1dfaa2);}function _0x6f6ea0(_0x58f985){const _0x3b54c2=_0x45a43c;if(!_0x58f985||_0x58f985[_0x3b54c2(0x4a5)])return;_0x58f985[_0x3b54c2(0x4a5)]=!![];try{const {OKDBChangefeed:_0x52034a}=requireOkdbChangefeed(),_0x5d9abb=_0x58f985[_0x3b54c2(0x3d0)];if(_0x5d9abb&&typeof _0x5d9abb[_0x3b54c2(0x1ef)]===_0x3b54c2(0x310)){const _0x47bbf3=new _0x52034a(_0x58f985);_0x47bbf3['start'](),_0x5d9abb[_0x3b54c2(0x1ef)](_0x47bbf3),_0x58f985[_0x3b54c2(0x2f9)]=_0x47bbf3;}}catch(_0x124e54){_0x58f985[_0x3b54c2(0x18c)]?.[_0x3b54c2(0x33b)]?.(_0x3b54c2(0x1ae)+(_0x124e54?.[_0x3b54c2(0x141)]??_0x124e54),{'feature':_0x3b54c2(0x4c9)});}const _0x32c0bb=_0x56643a=>{const _0x1cb794=_0x3b54c2;if(!_0x56643a||typeof _0x56643a!==_0x1cb794(0x215)||_0x56643a[_0xb95c58]==null)return;if(_0x56643a[_0xb95c58]===_0x91343e)try{_0x58f985['_adminRelay']?.[_0x1cb794(0x26f)]?.(_0x56643a[_0x1cb794(0x37e)],_0x56643a['data']);}catch{}};process['on'](_0x3b54c2(0x141),_0x32c0bb),_0x58f985['_clusterOnMessage']=_0x32c0bb;{let _0x459554=process[_0x3b54c2(0x380)](),_0xfbaa87=Date[_0x3b54c2(0x477)]();const _0x2c65dc=()=>{const _0x4fe4a9=_0x3b54c2;if(typeof process[_0x4fe4a9(0x1e5)]!=='function'||!process[_0x4fe4a9(0x3e4)])return;const _0x1e16c1=Date[_0x4fe4a9(0x477)](),_0xcbbe91=process[_0x4fe4a9(0x380)](),_0x25414e=(_0x1e16c1-_0xfbaa87)*0x3e8,_0x39fcdf=_0xcbbe91[_0x4fe4a9(0x18d)]-_0x459554[_0x4fe4a9(0x18d)]+(_0xcbbe91[_0x4fe4a9(0x297)]-_0x459554['system']),_0x3aa9e0=_0x25414e>0x0?Math[_0x4fe4a9(0x4a0)](0x64,Math[_0x4fe4a9(0x2b6)](_0x39fcdf/(_0x25414e*(_0x428f76[_0x4fe4a9(0x35f)]()[_0x4fe4a9(0x1f7)]||0x1))*0x64)):0x0;_0x459554=_0xcbbe91,_0xfbaa87=_0x1e16c1;const _0xa1e566=process[_0x4fe4a9(0x2ae)]();let _0x314b2b=null;try{_0x314b2b=_0x58f985[_0x4fe4a9(0x30d)]?.['processors']?_0x58f985[_0x4fe4a9(0x12f)]?.[_0x4fe4a9(0x4db)]?.()??null:null;}catch{}try{process['send']({[_0xb95c58]:_0x59860b,'stats':{'rss':_0xa1e566[_0x4fe4a9(0x4e9)],'heapUsed':_0xa1e566[_0x4fe4a9(0x210)],'heapTotal':_0xa1e566[_0x4fe4a9(0x33f)],'external':_0xa1e566[_0x4fe4a9(0x4a9)],'cpuPct':_0x3aa9e0,'cpuWindowMs':Math[_0x4fe4a9(0x2b6)](_0x25414e/0x3e8)||null},'processing':_0x314b2b});}catch{}},_0x577f95=Math[_0x3b54c2(0x5bc)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x793047=setInterval(_0x2c65dc,_0x577f95);_0x793047['unref']?.(),_0x2c65dc();for(const _0x1129c0 of['processor:paused','processor:resumed']){_0x58f985[_0x3b54c2(0x521)]?.['on']?.(_0x1129c0,()=>{try{_0x2c65dc();}catch{}});}}let _0x3d5816=![];const _0x178f08=async _0x35052f=>{const _0x17fe6d=_0x3b54c2;if(_0x3d5816)return;_0x3d5816=!![];const _0xfa8a95=setTimeout(()=>process[_0x17fe6d(0x5d6)](_0x35052f),_0xe9d7f2);_0xfa8a95[_0x17fe6d(0x2a1)]?.();try{await _0x58f985[_0x17fe6d(0x10e)]?.();}catch{}process['exit'](_0x35052f);};process['on'](_0x3b54c2(0x3c5),()=>_0x178f08(0x0));if(process[_0x3b54c2(0x390)]!==_0x3b54c2(0x2ba)){const _0x1a1dd3=setInterval(()=>{if(process['ppid']===0x1)_0x178f08(0x0);},_0x51d3bd);_0x1a1dd3[_0x3b54c2(0x2a1)]?.(),_0x58f985['_clusterOrphanWatch']=_0x1a1dd3;}}return okdbCluster={'runClustered':_0x2e281a,'attachWorkerCluster':_0x6f6ea0},okdbCluster;}var hasRequiredOkdb;function _0x38fc(_0x2d8dad,_0x18c42f){_0x2d8dad=_0x2d8dad-0x106;const _0x100823=_0x1008();let _0x38fc99=_0x100823[_0x2d8dad];return _0x38fc99;}function requireOkdb(){const _0x37c3ae=_0x1577db;if(hasRequiredOkdb)return okdb$1;hasRequiredOkdb=0x1;try{process[_0x37c3ae(0x24d)]();}catch{}const _0x2abc66=require$$1,_0xcf23dc=require$$1$1,{resolveWorkers:_0x1824f1,isShmbufNative:_0x2d1b11}=requireOkdbWorkers();function _0x4fc2e8(_0x51f4e5){const _0x42a61b=_0x37c3ae,_0x54eee2=_0x51f4e5[_0x42a61b(0x19f)](0x2),_0x329c49={};let _0x3aec64=0x0;while(_0x3aec64<_0x54eee2['length']){const _0x3c231e=_0x54eee2[_0x3aec64];if(_0x3c231e===_0x42a61b(0x1e0)||_0x3c231e==='-p')_0x329c49[_0x42a61b(0x599)]=Number(_0x54eee2[++_0x3aec64]);else{if(_0x3c231e===_0x42a61b(0x4b9)||_0x3c231e==='-d')_0x329c49['path']=_0x54eee2[++_0x3aec64];else{if(_0x3c231e===_0x42a61b(0x4d6)||_0x3c231e==='-k')_0x329c49['key']=_0x54eee2[++_0x3aec64];else{if(_0x3c231e===_0x42a61b(0x307)||_0x3c231e==='-c')_0x329c49[_0x42a61b(0x142)]=_0x54eee2[++_0x3aec64];else{if(_0x3c231e===_0x42a61b(0x10b))_0x329c49[_0x42a61b(0x5a0)]=_0x54eee2[++_0x3aec64];else{if(_0x3c231e==='--no-repl')_0x329c49['noRepl']=!![];else{if(_0x3c231e===_0x42a61b(0x44c))_0x329c49[_0x42a61b(0x1b9)]=!![];else{if(_0x3c231e===_0x42a61b(0x195))_0x329c49[_0x42a61b(0x540)]=_0x54eee2[++_0x3aec64];else{if(_0x3c231e===_0x42a61b(0x167))_0x329c49['noCluster']=!![];else{if(_0x3c231e===_0x42a61b(0x206)||_0x3c231e==='-e')_0x329c49['env']=_0x54eee2[++_0x3aec64];else{if(_0x3c231e===_0x42a61b(0x4f6))_0x329c49['types']=_0x54eee2[++_0x3aec64];else{if(_0x3c231e===_0x42a61b(0x4fc))_0x329c49[_0x42a61b(0x240)]=!![];else{if(_0x3c231e===_0x42a61b(0x5e8))_0x329c49[_0x42a61b(0x173)]=!![];else{if(_0x3c231e===_0x42a61b(0x30b))_0x329c49['drop']=!![];else{if(_0x3c231e===_0x42a61b(0x4b2)){const _0x177348=[];while(_0x3aec64+0x1<_0x54eee2[_0x42a61b(0x1f7)]&&!_0x54eee2[_0x3aec64+0x1][_0x42a61b(0x5b6)]('--')){_0x177348['push'](_0x54eee2[++_0x3aec64]);}_0x329c49[_0x42a61b(0x1b3)]=_0x177348['length']>0x0?_0x177348:!![];}else{if(_0x3c231e===_0x42a61b(0x30e))_0x329c49['logRequests']=!![];else{if(_0x3c231e===_0x42a61b(0x29c))_0x329c49[_0x42a61b(0x3f6)]=_0x54eee2[++_0x3aec64];else{if(_0x3c231e==='--password')_0x329c49[_0x42a61b(0x5f6)]=_0x54eee2[++_0x3aec64];else{if(_0x3c231e===_0x42a61b(0x47d))_0x329c49[_0x42a61b(0x1da)]=_0x54eee2[++_0x3aec64];else{if(_0x3c231e==='--permissions')_0x329c49[_0x42a61b(0x135)]=_0x54eee2[++_0x3aec64];else{if(_0x3c231e==='--grants')_0x329c49[_0x42a61b(0x417)]=_0x54eee2[++_0x3aec64];else{if(_0x3c231e==='--ttl')_0x329c49[_0x42a61b(0x3bf)]=_0x54eee2[++_0x3aec64];else{if(_0x3c231e===_0x42a61b(0x26a))_0x329c49[_0x42a61b(0x233)]=_0x54eee2[++_0x3aec64];else{if(_0x3c231e===_0x42a61b(0x57e)||_0x3c231e==='-u')_0x329c49[_0x42a61b(0x396)]=_0x54eee2[++_0x3aec64];else{if(_0x3c231e===_0x42a61b(0x131))_0x329c49[_0x42a61b(0x560)]=_0x54eee2[++_0x3aec64];else{if(_0x3c231e===_0x42a61b(0x385)||_0x3c231e==='-v'){const _0x35f112=require$$3;console[_0x42a61b(0x18c)](_0x35f112['version']),process[_0x42a61b(0x5d6)](0x0);}else(_0x3c231e===_0x42a61b(0x1a3)||_0x3c231e==='-h')&&(_0x231779(),process[_0x42a61b(0x5d6)](0x0));}}}}}}}}}}}}}}}}}}}}}}}}}_0x3aec64++;}return _0x329c49;}function _0x231779(){const _0x588a0b=_0x37c3ae;console[_0x588a0b(0x18c)](_0x588a0b(0x19a));}const _0x1a5de7=new Set([_0x37c3ae(0x46a),'info',_0x37c3ae(0x33b),_0x37c3ae(0x54f)]);function _0x5a872d(_0x39be16){const _0x5543f7=_0x37c3ae,_0x2133e0=_0x39be16[_0x5543f7(0x142)]?_0x2abc66[_0x5543f7(0x547)](_0x39be16[_0x5543f7(0x142)]):_0x2abc66[_0x5543f7(0x547)](_0x5543f7(0x531));let _0x53db55={};if(_0xcf23dc['existsSync'](_0x2133e0))try{const _0x4f6e1f=_0xcf23dc[_0x5543f7(0x377)](_0x2133e0,_0x5543f7(0x2b8))[_0x5543f7(0x288)](/^\uFEFF/,'');_0x53db55=JSON[_0x5543f7(0x2bc)](_0x4f6e1f),console[_0x5543f7(0x18c)]('[okdb]\x20loaded\x20config:\x20'+_0x2133e0);}catch(_0x1b0a64){console[_0x5543f7(0x54f)](_0x5543f7(0x4da)+_0x2133e0+':\x20'+_0x1b0a64['message']),process[_0x5543f7(0x5d6)](0x1);}const _0x25a85e={'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},_0x4a4b7a={'port':_0x39be16[_0x5543f7(0x599)]??_0x53db55['port']??_0x25a85e[_0x5543f7(0x599)]??0x2124,'dbPath':_0x39be16[_0x5543f7(0x242)]??_0x53db55[_0x5543f7(0x242)]??_0x25a85e[_0x5543f7(0x242)]??_0x5543f7(0x316),'key':_0x39be16[_0x5543f7(0x4be)]??_0x53db55['key']??_0x25a85e['key']??undefined,'logLevel':_0x39be16['logLevel']??_0x53db55['logLevel']??_0x25a85e[_0x5543f7(0x5a0)]??_0x5543f7(0x296),'noRepl':_0x39be16['noRepl']??_0x53db55[_0x5543f7(0x1bb)]??_0x25a85e[_0x5543f7(0x1bb)]??![],'noAdmin':_0x39be16['noAdmin']??_0x53db55[_0x5543f7(0x1b9)]??_0x25a85e[_0x5543f7(0x1b9)]??![],'admin':_0x53db55[_0x5543f7(0x46e)]??{},'api':_0x53db55[_0x5543f7(0x572)]??undefined,'auth':_0x53db55[_0x5543f7(0x529)]??undefined,'mcp':_0x53db55['mcp']??undefined,'http':_0x53db55[_0x5543f7(0x4cb)]??undefined,'timeMachine':_0x53db55[_0x5543f7(0x556)]!==![]?_0x53db55[_0x5543f7(0x556)]??{}:![]};if(_0x39be16[_0x5543f7(0x49b)])_0x4a4b7a['noCluster']=!![];if(_0x39be16[_0x5543f7(0x540)]!==undefined)_0x4a4b7a[_0x5543f7(0x180)]=_0x39be16['workers'];return _0x39be16[_0x5543f7(0x1b3)]!==undefined&&(_0x4a4b7a[_0x5543f7(0x529)]=_0x4a4b7a[_0x5543f7(0x529)]||{},_0x4a4b7a['auth'][_0x5543f7(0x1b3)]=_0x39be16[_0x5543f7(0x1b3)]),_0x39be16[_0x5543f7(0x519)]&&(_0x4a4b7a[_0x5543f7(0x46a)]=_0x4a4b7a[_0x5543f7(0x46a)]||{},_0x4a4b7a[_0x5543f7(0x46a)]['logRequests']=!![]),(!Number[_0x5543f7(0x1c4)](_0x4a4b7a[_0x5543f7(0x599)])||_0x4a4b7a[_0x5543f7(0x599)]<0x1||_0x4a4b7a['port']>0xffff)&&(console[_0x5543f7(0x54f)](_0x5543f7(0x34d)+_0x4a4b7a[_0x5543f7(0x599)]+'\x20(must\x20be\x201–65535)'),process[_0x5543f7(0x5d6)](0x1)),!_0x1a5de7['has'](_0x4a4b7a['logLevel'])&&(console[_0x5543f7(0x54f)]('[okdb]\x20invalid\x20log\x20level:\x20\x22'+_0x4a4b7a[_0x5543f7(0x5a0)]+_0x5543f7(0x524)),process[_0x5543f7(0x5d6)](0x1)),_0x4a4b7a;}function _0x31e754(_0x4c7355){const _0x452379=_0x37c3ae;return!!(_0x4c7355&&typeof _0x4c7355===_0x452379(0x215)&&!Array[_0x452379(0x14b)](_0x4c7355)&&Object[_0x452379(0x59d)](_0x4c7355)[_0x452379(0x1f7)]>0x0);}function _0x302a0d(_0x3259d0){const _0x264a24=_0x37c3ae;return{..._0x3259d0[_0x264a24(0x4be)]?{'encryptionKey':_0x3259d0[_0x264a24(0x4be)]}:{},'engines':![],'processors':![],'compaction':![]};}const _0x1e17b7=!process['stdout']['isTTY']||!!process.env.NO_COLOR;function _0x1dbc91(_0x4f87af,_0x353c9c){const _0x392313=_0x37c3ae;return _0x1e17b7?_0x353c9c:'\x1b['+_0x4f87af+'m'+_0x353c9c+_0x392313(0x476);}function _0x4ce8a0(_0x250c3a){const _0x38a592=_0x37c3ae;if(!_0x250c3a||_0x250c3a[_0x38a592(0x1f7)]===0x0)return;const _0x1ecaeb='─'['repeat'](0x38);process[_0x38a592(0x29d)][_0x38a592(0x340)]('\x0a'),process[_0x38a592(0x29d)]['write'](_0x1dbc91('33','\x20\x20⚠\x20\x20'+_0x250c3a[_0x38a592(0x1f7)]+_0x38a592(0x5df)+(_0x250c3a[_0x38a592(0x1f7)]>0x1?'S':'')+'\x0a')),process[_0x38a592(0x29d)]['write']('\x20\x20'+_0x1ecaeb+'\x0a');for(const _0x10091d of _0x250c3a){const _0x621756=_0x10091d[_0x38a592(0x187)]===_0x38a592(0x54f)?_0x1dbc91('31',_0x38a592(0x147)):_0x1dbc91('33',_0x38a592(0x1d6));process['stderr']['write'](_0x621756+'\x20\x20'+_0x1dbc91('1',_0x10091d[_0x38a592(0x3de)])+'\x0a'),process[_0x38a592(0x29d)][_0x38a592(0x340)](_0x38a592(0x294)+_0x10091d[_0x38a592(0x141)]+'\x0a');if(_0x10091d['hint'])process[_0x38a592(0x29d)][_0x38a592(0x340)]('\x20\x20\x20\x20\x20\x20\x20'+_0x1dbc91('2',_0x38a592(0x13c)+_0x10091d[_0x38a592(0x4ab)])+'\x0a');process[_0x38a592(0x29d)][_0x38a592(0x340)]('\x0a');}process[_0x38a592(0x29d)]['write']('\x20\x20'+_0x1ecaeb+'\x0a\x0a');}function _0x464e3(_0x7cd688,_0x36d1f4,_0x3cca35={}){const _0x5da68f=_0x37c3ae,_0x5f2604=_0x7cd688['http'][_0x5da68f(0x179)](_0x36d1f4,_0x3cca35);if(_0x5f2604&&_0x5f2604[_0x5da68f(0x511)])return Promise['resolve'](_0x5f2604);return new Promise((_0x2697c9,_0x137a67)=>{const _0x24cadc=_0x5da68f;_0x5f2604[_0x24cadc(0x54e)](_0x24cadc(0x2ac),_0x2697c9),_0x5f2604[_0x24cadc(0x54e)]('error',_0x137a67);});}async function _0x539e8d(_0x25b904){const _0x5e43be=_0x37c3ae,_0x342464=require$$4$1;console[_0x5e43be(0x18c)]('\x0a\x20\x20okdb\x20doctor\x0a');let _0x41b8db=!![];const _0x5d055d=(_0x1482c4,_0x2e02fa)=>{const _0x4df1a5=_0x5e43be;console[_0x4df1a5(0x18c)]('\x20\x20'+(_0x1482c4?'✓':'✗')+'\x20'+_0x2e02fa);if(!_0x1482c4)_0x41b8db=![];},_0x3db442=Number(process[_0x5e43be(0x13f)][_0x5e43be(0x288)]('v','')[_0x5e43be(0x1be)]('.')[0x0]);_0x5d055d(_0x3db442>=0x12,'node\x20'+process[_0x5e43be(0x13f)]+(_0x3db442<0x12?_0x5e43be(0x4a7):''));const _0x55d642=_0x2abc66[_0x5e43be(0x547)](_0x25b904[_0x5e43be(0x56a)]);try{_0xcf23dc[_0x5e43be(0x34c)](_0x55d642,{'recursive':!![]});const _0x351925=_0x2abc66[_0x5e43be(0x24f)](_0x55d642,_0x5e43be(0x59a));_0xcf23dc[_0x5e43be(0x5b5)](_0x351925,''),_0xcf23dc[_0x5e43be(0x4b4)](_0x351925),_0x5d055d(!![],'database\x20path\x20writable:\x20'+_0x55d642);}catch(_0x3e1abc){_0x5d055d(![],_0x5e43be(0x239)+_0x55d642+'\x20\x20('+_0x3e1abc[_0x5e43be(0x141)]+')');}const _0x35fd6d=await new Promise(_0x18dfc9=>{const _0x365706=_0x5e43be,_0xd9a8b6=_0x342464[_0x365706(0x3f8)]();_0xd9a8b6[_0x365706(0x54e)]('error',()=>_0x18dfc9(![])),_0xd9a8b6[_0x365706(0x54e)](_0x365706(0x2ac),()=>{const _0x1a0a3f=_0x365706;_0xd9a8b6[_0x1a0a3f(0x10e)](),_0x18dfc9(!![]);}),_0xd9a8b6[_0x365706(0x179)](_0x25b904[_0x365706(0x599)],_0x365706(0x265));});_0x5d055d(_0x35fd6d,_0x5e43be(0x481)+_0x25b904[_0x5e43be(0x599)]+'\x20'+(_0x35fd6d?'available':'already\x20in\x20use'));const _0x2f7e04=_0x2abc66[_0x5e43be(0x547)](_0x5e43be(0x531));if(_0xcf23dc[_0x5e43be(0x53b)](_0x2f7e04))try{JSON[_0x5e43be(0x2bc)](_0xcf23dc[_0x5e43be(0x377)](_0x2f7e04,_0x5e43be(0x2b8))[_0x5e43be(0x288)](/^\uFEFF/,'')),_0x5d055d(!![],_0x5e43be(0x5d8)+_0x2f7e04);}catch(_0x355706){_0x5d055d(![],'config\x20file\x20invalid:\x20'+_0x355706[_0x5e43be(0x141)]);}else _0x5d055d(!![],_0x5e43be(0x350));if(_0x2d1b11()){const _0x483424=_0x1824f1(_0x25b904,{'shmbufNative':!![]});_0x5d055d(!![],'cluster:\x20ready\x20('+_0x483424+'\x20worker'+(_0x483424===0x1?'':'s')+')');}else _0x5d055d(!![],'cluster:\x20unavailable\x20(shmbuf\x20native\x20missing)\x20—\x20running\x20single-process');if(!_0x35fd6d)try{const _0x29ecc3=require(_0x5e43be(0x543)),_0x16cb54=new _0x29ecc3(_0x55d642,{'engines':![],'processors':![],'compaction':![],'http':![],'auth':{'open':!![]}});await _0x16cb54['open']();try{await _0x16cb54[_0x5e43be(0x12f)][_0x5e43be(0x1b3)]({'reader':!![]});const _0x2e2435=_0x16cb54[_0x5e43be(0x12f)][_0x5e43be(0x39f)](),_0x24bd0c=_0x2e2435['filter'](_0x3a2fd0=>_0x3a2fd0['supervisorKey']!=null)[_0x5e43be(0x1f7)];_0x5d055d(!![],_0x5e43be(0x559)+_0x2e2435[_0x5e43be(0x1f7)]+_0x5e43be(0x1c3)+(_0x2e2435['length']===0x1?'':'es')+'\x20('+_0x24bd0c+_0x5e43be(0x4c1));}finally{await _0x16cb54[_0x5e43be(0x10e)]();}}catch{}console[_0x5e43be(0x18c)](''),_0x41b8db?console[_0x5e43be(0x18c)](_0x5e43be(0x347)):(console[_0x5e43be(0x18c)](_0x5e43be(0x5e9)),process[_0x5e43be(0x5d6)](0x1));}async function _0x49f7b9(){const _0x3a7933=_0x37c3ae,_0x2f6870=_0x2abc66['resolve']('.kdbconfig');!_0xcf23dc[_0x3a7933(0x53b)](_0x2f6870)?(_0xcf23dc[_0x3a7933(0x5b5)](_0x2f6870,JSON['stringify']({'port':0x2124,'path':'./okdb-data','logLevel':_0x3a7933(0x296),'noRepl':![],'noAdmin':![]},null,0x2)+'\x0a'),console[_0x3a7933(0x18c)]('[okdb]\x20created\x20.kdbconfig')):console[_0x3a7933(0x18c)](_0x3a7933(0x168));const _0x17ffd0=_0x2abc66[_0x3a7933(0x547)](_0x3a7933(0x316));!_0xcf23dc[_0x3a7933(0x53b)](_0x17ffd0)?(_0xcf23dc[_0x3a7933(0x34c)](_0x17ffd0,{'recursive':!![]}),console[_0x3a7933(0x18c)](_0x3a7933(0x42c))):console[_0x3a7933(0x18c)](_0x3a7933(0x503)),console['log'](_0x3a7933(0x3ef));}async function _0x49350c(_0x833f9b){const _0x13cbf3=_0x37c3ae,_0x321457=_0x2abc66[_0x13cbf3(0x547)](_0x833f9b['dbPath']);if(!_0xcf23dc[_0x13cbf3(0x53b)](_0x321457)){console[_0x13cbf3(0x18c)](_0x13cbf3(0x3a4)+_0x321457+_0x13cbf3(0x437));return;}const _0x310ecd=require$$0$3,_0x415873=_0x310ecd[_0x13cbf3(0x4ac)]({'input':process['stdin'],'output':process[_0x13cbf3(0x589)]}),_0x211ca4=await new Promise(_0x1f67fd=>_0x415873[_0x13cbf3(0x186)](_0x13cbf3(0x3a6)+_0x321457+'?\x0a\x20\x20(node\x20identity\x20and\x20licenses\x20are\x20preserved)\x0a\x20\x20Type\x20\x22yes\x22\x20to\x20confirm:\x20',_0x1f67fd));_0x415873[_0x13cbf3(0x10e)](),console[_0x13cbf3(0x18c)]('');if(_0x211ca4[_0x13cbf3(0x25d)]()[_0x13cbf3(0x402)]()!=='yes'){console[_0x13cbf3(0x18c)]('[okdb]\x20reset\x20aborted');return;}let _0x3a8460=null;try{_0x3a8460=await _0x250dbd(_0x321457,_0x833f9b,async _0x133b3b=>{const _0x359f3c=_0x13cbf3,_0x14ae88=_0x133b3b[_0x359f3c(0x320)],_0x2d0188=_0x14ae88?.['db']?.['get'](_0x359f3c(0x592))??null,_0x153c8e=[];if(_0x14ae88?.[_0x359f3c(0x4bf)](_0x359f3c(0x4e8)))for(const {key:_0x5c0a70,value:_0x4274aa}of _0x14ae88[_0x359f3c(0x5f9)](_0x359f3c(0x4e8))){_0x153c8e[_0x359f3c(0x38d)]({'key':_0x5c0a70,'value':_0x4274aa});}return{'identity':_0x2d0188,'licenses':_0x153c8e};});}catch(_0x3e6eeb){console[_0x13cbf3(0x18c)](_0x13cbf3(0x35e)+_0x3e6eeb['message']+')\x20—\x20they\x20will\x20NOT\x20be\x20preserved');}_0xcf23dc['rmSync'](_0x321457,{'recursive':!![],'force':!![]}),console[_0x13cbf3(0x18c)]('[okdb]\x20reset:\x20'+_0x321457+'\x20deleted');if(_0x3a8460&&(_0x3a8460['identity']||_0x3a8460['licenses'][_0x13cbf3(0x1f7)]>0x0))try{await _0x250dbd(_0x321457,_0x833f9b,async _0x188c3d=>{const _0xee6fbd=_0x13cbf3,_0xe9887b=_0x188c3d[_0xee6fbd(0x320)];_0x3a8460[_0xee6fbd(0x241)]&&_0xe9887b['db'][_0xee6fbd(0x1f3)](_0xee6fbd(0x592),_0x3a8460[_0xee6fbd(0x241)]);if(_0x3a8460[_0xee6fbd(0x548)][_0xee6fbd(0x1f7)]>0x0){if(!_0xe9887b[_0xee6fbd(0x4bf)]('~licenses'))await _0xe9887b[_0xee6fbd(0x5d9)](_0xee6fbd(0x4e8));for(const {key:_0x4088a2,value:_0xa0a3ed}of _0x3a8460[_0xee6fbd(0x548)]){await _0xe9887b[_0xee6fbd(0x423)](_0xee6fbd(0x4e8),_0x4088a2,_0xa0a3ed);}}});const _0xa07a2e=[];if(_0x3a8460['identity'])_0xa07a2e['push'](_0x13cbf3(0x1f2));if(_0x3a8460['licenses']['length']>0x0)_0xa07a2e[_0x13cbf3(0x38d)](_0x3a8460[_0x13cbf3(0x548)][_0x13cbf3(0x1f7)]+'\x20license(s)');console[_0x13cbf3(0x18c)]('[okdb]\x20preserved:\x20'+_0xa07a2e['join']('\x20+\x20'));}catch(_0x49359c){console[_0x13cbf3(0x18c)](_0x13cbf3(0x4c7)+_0x49359c['message']);}}async function _0x250dbd(_0x1d5653,_0x466cc5,_0x11d964){const _0x45b85f=_0x37c3ae,_0x50245e=require$$5,_0x4e10b9=new _0x50245e(_0x1d5653,{'admin':![],'mcp':![],'http':![],'timeMachine':![],'engines':![],'processors':![],'compaction':![],'_skipBootRuntime':!![],..._0x302a0d(_0x466cc5)});await _0x4e10b9[_0x45b85f(0x1b3)]();try{return await _0x11d964(_0x4e10b9);}finally{await _0x4e10b9[_0x45b85f(0x10e)]();}}async function _0x449ec6(_0x445be0,_0x467174){const _0x407ad9=_0x37c3ae,_0x432a02=require$$5,_0x51b2e2=_0x2abc66['resolve'](_0x467174['dbPath']);console[_0x407ad9(0x18c)]('[okdb]\x20opening\x20'+_0x51b2e2+'…');const _0x438b56=new _0x432a02(_0x51b2e2,_0x302a0d(_0x467174));await _0x438b56[_0x407ad9(0x1b3)](),console['log'](_0x407ad9(0x2e2)+_0x445be0+'…');const {envs:_0xfcd7d7}=await _0x438b56[_0x407ad9(0x46d)][_0x407ad9(0x3af)](_0x445be0);for(const _0x5bd326 of _0xfcd7d7){const _0xafc09a=_0x5bd326[_0x407ad9(0x3c6)]>0x0?_0x407ad9(0x2c3)+(_0x5bd326[_0x407ad9(0x3c6)]/0x400/0x400)[_0x407ad9(0x4cc)](0x2)+_0x407ad9(0x2a0)+(_0x5bd326['sizeAfter']/0x400/0x400)['toFixed'](0x2)+'\x20MB)':'';console['log']('\x20\x20✓\x20'+_0x5bd326[_0x407ad9(0x3f6)]+'\x20\x20→\x20\x20'+_0x5bd326[_0x407ad9(0x37b)]+_0xafc09a);}await _0x438b56[_0x407ad9(0x10e)](),console[_0x407ad9(0x18c)](_0x407ad9(0x36e));}async function _0xe65381(_0x4f4497,_0x53d171,_0x56379f){const _0x15adf5=_0x37c3ae,_0x244995=require$$5,_0x5c2273=_0x2abc66[_0x15adf5(0x547)](_0x53d171[_0x15adf5(0x56a)]),_0x12cee9=_0x56379f['env']??_0x15adf5(0x453),_0x49367f=_0x56379f[_0x15adf5(0x22e)]?_0x56379f[_0x15adf5(0x22e)][_0x15adf5(0x1be)](',')[_0x15adf5(0x4d3)](_0x5294fb=>_0x5294fb['trim']()):null;console['log'](_0x15adf5(0x2ef)+_0x5c2273+'…');const _0x5af2e3=new _0x244995(_0x5c2273,_0x302a0d(_0x53d171));await _0x5af2e3[_0x15adf5(0x1b3)](),console['log'](_0x15adf5(0x51b)+_0x12cee9+_0x15adf5(0x1c5)+_0x4f4497+'…');const _0x2ec43f=await _0x5af2e3[_0x15adf5(0x46d)][_0x15adf5(0x160)](_0x4f4497,{'envName':_0x12cee9,'types':_0x49367f,'includeChanges':!!_0x56379f[_0x15adf5(0x240)]});console[_0x15adf5(0x18c)](_0x15adf5(0x287)+_0x2ec43f['types']+_0x15adf5(0x19d)+_0x2ec43f['records']+'\x20\x20changes='+_0x2ec43f[_0x15adf5(0x240)]);if(_0x56379f[_0x15adf5(0x173)]){const _0x4a74e6=_0x2abc66[_0x15adf5(0x24f)](_0x2abc66[_0x15adf5(0x46f)](_0x4f4497),_0x15adf5(0x173));process[_0x15adf5(0x589)][_0x15adf5(0x340)](_0x15adf5(0x5b7));const {count:_0x5cd325,bytes:_0x1d254c}=await _0x5af2e3[_0x15adf5(0x46d)][_0x15adf5(0x22d)](_0x4a74e6);console[_0x15adf5(0x18c)](_0x15adf5(0x1dd)+_0x4a74e6+'\x20\x20('+_0x5cd325+_0x15adf5(0x5ea)+(_0x5cd325!==0x1?'s':'')+',\x20'+(_0x1d254c/0x400/0x400)[_0x15adf5(0x4cc)](0x2)+'\x20MB)');}await _0x5af2e3['close'](),console[_0x15adf5(0x18c)](_0x15adf5(0x22f));}async function _0x389d48(_0x80c666,_0x56627b,_0x4450ba){const _0x32bd7a=_0x37c3ae,_0x500d77=require$$5,_0x5c7afd=_0x2abc66[_0x32bd7a(0x547)](_0x56627b[_0x32bd7a(0x56a)]),_0x4c14f1=_0x4450ba[_0x32bd7a(0x2c2)]??null,_0x4ca9c6=_0x4450ba[_0x32bd7a(0x22e)]?_0x4450ba[_0x32bd7a(0x22e)][_0x32bd7a(0x1be)](',')[_0x32bd7a(0x4d3)](_0x2085e4=>_0x2085e4[_0x32bd7a(0x25d)]()):null,_0x2a02bd=!!_0x4450ba[_0x32bd7a(0x4d0)];console[_0x32bd7a(0x18c)](_0x32bd7a(0x2ef)+_0x5c7afd+'…');const _0x495c35=new _0x500d77(_0x5c7afd,_0x302a0d(_0x56627b));await _0x495c35[_0x32bd7a(0x1b3)](),console[_0x32bd7a(0x18c)]('[okdb]\x20importing\x20'+_0x80c666+'…');const _0x3a8639=await _0x495c35[_0x32bd7a(0x46d)][_0x32bd7a(0x207)](_0x80c666,{'envName':_0x4c14f1,'types':_0x4ca9c6,'dropExisting':_0x2a02bd,'includeChanges':!!_0x4450ba['changes'],'onProgress':({type:_0x1c430a,count:_0x5e0433})=>{const _0x4e90f9=_0x32bd7a;process[_0x4e90f9(0x589)][_0x4e90f9(0x340)](_0x4e90f9(0x4f4)+_0x1c430a+':\x20'+_0x5e0433+_0x4e90f9(0x2b1));}});process[_0x32bd7a(0x589)][_0x32bd7a(0x340)]('\x0a'),console[_0x32bd7a(0x18c)](_0x32bd7a(0x3ee)+_0x3a8639[_0x32bd7a(0x22e)]+_0x32bd7a(0x19d)+_0x3a8639[_0x32bd7a(0x442)]+_0x32bd7a(0x3d8)+_0x3a8639[_0x32bd7a(0x240)]);if(_0x4450ba[_0x32bd7a(0x173)]){const _0x3d5073=_0x2abc66['join'](_0x2abc66['dirname'](_0x80c666),_0x32bd7a(0x173));if(_0xcf23dc[_0x32bd7a(0x53b)](_0x3d5073)){const {imported:_0x1b67c0,skipped:_0xf0227a}=await _0x495c35[_0x32bd7a(0x46d)]['importBlobs'](_0x3d5073);console[_0x32bd7a(0x18c)](_0x32bd7a(0x372)+_0x1b67c0+_0x32bd7a(0x5d2)+_0xf0227a);}}await _0x495c35[_0x32bd7a(0x10e)](),console['log'](_0x32bd7a(0x4c5));}async function _0x5b5ad7(_0x13ffb9,_0x18c3c3){const _0x430483=_0x37c3ae;_0x18c3c3[_0x430483(0x5f6)]&&!_0x18c3c3['name']&&(console[_0x430483(0x54f)](_0x430483(0x21c)),process[_0x430483(0x5d6)](0x1));const _0x4dc4c7=_0x18c3c3['permissions']?_0x18c3c3[_0x430483(0x135)]['split'](',')[_0x430483(0x4d3)](_0xe14097=>_0xe14097['trim']())['filter'](Boolean):[];let _0x159cba={};if(_0x18c3c3[_0x430483(0x417)])try{_0x159cba=JSON[_0x430483(0x2bc)](_0x18c3c3[_0x430483(0x417)]);if(typeof _0x159cba!==_0x430483(0x215)||Array[_0x430483(0x14b)](_0x159cba)||_0x159cba===null)throw new Error();}catch{console[_0x430483(0x54f)](_0x430483(0x4a2)),process[_0x430483(0x5d6)](0x1);}const _0xce54f2=require$$5,{randomToken:_0x3cead5,hashToken:_0x4ec05b,hashPassword:_0x1c4501}=requireOkdbAuthTokens(),_0x46fd27=require$$0$1,_0x10d25b=_0x2abc66['resolve'](_0x13ffb9[_0x430483(0x56a)]),_0x35f19d=new _0xce54f2(_0x10d25b,_0x302a0d(_0x13ffb9));await _0x35f19d[_0x430483(0x1b3)]();try{await _0x35f19d[_0x430483(0x529)][_0x430483(0x33d)]();if(_0x18c3c3[_0x430483(0x3f6)]){const _0x24e165=await _0x35f19d[_0x430483(0x529)]['_lookupByName'](_0x18c3c3['name']);_0x24e165&&(console[_0x430483(0x54f)](_0x430483(0x5d4)+_0x18c3c3[_0x430483(0x3f6)]+'\x22\x20already\x20exists'),process[_0x430483(0x5d6)](0x1));}const _0x3c1393=_0x3cead5(0x20),_0x2bc789=_0x4ec05b(_0x3c1393),_0x782226=_0x18c3c3[_0x430483(0x5f6)]?await _0x1c4501(_0x18c3c3['password']):null,_0x2a1cb1=_0x46fd27[_0x430483(0x226)](),_0x312a4b={'tokenHash':_0x2bc789,'name':_0x18c3c3[_0x430483(0x3f6)]||null,'passwordHash':_0x782226,'label':_0x18c3c3[_0x430483(0x1da)]||null,'permissions':_0x4dc4c7,'grants':_0x159cba,'createdAt':Date[_0x430483(0x477)](),'lastUsedAt':null},_0x403edf=_0x18c3c3['ttl']?{'ttl':Number(_0x18c3c3[_0x430483(0x3bf)])}:undefined;await _0x35f19d[_0x430483(0x320)][_0x430483(0x423)]('~tokens',_0x2a1cb1,_0x312a4b,_0x403edf),console[_0x430483(0x18c)](_0x430483(0x274)),console[_0x430483(0x18c)](_0x430483(0x5e0)+_0x2a1cb1),console[_0x430483(0x18c)](_0x430483(0x44f)+(_0x18c3c3[_0x430483(0x3f6)]||_0x430483(0x16b))),console[_0x430483(0x18c)](_0x430483(0x32d)+(_0x18c3c3[_0x430483(0x1da)]||_0x430483(0x16b))),console[_0x430483(0x18c)](_0x430483(0x3f4)+(_0x4dc4c7[_0x430483(0x24f)](',\x20')||_0x430483(0x5f7))),console[_0x430483(0x18c)](_0x430483(0x557)),console['log'](_0x430483(0x597)+_0x3c1393+'\x0a');}finally{await _0x35f19d[_0x430483(0x10e)]();}}async function _0x56035c(_0x394c5d){const _0x3c4e2f=_0x37c3ae,_0xc3dab5=require$$5,_0x25d041=_0x2abc66[_0x3c4e2f(0x547)](_0x394c5d[_0x3c4e2f(0x56a)]),_0x28944c=new _0xc3dab5(_0x25d041,_0x302a0d(_0x394c5d));await _0x28944c[_0x3c4e2f(0x1b3)]();try{const _0x313168=_0x28944c[_0x3c4e2f(0x320)];if(!_0x313168||!_0x313168[_0x3c4e2f(0x4bf)](_0x3c4e2f(0x1ba))){console[_0x3c4e2f(0x18c)](_0x3c4e2f(0x489));return;}const _0xd066f0=[];for(const {key:_0x275d1a,value:_0x59bb9f}of _0x313168[_0x3c4e2f(0x5f9)](_0x3c4e2f(0x1ba))){_0xd066f0[_0x3c4e2f(0x38d)]({'id':_0x275d1a,'name':_0x59bb9f[_0x3c4e2f(0x3f6)]||'(unset)','label':_0x59bb9f[_0x3c4e2f(0x1da)]||'(unset)','permissions':Array[_0x3c4e2f(0x14b)](_0x59bb9f[_0x3c4e2f(0x135)])?_0x59bb9f[_0x3c4e2f(0x135)][_0x3c4e2f(0x24f)](','):'','created':_0x59bb9f['createdAt']?new Date(_0x59bb9f['createdAt'])[_0x3c4e2f(0x5c7)]()[_0x3c4e2f(0x19f)](0x0,0xa):''});}if(_0xd066f0['length']===0x0){console['log'](_0x3c4e2f(0x489));return;}const _0x4b49fe=!process['stdout']['columns']||process[_0x3c4e2f(0x589)][_0x3c4e2f(0x134)]>=0x64,_0x5a5360=_0x4b49fe?0x24:0xa,_0x1d0813=['ID'[_0x3c4e2f(0x57b)](_0x5a5360),_0x3c4e2f(0x430)['padEnd'](0x10),_0x3c4e2f(0x37c)[_0x3c4e2f(0x57b)](0x14),_0x3c4e2f(0x4e7)[_0x3c4e2f(0x57b)](0x14),_0x3c4e2f(0x41e)]['join']('\x20\x20');console[_0x3c4e2f(0x18c)]('\x0a'+_0x1d0813),console['log']('-'[_0x3c4e2f(0x4b0)](_0x1d0813['length']));for(const _0x4f4d2b of _0xd066f0){const _0x4d4c9f=_0x4b49fe?_0x4f4d2b['id']:_0x4f4d2b['id'][_0x3c4e2f(0x19f)](0x0,0x8)+'…';console[_0x3c4e2f(0x18c)]([_0x4d4c9f['padEnd'](_0x5a5360),_0x4f4d2b[_0x3c4e2f(0x3f6)][_0x3c4e2f(0x19f)](0x0,0x10)['padEnd'](0x10),_0x4f4d2b[_0x3c4e2f(0x1da)][_0x3c4e2f(0x19f)](0x0,0x14)[_0x3c4e2f(0x57b)](0x14),_0x4f4d2b['permissions'][_0x3c4e2f(0x19f)](0x0,0x14)[_0x3c4e2f(0x57b)](0x14),_0x4f4d2b[_0x3c4e2f(0x45d)]]['join']('\x20\x20'));}console[_0x3c4e2f(0x18c)]('');}finally{await _0x28944c[_0x3c4e2f(0x10e)]();}}async function _0x5cee89(_0x3820a5,_0x45440d){const _0x5ed501=_0x37c3ae;!_0x3820a5&&(console[_0x5ed501(0x54f)](_0x5ed501(0x421)),process[_0x5ed501(0x5d6)](0x1));const _0x1d175a=require$$5,_0x5e3ff7=_0x2abc66['resolve'](_0x45440d['dbPath']),_0x344205=new _0x1d175a(_0x5e3ff7,_0x302a0d(_0x45440d));await _0x344205[_0x5ed501(0x1b3)]();try{const _0x3dd8af=_0x344205['_systemEnv'];(!_0x3dd8af||!_0x3dd8af['hasType'](_0x5ed501(0x1ba)))&&(console[_0x5ed501(0x54f)](_0x5ed501(0x158)+_0x3820a5+'\x22'),process[_0x5ed501(0x5d6)](0x1));let _0x1829d2=null,_0x3b1d7c=null;const _0x4e161d=_0x3dd8af[_0x5ed501(0x2e5)](_0x5ed501(0x1ba),_0x3820a5);if(_0x4e161d)_0x1829d2=_0x3820a5,_0x3b1d7c=_0x4e161d;else{const _0x6ae0a=[];for(const {key:_0x4852ed,value:_0x307454}of _0x3dd8af[_0x5ed501(0x5f9)]('~tokens')){if(_0x4852ed[_0x5ed501(0x5b6)](_0x3820a5))_0x6ae0a[_0x5ed501(0x38d)]({'key':_0x4852ed,'value':_0x307454});}_0x6ae0a[_0x5ed501(0x1f7)]===0x0&&(console[_0x5ed501(0x54f)]('[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22'+_0x3820a5+'\x22'),process[_0x5ed501(0x5d6)](0x1));if(_0x6ae0a[_0x5ed501(0x1f7)]>0x1){console['error']('[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22'+_0x3820a5+_0x5ed501(0x360)+_0x6ae0a[_0x5ed501(0x1f7)]+'\x20tokens:');for(const _0x27dcd7 of _0x6ae0a){console[_0x5ed501(0x54f)]('\x20\x20'+_0x27dcd7['key']+'\x20\x20(name:\x20'+(_0x27dcd7[_0x5ed501(0x32f)][_0x5ed501(0x3f6)]||'(unset)')+')');}process[_0x5ed501(0x5d6)](0x1);}_0x1829d2=_0x6ae0a[0x0][_0x5ed501(0x4be)],_0x3b1d7c=_0x6ae0a[0x0][_0x5ed501(0x32f)];}await _0x3dd8af['remove'](_0x5ed501(0x1ba),_0x1829d2),console[_0x5ed501(0x18c)](_0x5ed501(0x577)+_0x1829d2+_0x5ed501(0x367)+(_0x3b1d7c[_0x5ed501(0x3f6)]||_0x5ed501(0x16b))+_0x5ed501(0x558)+(_0x3b1d7c[_0x5ed501(0x1da)]||_0x5ed501(0x16b))+')');}finally{await _0x344205[_0x5ed501(0x10e)]();}}function _0x452298(_0x3706b3,_0x443ecc){const _0x593834=_0x37c3ae;if(!_0x3706b3[_0x593834(0x398)])return _0x593834(0x2c8);const _0x1e22fb=_0x3706b3['expiresAt'];if(!_0x1e22fb)return _0x593834(0x50c);if(_0x443ecc>_0x1e22fb)return _0x593834(0x28f);return _0x593834(0x50c);}function _0x5b39e5(_0x49ca3c){const _0x2bea93=_0x37c3ae;if(!_0x49ca3c||typeof _0x49ca3c!==_0x2bea93(0x215))return'';const _0x500360=Object[_0x2bea93(0x2fb)](_0x49ca3c)[_0x2bea93(0x43d)](([,_0x4e3ebe])=>_0x4e3ebe)[_0x2bea93(0x4d3)](([_0x3f88d6])=>_0x3f88d6);if(_0x500360[_0x2bea93(0x1f7)]===0x0)return _0x2bea93(0x5f7);if(_0x500360['length']<=0x3)return _0x500360[_0x2bea93(0x24f)]('\x20');return _0x500360['slice'](0x0,0x3)[_0x2bea93(0x24f)]('\x20')+('\x20+'+(_0x500360[_0x2bea93(0x1f7)]-0x3));}async function _0x403486(_0x1e50b0){const _0x1d6a1e=_0x37c3ae,_0x464aaa=require$$5,_0x3bbf1f=requireOkdbLicenseCodec(),{_C:_0x43e08f}=requireOkdbLicense(),_0x5538f4=_0x2abc66[_0x1d6a1e(0x547)](_0x1e50b0['dbPath']),_0x31a0f4=new _0x464aaa(_0x5538f4,_0x302a0d(_0x1e50b0));await _0x31a0f4[_0x1d6a1e(0x1b3)]();try{const _0x1d19dd=_0x31a0f4[_0x1d6a1e(0x320)],_0x160066=_0x1d19dd?.['db']?.[_0x1d6a1e(0x2e5)]?.(_0x1d6a1e(0x20b))??0x0,_0x30cc9e=[..._0x31a0f4['_envs'][_0x1d6a1e(0x59d)]()]['filter'](_0x1977d8=>!_0x1977d8[_0x1d6a1e(0x5b6)]('~'))[_0x1d6a1e(0x1f7)],_0x3286f8=_0x31a0f4[_0x1d6a1e(0x3b9)]?.[_0x1d6a1e(0x2c9)];if(_0x3286f8){const _0x45e544=_0x3286f8[_0x1d6a1e(0x26e)]===!![],_0x515df9=_0x45e544?_0x1d6a1e(0x216):_0x31a0f4[_0x1d6a1e(0x3b9)][_0x1d6a1e(0x50c)]?.[_0x1d6a1e(0x413)]||_0x1d6a1e(0x57d);console['log'](''),console[_0x1d6a1e(0x18c)](_0x1d6a1e(0x4dd)+_0x515df9);const _0x1dcd00=_0x3286f8[_0x1d6a1e(0x441)]||{};if(_0x1dcd00[_0x1d6a1e(0x502)]){const _0x17c8bf=Math[_0x1d6a1e(0x2b6)](_0x160066/_0x1dcd00[_0x1d6a1e(0x502)]*0x64);console[_0x1d6a1e(0x18c)](_0x1d6a1e(0x1c9)+_0x160066[_0x1d6a1e(0x35d)]()+_0x1d6a1e(0x56e)+_0x1dcd00[_0x1d6a1e(0x502)][_0x1d6a1e(0x35d)]()+_0x1d6a1e(0x2c3)+_0x17c8bf+'%)');}else console[_0x1d6a1e(0x18c)](_0x1d6a1e(0x1c9)+_0x160066['toLocaleString']());_0x1dcd00[_0x1d6a1e(0x1d4)]?console['log']('\x20\x20Envs:\x20\x20\x20\x20'+_0x30cc9e+_0x1d6a1e(0x56e)+_0x1dcd00[_0x1d6a1e(0x1d4)]):console[_0x1d6a1e(0x18c)](_0x1d6a1e(0x425)+_0x30cc9e),_0x43e08f?.[_0x1d6a1e(0x17f)]&&console['log']('\x20\x20Build:\x20\x20\x20key\x20fingerprint\x20'+_0x43e08f[_0x1d6a1e(0x17f)]+'\x20\x20(licenses\x20must\x20be\x20signed\x20by\x20the\x20matching\x20private\x20key)');}if(!_0x1d19dd||!_0x1d19dd[_0x1d6a1e(0x4bf)](_0x1d6a1e(0x4e8))){console['log'](''),console[_0x1d6a1e(0x18c)](_0x1d6a1e(0x4f1)),console[_0x1d6a1e(0x18c)]('');return;}const _0x163a09=[],_0x4fddea=Date[_0x1d6a1e(0x477)](),_0x592002=_0x31a0f4['id'],_0x42e37b=_0x1d6a1e(0x27f);for(const {key:_0x1a6e7a,value:_0x545724}of _0x1d19dd[_0x1d6a1e(0x5f9)](_0x1d6a1e(0x4e8))){const _0x33473e=_0x545724[_0x1d6a1e(0x468)]?Buffer['from'](_0x545724['_licenseHash'],'hex'):Buffer[_0x1d6a1e(0x2d4)](0x8);let _0x23222a='';try{_0x23222a=_0x3bbf1f['derivePin'](_0x592002,_0x33473e,_0x42e37b)[_0x1d6a1e(0x45f)];}catch{}_0x163a09[_0x1d6a1e(0x38d)]({'id':_0x1a6e7a,'licensee':_0x545724[_0x1d6a1e(0x413)]||'','expires':_0x545724['expiresAt']?new Date(_0x545724['expiresAt'])[_0x1d6a1e(0x5c7)]()[_0x1d6a1e(0x19f)](0x0,0xa):'','features':_0x5b39e5(_0x545724[_0x1d6a1e(0x174)]),'pin':_0x23222a,'status':_0x452298(_0x545724,_0x4fddea)});}if(_0x163a09[_0x1d6a1e(0x1f7)]===0x0){console[_0x1d6a1e(0x18c)](''),console[_0x1d6a1e(0x18c)](_0x1d6a1e(0x4f1)),console[_0x1d6a1e(0x18c)]('');return;}const _0x426521=['\x20\x20'+'ID'[_0x1d6a1e(0x57b)](0xe),'LICENSEE'[_0x1d6a1e(0x57b)](0xe),'EXPIRES'[_0x1d6a1e(0x57b)](0xc),'FEATURES'['padEnd'](0x1e),_0x1d6a1e(0x119)[_0x1d6a1e(0x57b)](0xa),'STATUS']['join']('\x20');console[_0x1d6a1e(0x18c)]('\x0a'+_0x426521);for(const _0x5450e7 of _0x163a09){const _0x4524be=_0x5450e7['id'][_0x1d6a1e(0x19f)](0x0,0x8)+'\u2026';console[_0x1d6a1e(0x18c)](['\x20\x20'+_0x4524be[_0x1d6a1e(0x57b)](0xe),_0x5450e7[_0x1d6a1e(0x413)][_0x1d6a1e(0x19f)](0x0,0xe)[_0x1d6a1e(0x57b)](0xe),_0x5450e7[_0x1d6a1e(0x127)]['padEnd'](0xc),_0x5450e7['features']['slice'](0x0,0x1e)[_0x1d6a1e(0x57b)](0x1e),_0x5450e7[_0x1d6a1e(0x45f)][_0x1d6a1e(0x57b)](0xa),_0x5450e7[_0x1d6a1e(0x2d9)]][_0x1d6a1e(0x24f)]('\x20'));}console[_0x1d6a1e(0x18c)]('');}finally{await _0x31a0f4[_0x1d6a1e(0x10e)]();}}async function _0x3b42b8(_0x1f852f,_0x29a874){const _0x1261b9=_0x37c3ae,_0x34e5b1=require$$5,_0x250635=requireOkdbLicenseCodec();let _0x503b98=_0x1f852f;(_0x250635[_0x1261b9(0x2de)](_0x1f852f)===_0x1261b9(0x242)||_0xcf23dc['existsSync'](_0x1f852f)&&_0xcf23dc[_0x1261b9(0x27d)](_0x1f852f)[_0x1261b9(0x465)]())&&(_0x503b98=_0xcf23dc[_0x1261b9(0x377)](_0x1f852f,_0x1261b9(0x2b8))[_0x1261b9(0x25d)]());const _0x14f7b0=_0x2abc66[_0x1261b9(0x547)](_0x29a874['dbPath']),_0x586228=new _0x34e5b1(_0x14f7b0,_0x302a0d(_0x29a874));await _0x586228['open']();try{let _0x81dbf6;try{_0x81dbf6=await _0x586228[_0x1261b9(0x548)][_0x1261b9(0x1a0)]({'blob':_0x503b98});}catch(_0x532785){console['error']('[okdb]\x20error:\x20'+_0x532785[_0x1261b9(0x141)]),process['exit'](0x1);}const _0x58024b=_0x81dbf6[_0x1261b9(0x45f)]||'',_0x190dc8=Object[_0x1261b9(0x2fb)](_0x81dbf6[_0x1261b9(0x174)]||{})[_0x1261b9(0x43d)](([,_0x460d66])=>_0x460d66)[_0x1261b9(0x4d3)](([_0x4074cc])=>_0x4074cc),_0x394e4b=_0x81dbf6[_0x1261b9(0x441)]||{},_0x1f4c13=[_0x394e4b['envs']?_0x1261b9(0x2b9)+_0x394e4b[_0x1261b9(0x1d4)]:null,_0x394e4b[_0x1261b9(0x500)]?_0x1261b9(0x1f1)+_0x394e4b[_0x1261b9(0x500)]:null,_0x394e4b[_0x1261b9(0x1ec)]?_0x1261b9(0x48b)+_0x394e4b[_0x1261b9(0x1ec)]:null,_0x394e4b[_0x1261b9(0x502)]?_0x1261b9(0x3aa)+_0x394e4b[_0x1261b9(0x502)]['toLocaleString']():null][_0x1261b9(0x43d)](Boolean)[_0x1261b9(0x24f)]('\x20\x20'),_0x12cad9=_0x81dbf6[_0x1261b9(0x153)]!==_0x1261b9(0x394);console[_0x1261b9(0x18c)](_0x81dbf6['changed']?_0x1261b9(0x3bc):_0x1261b9(0x2f1)),console[_0x1261b9(0x18c)](_0x1261b9(0x516)+_0x81dbf6['id']),console[_0x1261b9(0x18c)](_0x1261b9(0x45b)+_0x81dbf6[_0x1261b9(0x413)]),console[_0x1261b9(0x18c)]('\x20\x20\x20\x20expires:\x20\x20\x20'+(_0x81dbf6[_0x1261b9(0x5a2)]?new Date(_0x81dbf6[_0x1261b9(0x5a2)])['toISOString']()[_0x1261b9(0x19f)](0x0,0xa):_0x1261b9(0x106))),console['log'](_0x1261b9(0x165)+(_0x190dc8['join'](',\x20')||_0x1261b9(0x5f7)));if(_0x1f4c13)console[_0x1261b9(0x18c)](_0x1261b9(0x225)+_0x1f4c13);if(_0x12cad9)console['log'](_0x1261b9(0x330)+_0x81dbf6[_0x1261b9(0x153)]+_0x1261b9(0x217)),console[_0x1261b9(0x18c)]('');else!_0x81dbf6[_0x1261b9(0x2a5)]?(console['log'](_0x1261b9(0x109)+_0x81dbf6[_0x1261b9(0x2d9)]),console['log']('')):(console[_0x1261b9(0x18c)]('\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20'+_0x58024b),console[_0x1261b9(0x18c)]('\x20\x20\x20\x20status:\x20\x20\x20\x20pending\x20activation'),console['log'](''),console['log'](_0x1261b9(0x5ee)),console['log'](_0x1261b9(0x1e1)+_0x58024b+_0x1261b9(0x498)),console[_0x1261b9(0x18c)](_0x1261b9(0x57a)),console[_0x1261b9(0x18c)](_0x1261b9(0x4e2)),console[_0x1261b9(0x18c)](''));}finally{await _0x586228[_0x1261b9(0x10e)]();}}async function _0x31d5f6(_0x514cd6,_0x1ede39){const _0x16d77e=_0x37c3ae,_0x2a3364=require$$5,_0xf6124e=_0x2abc66[_0x16d77e(0x547)](_0x1ede39[_0x16d77e(0x56a)]),_0x333cb8=new _0x2a3364(_0xf6124e,_0x302a0d(_0x1ede39));await _0x333cb8[_0x16d77e(0x1b3)]();try{let _0x424a86;try{_0x424a86=await _0x333cb8[_0x16d77e(0x548)][_0x16d77e(0x1a7)](_0x514cd6);}catch(_0x3444d2){console['error'](_0x16d77e(0x234)+_0x3444d2['message']),console[_0x16d77e(0x54f)](''),console[_0x16d77e(0x54f)](_0x16d77e(0x1ea)),console['error'](_0x16d77e(0x140)),console[_0x16d77e(0x54f)](_0x16d77e(0x1ca)),console[_0x16d77e(0x54f)](_0x16d77e(0x483)),console[_0x16d77e(0x54f)](''),process[_0x16d77e(0x5d6)](0x1);}console[_0x16d77e(0x18c)](_0x16d77e(0x464)),console[_0x16d77e(0x18c)]('\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x424a86['id']),console[_0x16d77e(0x18c)](_0x16d77e(0x45b)+_0x424a86[_0x16d77e(0x413)]),console[_0x16d77e(0x18c)](_0x16d77e(0x38e)+(_0x424a86[_0x16d77e(0x5a2)]?new Date(_0x424a86[_0x16d77e(0x5a2)])[_0x16d77e(0x5c7)]()[_0x16d77e(0x19f)](0x0,0xa):_0x16d77e(0x106))),console[_0x16d77e(0x18c)](_0x16d77e(0x2c0)),console[_0x16d77e(0x18c)]('');}finally{await _0x333cb8[_0x16d77e(0x10e)]();}}async function _0x4043f0(_0x17a409,_0x3a78e7){const _0x1616e3=_0x37c3ae;!_0x17a409&&(console[_0x1616e3(0x54f)](_0x1616e3(0x139)),process[_0x1616e3(0x5d6)](0x1));const _0x497097=require$$5,_0x189914=requireOkdbLicenseCodec(),_0x5b6829=_0x2abc66['resolve'](_0x3a78e7[_0x1616e3(0x56a)]),_0x38516c=new _0x497097(_0x5b6829,_0x302a0d(_0x3a78e7));await _0x38516c[_0x1616e3(0x1b3)]();try{const _0x2404d5=_0x38516c[_0x1616e3(0x320)];(!_0x2404d5||!_0x2404d5[_0x1616e3(0x4bf)](_0x1616e3(0x4e8)))&&(console['error'](_0x1616e3(0x5ec)+_0x17a409+'\x22'),process['exit'](0x1));let _0x5907ca=null,_0x2c4e37=null;const _0xfac0f6=_0x2404d5[_0x1616e3(0x2e5)](_0x1616e3(0x4e8),_0x17a409);if(_0xfac0f6)_0x5907ca=_0x17a409,_0x2c4e37=_0xfac0f6;else{const _0x1bc6bc=[];for(const {key:_0x230f0c,value:_0x8e48d0}of _0x2404d5[_0x1616e3(0x5f9)](_0x1616e3(0x4e8))){if(_0x230f0c[_0x1616e3(0x5b6)](_0x17a409))_0x1bc6bc[_0x1616e3(0x38d)]({'key':_0x230f0c,'value':_0x8e48d0});}_0x1bc6bc[_0x1616e3(0x1f7)]===0x0&&(console[_0x1616e3(0x54f)]('[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22'+_0x17a409+'\x22'),process[_0x1616e3(0x5d6)](0x1)),_0x1bc6bc['length']>0x1&&(console['error']('[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22'+_0x17a409+'\x22\x20matches\x20'+_0x1bc6bc['length']+_0x1616e3(0x2f4)),process['exit'](0x1)),_0x5907ca=_0x1bc6bc[0x0][_0x1616e3(0x4be)],_0x2c4e37=_0x1bc6bc[0x0][_0x1616e3(0x32f)];}const _0x257bd0=Date[_0x1616e3(0x477)](),_0x422cc4=_0x452298(_0x2c4e37,_0x257bd0),_0x2dd4f2=_0x38516c['id'],_0x6713b4='__OKDB_PUB_FINGERPRINT__';let _0x29f58c='';try{const _0x5afc18=Buffer['from'](_0x2c4e37[_0x1616e3(0x468)],_0x1616e3(0x107));_0x29f58c=_0x189914[_0x1616e3(0x3cd)](_0x2dd4f2,_0x5afc18,_0x6713b4)[_0x1616e3(0x45f)];}catch{}const _0x131b0e=_0x2c4e37[_0x1616e3(0x174)]?Object[_0x1616e3(0x2fb)](_0x2c4e37['features'])[_0x1616e3(0x43d)](([,_0xd88664])=>_0xd88664)['map'](([_0x225e40])=>_0x225e40):[],_0x2878a9=_0x2c4e37[_0x1616e3(0x441)]||{},_0x1febb3=_0x2404d5?.['db']?.[_0x1616e3(0x2e5)]?.(_0x1616e3(0x20b))??0x0,_0x1ac2b0=[..._0x38516c[_0x1616e3(0x35b)][_0x1616e3(0x59d)]()][_0x1616e3(0x43d)](_0x22a0f8=>!_0x22a0f8[_0x1616e3(0x5b6)]('~'))[_0x1616e3(0x1f7)];console[_0x1616e3(0x18c)](_0x1616e3(0x248)),console[_0x1616e3(0x18c)]('\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x5907ca),console[_0x1616e3(0x18c)](_0x1616e3(0x45b)+(_0x2c4e37[_0x1616e3(0x413)]||'')),console[_0x1616e3(0x18c)](_0x1616e3(0x38e)+(_0x2c4e37[_0x1616e3(0x5a2)]?new Date(_0x2c4e37[_0x1616e3(0x5a2)])['toISOString']()[_0x1616e3(0x19f)](0x0,0xa):'')),console[_0x1616e3(0x18c)]('\x20\x20\x20\x20features:\x20\x20'+(_0x131b0e[_0x1616e3(0x24f)](',\x20')||_0x1616e3(0x5f7))),console[_0x1616e3(0x18c)](_0x1616e3(0x3d1)+_0x29f58c),console[_0x1616e3(0x18c)](_0x1616e3(0x109)+_0x422cc4),console['log']('\x20\x20\x20\x20addedAt:\x20\x20\x20'+new Date(_0x2c4e37[_0x1616e3(0x2ed)])[_0x1616e3(0x5c7)]());if(_0x422cc4===_0x1616e3(0x50c)){console[_0x1616e3(0x18c)](''),console[_0x1616e3(0x18c)](_0x1616e3(0x371));if(_0x2878a9[_0x1616e3(0x502)]){const _0xcbf8cd=Math[_0x1616e3(0x2b6)](_0x1febb3/_0x2878a9[_0x1616e3(0x502)]*0x64);console['log']('\x20\x20\x20\x20writes:\x20\x20\x20\x20'+_0x1febb3[_0x1616e3(0x35d)]()+_0x1616e3(0x56e)+_0x2878a9['maxWrites']['toLocaleString']()+_0x1616e3(0x2c3)+_0xcbf8cd+'%)');}else console['log'](_0x1616e3(0x2f2)+_0x1febb3['toLocaleString']()+_0x1616e3(0x52f));_0x2878a9['envs']?console[_0x1616e3(0x18c)](_0x1616e3(0x528)+_0x1ac2b0+'\x20/\x20'+_0x2878a9[_0x1616e3(0x1d4)]):console[_0x1616e3(0x18c)]('\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20'+_0x1ac2b0+'\x20\x20(unlimited)');}console[_0x1616e3(0x18c)]('');}finally{await _0x38516c[_0x1616e3(0x10e)]();}}async function _0xb96edc(_0x20dece,_0x26295e){const _0x4d2d95=_0x37c3ae;!_0x20dece&&(console[_0x4d2d95(0x54f)](_0x4d2d95(0x357)),process['exit'](0x1));const _0xf9a63b=require$$5,_0x38bd00=_0x2abc66['resolve'](_0x26295e[_0x4d2d95(0x56a)]),_0x29d244=new _0xf9a63b(_0x38bd00,_0x302a0d(_0x26295e));await _0x29d244[_0x4d2d95(0x1b3)]();try{const _0xd5f641=_0x29d244[_0x4d2d95(0x320)];(!_0xd5f641||!_0xd5f641[_0x4d2d95(0x4bf)](_0x4d2d95(0x4e8)))&&(console[_0x4d2d95(0x54f)](_0x4d2d95(0x5ec)+_0x20dece+'\x22'),process[_0x4d2d95(0x5d6)](0x1));let _0x4e76e4=null,_0x4706e4=null;const _0x4daa01=_0xd5f641[_0x4d2d95(0x2e5)]('~licenses',_0x20dece);if(_0x4daa01)_0x4e76e4=_0x20dece,_0x4706e4=_0x4daa01;else{const _0x4f7ba3=[];for(const {key:_0x245581,value:_0x40efd7}of _0xd5f641[_0x4d2d95(0x5f9)](_0x4d2d95(0x4e8))){if(_0x245581[_0x4d2d95(0x5b6)](_0x20dece))_0x4f7ba3['push']({'key':_0x245581,'value':_0x40efd7});}_0x4f7ba3['length']===0x0&&(console[_0x4d2d95(0x54f)]('[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22'+_0x20dece+'\x22'),process['exit'](0x1)),_0x4f7ba3[_0x4d2d95(0x1f7)]>0x1&&(console[_0x4d2d95(0x54f)](_0x4d2d95(0x38a)+_0x20dece+_0x4d2d95(0x360)+_0x4f7ba3['length']+_0x4d2d95(0x2f4)),process[_0x4d2d95(0x5d6)](0x1)),_0x4e76e4=_0x4f7ba3[0x0]['key'],_0x4706e4=_0x4f7ba3[0x0][_0x4d2d95(0x32f)];}await _0xd5f641[_0x4d2d95(0x361)]('~licenses',_0x4e76e4),console[_0x4d2d95(0x18c)](_0x4d2d95(0x21d)+_0x4e76e4+'\x20\x20(licensee:\x20'+(_0x4706e4[_0x4d2d95(0x413)]||_0x4d2d95(0x16b))+')');}finally{await _0x29d244[_0x4d2d95(0x10e)]();}}async function _0x57111e(_0x393aed,_0x4fe186,_0x21977d){const _0x4c762f=_0x37c3ae;!_0x393aed&&(console[_0x4c762f(0x54f)](_0x4c762f(0x404)),process[_0x4c762f(0x5d6)](0x1));!_0x21977d['token']&&!(_0x21977d[_0x4c762f(0x396)]&&_0x21977d[_0x4c762f(0x5f6)])&&(console[_0x4c762f(0x54f)](_0x4c762f(0x3eb)),process[_0x4c762f(0x5d6)](0x1));const _0x387ab0=_0x21977d[_0x4c762f(0x560)]||_0x4fe186[_0x4c762f(0x362)]?.[_0x4c762f(0x1d5)];!_0x387ab0&&(console[_0x4c762f(0x54f)](_0x4c762f(0x14a)+_0x4c762f(0x462)+_0x4c762f(0x2da)),process[_0x4c762f(0x5d6)](0x1));const _0x474bf4=require$$5,_0x538740=new _0x474bf4(_0x4fe186[_0x4c762f(0x56a)],{'sync':{'address':_0x387ab0,'auto_reconcile':![]}});await _0x538740['open']();try{const _0x33898c=_0x538740[_0x4c762f(0x320)];if(_0x33898c&&_0x33898c[_0x4c762f(0x4bf)]('~tokens')){let _0x32b3a8=![];for(const _0x5bb70e of _0x33898c[_0x4c762f(0x5f9)](_0x4c762f(0x1ba))){_0x32b3a8=!![];break;}_0x32b3a8&&console[_0x4c762f(0x18c)]('\x20\x20Note:\x20this\x20node\x20has\x20existing\x20tokens.\x20They\x20will\x20coexist\x20with\x20cluster\x20tokens\x0a'+'\x20\x20after\x20sync.\x20Duplicate\x20names\x20will\x20surface\x20as\x20ambiguous\x20logins\x20to\x20clean\x20up.');}console['log'](_0x4c762f(0x332)+_0x393aed+'…'),await _0x538740[_0x4c762f(0x362)][_0x4c762f(0x24f)](_0x393aed[_0x4c762f(0x288)](/\/+$/,''),{'token':_0x21977d[_0x4c762f(0x233)],'username':_0x21977d[_0x4c762f(0x396)],'password':_0x21977d[_0x4c762f(0x5f6)]}),console[_0x4c762f(0x18c)](_0x4c762f(0x5e1)),console['log']('\x0a\x20\x20Joined.\x20Remote\x20tokens\x20replicated.\x20You\x20can\x20now\x20log\x20in\x20with\x20cluster\x20credentials.\x0a');}finally{await _0x538740[_0x4c762f(0x10e)]();}}async function _0x3a82ef(){const _0x91e78=_0x37c3ae,_0x533dd2=Date[_0x91e78(0x477)](),_0x4eab7f=_0x4fc2e8(process['argv']),_0x1bd01f=_0x5a872d(_0x4eab7f),_0xb86391=_0x2abc66[_0x91e78(0x547)](_0x1bd01f['dbPath']);!_0x1bd01f[_0x91e78(0x1bb)]&&!process[_0x91e78(0x328)]['isTTY']&&(_0x1bd01f[_0x91e78(0x1bb)]=!![]);const _0x1db00f=require$$5,{start:_0x1db29c,colorLog:_0x19012f}=requireOkdbShell(),_0x58a183=require$$1$2,_0x228dfb={..._0x1bd01f[_0x91e78(0x4be)]?{'encryptionKey':_0x1bd01f[_0x91e78(0x4be)]}:{},..._0x1bd01f[_0x91e78(0x1b9)]?{'admin':![]}:_0x31e754(_0x1bd01f[_0x91e78(0x46e)])?{'admin':_0x1bd01f['admin']}:{},..._0x31e754(_0x1bd01f[_0x91e78(0x572)])?{'api':_0x1bd01f[_0x91e78(0x572)]}:{},..._0x31e754(_0x1bd01f['auth'])?{'auth':_0x1bd01f[_0x91e78(0x529)]}:{},..._0x31e754(_0x1bd01f[_0x91e78(0x199)])?{'mcp':_0x1bd01f[_0x91e78(0x199)]}:{},..._0x1bd01f['timeMachine']!==![]?{'timeMachine':_0x1bd01f[_0x91e78(0x556)]}:{}},_0x2d5ee9=_0x1824f1(_0x1bd01f);if(!_0x58a183[_0x91e78(0x1fa)]){const _0x1e0fdf=_0x2d1b11(),_0x15a966=_0x1bd01f[_0x91e78(0x49b)]?'--no-cluster':_0x1bd01f['workersFlag']!=null&&_0x1bd01f[_0x91e78(0x180)]!==''?_0x91e78(0x195):process.env.OKDB_HTTP_WORKERS?_0x91e78(0x4d4):_0x1bd01f[_0x91e78(0x4cb)]?.[_0x91e78(0x540)]!=null?_0x91e78(0x58b):'default:\x20cores−1\x20=\x20'+Math[_0x91e78(0x5bc)](0x1,require$$0[_0x91e78(0x35f)]()['length']-0x1);process[_0x91e78(0x589)][_0x91e78(0x340)](_0x91e78(0x2e7)+_0x2d5ee9+'\x20('+_0x15a966+(!_0x1e0fdf?_0x91e78(0x317):'')+')\x0a');}if(_0x58a183['isWorker']){const _0x3f5f73={..._0x228dfb},_0xeaaf6d=new _0x1db00f(_0xb86391,_0x3f5f73);_0xeaaf6d[_0x91e78(0x18c)][_0x91e78(0x3e1)]?.();const _0x5864de=process.env.OKDB_CLUSTER_SLOT??'?',_0x5020ac={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x3f176f=_0x5020ac[_0x1bd01f[_0x91e78(0x5a0)]]??_0x5020ac['info'];_0xeaaf6d['log']['attach'](_0x56462c=>{const _0x309317=_0x91e78;if((_0x5020ac[_0x56462c[_0x309317(0x187)]]??0x1)<_0x3f176f)return;try{process[_0x309317(0x1e5)]?.({'__okdbCluster':_0x309317(0x18c),'slot':_0x5864de,'pid':process[_0x309317(0x18a)],'entry':_0x56462c});}catch{}}),await _0xeaaf6d[_0x91e78(0x1b3)]();const {attachWorkerCluster:_0x3bc0f9}=requireOkdbCluster();_0x3bc0f9(_0xeaaf6d),await _0x464e3(_0xeaaf6d,_0x1bd01f[_0x91e78(0x599)]);return;}if(_0x2d5ee9>0x1){const {runClustered:_0x2d6fee}=requireOkdbCluster(),_0x5d7cfa=new _0x1db00f(_0xb86391,{..._0x228dfb,'engines':![],'processors':![],'compaction':![]});await _0x5d7cfa[_0x91e78(0x1b3)]();const _0x3e286f=async()=>{const _0x1c7590=_0x91e78,_0x2fdd48=new _0x1db00f(_0xb86391,{..._0x228dfb});return await _0x2fdd48[_0x1c7590(0x1b3)](),_0x2fdd48;},_0x189f66=_0x2d6fee({'workers':_0x2d5ee9,'makeOkdb':_0x3e286f,'port':_0x1bd01f['port'],'primaryOkdb':_0x5d7cfa});let _0x5e9b56=![];async function _0x4c58fe(_0x42001c){const _0x558f3c=_0x91e78;_0x5e9b56&&(process[_0x558f3c(0x29d)][_0x558f3c(0x340)](_0x558f3c(0x2ee)),process['exit'](0x82));_0x5e9b56=!![],process[_0x558f3c(0x29d)][_0x558f3c(0x340)](_0x558f3c(0x5ae)+(_0x42001c||_0x558f3c(0x4ec))+_0x558f3c(0x49f));const _0x4ec0ca=setTimeout(()=>{const _0x5730d5=_0x558f3c;process[_0x5730d5(0x29d)]['write'](_0x5730d5(0x3b1)),process[_0x5730d5(0x5d6)](0x0);},0xbb8);_0x4ec0ca['unref']?.();try{await _0x189f66[_0x558f3c(0x10e)]();}catch(_0x4d8712){process[_0x558f3c(0x29d)][_0x558f3c(0x340)](_0x558f3c(0x33a)+(_0x4d8712?.[_0x558f3c(0x141)]??_0x4d8712)+'\x0a');}try{await _0x5d7cfa['close']();}catch(_0x13c4df){process[_0x558f3c(0x29d)][_0x558f3c(0x340)](_0x558f3c(0x36c)+(_0x13c4df?.[_0x558f3c(0x141)]??_0x13c4df)+'\x0a');}process[_0x558f3c(0x5d6)](0x0);}_0x1bd01f[_0x91e78(0x55b)]=_0x2d5ee9;if(!_0x1bd01f[_0x91e78(0x1bb)]){_0x5d7cfa[_0x91e78(0x18c)][_0x91e78(0x3e1)]?.(),_0x4ce8a0(_0x5d7cfa[_0x91e78(0x529)]?.[_0x91e78(0x3c9)]?.()??[]),await _0x1db29c(_0x5d7cfa,_0x1bd01f);return;}process[_0x91e78(0x589)][_0x91e78(0x340)](_0x91e78(0x419)+process[_0x91e78(0x18a)]+':\x20processor\x20(HTTP-silent),\x20'+_0x2d5ee9+'\x20'+(_0x91e78(0x3ff)+_0x1bd01f[_0x91e78(0x599)]+'\x0a')),console[_0x91e78(0x18c)](''),console[_0x91e78(0x18c)](_0x91e78(0x2a8)),console['log']('\x20\x20\x20\x20port:\x20\x20\x20\x20'+_0x1bd01f[_0x91e78(0x599)]+'\x20\x20('+_0x2d5ee9+_0x91e78(0x5ac)),console['log'](_0x91e78(0x5e2)+_0xb86391),console[_0x91e78(0x18c)](_0x91e78(0x47b)+_0x5d7cfa['id']),console[_0x91e78(0x18c)](_0x91e78(0x334)+_0x1bd01f['port']+'/api');!_0x1bd01f[_0x91e78(0x1b9)]&&console['log'](_0x91e78(0x51f)+_0x1bd01f[_0x91e78(0x599)]+_0x91e78(0x4d8));console[_0x91e78(0x18c)](''),_0x4ce8a0(_0x5d7cfa[_0x91e78(0x529)]?.[_0x91e78(0x3c9)]?.()??[]),process['on'](_0x91e78(0x595),()=>_0x4c58fe(_0x91e78(0x595))),process['on'](_0x91e78(0x157),()=>_0x4c58fe(_0x91e78(0x157))),process['on'](_0x91e78(0x1f9),()=>_0x4c58fe(_0x91e78(0x1f9)));return;}const _0x4a0880=new _0x1db00f(_0xb86391,_0x228dfb);_0x4a0880[_0x91e78(0x18c)][_0x91e78(0x3e1)]?.();const _0x290947=_0x4a0880[_0x91e78(0x18c)]['attach'](_0x39cf7b=>_0x19012f(_0x39cf7b,_0x1bd01f[_0x91e78(0x5a0)]));if(_0x1bd01f['noRepl'])process[_0x91e78(0x589)][_0x91e78(0x340)](_0x91e78(0x586));await _0x4a0880['open']();if(_0x1bd01f[_0x91e78(0x1bb)])process[_0x91e78(0x589)][_0x91e78(0x340)](_0x91e78(0x466));try{await _0x464e3(_0x4a0880,_0x1bd01f[_0x91e78(0x599)]);}catch(_0x585a58){_0x585a58[_0x91e78(0x460)]===_0x91e78(0x2c6)&&(console['error'](_0x91e78(0x43e)+_0x1bd01f['port']+_0x91e78(0x238)),process[_0x91e78(0x5d6)](0x1));throw _0x585a58;}if(_0x1bd01f[_0x91e78(0x1bb)])process[_0x91e78(0x589)][_0x91e78(0x340)](_0x91e78(0x4a6)+_0x1bd01f['port']+'\x0a');if(!_0x1bd01f['noRepl'])_0x4a0880['log'][_0x91e78(0x3e1)]?.(),_0x290947?.(),_0x4ce8a0(_0x4a0880[_0x91e78(0x529)]?.['getSecurityNotices']?.()??[]),await _0x1db29c(_0x4a0880,_0x1bd01f);else{const _0x1904c2=_0x2abc66[_0x91e78(0x24f)](_0xb86391,_0x91e78(0x3f5));try{_0xcf23dc[_0x91e78(0x5b5)](_0x1904c2,String(process[_0x91e78(0x18a)]));}catch{}const _0x2da7d1=Date[_0x91e78(0x477)]()-_0x533dd2;console[_0x91e78(0x18c)](''),console[_0x91e78(0x18c)](_0x91e78(0x4ae)),console['log'](_0x91e78(0x488)+_0x1bd01f[_0x91e78(0x599)]),console[_0x91e78(0x18c)]('\x20\x20\x20\x20path:\x20\x20'+_0xb86391),console['log'](_0x91e78(0x410)+_0x4a0880['id']);{const _0x5e1d2d=_0x4a0880[_0x91e78(0x320)]?.['db']?.[_0x91e78(0x2e5)]?.(_0x91e78(0x20b))??0x0,_0x508a65=[..._0x4a0880[_0x91e78(0x35b)]['keys']()][_0x91e78(0x43d)](_0x5dc207=>!_0x5dc207['startsWith']('~'))[_0x91e78(0x1f7)];if(_0x4a0880[_0x91e78(0x3b9)]?.[_0x91e78(0x50c)]?.[_0x91e78(0x53c)]===0x1){const _0x1f3caf=Math['ceil']((_0x4a0880[_0x91e78(0x3b9)][_0x91e78(0x50c)][_0x91e78(0x5a2)]-Date[_0x91e78(0x477)]())/0x5265c00);console[_0x91e78(0x18c)](_0x91e78(0x2db)+_0x4a0880[_0x91e78(0x3b9)][_0x91e78(0x50c)][_0x91e78(0x413)]+_0x91e78(0x520)+_0x1f3caf+_0x91e78(0x374));}else{if(_0x4a0880[_0x91e78(0x3b9)]?.[_0x91e78(0x50c)]){const _0x32cfc0=_0x4a0880['_license'][_0x91e78(0x50c)];console[_0x91e78(0x18c)]('\x20\x20\x20\x20license:\x20'+_0x32cfc0[_0x91e78(0x413)]+_0x91e78(0x38f)+new Date(_0x32cfc0[_0x91e78(0x5a2)])[_0x91e78(0x5c7)]()[_0x91e78(0x19f)](0x0,0xa)+')');const _0x26921b=_0x32cfc0[_0x91e78(0x441)]||{};if(_0x26921b[_0x91e78(0x502)]){const _0x3856b8=Math[_0x91e78(0x2b6)](_0x5e1d2d/_0x26921b[_0x91e78(0x502)]*0x64);console[_0x91e78(0x18c)]('\x20\x20\x20\x20usage:\x20\x20\x20'+_0x5e1d2d[_0x91e78(0x35d)]()+_0x91e78(0x56e)+_0x26921b[_0x91e78(0x502)]['toLocaleString']()+'\x20writes\x20('+_0x3856b8+'%),\x20'+_0x508a65+(_0x26921b[_0x91e78(0x1d4)]?'/'+_0x26921b[_0x91e78(0x1d4)]:'')+_0x91e78(0x39c)+(_0x508a65===0x1?'':'s'));}}else{if(_0x4a0880[_0x91e78(0x3b9)]){const _0x4a6f04=_0x4a0880[_0x91e78(0x3b9)][_0x91e78(0x11f)](),_0x1c5c85=_0x4a6f04[_0x91e78(0x1f7)]?_0x4a6f04[_0x91e78(0x4d3)](_0x432504=>_0x432504[_0x91e78(0x45f)])['join'](',\x20'):_0x91e78(0x5e5),_0x3810a8=_0x4a0880['_license']['effective'],_0x51b557=_0x3810a8[_0x91e78(0x441)]['maxWrites']?Math[_0x91e78(0x2b6)](_0x5e1d2d/_0x3810a8[_0x91e78(0x441)]['maxWrites']*0x64):0x0;console['log'](_0x91e78(0x5f3)),console[_0x91e78(0x18c)](_0x91e78(0x124)+_0x5e1d2d[_0x91e78(0x35d)]()+_0x91e78(0x56e)+_0x3810a8[_0x91e78(0x441)][_0x91e78(0x502)][_0x91e78(0x35d)]()+_0x91e78(0x44a)+_0x51b557+_0x91e78(0x444)+_0x508a65+_0x91e78(0x56e)+_0x3810a8[_0x91e78(0x441)][_0x91e78(0x1d4)]+_0x91e78(0x54d)),console[_0x91e78(0x18c)](_0x91e78(0x35c)+_0x1c5c85);}}}}console[_0x91e78(0x18c)](_0x91e78(0x43a)+_0x1bd01f[_0x91e78(0x599)]+'/api');!_0x1bd01f[_0x91e78(0x1b9)]&&console[_0x91e78(0x18c)](_0x91e78(0x159)+_0x1bd01f[_0x91e78(0x599)]+'/admin/index.html');console[_0x91e78(0x18c)](''),console['log']('[okdb]\x20started\x20in\x20'+_0x2da7d1+'ms'),_0x4ce8a0(_0x4a0880['auth']?.[_0x91e78(0x3c9)]?.()??[]);let _0x1f948a=![];async function _0x38bf35(_0x39d03a){const _0x3bd714=_0x91e78;_0x1f948a&&(process['stderr'][_0x3bd714(0x340)](_0x3bd714(0x2ee)),process['exit'](0x82));_0x1f948a=!![],process[_0x3bd714(0x29d)][_0x3bd714(0x340)]('\x0a[okdb]\x20received\x20'+(_0x39d03a||_0x3bd714(0x4ec))+_0x3bd714(0x51a));const _0x321e68=setTimeout(()=>{const _0x566600=_0x3bd714;process[_0x566600(0x29d)]['write'](_0x566600(0x231)),process['exit'](0x1);},0x1388);try{_0xcf23dc[_0x3bd714(0x4b4)](_0x1904c2);}catch{}try{await _0x4a0880['close']();}catch(_0x4c3581){process[_0x3bd714(0x29d)][_0x3bd714(0x340)](_0x3bd714(0x260)+(_0x4c3581?.['message']??_0x4c3581)+'\x0a');}clearTimeout(_0x321e68),process[_0x3bd714(0x29d)][_0x3bd714(0x340)](_0x3bd714(0x1fe)),process[_0x3bd714(0x5d6)](0x0);}process['on'](_0x91e78(0x595),()=>_0x38bf35(_0x91e78(0x595))),process['on'](_0x91e78(0x157),()=>_0x38bf35(_0x91e78(0x157))),process['on'](_0x91e78(0x1f9),()=>_0x38bf35(_0x91e78(0x1f9)));}}const _0x5213a2=new Set([_0x37c3ae(0x13f),'doctor',_0x37c3ae(0x30a),_0x37c3ae(0x3af),_0x37c3ae(0x176),_0x37c3ae(0x401),_0x37c3ae(0x5cc),_0x37c3ae(0x233),_0x37c3ae(0x24f),_0x37c3ae(0x15d)]),_0x405cfe=process[_0x37c3ae(0x36f)][0x2];if(_0x405cfe==='version')console[_0x37c3ae(0x18c)](require$$3[_0x37c3ae(0x13f)]),process[_0x37c3ae(0x5d6)](0x0);else{if(_0x405cfe&&_0x5213a2[_0x37c3ae(0x399)](_0x405cfe)){const _0x546216=process[_0x37c3ae(0x36f)][_0x37c3ae(0x19f)](0x3),_0x1306c1=_0x4fc2e8([_0x37c3ae(0x3dc),_0x37c3ae(0x270),..._0x546216]),_0x496104=_0x5a872d(_0x1306c1),_0x391a7e=new Set([_0x37c3ae(0x4b9),'-d','--key','-k','--config','-c',_0x37c3ae(0x1e0),'-p','--log-level',_0x37c3ae(0x206),'-e',_0x37c3ae(0x4f6),_0x37c3ae(0x29c),_0x37c3ae(0x53f),_0x37c3ae(0x47d),_0x37c3ae(0x411),'--grants','--ttl',_0x37c3ae(0x26a),_0x37c3ae(0x57e),'-u',_0x37c3ae(0x131)]);let _0xb71bc8=null;for(let _0x2f91e9=0x0;_0x2f91e9<_0x546216['length'];_0x2f91e9++){if(_0x391a7e[_0x37c3ae(0x399)](_0x546216[_0x2f91e9])){_0x2f91e9++;continue;}if(!_0x546216[_0x2f91e9][_0x37c3ae(0x5b6)]('-')){_0xb71bc8=_0x546216[_0x2f91e9];break;}}(async()=>{const _0x4dc1f8=_0x37c3ae;if(_0x405cfe===_0x4dc1f8(0x233)){const _0x16a63f=process[_0x4dc1f8(0x36f)][0x3],_0x51a308=process[_0x4dc1f8(0x36f)][_0x4dc1f8(0x19f)](0x4),_0x280b5d=_0x4fc2e8([_0x4dc1f8(0x3dc),_0x4dc1f8(0x270),..._0x51a308]),_0x2b1f67=_0x5a872d(_0x280b5d),_0x221238=new Set([_0x4dc1f8(0x4b9),'-d','--key','-k',_0x4dc1f8(0x307),'-c',_0x4dc1f8(0x1e0),'-p','--name',_0x4dc1f8(0x53f),_0x4dc1f8(0x47d),'--permissions','--grants',_0x4dc1f8(0x573),_0x4dc1f8(0x10b),'--env','-e',_0x4dc1f8(0x4f6)]),_0x482f58=[];for(let _0xb9bd90=0x0;_0xb9bd90<_0x51a308['length'];_0xb9bd90++){if(_0x221238[_0x4dc1f8(0x399)](_0x51a308[_0xb9bd90])){_0xb9bd90++;continue;}if(_0x51a308[_0xb9bd90]['startsWith']('-'))continue;_0x482f58[_0x4dc1f8(0x38d)](_0x51a308[_0xb9bd90]);}switch(_0x16a63f){case'create':await _0x5b5ad7(_0x2b1f67,_0x280b5d);break;case _0x4dc1f8(0x566):await _0x56035c(_0x2b1f67);break;case'revoke':await _0x5cee89(_0x482f58[0x0],_0x2b1f67);break;default:console['error']('[okdb]\x20unknown\x20token\x20action:\x20\x22'+_0x16a63f+_0x4dc1f8(0x5ef)),process[_0x4dc1f8(0x5d6)](0x1);}return;}if(_0x405cfe===_0x4dc1f8(0x15d)){const _0x3a6346=requireOkdbLicenseCodec(),_0x48e469=process['argv'][_0x4dc1f8(0x19f)](0x3),_0x68540a=_0x4fc2e8([_0x4dc1f8(0x3dc),_0x4dc1f8(0x270),..._0x48e469]),_0x41185b=_0x5a872d(_0x68540a),_0x41fea3=new Set([_0x4dc1f8(0x4b9),'-d','--key','-k',_0x4dc1f8(0x307),'-c',_0x4dc1f8(0x1e0),'-p',_0x4dc1f8(0x10b)]),_0x3e14d1=[];for(let _0x2b8242=0x0;_0x2b8242<_0x48e469[_0x4dc1f8(0x1f7)];_0x2b8242++){if(_0x41fea3[_0x4dc1f8(0x399)](_0x48e469[_0x2b8242])){_0x2b8242++;continue;}if(_0x48e469[_0x2b8242]['startsWith']('-'))continue;_0x3e14d1['push'](_0x48e469[_0x2b8242]);}const _0x236cff=_0x3e14d1[0x0]??null;if(_0x236cff==='remove')await _0xb96edc(_0x3e14d1[0x1],_0x41185b);else{if(!_0x236cff)await _0x403486(_0x41185b);else{let _0x5e9823=_0x3a6346[_0x4dc1f8(0x2de)](_0x236cff);if(_0x5e9823===_0x4dc1f8(0x31b)&&_0xcf23dc[_0x4dc1f8(0x53b)](_0x236cff))_0x5e9823=_0x4dc1f8(0x242);if(_0x5e9823==='path')try{const _0x388650=_0xcf23dc[_0x4dc1f8(0x377)](_0x236cff,_0x4dc1f8(0x2b8))[_0x4dc1f8(0x25d)](),_0x20a367=_0x3a6346[_0x4dc1f8(0x2de)](_0x388650);if(_0x20a367==='activation'){await _0x31d5f6(_0x388650,_0x41185b);return;}await _0x3b42b8(_0x236cff,_0x41185b);return;}catch(_0x2f07ab){console['error'](_0x4dc1f8(0x169)+_0x236cff+':\x20'+_0x2f07ab[_0x4dc1f8(0x141)]),process[_0x4dc1f8(0x5d6)](0x1);}switch(_0x5e9823){case _0x4dc1f8(0x2e8):await _0x3b42b8(_0x236cff,_0x41185b);break;case _0x4dc1f8(0x398):await _0x31d5f6(_0x236cff,_0x41185b);break;case _0x4dc1f8(0x446):await _0x4043f0(_0x236cff,_0x41185b);break;default:console[_0x4dc1f8(0x54f)](_0x4dc1f8(0x28d)+_0x236cff+'\x22'),console['error'](''),console[_0x4dc1f8(0x54f)]('\x20\x20Expected\x20one\x20of:'),console[_0x4dc1f8(0x54f)](_0x4dc1f8(0x40a)),console['error'](_0x4dc1f8(0x3df)),console['error'](_0x4dc1f8(0x1bd)),console[_0x4dc1f8(0x54f)](_0x4dc1f8(0x36b)),console[_0x4dc1f8(0x54f)](''),console[_0x4dc1f8(0x54f)](_0x4dc1f8(0x245)),process[_0x4dc1f8(0x5d6)](0x1);}}}return;}switch(_0x405cfe){case _0x4dc1f8(0x473):await _0x539e8d(_0x496104);break;case _0x4dc1f8(0x30a):await _0x49f7b9();break;case _0x4dc1f8(0x5cc):await _0x49350c(_0x496104);break;case _0x4dc1f8(0x3af):await _0x449ec6(_0xb71bc8??_0x2abc66[_0x4dc1f8(0x547)](_0x4dc1f8(0x5ce)),_0x496104);break;case _0x4dc1f8(0x176):await _0xe65381(_0xb71bc8??_0x2abc66['resolve'](_0x4dc1f8(0x301)),_0x496104,_0x1306c1);break;case _0x4dc1f8(0x401):await _0x389d48(_0xb71bc8??_0x2abc66['resolve'](_0x4dc1f8(0x301)),_0x496104,_0x1306c1);break;case _0x4dc1f8(0x24f):await _0x57111e(_0xb71bc8,_0x496104,_0x1306c1);break;}})()['then'](()=>process[_0x37c3ae(0x5d6)](0x0))['catch'](_0x3873bd=>{const _0x111be6=_0x37c3ae;console[_0x111be6(0x54f)](_0x111be6(0x4b8)+(_0x3873bd[_0x111be6(0x141)]||_0x3873bd)+'\x0a'),process['exit'](0x1);});}else _0x3a82ef()[_0x37c3ae(0x29f)](_0x153331=>{const _0xf9929a=_0x37c3ae;console['error'](_0xf9929a(0x4a4)),console[_0xf9929a(0x54f)](_0x153331[_0xf9929a(0x321)]||_0x153331),process['exit'](0x1);});}return okdb$1;}var okdbExports=requireOkdb(),okdb=getDefaultExportFromCjs(okdbExports);module[_0x1577db(0x2ff)]=okdb;
|
|
2
|
+
'use strict';const _0x362184=_0x4307;(function(_0xd691dc,_0x522028){const _0x4536db=_0x4307,_0x5567ce=_0xd691dc();while(!![]){try{const _0x4ea2ed=-parseInt(_0x4536db(0x45c))/0x1*(-parseInt(_0x4536db(0x615))/0x2)+-parseInt(_0x4536db(0x20e))/0x3+parseInt(_0x4536db(0x2fe))/0x4+-parseInt(_0x4536db(0x1db))/0x5+-parseInt(_0x4536db(0x47a))/0x6+-parseInt(_0x4536db(0x6ae))/0x7*(parseInt(_0x4536db(0x447))/0x8)+parseInt(_0x4536db(0x23f))/0x9;if(_0x4ea2ed===_0x522028)break;else _0x5567ce['push'](_0x5567ce['shift']());}catch(_0x3d2c73){_0x5567ce['push'](_0x5567ce['shift']());}}}(_0x226c,0xbcb8d));var require$$1=require(_0x362184(0x624)),require$$1$1=require('fs'),require$$0=require('os'),require$$4$1=require('net'),require$$5=require(_0x362184(0x392)),require$$0$2=require('readline'),require$$2=require(_0x362184(0x27c)),require$$0$1=require(_0x362184(0x253)),require$$4=require(_0x362184(0x3bf)),require$$1$2=require(_0x362184(0x3a6)),require$$0$3=require('node:perf_hooks'),require$$0$4=require('perf_hooks'),require$$0$5=require('node:events'),require$$0$6=require('http'),require$$1$3=require(_0x362184(0x424)),require$$2$1=require(_0x362184(0x3a8)),require$$8=require(_0x362184(0x246)),commonjsGlobal=typeof globalThis!==_0x362184(0x3f0)?globalThis:typeof window!==_0x362184(0x3f0)?window:typeof global!==_0x362184(0x3f0)?global:typeof self!==_0x362184(0x3f0)?self:{};function getDefaultExportFromCjs(_0x1bc07d){const _0x1700f4=_0x362184;return _0x1bc07d&&_0x1bc07d[_0x1700f4(0x528)]&&Object[_0x1700f4(0x359)][_0x1700f4(0x46b)][_0x1700f4(0x668)](_0x1bc07d,'default')?_0x1bc07d[_0x1700f4(0x445)]:_0x1bc07d;}var okdb$1={},okdbWorkers,hasRequiredOkdbWorkers;function requireOkdbWorkers(){if(hasRequiredOkdbWorkers)return okdbWorkers;hasRequiredOkdbWorkers=0x1;const _0x7007c9=require$$0,_0xfa350f=require$$1$1,_0x5c67f7=require$$1;let _0x526c52;function _0x18d139(){const _0xe2910d=_0x4307;if(process.env.OKDB_FORCE_SHMBUF_FALLBACK==='1')return![];if(_0x526c52!==undefined)return _0x526c52;try{const _0x357537=_0x5c67f7[_0xe2910d(0x237)](require['resolve'](_0xe2910d(0x77c)));_0x526c52=_0xfa350f['existsSync'](_0x5c67f7[_0xe2910d(0x29f)](_0x357537,'build',_0xe2910d(0x648),'shmbuf.node'));}catch{_0x526c52=![];}return _0x526c52;}function _0x3f1758(){const _0x294b9a=_0x4307,_0x378f35=_0x7007c9['cpus']()['length'];return Math[_0x294b9a(0x270)](0x1,_0x378f35-0x1);}function _0x5737dd(_0x41ad79,_0x364733={}){const _0x47094d=_0x4307,_0x1552d6=_0x364733[_0x47094d(0x2c2)]!==undefined?_0x364733[_0x47094d(0x2c2)]:_0x18d139();let _0x21a443;if(_0x41ad79?.[_0x47094d(0x343)])_0x21a443=0x1;else{let _0x5db8d7,_0xe9d79a;if(_0x41ad79?.[_0x47094d(0x5cb)]!==undefined&&_0x41ad79[_0x47094d(0x5cb)]!==null&&_0x41ad79[_0x47094d(0x5cb)]!=='')_0x5db8d7=_0x41ad79[_0x47094d(0x5cb)],_0xe9d79a='--workers';else{if(process.env.OKDB_HTTP_WORKERS!==undefined&&process.env.OKDB_HTTP_WORKERS!=='')_0x5db8d7=process.env.OKDB_HTTP_WORKERS,_0xe9d79a=_0x47094d(0x33f);else _0x41ad79?.[_0x47094d(0x635)]?.['workers']!==undefined&&_0x41ad79[_0x47094d(0x635)][_0x47094d(0x5f3)]!==null&&_0x41ad79[_0x47094d(0x635)][_0x47094d(0x5f3)]!==''&&(_0x5db8d7=_0x41ad79[_0x47094d(0x635)]['workers'],_0xe9d79a=_0x47094d(0x233));}if(_0x5db8d7===undefined)_0x21a443=_0x3f1758();else{const _0x1046bf=Number(_0x5db8d7);!Number[_0x47094d(0x636)](_0x1046bf)||_0x1046bf<0x1?(console[_0x47094d(0x21b)]('[okdb]\x20invalid\x20'+_0xe9d79a+'='+JSON['stringify'](_0x5db8d7)+'\x20(must\x20be\x20an\x20integer\x20>=\x201)\x20—\x20using\x201'),_0x21a443=0x1):_0x21a443=_0x1046bf;}}return!_0x1552d6&&_0x21a443>0x1&&(console[_0x47094d(0x21b)](_0x47094d(0x57a)+(_0x47094d(0x6b3)+_0x21a443+').')),_0x21a443=0x1),_0x21a443;}return okdbWorkers={'isShmbufNative':_0x18d139,'defaultWorkers':_0x3f1758,'resolveWorkers':_0x5737dd},okdbWorkers;}var version=_0x362184(0x6a4),require$$3={'version':version},okdbAuthTokens,hasRequiredOkdbAuthTokens;function requireOkdbAuthTokens(){if(hasRequiredOkdbAuthTokens)return okdbAuthTokens;hasRequiredOkdbAuthTokens=0x1;const _0x5e397c=require$$2;function _0x40957c(_0x508729,_0x3774d8){const _0x322ac9=_0x4307;return _0x5e397c[_0x322ac9(0x21e)](_0x322ac9(0x33b),_0x3774d8)[_0x322ac9(0x594)](_0x508729)['digest'](_0x322ac9(0x32e));}function _0x4e8980(_0x444101,_0x55ef32){const _0x3d14db=_0x4307;if(typeof _0x444101!==_0x3d14db(0x44e)||typeof _0x55ef32!==_0x3d14db(0x44e))return![];if(Buffer['byteLength'](_0x444101)!==Buffer['byteLength'](_0x55ef32))return![];return _0x5e397c[_0x3d14db(0x59f)](Buffer[_0x3d14db(0x2f3)](_0x444101),Buffer['from'](_0x55ef32));}function _0x4a70d6(_0x18d1b4){const _0xade1d8=_0x4307;if(!_0x18d1b4?.[_0xade1d8(0x637)](_0xade1d8(0x228)))return null;return _0x18d1b4[_0xade1d8(0x5b8)](0x7);}function _0x25c344(_0x5e8ffc=0x20){const _0x2eadc7=_0x4307;return _0x5e397c['randomBytes'](_0x5e8ffc)[_0x2eadc7(0x288)](_0x2eadc7(0x32e));}function _0x386011(_0x11f012){const _0xf86e55=_0x4307;return _0x5e397c[_0xf86e55(0x506)](_0xf86e55(0x33b))[_0xf86e55(0x594)](_0x11f012)['digest'](_0xf86e55(0x767));}function _0x399af2(_0x48de8d,_0x57b6e4,_0x929d53=0x36ee80){const _0x28f0ed=_0x4307;if(!_0x57b6e4)throw new Error(_0x28f0ed(0x4b4));const _0x33822b=Date[_0x28f0ed(0x6fd)](),_0x294153=Buffer['from'](JSON[_0x28f0ed(0x72f)]({'iat':_0x33822b,'exp':_0x33822b+_0x929d53,'sub':_0x48de8d?.['id']??_0x48de8d?.['sub']??null,'username':_0x48de8d?.[_0x28f0ed(0x376)]??_0x48de8d?.['name']??null,'roles':Array[_0x28f0ed(0x65e)](_0x48de8d?.['roles'])?_0x48de8d[_0x28f0ed(0x1d3)]:[]}))[_0x28f0ed(0x288)](_0x28f0ed(0x32e)),_0x269feb=_0x40957c(_0x294153,_0x57b6e4);return _0x294153+'.'+_0x269feb;}function _0x4991ff(_0x1c2adc,_0x8a0124){const _0x35e2fb=_0x4307;if(!_0x8a0124||typeof _0x1c2adc!==_0x35e2fb(0x44e))return null;const [_0x396185,_0x4dd371]=_0x1c2adc[_0x35e2fb(0x3d5)]('.');if(!_0x396185||!_0x4dd371)return null;const _0x28b4d1=_0x40957c(_0x396185,_0x8a0124);if(!_0x4e8980(_0x4dd371,_0x28b4d1))return null;try{const _0x4a73a0=JSON['parse'](Buffer[_0x35e2fb(0x2f3)](_0x396185,_0x35e2fb(0x32e))[_0x35e2fb(0x288)]()),_0x58b36d=0x7530;if(Date[_0x35e2fb(0x6fd)]()>Number(_0x4a73a0?.[_0x35e2fb(0x79c)]??0x0)+_0x58b36d)return null;return _0x4a73a0;}catch{return null;}}async function _0x5de4e(_0x61765){return new Promise((_0x4ce00e,_0x5b70f3)=>{const _0x5ebe52=_0x4307,_0x4fc91b=_0x5e397c['randomBytes'](0x10);_0x5e397c[_0x5ebe52(0x541)](_0x61765,_0x4fc91b,0x40,(_0x261f41,_0x106ec6)=>{const _0x4fc3e3=_0x5ebe52;if(_0x261f41)_0x5b70f3(_0x261f41);_0x4ce00e(_0x4fc91b[_0x4fc3e3(0x288)](_0x4fc3e3(0x767))+':'+_0x106ec6[_0x4fc3e3(0x288)]('hex'));});});}async function _0x5be61a(_0x1bc38e,_0x40fe08){const _0x3bb459=_0x4307,[_0x257c8b,_0x34d46d]=_0x40fe08[_0x3bb459(0x3d5)](':');if(!_0x257c8b||!_0x34d46d)return![];const _0x261bc6=Buffer[_0x3bb459(0x2f3)](_0x257c8b,_0x3bb459(0x767));return new Promise((_0x1b7331,_0x3f7f18)=>{const _0x187807=_0x3bb459;_0x5e397c[_0x187807(0x541)](_0x1bc38e,_0x261bc6,0x40,(_0x3cea62,_0x172a94)=>{const _0x3bdc8c=_0x187807;if(_0x3cea62)_0x3f7f18(_0x3cea62);_0x1b7331(_0x5e397c[_0x3bdc8c(0x59f)](_0x172a94,Buffer[_0x3bdc8c(0x2f3)](_0x34d46d,_0x3bdc8c(0x767))));});});}return okdbAuthTokens={'hmac':_0x40957c,'timingSafeEqual':_0x4e8980,'parseBearer':_0x4a70d6,'randomToken':_0x25c344,'hashToken':_0x386011,'issueToken':_0x399af2,'authenticateToken':_0x4991ff,'hashPassword':_0x5de4e,'verifyPassword':_0x5be61a},okdbAuthTokens;}var okdbLicenseCodec,hasRequiredOkdbLicenseCodec;function requireOkdbLicenseCodec(){const _0x3d4f6d=_0x362184;if(hasRequiredOkdbLicenseCodec)return okdbLicenseCodec;hasRequiredOkdbLicenseCodec=0x1;const _0x4fcf0a=require$$0$1,_0x40f23f=_0x3d4f6d(0x595),_0x172b65=new Uint8Array(0x100)['fill'](0xff);for(let _0x16c9bc=0x0;_0x16c9bc<_0x40f23f[_0x3d4f6d(0x503)];_0x16c9bc++){_0x172b65[_0x40f23f['charCodeAt'](_0x16c9bc)]=_0x16c9bc,_0x172b65[_0x40f23f[_0x3d4f6d(0x713)](_0x16c9bc)+0x20]=_0x16c9bc;}_0x172b65['O'[_0x3d4f6d(0x713)](0x0)]=0x0,_0x172b65['o'['charCodeAt'](0x0)]=0x0,_0x172b65['I'[_0x3d4f6d(0x713)](0x0)]=0x1,_0x172b65['i'['charCodeAt'](0x0)]=0x1,_0x172b65['L'[_0x3d4f6d(0x713)](0x0)]=0x1,_0x172b65['l'[_0x3d4f6d(0x713)](0x0)]=0x1;function _0x2bbf5f(_0x2713d6){const _0x106012=_0x3d4f6d;let _0x1f9214=0x0,_0x4de58e=0x0,_0x53e5f4='';for(let _0x59d93c=0x0;_0x59d93c<_0x2713d6[_0x106012(0x503)];_0x59d93c++){_0x4de58e=_0x4de58e<<0x8|_0x2713d6[_0x59d93c],_0x1f9214+=0x8;while(_0x1f9214>=0x5){_0x1f9214-=0x5,_0x53e5f4+=_0x40f23f[_0x4de58e>>>_0x1f9214&0x1f];}}return _0x1f9214>0x0&&(_0x53e5f4+=_0x40f23f[_0x4de58e<<0x5-_0x1f9214&0x1f]),_0x53e5f4;}function _0x17cbe5(_0x312a65){const _0x5757bd=_0x3d4f6d;_0x312a65=_0x312a65[_0x5757bd(0x18e)](/-/g,'')[_0x5757bd(0x575)]();let _0x4ace5f=0x0,_0x4d3dae=0x0;const _0x7b92b0=[];for(let _0x2bca6b=0x0;_0x2bca6b<_0x312a65[_0x5757bd(0x503)];_0x2bca6b++){const _0x43d3df=_0x172b65[_0x312a65[_0x5757bd(0x713)](_0x2bca6b)];if(_0x43d3df===0xff)continue;_0x4d3dae=_0x4d3dae<<0x5|_0x43d3df,_0x4ace5f+=0x5,_0x4ace5f>=0x8&&(_0x4ace5f-=0x8,_0x7b92b0[_0x5757bd(0x387)](_0x4d3dae>>>_0x4ace5f&0xff));}return Buffer[_0x5757bd(0x2f3)](_0x7b92b0);}const _0x4f56f9=[_0x3d4f6d(0x317),_0x3d4f6d(0x61e),_0x3d4f6d(0x517),'fts','timeMachine','views',_0x3d4f6d(0x79a),'files'],_0x486615=0x0,_0x33dd43=0x1,_0x3238e9=0x2,_0x3b3907=0x6*0x1e*0x18*0x3c*0x3c*0x3e8;function _0x545d05({issuedAt:_0x4cd629,expiresAt:_0x2be699,licensee:licensee='',features:features={},limits:limits={},licenseType:licenseType=_0x486615}){const _0x2fbe47=_0x3d4f6d,_0x16c2f2=Buffer[_0x2fbe47(0x2f3)](licensee,_0x2fbe47(0x6f6))['slice'](0x0,0x40),_0x433562=0x1+0x1+0x4+0x4+0x1+_0x16c2f2[_0x2fbe47(0x503)]+0x2+0x10,_0x1200fd=Buffer[_0x2fbe47(0x705)](_0x433562);let _0x35eb85=0x0;_0x1200fd['writeUInt8'](0x1,_0x35eb85++),_0x1200fd['writeUInt8'](licenseType,_0x35eb85++),_0x1200fd[_0x2fbe47(0x374)](Math['floor'](_0x4cd629/0x3e8),_0x35eb85),_0x35eb85+=0x4,_0x1200fd['writeUInt32BE'](Math['floor'](_0x2be699/0x3e8),_0x35eb85),_0x35eb85+=0x4,_0x1200fd[_0x2fbe47(0x500)](_0x16c2f2[_0x2fbe47(0x503)],_0x35eb85++),_0x16c2f2[_0x2fbe47(0x2fb)](_0x1200fd,_0x35eb85),_0x35eb85+=_0x16c2f2[_0x2fbe47(0x503)];let _0xf9813f=0x0;for(let _0xaf5281=0x0;_0xaf5281<_0x4f56f9['length'];_0xaf5281++){if(features[_0x4f56f9[_0xaf5281]])_0xf9813f|=0x1<<_0xaf5281;}_0x1200fd[_0x2fbe47(0x331)](_0xf9813f,_0x35eb85),_0x35eb85+=0x2;const _0x2a00f6=[_0x2fbe47(0x364),_0x2fbe47(0x200),_0x2fbe47(0x313),'maxWrites'];for(const _0x37998f of _0x2a00f6){_0x1200fd[_0x2fbe47(0x374)](limits[_0x37998f]||0x0,_0x35eb85),_0x35eb85+=0x4;}return _0x1200fd;}function _0x84b359(_0x2c9c09){const _0x23f9af=_0x3d4f6d;let _0x3de023=0x0;const _0x20a0d3=_0x2c9c09[_0x23f9af(0x6ac)](_0x3de023++),_0x2bc1e4=_0x2c9c09['readUInt8'](_0x3de023++),_0x5598da=_0x2c9c09['readUInt32BE'](_0x3de023);_0x3de023+=0x4;const _0x361aad=_0x2c9c09[_0x23f9af(0x601)](_0x3de023);_0x3de023+=0x4;const _0x479763=_0x2c9c09['readUInt8'](_0x3de023++),_0x53cf2a=_0x2c9c09[_0x23f9af(0x5b8)](_0x3de023,_0x3de023+_0x479763)[_0x23f9af(0x288)](_0x23f9af(0x6f6));_0x3de023+=_0x479763;const _0x2343d1=_0x2c9c09[_0x23f9af(0x525)](_0x3de023);_0x3de023+=0x2;const _0x45f314={};for(let _0x4051a7=0x0;_0x4051a7<_0x4f56f9[_0x23f9af(0x503)];_0x4051a7++){_0x45f314[_0x4f56f9[_0x4051a7]]=Boolean(_0x2343d1&0x1<<_0x4051a7);}const _0x577ecb=[_0x23f9af(0x364),'typesPerEnv',_0x23f9af(0x313),'maxWrites'],_0x48f938={};for(const _0xfd2938 of _0x577ecb){const _0x3dcce1=_0x2c9c09[_0x23f9af(0x601)](_0x3de023);_0x3de023+=0x4,_0x48f938[_0xfd2938]=_0x3dcce1===0x0?null:_0x3dcce1;}return{'v':_0x20a0d3,'licenseType':_0x2bc1e4,'issuedAt':_0x5598da*0x3e8,'expiresAt':_0x361aad*0x3e8,'licensee':_0x53cf2a,'features':_0x45f314,'limits':_0x48f938};}function _0x4ea685(_0x15b566,_0x2dc2f3){const _0x3fb5dc=_0x3d4f6d,_0xc0955c=Buffer[_0x3fb5dc(0x549)]([_0x15b566,_0x2dc2f3]),_0x45b352=_0x2bbf5f(_0xc0955c),_0x188a9c=[];for(let _0x4d2d7d=0x0;_0x4d2d7d<_0x45b352['length'];_0x4d2d7d+=0x8){_0x188a9c['push'](_0x45b352[_0x3fb5dc(0x5b8)](_0x4d2d7d,_0x4d2d7d+0x8));}return _0x188a9c[_0x3fb5dc(0x29f)]('-');}function _0xfe93de(_0x33bb9e){const _0x44e6a2=_0x3d4f6d;if(typeof _0x33bb9e!=='string')throw new Error('decodeLicenseBlob:\x20input\x20must\x20be\x20a\x20string');const _0x47da9b=_0x17cbe5(_0x33bb9e[_0x44e6a2(0x18e)](/-/g,''));if(_0x47da9b[_0x44e6a2(0x503)]<0x41)throw new Error(_0x44e6a2(0x1ad)+_0x47da9b[_0x44e6a2(0x503)]+'\x20bytes,\x20need\x20>=\x2065)');const _0x1c92fa=_0x47da9b[_0x44e6a2(0x5b8)](0x0,_0x47da9b['length']-0x40),_0x4f4112=_0x47da9b[_0x44e6a2(0x5b8)](_0x47da9b[_0x44e6a2(0x503)]-0x40);let _0x15f70f;try{_0x15f70f=_0x84b359(_0x1c92fa);}catch(_0x535e2e){throw new Error('decodeLicenseBlob:\x20failed\x20to\x20decode\x20payload:\x20'+_0x535e2e[_0x44e6a2(0x1e0)]);}return{'rawBuf':_0x47da9b,'payload':_0x1c92fa,'sig':_0x4f4112,'decoded':_0x15f70f};}function _0xc15bbb(_0x226dd7){const _0x1060d9=_0x3d4f6d;return _0x4fcf0a[_0x1060d9(0x506)](_0x1060d9(0x33b))[_0x1060d9(0x594)](_0x226dd7)[_0x1060d9(0x2f8)]()['slice'](0x0,0x8);}function _0x3e2238(_0x3d4a82,_0x434d4e,_0x28168e){const _0x49f0c5=_0x3d4f6d,_0x4d85ed='OKDB-PIN-V1:'+_0x28168e,_0x19f03e=Buffer[_0x49f0c5(0x549)]([Buffer[_0x49f0c5(0x2f3)](_0x3d4a82,'utf8'),_0x434d4e]),_0x2ed3f5=_0x4fcf0a[_0x49f0c5(0x21e)](_0x49f0c5(0x33b),_0x4d85ed)['update'](_0x19f03e)[_0x49f0c5(0x2f8)](),_0x50b5b4=_0x2bbf5f(_0x2ed3f5['slice'](0x0,0x5));return{'pin':_0x50b5b4,'pinHmac':_0x2ed3f5};}function _0x543eea(_0x4c556a,_0x2322c3,_0x1528e9){const _0x142ebb=_0x3d4f6d,_0x29fdd4=Buffer[_0x142ebb(0x705)](0x4d);let _0x33424a=0x0;_0x29fdd4[_0x142ebb(0x500)](0x1,_0x33424a++),_0x4c556a[_0x142ebb(0x2fb)](_0x29fdd4,_0x33424a),_0x33424a+=0x8,_0x29fdd4[_0x142ebb(0x374)](_0x2322c3,_0x33424a),_0x33424a+=0x4,_0x1528e9[_0x142ebb(0x2fb)](_0x29fdd4,_0x33424a);const _0x378b76=_0x2bbf5f(_0x29fdd4),_0x187a9e=[];for(let _0x20f8fc=0x0;_0x20f8fc<_0x378b76[_0x142ebb(0x503)];_0x20f8fc+=0x6){_0x187a9e[_0x142ebb(0x387)](_0x378b76[_0x142ebb(0x5b8)](_0x20f8fc,_0x20f8fc+0x6));}return _0x187a9e['join']('-');}function _0x4ec148(_0xbbcec0){const _0x5df3b1=_0x3d4f6d;if(typeof _0xbbcec0!==_0x5df3b1(0x44e))throw new Error(_0x5df3b1(0x6f0));const _0x589744=_0x17cbe5(_0xbbcec0[_0x5df3b1(0x18e)](/-/g,''));if(_0x589744[_0x5df3b1(0x503)]!==0x4d)throw new Error('decodeActivationToken:\x20expected\x2077\x20bytes,\x20got\x20'+_0x589744[_0x5df3b1(0x503)]);let _0x2262e3=0x0;const _0x5f409a=_0x589744[_0x5df3b1(0x6ac)](_0x2262e3++),_0x488f77=_0x589744[_0x5df3b1(0x5b8)](_0x2262e3,_0x2262e3+0x8);_0x2262e3+=0x8;const _0x108e56=_0x589744[_0x5df3b1(0x601)](_0x2262e3);_0x2262e3+=0x4;const _0x1dccf0=_0x589744[_0x5df3b1(0x5b8)](_0x2262e3);return{'v':_0x5f409a,'licenseHash':_0x488f77,'expiry':_0x108e56,'sig':_0x1dccf0};}function _0x1e3d49({tokenString:_0x449766,nodeId:_0x5029a3,rawBlobBuf:_0x1c8c48,pubKeyPem:_0x205453,pubFingerprint:_0x25bbe4}){const _0x546aac=_0x3d4f6d;let _0x349790;try{_0x349790=_0x4ec148(_0x449766);}catch(_0x232031){return{'valid':![],'reason':_0x546aac(0x512)};}const _0x250b0f=_0xc15bbb(_0x1c8c48);if(!_0x250b0f[_0x546aac(0x65b)](_0x349790[_0x546aac(0x350)]))return{'valid':![],'reason':_0x546aac(0x487)};const {pinHmac:_0x217ff0}=_0x3e2238(_0x5029a3,_0x250b0f,_0x25bbe4),_0x2329e3=Buffer[_0x546aac(0x705)](0x4);_0x2329e3[_0x546aac(0x374)](_0x349790[_0x546aac(0x4be)],0x0);const _0x794010=Buffer[_0x546aac(0x549)]([Buffer['from']([_0x349790['v']]),_0x217ff0[_0x546aac(0x5b8)](0x0,0x5),_0x349790[_0x546aac(0x350)],_0x2329e3]);try{const _0x1b67a4=_0x4fcf0a[_0x546aac(0x5e1)](null,_0x794010,_0x205453,_0x349790[_0x546aac(0x434)]);if(!_0x1b67a4)return{'valid':![],'reason':'SIG_INVALID'};}catch(_0x16ea06){return{'valid':![],'reason':_0x546aac(0x418)};}if(_0x349790[_0x546aac(0x4be)]<Date[_0x546aac(0x6fd)]()/0x3e8)return{'valid':![],'reason':'ACTIVATION_EXPIRED'};return{'valid':!![],'reason':'ok'};}function _0x452125(_0x225285){const _0x47ffa1=_0x3d4f6d;if(typeof _0x225285!==_0x47ffa1(0x44e))return _0x47ffa1(0x23d);const _0xe6e98a=_0x225285['trim']();if(_0xe6e98a[_0x47ffa1(0x637)]('/')||_0xe6e98a[_0x47ffa1(0x637)]('./')||_0xe6e98a[_0x47ffa1(0x637)](_0x47ffa1(0x2f6))||/^[A-Za-z]:[\\/]/[_0x47ffa1(0x193)](_0xe6e98a))return'path';if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i[_0x47ffa1(0x193)](_0xe6e98a))return _0x47ffa1(0x537);const _0x435c10=_0xe6e98a[_0x47ffa1(0x18e)](/[\s-]+/g,'')['length'];if(_0x435c10===0x7c)return'activation';if(_0x435c10>=0x95&&_0x435c10<=0xfc)return _0x47ffa1(0x33c);return _0x47ffa1(0x23d);}return okdbLicenseCodec={'toBase32':_0x2bbf5f,'fromBase32':_0x17cbe5,'encodeLicensePayload':_0x545d05,'decodeLicensePayload':_0x84b359,'encodeLicenseBlob':_0x4ea685,'decodeLicenseBlob':_0xfe93de,'licenseHash':_0xc15bbb,'derivePin':_0x3e2238,'encodeActivationToken':_0x543eea,'decodeActivationToken':_0x4ec148,'verifyActivation':_0x1e3d49,'detectInputType':_0x452125,'FEATURE_NAMES':_0x4f56f9,'LICENSE_TYPE_STANDARD':_0x486615,'LICENSE_TYPE_OPEN':_0x33dd43,'LICENSE_TYPE_INTERNAL':_0x3238e9,'OPEN_LICENSE_MAX_DURATION_MS':_0x3b3907},okdbLicenseCodec;}var okdbError,hasRequiredOkdbError;function requireOkdbError(){if(hasRequiredOkdbError)return okdbError;hasRequiredOkdbError=0x1;class _0x10bda0 extends Error{constructor(_0x16d04c,_0x312f8b,_0x4b053a={}){const _0x9d82e3=_0x4307;super(_0x16d04c),this[_0x9d82e3(0x378)]='OKDBError',this['code']=_0x312f8b,this[_0x9d82e3(0x491)]=_0x4b053a,_0x4b053a['cause']&&(this[_0x9d82e3(0x73d)]=_0x4b053a[_0x9d82e3(0x73d)]),Error[_0x9d82e3(0x54c)](this,this['constructor']);}}class _0x5412a7 extends _0x10bda0{constructor(_0x1ee5bb,_0x4d25d8,_0x516bc3,_0x3c5396){const _0x546231=_0x4307;super(_0x546231(0x762)+_0x1ee5bb+'@'+_0x4d25d8+':\x20expected\x20'+_0x516bc3+_0x546231(0x753)+_0x3c5396,_0x546231(0x1a0),{'type':_0x1ee5bb,'key':_0x4d25d8,'expectedVersion':_0x516bc3,'actualVersion':_0x3c5396}),this['name']=_0x546231(0x27b);}}class _0xab82e4 extends _0x10bda0{constructor(_0x2191a6,_0x52d515){const _0x4036c5=_0x4307;super(_0x2191a6+'@'+_0x52d515+'\x20does\x20not\x20exist','NOT_FOUND',{'type':_0x2191a6,'key':_0x52d515}),this[_0x4036c5(0x378)]='OKDBNotFoundError';}}class _0x56e278 extends _0x10bda0{constructor(_0x4272a2,_0xfa66c2){const _0x2ef599=_0x4307;super(_0x4272a2+'@'+_0xfa66c2+_0x2ef599(0x18f),'ALREADY_EXISTS',{'type':_0x4272a2,'key':_0xfa66c2}),this['name']='OKDBAlreadyExistsError';}}class _0x38ecc3 extends _0x10bda0{constructor(_0x518622,_0x35eab9){const _0x176ebd=_0x4307,_0x1a38c9=typeof _0x35eab9;super(_0x176ebd(0x2c3)+_0x518622+_0x176ebd(0x497)+_0x1a38c9+'.\x20Only\x20primitives,\x20null,\x20Buffers,\x20and\x20arrays\x20are\x20allowed.\x20Got:\x20'+_0x35eab9,_0x176ebd(0x280),{'index':_0x518622,'key':_0x35eab9,'keyType':_0x1a38c9}),this['name']=_0x176ebd(0x3f1);}}class _0x108c50 extends _0x10bda0{constructor(_0xb4247){const _0x197bbd=_0x4307,_0x45da49=typeof _0xb4247;super('Invalid\x20primary\x20key\x20type:\x20'+_0x45da49+'.\x20Primary\x20keys\x20must\x20be\x20string\x20or\x20number.\x20Got:\x20'+_0xb4247,_0x197bbd(0x304),{'key':_0xb4247,'keyType':_0x45da49}),this[_0x197bbd(0x378)]='OKDBInvalidPrimaryKeyError';}}class _0x2473fb extends _0x10bda0{constructor(_0xb2f879){const _0x3a7103=_0x4307;super(_0x3a7103(0x6c3)+_0xb2f879+_0x3a7103(0x22a),_0x3a7103(0x64b),{'type':_0xb2f879}),this[_0x3a7103(0x378)]=_0x3a7103(0x4e5);}}class _0x3847c2 extends _0x10bda0{constructor(_0x2277da){const _0x57d467=_0x4307;super(_0x57d467(0x6c3)+_0x2277da+_0x57d467(0x572),_0x57d467(0x734),{'type':_0x2277da}),this[_0x57d467(0x378)]=_0x57d467(0x196);}}class _0x5767fa extends _0x10bda0{constructor(_0xd1429d,_0x3d9037){const _0x260760=_0x4307;super(_0x260760(0x755)+_0x3d9037+_0x260760(0x744)+_0xd1429d+_0x260760(0x22a),'INDEX_NOT_REGISTERED',{'type':_0xd1429d,'index':_0x3d9037}),this[_0x260760(0x378)]='OKDBIndexNotRegisteredError';}}class _0x294a88 extends _0x10bda0{constructor(_0x21d7d3,_0x1a63ab){const _0x39e7ce=_0x4307;super(_0x39e7ce(0x755)+_0x1a63ab+'\x27\x20on\x20type\x20\x27'+_0x21d7d3+_0x39e7ce(0x1be),_0x39e7ce(0x405),{'type':_0x21d7d3,'index':_0x1a63ab}),this[_0x39e7ce(0x378)]=_0x39e7ce(0x276);}}class _0x565250 extends _0x10bda0{constructor(_0x619221,_0x490593={}){const _0x483e56=_0x4307;super(_0x619221,_0x483e56(0x5ac),_0x490593),this[_0x483e56(0x378)]=_0x483e56(0x33e);}}class _0x1cd9e5 extends _0x10bda0{constructor(_0x5a9f5e,_0x5d4dd0,_0x25e69a,_0x4d9dd4,_0x1ccc66){const _0x34916a=_0x4307;super(_0x34916a(0x467)+_0x5a9f5e+'@'+_0x5d4dd0+':\x20key\x20['+_0x25e69a+_0x34916a(0x3d4)+_0x4d9dd4+_0x34916a(0x462)+_0x1ccc66+'\x27',_0x34916a(0x697),{'type':_0x5a9f5e,'index':_0x5d4dd0,'indexKey':_0x25e69a,'existingKey':_0x4d9dd4,'conflictingKey':_0x1ccc66}),this[_0x34916a(0x378)]=_0x34916a(0x6be);}}class _0x3194d3 extends _0x10bda0{constructor(_0x35bec9,_0x353452,_0x5b9c58){const _0x326980=_0x4307;super(_0x326980(0x218)+_0x35bec9+'@'+_0x353452,_0x326980(0x6f8),{'type':_0x35bec9,'key':_0x353452,'errors':_0x5b9c58}),this[_0x326980(0x378)]=_0x326980(0x426),this[_0x326980(0x5e4)]=_0x35bec9,this[_0x326980(0x566)]=_0x353452,this[_0x326980(0x6db)]=_0x5b9c58;}}class _0x58dced extends _0x10bda0{constructor(_0x5dced0,_0xdc1b6a){const _0xc58d73=_0x4307;super(_0xc58d73(0x3ec)+_0x5dced0+':\x20'+_0xdc1b6a['length']+_0xc58d73(0x18d),'SCHEMA_COLLECTION_INVALID',{'type':_0x5dced0,'failures':_0xdc1b6a}),this[_0xc58d73(0x378)]=_0xc58d73(0x3b8),this[_0xc58d73(0x5e4)]=_0x5dced0,this[_0xc58d73(0x3b0)]=_0xdc1b6a;}}class _0x1590b7 extends _0x10bda0{constructor(_0xfb9739,_0x3075bd,_0x422a7f,_0x20d806,_0x1a9152){const _0x20fc16=_0x4307;super(_0x20fc16(0x420)+_0xfb9739+'@'+_0x3075bd+'.'+_0x422a7f+_0x20fc16(0x514)+_0x20d806+'@'+_0x1a9152+_0x20fc16(0x229),'FOREIGN_KEY_VIOLATION',{'sourceType':_0xfb9739,'sourceKey':_0x3075bd,'fieldPath':_0x422a7f,'targetType':_0x20d806,'targetKey':_0x1a9152}),this['name']=_0x20fc16(0x775),this[_0x20fc16(0x336)]=_0xfb9739,this['sourceKey']=_0x3075bd,this[_0x20fc16(0x56c)]=_0x422a7f,this['targetType']=_0x20d806,this[_0x20fc16(0x4f2)]=_0x1a9152;}}class _0x28aac9 extends _0x10bda0{constructor(_0x4b65c8,_0x1d811e,_0x416725){const _0x327c59=_0x4307;super(_0x327c59(0x192)+_0x4b65c8+'@'+_0x1d811e+':\x20'+_0x416725[_0x327c59(0x503)]+_0x327c59(0x63f),_0x327c59(0x748),{'targetType':_0x4b65c8,'targetKey':_0x1d811e,'references':_0x416725}),this[_0x327c59(0x378)]=_0x327c59(0x3ff),this[_0x327c59(0x356)]=_0x4b65c8,this['targetKey']=_0x1d811e,this[_0x327c59(0x286)]=_0x416725;}}class _0x4ba594 extends _0x10bda0{constructor(_0x44127d,_0x11a650,_0x58aa33){const _0x1f2126=_0x4307;super(_0x1f2126(0x456)+_0x11a650+_0x1f2126(0x232)+_0x44127d+'\x22\x20is\x20used\x20by:\x20'+_0x58aa33['map'](_0x399d3c=>_0x399d3c['kind']+':'+_0x399d3c[_0x1f2126(0x378)])[_0x1f2126(0x29f)](',\x20'),'INDEX_HAS_CONSUMERS',{'type':_0x44127d,'index':_0x11a650,'usedBy':_0x58aa33}),this[_0x1f2126(0x378)]='OKDBIndexHasConsumersError';}}return okdbError={'OKDBError':_0x10bda0,'OKDBVersionMismatchError':_0x5412a7,'OKDBNotFoundError':_0xab82e4,'OKDBAlreadyExistsError':_0x56e278,'OKDBInvalidIndexKeyError':_0x38ecc3,'OKDBInvalidPrimaryKeyError':_0x108c50,'OKDBTypeNotRegisteredError':_0x2473fb,'OKDBTypeAlreadyRegisteredError':_0x3847c2,'OKDBIndexNotRegisteredError':_0x5767fa,'OKDBIndexAlreadyRegisteredError':_0x294a88,'OKDBInvalidValueError':_0x565250,'OKDBUniqueConstraintError':_0x1cd9e5,'OKDBSchemaValidationError':_0x3194d3,'OKDBSchemaCollectionError':_0x58dced,'OKDBForeignKeyError':_0x1590b7,'OKDBForeignKeyDeleteError':_0x28aac9,'OKDBIndexHasConsumersError':_0x4ba594},okdbError;}var okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x5c5641=_0x362184;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0xa0a502={'PUT':_0x5c5641(0x66a),'REMOVE':_0x5c5641(0x488),'INDEX_DROP':'dropIndex','INDEX_REGISTER':_0x5c5641(0x372),'INDEX_RESET':'resetIndex','TYPE_REGISTER':_0x5c5641(0x3d7),'TYPE_DROP':'dropType','FTS_REGISTER':_0x5c5641(0x5d7),'FTS_DROP':'dropFts','FTS_RESET':_0x5c5641(0x1f2),'SCHEMA_SET':_0x5c5641(0x49a),'SCHEMA_DROP':'dropSchema','TTL_SET':'setTtl','TTL_CLEAR':_0x5c5641(0x58b)},_0x209bb0={'SYSTEM_READY':_0x5c5641(0x54a),'FIELD_RESOLVER_REGISTERED':_0x5c5641(0x4d0),'SYSTEM_STOPPED':'system:stopped','SYSTEM_CLOCK_CHANGE':_0x5c5641(0x1b3),'SYSTEM_POKE':'system:poke','SYSTEM_DRAIN':'system:drain','SYSTEM_TYPE_DROP':'system:type_drop','SYSTEM_PROC':_0x5c5641(0x4b0),'SYSTEM_BUS_STATE_CHANGE':_0x5c5641(0x36e),'ITEM_CREATE':_0x5c5641(0x74a),'ITEM_UPDATE':_0x5c5641(0x3ee),'ITEM_REMOVE':_0x5c5641(0x22c),'INDEX_RESET':_0x5c5641(0x24e),'INDEX_READY':'index:ready','INDEX_PROGRESS':_0x5c5641(0x5b4),'VIEW_PROGRESS':_0x5c5641(0x3e9),'INDEX_DROP':_0x5c5641(0x644),'INDEX_REGISTERED':'index:registered','FTS_REGISTERED':_0x5c5641(0x561),'FTS_DROP':_0x5c5641(0x64a),'FTS_RESET':_0x5c5641(0x2d1),'SCHEMA_SET':_0x5c5641(0x366),'SCHEMA_DROP':_0x5c5641(0x4e3),'UNIQUE_VIOLATION':_0x5c5641(0x6e6),'UNIQUE_VIOLATION_RESOLVED':_0x5c5641(0x348),'REF_VIOLATION':_0x5c5641(0x2da),'REF_VIOLATION_RESOLVED':_0x5c5641(0x591),'SYNC_APPLY':_0x5c5641(0x688),'TXN_START':_0x5c5641(0x5ed),'TXN_END':'txn:end','TXN_ROLLBACK':_0x5c5641(0x266),'TYPE_REGISTERED':_0x5c5641(0x5d2),'TYPE_DROP':'type:drop','ENV_OPENED':_0x5c5641(0x501),'ENV_REMOVED':_0x5c5641(0x245),'SYSTEM_ENV_RELEASE':_0x5c5641(0x716),'TTL_EXPIRED':_0x5c5641(0x1f1),'TTL_SET':'ttl:set','TTL_CLEAR':_0x5c5641(0x50e),'LICENSE_INVALID':_0x5c5641(0x2ab),'LICENSE_ADDED':_0x5c5641(0x262),'LICENSE_ACTIVATED':'license:activated','LICENSE_REMOVED':'license:removed'},_0x2cb7eb={'CREATING':_0x5c5641(0x47f),'RESETTING':'resetting','READY':_0x5c5641(0x5da),'DROPPING':_0x5c5641(0x1fc),'WAITING':_0x5c5641(0x425),'ERROR':_0x5c5641(0x5b7)},_0x37ebac={'CREATED':_0x5c5641(0x55e),'STARTING':_0x5c5641(0x19b),'STARTED':_0x5c5641(0x6c0),'STOPPING':_0x5c5641(0x35e),'STOPPED':'stopped'},_0x5f4309={'CREATING':'creating','READY':_0x5c5641(0x5da),'HALTED':'halted','STOPPED':_0x5c5641(0x367),'RESETTING':'resetting'},_0x35ed61=Object[_0x5c5641(0x24a)]({'POKE':_0x5c5641(0x1e4),'DRAIN':_0x5c5641(0x291),'TYPE_DROP':_0x5c5641(0x577),'PROC':_0x5c5641(0x340),'ENV_RELEASE':_0x5c5641(0x763)});return okdbEnums={'BUS_EVENTS':_0x35ed61,'CHANGE_ACTIONS':_0xa0a502,'EVENTS':_0x209bb0,'INDEX_STATE':_0x2cb7eb,'OKDB_STATE':_0x37ebac,'VIEW_STATE':_0x5f4309},okdbEnums;}var okdbPubkey,hasRequiredOkdbPubkey;function requireOkdbPubkey(){const _0x11cf1d=_0x362184;if(hasRequiredOkdbPubkey)return okdbPubkey;hasRequiredOkdbPubkey=0x1;const _0x4ad1a1=require$$1$1,_0x58136c=require$$1,_0x4622c1=require$$2,_0x56836e=_0x4ad1a1[_0x11cf1d(0x2a8)](_0x58136c[_0x11cf1d(0x29f)](__dirname,_0x11cf1d(0x319)),_0x11cf1d(0x6f6))['trim'](),_0x3ccac7=_0x4622c1['createPublicKey'](_0x56836e)[_0x11cf1d(0x28c)]({'type':_0x11cf1d(0x498),'format':_0x11cf1d(0x248)}),_0x4fd122=_0x4622c1[_0x11cf1d(0x506)](_0x11cf1d(0x33b))[_0x11cf1d(0x594)](_0x3ccac7)['digest'](_0x11cf1d(0x767))['slice'](0x0,0x10);return okdbPubkey={'PUBLIC_KEY_PEM':_0x56836e,'PUB_FINGERPRINT':_0x4fd122},okdbPubkey;}var okdbLicense,hasRequiredOkdbLicense;function requireOkdbLicense(){const _0x2330c8=_0x362184;if(hasRequiredOkdbLicense)return okdbLicense;hasRequiredOkdbLicense=0x1;const _0x162793=require$$2,{OKDBError:_0x51da13}=requireOkdbError(),{EVENTS:_0x114a32}=requireOkdbEnums(),_0x584a05=requireOkdbLicenseCodec(),{LICENSE_TYPE_OPEN:_0x1e5701,LICENSE_TYPE_INTERNAL:_0x55d8cf,OPEN_LICENSE_MAX_DURATION_MS:_0x2f1745}=_0x584a05,_0x261870=requireOkdbPubkey(),_0x4618b0={'LICENSED_BUILD':_0x2330c8(0x47d),'PUBLIC_KEY_PEM':_0x261870[_0x2330c8(0x363)],'PUB_FINGERPRINT':_0x261870['PUB_FINGERPRINT'],'LICENSE_EXPIRED_ACTION':'log'},_0x27e0c3='~licenses',_0x34455b={'features':{'sync':![],'embeddings':!![],'engines':![],'fts':!![],'timeMachine':![],'views':!![],'mcp':!![],'files':!![]},'limits':{'envs':0x5,'typesPerEnv':0xa,'syncPeers':0x0,'maxWrites':0xf4240,'pipelinesPerEnv':0x2},'_isFree':!![]};async function _0x1a3303(_0x514621){await _0x514621['ensureType'](_0x27e0c3);}class _0x332dbb{constructor(_0x1ea86b){const _0x50124d=_0x2330c8;this[_0x50124d(0x784)]=_0x1ea86b,this[_0x50124d(0x3ed)]=null;}async['reload'](){const _0x36898a=_0x2330c8,_0x3540f9=this[_0x36898a(0x784)]['_systemEnv'];if(!_0x3540f9||!_0x3540f9[_0x36898a(0x4d9)](_0x27e0c3)){this[_0x36898a(0x3ed)]=null;return;}const _0x219f72=this['okdb']['id'];let _0x59c837=null;for(const {key:_0x352647,value:_0x18d2c8}of _0x3540f9[_0x36898a(0x73f)](_0x27e0c3)){const _0x1693cd=this[_0x36898a(0x563)](_0x18d2c8,_0x219f72);_0x1693cd==='active'&&!_0x59c837&&(_0x59c837={..._0x18d2c8,'id':_0x352647,'status':_0x1693cd});}this[_0x36898a(0x3ed)]=_0x59c837;if(this['_active']&&this[_0x36898a(0x3ed)][_0x36898a(0x6ba)]===_0x1e5701){const _0x3c41e8=Math[_0x36898a(0x752)]((this[_0x36898a(0x3ed)][_0x36898a(0x4f7)]-Date[_0x36898a(0x6fd)]())/0x5265c00);this['okdb'][_0x36898a(0x273)]?.[_0x36898a(0x21b)](_0x36898a(0x18c)+_0x3c41e8+_0x36898a(0x3c5),{'feature':_0x36898a(0x20d),'licensee':this[_0x36898a(0x3ed)][_0x36898a(0x67a)],'expiresAt':new Date(this[_0x36898a(0x3ed)][_0x36898a(0x4f7)])[_0x36898a(0x2d7)]()});}this[_0x36898a(0x3ed)]&&this['_active']['licenseType']===_0x55d8cf&&this[_0x36898a(0x784)][_0x36898a(0x273)]?.[_0x36898a(0x21b)](_0x36898a(0x35f),{'feature':_0x36898a(0x20d),'licensee':this[_0x36898a(0x3ed)][_0x36898a(0x67a)]});}[_0x2330c8(0x563)](_0x8af13f,_0x758565){const _0x5f42ec=_0x2330c8;if(!_0x8af13f[_0x5f42ec(0x33c)])return _0x5f42ec(0x6c2);let _0x2c5831;try{_0x2c5831=_0x584a05['decodeLicenseBlob'](_0x8af13f[_0x5f42ec(0x33c)]);}catch(_0x3e0da6){return _0x5f42ec(0x6c2);}try{const _0x2fcd2c=_0x162793[_0x5f42ec(0x5e1)](null,_0x2c5831[_0x5f42ec(0x63d)],_0x4618b0['PUBLIC_KEY_PEM'],_0x2c5831[_0x5f42ec(0x434)]);if(!_0x2fcd2c)return _0x5f42ec(0x6c2);}catch(_0x519e05){return _0x5f42ec(0x6c2);}if(_0x2c5831[_0x5f42ec(0x5ef)][_0x5f42ec(0x6ba)]===_0x55d8cf)return _0x5f42ec(0x569);if(_0x2c5831[_0x5f42ec(0x5ef)]['expiresAt']<=Date[_0x5f42ec(0x6fd)]())return _0x5f42ec(0x1cd);if(_0x2c5831[_0x5f42ec(0x5ef)][_0x5f42ec(0x6ba)]===_0x1e5701)return _0x5f42ec(0x569);if(!_0x8af13f[_0x5f42ec(0x6c5)])return _0x5f42ec(0x2f0);const _0x55723a=_0x584a05['verifyActivation']({'tokenString':_0x8af13f[_0x5f42ec(0x6c5)],'nodeId':_0x758565,'rawBlobBuf':_0x2c5831[_0x5f42ec(0x332)],'pubKeyPem':_0x4618b0['PUBLIC_KEY_PEM'],'pubFingerprint':_0x4618b0['PUB_FINGERPRINT']});if(_0x55723a[_0x5f42ec(0x271)]===_0x5f42ec(0x487)||_0x55723a['reason']==='SIG_INVALID')return _0x5f42ec(0x2b2);if(_0x55723a[_0x5f42ec(0x271)]===_0x5f42ec(0x65c))return _0x5f42ec(0x1cd);if(!_0x55723a['valid'])return _0x5f42ec(0x2b2);return _0x5f42ec(0x569);}get[_0x2330c8(0x569)](){return this['_active'];}get[_0x2330c8(0x236)](){const _0x44db0d=_0x2330c8;return this[_0x44db0d(0x3ed)]??_0x34455b;}['assertFeature'](_0x2dc38a){const _0x1e5aa8=_0x2330c8;if(_0x4618b0[_0x1e5aa8(0x1ef)]!=='true')return;const _0x58ca6d=this[_0x1e5aa8(0x236)];if(!_0x58ca6d[_0x1e5aa8(0x2e2)]?.[_0x2dc38a]){const _0x417ced=_0x58ca6d[_0x1e5aa8(0x3ad)]?_0x1e5aa8(0x5bd)+_0x2dc38a+_0x1e5aa8(0x3de)+_0x2dc38a+'\x22\x20to\x20enable\x20it.':_0x1e5aa8(0x28b)+_0x2dc38a+_0x1e5aa8(0x54b)+_0x2dc38a+'\x22.';throw new _0x51da13(_0x417ced,'LICENSE_FEATURE_DISABLED',{'feature':_0x2dc38a});}}[_0x2330c8(0x527)](_0x58a790){const _0x57db56=_0x2330c8;if(_0x4618b0[_0x57db56(0x1ef)]!==_0x57db56(0x47d))return!![];return!!this[_0x57db56(0x236)][_0x57db56(0x2e2)]?.[_0x58a790];}[_0x2330c8(0x38e)](_0x1972cf){const _0x1683c8=_0x2330c8;if(_0x4618b0[_0x1683c8(0x1ef)]!=='true')return![];const _0x17c259=this['effective']['limits']?.[_0x1972cf];return!(_0x17c259===null||_0x17c259===undefined||_0x17c259===0x0);}['assertLimit'](_0x420dbc,_0x42470a){const _0xe4beae=_0x2330c8;if(_0x4618b0[_0xe4beae(0x1ef)]!==_0xe4beae(0x47d))return;const _0x2860ec=this[_0xe4beae(0x236)],_0x1c8761=_0x2860ec[_0xe4beae(0x3aa)]?.[_0x420dbc];if(_0x1c8761===null||_0x1c8761===undefined||_0x1c8761===0x0)return;if(_0x42470a>=_0x1c8761)throw new _0x51da13(_0xe4beae(0x57c)+_0x420dbc+'\x20('+_0x42470a+'/'+_0x1c8761+')',_0xe4beae(0x2b7),{'limit':_0x420dbc,'current':_0x42470a,'max':_0x1c8761});}async[_0x2330c8(0x793)](_0x24ed10){const _0x48d8f6=_0x2330c8;let _0x45667c;try{_0x45667c=_0x584a05[_0x48d8f6(0x382)](_0x24ed10);}catch(_0x294941){throw new _0x51da13('Invalid\x20license\x20blob:\x20'+_0x294941['message'],_0x48d8f6(0x431));}let _0x30cdff;try{_0x30cdff=_0x162793[_0x48d8f6(0x5e1)](null,_0x45667c['payload'],_0x4618b0[_0x48d8f6(0x363)],_0x45667c[_0x48d8f6(0x434)]);}catch(_0x102530){throw new _0x51da13(_0x48d8f6(0x214)+_0x102530['message'],_0x48d8f6(0x431));}if(!_0x30cdff)throw new _0x51da13(_0x48d8f6(0x284)+(_0x48d8f6(0x720)+_0x4618b0[_0x48d8f6(0x6a8)]+'.\x20')+_0x48d8f6(0x3c1),_0x48d8f6(0x431),{'expectedFingerprint':_0x4618b0[_0x48d8f6(0x6a8)]});if(_0x45667c[_0x48d8f6(0x5ef)][_0x48d8f6(0x6ba)]===_0x1e5701){const _0x11ea33=_0x45667c[_0x48d8f6(0x5ef)][_0x48d8f6(0x4f7)]-_0x45667c[_0x48d8f6(0x5ef)][_0x48d8f6(0x4dd)];if(_0x11ea33>_0x2f1745)throw new _0x51da13(_0x48d8f6(0x68a)+Math[_0x48d8f6(0x752)](_0x11ea33/(0x1e*0x5265c00))+'\x20months\x20from\x20issuance)','LICENSE_INVALID');}const _0x77e30a=this['okdb'][_0x48d8f6(0x791)];await _0x1a3303(_0x77e30a);const _0x21eb9a=_0x584a05[_0x48d8f6(0x350)](_0x45667c[_0x48d8f6(0x332)])[_0x48d8f6(0x288)](_0x48d8f6(0x767));for(const {key:_0x2f67d8,value:_0x41f488}of _0x77e30a[_0x48d8f6(0x73f)](_0x27e0c3)){if(_0x41f488[_0x48d8f6(0x3a4)]===_0x21eb9a)throw new _0x51da13(_0x48d8f6(0x74e),_0x48d8f6(0x6e4),{'id':_0x2f67d8});}const _0x98cac3=_0x162793[_0x48d8f6(0x506)](_0x48d8f6(0x33b))[_0x48d8f6(0x594)](_0x48d8f6(0x776))[_0x48d8f6(0x594)](_0x45667c['rawBuf'])['digest'](_0x48d8f6(0x767)),_0x318a37=_0x98cac3[_0x48d8f6(0x5b8)](0x0,0x8)+'-'+_0x98cac3[_0x48d8f6(0x5b8)](0x8,0xc)+'-5'+_0x98cac3[_0x48d8f6(0x5b8)](0xd,0x10)+'-'+(parseInt(_0x98cac3[0x10],0x10)&0x3|0x8)['toString'](0x10)+_0x98cac3['slice'](0x11,0x14)+'-'+_0x98cac3[_0x48d8f6(0x5b8)](0x14,0x20),_0x28879a={'blob':_0x24ed10,'activation':null,'addedAt':Date['now'](),'_licenseHash':_0x21eb9a,'licensee':_0x45667c[_0x48d8f6(0x5ef)][_0x48d8f6(0x67a)],'expiresAt':_0x45667c[_0x48d8f6(0x5ef)][_0x48d8f6(0x4f7)],'features':_0x45667c[_0x48d8f6(0x5ef)][_0x48d8f6(0x2e2)],'limits':_0x45667c[_0x48d8f6(0x5ef)]['limits'],'licenseType':_0x45667c['decoded'][_0x48d8f6(0x6ba)]};return await _0x77e30a[_0x48d8f6(0x66a)](_0x27e0c3,_0x318a37,_0x28879a),{'id':_0x318a37,..._0x28879a};}async[_0x2330c8(0x41e)](_0x58e154){const _0x1594d2=_0x2330c8;let _0x4e3c62;try{_0x4e3c62=_0x584a05[_0x1594d2(0x538)](_0x58e154);}catch(_0x3f4d63){throw new _0x51da13(_0x1594d2(0x4cc)+_0x3f4d63[_0x1594d2(0x1e0)],_0x1594d2(0x29a));}const _0x1646cc=_0x4e3c62[_0x1594d2(0x350)][_0x1594d2(0x288)](_0x1594d2(0x767)),_0xfac78b=this['okdb'][_0x1594d2(0x791)];if(!_0xfac78b||!_0xfac78b['hasType'](_0x27e0c3))throw new _0x51da13('No\x20license\x20found\x20matching\x20this\x20activation\x20token',_0x1594d2(0x29a));let _0x5615fc=null,_0x267a54=null;for(const {key:_0x1e7851,value:_0x21ee4a}of _0xfac78b[_0x1594d2(0x73f)](_0x27e0c3)){if(_0x21ee4a[_0x1594d2(0x3a4)]===_0x1646cc){_0x5615fc=_0x1e7851,_0x267a54=_0x21ee4a;break;}}if(!_0x5615fc)throw new _0x51da13('No\x20license\x20found\x20matching\x20this\x20activation\x20token',_0x1594d2(0x29a));const {rawBuf:_0x536700}=_0x584a05[_0x1594d2(0x382)](_0x267a54[_0x1594d2(0x33c)]),_0x43617c=_0x584a05['verifyActivation']({'tokenString':_0x58e154,'nodeId':this[_0x1594d2(0x784)]['id'],'rawBlobBuf':_0x536700,'pubKeyPem':_0x4618b0[_0x1594d2(0x363)],'pubFingerprint':_0x4618b0['PUB_FINGERPRINT']});if(!_0x43617c[_0x1594d2(0x53a)])throw new _0x51da13(_0x1594d2(0x406)+_0x43617c['reason'],_0x1594d2(0x29a),{'reason':_0x43617c['reason']});const _0x2ecd6b={..._0x267a54,'activation':_0x58e154};return await _0xfac78b['update'](_0x27e0c3,_0x5615fc,_0x2ecd6b),{'id':_0x5615fc,..._0x2ecd6b};}async[_0x2330c8(0x686)](_0x330455){const _0x5dc710=_0x2330c8,_0x5e6399=this[_0x5dc710(0x784)][_0x5dc710(0x791)];if(!_0x5e6399||!_0x5e6399[_0x5dc710(0x4d9)](_0x27e0c3))return;await _0x5e6399[_0x5dc710(0x488)](_0x27e0c3,_0x330455);}async['listLicenses'](){const _0x40deed=_0x2330c8,_0x5bdbcf=this[_0x40deed(0x784)][_0x40deed(0x791)];if(!_0x5bdbcf||!_0x5bdbcf[_0x40deed(0x4d9)](_0x27e0c3))return[];const _0x1cedf9=this[_0x40deed(0x784)]['id'],_0x420614=[];for(const {key:_0x19b5b4,value:_0x44a444}of _0x5bdbcf[_0x40deed(0x73f)](_0x27e0c3)){const _0x454a04=this[_0x40deed(0x563)](_0x44a444,_0x1cedf9);_0x420614[_0x40deed(0x387)]({..._0x44a444,'id':_0x19b5b4,'status':_0x454a04});}return _0x420614;}['getPins'](){const _0x318760=_0x2330c8,_0x12687a=this[_0x318760(0x784)][_0x318760(0x791)];if(!_0x12687a||!_0x12687a['hasType'](_0x27e0c3))return[];const _0x54bc4c=this['okdb']['id'],_0xa7fc88=[];for(const {key:_0x4487d9,value:_0x2df564}of _0x12687a[_0x318760(0x73f)](_0x27e0c3)){if(_0x2df564[_0x318760(0x3a4)]){if(_0x2df564[_0x318760(0x6ba)]===_0x1e5701)_0xa7fc88[_0x318760(0x387)]({'licenseId':_0x4487d9,'pin':null});else{const _0x511cd6=Buffer[_0x318760(0x2f3)](_0x2df564[_0x318760(0x3a4)],_0x318760(0x767)),{pin:_0x4ba938}=_0x584a05[_0x318760(0x19c)](_0x54bc4c,_0x511cd6,_0x4618b0[_0x318760(0x6a8)]);_0xa7fc88[_0x318760(0x387)]({'licenseId':_0x4487d9,'pin':_0x4ba938});}}}return _0xa7fc88;}async['recheck'](){const _0x3e599c=_0x2330c8,_0x331df2=this[_0x3e599c(0x3ed)];await this[_0x3e599c(0x4ec)]();if(this[_0x3e599c(0x3ed)]&&this[_0x3e599c(0x3ed)]['licenseType']===_0x1e5701){const _0x55f8e8=Math[_0x3e599c(0x752)]((this[_0x3e599c(0x3ed)][_0x3e599c(0x4f7)]-Date['now']())/0x5265c00);this['okdb']['log']?.[_0x3e599c(0x21b)]('⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20'+_0x55f8e8+_0x3e599c(0x3c5),{'feature':'license','licensee':this[_0x3e599c(0x3ed)][_0x3e599c(0x67a)],'expiresAt':new Date(this[_0x3e599c(0x3ed)]['expiresAt'])[_0x3e599c(0x2d7)]()});}this[_0x3e599c(0x3ed)]&&this[_0x3e599c(0x3ed)][_0x3e599c(0x6ba)]===_0x55d8cf&&this[_0x3e599c(0x784)][_0x3e599c(0x273)]?.[_0x3e599c(0x21b)](_0x3e599c(0x35f),{'feature':'license','licensee':this['_active'][_0x3e599c(0x67a)]});if(_0x331df2&&!this[_0x3e599c(0x3ed)]){this[_0x3e599c(0x784)]['log']?.[_0x3e599c(0x21b)]('License\x20expired\x20or\x20invalidated',{'feature':_0x3e599c(0x20d)}),this['okdb'][_0x3e599c(0x3e2)]?.[_0x3e599c(0x41f)](_0x114a32['LICENSE_INVALID'],{'previous':_0x331df2});const _0x531684=this[_0x3e599c(0x784)][_0x3e599c(0x659)]?.[_0x3e599c(0x6ef)]??_0x4618b0[_0x3e599c(0x600)];_0x531684===_0x3e599c(0x774)&&(this['okdb'][_0x3e599c(0x273)]?.[_0x3e599c(0x5b7)]('Shutting\x20down\x20due\x20to\x20license\x20expiry',{'feature':_0x3e599c(0x20d)}),this[_0x3e599c(0x784)][_0x3e599c(0x543)]()[_0x3e599c(0x628)](()=>{})[_0x3e599c(0x5c5)](()=>process[_0x3e599c(0x393)](0x1)));}}}return okdbLicense={'LicenseChecker':_0x332dbb,'_C':_0x4618b0,'FREE_TIER':_0x34455b},okdbLicense;}var okdbShell,hasRequiredOkdbShell;function requireOkdbShell(){const _0x2a2824=_0x362184;if(hasRequiredOkdbShell)return okdbShell;hasRequiredOkdbShell=0x1;const _0x51c597=require$$0$2,_0x3afeb8=require$$1$1,_0x4597b4=require$$0,_0x396c43=require$$1,_0x2da170=_0x396c43[_0x2a2824(0x29f)](_0x4597b4[_0x2a2824(0x41a)](),_0x2a2824(0x518)),_0xfd95d6=0x3e8,_0x1b9306={'reset':_0x2a2824(0x1d9),'bold':_0x2a2824(0x49e),'dim':_0x2a2824(0x56b),'red':_0x2a2824(0x6c6),'green':'\x1b[32m','yellow':_0x2a2824(0x43d),'blue':'\x1b[34m','magenta':'\x1b[35m','cyan':'\x1b[36m','white':_0x2a2824(0x3bd),'gray':_0x2a2824(0x34a)},_0x5968ef=!process[_0x2a2824(0x3f5)][_0x2a2824(0x53f)]||!!process.env.NO_COLOR,_0x1f9979=(_0x537280,_0x5ba4e4)=>_0x5968ef?_0x5ba4e4:''+_0x537280+_0x5ba4e4+_0x1b9306[_0x2a2824(0x620)],_0x1ecc29={'error':_0x1b9306[_0x2a2824(0x482)],'warn':_0x1b9306['yellow'],'info':_0x1b9306[_0x2a2824(0x1eb)],'debug':_0x1b9306[_0x2a2824(0x195)]},_0x2adb06={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3};function _0xab5c9(_0x3e6988,_0x76e534=_0x2a2824(0x77a)){const _0x580cb8=_0x2a2824,{level:_0x4e6051,msg:_0x3efada,meta:_0x24fde8,context:_0x5bbd03,ts:_0x15db34}=_0x3e6988;if((_0x2adb06[_0x4e6051]??0x1)<(_0x2adb06[_0x76e534]??0x1))return;const _0x2b432b=_0x1f9979(_0x1b9306['gray'],new Date(_0x15db34)[_0x580cb8(0x2d7)]()),_0x1637c7=_0x1f9979(_0x1ecc29[_0x4e6051]??_0x1b9306['white'],_0x4e6051[_0x580cb8(0x619)](0x5));let _0x1b13b2='\x20\x20'+_0x2b432b+'\x20'+_0x1f9979(_0x1b9306[_0x580cb8(0x50b)],_0x1637c7)+'\x20'+_0x3efada;if(_0x24fde8&&Object[_0x580cb8(0x2ac)](_0x24fde8)[_0x580cb8(0x503)]>0x0){const _0x5c09ff=Object[_0x580cb8(0x62b)](_0x24fde8)[_0x580cb8(0x626)](([_0x571495,_0x266140])=>_0x571495+'='+_0x266140)[_0x580cb8(0x29f)]('\x20');_0x1b13b2+=_0x1f9979(_0x1b9306[_0x580cb8(0x260)],_0x580cb8(0x736)+_0x5c09ff+']');}if(_0x5bbd03!==undefined){const _0x1e51a0=typeof _0x5bbd03===_0x580cb8(0x40d)?JSON['stringify'](_0x5bbd03):String(_0x5bbd03);_0x1b13b2+=_0x1f9979(_0x1b9306['dim'],'\x20\x20'+_0x1e51a0);}const _0x206f83=_0x4e6051==='error'||_0x4e6051===_0x580cb8(0x21b)?process[_0x580cb8(0x556)][_0x580cb8(0x6cc)]['bind'](process[_0x580cb8(0x556)]):process['stdout']['write'][_0x580cb8(0x723)](process[_0x580cb8(0x3f5)]);_0x206f83(_0x1b13b2+'\x0a');}function _0x156cf5(_0x1cbf6b,_0x3dbd68){const _0x48f7a5=_0x2a2824;if(_0x1cbf6b===0xcc||_0x1cbf6b>=0xc8&&_0x1cbf6b<0x12c&&!_0x3dbd68){console[_0x48f7a5(0x273)](_0x48f7a5(0x608)+_0x1f9979(_0x1b9306['green'],'✓')+'\x0a');return;}if(_0x1cbf6b>=0x190||_0x3dbd68?.['error']){const _0x4d825b=_0x3dbd68?.[_0x48f7a5(0x5b7)]??_0x3dbd68?.[_0x48f7a5(0x1e0)]??'HTTP\x20'+_0x1cbf6b;console[_0x48f7a5(0x273)](_0x48f7a5(0x608)+_0x1f9979(_0x1b9306[_0x48f7a5(0x482)],'✗')+'\x20'+_0x1f9979(_0x1b9306[_0x48f7a5(0x50b)]+_0x1b9306[_0x48f7a5(0x482)],String(_0x1cbf6b))+'\x20\x20'+_0x4d825b+'\x0a');return;}const _0x21e48f=Object[_0x48f7a5(0x359)][_0x48f7a5(0x46b)][_0x48f7a5(0x668)](_0x3dbd68??{},_0x48f7a5(0x401))?_0x3dbd68[_0x48f7a5(0x401)]:_0x3dbd68,_0x8f493d=_0x3dbd68?.['meta'];console[_0x48f7a5(0x273)](''),_0x546c28(_0x21e48f,'\x20\x20');if(_0x8f493d?.[_0x48f7a5(0x5b9)]!=null||_0x8f493d?.[_0x48f7a5(0x1d5)]!=null){const _0xdd1e54=[];if(_0x8f493d[_0x48f7a5(0x5b9)]!=null)_0xdd1e54['push'](_0x8f493d[_0x48f7a5(0x5b9)]+_0x48f7a5(0x46f)+(_0x8f493d[_0x48f7a5(0x5b9)]!==0x1?'s':''));if(_0x8f493d[_0x48f7a5(0x1d5)]!=null)_0xdd1e54[_0x48f7a5(0x387)](_0x8f493d[_0x48f7a5(0x1d5)]+'ms');console[_0x48f7a5(0x273)]('\x0a\x20\x20'+_0x1f9979(_0x1b9306[_0x48f7a5(0x260)],_0xdd1e54[_0x48f7a5(0x29f)](_0x48f7a5(0x6d4))));}console[_0x48f7a5(0x273)]('');}function _0x546c28(_0x33e8ce,_0x182574=''){const _0x21ccc2=_0x2a2824;if(_0x33e8ce===null||_0x33e8ce===undefined){console[_0x21ccc2(0x273)](_0x182574+_0x1f9979(_0x1b9306[_0x21ccc2(0x260)],'(null)'));return;}if(Array[_0x21ccc2(0x65e)](_0x33e8ce)){if(_0x33e8ce[_0x21ccc2(0x503)]===0x0){console['log'](_0x182574+_0x1f9979(_0x1b9306[_0x21ccc2(0x260)],_0x21ccc2(0x53b)));return;}if(_0x33e8ce[_0x21ccc2(0x3a1)](_0x31aafa=>_0x31aafa&&typeof _0x31aafa===_0x21ccc2(0x40d)&&'key'in _0x31aafa&&_0x21ccc2(0x481)in _0x31aafa)){_0xc3917b(_0x33e8ce,_0x182574);return;}if(_0x33e8ce[_0x21ccc2(0x3a1)](_0x443cb0=>_0x443cb0&&typeof _0x443cb0===_0x21ccc2(0x40d)&&'type'in _0x443cb0&&_0x21ccc2(0x5b9)in _0x443cb0)){_0x1e2a1b(_0x33e8ce,_0x182574);return;}if(_0x33e8ce[_0x21ccc2(0x3a1)](_0x417e0c=>typeof _0x417e0c!==_0x21ccc2(0x40d)||_0x417e0c===null)){_0x33e8ce[_0x21ccc2(0x5c0)]((_0x3cec9f,_0x18aec9)=>console[_0x21ccc2(0x273)](_0x182574+_0x1f9979(_0x1b9306[_0x21ccc2(0x195)],_0x18aec9+0x1+'.')+'\x20'+_0x1f9979(_0x1b9306[_0x21ccc2(0x777)],String(_0x3cec9f))));return;}_0x33e8ce['forEach']((_0xddfa09,_0x44f68a)=>{const _0x4dfbbe=_0x21ccc2;console[_0x4dfbbe(0x273)](_0x182574+_0x1f9979(_0x1b9306[_0x4dfbbe(0x260)],'['+_0x44f68a+']'));if(typeof _0xddfa09===_0x4dfbbe(0x40d)&&_0xddfa09!==null)_0x36c5d9(_0xddfa09,_0x182574+'\x20\x20');else console[_0x4dfbbe(0x273)](_0x182574+'\x20\x20'+String(_0xddfa09));});return;}if(typeof _0x33e8ce===_0x21ccc2(0x40d)){if(_0x21ccc2(0x566)in _0x33e8ce&&_0x21ccc2(0x481)in _0x33e8ce&&Object[_0x21ccc2(0x2ac)](_0x33e8ce)[_0x21ccc2(0x503)]<=0x3){console[_0x21ccc2(0x273)](_0x182574+_0x1f9979(_0x1b9306[_0x21ccc2(0x50b)]+_0x1b9306[_0x21ccc2(0x1eb)],String(_0x33e8ce[_0x21ccc2(0x566)])));const _0x2ae18c=_0x33e8ce[_0x21ccc2(0x481)];if(_0x2ae18c&&typeof _0x2ae18c===_0x21ccc2(0x40d))_0x36c5d9(_0x2ae18c,_0x182574);else console[_0x21ccc2(0x273)](_0x182574+_0x1f9979(_0x1b9306['white'],String(_0x2ae18c)));return;}_0x36c5d9(_0x33e8ce,_0x182574);return;}console[_0x21ccc2(0x273)](_0x182574+_0x1f9979(_0x1b9306[_0x21ccc2(0x777)],String(_0x33e8ce)));}function _0x36c5d9(_0x2eb04a,_0x455570=''){const _0x156175=_0x2a2824,_0x593954=Object[_0x156175(0x62b)](_0x2eb04a);if(_0x593954[_0x156175(0x503)]===0x0){console['log'](_0x455570+_0x1f9979(_0x1b9306[_0x156175(0x260)],'{}'));return;}const _0x51c37b=Math[_0x156175(0x311)](0x1c,Math[_0x156175(0x270)](..._0x593954[_0x156175(0x626)](([_0x1383a1])=>_0x1383a1['length'])));for(const [_0x2167b6,_0x31889a]of _0x593954){const _0x4195c9=_0x1f9979(_0x1b9306[_0x156175(0x1eb)],_0x2167b6[_0x156175(0x619)](_0x51c37b));if(_0x31889a===null||_0x31889a===undefined)console[_0x156175(0x273)](_0x455570+_0x4195c9+'\x20\x20'+_0x1f9979(_0x1b9306[_0x156175(0x260)],'null'));else{if(typeof _0x31889a===_0x156175(0x40d)){const _0x46f352=JSON[_0x156175(0x72f)](_0x31889a);_0x46f352[_0x156175(0x503)]<=0x50?console[_0x156175(0x273)](_0x455570+_0x4195c9+'\x20\x20'+_0x1f9979(_0x1b9306[_0x156175(0x260)],_0x46f352)):(console[_0x156175(0x273)](_0x455570+_0x4195c9),_0x546c28(_0x31889a,_0x455570+'\x20\x20'));}else{const _0x242fee=typeof _0x31889a===_0x156175(0x6ff)?_0x1f9979(_0x31889a?_0x1b9306['green']:_0x1b9306['yellow'],String(_0x31889a)):typeof _0x31889a===_0x156175(0x6e3)?_0x1f9979(_0x1b9306['magenta'],String(_0x31889a)):_0x1f9979(_0x1b9306[_0x156175(0x777)],String(_0x31889a));console[_0x156175(0x273)](_0x455570+_0x4195c9+'\x20\x20'+_0x242fee);}}}}function _0xc3917b(_0x8d7a39,_0x57fee5=''){const _0x3babb5=_0x2a2824,_0x390fed=Math['min'](0x20,Math['max'](..._0x8d7a39['map'](_0x860151=>String(_0x860151[_0x3babb5(0x566)])['length'])));for(const {key:_0x49f9a4,value:_0xcfe819,score:_0x4286b1,clock:_0x32103c}of _0x8d7a39){const _0x54c10f=_0x1f9979(_0x1b9306[_0x3babb5(0x50b)]+_0x1b9306['cyan'],String(_0x49f9a4)[_0x3babb5(0x619)](_0x390fed)),_0x5201aa=_0xcfe819==null?_0x1f9979(_0x1b9306[_0x3babb5(0x260)],_0x3babb5(0x750)):typeof _0xcfe819===_0x3babb5(0x40d)?_0x1f9979(_0x1b9306[_0x3babb5(0x260)],JSON[_0x3babb5(0x72f)](_0xcfe819)):_0x1f9979(_0x1b9306[_0x3babb5(0x777)],String(_0xcfe819)),_0x468008=_0x4286b1!=null?_0x1f9979(_0x1b9306[_0x3babb5(0x195)],'\x20\x20score:'+_0x4286b1['toFixed'](0x4)):'',_0x373f05=_0x32103c!=null?_0x1f9979(_0x1b9306['gray'],_0x3babb5(0x444)+_0x32103c):'';console['log'](_0x57fee5+_0x54c10f+'\x20\x20'+_0x5201aa+_0x468008+_0x373f05);}}function _0x1e2a1b(_0x36396e,_0x3a6e71=''){const _0x355b09=_0x2a2824,_0x137c79=Math['min'](0x20,Math[_0x355b09(0x270)](..._0x36396e[_0x355b09(0x626)](_0x4f0b57=>_0x4f0b57['type']['length'])));for(const {type:_0x6a4a69,count:_0xc5c20a,fields:_0x53ac5e}of _0x36396e){if(_0x6a4a69[_0x355b09(0x637)]('~'))continue;const _0x24d9e1=_0x1f9979(_0x1b9306[_0x355b09(0x50b)]+_0x1b9306[_0x355b09(0x1eb)],_0x6a4a69[_0x355b09(0x619)](_0x137c79)),_0x1afcbb=_0x1f9979(_0x1b9306['magenta'],String(_0xc5c20a)[_0x355b09(0x2e7)](0x6))+_0x1f9979(_0x1b9306[_0x355b09(0x260)],_0x355b09(0x45e)),_0x1b0224=_0x53ac5e&&Object[_0x355b09(0x2ac)](_0x53ac5e)['length']?_0x1f9979(_0x1b9306[_0x355b09(0x260)],'\x20\x20·\x20'+Object[_0x355b09(0x2ac)](_0x53ac5e)[_0x355b09(0x5b8)](0x0,0x6)[_0x355b09(0x29f)](',\x20')+(Object[_0x355b09(0x2ac)](_0x53ac5e)[_0x355b09(0x503)]>0x6?'…':'')):'';console[_0x355b09(0x273)](_0x3a6e71+_0x24d9e1+'\x20\x20'+_0x1afcbb+_0x1b0224);}}const _0x2d6a1c=['types','type/','queue/',_0x2a2824(0x6ab),_0x2a2824(0x5ab),_0x2a2824(0x6f5)];function _0x10769f(_0x1e1b15,_0x5c9679){const _0x23f5a9=_0x2a2824;if(_0x1e1b15[_0x23f5a9(0x637)](_0x23f5a9(0x7a0)))return _0x1e1b15;if(_0x1e1b15[_0x23f5a9(0x637)]('/'))return _0x23f5a9(0x5fc)+_0x1e1b15;if(_0x1e1b15[_0x23f5a9(0x637)](_0x23f5a9(0x28f)))return _0x23f5a9(0x7a0)+_0x1e1b15;const _0x1ea877=_0x2d6a1c[_0x23f5a9(0x6ad)](_0x49306e=>_0x1e1b15===_0x49306e['replace'](/\/$/,'')||_0x1e1b15[_0x23f5a9(0x637)](_0x49306e));return _0x1ea877?_0x23f5a9(0x6fc)+_0x5c9679+'/'+_0x1e1b15:_0x23f5a9(0x7a0)+_0x1e1b15;}function _0x1d1c00(_0x47fea8){const _0xe363ef=_0x2a2824,_0x301345={},_0x43eb59=[];let _0x66082e=0x0;while(_0x66082e<_0x47fea8[_0xe363ef(0x503)]){if((_0x47fea8[_0x66082e]===_0xe363ef(0x5ce)||_0x47fea8[_0x66082e]==='-e')&&_0x47fea8[_0x66082e+0x1]&&!_0x47fea8[_0x66082e+0x1][_0xe363ef(0x637)]('-'))_0x301345[_0xe363ef(0x758)]=_0x47fea8[++_0x66082e];else _0x47fea8[_0x66082e]===_0xe363ef(0x355)||_0x47fea8[_0x66082e]==='-h'?_0x301345[_0xe363ef(0x3f2)]=!![]:_0x43eb59['push'](_0x47fea8[_0x66082e]);_0x66082e++;}return{'flags':_0x301345,'rest':_0x43eb59};}const _0x217846={'system':_0x2a2824(0x5d3),'envs':_0x2a2824(0x3b3),'types':_0x2a2824(0x2b0),'data':_0x2a2824(0x353),'indexes':'Indexes','fts':_0x2a2824(0x1a4),'sync':_0x2a2824(0x773),'queue':'Queue','files':_0x2a2824(0x45a),'embeddings':_0x2a2824(0x4eb),'engines':_0x2a2824(0x337),'admin':_0x2a2824(0x277),'event':_0x2a2824(0x681),'processor':'Processors'},_0x30c13c=[_0x2a2824(0x2ad),_0x2a2824(0x364),_0x2a2824(0x4fc),_0x2a2824(0x6af),'indexes',_0x2a2824(0x4ee),_0x2a2824(0x317),_0x2a2824(0x708),'files',_0x2a2824(0x61e),'engines','admin'];function _0x45e8c1(_0x30e662){const _0x1f6156=_0x2a2824;return _0x30e662[_0x1f6156(0x18e)](/^\/api/,'')[_0x1f6156(0x18e)](/^\[\/env\/:env=[^\]]*\]/,'[env]')['replace'](/^\/env\/:env/,_0x1f6156(0x4b9))[_0x1f6156(0x18e)](/^\//,'');}function _0x6d3537(_0x4dfc76,_0x42508f=''){const _0x88a95d=_0x2a2824,_0x4f627e=_0x4dfc76[_0x88a95d(0x635)][_0x88a95d(0x4a0)]()['filter'](_0x9a4346=>!_0x9a4346[_0x88a95d(0x58a)]?.[_0x88a95d(0x3ea)]),_0x152259=_0x42508f?_0x4f627e[_0x88a95d(0x1ff)](_0x35d914=>_0x35d914['path'][_0x88a95d(0x4ff)]()['includes'](_0x42508f[_0x88a95d(0x4ff)]())||(_0x5c39e7(_0x35d914)??'')['toLowerCase']()[_0x88a95d(0x1dc)](_0x42508f[_0x88a95d(0x4ff)]())||_0x5ba79a(_0x35d914)['some'](_0xd077e1=>_0xd077e1[_0x88a95d(0x4ff)]()[_0x88a95d(0x1dc)](_0x42508f[_0x88a95d(0x4ff)]()))):_0x4f627e;if(!_0x152259[_0x88a95d(0x503)]){console['log'](_0x1f9979(_0x1b9306[_0x88a95d(0x6a1)],'\x0a\x20\x20No\x20routes\x20matching\x20\x22'+_0x42508f+'\x22\x0a'));return;}const _0x4f742b=new Map();for(const _0x4d2718 of _0x152259){const _0x296c76=_0x5ba79a(_0x4d2718)[0x0]??_0x88a95d(0x61b);if(!_0x4f742b[_0x88a95d(0x52e)](_0x296c76))_0x4f742b[_0x88a95d(0x36f)](_0x296c76,[]);_0x4f742b['get'](_0x296c76)['push'](_0x4d2718);}const _0x50f4cf=[..._0x30c13c[_0x88a95d(0x1ff)](_0x509f6e=>_0x4f742b['has'](_0x509f6e)),...[..._0x4f742b[_0x88a95d(0x2ac)]()]['filter'](_0x1d1d39=>!_0x30c13c[_0x88a95d(0x1dc)](_0x1d1d39))];console['log']('');for(const _0x487041 of _0x50f4cf){const _0x546eac=_0x4f742b[_0x88a95d(0x3e6)](_0x487041);if(!_0x546eac?.[_0x88a95d(0x503)])continue;console[_0x88a95d(0x273)](_0x1f9979(_0x1b9306[_0x88a95d(0x50b)],'\x20\x20'+(_0x217846[_0x487041]??_0x487041)));for(const _0x21006d of _0x546eac){const _0x389c4e=_0x1f9979(_0x1b9306[_0x88a95d(0x651)],_0x21006d[_0x88a95d(0x5e0)][_0x88a95d(0x619)](0x7)),_0x4af2b9=_0x1f9979(_0x1b9306[_0x88a95d(0x1eb)],_0x45e8c1(_0x21006d['path'])),_0x336416=_0x5c39e7(_0x21006d)?_0x1f9979(_0x1b9306[_0x88a95d(0x260)],'\x20\x20'+_0x5c39e7(_0x21006d)):'',_0x385540=_0x21006d[_0x88a95d(0x71e)]?.['id']?_0x1f9979(_0x1b9306[_0x88a95d(0x195)],_0x88a95d(0x736)+_0x21006d[_0x88a95d(0x71e)]['id']+']'):'';console[_0x88a95d(0x273)]('\x20\x20\x20\x20'+_0x389c4e+'\x20'+_0x4af2b9+_0x336416+_0x385540);}console[_0x88a95d(0x273)]('');}}function _0x682161(_0x372da7,_0x2d4376){const _0x4290f6=_0x2a2824,_0x1a809b=_0x2d4376[_0x4290f6(0x18e)](/^\/api(\/env\/[^/]+)?\//,'')['split']('/')[0x0],_0x3159f4=_0x372da7[_0x4290f6(0x635)][_0x4290f6(0x4a0)]()[_0x4290f6(0x1ff)](_0x559fdc=>_0x559fdc[_0x4290f6(0x624)]['toLowerCase']()[_0x4290f6(0x1dc)](_0x1a809b[_0x4290f6(0x4ff)]()));if(!_0x3159f4['length']){console['log'](_0x1f9979(_0x1b9306[_0x4290f6(0x6a1)],_0x4290f6(0x419)+_0x2d4376+'\x0a'));return;}console[_0x4290f6(0x273)]('');for(const _0x170ed7 of _0x3159f4['slice'](0x0,0xc)){for(const _0x12a322 of _0x2ddbbf(_0x170ed7)){console[_0x4290f6(0x273)](_0x12a322);}console[_0x4290f6(0x273)]('');}}function _0x5c39e7(_0x5a3976){const _0x116ccd=_0x2a2824;return _0x5a3976[_0x116ccd(0x71e)]?.['summary']??_0x5a3976[_0x116ccd(0x58a)]?.[_0x116ccd(0x2d5)]??'';}function _0x103851(_0x5f56fb){const _0x10fc80=_0x2a2824;return _0x5f56fb['operation']?.[_0x10fc80(0x373)]??_0x5f56fb[_0x10fc80(0x58a)]?.['description']??'';}function _0x5ba79a(_0x3dd30f){const _0x122156=_0x2a2824;return _0x3dd30f[_0x122156(0x71e)]?.[_0x122156(0x4d7)]?.['length']?_0x3dd30f[_0x122156(0x71e)][_0x122156(0x4d7)]:_0x3dd30f[_0x122156(0x58a)]?.['tags']??[];}function _0x2ddbbf(_0x48f4b9){const _0x158b2c=_0x2a2824,_0x32ccec=[];_0x32ccec['push']('\x20\x20'+_0x1f9979(_0x1b9306[_0x158b2c(0x50b)]+_0x1b9306[_0x158b2c(0x651)],_0x48f4b9['method'][_0x158b2c(0x619)](0x7))+'\x20'+_0x1f9979(_0x1b9306[_0x158b2c(0x50b)]+_0x1b9306['cyan'],_0x48f4b9['path']));_0x48f4b9[_0x158b2c(0x71e)]?.['id']&&_0x32ccec['push'](_0x158b2c(0x6ce)+_0x1f9979(_0x1b9306['gray'],_0x158b2c(0x5f4)+_0x48f4b9[_0x158b2c(0x71e)]['id']));_0x5c39e7(_0x48f4b9)&&_0x32ccec[_0x158b2c(0x387)](_0x158b2c(0x6ce)+_0x1f9979(_0x1b9306[_0x158b2c(0x777)],_0x5c39e7(_0x48f4b9)));_0x103851(_0x48f4b9)&&_0x32ccec['push']('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x1f9979(_0x1b9306[_0x158b2c(0x260)],_0x103851(_0x48f4b9)));_0x5ba79a(_0x48f4b9)[_0x158b2c(0x503)]&&_0x32ccec[_0x158b2c(0x387)](_0x158b2c(0x6ce)+_0x1f9979(_0x1b9306[_0x158b2c(0x195)],_0x158b2c(0x75e)+_0x5ba79a(_0x48f4b9)[_0x158b2c(0x29f)](',\x20')));_0x48f4b9['operation']?.[_0x158b2c(0x217)]?.['access']&&_0x32ccec[_0x158b2c(0x387)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x1f9979(_0x1b9306['gray'],'access:\x20'+_0x48f4b9[_0x158b2c(0x71e)][_0x158b2c(0x217)][_0x158b2c(0x28d)]));_0x48f4b9[_0x158b2c(0x71e)]?.[_0x158b2c(0x635)]?.[_0x158b2c(0x240)]&&_0x48f4b9[_0x158b2c(0x71e)][_0x158b2c(0x635)][_0x158b2c(0x240)]!=='standard'&&_0x32ccec[_0x158b2c(0x387)](_0x158b2c(0x6ce)+_0x1f9979(_0x1b9306['gray'],_0x158b2c(0x694)+_0x48f4b9[_0x158b2c(0x71e)][_0x158b2c(0x635)][_0x158b2c(0x240)]));if(_0x48f4b9[_0x158b2c(0x71e)]?.[_0x158b2c(0x484)]){const _0x51bac2=Object[_0x158b2c(0x2ac)](_0x48f4b9[_0x158b2c(0x71e)][_0x158b2c(0x484)][_0x158b2c(0x5f7)]||{});if(_0x51bac2[_0x158b2c(0x503)])_0x32ccec['push'](_0x158b2c(0x6ce)+_0x1f9979(_0x1b9306['gray'],_0x158b2c(0x44f)+_0x51bac2['join'](',\x20')));}return _0x48f4b9[_0x158b2c(0x58a)]?.[_0x158b2c(0x505)]&&_0x32ccec[_0x158b2c(0x387)](_0x158b2c(0x6ce)+_0x1f9979(_0x1b9306['gray'],_0x158b2c(0x63b)+JSON['stringify'](_0x48f4b9[_0x158b2c(0x58a)]['body']))),_0x32ccec;}async function _0xc0723a(_0x1d931e,_0x3c2e2f,_0x9b4b16,_0x4b781f=null){const _0x45a319=_0x2a2824,_0x25a434=_0x9b4b16['indexOf']('?'),_0x5c7e47=_0x25a434>=0x0?_0x9b4b16[_0x45a319(0x5b8)](0x0,_0x25a434):_0x9b4b16,_0x34e6ca=_0x25a434>=0x0?_0x9b4b16[_0x45a319(0x5b8)](_0x25a434+0x1):'',_0x4d3103=Object[_0x45a319(0x6fe)](new URLSearchParams(_0x34e6ca)[_0x45a319(0x62b)]());return _0x1d931e[_0x45a319(0x635)][_0x45a319(0x435)](_0x3c2e2f,_0x5c7e47,{'body':_0x4b781f,'query':_0x4d3103,'headers':{'content-type':_0x45a319(0x44b)}},{'internal':!![]});}function _0x179112(_0x3d964f){const _0x499f8c=_0x2a2824;if(!_0x3d964f)return null;const _0x26263d=_0x3d964f[_0x499f8c(0x6f3)]();if(!_0x26263d)return null;try{return JSON[_0x499f8c(0x663)](_0x26263d);}catch{}try{return JSON[_0x499f8c(0x663)](_0x251578(_0x26263d));}catch(_0x23d0d3){throw new SyntaxError(_0x23d0d3['message'],{'cause':_0x23d0d3});}}function _0x251578(_0x1d2696){const _0x18d5e8=_0x2a2824;let _0x38440d='',_0x300246=0x0;while(_0x300246<_0x1d2696[_0x18d5e8(0x503)]){const _0x49fd92=_0x1d2696[_0x300246];if(_0x49fd92==='\x22'){_0x38440d+='\x22',_0x300246++;while(_0x300246<_0x1d2696[_0x18d5e8(0x503)]&&_0x1d2696[_0x300246]!=='\x22'){if(_0x1d2696[_0x300246]==='\x5c'){_0x38440d+=_0x1d2696[_0x300246++];if(_0x300246<_0x1d2696['length'])_0x38440d+=_0x1d2696[_0x300246++];}else _0x38440d+=_0x1d2696[_0x300246++];}_0x38440d+='\x22';if(_0x300246<_0x1d2696['length'])_0x300246++;continue;}if(_0x49fd92==='\x27'){_0x38440d+='\x22',_0x300246++;while(_0x300246<_0x1d2696[_0x18d5e8(0x503)]&&_0x1d2696[_0x300246]!=='\x27'){if(_0x1d2696[_0x300246]==='\x5c'&&_0x1d2696[_0x300246+0x1]==='\x27')_0x38440d+='\x27',_0x300246+=0x2;else _0x1d2696[_0x300246]==='\x22'?(_0x38440d+='\x5c\x22',_0x300246++):_0x38440d+=_0x1d2696[_0x300246++];}_0x38440d+='\x22';if(_0x300246<_0x1d2696[_0x18d5e8(0x503)])_0x300246++;continue;}if(_0x18d5e8(0x35d)['includes'](_0x49fd92)){_0x38440d+=_0x49fd92,_0x300246++;continue;}let _0x36e91c='';while(_0x300246<_0x1d2696[_0x18d5e8(0x503)]&&!_0x18d5e8(0x19d)[_0x18d5e8(0x1dc)](_0x1d2696[_0x300246])&&_0x1d2696[_0x300246]!=='\x20'&&_0x1d2696[_0x300246]!=='\x09'&&_0x1d2696[_0x300246]!=='\x0a'&&_0x1d2696[_0x300246]!=='\x0d'){_0x36e91c+=_0x1d2696[_0x300246++];}let _0xd3792e=_0x300246;while(_0xd3792e<_0x1d2696[_0x18d5e8(0x503)]&&(_0x1d2696[_0xd3792e]==='\x20'||_0x1d2696[_0xd3792e]==='\x09'))_0xd3792e++;if(_0x1d2696[_0xd3792e]===':')_0x38440d+='\x22'+_0x36e91c+'\x22';else _0x36e91c==='true'||_0x36e91c==='false'||_0x36e91c===_0x18d5e8(0x750)||/^-?\d+(\.\d+)?([eE][+-]?\d+)?$/[_0x18d5e8(0x193)](_0x36e91c)?_0x38440d+=_0x36e91c:_0x38440d+='\x22'+_0x36e91c+'\x22';}return _0x38440d[_0x18d5e8(0x18e)](/,(\s*[}\]])/g,'$1');}function _0xa35b86(_0x5a6a95){const _0x16ea25=_0x2a2824,_0x45081e=[];let _0xf211f7=0x0;while(_0xf211f7<_0x5a6a95['length']){while(_0xf211f7<_0x5a6a95[_0x16ea25(0x503)]&&(_0x5a6a95[_0xf211f7]==='\x20'||_0x5a6a95[_0xf211f7]==='\x09'))_0xf211f7++;if(_0xf211f7>=_0x5a6a95[_0x16ea25(0x503)])break;const _0x43b112=_0x5a6a95[_0xf211f7];if(_0x43b112==='{'||_0x43b112==='['){const _0x22de9a=_0x43b112==='{'?'}':']',_0x195641=_0xf211f7++;let _0x27f4c5=0x1,_0x3efc1d=![],_0x3ea9e3='';while(_0xf211f7<_0x5a6a95[_0x16ea25(0x503)]&&_0x27f4c5>0x0){const _0x58932f=_0x5a6a95[_0xf211f7];if(_0x3efc1d){if(_0x58932f==='\x5c')_0xf211f7++;else{if(_0x58932f===_0x3ea9e3)_0x3efc1d=![];}}else{if(_0x58932f==='\x22'||_0x58932f==='\x27')_0x3efc1d=!![],_0x3ea9e3=_0x58932f;else{if(_0x58932f===_0x43b112)_0x27f4c5++;else{if(_0x58932f===_0x22de9a)_0x27f4c5--;}}}_0xf211f7++;}_0x45081e['push'](_0x5a6a95['slice'](_0x195641,_0xf211f7));continue;}if(_0x43b112==='\x22'||_0x43b112==='\x27'){const _0x2cac15=_0x43b112;_0xf211f7++;let _0x468907='';while(_0xf211f7<_0x5a6a95[_0x16ea25(0x503)]&&_0x5a6a95[_0xf211f7]!==_0x2cac15){if(_0x5a6a95[_0xf211f7]==='\x5c'&&_0xf211f7+0x1<_0x5a6a95['length'])_0xf211f7++,_0x468907+=_0x5a6a95[_0xf211f7++];else _0x468907+=_0x5a6a95[_0xf211f7++];}if(_0xf211f7<_0x5a6a95[_0x16ea25(0x503)])_0xf211f7++;_0x45081e[_0x16ea25(0x387)](_0x468907);continue;}let _0x1fc9f6='';while(_0xf211f7<_0x5a6a95[_0x16ea25(0x503)]&&_0x5a6a95[_0xf211f7]!=='\x20'&&_0x5a6a95[_0xf211f7]!=='\x09'&&_0x5a6a95[_0xf211f7]!=='{'&&_0x5a6a95[_0xf211f7]!=='['){_0x1fc9f6+=_0x5a6a95[_0xf211f7++];}if(_0x1fc9f6)_0x45081e['push'](_0x1fc9f6);}return _0x45081e;}function _0x497e68(_0x2d6c8e,_0x2fc060){const _0x37c412=_0x2a2824,_0x1fd280=[..._0x2d6c8e[_0x37c412(0x6ca)][_0x37c412(0x2ac)]()][_0x37c412(0x1ff)](_0x31ca52=>!_0x31ca52['startsWith']('~'));console[_0x37c412(0x273)](['',_0x1f9979(_0x1b9306['bold']+_0x1b9306['cyan'],_0x37c412(0x42d)),_0x1f9979(_0x1b9306[_0x37c412(0x50b)]+_0x1b9306[_0x37c412(0x1eb)],_0x37c412(0x57f))+_0x1f9979(_0x1b9306[_0x37c412(0x50b)],_0x37c412(0x3d2))+_0x1f9979(_0x1b9306[_0x37c412(0x50b)]+_0x1b9306[_0x37c412(0x1eb)],'║'),_0x1f9979(_0x1b9306[_0x37c412(0x50b)]+_0x1b9306[_0x37c412(0x1eb)],_0x37c412(0x264)),'','\x20\x20'+_0x1f9979(_0x1b9306[_0x37c412(0x3f7)],'✓')+'\x20'+_0x1f9979(_0x1b9306['bold'],_0x37c412(0x492))+_0x37c412(0x52f)+_0x2fc060[_0x37c412(0x5f6)],..._0x2fc060[_0x37c412(0x598)]>0x1?['\x20\x20'+_0x1f9979(_0x1b9306[_0x37c412(0x3f7)],'✓')+'\x20'+_0x1f9979(_0x1b9306[_0x37c412(0x50b)],_0x37c412(0x3a6))+'\x20'+_0x2fc060[_0x37c412(0x598)]+'\x20HTTP\x20workers\x20'+_0x1f9979(_0x1b9306[_0x37c412(0x195)],_0x37c412(0x329))]:[],'\x20\x20'+_0x1f9979(_0x1b9306[_0x37c412(0x3f7)],'✓')+'\x20'+_0x1f9979(_0x1b9306[_0x37c412(0x50b)],_0x37c412(0x24f))+'\x20\x20\x20\x20\x20http://localhost:'+_0x2fc060[_0x37c412(0x5f6)]+_0x37c412(0x5fc),'\x20\x20'+_0x1f9979(_0x1b9306[_0x37c412(0x3f7)],'✓')+'\x20'+_0x1f9979(_0x1b9306[_0x37c412(0x50b)],_0x37c412(0x624))+_0x37c412(0x583)+_0x2fc060[_0x37c412(0x28e)],'\x20\x20'+_0x1f9979(_0x1b9306[_0x37c412(0x3f7)],'✓')+'\x20'+_0x1f9979(_0x1b9306['bold'],'id')+_0x37c412(0x643)+_0x1f9979(_0x1b9306[_0x37c412(0x195)],_0x2d6c8e['id']),'\x20\x20'+_0x1f9979(_0x1b9306[_0x37c412(0x3f7)],'✓')+'\x20'+_0x1f9979(_0x1b9306['bold'],_0x37c412(0x364))+_0x37c412(0x583)+_0x1fd280[_0x37c412(0x626)](_0x2ed69d=>_0x1f9979(_0x1b9306[_0x37c412(0x1eb)],_0x2ed69d))['join']('\x20\x20'),..._0x2fc060[_0x37c412(0x6b6)]?[]:['\x20\x20'+_0x1f9979(_0x1b9306['green'],'✓')+'\x20'+_0x1f9979(_0x1b9306[_0x37c412(0x50b)],_0x37c412(0x4f4))+'\x20\x20\x20http://localhost:'+_0x2fc060[_0x37c412(0x5f6)]+_0x37c412(0x7a5)],'',_0x1f9979(_0x1b9306[_0x37c412(0x260)],'\x20\x20Type\x20'+_0x1f9979(_0x1b9306[_0x37c412(0x50b)],_0x37c412(0x3f2))+_0x37c412(0x574)+_0x1f9979(_0x1b9306[_0x37c412(0x50b)],_0x37c412(0x654))+_0x37c412(0x283)+_0x1f9979(_0x1b9306[_0x37c412(0x50b)],_0x37c412(0x393))+_0x37c412(0x287)),''][_0x37c412(0x29f)]('\x0a'));}function _0x411453(_0x2e8729){const _0x22bafd=_0x2a2824;console[_0x22bafd(0x273)]('\x0a'+_0x1f9979(_0x1b9306[_0x22bafd(0x50b)],_0x22bafd(0x6d5))+'\x20\x20'+_0x1f9979(_0x1b9306[_0x22bafd(0x260)],'—\x20/api/\x20is\x20auto-prefixed,\x20env\x20is\x20auto-injected')+'\x0a\x0a\x20\x20'+_0x1f9979(_0x1b9306['cyan'],_0x22bafd(0x2a4))+_0x22bafd(0x58e)+_0x1f9979(_0x1b9306[_0x22bafd(0x1eb)],'<path>')+'\x20'+_0x1f9979(_0x1b9306[_0x22bafd(0x6a1)],_0x22bafd(0x371))+_0x22bafd(0x738)+_0x1f9979(_0x1b9306[_0x22bafd(0x1eb)],_0x22bafd(0x31c))+'\x20'+_0x1f9979(_0x1b9306['cyan'],'<path>')+'\x20'+_0x1f9979(_0x1b9306['yellow'],_0x22bafd(0x1b8))+_0x22bafd(0x5c1)+_0x1f9979(_0x1b9306[_0x22bafd(0x260)],_0x22bafd(0x26d))+_0x22bafd(0x742)+_0x1f9979(_0x1b9306[_0x22bafd(0x195)],_0x22bafd(0x77a))+_0x22bafd(0x2e1)+_0x1f9979(_0x1b9306['gray'],'envs')+_0x22bafd(0x5e2)+_0x1f9979(_0x1b9306[_0x22bafd(0x195)],_0x22bafd(0x4fc))+'\x20\x20\x20\x20\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/'+_0x2e8729[_0x22bafd(0x758)]+_0x22bafd(0x75c)+_0x1f9979(_0x1b9306[_0x22bafd(0x195)],_0x22bafd(0x257))+_0x22bafd(0x1cb)+_0x2e8729[_0x22bafd(0x758)]+_0x22bafd(0x1bb)+_0x1f9979(_0x1b9306['gray'],_0x22bafd(0x68c))+_0x22bafd(0x1e7)+_0x2e8729['env']+_0x22bafd(0x3e4)+_0x1f9979(_0x1b9306[_0x22bafd(0x195)],'type/users/query\x20{\x22active\x22:true}')+'\x20→\x20POST\x20/api/env/'+_0x2e8729[_0x22bafd(0x758)]+_0x22bafd(0x60b)+_0x1f9979(_0x1b9306[_0x22bafd(0x195)],'PUT\x20type/users/item/x\x20{\x22n\x22:1}')+_0x22bafd(0x742)+_0x1f9979(_0x1b9306[_0x22bafd(0x195)],_0x22bafd(0x5d1))+'\x0a\x20\x20\x20\x20'+_0x1f9979(_0x1b9306['gray'],_0x22bafd(0x51a))+_0x22bafd(0x42f)+_0x1f9979(_0x1b9306['bold'],'\x20\x20Flags')+'\x20\x20'+_0x1f9979(_0x1b9306[_0x22bafd(0x260)],_0x22bafd(0x790))+'\x0a\x0a\x20\x20'+_0x1f9979(_0x1b9306[_0x22bafd(0x1eb)],'--env\x20<name>')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20override\x20active\x20environment\x20for\x20this\x20call\x0a\x20\x20'+_0x1f9979(_0x1b9306[_0x22bafd(0x1eb)],'--help')+_0x22bafd(0x45d)+_0x1f9979(_0x1b9306['dim'],_0x22bafd(0x26d))+'\x0a\x20\x20\x20\x20'+_0x1f9979(_0x1b9306[_0x22bafd(0x195)],_0x22bafd(0x4ae))+_0x22bafd(0x742)+_0x1f9979(_0x1b9306[_0x22bafd(0x195)],_0x22bafd(0x783))+_0x22bafd(0x742)+_0x1f9979(_0x1b9306[_0x22bafd(0x195)],_0x22bafd(0x1a6))+'\x0a\x0a'+_0x1f9979(_0x1b9306[_0x22bafd(0x50b)],_0x22bafd(0x675))+'\x0a\x0a\x20\x20'+_0x1f9979(_0x1b9306[_0x22bafd(0x1eb)],'use\x20<env>')+_0x22bafd(0x1c7)+_0x1f9979(_0x1b9306[_0x22bafd(0x1eb)],_0x22bafd(0x758))+_0x22bafd(0x754)+_0x1f9979(_0x1b9306[_0x22bafd(0x1eb)],_0x22bafd(0x654))+'\x20'+_0x1f9979(_0x1b9306[_0x22bafd(0x260)],_0x22bafd(0x3f9))+'\x20\x20\x20\x20\x20\x20\x20\x20\x20browse\x20API\x20routes,\x20grouped\x20by\x20area\x0a\x20\x20'+_0x1f9979(_0x1b9306[_0x22bafd(0x1eb)],_0x22bafd(0x308))+'\x20'+_0x1f9979(_0x1b9306[_0x22bafd(0x260)],_0x22bafd(0x2ae))+'\x20\x20\x20\x20\x20control\x20log\x20verbosity\x0a\x20\x20'+_0x1f9979(_0x1b9306[_0x22bafd(0x1eb)],_0x22bafd(0x1bc))+_0x22bafd(0x4e7)+_0x1f9979(_0x1b9306[_0x22bafd(0x1eb)],'help')+_0x22bafd(0x4de)+_0x1f9979(_0x1b9306[_0x22bafd(0x1eb)],_0x22bafd(0x393))+'\x20'+_0x1f9979(_0x1b9306[_0x22bafd(0x260)],_0x22bafd(0x5f5))+'\x20\x20\x20\x20graceful\x20shutdown\x0a');}let _0x5a9a33=![];async function _0x1cfc4d(_0x346f4f,_0x5a904d=0x0,_0x1bbcda=null){const _0x1e6399=_0x2a2824;_0x5a9a33&&(process[_0x1e6399(0x556)][_0x1e6399(0x6cc)](_0x1f9979(_0x1b9306[_0x1e6399(0x482)],'\x0a\x20\x20[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a')),process[_0x1e6399(0x393)](0x82));_0x5a9a33=!![],process[_0x1e6399(0x3f5)]['write']('\x0a'),process[_0x1e6399(0x556)][_0x1e6399(0x6cc)](_0x1f9979(_0x1b9306['yellow'],'\x20\x20[okdb]\x20'+(_0x1bbcda?_0x1e6399(0x412)+_0x1bbcda+',\x20':'')+_0x1e6399(0x5fe)));const _0xbdf76e=setTimeout(()=>{const _0xcdbf9=_0x1e6399;process[_0xcdbf9(0x556)][_0xcdbf9(0x6cc)](_0x1f9979(_0x1b9306[_0xcdbf9(0x482)],_0xcdbf9(0x43c))),process['exit'](0x1);},0x1388);try{await _0x346f4f[_0x1e6399(0x543)]();}catch(_0x51150e){console['error'](_0x1f9979(_0x1b9306['red'],'\x20\x20'+_0x51150e[_0x1e6399(0x1e0)]));}clearTimeout(_0xbdf76e),process['stderr'][_0x1e6399(0x6cc)](_0x1f9979(_0x1b9306['dim'],_0x1e6399(0x3d8))),process['exit'](_0x5a904d);}function _0x43cde5(_0x50a432){const _0x397fb0=_0x2a2824,_0x4e8da0=_0x50a432[_0x397fb0(0x758)]!=='default'?_0x1f9979(_0x1b9306[_0x397fb0(0x6a1)],'['+_0x50a432[_0x397fb0(0x758)]+']'):'';return _0x1f9979(_0x1b9306['bold']+_0x1b9306[_0x397fb0(0x1eb)],_0x397fb0(0x784))+_0x4e8da0+_0x1f9979(_0x1b9306['gray'],'>\x20');}const _0x563be7=new Set(['GET',_0x2a2824(0x48d),_0x2a2824(0x48f),_0x2a2824(0x652),_0x2a2824(0x2ec)]);async function _0x5216df(_0x4b4bf9,_0x4d0e81,_0x4493ab,_0x144245,_0x39059d,_0x42f5ad){const _0x9c2672=_0x2a2824;_0x4b4bf9=_0x4b4bf9['trim']();if(!_0x4b4bf9||_0x4b4bf9['startsWith']('#'))return;const _0x9b8a67=_0xa35b86(_0x4b4bf9),{flags:_0x1f665b,rest:_0x564366}=_0x1d1c00(_0x9b8a67);if(!_0x564366['length'])return;const _0x2804cf=_0x564366[0x0],_0x1b4d86=_0x2804cf[_0x9c2672(0x575)]();if(_0x1b4d86===_0x9c2672(0x216)){if(_0x564366[0x1])_0x682161(_0x4d0e81,_0x10769f(_0x564366[0x1],_0x1f665b[_0x9c2672(0x758)]??_0x39059d[_0x9c2672(0x758)]));else _0x411453(_0x39059d);return;}if(_0x1b4d86===_0x9c2672(0x69f)){const _0x1b03f4=_0x564366[0x1];if(!_0x1b03f4){console[_0x9c2672(0x273)](_0x1f9979(_0x1b9306[_0x9c2672(0x482)],_0x9c2672(0x55b)));return;}try{_0x4d0e81[_0x9c2672(0x758)](_0x1b03f4),_0x39059d[_0x9c2672(0x758)]=_0x1b03f4,_0x42f5ad?.['setPrompt'](_0x43cde5(_0x39059d)),console['log'](_0x9c2672(0x608)+_0x1f9979(_0x1b9306[_0x9c2672(0x3f7)],'✓')+_0x9c2672(0x75b)+_0x1f9979(_0x1b9306[_0x9c2672(0x50b)]+_0x1b9306[_0x9c2672(0x1eb)],_0x1b03f4)+'\x0a');}catch{console[_0x9c2672(0x273)](_0x9c2672(0x608)+_0x1f9979(_0x1b9306[_0x9c2672(0x482)],'✗')+'\x20environment\x20'+_0x1f9979(_0x1b9306[_0x9c2672(0x50b)],_0x1b03f4)+_0x9c2672(0x4cb)+_0x1f9979(_0x1b9306[_0x9c2672(0x260)],_0x9c2672(0x463)));}return;}if(_0x1b4d86===_0x9c2672(0x5d4)){const _0x1350b5=[..._0x4d0e81['_envs'][_0x9c2672(0x2ac)]()][_0x9c2672(0x1ff)](_0x4daca8=>!_0x4daca8[_0x9c2672(0x637)]('~'));console['log']('');for(const _0x1c4527 of _0x1350b5){const _0x2f9601=_0x1c4527===_0x39059d[_0x9c2672(0x758)];console[_0x9c2672(0x273)]('\x20\x20'+(_0x2f9601?_0x1f9979(_0x1b9306[_0x9c2672(0x3f7)],'●'):_0x1f9979(_0x1b9306[_0x9c2672(0x260)],'○'))+'\x20\x20'+(_0x2f9601?_0x1f9979(_0x1b9306[_0x9c2672(0x50b)]+_0x1b9306[_0x9c2672(0x1eb)],_0x1c4527):_0x1f9979(_0x1b9306[_0x9c2672(0x260)],_0x1c4527)));}console[_0x9c2672(0x273)](_0x9c2672(0x608)+_0x1f9979(_0x1b9306['dim'],_0x9c2672(0x46a))+'\x20'+_0x1f9979(_0x1b9306[_0x9c2672(0x1eb)],_0x39059d[_0x9c2672(0x758)])),console['log']('');return;}if(_0x1b4d86===_0x9c2672(0x452)){const _0x5419c9=[..._0x4d0e81[_0x9c2672(0x6ca)][_0x9c2672(0x397)]()][_0x9c2672(0x1ff)](_0xf41402=>!_0xf41402[_0x9c2672(0x378)]['startsWith']('~'));console[_0x9c2672(0x273)]('');const _0x5ba65a=Math['max'](..._0x5419c9['map'](_0x1d0317=>_0x1d0317[_0x9c2672(0x378)][_0x9c2672(0x503)]));for(const _0x22ddc4 of _0x5419c9){const _0x370843=_0x22ddc4[_0x9c2672(0x378)]===_0x39059d[_0x9c2672(0x758)],_0x5b8dba=_0x370843?_0x1f9979(_0x1b9306[_0x9c2672(0x3f7)],'●'):_0x1f9979(_0x1b9306['dim'],'○'),_0x4eddd2=_0x370843?_0x1f9979(_0x1b9306[_0x9c2672(0x50b)]+_0x1b9306[_0x9c2672(0x1eb)],_0x22ddc4[_0x9c2672(0x378)][_0x9c2672(0x619)](_0x5ba65a)):_0x1f9979(_0x1b9306[_0x9c2672(0x260)],_0x22ddc4[_0x9c2672(0x378)][_0x9c2672(0x619)](_0x5ba65a)),_0x342386=[..._0x22ddc4['typeSubDbs'][_0x9c2672(0x2ac)]()]['filter'](_0x2d9395=>!_0x2d9395[_0x9c2672(0x637)]('~')),_0x43b35a=_0x342386[_0x9c2672(0x503)]?_0x1f9979(_0x1b9306[_0x9c2672(0x260)],_0x342386['slice'](0x0,0x5)[_0x9c2672(0x29f)](',\x20')+(_0x342386['length']>0x5?'\x20\x20+'+(_0x342386[_0x9c2672(0x503)]-0x5)+_0x9c2672(0x404):'')):_0x1f9979(_0x1b9306[_0x9c2672(0x260)],_0x9c2672(0x345));console[_0x9c2672(0x273)]('\x20\x20'+_0x5b8dba+'\x20\x20'+_0x4eddd2+'\x20\x20'+_0x43b35a);}console[_0x9c2672(0x273)]('');return;}if(_0x1b4d86===_0x9c2672(0x39b)){const _0x24f1b5=_0x1f665b[_0x9c2672(0x758)]??_0x564366[0x1]??_0x39059d[_0x9c2672(0x758)];try{const _0x5f488e=_0x4d0e81[_0x9c2672(0x758)](_0x24f1b5),_0x2dbd9d=[..._0x5f488e['typeSubDbs'][_0x9c2672(0x2ac)]()]['filter'](_0x2f14db=>!_0x2f14db['startsWith']('~'))[_0x9c2672(0x788)]();console[_0x9c2672(0x273)](_0x9c2672(0x608)+_0x1f9979(_0x1b9306[_0x9c2672(0x260)],_0x2dbd9d[_0x9c2672(0x503)]+_0x9c2672(0x66f)+(_0x2dbd9d[_0x9c2672(0x503)]!==0x1?'s':'')+'\x20in\x20'+_0x24f1b5));for(const _0x3259d6 of _0x2dbd9d){const _0x51bd64=_0x5f488e[_0x9c2672(0x71b)][_0x9c2672(0x3e6)](_0x3259d6),_0x5eb0c6=_0x51bd64?.[_0x9c2672(0x6af)]?.[_0x9c2672(0x4df)]?.()??0x0,_0x1e10a7=_0x1f9979(_0x1b9306[_0x9c2672(0x50b)]+_0x1b9306[_0x9c2672(0x1eb)],_0x3259d6[_0x9c2672(0x619)](0x1c));console[_0x9c2672(0x273)](_0x9c2672(0x583)+_0x1e10a7+'\x20\x20'+_0x1f9979(_0x1b9306[_0x9c2672(0x651)],String(_0x5eb0c6)[_0x9c2672(0x2e7)](0x6))+'\x20'+_0x1f9979(_0x1b9306[_0x9c2672(0x260)],_0x9c2672(0x712)));}console[_0x9c2672(0x273)]('');}catch(_0x4a13b1){console[_0x9c2672(0x5b7)](_0x1f9979(_0x1b9306['red'],_0x9c2672(0x608)+_0x4a13b1[_0x9c2672(0x1e0)]+'\x0a'));}return;}if(_0x1b4d86===_0x9c2672(0x2bb)){_0x6d3537(_0x4d0e81,_0x564366['slice'](0x1)['join']('\x20'));return;}if(_0x1b4d86===_0x9c2672(0x631)){const _0x10b975=(_0x564366[0x1]??'')[_0x9c2672(0x4ff)]();if(!_0x10b975||_0x10b975==='on')_0x144245[_0x9c2672(0x40c)]=!![],_0x144245[_0x9c2672(0x3f4)]=_0x9c2672(0x77a),console[_0x9c2672(0x273)](_0x9c2672(0x608)+_0x1f9979(_0x1b9306[_0x9c2672(0x3f7)],'✓')+_0x9c2672(0x5db)+_0x1f9979(_0x1b9306['dim'],'level:\x20info')+'\x0a');else{if(_0x10b975===_0x9c2672(0x77f))_0x144245[_0x9c2672(0x40c)]=![],console[_0x9c2672(0x273)](_0x9c2672(0x608)+_0x1f9979(_0x1b9306[_0x9c2672(0x6a1)],'○')+'\x20logs\x20off\x0a');else _0x2adb06[_0x10b975]!==undefined?(_0x144245['enabled']=!![],_0x144245[_0x9c2672(0x3f4)]=_0x10b975,console[_0x9c2672(0x273)](_0x9c2672(0x608)+_0x1f9979(_0x1b9306[_0x9c2672(0x3f7)],'✓')+_0x9c2672(0x384)+_0x1f9979(_0x1b9306[_0x9c2672(0x50b)],_0x10b975)+'\x0a')):console[_0x9c2672(0x5b7)](_0x1f9979(_0x1b9306[_0x9c2672(0x482)],_0x9c2672(0x451)));}return;}if(_0x1b4d86===_0x9c2672(0x6d0)||_0x1b4d86===_0x9c2672(0x3db)){await _0x1cfc4d(_0x4d0e81,0x0);return;}if(_0x1b4d86==='OPEN'){const _0x5eb564=_0x9c2672(0x1ac)+_0x4493ab[_0x9c2672(0x5f6)]+_0x9c2672(0x7a5),_0x1af210=process['platform']===_0x9c2672(0x293)?_0x9c2672(0x693)+_0x5eb564:process[_0x9c2672(0x3a3)]==='darwin'?_0x9c2672(0x678)+_0x5eb564:'xdg-open\x20'+_0x5eb564;require$$4[_0x9c2672(0x2b9)](_0x1af210),console[_0x9c2672(0x273)]('\x0a\x20\x20'+_0x1f9979(_0x1b9306['green'],'✓')+_0x9c2672(0x780)+_0x1f9979(_0x1b9306[_0x9c2672(0x1eb)],_0x5eb564)+'\x0a');return;}let _0xd2b9d4,_0x2f9da3,_0x201631;if(_0x563be7[_0x9c2672(0x52e)](_0x1b4d86)){_0xd2b9d4=_0x1b4d86,_0x2f9da3=_0x564366[0x1],_0x201631=_0x564366[_0x9c2672(0x5b8)](0x2);if(!_0x2f9da3){console[_0x9c2672(0x5b7)](_0x1f9979(_0x1b9306[_0x9c2672(0x482)],_0x9c2672(0x540)+_0x2804cf+_0x9c2672(0x30e)));return;}}else _0xd2b9d4=null,_0x2f9da3=_0x564366[0x0],_0x201631=_0x564366['slice'](0x1);const _0x48b676=_0x1f665b['env']??_0x39059d[_0x9c2672(0x758)],_0x2654a3=_0x10769f(_0x2f9da3,_0x48b676);if(_0x1f665b[_0x9c2672(0x3f2)]){_0x682161(_0x4d0e81,_0x2654a3);return;}let _0x25ea3d=null;if(_0x201631['length']){const _0x43f420=_0x201631[_0x9c2672(0x29f)]('\x20');try{_0x25ea3d=_0x179112(_0x43f420);}catch(_0x56ec0f){console[_0x9c2672(0x5b7)](_0x1f9979(_0x1b9306['red'],_0x9c2672(0x5d8)+_0x43f420+_0x9c2672(0x608)+_0x1f9979(_0x1b9306['dim'],_0x56ec0f['message'])+'\x0a'));return;}}if(!_0xd2b9d4)_0xd2b9d4=_0x25ea3d!==null?_0x9c2672(0x48d):_0x9c2672(0x51c);try{const _0x526a70=await _0xc0723a(_0x4d0e81,_0xd2b9d4,_0x2654a3,_0x25ea3d);_0x156cf5(_0x526a70[_0x9c2672(0x7a3)],_0x526a70[_0x9c2672(0x505)]);}catch(_0x3e4ad4){console[_0x9c2672(0x5b7)]('\x0a\x20\x20'+_0x1f9979(_0x1b9306[_0x9c2672(0x482)],'✗')+'\x20'+_0x3e4ad4[_0x9c2672(0x1e0)]+'\x0a');}}class _0x336a7c{constructor(){const _0x9ac6fe=_0x2a2824;this[_0x9ac6fe(0x201)]=new Map(),this['dynamic']=null,this['terminal']=![];}}function _0x5b09d0(_0x701dcf){const _0x2783ce=_0x2a2824,_0x2815f2=new _0x336a7c();for(const _0x49e0e0 of _0x701dcf){if(_0x49e0e0[_0x2783ce(0x58a)]?.[_0x2783ce(0x3ea)])continue;const _0x2dacee=_0x49e0e0[_0x2783ce(0x624)][_0x2783ce(0x18e)](/^\/api/,'')['replace'](/^\[\/env\/:env=[^\]]*\]/,'')[_0x2783ce(0x18e)](/^\//,'');if(!_0x2dacee)continue;let _0x39c6cd=_0x2815f2;for(const _0x42464d of _0x2dacee[_0x2783ce(0x3d5)]('/')[_0x2783ce(0x1ff)](Boolean)){if(_0x42464d[_0x2783ce(0x637)](':')){const _0x1c218b=_0x42464d[_0x2783ce(0x5b8)](0x1);if(!_0x39c6cd['dynamic'])_0x39c6cd[_0x2783ce(0x62f)]={'param':_0x1c218b,'node':new _0x336a7c()};_0x39c6cd=_0x39c6cd[_0x2783ce(0x62f)]['node'];}else{if(!_0x39c6cd[_0x2783ce(0x201)][_0x2783ce(0x52e)](_0x42464d))_0x39c6cd[_0x2783ce(0x201)][_0x2783ce(0x36f)](_0x42464d,new _0x336a7c());_0x39c6cd=_0x39c6cd[_0x2783ce(0x201)][_0x2783ce(0x3e6)](_0x42464d);}}_0x39c6cd[_0x2783ce(0x533)]=!![];}return _0x2815f2;}const _0x1257a3=new Map();function _0x3562d9(_0x52ea40,_0x19034d,_0x24c8dc){const _0x3708cb=_0x2a2824,_0x2f448a=_0x1257a3['get'](_0x52ea40);if(_0x2f448a&&_0x2f448a[_0x3708cb(0x79c)]>Date[_0x3708cb(0x6fd)]())return _0x2f448a[_0x3708cb(0x519)];const _0x50dc10=_0x24c8dc();return _0x1257a3[_0x3708cb(0x36f)](_0x52ea40,{'val':_0x50dc10,'exp':Date[_0x3708cb(0x6fd)]()+_0x19034d}),_0x50dc10;}function _0x433236(_0x145af7,_0x4e96b8,_0x37a6ad,_0x5cd1a2){const _0x36d310=_0x2a2824,_0xda8a31=_0x4e96b8[_0x36d310(0x758)]??_0x5cd1a2[_0x36d310(0x758)];switch(_0x145af7){case _0x36d310(0x758):return[..._0x37a6ad['_envs']['keys']()][_0x36d310(0x1ff)](_0x467014=>!_0x467014['startsWith']('~'));case _0x36d310(0x5e4):return _0x3562d9(_0x36d310(0x3a2)+_0xda8a31,0x7d0,()=>{const _0x5d581a=_0x36d310;try{return[..._0x37a6ad[_0x5d581a(0x758)](_0xda8a31)[_0x5d581a(0x71b)][_0x5d581a(0x2ac)]()]['filter'](_0x29ce91=>!_0x29ce91['startsWith']('~'));}catch{return[];}});case _0x36d310(0x566):if(!_0x4e96b8[_0x36d310(0x5e4)])return[];return _0x3562d9(_0x36d310(0x779)+_0xda8a31+':'+_0x4e96b8['type'],0x5dc,()=>{const _0x1b53f3=_0x36d310;try{const _0x5dd13a=_0x37a6ad['env'](_0xda8a31)[_0x1b53f3(0x71b)][_0x1b53f3(0x3e6)](_0x4e96b8[_0x1b53f3(0x5e4)]);if(!_0x5dd13a?.[_0x1b53f3(0x6af)])return[];const _0x56dd6f=[];for(const {key:_0x16a378}of _0x5dd13a[_0x1b53f3(0x6af)][_0x1b53f3(0x73f)]({'limit':0x32})){_0x56dd6f[_0x1b53f3(0x387)](String(_0x16a378));if(_0x56dd6f['length']>=0x32)break;}return _0x56dd6f;}catch{return[];}});case'index':if(!_0x4e96b8[_0x36d310(0x5e4)])return[];return _0x3562d9(_0x36d310(0x391)+_0xda8a31+':'+_0x4e96b8[_0x36d310(0x5e4)],0x7d0,()=>{const _0x340c4f=_0x36d310;try{const _0xfd9481=_0x37a6ad[_0x340c4f(0x758)](_0xda8a31)['typeSubDbs'][_0x340c4f(0x3e6)](_0x4e96b8[_0x340c4f(0x5e4)]);return _0xfd9481?[..._0xfd9481['indexToDb']?.['keys']()??[]]:[];}catch{return[];}});case'ftsName':if(!_0x4e96b8[_0x36d310(0x5e4)])return[];return _0x3562d9('fts:'+_0xda8a31+':'+_0x4e96b8[_0x36d310(0x5e4)],0x7d0,()=>{const _0x576bb6=_0x36d310;try{return _0x37a6ad[_0x576bb6(0x4ee)]?.[_0x576bb6(0x437)]?.(_0x4e96b8[_0x576bb6(0x5e4)],_0x37a6ad['env'](_0xda8a31))?.['map'](_0x1f9f96=>_0x1f9f96['name'])??[];}catch{return[];}});default:return[];}}function _0x41a196(_0x14c908,_0x36fe08,_0x42fd5a,_0x2807af){const _0x51d01b=_0x2a2824,_0x308e12=_0x14c908[_0x51d01b(0x25f)]('/'),_0x47c7da=_0x14c908[_0x51d01b(0x3d5)]('/'),_0x5522e0=_0x308e12?_0x47c7da[_0x51d01b(0x5b8)](0x0,-0x1):_0x47c7da['slice'](0x0,-0x1),_0x3f0cbf=_0x308e12?'':_0x47c7da[_0x47c7da[_0x51d01b(0x503)]-0x1];let _0x1fd86c=_0x36fe08;const _0x4c5adb={};for(const _0x243a0d of _0x5522e0){if(!_0x243a0d)continue;if(_0x1fd86c[_0x51d01b(0x201)][_0x51d01b(0x52e)](_0x243a0d))_0x1fd86c=_0x1fd86c['children'][_0x51d01b(0x3e6)](_0x243a0d);else{if(_0x1fd86c['dynamic'])_0x4c5adb[_0x1fd86c[_0x51d01b(0x62f)]['param']]=_0x243a0d,_0x1fd86c=_0x1fd86c[_0x51d01b(0x62f)][_0x51d01b(0x1f9)];else return[];}}const _0x114377=_0x5522e0['filter'](Boolean),_0x5274a0=_0x114377[_0x51d01b(0x503)]?_0x114377[_0x51d01b(0x29f)]('/')+'/':'',_0x234448=[];for(const [_0x4cdf0f]of _0x1fd86c['children']){if(_0x4cdf0f[_0x51d01b(0x637)](_0x3f0cbf))_0x234448['push'](_0x5274a0+_0x4cdf0f);}if(_0x1fd86c['dynamic'])for(const _0x4fcf1e of _0x433236(_0x1fd86c[_0x51d01b(0x62f)]['param'],_0x4c5adb,_0x42fd5a,_0x2807af)){if(String(_0x4fcf1e)[_0x51d01b(0x637)](_0x3f0cbf))_0x234448[_0x51d01b(0x387)](_0x5274a0+_0x4fcf1e);}return _0x234448[_0x51d01b(0x5b8)](0x0,0x64);}const _0x85171e=[_0x2a2824(0x3f2),_0x2a2824(0x680),_0x2a2824(0x758),_0x2a2824(0x364),_0x2a2824(0x4fc),_0x2a2824(0x654),'logs',_0x2a2824(0x1bc),_0x2a2824(0x393),_0x2a2824(0x27f)];function _0x130864(_0x52c8a5,_0x263866,_0x1426a3){return function _0x1baf10(_0xbbdff4){const _0x33a618=_0x4307;try{const _0x2baa95=_0xbbdff4[_0x33a618(0x395)](/\s[{[]/),_0x411cec=_0x2baa95>=0x0?_0xbbdff4['slice'](0x0,_0x2baa95):_0xbbdff4,_0x56299c=_0x411cec[_0x33a618(0x731)]();if(!_0x56299c){const _0x43acde=[..._0x85171e,...[..._0x52c8a5[_0x33a618(0x201)][_0x33a618(0x2ac)]()]][_0x33a618(0x5b8)](0x0,0x64);return[_0x43acde,''];}const _0x3a9f80=_0x56299c[_0x33a618(0x3d5)](/\s+/),_0x18f8a3=_0x3a9f80[0x0],_0x285b1d=_0x18f8a3[_0x33a618(0x575)]();if(_0x3a9f80[_0x33a618(0x503)]===0x1){const _0x4e3a74=_0x18f8a3[_0x33a618(0x4ff)](),_0x14e0a4=_0x85171e[_0x33a618(0x1ff)](_0x3bbd3a=>_0x3bbd3a['startsWith'](_0x4e3a74)),_0x2853e2=_0x41a196(_0x18f8a3,_0x52c8a5,_0x263866,_0x1426a3),_0x261f30=[...new Set([..._0x14e0a4,..._0x2853e2])][_0x33a618(0x5b8)](0x0,0x64);return[_0x261f30,_0x18f8a3];}if(_0x563be7['has'](_0x285b1d)&&_0x3a9f80['length']===0x2){const _0x69d59f=_0x3a9f80[0x1],_0x265c7a=_0x41a196(_0x69d59f,_0x52c8a5,_0x263866,_0x1426a3);return[_0x265c7a[_0x33a618(0x626)](_0x30706e=>_0x18f8a3+'\x20'+_0x30706e),_0x18f8a3+'\x20'+_0x69d59f];}if(!_0x563be7['has'](_0x285b1d)&&_0x3a9f80[_0x33a618(0x503)]>0x1){const _0x4cb612=_0x41a196(_0x18f8a3,_0x52c8a5,_0x263866,_0x1426a3),_0x3146c8='\x20'+_0x3a9f80['slice'](0x1)[_0x33a618(0x29f)]('\x20');return[_0x4cb612['map'](_0x429498=>_0x429498+_0x3146c8),_0x18f8a3+_0x3146c8];}return[[],_0xbbdff4];}catch{return[[],_0xbbdff4];}};}async function _0x44fc67(_0x56f9eb,_0x27d67f){const _0x5e1806=_0x2a2824,_0x1d1b2d={'enabled':!![],'level':_0x27d67f[_0x5e1806(0x6d3)]??_0x5e1806(0x77a)},_0x5a7d86={'env':_0x5e1806(0x445)},_0x52d9fe={'current':null},_0x320d2a=_0x5b09d0(_0x56f9eb[_0x5e1806(0x635)][_0x5e1806(0x4a0)]()),_0x291a80=_0x130864(_0x320d2a,_0x56f9eb,_0x5a7d86);_0x56f9eb[_0x5e1806(0x273)][_0x5e1806(0x292)](_0x5985e1=>{const _0x2c8470=_0x5e1806;if(!_0x1d1b2d['enabled'])return;_0xab5c9(_0x5985e1,_0x1d1b2d[_0x2c8470(0x3f4)]),_0x52d9fe[_0x2c8470(0x1ce)]?.['prompt'](!![]);}),_0x497e68(_0x56f9eb,_0x27d67f);const _0x554f07=_0x51c597[_0x5e1806(0x3fb)]({'input':process['stdin'],'output':process['stdout'],'terminal':!![],'completer':_0x291a80,'prompt':_0x43cde5(_0x5a7d86),'historySize':_0xfd95d6});try{const _0x255c1a=_0x3afeb8[_0x5e1806(0x2a8)](_0x2da170,_0x5e1806(0x6f6))[_0x5e1806(0x3d5)]('\x0a')[_0x5e1806(0x1ff)](Boolean);_0x554f07[_0x5e1806(0x3d9)]=_0x255c1a[_0x5e1806(0x2a9)]()[_0x5e1806(0x5b8)](0x0,_0xfd95d6);}catch{}_0x52d9fe[_0x5e1806(0x1ce)]=_0x554f07,_0x554f07['on'](_0x5e1806(0x4fd),async _0x244cec=>{const _0x92b835=_0x5e1806;_0x554f07['pause']();try{await _0x5216df(_0x244cec,_0x56f9eb,_0x27d67f,_0x1d1b2d,_0x5a7d86,_0x554f07);}catch(_0x2413bb){console[_0x92b835(0x5b7)](_0x1f9979(_0x1b9306['red'],_0x92b835(0x77d)+_0x2413bb['message']));}finally{_0x554f07[_0x92b835(0x531)](),_0x554f07['prompt']();}}),_0x554f07['on']('close',()=>{const _0x236a21=_0x5e1806;try{const _0x290e42=[..._0x554f07['history']]['reverse']()['filter'](Boolean)[_0x236a21(0x5b8)](0x0,_0xfd95d6);_0x3afeb8[_0x236a21(0x565)](_0x2da170,_0x290e42[_0x236a21(0x29f)]('\x0a')+'\x0a');}catch{}_0x1cfc4d(_0x56f9eb,0x0);});let _0xd32e50=0x0;return process['on'](_0x5e1806(0x6e5),()=>{const _0x4ed40e=_0x5e1806;if(_0x5a9a33)return _0x1cfc4d(_0x56f9eb,0x82,'SIGINT');if(_0x554f07['line']==='')return _0x1cfc4d(_0x56f9eb,0x0,_0x4ed40e(0x6e5));const _0x7de68f=Date['now']();if(_0x7de68f-_0xd32e50<0x5dc)return _0x1cfc4d(_0x56f9eb,0x0,_0x4ed40e(0x5c4));_0xd32e50=_0x7de68f,process['stdout']['write']('\x0a'),_0x554f07['clearLine'](0x0),_0x554f07['prompt'](),process[_0x4ed40e(0x556)][_0x4ed40e(0x6cc)](_0x1f9979(_0x1b9306['dim'],_0x4ed40e(0x47e)));}),process['on'](_0x5e1806(0x5f8),()=>_0x1cfc4d(_0x56f9eb,0x0,_0x5e1806(0x5f8))),process['on'](_0x5e1806(0x4bc),()=>_0x1cfc4d(_0x56f9eb,0x0,_0x5e1806(0x4bc))),_0x554f07['prompt'](),_0x554f07;}return okdbShell={'start':_0x44fc67,'colorLog':_0xab5c9,'lenientParse':_0x179112,'_splitLine':_0xa35b86,'_formatRouteHelpLines':_0x2ddbbf,'_routeSummary':_0x5c39e7,'_routeTags':_0x5ba79a},okdbShell;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x361e81=_0x362184;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x1aef63,performance:_0x496a19}=require$$0$3,_0x204f74=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG===_0x361e81(0x47d),_0x516d85=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x5bb9d3=process.env.OKDB_LOOP_LAG_ALL==='1',_0x148574=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x49ae21{constructor(){const _0x59408a=_0x361e81;this['enabled']=_0x204f74,this['_buckets']=new Map(),this['_h']=null,this['_timer']=null,this['_started']=![],this[_0x59408a(0x683)]=(_0x14619c,_0x5e3d26)=>process[_0x59408a(0x556)][_0x59408a(0x6cc)](_0x14619c+(_0x5e3d26?'\x20'+JSON['stringify'](_0x5e3d26):'')+'\x0a');}[_0x361e81(0x6fd)](){return _0x496a19['now']();}[_0x361e81(0x1c9)](_0x1679d6){const _0x16e9ab=_0x361e81;if(typeof _0x1679d6===_0x16e9ab(0x5aa))this[_0x16e9ab(0x683)]=_0x1679d6;}['note'](_0x99055c,_0x37de12,_0x35084a){const _0x52b465=_0x361e81;if(!this[_0x52b465(0x40c)])return;let _0x1c517f=this[_0x52b465(0x247)]['get'](_0x99055c);!_0x1c517f&&(_0x1c517f={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x52b465(0x247)][_0x52b465(0x36f)](_0x99055c,_0x1c517f)),_0x1c517f['ms']+=_0x37de12,_0x1c517f[_0x52b465(0x5b9)]+=0x1,_0x37de12>_0x1c517f[_0x52b465(0x1fe)]&&(_0x1c517f[_0x52b465(0x1fe)]=_0x37de12,_0x1c517f[_0x52b465(0x239)]=_0x35084a||'');}[_0x361e81(0x58f)](_0x481c9e){const _0x2e9fbb=_0x361e81;if(!this[_0x2e9fbb(0x40c)]||this['_started'])return;this[_0x2e9fbb(0x427)]=!![];if(_0x481c9e)this[_0x2e9fbb(0x683)]=_0x481c9e;this['_h']=_0x1aef63({'resolution':0xa}),this['_h'][_0x2e9fbb(0x1a1)](),this[_0x2e9fbb(0x673)]=setInterval(()=>this[_0x2e9fbb(0x4e6)](),_0x516d85);if(this[_0x2e9fbb(0x673)][_0x2e9fbb(0x442)])this[_0x2e9fbb(0x673)][_0x2e9fbb(0x442)]();}['onWindow'](_0x4a6eb1){const _0x76994a=_0x361e81;if(!this[_0x76994a(0x1c6)])this[_0x76994a(0x1c6)]=new Set();this[_0x76994a(0x1c6)][_0x76994a(0x4d2)](_0x4a6eb1);if(!this[_0x76994a(0x427)])this[_0x76994a(0x653)]();}[_0x361e81(0x486)](_0x25512d){const _0x553647=_0x361e81;this[_0x553647(0x1c6)]?.[_0x553647(0x560)](_0x25512d);}[_0x361e81(0x653)](){const _0x1010e4=_0x361e81;if(this['_admissionStarted'])return;this[_0x1010e4(0x40e)]=!![];!this['_h']&&(this['_h']=_0x1aef63({'resolution':0xa}),this['_h'][_0x1010e4(0x1a1)]());const _0x3e4f30=_0x516d85;this[_0x1010e4(0x67b)]=setInterval(()=>{const _0x3dae07=_0x1010e4,_0x4b18af=this['_h'];if(!_0x4b18af)return;const _0x82d9e8=_0x4b18af['percentile'](0x63)/0xf4240,_0x3afa98=_0x4b18af['max']/0xf4240,_0x209650=_0x4b18af[_0x3dae07(0x67f)]/0xf4240;_0x4b18af[_0x3dae07(0x620)]();if(this[_0x3dae07(0x1c6)])for(const _0x38d8f2 of this['_windowCbs']){try{_0x38d8f2({'p99Ms':_0x82d9e8,'maxMs':_0x3afa98,'meanMs':_0x209650,'reportMs':_0x3e4f30});}catch{}}},_0x3e4f30);if(this[_0x1010e4(0x67b)][_0x1010e4(0x442)])this[_0x1010e4(0x67b)]['unref']();}[_0x361e81(0x4e6)](){const _0x39b9b5=_0x361e81,_0x29bd88=this['_h'],_0x3dc04a=_0x29bd88['max']/0xf4240,_0x5f19e2=_0x29bd88[_0x39b9b5(0x64d)](0x63)/0xf4240,_0x2956d9=_0x29bd88['mean']/0xf4240;_0x29bd88[_0x39b9b5(0x620)]();const _0x32ab41=[...this[_0x39b9b5(0x247)][_0x39b9b5(0x62b)]()][_0x39b9b5(0x626)](([_0x1dcaf6,_0x4257a9])=>({'label':_0x1dcaf6,..._0x4257a9}))[_0x39b9b5(0x788)]((_0x35b895,_0x15e4e0)=>_0x15e4e0['ms']-_0x35b895['ms'])[_0x39b9b5(0x5b8)](0x0,0x8);this[_0x39b9b5(0x247)][_0x39b9b5(0x3dd)]();const _0x51f566=_0x32ab41[_0x39b9b5(0x400)]((_0x4a7b23,_0x1f28aa)=>_0x4a7b23+_0x1f28aa['ms'],0x0),_0x41b6cc=_0x32ab41[_0x39b9b5(0x626)](_0x8f53fa=>_0x8f53fa[_0x39b9b5(0x4c5)]+'='+_0x8f53fa['ms']['toFixed'](0x0)+_0x39b9b5(0x1b7)+_0x8f53fa[_0x39b9b5(0x5b9)]+(_0x8f53fa[_0x39b9b5(0x1fe)]>0x5?_0x39b9b5(0x2c0)+_0x8f53fa[_0x39b9b5(0x1fe)][_0x39b9b5(0x6cb)](0x0)+'ms'+(_0x8f53fa[_0x39b9b5(0x239)]?'\x20'+_0x8f53fa[_0x39b9b5(0x239)]:'')+')':''));(_0x5bb9d3||_0x3dc04a>=_0x148574)&&this[_0x39b9b5(0x683)](_0x39b9b5(0x493)+_0x516d85+_0x39b9b5(0x30f)+_0x3dc04a[_0x39b9b5(0x6cb)](0x0)+_0x39b9b5(0x73a)+_0x5f19e2[_0x39b9b5(0x6cb)](0x0)+'ms\x20mean='+_0x2956d9['toFixed'](0x0)+_0x39b9b5(0x1fa)+_0x51f566['toFixed'](0x0)+'ms'+(_0x41b6cc[_0x39b9b5(0x503)]?_0x39b9b5(0x3b6)+_0x41b6cc[_0x39b9b5(0x29f)]('\x20\x20'):''),{'feature':'loop-lag'});if(this[_0x39b9b5(0x1c6)])for(const _0x39e938 of this['_windowCbs']){try{_0x39e938({'p99Ms':_0x5f19e2,'maxMs':_0x3dc04a,'meanMs':_0x2956d9,'reportMs':_0x516d85});}catch{}}}[_0x361e81(0x1d2)](){const _0x193e7e=_0x361e81;if(this['_timer'])clearInterval(this['_timer']);if(this['_h'])this['_h'][_0x193e7e(0x41b)]();this[_0x193e7e(0x673)]=null,this['_h']=null,this['_started']=![];}}const _0x4cd92a=new _0x49ae21();if(_0x4cd92a['enabled'])_0x4cd92a[_0x361e81(0x58f)]();return okdbLoopMonitor={'LOOP':_0x4cd92a},okdbLoopMonitor;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x57dec1=require$$1$1,_0x168347=require$$1;let _0x4083a9,_0x278071,_0x48387d,_0x464761,_0xf5e86f,_0xc30161,_0xd5348d,_0x1b26ee=![];const _0x569ade=new Set();let _0xcbd998=null;const _0xf2c42d=new Map();function _0x2e807e(){const _0x5ac5a4=_0x4307;if(_0x4083a9!==undefined)return _0x4083a9;_0x4083a9=process.env.OKDB_DIAG==='1';if(!_0x4083a9)return![];_0x278071=process.env.OKDB_DIAG_STACK==='1',_0x464761=Math[_0x5ac5a4(0x270)](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x48387d=new Array(_0x464761),_0xf5e86f=0x0,_0xc30161=0x0,_0xd5348d=process.env.OKDB_DIAG_DIR||null;if(_0xd5348d)try{_0x57dec1[_0x5ac5a4(0x76d)](_0xd5348d,{'recursive':!![]});}catch{}return!![];}function _0xc37db1(){return _0x4083a9===undefined?_0x2e807e():_0x4083a9;}function _0x8658fc(_0x149879,_0x3f6853){const _0x5596a6=_0x4307;if(_0x4083a9===undefined?!_0x2e807e():!_0x4083a9)return;let _0x1fa6d7;if(_0x278071){const _0x135aca=new Error()['stack']||'';_0x1fa6d7=_0x135aca[_0x5596a6(0x3d5)]('\x0a')[_0x5596a6(0x5b8)](0x3)['map'](_0x2ce054=>_0x2ce054[_0x5596a6(0x6f3)]())[_0x5596a6(0x1ff)](Boolean)['slice'](0x0,0x8);}_0x48387d[_0xf5e86f]={'seq':_0xc30161++,'t':Date[_0x5596a6(0x6fd)](),'env':_0x149879,'kind':_0x3f6853||_0x5596a6(0x662),'stack':_0x1fa6d7},_0xf5e86f=(_0xf5e86f+0x1)%_0x464761;}function _0x832217(_0x569763){const _0x48d0df=_0x4307,_0x52c04c=[];for(let _0x38ee96=0x0;_0x38ee96<_0x464761;_0x38ee96++){const _0x54ff3d=_0x48387d[(_0xf5e86f-0x1-_0x38ee96+_0x464761*0x2)%_0x464761];if(!_0x54ff3d)continue;_0x52c04c['push'](_0x54ff3d);if(_0x52c04c[_0x48d0df(0x503)]>=_0x569763)break;}return _0x52c04c;}function _0x420fcf(_0x2a6072){const _0x1268a5=_0x4307;try{process[_0x1268a5(0x556)]['write'](_0x2a6072+'\x0a');}catch{}if(_0xd5348d)try{_0x57dec1[_0x1268a5(0x190)](_0x168347['join'](_0xd5348d,_0x1268a5(0x490)+process[_0x1268a5(0x789)]+_0x1268a5(0x4a8)),_0x2a6072+'\x0a');}catch{}}function _0x913c64(_0x6c7c7b){const _0x2fd57a=_0x4307,_0x491c42=_0x832217(_0x6c7c7b);if(!_0x491c42[_0x2fd57a(0x503)])return _0x2fd57a(0x2e4);const _0x11db94=Date[_0x2fd57a(0x6fd)]();return _0x491c42[_0x2fd57a(0x626)](_0x1d7600=>{const _0x48559f=_0x2fd57a,_0x5751b2=_0x48559f(0x42e)+_0x1d7600[_0x48559f(0x798)]+'\x20-'+(_0x11db94-_0x1d7600['t'])+_0x48559f(0x46e)+_0x1d7600['env']+'\x20'+_0x1d7600['kind'];return _0x1d7600[_0x48559f(0x22e)]&&_0x1d7600[_0x48559f(0x22e)][_0x48559f(0x503)]?_0x5751b2+'\x0a\x20\x20\x20\x20\x20\x20'+_0x1d7600[_0x48559f(0x22e)]['join'](_0x48559f(0x49d)):_0x5751b2;})[_0x2fd57a(0x29f)]('\x0a');}function _0x1fa7af(_0x30482f,_0x16e881){const _0xf52dd6=_0x4307,_0x17270c='\x0a===\x20OKDB_DIAG\x20'+_0x30482f+_0xf52dd6(0x327)+new Date()['toISOString']()+_0xf52dd6(0x1d0)+process[_0xf52dd6(0x789)]+'\x20===',_0x10ee1e=[_0x17270c,'error:\x20'+(_0x16e881&&_0x16e881[_0xf52dd6(0x22e)]?_0x16e881[_0xf52dd6(0x22e)][_0xf52dd6(0x3d5)]('\x0a')[0x0]:_0x16e881),'recent\x20writes\x20(newest\x20first)'+(_0x278071?'':_0xf52dd6(0x47b))+':',_0x913c64(0x18),_0x54b920(),'='['repeat'](_0x17270c['length']-0x1)];_0x420fcf(_0x10ee1e[_0xf52dd6(0x29f)]('\x0a'));}function _0x4c3833(_0x270e84){const _0x51ab7f=_0x4307;if(!_0xc37db1())return;const _0x5a1643=String(_0x270e84&&_0x270e84[_0x51ab7f(0x1e0)]||_0x270e84||''),_0x54fce2=/already closed|environment is already|invalid read txn|reset an invalid/i[_0x51ab7f(0x193)](_0x5a1643);_0x1fa7af(_0x54fce2?_0x51ab7f(0x26e):_0x51ab7f(0x3b5),_0x270e84);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x54fce2)return;try{console['error'](_0x270e84&&_0x270e84[_0x51ab7f(0x22e)]?_0x270e84['stack']:_0x270e84);}catch{}process[_0x51ab7f(0x393)](0x1);}function _0x2b4a41(_0x5dbfee){const _0x373289=_0x4307;if(!_0xc37db1())return;const _0x275741=String(_0x5dbfee&&_0x5dbfee[_0x373289(0x1e0)]||_0x5dbfee||'');/already closed|environment is already|invalid read txn|reset an invalid/i[_0x373289(0x193)](_0x275741)&&_0x1fa7af('ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)',_0x5dbfee);}function _0x54b920(){const _0x223b02=_0x4307,_0x4dbc44=['drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):'];let _0x553846=![];for(const _0x3368e5 of _0x569ade){const _0x536c12=_0x3368e5&&_0x3368e5[_0x223b02(0x6ca)];if(!_0x536c12)continue;for(const [_0x26ccea,_0x22cc9b]of _0x536c12){const _0x37a601=_0x22cc9b&&_0x22cc9b[_0x223b02(0x443)]&&_0x22cc9b[_0x223b02(0x443)][_0x223b02(0x258)];if(!_0x37a601)continue;let _0x50ae9a,_0x5be9ad;try{_0x50ae9a=Atomics['load'](_0x37a601,0x0),_0x5be9ad=Atomics[_0x223b02(0x603)](_0x37a601,0x1);}catch{continue;}if(_0x50ae9a===0x0)continue;_0x553846=!![];const _0x5e834d=_0x50ae9a>0x0?'SWAP':'copy',_0xfbc05a=Date[_0x223b02(0x6fd)]()-Math[_0x223b02(0x5a9)](_0x50ae9a)*0x3e8,_0x2cb38b=((()=>{const _0x25d98f=_0x223b02;try{return _0x22cc9b[_0x25d98f(0x398)]&&_0x22cc9b['_writer'][_0x25d98f(0x7a3)]?_0x22cc9b[_0x25d98f(0x398)]['status']():null;}catch{return null;}})());_0x4dbc44['push'](_0x223b02(0x23e)+_0x26ccea+_0x223b02(0x458)+_0x5e834d+_0x223b02(0x3fa)+_0xfbc05a+_0x223b02(0x333)+_0x5be9ad+(_0x2cb38b?'\x20writer{depth='+_0x2cb38b[_0x223b02(0x52c)]+_0x223b02(0x5a6)+_0x2cb38b['oldestPendingMs']+_0x223b02(0x599)+_0x2cb38b[_0x223b02(0x3fd)]+'}':''));}}if(!_0x553846)_0x4dbc44[_0x223b02(0x387)](_0x223b02(0x6df));return _0x4dbc44[_0x223b02(0x29f)]('\x0a');}function _0x63c079(){const _0xc99f19=_0x4307;if(!_0xc37db1())return;const _0x33418b=Math[_0xc99f19(0x270)](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x3b012e=Date[_0xc99f19(0x6fd)]();for(const _0x1b1b1c of _0x569ade){const _0x321632=_0x1b1b1c&&_0x1b1b1c[_0xc99f19(0x6ca)];if(!_0x321632)continue;for(const [_0x4e04c7,_0x2873bc]of _0x321632){const _0x51e735=_0x2873bc&&_0x2873bc[_0xc99f19(0x443)]&&_0x2873bc[_0xc99f19(0x443)][_0xc99f19(0x258)];if(!_0x51e735)continue;let _0x45d650;try{_0x45d650=Atomics['load'](_0x51e735,0x0);}catch{continue;}const _0x84330f=_0x1b1b1c[_0xc99f19(0x624)]+'|'+_0x4e04c7;if(_0x45d650<=0x0){_0xf2c42d[_0xc99f19(0x560)](_0x84330f);continue;}const _0x120af4=_0x3b012e-_0x45d650*0x3e8,_0x592c94=_0xf2c42d[_0xc99f19(0x3e6)](_0x84330f);if(_0x120af4<_0x33418b)continue;if(_0x592c94&&_0x3b012e-_0x592c94[_0xc99f19(0x4a5)]<_0x33418b)continue;_0xf2c42d[_0xc99f19(0x36f)](_0x84330f,{'firstTs':_0x592c94?_0x592c94[_0xc99f19(0x2ba)]:_0x45d650,'dumpedAt':_0x3b012e});const _0x535b4a='\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20'+_0x120af4+_0xc99f19(0x5e7)+_0x4e04c7+_0xc99f19(0x327)+new Date()[_0xc99f19(0x2d7)]()+_0xc99f19(0x1d0)+process[_0xc99f19(0x789)]+_0xc99f19(0x5a1);_0x420fcf([_0x535b4a,_0x54b920(),'='[_0xc99f19(0x3ba)](_0x535b4a[_0xc99f19(0x503)]-0x1)][_0xc99f19(0x29f)]('\x0a'));}}}function _0x13a2d3(){const _0x285b10=_0x4307;if(!_0xc37db1()||_0x1b26ee)return;_0x1b26ee=!![],process[_0x285b10(0x66c)](_0x285b10(0x3b5),_0x4c3833),process[_0x285b10(0x66c)](_0x285b10(0x516),_0x2b4a41);const _0x14842f=Math['max'](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0xcbd998=setInterval(_0x63c079,_0x14842f);if(_0xcbd998['unref'])_0xcbd998[_0x285b10(0x442)]();}function _0x1b474e(_0x236b14){const _0x1665c8=_0x4307;if(!_0xc37db1()||!_0x236b14)return;_0x569ade[_0x1665c8(0x4d2)](_0x236b14),_0x13a2d3();}function _0x33d2d5(_0x452be9){const _0x180554=_0x4307;_0x569ade[_0x180554(0x560)](_0x452be9);}function _0x189ba7(){const _0x379b90=_0x4307;if(!_0xc37db1())return{'enabled':![],'hint':_0x379b90(0x737)};return{'enabled':!![],'stackCapture':!!_0x278071,'recentWrites':_0x832217(0x10),'drain':_0x54b920()};}return okdbDiag={'isEnabled':_0xc37db1,'recordWrite':_0x8658fc,'installDiag':_0x13a2d3,'registerOkdb':_0x1b474e,'unregisterOkdb':_0x33d2d5,'snapshot':_0x189ba7},okdbDiag;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x35debd=_0x362184;if(hasRequiredOkdbWriter)return okdbWriter['exports'];hasRequiredOkdbWriter=0x1;const {performance:_0x1ad781}=require$$0$4,_0x4c550a=requireOkdbDiag(),_0xc87986=process.env.OKDB_COMMIT_MODE===_0x35debd(0x317);class _0x29fbb6{constructor(_0x3c2b4c){const _0x1b1175=_0x35debd;this[_0x1b1175(0x758)]=_0x3c2b4c,this['_inflight']=new Set(),this[_0x1b1175(0x4d5)]=new Map(),this[_0x1b1175(0x480)]=0x0,this[_0x1b1175(0x3be)]=[],this[_0x1b1175(0x6b7)]=[],this[_0x1b1175(0x2f2)]=Math[_0x1b1175(0x270)](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this[_0x1b1175(0x37f)]=0x0,this[_0x1b1175(0x571)]=[],this[_0x1b1175(0x621)]=0x0,this[_0x1b1175(0x3fe)]=null,this[_0x1b1175(0x781)]=0x0,this['_nestedTotal']=0x0,this['_nestedWarned']=![];}async[_0x35debd(0x5ab)](_0xb3f65b,_0x462caf){const _0x78355=_0x35debd;if(_0x4c550a['isEnabled']())_0x4c550a[_0x78355(0x4c3)](this['env']?.[_0x78355(0x378)],_0x462caf);if(this[_0x78355(0x30a)]){const _0x186909=new Error('okdb-writer:\x20env\x20closing\x20—\x20retry');_0x186909['code']='ENV_CLOSING_RETRY';throw _0x186909;}if(this[_0x78355(0x2f2)]>0x0){let _0x5bed74=![];while(this['_outstanding']>=this[_0x78355(0x2f2)]&&!this[_0x78355(0x30a)]){!_0x5bed74&&(_0x5bed74=!![],this[_0x78355(0x621)]++),await new Promise(_0x4b81b2=>this[_0x78355(0x571)][_0x78355(0x387)](_0x4b81b2));}if(this[_0x78355(0x30a)]){const _0x5e03b9=new Error(_0x78355(0x2cc));_0x5e03b9[_0x78355(0x2a0)]=_0x78355(0x2c4);throw _0x5e03b9;}}this[_0x78355(0x37f)]++;const _0xf42281=this[_0x78355(0x758)]['_coordinator'];for(;;){while(this[_0x78355(0x3fe)])await this[_0x78355(0x3fe)];if(_0xf42281)await _0xf42281[_0x78355(0x278)]();if(!this['_held'])break;if(_0xf42281)_0xf42281[_0x78355(0x411)]();}if(this[_0x78355(0x30a)]){if(_0xf42281)_0xf42281[_0x78355(0x411)]();this['_outstanding']--;if(this[_0x78355(0x571)][_0x78355(0x503)]&&this[_0x78355(0x37f)]<this[_0x78355(0x2f2)])this['_bpWaiters'][_0x78355(0x4c0)]()();const _0x36e606=new Error('okdb-writer:\x20env\x20closing\x20—\x20retry');_0x36e606['code']=_0x78355(0x2c4);throw _0x36e606;}const _0x3134da=_0x1ad781[_0x78355(0x6fd)]();if(_0xc87986)try{const _0x55666b=this['env']['db'][_0x78355(0x796)](_0xb3f65b);this['_committed']++;if(this[_0x78355(0x3be)][_0x78355(0x387)](_0x1ad781[_0x78355(0x6fd)]()-_0x3134da)>0x100)this[_0x78355(0x3be)][_0x78355(0x4c0)]();if(this[_0x78355(0x6b7)]['push'](_0x1ad781['now']())>0x800)this['_done'][_0x78355(0x4c0)]();return _0x55666b;}finally{this['_outstanding']--;if(this[_0x78355(0x571)][_0x78355(0x503)]&&this[_0x78355(0x37f)]<this['_highWater'])this[_0x78355(0x571)]['shift']()();if(_0xf42281)_0xf42281[_0x78355(0x411)]();}let _0x4befb0=null;const _0x3dc684=()=>{const _0x35edf3=_0x78355,_0x1e73a7=_0xb3f65b();if(_0x1e73a7&&typeof _0x1e73a7[_0x35edf3(0x4a7)]===_0x35edf3(0x5aa)&&!_0x4befb0){this['_heldTotal']++;let _0x40ef66;const _0x200ce9=new Promise(_0x3c6f67=>_0x40ef66=_0x3c6f67);this[_0x35edf3(0x3fe)]=_0x200ce9,_0x4befb0=()=>{const _0x439617=_0x35edf3;if(this['_held']===_0x200ce9)this[_0x439617(0x3fe)]=null;_0x40ef66();};}return _0x1e73a7;};let _0x36826a;try{_0x36826a=this[_0x78355(0x758)]['db']['childTransaction'](_0x3dc684);}catch(_0x540949){_0x36826a=Promise[_0x78355(0x71f)](_0x540949);}(!_0x36826a||typeof _0x36826a['then']!==_0x78355(0x5aa))&&(this[_0x78355(0x6fa)]++,!this[_0x78355(0x3e8)]&&(this[_0x78355(0x3e8)]=!![],console['warn'](_0x78355(0x3a0)+(this[_0x78355(0x758)]?.[_0x78355(0x378)]??'?')+_0x78355(0x261))),_0x36826a=Promise['resolve'](_0x36826a));const _0x1ae5f1=()=>{if(_0x4befb0)_0x4befb0();};_0x36826a['then'](_0x1ae5f1,_0x1ae5f1),this['_inflight']['add'](_0x36826a),this[_0x78355(0x4d5)][_0x78355(0x36f)](_0x36826a,_0x3134da);const _0x439cb2=()=>{const _0x3e5f91=_0x78355;this[_0x3e5f91(0x6eb)][_0x3e5f91(0x560)](_0x36826a),this['_enqueuedAt'][_0x3e5f91(0x560)](_0x36826a),this['_committed']++,this['_outstanding']--;this[_0x3e5f91(0x571)][_0x3e5f91(0x503)]&&this[_0x3e5f91(0x37f)]<this[_0x3e5f91(0x2f2)]&&this[_0x3e5f91(0x571)][_0x3e5f91(0x4c0)]()();if(this[_0x3e5f91(0x3be)][_0x3e5f91(0x387)](_0x1ad781[_0x3e5f91(0x6fd)]()-_0x3134da)>0x100)this['_durs']['shift']();if(this[_0x3e5f91(0x6b7)][_0x3e5f91(0x387)](_0x1ad781[_0x3e5f91(0x6fd)]())>0x800)this['_done'][_0x3e5f91(0x4c0)]();};_0x36826a['then'](_0x439cb2,_0x439cb2);try{return await _0x36826a;}finally{if(_0xf42281)_0xf42281[_0x78355(0x411)]();}}[_0x35debd(0x7a3)](){const _0x1b2f3d=_0x35debd,_0x59127a=_0x1ad781[_0x1b2f3d(0x6fd)]();let _0x22f573=0x0;for(const _0x355628 of this[_0x1b2f3d(0x4d5)][_0x1b2f3d(0x397)]()){const _0x2729af=_0x59127a-_0x355628;if(_0x2729af>_0x22f573)_0x22f573=_0x2729af;}let _0x492381=0x0;for(let _0x53869c=this[_0x1b2f3d(0x6b7)]['length']-0x1;_0x53869c>=0x0;_0x53869c--){if(_0x59127a-this[_0x1b2f3d(0x6b7)][_0x53869c]>0x3e8)break;_0x492381++;}let _0x5a0ad0=0x0;if(this['_durs'][_0x1b2f3d(0x503)]){const _0x31c143=[...this[_0x1b2f3d(0x3be)]][_0x1b2f3d(0x788)]((_0xc7bc03,_0x593145)=>_0xc7bc03-_0x593145);_0x5a0ad0=_0x31c143[Math[_0x1b2f3d(0x311)](_0x31c143['length']-0x1,Math[_0x1b2f3d(0x318)](_0x31c143[_0x1b2f3d(0x503)]*0.99))];}return{'depth':this[_0x1b2f3d(0x6eb)][_0x1b2f3d(0x1f8)],'oldestPendingMs':Math[_0x1b2f3d(0x6bd)](_0x22f573),'committed':this['_committed'],'commitsPerSec':_0x492381,'commitP99Ms':Math[_0x1b2f3d(0x6bd)](_0x5a0ad0),'parkedNow':this[_0x1b2f3d(0x571)][_0x1b2f3d(0x503)],'parkedTotal':this[_0x1b2f3d(0x621)],'highWater':this[_0x1b2f3d(0x2f2)]};}[_0x35debd(0x242)](){const _0x4e46ae=_0x35debd,_0x5fe544=_0x1ad781['now']();return[...this['_enqueuedAt'][_0x4e46ae(0x397)]()][_0x4e46ae(0x626)](_0x1d7cdc=>Math[_0x4e46ae(0x6bd)](_0x5fe544-_0x1d7cdc))['sort']((_0x12374c,_0xc0f5ed)=>_0xc0f5ed-_0x12374c);}[_0x35debd(0x56a)](){const _0x5c50e8=_0x35debd;this[_0x5c50e8(0x30a)]=!![];for(const _0x225fe7 of this['_bpWaiters'][_0x5c50e8(0x2cb)](0x0))_0x225fe7();}async[_0x35debd(0x785)](){const _0x2b1c0b=_0x35debd;let _0x1ee825=0x0;while(this[_0x2b1c0b(0x6eb)][_0x2b1c0b(0x1f8)]&&_0x1ee825++<0x3e8){await Promise[_0x2b1c0b(0x6ed)]([...this['_inflight']]);}}async['put'](_0x1b59b4,_0x42e5b4,_0x2a7518,_0x4a42d0){const _0x49dc15=_0x35debd;return this[_0x49dc15(0x5ab)](()=>{const _0x1a20ac=_0x49dc15;if(_0x4a42d0===undefined)_0x1b59b4[_0x1a20ac(0x6da)](_0x42e5b4,_0x2a7518);else _0x1b59b4[_0x1a20ac(0x6da)](_0x42e5b4,_0x2a7518,_0x4a42d0);},'raw-put');}async['remove'](_0x55b0f0,_0x3e0f6a){const _0x53f186=_0x35debd;return this[_0x53f186(0x5ab)](()=>_0x55b0f0[_0x53f186(0x605)](_0x3e0f6a),'raw-remove');}}async function _0x4cd4a7(_0x2a506a,_0x7a248c){const _0x4a3154=_0x35debd;if(_0x7a248c==null)_0x7a248c=Math[_0x4a3154(0x270)](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0x16a870=_0x2a506a?.[_0x4a3154(0x42a)];if(!_0x16a870||typeof _0x16a870['then']!==_0x4a3154(0x5aa))return;await Promise[_0x4a3154(0x52b)]([Promise[_0x4a3154(0x300)](_0x16a870)[_0x4a3154(0x628)](()=>{}),new Promise(_0x2240a1=>{const _0x3336d1=_0x4a3154,_0xceaa40=setTimeout(_0x2240a1,_0x7a248c);if(_0xceaa40[_0x3336d1(0x442)])_0xceaa40['unref']();})]);}catch{}}function _0x2ee8ce(_0x5adb3a){const _0x30e2fe=_0x35debd;if(_0xc87986)return Promise[_0x30e2fe(0x300)]();const _0xe24da7=_0x5adb3a?.[_0x30e2fe(0x589)];return _0xe24da7&&typeof _0xe24da7['then']===_0x30e2fe(0x5aa)?_0xe24da7:Promise[_0x30e2fe(0x300)]();}return okdbWriter['exports']=_0x29fbb6,okdbWriter['exports'][_0x35debd(0x5d0)]=_0x4cd4a7,okdbWriter[_0x35debd(0x1e3)][_0x35debd(0x589)]=_0x2ee8ce,okdbWriter[_0x35debd(0x1e3)][_0x35debd(0x3fc)]=_0xc87986,okdbWriter[_0x35debd(0x1e3)];}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0x380fe8=_0x362184;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x2cba7f=require$$0,{SYNC_COMMITS:_0x1fb115}=requireOkdbWriter(),_0x46704f='~lock';class _0x58f8c1{constructor(_0x463fc0,_0x245a4f,_0x540a1c){const _0x45d3cc=_0x4307;this['_lock']=_0x463fc0,this[_0x45d3cc(0x22d)]=_0x245a4f,this[_0x45d3cc(0x220)]=_0x540a1c,this['_released']=![],this[_0x45d3cc(0x76e)]=null,this[_0x45d3cc(0x797)]=null;}[_0x380fe8(0x231)](){const _0x2a2c63=_0x380fe8;if(this[_0x2a2c63(0x649)])return![];try{const _0x1bc3a9=this['_lock'][_0x2a2c63(0x441)]()['get'](this['_key']);if(!_0x1bc3a9||_0x1bc3a9[_0x2a2c63(0x65a)]!==this[_0x2a2c63(0x220)])return![];const _0x3bd5c2=_0x1bc3a9['updatedAt']??_0x1bc3a9['acquiredAt'];if(_0x3bd5c2+_0x1bc3a9[_0x2a2c63(0x696)]<Date['now']())return![];return!![];}catch{return!this['_released'];}}['holder'](){const _0x42bddd=_0x380fe8;if(this['_released'])return null;try{return this[_0x42bddd(0x62a)][_0x42bddd(0x441)]()[_0x42bddd(0x3e6)](this[_0x42bddd(0x22d)])??null;}catch{return null;}}async[_0x380fe8(0x6e1)](_0x2e22b0){const _0x43dc44=_0x380fe8;if(this[_0x43dc44(0x649)])return;try{const _0xb50d09=this['_lock'][_0x43dc44(0x441)]()[_0x43dc44(0x3e6)](this['_key']);if(!_0xb50d09||_0xb50d09[_0x43dc44(0x65a)]!==this['_acquiredAt'])return;if(_0x1fb115)this[_0x43dc44(0x62a)][_0x43dc44(0x441)]()[_0x43dc44(0x6da)](this[_0x43dc44(0x22d)],{..._0xb50d09,'ttlMs':_0xb50d09[_0x43dc44(0x696)]+_0x2e22b0});else await this[_0x43dc44(0x62a)][_0x43dc44(0x441)]()[_0x43dc44(0x66a)](this[_0x43dc44(0x22d)],{..._0xb50d09,'ttlMs':_0xb50d09['ttlMs']+_0x2e22b0});}catch{}}async['release'](){const _0x3f466e=_0x380fe8;if(this[_0x3f466e(0x649)])return;if(this[_0x3f466e(0x797)])try{await this[_0x3f466e(0x797)];}catch{}clearInterval(this[_0x3f466e(0x76e)]),this[_0x3f466e(0x76e)]=null,this[_0x3f466e(0x649)]=!![];try{const _0x1a44f7=this[_0x3f466e(0x62a)]['_db']()[_0x3f466e(0x3e6)](this['_key']);if(_0x1a44f7&&_0x1a44f7['acquiredAt']===this[_0x3f466e(0x220)]){if(_0x1fb115)this[_0x3f466e(0x62a)]['_db']()[_0x3f466e(0x605)](this[_0x3f466e(0x22d)]);else await this[_0x3f466e(0x62a)][_0x3f466e(0x441)]()[_0x3f466e(0x488)](this['_key']);}}catch{}}['_startHeartbeat'](_0x4c4e10,_0xb37c99){const _0x387653=_0x380fe8,_0x47e080=_0xb37c99??Math[_0x387653(0x318)](_0x4c4e10/0x3);this[_0x387653(0x76e)]=setInterval(()=>{const _0x4c1db5=_0x387653;if(this[_0x4c1db5(0x649)])return;this[_0x4c1db5(0x797)]=((async()=>{const _0xf2db18=_0x4c1db5;try{const _0x43873b=this['_lock'][_0xf2db18(0x441)]()[_0xf2db18(0x3e6)](this[_0xf2db18(0x22d)]);if(!_0x43873b||_0x43873b[_0xf2db18(0x65a)]!==this[_0xf2db18(0x220)]){this['_released']=!![],clearInterval(this[_0xf2db18(0x76e)]),this[_0xf2db18(0x76e)]=null;return;}if(_0x1fb115)this[_0xf2db18(0x62a)][_0xf2db18(0x441)]()[_0xf2db18(0x6da)](this[_0xf2db18(0x22d)],{..._0x43873b,'updatedAt':Date['now']()});else await this[_0xf2db18(0x62a)][_0xf2db18(0x441)]()[_0xf2db18(0x66a)](this['_key'],{..._0x43873b,'updatedAt':Date[_0xf2db18(0x6fd)]()});}catch{}this[_0xf2db18(0x797)]=null;})());},_0x47e080);if(this[_0x387653(0x76e)][_0x387653(0x442)])this[_0x387653(0x76e)][_0x387653(0x442)]();}}class _0x13d882{constructor(_0x3c46aa,{namespace:_0x2c5d3a,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x9b9071=_0x380fe8;this['_rawDb']=_0x3c46aa,this[_0x9b9071(0x728)]=_0x2c5d3a,this[_0x9b9071(0x696)]=ttlMs,this['heartbeatMs']=heartbeatMs,this[_0x9b9071(0x27a)]=null;}['_db'](){const _0x32912e=_0x380fe8;return!this['_lockDb']&&(this[_0x32912e(0x27a)]=this[_0x32912e(0x20f)][_0x32912e(0x79e)](_0x46704f,{'dupSort':![]})),this[_0x32912e(0x27a)];}[_0x380fe8(0x53d)](){const _0x3e0b1d=_0x380fe8;return!this[_0x3e0b1d(0x568)]&&(this['_wantDbHandle']=this['_rawDb'][_0x3e0b1d(0x79e)](_0x46704f+_0x3e0b1d(0x49f),{'dupSort':![]})),this[_0x3e0b1d(0x568)];}[_0x380fe8(0x22d)](_0x3fa01b){const _0x535650=_0x380fe8;return this[_0x535650(0x728)]+':'+_0x3fa01b;}[_0x380fe8(0x45b)](_0x26bdab){const _0x48f3ea=_0x380fe8;try{_0x1fb115?this['_wantDb']()[_0x48f3ea(0x6da)](this[_0x48f3ea(0x22d)](_0x26bdab),Date[_0x48f3ea(0x6fd)]()):this[_0x48f3ea(0x53d)]()[_0x48f3ea(0x66a)](this[_0x48f3ea(0x22d)](_0x26bdab),Date[_0x48f3ea(0x6fd)]())?.[_0x48f3ea(0x628)]?.(()=>{});}catch{}}[_0x380fe8(0x389)](_0x476d10,_0x2c8bc0=0x3e8){const _0x1b9d4d=_0x380fe8;try{const _0x31f28b=this[_0x1b9d4d(0x53d)]()[_0x1b9d4d(0x3e6)](this[_0x1b9d4d(0x22d)](_0x476d10));return typeof _0x31f28b===_0x1b9d4d(0x6e3)&&Date[_0x1b9d4d(0x6fd)]()-_0x31f28b<_0x2c8bc0;}catch{return![];}}[_0x380fe8(0x529)](_0x21039d){const _0xf4e531=_0x380fe8,_0x38c459=_0x21039d['updatedAt']??_0x21039d['acquiredAt'];return _0x38c459+_0x21039d[_0xf4e531(0x696)]<Date[_0xf4e531(0x6fd)]();}static['_holderDead'](_0x10f86c){const _0x2a16cf=_0x380fe8,_0x426ee9=_0x10f86c?.[_0x2a16cf(0x47c)];if(!_0x426ee9||typeof _0x426ee9[_0x2a16cf(0x789)]!==_0x2a16cf(0x6e3))return![];if(_0x426ee9[_0x2a16cf(0x57e)]!==_0x2cba7f[_0x2a16cf(0x57e)]())return![];if(_0x426ee9[_0x2a16cf(0x789)]===process[_0x2a16cf(0x789)])return![];try{return process['kill'](_0x426ee9[_0x2a16cf(0x789)],0x0),![];}catch(_0x7a1a5a){return _0x7a1a5a[_0x2a16cf(0x2a0)]===_0x2a16cf(0x55c);}}async[_0x380fe8(0x5dd)](_0x198aee,_0x5cf362={},_0x101782={}){const _0xa65002=_0x380fe8,_0x828443=this['_key'](_0x198aee),_0x37b3f6=_0x101782[_0xa65002(0x696)]??this[_0xa65002(0x696)],_0x2335a6=Date[_0xa65002(0x6fd)](),_0x4ca8dc={'holder':{'pid':process['pid'],'hostname':_0x2cba7f[_0xa65002(0x57e)](),..._0x5cf362},'acquiredAt':_0x2335a6,'updatedAt':_0x2335a6,'ttlMs':_0x37b3f6};let _0x214a2e=![],_0x2e774c=null;try{const _0x3f42ff=()=>{const _0x1b5702=_0xa65002,_0x1fa3dd=this[_0x1b5702(0x441)]()[_0x1b5702(0x3e6)](_0x828443);if(_0x1fa3dd&&!this[_0x1b5702(0x529)](_0x1fa3dd)&&!_0x13d882[_0x1b5702(0x761)](_0x1fa3dd)){const _0xe56107=_0x5cf362[_0x1b5702(0x281)]!=null&&_0x1fa3dd[_0x1b5702(0x47c)]['pid']===process[_0x1b5702(0x789)]&&_0x1fa3dd[_0x1b5702(0x47c)]['processorId']===_0x5cf362[_0x1b5702(0x281)];if(!_0xe56107){_0x214a2e=![],_0x2e774c=_0x1fa3dd;return;}_0x4ca8dc[_0x1b5702(0x65a)]<=_0x1fa3dd['acquiredAt']&&(_0x4ca8dc[_0x1b5702(0x65a)]=_0x1fa3dd[_0x1b5702(0x65a)]+0x1,_0x4ca8dc['updatedAt']=_0x4ca8dc['acquiredAt']);}this[_0x1b5702(0x441)]()[_0x1b5702(0x66a)](_0x828443,_0x4ca8dc),_0x214a2e=!![],_0x2e774c=_0x4ca8dc;};if(_0x1fb115)this['_db']()['transactionSync'](_0x3f42ff);else await this['_db']()['childTransaction'](_0x3f42ff);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x214a2e)return{'acquired':![],'handle':null,'current':_0x2e774c};const _0x42ec3a=new _0x58f8c1(this,_0x828443,_0x4ca8dc[_0xa65002(0x65a)]);return _0x42ec3a[_0xa65002(0x429)](_0x37b3f6,this['heartbeatMs']),{'acquired':!![],'handle':_0x42ec3a,'current':_0x2e774c};}[_0x380fe8(0x2b5)](_0x4e2426){const _0x173068=_0x380fe8;try{return this['_db']()['get'](this[_0x173068(0x22d)](_0x4e2426))??null;}catch{return null;}}[_0x380fe8(0x437)](){const _0x53ddb6=_0x380fe8,_0x950450=this['namespace']+':',_0x3b1dbe=[];try{for(const {key:_0x421140,value:_0x5c1e39}of this[_0x53ddb6(0x441)]()[_0x53ddb6(0x73f)]({'start':_0x950450,'end':_0x950450+'\xff'})){typeof _0x421140===_0x53ddb6(0x44e)&&_0x421140[_0x53ddb6(0x637)](_0x950450)&&_0x3b1dbe['push']({'id':_0x421140[_0x53ddb6(0x5b8)](_0x950450['length']),'entry':_0x5c1e39});}}catch{}return _0x3b1dbe;}static[_0x380fe8(0x302)](_0x400cb0){const _0x3edfdd=_0x380fe8,_0x3d799d=[];try{const _0x17b3df=_0x400cb0[_0x3edfdd(0x79e)](_0x46704f,{'dupSort':![]});for(const {key:_0xe45818,value:_0x126d73}of _0x17b3df[_0x3edfdd(0x73f)]({})){if(typeof _0xe45818!==_0x3edfdd(0x44e))continue;const _0x1fbee5=_0xe45818[_0x3edfdd(0x5f2)](':');if(_0x1fbee5<0x1)continue;_0x3d799d['push']({'namespace':_0xe45818[_0x3edfdd(0x5b8)](0x0,_0x1fbee5),'id':_0xe45818[_0x3edfdd(0x5b8)](_0x1fbee5+0x1),'entry':_0x126d73});}}catch{}return _0x3d799d;}}return okdbLock={'OKDBLock':_0x13d882},okdbLock;}var okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x54a94d=_0x362184;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x5cb7ef=require$$0,_0x2d7a1d=require$$1$2,_0x344f44=require$$2,{LOOP:_0x32ffdd}=requireOkdbLoopMonitor(),{OKDBLock:_0x12ee53}=requireOkdbLock(),{SYNC_COMMITS:_0x5c9203}=requireOkdbWriter(),_0x345b6a=_0x54a94d(0x476),_0x12e27e=_0x54a94d(0x1f9),_0x334020=_0x54a94d(0x4a9),_0x1a73d2=_0x54a94d(0x3bc),_0x3355a2=(_0x1ff3a0,_0x3f3d1f)=>_0x1ff3a0+':'+_0x3f3d1f,_0x2137c4=(_0x314661,_0x115e04)=>_0x314661+'::'+_0x115e04,_0x23bc47=(_0x555672,_0x23a206)=>_0x555672+'/'+_0x23a206,_0x474b19=(_0x30b611,_0x553f6e)=>_0x30b611+'#'+_0x553f6e,_0x55ee5c=_0x177705=>{const _0x1bb218=_0x54a94d;if(_0x177705?.[_0x1bb218(0x422)])return _0x177705[_0x1bb218(0x422)];const _0xd1cf61=_0x177705?.['nodeKey'];return typeof _0xd1cf61==='string'&&_0xd1cf61[_0x1bb218(0x1dc)]('#')?_0xd1cf61[_0x1bb218(0x5b8)](0x0,_0xd1cf61[_0x1bb218(0x5f2)]('#')):_0xd1cf61;},_0x3e0276=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x2744de=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x5298b5=_0x3e0276*0x3,_0x1305d0=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math[_0x54a94d(0x270)](0x927c0,_0x5298b5*0x14),_0x593c61=[_0x54a94d(0x40f),_0x54a94d(0x4cd),_0x54a94d(0x701),_0x54a94d(0x665),'processor:paused','processor:resumed'];let _0x1b7dcd=null;function _0x4685e2(){const _0x303cfc=_0x54a94d;if(_0x1b7dcd==null)_0x1b7dcd=Math[_0x303cfc(0x6bd)]((Date['now']()-process[_0x303cfc(0x4c1)]()*0x3e8)/0x3e8)*0x3e8;return _0x1b7dcd;}function _0x25759f(_0x40efdd){const _0x4743a1=_0x54a94d;if(process.env.OKDB_PROCESS_KILL===_0x4743a1(0x77f))return![];if(_0x40efdd?.['options']?.[_0x4743a1(0x721)]&&typeof _0x40efdd['options'][_0x4743a1(0x721)]===_0x4743a1(0x40d)&&_0x40efdd[_0x4743a1(0x659)][_0x4743a1(0x721)][_0x4743a1(0x49c)]===![])return![];return!![];}function _0x553dbb(_0xab5b7d,_0x4a7003){const _0x2c5b78=_0x54a94d,_0x5e1e96=!!_0x4a7003?.[_0x2c5b78(0x471)];switch(_0xab5b7d){case _0x2c5b78(0x30c):return{'controllable':_0x5e1e96,'decommissionable':![],'killable':!![],'killConfirm':_0x2c5b78(0x6b4)};case _0x2c5b78(0x335):case'standalone':return{'controllable':_0x5e1e96,'decommissionable':![],'killable':!![],'killConfirm':_0x2c5b78(0x51f)};case _0x2c5b78(0x18a):return{'controllable':![],'decommissionable':![],'killable':![]};case _0x2c5b78(0x5ea):case _0x2c5b78(0x203):case _0x2c5b78(0x496):case'worker':return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':_0x2c5b78(0x37b)};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x1eefa2{constructor(_0x127df5){const _0xa2ac64=_0x54a94d;this[_0xa2ac64(0x784)]=_0x127df5,this['_statusEnv']=null,this['_desired']=null,this[_0xa2ac64(0x2b1)]=new Map(),this[_0xa2ac64(0x704)]=null,this[_0xa2ac64(0x778)]=![],this[_0xa2ac64(0x623)]=![],this[_0xa2ac64(0x5c7)]=_0x4685e2(),this['_selfKey']=_0x3355a2(process[_0xa2ac64(0x789)],this['_processStartedAt']),this[_0xa2ac64(0x6e7)]=_0x344f44['randomUUID']()['slice'](0x0,0x8),this['_rowKey']=_0x474b19(this[_0xa2ac64(0x4d4)],this[_0xa2ac64(0x6e7)]),this['_startedAt']=Date['now'](),this['_kind']=null,this[_0xa2ac64(0x6f7)]=null,this[_0xa2ac64(0x60f)]=null,this[_0xa2ac64(0x421)]=null,this[_0xa2ac64(0x5f0)]=null,this[_0xa2ac64(0x5cf)]=null,this[_0xa2ac64(0x5ec)]=0x0,this[_0xa2ac64(0x1fb)]={},this[_0xa2ac64(0x719)]=new Map(),this[_0xa2ac64(0x542)]=process[_0xa2ac64(0x2fd)](),this[_0xa2ac64(0x68d)]=Date[_0xa2ac64(0x6fd)](),this['_lastCpuPct']=0x0,this['_threadStats']=new Map();}get[_0x54a94d(0x198)](){const _0x4895a8=_0x54a94d;return this[_0x4895a8(0x4d4)];}get[_0x54a94d(0x386)](){const _0x4fd160=_0x54a94d;return this[_0x4fd160(0x1df)];}[_0x54a94d(0x37d)](_0x1c28b5,_0x494b58){const _0x983480=_0x54a94d,_0x55521a=_0x553dbb(_0x1c28b5,_0x494b58);if(_0x55521a[_0x983480(0x465)]&&!_0x25759f(this['okdb']))return{..._0x55521a,'killable':![],'killConfirm':undefined};return _0x55521a;}[_0x54a94d(0x368)](){const _0x49ecda=_0x54a94d;return!!this[_0x49ecda(0x534)];}[_0x54a94d(0x312)](_0x331849){const _0x96f074=_0x54a94d;Object[_0x96f074(0x2f7)](this[_0x96f074(0x1fb)],_0x331849||{});}[_0x54a94d(0x322)](_0x5b2b57){const _0x561c97=_0x54a94d;if(_0x5b2b57)this[_0x561c97(0x60f)]=_0x5b2b57;}[_0x54a94d(0x513)](_0x35987e={}){const _0x696961=_0x54a94d;return this[_0x696961(0x784)][_0x696961(0x5e6)](_0x35987e);}[_0x54a94d(0x1c0)](){const _0x4cf4f3=_0x54a94d,_0xbe2daf={};let _0x32187e=0x0,_0xd76ebf=0x0;const _0x452097=new Set();for(const _0x574aa5 of this[_0x4cf4f3(0x1f3)]()){_0xd76ebf++;const _0x3261da=_0x574aa5['processing'];if(!_0x3261da)continue;if(_0x3261da[_0x4cf4f3(0x330)])_0x32187e++;for(const _0x3aa822 of _0x3261da['processors']||[]){if(!['single',_0x4cf4f3(0x6c7)][_0x4cf4f3(0x1dc)](_0x3aa822['mode']))continue;(_0x3aa822[_0x4cf4f3(0x687)]===_0x4cf4f3(0x3af)||_0x3aa822[_0x4cf4f3(0x687)]===_0x4cf4f3(0x3f6))&&_0x3aa822[_0x4cf4f3(0x5a0)]&&_0x452097[_0x4cf4f3(0x4d2)]((_0x3aa822[_0x4cf4f3(0x758)]||_0x4cf4f3(0x445))+':'+_0x3aa822[_0x4cf4f3(0x5a0)]);const _0x3c9016=_0x3aa822[_0x4cf4f3(0x758)]||_0x4cf4f3(0x445);(_0xbe2daf[_0x3c9016]||=[])[_0x4cf4f3(0x387)]({..._0x3aa822,'env':_0x3c9016,'owner':{'pid':_0x574aa5[_0x4cf4f3(0x789)]??null,'kind':_0x574aa5[_0x4cf4f3(0x4c2)]??null}});}}for(const [_0x53eda2,_0x25a336]of Object[_0x4cf4f3(0x62b)](_0xbe2daf)){for(const _0x2bfd84 of _0x25a336){if(_0x2bfd84[_0x4cf4f3(0x4f5)]===_0x4cf4f3(0x34f)&&!_0x2bfd84[_0x4cf4f3(0x548)]){const _0x2bbd50=_0x53eda2+':'+(_0x2bfd84[_0x4cf4f3(0x5a0)]??'');if(!_0x452097['has'](_0x2bbd50))_0x2bfd84[_0x4cf4f3(0x215)]=!![];}}}return{'envs':_0xbe2daf,'policy':null,'participation':{'participating':_0x32187e,'total':_0xd76ebf},'source':'workers'};}[_0x54a94d(0x70b)](){const _0x4ed30b=_0x54a94d,_0x23293d=_0x42f371=>{const _0x25f69f=_0x4307;if(_0x42f371[_0x25f69f(0x687)]===_0x25f69f(0x3af)||_0x42f371['state']==='building'||_0x42f371[_0x25f69f(0x687)]==='error')return 0x3;if(_0x42f371[_0x25f69f(0x548)])return 0x1;return 0x2;},_0x5341c7=new Map();for(const _0x2cc13b of this[_0x4ed30b(0x1f3)]()){for(const _0x495008 of _0x2cc13b[_0x4ed30b(0x494)]?.['processors']||[]){const _0x8ad488={..._0x495008,'owner':{'pid':_0x2cc13b['pid']??null,'kind':_0x2cc13b[_0x4ed30b(0x4c2)]??null,'host':_0x2cc13b[_0x4ed30b(0x76f)]??null}},_0x29a1de=_0x495008['mode']==='single'?_0x4ed30b(0x328)+(_0x495008[_0x4ed30b(0x758)]??'')+'::'+(_0x495008[_0x4ed30b(0x5a0)]??_0x495008[_0x4ed30b(0x5e4)]??_0x495008['id']):_0x4ed30b(0x275)+(_0x2cc13b[_0x4ed30b(0x2a1)]??_0x2cc13b[_0x4ed30b(0x422)]??'')+'::'+(_0x495008[_0x4ed30b(0x758)]??'')+'::'+_0x495008['id'],_0x3469f3=_0x5341c7[_0x4ed30b(0x3e6)](_0x29a1de);if(!_0x3469f3||_0x23293d(_0x8ad488)>_0x23293d(_0x3469f3))_0x5341c7['set'](_0x29a1de,_0x8ad488);}}return[..._0x5341c7[_0x4ed30b(0x397)]()];}[_0x54a94d(0x691)](){const _0x4c8a0e=_0x54a94d,_0x24260a=Date['now'](),_0x372ac6=this[_0x4c8a0e(0x1f3)](),_0xc5f592=_0x3a7715=>Math[_0x4c8a0e(0x270)](0x0,Math[_0x4c8a0e(0x6bd)]((_0x24260a-(_0x3a7715[_0x4c8a0e(0x714)]||_0x24260a))/0x3e8)),_0x560fb3=_0x372ac6[_0x4c8a0e(0x475)](_0x2f5d2c=>_0x2f5d2c[_0x4c8a0e(0x4c2)]===_0x4c8a0e(0x30c)),_0xeeed80=_0x372ac6[_0x4c8a0e(0x1ff)](_0x3a6a39=>_0x3a6a39[_0x4c8a0e(0x4c2)]==='http-server');if(_0x560fb3||_0xeeed80[_0x4c8a0e(0x503)])return{'primary':_0x560fb3?{'pid':_0x560fb3[_0x4c8a0e(0x789)],'uptime':_0xc5f592(_0x560fb3)}:null,'workers':_0xeeed80[_0x4c8a0e(0x626)](_0x55a5df=>({'pid':_0x55a5df['pid'],'uptime':_0xc5f592(_0x55a5df)})),'workersConfigured':_0x560fb3?.[_0x4c8a0e(0x58a)]?.['workersConfigured']??_0xeeed80[_0x4c8a0e(0x503)],'mode':_0x4c8a0e(0x3a6)};const _0x508c8d=_0x372ac6[_0x4c8a0e(0x475)](_0x2a3e39=>_0x2a3e39[_0x4c8a0e(0x4c2)]===_0x4c8a0e(0x335)||_0x2a3e39[_0x4c8a0e(0x4c2)]===_0x4c8a0e(0x410)||_0x2a3e39[_0x4c8a0e(0x4c2)]==='embedded'),_0x1d8915=_0x508c8d?{'pid':_0x508c8d[_0x4c8a0e(0x789)],'uptime':_0xc5f592(_0x508c8d)}:{'pid':process[_0x4c8a0e(0x789)],'uptime':Math[_0x4c8a0e(0x270)](0x0,Math[_0x4c8a0e(0x6bd)](process['uptime']()))};return{'primary':_0x1d8915,'workers':[_0x1d8915],'workersConfigured':0x1,'mode':_0x4c8a0e(0x34f)};}[_0x54a94d(0x6c9)](){const _0x49b51e=_0x54a94d;return this[_0x49b51e(0x62c)]();}[_0x54a94d(0x448)](){const _0x620866=_0x54a94d,_0xbfc942=new Map();for(const _0x18dfdc of this[_0x620866(0x62c)]())_0xbfc942[_0x620866(0x36f)](_0x18dfdc[_0x620866(0x422)],{..._0x18dfdc,'children':[]});const _0x50e831=[];for(const _0x2bdb34 of _0xbfc942[_0x620866(0x397)]()){const _0x12c0ba=_0x2bdb34['supervisorKey']?_0xbfc942[_0x620866(0x3e6)](_0x2bdb34[_0x620866(0x2fc)]):null;if(_0x12c0ba&&_0x12c0ba!==_0x2bdb34)_0x12c0ba[_0x620866(0x201)][_0x620866(0x387)](_0x2bdb34);else _0x50e831[_0x620866(0x387)](_0x2bdb34);}const _0x2c8683=(_0x1f1ab1,_0x43b606)=>_0x1f1ab1[_0x620866(0x4c2)]===_0x43b606['kind']?(_0x1f1ab1[_0x620866(0x789)]||0x0)-(_0x43b606[_0x620866(0x789)]||0x0):(_0x1f1ab1[_0x620866(0x4c2)]??'')<(_0x43b606[_0x620866(0x4c2)]??'')?-0x1:0x1,_0x20e7a7=_0x4ec944=>{const _0x55d826=_0x620866;_0x4ec944[_0x55d826(0x788)](_0x2c8683);for(const _0x4ed1ec of _0x4ec944)if(_0x4ed1ec[_0x55d826(0x201)][_0x55d826(0x503)])_0x20e7a7(_0x4ed1ec[_0x55d826(0x201)]);};return _0x20e7a7(_0x50e831),_0x50e831;}[_0x54a94d(0x2bd)](_0x4e5dae){const _0x59d66d=_0x54a94d;return this['_groupByProcess']()[_0x59d66d(0x475)](_0x266089=>_0x266089[_0x59d66d(0x422)]===_0x4e5dae)??null;}[_0x54a94d(0x62c)](_0x3d6a5e=Date[_0x54a94d(0x6fd)]()){const _0x103db5=_0x54a94d,_0x56b753=new Map();for(const _0xaebac9 of this['listNodes']()){const _0x751312=_0x55ee5c(_0xaebac9);let _0x1f54ec=_0x56b753[_0x103db5(0x3e6)](_0x751312);!_0x1f54ec&&(_0x1f54ec={'processKey':_0x751312,'nodeKey':_0x751312,'pid':_0xaebac9[_0x103db5(0x789)],'ppid':_0xaebac9[_0x103db5(0x6dd)]??null,'host':_0xaebac9[_0x103db5(0x76f)]??null,'kind':_0xaebac9[_0x103db5(0x4c2)],'role':null,'supervisorKey':_0xaebac9[_0x103db5(0x2fc)]??null,'slot':_0xaebac9[_0x103db5(0x1d1)]??null,'slotKey':_0xaebac9['slotKey']??null,'caps':_0xaebac9[_0x103db5(0x53e)]??null,'lifecycle':_0xaebac9['lifecycle']??null,'uptime':Math['max'](0x0,Math[_0x103db5(0x6bd)]((_0x3d6a5e-(_0xaebac9[_0x103db5(0x714)]||_0x3d6a5e))/0x3e8)),'startedAt':_0xaebac9[_0x103db5(0x714)]??null,'meta':_0xaebac9[_0x103db5(0x58a)]??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x56b753[_0x103db5(0x36f)](_0x751312,_0x1f54ec));_0x1f54ec[_0x103db5(0x739)][_0x103db5(0x387)]({'instanceId':_0xaebac9[_0x103db5(0x757)]??null,'role':_0xaebac9['role']??null,'listenAddr':_0xaebac9['listenAddr']??null,'lifecycle':_0xaebac9['lifecycle']??null,'processing':_0xaebac9[_0x103db5(0x494)]??null});if(!_0x1f54ec[_0x103db5(0x6ea)]&&_0xaebac9[_0x103db5(0x6ea)])_0x1f54ec['role']=_0xaebac9[_0x103db5(0x6ea)];if(!_0x1f54ec[_0x103db5(0x650)]&&_0xaebac9['listenAddr'])_0x1f54ec[_0x103db5(0x650)]=_0xaebac9[_0x103db5(0x650)];if(!_0x1f54ec[_0x103db5(0x494)]&&_0xaebac9['processing'])_0x1f54ec[_0x103db5(0x494)]=_0xaebac9['processing'];if(!_0x1f54ec[_0x103db5(0x517)]&&_0xaebac9[_0x103db5(0x517)])_0x1f54ec[_0x103db5(0x517)]=_0xaebac9[_0x103db5(0x517)];if(!_0x1f54ec[_0x103db5(0x4e1)]&&_0xaebac9[_0x103db5(0x4e1)])_0x1f54ec[_0x103db5(0x4e1)]=_0xaebac9[_0x103db5(0x4e1)];if(_0x1f54ec[_0x103db5(0x53e)]==null&&_0xaebac9['caps'])_0x1f54ec[_0x103db5(0x53e)]=_0xaebac9[_0x103db5(0x53e)];if(_0xaebac9[_0x103db5(0x5b2)]&&(!_0x1f54ec[_0x103db5(0x5b2)]||(_0xaebac9[_0x103db5(0x5b2)]['at']??0x0)>(_0x1f54ec[_0x103db5(0x5b2)]['at']??0x0)))_0x1f54ec[_0x103db5(0x5b2)]=_0xaebac9[_0x103db5(0x5b2)];}return[..._0x56b753[_0x103db5(0x397)]()];}[_0x54a94d(0x29e)](){const _0x28c6fe=_0x54a94d,_0x35e76d=[],_0x1fea9e={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x15f71e of this['_groupByProcess']()){_0x35e76d[_0x28c6fe(0x387)]({'processKey':_0x15f71e['processKey'],'kind':_0x15f71e['kind'],'pid':_0x15f71e[_0x28c6fe(0x789)],'supervisorKey':_0x15f71e['supervisorKey'],'meta':_0x15f71e[_0x28c6fe(0x58a)]??null,'uptime':_0x15f71e[_0x28c6fe(0x4c1)],'stats':_0x15f71e[_0x28c6fe(0x5b2)]??null}),_0x1fea9e[_0x28c6fe(0x721)]++;if(_0x15f71e['stats']){_0x1fea9e[_0x28c6fe(0x380)]+=_0x15f71e[_0x28c6fe(0x5b2)][_0x28c6fe(0x380)]||0x0,_0x1fea9e[_0x28c6fe(0x685)]+=(_0x15f71e[_0x28c6fe(0x5b2)][_0x28c6fe(0x685)]||0x0)+(_0x15f71e['stats'][_0x28c6fe(0x4da)]?.[_0x28c6fe(0x685)]||0x0);const _0x3ad2db=_0x15f71e[_0x28c6fe(0x5b2)][_0x28c6fe(0x4da)];_0x3ad2db&&(_0x1fea9e[_0x28c6fe(0x4da)][_0x28c6fe(0x5b9)]+=_0x3ad2db[_0x28c6fe(0x5b9)]||0x0,_0x1fea9e[_0x28c6fe(0x4da)][_0x28c6fe(0x24d)]+=_0x3ad2db[_0x28c6fe(0x24d)]||0x0,_0x1fea9e[_0x28c6fe(0x4da)]['busy']+=_0x3ad2db[_0x28c6fe(0x64f)]||0x0);}}return{'totals':_0x1fea9e,'nodes':_0x35e76d};}async['open']({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x1d8004=_0x54a94d;this[_0x1d8004(0x778)]=this['_isWriter']||!!writer,this['_isReader']=this[_0x1d8004(0x623)]||!!reader,this[_0x1d8004(0x51b)]=kind||this[_0x1d8004(0x51b)]||(_0x2d7a1d[_0x1d8004(0x698)]?_0x1d8004(0x5ea):_0x1d8004(0x335)),this[_0x1d8004(0x6f7)]=supervisorKey??this['_supervisorKey'],this[_0x1d8004(0x60f)]=listenAddr??this['_listenAddr'],this[_0x1d8004(0x5b5)](),await this['_migrateVocab']();if(!writer&&!reader)return null;if(!this['_statusEnv']){const _0x59aa40=await this['okdb'][_0x1d8004(0x394)](_0x345b6a,{'sync':![],'durability':_0x1d8004(0x6c1)});await _0x59aa40['ensureType'](_0x12e27e),this[_0x1d8004(0x534)]=_0x59aa40;}return this['_statusEnv'];}[_0x54a94d(0x2e5)](){const _0x13c72c=_0x54a94d;return this['_nodeDbFor']!==this['_statusEnv']&&(this[_0x13c72c(0x268)]=this[_0x13c72c(0x534)],this[_0x13c72c(0x564)]=this['_statusEnv']['_getType'](_0x12e27e)['data']),this['_nodeDbCache'];}[_0x54a94d(0x31e)](_0x5a9c35){const _0x30fa22=_0x54a94d;if(_0x5c9203)return this[_0x30fa22(0x2e5)]()['putSync'](_0x5a9c35[_0x30fa22(0x2a1)],_0x5a9c35,0x1);const _0x1d7834=this['_nodeDb']()[_0x30fa22(0x66a)](_0x5a9c35[_0x30fa22(0x2a1)],_0x5a9c35,0x1);if(_0x1d7834&&typeof _0x1d7834[_0x30fa22(0x4a7)]==='function')_0x1d7834[_0x30fa22(0x4a7)](undefined,()=>{});return _0x1d7834;}[_0x54a94d(0x724)](_0x4d0fc3){const _0x4c06c0=_0x54a94d;return this['_nodeDb']()[_0x4c06c0(0x6da)](_0x4d0fc3[_0x4c06c0(0x2a1)],_0x4d0fc3,0x1);}['_removeRowAsync'](_0x5d7732){const _0x3831a6=_0x54a94d;if(_0x5c9203)try{return this[_0x3831a6(0x2e5)]()['removeSync'](_0x5d7732);}catch{return![];}const _0x242fb2=this[_0x3831a6(0x2e5)]()[_0x3831a6(0x488)](_0x5d7732);if(_0x242fb2&&typeof _0x242fb2['then']==='function')_0x242fb2[_0x3831a6(0x4a7)](undefined,()=>{});return _0x242fb2;}async[_0x54a94d(0x587)](_0x1812ac){const _0x3e8650=_0x54a94d;if(!this[_0x3e8650(0x534)]||!this[_0x3e8650(0x778)]||!_0x1812ac?.[_0x3e8650(0x2a1)])return;return this[_0x3e8650(0x31e)](_0x1812ac);}async[_0x54a94d(0x316)](_0x3e2633){const _0x5f2af2=_0x54a94d;if(!this[_0x5f2af2(0x534)]||!this['_isWriter']||!_0x3e2633)return;const _0x40d61e=_0x3e2633[_0x5f2af2(0x1dc)]('#'),_0x35f879=[];for(const {key:_0x1008c6}of this[_0x5f2af2(0x534)][_0x5f2af2(0x73f)](_0x12e27e)){if(_0x1008c6===_0x3e2633||!_0x40d61e&&typeof _0x1008c6==='string'&&_0x1008c6[_0x5f2af2(0x637)](_0x3e2633+'#'))_0x35f879[_0x5f2af2(0x387)](_0x1008c6);}for(const _0x240efb of _0x35f879){try{this[_0x5f2af2(0x2e5)]()['removeSync'](_0x240efb);}catch{}}}[_0x54a94d(0x2d4)](_0xdebd95){const _0x52a226=_0x54a94d;if(typeof _0xdebd95?.[_0x52a226(0x789)]!=='number')return![];if(_0xdebd95[_0x52a226(0x76f)]!==_0x5cb7ef[_0x52a226(0x57e)]())return![];if(_0xdebd95['pid']===process[_0x52a226(0x789)])return![];if(_0xdebd95['expiresAt']!=null&&_0xdebd95[_0x52a226(0x4f7)]<Date[_0x52a226(0x6fd)]()-_0x1305d0)return!![];try{return process['kill'](_0xdebd95[_0x52a226(0x789)],0x0),![];}catch(_0x5da6cf){return _0x5da6cf[_0x52a226(0x2a0)]===_0x52a226(0x55c);}}[_0x54a94d(0x1f3)](){const _0x54eedb=_0x54a94d;if(!this[_0x54eedb(0x534)])return[];try{this['_statusEnv']['db']?.[_0x54eedb(0x4a2)]?.();}catch{}const _0x2e815e=Date[_0x54eedb(0x6fd)](),_0x34a666=_0x5cb7ef[_0x54eedb(0x57e)](),_0x17a50a=[];for(const {value:_0x501367}of this[_0x54eedb(0x534)][_0x54eedb(0x73f)](_0x12e27e)){if(!_0x501367)continue;let _0x205718=null;_0x501367[_0x54eedb(0x76f)]===_0x34a666&&typeof _0x501367[_0x54eedb(0x789)]==='number'&&(_0x205718=!this['_nodeDead'](_0x501367));if(_0x205718===![])continue;const _0xd41457=_0x501367['expiresAt']==null||_0x501367[_0x54eedb(0x4f7)]>=_0x2e815e;if(_0x205718===!![]||_0xd41457)_0x17a50a['push'](_0x501367);}return _0x17a50a;}async['reap'](_0x4ae049=0x0){const _0x290c7a=_0x54a94d;if(!this['_statusEnv']||!this[_0x290c7a(0x778)])return;const _0x53bbd5=Date[_0x290c7a(0x6fd)]()-_0x4ae049,_0x132551=new Set(),_0x1d58b9=[],_0x23f61e=_0x5cb7ef[_0x290c7a(0x57e)](),_0x5ac256=require$$3['version'];for(const {key:_0x196146,value:_0x4a9113}of this[_0x290c7a(0x534)]['getRange'](_0x12e27e)){if(!_0x4a9113)continue;const _0x102784=_0x4a9113[_0x290c7a(0x76f)]===_0x23f61e&&typeof _0x4a9113[_0x290c7a(0x789)]===_0x290c7a(0x6e3),_0x52fc75=_0x102784?this[_0x290c7a(0x2d4)](_0x4a9113):_0x4a9113['expiresAt']!=null&&_0x4a9113[_0x290c7a(0x4f7)]<_0x53bbd5;if(_0x52fc75)_0x1d58b9[_0x290c7a(0x387)](_0x196146);else{_0x132551['add'](_0x55ee5c(_0x4a9113)??_0x196146);if(_0x4a9113[_0x290c7a(0x2b3)]&&_0x4a9113[_0x290c7a(0x2b3)]!==_0x5ac256){if(!this[_0x290c7a(0x1a3)])this[_0x290c7a(0x1a3)]=new Set();!this[_0x290c7a(0x1a3)][_0x290c7a(0x52e)](_0x4a9113[_0x290c7a(0x2b3)])&&(this[_0x290c7a(0x1a3)][_0x290c7a(0x4d2)](_0x4a9113[_0x290c7a(0x2b3)]),this[_0x290c7a(0x784)][_0x290c7a(0x273)]?.['warn']?.(_0x290c7a(0x607)+(_0x4a9113['pid']??'?')+'\x20on\x20this\x20data\x20path\x20runs\x20okdb\x20'+_0x4a9113[_0x290c7a(0x2b3)]+_0x290c7a(0x485)+_0x5ac256+_0x290c7a(0x1a5)+_0x290c7a(0x453),{'feature':'migrations'}));}}}for(const _0x23a80e of _0x1d58b9)this['_removeRowAsync'](_0x23a80e);if(this[_0x290c7a(0x5b5)]()){const _0x2334e7=[];for(const {key:_0xbba873}of this[_0x290c7a(0x3e1)]('node')){if(!_0x132551[_0x290c7a(0x52e)](_0xbba873)){if(_0x5c9203)try{this['_desired']['removeSync']('node/'+_0xbba873);}catch{}else _0x2334e7[_0x290c7a(0x387)](this[_0x290c7a(0x6a6)]['remove'](_0x290c7a(0x470)+_0xbba873));}}if(_0x2334e7['length'])await Promise[_0x290c7a(0x6ed)](_0x2334e7);}}[_0x54a94d(0x5bc)](_0x3736d4=null){const _0x3dfbb9=_0x54a94d;if(this['_hbTimer'])return;if(!this[_0x3dfbb9(0x778)]||!this[_0x3dfbb9(0x534)]){this[_0x3dfbb9(0x784)]?.[_0x3dfbb9(0x273)]?.[_0x3dfbb9(0x21b)]?.(_0x3dfbb9(0x2eb)+this[_0x3dfbb9(0x778)]+_0x3dfbb9(0x526)+!!this[_0x3dfbb9(0x534)]+')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census',{'feature':_0x3dfbb9(0x721)});return;}this[_0x3dfbb9(0x5cf)]=_0x3736d4,this[_0x3dfbb9(0x5f0)]=()=>this[_0x3dfbb9(0x559)]();for(const _0x1f4921 of _0x593c61)this[_0x3dfbb9(0x784)][_0x3dfbb9(0x3e2)]['on'](_0x1f4921,this[_0x3dfbb9(0x5f0)]);this[_0x3dfbb9(0x468)]();const _0x23ec55=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x3e0276;this[_0x3dfbb9(0x421)]=setInterval(()=>{const _0x191e0b=_0x3dfbb9;if(this['_onTick'])try{this[_0x191e0b(0x5cf)]();}catch{}this[_0x191e0b(0x468)](),this[_0x191e0b(0x62d)]()[_0x191e0b(0x628)](()=>{});},_0x23ec55);if(this[_0x3dfbb9(0x421)][_0x3dfbb9(0x442)])this[_0x3dfbb9(0x421)]['unref']();}[_0x54a94d(0x559)](){const _0x4b4dbd=_0x54a94d;if(!this[_0x4b4dbd(0x778)]||!this['_statusEnv'])return;if(Date['now']()-this[_0x4b4dbd(0x5ec)]<_0x2744de)return;this[_0x4b4dbd(0x468)]();}['_publishNow'](){const _0x2992d3=_0x54a94d;if(!this['_isWriter']||!this[_0x2992d3(0x534)])return;this[_0x2992d3(0x5ec)]=Date[_0x2992d3(0x6fd)]();try{const _0x5efda3=[this[_0x2992d3(0x72b)]()];for(const _0x4b67ac of this['_children'][_0x2992d3(0x397)]())_0x5efda3['push'](this[_0x2992d3(0x35c)](_0x4b67ac));const _0x4d0bf4=_0x32ffdd['enabled']?_0x32ffdd[_0x2992d3(0x6fd)]():0x0;for(const _0x5ea832 of _0x5efda3){try{this['_putRowSync'](_0x5ea832),this['_publishFailWarned']=![];}catch(_0x147286){!this['_publishFailWarned']&&(this[_0x2992d3(0x5e3)]=!![],this[_0x2992d3(0x784)]?.[_0x2992d3(0x273)]?.[_0x2992d3(0x21b)]?.(_0x2992d3(0x423)+_0x147286[_0x2992d3(0x1e0)],{'feature':'processes'}));}}if(_0x32ffdd[_0x2992d3(0x40c)])_0x32ffdd['note'](_0x2992d3(0x369),_0x32ffdd[_0x2992d3(0x6fd)]()-_0x4d0bf4,'rows='+_0x5efda3['length']+_0x2992d3(0x1f6));}catch(_0x386d0c){!this['_publishFailWarned']&&(this['_publishFailWarned']=!![],this[_0x2992d3(0x784)]?.['log']?.[_0x2992d3(0x21b)]?.(_0x2992d3(0x423)+_0x386d0c[_0x2992d3(0x1e0)],{'feature':_0x2992d3(0x721)}));}}async[_0x54a94d(0x2de)](){const _0x52c2cc=_0x54a94d;if(this[_0x52c2cc(0x5f0)]){for(const _0x396b15 of _0x593c61){try{this[_0x52c2cc(0x784)][_0x52c2cc(0x3e2)][_0x52c2cc(0x77f)](_0x396b15,this['_onProcEvent']);}catch{}}this[_0x52c2cc(0x5f0)]=null;}this[_0x52c2cc(0x421)]&&(clearInterval(this[_0x52c2cc(0x421)]),this['_hbTimer']=null);try{if(this[_0x52c2cc(0x534)]&&this['_isWriter'])await this[_0x52c2cc(0x316)](this['_rowKey']);}catch{}}async['deregisterSelf'](){const _0x53bd42=_0x54a94d;if(!this[_0x53bd42(0x534)]||!this[_0x53bd42(0x778)])return;try{await this['removeNode'](this[_0x53bd42(0x1df)]);}catch{}try{const _0x13ecce=[];for(const {value:_0x671e9b}of this['_statusEnv'][_0x53bd42(0x73f)](_0x12e27e)){if(_0x671e9b?.[_0x53bd42(0x6dd)]===process[_0x53bd42(0x789)]&&_0x671e9b[_0x53bd42(0x2a1)])_0x13ecce[_0x53bd42(0x387)](_0x671e9b[_0x53bd42(0x2a1)]);}for(const _0x3eb679 of _0x13ecce){try{await this[_0x53bd42(0x316)](_0x3eb679);}catch{}}}catch{}}async['publishOwnRow'](){const _0x524aef=_0x54a94d;return this['putNode'](this[_0x524aef(0x72b)]());}async['publishChildRow'](_0x1736aa){const _0x4ed77d=_0x54a94d;if(!this['_statusEnv']||!this[_0x4ed77d(0x778)])return;return this['putNode'](this['_buildChildRow'](_0x1736aa));}[_0x54a94d(0x35c)]({pid:_0x3008f2,startedAt:_0x3a7793,kind:_0x172a93,supervisorKey:_0x4e77cb,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0x54a94d(0x390),meta:meta=null,stats:stats=null}){const _0x54d681=_0x54a94d,_0x5347b3=Date[_0x54d681(0x6fd)](),_0x3f8add=_0x3355a2(_0x3008f2,_0x3a7793);return{'nodeKey':_0x474b19(_0x3f8add,'0'),'processKey':_0x3f8add,'instanceId':'0','pid':_0x3008f2,'startedAt':_0x3a7793,'ppid':process[_0x54d681(0x789)],'host':_0x5cb7ef[_0x54d681(0x57e)](),'supervisorKey':_0x4e77cb,'slot':slot,'slotKey':slotKey,'kind':_0x172a93,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x5347b3,'expiresAt':_0x5347b3+_0x5298b5,'caps':this[_0x54d681(0x37d)](_0x172a93,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0x54a94d(0x68f)](_0x5db532){const _0x2871e9=_0x54a94d;if(!_0x5db532?.[_0x2871e9(0x789)])return null;const _0x2af78d=_0x3355a2(_0x5db532[_0x2871e9(0x789)],_0x5db532[_0x2871e9(0x714)]);this[_0x2871e9(0x719)][_0x2871e9(0x36f)](_0x2af78d,{..._0x5db532,'supervisorKey':_0x5db532[_0x2871e9(0x2fc)]??this['_selfKey']});if(this['_isWriter'])await this['publishChildRow'](this[_0x2871e9(0x719)][_0x2871e9(0x3e6)](_0x2af78d))[_0x2871e9(0x628)]?.(()=>{});return _0x2af78d;}[_0x54a94d(0x1f4)](_0x54d4a0){const _0x5bd6b7=_0x54a94d;if(!_0x54d4a0)return;return this[_0x5bd6b7(0x719)][_0x5bd6b7(0x560)](_0x54d4a0),this['removeNode'](_0x54d4a0);}[_0x54a94d(0x627)](){const _0x152398=_0x54a94d,_0x13f839=Date[_0x152398(0x6fd)](),_0x477783=process[_0x152398(0x2fd)](),_0x2c6a7a=(_0x13f839-this[_0x152398(0x68d)])*0x3e8;if(_0x2c6a7a>=0x3d090){const _0x11e70b=_0x477783[_0x152398(0x76c)]-this['_lastCpuUsage'][_0x152398(0x76c)]+(_0x477783[_0x152398(0x2ad)]-this[_0x152398(0x542)]['system']),_0x24ac38=_0x5cb7ef[_0x152398(0x573)]()['length']||0x1;this[_0x152398(0x43a)]=Math['min'](0x64,Math[_0x152398(0x6bd)](_0x11e70b/(_0x2c6a7a*_0x24ac38)*0x64)),this[_0x152398(0x579)]=Math[_0x152398(0x6bd)](_0x2c6a7a/0x3e8),this[_0x152398(0x542)]=_0x477783,this[_0x152398(0x68d)]=_0x13f839;}const _0x15315a=process['memoryUsage'](),_0x43553e=this['_threadStats'][_0x152398(0x1f8)];let _0x1b0817=0x0;if(_0x43553e>0x0){const _0x57e8a2=[this[_0x152398(0x784)],...this['okdb']['_envs']?.[_0x152398(0x397)]?.()??[]];for(const _0x495e84 of _0x57e8a2){const _0x43f3fa=_0x495e84[_0x152398(0x59b)]?.[_0x152398(0x2ed)];if(_0x43f3fa)_0x1b0817+=_0x43f3fa[_0x152398(0x707)][_0x152398(0x64f)];}}let _0x32e4d3=null;const _0x1372c=_0x43553e;if(_0x1372c>0x0){let _0x5b8cd0=0x0;for(const _0x493976 of this[_0x152398(0x4ed)][_0x152398(0x397)]())_0x5b8cd0+=_0x493976['heapUsed']||0x0;_0x32e4d3={'count':_0x1372c,'heapUsed':_0x5b8cd0,'sandbox':_0x43553e,'busy':_0x1b0817};}return{'rss':_0x15315a[_0x152398(0x380)],'heapUsed':_0x15315a[_0x152398(0x685)],'heapTotal':_0x15315a['heapTotal'],'external':_0x15315a[_0x152398(0x756)],'cpuPct':this[_0x152398(0x43a)],'cpuWindowMs':this['_lastCpuWindowMs']??null,'threads':_0x32e4d3,'at':_0x13f839};}['reportThreadStats'](_0x3909cc,_0x5f5099){const _0x5c2ab9=_0x54a94d;if(!_0x3909cc||!_0x5f5099)return;this[_0x5c2ab9(0x4ed)][_0x5c2ab9(0x36f)](_0x3909cc,_0x5f5099);}['clearThreadStats'](_0x99807b){const _0x366b84=_0x54a94d;this[_0x366b84(0x4ed)][_0x366b84(0x560)](_0x99807b);}[_0x54a94d(0x6aa)](_0x50ed4e,_0x310aeb,_0x1c7af5=undefined){const _0x4817e5=_0x54a94d,_0x53af51=this[_0x4817e5(0x719)]['get'](_0x50ed4e);if(!_0x53af51||!_0x310aeb)return;if(_0x1c7af5!==undefined)_0x53af51[_0x4817e5(0x494)]=_0x1c7af5;_0x53af51[_0x4817e5(0x5b2)]={'rss':_0x310aeb[_0x4817e5(0x380)]??null,'heapUsed':_0x310aeb[_0x4817e5(0x685)]??null,'heapTotal':_0x310aeb['heapTotal']??null,'external':_0x310aeb[_0x4817e5(0x756)]??null,'cpuPct':_0x310aeb[_0x4817e5(0x234)]??null,'cpuWindowMs':_0x310aeb[_0x4817e5(0x1b6)]??null,'threads':_0x310aeb[_0x4817e5(0x4da)]??null,'claims':_0x310aeb[_0x4817e5(0x48c)]??null,'envsOpen':_0x310aeb['envsOpen']??null,'at':Date[_0x4817e5(0x6fd)]()};}[_0x54a94d(0x72b)](){const _0x534615=_0x54a94d,_0x2b8ddc=Date[_0x534615(0x6fd)](),_0x773f65=this[_0x534615(0x784)][_0x534615(0x2be)]||{},_0x41d009=this[_0x534615(0x51b)]||'cli';return{'nodeKey':this[_0x534615(0x1df)],'processKey':this[_0x534615(0x4d4)],'instanceId':this[_0x534615(0x6e7)],'pid':process[_0x534615(0x789)],'startedAt':this[_0x534615(0x5c7)],'instanceStartedAt':this[_0x534615(0x334)],'ppid':typeof process[_0x534615(0x6dd)]===_0x534615(0x6e3)?process[_0x534615(0x6dd)]:null,'host':_0x5cb7ef[_0x534615(0x57e)](),'supervisorKey':this[_0x534615(0x6f7)]??null,'version':require$$3[_0x534615(0x2b3)],'kind':_0x41d009,'role':{'engines':!!_0x773f65[_0x534615(0x517)],'processors':!!_0x773f65[_0x534615(0x471)],'compaction':_0x773f65['compaction'],'http':_0x773f65[_0x534615(0x635)]},'listenAddr':this[_0x534615(0x60f)]??null,'heartbeatAt':_0x2b8ddc,'expiresAt':_0x2b8ddc+_0x5298b5,'caps':this['_caps'](_0x41d009,_0x773f65),'lifecycle':{'state':_0x534615(0x390),'desiredVersionApplied':null},'meta':{...this['_ownMeta']},'processing':_0x773f65[_0x534615(0x471)]?this[_0x534615(0x597)]():null,'engines':_0x773f65[_0x534615(0x517)]?[...this[_0x534615(0x784)]['_servingEngines']??[]]:null,'singletonClaims':this[_0x534615(0x770)](),'stats':this[_0x534615(0x627)](),'writers':this[_0x534615(0x6e2)]()};}[_0x54a94d(0x6e2)](){const _0x58f446=_0x54a94d,_0x58f277={};try{for(const [_0x5ca1a2,_0xd5533e]of this[_0x58f446(0x784)][_0x58f446(0x6ca)]){try{const _0x3f197f=_0xd5533e[_0x58f446(0x40a)]?.();if(!_0x3f197f)continue;if(!_0x3f197f[_0x58f446(0x52c)]&&!_0x3f197f[_0x58f446(0x589)]&&!(_0x3f197f[_0x58f446(0x3fd)]??0x0)&&!_0x3f197f[_0x58f446(0x2b8)])continue;_0x58f277[_0x5ca1a2]={'depth':_0x3f197f[_0x58f446(0x52c)],'oldestPendingMs':_0x3f197f['oldestPendingMs'],'committed':_0x3f197f[_0x58f446(0x589)],'commitsPerSec':_0x3f197f[_0x58f446(0x661)],'commitP99Ms':_0x3f197f[_0x58f446(0x658)],'parkedNow':_0x3f197f[_0x58f446(0x3fd)]??0x0,'draining':!!_0x3f197f['draining']};}catch{}}}catch{}return Object['keys'](_0x58f277)[_0x58f446(0x503)]?_0x58f277:null;}['_collectSingletonClaims'](){const _0x17f77c=_0x54a94d,_0x1031e3=process[_0x17f77c(0x789)],_0x54f4f9=Date['now'](),_0x4b8701=_0x509356=>{const _0x341a81=_0x17f77c;if(!_0x509356)return[];const _0x28e0b8=[];try{for(const {id:_0x14f867,entry:_0x5a16e8}of _0x509356[_0x341a81(0x437)]()){if(_0x5a16e8?.['holder']?.[_0x341a81(0x789)]!==_0x1031e3)continue;const _0x28148c=_0x5a16e8[_0x341a81(0x4cf)]??_0x5a16e8['acquiredAt']??0x0;if(_0x28148c+(_0x5a16e8['ttlMs']??0x0)<_0x54f4f9)continue;_0x28e0b8[_0x341a81(0x387)](_0x14f867);}}catch{}return _0x28e0b8;},_0x4be08e=_0x4b8701(this[_0x17f77c(0x66b)](_0x17f77c(0x5c3))),_0x30a4ce=_0x4b8701(this[_0x17f77c(0x66b)](_0x17f77c(0x317)));if(!_0x4be08e[_0x17f77c(0x503)]&&!_0x30a4ce['length'])return null;return{'compact':_0x4be08e,'replicate':_0x30a4ce};}[_0x54a94d(0x66b)](_0x518bce){const _0x3a1951=_0x54a94d;if(!this['okdb']?.[_0x3a1951(0x765)])return null;if(!this['_singletonLocks'])this[_0x3a1951(0x640)]=new Map();let _0x1d2eaa=this['_singletonLocks'][_0x3a1951(0x3e6)](_0x518bce);if(!_0x1d2eaa)try{_0x1d2eaa=new _0x12ee53(this['okdb'][_0x3a1951(0x765)],{'namespace':_0x518bce}),this[_0x3a1951(0x640)][_0x3a1951(0x36f)](_0x518bce,_0x1d2eaa);}catch{return null;}return _0x1d2eaa;}[_0x54a94d(0x597)](){const _0x3c09a4=_0x54a94d,_0x354024=[];try{for(const [_0x48b7cc,_0x23522a]of this[_0x3c09a4(0x784)][_0x3c09a4(0x6ca)]){if(_0x48b7cc[_0x3c09a4(0x637)]('~'))continue;for(const _0x54a7a4 of _0x23522a[_0x3c09a4(0x3a9)][_0x3c09a4(0x1bf)]())_0x354024['push']({..._0x54a7a4,'env':_0x48b7cc});}}catch{}return{'participate':this[_0x3c09a4(0x784)][_0x3c09a4(0x471)]?.['_participate']??![],'processors':_0x354024};}[_0x54a94d(0x5b5)](){const _0x4a8e0b=_0x54a94d;if(this[_0x4a8e0b(0x6a6)])return!![];const _0x13a0ea=this[_0x4a8e0b(0x784)][_0x4a8e0b(0x765)];if(!_0x13a0ea)return![];return this['_desired']=_0x13a0ea[_0x4a8e0b(0x79e)](_0x334020,{'dupSort':![]}),this[_0x4a8e0b(0x704)]=_0x13a0ea['openDB'](_0x1a73d2,{'dupSort':![]}),!![];}async[_0x54a94d(0x795)](){const _0x517cb7=_0x54a94d;if(!this['_ensureDesired']())return;const _0x4b8363=_0x517cb7(0x6c8),_0x1a21b5=0x1,_0x39ed3c=this[_0x517cb7(0x6a6)][_0x517cb7(0x3e6)](_0x4b8363)??0x0;if(_0x39ed3c>=_0x1a21b5)return;const _0x4ca8ca=_0x25260c=>{const _0x426fc2=_0x517cb7;if(_0x25260c===_0x426fc2(0x502))return _0x426fc2(0x34f);if(_0x25260c===_0x426fc2(0x59a))return _0x426fc2(0x6c7);return _0x25260c;};await this['okdb']['_systemEnv'][_0x517cb7(0x398)][_0x517cb7(0x5ab)](()=>{const _0x5dc1e2=_0x517cb7;for(const _0x584062 of['procmode/',_0x5dc1e2(0x5f9)]){for(const {key:_0x54fa31,value:_0x19097d}of this[_0x5dc1e2(0x6a6)][_0x5dc1e2(0x73f)]({'start':_0x584062,'end':_0x584062+'\xff'})){if(typeof _0x54fa31!==_0x5dc1e2(0x44e)||!_0x54fa31['startsWith'](_0x584062))break;const _0x8c828d=_0x4ca8ca(_0x19097d[_0x5dc1e2(0x4f5)]);if(_0x8c828d!==_0x19097d[_0x5dc1e2(0x4f5)])this[_0x5dc1e2(0x6a6)][_0x5dc1e2(0x66a)](_0x54fa31,{..._0x19097d,'mode':_0x8c828d});}}this[_0x5dc1e2(0x6a6)][_0x5dc1e2(0x66a)](_0x4b8363,_0x1a21b5);});}['hasDesired'](){const _0x34306a=_0x54a94d;return!!this[_0x34306a(0x6a6)];}['getDesired'](_0xde0912,_0x568d5c){const _0x42e653=_0x54a94d;if(!this[_0x42e653(0x5b5)]())return null;const _0x206e70=_0xde0912+'/'+_0x568d5c;return this[_0x42e653(0x695)](),this[_0x42e653(0x2b1)][_0x42e653(0x3e6)](_0x206e70)??this[_0x42e653(0x6a6)][_0x42e653(0x3e6)](_0x206e70)??null;}[_0x54a94d(0x695)](){const _0x446eb6=_0x54a94d;if(!_0x5c9203)return;try{this[_0x446eb6(0x784)][_0x446eb6(0x791)]?.['db']?.['resetReadTxn']?.();}catch{}}async[_0x54a94d(0x305)](_0x366897,_0x3a664d,_0x9527d1){const _0x171f46=_0x54a94d;if(!this['_ensureDesired']())return null;const _0x109e66=_0x366897+'/'+_0x3a664d;this['_refreshDesiredSnapshot']();const _0x803e1a=this['_desiredOverlay'][_0x171f46(0x3e6)](_0x109e66)??this['_desired'][_0x171f46(0x3e6)](_0x109e66)??{'version':0x0},_0x1415c8=(_0x803e1a[_0x171f46(0x2b3)]||0x0)+0x1,_0x55019b={..._0x803e1a,..._0x9527d1,'version':_0x1415c8,'updatedAt':Date['now']()};this[_0x171f46(0x2b1)]['set'](_0x109e66,_0x55019b);try{await this['okdb'][_0x171f46(0x791)][_0x171f46(0x398)][_0x171f46(0x5ab)](()=>{const _0x559dbc=_0x171f46;this[_0x559dbc(0x6a6)][_0x559dbc(0x66a)](_0x109e66,_0x55019b);});}finally{if(this[_0x171f46(0x2b1)][_0x171f46(0x3e6)](_0x109e66)===_0x55019b)this['_desiredOverlay'][_0x171f46(0x560)](_0x109e66);}return _0x1415c8;}[_0x54a94d(0x3e1)](_0x381858){const _0x3fe365=_0x54a94d;if(!this[_0x3fe365(0x5b5)]())return[];this[_0x3fe365(0x695)]();const _0x3600a3=_0x381858+'/',_0x559c6b=[];for(const {key:_0x317869,value:_0x1a1a29}of this[_0x3fe365(0x6a6)][_0x3fe365(0x73f)]({'start':_0x3600a3,'end':_0x3600a3+'\xff'})){if(typeof _0x317869!==_0x3fe365(0x44e)||!_0x317869[_0x3fe365(0x637)](_0x3600a3))break;_0x559c6b[_0x3fe365(0x387)]({'key':_0x317869[_0x3fe365(0x5b8)](_0x3600a3['length']),'value':_0x1a1a29});}return _0x559c6b;}[_0x54a94d(0x3b4)](_0x123129){const _0x2fde17=_0x54a94d;if(!this[_0x2fde17(0x5b5)]())return null;return this[_0x2fde17(0x704)][_0x2fde17(0x3e6)](_0x123129)??null;}async[_0x54a94d(0x515)](_0x1eccce,_0xba5a1c,_0x2bbd29={}){const _0x2e518f=_0x54a94d;if(!this[_0x2e518f(0x5b5)]())return null;let _0x136c1f;return await this['okdb'][_0x2e518f(0x791)][_0x2e518f(0x398)][_0x2e518f(0x5ab)](()=>{const _0x406fb3=_0x2e518f,_0x420909=this['_cmd'][_0x406fb3(0x3e6)](_0x1eccce)||{'epoch':0x0};_0x136c1f=(_0x420909['epoch']||0x0)+0x1,this[_0x406fb3(0x704)]['put'](_0x1eccce,{..._0x420909,..._0x2bbd29,'cmd':_0xba5a1c,'epoch':_0x136c1f,'updatedAt':Date['now']()});}),_0x136c1f;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x1eefa2,'nodeKey':_0x3355a2,'logicalKey':_0x2137c4,'slotKey':_0x23bc47,'PROCESS_ENV':_0x345b6a,'NODE_TYPE':_0x12e27e},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x4d8d43=_0x362184;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x2b7950=require$$0$5,{EVENTS:_0x2a7187,CHANGE_ACTIONS:_0x41241f}=requireOkdbEnums(),{LOOP:_0x5c9ca7}=requireOkdbLoopMonitor(),_0x550fba=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x1fc789=0x5,_0x30a6e0=0x2710;class _0xa6fc1e extends _0x2b7950{constructor(_0x5b34c9,_0x51faf9={}){const _0x4e8339=_0x4307;super(),this['okdb']=_0x5b34c9,this[_0x4e8339(0x679)]=_0x51faf9[_0x4e8339(0x760)]??_0x550fba,this[_0x4e8339(0x1b4)]=_0x51faf9[_0x4e8339(0x37a)]??_0x1fc789,this['_dedupeMax']=_0x51faf9[_0x4e8339(0x3e0)]??_0x30a6e0,this['_started']=![],this[_0x4e8339(0x2d3)]=new Map(),this['_baselines']=new Map(),this[_0x4e8339(0x769)]=new Map(),this[_0x4e8339(0x79f)]=null,this[_0x4e8339(0x352)]=![],this['_seen']=new Set(),this['_onItem']=_0x1c9f59=>this[_0x4e8339(0x46d)](_0x1c9f59),this[_0x4e8339(0x5a7)]=_0x5ea4a9=>this[_0x4e8339(0x5cd)](_0x5ea4a9),this[_0x4e8339(0x593)]=()=>this[_0x4e8339(0x1d2)]();}['start'](){const _0x1a4123=_0x4307;if(this[_0x1a4123(0x427)])return;this[_0x1a4123(0x427)]=!![];for(const [_0x13f165,_0x27ffd1]of this[_0x1a4123(0x784)][_0x1a4123(0x6ca)]){if(_0x13f165['startsWith']('~'))continue;try{_0x27ffd1['_enableChangelog']();}catch{}}for(const [_0x326597,_0x70dfc1]of this[_0x1a4123(0x784)][_0x1a4123(0x6ca)]){if(_0x326597[_0x1a4123(0x637)]('~'))continue;try{this[_0x1a4123(0x59d)]['set'](_0x326597,_0x70dfc1[_0x1a4123(0x43f)]()||0x0);}catch{}}const {events:_0x5afc99}=this[_0x1a4123(0x784)];_0x5afc99['on'](_0x2a7187['ITEM_CREATE'],this[_0x1a4123(0x6b0)]),_0x5afc99['on'](_0x2a7187['ITEM_UPDATE'],this['_onItem']),_0x5afc99['on'](_0x2a7187[_0x1a4123(0x2ee)],this[_0x1a4123(0x6b0)]),_0x5afc99['on'](_0x2a7187[_0x1a4123(0x5b1)],this['_onPoke']),_0x5afc99[_0x1a4123(0x3c3)](_0x2a7187[_0x1a4123(0x567)],this[_0x1a4123(0x593)]);}[_0x4d8d43(0x1d2)](){const _0x39254c=_0x4d8d43;if(!this['_started'])return;this[_0x39254c(0x427)]=![];const {events:_0x16897a}=this[_0x39254c(0x784)];_0x16897a[_0x39254c(0x77f)](_0x2a7187[_0x39254c(0x191)],this[_0x39254c(0x6b0)]),_0x16897a[_0x39254c(0x77f)](_0x2a7187[_0x39254c(0x5fb)],this[_0x39254c(0x6b0)]),_0x16897a[_0x39254c(0x77f)](_0x2a7187['ITEM_REMOVE'],this['_onItem']),_0x16897a[_0x39254c(0x77f)](_0x2a7187[_0x39254c(0x5b1)],this[_0x39254c(0x5a7)]);try{_0x16897a['off'](_0x2a7187[_0x39254c(0x567)],this[_0x39254c(0x593)]);}catch{}this[_0x39254c(0x79f)]&&(clearTimeout(this['_flushTimer']),this[_0x39254c(0x79f)]=null),this['_pending'][_0x39254c(0x3dd)](),this['_cursors'][_0x39254c(0x3dd)](),this[_0x39254c(0x59d)]['clear'](),this[_0x39254c(0x4f3)][_0x39254c(0x3dd)]();}['_dedupeKey'](_0x591665,_0xb3e8c7,_0x111d52,_0x217f47){return _0x591665+'\x00'+_0xb3e8c7+'\x00'+_0x111d52+'\x00'+_0x217f47;}[_0x4d8d43(0x24c)](_0x1e9932,_0x3ae040,_0x5a9e02,_0x3d51bb){const _0x39b7d9=_0x4d8d43,_0x2db4f1=this[_0x39b7d9(0x25d)](_0x1e9932,_0x3ae040,_0x5a9e02,_0x3d51bb);if(this[_0x39b7d9(0x4f3)][_0x39b7d9(0x52e)](_0x2db4f1))return![];this[_0x39b7d9(0x4f3)][_0x39b7d9(0x4d2)](_0x2db4f1);if(this[_0x39b7d9(0x4f3)][_0x39b7d9(0x1f8)]>this[_0x39b7d9(0x346)]){const _0x20a964=this[_0x39b7d9(0x4f3)][_0x39b7d9(0x397)]()[_0x39b7d9(0x439)]()[_0x39b7d9(0x481)];this[_0x39b7d9(0x4f3)]['delete'](_0x20a964);}return!![];}[_0x4d8d43(0x46d)](_0x575174){const _0x57fa90=_0x4d8d43;if(!this['_started']||!_0x575174)return;const {env:_0x2aece1,type:_0x17f898,key:_0x4b10d3,clock:_0x39cf5f,origin:_0x365d4a,action:_0x294e2f,newValue:_0x394a97,oldValue:_0x1ab1ce}=_0x575174;if(_0x2aece1==null||_0x17f898==null||_0x4b10d3==null)return;if(typeof _0x2aece1==='string'&&_0x2aece1[_0x57fa90(0x637)]('~'))return;if(typeof _0x17f898===_0x57fa90(0x44e)&&_0x17f898[_0x57fa90(0x637)]('~'))return;if(!this[_0x57fa90(0x24c)](_0x2aece1,_0x17f898,_0x4b10d3,_0x39cf5f))return;const _0x557976=_0x294e2f===_0x41241f[_0x57fa90(0x43b)]?_0x57fa90(0x488):'put';this[_0x57fa90(0x41f)](_0x57fa90(0x50d),{'env':_0x2aece1,'type':_0x17f898,'key':_0x4b10d3,'op':_0x557976,'clock':_0x39cf5f,'origin':_0x365d4a,'value':_0x557976===_0x57fa90(0x488)?null:_0x394a97,'prevValue':_0x1ab1ce});}[_0x4d8d43(0x5cd)](_0x78fb1a){const _0x21059e=_0x4d8d43;if(!this['_started'])return;if(!_0x78fb1a||typeof _0x78fb1a[_0x21059e(0x758)]!==_0x21059e(0x44e)||typeof _0x78fb1a[_0x21059e(0x5e4)]!==_0x21059e(0x44e))return;const {env:_0x4e58d5,type:_0x3fcb87}=_0x78fb1a;if(_0x4e58d5[_0x21059e(0x637)]('~')||_0x3fcb87['startsWith']('~'))return;this['_pending'][_0x21059e(0x36f)](_0x4e58d5+'\x00'+_0x3fcb87,{'env':_0x4e58d5,'type':_0x3fcb87}),this[_0x21059e(0x56e)]();}[_0x4d8d43(0x56e)](){const _0x47ea29=_0x4d8d43;if(this[_0x47ea29(0x79f)])return;const _0x13d2fc=()=>{const _0x331853=_0x47ea29;this[_0x331853(0x79f)]=null,this[_0x331853(0x4bf)]()[_0x331853(0x628)](()=>{});};this[_0x47ea29(0x79f)]=setTimeout(_0x13d2fc,this[_0x47ea29(0x1b4)]>0x0?this[_0x47ea29(0x1b4)]:0x0);}async[_0x4d8d43(0x4bf)](){const _0x525135=_0x4d8d43;if(this['_draining']){this[_0x525135(0x56e)]();return;}this[_0x525135(0x352)]=!![];try{const _0x4a9d26=[...this[_0x525135(0x769)][_0x525135(0x397)]()];this[_0x525135(0x769)][_0x525135(0x3dd)]();let _0x1df431=![];for(const {env:_0x5b28bf,type:_0x51dc90}of _0x4a9d26){try{const _0x7596b4=await this['_drainOne'](_0x5b28bf,_0x51dc90);if(_0x7596b4)_0x1df431=!![];}catch{this[_0x525135(0x769)][_0x525135(0x36f)](_0x5b28bf+'\x00'+_0x51dc90,{'env':_0x5b28bf,'type':_0x51dc90}),_0x1df431=!![];}}if(_0x1df431||this[_0x525135(0x769)]['size']>0x0)this[_0x525135(0x56e)]();}finally{this[_0x525135(0x352)]=![];}}async[_0x4d8d43(0x6de)](_0x302caa,_0x58dbdb){const _0x477103=_0x4d8d43,_0x2efdd8=await this[_0x477103(0x784)][_0x477103(0x4f1)](_0x302caa),_0x40862e=_0x302caa+'\x00'+_0x58dbdb;!this[_0x477103(0x2d3)][_0x477103(0x52e)](_0x40862e)&&(!this[_0x477103(0x59d)][_0x477103(0x52e)](_0x302caa)&&(_0x2efdd8['_enableChangelog'](),this['_baselines'][_0x477103(0x36f)](_0x302caa,_0x2efdd8[_0x477103(0x43f)]()||0x0)),this[_0x477103(0x2d3)][_0x477103(0x36f)](_0x40862e,this[_0x477103(0x59d)][_0x477103(0x3e6)](_0x302caa)));const _0x35dfa6=this[_0x477103(0x2d3)][_0x477103(0x3e6)](_0x40862e),_0x4fdf80=_0x2efdd8[_0x477103(0x43f)](_0x58dbdb)||0x0;if(_0x4fdf80<=_0x35dfa6)return![];const _0x13495f=_0x35dfa6+this[_0x477103(0x679)],_0x23c765=Math['min'](_0x4fdf80,_0x13495f),_0x2a6fdb=_0x5c9ca7['enabled']?_0x5c9ca7[_0x477103(0x6fd)]():0x0,_0x5cf431=Array['from'](_0x2efdd8[_0x477103(0x205)](_0x58dbdb,_0x35dfa6+0x1,_0x23c765));let _0x630582=_0x35dfa6;for(const _0x325325 of _0x5cf431){const {clock:_0x4f9075,key:_0x47391c,action:_0x692d2b,origin:_0xc83391}=_0x325325;if(_0x4f9075>_0x630582)_0x630582=_0x4f9075;if(_0x47391c==null)continue;if(!this[_0x477103(0x24c)](_0x302caa,_0x58dbdb,_0x47391c,_0x4f9075))continue;let _0x477e1f,_0x475f1;if(_0x692d2b===_0x41241f[_0x477103(0x43b)])_0x477e1f='remove',_0x475f1=null;else{const _0x104265=_0x2efdd8[_0x477103(0x3e6)](_0x58dbdb,_0x47391c);_0x104265==null?(_0x477e1f='remove',_0x475f1=null):(_0x477e1f=_0x477103(0x66a),_0x475f1=_0x104265);}this['emit']('change',{'env':_0x302caa,'type':_0x58dbdb,'key':_0x47391c,'op':_0x477e1f,'clock':_0x4f9075,'origin':_0xc83391,'value':_0x475f1});}if(_0x5c9ca7[_0x477103(0x40c)])_0x5c9ca7[_0x477103(0x6cf)](_0x477103(0x2bf)+_0x302caa+':'+_0x58dbdb,_0x5c9ca7[_0x477103(0x6fd)]()-_0x2a6fdb,'n='+_0x5cf431[_0x477103(0x503)]);return this[_0x477103(0x2d3)]['set'](_0x40862e,Math[_0x477103(0x270)](_0x630582,_0x23c765)),_0x2efdd8[_0x477103(0x43f)](_0x58dbdb)>_0x23c765;}[_0x4d8d43(0x7a3)](){const _0x4420af=_0x4d8d43;return{'started':this[_0x4420af(0x427)],'quantum':this[_0x4420af(0x679)],'flushDebounce':this['_flushDebounce'],'cursors':Object[_0x4420af(0x6fe)]([...this[_0x4420af(0x2d3)][_0x4420af(0x62b)]()][_0x4420af(0x626)](([_0x47ba8a,_0x53bcfc])=>[_0x47ba8a[_0x4420af(0x18e)]('\x00',':'),_0x53bcfc])),'pending':this[_0x4420af(0x769)][_0x4420af(0x1f8)],'seen':this[_0x4420af(0x4f3)][_0x4420af(0x1f8)]};}}return _0xa6fc1e['CHANGEFEED_QUANTUM']=_0x550fba,okdbChangefeed={'OKDBChangefeed':_0xa6fc1e},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x2f66b8=_0x362184;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x398386=require$$1$2,_0x17aa8c=require$$1,{EVENTS:_0x1f61f7}=requireOkdbEnums(),_0x3bfa0b=require$$0,{slotKey:_0x24d925}=requireOkdbProcessRegistry(),_0x45520f=0xfa,_0x3b9aaa=0xfa0,_0x40cd40=0x5,_0x437856=0x2710,_0x5ac7e7=0xbb8,_0x2d5de3=0x7d0,_0x306f3b=_0x2f66b8(0x42b),_0x1436f7=_0x2f66b8(0x1c3),_0x17537a=_0x2f66b8(0x273),_0x36f438='stats',_0x29d556=[_0x1f61f7['VIEW_PROGRESS'],_0x1f61f7[_0x2f66b8(0x6f2)],_0x1f61f7[_0x2f66b8(0x1c8)],_0x1f61f7[_0x2f66b8(0x3c2)],_0x1f61f7[_0x2f66b8(0x54f)],_0x1f61f7['INDEX_READY'],_0x1f61f7[_0x2f66b8(0x38d)],_0x1f61f7['INDEX_REGISTERED'],_0x2f66b8(0x4cd),'processor:progress',_0x2f66b8(0x665),'processor:paused',_0x2f66b8(0x4e0),_0x2f66b8(0x701)],_0x3e0d45=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0;function _0x331f5d({workers:_0x451d32,makeOkdb:_0x1bf756,port:_0x106555,primaryOkdb:_0x351dc3,childEntry:childEntry=![],workerEnv:workerEnv=null,workerRole:workerRole=null,listenAddr:listenAddr=null}={}){const _0x11fd98=_0x2f66b8;if(_0x398386[_0x11fd98(0x6cd)])return childEntry&&_0x398386[_0x11fd98(0x34b)]({'exec':_0x17aa8c[_0x11fd98(0x29f)](__dirname,_0x11fd98(0x5a4)),'args':[],'execArgv':((()=>{const _0x96d9c=_0x11fd98,_0x206721=[];for(let _0x5d2a83=0x0;_0x5d2a83<process[_0x96d9c(0x477)]['length'];_0x5d2a83++){const _0x24ef05=process['execArgv'][_0x5d2a83];if(_0x24ef05['startsWith'](_0x96d9c(0x197))||_0x24ef05['startsWith'](_0x96d9c(0x5d9))||_0x24ef05[_0x96d9c(0x637)](_0x96d9c(0x409)))continue;if(_0x24ef05==='-e'||_0x24ef05===_0x96d9c(0x265)||_0x24ef05==='-p'||_0x24ef05===_0x96d9c(0x2e3)){_0x5d2a83++;continue;}_0x206721[_0x96d9c(0x387)](_0x24ef05);}return _0x206721;})())}),_0xa82240({'workers':_0x451d32,'port':_0x106555,'primaryOkdb':_0x351dc3,'workerEnv':workerEnv,'workerRole':workerRole,'listenAddr':listenAddr??':'+_0x106555});return _0x4c9fa3({'makeOkdb':_0x1bf756,'port':_0x106555});}function _0xa82240({workers:_0x558c5f,port:_0x58ed1b,primaryOkdb:_0x4dd459,workerEnv:_0x1586d5,workerRole:_0x1db35a,listenAddr:_0x54741f}){const _0x77803b=_0x2f66b8,_0x1cd632=new Map(),_0x2fb02a=new Map();let _0x593fec=![];const _0x2d0255=_0x219239=>_0x219239?.['__okdbSlot'],_0x105c03=_0x25a6d9=>{const _0x2d03c4=_0x4307,_0x5e6b0d=_0x398386[_0x2d03c4(0x77b)]({...process.env,..._0x1586d5||{},'OKDB_CLUSTER_SLOT':String(_0x25a6d9)});return _0x5e6b0d['__okdbSlot']=_0x25a6d9,_0x1cd632[_0x2d03c4(0x36f)](_0x5e6b0d[_0x2d03c4(0x4ac)][_0x2d03c4(0x789)],{'worker':_0x5e6b0d,'startedAt':Date[_0x2d03c4(0x6fd)](),'slot':_0x25a6d9}),_0x5e6b0d['on'](_0x2d03c4(0x5b7),_0xf20551=>{const _0x1f7d75=_0x2d03c4;console['log'](_0x1f7d75(0x536)+_0x5e6b0d['process'][_0x1f7d75(0x789)]+_0x1f7d75(0x1e9)+(_0xf20551?.[_0x1f7d75(0x1e0)]??_0xf20551));}),_0x5e6b0d['on'](_0x2d03c4(0x3af),()=>_0xa0b816()),_0x5e6b0d;},_0x4a916c=_0x511be5=>{const _0x15a529=_0x4307;for(const {worker:_0x585950}of _0x1cd632[_0x15a529(0x397)]()){if(_0x585950[_0x15a529(0x381)]()||!_0x585950[_0x15a529(0x433)]())continue;try{_0x585950['send'](_0x511be5);}catch{}}};_0x4dd459?.[_0x77803b(0x5e6)]?.({'kind':'primary','listenAddr':_0x54741f})[_0x77803b(0x628)](()=>{}),_0x4dd459?.[_0x77803b(0x721)]?.[_0x77803b(0x312)]?.({'workersConfigured':_0x558c5f});const _0x47efa2={'engines':!![],'processors':!![],'compaction':!![],..._0x1db35a,'http':!![]},_0xa0b816=()=>{const _0x5994cb=_0x77803b,_0x4e051a=_0x4dd459?.['processes'];if(!_0x4e051a||!_0x4e051a[_0x5994cb(0x778)])return;const _0x2c11aa=_0x4e051a['selfKey'];for(const {worker:_0x3e3ef6,startedAt:_0x333bee,slot:_0x3af282,stats:_0x12987e,processing:_0x4a37a1}of _0x1cd632[_0x5994cb(0x397)]()){if(_0x3e3ef6['isDead']())continue;const _0x5623a8=_0x4e051a[_0x5994cb(0x4b5)]?.()&&_0x4e051a[_0x5994cb(0x4fa)](_0x5994cb(0x1d1),_0x38b5a0(_0x3af282))?.[_0x5994cb(0x3ab)]===!![];_0x4e051a['publishChildRow']({'pid':_0x3e3ef6[_0x5994cb(0x4ac)][_0x5994cb(0x789)],'startedAt':_0x333bee,'kind':_0x5994cb(0x5ea),'supervisorKey':_0x2c11aa,'slot':_0x3af282,'slotKey':_0x38b5a0(_0x3af282),'role':_0x47efa2,'listenAddr':_0x54741f,'lifecycle':_0x5623a8?'decommissioning':_0x5994cb(0x390),'processing':_0x4a37a1??null,'stats':_0x12987e??null})[_0x5994cb(0x628)](()=>{});}},_0x38b5a0=_0x593cc7=>_0x24d925(_0x77803b(0x19a)+_0x58ed1b,_0x593cc7),_0x4c6f57=_0x406176=>{const _0x12aadd=_0x77803b,_0x300617=_0x4dd459?.[_0x12aadd(0x721)];if(!_0x300617?.[_0x12aadd(0x4b5)]?.())return![];return _0x300617[_0x12aadd(0x4fa)](_0x12aadd(0x1d1),_0x38b5a0(_0x406176))?.[_0x12aadd(0x3ab)]===!![];};for(let _0x31d726=0x0;_0x31d726<_0x558c5f;_0x31d726++){const _0x206a52=_0x4c6f57(_0x31d726);_0x2fb02a[_0x77803b(0x36f)](_0x31d726,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x206a52,'respawnTimer':null}),_0x206a52?console[_0x77803b(0x273)]('[okdb-cluster]\x20slot='+_0x31d726+_0x77803b(0x606)):_0x105c03(_0x31d726);}const _0x21cecc=()=>{const _0xbf1cb1=_0x77803b,_0x3e551e=_0x4dd459?.[_0xbf1cb1(0x721)];if(!_0x3e551e?.[_0xbf1cb1(0x778)]||!_0x3e551e[_0xbf1cb1(0x4b5)]?.())return;for(const [_0x5aa53c,_0x1bae0d]of _0x2fb02a['entries']()){const _0x14214c=_0x3e551e[_0xbf1cb1(0x4fa)](_0xbf1cb1(0x1d1),_0x38b5a0(_0x5aa53c)),_0x23adcb=_0x14214c?.[_0xbf1cb1(0x3ab)]===!![],_0x2eb0a2=_0x14214c?.[_0xbf1cb1(0x49c)]===!![];if(_0x23adcb&&!_0x1bae0d[_0xbf1cb1(0x282)]){_0x1bae0d[_0xbf1cb1(0x282)]=!![];_0x1bae0d[_0xbf1cb1(0x4ce)]&&(clearTimeout(_0x1bae0d['respawnTimer']),_0x1bae0d[_0xbf1cb1(0x4ce)]=null);for(const {worker:_0x48fae3}of _0x1cd632['values']()){if(_0x2d0255(_0x48fae3)!==_0x5aa53c||_0x48fae3[_0xbf1cb1(0x381)]())continue;try{if(_0x2eb0a2)_0x48fae3[_0xbf1cb1(0x4ac)][_0xbf1cb1(0x49c)](_0xbf1cb1(0x65d));else _0x48fae3[_0xbf1cb1(0x433)]()&&_0x48fae3[_0xbf1cb1(0x717)]();}catch{}}console[_0xbf1cb1(0x273)](_0xbf1cb1(0x76a)+(_0x2eb0a2?'hard-killed':_0xbf1cb1(0x510))+'\x20worker\x20slot='+_0x5aa53c+_0xbf1cb1(0x50c));}else{if(!_0x23adcb&&_0x1bae0d[_0xbf1cb1(0x282)]&&_0x14214c){_0x1bae0d[_0xbf1cb1(0x282)]=![],_0x1bae0d[_0xbf1cb1(0x1d8)]=[],_0x1bae0d['consecutiveFailures']=0x0;const _0x408afe=[..._0x1cd632['values']()][_0xbf1cb1(0x6ad)](({worker:_0x4a0e70})=>_0x2d0255(_0x4a0e70)===_0x5aa53c&&!_0x4a0e70[_0xbf1cb1(0x381)]());!_0x408afe&&!_0x593fec&&(_0x105c03(_0x5aa53c),console[_0xbf1cb1(0x273)]('[okdb-cluster]\x20recommissioned\x20worker\x20slot='+_0x5aa53c));}}}},_0x34f5af=()=>{try{_0x21cecc();}catch{}};_0x4dd459?.['events']?.['on']?.(_0x1f61f7[_0x77803b(0x689)],_0x34f5af);const _0x10361b=[];if(_0x4dd459?.[_0x77803b(0x3e2)]?.['on'])for(const _0x1d8e95 of _0x29d556){const _0x351f5d=_0x368c06=>{_0x4a916c({[_0x306f3b]:_0x1436f7,'event':_0x1d8e95,'data':_0x368c06??{}});};_0x4dd459[_0x77803b(0x3e2)]['on'](_0x1d8e95,_0x351f5d),_0x10361b[_0x77803b(0x387)]({'event':_0x1d8e95,'handler':_0x351f5d});}const _0x5b9eda=setInterval(()=>{_0x21cecc(),_0xa0b816();},_0x3e0d45);_0x5b9eda[_0x77803b(0x442)]?.();const _0x384b2d=(_0x8dbbff,_0x2806ff)=>{const _0x5d8b97=_0x77803b;if(!_0x2806ff||typeof _0x2806ff!==_0x5d8b97(0x40d)||_0x2806ff[_0x306f3b]!==_0x17537a)return;if(!_0x4dd459?.[_0x5d8b97(0x273)]?.[_0x5d8b97(0x699)])return;const _0x3e3595=_0x2806ff[_0x5d8b97(0x39a)]||{};_0x4dd459[_0x5d8b97(0x273)]['ingest']({..._0x3e3595,'msg':'[w'+_0x2806ff[_0x5d8b97(0x1d1)]+']\x20'+(_0x3e3595[_0x5d8b97(0x2f4)]??''),'meta':{..._0x3e3595['meta']||{},'worker':_0x2806ff[_0x5d8b97(0x1d1)],'workerPid':_0x2806ff[_0x5d8b97(0x789)]}});};_0x398386['on'](_0x77803b(0x1e0),_0x384b2d);const _0x44163b=(_0x43d715,_0x4dc789)=>{const _0x649433=_0x77803b;if(!_0x4dc789||typeof _0x4dc789!==_0x649433(0x40d)||_0x4dc789[_0x306f3b]!==_0x36f438)return;const _0x2abcd7=_0x1cd632['get'](_0x43d715['process']['pid']);if(_0x2abcd7){_0x2abcd7[_0x649433(0x5b2)]={..._0x4dc789['stats'],'at':Date[_0x649433(0x6fd)]()};if(_0x4dc789['processing']!==undefined)_0x2abcd7[_0x649433(0x494)]=_0x4dc789[_0x649433(0x494)];}};_0x398386['on'](_0x77803b(0x1e0),_0x44163b),_0x398386['on'](_0x77803b(0x393),(_0x34c79f,_0x2be8c7,_0x4b1df8)=>{const _0x41c360=_0x77803b,_0x517e33=_0x34c79f[_0x41c360(0x4ac)][_0x41c360(0x789)],_0x1b2005=_0x2d0255(_0x34c79f),_0x1f009c=_0x1cd632[_0x41c360(0x3e6)](_0x517e33);if(_0x1f009c&&_0x4dd459?.[_0x41c360(0x721)])_0x4dd459['processes'][_0x41c360(0x316)](_0x517e33+':'+_0x1f009c[_0x41c360(0x714)])['catch'](()=>{});_0x1cd632[_0x41c360(0x560)](_0x517e33),console['log'](_0x41c360(0x536)+_0x517e33+_0x41c360(0x2f9)+(_0x1b2005??'?')+_0x41c360(0x4db)+('(code='+_0x2be8c7+_0x41c360(0x38b)+(_0x4b1df8??_0x41c360(0x4d6))+_0x41c360(0x4ea)+_0x1cd632[_0x41c360(0x1f8)]+_0x41c360(0x6b9))),_0xa0b816();if(_0x593fec||_0x1b2005==null)return;const _0xa4b2a5=_0x2fb02a[_0x41c360(0x3e6)](_0x1b2005);if(!_0xa4b2a5||_0xa4b2a5['dead'])return;const _0x42784c=Date[_0x41c360(0x6fd)]();_0xa4b2a5[_0x41c360(0x1d8)]['push'](_0x42784c),_0xa4b2a5[_0x41c360(0x1d8)]=_0xa4b2a5[_0x41c360(0x1d8)][_0x41c360(0x1ff)](_0x6e376b=>_0x42784c-_0x6e376b<=_0x437856);if(_0xa4b2a5[_0x41c360(0x1d8)][_0x41c360(0x503)]>=_0x40cd40){_0xa4b2a5[_0x41c360(0x282)]=!![],console[_0x41c360(0x5b7)](_0x41c360(0x614)+_0x1b2005+'\x20died\x20'+_0xa4b2a5['deaths'][_0x41c360(0x503)]+'\x20times\x20in\x20'+(_0x437856+'ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20'+_0x1cd632[_0x41c360(0x1f8)]+_0x41c360(0x22b)));return;}_0xa4b2a5[_0x41c360(0x4b3)]++;const _0x2ef513=Math[_0x41c360(0x311)](_0x3b9aaa,_0x45520f*0x2**(_0xa4b2a5[_0x41c360(0x4b3)]-0x1));console[_0x41c360(0x273)]('[okdb-cluster]\x20respawning\x20worker\x20slot='+_0x1b2005+_0x41c360(0x39c)+_0x2ef513+'ms\x20(attempt\x20'+_0xa4b2a5[_0x41c360(0x4b3)]+')'),_0xa4b2a5[_0x41c360(0x4ce)]=setTimeout(()=>{const _0x4633ce=_0x41c360;_0xa4b2a5[_0x4633ce(0x4ce)]=null;if(_0x593fec||_0xa4b2a5[_0x4633ce(0x282)])return;const _0x1af8bb=_0x105c03(_0x1b2005);_0x1af8bb[_0x4633ce(0x3c3)](_0x4633ce(0x2ea),()=>{const _0x317af2=_0x4633ce;if(_0x2fb02a['get'](_0x1b2005)===_0xa4b2a5)_0xa4b2a5[_0x317af2(0x4b3)]=0x0;});},_0x2ef513),_0xa4b2a5['respawnTimer']['unref']?.();});const _0x592322=[..._0x1cd632[_0x77803b(0x2ac)]()];console['log'](_0x77803b(0x747)+process[_0x77803b(0x789)]+'\x20forked\x20'+_0x558c5f+_0x77803b(0x33a)+_0x58ed1b+':\x20'+('['+_0x592322[_0x77803b(0x29f)](',\x20')+']'));const _0x40323a={'_isClusterController':!![],'port':_0x58ed1b,'primaryOkdb':_0x4dd459??null,'status'(){const _0x81669=_0x77803b;return{'clustered':!![],'primaryPid':process['pid'],'port':_0x58ed1b,'primaryRole':_0x4dd459?.[_0x81669(0x6ea)]??null,'processorPid':null,'supervisorPid':process[_0x81669(0x789)],'workers':[..._0x1cd632[_0x81669(0x397)]()][_0x81669(0x626)](({worker:_0xee1e7})=>({'pid':_0xee1e7['process'][_0x81669(0x789)],'id':_0xee1e7['id'],'dead':_0xee1e7[_0x81669(0x381)]()}))};},async 'close'(){const _0x448e24=_0x77803b;_0x593fec=!![];for(const _0x4e0fd2 of _0x2fb02a['values']()){_0x4e0fd2[_0x448e24(0x282)]=!![],_0x4e0fd2['respawnTimer']&&(clearTimeout(_0x4e0fd2[_0x448e24(0x4ce)]),_0x4e0fd2[_0x448e24(0x4ce)]=null);}clearInterval(_0x5b9eda),_0x398386[_0x448e24(0x77f)]('message',_0x384b2d),_0x398386[_0x448e24(0x77f)](_0x448e24(0x1e0),_0x44163b),_0x4dd459?.[_0x448e24(0x3e2)]?.['off']?.(_0x1f61f7['SYSTEM_PROC'],_0x34f5af);if(_0x4dd459?.['events']?.[_0x448e24(0x77f)])for(const {event:_0x415339,handler:_0x2439d1}of _0x10361b){try{_0x4dd459[_0x448e24(0x3e2)][_0x448e24(0x77f)](_0x415339,_0x2439d1);}catch{}}_0x10361b[_0x448e24(0x503)]=0x0;const _0x46d1f2=[..._0x1cd632[_0x448e24(0x397)]()]['map'](({worker:_0x58140b})=>_0x58140b);if(_0x46d1f2['length']===0x0)return;await Promise[_0x448e24(0x618)](_0x46d1f2[_0x448e24(0x626)](_0x3259fb=>new Promise(_0x1f264d=>{const _0x446418=_0x448e24;if(_0x3259fb[_0x446418(0x381)]()){_0x1f264d();return;}let _0x14b7f6=![];const _0x30168c=()=>{if(_0x14b7f6)return;_0x14b7f6=!![];if(_0x1146ab)clearTimeout(_0x1146ab);_0x1f264d();};_0x3259fb[_0x446418(0x3c3)](_0x446418(0x393),_0x30168c);const _0x1146ab=setTimeout(()=>{const _0x5b8ee4=_0x446418;try{_0x3259fb[_0x5b8ee4(0x4ac)][_0x5b8ee4(0x49c)]();}catch{}},_0x5ac7e7+0x1f4);_0x1146ab[_0x446418(0x442)]?.();try{_0x3259fb['disconnect']();}catch{try{_0x3259fb[_0x446418(0x4ac)][_0x446418(0x49c)]();}catch{}}})));}};return _0x40323a;}async function _0x4c9fa3({makeOkdb:_0x1c64f8,port:_0x4ed675}){const _0x3a83a5=_0x2f66b8,_0x38be4e=await _0x1c64f8();return _0x4f456e(_0x38be4e),_0x38be4e[_0x3a83a5(0x635)][_0x3a83a5(0x49b)](_0x4ed675);}function _0x4f456e(_0x327ed8){const _0x571262=_0x2f66b8;if(!_0x327ed8||_0x327ed8['_clusterWorkerAttached'])return;_0x327ed8['_clusterWorkerAttached']=!![];try{const {OKDBChangefeed:_0x1e1406}=requireOkdbChangefeed(),_0x38a5b3=_0x327ed8[_0x571262(0x666)];if(_0x38a5b3&&typeof _0x38a5b3[_0x571262(0x771)]===_0x571262(0x5aa)){const _0x1475c5=new _0x1e1406(_0x327ed8);_0x1475c5['start'](),_0x38a5b3['attachFeed'](_0x1475c5),_0x327ed8[_0x571262(0x2c6)]=_0x1475c5;}}catch(_0x7e61a0){_0x327ed8[_0x571262(0x273)]?.[_0x571262(0x21b)]?.(_0x571262(0x251)+(_0x7e61a0?.[_0x571262(0x1e0)]??_0x7e61a0),{'feature':_0x571262(0x3a6)});}const _0x30099a=_0x5bd721=>{const _0x3cf4f5=_0x571262;if(!_0x5bd721||typeof _0x5bd721!==_0x3cf4f5(0x40d)||_0x5bd721[_0x306f3b]==null)return;if(_0x5bd721[_0x306f3b]===_0x1436f7)try{_0x327ed8[_0x3cf4f5(0x666)]?.['pushEphemeral']?.(_0x5bd721[_0x3cf4f5(0x403)],_0x5bd721['data']);}catch{}};process['on'](_0x571262(0x1e0),_0x30099a),_0x327ed8[_0x571262(0x539)]=_0x30099a;{let _0x16136b=process[_0x571262(0x2fd)](),_0x3a654d=Date[_0x571262(0x6fd)]();const _0x823511=()=>{const _0x37c069=_0x571262;if(typeof process[_0x37c069(0x2bc)]!=='function'||!process['connected'])return;const _0x469940=Date[_0x37c069(0x6fd)](),_0x111fd9=process[_0x37c069(0x2fd)](),_0x3495af=(_0x469940-_0x3a654d)*0x3e8,_0x2cec58=_0x111fd9['user']-_0x16136b['user']+(_0x111fd9['system']-_0x16136b[_0x37c069(0x2ad)]),_0x871183=_0x3495af>0x0?Math['min'](0x64,Math['round'](_0x2cec58/(_0x3495af*(_0x3bfa0b[_0x37c069(0x573)]()['length']||0x1))*0x64)):0x0;_0x16136b=_0x111fd9,_0x3a654d=_0x469940;const _0x495a97=process['memoryUsage']();let _0x55c6d3=null;try{_0x55c6d3=_0x327ed8[_0x37c069(0x6ea)]?.[_0x37c069(0x471)]?_0x327ed8['processes']?.[_0x37c069(0x597)]?.()??null:null;}catch{}try{process['send']({[_0x306f3b]:_0x36f438,'stats':{'rss':_0x495a97['rss'],'heapUsed':_0x495a97['heapUsed'],'heapTotal':_0x495a97[_0x37c069(0x612)],'external':_0x495a97[_0x37c069(0x756)],'cpuPct':_0x871183,'cpuWindowMs':Math[_0x37c069(0x6bd)](_0x3495af/0x3e8)||null},'processing':_0x55c6d3});}catch{}},_0x4afd24=Math['max'](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x3df492=setInterval(_0x823511,_0x4afd24);_0x3df492[_0x571262(0x442)]?.(),_0x823511();for(const _0x329f43 of[_0x571262(0x6ee),_0x571262(0x4e0)]){_0x327ed8[_0x571262(0x3e2)]?.['on']?.(_0x329f43,()=>{try{_0x823511();}catch{}});}}let _0x3499ce=![];const _0x59c334=async _0x268e94=>{const _0x5466d9=_0x571262;if(_0x3499ce)return;_0x3499ce=!![];const _0x298a07=setTimeout(()=>process[_0x5466d9(0x393)](_0x268e94),_0x5ac7e7);_0x298a07[_0x5466d9(0x442)]?.();try{await _0x327ed8['close']?.();}catch{}process[_0x5466d9(0x393)](_0x268e94);};process['on'](_0x571262(0x717),()=>_0x59c334(0x0));if(process['platform']!==_0x571262(0x293)){const _0xc9d8d4=setInterval(()=>{const _0xd1d4f2=_0x571262;if(process[_0xd1d4f2(0x6dd)]===0x1)_0x59c334(0x0);},_0x2d5de3);_0xc9d8d4[_0x571262(0x442)]?.(),_0x327ed8['_clusterOrphanWatch']=_0xc9d8d4;}}return okdbCluster={'runClustered':_0x331f5d,'attachWorkerCluster':_0x4f456e},okdbCluster;}var okdbHttp={'exports':{}},okdbMetrics,hasRequiredOkdbMetrics;function requireOkdbMetrics(){const _0x26701f=_0x362184;if(hasRequiredOkdbMetrics)return okdbMetrics;hasRequiredOkdbMetrics=0x1;const _0x2af213=0x3c;function _0x393db7(){return{'requests':0x0,'reads':0x0,'writes':0x0,'errors':0x0,'readMs':0x0,'writeMs':0x0};}class _0xea1207{constructor(){const _0x43e183=_0x4307;this[_0x43e183(0x7a4)]=0x0,this[_0x43e183(0x5a3)]=0x0,this[_0x43e183(0x610)]=0x0,this[_0x43e183(0x272)]=0x0,this['_totalReadMs']=0x0,this[_0x43e183(0x474)]=0x0,this[_0x43e183(0x247)]=Array[_0x43e183(0x2f3)]({'length':_0x2af213},_0x393db7),this[_0x43e183(0x31d)]=0x0,this[_0x43e183(0x3b1)]=Date[_0x43e183(0x6fd)](),this[_0x43e183(0x673)]=setInterval(()=>this[_0x43e183(0x711)](),0x3e8);if(this[_0x43e183(0x673)][_0x43e183(0x442)])this[_0x43e183(0x673)][_0x43e183(0x442)]();}[_0x26701f(0x711)](){const _0x121355=_0x26701f;this['_bucketIdx']=(this[_0x121355(0x31d)]+0x1)%_0x2af213,this[_0x121355(0x247)][this[_0x121355(0x31d)]]=_0x393db7(),this[_0x121355(0x3b1)]=Date['now']();}['record'](_0x122c2a,_0x3bafb5,_0x2389e3){const _0x42c102=_0x26701f,_0x40450c=/^(POST|PUT|PATCH|DELETE)$/i['test'](_0x122c2a),_0xdba4ac=this[_0x42c102(0x247)][this[_0x42c102(0x31d)]];this[_0x42c102(0x7a4)]++,_0xdba4ac[_0x42c102(0x664)]++,_0x2389e3&&(this[_0x42c102(0x272)]++,_0xdba4ac[_0x42c102(0x6db)]++),_0x40450c?(this[_0x42c102(0x610)]++,this[_0x42c102(0x474)]+=_0x3bafb5,_0xdba4ac[_0x42c102(0x799)]++,_0xdba4ac['writeMs']+=_0x3bafb5):(this['_totalReads']++,this[_0x42c102(0x1f5)]+=_0x3bafb5,_0xdba4ac[_0x42c102(0x751)]++,_0xdba4ac[_0x42c102(0x6f4)]+=_0x3bafb5);}[_0x26701f(0x5b2)](){const _0x5e2c9f=_0x26701f;let _0x5555f8=0x0,_0x11cb5d=0x0,_0x4b99a0=0x0,_0x163b81=0x0,_0x4e9f18=0x0,_0x5b7a57=0x0;for(const _0x28e88c of this[_0x5e2c9f(0x247)]){_0x5555f8+=_0x28e88c[_0x5e2c9f(0x664)],_0x11cb5d+=_0x28e88c[_0x5e2c9f(0x751)],_0x4b99a0+=_0x28e88c[_0x5e2c9f(0x799)],_0x163b81+=_0x28e88c[_0x5e2c9f(0x6db)],_0x4e9f18+=_0x28e88c[_0x5e2c9f(0x6f4)],_0x5b7a57+=_0x28e88c[_0x5e2c9f(0x60e)];}const _0x1537fc=_0x2af213;return{'lifetime':{'requests':this[_0x5e2c9f(0x7a4)],'reads':this['_totalReads'],'writes':this['_totalWrites'],'errors':this['_totalErrors'],'avgReadMs':this[_0x5e2c9f(0x5a3)]>0x0?+(this[_0x5e2c9f(0x1f5)]/this['_totalReads'])[_0x5e2c9f(0x6cb)](0x2):null,'avgWriteMs':this[_0x5e2c9f(0x610)]>0x0?+(this[_0x5e2c9f(0x474)]/this['_totalWrites'])['toFixed'](0x2):null},'window':{'seconds':_0x1537fc,'requests':_0x5555f8,'reads':_0x11cb5d,'writes':_0x4b99a0,'errors':_0x163b81,'reqPerSec':+(_0x5555f8/_0x1537fc)[_0x5e2c9f(0x6cb)](0x2),'readPerSec':+(_0x11cb5d/_0x1537fc)[_0x5e2c9f(0x6cb)](0x2),'writePerSec':+(_0x4b99a0/_0x1537fc)[_0x5e2c9f(0x6cb)](0x2),'avgReadMs':_0x11cb5d>0x0?+(_0x4e9f18/_0x11cb5d)[_0x5e2c9f(0x6cb)](0x2):null,'avgWriteMs':_0x4b99a0>0x0?+(_0x5b7a57/_0x4b99a0)['toFixed'](0x2):null}};}[_0x26701f(0x543)](){const _0x46bf75=_0x26701f;clearInterval(this[_0x46bf75(0x673)]);}}return okdbMetrics=_0xea1207,okdbMetrics;}function _0x4307(_0x1c3323,_0xe0d39){_0x1c3323=_0x1c3323-0x18a;const _0x226c2d=_0x226c();let _0x4307c4=_0x226c2d[_0x1c3323];return _0x4307c4;}var okdbAuthNamespaces,hasRequiredOkdbAuthNamespaces;function requireOkdbAuthNamespaces(){const _0x4fc05e=_0x362184;if(hasRequiredOkdbAuthNamespaces)return okdbAuthNamespaces;hasRequiredOkdbAuthNamespaces=0x1;const _0x232401={'data':{'label':'Data','scope':_0x4fc05e(0x758),'description':'Records\x20inside\x20your\x20types\x20—\x20the\x20actual\x20rows\x20you\x20store.','operations':{'read':{'label':'Read','summary':_0x4fc05e(0x5bb)},'write':{'label':_0x4fc05e(0x647),'summary':_0x4fc05e(0x440)}}},'schema':{'label':'Schema\x20&\x20Indexes','scope':_0x4fc05e(0x758),'description':_0x4fc05e(0x41d),'operations':{'read':{'label':_0x4fc05e(0x6e8),'summary':_0x4fc05e(0x53c)},'write':{'label':_0x4fc05e(0x647),'summary':_0x4fc05e(0x396)}}},'search':{'label':_0x4fc05e(0x1bd),'scope':_0x4fc05e(0x758),'description':'Run\x20searches\x20against\x20registered\x20FTS\x20and\x20vector\x20indexes.','operations':{'query':{'label':_0x4fc05e(0x1c5),'summary':_0x4fc05e(0x338)}}},'queue':{'label':_0x4fc05e(0x64c),'scope':_0x4fc05e(0x758),'description':_0x4fc05e(0x676),'operations':{'read':{'label':_0x4fc05e(0x6e8),'summary':_0x4fc05e(0x4d1)},'write':{'label':_0x4fc05e(0x647),'summary':'Enqueue,\x20cancel,\x20retry,\x20remove\x20jobs;\x20manage\x20buckets;\x20reconcile\x20and\x20rebuild\x20stats.'},'work':{'label':_0x4fc05e(0x50f),'summary':_0x4fc05e(0x551)}}},'files':{'label':'Files','scope':_0x4fc05e(0x758),'description':_0x4fc05e(0x3ce),'operations':{'read':{'label':_0x4fc05e(0x6e8),'summary':_0x4fc05e(0x1fd)},'write':{'label':_0x4fc05e(0x647),'summary':_0x4fc05e(0x69e)}}},'functions':{'label':_0x4fc05e(0x249),'scope':_0x4fc05e(0x758),'description':'Server-side\x20user-defined\x20functions\x20registered\x20per\x20environment.','operations':{'read':{'label':_0x4fc05e(0x6e8),'summary':_0x4fc05e(0x2a5)},'write':{'label':_0x4fc05e(0x647),'summary':'Register,\x20update,\x20and\x20delete\x20function\x20definitions.'},'run':{'label':_0x4fc05e(0x521),'summary':_0x4fc05e(0x4c6)}}},'views':{'label':_0x4fc05e(0x524),'scope':_0x4fc05e(0x758),'description':_0x4fc05e(0x2fa),'operations':{'read':{'label':_0x4fc05e(0x6e8),'summary':_0x4fc05e(0x42c)},'write':{'label':_0x4fc05e(0x647),'summary':_0x4fc05e(0x61a)}}},'env':{'label':_0x4fc05e(0x3b3),'scope':_0x4fc05e(0x758),'description':'Environment\x20lifecycle.\x20Listing\x20and\x20creating\x20envs\x20is\x20system-level.','operations':{'read':{'label':_0x4fc05e(0x6e8),'summary':'List\x20environments\x20and\x20read\x20environment\x20info.'},'write':{'label':_0x4fc05e(0x647),'summary':_0x4fc05e(0x52d)}}},'auth':{'label':_0x4fc05e(0x3f3),'scope':_0x4fc05e(0x2ad),'description':_0x4fc05e(0x30b),'operations':{'read':{'label':_0x4fc05e(0x6e8),'summary':_0x4fc05e(0x6d1)},'write':{'label':_0x4fc05e(0x647),'summary':_0x4fc05e(0x3bb)}}},'system':{'label':_0x4fc05e(0x5d3),'scope':_0x4fc05e(0x2ad),'description':_0x4fc05e(0x325),'operations':{'read':{'label':_0x4fc05e(0x6e8),'summary':_0x4fc05e(0x58c)},'write':{'label':'Write','summary':_0x4fc05e(0x656)}}},'sync':{'label':_0x4fc05e(0x773),'scope':_0x4fc05e(0x2ad),'description':_0x4fc05e(0x3e3),'operations':{'read':{'label':_0x4fc05e(0x6e8),'summary':_0x4fc05e(0x27e)},'write':{'label':_0x4fc05e(0x647),'summary':_0x4fc05e(0x454)},'peer':{'label':_0x4fc05e(0x51e),'summary':_0x4fc05e(0x4f6),'machineOnly':!![]}}},'protected':{'label':_0x4fc05e(0x1b2),'scope':'gate','description':_0x4fc05e(0x625),'operations':{'read':{'label':_0x4fc05e(0x6e8),'summary':'May\x20read\x20system\x20types\x20when\x20also\x20granted\x20the\x20underlying\x20read\x20permission.'},'write':{'label':_0x4fc05e(0x647),'summary':_0x4fc05e(0x2f5)}}}},_0x21e0c7={'schema:read':['data:read',_0x4fc05e(0x6d6),_0x4fc05e(0x557)]},_0x4b1d4b=[_0x4fc05e(0x633),'query',_0x4fc05e(0x5bf),_0x4fc05e(0x6cc),_0x4fc05e(0x221),_0x4fc05e(0x2af)];function _0x28d12c(){const _0x46c23c=_0x4fc05e,_0x590b63=[];for(const [_0x4236b7,_0x2c07ad]of Object[_0x46c23c(0x62b)](_0x232401)){for(const _0x24acdf of Object[_0x46c23c(0x2ac)](_0x2c07ad[_0x46c23c(0x35a)])){_0x590b63[_0x46c23c(0x387)](_0x4236b7+':'+_0x24acdf);}}return _0x590b63;}function _0x52d024(_0x394675){return _0x232401[_0x394675]||null;}function _0xcaa001(_0x17965f,_0x3849df){const _0x3856d3=_0x4fc05e;return _0x232401[_0x17965f]?.[_0x3856d3(0x35a)][_0x3849df]||null;}return okdbAuthNamespaces={'NAMESPACES':_0x232401,'IMPLIED_BY':_0x21e0c7,'OP_ORDER':_0x4b1d4b,'listAllPermissions':_0x28d12c,'getNamespaceMeta':_0x52d024,'getOperationMeta':_0xcaa001},okdbAuthNamespaces;}var okdbAuthPermissions,hasRequiredOkdbAuthPermissions;function requireOkdbAuthPermissions(){const _0x182027=_0x362184;if(hasRequiredOkdbAuthPermissions)return okdbAuthPermissions;hasRequiredOkdbAuthPermissions=0x1;const {IMPLIED_BY:_0xb981f8}=requireOkdbAuthNamespaces(),_0x275d3b=new Set([_0x182027(0x633),_0x182027(0x347)]);function _0x2c1bf8(_0x2fd8ba,_0x3b4749){const _0xe0b384=_0x182027;if(!Array[_0xe0b384(0x65e)](_0x2fd8ba)||_0x2fd8ba['length']===0x0)return![];for(const _0x13c906 of _0x2fd8ba){if(typeof _0x13c906!==_0xe0b384(0x44e)||!_0x13c906[_0xe0b384(0x1dc)](':')){if(_0x13c906==='*')return!![];continue;}const [_0x19e5d0,_0x1237b0]=_0x13c906[_0xe0b384(0x3d5)](':'),[_0x150f56,_0x28c719]=_0x3b4749[_0xe0b384(0x3d5)](':'),_0x293d5e=_0x19e5d0==='*'||_0x19e5d0===_0x150f56,_0x4df893=_0x1237b0==='*'||_0x1237b0===_0x28c719;if(_0x293d5e&&_0x4df893)return!![];}const _0x272aee=_0xb981f8[_0x3b4749];if(_0x272aee)for(const _0x32cc4a of _0x272aee){if(_0x2c1bf8(_0x2fd8ba,_0x32cc4a))return!![];}return![];}function _0x69bf77(_0x46d503,_0x5a6da1){const _0x4431eb=_0x182027,_0x559225=new Set();if(Array['isArray'](_0x46d503)){for(const _0x2bbca8 of _0x46d503)_0x559225['add'](_0x2bbca8);}if(Array[_0x4431eb(0x65e)](_0x5a6da1)){for(const _0x122052 of _0x5a6da1)_0x559225[_0x4431eb(0x4d2)](_0x122052);}return Array[_0x4431eb(0x2f3)](_0x559225);}function _0x551567(_0x27eac0){const _0x43aaf9=_0x182027;if(typeof _0x27eac0!==_0x43aaf9(0x44e))return![];const [,_0x438609]=_0x27eac0[_0x43aaf9(0x3d5)](':');return _0x275d3b[_0x43aaf9(0x52e)](_0x438609);}function _0x4e9276(_0x36fd64){const _0x193af9=_0x182027;return _0x551567(_0x36fd64)?_0x193af9(0x457):_0x193af9(0x320);}function _0x257e09(_0x179c30,_0x3ba587){const _0x53023d=_0x182027;return _0x69bf77(_0x179c30['permissions']||[],_0x3ba587?(_0x179c30[_0x53023d(0x204)]||{})[_0x3ba587]||[]:[]);}function _0x1ef6fc(_0x142b79){const _0x45920f=_0x182027,_0x446022=[];for(const _0x38fac0 of _0x142b79['listRoutes']()){const _0x26b47c=_0x38fac0[_0x45920f(0x71e)]?.[_0x45920f(0x28d)];if(!_0x26b47c)continue;_0x26b47c[_0x45920f(0x354)]&&!_0x26b47c[_0x45920f(0x638)]&&_0x446022[_0x45920f(0x387)](_0x38fac0[_0x45920f(0x5e0)]+'\x20'+_0x38fac0[_0x45920f(0x624)]+_0x45920f(0x641)+(_0x38fac0[_0x45920f(0x71e)]['id']??'?')+')');}if(_0x446022[_0x45920f(0x503)])throw new Error('The\x20following\x20routes\x20require\x20auth\x20but\x20declare\x20no\x20permission:\x0a\x20\x20'+_0x446022['join']('\x0a\x20\x20'));}return okdbAuthPermissions={'hasPermission':_0x2c1bf8,'unionPermissions':_0x69bf77,'isReadOperation':_0x551567,'resolveProtectedGate':_0x4e9276,'getEffectivePermissions':_0x257e09,'assertEveryRouteHasPermission':_0x1ef6fc},okdbAuthPermissions;}var okdbJwtUtils,hasRequiredOkdbJwtUtils;function requireOkdbJwtUtils(){if(hasRequiredOkdbJwtUtils)return okdbJwtUtils;hasRequiredOkdbJwtUtils=0x1;const _0x5f02ca=require$$0$6,_0x521e69=require$$1$3,_0x195882=require$$2;function _0x6e030f(_0x32d4dc){const _0x19bc9b=_0x4307,_0x376c5a=String(_0x32d4dc||'')[_0x19bc9b(0x18e)](/-/g,'+')[_0x19bc9b(0x18e)](/_/g,'/'),_0x372506=_0x376c5a+'='['repeat']((0x4-(_0x376c5a['length']%0x4||0x4))%0x4);return Buffer[_0x19bc9b(0x2f3)](_0x372506,_0x19bc9b(0x4c8));}function _0x3c18cd(_0x2b552b){const _0x19a76d=_0x4307;if(typeof _0x2b552b!==_0x19a76d(0x44e))throw new Error(_0x19a76d(0x38c));const _0x1d8e11=_0x2b552b[_0x19a76d(0x3d5)]('.');if(_0x1d8e11[_0x19a76d(0x503)]!==0x3)throw new Error('Token\x20must\x20be\x20a\x20JWT');const [_0x3b785f,_0x1b0e34,_0x52f3b0]=_0x1d8e11,_0x432e16=JSON[_0x19a76d(0x663)](_0x6e030f(_0x3b785f)[_0x19a76d(0x288)]('utf8')),_0x16f9ff=JSON[_0x19a76d(0x663)](_0x6e030f(_0x1b0e34)[_0x19a76d(0x288)](_0x19a76d(0x6f6)));return{'header':_0x432e16,'payload':_0x16f9ff,'signature':_0x6e030f(_0x52f3b0),'signingInput':Buffer['from'](_0x3b785f+'.'+_0x1b0e34),'encodedHeader':_0x3b785f,'encodedPayload':_0x1b0e34};}function _0x4752b2(_0x42f622){const _0x50bc92=_0x4307;if(Array[_0x50bc92(0x65e)](_0x42f622))return _0x42f622;if(_0x42f622==null)return[];return[_0x42f622];}function _0x1caccf(_0x116572){const _0x4a5bd0=_0x4307,_0x5636a7=String(_0x116572||'')['match'](/.{1,64}/g)||[];return'-----BEGIN\x20CERTIFICATE-----\x0a'+_0x5636a7[_0x4a5bd0(0x29f)]('\x0a')+_0x4a5bd0(0x5ff);}function _0x2feb8f(_0x2d4706={}){const _0x840fac=_0x4307;if(_0x2d4706['x5c']?.[0x0])return _0x195882['createPublicKey'](_0x1caccf(_0x2d4706[_0x840fac(0x1e6)][0x0]));return _0x195882[_0x840fac(0x6d7)]({'key':_0x2d4706,'format':_0x840fac(0x794)});}function _0x24e8bd(_0x5874bd,_0x522200,_0x4f0150,_0x2f195e){const _0x80599f=_0x4307;if(_0x5874bd===_0x80599f(0x72d))return _0x195882['verify'](_0x80599f(0x28a),_0x4f0150,_0x522200,_0x2f195e);if(_0x5874bd===_0x80599f(0x413))return _0x195882['verify']('sha256',_0x4f0150,{'key':_0x522200,'dsaEncoding':_0x80599f(0x1a7)},_0x2f195e);return![];}function _0x1ea1fc(_0x386336){const _0x3b5a9a=_0x4307;if(typeof commonjsGlobal[_0x3b5a9a(0x379)]===_0x3b5a9a(0x5aa))return commonjsGlobal[_0x3b5a9a(0x379)](_0x386336,{'headers':{'accept':_0x3b5a9a(0x44b)}})[_0x3b5a9a(0x4a7)](async _0x131194=>{const _0x3b0be7=_0x3b5a9a;if(!_0x131194['ok']){const _0x476119=new Error(_0x3b0be7(0x550)+_0x131194[_0x3b0be7(0x7a3)]+_0x3b0be7(0x672)+_0x386336);_0x476119[_0x3b0be7(0x7a3)]=_0x131194[_0x3b0be7(0x7a3)];throw _0x476119;}return _0x131194[_0x3b0be7(0x2d8)]();});return new Promise((_0x4e9a8b,_0x4a7605)=>{const _0x1cb2d5=_0x3b5a9a,_0x5da8e4=String(_0x386336)[_0x1cb2d5(0x637)](_0x1cb2d5(0x63a))?_0x521e69:_0x5f02ca,_0x58616c=_0x5da8e4[_0x1cb2d5(0x3e6)](_0x386336,{'headers':{'accept':_0x1cb2d5(0x44b)}},_0x4aefed=>{const _0x2257f9=_0x1cb2d5;let _0x492d93='';_0x4aefed['setEncoding'](_0x2257f9(0x6f6)),_0x4aefed['on'](_0x2257f9(0x6af),_0x3076a3=>{_0x492d93+=_0x3076a3;}),_0x4aefed['on'](_0x2257f9(0x72e),()=>{const _0x2ecbfd=_0x2257f9;if(_0x4aefed[_0x2ecbfd(0x558)]<0xc8||_0x4aefed[_0x2ecbfd(0x558)]>=0x12c){const _0x314a6f=new Error(_0x2ecbfd(0x550)+_0x4aefed[_0x2ecbfd(0x558)]+_0x2ecbfd(0x672)+_0x386336);return _0x314a6f['status']=_0x4aefed[_0x2ecbfd(0x558)],_0x4a7605(_0x314a6f);}try{_0x4e9a8b(JSON[_0x2ecbfd(0x663)](_0x492d93||'{}'));}catch(_0x5a1d74){_0x4a7605(_0x5a1d74);}});});_0x58616c['on']('error',_0x4a7605),_0x58616c['end']();});}return okdbJwtUtils={'base64UrlDecode':_0x6e030f,'parseJwt':_0x3c18cd,'normalizeAudience':_0x4752b2,'normalizePemCertificate':_0x1caccf,'jwkToKeyObject':_0x2feb8f,'verifyJwtSignature':_0x24e8bd,'fetchJson':_0x1ea1fc},okdbJwtUtils;}var hasRequiredOkdbHttp;function _0x226c(){const _0x367660=['--username','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20was\x20issued\x20for\x20a\x20different\x20node\x20—\x20share\x20this\x20node\x27s\x20PIN\x20with\x20the\x20vendor.','(workers\x20can\x27t\x20share\x20the\x20cross-process\x20HLC/clock).\x20Forcing\x20single-process\x20(was\x20','cluster-wide','stdin','noAdmin','_done','[okdb]\x20error:\x20join\x20requires\x20credentials.\x20Provide\x20--token\x20<t>\x20or\x20--username\x20<u>\x20--password\x20<p>','\x20worker(s)\x20remaining','licenseType','additionalProperties','\x20\x20(licenses\x20must\x20be\x20signed\x20by\x20the\x20matching\x20private\x20key)','round','OKDBUniqueConstraintError','token_endpoint','started','fast','invalid','Type\x20\x27','cors','activation','\x1b[31m','fanout','__vocab/version','nodesView','_envs','toFixed','write','isPrimary','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','note','EXIT','List\x20tokens\x20and\x20users.','config\x20http.workers','logLevel','\x20\x20·\x20\x20','\x20\x20Path\x20access','data:write','createPublicKey','oauth','__OKDB_PUB_FINGERPRINT__','putSync','errors','\x20(expires\x20in\x20','ppid','_drainOne','\x20\x20(no\x20env\x20draining)','\x20\x20(unlimited)','extend','_collectWriterFacet','number','LICENSE_ALREADY_STORED','SIGINT','unique:violation','_instanceId','Read','blobs','role','_inflight','[okdb]\x20cluster\x20close\x20error:\x20','allSettled','processor:paused','onLicenseExpired','decodeActivationToken:\x20input\x20must\x20be\x20a\x20string','[okdb]\x20./okdb-data\x20already\x20exists\x20—\x20skipping','FTS_REGISTERED','trim','readMs','processors/','utf8','_supervisorKey','SCHEMA_VALIDATION_FAILED','--changes','_nestedTotal','LABEL','/api/env/','now','fromEntries','boolean','HTTP_','processor:retry','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20has\x20expired\x20—\x20request\x20a\x20fresh\x20one.','dest','_cmd','allocUnsafe','\x20\x20✓\x20Removed\x20license\x20','liveThreadStats','queue','\x20MB\x20→\x20','--ttl','processorsView','regex','~tokens','socket','config\x20file\x20valid:\x20','CREATED','_rotateBucket','records','charCodeAt','startedAt','alloc','system:env_release','disconnect','\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.','_children','tokenUrl','typeSubDbs','scope','[okdb]\x20import\x20complete','operation','reject','Build\x20expects\x20public\x20key\x20fingerprint\x20','processes','sub','bind','_putRowSync','\x20\x20\x20\x20license:\x20free\x20tier\x20—\x20add\x20a\x20license\x20to\x20unlock\x20sync,\x20embeddings,\x20engines,\x20time-machine','[okdb]\x20importing\x20','text/event-stream;\x20charset=utf-8','namespace','HTTP_CLUSTER_REMOVED','[okdb]\x20invalid\x20config\x20\x22http.host\x22:\x20','_buildOwnRow','\x22.\x20Use:\x20create,\x20list,\x20revoke','RS256','end','stringify','\x20\x20\x20\x20status:\x20\x20\x20\x20active\x20\x20(','trimStart','\x20worker','compaction','TYPE_ALREADY_REGISTERED','[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22','\x20\x20[','set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)','\x20\x20\x20\x20\x20\x20\x20POST\x20(body\x20implies\x20POST)\x0a\x20\x20','instances','ms\x20p99=','setNoDelay','\x0a\x20\x20✓\x20License\x20added','cause','must\x20be\x20','getRange','--label','ttl','\x0a\x20\x20\x20\x20','no\x20.kdbconfig\x20(using\x20defaults)','\x27\x20on\x20type\x20\x27',')\x20—\x20they\x20will\x20NOT\x20be\x20preserved','access-control-allow-credentials','[okdb-cluster]\x20primary\x20pid=','FOREIGN_KEY_DELETE_RESTRICTED','argv','item:create','is\x20invalid','PIN','__writeCounter','License\x20already\x20stored','\x20cf-ray=','null','reads','ceil',',\x20got\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','Index\x20\x27','external','instanceId','env','cookieName','CLI\x20(`okdb\x20listen`),\x20or\x20use\x20Node\x27s\x20built-in\x20`cluster`\x20module\x20and\x20call\x20','\x20active\x20env:\x20','/types\x0a\x20\x20\x20\x20','middlewares','tags:\x20','\x0a\x20\x20✓\x20License\x20activated','quantum','_holderDead','Version\x20mismatch\x20for\x20','bus:env_release','BOOTSTRAP_LOCALHOST_ONLY','_rootDb','\x20\x20Example:\x20okdb\x20join\x20https://node-a.example.com\x20--token\x20<t>\x20--address\x20http://myhost:8484\x0a','hex','[okdb]\x20primary\x20okdb\x20close\x20error:\x20','_pending','[okdb-cluster]\x20','_jwksNegativeCache','user','mkdirSync','_heartbeatTimer','host','_collectSingletonClaims','attachFeed','database\x20path\x20not\x20writable:\x20','Sync','shutdown','OKDBForeignKeyError','okdb-license-id:','white','_isWriter','keys:','info','fork','shmbuf/package.json','\x20\x20Error:\x20','items','off','\x20opening\x20','_heldTotal','config\x20file\x20invalid:\x20','type/users/item/alice\x20--env\x20staging','okdb','drain','headers','PAYLOAD_TOO_LARGE','sort','pid','permissions','_dispatch','closeAllConnections','\x20/\x20','VALIDATION_ERROR','\x20\x20\x20\x20•\x20a\x20license\x20blob\x20\x20\x20(Crockford\x20base32,\x20~150–250\x20chars)','(on\x20any\x20path\x20command)','_systemEnv','\x20\x20\x20\x20addedAt:\x20\x20\x20','addLicense','jwk','_migrateVocab','transactionSync','_heartbeatInFlight','seq','writes','mcp','--name','exp','isFinite','openDB','_flushTimer','/api/','content-type','internal','status','_totalRequests','/admin/index.html','[okdb]\x20close\x20error:\x20','embedded','\x0a\x20\x20License\x20details:','⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20','\x20documents\x20fail\x20validation','replace','\x20already\x20exists','appendFileSync','ITEM_CREATE','Cannot\x20delete\x20','test','Hint:\x20','gray','OKDBTypeAlreadyRegisteredError','--test','selfKey','\x0a[okdb]\x20error:\x20','cluster:','starting','derivePin','{}[]:,\x27\x22','--log-level','[okdb]\x20error:\x20show\x20requires\x20an\x20id\x20argument','VERSION_MISMATCH','enable','\x20\x20\x20\x20api:\x20\x20\x20\x20\x20http://localhost:','_versionSkewWarned','Full-text\x20search','\x20—\x20','type/users\x20--help','ieee-p1363','createLoginState','defaults','\x20\x20Note:\x20this\x20node\x20has\x20existing\x20tokens.\x20They\x20will\x20coexist\x20with\x20cluster\x20tokens\x0a','_ensureTokensType','http://localhost:','decodeLicenseBlob:\x20blob\x20too\x20short\x20(','is\x20not\x20allowed',',\x20stopping\x20workers…\x0a','[okdb]\x20preserved:\x20','\x0a\x20\x20Joining\x20cluster\x20at\x20','Protected\x20(gate)','system:clock_change','_flushDebounce','passive\x20HTTP\x20worker(s)\x20serving\x20:','cpuWindowMs','ms/','[body]','set-cookie','library\x20(okdb\x20node-model\x202.0).\x20For\x20multi-process\x20HTTP\x20serving\x20use\x20the\x20okdb\x20','/type/users\x0a\x20\x20\x20\x20','open','Search','\x27\x20is\x20already\x20registered','tierList','processingStatusView','debug','backup','ephemeral','auth','Query','_windowCbs','\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','FTS_DROP','setLogger','Unsupported\x20JWT\x20alg:\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/','kdb_admin_oauth_state','expired','current','formatListenAddr','\x20pid=','slot','stop','roles','authenticateToken','time','cf-ray','selfAddress','deaths','\x1b[0m','jwksTtlMs','2742240sMRjzw','includes','getHeader','destroyed','_rowKey','message','JWT\x20issuer\x20mismatch','FORBIDDEN','exports','bus:poke','[okdb]\x20loaded\x20config:\x20','x5c','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','--no-cluster','\x20ipc\x20error:\x20','loadEnvFile','cyan','raw','\x20deleted','processes:\x20','LICENSED_BUILD','parseBearer','ttl:expired','resetFts','listNodes','removeSupervisedChild','_totalReadMs','\x20sync','\x22\x20matches\x20','size','node','ms\x20busy=','_ownMeta','dropping','List,\x20download,\x20and\x20inspect\x20file\x20metadata.','maxMs','filter','typesPerEnv','children','preferred_username','queue-worker','grants','getChanges','import','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20','--version','OIDC\x20discovery\x20missing\x20jwks_uri','required','methods','okdb_session_','license','3065847GslmEt','_rawDb','\x20\x20\x20\x202.\x20The\x20vendor\x20returns\x20an\x20activation\x20token.','\x20binding\x20references\x20missing\x20input\x20field:\x20','_authOptions','\x20\x20\x20\x20admin:\x20http://localhost:','License\x20signature\x20invalid:\x20','unclaimed','HELP','safety','Schema\x20validation\x20failed\x20for\x20','addSSE','[okdb]\x20created\x20.kdbconfig','warn','[okdb]\x20.kdbconfig\x20already\x20exists\x20—\x20skipping','\x20\x20✓\x20http\x20listening\x20on\x20','createHmac','default:\x20cores−1\x20=\x20','_acquiredAt','work','remoteAddress','\x20\x20\x20\x20expires:\x20\x20\x20','destroy',')\x20to\x20your\x20license\x20vendor.','Validation\x20failed:\x20','_isClusterController','Bearer\x20','\x20which\x20does\x20not\x20exist','\x27\x20doesn\x27t\x20exist','\x20worker(s)\x20still\x20serving','item:remove','_key','stack','\x20\x20\x20\x20-\x20The\x20license\x20blob\x20has\x20not\x20been\x20added\x20yet\x20—\x20run\x20`okdb\x20license\x20<blob>`\x20first.','[okdb]\x20error:\x20revoke\x20requires\x20an\x20id\x20argument','isHeld','\x22\x20on\x20\x22','http.workers','cpuPct','detachConsole','effective','dirname','header','maxExtra','_lookupByName','?\x0a\x20\x20(node\x20identity\x20and\x20licenses\x20are\x20preserved)\x0a\x20\x20Type\x20\x22yes\x22\x20to\x20confirm:\x20','\x0a[okdb]\x20fatal\x20error:','unknown','\x20\x20env=','5710617XZJbyZ','transport','present','inflightAgesMs','_okdb','timeMachine','env:removed','stream','_buckets','der','Functions','freeze','issuer','_markSeen','sandbox','index:reset','api','--path','[okdb-cluster]\x20change-feed\x20init\x20failed:\x20','config','node:crypto','tokenSecret','\x20querySchema\x20references\x20missing\x20input\x20field:\x20','--key','type/users','view','sizeBefore','NAME','\x20\x20\x20\x203.\x20Run:\x20\x20okdb\x20license\x20<activation-token>','forceAfterMs','_dedupeKey','audience','endsWith','dim',']:\x20transaction\x20ran\x20nested\x20inside\x20a\x20write\x20txn\x20held\x20open\x20by\x20a\x20non-writer\x20caller','license:added','(unset)','\x20\x20╚═══════════════════════════╝','--eval','txn:rollback','migrate','_nodeDbFor','\x20MB)','_license','exposeHeaders','\x22\x20already\x20exists','Examples','ORPHAN\x20(env-closed\x20write)','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20','max','reason','_totalErrors','log','Route\x20','inst:','OKDBIndexAlreadyRegisteredError','Admin','beforeWrite','flatMap','_lockDb','OKDBVersionMismatchError','crypto','exportBlobs','View\x20peer\x20status\x20and\x20replication\x20stats.','quit','INVALID_INDEX_KEY','processorId','dead','\x20to\x20browse\x20the\x20API,\x20','License\x20signature\x20invalid\x20—\x20this\x20license\x20was\x20not\x20signed\x20by\x20the\x20key\x20paired\x20with\x20this\x20build.\x20','_cookieName','references','\x20to\x20quit.','toString','127.0.0.1','RSA-SHA256','Feature\x20not\x20licensed:\x20','export','access','dbPath','env/','\x20already\x20in\x20use','bus:drain','attach','win32','ms\x0a','cf-connecting-ip','query.','responseStatuses','password','[okdb]\x20reset:\x20','LICENSE_ACTIVATION_INVALID','cookie','pathParams','_fetchJwks','runtimeProcessesView','join','code','nodeKey','_validateOidcAccessToken','_shouldWrapResponse','<path>','List\x20functions\x20and\x20inspect\x20their\x20source.','\x20\x20\x20\x20status:\x20\x20\x20\x20','OKDB_HTTP_WORKERS\x20env','readFileSync','reverse','is\x20required','license:invalid','keys','system','[on|off|level]','peer','Types','_desiredOverlay','wrong_node','version','\x20\x20→\x20\x20','inspect','\x20cf-ip=','LICENSE_LIMIT_EXCEEDED','draining','exec','firstTs','ROUTES','send','getProcess','_role','feed:','(worst\x20','\x20origin=','shmbufNative','Invalid\x20index\x20key\x20type\x20for\x20\x27','ENV_CLOSING_RETRY','\x20\x20\x20\x20admin:\x20\x20\x20http://localhost:','_changefeed','remaining-fields','never','\x20(+','makeOkdb','splice','okdb-writer:\x20env\x20closing\x20—\x20retry','[okdb]\x20blobs:\x20imported=','signCookie','\x20\x20⚠\x20\x20','envs=','fts:reset','connection','_cursors','_nodeDead','summary','\x20(must\x20be\x20a\x20string\x20or\x20array\x20of\x20strings)','toISOString','json','question','ref:violation','[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22','matcher',';\x20SameSite=','stopHeartbeat','\x0a\x20\x20Delete\x20ALL\x20data\x20in\x20','discoveryTtlMs','\x20\x20\x20\x20\x20\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','features','--print','\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)','_nodeDb','Forbidden\x20—\x20no\x20permissions\x20available','padStart','Forbidden','context','listening','registry\x20heartbeat\x20skipped\x20(writer=','DELETE','_sandbox','ITEM_REMOVE','hasCanonical','pending','_validateOperationRequest','_highWater','from','msg','May\x20write\x20system\x20types\x20when\x20also\x20granted\x20the\x20underlying\x20write\x20permission.','../','assign','digest','\x20(slot=','Materialized\x20views:\x20query\x20definitions\x20that\x20are\x20continuously\x20maintained\x20and\x20queryable.','copy','supervisorKey','cpuUsage','3905672qIeGko','\x20does\x20not\x20exist','resolve','\x20\x20\x20\x20path:\x20\x20','listAll','[okdb]\x20exported\x20\x20types=','INVALID_PRIMARY_KEY','setDesired','\x20has\x20canonical\x20metadata\x20but\x20missing\x20valid\x20inputSchema','\x20tokens:','logs','\x20\x20changes=','_closed','API\x20tokens,\x20users,\x20and\x20credentials.','primary','params.','\x20<path>\x20[json-body]','ms\x20max=','standard','min','setOwnMeta','syncPeers','querySchema','validateRouteInput','removeNode','sync','floor','keys/public.pem','[okdb]\x20error:\x20','headers.','VERB','_bucketIdx','_putRowAsync','--types','protected:write','Content-Type','noteListenAddr','\x20\x20\x20\x20•\x20a\x20path\x20to\x20a\x20.license\x20file','\x20SECURITY\x20NOTICE','Operator\x20surface:\x20server\x20info,\x20logs,\x20event\x20streams,\x20processor\x20status,\x20backups.','GONE','\x20@\x20','1ofN:','(primary\x20=\x20processor)','internalOnly','[req]\x20','METHOD_NOT_ALLOWED',':\x20ping\x0a\x0a','base64url','access-control-request-headers','participate','writeUInt16BE','rawBuf','ms\x20activeWriters=','_startedAt','cli','sourceType','Engines','Execute\x20full-text\x20and\x20vector\x20searches.','subject','\x20HTTP\x20server(s)\x20on\x20port\x20','sha256','blob','HEAD','OKDBInvalidValueError','OKDB_HTTP_WORKERS','bus:proc','Origin','maxAge','noCluster','maxWrites','(no\x20types)','_dedupeMax','query','unique:violation_resolved','--no-admin','\x1b[90m','setupPrimary','sync-node','maxBodyBytes','init','single','licenseHash','last-event-id','_draining','Records','authRequired','--help','targetType','\x20\x20(name:\x20','groups','prototype','operations','_enforceOperationAccess','_buildChildRow','{}[]:,\x0a\x0d\x09\x20','stopping','⚠\x20INTERNAL\x20LICENSE\x20ACTIVE\x20—\x20all\x20features\x20and\x20limits\x20are\x20unlocked.\x20For\x20vendor/internal\x20use\x20only.','__identity','\x20process','rawResponse','PUBLIC_KEY_PEM','envs','--address','schema:set','stopped','isActive','registry-publish','Payload\x20too\x20large','_userPhase','Bearer\x20$1…','[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22','system:bus_state_change','set','--drop','<json-body>','registerIndex','description','writeUInt32BE','[okdb]\x20cluster\x20primary\x20pid=','username','Unknown\x20JWKS\x20kid:\x20','name','fetch','flushDebounce','force','servers','_caps','\x20\x20\x20\x20port:\x20\x20\x20\x20','_outstanding','rss','isDead','decodeLicenseBlob','\x20license(s)','\x20log\x20level:\x20','identity','rowKey','push',':\x20processor\x20(HTTP-silent),\x20','isWanted','category',',\x20signal=','Invalid\x20token','INDEX_RESET','hasLimit','--grants','running','idx:','../okdb','exit','createEnvironment','search','Register/update/delete\x20types,\x20register/drop/rebuild\x20indexes,\x20set\x20TTL\x20policy.','values','_writer','body.','entry','TYPES','\x20in\x20','\x20has\x20ambiguous\x20binding\x20for\x20path\x20field:\x20','bindings','[res]\x20','okdb-writer[','every','types:','platform','_licenseHash','Unauthorized','cluster','\x20\x20records=','url','processor','limits','decommission','node\x20','_isFree','data:\x20','online','failures','_lastTick','--workers','Environments','getCmd','uncaughtException','\x20│\x20','[okdb]\x20reset\x20aborted','OKDBSchemaCollectionError','verifyCookie','repeat','Create,\x20update,\x20and\x20delete\x20tokens\x20and\x20users;\x20rotate\x20keys.','~processes:cmd','\x1b[37m','_durs','child_process','match','Either\x20the\x20build\x20was\x20made\x20with\x20a\x20different\x20keypair,\x20or\x20the\x20license\x20was\x20issued\x20with\x20a\x20different\x20private\x20key.','FTS_RESET','once','_activateProcessesReader','\x20day(s).','\x20\x20\x20\x20label:\x20\x20\x20\x20\x20\x20\x20','\x20\x20All\x20checks\x20passed.\x0a','\x20for\x20system\x20env','\x20\x20Envs:\x20\x20\x20\x20','\x20has\x20illegal\x20binding\x20target\x20for\x20',';\x20Max-Age=','\x20\x20\x20\x20\x20\x20\x20','\x20has\x20unbound\x20input\x20fields\x20with\x20bodyMode:none:\x20','Blob\x20storage:\x20large\x20file\x20uploads\x20attached\x20to\x20records\x20or\x20stored\x20standalone.','examples','[okdb]\x20error:\x20--password\x20requires\x20--name',',\x20label:\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20OKDB\x20SHELL\x20\x20\x20\x20\x20\x20\x20\x20','[okdb]\x20created\x20./okdb-data',']\x20already\x20maps\x20to\x20\x27','split','array','registerType','\x20\x20[okdb]\x20closed\x20cleanly\x0a','history','x-forwarded-for','QUIT','[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a','clear','.\x20Add\x20a\x20license\x20that\x20includes\x20\x22','columns','dedupeMax','listDesired','events','Cluster\x20replication.\x20The\x20\x22peer\x22\x20op\x20is\x20for\x20cluster\x20nodes,\x20not\x20human\x20users.','/type/users/item/alice\x0a\x20\x20\x20\x20','UNSUPPORTED_MEDIA_TYPE','get','integer','_nestedWarned','view:progress','hidden','\x20has\x20invalid\x20http.bodyMode:\x20','Cannot\x20set\x20enforce\x20schema\x20on\x20','_active','item:update','randomUUID','undefined','OKDBInvalidIndexKeyError','help','Auth','level','stdout','building','green','authorization_endpoint','[filter]','\x20drainAge=','createInterface','SYNC_COMMITS','parkedNow','_held','OKDBForeignKeyDeleteError','reduce','result','\x20envs','event','\x20more','INDEX_ALREADY_REGISTERED','Activation\x20invalid:\x20','_matchRoute','\x20file','--inspect','writerStatus','--permissions','enabled','object','_admissionStarted','processor:progress','standalone','afterWrite','received\x20','ES256',';\x20Path=','\x20\x20\x20\x20licensee:\x20\x20','payload-or-self','pause','SIG_INVALID','\x0a\x20\x20No\x20documentation\x20found\x20for:\x20','homedir','disable','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Type\x20definitions,\x20all\x20index\x20registrations\x20(byIndex,\x20FTS,\x20vector),\x20and\x20TTL\x20policy.','activateLicense','emit','Foreign\x20key\x20violation:\x20','_hbTimer','processKey','registry\x20publish\x20failing:\x20','https','waiting','OKDBSchemaValidationError','_started','isSetupMode','_startHeartbeat','flushed','__okdbCluster','List\x20views,\x20query\x20view\x20output,\x20inspect\x20metadata\x20and\x20definition.','\x20\x20╔═══════════════════════════╗','\x20\x20#','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/staging/info\x0a\x0a','\x20supervised)','LICENSE_INVALID','[okdb]\x20error:\x20--address\x20is\x20required\x20for\x20join\x20(this\x20node\x27s\x20reachable\x20sync\x20address).\x0a','isConnected','sig','handle','SERVICE_UNAVAILABLE','list','JWT\x20is\x20missing\x20kid','next','_lastCpuPct','REMOVE','\x20\x20[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a','\x1b[33m','\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20','getClock','Create,\x20update,\x20and\x20delete\x20records\x20(including\x20bulk\x20import).','_db','unref','_coordinator','\x20\x20@','default','[okdb]\x20shutdown\x20drain\x20exceeded\x203000ms\x20—\x20hard-exiting\x0a','4826392QgYWNA','treeView','\x0a\x20\x20Joined.\x20Remote\x20tokens\x20replicated.\x20You\x20can\x20now\x20log\x20in\x20with\x20cluster\x20credentials.\x0a','[okdb]\x20invalid\x20log\x20level:\x20\x22','application/json','jwks_uri','kid','string','input:\x20',';\x20shmbuf\x20native\x20missing\x20→\x20forced\x20single-process','\x20\x20Usage:\x20logs\x20[on|off|debug|info|warn|error]','ENVS','mixed\x20versions\x20on\x20one\x20store\x20are\x20unsafe\x20across\x20storage\x20migrations;\x20align\x20versions\x20before\x20upgrading\x20further.','Register,\x20configure,\x20and\x20remove\x20cluster\x20peers.','parseInt','Index\x20\x22','protected:read','\x20phase=','[okdb]\x20imported\x20\x20types=','Files','signalWant','1344333rigIzB','\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','\x20records','--token','\x20\x20Usage:','~licenses','\x27,\x20cannot\x20map\x20to\x20\x27','\x20—\x20type\x20env\x20to\x20list\x20available\x0a','isBuffer','killable','(none)','Unique\x20constraint\x20violated\x20on\x20','_publishNow','Validation\x20failed','active:','hasOwnProperty','getAuthOptions','_handleInProcess','ms\x20env=','\x20result','node/','processors',';\x20Secure','_oidcDiscoveryCache','_totalWriteMs','find','~processes','execArgv','pin','.kdbconfig','51378WZDWrt','\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site','holder','true','\x20\x20(press\x20Ctrl+C\x20again\x20to\x20exit)\x0a','creating','_committed','value','red','./okdb-backup','inputSchema','\x20while\x20this\x20process\x20runs\x20','offWindow','LICENSE_HASH_MISMATCH','remove','--no-repl','isAuthenticated','Forbidden\x20—\x20requires\x20','claims','POST','\x20has\x20ambiguous\x20binding\x20for\x20query\x20field:\x20','PUT','okdb-diag.','details','server','loop-lag\x20','processing','\x0a\x20\x20✓\x20License\x20already\x20stored\x20(no\x20change)','fn-runner','\x27:\x20','spki','doctor','setSchema','listen','kill','\x0a\x20\x20\x20\x20\x20\x20','\x1b[1m',':want','listRoutes','node\x20identity','resetReadTxn','[okdb]\x20failed\x20to\x20parse\x20config\x20file\x20','route','dumpedAt','expires','then','.log','~processes:desired','consumeLoginState','detectInputType','process','tokenType','types\x20--env\x20staging','content-length','system:proc','_loginStates','existsSync','consecutiveFailures','Token\x20secret\x20not\x20configured','hasDesired','importBlobs','importFromFile','[okdb]\x20http\x20workers:\x20','env/:env','REQUEST_TIMEOUT','[okdb]\x20error:\x20remove\x20requires\x20an\x20id\x20argument','SIGBREAK','\x20\x20Or\x20set\x20sync.address\x20in\x20.kdbconfig','expiry','_drain','shift','uptime','kind','recordWrite','addedAt','label','Execute\x20functions\x20over\x20HTTP/MCP/shell.','application/x-www-form-urlencoded','base64','x-requested-with','token','\x20not\x20found','Invalid\x20activation\x20token:\x20','processor:ready','respawnTimer','updatedAt','field:resolver_registered','List\x20jobs,\x20view\x20stats,\x20list\x20buckets.','add','audiences','_selfKey','_enqueuedAt','none','tags','nbf','hasType','threads',')\x20exited\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\x20\x20\x20\x20--workers\x20<n>\x20\x20\x20\x20\x20\x20\x20\x20Number\x20of\x20capable\x20worker\x20processes\x20sharing\x20the\x20listen\x20socket\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20(default:\x20cores\x20−\x201).\x20Each\x20worker\x20serves\x20HTTP\x20+\x20SSE\x20AND\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20processes\x20(claims\x20leases,\x20drains\x20on\x20its\x20own\x20loop);\x20the\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20cluster\x20primary\x20is\x20a\x20thin\x20passive\x20supervisor.\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-cluster\x20\x20\x20\x20\x20\x20\x20\x20\x20Run\x20single-process\x20(equivalent\x20to\x20--workers\x201)\x0a\x20\x20\x20\x20-v,\x20--version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Print\x20version\x20and\x20exit\x0a\x20\x20\x20\x20-h,\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x0a\x0a\x20\x20Commands:\x0a\x20\x20\x20\x20version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Print\x20version\x20and\x20exit\x0a\x20\x20\x20\x20doctor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Run\x20health\x20checks\x0a\x20\x20\x20\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Create\x20.kdbconfig\x20and\x20okdb-data/\x0a\x20\x20\x20\x20token\x20create\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Create\x20a\x20token\x20in\x20the\x20local\x20DB\x20(direct\x20access,\x20no\x20HTTP)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--name\x20<name>\x20\x20\x20\x20\x20\x20For\x20password\x20login\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--password\x20<pass>\x20\x20Password\x20(requires\x20--name)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--label\x20<text>\x20\x20\x20\x20\x20Human\x20description\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--permissions\x20<l>\x20\x20Comma-separated\x20baseline\x20permissions\x20(e.g.\x20\x22*\x22\x20or\x20\x22data:read\x22)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--grants\x20<json>\x20\x20\x20\x20Per-env\x20grants\x20as\x20JSON\x20(e.g.\x20\x27{\x22orders\x22:[\x22data:*\x22]}\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--ttl\x20<ms>\x20\x20\x20\x20\x20\x20\x20\x20\x20Optional\x20TTL\x20in\x20milliseconds\x0a\x20\x20\x20\x20token\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20List\x20all\x20tokens\x20in\x20the\x20local\x20DB\x0a\x20\x20\x20\x20token\x20revoke\x20<id>\x20\x20\x20\x20\x20\x20\x20\x20Revoke\x20(delete)\x20a\x20token\x20by\x20id\x20(full\x20uuid\x20or\x20unique\x20prefix)\x0a\x20\x20\x20\x20join\x20<address>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Join\x20an\x20existing\x20cluster\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--token\x20<t>\x20\x20\x20\x20\x20\x20\x20\x20Bearer\x20token\x20from\x20the\x20cluster\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--username\x20<u>\x20\x20\x20\x20\x20Or,\x20username\x20for\x20login\x20exchange\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--password\x20<p>\x20\x20\x20\x20\x20Password\x20for\x20login\x20exchange\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--address\x20<addr>\x20\x20\x20This\x20node\x27s\x20reachable\x20sync\x20address\x20(required)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--path\x20<dir>\x20\x20\x20\x20\x20\x20\x20Local\x20DB\x20path\x0a\x20\x20\x20\x20backup\x20[dir]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Hot\x20filesystem\x20backup\x20via\x20LMDB\x20native\x20copy\x20(default:\x20./okdb-backup)\x0a\x20\x20\x20\x20export\x20<file>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Streaming\x20NDJSON\x20logical\x20export\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env\x20<name>\x20\x20\x20\x20\x20\x20env\x20to\x20export\x20(default:\x20default)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--types\x20<a,b,...>\x20comma-separated\x20type\x20filter\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--changes\x20\x20\x20\x20\x20\x20\x20\x20\x20include\x20changelog\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--blobs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20also\x20export\x20blob\x20files\x20alongside\x0a\x20\x20\x20\x20import\x20<file>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Streaming\x20NDJSON\x20logical\x20import\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env\x20<name>\x20\x20\x20\x20\x20\x20target\x20env\x20override\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--types\x20<a,b,...>\x20import\x20only\x20these\x20types\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--drop\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20drop\x20&\x20recreate\x20existing\x20types\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--changes\x20\x20\x20\x20\x20\x20\x20\x20\x20restore\x20changelog\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--blobs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20also\x20import\x20blob\x20files\x20alongside\x0a\x20\x20\x20\x20reset\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Delete\x20and\x20recreate\x20database\x20(with\x20confirmation);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20node\x20identity\x20and\x20licenses\x20are\x20preserved\x0a\x20\x20\x20\x20license\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20List\x20stored\x20licenses,\x20current\x20tier,\x20and\x20usage\x0a\x20\x20\x20\x20license\x20<blob|path>\x20\x20\x20\x20\x20\x20Add\x20a\x20license\x20blob\x20(or\x20read\x20from\x20a\x20.license\x20file)\x0a\x20\x20\x20\x20license\x20<activation>\x20\x20\x20\x20\x20Activate\x20a\x20previously-added\x20license\x20with\x20the\x20vendor\x27s\x20token\x0a\x20\x20\x20\x20license\x20<id>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20details\x20for\x20one\x20stored\x20license\x20(by\x20uuid\x20or\x20prefix)\x0a\x20\x20\x20\x20license\x20remove\x20<id>\x20\x20\x20\x20\x20\x20Remove\x20a\x20stored\x20license\x0a\x0a\x20\x20Environment\x20variables:\x0a\x20\x20\x20\x20OKDB_PORT\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20HTTP\x20port\x0a\x20\x20\x20\x20OKDB_PATH\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Database\x20directory\x0a\x20\x20\x20\x20OKDB_LOG_LEVEL\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Log\x20level\x20(debug|info|warn|error)\x0a\x20\x20\x20\x20OKDB_KEY\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Encryption\x20key\x0a\x20\x20\x20\x20OKDB_NO_REPL=1\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20REPL\x0a\x20\x20\x20\x20OKDB_NO_ADMIN=1\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20admin\x20UI\x0a\x20\x20\x20\x20OKDB_HTTP_WORKERS\x20\x20\x20\x20\x20\x20\x20\x20\x20Number\x20of\x20passive\x20HTTP\x20worker\x20processes\x20(default:\x20cores\x20−\x201;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20forced\x20to\x201\x20if\x20the\x20shmbuf\x20native\x20binding\x20is\x20unavailable)\x0a\x0a\x20\x20Config\x20file\x20(.kdbconfig)\x20—\x20JSON,\x20all\x20keys\x20optional:\x0a\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22port\x22:\x20\x20\x20\x20\x208484,\x0a\x20\x20\x20\x20\x20\x20\x22path\x22:\x20\x20\x20\x20\x20\x22./okdb-data\x22,\x0a\x20\x20\x20\x20\x20\x20\x22key\x22:\x20\x20\x20\x20\x20\x20\x22...\x22,\x0a\x20\x20\x20\x20\x20\x20\x22logLevel\x22:\x20\x22info\x22,\x0a\x20\x20\x20\x20\x20\x20\x22noAdmin\x22:\x20\x20false,\x0a\x20\x20\x20\x20\x20\x20\x22noRepl\x22:\x20\x20\x20false,\x0a\x20\x20\x20\x20\x20\x20\x22auth\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22open\x22:\x20false\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20Examples:\x0a\x20\x20\x20\x20okdb\x0a\x20\x20\x20\x20okdb\x20--port\x209000\x20--path\x20./mydb\x0a\x20\x20\x20\x20okdb\x20--no-repl\x20--port\x208080\x0a\x20\x20\x20\x20okdb\x20--open\x0a\x20\x20\x20\x20okdb\x20--open\x20192.168.1.0/24\x0a\x20\x20\x20\x20okdb\x20doctor\x0a\x20\x20\x20\x20okdb\x20backup\x20./my-backup\x0a','issuedAt','\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','getCount','processor:resumed','singletonClaims','[okdb]\x20error:\x20failed\x20to\x20read\x20','schema:drop','available','OKDBTypeNotRegisteredError','_report','\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','HTTP\x20server\x20already\x20running','--port',');\x20','Embeddings','reload','_threadStats','fts','NOT_FOUND','setHeader','_openEnvLazy','targetKey','_seen','admin','mode','Machine-to-machine\x20cluster\x20protocol\x20(join\x20handshake,\x20replication\x20channel,\x20traffic).\x20Grant\x20only\x20to\x20peer\x20nodes\x20—\x20not\x20to\x20humans.','expiresAt','_runMiddlewares','licenses','getDesired','changes','types','line','[okdb]\x20invalid\x20port:\x20','toLowerCase','writeUInt8','env:opened','worker','length','sse','body','createHash','_userRouteCount','[okdb]\x20backup\x20complete','searchParams','http.listen:\x20host\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20an\x20array\x20of\x20them','bold','\x20(durable\x20desired-state)','change','ttl:clear','Work','decommissioned','alg','MALFORMED_TOKEN','register','\x20references\x20','bumpCmd','unhandledRejection','engines','.kdb_history','val','env/staging/info','_kind','GET','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20','Peer','confirm','Access-Control-Request-Headers','Run','allowMethods','\x20licenses','Views','readUInt16BE','\x20statusEnv=','isFeatureEnabled','__esModule','_isStale','address','race','depth','Create,\x20delete,\x20and\x20compact\x20environments.','has','\x20\x20http://localhost:','toLocaleString','resume','create','terminal','_statusEnv','title','[okdb-cluster]\x20worker\x20pid=','uuid','decodeActivationToken','_clusterOnMessage','valid','(empty)','List\x20types,\x20get\x20type\x20schema,\x20list\x20registered\x20indexes.','_wantDb','caps','isTTY','\x20\x20Usage:\x20','scrypt','_lastCpuUsage','close','authenticateRequest','formatCookie','[okdb]\x20unknown\x20token\x20action:\x20\x22','_normalizeOAuthAuthResult','claimGated','concat','system:ready','.\x20The\x20active\x20license\x20does\x20not\x20enable\x20\x22','captureStackTrace','[okdb]\x20warning:\x20could\x20not\x20read\x20node\x20identity/licenses\x20before\x20reset\x20(','\x20\x20\x20\x20•\x20an\x20activation\x20token\x20\x20(124\x20chars)','INDEX_PROGRESS','HTTP\x20','Worker-side:\x20claim,\x20heartbeat,\x20complete,\x20fail,\x20progress.','[okdb]\x20backing\x20up\x20to\x20','_jwksCache','\x0a\x20\x20Run\x20okdb\x20to\x20start\x20the\x20server.\x0a','authMode','stderr','search:query','statusCode','_maybePublish','okdb.http.listen(port)\x20in\x20each\x20worker.','\x0a\x20\x20Usage:\x20use\x20<env-name>\x0a','ESRCH','\x20\x20\x20\x20limits:\x20\x20\x20\x20','created','\x20\x20✗','delete','fts:registered',';\x20Expires=','_computeStatus','_nodeDbCache','writeFileSync','key','SYSTEM_STOPPED','_wantDbHandle','active','markClosed','\x1b[2m','fieldPath',',\x20closing…\x0a','_scheduleFlush','Unknown\x20error','pathname','_bpWaiters','\x27\x20already\x20registered','cpus','\x20for\x20commands,\x20','toUpperCase','handler','bus:type_drop','[okdb]\x20invalid\x20config\x20\x22','_lastCpuWindowMs','[okdb]\x20shmbuf\x20native\x20binding\x20unavailable\x20—\x20multi-process\x20clustering\x20is\x20unsafe\x20','metrics','License\x20limit\x20exceeded:\x20','http://','hostname','\x20\x20║','\x20uses\x20raw\x20bodyMode\x20without\x20addRaw/raw\x20route\x20metadata','\x22\x20→\x20','\x20\x20Some\x20checks\x20failed.\x0a','\x20\x20\x20\x20','[okdb]\x20export\x20complete','\x20HTTP\x20workers,\x20primary\x20=\x20processor)','_bestMatch','putNode','\x20writes\x20(','committed','meta','clearTtl','View\x20server\x20info,\x20logs,\x20SSE\x20event\x20streams,\x20processor\x20status,\x20backup\x20list.','_runGuards','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20GET\x20(implicit)\x0a\x20\x20','start','\x20\x20(','ref:violation_resolved','[okdb]\x20closed\x20cleanly\x0a','_onStop','update','0123456789ABCDEFGHJKMNPQRSTVWXYZ','already\x20in\x20use','_buildProcessingFacet','clusterWorkers','\x20parkedNow=','async','functions','BAD_HOST','_baselines','origins','timingSafeEqual','cursorKey','\x20===','\x20\x20⚠','_totalReads','okdb-http-worker-child.js','bodyMode','\x20oldestPendingMs=','_onPoke','_getOidcDiscovery','abs','function','transaction','INVALID_VALUE','BAD_REQUEST','\x20\x20\x20\x20status:\x20\x20\x20\x20pending\x20activation','okdb_session','uri','SYSTEM_POKE','stats','authorization','index:progress','_ensureDesired','Lax','error','slice','count','--password','Get\x20and\x20list\x20records,\x20run\x20byIndex\x20queries.','startHeartbeat','Feature\x20not\x20available\x20on\x20free\x20tier:\x20','\x20\x20Build:\x20\x20\x20key\x20fingerprint\x20','run','forEach','\x20\x20\x20\x20\x20explicit\x20method\x0a\x0a\x20\x20','shell','compact','SIGINT\x20(double-tap)','finally','\x20(must\x20be\x20true\x20or\x20false)','_processStartedAt','--config','[okdb]\x20opening\x20','\x20\x20\x20\x20api:\x20\x20\x20http://localhost:','workersFlag','unlinkSync','_handlePoke','--env','_onTick','flushLmdb','DELETE\x20type/users/item/x','type:registered','System','ENV','createServer','_getJwkKey','registerFts','\x0a\x20\x20Invalid\x20JSON:\x20','--watch','ready','\x20logs\x20on\x20\x20','\x20\x20\x20\x20license:\x20⚠\x20OPEN\x20—\x20','tryAcquire',';\x20HttpOnly','\x0a\x20\x20✓\x20Token\x20created','method','verify','\x20\x20\x20\x20\x20\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','_publishFailWarned','type','OPTIONS','_activateProcesses','ms\x20on\x20env=','include','exportToFile','http-server','cluster:\x20ready\x20(','_lastPublishAt','txn:start','peers=','decoded','_onProcEvent','revoke','indexOf','workers','id:\x20','/\x20quit\x20/\x20Ctrl+C','port','properties','SIGTERM','procmodeack/','closeIdleConnections','ITEM_UPDATE','/api','(?:','shutting\x20down…\x0a','\x0a-----END\x20CERTIFICATE-----\x0a','LICENSE_EXPIRED_ACTION','readUInt32BE','_wrapApiResponse','load','hint','removeSync','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','process\x20','\x0a\x20\x20','drop','http.listen({workers/makeOkdb/primaryOkdb})\x20is\x20no\x20longer\x20supported\x20in\x20the\x20','/type/users/query\x0a\x20\x20\x20\x20','guard','getSecurityNotices','writeMs','_listenAddr','_totalWrites','ID\x20token\x20is\x20not\x20accepted','heapTotal','origin','[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot=','2rapuJO','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20','UNAUTHORIZED','all','padEnd','Create\x20and\x20delete\x20views,\x20start,\x20stop,\x20and\x20rebuild\x20them.','other','\x0d[okdb]\x20blobs:\x20','[okdb]\x20error:\x20unrecognized\x20input:\x20\x22','embeddings','JWT\x20expired','reset','_bpParkedTotal','\x20license\x20—\x20no\x20activation\x20needed)','_isReader','path','Gate\x20flag\x20required\x20to\x20touch\x20system\x20types\x20(those\x20whose\x20name\x20starts\x20with\x20\x22~\x22).\x20Combined\x20with\x20the\x20underlying\x20namespace\x20permission.','map','_sampleOwnStats','catch','field','_lock','entries','_groupByProcess','reap','x-okdb-raw-response','dynamic','access-control-max-age','LOGS','writes=','read','mcp-session-id','http','isInteger','startsWith','permission','params','https:','body:\x20','changed','payload','logRequests','\x20document(s)\x20reference\x20it\x20with\x20onDelete:restrict','_singletonLocks','\x20(id:\x20','allowedAlgs','\x20\x20\x20\x20\x20\x20','index:drop','\x20\x20\x20\x20features:\x20\x20','\x20\x20\x20\x20name:\x20\x20\x20\x20\x20\x20\x20\x20','Write','Release','_released','fts:drop','TYPE_NOT_REGISTERED','Queue','percentile','[okdb]\x20starting…\x0a','busy','listenAddr','magenta','PATCH','_startAdmission','routes','_sockets','Pause/resume\x20processor,\x20trigger\x20backups,\x20restore.','database\x20path\x20writable:\x20','commitP99Ms','options','acquiredAt','equals','ACTIVATION_EXPIRED','SIGKILL','isArray','statuses','kdb_admin_csrf','commitsPerSec','commit','parse','requests','processor:error','_adminRelay','(?:/(.*))?$','call','\x20\x20Common\x20causes:','put','_singletonLock','prependListener','LENGTH_REQUIRED','\x22:\x20','\x20type','token_use','getPins','\x20fetching\x20','_timer','noRepl','\x20\x20Shell\x20commands','Background\x20job\x20queue:\x20enqueue\x20work,\x20observe\x20state,\x20and\x20process\x20jobs.','\x0d[okdb]\x20','open\x20','_quantum','licensee','_admissionTimer','cookies','record','authorizationUrl','mean','use','Events','req','_log','issueToken','heapUsed','removeLicense','state','sync:apply','SYSTEM_PROC','Open\x20licenses\x20cannot\x20exceed\x206\x20months\x20duration\x20(this\x20license\x20expires\x20','outputSchema','type/users/item/alice','_lastCpuAt','\x20\x20skipped=','addSupervisedChild','userAdded','clusterStatusView','\x20\x20\x20\x20writes:\x20\x20\x20\x20','start\x20','transport:\x20','_refreshDesiredSnapshot','ttlMs','UNIQUE_CONSTRAINT','isWorker','ingest','%),\x20','guards','JWT\x20audience\x20mismatch','\x20\x20Writes:\x20\x20','Upload,\x20update\x20metadata,\x20and\x20delete\x20files.','USE','addRaw','yellow','email','keep-alive','2.3.5','\x20\x20\x20\x20status:\x20\x20\x20\x20active','_desired','./okdb-export.ndjson','PUB_FINGERPRINT','\x20\x20✓\x20joined\x20and\x20reconciliation\x20initiated','updateSupervisedChildStats','files/','readUInt8','some','7mGwQVx','data','_onItem'];_0x226c=function(){return _0x367660;};return _0x226c();}function requireOkdbHttp(){const _0xfbb2ca=_0x362184;if(hasRequiredOkdbHttp)return okdbHttp[_0xfbb2ca(0x1e3)];hasRequiredOkdbHttp=0x1;const _0x58e0c1=require$$0$6,{URL:_0x112465}=require$$2$1,_0x229063=requireOkdbMetrics(),_0x13c763=requireOkdbAuthTokens(),{hasPermission:_0x5f398e,unionPermissions:_0x999112,resolveProtectedGate:_0x34217e}=requireOkdbAuthPermissions(),_0x28c109={0x190:_0xfbb2ca(0x5ad),0x191:_0xfbb2ca(0x617),0x193:_0xfbb2ca(0x1e2),0x194:_0xfbb2ca(0x4ef),0x195:_0xfbb2ca(0x32c),0x198:_0xfbb2ca(0x4ba),0x199:'CONFLICT',0x19a:_0xfbb2ca(0x326),0x19b:_0xfbb2ca(0x66d),0x19d:_0xfbb2ca(0x787),0x19f:_0xfbb2ca(0x3e5),0x1a6:'UNPROCESSABLE_ENTITY',0x1ad:'TOO_MANY_REQUESTS',0x1f4:'INTERNAL_ERROR',0x1f5:'NOT_IMPLEMENTED',0x1f6:'BAD_GATEWAY',0x1f7:_0xfbb2ca(0x436),0x1f8:'GATEWAY_TIMEOUT'},_0x13ad4d={'INVALID_VALUE':0x190,'BAD_CONFIG':0x190,'INVALID_PRIMARY_KEY':0x190,'INVALID_INDEX_KEY':0x190,'TYPE_NOT_REGISTERED':0x194,'INDEX_NOT_REGISTERED':0x194,'NOT_FOUND':0x194,'ALREADY_EXISTS':0x199,'VERSION_MISMATCH':0x199,'UNIQUE_CONSTRAINT':0x199,'TYPE_ALREADY_REGISTERED':0x199,'INDEX_ALREADY_REGISTERED':0x199,'FK_ERROR':0x199,'FK_DELETE_ERROR':0x199,'FOREIGN_KEY_VIOLATION':0x199,'FOREIGN_KEY_DELETE_RESTRICTED':0x199,'ENV_NOT_FOUND':0x194,'ENV_PROTECTED':0x193,'ENGINE_CONFIG_PATCH_UNSUPPORTED':0x190,'QUEUE_WORKER_JOB_TYPE_CONFLICT':0x199,'SCHEMA_VALIDATION_FAILED':0x1a6,'SCHEMA_COLLECTION_INVALID':0x199,'INVALID_SCHEMA':0x190,'BUCKET_CONFIG_INVALID':0x190,'BUCKET_INVALID_TIME_VALUE':0x1a6,'RESERVED_VIEW_NAME':0x190,'VIEW_NOT_BUCKETED':0x190,'VIEW_NOT_FOUND':0x194,'VIEW_RANGE_GRANULARITY_MISMATCH':0x190,'VIEW_RANGE_GRANULARITY_REQUIRED':0x190,'VIEW_REF_UNSUPPORTED_REDUCER':0x190},{hmac:_0x32578a,timingSafeEqual:_0x273c70,parseBearer:_0x266324,randomToken:_0x5bbee0,issueToken:_0x595d73,authenticateToken:_0x199cf6}=_0x13c763,{base64UrlDecode:_0x3cd520,parseJwt:_0x2d4b1d,normalizeAudience:_0x196c1f,normalizePemCertificate:_0x43960c,jwkToKeyObject:_0x2793b2,verifyJwtSignature:_0x3ba38d,fetchJson:_0x31d9c7}=requireOkdbJwtUtils();function _0x52d75c(_0x2be0fb){const _0x47a23e=_0xfbb2ca;return(_0x2be0fb||_0x47a23e(0x51c))[_0x47a23e(0x575)]();}function _0x362393(_0x328884){const _0x5ae7ba=_0xfbb2ca;if(Array[_0x5ae7ba(0x65e)](_0x328884))return _0x328884[_0x5ae7ba(0x279)](_0x362393);return String(_0x328884||'')[_0x5ae7ba(0x3d5)](',')[_0x5ae7ba(0x626)](_0x3644f9=>_0x3644f9[_0x5ae7ba(0x6f3)]())['filter'](Boolean);}function _0x3f378e(..._0x26731c){const _0x27204c=_0xfbb2ca;return[...new Set(_0x26731c[_0x27204c(0x279)](_0x362393))][_0x27204c(0x29f)](',\x20');}function _0x57ec07(_0x11b209,_0x5b670b){const _0x1ca9a4=_0xfbb2ca;if(!_0x11b209)return![];if(_0x5b670b==='*')return!![];if(_0x5b670b instanceof RegExp)return _0x5b670b[_0x1ca9a4(0x193)](_0x11b209);if(typeof _0x5b670b===_0x1ca9a4(0x5aa))return!!_0x5b670b(_0x11b209);if(Array[_0x1ca9a4(0x65e)](_0x5b670b))return _0x5b670b[_0x1ca9a4(0x1dc)](_0x11b209);return _0x5b670b===_0x11b209;}function _0x2b9661(_0x44db3d={},_0x199721={},_0x458874=null){const _0x46ceac=_0xfbb2ca;if(!_0x199721)return null;const _0x524ec1=_0x44db3d[_0x46ceac(0x613)],_0x258316=_0x199721[_0x46ceac(0x59e)]??_0x199721['origin']??'*',_0x20f627=_0x258316==='*'?'*':_0x57ec07(_0x524ec1,_0x258316)?_0x524ec1:null;if(!_0x20f627)return null;const _0x79302f=_0x44db3d[_0x46ceac(0x32f)],_0x57e463=_0x199721[_0x46ceac(0x786)]??_0x199721['allowHeaders']??[_0x46ceac(0x7a1),'authorization','mcp-session-id',_0x46ceac(0x351),_0x46ceac(0x4c9)],_0x46477e=_0x199721[_0x46ceac(0x20b)]??_0x199721[_0x46ceac(0x522)]??(_0x458874?[_0x458874,'OPTIONS']:[_0x46ceac(0x51c),_0x46ceac(0x48d),_0x46ceac(0x5e5)]),_0x2fe6da=_0x199721[_0x46ceac(0x26b)]??[_0x46ceac(0x634)],_0x597323={'access-control-allow-origin':_0x20f627,'access-control-allow-methods':Array[_0x46ceac(0x65e)](_0x46477e)?_0x46477e[_0x46ceac(0x29f)](',\x20'):String(_0x46477e),'access-control-allow-headers':_0x79302f?_0x3f378e(_0x57e463,_0x79302f):Array[_0x46ceac(0x65e)](_0x57e463)?_0x57e463['join'](',\x20'):String(_0x57e463),'access-control-expose-headers':Array[_0x46ceac(0x65e)](_0x2fe6da)?_0x2fe6da['join'](',\x20'):String(_0x2fe6da),'vary':_0x3f378e(_0x46ceac(0x341),_0x20f627==='*'?'':'Origin',_0x79302f?_0x46ceac(0x520):'')};if(_0x199721['credentials'])_0x597323[_0x46ceac(0x746)]='true';if(Number[_0x46ceac(0x79d)](_0x199721[_0x46ceac(0x342)]))_0x597323[_0x46ceac(0x630)]=String(_0x199721[_0x46ceac(0x342)]);return _0x597323;}function _0x570044(_0x283c45){const _0x400db0=_0xfbb2ca,_0x2f977d=[],_0xb3742f={};let _0x5407a1=![];_0x283c45[_0x400db0(0x25f)]('/*')&&(_0x5407a1=!![],_0x283c45=_0x283c45[_0x400db0(0x5b8)](0x0,-0x2),_0x2f977d[_0x400db0(0x387)]('*'));let _0x9ac3b7=_0x283c45[_0x400db0(0x18e)](/\/+$/,'')[_0x400db0(0x18e)](/\[([^\]]*)\]/g,(_0xf94376,_0x3d8afb)=>{const _0x25598c=_0x400db0,_0x44907a=_0x3d8afb[_0x25598c(0x18e)](/\/:(\w+)(?:=([^/\]\s]*))?/g,(_0x33c51a,_0x472594,_0x22dfbf)=>{_0x2f977d['push'](_0x472594);if(_0x22dfbf!==undefined)_0xb3742f[_0x472594]=_0x22dfbf;return'/([^/]+)';});return _0x25598c(0x5fd)+_0x44907a+')?';})['replace'](/\/:(\w+)/g,(_0x3ce9d6,_0xd8f76f)=>{const _0x4001cc=_0x400db0;return _0x2f977d[_0x4001cc(0x387)](_0xd8f76f),'/([^/]+)';});if(_0x9ac3b7==='')_0x9ac3b7='/';return{'keys':_0x2f977d,'defaults':_0xb3742f,'wildcard':_0x5407a1,'regex':new RegExp(_0x5407a1?'^'+_0x9ac3b7+_0x400db0(0x667):'^'+_0x9ac3b7+'$')};}function _0x31da51(_0x475234){const _0x5ecdf4=_0xfbb2ca;if(_0x475234==null)return _0x475234;return JSON[_0x5ecdf4(0x663)](JSON[_0x5ecdf4(0x72f)](_0x475234));}function _0x5f1969(_0x46125e){const _0x245b9a=_0xfbb2ca;if(_0x46125e==null)return null;if(_0x46125e[_0x245b9a(0x5e4)]===_0x245b9a(0x40d)&&_0x46125e[_0x245b9a(0x5f7)]&&!Array[_0x245b9a(0x65e)](_0x46125e[_0x245b9a(0x5f7)]))return _0x31da51(_0x46125e);const _0x57575c=Object[_0x245b9a(0x397)](_0x46125e),_0x1bbc21=_0x57575c['length']>0x0&&_0x57575c[_0x245b9a(0x3a1)](_0x533bf7=>{const _0x491873=_0x245b9a;return _0x533bf7&&typeof _0x533bf7===_0x491873(0x40d)&&!Array[_0x491873(0x65e)](_0x533bf7)&&(Object[_0x491873(0x359)][_0x491873(0x46b)][_0x491873(0x668)](_0x533bf7,_0x491873(0x5e4))||Object[_0x491873(0x359)][_0x491873(0x46b)][_0x491873(0x668)](_0x533bf7,_0x491873(0x5f7))||Object[_0x491873(0x359)][_0x491873(0x46b)][_0x491873(0x668)](_0x533bf7,_0x491873(0x77e))||Object[_0x491873(0x359)][_0x491873(0x46b)][_0x491873(0x668)](_0x533bf7,_0x491873(0x445)));});if(_0x1bbc21)return{'type':_0x245b9a(0x40d),'properties':_0x31da51(_0x46125e),'required':[],'additionalProperties':![]};const _0x4d5e26={},_0x315a5c=[];for(const [_0x4574c1,_0x410e4b]of Object['entries'](_0x46125e)){_0x4d5e26[_0x4574c1]=_0x22ae6a(_0x410e4b);if(_0x410e4b!==null&&_0x410e4b!==undefined)_0x315a5c[_0x245b9a(0x387)](_0x4574c1);}return{'type':_0x245b9a(0x40d),'properties':_0x4d5e26,'required':_0x315a5c,'additionalProperties':![]};}function _0x22ae6a(_0x1057e4){const _0x507d9a=_0xfbb2ca;if(_0x1057e4===null)return{'type':[_0x507d9a(0x750),_0x507d9a(0x44e),_0x507d9a(0x6e3),_0x507d9a(0x6ff),_0x507d9a(0x40d),'array']};if(Array[_0x507d9a(0x65e)](_0x1057e4))return{'type':'array','items':_0x1057e4[_0x507d9a(0x503)]>0x0?_0x22ae6a(_0x1057e4[0x0]):{}};switch(typeof _0x1057e4){case _0x507d9a(0x44e):return{'type':_0x507d9a(0x44e),'default':_0x1057e4};case _0x507d9a(0x6e3):return{'type':Number[_0x507d9a(0x636)](_0x1057e4)?'integer':_0x507d9a(0x6e3),'default':_0x1057e4};case _0x507d9a(0x6ff):return{'type':'boolean','default':_0x1057e4};case _0x507d9a(0x40d):{const _0x4078a2={};for(const [_0x50bcf0,_0xb2a30a]of Object['entries'](_0x1057e4))_0x4078a2[_0x50bcf0]=_0x22ae6a(_0xb2a30a);return{'type':_0x507d9a(0x40d),'properties':_0x4078a2,'additionalProperties':!![],'default':_0x31da51(_0x1057e4)};}default:return{};}}function _0x47f27c(_0x311e97,_0x465193){const _0x183ca8=_0xfbb2ca,_0x3edbbf=[];for(const _0x34c56a of _0x465193[_0x183ca8(0x2ac)]){if(_0x34c56a==='*')continue;_0x3edbbf[_0x183ca8(0x387)]({'name':_0x34c56a,'required':!Object[_0x183ca8(0x359)][_0x183ca8(0x46b)][_0x183ca8(0x668)](_0x465193[_0x183ca8(0x1a9)],_0x34c56a),'default':_0x465193[_0x183ca8(0x1a9)][_0x34c56a]});}return _0x3edbbf;}function _0x41e7e1(_0x5c8c4c={},_0x53d078){const _0x155811=_0xfbb2ca,_0x37e641=_0x5f1969(_0x5c8c4c[_0x155811(0x635)]?.['querySchema']??_0x5c8c4c[_0x155811(0x347)]??null),_0x5d3568=_0x5c8c4c[_0x155811(0x635)]?.[_0x155811(0x5a5)]??(_0x5c8c4c['raw']?_0x155811(0x1ec):_0x53d078[_0x155811(0x5e0)]===_0x155811(0x51c)||_0x53d078[_0x155811(0x5e0)]===_0x155811(0x33d)?_0x155811(0x4d6):_0x155811(0x2c7));return{'querySchema':_0x37e641,'bodyMode':_0x5d3568,'bindings':_0x31da51(_0x5c8c4c[_0x155811(0x635)]?.[_0x155811(0x39e)]??{}),'statuses':_0x31da51(_0x5c8c4c['http']?.[_0x155811(0x65f)]??(_0x5c8c4c[_0x155811(0x297)]||[])),'transport':_0x5c8c4c[_0x155811(0x635)]?.[_0x155811(0x240)]??(_0x5c8c4c[_0x155811(0x504)]?_0x155811(0x504):_0x5c8c4c[_0x155811(0x1ec)]?'raw':_0x155811(0x310)),'rawResponse':_0x5c8c4c[_0x155811(0x635)]?.['rawResponse']??!!_0x5c8c4c[_0x155811(0x362)],'cors':_0x31da51(_0x5c8c4c[_0x155811(0x635)]?.[_0x155811(0x6c4)]??_0x5c8c4c[_0x155811(0x6c4)]??null)};}function _0x26cb08(_0x3f5acc){const _0x14b9d1=_0xfbb2ca,_0xa69d50=_0x3f5acc[_0x14b9d1(0x58a)]||{},_0x3ed66c=_0x47f27c(_0x3f5acc[_0x14b9d1(0x624)],_0x3f5acc[_0x14b9d1(0x2dc)]),_0x158101=!!(_0xa69d50['id']||_0xa69d50['inputSchema']||_0xa69d50[_0x14b9d1(0x68b)]||_0xa69d50[_0x14b9d1(0x635)]||_0xa69d50['mcp']||_0xa69d50[_0x14b9d1(0x335)]||_0xa69d50[_0x14b9d1(0x28d)]||_0xa69d50['safety']),_0x58da71=_0x41e7e1(_0xa69d50,_0x3f5acc),_0x2a981f=_0xa69d50[_0x14b9d1(0x484)]?_0x31da51(_0xa69d50[_0x14b9d1(0x484)]):null;return{'id':_0xa69d50['id']??null,'summary':_0xa69d50[_0x14b9d1(0x2d5)]??null,'description':_0xa69d50[_0x14b9d1(0x373)]??null,'tags':_0x31da51(_0xa69d50[_0x14b9d1(0x4d7)]??[]),'category':_0xa69d50[_0x14b9d1(0x38a)]??null,'safety':_0x31da51(_0xa69d50[_0x14b9d1(0x217)]??null),'access':_0x31da51(_0xa69d50['access']??null),'inputSchema':_0x2a981f,'outputSchema':_0x31da51(_0xa69d50[_0x14b9d1(0x68b)]??null),'examples':_0x31da51(_0xa69d50[_0x14b9d1(0x3cf)]??[]),'pathParams':_0x3ed66c,'http':_0x58da71,'cli':_0x31da51(_0xa69d50[_0x14b9d1(0x335)]??null),'mcp':_0x31da51(_0xa69d50[_0x14b9d1(0x79a)]??null),'legacy':{'params':_0x31da51(_0xa69d50[_0x14b9d1(0x639)]??null),'query':_0x31da51(_0xa69d50[_0x14b9d1(0x347)]??null),'body':_0x31da51(_0xa69d50[_0x14b9d1(0x505)]??null),'response':_0x31da51(_0xa69d50['response']??null)},'transport':{'raw':!!_0xa69d50[_0x14b9d1(0x1ec)],'sse':!!_0xa69d50['sse'],'rawResponse':!!_0xa69d50[_0x14b9d1(0x362)],'cors':_0x31da51(_0xa69d50[_0x14b9d1(0x6c4)]??null)},'hasCanonical':_0x158101};}function _0x17afbb(_0x4aaa7b,_0x303ff2){const _0x12c763=_0xfbb2ca;if(!_0x303ff2?.[_0x12c763(0x2ef)])return;if(!_0x303ff2[_0x12c763(0x484)]||_0x303ff2[_0x12c763(0x484)][_0x12c763(0x5e4)]!==_0x12c763(0x40d)||!_0x303ff2['inputSchema']['properties'])throw new Error('Route\x20'+_0x4aaa7b[_0x12c763(0x5e0)]+'\x20'+_0x4aaa7b[_0x12c763(0x624)]+_0x12c763(0x306));const _0x44eb75=_0x303ff2[_0x12c763(0x484)][_0x12c763(0x5f7)]||{},_0x542f46=new Set(_0x303ff2[_0x12c763(0x29c)][_0x12c763(0x626)](_0x324095=>_0x324095['name'])),_0x5f3abc=new Set(Object[_0x12c763(0x2ac)](_0x303ff2[_0x12c763(0x635)]?.[_0x12c763(0x314)]?.['properties']||{})),_0x2cf793=new Set(Object['keys'](_0x303ff2[_0x12c763(0x635)]?.[_0x12c763(0x39e)]||{}));for(const _0x3a26df of _0x303ff2[_0x12c763(0x29c)]){if(!_0x44eb75[_0x3a26df['name']])throw new Error(_0x12c763(0x274)+_0x4aaa7b['method']+'\x20'+_0x4aaa7b[_0x12c763(0x624)]+'\x20missing\x20path\x20field\x20in\x20inputSchema:\x20'+_0x3a26df['name']);}for(const _0x43138f of _0x5f3abc){if(!_0x44eb75[_0x43138f])throw new Error(_0x12c763(0x274)+_0x4aaa7b['method']+'\x20'+_0x4aaa7b[_0x12c763(0x624)]+_0x12c763(0x255)+_0x43138f);}for(const _0x482a7f of _0x2cf793){if(!_0x44eb75[_0x482a7f])throw new Error('Route\x20'+_0x4aaa7b['method']+'\x20'+_0x4aaa7b['path']+_0x12c763(0x211)+_0x482a7f);}for(const _0x4435a9 of _0x2cf793){if(_0x542f46[_0x12c763(0x52e)](_0x4435a9))throw new Error(_0x12c763(0x274)+_0x4aaa7b[_0x12c763(0x5e0)]+'\x20'+_0x4aaa7b[_0x12c763(0x624)]+_0x12c763(0x39d)+_0x4435a9);if(_0x5f3abc[_0x12c763(0x52e)](_0x4435a9))throw new Error('Route\x20'+_0x4aaa7b['method']+'\x20'+_0x4aaa7b[_0x12c763(0x624)]+_0x12c763(0x48e)+_0x4435a9);const _0x17592f=_0x303ff2[_0x12c763(0x635)][_0x12c763(0x39e)][_0x4435a9];if(!/^params\.[A-Za-z0-9_*.-]+$/['test'](_0x17592f)&&!/^query\.[A-Za-z0-9_*.-]+$/['test'](_0x17592f)&&!/^body(?:\.[A-Za-z0-9_*.-]+)?$/[_0x12c763(0x193)](_0x17592f)&&!/^headers\.[A-Za-z0-9_*.-]+$/[_0x12c763(0x193)](_0x17592f))throw new Error(_0x12c763(0x274)+_0x4aaa7b['method']+'\x20'+_0x4aaa7b[_0x12c763(0x624)]+_0x12c763(0x3ca)+_0x4435a9+':\x20'+_0x17592f);}for(const _0x38607c of _0x5f3abc){if(_0x542f46[_0x12c763(0x52e)](_0x38607c))throw new Error('Route\x20'+_0x4aaa7b['method']+'\x20'+_0x4aaa7b[_0x12c763(0x624)]+'\x20has\x20ambiguous\x20query/path\x20field:\x20'+_0x38607c);}const _0x31c212=_0x303ff2[_0x12c763(0x635)]?.['bodyMode'],_0x28eaaa=new Set([_0x12c763(0x4d6),_0x12c763(0x2c7),_0x12c763(0x40d),_0x12c763(0x416),_0x12c763(0x3d6),_0x12c763(0x1ec)]);if(!_0x28eaaa[_0x12c763(0x52e)](_0x31c212))throw new Error(_0x12c763(0x274)+_0x4aaa7b['method']+'\x20'+_0x4aaa7b['path']+_0x12c763(0x3eb)+_0x31c212);if(_0x31c212===_0x12c763(0x1ec)&&!_0x4aaa7b[_0x12c763(0x58a)]?.[_0x12c763(0x1ec)])throw new Error(_0x12c763(0x274)+_0x4aaa7b['method']+'\x20'+_0x4aaa7b[_0x12c763(0x624)]+_0x12c763(0x580));if(_0x303ff2[_0x12c763(0x79a)]?.[_0x12c763(0x5e8)]!==![]&&(_0x4aaa7b[_0x12c763(0x58a)]?.[_0x12c763(0x1ec)]||_0x4aaa7b[_0x12c763(0x58a)]?.['sse']||_0x303ff2[_0x12c763(0x635)]?.['transport']===_0x12c763(0x246)))throw new Error(_0x12c763(0x274)+_0x4aaa7b[_0x12c763(0x5e0)]+'\x20'+_0x4aaa7b[_0x12c763(0x624)]+'\x20cannot\x20be\x20MCP-exposed\x20without\x20an\x20explicit\x20adapter\x20because\x20it\x20uses\x20'+_0x303ff2[_0x12c763(0x635)]?.['transport']);const _0x407e7f=Object[_0x12c763(0x2ac)](_0x44eb75)[_0x12c763(0x1ff)](_0x244cd3=>{const _0x5430f5=_0x12c763;if(_0x542f46[_0x5430f5(0x52e)](_0x244cd3))return![];if(_0x5f3abc[_0x5430f5(0x52e)](_0x244cd3))return![];if(_0x2cf793[_0x5430f5(0x52e)](_0x244cd3))return![];return!![];});if(_0x31c212===_0x12c763(0x4d6)&&_0x407e7f['length']>0x0)throw new Error('Route\x20'+_0x4aaa7b[_0x12c763(0x5e0)]+'\x20'+_0x4aaa7b[_0x12c763(0x624)]+_0x12c763(0x3cd)+_0x407e7f[_0x12c763(0x29f)](',\x20'));}function _0x2ee970(_0x7b0413){const _0x327e6b=_0xfbb2ca;if(Array[_0x327e6b(0x65e)](_0x7b0413))return _0x7b0413;if(_0x7b0413==null)return[];return[_0x7b0413];}function _0x29deac(_0x5ba19e,_0x42601a){const _0x57d72c=_0xfbb2ca;return _0x2ee970(_0x5ba19e?.[_0x57d72c(0x5e4)])[_0x57d72c(0x1dc)](_0x42601a);}function _0x526f56(_0x1b60ce,_0x2376f4){const _0x183015=_0xfbb2ca;if(_0x1b60ce==null||typeof _0x1b60ce!==_0x183015(0x44e))return _0x1b60ce;const _0x535503=_0x2ee970(_0x2376f4?.[_0x183015(0x5e4)]);if(_0x535503['length']===0x0)return _0x1b60ce;if(_0x535503[_0x183015(0x1dc)]('null')&&_0x1b60ce===_0x183015(0x750))return null;if(_0x535503['includes'](_0x183015(0x6ff))){if(_0x1b60ce===_0x183015(0x47d))return!![];if(_0x1b60ce==='false')return![];}if(_0x535503[_0x183015(0x1dc)](_0x183015(0x3e7))&&/^-?\d+$/[_0x183015(0x193)](_0x1b60ce))return Number[_0x183015(0x455)](_0x1b60ce,0xa);if(_0x535503[_0x183015(0x1dc)](_0x183015(0x6e3))&&/^-?(?:\d+|\d*\.\d+)$/['test'](_0x1b60ce))return Number(_0x1b60ce);return _0x1b60ce;}function _0x333d49(_0x3a83b9){return _0x31da51(_0x3a83b9);}function _0x16bfff(_0x151723,_0x5e7f67={},_0x1b104a={},_0x5172c1=null,_0x13ef87={}){const _0x5094d7=_0xfbb2ca,_0x3d482b=_0x151723?.[_0x5094d7(0x71e)];if(!_0x3d482b?.[_0x5094d7(0x2ef)]||!_0x3d482b[_0x5094d7(0x484)])return null;const _0xaa8526=_0x3d482b['inputSchema'][_0x5094d7(0x5f7)]||{},_0x458b1e=_0x3d482b[_0x5094d7(0x635)]?.[_0x5094d7(0x314)]?.[_0x5094d7(0x5f7)]||{},_0x351011=_0x3d482b[_0x5094d7(0x635)]?.[_0x5094d7(0x39e)]||{},_0x18bb18=new Set((_0x3d482b[_0x5094d7(0x29c)]||[])[_0x5094d7(0x626)](_0x5435c4=>_0x5435c4['name'])),_0x38b86b=new Set(Object[_0x5094d7(0x2ac)](_0x458b1e)),_0x167bad={};for(const [_0x326bb7,_0x3bef7f]of Object[_0x5094d7(0x62b)](_0xaa8526)){Object['prototype'][_0x5094d7(0x46b)][_0x5094d7(0x668)](_0x3bef7f||{},'default')&&(_0x167bad[_0x326bb7]=_0x333d49(_0x3bef7f[_0x5094d7(0x445)]));}for(const _0x28f24c of _0x3d482b[_0x5094d7(0x29c)]||[]){if(!Object['prototype'][_0x5094d7(0x46b)][_0x5094d7(0x668)](_0x5e7f67,_0x28f24c[_0x5094d7(0x378)]))continue;const _0x20dcaa=_0xaa8526[_0x28f24c[_0x5094d7(0x378)]]||{};_0x167bad[_0x28f24c[_0x5094d7(0x378)]]=_0x526f56(_0x5e7f67[_0x28f24c['name']],_0x20dcaa);}for(const [_0x59fc17,_0x564a29]of Object[_0x5094d7(0x62b)](_0x458b1e)){if(!Object[_0x5094d7(0x359)][_0x5094d7(0x46b)]['call'](_0x1b104a,_0x59fc17))continue;_0x167bad[_0x59fc17]=_0x526f56(_0x1b104a[_0x59fc17],_0x564a29||_0xaa8526[_0x59fc17]||{});}for(const [_0x235439,_0x4c2e62]of Object[_0x5094d7(0x62b)](_0x351011)){if(typeof _0x4c2e62!==_0x5094d7(0x44e))continue;let _0x138f2e;if(_0x4c2e62[_0x5094d7(0x637)](_0x5094d7(0x30d)))_0x138f2e=_0x5e7f67[_0x4c2e62[_0x5094d7(0x5b8)](0x7)];else{if(_0x4c2e62[_0x5094d7(0x637)](_0x5094d7(0x296)))_0x138f2e=_0x1b104a[_0x4c2e62[_0x5094d7(0x5b8)](0x6)];else{if(_0x4c2e62===_0x5094d7(0x505))_0x138f2e=_0x5172c1;else{if(_0x4c2e62[_0x5094d7(0x637)](_0x5094d7(0x399)))_0x138f2e=_0x5172c1?.[_0x4c2e62[_0x5094d7(0x5b8)](0x5)];else{if(_0x4c2e62[_0x5094d7(0x637)](_0x5094d7(0x31b)))_0x138f2e=_0x13ef87?.[_0x4c2e62['slice'](0x8)['toLowerCase']()]??_0x13ef87?.[_0x4c2e62[_0x5094d7(0x5b8)](0x8)];}}}}if(_0x138f2e!==undefined)_0x167bad[_0x235439]=_0x138f2e;}const _0x25ce43=_0x3d482b[_0x5094d7(0x635)]?.['bodyMode'];if(_0x25ce43!==_0x5094d7(0x4d6)&&_0x25ce43!==_0x5094d7(0x1ec)&&_0x5172c1!=null){if(_0x25ce43===_0x5094d7(0x40d))for(const [_0x1e8407,_0x27659d]of Object[_0x5094d7(0x62b)](_0xaa8526)){if(_0x18bb18[_0x5094d7(0x52e)](_0x1e8407)||_0x38b86b[_0x5094d7(0x52e)](_0x1e8407)||Object[_0x5094d7(0x359)][_0x5094d7(0x46b)][_0x5094d7(0x668)](_0x351011,_0x1e8407))continue;if(Object['prototype'][_0x5094d7(0x46b)][_0x5094d7(0x668)](_0x5172c1,_0x1e8407))_0x167bad[_0x1e8407]=_0x5172c1[_0x1e8407];else{if(_0x29deac(_0x27659d,_0x5094d7(0x40d)))_0x167bad[_0x1e8407]=_0x5172c1;}}else for(const [_0x3ed765,_0x3b57f3]of Object[_0x5094d7(0x62b)](_0x5172c1)){if(_0x18bb18[_0x5094d7(0x52e)](_0x3ed765)||_0x38b86b[_0x5094d7(0x52e)](_0x3ed765)||Object[_0x5094d7(0x359)][_0x5094d7(0x46b)][_0x5094d7(0x668)](_0x351011,_0x3ed765))continue;_0x167bad[_0x3ed765]=_0x3b57f3;}}return _0x167bad;}function _0x3b6278(_0x582ffd,_0xc81b7b,_0x48bbf5,_0x52083d){const _0x415735=_0xfbb2ca;if(!_0xc81b7b)return;const _0x429ea6=_0x2ee970(_0xc81b7b[_0x415735(0x5e4)]);if(_0x582ffd===undefined)return;if(_0x582ffd===null){_0x429ea6[_0x415735(0x503)]>0x0&&!_0x429ea6[_0x415735(0x1dc)](_0x415735(0x750))&&_0x52083d['push']({'field':_0x48bbf5,'message':'must\x20not\x20be\x20null','expected':_0x429ea6[_0x415735(0x29f)]('|'),'actual':null});return;}if(_0x429ea6[_0x415735(0x503)]===0x0)return;const _0x4dd251=_0x429ea6['some'](_0x951319=>{const _0x3691a7=_0x415735;switch(_0x951319){case _0x3691a7(0x44e):return typeof _0x582ffd==='string';case'integer':return Number[_0x3691a7(0x636)](_0x582ffd);case _0x3691a7(0x6e3):return typeof _0x582ffd===_0x3691a7(0x6e3)&&Number['isFinite'](_0x582ffd);case _0x3691a7(0x6ff):return typeof _0x582ffd===_0x3691a7(0x6ff);case _0x3691a7(0x40d):return _0x582ffd&&typeof _0x582ffd===_0x3691a7(0x40d)&&!Array['isArray'](_0x582ffd);case'array':return Array[_0x3691a7(0x65e)](_0x582ffd);case _0x3691a7(0x750):return _0x582ffd===null;default:return!![];}});if(!_0x4dd251){_0x52083d['push']({'field':_0x48bbf5,'message':_0x415735(0x73e)+_0x429ea6[_0x415735(0x29f)]('|'),'expected':_0x429ea6['join']('|'),'actual':_0x582ffd});return;}Array[_0x415735(0x65e)](_0x582ffd)&&_0xc81b7b[_0x415735(0x77e)]&&_0x582ffd[_0x415735(0x5c0)]((_0x55fe0d,_0x466695)=>_0x3b6278(_0x55fe0d,_0xc81b7b['items'],_0x48bbf5+'['+_0x466695+']',_0x52083d));}function _0x4e77a5(_0x22cae5,_0x5a35fa){const _0x1090eb=_0xfbb2ca,_0x248b52=_0x22cae5?.[_0x1090eb(0x71e)];if(!_0x248b52?.['hasCanonical']||!_0x248b52[_0x1090eb(0x484)])return null;const _0x22eb73=_0x248b52['inputSchema'],_0x586036=_0x22eb73[_0x1090eb(0x5f7)]||{},_0x468cbb=new Set(_0x22eb73[_0x1090eb(0x20a)]||[]),_0x2f7a4a=[];for(const _0x4c6817 of _0x468cbb){_0x5a35fa[_0x4c6817]===undefined&&_0x2f7a4a[_0x1090eb(0x387)]({'field':_0x4c6817,'message':_0x1090eb(0x2aa),'expected':_0x1090eb(0x241),'actual':undefined});}if(_0x22eb73[_0x1090eb(0x6bb)]===![])for(const _0x380de2 of Object[_0x1090eb(0x2ac)](_0x5a35fa||{})){!Object[_0x1090eb(0x359)]['hasOwnProperty'][_0x1090eb(0x668)](_0x586036,_0x380de2)&&_0x2f7a4a[_0x1090eb(0x387)]({'field':_0x380de2,'message':_0x1090eb(0x1ae),'expected':'known\x20field','actual':_0x5a35fa[_0x380de2]});}for(const [_0x34fc5,_0x12a1f2]of Object['entries'](_0x586036)){_0x3b6278(_0x5a35fa[_0x34fc5],_0x12a1f2,_0x34fc5,_0x2f7a4a);}if(_0x2f7a4a[_0x1090eb(0x503)]===0x0)return null;return{'code':_0x1090eb(0x78e),'errors':_0x2f7a4a};}function _0x29d205(_0x194b3c=[]){const _0x271442=_0xfbb2ca;if(!Array['isArray'](_0x194b3c)||_0x194b3c['length']===0x0)return null;const _0x1bedd2=_0x194b3c[_0x271442(0x5b8)](0x0,0x3)[_0x271442(0x626)]((_0x371c3b={})=>{const _0x134a8e=_0x271442,_0x15e393=_0x371c3b[_0x134a8e(0x629)]?_0x371c3b[_0x134a8e(0x629)]+'\x20':'';return(''+_0x15e393+(_0x371c3b['message']||_0x134a8e(0x74b)))[_0x134a8e(0x6f3)]();})[_0x271442(0x29f)](';\x20');return _0x194b3c[_0x271442(0x503)]>0x3?_0x1bedd2+_0x271442(0x2c9)+(_0x194b3c[_0x271442(0x503)]-0x3)+'\x20more)':_0x1bedd2;}function _0x433e5a(_0xb59b09,_0x3385b5={}){const _0x1e551d=_0xfbb2ca,_0x15a36c=_0x3385b5?.[_0x1e551d(0x401)]?.[_0x1e551d(0x5b7)]??_0x3385b5?.[_0x1e551d(0x5b7)]??_0x1e551d(0x56f),_0x3cab27=_0x3385b5?.['result']?.['details']??_0x3385b5?.['details']??_0x15a36c?.[_0x1e551d(0x491)]??null,_0x40ccff=_0x3385b5?.[_0x1e551d(0x401)]?.[_0x1e551d(0x2a0)]??_0x3385b5?.[_0x1e551d(0x2a0)]??_0x15a36c?.[_0x1e551d(0x2a0)]??null,_0x3314fb=_0x3385b5?.['result']?.['message']??_0x3385b5?.[_0x1e551d(0x1e0)]??_0x15a36c?.[_0x1e551d(0x1e0)]??null,_0x184a14=typeof _0x15a36c===_0x1e551d(0x44e)?_0x15a36c:null,_0x4ea753=typeof _0x184a14===_0x1e551d(0x44e)&&/^[A-Z0-9_]+$/[_0x1e551d(0x193)](_0x184a14),_0x522108=_0x40ccff??(_0x4ea753?_0x184a14:null)??(_0x28c109[_0xb59b09]||_0x1e551d(0x700)+_0xb59b09);let _0x173e78=_0x3314fb;!_0x173e78&&typeof _0x184a14===_0x1e551d(0x44e)&&!_0x4ea753&&(_0x173e78=_0x184a14);if(!_0x173e78&&_0x522108===_0x1e551d(0x78e)){const _0x5aa657=_0x29d205(_0x3cab27);_0x173e78=_0x5aa657?_0x1e551d(0x226)+_0x5aa657:_0x1e551d(0x469);}if(!_0x173e78&&Array['isArray'](_0x3cab27)&&_0x3cab27[_0x1e551d(0x503)]>0x0){const _0x24aee8=_0x29d205(_0x3cab27);if(_0x24aee8)_0x173e78=_0x24aee8;}if(!_0x173e78)_0x173e78=_0x28c109[_0xb59b09]||_0x1e551d(0x56f);const _0xc3a241={'code':_0x522108,'message':_0x173e78};if(_0x3cab27!=null)_0xc3a241[_0x1e551d(0x491)]=_0x3cab27;return _0xc3a241;}function _0x464a4b(_0x1324fb){const _0x21e993=_0xfbb2ca,_0x185c93={};if(!_0x1324fb)return _0x185c93;for(const _0x39bb62 of _0x1324fb[_0x21e993(0x3d5)](';')){const _0x1b0664=_0x39bb62['indexOf']('=');if(_0x1b0664===-0x1)continue;const _0x81a99b=_0x39bb62[_0x21e993(0x5b8)](0x0,_0x1b0664)[_0x21e993(0x6f3)](),_0x5a034b=_0x39bb62[_0x21e993(0x5b8)](_0x1b0664+0x1)[_0x21e993(0x6f3)]();_0x185c93[_0x81a99b]=decodeURIComponent(_0x5a034b);}return _0x185c93;}function _0x51a60c(_0xd9f7b5,_0x2f2741){const _0x56964a=_0xfbb2ca;return _0x2f2741=_0x446cee(_0x2f2741),{'status':_0x2f2741['status']??_0xd9f7b5[_0x56964a(0x7a3)],'headers':{..._0xd9f7b5[_0x56964a(0x786)]||{},..._0x2f2741[_0x56964a(0x786)]||{}},'body':_0x2f2741[_0x56964a(0x505)]??_0xd9f7b5['body']};}function _0x36494b(_0xfe9112={}){const _0x259523=_0xfbb2ca;return _0xfe9112[_0x259523(0x240)]||(_0xfe9112['internal']?'internal':_0x259523(0x635));}function _0xe74527(_0x3d2368){const _0x29b4ae=_0xfbb2ca;if(_0x3d2368[_0x29b4ae(0x2e9)]?.['internal']===!![])return!![];if(_0x3d2368[_0x29b4ae(0x2e9)]?.[_0x29b4ae(0x1c4)]?.[_0x29b4ae(0x48a)]===!![])return!![];if(_0x3d2368['context']?.[_0x29b4ae(0x1c4)]?.['ok']===!![])return!![];return![];}function _0x218674(_0x15ab97,_0x178ee4){const _0x5e340c=_0xfbb2ca,_0x4a0a63=_0x178ee4[_0x5e340c(0x3d5)]('.');let _0x38b701=_0x15ab97;for(const _0x5e7860 of _0x4a0a63){_0x38b701=_0x38b701?.[_0x5e7860];}return _0x38b701||null;}class _0xfbcc42{constructor(){const _0x3a30f1=_0xfbb2ca;this['middlewares']=[],this[_0x3a30f1(0x69b)]=[],this[_0x3a30f1(0x654)]=[],this['maxBodyBytes']=0x5*0x400*0x400,this[_0x3a30f1(0x492)]=null,this['servers']=[],this[_0x3a30f1(0x655)]=new Set(),this[_0x3a30f1(0x1c4)]={'cookieName':_0x3a30f1(0x5af),'stateCookieName':_0x3a30f1(0x1cc),'csrfCookieName':_0x3a30f1(0x660)},this[_0x3a30f1(0x212)]={},this[_0x3a30f1(0x4b1)]=new Map(),this['_oidcDiscoveryCache']=null,this[_0x3a30f1(0x553)]=null,this[_0x3a30f1(0x76b)]=new Map(),this[_0x3a30f1(0x57b)]=new _0x229063(),this[_0x3a30f1(0x36b)]=![],this[_0x3a30f1(0x507)]=0x0;}['configureAuth'](_0xb2a471={}){const _0x369b7b=_0xfbb2ca;return this['_authOptions']=_0xb2a471||{},this[_0x369b7b(0x555)]=_0xb2a471[_0x369b7b(0x4f5)]??'open',this['_authOptions'];}get[_0xfbb2ca(0x428)](){const _0x17b295=_0xfbb2ca;if(this[_0x17b295(0x243)]?.[_0x17b295(0x1c4)])return this['_okdb'][_0x17b295(0x1c4)][_0x17b295(0x428)];return![];}['getAuthOptions'](){const _0xf82de3=_0xfbb2ca;if(this['_okdb']?.[_0xf82de3(0x1c4)])return this[_0xf82de3(0x243)]['auth'][_0xf82de3(0x46c)]();return this[_0xf82de3(0x212)]||{};}[_0xfbb2ca(0x680)](_0x30c835){const _0x2e47ec=_0xfbb2ca;this['middlewares'][_0x2e47ec(0x387)](_0x30c835);}[_0xfbb2ca(0x60c)](_0x254475,_0x419955){const _0x348b82=_0xfbb2ca;this[_0x348b82(0x69b)][_0x348b82(0x387)]({'match':_0x254475,'handler':_0x419955});}[_0xfbb2ca(0x4d2)](_0xd1d977,_0x217cb0,_0xb8d107,_0x3f7479={}){const _0x4680f6=_0xfbb2ca,_0x4f7323={'method':_0x52d75c(_0xd1d977),'path':_0x217cb0,'matcher':_0x570044(_0x217cb0),'handler':_0xb8d107,'meta':_0x3f7479||{}},_0xeb774=_0x26cb08(_0x4f7323);_0x17afbb(_0x4f7323,_0xeb774),_0x4f7323['operation']=_0xeb774,_0x4f7323[_0x4680f6(0x690)]=this['_userPhase']===!![];if(_0x4f7323['userAdded'])this['_userRouteCount']++;this[_0x4680f6(0x654)][_0x4680f6(0x387)](_0x4f7323);}[_0xfbb2ca(0x6a0)](_0x20c2e0,_0x15b892,_0x343505,_0x19c9e7={}){const _0x30f0be=_0xfbb2ca;this[_0x30f0be(0x4d2)](_0x20c2e0,_0x15b892,_0x343505,{..._0x19c9e7,'raw':!![]});}[_0xfbb2ca(0x586)](_0x3d635f,_0x31cafb,{corsOnly:corsOnly=![]}={}){const _0x114a20=_0xfbb2ca;let _0x5b801f=null,_0x28be37=Infinity;for(const _0xf238a0 of this[_0x114a20(0x654)]){if(corsOnly){if(!_0xf238a0[_0x114a20(0x58a)]?.['cors'])continue;}else{if(_0xf238a0[_0x114a20(0x5e0)]!==_0x3d635f)continue;}if(!_0xf238a0[_0x114a20(0x2dc)][_0x114a20(0x70c)][_0x114a20(0x193)](_0x31cafb))continue;const _0x3027b0=_0xf238a0[_0x114a20(0x2dc)][_0x114a20(0x2ac)]?.['length']??0x0;if(_0x3027b0<_0x28be37){_0x5b801f=_0xf238a0,_0x28be37=_0x3027b0;if(_0x3027b0===0x0)break;}}return _0x5b801f;}['_matchRoute'](_0x1db78e,_0x5d6fda){const _0x3d77d4=_0xfbb2ca,_0x409717=_0x52d75c(_0x1db78e),_0x12cc0a=this[_0x3d77d4(0x586)](_0x409717,_0x5d6fda);if(_0x12cc0a)return _0x12cc0a;if(_0x409717==='OPTIONS')return this[_0x3d77d4(0x586)](_0x409717,_0x5d6fda,{'corsOnly':!![]});return null;}['_shouldWrapResponse'](_0x468bdf,_0x8e48e){const _0xb5b31c=_0xfbb2ca;if(_0x468bdf?.[_0xb5b31c(0x58a)]?.[_0xb5b31c(0x362)])return![];if(_0x8e48e?.['headers']?.[_0xb5b31c(0x62e)])return![];return!![];}['listRoutes'](){const _0x28a5f5=_0xfbb2ca;return this['routes'][_0x28a5f5(0x1ff)](_0x50d6ad=>!_0x50d6ad[_0x28a5f5(0x58a)]?.['hidden'])[_0x28a5f5(0x626)](_0xc4962d=>({'method':_0xc4962d['method'],'path':_0xc4962d[_0x28a5f5(0x624)],'defaults':_0xc4962d[_0x28a5f5(0x2dc)][_0x28a5f5(0x1a9)],'meta':_0xc4962d[_0x28a5f5(0x58a)],'operation':_0xc4962d['operation']}));}[_0xfbb2ca(0x219)](_0x23e46e,_0x1736a6,_0x26520b={}){const _0x228ce5=_0xfbb2ca,{PassThrough:_0x262382}=require$$8;this[_0x228ce5(0x4d2)](_0x228ce5(0x51c),_0x23e46e,({params:_0x3e8b7c,query:_0x53d14a,headers:_0x115838,context:_0x579ccf})=>{const _0x39c5c0=_0x228ce5,_0x40f5a0=new _0x262382();let _0x3b45ac=null;const _0x32ab47={};try{_0x579ccf?.['req']?.[_0x39c5c0(0x70e)]?.[_0x39c5c0(0x73b)](!![]);}catch{}_0x40f5a0[_0x39c5c0(0x6cc)](':\x20connected\x0a\x0a'),_0x3b45ac=setInterval(()=>{const _0x1c0aa3=_0x39c5c0;try{_0x40f5a0[_0x1c0aa3(0x6cc)](_0x1c0aa3(0x32d));}catch{}},0x3a98);const _0x3c8fc9=(_0x23ea70,_0x325eeb,_0xc9a2e5={})=>{const _0xd41daf=_0x39c5c0;try{const _0x11c006=_0xc9a2e5[_0xd41daf(0x1ec)]?String(_0x325eeb??''):JSON[_0xd41daf(0x72f)](_0x325eeb);_0xc9a2e5['id']!=null&&_0x40f5a0[_0xd41daf(0x6cc)](_0xd41daf(0x5f4)+_0xc9a2e5['id']+'\x0a');_0x40f5a0['write']('event:\x20'+_0x23ea70+'\x0a');for(const _0x21cc71 of _0x11c006['split']('\x0a')){_0x40f5a0['write'](_0xd41daf(0x3ae)+_0x21cc71+'\x0a');}_0x40f5a0['write']('\x0a');}catch{}},_0x2f0c59=()=>{const _0x551777=_0x39c5c0;_0x3b45ac&&(clearInterval(_0x3b45ac),_0x3b45ac=null);try{_0x40f5a0[_0x551777(0x224)]();}catch{}},_0x2e4781=(_0x4d73ee,_0x3f75ca)=>{_0x32ab47[_0x4d73ee]=_0x3f75ca;};_0x579ccf?.[_0x39c5c0(0x682)]?.['on'](_0x39c5c0(0x543),_0x2f0c59),_0x40f5a0['on']('close',_0x2f0c59);if(_0x579ccf?.[_0x39c5c0(0x1c4)]&&_0x579ccf[_0x39c5c0(0x1c4)]['open']!==!![]&&_0x579ccf['auth'][_0x39c5c0(0x48a)]){const _0x199ef6={'headers':_0x115838??{},'cookies':_0x464a4b(_0x115838?.['cookie']),'context':{},'socket':_0x579ccf?.[_0x39c5c0(0x682)]?.[_0x39c5c0(0x70e)]??{'remoteAddress':null}},_0x55f438=setInterval(async()=>{const _0x3a14cd=_0x39c5c0;try{const _0x6db2b7=await this[_0x3a14cd(0x544)](_0x199ef6);if(_0x6db2b7?.[_0x3a14cd(0x1bc)]===!![]||_0x6db2b7?.['isAuthenticated'])return;_0x3c8fc9(_0x3a14cd(0x1c4),{'expired':!![]}),_0x2f0c59();}catch{_0x2f0c59();}},0xea60);_0x55f438[_0x39c5c0(0x442)]?.(),_0x40f5a0['on'](_0x39c5c0(0x543),()=>clearInterval(_0x55f438));}const _0x253853=_0x1736a6({'send':_0x3c8fc9,'close':_0x2f0c59,'params':_0x3e8b7c??{},'query':_0x53d14a??{},'headers':_0x115838??{},'context':_0x579ccf,'setHeader':_0x2e4781});return typeof _0x253853==='function'&&_0x40f5a0['on'](_0x39c5c0(0x543),_0x253853),{'status':0xc8,'headers':{'content-type':_0x39c5c0(0x727),'cache-control':'no-cache,\x20no-transform','connection':_0x39c5c0(0x6a3),'x-accel-buffering':'no',..._0x32ab47},'body':_0x40f5a0};},{..._0x26520b,'sse':!![]});}async[_0xfbb2ca(0x58d)](_0x200245,_0x2f1008){const _0x15c71a=_0xfbb2ca;for(const _0x27ff24 of this['guards']){if(!_0x27ff24[_0x15c71a(0x3c0)](_0x200245))continue;const _0x1a4c8d=await _0x27ff24[_0x15c71a(0x576)](_0x200245,_0x2f1008);if(_0x1a4c8d===![])return![];}return!![];}async['_runMiddlewares'](_0x3a80fc,_0x3af970,_0x138c7c){let _0x1185ad=0x0;const _0x32afdb=async()=>{const _0x2fffd7=_0x4307,_0x35a182=this[_0x2fffd7(0x75d)][_0x1185ad++];if(!_0x35a182)return _0x138c7c();return _0x35a182(_0x3a80fc,_0x3af970,_0x32afdb);};return _0x32afdb();}[_0xfbb2ca(0x602)](_0x1f3e7e,_0x11cdcd){const _0x7d47f0=_0xfbb2ca,{status:status=0xc8,headers:headers={},body:_0x54e973}=_0x1f3e7e;if(status>=0x12c&&status<0x190)return _0x1f3e7e;if(_0x284df2(_0x54e973))return _0x1f3e7e;if(Buffer[_0x7d47f0(0x464)](_0x54e973))return _0x1f3e7e;if(typeof _0x54e973===_0x7d47f0(0x44e))return _0x1f3e7e;const _0x110020={'time':+_0x11cdcd[_0x7d47f0(0x6cb)](0x2)};if(_0x54e973?.[_0x7d47f0(0x58a)]&&typeof _0x54e973[_0x7d47f0(0x58a)]===_0x7d47f0(0x40d)){const {time:_0x23fb7a,..._0x38bfe8}=_0x54e973['meta'];Object['assign'](_0x110020,_0x38bfe8);}let _0x228c29;if(status>=0x190){const _0x425b43=_0x433e5a(status,_0x54e973);_0x228c29={'data':null,'error':_0x425b43,'meta':_0x110020};}else{if(status===0xcc||_0x54e973==null)_0x228c29={'data':null,'error':null,'meta':_0x110020};else{let _0x1bfc39;if(_0x7d47f0(0x401)in _0x54e973)_0x1bfc39=_0x54e973[_0x7d47f0(0x401)];else{const {meta:_0x391137,..._0x2de4db}=_0x54e973;_0x1bfc39=Object['keys'](_0x2de4db)[_0x7d47f0(0x503)]>0x0?_0x2de4db:null;}_0x228c29={'data':_0x1bfc39,'error':null,'meta':_0x110020};}}return{'status':status===0xcc?0xc8:status,'headers':headers,'body':_0x228c29};}async[_0xfbb2ca(0x435)](_0xc07b91,_0x51f4d2,_0x346e0c={},_0x38cac5={}){const _0xb9cd8e=_0xfbb2ca;_0xc07b91=_0x52d75c(_0xc07b91);const _0x31868b=this[_0xb9cd8e(0x407)](_0xc07b91,_0x51f4d2),_0x566573={'method':_0xc07b91,'path':_0x51f4d2,'headers':_0x346e0c[_0xb9cd8e(0x786)]??{},'body':_0x346e0c[_0xb9cd8e(0x505)]??null,'query':_0x346e0c[_0xb9cd8e(0x347)]??{},'context':_0x38cac5,'cookies':_0x464a4b(_0x346e0c[_0xb9cd8e(0x786)]?.[_0xb9cd8e(0x29b)]),'route':_0x31868b,'socket':{'remoteAddress':_0x346e0c[_0xb9cd8e(0x222)]??_0xb9cd8e(0x289)}};_0x566573['context']=_0x566573[_0xb9cd8e(0x2e9)]||{};!_0x566573[_0xb9cd8e(0x2e9)][_0xb9cd8e(0x1c4)]&&(_0x566573[_0xb9cd8e(0x2e9)][_0xb9cd8e(0x1c4)]=await this[_0xb9cd8e(0x544)](_0x566573));if(_0x566573['context'][_0xb9cd8e(0x1c4)]?.['bootstrapBlocked'])return _0x446cee({'status':0x193,'body':{'error':{'code':_0xb9cd8e(0x764),'message':'Server\x20is\x20in\x20bootstrap\x20mode\x20and\x20only\x20accepts\x20localhost\x20connections\x20until\x20the\x20first\x20token\x20is\x20created.'}}});_0x566573[_0xb9cd8e(0x2e9)]['auth']?.[_0xb9cd8e(0x76c)]&&!_0x566573[_0xb9cd8e(0x2e9)]['user']&&(_0x566573[_0xb9cd8e(0x2e9)][_0xb9cd8e(0x76c)]=_0x566573['context'][_0xb9cd8e(0x1c4)][_0xb9cd8e(0x76c)]);let _0x4cc598=null;const _0x55d035={'status'(_0x2a86d1){_0x4cc598=_0x4cc598||{},_0x4cc598['status']=_0x2a86d1;},'setHeader'(_0x37d70e,_0x2596b6){const _0x2f5900=_0xb9cd8e;_0x4cc598=_0x4cc598||{},_0x4cc598['headers']=_0x4cc598[_0x2f5900(0x786)]||{};const _0x53bb68=String(_0x37d70e)[_0x2f5900(0x4ff)]();if(_0x53bb68===_0x2f5900(0x1b9)){const _0x31e676=_0x4cc598[_0x2f5900(0x786)][_0x37d70e];if(!_0x31e676)_0x4cc598[_0x2f5900(0x786)][_0x37d70e]=_0x2596b6;else{if(Array[_0x2f5900(0x65e)](_0x31e676))_0x31e676[_0x2f5900(0x387)](_0x2596b6);else _0x4cc598[_0x2f5900(0x786)][_0x37d70e]=[_0x31e676,_0x2596b6];}return;}_0x4cc598[_0x2f5900(0x786)][_0x37d70e]=_0x2596b6;},'send'(_0x187c37){const _0x18f358=_0xb9cd8e;_0x4cc598=_0x4cc598||{},_0x4cc598[_0x18f358(0x505)]=_0x187c37;}},_0x16fa67=await this['_runGuards'](_0x566573,_0x55d035);if(!_0x16fa67)return _0x446cee(_0x4cc598??{'status':0x193});const _0x2faf4d=this[_0xb9cd8e(0x35b)](_0x566573);if(_0x2faf4d)return _0x446cee(_0x2faf4d);const _0x1ff170=this[_0xb9cd8e(0x2f1)](_0x566573);if(_0x1ff170)return _0x446cee(_0x1ff170);return await this[_0xb9cd8e(0x4f8)](_0x566573,_0x55d035,async()=>{const _0x315084=_0xb9cd8e,_0x12f35d=await this[_0x315084(0x78b)](_0x566573);if(_0x4cc598==null){_0x4cc598=_0x12f35d;return;}_0x4cc598=_0x51a60c(_0x4cc598,_0x12f35d);}),_0x446cee(_0x4cc598);}[_0xfbb2ca(0x35b)](_0x5ac52a){const _0x33ed90=_0xfbb2ca,_0x41f7f5=_0x5ac52a[_0x33ed90(0x4a4)]?.[_0x33ed90(0x71e)],_0x330ab4=_0x41f7f5?.[_0x33ed90(0x28d)];if(!_0x41f7f5?.[_0x33ed90(0x2ef)]||!_0x330ab4)return null;if(_0x5ac52a[_0x33ed90(0x2e9)]?.[_0x33ed90(0x1c4)]?.[_0x33ed90(0x1bc)]===!![]||_0x5ac52a['context']?.['auth']?.['isSystem']===!![])return null;const _0x1d2e19=_0x36494b(_0x5ac52a[_0x33ed90(0x2e9)]),_0x836c3c=Array['isArray'](_0x330ab4[_0x33ed90(0x4d3)])?_0x330ab4[_0x33ed90(0x4d3)]:null;if(_0x330ab4[_0x33ed90(0x32a)]&&_0x5ac52a['context']?.[_0x33ed90(0x7a2)]!==!![])return{'status':0x193,'body':{'error':_0x33ed90(0x2e8)}};if(_0x836c3c&&_0x836c3c[_0x33ed90(0x503)]>0x0&&!_0x836c3c[_0x33ed90(0x1dc)](_0x1d2e19)&&!(_0x1d2e19===_0x33ed90(0x7a2)&&_0x836c3c['includes'](_0x33ed90(0x5c2))))return{'status':0x193,'body':{'error':_0x33ed90(0x2e8)}};if(_0x330ab4['authRequired']&&!_0xe74527(_0x5ac52a))return{'status':0x191,'body':{'error':_0x33ed90(0x3a5)}};const _0x4d325a=_0x330ab4[_0x33ed90(0x638)];if(!_0x4d325a)return null;if(_0x5ac52a[_0x33ed90(0x2e9)]?.['auth']?.[_0x33ed90(0x5e4)]===_0x33ed90(0x34c))return null;const _0x24dafb=_0x5ac52a[_0x33ed90(0x2e9)]?.[_0x33ed90(0x1c4)]?.[_0x33ed90(0x4ca)];if(!_0x24dafb){if(_0x5ac52a[_0x33ed90(0x2e9)]?.['auth']?.['ok']===!![])return null;return{'status':0x193,'body':{'error':_0x33ed90(0x2e6)}};}if(!_0x5ac52a[_0x33ed90(0x639)]&&_0x5ac52a[_0x33ed90(0x4a4)]?.[_0x33ed90(0x2dc)]){const _0x5472d0=_0x5ac52a[_0x33ed90(0x4a4)][_0x33ed90(0x2dc)]['regex']['exec'](_0x5ac52a[_0x33ed90(0x624)]);_0x5472d0&&(_0x5ac52a['params']={},_0x5ac52a[_0x33ed90(0x4a4)][_0x33ed90(0x2dc)][_0x33ed90(0x2ac)][_0x33ed90(0x5c0)]((_0x62e121,_0x17d597)=>{const _0x24545d=_0x33ed90,_0x4d0aad=_0x5472d0[_0x17d597+0x1];_0x5ac52a[_0x24545d(0x639)][_0x62e121]=_0x4d0aad?decodeURIComponent(_0x4d0aad):_0x5ac52a['route'][_0x24545d(0x2dc)][_0x24545d(0x1a9)][_0x62e121]??undefined;}));}let _0x206d52=null;_0x330ab4[_0x33ed90(0x71c)]?.[_0x33ed90(0x758)]&&(_0x206d52=_0x218674(_0x5ac52a,_0x330ab4[_0x33ed90(0x71c)][_0x33ed90(0x758)]));if(_0x206d52&&_0x206d52[_0x33ed90(0x637)]('~')){const _0x3a1832=_0x34217e(_0x4d325a),_0x4f350b=_0x999112(_0x24dafb[_0x33ed90(0x78a)]||[],(_0x24dafb[_0x33ed90(0x204)]||{})[_0x206d52]||[]);if(!_0x5f398e(_0x4f350b,_0x3a1832))return{'status':0x193,'body':{'error':_0x33ed90(0x48b)+_0x3a1832+_0x33ed90(0x3c8)}};}const _0x1a7f61=_0x999112(_0x24dafb[_0x33ed90(0x78a)]||[],_0x206d52?(_0x24dafb[_0x33ed90(0x204)]||{})[_0x206d52]||[]:[]);if(!_0x5f398e(_0x1a7f61,_0x4d325a))return{'status':0x193,'body':{'error':_0x33ed90(0x48b)+_0x4d325a}};return null;}[_0xfbb2ca(0x2f1)](_0x2d6692){const _0x258c04=_0xfbb2ca,_0x13998a=_0x2d6692[_0x258c04(0x4a4)],_0x5f2aef=_0x13998a?.['operation'];if(!_0x5f2aef?.[_0x258c04(0x2ef)]||!_0x5f2aef['inputSchema'])return null;let _0x216ff2=_0x2d6692[_0x258c04(0x639)]??null;if(!_0x216ff2&&_0x13998a?.[_0x258c04(0x2dc)]){const _0x12d97a=_0x13998a[_0x258c04(0x2dc)][_0x258c04(0x70c)]['exec'](_0x2d6692[_0x258c04(0x624)]);_0x12d97a&&(_0x216ff2={},_0x13998a[_0x258c04(0x2dc)][_0x258c04(0x2ac)]['forEach']((_0x2675e0,_0x4951d8)=>{const _0x492177=_0x258c04,_0xdf68d0=_0x12d97a[_0x4951d8+0x1];_0x216ff2[_0x2675e0]=_0xdf68d0?decodeURIComponent(_0xdf68d0):_0x13998a[_0x492177(0x2dc)][_0x492177(0x1a9)][_0x2675e0]??undefined;}));}const _0x1841f4=_0x16bfff(_0x13998a,_0x216ff2??{},_0x2d6692[_0x258c04(0x347)]??{},_0x2d6692[_0x258c04(0x505)],_0x2d6692[_0x258c04(0x786)]??{}),_0x5ed9fd=_0x4e77a5(_0x13998a,_0x1841f4||{});if(!_0x5ed9fd)return null;const _0x1e8fdc=_0x29d205(_0x5ed9fd[_0x258c04(0x6db)]);return{'status':0x190,'body':{'error':_0x5ed9fd['code'],'code':_0x5ed9fd[_0x258c04(0x2a0)],'message':_0x1e8fdc?'Validation\x20failed:\x20'+_0x1e8fdc:_0x258c04(0x469),'details':_0x5ed9fd[_0x258c04(0x6db)]}};}[_0xfbb2ca(0x315)](_0x1f19ff,_0x16de92){const _0x3b7eeb=_0xfbb2ca,_0x46b67d=_0x4e77a5(_0x1f19ff,_0x16de92||{});if(!_0x46b67d)return null;return{'code':_0x46b67d[_0x3b7eeb(0x2a0)],'message':_0x29d205(_0x46b67d[_0x3b7eeb(0x6db)])?_0x3b7eeb(0x226)+_0x29d205(_0x46b67d[_0x3b7eeb(0x6db)]):_0x3b7eeb(0x469),'details':_0x46b67d[_0x3b7eeb(0x6db)]};}async[_0xfbb2ca(0x78b)](_0x22e57b){const _0x31074b=_0xfbb2ca;if(_0x22e57b[_0x31074b(0x5e0)]===_0x31074b(0x5e5)){const _0x21eafb=this[_0x31074b(0x586)]('OPTIONS',_0x22e57b[_0x31074b(0x624)],{'corsOnly':!![]});if(_0x21eafb)return{'status':0xcc,'headers':_0x2b9661(_0x22e57b['headers'],_0x21eafb[_0x31074b(0x58a)][_0x31074b(0x6c4)],_0x21eafb[_0x31074b(0x5e0)])||{}};}const _0xc75444=this[_0x31074b(0x586)](_0x22e57b['method'],_0x22e57b[_0x31074b(0x624)]);if(_0xc75444){const _0x43ae86=_0xc75444[_0x31074b(0x2dc)][_0x31074b(0x70c)][_0x31074b(0x2b9)](_0x22e57b[_0x31074b(0x624)]),_0x2d8ee2={};_0xc75444[_0x31074b(0x2dc)]['keys'][_0x31074b(0x5c0)]((_0x3e3e28,_0xd0130f)=>{const _0x1bf00e=_0x31074b,_0x1a0c59=_0x43ae86[_0xd0130f+0x1];_0x2d8ee2[_0x3e3e28]=_0x1a0c59?decodeURIComponent(_0x1a0c59):_0xc75444[_0x1bf00e(0x2dc)]['defaults'][_0x3e3e28]??undefined;}),_0x22e57b[_0x31074b(0x639)]=_0x2d8ee2;try{const _0x1bacdb=await _0xc75444[_0x31074b(0x576)]({'params':_0x2d8ee2,'body':_0x22e57b['body'],'query':_0x22e57b[_0x31074b(0x347)],'headers':_0x22e57b[_0x31074b(0x786)],'context':_0x22e57b[_0x31074b(0x2e9)]}),_0xf279b1=_0x446cee(_0x1bacdb),_0x2705d4=_0x2b9661(_0x22e57b['headers'],_0xc75444[_0x31074b(0x58a)]?.[_0x31074b(0x6c4)],_0xc75444[_0x31074b(0x5e0)]);if(!_0x2705d4)return _0xf279b1;return{..._0xf279b1,'headers':{..._0xf279b1[_0x31074b(0x786)]||{},..._0x2705d4}};}catch(_0x2984ec){const _0x17edfa=_0x2984ec?.['status']||_0x13ad4d[_0x2984ec?.[_0x31074b(0x2a0)]]||0x1f4;return{'status':_0x17edfa,'body':{'error':_0x2984ec[_0x31074b(0x1e0)]||'Internal\x20error','code':_0x2984ec?.[_0x31074b(0x2a0)]||_0x28c109[_0x17edfa]||_0x31074b(0x700)+_0x17edfa,'message':_0x2984ec?.[_0x31074b(0x1e0)]||'Internal\x20error',..._0x2984ec?.[_0x31074b(0x491)]!=null?{'details':_0x2984ec[_0x31074b(0x491)]}:{}}};}}return{'status':0x194,'body':{'error':'Not\x20Found'}};}['listen'](_0x2537ee,_0x4fd996={}){const _0x11a2e2=_0xfbb2ca;if(typeof _0x4fd996===_0x11a2e2(0x44e)||Array[_0x11a2e2(0x65e)](_0x4fd996))_0x4fd996={'host':_0x4fd996};_0x4fd996=_0x4fd996??{};const _0x44d104=Number(_0x4fd996[_0x11a2e2(0x5f3)])||0x0;if(_0x44d104>=0x1||_0x4fd996[_0x11a2e2(0x2ca)]!=null||_0x4fd996['primaryOkdb']!=null){const _0x53015c=new Error(_0x11a2e2(0x60a)+_0x11a2e2(0x1ba)+_0x11a2e2(0x75a)+_0x11a2e2(0x55a));_0x53015c[_0x11a2e2(0x2a0)]=_0x11a2e2(0x729);throw _0x53015c;}if(this[_0x11a2e2(0x492)])throw new Error(_0x11a2e2(0x4e8));const _0x4f3b9d=_0x4fd996['host']==null?[undefined]:[][_0x11a2e2(0x549)](_0x4fd996[_0x11a2e2(0x76f)]);if(!_0x4f3b9d[_0x11a2e2(0x503)]||_0x4f3b9d[_0x11a2e2(0x6ad)](_0x299392=>_0x299392!==undefined&&(typeof _0x299392!=='string'||!_0x299392))){const _0x50559a=new Error(_0x11a2e2(0x50a));_0x50559a[_0x11a2e2(0x2a0)]=_0x11a2e2(0x59c);throw _0x50559a;}_0x2537ee&&this[_0x11a2e2(0x1c4)][_0x11a2e2(0x759)]===_0x11a2e2(0x5af)&&(this[_0x11a2e2(0x1c4)]['cookieName']=_0x11a2e2(0x20c)+_0x2537ee,this[_0x11a2e2(0x243)]?.[_0x11a2e2(0x1c4)]&&(this[_0x11a2e2(0x243)]['auth'][_0x11a2e2(0x285)]=this['auth'][_0x11a2e2(0x759)]));const _0x46448b=this['_okdb']?.[_0x11a2e2(0x659)]?.[_0x11a2e2(0x1c1)]?.['logRequests']??![],_0x4e33ba=async(_0x35c845,_0x20a6a0)=>{const _0x241792=_0x11a2e2,_0xc7e926=Date[_0x241792(0x6fd)]();if(_0x46448b){const _0x543441=_0x35c845['url']||'/',_0x11457d=_0x35c845[_0x241792(0x786)]?.['authorization']?_0x35c845[_0x241792(0x786)][_0x241792(0x5b3)]['replace'](/^Bearer\s+(\S{0,8})\S*/i,_0x241792(0x36c)):'-',_0x330c29=_0x35c845[_0x241792(0x786)]?.[_0x241792(0x1d6)]||'-',_0x4f8ebf=_0x35c845[_0x241792(0x786)]?.[_0x241792(0x295)]||_0x35c845[_0x241792(0x786)]?.[_0x241792(0x3da)]||'-',_0x374ce8=_0x35c845[_0x241792(0x786)]?.[_0x241792(0x613)]||'-';process[_0x241792(0x3f5)][_0x241792(0x6cc)](_0x241792(0x32b)+_0x35c845['method'][_0x241792(0x619)](0x7)+'\x20'+_0x543441[_0x241792(0x619)](0x2d)+'\x20'+('auth='+_0x11457d+_0x241792(0x2c1)+_0x374ce8+_0x241792(0x74f)+_0x330c29+_0x241792(0x2b6)+_0x4f8ebf+'\x0a'));}try{const _0x4f2f74=new _0x112465(_0x35c845[_0x241792(0x3a8)],_0x241792(0x57d)+_0x35c845['headers'][_0x241792(0x76f)]),_0x1f04ae=this[_0x241792(0x407)](_0x35c845['method'],_0x4f2f74['pathname']),_0x54afbf=_0x1f04ae?.[_0x241792(0x58a)]?.[_0x241792(0x1ec)]===!![];if(_0x54afbf){const _0x7708de=_0x35c845[_0x241792(0x786)]?.[_0x241792(0x4af)];if(_0x7708de!=null){const _0x1833ae=Number(_0x7708de);if(Number['isFinite'](_0x1833ae)&&_0x1833ae>this['maxBodyBytes']){_0x20a6a0[_0x241792(0x558)]=0x19d,_0x20a6a0[_0x241792(0x72e)](_0x241792(0x36a));return;}}}const _0x3424a1=_0x54afbf?null:await _0x5e103f(_0x35c845,this[_0x241792(0x34d)]),_0x5674cc=_0x54afbf?_0x47de2f(_0x35c845,this['maxBodyBytes']):undefined,_0x66c7f2=await this['handle'](_0x35c845[_0x241792(0x5e0)],_0x4f2f74[_0x241792(0x570)],{'body':_0x3424a1,'query':Object[_0x241792(0x6fe)](_0x4f2f74[_0x241792(0x509)][_0x241792(0x62b)]()),'headers':_0x35c845[_0x241792(0x786)]},{'req':_0x35c845,'res':_0x20a6a0,'rawStream':_0x5674cc}),_0x3ed12c=this['_matchRoute'](_0x35c845[_0x241792(0x5e0)],_0x4f2f74[_0x241792(0x570)]),_0x3ecccd=Date[_0x241792(0x6fd)]()-_0xc7e926,_0x23e014=this[_0x241792(0x2a3)](_0x3ed12c,_0x66c7f2)?this['_wrapApiResponse'](_0x66c7f2,_0x3ecccd):_0x446cee(_0x66c7f2),_0x522f91=(_0x23e014['status']||0xc8)>=0x190;this['metrics'][_0x241792(0x67d)](_0x35c845['method'],_0x3ecccd,_0x522f91),_0x2602a8(_0x20a6a0,_0x23e014);if(_0x46448b){const _0x14845a=_0x23e014[_0x241792(0x7a3)]||0xc8,_0x59bd94=Date[_0x241792(0x6fd)]()-_0xc7e926;process[_0x241792(0x3f5)][_0x241792(0x6cc)](_0x241792(0x39f)+_0x35c845[_0x241792(0x5e0)][_0x241792(0x619)](0x7)+'\x20'+_0x4f2f74[_0x241792(0x570)][_0x241792(0x619)](0x2d)+'\x20'+_0x14845a+'\x20\x20'+_0x59bd94+_0x241792(0x294));}}catch(_0xd8bf6e){const _0x4264a7=Date[_0x241792(0x6fd)]()-_0xc7e926;this[_0x241792(0x57b)]['record'](_0x35c845['method'],_0x4264a7,!![]);const _0x1ae9e7=_0xd8bf6e?.['status']||0x1f4;_0x20a6a0[_0x241792(0x558)]=_0x1ae9e7,_0x1ae9e7===0x19d?_0x20a6a0['end']('Payload\x20too\x20large'):_0x20a6a0[_0x241792(0x72e)](_0xd8bf6e[_0x241792(0x1e0)]||'Internal\x20error');}};this[_0x11a2e2(0x37c)]=_0x4f3b9d[_0x11a2e2(0x626)](_0x3d0c73=>{const _0x5163e5=_0x11a2e2,_0x5acd93=_0x58e0c1[_0x5163e5(0x5d5)](_0x4e33ba);_0x5acd93['on'](_0x5163e5(0x2d2),_0x6535e1=>{const _0x2b465e=_0x5163e5;this['_sockets'][_0x2b465e(0x4d2)](_0x6535e1),_0x6535e1['on'](_0x2b465e(0x543),()=>this['_sockets'][_0x2b465e(0x560)](_0x6535e1));});if(_0x3d0c73===undefined)_0x5acd93[_0x5163e5(0x49b)](_0x2537ee);else _0x5acd93[_0x5163e5(0x49b)](_0x2537ee,_0x3d0c73);return _0x5acd93;}),this['server']=this[_0x11a2e2(0x37c)][0x0];for(const _0x6712c8 of this[_0x11a2e2(0x37c)]['slice'](0x1))_0x6712c8['on'](_0x11a2e2(0x5b7),_0x9fac6c=>this[_0x11a2e2(0x492)]?.[_0x11a2e2(0x41f)](_0x11a2e2(0x5b7),_0x9fac6c));const _0x547a37=_0x242381(_0x2537ee,_0x4fd996[_0x11a2e2(0x76f)]),_0x4dcfb4=this[_0x11a2e2(0x243)];return _0x4dcfb4?.[_0x11a2e2(0x721)]&&(_0x4dcfb4['processes'][_0x11a2e2(0x322)](_0x547a37),require$$1$2[_0x11a2e2(0x698)]?_0x4dcfb4[_0x11a2e2(0x3c4)]?.({'kind':_0x11a2e2(0x5ea)})[_0x11a2e2(0x628)](()=>{}):_0x4dcfb4[_0x11a2e2(0x5e6)]?.({'kind':_0x11a2e2(0x410),'listenAddr':_0x547a37})['catch'](()=>{})),this[_0x11a2e2(0x492)];}async[_0xfbb2ca(0x543)](_0x5458f2={}){const _0x3db1f2=_0xfbb2ca,_0x225454=this[_0x3db1f2(0x492)];this[_0x3db1f2(0x492)]=null;const _0x47604c=this[_0x3db1f2(0x37c)]['includes'](_0x225454)?this[_0x3db1f2(0x37c)]:_0x225454?[_0x225454]:[];this['servers']=[];if(_0x225454&&_0x225454['_isClusterController']){try{await _0x225454[_0x3db1f2(0x543)]();}catch{}this[_0x3db1f2(0x57b)]&&this['metrics'][_0x3db1f2(0x543)]();return;}if(_0x47604c[_0x3db1f2(0x503)]){const _0x3e86ad=Number[_0x3db1f2(0x79d)](_0x5458f2[_0x3db1f2(0x25c)])?Math['max'](0x0,_0x5458f2[_0x3db1f2(0x25c)]):0x3e8,_0x3e1dbb=_0xe53a94=>new Promise(_0xe1a441=>{const _0x5d2a97=_0x3db1f2;let _0x1ec21f=![],_0x3f3597=null,_0x50c32f=null;const _0x5b2e56=()=>{if(_0x1ec21f)return;_0x1ec21f=!![];if(_0x3f3597)clearTimeout(_0x3f3597);if(_0x50c32f)clearTimeout(_0x50c32f);_0xe1a441();};try{_0xe53a94[_0x5d2a97(0x543)](_0x5b2e56);}catch{_0x5b2e56();return;}try{_0xe53a94[_0x5d2a97(0x5fa)]?.();}catch{}_0x3f3597=setTimeout(()=>{const _0x32c91f=_0x5d2a97;try{_0xe53a94[_0x32c91f(0x78c)]?.();}catch{}for(const _0x1923cd of this[_0x32c91f(0x655)]){try{_0x1923cd[_0x32c91f(0x224)]();}catch{}}_0x50c32f=setTimeout(_0x5b2e56,0x64),_0x50c32f[_0x32c91f(0x442)]?.();},_0x3e86ad),_0x3f3597['unref']?.();});await Promise['all'](_0x47604c['map'](_0x3e1dbb));}this[_0x3db1f2(0x57b)]&&this[_0x3db1f2(0x57b)]['close']();}[_0xfbb2ca(0x2ce)](_0x52b3f0,_0x9ba33d,_0x5a11fd=0x36ee80){const _0x2e73d1=_0xfbb2ca,_0x49260c=Date[_0x2e73d1(0x6fd)](),_0x1d8cf0=Buffer['from'](JSON[_0x2e73d1(0x72f)]({'iat':_0x49260c,'exp':_0x49260c+_0x5a11fd,..._0x52b3f0}))[_0x2e73d1(0x288)](_0x2e73d1(0x32e)),_0x1b8430=_0x32578a(_0x1d8cf0,_0x9ba33d);return _0x1d8cf0+'.'+_0x1b8430;}[_0xfbb2ca(0x545)](_0x3b7208,_0x40667b={}){const _0x3bcbd1=_0xfbb2ca,{httpOnly:httpOnly=!![],sameSite:sameSite=_0x3bcbd1(0x5b6),path:path='/',secure:secure=![],maxAge:maxAge=null,expires:expires=null}=_0x40667b;let _0x522e0e=this[_0x3bcbd1(0x1c4)][_0x3bcbd1(0x759)]+'='+_0x3b7208;if(httpOnly)_0x522e0e+=';\x20HttpOnly';if(sameSite)_0x522e0e+=_0x3bcbd1(0x2dd)+sameSite;if(path)_0x522e0e+=_0x3bcbd1(0x414)+path;if(secure)_0x522e0e+=_0x3bcbd1(0x472);if(Number[_0x3bcbd1(0x79d)](maxAge))_0x522e0e+=_0x3bcbd1(0x3cb)+Math[_0x3bcbd1(0x270)](0x0,Math[_0x3bcbd1(0x318)](maxAge));if(expires instanceof Date)_0x522e0e+=_0x3bcbd1(0x562)+expires['toUTCString']();return _0x522e0e;}['clearCookie'](_0x5467aa=this[_0xfbb2ca(0x1c4)]['cookieName'],_0x3971ca={}){const _0x5a81a7=_0xfbb2ca,{path:path='/',sameSite:sameSite='Lax',secure:secure=![],httpOnly:httpOnly=!![]}=_0x3971ca;let _0x3470b0=_0x5467aa+'=';if(httpOnly)_0x3470b0+=_0x5a81a7(0x5de);if(sameSite)_0x3470b0+=_0x5a81a7(0x2dd)+sameSite;if(path)_0x3470b0+=_0x5a81a7(0x414)+path;if(secure)_0x3470b0+=_0x5a81a7(0x472);return _0x3470b0+=';\x20Max-Age=0;\x20Expires=Thu,\x2001\x20Jan\x201970\x2000:00:00\x20GMT',_0x3470b0;}[_0xfbb2ca(0x3b9)](_0x3199e2,_0x149fd5){const _0x1a6d06=_0xfbb2ca;if(!_0x3199e2)return null;const [_0x453e5,_0x14be86]=String(_0x3199e2)[_0x1a6d06(0x3d5)]('.');if(!_0x453e5||!_0x14be86)return null;const _0x43c8bd=_0x32578a(_0x453e5,_0x149fd5);if(!_0x273c70(_0x14be86,_0x43c8bd))return null;try{const _0x565c60=JSON[_0x1a6d06(0x663)](Buffer[_0x1a6d06(0x2f3)](_0x453e5,'base64url')[_0x1a6d06(0x288)]());if(_0x565c60['exp']<=Date[_0x1a6d06(0x6fd)]())return null;return _0x565c60;}catch{return null;}}[_0xfbb2ca(0x1f0)](_0x46a014){const _0x2c0b7e=_0xfbb2ca;if(this[_0x2c0b7e(0x243)]?.[_0x2c0b7e(0x1c4)])return this[_0x2c0b7e(0x243)][_0x2c0b7e(0x1c4)][_0x2c0b7e(0x1f0)](_0x46a014);return _0x266324(_0x46a014);}[_0xfbb2ca(0x684)](_0x2e4375){const _0x3845d3=_0xfbb2ca;if(this[_0x3845d3(0x243)]?.[_0x3845d3(0x1c4)])return this[_0x3845d3(0x243)][_0x3845d3(0x1c4)][_0x3845d3(0x684)](_0x2e4375);const _0x1c8e80=this[_0x3845d3(0x212)]?.['tokenTtl']??0x36ee80,_0x30a9ad=this[_0x3845d3(0x212)]?.[_0x3845d3(0x254)];return _0x595d73(_0x2e4375,_0x30a9ad,_0x1c8e80);}[_0xfbb2ca(0x1d4)](_0x78e69e){const _0x1277d1=_0xfbb2ca;if(this[_0x1277d1(0x243)]?.[_0x1277d1(0x1c4)])return this['_okdb'][_0x1277d1(0x1c4)]['authenticateToken'](_0x78e69e);const _0x1ad13f=this[_0x1277d1(0x212)]?.[_0x1277d1(0x254)];return _0x199cf6(_0x78e69e,_0x1ad13f);}async[_0xfbb2ca(0x544)](_0x448960){const _0x123a89=_0xfbb2ca;if(this[_0x123a89(0x243)]?.[_0x123a89(0x1c4)])return this[_0x123a89(0x243)]['auth'][_0x123a89(0x544)](_0x448960);if(_0x448960[_0x123a89(0x2e9)]?.['internal']===!![]||this[_0x123a89(0x555)]===_0x123a89(0x1bc))return{'id':'system','username':_0x123a89(0x2ad),'roles':[_0x123a89(0x4f4)],'isAuthenticated':!![],'isSystem':!![],'user':{'id':_0x123a89(0x2ad),'username':_0x123a89(0x2ad),'roles':[_0x123a89(0x4f4)],'isAuthenticated':!![],'isSystem':!![]}};const _0x269e9e=this[_0x123a89(0x1f0)](_0x448960[_0x123a89(0x786)]?.['authorization']),_0x159577=_0x448960[_0x123a89(0x67c)]?.[this[_0x123a89(0x1c4)][_0x123a89(0x759)]],_0x4e2220=_0x269e9e||_0x159577;if(!_0x4e2220)return{'isAuthenticated':![],'isSystem':![],'user':null};const _0x1b26c9=this['authenticateToken'](_0x4e2220);if(!_0x1b26c9)return{'isAuthenticated':![],'isSystem':![],'user':null};const _0x1165a1={'id':_0x1b26c9['sub']??null,'username':_0x1b26c9['username']??null,'roles':Array[_0x123a89(0x65e)](_0x1b26c9['roles'])?_0x1b26c9[_0x123a89(0x1d3)]:[],'isAuthenticated':!![],'isSystem':![]};return{'id':_0x1165a1['id'],'username':_0x1165a1[_0x123a89(0x376)],'roles':_0x1165a1[_0x123a89(0x1d3)],'isAuthenticated':!![],'isSystem':![],'user':_0x1165a1,'claims':_0x1b26c9,'subject':_0x1165a1['id']};}async[_0xfbb2ca(0x2a2)](_0x4d91c2,_0x486365={}){const _0x1562dc=_0xfbb2ca,_0x19e36a=_0x2d4b1d(_0x4d91c2),_0x343145=Array[_0x1562dc(0x65e)](_0x486365[_0x1562dc(0x642)])&&_0x486365[_0x1562dc(0x642)][_0x1562dc(0x503)]>0x0?_0x486365[_0x1562dc(0x642)]:[_0x1562dc(0x72d),'ES256'],_0x53978a=_0x19e36a[_0x1562dc(0x238)]?.[_0x1562dc(0x511)];if(!_0x343145['includes'](_0x53978a))throw new Error(_0x1562dc(0x1ca)+_0x53978a);if(!_0x19e36a[_0x1562dc(0x238)]?.[_0x1562dc(0x44d)])throw new Error(_0x1562dc(0x438));const _0xde64e2=await this[_0x1562dc(0x5a8)](_0x486365);if(!_0xde64e2?.[_0x1562dc(0x44c)])throw new Error(_0x1562dc(0x209));const _0x58f792=await this['_getJwkKey'](_0xde64e2[_0x1562dc(0x44c)],_0x19e36a['header'][_0x1562dc(0x44d)],_0x486365);if(!_0x3ba38d(_0x53978a,_0x58f792,_0x19e36a['signingInput'],_0x19e36a['signature']))throw new Error('JWT\x20signature\x20verification\x20failed');const _0x2a87ed=Math['floor'](Date[_0x1562dc(0x6fd)]()/0x3e8),_0x3bb548=_0x19e36a[_0x1562dc(0x63d)]||{};if(_0x3bb548['iss']!==_0xde64e2[_0x1562dc(0x24b)])throw new Error(_0x1562dc(0x1e1));const _0xfee21d=_0x486365[_0x1562dc(0x25e)];if(_0xfee21d){const _0x496429=_0x196c1f(_0x3bb548['aud']);if(!_0x496429['includes'](_0xfee21d))throw new Error(_0x1562dc(0x69c));}if(typeof _0x3bb548[_0x1562dc(0x79c)]!==_0x1562dc(0x6e3)||_0x3bb548[_0x1562dc(0x79c)]<=_0x2a87ed)throw new Error(_0x1562dc(0x61f));if(_0x3bb548[_0x1562dc(0x4d8)]!=null&&_0x3bb548[_0x1562dc(0x4d8)]>_0x2a87ed)throw new Error('JWT\x20not\x20yet\x20valid');if(_0x3bb548[_0x1562dc(0x670)]==='id')throw new Error(_0x1562dc(0x611));return{'subject':_0x3bb548['sub']??null,'email':_0x3bb548[_0x1562dc(0x6a2)]??null,'scopes':typeof _0x3bb548[_0x1562dc(0x71c)]==='string'?_0x3bb548[_0x1562dc(0x71c)][_0x1562dc(0x3d5)](/\s+/)['filter'](Boolean):[],'claims':_0x3bb548,'tokenType':_0x1562dc(0x28d)};}async[_0xfbb2ca(0x5a8)](_0x11f025={}){const _0x734bd1=_0xfbb2ca,_0x222e37=String(_0x11f025['issuer']||'')[_0x734bd1(0x18e)](/\/+$/,'');if(!_0x222e37)return null;const _0x2b537a=Number[_0x734bd1(0x79d)](_0x11f025[_0x734bd1(0x2e0)])?_0x11f025[_0x734bd1(0x2e0)]:0xa*0x3c*0x3e8;if(this[_0x734bd1(0x473)]?.[_0x734bd1(0x24b)]===_0x222e37&&this['_oidcDiscoveryCache'][_0x734bd1(0x4f7)]>Date[_0x734bd1(0x6fd)]())return this[_0x734bd1(0x473)][_0x734bd1(0x481)];const _0x5eb51b=await _0x31d9c7(_0x222e37+'/.well-known/openid-configuration'),_0x1d3669={'issuer':_0x5eb51b[_0x734bd1(0x24b)]||_0x222e37,'authorization_endpoint':_0x11f025[_0x734bd1(0x67e)]||_0x5eb51b[_0x734bd1(0x3f8)],'token_endpoint':_0x11f025[_0x734bd1(0x71a)]||_0x5eb51b[_0x734bd1(0x6bf)],'jwks_uri':_0x11f025['jwksUri']||_0x5eb51b[_0x734bd1(0x44c)]};return this['_oidcDiscoveryCache']={'issuer':_0x222e37,'value':_0x1d3669,'expiresAt':Date[_0x734bd1(0x6fd)]()+_0x2b537a},_0x1d3669;}async[_0xfbb2ca(0x29d)](_0x4c6f84,_0x3a0a23=0x5*0x3c*0x3e8){const _0x49de6d=_0xfbb2ca,_0x3153ae=await _0x31d9c7(_0x4c6f84),_0x25afa3=new Map();for(const _0x35219a of _0x3153ae[_0x49de6d(0x2ac)]||[]){if(!_0x35219a?.[_0x49de6d(0x44d)])continue;_0x25afa3[_0x49de6d(0x36f)](_0x35219a[_0x49de6d(0x44d)],_0x2793b2(_0x35219a));}return this[_0x49de6d(0x553)]={'uri':_0x4c6f84,'keys':_0x25afa3,'expiresAt':Date[_0x49de6d(0x6fd)]()+_0x3a0a23},this[_0x49de6d(0x553)];}async[_0xfbb2ca(0x5d6)](_0x3d2f09,_0x345dbf,_0x9a19bc={}){const _0x4294ee=_0xfbb2ca,_0x44b973=Number['isFinite'](_0x9a19bc[_0x4294ee(0x1da)])?_0x9a19bc[_0x4294ee(0x1da)]:0x5*0x3c*0x3e8,_0x385833=0x1e*0x3e8,_0x4efa8e=this['_jwksNegativeCache'][_0x4294ee(0x3e6)](_0x345dbf);if(_0x4efa8e!==undefined&&_0x4efa8e>Date[_0x4294ee(0x6fd)]())throw new Error('Unknown\x20JWKS\x20kid:\x20'+_0x345dbf);(!this[_0x4294ee(0x553)]||this['_jwksCache'][_0x4294ee(0x5b0)]!==_0x3d2f09||this[_0x4294ee(0x553)][_0x4294ee(0x4f7)]<=Date[_0x4294ee(0x6fd)]())&&await this[_0x4294ee(0x29d)](_0x3d2f09,_0x44b973);let _0x6788ef=this['_jwksCache']?.[_0x4294ee(0x2ac)]?.[_0x4294ee(0x3e6)](_0x345dbf);if(_0x6788ef)return _0x6788ef;await this[_0x4294ee(0x29d)](_0x3d2f09,_0x44b973),_0x6788ef=this[_0x4294ee(0x553)]?.['keys']?.[_0x4294ee(0x3e6)](_0x345dbf);if(!_0x6788ef){this[_0x4294ee(0x76b)]['set'](_0x345dbf,Date[_0x4294ee(0x6fd)]()+_0x385833);throw new Error(_0x4294ee(0x377)+_0x345dbf);}return _0x6788ef;}[_0xfbb2ca(0x547)](_0xf9f108){const _0x52a474=_0xfbb2ca;if(this[_0x52a474(0x243)]?.['auth'])return this[_0x52a474(0x243)][_0x52a474(0x1c4)]['_normalizeOAuthAuthResult'](_0xf9f108);const _0x106124=_0xf9f108?.[_0x52a474(0x48c)]||{},_0x222bd7={'sub':_0xf9f108?.[_0x52a474(0x339)]??_0x106124[_0x52a474(0x722)]??null,'email':_0xf9f108?.[_0x52a474(0x6a2)]??_0x106124['email']??null,'name':_0xf9f108?.['name']??_0x106124[_0x52a474(0x378)]??_0x106124[_0x52a474(0x202)]??null,'groups':_0xf9f108?.[_0x52a474(0x358)]??_0x106124['groups']??[],'roles':_0xf9f108?.[_0x52a474(0x1d3)]??_0x106124[_0x52a474(0x1d3)]??[]};return{'type':_0x52a474(0x6d8),'tokenType':_0xf9f108?.[_0x52a474(0x4ad)]??_0x52a474(0x28d),'subject':_0x222bd7['sub'],'email':_0x222bd7[_0x52a474(0x6a2)],'scopes':_0xf9f108?.['scopes']??_0x106124[_0x52a474(0x71c)]?.[_0x52a474(0x3d5)]?.('\x20')?.[_0x52a474(0x1ff)](Boolean)??[],'claims':_0x106124,'user':_0x222bd7,'isAuthenticated':!![]};}[_0xfbb2ca(0x1a8)](_0x42fe72={},_0x367612=0x927c0){const _0x3a5041=_0xfbb2ca;if(this[_0x3a5041(0x243)]?.[_0x3a5041(0x1c4)])return this[_0x3a5041(0x243)][_0x3a5041(0x1c4)]['createLoginState'](_0x42fe72,_0x367612);const _0x52507b=_0x5bbee0(0x18);this[_0x3a5041(0x4b1)]['set'](_0x52507b,{..._0x42fe72,'exp':Date[_0x3a5041(0x6fd)]()+_0x367612});if(this[_0x3a5041(0x4b1)][_0x3a5041(0x1f8)]%0x32===0x0){const _0x56ccdc=Date[_0x3a5041(0x6fd)]();for(const [_0x46e573,_0x2d5f8b]of this[_0x3a5041(0x4b1)]){if(_0x2d5f8b[_0x3a5041(0x79c)]<=_0x56ccdc)this[_0x3a5041(0x4b1)]['delete'](_0x46e573);}}return _0x52507b;}[_0xfbb2ca(0x4aa)](_0x2b6ee2){const _0x488f9e=_0xfbb2ca;if(this[_0x488f9e(0x243)]?.[_0x488f9e(0x1c4)])return this[_0x488f9e(0x243)][_0x488f9e(0x1c4)]['consumeLoginState'](_0x2b6ee2);if(!_0x2b6ee2)return null;const _0x5711b1=this[_0x488f9e(0x4b1)][_0x488f9e(0x3e6)](_0x2b6ee2);this[_0x488f9e(0x4b1)][_0x488f9e(0x560)](_0x2b6ee2);if(!_0x5711b1)return null;if(_0x5711b1[_0x488f9e(0x79c)]<=Date[_0x488f9e(0x6fd)]())return null;return _0x5711b1;}}function _0x446cee(_0x3bac22){const _0x4230cd=_0xfbb2ca;if(_0x3bac22==null)return{'status':0xcc};if(Buffer['isBuffer'](_0x3bac22)||_0x284df2(_0x3bac22))return{'status':0xc8,'body':_0x3bac22};if(typeof _0x3bac22===_0x4230cd(0x40d)&&_0x4230cd(0x7a3)in _0x3bac22){if(!(_0x4230cd(0x505)in _0x3bac22)&&!_0x284df2(_0x3bac22['body'])){const {status:_0x33d241,headers:_0x3adc58,..._0x23b476}=_0x3bac22;if(Object[_0x4230cd(0x2ac)](_0x23b476)[_0x4230cd(0x503)]>0x0)return{'status':_0x33d241,'headers':_0x3adc58,'body':_0x23b476};}return _0x3bac22;}return{'status':0xc8,'body':_0x3bac22};}function _0x284df2(_0x1893e5){const _0x215ddb=_0xfbb2ca;return _0x1893e5&&typeof _0x1893e5['pipe']===_0x215ddb(0x5aa);}function _0x47de2f(_0x1d4558,_0x58f808){const _0x358cb0=_0xfbb2ca,{PassThrough:_0x21163b}=require$$8;let _0x2fd0d9=0x0,_0x3d0a04=![];const _0x17c24c=new _0x21163b();return _0x1d4558['on'](_0x358cb0(0x6af),_0x3947a7=>{const _0x2a08c7=_0x358cb0;if(_0x3d0a04)return;_0x2fd0d9+=_0x3947a7[_0x2a08c7(0x503)];if(_0x2fd0d9>_0x58f808){_0x3d0a04=!![];const _0x45a5a3=new Error(_0x2a08c7(0x36a));_0x45a5a3[_0x2a08c7(0x7a3)]=0x19d,_0x17c24c[_0x2a08c7(0x224)](_0x45a5a3);return;}if(!_0x17c24c[_0x2a08c7(0x1de)])_0x17c24c[_0x2a08c7(0x387)](_0x3947a7);}),_0x1d4558['on'](_0x358cb0(0x72e),()=>{const _0x217fdc=_0x358cb0;!_0x3d0a04&&!_0x17c24c[_0x217fdc(0x1de)]&&(_0x3d0a04=!![],_0x17c24c[_0x217fdc(0x72e)]());}),_0x1d4558['on'](_0x358cb0(0x5b7),_0x1bce5f=>{const _0x474c73=_0x358cb0;if(!_0x17c24c[_0x474c73(0x1de)])_0x17c24c[_0x474c73(0x224)](_0x1bce5f);}),_0x1d4558[_0x358cb0(0x417)](),_0x17c24c['on']('resume',()=>{const _0x101207=_0x358cb0;if(!_0x17c24c[_0x101207(0x1de)])_0x1d4558['resume']();}),_0x17c24c;}function _0x5e103f(_0x217283,_0x2fb9d3){const _0x303995=_0xfbb2ca;if(_0x217283[_0x303995(0x5e0)]===_0x303995(0x51c)||_0x217283[_0x303995(0x5e0)]===_0x303995(0x33d))return null;const _0x2145b4=_0x217283[_0x303995(0x786)]?.[_0x303995(0x4af)];if(_0x2145b4!=null){const _0x5c32a9=Number(_0x2145b4);if(Number['isFinite'](_0x5c32a9)&&_0x5c32a9>_0x2fb9d3){const _0x36eda3=new Error(_0x303995(0x36a));_0x36eda3[_0x303995(0x7a3)]=0x19d;throw _0x36eda3;}}return new Promise((_0x5017c7,_0x4fb686)=>{const _0x16b1eb=_0x303995;let _0x28d905='',_0xf1dfdd=0x0;_0x217283['on'](_0x16b1eb(0x6af),_0x58b9b7=>{const _0x59a4aa=_0x16b1eb;_0xf1dfdd+=_0x58b9b7[_0x59a4aa(0x503)];if(_0xf1dfdd>_0x2fb9d3){try{_0x217283[_0x59a4aa(0x224)]();}catch{}const _0x3bdc04=new Error(_0x59a4aa(0x36a));_0x3bdc04[_0x59a4aa(0x7a3)]=0x19d,_0x4fb686(_0x3bdc04);return;}_0x28d905+=_0x58b9b7;}),_0x217283['on'](_0x16b1eb(0x72e),()=>{const _0x4657f4=_0x16b1eb;if(!_0x28d905)return _0x5017c7(null);const _0x116307=_0x217283[_0x4657f4(0x786)]?.[_0x4657f4(0x7a1)]||'';if(_0x116307[_0x4657f4(0x1dc)](_0x4657f4(0x4c7))){const _0x5b086f={};for(const [_0x244f6d,_0x56f4f0]of new URLSearchParams(_0x28d905))_0x5b086f[_0x244f6d]=_0x56f4f0;return _0x5017c7(_0x5b086f);}try{_0x5017c7(JSON[_0x4657f4(0x663)](_0x28d905));}catch(_0x58fade){_0x4fb686(_0x58fade);}}),_0x217283['on'](_0x16b1eb(0x5b7),_0x4fb686);});}function _0x2602a8(_0x93c849,_0x1ea4b9){const _0x3d389b=_0xfbb2ca,{status:status=0xc8,headers:headers={},body:_0x1436cb}=_0x1ea4b9;_0x93c849[_0x3d389b(0x558)]=status;for(const [_0x5a2a56,_0x24dcdc]of Object['entries'](headers)){_0x93c849['setHeader'](_0x5a2a56,_0x24dcdc);}if(_0x1436cb==null){_0x93c849['end']();return;}if(_0x284df2(_0x1436cb)){_0x1436cb['pipe'](_0x93c849);return;}if(Buffer[_0x3d389b(0x464)](_0x1436cb)){_0x93c849[_0x3d389b(0x72e)](_0x1436cb);return;}if(typeof _0x1436cb===_0x3d389b(0x40d)){!_0x93c849[_0x3d389b(0x1dd)]('Content-Type')&&_0x93c849[_0x3d389b(0x4f0)](_0x3d389b(0x321),_0x3d389b(0x44b));_0x93c849[_0x3d389b(0x72e)](JSON['stringify'](_0x1436cb));return;}_0x93c849[_0x3d389b(0x72e)](String(_0x1436cb));}function _0x242381(_0x4762d3,_0x45ab72){const _0x35d16a=_0xfbb2ca;if(_0x45ab72==null)return':'+_0x4762d3;return[][_0x35d16a(0x549)](_0x45ab72)[_0x35d16a(0x626)](_0x299c57=>(_0x299c57[_0x35d16a(0x1dc)](':')?'['+_0x299c57+']':_0x299c57)+':'+_0x4762d3)[_0x35d16a(0x29f)](',\x20');}return okdbHttp[_0xfbb2ca(0x1e3)]=_0xfbcc42,okdbHttp[_0xfbb2ca(0x1e3)][_0xfbb2ca(0x1cf)]=_0x242381,okdbHttp[_0xfbb2ca(0x1e3)]['OKDB_CODE_TO_HTTP_STATUS']=_0x13ad4d,okdbHttp['exports'];}var hasRequiredOkdb;function requireOkdb(){const _0x5a22a6=_0x362184;if(hasRequiredOkdb)return okdb$1;hasRequiredOkdb=0x1;try{process[_0x5a22a6(0x1ea)]();}catch{}const _0x8e4ba8=require$$1,_0x2c9780=require$$1$1,{resolveWorkers:_0x3f588f,isShmbufNative:_0x426793}=requireOkdbWorkers();function _0x1b8588(_0x448358){const _0x420005=_0x5a22a6,_0x1f3ea2=_0x448358[_0x420005(0x5b8)](0x2),_0x448755={};let _0x263f1b=0x0;while(_0x263f1b<_0x1f3ea2[_0x420005(0x503)]){const _0x2e50f2=_0x1f3ea2[_0x263f1b];if(_0x2e50f2==='--port'||_0x2e50f2==='-p')_0x448755[_0x420005(0x5f6)]=Number(_0x1f3ea2[++_0x263f1b]);else{if(_0x2e50f2==='--path'||_0x2e50f2==='-d')_0x448755[_0x420005(0x624)]=_0x1f3ea2[++_0x263f1b];else{if(_0x2e50f2==='--key'||_0x2e50f2==='-k')_0x448755[_0x420005(0x566)]=_0x1f3ea2[++_0x263f1b];else{if(_0x2e50f2===_0x420005(0x5c8)||_0x2e50f2==='-c')_0x448755['config']=_0x1f3ea2[++_0x263f1b];else{if(_0x2e50f2===_0x420005(0x19e))_0x448755[_0x420005(0x6d3)]=_0x1f3ea2[++_0x263f1b];else{if(_0x2e50f2===_0x420005(0x489))_0x448755[_0x420005(0x674)]=!![];else{if(_0x2e50f2===_0x420005(0x349))_0x448755['noAdmin']=!![];else{if(_0x2e50f2===_0x420005(0x3b2))_0x448755['workers']=_0x1f3ea2[++_0x263f1b];else{if(_0x2e50f2==='--no-cluster')_0x448755[_0x420005(0x343)]=!![];else{if(_0x2e50f2===_0x420005(0x5ce)||_0x2e50f2==='-e')_0x448755[_0x420005(0x758)]=_0x1f3ea2[++_0x263f1b];else{if(_0x2e50f2===_0x420005(0x31f))_0x448755['types']=_0x1f3ea2[++_0x263f1b];else{if(_0x2e50f2===_0x420005(0x6f9))_0x448755['changes']=!![];else{if(_0x2e50f2==='--blobs')_0x448755[_0x420005(0x6e9)]=!![];else{if(_0x2e50f2===_0x420005(0x370))_0x448755[_0x420005(0x609)]=!![];else{if(_0x2e50f2==='--open'){const _0x1abe53=[];while(_0x263f1b+0x1<_0x1f3ea2[_0x420005(0x503)]&&!_0x1f3ea2[_0x263f1b+0x1]['startsWith']('--')){_0x1abe53[_0x420005(0x387)](_0x1f3ea2[++_0x263f1b]);}_0x448755[_0x420005(0x1bc)]=_0x1abe53[_0x420005(0x503)]>0x0?_0x1abe53:!![];}else{if(_0x2e50f2==='--log-requests')_0x448755['logRequests']=!![];else{if(_0x2e50f2===_0x420005(0x79b))_0x448755['name']=_0x1f3ea2[++_0x263f1b];else{if(_0x2e50f2===_0x420005(0x5ba))_0x448755[_0x420005(0x298)]=_0x1f3ea2[++_0x263f1b];else{if(_0x2e50f2===_0x420005(0x740))_0x448755[_0x420005(0x4c5)]=_0x1f3ea2[++_0x263f1b];else{if(_0x2e50f2===_0x420005(0x40b))_0x448755[_0x420005(0x78a)]=_0x1f3ea2[++_0x263f1b];else{if(_0x2e50f2==='--grants')_0x448755[_0x420005(0x204)]=_0x1f3ea2[++_0x263f1b];else{if(_0x2e50f2===_0x420005(0x70a))_0x448755[_0x420005(0x741)]=_0x1f3ea2[++_0x263f1b];else{if(_0x2e50f2===_0x420005(0x45f))_0x448755[_0x420005(0x4ca)]=_0x1f3ea2[++_0x263f1b];else{if(_0x2e50f2===_0x420005(0x6b1)||_0x2e50f2==='-u')_0x448755[_0x420005(0x376)]=_0x1f3ea2[++_0x263f1b];else{if(_0x2e50f2===_0x420005(0x365))_0x448755[_0x420005(0x1d7)]=_0x1f3ea2[++_0x263f1b];else{if(_0x2e50f2===_0x420005(0x208)||_0x2e50f2==='-v'){const _0x4b04b7=require$$3;console[_0x420005(0x273)](_0x4b04b7[_0x420005(0x2b3)]),process[_0x420005(0x393)](0x0);}else(_0x2e50f2===_0x420005(0x355)||_0x2e50f2==='-h')&&(_0x55ffc1(),process[_0x420005(0x393)](0x0));}}}}}}}}}}}}}}}}}}}}}}}}}_0x263f1b++;}return _0x448755;}function _0x55ffc1(){const _0x29101a=_0x5a22a6;console[_0x29101a(0x273)](_0x29101a(0x4dc));}const _0x11207d=new Set([_0x5a22a6(0x1c1),_0x5a22a6(0x77a),_0x5a22a6(0x21b),_0x5a22a6(0x5b7)]);function _0x14062f(_0x5b0c22){const _0x33b161=_0x5a22a6,_0x51a900=_0x5b0c22[_0x33b161(0x252)]?_0x8e4ba8[_0x33b161(0x300)](_0x5b0c22[_0x33b161(0x252)]):_0x8e4ba8[_0x33b161(0x300)](_0x33b161(0x479));let _0x33dd2a={};if(_0x2c9780['existsSync'](_0x51a900))try{const _0x38893f=_0x2c9780[_0x33b161(0x2a8)](_0x51a900,'utf8')[_0x33b161(0x18e)](/^\uFEFF/,'');_0x33dd2a=JSON[_0x33b161(0x663)](_0x38893f),console[_0x33b161(0x273)](_0x33b161(0x1e5)+_0x51a900);}catch(_0x200217){console[_0x33b161(0x5b7)](_0x33b161(0x4a3)+_0x51a900+':\x20'+_0x200217[_0x33b161(0x1e0)]),process[_0x33b161(0x393)](0x1);}const _0x3afb5d={'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},_0x901249={'port':_0x5b0c22[_0x33b161(0x5f6)]??_0x33dd2a[_0x33b161(0x5f6)]??_0x3afb5d['port']??0x2124,'dbPath':_0x5b0c22[_0x33b161(0x624)]??_0x33dd2a[_0x33b161(0x624)]??_0x3afb5d[_0x33b161(0x624)]??'./okdb-data','key':_0x5b0c22['key']??_0x33dd2a[_0x33b161(0x566)]??_0x3afb5d[_0x33b161(0x566)]??undefined,'logLevel':_0x5b0c22['logLevel']??_0x33dd2a[_0x33b161(0x6d3)]??_0x3afb5d['logLevel']??_0x33b161(0x77a),'noRepl':_0x5b0c22[_0x33b161(0x674)]??_0x33dd2a['noRepl']??_0x3afb5d['noRepl']??![],'noAdmin':_0x5b0c22[_0x33b161(0x6b6)]??_0x33dd2a[_0x33b161(0x6b6)]??_0x3afb5d[_0x33b161(0x6b6)]??![],'admin':_0x33dd2a['admin']??{},'api':_0x33dd2a[_0x33b161(0x24f)]??undefined,'auth':_0x33dd2a[_0x33b161(0x1c4)]??undefined,'mcp':_0x33dd2a[_0x33b161(0x79a)]??undefined,'http':_0x33dd2a[_0x33b161(0x635)]??undefined,'timeMachine':_0x33dd2a[_0x33b161(0x244)]!==![]?_0x33dd2a[_0x33b161(0x244)]??{}:![],'processors':_0x33dd2a[_0x33b161(0x471)],'engines':_0x33dd2a[_0x33b161(0x517)],'compaction':_0x33dd2a[_0x33b161(0x733)]};if(_0x5b0c22[_0x33b161(0x343)])_0x901249['noCluster']=!![];if(_0x5b0c22[_0x33b161(0x5f3)]!==undefined)_0x901249[_0x33b161(0x5cb)]=_0x5b0c22[_0x33b161(0x5f3)];_0x5b0c22[_0x33b161(0x1bc)]!==undefined&&(_0x901249[_0x33b161(0x1c4)]=_0x901249[_0x33b161(0x1c4)]||{},_0x901249[_0x33b161(0x1c4)]['open']=_0x5b0c22[_0x33b161(0x1bc)]);_0x5b0c22[_0x33b161(0x63e)]&&(_0x901249[_0x33b161(0x1c1)]=_0x901249[_0x33b161(0x1c1)]||{},_0x901249[_0x33b161(0x1c1)]['logRequests']=!![]);(!Number['isInteger'](_0x901249[_0x33b161(0x5f6)])||_0x901249[_0x33b161(0x5f6)]<0x1||_0x901249['port']>0xffff)&&(console[_0x33b161(0x5b7)](_0x33b161(0x4fe)+_0x901249['port']+'\x20(must\x20be\x201–65535)'),process[_0x33b161(0x393)](0x1));!_0x11207d[_0x33b161(0x52e)](_0x901249[_0x33b161(0x6d3)])&&(console[_0x33b161(0x5b7)](_0x33b161(0x44a)+_0x901249['logLevel']+'\x22\x20(must\x20be\x20debug|info|warn|error)'),process[_0x33b161(0x393)](0x1));const _0x38be41=_0x901249['http']?.[_0x33b161(0x76f)];_0x38be41!==undefined&&!(typeof _0x38be41===_0x33b161(0x44e)&&_0x38be41)&&!(Array[_0x33b161(0x65e)](_0x38be41)&&_0x38be41[_0x33b161(0x503)]&&_0x38be41[_0x33b161(0x3a1)](_0x9ba5f9=>typeof _0x9ba5f9===_0x33b161(0x44e)&&_0x9ba5f9))&&(console['error'](_0x33b161(0x72a)+JSON[_0x33b161(0x72f)](_0x38be41)+_0x33b161(0x2d6)),process['exit'](0x1));for(const _0x5e7a21 of _0x5e827f){_0x901249[_0x5e7a21]!==undefined&&typeof _0x901249[_0x5e7a21]!==_0x33b161(0x6ff)&&(console[_0x33b161(0x5b7)](_0x33b161(0x578)+_0x5e7a21+_0x33b161(0x66e)+JSON[_0x33b161(0x72f)](_0x901249[_0x5e7a21])+_0x33b161(0x5c6)),process[_0x33b161(0x393)](0x1));}return _0x901249;}const _0x5e827f=[_0x5a22a6(0x471),_0x5a22a6(0x517),_0x5a22a6(0x733)];function _0x5e0778(_0x371dec){const _0x37ecff=_0x5a22a6;return!!(_0x371dec&&typeof _0x371dec===_0x37ecff(0x40d)&&!Array['isArray'](_0x371dec)&&Object[_0x37ecff(0x2ac)](_0x371dec)['length']>0x0);}function _0x13ec0a(_0x3340da){const _0x5426ca=_0x5a22a6;return{..._0x3340da[_0x5426ca(0x566)]?{'encryptionKey':_0x3340da[_0x5426ca(0x566)]}:{},'engines':![],'processors':![],'compaction':![]};}const _0x224489=!process['stdout'][_0x5a22a6(0x53f)]||!!process.env.NO_COLOR;function _0x4f037e(_0x3c9bbc,_0x425515){const _0x8144c1=_0x5a22a6;return _0x224489?_0x425515:'\x1b['+_0x3c9bbc+'m'+_0x425515+_0x8144c1(0x1d9);}function _0x4bc1a7(_0x3cefb1){const _0x3f366d=_0x5a22a6;if(!_0x3cefb1||_0x3cefb1[_0x3f366d(0x503)]===0x0)return;const _0x1a24c9='─'['repeat'](0x38);process[_0x3f366d(0x556)][_0x3f366d(0x6cc)]('\x0a'),process['stderr'][_0x3f366d(0x6cc)](_0x4f037e('33',_0x3f366d(0x2cf)+_0x3cefb1['length']+_0x3f366d(0x324)+(_0x3cefb1[_0x3f366d(0x503)]>0x1?'S':'')+'\x0a')),process[_0x3f366d(0x556)]['write']('\x20\x20'+_0x1a24c9+'\x0a');for(const _0x5b1740 of _0x3cefb1){const _0x6d62e7=_0x5b1740[_0x3f366d(0x3f4)]===_0x3f366d(0x5b7)?_0x4f037e('31',_0x3f366d(0x55f)):_0x4f037e('33',_0x3f366d(0x5a2));process[_0x3f366d(0x556)][_0x3f366d(0x6cc)](_0x6d62e7+'\x20\x20'+_0x4f037e('1',_0x5b1740[_0x3f366d(0x535)])+'\x0a'),process[_0x3f366d(0x556)]['write'](_0x3f366d(0x3cc)+_0x5b1740[_0x3f366d(0x1e0)]+'\x0a');if(_0x5b1740[_0x3f366d(0x604)])process[_0x3f366d(0x556)]['write'](_0x3f366d(0x3cc)+_0x4f037e('2',_0x3f366d(0x194)+_0x5b1740[_0x3f366d(0x604)])+'\x0a');process[_0x3f366d(0x556)][_0x3f366d(0x6cc)]('\x0a');}process[_0x3f366d(0x556)][_0x3f366d(0x6cc)]('\x20\x20'+_0x1a24c9+'\x0a\x0a');}function _0x4dc6fd(_0x47bbfe,_0x322e6c,_0x1a8459={}){const _0x5b2a29=_0x5a22a6,_0x5a148b=_0x47bbfe[_0x5b2a29(0x635)][_0x5b2a29(0x49b)](_0x322e6c,_0x1a8459);if(_0x5a148b&&_0x5a148b[_0x5b2a29(0x227)])return Promise[_0x5b2a29(0x300)](_0x5a148b);const _0x24fe3f=_0x47bbfe['http']['servers']?.['length']?_0x47bbfe[_0x5b2a29(0x635)][_0x5b2a29(0x37c)]:[_0x5a148b];return new Promise((_0x4e4212,_0x37150f)=>{const _0x42fe88=_0x5b2a29;_0x5a148b[_0x42fe88(0x3c3)](_0x42fe88(0x5b7),_0x37150f),Promise[_0x42fe88(0x618)](_0x24fe3f[_0x42fe88(0x626)](_0x445221=>_0x445221[_0x42fe88(0x2ea)]?null:new Promise(_0x5a596a=>_0x445221['once'](_0x42fe88(0x2ea),_0x5a596a))))[_0x42fe88(0x4a7)](()=>_0x4e4212(_0x5a148b));});}function _0x1a2551(_0x5c26d8){const _0x4ea787=_0x5a22a6;return _0x5c26d8[_0x4ea787(0x635)]?.[_0x4ea787(0x76f)]!==undefined?{'host':_0x5c26d8['http']['host']}:{};}async function _0x1a7253(_0x317e78){const _0x321295=_0x5a22a6,_0x463746=require$$4$1;console[_0x321295(0x273)]('\x0a\x20\x20okdb\x20doctor\x0a');let _0x2c46a1=!![];const _0x361e0a=(_0x1313dc,_0x7edf7b)=>{const _0x24ab9b=_0x321295;console[_0x24ab9b(0x273)]('\x20\x20'+(_0x1313dc?'✓':'✗')+'\x20'+_0x7edf7b);if(!_0x1313dc)_0x2c46a1=![];},_0xf9f7b7=Number(process[_0x321295(0x2b3)][_0x321295(0x18e)]('v','')[_0x321295(0x3d5)]('.')[0x0]);_0x361e0a(_0xf9f7b7>=0x12,_0x321295(0x3ac)+process[_0x321295(0x2b3)]+(_0xf9f7b7<0x12?'\x20\x20(need\x20≥\x2018)':''));const _0x3e1961=_0x8e4ba8['resolve'](_0x317e78['dbPath']);try{_0x2c9780[_0x321295(0x76d)](_0x3e1961,{'recursive':!![]});const _0x2ee285=_0x8e4ba8[_0x321295(0x29f)](_0x3e1961,'.okdb-write-test');_0x2c9780['writeFileSync'](_0x2ee285,''),_0x2c9780[_0x321295(0x5cc)](_0x2ee285),_0x361e0a(!![],_0x321295(0x657)+_0x3e1961);}catch(_0x4ecce1){_0x361e0a(![],_0x321295(0x772)+_0x3e1961+'\x20\x20('+_0x4ecce1['message']+')');}const _0x44d1ac=await new Promise(_0x581f90=>{const _0x12132f=_0x321295,_0x26d19e=_0x463746[_0x12132f(0x5d5)]();_0x26d19e[_0x12132f(0x3c3)](_0x12132f(0x5b7),()=>_0x581f90(![])),_0x26d19e[_0x12132f(0x3c3)]('listening',()=>{_0x26d19e['close'](),_0x581f90(!![]);}),_0x26d19e['listen'](_0x317e78[_0x12132f(0x5f6)],_0x12132f(0x289));});_0x361e0a(_0x44d1ac,'port\x20'+_0x317e78['port']+'\x20'+(_0x44d1ac?_0x321295(0x4e4):_0x321295(0x596)));const _0x337bfb=_0x8e4ba8[_0x321295(0x300)](_0x321295(0x479));if(_0x2c9780[_0x321295(0x4b2)](_0x337bfb))try{JSON[_0x321295(0x663)](_0x2c9780['readFileSync'](_0x337bfb,_0x321295(0x6f6))[_0x321295(0x18e)](/^\uFEFF/,'')),_0x361e0a(!![],_0x321295(0x70f)+_0x337bfb);}catch(_0x16d534){_0x361e0a(![],_0x321295(0x782)+_0x16d534['message']);}else _0x361e0a(!![],_0x321295(0x743));if(_0x426793()){const _0x4fea87=_0x3f588f(_0x317e78,{'shmbufNative':!![]});_0x361e0a(!![],_0x321295(0x5eb)+_0x4fea87+_0x321295(0x732)+(_0x4fea87===0x1?'':'s')+')');}else _0x361e0a(!![],'cluster:\x20unavailable\x20(shmbuf\x20native\x20missing)\x20—\x20running\x20single-process');if(!_0x44d1ac)try{const _0x2fe266=require(_0x321295(0x392)),_0x1fc286=new _0x2fe266(_0x3e1961,{'engines':![],'processors':![],'compaction':![],'http':![],'auth':{'open':!![]}});await _0x1fc286[_0x321295(0x1bc)]();try{await _0x1fc286['processes'][_0x321295(0x1bc)]({'reader':!![]});const _0x120f86=_0x1fc286['processes']['listNodes'](),_0x1549df=_0x120f86[_0x321295(0x1ff)](_0xfa052f=>_0xfa052f[_0x321295(0x2fc)]!=null)[_0x321295(0x503)];_0x361e0a(!![],_0x321295(0x1ee)+_0x120f86['length']+_0x321295(0x361)+(_0x120f86[_0x321295(0x503)]===0x1?'':'es')+'\x20('+_0x1549df+_0x321295(0x430));}finally{await _0x1fc286[_0x321295(0x543)]();}}catch{}console[_0x321295(0x273)](''),_0x2c46a1?console['log'](_0x321295(0x3c7)):(console[_0x321295(0x273)](_0x321295(0x582)),process[_0x321295(0x393)](0x1));}async function _0x2ca5b7(){const _0x2abf78=_0x5a22a6,_0x38d0c1=_0x8e4ba8[_0x2abf78(0x300)](_0x2abf78(0x479));!_0x2c9780[_0x2abf78(0x4b2)](_0x38d0c1)?(_0x2c9780[_0x2abf78(0x565)](_0x38d0c1,JSON[_0x2abf78(0x72f)]({'port':0x2124,'path':'./okdb-data','logLevel':_0x2abf78(0x77a),'noRepl':![],'noAdmin':![]},null,0x2)+'\x0a'),console[_0x2abf78(0x273)](_0x2abf78(0x21a))):console[_0x2abf78(0x273)](_0x2abf78(0x21c));const _0x43e124=_0x8e4ba8[_0x2abf78(0x300)]('./okdb-data');!_0x2c9780['existsSync'](_0x43e124)?(_0x2c9780[_0x2abf78(0x76d)](_0x43e124,{'recursive':!![]}),console[_0x2abf78(0x273)](_0x2abf78(0x3d3))):console[_0x2abf78(0x273)](_0x2abf78(0x6f1)),console[_0x2abf78(0x273)](_0x2abf78(0x554));}async function _0x3d9123(_0x2f2cd3){const _0xbad88b=_0x5a22a6,_0x14b22e=_0x8e4ba8['resolve'](_0x2f2cd3[_0xbad88b(0x28e)]);if(!_0x2c9780[_0xbad88b(0x4b2)](_0x14b22e)){console[_0xbad88b(0x273)]('[okdb]\x20nothing\x20to\x20reset\x20—\x20'+_0x14b22e+_0xbad88b(0x2ff));return;}const _0x327a7e=require$$0$2,_0x54f8c2=_0x327a7e[_0xbad88b(0x3fb)]({'input':process[_0xbad88b(0x6b5)],'output':process[_0xbad88b(0x3f5)]}),_0x1ddef4=await new Promise(_0x37a512=>_0x54f8c2[_0xbad88b(0x2d9)](_0xbad88b(0x2df)+_0x14b22e+_0xbad88b(0x23b),_0x37a512));_0x54f8c2['close'](),console[_0xbad88b(0x273)]('');if(_0x1ddef4[_0xbad88b(0x6f3)]()[_0xbad88b(0x4ff)]()!=='yes'){console[_0xbad88b(0x273)](_0xbad88b(0x3b7));return;}let _0x11f116=null;try{_0x11f116=await _0x4f9507(_0x14b22e,_0x2f2cd3,async _0x59be1b=>{const _0x382dbd=_0xbad88b,_0x32fbe1=_0x59be1b[_0x382dbd(0x791)],_0xc8a2ac=_0x32fbe1?.['db']?.[_0x382dbd(0x3e6)](_0x382dbd(0x360))??null,_0x390145=[];if(_0x32fbe1?.['hasType']('~licenses'))for(const {key:_0x25da00,value:_0x577d76}of _0x32fbe1[_0x382dbd(0x73f)]('~licenses')){_0x390145['push']({'key':_0x25da00,'value':_0x577d76});}return{'identity':_0xc8a2ac,'licenses':_0x390145};});}catch(_0x185f02){console[_0xbad88b(0x273)](_0xbad88b(0x54d)+_0x185f02[_0xbad88b(0x1e0)]+_0xbad88b(0x745));}_0x2c9780['rmSync'](_0x14b22e,{'recursive':!![],'force':!![]}),console[_0xbad88b(0x273)](_0xbad88b(0x299)+_0x14b22e+_0xbad88b(0x1ed));if(_0x11f116&&(_0x11f116[_0xbad88b(0x385)]||_0x11f116['licenses'][_0xbad88b(0x503)]>0x0))try{await _0x4f9507(_0x14b22e,_0x2f2cd3,async _0x2fdc9e=>{const _0x53cd4e=_0xbad88b,_0x1fcf42=_0x2fdc9e[_0x53cd4e(0x791)];_0x11f116[_0x53cd4e(0x385)]&&_0x1fcf42['db'][_0x53cd4e(0x6da)](_0x53cd4e(0x360),_0x11f116[_0x53cd4e(0x385)]);if(_0x11f116[_0x53cd4e(0x4f9)][_0x53cd4e(0x503)]>0x0){if(!_0x1fcf42[_0x53cd4e(0x4d9)](_0x53cd4e(0x461)))await _0x1fcf42[_0x53cd4e(0x3d7)](_0x53cd4e(0x461));for(const {key:_0x50ff56,value:_0x480848}of _0x11f116[_0x53cd4e(0x4f9)]){await _0x1fcf42[_0x53cd4e(0x66a)](_0x53cd4e(0x461),_0x50ff56,_0x480848);}}});const _0x328737=[];if(_0x11f116[_0xbad88b(0x385)])_0x328737[_0xbad88b(0x387)](_0xbad88b(0x4a1));if(_0x11f116[_0xbad88b(0x4f9)][_0xbad88b(0x503)]>0x0)_0x328737[_0xbad88b(0x387)](_0x11f116[_0xbad88b(0x4f9)][_0xbad88b(0x503)]+_0xbad88b(0x383));console[_0xbad88b(0x273)](_0xbad88b(0x1b0)+_0x328737[_0xbad88b(0x29f)]('\x20+\x20'));}catch(_0x361f76){console[_0xbad88b(0x273)]('[okdb]\x20warning:\x20failed\x20to\x20restore\x20identity/licenses\x20after\x20reset:\x20'+_0x361f76[_0xbad88b(0x1e0)]);}}async function _0x4f9507(_0x484c5e,_0x58ae19,_0x3c91ec){const _0x3eccc9=_0x5a22a6,_0x56d0a2=require$$5,_0x48a54a=new _0x56d0a2(_0x484c5e,{'admin':![],'mcp':![],'http':![],'timeMachine':![],'engines':![],'processors':![],'compaction':![],'_skipBootRuntime':!![],..._0x13ec0a(_0x58ae19)});await _0x48a54a[_0x3eccc9(0x1bc)]();try{return await _0x3c91ec(_0x48a54a);}finally{await _0x48a54a[_0x3eccc9(0x543)]();}}async function _0x1715fa(_0x5d5b2d,_0x1dd798){const _0x32e0ad=_0x5a22a6,_0x416381=require$$5,_0x53c388=_0x8e4ba8[_0x32e0ad(0x300)](_0x1dd798[_0x32e0ad(0x28e)]);console['log'](_0x32e0ad(0x5c9)+_0x53c388+'…');const _0x4885b7=new _0x416381(_0x53c388,_0x13ec0a(_0x1dd798));await _0x4885b7['open'](),console['log'](_0x32e0ad(0x552)+_0x5d5b2d+'…');const {envs:_0x28af20}=await _0x4885b7['migrate'][_0x32e0ad(0x1c2)](_0x5d5b2d);for(const _0x3940b4 of _0x28af20){const _0x39ef20=_0x3940b4[_0x32e0ad(0x259)]>0x0?'\x20\x20('+(_0x3940b4[_0x32e0ad(0x259)]/0x400/0x400)[_0x32e0ad(0x6cb)](0x2)+_0x32e0ad(0x709)+(_0x3940b4['sizeAfter']/0x400/0x400)['toFixed'](0x2)+_0x32e0ad(0x269):'';console[_0x32e0ad(0x273)]('\x20\x20✓\x20'+_0x3940b4['name']+_0x32e0ad(0x2b4)+_0x3940b4[_0x32e0ad(0x703)]+_0x39ef20);}await _0x4885b7['close'](),console['log'](_0x32e0ad(0x508));}async function _0x4ab435(_0x40ef4c,_0x27abec,_0xf7b246){const _0x2dc7fd=_0x5a22a6,_0x42e741=require$$5,_0x4015a=_0x8e4ba8[_0x2dc7fd(0x300)](_0x27abec['dbPath']),_0x2d844c=_0xf7b246['env']??_0x2dc7fd(0x445),_0x3543d7=_0xf7b246['types']?_0xf7b246[_0x2dc7fd(0x4fc)]['split'](',')[_0x2dc7fd(0x626)](_0x425aa2=>_0x425aa2['trim']()):null;console[_0x2dc7fd(0x273)](_0x2dc7fd(0x5c9)+_0x4015a+'…');const _0x526826=new _0x42e741(_0x4015a,_0x13ec0a(_0x27abec));await _0x526826[_0x2dc7fd(0x1bc)](),console[_0x2dc7fd(0x273)]('[okdb]\x20exporting\x20env\x20\x22'+_0x2d844c+_0x2dc7fd(0x581)+_0x40ef4c+'…');const _0x22ba72=await _0x526826[_0x2dc7fd(0x267)][_0x2dc7fd(0x5e9)](_0x40ef4c,{'envName':_0x2d844c,'types':_0x3543d7,'includeChanges':!!_0xf7b246[_0x2dc7fd(0x4fb)]});console[_0x2dc7fd(0x273)](_0x2dc7fd(0x303)+_0x22ba72['types']+_0x2dc7fd(0x3a7)+_0x22ba72[_0x2dc7fd(0x712)]+_0x2dc7fd(0x309)+_0x22ba72[_0x2dc7fd(0x4fb)]);if(_0xf7b246[_0x2dc7fd(0x6e9)]){const _0x24d97b=_0x8e4ba8[_0x2dc7fd(0x29f)](_0x8e4ba8['dirname'](_0x40ef4c),'blobs');process['stdout'][_0x2dc7fd(0x6cc)]('[okdb]\x20exporting\x20blobs…');const {count:_0x622b3d,bytes:_0x479edb}=await _0x526826['migrate'][_0x2dc7fd(0x27d)](_0x24d97b);console[_0x2dc7fd(0x273)](_0x2dc7fd(0x61c)+_0x24d97b+_0x2dc7fd(0x590)+_0x622b3d+_0x2dc7fd(0x408)+(_0x622b3d!==0x1?'s':'')+',\x20'+(_0x479edb/0x400/0x400)[_0x2dc7fd(0x6cb)](0x2)+_0x2dc7fd(0x269));}await _0x526826[_0x2dc7fd(0x543)](),console[_0x2dc7fd(0x273)](_0x2dc7fd(0x584));}async function _0x4f856f(_0x46a40a,_0x11928b,_0x1255b2){const _0x3ba662=_0x5a22a6,_0x4f2f6d=require$$5,_0x161ece=_0x8e4ba8[_0x3ba662(0x300)](_0x11928b[_0x3ba662(0x28e)]),_0x193dce=_0x1255b2[_0x3ba662(0x758)]??null,_0x1406f9=_0x1255b2[_0x3ba662(0x4fc)]?_0x1255b2['types'][_0x3ba662(0x3d5)](',')[_0x3ba662(0x626)](_0xb1a75e=>_0xb1a75e[_0x3ba662(0x6f3)]()):null,_0x1ba7f3=!!_0x1255b2[_0x3ba662(0x609)];console[_0x3ba662(0x273)](_0x3ba662(0x5c9)+_0x161ece+'…');const _0x25509c=new _0x4f2f6d(_0x161ece,_0x13ec0a(_0x11928b));await _0x25509c['open'](),console[_0x3ba662(0x273)](_0x3ba662(0x726)+_0x46a40a+'…');const _0x4cba22=await _0x25509c['migrate'][_0x3ba662(0x4b7)](_0x46a40a,{'envName':_0x193dce,'types':_0x1406f9,'dropExisting':_0x1ba7f3,'includeChanges':!!_0x1255b2[_0x3ba662(0x4fb)],'onProgress':({type:_0x1233e5,count:_0x1058fd})=>{const _0x2648fc=_0x3ba662;process['stdout'][_0x2648fc(0x6cc)](_0x2648fc(0x677)+_0x1233e5+':\x20'+_0x1058fd+'\x20records…');}});process[_0x3ba662(0x3f5)][_0x3ba662(0x6cc)]('\x0a'),console[_0x3ba662(0x273)](_0x3ba662(0x459)+_0x4cba22[_0x3ba662(0x4fc)]+_0x3ba662(0x3a7)+_0x4cba22[_0x3ba662(0x712)]+_0x3ba662(0x309)+_0x4cba22[_0x3ba662(0x4fb)]);if(_0x1255b2[_0x3ba662(0x6e9)]){const _0x42356d=_0x8e4ba8[_0x3ba662(0x29f)](_0x8e4ba8[_0x3ba662(0x237)](_0x46a40a),_0x3ba662(0x6e9));if(_0x2c9780[_0x3ba662(0x4b2)](_0x42356d)){const {imported:_0x45723a,skipped:_0x81f7fb}=await _0x25509c[_0x3ba662(0x267)][_0x3ba662(0x4b6)](_0x42356d);console[_0x3ba662(0x273)](_0x3ba662(0x2cd)+_0x45723a+_0x3ba662(0x68e)+_0x81f7fb);}}await _0x25509c['close'](),console[_0x3ba662(0x273)](_0x3ba662(0x71d));}async function _0x987941(_0x482b3b,_0x75c413){const _0x51a9b9=_0x5a22a6;_0x75c413[_0x51a9b9(0x298)]&&!_0x75c413[_0x51a9b9(0x378)]&&(console[_0x51a9b9(0x5b7)](_0x51a9b9(0x3d0)),process['exit'](0x1));const _0x1f6bf0=_0x75c413[_0x51a9b9(0x78a)]?_0x75c413[_0x51a9b9(0x78a)]['split'](',')[_0x51a9b9(0x626)](_0x5343d1=>_0x5343d1[_0x51a9b9(0x6f3)]())[_0x51a9b9(0x1ff)](Boolean):[];let _0x5094a9={};if(_0x75c413['grants'])try{_0x5094a9=JSON[_0x51a9b9(0x663)](_0x75c413['grants']);if(typeof _0x5094a9!==_0x51a9b9(0x40d)||Array['isArray'](_0x5094a9)||_0x5094a9===null)throw new Error();}catch{console['error']('[okdb]\x20error:\x20--grants\x20must\x20be\x20valid\x20JSON\x20object'),process[_0x51a9b9(0x393)](0x1);}const _0x1fe5fa=require$$5,{randomToken:_0x273981,hashToken:_0x409fc,hashPassword:_0x3b3ef8}=requireOkdbAuthTokens(),_0x337afb=require$$2,_0xc725e2=_0x8e4ba8[_0x51a9b9(0x300)](_0x482b3b[_0x51a9b9(0x28e)]),_0x1cd125=new _0x1fe5fa(_0xc725e2,_0x13ec0a(_0x482b3b));await _0x1cd125[_0x51a9b9(0x1bc)]();try{await _0x1cd125['auth'][_0x51a9b9(0x1ab)]();if(_0x75c413[_0x51a9b9(0x378)]){const _0x3508ff=await _0x1cd125[_0x51a9b9(0x1c4)][_0x51a9b9(0x23a)](_0x75c413[_0x51a9b9(0x378)]);_0x3508ff&&(console['error']('[okdb]\x20error:\x20token\x20with\x20name\x20\x22'+_0x75c413[_0x51a9b9(0x378)]+_0x51a9b9(0x26c)),process[_0x51a9b9(0x393)](0x1));}const _0x2e561c=_0x273981(0x20),_0x428475=_0x409fc(_0x2e561c),_0x2dd6b3=_0x75c413[_0x51a9b9(0x298)]?await _0x3b3ef8(_0x75c413[_0x51a9b9(0x298)]):null,_0x7cd53c=_0x337afb[_0x51a9b9(0x3ef)](),_0x1d9e15={'tokenHash':_0x428475,'name':_0x75c413[_0x51a9b9(0x378)]||null,'passwordHash':_0x2dd6b3,'label':_0x75c413[_0x51a9b9(0x4c5)]||null,'permissions':_0x1f6bf0,'grants':_0x5094a9,'createdAt':Date[_0x51a9b9(0x6fd)](),'lastUsedAt':null},_0x5b0e8d=_0x75c413[_0x51a9b9(0x741)]?{'ttl':Number(_0x75c413['ttl'])}:undefined;await _0x1cd125[_0x51a9b9(0x791)]['put'](_0x51a9b9(0x70d),_0x7cd53c,_0x1d9e15,_0x5b0e8d),console[_0x51a9b9(0x273)](_0x51a9b9(0x5df)),console[_0x51a9b9(0x273)](_0x51a9b9(0x41c)+_0x7cd53c),console[_0x51a9b9(0x273)](_0x51a9b9(0x646)+(_0x75c413[_0x51a9b9(0x378)]||_0x51a9b9(0x263))),console['log'](_0x51a9b9(0x3c6)+(_0x75c413[_0x51a9b9(0x4c5)]||_0x51a9b9(0x263))),console[_0x51a9b9(0x273)]('\x20\x20\x20\x20permissions:\x20'+(_0x1f6bf0['join'](',\x20')||'(none)')),console['log']('\x0a\x20\x20Raw\x20token\x20(shown\x20once,\x20save\x20it\x20now):\x0a'),console[_0x51a9b9(0x273)](_0x51a9b9(0x583)+_0x2e561c+'\x0a');}finally{await _0x1cd125[_0x51a9b9(0x543)]();}}async function _0x202504(_0x16d48f){const _0x4bfe0d=_0x5a22a6,_0x48bd5c=require$$5,_0x693fae=_0x8e4ba8[_0x4bfe0d(0x300)](_0x16d48f[_0x4bfe0d(0x28e)]),_0x5d0aa6=new _0x48bd5c(_0x693fae,_0x13ec0a(_0x16d48f));await _0x5d0aa6['open']();try{const _0x1daac5=_0x5d0aa6[_0x4bfe0d(0x791)];if(!_0x1daac5||!_0x1daac5[_0x4bfe0d(0x4d9)](_0x4bfe0d(0x70d))){console[_0x4bfe0d(0x273)]('No\x20tokens.');return;}const _0x1f7aa7=[];for(const {key:_0x4805ee,value:_0x4d28bf}of _0x1daac5[_0x4bfe0d(0x73f)]('~tokens')){_0x1f7aa7['push']({'id':_0x4805ee,'name':_0x4d28bf[_0x4bfe0d(0x378)]||_0x4bfe0d(0x263),'label':_0x4d28bf[_0x4bfe0d(0x4c5)]||'(unset)','permissions':Array['isArray'](_0x4d28bf[_0x4bfe0d(0x78a)])?_0x4d28bf['permissions'][_0x4bfe0d(0x29f)](','):'','created':_0x4d28bf['createdAt']?new Date(_0x4d28bf['createdAt'])[_0x4bfe0d(0x2d7)]()['slice'](0x0,0xa):''});}if(_0x1f7aa7['length']===0x0){console[_0x4bfe0d(0x273)]('No\x20tokens.');return;}const _0x2702da=!process[_0x4bfe0d(0x3f5)][_0x4bfe0d(0x3df)]||process[_0x4bfe0d(0x3f5)][_0x4bfe0d(0x3df)]>=0x64,_0x1abb3c=_0x2702da?0x24:0xa,_0x25bd70=['ID'[_0x4bfe0d(0x619)](_0x1abb3c),_0x4bfe0d(0x25a)[_0x4bfe0d(0x619)](0x10),_0x4bfe0d(0x6fb)[_0x4bfe0d(0x619)](0x14),'PERMISSIONS'[_0x4bfe0d(0x619)](0x14),_0x4bfe0d(0x710)]['join']('\x20\x20');console['log']('\x0a'+_0x25bd70),console[_0x4bfe0d(0x273)]('-'[_0x4bfe0d(0x3ba)](_0x25bd70[_0x4bfe0d(0x503)]));for(const _0x172e3a of _0x1f7aa7){const _0x1ae83b=_0x2702da?_0x172e3a['id']:_0x172e3a['id'][_0x4bfe0d(0x5b8)](0x0,0x8)+'…';console[_0x4bfe0d(0x273)]([_0x1ae83b[_0x4bfe0d(0x619)](_0x1abb3c),_0x172e3a[_0x4bfe0d(0x378)][_0x4bfe0d(0x5b8)](0x0,0x10)[_0x4bfe0d(0x619)](0x10),_0x172e3a[_0x4bfe0d(0x4c5)][_0x4bfe0d(0x5b8)](0x0,0x14)[_0x4bfe0d(0x619)](0x14),_0x172e3a[_0x4bfe0d(0x78a)][_0x4bfe0d(0x5b8)](0x0,0x14)['padEnd'](0x14),_0x172e3a[_0x4bfe0d(0x55e)]][_0x4bfe0d(0x29f)]('\x20\x20'));}console[_0x4bfe0d(0x273)]('');}finally{await _0x5d0aa6[_0x4bfe0d(0x543)]();}}async function _0x294de0(_0x41473c,_0x593554){const _0x307c93=_0x5a22a6;!_0x41473c&&(console[_0x307c93(0x5b7)](_0x307c93(0x230)),process['exit'](0x1));const _0x433a7a=require$$5,_0x19e0eb=_0x8e4ba8[_0x307c93(0x300)](_0x593554[_0x307c93(0x28e)]),_0x4fd1bd=new _0x433a7a(_0x19e0eb,_0x13ec0a(_0x593554));await _0x4fd1bd[_0x307c93(0x1bc)]();try{const _0x3beba8=_0x4fd1bd[_0x307c93(0x791)];(!_0x3beba8||!_0x3beba8[_0x307c93(0x4d9)](_0x307c93(0x70d)))&&(console[_0x307c93(0x5b7)](_0x307c93(0x735)+_0x41473c+'\x22'),process['exit'](0x1));let _0x1c404d=null,_0x5092fd=null;const _0x1dc7a4=_0x3beba8[_0x307c93(0x3e6)](_0x307c93(0x70d),_0x41473c);if(_0x1dc7a4)_0x1c404d=_0x41473c,_0x5092fd=_0x1dc7a4;else{const _0x38c9d7=[];for(const {key:_0x2be66d,value:_0x137ca9}of _0x3beba8[_0x307c93(0x73f)]('~tokens')){if(_0x2be66d[_0x307c93(0x637)](_0x41473c))_0x38c9d7['push']({'key':_0x2be66d,'value':_0x137ca9});}_0x38c9d7[_0x307c93(0x503)]===0x0&&(console[_0x307c93(0x5b7)](_0x307c93(0x735)+_0x41473c+'\x22'),process['exit'](0x1));if(_0x38c9d7[_0x307c93(0x503)]>0x1){console['error'](_0x307c93(0x36d)+_0x41473c+'\x22\x20matches\x20'+_0x38c9d7[_0x307c93(0x503)]+_0x307c93(0x307));for(const _0x39ba12 of _0x38c9d7){console['error']('\x20\x20'+_0x39ba12[_0x307c93(0x566)]+_0x307c93(0x357)+(_0x39ba12[_0x307c93(0x481)][_0x307c93(0x378)]||'(unset)')+')');}process[_0x307c93(0x393)](0x1);}_0x1c404d=_0x38c9d7[0x0][_0x307c93(0x566)],_0x5092fd=_0x38c9d7[0x0][_0x307c93(0x481)];}await _0x3beba8[_0x307c93(0x488)](_0x307c93(0x70d),_0x1c404d),console[_0x307c93(0x273)]('\x20\x20✓\x20Revoked\x20token\x20'+_0x1c404d+_0x307c93(0x357)+(_0x5092fd['name']||_0x307c93(0x263))+_0x307c93(0x3d1)+(_0x5092fd['label']||'(unset)')+')');}finally{await _0x4fd1bd[_0x307c93(0x543)]();}}function _0x3432f5(_0x2f9603,_0x2211de){const _0x418c99=_0x5a22a6;if(!_0x2f9603[_0x418c99(0x6c5)])return _0x418c99(0x2f0);const _0x3b9586=_0x2f9603[_0x418c99(0x4f7)];if(!_0x3b9586)return'active';if(_0x2211de>_0x3b9586)return'expired';return _0x418c99(0x569);}function _0x180e58(_0x2ffc76){const _0x2b8e8a=_0x5a22a6;if(!_0x2ffc76||typeof _0x2ffc76!==_0x2b8e8a(0x40d))return'';const _0x22e6f7=Object[_0x2b8e8a(0x62b)](_0x2ffc76)[_0x2b8e8a(0x1ff)](([,_0x266567])=>_0x266567)[_0x2b8e8a(0x626)](([_0x2ce596])=>_0x2ce596);if(_0x22e6f7[_0x2b8e8a(0x503)]===0x0)return _0x2b8e8a(0x466);if(_0x22e6f7[_0x2b8e8a(0x503)]<=0x3)return _0x22e6f7[_0x2b8e8a(0x29f)]('\x20');return _0x22e6f7['slice'](0x0,0x3)[_0x2b8e8a(0x29f)]('\x20')+('\x20+'+(_0x22e6f7[_0x2b8e8a(0x503)]-0x3));}async function _0x4aa96c(_0x3d96ee){const _0x5ac385=_0x5a22a6,_0x12c82a=require$$5,_0x2765a9=requireOkdbLicenseCodec(),{_C:_0xf508d2}=requireOkdbLicense(),_0x36c20b=_0x8e4ba8[_0x5ac385(0x300)](_0x3d96ee['dbPath']),_0x5d5bbc=new _0x12c82a(_0x36c20b,_0x13ec0a(_0x3d96ee));await _0x5d5bbc['open']();try{const _0x1c1e01=_0x5d5bbc[_0x5ac385(0x791)],_0x34c9ec=_0x1c1e01?.['db']?.[_0x5ac385(0x3e6)]?.(_0x5ac385(0x74d))??0x0,_0x3f313a=[..._0x5d5bbc['_envs']['keys']()][_0x5ac385(0x1ff)](_0x36aef6=>!_0x36aef6[_0x5ac385(0x637)]('~'))[_0x5ac385(0x503)],_0x152efd=_0x5d5bbc[_0x5ac385(0x26a)]?.[_0x5ac385(0x236)];if(_0x152efd){const _0x2cbdae=_0x152efd[_0x5ac385(0x3ad)]===!![],_0x1d5f35=_0x2cbdae?'free\x20tier':_0x5d5bbc[_0x5ac385(0x26a)]['active']?.[_0x5ac385(0x67a)]||'licensed';console['log'](''),console[_0x5ac385(0x273)]('\x20\x20Tier:\x20\x20\x20\x20'+_0x1d5f35);const _0x28aa4e=_0x152efd[_0x5ac385(0x3aa)]||{};if(_0x28aa4e[_0x5ac385(0x344)]){const _0x16e999=Math[_0x5ac385(0x6bd)](_0x34c9ec/_0x28aa4e[_0x5ac385(0x344)]*0x64);console[_0x5ac385(0x273)](_0x5ac385(0x69d)+_0x34c9ec[_0x5ac385(0x530)]()+_0x5ac385(0x78d)+_0x28aa4e[_0x5ac385(0x344)][_0x5ac385(0x530)]()+'\x20\x20('+_0x16e999+'%)');}else console[_0x5ac385(0x273)]('\x20\x20Writes:\x20\x20'+_0x34c9ec[_0x5ac385(0x530)]());_0x28aa4e[_0x5ac385(0x364)]?console[_0x5ac385(0x273)]('\x20\x20Envs:\x20\x20\x20\x20'+_0x3f313a+_0x5ac385(0x78d)+_0x28aa4e[_0x5ac385(0x364)]):console[_0x5ac385(0x273)](_0x5ac385(0x3c9)+_0x3f313a),_0xf508d2?.[_0x5ac385(0x6a8)]&&console[_0x5ac385(0x273)](_0x5ac385(0x5be)+_0xf508d2[_0x5ac385(0x6a8)]+_0x5ac385(0x6bc));}if(!_0x1c1e01||!_0x1c1e01[_0x5ac385(0x4d9)](_0x5ac385(0x461))){console['log'](''),console[_0x5ac385(0x273)](_0x5ac385(0x718)),console[_0x5ac385(0x273)]('');return;}const _0x3ff83d=[],_0x27d7a7=Date[_0x5ac385(0x6fd)](),_0x110a94=_0x5d5bbc['id'],_0x1fd221=_0x5ac385(0x6d9);for(const {key:_0x55b844,value:_0x313278}of _0x1c1e01[_0x5ac385(0x73f)](_0x5ac385(0x461))){const _0x2735dd=_0x313278['_licenseHash']?Buffer['from'](_0x313278['_licenseHash'],_0x5ac385(0x767)):Buffer[_0x5ac385(0x715)](0x8);let _0x3bbd82='';try{_0x3bbd82=_0x2765a9[_0x5ac385(0x19c)](_0x110a94,_0x2735dd,_0x1fd221)['pin'];}catch{}_0x3ff83d[_0x5ac385(0x387)]({'id':_0x55b844,'licensee':_0x313278[_0x5ac385(0x67a)]||'','expires':_0x313278[_0x5ac385(0x4f7)]?new Date(_0x313278[_0x5ac385(0x4f7)])[_0x5ac385(0x2d7)]()[_0x5ac385(0x5b8)](0x0,0xa):'','features':_0x180e58(_0x313278[_0x5ac385(0x2e2)]),'pin':_0x3bbd82,'status':_0x3432f5(_0x313278,_0x27d7a7)});}if(_0x3ff83d[_0x5ac385(0x503)]===0x0){console[_0x5ac385(0x273)](''),console[_0x5ac385(0x273)]('\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.'),console['log']('');return;}const _0x2245f4=['\x20\x20'+'ID'[_0x5ac385(0x619)](0xe),'LICENSEE'[_0x5ac385(0x619)](0xe),'EXPIRES'[_0x5ac385(0x619)](0xc),'FEATURES'[_0x5ac385(0x619)](0x1e),_0x5ac385(0x74c)[_0x5ac385(0x619)](0xa),'STATUS'][_0x5ac385(0x29f)]('\x20');console[_0x5ac385(0x273)]('\x0a'+_0x2245f4);for(const _0x15ca26 of _0x3ff83d){const _0x2c16e9=_0x15ca26['id'][_0x5ac385(0x5b8)](0x0,0x8)+'\u2026';console[_0x5ac385(0x273)](['\x20\x20'+_0x2c16e9[_0x5ac385(0x619)](0xe),_0x15ca26[_0x5ac385(0x67a)][_0x5ac385(0x5b8)](0x0,0xe)[_0x5ac385(0x619)](0xe),_0x15ca26[_0x5ac385(0x4a6)]['padEnd'](0xc),_0x15ca26[_0x5ac385(0x2e2)][_0x5ac385(0x5b8)](0x0,0x1e)[_0x5ac385(0x619)](0x1e),_0x15ca26['pin'][_0x5ac385(0x619)](0xa),_0x15ca26[_0x5ac385(0x7a3)]][_0x5ac385(0x29f)]('\x20'));}console['log']('');}finally{await _0x5d5bbc[_0x5ac385(0x543)]();}}async function _0x1eb9cc(_0x5f2cc5,_0x47931f){const _0x100144=_0x5a22a6,_0x51491c=require$$5,_0x49416f=requireOkdbLicenseCodec();let _0x2eac68=_0x5f2cc5;(_0x49416f[_0x100144(0x4ab)](_0x5f2cc5)==='path'||_0x2c9780['existsSync'](_0x5f2cc5)&&_0x2c9780['statSync'](_0x5f2cc5)['isFile']())&&(_0x2eac68=_0x2c9780[_0x100144(0x2a8)](_0x5f2cc5,_0x100144(0x6f6))[_0x100144(0x6f3)]());const _0x403472=_0x8e4ba8[_0x100144(0x300)](_0x47931f[_0x100144(0x28e)]),_0x3c7d41=new _0x51491c(_0x403472,_0x13ec0a(_0x47931f));await _0x3c7d41['open']();try{let _0x573bef;try{_0x573bef=await _0x3c7d41['licenses']['add']({'blob':_0x2eac68});}catch(_0x460390){console[_0x100144(0x5b7)]('[okdb]\x20error:\x20'+_0x460390[_0x100144(0x1e0)]),process[_0x100144(0x393)](0x1);}const _0x46232b=_0x573bef['pin']||'',_0x138a89=Object['entries'](_0x573bef['features']||{})[_0x100144(0x1ff)](([,_0x231852])=>_0x231852)[_0x100144(0x626)](([_0x2e7915])=>_0x2e7915),_0x318c03=_0x573bef[_0x100144(0x3aa)]||{},_0x124ffb=[_0x318c03[_0x100144(0x364)]?_0x100144(0x2d0)+_0x318c03['envs']:null,_0x318c03['typesPerEnv']?'types/env='+_0x318c03[_0x100144(0x200)]:null,_0x318c03[_0x100144(0x313)]?_0x100144(0x5ee)+_0x318c03[_0x100144(0x313)]:null,_0x318c03['maxWrites']?_0x100144(0x632)+_0x318c03[_0x100144(0x344)][_0x100144(0x530)]():null][_0x100144(0x1ff)](Boolean)[_0x100144(0x29f)]('\x20\x20'),_0x22a1b0=_0x573bef['type']!=='standard';console[_0x100144(0x273)](_0x573bef[_0x100144(0x63c)]?_0x100144(0x73c):_0x100144(0x495)),console[_0x100144(0x273)](_0x100144(0x207)+_0x573bef['id']),console[_0x100144(0x273)](_0x100144(0x415)+_0x573bef['licensee']),console[_0x100144(0x273)]('\x20\x20\x20\x20expires:\x20\x20\x20'+(_0x573bef[_0x100144(0x4f7)]?new Date(_0x573bef[_0x100144(0x4f7)])['toISOString']()[_0x100144(0x5b8)](0x0,0xa):'never')),console['log']('\x20\x20\x20\x20features:\x20\x20'+(_0x138a89['join'](',\x20')||'(none)'));if(_0x124ffb)console[_0x100144(0x273)](_0x100144(0x55d)+_0x124ffb);if(_0x22a1b0)console[_0x100144(0x273)](_0x100144(0x730)+_0x573bef['type']+_0x100144(0x622)),console['log']('');else!_0x573bef['needsActivation']?(console[_0x100144(0x273)](_0x100144(0x2a6)+_0x573bef[_0x100144(0x7a3)]),console[_0x100144(0x273)]('')):(console[_0x100144(0x273)](_0x100144(0x616)+_0x46232b),console['log'](_0x100144(0x5ae)),console[_0x100144(0x273)](''),console[_0x100144(0x273)]('\x20\x20Next\x20step\x20\u2014\x20activate\x20the\x20license:'),console[_0x100144(0x273)]('\x20\x20\x20\x201.\x20Send\x20the\x20PIN\x20above\x20('+_0x46232b+_0x100144(0x225)),console[_0x100144(0x273)](_0x100144(0x210)),console[_0x100144(0x273)](_0x100144(0x25b)),console[_0x100144(0x273)](''));}finally{await _0x3c7d41['close']();}}async function _0x3aad41(_0x5ecc33,_0x27bdec){const _0x5c5ebd=_0x5a22a6,_0x5cad2b=require$$5,_0x3e263c=_0x8e4ba8[_0x5c5ebd(0x300)](_0x27bdec['dbPath']),_0x7a8eb1=new _0x5cad2b(_0x3e263c,_0x13ec0a(_0x27bdec));await _0x7a8eb1['open']();try{let _0xb7c184;try{_0xb7c184=await _0x7a8eb1[_0x5c5ebd(0x4f9)]['activate'](_0x5ecc33);}catch(_0x303827){console['error'](_0x5c5ebd(0x31a)+_0x303827[_0x5c5ebd(0x1e0)]),console[_0x5c5ebd(0x5b7)](''),console['error'](_0x5c5ebd(0x669)),console[_0x5c5ebd(0x5b7)](_0x5c5ebd(0x22f)),console[_0x5c5ebd(0x5b7)](_0x5c5ebd(0x6b2)),console[_0x5c5ebd(0x5b7)](_0x5c5ebd(0x702)),console[_0x5c5ebd(0x5b7)](''),process['exit'](0x1);}console[_0x5c5ebd(0x273)](_0x5c5ebd(0x75f)),console['log']('\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20'+_0xb7c184['id']),console[_0x5c5ebd(0x273)](_0x5c5ebd(0x415)+_0xb7c184[_0x5c5ebd(0x67a)]),console[_0x5c5ebd(0x273)](_0x5c5ebd(0x223)+(_0xb7c184[_0x5c5ebd(0x4f7)]?new Date(_0xb7c184['expiresAt'])['toISOString']()[_0x5c5ebd(0x5b8)](0x0,0xa):_0x5c5ebd(0x2c8))),console[_0x5c5ebd(0x273)](_0x5c5ebd(0x6a5)),console[_0x5c5ebd(0x273)]('');}finally{await _0x7a8eb1[_0x5c5ebd(0x543)]();}}async function _0x287077(_0x2aff0d,_0x24c72e){const _0x1bb487=_0x5a22a6;!_0x2aff0d&&(console['error'](_0x1bb487(0x19f)),process[_0x1bb487(0x393)](0x1));const _0x5f23b2=require$$5,_0x214f12=requireOkdbLicenseCodec(),_0x19c929=_0x8e4ba8[_0x1bb487(0x300)](_0x24c72e[_0x1bb487(0x28e)]),_0x59ab9f=new _0x5f23b2(_0x19c929,_0x13ec0a(_0x24c72e));await _0x59ab9f[_0x1bb487(0x1bc)]();try{const _0x1dcaeb=_0x59ab9f[_0x1bb487(0x791)];(!_0x1dcaeb||!_0x1dcaeb[_0x1bb487(0x4d9)]('~licenses'))&&(console[_0x1bb487(0x5b7)]('[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22'+_0x2aff0d+'\x22'),process[_0x1bb487(0x393)](0x1));let _0x2e54d7=null,_0x4f3d33=null;const _0x2274c8=_0x1dcaeb['get'](_0x1bb487(0x461),_0x2aff0d);if(_0x2274c8)_0x2e54d7=_0x2aff0d,_0x4f3d33=_0x2274c8;else{const _0x138c83=[];for(const {key:_0x21292b,value:_0x4d7324}of _0x1dcaeb[_0x1bb487(0x73f)]('~licenses')){if(_0x21292b[_0x1bb487(0x637)](_0x2aff0d))_0x138c83[_0x1bb487(0x387)]({'key':_0x21292b,'value':_0x4d7324});}_0x138c83[_0x1bb487(0x503)]===0x0&&(console['error']('[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22'+_0x2aff0d+'\x22'),process[_0x1bb487(0x393)](0x1)),_0x138c83['length']>0x1&&(console[_0x1bb487(0x5b7)](_0x1bb487(0x36d)+_0x2aff0d+'\x22\x20matches\x20'+_0x138c83[_0x1bb487(0x503)]+_0x1bb487(0x523)),process[_0x1bb487(0x393)](0x1)),_0x2e54d7=_0x138c83[0x0]['key'],_0x4f3d33=_0x138c83[0x0][_0x1bb487(0x481)];}const _0x241fa4=Date[_0x1bb487(0x6fd)](),_0x276813=_0x3432f5(_0x4f3d33,_0x241fa4),_0x4d0368=_0x59ab9f['id'],_0x15f4c3=_0x1bb487(0x6d9);let _0x242309='';try{const _0x55274d=Buffer[_0x1bb487(0x2f3)](_0x4f3d33[_0x1bb487(0x3a4)],_0x1bb487(0x767));_0x242309=_0x214f12[_0x1bb487(0x19c)](_0x4d0368,_0x55274d,_0x15f4c3)[_0x1bb487(0x478)];}catch{}const _0x24477b=_0x4f3d33[_0x1bb487(0x2e2)]?Object[_0x1bb487(0x62b)](_0x4f3d33['features'])[_0x1bb487(0x1ff)](([,_0x836989])=>_0x836989)[_0x1bb487(0x626)](([_0x4b3dcb])=>_0x4b3dcb):[],_0x41a460=_0x4f3d33[_0x1bb487(0x3aa)]||{},_0x235802=_0x1dcaeb?.['db']?.[_0x1bb487(0x3e6)]?.(_0x1bb487(0x74d))??0x0,_0x22c241=[..._0x59ab9f['_envs']['keys']()][_0x1bb487(0x1ff)](_0x1764cc=>!_0x1764cc[_0x1bb487(0x637)]('~'))[_0x1bb487(0x503)];console[_0x1bb487(0x273)](_0x1bb487(0x18b)),console[_0x1bb487(0x273)](_0x1bb487(0x207)+_0x2e54d7),console[_0x1bb487(0x273)](_0x1bb487(0x415)+(_0x4f3d33[_0x1bb487(0x67a)]||'')),console['log'](_0x1bb487(0x223)+(_0x4f3d33['expiresAt']?new Date(_0x4f3d33[_0x1bb487(0x4f7)])[_0x1bb487(0x2d7)]()[_0x1bb487(0x5b8)](0x0,0xa):'')),console['log'](_0x1bb487(0x645)+(_0x24477b[_0x1bb487(0x29f)](',\x20')||_0x1bb487(0x466))),console[_0x1bb487(0x273)](_0x1bb487(0x616)+_0x242309),console['log'](_0x1bb487(0x2a6)+_0x276813),console[_0x1bb487(0x273)](_0x1bb487(0x792)+new Date(_0x4f3d33[_0x1bb487(0x4c4)])[_0x1bb487(0x2d7)]());if(_0x276813===_0x1bb487(0x569)){console['log'](''),console[_0x1bb487(0x273)](_0x1bb487(0x460));if(_0x41a460[_0x1bb487(0x344)]){const _0x23f97a=Math[_0x1bb487(0x6bd)](_0x235802/_0x41a460[_0x1bb487(0x344)]*0x64);console[_0x1bb487(0x273)](_0x1bb487(0x692)+_0x235802[_0x1bb487(0x530)]()+_0x1bb487(0x78d)+_0x41a460['maxWrites'][_0x1bb487(0x530)]()+_0x1bb487(0x590)+_0x23f97a+'%)');}else console[_0x1bb487(0x273)](_0x1bb487(0x692)+_0x235802[_0x1bb487(0x530)]()+'\x20\x20(unlimited)');_0x41a460[_0x1bb487(0x364)]?console[_0x1bb487(0x273)](_0x1bb487(0x43e)+_0x22c241+_0x1bb487(0x78d)+_0x41a460[_0x1bb487(0x364)]):console[_0x1bb487(0x273)](_0x1bb487(0x43e)+_0x22c241+_0x1bb487(0x6e0));}console[_0x1bb487(0x273)]('');}finally{await _0x59ab9f[_0x1bb487(0x543)]();}}async function _0x167be8(_0x1dec7d,_0x1575f0){const _0x44ddff=_0x5a22a6;!_0x1dec7d&&(console[_0x44ddff(0x5b7)](_0x44ddff(0x4bb)),process['exit'](0x1));const _0x9925e4=require$$5,_0x2e5e1f=_0x8e4ba8[_0x44ddff(0x300)](_0x1575f0[_0x44ddff(0x28e)]),_0x55e82e=new _0x9925e4(_0x2e5e1f,_0x13ec0a(_0x1575f0));await _0x55e82e['open']();try{const _0x1ef46b=_0x55e82e[_0x44ddff(0x791)];(!_0x1ef46b||!_0x1ef46b[_0x44ddff(0x4d9)](_0x44ddff(0x461)))&&(console[_0x44ddff(0x5b7)]('[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22'+_0x1dec7d+'\x22'),process['exit'](0x1));let _0x545525=null,_0x101918=null;const _0x42a5ef=_0x1ef46b[_0x44ddff(0x3e6)](_0x44ddff(0x461),_0x1dec7d);if(_0x42a5ef)_0x545525=_0x1dec7d,_0x101918=_0x42a5ef;else{const _0x51a9d8=[];for(const {key:_0x340b23,value:_0x27533b}of _0x1ef46b['getRange'](_0x44ddff(0x461))){if(_0x340b23['startsWith'](_0x1dec7d))_0x51a9d8[_0x44ddff(0x387)]({'key':_0x340b23,'value':_0x27533b});}_0x51a9d8[_0x44ddff(0x503)]===0x0&&(console[_0x44ddff(0x5b7)](_0x44ddff(0x2db)+_0x1dec7d+'\x22'),process[_0x44ddff(0x393)](0x1)),_0x51a9d8[_0x44ddff(0x503)]>0x1&&(console['error'](_0x44ddff(0x36d)+_0x1dec7d+_0x44ddff(0x1f7)+_0x51a9d8[_0x44ddff(0x503)]+_0x44ddff(0x523)),process[_0x44ddff(0x393)](0x1)),_0x545525=_0x51a9d8[0x0]['key'],_0x101918=_0x51a9d8[0x0]['value'];}await _0x1ef46b[_0x44ddff(0x488)](_0x44ddff(0x461),_0x545525),console['log'](_0x44ddff(0x706)+_0x545525+'\x20\x20(licensee:\x20'+(_0x101918[_0x44ddff(0x67a)]||_0x44ddff(0x263))+')');}finally{await _0x55e82e[_0x44ddff(0x543)]();}}async function _0x86c751(_0x3658d5,_0x5d20d8,_0x460e86){const _0xec44f1=_0x5a22a6;!_0x3658d5&&(console[_0xec44f1(0x5b7)]('[okdb]\x20error:\x20join\x20requires\x20a\x20remote\x20address.\x20Usage:\x20okdb\x20join\x20<address>\x20--token\x20<t>'),process[_0xec44f1(0x393)](0x1));!_0x460e86[_0xec44f1(0x4ca)]&&!(_0x460e86[_0xec44f1(0x376)]&&_0x460e86[_0xec44f1(0x298)])&&(console[_0xec44f1(0x5b7)](_0xec44f1(0x6b8)),process[_0xec44f1(0x393)](0x1));const _0x257a5e=_0x460e86['selfAddress']||_0x5d20d8['sync']?.[_0xec44f1(0x52a)];!_0x257a5e&&(console[_0xec44f1(0x5b7)](_0xec44f1(0x432)+_0xec44f1(0x766)+_0xec44f1(0x4bd)),process[_0xec44f1(0x393)](0x1));const _0x2fde69=require$$5,_0xbed865=new _0x2fde69(_0x5d20d8[_0xec44f1(0x28e)],{'sync':{'address':_0x257a5e,'auto_reconcile':![]}});await _0xbed865[_0xec44f1(0x1bc)]();try{const _0x3c9d66=_0xbed865[_0xec44f1(0x791)];if(_0x3c9d66&&_0x3c9d66[_0xec44f1(0x4d9)](_0xec44f1(0x70d))){let _0x2e0d11=![];for(const _0x5e298b of _0x3c9d66[_0xec44f1(0x73f)](_0xec44f1(0x70d))){_0x2e0d11=!![];break;}_0x2e0d11&&console[_0xec44f1(0x273)](_0xec44f1(0x1aa)+'\x20\x20after\x20sync.\x20Duplicate\x20names\x20will\x20surface\x20as\x20ambiguous\x20logins\x20to\x20clean\x20up.');}console[_0xec44f1(0x273)](_0xec44f1(0x1b1)+_0x3658d5+'…'),await _0xbed865[_0xec44f1(0x317)][_0xec44f1(0x29f)](_0x3658d5[_0xec44f1(0x18e)](/\/+$/,''),{'token':_0x460e86['token'],'username':_0x460e86[_0xec44f1(0x376)],'password':_0x460e86['password']}),console['log'](_0xec44f1(0x6a9)),console[_0xec44f1(0x273)](_0xec44f1(0x449));}finally{await _0xbed865[_0xec44f1(0x543)]();}}async function _0x49634e(){const _0x40bc18=_0x5a22a6,_0x24e901=Date[_0x40bc18(0x6fd)](),_0x3abac3=_0x1b8588(process[_0x40bc18(0x749)]),_0x2c0570=_0x14062f(_0x3abac3),_0x17af1a=_0x8e4ba8[_0x40bc18(0x300)](_0x2c0570['dbPath']);!_0x2c0570[_0x40bc18(0x674)]&&!process[_0x40bc18(0x6b5)][_0x40bc18(0x53f)]&&(_0x2c0570[_0x40bc18(0x674)]=!![]);const _0x411f9d=require$$5,{start:_0x24935b,colorLog:_0x5552c7}=requireOkdbShell(),_0x234992=require$$1$2,_0x5f355f={..._0x2c0570[_0x40bc18(0x566)]?{'encryptionKey':_0x2c0570[_0x40bc18(0x566)]}:{},..._0x2c0570[_0x40bc18(0x6b6)]?{'admin':![]}:_0x5e0778(_0x2c0570[_0x40bc18(0x4f4)])?{'admin':_0x2c0570['admin']}:{},..._0x5e0778(_0x2c0570[_0x40bc18(0x24f)])?{'api':_0x2c0570['api']}:{},..._0x5e0778(_0x2c0570['auth'])?{'auth':_0x2c0570[_0x40bc18(0x1c4)]}:{},..._0x5e0778(_0x2c0570[_0x40bc18(0x79a)])?{'mcp':_0x2c0570['mcp']}:{},..._0x2c0570['timeMachine']!==![]?{'timeMachine':_0x2c0570[_0x40bc18(0x244)]}:{},...Object[_0x40bc18(0x6fe)](_0x5e827f['filter'](_0x21d5ae=>_0x2c0570[_0x21d5ae]!==undefined)['map'](_0x4b44bf=>[_0x4b44bf,_0x2c0570[_0x4b44bf]]))},_0x5ca2f2=_0x3f588f(_0x2c0570);if(!_0x234992[_0x40bc18(0x698)]){const _0x2b41bc=_0x426793(),_0x13fdaa=_0x2c0570['noCluster']?_0x40bc18(0x1e8):_0x2c0570[_0x40bc18(0x5cb)]!=null&&_0x2c0570[_0x40bc18(0x5cb)]!==''?_0x40bc18(0x3b2):process.env.OKDB_HTTP_WORKERS?_0x40bc18(0x2a7):_0x2c0570['http']?.[_0x40bc18(0x5f3)]!=null?_0x40bc18(0x6d2):_0x40bc18(0x21f)+Math['max'](0x1,require$$0[_0x40bc18(0x573)]()[_0x40bc18(0x503)]-0x1);process[_0x40bc18(0x3f5)]['write'](_0x40bc18(0x4b8)+_0x5ca2f2+'\x20('+_0x13fdaa+(!_0x2b41bc?_0x40bc18(0x450):'')+')\x0a');}if(_0x234992[_0x40bc18(0x698)]){const _0x41cfa3={..._0x5f355f},_0x4c4ff5=new _0x411f9d(_0x17af1a,_0x41cfa3);_0x4c4ff5['log'][_0x40bc18(0x235)]?.();const _0x47e50e=process.env.OKDB_CLUSTER_SLOT??'?',_0x120b10={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x1e8687=_0x120b10[_0x2c0570[_0x40bc18(0x6d3)]]??_0x120b10[_0x40bc18(0x77a)];_0x4c4ff5[_0x40bc18(0x273)]['attach'](_0x485ce7=>{const _0x257e2f=_0x40bc18;if((_0x120b10[_0x485ce7[_0x257e2f(0x3f4)]]??0x1)<_0x1e8687)return;try{process[_0x257e2f(0x2bc)]?.({'__okdbCluster':_0x257e2f(0x273),'slot':_0x47e50e,'pid':process[_0x257e2f(0x789)],'entry':_0x485ce7});}catch{}}),await _0x4c4ff5[_0x40bc18(0x1bc)]();const {attachWorkerCluster:_0x37ad4f}=requireOkdbCluster();_0x37ad4f(_0x4c4ff5),await _0x4dc6fd(_0x4c4ff5,_0x2c0570['port'],_0x1a2551(_0x2c0570));return;}if(_0x5ca2f2>0x1){const {runClustered:_0xf38ed9}=requireOkdbCluster(),_0x1225e5=new _0x411f9d(_0x17af1a,{..._0x5f355f,'engines':![],'processors':![],'compaction':![]});await _0x1225e5[_0x40bc18(0x1bc)]();const _0x5d1bf7=async()=>{const _0x2a7e32=_0x40bc18,_0x473c1c=new _0x411f9d(_0x17af1a,{..._0x5f355f});return await _0x473c1c[_0x2a7e32(0x1bc)](),_0x473c1c;},_0x3e5a3f=Object[_0x40bc18(0x6fe)](_0x5e827f['map'](_0x1b97e5=>[_0x1b97e5,_0x5f355f[_0x1b97e5]??!![]])),{formatListenAddr:_0x2bd406}=requireOkdbHttp(),_0x349b46=_0x2bd406(_0x2c0570['port'],_0x2c0570[_0x40bc18(0x635)]?.[_0x40bc18(0x76f)]),_0x1a4ea4=_0xf38ed9({'workers':_0x5ca2f2,'makeOkdb':_0x5d1bf7,'port':_0x2c0570[_0x40bc18(0x5f6)],'primaryOkdb':_0x1225e5,'workerRole':_0x3e5a3f,'listenAddr':_0x349b46});let _0x3c165f=![];async function _0x20100e(_0x1a8010){const _0x270028=_0x40bc18;_0x3c165f&&(process[_0x270028(0x556)][_0x270028(0x6cc)]('\x0a[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a'),process[_0x270028(0x393)](0x82));_0x3c165f=!![],process['stderr']['write']('\x0a[okdb]\x20received\x20'+(_0x1a8010||'shutdown')+_0x270028(0x1af));const _0x47024c=setTimeout(()=>{const _0x1cd08c=_0x270028;process[_0x1cd08c(0x556)]['write'](_0x1cd08c(0x446)),process[_0x1cd08c(0x393)](0x0);},0xbb8);_0x47024c[_0x270028(0x442)]?.();try{await _0x1a4ea4['close']();}catch(_0x1e8453){process[_0x270028(0x556)]['write'](_0x270028(0x6ec)+(_0x1e8453?.[_0x270028(0x1e0)]??_0x1e8453)+'\x0a');}try{await _0x1225e5[_0x270028(0x543)]();}catch(_0x94791e){process[_0x270028(0x556)]['write'](_0x270028(0x768)+(_0x94791e?.[_0x270028(0x1e0)]??_0x94791e)+'\x0a');}process[_0x270028(0x393)](0x0);}_0x2c0570[_0x40bc18(0x598)]=_0x5ca2f2;if(!_0x2c0570[_0x40bc18(0x674)]){_0x1225e5[_0x40bc18(0x273)][_0x40bc18(0x235)]?.(),_0x4bc1a7(_0x1225e5[_0x40bc18(0x1c4)]?.['getSecurityNotices']?.()??[]),await _0x24935b(_0x1225e5,_0x2c0570);return;}process[_0x40bc18(0x3f5)][_0x40bc18(0x6cc)](_0x40bc18(0x375)+process[_0x40bc18(0x789)]+_0x40bc18(0x388)+_0x5ca2f2+'\x20'+(_0x40bc18(0x1b5)+_0x2c0570[_0x40bc18(0x5f6)]+'\x0a')),console[_0x40bc18(0x273)](''),console[_0x40bc18(0x273)]('\x20\x20✓\x20OKDB\x20cluster\x20running'),console[_0x40bc18(0x273)](_0x40bc18(0x37e)+_0x2c0570[_0x40bc18(0x5f6)]+_0x40bc18(0x590)+_0x5ca2f2+_0x40bc18(0x585)),console['log']('\x20\x20\x20\x20path:\x20\x20\x20\x20'+_0x17af1a),console[_0x40bc18(0x273)](_0x40bc18(0x26f)+_0x1225e5['id']),console[_0x40bc18(0x273)](_0x40bc18(0x1a2)+_0x2c0570[_0x40bc18(0x5f6)]+'/api');!_0x2c0570[_0x40bc18(0x6b6)]&&console[_0x40bc18(0x273)](_0x40bc18(0x2c5)+_0x2c0570[_0x40bc18(0x5f6)]+_0x40bc18(0x7a5));console[_0x40bc18(0x273)](''),_0x4bc1a7(_0x1225e5[_0x40bc18(0x1c4)]?.[_0x40bc18(0x60d)]?.()??[]),process['on']('SIGINT',()=>_0x20100e(_0x40bc18(0x6e5))),process['on'](_0x40bc18(0x5f8),()=>_0x20100e(_0x40bc18(0x5f8))),process['on'](_0x40bc18(0x4bc),()=>_0x20100e('SIGBREAK'));return;}const _0xcf2a2e=new _0x411f9d(_0x17af1a,_0x5f355f);_0xcf2a2e['log'][_0x40bc18(0x235)]?.();const _0x6ca586=_0xcf2a2e['log'][_0x40bc18(0x292)](_0x5e0a36=>_0x5552c7(_0x5e0a36,_0x2c0570[_0x40bc18(0x6d3)]));if(_0x2c0570['noRepl'])process['stdout'][_0x40bc18(0x6cc)](_0x40bc18(0x64e));await _0xcf2a2e[_0x40bc18(0x1bc)]();if(_0x2c0570[_0x40bc18(0x674)])process['stdout'][_0x40bc18(0x6cc)]('\x20\x20✓\x20database\x20opened\x0a');try{await _0x4dc6fd(_0xcf2a2e,_0x2c0570[_0x40bc18(0x5f6)],_0x1a2551(_0x2c0570));}catch(_0x5373e8){_0x5373e8[_0x40bc18(0x2a0)]==='EADDRINUSE'&&(console['error']('[okdb]\x20port\x20'+_0x2c0570['port']+_0x40bc18(0x290)),process['exit'](0x1));throw _0x5373e8;}if(_0x2c0570['noRepl']){const _0x59db21=_0x2c0570[_0x40bc18(0x635)]?.[_0x40bc18(0x76f)]!==undefined?[][_0x40bc18(0x549)](_0x2c0570['http'][_0x40bc18(0x76f)])[_0x40bc18(0x29f)](',\x20')+'\x20':'';process[_0x40bc18(0x3f5)]['write'](_0x40bc18(0x21d)+_0x59db21+':'+_0x2c0570[_0x40bc18(0x5f6)]+'\x0a');}if(!_0x2c0570[_0x40bc18(0x674)])_0xcf2a2e[_0x40bc18(0x273)][_0x40bc18(0x235)]?.(),_0x6ca586?.(),_0x4bc1a7(_0xcf2a2e[_0x40bc18(0x1c4)]?.[_0x40bc18(0x60d)]?.()??[]),await _0x24935b(_0xcf2a2e,_0x2c0570);else{const _0x4f16dc=_0x8e4ba8[_0x40bc18(0x29f)](_0x17af1a,'okdb.pid');try{_0x2c9780[_0x40bc18(0x565)](_0x4f16dc,String(process['pid']));}catch{}const _0x5d3b5c=Date['now']()-_0x24e901;console[_0x40bc18(0x273)](''),console[_0x40bc18(0x273)]('\x20\x20✓\x20OKDB\x20server\x20running'),console[_0x40bc18(0x273)]('\x20\x20\x20\x20port:\x20\x20'+_0x2c0570[_0x40bc18(0x5f6)]),console[_0x40bc18(0x273)](_0x40bc18(0x301)+_0x17af1a),console[_0x40bc18(0x273)]('\x20\x20\x20\x20id:\x20\x20\x20\x20'+_0xcf2a2e['id']);{const _0x4875cc=_0xcf2a2e[_0x40bc18(0x791)]?.['db']?.['get']?.(_0x40bc18(0x74d))??0x0,_0x3c85c0=[..._0xcf2a2e[_0x40bc18(0x6ca)][_0x40bc18(0x2ac)]()][_0x40bc18(0x1ff)](_0x2bae09=>!_0x2bae09[_0x40bc18(0x637)]('~'))[_0x40bc18(0x503)];if(_0xcf2a2e[_0x40bc18(0x26a)]?.[_0x40bc18(0x569)]?.[_0x40bc18(0x6ba)]===0x1){const _0x1d7ce3=Math[_0x40bc18(0x752)]((_0xcf2a2e[_0x40bc18(0x26a)][_0x40bc18(0x569)][_0x40bc18(0x4f7)]-Date['now']())/0x5265c00);console[_0x40bc18(0x273)](_0x40bc18(0x5dc)+_0xcf2a2e['_license']['active']['licensee']+_0x40bc18(0x6dc)+_0x1d7ce3+'\x20days\x20—\x20POC/demo\x20only,\x20not\x20node-bound)');}else{if(_0xcf2a2e[_0x40bc18(0x26a)]?.[_0x40bc18(0x569)]){const _0x37118d=_0xcf2a2e[_0x40bc18(0x26a)][_0x40bc18(0x569)];console[_0x40bc18(0x273)]('\x20\x20\x20\x20license:\x20'+_0x37118d[_0x40bc18(0x67a)]+'\x20(expires\x20'+new Date(_0x37118d['expiresAt'])['toISOString']()[_0x40bc18(0x5b8)](0x0,0xa)+')');const _0x5a6de9=_0x37118d[_0x40bc18(0x3aa)]||{};if(_0x5a6de9[_0x40bc18(0x344)]){const _0x241dcd=Math['round'](_0x4875cc/_0x5a6de9['maxWrites']*0x64);console['log']('\x20\x20\x20\x20usage:\x20\x20\x20'+_0x4875cc[_0x40bc18(0x530)]()+_0x40bc18(0x78d)+_0x5a6de9[_0x40bc18(0x344)][_0x40bc18(0x530)]()+_0x40bc18(0x588)+_0x241dcd+_0x40bc18(0x69a)+_0x3c85c0+(_0x5a6de9[_0x40bc18(0x364)]?'/'+_0x5a6de9['envs']:'')+'\x20env'+(_0x3c85c0===0x1?'':'s'));}}else{if(_0xcf2a2e['_license']){const _0x1939ae=_0xcf2a2e[_0x40bc18(0x26a)][_0x40bc18(0x671)](),_0x4ca417=_0x1939ae['length']?_0x1939ae[_0x40bc18(0x626)](_0x58471d=>_0x58471d[_0x40bc18(0x478)])[_0x40bc18(0x29f)](',\x20'):'(add\x20a\x20license\x20first)',_0x5522a9=_0xcf2a2e[_0x40bc18(0x26a)][_0x40bc18(0x236)],_0x44baf7=_0x5522a9[_0x40bc18(0x3aa)][_0x40bc18(0x344)]?Math[_0x40bc18(0x6bd)](_0x4875cc/_0x5522a9[_0x40bc18(0x3aa)][_0x40bc18(0x344)]*0x64):0x0;console[_0x40bc18(0x273)](_0x40bc18(0x725)),console['log']('\x20\x20\x20\x20usage:\x20\x20\x20'+_0x4875cc[_0x40bc18(0x530)]()+_0x40bc18(0x78d)+_0x5522a9[_0x40bc18(0x3aa)]['maxWrites']['toLocaleString']()+_0x40bc18(0x588)+_0x44baf7+_0x40bc18(0x69a)+_0x3c85c0+'\x20/\x20'+_0x5522a9[_0x40bc18(0x3aa)][_0x40bc18(0x364)]+_0x40bc18(0x402)),console[_0x40bc18(0x273)](_0x40bc18(0x51d)+_0x4ca417);}}}}console[_0x40bc18(0x273)](_0x40bc18(0x5ca)+_0x2c0570[_0x40bc18(0x5f6)]+_0x40bc18(0x5fc));!_0x2c0570[_0x40bc18(0x6b6)]&&console['log'](_0x40bc18(0x213)+_0x2c0570[_0x40bc18(0x5f6)]+_0x40bc18(0x7a5));console[_0x40bc18(0x273)](''),console[_0x40bc18(0x273)]('[okdb]\x20started\x20in\x20'+_0x5d3b5c+'ms'),_0x4bc1a7(_0xcf2a2e[_0x40bc18(0x1c4)]?.['getSecurityNotices']?.()??[]);let _0x377403=![];async function _0x82198e(_0x569870){const _0x4607ff=_0x40bc18;_0x377403&&(process['stderr'][_0x4607ff(0x6cc)]('\x0a[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a'),process[_0x4607ff(0x393)](0x82));_0x377403=!![],process[_0x4607ff(0x556)][_0x4607ff(0x6cc)]('\x0a[okdb]\x20received\x20'+(_0x569870||_0x4607ff(0x774))+_0x4607ff(0x56d));const _0x21eec5=setTimeout(()=>{const _0xd58d2e=_0x4607ff;process[_0xd58d2e(0x556)][_0xd58d2e(0x6cc)](_0xd58d2e(0x3dc)),process[_0xd58d2e(0x393)](0x1);},0x1388);try{_0x2c9780['unlinkSync'](_0x4f16dc);}catch{}try{await _0xcf2a2e['close']();}catch(_0x4b83ec){process[_0x4607ff(0x556)]['write'](_0x4607ff(0x7a6)+(_0x4b83ec?.[_0x4607ff(0x1e0)]??_0x4b83ec)+'\x0a');}clearTimeout(_0x21eec5),process[_0x4607ff(0x556)]['write'](_0x4607ff(0x592)),process[_0x4607ff(0x393)](0x0);}process['on'](_0x40bc18(0x6e5),()=>_0x82198e(_0x40bc18(0x6e5))),process['on'](_0x40bc18(0x5f8),()=>_0x82198e(_0x40bc18(0x5f8))),process['on'](_0x40bc18(0x4bc),()=>_0x82198e(_0x40bc18(0x4bc)));}}const _0x594c2d=new Set([_0x5a22a6(0x2b3),_0x5a22a6(0x499),'init',_0x5a22a6(0x1c2),_0x5a22a6(0x28c),_0x5a22a6(0x206),'reset','token',_0x5a22a6(0x29f),_0x5a22a6(0x20d)]),_0x18f50b=process['argv'][0x2];if(_0x18f50b===_0x5a22a6(0x2b3))console[_0x5a22a6(0x273)](require$$3[_0x5a22a6(0x2b3)]),process[_0x5a22a6(0x393)](0x0);else{if(_0x18f50b&&_0x594c2d['has'](_0x18f50b)){const _0x256f3a=process[_0x5a22a6(0x749)]['slice'](0x3),_0x5bce32=_0x1b8588(['node',_0x5a22a6(0x784),..._0x256f3a]),_0x3c4c12=_0x14062f(_0x5bce32),_0x1dd1bc=new Set([_0x5a22a6(0x250),'-d',_0x5a22a6(0x256),'-k',_0x5a22a6(0x5c8),'-c',_0x5a22a6(0x4e9),'-p',_0x5a22a6(0x19e),_0x5a22a6(0x5ce),'-e',_0x5a22a6(0x31f),_0x5a22a6(0x79b),_0x5a22a6(0x5ba),_0x5a22a6(0x740),'--permissions',_0x5a22a6(0x38f),'--ttl',_0x5a22a6(0x45f),_0x5a22a6(0x6b1),'-u',_0x5a22a6(0x365)]);let _0x503802=null;for(let _0x5c9efe=0x0;_0x5c9efe<_0x256f3a[_0x5a22a6(0x503)];_0x5c9efe++){if(_0x1dd1bc[_0x5a22a6(0x52e)](_0x256f3a[_0x5c9efe])){_0x5c9efe++;continue;}if(!_0x256f3a[_0x5c9efe]['startsWith']('-')){_0x503802=_0x256f3a[_0x5c9efe];break;}}(async()=>{const _0x2f6cc9=_0x5a22a6;if(_0x18f50b===_0x2f6cc9(0x4ca)){const _0x324baa=process[_0x2f6cc9(0x749)][0x3],_0x340080=process[_0x2f6cc9(0x749)][_0x2f6cc9(0x5b8)](0x4),_0x55ae6e=_0x1b8588([_0x2f6cc9(0x1f9),'okdb',..._0x340080]),_0x59f2bc=_0x14062f(_0x55ae6e),_0x38e728=new Set([_0x2f6cc9(0x250),'-d',_0x2f6cc9(0x256),'-k',_0x2f6cc9(0x5c8),'-c',_0x2f6cc9(0x4e9),'-p',_0x2f6cc9(0x79b),_0x2f6cc9(0x5ba),'--label',_0x2f6cc9(0x40b),_0x2f6cc9(0x38f),_0x2f6cc9(0x70a),_0x2f6cc9(0x19e),_0x2f6cc9(0x5ce),'-e',_0x2f6cc9(0x31f)]),_0x39dd58=[];for(let _0x36e70b=0x0;_0x36e70b<_0x340080[_0x2f6cc9(0x503)];_0x36e70b++){if(_0x38e728['has'](_0x340080[_0x36e70b])){_0x36e70b++;continue;}if(_0x340080[_0x36e70b][_0x2f6cc9(0x637)]('-'))continue;_0x39dd58[_0x2f6cc9(0x387)](_0x340080[_0x36e70b]);}switch(_0x324baa){case _0x2f6cc9(0x532):await _0x987941(_0x59f2bc,_0x55ae6e);break;case _0x2f6cc9(0x437):await _0x202504(_0x59f2bc);break;case _0x2f6cc9(0x5f1):await _0x294de0(_0x39dd58[0x0],_0x59f2bc);break;default:console['error'](_0x2f6cc9(0x546)+_0x324baa+_0x2f6cc9(0x72c)),process[_0x2f6cc9(0x393)](0x1);}return;}if(_0x18f50b===_0x2f6cc9(0x20d)){const _0x4ec2cb=requireOkdbLicenseCodec(),_0x3e572c=process[_0x2f6cc9(0x749)]['slice'](0x3),_0x24e14d=_0x1b8588([_0x2f6cc9(0x1f9),_0x2f6cc9(0x784),..._0x3e572c]),_0x43f625=_0x14062f(_0x24e14d),_0x45f95a=new Set(['--path','-d','--key','-k',_0x2f6cc9(0x5c8),'-c',_0x2f6cc9(0x4e9),'-p',_0x2f6cc9(0x19e)]),_0x4ccd5b=[];for(let _0x7abf24=0x0;_0x7abf24<_0x3e572c[_0x2f6cc9(0x503)];_0x7abf24++){if(_0x45f95a[_0x2f6cc9(0x52e)](_0x3e572c[_0x7abf24])){_0x7abf24++;continue;}if(_0x3e572c[_0x7abf24][_0x2f6cc9(0x637)]('-'))continue;_0x4ccd5b['push'](_0x3e572c[_0x7abf24]);}const _0x680a15=_0x4ccd5b[0x0]??null;if(_0x680a15===_0x2f6cc9(0x488))await _0x167be8(_0x4ccd5b[0x1],_0x43f625);else{if(!_0x680a15)await _0x4aa96c(_0x43f625);else{let _0x379eb6=_0x4ec2cb['detectInputType'](_0x680a15);if(_0x379eb6===_0x2f6cc9(0x23d)&&_0x2c9780[_0x2f6cc9(0x4b2)](_0x680a15))_0x379eb6=_0x2f6cc9(0x624);if(_0x379eb6===_0x2f6cc9(0x624))try{const _0x458c58=_0x2c9780[_0x2f6cc9(0x2a8)](_0x680a15,_0x2f6cc9(0x6f6))['trim'](),_0x679aeb=_0x4ec2cb[_0x2f6cc9(0x4ab)](_0x458c58);if(_0x679aeb===_0x2f6cc9(0x6c5)){await _0x3aad41(_0x458c58,_0x43f625);return;}await _0x1eb9cc(_0x680a15,_0x43f625);return;}catch(_0x45c9ca){console[_0x2f6cc9(0x5b7)](_0x2f6cc9(0x4e2)+_0x680a15+':\x20'+_0x45c9ca[_0x2f6cc9(0x1e0)]),process[_0x2f6cc9(0x393)](0x1);}switch(_0x379eb6){case _0x2f6cc9(0x33c):await _0x1eb9cc(_0x680a15,_0x43f625);break;case _0x2f6cc9(0x6c5):await _0x3aad41(_0x680a15,_0x43f625);break;case _0x2f6cc9(0x537):await _0x287077(_0x680a15,_0x43f625);break;default:console['error'](_0x2f6cc9(0x61d)+_0x680a15+'\x22'),console[_0x2f6cc9(0x5b7)](''),console[_0x2f6cc9(0x5b7)]('\x20\x20Expected\x20one\x20of:'),console[_0x2f6cc9(0x5b7)](_0x2f6cc9(0x78f)),console[_0x2f6cc9(0x5b7)](_0x2f6cc9(0x54e)),console['error']('\x20\x20\x20\x20•\x20a\x20license\x20id\x20\x20\x20\x20\x20(uuid)'),console[_0x2f6cc9(0x5b7)](_0x2f6cc9(0x323)),console[_0x2f6cc9(0x5b7)](''),console['error']('\x20\x20Usage:\x20okdb\x20license\x20[<blob|path|uuid|activation-token>]'),process[_0x2f6cc9(0x393)](0x1);}}}return;}switch(_0x18f50b){case _0x2f6cc9(0x499):await _0x1a7253(_0x3c4c12);break;case _0x2f6cc9(0x34e):await _0x2ca5b7();break;case _0x2f6cc9(0x620):await _0x3d9123(_0x3c4c12);break;case'backup':await _0x1715fa(_0x503802??_0x8e4ba8[_0x2f6cc9(0x300)](_0x2f6cc9(0x483)),_0x3c4c12);break;case'export':await _0x4ab435(_0x503802??_0x8e4ba8[_0x2f6cc9(0x300)](_0x2f6cc9(0x6a7)),_0x3c4c12,_0x5bce32);break;case _0x2f6cc9(0x206):await _0x4f856f(_0x503802??_0x8e4ba8[_0x2f6cc9(0x300)](_0x2f6cc9(0x6a7)),_0x3c4c12,_0x5bce32);break;case'join':await _0x86c751(_0x503802,_0x3c4c12,_0x5bce32);break;}})()['then'](()=>process[_0x5a22a6(0x393)](0x0))[_0x5a22a6(0x628)](_0x122504=>{const _0x292aef=_0x5a22a6;console['error'](_0x292aef(0x199)+(_0x122504[_0x292aef(0x1e0)]||_0x122504)+'\x0a'),process[_0x292aef(0x393)](0x1);});}else _0x49634e()['catch'](_0x145180=>{const _0x478ec3=_0x5a22a6;console[_0x478ec3(0x5b7)](_0x478ec3(0x23c)),console[_0x478ec3(0x5b7)](_0x145180[_0x478ec3(0x22e)]||_0x145180),process['exit'](0x1);});}return okdb$1;}var okdbExports=requireOkdb(),okdb=getDefaultExportFromCjs(okdbExports);module['exports']=okdb;
|