@kedem/okdb 1.8.11 → 1.8.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bin/okdb.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- 'use strict';const _0x1df1fe=_0x206f;(function(_0x46bbfd,_0x2ca535){const _0x369dd0=_0x206f,_0x4c124e=_0x46bbfd();while(!![]){try{const _0x7744d9=parseInt(_0x369dd0(0x112))/0x1+-parseInt(_0x369dd0(0xd5))/0x2+-parseInt(_0x369dd0(0x35a))/0x3+parseInt(_0x369dd0(0x1a5))/0x4+parseInt(_0x369dd0(0x3b8))/0x5+parseInt(_0x369dd0(0x169))/0x6*(parseInt(_0x369dd0(0x1cf))/0x7)+-parseInt(_0x369dd0(0x299))/0x8;if(_0x7744d9===_0x2ca535)break;else _0x4c124e['push'](_0x4c124e['shift']());}catch(_0x492f00){_0x4c124e['push'](_0x4c124e['shift']());}}}(_0x2863,0x5ea6d));var require$$1$1=require(_0x1df1fe(0x176)),require$$1=require('fs'),require$$3=require(_0x1df1fe(0x29c)),require$$0$2=require(_0x1df1fe(0x11c)),require$$5=require(_0x1df1fe(0x1cd)),require$$0=require(_0x1df1fe(0x150)),require$$0$1=require('node:crypto'),require$$2$1=require('os'),require$$4=require(_0x1df1fe(0x1f7));function getDefaultExportFromCjs(_0x268d7b){const _0x313165=_0x1df1fe;return _0x268d7b&&_0x268d7b[_0x313165(0x1c6)]&&Object[_0x313165(0x2a1)]['hasOwnProperty']['call'](_0x268d7b,_0x313165(0x10e))?_0x268d7b[_0x313165(0x10e)]:_0x268d7b;}var okdb$1={},version=_0x1df1fe(0x304),require$$2={'version':version},okdbAuthTokens,hasRequiredOkdbAuthTokens;function requireOkdbAuthTokens(){if(hasRequiredOkdbAuthTokens)return okdbAuthTokens;hasRequiredOkdbAuthTokens=0x1;const _0x3c1c17=require$$0;function _0x2a4ccd(_0x145c7a,_0x258df3){const _0x2b3dfe=_0x206f;return _0x3c1c17['createHmac']('sha256',_0x258df3)[_0x2b3dfe(0x356)](_0x145c7a)['digest']('base64url');}function _0xad7b67(_0x43bde9,_0x389389){const _0xb87b09=_0x206f;if(typeof _0x43bde9!==_0xb87b09(0x323)||typeof _0x389389!==_0xb87b09(0x323))return![];if(Buffer[_0xb87b09(0x2c8)](_0x43bde9)!==Buffer[_0xb87b09(0x2c8)](_0x389389))return![];return _0x3c1c17[_0xb87b09(0x19e)](Buffer['from'](_0x43bde9),Buffer[_0xb87b09(0x264)](_0x389389));}function _0x1d9606(_0x4007ec){const _0x39f09e=_0x206f;if(!_0x4007ec?.[_0x39f09e(0x193)]('Bearer\x20'))return null;return _0x4007ec['slice'](0x7);}function _0x100448(_0x1c1421=0x20){const _0xeec39b=_0x206f;return _0x3c1c17[_0xeec39b(0x2d4)](_0x1c1421)['toString'](_0xeec39b(0x190));}function _0x5dc679(_0x5f1c42){const _0x970a88=_0x206f;return _0x3c1c17['createHash'](_0x970a88(0x394))[_0x970a88(0x356)](_0x5f1c42)[_0x970a88(0x2c7)](_0x970a88(0x2b8));}function _0x1f734e(_0x2962b6,_0x15bccf,_0x589b06=0x36ee80){const _0x35df2e=_0x206f;if(!_0x15bccf)throw new Error(_0x35df2e(0x135));const _0x170faf=Date[_0x35df2e(0x234)](),_0x3483f8=Buffer[_0x35df2e(0x264)](JSON['stringify']({'iat':_0x170faf,'exp':_0x170faf+_0x589b06,'sub':_0x2962b6?.['id']??_0x2962b6?.[_0x35df2e(0x115)]??null,'username':_0x2962b6?.['username']??_0x2962b6?.[_0x35df2e(0x2f4)]??null,'roles':Array[_0x35df2e(0x2a8)](_0x2962b6?.[_0x35df2e(0x2eb)])?_0x2962b6['roles']:[]}))[_0x35df2e(0x3bc)](_0x35df2e(0x190)),_0x971c90=_0x2a4ccd(_0x3483f8,_0x15bccf);return _0x3483f8+'.'+_0x971c90;}function _0x535913(_0x64cb81,_0x28391f){const _0x4e3f14=_0x206f;if(!_0x28391f||typeof _0x64cb81!=='string')return null;const [_0x43c689,_0x348fac]=_0x64cb81[_0x4e3f14(0x36f)]('.');if(!_0x43c689||!_0x348fac)return null;const _0x199ec5=_0x2a4ccd(_0x43c689,_0x28391f);if(!_0xad7b67(_0x348fac,_0x199ec5))return null;try{const _0x5945f0=JSON[_0x4e3f14(0x317)](Buffer['from'](_0x43c689,_0x4e3f14(0x190))[_0x4e3f14(0x3bc)]()),_0x26e7c5=0x7530;if(Date[_0x4e3f14(0x234)]()>Number(_0x5945f0?.[_0x4e3f14(0x267)]??0x0)+_0x26e7c5)return null;return _0x5945f0;}catch{return null;}}async function _0x2e3e36(_0x33f529){return new Promise((_0x4f579d,_0x4703b8)=>{const _0x2fdbc9=_0x206f,_0x3f68a3=_0x3c1c17[_0x2fdbc9(0x2d4)](0x10);_0x3c1c17['scrypt'](_0x33f529,_0x3f68a3,0x40,(_0x57096e,_0x28e445)=>{const _0x58d8cc=_0x2fdbc9;if(_0x57096e)_0x4703b8(_0x57096e);_0x4f579d(_0x3f68a3['toString']('hex')+':'+_0x28e445[_0x58d8cc(0x3bc)]('hex'));});});}async function _0x1c7b91(_0x521067,_0x1ec798){const _0x1e5002=_0x206f,[_0x2ada0c,_0x3e9d9a]=_0x1ec798[_0x1e5002(0x36f)](':');if(!_0x2ada0c||!_0x3e9d9a)return![];const _0x8ae5c9=Buffer[_0x1e5002(0x264)](_0x2ada0c,'hex');return new Promise((_0x30610,_0x547fab)=>{_0x3c1c17['scrypt'](_0x521067,_0x8ae5c9,0x40,(_0x13e59f,_0xe6c0f9)=>{const _0x1700b9=_0x206f;if(_0x13e59f)_0x547fab(_0x13e59f);_0x30610(_0x3c1c17[_0x1700b9(0x19e)](_0xe6c0f9,Buffer[_0x1700b9(0x264)](_0x3e9d9a,_0x1700b9(0x2b8))));});});}return okdbAuthTokens={'hmac':_0x2a4ccd,'timingSafeEqual':_0xad7b67,'parseBearer':_0x1d9606,'randomToken':_0x100448,'hashToken':_0x5dc679,'issueToken':_0x1f734e,'authenticateToken':_0x535913,'hashPassword':_0x2e3e36,'verifyPassword':_0x1c7b91},okdbAuthTokens;}function _0x206f(_0x2ca816,_0x2ba4df){_0x2ca816=_0x2ca816-0xd1;const _0x28639d=_0x2863();let _0x206f4e=_0x28639d[_0x2ca816];return _0x206f4e;}var okdbLicenseCodec,hasRequiredOkdbLicenseCodec;function _0x2863(){const _0x36729d=['\x20\x20\x20\x20limits:\x20\x20\x20\x20','migrate','--blobs','utf8','child_process','GET','\x20\x20Usage:\x20','PUT','--label','alloc','open',')\x20to\x20your\x20license\x20vendor.','verify','unlinkSync','hasType','\x20document(s)\x20reference\x20it\x20with\x20onDelete:restrict','\x20\x20(press\x20Ctrl+C\x20again\x20to\x20exit)\x0a','writeUInt8','\x0a\x20\x20Usage:\x20use\x20<env-name>\x0a','readFileSync','licenseHash','Feature\x20not\x20licensed:\x20','\x20\x20→\x20\x20','\x20\x20(unlimited)','FEATURES','padEnd','envs','repeat','EADDRINUSE','decodeActivationToken:\x20expected\x2077\x20bytes,\x20got\x20','OPEN','[okdb]\x20error:\x20--grants\x20must\x20be\x20valid\x20JSON\x20object','\x20log\x20level:\x20','dropIndex','[okdb]\x20close\x20error:\x20','type/users\x20--help','database\x20path\x20writable:\x20','index:progress','options','_computeStatus','tags','selfAddress','UNIQUE_CONSTRAINT','config\x20file\x20valid:\x20','\x20writes\x20(','\x20→\x20POST\x20/api/env/','system','isInteger','[okdb]\x20error:\x20license\x20management\x20is\x20only\x20available\x20in\x20licensed\x20builds\x20(npm\x20run\x20build:prod).','api','halted','\x20\x20[','dropping','Version\x20mismatch\x20for\x20','createHash','[okdb]\x20loaded\x20config:\x20','param','[okdb]\x20failed\x20to\x20parse\x20config\x20file\x20','\x0a[okdb]\x20fatal\x20error:','started','\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20','argv','spki','--version','\x20active\x20env:\x20','now','standard','clearLine','slice','error','\x27\x20on\x20type\x20\x27','log','[okdb]\x20imported\x20\x20types=','limits','floor','object','\x20to\x20browse\x20the\x20API,\x20','expiresAt','OKDBTypeAlreadyRegisteredError','SIGBREAK','\x20\x20✗','\x20(expires\x20in\x20','\x0a\x20\x20[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a','other','summary','decoded','item:create','--log-level','env/staging/info','OKDBNotFoundError','copy','readUInt8','[okdb]\x20error:\x20unrecognized\x20input:\x20\x22','txn:end','debug','put','syncPeers','[okdb]\x20./okdb-data\x20already\x20exists\x20—\x20skipping','\x20tokens:','every','off','logs','\x20\x20\x20\x20licensee:\x20\x20','\x20documents\x20fail\x20validation','admin','config\x20file\x20invalid:\x20','\x1b[37m','grants','\x22\x20matches\x20','\x20\x20skipped=','mcp','dirname','\x22.\x20Use:\x20create,\x20list,\x20revoke','from','\x20\x20\x20\x20status:\x20\x20\x20\x20','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20was\x20issued\x20for\x20a\x20different\x20node\x20—\x20share\x20this\x20node\x27s\x20PIN\x20with\x20the\x20vendor.','exp','\x20licenses','mkdirSync','type/users/item/alice','charCodeAt','env:removed','\x0a\x20\x20Joining\x20cluster\x20at\x20','\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','get','darwin','decodeLicenseBlob','--key','\x20\x20\x20\x20expires:\x20\x20\x20','\x20\x20Common\x20causes:','ceil','[okdb]\x20invalid\x20port:\x20','create','\x20day(s).','_active','./okdb-data','bind','\x1b[1m','active:','dropFts','Queue','\x20\x20(name:\x20','available','meta','exports','current','\x20\x20Writes:\x20\x20','~tokens','noRepl','toLowerCase','body:\x20','\x20\x20\x20\x20permissions:\x20','server','(none)','expired','sort','Shutting\x20down\x20due\x20to\x20license\x20expiry','.kdbconfig','createInterface','body','SCHEMA_VALIDATION_FAILED','false','\x0a\x20\x20Raw\x20token\x20(shown\x20once,\x20save\x20it\x20now):\x0a','[body]','[okdb]\x20error:\x20join\x20requires\x20a\x20remote\x20address.\x20Usage:\x20okdb\x20join\x20<address>\x20--token\x20<t>','stopped','2036680ZVUGnR','Types','resetFts','net','OKDBAlreadyExistsError','toLocaleString','status','licenseId','prototype','env/:env','--config','uuid','permissions','\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','equals','isArray','padStart','keys/public.pem','transport:\x20','\x1b[90m','--no-repl','input:\x20','length','writes=','remove','\x20\x20Next\x20step\x20—\x20activate\x20the\x20license:','access','\x22\x20is\x20used\x20by:\x20','\x0d[okdb]\x20','txn:start','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20override\x20active\x20environment\x20for\x20this\x20call\x0a\x20\x20','hex','records','use\x20<env>','\x20\x20\x20\x20\x20\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','unknown','/types\x0a\x20\x20\x20\x20','count','port','sizeAfter','homedir','ROUTES','[okdb]\x20exporting\x20env\x20\x22','\x20\x20\x20\x202.\x20The\x20vendor\x20returns\x20an\x20activation\x20token.','\x20records','\x0a\x20\x20License\x20details:','digest','byteLength','\x1b[36m','revoke','round','shutting\x20down…\x0a','PUT\x20type/users/item/x\x20{\x22n\x22:1}','Unique\x20constraint\x20violated\x20on\x20','export','history','INVALID_PRIMARY_KEY','exit','maxWrites','randomBytes','\x20\x20All\x20checks\x20passed.\x0a','--token','[okdb]\x20blobs:\x20imported=','fieldPath','--port','\x20\x20\x20\x20port:\x20\x20','/type/users/item/alice\x0a\x20\x20\x20\x20','rmSync','hint','listRoutes','message','~licenses','<json-body>','OKDBInvalidIndexKeyError','\x20\x20\x20\x20label:\x20\x20\x20\x20\x20\x20\x20','allocUnsafe','sizeBefore','Feature\x20not\x20available\x20on\x20free\x20tier:\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20browse\x20API\x20routes,\x20grouped\x20by\x20area\x0a\x20\x20','\x0a\x20\x20\x20\x20','--env\x20<name>','ENVS','roles','number','timeMachine','\x20MB\x20→\x20','min','\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','files','listening','dbPath','name','peers=','\x0a\x20\x20Joined.\x20Remote\x20tokens\x20replicated.\x20You\x20can\x20now\x20log\x20in\x20with\x20cluster\x20credentials.\x0a','id:\x20','import','fts','activateLicense','\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','createdAt','set','\x0a[okdb]\x20received\x20','\x20environment\x20','setSchema','\x20\x20Error:\x20','type/users','reload','1.8.11','toFixed','\x20\x20✓\x20','\x20(expires\x20','\x20\x20\x20\x20features:\x20\x20','transport','\x1b[31m','LICENSE_INVALID','isFeatureEnabled','Invalid\x20license\x20blob:\x20','types','kind','_isFree','[okdb]\x20created\x20.kdbconfig','type/','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20','\x0a\x20\x20Run\x20okdb\x20to\x20start\x20the\x20server.\x0a','detachConsole','__writeCounter','parse','green','val','\x20not\x20found','endsWith','database\x20path\x20not\x20writable:\x20','unique:violation','starting','item:remove','./okdb-export.ndjson','map','push','string','\x20records…','Events','\x20\x20Usage:\x20logs\x20[on|off|debug|info|warn|error]','--log-requests','types:','license','value','node','targetKey','question','\x20\x20Expected\x20one\x20of:','INDEX_HAS_CONSUMERS','createPublicKey','\x27,\x20cannot\x20map\x20to\x20\x27','Admin','safety','platform','system:bus_state_change','\x20\x20\x20\x20license:\x20free\x20tier\x20—\x20add\x20a\x20license\x20to\x20unlock\x20sync,\x20embeddings,\x20engines,\x20time-machine','sync','indexToDb','License\x20signature\x20invalid\x20—\x20this\x20license\x20was\x20not\x20signed\x20by\x20the\x20key\x20paired\x20with\x20this\x20build.\x20','queue','isTTY','\x20\x20\x20\x20\x20http://localhost:','open\x20','envs=','PUB_FINGERPRINT','\x20already\x20in\x20use','./okdb-backup','\x20\x20\x20\x20path:\x20\x20','decodeLicenseBlob:\x20input\x20must\x20be\x20a\x20string','[okdb]\x20.kdbconfig\x20already\x20exists\x20—\x20skipping','hidden','licensee','registerIndex','randomUUID','hasOwnProperty','env:opened','level','env/','decodeLicenseBlob:\x20blob\x20too\x20short\x20(','Index\x20\x27','--env','127.0.0.1','key','OKDBTypeNotRegisteredError','dropType','registerType','dynamic','update','effective','Sync','_licenseHash','2150709IYCHTM','terminal','?\x0a\x20\x20Type\x20\x22yes\x22\x20to\x20confirm:\x20','stringify','[okdb]\x20error:\x20show\x20requires\x20an\x20id\x20argument','sync:apply','\x0a\x0a\x20\x20','issuedAt','\x0a\x20\x20Invalid\x20JSON:\x20','HELP','\x20\x20http://localhost:','yellow','[okdb]\x20opening\x20','targetType','ALREADY_EXISTS','decodeActivationToken:\x20input\x20must\x20be\x20a\x20string','indexOf','password','.\x20Only\x20primitives,\x20null,\x20Buffers,\x20and\x20arrays\x20are\x20allowed.\x20Got:\x20','filter','createHmac','split','bold','Type\x20\x27','already\x20in\x20use','[okdb]\x20backing\x20up\x20to\x20','routes','assertFeature','\x20\x20score:','\x1b[0m','--path','fts:registered','.\x20Primary\x20keys\x20must\x20be\x20string\x20or\x20number.\x20Got:\x20','\x20bytes,\x20need\x20>=\x2065)','derivePin','token','label','Examples','DELETE\x20type/users/item/x','code','version','\x0d[okdb]\x20blobs:\x20','system:poke','license:removed','\x20\x20\x20\x20\x20control\x20log\x20verbosity\x0a\x20\x20','toISOString','ttl:expired','--changes','time','licensed','catch','License\x20expired\x20or\x20invalidated','engines','auth','[okdb]\x20reset:\x20','\x20\x20\x20\x20graceful\x20shutdown\x0a','⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20','typeSubDbs','sha256','MALFORMED_TOKEN','backup','Files','pin','ENV','fromEntries','\x0a\x20\x20✓\x20Token\x20created','\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','LICENSE_LIMIT_EXCEEDED','title','LICENSE_ACTIVATION_INVALID','\x20\x20@','\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.','No\x20license\x20found\x20matching\x20this\x20activation\x20token','\x22\x20already\x20exists','(unset)','ref:violation_resolved','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20','[okdb]\x20export\x20complete','SCHEMA_COLLECTION_INVALID','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20·\x20\x20','wrong_node','expiry','--no-admin','method','[okdb]\x20port\x20','\x20\x20Flags','\x20more','\x20(must\x20be\x201–65535)','_license','--address','decodeActivationToken','\x20\x20✓\x20Removed\x20license\x20','--drop','2027710vzWDrR','—\x20/api/\x20is\x20auto-prefixed,\x20env\x20is\x20auto-injected','\x1b[32m','(add\x20a\x20license\x20first)','toString','reset','\x20\x20\x20\x20','line','listen','okdb','pending','TYPE_ALREADY_REGISTERED','active','pid','listLicenses','cause','/api/','getRange','\x20\x20·\x20','\x20\x20records=','\x20in\x20','writeUInt16BE','rawBuf','%),\x20',':\x20expected\x20','--permissions','type:drop','indexes','typesPerEnv','type:registered','\x20\x20(licenses\x20must\x20be\x20signed\x20by\x20the\x20matching\x20private\x20key)','1084144PWsNJD','addLicense','PUBLIC_KEY_PEM','resetIndex','\x20to\x20quit.','\x20\x20[okdb]\x20closed\x20cleanly\x0a','LABEL','\x20\x20\x20\x20\x20\x20\x20POST\x20(body\x20implies\x20POST)\x0a\x20\x20','LICENSE_EXPIRED_ACTION','magenta','SIGINT\x20(double-tap)','--help','columns','Processors','node\x20','\x20\x20[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a','once','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20','transaction','\x27\x20already\x20registered','includes','blobs','doctor','License\x20already\x20stored','[okdb]\x20invalid\x20log\x20level:\x20\x22','CREATED','\x20\x20✓\x20database\x20opened\x0a','INVALID_INDEX_KEY','invalid','NOT_FOUND','freeze','concat','some','fts:','system:ready','env','NAME','toUpperCase','Open\x20licenses\x20cannot\x20exceed\x206\x20months\x20duration\x20(this\x20license\x20expires\x20','\x0a[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a','port\x20','\x20—\x20type\x20env\x20to\x20list\x20available\x0a','.\x20Add\x20a\x20license\x20that\x20includes\x20\x22','[okdb]\x20reset\x20aborted','logRequests','logLevel','getPins','stack','decodeLicenseBlob:\x20failed\x20to\x20decode\x20payload:\x20','\x1b[35m','EXPIRES','_systemEnv','resetting','valid','<path>','Embeddings','OKDBIndexAlreadyRegisteredError','default','POST','\x20\x20\x20\x20•\x20a\x20path\x20to\x20a\x20.license\x20file','finally','244471wOHYfW','[okdb]\x20starting…\x0a','types\x20--env\x20staging','sub','init','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x0a\x20\x20','type/users/item/alice\x20--env\x20staging','(on\x20any\x20path\x20command)','info','readline','\x20\x20changes=','embeddings','prompt','\x20\x20\x20\x20addedAt:\x20\x20\x20','blob','\x20<path>\x20[json-body]','find','\x20\x20⚠\x20\x20','ttl','Cannot\x20delete\x20','detectInputType','created','[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22','Invalid\x20index\x20key\x20type\x20for\x20\x27','\x20\x20\x20\x20•\x20a\x20license\x20id\x20\x20\x20\x20\x20(uuid)','changes','\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','importFromFile','schema:drop','\x20\x20Path\x20access','ACTIVATION_EXPIRED','quit','\x20\x20\x20\x201.\x20Send\x20the\x20PIN\x20above\x20(','enabled','Token\x20secret\x20not\x20configured','\x20months\x20from\x20issuance)','/admin/index.html','\x20\x20╚═══════════════════════════╝','red','write','address','Schema\x20validation\x20failed\x20for\x20','ref:violation','\x20deleted','DELETE','config','\x20\x20+','\x20\x20Example:\x20okdb\x20join\x20https://node-a.example.com\x20--token\x20<t>\x20--address\x20http://myhost:8484\x0a','result','username','{}[]:,\x27\x22','{}[]:,\x0a\x0d\x09\x20','[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22','entries','\x20\x20\x20\x20license:\x20⚠\x20OPEN\x20—\x20','\x0a\x20\x20okdb\x20—\x20standalone\x20OKDB\x20server\x0a\x0a\x20\x20Usage:\x0a\x20\x20\x20\x20okdb\x20[options]\x0a\x20\x20\x20\x20okdb\x20<command>\x0a\x0a\x20\x20Options:\x0a\x20\x20\x20\x20-p,\x20--port\x20<port>\x20\x20\x20\x20\x20\x20\x20\x20HTTP\x20port\x20(default:\x208484)\x0a\x20\x20\x20\x20-d,\x20--path\x20<dir>\x20\x20\x20\x20\x20\x20\x20\x20\x20Database\x20directory\x20(default:\x20./okdb-data)\x0a\x20\x20\x20\x20-k,\x20--key\x20\x20<secret>\x20\x20\x20\x20\x20\x20Encryption\x20key\x20for\x20data\x20at\x20rest\x0a\x20\x20\x20\x20-c,\x20--config\x20<file>\x20\x20\x20\x20\x20\x20Config\x20file\x20path\x20(default:\x20.kdbconfig)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--log-level\x20<level>\x20\x20Log\x20level:\x20debug\x20|\x20info\x20|\x20warn\x20|\x20error\x20(default:\x20info)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-repl\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Start\x20server\x20without\x20interactive\x20shell\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-admin\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20admin\x20UI\x0a\x20\x20\x20\x20\x20\x20\x20\x20--open\x20[ip\x20...]\x20\x20\x20\x20\x20\x20Open\x20mode:\x20bypass\x20auth\x20for\x20listed\x20IPs\x20(default:\x20localhost).\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Examples:\x20--open\x20\x20--open\x20192.168.1.0/24\x20\x20--open\x20*\x0a\x20\x20\x20\x20\x20\x20\x20\x20--log-requests\x20\x20\x20\x20\x20\x20\x20Print\x20every\x20HTTP\x20request\x20to\x20stdout\x20(for\x20debugging)\x0a\x20\x20\x20\x20-v,\x20--version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Print\x20version\x20and\x20exit\x0a\x20\x20\x20\x20-h,\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x0a\x0a\x20\x20Commands:\x0a\x20\x20\x20\x20version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Print\x20version\x20and\x20exit\x0a\x20\x20\x20\x20doctor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Run\x20health\x20checks\x0a\x20\x20\x20\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Create\x20.kdbconfig\x20and\x20okdb-data/\x0a\x20\x20\x20\x20token\x20create\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Create\x20a\x20token\x20in\x20the\x20local\x20DB\x20(direct\x20access,\x20no\x20HTTP)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--name\x20<name>\x20\x20\x20\x20\x20\x20For\x20password\x20login\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--password\x20<pass>\x20\x20Password\x20(requires\x20--name)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--label\x20<text>\x20\x20\x20\x20\x20Human\x20description\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--permissions\x20<l>\x20\x20Comma-separated\x20baseline\x20permissions\x20(e.g.\x20\x22*\x22\x20or\x20\x22data:read\x22)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--grants\x20<json>\x20\x20\x20\x20Per-env\x20grants\x20as\x20JSON\x20(e.g.\x20\x27{\x22orders\x22:[\x22data:*\x22]}\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--ttl\x20<ms>\x20\x20\x20\x20\x20\x20\x20\x20\x20Optional\x20TTL\x20in\x20milliseconds\x0a\x20\x20\x20\x20token\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20List\x20all\x20tokens\x20in\x20the\x20local\x20DB\x0a\x20\x20\x20\x20token\x20revoke\x20<id>\x20\x20\x20\x20\x20\x20\x20\x20Revoke\x20(delete)\x20a\x20token\x20by\x20id\x20(full\x20uuid\x20or\x20unique\x20prefix)\x0a\x20\x20\x20\x20join\x20<address>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Join\x20an\x20existing\x20cluster\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--token\x20<t>\x20\x20\x20\x20\x20\x20\x20\x20Bearer\x20token\x20from\x20the\x20cluster\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--username\x20<u>\x20\x20\x20\x20\x20Or,\x20username\x20for\x20login\x20exchange\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--password\x20<p>\x20\x20\x20\x20\x20Password\x20for\x20login\x20exchange\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--address\x20<addr>\x20\x20\x20This\x20node\x27s\x20reachable\x20sync\x20address\x20(required)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--path\x20<dir>\x20\x20\x20\x20\x20\x20\x20Local\x20DB\x20path\x0a\x20\x20\x20\x20backup\x20[dir]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Hot\x20filesystem\x20backup\x20via\x20LMDB\x20native\x20copy\x20(default:\x20./okdb-backup)\x0a\x20\x20\x20\x20export\x20<file>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Streaming\x20NDJSON\x20logical\x20export\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env\x20<name>\x20\x20\x20\x20\x20\x20env\x20to\x20export\x20(default:\x20default)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--types\x20<a,b,...>\x20comma-separated\x20type\x20filter\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--changes\x20\x20\x20\x20\x20\x20\x20\x20\x20include\x20changelog\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--blobs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20also\x20export\x20blob\x20files\x20alongside\x0a\x20\x20\x20\x20import\x20<file>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Streaming\x20NDJSON\x20logical\x20import\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env\x20<name>\x20\x20\x20\x20\x20\x20target\x20env\x20override\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--types\x20<a,b,...>\x20import\x20only\x20these\x20types\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--drop\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20drop\x20&\x20recreate\x20existing\x20types\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--changes\x20\x20\x20\x20\x20\x20\x20\x20\x20restore\x20changelog\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--blobs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20also\x20import\x20blob\x20files\x20alongside\x0a\x20\x20\x20\x20reset\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Delete\x20and\x20recreate\x20database\x20(with\x20confirmation)\x0a\x20\x20\x20\x20license\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20List\x20stored\x20licenses,\x20current\x20tier,\x20and\x20usage\x0a\x20\x20\x20\x20license\x20<blob|path>\x20\x20\x20\x20\x20\x20Add\x20a\x20license\x20blob\x20(or\x20read\x20from\x20a\x20.license\x20file)\x0a\x20\x20\x20\x20license\x20<activation>\x20\x20\x20\x20\x20Activate\x20a\x20previously-added\x20license\x20with\x20the\x20vendor\x27s\x20token\x0a\x20\x20\x20\x20license\x20<id>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20details\x20for\x20one\x20stored\x20license\x20(by\x20uuid\x20or\x20prefix)\x0a\x20\x20\x20\x20license\x20remove\x20<id>\x20\x20\x20\x20\x20\x20Remove\x20a\x20stored\x20license\x0a\x0a\x20\x20Environment\x20variables:\x0a\x20\x20\x20\x20OKDB_PORT\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20HTTP\x20port\x0a\x20\x20\x20\x20OKDB_PATH\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Database\x20directory\x0a\x20\x20\x20\x20OKDB_LOG_LEVEL\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Log\x20level\x20(debug|info|warn|error)\x0a\x20\x20\x20\x20OKDB_KEY\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Encryption\x20key\x0a\x20\x20\x20\x20OKDB_NO_REPL=1\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20REPL\x0a\x20\x20\x20\x20OKDB_NO_ADMIN=1\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20admin\x20UI\x0a\x0a\x20\x20Config\x20file\x20(.kdbconfig)\x20—\x20JSON,\x20all\x20keys\x20optional:\x0a\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22port\x22:\x20\x20\x20\x20\x208484,\x0a\x20\x20\x20\x20\x20\x20\x22path\x22:\x20\x20\x20\x20\x20\x22./okdb-data\x22,\x0a\x20\x20\x20\x20\x20\x20\x22key\x22:\x20\x20\x20\x20\x20\x20\x22...\x22,\x0a\x20\x20\x20\x20\x20\x20\x22logLevel\x22:\x20\x22info\x22,\x0a\x20\x20\x20\x20\x20\x20\x22noAdmin\x22:\x20\x20false,\x0a\x20\x20\x20\x20\x20\x20\x22noRepl\x22:\x20\x20\x20false,\x0a\x20\x20\x20\x20\x20\x20\x22auth\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22open\x22:\x20false\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20Examples:\x0a\x20\x20\x20\x20okdb\x0a\x20\x20\x20\x20okdb\x20--port\x209000\x20--path\x20./mydb\x0a\x20\x20\x20\x20okdb\x20--no-repl\x20--port\x208080\x0a\x20\x20\x20\x20okdb\x20--open\x0a\x20\x20\x20\x20okdb\x20--open\x20192.168.1.0/24\x0a\x20\x20\x20\x20okdb\x20doctor\x0a\x20\x20\x20\x20okdb\x20backup\x20./my-backup\x0a','\x20\x20✓\x20http\x20listening\x20on\x20:','INDEX_NOT_REGISTERED','activation','index:registered','\x20\x20\x20\x20•\x20an\x20activation\x20token\x20\x20(124\x20chars)','crypto','--open','type','children','licenseType','help','\x20logs\x20off\x0a','call','--ttl','reverse','properties','⚠\x20INTERNAL\x20LICENSE\x20ACTIVE\x20—\x20all\x20features\x20and\x20limits\x20are\x20unlocked.\x20For\x20vendor/internal\x20use\x20only.','inputSchema','License\x20signature\x20invalid:\x20','/api','[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a','SIGTERM','\x20MB)','\x0a[okdb]\x20error:\x20','no\x20.kdbconfig\x20(using\x20defaults)','view:progress','\x20\x20\x20\x20writes:\x20\x20\x20\x20','white','ready','--username','3129840qktuMD','idx:','_lookupByName','Invalid\x20activation\x20token:\x20','reason','existsSync','--types','readUInt32BE','OKDB-PIN-V1:','[okdb]\x20error:\x20remove\x20requires\x20an\x20id\x20argument','--password','\x0a\x20\x20✓\x20License\x20activated','\x20\x20✓\x20Revoked\x20token\x20','path','\x20days\x20—\x20POC/demo\x20only,\x20not\x20node-bound)','http','--grants','getCount','Hint:\x20','getSecurityNotices','has','fts:reset','\x1b[2m','join','writeUInt32BE','writeFileSync','dim','SIG_INVALID','operation','true','Records','OKDBSchemaCollectionError','\x20for\x20commands,\x20','stopping','\x0a\x20\x20okdb\x20doctor\x0a','PATCH','\x20\x20\x20\x20api:\x20\x20\x20http://localhost:','\x0a\x20\x20No\x20routes\x20matching\x20\x22','[okdb]\x20closed\x20cleanly\x0a','base64url','System','OKDBVersionMismatchError','startsWith','captureStackTrace','ttl:clear','Foreign\x20key\x20violation:\x20','\x20\x20Envs:\x20\x20\x20\x20','--name','\x27\x20doesn\x27t\x20exist','then','LICENSE_TYPE_OPEN','replace','LICENSE_HASH_MISMATCH','timingSafeEqual','level:\x20info','warn','unique:violation_resolved','details','\x20\x20\x20\x203.\x20Run:\x20\x20okdb\x20license\x20<activation-token>','item:update','2918400ClMUqW','forEach','\x20\x20(need\x20≥\x2018)','_ensureTokensType','OKDBForeignKeyError','\x20\x20\x20\x20status:\x20\x20\x20\x20pending\x20activation','drop','cyan','type/users/query\x20{\x22active\x22:true}','\x20\x20\x20\x20\x20\x20','_envs','list','\x20\x20after\x20sync.\x20Duplicate\x20names\x20will\x20surface\x20as\x20ambiguous\x20logins\x20to\x20clean\x20up.','system:drain','boolean','pause','stdout','\x1b[34m','__OKDB_PUB_FINGERPRINT__','\x20\x20\x20\x20usage:\x20\x20\x20','stderr','\x20\x20(','\x20opening\x20',':\x20key\x20[','removeLicense','shutdown','waiting','search','bus:drain','[okdb]\x20error:\x20','creating','processors/','loadEnvFile','__esModule','\x20\x20⚠','close','License\x20limit\x20exceeded:\x20','../','schema:set','attach','../okdb','\x20which\x20does\x20not\x20exist','7QpmstY','test','keys','statSync','description','dest','[okdb]\x20started\x20in\x20','\x20does\x20not\x20exist','.\x20The\x20active\x20license\x20does\x20not\x20enable\x20\x22','data','\x20\x20\x20\x20\x20\x20\x20','No\x20tokens.','\x20\x20\x20\x20id:\x20\x20\x20\x20','[okdb]\x20created\x20./okdb-data','PIN','stdin','/type/users/query\x0a\x20\x20\x20\x20','SIGINT','[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22','EXIT','\x20\x20Note:\x20this\x20node\x20has\x20existing\x20tokens.\x20They\x20will\x20coexist\x20with\x20cluster\x20tokens\x0a','resolve','sig','trim','start\x20','\x20/\x20','views','resume','\x20logs\x20on\x20\x20','noAdmin','features','trimStart','gray','setTtl','null','failures'];_0x2863=function(){return _0x36729d;};return _0x2863();}function requireOkdbLicenseCodec(){const _0x119820=_0x1df1fe;if(hasRequiredOkdbLicenseCodec)return okdbLicenseCodec;hasRequiredOkdbLicenseCodec=0x1;const _0x2cce09=require$$0$1,_0x293172='0123456789ABCDEFGHJKMNPQRSTVWXYZ',_0x4b1d67=new Uint8Array(0x100)['fill'](0xff);for(let _0x416502=0x0;_0x416502<_0x293172['length'];_0x416502++){_0x4b1d67[_0x293172[_0x119820(0x26b)](_0x416502)]=_0x416502,_0x4b1d67[_0x293172[_0x119820(0x26b)](_0x416502)+0x20]=_0x416502;}_0x4b1d67['O'['charCodeAt'](0x0)]=0x0,_0x4b1d67['o'[_0x119820(0x26b)](0x0)]=0x0,_0x4b1d67['I'['charCodeAt'](0x0)]=0x1,_0x4b1d67['i'['charCodeAt'](0x0)]=0x1,_0x4b1d67['L'['charCodeAt'](0x0)]=0x1,_0x4b1d67['l'[_0x119820(0x26b)](0x0)]=0x1;function _0x56e935(_0x143eb8){let _0x5461fa=0x0,_0x5e2376=0x0,_0x57dfba='';for(let _0x2cd78b=0x0;_0x2cd78b<_0x143eb8['length'];_0x2cd78b++){_0x5e2376=_0x5e2376<<0x8|_0x143eb8[_0x2cd78b],_0x5461fa+=0x8;while(_0x5461fa>=0x5){_0x5461fa-=0x5,_0x57dfba+=_0x293172[_0x5e2376>>>_0x5461fa&0x1f];}}return _0x5461fa>0x0&&(_0x57dfba+=_0x293172[_0x5e2376<<0x5-_0x5461fa&0x1f]),_0x57dfba;}function _0x3113b2(_0x2f90e2){const _0x1149e1=_0x119820;_0x2f90e2=_0x2f90e2[_0x1149e1(0x19c)](/-/g,'')['toUpperCase']();let _0x5e1471=0x0,_0x33ed29=0x0;const _0x52b48b=[];for(let _0x5d1972=0x0;_0x5d1972<_0x2f90e2['length'];_0x5d1972++){const _0x203a18=_0x4b1d67[_0x2f90e2[_0x1149e1(0x26b)](_0x5d1972)];if(_0x203a18===0xff)continue;_0x33ed29=_0x33ed29<<0x5|_0x203a18,_0x5e1471+=0x5,_0x5e1471>=0x8&&(_0x5e1471-=0x8,_0x52b48b[_0x1149e1(0x322)](_0x33ed29>>>_0x5e1471&0xff));}return Buffer['from'](_0x52b48b);}const _0x20d71d=[_0x119820(0x337),_0x119820(0x11e),'engines','fts',_0x119820(0x2ed),_0x119820(0x1e9),_0x119820(0x261),_0x119820(0x2f1)],_0x244137=0x0,_0x32ad42=0x1,_0x5ef567=0x2,_0x1c85d8=0x6*0x1e*0x18*0x3c*0x3c*0x3e8;function _0x2d3a6f({issuedAt:_0x1ce025,expiresAt:_0x1d240e,licensee:licensee='',features:features={},limits:limits={},licenseType:licenseType=_0x244137}){const _0x4d6104=_0x119820,_0x3bfd14=Buffer['from'](licensee,_0x4d6104(0x1f6))[_0x4d6104(0x237)](0x0,0x40),_0x8ae4c9=0x1+0x1+0x4+0x4+0x1+_0x3bfd14[_0x4d6104(0x2af)]+0x2+0x10,_0x102a7e=Buffer[_0x4d6104(0x2e4)](_0x8ae4c9);let _0x2b1cf5=0x0;_0x102a7e[_0x4d6104(0x204)](0x1,_0x2b1cf5++),_0x102a7e[_0x4d6104(0x204)](licenseType,_0x2b1cf5++),_0x102a7e[_0x4d6104(0x181)](Math[_0x4d6104(0x23d)](_0x1ce025/0x3e8),_0x2b1cf5),_0x2b1cf5+=0x4,_0x102a7e['writeUInt32BE'](Math['floor'](_0x1d240e/0x3e8),_0x2b1cf5),_0x2b1cf5+=0x4,_0x102a7e[_0x4d6104(0x204)](_0x3bfd14[_0x4d6104(0x2af)],_0x2b1cf5++),_0x3bfd14[_0x4d6104(0x24d)](_0x102a7e,_0x2b1cf5),_0x2b1cf5+=_0x3bfd14[_0x4d6104(0x2af)];let _0x1389c9=0x0;for(let _0x1c69e0=0x0;_0x1c69e0<_0x20d71d['length'];_0x1c69e0++){if(features[_0x20d71d[_0x1c69e0]])_0x1389c9|=0x1<<_0x1c69e0;}_0x102a7e[_0x4d6104(0x3cd)](_0x1389c9,_0x2b1cf5),_0x2b1cf5+=0x2;const _0x47c415=[_0x4d6104(0x20d),_0x4d6104(0xd2),_0x4d6104(0x253),_0x4d6104(0x2d3)];for(const _0x4ffa5b of _0x47c415){_0x102a7e[_0x4d6104(0x181)](limits[_0x4ffa5b]||0x0,_0x2b1cf5),_0x2b1cf5+=0x4;}return _0x102a7e;}function _0x3720e6(_0x2ae736){const _0x501609=_0x119820;let _0x56ed5a=0x0;const _0x459ece=_0x2ae736['readUInt8'](_0x56ed5a++),_0x11b4be=_0x2ae736[_0x501609(0x24e)](_0x56ed5a++),_0x424b78=_0x2ae736['readUInt32BE'](_0x56ed5a);_0x56ed5a+=0x4;const _0xb34611=_0x2ae736['readUInt32BE'](_0x56ed5a);_0x56ed5a+=0x4;const _0x491b6e=_0x2ae736[_0x501609(0x24e)](_0x56ed5a++),_0x3e209c=_0x2ae736[_0x501609(0x237)](_0x56ed5a,_0x56ed5a+_0x491b6e)['toString'](_0x501609(0x1f6));_0x56ed5a+=_0x491b6e;const _0x3e9c8e=_0x2ae736['readUInt16BE'](_0x56ed5a);_0x56ed5a+=0x2;const _0x27c764={};for(let _0x23db50=0x0;_0x23db50<_0x20d71d[_0x501609(0x2af)];_0x23db50++){_0x27c764[_0x20d71d[_0x23db50]]=Boolean(_0x3e9c8e&0x1<<_0x23db50);}const _0x571447=[_0x501609(0x20d),_0x501609(0xd2),_0x501609(0x253),_0x501609(0x2d3)],_0x45aba4={};for(const _0x152a82 of _0x571447){const _0x2ab4b5=_0x2ae736[_0x501609(0x170)](_0x56ed5a);_0x56ed5a+=0x4,_0x45aba4[_0x152a82]=_0x2ab4b5===0x0?null:_0x2ab4b5;}return{'v':_0x459ece,'licenseType':_0x11b4be,'issuedAt':_0x424b78*0x3e8,'expiresAt':_0xb34611*0x3e8,'licensee':_0x3e209c,'features':_0x27c764,'limits':_0x45aba4};}function _0x590bb6(_0x563fc9,_0x34fa7b){const _0x18f952=_0x119820,_0x17c0a3=Buffer[_0x18f952(0xf4)]([_0x563fc9,_0x34fa7b]),_0x66369c=_0x56e935(_0x17c0a3),_0x7ec618=[];for(let _0x2f262e=0x0;_0x2f262e<_0x66369c[_0x18f952(0x2af)];_0x2f262e+=0x8){_0x7ec618[_0x18f952(0x322)](_0x66369c[_0x18f952(0x237)](_0x2f262e,_0x2f262e+0x8));}return _0x7ec618['join']('-');}function _0x13524d(_0x24e85a){const _0x4f6f4a=_0x119820;if(typeof _0x24e85a!==_0x4f6f4a(0x323))throw new Error(_0x4f6f4a(0x343));const _0x3e78bd=_0x3113b2(_0x24e85a['replace'](/-/g,''));if(_0x3e78bd[_0x4f6f4a(0x2af)]<0x41)throw new Error(_0x4f6f4a(0x34d)+_0x3e78bd[_0x4f6f4a(0x2af)]+_0x4f6f4a(0x37b));const _0x3b9358=_0x3e78bd[_0x4f6f4a(0x237)](0x0,_0x3e78bd[_0x4f6f4a(0x2af)]-0x40),_0x58f6c0=_0x3e78bd['slice'](_0x3e78bd[_0x4f6f4a(0x2af)]-0x40);let _0x24a537;try{_0x24a537=_0x3720e6(_0x3b9358);}catch(_0x56bce1){throw new Error(_0x4f6f4a(0x105)+_0x56bce1[_0x4f6f4a(0x2df)]);}return{'rawBuf':_0x3e78bd,'payload':_0x3b9358,'sig':_0x58f6c0,'decoded':_0x24a537};}function _0x2bc3e8(_0x454d04){const _0x433f2f=_0x119820;return _0x2cce09[_0x433f2f(0x229)]('sha256')['update'](_0x454d04)['digest']()[_0x433f2f(0x237)](0x0,0x8);}function _0x4fda4d(_0x20f4f1,_0x10a81f,_0xa518e3){const _0x2768ea=_0x119820,_0x423530=_0x2768ea(0x171)+_0xa518e3,_0xa28ec2=Buffer[_0x2768ea(0xf4)]([Buffer[_0x2768ea(0x264)](_0x20f4f1,'utf8'),_0x10a81f]),_0x19edf9=_0x2cce09[_0x2768ea(0x36e)](_0x2768ea(0x394),_0x423530)[_0x2768ea(0x356)](_0xa28ec2)[_0x2768ea(0x2c7)](),_0x52a7ae=_0x56e935(_0x19edf9[_0x2768ea(0x237)](0x0,0x5));return{'pin':_0x52a7ae,'pinHmac':_0x19edf9};}function _0x24badb(_0x3c6e40,_0xfee176,_0x171fb1){const _0x3a26f9=_0x119820,_0x22b3ba=Buffer[_0x3a26f9(0x2e4)](0x4d);let _0xf28713=0x0;_0x22b3ba['writeUInt8'](0x1,_0xf28713++),_0x3c6e40[_0x3a26f9(0x24d)](_0x22b3ba,_0xf28713),_0xf28713+=0x8,_0x22b3ba[_0x3a26f9(0x181)](_0xfee176,_0xf28713),_0xf28713+=0x4,_0x171fb1['copy'](_0x22b3ba,_0xf28713);const _0x52e4b8=_0x56e935(_0x22b3ba),_0x36190e=[];for(let _0x31053e=0x0;_0x31053e<_0x52e4b8[_0x3a26f9(0x2af)];_0x31053e+=0x6){_0x36190e[_0x3a26f9(0x322)](_0x52e4b8[_0x3a26f9(0x237)](_0x31053e,_0x31053e+0x6));}return _0x36190e[_0x3a26f9(0x180)]('-');}function _0x367222(_0x48e1c0){const _0x379ad=_0x119820;if(typeof _0x48e1c0!==_0x379ad(0x323))throw new Error(_0x379ad(0x369));const _0x18c49d=_0x3113b2(_0x48e1c0[_0x379ad(0x19c)](/-/g,''));if(_0x18c49d[_0x379ad(0x2af)]!==0x4d)throw new Error(_0x379ad(0x210)+_0x18c49d['length']);let _0x12c7f8=0x0;const _0x31da91=_0x18c49d[_0x379ad(0x24e)](_0x12c7f8++),_0x46d29c=_0x18c49d[_0x379ad(0x237)](_0x12c7f8,_0x12c7f8+0x8);_0x12c7f8+=0x8;const _0x141742=_0x18c49d[_0x379ad(0x170)](_0x12c7f8);_0x12c7f8+=0x4;const _0x1def87=_0x18c49d[_0x379ad(0x237)](_0x12c7f8);return{'v':_0x31da91,'licenseHash':_0x46d29c,'expiry':_0x141742,'sig':_0x1def87};}function _0x1799d0({tokenString:_0x4a6c7c,nodeId:_0x167ab7,rawBlobBuf:_0x4b18fd,pubKeyPem:_0x3ff083,pubFingerprint:_0x263cdd}){const _0x32e885=_0x119820;let _0x41b2fb;try{_0x41b2fb=_0x367222(_0x4a6c7c);}catch(_0x14a5e0){return{'valid':![],'reason':_0x32e885(0x395)};}const _0x145d68=_0x2bc3e8(_0x4b18fd);if(!_0x145d68[_0x32e885(0x2a7)](_0x41b2fb[_0x32e885(0x207)]))return{'valid':![],'reason':_0x32e885(0x19d)};const {pinHmac:_0x10f888}=_0x4fda4d(_0x167ab7,_0x145d68,_0x263cdd),_0x3492b9=Buffer['allocUnsafe'](0x4);_0x3492b9[_0x32e885(0x181)](_0x41b2fb['expiry'],0x0);const _0x2e6faf=Buffer['concat']([Buffer['from']([_0x41b2fb['v']]),_0x10f888['slice'](0x0,0x5),_0x41b2fb[_0x32e885(0x207)],_0x3492b9]);try{const _0x4d8303=_0x2cce09[_0x32e885(0x1ff)](null,_0x2e6faf,_0x3ff083,_0x41b2fb[_0x32e885(0x1e5)]);if(!_0x4d8303)return{'valid':![],'reason':'SIG_INVALID'};}catch(_0x1d5e59){return{'valid':![],'reason':'SIG_INVALID'};}if(_0x41b2fb[_0x32e885(0x3ac)]<Date['now']()/0x3e8)return{'valid':![],'reason':_0x32e885(0x131)};return{'valid':!![],'reason':'ok'};}function _0x3cb57e(_0x51c81a){const _0x1be8bc=_0x119820;if(typeof _0x51c81a!==_0x1be8bc(0x323))return'unknown';const _0x11c614=_0x51c81a[_0x1be8bc(0x1e6)]();if(_0x11c614[_0x1be8bc(0x193)]('/')||_0x11c614[_0x1be8bc(0x193)]('./')||_0x11c614[_0x1be8bc(0x193)](_0x1be8bc(0x1ca))||/^[A-Za-z]:[\\/]/[_0x1be8bc(0x1d0)](_0x11c614))return _0x1be8bc(0x176);if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i[_0x1be8bc(0x1d0)](_0x11c614))return _0x1be8bc(0x2a4);const _0x10c6e1=_0x11c614[_0x1be8bc(0x19c)](/[\s-]+/g,'')['length'];if(_0x10c6e1===0x7c)return _0x1be8bc(0x14d);if(_0x10c6e1>=0x95&&_0x10c6e1<=0xfc)return _0x1be8bc(0x121);return _0x1be8bc(0x2bc);}return okdbLicenseCodec={'toBase32':_0x56e935,'fromBase32':_0x3113b2,'encodeLicensePayload':_0x2d3a6f,'decodeLicensePayload':_0x3720e6,'encodeLicenseBlob':_0x590bb6,'decodeLicenseBlob':_0x13524d,'licenseHash':_0x2bc3e8,'derivePin':_0x4fda4d,'encodeActivationToken':_0x24badb,'decodeActivationToken':_0x367222,'verifyActivation':_0x1799d0,'detectInputType':_0x3cb57e,'FEATURE_NAMES':_0x20d71d,'LICENSE_TYPE_STANDARD':_0x244137,'LICENSE_TYPE_OPEN':_0x32ad42,'LICENSE_TYPE_INTERNAL':_0x5ef567,'OPEN_LICENSE_MAX_DURATION_MS':_0x1c85d8},okdbLicenseCodec;}var okdbError,hasRequiredOkdbError;function requireOkdbError(){if(hasRequiredOkdbError)return okdbError;hasRequiredOkdbError=0x1;class _0x52f41d extends Error{constructor(_0x1e2c7d,_0x5a8c9f,_0x2d0ebf={}){const _0x564aae=_0x206f;super(_0x1e2c7d),this[_0x564aae(0x2f4)]='OKDBError',this[_0x564aae(0x381)]=_0x5a8c9f,this[_0x564aae(0x1a2)]=_0x2d0ebf,_0x2d0ebf[_0x564aae(0x3c7)]&&(this[_0x564aae(0x3c7)]=_0x2d0ebf['cause']),Error[_0x564aae(0x194)](this,this['constructor']);}}class _0x4ada9a extends _0x52f41d{constructor(_0x3b6b5d,_0x5867bd,_0x5e0785,_0x521984){const _0xb3ea05=_0x206f;super(_0xb3ea05(0x228)+_0x3b6b5d+'@'+_0x5867bd+_0xb3ea05(0x3d0)+_0x5e0785+',\x20got\x20'+_0x521984,'VERSION_MISMATCH',{'type':_0x3b6b5d,'key':_0x5867bd,'expectedVersion':_0x5e0785,'actualVersion':_0x521984}),this[_0xb3ea05(0x2f4)]=_0xb3ea05(0x192);}}class _0x313bc6 extends _0x52f41d{constructor(_0x3e5d4f,_0x35f26c){const _0x287e4c=_0x206f;super(_0x3e5d4f+'@'+_0x35f26c+'\x20does\x20not\x20exist',_0x287e4c(0xf2),{'type':_0x3e5d4f,'key':_0x35f26c}),this[_0x287e4c(0x2f4)]=_0x287e4c(0x24c);}}class _0x5b210a extends _0x52f41d{constructor(_0x116849,_0xdd187b){const _0x3b2764=_0x206f;super(_0x116849+'@'+_0xdd187b+'\x20already\x20exists',_0x3b2764(0x368),{'type':_0x116849,'key':_0xdd187b}),this[_0x3b2764(0x2f4)]=_0x3b2764(0x29d);}}class _0xd84731 extends _0x52f41d{constructor(_0x38541a,_0x55ed52){const _0x1750d5=_0x206f,_0x8115c1=typeof _0x55ed52;super(_0x1750d5(0x12a)+_0x38541a+'\x27:\x20'+_0x8115c1+_0x1750d5(0x36c)+_0x55ed52,_0x1750d5(0xf0),{'index':_0x38541a,'key':_0x55ed52,'keyType':_0x8115c1}),this[_0x1750d5(0x2f4)]=_0x1750d5(0x2e2);}}class _0x2ba875 extends _0x52f41d{constructor(_0x38cd09){const _0x221a73=_0x206f,_0x51afe5=typeof _0x38cd09;super('Invalid\x20primary\x20key\x20type:\x20'+_0x51afe5+_0x221a73(0x37a)+_0x38cd09,_0x221a73(0x2d1),{'key':_0x38cd09,'keyType':_0x51afe5}),this[_0x221a73(0x2f4)]='OKDBInvalidPrimaryKeyError';}}class _0x25bade extends _0x52f41d{constructor(_0x4829d1){const _0x14e043=_0x206f;super(_0x14e043(0x371)+_0x4829d1+_0x14e043(0x199),'TYPE_NOT_REGISTERED',{'type':_0x4829d1}),this[_0x14e043(0x2f4)]=_0x14e043(0x352);}}class _0x493527 extends _0x52f41d{constructor(_0x493f11){const _0x59ffc0=_0x206f;super('Type\x20\x27'+_0x493f11+_0x59ffc0(0xe8),_0x59ffc0(0x3c3),{'type':_0x493f11}),this[_0x59ffc0(0x2f4)]=_0x59ffc0(0x241);}}class _0x439518 extends _0x52f41d{constructor(_0x19ae09,_0x4023ae){const _0x3d36cc=_0x206f;super(_0x3d36cc(0x34e)+_0x4023ae+_0x3d36cc(0x239)+_0x19ae09+_0x3d36cc(0x199),_0x3d36cc(0x14c),{'type':_0x19ae09,'index':_0x4023ae}),this[_0x3d36cc(0x2f4)]='OKDBIndexNotRegisteredError';}}class _0x1ceac1 extends _0x52f41d{constructor(_0x5b7d4f,_0x15c859){const _0x4a32c7=_0x206f;super('Index\x20\x27'+_0x15c859+_0x4a32c7(0x239)+_0x5b7d4f+'\x27\x20is\x20already\x20registered','INDEX_ALREADY_REGISTERED',{'type':_0x5b7d4f,'index':_0x15c859}),this['name']=_0x4a32c7(0x10d);}}class _0x34b84e extends _0x52f41d{constructor(_0x1ad224,_0x32eeb8={}){const _0x5a52e9=_0x206f;super(_0x1ad224,'INVALID_VALUE',_0x32eeb8),this[_0x5a52e9(0x2f4)]='OKDBInvalidValueError';}}class _0x5cd513 extends _0x52f41d{constructor(_0x1847ce,_0x3202c9,_0x78342d,_0x137484,_0x20d2fc){const _0x33866f=_0x206f;super(_0x33866f(0x2ce)+_0x1847ce+'@'+_0x3202c9+_0x33866f(0x1bc)+_0x78342d+']\x20already\x20maps\x20to\x20\x27'+_0x137484+_0x33866f(0x331)+_0x20d2fc+'\x27',_0x33866f(0x21d),{'type':_0x1847ce,'index':_0x3202c9,'indexKey':_0x78342d,'existingKey':_0x137484,'conflictingKey':_0x20d2fc}),this[_0x33866f(0x2f4)]='OKDBUniqueConstraintError';}}class _0x3476f9 extends _0x52f41d{constructor(_0x527dd6,_0x40eb9e,_0x53a883){const _0x216333=_0x206f;super(_0x216333(0x13c)+_0x527dd6+'@'+_0x40eb9e,_0x216333(0x293),{'type':_0x527dd6,'key':_0x40eb9e,'errors':_0x53a883}),this['name']='OKDBSchemaValidationError',this[_0x216333(0x152)]=_0x527dd6,this['key']=_0x40eb9e,this['errors']=_0x53a883;}}class _0x1131df extends _0x52f41d{constructor(_0x87e441,_0x1a1e24){const _0x150648=_0x206f;super('Cannot\x20set\x20enforce\x20schema\x20on\x20'+_0x87e441+':\x20'+_0x1a1e24[_0x150648(0x2af)]+_0x150648(0x25a),_0x150648(0x3a8),{'type':_0x87e441,'failures':_0x1a1e24}),this[_0x150648(0x2f4)]=_0x150648(0x188),this[_0x150648(0x152)]=_0x87e441,this[_0x150648(0x1f2)]=_0x1a1e24;}}class _0x24add9 extends _0x52f41d{constructor(_0x86b79d,_0x24d97a,_0xc8a4b9,_0x522889,_0x45781){const _0x175214=_0x206f;super(_0x175214(0x196)+_0x86b79d+'@'+_0x24d97a+'.'+_0xc8a4b9+'\x20references\x20'+_0x522889+'@'+_0x45781+_0x175214(0x1ce),'FOREIGN_KEY_VIOLATION',{'sourceType':_0x86b79d,'sourceKey':_0x24d97a,'fieldPath':_0xc8a4b9,'targetType':_0x522889,'targetKey':_0x45781}),this[_0x175214(0x2f4)]=_0x175214(0x1a9),this['sourceType']=_0x86b79d,this['sourceKey']=_0x24d97a,this[_0x175214(0x2d8)]=_0xc8a4b9,this[_0x175214(0x367)]=_0x522889,this[_0x175214(0x32c)]=_0x45781;}}class _0x9ec6b4 extends _0x52f41d{constructor(_0xd5445d,_0x4899c4,_0x26f1e5){const _0x460794=_0x206f;super(_0x460794(0x126)+_0xd5445d+'@'+_0x4899c4+':\x20'+_0x26f1e5['length']+_0x460794(0x202),'FOREIGN_KEY_DELETE_RESTRICTED',{'targetType':_0xd5445d,'targetKey':_0x4899c4,'references':_0x26f1e5}),this[_0x460794(0x2f4)]='OKDBForeignKeyDeleteError',this[_0x460794(0x367)]=_0xd5445d,this['targetKey']=_0x4899c4,this['references']=_0x26f1e5;}}class _0xa05d38 extends _0x52f41d{constructor(_0x2be3f8,_0x11db49,_0x42fb04){const _0x56843c=_0x206f;super('Index\x20\x22'+_0x11db49+'\x22\x20on\x20\x22'+_0x2be3f8+_0x56843c(0x2b4)+_0x42fb04[_0x56843c(0x321)](_0x24a76d=>_0x24a76d[_0x56843c(0x30f)]+':'+_0x24a76d[_0x56843c(0x2f4)])[_0x56843c(0x180)](',\x20'),_0x56843c(0x32f),{'type':_0x2be3f8,'index':_0x11db49,'usedBy':_0x42fb04}),this[_0x56843c(0x2f4)]='OKDBIndexHasConsumersError';}}return okdbError={'OKDBError':_0x52f41d,'OKDBVersionMismatchError':_0x4ada9a,'OKDBNotFoundError':_0x313bc6,'OKDBAlreadyExistsError':_0x5b210a,'OKDBInvalidIndexKeyError':_0xd84731,'OKDBInvalidPrimaryKeyError':_0x2ba875,'OKDBTypeNotRegisteredError':_0x25bade,'OKDBTypeAlreadyRegisteredError':_0x493527,'OKDBIndexNotRegisteredError':_0x439518,'OKDBIndexAlreadyRegisteredError':_0x1ceac1,'OKDBInvalidValueError':_0x34b84e,'OKDBUniqueConstraintError':_0x5cd513,'OKDBSchemaValidationError':_0x3476f9,'OKDBSchemaCollectionError':_0x1131df,'OKDBForeignKeyError':_0x24add9,'OKDBForeignKeyDeleteError':_0x9ec6b4,'OKDBIndexHasConsumersError':_0xa05d38},okdbError;}var okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x4f907b=_0x1df1fe;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x563914={'PUT':_0x4f907b(0x252),'REMOVE':'remove','INDEX_DROP':_0x4f907b(0x214),'INDEX_REGISTER':_0x4f907b(0x347),'INDEX_RESET':_0x4f907b(0xd8),'TYPE_REGISTER':_0x4f907b(0x354),'TYPE_DROP':_0x4f907b(0x353),'FTS_REGISTER':'registerFts','FTS_DROP':_0x4f907b(0x27e),'FTS_RESET':_0x4f907b(0x29b),'SCHEMA_SET':_0x4f907b(0x300),'SCHEMA_DROP':'dropSchema','TTL_SET':_0x4f907b(0x1f0),'TTL_CLEAR':'clearTtl'},_0x1e7eac={'SYSTEM_READY':_0x4f907b(0xf7),'SYSTEM_STOPPED':'system:stopped','SYSTEM_CLOCK_CHANGE':'system:clock_change','SYSTEM_POKE':_0x4f907b(0x384),'SYSTEM_DRAIN':_0x4f907b(0x1b2),'SYSTEM_BUS_STATE_CHANGE':_0x4f907b(0x335),'ITEM_CREATE':_0x4f907b(0x249),'ITEM_UPDATE':_0x4f907b(0x1a4),'ITEM_REMOVE':_0x4f907b(0x31f),'INDEX_RESET':'index:reset','INDEX_READY':'index:ready','INDEX_PROGRESS':_0x4f907b(0x218),'VIEW_PROGRESS':_0x4f907b(0x164),'INDEX_DROP':'index:drop','INDEX_REGISTERED':_0x4f907b(0x14e),'FTS_REGISTERED':_0x4f907b(0x379),'FTS_DROP':'fts:drop','FTS_RESET':_0x4f907b(0x17e),'SCHEMA_SET':_0x4f907b(0x1cb),'SCHEMA_DROP':_0x4f907b(0x12f),'UNIQUE_VIOLATION':_0x4f907b(0x31d),'UNIQUE_VIOLATION_RESOLVED':_0x4f907b(0x1a1),'REF_VIOLATION':_0x4f907b(0x13d),'REF_VIOLATION_RESOLVED':_0x4f907b(0x3a5),'SYNC_APPLY':_0x4f907b(0x35f),'TXN_START':_0x4f907b(0x2b6),'TXN_END':_0x4f907b(0x250),'TXN_ROLLBACK':'txn:rollback','TYPE_REGISTERED':_0x4f907b(0xd3),'TYPE_DROP':_0x4f907b(0x3d2),'ENV_OPENED':_0x4f907b(0x34a),'ENV_REMOVED':_0x4f907b(0x26c),'TTL_EXPIRED':_0x4f907b(0x388),'TTL_SET':'ttl:set','TTL_CLEAR':_0x4f907b(0x195),'LICENSE_INVALID':'license:invalid','LICENSE_ADDED':'license:added','LICENSE_ACTIVATED':'license:activated','LICENSE_REMOVED':_0x4f907b(0x385)},_0x4912d4={'CREATING':_0x4f907b(0x1c3),'RESETTING':_0x4f907b(0x109),'READY':'ready','DROPPING':_0x4f907b(0x227),'WAITING':_0x4f907b(0x1bf)},_0x2bfd33={'CREATED':_0x4f907b(0x128),'STARTING':_0x4f907b(0x31e),'STARTED':_0x4f907b(0x22e),'STOPPING':_0x4f907b(0x18a),'STOPPED':_0x4f907b(0x298)},_0x2af41d={'CREATING':_0x4f907b(0x1c3),'READY':_0x4f907b(0x167),'HALTED':_0x4f907b(0x225),'STOPPED':'stopped','RESETTING':_0x4f907b(0x109)},_0x1aad20=Object[_0x4f907b(0xf3)]({'POKE':'bus:poke','DRAIN':_0x4f907b(0x1c1)});return okdbEnums={'BUS_EVENTS':_0x1aad20,'CHANGE_ACTIONS':_0x563914,'EVENTS':_0x1e7eac,'INDEX_STATE':_0x4912d4,'OKDB_STATE':_0x2bfd33,'VIEW_STATE':_0x2af41d},okdbEnums;}var okdbPubkey,hasRequiredOkdbPubkey;function requireOkdbPubkey(){const _0x18c45c=_0x1df1fe;if(hasRequiredOkdbPubkey)return okdbPubkey;hasRequiredOkdbPubkey=0x1;const _0x69a0a4=require$$1,_0x51aa5c=require$$1$1,_0x42169c=require$$0,_0x26c61c=_0x69a0a4['readFileSync'](_0x51aa5c[_0x18c45c(0x180)](__dirname,_0x18c45c(0x2aa)),_0x18c45c(0x1f6))[_0x18c45c(0x1e6)](),_0x5e6d=_0x42169c[_0x18c45c(0x330)](_0x26c61c)[_0x18c45c(0x2cf)]({'type':_0x18c45c(0x231),'format':'der'}),_0x45ee32=_0x42169c[_0x18c45c(0x229)](_0x18c45c(0x394))[_0x18c45c(0x356)](_0x5e6d)['digest'](_0x18c45c(0x2b8))['slice'](0x0,0x10);return okdbPubkey={'PUBLIC_KEY_PEM':_0x26c61c,'PUB_FINGERPRINT':_0x45ee32},okdbPubkey;}var okdbLicense,hasRequiredOkdbLicense;function requireOkdbLicense(){const _0x2534b0=_0x1df1fe;if(hasRequiredOkdbLicense)return okdbLicense;hasRequiredOkdbLicense=0x1;const _0x2bbba6=require$$0,{OKDBError:_0x340273}=requireOkdbError(),{EVENTS:_0x5a773a}=requireOkdbEnums(),_0x1f7eb7=requireOkdbLicenseCodec(),{LICENSE_TYPE_OPEN:_0x123eed,LICENSE_TYPE_INTERNAL:_0x3f82eb,OPEN_LICENSE_MAX_DURATION_MS:_0x42cc37}=_0x1f7eb7,_0x1012c8=requireOkdbPubkey(),_0x25fa1e={'LICENSED_BUILD':_0x2534b0(0x186),'PUBLIC_KEY_PEM':_0x1012c8['PUBLIC_KEY_PEM'],'PUB_FINGERPRINT':_0x1012c8[_0x2534b0(0x33f)],'LICENSE_EXPIRED_ACTION':'log'},_0x3f3a1c='~licenses',_0x4e6fe5={'features':{'sync':![],'embeddings':![],'engines':![],'fts':!![],'timeMachine':![],'views':!![],'mcp':!![],'files':!![]},'limits':{'envs':0x2,'typesPerEnv':0xa,'syncPeers':0x0,'maxWrites':0xf4240},'_isFree':!![]};async function _0x3830ed(_0x5b906c){const _0x8af9fc=_0x2534b0;!_0x5b906c[_0x8af9fc(0x201)](_0x3f3a1c)&&await _0x5b906c[_0x8af9fc(0x354)](_0x3f3a1c);}class _0x674ed6{constructor(_0x5368bc){const _0xa04afa=_0x2534b0;this[_0xa04afa(0x3c1)]=_0x5368bc,this[_0xa04afa(0x279)]=null;}async[_0x2534b0(0x303)](){const _0x17e401=_0x2534b0,_0x45242f=this['okdb'][_0x17e401(0x108)];if(!_0x45242f||!_0x45242f[_0x17e401(0x201)](_0x3f3a1c)){this['_active']=null;return;}const _0x3c1e4e=this[_0x17e401(0x3c1)]['id'];let _0x139324=null;for(const {key:_0x223a99,value:_0x150f94}of _0x45242f[_0x17e401(0x3c9)](_0x3f3a1c)){const _0x5cd0c1=this['_computeStatus'](_0x150f94,_0x3c1e4e);_0x5cd0c1===_0x17e401(0x3c4)&&!_0x139324&&(_0x139324={..._0x150f94,'id':_0x223a99,'status':_0x5cd0c1});}this['_active']=_0x139324;if(this[_0x17e401(0x279)]&&this[_0x17e401(0x279)][_0x17e401(0x154)]===_0x123eed){const _0x131ac4=Math[_0x17e401(0x275)]((this[_0x17e401(0x279)][_0x17e401(0x240)]-Date[_0x17e401(0x234)]())/0x5265c00);this['okdb']['log']?.[_0x17e401(0x1a0)](_0x17e401(0x392)+_0x131ac4+_0x17e401(0x278),{'feature':_0x17e401(0x329),'licensee':this['_active']['licensee'],'expiresAt':new Date(this['_active'][_0x17e401(0x240)])[_0x17e401(0x387)]()});}this[_0x17e401(0x279)]&&this['_active'][_0x17e401(0x154)]===_0x3f82eb&&this['okdb'][_0x17e401(0x23a)]?.[_0x17e401(0x1a0)](_0x17e401(0x15b),{'feature':_0x17e401(0x329),'licensee':this['_active']['licensee']});}[_0x2534b0(0x21a)](_0x51dd06,_0x3f90e7){const _0x4f6b46=_0x2534b0;if(!_0x51dd06[_0x4f6b46(0x121)])return _0x4f6b46(0xf1);let _0x5384ee;try{_0x5384ee=_0x1f7eb7['decodeLicenseBlob'](_0x51dd06[_0x4f6b46(0x121)]);}catch(_0x2746c4){return _0x4f6b46(0xf1);}try{const _0x56e766=_0x2bbba6[_0x4f6b46(0x1ff)](null,_0x5384ee['payload'],_0x25fa1e[_0x4f6b46(0xd7)],_0x5384ee[_0x4f6b46(0x1e5)]);if(!_0x56e766)return _0x4f6b46(0xf1);}catch(_0x4d3acb){return _0x4f6b46(0xf1);}if(_0x5384ee[_0x4f6b46(0x248)][_0x4f6b46(0x154)]===_0x3f82eb)return _0x4f6b46(0x3c4);if(_0x5384ee[_0x4f6b46(0x248)][_0x4f6b46(0x240)]<=Date['now']())return'expired';if(_0x5384ee[_0x4f6b46(0x248)]['licenseType']===_0x123eed)return'active';if(!_0x51dd06[_0x4f6b46(0x14d)])return _0x4f6b46(0x3c2);const _0x4b8e24=_0x1f7eb7['verifyActivation']({'tokenString':_0x51dd06[_0x4f6b46(0x14d)],'nodeId':_0x3f90e7,'rawBlobBuf':_0x5384ee['rawBuf'],'pubKeyPem':_0x25fa1e[_0x4f6b46(0xd7)],'pubFingerprint':_0x25fa1e[_0x4f6b46(0x33f)]});if(_0x4b8e24[_0x4f6b46(0x16d)]===_0x4f6b46(0x19d)||_0x4b8e24[_0x4f6b46(0x16d)]===_0x4f6b46(0x184))return _0x4f6b46(0x3ab);if(_0x4b8e24[_0x4f6b46(0x16d)]===_0x4f6b46(0x131))return _0x4f6b46(0x28d);if(!_0x4b8e24[_0x4f6b46(0x10a)])return _0x4f6b46(0x3ab);return _0x4f6b46(0x3c4);}get[_0x2534b0(0x3c4)](){const _0xa27342=_0x2534b0;return this[_0xa27342(0x279)];}get[_0x2534b0(0x357)](){const _0x1b9990=_0x2534b0;return this[_0x1b9990(0x279)]??_0x4e6fe5;}[_0x2534b0(0x375)](_0x26cdc9){const _0x2be887=_0x2534b0;if(_0x25fa1e['LICENSED_BUILD']!==_0x2be887(0x186))return;const _0x5427ee=this[_0x2be887(0x357)];if(!_0x5427ee[_0x2be887(0x1ed)]?.[_0x26cdc9]){const _0x25085d=_0x5427ee[_0x2be887(0x310)]?_0x2be887(0x2e6)+_0x26cdc9+_0x2be887(0xff)+_0x26cdc9+'\x22\x20to\x20enable\x20it.':_0x2be887(0x208)+_0x26cdc9+_0x2be887(0x1d7)+_0x26cdc9+'\x22.';throw new _0x340273(_0x25085d,'LICENSE_FEATURE_DISABLED',{'feature':_0x26cdc9});}}[_0x2534b0(0x30c)](_0x1d7bab){const _0x5c7d73=_0x2534b0;if(_0x25fa1e['LICENSED_BUILD']!==_0x5c7d73(0x186))return!![];return!!this[_0x5c7d73(0x357)]['features']?.[_0x1d7bab];}['assertLimit'](_0x3ab45b,_0x681c0a){const _0x14deb8=_0x2534b0;if(_0x25fa1e['LICENSED_BUILD']!=='true')return;const _0x55b66f=this[_0x14deb8(0x357)],_0x206a18=_0x55b66f[_0x14deb8(0x23c)]?.[_0x3ab45b];if(_0x206a18===null||_0x206a18===undefined||_0x206a18===0x0)return;if(_0x681c0a>=_0x206a18)throw new _0x340273(_0x14deb8(0x1c9)+_0x3ab45b+'\x20('+_0x681c0a+'/'+_0x206a18+')',_0x14deb8(0x39d),{'limit':_0x3ab45b,'current':_0x681c0a,'max':_0x206a18});}async[_0x2534b0(0xd6)](_0x16eb59){const _0x5e2533=_0x2534b0;let _0x1b401a;try{_0x1b401a=_0x1f7eb7[_0x5e2533(0x271)](_0x16eb59);}catch(_0x42d833){throw new _0x340273(_0x5e2533(0x30d)+_0x42d833[_0x5e2533(0x2df)],_0x5e2533(0x30b));}let _0x40aa41;try{_0x40aa41=_0x2bbba6[_0x5e2533(0x1ff)](null,_0x1b401a['payload'],_0x25fa1e[_0x5e2533(0xd7)],_0x1b401a[_0x5e2533(0x1e5)]);}catch(_0x3a4d26){throw new _0x340273(_0x5e2533(0x15d)+_0x3a4d26[_0x5e2533(0x2df)],_0x5e2533(0x30b));}if(!_0x40aa41)throw new _0x340273(_0x5e2533(0x339)+('Build\x20expects\x20public\x20key\x20fingerprint\x20'+_0x25fa1e[_0x5e2533(0x33f)]+'.\x20')+'Either\x20the\x20build\x20was\x20made\x20with\x20a\x20different\x20keypair,\x20or\x20the\x20license\x20was\x20issued\x20with\x20a\x20different\x20private\x20key.',_0x5e2533(0x30b),{'expectedFingerprint':_0x25fa1e['PUB_FINGERPRINT']});if(_0x1b401a[_0x5e2533(0x248)][_0x5e2533(0x154)]===_0x123eed){const _0x3baa9d=_0x1b401a[_0x5e2533(0x248)][_0x5e2533(0x240)]-_0x1b401a[_0x5e2533(0x248)][_0x5e2533(0x361)];if(_0x3baa9d>_0x42cc37)throw new _0x340273(_0x5e2533(0xfb)+Math[_0x5e2533(0x275)](_0x3baa9d/(0x1e*0x5265c00))+_0x5e2533(0x136),'LICENSE_INVALID');}const _0xd4eb63=this[_0x5e2533(0x3c1)][_0x5e2533(0x108)];await _0x3830ed(_0xd4eb63);const _0x33a800=_0x1f7eb7[_0x5e2533(0x207)](_0x1b401a[_0x5e2533(0x3ce)])[_0x5e2533(0x3bc)](_0x5e2533(0x2b8));for(const {value:_0xfdb9a5}of _0xd4eb63['getRange'](_0x3f3a1c)){if(_0xfdb9a5[_0x5e2533(0x359)]===_0x33a800)throw new _0x340273(_0x5e2533(0xec),_0x5e2533(0x30b));}const _0x51a342=_0x2bbba6[_0x5e2533(0x348)](),_0x75fdd9={'blob':_0x16eb59,'activation':null,'addedAt':Date[_0x5e2533(0x234)](),'_licenseHash':_0x33a800,'licensee':_0x1b401a[_0x5e2533(0x248)][_0x5e2533(0x346)],'expiresAt':_0x1b401a[_0x5e2533(0x248)]['expiresAt'],'features':_0x1b401a[_0x5e2533(0x248)][_0x5e2533(0x1ed)],'limits':_0x1b401a[_0x5e2533(0x248)]['limits'],'licenseType':_0x1b401a[_0x5e2533(0x248)][_0x5e2533(0x154)]};return await _0xd4eb63[_0x5e2533(0x252)](_0x3f3a1c,_0x51a342,_0x75fdd9),{'id':_0x51a342,..._0x75fdd9};}async[_0x2534b0(0x2fa)](_0x43e8e2){const _0x3a5dd1=_0x2534b0;let _0x237e05;try{_0x237e05=_0x1f7eb7[_0x3a5dd1(0x3b5)](_0x43e8e2);}catch(_0x1359aa){throw new _0x340273(_0x3a5dd1(0x16c)+_0x1359aa[_0x3a5dd1(0x2df)],_0x3a5dd1(0x39f));}const _0x1e6e3d=_0x237e05[_0x3a5dd1(0x207)][_0x3a5dd1(0x3bc)](_0x3a5dd1(0x2b8)),_0x327587=this[_0x3a5dd1(0x3c1)]['_systemEnv'];if(!_0x327587||!_0x327587[_0x3a5dd1(0x201)](_0x3f3a1c))throw new _0x340273(_0x3a5dd1(0x3a2),_0x3a5dd1(0x39f));let _0x5ef9b5=null,_0x38cfb2=null;for(const {key:_0x58ba78,value:_0x47267f}of _0x327587[_0x3a5dd1(0x3c9)](_0x3f3a1c)){if(_0x47267f[_0x3a5dd1(0x359)]===_0x1e6e3d){_0x5ef9b5=_0x58ba78,_0x38cfb2=_0x47267f;break;}}if(!_0x5ef9b5)throw new _0x340273(_0x3a5dd1(0x3a2),_0x3a5dd1(0x39f));const {rawBuf:_0x303812}=_0x1f7eb7['decodeLicenseBlob'](_0x38cfb2[_0x3a5dd1(0x121)]),_0x333af6=_0x1f7eb7['verifyActivation']({'tokenString':_0x43e8e2,'nodeId':this[_0x3a5dd1(0x3c1)]['id'],'rawBlobBuf':_0x303812,'pubKeyPem':_0x25fa1e[_0x3a5dd1(0xd7)],'pubFingerprint':_0x25fa1e[_0x3a5dd1(0x33f)]});if(!_0x333af6['valid'])throw new _0x340273('Activation\x20invalid:\x20'+_0x333af6[_0x3a5dd1(0x16d)],_0x3a5dd1(0x39f),{'reason':_0x333af6[_0x3a5dd1(0x16d)]});const _0x6562ad={..._0x38cfb2,'activation':_0x43e8e2};return await _0x327587[_0x3a5dd1(0x356)](_0x3f3a1c,_0x5ef9b5,_0x6562ad),{'id':_0x5ef9b5,..._0x6562ad};}async[_0x2534b0(0x1bd)](_0x1af039){const _0x4f9977=_0x2534b0,_0x5991b9=this[_0x4f9977(0x3c1)][_0x4f9977(0x108)];if(!_0x5991b9||!_0x5991b9[_0x4f9977(0x201)](_0x3f3a1c))return;await _0x5991b9[_0x4f9977(0x2b1)](_0x3f3a1c,_0x1af039);}async[_0x2534b0(0x3c6)](){const _0x5897b3=_0x2534b0,_0x806ff1=this['okdb']['_systemEnv'];if(!_0x806ff1||!_0x806ff1[_0x5897b3(0x201)](_0x3f3a1c))return[];const _0x486af2=this[_0x5897b3(0x3c1)]['id'],_0x3f4b49=[];for(const {key:_0x23a98,value:_0x204355}of _0x806ff1[_0x5897b3(0x3c9)](_0x3f3a1c)){const _0x57860e=this[_0x5897b3(0x21a)](_0x204355,_0x486af2);_0x3f4b49[_0x5897b3(0x322)]({..._0x204355,'id':_0x23a98,'status':_0x57860e});}return _0x3f4b49;}[_0x2534b0(0x103)](){const _0x1eb819=_0x2534b0,_0x28cf97=this[_0x1eb819(0x3c1)]['_systemEnv'];if(!_0x28cf97||!_0x28cf97['hasType'](_0x3f3a1c))return[];const _0x443d49=this['okdb']['id'],_0x55acb2=[];for(const {key:_0x1e1097,value:_0x169cbb}of _0x28cf97['getRange'](_0x3f3a1c)){if(_0x169cbb[_0x1eb819(0x359)]){if(_0x169cbb[_0x1eb819(0x154)]===_0x123eed)_0x55acb2[_0x1eb819(0x322)]({'licenseId':_0x1e1097,'pin':null});else{const _0x14ea00=Buffer[_0x1eb819(0x264)](_0x169cbb[_0x1eb819(0x359)],_0x1eb819(0x2b8)),{pin:_0x836714}=_0x1f7eb7[_0x1eb819(0x37c)](_0x443d49,_0x14ea00,_0x25fa1e[_0x1eb819(0x33f)]);_0x55acb2['push']({'licenseId':_0x1e1097,'pin':_0x836714});}}}return _0x55acb2;}async['recheck'](){const _0x283070=_0x2534b0,_0x3fc0c8=this[_0x283070(0x279)];await this[_0x283070(0x303)]();if(this[_0x283070(0x279)]&&this[_0x283070(0x279)][_0x283070(0x154)]===_0x123eed){const _0x579c54=Math[_0x283070(0x275)]((this[_0x283070(0x279)][_0x283070(0x240)]-Date[_0x283070(0x234)]())/0x5265c00);this[_0x283070(0x3c1)][_0x283070(0x23a)]?.['warn'](_0x283070(0x392)+_0x579c54+_0x283070(0x278),{'feature':_0x283070(0x329),'licensee':this[_0x283070(0x279)][_0x283070(0x346)],'expiresAt':new Date(this[_0x283070(0x279)]['expiresAt'])[_0x283070(0x387)]()});}this[_0x283070(0x279)]&&this['_active'][_0x283070(0x154)]===_0x3f82eb&&this[_0x283070(0x3c1)][_0x283070(0x23a)]?.[_0x283070(0x1a0)]('⚠\x20INTERNAL\x20LICENSE\x20ACTIVE\x20—\x20all\x20features\x20and\x20limits\x20are\x20unlocked.\x20For\x20vendor/internal\x20use\x20only.',{'feature':_0x283070(0x329),'licensee':this['_active'][_0x283070(0x346)]});if(_0x3fc0c8&&!this['_active']){this[_0x283070(0x3c1)]['log']?.[_0x283070(0x1a0)](_0x283070(0x38d),{'feature':_0x283070(0x329)}),this['okdb']['events']?.['emit'](_0x5a773a[_0x283070(0x30b)],{'previous':_0x3fc0c8});const _0x4c87cd=this[_0x283070(0x3c1)][_0x283070(0x219)]?.['onLicenseExpired']??_0x25fa1e[_0x283070(0xdd)];_0x4c87cd===_0x283070(0x1be)&&(this['okdb'][_0x283070(0x23a)]?.['error'](_0x283070(0x28f),{'feature':'license'}),this[_0x283070(0x3c1)]['close']()[_0x283070(0x38c)](()=>{})[_0x283070(0x111)](()=>process[_0x283070(0x2d2)](0x1)));}}}return okdbLicense={'LicenseChecker':_0x674ed6,'_C':_0x25fa1e},okdbLicense;}var okdbShell,hasRequiredOkdbShell;function requireOkdbShell(){const _0x468a94=_0x1df1fe;if(hasRequiredOkdbShell)return okdbShell;hasRequiredOkdbShell=0x1;const _0x2c7f74=require$$0$2,_0x3597de=require$$1,_0x2e07f1=require$$2$1,_0x37d351=require$$1$1,_0x27535f=_0x37d351[_0x468a94(0x180)](_0x2e07f1[_0x468a94(0x2c1)](),'.kdb_history'),_0x3d82e9=0x3e8,_0x1562c3={'reset':'\x1b[0m','bold':_0x468a94(0x27c),'dim':_0x468a94(0x17f),'red':_0x468a94(0x30a),'green':_0x468a94(0x3ba),'yellow':'\x1b[33m','blue':_0x468a94(0x1b6),'magenta':_0x468a94(0x106),'cyan':_0x468a94(0x2c9),'white':_0x468a94(0x25d),'gray':_0x468a94(0x2ac)},_0x9e12c7=!process[_0x468a94(0x1b5)][_0x468a94(0x33b)]||!!process.env.NO_COLOR,_0xe4bf63=(_0x1a48b0,_0x1c1ba4)=>_0x9e12c7?_0x1c1ba4:''+_0x1a48b0+_0x1c1ba4+_0x1562c3[_0x468a94(0x3bd)],_0x1998f9={'error':_0x1562c3[_0x468a94(0x139)],'warn':_0x1562c3['yellow'],'info':_0x1562c3[_0x468a94(0x1ac)],'debug':_0x1562c3[_0x468a94(0x1ef)]},_0x2bc81a={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3};function _0x3639b5(_0x2c707f,_0x428aef=_0x468a94(0x11b)){const _0x3e6975=_0x468a94,{level:_0x3db88a,msg:_0x30a0ce,meta:_0x501814,context:_0x2e691a,ts:_0x2dd69f}=_0x2c707f;if((_0x2bc81a[_0x3db88a]??0x1)<(_0x2bc81a[_0x428aef]??0x1))return;const _0xb8ba6e=_0xe4bf63(_0x1562c3['gray'],new Date(_0x2dd69f)['toISOString']()),_0x1cf7e3=_0xe4bf63(_0x1998f9[_0x3db88a]??_0x1562c3[_0x3e6975(0x166)],_0x3db88a['padEnd'](0x5));let _0x339841='\x20\x20'+_0xb8ba6e+'\x20'+_0xe4bf63(_0x1562c3[_0x3e6975(0x370)],_0x1cf7e3)+'\x20'+_0x30a0ce;if(_0x501814&&Object[_0x3e6975(0x1d1)](_0x501814)['length']>0x0){const _0x2d49b8=Object[_0x3e6975(0x148)](_0x501814)[_0x3e6975(0x321)](([_0x3e9fff,_0x11f54e])=>_0x3e9fff+'='+_0x11f54e)[_0x3e6975(0x180)]('\x20');_0x339841+=_0xe4bf63(_0x1562c3[_0x3e6975(0x183)],_0x3e6975(0x226)+_0x2d49b8+']');}if(_0x2e691a!==undefined){const _0x20764a=typeof _0x2e691a===_0x3e6975(0x23e)?JSON[_0x3e6975(0x35d)](_0x2e691a):String(_0x2e691a);_0x339841+=_0xe4bf63(_0x1562c3['dim'],'\x20\x20'+_0x20764a);}const _0xc47c2c=_0x3db88a===_0x3e6975(0x238)||_0x3db88a===_0x3e6975(0x1a0)?process['stderr']['write']['bind'](process['stderr']):process[_0x3e6975(0x1b5)][_0x3e6975(0x13a)][_0x3e6975(0x27b)](process[_0x3e6975(0x1b5)]);_0xc47c2c(_0x339841+'\x0a');}function _0x1fa39b(_0x2cdbb8,_0x32fb8b){const _0x3d7974=_0x468a94;if(_0x2cdbb8===0xcc||_0x2cdbb8>=0xc8&&_0x2cdbb8<0x12c&&!_0x32fb8b){console[_0x3d7974(0x23a)]('\x0a\x20\x20'+_0xe4bf63(_0x1562c3[_0x3d7974(0x318)],'✓')+'\x0a');return;}if(_0x2cdbb8>=0x190||_0x32fb8b?.[_0x3d7974(0x238)]){const _0x1001ad=_0x32fb8b?.[_0x3d7974(0x238)]??_0x32fb8b?.['message']??'HTTP\x20'+_0x2cdbb8;console['log']('\x0a\x20\x20'+_0xe4bf63(_0x1562c3['red'],'✗')+'\x20'+_0xe4bf63(_0x1562c3[_0x3d7974(0x370)]+_0x1562c3['red'],String(_0x2cdbb8))+'\x20\x20'+_0x1001ad+'\x0a');return;}const _0x4c80bd=Object[_0x3d7974(0x2a1)][_0x3d7974(0x349)][_0x3d7974(0x157)](_0x32fb8b??{},_0x3d7974(0x143))?_0x32fb8b[_0x3d7974(0x143)]:_0x32fb8b,_0x2002f8=_0x32fb8b?.[_0x3d7974(0x282)];console[_0x3d7974(0x23a)](''),_0x5a1a46(_0x4c80bd,'\x20\x20');if(_0x2002f8?.[_0x3d7974(0x2be)]!=null||_0x2002f8?.['time']!=null){const _0x197475=[];if(_0x2002f8['count']!=null)_0x197475[_0x3d7974(0x322)](_0x2002f8[_0x3d7974(0x2be)]+'\x20result'+(_0x2002f8[_0x3d7974(0x2be)]!==0x1?'s':''));if(_0x2002f8[_0x3d7974(0x38a)]!=null)_0x197475[_0x3d7974(0x322)](_0x2002f8['time']+'ms');console[_0x3d7974(0x23a)]('\x0a\x20\x20'+_0xe4bf63(_0x1562c3['dim'],_0x197475['join'](_0x3d7974(0x3aa))));}console[_0x3d7974(0x23a)]('');}function _0x5a1a46(_0xa83005,_0x5a8808=''){const _0x3efa41=_0x468a94;if(_0xa83005===null||_0xa83005===undefined){console['log'](_0x5a8808+_0xe4bf63(_0x1562c3[_0x3efa41(0x183)],'(null)'));return;}if(Array[_0x3efa41(0x2a8)](_0xa83005)){if(_0xa83005[_0x3efa41(0x2af)]===0x0){console[_0x3efa41(0x23a)](_0x5a8808+_0xe4bf63(_0x1562c3[_0x3efa41(0x183)],'(empty)'));return;}if(_0xa83005['every'](_0xc06ac1=>_0xc06ac1&&typeof _0xc06ac1===_0x3efa41(0x23e)&&_0x3efa41(0x351)in _0xc06ac1&&'value'in _0xc06ac1)){_0x3a233f(_0xa83005,_0x5a8808);return;}if(_0xa83005[_0x3efa41(0x256)](_0xe45717=>_0xe45717&&typeof _0xe45717===_0x3efa41(0x23e)&&_0x3efa41(0x152)in _0xe45717&&_0x3efa41(0x2be)in _0xe45717)){_0x3d949d(_0xa83005,_0x5a8808);return;}if(_0xa83005[_0x3efa41(0x256)](_0x56f5cf=>typeof _0x56f5cf!==_0x3efa41(0x23e)||_0x56f5cf===null)){_0xa83005[_0x3efa41(0x1a6)]((_0x187368,_0x58570a)=>console[_0x3efa41(0x23a)](_0x5a8808+_0xe4bf63(_0x1562c3['gray'],_0x58570a+0x1+'.')+'\x20'+_0xe4bf63(_0x1562c3[_0x3efa41(0x166)],String(_0x187368))));return;}_0xa83005['forEach']((_0x3567f6,_0x12c939)=>{const _0x12c7f4=_0x3efa41;console[_0x12c7f4(0x23a)](_0x5a8808+_0xe4bf63(_0x1562c3[_0x12c7f4(0x183)],'['+_0x12c939+']'));if(typeof _0x3567f6===_0x12c7f4(0x23e)&&_0x3567f6!==null)_0x3ac2b9(_0x3567f6,_0x5a8808+'\x20\x20');else console[_0x12c7f4(0x23a)](_0x5a8808+'\x20\x20'+String(_0x3567f6));});return;}if(typeof _0xa83005===_0x3efa41(0x23e)){if(_0x3efa41(0x351)in _0xa83005&&_0x3efa41(0x32a)in _0xa83005&&Object['keys'](_0xa83005)[_0x3efa41(0x2af)]<=0x3){console[_0x3efa41(0x23a)](_0x5a8808+_0xe4bf63(_0x1562c3[_0x3efa41(0x370)]+_0x1562c3['cyan'],String(_0xa83005[_0x3efa41(0x351)])));const _0x2efdb0=_0xa83005[_0x3efa41(0x32a)];if(_0x2efdb0&&typeof _0x2efdb0==='object')_0x3ac2b9(_0x2efdb0,_0x5a8808);else console['log'](_0x5a8808+_0xe4bf63(_0x1562c3[_0x3efa41(0x166)],String(_0x2efdb0)));return;}_0x3ac2b9(_0xa83005,_0x5a8808);return;}console[_0x3efa41(0x23a)](_0x5a8808+_0xe4bf63(_0x1562c3[_0x3efa41(0x166)],String(_0xa83005)));}function _0x3ac2b9(_0x1ff90c,_0x5b0f0c=''){const _0x3be5a6=_0x468a94,_0x35ce31=Object['entries'](_0x1ff90c);if(_0x35ce31[_0x3be5a6(0x2af)]===0x0){console[_0x3be5a6(0x23a)](_0x5b0f0c+_0xe4bf63(_0x1562c3[_0x3be5a6(0x183)],'{}'));return;}const _0x542dfb=Math[_0x3be5a6(0x2ef)](0x1c,Math['max'](..._0x35ce31[_0x3be5a6(0x321)](([_0x21f000])=>_0x21f000[_0x3be5a6(0x2af)])));for(const [_0x3ba0ff,_0x2b434f]of _0x35ce31){const _0x33c50c=_0xe4bf63(_0x1562c3[_0x3be5a6(0x1ac)],_0x3ba0ff[_0x3be5a6(0x20c)](_0x542dfb));if(_0x2b434f===null||_0x2b434f===undefined)console[_0x3be5a6(0x23a)](_0x5b0f0c+_0x33c50c+'\x20\x20'+_0xe4bf63(_0x1562c3[_0x3be5a6(0x183)],_0x3be5a6(0x1f1)));else{if(typeof _0x2b434f===_0x3be5a6(0x23e)){const _0x2f1798=JSON[_0x3be5a6(0x35d)](_0x2b434f);_0x2f1798[_0x3be5a6(0x2af)]<=0x50?console[_0x3be5a6(0x23a)](_0x5b0f0c+_0x33c50c+'\x20\x20'+_0xe4bf63(_0x1562c3['dim'],_0x2f1798)):(console['log'](_0x5b0f0c+_0x33c50c),_0x5a1a46(_0x2b434f,_0x5b0f0c+'\x20\x20'));}else{const _0x381553=typeof _0x2b434f===_0x3be5a6(0x1b3)?_0xe4bf63(_0x2b434f?_0x1562c3[_0x3be5a6(0x318)]:_0x1562c3[_0x3be5a6(0x365)],String(_0x2b434f)):typeof _0x2b434f===_0x3be5a6(0x2ec)?_0xe4bf63(_0x1562c3[_0x3be5a6(0xde)],String(_0x2b434f)):_0xe4bf63(_0x1562c3[_0x3be5a6(0x166)],String(_0x2b434f));console[_0x3be5a6(0x23a)](_0x5b0f0c+_0x33c50c+'\x20\x20'+_0x381553);}}}}function _0x3a233f(_0x3c0016,_0x5071ab=''){const _0x35e0ec=_0x468a94,_0x568c4b=Math[_0x35e0ec(0x2ef)](0x20,Math['max'](..._0x3c0016[_0x35e0ec(0x321)](_0xfd4a17=>String(_0xfd4a17['key'])[_0x35e0ec(0x2af)])));for(const {key:_0x3ecc10,value:_0xfa34b6,score:_0x460442,clock:_0x44c754}of _0x3c0016){const _0x17ec37=_0xe4bf63(_0x1562c3['bold']+_0x1562c3[_0x35e0ec(0x1ac)],String(_0x3ecc10)['padEnd'](_0x568c4b)),_0x37880c=_0xfa34b6==null?_0xe4bf63(_0x1562c3[_0x35e0ec(0x183)],_0x35e0ec(0x1f1)):typeof _0xfa34b6===_0x35e0ec(0x23e)?_0xe4bf63(_0x1562c3[_0x35e0ec(0x183)],JSON['stringify'](_0xfa34b6)):_0xe4bf63(_0x1562c3[_0x35e0ec(0x166)],String(_0xfa34b6)),_0x54c275=_0x460442!=null?_0xe4bf63(_0x1562c3[_0x35e0ec(0x1ef)],_0x35e0ec(0x376)+_0x460442[_0x35e0ec(0x305)](0x4)):'',_0x2025fd=_0x44c754!=null?_0xe4bf63(_0x1562c3[_0x35e0ec(0x1ef)],_0x35e0ec(0x3a0)+_0x44c754):'';console[_0x35e0ec(0x23a)](_0x5071ab+_0x17ec37+'\x20\x20'+_0x37880c+_0x54c275+_0x2025fd);}}function _0x3d949d(_0x2b9615,_0xa83dd4=''){const _0x42681d=_0x468a94,_0x516a65=Math['min'](0x20,Math['max'](..._0x2b9615[_0x42681d(0x321)](_0x4ca375=>_0x4ca375[_0x42681d(0x152)][_0x42681d(0x2af)])));for(const {type:_0x5ed919,count:_0x4cb563,fields:_0x3f8d7b}of _0x2b9615){if(_0x5ed919[_0x42681d(0x193)]('~'))continue;const _0x4f5bea=_0xe4bf63(_0x1562c3[_0x42681d(0x370)]+_0x1562c3[_0x42681d(0x1ac)],_0x5ed919['padEnd'](_0x516a65)),_0x146331=_0xe4bf63(_0x1562c3[_0x42681d(0xde)],String(_0x4cb563)['padStart'](0x6))+_0xe4bf63(_0x1562c3[_0x42681d(0x183)],_0x42681d(0x2c5)),_0x45c1e7=_0x3f8d7b&&Object[_0x42681d(0x1d1)](_0x3f8d7b)[_0x42681d(0x2af)]?_0xe4bf63(_0x1562c3[_0x42681d(0x183)],_0x42681d(0x3ca)+Object[_0x42681d(0x1d1)](_0x3f8d7b)[_0x42681d(0x237)](0x0,0x6)[_0x42681d(0x180)](',\x20')+(Object['keys'](_0x3f8d7b)[_0x42681d(0x2af)]>0x6?'…':'')):'';console[_0x42681d(0x23a)](_0xa83dd4+_0x4f5bea+'\x20\x20'+_0x146331+_0x45c1e7);}}const _0x29ff1a=['types',_0x468a94(0x312),'queue/','files/',_0x468a94(0xe7),_0x468a94(0x1c4)];function _0x1208a9(_0x40ad9d,_0x57413d){const _0x37e7ec=_0x468a94;if(_0x40ad9d[_0x37e7ec(0x193)]('/api/'))return _0x40ad9d;if(_0x40ad9d[_0x37e7ec(0x193)]('/'))return _0x37e7ec(0x15e)+_0x40ad9d;if(_0x40ad9d[_0x37e7ec(0x193)](_0x37e7ec(0x34c)))return _0x37e7ec(0x3c8)+_0x40ad9d;const _0x55915a=_0x29ff1a[_0x37e7ec(0xf5)](_0x37a3e5=>_0x40ad9d===_0x37a3e5[_0x37e7ec(0x19c)](/\/$/,'')||_0x40ad9d['startsWith'](_0x37a3e5));return _0x55915a?'/api/env/'+_0x57413d+'/'+_0x40ad9d:_0x37e7ec(0x3c8)+_0x40ad9d;}function _0x490cd6(_0x2e3c7b){const _0x55c453=_0x468a94,_0x3c7648={},_0x2f1df5=[];let _0x8e870f=0x0;while(_0x8e870f<_0x2e3c7b[_0x55c453(0x2af)]){if((_0x2e3c7b[_0x8e870f]===_0x55c453(0x34f)||_0x2e3c7b[_0x8e870f]==='-e')&&_0x2e3c7b[_0x8e870f+0x1]&&!_0x2e3c7b[_0x8e870f+0x1][_0x55c453(0x193)]('-'))_0x3c7648[_0x55c453(0xf8)]=_0x2e3c7b[++_0x8e870f];else _0x2e3c7b[_0x8e870f]===_0x55c453(0xe0)||_0x2e3c7b[_0x8e870f]==='-h'?_0x3c7648[_0x55c453(0x155)]=!![]:_0x2f1df5['push'](_0x2e3c7b[_0x8e870f]);_0x8e870f++;}return{'flags':_0x3c7648,'rest':_0x2f1df5};}const _0x3e4e5b={'system':_0x468a94(0x191),'envs':'Environments','types':_0x468a94(0x29a),'data':_0x468a94(0x187),'indexes':'Indexes','fts':'Full-text\x20search','sync':_0x468a94(0x358),'queue':_0x468a94(0x27f),'files':_0x468a94(0x397),'embeddings':_0x468a94(0x10c),'engines':'Engines','admin':_0x468a94(0x332),'event':_0x468a94(0x325),'processor':_0x468a94(0xe2)},_0x134d99=[_0x468a94(0x221),_0x468a94(0x20d),_0x468a94(0x30e),_0x468a94(0x1d8),_0x468a94(0xd1),'fts',_0x468a94(0x337),_0x468a94(0x33a),'files',_0x468a94(0x11e),_0x468a94(0x38e),_0x468a94(0x25b)];function _0x3d60a8(_0x5e8519){const _0x331b57=_0x468a94;return _0x5e8519[_0x331b57(0x19c)](/^\/api/,'')[_0x331b57(0x19c)](/^\[\/env\/:env=[^\]]*\]/,'[env]')[_0x331b57(0x19c)](/^\/env\/:env/,_0x331b57(0x2a2))[_0x331b57(0x19c)](/^\//,'');}function _0x38d06a(_0x741b99,_0x4d0d34=''){const _0x5a1208=_0x468a94,_0x29cc34=_0x741b99[_0x5a1208(0x178)][_0x5a1208(0x2de)]()[_0x5a1208(0x36d)](_0x37aa5b=>!_0x37aa5b[_0x5a1208(0x282)]?.[_0x5a1208(0x345)]),_0x3b25dc=_0x4d0d34?_0x29cc34[_0x5a1208(0x36d)](_0xd54c56=>_0xd54c56[_0x5a1208(0x176)][_0x5a1208(0x288)]()[_0x5a1208(0xe9)](_0x4d0d34[_0x5a1208(0x288)]())||(_0x171386(_0xd54c56)??'')['toLowerCase']()[_0x5a1208(0xe9)](_0x4d0d34[_0x5a1208(0x288)]())||_0x167b59(_0xd54c56)[_0x5a1208(0xf5)](_0x947039=>_0x947039[_0x5a1208(0x288)]()[_0x5a1208(0xe9)](_0x4d0d34['toLowerCase']()))):_0x29cc34;if(!_0x3b25dc['length']){console['log'](_0xe4bf63(_0x1562c3[_0x5a1208(0x365)],_0x5a1208(0x18e)+_0x4d0d34+'\x22\x0a'));return;}const _0x101846=new Map();for(const _0x2ce5de of _0x3b25dc){const _0x5d738b=_0x167b59(_0x2ce5de)[0x0]??_0x5a1208(0x246);if(!_0x101846['has'](_0x5d738b))_0x101846[_0x5a1208(0x2fd)](_0x5d738b,[]);_0x101846['get'](_0x5d738b)[_0x5a1208(0x322)](_0x2ce5de);}const _0x5d1057=[..._0x134d99[_0x5a1208(0x36d)](_0x1da0a1=>_0x101846['has'](_0x1da0a1)),...[..._0x101846[_0x5a1208(0x1d1)]()][_0x5a1208(0x36d)](_0x13a9b1=>!_0x134d99['includes'](_0x13a9b1))];console[_0x5a1208(0x23a)]('');for(const _0x2a7550 of _0x5d1057){const _0x834ed2=_0x101846[_0x5a1208(0x26f)](_0x2a7550);if(!_0x834ed2?.[_0x5a1208(0x2af)])continue;console[_0x5a1208(0x23a)](_0xe4bf63(_0x1562c3[_0x5a1208(0x370)],'\x20\x20'+(_0x3e4e5b[_0x2a7550]??_0x2a7550)));for(const _0x2471dd of _0x834ed2){const _0x4c8c5b=_0xe4bf63(_0x1562c3[_0x5a1208(0xde)],_0x2471dd[_0x5a1208(0x3ae)][_0x5a1208(0x20c)](0x7)),_0x1aa074=_0xe4bf63(_0x1562c3[_0x5a1208(0x1ac)],_0x3d60a8(_0x2471dd[_0x5a1208(0x176)])),_0x526d8c=_0x171386(_0x2471dd)?_0xe4bf63(_0x1562c3[_0x5a1208(0x183)],'\x20\x20'+_0x171386(_0x2471dd)):'',_0x14d8b2=_0x2471dd[_0x5a1208(0x185)]?.['id']?_0xe4bf63(_0x1562c3[_0x5a1208(0x1ef)],'\x20\x20['+_0x2471dd[_0x5a1208(0x185)]['id']+']'):'';console[_0x5a1208(0x23a)](_0x5a1208(0x3be)+_0x4c8c5b+'\x20'+_0x1aa074+_0x526d8c+_0x14d8b2);}console[_0x5a1208(0x23a)]('');}}function _0xb83943(_0x15b39d,_0x5267cb){const _0x348b88=_0x468a94,_0x1c7474=_0x5267cb['replace'](/^\/api(\/env\/[^/]+)?\//,'')[_0x348b88(0x36f)]('/')[0x0],_0x50e336=_0x15b39d[_0x348b88(0x178)][_0x348b88(0x2de)]()[_0x348b88(0x36d)](_0x2d496a=>_0x2d496a[_0x348b88(0x176)][_0x348b88(0x288)]()[_0x348b88(0xe9)](_0x1c7474['toLowerCase']()));if(!_0x50e336['length']){console[_0x348b88(0x23a)](_0xe4bf63(_0x1562c3[_0x348b88(0x365)],'\x0a\x20\x20No\x20documentation\x20found\x20for:\x20'+_0x5267cb+'\x0a'));return;}console[_0x348b88(0x23a)]('');for(const _0x36f0a8 of _0x50e336[_0x348b88(0x237)](0x0,0xc)){for(const _0x1d337d of _0x4f997f(_0x36f0a8)){console[_0x348b88(0x23a)](_0x1d337d);}console[_0x348b88(0x23a)]('');}}function _0x171386(_0x363a9f){const _0x32f739=_0x468a94;return _0x363a9f[_0x32f739(0x185)]?.[_0x32f739(0x247)]??_0x363a9f[_0x32f739(0x282)]?.[_0x32f739(0x247)]??'';}function _0x3ee9c7(_0x1ea20a){const _0x57c967=_0x468a94;return _0x1ea20a['operation']?.[_0x57c967(0x1d3)]??_0x1ea20a[_0x57c967(0x282)]?.[_0x57c967(0x1d3)]??'';}function _0x167b59(_0x273f93){const _0x4f42d3=_0x468a94;return _0x273f93[_0x4f42d3(0x185)]?.[_0x4f42d3(0x21b)]?.['length']?_0x273f93[_0x4f42d3(0x185)]['tags']:_0x273f93[_0x4f42d3(0x282)]?.[_0x4f42d3(0x21b)]??[];}function _0x4f997f(_0x59b84f){const _0x3426d1=_0x468a94,_0x94ffec=[];_0x94ffec[_0x3426d1(0x322)]('\x20\x20'+_0xe4bf63(_0x1562c3[_0x3426d1(0x370)]+_0x1562c3[_0x3426d1(0xde)],_0x59b84f[_0x3426d1(0x3ae)][_0x3426d1(0x20c)](0x7))+'\x20'+_0xe4bf63(_0x1562c3[_0x3426d1(0x370)]+_0x1562c3[_0x3426d1(0x1ac)],_0x59b84f['path']));_0x59b84f[_0x3426d1(0x185)]?.['id']&&_0x94ffec['push'](_0x3426d1(0x117)+_0xe4bf63(_0x1562c3['gray'],_0x3426d1(0x2f7)+_0x59b84f[_0x3426d1(0x185)]['id']));_0x171386(_0x59b84f)&&_0x94ffec['push'](_0x3426d1(0x117)+_0xe4bf63(_0x1562c3[_0x3426d1(0x166)],_0x171386(_0x59b84f)));_0x3ee9c7(_0x59b84f)&&_0x94ffec[_0x3426d1(0x322)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0xe4bf63(_0x1562c3[_0x3426d1(0x183)],_0x3ee9c7(_0x59b84f)));_0x167b59(_0x59b84f)[_0x3426d1(0x2af)]&&_0x94ffec['push'](_0x3426d1(0x117)+_0xe4bf63(_0x1562c3[_0x3426d1(0x1ef)],'tags:\x20'+_0x167b59(_0x59b84f)[_0x3426d1(0x180)](',\x20')));_0x59b84f[_0x3426d1(0x185)]?.[_0x3426d1(0x333)]?.['access']&&_0x94ffec['push'](_0x3426d1(0x117)+_0xe4bf63(_0x1562c3[_0x3426d1(0x1ef)],'access:\x20'+_0x59b84f[_0x3426d1(0x185)]['safety'][_0x3426d1(0x2b3)]));_0x59b84f[_0x3426d1(0x185)]?.[_0x3426d1(0x178)]?.['transport']&&_0x59b84f[_0x3426d1(0x185)]['http'][_0x3426d1(0x309)]!==_0x3426d1(0x235)&&_0x94ffec['push']('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0xe4bf63(_0x1562c3[_0x3426d1(0x1ef)],_0x3426d1(0x2ab)+_0x59b84f[_0x3426d1(0x185)][_0x3426d1(0x178)][_0x3426d1(0x309)]));if(_0x59b84f[_0x3426d1(0x185)]?.[_0x3426d1(0x15c)]){const _0x357224=Object[_0x3426d1(0x1d1)](_0x59b84f[_0x3426d1(0x185)]['inputSchema'][_0x3426d1(0x15a)]||{});if(_0x357224[_0x3426d1(0x2af)])_0x94ffec[_0x3426d1(0x322)](_0x3426d1(0x117)+_0xe4bf63(_0x1562c3['gray'],_0x3426d1(0x2ae)+_0x357224['join'](',\x20')));}return _0x59b84f[_0x3426d1(0x282)]?.[_0x3426d1(0x292)]&&_0x94ffec[_0x3426d1(0x322)](_0x3426d1(0x117)+_0xe4bf63(_0x1562c3[_0x3426d1(0x1ef)],_0x3426d1(0x289)+JSON['stringify'](_0x59b84f[_0x3426d1(0x282)][_0x3426d1(0x292)]))),_0x94ffec;}async function _0x41713e(_0x582c3d,_0x1e7702,_0x2b0b09,_0x405bac=null){const _0xde6fd0=_0x468a94,_0x31b65a=_0x2b0b09[_0xde6fd0(0x36a)]('?'),_0x1d6c50=_0x31b65a>=0x0?_0x2b0b09[_0xde6fd0(0x237)](0x0,_0x31b65a):_0x2b0b09,_0x52119c=_0x31b65a>=0x0?_0x2b0b09[_0xde6fd0(0x237)](_0x31b65a+0x1):'',_0x23b6e5=Object[_0xde6fd0(0x39a)](new URLSearchParams(_0x52119c)[_0xde6fd0(0x148)]());return _0x582c3d[_0xde6fd0(0x178)]['handle'](_0x1e7702,_0x1d6c50,{'body':_0x405bac,'query':_0x23b6e5,'headers':{'content-type':'application/json'}},{'internal':!![]});}function _0x57a579(_0x2b92cd){const _0x4311b1=_0x468a94;if(!_0x2b92cd)return null;const _0x56960c=_0x2b92cd[_0x4311b1(0x1e6)]();if(!_0x56960c)return null;try{return JSON[_0x4311b1(0x317)](_0x56960c);}catch{}try{return JSON[_0x4311b1(0x317)](_0x402cfd(_0x56960c));}catch(_0x4e9643){throw new SyntaxError(_0x4e9643[_0x4311b1(0x2df)],{'cause':_0x4e9643});}}function _0x402cfd(_0x1744d5){const _0xa24bee=_0x468a94;let _0x56202a='',_0x1fdc54=0x0;while(_0x1fdc54<_0x1744d5[_0xa24bee(0x2af)]){const _0x49f9bd=_0x1744d5[_0x1fdc54];if(_0x49f9bd==='\x22'){_0x56202a+='\x22',_0x1fdc54++;while(_0x1fdc54<_0x1744d5[_0xa24bee(0x2af)]&&_0x1744d5[_0x1fdc54]!=='\x22'){if(_0x1744d5[_0x1fdc54]==='\x5c'){_0x56202a+=_0x1744d5[_0x1fdc54++];if(_0x1fdc54<_0x1744d5[_0xa24bee(0x2af)])_0x56202a+=_0x1744d5[_0x1fdc54++];}else _0x56202a+=_0x1744d5[_0x1fdc54++];}_0x56202a+='\x22';if(_0x1fdc54<_0x1744d5[_0xa24bee(0x2af)])_0x1fdc54++;continue;}if(_0x49f9bd==='\x27'){_0x56202a+='\x22',_0x1fdc54++;while(_0x1fdc54<_0x1744d5[_0xa24bee(0x2af)]&&_0x1744d5[_0x1fdc54]!=='\x27'){if(_0x1744d5[_0x1fdc54]==='\x5c'&&_0x1744d5[_0x1fdc54+0x1]==='\x27')_0x56202a+='\x27',_0x1fdc54+=0x2;else _0x1744d5[_0x1fdc54]==='\x22'?(_0x56202a+='\x5c\x22',_0x1fdc54++):_0x56202a+=_0x1744d5[_0x1fdc54++];}_0x56202a+='\x22';if(_0x1fdc54<_0x1744d5[_0xa24bee(0x2af)])_0x1fdc54++;continue;}if(_0xa24bee(0x146)['includes'](_0x49f9bd)){_0x56202a+=_0x49f9bd,_0x1fdc54++;continue;}let _0xeb6df2='';while(_0x1fdc54<_0x1744d5[_0xa24bee(0x2af)]&&!_0xa24bee(0x145)[_0xa24bee(0xe9)](_0x1744d5[_0x1fdc54])&&_0x1744d5[_0x1fdc54]!=='\x20'&&_0x1744d5[_0x1fdc54]!=='\x09'&&_0x1744d5[_0x1fdc54]!=='\x0a'&&_0x1744d5[_0x1fdc54]!=='\x0d'){_0xeb6df2+=_0x1744d5[_0x1fdc54++];}let _0x45e442=_0x1fdc54;while(_0x45e442<_0x1744d5[_0xa24bee(0x2af)]&&(_0x1744d5[_0x45e442]==='\x20'||_0x1744d5[_0x45e442]==='\x09'))_0x45e442++;if(_0x1744d5[_0x45e442]===':')_0x56202a+='\x22'+_0xeb6df2+'\x22';else _0xeb6df2==='true'||_0xeb6df2===_0xa24bee(0x294)||_0xeb6df2===_0xa24bee(0x1f1)||/^-?\d+(\.\d+)?([eE][+-]?\d+)?$/[_0xa24bee(0x1d0)](_0xeb6df2)?_0x56202a+=_0xeb6df2:_0x56202a+='\x22'+_0xeb6df2+'\x22';}return _0x56202a[_0xa24bee(0x19c)](/,(\s*[}\]])/g,'$1');}function _0x1e8da5(_0x581a72){const _0x5b365e=_0x468a94,_0x2b5733=[];let _0xca640d=0x0;while(_0xca640d<_0x581a72[_0x5b365e(0x2af)]){while(_0xca640d<_0x581a72[_0x5b365e(0x2af)]&&(_0x581a72[_0xca640d]==='\x20'||_0x581a72[_0xca640d]==='\x09'))_0xca640d++;if(_0xca640d>=_0x581a72[_0x5b365e(0x2af)])break;const _0x536eaf=_0x581a72[_0xca640d];if(_0x536eaf==='{'||_0x536eaf==='['){const _0x30534e=_0x536eaf==='{'?'}':']',_0x47dc92=_0xca640d++;let _0x1fe93d=0x1,_0x267839=![],_0x275b73='';while(_0xca640d<_0x581a72[_0x5b365e(0x2af)]&&_0x1fe93d>0x0){const _0x6debdc=_0x581a72[_0xca640d];if(_0x267839){if(_0x6debdc==='\x5c')_0xca640d++;else{if(_0x6debdc===_0x275b73)_0x267839=![];}}else{if(_0x6debdc==='\x22'||_0x6debdc==='\x27')_0x267839=!![],_0x275b73=_0x6debdc;else{if(_0x6debdc===_0x536eaf)_0x1fe93d++;else{if(_0x6debdc===_0x30534e)_0x1fe93d--;}}}_0xca640d++;}_0x2b5733['push'](_0x581a72[_0x5b365e(0x237)](_0x47dc92,_0xca640d));continue;}if(_0x536eaf==='\x22'||_0x536eaf==='\x27'){const _0x3269da=_0x536eaf;_0xca640d++;let _0x323789='';while(_0xca640d<_0x581a72['length']&&_0x581a72[_0xca640d]!==_0x3269da){if(_0x581a72[_0xca640d]==='\x5c'&&_0xca640d+0x1<_0x581a72[_0x5b365e(0x2af)])_0xca640d++,_0x323789+=_0x581a72[_0xca640d++];else _0x323789+=_0x581a72[_0xca640d++];}if(_0xca640d<_0x581a72[_0x5b365e(0x2af)])_0xca640d++;_0x2b5733[_0x5b365e(0x322)](_0x323789);continue;}let _0x2f3123='';while(_0xca640d<_0x581a72[_0x5b365e(0x2af)]&&_0x581a72[_0xca640d]!=='\x20'&&_0x581a72[_0xca640d]!=='\x09'&&_0x581a72[_0xca640d]!=='{'&&_0x581a72[_0xca640d]!=='['){_0x2f3123+=_0x581a72[_0xca640d++];}if(_0x2f3123)_0x2b5733[_0x5b365e(0x322)](_0x2f3123);}return _0x2b5733;}function _0x534dbc(_0x3c87d4,_0x4cc666){const _0x56b544=_0x468a94,_0x3caa92=[..._0x3c87d4['_envs'][_0x56b544(0x1d1)]()][_0x56b544(0x36d)](_0x24d531=>!_0x24d531[_0x56b544(0x193)]('~'));console[_0x56b544(0x23a)](['',_0xe4bf63(_0x1562c3[_0x56b544(0x370)]+_0x1562c3['cyan'],'\x20\x20╔═══════════════════════════╗'),_0xe4bf63(_0x1562c3[_0x56b544(0x370)]+_0x1562c3[_0x56b544(0x1ac)],'\x20\x20║')+_0xe4bf63(_0x1562c3[_0x56b544(0x370)],'\x20\x20\x20\x20\x20\x20\x20\x20\x20OKDB\x20SHELL\x20\x20\x20\x20\x20\x20\x20\x20\x20')+_0xe4bf63(_0x1562c3[_0x56b544(0x370)]+_0x1562c3[_0x56b544(0x1ac)],'║'),_0xe4bf63(_0x1562c3[_0x56b544(0x370)]+_0x1562c3['cyan'],_0x56b544(0x138)),'','\x20\x20'+_0xe4bf63(_0x1562c3[_0x56b544(0x318)],'✓')+'\x20'+_0xe4bf63(_0x1562c3['bold'],_0x56b544(0x28b))+_0x56b544(0x364)+_0x4cc666['port'],'\x20\x20'+_0xe4bf63(_0x1562c3[_0x56b544(0x318)],'✓')+'\x20'+_0xe4bf63(_0x1562c3[_0x56b544(0x370)],_0x56b544(0x224))+_0x56b544(0x33c)+_0x4cc666[_0x56b544(0x2bf)]+_0x56b544(0x15e),'\x20\x20'+_0xe4bf63(_0x1562c3[_0x56b544(0x318)],'✓')+'\x20'+_0xe4bf63(_0x1562c3[_0x56b544(0x370)],_0x56b544(0x176))+_0x56b544(0x3be)+_0x4cc666[_0x56b544(0x2f3)],'\x20\x20'+_0xe4bf63(_0x1562c3['green'],'✓')+'\x20'+_0xe4bf63(_0x1562c3[_0x56b544(0x370)],'id')+_0x56b544(0x1ae)+_0xe4bf63(_0x1562c3['gray'],_0x3c87d4['id']),'\x20\x20'+_0xe4bf63(_0x1562c3[_0x56b544(0x318)],'✓')+'\x20'+_0xe4bf63(_0x1562c3[_0x56b544(0x370)],_0x56b544(0x20d))+_0x56b544(0x3be)+_0x3caa92[_0x56b544(0x321)](_0x12df91=>_0xe4bf63(_0x1562c3[_0x56b544(0x1ac)],_0x12df91))[_0x56b544(0x180)]('\x20\x20'),..._0x4cc666[_0x56b544(0x1ec)]?[]:['\x20\x20'+_0xe4bf63(_0x1562c3[_0x56b544(0x318)],'✓')+'\x20'+_0xe4bf63(_0x1562c3[_0x56b544(0x370)],_0x56b544(0x25b))+'\x20\x20\x20http://localhost:'+_0x4cc666[_0x56b544(0x2bf)]+'/admin/index.html'],'',_0xe4bf63(_0x1562c3[_0x56b544(0x183)],'\x20\x20Type\x20'+_0xe4bf63(_0x1562c3['bold'],_0x56b544(0x155))+_0x56b544(0x189)+_0xe4bf63(_0x1562c3[_0x56b544(0x370)],'routes')+_0x56b544(0x23f)+_0xe4bf63(_0x1562c3[_0x56b544(0x370)],_0x56b544(0x2d2))+_0x56b544(0xd9)),'']['join']('\x0a'));}function _0x5e369f(_0x2dc4a7){const _0x5a4aeb=_0x468a94;console[_0x5a4aeb(0x23a)]('\x0a'+_0xe4bf63(_0x1562c3['bold'],_0x5a4aeb(0x130))+'\x20\x20'+_0xe4bf63(_0x1562c3[_0x5a4aeb(0x183)],_0x5a4aeb(0x3b9))+_0x5a4aeb(0x360)+_0xe4bf63(_0x1562c3['cyan'],'<path>')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20GET\x20(implicit)\x0a\x20\x20'+_0xe4bf63(_0x1562c3[_0x5a4aeb(0x1ac)],_0x5a4aeb(0x10b))+'\x20'+_0xe4bf63(_0x1562c3[_0x5a4aeb(0x365)],_0x5a4aeb(0x2e1))+_0x5a4aeb(0xdc)+_0xe4bf63(_0x1562c3['cyan'],'VERB')+'\x20'+_0xe4bf63(_0x1562c3[_0x5a4aeb(0x1ac)],_0x5a4aeb(0x10b))+'\x20'+_0xe4bf63(_0x1562c3['yellow'],_0x5a4aeb(0x296))+'\x20\x20\x20\x20\x20explicit\x20method\x0a\x0a\x20\x20'+_0xe4bf63(_0x1562c3[_0x5a4aeb(0x183)],_0x5a4aeb(0x37f))+'\x0a\x20\x20\x20\x20'+_0xe4bf63(_0x1562c3[_0x5a4aeb(0x1ef)],_0x5a4aeb(0x11b))+_0x5a4aeb(0x2bb)+_0xe4bf63(_0x1562c3[_0x5a4aeb(0x1ef)],'envs')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/envs\x0a\x20\x20\x20\x20'+_0xe4bf63(_0x1562c3[_0x5a4aeb(0x1ef)],_0x5a4aeb(0x30e))+'\x20\x20\x20\x20\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/'+_0x2dc4a7[_0x5a4aeb(0xf8)]+_0x5a4aeb(0x2bd)+_0xe4bf63(_0x1562c3['gray'],_0x5a4aeb(0x302))+'\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/'+_0x2dc4a7['env']+'/type/users\x0a\x20\x20\x20\x20'+_0xe4bf63(_0x1562c3[_0x5a4aeb(0x1ef)],_0x5a4aeb(0x26a))+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/'+_0x2dc4a7[_0x5a4aeb(0xf8)]+_0x5a4aeb(0x2db)+_0xe4bf63(_0x1562c3[_0x5a4aeb(0x1ef)],_0x5a4aeb(0x1ad))+_0x5a4aeb(0x220)+_0x2dc4a7['env']+_0x5a4aeb(0x1df)+_0xe4bf63(_0x1562c3['gray'],_0x5a4aeb(0x2cd))+_0x5a4aeb(0x2e8)+_0xe4bf63(_0x1562c3['gray'],_0x5a4aeb(0x380))+_0x5a4aeb(0x2e8)+_0xe4bf63(_0x1562c3[_0x5a4aeb(0x1ef)],_0x5a4aeb(0x24b))+_0x5a4aeb(0x12d)+_0xe4bf63(_0x1562c3['bold'],_0x5a4aeb(0x3b0))+'\x20\x20'+_0xe4bf63(_0x1562c3[_0x5a4aeb(0x183)],_0x5a4aeb(0x11a))+_0x5a4aeb(0x360)+_0xe4bf63(_0x1562c3[_0x5a4aeb(0x1ac)],_0x5a4aeb(0x2e9))+_0x5a4aeb(0x2b7)+_0xe4bf63(_0x1562c3[_0x5a4aeb(0x1ac)],_0x5a4aeb(0xe0))+_0x5a4aeb(0x39c)+_0xe4bf63(_0x1562c3[_0x5a4aeb(0x183)],_0x5a4aeb(0x37f))+'\x0a\x20\x20\x20\x20'+_0xe4bf63(_0x1562c3['gray'],_0x5a4aeb(0x114))+_0x5a4aeb(0x2e8)+_0xe4bf63(_0x1562c3['gray'],_0x5a4aeb(0x119))+_0x5a4aeb(0x2e8)+_0xe4bf63(_0x1562c3[_0x5a4aeb(0x1ef)],_0x5a4aeb(0x216))+'\x0a\x0a'+_0xe4bf63(_0x1562c3[_0x5a4aeb(0x370)],'\x20\x20Shell\x20commands')+_0x5a4aeb(0x360)+_0xe4bf63(_0x1562c3[_0x5a4aeb(0x1ac)],_0x5a4aeb(0x2ba))+_0x5a4aeb(0x26e)+_0xe4bf63(_0x1562c3[_0x5a4aeb(0x1ac)],_0x5a4aeb(0xf8))+_0x5a4aeb(0x2f0)+_0xe4bf63(_0x1562c3[_0x5a4aeb(0x1ac)],_0x5a4aeb(0x374))+'\x20'+_0xe4bf63(_0x1562c3['dim'],'[filter]')+_0x5a4aeb(0x2e7)+_0xe4bf63(_0x1562c3[_0x5a4aeb(0x1ac)],_0x5a4aeb(0x258))+'\x20'+_0xe4bf63(_0x1562c3['dim'],'[on|off|level]')+_0x5a4aeb(0x386)+_0xe4bf63(_0x1562c3[_0x5a4aeb(0x1ac)],_0x5a4aeb(0x1fd))+_0x5a4aeb(0x2a6)+_0xe4bf63(_0x1562c3['cyan'],_0x5a4aeb(0x155))+_0x5a4aeb(0x2fb)+_0xe4bf63(_0x1562c3[_0x5a4aeb(0x1ac)],_0x5a4aeb(0x2d2))+'\x20'+_0xe4bf63(_0x1562c3['dim'],'/\x20quit\x20/\x20Ctrl+C')+_0x5a4aeb(0x391));}let _0x22cd96=![];async function _0x5283d5(_0x2418f7,_0xd175d6=0x0,_0x26980a=null){const _0x33450c=_0x468a94;_0x22cd96&&(process[_0x33450c(0x1b9)]['write'](_0xe4bf63(_0x1562c3[_0x33450c(0x139)],_0x33450c(0x245))),process[_0x33450c(0x2d2)](0x82));_0x22cd96=!![],process[_0x33450c(0x1b5)][_0x33450c(0x13a)]('\x0a'),process[_0x33450c(0x1b9)][_0x33450c(0x13a)](_0xe4bf63(_0x1562c3[_0x33450c(0x365)],'\x20\x20[okdb]\x20'+(_0x26980a?'received\x20'+_0x26980a+',\x20':'')+_0x33450c(0x2cc)));const _0x37aa99=setTimeout(()=>{const _0x25d08c=_0x33450c;process['stderr'][_0x25d08c(0x13a)](_0xe4bf63(_0x1562c3['red'],_0x25d08c(0xe4))),process[_0x25d08c(0x2d2)](0x1);},0x1388);try{await _0x2418f7[_0x33450c(0x1c8)]();}catch(_0x32ee91){console[_0x33450c(0x238)](_0xe4bf63(_0x1562c3[_0x33450c(0x139)],'\x20\x20'+_0x32ee91['message']));}clearTimeout(_0x37aa99),process[_0x33450c(0x1b9)][_0x33450c(0x13a)](_0xe4bf63(_0x1562c3[_0x33450c(0x183)],_0x33450c(0xda))),process['exit'](_0xd175d6);}function _0x18dd9b(_0x2df884){const _0x1b6dd7=_0x468a94,_0x197d7c=_0x2df884[_0x1b6dd7(0xf8)]!==_0x1b6dd7(0x10e)?_0xe4bf63(_0x1562c3['yellow'],'['+_0x2df884['env']+']'):'';return _0xe4bf63(_0x1562c3[_0x1b6dd7(0x370)]+_0x1562c3[_0x1b6dd7(0x1ac)],'okdb')+_0x197d7c+_0xe4bf63(_0x1562c3[_0x1b6dd7(0x1ef)],'>\x20');}const _0x424b0f=new Set([_0x468a94(0x1f8),'POST',_0x468a94(0x1fa),_0x468a94(0x18c),_0x468a94(0x13f)]);async function _0x103d46(_0x4ecd07,_0x2afc44,_0x503925,_0x1916b4,_0x4bb2f4,_0x2e2bc5){const _0x25a123=_0x468a94;_0x4ecd07=_0x4ecd07[_0x25a123(0x1e6)]();if(!_0x4ecd07||_0x4ecd07['startsWith']('#'))return;const _0x27f102=_0x1e8da5(_0x4ecd07),{flags:_0x2bae0f,rest:_0x3708af}=_0x490cd6(_0x27f102);if(!_0x3708af[_0x25a123(0x2af)])return;const _0x3e380c=_0x3708af[0x0],_0x29feb7=_0x3e380c['toUpperCase']();if(_0x29feb7===_0x25a123(0x363)){if(_0x3708af[0x1])_0xb83943(_0x2afc44,_0x1208a9(_0x3708af[0x1],_0x2bae0f[_0x25a123(0xf8)]??_0x4bb2f4[_0x25a123(0xf8)]));else _0x5e369f(_0x4bb2f4);return;}if(_0x29feb7==='USE'){const _0x24b0b9=_0x3708af[0x1];if(!_0x24b0b9){console['log'](_0xe4bf63(_0x1562c3[_0x25a123(0x139)],_0x25a123(0x205)));return;}try{_0x2afc44[_0x25a123(0xf8)](_0x24b0b9),_0x4bb2f4[_0x25a123(0xf8)]=_0x24b0b9,_0x2e2bc5?.['setPrompt'](_0x18dd9b(_0x4bb2f4)),console[_0x25a123(0x23a)](_0x25a123(0x118)+_0xe4bf63(_0x1562c3[_0x25a123(0x318)],'✓')+_0x25a123(0x233)+_0xe4bf63(_0x1562c3[_0x25a123(0x370)]+_0x1562c3[_0x25a123(0x1ac)],_0x24b0b9)+'\x0a');}catch{console[_0x25a123(0x23a)]('\x0a\x20\x20'+_0xe4bf63(_0x1562c3[_0x25a123(0x139)],'✗')+_0x25a123(0x2ff)+_0xe4bf63(_0x1562c3[_0x25a123(0x370)],_0x24b0b9)+_0x25a123(0x31a)+_0xe4bf63(_0x1562c3[_0x25a123(0x183)],_0x25a123(0xfe)));}return;}if(_0x29feb7===_0x25a123(0x399)){const _0xa91720=[..._0x2afc44[_0x25a123(0x1af)][_0x25a123(0x1d1)]()][_0x25a123(0x36d)](_0x3a11dc=>!_0x3a11dc[_0x25a123(0x193)]('~'));console[_0x25a123(0x23a)]('');for(const _0x1094d0 of _0xa91720){const _0x3296cd=_0x1094d0===_0x4bb2f4['env'];console[_0x25a123(0x23a)]('\x20\x20'+(_0x3296cd?_0xe4bf63(_0x1562c3[_0x25a123(0x318)],'●'):_0xe4bf63(_0x1562c3[_0x25a123(0x183)],'○'))+'\x20\x20'+(_0x3296cd?_0xe4bf63(_0x1562c3[_0x25a123(0x370)]+_0x1562c3[_0x25a123(0x1ac)],_0x1094d0):_0xe4bf63(_0x1562c3['dim'],_0x1094d0)));}console[_0x25a123(0x23a)](_0x25a123(0x118)+_0xe4bf63(_0x1562c3['dim'],_0x25a123(0x27d))+'\x20'+_0xe4bf63(_0x1562c3[_0x25a123(0x1ac)],_0x4bb2f4[_0x25a123(0xf8)])),console[_0x25a123(0x23a)]('');return;}if(_0x29feb7===_0x25a123(0x2ea)){const _0x425885=[..._0x2afc44['_envs']['values']()][_0x25a123(0x36d)](_0x36afcd=>!_0x36afcd[_0x25a123(0x2f4)]['startsWith']('~'));console[_0x25a123(0x23a)]('');const _0x25e202=Math['max'](..._0x425885[_0x25a123(0x321)](_0xb34585=>_0xb34585[_0x25a123(0x2f4)][_0x25a123(0x2af)]));for(const _0x5d8b5c of _0x425885){const _0xd0a160=_0x5d8b5c['name']===_0x4bb2f4[_0x25a123(0xf8)],_0x33e50a=_0xd0a160?_0xe4bf63(_0x1562c3[_0x25a123(0x318)],'●'):_0xe4bf63(_0x1562c3[_0x25a123(0x183)],'○'),_0x5a7b80=_0xd0a160?_0xe4bf63(_0x1562c3['bold']+_0x1562c3[_0x25a123(0x1ac)],_0x5d8b5c[_0x25a123(0x2f4)][_0x25a123(0x20c)](_0x25e202)):_0xe4bf63(_0x1562c3['dim'],_0x5d8b5c[_0x25a123(0x2f4)][_0x25a123(0x20c)](_0x25e202)),_0x48a236=[..._0x5d8b5c[_0x25a123(0x393)][_0x25a123(0x1d1)]()][_0x25a123(0x36d)](_0x203f4b=>!_0x203f4b[_0x25a123(0x193)]('~')),_0x1ac52d=_0x48a236[_0x25a123(0x2af)]?_0xe4bf63(_0x1562c3[_0x25a123(0x183)],_0x48a236[_0x25a123(0x237)](0x0,0x5)[_0x25a123(0x180)](',\x20')+(_0x48a236[_0x25a123(0x2af)]>0x5?_0x25a123(0x141)+(_0x48a236[_0x25a123(0x2af)]-0x5)+_0x25a123(0x3b1):'')):_0xe4bf63(_0x1562c3[_0x25a123(0x183)],'(no\x20types)');console[_0x25a123(0x23a)]('\x20\x20'+_0x33e50a+'\x20\x20'+_0x5a7b80+'\x20\x20'+_0x1ac52d);}console[_0x25a123(0x23a)]('');return;}if(_0x29feb7==='TYPES'){const _0x18daa8=_0x2bae0f[_0x25a123(0xf8)]??_0x3708af[0x1]??_0x4bb2f4['env'];try{const _0x418036=_0x2afc44[_0x25a123(0xf8)](_0x18daa8),_0x14d603=[..._0x418036[_0x25a123(0x393)]['keys']()][_0x25a123(0x36d)](_0x60d8ee=>!_0x60d8ee[_0x25a123(0x193)]('~'))[_0x25a123(0x28e)]();console['log'](_0x25a123(0x118)+_0xe4bf63(_0x1562c3['dim'],_0x14d603[_0x25a123(0x2af)]+'\x20type'+(_0x14d603['length']!==0x1?'s':'')+_0x25a123(0x3cc)+_0x18daa8));for(const _0x44be5d of _0x14d603){const _0x47cf5c=_0x418036[_0x25a123(0x393)][_0x25a123(0x26f)](_0x44be5d),_0x3b423d=_0x47cf5c?.['data']?.[_0x25a123(0x17a)]?.()??0x0,_0x5e6fcc=_0xe4bf63(_0x1562c3['bold']+_0x1562c3[_0x25a123(0x1ac)],_0x44be5d['padEnd'](0x1c));console[_0x25a123(0x23a)](_0x25a123(0x3be)+_0x5e6fcc+'\x20\x20'+_0xe4bf63(_0x1562c3[_0x25a123(0xde)],String(_0x3b423d)[_0x25a123(0x2a9)](0x6))+'\x20'+_0xe4bf63(_0x1562c3[_0x25a123(0x183)],_0x25a123(0x2b9)));}console[_0x25a123(0x23a)]('');}catch(_0x594aa8){console['error'](_0xe4bf63(_0x1562c3[_0x25a123(0x139)],_0x25a123(0x118)+_0x594aa8[_0x25a123(0x2df)]+'\x0a'));}return;}if(_0x29feb7===_0x25a123(0x2c2)){_0x38d06a(_0x2afc44,_0x3708af[_0x25a123(0x237)](0x1)['join']('\x20'));return;}if(_0x29feb7==='LOGS'){const _0x1b3b4a=(_0x3708af[0x1]??'')[_0x25a123(0x288)]();if(!_0x1b3b4a||_0x1b3b4a==='on')_0x1916b4[_0x25a123(0x134)]=!![],_0x1916b4[_0x25a123(0x34b)]=_0x25a123(0x11b),console[_0x25a123(0x23a)](_0x25a123(0x118)+_0xe4bf63(_0x1562c3[_0x25a123(0x318)],'✓')+_0x25a123(0x1eb)+_0xe4bf63(_0x1562c3[_0x25a123(0x183)],_0x25a123(0x19f))+'\x0a');else{if(_0x1b3b4a===_0x25a123(0x257))_0x1916b4[_0x25a123(0x134)]=![],console[_0x25a123(0x23a)](_0x25a123(0x118)+_0xe4bf63(_0x1562c3['yellow'],'○')+_0x25a123(0x156));else _0x2bc81a[_0x1b3b4a]!==undefined?(_0x1916b4[_0x25a123(0x134)]=!![],_0x1916b4[_0x25a123(0x34b)]=_0x1b3b4a,console[_0x25a123(0x23a)](_0x25a123(0x118)+_0xe4bf63(_0x1562c3['green'],'✓')+_0x25a123(0x213)+_0xe4bf63(_0x1562c3[_0x25a123(0x370)],_0x1b3b4a)+'\x0a')):console[_0x25a123(0x238)](_0xe4bf63(_0x1562c3[_0x25a123(0x139)],_0x25a123(0x326)));}return;}if(_0x29feb7===_0x25a123(0x1e2)||_0x29feb7==='QUIT'){await _0x5283d5(_0x2afc44,0x0);return;}if(_0x29feb7===_0x25a123(0x211)){const _0x34296f='http://localhost:'+_0x503925[_0x25a123(0x2bf)]+'/admin/index.html',_0x2f1cae=process[_0x25a123(0x334)]==='win32'?_0x25a123(0x1e7)+_0x34296f:process[_0x25a123(0x334)]===_0x25a123(0x270)?_0x25a123(0x33d)+_0x34296f:'xdg-open\x20'+_0x34296f;require$$4['exec'](_0x2f1cae),console[_0x25a123(0x23a)](_0x25a123(0x118)+_0xe4bf63(_0x1562c3['green'],'✓')+_0x25a123(0x1bb)+_0xe4bf63(_0x1562c3[_0x25a123(0x1ac)],_0x34296f)+'\x0a');return;}let _0x5944e4,_0x15821d,_0x289b76;if(_0x424b0f[_0x25a123(0x17d)](_0x29feb7)){_0x5944e4=_0x29feb7,_0x15821d=_0x3708af[0x1],_0x289b76=_0x3708af[_0x25a123(0x237)](0x2);if(!_0x15821d){console[_0x25a123(0x238)](_0xe4bf63(_0x1562c3[_0x25a123(0x139)],_0x25a123(0x1f9)+_0x3e380c+_0x25a123(0x122)));return;}}else _0x5944e4=null,_0x15821d=_0x3708af[0x0],_0x289b76=_0x3708af['slice'](0x1);const _0x32a6ab=_0x2bae0f[_0x25a123(0xf8)]??_0x4bb2f4[_0x25a123(0xf8)],_0x205864=_0x1208a9(_0x15821d,_0x32a6ab);if(_0x2bae0f[_0x25a123(0x155)]){_0xb83943(_0x2afc44,_0x205864);return;}let _0x46cd84=null;if(_0x289b76['length']){const _0x415dd7=_0x289b76['join']('\x20');try{_0x46cd84=_0x57a579(_0x415dd7);}catch(_0xf9a8d5){console[_0x25a123(0x238)](_0xe4bf63(_0x1562c3[_0x25a123(0x139)],_0x25a123(0x362)+_0x415dd7+_0x25a123(0x118)+_0xe4bf63(_0x1562c3[_0x25a123(0x183)],_0xf9a8d5[_0x25a123(0x2df)])+'\x0a'));return;}}if(!_0x5944e4)_0x5944e4=_0x46cd84!==null?_0x25a123(0x10f):_0x25a123(0x1f8);try{const _0x2ba68a=await _0x41713e(_0x2afc44,_0x5944e4,_0x205864,_0x46cd84);_0x1fa39b(_0x2ba68a[_0x25a123(0x29f)],_0x2ba68a['body']);}catch(_0x38afac){console['error']('\x0a\x20\x20'+_0xe4bf63(_0x1562c3[_0x25a123(0x139)],'✗')+'\x20'+_0x38afac[_0x25a123(0x2df)]+'\x0a');}}class _0x57a5c3{constructor(){const _0x5c41de=_0x468a94;this[_0x5c41de(0x153)]=new Map(),this[_0x5c41de(0x355)]=null,this[_0x5c41de(0x35b)]=![];}}function _0x16102b(_0x10132a){const _0x3beaae=_0x468a94,_0x5113b4=new _0x57a5c3();for(const _0x84651a of _0x10132a){if(_0x84651a[_0x3beaae(0x282)]?.[_0x3beaae(0x345)])continue;const _0x4dcc2d=_0x84651a[_0x3beaae(0x176)][_0x3beaae(0x19c)](/^\/api/,'')[_0x3beaae(0x19c)](/^\[\/env\/:env=[^\]]*\]/,'')[_0x3beaae(0x19c)](/^\//,'');if(!_0x4dcc2d)continue;let _0x24f863=_0x5113b4;for(const _0x30af9d of _0x4dcc2d[_0x3beaae(0x36f)]('/')[_0x3beaae(0x36d)](Boolean)){if(_0x30af9d[_0x3beaae(0x193)](':')){const _0x3845f7=_0x30af9d['slice'](0x1);if(!_0x24f863[_0x3beaae(0x355)])_0x24f863[_0x3beaae(0x355)]={'param':_0x3845f7,'node':new _0x57a5c3()};_0x24f863=_0x24f863['dynamic'][_0x3beaae(0x32b)];}else{if(!_0x24f863[_0x3beaae(0x153)][_0x3beaae(0x17d)](_0x30af9d))_0x24f863[_0x3beaae(0x153)][_0x3beaae(0x2fd)](_0x30af9d,new _0x57a5c3());_0x24f863=_0x24f863[_0x3beaae(0x153)]['get'](_0x30af9d);}}_0x24f863[_0x3beaae(0x35b)]=!![];}return _0x5113b4;}const _0x1b9f40=new Map();function _0x391e88(_0x51dfe2,_0x5856e5,_0x38d7bd){const _0x3abc0d=_0x468a94,_0x3abb3c=_0x1b9f40[_0x3abc0d(0x26f)](_0x51dfe2);if(_0x3abb3c&&_0x3abb3c[_0x3abc0d(0x267)]>Date[_0x3abc0d(0x234)]())return _0x3abb3c[_0x3abc0d(0x319)];const _0x21e26a=_0x38d7bd();return _0x1b9f40[_0x3abc0d(0x2fd)](_0x51dfe2,{'val':_0x21e26a,'exp':Date[_0x3abc0d(0x234)]()+_0x5856e5}),_0x21e26a;}function _0x40de0e(_0x3dbc32,_0x2f7788,_0xdda33c,_0x19c10a){const _0xd7c620=_0x468a94,_0x481c78=_0x2f7788[_0xd7c620(0xf8)]??_0x19c10a[_0xd7c620(0xf8)];switch(_0x3dbc32){case'env':return[..._0xdda33c[_0xd7c620(0x1af)][_0xd7c620(0x1d1)]()][_0xd7c620(0x36d)](_0x26059f=>!_0x26059f[_0xd7c620(0x193)]('~'));case _0xd7c620(0x152):return _0x391e88(_0xd7c620(0x328)+_0x481c78,0x7d0,()=>{const _0x2f0fb2=_0xd7c620;try{return[..._0xdda33c[_0x2f0fb2(0xf8)](_0x481c78)['typeSubDbs'][_0x2f0fb2(0x1d1)]()]['filter'](_0x3d6fb0=>!_0x3d6fb0[_0x2f0fb2(0x193)]('~'));}catch{return[];}});case _0xd7c620(0x351):if(!_0x2f7788[_0xd7c620(0x152)])return[];return _0x391e88('keys:'+_0x481c78+':'+_0x2f7788[_0xd7c620(0x152)],0x5dc,()=>{const _0x53a806=_0xd7c620;try{const _0x2900b9=_0xdda33c['env'](_0x481c78)['typeSubDbs'][_0x53a806(0x26f)](_0x2f7788[_0x53a806(0x152)]);if(!_0x2900b9?.['data'])return[];const _0x3ce3d8=[];for(const {key:_0x20e009}of _0x2900b9[_0x53a806(0x1d8)]['getRange']({'limit':0x32})){_0x3ce3d8[_0x53a806(0x322)](String(_0x20e009));if(_0x3ce3d8[_0x53a806(0x2af)]>=0x32)break;}return _0x3ce3d8;}catch{return[];}});case'index':if(!_0x2f7788[_0xd7c620(0x152)])return[];return _0x391e88(_0xd7c620(0x16a)+_0x481c78+':'+_0x2f7788[_0xd7c620(0x152)],0x7d0,()=>{const _0x2312f8=_0xd7c620;try{const _0x1aac50=_0xdda33c[_0x2312f8(0xf8)](_0x481c78)[_0x2312f8(0x393)]['get'](_0x2f7788[_0x2312f8(0x152)]);return _0x1aac50?[..._0x1aac50[_0x2312f8(0x338)]?.[_0x2312f8(0x1d1)]()??[]]:[];}catch{return[];}});case'ftsName':if(!_0x2f7788[_0xd7c620(0x152)])return[];return _0x391e88(_0xd7c620(0xf6)+_0x481c78+':'+_0x2f7788[_0xd7c620(0x152)],0x7d0,()=>{const _0x7d2a5d=_0xd7c620;try{return _0xdda33c[_0x7d2a5d(0x2f9)]?.[_0x7d2a5d(0x1b0)]?.(_0x2f7788['type'],_0xdda33c[_0x7d2a5d(0xf8)](_0x481c78))?.[_0x7d2a5d(0x321)](_0x55487e=>_0x55487e['name'])??[];}catch{return[];}});default:return[];}}function _0x19f1d8(_0x227ed7,_0x3c917e,_0x2263a1,_0x334f5b){const _0x2085fe=_0x468a94,_0x2d9b7f=_0x227ed7[_0x2085fe(0x31b)]('/'),_0x19ec5a=_0x227ed7[_0x2085fe(0x36f)]('/'),_0x27ebfc=_0x2d9b7f?_0x19ec5a['slice'](0x0,-0x1):_0x19ec5a[_0x2085fe(0x237)](0x0,-0x1),_0x517d26=_0x2d9b7f?'':_0x19ec5a[_0x19ec5a[_0x2085fe(0x2af)]-0x1];let _0x5d6620=_0x3c917e;const _0xdac62d={};for(const _0x10c494 of _0x27ebfc){if(!_0x10c494)continue;if(_0x5d6620[_0x2085fe(0x153)]['has'](_0x10c494))_0x5d6620=_0x5d6620['children'][_0x2085fe(0x26f)](_0x10c494);else{if(_0x5d6620[_0x2085fe(0x355)])_0xdac62d[_0x5d6620[_0x2085fe(0x355)][_0x2085fe(0x22b)]]=_0x10c494,_0x5d6620=_0x5d6620[_0x2085fe(0x355)]['node'];else return[];}}const _0x48605e=_0x27ebfc['filter'](Boolean),_0x53dcca=_0x48605e[_0x2085fe(0x2af)]?_0x48605e[_0x2085fe(0x180)]('/')+'/':'',_0x4d2935=[];for(const [_0x13a717]of _0x5d6620[_0x2085fe(0x153)]){if(_0x13a717[_0x2085fe(0x193)](_0x517d26))_0x4d2935[_0x2085fe(0x322)](_0x53dcca+_0x13a717);}if(_0x5d6620['dynamic'])for(const _0x382dd6 of _0x40de0e(_0x5d6620[_0x2085fe(0x355)]['param'],_0xdac62d,_0x2263a1,_0x334f5b)){if(String(_0x382dd6)['startsWith'](_0x517d26))_0x4d2935['push'](_0x53dcca+_0x382dd6);}return _0x4d2935[_0x2085fe(0x237)](0x0,0x64);}const _0x56d6b9=[_0x468a94(0x155),'use',_0x468a94(0xf8),_0x468a94(0x20d),'types',_0x468a94(0x374),_0x468a94(0x258),_0x468a94(0x1fd),_0x468a94(0x2d2),_0x468a94(0x132)];function _0x5ae984(_0x386ada,_0x180ee9,_0x3b22fd){return function _0x58576d(_0x2a9ff2){const _0x3e178e=_0x206f;try{const _0x1419f1=_0x2a9ff2[_0x3e178e(0x1c0)](/\s[{[]/),_0x1f914e=_0x1419f1>=0x0?_0x2a9ff2[_0x3e178e(0x237)](0x0,_0x1419f1):_0x2a9ff2,_0x1cf045=_0x1f914e[_0x3e178e(0x1ee)]();if(!_0x1cf045){const _0x30b7ce=[..._0x56d6b9,...[..._0x386ada[_0x3e178e(0x153)][_0x3e178e(0x1d1)]()]][_0x3e178e(0x237)](0x0,0x64);return[_0x30b7ce,''];}const _0xd72c83=_0x1cf045[_0x3e178e(0x36f)](/\s+/),_0x17ef4f=_0xd72c83[0x0],_0x7456ac=_0x17ef4f[_0x3e178e(0xfa)]();if(_0xd72c83[_0x3e178e(0x2af)]===0x1){const _0x3cab48=_0x17ef4f[_0x3e178e(0x288)](),_0x1fcc67=_0x56d6b9[_0x3e178e(0x36d)](_0xcb19f2=>_0xcb19f2[_0x3e178e(0x193)](_0x3cab48)),_0x15a11e=_0x19f1d8(_0x17ef4f,_0x386ada,_0x180ee9,_0x3b22fd),_0x10fe8d=[...new Set([..._0x1fcc67,..._0x15a11e])]['slice'](0x0,0x64);return[_0x10fe8d,_0x17ef4f];}if(_0x424b0f['has'](_0x7456ac)&&_0xd72c83[_0x3e178e(0x2af)]===0x2){const _0xb075c4=_0xd72c83[0x1],_0x5adce4=_0x19f1d8(_0xb075c4,_0x386ada,_0x180ee9,_0x3b22fd);return[_0x5adce4[_0x3e178e(0x321)](_0x429694=>_0x17ef4f+'\x20'+_0x429694),_0x17ef4f+'\x20'+_0xb075c4];}if(!_0x424b0f['has'](_0x7456ac)&&_0xd72c83[_0x3e178e(0x2af)]>0x1){const _0x77bd24=_0x19f1d8(_0x17ef4f,_0x386ada,_0x180ee9,_0x3b22fd),_0x24d04a='\x20'+_0xd72c83['slice'](0x1)['join']('\x20');return[_0x77bd24[_0x3e178e(0x321)](_0x4a9e62=>_0x4a9e62+_0x24d04a),_0x17ef4f+_0x24d04a];}return[[],_0x2a9ff2];}catch{return[[],_0x2a9ff2];}};}async function _0x39169d(_0x5b4bac,_0x2cbbd5){const _0x183ae3=_0x468a94,_0x533ffe={'enabled':!![],'level':_0x2cbbd5['logLevel']??_0x183ae3(0x11b)},_0x5988c4={'env':_0x183ae3(0x10e)},_0x7ab206={'current':null},_0x268726=_0x16102b(_0x5b4bac[_0x183ae3(0x178)]['listRoutes']()),_0x3d4385=_0x5ae984(_0x268726,_0x5b4bac,_0x5988c4);_0x5b4bac['log'][_0x183ae3(0x1cc)](_0x1cc1ce=>{const _0x4100ed=_0x183ae3;if(!_0x533ffe['enabled'])return;_0x3639b5(_0x1cc1ce,_0x533ffe[_0x4100ed(0x34b)]),_0x7ab206[_0x4100ed(0x284)]?.['prompt'](!![]);}),_0x534dbc(_0x5b4bac,_0x2cbbd5);const _0x38275e=_0x2c7f74[_0x183ae3(0x291)]({'input':process[_0x183ae3(0x1de)],'output':process[_0x183ae3(0x1b5)],'terminal':!![],'completer':_0x3d4385,'prompt':_0x18dd9b(_0x5988c4),'historySize':_0x3d82e9});try{const _0x1ef876=_0x3597de[_0x183ae3(0x206)](_0x27535f,_0x183ae3(0x1f6))[_0x183ae3(0x36f)]('\x0a')[_0x183ae3(0x36d)](Boolean);_0x38275e[_0x183ae3(0x2d0)]=_0x1ef876[_0x183ae3(0x159)]()[_0x183ae3(0x237)](0x0,_0x3d82e9);}catch{}_0x7ab206['current']=_0x38275e,_0x38275e['on'](_0x183ae3(0x3bf),async _0x264deb=>{const _0x273d80=_0x183ae3;_0x38275e[_0x273d80(0x1b4)]();try{await _0x103d46(_0x264deb,_0x5b4bac,_0x2cbbd5,_0x533ffe,_0x5988c4,_0x38275e);}catch(_0x15b438){console['error'](_0xe4bf63(_0x1562c3['red'],_0x273d80(0x301)+_0x15b438['message']));}finally{_0x38275e[_0x273d80(0x1ea)](),_0x38275e[_0x273d80(0x11f)]();}}),_0x38275e['on']('close',()=>{const _0x50eb4=_0x183ae3;try{const _0x18c337=[..._0x38275e['history']]['reverse']()[_0x50eb4(0x36d)](Boolean)['slice'](0x0,_0x3d82e9);_0x3597de[_0x50eb4(0x182)](_0x27535f,_0x18c337[_0x50eb4(0x180)]('\x0a')+'\x0a');}catch{}_0x5283d5(_0x5b4bac,0x0);});let _0x432849=0x0;return process['on'](_0x183ae3(0x1e0),()=>{const _0x28e11d=_0x183ae3;if(_0x22cd96)return _0x5283d5(_0x5b4bac,0x82,'SIGINT');if(_0x38275e[_0x28e11d(0x3bf)]==='')return _0x5283d5(_0x5b4bac,0x0,'SIGINT');const _0x221d2e=Date[_0x28e11d(0x234)]();if(_0x221d2e-_0x432849<0x5dc)return _0x5283d5(_0x5b4bac,0x0,_0x28e11d(0xdf));_0x432849=_0x221d2e,process[_0x28e11d(0x1b5)][_0x28e11d(0x13a)]('\x0a'),_0x38275e[_0x28e11d(0x236)](0x0),_0x38275e[_0x28e11d(0x11f)](),process[_0x28e11d(0x1b9)]['write'](_0xe4bf63(_0x1562c3[_0x28e11d(0x183)],_0x28e11d(0x203)));}),process['on']('SIGTERM',()=>_0x5283d5(_0x5b4bac,0x0,'SIGTERM')),process['on'](_0x183ae3(0x242),()=>_0x5283d5(_0x5b4bac,0x0,_0x183ae3(0x242))),_0x38275e[_0x183ae3(0x11f)](),_0x38275e;}return okdbShell={'start':_0x39169d,'colorLog':_0x3639b5,'lenientParse':_0x57a579,'_splitLine':_0x1e8da5,'_formatRouteHelpLines':_0x4f997f,'_routeSummary':_0x171386,'_routeTags':_0x167b59},okdbShell;}var hasRequiredOkdb;function requireOkdb(){const _0xdae2f6=_0x1df1fe;if(hasRequiredOkdb)return okdb$1;hasRequiredOkdb=0x1;try{process[_0xdae2f6(0x1c5)]();}catch{}const _0x5ae735=require$$1$1,_0x32d4f7=require$$1;function _0x305ebb(_0x4ca114){const _0x108eac=_0xdae2f6,_0x462aba=_0x4ca114[_0x108eac(0x237)](0x2),_0x289020={};let _0x4b4c8=0x0;while(_0x4b4c8<_0x462aba[_0x108eac(0x2af)]){const _0x333314=_0x462aba[_0x4b4c8];if(_0x333314===_0x108eac(0x2d9)||_0x333314==='-p')_0x289020[_0x108eac(0x2bf)]=Number(_0x462aba[++_0x4b4c8]);else{if(_0x333314==='--path'||_0x333314==='-d')_0x289020[_0x108eac(0x176)]=_0x462aba[++_0x4b4c8];else{if(_0x333314==='--key'||_0x333314==='-k')_0x289020[_0x108eac(0x351)]=_0x462aba[++_0x4b4c8];else{if(_0x333314===_0x108eac(0x2a3)||_0x333314==='-c')_0x289020[_0x108eac(0x140)]=_0x462aba[++_0x4b4c8];else{if(_0x333314==='--log-level')_0x289020[_0x108eac(0x102)]=_0x462aba[++_0x4b4c8];else{if(_0x333314===_0x108eac(0x2ad))_0x289020[_0x108eac(0x287)]=!![];else{if(_0x333314===_0x108eac(0x3ad))_0x289020[_0x108eac(0x1ec)]=!![];else{if(_0x333314===_0x108eac(0x34f)||_0x333314==='-e')_0x289020[_0x108eac(0xf8)]=_0x462aba[++_0x4b4c8];else{if(_0x333314===_0x108eac(0x16f))_0x289020[_0x108eac(0x30e)]=_0x462aba[++_0x4b4c8];else{if(_0x333314===_0x108eac(0x389))_0x289020[_0x108eac(0x12c)]=!![];else{if(_0x333314===_0x108eac(0x1f5))_0x289020[_0x108eac(0xea)]=!![];else{if(_0x333314===_0x108eac(0x3b7))_0x289020[_0x108eac(0x1ab)]=!![];else{if(_0x333314===_0x108eac(0x151)){const _0x5c7651=[];while(_0x4b4c8+0x1<_0x462aba[_0x108eac(0x2af)]&&!_0x462aba[_0x4b4c8+0x1][_0x108eac(0x193)]('--')){_0x5c7651[_0x108eac(0x322)](_0x462aba[++_0x4b4c8]);}_0x289020['open']=_0x5c7651['length']>0x0?_0x5c7651:!![];}else{if(_0x333314===_0x108eac(0x327))_0x289020[_0x108eac(0x101)]=!![];else{if(_0x333314===_0x108eac(0x198))_0x289020[_0x108eac(0x2f4)]=_0x462aba[++_0x4b4c8];else{if(_0x333314===_0x108eac(0x173))_0x289020[_0x108eac(0x36b)]=_0x462aba[++_0x4b4c8];else{if(_0x333314===_0x108eac(0x1fb))_0x289020['label']=_0x462aba[++_0x4b4c8];else{if(_0x333314==='--permissions')_0x289020[_0x108eac(0x2a5)]=_0x462aba[++_0x4b4c8];else{if(_0x333314===_0x108eac(0x179))_0x289020[_0x108eac(0x25e)]=_0x462aba[++_0x4b4c8];else{if(_0x333314===_0x108eac(0x158))_0x289020['ttl']=_0x462aba[++_0x4b4c8];else{if(_0x333314===_0x108eac(0x2d6))_0x289020[_0x108eac(0x37d)]=_0x462aba[++_0x4b4c8];else{if(_0x333314===_0x108eac(0x168)||_0x333314==='-u')_0x289020[_0x108eac(0x144)]=_0x462aba[++_0x4b4c8];else{if(_0x333314===_0x108eac(0x3b4))_0x289020[_0x108eac(0x21c)]=_0x462aba[++_0x4b4c8];else{if(_0x333314===_0x108eac(0x232)||_0x333314==='-v'){const _0xd329d4=require$$2;console[_0x108eac(0x23a)](_0xd329d4[_0x108eac(0x382)]),process[_0x108eac(0x2d2)](0x0);}else(_0x333314===_0x108eac(0xe0)||_0x333314==='-h')&&(_0x1c4420(),process[_0x108eac(0x2d2)](0x0));}}}}}}}}}}}}}}}}}}}}}}}_0x4b4c8++;}return _0x289020;}function _0x1c4420(){const _0x593cec=_0xdae2f6;console[_0x593cec(0x23a)](_0x593cec(0x14a));}const _0x21dde2=new Set([_0xdae2f6(0x251),_0xdae2f6(0x11b),_0xdae2f6(0x1a0),_0xdae2f6(0x238)]);function _0x47b6be(_0x526c54){const _0x48d35e=_0xdae2f6,_0x2028e8=_0x526c54[_0x48d35e(0x140)]?_0x5ae735[_0x48d35e(0x1e4)](_0x526c54[_0x48d35e(0x140)]):_0x5ae735[_0x48d35e(0x1e4)](_0x48d35e(0x290));let _0x455465={};if(_0x32d4f7[_0x48d35e(0x16e)](_0x2028e8))try{const _0x3dd31c=_0x32d4f7[_0x48d35e(0x206)](_0x2028e8,_0x48d35e(0x1f6))[_0x48d35e(0x19c)](/^\uFEFF/,'');_0x455465=JSON[_0x48d35e(0x317)](_0x3dd31c),console[_0x48d35e(0x23a)](_0x48d35e(0x22a)+_0x2028e8);}catch(_0x3f9cc8){console['error'](_0x48d35e(0x22c)+_0x2028e8+':\x20'+_0x3f9cc8['message']),process['exit'](0x1);}const _0x45a67b={'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},_0x1e7949={'port':_0x526c54['port']??_0x455465['port']??_0x45a67b[_0x48d35e(0x2bf)]??0x2124,'dbPath':_0x526c54[_0x48d35e(0x176)]??_0x455465[_0x48d35e(0x176)]??_0x45a67b['path']??_0x48d35e(0x27a),'key':_0x526c54[_0x48d35e(0x351)]??_0x455465['key']??_0x45a67b['key']??undefined,'logLevel':_0x526c54[_0x48d35e(0x102)]??_0x455465['logLevel']??_0x45a67b[_0x48d35e(0x102)]??_0x48d35e(0x11b),'noRepl':_0x526c54['noRepl']??_0x455465[_0x48d35e(0x287)]??_0x45a67b['noRepl']??![],'noAdmin':_0x526c54[_0x48d35e(0x1ec)]??_0x455465['noAdmin']??_0x45a67b[_0x48d35e(0x1ec)]??![],'admin':_0x455465[_0x48d35e(0x25b)]??{},'api':_0x455465[_0x48d35e(0x224)]??undefined,'auth':_0x455465[_0x48d35e(0x38f)]??undefined,'mcp':_0x455465[_0x48d35e(0x261)]??undefined,'timeMachine':_0x455465[_0x48d35e(0x2ed)]!==![]?_0x455465[_0x48d35e(0x2ed)]??{}:![]};return _0x526c54['open']!==undefined&&(_0x1e7949['auth']=_0x1e7949[_0x48d35e(0x38f)]||{},_0x1e7949[_0x48d35e(0x38f)][_0x48d35e(0x1fd)]=_0x526c54[_0x48d35e(0x1fd)]),_0x526c54['logRequests']&&(_0x1e7949[_0x48d35e(0x251)]=_0x1e7949[_0x48d35e(0x251)]||{},_0x1e7949[_0x48d35e(0x251)][_0x48d35e(0x101)]=!![]),(!Number[_0x48d35e(0x222)](_0x1e7949[_0x48d35e(0x2bf)])||_0x1e7949[_0x48d35e(0x2bf)]<0x1||_0x1e7949[_0x48d35e(0x2bf)]>0xffff)&&(console[_0x48d35e(0x238)](_0x48d35e(0x276)+_0x1e7949[_0x48d35e(0x2bf)]+_0x48d35e(0x3b2)),process['exit'](0x1)),!_0x21dde2[_0x48d35e(0x17d)](_0x1e7949[_0x48d35e(0x102)])&&(console[_0x48d35e(0x238)](_0x48d35e(0xed)+_0x1e7949['logLevel']+'\x22\x20(must\x20be\x20debug|info|warn|error)'),process[_0x48d35e(0x2d2)](0x1)),_0x1e7949;}function _0x4958ad(_0x44c729){const _0x17ca54=_0xdae2f6;return!!(_0x44c729&&typeof _0x44c729===_0x17ca54(0x23e)&&!Array[_0x17ca54(0x2a8)](_0x44c729)&&Object[_0x17ca54(0x1d1)](_0x44c729)[_0x17ca54(0x2af)]>0x0);}const _0x59a1fb=!process[_0xdae2f6(0x1b5)][_0xdae2f6(0x33b)]||!!process.env.NO_COLOR;function _0x4bcd2d(_0x5b5721,_0x1aa453){const _0x444476=_0xdae2f6;return _0x59a1fb?_0x1aa453:'\x1b['+_0x5b5721+'m'+_0x1aa453+_0x444476(0x377);}function _0x3e8948(_0x146ae4){const _0x3cd6f2=_0xdae2f6;if(!_0x146ae4||_0x146ae4[_0x3cd6f2(0x2af)]===0x0)return;const _0xc60c7a='─'['repeat'](0x38);process[_0x3cd6f2(0x1b9)][_0x3cd6f2(0x13a)]('\x0a'),process[_0x3cd6f2(0x1b9)]['write'](_0x4bcd2d('33',_0x3cd6f2(0x124)+_0x146ae4['length']+'\x20SECURITY\x20NOTICE'+(_0x146ae4[_0x3cd6f2(0x2af)]>0x1?'S':'')+'\x0a')),process[_0x3cd6f2(0x1b9)][_0x3cd6f2(0x13a)]('\x20\x20'+_0xc60c7a+'\x0a');for(const _0x201b2d of _0x146ae4){const _0x5cc302=_0x201b2d['level']===_0x3cd6f2(0x238)?_0x4bcd2d('31',_0x3cd6f2(0x243)):_0x4bcd2d('33',_0x3cd6f2(0x1c7));process['stderr'][_0x3cd6f2(0x13a)](_0x5cc302+'\x20\x20'+_0x4bcd2d('1',_0x201b2d[_0x3cd6f2(0x39e)])+'\x0a'),process[_0x3cd6f2(0x1b9)][_0x3cd6f2(0x13a)](_0x3cd6f2(0x1d9)+_0x201b2d[_0x3cd6f2(0x2df)]+'\x0a');if(_0x201b2d[_0x3cd6f2(0x2dd)])process[_0x3cd6f2(0x1b9)][_0x3cd6f2(0x13a)](_0x3cd6f2(0x1d9)+_0x4bcd2d('2',_0x3cd6f2(0x17b)+_0x201b2d[_0x3cd6f2(0x2dd)])+'\x0a');process[_0x3cd6f2(0x1b9)]['write']('\x0a');}process['stderr']['write']('\x20\x20'+_0xc60c7a+'\x0a\x0a');}function _0x31eb3f(_0x5e6480,_0x4030c7){const _0x7c53df=_0xdae2f6,_0x207053=_0x5e6480[_0x7c53df(0x178)][_0x7c53df(0x3c0)](_0x4030c7);return new Promise((_0x59e524,_0x5db05d)=>{const _0x3751f7=_0x7c53df;_0x207053[_0x3751f7(0xe5)](_0x3751f7(0x2f2),_0x59e524),_0x207053[_0x3751f7(0xe5)](_0x3751f7(0x238),_0x5db05d);});}async function _0x30c207(_0x4229f3){const _0x4b0b1a=_0xdae2f6,_0x3f2720=require$$3;console[_0x4b0b1a(0x23a)](_0x4b0b1a(0x18b));let _0x563341=!![];const _0x2436b4=(_0x23728d,_0x36d231)=>{const _0x160892=_0x4b0b1a;console[_0x160892(0x23a)]('\x20\x20'+(_0x23728d?'✓':'✗')+'\x20'+_0x36d231);if(!_0x23728d)_0x563341=![];},_0x221acc=Number(process[_0x4b0b1a(0x382)][_0x4b0b1a(0x19c)]('v','')['split']('.')[0x0]);_0x2436b4(_0x221acc>=0x12,_0x4b0b1a(0xe3)+process[_0x4b0b1a(0x382)]+(_0x221acc<0x12?_0x4b0b1a(0x1a7):''));const _0x236d2d=_0x5ae735[_0x4b0b1a(0x1e4)](_0x4229f3[_0x4b0b1a(0x2f3)]);try{_0x32d4f7[_0x4b0b1a(0x269)](_0x236d2d,{'recursive':!![]});const _0x1c40d8=_0x5ae735['join'](_0x236d2d,'.okdb-write-test');_0x32d4f7[_0x4b0b1a(0x182)](_0x1c40d8,''),_0x32d4f7['unlinkSync'](_0x1c40d8),_0x2436b4(!![],_0x4b0b1a(0x217)+_0x236d2d);}catch(_0x3fcbd7){_0x2436b4(![],_0x4b0b1a(0x31c)+_0x236d2d+_0x4b0b1a(0x1ba)+_0x3fcbd7[_0x4b0b1a(0x2df)]+')');}const _0x17013f=await new Promise(_0x51a164=>{const _0x36155b=_0x4b0b1a,_0x1dd84a=_0x3f2720['createServer']();_0x1dd84a[_0x36155b(0xe5)](_0x36155b(0x238),()=>_0x51a164(![])),_0x1dd84a[_0x36155b(0xe5)]('listening',()=>{const _0x2c020f=_0x36155b;_0x1dd84a[_0x2c020f(0x1c8)](),_0x51a164(!![]);}),_0x1dd84a[_0x36155b(0x3c0)](_0x4229f3[_0x36155b(0x2bf)],_0x36155b(0x350));});_0x2436b4(_0x17013f,_0x4b0b1a(0xfd)+_0x4229f3[_0x4b0b1a(0x2bf)]+'\x20'+(_0x17013f?_0x4b0b1a(0x281):_0x4b0b1a(0x372)));const _0x314f89=_0x5ae735[_0x4b0b1a(0x1e4)](_0x4b0b1a(0x290));if(_0x32d4f7[_0x4b0b1a(0x16e)](_0x314f89))try{JSON[_0x4b0b1a(0x317)](_0x32d4f7[_0x4b0b1a(0x206)](_0x314f89,'utf8')[_0x4b0b1a(0x19c)](/^\uFEFF/,'')),_0x2436b4(!![],_0x4b0b1a(0x21e)+_0x314f89);}catch(_0x4dac57){_0x2436b4(![],_0x4b0b1a(0x25c)+_0x4dac57[_0x4b0b1a(0x2df)]);}else _0x2436b4(!![],_0x4b0b1a(0x163));console[_0x4b0b1a(0x23a)](''),_0x563341?console[_0x4b0b1a(0x23a)](_0x4b0b1a(0x2d5)):(console['log']('\x20\x20Some\x20checks\x20failed.\x0a'),process[_0x4b0b1a(0x2d2)](0x1));}async function _0x1c6a70(){const _0x8d2dd7=_0xdae2f6,_0x58b7b8=_0x5ae735[_0x8d2dd7(0x1e4)](_0x8d2dd7(0x290));!_0x32d4f7[_0x8d2dd7(0x16e)](_0x58b7b8)?(_0x32d4f7[_0x8d2dd7(0x182)](_0x58b7b8,JSON['stringify']({'port':0x2124,'path':_0x8d2dd7(0x27a),'logLevel':_0x8d2dd7(0x11b),'noRepl':![],'noAdmin':![]},null,0x2)+'\x0a'),console[_0x8d2dd7(0x23a)](_0x8d2dd7(0x311))):console[_0x8d2dd7(0x23a)](_0x8d2dd7(0x344));const _0x34cbe8=_0x5ae735[_0x8d2dd7(0x1e4)](_0x8d2dd7(0x27a));!_0x32d4f7[_0x8d2dd7(0x16e)](_0x34cbe8)?(_0x32d4f7['mkdirSync'](_0x34cbe8,{'recursive':!![]}),console[_0x8d2dd7(0x23a)](_0x8d2dd7(0x1dc))):console[_0x8d2dd7(0x23a)](_0x8d2dd7(0x254)),console[_0x8d2dd7(0x23a)](_0x8d2dd7(0x314));}async function _0x5e7e78(_0x1b5950){const _0xe75a1f=_0xdae2f6,_0x14611f=_0x5ae735[_0xe75a1f(0x1e4)](_0x1b5950[_0xe75a1f(0x2f3)]);if(!_0x32d4f7['existsSync'](_0x14611f)){console['log']('[okdb]\x20nothing\x20to\x20reset\x20—\x20'+_0x14611f+_0xe75a1f(0x1d6));return;}const _0xdd2b34=require$$0$2,_0x278f6b=_0xdd2b34[_0xe75a1f(0x291)]({'input':process['stdin'],'output':process[_0xe75a1f(0x1b5)]}),_0x3736a9=await new Promise(_0x3fecda=>_0x278f6b[_0xe75a1f(0x32d)]('\x0a\x20\x20Delete\x20ALL\x20data\x20in\x20'+_0x14611f+_0xe75a1f(0x35c),_0x3fecda));_0x278f6b['close'](),console['log']('');if(_0x3736a9[_0xe75a1f(0x1e6)]()[_0xe75a1f(0x288)]()!=='yes'){console[_0xe75a1f(0x23a)](_0xe75a1f(0x100));return;}_0x32d4f7[_0xe75a1f(0x2dc)](_0x14611f,{'recursive':!![],'force':!![]}),console[_0xe75a1f(0x23a)](_0xe75a1f(0x390)+_0x14611f+_0xe75a1f(0x13e));}async function _0x23c061(_0x4b3df9,_0x580c23){const _0x543be8=_0xdae2f6,_0x3db421=require$$5,_0x298f6a=_0x5ae735['resolve'](_0x580c23['dbPath']);console[_0x543be8(0x23a)](_0x543be8(0x366)+_0x298f6a+'…');const _0x14d7cb=new _0x3db421(_0x298f6a,_0x580c23[_0x543be8(0x351)]?{'encryptionKey':_0x580c23['key']}:{});await _0x14d7cb['open'](),console[_0x543be8(0x23a)](_0x543be8(0x373)+_0x4b3df9+'…');const {envs:_0xaeb60d}=await _0x14d7cb['migrate'][_0x543be8(0x396)](_0x4b3df9);for(const _0x2b4bcd of _0xaeb60d){const _0x476013=_0x2b4bcd[_0x543be8(0x2e5)]>0x0?_0x543be8(0x1ba)+(_0x2b4bcd[_0x543be8(0x2e5)]/0x400/0x400)[_0x543be8(0x305)](0x2)+_0x543be8(0x2ee)+(_0x2b4bcd[_0x543be8(0x2c0)]/0x400/0x400)[_0x543be8(0x305)](0x2)+'\x20MB)':'';console[_0x543be8(0x23a)](_0x543be8(0x306)+_0x2b4bcd[_0x543be8(0x2f4)]+_0x543be8(0x209)+_0x2b4bcd[_0x543be8(0x1d4)]+_0x476013);}await _0x14d7cb[_0x543be8(0x1c8)](),console[_0x543be8(0x23a)]('[okdb]\x20backup\x20complete');}async function _0xd89c67(_0x44379f,_0x42a48c,_0x17169e){const _0x4c289c=_0xdae2f6,_0x462060=require$$5,_0x48c8a0=_0x5ae735[_0x4c289c(0x1e4)](_0x42a48c[_0x4c289c(0x2f3)]),_0x372c22=_0x17169e['env']??'default',_0x579714=_0x17169e['types']?_0x17169e[_0x4c289c(0x30e)]['split'](',')[_0x4c289c(0x321)](_0x2e6c98=>_0x2e6c98['trim']()):null;console[_0x4c289c(0x23a)](_0x4c289c(0x366)+_0x48c8a0+'…');const _0x5a4bae=new _0x462060(_0x48c8a0,_0x42a48c[_0x4c289c(0x351)]?{'encryptionKey':_0x42a48c[_0x4c289c(0x351)]}:{});await _0x5a4bae[_0x4c289c(0x1fd)](),console[_0x4c289c(0x23a)](_0x4c289c(0x2c3)+_0x372c22+'\x22\x20→\x20'+_0x44379f+'…');const _0x41baf4=await _0x5a4bae['migrate']['exportToFile'](_0x44379f,{'envName':_0x372c22,'types':_0x579714,'includeChanges':!!_0x17169e['changes']});console['log']('[okdb]\x20exported\x20\x20types='+_0x41baf4[_0x4c289c(0x30e)]+_0x4c289c(0x3cb)+_0x41baf4[_0x4c289c(0x2b9)]+_0x4c289c(0x11d)+_0x41baf4['changes']);if(_0x17169e[_0x4c289c(0xea)]){const _0x4ea4fd=_0x5ae735['join'](_0x5ae735['dirname'](_0x44379f),_0x4c289c(0xea));process[_0x4c289c(0x1b5)][_0x4c289c(0x13a)]('[okdb]\x20exporting\x20blobs…');const {count:_0x29c4c7,bytes:_0x561b4b}=await _0x5a4bae[_0x4c289c(0x1f4)]['exportBlobs'](_0x4ea4fd);console['log'](_0x4c289c(0x383)+_0x4ea4fd+_0x4c289c(0x1ba)+_0x29c4c7+'\x20file'+(_0x29c4c7!==0x1?'s':'')+',\x20'+(_0x561b4b/0x400/0x400)[_0x4c289c(0x305)](0x2)+_0x4c289c(0x161));}await _0x5a4bae['close'](),console[_0x4c289c(0x23a)](_0x4c289c(0x3a7));}async function _0x2c79ce(_0x2c34cb,_0x4e7f79,_0x2dbb38){const _0x425d76=_0xdae2f6,_0x3b277a=require$$5,_0x371954=_0x5ae735[_0x425d76(0x1e4)](_0x4e7f79[_0x425d76(0x2f3)]),_0x2ed203=_0x2dbb38[_0x425d76(0xf8)]??null,_0x50baf8=_0x2dbb38['types']?_0x2dbb38['types']['split'](',')['map'](_0x15b888=>_0x15b888[_0x425d76(0x1e6)]()):null,_0x3cb14a=!!_0x2dbb38[_0x425d76(0x1ab)];console['log'](_0x425d76(0x366)+_0x371954+'…');const _0x22edfb=new _0x3b277a(_0x371954,_0x4e7f79[_0x425d76(0x351)]?{'encryptionKey':_0x4e7f79[_0x425d76(0x351)]}:{});await _0x22edfb['open'](),console['log']('[okdb]\x20importing\x20'+_0x2c34cb+'…');const _0x517cb1=await _0x22edfb[_0x425d76(0x1f4)][_0x425d76(0x12e)](_0x2c34cb,{'envName':_0x2ed203,'types':_0x50baf8,'dropExisting':_0x3cb14a,'includeChanges':!!_0x2dbb38['changes'],'onProgress':({type:_0x50d7be,count:_0x23a55d})=>{const _0x357d66=_0x425d76;process[_0x357d66(0x1b5)][_0x357d66(0x13a)](_0x357d66(0x2b5)+_0x50d7be+':\x20'+_0x23a55d+_0x357d66(0x324));}});process[_0x425d76(0x1b5)]['write']('\x0a'),console[_0x425d76(0x23a)](_0x425d76(0x23b)+_0x517cb1['types']+_0x425d76(0x3cb)+_0x517cb1['records']+_0x425d76(0x11d)+_0x517cb1[_0x425d76(0x12c)]);if(_0x2dbb38[_0x425d76(0xea)]){const _0x57d059=_0x5ae735['join'](_0x5ae735[_0x425d76(0x262)](_0x2c34cb),'blobs');if(_0x32d4f7['existsSync'](_0x57d059)){const {imported:_0x4ce0e7,skipped:_0x5a05eb}=await _0x22edfb['migrate']['importBlobs'](_0x57d059);console[_0x425d76(0x23a)](_0x425d76(0x2d7)+_0x4ce0e7+_0x425d76(0x260)+_0x5a05eb);}}await _0x22edfb['close'](),console[_0x425d76(0x23a)]('[okdb]\x20import\x20complete');}async function _0x1b49fe(_0x8fa6de,_0x22e742){const _0x2f490e=_0xdae2f6;_0x22e742[_0x2f490e(0x36b)]&&!_0x22e742['name']&&(console['error']('[okdb]\x20error:\x20--password\x20requires\x20--name'),process[_0x2f490e(0x2d2)](0x1));const _0x3b5dcd=_0x22e742[_0x2f490e(0x2a5)]?_0x22e742['permissions']['split'](',')['map'](_0x42352b=>_0x42352b[_0x2f490e(0x1e6)]())['filter'](Boolean):[];let _0x3c5b10={};if(_0x22e742[_0x2f490e(0x25e)])try{_0x3c5b10=JSON[_0x2f490e(0x317)](_0x22e742[_0x2f490e(0x25e)]);if(typeof _0x3c5b10!==_0x2f490e(0x23e)||Array[_0x2f490e(0x2a8)](_0x3c5b10)||_0x3c5b10===null)throw new Error();}catch{console[_0x2f490e(0x238)](_0x2f490e(0x212)),process[_0x2f490e(0x2d2)](0x1);}const _0xa3cee6=require$$5,{randomToken:_0x78f04f,hashToken:_0x5cb96a,hashPassword:_0x43745f}=requireOkdbAuthTokens(),_0x2d02f5=require$$0,_0x530e5d=_0x5ae735[_0x2f490e(0x1e4)](_0x8fa6de[_0x2f490e(0x2f3)]),_0x2fa5b1=new _0xa3cee6(_0x530e5d,_0x8fa6de['key']?{'encryptionKey':_0x8fa6de[_0x2f490e(0x351)]}:{});await _0x2fa5b1[_0x2f490e(0x1fd)]();try{await _0x2fa5b1['auth'][_0x2f490e(0x1a8)]();if(_0x22e742[_0x2f490e(0x2f4)]){const _0x205b24=await _0x2fa5b1[_0x2f490e(0x38f)][_0x2f490e(0x16b)](_0x22e742[_0x2f490e(0x2f4)]);_0x205b24&&(console['error']('[okdb]\x20error:\x20token\x20with\x20name\x20\x22'+_0x22e742[_0x2f490e(0x2f4)]+_0x2f490e(0x3a3)),process[_0x2f490e(0x2d2)](0x1));}const _0x29b101=_0x78f04f(0x20),_0x278890=_0x5cb96a(_0x29b101),_0x4d8b55=_0x22e742[_0x2f490e(0x36b)]?await _0x43745f(_0x22e742[_0x2f490e(0x36b)]):null,_0x46cb7c=_0x2d02f5[_0x2f490e(0x348)](),_0x59d9da={'tokenHash':_0x278890,'name':_0x22e742['name']||null,'passwordHash':_0x4d8b55,'label':_0x22e742['label']||null,'permissions':_0x3b5dcd,'grants':_0x3c5b10,'createdAt':Date[_0x2f490e(0x234)](),'lastUsedAt':null},_0x5358f4=_0x22e742[_0x2f490e(0x125)]?{'ttl':Number(_0x22e742[_0x2f490e(0x125)])}:undefined;await _0x2fa5b1[_0x2f490e(0x108)]['put'](_0x2f490e(0x286),_0x46cb7c,_0x59d9da,_0x5358f4),console[_0x2f490e(0x23a)](_0x2f490e(0x39b)),console[_0x2f490e(0x23a)](_0x2f490e(0x3a9)+_0x46cb7c),console[_0x2f490e(0x23a)]('\x20\x20\x20\x20name:\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x22e742['name']||_0x2f490e(0x3a4))),console[_0x2f490e(0x23a)](_0x2f490e(0x2e3)+(_0x22e742[_0x2f490e(0x37e)]||'(unset)')),console[_0x2f490e(0x23a)](_0x2f490e(0x28a)+(_0x3b5dcd[_0x2f490e(0x180)](',\x20')||_0x2f490e(0x28c))),console[_0x2f490e(0x23a)](_0x2f490e(0x295)),console[_0x2f490e(0x23a)](_0x2f490e(0x3be)+_0x29b101+'\x0a');}finally{await _0x2fa5b1[_0x2f490e(0x1c8)]();}}async function _0x1b8f74(_0x518eb3){const _0x2ff56f=_0xdae2f6,_0x4063bd=require$$5,_0x56a2c3=_0x5ae735['resolve'](_0x518eb3[_0x2ff56f(0x2f3)]),_0x19b334=new _0x4063bd(_0x56a2c3,_0x518eb3[_0x2ff56f(0x351)]?{'encryptionKey':_0x518eb3[_0x2ff56f(0x351)]}:{});await _0x19b334[_0x2ff56f(0x1fd)]();try{const _0x954ba0=_0x19b334[_0x2ff56f(0x108)];if(!_0x954ba0||!_0x954ba0[_0x2ff56f(0x201)](_0x2ff56f(0x286))){console[_0x2ff56f(0x23a)](_0x2ff56f(0x1da));return;}const _0x5f5478=[];for(const {key:_0x5e7db8,value:_0x2d721b}of _0x954ba0[_0x2ff56f(0x3c9)]('~tokens')){_0x5f5478[_0x2ff56f(0x322)]({'id':_0x5e7db8,'name':_0x2d721b['name']||_0x2ff56f(0x3a4),'label':_0x2d721b['label']||_0x2ff56f(0x3a4),'permissions':Array[_0x2ff56f(0x2a8)](_0x2d721b['permissions'])?_0x2d721b[_0x2ff56f(0x2a5)][_0x2ff56f(0x180)](','):'','created':_0x2d721b['createdAt']?new Date(_0x2d721b[_0x2ff56f(0x2fc)])['toISOString']()[_0x2ff56f(0x237)](0x0,0xa):''});}if(_0x5f5478[_0x2ff56f(0x2af)]===0x0){console[_0x2ff56f(0x23a)](_0x2ff56f(0x1da));return;}const _0x421198=!process[_0x2ff56f(0x1b5)][_0x2ff56f(0xe1)]||process['stdout'][_0x2ff56f(0xe1)]>=0x64,_0x5cb377=_0x421198?0x24:0xa,_0x4ac9a6=['ID'[_0x2ff56f(0x20c)](_0x5cb377),_0x2ff56f(0xf9)[_0x2ff56f(0x20c)](0x10),_0x2ff56f(0xdb)[_0x2ff56f(0x20c)](0x14),'PERMISSIONS'[_0x2ff56f(0x20c)](0x14),_0x2ff56f(0xee)][_0x2ff56f(0x180)]('\x20\x20');console[_0x2ff56f(0x23a)]('\x0a'+_0x4ac9a6),console[_0x2ff56f(0x23a)]('-'[_0x2ff56f(0x20e)](_0x4ac9a6[_0x2ff56f(0x2af)]));for(const _0x51888f of _0x5f5478){const _0x5d66df=_0x421198?_0x51888f['id']:_0x51888f['id'][_0x2ff56f(0x237)](0x0,0x8)+'…';console[_0x2ff56f(0x23a)]([_0x5d66df['padEnd'](_0x5cb377),_0x51888f[_0x2ff56f(0x2f4)][_0x2ff56f(0x237)](0x0,0x10)[_0x2ff56f(0x20c)](0x10),_0x51888f[_0x2ff56f(0x37e)]['slice'](0x0,0x14)[_0x2ff56f(0x20c)](0x14),_0x51888f[_0x2ff56f(0x2a5)][_0x2ff56f(0x237)](0x0,0x14)[_0x2ff56f(0x20c)](0x14),_0x51888f[_0x2ff56f(0x128)]][_0x2ff56f(0x180)]('\x20\x20'));}console[_0x2ff56f(0x23a)]('');}finally{await _0x19b334[_0x2ff56f(0x1c8)]();}}async function _0x554ca8(_0x5db507,_0xbf2b35){const _0x37a501=_0xdae2f6;!_0x5db507&&(console[_0x37a501(0x238)]('[okdb]\x20error:\x20revoke\x20requires\x20an\x20id\x20argument'),process['exit'](0x1));const _0x26c236=require$$5,_0x5d9c52=_0x5ae735[_0x37a501(0x1e4)](_0xbf2b35[_0x37a501(0x2f3)]),_0x2c4bc9=new _0x26c236(_0x5d9c52,_0xbf2b35[_0x37a501(0x351)]?{'encryptionKey':_0xbf2b35[_0x37a501(0x351)]}:{});await _0x2c4bc9[_0x37a501(0x1fd)]();try{const _0x525dfe=_0x2c4bc9[_0x37a501(0x108)];(!_0x525dfe||!_0x525dfe[_0x37a501(0x201)](_0x37a501(0x286)))&&(console[_0x37a501(0x238)]('[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22'+_0x5db507+'\x22'),process[_0x37a501(0x2d2)](0x1));let _0x299d17=null,_0x45db53=null;const _0x3b5d3f=_0x525dfe[_0x37a501(0x26f)](_0x37a501(0x286),_0x5db507);if(_0x3b5d3f)_0x299d17=_0x5db507,_0x45db53=_0x3b5d3f;else{const _0x45745f=[];for(const {key:_0x4ea747,value:_0x31e31b}of _0x525dfe[_0x37a501(0x3c9)]('~tokens')){if(_0x4ea747[_0x37a501(0x193)](_0x5db507))_0x45745f[_0x37a501(0x322)]({'key':_0x4ea747,'value':_0x31e31b});}_0x45745f['length']===0x0&&(console['error'](_0x37a501(0x147)+_0x5db507+'\x22'),process[_0x37a501(0x2d2)](0x1));if(_0x45745f['length']>0x1){console['error']('[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22'+_0x5db507+_0x37a501(0x25f)+_0x45745f[_0x37a501(0x2af)]+_0x37a501(0x255));for(const _0x4d83d3 of _0x45745f){console['error']('\x20\x20'+_0x4d83d3['key']+_0x37a501(0x280)+(_0x4d83d3[_0x37a501(0x32a)][_0x37a501(0x2f4)]||'(unset)')+')');}process[_0x37a501(0x2d2)](0x1);}_0x299d17=_0x45745f[0x0][_0x37a501(0x351)],_0x45db53=_0x45745f[0x0][_0x37a501(0x32a)];}await _0x525dfe['remove'](_0x37a501(0x286),_0x299d17),console[_0x37a501(0x23a)](_0x37a501(0x175)+_0x299d17+'\x20\x20(name:\x20'+(_0x45db53[_0x37a501(0x2f4)]||'(unset)')+',\x20label:\x20'+(_0x45db53[_0x37a501(0x37e)]||'(unset)')+')');}finally{await _0x2c4bc9[_0x37a501(0x1c8)]();}}function _0x4876be(_0x7efe00,_0x419267){const _0x6b4bf2=_0xdae2f6;if(!_0x7efe00['activation'])return _0x6b4bf2(0x3c2);const _0x31ce7b=_0x7efe00['expiresAt'];if(!_0x31ce7b)return _0x6b4bf2(0x3c4);if(_0x419267>_0x31ce7b)return _0x6b4bf2(0x28d);return _0x6b4bf2(0x3c4);}function _0x5bcda1(_0x1107a8){const _0x32c766=_0xdae2f6;if(!_0x1107a8||typeof _0x1107a8!==_0x32c766(0x23e))return'';const _0x55b810=Object[_0x32c766(0x148)](_0x1107a8)[_0x32c766(0x36d)](([,_0x11509a])=>_0x11509a)[_0x32c766(0x321)](([_0x365685])=>_0x365685);if(_0x55b810[_0x32c766(0x2af)]===0x0)return _0x32c766(0x28c);if(_0x55b810['length']<=0x3)return _0x55b810[_0x32c766(0x180)]('\x20');return _0x55b810[_0x32c766(0x237)](0x0,0x3)[_0x32c766(0x180)]('\x20')+('\x20+'+(_0x55b810['length']-0x3));}async function _0x29d2a2(_0x39e01e){const _0x18592d=_0xdae2f6,_0x5cd94c=require$$5,_0x4272dd=requireOkdbLicenseCodec(),{_C:_0x48d186}=requireOkdbLicense(),_0x5f2454=_0x5ae735[_0x18592d(0x1e4)](_0x39e01e[_0x18592d(0x2f3)]),_0x4a1287=new _0x5cd94c(_0x5f2454,_0x39e01e['key']?{'encryptionKey':_0x39e01e[_0x18592d(0x351)]}:{});await _0x4a1287[_0x18592d(0x1fd)]();try{const _0xd30f38=_0x4a1287[_0x18592d(0x108)],_0x1468be=_0xd30f38?.['db']?.[_0x18592d(0x26f)]?.('__writeCounter')??0x0,_0x59fc84=[..._0x4a1287['_envs'][_0x18592d(0x1d1)]()]['filter'](_0x503205=>!_0x503205['startsWith']('~'))[_0x18592d(0x2af)],_0x3825d0=_0x4a1287[_0x18592d(0x3b3)]?.[_0x18592d(0x357)];if(_0x3825d0){const _0x1af31d=_0x3825d0[_0x18592d(0x310)]===!![],_0x4f2856=_0x1af31d?'free\x20tier':_0x4a1287[_0x18592d(0x3b3)][_0x18592d(0x3c4)]?.[_0x18592d(0x346)]||_0x18592d(0x38b);console[_0x18592d(0x23a)](''),console[_0x18592d(0x23a)]('\x20\x20Tier:\x20\x20\x20\x20'+_0x4f2856);const _0x1751e6=_0x3825d0[_0x18592d(0x23c)]||{};if(_0x1751e6[_0x18592d(0x2d3)]){const _0x311539=Math[_0x18592d(0x2cb)](_0x1468be/_0x1751e6['maxWrites']*0x64);console[_0x18592d(0x23a)]('\x20\x20Writes:\x20\x20'+_0x1468be[_0x18592d(0x29e)]()+'\x20/\x20'+_0x1751e6[_0x18592d(0x2d3)]['toLocaleString']()+_0x18592d(0x1ba)+_0x311539+'%)');}else console[_0x18592d(0x23a)](_0x18592d(0x285)+_0x1468be[_0x18592d(0x29e)]());_0x1751e6['envs']?console[_0x18592d(0x23a)](_0x18592d(0x197)+_0x59fc84+_0x18592d(0x1e8)+_0x1751e6[_0x18592d(0x20d)]):console[_0x18592d(0x23a)](_0x18592d(0x197)+_0x59fc84),_0x48d186?.[_0x18592d(0x33f)]&&console[_0x18592d(0x23a)]('\x20\x20Build:\x20\x20\x20key\x20fingerprint\x20'+_0x48d186['PUB_FINGERPRINT']+_0x18592d(0xd4));}if(!_0xd30f38||!_0xd30f38[_0x18592d(0x201)]('~licenses')){console[_0x18592d(0x23a)](''),console[_0x18592d(0x23a)](_0x18592d(0x3a1)),console[_0x18592d(0x23a)]('');return;}const _0x27052c=[],_0x154041=Date[_0x18592d(0x234)](),_0x1f00da=_0x4a1287['id'],_0x588b66=_0x18592d(0x1b7);for(const {key:_0x7cb95f,value:_0x3c9523}of _0xd30f38[_0x18592d(0x3c9)](_0x18592d(0x2e0))){const _0x4f0b6f=_0x3c9523[_0x18592d(0x359)]?Buffer[_0x18592d(0x264)](_0x3c9523['_licenseHash'],_0x18592d(0x2b8)):Buffer[_0x18592d(0x1fc)](0x8);let _0x294dbf='';try{_0x294dbf=_0x4272dd[_0x18592d(0x37c)](_0x1f00da,_0x4f0b6f,_0x588b66)[_0x18592d(0x398)];}catch{}_0x27052c[_0x18592d(0x322)]({'id':_0x7cb95f,'licensee':_0x3c9523[_0x18592d(0x346)]||'','expires':_0x3c9523[_0x18592d(0x240)]?new Date(_0x3c9523['expiresAt'])[_0x18592d(0x387)]()[_0x18592d(0x237)](0x0,0xa):'','features':_0x5bcda1(_0x3c9523[_0x18592d(0x1ed)]),'pin':_0x294dbf,'status':_0x4876be(_0x3c9523,_0x154041)});}if(_0x27052c[_0x18592d(0x2af)]===0x0){console['log'](''),console[_0x18592d(0x23a)](_0x18592d(0x3a1)),console[_0x18592d(0x23a)]('');return;}const _0x48ed43=['\x20\x20'+'ID'[_0x18592d(0x20c)](0xe),'LICENSEE'[_0x18592d(0x20c)](0xe),_0x18592d(0x107)['padEnd'](0xc),_0x18592d(0x20b)[_0x18592d(0x20c)](0x1e),_0x18592d(0x1dd)[_0x18592d(0x20c)](0xa),'STATUS'][_0x18592d(0x180)]('\x20');console[_0x18592d(0x23a)]('\x0a'+_0x48ed43);for(const _0x110bce of _0x27052c){const _0x382c0f=_0x110bce['id']['slice'](0x0,0x8)+'…';console[_0x18592d(0x23a)](['\x20\x20'+_0x382c0f[_0x18592d(0x20c)](0xe),_0x110bce['licensee']['slice'](0x0,0xe)['padEnd'](0xe),_0x110bce['expires']['padEnd'](0xc),_0x110bce['features'][_0x18592d(0x237)](0x0,0x1e)[_0x18592d(0x20c)](0x1e),_0x110bce[_0x18592d(0x398)][_0x18592d(0x20c)](0xa),_0x110bce[_0x18592d(0x29f)]][_0x18592d(0x180)]('\x20'));}console[_0x18592d(0x23a)]('');}finally{await _0x4a1287[_0x18592d(0x1c8)]();}}async function _0x29a414(_0x588570,_0x55efa0){const _0x2e49d4=_0xdae2f6,_0x14e107=require$$5,_0x59a71b=requireOkdbLicenseCodec();let _0x5d679e=_0x588570;(_0x59a71b['detectInputType'](_0x588570)===_0x2e49d4(0x176)||_0x32d4f7[_0x2e49d4(0x16e)](_0x588570)&&_0x32d4f7[_0x2e49d4(0x1d2)](_0x588570)['isFile']())&&(_0x5d679e=_0x32d4f7['readFileSync'](_0x588570,_0x2e49d4(0x1f6))[_0x2e49d4(0x1e6)]());const _0x2bc5ab=_0x5ae735[_0x2e49d4(0x1e4)](_0x55efa0[_0x2e49d4(0x2f3)]),_0x200e97=new _0x14e107(_0x2bc5ab,_0x55efa0[_0x2e49d4(0x351)]?{'encryptionKey':_0x55efa0[_0x2e49d4(0x351)]}:{});await _0x200e97[_0x2e49d4(0x1fd)]();try{!_0x200e97[_0x2e49d4(0x3b3)]&&(console[_0x2e49d4(0x238)](_0x2e49d4(0x223)),process[_0x2e49d4(0x2d2)](0x1));let _0x2d8ec2;try{_0x2d8ec2=await _0x200e97[_0x2e49d4(0x3b3)][_0x2e49d4(0xd6)](_0x5d679e);}catch(_0x12cce2){console[_0x2e49d4(0x238)](_0x2e49d4(0x1c2)+_0x12cce2[_0x2e49d4(0x2df)]),process['exit'](0x1);}const _0x3b3515=_0x200e97[_0x2e49d4(0x3b3)][_0x2e49d4(0x103)](),_0x1e4aa6=_0x3b3515[_0x2e49d4(0x123)](_0x15957f=>_0x15957f[_0x2e49d4(0x2a0)]===_0x2d8ec2['id'])?.[_0x2e49d4(0x398)]||'',_0x921b7a=Object[_0x2e49d4(0x148)](_0x2d8ec2[_0x2e49d4(0x1ed)]||{})[_0x2e49d4(0x36d)](([,_0x978700])=>_0x978700)[_0x2e49d4(0x321)](([_0x1c2b7a])=>_0x1c2b7a),_0x2d9a71=_0x2d8ec2[_0x2e49d4(0x23c)]||{},_0x49b3d3=[_0x2d9a71[_0x2e49d4(0x20d)]?_0x2e49d4(0x33e)+_0x2d9a71['envs']:null,_0x2d9a71[_0x2e49d4(0xd2)]?'types/env='+_0x2d9a71[_0x2e49d4(0xd2)]:null,_0x2d9a71[_0x2e49d4(0x253)]?_0x2e49d4(0x2f5)+_0x2d9a71[_0x2e49d4(0x253)]:null,_0x2d9a71['maxWrites']?_0x2e49d4(0x2b0)+_0x2d9a71['maxWrites']['toLocaleString']():null]['filter'](Boolean)[_0x2e49d4(0x180)]('\x20\x20'),_0x568981=_0x2d8ec2[_0x2e49d4(0x154)]===_0x59a71b[_0x2e49d4(0x19b)];console['log']('\x0a\x20\x20✓\x20License\x20added'),console[_0x2e49d4(0x23a)]('\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x2d8ec2['id']),console['log'](_0x2e49d4(0x259)+_0x2d8ec2[_0x2e49d4(0x346)]),console[_0x2e49d4(0x23a)](_0x2e49d4(0x273)+new Date(_0x2d8ec2['expiresAt'])[_0x2e49d4(0x387)]()[_0x2e49d4(0x237)](0x0,0xa)),console[_0x2e49d4(0x23a)](_0x2e49d4(0x308)+(_0x921b7a[_0x2e49d4(0x180)](',\x20')||_0x2e49d4(0x28c)));if(_0x49b3d3)console[_0x2e49d4(0x23a)](_0x2e49d4(0x1f3)+_0x49b3d3);_0x568981?(console[_0x2e49d4(0x23a)]('\x20\x20\x20\x20status:\x20\x20\x20\x20active\x20\x20(open\x20license\x20—\x20no\x20activation\x20needed)'),console[_0x2e49d4(0x23a)]('')):(console[_0x2e49d4(0x23a)](_0x2e49d4(0xe6)+_0x1e4aa6),console['log'](_0x2e49d4(0x1aa)),console['log'](''),console[_0x2e49d4(0x23a)](_0x2e49d4(0x2b2)),console[_0x2e49d4(0x23a)](_0x2e49d4(0x133)+_0x1e4aa6+_0x2e49d4(0x1fe)),console['log'](_0x2e49d4(0x2c4)),console[_0x2e49d4(0x23a)](_0x2e49d4(0x1a3)),console[_0x2e49d4(0x23a)](''));}finally{await _0x200e97[_0x2e49d4(0x1c8)]();}}async function _0x3204f6(_0x3cb3ad,_0x209d5f){const _0xe6b69d=_0xdae2f6,_0x3eb832=require$$5,_0x8d55d4=_0x5ae735[_0xe6b69d(0x1e4)](_0x209d5f[_0xe6b69d(0x2f3)]),_0x42bce8=new _0x3eb832(_0x8d55d4,_0x209d5f[_0xe6b69d(0x351)]?{'encryptionKey':_0x209d5f[_0xe6b69d(0x351)]}:{});await _0x42bce8['open']();try{!_0x42bce8['_license']&&(console[_0xe6b69d(0x238)](_0xe6b69d(0x223)),process['exit'](0x1));let _0x22709d;try{_0x22709d=await _0x42bce8['_license']['activateLicense'](_0x3cb3ad['trim']());}catch(_0x3189b0){console[_0xe6b69d(0x238)](_0xe6b69d(0x1c2)+_0x3189b0[_0xe6b69d(0x2df)]),console[_0xe6b69d(0x238)](''),console[_0xe6b69d(0x238)](_0xe6b69d(0x274)),console[_0xe6b69d(0x238)]('\x20\x20\x20\x20-\x20The\x20license\x20blob\x20has\x20not\x20been\x20added\x20yet\x20—\x20run\x20`okdb\x20license\x20<blob>`\x20first.'),console[_0xe6b69d(0x238)](_0xe6b69d(0x266)),console['error']('\x20\x20\x20\x20-\x20The\x20activation\x20token\x20has\x20expired\x20—\x20request\x20a\x20fresh\x20one.'),console[_0xe6b69d(0x238)](''),process[_0xe6b69d(0x2d2)](0x1);}console['log'](_0xe6b69d(0x174)),console[_0xe6b69d(0x23a)](_0xe6b69d(0x3a6)+_0x22709d['id']),console[_0xe6b69d(0x23a)]('\x20\x20\x20\x20licensee:\x20\x20'+_0x22709d['licensee']),console[_0xe6b69d(0x23a)](_0xe6b69d(0x273)+new Date(_0x22709d[_0xe6b69d(0x240)])[_0xe6b69d(0x387)]()[_0xe6b69d(0x237)](0x0,0xa)),console['log']('\x20\x20\x20\x20status:\x20\x20\x20\x20active'),console['log']('');}finally{await _0x42bce8[_0xe6b69d(0x1c8)]();}}async function _0x1761e1(_0x1579c3,_0x2a78c2){const _0x3c422d=_0xdae2f6;!_0x1579c3&&(console[_0x3c422d(0x238)](_0x3c422d(0x35e)),process[_0x3c422d(0x2d2)](0x1));const _0x3dfabb=require$$5,_0x14096e=requireOkdbLicenseCodec(),_0x3442ec=_0x5ae735[_0x3c422d(0x1e4)](_0x2a78c2['dbPath']),_0x3aacca=new _0x3dfabb(_0x3442ec,_0x2a78c2[_0x3c422d(0x351)]?{'encryptionKey':_0x2a78c2['key']}:{});await _0x3aacca[_0x3c422d(0x1fd)]();try{const _0x13d11e=_0x3aacca['_systemEnv'];(!_0x13d11e||!_0x13d11e[_0x3c422d(0x201)](_0x3c422d(0x2e0)))&&(console['error'](_0x3c422d(0x129)+_0x1579c3+'\x22'),process['exit'](0x1));let _0x1ea1d=null,_0x28f2e1=null;const _0x28b49c=_0x13d11e[_0x3c422d(0x26f)](_0x3c422d(0x2e0),_0x1579c3);if(_0x28b49c)_0x1ea1d=_0x1579c3,_0x28f2e1=_0x28b49c;else{const _0x13a666=[];for(const {key:_0x50b4c7,value:_0x3e8552}of _0x13d11e['getRange'](_0x3c422d(0x2e0))){if(_0x50b4c7[_0x3c422d(0x193)](_0x1579c3))_0x13a666[_0x3c422d(0x322)]({'key':_0x50b4c7,'value':_0x3e8552});}_0x13a666[_0x3c422d(0x2af)]===0x0&&(console[_0x3c422d(0x238)](_0x3c422d(0x129)+_0x1579c3+'\x22'),process[_0x3c422d(0x2d2)](0x1)),_0x13a666[_0x3c422d(0x2af)]>0x1&&(console['error'](_0x3c422d(0x1e1)+_0x1579c3+'\x22\x20matches\x20'+_0x13a666[_0x3c422d(0x2af)]+_0x3c422d(0x268)),process[_0x3c422d(0x2d2)](0x1)),_0x1ea1d=_0x13a666[0x0][_0x3c422d(0x351)],_0x28f2e1=_0x13a666[0x0][_0x3c422d(0x32a)];}const _0x5b8b0e=Date[_0x3c422d(0x234)](),_0x1b0d10=_0x4876be(_0x28f2e1,_0x5b8b0e),_0x12f0a6=_0x3aacca['id'],_0x2c655c=_0x3c422d(0x1b7);let _0x2c180d='';try{const _0x2321a4=Buffer[_0x3c422d(0x264)](_0x28f2e1['_licenseHash'],_0x3c422d(0x2b8));_0x2c180d=_0x14096e[_0x3c422d(0x37c)](_0x12f0a6,_0x2321a4,_0x2c655c)[_0x3c422d(0x398)];}catch{}const _0x5a873a=_0x28f2e1[_0x3c422d(0x1ed)]?Object[_0x3c422d(0x148)](_0x28f2e1[_0x3c422d(0x1ed)])['filter'](([,_0x3af009])=>_0x3af009)[_0x3c422d(0x321)](([_0x73c51b])=>_0x73c51b):[],_0x38ed6d=_0x28f2e1[_0x3c422d(0x23c)]||{},_0x2f2023=_0x13d11e?.['db']?.[_0x3c422d(0x26f)]?.(_0x3c422d(0x316))??0x0,_0x2671fb=[..._0x3aacca['_envs'][_0x3c422d(0x1d1)]()][_0x3c422d(0x36d)](_0x26022f=>!_0x26022f[_0x3c422d(0x193)]('~'))['length'];console[_0x3c422d(0x23a)](_0x3c422d(0x2c6)),console[_0x3c422d(0x23a)](_0x3c422d(0x3a6)+_0x1ea1d),console['log']('\x20\x20\x20\x20licensee:\x20\x20'+(_0x28f2e1['licensee']||'')),console[_0x3c422d(0x23a)](_0x3c422d(0x273)+(_0x28f2e1[_0x3c422d(0x240)]?new Date(_0x28f2e1[_0x3c422d(0x240)])['toISOString']()[_0x3c422d(0x237)](0x0,0xa):'')),console[_0x3c422d(0x23a)](_0x3c422d(0x308)+(_0x5a873a[_0x3c422d(0x180)](',\x20')||_0x3c422d(0x28c))),console['log'](_0x3c422d(0xe6)+_0x2c180d),console['log'](_0x3c422d(0x265)+_0x1b0d10),console[_0x3c422d(0x23a)](_0x3c422d(0x120)+new Date(_0x28f2e1['addedAt'])['toISOString']());if(_0x1b0d10===_0x3c422d(0x3c4)){console[_0x3c422d(0x23a)](''),console[_0x3c422d(0x23a)]('\x20\x20Usage:');if(_0x38ed6d['maxWrites']){const _0x330308=Math[_0x3c422d(0x2cb)](_0x2f2023/_0x38ed6d[_0x3c422d(0x2d3)]*0x64);console[_0x3c422d(0x23a)]('\x20\x20\x20\x20writes:\x20\x20\x20\x20'+_0x2f2023[_0x3c422d(0x29e)]()+_0x3c422d(0x1e8)+_0x38ed6d[_0x3c422d(0x2d3)][_0x3c422d(0x29e)]()+_0x3c422d(0x1ba)+_0x330308+'%)');}else console[_0x3c422d(0x23a)](_0x3c422d(0x165)+_0x2f2023[_0x3c422d(0x29e)]()+'\x20\x20(unlimited)');_0x38ed6d[_0x3c422d(0x20d)]?console[_0x3c422d(0x23a)](_0x3c422d(0x22f)+_0x2671fb+_0x3c422d(0x1e8)+_0x38ed6d[_0x3c422d(0x20d)]):console[_0x3c422d(0x23a)](_0x3c422d(0x22f)+_0x2671fb+_0x3c422d(0x20a));}console[_0x3c422d(0x23a)]('');}finally{await _0x3aacca[_0x3c422d(0x1c8)]();}}async function _0x6aac2b(_0x170ac8,_0x543a12){const _0x2290a5=_0xdae2f6;!_0x170ac8&&(console['error'](_0x2290a5(0x172)),process['exit'](0x1));const _0x4e8400=require$$5,_0x3f3a83=_0x5ae735['resolve'](_0x543a12[_0x2290a5(0x2f3)]),_0x40c487=new _0x4e8400(_0x3f3a83,_0x543a12[_0x2290a5(0x351)]?{'encryptionKey':_0x543a12['key']}:{});await _0x40c487['open']();try{const _0x279604=_0x40c487[_0x2290a5(0x108)];(!_0x279604||!_0x279604[_0x2290a5(0x201)]('~licenses'))&&(console[_0x2290a5(0x238)](_0x2290a5(0x129)+_0x170ac8+'\x22'),process[_0x2290a5(0x2d2)](0x1));let _0x1cd0f3=null,_0x3623eb=null;const _0x25b248=_0x279604[_0x2290a5(0x26f)](_0x2290a5(0x2e0),_0x170ac8);if(_0x25b248)_0x1cd0f3=_0x170ac8,_0x3623eb=_0x25b248;else{const _0x895620=[];for(const {key:_0x22597f,value:_0x8037e1}of _0x279604[_0x2290a5(0x3c9)]('~licenses')){if(_0x22597f['startsWith'](_0x170ac8))_0x895620[_0x2290a5(0x322)]({'key':_0x22597f,'value':_0x8037e1});}_0x895620[_0x2290a5(0x2af)]===0x0&&(console['error'](_0x2290a5(0x129)+_0x170ac8+'\x22'),process[_0x2290a5(0x2d2)](0x1)),_0x895620[_0x2290a5(0x2af)]>0x1&&(console[_0x2290a5(0x238)](_0x2290a5(0x1e1)+_0x170ac8+_0x2290a5(0x25f)+_0x895620['length']+_0x2290a5(0x268)),process[_0x2290a5(0x2d2)](0x1)),_0x1cd0f3=_0x895620[0x0][_0x2290a5(0x351)],_0x3623eb=_0x895620[0x0]['value'];}await _0x279604[_0x2290a5(0x2b1)](_0x2290a5(0x2e0),_0x1cd0f3),console[_0x2290a5(0x23a)](_0x2290a5(0x3b6)+_0x1cd0f3+'\x20\x20(licensee:\x20'+(_0x3623eb[_0x2290a5(0x346)]||_0x2290a5(0x3a4))+')');}finally{await _0x40c487['close']();}}async function _0x269bd3(_0x3ba02d,_0x5a731d,_0x3a552a){const _0x3834de=_0xdae2f6;!_0x3ba02d&&(console[_0x3834de(0x238)](_0x3834de(0x297)),process[_0x3834de(0x2d2)](0x1));!_0x3a552a[_0x3834de(0x37d)]&&!(_0x3a552a[_0x3834de(0x144)]&&_0x3a552a[_0x3834de(0x36b)])&&(console['error']('[okdb]\x20error:\x20join\x20requires\x20credentials.\x20Provide\x20--token\x20<t>\x20or\x20--username\x20<u>\x20--password\x20<p>'),process['exit'](0x1));const _0x53c299=_0x3a552a[_0x3834de(0x21c)]||_0x5a731d[_0x3834de(0x337)]?.[_0x3834de(0x13b)];!_0x53c299&&(console['error']('[okdb]\x20error:\x20--address\x20is\x20required\x20for\x20join\x20(this\x20node\x27s\x20reachable\x20sync\x20address).\x0a'+_0x3834de(0x142)+'\x20\x20Or\x20set\x20sync.address\x20in\x20.kdbconfig'),process[_0x3834de(0x2d2)](0x1));const _0x58adf7=require$$5,_0x1caaf6=new _0x58adf7(_0x5a731d['dbPath'],{'sync':{'address':_0x53c299,'auto_reconcile':![]}});await _0x1caaf6['open']();try{const _0x38bef7=_0x1caaf6[_0x3834de(0x108)];if(_0x38bef7&&_0x38bef7['hasType'](_0x3834de(0x286))){let _0x384766=![];for(const _0x32faee of _0x38bef7['getRange']('~tokens')){_0x384766=!![];break;}_0x384766&&console[_0x3834de(0x23a)](_0x3834de(0x1e3)+_0x3834de(0x1b1));}console[_0x3834de(0x23a)](_0x3834de(0x26d)+_0x3ba02d+'…'),await _0x1caaf6[_0x3834de(0x337)][_0x3834de(0x180)](_0x3ba02d['replace'](/\/+$/,''),{'token':_0x3a552a[_0x3834de(0x37d)],'username':_0x3a552a['username'],'password':_0x3a552a['password']}),console[_0x3834de(0x23a)]('\x20\x20✓\x20joined\x20and\x20reconciliation\x20initiated'),console[_0x3834de(0x23a)](_0x3834de(0x2f6));}finally{await _0x1caaf6[_0x3834de(0x1c8)]();}}async function _0x875669(){const _0x44c305=_0xdae2f6,_0x55b289=Date[_0x44c305(0x234)](),_0x284f49=_0x305ebb(process[_0x44c305(0x230)]),_0x5c4582=_0x47b6be(_0x284f49),_0x5ea132=_0x5ae735[_0x44c305(0x1e4)](_0x5c4582[_0x44c305(0x2f3)]);!_0x5c4582[_0x44c305(0x287)]&&!process['stdin'][_0x44c305(0x33b)]&&(_0x5c4582[_0x44c305(0x287)]=!![]);const _0x1fe929=require$$5,{start:_0x43c0fb,colorLog:_0x1d7eb9}=requireOkdbShell(),_0x4b0663={..._0x5c4582[_0x44c305(0x351)]?{'encryptionKey':_0x5c4582[_0x44c305(0x351)]}:{},..._0x5c4582[_0x44c305(0x1ec)]?{'admin':![]}:_0x4958ad(_0x5c4582[_0x44c305(0x25b)])?{'admin':_0x5c4582[_0x44c305(0x25b)]}:{},..._0x4958ad(_0x5c4582[_0x44c305(0x224)])?{'api':_0x5c4582[_0x44c305(0x224)]}:{},..._0x4958ad(_0x5c4582[_0x44c305(0x38f)])?{'auth':_0x5c4582[_0x44c305(0x38f)]}:{},..._0x4958ad(_0x5c4582[_0x44c305(0x261)])?{'mcp':_0x5c4582['mcp']}:{},..._0x5c4582[_0x44c305(0x2ed)]!==![]?{'timeMachine':_0x5c4582[_0x44c305(0x2ed)]}:{}},_0x544854=new _0x1fe929(_0x5ea132,_0x4b0663);_0x544854[_0x44c305(0x23a)][_0x44c305(0x315)]?.();const _0x172296=_0x544854[_0x44c305(0x23a)][_0x44c305(0x1cc)](_0x735893=>_0x1d7eb9(_0x735893,_0x5c4582[_0x44c305(0x102)]));if(_0x5c4582[_0x44c305(0x287)])process[_0x44c305(0x1b5)][_0x44c305(0x13a)](_0x44c305(0x113));await _0x544854[_0x44c305(0x1fd)]();if(_0x5c4582[_0x44c305(0x287)])process['stdout'][_0x44c305(0x13a)](_0x44c305(0xef));try{await _0x31eb3f(_0x544854,_0x5c4582[_0x44c305(0x2bf)]);}catch(_0x390692){_0x390692[_0x44c305(0x381)]===_0x44c305(0x20f)&&(console[_0x44c305(0x238)](_0x44c305(0x3af)+_0x5c4582[_0x44c305(0x2bf)]+_0x44c305(0x340)),process[_0x44c305(0x2d2)](0x1));throw _0x390692;}if(_0x5c4582[_0x44c305(0x287)])process[_0x44c305(0x1b5)]['write'](_0x44c305(0x14b)+_0x5c4582[_0x44c305(0x2bf)]+'\x0a');if(!_0x5c4582[_0x44c305(0x287)])_0x544854[_0x44c305(0x23a)][_0x44c305(0x315)]?.(),_0x172296?.(),_0x3e8948(_0x544854[_0x44c305(0x38f)]?.[_0x44c305(0x17c)]?.()??[]),await _0x43c0fb(_0x544854,_0x5c4582);else{const _0x433667=_0x5ae735[_0x44c305(0x180)](_0x5ea132,'okdb.pid');try{_0x32d4f7[_0x44c305(0x182)](_0x433667,String(process[_0x44c305(0x3c5)]));}catch{}const _0x25040e=Date['now']()-_0x55b289;console['log'](''),console['log']('\x20\x20✓\x20OKDB\x20server\x20running'),console[_0x44c305(0x23a)](_0x44c305(0x2da)+_0x5c4582[_0x44c305(0x2bf)]),console[_0x44c305(0x23a)](_0x44c305(0x342)+_0x5ea132),console[_0x44c305(0x23a)](_0x44c305(0x1db)+_0x544854['id']);{const _0x4519f2=_0x544854['_systemEnv']?.['db']?.[_0x44c305(0x26f)]?.(_0x44c305(0x316))??0x0,_0x54e0ae=[..._0x544854[_0x44c305(0x1af)][_0x44c305(0x1d1)]()][_0x44c305(0x36d)](_0x49991d=>!_0x49991d[_0x44c305(0x193)]('~'))['length'];if(_0x544854[_0x44c305(0x3b3)]?.[_0x44c305(0x3c4)]?.[_0x44c305(0x154)]===0x1){const _0x14ebb5=Math[_0x44c305(0x275)]((_0x544854[_0x44c305(0x3b3)][_0x44c305(0x3c4)][_0x44c305(0x240)]-Date['now']())/0x5265c00);console[_0x44c305(0x23a)](_0x44c305(0x149)+_0x544854[_0x44c305(0x3b3)][_0x44c305(0x3c4)][_0x44c305(0x346)]+_0x44c305(0x244)+_0x14ebb5+_0x44c305(0x177));}else{if(_0x544854[_0x44c305(0x3b3)]?.[_0x44c305(0x3c4)]){const _0x37ffed=_0x544854[_0x44c305(0x3b3)][_0x44c305(0x3c4)];console[_0x44c305(0x23a)]('\x20\x20\x20\x20license:\x20'+_0x37ffed['licensee']+_0x44c305(0x307)+new Date(_0x37ffed['expiresAt'])[_0x44c305(0x387)]()[_0x44c305(0x237)](0x0,0xa)+')');const _0x58be04=_0x37ffed[_0x44c305(0x23c)]||{};if(_0x58be04[_0x44c305(0x2d3)]){const _0x4e1fc5=Math[_0x44c305(0x2cb)](_0x4519f2/_0x58be04['maxWrites']*0x64);console[_0x44c305(0x23a)](_0x44c305(0x1b8)+_0x4519f2[_0x44c305(0x29e)]()+_0x44c305(0x1e8)+_0x58be04[_0x44c305(0x2d3)][_0x44c305(0x29e)]()+_0x44c305(0x21f)+_0x4e1fc5+_0x44c305(0x3cf)+_0x54e0ae+(_0x58be04[_0x44c305(0x20d)]?'/'+_0x58be04[_0x44c305(0x20d)]:'')+'\x20env'+(_0x54e0ae===0x1?'':'s'));}}else{if(_0x544854[_0x44c305(0x3b3)]){const _0x4d18fd=_0x544854['_license']['getPins'](),_0x54d2db=_0x4d18fd[_0x44c305(0x2af)]?_0x4d18fd['map'](_0x1963e9=>_0x1963e9[_0x44c305(0x398)])[_0x44c305(0x180)](',\x20'):_0x44c305(0x3bb),_0x3c838d=_0x544854[_0x44c305(0x3b3)][_0x44c305(0x357)],_0x1c987a=_0x3c838d[_0x44c305(0x23c)]['maxWrites']?Math['round'](_0x4519f2/_0x3c838d[_0x44c305(0x23c)][_0x44c305(0x2d3)]*0x64):0x0;console[_0x44c305(0x23a)](_0x44c305(0x336)),console[_0x44c305(0x23a)](_0x44c305(0x1b8)+_0x4519f2[_0x44c305(0x29e)]()+_0x44c305(0x1e8)+_0x3c838d['limits'][_0x44c305(0x2d3)][_0x44c305(0x29e)]()+_0x44c305(0x21f)+_0x1c987a+_0x44c305(0x3cf)+_0x54e0ae+'\x20/\x20'+_0x3c838d[_0x44c305(0x23c)][_0x44c305(0x20d)]+'\x20envs'),console[_0x44c305(0x23a)](_0x44c305(0x313)+_0x54d2db);}}}}console['log'](_0x44c305(0x18d)+_0x5c4582[_0x44c305(0x2bf)]+'/api');!_0x5c4582[_0x44c305(0x1ec)]&&console[_0x44c305(0x23a)]('\x20\x20\x20\x20admin:\x20http://localhost:'+_0x5c4582[_0x44c305(0x2bf)]+_0x44c305(0x137));console[_0x44c305(0x23a)](''),console['log'](_0x44c305(0x1d5)+_0x25040e+'ms'),_0x3e8948(_0x544854[_0x44c305(0x38f)]?.['getSecurityNotices']?.()??[]);let _0x4aa7c0=![];async function _0x387bc7(_0x28882b){const _0x5838d7=_0x44c305;_0x4aa7c0&&(process[_0x5838d7(0x1b9)][_0x5838d7(0x13a)](_0x5838d7(0xfc)),process[_0x5838d7(0x2d2)](0x82));_0x4aa7c0=!![],process[_0x5838d7(0x1b9)][_0x5838d7(0x13a)](_0x5838d7(0x2fe)+(_0x28882b||_0x5838d7(0x1be))+',\x20closing…\x0a');const _0x1cef87=setTimeout(()=>{const _0x5488f8=_0x5838d7;process['stderr'][_0x5488f8(0x13a)](_0x5488f8(0x15f)),process['exit'](0x1);},0x1388);try{_0x32d4f7[_0x5838d7(0x200)](_0x433667);}catch{}try{await _0x544854[_0x5838d7(0x1c8)]();}catch(_0x59dcfb){process[_0x5838d7(0x1b9)][_0x5838d7(0x13a)](_0x5838d7(0x215)+(_0x59dcfb?.[_0x5838d7(0x2df)]??_0x59dcfb)+'\x0a');}clearTimeout(_0x1cef87),process[_0x5838d7(0x1b9)][_0x5838d7(0x13a)](_0x5838d7(0x18f)),process[_0x5838d7(0x2d2)](0x0);}process['on'](_0x44c305(0x1e0),()=>_0x387bc7(_0x44c305(0x1e0))),process['on'](_0x44c305(0x160),()=>_0x387bc7('SIGTERM')),process['on'](_0x44c305(0x242),()=>_0x387bc7(_0x44c305(0x242)));}}const _0x412111=new Set(['version',_0xdae2f6(0xeb),'init',_0xdae2f6(0x396),_0xdae2f6(0x2cf),'import',_0xdae2f6(0x3bd),_0xdae2f6(0x37d),_0xdae2f6(0x180),_0xdae2f6(0x329)]),_0x2aac74=process[_0xdae2f6(0x230)][0x2];if(_0x2aac74===_0xdae2f6(0x382))console[_0xdae2f6(0x23a)](require$$2['version']),process[_0xdae2f6(0x2d2)](0x0);else{if(_0x2aac74&&_0x412111[_0xdae2f6(0x17d)](_0x2aac74)){const _0x437395=process[_0xdae2f6(0x230)]['slice'](0x3),_0x246f84=_0x305ebb([_0xdae2f6(0x32b),_0xdae2f6(0x3c1),..._0x437395]),_0x27d76d=_0x47b6be(_0x246f84),_0x5ec919=new Set([_0xdae2f6(0x378),'-d',_0xdae2f6(0x272),'-k',_0xdae2f6(0x2a3),'-c',_0xdae2f6(0x2d9),'-p',_0xdae2f6(0x24a),_0xdae2f6(0x34f),'-e',_0xdae2f6(0x16f),'--name','--password',_0xdae2f6(0x1fb),'--permissions',_0xdae2f6(0x179),'--ttl',_0xdae2f6(0x2d6),_0xdae2f6(0x168),'-u',_0xdae2f6(0x3b4)]);let _0x1190ee=null;for(let _0x4dfd39=0x0;_0x4dfd39<_0x437395[_0xdae2f6(0x2af)];_0x4dfd39++){if(_0x5ec919[_0xdae2f6(0x17d)](_0x437395[_0x4dfd39])){_0x4dfd39++;continue;}if(!_0x437395[_0x4dfd39]['startsWith']('-')){_0x1190ee=_0x437395[_0x4dfd39];break;}}(async()=>{const _0x47e2e9=_0xdae2f6;if(_0x2aac74===_0x47e2e9(0x37d)){const _0x4e6abf=process[_0x47e2e9(0x230)][0x3],_0x11d131=process[_0x47e2e9(0x230)][_0x47e2e9(0x237)](0x4),_0x5edd24=_0x305ebb([_0x47e2e9(0x32b),'okdb',..._0x11d131]),_0x329eaa=_0x47b6be(_0x5edd24),_0x199a8c=new Set([_0x47e2e9(0x378),'-d',_0x47e2e9(0x272),'-k',_0x47e2e9(0x2a3),'-c','--port','-p',_0x47e2e9(0x198),_0x47e2e9(0x173),_0x47e2e9(0x1fb),_0x47e2e9(0x3d1),'--grants',_0x47e2e9(0x158),_0x47e2e9(0x24a),_0x47e2e9(0x34f),'-e','--types']),_0xbc2438=[];for(let _0x220919=0x0;_0x220919<_0x11d131['length'];_0x220919++){if(_0x199a8c[_0x47e2e9(0x17d)](_0x11d131[_0x220919])){_0x220919++;continue;}if(_0x11d131[_0x220919][_0x47e2e9(0x193)]('-'))continue;_0xbc2438[_0x47e2e9(0x322)](_0x11d131[_0x220919]);}switch(_0x4e6abf){case _0x47e2e9(0x277):await _0x1b49fe(_0x329eaa,_0x5edd24);break;case'list':await _0x1b8f74(_0x329eaa);break;case _0x47e2e9(0x2ca):await _0x554ca8(_0xbc2438[0x0],_0x329eaa);break;default:console[_0x47e2e9(0x238)]('[okdb]\x20unknown\x20token\x20action:\x20\x22'+_0x4e6abf+_0x47e2e9(0x263)),process['exit'](0x1);}return;}if(_0x2aac74==='license'){const _0x57857b=requireOkdbLicenseCodec(),_0x42db75=process['argv']['slice'](0x3),_0x229105=_0x305ebb(['node',_0x47e2e9(0x3c1),..._0x42db75]),_0x1705e5=_0x47b6be(_0x229105),_0x11849b=new Set([_0x47e2e9(0x378),'-d',_0x47e2e9(0x272),'-k',_0x47e2e9(0x2a3),'-c',_0x47e2e9(0x2d9),'-p',_0x47e2e9(0x24a)]),_0x528d4e=[];for(let _0x3345ee=0x0;_0x3345ee<_0x42db75['length'];_0x3345ee++){if(_0x11849b['has'](_0x42db75[_0x3345ee])){_0x3345ee++;continue;}if(_0x42db75[_0x3345ee][_0x47e2e9(0x193)]('-'))continue;_0x528d4e['push'](_0x42db75[_0x3345ee]);}const _0x4aa9d3=_0x528d4e[0x0]??null;if(_0x4aa9d3===_0x47e2e9(0x2b1))await _0x6aac2b(_0x528d4e[0x1],_0x1705e5);else{if(!_0x4aa9d3)await _0x29d2a2(_0x1705e5);else{let _0x52d03c=_0x57857b[_0x47e2e9(0x127)](_0x4aa9d3);if(_0x52d03c==='unknown'&&_0x32d4f7['existsSync'](_0x4aa9d3))_0x52d03c=_0x47e2e9(0x176);if(_0x52d03c===_0x47e2e9(0x176))try{const _0x12dbf0=_0x32d4f7[_0x47e2e9(0x206)](_0x4aa9d3,_0x47e2e9(0x1f6))[_0x47e2e9(0x1e6)](),_0x400f88=_0x57857b[_0x47e2e9(0x127)](_0x12dbf0);if(_0x400f88===_0x47e2e9(0x14d)){await _0x3204f6(_0x12dbf0,_0x1705e5);return;}await _0x29a414(_0x4aa9d3,_0x1705e5);return;}catch(_0x33df9a){console[_0x47e2e9(0x238)]('[okdb]\x20error:\x20failed\x20to\x20read\x20'+_0x4aa9d3+':\x20'+_0x33df9a['message']),process[_0x47e2e9(0x2d2)](0x1);}switch(_0x52d03c){case _0x47e2e9(0x121):await _0x29a414(_0x4aa9d3,_0x1705e5);break;case'activation':await _0x3204f6(_0x4aa9d3,_0x1705e5);break;case _0x47e2e9(0x2a4):await _0x1761e1(_0x4aa9d3,_0x1705e5);break;default:console[_0x47e2e9(0x238)](_0x47e2e9(0x24f)+_0x4aa9d3+'\x22'),console[_0x47e2e9(0x238)](''),console[_0x47e2e9(0x238)](_0x47e2e9(0x32e)),console['error']('\x20\x20\x20\x20•\x20a\x20license\x20blob\x20\x20\x20(Crockford\x20base32,\x20~150–250\x20chars)'),console[_0x47e2e9(0x238)](_0x47e2e9(0x14f)),console['error'](_0x47e2e9(0x12b)),console[_0x47e2e9(0x238)](_0x47e2e9(0x110)),console[_0x47e2e9(0x238)](''),console[_0x47e2e9(0x238)]('\x20\x20Usage:\x20okdb\x20license\x20[<blob|path|uuid|activation-token>]'),process['exit'](0x1);}}}return;}switch(_0x2aac74){case'doctor':await _0x30c207(_0x27d76d);break;case _0x47e2e9(0x116):await _0x1c6a70();break;case _0x47e2e9(0x3bd):await _0x5e7e78(_0x27d76d);break;case _0x47e2e9(0x396):await _0x23c061(_0x1190ee??_0x5ae735[_0x47e2e9(0x1e4)](_0x47e2e9(0x341)),_0x27d76d);break;case _0x47e2e9(0x2cf):await _0xd89c67(_0x1190ee??_0x5ae735[_0x47e2e9(0x1e4)](_0x47e2e9(0x320)),_0x27d76d,_0x246f84);break;case _0x47e2e9(0x2f8):await _0x2c79ce(_0x1190ee??_0x5ae735[_0x47e2e9(0x1e4)](_0x47e2e9(0x320)),_0x27d76d,_0x246f84);break;case _0x47e2e9(0x180):await _0x269bd3(_0x1190ee,_0x27d76d,_0x246f84);break;}})()[_0xdae2f6(0x19a)](()=>process['exit'](0x0))['catch'](_0x457d52=>{const _0x23de4f=_0xdae2f6;console['error'](_0x23de4f(0x162)+(_0x457d52[_0x23de4f(0x2df)]||_0x457d52)+'\x0a'),process['exit'](0x1);});}else _0x875669()[_0xdae2f6(0x38c)](_0x15ac3c=>{const _0x3eb3a5=_0xdae2f6;console[_0x3eb3a5(0x238)](_0x3eb3a5(0x22d)),console['error'](_0x15ac3c[_0x3eb3a5(0x104)]||_0x15ac3c),process[_0x3eb3a5(0x2d2)](0x1);});}return okdb$1;}var okdbExports=requireOkdb(),okdb=getDefaultExportFromCjs(okdbExports);module[_0x1df1fe(0x283)]=okdb;
2
+ 'use strict';const _0x4f7fbb=_0x53ec;(function(_0x1b3de8,_0x3c0968){const _0x2c2e8d=_0x53ec,_0x47a1e4=_0x1b3de8();while(!![]){try{const _0xcda747=-parseInt(_0x2c2e8d(0x1cc))/0x1+parseInt(_0x2c2e8d(0x11b))/0x2*(parseInt(_0x2c2e8d(0x394))/0x3)+parseInt(_0x2c2e8d(0x13b))/0x4+parseInt(_0x2c2e8d(0x18d))/0x5+-parseInt(_0x2c2e8d(0x279))/0x6*(-parseInt(_0x2c2e8d(0x187))/0x7)+parseInt(_0x2c2e8d(0x17c))/0x8*(parseInt(_0x2c2e8d(0x220))/0x9)+parseInt(_0x2c2e8d(0x261))/0xa*(-parseInt(_0x2c2e8d(0xc0))/0xb);if(_0xcda747===_0x3c0968)break;else _0x47a1e4['push'](_0x47a1e4['shift']());}catch(_0x43aeca){_0x47a1e4['push'](_0x47a1e4['shift']());}}}(_0x1d61,0xe332d));var require$$1$1=require('path'),require$$1=require('fs'),require$$3=require(_0x4f7fbb(0x239)),require$$0$2=require(_0x4f7fbb(0x12c)),require$$5=require(_0x4f7fbb(0x126)),require$$0=require(_0x4f7fbb(0x327)),require$$0$1=require('node:crypto'),require$$2$1=require('os'),require$$4=require(_0x4f7fbb(0x362));function getDefaultExportFromCjs(_0xbc34e0){const _0xc691e2=_0x4f7fbb;return _0xbc34e0&&_0xbc34e0['__esModule']&&Object[_0xc691e2(0x2d3)][_0xc691e2(0x3a3)][_0xc691e2(0x24a)](_0xbc34e0,_0xc691e2(0x1e7))?_0xbc34e0[_0xc691e2(0x1e7)]:_0xbc34e0;}var okdb$1={},version=_0x4f7fbb(0x13a),require$$2={'version':version},okdbAuthTokens,hasRequiredOkdbAuthTokens;function requireOkdbAuthTokens(){if(hasRequiredOkdbAuthTokens)return okdbAuthTokens;hasRequiredOkdbAuthTokens=0x1;const _0x118528=require$$0;function _0x233890(_0x3eb4d1,_0x58b85f){const _0x15da42=_0x53ec;return _0x118528['createHmac'](_0x15da42(0x25f),_0x58b85f)['update'](_0x3eb4d1)[_0x15da42(0x298)]('base64url');}function _0x40d8f6(_0x1ebfb7,_0x225c00){const _0x1d04db=_0x53ec;if(typeof _0x1ebfb7!==_0x1d04db(0x2b3)||typeof _0x225c00!==_0x1d04db(0x2b3))return![];if(Buffer[_0x1d04db(0x341)](_0x1ebfb7)!==Buffer[_0x1d04db(0x341)](_0x225c00))return![];return _0x118528[_0x1d04db(0x2bb)](Buffer[_0x1d04db(0xf8)](_0x1ebfb7),Buffer[_0x1d04db(0xf8)](_0x225c00));}function _0xd2e42c(_0x62ea42){const _0x57b259=_0x53ec;if(!_0x62ea42?.[_0x57b259(0x134)]('Bearer\x20'))return null;return _0x62ea42[_0x57b259(0x23f)](0x7);}function _0x47fa09(_0x412035=0x20){const _0x40b568=_0x53ec;return _0x118528['randomBytes'](_0x412035)[_0x40b568(0x3be)]('base64url');}function _0x2be229(_0x5a92ec){const _0x74ef6f=_0x53ec;return _0x118528[_0x74ef6f(0x2c1)]('sha256')[_0x74ef6f(0x1be)](_0x5a92ec)[_0x74ef6f(0x298)](_0x74ef6f(0x140));}function _0xf2b733(_0x27b3b6,_0x26a607,_0xb1a6e=0x36ee80){const _0x2305b3=_0x53ec;if(!_0x26a607)throw new Error('Token\x20secret\x20not\x20configured');const _0x27ac9b=Date['now'](),_0x399a1f=Buffer['from'](JSON[_0x2305b3(0x2c7)]({'iat':_0x27ac9b,'exp':_0x27ac9b+_0xb1a6e,'sub':_0x27b3b6?.['id']??_0x27b3b6?.[_0x2305b3(0xd4)]??null,'username':_0x27b3b6?.[_0x2305b3(0xed)]??_0x27b3b6?.[_0x2305b3(0x14b)]??null,'roles':Array[_0x2305b3(0x278)](_0x27b3b6?.['roles'])?_0x27b3b6[_0x2305b3(0x2a4)]:[]}))[_0x2305b3(0x3be)](_0x2305b3(0x29e)),_0x42d89a=_0x233890(_0x399a1f,_0x26a607);return _0x399a1f+'.'+_0x42d89a;}function _0x858431(_0x4a6f96,_0x2e47bc){const _0x1e91ab=_0x53ec;if(!_0x2e47bc||typeof _0x4a6f96!=='string')return null;const [_0x1ab399,_0x43b519]=_0x4a6f96[_0x1e91ab(0x397)]('.');if(!_0x1ab399||!_0x43b519)return null;const _0x344362=_0x233890(_0x1ab399,_0x2e47bc);if(!_0x40d8f6(_0x43b519,_0x344362))return null;try{const _0x100527=JSON[_0x1e91ab(0x2ee)](Buffer[_0x1e91ab(0xf8)](_0x1ab399,_0x1e91ab(0x29e))[_0x1e91ab(0x3be)]()),_0x44b753=0x7530;if(Date[_0x1e91ab(0xd5)]()>Number(_0x100527?.['exp']??0x0)+_0x44b753)return null;return _0x100527;}catch{return null;}}async function _0x469c6a(_0x173406){return new Promise((_0x52b6ba,_0xed8d9b)=>{const _0x4c44d6=_0x53ec,_0x19dd87=_0x118528[_0x4c44d6(0x371)](0x10);_0x118528[_0x4c44d6(0x3bd)](_0x173406,_0x19dd87,0x40,(_0x40dcc7,_0xe03a41)=>{const _0x410d45=_0x4c44d6;if(_0x40dcc7)_0xed8d9b(_0x40dcc7);_0x52b6ba(_0x19dd87[_0x410d45(0x3be)](_0x410d45(0x140))+':'+_0xe03a41[_0x410d45(0x3be)](_0x410d45(0x140)));});});}async function _0x482594(_0x1a2ff3,_0x4dc33d){const _0x17e98f=_0x53ec,[_0x107e8c,_0x701d86]=_0x4dc33d[_0x17e98f(0x397)](':');if(!_0x107e8c||!_0x701d86)return![];const _0x1e6e13=Buffer[_0x17e98f(0xf8)](_0x107e8c,'hex');return new Promise((_0x145187,_0x5ad6ea)=>{const _0x3e2dcd=_0x17e98f;_0x118528[_0x3e2dcd(0x3bd)](_0x1a2ff3,_0x1e6e13,0x40,(_0x38f833,_0x3c33da)=>{const _0x3fe852=_0x3e2dcd;if(_0x38f833)_0x5ad6ea(_0x38f833);_0x145187(_0x118528[_0x3fe852(0x2bb)](_0x3c33da,Buffer[_0x3fe852(0xf8)](_0x701d86,_0x3fe852(0x140))));});});}return okdbAuthTokens={'hmac':_0x233890,'timingSafeEqual':_0x40d8f6,'parseBearer':_0xd2e42c,'randomToken':_0x47fa09,'hashToken':_0x2be229,'issueToken':_0xf2b733,'authenticateToken':_0x858431,'hashPassword':_0x469c6a,'verifyPassword':_0x482594},okdbAuthTokens;}var okdbLicenseCodec,hasRequiredOkdbLicenseCodec;function requireOkdbLicenseCodec(){const _0x178ad9=_0x4f7fbb;if(hasRequiredOkdbLicenseCodec)return okdbLicenseCodec;hasRequiredOkdbLicenseCodec=0x1;const _0x3e20ba=require$$0$1,_0x2086e0=_0x178ad9(0x23a),_0x34cb94=new Uint8Array(0x100)['fill'](0xff);for(let _0x314268=0x0;_0x314268<_0x2086e0[_0x178ad9(0x1ae)];_0x314268++){_0x34cb94[_0x2086e0[_0x178ad9(0x325)](_0x314268)]=_0x314268,_0x34cb94[_0x2086e0['charCodeAt'](_0x314268)+0x20]=_0x314268;}_0x34cb94['O'['charCodeAt'](0x0)]=0x0,_0x34cb94['o'[_0x178ad9(0x325)](0x0)]=0x0,_0x34cb94['I'[_0x178ad9(0x325)](0x0)]=0x1,_0x34cb94['i'[_0x178ad9(0x325)](0x0)]=0x1,_0x34cb94['L'[_0x178ad9(0x325)](0x0)]=0x1,_0x34cb94['l'['charCodeAt'](0x0)]=0x1;function _0x2810b3(_0x2555e3){const _0x3fb3cb=_0x178ad9;let _0x219a57=0x0,_0x2acbfe=0x0,_0x267ad0='';for(let _0x14f152=0x0;_0x14f152<_0x2555e3[_0x3fb3cb(0x1ae)];_0x14f152++){_0x2acbfe=_0x2acbfe<<0x8|_0x2555e3[_0x14f152],_0x219a57+=0x8;while(_0x219a57>=0x5){_0x219a57-=0x5,_0x267ad0+=_0x2086e0[_0x2acbfe>>>_0x219a57&0x1f];}}return _0x219a57>0x0&&(_0x267ad0+=_0x2086e0[_0x2acbfe<<0x5-_0x219a57&0x1f]),_0x267ad0;}function _0x8c7c7b(_0x27ffc4){const _0x53f99b=_0x178ad9;_0x27ffc4=_0x27ffc4[_0x53f99b(0x1c8)](/-/g,'')['toUpperCase']();let _0x3689d8=0x0,_0x3b9bff=0x0;const _0x437501=[];for(let _0x276394=0x0;_0x276394<_0x27ffc4[_0x53f99b(0x1ae)];_0x276394++){const _0x2db9df=_0x34cb94[_0x27ffc4['charCodeAt'](_0x276394)];if(_0x2db9df===0xff)continue;_0x3b9bff=_0x3b9bff<<0x5|_0x2db9df,_0x3689d8+=0x5,_0x3689d8>=0x8&&(_0x3689d8-=0x8,_0x437501['push'](_0x3b9bff>>>_0x3689d8&0xff));}return Buffer['from'](_0x437501);}const _0x2eff6c=['sync',_0x178ad9(0x2ce),_0x178ad9(0x3d1),_0x178ad9(0x159),_0x178ad9(0xf4),'views',_0x178ad9(0x1c9),_0x178ad9(0x3c5)],_0x572566=0x0,_0x23201e=0x1,_0x420e30=0x2,_0x410b23=0x6*0x1e*0x18*0x3c*0x3c*0x3e8;function _0x4cf4b8({issuedAt:_0x9b6fea,expiresAt:_0x34ac66,licensee:licensee='',features:features={},limits:limits={},licenseType:licenseType=_0x572566}){const _0x259f35=_0x178ad9,_0x8dda05=Buffer['from'](licensee,'utf8')[_0x259f35(0x23f)](0x0,0x40),_0x316ef2=0x1+0x1+0x4+0x4+0x1+_0x8dda05[_0x259f35(0x1ae)]+0x2+0x10,_0x30e61b=Buffer[_0x259f35(0x1f4)](_0x316ef2);let _0x1ae0ff=0x0;_0x30e61b[_0x259f35(0x39c)](0x1,_0x1ae0ff++),_0x30e61b[_0x259f35(0x39c)](licenseType,_0x1ae0ff++),_0x30e61b['writeUInt32BE'](Math[_0x259f35(0x2a7)](_0x9b6fea/0x3e8),_0x1ae0ff),_0x1ae0ff+=0x4,_0x30e61b[_0x259f35(0x1bd)](Math[_0x259f35(0x2a7)](_0x34ac66/0x3e8),_0x1ae0ff),_0x1ae0ff+=0x4,_0x30e61b['writeUInt8'](_0x8dda05[_0x259f35(0x1ae)],_0x1ae0ff++),_0x8dda05[_0x259f35(0x283)](_0x30e61b,_0x1ae0ff),_0x1ae0ff+=_0x8dda05[_0x259f35(0x1ae)];let _0x19814e=0x0;for(let _0x448d5f=0x0;_0x448d5f<_0x2eff6c[_0x259f35(0x1ae)];_0x448d5f++){if(features[_0x2eff6c[_0x448d5f]])_0x19814e|=0x1<<_0x448d5f;}_0x30e61b['writeUInt16BE'](_0x19814e,_0x1ae0ff),_0x1ae0ff+=0x2;const _0x18ef05=[_0x259f35(0x1b7),_0x259f35(0x303),'syncPeers',_0x259f35(0x2ca)];for(const _0x2399de of _0x18ef05){_0x30e61b[_0x259f35(0x1bd)](limits[_0x2399de]||0x0,_0x1ae0ff),_0x1ae0ff+=0x4;}return _0x30e61b;}function _0x375095(_0x3604cb){const _0x155e42=_0x178ad9;let _0x21b9c8=0x0;const _0x39cbe1=_0x3604cb[_0x155e42(0x3b1)](_0x21b9c8++),_0x51c964=_0x3604cb[_0x155e42(0x3b1)](_0x21b9c8++),_0x5720d4=_0x3604cb[_0x155e42(0xdc)](_0x21b9c8);_0x21b9c8+=0x4;const _0x5ea602=_0x3604cb[_0x155e42(0xdc)](_0x21b9c8);_0x21b9c8+=0x4;const _0x5cde05=_0x3604cb[_0x155e42(0x3b1)](_0x21b9c8++),_0x14a340=_0x3604cb['slice'](_0x21b9c8,_0x21b9c8+_0x5cde05)[_0x155e42(0x3be)](_0x155e42(0x1ec));_0x21b9c8+=_0x5cde05;const _0x3540f6=_0x3604cb[_0x155e42(0x166)](_0x21b9c8);_0x21b9c8+=0x2;const _0x34e1c8={};for(let _0x44b1e8=0x0;_0x44b1e8<_0x2eff6c['length'];_0x44b1e8++){_0x34e1c8[_0x2eff6c[_0x44b1e8]]=Boolean(_0x3540f6&0x1<<_0x44b1e8);}const _0x100e4e=['envs',_0x155e42(0x303),_0x155e42(0x3bc),'maxWrites'],_0x5576ba={};for(const _0x291bfd of _0x100e4e){const _0x4cfd7d=_0x3604cb['readUInt32BE'](_0x21b9c8);_0x21b9c8+=0x4,_0x5576ba[_0x291bfd]=_0x4cfd7d===0x0?null:_0x4cfd7d;}return{'v':_0x39cbe1,'licenseType':_0x51c964,'issuedAt':_0x5720d4*0x3e8,'expiresAt':_0x5ea602*0x3e8,'licensee':_0x14a340,'features':_0x34e1c8,'limits':_0x5576ba};}function _0x34c9ec(_0x4a79ee,_0x2c6461){const _0x196d9a=_0x178ad9,_0xc9f985=Buffer['concat']([_0x4a79ee,_0x2c6461]),_0x88ef8c=_0x2810b3(_0xc9f985),_0x44ff16=[];for(let _0x2dd002=0x0;_0x2dd002<_0x88ef8c[_0x196d9a(0x1ae)];_0x2dd002+=0x8){_0x44ff16[_0x196d9a(0x1bb)](_0x88ef8c[_0x196d9a(0x23f)](_0x2dd002,_0x2dd002+0x8));}return _0x44ff16[_0x196d9a(0x27f)]('-');}function _0x2d30f8(_0x18e551){const _0x42f042=_0x178ad9;if(typeof _0x18e551!=='string')throw new Error('decodeLicenseBlob:\x20input\x20must\x20be\x20a\x20string');const _0x409891=_0x8c7c7b(_0x18e551['replace'](/-/g,''));if(_0x409891[_0x42f042(0x1ae)]<0x41)throw new Error('decodeLicenseBlob:\x20blob\x20too\x20short\x20('+_0x409891[_0x42f042(0x1ae)]+_0x42f042(0x19d));const _0x4cde45=_0x409891['slice'](0x0,_0x409891[_0x42f042(0x1ae)]-0x40),_0x454f31=_0x409891[_0x42f042(0x23f)](_0x409891[_0x42f042(0x1ae)]-0x40);let _0x1ffca2;try{_0x1ffca2=_0x375095(_0x4cde45);}catch(_0x26bf48){throw new Error(_0x42f042(0x178)+_0x26bf48[_0x42f042(0x172)]);}return{'rawBuf':_0x409891,'payload':_0x4cde45,'sig':_0x454f31,'decoded':_0x1ffca2};}function _0x2840b0(_0x282b12){const _0xf18edd=_0x178ad9;return _0x3e20ba[_0xf18edd(0x2c1)]('sha256')[_0xf18edd(0x1be)](_0x282b12)[_0xf18edd(0x298)]()['slice'](0x0,0x8);}function _0x267153(_0x4a885c,_0x59ba17,_0x4f0cce){const _0x3ed1ad=_0x178ad9,_0x5c4576='OKDB-PIN-V1:'+_0x4f0cce,_0x24c5da=Buffer[_0x3ed1ad(0x2fa)]([Buffer['from'](_0x4a885c,_0x3ed1ad(0x1ec)),_0x59ba17]),_0x444dfb=_0x3e20ba[_0x3ed1ad(0x1a3)](_0x3ed1ad(0x25f),_0x5c4576)[_0x3ed1ad(0x1be)](_0x24c5da)[_0x3ed1ad(0x298)](),_0x9d2b81=_0x2810b3(_0x444dfb['slice'](0x0,0x5));return{'pin':_0x9d2b81,'pinHmac':_0x444dfb};}function _0x49af0c(_0x252145,_0xc803d7,_0x455177){const _0x5919e7=_0x178ad9,_0x288520=Buffer['allocUnsafe'](0x4d);let _0x342bf5=0x0;_0x288520[_0x5919e7(0x39c)](0x1,_0x342bf5++),_0x252145[_0x5919e7(0x283)](_0x288520,_0x342bf5),_0x342bf5+=0x8,_0x288520[_0x5919e7(0x1bd)](_0xc803d7,_0x342bf5),_0x342bf5+=0x4,_0x455177[_0x5919e7(0x283)](_0x288520,_0x342bf5);const _0x4af4d2=_0x2810b3(_0x288520),_0x468273=[];for(let _0x712fc2=0x0;_0x712fc2<_0x4af4d2[_0x5919e7(0x1ae)];_0x712fc2+=0x6){_0x468273[_0x5919e7(0x1bb)](_0x4af4d2['slice'](_0x712fc2,_0x712fc2+0x6));}return _0x468273[_0x5919e7(0x27f)]('-');}function _0x4f1328(_0x489c46){const _0x5af69c=_0x178ad9;if(typeof _0x489c46!==_0x5af69c(0x2b3))throw new Error(_0x5af69c(0x1e3));const _0x42ecc1=_0x8c7c7b(_0x489c46[_0x5af69c(0x1c8)](/-/g,''));if(_0x42ecc1[_0x5af69c(0x1ae)]!==0x4d)throw new Error(_0x5af69c(0x1e2)+_0x42ecc1[_0x5af69c(0x1ae)]);let _0x83a110=0x0;const _0x5755f2=_0x42ecc1[_0x5af69c(0x3b1)](_0x83a110++),_0x328ab8=_0x42ecc1[_0x5af69c(0x23f)](_0x83a110,_0x83a110+0x8);_0x83a110+=0x8;const _0x29b9a8=_0x42ecc1[_0x5af69c(0xdc)](_0x83a110);_0x83a110+=0x4;const _0x3fad05=_0x42ecc1[_0x5af69c(0x23f)](_0x83a110);return{'v':_0x5755f2,'licenseHash':_0x328ab8,'expiry':_0x29b9a8,'sig':_0x3fad05};}function _0x5651de({tokenString:_0x449731,nodeId:_0x3b9b31,rawBlobBuf:_0x31ea95,pubKeyPem:_0x1d227a,pubFingerprint:_0x31e720}){const _0x2d2002=_0x178ad9;let _0x50c753;try{_0x50c753=_0x4f1328(_0x449731);}catch(_0x5ab32d){return{'valid':![],'reason':_0x2d2002(0xe8)};}const _0x23d782=_0x2840b0(_0x31ea95);if(!_0x23d782['equals'](_0x50c753[_0x2d2002(0x20f)]))return{'valid':![],'reason':_0x2d2002(0xff)};const {pinHmac:_0x4c07e8}=_0x267153(_0x3b9b31,_0x23d782,_0x31e720),_0x295e39=Buffer[_0x2d2002(0x1f4)](0x4);_0x295e39[_0x2d2002(0x1bd)](_0x50c753[_0x2d2002(0x372)],0x0);const _0x133979=Buffer[_0x2d2002(0x2fa)]([Buffer[_0x2d2002(0xf8)]([_0x50c753['v']]),_0x4c07e8[_0x2d2002(0x23f)](0x0,0x5),_0x50c753['licenseHash'],_0x295e39]);try{const _0x39c9bd=_0x3e20ba['verify'](null,_0x133979,_0x1d227a,_0x50c753[_0x2d2002(0x2db)]);if(!_0x39c9bd)return{'valid':![],'reason':_0x2d2002(0x1a6)};}catch(_0x4dce61){return{'valid':![],'reason':_0x2d2002(0x1a6)};}if(_0x50c753[_0x2d2002(0x372)]<Date['now']()/0x3e8)return{'valid':![],'reason':'ACTIVATION_EXPIRED'};return{'valid':!![],'reason':'ok'};}function _0x22fe42(_0x2caf0c){const _0x5920a4=_0x178ad9;if(typeof _0x2caf0c!==_0x5920a4(0x2b3))return _0x5920a4(0x2de);const _0x533f9c=_0x2caf0c['trim']();if(_0x533f9c[_0x5920a4(0x134)]('/')||_0x533f9c['startsWith']('./')||_0x533f9c[_0x5920a4(0x134)](_0x5920a4(0x2c5))||/^[A-Za-z]:[\\/]/[_0x5920a4(0x36a)](_0x533f9c))return _0x5920a4(0x3c1);if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i[_0x5920a4(0x36a)](_0x533f9c))return _0x5920a4(0x196);const _0x350da0=_0x533f9c[_0x5920a4(0x1c8)](/[\s-]+/g,'')[_0x5920a4(0x1ae)];if(_0x350da0===0x7c)return _0x5920a4(0x11c);if(_0x350da0>=0x95&&_0x350da0<=0xfc)return _0x5920a4(0x35d);return _0x5920a4(0x2de);}return okdbLicenseCodec={'toBase32':_0x2810b3,'fromBase32':_0x8c7c7b,'encodeLicensePayload':_0x4cf4b8,'decodeLicensePayload':_0x375095,'encodeLicenseBlob':_0x34c9ec,'decodeLicenseBlob':_0x2d30f8,'licenseHash':_0x2840b0,'derivePin':_0x267153,'encodeActivationToken':_0x49af0c,'decodeActivationToken':_0x4f1328,'verifyActivation':_0x5651de,'detectInputType':_0x22fe42,'FEATURE_NAMES':_0x2eff6c,'LICENSE_TYPE_STANDARD':_0x572566,'LICENSE_TYPE_OPEN':_0x23201e,'LICENSE_TYPE_INTERNAL':_0x420e30,'OPEN_LICENSE_MAX_DURATION_MS':_0x410b23},okdbLicenseCodec;}var okdbError,hasRequiredOkdbError;function requireOkdbError(){if(hasRequiredOkdbError)return okdbError;hasRequiredOkdbError=0x1;class _0x5cfa28 extends Error{constructor(_0x33667d,_0x32e1c2,_0x15cef4={}){const _0x280f29=_0x53ec;super(_0x33667d),this['name']=_0x280f29(0x231),this[_0x280f29(0xcc)]=_0x32e1c2,this['details']=_0x15cef4,_0x15cef4[_0x280f29(0x28c)]&&(this[_0x280f29(0x28c)]=_0x15cef4[_0x280f29(0x28c)]),Error['captureStackTrace'](this,this[_0x280f29(0x24d)]);}}class _0x1dbe18 extends _0x5cfa28{constructor(_0x4a450f,_0x4e289c,_0xad022b,_0x5aaee1){const _0x3f54b3=_0x53ec;super(_0x3f54b3(0x149)+_0x4a450f+'@'+_0x4e289c+_0x3f54b3(0x319)+_0xad022b+',\x20got\x20'+_0x5aaee1,_0x3f54b3(0x18f),{'type':_0x4a450f,'key':_0x4e289c,'expectedVersion':_0xad022b,'actualVersion':_0x5aaee1}),this[_0x3f54b3(0x14b)]=_0x3f54b3(0x214);}}class _0xc63ce3 extends _0x5cfa28{constructor(_0x3849ef,_0x293deb){const _0x2b6e2e=_0x53ec;super(_0x3849ef+'@'+_0x293deb+_0x2b6e2e(0x14a),_0x2b6e2e(0x158),{'type':_0x3849ef,'key':_0x293deb}),this[_0x2b6e2e(0x14b)]='OKDBNotFoundError';}}class _0x456de9 extends _0x5cfa28{constructor(_0x10831f,_0x5c9670){const _0x3b7ea2=_0x53ec;super(_0x10831f+'@'+_0x5c9670+_0x3b7ea2(0x2e9),_0x3b7ea2(0x110),{'type':_0x10831f,'key':_0x5c9670}),this['name']=_0x3b7ea2(0x391);}}class _0x1f9cc4 extends _0x5cfa28{constructor(_0x49cabc,_0x3e6c10){const _0x779dbe=_0x53ec,_0x573120=typeof _0x3e6c10;super(_0x779dbe(0x17a)+_0x49cabc+_0x779dbe(0xce)+_0x573120+'.\x20Only\x20primitives,\x20null,\x20Buffers,\x20and\x20arrays\x20are\x20allowed.\x20Got:\x20'+_0x3e6c10,'INVALID_INDEX_KEY',{'index':_0x49cabc,'key':_0x3e6c10,'keyType':_0x573120}),this[_0x779dbe(0x14b)]='OKDBInvalidIndexKeyError';}}class _0xf7aaf9 extends _0x5cfa28{constructor(_0x1f2e7d){const _0x4690f8=_0x53ec,_0x41028a=typeof _0x1f2e7d;super(_0x4690f8(0x145)+_0x41028a+_0x4690f8(0x287)+_0x1f2e7d,'INVALID_PRIMARY_KEY',{'key':_0x1f2e7d,'keyType':_0x41028a}),this[_0x4690f8(0x14b)]=_0x4690f8(0x310);}}class _0xfb463a extends _0x5cfa28{constructor(_0x432996){const _0x246ad3=_0x53ec;super(_0x246ad3(0x260)+_0x432996+'\x27\x20doesn\x27t\x20exist',_0x246ad3(0x39a),{'type':_0x432996}),this[_0x246ad3(0x14b)]='OKDBTypeNotRegisteredError';}}class _0x2c2e47 extends _0x5cfa28{constructor(_0x155d67){const _0x3f55f9=_0x53ec;super('Type\x20\x27'+_0x155d67+'\x27\x20already\x20registered',_0x3f55f9(0x34d),{'type':_0x155d67}),this['name']='OKDBTypeAlreadyRegisteredError';}}class _0x220667 extends _0x5cfa28{constructor(_0x3dab49,_0x4d6192){const _0x24ccd3=_0x53ec;super(_0x24ccd3(0xc3)+_0x4d6192+'\x27\x20on\x20type\x20\x27'+_0x3dab49+_0x24ccd3(0x1cb),'INDEX_NOT_REGISTERED',{'type':_0x3dab49,'index':_0x4d6192}),this[_0x24ccd3(0x14b)]=_0x24ccd3(0x2e7);}}class _0x52fcae extends _0x5cfa28{constructor(_0x433bdc,_0x295769){const _0x589f44=_0x53ec;super(_0x589f44(0xc3)+_0x295769+_0x589f44(0xf3)+_0x433bdc+_0x589f44(0x1e6),_0x589f44(0x215),{'type':_0x433bdc,'index':_0x295769}),this['name']=_0x589f44(0x34e);}}class _0x167fe9 extends _0x5cfa28{constructor(_0x104951,_0x13ee06={}){const _0x39d0e1=_0x53ec;super(_0x104951,'INVALID_VALUE',_0x13ee06),this[_0x39d0e1(0x14b)]=_0x39d0e1(0x21f);}}class _0x2454bc extends _0x5cfa28{constructor(_0x5483d6,_0x5c81aa,_0x4b9058,_0x19c59c,_0x14594a){const _0x553701=_0x53ec;super(_0x553701(0x31b)+_0x5483d6+'@'+_0x5c81aa+':\x20key\x20['+_0x4b9058+_0x553701(0x360)+_0x19c59c+'\x27,\x20cannot\x20map\x20to\x20\x27'+_0x14594a+'\x27',_0x553701(0x123),{'type':_0x5483d6,'index':_0x5c81aa,'indexKey':_0x4b9058,'existingKey':_0x19c59c,'conflictingKey':_0x14594a}),this[_0x553701(0x14b)]=_0x553701(0x3a5);}}class _0x181242 extends _0x5cfa28{constructor(_0x285083,_0x51d312,_0x1e8f89){const _0x8b3c78=_0x53ec;super('Schema\x20validation\x20failed\x20for\x20'+_0x285083+'@'+_0x51d312,'SCHEMA_VALIDATION_FAILED',{'type':_0x285083,'key':_0x51d312,'errors':_0x1e8f89}),this[_0x8b3c78(0x14b)]=_0x8b3c78(0x1ce),this[_0x8b3c78(0x1ed)]=_0x285083,this[_0x8b3c78(0x273)]=_0x51d312,this[_0x8b3c78(0x3cd)]=_0x1e8f89;}}class _0x2f291e extends _0x5cfa28{constructor(_0x5d350f,_0x508d33){const _0xede701=_0x53ec;super(_0xede701(0x10f)+_0x5d350f+':\x20'+_0x508d33[_0xede701(0x1ae)]+_0xede701(0x257),_0xede701(0x13f),{'type':_0x5d350f,'failures':_0x508d33}),this[_0xede701(0x14b)]=_0xede701(0x246),this[_0xede701(0x1ed)]=_0x5d350f,this[_0xede701(0x2c9)]=_0x508d33;}}class _0x21390d extends _0x5cfa28{constructor(_0x3fcc47,_0x58fe46,_0x321de6,_0x37aa7d,_0x2a6e1e){const _0x16ed5f=_0x53ec;super(_0x16ed5f(0x38f)+_0x3fcc47+'@'+_0x58fe46+'.'+_0x321de6+_0x16ed5f(0x141)+_0x37aa7d+'@'+_0x2a6e1e+_0x16ed5f(0x37b),_0x16ed5f(0x165),{'sourceType':_0x3fcc47,'sourceKey':_0x58fe46,'fieldPath':_0x321de6,'targetType':_0x37aa7d,'targetKey':_0x2a6e1e}),this['name']='OKDBForeignKeyError',this[_0x16ed5f(0x167)]=_0x3fcc47,this['sourceKey']=_0x58fe46,this[_0x16ed5f(0x368)]=_0x321de6,this[_0x16ed5f(0x2cb)]=_0x37aa7d,this[_0x16ed5f(0x361)]=_0x2a6e1e;}}class _0x4ae255 extends _0x5cfa28{constructor(_0x9398d,_0x520ade,_0x284a5c){const _0x417fac=_0x53ec;super(_0x417fac(0x23b)+_0x9398d+'@'+_0x520ade+':\x20'+_0x284a5c[_0x417fac(0x1ae)]+_0x417fac(0x2eb),'FOREIGN_KEY_DELETE_RESTRICTED',{'targetType':_0x9398d,'targetKey':_0x520ade,'references':_0x284a5c}),this['name']=_0x417fac(0x366),this[_0x417fac(0x2cb)]=_0x9398d,this[_0x417fac(0x361)]=_0x520ade,this[_0x417fac(0x36b)]=_0x284a5c;}}class _0x8c5312 extends _0x5cfa28{constructor(_0x400a8e,_0x1b9e14,_0x162cf4){const _0x4fac80=_0x53ec;super(_0x4fac80(0x3bf)+_0x1b9e14+'\x22\x20on\x20\x22'+_0x400a8e+'\x22\x20is\x20used\x20by:\x20'+_0x162cf4['map'](_0x55e6b2=>_0x55e6b2[_0x4fac80(0x2d2)]+':'+_0x55e6b2[_0x4fac80(0x14b)])[_0x4fac80(0x27f)](',\x20'),_0x4fac80(0x1fd),{'type':_0x400a8e,'index':_0x1b9e14,'usedBy':_0x162cf4}),this['name']=_0x4fac80(0x358);}}return okdbError={'OKDBError':_0x5cfa28,'OKDBVersionMismatchError':_0x1dbe18,'OKDBNotFoundError':_0xc63ce3,'OKDBAlreadyExistsError':_0x456de9,'OKDBInvalidIndexKeyError':_0x1f9cc4,'OKDBInvalidPrimaryKeyError':_0xf7aaf9,'OKDBTypeNotRegisteredError':_0xfb463a,'OKDBTypeAlreadyRegisteredError':_0x2c2e47,'OKDBIndexNotRegisteredError':_0x220667,'OKDBIndexAlreadyRegisteredError':_0x52fcae,'OKDBInvalidValueError':_0x167fe9,'OKDBUniqueConstraintError':_0x2454bc,'OKDBSchemaValidationError':_0x181242,'OKDBSchemaCollectionError':_0x2f291e,'OKDBForeignKeyError':_0x21390d,'OKDBForeignKeyDeleteError':_0x4ae255,'OKDBIndexHasConsumersError':_0x8c5312},okdbError;}var okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x5350dd=_0x4f7fbb;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x5eddb6={'PUT':_0x5350dd(0xd3),'REMOVE':_0x5350dd(0x103),'INDEX_DROP':_0x5350dd(0x153),'INDEX_REGISTER':_0x5350dd(0x3ac),'INDEX_RESET':_0x5350dd(0x120),'TYPE_REGISTER':_0x5350dd(0x33a),'TYPE_DROP':_0x5350dd(0x2ba),'FTS_REGISTER':_0x5350dd(0x1e8),'FTS_DROP':_0x5350dd(0x202),'FTS_RESET':_0x5350dd(0x338),'SCHEMA_SET':_0x5350dd(0x334),'SCHEMA_DROP':_0x5350dd(0x12a),'TTL_SET':_0x5350dd(0x39f),'TTL_CLEAR':_0x5350dd(0xc2)},_0x4f948d={'SYSTEM_READY':_0x5350dd(0x21b),'SYSTEM_STOPPED':_0x5350dd(0xea),'SYSTEM_CLOCK_CHANGE':_0x5350dd(0x1a0),'SYSTEM_POKE':_0x5350dd(0xf0),'SYSTEM_DRAIN':_0x5350dd(0x1cf),'SYSTEM_BUS_STATE_CHANGE':_0x5350dd(0x113),'ITEM_CREATE':_0x5350dd(0x3b9),'ITEM_UPDATE':_0x5350dd(0x1b0),'ITEM_REMOVE':_0x5350dd(0x301),'INDEX_RESET':_0x5350dd(0x2dd),'INDEX_READY':'index:ready','INDEX_PROGRESS':_0x5350dd(0x262),'VIEW_PROGRESS':'view:progress','INDEX_DROP':_0x5350dd(0x27c),'INDEX_REGISTERED':_0x5350dd(0x151),'FTS_REGISTERED':'fts:registered','FTS_DROP':_0x5350dd(0x3c4),'FTS_RESET':_0x5350dd(0x125),'SCHEMA_SET':_0x5350dd(0x26f),'SCHEMA_DROP':_0x5350dd(0x2ed),'UNIQUE_VIOLATION':_0x5350dd(0x13c),'UNIQUE_VIOLATION_RESOLVED':_0x5350dd(0x328),'REF_VIOLATION':'ref:violation','REF_VIOLATION_RESOLVED':_0x5350dd(0x35b),'SYNC_APPLY':_0x5350dd(0x1d4),'TXN_START':'txn:start','TXN_END':'txn:end','TXN_ROLLBACK':_0x5350dd(0xe0),'TYPE_REGISTERED':_0x5350dd(0x31c),'TYPE_DROP':_0x5350dd(0x139),'ENV_OPENED':_0x5350dd(0x2d6),'ENV_REMOVED':_0x5350dd(0x37e),'TTL_EXPIRED':_0x5350dd(0x3d4),'TTL_SET':_0x5350dd(0x264),'TTL_CLEAR':_0x5350dd(0x347),'LICENSE_INVALID':'license:invalid','LICENSE_ADDED':_0x5350dd(0x376),'LICENSE_ACTIVATED':_0x5350dd(0x2bf),'LICENSE_REMOVED':_0x5350dd(0x21d)},_0x3d1173={'CREATING':_0x5350dd(0x2b6),'RESETTING':'resetting','READY':'ready','DROPPING':'dropping','WAITING':'waiting'},_0x3d49c4={'CREATED':'created','STARTING':_0x5350dd(0x19f),'STARTED':_0x5350dd(0x1a7),'STOPPING':_0x5350dd(0x331),'STOPPED':_0x5350dd(0x17e)},_0x1c0b56={'CREATING':_0x5350dd(0x2b6),'READY':_0x5350dd(0x135),'HALTED':_0x5350dd(0x179),'STOPPED':_0x5350dd(0x17e),'RESETTING':_0x5350dd(0x2b9)},_0x596514=Object[_0x5350dd(0x104)]({'POKE':_0x5350dd(0xfd),'DRAIN':'bus:drain'});return okdbEnums={'BUS_EVENTS':_0x596514,'CHANGE_ACTIONS':_0x5eddb6,'EVENTS':_0x4f948d,'INDEX_STATE':_0x3d1173,'OKDB_STATE':_0x3d49c4,'VIEW_STATE':_0x1c0b56},okdbEnums;}function _0x53ec(_0x365c74,_0x2c1c13){_0x365c74=_0x365c74-0xbf;const _0x1d618f=_0x1d61();let _0x53ec0d=_0x1d618f[_0x365c74];return _0x53ec0d;}var okdbPubkey,hasRequiredOkdbPubkey;function requireOkdbPubkey(){const _0x53b06c=_0x4f7fbb;if(hasRequiredOkdbPubkey)return okdbPubkey;hasRequiredOkdbPubkey=0x1;const _0x5e1d9f=require$$1,_0x290250=require$$1$1,_0x4fa3be=require$$0,_0x5ee209=_0x5e1d9f['readFileSync'](_0x290250['join'](__dirname,_0x53b06c(0x34f)),_0x53b06c(0x1ec))[_0x53b06c(0x171)](),_0x188e31=_0x4fa3be[_0x53b06c(0x263)](_0x5ee209)[_0x53b06c(0x21c)]({'type':_0x53b06c(0x1ca),'format':'der'}),_0x3227d0=_0x4fa3be['createHash'](_0x53b06c(0x25f))[_0x53b06c(0x1be)](_0x188e31)[_0x53b06c(0x298)](_0x53b06c(0x140))[_0x53b06c(0x23f)](0x0,0x10);return okdbPubkey={'PUBLIC_KEY_PEM':_0x5ee209,'PUB_FINGERPRINT':_0x3227d0},okdbPubkey;}var okdbLicense,hasRequiredOkdbLicense;function requireOkdbLicense(){const _0x5b9fb7=_0x4f7fbb;if(hasRequiredOkdbLicense)return okdbLicense;hasRequiredOkdbLicense=0x1;const _0x5bb3e2=require$$0,{OKDBError:_0x2f99f3}=requireOkdbError(),{EVENTS:_0x117735}=requireOkdbEnums(),_0x14aeec=requireOkdbLicenseCodec(),{LICENSE_TYPE_OPEN:_0x1a4cff,LICENSE_TYPE_INTERNAL:_0x1bcd6e,OPEN_LICENSE_MAX_DURATION_MS:_0x5e9d82}=_0x14aeec,_0x8c4ee2=requireOkdbPubkey(),_0x1121b9={'LICENSED_BUILD':_0x5b9fb7(0x381),'PUBLIC_KEY_PEM':_0x8c4ee2['PUBLIC_KEY_PEM'],'PUB_FINGERPRINT':_0x8c4ee2[_0x5b9fb7(0x281)],'LICENSE_EXPIRED_ACTION':'log'},_0x55a401=_0x5b9fb7(0x1f9),_0x1b0e64={'features':{'sync':![],'embeddings':![],'engines':![],'fts':!![],'timeMachine':![],'views':!![],'mcp':!![],'files':!![]},'limits':{'envs':0x2,'typesPerEnv':0xa,'syncPeers':0x0,'maxWrites':0xf4240},'_isFree':!![]};async function _0xf740a4(_0x471424){const _0x3f10b5=_0x5b9fb7;!_0x471424[_0x3f10b5(0x11f)](_0x55a401)&&await _0x471424[_0x3f10b5(0x33a)](_0x55a401);}class _0x5338e1{constructor(_0x3e4fe8){this['okdb']=_0x3e4fe8,this['_active']=null;}async[_0x5b9fb7(0x3b2)](){const _0x51e858=_0x5b9fb7,_0x4af60f=this[_0x51e858(0x1cd)][_0x51e858(0x318)];if(!_0x4af60f||!_0x4af60f[_0x51e858(0x11f)](_0x55a401)){this['_active']=null;return;}const _0x9a17e1=this['okdb']['id'];let _0x12bf52=null;for(const {key:_0x6c5199,value:_0x11731c}of _0x4af60f['getRange'](_0x55a401)){const _0x43db8c=this[_0x51e858(0x170)](_0x11731c,_0x9a17e1);_0x43db8c===_0x51e858(0x33e)&&!_0x12bf52&&(_0x12bf52={..._0x11731c,'id':_0x6c5199,'status':_0x43db8c});}this['_active']=_0x12bf52;if(this[_0x51e858(0x38d)]&&this[_0x51e858(0x38d)]['licenseType']===_0x1a4cff){const _0x4f8aa1=Math[_0x51e858(0x13d)]((this[_0x51e858(0x38d)][_0x51e858(0x217)]-Date[_0x51e858(0xd5)]())/0x5265c00);this[_0x51e858(0x1cd)]['log']?.[_0x51e858(0x387)](_0x51e858(0xdb)+_0x4f8aa1+'\x20day(s).',{'feature':_0x51e858(0x3a4),'licensee':this[_0x51e858(0x38d)]['licensee'],'expiresAt':new Date(this[_0x51e858(0x38d)][_0x51e858(0x217)])['toISOString']()});}this[_0x51e858(0x38d)]&&this['_active'][_0x51e858(0x364)]===_0x1bcd6e&&this[_0x51e858(0x1cd)][_0x51e858(0x305)]?.[_0x51e858(0x387)]('⚠\x20INTERNAL\x20LICENSE\x20ACTIVE\x20—\x20all\x20features\x20and\x20limits\x20are\x20unlocked.\x20For\x20vendor/internal\x20use\x20only.',{'feature':_0x51e858(0x3a4),'licensee':this[_0x51e858(0x38d)][_0x51e858(0x33d)]});}[_0x5b9fb7(0x170)](_0x5351b5,_0x10d329){const _0x2eee3f=_0x5b9fb7;if(!_0x5351b5['blob'])return _0x2eee3f(0xf9);let _0x3be681;try{_0x3be681=_0x14aeec['decodeLicenseBlob'](_0x5351b5[_0x2eee3f(0x35d)]);}catch(_0x9a01a5){return'invalid';}try{const _0x27b362=_0x5bb3e2['verify'](null,_0x3be681['payload'],_0x1121b9['PUBLIC_KEY_PEM'],_0x3be681[_0x2eee3f(0x2db)]);if(!_0x27b362)return _0x2eee3f(0xf9);}catch(_0x45723f){return _0x2eee3f(0xf9);}if(_0x3be681[_0x2eee3f(0x379)][_0x2eee3f(0x364)]===_0x1bcd6e)return _0x2eee3f(0x33e);if(_0x3be681[_0x2eee3f(0x379)][_0x2eee3f(0x217)]<=Date['now']())return _0x2eee3f(0x288);if(_0x3be681[_0x2eee3f(0x379)]['licenseType']===_0x1a4cff)return'active';if(!_0x5351b5[_0x2eee3f(0x11c)])return _0x2eee3f(0x160);const _0x5de185=_0x14aeec[_0x2eee3f(0x258)]({'tokenString':_0x5351b5[_0x2eee3f(0x11c)],'nodeId':_0x10d329,'rawBlobBuf':_0x3be681['rawBuf'],'pubKeyPem':_0x1121b9[_0x2eee3f(0x185)],'pubFingerprint':_0x1121b9[_0x2eee3f(0x281)]});if(_0x5de185[_0x2eee3f(0x188)]===_0x2eee3f(0xff)||_0x5de185[_0x2eee3f(0x188)]==='SIG_INVALID')return _0x2eee3f(0x18e);if(_0x5de185[_0x2eee3f(0x188)]===_0x2eee3f(0x1f1))return _0x2eee3f(0x288);if(!_0x5de185[_0x2eee3f(0x386)])return _0x2eee3f(0x18e);return'active';}get['active'](){const _0x55e767=_0x5b9fb7;return this[_0x55e767(0x38d)];}get[_0x5b9fb7(0x3d5)](){const _0x1b3b34=_0x5b9fb7;return this[_0x1b3b34(0x38d)]??_0x1b0e64;}[_0x5b9fb7(0x2c3)](_0x479220){const _0xb7117c=_0x5b9fb7;if(_0x1121b9[_0xb7117c(0x31f)]!==_0xb7117c(0x381))return;const _0x580a7a=this[_0xb7117c(0x3d5)];if(!_0x580a7a[_0xb7117c(0x313)]?.[_0x479220]){const _0x5170e6=_0x580a7a['_isFree']?_0xb7117c(0x2fc)+_0x479220+_0xb7117c(0x29d)+_0x479220+'\x22\x20to\x20enable\x20it.':_0xb7117c(0x3a0)+_0x479220+_0xb7117c(0x2b1)+_0x479220+'\x22.';throw new _0x2f99f3(_0x5170e6,'LICENSE_FEATURE_DISABLED',{'feature':_0x479220});}}[_0x5b9fb7(0x143)](_0x23cf9c){const _0x313f50=_0x5b9fb7;if(_0x1121b9[_0x313f50(0x31f)]!=='true')return!![];return!!this[_0x313f50(0x3d5)][_0x313f50(0x313)]?.[_0x23cf9c];}[_0x5b9fb7(0x183)](_0xf9695d,_0x59a2f8){const _0x5b4d7b=_0x5b9fb7;if(_0x1121b9[_0x5b4d7b(0x31f)]!==_0x5b4d7b(0x381))return;const _0x5e1c94=this[_0x5b4d7b(0x3d5)],_0x1f04fa=_0x5e1c94[_0x5b4d7b(0x16c)]?.[_0xf9695d];if(_0x1f04fa===null||_0x1f04fa===undefined||_0x1f04fa===0x0)return;if(_0x59a2f8>=_0x1f04fa)throw new _0x2f99f3(_0x5b4d7b(0x190)+_0xf9695d+'\x20('+_0x59a2f8+'/'+_0x1f04fa+')','LICENSE_LIMIT_EXCEEDED',{'limit':_0xf9695d,'current':_0x59a2f8,'max':_0x1f04fa});}async[_0x5b9fb7(0x320)](_0x1b05aa){const _0xc2164b=_0x5b9fb7;let _0x4aa322;try{_0x4aa322=_0x14aeec[_0xc2164b(0x299)](_0x1b05aa);}catch(_0x5a6018){throw new _0x2f99f3('Invalid\x20license\x20blob:\x20'+_0x5a6018[_0xc2164b(0x172)],_0xc2164b(0x25b));}let _0x48f24c;try{_0x48f24c=_0x5bb3e2[_0xc2164b(0x295)](null,_0x4aa322[_0xc2164b(0x2e2)],_0x1121b9[_0xc2164b(0x185)],_0x4aa322[_0xc2164b(0x2db)]);}catch(_0x249e45){throw new _0x2f99f3(_0xc2164b(0x11d)+_0x249e45[_0xc2164b(0x172)],_0xc2164b(0x25b));}if(!_0x48f24c)throw new _0x2f99f3(_0xc2164b(0x396)+('Build\x20expects\x20public\x20key\x20fingerprint\x20'+_0x1121b9[_0xc2164b(0x281)]+'.\x20')+_0xc2164b(0x384),_0xc2164b(0x25b),{'expectedFingerprint':_0x1121b9[_0xc2164b(0x281)]});if(_0x4aa322['decoded'][_0xc2164b(0x364)]===_0x1a4cff){const _0x6086ec=_0x4aa322['decoded'][_0xc2164b(0x217)]-_0x4aa322[_0xc2164b(0x379)][_0xc2164b(0x23d)];if(_0x6086ec>_0x5e9d82)throw new _0x2f99f3('Open\x20licenses\x20cannot\x20exceed\x206\x20months\x20duration\x20(this\x20license\x20expires\x20'+Math[_0xc2164b(0x13d)](_0x6086ec/(0x1e*0x5265c00))+_0xc2164b(0x1b3),_0xc2164b(0x25b));}const _0x4b4387=this['okdb']['_systemEnv'];await _0xf740a4(_0x4b4387);const _0x53f95f=_0x14aeec[_0xc2164b(0x20f)](_0x4aa322[_0xc2164b(0x1b4)])[_0xc2164b(0x3be)](_0xc2164b(0x140));for(const {value:_0x2cba6b}of _0x4b4387['getRange'](_0x55a401)){if(_0x2cba6b[_0xc2164b(0x1e4)]===_0x53f95f)throw new _0x2f99f3(_0xc2164b(0x2f8),'LICENSE_INVALID');}const _0x4315de=_0x5bb3e2[_0xc2164b(0xd7)](),_0x4edaba={'blob':_0x1b05aa,'activation':null,'addedAt':Date[_0xc2164b(0xd5)](),'_licenseHash':_0x53f95f,'licensee':_0x4aa322[_0xc2164b(0x379)]['licensee'],'expiresAt':_0x4aa322[_0xc2164b(0x379)][_0xc2164b(0x217)],'features':_0x4aa322[_0xc2164b(0x379)]['features'],'limits':_0x4aa322[_0xc2164b(0x379)][_0xc2164b(0x16c)],'licenseType':_0x4aa322[_0xc2164b(0x379)][_0xc2164b(0x364)]};return await _0x4b4387[_0xc2164b(0xd3)](_0x55a401,_0x4315de,_0x4edaba),{'id':_0x4315de,..._0x4edaba};}async[_0x5b9fb7(0x3b6)](_0x22f3ea){const _0x1ff9bb=_0x5b9fb7;let _0x5c095d;try{_0x5c095d=_0x14aeec[_0x1ff9bb(0x191)](_0x22f3ea);}catch(_0x2ca23d){throw new _0x2f99f3(_0x1ff9bb(0x2ac)+_0x2ca23d[_0x1ff9bb(0x172)],_0x1ff9bb(0x237));}const _0x10825f=_0x5c095d[_0x1ff9bb(0x20f)][_0x1ff9bb(0x3be)](_0x1ff9bb(0x140)),_0xc49243=this['okdb'][_0x1ff9bb(0x318)];if(!_0xc49243||!_0xc49243[_0x1ff9bb(0x11f)](_0x55a401))throw new _0x2f99f3(_0x1ff9bb(0x2fe),_0x1ff9bb(0x237));let _0x40759a=null,_0x122f75=null;for(const {key:_0x438a1a,value:_0x7e9666}of _0xc49243[_0x1ff9bb(0x3c7)](_0x55a401)){if(_0x7e9666['_licenseHash']===_0x10825f){_0x40759a=_0x438a1a,_0x122f75=_0x7e9666;break;}}if(!_0x40759a)throw new _0x2f99f3('No\x20license\x20found\x20matching\x20this\x20activation\x20token',_0x1ff9bb(0x237));const {rawBuf:_0x2d5f5c}=_0x14aeec[_0x1ff9bb(0x299)](_0x122f75[_0x1ff9bb(0x35d)]),_0x2240fc=_0x14aeec[_0x1ff9bb(0x258)]({'tokenString':_0x22f3ea,'nodeId':this[_0x1ff9bb(0x1cd)]['id'],'rawBlobBuf':_0x2d5f5c,'pubKeyPem':_0x1121b9[_0x1ff9bb(0x185)],'pubFingerprint':_0x1121b9[_0x1ff9bb(0x281)]});if(!_0x2240fc[_0x1ff9bb(0x386)])throw new _0x2f99f3('Activation\x20invalid:\x20'+_0x2240fc[_0x1ff9bb(0x188)],_0x1ff9bb(0x237),{'reason':_0x2240fc[_0x1ff9bb(0x188)]});const _0x5528e0={..._0x122f75,'activation':_0x22f3ea};return await _0xc49243[_0x1ff9bb(0x1be)](_0x55a401,_0x40759a,_0x5528e0),{'id':_0x40759a,..._0x5528e0};}async['removeLicense'](_0x4dab89){const _0x14d468=_0x5b9fb7,_0x3e7bb8=this[_0x14d468(0x1cd)][_0x14d468(0x318)];if(!_0x3e7bb8||!_0x3e7bb8['hasType'](_0x55a401))return;await _0x3e7bb8[_0x14d468(0x103)](_0x55a401,_0x4dab89);}async[_0x5b9fb7(0x337)](){const _0x34dd10=_0x5b9fb7,_0x38d6fa=this[_0x34dd10(0x1cd)][_0x34dd10(0x318)];if(!_0x38d6fa||!_0x38d6fa[_0x34dd10(0x11f)](_0x55a401))return[];const _0xddc417=this[_0x34dd10(0x1cd)]['id'],_0x1d6b0b=[];for(const {key:_0x1369a4,value:_0x36bfe9}of _0x38d6fa[_0x34dd10(0x3c7)](_0x55a401)){const _0x475fd0=this[_0x34dd10(0x170)](_0x36bfe9,_0xddc417);_0x1d6b0b[_0x34dd10(0x1bb)]({..._0x36bfe9,'id':_0x1369a4,'status':_0x475fd0});}return _0x1d6b0b;}['getPins'](){const _0x3e08f7=_0x5b9fb7,_0x531bc3=this[_0x3e08f7(0x1cd)]['_systemEnv'];if(!_0x531bc3||!_0x531bc3[_0x3e08f7(0x11f)](_0x55a401))return[];const _0x42ef01=this[_0x3e08f7(0x1cd)]['id'],_0x5bbb70=[];for(const {key:_0x96db9f,value:_0x10b1e4}of _0x531bc3['getRange'](_0x55a401)){if(_0x10b1e4[_0x3e08f7(0x1e4)]){if(_0x10b1e4[_0x3e08f7(0x364)]===_0x1a4cff)_0x5bbb70['push']({'licenseId':_0x96db9f,'pin':null});else{const _0x1d3278=Buffer[_0x3e08f7(0xf8)](_0x10b1e4[_0x3e08f7(0x1e4)],_0x3e08f7(0x140)),{pin:_0x179ab7}=_0x14aeec['derivePin'](_0x42ef01,_0x1d3278,_0x1121b9[_0x3e08f7(0x281)]);_0x5bbb70['push']({'licenseId':_0x96db9f,'pin':_0x179ab7});}}}return _0x5bbb70;}async[_0x5b9fb7(0x1ea)](){const _0x1a3153=_0x5b9fb7,_0x3708b2=this[_0x1a3153(0x38d)];await this[_0x1a3153(0x3b2)]();if(this[_0x1a3153(0x38d)]&&this[_0x1a3153(0x38d)]['licenseType']===_0x1a4cff){const _0x902fb1=Math['ceil']((this[_0x1a3153(0x38d)]['expiresAt']-Date[_0x1a3153(0xd5)]())/0x5265c00);this[_0x1a3153(0x1cd)][_0x1a3153(0x305)]?.[_0x1a3153(0x387)](_0x1a3153(0xdb)+_0x902fb1+_0x1a3153(0x29a),{'feature':_0x1a3153(0x3a4),'licensee':this['_active'][_0x1a3153(0x33d)],'expiresAt':new Date(this[_0x1a3153(0x38d)][_0x1a3153(0x217)])['toISOString']()});}this['_active']&&this[_0x1a3153(0x38d)][_0x1a3153(0x364)]===_0x1bcd6e&&this[_0x1a3153(0x1cd)][_0x1a3153(0x305)]?.[_0x1a3153(0x387)](_0x1a3153(0xc6),{'feature':_0x1a3153(0x3a4),'licensee':this[_0x1a3153(0x38d)][_0x1a3153(0x33d)]});if(_0x3708b2&&!this['_active']){this[_0x1a3153(0x1cd)]['log']?.[_0x1a3153(0x387)](_0x1a3153(0x1fb),{'feature':_0x1a3153(0x3a4)}),this['okdb']['events']?.[_0x1a3153(0x3b3)](_0x117735[_0x1a3153(0x25b)],{'previous':_0x3708b2});const _0x3c0a44=this[_0x1a3153(0x1cd)]['options']?.[_0x1a3153(0xfc)]??_0x1121b9[_0x1a3153(0xe1)];_0x3c0a44===_0x1a3153(0x3cb)&&(this[_0x1a3153(0x1cd)][_0x1a3153(0x305)]?.[_0x1a3153(0x389)](_0x1a3153(0x223),{'feature':_0x1a3153(0x3a4)}),this[_0x1a3153(0x1cd)]['close']()[_0x1a3153(0x38c)](()=>{})[_0x1a3153(0x3cf)](()=>process[_0x1a3153(0x34a)](0x1)));}}}return okdbLicense={'LicenseChecker':_0x5338e1,'_C':_0x1121b9},okdbLicense;}var okdbShell,hasRequiredOkdbShell;function _0x1d61(){const _0x1a1991=['license:added','stdin','revoke','decoded','access:\x20','\x20which\x20does\x20not\x20exist','env/','\x20\x20\x20\x20api:\x20\x20\x20http://localhost:','env:removed','\x20\x20\x20\x20\x20control\x20log\x20verbosity\x0a\x20\x20','object','true','\x20\x20http://localhost:','endsWith','Either\x20the\x20build\x20was\x20made\x20with\x20a\x20different\x20keypair,\x20or\x20the\x20license\x20was\x20issued\x20with\x20a\x20different\x20private\x20key.','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20show\x20this\x20help\x0a\x20\x20','valid','warn','LICENSEE','error','_lookupByName','type/users/query\x20{\x22active\x22:true}','catch','_active','address','Foreign\x20key\x20violation:\x20','[okdb]\x20created\x20.kdbconfig','OKDBAlreadyExistsError','CREATED','cyan','44259LHdaLl','\x20\x20[okdb]\x20closed\x20cleanly\x0a','License\x20signature\x20invalid\x20—\x20this\x20license\x20was\x20not\x20signed\x20by\x20the\x20key\x20paired\x20with\x20this\x20build.\x20','split','\x20\x20\x20\x20license:\x20','\x20\x20\x20\x20usage:\x20\x20\x20','TYPE_NOT_REGISTERED','--path','writeUInt8','\x20(expires\x20','\x20\x20Writes:\x20\x20','setTtl','Feature\x20not\x20licensed:\x20','green',')\x20to\x20your\x20license\x20vendor.','hasOwnProperty','license','OKDBUniqueConstraintError','\x0a\x20\x20✓\x20License\x20added','\x20\x20✓\x20','/api/env/','\x20result','argv','/type/users/item/alice\x0a\x20\x20\x20\x20','registerIndex','—\x20/api/\x20is\x20auto-prefixed,\x20env\x20is\x20auto-injected','okdb.pid','\x20already\x20in\x20use','mkdirSync','readUInt8','reload','emit','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','detectInputType','activateLicense','values','\x20\x20All\x20checks\x20passed.\x0a','item:create','\x1b[0m','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20has\x20expired\x20—\x20request\x20a\x20fresh\x20one.','syncPeers','scrypt','toString','Index\x20\x22','inputSchema','path','\x20\x20\x20\x20id:\x20\x20\x20\x20','database\x20path\x20not\x20writable:\x20','fts:drop','files','attach','getRange','types\x20--env\x20staging','line','label','shutdown','GET','errors','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20override\x20active\x20environment\x20for\x20this\x20call\x0a\x20\x20','finally','node','engines','setPrompt','[okdb]\x20exporting\x20blobs…','ttl:expired','effective','--no-admin','POST','[okdb]\x20importing\x20','Types','processors/','209OGKefv','fts:','clearTtl','Index\x20\x27','hidden','~tokens','⚠\x20INTERNAL\x20LICENSE\x20ACTIVE\x20—\x20all\x20features\x20and\x20limits\x20are\x20unlocked.\x20For\x20vendor/internal\x20use\x20only.','entries','debug','\x20—\x20type\x20env\x20to\x20list\x20available\x0a','\x20\x20(name:\x20','\x20tokens:','code','--key','\x27:\x20','\x20\x20(','\x20\x20\x20\x20status:\x20\x20\x20\x20','--label','createdAt','put','sub','now','\x20\x20║','randomUUID','\x20days\x20—\x20POC/demo\x20only,\x20not\x20node-bound)','\x20\x20Shell\x20commands','title','⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20','readUInt32BE','migrate','OPEN','win32','txn:rollback','LICENSE_EXPIRED_ACTION','/\x20quit\x20/\x20Ctrl+C','\x20\x20\x20\x20-\x20The\x20license\x20blob\x20has\x20not\x20been\x20added\x20yet\x20—\x20run\x20`okdb\x20license\x20<blob>`\x20first.','\x20\x20Error:\x20','filter','existsSync','sizeBefore','MALFORMED_TOKEN','noRepl','system:stopped','[okdb]\x20opening\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/envs\x0a\x20\x20\x20\x20','username','xdg-open\x20','toLocaleString','system:poke','white','\x20\x20\x20\x20expires:\x20\x20\x20','\x27\x20on\x20type\x20\x27','timeMachine','[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22','description','time','from','invalid','ttl','handle','onLicenseExpired','bus:poke','\x20\x20skipped=','LICENSE_HASH_MISMATCH','some','--help','children','remove','freeze','SIGTERM','\x20\x20✗','node\x20','\x0d[okdb]\x20','\x20\x20records=','[okdb]\x20failed\x20to\x20parse\x20config\x20file\x20','transport','platform','selfAddress','[okdb]\x20error:\x20unrecognized\x20input:\x20\x22','Cannot\x20set\x20enforce\x20schema\x20on\x20','ALREADY_EXISTS','\x20\x20changes=','\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20','system:bus_state_change','api','http','\x0a\x20\x20Run\x20okdb\x20to\x20start\x20the\x20server.\x0a','[okdb]\x20reset\x20aborted','_license','[okdb]\x20closed\x20cleanly\x0a','\x20\x20\x20\x20writes:\x20\x20\x20\x20','70kxdDyy','activation','License\x20signature\x20invalid:\x20','stack','hasType','resetIndex','toISOString','queue/','UNIQUE_CONSTRAINT','Hint:\x20','fts:reset','../okdb','\x0d[okdb]\x20blobs:\x20','map','\x20\x20╔═══════════════════════════╗','dropSchema','config','readline','homedir','already\x20in\x20use','once','\x20\x20[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a','\x20\x20→\x20\x20','port\x20','\x0a[okdb]\x20fatal\x20error:','startsWith','ready','__writeCounter','enabled','use','type:drop','1.8.12','1506340ihcsWs','unique:violation','ceil','get','SCHEMA_COLLECTION_INVALID','hex','\x20references\x20','\x0a\x20\x20\x20\x20','isFeatureEnabled','\x20\x20\x20\x20•\x20a\x20path\x20to\x20a\x20.license\x20file','Invalid\x20primary\x20key\x20type:\x20','--name','LOGS','version','Version\x20mismatch\x20for\x20','\x20does\x20not\x20exist','name','id:\x20','trimStart','toFixed','round','.kdbconfig','index:registered','open\x20','dropIndex','derivePin','./okdb-data','tags','./okdb-export.ndjson','NOT_FOUND','fts','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20was\x20issued\x20for\x20a\x20different\x20node\x20—\x20share\x20this\x20node\x27s\x20PIN\x20with\x20the\x20vendor.','reset','detachConsole','--token','__OKDB_PUB_FINGERPRINT__','routes','pending','{}[]:,\x0a\x0d\x09\x20','operation','\x20licenses','/admin/index.html','FOREIGN_KEY_VIOLATION','readUInt16BE','sourceType','--env','\x20to\x20quit.','\x20\x20⚠','result','limits','\x20\x20Usage:\x20okdb\x20license\x20[<blob|path|uuid|activation-token>]','readFileSync','addedAt','_computeStatus','trim','message','[okdb]\x20error:\x20--password\x20requires\x20--name','VERB','/api/','\x20\x20\x20\x20\x20\x20\x20POST\x20(body\x20implies\x20POST)\x0a\x20\x20','typeSubDbs','decodeLicenseBlob:\x20failed\x20to\x20decode\x20payload:\x20','halted','Invalid\x20index\x20key\x20type\x20for\x20\x27','\x20\x20\x20\x20status:\x20\x20\x20\x20active\x20\x20(open\x20license\x20—\x20no\x20activation\x20needed)','952uXoBaK','\x20\x20[','stopped','body','\x20\x20⚠\x20\x20','meta','writes=','assertLimit','HTTP\x20','PUBLIC_KEY_PEM','current','259YVtBfV','reason','admin','--blobs','SIGINT','permissions','5217805CtNfQz','wrong_node','VERSION_MISMATCH','License\x20limit\x20exceeded:\x20','decodeActivationToken','\x20logs\x20on\x20\x20','\x20to\x20browse\x20the\x20API,\x20','--port','input:\x20','uuid','type/','password','--grants','\x20\x20+','\x20\x20Usage:','[okdb]\x20exporting\x20env\x20\x22','\x20bytes,\x20need\x20>=\x2065)','PUT\x20type/users/item/x\x20{\x22n\x22:1}','starting','system:clock_change','\x0a\x20\x20No\x20routes\x20matching\x20\x22','Processors','createHmac','\x20\x20Flags','val','SIG_INVALID','started','env','\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.','SIGBREAK','<path>','reverse','(null)','length','toUpperCase','item:update','\x20\x20\x20\x20path:\x20\x20','null','\x20months\x20from\x20issuance)','rawBuf','transaction','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20','envs','transport:\x20','dynamic','\x20\x20╚═══════════════════════════╝','push','DELETE\x20type/users/item/x','writeUInt32BE','update','toLowerCase','\x1b[35m','exportBlobs','keys','set','\x20\x20\x20\x20limits:\x20\x20\x20\x20','\x20log\x20level:\x20','columns','[env]','replace','mcp','spki','\x27\x20doesn\x27t\x20exist','1405292rfIuyt','okdb','OKDBSchemaValidationError','system:drain','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','data','changes','level','sync:apply','\x0a[okdb]\x20error:\x20','\x20\x20\x20\x20license:\x20⚠\x20OPEN\x20—\x20','PUT','\x20\x20\x20\x20admin:\x20http://localhost:','\x20file','\x20\x20·\x20','[okdb]\x20port\x20','darwin','type/users\x20--help','\x22\x20matches\x20','type/users','\x20\x20\x20\x202.\x20The\x20vendor\x20returns\x20an\x20activation\x20token.','PERMISSIONS','decodeActivationToken:\x20expected\x2077\x20bytes,\x20got\x20','decodeActivationToken:\x20input\x20must\x20be\x20a\x20string','_licenseHash','init','\x27\x20is\x20already\x20registered','default','registerFts','\x0a\x0a\x20\x20','recheck','\x20/\x20','utf8','type','sync','\x20\x20(licenses\x20must\x20be\x20signed\x20by\x20the\x20matching\x20private\x20key)','[okdb]\x20error:\x20','ACTIVATION_EXPIRED','\x20in\x20','\x0a[okdb]\x20received\x20','allocUnsafe','\x20\x20Common\x20causes:','\x0a\x20\x20Raw\x20token\x20(shown\x20once,\x20save\x20it\x20now):\x0a','[okdb]\x20unknown\x20token\x20action:\x20\x22','[okdb]\x20error:\x20--address\x20is\x20required\x20for\x20join\x20(this\x20node\x27s\x20reachable\x20sync\x20address).\x0a','~licenses','--config','License\x20expired\x20or\x20invalidated','forEach','INDEX_HAS_CONSUMERS','[okdb]\x20close\x20error:\x20','--version','[okdb]\x20./okdb-data\x20already\x20exists\x20—\x20skipping','indexToDb','dropFts','\x20SECURITY\x20NOTICE','write','\x20\x20\x20\x20features:\x20\x20','summary','sizeAfter','[okdb]\x20.kdbconfig\x20already\x20exists\x20—\x20skipping','licensed','FEATURES','(empty)','\x20for\x20commands,\x20','index','application/json','licenseHash','[okdb]\x20error:\x20revoke\x20requires\x20an\x20id\x20argument','Embeddings','body:\x20','\x1b[90m','OKDBVersionMismatchError','INDEX_ALREADY_REGISTERED','close','expiresAt','\x20logs\x20off\x0a','has','[body]','system:ready','export','license:removed','idx:','OKDBInvalidValueError','18108oMYavW','loadEnvFile','[okdb]\x20invalid\x20log\x20level:\x20\x22','Shutting\x20down\x20due\x20to\x20license\x20expiry','import','\x0a\x20\x20Joining\x20cluster\x20at\x20','--drop','(none)','logLevel','\x20\x20\x20\x20status:\x20\x20\x20\x20pending\x20activation','type/users/item/alice','\x0a\x20\x20[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Or\x20set\x20sync.address\x20in\x20.kdbconfig','_envs','\x20active\x20env:\x20','dbPath','OKDBError','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20','types:','yellow','unlinkSync','listRoutes','LICENSE_ACTIVATION_INVALID','--username','net','0123456789ABCDEFGHJKMNPQRSTVWXYZ','Cannot\x20delete\x20','/api','issuedAt','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','slice','padEnd','token','\x20\x20\x20\x20\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/','--types','yes','search','OKDBSchemaCollectionError','(on\x20any\x20path\x20command)','\x20\x20\x20\x20•\x20a\x20license\x20id\x20\x20\x20\x20\x20(uuid)','help','call','database\x20path\x20writable:\x20','\x20\x20(press\x20Ctrl+C\x20again\x20to\x20exit)\x0a','constructor','false','hint','\x20\x20✓\x20OKDB\x20server\x20running','includes','stderr','sort','tags:\x20','free\x20tier','rmSync','\x20documents\x20fail\x20validation','verifyActivation','\x1b[37m','[okdb]\x20error:\x20join\x20requires\x20a\x20remote\x20address.\x20Usage:\x20okdb\x20join\x20<address>\x20--token\x20<t>','LICENSE_INVALID','terminal','use\x20<env>','%),\x20','sha256','Type\x20\x27','278270QUjNAV','index:progress','createPublicKey','ttl:set','Files','TYPES','indexes','QUIT','\x20\x20✓\x20http\x20listening\x20on\x20:','--password','EXIT','Queue','ftsName','--ttl','schema:set','dest','createInterface','No\x20tokens.','key','\x22.\x20Use:\x20create,\x20list,\x20revoke','prompt','auth','isTTY','isArray','111678ZQHaYa','bold','types','index:drop','config\x20file\x20valid:\x20','--address','join','exec','PUB_FINGERPRINT','writeFileSync','copy','[okdb]\x20started\x20in\x20','repeat','\x20\x20\x20\x20port:\x20\x20','.\x20Primary\x20keys\x20must\x20be\x20string\x20or\x20number.\x20Got:\x20','expired',',\x20label:\x20','dim','Admin','cause','\x20\x20Type\x20','\x20\x20Usage:\x20','env/staging/info','ENV','\x20\x20Envs:\x20\x20\x20\x20','\x20\x20[okdb]\x20','logRequests','files/','verify','--env\x20<name>','\x20type','digest','decodeLicenseBlob','\x20day(s).','off','[okdb]\x20export\x20complete','.\x20Add\x20a\x20license\x20that\x20includes\x20\x22','base64url','indexOf','doctor','\x20\x20\x20\x201.\x20Send\x20the\x20PIN\x20above\x20(','value','param','roles','\x20\x20\x20\x20status:\x20\x20\x20\x20active','\x20writes\x20(','floor','received\x20','\x20\x20\x20\x20\x20explicit\x20method\x0a\x0a\x20\x20','\x1b[32m','\x20\x20Example:\x20okdb\x20join\x20https://node-a.example.com\x20--token\x20<t>\x20--address\x20http://myhost:8484\x0a','Invalid\x20activation\x20token:\x20','port','type/users/item/alice\x20--env\x20staging','[okdb]\x20error:\x20license\x20management\x20is\x20only\x20available\x20in\x20licensed\x20builds\x20(npm\x20run\x20build:prod).','\x1b[36m','.\x20The\x20active\x20license\x20does\x20not\x20enable\x20\x22','active:','string','\x20\x20\x20http://localhost:','\x20\x20\x20\x20','creating','EXPIRES','Indexes','resetting','dropType','timingSafeEqual','\x0a[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a','127.0.0.1','EADDRINUSE','license:activated','\x20\x20\x20\x20\x20\x20\x20\x20\x20browse\x20API\x20routes,\x20grouped\x20by\x20area\x0a\x20\x20','createHash','records','assertFeature','envs=','../','types/env=','stringify','getSecurityNotices','failures','maxWrites','targetType','history','safety','embeddings','[okdb]\x20error:\x20show\x20requires\x20an\x20id\x20argument','status','noAdmin','kind','prototype','grants','level:\x20info','env:opened','Engines','find','System','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20GET\x20(implicit)\x0a\x20\x20','sig','\x20\x20\x20\x20\x20\x20\x20','index:reset','unknown','\x0a\x20\x20No\x20documentation\x20found\x20for:\x20','alloc','(add\x20a\x20license\x20first)','payload','DELETE','start\x20','(unset)','Environments','OKDBIndexNotRegisteredError','[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22','\x20already\x20exists','gray','\x20document(s)\x20reference\x20it\x20with\x20onDelete:restrict','available','schema:drop','parse','--log-level','\x20\x20·\x20\x20','[okdb]\x20starting…\x0a','\x20opening\x20','\x20<path>\x20[json-body]','[okdb]\x20loaded\x20config:\x20','pin','\x20\x20Expected\x20one\x20of:','backup','License\x20already\x20stored','listening','concat','[okdb]\x20error:\x20join\x20requires\x20credentials.\x20Provide\x20--token\x20<t>\x20or\x20--username\x20<u>\x20--password\x20<p>','Feature\x20not\x20available\x20on\x20free\x20tier:\x20','\x20\x20\x20\x20permissions:\x20','No\x20license\x20found\x20matching\x20this\x20activation\x20token','\x20\x20\x20\x20\x20\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','dirname','item:remove','system','typesPerEnv','\x1b[34m','log','NAME','[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20show\x20active\x20environment\x20+\x20list\x20all\x20envs\x0a\x20\x20','\x20\x20score:','USE','every','standard','/types\x0a\x20\x20\x20\x20','\x20\x20(licensee:\x20','max','OKDBInvalidPrimaryKeyError','[on|off|level]','method','features','drop','statSync','http://localhost:','quit','_systemEnv',':\x20expected\x20','count','Unique\x20constraint\x20violated\x20on\x20','type:registered','[okdb]\x20backing\x20up\x20to\x20','\x0a\x20\x20','LICENSED_BUILD','addLicense','magenta','\x20\x20Some\x20checks\x20failed.\x0a','logs','\x20→\x20POST\x20/api/env/','charCodeAt','\x20\x20\x20\x20licensee:\x20\x20','crypto','unique:violation_resolved','access','list','\x20\x20Next\x20step\x20—\x20activate\x20the\x20license:','create','bind','padStart','--permissions','blobs','stopping','[okdb]\x20created\x20./okdb-data','\x20\x20\x20\x20•\x20a\x20license\x20blob\x20\x20\x20(Crockford\x20base32,\x20~150–250\x20chars)','setSchema','\x1b[31m','\x20\x20\x20\x20graceful\x20shutdown\x0a','listLicenses','resetFts','queue','registerType','info','getPins','licensee','active','resolve','\x0a\x20\x20Joined.\x20Remote\x20tokens\x20replicated.\x20You\x20can\x20now\x20log\x20in\x20with\x20cluster\x20credentials.\x0a','byteLength','properties','\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','[okdb]\x20backup\x20complete','\x20\x20Tier:\x20\x20\x20\x20','[okdb]\x20error:\x20--grants\x20must\x20be\x20valid\x20JSON\x20object','ttl:clear',',\x20closing…\x0a','importBlobs','exit','isFile','--changes','TYPE_ALREADY_REGISTERED','OKDBIndexAlreadyRegisteredError','keys/public.pem','listen','\x20\x20(unlimited)','ROUTES','\x20\x20Path\x20access','/type/users/query\x0a\x20\x20\x20\x20','stdout','[okdb]\x20blobs:\x20imported=','--open','OKDBIndexHasConsumersError','\x20\x20\x20\x20\x20\x20','\x0a\x20\x20Invalid\x20JSON:\x20','ref:violation_resolved','Sync','blob','\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/','\x22\x20already\x20exists',']\x20already\x20maps\x20to\x20\x27','targetKey','child_process','[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22','licenseType','\x20\x20Usage:\x20logs\x20[on|off|debug|info|warn|error]','OKDBForeignKeyDeleteError','\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','fieldPath','red','test','references','<json-body>','LABEL','keys:','clearLine','\x20(must\x20be\x201–65535)','randomBytes','expiry','min','\x20MB)','open'];_0x1d61=function(){return _0x1a1991;};return _0x1d61();}function requireOkdbShell(){const _0x2cf9fb=_0x4f7fbb;if(hasRequiredOkdbShell)return okdbShell;hasRequiredOkdbShell=0x1;const _0x17967e=require$$0$2,_0xf8d260=require$$1,_0x492d3f=require$$2$1,_0x263355=require$$1$1,_0x2d656f=_0x263355[_0x2cf9fb(0x27f)](_0x492d3f[_0x2cf9fb(0x12d)](),'.kdb_history'),_0x5e60ab=0x3e8,_0x4b6afe={'reset':_0x2cf9fb(0x3ba),'bold':'\x1b[1m','dim':'\x1b[2m','red':_0x2cf9fb(0x335),'green':_0x2cf9fb(0x2aa),'yellow':'\x1b[33m','blue':_0x2cf9fb(0x304),'magenta':_0x2cf9fb(0x1c0),'cyan':_0x2cf9fb(0x2b0),'white':_0x2cf9fb(0x259),'gray':_0x2cf9fb(0x213)},_0xfd3c86=!process['stdout']['isTTY']||!!process.env.NO_COLOR,_0x2943c5=(_0x5c81eb,_0x492f8e)=>_0xfd3c86?_0x492f8e:''+_0x5c81eb+_0x492f8e+_0x4b6afe['reset'],_0x30d676={'error':_0x4b6afe['red'],'warn':_0x4b6afe[_0x2cf9fb(0x234)],'info':_0x4b6afe['cyan'],'debug':_0x4b6afe['gray']},_0x455389={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3};function _0x1dabaa(_0x5547f8,_0x5abad7='info'){const _0x293bd5=_0x2cf9fb,{level:_0x5ca4bb,msg:_0x7442f8,meta:_0x4d7b73,context:_0x1510bd,ts:_0x55a40b}=_0x5547f8;if((_0x455389[_0x5ca4bb]??0x1)<(_0x455389[_0x5abad7]??0x1))return;const _0x205dc9=_0x2943c5(_0x4b6afe[_0x293bd5(0x2ea)],new Date(_0x55a40b)['toISOString']()),_0x9afa63=_0x2943c5(_0x30d676[_0x5ca4bb]??_0x4b6afe[_0x293bd5(0xf1)],_0x5ca4bb[_0x293bd5(0x240)](0x5));let _0x25e1b9='\x20\x20'+_0x205dc9+'\x20'+_0x2943c5(_0x4b6afe[_0x293bd5(0x27a)],_0x9afa63)+'\x20'+_0x7442f8;if(_0x4d7b73&&Object[_0x293bd5(0x1c2)](_0x4d7b73)[_0x293bd5(0x1ae)]>0x0){const _0xc7fe7d=Object[_0x293bd5(0xc7)](_0x4d7b73)['map'](([_0x4557e3,_0x4e9a54])=>_0x4557e3+'='+_0x4e9a54)['join']('\x20');_0x25e1b9+=_0x2943c5(_0x4b6afe['dim'],'\x20\x20['+_0xc7fe7d+']');}if(_0x1510bd!==undefined){const _0x2c1a1d=typeof _0x1510bd===_0x293bd5(0x380)?JSON[_0x293bd5(0x2c7)](_0x1510bd):String(_0x1510bd);_0x25e1b9+=_0x2943c5(_0x4b6afe[_0x293bd5(0x28a)],'\x20\x20'+_0x2c1a1d);}const _0x2e1784=_0x5ca4bb===_0x293bd5(0x389)||_0x5ca4bb===_0x293bd5(0x387)?process[_0x293bd5(0x252)][_0x293bd5(0x204)][_0x293bd5(0x32d)](process[_0x293bd5(0x252)]):process[_0x293bd5(0x355)][_0x293bd5(0x204)][_0x293bd5(0x32d)](process[_0x293bd5(0x355)]);_0x2e1784(_0x25e1b9+'\x0a');}function _0xfff428(_0x4727bc,_0x2db28c){const _0x52fd27=_0x2cf9fb;if(_0x4727bc===0xcc||_0x4727bc>=0xc8&&_0x4727bc<0x12c&&!_0x2db28c){console[_0x52fd27(0x305)](_0x52fd27(0x31e)+_0x2943c5(_0x4b6afe[_0x52fd27(0x3a1)],'✓')+'\x0a');return;}if(_0x4727bc>=0x190||_0x2db28c?.[_0x52fd27(0x389)]){const _0x2cc08a=_0x2db28c?.[_0x52fd27(0x389)]??_0x2db28c?.['message']??_0x52fd27(0x184)+_0x4727bc;console[_0x52fd27(0x305)](_0x52fd27(0x31e)+_0x2943c5(_0x4b6afe['red'],'✗')+'\x20'+_0x2943c5(_0x4b6afe[_0x52fd27(0x27a)]+_0x4b6afe[_0x52fd27(0x369)],String(_0x4727bc))+'\x20\x20'+_0x2cc08a+'\x0a');return;}const _0x1480f0=Object[_0x52fd27(0x2d3)]['hasOwnProperty'][_0x52fd27(0x24a)](_0x2db28c??{},_0x52fd27(0x16b))?_0x2db28c[_0x52fd27(0x16b)]:_0x2db28c,_0x169c3d=_0x2db28c?.[_0x52fd27(0x181)];console[_0x52fd27(0x305)](''),_0x128f75(_0x1480f0,'\x20\x20');if(_0x169c3d?.[_0x52fd27(0x31a)]!=null||_0x169c3d?.['time']!=null){const _0x3a7ecc=[];if(_0x169c3d[_0x52fd27(0x31a)]!=null)_0x3a7ecc[_0x52fd27(0x1bb)](_0x169c3d[_0x52fd27(0x31a)]+_0x52fd27(0x3a9)+(_0x169c3d[_0x52fd27(0x31a)]!==0x1?'s':''));if(_0x169c3d['time']!=null)_0x3a7ecc['push'](_0x169c3d[_0x52fd27(0xf7)]+'ms');console[_0x52fd27(0x305)](_0x52fd27(0x31e)+_0x2943c5(_0x4b6afe[_0x52fd27(0x28a)],_0x3a7ecc[_0x52fd27(0x27f)](_0x52fd27(0x2f0))));}console[_0x52fd27(0x305)]('');}function _0x128f75(_0x194fbf,_0x935e5e=''){const _0x5dbdec=_0x2cf9fb;if(_0x194fbf===null||_0x194fbf===undefined){console[_0x5dbdec(0x305)](_0x935e5e+_0x2943c5(_0x4b6afe[_0x5dbdec(0x28a)],_0x5dbdec(0x1ad)));return;}if(Array[_0x5dbdec(0x278)](_0x194fbf)){if(_0x194fbf[_0x5dbdec(0x1ae)]===0x0){console['log'](_0x935e5e+_0x2943c5(_0x4b6afe['dim'],_0x5dbdec(0x20b)));return;}if(_0x194fbf[_0x5dbdec(0x30b)](_0x38c0e4=>_0x38c0e4&&typeof _0x38c0e4==='object'&&_0x5dbdec(0x273)in _0x38c0e4&&_0x5dbdec(0x2a2)in _0x38c0e4)){_0x380a6c(_0x194fbf,_0x935e5e);return;}if(_0x194fbf[_0x5dbdec(0x30b)](_0x2c9818=>_0x2c9818&&typeof _0x2c9818===_0x5dbdec(0x380)&&'type'in _0x2c9818&&_0x5dbdec(0x31a)in _0x2c9818)){_0x1ed844(_0x194fbf,_0x935e5e);return;}if(_0x194fbf[_0x5dbdec(0x30b)](_0x139d66=>typeof _0x139d66!=='object'||_0x139d66===null)){_0x194fbf[_0x5dbdec(0x1fc)]((_0x48ad80,_0x340e5d)=>console['log'](_0x935e5e+_0x2943c5(_0x4b6afe[_0x5dbdec(0x2ea)],_0x340e5d+0x1+'.')+'\x20'+_0x2943c5(_0x4b6afe[_0x5dbdec(0xf1)],String(_0x48ad80))));return;}_0x194fbf[_0x5dbdec(0x1fc)]((_0x178374,_0x82155f)=>{const _0xb584f5=_0x5dbdec;console['log'](_0x935e5e+_0x2943c5(_0x4b6afe[_0xb584f5(0x28a)],'['+_0x82155f+']'));if(typeof _0x178374===_0xb584f5(0x380)&&_0x178374!==null)_0x19565b(_0x178374,_0x935e5e+'\x20\x20');else console[_0xb584f5(0x305)](_0x935e5e+'\x20\x20'+String(_0x178374));});return;}if(typeof _0x194fbf===_0x5dbdec(0x380)){if('key'in _0x194fbf&&_0x5dbdec(0x2a2)in _0x194fbf&&Object[_0x5dbdec(0x1c2)](_0x194fbf)[_0x5dbdec(0x1ae)]<=0x3){console[_0x5dbdec(0x305)](_0x935e5e+_0x2943c5(_0x4b6afe[_0x5dbdec(0x27a)]+_0x4b6afe[_0x5dbdec(0x393)],String(_0x194fbf[_0x5dbdec(0x273)])));const _0x290d89=_0x194fbf[_0x5dbdec(0x2a2)];if(_0x290d89&&typeof _0x290d89==='object')_0x19565b(_0x290d89,_0x935e5e);else console[_0x5dbdec(0x305)](_0x935e5e+_0x2943c5(_0x4b6afe[_0x5dbdec(0xf1)],String(_0x290d89)));return;}_0x19565b(_0x194fbf,_0x935e5e);return;}console[_0x5dbdec(0x305)](_0x935e5e+_0x2943c5(_0x4b6afe[_0x5dbdec(0xf1)],String(_0x194fbf)));}function _0x19565b(_0x34cada,_0x4b809c=''){const _0x22bcab=_0x2cf9fb,_0x20b5b8=Object[_0x22bcab(0xc7)](_0x34cada);if(_0x20b5b8['length']===0x0){console[_0x22bcab(0x305)](_0x4b809c+_0x2943c5(_0x4b6afe[_0x22bcab(0x28a)],'{}'));return;}const _0x1d87b7=Math[_0x22bcab(0x373)](0x1c,Math['max'](..._0x20b5b8[_0x22bcab(0x128)](([_0x5d12dc])=>_0x5d12dc[_0x22bcab(0x1ae)])));for(const [_0x5e89b9,_0x12e5f3]of _0x20b5b8){const _0x4e8c4c=_0x2943c5(_0x4b6afe['cyan'],_0x5e89b9[_0x22bcab(0x240)](_0x1d87b7));if(_0x12e5f3===null||_0x12e5f3===undefined)console['log'](_0x4b809c+_0x4e8c4c+'\x20\x20'+_0x2943c5(_0x4b6afe['dim'],_0x22bcab(0x1b2)));else{if(typeof _0x12e5f3===_0x22bcab(0x380)){const _0xfd5daf=JSON['stringify'](_0x12e5f3);_0xfd5daf[_0x22bcab(0x1ae)]<=0x50?console[_0x22bcab(0x305)](_0x4b809c+_0x4e8c4c+'\x20\x20'+_0x2943c5(_0x4b6afe[_0x22bcab(0x28a)],_0xfd5daf)):(console['log'](_0x4b809c+_0x4e8c4c),_0x128f75(_0x12e5f3,_0x4b809c+'\x20\x20'));}else{const _0x10db6c=typeof _0x12e5f3==='boolean'?_0x2943c5(_0x12e5f3?_0x4b6afe[_0x22bcab(0x3a1)]:_0x4b6afe['yellow'],String(_0x12e5f3)):typeof _0x12e5f3==='number'?_0x2943c5(_0x4b6afe[_0x22bcab(0x321)],String(_0x12e5f3)):_0x2943c5(_0x4b6afe[_0x22bcab(0xf1)],String(_0x12e5f3));console[_0x22bcab(0x305)](_0x4b809c+_0x4e8c4c+'\x20\x20'+_0x10db6c);}}}}function _0x380a6c(_0x3906d3,_0x49a81a=''){const _0x4703e2=_0x2cf9fb,_0x560540=Math[_0x4703e2(0x373)](0x20,Math[_0x4703e2(0x30f)](..._0x3906d3[_0x4703e2(0x128)](_0x152ada=>String(_0x152ada[_0x4703e2(0x273)])[_0x4703e2(0x1ae)])));for(const {key:_0x43c70b,value:_0x54b606,score:_0x39c4fd,clock:_0x1d57f3}of _0x3906d3){const _0x140326=_0x2943c5(_0x4b6afe['bold']+_0x4b6afe[_0x4703e2(0x393)],String(_0x43c70b)[_0x4703e2(0x240)](_0x560540)),_0x3f76aa=_0x54b606==null?_0x2943c5(_0x4b6afe[_0x4703e2(0x28a)],_0x4703e2(0x1b2)):typeof _0x54b606===_0x4703e2(0x380)?_0x2943c5(_0x4b6afe[_0x4703e2(0x28a)],JSON[_0x4703e2(0x2c7)](_0x54b606)):_0x2943c5(_0x4b6afe['white'],String(_0x54b606)),_0x238ed7=_0x39c4fd!=null?_0x2943c5(_0x4b6afe['gray'],_0x4703e2(0x309)+_0x39c4fd[_0x4703e2(0x14e)](0x4)):'',_0x2922ce=_0x1d57f3!=null?_0x2943c5(_0x4b6afe[_0x4703e2(0x2ea)],'\x20\x20@'+_0x1d57f3):'';console['log'](_0x49a81a+_0x140326+'\x20\x20'+_0x3f76aa+_0x238ed7+_0x2922ce);}}function _0x1ed844(_0x2c8e67,_0x4413ff=''){const _0x553116=_0x2cf9fb,_0x443727=Math[_0x553116(0x373)](0x20,Math[_0x553116(0x30f)](..._0x2c8e67[_0x553116(0x128)](_0x5969c1=>_0x5969c1['type'][_0x553116(0x1ae)])));for(const {type:_0xe79f7f,count:_0x43c80a,fields:_0x5eccde}of _0x2c8e67){if(_0xe79f7f[_0x553116(0x134)]('~'))continue;const _0x4f4755=_0x2943c5(_0x4b6afe[_0x553116(0x27a)]+_0x4b6afe['cyan'],_0xe79f7f[_0x553116(0x240)](_0x443727)),_0x1e6499=_0x2943c5(_0x4b6afe['magenta'],String(_0x43c80a)[_0x553116(0x32e)](0x6))+_0x2943c5(_0x4b6afe[_0x553116(0x28a)],'\x20records'),_0x2ad169=_0x5eccde&&Object[_0x553116(0x1c2)](_0x5eccde)['length']?_0x2943c5(_0x4b6afe[_0x553116(0x28a)],_0x553116(0x1da)+Object[_0x553116(0x1c2)](_0x5eccde)['slice'](0x0,0x6)['join'](',\x20')+(Object['keys'](_0x5eccde)[_0x553116(0x1ae)]>0x6?'…':'')):'';console['log'](_0x4413ff+_0x4f4755+'\x20\x20'+_0x1e6499+_0x2ad169);}}const _0xcf5127=[_0x2cf9fb(0x27b),_0x2cf9fb(0x197),_0x2cf9fb(0x122),_0x2cf9fb(0x294),_0x2cf9fb(0x1b5),_0x2cf9fb(0xbf)];function _0x1fa413(_0x2ba87a,_0x51bd2d){const _0x4d035d=_0x2cf9fb;if(_0x2ba87a['startsWith']('/api/'))return _0x2ba87a;if(_0x2ba87a[_0x4d035d(0x134)]('/'))return _0x4d035d(0x23c)+_0x2ba87a;if(_0x2ba87a[_0x4d035d(0x134)](_0x4d035d(0x37c)))return _0x4d035d(0x175)+_0x2ba87a;const _0x5f0fe4=_0xcf5127[_0x4d035d(0x100)](_0x17b3a4=>_0x2ba87a===_0x17b3a4['replace'](/\/$/,'')||_0x2ba87a['startsWith'](_0x17b3a4));return _0x5f0fe4?_0x4d035d(0x3a8)+_0x51bd2d+'/'+_0x2ba87a:'/api/'+_0x2ba87a;}function _0x573952(_0x296250){const _0x3d469a=_0x2cf9fb,_0x5e1afa={},_0x338a29=[];let _0x46514a=0x0;while(_0x46514a<_0x296250['length']){if((_0x296250[_0x46514a]==='--env'||_0x296250[_0x46514a]==='-e')&&_0x296250[_0x46514a+0x1]&&!_0x296250[_0x46514a+0x1][_0x3d469a(0x134)]('-'))_0x5e1afa[_0x3d469a(0x1a8)]=_0x296250[++_0x46514a];else _0x296250[_0x46514a]===_0x3d469a(0x101)||_0x296250[_0x46514a]==='-h'?_0x5e1afa[_0x3d469a(0x249)]=!![]:_0x338a29[_0x3d469a(0x1bb)](_0x296250[_0x46514a]);_0x46514a++;}return{'flags':_0x5e1afa,'rest':_0x338a29};}const _0x574c7f={'system':_0x2cf9fb(0x2d9),'envs':_0x2cf9fb(0x2e6),'types':_0x2cf9fb(0x3d9),'data':'Records','indexes':_0x2cf9fb(0x2b8),'fts':'Full-text\x20search','sync':_0x2cf9fb(0x35c),'queue':_0x2cf9fb(0x26c),'files':_0x2cf9fb(0x265),'embeddings':_0x2cf9fb(0x211),'engines':_0x2cf9fb(0x2d7),'admin':_0x2cf9fb(0x28b),'event':'Events','processor':_0x2cf9fb(0x1a2)},_0x29f84c=[_0x2cf9fb(0x302),_0x2cf9fb(0x1b7),_0x2cf9fb(0x27b),_0x2cf9fb(0x1d1),_0x2cf9fb(0x267),_0x2cf9fb(0x159),_0x2cf9fb(0x1ee),_0x2cf9fb(0x339),_0x2cf9fb(0x3c5),'embeddings','engines',_0x2cf9fb(0x189)];function _0x37c37a(_0x47ee77){const _0x1ca398=_0x2cf9fb;return _0x47ee77[_0x1ca398(0x1c8)](/^\/api/,'')['replace'](/^\[\/env\/:env=[^\]]*\]/,_0x1ca398(0x1c7))[_0x1ca398(0x1c8)](/^\/env\/:env/,'env/:env')[_0x1ca398(0x1c8)](/^\//,'');}function _0x50dde1(_0x20f0fb,_0x354530=''){const _0x72e52b=_0x2cf9fb,_0x235e20=_0x20f0fb['http'][_0x72e52b(0x236)]()[_0x72e52b(0xe5)](_0x326ffd=>!_0x326ffd[_0x72e52b(0x181)]?.[_0x72e52b(0xc4)]),_0x3cd661=_0x354530?_0x235e20[_0x72e52b(0xe5)](_0xc188bd=>_0xc188bd[_0x72e52b(0x3c1)][_0x72e52b(0x1bf)]()['includes'](_0x354530['toLowerCase']())||(_0x1b0436(_0xc188bd)??'')[_0x72e52b(0x1bf)]()[_0x72e52b(0x251)](_0x354530['toLowerCase']())||_0x4e25a1(_0xc188bd)['some'](_0x5aeccf=>_0x5aeccf[_0x72e52b(0x1bf)]()[_0x72e52b(0x251)](_0x354530[_0x72e52b(0x1bf)]()))):_0x235e20;if(!_0x3cd661['length']){console['log'](_0x2943c5(_0x4b6afe['yellow'],_0x72e52b(0x1a1)+_0x354530+'\x22\x0a'));return;}const _0x106e4b=new Map();for(const _0x54e9d0 of _0x3cd661){const _0x5262de=_0x4e25a1(_0x54e9d0)[0x0]??'other';if(!_0x106e4b['has'](_0x5262de))_0x106e4b[_0x72e52b(0x1c3)](_0x5262de,[]);_0x106e4b['get'](_0x5262de)['push'](_0x54e9d0);}const _0x12e570=[..._0x29f84c[_0x72e52b(0xe5)](_0x31a26f=>_0x106e4b[_0x72e52b(0x219)](_0x31a26f)),...[..._0x106e4b[_0x72e52b(0x1c2)]()][_0x72e52b(0xe5)](_0x47728d=>!_0x29f84c['includes'](_0x47728d))];console['log']('');for(const _0x5293a6 of _0x12e570){const _0x4aa2ba=_0x106e4b[_0x72e52b(0x13e)](_0x5293a6);if(!_0x4aa2ba?.[_0x72e52b(0x1ae)])continue;console[_0x72e52b(0x305)](_0x2943c5(_0x4b6afe[_0x72e52b(0x27a)],'\x20\x20'+(_0x574c7f[_0x5293a6]??_0x5293a6)));for(const _0x19a26f of _0x4aa2ba){const _0x73cf25=_0x2943c5(_0x4b6afe[_0x72e52b(0x321)],_0x19a26f['method'][_0x72e52b(0x240)](0x7)),_0x35f10b=_0x2943c5(_0x4b6afe[_0x72e52b(0x393)],_0x37c37a(_0x19a26f[_0x72e52b(0x3c1)])),_0x29bb1c=_0x1b0436(_0x19a26f)?_0x2943c5(_0x4b6afe[_0x72e52b(0x28a)],'\x20\x20'+_0x1b0436(_0x19a26f)):'',_0x516abc=_0x19a26f['operation']?.['id']?_0x2943c5(_0x4b6afe[_0x72e52b(0x2ea)],_0x72e52b(0x17d)+_0x19a26f[_0x72e52b(0x162)]['id']+']'):'';console[_0x72e52b(0x305)]('\x20\x20\x20\x20'+_0x73cf25+'\x20'+_0x35f10b+_0x29bb1c+_0x516abc);}console[_0x72e52b(0x305)]('');}}function _0x3bf348(_0x384c26,_0x287999){const _0x408a2d=_0x2cf9fb,_0xba684a=_0x287999[_0x408a2d(0x1c8)](/^\/api(\/env\/[^/]+)?\//,'')[_0x408a2d(0x397)]('/')[0x0],_0x2a773b=_0x384c26[_0x408a2d(0x115)][_0x408a2d(0x236)]()[_0x408a2d(0xe5)](_0x86c94e=>_0x86c94e[_0x408a2d(0x3c1)]['toLowerCase']()[_0x408a2d(0x251)](_0xba684a[_0x408a2d(0x1bf)]()));if(!_0x2a773b[_0x408a2d(0x1ae)]){console[_0x408a2d(0x305)](_0x2943c5(_0x4b6afe[_0x408a2d(0x234)],_0x408a2d(0x2df)+_0x287999+'\x0a'));return;}console[_0x408a2d(0x305)]('');for(const _0x4db355 of _0x2a773b[_0x408a2d(0x23f)](0x0,0xc)){for(const _0x287193 of _0x409438(_0x4db355)){console[_0x408a2d(0x305)](_0x287193);}console[_0x408a2d(0x305)]('');}}function _0x1b0436(_0x1d149a){const _0x302743=_0x2cf9fb;return _0x1d149a['operation']?.[_0x302743(0x206)]??_0x1d149a[_0x302743(0x181)]?.[_0x302743(0x206)]??'';}function _0x43022f(_0x4aee38){const _0x4110e9=_0x2cf9fb;return _0x4aee38[_0x4110e9(0x162)]?.[_0x4110e9(0xf6)]??_0x4aee38[_0x4110e9(0x181)]?.[_0x4110e9(0xf6)]??'';}function _0x4e25a1(_0x24d51e){const _0x52ff58=_0x2cf9fb;return _0x24d51e[_0x52ff58(0x162)]?.[_0x52ff58(0x156)]?.[_0x52ff58(0x1ae)]?_0x24d51e[_0x52ff58(0x162)][_0x52ff58(0x156)]:_0x24d51e['meta']?.[_0x52ff58(0x156)]??[];}function _0x409438(_0x3340c6){const _0x22070a=_0x2cf9fb,_0x4fc66b=[];_0x4fc66b[_0x22070a(0x1bb)]('\x20\x20'+_0x2943c5(_0x4b6afe[_0x22070a(0x27a)]+_0x4b6afe[_0x22070a(0x321)],_0x3340c6[_0x22070a(0x312)][_0x22070a(0x240)](0x7))+'\x20'+_0x2943c5(_0x4b6afe[_0x22070a(0x27a)]+_0x4b6afe[_0x22070a(0x393)],_0x3340c6['path']));_0x3340c6['operation']?.['id']&&_0x4fc66b['push'](_0x22070a(0x3b4)+_0x2943c5(_0x4b6afe[_0x22070a(0x2ea)],_0x22070a(0x14c)+_0x3340c6[_0x22070a(0x162)]['id']));_0x1b0436(_0x3340c6)&&_0x4fc66b[_0x22070a(0x1bb)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x2943c5(_0x4b6afe[_0x22070a(0xf1)],_0x1b0436(_0x3340c6)));_0x43022f(_0x3340c6)&&_0x4fc66b['push'](_0x22070a(0x3b4)+_0x2943c5(_0x4b6afe[_0x22070a(0x28a)],_0x43022f(_0x3340c6)));_0x4e25a1(_0x3340c6)['length']&&_0x4fc66b[_0x22070a(0x1bb)](_0x22070a(0x3b4)+_0x2943c5(_0x4b6afe[_0x22070a(0x2ea)],_0x22070a(0x254)+_0x4e25a1(_0x3340c6)['join'](',\x20')));_0x3340c6[_0x22070a(0x162)]?.[_0x22070a(0x2cd)]?.[_0x22070a(0x329)]&&_0x4fc66b['push']('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x2943c5(_0x4b6afe['gray'],_0x22070a(0x37a)+_0x3340c6[_0x22070a(0x162)][_0x22070a(0x2cd)]['access']));_0x3340c6[_0x22070a(0x162)]?.[_0x22070a(0x115)]?.[_0x22070a(0x10b)]&&_0x3340c6['operation'][_0x22070a(0x115)][_0x22070a(0x10b)]!==_0x22070a(0x30c)&&_0x4fc66b[_0x22070a(0x1bb)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x2943c5(_0x4b6afe[_0x22070a(0x2ea)],_0x22070a(0x1b8)+_0x3340c6[_0x22070a(0x162)][_0x22070a(0x115)][_0x22070a(0x10b)]));if(_0x3340c6[_0x22070a(0x162)]?.[_0x22070a(0x3c0)]){const _0x3f1489=Object[_0x22070a(0x1c2)](_0x3340c6[_0x22070a(0x162)]['inputSchema'][_0x22070a(0x342)]||{});if(_0x3f1489[_0x22070a(0x1ae)])_0x4fc66b[_0x22070a(0x1bb)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x2943c5(_0x4b6afe[_0x22070a(0x2ea)],_0x22070a(0x195)+_0x3f1489[_0x22070a(0x27f)](',\x20')));}return _0x3340c6[_0x22070a(0x181)]?.[_0x22070a(0x17f)]&&_0x4fc66b['push'](_0x22070a(0x3b4)+_0x2943c5(_0x4b6afe[_0x22070a(0x2ea)],_0x22070a(0x212)+JSON[_0x22070a(0x2c7)](_0x3340c6[_0x22070a(0x181)][_0x22070a(0x17f)]))),_0x4fc66b;}async function _0x3f3643(_0x651838,_0x6a1d93,_0x50a358,_0x598395=null){const _0x4ab3a5=_0x2cf9fb,_0x311702=_0x50a358[_0x4ab3a5(0x29f)]('?'),_0x4c8e56=_0x311702>=0x0?_0x50a358['slice'](0x0,_0x311702):_0x50a358,_0x21aa8d=_0x311702>=0x0?_0x50a358[_0x4ab3a5(0x23f)](_0x311702+0x1):'',_0x1a4fc4=Object['fromEntries'](new URLSearchParams(_0x21aa8d)[_0x4ab3a5(0xc7)]());return _0x651838[_0x4ab3a5(0x115)][_0x4ab3a5(0xfb)](_0x6a1d93,_0x4c8e56,{'body':_0x598395,'query':_0x1a4fc4,'headers':{'content-type':_0x4ab3a5(0x20e)}},{'internal':!![]});}function _0x349ced(_0x1aeea5){const _0x5284b5=_0x2cf9fb;if(!_0x1aeea5)return null;const _0x1aa886=_0x1aeea5[_0x5284b5(0x171)]();if(!_0x1aa886)return null;try{return JSON[_0x5284b5(0x2ee)](_0x1aa886);}catch{}try{return JSON[_0x5284b5(0x2ee)](_0x3b0d06(_0x1aa886));}catch(_0x4f8cd8){throw new SyntaxError(_0x4f8cd8[_0x5284b5(0x172)],{'cause':_0x4f8cd8});}}function _0x3b0d06(_0x2bb139){const _0x372997=_0x2cf9fb;let _0x3b2670='',_0x1dfa11=0x0;while(_0x1dfa11<_0x2bb139[_0x372997(0x1ae)]){const _0x2920a2=_0x2bb139[_0x1dfa11];if(_0x2920a2==='\x22'){_0x3b2670+='\x22',_0x1dfa11++;while(_0x1dfa11<_0x2bb139[_0x372997(0x1ae)]&&_0x2bb139[_0x1dfa11]!=='\x22'){if(_0x2bb139[_0x1dfa11]==='\x5c'){_0x3b2670+=_0x2bb139[_0x1dfa11++];if(_0x1dfa11<_0x2bb139['length'])_0x3b2670+=_0x2bb139[_0x1dfa11++];}else _0x3b2670+=_0x2bb139[_0x1dfa11++];}_0x3b2670+='\x22';if(_0x1dfa11<_0x2bb139[_0x372997(0x1ae)])_0x1dfa11++;continue;}if(_0x2920a2==='\x27'){_0x3b2670+='\x22',_0x1dfa11++;while(_0x1dfa11<_0x2bb139['length']&&_0x2bb139[_0x1dfa11]!=='\x27'){if(_0x2bb139[_0x1dfa11]==='\x5c'&&_0x2bb139[_0x1dfa11+0x1]==='\x27')_0x3b2670+='\x27',_0x1dfa11+=0x2;else _0x2bb139[_0x1dfa11]==='\x22'?(_0x3b2670+='\x5c\x22',_0x1dfa11++):_0x3b2670+=_0x2bb139[_0x1dfa11++];}_0x3b2670+='\x22';if(_0x1dfa11<_0x2bb139[_0x372997(0x1ae)])_0x1dfa11++;continue;}if(_0x372997(0x161)[_0x372997(0x251)](_0x2920a2)){_0x3b2670+=_0x2920a2,_0x1dfa11++;continue;}let _0x1c446e='';while(_0x1dfa11<_0x2bb139[_0x372997(0x1ae)]&&!'{}[]:,\x27\x22'[_0x372997(0x251)](_0x2bb139[_0x1dfa11])&&_0x2bb139[_0x1dfa11]!=='\x20'&&_0x2bb139[_0x1dfa11]!=='\x09'&&_0x2bb139[_0x1dfa11]!=='\x0a'&&_0x2bb139[_0x1dfa11]!=='\x0d'){_0x1c446e+=_0x2bb139[_0x1dfa11++];}let _0x267e34=_0x1dfa11;while(_0x267e34<_0x2bb139[_0x372997(0x1ae)]&&(_0x2bb139[_0x267e34]==='\x20'||_0x2bb139[_0x267e34]==='\x09'))_0x267e34++;if(_0x2bb139[_0x267e34]===':')_0x3b2670+='\x22'+_0x1c446e+'\x22';else _0x1c446e===_0x372997(0x381)||_0x1c446e===_0x372997(0x24e)||_0x1c446e===_0x372997(0x1b2)||/^-?\d+(\.\d+)?([eE][+-]?\d+)?$/[_0x372997(0x36a)](_0x1c446e)?_0x3b2670+=_0x1c446e:_0x3b2670+='\x22'+_0x1c446e+'\x22';}return _0x3b2670[_0x372997(0x1c8)](/,(\s*[}\]])/g,'$1');}function _0x2315d8(_0x49e976){const _0x3021d3=_0x2cf9fb,_0x31cb67=[];let _0x388548=0x0;while(_0x388548<_0x49e976['length']){while(_0x388548<_0x49e976['length']&&(_0x49e976[_0x388548]==='\x20'||_0x49e976[_0x388548]==='\x09'))_0x388548++;if(_0x388548>=_0x49e976['length'])break;const _0x3bb721=_0x49e976[_0x388548];if(_0x3bb721==='{'||_0x3bb721==='['){const _0x16f24d=_0x3bb721==='{'?'}':']',_0xb9d971=_0x388548++;let _0x492d25=0x1,_0x949af7=![],_0x16a374='';while(_0x388548<_0x49e976[_0x3021d3(0x1ae)]&&_0x492d25>0x0){const _0x5b637f=_0x49e976[_0x388548];if(_0x949af7){if(_0x5b637f==='\x5c')_0x388548++;else{if(_0x5b637f===_0x16a374)_0x949af7=![];}}else{if(_0x5b637f==='\x22'||_0x5b637f==='\x27')_0x949af7=!![],_0x16a374=_0x5b637f;else{if(_0x5b637f===_0x3bb721)_0x492d25++;else{if(_0x5b637f===_0x16f24d)_0x492d25--;}}}_0x388548++;}_0x31cb67[_0x3021d3(0x1bb)](_0x49e976[_0x3021d3(0x23f)](_0xb9d971,_0x388548));continue;}if(_0x3bb721==='\x22'||_0x3bb721==='\x27'){const _0x19158f=_0x3bb721;_0x388548++;let _0x1a5e3d='';while(_0x388548<_0x49e976[_0x3021d3(0x1ae)]&&_0x49e976[_0x388548]!==_0x19158f){if(_0x49e976[_0x388548]==='\x5c'&&_0x388548+0x1<_0x49e976[_0x3021d3(0x1ae)])_0x388548++,_0x1a5e3d+=_0x49e976[_0x388548++];else _0x1a5e3d+=_0x49e976[_0x388548++];}if(_0x388548<_0x49e976['length'])_0x388548++;_0x31cb67['push'](_0x1a5e3d);continue;}let _0x44ab4b='';while(_0x388548<_0x49e976['length']&&_0x49e976[_0x388548]!=='\x20'&&_0x49e976[_0x388548]!=='\x09'&&_0x49e976[_0x388548]!=='{'&&_0x49e976[_0x388548]!=='['){_0x44ab4b+=_0x49e976[_0x388548++];}if(_0x44ab4b)_0x31cb67[_0x3021d3(0x1bb)](_0x44ab4b);}return _0x31cb67;}function _0x4cd72c(_0x4d54a0,_0x513614){const _0x4dec3b=_0x2cf9fb,_0x5051d2=[..._0x4d54a0[_0x4dec3b(0x22e)]['keys']()][_0x4dec3b(0xe5)](_0xce3f29=>!_0xce3f29[_0x4dec3b(0x134)]('~'));console[_0x4dec3b(0x305)](['',_0x2943c5(_0x4b6afe[_0x4dec3b(0x27a)]+_0x4b6afe['cyan'],_0x4dec3b(0x129)),_0x2943c5(_0x4b6afe[_0x4dec3b(0x27a)]+_0x4b6afe[_0x4dec3b(0x393)],_0x4dec3b(0xd6))+_0x2943c5(_0x4b6afe[_0x4dec3b(0x27a)],'\x20\x20\x20\x20\x20\x20\x20\x20\x20OKDB\x20SHELL\x20\x20\x20\x20\x20\x20\x20\x20\x20')+_0x2943c5(_0x4b6afe[_0x4dec3b(0x27a)]+_0x4b6afe[_0x4dec3b(0x393)],'║'),_0x2943c5(_0x4b6afe['bold']+_0x4b6afe[_0x4dec3b(0x393)],_0x4dec3b(0x1ba)),'','\x20\x20'+_0x2943c5(_0x4b6afe[_0x4dec3b(0x3a1)],'✓')+'\x20'+_0x2943c5(_0x4b6afe['bold'],'server')+_0x4dec3b(0x382)+_0x513614[_0x4dec3b(0x2ad)],'\x20\x20'+_0x2943c5(_0x4b6afe['green'],'✓')+'\x20'+_0x2943c5(_0x4b6afe[_0x4dec3b(0x27a)],_0x4dec3b(0x114))+'\x20\x20\x20\x20\x20http://localhost:'+_0x513614[_0x4dec3b(0x2ad)]+_0x4dec3b(0x23c),'\x20\x20'+_0x2943c5(_0x4b6afe[_0x4dec3b(0x3a1)],'✓')+'\x20'+_0x2943c5(_0x4b6afe['bold'],_0x4dec3b(0x3c1))+_0x4dec3b(0x2b5)+_0x513614[_0x4dec3b(0x230)],'\x20\x20'+_0x2943c5(_0x4b6afe['green'],'✓')+'\x20'+_0x2943c5(_0x4b6afe['bold'],'id')+_0x4dec3b(0x359)+_0x2943c5(_0x4b6afe['gray'],_0x4d54a0['id']),'\x20\x20'+_0x2943c5(_0x4b6afe[_0x4dec3b(0x3a1)],'✓')+'\x20'+_0x2943c5(_0x4b6afe[_0x4dec3b(0x27a)],_0x4dec3b(0x1b7))+_0x4dec3b(0x2b5)+_0x5051d2['map'](_0x1c8c15=>_0x2943c5(_0x4b6afe[_0x4dec3b(0x393)],_0x1c8c15))[_0x4dec3b(0x27f)]('\x20\x20'),..._0x513614['noAdmin']?[]:['\x20\x20'+_0x2943c5(_0x4b6afe[_0x4dec3b(0x3a1)],'✓')+'\x20'+_0x2943c5(_0x4b6afe[_0x4dec3b(0x27a)],_0x4dec3b(0x189))+_0x4dec3b(0x2b4)+_0x513614[_0x4dec3b(0x2ad)]+_0x4dec3b(0x164)],'',_0x2943c5(_0x4b6afe['dim'],_0x4dec3b(0x28d)+_0x2943c5(_0x4b6afe[_0x4dec3b(0x27a)],_0x4dec3b(0x249))+_0x4dec3b(0x20c)+_0x2943c5(_0x4b6afe[_0x4dec3b(0x27a)],_0x4dec3b(0x15f))+_0x4dec3b(0x193)+_0x2943c5(_0x4b6afe['bold'],_0x4dec3b(0x34a))+_0x4dec3b(0x169)),''][_0x4dec3b(0x27f)]('\x0a'));}function _0xd3cb0f(_0x4bf556){const _0x4fe959=_0x2cf9fb;console[_0x4fe959(0x305)]('\x0a'+_0x2943c5(_0x4b6afe[_0x4fe959(0x27a)],_0x4fe959(0x353))+'\x20\x20'+_0x2943c5(_0x4b6afe[_0x4fe959(0x28a)],_0x4fe959(0x3ad))+_0x4fe959(0x1e9)+_0x2943c5(_0x4b6afe[_0x4fe959(0x393)],_0x4fe959(0x1ab))+_0x4fe959(0x2da)+_0x2943c5(_0x4b6afe[_0x4fe959(0x393)],'<path>')+'\x20'+_0x2943c5(_0x4b6afe[_0x4fe959(0x234)],_0x4fe959(0x36c))+_0x4fe959(0x176)+_0x2943c5(_0x4b6afe[_0x4fe959(0x393)],_0x4fe959(0x174))+'\x20'+_0x2943c5(_0x4b6afe['cyan'],_0x4fe959(0x1ab))+'\x20'+_0x2943c5(_0x4b6afe[_0x4fe959(0x234)],_0x4fe959(0x21a))+_0x4fe959(0x2a9)+_0x2943c5(_0x4b6afe[_0x4fe959(0x28a)],'Examples')+_0x4fe959(0x142)+_0x2943c5(_0x4b6afe['gray'],_0x4fe959(0x33b))+_0x4fe959(0x2ff)+_0x2943c5(_0x4b6afe[_0x4fe959(0x2ea)],_0x4fe959(0x1b7))+_0x4fe959(0xec)+_0x2943c5(_0x4b6afe['gray'],_0x4fe959(0x27b))+_0x4fe959(0x242)+_0x4bf556['env']+_0x4fe959(0x30d)+_0x2943c5(_0x4b6afe[_0x4fe959(0x2ea)],_0x4fe959(0x1df))+_0x4fe959(0x35e)+_0x4bf556[_0x4fe959(0x1a8)]+'/type/users\x0a\x20\x20\x20\x20'+_0x2943c5(_0x4b6afe['gray'],_0x4fe959(0x22a))+_0x4fe959(0x23e)+_0x4bf556['env']+_0x4fe959(0x3ab)+_0x2943c5(_0x4b6afe['gray'],_0x4fe959(0x38b))+_0x4fe959(0x324)+_0x4bf556['env']+_0x4fe959(0x354)+_0x2943c5(_0x4b6afe[_0x4fe959(0x2ea)],_0x4fe959(0x19e))+_0x4fe959(0x142)+_0x2943c5(_0x4b6afe['gray'],_0x4fe959(0x1bc))+_0x4fe959(0x142)+_0x2943c5(_0x4b6afe['gray'],_0x4fe959(0x28f))+_0x4fe959(0x343)+_0x2943c5(_0x4b6afe[_0x4fe959(0x27a)],_0x4fe959(0x1a4))+'\x20\x20'+_0x2943c5(_0x4b6afe[_0x4fe959(0x28a)],_0x4fe959(0x247))+'\x0a\x0a\x20\x20'+_0x2943c5(_0x4b6afe[_0x4fe959(0x393)],_0x4fe959(0x296))+_0x4fe959(0x3ce)+_0x2943c5(_0x4b6afe['cyan'],_0x4fe959(0x101))+'\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'+_0x2943c5(_0x4b6afe[_0x4fe959(0x28a)],'Examples')+_0x4fe959(0x142)+_0x2943c5(_0x4b6afe['gray'],_0x4fe959(0x3c8))+_0x4fe959(0x142)+_0x2943c5(_0x4b6afe[_0x4fe959(0x2ea)],_0x4fe959(0x2ae))+'\x0a\x20\x20\x20\x20'+_0x2943c5(_0x4b6afe[_0x4fe959(0x2ea)],_0x4fe959(0x1dd))+'\x0a\x0a'+_0x2943c5(_0x4b6afe['bold'],_0x4fe959(0xd9))+_0x4fe959(0x1e9)+_0x2943c5(_0x4b6afe[_0x4fe959(0x393)],_0x4fe959(0x25d))+'\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'+_0x2943c5(_0x4b6afe[_0x4fe959(0x393)],_0x4fe959(0x1a8))+_0x4fe959(0x308)+_0x2943c5(_0x4b6afe[_0x4fe959(0x393)],'routes')+'\x20'+_0x2943c5(_0x4b6afe['dim'],'[filter]')+_0x4fe959(0x2c0)+_0x2943c5(_0x4b6afe[_0x4fe959(0x393)],_0x4fe959(0x323))+'\x20'+_0x2943c5(_0x4b6afe[_0x4fe959(0x28a)],_0x4fe959(0x311))+_0x4fe959(0x37f)+_0x2943c5(_0x4b6afe[_0x4fe959(0x393)],_0x4fe959(0x375))+_0x4fe959(0x367)+_0x2943c5(_0x4b6afe[_0x4fe959(0x393)],'help')+_0x4fe959(0x385)+_0x2943c5(_0x4b6afe[_0x4fe959(0x393)],_0x4fe959(0x34a))+'\x20'+_0x2943c5(_0x4b6afe['dim'],_0x4fe959(0xe2))+_0x4fe959(0x336));}let _0x1a18f2=![];async function _0x483cdf(_0x5589ca,_0x13001c=0x0,_0x2cd9c4=null){const _0x382291=_0x2cf9fb;_0x1a18f2&&(process[_0x382291(0x252)][_0x382291(0x204)](_0x2943c5(_0x4b6afe[_0x382291(0x369)],_0x382291(0x22b))),process[_0x382291(0x34a)](0x82));_0x1a18f2=!![],process[_0x382291(0x355)][_0x382291(0x204)]('\x0a'),process['stderr'][_0x382291(0x204)](_0x2943c5(_0x4b6afe[_0x382291(0x234)],_0x382291(0x292)+(_0x2cd9c4?_0x382291(0x2a8)+_0x2cd9c4+',\x20':'')+'shutting\x20down…\x0a'));const _0x3003c8=setTimeout(()=>{const _0x27aead=_0x382291;process[_0x27aead(0x252)]['write'](_0x2943c5(_0x4b6afe[_0x27aead(0x369)],_0x27aead(0x130))),process['exit'](0x1);},0x1388);try{await _0x5589ca[_0x382291(0x216)]();}catch(_0x5e4322){console[_0x382291(0x389)](_0x2943c5(_0x4b6afe[_0x382291(0x369)],'\x20\x20'+_0x5e4322[_0x382291(0x172)]));}clearTimeout(_0x3003c8),process[_0x382291(0x252)][_0x382291(0x204)](_0x2943c5(_0x4b6afe['dim'],_0x382291(0x395))),process[_0x382291(0x34a)](_0x13001c);}function _0x4034d7(_0xe96285){const _0x56cc75=_0x2cf9fb,_0x48a249=_0xe96285[_0x56cc75(0x1a8)]!==_0x56cc75(0x1e7)?_0x2943c5(_0x4b6afe[_0x56cc75(0x234)],'['+_0xe96285[_0x56cc75(0x1a8)]+']'):'';return _0x2943c5(_0x4b6afe[_0x56cc75(0x27a)]+_0x4b6afe['cyan'],_0x56cc75(0x1cd))+_0x48a249+_0x2943c5(_0x4b6afe[_0x56cc75(0x2ea)],'>\x20');}const _0x320b38=new Set([_0x2cf9fb(0x3cc),'POST',_0x2cf9fb(0x1d7),'PATCH',_0x2cf9fb(0x2e3)]);async function _0x1d3ca6(_0x118bad,_0x2a0b29,_0x1617d3,_0x25d047,_0x97e9b5,_0x18079c){const _0x550863=_0x2cf9fb;_0x118bad=_0x118bad['trim']();if(!_0x118bad||_0x118bad['startsWith']('#'))return;const _0xa2442c=_0x2315d8(_0x118bad),{flags:_0x477596,rest:_0x181be9}=_0x573952(_0xa2442c);if(!_0x181be9[_0x550863(0x1ae)])return;const _0x3d44e5=_0x181be9[0x0],_0x208450=_0x3d44e5[_0x550863(0x1af)]();if(_0x208450==='HELP'){if(_0x181be9[0x1])_0x3bf348(_0x2a0b29,_0x1fa413(_0x181be9[0x1],_0x477596[_0x550863(0x1a8)]??_0x97e9b5['env']));else _0xd3cb0f(_0x97e9b5);return;}if(_0x208450===_0x550863(0x30a)){const _0x3145fd=_0x181be9[0x1];if(!_0x3145fd){console[_0x550863(0x305)](_0x2943c5(_0x4b6afe[_0x550863(0x369)],'\x0a\x20\x20Usage:\x20use\x20<env-name>\x0a'));return;}try{_0x2a0b29[_0x550863(0x1a8)](_0x3145fd),_0x97e9b5[_0x550863(0x1a8)]=_0x3145fd,_0x18079c?.[_0x550863(0x3d2)](_0x4034d7(_0x97e9b5)),console[_0x550863(0x305)](_0x550863(0x31e)+_0x2943c5(_0x4b6afe[_0x550863(0x3a1)],'✓')+_0x550863(0x22f)+_0x2943c5(_0x4b6afe[_0x550863(0x27a)]+_0x4b6afe[_0x550863(0x393)],_0x3145fd)+'\x0a');}catch{console[_0x550863(0x305)](_0x550863(0x31e)+_0x2943c5(_0x4b6afe['red'],'✗')+'\x20environment\x20'+_0x2943c5(_0x4b6afe[_0x550863(0x27a)],_0x3145fd)+'\x20not\x20found'+_0x2943c5(_0x4b6afe['dim'],_0x550863(0xc9)));}return;}if(_0x208450===_0x550863(0x290)){const _0x29580a=[..._0x2a0b29[_0x550863(0x22e)][_0x550863(0x1c2)]()]['filter'](_0x102e4a=>!_0x102e4a[_0x550863(0x134)]('~'));console[_0x550863(0x305)]('');for(const _0xc2aed0 of _0x29580a){const _0xa1c87=_0xc2aed0===_0x97e9b5[_0x550863(0x1a8)];console[_0x550863(0x305)]('\x20\x20'+(_0xa1c87?_0x2943c5(_0x4b6afe[_0x550863(0x3a1)],'●'):_0x2943c5(_0x4b6afe[_0x550863(0x28a)],'○'))+'\x20\x20'+(_0xa1c87?_0x2943c5(_0x4b6afe['bold']+_0x4b6afe[_0x550863(0x393)],_0xc2aed0):_0x2943c5(_0x4b6afe[_0x550863(0x28a)],_0xc2aed0)));}console[_0x550863(0x305)]('\x0a\x20\x20'+_0x2943c5(_0x4b6afe[_0x550863(0x28a)],_0x550863(0x2b2))+'\x20'+_0x2943c5(_0x4b6afe[_0x550863(0x393)],_0x97e9b5[_0x550863(0x1a8)])),console[_0x550863(0x305)]('');return;}if(_0x208450==='ENVS'){const _0x3652f2=[..._0x2a0b29[_0x550863(0x22e)][_0x550863(0x3b7)]()]['filter'](_0x3bddeb=>!_0x3bddeb[_0x550863(0x14b)]['startsWith']('~'));console[_0x550863(0x305)]('');const _0x154f08=Math['max'](..._0x3652f2['map'](_0x5480d3=>_0x5480d3['name'][_0x550863(0x1ae)]));for(const _0x5f0014 of _0x3652f2){const _0x4adcac=_0x5f0014[_0x550863(0x14b)]===_0x97e9b5[_0x550863(0x1a8)],_0x455679=_0x4adcac?_0x2943c5(_0x4b6afe[_0x550863(0x3a1)],'●'):_0x2943c5(_0x4b6afe[_0x550863(0x28a)],'○'),_0x533759=_0x4adcac?_0x2943c5(_0x4b6afe[_0x550863(0x27a)]+_0x4b6afe['cyan'],_0x5f0014[_0x550863(0x14b)][_0x550863(0x240)](_0x154f08)):_0x2943c5(_0x4b6afe['dim'],_0x5f0014[_0x550863(0x14b)][_0x550863(0x240)](_0x154f08)),_0x2455c5=[..._0x5f0014[_0x550863(0x177)][_0x550863(0x1c2)]()]['filter'](_0x1c11f4=>!_0x1c11f4[_0x550863(0x134)]('~')),_0x53b7fd=_0x2455c5[_0x550863(0x1ae)]?_0x2943c5(_0x4b6afe[_0x550863(0x28a)],_0x2455c5['slice'](0x0,0x5)['join'](',\x20')+(_0x2455c5[_0x550863(0x1ae)]>0x5?_0x550863(0x19a)+(_0x2455c5[_0x550863(0x1ae)]-0x5)+'\x20more':'')):_0x2943c5(_0x4b6afe[_0x550863(0x28a)],'(no\x20types)');console[_0x550863(0x305)]('\x20\x20'+_0x455679+'\x20\x20'+_0x533759+'\x20\x20'+_0x53b7fd);}console['log']('');return;}if(_0x208450===_0x550863(0x266)){const _0x539879=_0x477596['env']??_0x181be9[0x1]??_0x97e9b5[_0x550863(0x1a8)];try{const _0x47340b=_0x2a0b29['env'](_0x539879),_0x3d3717=[..._0x47340b[_0x550863(0x177)]['keys']()][_0x550863(0xe5)](_0x1acc0a=>!_0x1acc0a[_0x550863(0x134)]('~'))[_0x550863(0x253)]();console[_0x550863(0x305)](_0x550863(0x31e)+_0x2943c5(_0x4b6afe[_0x550863(0x28a)],_0x3d3717[_0x550863(0x1ae)]+_0x550863(0x297)+(_0x3d3717[_0x550863(0x1ae)]!==0x1?'s':'')+_0x550863(0x1f2)+_0x539879));for(const _0x500eeb of _0x3d3717){const _0x5e2351=_0x47340b['typeSubDbs'][_0x550863(0x13e)](_0x500eeb),_0x1762a5=_0x5e2351?.['data']?.['getCount']?.()??0x0,_0x442f46=_0x2943c5(_0x4b6afe[_0x550863(0x27a)]+_0x4b6afe[_0x550863(0x393)],_0x500eeb[_0x550863(0x240)](0x1c));console[_0x550863(0x305)](_0x550863(0x2b5)+_0x442f46+'\x20\x20'+_0x2943c5(_0x4b6afe[_0x550863(0x321)],String(_0x1762a5)['padStart'](0x6))+'\x20'+_0x2943c5(_0x4b6afe[_0x550863(0x28a)],'records'));}console['log']('');}catch(_0x2cefad){console[_0x550863(0x389)](_0x2943c5(_0x4b6afe[_0x550863(0x369)],'\x0a\x20\x20'+_0x2cefad['message']+'\x0a'));}return;}if(_0x208450===_0x550863(0x352)){_0x50dde1(_0x2a0b29,_0x181be9[_0x550863(0x23f)](0x1)['join']('\x20'));return;}if(_0x208450===_0x550863(0x147)){const _0x58dc86=(_0x181be9[0x1]??'')['toLowerCase']();if(!_0x58dc86||_0x58dc86==='on')_0x25d047[_0x550863(0x137)]=!![],_0x25d047[_0x550863(0x1d3)]=_0x550863(0x33b),console['log']('\x0a\x20\x20'+_0x2943c5(_0x4b6afe[_0x550863(0x3a1)],'✓')+_0x550863(0x192)+_0x2943c5(_0x4b6afe['dim'],_0x550863(0x2d5))+'\x0a');else{if(_0x58dc86===_0x550863(0x29b))_0x25d047[_0x550863(0x137)]=![],console[_0x550863(0x305)]('\x0a\x20\x20'+_0x2943c5(_0x4b6afe[_0x550863(0x234)],'○')+_0x550863(0x218));else _0x455389[_0x58dc86]!==undefined?(_0x25d047[_0x550863(0x137)]=!![],_0x25d047[_0x550863(0x1d3)]=_0x58dc86,console[_0x550863(0x305)]('\x0a\x20\x20'+_0x2943c5(_0x4b6afe[_0x550863(0x3a1)],'✓')+_0x550863(0x1c5)+_0x2943c5(_0x4b6afe['bold'],_0x58dc86)+'\x0a')):console[_0x550863(0x389)](_0x2943c5(_0x4b6afe['red'],_0x550863(0x365)));}return;}if(_0x208450===_0x550863(0x26b)||_0x208450===_0x550863(0x268)){await _0x483cdf(_0x2a0b29,0x0);return;}if(_0x208450===_0x550863(0xde)){const _0x3055b8=_0x550863(0x316)+_0x1617d3[_0x550863(0x2ad)]+_0x550863(0x164),_0x4816bb=process[_0x550863(0x10c)]===_0x550863(0xdf)?_0x550863(0x2e4)+_0x3055b8:process[_0x550863(0x10c)]===_0x550863(0x1dc)?_0x550863(0x152)+_0x3055b8:_0x550863(0xee)+_0x3055b8;require$$4[_0x550863(0x280)](_0x4816bb),console[_0x550863(0x305)](_0x550863(0x31e)+_0x2943c5(_0x4b6afe[_0x550863(0x3a1)],'✓')+_0x550863(0x2f2)+_0x2943c5(_0x4b6afe['cyan'],_0x3055b8)+'\x0a');return;}let _0xbda189,_0x1c951c,_0xec0b7;if(_0x320b38[_0x550863(0x219)](_0x208450)){_0xbda189=_0x208450,_0x1c951c=_0x181be9[0x1],_0xec0b7=_0x181be9[_0x550863(0x23f)](0x2);if(!_0x1c951c){console[_0x550863(0x389)](_0x2943c5(_0x4b6afe[_0x550863(0x369)],_0x550863(0x28e)+_0x3d44e5+_0x550863(0x2f3)));return;}}else _0xbda189=null,_0x1c951c=_0x181be9[0x0],_0xec0b7=_0x181be9[_0x550863(0x23f)](0x1);const _0x5a63e1=_0x477596[_0x550863(0x1a8)]??_0x97e9b5[_0x550863(0x1a8)],_0x5f00ef=_0x1fa413(_0x1c951c,_0x5a63e1);if(_0x477596['help']){_0x3bf348(_0x2a0b29,_0x5f00ef);return;}let _0x275869=null;if(_0xec0b7['length']){const _0x18f23b=_0xec0b7[_0x550863(0x27f)]('\x20');try{_0x275869=_0x349ced(_0x18f23b);}catch(_0x1f86ab){console[_0x550863(0x389)](_0x2943c5(_0x4b6afe[_0x550863(0x369)],_0x550863(0x35a)+_0x18f23b+_0x550863(0x31e)+_0x2943c5(_0x4b6afe[_0x550863(0x28a)],_0x1f86ab[_0x550863(0x172)])+'\x0a'));return;}}if(!_0xbda189)_0xbda189=_0x275869!==null?_0x550863(0x3d7):_0x550863(0x3cc);try{const _0x48b07a=await _0x3f3643(_0x2a0b29,_0xbda189,_0x5f00ef,_0x275869);_0xfff428(_0x48b07a[_0x550863(0x2d0)],_0x48b07a['body']);}catch(_0x9629a8){console[_0x550863(0x389)](_0x550863(0x31e)+_0x2943c5(_0x4b6afe[_0x550863(0x369)],'✗')+'\x20'+_0x9629a8[_0x550863(0x172)]+'\x0a');}}class _0x1e20ec{constructor(){const _0x1fc0cd=_0x2cf9fb;this['children']=new Map(),this[_0x1fc0cd(0x1b9)]=null,this[_0x1fc0cd(0x25c)]=![];}}function _0x216918(_0x559d2b){const _0x560419=_0x2cf9fb,_0x1fd04f=new _0x1e20ec();for(const _0x443c of _0x559d2b){if(_0x443c[_0x560419(0x181)]?.[_0x560419(0xc4)])continue;const _0x478093=_0x443c['path'][_0x560419(0x1c8)](/^\/api/,'')[_0x560419(0x1c8)](/^\[\/env\/:env=[^\]]*\]/,'')[_0x560419(0x1c8)](/^\//,'');if(!_0x478093)continue;let _0x3f9ced=_0x1fd04f;for(const _0x58d724 of _0x478093[_0x560419(0x397)]('/')[_0x560419(0xe5)](Boolean)){if(_0x58d724[_0x560419(0x134)](':')){const _0xad7dfa=_0x58d724[_0x560419(0x23f)](0x1);if(!_0x3f9ced[_0x560419(0x1b9)])_0x3f9ced[_0x560419(0x1b9)]={'param':_0xad7dfa,'node':new _0x1e20ec()};_0x3f9ced=_0x3f9ced[_0x560419(0x1b9)][_0x560419(0x3d0)];}else{if(!_0x3f9ced['children']['has'](_0x58d724))_0x3f9ced[_0x560419(0x102)][_0x560419(0x1c3)](_0x58d724,new _0x1e20ec());_0x3f9ced=_0x3f9ced[_0x560419(0x102)][_0x560419(0x13e)](_0x58d724);}}_0x3f9ced[_0x560419(0x25c)]=!![];}return _0x1fd04f;}const _0x15dc80=new Map();function _0x15acc7(_0x495a63,_0x42bc7d,_0x166666){const _0x5f2861=_0x2cf9fb,_0x247533=_0x15dc80[_0x5f2861(0x13e)](_0x495a63);if(_0x247533&&_0x247533['exp']>Date[_0x5f2861(0xd5)]())return _0x247533[_0x5f2861(0x1a5)];const _0x1a9490=_0x166666();return _0x15dc80[_0x5f2861(0x1c3)](_0x495a63,{'val':_0x1a9490,'exp':Date[_0x5f2861(0xd5)]()+_0x42bc7d}),_0x1a9490;}function _0x2ec94c(_0x1f8b8a,_0x311b28,_0x1f2ddd,_0x16b0ba){const _0x5a41d9=_0x2cf9fb,_0x2271c7=_0x311b28[_0x5a41d9(0x1a8)]??_0x16b0ba['env'];switch(_0x1f8b8a){case _0x5a41d9(0x1a8):return[..._0x1f2ddd[_0x5a41d9(0x22e)]['keys']()][_0x5a41d9(0xe5)](_0x5a24c0=>!_0x5a24c0[_0x5a41d9(0x134)]('~'));case'type':return _0x15acc7(_0x5a41d9(0x233)+_0x2271c7,0x7d0,()=>{const _0x4e20fe=_0x5a41d9;try{return[..._0x1f2ddd[_0x4e20fe(0x1a8)](_0x2271c7)['typeSubDbs']['keys']()]['filter'](_0x190040=>!_0x190040[_0x4e20fe(0x134)]('~'));}catch{return[];}});case'key':if(!_0x311b28[_0x5a41d9(0x1ed)])return[];return _0x15acc7(_0x5a41d9(0x36e)+_0x2271c7+':'+_0x311b28[_0x5a41d9(0x1ed)],0x5dc,()=>{const _0x2e0da5=_0x5a41d9;try{const _0x3c4900=_0x1f2ddd[_0x2e0da5(0x1a8)](_0x2271c7)[_0x2e0da5(0x177)][_0x2e0da5(0x13e)](_0x311b28['type']);if(!_0x3c4900?.['data'])return[];const _0x3a4644=[];for(const {key:_0x2045b1}of _0x3c4900['data'][_0x2e0da5(0x3c7)]({'limit':0x32})){_0x3a4644['push'](String(_0x2045b1));if(_0x3a4644['length']>=0x32)break;}return _0x3a4644;}catch{return[];}});case _0x5a41d9(0x20d):if(!_0x311b28[_0x5a41d9(0x1ed)])return[];return _0x15acc7(_0x5a41d9(0x21e)+_0x2271c7+':'+_0x311b28[_0x5a41d9(0x1ed)],0x7d0,()=>{const _0x535b74=_0x5a41d9;try{const _0x561b19=_0x1f2ddd[_0x535b74(0x1a8)](_0x2271c7)[_0x535b74(0x177)]['get'](_0x311b28[_0x535b74(0x1ed)]);return _0x561b19?[..._0x561b19[_0x535b74(0x201)]?.[_0x535b74(0x1c2)]()??[]]:[];}catch{return[];}});case _0x5a41d9(0x26d):if(!_0x311b28[_0x5a41d9(0x1ed)])return[];return _0x15acc7(_0x5a41d9(0xc1)+_0x2271c7+':'+_0x311b28[_0x5a41d9(0x1ed)],0x7d0,()=>{const _0x3699b0=_0x5a41d9;try{return _0x1f2ddd['fts']?.[_0x3699b0(0x32a)]?.(_0x311b28[_0x3699b0(0x1ed)],_0x1f2ddd[_0x3699b0(0x1a8)](_0x2271c7))?.[_0x3699b0(0x128)](_0x3b512c=>_0x3b512c['name'])??[];}catch{return[];}});default:return[];}}function _0x45cc7d(_0x56f033,_0xa6a4c4,_0x525085,_0x484d3a){const _0x2e53a7=_0x2cf9fb,_0x150a8e=_0x56f033[_0x2e53a7(0x383)]('/'),_0x1ab689=_0x56f033[_0x2e53a7(0x397)]('/'),_0x59fde5=_0x150a8e?_0x1ab689[_0x2e53a7(0x23f)](0x0,-0x1):_0x1ab689[_0x2e53a7(0x23f)](0x0,-0x1),_0x3ba83=_0x150a8e?'':_0x1ab689[_0x1ab689[_0x2e53a7(0x1ae)]-0x1];let _0x132df8=_0xa6a4c4;const _0x23af3b={};for(const _0x55b0bf of _0x59fde5){if(!_0x55b0bf)continue;if(_0x132df8['children']['has'](_0x55b0bf))_0x132df8=_0x132df8[_0x2e53a7(0x102)][_0x2e53a7(0x13e)](_0x55b0bf);else{if(_0x132df8[_0x2e53a7(0x1b9)])_0x23af3b[_0x132df8['dynamic'][_0x2e53a7(0x2a3)]]=_0x55b0bf,_0x132df8=_0x132df8['dynamic']['node'];else return[];}}const _0x3db99a=_0x59fde5[_0x2e53a7(0xe5)](Boolean),_0x2951f8=_0x3db99a[_0x2e53a7(0x1ae)]?_0x3db99a[_0x2e53a7(0x27f)]('/')+'/':'',_0x3e4154=[];for(const [_0x3f3ecb]of _0x132df8[_0x2e53a7(0x102)]){if(_0x3f3ecb['startsWith'](_0x3ba83))_0x3e4154[_0x2e53a7(0x1bb)](_0x2951f8+_0x3f3ecb);}if(_0x132df8['dynamic'])for(const _0x32a15a of _0x2ec94c(_0x132df8[_0x2e53a7(0x1b9)]['param'],_0x23af3b,_0x525085,_0x484d3a)){if(String(_0x32a15a)['startsWith'](_0x3ba83))_0x3e4154['push'](_0x2951f8+_0x32a15a);}return _0x3e4154['slice'](0x0,0x64);}const _0x3a6cc2=[_0x2cf9fb(0x249),_0x2cf9fb(0x138),'env',_0x2cf9fb(0x1b7),_0x2cf9fb(0x27b),_0x2cf9fb(0x15f),_0x2cf9fb(0x323),_0x2cf9fb(0x375),'exit',_0x2cf9fb(0x317)];function _0x721831(_0x1da7ee,_0x4ef1c0,_0x119318){return function _0x3ea1b5(_0x30c1da){const _0x2b70e0=_0x53ec;try{const _0x2e48bf=_0x30c1da[_0x2b70e0(0x245)](/\s[{[]/),_0x14f4c4=_0x2e48bf>=0x0?_0x30c1da[_0x2b70e0(0x23f)](0x0,_0x2e48bf):_0x30c1da,_0x5d022c=_0x14f4c4[_0x2b70e0(0x14d)]();if(!_0x5d022c){const _0x35e8b1=[..._0x3a6cc2,...[..._0x1da7ee[_0x2b70e0(0x102)][_0x2b70e0(0x1c2)]()]][_0x2b70e0(0x23f)](0x0,0x64);return[_0x35e8b1,''];}const _0xb6c0=_0x5d022c['split'](/\s+/),_0x1b30e5=_0xb6c0[0x0],_0x149d6f=_0x1b30e5['toUpperCase']();if(_0xb6c0[_0x2b70e0(0x1ae)]===0x1){const _0x453481=_0x1b30e5[_0x2b70e0(0x1bf)](),_0x12815c=_0x3a6cc2[_0x2b70e0(0xe5)](_0x5d77d7=>_0x5d77d7[_0x2b70e0(0x134)](_0x453481)),_0x5444c0=_0x45cc7d(_0x1b30e5,_0x1da7ee,_0x4ef1c0,_0x119318),_0x597ea5=[...new Set([..._0x12815c,..._0x5444c0])][_0x2b70e0(0x23f)](0x0,0x64);return[_0x597ea5,_0x1b30e5];}if(_0x320b38[_0x2b70e0(0x219)](_0x149d6f)&&_0xb6c0['length']===0x2){const _0x3b5128=_0xb6c0[0x1],_0x4eab24=_0x45cc7d(_0x3b5128,_0x1da7ee,_0x4ef1c0,_0x119318);return[_0x4eab24[_0x2b70e0(0x128)](_0x1eddfd=>_0x1b30e5+'\x20'+_0x1eddfd),_0x1b30e5+'\x20'+_0x3b5128];}if(!_0x320b38[_0x2b70e0(0x219)](_0x149d6f)&&_0xb6c0[_0x2b70e0(0x1ae)]>0x1){const _0x2c0a24=_0x45cc7d(_0x1b30e5,_0x1da7ee,_0x4ef1c0,_0x119318),_0x53c298='\x20'+_0xb6c0[_0x2b70e0(0x23f)](0x1)[_0x2b70e0(0x27f)]('\x20');return[_0x2c0a24[_0x2b70e0(0x128)](_0x461e1e=>_0x461e1e+_0x53c298),_0x1b30e5+_0x53c298];}return[[],_0x30c1da];}catch{return[[],_0x30c1da];}};}async function _0xc5fb95(_0x173d37,_0x2b507f){const _0x2c47ab=_0x2cf9fb,_0x84c89={'enabled':!![],'level':_0x2b507f[_0x2c47ab(0x228)]??_0x2c47ab(0x33b)},_0xce1767={'env':_0x2c47ab(0x1e7)},_0x5cfde5={'current':null},_0x35b4fb=_0x216918(_0x173d37[_0x2c47ab(0x115)][_0x2c47ab(0x236)]()),_0x422eb1=_0x721831(_0x35b4fb,_0x173d37,_0xce1767);_0x173d37[_0x2c47ab(0x305)][_0x2c47ab(0x3c6)](_0x590661=>{const _0x52a439=_0x2c47ab;if(!_0x84c89[_0x52a439(0x137)])return;_0x1dabaa(_0x590661,_0x84c89['level']),_0x5cfde5[_0x52a439(0x186)]?.[_0x52a439(0x275)](!![]);}),_0x4cd72c(_0x173d37,_0x2b507f);const _0x46af20=_0x17967e[_0x2c47ab(0x271)]({'input':process[_0x2c47ab(0x377)],'output':process['stdout'],'terminal':!![],'completer':_0x422eb1,'prompt':_0x4034d7(_0xce1767),'historySize':_0x5e60ab});try{const _0x69a3c=_0xf8d260[_0x2c47ab(0x16e)](_0x2d656f,'utf8')[_0x2c47ab(0x397)]('\x0a')[_0x2c47ab(0xe5)](Boolean);_0x46af20[_0x2c47ab(0x2cc)]=_0x69a3c[_0x2c47ab(0x1ac)]()[_0x2c47ab(0x23f)](0x0,_0x5e60ab);}catch{}_0x5cfde5[_0x2c47ab(0x186)]=_0x46af20,_0x46af20['on'](_0x2c47ab(0x3c9),async _0x1b97e1=>{const _0x49a8f2=_0x2c47ab;_0x46af20['pause']();try{await _0x1d3ca6(_0x1b97e1,_0x173d37,_0x2b507f,_0x84c89,_0xce1767,_0x46af20);}catch(_0x11bee6){console[_0x49a8f2(0x389)](_0x2943c5(_0x4b6afe[_0x49a8f2(0x369)],_0x49a8f2(0xe4)+_0x11bee6[_0x49a8f2(0x172)]));}finally{_0x46af20['resume'](),_0x46af20[_0x49a8f2(0x275)]();}}),_0x46af20['on'](_0x2c47ab(0x216),()=>{const _0x16ba9b=_0x2c47ab;try{const _0xf027c1=[..._0x46af20[_0x16ba9b(0x2cc)]][_0x16ba9b(0x1ac)]()[_0x16ba9b(0xe5)](Boolean)[_0x16ba9b(0x23f)](0x0,_0x5e60ab);_0xf8d260[_0x16ba9b(0x282)](_0x2d656f,_0xf027c1[_0x16ba9b(0x27f)]('\x0a')+'\x0a');}catch{}_0x483cdf(_0x173d37,0x0);});let _0x358a18=0x0;return process['on'](_0x2c47ab(0x18b),()=>{const _0x1e06a9=_0x2c47ab;if(_0x1a18f2)return _0x483cdf(_0x173d37,0x82,_0x1e06a9(0x18b));if(_0x46af20[_0x1e06a9(0x3c9)]==='')return _0x483cdf(_0x173d37,0x0,_0x1e06a9(0x18b));const _0x1caf2c=Date[_0x1e06a9(0xd5)]();if(_0x1caf2c-_0x358a18<0x5dc)return _0x483cdf(_0x173d37,0x0,'SIGINT\x20(double-tap)');_0x358a18=_0x1caf2c,process[_0x1e06a9(0x355)][_0x1e06a9(0x204)]('\x0a'),_0x46af20[_0x1e06a9(0x36f)](0x0),_0x46af20[_0x1e06a9(0x275)](),process[_0x1e06a9(0x252)][_0x1e06a9(0x204)](_0x2943c5(_0x4b6afe[_0x1e06a9(0x28a)],_0x1e06a9(0x24c)));}),process['on'](_0x2c47ab(0x105),()=>_0x483cdf(_0x173d37,0x0,'SIGTERM')),process['on'](_0x2c47ab(0x1aa),()=>_0x483cdf(_0x173d37,0x0,_0x2c47ab(0x1aa))),_0x46af20['prompt'](),_0x46af20;}return okdbShell={'start':_0xc5fb95,'colorLog':_0x1dabaa,'lenientParse':_0x349ced,'_splitLine':_0x2315d8,'_formatRouteHelpLines':_0x409438,'_routeSummary':_0x1b0436,'_routeTags':_0x4e25a1},okdbShell;}var hasRequiredOkdb;function requireOkdb(){const _0x1e6f2b=_0x4f7fbb;if(hasRequiredOkdb)return okdb$1;hasRequiredOkdb=0x1;try{process[_0x1e6f2b(0x221)]();}catch{}const _0x389e06=require$$1$1,_0x298539=require$$1;function _0x5778ef(_0x28aa76){const _0x1655f6=_0x1e6f2b,_0x17cda8=_0x28aa76[_0x1655f6(0x23f)](0x2),_0x5d6c4a={};let _0x2f7849=0x0;while(_0x2f7849<_0x17cda8[_0x1655f6(0x1ae)]){const _0x3630d4=_0x17cda8[_0x2f7849];if(_0x3630d4==='--port'||_0x3630d4==='-p')_0x5d6c4a['port']=Number(_0x17cda8[++_0x2f7849]);else{if(_0x3630d4===_0x1655f6(0x39b)||_0x3630d4==='-d')_0x5d6c4a[_0x1655f6(0x3c1)]=_0x17cda8[++_0x2f7849];else{if(_0x3630d4===_0x1655f6(0xcd)||_0x3630d4==='-k')_0x5d6c4a[_0x1655f6(0x273)]=_0x17cda8[++_0x2f7849];else{if(_0x3630d4===_0x1655f6(0x1fa)||_0x3630d4==='-c')_0x5d6c4a[_0x1655f6(0x12b)]=_0x17cda8[++_0x2f7849];else{if(_0x3630d4==='--log-level')_0x5d6c4a[_0x1655f6(0x228)]=_0x17cda8[++_0x2f7849];else{if(_0x3630d4==='--no-repl')_0x5d6c4a[_0x1655f6(0xe9)]=!![];else{if(_0x3630d4===_0x1655f6(0x3d6))_0x5d6c4a[_0x1655f6(0x2d1)]=!![];else{if(_0x3630d4===_0x1655f6(0x168)||_0x3630d4==='-e')_0x5d6c4a[_0x1655f6(0x1a8)]=_0x17cda8[++_0x2f7849];else{if(_0x3630d4===_0x1655f6(0x243))_0x5d6c4a[_0x1655f6(0x27b)]=_0x17cda8[++_0x2f7849];else{if(_0x3630d4===_0x1655f6(0x34c))_0x5d6c4a[_0x1655f6(0x1d2)]=!![];else{if(_0x3630d4===_0x1655f6(0x18a))_0x5d6c4a[_0x1655f6(0x330)]=!![];else{if(_0x3630d4===_0x1655f6(0x226))_0x5d6c4a['drop']=!![];else{if(_0x3630d4===_0x1655f6(0x357)){const _0x55f98b=[];while(_0x2f7849+0x1<_0x17cda8[_0x1655f6(0x1ae)]&&!_0x17cda8[_0x2f7849+0x1][_0x1655f6(0x134)]('--')){_0x55f98b[_0x1655f6(0x1bb)](_0x17cda8[++_0x2f7849]);}_0x5d6c4a['open']=_0x55f98b[_0x1655f6(0x1ae)]>0x0?_0x55f98b:!![];}else{if(_0x3630d4==='--log-requests')_0x5d6c4a[_0x1655f6(0x293)]=!![];else{if(_0x3630d4===_0x1655f6(0x146))_0x5d6c4a[_0x1655f6(0x14b)]=_0x17cda8[++_0x2f7849];else{if(_0x3630d4===_0x1655f6(0x26a))_0x5d6c4a['password']=_0x17cda8[++_0x2f7849];else{if(_0x3630d4===_0x1655f6(0xd1))_0x5d6c4a['label']=_0x17cda8[++_0x2f7849];else{if(_0x3630d4===_0x1655f6(0x32f))_0x5d6c4a[_0x1655f6(0x18c)]=_0x17cda8[++_0x2f7849];else{if(_0x3630d4==='--grants')_0x5d6c4a['grants']=_0x17cda8[++_0x2f7849];else{if(_0x3630d4===_0x1655f6(0x26e))_0x5d6c4a[_0x1655f6(0xfa)]=_0x17cda8[++_0x2f7849];else{if(_0x3630d4===_0x1655f6(0x15d))_0x5d6c4a[_0x1655f6(0x241)]=_0x17cda8[++_0x2f7849];else{if(_0x3630d4===_0x1655f6(0x238)||_0x3630d4==='-u')_0x5d6c4a[_0x1655f6(0xed)]=_0x17cda8[++_0x2f7849];else{if(_0x3630d4==='--address')_0x5d6c4a[_0x1655f6(0x10d)]=_0x17cda8[++_0x2f7849];else{if(_0x3630d4===_0x1655f6(0x1ff)||_0x3630d4==='-v'){const _0x561be9=require$$2;console[_0x1655f6(0x305)](_0x561be9[_0x1655f6(0x148)]),process[_0x1655f6(0x34a)](0x0);}else(_0x3630d4===_0x1655f6(0x101)||_0x3630d4==='-h')&&(_0x48d0ba(),process[_0x1655f6(0x34a)](0x0));}}}}}}}}}}}}}}}}}}}}}}}_0x2f7849++;}return _0x5d6c4a;}function _0x48d0ba(){const _0x31b687=_0x1e6f2b;console[_0x31b687(0x305)]('\x0a\x20\x20okdb\x20—\x20standalone\x20OKDB\x20server\x0a\x0a\x20\x20Usage:\x0a\x20\x20\x20\x20okdb\x20[options]\x0a\x20\x20\x20\x20okdb\x20<command>\x0a\x0a\x20\x20Options:\x0a\x20\x20\x20\x20-p,\x20--port\x20<port>\x20\x20\x20\x20\x20\x20\x20\x20HTTP\x20port\x20(default:\x208484)\x0a\x20\x20\x20\x20-d,\x20--path\x20<dir>\x20\x20\x20\x20\x20\x20\x20\x20\x20Database\x20directory\x20(default:\x20./okdb-data)\x0a\x20\x20\x20\x20-k,\x20--key\x20\x20<secret>\x20\x20\x20\x20\x20\x20Encryption\x20key\x20for\x20data\x20at\x20rest\x0a\x20\x20\x20\x20-c,\x20--config\x20<file>\x20\x20\x20\x20\x20\x20Config\x20file\x20path\x20(default:\x20.kdbconfig)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--log-level\x20<level>\x20\x20Log\x20level:\x20debug\x20|\x20info\x20|\x20warn\x20|\x20error\x20(default:\x20info)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-repl\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Start\x20server\x20without\x20interactive\x20shell\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-admin\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20admin\x20UI\x0a\x20\x20\x20\x20\x20\x20\x20\x20--open\x20[ip\x20...]\x20\x20\x20\x20\x20\x20Open\x20mode:\x20bypass\x20auth\x20for\x20listed\x20IPs\x20(default:\x20localhost).\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Examples:\x20--open\x20\x20--open\x20192.168.1.0/24\x20\x20--open\x20*\x0a\x20\x20\x20\x20\x20\x20\x20\x20--log-requests\x20\x20\x20\x20\x20\x20\x20Print\x20every\x20HTTP\x20request\x20to\x20stdout\x20(for\x20debugging)\x0a\x20\x20\x20\x20-v,\x20--version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Print\x20version\x20and\x20exit\x0a\x20\x20\x20\x20-h,\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x0a\x0a\x20\x20Commands:\x0a\x20\x20\x20\x20version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Print\x20version\x20and\x20exit\x0a\x20\x20\x20\x20doctor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Run\x20health\x20checks\x0a\x20\x20\x20\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Create\x20.kdbconfig\x20and\x20okdb-data/\x0a\x20\x20\x20\x20token\x20create\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Create\x20a\x20token\x20in\x20the\x20local\x20DB\x20(direct\x20access,\x20no\x20HTTP)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--name\x20<name>\x20\x20\x20\x20\x20\x20For\x20password\x20login\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--password\x20<pass>\x20\x20Password\x20(requires\x20--name)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--label\x20<text>\x20\x20\x20\x20\x20Human\x20description\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--permissions\x20<l>\x20\x20Comma-separated\x20baseline\x20permissions\x20(e.g.\x20\x22*\x22\x20or\x20\x22data:read\x22)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--grants\x20<json>\x20\x20\x20\x20Per-env\x20grants\x20as\x20JSON\x20(e.g.\x20\x27{\x22orders\x22:[\x22data:*\x22]}\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--ttl\x20<ms>\x20\x20\x20\x20\x20\x20\x20\x20\x20Optional\x20TTL\x20in\x20milliseconds\x0a\x20\x20\x20\x20token\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20List\x20all\x20tokens\x20in\x20the\x20local\x20DB\x0a\x20\x20\x20\x20token\x20revoke\x20<id>\x20\x20\x20\x20\x20\x20\x20\x20Revoke\x20(delete)\x20a\x20token\x20by\x20id\x20(full\x20uuid\x20or\x20unique\x20prefix)\x0a\x20\x20\x20\x20join\x20<address>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Join\x20an\x20existing\x20cluster\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--token\x20<t>\x20\x20\x20\x20\x20\x20\x20\x20Bearer\x20token\x20from\x20the\x20cluster\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--username\x20<u>\x20\x20\x20\x20\x20Or,\x20username\x20for\x20login\x20exchange\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--password\x20<p>\x20\x20\x20\x20\x20Password\x20for\x20login\x20exchange\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--address\x20<addr>\x20\x20\x20This\x20node\x27s\x20reachable\x20sync\x20address\x20(required)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--path\x20<dir>\x20\x20\x20\x20\x20\x20\x20Local\x20DB\x20path\x0a\x20\x20\x20\x20backup\x20[dir]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Hot\x20filesystem\x20backup\x20via\x20LMDB\x20native\x20copy\x20(default:\x20./okdb-backup)\x0a\x20\x20\x20\x20export\x20<file>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Streaming\x20NDJSON\x20logical\x20export\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env\x20<name>\x20\x20\x20\x20\x20\x20env\x20to\x20export\x20(default:\x20default)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--types\x20<a,b,...>\x20comma-separated\x20type\x20filter\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--changes\x20\x20\x20\x20\x20\x20\x20\x20\x20include\x20changelog\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--blobs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20also\x20export\x20blob\x20files\x20alongside\x0a\x20\x20\x20\x20import\x20<file>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Streaming\x20NDJSON\x20logical\x20import\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env\x20<name>\x20\x20\x20\x20\x20\x20target\x20env\x20override\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--types\x20<a,b,...>\x20import\x20only\x20these\x20types\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--drop\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20drop\x20&\x20recreate\x20existing\x20types\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--changes\x20\x20\x20\x20\x20\x20\x20\x20\x20restore\x20changelog\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--blobs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20also\x20import\x20blob\x20files\x20alongside\x0a\x20\x20\x20\x20reset\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Delete\x20and\x20recreate\x20database\x20(with\x20confirmation)\x0a\x20\x20\x20\x20license\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20List\x20stored\x20licenses,\x20current\x20tier,\x20and\x20usage\x0a\x20\x20\x20\x20license\x20<blob|path>\x20\x20\x20\x20\x20\x20Add\x20a\x20license\x20blob\x20(or\x20read\x20from\x20a\x20.license\x20file)\x0a\x20\x20\x20\x20license\x20<activation>\x20\x20\x20\x20\x20Activate\x20a\x20previously-added\x20license\x20with\x20the\x20vendor\x27s\x20token\x0a\x20\x20\x20\x20license\x20<id>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20details\x20for\x20one\x20stored\x20license\x20(by\x20uuid\x20or\x20prefix)\x0a\x20\x20\x20\x20license\x20remove\x20<id>\x20\x20\x20\x20\x20\x20Remove\x20a\x20stored\x20license\x0a\x0a\x20\x20Environment\x20variables:\x0a\x20\x20\x20\x20OKDB_PORT\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20HTTP\x20port\x0a\x20\x20\x20\x20OKDB_PATH\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Database\x20directory\x0a\x20\x20\x20\x20OKDB_LOG_LEVEL\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Log\x20level\x20(debug|info|warn|error)\x0a\x20\x20\x20\x20OKDB_KEY\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Encryption\x20key\x0a\x20\x20\x20\x20OKDB_NO_REPL=1\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20REPL\x0a\x20\x20\x20\x20OKDB_NO_ADMIN=1\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20admin\x20UI\x0a\x0a\x20\x20Config\x20file\x20(.kdbconfig)\x20—\x20JSON,\x20all\x20keys\x20optional:\x0a\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22port\x22:\x20\x20\x20\x20\x208484,\x0a\x20\x20\x20\x20\x20\x20\x22path\x22:\x20\x20\x20\x20\x20\x22./okdb-data\x22,\x0a\x20\x20\x20\x20\x20\x20\x22key\x22:\x20\x20\x20\x20\x20\x20\x22...\x22,\x0a\x20\x20\x20\x20\x20\x20\x22logLevel\x22:\x20\x22info\x22,\x0a\x20\x20\x20\x20\x20\x20\x22noAdmin\x22:\x20\x20false,\x0a\x20\x20\x20\x20\x20\x20\x22noRepl\x22:\x20\x20\x20false,\x0a\x20\x20\x20\x20\x20\x20\x22auth\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22open\x22:\x20false\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20Examples:\x0a\x20\x20\x20\x20okdb\x0a\x20\x20\x20\x20okdb\x20--port\x209000\x20--path\x20./mydb\x0a\x20\x20\x20\x20okdb\x20--no-repl\x20--port\x208080\x0a\x20\x20\x20\x20okdb\x20--open\x0a\x20\x20\x20\x20okdb\x20--open\x20192.168.1.0/24\x0a\x20\x20\x20\x20okdb\x20doctor\x0a\x20\x20\x20\x20okdb\x20backup\x20./my-backup\x0a');}const _0x37b73=new Set([_0x1e6f2b(0xc8),_0x1e6f2b(0x33b),_0x1e6f2b(0x387),_0x1e6f2b(0x389)]);function _0x47069a(_0x3d5e91){const _0x3101df=_0x1e6f2b,_0x105af2=_0x3d5e91[_0x3101df(0x12b)]?_0x389e06['resolve'](_0x3d5e91[_0x3101df(0x12b)]):_0x389e06[_0x3101df(0x33f)](_0x3101df(0x150));let _0x20956e={};if(_0x298539['existsSync'](_0x105af2))try{const _0x2fd705=_0x298539[_0x3101df(0x16e)](_0x105af2,_0x3101df(0x1ec))[_0x3101df(0x1c8)](/^\uFEFF/,'');_0x20956e=JSON[_0x3101df(0x2ee)](_0x2fd705),console[_0x3101df(0x305)](_0x3101df(0x2f4)+_0x105af2);}catch(_0x2b4e22){console['error'](_0x3101df(0x10a)+_0x105af2+':\x20'+_0x2b4e22['message']),process[_0x3101df(0x34a)](0x1);}const _0x27f896={'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},_0x5760b6={'port':_0x3d5e91['port']??_0x20956e['port']??_0x27f896['port']??0x2124,'dbPath':_0x3d5e91[_0x3101df(0x3c1)]??_0x20956e['path']??_0x27f896[_0x3101df(0x3c1)]??_0x3101df(0x155),'key':_0x3d5e91[_0x3101df(0x273)]??_0x20956e['key']??_0x27f896[_0x3101df(0x273)]??undefined,'logLevel':_0x3d5e91['logLevel']??_0x20956e[_0x3101df(0x228)]??_0x27f896['logLevel']??_0x3101df(0x33b),'noRepl':_0x3d5e91['noRepl']??_0x20956e['noRepl']??_0x27f896[_0x3101df(0xe9)]??![],'noAdmin':_0x3d5e91[_0x3101df(0x2d1)]??_0x20956e[_0x3101df(0x2d1)]??_0x27f896[_0x3101df(0x2d1)]??![],'admin':_0x20956e[_0x3101df(0x189)]??{},'api':_0x20956e[_0x3101df(0x114)]??undefined,'auth':_0x20956e[_0x3101df(0x276)]??undefined,'mcp':_0x20956e['mcp']??undefined,'timeMachine':_0x20956e[_0x3101df(0xf4)]!==![]?_0x20956e[_0x3101df(0xf4)]??{}:![]};return _0x3d5e91[_0x3101df(0x375)]!==undefined&&(_0x5760b6[_0x3101df(0x276)]=_0x5760b6[_0x3101df(0x276)]||{},_0x5760b6[_0x3101df(0x276)][_0x3101df(0x375)]=_0x3d5e91['open']),_0x3d5e91[_0x3101df(0x293)]&&(_0x5760b6[_0x3101df(0xc8)]=_0x5760b6[_0x3101df(0xc8)]||{},_0x5760b6[_0x3101df(0xc8)]['logRequests']=!![]),(!Number['isInteger'](_0x5760b6[_0x3101df(0x2ad)])||_0x5760b6[_0x3101df(0x2ad)]<0x1||_0x5760b6[_0x3101df(0x2ad)]>0xffff)&&(console[_0x3101df(0x389)]('[okdb]\x20invalid\x20port:\x20'+_0x5760b6[_0x3101df(0x2ad)]+_0x3101df(0x370)),process[_0x3101df(0x34a)](0x1)),!_0x37b73['has'](_0x5760b6[_0x3101df(0x228)])&&(console[_0x3101df(0x389)](_0x3101df(0x222)+_0x5760b6[_0x3101df(0x228)]+'\x22\x20(must\x20be\x20debug|info|warn|error)'),process[_0x3101df(0x34a)](0x1)),_0x5760b6;}function _0x1e56a7(_0x2614fd){const _0x3be101=_0x1e6f2b;return!!(_0x2614fd&&typeof _0x2614fd===_0x3be101(0x380)&&!Array[_0x3be101(0x278)](_0x2614fd)&&Object[_0x3be101(0x1c2)](_0x2614fd)[_0x3be101(0x1ae)]>0x0);}const _0x49bbba=!process[_0x1e6f2b(0x355)]['isTTY']||!!process.env.NO_COLOR;function _0x250072(_0x4dffd5,_0x5a338d){const _0x26b489=_0x1e6f2b;return _0x49bbba?_0x5a338d:'\x1b['+_0x4dffd5+'m'+_0x5a338d+_0x26b489(0x3ba);}function _0x12d2e2(_0x56c0af){const _0xff7bf6=_0x1e6f2b;if(!_0x56c0af||_0x56c0af[_0xff7bf6(0x1ae)]===0x0)return;const _0x29fb54='─'['repeat'](0x38);process[_0xff7bf6(0x252)]['write']('\x0a'),process[_0xff7bf6(0x252)]['write'](_0x250072('33',_0xff7bf6(0x180)+_0x56c0af[_0xff7bf6(0x1ae)]+_0xff7bf6(0x203)+(_0x56c0af[_0xff7bf6(0x1ae)]>0x1?'S':'')+'\x0a')),process[_0xff7bf6(0x252)][_0xff7bf6(0x204)]('\x20\x20'+_0x29fb54+'\x0a');for(const _0x2075a6 of _0x56c0af){const _0x489cf1=_0x2075a6[_0xff7bf6(0x1d3)]===_0xff7bf6(0x389)?_0x250072('31',_0xff7bf6(0x106)):_0x250072('33',_0xff7bf6(0x16a));process[_0xff7bf6(0x252)][_0xff7bf6(0x204)](_0x489cf1+'\x20\x20'+_0x250072('1',_0x2075a6[_0xff7bf6(0xda)])+'\x0a'),process[_0xff7bf6(0x252)][_0xff7bf6(0x204)](_0xff7bf6(0x2dc)+_0x2075a6[_0xff7bf6(0x172)]+'\x0a');if(_0x2075a6[_0xff7bf6(0x24f)])process['stderr'][_0xff7bf6(0x204)]('\x20\x20\x20\x20\x20\x20\x20'+_0x250072('2',_0xff7bf6(0x124)+_0x2075a6[_0xff7bf6(0x24f)])+'\x0a');process[_0xff7bf6(0x252)][_0xff7bf6(0x204)]('\x0a');}process[_0xff7bf6(0x252)][_0xff7bf6(0x204)]('\x20\x20'+_0x29fb54+'\x0a\x0a');}function _0x17a38c(_0x14600f,_0x3f2ab3){const _0x5e5f48=_0x1e6f2b,_0x129761=_0x14600f['http'][_0x5e5f48(0x350)](_0x3f2ab3);return new Promise((_0x4b5dd2,_0x35cd7f)=>{const _0x4e838a=_0x5e5f48;_0x129761[_0x4e838a(0x12f)](_0x4e838a(0x2f9),_0x4b5dd2),_0x129761[_0x4e838a(0x12f)]('error',_0x35cd7f);});}async function _0x378920(_0x27fe98){const _0x2aadaf=_0x1e6f2b,_0x3619ff=require$$3;console['log']('\x0a\x20\x20okdb\x20doctor\x0a');let _0x287c75=!![];const _0x3f391e=(_0x4cb1fa,_0x5e380c)=>{console['log']('\x20\x20'+(_0x4cb1fa?'✓':'✗')+'\x20'+_0x5e380c);if(!_0x4cb1fa)_0x287c75=![];},_0x5a5c7e=Number(process[_0x2aadaf(0x148)][_0x2aadaf(0x1c8)]('v','')[_0x2aadaf(0x397)]('.')[0x0]);_0x3f391e(_0x5a5c7e>=0x12,_0x2aadaf(0x107)+process[_0x2aadaf(0x148)]+(_0x5a5c7e<0x12?'\x20\x20(need\x20≥\x2018)':''));const _0xa2bd81=_0x389e06['resolve'](_0x27fe98[_0x2aadaf(0x230)]);try{_0x298539[_0x2aadaf(0x3b0)](_0xa2bd81,{'recursive':!![]});const _0x17252b=_0x389e06[_0x2aadaf(0x27f)](_0xa2bd81,'.okdb-write-test');_0x298539[_0x2aadaf(0x282)](_0x17252b,''),_0x298539[_0x2aadaf(0x235)](_0x17252b),_0x3f391e(!![],_0x2aadaf(0x24b)+_0xa2bd81);}catch(_0x14afc1){_0x3f391e(![],_0x2aadaf(0x3c3)+_0xa2bd81+'\x20\x20('+_0x14afc1[_0x2aadaf(0x172)]+')');}const _0x103715=await new Promise(_0x5ada46=>{const _0x118ba0=_0x2aadaf,_0x3b5de9=_0x3619ff['createServer']();_0x3b5de9[_0x118ba0(0x12f)](_0x118ba0(0x389),()=>_0x5ada46(![])),_0x3b5de9['once']('listening',()=>{const _0x642208=_0x118ba0;_0x3b5de9[_0x642208(0x216)](),_0x5ada46(!![]);}),_0x3b5de9['listen'](_0x27fe98['port'],_0x118ba0(0x2bd));});_0x3f391e(_0x103715,_0x2aadaf(0x132)+_0x27fe98[_0x2aadaf(0x2ad)]+'\x20'+(_0x103715?_0x2aadaf(0x2ec):_0x2aadaf(0x12e)));const _0x17ab4b=_0x389e06[_0x2aadaf(0x33f)](_0x2aadaf(0x150));if(_0x298539['existsSync'](_0x17ab4b))try{JSON[_0x2aadaf(0x2ee)](_0x298539[_0x2aadaf(0x16e)](_0x17ab4b,_0x2aadaf(0x1ec))[_0x2aadaf(0x1c8)](/^\uFEFF/,'')),_0x3f391e(!![],_0x2aadaf(0x27d)+_0x17ab4b);}catch(_0x111391){_0x3f391e(![],'config\x20file\x20invalid:\x20'+_0x111391[_0x2aadaf(0x172)]);}else _0x3f391e(!![],'no\x20.kdbconfig\x20(using\x20defaults)');console[_0x2aadaf(0x305)](''),_0x287c75?console[_0x2aadaf(0x305)](_0x2aadaf(0x3b8)):(console[_0x2aadaf(0x305)](_0x2aadaf(0x322)),process[_0x2aadaf(0x34a)](0x1));}async function _0x28f878(){const _0x40e056=_0x1e6f2b,_0x2803f7=_0x389e06[_0x40e056(0x33f)](_0x40e056(0x150));!_0x298539[_0x40e056(0xe6)](_0x2803f7)?(_0x298539['writeFileSync'](_0x2803f7,JSON[_0x40e056(0x2c7)]({'port':0x2124,'path':'./okdb-data','logLevel':_0x40e056(0x33b),'noRepl':![],'noAdmin':![]},null,0x2)+'\x0a'),console[_0x40e056(0x305)](_0x40e056(0x390))):console[_0x40e056(0x305)](_0x40e056(0x208));const _0x104ceb=_0x389e06[_0x40e056(0x33f)](_0x40e056(0x155));!_0x298539[_0x40e056(0xe6)](_0x104ceb)?(_0x298539[_0x40e056(0x3b0)](_0x104ceb,{'recursive':!![]}),console[_0x40e056(0x305)](_0x40e056(0x332))):console[_0x40e056(0x305)](_0x40e056(0x200)),console[_0x40e056(0x305)](_0x40e056(0x116));}async function _0x46a1bf(_0x3eb5c9){const _0x4ae3a2=_0x1e6f2b,_0x3dee4e=_0x389e06['resolve'](_0x3eb5c9[_0x4ae3a2(0x230)]);if(!_0x298539[_0x4ae3a2(0xe6)](_0x3dee4e)){console[_0x4ae3a2(0x305)]('[okdb]\x20nothing\x20to\x20reset\x20—\x20'+_0x3dee4e+_0x4ae3a2(0x14a));return;}const _0x5b8c24=require$$0$2,_0x387fab=_0x5b8c24[_0x4ae3a2(0x271)]({'input':process[_0x4ae3a2(0x377)],'output':process[_0x4ae3a2(0x355)]}),_0x14bb96=await new Promise(_0x12de33=>_0x387fab['question']('\x0a\x20\x20Delete\x20ALL\x20data\x20in\x20'+_0x3dee4e+'?\x0a\x20\x20Type\x20\x22yes\x22\x20to\x20confirm:\x20',_0x12de33));_0x387fab[_0x4ae3a2(0x216)](),console[_0x4ae3a2(0x305)]('');if(_0x14bb96[_0x4ae3a2(0x171)]()[_0x4ae3a2(0x1bf)]()!==_0x4ae3a2(0x244)){console[_0x4ae3a2(0x305)](_0x4ae3a2(0x117));return;}_0x298539[_0x4ae3a2(0x256)](_0x3dee4e,{'recursive':!![],'force':!![]}),console['log']('[okdb]\x20reset:\x20'+_0x3dee4e+'\x20deleted');}async function _0x49c045(_0xcf1cd4,_0x1c7078){const _0x3e6655=_0x1e6f2b,_0x502b27=require$$5,_0x36be10=_0x389e06[_0x3e6655(0x33f)](_0x1c7078[_0x3e6655(0x230)]);console[_0x3e6655(0x305)]('[okdb]\x20opening\x20'+_0x36be10+'…');const _0x269c4d=new _0x502b27(_0x36be10,_0x1c7078[_0x3e6655(0x273)]?{'encryptionKey':_0x1c7078[_0x3e6655(0x273)]}:{});await _0x269c4d['open'](),console['log'](_0x3e6655(0x31d)+_0xcf1cd4+'…');const {envs:_0x1d8ba7}=await _0x269c4d[_0x3e6655(0xdd)][_0x3e6655(0x2f7)](_0xcf1cd4);for(const _0x52150f of _0x1d8ba7){const _0x22811b=_0x52150f[_0x3e6655(0xe7)]>0x0?'\x20\x20('+(_0x52150f['sizeBefore']/0x400/0x400)[_0x3e6655(0x14e)](0x2)+'\x20MB\x20→\x20'+(_0x52150f[_0x3e6655(0x207)]/0x400/0x400)[_0x3e6655(0x14e)](0x2)+_0x3e6655(0x374):'';console[_0x3e6655(0x305)](_0x3e6655(0x3a7)+_0x52150f[_0x3e6655(0x14b)]+_0x3e6655(0x131)+_0x52150f[_0x3e6655(0x270)]+_0x22811b);}await _0x269c4d[_0x3e6655(0x216)](),console[_0x3e6655(0x305)](_0x3e6655(0x344));}async function _0x269280(_0x26ce13,_0x3d3d9d,_0x5218f8){const _0x2d6308=_0x1e6f2b,_0x1aec3e=require$$5,_0x4d7c42=_0x389e06[_0x2d6308(0x33f)](_0x3d3d9d['dbPath']),_0x2bcf65=_0x5218f8[_0x2d6308(0x1a8)]??'default',_0x10fda1=_0x5218f8['types']?_0x5218f8['types']['split'](',')['map'](_0xc3c96d=>_0xc3c96d[_0x2d6308(0x171)]()):null;console[_0x2d6308(0x305)]('[okdb]\x20opening\x20'+_0x4d7c42+'…');const _0x155473=new _0x1aec3e(_0x4d7c42,_0x3d3d9d[_0x2d6308(0x273)]?{'encryptionKey':_0x3d3d9d[_0x2d6308(0x273)]}:{});await _0x155473[_0x2d6308(0x375)](),console[_0x2d6308(0x305)](_0x2d6308(0x19c)+_0x2bcf65+'\x22\x20→\x20'+_0x26ce13+'…');const _0xb20003=await _0x155473['migrate']['exportToFile'](_0x26ce13,{'envName':_0x2bcf65,'types':_0x10fda1,'includeChanges':!!_0x5218f8['changes']});console[_0x2d6308(0x305)]('[okdb]\x20exported\x20\x20types='+_0xb20003['types']+_0x2d6308(0x109)+_0xb20003[_0x2d6308(0x2c2)]+'\x20\x20changes='+_0xb20003['changes']);if(_0x5218f8[_0x2d6308(0x330)]){const _0x3be729=_0x389e06[_0x2d6308(0x27f)](_0x389e06[_0x2d6308(0x300)](_0x26ce13),_0x2d6308(0x330));process[_0x2d6308(0x355)][_0x2d6308(0x204)](_0x2d6308(0x3d3));const {count:_0x2530fd,bytes:_0x5d2857}=await _0x155473[_0x2d6308(0xdd)][_0x2d6308(0x1c1)](_0x3be729);console[_0x2d6308(0x305)](_0x2d6308(0x127)+_0x3be729+_0x2d6308(0xcf)+_0x2530fd+_0x2d6308(0x1d9)+(_0x2530fd!==0x1?'s':'')+',\x20'+(_0x5d2857/0x400/0x400)[_0x2d6308(0x14e)](0x2)+_0x2d6308(0x374));}await _0x155473['close'](),console[_0x2d6308(0x305)](_0x2d6308(0x29c));}async function _0x317e89(_0x56bc4e,_0x399e6e,_0x100047){const _0x2651dd=_0x1e6f2b,_0x5a7fe2=require$$5,_0x33b342=_0x389e06[_0x2651dd(0x33f)](_0x399e6e['dbPath']),_0x1cb7f6=_0x100047[_0x2651dd(0x1a8)]??null,_0x33ba3e=_0x100047[_0x2651dd(0x27b)]?_0x100047[_0x2651dd(0x27b)][_0x2651dd(0x397)](',')[_0x2651dd(0x128)](_0x328367=>_0x328367['trim']()):null,_0x2b41f=!!_0x100047[_0x2651dd(0x314)];console[_0x2651dd(0x305)](_0x2651dd(0xeb)+_0x33b342+'…');const _0x5f558a=new _0x5a7fe2(_0x33b342,_0x399e6e[_0x2651dd(0x273)]?{'encryptionKey':_0x399e6e[_0x2651dd(0x273)]}:{});await _0x5f558a[_0x2651dd(0x375)](),console[_0x2651dd(0x305)](_0x2651dd(0x3d8)+_0x56bc4e+'…');const _0x875a43=await _0x5f558a[_0x2651dd(0xdd)]['importFromFile'](_0x56bc4e,{'envName':_0x1cb7f6,'types':_0x33ba3e,'dropExisting':_0x2b41f,'includeChanges':!!_0x100047[_0x2651dd(0x1d2)],'onProgress':({type:_0x5917b8,count:_0x147cab})=>{const _0x55d115=_0x2651dd;process['stdout']['write'](_0x55d115(0x108)+_0x5917b8+':\x20'+_0x147cab+'\x20records…');}});process[_0x2651dd(0x355)][_0x2651dd(0x204)]('\x0a'),console[_0x2651dd(0x305)]('[okdb]\x20imported\x20\x20types='+_0x875a43[_0x2651dd(0x27b)]+_0x2651dd(0x109)+_0x875a43[_0x2651dd(0x2c2)]+_0x2651dd(0x111)+_0x875a43['changes']);if(_0x100047[_0x2651dd(0x330)]){const _0x192820=_0x389e06[_0x2651dd(0x27f)](_0x389e06[_0x2651dd(0x300)](_0x56bc4e),'blobs');if(_0x298539['existsSync'](_0x192820)){const {imported:_0x161a1d,skipped:_0x5e9894}=await _0x5f558a[_0x2651dd(0xdd)][_0x2651dd(0x349)](_0x192820);console[_0x2651dd(0x305)](_0x2651dd(0x356)+_0x161a1d+_0x2651dd(0xfe)+_0x5e9894);}}await _0x5f558a[_0x2651dd(0x216)](),console['log']('[okdb]\x20import\x20complete');}async function _0xf869a9(_0x4fce42,_0x3d893c){const _0xa88649=_0x1e6f2b;_0x3d893c[_0xa88649(0x198)]&&!_0x3d893c[_0xa88649(0x14b)]&&(console[_0xa88649(0x389)](_0xa88649(0x173)),process[_0xa88649(0x34a)](0x1));const _0x132770=_0x3d893c[_0xa88649(0x18c)]?_0x3d893c[_0xa88649(0x18c)][_0xa88649(0x397)](',')[_0xa88649(0x128)](_0x563fe9=>_0x563fe9[_0xa88649(0x171)]())[_0xa88649(0xe5)](Boolean):[];let _0x325343={};if(_0x3d893c[_0xa88649(0x2d4)])try{_0x325343=JSON[_0xa88649(0x2ee)](_0x3d893c[_0xa88649(0x2d4)]);if(typeof _0x325343!=='object'||Array[_0xa88649(0x278)](_0x325343)||_0x325343===null)throw new Error();}catch{console['error'](_0xa88649(0x346)),process[_0xa88649(0x34a)](0x1);}const _0x513c93=require$$5,{randomToken:_0x1c0680,hashToken:_0x3290ff,hashPassword:_0x51403f}=requireOkdbAuthTokens(),_0x4b4929=require$$0,_0x5a952c=_0x389e06['resolve'](_0x4fce42[_0xa88649(0x230)]),_0x1ee79c=new _0x513c93(_0x5a952c,_0x4fce42[_0xa88649(0x273)]?{'encryptionKey':_0x4fce42[_0xa88649(0x273)]}:{});await _0x1ee79c['open']();try{await _0x1ee79c[_0xa88649(0x276)]['_ensureTokensType']();if(_0x3d893c['name']){const _0x4a4406=await _0x1ee79c['auth'][_0xa88649(0x38a)](_0x3d893c[_0xa88649(0x14b)]);_0x4a4406&&(console['error']('[okdb]\x20error:\x20token\x20with\x20name\x20\x22'+_0x3d893c[_0xa88649(0x14b)]+_0xa88649(0x35f)),process['exit'](0x1));}const _0x70c384=_0x1c0680(0x20),_0x31a0ec=_0x3290ff(_0x70c384),_0x3101c4=_0x3d893c['password']?await _0x51403f(_0x3d893c[_0xa88649(0x198)]):null,_0x4cb050=_0x4b4929[_0xa88649(0xd7)](),_0x3281cd={'tokenHash':_0x31a0ec,'name':_0x3d893c[_0xa88649(0x14b)]||null,'passwordHash':_0x3101c4,'label':_0x3d893c['label']||null,'permissions':_0x132770,'grants':_0x325343,'createdAt':Date[_0xa88649(0xd5)](),'lastUsedAt':null},_0x4eaf43=_0x3d893c[_0xa88649(0xfa)]?{'ttl':Number(_0x3d893c[_0xa88649(0xfa)])}:undefined;await _0x1ee79c[_0xa88649(0x318)][_0xa88649(0xd3)](_0xa88649(0xc5),_0x4cb050,_0x3281cd,_0x4eaf43),console[_0xa88649(0x305)]('\x0a\x20\x20✓\x20Token\x20created'),console[_0xa88649(0x305)](_0xa88649(0x1d0)+_0x4cb050),console[_0xa88649(0x305)]('\x20\x20\x20\x20name:\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x3d893c[_0xa88649(0x14b)]||_0xa88649(0x2e5))),console[_0xa88649(0x305)]('\x20\x20\x20\x20label:\x20\x20\x20\x20\x20\x20\x20'+(_0x3d893c[_0xa88649(0x3ca)]||_0xa88649(0x2e5))),console[_0xa88649(0x305)](_0xa88649(0x2fd)+(_0x132770[_0xa88649(0x27f)](',\x20')||'(none)')),console[_0xa88649(0x305)](_0xa88649(0x1f6)),console[_0xa88649(0x305)](_0xa88649(0x2b5)+_0x70c384+'\x0a');}finally{await _0x1ee79c[_0xa88649(0x216)]();}}async function _0x51e68a(_0x4fe7b6){const _0x580251=_0x1e6f2b,_0x310b68=require$$5,_0x303ba2=_0x389e06[_0x580251(0x33f)](_0x4fe7b6[_0x580251(0x230)]),_0x3edfd6=new _0x310b68(_0x303ba2,_0x4fe7b6[_0x580251(0x273)]?{'encryptionKey':_0x4fe7b6[_0x580251(0x273)]}:{});await _0x3edfd6[_0x580251(0x375)]();try{const _0x2802d3=_0x3edfd6[_0x580251(0x318)];if(!_0x2802d3||!_0x2802d3[_0x580251(0x11f)](_0x580251(0xc5))){console[_0x580251(0x305)]('No\x20tokens.');return;}const _0x2454c1=[];for(const {key:_0x5aa41c,value:_0x45fe0e}of _0x2802d3[_0x580251(0x3c7)](_0x580251(0xc5))){_0x2454c1[_0x580251(0x1bb)]({'id':_0x5aa41c,'name':_0x45fe0e['name']||_0x580251(0x2e5),'label':_0x45fe0e[_0x580251(0x3ca)]||'(unset)','permissions':Array[_0x580251(0x278)](_0x45fe0e['permissions'])?_0x45fe0e[_0x580251(0x18c)][_0x580251(0x27f)](','):'','created':_0x45fe0e[_0x580251(0xd2)]?new Date(_0x45fe0e['createdAt'])[_0x580251(0x121)]()[_0x580251(0x23f)](0x0,0xa):''});}if(_0x2454c1['length']===0x0){console[_0x580251(0x305)](_0x580251(0x272));return;}const _0x390223=!process['stdout'][_0x580251(0x1c6)]||process[_0x580251(0x355)]['columns']>=0x64,_0x51db77=_0x390223?0x24:0xa,_0x13cfa0=['ID'['padEnd'](_0x51db77),_0x580251(0x306)[_0x580251(0x240)](0x10),_0x580251(0x36d)[_0x580251(0x240)](0x14),_0x580251(0x1e1)['padEnd'](0x14),_0x580251(0x392)]['join']('\x20\x20');console[_0x580251(0x305)]('\x0a'+_0x13cfa0),console[_0x580251(0x305)]('-'[_0x580251(0x285)](_0x13cfa0[_0x580251(0x1ae)]));for(const _0x314e14 of _0x2454c1){const _0x18621f=_0x390223?_0x314e14['id']:_0x314e14['id']['slice'](0x0,0x8)+'…';console[_0x580251(0x305)]([_0x18621f[_0x580251(0x240)](_0x51db77),_0x314e14[_0x580251(0x14b)][_0x580251(0x23f)](0x0,0x10)[_0x580251(0x240)](0x10),_0x314e14['label'][_0x580251(0x23f)](0x0,0x14)['padEnd'](0x14),_0x314e14['permissions'][_0x580251(0x23f)](0x0,0x14)[_0x580251(0x240)](0x14),_0x314e14['created']]['join']('\x20\x20'));}console['log']('');}finally{await _0x3edfd6['close']();}}async function _0x18a93c(_0x4a80a4,_0x468940){const _0x416784=_0x1e6f2b;!_0x4a80a4&&(console['error'](_0x416784(0x210)),process[_0x416784(0x34a)](0x1));const _0x37fb26=require$$5,_0x472819=_0x389e06[_0x416784(0x33f)](_0x468940['dbPath']),_0xb935a6=new _0x37fb26(_0x472819,_0x468940[_0x416784(0x273)]?{'encryptionKey':_0x468940['key']}:{});await _0xb935a6[_0x416784(0x375)]();try{const _0x20e1cb=_0xb935a6[_0x416784(0x318)];(!_0x20e1cb||!_0x20e1cb[_0x416784(0x11f)](_0x416784(0xc5)))&&(console[_0x416784(0x389)]('[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22'+_0x4a80a4+'\x22'),process[_0x416784(0x34a)](0x1));let _0x40dedb=null,_0x1b3a8e=null;const _0x226433=_0x20e1cb[_0x416784(0x13e)]('~tokens',_0x4a80a4);if(_0x226433)_0x40dedb=_0x4a80a4,_0x1b3a8e=_0x226433;else{const _0x3a088f=[];for(const {key:_0x7e9966,value:_0x309303}of _0x20e1cb[_0x416784(0x3c7)]('~tokens')){if(_0x7e9966[_0x416784(0x134)](_0x4a80a4))_0x3a088f[_0x416784(0x1bb)]({'key':_0x7e9966,'value':_0x309303});}_0x3a088f[_0x416784(0x1ae)]===0x0&&(console[_0x416784(0x389)](_0x416784(0xf5)+_0x4a80a4+'\x22'),process[_0x416784(0x34a)](0x1));if(_0x3a088f['length']>0x1){console[_0x416784(0x389)](_0x416784(0x2e8)+_0x4a80a4+'\x22\x20matches\x20'+_0x3a088f['length']+_0x416784(0xcb));for(const _0x18111c of _0x3a088f){console['error']('\x20\x20'+_0x18111c['key']+'\x20\x20(name:\x20'+(_0x18111c[_0x416784(0x2a2)][_0x416784(0x14b)]||_0x416784(0x2e5))+')');}process[_0x416784(0x34a)](0x1);}_0x40dedb=_0x3a088f[0x0][_0x416784(0x273)],_0x1b3a8e=_0x3a088f[0x0][_0x416784(0x2a2)];}await _0x20e1cb[_0x416784(0x103)](_0x416784(0xc5),_0x40dedb),console['log']('\x20\x20✓\x20Revoked\x20token\x20'+_0x40dedb+_0x416784(0xca)+(_0x1b3a8e[_0x416784(0x14b)]||'(unset)')+_0x416784(0x289)+(_0x1b3a8e[_0x416784(0x3ca)]||'(unset)')+')');}finally{await _0xb935a6['close']();}}function _0xa73150(_0x52f138,_0x32fc19){const _0x250de8=_0x1e6f2b;if(!_0x52f138[_0x250de8(0x11c)])return _0x250de8(0x160);const _0x1ea8fb=_0x52f138['expiresAt'];if(!_0x1ea8fb)return _0x250de8(0x33e);if(_0x32fc19>_0x1ea8fb)return _0x250de8(0x288);return'active';}function _0x141622(_0x4c9e8){const _0x5d4f18=_0x1e6f2b;if(!_0x4c9e8||typeof _0x4c9e8!=='object')return'';const _0x2763f8=Object[_0x5d4f18(0xc7)](_0x4c9e8)[_0x5d4f18(0xe5)](([,_0x9407ca])=>_0x9407ca)[_0x5d4f18(0x128)](([_0x526878])=>_0x526878);if(_0x2763f8['length']===0x0)return'(none)';if(_0x2763f8[_0x5d4f18(0x1ae)]<=0x3)return _0x2763f8['join']('\x20');return _0x2763f8[_0x5d4f18(0x23f)](0x0,0x3)[_0x5d4f18(0x27f)]('\x20')+('\x20+'+(_0x2763f8['length']-0x3));}async function _0x3128fe(_0x4a1843){const _0x3c56ae=_0x1e6f2b,_0x316a14=require$$5,_0x426d51=requireOkdbLicenseCodec(),{_C:_0xb93a95}=requireOkdbLicense(),_0x17d29c=_0x389e06[_0x3c56ae(0x33f)](_0x4a1843['dbPath']),_0x4fb16c=new _0x316a14(_0x17d29c,_0x4a1843[_0x3c56ae(0x273)]?{'encryptionKey':_0x4a1843[_0x3c56ae(0x273)]}:{});await _0x4fb16c[_0x3c56ae(0x375)]();try{const _0x51814e=_0x4fb16c['_systemEnv'],_0x174625=_0x51814e?.['db']?.['get']?.(_0x3c56ae(0x136))??0x0,_0x42815=[..._0x4fb16c[_0x3c56ae(0x22e)][_0x3c56ae(0x1c2)]()]['filter'](_0x4b6c52=>!_0x4b6c52[_0x3c56ae(0x134)]('~'))[_0x3c56ae(0x1ae)],_0x42c9b4=_0x4fb16c['_license']?.[_0x3c56ae(0x3d5)];if(_0x42c9b4){const _0x2e805b=_0x42c9b4['_isFree']===!![],_0x29490a=_0x2e805b?_0x3c56ae(0x255):_0x4fb16c[_0x3c56ae(0x118)][_0x3c56ae(0x33e)]?.[_0x3c56ae(0x33d)]||_0x3c56ae(0x209);console[_0x3c56ae(0x305)](''),console[_0x3c56ae(0x305)](_0x3c56ae(0x345)+_0x29490a);const _0x4f6a6c=_0x42c9b4['limits']||{};if(_0x4f6a6c[_0x3c56ae(0x2ca)]){const _0xe984dd=Math['round'](_0x174625/_0x4f6a6c[_0x3c56ae(0x2ca)]*0x64);console['log']('\x20\x20Writes:\x20\x20'+_0x174625[_0x3c56ae(0xef)]()+'\x20/\x20'+_0x4f6a6c[_0x3c56ae(0x2ca)][_0x3c56ae(0xef)]()+'\x20\x20('+_0xe984dd+'%)');}else console[_0x3c56ae(0x305)](_0x3c56ae(0x39e)+_0x174625[_0x3c56ae(0xef)]());_0x4f6a6c[_0x3c56ae(0x1b7)]?console['log'](_0x3c56ae(0x291)+_0x42815+'\x20/\x20'+_0x4f6a6c[_0x3c56ae(0x1b7)]):console[_0x3c56ae(0x305)](_0x3c56ae(0x291)+_0x42815),_0xb93a95?.[_0x3c56ae(0x281)]&&console[_0x3c56ae(0x305)]('\x20\x20Build:\x20\x20\x20key\x20fingerprint\x20'+_0xb93a95[_0x3c56ae(0x281)]+_0x3c56ae(0x1ef));}if(!_0x51814e||!_0x51814e['hasType']('~licenses')){console[_0x3c56ae(0x305)](''),console[_0x3c56ae(0x305)](_0x3c56ae(0x1a9)),console[_0x3c56ae(0x305)]('');return;}const _0x5a7cbd=[],_0x3950d9=Date[_0x3c56ae(0xd5)](),_0x1c7ae6=_0x4fb16c['id'],_0x1f581d='__OKDB_PUB_FINGERPRINT__';for(const {key:_0x3c5e69,value:_0x55ec49}of _0x51814e[_0x3c56ae(0x3c7)]('~licenses')){const _0x223dae=_0x55ec49[_0x3c56ae(0x1e4)]?Buffer[_0x3c56ae(0xf8)](_0x55ec49[_0x3c56ae(0x1e4)],_0x3c56ae(0x140)):Buffer[_0x3c56ae(0x2e0)](0x8);let _0x1dd8fa='';try{_0x1dd8fa=_0x426d51[_0x3c56ae(0x154)](_0x1c7ae6,_0x223dae,_0x1f581d)[_0x3c56ae(0x2f5)];}catch{}_0x5a7cbd['push']({'id':_0x3c5e69,'licensee':_0x55ec49[_0x3c56ae(0x33d)]||'','expires':_0x55ec49[_0x3c56ae(0x217)]?new Date(_0x55ec49[_0x3c56ae(0x217)])[_0x3c56ae(0x121)]()['slice'](0x0,0xa):'','features':_0x141622(_0x55ec49[_0x3c56ae(0x313)]),'pin':_0x1dd8fa,'status':_0xa73150(_0x55ec49,_0x3950d9)});}if(_0x5a7cbd[_0x3c56ae(0x1ae)]===0x0){console[_0x3c56ae(0x305)](''),console[_0x3c56ae(0x305)]('\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.'),console[_0x3c56ae(0x305)]('');return;}const _0x5d6efc=['\x20\x20'+'ID'['padEnd'](0xe),_0x3c56ae(0x388)[_0x3c56ae(0x240)](0xe),_0x3c56ae(0x2b7)[_0x3c56ae(0x240)](0xc),_0x3c56ae(0x20a)['padEnd'](0x1e),'PIN'[_0x3c56ae(0x240)](0xa),'STATUS']['join']('\x20');console[_0x3c56ae(0x305)]('\x0a'+_0x5d6efc);for(const _0x3c3b08 of _0x5a7cbd){const _0x454629=_0x3c3b08['id'][_0x3c56ae(0x23f)](0x0,0x8)+'…';console[_0x3c56ae(0x305)](['\x20\x20'+_0x454629[_0x3c56ae(0x240)](0xe),_0x3c3b08[_0x3c56ae(0x33d)][_0x3c56ae(0x23f)](0x0,0xe)['padEnd'](0xe),_0x3c3b08['expires'][_0x3c56ae(0x240)](0xc),_0x3c3b08[_0x3c56ae(0x313)][_0x3c56ae(0x23f)](0x0,0x1e)[_0x3c56ae(0x240)](0x1e),_0x3c3b08['pin'][_0x3c56ae(0x240)](0xa),_0x3c3b08[_0x3c56ae(0x2d0)]]['join']('\x20'));}console['log']('');}finally{await _0x4fb16c[_0x3c56ae(0x216)]();}}async function _0x3f8213(_0x34db92,_0x58a024){const _0x597960=_0x1e6f2b,_0x4b7d13=require$$5,_0x544422=requireOkdbLicenseCodec();let _0x23fcf8=_0x34db92;(_0x544422[_0x597960(0x3b5)](_0x34db92)==='path'||_0x298539['existsSync'](_0x34db92)&&_0x298539[_0x597960(0x315)](_0x34db92)[_0x597960(0x34b)]())&&(_0x23fcf8=_0x298539[_0x597960(0x16e)](_0x34db92,'utf8')[_0x597960(0x171)]());const _0x588592=_0x389e06[_0x597960(0x33f)](_0x58a024[_0x597960(0x230)]),_0x3be88f=new _0x4b7d13(_0x588592,_0x58a024[_0x597960(0x273)]?{'encryptionKey':_0x58a024[_0x597960(0x273)]}:{});await _0x3be88f['open']();try{!_0x3be88f['_license']&&(console[_0x597960(0x389)](_0x597960(0x2af)),process['exit'](0x1));let _0xdd6373;try{_0xdd6373=await _0x3be88f['_license'][_0x597960(0x320)](_0x23fcf8);}catch(_0x5f4bef){console[_0x597960(0x389)](_0x597960(0x1f0)+_0x5f4bef[_0x597960(0x172)]),process[_0x597960(0x34a)](0x1);}const _0x7cbe84=_0x3be88f[_0x597960(0x118)][_0x597960(0x33c)](),_0x550a24=_0x7cbe84[_0x597960(0x2d8)](_0x599683=>_0x599683['licenseId']===_0xdd6373['id'])?.[_0x597960(0x2f5)]||'',_0x524670=Object['entries'](_0xdd6373[_0x597960(0x313)]||{})[_0x597960(0xe5)](([,_0x16ba27])=>_0x16ba27)[_0x597960(0x128)](([_0x4e979a])=>_0x4e979a),_0x459aab=_0xdd6373[_0x597960(0x16c)]||{},_0x466b76=[_0x459aab[_0x597960(0x1b7)]?_0x597960(0x2c4)+_0x459aab['envs']:null,_0x459aab['typesPerEnv']?_0x597960(0x2c6)+_0x459aab[_0x597960(0x303)]:null,_0x459aab[_0x597960(0x3bc)]?'peers='+_0x459aab[_0x597960(0x3bc)]:null,_0x459aab[_0x597960(0x2ca)]?_0x597960(0x182)+_0x459aab['maxWrites'][_0x597960(0xef)]():null][_0x597960(0xe5)](Boolean)['join']('\x20\x20'),_0x138d55=_0xdd6373[_0x597960(0x364)]===_0x544422['LICENSE_TYPE_OPEN'];console[_0x597960(0x305)](_0x597960(0x3a6)),console[_0x597960(0x305)](_0x597960(0x22c)+_0xdd6373['id']),console[_0x597960(0x305)](_0x597960(0x326)+_0xdd6373['licensee']),console[_0x597960(0x305)]('\x20\x20\x20\x20expires:\x20\x20\x20'+new Date(_0xdd6373['expiresAt'])['toISOString']()['slice'](0x0,0xa)),console[_0x597960(0x305)](_0x597960(0x205)+(_0x524670[_0x597960(0x27f)](',\x20')||'(none)'));if(_0x466b76)console[_0x597960(0x305)](_0x597960(0x1c4)+_0x466b76);_0x138d55?(console[_0x597960(0x305)](_0x597960(0x17b)),console[_0x597960(0x305)]('')):(console[_0x597960(0x305)](_0x597960(0x232)+_0x550a24),console[_0x597960(0x305)](_0x597960(0x229)),console[_0x597960(0x305)](''),console[_0x597960(0x305)](_0x597960(0x32b)),console[_0x597960(0x305)](_0x597960(0x2a1)+_0x550a24+_0x597960(0x3a2)),console[_0x597960(0x305)](_0x597960(0x1e0)),console['log']('\x20\x20\x20\x203.\x20Run:\x20\x20okdb\x20license\x20<activation-token>'),console[_0x597960(0x305)](''));}finally{await _0x3be88f['close']();}}async function _0x2cf87a(_0x34e155,_0x291f59){const _0x30efe3=_0x1e6f2b,_0x2ed21f=require$$5,_0x284a3b=_0x389e06[_0x30efe3(0x33f)](_0x291f59[_0x30efe3(0x230)]),_0xf04082=new _0x2ed21f(_0x284a3b,_0x291f59['key']?{'encryptionKey':_0x291f59[_0x30efe3(0x273)]}:{});await _0xf04082[_0x30efe3(0x375)]();try{!_0xf04082['_license']&&(console['error']('[okdb]\x20error:\x20license\x20management\x20is\x20only\x20available\x20in\x20licensed\x20builds\x20(npm\x20run\x20build:prod).'),process[_0x30efe3(0x34a)](0x1));let _0x4001d7;try{_0x4001d7=await _0xf04082['_license'][_0x30efe3(0x3b6)](_0x34e155[_0x30efe3(0x171)]());}catch(_0x40a197){console[_0x30efe3(0x389)](_0x30efe3(0x1f0)+_0x40a197[_0x30efe3(0x172)]),console[_0x30efe3(0x389)](''),console[_0x30efe3(0x389)](_0x30efe3(0x1f5)),console['error'](_0x30efe3(0xe3)),console['error'](_0x30efe3(0x15a)),console[_0x30efe3(0x389)](_0x30efe3(0x3bb)),console[_0x30efe3(0x389)](''),process['exit'](0x1);}console[_0x30efe3(0x305)]('\x0a\x20\x20✓\x20License\x20activated'),console[_0x30efe3(0x305)](_0x30efe3(0x22c)+_0x4001d7['id']),console[_0x30efe3(0x305)](_0x30efe3(0x326)+_0x4001d7[_0x30efe3(0x33d)]),console['log'](_0x30efe3(0xf2)+new Date(_0x4001d7[_0x30efe3(0x217)])[_0x30efe3(0x121)]()[_0x30efe3(0x23f)](0x0,0xa)),console[_0x30efe3(0x305)](_0x30efe3(0x2a5)),console['log']('');}finally{await _0xf04082['close']();}}async function _0x423b75(_0x15d556,_0x154071){const _0x2da0df=_0x1e6f2b;!_0x15d556&&(console[_0x2da0df(0x389)](_0x2da0df(0x2cf)),process['exit'](0x1));const _0x535722=require$$5,_0x16eb22=requireOkdbLicenseCodec(),_0x935ab6=_0x389e06['resolve'](_0x154071[_0x2da0df(0x230)]),_0x3025dc=new _0x535722(_0x935ab6,_0x154071['key']?{'encryptionKey':_0x154071[_0x2da0df(0x273)]}:{});await _0x3025dc[_0x2da0df(0x375)]();try{const _0x528cdd=_0x3025dc[_0x2da0df(0x318)];(!_0x528cdd||!_0x528cdd[_0x2da0df(0x11f)]('~licenses'))&&(console[_0x2da0df(0x389)](_0x2da0df(0x363)+_0x15d556+'\x22'),process[_0x2da0df(0x34a)](0x1));let _0x25f24b=null,_0xf0fcf1=null;const _0x339b08=_0x528cdd[_0x2da0df(0x13e)]('~licenses',_0x15d556);if(_0x339b08)_0x25f24b=_0x15d556,_0xf0fcf1=_0x339b08;else{const _0x3b8ac7=[];for(const {key:_0x12a254,value:_0x3f2451}of _0x528cdd[_0x2da0df(0x3c7)](_0x2da0df(0x1f9))){if(_0x12a254[_0x2da0df(0x134)](_0x15d556))_0x3b8ac7[_0x2da0df(0x1bb)]({'key':_0x12a254,'value':_0x3f2451});}_0x3b8ac7['length']===0x0&&(console[_0x2da0df(0x389)](_0x2da0df(0x363)+_0x15d556+'\x22'),process[_0x2da0df(0x34a)](0x1)),_0x3b8ac7[_0x2da0df(0x1ae)]>0x1&&(console[_0x2da0df(0x389)](_0x2da0df(0x2e8)+_0x15d556+_0x2da0df(0x1de)+_0x3b8ac7[_0x2da0df(0x1ae)]+_0x2da0df(0x163)),process[_0x2da0df(0x34a)](0x1)),_0x25f24b=_0x3b8ac7[0x0][_0x2da0df(0x273)],_0xf0fcf1=_0x3b8ac7[0x0][_0x2da0df(0x2a2)];}const _0x56f5ca=Date[_0x2da0df(0xd5)](),_0x58ffc2=_0xa73150(_0xf0fcf1,_0x56f5ca),_0x4bd5fc=_0x3025dc['id'],_0x4078c9=_0x2da0df(0x15e);let _0x5874e1='';try{const _0x514d2a=Buffer[_0x2da0df(0xf8)](_0xf0fcf1[_0x2da0df(0x1e4)],'hex');_0x5874e1=_0x16eb22[_0x2da0df(0x154)](_0x4bd5fc,_0x514d2a,_0x4078c9)[_0x2da0df(0x2f5)];}catch{}const _0x2699ec=_0xf0fcf1[_0x2da0df(0x313)]?Object[_0x2da0df(0xc7)](_0xf0fcf1[_0x2da0df(0x313)])[_0x2da0df(0xe5)](([,_0x5db6ef])=>_0x5db6ef)['map'](([_0x310354])=>_0x310354):[],_0x22457a=_0xf0fcf1[_0x2da0df(0x16c)]||{},_0x552523=_0x528cdd?.['db']?.[_0x2da0df(0x13e)]?.(_0x2da0df(0x136))??0x0,_0x21b027=[..._0x3025dc['_envs'][_0x2da0df(0x1c2)]()][_0x2da0df(0xe5)](_0x195723=>!_0x195723[_0x2da0df(0x134)]('~'))['length'];console[_0x2da0df(0x305)]('\x0a\x20\x20License\x20details:'),console[_0x2da0df(0x305)](_0x2da0df(0x22c)+_0x25f24b),console[_0x2da0df(0x305)](_0x2da0df(0x326)+(_0xf0fcf1[_0x2da0df(0x33d)]||'')),console['log']('\x20\x20\x20\x20expires:\x20\x20\x20'+(_0xf0fcf1[_0x2da0df(0x217)]?new Date(_0xf0fcf1[_0x2da0df(0x217)])['toISOString']()[_0x2da0df(0x23f)](0x0,0xa):'')),console[_0x2da0df(0x305)]('\x20\x20\x20\x20features:\x20\x20'+(_0x2699ec[_0x2da0df(0x27f)](',\x20')||_0x2da0df(0x227))),console[_0x2da0df(0x305)]('\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20'+_0x5874e1),console['log'](_0x2da0df(0xd0)+_0x58ffc2),console['log']('\x20\x20\x20\x20addedAt:\x20\x20\x20'+new Date(_0xf0fcf1[_0x2da0df(0x16f)])[_0x2da0df(0x121)]());if(_0x58ffc2===_0x2da0df(0x33e)){console['log'](''),console[_0x2da0df(0x305)](_0x2da0df(0x19b));if(_0x22457a[_0x2da0df(0x2ca)]){const _0x1a3458=Math['round'](_0x552523/_0x22457a[_0x2da0df(0x2ca)]*0x64);console['log'](_0x2da0df(0x11a)+_0x552523[_0x2da0df(0xef)]()+_0x2da0df(0x1eb)+_0x22457a[_0x2da0df(0x2ca)][_0x2da0df(0xef)]()+_0x2da0df(0xcf)+_0x1a3458+'%)');}else console['log']('\x20\x20\x20\x20writes:\x20\x20\x20\x20'+_0x552523[_0x2da0df(0xef)]()+'\x20\x20(unlimited)');_0x22457a[_0x2da0df(0x1b7)]?console[_0x2da0df(0x305)]('\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20'+_0x21b027+'\x20/\x20'+_0x22457a[_0x2da0df(0x1b7)]):console[_0x2da0df(0x305)](_0x2da0df(0x112)+_0x21b027+_0x2da0df(0x351));}console['log']('');}finally{await _0x3025dc[_0x2da0df(0x216)]();}}async function _0xb154ca(_0x2737e4,_0x5f368c){const _0x43191b=_0x1e6f2b;!_0x2737e4&&(console[_0x43191b(0x389)]('[okdb]\x20error:\x20remove\x20requires\x20an\x20id\x20argument'),process[_0x43191b(0x34a)](0x1));const _0x2470fa=require$$5,_0x39c43c=_0x389e06[_0x43191b(0x33f)](_0x5f368c[_0x43191b(0x230)]),_0x55eda2=new _0x2470fa(_0x39c43c,_0x5f368c['key']?{'encryptionKey':_0x5f368c['key']}:{});await _0x55eda2[_0x43191b(0x375)]();try{const _0x172f4d=_0x55eda2['_systemEnv'];(!_0x172f4d||!_0x172f4d[_0x43191b(0x11f)](_0x43191b(0x1f9)))&&(console[_0x43191b(0x389)](_0x43191b(0x363)+_0x2737e4+'\x22'),process[_0x43191b(0x34a)](0x1));let _0x8f5f59=null,_0x4a0731=null;const _0x582b54=_0x172f4d[_0x43191b(0x13e)]('~licenses',_0x2737e4);if(_0x582b54)_0x8f5f59=_0x2737e4,_0x4a0731=_0x582b54;else{const _0x448865=[];for(const {key:_0x123b90,value:_0x3471a7}of _0x172f4d['getRange'](_0x43191b(0x1f9))){if(_0x123b90[_0x43191b(0x134)](_0x2737e4))_0x448865[_0x43191b(0x1bb)]({'key':_0x123b90,'value':_0x3471a7});}_0x448865['length']===0x0&&(console['error'](_0x43191b(0x363)+_0x2737e4+'\x22'),process[_0x43191b(0x34a)](0x1)),_0x448865[_0x43191b(0x1ae)]>0x1&&(console['error'](_0x43191b(0x2e8)+_0x2737e4+'\x22\x20matches\x20'+_0x448865[_0x43191b(0x1ae)]+'\x20licenses'),process[_0x43191b(0x34a)](0x1)),_0x8f5f59=_0x448865[0x0][_0x43191b(0x273)],_0x4a0731=_0x448865[0x0][_0x43191b(0x2a2)];}await _0x172f4d[_0x43191b(0x103)](_0x43191b(0x1f9),_0x8f5f59),console[_0x43191b(0x305)]('\x20\x20✓\x20Removed\x20license\x20'+_0x8f5f59+_0x43191b(0x30e)+(_0x4a0731[_0x43191b(0x33d)]||_0x43191b(0x2e5))+')');}finally{await _0x55eda2[_0x43191b(0x216)]();}}async function _0x559bce(_0x6624d2,_0xa3d2d0,_0x54928e){const _0x4b3645=_0x1e6f2b;!_0x6624d2&&(console[_0x4b3645(0x389)](_0x4b3645(0x25a)),process[_0x4b3645(0x34a)](0x1));!_0x54928e[_0x4b3645(0x241)]&&!(_0x54928e[_0x4b3645(0xed)]&&_0x54928e[_0x4b3645(0x198)])&&(console[_0x4b3645(0x389)](_0x4b3645(0x2fb)),process['exit'](0x1));const _0x1b97db=_0x54928e[_0x4b3645(0x10d)]||_0xa3d2d0[_0x4b3645(0x1ee)]?.[_0x4b3645(0x38e)];!_0x1b97db&&(console[_0x4b3645(0x389)](_0x4b3645(0x1f8)+_0x4b3645(0x2ab)+_0x4b3645(0x22d)),process[_0x4b3645(0x34a)](0x1));const _0x43b64b=require$$5,_0x14e541=new _0x43b64b(_0xa3d2d0[_0x4b3645(0x230)],{'sync':{'address':_0x1b97db,'auto_reconcile':![]}});await _0x14e541[_0x4b3645(0x375)]();try{const _0x500c41=_0x14e541['_systemEnv'];if(_0x500c41&&_0x500c41[_0x4b3645(0x11f)](_0x4b3645(0xc5))){let _0x1caf99=![];for(const _0x1b3d8d of _0x500c41[_0x4b3645(0x3c7)]('~tokens')){_0x1caf99=!![];break;}_0x1caf99&&console[_0x4b3645(0x305)]('\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'](_0x4b3645(0x225)+_0x6624d2+'…'),await _0x14e541[_0x4b3645(0x1ee)][_0x4b3645(0x27f)](_0x6624d2['replace'](/\/+$/,''),{'token':_0x54928e[_0x4b3645(0x241)],'username':_0x54928e[_0x4b3645(0xed)],'password':_0x54928e['password']}),console[_0x4b3645(0x305)]('\x20\x20✓\x20joined\x20and\x20reconciliation\x20initiated'),console[_0x4b3645(0x305)](_0x4b3645(0x340));}finally{await _0x14e541[_0x4b3645(0x216)]();}}async function _0x4962eb(){const _0x142514=_0x1e6f2b,_0x31fa78=Date[_0x142514(0xd5)](),_0x296169=_0x5778ef(process[_0x142514(0x3aa)]),_0x38daee=_0x47069a(_0x296169),_0x1bdd8b=_0x389e06[_0x142514(0x33f)](_0x38daee['dbPath']);!_0x38daee[_0x142514(0xe9)]&&!process['stdin'][_0x142514(0x277)]&&(_0x38daee['noRepl']=!![]);const _0x22b829=require$$5,{start:_0x5437bb,colorLog:_0x5f0f53}=requireOkdbShell(),_0x5812b8={..._0x38daee['key']?{'encryptionKey':_0x38daee[_0x142514(0x273)]}:{},..._0x38daee[_0x142514(0x2d1)]?{'admin':![]}:_0x1e56a7(_0x38daee[_0x142514(0x189)])?{'admin':_0x38daee[_0x142514(0x189)]}:{},..._0x1e56a7(_0x38daee[_0x142514(0x114)])?{'api':_0x38daee[_0x142514(0x114)]}:{},..._0x1e56a7(_0x38daee[_0x142514(0x276)])?{'auth':_0x38daee['auth']}:{},..._0x1e56a7(_0x38daee[_0x142514(0x1c9)])?{'mcp':_0x38daee[_0x142514(0x1c9)]}:{},..._0x38daee[_0x142514(0xf4)]!==![]?{'timeMachine':_0x38daee[_0x142514(0xf4)]}:{}},_0x42bc1a=new _0x22b829(_0x1bdd8b,_0x5812b8);_0x42bc1a[_0x142514(0x305)][_0x142514(0x15c)]?.();const _0x39afc9=_0x42bc1a[_0x142514(0x305)][_0x142514(0x3c6)](_0x31faa3=>_0x5f0f53(_0x31faa3,_0x38daee[_0x142514(0x228)]));if(_0x38daee['noRepl'])process[_0x142514(0x355)]['write'](_0x142514(0x2f1));await _0x42bc1a['open']();if(_0x38daee[_0x142514(0xe9)])process[_0x142514(0x355)][_0x142514(0x204)]('\x20\x20✓\x20database\x20opened\x0a');try{await _0x17a38c(_0x42bc1a,_0x38daee[_0x142514(0x2ad)]);}catch(_0x4de389){_0x4de389['code']===_0x142514(0x2be)&&(console['error'](_0x142514(0x1db)+_0x38daee['port']+_0x142514(0x3af)),process[_0x142514(0x34a)](0x1));throw _0x4de389;}if(_0x38daee[_0x142514(0xe9)])process[_0x142514(0x355)][_0x142514(0x204)](_0x142514(0x269)+_0x38daee['port']+'\x0a');if(!_0x38daee[_0x142514(0xe9)])_0x42bc1a[_0x142514(0x305)][_0x142514(0x15c)]?.(),_0x39afc9?.(),_0x12d2e2(_0x42bc1a[_0x142514(0x276)]?.[_0x142514(0x2c8)]?.()??[]),await _0x5437bb(_0x42bc1a,_0x38daee);else{const _0x5e4fe5=_0x389e06[_0x142514(0x27f)](_0x1bdd8b,_0x142514(0x3ae));try{_0x298539['writeFileSync'](_0x5e4fe5,String(process['pid']));}catch{}const _0x4d604b=Date['now']()-_0x31fa78;console[_0x142514(0x305)](''),console['log'](_0x142514(0x250)),console[_0x142514(0x305)](_0x142514(0x286)+_0x38daee[_0x142514(0x2ad)]),console[_0x142514(0x305)](_0x142514(0x1b1)+_0x1bdd8b),console[_0x142514(0x305)](_0x142514(0x3c2)+_0x42bc1a['id']);{const _0x2ba76a=_0x42bc1a[_0x142514(0x318)]?.['db']?.[_0x142514(0x13e)]?.(_0x142514(0x136))??0x0,_0x3ff622=[..._0x42bc1a[_0x142514(0x22e)][_0x142514(0x1c2)]()][_0x142514(0xe5)](_0x15cf43=>!_0x15cf43[_0x142514(0x134)]('~'))['length'];if(_0x42bc1a['_license']?.[_0x142514(0x33e)]?.[_0x142514(0x364)]===0x1){const _0x54eeb7=Math['ceil']((_0x42bc1a[_0x142514(0x118)]['active'][_0x142514(0x217)]-Date[_0x142514(0xd5)]())/0x5265c00);console['log'](_0x142514(0x1d6)+_0x42bc1a[_0x142514(0x118)]['active'][_0x142514(0x33d)]+'\x20(expires\x20in\x20'+_0x54eeb7+_0x142514(0xd8));}else{if(_0x42bc1a[_0x142514(0x118)]?.['active']){const _0x31462a=_0x42bc1a[_0x142514(0x118)][_0x142514(0x33e)];console[_0x142514(0x305)](_0x142514(0x398)+_0x31462a['licensee']+_0x142514(0x39d)+new Date(_0x31462a['expiresAt'])[_0x142514(0x121)]()[_0x142514(0x23f)](0x0,0xa)+')');const _0x2043f7=_0x31462a[_0x142514(0x16c)]||{};if(_0x2043f7[_0x142514(0x2ca)]){const _0x37c0e3=Math[_0x142514(0x14f)](_0x2ba76a/_0x2043f7[_0x142514(0x2ca)]*0x64);console[_0x142514(0x305)](_0x142514(0x399)+_0x2ba76a[_0x142514(0xef)]()+_0x142514(0x1eb)+_0x2043f7[_0x142514(0x2ca)][_0x142514(0xef)]()+_0x142514(0x2a6)+_0x37c0e3+'%),\x20'+_0x3ff622+(_0x2043f7[_0x142514(0x1b7)]?'/'+_0x2043f7[_0x142514(0x1b7)]:'')+'\x20env'+(_0x3ff622===0x1?'':'s'));}}else{if(_0x42bc1a['_license']){const _0x3d1fbf=_0x42bc1a[_0x142514(0x118)]['getPins'](),_0x18238e=_0x3d1fbf[_0x142514(0x1ae)]?_0x3d1fbf[_0x142514(0x128)](_0x20110f=>_0x20110f[_0x142514(0x2f5)])[_0x142514(0x27f)](',\x20'):_0x142514(0x2e1),_0x5c8b5e=_0x42bc1a[_0x142514(0x118)][_0x142514(0x3d5)],_0x14d6cd=_0x5c8b5e[_0x142514(0x16c)][_0x142514(0x2ca)]?Math[_0x142514(0x14f)](_0x2ba76a/_0x5c8b5e[_0x142514(0x16c)][_0x142514(0x2ca)]*0x64):0x0;console[_0x142514(0x305)]('\x20\x20\x20\x20license:\x20free\x20tier\x20—\x20add\x20a\x20license\x20to\x20unlock\x20sync,\x20embeddings,\x20engines,\x20time-machine'),console['log'](_0x142514(0x399)+_0x2ba76a[_0x142514(0xef)]()+_0x142514(0x1eb)+_0x5c8b5e[_0x142514(0x16c)]['maxWrites'][_0x142514(0xef)]()+_0x142514(0x2a6)+_0x14d6cd+_0x142514(0x25e)+_0x3ff622+'\x20/\x20'+_0x5c8b5e['limits'][_0x142514(0x1b7)]+'\x20envs'),console['log'](_0x142514(0x1b6)+_0x18238e);}}}}console[_0x142514(0x305)](_0x142514(0x37d)+_0x38daee[_0x142514(0x2ad)]+_0x142514(0x23c));!_0x38daee[_0x142514(0x2d1)]&&console[_0x142514(0x305)](_0x142514(0x1d8)+_0x38daee['port']+_0x142514(0x164));console['log'](''),console[_0x142514(0x305)](_0x142514(0x284)+_0x4d604b+'ms'),_0x12d2e2(_0x42bc1a['auth']?.['getSecurityNotices']?.()??[]);let _0x3d302d=![];async function _0x195eb5(_0x499351){const _0x504e91=_0x142514;_0x3d302d&&(process[_0x504e91(0x252)][_0x504e91(0x204)](_0x504e91(0x2bc)),process[_0x504e91(0x34a)](0x82));_0x3d302d=!![],process[_0x504e91(0x252)][_0x504e91(0x204)](_0x504e91(0x1f3)+(_0x499351||_0x504e91(0x3cb))+_0x504e91(0x348));const _0x428b67=setTimeout(()=>{const _0x3ff6e3=_0x504e91;process['stderr']['write'](_0x3ff6e3(0x307)),process[_0x3ff6e3(0x34a)](0x1);},0x1388);try{_0x298539[_0x504e91(0x235)](_0x5e4fe5);}catch{}try{await _0x42bc1a['close']();}catch(_0x244193){process[_0x504e91(0x252)][_0x504e91(0x204)](_0x504e91(0x1fe)+(_0x244193?.[_0x504e91(0x172)]??_0x244193)+'\x0a');}clearTimeout(_0x428b67),process[_0x504e91(0x252)][_0x504e91(0x204)](_0x504e91(0x119)),process[_0x504e91(0x34a)](0x0);}process['on'](_0x142514(0x18b),()=>_0x195eb5(_0x142514(0x18b))),process['on'](_0x142514(0x105),()=>_0x195eb5(_0x142514(0x105))),process['on']('SIGBREAK',()=>_0x195eb5(_0x142514(0x1aa)));}}const _0x19ebb9=new Set(['version',_0x1e6f2b(0x2a0),_0x1e6f2b(0x1e5),'backup',_0x1e6f2b(0x21c),_0x1e6f2b(0x224),_0x1e6f2b(0x15b),_0x1e6f2b(0x241),_0x1e6f2b(0x27f),_0x1e6f2b(0x3a4)]),_0x4bc667=process[_0x1e6f2b(0x3aa)][0x2];if(_0x4bc667==='version')console[_0x1e6f2b(0x305)](require$$2[_0x1e6f2b(0x148)]),process[_0x1e6f2b(0x34a)](0x0);else{if(_0x4bc667&&_0x19ebb9[_0x1e6f2b(0x219)](_0x4bc667)){const _0x212680=process[_0x1e6f2b(0x3aa)][_0x1e6f2b(0x23f)](0x3),_0x343b00=_0x5778ef([_0x1e6f2b(0x3d0),'okdb',..._0x212680]),_0x237edb=_0x47069a(_0x343b00),_0xdd807e=new Set([_0x1e6f2b(0x39b),'-d','--key','-k',_0x1e6f2b(0x1fa),'-c',_0x1e6f2b(0x194),'-p',_0x1e6f2b(0x2ef),'--env','-e',_0x1e6f2b(0x243),_0x1e6f2b(0x146),'--password',_0x1e6f2b(0xd1),_0x1e6f2b(0x32f),'--grants',_0x1e6f2b(0x26e),_0x1e6f2b(0x15d),_0x1e6f2b(0x238),'-u',_0x1e6f2b(0x27e)]);let _0x39112a=null;for(let _0x5920cf=0x0;_0x5920cf<_0x212680['length'];_0x5920cf++){if(_0xdd807e['has'](_0x212680[_0x5920cf])){_0x5920cf++;continue;}if(!_0x212680[_0x5920cf][_0x1e6f2b(0x134)]('-')){_0x39112a=_0x212680[_0x5920cf];break;}}(async()=>{const _0x4d33a0=_0x1e6f2b;if(_0x4bc667==='token'){const _0x1a761c=process[_0x4d33a0(0x3aa)][0x3],_0x4e697b=process[_0x4d33a0(0x3aa)][_0x4d33a0(0x23f)](0x4),_0x133d02=_0x5778ef([_0x4d33a0(0x3d0),_0x4d33a0(0x1cd),..._0x4e697b]),_0x3deaf1=_0x47069a(_0x133d02),_0x59345b=new Set([_0x4d33a0(0x39b),'-d',_0x4d33a0(0xcd),'-k',_0x4d33a0(0x1fa),'-c',_0x4d33a0(0x194),'-p','--name',_0x4d33a0(0x26a),'--label',_0x4d33a0(0x32f),_0x4d33a0(0x199),_0x4d33a0(0x26e),'--log-level',_0x4d33a0(0x168),'-e',_0x4d33a0(0x243)]),_0x1550e3=[];for(let _0x40f11a=0x0;_0x40f11a<_0x4e697b['length'];_0x40f11a++){if(_0x59345b[_0x4d33a0(0x219)](_0x4e697b[_0x40f11a])){_0x40f11a++;continue;}if(_0x4e697b[_0x40f11a]['startsWith']('-'))continue;_0x1550e3[_0x4d33a0(0x1bb)](_0x4e697b[_0x40f11a]);}switch(_0x1a761c){case _0x4d33a0(0x32c):await _0xf869a9(_0x3deaf1,_0x133d02);break;case _0x4d33a0(0x32a):await _0x51e68a(_0x3deaf1);break;case _0x4d33a0(0x378):await _0x18a93c(_0x1550e3[0x0],_0x3deaf1);break;default:console['error'](_0x4d33a0(0x1f7)+_0x1a761c+_0x4d33a0(0x274)),process[_0x4d33a0(0x34a)](0x1);}return;}if(_0x4bc667===_0x4d33a0(0x3a4)){const _0x26c67f=requireOkdbLicenseCodec(),_0x3ea1bb=process[_0x4d33a0(0x3aa)]['slice'](0x3),_0x595416=_0x5778ef([_0x4d33a0(0x3d0),'okdb',..._0x3ea1bb]),_0x524428=_0x47069a(_0x595416),_0x14d234=new Set([_0x4d33a0(0x39b),'-d',_0x4d33a0(0xcd),'-k','--config','-c',_0x4d33a0(0x194),'-p',_0x4d33a0(0x2ef)]),_0x267283=[];for(let _0x586b02=0x0;_0x586b02<_0x3ea1bb[_0x4d33a0(0x1ae)];_0x586b02++){if(_0x14d234[_0x4d33a0(0x219)](_0x3ea1bb[_0x586b02])){_0x586b02++;continue;}if(_0x3ea1bb[_0x586b02][_0x4d33a0(0x134)]('-'))continue;_0x267283[_0x4d33a0(0x1bb)](_0x3ea1bb[_0x586b02]);}const _0x4a7709=_0x267283[0x0]??null;if(_0x4a7709===_0x4d33a0(0x103))await _0xb154ca(_0x267283[0x1],_0x524428);else{if(!_0x4a7709)await _0x3128fe(_0x524428);else{let _0x5306d7=_0x26c67f[_0x4d33a0(0x3b5)](_0x4a7709);if(_0x5306d7===_0x4d33a0(0x2de)&&_0x298539[_0x4d33a0(0xe6)](_0x4a7709))_0x5306d7=_0x4d33a0(0x3c1);if(_0x5306d7==='path')try{const _0xcff228=_0x298539[_0x4d33a0(0x16e)](_0x4a7709,_0x4d33a0(0x1ec))[_0x4d33a0(0x171)](),_0x17a697=_0x26c67f[_0x4d33a0(0x3b5)](_0xcff228);if(_0x17a697==='activation'){await _0x2cf87a(_0xcff228,_0x524428);return;}await _0x3f8213(_0x4a7709,_0x524428);return;}catch(_0x5b97f4){console[_0x4d33a0(0x389)]('[okdb]\x20error:\x20failed\x20to\x20read\x20'+_0x4a7709+':\x20'+_0x5b97f4['message']),process['exit'](0x1);}switch(_0x5306d7){case _0x4d33a0(0x35d):await _0x3f8213(_0x4a7709,_0x524428);break;case _0x4d33a0(0x11c):await _0x2cf87a(_0x4a7709,_0x524428);break;case'uuid':await _0x423b75(_0x4a7709,_0x524428);break;default:console[_0x4d33a0(0x389)](_0x4d33a0(0x10e)+_0x4a7709+'\x22'),console['error'](''),console['error'](_0x4d33a0(0x2f6)),console[_0x4d33a0(0x389)](_0x4d33a0(0x333)),console[_0x4d33a0(0x389)]('\x20\x20\x20\x20•\x20an\x20activation\x20token\x20\x20(124\x20chars)'),console[_0x4d33a0(0x389)](_0x4d33a0(0x248)),console[_0x4d33a0(0x389)](_0x4d33a0(0x144)),console[_0x4d33a0(0x389)](''),console['error'](_0x4d33a0(0x16d)),process[_0x4d33a0(0x34a)](0x1);}}}return;}switch(_0x4bc667){case _0x4d33a0(0x2a0):await _0x378920(_0x237edb);break;case _0x4d33a0(0x1e5):await _0x28f878();break;case _0x4d33a0(0x15b):await _0x46a1bf(_0x237edb);break;case _0x4d33a0(0x2f7):await _0x49c045(_0x39112a??_0x389e06[_0x4d33a0(0x33f)]('./okdb-backup'),_0x237edb);break;case _0x4d33a0(0x21c):await _0x269280(_0x39112a??_0x389e06[_0x4d33a0(0x33f)](_0x4d33a0(0x157)),_0x237edb,_0x343b00);break;case'import':await _0x317e89(_0x39112a??_0x389e06[_0x4d33a0(0x33f)](_0x4d33a0(0x157)),_0x237edb,_0x343b00);break;case'join':await _0x559bce(_0x39112a,_0x237edb,_0x343b00);break;}})()['then'](()=>process['exit'](0x0))['catch'](_0x243cb6=>{const _0x3eea65=_0x1e6f2b;console[_0x3eea65(0x389)](_0x3eea65(0x1d5)+(_0x243cb6[_0x3eea65(0x172)]||_0x243cb6)+'\x0a'),process[_0x3eea65(0x34a)](0x1);});}else _0x4962eb()['catch'](_0x5d724f=>{const _0x3e7e7f=_0x1e6f2b;console['error'](_0x3e7e7f(0x133)),console[_0x3e7e7f(0x389)](_0x5d724f[_0x3e7e7f(0x11e)]||_0x5d724f),process['exit'](0x1);});}return okdb$1;}var okdbExports=requireOkdb(),okdb=getDefaultExportFromCjs(okdbExports);module['exports']=okdb;