@kedem/okdb 1.8.8 → 1.8.11
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 _0x26eb70=_0xc3c9;function _0x13bf(){const _0x1957e5=['set','unlinkSync','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20was\x20issued\x20for\x20a\x20different\x20node\x20—\x20share\x20this\x20node\x27s\x20PIN\x20with\x20the\x20vendor.','dropSchema','repeat','NOT_FOUND','\x20/\x20','resolve','access:\x20','argv','License\x20already\x20stored','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20','sub','[okdb]\x20failed\x20to\x20parse\x20config\x20file\x20','types','stderr','registerIndex','Cannot\x20delete\x20','[filter]','timingSafeEqual','test','children','[okdb]\x20error:\x20failed\x20to\x20read\x20','/api/','http','transport:\x20','other','typeSubDbs','\x20\x20+','\x20\x20\x20\x202.\x20The\x20vendor\x20returns\x20an\x20activation\x20token.','_active','\x22\x20matches\x20','item:create','type/users','ROUTES','\x20\x20Envs:\x20\x20\x20\x20','changes','bind','Full-text\x20search','env:removed','OKDBUniqueConstraintError','Index\x20\x22','\x22\x20is\x20used\x20by:\x20','fromEntries','10oepzzv','HELP',',\x20closing…\x0a','\x22\x20on\x20\x22','pid','--types','LICENSE_TYPE_OPEN','expiry','\x20\x20\x20\x20status:\x20\x20\x20\x20active\x20\x20(open\x20license\x20—\x20no\x20activation\x20needed)','available','\x27\x20doesn\x27t\x20exist','pending','--token','Events','safety','dirname','\x20bytes,\x20need\x20>=\x2065)','⚠\x20INTERNAL\x20LICENSE\x20ACTIVE\x20—\x20all\x20features\x20and\x20limits\x20are\x20unlocked.\x20For\x20vendor/internal\x20use\x20only.','unique:violation_resolved','txn:rollback','database\x20path\x20not\x20writable:\x20','views','effective','txn:end','System','readUInt32BE','toLowerCase','(on\x20any\x20path\x20command)','password','toLocaleString','crypto','\x20\x20\x20\x20features:\x20\x20','\x20\x20Usage:\x20logs\x20[on|off|debug|info|warn|error]','quit','digest','hidden','./okdb-export.ndjson','117mDxqBW','OKDBIndexNotRegisteredError','[okdb]\x20opening\x20',':\x20expected\x20','slice','type/users/query\x20{\x22active\x22:true}','auth','\x20\x20\x20\x20license:\x20','fts','\x20months\x20from\x20issuance)','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20','max','columns','INVALID_PRIMARY_KEY','52202eTrWZT','mkdirSync','boolean','\x20\x20Tier:\x20\x20\x20\x20','started','\x0a[okdb]\x20received\x20','PUT','blob','onLicenseExpired','[okdb]\x20error:\x20join\x20requires\x20credentials.\x20Provide\x20--token\x20<t>\x20or\x20--username\x20<u>\x20--password\x20<p>','level','[okdb]\x20created\x20./okdb-data','entries','backup','net','INDEX_NOT_REGISTERED','TYPES','engines','activation','dropIndex','resetIndex','licenseId','toUpperCase','update','\x20\x20Usage:\x20','[okdb]\x20error:\x20--grants\x20must\x20be\x20valid\x20JSON\x20object','cause','init','history','[okdb]\x20error:\x20license\x20management\x20is\x20only\x20available\x20in\x20licensed\x20builds\x20(npm\x20run\x20build:prod).','[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22','method','version','--log-level','Invalid\x20primary\x20key\x20type:\x20','unique:violation','~tokens','\x22.\x20Use:\x20create,\x20list,\x20revoke','removeLicense','\x20\x20\x20\x201.\x20Send\x20the\x20PIN\x20above\x20(','Shutting\x20down\x20due\x20to\x20license\x20expiry','\x20\x20[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a','padEnd','index:progress','clearLine','active','_lookupByName','\x20logs\x20off\x0a','trim','17hGUYmH','includes','ceil','dest','stringify','mcp','close','key','indexToDb','line','reload','win32','\x20\x20\x20\x20id:\x20\x20\x20\x20','description','No\x20tokens.','errors','dynamic','\x20\x20\x20\x20api:\x20\x20\x20http://localhost:','\x20MB)','limits','--help','/type/users/query\x0a\x20\x20\x20\x20','noAdmin','attach','\x0a\x20\x20Joined.\x20Remote\x20tokens\x20replicated.\x20You\x20can\x20now\x20log\x20in\x20with\x20cluster\x20credentials.\x0a','darwin','\x1b[35m','SIGBREAK','object','--env','level:\x20info','OKDBError','floor','INVALID_INDEX_KEY','Admin','\x20\x20(licenses\x20must\x20be\x20signed\x20by\x20the\x20matching\x20private\x20key)','[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22','syncPeers','\x20\x20\x20\x20\x20http://localhost:','hint','Bearer\x20','\x20\x20\x20\x20\x20\x20\x20POST\x20(body\x20implies\x20POST)\x0a\x20\x20','log','--log-requests','blobs','\x20\x20\x20\x20\x20\x20\x20\x20\x20browse\x20API\x20routes,\x20grouped\x20by\x20area\x0a\x20\x20','creating','\x20in\x20','[okdb]\x20created\x20.kdbconfig','tags:\x20','\x20\x20records=','reason','prompt','body:\x20','index','database\x20path\x20writable:\x20','gray','_envs','\x27\x20is\x20already\x20registered','config','stdout','hasType','catch','exp','\x0a\x20\x20','6NrcoyS','SIGTERM','OKDBTypeAlreadyRegisteredError','--username','create','tags','STATUS','dropFts','default','/admin/index.html','\x20days\x20—\x20POC/demo\x20only,\x20not\x20node-bound)','sha256','registerFts','ftsName','addLicense','Feature\x20not\x20licensed:\x20','\x20logs\x20on\x20\x20','\x0a\x20\x20Run\x20okdb\x20to\x20start\x20the\x20server.\x0a','\x20\x20\x20\x20permissions:\x20','features','[okdb]\x20import\x20complete','importFromFile','pin','node\x20','item:remove','PERMISSIONS','\x0a\x0a\x20\x20','\x0a\x20\x20✓\x20Token\x20created','terminal','sync','TYPE_NOT_REGISTERED','createHmac','copy','\x20\x20✓\x20database\x20opened\x0a','keys:','LICENSE_INVALID','handle','createServer','\x20result','byteLength','\x20\x20\x20\x20writes:\x20\x20\x20\x20','split','[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a','ALREADY_EXISTS','Indexes','payload','License\x20limit\x20exceeded:\x20','[okdb]\x20reset\x20aborted','USE','74164KsHNXu','\x20\x20✓\x20OKDB\x20server\x20running','item:update','string','writeFileSync','SIG_INVALID','0123456789ABCDEFGHJKMNPQRSTVWXYZ','\x20tokens:','Environments','yes','find','~licenses','doctor','bold','decodeLicenseBlob','[okdb]\x20error:\x20remove\x20requires\x20an\x20id\x20argument','forEach','\x20environment\x20','operation','reset','hasOwnProperty','title','grants','alloc','ref:violation','constructor','\x22\x20already\x20exists','revoke','shutting\x20down…\x0a','SCHEMA_VALIDATION_FAILED','SIGINT\x20(double-tap)','embeddings','param','waiting','\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.','config\x20file\x20invalid:\x20','prototype','true','replace','active:','access','info','\x20day(s).','\x20(must\x20be\x201–65535)','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20open\x20admin\x20UI\x20in\x20browser\x0a\x20\x20','\x20\x20\x20\x20licensee:\x20\x20','_licenseHash','\x20records','[okdb]\x20unknown\x20token\x20action:\x20\x22','\x20\x20\x20\x20port:\x20\x20','map','finally','\x20\x20\x20\x20label:\x20\x20\x20\x20\x20\x20\x20','Index\x20\x27','\x0a\x20\x20Invalid\x20JSON:\x20','push','\x27\x20on\x20type\x20\x27','listening','\x0a\x20\x20License\x20details:','count','\x0a\x20\x20Joining\x20cluster\x20at\x20','toString','[okdb]\x20export\x20complete','round','createHash','INDEX_HAS_CONSUMERS','licenseHash','files/','toISOString','\x20\x20\x20\x20license:\x20free\x20tier\x20—\x20add\x20a\x20license\x20to\x20unlock\x20sync,\x20embeddings,\x20engines,\x20time-machine','stopped','[okdb]\x20error:\x20show\x20requires\x20an\x20id\x20argument','\x20type','indexOf','createPublicKey','Records','existsSync','[okdb]\x20error:\x20--address\x20is\x20required\x20for\x20join\x20(this\x20node\x27s\x20reachable\x20sync\x20address).\x0a','base64url','events','\x20\x20(name:\x20','\x20\x20\x20\x20admin:\x20http://localhost:','rawBuf','cyan','\x20\x20\x20\x20-\x20The\x20license\x20blob\x20has\x20not\x20been\x20added\x20yet\x20—\x20run\x20`okdb\x20license\x20<blob>`\x20first.','4820984wnBfTT','Types','transaction','logs','input:\x20','now','{}[]:,\x0a\x0d\x09\x20','drop','admin','LICENSE_EXPIRED_ACTION','VERSION_MISMATCH','(unset)','\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','index:ready','\x20\x20(unlimited)','ready','rmSync','OKDBForeignKeyError','\x20\x20║','--path','references','id:\x20','system:bus_state_change','\x20\x20Note:\x20this\x20node\x20has\x20existing\x20tokens.\x20They\x20will\x20coexist\x20with\x20cluster\x20tokens\x0a','\x20writes\x20(','FEATURES','current','assertLimit','stdin','readline','files','<path>','\x20\x20\x20\x20•\x20a\x20license\x20id\x20\x20\x20\x20\x20(uuid)',',\x20got\x20','token','activateLicense','expired','xdg-open\x20','\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','\x20\x20\x20\x20addedAt:\x20\x20\x20','child_process','OKDBForeignKeyDeleteError','value','properties','.kdbconfig','\x0a\x20\x20✓\x20License\x20activated','\x20\x20\x20\x20graceful\x20shutdown\x0a','scrypt','schema:drop','writeUInt8','list','[okdb]\x20port\x20','EXIT','HTTP\x20','detectInputType','\x20\x20\x20\x203.\x20Run:\x20\x20okdb\x20license\x20<activation-token>','[okdb]\x20importing\x20','--config','PIN','white','Schema\x20validation\x20failed\x20for\x20','_ensureTokensType','2894505UkKWDj','exec','concat','randomBytes','POST','filter','42861mjrxeL','\x20SECURITY\x20NOTICE','meta','sig','type:registered','help','code','OKDBInvalidIndexKeyError','--port','join','targetKey','_computeStatus','fts:','uuid','ttl:set','writes=','der','assertFeature','dropping','License\x20signature\x20invalid\x20—\x20this\x20license\x20was\x20not\x20signed\x20by\x20the\x20key\x20paired\x20with\x20this\x20build.\x20','env/:env','use','INDEX_ALREADY_REGISTERED','node:crypto','\x20\x20\x20\x20\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/','message','\x20<path>\x20[json-body]','env','DELETE\x20type/users/item/x','\x20\x20Common\x20causes:','noRepl','\x20\x20@','Queue','records','\x20\x20All\x20checks\x20passed.\x0a','parse','permissions','UNIQUE_CONSTRAINT','reverse','\x0a\x20\x20[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a','\x20\x20·\x20','listLicenses','dim','Invalid\x20activation\x20token:\x20','\x0a\x20\x20\x20\x20','sort','queue','processors/','envs','keys/public.pem','\x20not\x20found','no\x20.kdbconfig\x20(using\x20defaults)','system:stopped','\x1b[36m','\x20\x20score:','Invalid\x20index\x20key\x20type\x20for\x20\x27','103743DqmkUG','invalid','http://localhost:','\x20\x20Shell\x20commands','\x0a\x20\x20No\x20documentation\x20found\x20for:\x20','[okdb]\x20error:\x20--password\x20requires\x20--name','\x20\x20\x20\x20•\x20an\x20activation\x20token\x20\x20(124\x20chars)','some','[okdb]\x20error:\x20token\x20with\x20name\x20\x22','\x20\x20\x20\x20license:\x20⚠\x20OPEN\x20—\x20','\x27:\x20','listen','\x20licenses','yellow','\x20to\x20browse\x20the\x20API,\x20','status','--address','number','./okdb-data','OKDBTypeNotRegisteredError','unknown','\x20\x20✓\x20Removed\x20license\x20','sizeAfter','clearTtl','system','\x0a\x20\x20okdb\x20doctor\x0a','emit','LICENSE_FEATURE_DISABLED','ref:violation_resolved','[okdb]\x20exported\x20\x20types=','\x20\x20✓\x20http\x20listening\x20on\x20:','port\x20','LICENSE_HASH_MISMATCH','--name','License\x20signature\x20invalid:\x20','name','off','registerType','verifyActivation','time','(no\x20types)','[env]','PUBLIC_KEY_PEM','/type/users/item/alice\x0a\x20\x20\x20\x20','spki','OKDBSchemaValidationError','once','--key','\x20\x20(','\x20\x20✓\x20joined\x20and\x20reconciliation\x20initiated','readUInt8','green','decodeActivationToken','OKDBInvalidPrimaryKeyError','targetType','\x20\x20╚═══════════════════════════╝','shutdown',')\x20to\x20your\x20license\x20vendor.','pause','MALFORMED_TOKEN','stopping','ACTIVATION_EXPIRED','toFixed','\x20more','free\x20tier','sourceType','startsWith','\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','body','(null)','PUB_FINGERPRINT','[okdb]\x20backup\x20complete','valid','[body]','2148531IrjMyd','endsWith','migrate','QUIT','envs=','getCount','LICENSE_LIMIT_EXCEEDED','username','put','logLevel','--permissions','call','maxWrites','--ttl','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20override\x20active\x20environment\x20for\x20this\x20call\x0a\x20\x20','--password','\x20\x20\x20\x20\x20\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','decodeLicenseBlob:\x20input\x20must\x20be\x20a\x20string','FOREIGN_KEY_DELETE_RESTRICTED','--changes','question','sizeBefore','\x20\x20\x20\x20usage:\x20\x20\x20','Feature\x20not\x20available\x20on\x20free\x20tier:\x20','write','isArray','\x20\x20[okdb]\x20closed\x20cleanly\x0a','__writeCounter','--drop','\x20\x20Path\x20access','halted','getPins','index:reset','env:opened','debug','--blobs','_isFree','view:progress','.\x20The\x20active\x20license\x20does\x20not\x20enable\x20\x22','created','OPEN','1.8.8','\x20\x20Usage:\x20okdb\x20license\x20[<blob|path|uuid|activation-token>]','exports','license:activated','Hint:\x20','SCHEMA_COLLECTION_INVALID','standard','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','length','api','details','—\x20/api/\x20is\x20auto-prefixed,\x20env\x20is\x20auto-injected','dbPath','_license','LOGS','port','resetFts','license:added','timeMachine','dropType','{}[]:,\x27\x22','\x20opening\x20','\x20\x20Usage:','Cannot\x20set\x20enforce\x20schema\x20on\x20','\x20\x20Some\x20checks\x20failed.\x0a','routes','OKDBIndexHasConsumersError','randomUUID','\x20\x20\x20\x20name:\x20\x20\x20\x20\x20\x20\x20\x20','\x22\x20(must\x20be\x20debug|info|warn|error)','enabled','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20GET\x20(implicit)\x0a\x20\x20','utf8','[okdb]\x20imported\x20\x20types=','typesPerEnv','[okdb]\x20close\x20error:\x20','false','license:invalid','\x1b[1m','.\x20Only\x20primitives,\x20null,\x20Buffers,\x20and\x20arrays\x20are\x20allowed.\x20Got:\x20','\x22\x20→\x20','\x20\x20⚠','export','\x20which\x20does\x20not\x20exist','SIGINT','\x20records…','okdb','hex','\x22\x20to\x20enable\x20it.','--label','/type/users\x0a\x20\x20\x20\x20','red','logRequests','[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22','\x20\x20[','from','issuedAt','import','\x0a[okdb]\x20error:\x20','⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20','OKDBSchemaCollectionError','\x1b[0m','OKDBAlreadyExistsError','listRoutes','\x20\x20╔═══════════════════════════╗','start\x20','idx:','type','--env\x20<name>','writeUInt32BE','[okdb]\x20exporting\x20blobs…','transport','label','\x20\x20Type\x20','Examples','Foreign\x20key\x20violation:\x20','licensed','PUT\x20type/users/item/x\x20{\x22n\x22:1}','__OKDB_PUB_FINGERPRINT__','resume','get','decoded','txn:start','LICENSE_ACTIVATION_INVALID','[okdb]\x20started\x20in\x20','\x0a\x20\x20Usage:\x20use\x20<env-name>\x0a','allocUnsafe','OKDBVersionMismatchError','TYPE_ALREADY_REGISTERED','LABEL','stack','\x0a\x20\x20Raw\x20token\x20(shown\x20once,\x20save\x20it\x20now):\x0a','--no-repl','platform','failures','/types\x0a\x20\x20\x20\x20','\x20\x20\x20\x20expires:\x20\x20\x20','.\x20Primary\x20keys\x20must\x20be\x20string\x20or\x20number.\x20Got:\x20','PATCH','verify','LICENSEE','INVALID_VALUE','\x0d[okdb]\x20','createdAt','Unique\x20constraint\x20violated\x20on\x20','homedir','schema:set','fieldPath','\x20\x20\x20http://localhost:','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','peers=','\x20\x20Or\x20set\x20sync.address\x20in\x20.kdbconfig','\x20does\x20not\x20exist','\x1b[2m','ENVS','DELETE','isTTY','(none)','warn','Activation\x20invalid:\x20','indexes','node','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20','decodeLicenseBlob:\x20blob\x20too\x20short\x20(','_systemEnv','\x20\x20\x20\x20•\x20a\x20license\x20blob\x20\x20\x20(Crockford\x20base32,\x20~150–250\x20chars)','result','\x20\x20\x20\x20\x20\x20\x20','server','system:drain','decodeLicenseBlob:\x20failed\x20to\x20decode\x20payload:\x20','.\x20Add\x20a\x20license\x20that\x20includes\x20\x22','readFileSync','has','fill','Either\x20the\x20build\x20was\x20made\x20with\x20a\x20different\x20keypair,\x20or\x20the\x20license\x20was\x20issued\x20with\x20a\x20different\x20private\x20key.','min','licenseType','\x20\x20changes=','[okdb]\x20loaded\x20config:\x20','\x20\x20Build:\x20\x20\x20key\x20fingerprint\x20','resetting','data','exit','Sync','OKDBNotFoundError','LICENSED_BUILD','every','licensee','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20has\x20expired\x20—\x20request\x20a\x20fresh\x20one.','license:removed','\x20for\x20commands,\x20','NAME','\x27\x20already\x20registered','\x20\x20Writes:\x20\x20','fts:registered','inputSchema','\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20','[okdb]\x20blobs:\x20imported=','\x0a\x20\x20No\x20routes\x20matching\x20\x22','types:','path','(add\x20a\x20license\x20first)','--grants','use\x20<env>','Files','charCodeAt','null','keys','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','setSchema','exportBlobs','Embeddings','derivePin','remove','types/env=','expiresAt','\x20\x20\x20\x20','open\x20','.okdb-write-test','\x20\x20\x20\x20•\x20a\x20path\x20to\x20a\x20.license\x20file','\x20\x20\x20\x20status:\x20\x20\x20\x20pending\x20activation','magenta','--open','roles','GET','open','\x1b[32m','index:drop','[okdb]\x20invalid\x20port:\x20','trimStart','ttl','values','%),\x20','getRange','error','\x20deleted','license','[okdb]\x20error:\x20'];_0x13bf=function(){return _0x1957e5;};return _0x13bf();}(function(_0x4bce1a,_0x55aa2b){const _0x2d53d3=_0xc3c9,_0x5dd382=_0x4bce1a();while(!![]){try{const _0x1a0601=-parseInt(_0x2d53d3(0x3a5))/0x1*(parseInt(_0x2d53d3(0x374))/0x2)+parseInt(_0x2d53d3(0x366))/0x3*(parseInt(_0x2d53d3(0x417))/0x4)+parseInt(_0x2d53d3(0x19d))/0x5*(-parseInt(_0x2d53d3(0x3e6))/0x6)+-parseInt(_0x2d53d3(0x1a3))/0x7+parseInt(_0x2d53d3(0x46c))/0x8+parseInt(_0x2d53d3(0x1db))/0x9*(parseInt(_0x2d53d3(0x341))/0xa)+parseInt(_0x2d53d3(0x225))/0xb;if(_0x1a0601===_0x55aa2b)break;else _0x5dd382['push'](_0x5dd382['shift']());}catch(_0x37b5ac){_0x5dd382['push'](_0x5dd382['shift']());}}}(_0x13bf,0x7b015));var require$$1$1=require('path'),require$$1=require('fs'),require$$3=require(_0x26eb70(0x382)),require$$0$2=require(_0x26eb70(0x489)),require$$5=require('../okdb'),require$$0=require(_0x26eb70(0x35f)),require$$0$1=require(_0x26eb70(0x1ba)),require$$2$1=require('os'),require$$4=require(_0x26eb70(0x494));function getDefaultExportFromCjs(_0x47ed6e){const _0x22aa8b=_0x26eb70;return _0x47ed6e&&_0x47ed6e['__esModule']&&Object[_0x22aa8b(0x43b)][_0x22aa8b(0x42b)][_0x22aa8b(0x230)](_0x47ed6e,_0x22aa8b(0x3ee))?_0x47ed6e[_0x22aa8b(0x3ee)]:_0x47ed6e;}var okdb$1={},version=_0x26eb70(0x24e),require$$2={'version':version},okdbAuthTokens,hasRequiredOkdbAuthTokens;function requireOkdbAuthTokens(){if(hasRequiredOkdbAuthTokens)return okdbAuthTokens;hasRequiredOkdbAuthTokens=0x1;const _0x584c20=require$$0;function _0x12e1cb(_0xa07ee2,_0x17c052){const _0x52b1ff=_0xc3c9;return _0x584c20[_0x52b1ff(0x405)]('sha256',_0x17c052)[_0x52b1ff(0x38b)](_0xa07ee2)[_0x52b1ff(0x363)](_0x52b1ff(0x465));}function _0xe9a2a3(_0x2c5752,_0x346155){const _0x398f0b=_0xc3c9;if(typeof _0x2c5752!==_0x398f0b(0x41a)||typeof _0x346155!==_0x398f0b(0x41a))return![];if(Buffer['byteLength'](_0x2c5752)!==Buffer[_0x398f0b(0x40d)](_0x346155))return![];return _0x584c20[_0x398f0b(0x328)](Buffer[_0x398f0b(0x285)](_0x2c5752),Buffer['from'](_0x346155));}function _0x3fa7b7(_0x362553){const _0x349479=_0xc3c9;if(!_0x362553?.[_0x349479(0x21d)](_0x349479(0x3cd)))return null;return _0x362553['slice'](0x7);}function _0x5ad887(_0x27ef55=0x20){const _0x5f3c0d=_0xc3c9;return _0x584c20[_0x5f3c0d(0x1a0)](_0x27ef55)[_0x5f3c0d(0x454)](_0x5f3c0d(0x465));}function _0x3ae3f2(_0x6d4691){const _0x27973f=_0xc3c9;return _0x584c20[_0x27973f(0x457)](_0x27973f(0x3f1))[_0x27973f(0x38b)](_0x6d4691)[_0x27973f(0x363)](_0x27973f(0x27d));}function _0x436451(_0x4f3f77,_0x247f79,_0x183a79=0x36ee80){const _0xe8a1f2=_0xc3c9;if(!_0x247f79)throw new Error('Token\x20secret\x20not\x20configured');const _0x4c3ec3=Date[_0xe8a1f2(0x471)](),_0x32797d=Buffer[_0xe8a1f2(0x285)](JSON[_0xe8a1f2(0x3a9)]({'iat':_0x4c3ec3,'exp':_0x4c3ec3+_0x183a79,'sub':_0x4f3f77?.['id']??_0x4f3f77?.[_0xe8a1f2(0x321)]??null,'username':_0x4f3f77?.[_0xe8a1f2(0x22c)]??_0x4f3f77?.[_0xe8a1f2(0x1fe)]??null,'roles':Array['isArray'](_0x4f3f77?.[_0xe8a1f2(0x306)])?_0x4f3f77[_0xe8a1f2(0x306)]:[]}))[_0xe8a1f2(0x454)](_0xe8a1f2(0x465)),_0x15dd2f=_0x12e1cb(_0x32797d,_0x247f79);return _0x32797d+'.'+_0x15dd2f;}function _0x21b37a(_0x435ee1,_0x35721a){const _0x2a46bc=_0xc3c9;if(!_0x35721a||typeof _0x435ee1!==_0x2a46bc(0x41a))return null;const [_0x27f76f,_0x173101]=_0x435ee1['split']('.');if(!_0x27f76f||!_0x173101)return null;const _0x3a9fe5=_0x12e1cb(_0x27f76f,_0x35721a);if(!_0xe9a2a3(_0x173101,_0x3a9fe5))return null;try{const _0x106071=JSON[_0x2a46bc(0x1c6)](Buffer['from'](_0x27f76f,_0x2a46bc(0x465))[_0x2a46bc(0x454)]()),_0x29efb7=0x7530;if(Date[_0x2a46bc(0x471)]()>Number(_0x106071?.[_0x2a46bc(0x3e4)]??0x0)+_0x29efb7)return null;return _0x106071;}catch{return null;}}async function _0x3f536e(_0x10dac2){return new Promise((_0x591952,_0x241394)=>{const _0x32c4fa=_0xc3c9,_0x2b0907=_0x584c20[_0x32c4fa(0x1a0)](0x10);_0x584c20[_0x32c4fa(0x18e)](_0x10dac2,_0x2b0907,0x40,(_0x18a390,_0x367869)=>{const _0xbc9fd7=_0x32c4fa;if(_0x18a390)_0x241394(_0x18a390);_0x591952(_0x2b0907['toString'](_0xbc9fd7(0x27d))+':'+_0x367869[_0xbc9fd7(0x454)](_0xbc9fd7(0x27d)));});});}async function _0x571064(_0x44c795,_0x2c652f){const _0x18567f=_0xc3c9,[_0x14841c,_0x207ce9]=_0x2c652f[_0x18567f(0x40f)](':');if(!_0x14841c||!_0x207ce9)return![];const _0x4d988f=Buffer[_0x18567f(0x285)](_0x14841c,_0x18567f(0x27d));return new Promise((_0x361625,_0x139bd3)=>{const _0x346e49=_0x18567f;_0x584c20[_0x346e49(0x18e)](_0x44c795,_0x4d988f,0x40,(_0x3ced44,_0xbf3a98)=>{const _0x205935=_0x346e49;if(_0x3ced44)_0x139bd3(_0x3ced44);_0x361625(_0x584c20['timingSafeEqual'](_0xbf3a98,Buffer[_0x205935(0x285)](_0x207ce9,_0x205935(0x27d))));});});}return okdbAuthTokens={'hmac':_0x12e1cb,'timingSafeEqual':_0xe9a2a3,'parseBearer':_0x3fa7b7,'randomToken':_0x5ad887,'hashToken':_0x3ae3f2,'issueToken':_0x436451,'authenticateToken':_0x21b37a,'hashPassword':_0x3f536e,'verifyPassword':_0x571064},okdbAuthTokens;}var okdbLicenseCodec,hasRequiredOkdbLicenseCodec;function requireOkdbLicenseCodec(){const _0x19955f=_0x26eb70;if(hasRequiredOkdbLicenseCodec)return okdbLicenseCodec;hasRequiredOkdbLicenseCodec=0x1;const _0x2acfdb=require$$0$1,_0x47c06e=_0x19955f(0x41d),_0x5f18b7=new Uint8Array(0x100)[_0x19955f(0x2d4)](0xff);for(let _0x5b0ebd=0x0;_0x5b0ebd<_0x47c06e[_0x19955f(0x256)];_0x5b0ebd++){_0x5f18b7[_0x47c06e[_0x19955f(0x2f4)](_0x5b0ebd)]=_0x5b0ebd,_0x5f18b7[_0x47c06e['charCodeAt'](_0x5b0ebd)+0x20]=_0x5b0ebd;}_0x5f18b7['O'[_0x19955f(0x2f4)](0x0)]=0x0,_0x5f18b7['o'['charCodeAt'](0x0)]=0x0,_0x5f18b7['I'['charCodeAt'](0x0)]=0x1,_0x5f18b7['i'[_0x19955f(0x2f4)](0x0)]=0x1,_0x5f18b7['L'[_0x19955f(0x2f4)](0x0)]=0x1,_0x5f18b7['l'['charCodeAt'](0x0)]=0x1;function _0xb756d8(_0x1b737e){let _0x52168d=0x0,_0x2ef07a=0x0,_0x59acce='';for(let _0x324068=0x0;_0x324068<_0x1b737e['length'];_0x324068++){_0x2ef07a=_0x2ef07a<<0x8|_0x1b737e[_0x324068],_0x52168d+=0x8;while(_0x52168d>=0x5){_0x52168d-=0x5,_0x59acce+=_0x47c06e[_0x2ef07a>>>_0x52168d&0x1f];}}return _0x52168d>0x0&&(_0x59acce+=_0x47c06e[_0x2ef07a<<0x5-_0x52168d&0x1f]),_0x59acce;}function _0x2f673c(_0x1d9ff2){const _0x503f4c=_0x19955f;_0x1d9ff2=_0x1d9ff2[_0x503f4c(0x43d)](/-/g,'')[_0x503f4c(0x38a)]();let _0x16b07c=0x0,_0x59a1c3=0x0;const _0x268437=[];for(let _0x46985d=0x0;_0x46985d<_0x1d9ff2[_0x503f4c(0x256)];_0x46985d++){const _0x1ade13=_0x5f18b7[_0x1d9ff2[_0x503f4c(0x2f4)](_0x46985d)];if(_0x1ade13===0xff)continue;_0x59a1c3=_0x59a1c3<<0x5|_0x1ade13,_0x16b07c+=0x5,_0x16b07c>=0x8&&(_0x16b07c-=0x8,_0x268437[_0x503f4c(0x44e)](_0x59a1c3>>>_0x16b07c&0xff));}return Buffer[_0x503f4c(0x285)](_0x268437);}const _0x120a6e=[_0x19955f(0x403),_0x19955f(0x436),'engines','fts',_0x19955f(0x260),_0x19955f(0x356),_0x19955f(0x3aa),'files'],_0x39fcac=0x0,_0x2e3d0c=0x1,_0x3559f0=0x2,_0x261cda=0x6*0x1e*0x18*0x3c*0x3c*0x3e8;function _0x1b6399({issuedAt:_0x5ea290,expiresAt:_0x327aa4,licensee:licensee='',features:features={},limits:limits={},licenseType:licenseType=_0x39fcac}){const _0x3a2d59=_0x19955f,_0x2cd566=Buffer[_0x3a2d59(0x285)](licensee,_0x3a2d59(0x26e))[_0x3a2d59(0x36a)](0x0,0x40),_0x225507=0x1+0x1+0x4+0x4+0x1+_0x2cd566[_0x3a2d59(0x256)]+0x2+0x10,_0x22a3f9=Buffer['allocUnsafe'](_0x225507);let _0x223fa4=0x0;_0x22a3f9['writeUInt8'](0x1,_0x223fa4++),_0x22a3f9[_0x3a2d59(0x190)](licenseType,_0x223fa4++),_0x22a3f9[_0x3a2d59(0x293)](Math[_0x3a2d59(0x3c5)](_0x5ea290/0x3e8),_0x223fa4),_0x223fa4+=0x4,_0x22a3f9[_0x3a2d59(0x293)](Math[_0x3a2d59(0x3c5)](_0x327aa4/0x3e8),_0x223fa4),_0x223fa4+=0x4,_0x22a3f9['writeUInt8'](_0x2cd566['length'],_0x223fa4++),_0x2cd566[_0x3a2d59(0x406)](_0x22a3f9,_0x223fa4),_0x223fa4+=_0x2cd566[_0x3a2d59(0x256)];let _0x4d8475=0x0;for(let _0x5a6e5c=0x0;_0x5a6e5c<_0x120a6e[_0x3a2d59(0x256)];_0x5a6e5c++){if(features[_0x120a6e[_0x5a6e5c]])_0x4d8475|=0x1<<_0x5a6e5c;}_0x22a3f9['writeUInt16BE'](_0x4d8475,_0x223fa4),_0x223fa4+=0x2;const _0x1e7560=[_0x3a2d59(0x1d3),_0x3a2d59(0x270),_0x3a2d59(0x3ca),'maxWrites'];for(const _0x1456f8 of _0x1e7560){_0x22a3f9[_0x3a2d59(0x293)](limits[_0x1456f8]||0x0,_0x223fa4),_0x223fa4+=0x4;}return _0x22a3f9;}function _0x34658c(_0x54efe3){const _0x45221b=_0x19955f;let _0x179bcf=0x0;const _0x320198=_0x54efe3['readUInt8'](_0x179bcf++),_0x3653cf=_0x54efe3['readUInt8'](_0x179bcf++),_0xc94720=_0x54efe3[_0x45221b(0x35a)](_0x179bcf);_0x179bcf+=0x4;const _0x2244e6=_0x54efe3[_0x45221b(0x35a)](_0x179bcf);_0x179bcf+=0x4;const _0x5a779f=_0x54efe3[_0x45221b(0x20d)](_0x179bcf++),_0x2e26be=_0x54efe3[_0x45221b(0x36a)](_0x179bcf,_0x179bcf+_0x5a779f)[_0x45221b(0x454)](_0x45221b(0x26e));_0x179bcf+=_0x5a779f;const _0x1ab835=_0x54efe3['readUInt16BE'](_0x179bcf);_0x179bcf+=0x2;const _0x1f0ed2={};for(let _0x3c3bb4=0x0;_0x3c3bb4<_0x120a6e[_0x45221b(0x256)];_0x3c3bb4++){_0x1f0ed2[_0x120a6e[_0x3c3bb4]]=Boolean(_0x1ab835&0x1<<_0x3c3bb4);}const _0x30dfb8=[_0x45221b(0x1d3),_0x45221b(0x270),_0x45221b(0x3ca),_0x45221b(0x231)],_0x5416e2={};for(const _0x655dbe of _0x30dfb8){const _0x32347c=_0x54efe3[_0x45221b(0x35a)](_0x179bcf);_0x179bcf+=0x4,_0x5416e2[_0x655dbe]=_0x32347c===0x0?null:_0x32347c;}return{'v':_0x320198,'licenseType':_0x3653cf,'issuedAt':_0xc94720*0x3e8,'expiresAt':_0x2244e6*0x3e8,'licensee':_0x2e26be,'features':_0x1f0ed2,'limits':_0x5416e2};}function _0x460dee(_0x4452ff,_0x5d4634){const _0x1354f0=_0x19955f,_0x372e47=Buffer[_0x1354f0(0x19f)]([_0x4452ff,_0x5d4634]),_0x455f2d=_0xb756d8(_0x372e47),_0x51fc8d=[];for(let _0x3d0b31=0x0;_0x3d0b31<_0x455f2d[_0x1354f0(0x256)];_0x3d0b31+=0x8){_0x51fc8d[_0x1354f0(0x44e)](_0x455f2d[_0x1354f0(0x36a)](_0x3d0b31,_0x3d0b31+0x8));}return _0x51fc8d[_0x1354f0(0x1ac)]('-');}function _0x1ea4f0(_0x9f25a){const _0x541715=_0x19955f;if(typeof _0x9f25a!==_0x541715(0x41a))throw new Error(_0x541715(0x236));const _0x1ba2d8=_0x2f673c(_0x9f25a[_0x541715(0x43d)](/-/g,''));if(_0x1ba2d8[_0x541715(0x256)]<0x41)throw new Error(_0x541715(0x2c9)+_0x1ba2d8[_0x541715(0x256)]+_0x541715(0x351));const _0x50d38b=_0x1ba2d8[_0x541715(0x36a)](0x0,_0x1ba2d8[_0x541715(0x256)]-0x40),_0x5cebbc=_0x1ba2d8['slice'](_0x1ba2d8[_0x541715(0x256)]-0x40);let _0x4611a4;try{_0x4611a4=_0x34658c(_0x50d38b);}catch(_0x2ee06f){throw new Error(_0x541715(0x2d0)+_0x2ee06f['message']);}return{'rawBuf':_0x1ba2d8,'payload':_0x50d38b,'sig':_0x5cebbc,'decoded':_0x4611a4};}function _0x1ac810(_0xcc2c9f){const _0x46b685=_0x19955f;return _0x2acfdb[_0x46b685(0x457)](_0x46b685(0x3f1))[_0x46b685(0x38b)](_0xcc2c9f)[_0x46b685(0x363)]()['slice'](0x0,0x8);}function _0x24f57d(_0x2c4b63,_0x4a585f,_0x244193){const _0x22aa7c=_0x19955f,_0x5ddb9d='OKDB-PIN-V1:'+_0x244193,_0x3f03d1=Buffer[_0x22aa7c(0x19f)]([Buffer[_0x22aa7c(0x285)](_0x2c4b63,_0x22aa7c(0x26e)),_0x4a585f]),_0x527e40=_0x2acfdb[_0x22aa7c(0x405)](_0x22aa7c(0x3f1),_0x5ddb9d)['update'](_0x3f03d1)[_0x22aa7c(0x363)](),_0x328bac=_0xb756d8(_0x527e40[_0x22aa7c(0x36a)](0x0,0x5));return{'pin':_0x328bac,'pinHmac':_0x527e40};}function _0x2179dc(_0x162020,_0x270667,_0x497f8b){const _0x37b3bf=_0x19955f,_0x2b831e=Buffer['allocUnsafe'](0x4d);let _0x4ecfff=0x0;_0x2b831e[_0x37b3bf(0x190)](0x1,_0x4ecfff++),_0x162020[_0x37b3bf(0x406)](_0x2b831e,_0x4ecfff),_0x4ecfff+=0x8,_0x2b831e[_0x37b3bf(0x293)](_0x270667,_0x4ecfff),_0x4ecfff+=0x4,_0x497f8b[_0x37b3bf(0x406)](_0x2b831e,_0x4ecfff);const _0x10a067=_0xb756d8(_0x2b831e),_0x2d5bba=[];for(let _0x168a80=0x0;_0x168a80<_0x10a067[_0x37b3bf(0x256)];_0x168a80+=0x6){_0x2d5bba[_0x37b3bf(0x44e)](_0x10a067[_0x37b3bf(0x36a)](_0x168a80,_0x168a80+0x6));}return _0x2d5bba[_0x37b3bf(0x1ac)]('-');}function _0x535612(_0x4d47d4){const _0x5599b1=_0x19955f;if(typeof _0x4d47d4!==_0x5599b1(0x41a))throw new Error('decodeActivationToken:\x20input\x20must\x20be\x20a\x20string');const _0x1f86e4=_0x2f673c(_0x4d47d4[_0x5599b1(0x43d)](/-/g,''));if(_0x1f86e4[_0x5599b1(0x256)]!==0x4d)throw new Error('decodeActivationToken:\x20expected\x2077\x20bytes,\x20got\x20'+_0x1f86e4['length']);let _0x36289a=0x0;const _0x41f3cf=_0x1f86e4[_0x5599b1(0x20d)](_0x36289a++),_0x34a15d=_0x1f86e4['slice'](_0x36289a,_0x36289a+0x8);_0x36289a+=0x8;const _0x16af30=_0x1f86e4[_0x5599b1(0x35a)](_0x36289a);_0x36289a+=0x4;const _0x5a8ca0=_0x1f86e4[_0x5599b1(0x36a)](_0x36289a);return{'v':_0x41f3cf,'licenseHash':_0x34a15d,'expiry':_0x16af30,'sig':_0x5a8ca0};}function _0x280bf5({tokenString:_0x2fbeb7,nodeId:_0x189dea,rawBlobBuf:_0x491087,pubKeyPem:_0x437de7,pubFingerprint:_0x252456}){const _0x1b7009=_0x19955f;let _0xc8174c;try{_0xc8174c=_0x535612(_0x2fbeb7);}catch(_0x9705b1){return{'valid':![],'reason':_0x1b7009(0x216)};}const _0x45194f=_0x1ac810(_0x491087);if(!_0x45194f['equals'](_0xc8174c[_0x1b7009(0x459)]))return{'valid':![],'reason':'LICENSE_HASH_MISMATCH'};const {pinHmac:_0x539c8e}=_0x24f57d(_0x189dea,_0x45194f,_0x252456),_0x5ec894=Buffer[_0x1b7009(0x2a4)](0x4);_0x5ec894['writeUInt32BE'](_0xc8174c[_0x1b7009(0x348)],0x0);const _0x5ce6cb=Buffer[_0x1b7009(0x19f)]([Buffer['from']([_0xc8174c['v']]),_0x539c8e[_0x1b7009(0x36a)](0x0,0x5),_0xc8174c[_0x1b7009(0x459)],_0x5ec894]);try{const _0x1b49d3=_0x2acfdb[_0x1b7009(0x2b1)](null,_0x5ce6cb,_0x437de7,_0xc8174c[_0x1b7009(0x1a6)]);if(!_0x1b49d3)return{'valid':![],'reason':_0x1b7009(0x41c)};}catch(_0x48e704){return{'valid':![],'reason':_0x1b7009(0x41c)};}if(_0xc8174c[_0x1b7009(0x348)]<Date['now']()/0x3e8)return{'valid':![],'reason':_0x1b7009(0x218)};return{'valid':!![],'reason':'ok'};}function _0x41114b(_0x1af055){const _0x16462c=_0x19955f;if(typeof _0x1af055!=='string')return _0x16462c(0x1ef);const _0xcefa2b=_0x1af055[_0x16462c(0x3a4)]();if(_0xcefa2b['startsWith']('/')||_0xcefa2b[_0x16462c(0x21d)]('./')||_0xcefa2b[_0x16462c(0x21d)]('../')||/^[A-Za-z]:[\\/]/['test'](_0xcefa2b))return _0x16462c(0x2ef);if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i[_0x16462c(0x329)](_0xcefa2b))return _0x16462c(0x1b0);const _0x4b8247=_0xcefa2b[_0x16462c(0x43d)](/[\s-]+/g,'')[_0x16462c(0x256)];if(_0x4b8247===0x7c)return _0x16462c(0x386);if(_0x4b8247>=0x95&&_0x4b8247<=0xfc)return'blob';return _0x16462c(0x1ef);}return okdbLicenseCodec={'toBase32':_0xb756d8,'fromBase32':_0x2f673c,'encodeLicensePayload':_0x1b6399,'decodeLicensePayload':_0x34658c,'encodeLicenseBlob':_0x460dee,'decodeLicenseBlob':_0x1ea4f0,'licenseHash':_0x1ac810,'derivePin':_0x24f57d,'encodeActivationToken':_0x2179dc,'decodeActivationToken':_0x535612,'verifyActivation':_0x280bf5,'detectInputType':_0x41114b,'FEATURE_NAMES':_0x120a6e,'LICENSE_TYPE_STANDARD':_0x39fcac,'LICENSE_TYPE_OPEN':_0x2e3d0c,'LICENSE_TYPE_INTERNAL':_0x3559f0,'OPEN_LICENSE_MAX_DURATION_MS':_0x261cda},okdbLicenseCodec;}var okdbError,hasRequiredOkdbError;function requireOkdbError(){if(hasRequiredOkdbError)return okdbError;hasRequiredOkdbError=0x1;class _0x16d980 extends Error{constructor(_0x58f07f,_0x34aaf9,_0xeab1d4={}){const _0x46a6fa=_0xc3c9;super(_0x58f07f),this[_0x46a6fa(0x1fe)]=_0x46a6fa(0x3c4),this[_0x46a6fa(0x1a9)]=_0x34aaf9,this[_0x46a6fa(0x258)]=_0xeab1d4,_0xeab1d4[_0x46a6fa(0x38e)]&&(this['cause']=_0xeab1d4['cause']),Error['captureStackTrace'](this,this[_0x46a6fa(0x430)]);}}class _0x215db4 extends _0x16d980{constructor(_0x19f0fe,_0x5b326f,_0x280f6b,_0x41c1f3){const _0x48d40d=_0xc3c9;super('Version\x20mismatch\x20for\x20'+_0x19f0fe+'@'+_0x5b326f+_0x48d40d(0x369)+_0x280f6b+_0x48d40d(0x48d)+_0x41c1f3,_0x48d40d(0x476),{'type':_0x19f0fe,'key':_0x5b326f,'expectedVersion':_0x280f6b,'actualVersion':_0x41c1f3}),this[_0x48d40d(0x1fe)]=_0x48d40d(0x2a5);}}class _0x2affed extends _0x16d980{constructor(_0x3a3ebe,_0x102b35){const _0x5a8065=_0xc3c9;super(_0x3a3ebe+'@'+_0x102b35+_0x5a8065(0x2be),_0x5a8065(0x31a),{'type':_0x3a3ebe,'key':_0x102b35}),this[_0x5a8065(0x1fe)]=_0x5a8065(0x2df);}}class _0x13708a extends _0x16d980{constructor(_0x50ea5a,_0x1f2ac1){const _0x1c4029=_0xc3c9;super(_0x50ea5a+'@'+_0x1f2ac1+'\x20already\x20exists',_0x1c4029(0x411),{'type':_0x50ea5a,'key':_0x1f2ac1}),this[_0x1c4029(0x1fe)]=_0x1c4029(0x28c);}}class _0x1a4ac8 extends _0x16d980{constructor(_0x1f90c6,_0x13b243){const _0x2488d5=_0xc3c9,_0x322fbe=typeof _0x13b243;super(_0x2488d5(0x1da)+_0x1f90c6+_0x2488d5(0x1e5)+_0x322fbe+_0x2488d5(0x275)+_0x13b243,_0x2488d5(0x3c6),{'index':_0x1f90c6,'key':_0x13b243,'keyType':_0x322fbe}),this[_0x2488d5(0x1fe)]=_0x2488d5(0x1aa);}}class _0x24ffb0 extends _0x16d980{constructor(_0xedb138){const _0xeac3a=_0xc3c9,_0x5a5cf6=typeof _0xedb138;super(_0xeac3a(0x396)+_0x5a5cf6+_0xeac3a(0x2af)+_0xedb138,_0xeac3a(0x373),{'key':_0xedb138,'keyType':_0x5a5cf6}),this['name']=_0xeac3a(0x210);}}class _0xa2c80f extends _0x16d980{constructor(_0x1b3621){const _0x54e0c5=_0xc3c9;super('Type\x20\x27'+_0x1b3621+'\x27\x20doesn\x27t\x20exist',_0x54e0c5(0x404),{'type':_0x1b3621}),this['name']=_0x54e0c5(0x1ee);}}class _0x2f488b extends _0x16d980{constructor(_0x16c153){const _0x583358=_0xc3c9;super('Type\x20\x27'+_0x16c153+_0x583358(0x2e7),_0x583358(0x2a6),{'type':_0x16c153}),this['name']=_0x583358(0x3e8);}}class _0x489b4b extends _0x16d980{constructor(_0x690b6c,_0x5a4721){const _0xcdab10=_0xc3c9;super(_0xcdab10(0x44c)+_0x5a4721+_0xcdab10(0x44f)+_0x690b6c+_0xcdab10(0x34b),_0xcdab10(0x383),{'type':_0x690b6c,'index':_0x5a4721}),this[_0xcdab10(0x1fe)]=_0xcdab10(0x367);}}class _0x42ef9a extends _0x16d980{constructor(_0x3a45d3,_0x266d19){const _0x28f38f=_0xc3c9;super(_0x28f38f(0x44c)+_0x266d19+'\x27\x20on\x20type\x20\x27'+_0x3a45d3+_0x28f38f(0x3df),_0x28f38f(0x1b9),{'type':_0x3a45d3,'index':_0x266d19}),this['name']='OKDBIndexAlreadyRegisteredError';}}class _0x17374b extends _0x16d980{constructor(_0xed16db,_0x1889fa={}){const _0x3cec9d=_0xc3c9;super(_0xed16db,_0x3cec9d(0x2b3),_0x1889fa),this[_0x3cec9d(0x1fe)]='OKDBInvalidValueError';}}class _0x7dd392 extends _0x16d980{constructor(_0x4d716b,_0x1a8dba,_0x1a4e9a,_0x35b6be,_0x323d21){const _0x141a73=_0xc3c9;super(_0x141a73(0x2b6)+_0x4d716b+'@'+_0x1a8dba+':\x20key\x20['+_0x1a4e9a+']\x20already\x20maps\x20to\x20\x27'+_0x35b6be+'\x27,\x20cannot\x20map\x20to\x20\x27'+_0x323d21+'\x27',_0x141a73(0x1c8),{'type':_0x4d716b,'index':_0x1a8dba,'indexKey':_0x1a4e9a,'existingKey':_0x35b6be,'conflictingKey':_0x323d21}),this[_0x141a73(0x1fe)]=_0x141a73(0x33d);}}class _0x8da32a extends _0x16d980{constructor(_0x3bc078,_0xc684b0,_0x2f1f23){const _0x200ccb=_0xc3c9;super(_0x200ccb(0x19b)+_0x3bc078+'@'+_0xc684b0,_0x200ccb(0x434),{'type':_0x3bc078,'key':_0xc684b0,'errors':_0x2f1f23}),this[_0x200ccb(0x1fe)]=_0x200ccb(0x208),this['type']=_0x3bc078,this[_0x200ccb(0x3ac)]=_0xc684b0,this[_0x200ccb(0x3b4)]=_0x2f1f23;}}class _0x15f5e0 extends _0x16d980{constructor(_0x171056,_0x58ee33){const _0xead77a=_0xc3c9;super(_0xead77a(0x265)+_0x171056+':\x20'+_0x58ee33[_0xead77a(0x256)]+'\x20documents\x20fail\x20validation',_0xead77a(0x253),{'type':_0x171056,'failures':_0x58ee33}),this[_0xead77a(0x1fe)]=_0xead77a(0x28a),this[_0xead77a(0x291)]=_0x171056,this[_0xead77a(0x2ac)]=_0x58ee33;}}class _0x54cf07 extends _0x16d980{constructor(_0x35d2b1,_0x5b2abd,_0x3957e6,_0x53d22a,_0x3b2861){const _0xcc86e7=_0xc3c9;super(_0xcc86e7(0x299)+_0x35d2b1+'@'+_0x5b2abd+'.'+_0x3957e6+'\x20references\x20'+_0x53d22a+'@'+_0x3b2861+_0xcc86e7(0x279),'FOREIGN_KEY_VIOLATION',{'sourceType':_0x35d2b1,'sourceKey':_0x5b2abd,'fieldPath':_0x3957e6,'targetType':_0x53d22a,'targetKey':_0x3b2861}),this[_0xcc86e7(0x1fe)]=_0xcc86e7(0x47d),this[_0xcc86e7(0x21c)]=_0x35d2b1,this['sourceKey']=_0x5b2abd,this[_0xcc86e7(0x2b9)]=_0x3957e6,this[_0xcc86e7(0x211)]=_0x53d22a,this[_0xcc86e7(0x1ad)]=_0x3b2861;}}class _0x405785 extends _0x16d980{constructor(_0x176b8e,_0x1215a1,_0x4d5243){const _0x1afe18=_0xc3c9;super(_0x1afe18(0x326)+_0x176b8e+'@'+_0x1215a1+':\x20'+_0x4d5243[_0x1afe18(0x256)]+'\x20document(s)\x20reference\x20it\x20with\x20onDelete:restrict',_0x1afe18(0x237),{'targetType':_0x176b8e,'targetKey':_0x1215a1,'references':_0x4d5243}),this[_0x1afe18(0x1fe)]=_0x1afe18(0x495),this['targetType']=_0x176b8e,this[_0x1afe18(0x1ad)]=_0x1215a1,this[_0x1afe18(0x480)]=_0x4d5243;}}class _0x4fab68 extends _0x16d980{constructor(_0xe958e4,_0x1ed5bc,_0x567d3b){const _0x373a06=_0xc3c9;super(_0x373a06(0x33e)+_0x1ed5bc+_0x373a06(0x344)+_0xe958e4+_0x373a06(0x33f)+_0x567d3b[_0x373a06(0x449)](_0xbddff3=>_0xbddff3['kind']+':'+_0xbddff3[_0x373a06(0x1fe)])[_0x373a06(0x1ac)](',\x20'),_0x373a06(0x458),{'type':_0xe958e4,'index':_0x1ed5bc,'usedBy':_0x567d3b}),this[_0x373a06(0x1fe)]=_0x373a06(0x268);}}return okdbError={'OKDBError':_0x16d980,'OKDBVersionMismatchError':_0x215db4,'OKDBNotFoundError':_0x2affed,'OKDBAlreadyExistsError':_0x13708a,'OKDBInvalidIndexKeyError':_0x1a4ac8,'OKDBInvalidPrimaryKeyError':_0x24ffb0,'OKDBTypeNotRegisteredError':_0xa2c80f,'OKDBTypeAlreadyRegisteredError':_0x2f488b,'OKDBIndexNotRegisteredError':_0x489b4b,'OKDBIndexAlreadyRegisteredError':_0x42ef9a,'OKDBInvalidValueError':_0x17374b,'OKDBUniqueConstraintError':_0x7dd392,'OKDBSchemaValidationError':_0x8da32a,'OKDBSchemaCollectionError':_0x15f5e0,'OKDBForeignKeyError':_0x54cf07,'OKDBForeignKeyDeleteError':_0x405785,'OKDBIndexHasConsumersError':_0x4fab68},okdbError;}var okdbEnums,hasRequiredOkdbEnums;function _0xc3c9(_0x500353,_0x4e66b5){_0x500353=_0x500353-0x18c;const _0x13bfe2=_0x13bf();let _0xc3c930=_0x13bfe2[_0x500353];return _0xc3c930;}function requireOkdbEnums(){const _0x1e6bd1=_0x26eb70;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x474842={'PUT':_0x1e6bd1(0x22d),'REMOVE':'remove','INDEX_DROP':_0x1e6bd1(0x387),'INDEX_REGISTER':_0x1e6bd1(0x325),'INDEX_RESET':_0x1e6bd1(0x388),'TYPE_REGISTER':_0x1e6bd1(0x200),'TYPE_DROP':_0x1e6bd1(0x261),'FTS_REGISTER':_0x1e6bd1(0x3f2),'FTS_DROP':_0x1e6bd1(0x3ed),'FTS_RESET':_0x1e6bd1(0x25e),'SCHEMA_SET':_0x1e6bd1(0x2f8),'SCHEMA_DROP':_0x1e6bd1(0x318),'TTL_SET':'setTtl','TTL_CLEAR':_0x1e6bd1(0x1f2)},_0x506bd6={'SYSTEM_READY':'system:ready','SYSTEM_STOPPED':_0x1e6bd1(0x1d7),'SYSTEM_CLOCK_CHANGE':'system:clock_change','SYSTEM_POKE':'system:poke','SYSTEM_DRAIN':_0x1e6bd1(0x2cf),'SYSTEM_BUS_STATE_CHANGE':_0x1e6bd1(0x482),'ITEM_CREATE':_0x1e6bd1(0x335),'ITEM_UPDATE':_0x1e6bd1(0x419),'ITEM_REMOVE':_0x1e6bd1(0x3fe),'INDEX_RESET':_0x1e6bd1(0x245),'INDEX_READY':_0x1e6bd1(0x479),'INDEX_PROGRESS':_0x1e6bd1(0x39f),'VIEW_PROGRESS':_0x1e6bd1(0x24a),'INDEX_DROP':_0x1e6bd1(0x30a),'INDEX_REGISTERED':'index:registered','FTS_REGISTERED':_0x1e6bd1(0x2e9),'FTS_DROP':'fts:drop','FTS_RESET':'fts:reset','SCHEMA_SET':_0x1e6bd1(0x2b8),'SCHEMA_DROP':_0x1e6bd1(0x18f),'UNIQUE_VIOLATION':_0x1e6bd1(0x397),'UNIQUE_VIOLATION_RESOLVED':_0x1e6bd1(0x353),'REF_VIOLATION':_0x1e6bd1(0x42f),'REF_VIOLATION_RESOLVED':_0x1e6bd1(0x1f7),'SYNC_APPLY':'sync:apply','TXN_START':_0x1e6bd1(0x2a0),'TXN_END':_0x1e6bd1(0x358),'TXN_ROLLBACK':_0x1e6bd1(0x354),'TYPE_REGISTERED':_0x1e6bd1(0x1a7),'TYPE_DROP':'type:drop','ENV_OPENED':_0x1e6bd1(0x246),'ENV_REMOVED':_0x1e6bd1(0x33c),'TTL_EXPIRED':'ttl:expired','TTL_SET':_0x1e6bd1(0x1b1),'TTL_CLEAR':'ttl:clear','LICENSE_INVALID':_0x1e6bd1(0x273),'LICENSE_ADDED':_0x1e6bd1(0x25f),'LICENSE_ACTIVATED':_0x1e6bd1(0x251),'LICENSE_REMOVED':_0x1e6bd1(0x2e4)},_0x3baa97={'CREATING':_0x1e6bd1(0x3d3),'RESETTING':_0x1e6bd1(0x2db),'READY':'ready','DROPPING':_0x1e6bd1(0x1b5),'WAITING':_0x1e6bd1(0x438)},_0x396daf={'CREATED':_0x1e6bd1(0x24c),'STARTING':'starting','STARTED':_0x1e6bd1(0x378),'STOPPING':_0x1e6bd1(0x217),'STOPPED':_0x1e6bd1(0x45d)},_0x4473a6={'CREATING':_0x1e6bd1(0x3d3),'READY':_0x1e6bd1(0x47b),'HALTED':_0x1e6bd1(0x243),'STOPPED':_0x1e6bd1(0x45d),'RESETTING':_0x1e6bd1(0x2db)},_0x148e62=Object['freeze']({'POKE':'bus:poke','DRAIN':'bus:drain'});return okdbEnums={'BUS_EVENTS':_0x148e62,'CHANGE_ACTIONS':_0x474842,'EVENTS':_0x506bd6,'INDEX_STATE':_0x3baa97,'OKDB_STATE':_0x396daf,'VIEW_STATE':_0x4473a6},okdbEnums;}var okdbPubkey,hasRequiredOkdbPubkey;function requireOkdbPubkey(){const _0x17cdc7=_0x26eb70;if(hasRequiredOkdbPubkey)return okdbPubkey;hasRequiredOkdbPubkey=0x1;const _0x32d0bd=require$$1,_0x55e525=require$$1$1,_0x167863=require$$0,_0x59c9a0=_0x32d0bd[_0x17cdc7(0x2d2)](_0x55e525[_0x17cdc7(0x1ac)](__dirname,_0x17cdc7(0x1d4)),_0x17cdc7(0x26e))[_0x17cdc7(0x3a4)](),_0xca38b=_0x167863[_0x17cdc7(0x461)](_0x59c9a0)[_0x17cdc7(0x278)]({'type':_0x17cdc7(0x207),'format':_0x17cdc7(0x1b3)}),_0x2e7e2f=_0x167863[_0x17cdc7(0x457)]('sha256')[_0x17cdc7(0x38b)](_0xca38b)[_0x17cdc7(0x363)](_0x17cdc7(0x27d))['slice'](0x0,0x10);return okdbPubkey={'PUBLIC_KEY_PEM':_0x59c9a0,'PUB_FINGERPRINT':_0x2e7e2f},okdbPubkey;}var okdbLicense,hasRequiredOkdbLicense;function requireOkdbLicense(){const _0x8bdc59=_0x26eb70;if(hasRequiredOkdbLicense)return okdbLicense;hasRequiredOkdbLicense=0x1;const _0xbf19a2=require$$0,{OKDBError:_0x819f3b}=requireOkdbError(),{EVENTS:_0xddd4f6}=requireOkdbEnums(),_0x4d7125=requireOkdbLicenseCodec(),{LICENSE_TYPE_OPEN:_0x2f99ca,LICENSE_TYPE_INTERNAL:_0x49f0b1,OPEN_LICENSE_MAX_DURATION_MS:_0x34aa01}=_0x4d7125,_0xb17282=requireOkdbPubkey(),_0x266b6f={'LICENSED_BUILD':_0x8bdc59(0x43c),'PUBLIC_KEY_PEM':_0xb17282[_0x8bdc59(0x205)],'PUB_FINGERPRINT':_0xb17282[_0x8bdc59(0x221)],'LICENSE_EXPIRED_ACTION':_0x8bdc59(0x3cf)},_0x28b5d2=_0x8bdc59(0x422),_0x5ac037={'features':{'sync':![],'embeddings':![],'engines':![],'fts':!![],'timeMachine':![],'views':!![],'mcp':!![],'files':!![]},'limits':{'envs':0x2,'typesPerEnv':0xa,'syncPeers':0x0,'maxWrites':0xf4240},'_isFree':!![]};async function _0x12a87b(_0x55f1ae){const _0x34e5b3=_0x8bdc59;!_0x55f1ae[_0x34e5b3(0x3e2)](_0x28b5d2)&&await _0x55f1ae['registerType'](_0x28b5d2);}class _0x4dbd00{constructor(_0x5a61c7){this['okdb']=_0x5a61c7,this['_active']=null;}async[_0x8bdc59(0x3af)](){const _0x17e3c6=_0x8bdc59,_0x24be22=this['okdb'][_0x17e3c6(0x2ca)];if(!_0x24be22||!_0x24be22[_0x17e3c6(0x3e2)](_0x28b5d2)){this['_active']=null;return;}const _0x5bac3d=this[_0x17e3c6(0x27c)]['id'];let _0x43317f=null;for(const {key:_0x21d776,value:_0x1bb29c}of _0x24be22[_0x17e3c6(0x310)](_0x28b5d2)){const _0x12964a=this[_0x17e3c6(0x1ae)](_0x1bb29c,_0x5bac3d);_0x12964a==='active'&&!_0x43317f&&(_0x43317f={..._0x1bb29c,'id':_0x21d776,'status':_0x12964a});}this[_0x17e3c6(0x333)]=_0x43317f;if(this[_0x17e3c6(0x333)]&&this[_0x17e3c6(0x333)][_0x17e3c6(0x2d7)]===_0x2f99ca){const _0x307fde=Math['ceil']((this['_active'][_0x17e3c6(0x2fe)]-Date[_0x17e3c6(0x471)]())/0x5265c00);this[_0x17e3c6(0x27c)][_0x17e3c6(0x3cf)]?.['warn'](_0x17e3c6(0x289)+_0x307fde+_0x17e3c6(0x441),{'feature':'license','licensee':this[_0x17e3c6(0x333)][_0x17e3c6(0x2e2)],'expiresAt':new Date(this[_0x17e3c6(0x333)]['expiresAt'])[_0x17e3c6(0x45b)]()});}this[_0x17e3c6(0x333)]&&this[_0x17e3c6(0x333)][_0x17e3c6(0x2d7)]===_0x49f0b1&&this[_0x17e3c6(0x27c)][_0x17e3c6(0x3cf)]?.[_0x17e3c6(0x2c4)](_0x17e3c6(0x352),{'feature':_0x17e3c6(0x313),'licensee':this[_0x17e3c6(0x333)]['licensee']});}[_0x8bdc59(0x1ae)](_0x4b737b,_0x2349e3){const _0x3f8208=_0x8bdc59;if(!_0x4b737b[_0x3f8208(0x37b)])return _0x3f8208(0x1dc);let _0x45d8f2;try{_0x45d8f2=_0x4d7125['decodeLicenseBlob'](_0x4b737b[_0x3f8208(0x37b)]);}catch(_0x317782){return _0x3f8208(0x1dc);}try{const _0x37f494=_0xbf19a2['verify'](null,_0x45d8f2[_0x3f8208(0x413)],_0x266b6f[_0x3f8208(0x205)],_0x45d8f2[_0x3f8208(0x1a6)]);if(!_0x37f494)return _0x3f8208(0x1dc);}catch(_0x385509){return _0x3f8208(0x1dc);}if(_0x45d8f2['decoded'][_0x3f8208(0x2d7)]===_0x49f0b1)return _0x3f8208(0x3a1);if(_0x45d8f2[_0x3f8208(0x29f)]['expiresAt']<=Date[_0x3f8208(0x471)]())return _0x3f8208(0x490);if(_0x45d8f2[_0x3f8208(0x29f)][_0x3f8208(0x2d7)]===_0x2f99ca)return _0x3f8208(0x3a1);if(!_0x4b737b[_0x3f8208(0x386)])return _0x3f8208(0x34c);const _0x21829a=_0x4d7125[_0x3f8208(0x201)]({'tokenString':_0x4b737b[_0x3f8208(0x386)],'nodeId':_0x2349e3,'rawBlobBuf':_0x45d8f2[_0x3f8208(0x469)],'pubKeyPem':_0x266b6f[_0x3f8208(0x205)],'pubFingerprint':_0x266b6f['PUB_FINGERPRINT']});if(_0x21829a[_0x3f8208(0x3d8)]===_0x3f8208(0x1fb)||_0x21829a['reason']===_0x3f8208(0x41c))return'wrong_node';if(_0x21829a[_0x3f8208(0x3d8)]==='ACTIVATION_EXPIRED')return _0x3f8208(0x490);if(!_0x21829a[_0x3f8208(0x223)])return'wrong_node';return _0x3f8208(0x3a1);}get[_0x8bdc59(0x3a1)](){const _0x33f649=_0x8bdc59;return this[_0x33f649(0x333)];}get[_0x8bdc59(0x357)](){const _0x688d36=_0x8bdc59;return this[_0x688d36(0x333)]??_0x5ac037;}[_0x8bdc59(0x1b4)](_0x4dbcce){const _0x483049=_0x8bdc59;if(_0x266b6f['LICENSED_BUILD']!==_0x483049(0x43c))return;const _0x20d01d=this[_0x483049(0x357)];if(!_0x20d01d[_0x483049(0x3f9)]?.[_0x4dbcce]){const _0x5a371a=_0x20d01d[_0x483049(0x249)]?_0x483049(0x23c)+_0x4dbcce+_0x483049(0x2d1)+_0x4dbcce+_0x483049(0x27e):_0x483049(0x3f5)+_0x4dbcce+_0x483049(0x24b)+_0x4dbcce+'\x22.';throw new _0x819f3b(_0x5a371a,_0x483049(0x1f6),{'feature':_0x4dbcce});}}['isFeatureEnabled'](_0x41a9d8){const _0x1133ab=_0x8bdc59;if(_0x266b6f[_0x1133ab(0x2e0)]!==_0x1133ab(0x43c))return!![];return!!this[_0x1133ab(0x357)][_0x1133ab(0x3f9)]?.[_0x41a9d8];}[_0x8bdc59(0x487)](_0x1d3c94,_0x3010f6){const _0x34d309=_0x8bdc59;if(_0x266b6f[_0x34d309(0x2e0)]!==_0x34d309(0x43c))return;const _0x1b7439=this['effective'],_0x251366=_0x1b7439['limits']?.[_0x1d3c94];if(_0x251366===null||_0x251366===undefined||_0x251366===0x0)return;if(_0x3010f6>=_0x251366)throw new _0x819f3b(_0x34d309(0x414)+_0x1d3c94+'\x20('+_0x3010f6+'/'+_0x251366+')',_0x34d309(0x22b),{'limit':_0x1d3c94,'current':_0x3010f6,'max':_0x251366});}async[_0x8bdc59(0x3f4)](_0x1f71d7){const _0x44a53c=_0x8bdc59;let _0x59e1d9;try{_0x59e1d9=_0x4d7125[_0x44a53c(0x425)](_0x1f71d7);}catch(_0x2e074e){throw new _0x819f3b('Invalid\x20license\x20blob:\x20'+_0x2e074e[_0x44a53c(0x1bc)],_0x44a53c(0x409));}let _0x122c2d;try{_0x122c2d=_0xbf19a2[_0x44a53c(0x2b1)](null,_0x59e1d9[_0x44a53c(0x413)],_0x266b6f[_0x44a53c(0x205)],_0x59e1d9[_0x44a53c(0x1a6)]);}catch(_0x295eec){throw new _0x819f3b(_0x44a53c(0x1fd)+_0x295eec[_0x44a53c(0x1bc)],_0x44a53c(0x409));}if(!_0x122c2d)throw new _0x819f3b(_0x44a53c(0x1b6)+('Build\x20expects\x20public\x20key\x20fingerprint\x20'+_0x266b6f['PUB_FINGERPRINT']+'.\x20')+_0x44a53c(0x2d5),_0x44a53c(0x409),{'expectedFingerprint':_0x266b6f['PUB_FINGERPRINT']});if(_0x59e1d9[_0x44a53c(0x29f)]['licenseType']===_0x2f99ca){const _0x5b5896=_0x59e1d9['decoded'][_0x44a53c(0x2fe)]-_0x59e1d9[_0x44a53c(0x29f)][_0x44a53c(0x286)];if(_0x5b5896>_0x34aa01)throw new _0x819f3b('Open\x20licenses\x20cannot\x20exceed\x206\x20months\x20duration\x20(this\x20license\x20expires\x20'+Math[_0x44a53c(0x3a7)](_0x5b5896/(0x1e*0x5265c00))+_0x44a53c(0x36f),_0x44a53c(0x409));}const _0x2570a7=this[_0x44a53c(0x27c)][_0x44a53c(0x2ca)];await _0x12a87b(_0x2570a7);const _0x6e7e7b=_0x4d7125['licenseHash'](_0x59e1d9[_0x44a53c(0x469)])['toString'](_0x44a53c(0x27d));for(const {value:_0x5c487b}of _0x2570a7[_0x44a53c(0x310)](_0x28b5d2)){if(_0x5c487b[_0x44a53c(0x445)]===_0x6e7e7b)throw new _0x819f3b(_0x44a53c(0x31f),_0x44a53c(0x409));}const _0x3376d5=_0xbf19a2[_0x44a53c(0x269)](),_0x42d241={'blob':_0x1f71d7,'activation':null,'addedAt':Date[_0x44a53c(0x471)](),'_licenseHash':_0x6e7e7b,'licensee':_0x59e1d9[_0x44a53c(0x29f)][_0x44a53c(0x2e2)],'expiresAt':_0x59e1d9['decoded'][_0x44a53c(0x2fe)],'features':_0x59e1d9[_0x44a53c(0x29f)][_0x44a53c(0x3f9)],'limits':_0x59e1d9['decoded'][_0x44a53c(0x3b8)],'licenseType':_0x59e1d9[_0x44a53c(0x29f)]['licenseType']};return await _0x2570a7[_0x44a53c(0x22d)](_0x28b5d2,_0x3376d5,_0x42d241),{'id':_0x3376d5,..._0x42d241};}async['activateLicense'](_0x4d068f){const _0x545fd0=_0x8bdc59;let _0x256543;try{_0x256543=_0x4d7125[_0x545fd0(0x20f)](_0x4d068f);}catch(_0x5cc30e){throw new _0x819f3b(_0x545fd0(0x1ce)+_0x5cc30e['message'],_0x545fd0(0x2a1));}const _0x2c0cb9=_0x256543['licenseHash'][_0x545fd0(0x454)]('hex'),_0x424cc4=this[_0x545fd0(0x27c)]['_systemEnv'];if(!_0x424cc4||!_0x424cc4[_0x545fd0(0x3e2)](_0x28b5d2))throw new _0x819f3b('No\x20license\x20found\x20matching\x20this\x20activation\x20token',_0x545fd0(0x2a1));let _0x3f1fac=null,_0x1a4f89=null;for(const {key:_0x4094e1,value:_0x45bd3d}of _0x424cc4['getRange'](_0x28b5d2)){if(_0x45bd3d[_0x545fd0(0x445)]===_0x2c0cb9){_0x3f1fac=_0x4094e1,_0x1a4f89=_0x45bd3d;break;}}if(!_0x3f1fac)throw new _0x819f3b('No\x20license\x20found\x20matching\x20this\x20activation\x20token',_0x545fd0(0x2a1));const {rawBuf:_0x1bc35b}=_0x4d7125[_0x545fd0(0x425)](_0x1a4f89[_0x545fd0(0x37b)]),_0x3ca3c0=_0x4d7125[_0x545fd0(0x201)]({'tokenString':_0x4d068f,'nodeId':this['okdb']['id'],'rawBlobBuf':_0x1bc35b,'pubKeyPem':_0x266b6f[_0x545fd0(0x205)],'pubFingerprint':_0x266b6f['PUB_FINGERPRINT']});if(!_0x3ca3c0[_0x545fd0(0x223)])throw new _0x819f3b(_0x545fd0(0x2c5)+_0x3ca3c0['reason'],_0x545fd0(0x2a1),{'reason':_0x3ca3c0['reason']});const _0x403c40={..._0x1a4f89,'activation':_0x4d068f};return await _0x424cc4['update'](_0x28b5d2,_0x3f1fac,_0x403c40),{'id':_0x3f1fac,..._0x403c40};}async[_0x8bdc59(0x39a)](_0x32839a){const _0x2241dd=_0x8bdc59,_0x2c72a6=this[_0x2241dd(0x27c)][_0x2241dd(0x2ca)];if(!_0x2c72a6||!_0x2c72a6[_0x2241dd(0x3e2)](_0x28b5d2))return;await _0x2c72a6[_0x2241dd(0x2fc)](_0x28b5d2,_0x32839a);}async[_0x8bdc59(0x1cc)](){const _0x4f1a7f=_0x8bdc59,_0xd5805c=this[_0x4f1a7f(0x27c)][_0x4f1a7f(0x2ca)];if(!_0xd5805c||!_0xd5805c[_0x4f1a7f(0x3e2)](_0x28b5d2))return[];const _0x20f215=this[_0x4f1a7f(0x27c)]['id'],_0x3107d8=[];for(const {key:_0x13d457,value:_0x288066}of _0xd5805c[_0x4f1a7f(0x310)](_0x28b5d2)){const _0x5d7ce1=this[_0x4f1a7f(0x1ae)](_0x288066,_0x20f215);_0x3107d8[_0x4f1a7f(0x44e)]({..._0x288066,'id':_0x13d457,'status':_0x5d7ce1});}return _0x3107d8;}[_0x8bdc59(0x244)](){const _0x41ea2a=_0x8bdc59,_0x1d9c44=this[_0x41ea2a(0x27c)][_0x41ea2a(0x2ca)];if(!_0x1d9c44||!_0x1d9c44[_0x41ea2a(0x3e2)](_0x28b5d2))return[];const _0x5c80b8=this[_0x41ea2a(0x27c)]['id'],_0xf40443=[];for(const {key:_0x33fe12,value:_0x2545b3}of _0x1d9c44[_0x41ea2a(0x310)](_0x28b5d2)){if(_0x2545b3['_licenseHash']){if(_0x2545b3['licenseType']===_0x2f99ca)_0xf40443[_0x41ea2a(0x44e)]({'licenseId':_0x33fe12,'pin':null});else{const _0x50ccee=Buffer[_0x41ea2a(0x285)](_0x2545b3[_0x41ea2a(0x445)],_0x41ea2a(0x27d)),{pin:_0xd0254f}=_0x4d7125[_0x41ea2a(0x2fb)](_0x5c80b8,_0x50ccee,_0x266b6f[_0x41ea2a(0x221)]);_0xf40443[_0x41ea2a(0x44e)]({'licenseId':_0x33fe12,'pin':_0xd0254f});}}}return _0xf40443;}async['recheck'](){const _0x1e0ada=_0x8bdc59,_0x28d800=this[_0x1e0ada(0x333)];await this[_0x1e0ada(0x3af)]();if(this['_active']&&this[_0x1e0ada(0x333)]['licenseType']===_0x2f99ca){const _0x432cae=Math[_0x1e0ada(0x3a7)]((this['_active'][_0x1e0ada(0x2fe)]-Date['now']())/0x5265c00);this[_0x1e0ada(0x27c)][_0x1e0ada(0x3cf)]?.[_0x1e0ada(0x2c4)](_0x1e0ada(0x289)+_0x432cae+_0x1e0ada(0x441),{'feature':_0x1e0ada(0x313),'licensee':this[_0x1e0ada(0x333)][_0x1e0ada(0x2e2)],'expiresAt':new Date(this['_active'][_0x1e0ada(0x2fe)])[_0x1e0ada(0x45b)]()});}this[_0x1e0ada(0x333)]&&this[_0x1e0ada(0x333)][_0x1e0ada(0x2d7)]===_0x49f0b1&&this[_0x1e0ada(0x27c)]['log']?.[_0x1e0ada(0x2c4)](_0x1e0ada(0x352),{'feature':_0x1e0ada(0x313),'licensee':this[_0x1e0ada(0x333)][_0x1e0ada(0x2e2)]});if(_0x28d800&&!this[_0x1e0ada(0x333)]){this[_0x1e0ada(0x27c)][_0x1e0ada(0x3cf)]?.[_0x1e0ada(0x2c4)]('License\x20expired\x20or\x20invalidated',{'feature':_0x1e0ada(0x313)}),this[_0x1e0ada(0x27c)][_0x1e0ada(0x466)]?.[_0x1e0ada(0x1f5)](_0xddd4f6[_0x1e0ada(0x409)],{'previous':_0x28d800});const _0x3e4613=this[_0x1e0ada(0x27c)]['options']?.[_0x1e0ada(0x37c)]??_0x266b6f[_0x1e0ada(0x475)];_0x3e4613===_0x1e0ada(0x213)&&(this['okdb'][_0x1e0ada(0x3cf)]?.[_0x1e0ada(0x311)](_0x1e0ada(0x39c),{'feature':_0x1e0ada(0x313)}),this[_0x1e0ada(0x27c)][_0x1e0ada(0x3ab)]()['catch'](()=>{})[_0x1e0ada(0x44a)](()=>process[_0x1e0ada(0x2dd)](0x1)));}}}return okdbLicense={'LicenseChecker':_0x4dbd00,'_C':_0x266b6f},okdbLicense;}var okdbShell,hasRequiredOkdbShell;function requireOkdbShell(){const _0x2d9d5f=_0x26eb70;if(hasRequiredOkdbShell)return okdbShell;hasRequiredOkdbShell=0x1;const _0x157380=require$$0$2,_0x479590=require$$1,_0xc17fe8=require$$2$1,_0x705193=require$$1$1,_0x24ee4e=_0x705193[_0x2d9d5f(0x1ac)](_0xc17fe8[_0x2d9d5f(0x2b7)](),'.kdb_history'),_0x56b129=0x3e8,_0x13acb1={'reset':_0x2d9d5f(0x28b),'bold':_0x2d9d5f(0x274),'dim':_0x2d9d5f(0x2bf),'red':'\x1b[31m','green':_0x2d9d5f(0x309),'yellow':'\x1b[33m','blue':'\x1b[34m','magenta':_0x2d9d5f(0x3bf),'cyan':_0x2d9d5f(0x1d8),'white':'\x1b[37m','gray':'\x1b[90m'},_0x57735f=!process[_0x2d9d5f(0x3e1)][_0x2d9d5f(0x2c2)]||!!process.env.NO_COLOR,_0x5da8ff=(_0xd9ba69,_0x29ef03)=>_0x57735f?_0x29ef03:''+_0xd9ba69+_0x29ef03+_0x13acb1['reset'],_0x2ef36d={'error':_0x13acb1[_0x2d9d5f(0x281)],'warn':_0x13acb1[_0x2d9d5f(0x1e8)],'info':_0x13acb1[_0x2d9d5f(0x46a)],'debug':_0x13acb1[_0x2d9d5f(0x3dd)]},_0x352ee6={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3};function _0xbbb0ff(_0x17bb44,_0x924935=_0x2d9d5f(0x440)){const _0xbc9dc5=_0x2d9d5f,{level:_0x27fe40,msg:_0xa7a7d5,meta:_0x597b41,context:_0x10186f,ts:_0x579531}=_0x17bb44;if((_0x352ee6[_0x27fe40]??0x1)<(_0x352ee6[_0x924935]??0x1))return;const _0x10a711=_0x5da8ff(_0x13acb1[_0xbc9dc5(0x3dd)],new Date(_0x579531)[_0xbc9dc5(0x45b)]()),_0x16b1f6=_0x5da8ff(_0x2ef36d[_0x27fe40]??_0x13acb1['white'],_0x27fe40['padEnd'](0x5));let _0x3f0355='\x20\x20'+_0x10a711+'\x20'+_0x5da8ff(_0x13acb1[_0xbc9dc5(0x424)],_0x16b1f6)+'\x20'+_0xa7a7d5;if(_0x597b41&&Object[_0xbc9dc5(0x2f6)](_0x597b41)[_0xbc9dc5(0x256)]>0x0){const _0x5ae70=Object[_0xbc9dc5(0x380)](_0x597b41)['map'](([_0x2eb98f,_0x2835fc])=>_0x2eb98f+'='+_0x2835fc)[_0xbc9dc5(0x1ac)]('\x20');_0x3f0355+=_0x5da8ff(_0x13acb1['dim'],'\x20\x20['+_0x5ae70+']');}if(_0x10186f!==undefined){const _0x35c3a8=typeof _0x10186f===_0xbc9dc5(0x3c1)?JSON[_0xbc9dc5(0x3a9)](_0x10186f):String(_0x10186f);_0x3f0355+=_0x5da8ff(_0x13acb1[_0xbc9dc5(0x1cd)],'\x20\x20'+_0x35c3a8);}const _0x3d979d=_0x27fe40===_0xbc9dc5(0x311)||_0x27fe40===_0xbc9dc5(0x2c4)?process[_0xbc9dc5(0x324)][_0xbc9dc5(0x23d)][_0xbc9dc5(0x33a)](process['stderr']):process[_0xbc9dc5(0x3e1)][_0xbc9dc5(0x23d)][_0xbc9dc5(0x33a)](process[_0xbc9dc5(0x3e1)]);_0x3d979d(_0x3f0355+'\x0a');}function _0x12eb10(_0x3c4fef,_0x46ad41){const _0x5f0ebf=_0x2d9d5f;if(_0x3c4fef===0xcc||_0x3c4fef>=0xc8&&_0x3c4fef<0x12c&&!_0x46ad41){console[_0x5f0ebf(0x3cf)](_0x5f0ebf(0x3e5)+_0x5da8ff(_0x13acb1['green'],'✓')+'\x0a');return;}if(_0x3c4fef>=0x190||_0x46ad41?.[_0x5f0ebf(0x311)]){const _0x47dc73=_0x46ad41?.['error']??_0x46ad41?.[_0x5f0ebf(0x1bc)]??_0x5f0ebf(0x194)+_0x3c4fef;console[_0x5f0ebf(0x3cf)](_0x5f0ebf(0x3e5)+_0x5da8ff(_0x13acb1['red'],'✗')+'\x20'+_0x5da8ff(_0x13acb1[_0x5f0ebf(0x424)]+_0x13acb1['red'],String(_0x3c4fef))+'\x20\x20'+_0x47dc73+'\x0a');return;}const _0x11fcec=Object[_0x5f0ebf(0x43b)]['hasOwnProperty'][_0x5f0ebf(0x230)](_0x46ad41??{},_0x5f0ebf(0x2cc))?_0x46ad41['result']:_0x46ad41,_0x1ce031=_0x46ad41?.[_0x5f0ebf(0x1a5)];console[_0x5f0ebf(0x3cf)](''),_0x84e22c(_0x11fcec,'\x20\x20');if(_0x1ce031?.[_0x5f0ebf(0x452)]!=null||_0x1ce031?.[_0x5f0ebf(0x202)]!=null){const _0x53f69e=[];if(_0x1ce031[_0x5f0ebf(0x452)]!=null)_0x53f69e[_0x5f0ebf(0x44e)](_0x1ce031[_0x5f0ebf(0x452)]+_0x5f0ebf(0x40c)+(_0x1ce031[_0x5f0ebf(0x452)]!==0x1?'s':''));if(_0x1ce031[_0x5f0ebf(0x202)]!=null)_0x53f69e[_0x5f0ebf(0x44e)](_0x1ce031['time']+'ms');console[_0x5f0ebf(0x3cf)](_0x5f0ebf(0x3e5)+_0x5da8ff(_0x13acb1['dim'],_0x53f69e[_0x5f0ebf(0x1ac)]('\x20\x20·\x20\x20')));}console[_0x5f0ebf(0x3cf)]('');}function _0x84e22c(_0x4d86ac,_0x2639e6=''){const _0x2a6bc4=_0x2d9d5f;if(_0x4d86ac===null||_0x4d86ac===undefined){console[_0x2a6bc4(0x3cf)](_0x2639e6+_0x5da8ff(_0x13acb1[_0x2a6bc4(0x1cd)],_0x2a6bc4(0x220)));return;}if(Array[_0x2a6bc4(0x23e)](_0x4d86ac)){if(_0x4d86ac[_0x2a6bc4(0x256)]===0x0){console['log'](_0x2639e6+_0x5da8ff(_0x13acb1[_0x2a6bc4(0x1cd)],'(empty)'));return;}if(_0x4d86ac[_0x2a6bc4(0x2e1)](_0x54e401=>_0x54e401&&typeof _0x54e401===_0x2a6bc4(0x3c1)&&'key'in _0x54e401&&_0x2a6bc4(0x496)in _0x54e401)){_0x24aeea(_0x4d86ac,_0x2639e6);return;}if(_0x4d86ac['every'](_0x4e1abc=>_0x4e1abc&&typeof _0x4e1abc===_0x2a6bc4(0x3c1)&&'type'in _0x4e1abc&&_0x2a6bc4(0x452)in _0x4e1abc)){_0x3f5a2a(_0x4d86ac,_0x2639e6);return;}if(_0x4d86ac[_0x2a6bc4(0x2e1)](_0x5aa24b=>typeof _0x5aa24b!==_0x2a6bc4(0x3c1)||_0x5aa24b===null)){_0x4d86ac[_0x2a6bc4(0x427)]((_0x50560f,_0x713488)=>console[_0x2a6bc4(0x3cf)](_0x2639e6+_0x5da8ff(_0x13acb1['gray'],_0x713488+0x1+'.')+'\x20'+_0x5da8ff(_0x13acb1[_0x2a6bc4(0x19a)],String(_0x50560f))));return;}_0x4d86ac[_0x2a6bc4(0x427)]((_0x20c846,_0x16f0ed)=>{const _0x21993b=_0x2a6bc4;console[_0x21993b(0x3cf)](_0x2639e6+_0x5da8ff(_0x13acb1['dim'],'['+_0x16f0ed+']'));if(typeof _0x20c846==='object'&&_0x20c846!==null)_0x53bae4(_0x20c846,_0x2639e6+'\x20\x20');else console[_0x21993b(0x3cf)](_0x2639e6+'\x20\x20'+String(_0x20c846));});return;}if(typeof _0x4d86ac===_0x2a6bc4(0x3c1)){if(_0x2a6bc4(0x3ac)in _0x4d86ac&&'value'in _0x4d86ac&&Object['keys'](_0x4d86ac)[_0x2a6bc4(0x256)]<=0x3){console[_0x2a6bc4(0x3cf)](_0x2639e6+_0x5da8ff(_0x13acb1[_0x2a6bc4(0x424)]+_0x13acb1['cyan'],String(_0x4d86ac[_0x2a6bc4(0x3ac)])));const _0x46365e=_0x4d86ac[_0x2a6bc4(0x496)];if(_0x46365e&&typeof _0x46365e==='object')_0x53bae4(_0x46365e,_0x2639e6);else console[_0x2a6bc4(0x3cf)](_0x2639e6+_0x5da8ff(_0x13acb1[_0x2a6bc4(0x19a)],String(_0x46365e)));return;}_0x53bae4(_0x4d86ac,_0x2639e6);return;}console[_0x2a6bc4(0x3cf)](_0x2639e6+_0x5da8ff(_0x13acb1['white'],String(_0x4d86ac)));}function _0x53bae4(_0x1c4f28,_0x3f8723=''){const _0x30de33=_0x2d9d5f,_0x5721e6=Object[_0x30de33(0x380)](_0x1c4f28);if(_0x5721e6[_0x30de33(0x256)]===0x0){console[_0x30de33(0x3cf)](_0x3f8723+_0x5da8ff(_0x13acb1[_0x30de33(0x1cd)],'{}'));return;}const _0x1edb38=Math[_0x30de33(0x2d6)](0x1c,Math[_0x30de33(0x371)](..._0x5721e6[_0x30de33(0x449)](([_0x578605])=>_0x578605[_0x30de33(0x256)])));for(const [_0x3235f5,_0x518cd0]of _0x5721e6){const _0x318862=_0x5da8ff(_0x13acb1[_0x30de33(0x46a)],_0x3235f5[_0x30de33(0x39e)](_0x1edb38));if(_0x518cd0===null||_0x518cd0===undefined)console[_0x30de33(0x3cf)](_0x3f8723+_0x318862+'\x20\x20'+_0x5da8ff(_0x13acb1[_0x30de33(0x1cd)],_0x30de33(0x2f5)));else{if(typeof _0x518cd0===_0x30de33(0x3c1)){const _0x104177=JSON[_0x30de33(0x3a9)](_0x518cd0);_0x104177[_0x30de33(0x256)]<=0x50?console['log'](_0x3f8723+_0x318862+'\x20\x20'+_0x5da8ff(_0x13acb1[_0x30de33(0x1cd)],_0x104177)):(console[_0x30de33(0x3cf)](_0x3f8723+_0x318862),_0x84e22c(_0x518cd0,_0x3f8723+'\x20\x20'));}else{const _0x557d6c=typeof _0x518cd0===_0x30de33(0x376)?_0x5da8ff(_0x518cd0?_0x13acb1[_0x30de33(0x20e)]:_0x13acb1[_0x30de33(0x1e8)],String(_0x518cd0)):typeof _0x518cd0===_0x30de33(0x1ec)?_0x5da8ff(_0x13acb1['magenta'],String(_0x518cd0)):_0x5da8ff(_0x13acb1[_0x30de33(0x19a)],String(_0x518cd0));console[_0x30de33(0x3cf)](_0x3f8723+_0x318862+'\x20\x20'+_0x557d6c);}}}}function _0x24aeea(_0x1c785c,_0x2aaf5f=''){const _0x21f013=_0x2d9d5f,_0xf9e2aa=Math[_0x21f013(0x2d6)](0x20,Math[_0x21f013(0x371)](..._0x1c785c['map'](_0x38b28d=>String(_0x38b28d['key'])[_0x21f013(0x256)])));for(const {key:_0x4f9f39,value:_0x5a03fd,score:_0x7f994e,clock:_0x5d8425}of _0x1c785c){const _0x3dfcd3=_0x5da8ff(_0x13acb1[_0x21f013(0x424)]+_0x13acb1[_0x21f013(0x46a)],String(_0x4f9f39)[_0x21f013(0x39e)](_0xf9e2aa)),_0x5d2d18=_0x5a03fd==null?_0x5da8ff(_0x13acb1[_0x21f013(0x1cd)],'null'):typeof _0x5a03fd===_0x21f013(0x3c1)?_0x5da8ff(_0x13acb1[_0x21f013(0x1cd)],JSON[_0x21f013(0x3a9)](_0x5a03fd)):_0x5da8ff(_0x13acb1['white'],String(_0x5a03fd)),_0x5652d3=_0x7f994e!=null?_0x5da8ff(_0x13acb1[_0x21f013(0x3dd)],_0x21f013(0x1d9)+_0x7f994e['toFixed'](0x4)):'',_0x444910=_0x5d8425!=null?_0x5da8ff(_0x13acb1[_0x21f013(0x3dd)],_0x21f013(0x1c2)+_0x5d8425):'';console['log'](_0x2aaf5f+_0x3dfcd3+'\x20\x20'+_0x5d2d18+_0x5652d3+_0x444910);}}function _0x3f5a2a(_0x1b0dfc,_0xc6c619=''){const _0xbc8b11=_0x2d9d5f,_0x3c501f=Math[_0xbc8b11(0x2d6)](0x20,Math[_0xbc8b11(0x371)](..._0x1b0dfc['map'](_0x579ed5=>_0x579ed5['type'][_0xbc8b11(0x256)])));for(const {type:_0x6940ee,count:_0xe2e7c4,fields:_0x1cb872}of _0x1b0dfc){if(_0x6940ee[_0xbc8b11(0x21d)]('~'))continue;const _0x3ba6a3=_0x5da8ff(_0x13acb1['bold']+_0x13acb1['cyan'],_0x6940ee[_0xbc8b11(0x39e)](_0x3c501f)),_0x14d98c=_0x5da8ff(_0x13acb1[_0xbc8b11(0x304)],String(_0xe2e7c4)['padStart'](0x6))+_0x5da8ff(_0x13acb1['dim'],_0xbc8b11(0x446)),_0xd77fd0=_0x1cb872&&Object[_0xbc8b11(0x2f6)](_0x1cb872)[_0xbc8b11(0x256)]?_0x5da8ff(_0x13acb1[_0xbc8b11(0x1cd)],_0xbc8b11(0x1cb)+Object['keys'](_0x1cb872)[_0xbc8b11(0x36a)](0x0,0x6)['join'](',\x20')+(Object[_0xbc8b11(0x2f6)](_0x1cb872)['length']>0x6?'…':'')):'';console[_0xbc8b11(0x3cf)](_0xc6c619+_0x3ba6a3+'\x20\x20'+_0x14d98c+_0xd77fd0);}}const _0x12be11=[_0x2d9d5f(0x323),'type/','queue/',_0x2d9d5f(0x45a),_0x2d9d5f(0x46e),_0x2d9d5f(0x1d2)];function _0x335c0f(_0x3b772d,_0x1ff03e){const _0x1ee974=_0x2d9d5f;if(_0x3b772d[_0x1ee974(0x21d)](_0x1ee974(0x32c)))return _0x3b772d;if(_0x3b772d[_0x1ee974(0x21d)]('/'))return'/api'+_0x3b772d;if(_0x3b772d[_0x1ee974(0x21d)]('env/'))return'/api/'+_0x3b772d;const _0x2af07e=_0x12be11[_0x1ee974(0x1e2)](_0x4a9c38=>_0x3b772d===_0x4a9c38['replace'](/\/$/,'')||_0x3b772d['startsWith'](_0x4a9c38));return _0x2af07e?'/api/env/'+_0x1ff03e+'/'+_0x3b772d:_0x1ee974(0x32c)+_0x3b772d;}function _0x5de739(_0x1a16da){const _0x15b40a=_0x2d9d5f,_0x201c2b={},_0x4025ff=[];let _0x5cbcd4=0x0;while(_0x5cbcd4<_0x1a16da[_0x15b40a(0x256)]){if((_0x1a16da[_0x5cbcd4]===_0x15b40a(0x3c2)||_0x1a16da[_0x5cbcd4]==='-e')&&_0x1a16da[_0x5cbcd4+0x1]&&!_0x1a16da[_0x5cbcd4+0x1][_0x15b40a(0x21d)]('-'))_0x201c2b[_0x15b40a(0x1be)]=_0x1a16da[++_0x5cbcd4];else _0x1a16da[_0x5cbcd4]===_0x15b40a(0x3b9)||_0x1a16da[_0x5cbcd4]==='-h'?_0x201c2b[_0x15b40a(0x1a8)]=!![]:_0x4025ff[_0x15b40a(0x44e)](_0x1a16da[_0x5cbcd4]);_0x5cbcd4++;}return{'flags':_0x201c2b,'rest':_0x4025ff};}const _0x5998d1={'system':_0x2d9d5f(0x359),'envs':_0x2d9d5f(0x41f),'types':_0x2d9d5f(0x46d),'data':_0x2d9d5f(0x462),'indexes':_0x2d9d5f(0x412),'fts':_0x2d9d5f(0x33b),'sync':_0x2d9d5f(0x2de),'queue':_0x2d9d5f(0x1c3),'files':_0x2d9d5f(0x2f3),'embeddings':_0x2d9d5f(0x2fa),'engines':'Engines','admin':_0x2d9d5f(0x3c7),'event':_0x2d9d5f(0x34e),'processor':'Processors'},_0x1cc1c1=[_0x2d9d5f(0x1f3),_0x2d9d5f(0x1d3),_0x2d9d5f(0x323),'data',_0x2d9d5f(0x2c6),_0x2d9d5f(0x36e),_0x2d9d5f(0x403),_0x2d9d5f(0x1d1),_0x2d9d5f(0x48a),_0x2d9d5f(0x436),_0x2d9d5f(0x385),_0x2d9d5f(0x474)];function _0x48cabf(_0x85a6c4){const _0x28bd7e=_0x2d9d5f;return _0x85a6c4[_0x28bd7e(0x43d)](/^\/api/,'')['replace'](/^\[\/env\/:env=[^\]]*\]/,_0x28bd7e(0x204))[_0x28bd7e(0x43d)](/^\/env\/:env/,_0x28bd7e(0x1b7))[_0x28bd7e(0x43d)](/^\//,'');}function _0x453295(_0x4f3b2a,_0x3bdb0e=''){const _0x258381=_0x2d9d5f,_0x3337a5=_0x4f3b2a['http']['listRoutes']()[_0x258381(0x1a2)](_0x4adff9=>!_0x4adff9[_0x258381(0x1a5)]?.[_0x258381(0x364)]),_0x56e2fb=_0x3bdb0e?_0x3337a5[_0x258381(0x1a2)](_0x332ddd=>_0x332ddd['path']['toLowerCase']()['includes'](_0x3bdb0e['toLowerCase']())||(_0xdb2c8d(_0x332ddd)??'')[_0x258381(0x35b)]()['includes'](_0x3bdb0e['toLowerCase']())||_0x554546(_0x332ddd)['some'](_0xe3b382=>_0xe3b382[_0x258381(0x35b)]()[_0x258381(0x3a6)](_0x3bdb0e['toLowerCase']()))):_0x3337a5;if(!_0x56e2fb[_0x258381(0x256)]){console[_0x258381(0x3cf)](_0x5da8ff(_0x13acb1['yellow'],_0x258381(0x2ed)+_0x3bdb0e+'\x22\x0a'));return;}const _0x2766c4=new Map();for(const _0x385f0c of _0x56e2fb){const _0x1bc544=_0x554546(_0x385f0c)[0x0]??_0x258381(0x32f);if(!_0x2766c4[_0x258381(0x2d3)](_0x1bc544))_0x2766c4[_0x258381(0x315)](_0x1bc544,[]);_0x2766c4[_0x258381(0x29e)](_0x1bc544)[_0x258381(0x44e)](_0x385f0c);}const _0x5329ee=[..._0x1cc1c1[_0x258381(0x1a2)](_0x19aec2=>_0x2766c4[_0x258381(0x2d3)](_0x19aec2)),...[..._0x2766c4[_0x258381(0x2f6)]()][_0x258381(0x1a2)](_0x400f59=>!_0x1cc1c1['includes'](_0x400f59))];console[_0x258381(0x3cf)]('');for(const _0xa4d84c of _0x5329ee){const _0x957e1f=_0x2766c4[_0x258381(0x29e)](_0xa4d84c);if(!_0x957e1f?.[_0x258381(0x256)])continue;console['log'](_0x5da8ff(_0x13acb1[_0x258381(0x424)],'\x20\x20'+(_0x5998d1[_0xa4d84c]??_0xa4d84c)));for(const _0x3ecb7c of _0x957e1f){const _0x55c000=_0x5da8ff(_0x13acb1['magenta'],_0x3ecb7c[_0x258381(0x393)][_0x258381(0x39e)](0x7)),_0x532f3e=_0x5da8ff(_0x13acb1[_0x258381(0x46a)],_0x48cabf(_0x3ecb7c['path'])),_0x279ed8=_0xdb2c8d(_0x3ecb7c)?_0x5da8ff(_0x13acb1[_0x258381(0x1cd)],'\x20\x20'+_0xdb2c8d(_0x3ecb7c)):'',_0x3f5841=_0x3ecb7c[_0x258381(0x429)]?.['id']?_0x5da8ff(_0x13acb1[_0x258381(0x3dd)],_0x258381(0x284)+_0x3ecb7c[_0x258381(0x429)]['id']+']'):'';console[_0x258381(0x3cf)]('\x20\x20\x20\x20'+_0x55c000+'\x20'+_0x532f3e+_0x279ed8+_0x3f5841);}console[_0x258381(0x3cf)]('');}}function _0x29bfc8(_0x357f58,_0x58bb95){const _0x5e3c34=_0x2d9d5f,_0x57e683=_0x58bb95[_0x5e3c34(0x43d)](/^\/api(\/env\/[^/]+)?\//,'')['split']('/')[0x0],_0x50fd42=_0x357f58[_0x5e3c34(0x32d)][_0x5e3c34(0x28d)]()['filter'](_0x30f960=>_0x30f960['path'][_0x5e3c34(0x35b)]()[_0x5e3c34(0x3a6)](_0x57e683[_0x5e3c34(0x35b)]()));if(!_0x50fd42['length']){console[_0x5e3c34(0x3cf)](_0x5da8ff(_0x13acb1[_0x5e3c34(0x1e8)],_0x5e3c34(0x1df)+_0x58bb95+'\x0a'));return;}console[_0x5e3c34(0x3cf)]('');for(const _0x24ca0f of _0x50fd42[_0x5e3c34(0x36a)](0x0,0xc)){for(const _0x10dde9 of _0x3b5f72(_0x24ca0f)){console[_0x5e3c34(0x3cf)](_0x10dde9);}console['log']('');}}function _0xdb2c8d(_0x39fd5c){const _0x382e12=_0x2d9d5f;return _0x39fd5c[_0x382e12(0x429)]?.['summary']??_0x39fd5c[_0x382e12(0x1a5)]?.['summary']??'';}function _0x4c4f6f(_0x1a5179){const _0x316732=_0x2d9d5f;return _0x1a5179[_0x316732(0x429)]?.[_0x316732(0x3b2)]??_0x1a5179['meta']?.[_0x316732(0x3b2)]??'';}function _0x554546(_0x5f9372){const _0x16f459=_0x2d9d5f;return _0x5f9372['operation']?.[_0x16f459(0x3eb)]?.[_0x16f459(0x256)]?_0x5f9372[_0x16f459(0x429)][_0x16f459(0x3eb)]:_0x5f9372['meta']?.[_0x16f459(0x3eb)]??[];}function _0x3b5f72(_0x2cd8f5){const _0x345e79=_0x2d9d5f,_0x5c0742=[];_0x5c0742[_0x345e79(0x44e)]('\x20\x20'+_0x5da8ff(_0x13acb1[_0x345e79(0x424)]+_0x13acb1[_0x345e79(0x304)],_0x2cd8f5[_0x345e79(0x393)][_0x345e79(0x39e)](0x7))+'\x20'+_0x5da8ff(_0x13acb1['bold']+_0x13acb1[_0x345e79(0x46a)],_0x2cd8f5[_0x345e79(0x2ef)]));_0x2cd8f5[_0x345e79(0x429)]?.['id']&&_0x5c0742['push']('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x5da8ff(_0x13acb1['gray'],_0x345e79(0x481)+_0x2cd8f5['operation']['id']));_0xdb2c8d(_0x2cd8f5)&&_0x5c0742['push'](_0x345e79(0x2f7)+_0x5da8ff(_0x13acb1[_0x345e79(0x19a)],_0xdb2c8d(_0x2cd8f5)));_0x4c4f6f(_0x2cd8f5)&&_0x5c0742[_0x345e79(0x44e)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x5da8ff(_0x13acb1[_0x345e79(0x1cd)],_0x4c4f6f(_0x2cd8f5)));_0x554546(_0x2cd8f5)[_0x345e79(0x256)]&&_0x5c0742[_0x345e79(0x44e)](_0x345e79(0x2f7)+_0x5da8ff(_0x13acb1[_0x345e79(0x3dd)],_0x345e79(0x3d6)+_0x554546(_0x2cd8f5)[_0x345e79(0x1ac)](',\x20')));_0x2cd8f5[_0x345e79(0x429)]?.[_0x345e79(0x34f)]?.[_0x345e79(0x43f)]&&_0x5c0742[_0x345e79(0x44e)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x5da8ff(_0x13acb1[_0x345e79(0x3dd)],_0x345e79(0x31d)+_0x2cd8f5[_0x345e79(0x429)][_0x345e79(0x34f)][_0x345e79(0x43f)]));_0x2cd8f5[_0x345e79(0x429)]?.[_0x345e79(0x32d)]?.[_0x345e79(0x295)]&&_0x2cd8f5[_0x345e79(0x429)][_0x345e79(0x32d)][_0x345e79(0x295)]!==_0x345e79(0x254)&&_0x5c0742['push'](_0x345e79(0x2f7)+_0x5da8ff(_0x13acb1['gray'],_0x345e79(0x32e)+_0x2cd8f5[_0x345e79(0x429)][_0x345e79(0x32d)][_0x345e79(0x295)]));if(_0x2cd8f5[_0x345e79(0x429)]?.[_0x345e79(0x2ea)]){const _0x36c942=Object[_0x345e79(0x2f6)](_0x2cd8f5[_0x345e79(0x429)][_0x345e79(0x2ea)][_0x345e79(0x497)]||{});if(_0x36c942[_0x345e79(0x256)])_0x5c0742[_0x345e79(0x44e)](_0x345e79(0x2f7)+_0x5da8ff(_0x13acb1['gray'],_0x345e79(0x470)+_0x36c942[_0x345e79(0x1ac)](',\x20')));}return _0x2cd8f5['meta']?.[_0x345e79(0x21f)]&&_0x5c0742['push'](_0x345e79(0x2f7)+_0x5da8ff(_0x13acb1[_0x345e79(0x3dd)],_0x345e79(0x3da)+JSON[_0x345e79(0x3a9)](_0x2cd8f5[_0x345e79(0x1a5)][_0x345e79(0x21f)]))),_0x5c0742;}async function _0x3b779b(_0x9e0277,_0x445d00,_0xfc8707,_0x42addf=null){const _0x368151=_0x2d9d5f,_0x2b9929=_0xfc8707[_0x368151(0x460)]('?'),_0xfdef7d=_0x2b9929>=0x0?_0xfc8707[_0x368151(0x36a)](0x0,_0x2b9929):_0xfc8707,_0x1e1af=_0x2b9929>=0x0?_0xfc8707['slice'](_0x2b9929+0x1):'',_0x18f53d=Object[_0x368151(0x340)](new URLSearchParams(_0x1e1af)[_0x368151(0x380)]());return _0x9e0277[_0x368151(0x32d)][_0x368151(0x40a)](_0x445d00,_0xfdef7d,{'body':_0x42addf,'query':_0x18f53d,'headers':{'content-type':'application/json'}},{'internal':!![]});}function _0x4be0f1(_0xb74b){const _0x4f2084=_0x2d9d5f;if(!_0xb74b)return null;const _0x4b1c37=_0xb74b[_0x4f2084(0x3a4)]();if(!_0x4b1c37)return null;try{return JSON[_0x4f2084(0x1c6)](_0x4b1c37);}catch{}try{return JSON[_0x4f2084(0x1c6)](_0x2d8044(_0x4b1c37));}catch(_0x3dd4a5){throw new SyntaxError(_0x3dd4a5[_0x4f2084(0x1bc)],{'cause':_0x3dd4a5});}}function _0x2d8044(_0x3a7fa1){const _0x482ff3=_0x2d9d5f;let _0x5c6b44='',_0x37d9e0=0x0;while(_0x37d9e0<_0x3a7fa1[_0x482ff3(0x256)]){const _0x5e5a28=_0x3a7fa1[_0x37d9e0];if(_0x5e5a28==='\x22'){_0x5c6b44+='\x22',_0x37d9e0++;while(_0x37d9e0<_0x3a7fa1[_0x482ff3(0x256)]&&_0x3a7fa1[_0x37d9e0]!=='\x22'){if(_0x3a7fa1[_0x37d9e0]==='\x5c'){_0x5c6b44+=_0x3a7fa1[_0x37d9e0++];if(_0x37d9e0<_0x3a7fa1['length'])_0x5c6b44+=_0x3a7fa1[_0x37d9e0++];}else _0x5c6b44+=_0x3a7fa1[_0x37d9e0++];}_0x5c6b44+='\x22';if(_0x37d9e0<_0x3a7fa1[_0x482ff3(0x256)])_0x37d9e0++;continue;}if(_0x5e5a28==='\x27'){_0x5c6b44+='\x22',_0x37d9e0++;while(_0x37d9e0<_0x3a7fa1[_0x482ff3(0x256)]&&_0x3a7fa1[_0x37d9e0]!=='\x27'){if(_0x3a7fa1[_0x37d9e0]==='\x5c'&&_0x3a7fa1[_0x37d9e0+0x1]==='\x27')_0x5c6b44+='\x27',_0x37d9e0+=0x2;else _0x3a7fa1[_0x37d9e0]==='\x22'?(_0x5c6b44+='\x5c\x22',_0x37d9e0++):_0x5c6b44+=_0x3a7fa1[_0x37d9e0++];}_0x5c6b44+='\x22';if(_0x37d9e0<_0x3a7fa1[_0x482ff3(0x256)])_0x37d9e0++;continue;}if(_0x482ff3(0x472)['includes'](_0x5e5a28)){_0x5c6b44+=_0x5e5a28,_0x37d9e0++;continue;}let _0xc874a4='';while(_0x37d9e0<_0x3a7fa1[_0x482ff3(0x256)]&&!_0x482ff3(0x262)[_0x482ff3(0x3a6)](_0x3a7fa1[_0x37d9e0])&&_0x3a7fa1[_0x37d9e0]!=='\x20'&&_0x3a7fa1[_0x37d9e0]!=='\x09'&&_0x3a7fa1[_0x37d9e0]!=='\x0a'&&_0x3a7fa1[_0x37d9e0]!=='\x0d'){_0xc874a4+=_0x3a7fa1[_0x37d9e0++];}let _0x491785=_0x37d9e0;while(_0x491785<_0x3a7fa1[_0x482ff3(0x256)]&&(_0x3a7fa1[_0x491785]==='\x20'||_0x3a7fa1[_0x491785]==='\x09'))_0x491785++;if(_0x3a7fa1[_0x491785]===':')_0x5c6b44+='\x22'+_0xc874a4+'\x22';else _0xc874a4===_0x482ff3(0x43c)||_0xc874a4===_0x482ff3(0x272)||_0xc874a4==='null'||/^-?\d+(\.\d+)?([eE][+-]?\d+)?$/[_0x482ff3(0x329)](_0xc874a4)?_0x5c6b44+=_0xc874a4:_0x5c6b44+='\x22'+_0xc874a4+'\x22';}return _0x5c6b44[_0x482ff3(0x43d)](/,(\s*[}\]])/g,'$1');}function _0x6f17fd(_0x7f49d7){const _0x9fcda7=_0x2d9d5f,_0x1727f=[];let _0x423512=0x0;while(_0x423512<_0x7f49d7[_0x9fcda7(0x256)]){while(_0x423512<_0x7f49d7['length']&&(_0x7f49d7[_0x423512]==='\x20'||_0x7f49d7[_0x423512]==='\x09'))_0x423512++;if(_0x423512>=_0x7f49d7['length'])break;const _0x221e75=_0x7f49d7[_0x423512];if(_0x221e75==='{'||_0x221e75==='['){const _0x3a9764=_0x221e75==='{'?'}':']',_0xb87f57=_0x423512++;let _0x74f6d3=0x1,_0x3a744a=![],_0x5ea725='';while(_0x423512<_0x7f49d7[_0x9fcda7(0x256)]&&_0x74f6d3>0x0){const _0xaefbd=_0x7f49d7[_0x423512];if(_0x3a744a){if(_0xaefbd==='\x5c')_0x423512++;else{if(_0xaefbd===_0x5ea725)_0x3a744a=![];}}else{if(_0xaefbd==='\x22'||_0xaefbd==='\x27')_0x3a744a=!![],_0x5ea725=_0xaefbd;else{if(_0xaefbd===_0x221e75)_0x74f6d3++;else{if(_0xaefbd===_0x3a9764)_0x74f6d3--;}}}_0x423512++;}_0x1727f[_0x9fcda7(0x44e)](_0x7f49d7[_0x9fcda7(0x36a)](_0xb87f57,_0x423512));continue;}if(_0x221e75==='\x22'||_0x221e75==='\x27'){const _0x5de886=_0x221e75;_0x423512++;let _0x112727='';while(_0x423512<_0x7f49d7[_0x9fcda7(0x256)]&&_0x7f49d7[_0x423512]!==_0x5de886){if(_0x7f49d7[_0x423512]==='\x5c'&&_0x423512+0x1<_0x7f49d7[_0x9fcda7(0x256)])_0x423512++,_0x112727+=_0x7f49d7[_0x423512++];else _0x112727+=_0x7f49d7[_0x423512++];}if(_0x423512<_0x7f49d7[_0x9fcda7(0x256)])_0x423512++;_0x1727f['push'](_0x112727);continue;}let _0x5429e0='';while(_0x423512<_0x7f49d7[_0x9fcda7(0x256)]&&_0x7f49d7[_0x423512]!=='\x20'&&_0x7f49d7[_0x423512]!=='\x09'&&_0x7f49d7[_0x423512]!=='{'&&_0x7f49d7[_0x423512]!=='['){_0x5429e0+=_0x7f49d7[_0x423512++];}if(_0x5429e0)_0x1727f[_0x9fcda7(0x44e)](_0x5429e0);}return _0x1727f;}function _0x51e2cc(_0x5cf0e4,_0x362c14){const _0x309400=_0x2d9d5f,_0x3ef1d5=[..._0x5cf0e4[_0x309400(0x3de)]['keys']()][_0x309400(0x1a2)](_0x172ac5=>!_0x172ac5[_0x309400(0x21d)]('~'));console['log'](['',_0x5da8ff(_0x13acb1[_0x309400(0x424)]+_0x13acb1[_0x309400(0x46a)],_0x309400(0x28e)),_0x5da8ff(_0x13acb1[_0x309400(0x424)]+_0x13acb1[_0x309400(0x46a)],_0x309400(0x47e))+_0x5da8ff(_0x13acb1[_0x309400(0x424)],'\x20\x20\x20\x20\x20\x20\x20\x20\x20OKDB\x20SHELL\x20\x20\x20\x20\x20\x20\x20\x20\x20')+_0x5da8ff(_0x13acb1[_0x309400(0x424)]+_0x13acb1[_0x309400(0x46a)],'║'),_0x5da8ff(_0x13acb1[_0x309400(0x424)]+_0x13acb1[_0x309400(0x46a)],_0x309400(0x212)),'','\x20\x20'+_0x5da8ff(_0x13acb1[_0x309400(0x20e)],'✓')+'\x20'+_0x5da8ff(_0x13acb1[_0x309400(0x424)],_0x309400(0x2ce))+'\x20\x20http://localhost:'+_0x362c14[_0x309400(0x25d)],'\x20\x20'+_0x5da8ff(_0x13acb1[_0x309400(0x20e)],'✓')+'\x20'+_0x5da8ff(_0x13acb1[_0x309400(0x424)],'api')+_0x309400(0x3cb)+_0x362c14['port']+'/api','\x20\x20'+_0x5da8ff(_0x13acb1[_0x309400(0x20e)],'✓')+'\x20'+_0x5da8ff(_0x13acb1[_0x309400(0x424)],'path')+_0x309400(0x2ff)+_0x362c14[_0x309400(0x25a)],'\x20\x20'+_0x5da8ff(_0x13acb1['green'],'✓')+'\x20'+_0x5da8ff(_0x13acb1[_0x309400(0x424)],'id')+'\x20\x20\x20\x20\x20\x20'+_0x5da8ff(_0x13acb1['gray'],_0x5cf0e4['id']),'\x20\x20'+_0x5da8ff(_0x13acb1['green'],'✓')+'\x20'+_0x5da8ff(_0x13acb1[_0x309400(0x424)],_0x309400(0x1d3))+_0x309400(0x2ff)+_0x3ef1d5['map'](_0xbedfbe=>_0x5da8ff(_0x13acb1[_0x309400(0x46a)],_0xbedfbe))[_0x309400(0x1ac)]('\x20\x20'),..._0x362c14['noAdmin']?[]:['\x20\x20'+_0x5da8ff(_0x13acb1[_0x309400(0x20e)],'✓')+'\x20'+_0x5da8ff(_0x13acb1[_0x309400(0x424)],_0x309400(0x474))+_0x309400(0x2ba)+_0x362c14[_0x309400(0x25d)]+_0x309400(0x3ef)],'',_0x5da8ff(_0x13acb1[_0x309400(0x1cd)],_0x309400(0x297)+_0x5da8ff(_0x13acb1[_0x309400(0x424)],_0x309400(0x1a8))+_0x309400(0x2e5)+_0x5da8ff(_0x13acb1[_0x309400(0x424)],_0x309400(0x267))+_0x309400(0x1e9)+_0x5da8ff(_0x13acb1['bold'],_0x309400(0x2dd))+'\x20to\x20quit.'),''][_0x309400(0x1ac)]('\x0a'));}function _0x568961(_0x54c03b){const _0x294af0=_0x2d9d5f;console[_0x294af0(0x3cf)]('\x0a'+_0x5da8ff(_0x13acb1[_0x294af0(0x424)],_0x294af0(0x242))+'\x20\x20'+_0x5da8ff(_0x13acb1[_0x294af0(0x1cd)],_0x294af0(0x259))+_0x294af0(0x400)+_0x5da8ff(_0x13acb1[_0x294af0(0x46a)],_0x294af0(0x48b))+_0x294af0(0x26d)+_0x5da8ff(_0x13acb1[_0x294af0(0x46a)],_0x294af0(0x48b))+'\x20'+_0x5da8ff(_0x13acb1['yellow'],'<json-body>')+_0x294af0(0x3ce)+_0x5da8ff(_0x13acb1[_0x294af0(0x46a)],'VERB')+'\x20'+_0x5da8ff(_0x13acb1['cyan'],'<path>')+'\x20'+_0x5da8ff(_0x13acb1['yellow'],_0x294af0(0x224))+'\x20\x20\x20\x20\x20explicit\x20method\x0a\x0a\x20\x20'+_0x5da8ff(_0x13acb1['dim'],_0x294af0(0x298))+_0x294af0(0x1cf)+_0x5da8ff(_0x13acb1[_0x294af0(0x3dd)],_0x294af0(0x440))+'\x20\x20\x20\x20\x20\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'+_0x5da8ff(_0x13acb1['gray'],'envs')+_0x294af0(0x235)+_0x5da8ff(_0x13acb1[_0x294af0(0x3dd)],'types')+_0x294af0(0x1bb)+_0x54c03b[_0x294af0(0x1be)]+_0x294af0(0x2ad)+_0x5da8ff(_0x13acb1[_0x294af0(0x3dd)],_0x294af0(0x336))+'\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/'+_0x54c03b[_0x294af0(0x1be)]+_0x294af0(0x280)+_0x5da8ff(_0x13acb1[_0x294af0(0x3dd)],'type/users/item/alice')+_0x294af0(0x2bb)+_0x54c03b[_0x294af0(0x1be)]+_0x294af0(0x206)+_0x5da8ff(_0x13acb1[_0x294af0(0x3dd)],_0x294af0(0x36b))+'\x20→\x20POST\x20/api/env/'+_0x54c03b[_0x294af0(0x1be)]+_0x294af0(0x3ba)+_0x5da8ff(_0x13acb1[_0x294af0(0x3dd)],_0x294af0(0x29b))+_0x294af0(0x1cf)+_0x5da8ff(_0x13acb1[_0x294af0(0x3dd)],_0x294af0(0x1bf))+_0x294af0(0x1cf)+_0x5da8ff(_0x13acb1['gray'],'env/staging/info')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/staging/info\x0a\x0a'+_0x5da8ff(_0x13acb1[_0x294af0(0x424)],'\x20\x20Flags')+'\x20\x20'+_0x5da8ff(_0x13acb1[_0x294af0(0x1cd)],_0x294af0(0x35c))+_0x294af0(0x400)+_0x5da8ff(_0x13acb1['cyan'],_0x294af0(0x292))+_0x294af0(0x233)+_0x5da8ff(_0x13acb1[_0x294af0(0x46a)],'--help')+_0x294af0(0x492)+_0x5da8ff(_0x13acb1['dim'],_0x294af0(0x298))+_0x294af0(0x1cf)+_0x5da8ff(_0x13acb1['gray'],'types\x20--env\x20staging')+_0x294af0(0x1cf)+_0x5da8ff(_0x13acb1[_0x294af0(0x3dd)],'type/users/item/alice\x20--env\x20staging')+_0x294af0(0x1cf)+_0x5da8ff(_0x13acb1[_0x294af0(0x3dd)],'type/users\x20--help')+'\x0a\x0a'+_0x5da8ff(_0x13acb1[_0x294af0(0x424)],_0x294af0(0x1de))+_0x294af0(0x400)+_0x5da8ff(_0x13acb1[_0x294af0(0x46a)],_0x294af0(0x2f2))+_0x294af0(0x478)+_0x5da8ff(_0x13acb1[_0x294af0(0x46a)],_0x294af0(0x1be))+_0x294af0(0x21e)+_0x5da8ff(_0x13acb1[_0x294af0(0x46a)],_0x294af0(0x267))+'\x20'+_0x5da8ff(_0x13acb1[_0x294af0(0x1cd)],_0x294af0(0x327))+_0x294af0(0x3d2)+_0x5da8ff(_0x13acb1['cyan'],_0x294af0(0x46f))+'\x20'+_0x5da8ff(_0x13acb1[_0x294af0(0x1cd)],'[on|off|level]')+'\x20\x20\x20\x20\x20control\x20log\x20verbosity\x0a\x20\x20'+_0x5da8ff(_0x13acb1[_0x294af0(0x46a)],_0x294af0(0x308))+_0x294af0(0x443)+_0x5da8ff(_0x13acb1[_0x294af0(0x46a)],_0x294af0(0x1a8))+'\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'+_0x5da8ff(_0x13acb1['cyan'],_0x294af0(0x2dd))+'\x20'+_0x5da8ff(_0x13acb1[_0x294af0(0x1cd)],'/\x20quit\x20/\x20Ctrl+C')+_0x294af0(0x18d));}let _0x26a8bc=![];async function _0x2369c1(_0x3d72f3,_0x75eff9=0x0,_0x414576=null){const _0x3a067e=_0x2d9d5f;_0x26a8bc&&(process[_0x3a067e(0x324)][_0x3a067e(0x23d)](_0x5da8ff(_0x13acb1[_0x3a067e(0x281)],_0x3a067e(0x1ca))),process[_0x3a067e(0x2dd)](0x82));_0x26a8bc=!![],process[_0x3a067e(0x3e1)]['write']('\x0a'),process[_0x3a067e(0x324)][_0x3a067e(0x23d)](_0x5da8ff(_0x13acb1[_0x3a067e(0x1e8)],'\x20\x20[okdb]\x20'+(_0x414576?'received\x20'+_0x414576+',\x20':'')+_0x3a067e(0x433)));const _0x1fd980=setTimeout(()=>{const _0x1cbd9=_0x3a067e;process['stderr'][_0x1cbd9(0x23d)](_0x5da8ff(_0x13acb1[_0x1cbd9(0x281)],_0x1cbd9(0x39d))),process['exit'](0x1);},0x1388);try{await _0x3d72f3[_0x3a067e(0x3ab)]();}catch(_0x431822){console[_0x3a067e(0x311)](_0x5da8ff(_0x13acb1[_0x3a067e(0x281)],'\x20\x20'+_0x431822[_0x3a067e(0x1bc)]));}clearTimeout(_0x1fd980),process[_0x3a067e(0x324)][_0x3a067e(0x23d)](_0x5da8ff(_0x13acb1[_0x3a067e(0x1cd)],_0x3a067e(0x23f))),process[_0x3a067e(0x2dd)](_0x75eff9);}function _0x33ce41(_0x30e8c0){const _0x58bc61=_0x2d9d5f,_0x49ca29=_0x30e8c0['env']!==_0x58bc61(0x3ee)?_0x5da8ff(_0x13acb1[_0x58bc61(0x1e8)],'['+_0x30e8c0[_0x58bc61(0x1be)]+']'):'';return _0x5da8ff(_0x13acb1[_0x58bc61(0x424)]+_0x13acb1['cyan'],_0x58bc61(0x27c))+_0x49ca29+_0x5da8ff(_0x13acb1['gray'],'>\x20');}const _0x506f0f=new Set(['GET',_0x2d9d5f(0x1a1),_0x2d9d5f(0x37a),_0x2d9d5f(0x2b0),_0x2d9d5f(0x2c1)]);async function _0x349a4d(_0x244a29,_0x2dbdc9,_0x25df8d,_0x2e17e8,_0x588645,_0x164be7){const _0x5e1e8a=_0x2d9d5f;_0x244a29=_0x244a29[_0x5e1e8a(0x3a4)]();if(!_0x244a29||_0x244a29[_0x5e1e8a(0x21d)]('#'))return;const _0x97dc54=_0x6f17fd(_0x244a29),{flags:_0x4d360c,rest:_0x47db4b}=_0x5de739(_0x97dc54);if(!_0x47db4b[_0x5e1e8a(0x256)])return;const _0x186a85=_0x47db4b[0x0],_0x2a7865=_0x186a85[_0x5e1e8a(0x38a)]();if(_0x2a7865===_0x5e1e8a(0x342)){if(_0x47db4b[0x1])_0x29bfc8(_0x2dbdc9,_0x335c0f(_0x47db4b[0x1],_0x4d360c[_0x5e1e8a(0x1be)]??_0x588645[_0x5e1e8a(0x1be)]));else _0x568961(_0x588645);return;}if(_0x2a7865===_0x5e1e8a(0x416)){const _0x499c6c=_0x47db4b[0x1];if(!_0x499c6c){console['log'](_0x5da8ff(_0x13acb1['red'],_0x5e1e8a(0x2a3)));return;}try{_0x2dbdc9[_0x5e1e8a(0x1be)](_0x499c6c),_0x588645[_0x5e1e8a(0x1be)]=_0x499c6c,_0x164be7?.['setPrompt'](_0x33ce41(_0x588645)),console[_0x5e1e8a(0x3cf)]('\x0a\x20\x20'+_0x5da8ff(_0x13acb1[_0x5e1e8a(0x20e)],'✓')+'\x20active\x20env:\x20'+_0x5da8ff(_0x13acb1[_0x5e1e8a(0x424)]+_0x13acb1['cyan'],_0x499c6c)+'\x0a');}catch{console[_0x5e1e8a(0x3cf)]('\x0a\x20\x20'+_0x5da8ff(_0x13acb1[_0x5e1e8a(0x281)],'✗')+_0x5e1e8a(0x428)+_0x5da8ff(_0x13acb1[_0x5e1e8a(0x424)],_0x499c6c)+_0x5e1e8a(0x1d5)+_0x5da8ff(_0x13acb1[_0x5e1e8a(0x1cd)],'\x20—\x20type\x20env\x20to\x20list\x20available\x0a'));}return;}if(_0x2a7865==='ENV'){const _0x56feff=[..._0x2dbdc9[_0x5e1e8a(0x3de)][_0x5e1e8a(0x2f6)]()][_0x5e1e8a(0x1a2)](_0x3414bf=>!_0x3414bf['startsWith']('~'));console[_0x5e1e8a(0x3cf)]('');for(const _0x3859b3 of _0x56feff){const _0x157ee1=_0x3859b3===_0x588645['env'];console[_0x5e1e8a(0x3cf)]('\x20\x20'+(_0x157ee1?_0x5da8ff(_0x13acb1[_0x5e1e8a(0x20e)],'●'):_0x5da8ff(_0x13acb1[_0x5e1e8a(0x1cd)],'○'))+'\x20\x20'+(_0x157ee1?_0x5da8ff(_0x13acb1[_0x5e1e8a(0x424)]+_0x13acb1[_0x5e1e8a(0x46a)],_0x3859b3):_0x5da8ff(_0x13acb1[_0x5e1e8a(0x1cd)],_0x3859b3)));}console[_0x5e1e8a(0x3cf)](_0x5e1e8a(0x3e5)+_0x5da8ff(_0x13acb1[_0x5e1e8a(0x1cd)],_0x5e1e8a(0x43e))+'\x20'+_0x5da8ff(_0x13acb1[_0x5e1e8a(0x46a)],_0x588645[_0x5e1e8a(0x1be)])),console['log']('');return;}if(_0x2a7865===_0x5e1e8a(0x2c0)){const _0x21de17=[..._0x2dbdc9[_0x5e1e8a(0x3de)][_0x5e1e8a(0x30e)]()][_0x5e1e8a(0x1a2)](_0x2448ae=>!_0x2448ae[_0x5e1e8a(0x1fe)][_0x5e1e8a(0x21d)]('~'));console['log']('');const _0x465c86=Math['max'](..._0x21de17['map'](_0x3a9a0e=>_0x3a9a0e[_0x5e1e8a(0x1fe)]['length']));for(const _0x1983fc of _0x21de17){const _0x5ef5d4=_0x1983fc[_0x5e1e8a(0x1fe)]===_0x588645[_0x5e1e8a(0x1be)],_0x5e4e94=_0x5ef5d4?_0x5da8ff(_0x13acb1[_0x5e1e8a(0x20e)],'●'):_0x5da8ff(_0x13acb1[_0x5e1e8a(0x1cd)],'○'),_0x275542=_0x5ef5d4?_0x5da8ff(_0x13acb1[_0x5e1e8a(0x424)]+_0x13acb1[_0x5e1e8a(0x46a)],_0x1983fc[_0x5e1e8a(0x1fe)][_0x5e1e8a(0x39e)](_0x465c86)):_0x5da8ff(_0x13acb1[_0x5e1e8a(0x1cd)],_0x1983fc[_0x5e1e8a(0x1fe)][_0x5e1e8a(0x39e)](_0x465c86)),_0x15c6ea=[..._0x1983fc[_0x5e1e8a(0x330)][_0x5e1e8a(0x2f6)]()][_0x5e1e8a(0x1a2)](_0x503e47=>!_0x503e47[_0x5e1e8a(0x21d)]('~')),_0x449e7f=_0x15c6ea['length']?_0x5da8ff(_0x13acb1[_0x5e1e8a(0x1cd)],_0x15c6ea['slice'](0x0,0x5)[_0x5e1e8a(0x1ac)](',\x20')+(_0x15c6ea[_0x5e1e8a(0x256)]>0x5?_0x5e1e8a(0x331)+(_0x15c6ea[_0x5e1e8a(0x256)]-0x5)+_0x5e1e8a(0x21a):'')):_0x5da8ff(_0x13acb1['dim'],_0x5e1e8a(0x203));console[_0x5e1e8a(0x3cf)]('\x20\x20'+_0x5e4e94+'\x20\x20'+_0x275542+'\x20\x20'+_0x449e7f);}console[_0x5e1e8a(0x3cf)]('');return;}if(_0x2a7865===_0x5e1e8a(0x384)){const _0x460c8b=_0x4d360c[_0x5e1e8a(0x1be)]??_0x47db4b[0x1]??_0x588645[_0x5e1e8a(0x1be)];try{const _0x3ca8df=_0x2dbdc9[_0x5e1e8a(0x1be)](_0x460c8b),_0x54d07d=[..._0x3ca8df[_0x5e1e8a(0x330)][_0x5e1e8a(0x2f6)]()][_0x5e1e8a(0x1a2)](_0x3eaf42=>!_0x3eaf42[_0x5e1e8a(0x21d)]('~'))[_0x5e1e8a(0x1d0)]();console[_0x5e1e8a(0x3cf)](_0x5e1e8a(0x3e5)+_0x5da8ff(_0x13acb1[_0x5e1e8a(0x1cd)],_0x54d07d['length']+_0x5e1e8a(0x45f)+(_0x54d07d[_0x5e1e8a(0x256)]!==0x1?'s':'')+_0x5e1e8a(0x3d4)+_0x460c8b));for(const _0x3a379c of _0x54d07d){const _0x72ecc2=_0x3ca8df[_0x5e1e8a(0x330)]['get'](_0x3a379c),_0xf79ad=_0x72ecc2?.['data']?.[_0x5e1e8a(0x22a)]?.()??0x0,_0x4cbb45=_0x5da8ff(_0x13acb1[_0x5e1e8a(0x424)]+_0x13acb1[_0x5e1e8a(0x46a)],_0x3a379c[_0x5e1e8a(0x39e)](0x1c));console[_0x5e1e8a(0x3cf)](_0x5e1e8a(0x2ff)+_0x4cbb45+'\x20\x20'+_0x5da8ff(_0x13acb1[_0x5e1e8a(0x304)],String(_0xf79ad)['padStart'](0x6))+'\x20'+_0x5da8ff(_0x13acb1[_0x5e1e8a(0x1cd)],'records'));}console[_0x5e1e8a(0x3cf)]('');}catch(_0x18afee){console['error'](_0x5da8ff(_0x13acb1['red'],'\x0a\x20\x20'+_0x18afee[_0x5e1e8a(0x1bc)]+'\x0a'));}return;}if(_0x2a7865===_0x5e1e8a(0x337)){_0x453295(_0x2dbdc9,_0x47db4b['slice'](0x1)[_0x5e1e8a(0x1ac)]('\x20'));return;}if(_0x2a7865===_0x5e1e8a(0x25c)){const _0xebdc07=(_0x47db4b[0x1]??'')[_0x5e1e8a(0x35b)]();if(!_0xebdc07||_0xebdc07==='on')_0x2e17e8[_0x5e1e8a(0x26c)]=!![],_0x2e17e8[_0x5e1e8a(0x37e)]=_0x5e1e8a(0x440),console[_0x5e1e8a(0x3cf)](_0x5e1e8a(0x3e5)+_0x5da8ff(_0x13acb1[_0x5e1e8a(0x20e)],'✓')+_0x5e1e8a(0x3f6)+_0x5da8ff(_0x13acb1[_0x5e1e8a(0x1cd)],_0x5e1e8a(0x3c3))+'\x0a');else{if(_0xebdc07===_0x5e1e8a(0x1ff))_0x2e17e8[_0x5e1e8a(0x26c)]=![],console[_0x5e1e8a(0x3cf)](_0x5e1e8a(0x3e5)+_0x5da8ff(_0x13acb1[_0x5e1e8a(0x1e8)],'○')+_0x5e1e8a(0x3a3));else _0x352ee6[_0xebdc07]!==undefined?(_0x2e17e8[_0x5e1e8a(0x26c)]=!![],_0x2e17e8[_0x5e1e8a(0x37e)]=_0xebdc07,console[_0x5e1e8a(0x3cf)](_0x5e1e8a(0x3e5)+_0x5da8ff(_0x13acb1[_0x5e1e8a(0x20e)],'✓')+'\x20log\x20level:\x20'+_0x5da8ff(_0x13acb1['bold'],_0xebdc07)+'\x0a')):console['error'](_0x5da8ff(_0x13acb1[_0x5e1e8a(0x281)],_0x5e1e8a(0x361)));}return;}if(_0x2a7865===_0x5e1e8a(0x193)||_0x2a7865===_0x5e1e8a(0x228)){await _0x2369c1(_0x2dbdc9,0x0);return;}if(_0x2a7865===_0x5e1e8a(0x24d)){const _0xaa88ea=_0x5e1e8a(0x1dd)+_0x25df8d[_0x5e1e8a(0x25d)]+_0x5e1e8a(0x3ef),_0x2f282b=process[_0x5e1e8a(0x2ab)]===_0x5e1e8a(0x3b0)?_0x5e1e8a(0x28f)+_0xaa88ea:process[_0x5e1e8a(0x2ab)]===_0x5e1e8a(0x3be)?_0x5e1e8a(0x300)+_0xaa88ea:_0x5e1e8a(0x491)+_0xaa88ea;require$$4[_0x5e1e8a(0x19e)](_0x2f282b),console[_0x5e1e8a(0x3cf)](_0x5e1e8a(0x3e5)+_0x5da8ff(_0x13acb1[_0x5e1e8a(0x20e)],'✓')+_0x5e1e8a(0x263)+_0x5da8ff(_0x13acb1[_0x5e1e8a(0x46a)],_0xaa88ea)+'\x0a');return;}let _0x538ff0,_0x46cc10,_0x21fa34;if(_0x506f0f['has'](_0x2a7865)){_0x538ff0=_0x2a7865,_0x46cc10=_0x47db4b[0x1],_0x21fa34=_0x47db4b[_0x5e1e8a(0x36a)](0x2);if(!_0x46cc10){console[_0x5e1e8a(0x311)](_0x5da8ff(_0x13acb1[_0x5e1e8a(0x281)],_0x5e1e8a(0x38c)+_0x186a85+_0x5e1e8a(0x1bd)));return;}}else _0x538ff0=null,_0x46cc10=_0x47db4b[0x0],_0x21fa34=_0x47db4b['slice'](0x1);const _0x469680=_0x4d360c[_0x5e1e8a(0x1be)]??_0x588645[_0x5e1e8a(0x1be)],_0x5429fb=_0x335c0f(_0x46cc10,_0x469680);if(_0x4d360c[_0x5e1e8a(0x1a8)]){_0x29bfc8(_0x2dbdc9,_0x5429fb);return;}let _0x5dc398=null;if(_0x21fa34[_0x5e1e8a(0x256)]){const _0x183fe9=_0x21fa34[_0x5e1e8a(0x1ac)]('\x20');try{_0x5dc398=_0x4be0f1(_0x183fe9);}catch(_0x2f3953){console[_0x5e1e8a(0x311)](_0x5da8ff(_0x13acb1[_0x5e1e8a(0x281)],_0x5e1e8a(0x44d)+_0x183fe9+_0x5e1e8a(0x3e5)+_0x5da8ff(_0x13acb1['dim'],_0x2f3953[_0x5e1e8a(0x1bc)])+'\x0a'));return;}}if(!_0x538ff0)_0x538ff0=_0x5dc398!==null?_0x5e1e8a(0x1a1):_0x5e1e8a(0x307);try{const _0x244102=await _0x3b779b(_0x2dbdc9,_0x538ff0,_0x5429fb,_0x5dc398);_0x12eb10(_0x244102['status'],_0x244102['body']);}catch(_0x40612e){console['error'](_0x5e1e8a(0x3e5)+_0x5da8ff(_0x13acb1[_0x5e1e8a(0x281)],'✗')+'\x20'+_0x40612e[_0x5e1e8a(0x1bc)]+'\x0a');}}class _0x3812cb{constructor(){const _0x851e74=_0x2d9d5f;this[_0x851e74(0x32a)]=new Map(),this[_0x851e74(0x3b5)]=null,this[_0x851e74(0x402)]=![];}}function _0x542c30(_0x550a01){const _0x106f9f=_0x2d9d5f,_0x3caa31=new _0x3812cb();for(const _0x16a68b of _0x550a01){if(_0x16a68b[_0x106f9f(0x1a5)]?.['hidden'])continue;const _0x396c06=_0x16a68b[_0x106f9f(0x2ef)][_0x106f9f(0x43d)](/^\/api/,'')[_0x106f9f(0x43d)](/^\[\/env\/:env=[^\]]*\]/,'')[_0x106f9f(0x43d)](/^\//,'');if(!_0x396c06)continue;let _0x315bcd=_0x3caa31;for(const _0x359f9e of _0x396c06[_0x106f9f(0x40f)]('/')[_0x106f9f(0x1a2)](Boolean)){if(_0x359f9e[_0x106f9f(0x21d)](':')){const _0x47904d=_0x359f9e[_0x106f9f(0x36a)](0x1);if(!_0x315bcd[_0x106f9f(0x3b5)])_0x315bcd['dynamic']={'param':_0x47904d,'node':new _0x3812cb()};_0x315bcd=_0x315bcd[_0x106f9f(0x3b5)][_0x106f9f(0x2c7)];}else{if(!_0x315bcd[_0x106f9f(0x32a)]['has'](_0x359f9e))_0x315bcd[_0x106f9f(0x32a)]['set'](_0x359f9e,new _0x3812cb());_0x315bcd=_0x315bcd[_0x106f9f(0x32a)][_0x106f9f(0x29e)](_0x359f9e);}}_0x315bcd['terminal']=!![];}return _0x3caa31;}const _0xa6f78c=new Map();function _0x44c91e(_0x1757f0,_0x32340a,_0x491515){const _0x3c4eb5=_0x2d9d5f,_0x313ba1=_0xa6f78c[_0x3c4eb5(0x29e)](_0x1757f0);if(_0x313ba1&&_0x313ba1[_0x3c4eb5(0x3e4)]>Date['now']())return _0x313ba1['val'];const _0x17d8b7=_0x491515();return _0xa6f78c[_0x3c4eb5(0x315)](_0x1757f0,{'val':_0x17d8b7,'exp':Date[_0x3c4eb5(0x471)]()+_0x32340a}),_0x17d8b7;}function _0x399a5d(_0x566656,_0x557e92,_0x1f4ed1,_0x29e15b){const _0x47683a=_0x2d9d5f,_0x11630c=_0x557e92[_0x47683a(0x1be)]??_0x29e15b[_0x47683a(0x1be)];switch(_0x566656){case _0x47683a(0x1be):return[..._0x1f4ed1[_0x47683a(0x3de)][_0x47683a(0x2f6)]()][_0x47683a(0x1a2)](_0x111a45=>!_0x111a45['startsWith']('~'));case _0x47683a(0x291):return _0x44c91e(_0x47683a(0x2ee)+_0x11630c,0x7d0,()=>{const _0x12a9eb=_0x47683a;try{return[..._0x1f4ed1[_0x12a9eb(0x1be)](_0x11630c)[_0x12a9eb(0x330)][_0x12a9eb(0x2f6)]()][_0x12a9eb(0x1a2)](_0x18aec8=>!_0x18aec8['startsWith']('~'));}catch{return[];}});case _0x47683a(0x3ac):if(!_0x557e92['type'])return[];return _0x44c91e(_0x47683a(0x408)+_0x11630c+':'+_0x557e92[_0x47683a(0x291)],0x5dc,()=>{const _0x3575c6=_0x47683a;try{const _0x20d839=_0x1f4ed1['env'](_0x11630c)['typeSubDbs'][_0x3575c6(0x29e)](_0x557e92[_0x3575c6(0x291)]);if(!_0x20d839?.[_0x3575c6(0x2dc)])return[];const _0x2c5d5b=[];for(const {key:_0x47aaa7}of _0x20d839[_0x3575c6(0x2dc)]['getRange']({'limit':0x32})){_0x2c5d5b[_0x3575c6(0x44e)](String(_0x47aaa7));if(_0x2c5d5b[_0x3575c6(0x256)]>=0x32)break;}return _0x2c5d5b;}catch{return[];}});case _0x47683a(0x3db):if(!_0x557e92[_0x47683a(0x291)])return[];return _0x44c91e(_0x47683a(0x290)+_0x11630c+':'+_0x557e92[_0x47683a(0x291)],0x7d0,()=>{const _0x40b2e2=_0x47683a;try{const _0x24e1eb=_0x1f4ed1[_0x40b2e2(0x1be)](_0x11630c)[_0x40b2e2(0x330)][_0x40b2e2(0x29e)](_0x557e92[_0x40b2e2(0x291)]);return _0x24e1eb?[..._0x24e1eb[_0x40b2e2(0x3ad)]?.['keys']()??[]]:[];}catch{return[];}});case _0x47683a(0x3f3):if(!_0x557e92[_0x47683a(0x291)])return[];return _0x44c91e(_0x47683a(0x1af)+_0x11630c+':'+_0x557e92[_0x47683a(0x291)],0x7d0,()=>{const _0x590dad=_0x47683a;try{return _0x1f4ed1[_0x590dad(0x36e)]?.[_0x590dad(0x191)]?.(_0x557e92[_0x590dad(0x291)],_0x1f4ed1[_0x590dad(0x1be)](_0x11630c))?.[_0x590dad(0x449)](_0x2dab22=>_0x2dab22['name'])??[];}catch{return[];}});default:return[];}}function _0x337948(_0x32a72f,_0x424243,_0x4f99a3,_0x4d0df8){const _0x277d4d=_0x2d9d5f,_0x117128=_0x32a72f[_0x277d4d(0x226)]('/'),_0x431cf9=_0x32a72f[_0x277d4d(0x40f)]('/'),_0x394c87=_0x117128?_0x431cf9['slice'](0x0,-0x1):_0x431cf9[_0x277d4d(0x36a)](0x0,-0x1),_0x51c636=_0x117128?'':_0x431cf9[_0x431cf9[_0x277d4d(0x256)]-0x1];let _0x2a1b29=_0x424243;const _0x1cb687={};for(const _0x397030 of _0x394c87){if(!_0x397030)continue;if(_0x2a1b29['children']['has'](_0x397030))_0x2a1b29=_0x2a1b29[_0x277d4d(0x32a)][_0x277d4d(0x29e)](_0x397030);else{if(_0x2a1b29[_0x277d4d(0x3b5)])_0x1cb687[_0x2a1b29[_0x277d4d(0x3b5)][_0x277d4d(0x437)]]=_0x397030,_0x2a1b29=_0x2a1b29['dynamic'][_0x277d4d(0x2c7)];else return[];}}const _0x46c7f8=_0x394c87['filter'](Boolean),_0x1c4256=_0x46c7f8[_0x277d4d(0x256)]?_0x46c7f8[_0x277d4d(0x1ac)]('/')+'/':'',_0x2ff6cd=[];for(const [_0x66322c]of _0x2a1b29[_0x277d4d(0x32a)]){if(_0x66322c[_0x277d4d(0x21d)](_0x51c636))_0x2ff6cd[_0x277d4d(0x44e)](_0x1c4256+_0x66322c);}if(_0x2a1b29[_0x277d4d(0x3b5)])for(const _0x5b4f26 of _0x399a5d(_0x2a1b29[_0x277d4d(0x3b5)]['param'],_0x1cb687,_0x4f99a3,_0x4d0df8)){if(String(_0x5b4f26)['startsWith'](_0x51c636))_0x2ff6cd[_0x277d4d(0x44e)](_0x1c4256+_0x5b4f26);}return _0x2ff6cd[_0x277d4d(0x36a)](0x0,0x64);}const _0x2d32d4=[_0x2d9d5f(0x1a8),_0x2d9d5f(0x1b8),_0x2d9d5f(0x1be),_0x2d9d5f(0x1d3),_0x2d9d5f(0x323),'routes',_0x2d9d5f(0x46f),'open',_0x2d9d5f(0x2dd),_0x2d9d5f(0x362)];function _0x1072e7(_0x29ffb5,_0x3c987a,_0x710eea){return function _0x2dba89(_0x46ca15){const _0x2775ef=_0xc3c9;try{const _0xb8c774=_0x46ca15['search'](/\s[{[]/),_0x89ac4b=_0xb8c774>=0x0?_0x46ca15[_0x2775ef(0x36a)](0x0,_0xb8c774):_0x46ca15,_0x3637ac=_0x89ac4b[_0x2775ef(0x30c)]();if(!_0x3637ac){const _0x37c0c3=[..._0x2d32d4,...[..._0x29ffb5['children'][_0x2775ef(0x2f6)]()]][_0x2775ef(0x36a)](0x0,0x64);return[_0x37c0c3,''];}const _0x14ae14=_0x3637ac['split'](/\s+/),_0x1b7c5c=_0x14ae14[0x0],_0x7c9e3=_0x1b7c5c['toUpperCase']();if(_0x14ae14[_0x2775ef(0x256)]===0x1){const _0x58e0c5=_0x1b7c5c['toLowerCase'](),_0x19c74b=_0x2d32d4[_0x2775ef(0x1a2)](_0xca1759=>_0xca1759['startsWith'](_0x58e0c5)),_0x3e587c=_0x337948(_0x1b7c5c,_0x29ffb5,_0x3c987a,_0x710eea),_0x144c6e=[...new Set([..._0x19c74b,..._0x3e587c])][_0x2775ef(0x36a)](0x0,0x64);return[_0x144c6e,_0x1b7c5c];}if(_0x506f0f['has'](_0x7c9e3)&&_0x14ae14['length']===0x2){const _0x4aed88=_0x14ae14[0x1],_0x47b16f=_0x337948(_0x4aed88,_0x29ffb5,_0x3c987a,_0x710eea);return[_0x47b16f[_0x2775ef(0x449)](_0x1eb478=>_0x1b7c5c+'\x20'+_0x1eb478),_0x1b7c5c+'\x20'+_0x4aed88];}if(!_0x506f0f['has'](_0x7c9e3)&&_0x14ae14[_0x2775ef(0x256)]>0x1){const _0x4f605e=_0x337948(_0x1b7c5c,_0x29ffb5,_0x3c987a,_0x710eea),_0x1a17b2='\x20'+_0x14ae14[_0x2775ef(0x36a)](0x1)[_0x2775ef(0x1ac)]('\x20');return[_0x4f605e[_0x2775ef(0x449)](_0x19e03c=>_0x19e03c+_0x1a17b2),_0x1b7c5c+_0x1a17b2];}return[[],_0x46ca15];}catch{return[[],_0x46ca15];}};}async function _0x433e1c(_0x14df1c,_0x2b7208){const _0x17823b=_0x2d9d5f,_0xff3bf6={'enabled':!![],'level':_0x2b7208[_0x17823b(0x22e)]??_0x17823b(0x440)},_0x28d920={'env':_0x17823b(0x3ee)},_0x2e859d={'current':null},_0x559e4f=_0x542c30(_0x14df1c[_0x17823b(0x32d)]['listRoutes']()),_0x3de586=_0x1072e7(_0x559e4f,_0x14df1c,_0x28d920);_0x14df1c[_0x17823b(0x3cf)]['attach'](_0x3311f7=>{const _0x149d58=_0x17823b;if(!_0xff3bf6[_0x149d58(0x26c)])return;_0xbbb0ff(_0x3311f7,_0xff3bf6[_0x149d58(0x37e)]),_0x2e859d[_0x149d58(0x486)]?.['prompt'](!![]);}),_0x51e2cc(_0x14df1c,_0x2b7208);const _0x2729e0=_0x157380['createInterface']({'input':process['stdin'],'output':process['stdout'],'terminal':!![],'completer':_0x3de586,'prompt':_0x33ce41(_0x28d920),'historySize':_0x56b129});try{const _0x10549d=_0x479590[_0x17823b(0x2d2)](_0x24ee4e,'utf8')[_0x17823b(0x40f)]('\x0a')[_0x17823b(0x1a2)](Boolean);_0x2729e0[_0x17823b(0x390)]=_0x10549d[_0x17823b(0x1c9)]()[_0x17823b(0x36a)](0x0,_0x56b129);}catch{}_0x2e859d['current']=_0x2729e0,_0x2729e0['on'](_0x17823b(0x3ae),async _0x26e31d=>{const _0x501098=_0x17823b;_0x2729e0[_0x501098(0x215)]();try{await _0x349a4d(_0x26e31d,_0x14df1c,_0x2b7208,_0xff3bf6,_0x28d920,_0x2729e0);}catch(_0x5d0030){console[_0x501098(0x311)](_0x5da8ff(_0x13acb1[_0x501098(0x281)],'\x20\x20Error:\x20'+_0x5d0030['message']));}finally{_0x2729e0[_0x501098(0x29d)](),_0x2729e0[_0x501098(0x3d9)]();}}),_0x2729e0['on']('close',()=>{const _0x59d1fb=_0x17823b;try{const _0x4a51b0=[..._0x2729e0[_0x59d1fb(0x390)]][_0x59d1fb(0x1c9)]()['filter'](Boolean)[_0x59d1fb(0x36a)](0x0,_0x56b129);_0x479590[_0x59d1fb(0x41b)](_0x24ee4e,_0x4a51b0[_0x59d1fb(0x1ac)]('\x0a')+'\x0a');}catch{}_0x2369c1(_0x14df1c,0x0);});let _0x89408a=0x0;return process['on'](_0x17823b(0x27a),()=>{const _0x4f8602=_0x17823b;if(_0x26a8bc)return _0x2369c1(_0x14df1c,0x82,_0x4f8602(0x27a));if(_0x2729e0[_0x4f8602(0x3ae)]==='')return _0x2369c1(_0x14df1c,0x0,_0x4f8602(0x27a));const _0x5d68bb=Date['now']();if(_0x5d68bb-_0x89408a<0x5dc)return _0x2369c1(_0x14df1c,0x0,_0x4f8602(0x435));_0x89408a=_0x5d68bb,process[_0x4f8602(0x3e1)][_0x4f8602(0x23d)]('\x0a'),_0x2729e0[_0x4f8602(0x3a0)](0x0),_0x2729e0[_0x4f8602(0x3d9)](),process[_0x4f8602(0x324)]['write'](_0x5da8ff(_0x13acb1['dim'],'\x20\x20(press\x20Ctrl+C\x20again\x20to\x20exit)\x0a'));}),process['on'](_0x17823b(0x3e7),()=>_0x2369c1(_0x14df1c,0x0,_0x17823b(0x3e7))),process['on']('SIGBREAK',()=>_0x2369c1(_0x14df1c,0x0,_0x17823b(0x3c0))),_0x2729e0['prompt'](),_0x2729e0;}return okdbShell={'start':_0x433e1c,'colorLog':_0xbbb0ff,'lenientParse':_0x4be0f1,'_splitLine':_0x6f17fd,'_formatRouteHelpLines':_0x3b5f72,'_routeSummary':_0xdb2c8d,'_routeTags':_0x554546},okdbShell;}var hasRequiredOkdb;function requireOkdb(){const _0x41adb7=_0x26eb70;if(hasRequiredOkdb)return okdb$1;hasRequiredOkdb=0x1;try{process['loadEnvFile']();}catch{}const _0x2aedce=require$$1$1,_0x55df84=require$$1;function _0x488b8d(_0x46d8af){const _0x2c1e30=_0xc3c9,_0x5185c3=_0x46d8af['slice'](0x2),_0x8021ad={};let _0x3204dd=0x0;while(_0x3204dd<_0x5185c3[_0x2c1e30(0x256)]){const _0x303d4c=_0x5185c3[_0x3204dd];if(_0x303d4c==='--port'||_0x303d4c==='-p')_0x8021ad['port']=Number(_0x5185c3[++_0x3204dd]);else{if(_0x303d4c===_0x2c1e30(0x47f)||_0x303d4c==='-d')_0x8021ad[_0x2c1e30(0x2ef)]=_0x5185c3[++_0x3204dd];else{if(_0x303d4c==='--key'||_0x303d4c==='-k')_0x8021ad[_0x2c1e30(0x3ac)]=_0x5185c3[++_0x3204dd];else{if(_0x303d4c===_0x2c1e30(0x198)||_0x303d4c==='-c')_0x8021ad['config']=_0x5185c3[++_0x3204dd];else{if(_0x303d4c===_0x2c1e30(0x395))_0x8021ad['logLevel']=_0x5185c3[++_0x3204dd];else{if(_0x303d4c===_0x2c1e30(0x2aa))_0x8021ad[_0x2c1e30(0x1c1)]=!![];else{if(_0x303d4c==='--no-admin')_0x8021ad[_0x2c1e30(0x3bb)]=!![];else{if(_0x303d4c==='--env'||_0x303d4c==='-e')_0x8021ad[_0x2c1e30(0x1be)]=_0x5185c3[++_0x3204dd];else{if(_0x303d4c===_0x2c1e30(0x346))_0x8021ad[_0x2c1e30(0x323)]=_0x5185c3[++_0x3204dd];else{if(_0x303d4c===_0x2c1e30(0x238))_0x8021ad['changes']=!![];else{if(_0x303d4c===_0x2c1e30(0x248))_0x8021ad[_0x2c1e30(0x3d1)]=!![];else{if(_0x303d4c===_0x2c1e30(0x241))_0x8021ad[_0x2c1e30(0x473)]=!![];else{if(_0x303d4c===_0x2c1e30(0x305)){const _0x2c2d45=[];while(_0x3204dd+0x1<_0x5185c3[_0x2c1e30(0x256)]&&!_0x5185c3[_0x3204dd+0x1][_0x2c1e30(0x21d)]('--')){_0x2c2d45['push'](_0x5185c3[++_0x3204dd]);}_0x8021ad[_0x2c1e30(0x308)]=_0x2c2d45['length']>0x0?_0x2c2d45:!![];}else{if(_0x303d4c===_0x2c1e30(0x3d0))_0x8021ad[_0x2c1e30(0x282)]=!![];else{if(_0x303d4c===_0x2c1e30(0x1fc))_0x8021ad[_0x2c1e30(0x1fe)]=_0x5185c3[++_0x3204dd];else{if(_0x303d4c===_0x2c1e30(0x234))_0x8021ad['password']=_0x5185c3[++_0x3204dd];else{if(_0x303d4c===_0x2c1e30(0x27f))_0x8021ad[_0x2c1e30(0x296)]=_0x5185c3[++_0x3204dd];else{if(_0x303d4c===_0x2c1e30(0x22f))_0x8021ad[_0x2c1e30(0x1c7)]=_0x5185c3[++_0x3204dd];else{if(_0x303d4c===_0x2c1e30(0x2f1))_0x8021ad[_0x2c1e30(0x42d)]=_0x5185c3[++_0x3204dd];else{if(_0x303d4c===_0x2c1e30(0x232))_0x8021ad['ttl']=_0x5185c3[++_0x3204dd];else{if(_0x303d4c===_0x2c1e30(0x34d))_0x8021ad[_0x2c1e30(0x48e)]=_0x5185c3[++_0x3204dd];else{if(_0x303d4c===_0x2c1e30(0x3e9)||_0x303d4c==='-u')_0x8021ad[_0x2c1e30(0x22c)]=_0x5185c3[++_0x3204dd];else{if(_0x303d4c===_0x2c1e30(0x1eb))_0x8021ad['selfAddress']=_0x5185c3[++_0x3204dd];else{if(_0x303d4c==='--version'||_0x303d4c==='-v'){const _0x4bca2f=require$$2;console['log'](_0x4bca2f[_0x2c1e30(0x394)]),process[_0x2c1e30(0x2dd)](0x0);}else(_0x303d4c===_0x2c1e30(0x3b9)||_0x303d4c==='-h')&&(_0x3a5560(),process['exit'](0x0));}}}}}}}}}}}}}}}}}}}}}}}_0x3204dd++;}return _0x8021ad;}function _0x3a5560(){console['log']('\x0a\x20\x20okdb\x20—\x20standalone\x20OKDB\x20server\x0a\x0a\x20\x20Usage:\x0a\x20\x20\x20\x20okdb\x20[options]\x0a\x20\x20\x20\x20okdb\x20<command>\x0a\x0a\x20\x20Options:\x0a\x20\x20\x20\x20-p,\x20--port\x20<port>\x20\x20\x20\x20\x20\x20\x20\x20HTTP\x20port\x20(default:\x208484)\x0a\x20\x20\x20\x20-d,\x20--path\x20<dir>\x20\x20\x20\x20\x20\x20\x20\x20\x20Database\x20directory\x20(default:\x20./okdb-data)\x0a\x20\x20\x20\x20-k,\x20--key\x20\x20<secret>\x20\x20\x20\x20\x20\x20Encryption\x20key\x20for\x20data\x20at\x20rest\x0a\x20\x20\x20\x20-c,\x20--config\x20<file>\x20\x20\x20\x20\x20\x20Config\x20file\x20path\x20(default:\x20.kdbconfig)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--log-level\x20<level>\x20\x20Log\x20level:\x20debug\x20|\x20info\x20|\x20warn\x20|\x20error\x20(default:\x20info)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-repl\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Start\x20server\x20without\x20interactive\x20shell\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-admin\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20admin\x20UI\x0a\x20\x20\x20\x20\x20\x20\x20\x20--open\x20[ip\x20...]\x20\x20\x20\x20\x20\x20Open\x20mode:\x20bypass\x20auth\x20for\x20listed\x20IPs\x20(default:\x20localhost).\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Examples:\x20--open\x20\x20--open\x20192.168.1.0/24\x20\x20--open\x20*\x0a\x20\x20\x20\x20\x20\x20\x20\x20--log-requests\x20\x20\x20\x20\x20\x20\x20Print\x20every\x20HTTP\x20request\x20to\x20stdout\x20(for\x20debugging)\x0a\x20\x20\x20\x20-v,\x20--version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Print\x20version\x20and\x20exit\x0a\x20\x20\x20\x20-h,\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x0a\x0a\x20\x20Commands:\x0a\x20\x20\x20\x20version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Print\x20version\x20and\x20exit\x0a\x20\x20\x20\x20doctor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Run\x20health\x20checks\x0a\x20\x20\x20\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Create\x20.kdbconfig\x20and\x20okdb-data/\x0a\x20\x20\x20\x20token\x20create\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Create\x20a\x20token\x20in\x20the\x20local\x20DB\x20(direct\x20access,\x20no\x20HTTP)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--name\x20<name>\x20\x20\x20\x20\x20\x20For\x20password\x20login\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--password\x20<pass>\x20\x20Password\x20(requires\x20--name)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--label\x20<text>\x20\x20\x20\x20\x20Human\x20description\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--permissions\x20<l>\x20\x20Comma-separated\x20baseline\x20permissions\x20(e.g.\x20\x22*\x22\x20or\x20\x22data:read\x22)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--grants\x20<json>\x20\x20\x20\x20Per-env\x20grants\x20as\x20JSON\x20(e.g.\x20\x27{\x22orders\x22:[\x22data:*\x22]}\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--ttl\x20<ms>\x20\x20\x20\x20\x20\x20\x20\x20\x20Optional\x20TTL\x20in\x20milliseconds\x0a\x20\x20\x20\x20token\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20List\x20all\x20tokens\x20in\x20the\x20local\x20DB\x0a\x20\x20\x20\x20token\x20revoke\x20<id>\x20\x20\x20\x20\x20\x20\x20\x20Revoke\x20(delete)\x20a\x20token\x20by\x20id\x20(full\x20uuid\x20or\x20unique\x20prefix)\x0a\x20\x20\x20\x20join\x20<address>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Join\x20an\x20existing\x20cluster\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--token\x20<t>\x20\x20\x20\x20\x20\x20\x20\x20Bearer\x20token\x20from\x20the\x20cluster\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--username\x20<u>\x20\x20\x20\x20\x20Or,\x20username\x20for\x20login\x20exchange\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--password\x20<p>\x20\x20\x20\x20\x20Password\x20for\x20login\x20exchange\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--address\x20<addr>\x20\x20\x20This\x20node\x27s\x20reachable\x20sync\x20address\x20(required)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--path\x20<dir>\x20\x20\x20\x20\x20\x20\x20Local\x20DB\x20path\x0a\x20\x20\x20\x20backup\x20[dir]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Hot\x20filesystem\x20backup\x20via\x20LMDB\x20native\x20copy\x20(default:\x20./okdb-backup)\x0a\x20\x20\x20\x20export\x20<file>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Streaming\x20NDJSON\x20logical\x20export\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env\x20<name>\x20\x20\x20\x20\x20\x20env\x20to\x20export\x20(default:\x20default)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--types\x20<a,b,...>\x20comma-separated\x20type\x20filter\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--changes\x20\x20\x20\x20\x20\x20\x20\x20\x20include\x20changelog\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--blobs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20also\x20export\x20blob\x20files\x20alongside\x0a\x20\x20\x20\x20import\x20<file>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Streaming\x20NDJSON\x20logical\x20import\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env\x20<name>\x20\x20\x20\x20\x20\x20target\x20env\x20override\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--types\x20<a,b,...>\x20import\x20only\x20these\x20types\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--drop\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20drop\x20&\x20recreate\x20existing\x20types\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--changes\x20\x20\x20\x20\x20\x20\x20\x20\x20restore\x20changelog\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--blobs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20also\x20import\x20blob\x20files\x20alongside\x0a\x20\x20\x20\x20reset\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Delete\x20and\x20recreate\x20database\x20(with\x20confirmation)\x0a\x20\x20\x20\x20license\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20List\x20stored\x20licenses,\x20current\x20tier,\x20and\x20usage\x0a\x20\x20\x20\x20license\x20<blob|path>\x20\x20\x20\x20\x20\x20Add\x20a\x20license\x20blob\x20(or\x20read\x20from\x20a\x20.license\x20file)\x0a\x20\x20\x20\x20license\x20<activation>\x20\x20\x20\x20\x20Activate\x20a\x20previously-added\x20license\x20with\x20the\x20vendor\x27s\x20token\x0a\x20\x20\x20\x20license\x20<id>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20details\x20for\x20one\x20stored\x20license\x20(by\x20uuid\x20or\x20prefix)\x0a\x20\x20\x20\x20license\x20remove\x20<id>\x20\x20\x20\x20\x20\x20Remove\x20a\x20stored\x20license\x0a\x0a\x20\x20Environment\x20variables:\x0a\x20\x20\x20\x20OKDB_PORT\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20HTTP\x20port\x0a\x20\x20\x20\x20OKDB_PATH\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Database\x20directory\x0a\x20\x20\x20\x20OKDB_LOG_LEVEL\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Log\x20level\x20(debug|info|warn|error)\x0a\x20\x20\x20\x20OKDB_KEY\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Encryption\x20key\x0a\x20\x20\x20\x20OKDB_NO_REPL=1\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20REPL\x0a\x20\x20\x20\x20OKDB_NO_ADMIN=1\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20admin\x20UI\x0a\x0a\x20\x20Config\x20file\x20(.kdbconfig)\x20—\x20JSON,\x20all\x20keys\x20optional:\x0a\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22port\x22:\x20\x20\x20\x20\x208484,\x0a\x20\x20\x20\x20\x20\x20\x22path\x22:\x20\x20\x20\x20\x20\x22./okdb-data\x22,\x0a\x20\x20\x20\x20\x20\x20\x22key\x22:\x20\x20\x20\x20\x20\x20\x22...\x22,\x0a\x20\x20\x20\x20\x20\x20\x22logLevel\x22:\x20\x22info\x22,\x0a\x20\x20\x20\x20\x20\x20\x22noAdmin\x22:\x20\x20false,\x0a\x20\x20\x20\x20\x20\x20\x22noRepl\x22:\x20\x20\x20false,\x0a\x20\x20\x20\x20\x20\x20\x22auth\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22open\x22:\x20false\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20Examples:\x0a\x20\x20\x20\x20okdb\x0a\x20\x20\x20\x20okdb\x20--port\x209000\x20--path\x20./mydb\x0a\x20\x20\x20\x20okdb\x20--no-repl\x20--port\x208080\x0a\x20\x20\x20\x20okdb\x20--open\x0a\x20\x20\x20\x20okdb\x20--open\x20192.168.1.0/24\x0a\x20\x20\x20\x20okdb\x20doctor\x0a\x20\x20\x20\x20okdb\x20backup\x20./my-backup\x0a');}const _0x2527de=new Set([_0x41adb7(0x247),_0x41adb7(0x440),_0x41adb7(0x2c4),_0x41adb7(0x311)]);function _0x3a0a04(_0x406739){const _0x41293d=_0x41adb7,_0x202105=_0x406739[_0x41293d(0x3e0)]?_0x2aedce['resolve'](_0x406739[_0x41293d(0x3e0)]):_0x2aedce[_0x41293d(0x31c)](_0x41293d(0x498));let _0x550a7c={};if(_0x55df84[_0x41293d(0x463)](_0x202105))try{const _0x20aac2=_0x55df84[_0x41293d(0x2d2)](_0x202105,'utf8')[_0x41293d(0x43d)](/^\uFEFF/,'');_0x550a7c=JSON[_0x41293d(0x1c6)](_0x20aac2),console[_0x41293d(0x3cf)](_0x41293d(0x2d9)+_0x202105);}catch(_0x17e721){console[_0x41293d(0x311)](_0x41293d(0x322)+_0x202105+':\x20'+_0x17e721[_0x41293d(0x1bc)]),process[_0x41293d(0x2dd)](0x1);}const _0x18fdc0={'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},_0x2320f2={'port':_0x406739[_0x41293d(0x25d)]??_0x550a7c['port']??_0x18fdc0[_0x41293d(0x25d)]??0x2124,'dbPath':_0x406739['path']??_0x550a7c[_0x41293d(0x2ef)]??_0x18fdc0[_0x41293d(0x2ef)]??'./okdb-data','key':_0x406739[_0x41293d(0x3ac)]??_0x550a7c[_0x41293d(0x3ac)]??_0x18fdc0['key']??undefined,'logLevel':_0x406739[_0x41293d(0x22e)]??_0x550a7c[_0x41293d(0x22e)]??_0x18fdc0['logLevel']??'info','noRepl':_0x406739['noRepl']??_0x550a7c['noRepl']??_0x18fdc0['noRepl']??![],'noAdmin':_0x406739['noAdmin']??_0x550a7c[_0x41293d(0x3bb)]??_0x18fdc0[_0x41293d(0x3bb)]??![],'admin':_0x550a7c['admin']??{},'api':_0x550a7c[_0x41293d(0x257)]??undefined,'auth':_0x550a7c['auth']??undefined,'mcp':_0x550a7c[_0x41293d(0x3aa)]??undefined,'timeMachine':_0x550a7c['timeMachine']!==![]?_0x550a7c['timeMachine']??{}:![]};return _0x406739[_0x41293d(0x308)]!==undefined&&(_0x2320f2[_0x41293d(0x36c)]=_0x2320f2[_0x41293d(0x36c)]||{},_0x2320f2[_0x41293d(0x36c)][_0x41293d(0x308)]=_0x406739[_0x41293d(0x308)]),_0x406739[_0x41293d(0x282)]&&(_0x2320f2['debug']=_0x2320f2['debug']||{},_0x2320f2['debug'][_0x41293d(0x282)]=!![]),(!Number['isInteger'](_0x2320f2[_0x41293d(0x25d)])||_0x2320f2[_0x41293d(0x25d)]<0x1||_0x2320f2['port']>0xffff)&&(console[_0x41293d(0x311)](_0x41293d(0x30b)+_0x2320f2[_0x41293d(0x25d)]+_0x41293d(0x442)),process['exit'](0x1)),!_0x2527de[_0x41293d(0x2d3)](_0x2320f2[_0x41293d(0x22e)])&&(console[_0x41293d(0x311)]('[okdb]\x20invalid\x20log\x20level:\x20\x22'+_0x2320f2[_0x41293d(0x22e)]+_0x41293d(0x26b)),process[_0x41293d(0x2dd)](0x1)),_0x2320f2;}function _0x1b0842(_0x3ea9c5){const _0x2db36d=_0x41adb7;return!!(_0x3ea9c5&&typeof _0x3ea9c5==='object'&&!Array[_0x2db36d(0x23e)](_0x3ea9c5)&&Object[_0x2db36d(0x2f6)](_0x3ea9c5)['length']>0x0);}const _0x3df415=!process[_0x41adb7(0x3e1)]['isTTY']||!!process.env.NO_COLOR;function _0x331012(_0x1a6165,_0x339283){const _0x3c1609=_0x41adb7;return _0x3df415?_0x339283:'\x1b['+_0x1a6165+'m'+_0x339283+_0x3c1609(0x28b);}function _0x250dbc(_0x3e159f){const _0x5f3b43=_0x41adb7;if(!_0x3e159f||_0x3e159f[_0x5f3b43(0x256)]===0x0)return;const _0x2bfbf6='─'[_0x5f3b43(0x319)](0x38);process[_0x5f3b43(0x324)]['write']('\x0a'),process[_0x5f3b43(0x324)][_0x5f3b43(0x23d)](_0x331012('33','\x20\x20⚠\x20\x20'+_0x3e159f[_0x5f3b43(0x256)]+_0x5f3b43(0x1a4)+(_0x3e159f[_0x5f3b43(0x256)]>0x1?'S':'')+'\x0a')),process[_0x5f3b43(0x324)][_0x5f3b43(0x23d)]('\x20\x20'+_0x2bfbf6+'\x0a');for(const _0x2c70b7 of _0x3e159f){const _0x200c66=_0x2c70b7[_0x5f3b43(0x37e)]===_0x5f3b43(0x311)?_0x331012('31','\x20\x20✗'):_0x331012('33',_0x5f3b43(0x277));process[_0x5f3b43(0x324)][_0x5f3b43(0x23d)](_0x200c66+'\x20\x20'+_0x331012('1',_0x2c70b7[_0x5f3b43(0x42c)])+'\x0a'),process['stderr'][_0x5f3b43(0x23d)](_0x5f3b43(0x2cd)+_0x2c70b7[_0x5f3b43(0x1bc)]+'\x0a');if(_0x2c70b7['hint'])process['stderr'][_0x5f3b43(0x23d)](_0x5f3b43(0x2cd)+_0x331012('2',_0x5f3b43(0x252)+_0x2c70b7[_0x5f3b43(0x3cc)])+'\x0a');process['stderr'][_0x5f3b43(0x23d)]('\x0a');}process[_0x5f3b43(0x324)][_0x5f3b43(0x23d)]('\x20\x20'+_0x2bfbf6+'\x0a\x0a');}function _0x2d7fcc(_0x35a53a,_0x19b871){const _0x27293d=_0x41adb7,_0x322710=_0x35a53a[_0x27293d(0x32d)][_0x27293d(0x1e6)](_0x19b871);return new Promise((_0xb04a33,_0x445c4d)=>{const _0x25977a=_0x27293d;_0x322710[_0x25977a(0x209)](_0x25977a(0x450),_0xb04a33),_0x322710[_0x25977a(0x209)]('error',_0x445c4d);});}async function _0x2b0b16(_0x36fbca){const _0x34b64a=_0x41adb7,_0x39c388=require$$3;console[_0x34b64a(0x3cf)](_0x34b64a(0x1f4));let _0x22bbdd=!![];const _0x390113=(_0x38f8d8,_0x39f471)=>{const _0x24dca5=_0x34b64a;console[_0x24dca5(0x3cf)]('\x20\x20'+(_0x38f8d8?'✓':'✗')+'\x20'+_0x39f471);if(!_0x38f8d8)_0x22bbdd=![];},_0x19fcd8=Number(process[_0x34b64a(0x394)][_0x34b64a(0x43d)]('v','')[_0x34b64a(0x40f)]('.')[0x0]);_0x390113(_0x19fcd8>=0x12,_0x34b64a(0x3fd)+process[_0x34b64a(0x394)]+(_0x19fcd8<0x12?'\x20\x20(need\x20≥\x2018)':''));const _0x2bb5f0=_0x2aedce[_0x34b64a(0x31c)](_0x36fbca[_0x34b64a(0x25a)]);try{_0x55df84[_0x34b64a(0x375)](_0x2bb5f0,{'recursive':!![]});const _0x5eda66=_0x2aedce['join'](_0x2bb5f0,_0x34b64a(0x301));_0x55df84[_0x34b64a(0x41b)](_0x5eda66,''),_0x55df84[_0x34b64a(0x316)](_0x5eda66),_0x390113(!![],_0x34b64a(0x3dc)+_0x2bb5f0);}catch(_0x5a2e30){_0x390113(![],_0x34b64a(0x355)+_0x2bb5f0+_0x34b64a(0x20b)+_0x5a2e30[_0x34b64a(0x1bc)]+')');}const _0x2316fb=await new Promise(_0x30f077=>{const _0x548b64=_0x34b64a,_0x4b2493=_0x39c388[_0x548b64(0x40b)]();_0x4b2493[_0x548b64(0x209)](_0x548b64(0x311),()=>_0x30f077(![])),_0x4b2493[_0x548b64(0x209)](_0x548b64(0x450),()=>{const _0x18e805=_0x548b64;_0x4b2493[_0x18e805(0x3ab)](),_0x30f077(!![]);}),_0x4b2493[_0x548b64(0x1e6)](_0x36fbca[_0x548b64(0x25d)],'127.0.0.1');});_0x390113(_0x2316fb,_0x34b64a(0x1fa)+_0x36fbca['port']+'\x20'+(_0x2316fb?_0x34b64a(0x34a):'already\x20in\x20use'));const _0x36f199=_0x2aedce[_0x34b64a(0x31c)](_0x34b64a(0x498));if(_0x55df84['existsSync'](_0x36f199))try{JSON[_0x34b64a(0x1c6)](_0x55df84[_0x34b64a(0x2d2)](_0x36f199,_0x34b64a(0x26e))[_0x34b64a(0x43d)](/^\uFEFF/,'')),_0x390113(!![],'config\x20file\x20valid:\x20'+_0x36f199);}catch(_0x398717){_0x390113(![],_0x34b64a(0x43a)+_0x398717['message']);}else _0x390113(!![],_0x34b64a(0x1d6));console['log'](''),_0x22bbdd?console['log'](_0x34b64a(0x1c5)):(console[_0x34b64a(0x3cf)](_0x34b64a(0x266)),process[_0x34b64a(0x2dd)](0x1));}async function _0x16205e(){const _0xc2faa=_0x41adb7,_0x3386e5=_0x2aedce[_0xc2faa(0x31c)](_0xc2faa(0x498));!_0x55df84[_0xc2faa(0x463)](_0x3386e5)?(_0x55df84['writeFileSync'](_0x3386e5,JSON[_0xc2faa(0x3a9)]({'port':0x2124,'path':_0xc2faa(0x1ed),'logLevel':'info','noRepl':![],'noAdmin':![]},null,0x2)+'\x0a'),console['log'](_0xc2faa(0x3d5))):console[_0xc2faa(0x3cf)]('[okdb]\x20.kdbconfig\x20already\x20exists\x20—\x20skipping');const _0x132ada=_0x2aedce[_0xc2faa(0x31c)](_0xc2faa(0x1ed));!_0x55df84[_0xc2faa(0x463)](_0x132ada)?(_0x55df84[_0xc2faa(0x375)](_0x132ada,{'recursive':!![]}),console[_0xc2faa(0x3cf)](_0xc2faa(0x37f))):console['log']('[okdb]\x20./okdb-data\x20already\x20exists\x20—\x20skipping'),console[_0xc2faa(0x3cf)](_0xc2faa(0x3f7));}async function _0x3d8480(_0x5a4dc9){const _0x534b33=_0x41adb7,_0x4cc5e6=_0x2aedce[_0x534b33(0x31c)](_0x5a4dc9[_0x534b33(0x25a)]);if(!_0x55df84[_0x534b33(0x463)](_0x4cc5e6)){console[_0x534b33(0x3cf)]('[okdb]\x20nothing\x20to\x20reset\x20—\x20'+_0x4cc5e6+_0x534b33(0x2be));return;}const _0x3cbffa=require$$0$2,_0x58f3e9=_0x3cbffa['createInterface']({'input':process[_0x534b33(0x488)],'output':process[_0x534b33(0x3e1)]}),_0x24a4a6=await new Promise(_0xc509da=>_0x58f3e9[_0x534b33(0x239)]('\x0a\x20\x20Delete\x20ALL\x20data\x20in\x20'+_0x4cc5e6+'?\x0a\x20\x20Type\x20\x22yes\x22\x20to\x20confirm:\x20',_0xc509da));_0x58f3e9[_0x534b33(0x3ab)](),console['log']('');if(_0x24a4a6[_0x534b33(0x3a4)]()[_0x534b33(0x35b)]()!==_0x534b33(0x420)){console[_0x534b33(0x3cf)](_0x534b33(0x415));return;}_0x55df84[_0x534b33(0x47c)](_0x4cc5e6,{'recursive':!![],'force':!![]}),console[_0x534b33(0x3cf)]('[okdb]\x20reset:\x20'+_0x4cc5e6+_0x534b33(0x312));}async function _0x46cf90(_0x5c9ba3,_0x3a86ae){const _0x41d79b=_0x41adb7,_0x233b85=require$$5,_0x4f4ded=_0x2aedce[_0x41d79b(0x31c)](_0x3a86ae[_0x41d79b(0x25a)]);console['log'](_0x41d79b(0x368)+_0x4f4ded+'…');const _0x2b90b3=new _0x233b85(_0x4f4ded,_0x3a86ae['key']?{'encryptionKey':_0x3a86ae[_0x41d79b(0x3ac)]}:{});await _0x2b90b3['open'](),console['log']('[okdb]\x20backing\x20up\x20to\x20'+_0x5c9ba3+'…');const {envs:_0x4ce83a}=await _0x2b90b3['migrate'][_0x41d79b(0x381)](_0x5c9ba3);for(const _0x335574 of _0x4ce83a){const _0x3e8d1f=_0x335574[_0x41d79b(0x23a)]>0x0?_0x41d79b(0x20b)+(_0x335574['sizeBefore']/0x400/0x400)[_0x41d79b(0x219)](0x2)+'\x20MB\x20→\x20'+(_0x335574[_0x41d79b(0x1f1)]/0x400/0x400)[_0x41d79b(0x219)](0x2)+_0x41d79b(0x3b7):'';console[_0x41d79b(0x3cf)]('\x20\x20✓\x20'+_0x335574[_0x41d79b(0x1fe)]+'\x20\x20→\x20\x20'+_0x335574[_0x41d79b(0x3a8)]+_0x3e8d1f);}await _0x2b90b3[_0x41d79b(0x3ab)](),console['log'](_0x41d79b(0x222));}async function _0x3302b1(_0x5d63b7,_0x31c6a5,_0x525fd2){const _0x32efba=_0x41adb7,_0x72471f=require$$5,_0x4bb917=_0x2aedce['resolve'](_0x31c6a5[_0x32efba(0x25a)]),_0x7f7ef6=_0x525fd2[_0x32efba(0x1be)]??_0x32efba(0x3ee),_0x397357=_0x525fd2[_0x32efba(0x323)]?_0x525fd2['types'][_0x32efba(0x40f)](',')['map'](_0x4ca131=>_0x4ca131[_0x32efba(0x3a4)]()):null;console[_0x32efba(0x3cf)]('[okdb]\x20opening\x20'+_0x4bb917+'…');const _0x5441fa=new _0x72471f(_0x4bb917,_0x31c6a5[_0x32efba(0x3ac)]?{'encryptionKey':_0x31c6a5['key']}:{});await _0x5441fa[_0x32efba(0x308)](),console[_0x32efba(0x3cf)]('[okdb]\x20exporting\x20env\x20\x22'+_0x7f7ef6+_0x32efba(0x276)+_0x5d63b7+'…');const _0x4e8da2=await _0x5441fa[_0x32efba(0x227)]['exportToFile'](_0x5d63b7,{'envName':_0x7f7ef6,'types':_0x397357,'includeChanges':!!_0x525fd2[_0x32efba(0x339)]});console[_0x32efba(0x3cf)](_0x32efba(0x1f8)+_0x4e8da2[_0x32efba(0x323)]+_0x32efba(0x3d7)+_0x4e8da2[_0x32efba(0x1c4)]+_0x32efba(0x2d8)+_0x4e8da2['changes']);if(_0x525fd2[_0x32efba(0x3d1)]){const _0x39ab30=_0x2aedce['join'](_0x2aedce[_0x32efba(0x350)](_0x5d63b7),_0x32efba(0x3d1));process[_0x32efba(0x3e1)][_0x32efba(0x23d)](_0x32efba(0x294));const {count:_0x15c6e3,bytes:_0x40b2f8}=await _0x5441fa[_0x32efba(0x227)][_0x32efba(0x2f9)](_0x39ab30);console[_0x32efba(0x3cf)]('\x0d[okdb]\x20blobs:\x20'+_0x39ab30+'\x20\x20('+_0x15c6e3+'\x20file'+(_0x15c6e3!==0x1?'s':'')+',\x20'+(_0x40b2f8/0x400/0x400)[_0x32efba(0x219)](0x2)+_0x32efba(0x3b7));}await _0x5441fa[_0x32efba(0x3ab)](),console['log'](_0x32efba(0x455));}async function _0x591fa7(_0x3819c0,_0x431a0b,_0x4e8150){const _0x1c374a=_0x41adb7,_0x38bc4d=require$$5,_0x393cef=_0x2aedce['resolve'](_0x431a0b['dbPath']),_0x358e58=_0x4e8150[_0x1c374a(0x1be)]??null,_0x1c9cc6=_0x4e8150[_0x1c374a(0x323)]?_0x4e8150['types'][_0x1c374a(0x40f)](',')['map'](_0x120d0a=>_0x120d0a['trim']()):null,_0x559aba=!!_0x4e8150[_0x1c374a(0x473)];console[_0x1c374a(0x3cf)](_0x1c374a(0x368)+_0x393cef+'…');const _0x204a60=new _0x38bc4d(_0x393cef,_0x431a0b[_0x1c374a(0x3ac)]?{'encryptionKey':_0x431a0b[_0x1c374a(0x3ac)]}:{});await _0x204a60[_0x1c374a(0x308)](),console['log'](_0x1c374a(0x197)+_0x3819c0+'…');const _0x768879=await _0x204a60[_0x1c374a(0x227)][_0x1c374a(0x3fb)](_0x3819c0,{'envName':_0x358e58,'types':_0x1c9cc6,'dropExisting':_0x559aba,'includeChanges':!!_0x4e8150[_0x1c374a(0x339)],'onProgress':({type:_0x44de31,count:_0x4c0651})=>{const _0x26334=_0x1c374a;process[_0x26334(0x3e1)][_0x26334(0x23d)](_0x26334(0x2b4)+_0x44de31+':\x20'+_0x4c0651+_0x26334(0x27b));}});process['stdout'][_0x1c374a(0x23d)]('\x0a'),console[_0x1c374a(0x3cf)](_0x1c374a(0x26f)+_0x768879[_0x1c374a(0x323)]+_0x1c374a(0x3d7)+_0x768879[_0x1c374a(0x1c4)]+_0x1c374a(0x2d8)+_0x768879['changes']);if(_0x4e8150[_0x1c374a(0x3d1)]){const _0x19498e=_0x2aedce['join'](_0x2aedce[_0x1c374a(0x350)](_0x3819c0),_0x1c374a(0x3d1));if(_0x55df84[_0x1c374a(0x463)](_0x19498e)){const {imported:_0x297cf3,skipped:_0x5c00df}=await _0x204a60['migrate']['importBlobs'](_0x19498e);console[_0x1c374a(0x3cf)](_0x1c374a(0x2ec)+_0x297cf3+'\x20\x20skipped='+_0x5c00df);}}await _0x204a60[_0x1c374a(0x3ab)](),console['log'](_0x1c374a(0x3fa));}async function _0x4538fb(_0x161437,_0x40a25c){const _0x1e623e=_0x41adb7;_0x40a25c[_0x1e623e(0x35d)]&&!_0x40a25c[_0x1e623e(0x1fe)]&&(console[_0x1e623e(0x311)](_0x1e623e(0x1e0)),process[_0x1e623e(0x2dd)](0x1));const _0x2192d7=_0x40a25c[_0x1e623e(0x1c7)]?_0x40a25c[_0x1e623e(0x1c7)][_0x1e623e(0x40f)](',')[_0x1e623e(0x449)](_0x5918f8=>_0x5918f8[_0x1e623e(0x3a4)]())['filter'](Boolean):[];let _0xcb4cbb={};if(_0x40a25c[_0x1e623e(0x42d)])try{_0xcb4cbb=JSON[_0x1e623e(0x1c6)](_0x40a25c['grants']);if(typeof _0xcb4cbb!=='object'||Array[_0x1e623e(0x23e)](_0xcb4cbb)||_0xcb4cbb===null)throw new Error();}catch{console[_0x1e623e(0x311)](_0x1e623e(0x38d)),process['exit'](0x1);}const _0x16b468=require$$5,{randomToken:_0x3aab5f,hashToken:_0x1094fa,hashPassword:_0x47b81e}=requireOkdbAuthTokens(),_0x20ae1a=require$$0,_0x6ce0f2=_0x2aedce[_0x1e623e(0x31c)](_0x161437[_0x1e623e(0x25a)]),_0x1a2133=new _0x16b468(_0x6ce0f2,_0x161437['key']?{'encryptionKey':_0x161437[_0x1e623e(0x3ac)]}:{});await _0x1a2133['open']();try{await _0x1a2133[_0x1e623e(0x36c)][_0x1e623e(0x19c)]();if(_0x40a25c[_0x1e623e(0x1fe)]){const _0x1fcfde=await _0x1a2133['auth'][_0x1e623e(0x3a2)](_0x40a25c['name']);_0x1fcfde&&(console['error'](_0x1e623e(0x1e3)+_0x40a25c[_0x1e623e(0x1fe)]+_0x1e623e(0x431)),process['exit'](0x1));}const _0x2438a6=_0x3aab5f(0x20),_0x45100c=_0x1094fa(_0x2438a6),_0x49dbed=_0x40a25c[_0x1e623e(0x35d)]?await _0x47b81e(_0x40a25c['password']):null,_0x248bd4=_0x20ae1a[_0x1e623e(0x269)](),_0x115eda={'tokenHash':_0x45100c,'name':_0x40a25c[_0x1e623e(0x1fe)]||null,'passwordHash':_0x49dbed,'label':_0x40a25c[_0x1e623e(0x296)]||null,'permissions':_0x2192d7,'grants':_0xcb4cbb,'createdAt':Date[_0x1e623e(0x471)](),'lastUsedAt':null},_0x3ca6b0=_0x40a25c['ttl']?{'ttl':Number(_0x40a25c[_0x1e623e(0x30d)])}:undefined;await _0x1a2133['_systemEnv'][_0x1e623e(0x22d)](_0x1e623e(0x398),_0x248bd4,_0x115eda,_0x3ca6b0),console[_0x1e623e(0x3cf)](_0x1e623e(0x401)),console[_0x1e623e(0x3cf)](_0x1e623e(0x255)+_0x248bd4),console['log'](_0x1e623e(0x26a)+(_0x40a25c['name']||'(unset)')),console['log'](_0x1e623e(0x44b)+(_0x40a25c[_0x1e623e(0x296)]||'(unset)')),console['log'](_0x1e623e(0x3f8)+(_0x2192d7['join'](',\x20')||_0x1e623e(0x2c3))),console['log'](_0x1e623e(0x2a9)),console[_0x1e623e(0x3cf)](_0x1e623e(0x2ff)+_0x2438a6+'\x0a');}finally{await _0x1a2133[_0x1e623e(0x3ab)]();}}async function _0x1a748e(_0x7d1a6d){const _0x437bc3=_0x41adb7,_0x10b1d3=require$$5,_0x4972a2=_0x2aedce[_0x437bc3(0x31c)](_0x7d1a6d['dbPath']),_0x360d2d=new _0x10b1d3(_0x4972a2,_0x7d1a6d[_0x437bc3(0x3ac)]?{'encryptionKey':_0x7d1a6d[_0x437bc3(0x3ac)]}:{});await _0x360d2d[_0x437bc3(0x308)]();try{const _0x403424=_0x360d2d[_0x437bc3(0x2ca)];if(!_0x403424||!_0x403424[_0x437bc3(0x3e2)](_0x437bc3(0x398))){console[_0x437bc3(0x3cf)](_0x437bc3(0x3b3));return;}const _0x459da3=[];for(const {key:_0x31b05d,value:_0x23a92a}of _0x403424[_0x437bc3(0x310)](_0x437bc3(0x398))){_0x459da3[_0x437bc3(0x44e)]({'id':_0x31b05d,'name':_0x23a92a[_0x437bc3(0x1fe)]||_0x437bc3(0x477),'label':_0x23a92a[_0x437bc3(0x296)]||_0x437bc3(0x477),'permissions':Array[_0x437bc3(0x23e)](_0x23a92a[_0x437bc3(0x1c7)])?_0x23a92a[_0x437bc3(0x1c7)][_0x437bc3(0x1ac)](','):'','created':_0x23a92a[_0x437bc3(0x2b5)]?new Date(_0x23a92a['createdAt'])[_0x437bc3(0x45b)]()[_0x437bc3(0x36a)](0x0,0xa):''});}if(_0x459da3[_0x437bc3(0x256)]===0x0){console['log']('No\x20tokens.');return;}const _0x12c159=!process[_0x437bc3(0x3e1)][_0x437bc3(0x372)]||process[_0x437bc3(0x3e1)][_0x437bc3(0x372)]>=0x64,_0x202c14=_0x12c159?0x24:0xa,_0x324a41=['ID'[_0x437bc3(0x39e)](_0x202c14),_0x437bc3(0x2e6)[_0x437bc3(0x39e)](0x10),_0x437bc3(0x2a7)['padEnd'](0x14),_0x437bc3(0x3ff)[_0x437bc3(0x39e)](0x14),'CREATED'][_0x437bc3(0x1ac)]('\x20\x20');console[_0x437bc3(0x3cf)]('\x0a'+_0x324a41),console[_0x437bc3(0x3cf)]('-'[_0x437bc3(0x319)](_0x324a41[_0x437bc3(0x256)]));for(const _0x2fb5d3 of _0x459da3){const _0x4d3f9d=_0x12c159?_0x2fb5d3['id']:_0x2fb5d3['id']['slice'](0x0,0x8)+'…';console[_0x437bc3(0x3cf)]([_0x4d3f9d[_0x437bc3(0x39e)](_0x202c14),_0x2fb5d3[_0x437bc3(0x1fe)]['slice'](0x0,0x10)['padEnd'](0x10),_0x2fb5d3['label'][_0x437bc3(0x36a)](0x0,0x14)['padEnd'](0x14),_0x2fb5d3[_0x437bc3(0x1c7)][_0x437bc3(0x36a)](0x0,0x14)['padEnd'](0x14),_0x2fb5d3[_0x437bc3(0x24c)]][_0x437bc3(0x1ac)]('\x20\x20'));}console[_0x437bc3(0x3cf)]('');}finally{await _0x360d2d[_0x437bc3(0x3ab)]();}}async function _0x42f710(_0x1bfed2,_0x5a4a09){const _0x12ed36=_0x41adb7;!_0x1bfed2&&(console['error']('[okdb]\x20error:\x20revoke\x20requires\x20an\x20id\x20argument'),process[_0x12ed36(0x2dd)](0x1));const _0x2a459f=require$$5,_0xf8145d=_0x2aedce[_0x12ed36(0x31c)](_0x5a4a09['dbPath']),_0x5aa8b0=new _0x2a459f(_0xf8145d,_0x5a4a09['key']?{'encryptionKey':_0x5a4a09['key']}:{});await _0x5aa8b0[_0x12ed36(0x308)]();try{const _0x6d9287=_0x5aa8b0[_0x12ed36(0x2ca)];(!_0x6d9287||!_0x6d9287[_0x12ed36(0x3e2)](_0x12ed36(0x398)))&&(console[_0x12ed36(0x311)]('[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22'+_0x1bfed2+'\x22'),process['exit'](0x1));let _0x47f0ec=null,_0x3235c3=null;const _0x3e0ff6=_0x6d9287[_0x12ed36(0x29e)]('~tokens',_0x1bfed2);if(_0x3e0ff6)_0x47f0ec=_0x1bfed2,_0x3235c3=_0x3e0ff6;else{const _0x575812=[];for(const {key:_0x537f23,value:_0x5a4d7e}of _0x6d9287['getRange'](_0x12ed36(0x398))){if(_0x537f23['startsWith'](_0x1bfed2))_0x575812[_0x12ed36(0x44e)]({'key':_0x537f23,'value':_0x5a4d7e});}_0x575812['length']===0x0&&(console[_0x12ed36(0x311)](_0x12ed36(0x283)+_0x1bfed2+'\x22'),process[_0x12ed36(0x2dd)](0x1));if(_0x575812['length']>0x1){console[_0x12ed36(0x311)](_0x12ed36(0x3c9)+_0x1bfed2+'\x22\x20matches\x20'+_0x575812[_0x12ed36(0x256)]+_0x12ed36(0x41e));for(const _0x4b8a3b of _0x575812){console[_0x12ed36(0x311)]('\x20\x20'+_0x4b8a3b[_0x12ed36(0x3ac)]+_0x12ed36(0x467)+(_0x4b8a3b['value'][_0x12ed36(0x1fe)]||'(unset)')+')');}process['exit'](0x1);}_0x47f0ec=_0x575812[0x0][_0x12ed36(0x3ac)],_0x3235c3=_0x575812[0x0]['value'];}await _0x6d9287[_0x12ed36(0x2fc)](_0x12ed36(0x398),_0x47f0ec),console[_0x12ed36(0x3cf)]('\x20\x20✓\x20Revoked\x20token\x20'+_0x47f0ec+'\x20\x20(name:\x20'+(_0x3235c3[_0x12ed36(0x1fe)]||_0x12ed36(0x477))+',\x20label:\x20'+(_0x3235c3[_0x12ed36(0x296)]||_0x12ed36(0x477))+')');}finally{await _0x5aa8b0['close']();}}function _0x3e59a1(_0x465e54,_0x1b57d9){const _0x584e07=_0x41adb7;if(!_0x465e54[_0x584e07(0x386)])return _0x584e07(0x34c);const _0x3fb751=_0x465e54[_0x584e07(0x2fe)];if(!_0x3fb751)return _0x584e07(0x3a1);if(_0x1b57d9>_0x3fb751)return _0x584e07(0x490);return _0x584e07(0x3a1);}function _0x37037c(_0x3dcb4f){const _0x199eae=_0x41adb7;if(!_0x3dcb4f||typeof _0x3dcb4f!==_0x199eae(0x3c1))return'';const _0x1ef37c=Object[_0x199eae(0x380)](_0x3dcb4f)[_0x199eae(0x1a2)](([,_0x18409f])=>_0x18409f)[_0x199eae(0x449)](([_0x19a257])=>_0x19a257);if(_0x1ef37c[_0x199eae(0x256)]===0x0)return _0x199eae(0x2c3);if(_0x1ef37c[_0x199eae(0x256)]<=0x3)return _0x1ef37c['join']('\x20');return _0x1ef37c[_0x199eae(0x36a)](0x0,0x3)[_0x199eae(0x1ac)]('\x20')+('\x20+'+(_0x1ef37c[_0x199eae(0x256)]-0x3));}async function _0x3e9d77(_0x4e4c1b){const _0x1396b5=_0x41adb7,_0xf1399e=require$$5,_0x4b9d9d=requireOkdbLicenseCodec(),{_C:_0x1a1bde}=requireOkdbLicense(),_0xe4b947=_0x2aedce[_0x1396b5(0x31c)](_0x4e4c1b[_0x1396b5(0x25a)]),_0x5af643=new _0xf1399e(_0xe4b947,_0x4e4c1b[_0x1396b5(0x3ac)]?{'encryptionKey':_0x4e4c1b[_0x1396b5(0x3ac)]}:{});await _0x5af643[_0x1396b5(0x308)]();try{const _0x5ead3f=_0x5af643[_0x1396b5(0x2ca)],_0x318ecf=_0x5ead3f?.['db']?.[_0x1396b5(0x29e)]?.(_0x1396b5(0x240))??0x0,_0x58bbe2=[..._0x5af643[_0x1396b5(0x3de)][_0x1396b5(0x2f6)]()][_0x1396b5(0x1a2)](_0x5776a6=>!_0x5776a6['startsWith']('~'))['length'],_0x27f979=_0x5af643[_0x1396b5(0x25b)]?.[_0x1396b5(0x357)];if(_0x27f979){const _0x103710=_0x27f979[_0x1396b5(0x249)]===!![],_0x54980d=_0x103710?_0x1396b5(0x21b):_0x5af643[_0x1396b5(0x25b)][_0x1396b5(0x3a1)]?.[_0x1396b5(0x2e2)]||_0x1396b5(0x29a);console[_0x1396b5(0x3cf)](''),console[_0x1396b5(0x3cf)](_0x1396b5(0x377)+_0x54980d);const _0x416f8f=_0x27f979[_0x1396b5(0x3b8)]||{};if(_0x416f8f[_0x1396b5(0x231)]){const _0x4a302e=Math[_0x1396b5(0x456)](_0x318ecf/_0x416f8f['maxWrites']*0x64);console['log'](_0x1396b5(0x2e8)+_0x318ecf['toLocaleString']()+_0x1396b5(0x31b)+_0x416f8f[_0x1396b5(0x231)]['toLocaleString']()+'\x20\x20('+_0x4a302e+'%)');}else console['log']('\x20\x20Writes:\x20\x20'+_0x318ecf[_0x1396b5(0x35e)]());_0x416f8f[_0x1396b5(0x1d3)]?console[_0x1396b5(0x3cf)](_0x1396b5(0x338)+_0x58bbe2+_0x1396b5(0x31b)+_0x416f8f[_0x1396b5(0x1d3)]):console['log'](_0x1396b5(0x338)+_0x58bbe2),_0x1a1bde?.[_0x1396b5(0x221)]&&console['log'](_0x1396b5(0x2da)+_0x1a1bde['PUB_FINGERPRINT']+_0x1396b5(0x3c8));}if(!_0x5ead3f||!_0x5ead3f[_0x1396b5(0x3e2)](_0x1396b5(0x422))){console[_0x1396b5(0x3cf)](''),console[_0x1396b5(0x3cf)](_0x1396b5(0x439)),console[_0x1396b5(0x3cf)]('');return;}const _0x4fee24=[],_0x148f18=Date[_0x1396b5(0x471)](),_0x5e6ac9=_0x5af643['id'],_0x4dae1c=_0x1396b5(0x29c);for(const {key:_0x5d4bc9,value:_0x1aa0ac}of _0x5ead3f[_0x1396b5(0x310)](_0x1396b5(0x422))){const _0x1f5a96=_0x1aa0ac[_0x1396b5(0x445)]?Buffer[_0x1396b5(0x285)](_0x1aa0ac[_0x1396b5(0x445)],_0x1396b5(0x27d)):Buffer[_0x1396b5(0x42e)](0x8);let _0x3d1ca4='';try{_0x3d1ca4=_0x4b9d9d[_0x1396b5(0x2fb)](_0x5e6ac9,_0x1f5a96,_0x4dae1c)['pin'];}catch{}_0x4fee24['push']({'id':_0x5d4bc9,'licensee':_0x1aa0ac[_0x1396b5(0x2e2)]||'','expires':_0x1aa0ac[_0x1396b5(0x2fe)]?new Date(_0x1aa0ac[_0x1396b5(0x2fe)])['toISOString']()[_0x1396b5(0x36a)](0x0,0xa):'','features':_0x37037c(_0x1aa0ac[_0x1396b5(0x3f9)]),'pin':_0x3d1ca4,'status':_0x3e59a1(_0x1aa0ac,_0x148f18)});}if(_0x4fee24[_0x1396b5(0x256)]===0x0){console[_0x1396b5(0x3cf)](''),console[_0x1396b5(0x3cf)]('\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.'),console['log']('');return;}const _0x2a47bc=['\x20\x20'+'ID'[_0x1396b5(0x39e)](0xe),_0x1396b5(0x2b2)[_0x1396b5(0x39e)](0xe),'EXPIRES'[_0x1396b5(0x39e)](0xc),_0x1396b5(0x485)[_0x1396b5(0x39e)](0x1e),_0x1396b5(0x199)[_0x1396b5(0x39e)](0xa),_0x1396b5(0x3ec)][_0x1396b5(0x1ac)]('\x20');console[_0x1396b5(0x3cf)]('\x0a'+_0x2a47bc);for(const _0x18ddbf of _0x4fee24){const _0x4298e1=_0x18ddbf['id'][_0x1396b5(0x36a)](0x0,0x8)+'…';console['log'](['\x20\x20'+_0x4298e1[_0x1396b5(0x39e)](0xe),_0x18ddbf['licensee'][_0x1396b5(0x36a)](0x0,0xe)[_0x1396b5(0x39e)](0xe),_0x18ddbf['expires'][_0x1396b5(0x39e)](0xc),_0x18ddbf[_0x1396b5(0x3f9)][_0x1396b5(0x36a)](0x0,0x1e)[_0x1396b5(0x39e)](0x1e),_0x18ddbf[_0x1396b5(0x3fc)][_0x1396b5(0x39e)](0xa),_0x18ddbf[_0x1396b5(0x1ea)]][_0x1396b5(0x1ac)]('\x20'));}console[_0x1396b5(0x3cf)]('');}finally{await _0x5af643['close']();}}async function _0x2288c0(_0x21e986,_0x171779){const _0x36ae01=_0x41adb7,_0x498550=require$$5,_0x4d72ca=requireOkdbLicenseCodec();let _0x59f063=_0x21e986;(_0x4d72ca['detectInputType'](_0x21e986)===_0x36ae01(0x2ef)||_0x55df84['existsSync'](_0x21e986)&&_0x55df84['statSync'](_0x21e986)['isFile']())&&(_0x59f063=_0x55df84['readFileSync'](_0x21e986,_0x36ae01(0x26e))[_0x36ae01(0x3a4)]());const _0x1c67c1=_0x2aedce[_0x36ae01(0x31c)](_0x171779[_0x36ae01(0x25a)]),_0xdf241=new _0x498550(_0x1c67c1,_0x171779['key']?{'encryptionKey':_0x171779['key']}:{});await _0xdf241[_0x36ae01(0x308)]();try{!_0xdf241['_license']&&(console[_0x36ae01(0x311)](_0x36ae01(0x391)),process['exit'](0x1));let _0x57758b;try{_0x57758b=await _0xdf241['_license'][_0x36ae01(0x3f4)](_0x59f063);}catch(_0x41f351){console[_0x36ae01(0x311)](_0x36ae01(0x314)+_0x41f351[_0x36ae01(0x1bc)]),process[_0x36ae01(0x2dd)](0x1);}const _0x4edd69=_0xdf241[_0x36ae01(0x25b)][_0x36ae01(0x244)](),_0x3dda8c=_0x4edd69[_0x36ae01(0x421)](_0x213fb1=>_0x213fb1[_0x36ae01(0x389)]===_0x57758b['id'])?.[_0x36ae01(0x3fc)]||'',_0x19427d=Object['entries'](_0x57758b[_0x36ae01(0x3f9)]||{})[_0x36ae01(0x1a2)](([,_0x371831])=>_0x371831)[_0x36ae01(0x449)](([_0x2015af])=>_0x2015af),_0x4e9b26=_0x57758b['limits']||{},_0x568e85=[_0x4e9b26[_0x36ae01(0x1d3)]?_0x36ae01(0x229)+_0x4e9b26[_0x36ae01(0x1d3)]:null,_0x4e9b26['typesPerEnv']?_0x36ae01(0x2fd)+_0x4e9b26[_0x36ae01(0x270)]:null,_0x4e9b26[_0x36ae01(0x3ca)]?_0x36ae01(0x2bc)+_0x4e9b26[_0x36ae01(0x3ca)]:null,_0x4e9b26[_0x36ae01(0x231)]?_0x36ae01(0x1b2)+_0x4e9b26[_0x36ae01(0x231)]['toLocaleString']():null]['filter'](Boolean)[_0x36ae01(0x1ac)]('\x20\x20'),_0x3d668f=_0x57758b[_0x36ae01(0x2d7)]===_0x4d72ca[_0x36ae01(0x347)];console[_0x36ae01(0x3cf)]('\x0a\x20\x20✓\x20License\x20added'),console[_0x36ae01(0x3cf)]('\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x57758b['id']),console['log']('\x20\x20\x20\x20licensee:\x20\x20'+_0x57758b[_0x36ae01(0x2e2)]),console[_0x36ae01(0x3cf)]('\x20\x20\x20\x20expires:\x20\x20\x20'+new Date(_0x57758b[_0x36ae01(0x2fe)])['toISOString']()[_0x36ae01(0x36a)](0x0,0xa)),console[_0x36ae01(0x3cf)]('\x20\x20\x20\x20features:\x20\x20'+(_0x19427d[_0x36ae01(0x1ac)](',\x20')||_0x36ae01(0x2c3)));if(_0x568e85)console[_0x36ae01(0x3cf)]('\x20\x20\x20\x20limits:\x20\x20\x20\x20'+_0x568e85);_0x3d668f?(console[_0x36ae01(0x3cf)](_0x36ae01(0x349)),console['log']('')):(console[_0x36ae01(0x3cf)]('\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20'+_0x3dda8c),console[_0x36ae01(0x3cf)](_0x36ae01(0x303)),console['log'](''),console[_0x36ae01(0x3cf)]('\x20\x20Next\x20step\x20—\x20activate\x20the\x20license:'),console[_0x36ae01(0x3cf)](_0x36ae01(0x39b)+_0x3dda8c+_0x36ae01(0x214)),console[_0x36ae01(0x3cf)](_0x36ae01(0x332)),console[_0x36ae01(0x3cf)](_0x36ae01(0x196)),console[_0x36ae01(0x3cf)](''));}finally{await _0xdf241[_0x36ae01(0x3ab)]();}}async function _0x1bf95b(_0x4be2b5,_0x14283c){const _0x172959=_0x41adb7,_0x57f27a=require$$5,_0x234e1c=_0x2aedce[_0x172959(0x31c)](_0x14283c[_0x172959(0x25a)]),_0x388bd9=new _0x57f27a(_0x234e1c,_0x14283c[_0x172959(0x3ac)]?{'encryptionKey':_0x14283c['key']}:{});await _0x388bd9[_0x172959(0x308)]();try{!_0x388bd9[_0x172959(0x25b)]&&(console[_0x172959(0x311)](_0x172959(0x391)),process[_0x172959(0x2dd)](0x1));let _0xe86643;try{_0xe86643=await _0x388bd9['_license'][_0x172959(0x48f)](_0x4be2b5['trim']());}catch(_0x3f8368){console[_0x172959(0x311)](_0x172959(0x314)+_0x3f8368[_0x172959(0x1bc)]),console[_0x172959(0x311)](''),console[_0x172959(0x311)](_0x172959(0x1c0)),console['error'](_0x172959(0x46b)),console[_0x172959(0x311)](_0x172959(0x317)),console['error'](_0x172959(0x2e3)),console[_0x172959(0x311)](''),process[_0x172959(0x2dd)](0x1);}console[_0x172959(0x3cf)](_0x172959(0x18c)),console['log'](_0x172959(0x320)+_0xe86643['id']),console[_0x172959(0x3cf)]('\x20\x20\x20\x20licensee:\x20\x20'+_0xe86643['licensee']),console[_0x172959(0x3cf)](_0x172959(0x2ae)+new Date(_0xe86643[_0x172959(0x2fe)])[_0x172959(0x45b)]()[_0x172959(0x36a)](0x0,0xa)),console['log']('\x20\x20\x20\x20status:\x20\x20\x20\x20active'),console['log']('');}finally{await _0x388bd9[_0x172959(0x3ab)]();}}async function _0x1092e4(_0x3408af,_0x25f14a){const _0x29b17c=_0x41adb7;!_0x3408af&&(console[_0x29b17c(0x311)](_0x29b17c(0x45e)),process[_0x29b17c(0x2dd)](0x1));const _0x3b645f=require$$5,_0x5349d0=requireOkdbLicenseCodec(),_0x4ccd24=_0x2aedce['resolve'](_0x25f14a[_0x29b17c(0x25a)]),_0x4b61bc=new _0x3b645f(_0x4ccd24,_0x25f14a[_0x29b17c(0x3ac)]?{'encryptionKey':_0x25f14a[_0x29b17c(0x3ac)]}:{});await _0x4b61bc[_0x29b17c(0x308)]();try{const _0x2e7da6=_0x4b61bc[_0x29b17c(0x2ca)];(!_0x2e7da6||!_0x2e7da6[_0x29b17c(0x3e2)](_0x29b17c(0x422)))&&(console[_0x29b17c(0x311)](_0x29b17c(0x392)+_0x3408af+'\x22'),process[_0x29b17c(0x2dd)](0x1));let _0x568ddd=null,_0x13c99b=null;const _0xa02e4a=_0x2e7da6[_0x29b17c(0x29e)](_0x29b17c(0x422),_0x3408af);if(_0xa02e4a)_0x568ddd=_0x3408af,_0x13c99b=_0xa02e4a;else{const _0x5065e7=[];for(const {key:_0x66b978,value:_0x48b27d}of _0x2e7da6[_0x29b17c(0x310)]('~licenses')){if(_0x66b978['startsWith'](_0x3408af))_0x5065e7[_0x29b17c(0x44e)]({'key':_0x66b978,'value':_0x48b27d});}_0x5065e7[_0x29b17c(0x256)]===0x0&&(console[_0x29b17c(0x311)](_0x29b17c(0x392)+_0x3408af+'\x22'),process[_0x29b17c(0x2dd)](0x1)),_0x5065e7['length']>0x1&&(console['error'](_0x29b17c(0x3c9)+_0x3408af+_0x29b17c(0x334)+_0x5065e7['length']+_0x29b17c(0x1e7)),process[_0x29b17c(0x2dd)](0x1)),_0x568ddd=_0x5065e7[0x0][_0x29b17c(0x3ac)],_0x13c99b=_0x5065e7[0x0][_0x29b17c(0x496)];}const _0x279b87=Date['now'](),_0x36743a=_0x3e59a1(_0x13c99b,_0x279b87),_0x3f28aa=_0x4b61bc['id'],_0xac45d6=_0x29b17c(0x29c);let _0x48c511='';try{const _0x141ca1=Buffer[_0x29b17c(0x285)](_0x13c99b['_licenseHash'],'hex');_0x48c511=_0x5349d0[_0x29b17c(0x2fb)](_0x3f28aa,_0x141ca1,_0xac45d6)['pin'];}catch{}const _0x148180=_0x13c99b['features']?Object['entries'](_0x13c99b['features'])['filter'](([,_0x142adf])=>_0x142adf)['map'](([_0x291d90])=>_0x291d90):[],_0x2dc310=_0x13c99b[_0x29b17c(0x3b8)]||{},_0x4f7481=_0x2e7da6?.['db']?.['get']?.(_0x29b17c(0x240))??0x0,_0x25fe20=[..._0x4b61bc[_0x29b17c(0x3de)][_0x29b17c(0x2f6)]()]['filter'](_0x37fe7e=>!_0x37fe7e[_0x29b17c(0x21d)]('~'))['length'];console['log'](_0x29b17c(0x451)),console['log'](_0x29b17c(0x320)+_0x568ddd),console[_0x29b17c(0x3cf)](_0x29b17c(0x444)+(_0x13c99b[_0x29b17c(0x2e2)]||'')),console[_0x29b17c(0x3cf)]('\x20\x20\x20\x20expires:\x20\x20\x20'+(_0x13c99b['expiresAt']?new Date(_0x13c99b[_0x29b17c(0x2fe)])['toISOString']()['slice'](0x0,0xa):'')),console[_0x29b17c(0x3cf)](_0x29b17c(0x360)+(_0x148180['join'](',\x20')||_0x29b17c(0x2c3))),console['log'](_0x29b17c(0x370)+_0x48c511),console['log']('\x20\x20\x20\x20status:\x20\x20\x20\x20'+_0x36743a),console[_0x29b17c(0x3cf)](_0x29b17c(0x493)+new Date(_0x13c99b['addedAt'])[_0x29b17c(0x45b)]());if(_0x36743a===_0x29b17c(0x3a1)){console['log'](''),console[_0x29b17c(0x3cf)](_0x29b17c(0x264));if(_0x2dc310[_0x29b17c(0x231)]){const _0x38368e=Math[_0x29b17c(0x456)](_0x4f7481/_0x2dc310['maxWrites']*0x64);console[_0x29b17c(0x3cf)](_0x29b17c(0x40e)+_0x4f7481[_0x29b17c(0x35e)]()+'\x20/\x20'+_0x2dc310[_0x29b17c(0x231)][_0x29b17c(0x35e)]()+_0x29b17c(0x20b)+_0x38368e+'%)');}else console[_0x29b17c(0x3cf)](_0x29b17c(0x40e)+_0x4f7481[_0x29b17c(0x35e)]()+_0x29b17c(0x47a));_0x2dc310[_0x29b17c(0x1d3)]?console[_0x29b17c(0x3cf)](_0x29b17c(0x2eb)+_0x25fe20+_0x29b17c(0x31b)+_0x2dc310[_0x29b17c(0x1d3)]):console[_0x29b17c(0x3cf)](_0x29b17c(0x2eb)+_0x25fe20+_0x29b17c(0x47a));}console[_0x29b17c(0x3cf)]('');}finally{await _0x4b61bc[_0x29b17c(0x3ab)]();}}async function _0x43e9ff(_0x59481b,_0x272e84){const _0x31e47c=_0x41adb7;!_0x59481b&&(console[_0x31e47c(0x311)](_0x31e47c(0x426)),process[_0x31e47c(0x2dd)](0x1));const _0x35e92d=require$$5,_0x4b76ad=_0x2aedce[_0x31e47c(0x31c)](_0x272e84[_0x31e47c(0x25a)]),_0x178ba1=new _0x35e92d(_0x4b76ad,_0x272e84[_0x31e47c(0x3ac)]?{'encryptionKey':_0x272e84[_0x31e47c(0x3ac)]}:{});await _0x178ba1[_0x31e47c(0x308)]();try{const _0x244f8f=_0x178ba1['_systemEnv'];(!_0x244f8f||!_0x244f8f[_0x31e47c(0x3e2)]('~licenses'))&&(console[_0x31e47c(0x311)](_0x31e47c(0x392)+_0x59481b+'\x22'),process[_0x31e47c(0x2dd)](0x1));let _0x413687=null,_0x262592=null;const _0x460679=_0x244f8f['get'](_0x31e47c(0x422),_0x59481b);if(_0x460679)_0x413687=_0x59481b,_0x262592=_0x460679;else{const _0x5495f5=[];for(const {key:_0x51364a,value:_0x45db18}of _0x244f8f['getRange'](_0x31e47c(0x422))){if(_0x51364a['startsWith'](_0x59481b))_0x5495f5[_0x31e47c(0x44e)]({'key':_0x51364a,'value':_0x45db18});}_0x5495f5[_0x31e47c(0x256)]===0x0&&(console['error'](_0x31e47c(0x392)+_0x59481b+'\x22'),process[_0x31e47c(0x2dd)](0x1)),_0x5495f5[_0x31e47c(0x256)]>0x1&&(console[_0x31e47c(0x311)](_0x31e47c(0x3c9)+_0x59481b+'\x22\x20matches\x20'+_0x5495f5['length']+_0x31e47c(0x1e7)),process[_0x31e47c(0x2dd)](0x1)),_0x413687=_0x5495f5[0x0][_0x31e47c(0x3ac)],_0x262592=_0x5495f5[0x0]['value'];}await _0x244f8f[_0x31e47c(0x2fc)](_0x31e47c(0x422),_0x413687),console[_0x31e47c(0x3cf)](_0x31e47c(0x1f0)+_0x413687+'\x20\x20(licensee:\x20'+(_0x262592[_0x31e47c(0x2e2)]||_0x31e47c(0x477))+')');}finally{await _0x178ba1[_0x31e47c(0x3ab)]();}}async function _0x3e4e69(_0x273986,_0x578d0c,_0x4aee90){const _0x54c686=_0x41adb7;!_0x273986&&(console[_0x54c686(0x311)]('[okdb]\x20error:\x20join\x20requires\x20a\x20remote\x20address.\x20Usage:\x20okdb\x20join\x20<address>\x20--token\x20<t>'),process[_0x54c686(0x2dd)](0x1));!_0x4aee90[_0x54c686(0x48e)]&&!(_0x4aee90[_0x54c686(0x22c)]&&_0x4aee90[_0x54c686(0x35d)])&&(console[_0x54c686(0x311)](_0x54c686(0x37d)),process[_0x54c686(0x2dd)](0x1));const _0x537ad9=_0x4aee90['selfAddress']||_0x578d0c[_0x54c686(0x403)]?.['address'];!_0x537ad9&&(console[_0x54c686(0x311)](_0x54c686(0x464)+'\x20\x20Example:\x20okdb\x20join\x20https://node-a.example.com\x20--token\x20<t>\x20--address\x20http://myhost:8484\x0a'+_0x54c686(0x2bd)),process[_0x54c686(0x2dd)](0x1));const _0x32fc5f=require$$5,_0x40ca5f=new _0x32fc5f(_0x578d0c[_0x54c686(0x25a)],{'sync':{'address':_0x537ad9,'auto_reconcile':![]}});await _0x40ca5f[_0x54c686(0x308)]();try{const _0x359a61=_0x40ca5f[_0x54c686(0x2ca)];if(_0x359a61&&_0x359a61[_0x54c686(0x3e2)](_0x54c686(0x398))){let _0x19008c=![];for(const _0x4fa7d3 of _0x359a61[_0x54c686(0x310)]('~tokens')){_0x19008c=!![];break;}_0x19008c&&console[_0x54c686(0x3cf)](_0x54c686(0x483)+'\x20\x20after\x20sync.\x20Duplicate\x20names\x20will\x20surface\x20as\x20ambiguous\x20logins\x20to\x20clean\x20up.');}console[_0x54c686(0x3cf)](_0x54c686(0x453)+_0x273986+'…'),await _0x40ca5f[_0x54c686(0x403)][_0x54c686(0x1ac)](_0x273986[_0x54c686(0x43d)](/\/+$/,''),{'token':_0x4aee90[_0x54c686(0x48e)],'username':_0x4aee90[_0x54c686(0x22c)],'password':_0x4aee90[_0x54c686(0x35d)]}),console['log'](_0x54c686(0x20c)),console[_0x54c686(0x3cf)](_0x54c686(0x3bd));}finally{await _0x40ca5f[_0x54c686(0x3ab)]();}}async function _0x24afa9(){const _0x36ddde=_0x41adb7,_0x193951=Date[_0x36ddde(0x471)](),_0x5d199c=_0x488b8d(process[_0x36ddde(0x31e)]),_0x5110e7=_0x3a0a04(_0x5d199c),_0x5275ea=_0x2aedce[_0x36ddde(0x31c)](_0x5110e7[_0x36ddde(0x25a)]);!_0x5110e7['noRepl']&&!process[_0x36ddde(0x488)][_0x36ddde(0x2c2)]&&(_0x5110e7[_0x36ddde(0x1c1)]=!![]);const _0x469183=require$$5,{start:_0xbd67b8,colorLog:_0x5eadee}=requireOkdbShell(),_0x4438a9={..._0x5110e7[_0x36ddde(0x3ac)]?{'encryptionKey':_0x5110e7[_0x36ddde(0x3ac)]}:{},..._0x5110e7[_0x36ddde(0x3bb)]?{'admin':![]}:_0x1b0842(_0x5110e7[_0x36ddde(0x474)])?{'admin':_0x5110e7[_0x36ddde(0x474)]}:{},..._0x1b0842(_0x5110e7[_0x36ddde(0x257)])?{'api':_0x5110e7[_0x36ddde(0x257)]}:{},..._0x1b0842(_0x5110e7['auth'])?{'auth':_0x5110e7[_0x36ddde(0x36c)]}:{},..._0x1b0842(_0x5110e7[_0x36ddde(0x3aa)])?{'mcp':_0x5110e7[_0x36ddde(0x3aa)]}:{},..._0x5110e7[_0x36ddde(0x260)]!==![]?{'timeMachine':_0x5110e7[_0x36ddde(0x260)]}:{}},_0x188c65=new _0x469183(_0x5275ea,_0x4438a9);_0x188c65[_0x36ddde(0x3cf)]['detachConsole']?.();const _0x5ef701=_0x188c65[_0x36ddde(0x3cf)][_0x36ddde(0x3bc)](_0x1aae2a=>_0x5eadee(_0x1aae2a,_0x5110e7['logLevel']));if(_0x5110e7['noRepl'])process['stdout'][_0x36ddde(0x23d)]('[okdb]\x20starting…\x0a');await _0x188c65[_0x36ddde(0x308)]();if(_0x5110e7[_0x36ddde(0x1c1)])process[_0x36ddde(0x3e1)][_0x36ddde(0x23d)](_0x36ddde(0x407));try{await _0x2d7fcc(_0x188c65,_0x5110e7[_0x36ddde(0x25d)]);}catch(_0xbb0d43){_0xbb0d43[_0x36ddde(0x1a9)]==='EADDRINUSE'&&(console[_0x36ddde(0x311)](_0x36ddde(0x192)+_0x5110e7['port']+'\x20already\x20in\x20use'),process[_0x36ddde(0x2dd)](0x1));throw _0xbb0d43;}if(_0x5110e7[_0x36ddde(0x1c1)])process[_0x36ddde(0x3e1)]['write'](_0x36ddde(0x1f9)+_0x5110e7['port']+'\x0a');if(!_0x5110e7['noRepl'])_0x188c65[_0x36ddde(0x3cf)]['detachConsole']?.(),_0x5ef701?.(),_0x250dbc(_0x188c65[_0x36ddde(0x36c)]?.['getSecurityNotices']?.()??[]),await _0xbd67b8(_0x188c65,_0x5110e7);else{const _0x248042=_0x2aedce[_0x36ddde(0x1ac)](_0x5275ea,'okdb.pid');try{_0x55df84[_0x36ddde(0x41b)](_0x248042,String(process[_0x36ddde(0x345)]));}catch{}const _0xef6f9c=Date[_0x36ddde(0x471)]()-_0x193951;console[_0x36ddde(0x3cf)](''),console[_0x36ddde(0x3cf)](_0x36ddde(0x418)),console[_0x36ddde(0x3cf)](_0x36ddde(0x448)+_0x5110e7['port']),console[_0x36ddde(0x3cf)]('\x20\x20\x20\x20path:\x20\x20'+_0x5275ea),console[_0x36ddde(0x3cf)](_0x36ddde(0x3b1)+_0x188c65['id']);{const _0x4a064f=_0x188c65['_systemEnv']?.['db']?.['get']?.(_0x36ddde(0x240))??0x0,_0x5d85c4=[..._0x188c65[_0x36ddde(0x3de)]['keys']()][_0x36ddde(0x1a2)](_0x19402e=>!_0x19402e['startsWith']('~'))[_0x36ddde(0x256)];if(_0x188c65['_license']?.['active']?.['licenseType']===0x1){const _0xf0a8d7=Math[_0x36ddde(0x3a7)]((_0x188c65[_0x36ddde(0x25b)]['active'][_0x36ddde(0x2fe)]-Date[_0x36ddde(0x471)]())/0x5265c00);console[_0x36ddde(0x3cf)](_0x36ddde(0x1e4)+_0x188c65[_0x36ddde(0x25b)][_0x36ddde(0x3a1)]['licensee']+'\x20(expires\x20in\x20'+_0xf0a8d7+_0x36ddde(0x3f0));}else{if(_0x188c65[_0x36ddde(0x25b)]?.[_0x36ddde(0x3a1)]){const _0x226246=_0x188c65[_0x36ddde(0x25b)][_0x36ddde(0x3a1)];console[_0x36ddde(0x3cf)](_0x36ddde(0x36d)+_0x226246[_0x36ddde(0x2e2)]+'\x20(expires\x20'+new Date(_0x226246['expiresAt'])[_0x36ddde(0x45b)]()[_0x36ddde(0x36a)](0x0,0xa)+')');const _0xf0d33f=_0x226246[_0x36ddde(0x3b8)]||{};if(_0xf0d33f[_0x36ddde(0x231)]){const _0x1c3cff=Math[_0x36ddde(0x456)](_0x4a064f/_0xf0d33f[_0x36ddde(0x231)]*0x64);console[_0x36ddde(0x3cf)](_0x36ddde(0x23b)+_0x4a064f[_0x36ddde(0x35e)]()+'\x20/\x20'+_0xf0d33f[_0x36ddde(0x231)]['toLocaleString']()+_0x36ddde(0x484)+_0x1c3cff+'%),\x20'+_0x5d85c4+(_0xf0d33f[_0x36ddde(0x1d3)]?'/'+_0xf0d33f[_0x36ddde(0x1d3)]:'')+'\x20env'+(_0x5d85c4===0x1?'':'s'));}}else{if(_0x188c65['_license']){const _0x30eccc=_0x188c65[_0x36ddde(0x25b)][_0x36ddde(0x244)](),_0xb81ae7=_0x30eccc['length']?_0x30eccc['map'](_0x5bcde0=>_0x5bcde0['pin'])[_0x36ddde(0x1ac)](',\x20'):_0x36ddde(0x2f0),_0x1b905e=_0x188c65['_license']['effective'],_0x3ce1d7=_0x1b905e[_0x36ddde(0x3b8)][_0x36ddde(0x231)]?Math['round'](_0x4a064f/_0x1b905e[_0x36ddde(0x3b8)][_0x36ddde(0x231)]*0x64):0x0;console[_0x36ddde(0x3cf)](_0x36ddde(0x45c)),console[_0x36ddde(0x3cf)](_0x36ddde(0x23b)+_0x4a064f[_0x36ddde(0x35e)]()+_0x36ddde(0x31b)+_0x1b905e['limits'][_0x36ddde(0x231)][_0x36ddde(0x35e)]()+_0x36ddde(0x484)+_0x3ce1d7+_0x36ddde(0x30f)+_0x5d85c4+_0x36ddde(0x31b)+_0x1b905e['limits']['envs']+'\x20envs'),console[_0x36ddde(0x3cf)](_0x36ddde(0x2c8)+_0xb81ae7);}}}}console['log'](_0x36ddde(0x3b6)+_0x5110e7[_0x36ddde(0x25d)]+'/api');!_0x5110e7['noAdmin']&&console[_0x36ddde(0x3cf)](_0x36ddde(0x468)+_0x5110e7[_0x36ddde(0x25d)]+_0x36ddde(0x3ef));console['log'](''),console[_0x36ddde(0x3cf)](_0x36ddde(0x2a2)+_0xef6f9c+'ms'),_0x250dbc(_0x188c65[_0x36ddde(0x36c)]?.['getSecurityNotices']?.()??[]);let _0x4d85fc=![];async function _0x425689(_0x2618c8){const _0x5eda0e=_0x36ddde;_0x4d85fc&&(process[_0x5eda0e(0x324)][_0x5eda0e(0x23d)]('\x0a[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a'),process[_0x5eda0e(0x2dd)](0x82));_0x4d85fc=!![],process[_0x5eda0e(0x324)][_0x5eda0e(0x23d)](_0x5eda0e(0x379)+(_0x2618c8||_0x5eda0e(0x213))+_0x5eda0e(0x343));const _0x5349f2=setTimeout(()=>{const _0xc9ae23=_0x5eda0e;process['stderr'][_0xc9ae23(0x23d)](_0xc9ae23(0x410)),process[_0xc9ae23(0x2dd)](0x1);},0x1388);try{_0x55df84[_0x5eda0e(0x316)](_0x248042);}catch{}try{await _0x188c65[_0x5eda0e(0x3ab)]();}catch(_0x2c0758){process[_0x5eda0e(0x324)]['write'](_0x5eda0e(0x271)+(_0x2c0758?.[_0x5eda0e(0x1bc)]??_0x2c0758)+'\x0a');}clearTimeout(_0x5349f2),process['stderr'][_0x5eda0e(0x23d)]('[okdb]\x20closed\x20cleanly\x0a'),process['exit'](0x0);}process['on']('SIGINT',()=>_0x425689(_0x36ddde(0x27a))),process['on'](_0x36ddde(0x3e7),()=>_0x425689('SIGTERM')),process['on'](_0x36ddde(0x3c0),()=>_0x425689(_0x36ddde(0x3c0)));}}const _0x10d8c8=new Set(['version',_0x41adb7(0x423),'init',_0x41adb7(0x381),_0x41adb7(0x278),_0x41adb7(0x287),_0x41adb7(0x42a),_0x41adb7(0x48e),_0x41adb7(0x1ac),_0x41adb7(0x313)]),_0x1e8178=process['argv'][0x2];if(_0x1e8178===_0x41adb7(0x394))console[_0x41adb7(0x3cf)](require$$2[_0x41adb7(0x394)]),process[_0x41adb7(0x2dd)](0x0);else{if(_0x1e8178&&_0x10d8c8[_0x41adb7(0x2d3)](_0x1e8178)){const _0x34db06=process[_0x41adb7(0x31e)][_0x41adb7(0x36a)](0x3),_0x5050c0=_0x488b8d(['node',_0x41adb7(0x27c),..._0x34db06]),_0x297f20=_0x3a0a04(_0x5050c0),_0x3ddfbe=new Set([_0x41adb7(0x47f),'-d',_0x41adb7(0x20a),'-k',_0x41adb7(0x198),'-c',_0x41adb7(0x1ab),'-p',_0x41adb7(0x395),_0x41adb7(0x3c2),'-e',_0x41adb7(0x346),_0x41adb7(0x1fc),_0x41adb7(0x234),_0x41adb7(0x27f),_0x41adb7(0x22f),_0x41adb7(0x2f1),_0x41adb7(0x232),_0x41adb7(0x34d),_0x41adb7(0x3e9),'-u',_0x41adb7(0x1eb)]);let _0x98bdc1=null;for(let _0x4edd5c=0x0;_0x4edd5c<_0x34db06[_0x41adb7(0x256)];_0x4edd5c++){if(_0x3ddfbe[_0x41adb7(0x2d3)](_0x34db06[_0x4edd5c])){_0x4edd5c++;continue;}if(!_0x34db06[_0x4edd5c][_0x41adb7(0x21d)]('-')){_0x98bdc1=_0x34db06[_0x4edd5c];break;}}(async()=>{const _0x3e20b4=_0x41adb7;if(_0x1e8178==='token'){const _0x4a2810=process[_0x3e20b4(0x31e)][0x3],_0x17ed57=process[_0x3e20b4(0x31e)][_0x3e20b4(0x36a)](0x4),_0x892236=_0x488b8d(['node','okdb',..._0x17ed57]),_0x28f299=_0x3a0a04(_0x892236),_0x5a5521=new Set([_0x3e20b4(0x47f),'-d',_0x3e20b4(0x20a),'-k',_0x3e20b4(0x198),'-c','--port','-p',_0x3e20b4(0x1fc),_0x3e20b4(0x234),_0x3e20b4(0x27f),_0x3e20b4(0x22f),_0x3e20b4(0x2f1),_0x3e20b4(0x232),_0x3e20b4(0x395),_0x3e20b4(0x3c2),'-e',_0x3e20b4(0x346)]),_0x267d0c=[];for(let _0x3fc773=0x0;_0x3fc773<_0x17ed57[_0x3e20b4(0x256)];_0x3fc773++){if(_0x5a5521[_0x3e20b4(0x2d3)](_0x17ed57[_0x3fc773])){_0x3fc773++;continue;}if(_0x17ed57[_0x3fc773][_0x3e20b4(0x21d)]('-'))continue;_0x267d0c[_0x3e20b4(0x44e)](_0x17ed57[_0x3fc773]);}switch(_0x4a2810){case _0x3e20b4(0x3ea):await _0x4538fb(_0x28f299,_0x892236);break;case'list':await _0x1a748e(_0x28f299);break;case _0x3e20b4(0x432):await _0x42f710(_0x267d0c[0x0],_0x28f299);break;default:console['error'](_0x3e20b4(0x447)+_0x4a2810+_0x3e20b4(0x399)),process['exit'](0x1);}return;}if(_0x1e8178===_0x3e20b4(0x313)){const _0x313bce=requireOkdbLicenseCodec(),_0x1ff651=process[_0x3e20b4(0x31e)][_0x3e20b4(0x36a)](0x3),_0x320018=_0x488b8d(['node','okdb',..._0x1ff651]),_0x2bec52=_0x3a0a04(_0x320018),_0x318d6d=new Set([_0x3e20b4(0x47f),'-d','--key','-k',_0x3e20b4(0x198),'-c',_0x3e20b4(0x1ab),'-p',_0x3e20b4(0x395)]),_0x360d6d=[];for(let _0x2950bc=0x0;_0x2950bc<_0x1ff651['length'];_0x2950bc++){if(_0x318d6d[_0x3e20b4(0x2d3)](_0x1ff651[_0x2950bc])){_0x2950bc++;continue;}if(_0x1ff651[_0x2950bc][_0x3e20b4(0x21d)]('-'))continue;_0x360d6d[_0x3e20b4(0x44e)](_0x1ff651[_0x2950bc]);}const _0x228e31=_0x360d6d[0x0]??null;if(_0x228e31===_0x3e20b4(0x2fc))await _0x43e9ff(_0x360d6d[0x1],_0x2bec52);else{if(!_0x228e31)await _0x3e9d77(_0x2bec52);else{let _0x3789d7=_0x313bce[_0x3e20b4(0x195)](_0x228e31);if(_0x3789d7===_0x3e20b4(0x1ef)&&_0x55df84[_0x3e20b4(0x463)](_0x228e31))_0x3789d7='path';if(_0x3789d7===_0x3e20b4(0x2ef))try{const _0x20df1e=_0x55df84[_0x3e20b4(0x2d2)](_0x228e31,_0x3e20b4(0x26e))['trim'](),_0xa2fec3=_0x313bce[_0x3e20b4(0x195)](_0x20df1e);if(_0xa2fec3===_0x3e20b4(0x386)){await _0x1bf95b(_0x20df1e,_0x2bec52);return;}await _0x2288c0(_0x228e31,_0x2bec52);return;}catch(_0x3bac33){console[_0x3e20b4(0x311)](_0x3e20b4(0x32b)+_0x228e31+':\x20'+_0x3bac33[_0x3e20b4(0x1bc)]),process[_0x3e20b4(0x2dd)](0x1);}switch(_0x3789d7){case _0x3e20b4(0x37b):await _0x2288c0(_0x228e31,_0x2bec52);break;case _0x3e20b4(0x386):await _0x1bf95b(_0x228e31,_0x2bec52);break;case _0x3e20b4(0x1b0):await _0x1092e4(_0x228e31,_0x2bec52);break;default:console[_0x3e20b4(0x311)]('[okdb]\x20error:\x20unrecognized\x20input:\x20\x22'+_0x228e31+'\x22'),console[_0x3e20b4(0x311)](''),console[_0x3e20b4(0x311)]('\x20\x20Expected\x20one\x20of:'),console['error'](_0x3e20b4(0x2cb)),console[_0x3e20b4(0x311)](_0x3e20b4(0x1e1)),console[_0x3e20b4(0x311)](_0x3e20b4(0x48c)),console[_0x3e20b4(0x311)](_0x3e20b4(0x302)),console[_0x3e20b4(0x311)](''),console[_0x3e20b4(0x311)](_0x3e20b4(0x24f)),process[_0x3e20b4(0x2dd)](0x1);}}}return;}switch(_0x1e8178){case _0x3e20b4(0x423):await _0x2b0b16(_0x297f20);break;case _0x3e20b4(0x38f):await _0x16205e();break;case _0x3e20b4(0x42a):await _0x3d8480(_0x297f20);break;case'backup':await _0x46cf90(_0x98bdc1??_0x2aedce['resolve']('./okdb-backup'),_0x297f20);break;case _0x3e20b4(0x278):await _0x3302b1(_0x98bdc1??_0x2aedce[_0x3e20b4(0x31c)](_0x3e20b4(0x365)),_0x297f20,_0x5050c0);break;case _0x3e20b4(0x287):await _0x591fa7(_0x98bdc1??_0x2aedce[_0x3e20b4(0x31c)]('./okdb-export.ndjson'),_0x297f20,_0x5050c0);break;case _0x3e20b4(0x1ac):await _0x3e4e69(_0x98bdc1,_0x297f20,_0x5050c0);break;}})()['then'](()=>process[_0x41adb7(0x2dd)](0x0))[_0x41adb7(0x3e3)](_0x22b045=>{const _0xf5057a=_0x41adb7;console['error'](_0xf5057a(0x288)+(_0x22b045[_0xf5057a(0x1bc)]||_0x22b045)+'\x0a'),process[_0xf5057a(0x2dd)](0x1);});}else _0x24afa9()[_0x41adb7(0x3e3)](_0x2713fe=>{const _0x54a44a=_0x41adb7;console[_0x54a44a(0x311)]('\x0a[okdb]\x20fatal\x20error:'),console[_0x54a44a(0x311)](_0x2713fe[_0x54a44a(0x2a8)]||_0x2713fe),process['exit'](0x1);});}return okdb$1;}var okdbExports=requireOkdb(),okdb=getDefaultExportFromCjs(okdbExports);module[_0x26eb70(0x250)]=okdb;
|
|
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;
|