@kedem/okdb 1.9.0 → 1.9.2

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 _0x4b361c=_0x2368;(function(_0x1f184f,_0x618959){const _0x15427f=_0x2368,_0x273e40=_0x1f184f();while(!![]){try{const _0x361008=parseInt(_0x15427f(0x158))/0x1+parseInt(_0x15427f(0x100))/0x2+parseInt(_0x15427f(0x534))/0x3+-parseInt(_0x15427f(0x223))/0x4*(parseInt(_0x15427f(0x434))/0x5)+parseInt(_0x15427f(0x38d))/0x6*(parseInt(_0x15427f(0x48c))/0x7)+-parseInt(_0x15427f(0x4e3))/0x8+-parseInt(_0x15427f(0x30c))/0x9*(parseInt(_0x15427f(0x22c))/0xa);if(_0x361008===_0x618959)break;else _0x273e40['push'](_0x273e40['shift']());}catch(_0x43c3d3){_0x273e40['push'](_0x273e40['shift']());}}}(_0x5b4d,0x387ab));var require$$1=require(_0x4b361c(0x42d)),require$$1$1=require('fs'),require$$0=require('os'),require$$4$1=require(_0x4b361c(0x636)),require$$5=require('../okdb'),require$$0$2=require('readline'),require$$2=require(_0x4b361c(0x35e)),require$$0$1=require('node:crypto'),require$$4=require(_0x4b361c(0x442)),require$$1$2=require(_0x4b361c(0xfe)),require$$0$3=require(_0x4b361c(0x42a)),require$$0$4=require(_0x4b361c(0x328)),require$$0$5=require(_0x4b361c(0x5d0)),require$$1$3=require(_0x4b361c(0x19b)),require$$2$1=require(_0x4b361c(0x2c4)),require$$8=require(_0x4b361c(0x25a)),commonjsGlobal=typeof globalThis!==_0x4b361c(0x1eb)?globalThis:typeof window!=='undefined'?window:typeof global!==_0x4b361c(0x1eb)?global:typeof self!==_0x4b361c(0x1eb)?self:{};function getDefaultExportFromCjs(_0x41eff4){const _0x279468=_0x4b361c;return _0x41eff4&&_0x41eff4['__esModule']&&Object['prototype'][_0x279468(0x51a)]['call'](_0x41eff4,'default')?_0x41eff4['default']:_0x41eff4;}function _0x5b4d(){const _0x21cdbc=['map','ceil','--env\x20<name>','dest','Gate\x20flag\x20required\x20to\x20touch\x20system\x20types\x20(those\x20whose\x20name\x20starts\x20with\x20\x22~\x22).\x20Combined\x20with\x20the\x20underlying\x20namespace\x20permission.','\x1b[35m','putNode','primary','\x20\x20+','\x20\x20\x20\x20license:\x20free\x20tier\x20—\x20add\x20a\x20license\x20to\x20unlock\x20sync,\x20embeddings,\x20engines,\x20time-machine','maxMs','isWorker','Route\x20','code','api','issueToken','\x20\x20✓\x20http\x20listening\x20on\x20:','forEach','Cannot\x20set\x20enforce\x20schema\x20on\x20','push','sync:apply','use\x20<env>','\x20\x20\x20\x20•\x20a\x20path\x20to\x20a\x20.license\x20file','_seen','type:drop','SIGTERM','⚠\x20INTERNAL\x20LICENSE\x20ACTIVE\x20—\x20all\x20features\x20and\x20limits\x20are\x20unlocked.\x20For\x20vendor/internal\x20use\x20only.','stdin','add','rowKey','/admin/index.html','toLocaleString','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','fts:drop','_cookieName','values','verifyCookie','status','\x20\x20Build:\x20\x20\x20key\x20fingerprint\x20','\x0a[okdb]\x20error:\x20','Search','validateRouteInput','INDEX_READY','end','Forbidden\x20—\x20no\x20permissions\x20available','maxBodyBytes','authorizationUrl','removeNode','open\x20','typeSubDbs','okdb-http-worker-child.js','import','SIGINT\x20(double-tap)','net','\x20\x20·\x20\x20','processKey','assertFeature','\x20\x20\x20\x20\x20\x20\x20',';\x20shmbuf\x20native\x20missing\x20→\x20forced\x20single-process','expiresAt','importFromFile','mode','No\x20license\x20found\x20matching\x20this\x20activation\x20token','OKDBSchemaValidationError','caps','rawResponse','Activation\x20invalid:\x20','(worst\x20','\x0d[okdb]\x20blobs:\x20','_validateOperationRequest','field','_listenAddr','attach','Invalid\x20activation\x20token:\x20','\x20\x20Or\x20set\x20sync.address\x20in\x20.kdbconfig','dbPath','_nodeDbFor','\x20\x20\x20\x20limits:\x20\x20\x20\x20','INTERNAL_ERROR','List\x20types,\x20get\x20type\x20schema,\x20list\x20registered\x20indexes.','querySchema','\x20active\x20env:\x20','_log','valid','licenseHash','outputSchema','result','resetting','_buckets','[okdb]\x20port\x20','cookies','getClock','startHeartbeat','getAuthOptions','HTTP\x20server\x20already\x20running','userAdded','okdb.pid','cookieName','type/users/item/alice\x20--env\x20staging','meta','identity','isBuffer','asyncProcessors','req','changes','--types','Type\x20\x27','event','FOREIGN_KEY_DELETE_RESTRICTED','Run','_report','License\x20expired\x20or\x20invalidated','resetFts','View\x20peer\x20status\x20and\x20replication\x20stats.','noAdmin','JWT\x20is\x20missing\x20kid','\x0a\x20\x20','txn:start','.okdb-write-test','last-event-id','[okdb]\x20exporting\x20env\x20\x22','OIDC\x20discovery\x20missing\x20jwks_uri',')\x20to\x20your\x20license\x20vendor.','matcher','isInteger','allowMethods','inputSchema','pathname','\x20binding\x20references\x20missing\x20input\x20field:\x20','\x20has\x20ambiguous\x20binding\x20for\x20query\x20field:\x20','\x20\x20(press\x20Ctrl+C\x20again\x20to\x20exit)\x0a','CHANGEFEED_QUANTUM','[okdb]\x20shutdown\x20drain\x20exceeded\x203000ms\x20—\x20hard-exiting\x0a','readFileSync','listenAddr','_licenseHash','ESRCH','rmSync','envs','_computeStatus','\x20\x20\x20\x20•\x20a\x20license\x20id\x20\x20\x20\x20\x20(uuid)','Foreign\x20key\x20violation:\x20','\x20/\x20','tierList','[okdb]\x20backup\x20complete','[okdb]\x20close\x20error:\x20','running','Invalid\x20license\x20blob:\x20','isDead','[okdb]\x20reset\x20aborted','search:query','\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','\x20records','sizeBefore','instanceId','exp','cluster','\x20\x20Expected\x20one\x20of:','368122BGFdOR','bus:poke','--workers','Register,\x20update,\x20and\x20delete\x20function\x20definitions.','http.workers','verifyActivation','__OKDB_PUB_FINGERPRINT__','authorization_endpoint','details','transport','closures\x20in\x20THIS\x20process\x20—\x20forked\x20workers\x20cannot\x20serve\x20them\x20(cluster\x20distributes\x20','kid','readUInt32BE','\x0a[okdb]\x20fatal\x20error:','PUB_FINGERPRINT','cause','Validation\x20failed:\x20','cf-ray','username','Bearer\x20$1…','Run\x20searches\x20against\x20registered\x20FTS\x20and\x20vector\x20indexes.','concat','Validation\x20failed','_dedupeKey','\x20\x20✓\x20','available','processingStatusView','—\x20/api/\x20is\x20auto-prefixed,\x20env\x20is\x20auto-injected','[env]','Index\x20\x27','issuer','role','fieldPath','_maybePublish','Content-Type','active:','handler','[okdb]\x20imported\x20\x20types=','_flushDebounce','SYSTEM_POKE','Records\x20inside\x20your\x20types\x20—\x20the\x20actual\x20rows\x20you\x20store.','\x20\x20(','hostname','[okdb]\x20invalid\x20port:\x20','OKDBAlreadyExistsError','\x20\x20⚠','stopHeartbeat','reap','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','__okdbCluster','_getJwkKey','ACTIVATION_EXPIRED','uuid','cpuPct',',\x20got\x20','\x20<path>\x20[json-body]','min','\x20\x20✓\x20Revoked\x20token\x20','_supervisorKey','raw','Schema\x20&\x20Indexes',',\x20stopping\x20workers…\x0a','\x20documents\x20fail\x20validation','_getOidcDiscovery','LOGS','(code=','\x1b[90m','socket','_admissionTimer','gray','expiry','.\x20The\x20active\x20license\x20does\x20not\x20enable\x20\x22','protected:write','[okdb]\x20shmbuf\x20native\x20binding\x20unavailable\x20—\x20multi-process\x20clustering\x20is\x20unsafe\x20','\x20\x20[okdb]\x20','integer','force','dropIndex','ENVS','OKDBNotFoundError','files','_buildProcessingFacet','pause','content-type','Hint:\x20','NOT_FOUND','dropFts','startedAt','459169bAzJeC',':\x20ping\x0a\x0a','createInterface','val','connected','(primary\x20=\x20processor)','\x20more)','_onItem','--label','types','_removeRowAsync','Background\x20job\x20queue:\x20enqueue\x20work,\x20observe\x20state,\x20and\x20process\x20jobs.','waiting','_totalWrites','fill','destroy','_startAdmission','\x22.\x20Use:\x20create,\x20list,\x20revoke','now','\x20\x20✓\x20Removed\x20license\x20','\x0a\x20\x20✓\x20License\x20activated','[okdb]\x20invalid\x20log\x20level:\x20\x22','getCount','stderr','verify','every','Records','ID\x20token\x20is\x20not\x20accepted','key','\x20licenses','readUInt8','Files','maxWrites','token_use','--eval','_activateProcesses','number','_handleInProcess','\x27\x20on\x20type\x20\x27','Data','\x0a[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20show\x20active\x20environment\x20+\x20list\x20all\x20envs\x0a\x20\x20','middlewares','\x0a\x20\x20✓\x20Token\x20created','LENGTH_REQUIRED','\x1b[33m','\x20file','_dispatch','\x20references\x20','config\x20http.workers','\x20has\x20illegal\x20binding\x20target\x20for\x20','_threadStats','ephemeral','open','createPublicKey','_systemEnv','none','\x22\x20on\x20\x22','\x20\x20[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a','payload','workersFlag','ftsName','_rotateBucket','Token\x20must\x20be\x20a\x20JWT','signCookie','current','\x20\x20\x20\x20-\x20The\x20license\x20blob\x20has\x20not\x20been\x20added\x20yet\x20—\x20run\x20`okdb\x20license\x20<blob>`\x20first.','https','license:invalid','fetch','change','runtimeProcessesView','killable','worker','state','Unique\x20constraint\x20violated\x20on\x20','hint','.\x20Only\x20primitives,\x20null,\x20Buffers,\x20and\x20arrays\x20are\x20allowed.\x20Got:\x20','\x20\x20\x20\x20features:\x20\x20','policy','\x20does\x20not\x20exist','[okdb-cluster]\x20worker\x20pid=','responseStatuses','xdg-open\x20','idx:','http://localhost:','\x20\x20\x20\x20\x20control\x20log\x20verbosity\x0a\x20\x20','\x20worker(s)\x20still\x20serving','_drain','remove','Machine-to-machine\x20cluster\x20protocol\x20(join\x20handshake,\x20replication\x20channel,\x20traffic).\x20Grant\x20only\x20to\x20peer\x20nodes\x20—\x20not\x20to\x20humans.','exports','ieee-p1363','\x20\x20\x20\x203.\x20Run:\x20\x20okdb\x20license\x20<activation-token>','Sync','\x20which\x20does\x20not\x20exist','JWT\x20signature\x20verification\x20failed','[okdb]\x20reset:\x20','_started','host','dim','\x20\x20Next\x20step\x20—\x20activate\x20the\x20license:','/api/env/','\x20cf-ray=','setSchema','cookie','reset','bumpCmd','base64url','\x20\x20Tier:\x20\x20\x20\x20','filter','other','\x20\x20\x20\x202.\x20The\x20vendor\x20returns\x20an\x20activation\x20token.','\x1b[32m','license:activated','[okdb]\x20opening\x20','\x20\x20Error:\x20','_role','\x0a\x20\x20okdb\x20doctor\x0a','[okdb]\x20created\x20.kdbconfig','~processes:desired','_lastPublishAt','_bucketIdx','bootstrapBlocked','protected:read','\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','_desired','REMOVE','blob','issuedAt','(none)','\x20\x20·\x20','syncPeers','\x20\x20Some\x20checks\x20failed.\x0a','decodeLicenseBlob:\x20failed\x20to\x20decode\x20payload:\x20','round','decommission',']\x20already\x20maps\x20to\x20\x27','auth=','_dedupeMax','default','--version','_ensureTokensType','_license','[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22','cluster:','processes:\x20','undefined','--no-admin','response','./okdb-data','authenticateToken','lifecycle','\x20\x20score:','getSecurityNotices','stack','Events','threads','[okdb]\x20blobs:\x20imported=','decommissioning','~processes','cyan','OKDBIndexHasConsumersError','cors','context','question','--path','audience','destroyed','_ensureDesired','typesPerEnv',':\x20key\x20[','txn:rollback','_authOptions','data','unlinkSync','\x20\x20(licenses\x20must\x20be\x20signed\x20by\x20the\x20matching\x20private\x20key)','time','\x20fetching\x20','Examples','processor:retry','\x20env','object','bus:type_drop','\x20\x20\x20\x20\x20\x20\x20\x20\x20browse\x20API\x20routes,\x20grouped\x20by\x20area\x0a\x20\x20','_selfKey','x5c','confirm','_kind','[okdb-cluster]\x20slot=',')\x20exited\x20','_runMiddlewares','\x20records…','must\x20be\x20','\x20envs','effective','/([^/]+)','getDesired','\x27:\x20','Access-Control-Request-Headers','\x20HTTP\x20workers,\x20primary\x20=\x20processor)','HELP','detachConsole','1605252XRNNIR','fts:','\x22\x20→\x20','transactionSync','OKDBInvalidPrimaryKeyError','--inspect','\x20\x20\x20\x20status:\x20\x20\x20\x20active\x20\x20(open\x20license\x20—\x20no\x20activation\x20needed)','process','green','2894290UaHMJH','active','requests','processor:error','loop-lag\x20','--key','timeMachine','[req]\x20','ITEM_UPDATE','flatMap','grants','STATUS','engines','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','getPins','decodeActivationToken:\x20expected\x2077\x20bytes,\x20got\x20','License\x20limit\x20exceeded:\x20','[okdb]\x20http\x20workers:\x20','remaining-fields','_enforceOperationAccess','envs=','close','\x1b[34m','_caps','_scheduleFlush','License\x20signature\x20invalid:\x20','\x20day(s).','system:type_drop','../okdb','guard','\x20\x20(need\x20≥\x2018)','%),\x20','history','padStart','\x20to\x20browse\x20the\x20API,\x20','_clusterWorkerAttached','\x20\x20\x20\x20\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/','update','setDesired','/api','internalOnly','catch','_lastCpuUsage','level:\x20info','prototype','Origin','stream','list','hasDesired','register','__writeCounter','\x20\x20Flags','all','toString','cursorKey','BOOTSTRAP_LOCALHOST_ONLY','\x20(must\x20be\x201–65535)','INDEX_RESET','[okdb]\x20warning:\x20failed\x20to\x20restore\x20identity/licenses\x20after\x20reset:\x20','safety','system','kill','free\x20tier','function','enabled','features','The\x20following\x20routes\x20require\x20auth\x20but\x20declare\x20no\x20permission:\x0a\x20\x20','port','send','is\x20invalid','_validateOidcAccessToken','[okdb]\x20error:\x20--password\x20requires\x20--name','pipe','Feature\x20not\x20available\x20on\x20free\x20tier:\x20','text/event-stream;\x20charset=utf-8','_startedAt','_adminRelay','parseInt','starting','statusCode','\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20','[okdb]\x20error:\x20join\x20requires\x20a\x20remote\x20address.\x20Usage:\x20okdb\x20join\x20<address>\x20--token\x20<t>','warn','admin','Create,\x20delete,\x20and\x20compact\x20environments.','[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a','\x20\x20skipped=',';\x20SameSite=','\x20deleted','assertLimit','\x20cf-ip=','writes=','form\x20listen(port,\x20{\x20workers,\x20makeOkdb\x20})\x20and\x20register\x20the\x20routes\x20inside\x20makeOkdb,\x20','noCluster','queue/','copy','some','keep-alive','Invalid\x20token','_isReader','argv','createHash','once','ITEM_CREATE','level','\x27,\x20cannot\x20map\x20to\x20\x27','Functions','--print','dropType','decodeLicenseBlob:\x20blob\x20too\x20short\x20(','find','decodeActivationToken:\x20input\x20must\x20be\x20a\x20string','message','resume','OKDB_HTTP_WORKERS','access:\x20','listening','EXPIRES','ES256','Peer','timingSafeEqual','writes','_sampleOwnStats','createServer','supervisorKey','respawnTimer','options','\x20\x20✓\x20OKDB\x20server\x20running','Queue','LICENSE_TYPE_OPEN','fast','consumeLoginState','.kdb_history','is\x20required','[okdb]\x20error:\x20unrecognized\x20input:\x20\x22','\x20(expires\x20in\x20','DELETE','scrypt','[okdb]\x20error:\x20--grants\x20must\x20be\x20valid\x20JSON\x20object','UNAUTHORIZED','config','INDEX_REGISTERED','writeMs','jwk','openDB','noRepl','created','_statusEnv','x-forwarded-for','QUIT','set','publishChildRow','url','_active','[okdb]\x20import\x20complete','tags:\x20','EADDRINUSE','padEnd','use','unique:violation_resolved','name','node\x20','pushEphemeral','mkdirSync','Server\x20is\x20in\x20bootstrap\x20mode\x20and\x20only\x20accepts\x20localhost\x20connections\x20until\x20the\x20first\x20token\x20is\x20created.','\x20\x20changes=','--address','okdb','maxAge','_pending','export','\x20origin=','_normalizeOAuthAuthResult','shutdown','FORBIDDEN','authMode','Work','registry-publish','mcp-session-id','_lookupByName','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20','cpuUsage','help','platform','writeUInt8','bodyMode','SCHEMA_COLLECTION_INVALID','UNPROCESSABLE_ENTITY','null','stop','version','length','examples','JWT\x20audience\x20mismatch','Invalid\x20primary\x20key\x20type:\x20','index:drop','listNodes','keys','makeOkdb','configureAuth','ms/','header','Types','inst:','processing','_nodeDbCache','\x20(expires\x20','trimStart','expired','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20has\x20expired\x20—\x20request\x20a\x20fresh\x20one.','No\x20tokens.','\x20\x20→\x20\x20','--no-cluster','_timer',':\x20connected\x0a\x0a','reportThreadStats','array','{}[]:,\x0a\x0d\x09\x20','\x22\x20is\x20used\x20by:\x20','\x20\x20✗','May\x20write\x20system\x20types\x20when\x20also\x20granted\x20the\x20underlying\x20write\x20permission.','\x20worker\x20slot=','invalid','randomBytes','9WpKnuJ','test','port\x20','sort','build','http-server','shmbuf.node','addLicense','\x0a\x0a\x20\x20','hard-killed','\x20has\x20invalid\x20http.bodyMode:\x20','_isClusterController','signature','summary','__okdbSlot','error','\x0a\x20\x20[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a','_okdb','OKDBIndexAlreadyRegisteredError','listen','offWindow','\x20\x20records=','--port','_rootDb','endsWith','noteListenAddr','unknown','setTtl','node:events','backup','read','mcp','\x20MB\x20→\x20','sync','ingest','listen({\x20workers\x20>\x201\x20})\x20without\x20makeOkdb\x20requires\x20an\x20OPEN\x20okdb\x20—\x20call\x20after\x20open()\x20','roles','children','email','allowHeaders','SERVICE_UNAVAILABLE','origins','JWT\x20issuer\x20mismatch','\x1b[0m','revoke','decommissioned','./okdb-export.ndjson','sha256','listRoutes',',\x20closing…\x0a','okdb_session_',';\x20Path=','\x20days\x20—\x20POC/demo\x20only,\x20not\x20node-bound)','floor','treeView','ppid','Unknown\x20error','\x20\x20\x20\x20status:\x20\x20\x20\x20','OPTIONS',');\x20','jwks_uri','[okdb]\x20unknown\x20token\x20action:\x20\x22','der','server','digest','\x20user-registered\x20route(s)\x20are\x20','_processingPolicy','parse','hidden','\x0d[okdb]\x20','maxExtra','Either\x20the\x20build\x20was\x20made\x20with\x20a\x20different\x20keypair,\x20or\x20the\x20license\x20was\x20issued\x20with\x20a\x20different\x20private\x20key.','licensed','bus:proc','HTTP\x20','\x20\x20\x20\x20port:\x20\x20','decodeLicenseBlob','token','_lastCpuWindowMs','(null)','\x22\x20to\x20enable\x20it.','access','crypto','token_endpoint','record','ENV','equals','\x20opening\x20','\x20\x20\x20\x20licensee:\x20\x20','utf8','Execute\x20full-text\x20and\x20vector\x20searches.','LICENSE_FEATURE_DISABLED','Lax','license:removed','PIN','setHeader','_processStartedAt','from','SYSTEM_STOPPED','fts:reset','[okdb]\x20export\x20complete','\x20\x20⚠\x20\x20','targetType','[res]\x20','\x20bytes,\x20need\x20>=\x2065)','createdAt','_isWriter','activation','quit','INDEX_ALREADY_REGISTERED','rss','payload-or-self','split','auth','shmbufNative','TYPES','string','https:','txn:end','shmbuf/package.json','index:progress','[okdb]\x20error:\x20--address\x20is\x20required\x20for\x20join\x20(this\x20node\x27s\x20reachable\x20sync\x20address).\x0a','unref','\x20\x20\x20\x20admin:\x20\x20\x20http://localhost:','_hbTimer','isConnected','clusterStatusView','replace','false','1708872oigNhQ','Payload\x20too\x20large','or\x20serve\x20single-process.','Index\x20\x22','getRange','value','http://','system:drain','stopping','INVALID_INDEX_KEY','decoded','listen({\x20workers:\x20','bus:drain','RSA-SHA256','isFeatureEnabled','_fetchJwks','[okdb]\x20error:\x20token\x20with\x20name\x20\x22','\x20writes\x20(','has','Release','ms\x20p99=','system:stopped','removeSync','join','ITEM_REMOVE','~licenses',';\x20Expires=','enable','pending','get','METHOD_NOT_ALLOWED','\x20\x20\x20\x20permissions:\x20','single','\x20\x20(name:\x20','_flushTimer','PUBLIC_KEY_PEM','/api/','reload','cli','allocUnsafe','/type/users\x0a\x20\x20\x20\x20','HTTP_','(?:/(.*))?$','Internal\x20error','ms\x20max=','randomUUID','LICENSED_BUILD','received\x20','Views','_rowKey','_wrapApiResponse','/.well-known/openid-configuration','workersConfigured','\x20logs\x20on\x20\x20','?\x0a\x20\x20(node\x20identity\x20and\x20licenses\x20are\x20preserved)\x0a\x20\x20Type\x20\x22yes\x22\x20to\x20confirm:\x20','--env','query','\x20cannot\x20be\x20MCP-exposed\x20without\x20an\x20explicit\x20adapter\x20because\x20it\x20uses\x20','_nodeDb','_jwksNegativeCache','getCmd','CONFLICT','logRequests','startsWith','\x20to\x20quit.','clearLine','\x20\x20\x20\x20','_matchRoute','Unknown\x20JWKS\x20kid:\x20','env/','List\x20environments\x20and\x20read\x20environment\x20info.','exposeHeaders','operation','--password','info','ms\x20(attempt\x20','stringify','\x0a\x20\x20Delete\x20ALL\x20data\x20in\x20','_clusterOnMessage','msg','must\x20not\x20be\x20null','stats','slot','[okdb]\x20primary\x20okdb\x20close\x20error:\x20','\x20querySchema\x20references\x20missing\x20input\x20field:\x20','halted','\x20\x20║','Materialized\x20views:\x20query\x20definitions\x20that\x20are\x20continuously\x20maintained\x20and\x20queryable.','fromEntries','_buildOwnRow','pid','--token','embedded','size','LICENSE_INVALID','\x20\x20Writes:\x20\x20','--watch','<path>','ref:violation','Forbidden','toLowerCase','prompt','permissions','groups','\x20\x20\x20\x20api:\x20\x20\x20\x20\x20http://localhost:','\x20\x20\x20\x20\x20\x20\x20\x20\x20OKDB\x20SHELL\x20\x20\x20\x20\x20\x20\x20\x20','epoch','OKDBInvalidValueError','\x0a\x20\x20Usage:\x20use\x20<env-name>\x0a','node','\x20\x20after\x20sync.\x20Duplicate\x20names\x20will\x20surface\x20as\x20ambiguous\x20logins\x20to\x20clean\x20up.','LICENSEE','<json-body>','\x0a\x20\x20Joining\x20cluster\x20at\x20','\x20times\x20in\x20','licenseType','hasCanonical','memoryUsage','List\x20jobs,\x20view\x20stats,\x20list\x20buckets.','closeIdleConnections','win32','(unset)','node/','debug','content-length','data:read','\x20+\x20','--no-repl','_onTick','./okdb-backup','getProcess','\x20\x20╔═══════════════════════════╗','[okdb]\x20error:\x20license\x20management\x20is\x20only\x20available\x20in\x20licensed\x20builds\x20(npm\x20run\x20build:prod).','route','description','reverse','view:progress','cf-connecting-ip','--log-level','Environment\x20lifecycle.\x20Listing\x20and\x20creating\x20envs\x20is\x20system-level.','next','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20','pin','\x20\x20✓\x20OKDB\x20cluster\x20running','registerIndex','Read','lastClock','\x20\x20\x20\x20writes:\x20\x20\x20\x20','\x20—\x20type\x20env\x20to\x20list\x20available\x0a','homedir','_publishNow','origin','SYSTEM_PROC','\x20\x20\x20\x20status:\x20\x20\x20\x20active','entries','registerType','Token\x20secret\x20not\x20configured','node:perf_hooks','indexOf','bind','path','claims','put','\x0a\x20\x20No\x20routes\x20matching\x20\x22','hasType','~processes:cmd','item:remove','5kkolJy','isSystem','targetKey','isSetupMode','registerFts','hex','body.','gate','readMs','\x22\x20already\x20exists','dirname','_totalWriteMs','\x20MB)','operations','child_process','\x20\x20(licensee:\x20','errors','SIG_INVALID','View\x20server\x20info,\x20logs,\x20SSE\x20event\x20streams,\x20processor\x20status,\x20backup\x20list.','_getType','properties','(no\x20types)','_putRowAsync','--help','index:ready','[okdb]\x20started\x20in\x20','[okdb]\x20importing\x20','start\x20','fts:registered','assign','statuses','\x20\x20Usage:\x20logs\x20[on|off|debug|info|warn|error]','\x20\x20\x20\x20\x20\x20\x20POST\x20(body\x20implies\x20POST)\x0a\x20\x20','boolean','call','ttl:expired','fts','NOT_IMPLEMENTED','ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20','nbf','license:added','logLevel','slice','[okdb-cluster]\x20primary\x20pid=',',\x20signal=','writeUInt32BE','RS256','--username','emit','INDEX_PROGRESS','system:clock_change','access-control-allow-credentials','Cluster\x20replication.\x20The\x20\x22peer\x22\x20op\x20is\x20for\x20cluster\x20nodes,\x20not\x20human\x20users.','wrong_node','POST','default:\x20cores−1\x20=\x20','discoveryTtlMs','\x20\x20\x20\x20addedAt:\x20\x20\x20','env','password','\x0a\x20\x20License\x20details:','~tokens','nodeKey','repeat','Full-text\x20search','_windowCbs','_oidcDiscoveryCache','_cmd','exportToFile','clear','cpuWindowMs','FTS_DROP','processors','okdb_session','max','address','note','building','_runGuards','queue-worker','OKDBTypeNotRegisteredError','\x20\x20╚═══════════════════════════╝','trim','Pause/resume\x20processor,\x20trigger\x20backups,\x20restore.','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','jwksUri','INDEX_HAS_CONSUMERS',';\x20Secure','7zLtcuR','PUT','no\x20.kdbconfig\x20(using\x20defaults)','isPrimary','keys/public.pem','_sockets','cluster:\x20ready\x20(','removeSupervisedChild','authorization','create','\x20log\x20level:\x20','\x20\x20\x20\x20status:\x20\x20\x20\x20pending\x20activation','doctor','audiences','readUInt16BE','type','_groupByProcess','_onPoke','writeUInt16BE','config\x20file\x20valid:\x20','external','resolve','Register,\x20configure,\x20and\x20remove\x20cluster\x20peers.','bindings','dead','Invalid\x20index\x20key\x20type\x20for\x20\x27','[okdb]\x20error:\x20show\x20requires\x20an\x20id\x20argument','ttl','toFixed','createEnvironment','[okdb]\x20cluster\x20close\x20error:\x20','loop-lag','online','primaryOkdb','write','slotKey','\x20\x20Common\x20causes:','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20GET\x20(implicit)\x0a\x20\x20','processorsView','\x0a\x20\x20Raw\x20token\x20(shown\x20once,\x20save\x20it\x20now):\x0a','clearTtl','Schema\x20validation\x20failed\x20for\x20','[okdb]\x20error:\x20','dynamic','tags','\x20type','_instanceId','reason','\x20\x20\x20\x20\x20explicit\x20method\x0a\x0a\x20\x20','(workers\x20can\x27t\x20share\x20the\x20cross-process\x20HLC/clock).\x20Forcing\x20single-process\x20(was\x20','OKDBForeignKeyError','type/','\x20already\x20in\x20use','closeAllConnections','_userPhase','listen({\x20workers\x20}):\x20okdb\x20options\x20are\x20not\x20serializable\x20for\x20workers:\x20','tokenTtl','metrics',';\x20HttpOnly','exec','toISOString','processor:resumed','PATCH','_jwksCache','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20','\x20\x20[okdb]\x20closed\x20cleanly\x0a','\x20\x20✓\x20joined\x20and\x20reconciliation\x20initiated','no-cache,\x20no-transform','uptime','params.','\x20already\x20exists','Environments','_loginStates','HTTP_WORKERS_REQUIRE_PORTABLE_ROUTES','kind','category','heapTotal','1ofN:','[okdb]\x20preserved:\x20','_nodeDead',',\x20label:\x20','logs','event:\x20','red','env:removed','Unauthorized','\x20\x20\x20\x20usage:\x20\x20\x20','1714312NHahpF','[okdb]\x20error:\x20join\x20requires\x20credentials.\x20Provide\x20--token\x20<t>\x20or\x20--username\x20<u>\x20--password\x20<p>','events','charCodeAt','searchParams','\x20\x20(unlimited)','isFile','TOO_MANY_REQUESTS','../','passive\x20HTTP\x20worker(s)\x20serving\x20:','_quantum','_buildChildRow','OKDB_HTTP_WORKERS\x20env','credentials','\x0a\x20\x20Joined.\x20Remote\x20tokens\x20replicated.\x20You\x20can\x20now\x20log\x20in\x20with\x20cluster\x20credentials.\x0a','fn-runner','handle','\x20worker(s)\x20remaining','base64','types/env=','log','scope','_children','\x20\x20\x20\x20port:\x20\x20\x20\x20','\x20\x20Usage:\x20okdb\x20license\x20[<blob|path|uuid|activation-token>]','(?:','user','alloc','sig','\x22\x20matches\x20','addSupervisedChild','type:registered','Get\x20and\x20list\x20records,\x20run\x20byIndex\x20queries.','\x20supervised)','[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22','blobs','search','label','application/json','\x20forked\x20','processor:paused','List\x20tokens\x20and\x20users.','\x27\x20doesn\x27t\x20exist','Enqueue,\x20cancel,\x20retry,\x20remove\x20jobs;\x20manage\x20buckets;\x20reconcile\x20and\x20rebuild\x20stats.','consecutiveFailures','then','access-control-max-age','\x20\x20\x20\x20graceful\x20shutdown\x0a','ms\x20busy=','\x20\x20@','known\x20field','_totalReadMs','set-cookie','getHeader','guards','hasOwnProperty','rawBuf','BAD_GATEWAY','_totalRequests','VERB','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20override\x20active\x20environment\x20for\x20this\x20call\x0a\x20\x20','records','authenticateRequest','tokenType','standard','forceAfterMs','Write','\x20(slot=','method','SCHEMA_VALIDATION_FAILED','LICENSE_ACTIVATION_INVALID','_totalErrors','isTTY','clusterWorkers','\x20more','_shouldWrapResponse','terminal','cluster-wide','\x20\x20\x20\x20path:\x20\x20\x20\x20','processes','Not\x20Found','624984LXJmsZ','attachFeed','[okdb]\x20exported\x20\x20types=','cpus','pathParams','\x20\x20Envs:\x20\x20\x20\x20','standalone','SIGINT','isAuthenticated','kdb_admin_csrf','\x20\x20\x20\x201.\x20Send\x20the\x20PIN\x20above\x20(','--permissions','white','activateLicense','exit','ms\x0a','\x20for\x20system\x20env','start','limits','parseBearer','x-requested-with','Unsupported\x20JWT\x20alg:\x20','sse','processors/','reads','disconnect','_onProcEvent','_lastCpuPct','LICENSE_HASH_MISMATCH','__identity','[okdb]\x20created\x20./okdb-data','formatCookie','\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','GATEWAY_TIMEOUT','\x20(id:\x20','EXIT','darwin','stdout','sync-node','onLicenseExpired','connection','deaths','cluster:\x20unavailable\x20(shmbuf\x20native\x20missing)\x20—\x20running\x20single-process','views','\x20\x20Usage:\x20','_cursors','[okdb]\x20failed\x20to\x20parse\x20config\x20file\x20','body:\x20','/types\x0a\x20\x20\x20\x20','_activateProcessesReader','--blobs','internal','License\x20signature\x20invalid\x20—\x20this\x20license\x20was\x20not\x20signed\x20by\x20the\x20key\x20paired\x20with\x20this\x20build.\x20','System','execArgv','mean','licensee',':\x20expected\x20','\x20\x20[','additionalProperties','Admin','\x20\x20\x20\x20expires:\x20\x20\x20','processor:progress','passive','FTS_REGISTERED','alg','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20','yellow','index:reset','isArray','licenseId','_totalReads','[okdb]\x20starting…\x0a','0123456789ABCDEFGHJKMNPQRSTVWXYZ','\x0a[okdb]\x20received\x20','sub','\x20\x20Usage:','publishOwnRow','clearCookie','List,\x20download,\x20and\x20inspect\x20file\x20metadata.','ttl:set','connections\x20blindly;\x20a\x20worker\x20lacking\x20the\x20route\x20404s).\x20Either\x20use\x20the\x20cooperative\x20','127.0.0.1','\x20environment\x20','\x20\x20Note:\x20this\x20node\x20has\x20existing\x20tokens.\x20They\x20will\x20coexist\x20with\x20cluster\x20tokens\x0a','id:\x20','Server-side\x20user-defined\x20functions\x20registered\x20per\x20environment.','\x20\x20Path\x20access','license','List\x20views,\x20query\x20view\x20output,\x20inspect\x20metadata\x20and\x20definition.','--grants','GET','ttl:clear','embeddings','licenses','index','HEAD','\x20not\x20found','resetIndex','failures','permission','_lastTick','byteLength','allowedAlgs','\x20\x20\x20\x20license:\x20','writeFileSync','columns','_isOpen','magenta','setOwnMeta','\x20│\x20','[okdb]\x20nothing\x20to\x20reset\x20—\x20','USE','Upload,\x20update\x20metadata,\x20and\x20delete\x20files.','\x20license(s)','_draining','_userRouteCount','.kdbconfig','[okdb-cluster]\x20recommissioned\x20worker\x20slot=','clearThreadStats','_markSeen','_ownMeta','\x1b[31m','\x20ipc\x20error:\x20','DELETE\x20type/users/item/x','headers','data:write','--config','Type\x20definitions,\x20all\x20index\x20registrations\x20(byIndex,\x20FTS,\x20vector),\x20and\x20TTL\x20policy.','PUT\x20type/users/item/x\x20{\x22n\x22:1}','\x20has\x20ambiguous\x20binding\x20for\x20path\x20field:\x20','items','\x20in\x20','heapUsed','percentile','migrate','item:update','_envs','creating','workers','includes','lag','sourceType','\x20\x20Shell\x20commands','\x20}):\x20','OKDBError','addedAt','\x0a\x20\x20\x20\x20','include','VERSION_MISMATCH','defaults','methods','setupPrimary','\x20\x20✓\x20database\x20opened\x0a','line','_lastCpuAt','http','setNoDelay','regex','[okdb-cluster]\x20','VALIDATION_ERROR','selfAddress','authRequired','routes','off','detectInputType','fanout','_onStop','deregisterSelf','OPEN','ready','shell','getChanges','true','flushDebounce','derivePin','recheck','processor:ready',';\x20Max-Age=0;\x20Expires=Thu,\x2001\x20Jan\x201970\x2000:00:00\x20GMT','SIGBREAK','bold','body','listDesired','Shutting\x20down\x20due\x20to\x20license\x20expiry','count','delete','existsSync','toUpperCase','selfKey','toUTCString','Forbidden\x20—\x20requires\x20','keys:','--ttl','Register/update/delete\x20types,\x20register/drop/rebuild\x20indexes,\x20set\x20TTL\x20policy.','⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20','[okdb]\x20backing\x20up\x20to\x20','isFinite','unique:violation','headClock','JWT\x20not\x20yet\x20valid','transport:\x20','_baselines','params','entry','GONE'];_0x5b4d=function(){return _0x21cdbc;};return _0x5b4d();}var okdb$1={},okdbWorkers,hasRequiredOkdbWorkers;function requireOkdbWorkers(){if(hasRequiredOkdbWorkers)return okdbWorkers;hasRequiredOkdbWorkers=0x1;const _0xfb8a20=require$$0,_0x265cb8=require$$1$1,_0x1ad243=require$$1;let _0x2fed05;function _0x444b4a(){const _0x4d07a7=_0x2368;if(process.env.OKDB_FORCE_SHMBUF_FALLBACK==='1')return![];if(_0x2fed05!==undefined)return _0x2fed05;try{const _0x222e2f=_0x1ad243[_0x4d07a7(0x43e)](require['resolve'](_0x4d07a7(0x383)));_0x2fed05=_0x265cb8[_0x4d07a7(0x5ee)](_0x1ad243[_0x4d07a7(0x3a4)](_0x222e2f,_0x4d07a7(0x310),_0x4d07a7(0x3a0),_0x4d07a7(0x312)));}catch{_0x2fed05=![];}return _0x2fed05;}function _0xba226c(){const _0x59717e=_0xfb8a20['cpus']()['length'];return Math['max'](0x1,_0x59717e-0x1);}function _0x243b88(_0x2ab767,_0x5eecff={}){const _0x186416=_0x2368,_0x4cc5ae=_0x5eecff['shmbufNative']!==undefined?_0x5eecff[_0x186416(0x37e)]:_0x444b4a();let _0x4f677e;if(_0x2ab767?.[_0x186416(0x289)])_0x4f677e=0x1;else{let _0x181734,_0xc0dddb;if(_0x2ab767?.[_0x186416(0x194)]!==undefined&&_0x2ab767['workersFlag']!==null&&_0x2ab767[_0x186416(0x194)]!=='')_0x181734=_0x2ab767[_0x186416(0x194)],_0xc0dddb=_0x186416(0x102);else{if(process.env.OKDB_HTTP_WORKERS!==undefined&&process.env.OKDB_HTTP_WORKERS!=='')_0x181734=process.env.OKDB_HTTP_WORKERS,_0xc0dddb=_0x186416(0x29e);else _0x2ab767?.[_0x186416(0x5d0)]?.[_0x186416(0x5bf)]!==undefined&&_0x2ab767[_0x186416(0x5d0)][_0x186416(0x5bf)]!==null&&_0x2ab767['http'][_0x186416(0x5bf)]!==''&&(_0x181734=_0x2ab767[_0x186416(0x5d0)][_0x186416(0x5bf)],_0xc0dddb=_0x186416(0x104));}if(_0x181734===undefined)_0x4f677e=_0xba226c();else{const _0x355114=Number(_0x181734);!Number['isInteger'](_0x355114)||_0x355114<0x1?(console[_0x186416(0x27e)]('[okdb]\x20invalid\x20'+_0xc0dddb+'='+JSON[_0x186416(0x3d9)](_0x181734)+'\x20(must\x20be\x20an\x20integer\x20>=\x201)\x20—\x20using\x201'),_0x4f677e=0x1):_0x4f677e=_0x355114;}}return!_0x4cc5ae&&_0x4f677e>0x1&&(console[_0x186416(0x27e)](_0x186416(0x149)+(_0x186416(0x4bd)+_0x4f677e+').')),_0x4f677e=0x1),_0x4f677e;}return okdbWorkers={'isShmbufNative':_0x444b4a,'defaultWorkers':_0xba226c,'resolveWorkers':_0x243b88},okdbWorkers;}var version='1.9.0',require$$3={'version':version},okdbAuthTokens,hasRequiredOkdbAuthTokens;function requireOkdbAuthTokens(){if(hasRequiredOkdbAuthTokens)return okdbAuthTokens;hasRequiredOkdbAuthTokens=0x1;const _0xa8518b=require$$2;function _0x1597f9(_0x418388,_0x29f2cd){const _0x22483c=_0x2368;return _0xa8518b['createHmac'](_0x22483c(0x33b),_0x29f2cd)[_0x22483c(0x251)](_0x418388)[_0x22483c(0x34c)](_0x22483c(0x1c4));}function _0x4f1de5(_0x2a7c83,_0x42b473){const _0x4f6fdc=_0x2368;if(typeof _0x2a7c83!==_0x4f6fdc(0x380)||typeof _0x42b473!=='string')return![];if(Buffer[_0x4f6fdc(0x59a)](_0x2a7c83)!==Buffer['byteLength'](_0x42b473))return![];return _0xa8518b[_0x4f6fdc(0x2a4)](Buffer['from'](_0x2a7c83),Buffer['from'](_0x42b473));}function _0x3d694a(_0x3a3661){const _0x2442ef=_0x2368;if(!_0x3a3661?.['startsWith']('Bearer\x20'))return null;return _0x3a3661[_0x2442ef(0x45e)](0x7);}function _0x5f22e4(_0x20648e=0x20){const _0x8fc8e8=_0x2368;return _0xa8518b['randomBytes'](_0x20648e)[_0x8fc8e8(0x261)](_0x8fc8e8(0x1c4));}function _0x17643b(_0x2ce688){const _0x3a7522=_0x2368;return _0xa8518b[_0x3a7522(0x291)]('sha256')[_0x3a7522(0x251)](_0x2ce688)['digest'](_0x3a7522(0x439));}function _0x30ce30(_0x33ec23,_0x53a9c7,_0x46468f=0x36ee80){const _0x1ecd2e=_0x2368;if(!_0x53a9c7)throw new Error(_0x1ecd2e(0x429));const _0x5830a5=Date['now'](),_0x33c712=Buffer[_0x1ecd2e(0x36d)](JSON[_0x1ecd2e(0x3d9)]({'iat':_0x5830a5,'exp':_0x5830a5+_0x46468f,'sub':_0x33ec23?.['id']??_0x33ec23?.['sub']??null,'username':_0x33ec23?.[_0x1ecd2e(0x112)]??_0x33ec23?.['name']??null,'roles':Array['isArray'](_0x33ec23?.['roles'])?_0x33ec23[_0x1ecd2e(0x330)]:[]}))['toString'](_0x1ecd2e(0x1c4)),_0x112073=_0x1597f9(_0x33c712,_0x53a9c7);return _0x33c712+'.'+_0x112073;}function _0x4aa26b(_0x308ce5,_0x48a9e5){const _0x13cfc3=_0x2368;if(!_0x48a9e5||typeof _0x308ce5!==_0x13cfc3(0x380))return null;const [_0x337c4d,_0x16bea8]=_0x308ce5[_0x13cfc3(0x37c)]('.');if(!_0x337c4d||!_0x16bea8)return null;const _0x407d86=_0x1597f9(_0x337c4d,_0x48a9e5);if(!_0x4f1de5(_0x16bea8,_0x407d86))return null;try{const _0x396480=JSON[_0x13cfc3(0x34f)](Buffer['from'](_0x337c4d,_0x13cfc3(0x1c4))['toString']()),_0x5718ca=0x7530;if(Date[_0x13cfc3(0x16a)]()>Number(_0x396480?.[_0x13cfc3(0xfd)]??0x0)+_0x5718ca)return null;return _0x396480;}catch{return null;}}async function _0x3d42fe(_0x29d337){return new Promise((_0x517805,_0x4cb221)=>{const _0x23cc3c=_0x2368,_0xb7d691=_0xa8518b[_0x23cc3c(0x30b)](0x10);_0xa8518b[_0x23cc3c(0x2b5)](_0x29d337,_0xb7d691,0x40,(_0x50bac6,_0x453921)=>{const _0x2fe43e=_0x23cc3c;if(_0x50bac6)_0x4cb221(_0x50bac6);_0x517805(_0xb7d691[_0x2fe43e(0x261)](_0x2fe43e(0x439))+':'+_0x453921['toString'](_0x2fe43e(0x439)));});});}async function _0x2055a3(_0x77c073,_0x1f2e31){const _0x2ffc50=_0x2368,[_0x1cb861,_0x406ad0]=_0x1f2e31[_0x2ffc50(0x37c)](':');if(!_0x1cb861||!_0x406ad0)return![];const _0x7bfb91=Buffer[_0x2ffc50(0x36d)](_0x1cb861,_0x2ffc50(0x439));return new Promise((_0x189a51,_0x3ce84e)=>{_0xa8518b['scrypt'](_0x77c073,_0x7bfb91,0x40,(_0x227466,_0x184b72)=>{const _0x5b3d4e=_0x2368;if(_0x227466)_0x3ce84e(_0x227466);_0x189a51(_0xa8518b[_0x5b3d4e(0x2a4)](_0x184b72,Buffer['from'](_0x406ad0,_0x5b3d4e(0x439))));});});}return okdbAuthTokens={'hmac':_0x1597f9,'timingSafeEqual':_0x4f1de5,'parseBearer':_0x3d694a,'randomToken':_0x5f22e4,'hashToken':_0x17643b,'issueToken':_0x30ce30,'authenticateToken':_0x4aa26b,'hashPassword':_0x3d42fe,'verifyPassword':_0x2055a3},okdbAuthTokens;}var okdbLicenseCodec,hasRequiredOkdbLicenseCodec;function requireOkdbLicenseCodec(){const _0x565ecd=_0x4b361c;if(hasRequiredOkdbLicenseCodec)return okdbLicenseCodec;hasRequiredOkdbLicenseCodec=0x1;const _0x4febc8=require$$0$1,_0x257e26=_0x565ecd(0x57d),_0x153ca2=new Uint8Array(0x100)[_0x565ecd(0x166)](0xff);for(let _0x36c4ec=0x0;_0x36c4ec<_0x257e26[_0x565ecd(0x2eb)];_0x36c4ec++){_0x153ca2[_0x257e26['charCodeAt'](_0x36c4ec)]=_0x36c4ec,_0x153ca2[_0x257e26[_0x565ecd(0x4e6)](_0x36c4ec)+0x20]=_0x36c4ec;}_0x153ca2['O'[_0x565ecd(0x4e6)](0x0)]=0x0,_0x153ca2['o'[_0x565ecd(0x4e6)](0x0)]=0x0,_0x153ca2['I'[_0x565ecd(0x4e6)](0x0)]=0x1,_0x153ca2['i'[_0x565ecd(0x4e6)](0x0)]=0x1,_0x153ca2['L'[_0x565ecd(0x4e6)](0x0)]=0x1,_0x153ca2['l'[_0x565ecd(0x4e6)](0x0)]=0x1;function _0x52d4d1(_0x1f4fd7){let _0x2a4e97=0x0,_0x5024f7=0x0,_0x520f3e='';for(let _0x192a60=0x0;_0x192a60<_0x1f4fd7['length'];_0x192a60++){_0x5024f7=_0x5024f7<<0x8|_0x1f4fd7[_0x192a60],_0x2a4e97+=0x8;while(_0x2a4e97>=0x5){_0x2a4e97-=0x5,_0x520f3e+=_0x257e26[_0x5024f7>>>_0x2a4e97&0x1f];}}return _0x2a4e97>0x0&&(_0x520f3e+=_0x257e26[_0x5024f7<<0x5-_0x2a4e97&0x1f]),_0x520f3e;}function _0x13ca8f(_0x24f29b){const _0x107f27=_0x565ecd;_0x24f29b=_0x24f29b[_0x107f27(0x38b)](/-/g,'')[_0x107f27(0x5ef)]();let _0xe56562=0x0,_0x21129c=0x0;const _0x179ef2=[];for(let _0x43c40f=0x0;_0x43c40f<_0x24f29b[_0x107f27(0x2eb)];_0x43c40f++){const _0x29eba6=_0x153ca2[_0x24f29b[_0x107f27(0x4e6)](_0x43c40f)];if(_0x29eba6===0xff)continue;_0x21129c=_0x21129c<<0x5|_0x29eba6,_0xe56562+=0x5,_0xe56562>=0x8&&(_0xe56562-=0x8,_0x179ef2[_0x107f27(0x614)](_0x21129c>>>_0xe56562&0xff));}return Buffer['from'](_0x179ef2);}const _0x61bd1a=[_0x565ecd(0x32d),_0x565ecd(0x591),_0x565ecd(0x238),_0x565ecd(0x458),'timeMachine',_0x565ecd(0x55f),_0x565ecd(0x32b),'files'],_0x3ca68d=0x0,_0x448090=0x1,_0x5e316a=0x2,_0x9cc9b5=0x6*0x1e*0x18*0x3c*0x3c*0x3e8;function _0x10ede0({issuedAt:_0x1cf6a7,expiresAt:_0x99a7ac,licensee:licensee='',features:features={},limits:limits={},licenseType:licenseType=_0x3ca68d}){const _0x3199e7=_0x565ecd,_0x5a78d8=Buffer['from'](licensee,_0x3199e7(0x365))[_0x3199e7(0x45e)](0x0,0x40),_0x54b5da=0x1+0x1+0x4+0x4+0x1+_0x5a78d8[_0x3199e7(0x2eb)]+0x2+0x10,_0x48c274=Buffer[_0x3199e7(0x3b4)](_0x54b5da);let _0x37430b=0x0;_0x48c274[_0x3199e7(0x2e4)](0x1,_0x37430b++),_0x48c274[_0x3199e7(0x2e4)](licenseType,_0x37430b++),_0x48c274[_0x3199e7(0x461)](Math[_0x3199e7(0x341)](_0x1cf6a7/0x3e8),_0x37430b),_0x37430b+=0x4,_0x48c274[_0x3199e7(0x461)](Math[_0x3199e7(0x341)](_0x99a7ac/0x3e8),_0x37430b),_0x37430b+=0x4,_0x48c274[_0x3199e7(0x2e4)](_0x5a78d8[_0x3199e7(0x2eb)],_0x37430b++),_0x5a78d8['copy'](_0x48c274,_0x37430b),_0x37430b+=_0x5a78d8['length'];let _0x5270a4=0x0;for(let _0x17bc54=0x0;_0x17bc54<_0x61bd1a['length'];_0x17bc54++){if(features[_0x61bd1a[_0x17bc54]])_0x5270a4|=0x1<<_0x17bc54;}_0x48c274[_0x3199e7(0x49e)](_0x5270a4,_0x37430b),_0x37430b+=0x2;const _0xb792d5=['envs',_0x3199e7(0x202),_0x3199e7(0x1dc),_0x3199e7(0x178)];for(const _0x480803 of _0xb792d5){_0x48c274['writeUInt32BE'](limits[_0x480803]||0x0,_0x37430b),_0x37430b+=0x4;}return _0x48c274;}function _0x4f58c0(_0xa7340a){const _0x2f2685=_0x565ecd;let _0x4e9dfa=0x0;const _0x14eb1f=_0xa7340a[_0x2f2685(0x176)](_0x4e9dfa++),_0x3fef41=_0xa7340a[_0x2f2685(0x176)](_0x4e9dfa++),_0x5f123e=_0xa7340a[_0x2f2685(0x10c)](_0x4e9dfa);_0x4e9dfa+=0x4;const _0x18e6c0=_0xa7340a[_0x2f2685(0x10c)](_0x4e9dfa);_0x4e9dfa+=0x4;const _0x35e88e=_0xa7340a['readUInt8'](_0x4e9dfa++),_0x29e571=_0xa7340a[_0x2f2685(0x45e)](_0x4e9dfa,_0x4e9dfa+_0x35e88e)[_0x2f2685(0x261)](_0x2f2685(0x365));_0x4e9dfa+=_0x35e88e;const _0x3f535d=_0xa7340a[_0x2f2685(0x49a)](_0x4e9dfa);_0x4e9dfa+=0x2;const _0x55e12b={};for(let _0x57473d=0x0;_0x57473d<_0x61bd1a[_0x2f2685(0x2eb)];_0x57473d++){_0x55e12b[_0x61bd1a[_0x57473d]]=Boolean(_0x3f535d&0x1<<_0x57473d);}const _0x25888d=[_0x2f2685(0xec),'typesPerEnv',_0x2f2685(0x1dc),_0x2f2685(0x178)],_0x1ee51f={};for(const _0x43bdfc of _0x25888d){const _0x1b4159=_0xa7340a[_0x2f2685(0x10c)](_0x4e9dfa);_0x4e9dfa+=0x4,_0x1ee51f[_0x43bdfc]=_0x1b4159===0x0?null:_0x1b4159;}return{'v':_0x14eb1f,'licenseType':_0x3fef41,'issuedAt':_0x5f123e*0x3e8,'expiresAt':_0x18e6c0*0x3e8,'licensee':_0x29e571,'features':_0x55e12b,'limits':_0x1ee51f};}function _0x2abc25(_0x5a56ea,_0xe8497a){const _0x242a20=_0x565ecd,_0x275efd=Buffer[_0x242a20(0x115)]([_0x5a56ea,_0xe8497a]),_0x4c3608=_0x52d4d1(_0x275efd),_0x3ae566=[];for(let _0x359474=0x0;_0x359474<_0x4c3608[_0x242a20(0x2eb)];_0x359474+=0x8){_0x3ae566['push'](_0x4c3608[_0x242a20(0x45e)](_0x359474,_0x359474+0x8));}return _0x3ae566[_0x242a20(0x3a4)]('-');}function _0x1251fc(_0x24cfaf){const _0x398ba7=_0x565ecd;if(typeof _0x24cfaf!==_0x398ba7(0x380))throw new Error('decodeLicenseBlob:\x20input\x20must\x20be\x20a\x20string');const _0x533a02=_0x13ca8f(_0x24cfaf[_0x398ba7(0x38b)](/-/g,''));if(_0x533a02['length']<0x41)throw new Error(_0x398ba7(0x299)+_0x533a02[_0x398ba7(0x2eb)]+_0x398ba7(0x374));const _0x42d8be=_0x533a02[_0x398ba7(0x45e)](0x0,_0x533a02[_0x398ba7(0x2eb)]-0x40),_0x53edfb=_0x533a02[_0x398ba7(0x45e)](_0x533a02[_0x398ba7(0x2eb)]-0x40);let _0x220191;try{_0x220191=_0x4f58c0(_0x42d8be);}catch(_0x419ad5){throw new Error(_0x398ba7(0x1de)+_0x419ad5['message']);}return{'rawBuf':_0x533a02,'payload':_0x42d8be,'sig':_0x53edfb,'decoded':_0x220191};}function _0x572f3c(_0x5857c8){const _0xe4db47=_0x565ecd;return _0x4febc8[_0xe4db47(0x291)]('sha256')[_0xe4db47(0x251)](_0x5857c8)['digest']()[_0xe4db47(0x45e)](0x0,0x8);}function _0xdb96dc(_0x5891eb,_0x2f3980,_0x13b0e5){const _0x3dc917=_0x565ecd,_0x50324a='OKDB-PIN-V1:'+_0x13b0e5,_0x5e814e=Buffer['concat']([Buffer['from'](_0x5891eb,_0x3dc917(0x365)),_0x2f3980]),_0x4a6705=_0x4febc8['createHmac']('sha256',_0x50324a)[_0x3dc917(0x251)](_0x5e814e)[_0x3dc917(0x34c)](),_0x2fd411=_0x52d4d1(_0x4a6705[_0x3dc917(0x45e)](0x0,0x5));return{'pin':_0x2fd411,'pinHmac':_0x4a6705};}function _0x5a6dd0(_0xa941a4,_0x2c99f2,_0x49d473){const _0x3cf6b2=_0x565ecd,_0x4a5e56=Buffer[_0x3cf6b2(0x3b4)](0x4d);let _0x3b88b4=0x0;_0x4a5e56['writeUInt8'](0x1,_0x3b88b4++),_0xa941a4['copy'](_0x4a5e56,_0x3b88b4),_0x3b88b4+=0x8,_0x4a5e56[_0x3cf6b2(0x461)](_0x2c99f2,_0x3b88b4),_0x3b88b4+=0x4,_0x49d473[_0x3cf6b2(0x28b)](_0x4a5e56,_0x3b88b4);const _0x5adba3=_0x52d4d1(_0x4a5e56),_0x1a2bcd=[];for(let _0x30aee7=0x0;_0x30aee7<_0x5adba3['length'];_0x30aee7+=0x6){_0x1a2bcd[_0x3cf6b2(0x614)](_0x5adba3[_0x3cf6b2(0x45e)](_0x30aee7,_0x30aee7+0x6));}return _0x1a2bcd['join']('-');}function _0xbf9911(_0x5017e4){const _0x3879b8=_0x565ecd;if(typeof _0x5017e4!==_0x3879b8(0x380))throw new Error(_0x3879b8(0x29b));const _0x514e90=_0x13ca8f(_0x5017e4['replace'](/-/g,''));if(_0x514e90[_0x3879b8(0x2eb)]!==0x4d)throw new Error(_0x3879b8(0x23b)+_0x514e90[_0x3879b8(0x2eb)]);let _0x51e75e=0x0;const _0x3eb37f=_0x514e90[_0x3879b8(0x176)](_0x51e75e++),_0x33b048=_0x514e90[_0x3879b8(0x45e)](_0x51e75e,_0x51e75e+0x8);_0x51e75e+=0x8;const _0x3b58a9=_0x514e90[_0x3879b8(0x10c)](_0x51e75e);_0x51e75e+=0x4;const _0x3fdbf0=_0x514e90[_0x3879b8(0x45e)](_0x51e75e);return{'v':_0x3eb37f,'licenseHash':_0x33b048,'expiry':_0x3b58a9,'sig':_0x3fdbf0};}function _0x239512({tokenString:_0x1c4e11,nodeId:_0x3b94f1,rawBlobBuf:_0x59b74a,pubKeyPem:_0x1098f6,pubFingerprint:_0x4e401d}){const _0x315c41=_0x565ecd;let _0x18fa21;try{_0x18fa21=_0xbf9911(_0x1c4e11);}catch(_0x37f9eb){return{'valid':![],'reason':'MALFORMED_TOKEN'};}const _0x82ba79=_0x572f3c(_0x59b74a);if(!_0x82ba79[_0x315c41(0x362)](_0x18fa21[_0x315c41(0x655)]))return{'valid':![],'reason':_0x315c41(0x550)};const {pinHmac:_0x49491a}=_0xdb96dc(_0x3b94f1,_0x82ba79,_0x4e401d),_0xce1430=Buffer['allocUnsafe'](0x4);_0xce1430['writeUInt32BE'](_0x18fa21['expiry'],0x0);const _0x20a59d=Buffer[_0x315c41(0x115)]([Buffer[_0x315c41(0x36d)]([_0x18fa21['v']]),_0x49491a[_0x315c41(0x45e)](0x0,0x5),_0x18fa21[_0x315c41(0x655)],_0xce1430]);try{const _0xc0c9aa=_0x4febc8[_0x315c41(0x170)](null,_0x20a59d,_0x1098f6,_0x18fa21['sig']);if(!_0xc0c9aa)return{'valid':![],'reason':_0x315c41(0x445)};}catch(_0x546a02){return{'valid':![],'reason':'SIG_INVALID'};}if(_0x18fa21[_0x315c41(0x146)]<Date['now']()/0x3e8)return{'valid':![],'reason':_0x315c41(0x133)};return{'valid':!![],'reason':'ok'};}function _0x109b45(_0x17eba3){const _0x36f284=_0x565ecd;if(typeof _0x17eba3!==_0x36f284(0x380))return'unknown';const _0x2955d2=_0x17eba3[_0x36f284(0x486)]();if(_0x2955d2[_0x36f284(0x3cc)]('/')||_0x2955d2[_0x36f284(0x3cc)]('./')||_0x2955d2[_0x36f284(0x3cc)](_0x36f284(0x4eb))||/^[A-Za-z]:[\\/]/[_0x36f284(0x30d)](_0x2955d2))return _0x36f284(0x42d);if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i[_0x36f284(0x30d)](_0x2955d2))return _0x36f284(0x134);const _0x185682=_0x2955d2[_0x36f284(0x38b)](/[\s-]+/g,'')[_0x36f284(0x2eb)];if(_0x185682===0x7c)return _0x36f284(0x377);if(_0x185682>=0x95&&_0x185682<=0xfc)return _0x36f284(0x1d8);return _0x36f284(0x326);}return okdbLicenseCodec={'toBase32':_0x52d4d1,'fromBase32':_0x13ca8f,'encodeLicensePayload':_0x10ede0,'decodeLicensePayload':_0x4f58c0,'encodeLicenseBlob':_0x2abc25,'decodeLicenseBlob':_0x1251fc,'licenseHash':_0x572f3c,'derivePin':_0xdb96dc,'encodeActivationToken':_0x5a6dd0,'decodeActivationToken':_0xbf9911,'verifyActivation':_0x239512,'detectInputType':_0x109b45,'FEATURE_NAMES':_0x61bd1a,'LICENSE_TYPE_STANDARD':_0x3ca68d,'LICENSE_TYPE_OPEN':_0x448090,'LICENSE_TYPE_INTERNAL':_0x5e316a,'OPEN_LICENSE_MAX_DURATION_MS':_0x9cc9b5},okdbLicenseCodec;}var okdbError,hasRequiredOkdbError;function requireOkdbError(){if(hasRequiredOkdbError)return okdbError;hasRequiredOkdbError=0x1;class _0x24cdc6 extends Error{constructor(_0x42f50e,_0x1c4a9b,_0x37faec={}){const _0x3dacf9=_0x2368;super(_0x42f50e),this['name']=_0x3dacf9(0x5c5),this[_0x3dacf9(0x60e)]=_0x1c4a9b,this[_0x3dacf9(0x108)]=_0x37faec,_0x37faec[_0x3dacf9(0x10f)]&&(this['cause']=_0x37faec[_0x3dacf9(0x10f)]),Error['captureStackTrace'](this,this['constructor']);}}class _0x4354fa extends _0x24cdc6{constructor(_0x25fdce,_0x373d2a,_0x21d618,_0xa44c60){const _0x4675ce=_0x2368;super('Version\x20mismatch\x20for\x20'+_0x25fdce+'@'+_0x373d2a+_0x4675ce(0x56d)+_0x21d618+_0x4675ce(0x136)+_0xa44c60,_0x4675ce(0x5c9),{'type':_0x25fdce,'key':_0x373d2a,'expectedVersion':_0x21d618,'actualVersion':_0xa44c60}),this[_0x4675ce(0x2cc)]='OKDBVersionMismatchError';}}class _0x2a7149 extends _0x24cdc6{constructor(_0x167bb5,_0x1a4360){const _0x3255a3=_0x2368;super(_0x167bb5+'@'+_0x1a4360+_0x3255a3(0x1a8),_0x3255a3(0x155),{'type':_0x167bb5,'key':_0x1a4360}),this[_0x3255a3(0x2cc)]=_0x3255a3(0x14f);}}class _0x641a67 extends _0x24cdc6{constructor(_0x25ad3f,_0x7e2074){const _0xb69159=_0x2368;super(_0x25ad3f+'@'+_0x7e2074+_0xb69159(0x4d2),'ALREADY_EXISTS',{'type':_0x25ad3f,'key':_0x7e2074}),this[_0xb69159(0x2cc)]=_0xb69159(0x12c);}}class _0x4b5f56 extends _0x24cdc6{constructor(_0x366337,_0x42452f){const _0x2050e9=_0x2368,_0x193237=typeof _0x42452f;super(_0x2050e9(0x4a5)+_0x366337+_0x2050e9(0x21e)+_0x193237+_0x2050e9(0x1a5)+_0x42452f,_0x2050e9(0x396),{'index':_0x366337,'key':_0x42452f,'keyType':_0x193237}),this[_0x2050e9(0x2cc)]='OKDBInvalidIndexKeyError';}}class _0xb68d6d extends _0x24cdc6{constructor(_0xbe77a){const _0xbeabe3=_0x2368,_0x578114=typeof _0xbe77a;super(_0xbeabe3(0x2ee)+_0x578114+'.\x20Primary\x20keys\x20must\x20be\x20string\x20or\x20number.\x20Got:\x20'+_0xbe77a,'INVALID_PRIMARY_KEY',{'key':_0xbe77a,'keyType':_0x578114}),this[_0xbeabe3(0x2cc)]=_0xbeabe3(0x227);}}class _0x1056ba extends _0x24cdc6{constructor(_0x2f13c8){const _0x594c28=_0x2368;super(_0x594c28(0x66b)+_0x2f13c8+_0x594c28(0x50d),'TYPE_NOT_REGISTERED',{'type':_0x2f13c8}),this['name']=_0x594c28(0x484);}}class _0xac327a extends _0x24cdc6{constructor(_0x5d6773){const _0x5d8635=_0x2368;super('Type\x20\x27'+_0x5d6773+'\x27\x20already\x20registered','TYPE_ALREADY_REGISTERED',{'type':_0x5d6773}),this[_0x5d8635(0x2cc)]='OKDBTypeAlreadyRegisteredError';}}class _0x157879 extends _0x24cdc6{constructor(_0x16eecd,_0x3585e9){const _0x19bd05=_0x2368;super(_0x19bd05(0x11d)+_0x3585e9+_0x19bd05(0x17e)+_0x16eecd+'\x27\x20doesn\x27t\x20exist','INDEX_NOT_REGISTERED',{'type':_0x16eecd,'index':_0x3585e9}),this['name']='OKDBIndexNotRegisteredError';}}class _0x489c95 extends _0x24cdc6{constructor(_0x516dd4,_0x24051c){const _0x468171=_0x2368;super(_0x468171(0x11d)+_0x24051c+_0x468171(0x17e)+_0x516dd4+'\x27\x20is\x20already\x20registered',_0x468171(0x379),{'type':_0x516dd4,'index':_0x24051c}),this[_0x468171(0x2cc)]=_0x468171(0x31e);}}class _0xe2d01 extends _0x24cdc6{constructor(_0x57d0ac,_0x4a995e={}){const _0x518813=_0x2368;super(_0x57d0ac,'INVALID_VALUE',_0x4a995e),this[_0x518813(0x2cc)]=_0x518813(0x3f8);}}class _0x158880 extends _0x24cdc6{constructor(_0x56e109,_0x2e47f7,_0x25dd4a,_0x1110d9,_0x5b3b4d){const _0x4d9289=_0x2368;super(_0x4d9289(0x1a3)+_0x56e109+'@'+_0x2e47f7+_0x4d9289(0x203)+_0x25dd4a+_0x4d9289(0x1e1)+_0x1110d9+_0x4d9289(0x295)+_0x5b3b4d+'\x27','UNIQUE_CONSTRAINT',{'type':_0x56e109,'index':_0x2e47f7,'indexKey':_0x25dd4a,'existingKey':_0x1110d9,'conflictingKey':_0x5b3b4d}),this[_0x4d9289(0x2cc)]='OKDBUniqueConstraintError';}}class _0xb43cf5 extends _0x24cdc6{constructor(_0x20d98b,_0x4285fa,_0x4b13c9){const _0x1764fd=_0x2368;super(_0x1764fd(0x4b5)+_0x20d98b+'@'+_0x4285fa,_0x1764fd(0x528),{'type':_0x20d98b,'key':_0x4285fa,'errors':_0x4b13c9}),this[_0x1764fd(0x2cc)]=_0x1764fd(0x640),this[_0x1764fd(0x49b)]=_0x20d98b,this[_0x1764fd(0x174)]=_0x4285fa,this[_0x1764fd(0x444)]=_0x4b13c9;}}class _0x3db255 extends _0x24cdc6{constructor(_0x1068f7,_0x4ba1f0){const _0x477822=_0x2368;super(_0x477822(0x613)+_0x1068f7+':\x20'+_0x4ba1f0[_0x477822(0x2eb)]+_0x477822(0x13e),_0x477822(0x2e6),{'type':_0x1068f7,'failures':_0x4ba1f0}),this[_0x477822(0x2cc)]='OKDBSchemaCollectionError',this[_0x477822(0x49b)]=_0x1068f7,this[_0x477822(0x597)]=_0x4ba1f0;}}class _0x15c33f extends _0x24cdc6{constructor(_0x4a7cab,_0x26703e,_0x4a1ebb,_0x26f8f8,_0x35f38b){const _0xe2f450=_0x2368;super(_0xe2f450(0xef)+_0x4a7cab+'@'+_0x26703e+'.'+_0x4a1ebb+_0xe2f450(0x188)+_0x26f8f8+'@'+_0x35f38b+_0xe2f450(0x1b7),'FOREIGN_KEY_VIOLATION',{'sourceType':_0x4a7cab,'sourceKey':_0x26703e,'fieldPath':_0x4a1ebb,'targetType':_0x26f8f8,'targetKey':_0x35f38b}),this[_0xe2f450(0x2cc)]=_0xe2f450(0x4be),this[_0xe2f450(0x5c2)]=_0x4a7cab,this['sourceKey']=_0x26703e,this[_0xe2f450(0x120)]=_0x4a1ebb,this[_0xe2f450(0x372)]=_0x26f8f8,this['targetKey']=_0x35f38b;}}class _0x5df77e extends _0x24cdc6{constructor(_0x5bcfa0,_0x2a0522,_0x10c8f3){const _0x327039=_0x2368;super('Cannot\x20delete\x20'+_0x5bcfa0+'@'+_0x2a0522+':\x20'+_0x10c8f3['length']+'\x20document(s)\x20reference\x20it\x20with\x20onDelete:restrict',_0x327039(0x66d),{'targetType':_0x5bcfa0,'targetKey':_0x2a0522,'references':_0x10c8f3}),this[_0x327039(0x2cc)]='OKDBForeignKeyDeleteError',this[_0x327039(0x372)]=_0x5bcfa0,this[_0x327039(0x436)]=_0x2a0522,this['references']=_0x10c8f3;}}class _0x4ca79f extends _0x24cdc6{constructor(_0x4de81a,_0x4611c8,_0x5c1f00){const _0x4d7a45=_0x2368;super(_0x4d7a45(0x390)+_0x4611c8+_0x4d7a45(0x191)+_0x4de81a+_0x4d7a45(0x306)+_0x5c1f00[_0x4d7a45(0x601)](_0x9172c5=>_0x9172c5[_0x4d7a45(0x4d6)]+':'+_0x9172c5[_0x4d7a45(0x2cc)])[_0x4d7a45(0x3a4)](',\x20'),_0x4d7a45(0x48a),{'type':_0x4de81a,'index':_0x4611c8,'usedBy':_0x5c1f00}),this[_0x4d7a45(0x2cc)]=_0x4d7a45(0x1fa);}}return okdbError={'OKDBError':_0x24cdc6,'OKDBVersionMismatchError':_0x4354fa,'OKDBNotFoundError':_0x2a7149,'OKDBAlreadyExistsError':_0x641a67,'OKDBInvalidIndexKeyError':_0x4b5f56,'OKDBInvalidPrimaryKeyError':_0xb68d6d,'OKDBTypeNotRegisteredError':_0x1056ba,'OKDBTypeAlreadyRegisteredError':_0xac327a,'OKDBIndexNotRegisteredError':_0x157879,'OKDBIndexAlreadyRegisteredError':_0x489c95,'OKDBInvalidValueError':_0xe2d01,'OKDBUniqueConstraintError':_0x158880,'OKDBSchemaValidationError':_0xb43cf5,'OKDBSchemaCollectionError':_0x3db255,'OKDBForeignKeyError':_0x15c33f,'OKDBForeignKeyDeleteError':_0x5df77e,'OKDBIndexHasConsumersError':_0x4ca79f},okdbError;}var okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x5adc1c=_0x4b361c;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x5073ab={'PUT':_0x5adc1c(0x42f),'REMOVE':_0x5adc1c(0x1b1),'INDEX_DROP':_0x5adc1c(0x14d),'INDEX_REGISTER':_0x5adc1c(0x41d),'INDEX_RESET':_0x5adc1c(0x596),'TYPE_REGISTER':'registerType','TYPE_DROP':_0x5adc1c(0x298),'FTS_REGISTER':_0x5adc1c(0x438),'FTS_DROP':_0x5adc1c(0x156),'FTS_RESET':_0x5adc1c(0x671),'SCHEMA_SET':_0x5adc1c(0x1c0),'SCHEMA_DROP':'dropSchema','TTL_SET':_0x5adc1c(0x327),'TTL_CLEAR':_0x5adc1c(0x4b4)},_0x46c743={'SYSTEM_READY':'system:ready','SYSTEM_STOPPED':_0x5adc1c(0x3a2),'SYSTEM_CLOCK_CHANGE':_0x5adc1c(0x466),'SYSTEM_POKE':'system:poke','SYSTEM_DRAIN':_0x5adc1c(0x394),'SYSTEM_TYPE_DROP':_0x5adc1c(0x247),'SYSTEM_PROC':'system:proc','SYSTEM_BUS_STATE_CHANGE':'system:bus_state_change','ITEM_CREATE':'item:create','ITEM_UPDATE':_0x5adc1c(0x5bc),'ITEM_REMOVE':_0x5adc1c(0x433),'INDEX_RESET':_0x5adc1c(0x578),'INDEX_READY':_0x5adc1c(0x44c),'INDEX_PROGRESS':_0x5adc1c(0x384),'VIEW_PROGRESS':_0x5adc1c(0x415),'INDEX_DROP':_0x5adc1c(0x2ef),'INDEX_REGISTERED':'index:registered','FTS_REGISTERED':_0x5adc1c(0x450),'FTS_DROP':_0x5adc1c(0x622),'FTS_RESET':_0x5adc1c(0x36f),'SCHEMA_SET':'schema:set','SCHEMA_DROP':'schema:drop','UNIQUE_VIOLATION':_0x5adc1c(0x5f9),'UNIQUE_VIOLATION_RESOLVED':_0x5adc1c(0x2cb),'REF_VIOLATION':_0x5adc1c(0x3ef),'REF_VIOLATION_RESOLVED':'ref:violation_resolved','SYNC_APPLY':_0x5adc1c(0x615),'TXN_START':_0x5adc1c(0x676),'TXN_END':_0x5adc1c(0x382),'TXN_ROLLBACK':_0x5adc1c(0x204),'TYPE_REGISTERED':_0x5adc1c(0x502),'TYPE_DROP':_0x5adc1c(0x619),'ENV_OPENED':'env:opened','ENV_REMOVED':_0x5adc1c(0x4e0),'TTL_EXPIRED':_0x5adc1c(0x457),'TTL_SET':_0x5adc1c(0x584),'TTL_CLEAR':_0x5adc1c(0x590),'LICENSE_INVALID':_0x5adc1c(0x19c),'LICENSE_ADDED':_0x5adc1c(0x45c),'LICENSE_ACTIVATED':_0x5adc1c(0x1ca),'LICENSE_REMOVED':_0x5adc1c(0x369)},_0x20d21b={'CREATING':'creating','RESETTING':_0x5adc1c(0x658),'READY':_0x5adc1c(0x5de),'DROPPING':'dropping','WAITING':_0x5adc1c(0x164)},_0x4a5770={'CREATED':_0x5adc1c(0x2be),'STARTING':_0x5adc1c(0x27a),'STARTED':'started','STOPPING':_0x5adc1c(0x395),'STOPPED':'stopped'},_0x2a622d={'CREATING':_0x5adc1c(0x5be),'READY':_0x5adc1c(0x5de),'HALTED':_0x5adc1c(0x3e2),'STOPPED':'stopped','RESETTING':'resetting'},_0x46fc38=Object['freeze']({'POKE':_0x5adc1c(0x101),'DRAIN':_0x5adc1c(0x399),'TYPE_DROP':_0x5adc1c(0x20f),'PROC':_0x5adc1c(0x355)});return okdbEnums={'BUS_EVENTS':_0x46fc38,'CHANGE_ACTIONS':_0x5073ab,'EVENTS':_0x46c743,'INDEX_STATE':_0x20d21b,'OKDB_STATE':_0x4a5770,'VIEW_STATE':_0x2a622d},okdbEnums;}var okdbPubkey,hasRequiredOkdbPubkey;function requireOkdbPubkey(){const _0x4d578a=_0x4b361c;if(hasRequiredOkdbPubkey)return okdbPubkey;hasRequiredOkdbPubkey=0x1;const _0x1b810b=require$$1$1,_0x395870=require$$1,_0x52acb3=require$$2,_0x2c99c0=_0x1b810b[_0x4d578a(0xe7)](_0x395870[_0x4d578a(0x3a4)](__dirname,_0x4d578a(0x490)),_0x4d578a(0x365))[_0x4d578a(0x486)](),_0x5bac0f=_0x52acb3[_0x4d578a(0x18e)](_0x2c99c0)[_0x4d578a(0x2d6)]({'type':'spki','format':_0x4d578a(0x34a)}),_0x23aabf=_0x52acb3['createHash']('sha256')[_0x4d578a(0x251)](_0x5bac0f)[_0x4d578a(0x34c)](_0x4d578a(0x439))[_0x4d578a(0x45e)](0x0,0x10);return okdbPubkey={'PUBLIC_KEY_PEM':_0x2c99c0,'PUB_FINGERPRINT':_0x23aabf},okdbPubkey;}var okdbLicense,hasRequiredOkdbLicense;function requireOkdbLicense(){const _0x196ac9=_0x4b361c;if(hasRequiredOkdbLicense)return okdbLicense;hasRequiredOkdbLicense=0x1;const _0xaf761=require$$2,{OKDBError:_0x4640cd}=requireOkdbError(),{EVENTS:_0x551069}=requireOkdbEnums(),_0x535a30=requireOkdbLicenseCodec(),{LICENSE_TYPE_OPEN:_0x1b43e4,LICENSE_TYPE_INTERNAL:_0x43264b,OPEN_LICENSE_MAX_DURATION_MS:_0x395586}=_0x535a30,_0xd89aac=requireOkdbPubkey(),_0x4e1b2f={'LICENSED_BUILD':'true','PUBLIC_KEY_PEM':_0xd89aac[_0x196ac9(0x3b0)],'PUB_FINGERPRINT':_0xd89aac[_0x196ac9(0x10e)],'LICENSE_EXPIRED_ACTION':_0x196ac9(0x4f7)},_0x48b8b8='~licenses',_0x38eeef={'features':{'sync':![],'embeddings':![],'engines':![],'fts':!![],'timeMachine':![],'views':!![],'mcp':!![],'files':!![]},'limits':{'envs':0x2,'typesPerEnv':0xa,'syncPeers':0x0,'maxWrites':0xf4240},'_isFree':!![]};async function _0x196631(_0x4c14c5){const _0x3e88b6=_0x196ac9;!_0x4c14c5[_0x3e88b6(0x431)](_0x48b8b8)&&await _0x4c14c5[_0x3e88b6(0x428)](_0x48b8b8);}class _0x12dd99{constructor(_0x3a4d39){const _0x1382b9=_0x196ac9;this['okdb']=_0x3a4d39,this[_0x1382b9(0x2c5)]=null;}async[_0x196ac9(0x3b2)](){const _0x563fdc=_0x196ac9,_0x17a302=this[_0x563fdc(0x2d3)][_0x563fdc(0x18f)];if(!_0x17a302||!_0x17a302['hasType'](_0x48b8b8)){this['_active']=null;return;}const _0x315c24=this['okdb']['id'];let _0x19295f=null;for(const {key:_0x4aba3e,value:_0x2bd270}of _0x17a302[_0x563fdc(0x391)](_0x48b8b8)){const _0x46f4eb=this[_0x563fdc(0xed)](_0x2bd270,_0x315c24);_0x46f4eb==='active'&&!_0x19295f&&(_0x19295f={..._0x2bd270,'id':_0x4aba3e,'status':_0x46f4eb});}this[_0x563fdc(0x2c5)]=_0x19295f;if(this['_active']&&this[_0x563fdc(0x2c5)][_0x563fdc(0x400)]===_0x1b43e4){const _0x4e4d1a=Math[_0x563fdc(0x602)]((this[_0x563fdc(0x2c5)]['expiresAt']-Date[_0x563fdc(0x16a)]())/0x5265c00);this[_0x563fdc(0x2d3)][_0x563fdc(0x4f7)]?.[_0x563fdc(0x27e)](_0x563fdc(0x5f6)+_0x4e4d1a+_0x563fdc(0x246),{'feature':_0x563fdc(0x58c),'licensee':this[_0x563fdc(0x2c5)][_0x563fdc(0x56c)],'expiresAt':new Date(this['_active'][_0x563fdc(0x63c)])[_0x563fdc(0x4c8)]()});}this[_0x563fdc(0x2c5)]&&this['_active'][_0x563fdc(0x400)]===_0x43264b&&this[_0x563fdc(0x2d3)][_0x563fdc(0x4f7)]?.[_0x563fdc(0x27e)](_0x563fdc(0x61b),{'feature':_0x563fdc(0x58c),'licensee':this['_active']['licensee']});}[_0x196ac9(0xed)](_0xe07c7e,_0x373277){const _0x34dadb=_0x196ac9;if(!_0xe07c7e['blob'])return _0x34dadb(0x30a);let _0x4d2a95;try{_0x4d2a95=_0x535a30[_0x34dadb(0x358)](_0xe07c7e[_0x34dadb(0x1d8)]);}catch(_0x3fe73a){return _0x34dadb(0x30a);}try{const _0x5d3deb=_0xaf761['verify'](null,_0x4d2a95['payload'],_0x4e1b2f['PUBLIC_KEY_PEM'],_0x4d2a95[_0x34dadb(0x4ff)]);if(!_0x5d3deb)return _0x34dadb(0x30a);}catch(_0x1bf032){return _0x34dadb(0x30a);}if(_0x4d2a95[_0x34dadb(0x397)][_0x34dadb(0x400)]===_0x43264b)return _0x34dadb(0x22d);if(_0x4d2a95[_0x34dadb(0x397)][_0x34dadb(0x63c)]<=Date[_0x34dadb(0x16a)]())return _0x34dadb(0x2fc);if(_0x4d2a95[_0x34dadb(0x397)]['licenseType']===_0x1b43e4)return _0x34dadb(0x22d);if(!_0xe07c7e[_0x34dadb(0x377)])return'pending';const _0x5234ea=_0x535a30[_0x34dadb(0x105)]({'tokenString':_0xe07c7e[_0x34dadb(0x377)],'nodeId':_0x373277,'rawBlobBuf':_0x4d2a95[_0x34dadb(0x51b)],'pubKeyPem':_0x4e1b2f[_0x34dadb(0x3b0)],'pubFingerprint':_0x4e1b2f['PUB_FINGERPRINT']});if(_0x5234ea['reason']==='LICENSE_HASH_MISMATCH'||_0x5234ea[_0x34dadb(0x4bb)]===_0x34dadb(0x445))return _0x34dadb(0x469);if(_0x5234ea[_0x34dadb(0x4bb)]===_0x34dadb(0x133))return _0x34dadb(0x2fc);if(!_0x5234ea[_0x34dadb(0x654)])return'wrong_node';return _0x34dadb(0x22d);}get[_0x196ac9(0x22d)](){const _0x5bb9a8=_0x196ac9;return this[_0x5bb9a8(0x2c5)];}get[_0x196ac9(0x21b)](){const _0x2e6b02=_0x196ac9;return this[_0x2e6b02(0x2c5)]??_0x38eeef;}[_0x196ac9(0x639)](_0x289922){const _0x5cd16d=_0x196ac9;if(_0x4e1b2f[_0x5cd16d(0x3bb)]!==_0x5cd16d(0x5e1))return;const _0x44afa0=this[_0x5cd16d(0x21b)];if(!_0x44afa0[_0x5cd16d(0x26d)]?.[_0x289922]){const _0xe2ea72=_0x44afa0['_isFree']?_0x5cd16d(0x275)+_0x289922+'.\x20Add\x20a\x20license\x20that\x20includes\x20\x22'+_0x289922+_0x5cd16d(0x35c):'Feature\x20not\x20licensed:\x20'+_0x289922+_0x5cd16d(0x147)+_0x289922+'\x22.';throw new _0x4640cd(_0xe2ea72,_0x5cd16d(0x367),{'feature':_0x289922});}}[_0x196ac9(0x39b)](_0x46fc31){const _0x272d02=_0x196ac9;if(_0x4e1b2f[_0x272d02(0x3bb)]!==_0x272d02(0x5e1))return!![];return!!this[_0x272d02(0x21b)][_0x272d02(0x26d)]?.[_0x46fc31];}[_0x196ac9(0x285)](_0x23a68a,_0x483542){const _0x1c377f=_0x196ac9;if(_0x4e1b2f['LICENSED_BUILD']!==_0x1c377f(0x5e1))return;const _0x52b7b3=this[_0x1c377f(0x21b)],_0x155cf3=_0x52b7b3[_0x1c377f(0x546)]?.[_0x23a68a];if(_0x155cf3===null||_0x155cf3===undefined||_0x155cf3===0x0)return;if(_0x483542>=_0x155cf3)throw new _0x4640cd(_0x1c377f(0x23c)+_0x23a68a+'\x20('+_0x483542+'/'+_0x155cf3+')','LICENSE_LIMIT_EXCEEDED',{'limit':_0x23a68a,'current':_0x483542,'max':_0x155cf3});}async[_0x196ac9(0x313)](_0x154cf7){const _0x35ba2c=_0x196ac9;let _0x1b3a5d;try{_0x1b3a5d=_0x535a30[_0x35ba2c(0x358)](_0x154cf7);}catch(_0x196aef){throw new _0x4640cd(_0x35ba2c(0xf5)+_0x196aef[_0x35ba2c(0x29c)],_0x35ba2c(0x3eb));}let _0x34c1b9;try{_0x34c1b9=_0xaf761['verify'](null,_0x1b3a5d['payload'],_0x4e1b2f[_0x35ba2c(0x3b0)],_0x1b3a5d[_0x35ba2c(0x4ff)]);}catch(_0x5b6dde){throw new _0x4640cd(_0x35ba2c(0x245)+_0x5b6dde['message'],'LICENSE_INVALID');}if(!_0x34c1b9)throw new _0x4640cd(_0x35ba2c(0x568)+('Build\x20expects\x20public\x20key\x20fingerprint\x20'+_0x4e1b2f[_0x35ba2c(0x10e)]+'.\x20')+_0x35ba2c(0x353),_0x35ba2c(0x3eb),{'expectedFingerprint':_0x4e1b2f[_0x35ba2c(0x10e)]});if(_0x1b3a5d[_0x35ba2c(0x397)][_0x35ba2c(0x400)]===_0x1b43e4){const _0x4a6500=_0x1b3a5d[_0x35ba2c(0x397)][_0x35ba2c(0x63c)]-_0x1b3a5d['decoded'][_0x35ba2c(0x1d9)];if(_0x4a6500>_0x395586)throw new _0x4640cd('Open\x20licenses\x20cannot\x20exceed\x206\x20months\x20duration\x20(this\x20license\x20expires\x20'+Math[_0x35ba2c(0x602)](_0x4a6500/(0x1e*0x5265c00))+'\x20months\x20from\x20issuance)',_0x35ba2c(0x3eb));}const _0x36f8af=this[_0x35ba2c(0x2d3)][_0x35ba2c(0x18f)];await _0x196631(_0x36f8af);const _0x37c967=_0x535a30[_0x35ba2c(0x655)](_0x1b3a5d[_0x35ba2c(0x51b)])[_0x35ba2c(0x261)](_0x35ba2c(0x439));for(const {value:_0x7fdfe3}of _0x36f8af[_0x35ba2c(0x391)](_0x48b8b8)){if(_0x7fdfe3[_0x35ba2c(0xe9)]===_0x37c967)throw new _0x4640cd('License\x20already\x20stored',_0x35ba2c(0x3eb));}const _0x5068b1=_0xaf761[_0x35ba2c(0x3ba)](),_0x29e0b7={'blob':_0x154cf7,'activation':null,'addedAt':Date['now'](),'_licenseHash':_0x37c967,'licensee':_0x1b3a5d[_0x35ba2c(0x397)]['licensee'],'expiresAt':_0x1b3a5d[_0x35ba2c(0x397)][_0x35ba2c(0x63c)],'features':_0x1b3a5d[_0x35ba2c(0x397)]['features'],'limits':_0x1b3a5d[_0x35ba2c(0x397)][_0x35ba2c(0x546)],'licenseType':_0x1b3a5d[_0x35ba2c(0x397)][_0x35ba2c(0x400)]};return await _0x36f8af[_0x35ba2c(0x42f)](_0x48b8b8,_0x5068b1,_0x29e0b7),{'id':_0x5068b1,..._0x29e0b7};}async[_0x196ac9(0x541)](_0x544d5d){const _0x92c3ac=_0x196ac9;let _0x5d7230;try{_0x5d7230=_0x535a30['decodeActivationToken'](_0x544d5d);}catch(_0x44be7e){throw new _0x4640cd(_0x92c3ac(0x64a)+_0x44be7e[_0x92c3ac(0x29c)],_0x92c3ac(0x529));}const _0x190241=_0x5d7230['licenseHash'][_0x92c3ac(0x261)](_0x92c3ac(0x439)),_0x5186de=this[_0x92c3ac(0x2d3)][_0x92c3ac(0x18f)];if(!_0x5186de||!_0x5186de[_0x92c3ac(0x431)](_0x48b8b8))throw new _0x4640cd(_0x92c3ac(0x63f),_0x92c3ac(0x529));let _0x22f60d=null,_0x79b29b=null;for(const {key:_0x48dc30,value:_0xeeb963}of _0x5186de['getRange'](_0x48b8b8)){if(_0xeeb963[_0x92c3ac(0xe9)]===_0x190241){_0x22f60d=_0x48dc30,_0x79b29b=_0xeeb963;break;}}if(!_0x22f60d)throw new _0x4640cd(_0x92c3ac(0x63f),_0x92c3ac(0x529));const {rawBuf:_0x1b26fa}=_0x535a30['decodeLicenseBlob'](_0x79b29b[_0x92c3ac(0x1d8)]),_0x48689f=_0x535a30[_0x92c3ac(0x105)]({'tokenString':_0x544d5d,'nodeId':this[_0x92c3ac(0x2d3)]['id'],'rawBlobBuf':_0x1b26fa,'pubKeyPem':_0x4e1b2f[_0x92c3ac(0x3b0)],'pubFingerprint':_0x4e1b2f[_0x92c3ac(0x10e)]});if(!_0x48689f[_0x92c3ac(0x654)])throw new _0x4640cd(_0x92c3ac(0x643)+_0x48689f[_0x92c3ac(0x4bb)],_0x92c3ac(0x529),{'reason':_0x48689f[_0x92c3ac(0x4bb)]});const _0x2b4b44={..._0x79b29b,'activation':_0x544d5d};return await _0x5186de['update'](_0x48b8b8,_0x22f60d,_0x2b4b44),{'id':_0x22f60d,..._0x2b4b44};}async['removeLicense'](_0x1047ca){const _0x2772ae=_0x196ac9,_0x50d9a1=this[_0x2772ae(0x2d3)][_0x2772ae(0x18f)];if(!_0x50d9a1||!_0x50d9a1[_0x2772ae(0x431)](_0x48b8b8))return;await _0x50d9a1[_0x2772ae(0x1b1)](_0x48b8b8,_0x1047ca);}async['listLicenses'](){const _0x1f85ad=_0x196ac9,_0xb7519b=this['okdb'][_0x1f85ad(0x18f)];if(!_0xb7519b||!_0xb7519b[_0x1f85ad(0x431)](_0x48b8b8))return[];const _0x4a99b3=this[_0x1f85ad(0x2d3)]['id'],_0x25bf36=[];for(const {key:_0x17dc33,value:_0x430044}of _0xb7519b['getRange'](_0x48b8b8)){const _0x35abed=this[_0x1f85ad(0xed)](_0x430044,_0x4a99b3);_0x25bf36[_0x1f85ad(0x614)]({..._0x430044,'id':_0x17dc33,'status':_0x35abed});}return _0x25bf36;}[_0x196ac9(0x23a)](){const _0x4ca620=_0x196ac9,_0x3a8d22=this[_0x4ca620(0x2d3)][_0x4ca620(0x18f)];if(!_0x3a8d22||!_0x3a8d22[_0x4ca620(0x431)](_0x48b8b8))return[];const _0x3e527c=this[_0x4ca620(0x2d3)]['id'],_0x48461e=[];for(const {key:_0x3922d4,value:_0x17e1b6}of _0x3a8d22[_0x4ca620(0x391)](_0x48b8b8)){if(_0x17e1b6['_licenseHash']){if(_0x17e1b6[_0x4ca620(0x400)]===_0x1b43e4)_0x48461e['push']({'licenseId':_0x3922d4,'pin':null});else{const _0x32a221=Buffer['from'](_0x17e1b6['_licenseHash'],_0x4ca620(0x439)),{pin:_0x4bf445}=_0x535a30['derivePin'](_0x3e527c,_0x32a221,_0x4e1b2f[_0x4ca620(0x10e)]);_0x48461e[_0x4ca620(0x614)]({'licenseId':_0x3922d4,'pin':_0x4bf445});}}}return _0x48461e;}async[_0x196ac9(0x5e4)](){const _0x3d9cc6=_0x196ac9,_0x1e4f16=this['_active'];await this[_0x3d9cc6(0x3b2)]();if(this[_0x3d9cc6(0x2c5)]&&this[_0x3d9cc6(0x2c5)]['licenseType']===_0x1b43e4){const _0xf928f0=Math[_0x3d9cc6(0x602)]((this[_0x3d9cc6(0x2c5)]['expiresAt']-Date[_0x3d9cc6(0x16a)]())/0x5265c00);this[_0x3d9cc6(0x2d3)][_0x3d9cc6(0x4f7)]?.[_0x3d9cc6(0x27e)](_0x3d9cc6(0x5f6)+_0xf928f0+_0x3d9cc6(0x246),{'feature':_0x3d9cc6(0x58c),'licensee':this[_0x3d9cc6(0x2c5)]['licensee'],'expiresAt':new Date(this[_0x3d9cc6(0x2c5)][_0x3d9cc6(0x63c)])[_0x3d9cc6(0x4c8)]()});}this[_0x3d9cc6(0x2c5)]&&this[_0x3d9cc6(0x2c5)][_0x3d9cc6(0x400)]===_0x43264b&&this[_0x3d9cc6(0x2d3)][_0x3d9cc6(0x4f7)]?.[_0x3d9cc6(0x27e)](_0x3d9cc6(0x61b),{'feature':_0x3d9cc6(0x58c),'licensee':this['_active'][_0x3d9cc6(0x56c)]});if(_0x1e4f16&&!this[_0x3d9cc6(0x2c5)]){this[_0x3d9cc6(0x2d3)][_0x3d9cc6(0x4f7)]?.[_0x3d9cc6(0x27e)](_0x3d9cc6(0x670),{'feature':_0x3d9cc6(0x58c)}),this[_0x3d9cc6(0x2d3)][_0x3d9cc6(0x4e5)]?.['emit'](_0x551069[_0x3d9cc6(0x3eb)],{'previous':_0x1e4f16});const _0x439c39=this['okdb']['options']?.[_0x3d9cc6(0x55b)]??_0x4e1b2f['LICENSE_EXPIRED_ACTION'];_0x439c39===_0x3d9cc6(0x2d9)&&(this[_0x3d9cc6(0x2d3)][_0x3d9cc6(0x4f7)]?.[_0x3d9cc6(0x31b)](_0x3d9cc6(0x5eb),{'feature':_0x3d9cc6(0x58c)}),this[_0x3d9cc6(0x2d3)][_0x3d9cc6(0x241)]()[_0x3d9cc6(0x255)](()=>{})['finally'](()=>process[_0x3d9cc6(0x542)](0x1)));}}}return okdbLicense={'LicenseChecker':_0x12dd99,'_C':_0x4e1b2f},okdbLicense;}var okdbShell,hasRequiredOkdbShell;function requireOkdbShell(){const _0x4cdaa0=_0x4b361c;if(hasRequiredOkdbShell)return okdbShell;hasRequiredOkdbShell=0x1;const _0x722dec=require$$0$2,_0x1f435f=require$$1$1,_0x1c9745=require$$0,_0x2addee=require$$1,_0x32c291=_0x2addee['join'](_0x1c9745[_0x4cdaa0(0x422)](),_0x4cdaa0(0x2b0)),_0x2536e3=0x3e8,_0x21ec5b={'reset':_0x4cdaa0(0x337),'bold':'\x1b[1m','dim':'\x1b[2m','red':_0x4cdaa0(0x5ae),'green':_0x4cdaa0(0x1c9),'yellow':_0x4cdaa0(0x185),'blue':_0x4cdaa0(0x242),'magenta':_0x4cdaa0(0x606),'cyan':'\x1b[36m','white':'\x1b[37m','gray':_0x4cdaa0(0x142)},_0x38ab9a=!process['stdout']['isTTY']||!!process.env.NO_COLOR,_0x2ad0ce=(_0x2464a7,_0xb53040)=>_0x38ab9a?_0xb53040:''+_0x2464a7+_0xb53040+_0x21ec5b[_0x4cdaa0(0x1c2)],_0x4f3a9b={'error':_0x21ec5b[_0x4cdaa0(0x4df)],'warn':_0x21ec5b['yellow'],'info':_0x21ec5b[_0x4cdaa0(0x1f9)],'debug':_0x21ec5b[_0x4cdaa0(0x145)]},_0x43e787={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3};function _0x4c4864(_0x47cf56,_0x5190ee=_0x4cdaa0(0x3d7)){const _0x1f09d6=_0x4cdaa0,{level:_0x138f39,msg:_0x58fe47,meta:_0x2f542b,context:_0x443596,ts:_0x374779}=_0x47cf56;if((_0x43e787[_0x138f39]??0x1)<(_0x43e787[_0x5190ee]??0x1))return;const _0x12f1af=_0x2ad0ce(_0x21ec5b[_0x1f09d6(0x145)],new Date(_0x374779)['toISOString']()),_0x2c2e3b=_0x2ad0ce(_0x4f3a9b[_0x138f39]??_0x21ec5b[_0x1f09d6(0x540)],_0x138f39['padEnd'](0x5));let _0x49aa76='\x20\x20'+_0x12f1af+'\x20'+_0x2ad0ce(_0x21ec5b[_0x1f09d6(0x5e8)],_0x2c2e3b)+'\x20'+_0x58fe47;if(_0x2f542b&&Object[_0x1f09d6(0x2f1)](_0x2f542b)['length']>0x0){const _0x9299b=Object[_0x1f09d6(0x427)](_0x2f542b)['map'](([_0x1184bd,_0x24a78a])=>_0x1184bd+'='+_0x24a78a)['join']('\x20');_0x49aa76+=_0x2ad0ce(_0x21ec5b[_0x1f09d6(0x1bc)],_0x1f09d6(0x56e)+_0x9299b+']');}if(_0x443596!==undefined){const _0x3c7da8=typeof _0x443596===_0x1f09d6(0x20e)?JSON[_0x1f09d6(0x3d9)](_0x443596):String(_0x443596);_0x49aa76+=_0x2ad0ce(_0x21ec5b[_0x1f09d6(0x1bc)],'\x20\x20'+_0x3c7da8);}const _0x102c96=_0x138f39==='error'||_0x138f39===_0x1f09d6(0x27e)?process[_0x1f09d6(0x16f)][_0x1f09d6(0x4ae)][_0x1f09d6(0x42c)](process[_0x1f09d6(0x16f)]):process[_0x1f09d6(0x559)][_0x1f09d6(0x4ae)]['bind'](process[_0x1f09d6(0x559)]);_0x102c96(_0x49aa76+'\x0a');}function _0x17e613(_0x488e8a,_0x122b5b){const _0x3dd784=_0x4cdaa0;if(_0x488e8a===0xcc||_0x488e8a>=0xc8&&_0x488e8a<0x12c&&!_0x122b5b){console['log']('\x0a\x20\x20'+_0x2ad0ce(_0x21ec5b[_0x3dd784(0x22b)],'✓')+'\x0a');return;}if(_0x488e8a>=0x190||_0x122b5b?.[_0x3dd784(0x31b)]){const _0x49bcc9=_0x122b5b?.[_0x3dd784(0x31b)]??_0x122b5b?.['message']??_0x3dd784(0x356)+_0x488e8a;console['log'](_0x3dd784(0x675)+_0x2ad0ce(_0x21ec5b[_0x3dd784(0x4df)],'✗')+'\x20'+_0x2ad0ce(_0x21ec5b[_0x3dd784(0x5e8)]+_0x21ec5b[_0x3dd784(0x4df)],String(_0x488e8a))+'\x20\x20'+_0x49bcc9+'\x0a');return;}const _0x5137f0=Object[_0x3dd784(0x258)][_0x3dd784(0x51a)]['call'](_0x122b5b??{},_0x3dd784(0x657))?_0x122b5b[_0x3dd784(0x657)]:_0x122b5b,_0xdcdc8e=_0x122b5b?.['meta'];console[_0x3dd784(0x4f7)](''),_0x58e442(_0x5137f0,'\x20\x20');if(_0xdcdc8e?.['count']!=null||_0xdcdc8e?.[_0x3dd784(0x209)]!=null){const _0x6a9ba9=[];if(_0xdcdc8e[_0x3dd784(0x5ec)]!=null)_0x6a9ba9['push'](_0xdcdc8e[_0x3dd784(0x5ec)]+'\x20result'+(_0xdcdc8e[_0x3dd784(0x5ec)]!==0x1?'s':''));if(_0xdcdc8e['time']!=null)_0x6a9ba9[_0x3dd784(0x614)](_0xdcdc8e[_0x3dd784(0x209)]+'ms');console[_0x3dd784(0x4f7)]('\x0a\x20\x20'+_0x2ad0ce(_0x21ec5b[_0x3dd784(0x1bc)],_0x6a9ba9['join'](_0x3dd784(0x637))));}console[_0x3dd784(0x4f7)]('');}function _0x58e442(_0x3f2f93,_0x24863e=''){const _0x73dfb6=_0x4cdaa0;if(_0x3f2f93===null||_0x3f2f93===undefined){console[_0x73dfb6(0x4f7)](_0x24863e+_0x2ad0ce(_0x21ec5b['dim'],_0x73dfb6(0x35b)));return;}if(Array[_0x73dfb6(0x579)](_0x3f2f93)){if(_0x3f2f93[_0x73dfb6(0x2eb)]===0x0){console['log'](_0x24863e+_0x2ad0ce(_0x21ec5b[_0x73dfb6(0x1bc)],'(empty)'));return;}if(_0x3f2f93[_0x73dfb6(0x171)](_0x3a51e3=>_0x3a51e3&&typeof _0x3a51e3===_0x73dfb6(0x20e)&&_0x73dfb6(0x174)in _0x3a51e3&&_0x73dfb6(0x392)in _0x3a51e3)){_0x485521(_0x3f2f93,_0x24863e);return;}if(_0x3f2f93[_0x73dfb6(0x171)](_0x58d8fe=>_0x58d8fe&&typeof _0x58d8fe===_0x73dfb6(0x20e)&&_0x73dfb6(0x49b)in _0x58d8fe&&_0x73dfb6(0x5ec)in _0x58d8fe)){_0x3edbf0(_0x3f2f93,_0x24863e);return;}if(_0x3f2f93[_0x73dfb6(0x171)](_0x2a41d5=>typeof _0x2a41d5!==_0x73dfb6(0x20e)||_0x2a41d5===null)){_0x3f2f93[_0x73dfb6(0x612)]((_0x1311d3,_0x444354)=>console['log'](_0x24863e+_0x2ad0ce(_0x21ec5b[_0x73dfb6(0x145)],_0x444354+0x1+'.')+'\x20'+_0x2ad0ce(_0x21ec5b[_0x73dfb6(0x540)],String(_0x1311d3))));return;}_0x3f2f93[_0x73dfb6(0x612)]((_0x45908d,_0x2bee75)=>{const _0x58761c=_0x73dfb6;console[_0x58761c(0x4f7)](_0x24863e+_0x2ad0ce(_0x21ec5b[_0x58761c(0x1bc)],'['+_0x2bee75+']'));if(typeof _0x45908d===_0x58761c(0x20e)&&_0x45908d!==null)_0xd22dc3(_0x45908d,_0x24863e+'\x20\x20');else console[_0x58761c(0x4f7)](_0x24863e+'\x20\x20'+String(_0x45908d));});return;}if(typeof _0x3f2f93===_0x73dfb6(0x20e)){if('key'in _0x3f2f93&&'value'in _0x3f2f93&&Object[_0x73dfb6(0x2f1)](_0x3f2f93)['length']<=0x3){console[_0x73dfb6(0x4f7)](_0x24863e+_0x2ad0ce(_0x21ec5b[_0x73dfb6(0x5e8)]+_0x21ec5b[_0x73dfb6(0x1f9)],String(_0x3f2f93[_0x73dfb6(0x174)])));const _0x3c3e2b=_0x3f2f93[_0x73dfb6(0x392)];if(_0x3c3e2b&&typeof _0x3c3e2b==='object')_0xd22dc3(_0x3c3e2b,_0x24863e);else console[_0x73dfb6(0x4f7)](_0x24863e+_0x2ad0ce(_0x21ec5b[_0x73dfb6(0x540)],String(_0x3c3e2b)));return;}_0xd22dc3(_0x3f2f93,_0x24863e);return;}console[_0x73dfb6(0x4f7)](_0x24863e+_0x2ad0ce(_0x21ec5b[_0x73dfb6(0x540)],String(_0x3f2f93)));}function _0xd22dc3(_0x37c2d5,_0x5587db=''){const _0x31722d=_0x4cdaa0,_0x493b7c=Object[_0x31722d(0x427)](_0x37c2d5);if(_0x493b7c[_0x31722d(0x2eb)]===0x0){console['log'](_0x5587db+_0x2ad0ce(_0x21ec5b['dim'],'{}'));return;}const _0x338c56=Math[_0x31722d(0x138)](0x1c,Math['max'](..._0x493b7c['map'](([_0x520f97])=>_0x520f97['length'])));for(const [_0x53be3a,_0x13ce78]of _0x493b7c){const _0x1ab362=_0x2ad0ce(_0x21ec5b[_0x31722d(0x1f9)],_0x53be3a[_0x31722d(0x2c9)](_0x338c56));if(_0x13ce78===null||_0x13ce78===undefined)console['log'](_0x5587db+_0x1ab362+'\x20\x20'+_0x2ad0ce(_0x21ec5b['dim'],_0x31722d(0x2e8)));else{if(typeof _0x13ce78===_0x31722d(0x20e)){const _0x26db24=JSON[_0x31722d(0x3d9)](_0x13ce78);_0x26db24[_0x31722d(0x2eb)]<=0x50?console[_0x31722d(0x4f7)](_0x5587db+_0x1ab362+'\x20\x20'+_0x2ad0ce(_0x21ec5b[_0x31722d(0x1bc)],_0x26db24)):(console[_0x31722d(0x4f7)](_0x5587db+_0x1ab362),_0x58e442(_0x13ce78,_0x5587db+'\x20\x20'));}else{const _0x166d60=typeof _0x13ce78===_0x31722d(0x455)?_0x2ad0ce(_0x13ce78?_0x21ec5b['green']:_0x21ec5b[_0x31722d(0x577)],String(_0x13ce78)):typeof _0x13ce78===_0x31722d(0x17c)?_0x2ad0ce(_0x21ec5b[_0x31722d(0x5a0)],String(_0x13ce78)):_0x2ad0ce(_0x21ec5b[_0x31722d(0x540)],String(_0x13ce78));console['log'](_0x5587db+_0x1ab362+'\x20\x20'+_0x166d60);}}}}function _0x485521(_0x1c1275,_0x3a0591=''){const _0x45d9b9=_0x4cdaa0,_0x29fe48=Math[_0x45d9b9(0x138)](0x20,Math[_0x45d9b9(0x47e)](..._0x1c1275[_0x45d9b9(0x601)](_0x11bb54=>String(_0x11bb54[_0x45d9b9(0x174)])[_0x45d9b9(0x2eb)])));for(const {key:_0x363eb7,value:_0x4916eb,score:_0x4b692d,clock:_0x47633e}of _0x1c1275){const _0x17c98d=_0x2ad0ce(_0x21ec5b['bold']+_0x21ec5b[_0x45d9b9(0x1f9)],String(_0x363eb7)['padEnd'](_0x29fe48)),_0x3a35e4=_0x4916eb==null?_0x2ad0ce(_0x21ec5b['dim'],_0x45d9b9(0x2e8)):typeof _0x4916eb===_0x45d9b9(0x20e)?_0x2ad0ce(_0x21ec5b[_0x45d9b9(0x1bc)],JSON[_0x45d9b9(0x3d9)](_0x4916eb)):_0x2ad0ce(_0x21ec5b['white'],String(_0x4916eb)),_0x2d1f87=_0x4b692d!=null?_0x2ad0ce(_0x21ec5b['gray'],_0x45d9b9(0x1f1)+_0x4b692d[_0x45d9b9(0x4a8)](0x4)):'',_0x233f6f=_0x47633e!=null?_0x2ad0ce(_0x21ec5b[_0x45d9b9(0x145)],_0x45d9b9(0x514)+_0x47633e):'';console['log'](_0x3a0591+_0x17c98d+'\x20\x20'+_0x3a35e4+_0x2d1f87+_0x233f6f);}}function _0x3edbf0(_0x16e3db,_0x112d4a=''){const _0x2f0ecd=_0x4cdaa0,_0x2672fa=Math[_0x2f0ecd(0x138)](0x20,Math[_0x2f0ecd(0x47e)](..._0x16e3db['map'](_0x478665=>_0x478665['type'][_0x2f0ecd(0x2eb)])));for(const {type:_0x1bee9c,count:_0x46443f,fields:_0x56e59e}of _0x16e3db){if(_0x1bee9c[_0x2f0ecd(0x3cc)]('~'))continue;const _0xf4a77c=_0x2ad0ce(_0x21ec5b['bold']+_0x21ec5b['cyan'],_0x1bee9c[_0x2f0ecd(0x2c9)](_0x2672fa)),_0x2a25e9=_0x2ad0ce(_0x21ec5b[_0x2f0ecd(0x5a0)],String(_0x46443f)[_0x2f0ecd(0x24d)](0x6))+_0x2ad0ce(_0x21ec5b[_0x2f0ecd(0x1bc)],_0x2f0ecd(0xfa)),_0x59dd5d=_0x56e59e&&Object['keys'](_0x56e59e)[_0x2f0ecd(0x2eb)]?_0x2ad0ce(_0x21ec5b[_0x2f0ecd(0x1bc)],_0x2f0ecd(0x1db)+Object['keys'](_0x56e59e)[_0x2f0ecd(0x45e)](0x0,0x6)[_0x2f0ecd(0x3a4)](',\x20')+(Object[_0x2f0ecd(0x2f1)](_0x56e59e)['length']>0x6?'…':'')):'';console[_0x2f0ecd(0x4f7)](_0x112d4a+_0xf4a77c+'\x20\x20'+_0x2a25e9+_0x59dd5d);}}const _0x19fec0=[_0x4cdaa0(0x161),_0x4cdaa0(0x4bf),_0x4cdaa0(0x28a),'files/','transaction',_0x4cdaa0(0x54b)];function _0x121b52(_0x25e6ff,_0x157e94){const _0x599f81=_0x4cdaa0;if(_0x25e6ff[_0x599f81(0x3cc)](_0x599f81(0x3b1)))return _0x25e6ff;if(_0x25e6ff['startsWith']('/'))return _0x599f81(0x253)+_0x25e6ff;if(_0x25e6ff[_0x599f81(0x3cc)](_0x599f81(0x3d2)))return'/api/'+_0x25e6ff;const _0xdbecb8=_0x19fec0[_0x599f81(0x28c)](_0x325f5f=>_0x25e6ff===_0x325f5f[_0x599f81(0x38b)](/\/$/,'')||_0x25e6ff['startsWith'](_0x325f5f));return _0xdbecb8?_0x599f81(0x1be)+_0x157e94+'/'+_0x25e6ff:_0x599f81(0x3b1)+_0x25e6ff;}function _0x4454a8(_0x3ea845){const _0x231f42=_0x4cdaa0,_0x5773db={},_0x1f150b=[];let _0x93f7fe=0x0;while(_0x93f7fe<_0x3ea845[_0x231f42(0x2eb)]){if((_0x3ea845[_0x93f7fe]===_0x231f42(0x3c4)||_0x3ea845[_0x93f7fe]==='-e')&&_0x3ea845[_0x93f7fe+0x1]&&!_0x3ea845[_0x93f7fe+0x1][_0x231f42(0x3cc)]('-'))_0x5773db[_0x231f42(0x46e)]=_0x3ea845[++_0x93f7fe];else _0x3ea845[_0x93f7fe]===_0x231f42(0x44b)||_0x3ea845[_0x93f7fe]==='-h'?_0x5773db['help']=!![]:_0x1f150b[_0x231f42(0x614)](_0x3ea845[_0x93f7fe]);_0x93f7fe++;}return{'flags':_0x5773db,'rest':_0x1f150b};}const _0x7b0183={'system':_0x4cdaa0(0x569),'envs':_0x4cdaa0(0x4d3),'types':_0x4cdaa0(0x2f6),'data':_0x4cdaa0(0x172),'indexes':'Indexes','fts':_0x4cdaa0(0x474),'sync':_0x4cdaa0(0x1b6),'queue':_0x4cdaa0(0x2ac),'files':_0x4cdaa0(0x177),'embeddings':'Embeddings','engines':'Engines','admin':_0x4cdaa0(0x570),'event':_0x4cdaa0(0x1f4),'processor':'Processors'},_0x1776aa=[_0x4cdaa0(0x268),_0x4cdaa0(0xec),_0x4cdaa0(0x161),_0x4cdaa0(0x206),'indexes',_0x4cdaa0(0x458),'sync','queue',_0x4cdaa0(0x150),'embeddings',_0x4cdaa0(0x238),_0x4cdaa0(0x27f)];function _0x40a1f5(_0x44adee){const _0x49808a=_0x4cdaa0;return _0x44adee[_0x49808a(0x38b)](/^\/api/,'')[_0x49808a(0x38b)](/^\[\/env\/:env=[^\]]*\]/,_0x49808a(0x11c))[_0x49808a(0x38b)](/^\/env\/:env/,'env/:env')[_0x49808a(0x38b)](/^\//,'');}function _0x192571(_0x56e948,_0x56b328=''){const _0x508034=_0x4cdaa0,_0x55df9f=_0x56e948[_0x508034(0x5d0)][_0x508034(0x33c)]()[_0x508034(0x1c6)](_0x496f6b=>!_0x496f6b[_0x508034(0x664)]?.['hidden']),_0x313e9a=_0x56b328?_0x55df9f[_0x508034(0x1c6)](_0xa2f633=>_0xa2f633[_0x508034(0x42d)][_0x508034(0x3f1)]()['includes'](_0x56b328[_0x508034(0x3f1)]())||(_0x196b8a(_0xa2f633)??'')[_0x508034(0x3f1)]()[_0x508034(0x5c0)](_0x56b328[_0x508034(0x3f1)]())||_0x212050(_0xa2f633)['some'](_0x34f643=>_0x34f643[_0x508034(0x3f1)]()[_0x508034(0x5c0)](_0x56b328['toLowerCase']()))):_0x55df9f;if(!_0x313e9a[_0x508034(0x2eb)]){console['log'](_0x2ad0ce(_0x21ec5b[_0x508034(0x577)],_0x508034(0x430)+_0x56b328+'\x22\x0a'));return;}const _0x4574ff=new Map();for(const _0x25cf5e of _0x313e9a){const _0x5950ff=_0x212050(_0x25cf5e)[0x0]??_0x508034(0x1c7);if(!_0x4574ff[_0x508034(0x39f)](_0x5950ff))_0x4574ff[_0x508034(0x2c2)](_0x5950ff,[]);_0x4574ff[_0x508034(0x3aa)](_0x5950ff)[_0x508034(0x614)](_0x25cf5e);}const _0x2e0a60=[..._0x1776aa[_0x508034(0x1c6)](_0x3a710c=>_0x4574ff[_0x508034(0x39f)](_0x3a710c)),...[..._0x4574ff[_0x508034(0x2f1)]()][_0x508034(0x1c6)](_0x237a2c=>!_0x1776aa[_0x508034(0x5c0)](_0x237a2c))];console[_0x508034(0x4f7)]('');for(const _0x3e9b52 of _0x2e0a60){const _0x3b993c=_0x4574ff[_0x508034(0x3aa)](_0x3e9b52);if(!_0x3b993c?.[_0x508034(0x2eb)])continue;console[_0x508034(0x4f7)](_0x2ad0ce(_0x21ec5b[_0x508034(0x5e8)],'\x20\x20'+(_0x7b0183[_0x3e9b52]??_0x3e9b52)));for(const _0x510c05 of _0x3b993c){const _0x2fa994=_0x2ad0ce(_0x21ec5b[_0x508034(0x5a0)],_0x510c05[_0x508034(0x527)][_0x508034(0x2c9)](0x7)),_0x47ca4e=_0x2ad0ce(_0x21ec5b[_0x508034(0x1f9)],_0x40a1f5(_0x510c05[_0x508034(0x42d)])),_0x53f8c6=_0x196b8a(_0x510c05)?_0x2ad0ce(_0x21ec5b[_0x508034(0x1bc)],'\x20\x20'+_0x196b8a(_0x510c05)):'',_0x46d2b8=_0x510c05[_0x508034(0x3d5)]?.['id']?_0x2ad0ce(_0x21ec5b[_0x508034(0x145)],'\x20\x20['+_0x510c05[_0x508034(0x3d5)]['id']+']'):'';console[_0x508034(0x4f7)](_0x508034(0x3cf)+_0x2fa994+'\x20'+_0x47ca4e+_0x53f8c6+_0x46d2b8);}console[_0x508034(0x4f7)]('');}}function _0x7df7db(_0x272928,_0x2f2c3d){const _0x290216=_0x4cdaa0,_0xe69ab2=_0x2f2c3d[_0x290216(0x38b)](/^\/api(\/env\/[^/]+)?\//,'')[_0x290216(0x37c)]('/')[0x0],_0x471867=_0x272928[_0x290216(0x5d0)][_0x290216(0x33c)]()[_0x290216(0x1c6)](_0x53d713=>_0x53d713[_0x290216(0x42d)][_0x290216(0x3f1)]()[_0x290216(0x5c0)](_0xe69ab2['toLowerCase']()));if(!_0x471867['length']){console['log'](_0x2ad0ce(_0x21ec5b['yellow'],'\x0a\x20\x20No\x20documentation\x20found\x20for:\x20'+_0x2f2c3d+'\x0a'));return;}console[_0x290216(0x4f7)]('');for(const _0xe31fc5 of _0x471867['slice'](0x0,0xc)){for(const _0x5bf1c2 of _0x5e930(_0xe31fc5)){console['log'](_0x5bf1c2);}console[_0x290216(0x4f7)]('');}}function _0x196b8a(_0xf143b){const _0x3659bc=_0x4cdaa0;return _0xf143b['operation']?.[_0x3659bc(0x319)]??_0xf143b[_0x3659bc(0x664)]?.[_0x3659bc(0x319)]??'';}function _0xd347e5(_0x409b0d){const _0x35836b=_0x4cdaa0;return _0x409b0d[_0x35836b(0x3d5)]?.[_0x35836b(0x413)]??_0x409b0d['meta']?.['description']??'';}function _0x212050(_0x5184b9){const _0x572338=_0x4cdaa0;return _0x5184b9[_0x572338(0x3d5)]?.[_0x572338(0x4b8)]?.[_0x572338(0x2eb)]?_0x5184b9['operation'][_0x572338(0x4b8)]:_0x5184b9[_0x572338(0x664)]?.[_0x572338(0x4b8)]??[];}function _0x5e930(_0x55aec5){const _0x1ca64e=_0x4cdaa0,_0x298d08=[];_0x298d08[_0x1ca64e(0x614)]('\x20\x20'+_0x2ad0ce(_0x21ec5b['bold']+_0x21ec5b['magenta'],_0x55aec5['method'][_0x1ca64e(0x2c9)](0x7))+'\x20'+_0x2ad0ce(_0x21ec5b[_0x1ca64e(0x5e8)]+_0x21ec5b[_0x1ca64e(0x1f9)],_0x55aec5['path']));_0x55aec5['operation']?.['id']&&_0x298d08[_0x1ca64e(0x614)](_0x1ca64e(0x488)+_0x2ad0ce(_0x21ec5b[_0x1ca64e(0x145)],_0x1ca64e(0x589)+_0x55aec5['operation']['id']));_0x196b8a(_0x55aec5)&&_0x298d08[_0x1ca64e(0x614)](_0x1ca64e(0x488)+_0x2ad0ce(_0x21ec5b['white'],_0x196b8a(_0x55aec5)));_0xd347e5(_0x55aec5)&&_0x298d08[_0x1ca64e(0x614)](_0x1ca64e(0x488)+_0x2ad0ce(_0x21ec5b[_0x1ca64e(0x1bc)],_0xd347e5(_0x55aec5)));_0x212050(_0x55aec5)['length']&&_0x298d08['push'](_0x1ca64e(0x488)+_0x2ad0ce(_0x21ec5b[_0x1ca64e(0x145)],_0x1ca64e(0x2c7)+_0x212050(_0x55aec5)[_0x1ca64e(0x3a4)](',\x20')));_0x55aec5[_0x1ca64e(0x3d5)]?.['safety']?.[_0x1ca64e(0x35d)]&&_0x298d08[_0x1ca64e(0x614)](_0x1ca64e(0x488)+_0x2ad0ce(_0x21ec5b['gray'],_0x1ca64e(0x29f)+_0x55aec5['operation'][_0x1ca64e(0x267)][_0x1ca64e(0x35d)]));_0x55aec5[_0x1ca64e(0x3d5)]?.[_0x1ca64e(0x5d0)]?.[_0x1ca64e(0x109)]&&_0x55aec5[_0x1ca64e(0x3d5)][_0x1ca64e(0x5d0)][_0x1ca64e(0x109)]!==_0x1ca64e(0x523)&&_0x298d08['push'](_0x1ca64e(0x488)+_0x2ad0ce(_0x21ec5b[_0x1ca64e(0x145)],_0x1ca64e(0x5fc)+_0x55aec5[_0x1ca64e(0x3d5)][_0x1ca64e(0x5d0)][_0x1ca64e(0x109)]));if(_0x55aec5[_0x1ca64e(0x3d5)]?.[_0x1ca64e(0xe0)]){const _0x26a4d3=Object[_0x1ca64e(0x2f1)](_0x55aec5['operation'][_0x1ca64e(0xe0)][_0x1ca64e(0x448)]||{});if(_0x26a4d3[_0x1ca64e(0x2eb)])_0x298d08[_0x1ca64e(0x614)](_0x1ca64e(0x488)+_0x2ad0ce(_0x21ec5b['gray'],'input:\x20'+_0x26a4d3[_0x1ca64e(0x3a4)](',\x20')));}return _0x55aec5[_0x1ca64e(0x664)]?.['body']&&_0x298d08[_0x1ca64e(0x614)](_0x1ca64e(0x488)+_0x2ad0ce(_0x21ec5b[_0x1ca64e(0x145)],_0x1ca64e(0x563)+JSON['stringify'](_0x55aec5[_0x1ca64e(0x664)]['body']))),_0x298d08;}async function _0x21c433(_0x4abbbe,_0x4097b1,_0x136b6b,_0x4f1342=null){const _0x570fa8=_0x4cdaa0,_0x2a0377=_0x136b6b[_0x570fa8(0x42b)]('?'),_0x1d6b01=_0x2a0377>=0x0?_0x136b6b[_0x570fa8(0x45e)](0x0,_0x2a0377):_0x136b6b,_0x52d314=_0x2a0377>=0x0?_0x136b6b[_0x570fa8(0x45e)](_0x2a0377+0x1):'',_0x5dca7c=Object[_0x570fa8(0x3e5)](new URLSearchParams(_0x52d314)[_0x570fa8(0x427)]());return _0x4abbbe['http'][_0x570fa8(0x4f3)](_0x4097b1,_0x1d6b01,{'body':_0x4f1342,'query':_0x5dca7c,'headers':{'content-type':_0x570fa8(0x509)}},{'internal':!![]});}function _0x198e98(_0x35b6bb){const _0x50030b=_0x4cdaa0;if(!_0x35b6bb)return null;const _0x38e7e5=_0x35b6bb[_0x50030b(0x486)]();if(!_0x38e7e5)return null;try{return JSON[_0x50030b(0x34f)](_0x38e7e5);}catch{}try{return JSON[_0x50030b(0x34f)](_0x42ddea(_0x38e7e5));}catch(_0x556864){throw new SyntaxError(_0x556864[_0x50030b(0x29c)],{'cause':_0x556864});}}function _0x42ddea(_0xf6cd99){const _0x3ee4b2=_0x4cdaa0;let _0x88f26a='',_0x3a2bba=0x0;while(_0x3a2bba<_0xf6cd99[_0x3ee4b2(0x2eb)]){const _0x25bd51=_0xf6cd99[_0x3a2bba];if(_0x25bd51==='\x22'){_0x88f26a+='\x22',_0x3a2bba++;while(_0x3a2bba<_0xf6cd99[_0x3ee4b2(0x2eb)]&&_0xf6cd99[_0x3a2bba]!=='\x22'){if(_0xf6cd99[_0x3a2bba]==='\x5c'){_0x88f26a+=_0xf6cd99[_0x3a2bba++];if(_0x3a2bba<_0xf6cd99[_0x3ee4b2(0x2eb)])_0x88f26a+=_0xf6cd99[_0x3a2bba++];}else _0x88f26a+=_0xf6cd99[_0x3a2bba++];}_0x88f26a+='\x22';if(_0x3a2bba<_0xf6cd99['length'])_0x3a2bba++;continue;}if(_0x25bd51==='\x27'){_0x88f26a+='\x22',_0x3a2bba++;while(_0x3a2bba<_0xf6cd99[_0x3ee4b2(0x2eb)]&&_0xf6cd99[_0x3a2bba]!=='\x27'){if(_0xf6cd99[_0x3a2bba]==='\x5c'&&_0xf6cd99[_0x3a2bba+0x1]==='\x27')_0x88f26a+='\x27',_0x3a2bba+=0x2;else _0xf6cd99[_0x3a2bba]==='\x22'?(_0x88f26a+='\x5c\x22',_0x3a2bba++):_0x88f26a+=_0xf6cd99[_0x3a2bba++];}_0x88f26a+='\x22';if(_0x3a2bba<_0xf6cd99['length'])_0x3a2bba++;continue;}if(_0x3ee4b2(0x305)[_0x3ee4b2(0x5c0)](_0x25bd51)){_0x88f26a+=_0x25bd51,_0x3a2bba++;continue;}let _0x4726d1='';while(_0x3a2bba<_0xf6cd99['length']&&!'{}[]:,\x27\x22'[_0x3ee4b2(0x5c0)](_0xf6cd99[_0x3a2bba])&&_0xf6cd99[_0x3a2bba]!=='\x20'&&_0xf6cd99[_0x3a2bba]!=='\x09'&&_0xf6cd99[_0x3a2bba]!=='\x0a'&&_0xf6cd99[_0x3a2bba]!=='\x0d'){_0x4726d1+=_0xf6cd99[_0x3a2bba++];}let _0x4af9d0=_0x3a2bba;while(_0x4af9d0<_0xf6cd99[_0x3ee4b2(0x2eb)]&&(_0xf6cd99[_0x4af9d0]==='\x20'||_0xf6cd99[_0x4af9d0]==='\x09'))_0x4af9d0++;if(_0xf6cd99[_0x4af9d0]===':')_0x88f26a+='\x22'+_0x4726d1+'\x22';else _0x4726d1===_0x3ee4b2(0x5e1)||_0x4726d1===_0x3ee4b2(0x38c)||_0x4726d1==='null'||/^-?\d+(\.\d+)?([eE][+-]?\d+)?$/[_0x3ee4b2(0x30d)](_0x4726d1)?_0x88f26a+=_0x4726d1:_0x88f26a+='\x22'+_0x4726d1+'\x22';}return _0x88f26a[_0x3ee4b2(0x38b)](/,(\s*[}\]])/g,'$1');}function _0x3c36dc(_0x2b7e7f){const _0x54e17a=_0x4cdaa0,_0x454451=[];let _0x370a7c=0x0;while(_0x370a7c<_0x2b7e7f['length']){while(_0x370a7c<_0x2b7e7f['length']&&(_0x2b7e7f[_0x370a7c]==='\x20'||_0x2b7e7f[_0x370a7c]==='\x09'))_0x370a7c++;if(_0x370a7c>=_0x2b7e7f[_0x54e17a(0x2eb)])break;const _0x56e6cf=_0x2b7e7f[_0x370a7c];if(_0x56e6cf==='{'||_0x56e6cf==='['){const _0x2385f0=_0x56e6cf==='{'?'}':']',_0x5adcab=_0x370a7c++;let _0x413481=0x1,_0x4f4570=![],_0x38702d='';while(_0x370a7c<_0x2b7e7f[_0x54e17a(0x2eb)]&&_0x413481>0x0){const _0x21f11a=_0x2b7e7f[_0x370a7c];if(_0x4f4570){if(_0x21f11a==='\x5c')_0x370a7c++;else{if(_0x21f11a===_0x38702d)_0x4f4570=![];}}else{if(_0x21f11a==='\x22'||_0x21f11a==='\x27')_0x4f4570=!![],_0x38702d=_0x21f11a;else{if(_0x21f11a===_0x56e6cf)_0x413481++;else{if(_0x21f11a===_0x2385f0)_0x413481--;}}}_0x370a7c++;}_0x454451[_0x54e17a(0x614)](_0x2b7e7f[_0x54e17a(0x45e)](_0x5adcab,_0x370a7c));continue;}if(_0x56e6cf==='\x22'||_0x56e6cf==='\x27'){const _0x18800e=_0x56e6cf;_0x370a7c++;let _0x1d8753='';while(_0x370a7c<_0x2b7e7f['length']&&_0x2b7e7f[_0x370a7c]!==_0x18800e){if(_0x2b7e7f[_0x370a7c]==='\x5c'&&_0x370a7c+0x1<_0x2b7e7f[_0x54e17a(0x2eb)])_0x370a7c++,_0x1d8753+=_0x2b7e7f[_0x370a7c++];else _0x1d8753+=_0x2b7e7f[_0x370a7c++];}if(_0x370a7c<_0x2b7e7f[_0x54e17a(0x2eb)])_0x370a7c++;_0x454451[_0x54e17a(0x614)](_0x1d8753);continue;}let _0x218d99='';while(_0x370a7c<_0x2b7e7f[_0x54e17a(0x2eb)]&&_0x2b7e7f[_0x370a7c]!=='\x20'&&_0x2b7e7f[_0x370a7c]!=='\x09'&&_0x2b7e7f[_0x370a7c]!=='{'&&_0x2b7e7f[_0x370a7c]!=='['){_0x218d99+=_0x2b7e7f[_0x370a7c++];}if(_0x218d99)_0x454451[_0x54e17a(0x614)](_0x218d99);}return _0x454451;}function _0x62d3fc(_0x3f84fe,_0x263393){const _0x2f9c8d=_0x4cdaa0,_0x1baafc=[..._0x3f84fe[_0x2f9c8d(0x5bd)][_0x2f9c8d(0x2f1)]()][_0x2f9c8d(0x1c6)](_0x5e6307=>!_0x5e6307['startsWith']('~'));console[_0x2f9c8d(0x4f7)](['',_0x2ad0ce(_0x21ec5b[_0x2f9c8d(0x5e8)]+_0x21ec5b['cyan'],_0x2f9c8d(0x410)),_0x2ad0ce(_0x21ec5b[_0x2f9c8d(0x5e8)]+_0x21ec5b[_0x2f9c8d(0x1f9)],_0x2f9c8d(0x3e3))+_0x2ad0ce(_0x21ec5b['bold'],_0x2f9c8d(0x3f6))+_0x2ad0ce(_0x21ec5b[_0x2f9c8d(0x5e8)]+_0x21ec5b[_0x2f9c8d(0x1f9)],'║'),_0x2ad0ce(_0x21ec5b[_0x2f9c8d(0x5e8)]+_0x21ec5b[_0x2f9c8d(0x1f9)],_0x2f9c8d(0x485)),'','\x20\x20'+_0x2ad0ce(_0x21ec5b['green'],'✓')+'\x20'+_0x2ad0ce(_0x21ec5b[_0x2f9c8d(0x5e8)],_0x2f9c8d(0x34b))+'\x20\x20http://localhost:'+_0x263393[_0x2f9c8d(0x26f)],..._0x263393[_0x2f9c8d(0x52c)]>0x1?['\x20\x20'+_0x2ad0ce(_0x21ec5b['green'],'✓')+'\x20'+_0x2ad0ce(_0x21ec5b[_0x2f9c8d(0x5e8)],_0x2f9c8d(0xfe))+'\x20'+_0x263393[_0x2f9c8d(0x52c)]+'\x20HTTP\x20workers\x20'+_0x2ad0ce(_0x21ec5b[_0x2f9c8d(0x145)],_0x2f9c8d(0x15d))]:[],'\x20\x20'+_0x2ad0ce(_0x21ec5b[_0x2f9c8d(0x22b)],'✓')+'\x20'+_0x2ad0ce(_0x21ec5b[_0x2f9c8d(0x5e8)],'api')+'\x20\x20\x20\x20\x20http://localhost:'+_0x263393[_0x2f9c8d(0x26f)]+_0x2f9c8d(0x253),'\x20\x20'+_0x2ad0ce(_0x21ec5b[_0x2f9c8d(0x22b)],'✓')+'\x20'+_0x2ad0ce(_0x21ec5b['bold'],_0x2f9c8d(0x42d))+_0x2f9c8d(0x3cf)+_0x263393[_0x2f9c8d(0x64c)],'\x20\x20'+_0x2ad0ce(_0x21ec5b[_0x2f9c8d(0x22b)],'✓')+'\x20'+_0x2ad0ce(_0x21ec5b[_0x2f9c8d(0x5e8)],'id')+'\x20\x20\x20\x20\x20\x20'+_0x2ad0ce(_0x21ec5b[_0x2f9c8d(0x145)],_0x3f84fe['id']),'\x20\x20'+_0x2ad0ce(_0x21ec5b['green'],'✓')+'\x20'+_0x2ad0ce(_0x21ec5b[_0x2f9c8d(0x5e8)],_0x2f9c8d(0xec))+'\x20\x20\x20\x20'+_0x1baafc[_0x2f9c8d(0x601)](_0x29f878=>_0x2ad0ce(_0x21ec5b['cyan'],_0x29f878))[_0x2f9c8d(0x3a4)]('\x20\x20'),..._0x263393[_0x2f9c8d(0x673)]?[]:['\x20\x20'+_0x2ad0ce(_0x21ec5b['green'],'✓')+'\x20'+_0x2ad0ce(_0x21ec5b[_0x2f9c8d(0x5e8)],'admin')+'\x20\x20\x20http://localhost:'+_0x263393[_0x2f9c8d(0x26f)]+_0x2f9c8d(0x61f)],'',_0x2ad0ce(_0x21ec5b[_0x2f9c8d(0x1bc)],'\x20\x20Type\x20'+_0x2ad0ce(_0x21ec5b[_0x2f9c8d(0x5e8)],_0x2f9c8d(0x2e2))+'\x20for\x20commands,\x20'+_0x2ad0ce(_0x21ec5b[_0x2f9c8d(0x5e8)],_0x2f9c8d(0x5d7))+_0x2f9c8d(0x24e)+_0x2ad0ce(_0x21ec5b['bold'],_0x2f9c8d(0x542))+_0x2f9c8d(0x3cd)),''][_0x2f9c8d(0x3a4)]('\x0a'));}function _0x4d9898(_0x2b2b54){const _0x5f555a=_0x4cdaa0;console[_0x5f555a(0x4f7)]('\x0a'+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x5e8)],_0x5f555a(0x58b))+'\x20\x20'+_0x2ad0ce(_0x21ec5b['dim'],_0x5f555a(0x11b))+_0x5f555a(0x314)+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x1f9)],_0x5f555a(0x3ee))+_0x5f555a(0x4b1)+_0x2ad0ce(_0x21ec5b['cyan'],_0x5f555a(0x3ee))+'\x20'+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x577)],_0x5f555a(0x3fd))+_0x5f555a(0x454)+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x1f9)],_0x5f555a(0x51e))+'\x20'+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x1f9)],'<path>')+'\x20'+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x577)],'[body]')+_0x5f555a(0x4bc)+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x1bc)],_0x5f555a(0x20b))+_0x5f555a(0x5c7)+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x145)],_0x5f555a(0x3d7))+'\x20\x20\x20\x20\x20\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'+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x145)],_0x5f555a(0xec))+'\x20\x20\x20\x20\x20\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'+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x145)],_0x5f555a(0x161))+_0x5f555a(0x250)+_0x2b2b54[_0x5f555a(0x46e)]+_0x5f555a(0x564)+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x145)],'type/users')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/'+_0x2b2b54['env']+_0x5f555a(0x3b5)+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x145)],'type/users/item/alice')+_0x5f555a(0x239)+_0x2b2b54[_0x5f555a(0x46e)]+'/type/users/item/alice\x0a\x20\x20\x20\x20'+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x145)],'type/users/query\x20{\x22active\x22:true}')+'\x20→\x20POST\x20/api/env/'+_0x2b2b54['env']+'/type/users/query\x0a\x20\x20\x20\x20'+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x145)],_0x5f555a(0x5b5))+_0x5f555a(0x5c7)+_0x2ad0ce(_0x21ec5b['gray'],_0x5f555a(0x5b0))+'\x0a\x20\x20\x20\x20'+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x145)],'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'+_0x2ad0ce(_0x21ec5b['bold'],_0x5f555a(0x25f))+'\x20\x20'+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x1bc)],'(on\x20any\x20path\x20command)')+_0x5f555a(0x314)+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x1f9)],_0x5f555a(0x603))+_0x5f555a(0x51f)+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x1f9)],'--help')+_0x5f555a(0x554)+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x1bc)],_0x5f555a(0x20b))+'\x0a\x20\x20\x20\x20'+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x145)],'types\x20--env\x20staging')+'\x0a\x20\x20\x20\x20'+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x145)],_0x5f555a(0x663))+_0x5f555a(0x5c7)+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x145)],'type/users\x20--help')+'\x0a\x0a'+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x5e8)],_0x5f555a(0x5c3))+_0x5f555a(0x314)+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x1f9)],_0x5f555a(0x616))+_0x5f555a(0x1d5)+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x1f9)],_0x5f555a(0x46e))+_0x5f555a(0x181)+_0x2ad0ce(_0x21ec5b['cyan'],'routes')+'\x20'+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x1bc)],'[filter]')+_0x5f555a(0x210)+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x1f9)],_0x5f555a(0x4dd))+'\x20'+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x1bc)],'[on|off|level]')+_0x5f555a(0x1ae)+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x1f9)],_0x5f555a(0x18d))+'\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'+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x1f9)],_0x5f555a(0x2e2))+_0x5f555a(0xf9)+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x1f9)],_0x5f555a(0x542))+'\x20'+_0x2ad0ce(_0x21ec5b[_0x5f555a(0x1bc)],'/\x20quit\x20/\x20Ctrl+C')+_0x5f555a(0x512));}let _0x1d6d38=![];async function _0x5e9f7e(_0x452ead,_0x22e5f0=0x0,_0x28f24d=null){const _0x1304cf=_0x4cdaa0;_0x1d6d38&&(process[_0x1304cf(0x16f)][_0x1304cf(0x4ae)](_0x2ad0ce(_0x21ec5b['red'],_0x1304cf(0x31c))),process[_0x1304cf(0x542)](0x82));_0x1d6d38=!![],process[_0x1304cf(0x559)][_0x1304cf(0x4ae)]('\x0a'),process['stderr']['write'](_0x2ad0ce(_0x21ec5b['yellow'],_0x1304cf(0x14a)+(_0x28f24d?_0x1304cf(0x3bc)+_0x28f24d+',\x20':'')+'shutting\x20down…\x0a'));const _0x5142ec=setTimeout(()=>{const _0xe3fbe4=_0x1304cf;process[_0xe3fbe4(0x16f)][_0xe3fbe4(0x4ae)](_0x2ad0ce(_0x21ec5b[_0xe3fbe4(0x4df)],_0xe3fbe4(0x192))),process[_0xe3fbe4(0x542)](0x1);},0x1388);try{await _0x452ead['close']();}catch(_0x2b69e2){console[_0x1304cf(0x31b)](_0x2ad0ce(_0x21ec5b['red'],'\x20\x20'+_0x2b69e2['message']));}clearTimeout(_0x5142ec),process[_0x1304cf(0x16f)]['write'](_0x2ad0ce(_0x21ec5b[_0x1304cf(0x1bc)],_0x1304cf(0x4cd))),process[_0x1304cf(0x542)](_0x22e5f0);}function _0x5976b2(_0x2cd0d0){const _0x10c3fb=_0x4cdaa0,_0x3ddd29=_0x2cd0d0[_0x10c3fb(0x46e)]!==_0x10c3fb(0x1e4)?_0x2ad0ce(_0x21ec5b[_0x10c3fb(0x577)],'['+_0x2cd0d0[_0x10c3fb(0x46e)]+']'):'';return _0x2ad0ce(_0x21ec5b[_0x10c3fb(0x5e8)]+_0x21ec5b[_0x10c3fb(0x1f9)],_0x10c3fb(0x2d3))+_0x3ddd29+_0x2ad0ce(_0x21ec5b[_0x10c3fb(0x145)],'>\x20');}const _0x53c4ad=new Set([_0x4cdaa0(0x58f),_0x4cdaa0(0x46a),_0x4cdaa0(0x48d),_0x4cdaa0(0x4ca),_0x4cdaa0(0x2b4)]);async function _0x1f8215(_0x3d395d,_0x514be6,_0x111adf,_0x49f561,_0xfcbcba,_0x1f0b56){const _0x40deef=_0x4cdaa0;_0x3d395d=_0x3d395d[_0x40deef(0x486)]();if(!_0x3d395d||_0x3d395d[_0x40deef(0x3cc)]('#'))return;const _0x3278d0=_0x3c36dc(_0x3d395d),{flags:_0x5dc510,rest:_0xb0d7e5}=_0x4454a8(_0x3278d0);if(!_0xb0d7e5['length'])return;const _0x393063=_0xb0d7e5[0x0],_0xa74ecb=_0x393063[_0x40deef(0x5ef)]();if(_0xa74ecb===_0x40deef(0x221)){if(_0xb0d7e5[0x1])_0x7df7db(_0x514be6,_0x121b52(_0xb0d7e5[0x1],_0x5dc510[_0x40deef(0x46e)]??_0xfcbcba[_0x40deef(0x46e)]));else _0x4d9898(_0xfcbcba);return;}if(_0xa74ecb===_0x40deef(0x5a4)){const _0x39d17b=_0xb0d7e5[0x1];if(!_0x39d17b){console[_0x40deef(0x4f7)](_0x2ad0ce(_0x21ec5b['red'],_0x40deef(0x3f9)));return;}try{_0x514be6[_0x40deef(0x46e)](_0x39d17b),_0xfcbcba[_0x40deef(0x46e)]=_0x39d17b,_0x1f0b56?.['setPrompt'](_0x5976b2(_0xfcbcba)),console[_0x40deef(0x4f7)](_0x40deef(0x675)+_0x2ad0ce(_0x21ec5b[_0x40deef(0x22b)],'✓')+_0x40deef(0x652)+_0x2ad0ce(_0x21ec5b[_0x40deef(0x5e8)]+_0x21ec5b[_0x40deef(0x1f9)],_0x39d17b)+'\x0a');}catch{console[_0x40deef(0x4f7)](_0x40deef(0x675)+_0x2ad0ce(_0x21ec5b[_0x40deef(0x4df)],'✗')+_0x40deef(0x587)+_0x2ad0ce(_0x21ec5b['bold'],_0x39d17b)+_0x40deef(0x595)+_0x2ad0ce(_0x21ec5b[_0x40deef(0x1bc)],_0x40deef(0x421)));}return;}if(_0xa74ecb===_0x40deef(0x361)){const _0xccfd0c=[..._0x514be6[_0x40deef(0x5bd)]['keys']()][_0x40deef(0x1c6)](_0x55e3a1=>!_0x55e3a1['startsWith']('~'));console[_0x40deef(0x4f7)]('');for(const _0x474cbc of _0xccfd0c){const _0x562f98=_0x474cbc===_0xfcbcba[_0x40deef(0x46e)];console[_0x40deef(0x4f7)]('\x20\x20'+(_0x562f98?_0x2ad0ce(_0x21ec5b[_0x40deef(0x22b)],'●'):_0x2ad0ce(_0x21ec5b[_0x40deef(0x1bc)],'○'))+'\x20\x20'+(_0x562f98?_0x2ad0ce(_0x21ec5b[_0x40deef(0x5e8)]+_0x21ec5b[_0x40deef(0x1f9)],_0x474cbc):_0x2ad0ce(_0x21ec5b[_0x40deef(0x1bc)],_0x474cbc)));}console[_0x40deef(0x4f7)](_0x40deef(0x675)+_0x2ad0ce(_0x21ec5b[_0x40deef(0x1bc)],_0x40deef(0x123))+'\x20'+_0x2ad0ce(_0x21ec5b[_0x40deef(0x1f9)],_0xfcbcba['env'])),console['log']('');return;}if(_0xa74ecb===_0x40deef(0x14e)){const _0x31c80e=[..._0x514be6['_envs'][_0x40deef(0x624)]()][_0x40deef(0x1c6)](_0x17ab5f=>!_0x17ab5f['name'][_0x40deef(0x3cc)]('~'));console[_0x40deef(0x4f7)]('');const _0x4cca3d=Math['max'](..._0x31c80e[_0x40deef(0x601)](_0x8092d7=>_0x8092d7['name'][_0x40deef(0x2eb)]));for(const _0x16f9c4 of _0x31c80e){const _0x4a46c1=_0x16f9c4['name']===_0xfcbcba[_0x40deef(0x46e)],_0x41553d=_0x4a46c1?_0x2ad0ce(_0x21ec5b['green'],'●'):_0x2ad0ce(_0x21ec5b[_0x40deef(0x1bc)],'○'),_0x57587b=_0x4a46c1?_0x2ad0ce(_0x21ec5b[_0x40deef(0x5e8)]+_0x21ec5b['cyan'],_0x16f9c4[_0x40deef(0x2cc)][_0x40deef(0x2c9)](_0x4cca3d)):_0x2ad0ce(_0x21ec5b[_0x40deef(0x1bc)],_0x16f9c4['name'][_0x40deef(0x2c9)](_0x4cca3d)),_0x5daa8f=[..._0x16f9c4[_0x40deef(0x632)][_0x40deef(0x2f1)]()]['filter'](_0x2fda21=>!_0x2fda21[_0x40deef(0x3cc)]('~')),_0x2370b6=_0x5daa8f[_0x40deef(0x2eb)]?_0x2ad0ce(_0x21ec5b[_0x40deef(0x1bc)],_0x5daa8f[_0x40deef(0x45e)](0x0,0x5)[_0x40deef(0x3a4)](',\x20')+(_0x5daa8f[_0x40deef(0x2eb)]>0x5?_0x40deef(0x609)+(_0x5daa8f['length']-0x5)+_0x40deef(0x52d):'')):_0x2ad0ce(_0x21ec5b[_0x40deef(0x1bc)],_0x40deef(0x449));console['log']('\x20\x20'+_0x41553d+'\x20\x20'+_0x57587b+'\x20\x20'+_0x2370b6);}console[_0x40deef(0x4f7)]('');return;}if(_0xa74ecb===_0x40deef(0x37f)){const _0x5b47fd=_0x5dc510[_0x40deef(0x46e)]??_0xb0d7e5[0x1]??_0xfcbcba[_0x40deef(0x46e)];try{const _0x1f69e0=_0x514be6[_0x40deef(0x46e)](_0x5b47fd),_0x236404=[..._0x1f69e0[_0x40deef(0x632)][_0x40deef(0x2f1)]()][_0x40deef(0x1c6)](_0x38d648=>!_0x38d648[_0x40deef(0x3cc)]('~'))[_0x40deef(0x30f)]();console[_0x40deef(0x4f7)](_0x40deef(0x675)+_0x2ad0ce(_0x21ec5b[_0x40deef(0x1bc)],_0x236404[_0x40deef(0x2eb)]+_0x40deef(0x4b9)+(_0x236404[_0x40deef(0x2eb)]!==0x1?'s':'')+_0x40deef(0x5b8)+_0x5b47fd));for(const _0x30c4f9 of _0x236404){const _0x3926ac=_0x1f69e0['typeSubDbs'][_0x40deef(0x3aa)](_0x30c4f9),_0x2ff6d0=_0x3926ac?.[_0x40deef(0x206)]?.[_0x40deef(0x16e)]?.()??0x0,_0x25cf5d=_0x2ad0ce(_0x21ec5b[_0x40deef(0x5e8)]+_0x21ec5b[_0x40deef(0x1f9)],_0x30c4f9[_0x40deef(0x2c9)](0x1c));console['log'](_0x40deef(0x3cf)+_0x25cf5d+'\x20\x20'+_0x2ad0ce(_0x21ec5b['magenta'],String(_0x2ff6d0)[_0x40deef(0x24d)](0x6))+'\x20'+_0x2ad0ce(_0x21ec5b[_0x40deef(0x1bc)],'records'));}console['log']('');}catch(_0x1cd0f7){console['error'](_0x2ad0ce(_0x21ec5b[_0x40deef(0x4df)],_0x40deef(0x675)+_0x1cd0f7[_0x40deef(0x29c)]+'\x0a'));}return;}if(_0xa74ecb==='ROUTES'){_0x192571(_0x514be6,_0xb0d7e5[_0x40deef(0x45e)](0x1)[_0x40deef(0x3a4)]('\x20'));return;}if(_0xa74ecb===_0x40deef(0x140)){const _0x1a8bdc=(_0xb0d7e5[0x1]??'')[_0x40deef(0x3f1)]();if(!_0x1a8bdc||_0x1a8bdc==='on')_0x49f561[_0x40deef(0x26c)]=!![],_0x49f561[_0x40deef(0x294)]=_0x40deef(0x3d7),console[_0x40deef(0x4f7)](_0x40deef(0x675)+_0x2ad0ce(_0x21ec5b['green'],'✓')+_0x40deef(0x3c2)+_0x2ad0ce(_0x21ec5b['dim'],_0x40deef(0x257))+'\x0a');else{if(_0x1a8bdc===_0x40deef(0x5d8))_0x49f561[_0x40deef(0x26c)]=![],console[_0x40deef(0x4f7)]('\x0a\x20\x20'+_0x2ad0ce(_0x21ec5b[_0x40deef(0x577)],'○')+'\x20logs\x20off\x0a');else _0x43e787[_0x1a8bdc]!==undefined?(_0x49f561[_0x40deef(0x26c)]=!![],_0x49f561['level']=_0x1a8bdc,console[_0x40deef(0x4f7)](_0x40deef(0x675)+_0x2ad0ce(_0x21ec5b[_0x40deef(0x22b)],'✓')+_0x40deef(0x496)+_0x2ad0ce(_0x21ec5b[_0x40deef(0x5e8)],_0x1a8bdc)+'\x0a')):console[_0x40deef(0x31b)](_0x2ad0ce(_0x21ec5b['red'],_0x40deef(0x453)));}return;}if(_0xa74ecb===_0x40deef(0x557)||_0xa74ecb===_0x40deef(0x2c1)){await _0x5e9f7e(_0x514be6,0x0);return;}if(_0xa74ecb===_0x40deef(0x5dd)){const _0x578eed=_0x40deef(0x1ad)+_0x111adf[_0x40deef(0x26f)]+'/admin/index.html',_0x36f1df=process[_0x40deef(0x2e3)]===_0x40deef(0x405)?_0x40deef(0x44f)+_0x578eed:process[_0x40deef(0x2e3)]===_0x40deef(0x558)?_0x40deef(0x631)+_0x578eed:_0x40deef(0x1ab)+_0x578eed;require$$4[_0x40deef(0x4c7)](_0x36f1df),console[_0x40deef(0x4f7)](_0x40deef(0x675)+_0x2ad0ce(_0x21ec5b[_0x40deef(0x22b)],'✓')+_0x40deef(0x363)+_0x2ad0ce(_0x21ec5b[_0x40deef(0x1f9)],_0x578eed)+'\x0a');return;}let _0x16fd29,_0x4674ef,_0x4343f8;if(_0x53c4ad['has'](_0xa74ecb)){_0x16fd29=_0xa74ecb,_0x4674ef=_0xb0d7e5[0x1],_0x4343f8=_0xb0d7e5[_0x40deef(0x45e)](0x2);if(!_0x4674ef){console[_0x40deef(0x31b)](_0x2ad0ce(_0x21ec5b['red'],_0x40deef(0x560)+_0x393063+_0x40deef(0x137)));return;}}else _0x16fd29=null,_0x4674ef=_0xb0d7e5[0x0],_0x4343f8=_0xb0d7e5['slice'](0x1);const _0x1487c9=_0x5dc510[_0x40deef(0x46e)]??_0xfcbcba[_0x40deef(0x46e)],_0x2c35ae=_0x121b52(_0x4674ef,_0x1487c9);if(_0x5dc510['help']){_0x7df7db(_0x514be6,_0x2c35ae);return;}let _0x4849e0=null;if(_0x4343f8['length']){const _0x2683a7=_0x4343f8[_0x40deef(0x3a4)]('\x20');try{_0x4849e0=_0x198e98(_0x2683a7);}catch(_0x3e9702){console[_0x40deef(0x31b)](_0x2ad0ce(_0x21ec5b[_0x40deef(0x4df)],'\x0a\x20\x20Invalid\x20JSON:\x20'+_0x2683a7+_0x40deef(0x675)+_0x2ad0ce(_0x21ec5b[_0x40deef(0x1bc)],_0x3e9702[_0x40deef(0x29c)])+'\x0a'));return;}}if(!_0x16fd29)_0x16fd29=_0x4849e0!==null?_0x40deef(0x46a):_0x40deef(0x58f);try{const _0x5f2798=await _0x21c433(_0x514be6,_0x16fd29,_0x2c35ae,_0x4849e0);_0x17e613(_0x5f2798[_0x40deef(0x626)],_0x5f2798[_0x40deef(0x5e9)]);}catch(_0x24a555){console[_0x40deef(0x31b)](_0x40deef(0x675)+_0x2ad0ce(_0x21ec5b['red'],'✗')+'\x20'+_0x24a555[_0x40deef(0x29c)]+'\x0a');}}class _0x36d363{constructor(){const _0x375166=_0x4cdaa0;this['children']=new Map(),this[_0x375166(0x4b7)]=null,this[_0x375166(0x52f)]=![];}}function _0x2af4fd(_0x3d3e42){const _0x205e7c=_0x4cdaa0,_0x4fa729=new _0x36d363();for(const _0xf23853 of _0x3d3e42){if(_0xf23853[_0x205e7c(0x664)]?.[_0x205e7c(0x350)])continue;const _0x3d87db=_0xf23853[_0x205e7c(0x42d)]['replace'](/^\/api/,'')[_0x205e7c(0x38b)](/^\[\/env\/:env=[^\]]*\]/,'')['replace'](/^\//,'');if(!_0x3d87db)continue;let _0x242291=_0x4fa729;for(const _0xbf785d of _0x3d87db['split']('/')[_0x205e7c(0x1c6)](Boolean)){if(_0xbf785d[_0x205e7c(0x3cc)](':')){const _0x348792=_0xbf785d[_0x205e7c(0x45e)](0x1);if(!_0x242291[_0x205e7c(0x4b7)])_0x242291[_0x205e7c(0x4b7)]={'param':_0x348792,'node':new _0x36d363()};_0x242291=_0x242291[_0x205e7c(0x4b7)][_0x205e7c(0x3fa)];}else{if(!_0x242291[_0x205e7c(0x331)][_0x205e7c(0x39f)](_0xbf785d))_0x242291[_0x205e7c(0x331)][_0x205e7c(0x2c2)](_0xbf785d,new _0x36d363());_0x242291=_0x242291[_0x205e7c(0x331)][_0x205e7c(0x3aa)](_0xbf785d);}}_0x242291['terminal']=!![];}return _0x4fa729;}const _0x25e579=new Map();function _0x40702b(_0x1c4315,_0x49a001,_0x3cd419){const _0x23756f=_0x4cdaa0,_0x1eb305=_0x25e579['get'](_0x1c4315);if(_0x1eb305&&_0x1eb305[_0x23756f(0xfd)]>Date[_0x23756f(0x16a)]())return _0x1eb305[_0x23756f(0x15b)];const _0x1d621c=_0x3cd419();return _0x25e579[_0x23756f(0x2c2)](_0x1c4315,{'val':_0x1d621c,'exp':Date['now']()+_0x49a001}),_0x1d621c;}function _0x3e2cdc(_0x35aafb,_0x4554fe,_0x37df23,_0x44c42a){const _0x2641c4=_0x4cdaa0,_0x23881f=_0x4554fe[_0x2641c4(0x46e)]??_0x44c42a[_0x2641c4(0x46e)];switch(_0x35aafb){case'env':return[..._0x37df23[_0x2641c4(0x5bd)]['keys']()][_0x2641c4(0x1c6)](_0x19c328=>!_0x19c328[_0x2641c4(0x3cc)]('~'));case'type':return _0x40702b('types:'+_0x23881f,0x7d0,()=>{const _0x580a14=_0x2641c4;try{return[..._0x37df23[_0x580a14(0x46e)](_0x23881f)['typeSubDbs'][_0x580a14(0x2f1)]()][_0x580a14(0x1c6)](_0xaac5dd=>!_0xaac5dd[_0x580a14(0x3cc)]('~'));}catch{return[];}});case _0x2641c4(0x174):if(!_0x4554fe[_0x2641c4(0x49b)])return[];return _0x40702b(_0x2641c4(0x5f3)+_0x23881f+':'+_0x4554fe[_0x2641c4(0x49b)],0x5dc,()=>{const _0x3e97f1=_0x2641c4;try{const _0x3db13e=_0x37df23[_0x3e97f1(0x46e)](_0x23881f)[_0x3e97f1(0x632)][_0x3e97f1(0x3aa)](_0x4554fe[_0x3e97f1(0x49b)]);if(!_0x3db13e?.[_0x3e97f1(0x206)])return[];const _0x1d7d73=[];for(const {key:_0x3e2e87}of _0x3db13e[_0x3e97f1(0x206)][_0x3e97f1(0x391)]({'limit':0x32})){_0x1d7d73[_0x3e97f1(0x614)](String(_0x3e2e87));if(_0x1d7d73[_0x3e97f1(0x2eb)]>=0x32)break;}return _0x1d7d73;}catch{return[];}});case _0x2641c4(0x593):if(!_0x4554fe[_0x2641c4(0x49b)])return[];return _0x40702b(_0x2641c4(0x1ac)+_0x23881f+':'+_0x4554fe[_0x2641c4(0x49b)],0x7d0,()=>{const _0x3070fc=_0x2641c4;try{const _0x3faac1=_0x37df23[_0x3070fc(0x46e)](_0x23881f)[_0x3070fc(0x632)]['get'](_0x4554fe[_0x3070fc(0x49b)]);return _0x3faac1?[..._0x3faac1['indexToDb']?.['keys']()??[]]:[];}catch{return[];}});case _0x2641c4(0x195):if(!_0x4554fe['type'])return[];return _0x40702b(_0x2641c4(0x224)+_0x23881f+':'+_0x4554fe['type'],0x7d0,()=>{const _0x44fca6=_0x2641c4;try{return _0x37df23[_0x44fca6(0x458)]?.[_0x44fca6(0x25b)]?.(_0x4554fe[_0x44fca6(0x49b)],_0x37df23['env'](_0x23881f))?.[_0x44fca6(0x601)](_0x203d08=>_0x203d08[_0x44fca6(0x2cc)])??[];}catch{return[];}});default:return[];}}function _0x130473(_0x228221,_0x61e623,_0x20065e,_0x46e3a4){const _0x569dd5=_0x4cdaa0,_0x4f51e6=_0x228221['endsWith']('/'),_0x56e768=_0x228221[_0x569dd5(0x37c)]('/'),_0x288062=_0x4f51e6?_0x56e768[_0x569dd5(0x45e)](0x0,-0x1):_0x56e768['slice'](0x0,-0x1),_0x263e7d=_0x4f51e6?'':_0x56e768[_0x56e768[_0x569dd5(0x2eb)]-0x1];let _0x18904a=_0x61e623;const _0x4a5d74={};for(const _0x410de0 of _0x288062){if(!_0x410de0)continue;if(_0x18904a[_0x569dd5(0x331)][_0x569dd5(0x39f)](_0x410de0))_0x18904a=_0x18904a['children']['get'](_0x410de0);else{if(_0x18904a[_0x569dd5(0x4b7)])_0x4a5d74[_0x18904a[_0x569dd5(0x4b7)]['param']]=_0x410de0,_0x18904a=_0x18904a['dynamic'][_0x569dd5(0x3fa)];else return[];}}const _0x37a4dc=_0x288062[_0x569dd5(0x1c6)](Boolean),_0x22f4e3=_0x37a4dc['length']?_0x37a4dc['join']('/')+'/':'',_0x3fd61f=[];for(const [_0x455c13]of _0x18904a[_0x569dd5(0x331)]){if(_0x455c13[_0x569dd5(0x3cc)](_0x263e7d))_0x3fd61f[_0x569dd5(0x614)](_0x22f4e3+_0x455c13);}if(_0x18904a['dynamic'])for(const _0x3b6a2a of _0x3e2cdc(_0x18904a['dynamic']['param'],_0x4a5d74,_0x20065e,_0x46e3a4)){if(String(_0x3b6a2a)[_0x569dd5(0x3cc)](_0x263e7d))_0x3fd61f[_0x569dd5(0x614)](_0x22f4e3+_0x3b6a2a);}return _0x3fd61f[_0x569dd5(0x45e)](0x0,0x64);}const _0x19ea08=[_0x4cdaa0(0x2e2),_0x4cdaa0(0x2ca),_0x4cdaa0(0x46e),'envs',_0x4cdaa0(0x161),_0x4cdaa0(0x5d7),_0x4cdaa0(0x4dd),'open',_0x4cdaa0(0x542),_0x4cdaa0(0x378)];function _0x550414(_0x3d09b4,_0x485daf,_0x3dda8f){return function _0x4076a0(_0x5e3d02){const _0x11cac4=_0x2368;try{const _0x53dc2d=_0x5e3d02[_0x11cac4(0x507)](/\s[{[]/),_0x3619a3=_0x53dc2d>=0x0?_0x5e3d02[_0x11cac4(0x45e)](0x0,_0x53dc2d):_0x5e3d02,_0xa82097=_0x3619a3[_0x11cac4(0x2fb)]();if(!_0xa82097){const _0x17c266=[..._0x19ea08,...[..._0x3d09b4['children'][_0x11cac4(0x2f1)]()]][_0x11cac4(0x45e)](0x0,0x64);return[_0x17c266,''];}const _0x58c287=_0xa82097[_0x11cac4(0x37c)](/\s+/),_0x318632=_0x58c287[0x0],_0x35e642=_0x318632[_0x11cac4(0x5ef)]();if(_0x58c287[_0x11cac4(0x2eb)]===0x1){const _0x153ed3=_0x318632['toLowerCase'](),_0x1bd30a=_0x19ea08[_0x11cac4(0x1c6)](_0x57203e=>_0x57203e[_0x11cac4(0x3cc)](_0x153ed3)),_0x10cb21=_0x130473(_0x318632,_0x3d09b4,_0x485daf,_0x3dda8f),_0x320f84=[...new Set([..._0x1bd30a,..._0x10cb21])]['slice'](0x0,0x64);return[_0x320f84,_0x318632];}if(_0x53c4ad[_0x11cac4(0x39f)](_0x35e642)&&_0x58c287[_0x11cac4(0x2eb)]===0x2){const _0xb4dd70=_0x58c287[0x1],_0x2651e2=_0x130473(_0xb4dd70,_0x3d09b4,_0x485daf,_0x3dda8f);return[_0x2651e2[_0x11cac4(0x601)](_0x1d5701=>_0x318632+'\x20'+_0x1d5701),_0x318632+'\x20'+_0xb4dd70];}if(!_0x53c4ad[_0x11cac4(0x39f)](_0x35e642)&&_0x58c287[_0x11cac4(0x2eb)]>0x1){const _0x442044=_0x130473(_0x318632,_0x3d09b4,_0x485daf,_0x3dda8f),_0x1a8a93='\x20'+_0x58c287[_0x11cac4(0x45e)](0x1)[_0x11cac4(0x3a4)]('\x20');return[_0x442044[_0x11cac4(0x601)](_0x230ba6=>_0x230ba6+_0x1a8a93),_0x318632+_0x1a8a93];}return[[],_0x5e3d02];}catch{return[[],_0x5e3d02];}};}async function _0x11044f(_0x3d9d54,_0x12188e){const _0x426dde=_0x4cdaa0,_0x5b0eb6={'enabled':!![],'level':_0x12188e['logLevel']??_0x426dde(0x3d7)},_0x3b8b2e={'env':'default'},_0x5d7caa={'current':null},_0x15f1c5=_0x2af4fd(_0x3d9d54[_0x426dde(0x5d0)][_0x426dde(0x33c)]()),_0x32a174=_0x550414(_0x15f1c5,_0x3d9d54,_0x3b8b2e);_0x3d9d54[_0x426dde(0x4f7)]['attach'](_0x2a2469=>{const _0x45f88c=_0x426dde;if(!_0x5b0eb6[_0x45f88c(0x26c)])return;_0x4c4864(_0x2a2469,_0x5b0eb6[_0x45f88c(0x294)]),_0x5d7caa[_0x45f88c(0x199)]?.['prompt'](!![]);}),_0x62d3fc(_0x3d9d54,_0x12188e);const _0x3c56b3=_0x722dec[_0x426dde(0x15a)]({'input':process[_0x426dde(0x61c)],'output':process[_0x426dde(0x559)],'terminal':!![],'completer':_0x32a174,'prompt':_0x5976b2(_0x3b8b2e),'historySize':_0x2536e3});try{const _0x311b03=_0x1f435f[_0x426dde(0xe7)](_0x32c291,_0x426dde(0x365))['split']('\x0a')[_0x426dde(0x1c6)](Boolean);_0x3c56b3[_0x426dde(0x24c)]=_0x311b03[_0x426dde(0x414)]()[_0x426dde(0x45e)](0x0,_0x2536e3);}catch{}_0x5d7caa[_0x426dde(0x199)]=_0x3c56b3,_0x3c56b3['on'](_0x426dde(0x5ce),async _0x3c02e5=>{const _0x66f1b4=_0x426dde;_0x3c56b3[_0x66f1b4(0x152)]();try{await _0x1f8215(_0x3c02e5,_0x3d9d54,_0x12188e,_0x5b0eb6,_0x3b8b2e,_0x3c56b3);}catch(_0x158da5){console[_0x66f1b4(0x31b)](_0x2ad0ce(_0x21ec5b[_0x66f1b4(0x4df)],_0x66f1b4(0x1cc)+_0x158da5[_0x66f1b4(0x29c)]));}finally{_0x3c56b3[_0x66f1b4(0x29d)](),_0x3c56b3[_0x66f1b4(0x3f2)]();}}),_0x3c56b3['on'](_0x426dde(0x241),()=>{const _0x382b09=_0x426dde;try{const _0x5bedfe=[..._0x3c56b3[_0x382b09(0x24c)]][_0x382b09(0x414)]()[_0x382b09(0x1c6)](Boolean)[_0x382b09(0x45e)](0x0,_0x2536e3);_0x1f435f['writeFileSync'](_0x32c291,_0x5bedfe[_0x382b09(0x3a4)]('\x0a')+'\x0a');}catch{}_0x5e9f7e(_0x3d9d54,0x0);});let _0x26c1fc=0x0;return process['on'](_0x426dde(0x53b),()=>{const _0x30e292=_0x426dde;if(_0x1d6d38)return _0x5e9f7e(_0x3d9d54,0x82,_0x30e292(0x53b));if(_0x3c56b3[_0x30e292(0x5ce)]==='')return _0x5e9f7e(_0x3d9d54,0x0,_0x30e292(0x53b));const _0x5957c1=Date[_0x30e292(0x16a)]();if(_0x5957c1-_0x26c1fc<0x5dc)return _0x5e9f7e(_0x3d9d54,0x0,_0x30e292(0x635));_0x26c1fc=_0x5957c1,process[_0x30e292(0x559)][_0x30e292(0x4ae)]('\x0a'),_0x3c56b3[_0x30e292(0x3ce)](0x0),_0x3c56b3['prompt'](),process[_0x30e292(0x16f)][_0x30e292(0x4ae)](_0x2ad0ce(_0x21ec5b[_0x30e292(0x1bc)],_0x30e292(0xe4)));}),process['on']('SIGTERM',()=>_0x5e9f7e(_0x3d9d54,0x0,'SIGTERM')),process['on'](_0x426dde(0x5e7),()=>_0x5e9f7e(_0x3d9d54,0x0,_0x426dde(0x5e7))),_0x3c56b3[_0x426dde(0x3f2)](),_0x3c56b3;}return okdbShell={'start':_0x11044f,'colorLog':_0x4c4864,'lenientParse':_0x198e98,'_splitLine':_0x3c36dc,'_formatRouteHelpLines':_0x5e930,'_routeSummary':_0x196b8a,'_routeTags':_0x212050},okdbShell;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x1ebffb=_0x4b361c;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x3fa839,performance:_0x20f3b8}=require$$0$3,_0x3f376a=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG===_0x1ebffb(0x5e1),_0x3b2a21=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x250321=process.env.OKDB_LOOP_LAG_ALL==='1',_0x48b3ae=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x2de414{constructor(){const _0x4be28d=_0x1ebffb;this['enabled']=_0x3f376a,this[_0x4be28d(0x659)]=new Map(),this['_h']=null,this[_0x4be28d(0x301)]=null,this[_0x4be28d(0x1ba)]=![],this[_0x4be28d(0x653)]=(_0x5997b9,_0x403f1d)=>process[_0x4be28d(0x16f)][_0x4be28d(0x4ae)](_0x5997b9+(_0x403f1d?'\x20'+JSON[_0x4be28d(0x3d9)](_0x403f1d):'')+'\x0a');}[_0x1ebffb(0x16a)](){const _0x3c29d6=_0x1ebffb;return _0x20f3b8[_0x3c29d6(0x16a)]();}['setLogger'](_0x3f2a21){const _0x4f2232=_0x1ebffb;if(typeof _0x3f2a21===_0x4f2232(0x26b))this[_0x4f2232(0x653)]=_0x3f2a21;}[_0x1ebffb(0x480)](_0x800bb4,_0x4b4861,_0x239771){const _0x4dccab=_0x1ebffb;if(!this[_0x4dccab(0x26c)])return;let _0x38b926=this[_0x4dccab(0x659)][_0x4dccab(0x3aa)](_0x800bb4);!_0x38b926&&(_0x38b926={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x4dccab(0x659)]['set'](_0x800bb4,_0x38b926)),_0x38b926['ms']+=_0x4b4861,_0x38b926[_0x4dccab(0x5ec)]+=0x1,_0x4b4861>_0x38b926[_0x4dccab(0x60b)]&&(_0x38b926[_0x4dccab(0x60b)]=_0x4b4861,_0x38b926['maxExtra']=_0x239771||'');}[_0x1ebffb(0x545)](_0x51621a){const _0x161a83=_0x1ebffb;if(!this['enabled']||this[_0x161a83(0x1ba)])return;this[_0x161a83(0x1ba)]=!![];if(_0x51621a)this[_0x161a83(0x653)]=_0x51621a;this['_h']=_0x3fa839({'resolution':0xa}),this['_h'][_0x161a83(0x3a8)](),this[_0x161a83(0x301)]=setInterval(()=>this[_0x161a83(0x66f)](),_0x3b2a21);if(this[_0x161a83(0x301)]['unref'])this[_0x161a83(0x301)][_0x161a83(0x386)]();}['onWindow'](_0x307a77){const _0x17213b=_0x1ebffb;if(!this[_0x17213b(0x475)])this[_0x17213b(0x475)]=new Set();this[_0x17213b(0x475)][_0x17213b(0x61d)](_0x307a77);if(!this[_0x17213b(0x1ba)])this['_startAdmission']();}[_0x1ebffb(0x320)](_0x2d89f2){const _0x39661d=_0x1ebffb;this['_windowCbs']?.[_0x39661d(0x5ed)](_0x2d89f2);}[_0x1ebffb(0x168)](){const _0x3dc4c5=_0x1ebffb;if(this['_admissionStarted'])return;this['_admissionStarted']=!![];!this['_h']&&(this['_h']=_0x3fa839({'resolution':0xa}),this['_h'][_0x3dc4c5(0x3a8)]());const _0x4f3a46=_0x3b2a21;this[_0x3dc4c5(0x144)]=setInterval(()=>{const _0x37dd50=_0x3dc4c5,_0x4a8c9b=this['_h'];if(!_0x4a8c9b)return;const _0xade6ef=_0x4a8c9b[_0x37dd50(0x5ba)](0x63)/0xf4240,_0xe12fca=_0x4a8c9b[_0x37dd50(0x47e)]/0xf4240,_0x13b1ff=_0x4a8c9b['mean']/0xf4240;_0x4a8c9b[_0x37dd50(0x1c2)]();if(this[_0x37dd50(0x475)])for(const _0x5477eb of this[_0x37dd50(0x475)]){try{_0x5477eb({'p99Ms':_0xade6ef,'maxMs':_0xe12fca,'meanMs':_0x13b1ff,'reportMs':_0x4f3a46});}catch{}}},_0x4f3a46);if(this['_admissionTimer'][_0x3dc4c5(0x386)])this[_0x3dc4c5(0x144)][_0x3dc4c5(0x386)]();}[_0x1ebffb(0x66f)](){const _0x5f6f74=_0x1ebffb,_0x317b94=this['_h'],_0x2d5d4c=_0x317b94[_0x5f6f74(0x47e)]/0xf4240,_0x1d3791=_0x317b94[_0x5f6f74(0x5ba)](0x63)/0xf4240,_0x1b8e36=_0x317b94[_0x5f6f74(0x56b)]/0xf4240;_0x317b94[_0x5f6f74(0x1c2)]();const _0x2981c1=[...this[_0x5f6f74(0x659)][_0x5f6f74(0x427)]()][_0x5f6f74(0x601)](([_0x79aade,_0x29e731])=>({'label':_0x79aade,..._0x29e731}))[_0x5f6f74(0x30f)]((_0x3f8529,_0x1dedd4)=>_0x1dedd4['ms']-_0x3f8529['ms'])[_0x5f6f74(0x45e)](0x0,0x8);this[_0x5f6f74(0x659)][_0x5f6f74(0x479)]();const _0x38d601=_0x2981c1['reduce']((_0x721540,_0x14d5fc)=>_0x721540+_0x14d5fc['ms'],0x0),_0x3d2991=_0x2981c1[_0x5f6f74(0x601)](_0x2d51a1=>_0x2d51a1[_0x5f6f74(0x508)]+'='+_0x2d51a1['ms'][_0x5f6f74(0x4a8)](0x0)+_0x5f6f74(0x2f4)+_0x2d51a1[_0x5f6f74(0x5ec)]+(_0x2d51a1['maxMs']>0x5?_0x5f6f74(0x644)+_0x2d51a1[_0x5f6f74(0x60b)]['toFixed'](0x0)+'ms'+(_0x2d51a1[_0x5f6f74(0x352)]?'\x20'+_0x2d51a1[_0x5f6f74(0x352)]:'')+')':''));(_0x250321||_0x2d5d4c>=_0x48b3ae)&&this[_0x5f6f74(0x653)](_0x5f6f74(0x230)+_0x3b2a21+_0x5f6f74(0x3b9)+_0x2d5d4c[_0x5f6f74(0x4a8)](0x0)+_0x5f6f74(0x3a1)+_0x1d3791[_0x5f6f74(0x4a8)](0x0)+'ms\x20mean='+_0x1b8e36[_0x5f6f74(0x4a8)](0x0)+_0x5f6f74(0x513)+_0x38d601['toFixed'](0x0)+'ms'+(_0x3d2991['length']?_0x5f6f74(0x5a2)+_0x3d2991[_0x5f6f74(0x3a4)]('\x20\x20'):''),{'feature':_0x5f6f74(0x4ab)});if(this[_0x5f6f74(0x475)])for(const _0xf5ed0a of this[_0x5f6f74(0x475)]){try{_0xf5ed0a({'p99Ms':_0x1d3791,'maxMs':_0x2d5d4c,'meanMs':_0x1b8e36,'reportMs':_0x3b2a21});}catch{}}}['stop'](){const _0x660071=_0x1ebffb;if(this[_0x660071(0x301)])clearInterval(this[_0x660071(0x301)]);if(this['_h'])this['_h']['disable']();this['_timer']=null,this['_h']=null,this[_0x660071(0x1ba)]=![];}}const _0x43c77b=new _0x2de414();if(_0x43c77b[_0x1ebffb(0x26c)])_0x43c77b['start']();return okdbLoopMonitor={'LOOP':_0x43c77b},okdbLoopMonitor;}var okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x42a870=_0x4b361c;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x297dda=require$$0,_0x5813e1=require$$1$2,_0x36f838=require$$2,{LOOP:_0x1b606f}=requireOkdbLoopMonitor(),_0x128dd8=_0x42a870(0x1f8),_0x22fe37=_0x42a870(0x3fa),_0x421837=_0x42a870(0x1d0),_0x2025ea=_0x42a870(0x432),_0x26e303=(_0x7cbb31,_0xa7293f)=>_0x7cbb31+':'+_0xa7293f,_0x3d454f=(_0x4661e2,_0x1a455f)=>_0x4661e2+'::'+_0x1a455f,_0x101cc0=(_0x545819,_0x1679cc)=>_0x545819+'/'+_0x1679cc,_0x38bc5b=(_0x45f68f,_0x3a3f6a)=>_0x45f68f+'#'+_0x3a3f6a,_0x46d10e=_0x4ee0d6=>{const _0x3d0956=_0x42a870;if(_0x4ee0d6?.[_0x3d0956(0x638)])return _0x4ee0d6[_0x3d0956(0x638)];const _0x9b1c37=_0x4ee0d6?.[_0x3d0956(0x472)];return typeof _0x9b1c37===_0x3d0956(0x380)&&_0x9b1c37[_0x3d0956(0x5c0)]('#')?_0x9b1c37[_0x3d0956(0x45e)](0x0,_0x9b1c37[_0x3d0956(0x42b)]('#')):_0x9b1c37;},_0x568dec=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x25d8d0=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x320f2c=_0x568dec*0x3,_0x23ce58=[_0x42a870(0x572),_0x42a870(0x5e5),'processor:retry',_0x42a870(0x22f)];let _0xb24364=null;function _0x22fb9b(){const _0x30012b=_0x42a870;if(_0xb24364==null)_0xb24364=Math[_0x30012b(0x1df)]((Date['now']()-process[_0x30012b(0x4d0)]()*0x3e8)/0x3e8)*0x3e8;return _0xb24364;}function _0x85fc2d(_0x57c5ce){const _0x4bf111=_0x42a870;if(process.env.OKDB_PROCESS_KILL==='off')return![];if(_0x57c5ce?.[_0x4bf111(0x2aa)]?.[_0x4bf111(0x532)]&&typeof _0x57c5ce['options'][_0x4bf111(0x532)]===_0x4bf111(0x20e)&&_0x57c5ce[_0x4bf111(0x2aa)]['processes'][_0x4bf111(0x269)]===![])return![];return!![];}function _0x3d73c2(_0x46a3ca,_0x4b2723){const _0x1ed14f=_0x42a870,_0x4d62b9=!!_0x4b2723?.['asyncProcessors'];switch(_0x46a3ca){case _0x1ed14f(0x608):return{'controllable':_0x4d62b9,'decommissionable':![],'killable':!![],'killConfirm':_0x1ed14f(0x530)};case'cli':case'standalone':return{'controllable':_0x4d62b9,'decommissionable':![],'killable':!![],'killConfirm':_0x1ed14f(0x213)};case'embedded':return{'controllable':![],'decommissionable':![],'killable':![]};case _0x1ed14f(0x311):case _0x1ed14f(0x483):case _0x1ed14f(0x4f2):case _0x1ed14f(0x1a1):return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':_0x1ed14f(0x14c)};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x59d1c0{constructor(_0x434dc7){const _0xe16ec2=_0x42a870;this['okdb']=_0x434dc7,this[_0xe16ec2(0x2bf)]=null,this['_desired']=null,this[_0xe16ec2(0x477)]=null,this['_isWriter']=![],this[_0xe16ec2(0x28f)]=![],this[_0xe16ec2(0x36c)]=_0x22fb9b(),this[_0xe16ec2(0x211)]=_0x26e303(process[_0xe16ec2(0x3e7)],this['_processStartedAt']),this[_0xe16ec2(0x4ba)]=_0x36f838[_0xe16ec2(0x3ba)]()[_0xe16ec2(0x45e)](0x0,0x8),this[_0xe16ec2(0x3be)]=_0x38bc5b(this[_0xe16ec2(0x211)],this[_0xe16ec2(0x4ba)]),this[_0xe16ec2(0x277)]=Date[_0xe16ec2(0x16a)](),this[_0xe16ec2(0x214)]=null,this['_supervisorKey']=null,this['_listenAddr']=null,this['_hbTimer']=null,this[_0xe16ec2(0x54e)]=null,this[_0xe16ec2(0x40d)]=null,this[_0xe16ec2(0x1d1)]=0x0,this[_0xe16ec2(0x5ad)]={},this[_0xe16ec2(0x4f9)]=new Map(),this[_0xe16ec2(0x256)]=process['cpuUsage'](),this[_0xe16ec2(0x5cf)]=Date[_0xe16ec2(0x16a)](),this['_lastCpuPct']=0x0,this[_0xe16ec2(0x18b)]=new Map();}get[_0x42a870(0x5f0)](){const _0xbbed6d=_0x42a870;return this[_0xbbed6d(0x211)];}get[_0x42a870(0x61e)](){const _0x120663=_0x42a870;return this[_0x120663(0x3be)];}[_0x42a870(0x243)](_0x2a9f8b,_0x243699){const _0x1343da=_0x42a870,_0x523126=_0x3d73c2(_0x2a9f8b,_0x243699);if(_0x523126[_0x1343da(0x1a0)]&&!_0x85fc2d(this['okdb']))return{..._0x523126,'killable':![],'killConfirm':undefined};return _0x523126;}['isActive'](){return!!this['_statusEnv'];}['setOwnMeta'](_0x2c7c49){const _0x9229b3=_0x42a870;Object[_0x9229b3(0x451)](this[_0x9229b3(0x5ad)],_0x2c7c49||{});}[_0x42a870(0x325)](_0x5aaf4b){const _0x3a3dbd=_0x42a870;if(_0x5aaf4b)this[_0x3a3dbd(0x648)]=_0x5aaf4b;}[_0x42a870(0x25d)](_0x3a9f72={}){const _0x23618d=_0x42a870;return this[_0x23618d(0x2d3)]['_activateProcesses'](_0x3a9f72);}[_0x42a870(0x11a)](){const _0x5a9b43=_0x42a870;let _0x5e246e=null;const _0xacdd5b={};for(const _0x502007 of this[_0x5a9b43(0x2f0)]()){const _0x5cda06=_0x502007[_0x5a9b43(0x2f8)];if(!_0x5cda06)continue;if(_0x5e246e==null)_0x5e246e=_0x5cda06[_0x5a9b43(0x1a7)];for(const _0x4ad8ac of _0x5cda06[_0x5a9b43(0x47c)]||[]){if(![_0x5a9b43(0x3ad),_0x5a9b43(0x5da),'worker','async'][_0x5a9b43(0x5c0)](_0x4ad8ac[_0x5a9b43(0x63e)]))continue;const _0x181a90=_0x4ad8ac['env']||_0x5a9b43(0x1e4);(_0xacdd5b[_0x181a90]||=[])[_0x5a9b43(0x614)]({'type':_0x4ad8ac[_0x5a9b43(0x49b)],'mode':_0x4ad8ac[_0x5a9b43(0x63e)],'state':_0x4ad8ac[_0x5a9b43(0x1a2)],'lastClock':_0x4ad8ac[_0x5a9b43(0x41f)],'headClock':_0x4ad8ac[_0x5a9b43(0x5fa)],'lag':_0x4ad8ac[_0x5a9b43(0x5c1)]});}}return{'envs':_0xacdd5b,'policy':_0x5e246e,'source':_0x5a9b43(0x5bf)};}[_0x42a870(0x4b2)](){const _0x3130ec=_0x42a870,_0x3ab08a=_0x3cd9f3=>{const _0x4f759e=_0x2368;if(_0x3cd9f3[_0x4f759e(0x1a2)]===_0x4f759e(0x4ac)||_0x3cd9f3[_0x4f759e(0x1a2)]===_0x4f759e(0x481)||_0x3cd9f3[_0x4f759e(0x1a2)]===_0x4f759e(0x31b))return 0x3;if(_0x3cd9f3['claimGated'])return 0x1;return 0x2;},_0x14d1a2=new Map();for(const _0x15029a of this[_0x3130ec(0x2f0)]()){for(const _0x194126 of _0x15029a['processing']?.[_0x3130ec(0x47c)]||[]){const _0x1da551={..._0x194126,'owner':{'pid':_0x15029a[_0x3130ec(0x3e7)]??null,'kind':_0x15029a[_0x3130ec(0x4d6)]??null,'host':_0x15029a['host']??null}},_0x3ce28d=_0x194126['mode']==='single'?_0x3130ec(0x4d9)+(_0x194126[_0x3130ec(0x46e)]??'')+'::'+(_0x194126[_0x3130ec(0x262)]??_0x194126[_0x3130ec(0x49b)]??_0x194126['id']):_0x3130ec(0x2f7)+(_0x15029a[_0x3130ec(0x472)]??_0x15029a[_0x3130ec(0x638)]??'')+'::'+(_0x194126[_0x3130ec(0x46e)]??'')+'::'+_0x194126['id'],_0x2fb827=_0x14d1a2[_0x3130ec(0x3aa)](_0x3ce28d);if(!_0x2fb827||_0x3ab08a(_0x1da551)>_0x3ab08a(_0x2fb827))_0x14d1a2[_0x3130ec(0x2c2)](_0x3ce28d,_0x1da551);}}return[..._0x14d1a2['values']()];}[_0x42a870(0x38a)](){const _0xcc191b=_0x42a870,_0x1024d2=Date[_0xcc191b(0x16a)](),_0x22b780=this[_0xcc191b(0x2f0)](),_0x8053db=_0x44ed5c=>Math[_0xcc191b(0x47e)](0x0,Math[_0xcc191b(0x1df)]((_0x1024d2-(_0x44ed5c[_0xcc191b(0x157)]||_0x1024d2))/0x3e8)),_0x80cf08=_0x22b780[_0xcc191b(0x29a)](_0x2f2291=>_0x2f2291[_0xcc191b(0x4d6)]===_0xcc191b(0x608)),_0x280f43=_0x22b780[_0xcc191b(0x1c6)](_0x3bf274=>_0x3bf274['kind']===_0xcc191b(0x311));if(_0x80cf08||_0x280f43[_0xcc191b(0x2eb)])return{'primary':_0x80cf08?{'pid':_0x80cf08['pid'],'uptime':_0x8053db(_0x80cf08)}:null,'workers':_0x280f43['map'](_0xd7e16f=>({'pid':_0xd7e16f[_0xcc191b(0x3e7)],'uptime':_0x8053db(_0xd7e16f)})),'workersConfigured':_0x80cf08?.[_0xcc191b(0x664)]?.[_0xcc191b(0x3c1)]??_0x280f43[_0xcc191b(0x2eb)],'mode':_0xcc191b(0xfe)};const _0x33bfa6=_0x22b780['find'](_0xb22a18=>_0xb22a18[_0xcc191b(0x4d6)]===_0xcc191b(0x3b3)||_0xb22a18[_0xcc191b(0x4d6)]===_0xcc191b(0x53a)||_0xb22a18['kind']===_0xcc191b(0x3e9)),_0x335360=_0x33bfa6?{'pid':_0x33bfa6['pid'],'uptime':_0x8053db(_0x33bfa6)}:{'pid':process[_0xcc191b(0x3e7)],'uptime':Math[_0xcc191b(0x47e)](0x0,Math[_0xcc191b(0x1df)](process[_0xcc191b(0x4d0)]()))};return{'primary':_0x335360,'workers':[_0x335360],'workersConfigured':0x1,'mode':_0xcc191b(0x3ad)};}['nodesView'](){const _0x3b1039=_0x42a870;return this[_0x3b1039(0x49c)]();}[_0x42a870(0x342)](){const _0x49dc5c=_0x42a870,_0x229075=new Map();for(const _0x57c442 of this[_0x49dc5c(0x49c)]())_0x229075[_0x49dc5c(0x2c2)](_0x57c442[_0x49dc5c(0x638)],{..._0x57c442,'children':[]});const _0xd0c2af=[];for(const _0x44c0ce of _0x229075[_0x49dc5c(0x624)]()){const _0x34acee=_0x44c0ce[_0x49dc5c(0x2a8)]?_0x229075[_0x49dc5c(0x3aa)](_0x44c0ce[_0x49dc5c(0x2a8)]):null;if(_0x34acee&&_0x34acee!==_0x44c0ce)_0x34acee[_0x49dc5c(0x331)]['push'](_0x44c0ce);else _0xd0c2af[_0x49dc5c(0x614)](_0x44c0ce);}const _0x501bcf=(_0x27c0a2,_0x2d93d2)=>_0x27c0a2[_0x49dc5c(0x4d6)]===_0x2d93d2[_0x49dc5c(0x4d6)]?(_0x27c0a2[_0x49dc5c(0x3e7)]||0x0)-(_0x2d93d2['pid']||0x0):(_0x27c0a2[_0x49dc5c(0x4d6)]??'')<(_0x2d93d2[_0x49dc5c(0x4d6)]??'')?-0x1:0x1,_0x3e17ac=_0x41d1de=>{const _0x2be9c7=_0x49dc5c;_0x41d1de[_0x2be9c7(0x30f)](_0x501bcf);for(const _0x32511a of _0x41d1de)if(_0x32511a[_0x2be9c7(0x331)][_0x2be9c7(0x2eb)])_0x3e17ac(_0x32511a['children']);};return _0x3e17ac(_0xd0c2af),_0xd0c2af;}[_0x42a870(0x40f)](_0x59dba8){const _0x3e0aaf=_0x42a870;return this[_0x3e0aaf(0x49c)]()[_0x3e0aaf(0x29a)](_0x3a25c6=>_0x3a25c6[_0x3e0aaf(0x638)]===_0x59dba8)??null;}[_0x42a870(0x49c)](_0x184a8a=Date[_0x42a870(0x16a)]()){const _0x1c336c=_0x42a870,_0x384df8=new Map();for(const _0x4ee032 of this[_0x1c336c(0x2f0)]()){const _0x11e55b=_0x46d10e(_0x4ee032);let _0x240aca=_0x384df8['get'](_0x11e55b);!_0x240aca&&(_0x240aca={'processKey':_0x11e55b,'nodeKey':_0x11e55b,'pid':_0x4ee032[_0x1c336c(0x3e7)],'ppid':_0x4ee032[_0x1c336c(0x343)]??null,'host':_0x4ee032['host']??null,'kind':_0x4ee032[_0x1c336c(0x4d6)],'role':null,'supervisorKey':_0x4ee032[_0x1c336c(0x2a8)]??null,'slot':_0x4ee032[_0x1c336c(0x3df)]??null,'slotKey':_0x4ee032[_0x1c336c(0x4af)]??null,'caps':_0x4ee032['caps']??null,'lifecycle':_0x4ee032[_0x1c336c(0x1f0)]??null,'uptime':Math['max'](0x0,Math[_0x1c336c(0x1df)]((_0x184a8a-(_0x4ee032['startedAt']||_0x184a8a))/0x3e8)),'startedAt':_0x4ee032[_0x1c336c(0x157)]??null,'meta':_0x4ee032[_0x1c336c(0x664)]??null,'listenAddr':null,'processing':null,'stats':null,'instances':[]},_0x384df8[_0x1c336c(0x2c2)](_0x11e55b,_0x240aca));_0x240aca['instances'][_0x1c336c(0x614)]({'instanceId':_0x4ee032[_0x1c336c(0xfc)]??null,'role':_0x4ee032[_0x1c336c(0x11f)]??null,'listenAddr':_0x4ee032[_0x1c336c(0xe8)]??null,'lifecycle':_0x4ee032['lifecycle']??null,'processing':_0x4ee032[_0x1c336c(0x2f8)]??null});if(!_0x240aca[_0x1c336c(0x11f)]&&_0x4ee032[_0x1c336c(0x11f)])_0x240aca[_0x1c336c(0x11f)]=_0x4ee032[_0x1c336c(0x11f)];if(!_0x240aca[_0x1c336c(0xe8)]&&_0x4ee032[_0x1c336c(0xe8)])_0x240aca[_0x1c336c(0xe8)]=_0x4ee032[_0x1c336c(0xe8)];if(!_0x240aca[_0x1c336c(0x2f8)]&&_0x4ee032[_0x1c336c(0x2f8)])_0x240aca[_0x1c336c(0x2f8)]=_0x4ee032[_0x1c336c(0x2f8)];if(_0x240aca['caps']==null&&_0x4ee032[_0x1c336c(0x641)])_0x240aca[_0x1c336c(0x641)]=_0x4ee032[_0x1c336c(0x641)];if(_0x4ee032[_0x1c336c(0x3de)]&&(!_0x240aca['stats']||(_0x4ee032['stats']['at']??0x0)>(_0x240aca[_0x1c336c(0x3de)]['at']??0x0)))_0x240aca[_0x1c336c(0x3de)]=_0x4ee032[_0x1c336c(0x3de)];}return[..._0x384df8[_0x1c336c(0x624)]()];}[_0x42a870(0x19f)](){const _0x2f98bc=_0x42a870,_0x5223ee=[],_0x3c1b0a={'rss':0x0,'heapUsed':0x0,'processes':0x0};for(const _0x40fd8d of this[_0x2f98bc(0x49c)]()){_0x5223ee[_0x2f98bc(0x614)]({'processKey':_0x40fd8d['processKey'],'kind':_0x40fd8d[_0x2f98bc(0x4d6)],'pid':_0x40fd8d[_0x2f98bc(0x3e7)],'supervisorKey':_0x40fd8d['supervisorKey'],'meta':_0x40fd8d[_0x2f98bc(0x664)]??null,'uptime':_0x40fd8d[_0x2f98bc(0x4d0)],'stats':_0x40fd8d[_0x2f98bc(0x3de)]??null}),_0x3c1b0a[_0x2f98bc(0x532)]++,_0x40fd8d['stats']&&(_0x3c1b0a[_0x2f98bc(0x37a)]+=_0x40fd8d[_0x2f98bc(0x3de)]['rss']||0x0,_0x3c1b0a['heapUsed']+=(_0x40fd8d[_0x2f98bc(0x3de)][_0x2f98bc(0x5b9)]||0x0)+(_0x40fd8d[_0x2f98bc(0x3de)][_0x2f98bc(0x1f5)]?.[_0x2f98bc(0x5b9)]||0x0));}return{'totals':_0x3c1b0a,'nodes':_0x5223ee};}async[_0x42a870(0x18d)]({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x5ef415=_0x42a870;this[_0x5ef415(0x376)]=this[_0x5ef415(0x376)]||!!writer,this[_0x5ef415(0x28f)]=this[_0x5ef415(0x28f)]||!!reader,this[_0x5ef415(0x214)]=kind||this['_kind']||(_0x5813e1[_0x5ef415(0x60c)]?_0x5ef415(0x311):_0x5ef415(0x3b3)),this[_0x5ef415(0x13a)]=supervisorKey??this[_0x5ef415(0x13a)],this[_0x5ef415(0x648)]=listenAddr??this[_0x5ef415(0x648)],this['_ensureDesired']();if(!writer&&!reader)return null;if(!this[_0x5ef415(0x2bf)]){const _0x4b3ba8=await this[_0x5ef415(0x2d3)][_0x5ef415(0x4a9)](_0x128dd8,{'sync':![],'durability':_0x5ef415(0x2ae)});if(!_0x4b3ba8[_0x5ef415(0x431)](_0x22fe37))await _0x4b3ba8[_0x5ef415(0x428)](_0x22fe37);this[_0x5ef415(0x2bf)]=_0x4b3ba8;}return this[_0x5ef415(0x2bf)];}[_0x42a870(0x3c7)](){const _0x39887f=_0x42a870;return this[_0x39887f(0x64d)]!==this[_0x39887f(0x2bf)]&&(this[_0x39887f(0x64d)]=this[_0x39887f(0x2bf)],this[_0x39887f(0x2f9)]=this[_0x39887f(0x2bf)][_0x39887f(0x447)](_0x22fe37)[_0x39887f(0x206)]),this[_0x39887f(0x2f9)];}[_0x42a870(0x44a)](_0x4be30f){const _0x59402e=_0x42a870,_0x3478f1=this['_nodeDb']()[_0x59402e(0x42f)](_0x4be30f['nodeKey'],_0x4be30f,0x1);if(_0x3478f1&&typeof _0x3478f1[_0x59402e(0x510)]===_0x59402e(0x26b))_0x3478f1[_0x59402e(0x510)](undefined,()=>{});return _0x3478f1;}[_0x42a870(0x162)](_0x446a04){const _0x592f95=_0x42a870,_0x3e9e83=this[_0x592f95(0x3c7)]()[_0x592f95(0x1b1)](_0x446a04);if(_0x3e9e83&&typeof _0x3e9e83[_0x592f95(0x510)]===_0x592f95(0x26b))_0x3e9e83[_0x592f95(0x510)](undefined,()=>{});return _0x3e9e83;}async[_0x42a870(0x607)](_0x4ee01b){const _0x57a0cf=_0x42a870;if(!this['_statusEnv']||!this[_0x57a0cf(0x376)]||!_0x4ee01b?.[_0x57a0cf(0x472)])return;return this[_0x57a0cf(0x44a)](_0x4ee01b);}async[_0x42a870(0x630)](_0x185427){const _0x1096c6=_0x42a870;if(!this['_statusEnv']||!this[_0x1096c6(0x376)]||!_0x185427)return;const _0x3448c1=_0x185427[_0x1096c6(0x5c0)]('#'),_0x577530=[];for(const {key:_0x1bba77}of this['_statusEnv'][_0x1096c6(0x391)](_0x22fe37)){if(_0x1bba77===_0x185427||!_0x3448c1&&typeof _0x1bba77===_0x1096c6(0x380)&&_0x1bba77[_0x1096c6(0x3cc)](_0x185427+'#'))_0x577530[_0x1096c6(0x614)](_0x1bba77);}return Promise[_0x1096c6(0x260)](_0x577530[_0x1096c6(0x601)](_0xac5b65=>this['_removeRowAsync'](_0xac5b65)));}[_0x42a870(0x4db)](_0x8e2c70){const _0x5342c6=_0x42a870;if(typeof _0x8e2c70?.[_0x5342c6(0x3e7)]!==_0x5342c6(0x17c))return![];if(_0x8e2c70[_0x5342c6(0x1bb)]!==_0x297dda[_0x5342c6(0x12a)]())return![];if(_0x8e2c70[_0x5342c6(0x3e7)]===process[_0x5342c6(0x3e7)])return![];try{return process[_0x5342c6(0x269)](_0x8e2c70['pid'],0x0),![];}catch(_0x4032a3){return _0x4032a3[_0x5342c6(0x60e)]===_0x5342c6(0xea);}}[_0x42a870(0x2f0)](){const _0x4fb214=_0x42a870;if(!this[_0x4fb214(0x2bf)])return[];const _0x54b9b4=Date['now'](),_0x3924e0=[];for(const {value:_0x29b50a}of this[_0x4fb214(0x2bf)][_0x4fb214(0x391)](_0x22fe37)){if(_0x29b50a&&(_0x29b50a[_0x4fb214(0x63c)]==null||_0x29b50a[_0x4fb214(0x63c)]>=_0x54b9b4)&&!this['_nodeDead'](_0x29b50a))_0x3924e0[_0x4fb214(0x614)](_0x29b50a);}return _0x3924e0;}[_0x42a870(0x12f)](_0x532d26=0x0){const _0x5e22fe=_0x42a870;if(!this[_0x5e22fe(0x2bf)]||!this[_0x5e22fe(0x376)])return;const _0x34ee86=Date['now']()-_0x532d26,_0x1b5829=new Set(),_0x3d9fad=[];for(const {key:_0x174124,value:_0xd2d6c2}of this[_0x5e22fe(0x2bf)]['getRange'](_0x22fe37)){if(_0xd2d6c2&&(_0xd2d6c2[_0x5e22fe(0x63c)]!=null&&_0xd2d6c2[_0x5e22fe(0x63c)]<_0x34ee86||this['_nodeDead'](_0xd2d6c2)))_0x3d9fad['push'](_0x174124);else _0x1b5829[_0x5e22fe(0x61d)](_0x46d10e(_0xd2d6c2)??_0x174124);}for(const _0x4764eb of _0x3d9fad)this[_0x5e22fe(0x162)](_0x4764eb);if(this[_0x5e22fe(0x201)]())for(const {key:_0x534cea}of this['listDesired']('node')){if(!_0x1b5829['has'](_0x534cea))this['_desired'][_0x5e22fe(0x3a3)](_0x5e22fe(0x407)+_0x534cea);}}[_0x42a870(0x65d)](_0x5a4268=null){const _0x3acf5b=_0x42a870;if(this[_0x3acf5b(0x388)]||!this[_0x3acf5b(0x376)]||!this['_statusEnv'])return;this[_0x3acf5b(0x40d)]=_0x5a4268,this[_0x3acf5b(0x54e)]=()=>this[_0x3acf5b(0x121)]();for(const _0x3f8e9a of _0x23ce58)this[_0x3acf5b(0x2d3)][_0x3acf5b(0x4e5)]['on'](_0x3f8e9a,this[_0x3acf5b(0x54e)]);this[_0x3acf5b(0x423)]();const _0x5e11c0=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x568dec;this['_hbTimer']=setInterval(()=>{const _0x55dff3=_0x3acf5b;if(this[_0x55dff3(0x40d)])try{this[_0x55dff3(0x40d)]();}catch{}this[_0x55dff3(0x423)](),this[_0x55dff3(0x12f)]();},_0x5e11c0);if(this[_0x3acf5b(0x388)]['unref'])this[_0x3acf5b(0x388)]['unref']();}['_maybePublish'](){const _0x4d441a=_0x42a870;if(!this[_0x4d441a(0x376)]||!this['_statusEnv'])return;if(Date[_0x4d441a(0x16a)]()-this[_0x4d441a(0x1d1)]<_0x25d8d0)return;this[_0x4d441a(0x423)]();}['_publishNow'](){const _0x61b709=_0x42a870;if(!this[_0x61b709(0x376)]||!this[_0x61b709(0x2bf)])return;this[_0x61b709(0x1d1)]=Date['now']();try{const _0x2ed879=[this['_buildOwnRow']()];for(const _0x19c188 of this[_0x61b709(0x4f9)]['values']())_0x2ed879[_0x61b709(0x614)](this[_0x61b709(0x4ee)](_0x19c188));const _0x106216=_0x1b606f[_0x61b709(0x26c)]?_0x1b606f[_0x61b709(0x16a)]():0x0,_0x3369cd=Promise['all'](_0x2ed879[_0x61b709(0x601)](_0x342ac9=>this['_putRowAsync'](_0x342ac9)))['catch'](()=>{});if(_0x1b606f[_0x61b709(0x26c)])_0x1b606f[_0x61b709(0x480)](_0x61b709(0x2dd),_0x1b606f[_0x61b709(0x16a)]()-_0x106216,'rows='+_0x2ed879[_0x61b709(0x2eb)]);return _0x3369cd;}catch{}}async[_0x42a870(0x12e)](){const _0x3b5023=_0x42a870;if(this[_0x3b5023(0x54e)]){for(const _0x254f8c of _0x23ce58){try{this[_0x3b5023(0x2d3)][_0x3b5023(0x4e5)][_0x3b5023(0x5d8)](_0x254f8c,this[_0x3b5023(0x54e)]);}catch{}}this[_0x3b5023(0x54e)]=null;}this['_hbTimer']&&(clearInterval(this['_hbTimer']),this[_0x3b5023(0x388)]=null);try{if(this[_0x3b5023(0x2bf)]&&this[_0x3b5023(0x376)])await this[_0x3b5023(0x630)](this['_rowKey']);}catch{}}async[_0x42a870(0x5dc)](){const _0x417abe=_0x42a870;if(!this[_0x417abe(0x2bf)]||!this[_0x417abe(0x376)])return;try{await this[_0x417abe(0x630)](this[_0x417abe(0x3be)]);}catch{}try{const _0x2ea02f=[];for(const {value:_0x171d39}of this[_0x417abe(0x2bf)][_0x417abe(0x391)](_0x22fe37)){if(_0x171d39?.[_0x417abe(0x343)]===process[_0x417abe(0x3e7)]&&_0x171d39[_0x417abe(0x472)])_0x2ea02f[_0x417abe(0x614)](_0x171d39[_0x417abe(0x472)]);}for(const _0x2e414e of _0x2ea02f){try{await this[_0x417abe(0x630)](_0x2e414e);}catch{}}}catch{}}async[_0x42a870(0x581)](){const _0x376e03=_0x42a870;return this[_0x376e03(0x607)](this[_0x376e03(0x3e6)]());}async[_0x42a870(0x2c3)](_0x2ae359){const _0x1d398a=_0x42a870;if(!this[_0x1d398a(0x2bf)]||!this[_0x1d398a(0x376)])return;return this['putNode'](this['_buildChildRow'](_0x2ae359));}[_0x42a870(0x4ee)]({pid:_0x9fcc7a,startedAt:_0x1182c1,kind:_0x29cfa9,supervisorKey:_0x5f2923,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0x42a870(0xf4),meta:meta=null,stats:stats=null}){const _0x1427ee=_0x42a870,_0x2d4b4b=Date['now'](),_0x241e7d=_0x26e303(_0x9fcc7a,_0x1182c1);return{'nodeKey':_0x38bc5b(_0x241e7d,'0'),'processKey':_0x241e7d,'instanceId':'0','pid':_0x9fcc7a,'startedAt':_0x1182c1,'ppid':process[_0x1427ee(0x3e7)],'host':_0x297dda[_0x1427ee(0x12a)](),'supervisorKey':_0x5f2923,'slot':slot,'slotKey':slotKey,'kind':_0x29cfa9,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x2d4b4b,'expiresAt':_0x2d4b4b+_0x320f2c,'caps':this[_0x1427ee(0x243)](_0x29cfa9,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0x42a870(0x501)](_0x311ff9){const _0x3d1713=_0x42a870;if(!_0x311ff9?.[_0x3d1713(0x3e7)])return null;const _0x51a51e=_0x26e303(_0x311ff9[_0x3d1713(0x3e7)],_0x311ff9['startedAt']);this[_0x3d1713(0x4f9)]['set'](_0x51a51e,{..._0x311ff9,'supervisorKey':_0x311ff9[_0x3d1713(0x2a8)]??this[_0x3d1713(0x211)]});if(this[_0x3d1713(0x376)])await this['publishChildRow'](this[_0x3d1713(0x4f9)]['get'](_0x51a51e))[_0x3d1713(0x255)]?.(()=>{});return _0x51a51e;}[_0x42a870(0x493)](_0x331817){const _0x3c7455=_0x42a870;if(!_0x331817)return;return this[_0x3c7455(0x4f9)][_0x3c7455(0x5ed)](_0x331817),this[_0x3c7455(0x630)](_0x331817);}[_0x42a870(0x2a6)](){const _0x5275a2=_0x42a870,_0x4d73fe=Date['now'](),_0x1dcf36=process[_0x5275a2(0x2e1)](),_0x4836ac=(_0x4d73fe-this[_0x5275a2(0x5cf)])*0x3e8;if(_0x4836ac>=0x3d090){const _0x56bff2=_0x1dcf36[_0x5275a2(0x4fd)]-this['_lastCpuUsage'][_0x5275a2(0x4fd)]+(_0x1dcf36[_0x5275a2(0x268)]-this[_0x5275a2(0x256)][_0x5275a2(0x268)]),_0x33567f=_0x297dda['cpus']()[_0x5275a2(0x2eb)]||0x1;this[_0x5275a2(0x54f)]=Math['min'](0x64,Math['round'](_0x56bff2/(_0x4836ac*_0x33567f)*0x64)),this[_0x5275a2(0x35a)]=Math[_0x5275a2(0x1df)](_0x4836ac/0x3e8),this[_0x5275a2(0x256)]=_0x1dcf36,this['_lastCpuAt']=_0x4d73fe;}const _0x527296=process['memoryUsage']();let _0x5dd018=null;if(this[_0x5275a2(0x18b)][_0x5275a2(0x3ea)]>0x0){let _0x179bf6=0x0;for(const _0x446497 of this[_0x5275a2(0x18b)][_0x5275a2(0x624)]())_0x179bf6+=_0x446497[_0x5275a2(0x5b9)]||0x0;_0x5dd018={'count':this[_0x5275a2(0x18b)][_0x5275a2(0x3ea)],'heapUsed':_0x179bf6};}return{'rss':_0x527296[_0x5275a2(0x37a)],'heapUsed':_0x527296[_0x5275a2(0x5b9)],'heapTotal':_0x527296[_0x5275a2(0x4d8)],'external':_0x527296[_0x5275a2(0x4a0)],'cpuPct':this[_0x5275a2(0x54f)],'cpuWindowMs':this[_0x5275a2(0x35a)]??null,'threads':_0x5dd018,'at':_0x4d73fe};}[_0x42a870(0x303)](_0x13af51,_0x30a33d){const _0x3b75e4=_0x42a870;if(!_0x13af51||!_0x30a33d)return;this[_0x3b75e4(0x18b)][_0x3b75e4(0x2c2)](_0x13af51,_0x30a33d);}[_0x42a870(0x5ab)](_0x7480b4){const _0x3fbc3b=_0x42a870;this[_0x3fbc3b(0x18b)][_0x3fbc3b(0x5ed)](_0x7480b4);}['updateSupervisedChildStats'](_0x998655,_0x18c7fc,_0x3f61d6=undefined){const _0x45cfb6=_0x42a870,_0x222e56=this['_children'][_0x45cfb6(0x3aa)](_0x998655);if(!_0x222e56||!_0x18c7fc)return;if(_0x3f61d6!==undefined)_0x222e56[_0x45cfb6(0x2f8)]=_0x3f61d6;_0x222e56[_0x45cfb6(0x3de)]={'rss':_0x18c7fc[_0x45cfb6(0x37a)]??null,'heapUsed':_0x18c7fc[_0x45cfb6(0x5b9)]??null,'heapTotal':_0x18c7fc['heapTotal']??null,'external':_0x18c7fc[_0x45cfb6(0x4a0)]??null,'cpuPct':_0x18c7fc[_0x45cfb6(0x135)]??null,'cpuWindowMs':_0x18c7fc[_0x45cfb6(0x47a)]??null,'threads':_0x18c7fc['threads']??null,'claims':_0x18c7fc['claims']??null,'envsOpen':_0x18c7fc['envsOpen']??null,'at':Date[_0x45cfb6(0x16a)]()};}[_0x42a870(0x3e6)](){const _0x1503ce=_0x42a870,_0x1a7911=Date[_0x1503ce(0x16a)](),_0x25ef4f=this['okdb'][_0x1503ce(0x1cd)]||{},_0x4ec859=this[_0x1503ce(0x214)]||_0x1503ce(0x3b3);return{'nodeKey':this[_0x1503ce(0x3be)],'processKey':this[_0x1503ce(0x211)],'instanceId':this[_0x1503ce(0x4ba)],'pid':process[_0x1503ce(0x3e7)],'startedAt':this[_0x1503ce(0x36c)],'instanceStartedAt':this['_startedAt'],'ppid':typeof process[_0x1503ce(0x343)]===_0x1503ce(0x17c)?process['ppid']:null,'host':_0x297dda[_0x1503ce(0x12a)](),'supervisorKey':this[_0x1503ce(0x13a)]??null,'kind':_0x4ec859,'role':{'engines':!!_0x25ef4f['engines'],'asyncProcessors':!!_0x25ef4f[_0x1503ce(0x667)],'compaction':_0x25ef4f['compaction'],'http':_0x25ef4f[_0x1503ce(0x5d0)]},'listenAddr':this[_0x1503ce(0x648)]??null,'heartbeatAt':_0x1a7911,'expiresAt':_0x1a7911+_0x320f2c,'caps':this[_0x1503ce(0x243)](_0x4ec859,_0x25ef4f),'lifecycle':{'state':_0x1503ce(0xf4),'desiredVersionApplied':null},'meta':{...this[_0x1503ce(0x5ad)]},'processing':_0x25ef4f['asyncProcessors']?this[_0x1503ce(0x151)]():null,'stats':this[_0x1503ce(0x2a6)]()};}[_0x42a870(0x151)](){const _0x4b410e=_0x42a870,_0x35aa57=[];try{for(const [_0x2587a5,_0x34aecb]of this['okdb'][_0x4b410e(0x5bd)]){if(_0x2587a5[_0x4b410e(0x3cc)]('~'))continue;for(const _0x7840d of _0x34aecb['processor'][_0x4b410e(0xf1)]())_0x35aa57[_0x4b410e(0x614)]({..._0x7840d,'env':_0x2587a5});}}catch{}return{'policy':this['okdb'][_0x4b410e(0x34e)]??null,'processors':_0x35aa57};}[_0x42a870(0x201)](){const _0x17c1d6=_0x42a870;if(this[_0x17c1d6(0x1d6)])return!![];const _0x1ba4d1=this['okdb'][_0x17c1d6(0x323)];if(!_0x1ba4d1)return![];return this[_0x17c1d6(0x1d6)]=_0x1ba4d1[_0x17c1d6(0x2bc)](_0x421837,{'dupSort':![]}),this[_0x17c1d6(0x477)]=_0x1ba4d1[_0x17c1d6(0x2bc)](_0x2025ea,{'dupSort':![]}),!![];}[_0x42a870(0x25c)](){const _0x575644=_0x42a870;return!!this[_0x575644(0x1d6)];}[_0x42a870(0x21d)](_0x1fc893,_0xe43a76){const _0x57a40c=_0x42a870;if(!this[_0x57a40c(0x201)]())return null;return this[_0x57a40c(0x1d6)]['get'](_0x1fc893+'/'+_0xe43a76)??null;}[_0x42a870(0x252)](_0x3b2804,_0x50c6b9,_0x127357){const _0x13adf1=_0x42a870;if(!this[_0x13adf1(0x201)]())return null;const _0x240504=_0x3b2804+'/'+_0x50c6b9;let _0x153b03;return this[_0x13adf1(0x1d6)]['transactionSync'](()=>{const _0x6c90f6=_0x13adf1,_0x370921=this[_0x6c90f6(0x1d6)][_0x6c90f6(0x3aa)](_0x240504)||{'version':0x0};_0x153b03=(_0x370921[_0x6c90f6(0x2ea)]||0x0)+0x1,this[_0x6c90f6(0x1d6)][_0x6c90f6(0x42f)](_0x240504,{..._0x370921,..._0x127357,'version':_0x153b03,'updatedAt':Date[_0x6c90f6(0x16a)]()});}),_0x153b03;}[_0x42a870(0x5ea)](_0x5c135f){const _0x1dbb8b=_0x42a870;if(!this[_0x1dbb8b(0x201)]())return[];const _0x55f58c=_0x5c135f+'/',_0x5792e7=[];for(const {key:_0x16c1ee,value:_0x2e1bd2}of this['_desired']['getRange']({'start':_0x55f58c,'end':_0x55f58c+'ÿ'})){if(typeof _0x16c1ee!==_0x1dbb8b(0x380)||!_0x16c1ee['startsWith'](_0x55f58c))break;_0x5792e7['push']({'key':_0x16c1ee[_0x1dbb8b(0x45e)](_0x55f58c[_0x1dbb8b(0x2eb)]),'value':_0x2e1bd2});}return _0x5792e7;}[_0x42a870(0x3c9)](_0xd371db){if(!this['_ensureDesired']())return null;return this['_cmd']['get'](_0xd371db)??null;}[_0x42a870(0x1c3)](_0x478ebf,_0x1d9c8e,_0x2f772e={}){const _0x22faab=_0x42a870;if(!this['_ensureDesired']())return null;let _0x370b32;return this['_cmd'][_0x22faab(0x226)](()=>{const _0xf15677=_0x22faab,_0x1fe9bd=this[_0xf15677(0x477)]['get'](_0x478ebf)||{'epoch':0x0};_0x370b32=(_0x1fe9bd[_0xf15677(0x3f7)]||0x0)+0x1,this[_0xf15677(0x477)][_0xf15677(0x42f)](_0x478ebf,{..._0x1fe9bd,..._0x2f772e,'cmd':_0x1d9c8e,'epoch':_0x370b32,'updatedAt':Date[_0xf15677(0x16a)]()});}),_0x370b32;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x59d1c0,'nodeKey':_0x26e303,'logicalKey':_0x3d454f,'slotKey':_0x101cc0,'PROCESS_ENV':_0x128dd8,'NODE_TYPE':_0x22fe37},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x5d9114=_0x4b361c;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x1f270e=require$$0$4,{EVENTS:_0xaa13c7,CHANGE_ACTIONS:_0x18930f}=requireOkdbEnums(),{LOOP:_0x28c49f}=requireOkdbLoopMonitor(),_0x4715d4=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x7fe3d=0x5,_0x3364cd=0x2710;class _0x3e5c11 extends _0x1f270e{constructor(_0x48d816,_0x1f8013={}){const _0x231e4a=_0x2368;super(),this[_0x231e4a(0x2d3)]=_0x48d816,this[_0x231e4a(0x4ed)]=_0x1f8013['quantum']??_0x4715d4,this[_0x231e4a(0x126)]=_0x1f8013[_0x231e4a(0x5e2)]??_0x7fe3d,this['_dedupeMax']=_0x1f8013['dedupeMax']??_0x3364cd,this[_0x231e4a(0x1ba)]=![],this[_0x231e4a(0x561)]=new Map(),this['_baselines']=new Map(),this[_0x231e4a(0x2d5)]=new Map(),this['_flushTimer']=null,this[_0x231e4a(0x5a7)]=![],this['_seen']=new Set(),this[_0x231e4a(0x15f)]=_0x307536=>this[_0x231e4a(0x17d)](_0x307536),this[_0x231e4a(0x49d)]=_0x257552=>this['_handlePoke'](_0x257552),this[_0x231e4a(0x5db)]=()=>this[_0x231e4a(0x2e9)]();}[_0x5d9114(0x545)](){const _0x4d5c24=_0x5d9114;if(this['_started'])return;this[_0x4d5c24(0x1ba)]=!![];for(const [_0xcf6370,_0x4c6b2e]of this['okdb'][_0x4d5c24(0x5bd)]){if(_0xcf6370[_0x4d5c24(0x3cc)]('~'))continue;try{this[_0x4d5c24(0x5fd)][_0x4d5c24(0x2c2)](_0xcf6370,_0x4c6b2e[_0x4d5c24(0x65c)]()||0x0);}catch{}}const {events:_0x44a88a}=this[_0x4d5c24(0x2d3)];_0x44a88a['on'](_0xaa13c7[_0x4d5c24(0x293)],this[_0x4d5c24(0x15f)]),_0x44a88a['on'](_0xaa13c7['ITEM_UPDATE'],this[_0x4d5c24(0x15f)]),_0x44a88a['on'](_0xaa13c7[_0x4d5c24(0x3a5)],this[_0x4d5c24(0x15f)]),_0x44a88a['on'](_0xaa13c7['SYSTEM_POKE'],this[_0x4d5c24(0x49d)]),_0x44a88a[_0x4d5c24(0x292)](_0xaa13c7[_0x4d5c24(0x36e)],this['_onStop']);}[_0x5d9114(0x2e9)](){const _0x3c5db5=_0x5d9114;if(!this[_0x3c5db5(0x1ba)])return;this[_0x3c5db5(0x1ba)]=![];const {events:_0x1b24f7}=this['okdb'];_0x1b24f7[_0x3c5db5(0x5d8)](_0xaa13c7[_0x3c5db5(0x293)],this[_0x3c5db5(0x15f)]),_0x1b24f7[_0x3c5db5(0x5d8)](_0xaa13c7[_0x3c5db5(0x234)],this['_onItem']),_0x1b24f7[_0x3c5db5(0x5d8)](_0xaa13c7[_0x3c5db5(0x3a5)],this[_0x3c5db5(0x15f)]),_0x1b24f7[_0x3c5db5(0x5d8)](_0xaa13c7[_0x3c5db5(0x127)],this[_0x3c5db5(0x49d)]);try{_0x1b24f7['off'](_0xaa13c7[_0x3c5db5(0x36e)],this['_onStop']);}catch{}this['_flushTimer']&&(clearTimeout(this['_flushTimer']),this['_flushTimer']=null),this[_0x3c5db5(0x2d5)]['clear'](),this[_0x3c5db5(0x561)][_0x3c5db5(0x479)](),this[_0x3c5db5(0x5fd)][_0x3c5db5(0x479)](),this[_0x3c5db5(0x618)][_0x3c5db5(0x479)]();}[_0x5d9114(0x117)](_0x19bc3f,_0x4ada7a,_0x8126e2,_0x254240){return _0x19bc3f+'\x00'+_0x4ada7a+'\x00'+_0x8126e2+'\x00'+_0x254240;}[_0x5d9114(0x5ac)](_0x189513,_0x832dc0,_0x389f9a,_0x3b41da){const _0x2933b9=_0x5d9114,_0x4eb80f=this['_dedupeKey'](_0x189513,_0x832dc0,_0x389f9a,_0x3b41da);if(this[_0x2933b9(0x618)]['has'](_0x4eb80f))return![];this[_0x2933b9(0x618)][_0x2933b9(0x61d)](_0x4eb80f);if(this[_0x2933b9(0x618)][_0x2933b9(0x3ea)]>this[_0x2933b9(0x1e3)]){const _0x5ac00e=this[_0x2933b9(0x618)][_0x2933b9(0x624)]()[_0x2933b9(0x419)]()['value'];this[_0x2933b9(0x618)]['delete'](_0x5ac00e);}return!![];}[_0x5d9114(0x17d)](_0x2f57f6){const _0x5e144e=_0x5d9114;if(!this[_0x5e144e(0x1ba)]||!_0x2f57f6)return;const {env:_0x3ff3cd,type:_0x4b618e,key:_0x44c2b7,clock:_0x491291,origin:_0x3542ce,action:_0x3430e6,newValue:_0x48ba28,oldValue:_0x56869c}=_0x2f57f6;if(_0x3ff3cd==null||_0x4b618e==null||_0x44c2b7==null)return;if(typeof _0x3ff3cd===_0x5e144e(0x380)&&_0x3ff3cd['startsWith']('~'))return;if(typeof _0x4b618e===_0x5e144e(0x380)&&_0x4b618e[_0x5e144e(0x3cc)]('~'))return;if(!this[_0x5e144e(0x5ac)](_0x3ff3cd,_0x4b618e,_0x44c2b7,_0x491291))return;const _0x100883=_0x3430e6===_0x18930f['REMOVE']?_0x5e144e(0x1b1):_0x5e144e(0x42f);this[_0x5e144e(0x464)](_0x5e144e(0x19e),{'env':_0x3ff3cd,'type':_0x4b618e,'key':_0x44c2b7,'op':_0x100883,'clock':_0x491291,'origin':_0x3542ce,'value':_0x100883===_0x5e144e(0x1b1)?null:_0x48ba28,'prevValue':_0x56869c});}['_handlePoke'](_0x147796){const _0x25afe5=_0x5d9114;if(!this[_0x25afe5(0x1ba)])return;if(!_0x147796||typeof _0x147796[_0x25afe5(0x46e)]!==_0x25afe5(0x380)||typeof _0x147796[_0x25afe5(0x49b)]!==_0x25afe5(0x380))return;const {env:_0x46c0ec,type:_0x45480a}=_0x147796;if(_0x46c0ec[_0x25afe5(0x3cc)]('~')||_0x45480a['startsWith']('~'))return;this[_0x25afe5(0x2d5)][_0x25afe5(0x2c2)](_0x46c0ec+'\x00'+_0x45480a,{'env':_0x46c0ec,'type':_0x45480a}),this['_scheduleFlush']();}['_scheduleFlush'](){const _0x42d346=_0x5d9114;if(this[_0x42d346(0x3af)])return;const _0x4d3fe2=()=>{const _0x363e3d=_0x42d346;this[_0x363e3d(0x3af)]=null,this[_0x363e3d(0x1b0)]()[_0x363e3d(0x255)](()=>{});};this[_0x42d346(0x3af)]=setTimeout(_0x4d3fe2,this[_0x42d346(0x126)]>0x0?this[_0x42d346(0x126)]:0x0);}async[_0x5d9114(0x1b0)](){const _0x176c58=_0x5d9114;if(this['_draining']){this[_0x176c58(0x244)]();return;}this['_draining']=!![];try{const _0x1f1bc9=[...this[_0x176c58(0x2d5)]['values']()];this[_0x176c58(0x2d5)][_0x176c58(0x479)]();let _0x4fe65d=![];for(const {env:_0xc9f7b2,type:_0x15c17b}of _0x1f1bc9){try{const _0x4c5fad=await this['_drainOne'](_0xc9f7b2,_0x15c17b);if(_0x4c5fad)_0x4fe65d=!![];}catch{this['_pending'][_0x176c58(0x2c2)](_0xc9f7b2+'\x00'+_0x15c17b,{'env':_0xc9f7b2,'type':_0x15c17b}),_0x4fe65d=!![];}}if(_0x4fe65d||this[_0x176c58(0x2d5)]['size']>0x0)this[_0x176c58(0x244)]();}finally{this[_0x176c58(0x5a7)]=![];}}async['_drainOne'](_0x550865,_0x1eb598){const _0x584f69=_0x5d9114,_0x505a12=await this[_0x584f69(0x2d3)]['_openEnvLazy'](_0x550865),_0x253bc9=_0x550865+'\x00'+_0x1eb598;!this['_cursors']['has'](_0x253bc9)&&(!this['_baselines']['has'](_0x550865)&&this[_0x584f69(0x5fd)][_0x584f69(0x2c2)](_0x550865,_0x505a12['getClock']()||0x0),this[_0x584f69(0x561)]['set'](_0x253bc9,this[_0x584f69(0x5fd)][_0x584f69(0x3aa)](_0x550865)));const _0x3d1383=this[_0x584f69(0x561)][_0x584f69(0x3aa)](_0x253bc9),_0x1b431b=_0x505a12['getClock'](_0x1eb598)||0x0;if(_0x1b431b<=_0x3d1383)return![];const _0x201616=_0x3d1383+this['_quantum'],_0x772b08=Math['min'](_0x1b431b,_0x201616),_0x33e32f=_0x28c49f['enabled']?_0x28c49f[_0x584f69(0x16a)]():0x0,_0x52eefa=Array[_0x584f69(0x36d)](_0x505a12[_0x584f69(0x5e0)](_0x1eb598,_0x3d1383+0x1,_0x772b08));let _0x32ed64=_0x3d1383;for(const _0x25a34e of _0x52eefa){const {clock:_0x3bcb64,key:_0x341b1a,action:_0x23b699,origin:_0x486659}=_0x25a34e;if(_0x3bcb64>_0x32ed64)_0x32ed64=_0x3bcb64;if(_0x341b1a==null)continue;if(!this['_markSeen'](_0x550865,_0x1eb598,_0x341b1a,_0x3bcb64))continue;let _0x5b3081,_0x2b4261;if(_0x23b699===_0x18930f[_0x584f69(0x1d7)])_0x5b3081=_0x584f69(0x1b1),_0x2b4261=null;else{const _0x1047a3=_0x505a12[_0x584f69(0x3aa)](_0x1eb598,_0x341b1a);_0x1047a3==null?(_0x5b3081='remove',_0x2b4261=null):(_0x5b3081=_0x584f69(0x42f),_0x2b4261=_0x1047a3);}this[_0x584f69(0x464)]('change',{'env':_0x550865,'type':_0x1eb598,'key':_0x341b1a,'op':_0x5b3081,'clock':_0x3bcb64,'origin':_0x486659,'value':_0x2b4261});}if(_0x28c49f[_0x584f69(0x26c)])_0x28c49f[_0x584f69(0x480)]('feed:'+_0x550865+':'+_0x1eb598,_0x28c49f[_0x584f69(0x16a)]()-_0x33e32f,'n='+_0x52eefa[_0x584f69(0x2eb)]);return this['_cursors'][_0x584f69(0x2c2)](_0x253bc9,Math[_0x584f69(0x47e)](_0x32ed64,_0x772b08)),_0x505a12[_0x584f69(0x65c)](_0x1eb598)>_0x772b08;}[_0x5d9114(0x626)](){const _0x2dc7c6=_0x5d9114;return{'started':this[_0x2dc7c6(0x1ba)],'quantum':this[_0x2dc7c6(0x4ed)],'flushDebounce':this['_flushDebounce'],'cursors':Object[_0x2dc7c6(0x3e5)]([...this[_0x2dc7c6(0x561)][_0x2dc7c6(0x427)]()][_0x2dc7c6(0x601)](([_0x43f316,_0x332e6b])=>[_0x43f316[_0x2dc7c6(0x38b)]('\x00',':'),_0x332e6b])),'pending':this[_0x2dc7c6(0x2d5)][_0x2dc7c6(0x3ea)],'seen':this[_0x2dc7c6(0x618)][_0x2dc7c6(0x3ea)]};}}return _0x3e5c11[_0x5d9114(0xe5)]=_0x4715d4,okdbChangefeed={'OKDBChangefeed':_0x3e5c11},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x40f568=_0x4b361c;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x5468af=require$$1$2,_0x376275=require$$1,{EVENTS:_0x54a1fc}=requireOkdbEnums(),_0x3fef7c=require$$0,{slotKey:_0xf72e58}=requireOkdbProcessRegistry(),_0xb6955d=0xfa,_0x16d07c=0xfa0,_0x1e1416=0x5,_0x4cae38=0x2710,_0x10ac10=0xbb8,_0x5b9bf5=0x7d0,_0x1d8ea3=_0x40f568(0x131),_0x102d63=_0x40f568(0x18c),_0xc2631='log',_0x4c5b04=_0x40f568(0x3de),_0x30b6a4=[_0x54a1fc['VIEW_PROGRESS'],_0x54a1fc[_0x40f568(0x574)],_0x54a1fc[_0x40f568(0x47b)],_0x54a1fc['FTS_RESET'],_0x54a1fc[_0x40f568(0x465)],_0x54a1fc[_0x40f568(0x62b)],_0x54a1fc[_0x40f568(0x265)],_0x54a1fc[_0x40f568(0x2b9)],_0x40f568(0x5e5),_0x40f568(0x572),'processor:error',_0x40f568(0x50b),_0x40f568(0x4c9),_0x40f568(0x20c)],_0x4d710c=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0;function _0x40ea2b({workers:_0x2fc46c,makeOkdb:_0x19dfc6,port:_0x5051b3,primaryOkdb:_0x12a268,childEntry:childEntry=![],workerEnv:workerEnv=null}={}){const _0x162a47=_0x40f568;if(_0x5468af[_0x162a47(0x48f)])return childEntry&&_0x5468af[_0x162a47(0x5cc)]({'exec':_0x376275[_0x162a47(0x3a4)](__dirname,_0x162a47(0x633)),'args':[],'execArgv':((()=>{const _0x45a56c=_0x162a47,_0x5133b7=[];for(let _0x171d1c=0x0;_0x171d1c<process[_0x45a56c(0x56a)][_0x45a56c(0x2eb)];_0x171d1c++){const _0x3d6e30=process['execArgv'][_0x171d1c];if(_0x3d6e30['startsWith']('--test')||_0x3d6e30[_0x45a56c(0x3cc)](_0x45a56c(0x3ed))||_0x3d6e30[_0x45a56c(0x3cc)](_0x45a56c(0x228)))continue;if(_0x3d6e30==='-e'||_0x3d6e30===_0x45a56c(0x17a)||_0x3d6e30==='-p'||_0x3d6e30===_0x45a56c(0x297)){_0x171d1c++;continue;}_0x5133b7[_0x45a56c(0x614)](_0x3d6e30);}return _0x5133b7;})())}),_0x59eeef({'workers':_0x2fc46c,'port':_0x5051b3,'primaryOkdb':_0x12a268,'workerEnv':workerEnv});return _0x4374ac({'makeOkdb':_0x19dfc6,'port':_0x5051b3});}function _0x59eeef({workers:_0x1626b0,port:_0x1b776b,primaryOkdb:_0x4f7da7,workerEnv:_0x5b6c74}){const _0x7eaec9=_0x40f568,_0x37706a=new Map(),_0x4f062c=new Map();let _0x2096bb=![];const _0x42692c=_0x29a3b3=>_0x29a3b3?.[_0x7eaec9(0x31a)],_0x56d543=_0x1ad2d1=>{const _0x17d7a3=_0x7eaec9,_0x202acb=_0x5468af['fork']({...process.env,..._0x5b6c74||{},'OKDB_CLUSTER_SLOT':String(_0x1ad2d1)});return _0x202acb[_0x17d7a3(0x31a)]=_0x1ad2d1,_0x37706a[_0x17d7a3(0x2c2)](_0x202acb[_0x17d7a3(0x22a)][_0x17d7a3(0x3e7)],{'worker':_0x202acb,'startedAt':Date[_0x17d7a3(0x16a)](),'slot':_0x1ad2d1}),_0x202acb['on'](_0x17d7a3(0x31b),_0x36eb3a=>{const _0x301393=_0x17d7a3;console[_0x301393(0x4f7)](_0x301393(0x1a9)+_0x202acb['process'][_0x301393(0x3e7)]+_0x301393(0x5af)+(_0x36eb3a?.['message']??_0x36eb3a));}),_0x202acb['on'](_0x17d7a3(0x4ac),()=>_0x3defd0()),_0x202acb;},_0x50e228=_0x103cc6=>{const _0x41e35b=_0x7eaec9;for(const {worker:_0x4ae217}of _0x37706a[_0x41e35b(0x624)]()){if(_0x4ae217['isDead']()||!_0x4ae217[_0x41e35b(0x389)]())continue;try{_0x4ae217['send'](_0x103cc6);}catch{}}};_0x4f7da7?.[_0x7eaec9(0x17b)]?.({'kind':_0x7eaec9(0x608),'listenAddr':':'+_0x1b776b})[_0x7eaec9(0x255)](()=>{}),_0x4f7da7?.[_0x7eaec9(0x532)]?.[_0x7eaec9(0x5a1)]?.({'workersConfigured':_0x1626b0});const _0x20c757={'engines':![],'asyncProcessors':![],'compaction':_0x7eaec9(0x573),'http':!![]},_0x3defd0=()=>{const _0x45e08e=_0x7eaec9,_0x1c5f7b=_0x4f7da7?.[_0x45e08e(0x532)];if(!_0x1c5f7b||!_0x1c5f7b[_0x45e08e(0x376)])return;const _0x31eef2=_0x1c5f7b['selfKey'];for(const {worker:_0xe936c0,startedAt:_0x53d54f,slot:_0x4d1264,stats:_0x955b45}of _0x37706a[_0x45e08e(0x624)]()){if(_0xe936c0[_0x45e08e(0xf6)]())continue;const _0x4ee4b0=_0x1c5f7b[_0x45e08e(0x25c)]?.()&&_0x1c5f7b[_0x45e08e(0x21d)]('slot',_0x5a0a58(_0x4d1264))?.[_0x45e08e(0x1e0)]===!![];_0x1c5f7b[_0x45e08e(0x2c3)]({'pid':_0xe936c0['process'][_0x45e08e(0x3e7)],'startedAt':_0x53d54f,'kind':_0x45e08e(0x311),'supervisorKey':_0x31eef2,'slot':_0x4d1264,'slotKey':_0x5a0a58(_0x4d1264),'role':_0x20c757,'listenAddr':':'+_0x1b776b,'lifecycle':_0x4ee4b0?_0x45e08e(0x1f7):_0x45e08e(0xf4),'stats':_0x955b45??null})['catch'](()=>{});}},_0x5a0a58=_0x1934e6=>_0xf72e58(_0x7eaec9(0x1e9)+_0x1b776b,_0x1934e6),_0x3de097=_0xacb531=>{const _0x41554b=_0x7eaec9,_0x21711e=_0x4f7da7?.['processes'];if(!_0x21711e?.['hasDesired']?.())return![];return _0x21711e[_0x41554b(0x21d)](_0x41554b(0x3df),_0x5a0a58(_0xacb531))?.[_0x41554b(0x1e0)]===!![];};for(let _0x5efc6d=0x0;_0x5efc6d<_0x1626b0;_0x5efc6d++){const _0x1b45ba=_0x3de097(_0x5efc6d);_0x4f062c[_0x7eaec9(0x2c2)](_0x5efc6d,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x1b45ba,'respawnTimer':null}),_0x1b45ba?console[_0x7eaec9(0x4f7)](_0x7eaec9(0x215)+_0x5efc6d+_0x7eaec9(0x130)):_0x56d543(_0x5efc6d);}const _0x226817=()=>{const _0x3a7b65=_0x7eaec9,_0x1191ed=_0x4f7da7?.[_0x3a7b65(0x532)];if(!_0x1191ed?.[_0x3a7b65(0x376)]||!_0x1191ed['hasDesired']?.())return;for(const [_0x192d43,_0x4ad7d8]of _0x4f062c[_0x3a7b65(0x427)]()){const _0x57264b=_0x1191ed[_0x3a7b65(0x21d)](_0x3a7b65(0x3df),_0x5a0a58(_0x192d43)),_0x38ed1f=_0x57264b?.[_0x3a7b65(0x1e0)]===!![],_0x503ce3=_0x57264b?.[_0x3a7b65(0x269)]===!![];if(_0x38ed1f&&!_0x4ad7d8['dead']){_0x4ad7d8[_0x3a7b65(0x4a4)]=!![];_0x4ad7d8[_0x3a7b65(0x2a9)]&&(clearTimeout(_0x4ad7d8[_0x3a7b65(0x2a9)]),_0x4ad7d8['respawnTimer']=null);for(const {worker:_0x2a3db8}of _0x37706a[_0x3a7b65(0x624)]()){if(_0x42692c(_0x2a3db8)!==_0x192d43||_0x2a3db8[_0x3a7b65(0xf6)]())continue;try{if(_0x503ce3)_0x2a3db8[_0x3a7b65(0x22a)][_0x3a7b65(0x269)]('SIGKILL');else _0x2a3db8[_0x3a7b65(0x389)]()&&_0x2a3db8[_0x3a7b65(0x54d)]();}catch{}}console[_0x3a7b65(0x4f7)](_0x3a7b65(0x5d3)+(_0x503ce3?_0x3a7b65(0x315):_0x3a7b65(0x339))+_0x3a7b65(0x309)+_0x192d43+'\x20(durable\x20desired-state)');}else{if(!_0x38ed1f&&_0x4ad7d8[_0x3a7b65(0x4a4)]&&_0x57264b){_0x4ad7d8[_0x3a7b65(0x4a4)]=![],_0x4ad7d8['deaths']=[],_0x4ad7d8[_0x3a7b65(0x50f)]=0x0;const _0x50d0d9=[..._0x37706a['values']()][_0x3a7b65(0x28c)](({worker:_0x1522a5})=>_0x42692c(_0x1522a5)===_0x192d43&&!_0x1522a5['isDead']());!_0x50d0d9&&!_0x2096bb&&(_0x56d543(_0x192d43),console['log'](_0x3a7b65(0x5aa)+_0x192d43));}}}},_0x25750c=()=>{try{_0x226817();}catch{}};_0x4f7da7?.['events']?.['on']?.(_0x54a1fc[_0x7eaec9(0x425)],_0x25750c);const _0x4a4971=[];if(_0x4f7da7?.[_0x7eaec9(0x4e5)]?.['on'])for(const _0x48b483 of _0x30b6a4){const _0x444c9d=_0x48b2b6=>{_0x50e228({[_0x1d8ea3]:_0x102d63,'event':_0x48b483,'data':_0x48b2b6??{}});};_0x4f7da7[_0x7eaec9(0x4e5)]['on'](_0x48b483,_0x444c9d),_0x4a4971[_0x7eaec9(0x614)]({'event':_0x48b483,'handler':_0x444c9d});}const _0x2c48b5=setInterval(()=>{_0x226817(),_0x3defd0();},_0x4d710c);_0x2c48b5['unref']?.();const _0x1deb65=(_0x15402a,_0x3be158)=>{const _0x3a8dde=_0x7eaec9;if(!_0x3be158||typeof _0x3be158!=='object'||_0x3be158[_0x1d8ea3]!==_0xc2631)return;if(!_0x4f7da7?.[_0x3a8dde(0x4f7)]?.['ingest'])return;const _0x247aa7=_0x3be158[_0x3a8dde(0x5ff)]||{};_0x4f7da7[_0x3a8dde(0x4f7)][_0x3a8dde(0x32e)]({..._0x247aa7,'msg':'[w'+_0x3be158[_0x3a8dde(0x3df)]+']\x20'+(_0x247aa7[_0x3a8dde(0x3dc)]??''),'meta':{..._0x247aa7[_0x3a8dde(0x664)]||{},'worker':_0x3be158[_0x3a8dde(0x3df)],'workerPid':_0x3be158[_0x3a8dde(0x3e7)]}});};_0x5468af['on'](_0x7eaec9(0x29c),_0x1deb65);const _0x1d07d1=(_0xa1861c,_0x4ed5f1)=>{const _0x392711=_0x7eaec9;if(!_0x4ed5f1||typeof _0x4ed5f1!==_0x392711(0x20e)||_0x4ed5f1[_0x1d8ea3]!==_0x4c5b04)return;const _0xbda037=_0x37706a[_0x392711(0x3aa)](_0xa1861c[_0x392711(0x22a)][_0x392711(0x3e7)]);if(_0xbda037)_0xbda037[_0x392711(0x3de)]={..._0x4ed5f1['stats'],'at':Date[_0x392711(0x16a)]()};};_0x5468af['on'](_0x7eaec9(0x29c),_0x1d07d1),_0x5468af['on'](_0x7eaec9(0x542),(_0x43c0f1,_0x5b2131,_0x39da6b)=>{const _0x3da6ca=_0x7eaec9,_0x33e0da=_0x43c0f1[_0x3da6ca(0x22a)][_0x3da6ca(0x3e7)],_0x327e6b=_0x42692c(_0x43c0f1),_0x5bc400=_0x37706a[_0x3da6ca(0x3aa)](_0x33e0da);if(_0x5bc400&&_0x4f7da7?.[_0x3da6ca(0x532)])_0x4f7da7['processes']['removeNode'](_0x33e0da+':'+_0x5bc400['startedAt'])[_0x3da6ca(0x255)](()=>{});_0x37706a[_0x3da6ca(0x5ed)](_0x33e0da),console['log'](_0x3da6ca(0x1a9)+_0x33e0da+_0x3da6ca(0x526)+(_0x327e6b??'?')+_0x3da6ca(0x216)+(_0x3da6ca(0x141)+_0x5b2131+_0x3da6ca(0x460)+(_0x39da6b??_0x3da6ca(0x190))+_0x3da6ca(0x347)+_0x37706a[_0x3da6ca(0x3ea)]+_0x3da6ca(0x4f4))),_0x3defd0();if(_0x2096bb||_0x327e6b==null)return;const _0x1e0fa2=_0x4f062c['get'](_0x327e6b);if(!_0x1e0fa2||_0x1e0fa2[_0x3da6ca(0x4a4)])return;const _0x4463ce=Date[_0x3da6ca(0x16a)]();_0x1e0fa2[_0x3da6ca(0x55d)][_0x3da6ca(0x614)](_0x4463ce),_0x1e0fa2['deaths']=_0x1e0fa2[_0x3da6ca(0x55d)][_0x3da6ca(0x1c6)](_0x67ca15=>_0x4463ce-_0x67ca15<=_0x4cae38);if(_0x1e0fa2['deaths']['length']>=_0x1e1416){_0x1e0fa2[_0x3da6ca(0x4a4)]=!![],console['error']('[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot='+_0x327e6b+'\x20died\x20'+_0x1e0fa2['deaths'][_0x3da6ca(0x2eb)]+_0x3da6ca(0x3ff)+(_0x4cae38+_0x3da6ca(0x45a)+_0x37706a[_0x3da6ca(0x3ea)]+_0x3da6ca(0x1af)));return;}_0x1e0fa2[_0x3da6ca(0x50f)]++;const _0x3d0713=Math[_0x3da6ca(0x138)](_0x16d07c,_0xb6955d*0x2**(_0x1e0fa2['consecutiveFailures']-0x1));console['log']('[okdb-cluster]\x20respawning\x20worker\x20slot='+_0x327e6b+'\x20in\x20'+_0x3d0713+_0x3da6ca(0x3d8)+_0x1e0fa2[_0x3da6ca(0x50f)]+')'),_0x1e0fa2[_0x3da6ca(0x2a9)]=setTimeout(()=>{const _0x4dbc0b=_0x3da6ca;_0x1e0fa2[_0x4dbc0b(0x2a9)]=null;if(_0x2096bb||_0x1e0fa2[_0x4dbc0b(0x4a4)])return;const _0x5028c2=_0x56d543(_0x327e6b);_0x5028c2[_0x4dbc0b(0x292)](_0x4dbc0b(0x2a0),()=>{const _0x127263=_0x4dbc0b;if(_0x4f062c[_0x127263(0x3aa)](_0x327e6b)===_0x1e0fa2)_0x1e0fa2['consecutiveFailures']=0x0;});},_0x3d0713),_0x1e0fa2['respawnTimer']['unref']?.();});const _0x27c711=[..._0x37706a[_0x7eaec9(0x2f1)]()];console[_0x7eaec9(0x4f7)](_0x7eaec9(0x45f)+process['pid']+_0x7eaec9(0x50a)+_0x1626b0+'\x20HTTP\x20server(s)\x20on\x20port\x20'+_0x1b776b+':\x20'+('['+_0x27c711[_0x7eaec9(0x3a4)](',\x20')+']'));const _0x4ffd24={'_isClusterController':!![],'port':_0x1b776b,'primaryOkdb':_0x4f7da7??null,'status'(){const _0x1b0f0e=_0x7eaec9;return{'clustered':!![],'primaryPid':process[_0x1b0f0e(0x3e7)],'port':_0x1b776b,'primaryRole':_0x4f7da7?.['role']??null,'processorPid':_0x4f7da7?process[_0x1b0f0e(0x3e7)]:null,'workers':[..._0x37706a[_0x1b0f0e(0x624)]()][_0x1b0f0e(0x601)](({worker:_0x5c9aed})=>({'pid':_0x5c9aed['process'][_0x1b0f0e(0x3e7)],'id':_0x5c9aed['id'],'dead':_0x5c9aed[_0x1b0f0e(0xf6)]()}))};},async 'close'(){const _0x5bb6e2=_0x7eaec9;_0x2096bb=!![];for(const _0x369539 of _0x4f062c['values']()){_0x369539[_0x5bb6e2(0x4a4)]=!![],_0x369539['respawnTimer']&&(clearTimeout(_0x369539['respawnTimer']),_0x369539['respawnTimer']=null);}clearInterval(_0x2c48b5),_0x5468af['off'](_0x5bb6e2(0x29c),_0x1deb65),_0x5468af[_0x5bb6e2(0x5d8)]('message',_0x1d07d1),_0x4f7da7?.[_0x5bb6e2(0x4e5)]?.[_0x5bb6e2(0x5d8)]?.(_0x54a1fc['SYSTEM_PROC'],_0x25750c);if(_0x4f7da7?.['events']?.['off'])for(const {event:_0x31f394,handler:_0x56cf38}of _0x4a4971){try{_0x4f7da7[_0x5bb6e2(0x4e5)][_0x5bb6e2(0x5d8)](_0x31f394,_0x56cf38);}catch{}}_0x4a4971[_0x5bb6e2(0x2eb)]=0x0;const _0x5eecad=[..._0x37706a[_0x5bb6e2(0x624)]()]['map'](({worker:_0x1f7829})=>_0x1f7829);if(_0x5eecad['length']===0x0)return;await Promise[_0x5bb6e2(0x260)](_0x5eecad['map'](_0x505c93=>new Promise(_0x482fb1=>{const _0x3f9a98=_0x5bb6e2;if(_0x505c93[_0x3f9a98(0xf6)]()){_0x482fb1();return;}let _0x3fdcd7=![];const _0x44a452=()=>{if(_0x3fdcd7)return;_0x3fdcd7=!![];if(_0x4f59ba)clearTimeout(_0x4f59ba);_0x482fb1();};_0x505c93['once'](_0x3f9a98(0x542),_0x44a452);const _0x4f59ba=setTimeout(()=>{try{_0x505c93['process']['kill']();}catch{}},_0x10ac10+0x1f4);_0x4f59ba[_0x3f9a98(0x386)]?.();try{_0x505c93[_0x3f9a98(0x54d)]();}catch{try{_0x505c93[_0x3f9a98(0x22a)]['kill']();}catch{}}})));}};return _0x4ffd24;}async function _0x4374ac({makeOkdb:_0x5380be,port:_0x5571e2}){const _0x5f4ca5=await _0x5380be();return _0x7d76e7(_0x5f4ca5),_0x5f4ca5['http']['listen'](_0x5571e2);}function _0x7d76e7(_0xf9a827){const _0x11ed7e=_0x40f568;if(!_0xf9a827||_0xf9a827[_0x11ed7e(0x24f)])return;_0xf9a827[_0x11ed7e(0x24f)]=!![];try{const {OKDBChangefeed:_0x5e84d1}=requireOkdbChangefeed(),_0x4f4703=_0xf9a827[_0x11ed7e(0x278)];if(_0x4f4703&&typeof _0x4f4703[_0x11ed7e(0x535)]===_0x11ed7e(0x26b)){const _0x45ae82=new _0x5e84d1(_0xf9a827);_0x45ae82[_0x11ed7e(0x545)](),_0x4f4703['attachFeed'](_0x45ae82),_0xf9a827['_changefeed']=_0x45ae82;}}catch(_0x5829c){_0xf9a827[_0x11ed7e(0x4f7)]?.[_0x11ed7e(0x27e)]?.('[okdb-cluster]\x20change-feed\x20init\x20failed:\x20'+(_0x5829c?.[_0x11ed7e(0x29c)]??_0x5829c),{'feature':_0x11ed7e(0xfe)});}const _0x5205b5=_0x374afb=>{const _0x1faf7b=_0x11ed7e;if(!_0x374afb||typeof _0x374afb!==_0x1faf7b(0x20e)||_0x374afb[_0x1d8ea3]==null)return;if(_0x374afb[_0x1d8ea3]===_0x102d63)try{_0xf9a827['_adminRelay']?.[_0x1faf7b(0x2ce)]?.(_0x374afb[_0x1faf7b(0x66c)],_0x374afb[_0x1faf7b(0x206)]);}catch{}};process['on'](_0x11ed7e(0x29c),_0x5205b5),_0xf9a827[_0x11ed7e(0x3db)]=_0x5205b5;{let _0x437525=process[_0x11ed7e(0x2e1)](),_0x551144=Date[_0x11ed7e(0x16a)]();const _0x163fb1=()=>{const _0x3b1c68=_0x11ed7e;if(typeof process[_0x3b1c68(0x270)]!==_0x3b1c68(0x26b)||!process[_0x3b1c68(0x15c)])return;const _0x43609e=Date[_0x3b1c68(0x16a)](),_0x4290ad=process[_0x3b1c68(0x2e1)](),_0x5864a8=(_0x43609e-_0x551144)*0x3e8,_0x1abf70=_0x4290ad[_0x3b1c68(0x4fd)]-_0x437525[_0x3b1c68(0x4fd)]+(_0x4290ad[_0x3b1c68(0x268)]-_0x437525[_0x3b1c68(0x268)]),_0xc7a131=_0x5864a8>0x0?Math[_0x3b1c68(0x138)](0x64,Math[_0x3b1c68(0x1df)](_0x1abf70/(_0x5864a8*(_0x3fef7c[_0x3b1c68(0x537)]()['length']||0x1))*0x64)):0x0;_0x437525=_0x4290ad,_0x551144=_0x43609e;const _0x20692c=process[_0x3b1c68(0x402)]();try{process[_0x3b1c68(0x270)]({[_0x1d8ea3]:_0x4c5b04,'stats':{'rss':_0x20692c['rss'],'heapUsed':_0x20692c[_0x3b1c68(0x5b9)],'heapTotal':_0x20692c[_0x3b1c68(0x4d8)],'external':_0x20692c[_0x3b1c68(0x4a0)],'cpuPct':_0xc7a131,'cpuWindowMs':Math[_0x3b1c68(0x1df)](_0x5864a8/0x3e8)||null}});}catch{}},_0x258e65=Math[_0x11ed7e(0x47e)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0xcd1c50=setInterval(_0x163fb1,_0x258e65);_0xcd1c50[_0x11ed7e(0x386)]?.(),_0x163fb1();}let _0x488ea5=![];const _0x183a99=async _0x5a9262=>{const _0x7ca366=_0x11ed7e;if(_0x488ea5)return;_0x488ea5=!![];const _0x5bfe6b=setTimeout(()=>process[_0x7ca366(0x542)](_0x5a9262),_0x10ac10);_0x5bfe6b[_0x7ca366(0x386)]?.();try{await _0xf9a827[_0x7ca366(0x241)]?.();}catch{}process[_0x7ca366(0x542)](_0x5a9262);};process['on'](_0x11ed7e(0x54d),()=>_0x183a99(0x0));if(process[_0x11ed7e(0x2e3)]!==_0x11ed7e(0x405)){const _0x56918b=setInterval(()=>{if(process['ppid']===0x1)_0x183a99(0x0);},_0x5b9bf5);_0x56918b[_0x11ed7e(0x386)]?.(),_0xf9a827['_clusterOrphanWatch']=_0x56918b;}}return okdbCluster={'runClustered':_0x40ea2b,'attachWorkerCluster':_0x7d76e7},okdbCluster;}var okdbHttp={'exports':{}},okdbMetrics,hasRequiredOkdbMetrics;function requireOkdbMetrics(){const _0x589270=_0x4b361c;if(hasRequiredOkdbMetrics)return okdbMetrics;hasRequiredOkdbMetrics=0x1;const _0x1d2355=0x3c;function _0x18ff3e(){return{'requests':0x0,'reads':0x0,'writes':0x0,'errors':0x0,'readMs':0x0,'writeMs':0x0};}class _0xf56716{constructor(){const _0x37d6f6=_0x2368;this[_0x37d6f6(0x51d)]=0x0,this[_0x37d6f6(0x57b)]=0x0,this[_0x37d6f6(0x165)]=0x0,this['_totalErrors']=0x0,this[_0x37d6f6(0x516)]=0x0,this['_totalWriteMs']=0x0,this['_buckets']=Array[_0x37d6f6(0x36d)]({'length':_0x1d2355},_0x18ff3e),this[_0x37d6f6(0x1d2)]=0x0,this[_0x37d6f6(0x599)]=Date[_0x37d6f6(0x16a)](),this[_0x37d6f6(0x301)]=setInterval(()=>this[_0x37d6f6(0x196)](),0x3e8);if(this[_0x37d6f6(0x301)][_0x37d6f6(0x386)])this[_0x37d6f6(0x301)][_0x37d6f6(0x386)]();}['_rotateBucket'](){const _0x46d9ce=_0x2368;this[_0x46d9ce(0x1d2)]=(this['_bucketIdx']+0x1)%_0x1d2355,this[_0x46d9ce(0x659)][this[_0x46d9ce(0x1d2)]]=_0x18ff3e(),this[_0x46d9ce(0x599)]=Date['now']();}[_0x589270(0x360)](_0x3c03aa,_0x45c09e,_0x3cff75){const _0x314dac=_0x589270,_0x5e8485=/^(POST|PUT|PATCH|DELETE)$/i[_0x314dac(0x30d)](_0x3c03aa),_0x200380=this[_0x314dac(0x659)][this['_bucketIdx']];this[_0x314dac(0x51d)]++,_0x200380[_0x314dac(0x22e)]++,_0x3cff75&&(this[_0x314dac(0x52a)]++,_0x200380[_0x314dac(0x444)]++),_0x5e8485?(this['_totalWrites']++,this[_0x314dac(0x43f)]+=_0x45c09e,_0x200380[_0x314dac(0x2a5)]++,_0x200380['writeMs']+=_0x45c09e):(this['_totalReads']++,this[_0x314dac(0x516)]+=_0x45c09e,_0x200380[_0x314dac(0x54c)]++,_0x200380[_0x314dac(0x43c)]+=_0x45c09e);}['stats'](){const _0x58a58d=_0x589270;let _0x1b7c12=0x0,_0x5d586e=0x0,_0x409879=0x0,_0x3c3374=0x0,_0x4879f0=0x0,_0xcba8a0=0x0;for(const _0x298637 of this['_buckets']){_0x1b7c12+=_0x298637[_0x58a58d(0x22e)],_0x5d586e+=_0x298637[_0x58a58d(0x54c)],_0x409879+=_0x298637[_0x58a58d(0x2a5)],_0x3c3374+=_0x298637[_0x58a58d(0x444)],_0x4879f0+=_0x298637[_0x58a58d(0x43c)],_0xcba8a0+=_0x298637[_0x58a58d(0x2ba)];}const _0x1af44d=_0x1d2355;return{'lifetime':{'requests':this[_0x58a58d(0x51d)],'reads':this[_0x58a58d(0x57b)],'writes':this[_0x58a58d(0x165)],'errors':this[_0x58a58d(0x52a)],'avgReadMs':this[_0x58a58d(0x57b)]>0x0?+(this['_totalReadMs']/this[_0x58a58d(0x57b)])[_0x58a58d(0x4a8)](0x2):null,'avgWriteMs':this['_totalWrites']>0x0?+(this[_0x58a58d(0x43f)]/this['_totalWrites'])[_0x58a58d(0x4a8)](0x2):null},'window':{'seconds':_0x1af44d,'requests':_0x1b7c12,'reads':_0x5d586e,'writes':_0x409879,'errors':_0x3c3374,'reqPerSec':+(_0x1b7c12/_0x1af44d)[_0x58a58d(0x4a8)](0x2),'readPerSec':+(_0x5d586e/_0x1af44d)[_0x58a58d(0x4a8)](0x2),'writePerSec':+(_0x409879/_0x1af44d)['toFixed'](0x2),'avgReadMs':_0x5d586e>0x0?+(_0x4879f0/_0x5d586e)[_0x58a58d(0x4a8)](0x2):null,'avgWriteMs':_0x409879>0x0?+(_0xcba8a0/_0x409879)['toFixed'](0x2):null}};}[_0x589270(0x241)](){const _0x1ab367=_0x589270;clearInterval(this[_0x1ab367(0x301)]);}}return okdbMetrics=_0xf56716,okdbMetrics;}var okdbAuthNamespaces,hasRequiredOkdbAuthNamespaces;function requireOkdbAuthNamespaces(){const _0x439f19=_0x4b361c;if(hasRequiredOkdbAuthNamespaces)return okdbAuthNamespaces;hasRequiredOkdbAuthNamespaces=0x1;const _0x1b9815={'data':{'label':_0x439f19(0x17f),'scope':_0x439f19(0x46e),'description':_0x439f19(0x128),'operations':{'read':{'label':_0x439f19(0x41e),'summary':_0x439f19(0x503)},'write':{'label':'Write','summary':'Create,\x20update,\x20and\x20delete\x20records\x20(including\x20bulk\x20import).'}}},'schema':{'label':_0x439f19(0x13c),'scope':_0x439f19(0x46e),'description':_0x439f19(0x5b4),'operations':{'read':{'label':_0x439f19(0x41e),'summary':_0x439f19(0x650)},'write':{'label':_0x439f19(0x525),'summary':_0x439f19(0x5f5)}}},'search':{'label':_0x439f19(0x629),'scope':_0x439f19(0x46e),'description':_0x439f19(0x114),'operations':{'query':{'label':'Query','summary':_0x439f19(0x366)}}},'queue':{'label':_0x439f19(0x2ac),'scope':_0x439f19(0x46e),'description':_0x439f19(0x163),'operations':{'read':{'label':_0x439f19(0x41e),'summary':_0x439f19(0x403)},'write':{'label':'Write','summary':_0x439f19(0x50e)},'work':{'label':_0x439f19(0x2dc),'summary':'Worker-side:\x20claim,\x20heartbeat,\x20complete,\x20fail,\x20progress.'}}},'files':{'label':'Files','scope':_0x439f19(0x46e),'description':'Blob\x20storage:\x20large\x20file\x20uploads\x20attached\x20to\x20records\x20or\x20stored\x20standalone.','operations':{'read':{'label':_0x439f19(0x41e),'summary':_0x439f19(0x583)},'write':{'label':_0x439f19(0x525),'summary':_0x439f19(0x5a5)}}},'functions':{'label':_0x439f19(0x296),'scope':'env','description':_0x439f19(0x58a),'operations':{'read':{'label':'Read','summary':'List\x20functions\x20and\x20inspect\x20their\x20source.'},'write':{'label':_0x439f19(0x525),'summary':_0x439f19(0x103)},'run':{'label':_0x439f19(0x66e),'summary':'Execute\x20functions\x20over\x20HTTP/MCP/shell.'}}},'views':{'label':_0x439f19(0x3bd),'scope':_0x439f19(0x46e),'description':_0x439f19(0x3e4),'operations':{'read':{'label':_0x439f19(0x41e),'summary':_0x439f19(0x58d)},'write':{'label':'Write','summary':'Create\x20and\x20delete\x20views,\x20start,\x20stop,\x20and\x20rebuild\x20them.'}}},'env':{'label':_0x439f19(0x4d3),'scope':'env','description':_0x439f19(0x418),'operations':{'read':{'label':'Read','summary':_0x439f19(0x3d3)},'write':{'label':'Write','summary':_0x439f19(0x280)}}},'auth':{'label':'Auth','scope':'system','description':'API\x20tokens,\x20users,\x20and\x20credentials.','operations':{'read':{'label':'Read','summary':_0x439f19(0x50c)},'write':{'label':_0x439f19(0x525),'summary':'Create,\x20update,\x20and\x20delete\x20tokens\x20and\x20users;\x20rotate\x20keys.'}}},'system':{'label':_0x439f19(0x569),'scope':_0x439f19(0x268),'description':'Operator\x20surface:\x20server\x20info,\x20logs,\x20event\x20streams,\x20processor\x20status,\x20backups.','operations':{'read':{'label':'Read','summary':_0x439f19(0x446)},'write':{'label':'Write','summary':_0x439f19(0x487)}}},'sync':{'label':'Sync','scope':_0x439f19(0x268),'description':_0x439f19(0x468),'operations':{'read':{'label':_0x439f19(0x41e),'summary':_0x439f19(0x672)},'write':{'label':'Write','summary':_0x439f19(0x4a2)},'peer':{'label':_0x439f19(0x2a3),'summary':_0x439f19(0x1b2),'machineOnly':!![]}}},'protected':{'label':'Protected\x20(gate)','scope':_0x439f19(0x43b),'description':_0x439f19(0x605),'operations':{'read':{'label':'Read','summary':'May\x20read\x20system\x20types\x20when\x20also\x20granted\x20the\x20underlying\x20read\x20permission.'},'write':{'label':_0x439f19(0x525),'summary':_0x439f19(0x308)}}}},_0x19ea4a={'schema:read':[_0x439f19(0x40a),_0x439f19(0x5b2),_0x439f19(0xf8)]},_0x43ab65=[_0x439f19(0x32a),_0x439f19(0x3c5),'run',_0x439f19(0x4ae),'work','peer'];function _0x12b6b3(){const _0x2a6f34=_0x439f19,_0x3b932f=[];for(const [_0x44f764,_0x92ad5d]of Object[_0x2a6f34(0x427)](_0x1b9815)){for(const _0x1391f4 of Object[_0x2a6f34(0x2f1)](_0x92ad5d[_0x2a6f34(0x441)])){_0x3b932f[_0x2a6f34(0x614)](_0x44f764+':'+_0x1391f4);}}return _0x3b932f;}function _0x4da5fc(_0xa63751){return _0x1b9815[_0xa63751]||null;}function _0x5f1243(_0x543ab7,_0x5b86f7){return _0x1b9815[_0x543ab7]?.['operations'][_0x5b86f7]||null;}return okdbAuthNamespaces={'NAMESPACES':_0x1b9815,'IMPLIED_BY':_0x19ea4a,'OP_ORDER':_0x43ab65,'listAllPermissions':_0x12b6b3,'getNamespaceMeta':_0x4da5fc,'getOperationMeta':_0x5f1243},okdbAuthNamespaces;}var okdbAuthPermissions,hasRequiredOkdbAuthPermissions;function requireOkdbAuthPermissions(){if(hasRequiredOkdbAuthPermissions)return okdbAuthPermissions;hasRequiredOkdbAuthPermissions=0x1;const {IMPLIED_BY:_0xfb0c40}=requireOkdbAuthNamespaces(),_0x25129d=new Set(['read','query']);function _0x41039a(_0x1ec797,_0x3ab167){const _0x25cc15=_0x2368;if(!Array[_0x25cc15(0x579)](_0x1ec797)||_0x1ec797['length']===0x0)return![];for(const _0x5adc0a of _0x1ec797){if(typeof _0x5adc0a!==_0x25cc15(0x380)||!_0x5adc0a[_0x25cc15(0x5c0)](':')){if(_0x5adc0a==='*')return!![];continue;}const [_0x5de594,_0x6eb8b1]=_0x5adc0a[_0x25cc15(0x37c)](':'),[_0x3615bb,_0x3501aa]=_0x3ab167[_0x25cc15(0x37c)](':'),_0x139a48=_0x5de594==='*'||_0x5de594===_0x3615bb,_0x52e90d=_0x6eb8b1==='*'||_0x6eb8b1===_0x3501aa;if(_0x139a48&&_0x52e90d)return!![];}const _0x535663=_0xfb0c40[_0x3ab167];if(_0x535663)for(const _0x154860 of _0x535663){if(_0x41039a(_0x1ec797,_0x154860))return!![];}return![];}function _0x46b56c(_0xdbd6c7,_0x2a5b56){const _0x53ae42=_0x2368,_0x2d1dbe=new Set();if(Array[_0x53ae42(0x579)](_0xdbd6c7)){for(const _0x226360 of _0xdbd6c7)_0x2d1dbe['add'](_0x226360);}if(Array['isArray'](_0x2a5b56)){for(const _0xaf3e51 of _0x2a5b56)_0x2d1dbe['add'](_0xaf3e51);}return Array['from'](_0x2d1dbe);}function _0x3bdb55(_0x1233dc){const _0x4ba40a=_0x2368;if(typeof _0x1233dc!==_0x4ba40a(0x380))return![];const [,_0x44ef93]=_0x1233dc['split'](':');return _0x25129d[_0x4ba40a(0x39f)](_0x44ef93);}function _0xfaeaaa(_0x2a7c5c){const _0x268648=_0x2368;return _0x3bdb55(_0x2a7c5c)?_0x268648(0x1d4):_0x268648(0x148);}function _0x1c32c1(_0x356e7d,_0x4060fd){const _0x5024e1=_0x2368;return _0x46b56c(_0x356e7d[_0x5024e1(0x3f3)]||[],_0x4060fd?(_0x356e7d['grants']||{})[_0x4060fd]||[]:[]);}function _0x444758(_0x4dfa14){const _0xcec091=_0x2368,_0x31f028=[];for(const _0x457c2d of _0x4dfa14[_0xcec091(0x33c)]()){const _0x49bbb6=_0x457c2d[_0xcec091(0x3d5)]?.[_0xcec091(0x35d)];if(!_0x49bbb6)continue;_0x49bbb6['authRequired']&&!_0x49bbb6[_0xcec091(0x598)]&&_0x31f028[_0xcec091(0x614)](_0x457c2d[_0xcec091(0x527)]+'\x20'+_0x457c2d['path']+_0xcec091(0x556)+(_0x457c2d[_0xcec091(0x3d5)]['id']??'?')+')');}if(_0x31f028[_0xcec091(0x2eb)])throw new Error(_0xcec091(0x26e)+_0x31f028[_0xcec091(0x3a4)](_0xcec091(0x675)));}return okdbAuthPermissions={'hasPermission':_0x41039a,'unionPermissions':_0x46b56c,'isReadOperation':_0x3bdb55,'resolveProtectedGate':_0xfaeaaa,'getEffectivePermissions':_0x1c32c1,'assertEveryRouteHasPermission':_0x444758},okdbAuthPermissions;}var okdbJwtUtils,hasRequiredOkdbJwtUtils;function requireOkdbJwtUtils(){if(hasRequiredOkdbJwtUtils)return okdbJwtUtils;hasRequiredOkdbJwtUtils=0x1;const _0x227c91=require$$0$5,_0x173eb3=require$$1$3,_0x331002=require$$2;function _0x586254(_0x59ddcd){const _0x9175e=_0x2368,_0x3818e3=String(_0x59ddcd||'')[_0x9175e(0x38b)](/-/g,'+')[_0x9175e(0x38b)](/_/g,'/'),_0x375952=_0x3818e3+'='[_0x9175e(0x473)]((0x4-(_0x3818e3[_0x9175e(0x2eb)]%0x4||0x4))%0x4);return Buffer[_0x9175e(0x36d)](_0x375952,_0x9175e(0x4f5));}function _0x316f19(_0x59ed3a){const _0xebc1db=_0x2368;if(typeof _0x59ed3a!==_0xebc1db(0x380))throw new Error(_0xebc1db(0x28e));const _0x533b02=_0x59ed3a[_0xebc1db(0x37c)]('.');if(_0x533b02[_0xebc1db(0x2eb)]!==0x3)throw new Error(_0xebc1db(0x197));const [_0x558002,_0x5a53a0,_0x199ca9]=_0x533b02,_0x132f5b=JSON[_0xebc1db(0x34f)](_0x586254(_0x558002)[_0xebc1db(0x261)](_0xebc1db(0x365))),_0x2ce88d=JSON['parse'](_0x586254(_0x5a53a0)['toString'](_0xebc1db(0x365)));return{'header':_0x132f5b,'payload':_0x2ce88d,'signature':_0x586254(_0x199ca9),'signingInput':Buffer['from'](_0x558002+'.'+_0x5a53a0),'encodedHeader':_0x558002,'encodedPayload':_0x5a53a0};}function _0x2c9614(_0x491e1c){const _0x2a3642=_0x2368;if(Array[_0x2a3642(0x579)](_0x491e1c))return _0x491e1c;if(_0x491e1c==null)return[];return[_0x491e1c];}function _0x1926eb(_0x4d2630){const _0x17562d=String(_0x4d2630||'')['match'](/.{1,64}/g)||[];return'-----BEGIN\x20CERTIFICATE-----\x0a'+_0x17562d['join']('\x0a')+'\x0a-----END\x20CERTIFICATE-----\x0a';}function _0xd2fa04(_0x43efda={}){const _0x5bcf98=_0x2368;if(_0x43efda['x5c']?.[0x0])return _0x331002[_0x5bcf98(0x18e)](_0x1926eb(_0x43efda[_0x5bcf98(0x212)][0x0]));return _0x331002['createPublicKey']({'key':_0x43efda,'format':_0x5bcf98(0x2bb)});}function _0x20ae5c(_0x43702e,_0x642925,_0x37fb25,_0x3bc3a4){const _0x4c600f=_0x2368;if(_0x43702e==='RS256')return _0x331002[_0x4c600f(0x170)](_0x4c600f(0x39a),_0x37fb25,_0x642925,_0x3bc3a4);if(_0x43702e===_0x4c600f(0x2a2))return _0x331002[_0x4c600f(0x170)](_0x4c600f(0x33b),_0x37fb25,{'key':_0x642925,'dsaEncoding':_0x4c600f(0x1b4)},_0x3bc3a4);return![];}function _0x2b513b(_0x4b2967){const _0x4d5125=_0x2368;if(typeof commonjsGlobal[_0x4d5125(0x19d)]==='function')return commonjsGlobal[_0x4d5125(0x19d)](_0x4b2967,{'headers':{'accept':_0x4d5125(0x509)}})['then'](async _0x5ba232=>{const _0x544a72=_0x4d5125;if(!_0x5ba232['ok']){const _0x4b8db8=new Error(_0x544a72(0x356)+_0x5ba232[_0x544a72(0x626)]+_0x544a72(0x20a)+_0x4b2967);_0x4b8db8['status']=_0x5ba232['status'];throw _0x4b8db8;}return _0x5ba232['json']();});return new Promise((_0x3fbcbf,_0x27fec5)=>{const _0x22cfef=_0x4d5125,_0x3cb80f=String(_0x4b2967)[_0x22cfef(0x3cc)](_0x22cfef(0x381))?_0x173eb3:_0x227c91,_0x4aec26=_0x3cb80f[_0x22cfef(0x3aa)](_0x4b2967,{'headers':{'accept':'application/json'}},_0x5cf026=>{const _0x229d1c=_0x22cfef;let _0x3caa17='';_0x5cf026['setEncoding'](_0x229d1c(0x365)),_0x5cf026['on'](_0x229d1c(0x206),_0x1e02e0=>{_0x3caa17+=_0x1e02e0;}),_0x5cf026['on']('end',()=>{const _0x351b2b=_0x229d1c;if(_0x5cf026[_0x351b2b(0x27b)]<0xc8||_0x5cf026[_0x351b2b(0x27b)]>=0x12c){const _0x35e0de=new Error(_0x351b2b(0x356)+_0x5cf026['statusCode']+_0x351b2b(0x20a)+_0x4b2967);return _0x35e0de[_0x351b2b(0x626)]=_0x5cf026[_0x351b2b(0x27b)],_0x27fec5(_0x35e0de);}try{_0x3fbcbf(JSON['parse'](_0x3caa17||'{}'));}catch(_0x34eeb1){_0x27fec5(_0x34eeb1);}});});_0x4aec26['on'](_0x22cfef(0x31b),_0x27fec5),_0x4aec26[_0x22cfef(0x62c)]();});}return okdbJwtUtils={'base64UrlDecode':_0x586254,'parseJwt':_0x316f19,'normalizeAudience':_0x2c9614,'normalizePemCertificate':_0x1926eb,'jwkToKeyObject':_0xd2fa04,'verifyJwtSignature':_0x20ae5c,'fetchJson':_0x2b513b},okdbJwtUtils;}var hasRequiredOkdbHttp;function requireOkdbHttp(){const _0x404a63=_0x4b361c;if(hasRequiredOkdbHttp)return okdbHttp[_0x404a63(0x1b3)];hasRequiredOkdbHttp=0x1;const _0x53a26f=require$$0$5,{URL:_0x451322}=require$$2$1,_0x19a34d=requireOkdbMetrics(),_0x391527=requireOkdbAuthTokens(),{hasPermission:_0x19937c,unionPermissions:_0x11a074,resolveProtectedGate:_0x3c5d4e}=requireOkdbAuthPermissions(),_0x552970={0x190:'BAD_REQUEST',0x191:_0x404a63(0x2b7),0x193:_0x404a63(0x2da),0x194:'NOT_FOUND',0x195:_0x404a63(0x3ab),0x198:'REQUEST_TIMEOUT',0x199:_0x404a63(0x3ca),0x19a:_0x404a63(0x600),0x19b:_0x404a63(0x184),0x19d:'PAYLOAD_TOO_LARGE',0x19f:'UNSUPPORTED_MEDIA_TYPE',0x1a6:_0x404a63(0x2e7),0x1ad:_0x404a63(0x4ea),0x1f4:_0x404a63(0x64f),0x1f5:_0x404a63(0x459),0x1f6:_0x404a63(0x51c),0x1f7:_0x404a63(0x334),0x1f8:_0x404a63(0x555)},_0x3da15a={'INVALID_VALUE':0x190,'BAD_CONFIG':0x190,'INVALID_PRIMARY_KEY':0x190,'INVALID_INDEX_KEY':0x190,'TYPE_NOT_REGISTERED':0x194,'INDEX_NOT_REGISTERED':0x194,'NOT_FOUND':0x194,'ALREADY_EXISTS':0x199,'VERSION_MISMATCH':0x199,'UNIQUE_CONSTRAINT':0x199,'TYPE_ALREADY_REGISTERED':0x199,'INDEX_ALREADY_REGISTERED':0x199,'FK_ERROR':0x199,'FK_DELETE_ERROR':0x199,'FOREIGN_KEY_VIOLATION':0x199,'FOREIGN_KEY_DELETE_RESTRICTED':0x199,'ENV_NOT_FOUND':0x194,'ENV_PROTECTED':0x193,'ENGINE_CONFIG_PATCH_UNSUPPORTED':0x190,'QUEUE_WORKER_JOB_TYPE_CONFLICT':0x199,'SCHEMA_VALIDATION_FAILED':0x1a6,'SCHEMA_COLLECTION_INVALID':0x199,'INVALID_SCHEMA':0x190,'BUCKET_CONFIG_INVALID':0x190,'BUCKET_INVALID_TIME_VALUE':0x1a6,'BUCKET_PROJECT_NOT_SYNCABLE':0x190,'RESERVED_VIEW_NAME':0x190,'VIEW_NOT_BUCKETED':0x190,'VIEW_NOT_FOUND':0x194,'VIEW_RANGE_GRANULARITY_MISMATCH':0x190,'VIEW_RANGE_GRANULARITY_REQUIRED':0x190,'VIEW_REF_UNSUPPORTED_REDUCER':0x190},{hmac:_0x1d100f,timingSafeEqual:_0x54f11b,parseBearer:_0x3c10e5,randomToken:_0xf804a3,issueToken:_0x580b0f,authenticateToken:_0x3e87bf}=_0x391527,{base64UrlDecode:_0x28871b,parseJwt:_0x10c589,normalizeAudience:_0x35ee01,normalizePemCertificate:_0x57b06b,jwkToKeyObject:_0x41a13a,verifyJwtSignature:_0xba07c4,fetchJson:_0x5b4187}=requireOkdbJwtUtils();function _0x34134f(_0x29ae15){const _0x2aea87=_0x404a63;return(_0x29ae15||_0x2aea87(0x58f))[_0x2aea87(0x5ef)]();}function _0xdc08e4(_0x5d447f){const _0x36becd=_0x404a63;if(Array['isArray'](_0x5d447f))return _0x5d447f['flatMap'](_0xdc08e4);return String(_0x5d447f||'')['split'](',')[_0x36becd(0x601)](_0x2c61cd=>_0x2c61cd['trim']())['filter'](Boolean);}function _0x303df2(..._0x3204f1){const _0x356750=_0x404a63;return[...new Set(_0x3204f1[_0x356750(0x235)](_0xdc08e4))]['join'](',\x20');}function _0x1eeb11(_0x236f4b,_0x5f4b7c){const _0x51b338=_0x404a63;if(!_0x236f4b)return![];if(_0x5f4b7c==='*')return!![];if(_0x5f4b7c instanceof RegExp)return _0x5f4b7c[_0x51b338(0x30d)](_0x236f4b);if(typeof _0x5f4b7c===_0x51b338(0x26b))return!!_0x5f4b7c(_0x236f4b);if(Array[_0x51b338(0x579)](_0x5f4b7c))return _0x5f4b7c[_0x51b338(0x5c0)](_0x236f4b);return _0x5f4b7c===_0x236f4b;}function _0x2a8e64(_0x37c385={},_0x38b5c9={},_0x487b8c=null){const _0x11d35a=_0x404a63;if(!_0x38b5c9)return null;const _0x24c484=_0x37c385[_0x11d35a(0x424)],_0x1a0c64=_0x38b5c9[_0x11d35a(0x335)]??_0x38b5c9[_0x11d35a(0x424)]??'*',_0x4d2958=_0x1a0c64==='*'?'*':_0x1eeb11(_0x24c484,_0x1a0c64)?_0x24c484:null;if(!_0x4d2958)return null;const _0x1f0450=_0x37c385['access-control-request-headers'],_0x246e54=_0x38b5c9[_0x11d35a(0x5b1)]??_0x38b5c9[_0x11d35a(0x333)]??['content-type',_0x11d35a(0x494),_0x11d35a(0x2de),_0x11d35a(0x678),_0x11d35a(0x548)],_0x221cc2=_0x38b5c9[_0x11d35a(0x5cb)]??_0x38b5c9[_0x11d35a(0xdf)]??(_0x487b8c?[_0x487b8c,'OPTIONS']:[_0x11d35a(0x58f),_0x11d35a(0x46a),_0x11d35a(0x346)]),_0x20d09a=_0x38b5c9[_0x11d35a(0x3d4)]??['mcp-session-id'],_0x625526={'access-control-allow-origin':_0x4d2958,'access-control-allow-methods':Array['isArray'](_0x221cc2)?_0x221cc2[_0x11d35a(0x3a4)](',\x20'):String(_0x221cc2),'access-control-allow-headers':_0x1f0450?_0x303df2(_0x246e54,_0x1f0450):Array[_0x11d35a(0x579)](_0x246e54)?_0x246e54[_0x11d35a(0x3a4)](',\x20'):String(_0x246e54),'access-control-expose-headers':Array[_0x11d35a(0x579)](_0x20d09a)?_0x20d09a[_0x11d35a(0x3a4)](',\x20'):String(_0x20d09a),'vary':_0x303df2('Origin',_0x4d2958==='*'?'':_0x11d35a(0x259),_0x1f0450?_0x11d35a(0x21f):'')};if(_0x38b5c9[_0x11d35a(0x4f0)])_0x625526[_0x11d35a(0x467)]='true';if(Number[_0x11d35a(0x5f8)](_0x38b5c9[_0x11d35a(0x2d4)]))_0x625526[_0x11d35a(0x511)]=String(_0x38b5c9[_0x11d35a(0x2d4)]);return _0x625526;}function _0x50387f(_0x343cb3){const _0x4918dc=_0x404a63,_0x11a7b0=[],_0x5553b2={};let _0x1c6184=![];_0x343cb3[_0x4918dc(0x324)]('/*')&&(_0x1c6184=!![],_0x343cb3=_0x343cb3[_0x4918dc(0x45e)](0x0,-0x2),_0x11a7b0['push']('*'));let _0x1a96d5=_0x343cb3[_0x4918dc(0x38b)](/\/+$/,'')['replace'](/\[([^\]]*)\]/g,(_0x414b55,_0x22d01a)=>{const _0x5b3eba=_0x4918dc,_0x50aee4=_0x22d01a[_0x5b3eba(0x38b)](/\/:(\w+)(?:=([^/\]\s]*))?/g,(_0x4a3017,_0x412c0b,_0x3ccf79)=>{const _0x54fd62=_0x5b3eba;_0x11a7b0[_0x54fd62(0x614)](_0x412c0b);if(_0x3ccf79!==undefined)_0x5553b2[_0x412c0b]=_0x3ccf79;return'/([^/]+)';});return _0x5b3eba(0x4fc)+_0x50aee4+')?';})['replace'](/\/:(\w+)/g,(_0x3a12fe,_0x160609)=>{const _0x38bd06=_0x4918dc;return _0x11a7b0[_0x38bd06(0x614)](_0x160609),_0x38bd06(0x21c);});if(_0x1a96d5==='')_0x1a96d5='/';return{'keys':_0x11a7b0,'defaults':_0x5553b2,'wildcard':_0x1c6184,'regex':new RegExp(_0x1c6184?'^'+_0x1a96d5+_0x4918dc(0x3b7):'^'+_0x1a96d5+'$')};}function _0x1de9c7(_0x32eb32){const _0x522928=_0x404a63;if(_0x32eb32==null)return _0x32eb32;return JSON[_0x522928(0x34f)](JSON['stringify'](_0x32eb32));}function _0x51f60e(_0x5cb894){const _0x4ce0b6=_0x404a63;if(_0x5cb894==null)return null;if(_0x5cb894['type']==='object'&&_0x5cb894[_0x4ce0b6(0x448)]&&!Array[_0x4ce0b6(0x579)](_0x5cb894[_0x4ce0b6(0x448)]))return _0x1de9c7(_0x5cb894);const _0x499368=Object['values'](_0x5cb894),_0x3f213a=_0x499368[_0x4ce0b6(0x2eb)]>0x0&&_0x499368[_0x4ce0b6(0x171)](_0xa9c61=>{const _0x2e8829=_0x4ce0b6;return _0xa9c61&&typeof _0xa9c61===_0x2e8829(0x20e)&&!Array[_0x2e8829(0x579)](_0xa9c61)&&(Object[_0x2e8829(0x258)]['hasOwnProperty'][_0x2e8829(0x456)](_0xa9c61,_0x2e8829(0x49b))||Object[_0x2e8829(0x258)][_0x2e8829(0x51a)][_0x2e8829(0x456)](_0xa9c61,_0x2e8829(0x448))||Object[_0x2e8829(0x258)][_0x2e8829(0x51a)][_0x2e8829(0x456)](_0xa9c61,_0x2e8829(0x5b7))||Object[_0x2e8829(0x258)][_0x2e8829(0x51a)][_0x2e8829(0x456)](_0xa9c61,'default'));});if(_0x3f213a)return{'type':_0x4ce0b6(0x20e),'properties':_0x1de9c7(_0x5cb894),'required':[],'additionalProperties':![]};const _0x6880d8={},_0x352029=[];for(const [_0x35c60a,_0x3187ba]of Object[_0x4ce0b6(0x427)](_0x5cb894)){_0x6880d8[_0x35c60a]=_0x5ab5b8(_0x3187ba);if(_0x3187ba!==null&&_0x3187ba!==undefined)_0x352029[_0x4ce0b6(0x614)](_0x35c60a);}return{'type':_0x4ce0b6(0x20e),'properties':_0x6880d8,'required':_0x352029,'additionalProperties':![]};}function _0x5ab5b8(_0x618d9e){const _0x3ffc4c=_0x404a63;if(_0x618d9e===null)return{'type':[_0x3ffc4c(0x2e8),_0x3ffc4c(0x380),'number',_0x3ffc4c(0x455),_0x3ffc4c(0x20e),_0x3ffc4c(0x304)]};if(Array[_0x3ffc4c(0x579)](_0x618d9e))return{'type':_0x3ffc4c(0x304),'items':_0x618d9e[_0x3ffc4c(0x2eb)]>0x0?_0x5ab5b8(_0x618d9e[0x0]):{}};switch(typeof _0x618d9e){case _0x3ffc4c(0x380):return{'type':'string','default':_0x618d9e};case _0x3ffc4c(0x17c):return{'type':Number[_0x3ffc4c(0xde)](_0x618d9e)?_0x3ffc4c(0x14b):_0x3ffc4c(0x17c),'default':_0x618d9e};case'boolean':return{'type':'boolean','default':_0x618d9e};case _0x3ffc4c(0x20e):{const _0x2ce015={};for(const [_0x390287,_0x5666b3]of Object[_0x3ffc4c(0x427)](_0x618d9e))_0x2ce015[_0x390287]=_0x5ab5b8(_0x5666b3);return{'type':'object','properties':_0x2ce015,'additionalProperties':!![],'default':_0x1de9c7(_0x618d9e)};}default:return{};}}function _0x40d518(_0xde597f,_0x42e729){const _0x433062=_0x404a63,_0x3f7e82=[];for(const _0x97dae9 of _0x42e729[_0x433062(0x2f1)]){if(_0x97dae9==='*')continue;_0x3f7e82['push']({'name':_0x97dae9,'required':!Object[_0x433062(0x258)][_0x433062(0x51a)][_0x433062(0x456)](_0x42e729['defaults'],_0x97dae9),'default':_0x42e729['defaults'][_0x97dae9]});}return _0x3f7e82;}function _0x44ff79(_0x1b23c8={},_0x449761){const _0x4aa600=_0x404a63,_0x5af02c=_0x51f60e(_0x1b23c8[_0x4aa600(0x5d0)]?.[_0x4aa600(0x651)]??_0x1b23c8[_0x4aa600(0x3c5)]??null),_0xfd4c43=_0x1b23c8[_0x4aa600(0x5d0)]?.[_0x4aa600(0x2e5)]??(_0x1b23c8[_0x4aa600(0x13b)]?_0x4aa600(0x13b):_0x449761[_0x4aa600(0x527)]==='GET'||_0x449761['method']===_0x4aa600(0x594)?_0x4aa600(0x190):'remaining-fields');return{'querySchema':_0x5af02c,'bodyMode':_0xfd4c43,'bindings':_0x1de9c7(_0x1b23c8[_0x4aa600(0x5d0)]?.['bindings']??{}),'statuses':_0x1de9c7(_0x1b23c8['http']?.[_0x4aa600(0x452)]??(_0x1b23c8[_0x4aa600(0x1aa)]||[])),'transport':_0x1b23c8['http']?.['transport']??(_0x1b23c8[_0x4aa600(0x54a)]?'sse':_0x1b23c8['raw']?_0x4aa600(0x13b):_0x4aa600(0x523)),'rawResponse':_0x1b23c8[_0x4aa600(0x5d0)]?.['rawResponse']??!!_0x1b23c8['rawResponse'],'cors':_0x1de9c7(_0x1b23c8[_0x4aa600(0x5d0)]?.['cors']??_0x1b23c8['cors']??null)};}function _0x34f30f(_0x203e1f){const _0x3cf5d3=_0x404a63,_0x47ffb1=_0x203e1f[_0x3cf5d3(0x664)]||{},_0x3223de=_0x40d518(_0x203e1f['path'],_0x203e1f[_0x3cf5d3(0xdd)]),_0x196a92=!!(_0x47ffb1['id']||_0x47ffb1[_0x3cf5d3(0xe0)]||_0x47ffb1[_0x3cf5d3(0x656)]||_0x47ffb1['http']||_0x47ffb1[_0x3cf5d3(0x32b)]||_0x47ffb1[_0x3cf5d3(0x3b3)]||_0x47ffb1[_0x3cf5d3(0x35d)]||_0x47ffb1[_0x3cf5d3(0x267)]),_0x132c5a=_0x44ff79(_0x47ffb1,_0x203e1f),_0xcbf908=_0x47ffb1[_0x3cf5d3(0xe0)]?_0x1de9c7(_0x47ffb1[_0x3cf5d3(0xe0)]):null;return{'id':_0x47ffb1['id']??null,'summary':_0x47ffb1[_0x3cf5d3(0x319)]??null,'description':_0x47ffb1[_0x3cf5d3(0x413)]??null,'tags':_0x1de9c7(_0x47ffb1['tags']??[]),'category':_0x47ffb1[_0x3cf5d3(0x4d7)]??null,'safety':_0x1de9c7(_0x47ffb1[_0x3cf5d3(0x267)]??null),'access':_0x1de9c7(_0x47ffb1[_0x3cf5d3(0x35d)]??null),'inputSchema':_0xcbf908,'outputSchema':_0x1de9c7(_0x47ffb1[_0x3cf5d3(0x656)]??null),'examples':_0x1de9c7(_0x47ffb1[_0x3cf5d3(0x2ec)]??[]),'pathParams':_0x3223de,'http':_0x132c5a,'cli':_0x1de9c7(_0x47ffb1[_0x3cf5d3(0x3b3)]??null),'mcp':_0x1de9c7(_0x47ffb1[_0x3cf5d3(0x32b)]??null),'legacy':{'params':_0x1de9c7(_0x47ffb1[_0x3cf5d3(0x5fe)]??null),'query':_0x1de9c7(_0x47ffb1['query']??null),'body':_0x1de9c7(_0x47ffb1[_0x3cf5d3(0x5e9)]??null),'response':_0x1de9c7(_0x47ffb1[_0x3cf5d3(0x1ed)]??null)},'transport':{'raw':!!_0x47ffb1[_0x3cf5d3(0x13b)],'sse':!!_0x47ffb1[_0x3cf5d3(0x54a)],'rawResponse':!!_0x47ffb1[_0x3cf5d3(0x642)],'cors':_0x1de9c7(_0x47ffb1[_0x3cf5d3(0x1fb)]??null)},'hasCanonical':_0x196a92};}function _0x39e179(_0xcbfb3e,_0x3f876c){const _0x1fcd82=_0x404a63;if(!_0x3f876c?.[_0x1fcd82(0x401)])return;if(!_0x3f876c[_0x1fcd82(0xe0)]||_0x3f876c[_0x1fcd82(0xe0)]['type']!==_0x1fcd82(0x20e)||!_0x3f876c[_0x1fcd82(0xe0)][_0x1fcd82(0x448)])throw new Error('Route\x20'+_0xcbfb3e[_0x1fcd82(0x527)]+'\x20'+_0xcbfb3e[_0x1fcd82(0x42d)]+'\x20has\x20canonical\x20metadata\x20but\x20missing\x20valid\x20inputSchema');const _0x22ac43=_0x3f876c[_0x1fcd82(0xe0)][_0x1fcd82(0x448)]||{},_0x21171a=new Set(_0x3f876c['pathParams'][_0x1fcd82(0x601)](_0x15a203=>_0x15a203[_0x1fcd82(0x2cc)])),_0x2e08c9=new Set(Object[_0x1fcd82(0x2f1)](_0x3f876c[_0x1fcd82(0x5d0)]?.[_0x1fcd82(0x651)]?.[_0x1fcd82(0x448)]||{})),_0x277482=new Set(Object[_0x1fcd82(0x2f1)](_0x3f876c[_0x1fcd82(0x5d0)]?.[_0x1fcd82(0x4a3)]||{}));for(const _0x3d06d5 of _0x3f876c['pathParams']){if(!_0x22ac43[_0x3d06d5[_0x1fcd82(0x2cc)]])throw new Error('Route\x20'+_0xcbfb3e[_0x1fcd82(0x527)]+'\x20'+_0xcbfb3e[_0x1fcd82(0x42d)]+'\x20missing\x20path\x20field\x20in\x20inputSchema:\x20'+_0x3d06d5[_0x1fcd82(0x2cc)]);}for(const _0x470a4c of _0x2e08c9){if(!_0x22ac43[_0x470a4c])throw new Error(_0x1fcd82(0x60d)+_0xcbfb3e[_0x1fcd82(0x527)]+'\x20'+_0xcbfb3e[_0x1fcd82(0x42d)]+_0x1fcd82(0x3e1)+_0x470a4c);}for(const _0x13ec4d of _0x277482){if(!_0x22ac43[_0x13ec4d])throw new Error(_0x1fcd82(0x60d)+_0xcbfb3e[_0x1fcd82(0x527)]+'\x20'+_0xcbfb3e[_0x1fcd82(0x42d)]+_0x1fcd82(0xe2)+_0x13ec4d);}for(const _0x38e4a1 of _0x277482){if(_0x21171a[_0x1fcd82(0x39f)](_0x38e4a1))throw new Error(_0x1fcd82(0x60d)+_0xcbfb3e[_0x1fcd82(0x527)]+'\x20'+_0xcbfb3e[_0x1fcd82(0x42d)]+_0x1fcd82(0x5b6)+_0x38e4a1);if(_0x2e08c9[_0x1fcd82(0x39f)](_0x38e4a1))throw new Error(_0x1fcd82(0x60d)+_0xcbfb3e[_0x1fcd82(0x527)]+'\x20'+_0xcbfb3e[_0x1fcd82(0x42d)]+_0x1fcd82(0xe3)+_0x38e4a1);const _0xdd0a4f=_0x3f876c[_0x1fcd82(0x5d0)]['bindings'][_0x38e4a1];if(!/^params\.[A-Za-z0-9_*.-]+$/[_0x1fcd82(0x30d)](_0xdd0a4f)&&!/^query\.[A-Za-z0-9_*.-]+$/['test'](_0xdd0a4f)&&!/^body(?:\.[A-Za-z0-9_*.-]+)?$/[_0x1fcd82(0x30d)](_0xdd0a4f)&&!/^headers\.[A-Za-z0-9_*.-]+$/[_0x1fcd82(0x30d)](_0xdd0a4f))throw new Error(_0x1fcd82(0x60d)+_0xcbfb3e[_0x1fcd82(0x527)]+'\x20'+_0xcbfb3e[_0x1fcd82(0x42d)]+_0x1fcd82(0x18a)+_0x38e4a1+':\x20'+_0xdd0a4f);}for(const _0x4af07b of _0x2e08c9){if(_0x21171a['has'](_0x4af07b))throw new Error('Route\x20'+_0xcbfb3e[_0x1fcd82(0x527)]+'\x20'+_0xcbfb3e[_0x1fcd82(0x42d)]+'\x20has\x20ambiguous\x20query/path\x20field:\x20'+_0x4af07b);}const _0x25f25b=_0x3f876c[_0x1fcd82(0x5d0)]?.[_0x1fcd82(0x2e5)],_0x5beee3=new Set(['none',_0x1fcd82(0x23e),_0x1fcd82(0x20e),_0x1fcd82(0x37b),'array',_0x1fcd82(0x13b)]);if(!_0x5beee3[_0x1fcd82(0x39f)](_0x25f25b))throw new Error(_0x1fcd82(0x60d)+_0xcbfb3e[_0x1fcd82(0x527)]+'\x20'+_0xcbfb3e[_0x1fcd82(0x42d)]+_0x1fcd82(0x316)+_0x25f25b);if(_0x25f25b==='raw'&&!_0xcbfb3e[_0x1fcd82(0x664)]?.[_0x1fcd82(0x13b)])throw new Error(_0x1fcd82(0x60d)+_0xcbfb3e[_0x1fcd82(0x527)]+'\x20'+_0xcbfb3e[_0x1fcd82(0x42d)]+'\x20uses\x20raw\x20bodyMode\x20without\x20addRaw/raw\x20route\x20metadata');if(_0x3f876c[_0x1fcd82(0x32b)]?.[_0x1fcd82(0x5c8)]!==![]&&(_0xcbfb3e['meta']?.['raw']||_0xcbfb3e[_0x1fcd82(0x664)]?.[_0x1fcd82(0x54a)]||_0x3f876c[_0x1fcd82(0x5d0)]?.['transport']===_0x1fcd82(0x25a)))throw new Error(_0x1fcd82(0x60d)+_0xcbfb3e['method']+'\x20'+_0xcbfb3e[_0x1fcd82(0x42d)]+_0x1fcd82(0x3c6)+_0x3f876c[_0x1fcd82(0x5d0)]?.[_0x1fcd82(0x109)]);const _0xee6aed=Object[_0x1fcd82(0x2f1)](_0x22ac43)[_0x1fcd82(0x1c6)](_0x16a9d2=>{const _0x51fd41=_0x1fcd82;if(_0x21171a[_0x51fd41(0x39f)](_0x16a9d2))return![];if(_0x2e08c9['has'](_0x16a9d2))return![];if(_0x277482[_0x51fd41(0x39f)](_0x16a9d2))return![];return!![];});if(_0x25f25b===_0x1fcd82(0x190)&&_0xee6aed['length']>0x0)throw new Error('Route\x20'+_0xcbfb3e['method']+'\x20'+_0xcbfb3e[_0x1fcd82(0x42d)]+'\x20has\x20unbound\x20input\x20fields\x20with\x20bodyMode:none:\x20'+_0xee6aed[_0x1fcd82(0x3a4)](',\x20'));}function _0x30ca70(_0x2fd64e){if(Array['isArray'](_0x2fd64e))return _0x2fd64e;if(_0x2fd64e==null)return[];return[_0x2fd64e];}function _0xcc8d80(_0x55a093,_0x10d643){const _0x5b0326=_0x404a63;return _0x30ca70(_0x55a093?.['type'])[_0x5b0326(0x5c0)](_0x10d643);}function _0x4d7513(_0x2e3b28,_0x4ec6fe){const _0x3ecb1e=_0x404a63;if(_0x2e3b28==null||typeof _0x2e3b28!==_0x3ecb1e(0x380))return _0x2e3b28;const _0x14a31e=_0x30ca70(_0x4ec6fe?.[_0x3ecb1e(0x49b)]);if(_0x14a31e['length']===0x0)return _0x2e3b28;if(_0x14a31e[_0x3ecb1e(0x5c0)](_0x3ecb1e(0x2e8))&&_0x2e3b28===_0x3ecb1e(0x2e8))return null;if(_0x14a31e[_0x3ecb1e(0x5c0)](_0x3ecb1e(0x455))){if(_0x2e3b28===_0x3ecb1e(0x5e1))return!![];if(_0x2e3b28===_0x3ecb1e(0x38c))return![];}if(_0x14a31e[_0x3ecb1e(0x5c0)](_0x3ecb1e(0x14b))&&/^-?\d+$/['test'](_0x2e3b28))return Number[_0x3ecb1e(0x279)](_0x2e3b28,0xa);if(_0x14a31e['includes'](_0x3ecb1e(0x17c))&&/^-?(?:\d+|\d*\.\d+)$/['test'](_0x2e3b28))return Number(_0x2e3b28);return _0x2e3b28;}function _0x127e06(_0x55869c){return _0x1de9c7(_0x55869c);}function _0x3414aa(_0x3283c6,_0x277164={},_0xef39e2={},_0x42f934=null,_0x4e031d={}){const _0x309df0=_0x404a63,_0x590fd1=_0x3283c6?.['operation'];if(!_0x590fd1?.['hasCanonical']||!_0x590fd1[_0x309df0(0xe0)])return null;const _0x14e54c=_0x590fd1[_0x309df0(0xe0)][_0x309df0(0x448)]||{},_0x6b5496=_0x590fd1[_0x309df0(0x5d0)]?.['querySchema']?.['properties']||{},_0x313cb4=_0x590fd1[_0x309df0(0x5d0)]?.[_0x309df0(0x4a3)]||{},_0x26e236=new Set((_0x590fd1[_0x309df0(0x538)]||[])[_0x309df0(0x601)](_0x568b5d=>_0x568b5d[_0x309df0(0x2cc)])),_0x465bf9=new Set(Object[_0x309df0(0x2f1)](_0x6b5496)),_0x4a756f={};for(const [_0x11aa84,_0x5951d0]of Object[_0x309df0(0x427)](_0x14e54c)){Object['prototype'][_0x309df0(0x51a)][_0x309df0(0x456)](_0x5951d0||{},_0x309df0(0x1e4))&&(_0x4a756f[_0x11aa84]=_0x127e06(_0x5951d0['default']));}for(const _0x4673a1 of _0x590fd1[_0x309df0(0x538)]||[]){if(!Object[_0x309df0(0x258)]['hasOwnProperty']['call'](_0x277164,_0x4673a1[_0x309df0(0x2cc)]))continue;const _0x5a2bbd=_0x14e54c[_0x4673a1[_0x309df0(0x2cc)]]||{};_0x4a756f[_0x4673a1[_0x309df0(0x2cc)]]=_0x4d7513(_0x277164[_0x4673a1[_0x309df0(0x2cc)]],_0x5a2bbd);}for(const [_0x5e92d0,_0x4a5675]of Object[_0x309df0(0x427)](_0x6b5496)){if(!Object['prototype'][_0x309df0(0x51a)][_0x309df0(0x456)](_0xef39e2,_0x5e92d0))continue;_0x4a756f[_0x5e92d0]=_0x4d7513(_0xef39e2[_0x5e92d0],_0x4a5675||_0x14e54c[_0x5e92d0]||{});}for(const [_0x435a08,_0x32238d]of Object[_0x309df0(0x427)](_0x313cb4)){if(typeof _0x32238d!==_0x309df0(0x380))continue;let _0x5b34e3;if(_0x32238d['startsWith'](_0x309df0(0x4d1)))_0x5b34e3=_0x277164[_0x32238d[_0x309df0(0x45e)](0x7)];else{if(_0x32238d[_0x309df0(0x3cc)]('query.'))_0x5b34e3=_0xef39e2[_0x32238d[_0x309df0(0x45e)](0x6)];else{if(_0x32238d===_0x309df0(0x5e9))_0x5b34e3=_0x42f934;else{if(_0x32238d[_0x309df0(0x3cc)](_0x309df0(0x43a)))_0x5b34e3=_0x42f934?.[_0x32238d[_0x309df0(0x45e)](0x5)];else{if(_0x32238d[_0x309df0(0x3cc)]('headers.'))_0x5b34e3=_0x4e031d?.[_0x32238d[_0x309df0(0x45e)](0x8)[_0x309df0(0x3f1)]()]??_0x4e031d?.[_0x32238d[_0x309df0(0x45e)](0x8)];}}}}if(_0x5b34e3!==undefined)_0x4a756f[_0x435a08]=_0x5b34e3;}const _0x28d437=_0x590fd1[_0x309df0(0x5d0)]?.[_0x309df0(0x2e5)];if(_0x28d437!==_0x309df0(0x190)&&_0x28d437!=='raw'&&_0x42f934!=null){if(_0x28d437===_0x309df0(0x20e))for(const [_0x2c1069,_0x28fa9e]of Object[_0x309df0(0x427)](_0x14e54c)){if(_0x26e236['has'](_0x2c1069)||_0x465bf9[_0x309df0(0x39f)](_0x2c1069)||Object[_0x309df0(0x258)]['hasOwnProperty']['call'](_0x313cb4,_0x2c1069))continue;if(Object[_0x309df0(0x258)][_0x309df0(0x51a)][_0x309df0(0x456)](_0x42f934,_0x2c1069))_0x4a756f[_0x2c1069]=_0x42f934[_0x2c1069];else{if(_0xcc8d80(_0x28fa9e,_0x309df0(0x20e)))_0x4a756f[_0x2c1069]=_0x42f934;}}else for(const [_0x342bcf,_0x3f3d95]of Object[_0x309df0(0x427)](_0x42f934)){if(_0x26e236['has'](_0x342bcf)||_0x465bf9[_0x309df0(0x39f)](_0x342bcf)||Object[_0x309df0(0x258)]['hasOwnProperty']['call'](_0x313cb4,_0x342bcf))continue;_0x4a756f[_0x342bcf]=_0x3f3d95;}}return _0x4a756f;}function _0x1b37ef(_0x103491,_0x55f4f7,_0x4e5071,_0x1abcb7){const _0x3b447b=_0x404a63;if(!_0x55f4f7)return;const _0x2f7362=_0x30ca70(_0x55f4f7[_0x3b447b(0x49b)]);if(_0x103491===undefined)return;if(_0x103491===null){_0x2f7362[_0x3b447b(0x2eb)]>0x0&&!_0x2f7362['includes'](_0x3b447b(0x2e8))&&_0x1abcb7[_0x3b447b(0x614)]({'field':_0x4e5071,'message':_0x3b447b(0x3dd),'expected':_0x2f7362[_0x3b447b(0x3a4)]('|'),'actual':null});return;}if(_0x2f7362[_0x3b447b(0x2eb)]===0x0)return;const _0x1a003d=_0x2f7362[_0x3b447b(0x28c)](_0x38c013=>{const _0x9ecf66=_0x3b447b;switch(_0x38c013){case _0x9ecf66(0x380):return typeof _0x103491===_0x9ecf66(0x380);case _0x9ecf66(0x14b):return Number['isInteger'](_0x103491);case _0x9ecf66(0x17c):return typeof _0x103491==='number'&&Number['isFinite'](_0x103491);case _0x9ecf66(0x455):return typeof _0x103491===_0x9ecf66(0x455);case _0x9ecf66(0x20e):return _0x103491&&typeof _0x103491===_0x9ecf66(0x20e)&&!Array[_0x9ecf66(0x579)](_0x103491);case'array':return Array['isArray'](_0x103491);case _0x9ecf66(0x2e8):return _0x103491===null;default:return!![];}});if(!_0x1a003d){_0x1abcb7[_0x3b447b(0x614)]({'field':_0x4e5071,'message':_0x3b447b(0x219)+_0x2f7362[_0x3b447b(0x3a4)]('|'),'expected':_0x2f7362[_0x3b447b(0x3a4)]('|'),'actual':_0x103491});return;}Array[_0x3b447b(0x579)](_0x103491)&&_0x55f4f7[_0x3b447b(0x5b7)]&&_0x103491[_0x3b447b(0x612)]((_0x1d5aef,_0x118307)=>_0x1b37ef(_0x1d5aef,_0x55f4f7[_0x3b447b(0x5b7)],_0x4e5071+'['+_0x118307+']',_0x1abcb7));}function _0x51c91b(_0xc9069f,_0x4386bf){const _0x4804c6=_0x404a63,_0x4fc8e6=_0xc9069f?.['operation'];if(!_0x4fc8e6?.['hasCanonical']||!_0x4fc8e6['inputSchema'])return null;const _0x2a7484=_0x4fc8e6[_0x4804c6(0xe0)],_0x41dad6=_0x2a7484[_0x4804c6(0x448)]||{},_0x2f4508=new Set(_0x2a7484['required']||[]),_0xa5500a=[];for(const _0x28a9ea of _0x2f4508){_0x4386bf[_0x28a9ea]===undefined&&_0xa5500a[_0x4804c6(0x614)]({'field':_0x28a9ea,'message':_0x4804c6(0x2b1),'expected':'present','actual':undefined});}if(_0x2a7484[_0x4804c6(0x56f)]===![])for(const _0x1ebfe4 of Object['keys'](_0x4386bf||{})){!Object[_0x4804c6(0x258)][_0x4804c6(0x51a)][_0x4804c6(0x456)](_0x41dad6,_0x1ebfe4)&&_0xa5500a[_0x4804c6(0x614)]({'field':_0x1ebfe4,'message':'is\x20not\x20allowed','expected':_0x4804c6(0x515),'actual':_0x4386bf[_0x1ebfe4]});}for(const [_0x569aa4,_0x40871e]of Object[_0x4804c6(0x427)](_0x41dad6)){_0x1b37ef(_0x4386bf[_0x569aa4],_0x40871e,_0x569aa4,_0xa5500a);}if(_0xa5500a[_0x4804c6(0x2eb)]===0x0)return null;return{'code':_0x4804c6(0x5d4),'errors':_0xa5500a};}function _0x19f9b4(_0x1aec5a=[]){const _0x38badc=_0x404a63;if(!Array[_0x38badc(0x579)](_0x1aec5a)||_0x1aec5a['length']===0x0)return null;const _0x2b662d=_0x1aec5a['slice'](0x0,0x3)['map']((_0x5a379f={})=>{const _0x160585=_0x38badc,_0x3dbf57=_0x5a379f[_0x160585(0x647)]?_0x5a379f[_0x160585(0x647)]+'\x20':'';return(''+_0x3dbf57+(_0x5a379f[_0x160585(0x29c)]||_0x160585(0x271)))[_0x160585(0x486)]();})[_0x38badc(0x3a4)](';\x20');return _0x1aec5a[_0x38badc(0x2eb)]>0x3?_0x2b662d+'\x20(+'+(_0x1aec5a[_0x38badc(0x2eb)]-0x3)+_0x38badc(0x15e):_0x2b662d;}function _0x4f037b(_0x24e315,_0x1b2021={}){const _0x22eaf3=_0x404a63,_0x4445c1=_0x1b2021?.[_0x22eaf3(0x657)]?.[_0x22eaf3(0x31b)]??_0x1b2021?.['error']??_0x22eaf3(0x344),_0x505c90=_0x1b2021?.[_0x22eaf3(0x657)]?.[_0x22eaf3(0x108)]??_0x1b2021?.[_0x22eaf3(0x108)]??_0x4445c1?.['details']??null,_0xe70de9=_0x1b2021?.['result']?.[_0x22eaf3(0x60e)]??_0x1b2021?.[_0x22eaf3(0x60e)]??_0x4445c1?.[_0x22eaf3(0x60e)]??null,_0x4c5fb0=_0x1b2021?.[_0x22eaf3(0x657)]?.[_0x22eaf3(0x29c)]??_0x1b2021?.[_0x22eaf3(0x29c)]??_0x4445c1?.[_0x22eaf3(0x29c)]??null,_0x394774=typeof _0x4445c1===_0x22eaf3(0x380)?_0x4445c1:null,_0x1e6d08=typeof _0x394774===_0x22eaf3(0x380)&&/^[A-Z0-9_]+$/[_0x22eaf3(0x30d)](_0x394774),_0x5d9d6=_0xe70de9??(_0x1e6d08?_0x394774:null)??(_0x552970[_0x24e315]||_0x22eaf3(0x3b6)+_0x24e315);let _0x49189b=_0x4c5fb0;!_0x49189b&&typeof _0x394774===_0x22eaf3(0x380)&&!_0x1e6d08&&(_0x49189b=_0x394774);if(!_0x49189b&&_0x5d9d6===_0x22eaf3(0x5d4)){const _0x1952f5=_0x19f9b4(_0x505c90);_0x49189b=_0x1952f5?_0x22eaf3(0x110)+_0x1952f5:_0x22eaf3(0x116);}if(!_0x49189b&&Array[_0x22eaf3(0x579)](_0x505c90)&&_0x505c90['length']>0x0){const _0x202d06=_0x19f9b4(_0x505c90);if(_0x202d06)_0x49189b=_0x202d06;}if(!_0x49189b)_0x49189b=_0x552970[_0x24e315]||_0x22eaf3(0x344);const _0x360537={'code':_0x5d9d6,'message':_0x49189b};if(_0x505c90!=null)_0x360537[_0x22eaf3(0x108)]=_0x505c90;return _0x360537;}function _0x9f9de8(_0x1a454a){const _0x1c7695=_0x404a63,_0x1998e5={};if(!_0x1a454a)return _0x1998e5;for(const _0x19f750 of _0x1a454a[_0x1c7695(0x37c)](';')){const _0x41be89=_0x19f750[_0x1c7695(0x42b)]('=');if(_0x41be89===-0x1)continue;const _0x503dea=_0x19f750[_0x1c7695(0x45e)](0x0,_0x41be89)[_0x1c7695(0x486)](),_0x3020c9=_0x19f750[_0x1c7695(0x45e)](_0x41be89+0x1)['trim']();_0x1998e5[_0x503dea]=decodeURIComponent(_0x3020c9);}return _0x1998e5;}function _0x7db96a(_0x2770cc,_0xe0488d){const _0x212040=_0x404a63;return _0xe0488d=_0x5b8fc6(_0xe0488d),{'status':_0xe0488d[_0x212040(0x626)]??_0x2770cc[_0x212040(0x626)],'headers':{..._0x2770cc[_0x212040(0x5b1)]||{},..._0xe0488d[_0x212040(0x5b1)]||{}},'body':_0xe0488d[_0x212040(0x5e9)]??_0x2770cc['body']};}function _0x3efcfe(_0x30a88a={}){const _0x1ad1fa=_0x404a63;return _0x30a88a[_0x1ad1fa(0x109)]||(_0x30a88a[_0x1ad1fa(0x567)]?_0x1ad1fa(0x567):_0x1ad1fa(0x5d0));}function _0x1ba266(_0xb12e4b){const _0x265069=_0x404a63;if(_0xb12e4b[_0x265069(0x1fc)]?.['internal']===!![])return!![];if(_0xb12e4b[_0x265069(0x1fc)]?.['auth']?.[_0x265069(0x53c)]===!![])return!![];if(_0xb12e4b[_0x265069(0x1fc)]?.[_0x265069(0x37d)]?.['ok']===!![])return!![];return![];}function _0x267036(_0x4406d5,_0x9033a8){const _0x564e74=_0x404a63,_0x2982ea=_0x9033a8[_0x564e74(0x37c)]('.');let _0x35ba41=_0x4406d5;for(const _0x19f97a of _0x2982ea){_0x35ba41=_0x35ba41?.[_0x19f97a];}return _0x35ba41||null;}class _0x38c7a0{constructor(){const _0x272f51=_0x404a63;this[_0x272f51(0x182)]=[],this['guards']=[],this[_0x272f51(0x5d7)]=[],this[_0x272f51(0x62e)]=0x5*0x400*0x400,this['server']=null,this['_sockets']=new Set(),this['auth']={'cookieName':'okdb_session','stateCookieName':'kdb_admin_oauth_state','csrfCookieName':_0x272f51(0x53d)},this['_authOptions']={},this[_0x272f51(0x4d4)]=new Map(),this[_0x272f51(0x476)]=null,this[_0x272f51(0x4cb)]=null,this[_0x272f51(0x3c8)]=new Map(),this[_0x272f51(0x4c5)]=new _0x19a34d(),this[_0x272f51(0x4c2)]=![],this[_0x272f51(0x5a8)]=0x0;}[_0x404a63(0x2f3)](_0x515c7f={}){const _0x1cfd04=_0x404a63;return this['_authOptions']=_0x515c7f||{},this[_0x1cfd04(0x2db)]=_0x515c7f[_0x1cfd04(0x63e)]??'open',this[_0x1cfd04(0x205)];}get['isSetupMode'](){const _0x14cc4f=_0x404a63;if(this[_0x14cc4f(0x31d)]?.['auth'])return this[_0x14cc4f(0x31d)][_0x14cc4f(0x37d)][_0x14cc4f(0x437)];return![];}[_0x404a63(0x65e)](){const _0x5d4295=_0x404a63;if(this['_okdb']?.[_0x5d4295(0x37d)])return this['_okdb'][_0x5d4295(0x37d)][_0x5d4295(0x65e)]();return this[_0x5d4295(0x205)]||{};}['use'](_0x3d3579){const _0xa2affc=_0x404a63;this['middlewares'][_0xa2affc(0x614)](_0x3d3579);}[_0x404a63(0x249)](_0x5793a9,_0x2c3c4d){const _0x4078ea=_0x404a63;this[_0x4078ea(0x519)][_0x4078ea(0x614)]({'match':_0x5793a9,'handler':_0x2c3c4d});}[_0x404a63(0x61d)](_0x192313,_0x14020d,_0x5ba12c,_0x16dbd9={}){const _0x30b292=_0x404a63,_0x52af51={'method':_0x34134f(_0x192313),'path':_0x14020d,'matcher':_0x50387f(_0x14020d),'handler':_0x5ba12c,'meta':_0x16dbd9||{}},_0x598d06=_0x34f30f(_0x52af51);_0x39e179(_0x52af51,_0x598d06),_0x52af51[_0x30b292(0x3d5)]=_0x598d06,_0x52af51[_0x30b292(0x660)]=this[_0x30b292(0x4c2)]===!![];if(_0x52af51['userAdded'])this[_0x30b292(0x5a8)]++;this[_0x30b292(0x5d7)][_0x30b292(0x614)](_0x52af51);}['addRaw'](_0x5e1146,_0x4d0ce4,_0xa7e4af,_0x46a0cb={}){this['add'](_0x5e1146,_0x4d0ce4,_0xa7e4af,{..._0x46a0cb,'raw':!![]});}[_0x404a63(0x3d0)](_0xd49fd5,_0x40120c){const _0x5650ec=_0x404a63;for(const _0x163509 of this['routes']){if(_0x163509[_0x5650ec(0x527)]!==_0x34134f(_0xd49fd5))continue;if(_0x163509[_0x5650ec(0xdd)]['regex'][_0x5650ec(0x30d)](_0x40120c))return _0x163509;}if(_0x34134f(_0xd49fd5)===_0x5650ec(0x346))for(const _0x5c0903 of this['routes']){if(_0x5c0903['matcher']['regex']['test'](_0x40120c)&&_0x5c0903[_0x5650ec(0x664)]?.[_0x5650ec(0x1fb)])return _0x5c0903;}return null;}[_0x404a63(0x52e)](_0x1f839b,_0x51ce1f){const _0x407c5d=_0x404a63;if(_0x1f839b?.['meta']?.[_0x407c5d(0x642)])return![];if(_0x51ce1f?.[_0x407c5d(0x5b1)]?.['x-okdb-raw-response'])return![];return!![];}[_0x404a63(0x33c)](){const _0x8fd44=_0x404a63;return this[_0x8fd44(0x5d7)][_0x8fd44(0x1c6)](_0x3fdeca=>!_0x3fdeca['meta']?.[_0x8fd44(0x350)])[_0x8fd44(0x601)](_0x1c34da=>({'method':_0x1c34da[_0x8fd44(0x527)],'path':_0x1c34da[_0x8fd44(0x42d)],'defaults':_0x1c34da[_0x8fd44(0xdd)]['defaults'],'meta':_0x1c34da['meta'],'operation':_0x1c34da[_0x8fd44(0x3d5)]}));}['addSSE'](_0x2b4d1d,_0x2caf11,_0x389560={}){const _0x56107c=_0x404a63,{PassThrough:_0x1bb23d}=require$$8;this[_0x56107c(0x61d)](_0x56107c(0x58f),_0x2b4d1d,({params:_0x265d40,query:_0x565899,headers:_0x119d21,context:_0x2cb12c})=>{const _0x48ed5f=_0x56107c,_0x59df6a=new _0x1bb23d();let _0x5a5610=null;const _0x508130={};try{_0x2cb12c?.['req']?.[_0x48ed5f(0x143)]?.[_0x48ed5f(0x5d1)](!![]);}catch{}_0x59df6a[_0x48ed5f(0x4ae)](_0x48ed5f(0x302)),_0x5a5610=setInterval(()=>{const _0x1c7a27=_0x48ed5f;try{_0x59df6a['write'](_0x1c7a27(0x159));}catch{}},0x3a98);const _0x163d86=(_0x59bab3,_0x3d8fd0,_0x4cb1e6={})=>{const _0x43efab=_0x48ed5f;try{const _0x44cc26=_0x4cb1e6[_0x43efab(0x13b)]?String(_0x3d8fd0??''):JSON['stringify'](_0x3d8fd0);_0x4cb1e6['id']!=null&&_0x59df6a[_0x43efab(0x4ae)]('id:\x20'+_0x4cb1e6['id']+'\x0a');_0x59df6a[_0x43efab(0x4ae)](_0x43efab(0x4de)+_0x59bab3+'\x0a');for(const _0x28ccac of _0x44cc26[_0x43efab(0x37c)]('\x0a')){_0x59df6a[_0x43efab(0x4ae)]('data:\x20'+_0x28ccac+'\x0a');}_0x59df6a[_0x43efab(0x4ae)]('\x0a');}catch{}},_0x454c97=()=>{const _0x2f3fb9=_0x48ed5f;_0x5a5610&&(clearInterval(_0x5a5610),_0x5a5610=null);try{_0x59df6a[_0x2f3fb9(0x167)]();}catch{}},_0x5e0469=(_0x1883c0,_0x54b510)=>{_0x508130[_0x1883c0]=_0x54b510;};_0x2cb12c?.[_0x48ed5f(0x668)]?.['on'](_0x48ed5f(0x241),_0x454c97),_0x59df6a['on'](_0x48ed5f(0x241),_0x454c97);const _0x403c42=_0x2caf11({'send':_0x163d86,'close':_0x454c97,'params':_0x265d40??{},'query':_0x565899??{},'headers':_0x119d21??{},'context':_0x2cb12c,'setHeader':_0x5e0469});return typeof _0x403c42==='function'&&_0x59df6a['on'](_0x48ed5f(0x241),_0x403c42),{'status':0xc8,'headers':{'content-type':_0x48ed5f(0x276),'cache-control':_0x48ed5f(0x4cf),'connection':_0x48ed5f(0x28d),'x-accel-buffering':'no',..._0x508130},'body':_0x59df6a};},{..._0x389560,'sse':!![]});}async[_0x404a63(0x482)](_0x139878,_0x3b4da1){const _0x195b6d=_0x404a63;for(const _0x383cdd of this['guards']){if(!_0x383cdd['match'](_0x139878))continue;const _0x36ba45=await _0x383cdd[_0x195b6d(0x124)](_0x139878,_0x3b4da1);if(_0x36ba45===![])return![];}return!![];}async[_0x404a63(0x217)](_0x350bcf,_0xe27361,_0x2d2cfb){let _0x4d2f5b=0x0;const _0x407cda=async()=>{const _0x3e80a3=_0x2368,_0x2d6dd5=this[_0x3e80a3(0x182)][_0x4d2f5b++];if(!_0x2d6dd5)return _0x2d2cfb();return _0x2d6dd5(_0x350bcf,_0xe27361,_0x407cda);};return _0x407cda();}[_0x404a63(0x3bf)](_0x513b69,_0x3aa2a3){const _0x1e0a69=_0x404a63,{status:status=0xc8,headers:headers={},body:_0x1a5a9b}=_0x513b69;if(status>=0x12c&&status<0x190)return _0x513b69;if(_0x3e2d4c(_0x1a5a9b))return _0x513b69;if(Buffer[_0x1e0a69(0x666)](_0x1a5a9b))return _0x513b69;if(typeof _0x1a5a9b===_0x1e0a69(0x380))return _0x513b69;const _0xa2d628={'time':+_0x3aa2a3['toFixed'](0x2)};if(_0x1a5a9b?.[_0x1e0a69(0x664)]&&typeof _0x1a5a9b['meta']===_0x1e0a69(0x20e)){const {time:_0x5bddf8,..._0x3f67fb}=_0x1a5a9b[_0x1e0a69(0x664)];Object[_0x1e0a69(0x451)](_0xa2d628,_0x3f67fb);}let _0x5b9e2f;if(status>=0x190){const _0x5d8007=_0x4f037b(status,_0x1a5a9b);_0x5b9e2f={'data':null,'error':_0x5d8007,'meta':_0xa2d628};}else{if(status===0xcc||_0x1a5a9b==null)_0x5b9e2f={'data':null,'error':null,'meta':_0xa2d628};else{let _0x17450e;if(_0x1e0a69(0x657)in _0x1a5a9b)_0x17450e=_0x1a5a9b[_0x1e0a69(0x657)];else{const {meta:_0x4d4fc5,..._0x179d18}=_0x1a5a9b;_0x17450e=Object[_0x1e0a69(0x2f1)](_0x179d18)[_0x1e0a69(0x2eb)]>0x0?_0x179d18:null;}_0x5b9e2f={'data':_0x17450e,'error':null,'meta':_0xa2d628};}}return{'status':status===0xcc?0xc8:status,'headers':headers,'body':_0x5b9e2f};}async[_0x404a63(0x4f3)](_0x24172e,_0x51558c,_0x3591ff={},_0x7df325={}){const _0x5d9a1a=_0x404a63;_0x24172e=_0x34134f(_0x24172e);const _0x5f1097=this['_matchRoute'](_0x24172e,_0x51558c),_0x28cfc2={'method':_0x24172e,'path':_0x51558c,'headers':_0x3591ff[_0x5d9a1a(0x5b1)]??{},'body':_0x3591ff[_0x5d9a1a(0x5e9)]??null,'query':_0x3591ff[_0x5d9a1a(0x3c5)]??{},'context':_0x7df325,'cookies':_0x9f9de8(_0x3591ff[_0x5d9a1a(0x5b1)]?.[_0x5d9a1a(0x1c1)]),'route':_0x5f1097,'socket':{'remoteAddress':_0x3591ff['remoteAddress']??_0x5d9a1a(0x586)}};_0x28cfc2[_0x5d9a1a(0x1fc)]=_0x28cfc2[_0x5d9a1a(0x1fc)]||{};!_0x28cfc2[_0x5d9a1a(0x1fc)][_0x5d9a1a(0x37d)]&&(_0x28cfc2[_0x5d9a1a(0x1fc)][_0x5d9a1a(0x37d)]=await this['authenticateRequest'](_0x28cfc2));if(_0x28cfc2[_0x5d9a1a(0x1fc)][_0x5d9a1a(0x37d)]?.[_0x5d9a1a(0x1d3)])return _0x5b8fc6({'status':0x193,'body':{'error':{'code':_0x5d9a1a(0x263),'message':_0x5d9a1a(0x2d0)}}});_0x28cfc2[_0x5d9a1a(0x1fc)][_0x5d9a1a(0x37d)]?.['user']&&!_0x28cfc2['context'][_0x5d9a1a(0x4fd)]&&(_0x28cfc2[_0x5d9a1a(0x1fc)][_0x5d9a1a(0x4fd)]=_0x28cfc2[_0x5d9a1a(0x1fc)]['auth']['user']);let _0x4bb1eb=null;const _0x15e957={'status'(_0x67693d){const _0x4e31e4=_0x5d9a1a;_0x4bb1eb=_0x4bb1eb||{},_0x4bb1eb[_0x4e31e4(0x626)]=_0x67693d;},'setHeader'(_0x1b3617,_0x331ae3){const _0x29cf5b=_0x5d9a1a;_0x4bb1eb=_0x4bb1eb||{},_0x4bb1eb[_0x29cf5b(0x5b1)]=_0x4bb1eb['headers']||{};const _0x5aa0c0=String(_0x1b3617)[_0x29cf5b(0x3f1)]();if(_0x5aa0c0===_0x29cf5b(0x517)){const _0x25bdf7=_0x4bb1eb[_0x29cf5b(0x5b1)][_0x1b3617];if(!_0x25bdf7)_0x4bb1eb[_0x29cf5b(0x5b1)][_0x1b3617]=_0x331ae3;else{if(Array[_0x29cf5b(0x579)](_0x25bdf7))_0x25bdf7[_0x29cf5b(0x614)](_0x331ae3);else _0x4bb1eb['headers'][_0x1b3617]=[_0x25bdf7,_0x331ae3];}return;}_0x4bb1eb['headers'][_0x1b3617]=_0x331ae3;},'send'(_0x4e413b){const _0x3366e6=_0x5d9a1a;_0x4bb1eb=_0x4bb1eb||{},_0x4bb1eb[_0x3366e6(0x5e9)]=_0x4e413b;}},_0x19dad9=await this[_0x5d9a1a(0x482)](_0x28cfc2,_0x15e957);if(!_0x19dad9)return _0x5b8fc6(_0x4bb1eb??{'status':0x193});const _0x38537b=this[_0x5d9a1a(0x23f)](_0x28cfc2);if(_0x38537b)return _0x5b8fc6(_0x38537b);const _0x1d232a=this[_0x5d9a1a(0x646)](_0x28cfc2);if(_0x1d232a)return _0x5b8fc6(_0x1d232a);return await this[_0x5d9a1a(0x217)](_0x28cfc2,_0x15e957,async()=>{const _0x2a4222=_0x5d9a1a,_0x2184a5=await this[_0x2a4222(0x187)](_0x28cfc2);if(_0x4bb1eb==null){_0x4bb1eb=_0x2184a5;return;}_0x4bb1eb=_0x7db96a(_0x4bb1eb,_0x2184a5);}),_0x5b8fc6(_0x4bb1eb);}[_0x404a63(0x23f)](_0x565d26){const _0x35eb0c=_0x404a63,_0x2ca852=_0x565d26[_0x35eb0c(0x412)]?.[_0x35eb0c(0x3d5)],_0x1c4bd7=_0x2ca852?.['access'];if(!_0x2ca852?.[_0x35eb0c(0x401)]||!_0x1c4bd7)return null;if(_0x565d26[_0x35eb0c(0x1fc)]?.[_0x35eb0c(0x37d)]?.[_0x35eb0c(0x18d)]===!![]||_0x565d26['context']?.[_0x35eb0c(0x37d)]?.[_0x35eb0c(0x435)]===!![])return null;const _0x5828dc=_0x3efcfe(_0x565d26[_0x35eb0c(0x1fc)]),_0x54eef7=Array[_0x35eb0c(0x579)](_0x1c4bd7[_0x35eb0c(0x499)])?_0x1c4bd7['audiences']:null;if(_0x1c4bd7[_0x35eb0c(0x254)]&&_0x565d26[_0x35eb0c(0x1fc)]?.[_0x35eb0c(0x567)]!==!![])return{'status':0x193,'body':{'error':_0x35eb0c(0x3f0)}};if(_0x54eef7&&_0x54eef7[_0x35eb0c(0x2eb)]>0x0&&!_0x54eef7[_0x35eb0c(0x5c0)](_0x5828dc)&&!(_0x5828dc===_0x35eb0c(0x567)&&_0x54eef7['includes'](_0x35eb0c(0x5df))))return{'status':0x193,'body':{'error':'Forbidden'}};if(_0x1c4bd7[_0x35eb0c(0x5d6)]&&!_0x1ba266(_0x565d26))return{'status':0x191,'body':{'error':_0x35eb0c(0x4e1)}};const _0x444a6b=_0x1c4bd7[_0x35eb0c(0x598)];if(!_0x444a6b)return null;if(_0x565d26[_0x35eb0c(0x1fc)]?.[_0x35eb0c(0x37d)]?.[_0x35eb0c(0x49b)]===_0x35eb0c(0x55a))return null;const _0x1fabb9=_0x565d26['context']?.[_0x35eb0c(0x37d)]?.[_0x35eb0c(0x359)];if(!_0x1fabb9){if(_0x565d26[_0x35eb0c(0x1fc)]?.[_0x35eb0c(0x37d)]?.['ok']===!![])return null;return{'status':0x193,'body':{'error':_0x35eb0c(0x62d)}};}if(!_0x565d26['params']&&_0x565d26[_0x35eb0c(0x412)]?.['matcher']){const _0x1ed1e0=_0x565d26['route']['matcher']['regex'][_0x35eb0c(0x4c7)](_0x565d26[_0x35eb0c(0x42d)]);_0x1ed1e0&&(_0x565d26[_0x35eb0c(0x5fe)]={},_0x565d26[_0x35eb0c(0x412)][_0x35eb0c(0xdd)][_0x35eb0c(0x2f1)]['forEach']((_0x597a5c,_0x12e6bc)=>{const _0xe95d6d=_0x35eb0c,_0x2a64a9=_0x1ed1e0[_0x12e6bc+0x1];_0x565d26[_0xe95d6d(0x5fe)][_0x597a5c]=_0x2a64a9?decodeURIComponent(_0x2a64a9):_0x565d26['route'][_0xe95d6d(0xdd)][_0xe95d6d(0x5ca)][_0x597a5c]??undefined;}));}let _0x2ce10a=null;_0x1c4bd7[_0x35eb0c(0x4f8)]?.[_0x35eb0c(0x46e)]&&(_0x2ce10a=_0x267036(_0x565d26,_0x1c4bd7[_0x35eb0c(0x4f8)][_0x35eb0c(0x46e)]));if(_0x2ce10a&&_0x2ce10a['startsWith']('~')){const _0x2c593c=_0x3c5d4e(_0x444a6b),_0x11fd10=_0x11a074(_0x1fabb9[_0x35eb0c(0x3f3)]||[],(_0x1fabb9[_0x35eb0c(0x236)]||{})[_0x2ce10a]||[]);if(!_0x19937c(_0x11fd10,_0x2c593c))return{'status':0x193,'body':{'error':_0x35eb0c(0x5f2)+_0x2c593c+_0x35eb0c(0x544)}};}const _0x37d06b=_0x11a074(_0x1fabb9[_0x35eb0c(0x3f3)]||[],_0x2ce10a?(_0x1fabb9[_0x35eb0c(0x236)]||{})[_0x2ce10a]||[]:[]);if(!_0x19937c(_0x37d06b,_0x444a6b))return{'status':0x193,'body':{'error':_0x35eb0c(0x5f2)+_0x444a6b}};return null;}[_0x404a63(0x646)](_0x5ea775){const _0x20c9fa=_0x404a63,_0x411bb4=_0x5ea775[_0x20c9fa(0x412)],_0x205dae=_0x411bb4?.[_0x20c9fa(0x3d5)];if(!_0x205dae?.[_0x20c9fa(0x401)]||!_0x205dae['inputSchema'])return null;let _0x13c76a=_0x5ea775[_0x20c9fa(0x5fe)]??null;if(!_0x13c76a&&_0x411bb4?.[_0x20c9fa(0xdd)]){const _0x57714a=_0x411bb4[_0x20c9fa(0xdd)][_0x20c9fa(0x5d2)][_0x20c9fa(0x4c7)](_0x5ea775[_0x20c9fa(0x42d)]);_0x57714a&&(_0x13c76a={},_0x411bb4[_0x20c9fa(0xdd)][_0x20c9fa(0x2f1)][_0x20c9fa(0x612)]((_0x3faf64,_0x33749)=>{const _0x5990d0=_0x20c9fa,_0x5c4d0a=_0x57714a[_0x33749+0x1];_0x13c76a[_0x3faf64]=_0x5c4d0a?decodeURIComponent(_0x5c4d0a):_0x411bb4[_0x5990d0(0xdd)]['defaults'][_0x3faf64]??undefined;}));}const _0x55e132=_0x3414aa(_0x411bb4,_0x13c76a??{},_0x5ea775[_0x20c9fa(0x3c5)]??{},_0x5ea775[_0x20c9fa(0x5e9)],_0x5ea775[_0x20c9fa(0x5b1)]??{}),_0x7e8e6a=_0x51c91b(_0x411bb4,_0x55e132||{});if(!_0x7e8e6a)return null;const _0x2a1db0=_0x19f9b4(_0x7e8e6a[_0x20c9fa(0x444)]);return{'status':0x190,'body':{'error':_0x7e8e6a[_0x20c9fa(0x60e)],'code':_0x7e8e6a[_0x20c9fa(0x60e)],'message':_0x2a1db0?_0x20c9fa(0x110)+_0x2a1db0:'Validation\x20failed','details':_0x7e8e6a[_0x20c9fa(0x444)]}};}[_0x404a63(0x62a)](_0x1ecc06,_0x57e5a9){const _0x5f07ce=_0x404a63,_0x1abcaf=_0x51c91b(_0x1ecc06,_0x57e5a9||{});if(!_0x1abcaf)return null;return{'code':_0x1abcaf[_0x5f07ce(0x60e)],'message':_0x19f9b4(_0x1abcaf[_0x5f07ce(0x444)])?_0x5f07ce(0x110)+_0x19f9b4(_0x1abcaf[_0x5f07ce(0x444)]):_0x5f07ce(0x116),'details':_0x1abcaf[_0x5f07ce(0x444)]};}async['_dispatch'](_0x3d6cc0){const _0x180213=_0x404a63;if(_0x3d6cc0[_0x180213(0x527)]==='OPTIONS')for(const _0x173b11 of this[_0x180213(0x5d7)]){const _0xf1d153=_0x173b11['matcher'][_0x180213(0x5d2)][_0x180213(0x4c7)](_0x3d6cc0[_0x180213(0x42d)]);if(!_0xf1d153||!_0x173b11[_0x180213(0x664)]?.[_0x180213(0x1fb)])continue;return{'status':0xcc,'headers':_0x2a8e64(_0x3d6cc0['headers'],_0x173b11[_0x180213(0x664)]['cors'],_0x173b11[_0x180213(0x527)])||{}};}for(const _0x411a81 of this[_0x180213(0x5d7)]){if(_0x411a81[_0x180213(0x527)]!==_0x3d6cc0[_0x180213(0x527)])continue;const _0x55bb9c=_0x411a81[_0x180213(0xdd)][_0x180213(0x5d2)][_0x180213(0x4c7)](_0x3d6cc0[_0x180213(0x42d)]);if(!_0x55bb9c)continue;const _0x2f2d1b={};_0x411a81['matcher'][_0x180213(0x2f1)][_0x180213(0x612)]((_0x5d581e,_0x295b09)=>{const _0x5730e5=_0x180213,_0x5d6c57=_0x55bb9c[_0x295b09+0x1];_0x2f2d1b[_0x5d581e]=_0x5d6c57?decodeURIComponent(_0x5d6c57):_0x411a81['matcher'][_0x5730e5(0x5ca)][_0x5d581e]??undefined;}),_0x3d6cc0[_0x180213(0x5fe)]=_0x2f2d1b;try{const _0x26aca0=await _0x411a81[_0x180213(0x124)]({'params':_0x2f2d1b,'body':_0x3d6cc0[_0x180213(0x5e9)],'query':_0x3d6cc0[_0x180213(0x3c5)],'headers':_0x3d6cc0['headers'],'context':_0x3d6cc0[_0x180213(0x1fc)]}),_0x20b9c7=_0x5b8fc6(_0x26aca0),_0x3cb5bb=_0x2a8e64(_0x3d6cc0[_0x180213(0x5b1)],_0x411a81[_0x180213(0x664)]?.[_0x180213(0x1fb)],_0x411a81[_0x180213(0x527)]);if(!_0x3cb5bb)return _0x20b9c7;return{..._0x20b9c7,'headers':{..._0x20b9c7['headers']||{},..._0x3cb5bb}};}catch(_0x12567c){const _0x5bb3ef=_0x12567c?.['status']||_0x3da15a[_0x12567c?.[_0x180213(0x60e)]]||0x1f4;return{'status':_0x5bb3ef,'body':{'error':_0x12567c[_0x180213(0x29c)]||'Internal\x20error','code':_0x12567c?.['code']||_0x552970[_0x5bb3ef]||_0x180213(0x3b6)+_0x5bb3ef,'message':_0x12567c?.[_0x180213(0x29c)]||_0x180213(0x3b8),..._0x12567c?.[_0x180213(0x108)]!=null?{'details':_0x12567c[_0x180213(0x108)]}:{}}};}}return{'status':0x194,'body':{'error':_0x180213(0x533)}};}[_0x404a63(0x31f)](_0x42317c,_0x3a9588={}){const _0x434338=_0x404a63,_0x3631b4=require$$1$2,_0x174f71=Number(_0x3a9588[_0x434338(0x5bf)])||0x0,_0x39ef88=_0x3a9588[_0x434338(0x2f2)],_0x47f526=_0x3631b4[_0x434338(0x48f)]&&(typeof _0x39ef88===_0x434338(0x26b)?_0x174f71>0x1:_0x174f71>=0x1);if(_0x47f526){if(this[_0x434338(0x34b)])throw new Error(_0x434338(0x65f));const {runClustered:_0x585703}=requireOkdbCluster();if(typeof _0x39ef88==='function')return this[_0x434338(0x34b)]=_0x585703({'workers':_0x174f71,'makeOkdb':_0x39ef88,'port':_0x42317c,'primaryOkdb':_0x3a9588[_0x434338(0x4ad)]}),this['server'];const _0xc25e25=this[_0x434338(0x31d)];if(!_0xc25e25?.[_0x434338(0x59f)])throw new Error(_0x434338(0x32f)+'(open-before-fork\x20seeds\x20the\x20shared\x20__tokenSecret\x20and\x20gives\x20workers\x20the\x20root\x20path).');if(this[_0x434338(0x5a8)]>0x0){const _0x32dd19=new Error(_0x434338(0x398)+_0x174f71+_0x434338(0x5c4)+this['_userRouteCount']+_0x434338(0x34d)+_0x434338(0x10a)+_0x434338(0x585)+_0x434338(0x288)+_0x434338(0x38f));_0x32dd19[_0x434338(0x60e)]=_0x434338(0x4d5);throw _0x32dd19;}let _0x204b8b;try{_0x204b8b=JSON[_0x434338(0x34f)](JSON[_0x434338(0x3d9)](_0xc25e25[_0x434338(0x2aa)]??{}));}catch(_0x16ead7){throw new Error(_0x434338(0x4c3)+_0x16ead7['message']);}return this[_0x434338(0x34b)]=_0x585703({'workers':_0x174f71,'port':_0x42317c,'primaryOkdb':_0xc25e25,'childEntry':!![],'workerEnv':{'OKDB_HTTP_CHILD':JSON[_0x434338(0x3d9)]({'rootPath':_0xc25e25[_0x434338(0x42d)],'port':_0x42317c,'options':_0x204b8b,'logLevel':_0xc25e25[_0x434338(0x2aa)]?.[_0x434338(0x45d)]??_0x434338(0x3d7)})}}),this[_0x434338(0x34b)];}if(this[_0x434338(0x34b)])throw new Error('HTTP\x20server\x20already\x20running');_0x42317c&&this[_0x434338(0x37d)][_0x434338(0x662)]===_0x434338(0x47d)&&(this[_0x434338(0x37d)][_0x434338(0x662)]=_0x434338(0x33e)+_0x42317c,this[_0x434338(0x31d)]?.['auth']&&(this[_0x434338(0x31d)]['auth'][_0x434338(0x623)]=this['auth'][_0x434338(0x662)]));const _0x29a689=this['_okdb']?.[_0x434338(0x2aa)]?.[_0x434338(0x408)]?.[_0x434338(0x3cb)]??![];this[_0x434338(0x34b)]=_0x53a26f[_0x434338(0x2a7)](async(_0x169714,_0x5f332d)=>{const _0x2d8cac=_0x434338,_0x16f343=Date[_0x2d8cac(0x16a)]();if(_0x29a689){const _0x47fabf=_0x169714['url']||'/',_0x46546f=_0x169714['headers']?.[_0x2d8cac(0x494)]?_0x169714[_0x2d8cac(0x5b1)][_0x2d8cac(0x494)][_0x2d8cac(0x38b)](/^Bearer\s+(\S{0,8})\S*/i,_0x2d8cac(0x113)):'-',_0x4de6e1=_0x169714[_0x2d8cac(0x5b1)]?.[_0x2d8cac(0x111)]||'-',_0x13c9f9=_0x169714['headers']?.[_0x2d8cac(0x416)]||_0x169714[_0x2d8cac(0x5b1)]?.[_0x2d8cac(0x2c0)]||'-',_0x438661=_0x169714[_0x2d8cac(0x5b1)]?.[_0x2d8cac(0x424)]||'-';process['stdout'][_0x2d8cac(0x4ae)](_0x2d8cac(0x233)+_0x169714[_0x2d8cac(0x527)]['padEnd'](0x7)+'\x20'+_0x47fabf[_0x2d8cac(0x2c9)](0x2d)+'\x20'+(_0x2d8cac(0x1e2)+_0x46546f+_0x2d8cac(0x2d7)+_0x438661+_0x2d8cac(0x1bf)+_0x4de6e1+_0x2d8cac(0x286)+_0x13c9f9+'\x0a'));}try{const _0x18fe3c=new _0x451322(_0x169714[_0x2d8cac(0x2c4)],_0x2d8cac(0x393)+_0x169714[_0x2d8cac(0x5b1)]['host']),_0x2d8eb5=this[_0x2d8cac(0x3d0)](_0x169714[_0x2d8cac(0x527)],_0x18fe3c[_0x2d8cac(0xe1)]),_0x5b45f0=_0x2d8eb5?.[_0x2d8cac(0x664)]?.[_0x2d8cac(0x13b)]===!![];if(_0x5b45f0){const _0x37b38e=_0x169714['headers']?.[_0x2d8cac(0x409)];if(_0x37b38e!=null){const _0x1d6082=Number(_0x37b38e);if(Number[_0x2d8cac(0x5f8)](_0x1d6082)&&_0x1d6082>this[_0x2d8cac(0x62e)]){_0x5f332d[_0x2d8cac(0x27b)]=0x19d,_0x5f332d[_0x2d8cac(0x62c)]('Payload\x20too\x20large');return;}}}const _0x391b71=_0x5b45f0?null:await _0x559c79(_0x169714,this['maxBodyBytes']),_0x2154db=_0x5b45f0?_0x2003a(_0x169714,this[_0x2d8cac(0x62e)]):undefined,_0x317af5=await this['handle'](_0x169714[_0x2d8cac(0x527)],_0x18fe3c[_0x2d8cac(0xe1)],{'body':_0x391b71,'query':Object[_0x2d8cac(0x3e5)](_0x18fe3c[_0x2d8cac(0x4e7)]['entries']()),'headers':_0x169714[_0x2d8cac(0x5b1)]},{'req':_0x169714,'res':_0x5f332d,'rawStream':_0x2154db}),_0xd06c33=this[_0x2d8cac(0x3d0)](_0x169714[_0x2d8cac(0x527)],_0x18fe3c['pathname']),_0x2d236d=Date['now']()-_0x16f343,_0x136119=this[_0x2d8cac(0x52e)](_0xd06c33,_0x317af5)?this['_wrapApiResponse'](_0x317af5,_0x2d236d):_0x5b8fc6(_0x317af5),_0x31d72a=(_0x136119[_0x2d8cac(0x626)]||0xc8)>=0x190;this[_0x2d8cac(0x4c5)]['record'](_0x169714[_0x2d8cac(0x527)],_0x2d236d,_0x31d72a),_0x287734(_0x5f332d,_0x136119);if(_0x29a689){const _0x533aa8=_0x136119[_0x2d8cac(0x626)]||0xc8,_0x3784f5=Date[_0x2d8cac(0x16a)]()-_0x16f343;process[_0x2d8cac(0x559)][_0x2d8cac(0x4ae)](_0x2d8cac(0x373)+_0x169714[_0x2d8cac(0x527)]['padEnd'](0x7)+'\x20'+_0x18fe3c['pathname'][_0x2d8cac(0x2c9)](0x2d)+'\x20'+_0x533aa8+'\x20\x20'+_0x3784f5+_0x2d8cac(0x543));}}catch(_0x537888){const _0x21d72c=Date[_0x2d8cac(0x16a)]()-_0x16f343;this[_0x2d8cac(0x4c5)]['record'](_0x169714[_0x2d8cac(0x527)],_0x21d72c,!![]);const _0x1ffc72=_0x537888?.[_0x2d8cac(0x626)]||0x1f4;_0x5f332d[_0x2d8cac(0x27b)]=_0x1ffc72,_0x1ffc72===0x19d?_0x5f332d[_0x2d8cac(0x62c)]('Payload\x20too\x20large'):_0x5f332d['end'](_0x537888[_0x2d8cac(0x29c)]||_0x2d8cac(0x3b8));}}),this['server']['on'](_0x434338(0x55c),_0x914894=>{const _0x357629=_0x434338;this[_0x357629(0x491)][_0x357629(0x61d)](_0x914894),_0x914894['on'](_0x357629(0x241),()=>this[_0x357629(0x491)][_0x357629(0x5ed)](_0x914894));}),this[_0x434338(0x34b)]['listen'](_0x42317c);const _0x5b6a57=this['_okdb'];return _0x5b6a57?.[_0x434338(0x532)]&&(_0x5b6a57[_0x434338(0x532)][_0x434338(0x325)](':'+_0x42317c),_0x3631b4[_0x434338(0x60c)]?_0x5b6a57[_0x434338(0x565)]?.({'kind':_0x434338(0x311)})[_0x434338(0x255)](()=>{}):_0x5b6a57[_0x434338(0x17b)]?.({'kind':_0x434338(0x53a),'listenAddr':':'+_0x42317c})['catch'](()=>{})),this[_0x434338(0x34b)];}async[_0x404a63(0x241)](_0x1c0b8f={}){const _0xf5f01f=_0x404a63,_0x51f764=this[_0xf5f01f(0x34b)];this['server']=null;if(_0x51f764&&_0x51f764[_0xf5f01f(0x317)]){try{await _0x51f764[_0xf5f01f(0x241)]();}catch{}this[_0xf5f01f(0x4c5)]&&this['metrics'][_0xf5f01f(0x241)]();return;}if(_0x51f764){const _0x2a7bc9=Number[_0xf5f01f(0x5f8)](_0x1c0b8f[_0xf5f01f(0x524)])?Math[_0xf5f01f(0x47e)](0x0,_0x1c0b8f[_0xf5f01f(0x524)]):0x3e8;await new Promise(_0x3056f7=>{const _0x36fec4=_0xf5f01f;let _0x4489b3=![],_0x495a10=null,_0x58f437=null;const _0xd8ac63=()=>{if(_0x4489b3)return;_0x4489b3=!![];if(_0x495a10)clearTimeout(_0x495a10);if(_0x58f437)clearTimeout(_0x58f437);_0x3056f7();};try{_0x51f764[_0x36fec4(0x241)](_0xd8ac63);}catch{_0xd8ac63();return;}try{_0x51f764[_0x36fec4(0x404)]?.();}catch{}_0x495a10=setTimeout(()=>{const _0x1cf0f3=_0x36fec4;try{_0x51f764[_0x1cf0f3(0x4c1)]?.();}catch{}for(const _0x84a19a of this[_0x1cf0f3(0x491)]){try{_0x84a19a[_0x1cf0f3(0x167)]();}catch{}}_0x58f437=setTimeout(_0xd8ac63,0x64),_0x58f437['unref']?.();},_0x2a7bc9),_0x495a10[_0x36fec4(0x386)]?.();});}this[_0xf5f01f(0x4c5)]&&this[_0xf5f01f(0x4c5)][_0xf5f01f(0x241)]();}[_0x404a63(0x198)](_0x5d3a62,_0x211f68,_0x2cf2db=0x36ee80){const _0x34eb2d=_0x404a63,_0x45e125=Date['now'](),_0x317cb2=Buffer[_0x34eb2d(0x36d)](JSON[_0x34eb2d(0x3d9)]({'iat':_0x45e125,'exp':_0x45e125+_0x2cf2db,..._0x5d3a62}))[_0x34eb2d(0x261)](_0x34eb2d(0x1c4)),_0x1cb073=_0x1d100f(_0x317cb2,_0x211f68);return _0x317cb2+'.'+_0x1cb073;}[_0x404a63(0x553)](_0x809ad9,_0x3eeb41={}){const _0x52f790=_0x404a63,{httpOnly:httpOnly=!![],sameSite:sameSite=_0x52f790(0x368),path:path='/',secure:secure=![],maxAge:maxAge=null,expires:expires=null}=_0x3eeb41;let _0x955ae5=this[_0x52f790(0x37d)]['cookieName']+'='+_0x809ad9;if(httpOnly)_0x955ae5+=_0x52f790(0x4c6);if(sameSite)_0x955ae5+=_0x52f790(0x283)+sameSite;if(path)_0x955ae5+=_0x52f790(0x33f)+path;if(secure)_0x955ae5+=_0x52f790(0x48b);if(Number[_0x52f790(0x5f8)](maxAge))_0x955ae5+=';\x20Max-Age='+Math[_0x52f790(0x47e)](0x0,Math[_0x52f790(0x341)](maxAge));if(expires instanceof Date)_0x955ae5+=_0x52f790(0x3a7)+expires[_0x52f790(0x5f1)]();return _0x955ae5;}[_0x404a63(0x582)](_0x189d88=this[_0x404a63(0x37d)][_0x404a63(0x662)],_0xfc0858={}){const _0x173056=_0x404a63,{path:path='/',sameSite:sameSite='Lax',secure:secure=![],httpOnly:httpOnly=!![]}=_0xfc0858;let _0xf1145f=_0x189d88+'=';if(httpOnly)_0xf1145f+=_0x173056(0x4c6);if(sameSite)_0xf1145f+=';\x20SameSite='+sameSite;if(path)_0xf1145f+=';\x20Path='+path;if(secure)_0xf1145f+=';\x20Secure';return _0xf1145f+=_0x173056(0x5e6),_0xf1145f;}[_0x404a63(0x625)](_0x2ea90f,_0x13b64d){const _0x4be9da=_0x404a63;if(!_0x2ea90f)return null;const [_0x446456,_0x5b4e90]=String(_0x2ea90f)[_0x4be9da(0x37c)]('.');if(!_0x446456||!_0x5b4e90)return null;const _0x1df725=_0x1d100f(_0x446456,_0x13b64d);if(!_0x54f11b(_0x5b4e90,_0x1df725))return null;try{const _0x4ba4be=JSON[_0x4be9da(0x34f)](Buffer['from'](_0x446456,_0x4be9da(0x1c4))[_0x4be9da(0x261)]());if(_0x4ba4be[_0x4be9da(0xfd)]<=Date[_0x4be9da(0x16a)]())return null;return _0x4ba4be;}catch{return null;}}[_0x404a63(0x547)](_0x1477dd){const _0x3239e0=_0x404a63;if(this[_0x3239e0(0x31d)]?.[_0x3239e0(0x37d)])return this['_okdb'][_0x3239e0(0x37d)][_0x3239e0(0x547)](_0x1477dd);return _0x3c10e5(_0x1477dd);}['issueToken'](_0x42f95b){const _0x181832=_0x404a63;if(this[_0x181832(0x31d)]?.[_0x181832(0x37d)])return this[_0x181832(0x31d)][_0x181832(0x37d)][_0x181832(0x610)](_0x42f95b);const _0x1f8ef5=this[_0x181832(0x205)]?.[_0x181832(0x4c4)]??0x36ee80,_0x41f575=this[_0x181832(0x205)]?.['tokenSecret'];return _0x580b0f(_0x42f95b,_0x41f575,_0x1f8ef5);}[_0x404a63(0x1ef)](_0x46c3f6){const _0x6bcd86=_0x404a63;if(this[_0x6bcd86(0x31d)]?.['auth'])return this['_okdb'][_0x6bcd86(0x37d)][_0x6bcd86(0x1ef)](_0x46c3f6);const _0x46ef26=this['_authOptions']?.['tokenSecret'];return _0x3e87bf(_0x46c3f6,_0x46ef26);}async[_0x404a63(0x521)](_0x2b974f){const _0x39923a=_0x404a63;if(this[_0x39923a(0x31d)]?.[_0x39923a(0x37d)])return this[_0x39923a(0x31d)]['auth'][_0x39923a(0x521)](_0x2b974f);if(_0x2b974f[_0x39923a(0x1fc)]?.[_0x39923a(0x567)]===!![]||this[_0x39923a(0x2db)]===_0x39923a(0x18d))return{'id':_0x39923a(0x268),'username':'system','roles':[_0x39923a(0x27f)],'isAuthenticated':!![],'isSystem':!![],'user':{'id':_0x39923a(0x268),'username':_0x39923a(0x268),'roles':[_0x39923a(0x27f)],'isAuthenticated':!![],'isSystem':!![]}};const _0x1e7a2d=this[_0x39923a(0x547)](_0x2b974f['headers']?.[_0x39923a(0x494)]),_0x55f5a3=_0x2b974f[_0x39923a(0x65b)]?.[this['auth']['cookieName']],_0x4973ce=_0x1e7a2d||_0x55f5a3;if(!_0x4973ce)return{'isAuthenticated':![],'isSystem':![],'user':null};const _0x2bba77=this[_0x39923a(0x1ef)](_0x4973ce);if(!_0x2bba77)return{'isAuthenticated':![],'isSystem':![],'user':null};const _0x116eae={'id':_0x2bba77[_0x39923a(0x57f)]??null,'username':_0x2bba77[_0x39923a(0x112)]??null,'roles':Array[_0x39923a(0x579)](_0x2bba77[_0x39923a(0x330)])?_0x2bba77[_0x39923a(0x330)]:[],'isAuthenticated':!![],'isSystem':![]};return{'id':_0x116eae['id'],'username':_0x116eae[_0x39923a(0x112)],'roles':_0x116eae[_0x39923a(0x330)],'isAuthenticated':!![],'isSystem':![],'user':_0x116eae,'claims':_0x2bba77,'subject':_0x116eae['id']};}async[_0x404a63(0x272)](_0xf4ce4a,_0x455793={}){const _0x5d8a3a=_0x404a63,_0x17a644=_0x10c589(_0xf4ce4a),_0x29e035=Array[_0x5d8a3a(0x579)](_0x455793['allowedAlgs'])&&_0x455793[_0x5d8a3a(0x59b)][_0x5d8a3a(0x2eb)]>0x0?_0x455793[_0x5d8a3a(0x59b)]:[_0x5d8a3a(0x462),_0x5d8a3a(0x2a2)],_0x1e85dd=_0x17a644[_0x5d8a3a(0x2f5)]?.[_0x5d8a3a(0x575)];if(!_0x29e035[_0x5d8a3a(0x5c0)](_0x1e85dd))throw new Error(_0x5d8a3a(0x549)+_0x1e85dd);if(!_0x17a644['header']?.[_0x5d8a3a(0x10b)])throw new Error(_0x5d8a3a(0x674));const _0x161549=await this[_0x5d8a3a(0x13f)](_0x455793);if(!_0x161549?.[_0x5d8a3a(0x348)])throw new Error(_0x5d8a3a(0xdb));const _0x1b4247=await this[_0x5d8a3a(0x132)](_0x161549[_0x5d8a3a(0x348)],_0x17a644[_0x5d8a3a(0x2f5)][_0x5d8a3a(0x10b)],_0x455793);if(!_0xba07c4(_0x1e85dd,_0x1b4247,_0x17a644['signingInput'],_0x17a644[_0x5d8a3a(0x318)]))throw new Error(_0x5d8a3a(0x1b8));const _0x59e01c=Math[_0x5d8a3a(0x341)](Date[_0x5d8a3a(0x16a)]()/0x3e8),_0x41a039=_0x17a644[_0x5d8a3a(0x193)]||{};if(_0x41a039['iss']!==_0x161549[_0x5d8a3a(0x11e)])throw new Error(_0x5d8a3a(0x336));const _0x3ca8b1=_0x455793[_0x5d8a3a(0x1ff)];if(_0x3ca8b1){const _0x3ec115=_0x35ee01(_0x41a039['aud']);if(!_0x3ec115[_0x5d8a3a(0x5c0)](_0x3ca8b1))throw new Error(_0x5d8a3a(0x2ed));}if(typeof _0x41a039[_0x5d8a3a(0xfd)]!==_0x5d8a3a(0x17c)||_0x41a039[_0x5d8a3a(0xfd)]<=_0x59e01c)throw new Error('JWT\x20expired');if(_0x41a039[_0x5d8a3a(0x45b)]!=null&&_0x41a039[_0x5d8a3a(0x45b)]>_0x59e01c)throw new Error(_0x5d8a3a(0x5fb));if(_0x41a039[_0x5d8a3a(0x179)]==='id')throw new Error(_0x5d8a3a(0x173));return{'subject':_0x41a039[_0x5d8a3a(0x57f)]??null,'email':_0x41a039[_0x5d8a3a(0x332)]??null,'scopes':typeof _0x41a039[_0x5d8a3a(0x4f8)]==='string'?_0x41a039[_0x5d8a3a(0x4f8)][_0x5d8a3a(0x37c)](/\s+/)[_0x5d8a3a(0x1c6)](Boolean):[],'claims':_0x41a039,'tokenType':_0x5d8a3a(0x35d)};}async['_getOidcDiscovery'](_0x5cad45={}){const _0x366acf=_0x404a63,_0x32d4f6=String(_0x5cad45[_0x366acf(0x11e)]||'')[_0x366acf(0x38b)](/\/+$/,'');if(!_0x32d4f6)return null;const _0x3305f4=Number['isFinite'](_0x5cad45[_0x366acf(0x46c)])?_0x5cad45['discoveryTtlMs']:0xa*0x3c*0x3e8;if(this[_0x366acf(0x476)]?.[_0x366acf(0x11e)]===_0x32d4f6&&this[_0x366acf(0x476)]['expiresAt']>Date[_0x366acf(0x16a)]())return this[_0x366acf(0x476)][_0x366acf(0x392)];const _0x41f8bb=await _0x5b4187(_0x32d4f6+_0x366acf(0x3c0)),_0x409517={'issuer':_0x41f8bb['issuer']||_0x32d4f6,'authorization_endpoint':_0x5cad45[_0x366acf(0x62f)]||_0x41f8bb[_0x366acf(0x107)],'token_endpoint':_0x5cad45['tokenUrl']||_0x41f8bb[_0x366acf(0x35f)],'jwks_uri':_0x5cad45[_0x366acf(0x489)]||_0x41f8bb[_0x366acf(0x348)]};return this[_0x366acf(0x476)]={'issuer':_0x32d4f6,'value':_0x409517,'expiresAt':Date[_0x366acf(0x16a)]()+_0x3305f4},_0x409517;}async[_0x404a63(0x39c)](_0x10efb9,_0x28feea=0x5*0x3c*0x3e8){const _0x4f1427=_0x404a63,_0x25004f=await _0x5b4187(_0x10efb9),_0x2117d6=new Map();for(const _0x48edaa of _0x25004f['keys']||[]){if(!_0x48edaa?.[_0x4f1427(0x10b)])continue;_0x2117d6['set'](_0x48edaa['kid'],_0x41a13a(_0x48edaa));}return this['_jwksCache']={'uri':_0x10efb9,'keys':_0x2117d6,'expiresAt':Date[_0x4f1427(0x16a)]()+_0x28feea},this['_jwksCache'];}async[_0x404a63(0x132)](_0x128044,_0x500ab4,_0x5a7c43={}){const _0x33d9f2=_0x404a63,_0x29eff3=Number[_0x33d9f2(0x5f8)](_0x5a7c43['jwksTtlMs'])?_0x5a7c43['jwksTtlMs']:0x5*0x3c*0x3e8,_0x558df5=0x1e*0x3e8,_0x5d8d38=this[_0x33d9f2(0x3c8)]['get'](_0x500ab4);if(_0x5d8d38!==undefined&&_0x5d8d38>Date[_0x33d9f2(0x16a)]())throw new Error(_0x33d9f2(0x3d1)+_0x500ab4);(!this[_0x33d9f2(0x4cb)]||this[_0x33d9f2(0x4cb)]['uri']!==_0x128044||this['_jwksCache'][_0x33d9f2(0x63c)]<=Date['now']())&&await this[_0x33d9f2(0x39c)](_0x128044,_0x29eff3);let _0x3bc1fd=this[_0x33d9f2(0x4cb)]?.[_0x33d9f2(0x2f1)]?.[_0x33d9f2(0x3aa)](_0x500ab4);if(_0x3bc1fd)return _0x3bc1fd;await this[_0x33d9f2(0x39c)](_0x128044,_0x29eff3),_0x3bc1fd=this[_0x33d9f2(0x4cb)]?.[_0x33d9f2(0x2f1)]?.[_0x33d9f2(0x3aa)](_0x500ab4);if(!_0x3bc1fd){this[_0x33d9f2(0x3c8)][_0x33d9f2(0x2c2)](_0x500ab4,Date[_0x33d9f2(0x16a)]()+_0x558df5);throw new Error(_0x33d9f2(0x3d1)+_0x500ab4);}return _0x3bc1fd;}[_0x404a63(0x2d8)](_0x3d33b7){const _0x2b9200=_0x404a63;if(this[_0x2b9200(0x31d)]?.[_0x2b9200(0x37d)])return this[_0x2b9200(0x31d)][_0x2b9200(0x37d)][_0x2b9200(0x2d8)](_0x3d33b7);const _0x150317=_0x3d33b7?.[_0x2b9200(0x42e)]||{},_0x2fba03={'sub':_0x3d33b7?.['subject']??_0x150317[_0x2b9200(0x57f)]??null,'email':_0x3d33b7?.['email']??_0x150317[_0x2b9200(0x332)]??null,'name':_0x3d33b7?.[_0x2b9200(0x2cc)]??_0x150317[_0x2b9200(0x2cc)]??_0x150317['preferred_username']??null,'groups':_0x3d33b7?.[_0x2b9200(0x3f4)]??_0x150317['groups']??[],'roles':_0x3d33b7?.[_0x2b9200(0x330)]??_0x150317[_0x2b9200(0x330)]??[]};return{'type':'oauth','tokenType':_0x3d33b7?.[_0x2b9200(0x522)]??_0x2b9200(0x35d),'subject':_0x2fba03['sub'],'email':_0x2fba03['email'],'scopes':_0x3d33b7?.['scopes']??_0x150317[_0x2b9200(0x4f8)]?.['split']?.('\x20')?.[_0x2b9200(0x1c6)](Boolean)??[],'claims':_0x150317,'user':_0x2fba03,'isAuthenticated':!![]};}['createLoginState'](_0x5c2525={},_0x3702ef=0x927c0){const _0x149173=_0x404a63;if(this['_okdb']?.['auth'])return this[_0x149173(0x31d)]['auth']['createLoginState'](_0x5c2525,_0x3702ef);const _0x1bdf03=_0xf804a3(0x18);this['_loginStates'][_0x149173(0x2c2)](_0x1bdf03,{..._0x5c2525,'exp':Date['now']()+_0x3702ef});if(this['_loginStates'][_0x149173(0x3ea)]%0x32===0x0){const _0x18a367=Date[_0x149173(0x16a)]();for(const [_0x45e61f,_0x1d6dc8]of this[_0x149173(0x4d4)]){if(_0x1d6dc8[_0x149173(0xfd)]<=_0x18a367)this[_0x149173(0x4d4)][_0x149173(0x5ed)](_0x45e61f);}}return _0x1bdf03;}[_0x404a63(0x2af)](_0x5bce6e){const _0x18f6dd=_0x404a63;if(this[_0x18f6dd(0x31d)]?.[_0x18f6dd(0x37d)])return this[_0x18f6dd(0x31d)][_0x18f6dd(0x37d)][_0x18f6dd(0x2af)](_0x5bce6e);if(!_0x5bce6e)return null;const _0x344a66=this[_0x18f6dd(0x4d4)]['get'](_0x5bce6e);this[_0x18f6dd(0x4d4)][_0x18f6dd(0x5ed)](_0x5bce6e);if(!_0x344a66)return null;if(_0x344a66['exp']<=Date[_0x18f6dd(0x16a)]())return null;return _0x344a66;}}function _0x5b8fc6(_0x625d95){const _0x404a0d=_0x404a63;if(_0x625d95==null)return{'status':0xcc};if(Buffer[_0x404a0d(0x666)](_0x625d95)||_0x3e2d4c(_0x625d95))return{'status':0xc8,'body':_0x625d95};if(typeof _0x625d95==='object'&&'status'in _0x625d95){if(!(_0x404a0d(0x5e9)in _0x625d95)&&!_0x3e2d4c(_0x625d95['body'])){const {status:_0x26774a,headers:_0x4bcd53,..._0x8c4776}=_0x625d95;if(Object[_0x404a0d(0x2f1)](_0x8c4776)['length']>0x0)return{'status':_0x26774a,'headers':_0x4bcd53,'body':_0x8c4776};}return _0x625d95;}return{'status':0xc8,'body':_0x625d95};}function _0x3e2d4c(_0x3ff921){const _0x50aa67=_0x404a63;return _0x3ff921&&typeof _0x3ff921[_0x50aa67(0x274)]===_0x50aa67(0x26b);}function _0x2003a(_0x4dd012,_0x4708f2){const _0x31678d=_0x404a63,{PassThrough:_0x40abb1}=require$$8;let _0x473ef6=0x0,_0x30e5d7=![];const _0x58a056=new _0x40abb1();return _0x4dd012['on'](_0x31678d(0x206),_0xa53f38=>{const _0x2fde96=_0x31678d;if(_0x30e5d7)return;_0x473ef6+=_0xa53f38[_0x2fde96(0x2eb)];if(_0x473ef6>_0x4708f2){_0x30e5d7=!![];const _0x38b06c=new Error('Payload\x20too\x20large');_0x38b06c['status']=0x19d,_0x58a056[_0x2fde96(0x167)](_0x38b06c);return;}if(!_0x58a056[_0x2fde96(0x200)])_0x58a056[_0x2fde96(0x614)](_0xa53f38);}),_0x4dd012['on'](_0x31678d(0x62c),()=>{const _0x3fb3bf=_0x31678d;!_0x30e5d7&&!_0x58a056[_0x3fb3bf(0x200)]&&(_0x30e5d7=!![],_0x58a056[_0x3fb3bf(0x62c)]());}),_0x4dd012['on'](_0x31678d(0x31b),_0x1d1b89=>{const _0x47e74c=_0x31678d;if(!_0x58a056[_0x47e74c(0x200)])_0x58a056[_0x47e74c(0x167)](_0x1d1b89);}),_0x4dd012[_0x31678d(0x152)](),_0x58a056['on'](_0x31678d(0x29d),()=>{const _0x78ab8f=_0x31678d;if(!_0x58a056[_0x78ab8f(0x200)])_0x4dd012[_0x78ab8f(0x29d)]();}),_0x58a056;}function _0x559c79(_0x4a3167,_0x5e7094){const _0x196dea=_0x404a63;if(_0x4a3167[_0x196dea(0x527)]===_0x196dea(0x58f)||_0x4a3167[_0x196dea(0x527)]===_0x196dea(0x594))return null;const _0x4a8c9c=_0x4a3167[_0x196dea(0x5b1)]?.['content-length'];if(_0x4a8c9c!=null){const _0x208fd1=Number(_0x4a8c9c);if(Number[_0x196dea(0x5f8)](_0x208fd1)&&_0x208fd1>_0x5e7094){const _0x1d787a=new Error(_0x196dea(0x38e));_0x1d787a[_0x196dea(0x626)]=0x19d;throw _0x1d787a;}}return new Promise((_0x662fe7,_0x1b0345)=>{const _0x529241=_0x196dea;let _0x5e9d78='',_0x4033b4=0x0;_0x4a3167['on'](_0x529241(0x206),_0x280bf4=>{const _0x42bbbe=_0x529241;_0x4033b4+=_0x280bf4[_0x42bbbe(0x2eb)];if(_0x4033b4>_0x5e7094){try{_0x4a3167[_0x42bbbe(0x167)]();}catch{}const _0x47168d=new Error('Payload\x20too\x20large');_0x47168d[_0x42bbbe(0x626)]=0x19d,_0x1b0345(_0x47168d);return;}_0x5e9d78+=_0x280bf4;}),_0x4a3167['on'](_0x529241(0x62c),()=>{const _0x3d1e4f=_0x529241;if(!_0x5e9d78)return _0x662fe7(null);const _0x50d9b9=_0x4a3167['headers']?.[_0x3d1e4f(0x153)]||'';if(_0x50d9b9['includes']('application/x-www-form-urlencoded')){const _0x4e9b7a={};for(const [_0x2ab30d,_0x1902ca]of new URLSearchParams(_0x5e9d78))_0x4e9b7a[_0x2ab30d]=_0x1902ca;return _0x662fe7(_0x4e9b7a);}try{_0x662fe7(JSON['parse'](_0x5e9d78));}catch(_0x40ecdb){_0x1b0345(_0x40ecdb);}}),_0x4a3167['on']('error',_0x1b0345);});}function _0x287734(_0x3edeb5,_0x155a5e){const _0xf129de=_0x404a63,{status:status=0xc8,headers:headers={},body:_0x56ffe3}=_0x155a5e;_0x3edeb5['statusCode']=status;for(const [_0x1dccc1,_0x37523b]of Object[_0xf129de(0x427)](headers)){_0x3edeb5[_0xf129de(0x36b)](_0x1dccc1,_0x37523b);}if(_0x56ffe3==null){_0x3edeb5[_0xf129de(0x62c)]();return;}if(_0x3e2d4c(_0x56ffe3)){_0x56ffe3['pipe'](_0x3edeb5);return;}if(Buffer[_0xf129de(0x666)](_0x56ffe3)){_0x3edeb5[_0xf129de(0x62c)](_0x56ffe3);return;}if(typeof _0x56ffe3===_0xf129de(0x20e)){!_0x3edeb5[_0xf129de(0x518)](_0xf129de(0x122))&&_0x3edeb5[_0xf129de(0x36b)](_0xf129de(0x122),_0xf129de(0x509));_0x3edeb5['end'](JSON[_0xf129de(0x3d9)](_0x56ffe3));return;}_0x3edeb5[_0xf129de(0x62c)](String(_0x56ffe3));}return okdbHttp[_0x404a63(0x1b3)]=_0x38c7a0,okdbHttp[_0x404a63(0x1b3)]['OKDB_CODE_TO_HTTP_STATUS']=_0x3da15a,okdbHttp[_0x404a63(0x1b3)];}function _0x2368(_0x43d7b3,_0x46a43e){_0x43d7b3=_0x43d7b3-0xdb;const _0x5b4d2d=_0x5b4d();let _0x2368bf=_0x5b4d2d[_0x43d7b3];return _0x2368bf;}var hasRequiredOkdb;function requireOkdb(){const _0x2feb2b=_0x4b361c;if(hasRequiredOkdb)return okdb$1;hasRequiredOkdb=0x1;try{process['loadEnvFile']();}catch{}const _0x1b65f1=require$$1,_0x56a80a=require$$1$1,{resolveWorkers:_0x2c44bd,isShmbufNative:_0x4b1d13}=requireOkdbWorkers();function _0x4f700b(_0x53e6d6){const _0xa1e032=_0x2368,_0x14c20d=_0x53e6d6[_0xa1e032(0x45e)](0x2),_0x44ee19={};let _0x32303b=0x0;while(_0x32303b<_0x14c20d['length']){const _0x5f5585=_0x14c20d[_0x32303b];if(_0x5f5585===_0xa1e032(0x322)||_0x5f5585==='-p')_0x44ee19[_0xa1e032(0x26f)]=Number(_0x14c20d[++_0x32303b]);else{if(_0x5f5585==='--path'||_0x5f5585==='-d')_0x44ee19['path']=_0x14c20d[++_0x32303b];else{if(_0x5f5585==='--key'||_0x5f5585==='-k')_0x44ee19[_0xa1e032(0x174)]=_0x14c20d[++_0x32303b];else{if(_0x5f5585===_0xa1e032(0x5b3)||_0x5f5585==='-c')_0x44ee19[_0xa1e032(0x2b8)]=_0x14c20d[++_0x32303b];else{if(_0x5f5585===_0xa1e032(0x417))_0x44ee19[_0xa1e032(0x45d)]=_0x14c20d[++_0x32303b];else{if(_0x5f5585===_0xa1e032(0x40c))_0x44ee19['noRepl']=!![];else{if(_0x5f5585===_0xa1e032(0x1ec))_0x44ee19[_0xa1e032(0x673)]=!![];else{if(_0x5f5585===_0xa1e032(0x102))_0x44ee19[_0xa1e032(0x5bf)]=_0x14c20d[++_0x32303b];else{if(_0x5f5585===_0xa1e032(0x300))_0x44ee19[_0xa1e032(0x289)]=!![];else{if(_0x5f5585==='--env'||_0x5f5585==='-e')_0x44ee19['env']=_0x14c20d[++_0x32303b];else{if(_0x5f5585===_0xa1e032(0x66a))_0x44ee19[_0xa1e032(0x161)]=_0x14c20d[++_0x32303b];else{if(_0x5f5585==='--changes')_0x44ee19[_0xa1e032(0x669)]=!![];else{if(_0x5f5585===_0xa1e032(0x566))_0x44ee19[_0xa1e032(0x506)]=!![];else{if(_0x5f5585==='--drop')_0x44ee19['drop']=!![];else{if(_0x5f5585==='--open'){const _0x5341bc=[];while(_0x32303b+0x1<_0x14c20d[_0xa1e032(0x2eb)]&&!_0x14c20d[_0x32303b+0x1]['startsWith']('--')){_0x5341bc[_0xa1e032(0x614)](_0x14c20d[++_0x32303b]);}_0x44ee19['open']=_0x5341bc[_0xa1e032(0x2eb)]>0x0?_0x5341bc:!![];}else{if(_0x5f5585==='--log-requests')_0x44ee19[_0xa1e032(0x3cb)]=!![];else{if(_0x5f5585==='--name')_0x44ee19['name']=_0x14c20d[++_0x32303b];else{if(_0x5f5585===_0xa1e032(0x3d6))_0x44ee19[_0xa1e032(0x46f)]=_0x14c20d[++_0x32303b];else{if(_0x5f5585===_0xa1e032(0x160))_0x44ee19[_0xa1e032(0x508)]=_0x14c20d[++_0x32303b];else{if(_0x5f5585==='--permissions')_0x44ee19[_0xa1e032(0x3f3)]=_0x14c20d[++_0x32303b];else{if(_0x5f5585===_0xa1e032(0x58e))_0x44ee19[_0xa1e032(0x236)]=_0x14c20d[++_0x32303b];else{if(_0x5f5585===_0xa1e032(0x5f4))_0x44ee19[_0xa1e032(0x4a7)]=_0x14c20d[++_0x32303b];else{if(_0x5f5585==='--token')_0x44ee19[_0xa1e032(0x359)]=_0x14c20d[++_0x32303b];else{if(_0x5f5585===_0xa1e032(0x463)||_0x5f5585==='-u')_0x44ee19[_0xa1e032(0x112)]=_0x14c20d[++_0x32303b];else{if(_0x5f5585==='--address')_0x44ee19[_0xa1e032(0x5d5)]=_0x14c20d[++_0x32303b];else{if(_0x5f5585===_0xa1e032(0x1e5)||_0x5f5585==='-v'){const _0x4a709f=require$$3;console['log'](_0x4a709f['version']),process['exit'](0x0);}else(_0x5f5585===_0xa1e032(0x44b)||_0x5f5585==='-h')&&(_0xcf29f7(),process['exit'](0x0));}}}}}}}}}}}}}}}}}}}}}}}}}_0x32303b++;}return _0x44ee19;}function _0xcf29f7(){const _0x19c3c2=_0x2368;console[_0x19c3c2(0x4f7)]('\x0a\x20\x20okdb\x20—\x20standalone\x20OKDB\x20server\x0a\x0a\x20\x20Usage:\x0a\x20\x20\x20\x20okdb\x20[options]\x0a\x20\x20\x20\x20okdb\x20<command>\x0a\x0a\x20\x20Options:\x0a\x20\x20\x20\x20-p,\x20--port\x20<port>\x20\x20\x20\x20\x20\x20\x20\x20HTTP\x20port\x20(default:\x208484)\x0a\x20\x20\x20\x20-d,\x20--path\x20<dir>\x20\x20\x20\x20\x20\x20\x20\x20\x20Database\x20directory\x20(default:\x20./okdb-data)\x0a\x20\x20\x20\x20-k,\x20--key\x20\x20<secret>\x20\x20\x20\x20\x20\x20Encryption\x20key\x20for\x20data\x20at\x20rest\x0a\x20\x20\x20\x20-c,\x20--config\x20<file>\x20\x20\x20\x20\x20\x20Config\x20file\x20path\x20(default:\x20.kdbconfig)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--log-level\x20<level>\x20\x20Log\x20level:\x20debug\x20|\x20info\x20|\x20warn\x20|\x20error\x20(default:\x20info)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-repl\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Start\x20server\x20without\x20interactive\x20shell\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-admin\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20admin\x20UI\x0a\x20\x20\x20\x20\x20\x20\x20\x20--open\x20[ip\x20...]\x20\x20\x20\x20\x20\x20Open\x20mode:\x20bypass\x20auth\x20for\x20listed\x20IPs\x20(default:\x20localhost).\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Examples:\x20--open\x20\x20--open\x20192.168.1.0/24\x20\x20--open\x20*\x0a\x20\x20\x20\x20\x20\x20\x20\x20--log-requests\x20\x20\x20\x20\x20\x20\x20Print\x20every\x20HTTP\x20request\x20to\x20stdout\x20(for\x20debugging)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--workers\x20<n>\x20\x20\x20\x20\x20\x20\x20\x20Number\x20of\x20passive\x20HTTP\x20worker\x20processes\x20(default:\x20cores\x20−\x201).\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20The\x20primary\x20runs\x20processing;\x20workers\x20serve\x20HTTP\x20+\x20SSE.\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-cluster\x20\x20\x20\x20\x20\x20\x20\x20\x20Run\x20single-process\x20(equivalent\x20to\x20--workers\x201)\x0a\x20\x20\x20\x20-v,\x20--version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Print\x20version\x20and\x20exit\x0a\x20\x20\x20\x20-h,\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x0a\x0a\x20\x20Commands:\x0a\x20\x20\x20\x20version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Print\x20version\x20and\x20exit\x0a\x20\x20\x20\x20doctor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Run\x20health\x20checks\x0a\x20\x20\x20\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Create\x20.kdbconfig\x20and\x20okdb-data/\x0a\x20\x20\x20\x20token\x20create\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Create\x20a\x20token\x20in\x20the\x20local\x20DB\x20(direct\x20access,\x20no\x20HTTP)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--name\x20<name>\x20\x20\x20\x20\x20\x20For\x20password\x20login\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--password\x20<pass>\x20\x20Password\x20(requires\x20--name)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--label\x20<text>\x20\x20\x20\x20\x20Human\x20description\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--permissions\x20<l>\x20\x20Comma-separated\x20baseline\x20permissions\x20(e.g.\x20\x22*\x22\x20or\x20\x22data:read\x22)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--grants\x20<json>\x20\x20\x20\x20Per-env\x20grants\x20as\x20JSON\x20(e.g.\x20\x27{\x22orders\x22:[\x22data:*\x22]}\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--ttl\x20<ms>\x20\x20\x20\x20\x20\x20\x20\x20\x20Optional\x20TTL\x20in\x20milliseconds\x0a\x20\x20\x20\x20token\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20List\x20all\x20tokens\x20in\x20the\x20local\x20DB\x0a\x20\x20\x20\x20token\x20revoke\x20<id>\x20\x20\x20\x20\x20\x20\x20\x20Revoke\x20(delete)\x20a\x20token\x20by\x20id\x20(full\x20uuid\x20or\x20unique\x20prefix)\x0a\x20\x20\x20\x20join\x20<address>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Join\x20an\x20existing\x20cluster\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--token\x20<t>\x20\x20\x20\x20\x20\x20\x20\x20Bearer\x20token\x20from\x20the\x20cluster\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--username\x20<u>\x20\x20\x20\x20\x20Or,\x20username\x20for\x20login\x20exchange\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--password\x20<p>\x20\x20\x20\x20\x20Password\x20for\x20login\x20exchange\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--address\x20<addr>\x20\x20\x20This\x20node\x27s\x20reachable\x20sync\x20address\x20(required)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--path\x20<dir>\x20\x20\x20\x20\x20\x20\x20Local\x20DB\x20path\x0a\x20\x20\x20\x20backup\x20[dir]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Hot\x20filesystem\x20backup\x20via\x20LMDB\x20native\x20copy\x20(default:\x20./okdb-backup)\x0a\x20\x20\x20\x20export\x20<file>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Streaming\x20NDJSON\x20logical\x20export\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env\x20<name>\x20\x20\x20\x20\x20\x20env\x20to\x20export\x20(default:\x20default)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--types\x20<a,b,...>\x20comma-separated\x20type\x20filter\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--changes\x20\x20\x20\x20\x20\x20\x20\x20\x20include\x20changelog\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--blobs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20also\x20export\x20blob\x20files\x20alongside\x0a\x20\x20\x20\x20import\x20<file>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Streaming\x20NDJSON\x20logical\x20import\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env\x20<name>\x20\x20\x20\x20\x20\x20target\x20env\x20override\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--types\x20<a,b,...>\x20import\x20only\x20these\x20types\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--drop\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20drop\x20&\x20recreate\x20existing\x20types\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--changes\x20\x20\x20\x20\x20\x20\x20\x20\x20restore\x20changelog\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--blobs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20also\x20import\x20blob\x20files\x20alongside\x0a\x20\x20\x20\x20reset\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Delete\x20and\x20recreate\x20database\x20(with\x20confirmation);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20node\x20identity\x20and\x20licenses\x20are\x20preserved\x0a\x20\x20\x20\x20license\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20List\x20stored\x20licenses,\x20current\x20tier,\x20and\x20usage\x0a\x20\x20\x20\x20license\x20<blob|path>\x20\x20\x20\x20\x20\x20Add\x20a\x20license\x20blob\x20(or\x20read\x20from\x20a\x20.license\x20file)\x0a\x20\x20\x20\x20license\x20<activation>\x20\x20\x20\x20\x20Activate\x20a\x20previously-added\x20license\x20with\x20the\x20vendor\x27s\x20token\x0a\x20\x20\x20\x20license\x20<id>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20details\x20for\x20one\x20stored\x20license\x20(by\x20uuid\x20or\x20prefix)\x0a\x20\x20\x20\x20license\x20remove\x20<id>\x20\x20\x20\x20\x20\x20Remove\x20a\x20stored\x20license\x0a\x0a\x20\x20Environment\x20variables:\x0a\x20\x20\x20\x20OKDB_PORT\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20HTTP\x20port\x0a\x20\x20\x20\x20OKDB_PATH\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Database\x20directory\x0a\x20\x20\x20\x20OKDB_LOG_LEVEL\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Log\x20level\x20(debug|info|warn|error)\x0a\x20\x20\x20\x20OKDB_KEY\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Encryption\x20key\x0a\x20\x20\x20\x20OKDB_NO_REPL=1\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20REPL\x0a\x20\x20\x20\x20OKDB_NO_ADMIN=1\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20admin\x20UI\x0a\x20\x20\x20\x20OKDB_HTTP_WORKERS\x20\x20\x20\x20\x20\x20\x20\x20\x20Number\x20of\x20passive\x20HTTP\x20worker\x20processes\x20(default:\x20cores\x20−\x201;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20forced\x20to\x201\x20if\x20the\x20shmbuf\x20native\x20binding\x20is\x20unavailable)\x0a\x0a\x20\x20Config\x20file\x20(.kdbconfig)\x20—\x20JSON,\x20all\x20keys\x20optional:\x0a\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22port\x22:\x20\x20\x20\x20\x208484,\x0a\x20\x20\x20\x20\x20\x20\x22path\x22:\x20\x20\x20\x20\x20\x22./okdb-data\x22,\x0a\x20\x20\x20\x20\x20\x20\x22key\x22:\x20\x20\x20\x20\x20\x20\x22...\x22,\x0a\x20\x20\x20\x20\x20\x20\x22logLevel\x22:\x20\x22info\x22,\x0a\x20\x20\x20\x20\x20\x20\x22noAdmin\x22:\x20\x20false,\x0a\x20\x20\x20\x20\x20\x20\x22noRepl\x22:\x20\x20\x20false,\x0a\x20\x20\x20\x20\x20\x20\x22auth\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22open\x22:\x20false\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20Examples:\x0a\x20\x20\x20\x20okdb\x0a\x20\x20\x20\x20okdb\x20--port\x209000\x20--path\x20./mydb\x0a\x20\x20\x20\x20okdb\x20--no-repl\x20--port\x208080\x0a\x20\x20\x20\x20okdb\x20--open\x0a\x20\x20\x20\x20okdb\x20--open\x20192.168.1.0/24\x0a\x20\x20\x20\x20okdb\x20doctor\x0a\x20\x20\x20\x20okdb\x20backup\x20./my-backup\x0a');}const _0x5eb53f=new Set([_0x2feb2b(0x408),'info',_0x2feb2b(0x27e),_0x2feb2b(0x31b)]);function _0x58293d(_0x20873b){const _0x45668b=_0x2feb2b,_0x3adf30=_0x20873b[_0x45668b(0x2b8)]?_0x1b65f1[_0x45668b(0x4a1)](_0x20873b[_0x45668b(0x2b8)]):_0x1b65f1[_0x45668b(0x4a1)](_0x45668b(0x5a9));let _0x40e4cd={};if(_0x56a80a[_0x45668b(0x5ee)](_0x3adf30))try{const _0x4d2f97=_0x56a80a['readFileSync'](_0x3adf30,_0x45668b(0x365))[_0x45668b(0x38b)](/^\uFEFF/,'');_0x40e4cd=JSON[_0x45668b(0x34f)](_0x4d2f97),console[_0x45668b(0x4f7)]('[okdb]\x20loaded\x20config:\x20'+_0x3adf30);}catch(_0x4676ee){console['error'](_0x45668b(0x562)+_0x3adf30+':\x20'+_0x4676ee[_0x45668b(0x29c)]),process['exit'](0x1);}const _0x2e65f9={'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},_0x7be6de={'port':_0x20873b[_0x45668b(0x26f)]??_0x40e4cd[_0x45668b(0x26f)]??_0x2e65f9[_0x45668b(0x26f)]??0x2124,'dbPath':_0x20873b[_0x45668b(0x42d)]??_0x40e4cd['path']??_0x2e65f9[_0x45668b(0x42d)]??_0x45668b(0x1ee),'key':_0x20873b['key']??_0x40e4cd[_0x45668b(0x174)]??_0x2e65f9[_0x45668b(0x174)]??undefined,'logLevel':_0x20873b[_0x45668b(0x45d)]??_0x40e4cd[_0x45668b(0x45d)]??_0x2e65f9[_0x45668b(0x45d)]??_0x45668b(0x3d7),'noRepl':_0x20873b[_0x45668b(0x2bd)]??_0x40e4cd[_0x45668b(0x2bd)]??_0x2e65f9[_0x45668b(0x2bd)]??![],'noAdmin':_0x20873b['noAdmin']??_0x40e4cd[_0x45668b(0x673)]??_0x2e65f9['noAdmin']??![],'admin':_0x40e4cd[_0x45668b(0x27f)]??{},'api':_0x40e4cd[_0x45668b(0x60f)]??undefined,'auth':_0x40e4cd['auth']??undefined,'mcp':_0x40e4cd['mcp']??undefined,'http':_0x40e4cd[_0x45668b(0x5d0)]??undefined,'timeMachine':_0x40e4cd[_0x45668b(0x232)]!==![]?_0x40e4cd[_0x45668b(0x232)]??{}:![]};if(_0x20873b['noCluster'])_0x7be6de[_0x45668b(0x289)]=!![];if(_0x20873b['workers']!==undefined)_0x7be6de[_0x45668b(0x194)]=_0x20873b[_0x45668b(0x5bf)];return _0x20873b[_0x45668b(0x18d)]!==undefined&&(_0x7be6de['auth']=_0x7be6de['auth']||{},_0x7be6de[_0x45668b(0x37d)]['open']=_0x20873b[_0x45668b(0x18d)]),_0x20873b[_0x45668b(0x3cb)]&&(_0x7be6de[_0x45668b(0x408)]=_0x7be6de[_0x45668b(0x408)]||{},_0x7be6de[_0x45668b(0x408)]['logRequests']=!![]),(!Number[_0x45668b(0xde)](_0x7be6de[_0x45668b(0x26f)])||_0x7be6de[_0x45668b(0x26f)]<0x1||_0x7be6de[_0x45668b(0x26f)]>0xffff)&&(console[_0x45668b(0x31b)](_0x45668b(0x12b)+_0x7be6de['port']+_0x45668b(0x264)),process[_0x45668b(0x542)](0x1)),!_0x5eb53f[_0x45668b(0x39f)](_0x7be6de[_0x45668b(0x45d)])&&(console[_0x45668b(0x31b)](_0x45668b(0x16d)+_0x7be6de[_0x45668b(0x45d)]+'\x22\x20(must\x20be\x20debug|info|warn|error)'),process[_0x45668b(0x542)](0x1)),_0x7be6de;}function _0x2b35c1(_0x5b8243){const _0x417be4=_0x2feb2b;return!!(_0x5b8243&&typeof _0x5b8243===_0x417be4(0x20e)&&!Array[_0x417be4(0x579)](_0x5b8243)&&Object[_0x417be4(0x2f1)](_0x5b8243)[_0x417be4(0x2eb)]>0x0);}const _0xb6fba5=!process[_0x2feb2b(0x559)][_0x2feb2b(0x52b)]||!!process.env.NO_COLOR;function _0x48ad76(_0x83c403,_0xc57ff6){return _0xb6fba5?_0xc57ff6:'\x1b['+_0x83c403+'m'+_0xc57ff6+'\x1b[0m';}function _0x5b43a0(_0x444caa){const _0x394236=_0x2feb2b;if(!_0x444caa||_0x444caa[_0x394236(0x2eb)]===0x0)return;const _0x5cf756='─'[_0x394236(0x473)](0x38);process['stderr'][_0x394236(0x4ae)]('\x0a'),process[_0x394236(0x16f)][_0x394236(0x4ae)](_0x48ad76('33',_0x394236(0x371)+_0x444caa[_0x394236(0x2eb)]+'\x20SECURITY\x20NOTICE'+(_0x444caa[_0x394236(0x2eb)]>0x1?'S':'')+'\x0a')),process[_0x394236(0x16f)][_0x394236(0x4ae)]('\x20\x20'+_0x5cf756+'\x0a');for(const _0x227fef of _0x444caa){const _0x20c330=_0x227fef[_0x394236(0x294)]===_0x394236(0x31b)?_0x48ad76('31',_0x394236(0x307)):_0x48ad76('33',_0x394236(0x12d));process['stderr'][_0x394236(0x4ae)](_0x20c330+'\x20\x20'+_0x48ad76('1',_0x227fef['title'])+'\x0a'),process[_0x394236(0x16f)]['write'](_0x394236(0x63a)+_0x227fef['message']+'\x0a');if(_0x227fef[_0x394236(0x1a4)])process['stderr']['write'](_0x394236(0x63a)+_0x48ad76('2',_0x394236(0x154)+_0x227fef[_0x394236(0x1a4)])+'\x0a');process[_0x394236(0x16f)][_0x394236(0x4ae)]('\x0a');}process['stderr'][_0x394236(0x4ae)]('\x20\x20'+_0x5cf756+'\x0a\x0a');}function _0x47de7d(_0x2f7381,_0x20686c,_0x17b9a8={}){const _0x40e962=_0x2feb2b,_0x31c77b=_0x2f7381[_0x40e962(0x5d0)][_0x40e962(0x31f)](_0x20686c,_0x17b9a8);if(_0x31c77b&&_0x31c77b[_0x40e962(0x317)])return Promise['resolve'](_0x31c77b);return new Promise((_0x5d7547,_0x35af26)=>{const _0x5b7c7a=_0x40e962;_0x31c77b[_0x5b7c7a(0x292)]('listening',_0x5d7547),_0x31c77b['once'](_0x5b7c7a(0x31b),_0x35af26);});}async function _0x3a8f5c(_0x28e023){const _0x1991b8=_0x2feb2b,_0x2856cf=require$$4$1;console[_0x1991b8(0x4f7)](_0x1991b8(0x1ce));let _0x151427=!![];const _0x314fa7=(_0x202188,_0x2ae8f1)=>{console['log']('\x20\x20'+(_0x202188?'✓':'✗')+'\x20'+_0x2ae8f1);if(!_0x202188)_0x151427=![];},_0x2e609b=Number(process[_0x1991b8(0x2ea)][_0x1991b8(0x38b)]('v','')['split']('.')[0x0]);_0x314fa7(_0x2e609b>=0x12,_0x1991b8(0x2cd)+process[_0x1991b8(0x2ea)]+(_0x2e609b<0x12?_0x1991b8(0x24a):''));const _0x334f4e=_0x1b65f1[_0x1991b8(0x4a1)](_0x28e023[_0x1991b8(0x64c)]);try{_0x56a80a[_0x1991b8(0x2cf)](_0x334f4e,{'recursive':!![]});const _0xb23b33=_0x1b65f1['join'](_0x334f4e,_0x1991b8(0x677));_0x56a80a[_0x1991b8(0x59d)](_0xb23b33,''),_0x56a80a[_0x1991b8(0x207)](_0xb23b33),_0x314fa7(!![],'database\x20path\x20writable:\x20'+_0x334f4e);}catch(_0x2b4225){_0x314fa7(![],'database\x20path\x20not\x20writable:\x20'+_0x334f4e+_0x1991b8(0x129)+_0x2b4225[_0x1991b8(0x29c)]+')');}const _0x420ef2=await new Promise(_0x87d6d9=>{const _0x30530d=_0x1991b8,_0x56656c=_0x2856cf[_0x30530d(0x2a7)]();_0x56656c[_0x30530d(0x292)](_0x30530d(0x31b),()=>_0x87d6d9(![])),_0x56656c['once']('listening',()=>{const _0x1cc671=_0x30530d;_0x56656c[_0x1cc671(0x241)](),_0x87d6d9(!![]);}),_0x56656c[_0x30530d(0x31f)](_0x28e023['port'],_0x30530d(0x586));});_0x314fa7(_0x420ef2,_0x1991b8(0x30e)+_0x28e023['port']+'\x20'+(_0x420ef2?_0x1991b8(0x119):'already\x20in\x20use'));const _0x4ae031=_0x1b65f1[_0x1991b8(0x4a1)](_0x1991b8(0x5a9));if(_0x56a80a['existsSync'](_0x4ae031))try{JSON[_0x1991b8(0x34f)](_0x56a80a[_0x1991b8(0xe7)](_0x4ae031,'utf8')['replace'](/^\uFEFF/,'')),_0x314fa7(!![],_0x1991b8(0x49f)+_0x4ae031);}catch(_0x35d536){_0x314fa7(![],'config\x20file\x20invalid:\x20'+_0x35d536['message']);}else _0x314fa7(!![],_0x1991b8(0x48e));if(_0x4b1d13()){const _0x1922ad=_0x2c44bd(_0x28e023,{'shmbufNative':!![]});_0x314fa7(!![],_0x1991b8(0x492)+_0x1922ad+'\x20worker'+(_0x1922ad===0x1?'':'s')+')');}else _0x314fa7(!![],_0x1991b8(0x55e));if(!_0x420ef2)try{const _0x2d4d85=require(_0x1991b8(0x248)),_0x17f5f8=new _0x2d4d85(_0x334f4e,{'engines':![],'asyncProcessors':![],'compaction':_0x1991b8(0x573),'http':![],'bus':![],'auth':{'open':!![]}});await _0x17f5f8[_0x1991b8(0x18d)]();try{await _0x17f5f8[_0x1991b8(0x532)]['open']({'reader':!![]});const _0x8b2530=_0x17f5f8[_0x1991b8(0x532)]['listNodes'](),_0x2f3989=_0x8b2530[_0x1991b8(0x1c6)](_0x20b7c3=>_0x20b7c3['supervisorKey']!=null)[_0x1991b8(0x2eb)];_0x314fa7(!![],_0x1991b8(0x1ea)+_0x8b2530[_0x1991b8(0x2eb)]+'\x20process'+(_0x8b2530[_0x1991b8(0x2eb)]===0x1?'':'es')+'\x20('+_0x2f3989+_0x1991b8(0x504));}finally{await _0x17f5f8['close']();}}catch{}console[_0x1991b8(0x4f7)](''),_0x151427?console['log']('\x20\x20All\x20checks\x20passed.\x0a'):(console['log'](_0x1991b8(0x1dd)),process[_0x1991b8(0x542)](0x1));}async function _0x35ffc0(){const _0x54a9a8=_0x2feb2b,_0xffe557=_0x1b65f1['resolve'](_0x54a9a8(0x5a9));!_0x56a80a[_0x54a9a8(0x5ee)](_0xffe557)?(_0x56a80a[_0x54a9a8(0x59d)](_0xffe557,JSON[_0x54a9a8(0x3d9)]({'port':0x2124,'path':_0x54a9a8(0x1ee),'logLevel':'info','noRepl':![],'noAdmin':![]},null,0x2)+'\x0a'),console[_0x54a9a8(0x4f7)](_0x54a9a8(0x1cf))):console['log']('[okdb]\x20.kdbconfig\x20already\x20exists\x20—\x20skipping');const _0x4d2c7b=_0x1b65f1[_0x54a9a8(0x4a1)](_0x54a9a8(0x1ee));!_0x56a80a[_0x54a9a8(0x5ee)](_0x4d2c7b)?(_0x56a80a[_0x54a9a8(0x2cf)](_0x4d2c7b,{'recursive':!![]}),console[_0x54a9a8(0x4f7)](_0x54a9a8(0x552))):console[_0x54a9a8(0x4f7)]('[okdb]\x20./okdb-data\x20already\x20exists\x20—\x20skipping'),console[_0x54a9a8(0x4f7)]('\x0a\x20\x20Run\x20okdb\x20to\x20start\x20the\x20server.\x0a');}async function _0x44b834(_0x7f2725){const _0x5be37f=_0x2feb2b,_0x38ee1b=_0x1b65f1[_0x5be37f(0x4a1)](_0x7f2725['dbPath']);if(!_0x56a80a[_0x5be37f(0x5ee)](_0x38ee1b)){console['log'](_0x5be37f(0x5a3)+_0x38ee1b+_0x5be37f(0x1a8));return;}const _0x513721=require$$0$2,_0x3f48d9=_0x513721[_0x5be37f(0x15a)]({'input':process[_0x5be37f(0x61c)],'output':process[_0x5be37f(0x559)]}),_0x34af10=await new Promise(_0x1a47fa=>_0x3f48d9[_0x5be37f(0x1fd)](_0x5be37f(0x3da)+_0x38ee1b+_0x5be37f(0x3c3),_0x1a47fa));_0x3f48d9[_0x5be37f(0x241)](),console['log']('');if(_0x34af10[_0x5be37f(0x486)]()['toLowerCase']()!=='yes'){console[_0x5be37f(0x4f7)](_0x5be37f(0xf7));return;}let _0x2e987c=null;try{_0x2e987c=await _0x3d51a4(_0x38ee1b,_0x7f2725,async _0x318ce5=>{const _0x44a7a5=_0x5be37f,_0x516b30=_0x318ce5[_0x44a7a5(0x18f)],_0x3aee24=_0x516b30?.['db']?.['get'](_0x44a7a5(0x551))??null,_0x219294=[];if(_0x516b30?.[_0x44a7a5(0x431)]('~licenses'))for(const {key:_0x406f41,value:_0xfa4961}of _0x516b30[_0x44a7a5(0x391)](_0x44a7a5(0x3a6))){_0x219294[_0x44a7a5(0x614)]({'key':_0x406f41,'value':_0xfa4961});}return{'identity':_0x3aee24,'licenses':_0x219294};});}catch(_0x2df5ee){console['log']('[okdb]\x20warning:\x20could\x20not\x20read\x20node\x20identity/licenses\x20before\x20reset\x20('+_0x2df5ee[_0x5be37f(0x29c)]+')\x20—\x20they\x20will\x20NOT\x20be\x20preserved');}_0x56a80a[_0x5be37f(0xeb)](_0x38ee1b,{'recursive':!![],'force':!![]}),console[_0x5be37f(0x4f7)](_0x5be37f(0x1b9)+_0x38ee1b+_0x5be37f(0x284));if(_0x2e987c&&(_0x2e987c['identity']||_0x2e987c[_0x5be37f(0x592)][_0x5be37f(0x2eb)]>0x0))try{await _0x3d51a4(_0x38ee1b,_0x7f2725,async _0x44ccbb=>{const _0x56e6a4=_0x5be37f,_0x5f13b9=_0x44ccbb[_0x56e6a4(0x18f)];_0x2e987c[_0x56e6a4(0x665)]&&_0x5f13b9['db']['putSync'](_0x56e6a4(0x551),_0x2e987c[_0x56e6a4(0x665)]);if(_0x2e987c[_0x56e6a4(0x592)][_0x56e6a4(0x2eb)]>0x0){if(!_0x5f13b9[_0x56e6a4(0x431)]('~licenses'))await _0x5f13b9[_0x56e6a4(0x428)](_0x56e6a4(0x3a6));for(const {key:_0x406bf0,value:_0x2107b1}of _0x2e987c[_0x56e6a4(0x592)]){await _0x5f13b9[_0x56e6a4(0x42f)]('~licenses',_0x406bf0,_0x2107b1);}}});const _0x502d5e=[];if(_0x2e987c[_0x5be37f(0x665)])_0x502d5e['push']('node\x20identity');if(_0x2e987c[_0x5be37f(0x592)]['length']>0x0)_0x502d5e['push'](_0x2e987c[_0x5be37f(0x592)][_0x5be37f(0x2eb)]+_0x5be37f(0x5a6));console[_0x5be37f(0x4f7)](_0x5be37f(0x4da)+_0x502d5e[_0x5be37f(0x3a4)](_0x5be37f(0x40b)));}catch(_0x23ed7b){console[_0x5be37f(0x4f7)](_0x5be37f(0x266)+_0x23ed7b[_0x5be37f(0x29c)]);}}async function _0x3d51a4(_0xe4748e,_0x5da162,_0x3f1cb2){const _0x1f370c=_0x2feb2b,_0x5f085a=require$$5,_0xc10287=new _0x5f085a(_0xe4748e,{'admin':![],'mcp':![],'http':![],'timeMachine':![],'engines':![],'asyncProcessors':![],'compaction':_0x1f370c(0x573),'bus':![],'_skipBootRuntime':!![],..._0x5da162[_0x1f370c(0x174)]?{'encryptionKey':_0x5da162[_0x1f370c(0x174)]}:{}});await _0xc10287[_0x1f370c(0x18d)]();try{return await _0x3f1cb2(_0xc10287);}finally{await _0xc10287['close']();}}async function _0x1eecf7(_0x4bc9d8,_0x5621c5){const _0x845b32=_0x2feb2b,_0x4aa841=require$$5,_0x51813c=_0x1b65f1[_0x845b32(0x4a1)](_0x5621c5['dbPath']);console[_0x845b32(0x4f7)]('[okdb]\x20opening\x20'+_0x51813c+'…');const _0x5a6255=new _0x4aa841(_0x51813c,_0x5621c5[_0x845b32(0x174)]?{'encryptionKey':_0x5621c5[_0x845b32(0x174)]}:{});await _0x5a6255['open'](),console['log'](_0x845b32(0x5f7)+_0x4bc9d8+'…');const {envs:_0x24e36f}=await _0x5a6255[_0x845b32(0x5bb)][_0x845b32(0x329)](_0x4bc9d8);for(const _0x37888c of _0x24e36f){const _0x4ee6ff=_0x37888c[_0x845b32(0xfb)]>0x0?_0x845b32(0x129)+(_0x37888c[_0x845b32(0xfb)]/0x400/0x400)[_0x845b32(0x4a8)](0x2)+_0x845b32(0x32c)+(_0x37888c['sizeAfter']/0x400/0x400)[_0x845b32(0x4a8)](0x2)+_0x845b32(0x440):'';console[_0x845b32(0x4f7)](_0x845b32(0x118)+_0x37888c[_0x845b32(0x2cc)]+_0x845b32(0x2ff)+_0x37888c[_0x845b32(0x604)]+_0x4ee6ff);}await _0x5a6255[_0x845b32(0x241)](),console[_0x845b32(0x4f7)](_0x845b32(0xf2));}async function _0x27c3f3(_0x34c5f9,_0x13de21,_0x4be405){const _0x359289=_0x2feb2b,_0x3b19fb=require$$5,_0x47f23a=_0x1b65f1[_0x359289(0x4a1)](_0x13de21[_0x359289(0x64c)]),_0x5970c3=_0x4be405[_0x359289(0x46e)]??_0x359289(0x1e4),_0x518056=_0x4be405['types']?_0x4be405['types']['split'](',')[_0x359289(0x601)](_0x5ac672=>_0x5ac672[_0x359289(0x486)]()):null;console[_0x359289(0x4f7)](_0x359289(0x1cb)+_0x47f23a+'…');const _0x26c496=new _0x3b19fb(_0x47f23a,_0x13de21[_0x359289(0x174)]?{'encryptionKey':_0x13de21['key']}:{});await _0x26c496[_0x359289(0x18d)](),console['log'](_0x359289(0x679)+_0x5970c3+_0x359289(0x225)+_0x34c5f9+'…');const _0x26365e=await _0x26c496[_0x359289(0x5bb)][_0x359289(0x478)](_0x34c5f9,{'envName':_0x5970c3,'types':_0x518056,'includeChanges':!!_0x4be405[_0x359289(0x669)]});console[_0x359289(0x4f7)](_0x359289(0x536)+_0x26365e['types']+_0x359289(0x321)+_0x26365e[_0x359289(0x520)]+_0x359289(0x2d1)+_0x26365e[_0x359289(0x669)]);if(_0x4be405['blobs']){const _0x4ec6e1=_0x1b65f1[_0x359289(0x3a4)](_0x1b65f1['dirname'](_0x34c5f9),_0x359289(0x506));process[_0x359289(0x559)][_0x359289(0x4ae)]('[okdb]\x20exporting\x20blobs…');const {count:_0x47987d,bytes:_0x1cdadf}=await _0x26c496[_0x359289(0x5bb)]['exportBlobs'](_0x4ec6e1);console[_0x359289(0x4f7)](_0x359289(0x645)+_0x4ec6e1+_0x359289(0x129)+_0x47987d+_0x359289(0x186)+(_0x47987d!==0x1?'s':'')+',\x20'+(_0x1cdadf/0x400/0x400)[_0x359289(0x4a8)](0x2)+_0x359289(0x440));}await _0x26c496['close'](),console[_0x359289(0x4f7)](_0x359289(0x370));}async function _0x58e636(_0x5e67b7,_0xdc6aa5,_0x2613fd){const _0x541a65=_0x2feb2b,_0xadc158=require$$5,_0x3c1c57=_0x1b65f1[_0x541a65(0x4a1)](_0xdc6aa5['dbPath']),_0x39ce2e=_0x2613fd['env']??null,_0x4f8b81=_0x2613fd['types']?_0x2613fd[_0x541a65(0x161)][_0x541a65(0x37c)](',')[_0x541a65(0x601)](_0x19d7f3=>_0x19d7f3[_0x541a65(0x486)]()):null,_0x838679=!!_0x2613fd['drop'];console['log'](_0x541a65(0x1cb)+_0x3c1c57+'…');const _0x45f7b0=new _0xadc158(_0x3c1c57,_0xdc6aa5[_0x541a65(0x174)]?{'encryptionKey':_0xdc6aa5['key']}:{});await _0x45f7b0[_0x541a65(0x18d)](),console[_0x541a65(0x4f7)](_0x541a65(0x44e)+_0x5e67b7+'…');const _0x414bcd=await _0x45f7b0['migrate'][_0x541a65(0x63d)](_0x5e67b7,{'envName':_0x39ce2e,'types':_0x4f8b81,'dropExisting':_0x838679,'includeChanges':!!_0x2613fd[_0x541a65(0x669)],'onProgress':({type:_0x17bdb8,count:_0x392269})=>{const _0x5a8233=_0x541a65;process[_0x5a8233(0x559)]['write'](_0x5a8233(0x351)+_0x17bdb8+':\x20'+_0x392269+_0x5a8233(0x218));}});process['stdout']['write']('\x0a'),console['log'](_0x541a65(0x125)+_0x414bcd[_0x541a65(0x161)]+_0x541a65(0x321)+_0x414bcd[_0x541a65(0x520)]+_0x541a65(0x2d1)+_0x414bcd['changes']);if(_0x2613fd[_0x541a65(0x506)]){const _0x42d906=_0x1b65f1[_0x541a65(0x3a4)](_0x1b65f1[_0x541a65(0x43e)](_0x5e67b7),_0x541a65(0x506));if(_0x56a80a[_0x541a65(0x5ee)](_0x42d906)){const {imported:_0x52cbe4,skipped:_0x2457c0}=await _0x45f7b0['migrate']['importBlobs'](_0x42d906);console[_0x541a65(0x4f7)](_0x541a65(0x1f6)+_0x52cbe4+_0x541a65(0x282)+_0x2457c0);}}await _0x45f7b0[_0x541a65(0x241)](),console[_0x541a65(0x4f7)](_0x541a65(0x2c6));}async function _0x3217eb(_0x59dddb,_0x584e4b){const _0x1e5644=_0x2feb2b;_0x584e4b[_0x1e5644(0x46f)]&&!_0x584e4b[_0x1e5644(0x2cc)]&&(console[_0x1e5644(0x31b)](_0x1e5644(0x273)),process[_0x1e5644(0x542)](0x1));const _0x5c842a=_0x584e4b[_0x1e5644(0x3f3)]?_0x584e4b[_0x1e5644(0x3f3)]['split'](',')[_0x1e5644(0x601)](_0x2d5616=>_0x2d5616[_0x1e5644(0x486)]())[_0x1e5644(0x1c6)](Boolean):[];let _0xf5f55f={};if(_0x584e4b['grants'])try{_0xf5f55f=JSON[_0x1e5644(0x34f)](_0x584e4b['grants']);if(typeof _0xf5f55f!=='object'||Array[_0x1e5644(0x579)](_0xf5f55f)||_0xf5f55f===null)throw new Error();}catch{console[_0x1e5644(0x31b)](_0x1e5644(0x2b6)),process[_0x1e5644(0x542)](0x1);}const _0x21e0a6=require$$5,{randomToken:_0x318445,hashToken:_0x23c126,hashPassword:_0x28c77b}=requireOkdbAuthTokens(),_0x3830ad=require$$2,_0xdd64c8=_0x1b65f1['resolve'](_0x59dddb[_0x1e5644(0x64c)]),_0x830200=new _0x21e0a6(_0xdd64c8,_0x59dddb['key']?{'encryptionKey':_0x59dddb[_0x1e5644(0x174)]}:{});await _0x830200[_0x1e5644(0x18d)]();try{await _0x830200[_0x1e5644(0x37d)][_0x1e5644(0x1e6)]();if(_0x584e4b[_0x1e5644(0x2cc)]){const _0x19e6b2=await _0x830200[_0x1e5644(0x37d)][_0x1e5644(0x2df)](_0x584e4b[_0x1e5644(0x2cc)]);_0x19e6b2&&(console[_0x1e5644(0x31b)](_0x1e5644(0x39d)+_0x584e4b['name']+_0x1e5644(0x43d)),process[_0x1e5644(0x542)](0x1));}const _0xf1f171=_0x318445(0x20),_0x5713f5=_0x23c126(_0xf1f171),_0x2d4d2c=_0x584e4b[_0x1e5644(0x46f)]?await _0x28c77b(_0x584e4b[_0x1e5644(0x46f)]):null,_0xdffca4=_0x3830ad[_0x1e5644(0x3ba)](),_0x217149={'tokenHash':_0x5713f5,'name':_0x584e4b[_0x1e5644(0x2cc)]||null,'passwordHash':_0x2d4d2c,'label':_0x584e4b[_0x1e5644(0x508)]||null,'permissions':_0x5c842a,'grants':_0xf5f55f,'createdAt':Date[_0x1e5644(0x16a)](),'lastUsedAt':null},_0x5538f8=_0x584e4b[_0x1e5644(0x4a7)]?{'ttl':Number(_0x584e4b[_0x1e5644(0x4a7)])}:undefined;await _0x830200['_systemEnv']['put'](_0x1e5644(0x471),_0xdffca4,_0x217149,_0x5538f8),console['log'](_0x1e5644(0x183)),console[_0x1e5644(0x4f7)](_0x1e5644(0x621)+_0xdffca4),console['log']('\x20\x20\x20\x20name:\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x584e4b[_0x1e5644(0x2cc)]||_0x1e5644(0x406))),console[_0x1e5644(0x4f7)]('\x20\x20\x20\x20label:\x20\x20\x20\x20\x20\x20\x20'+(_0x584e4b[_0x1e5644(0x508)]||_0x1e5644(0x406))),console[_0x1e5644(0x4f7)](_0x1e5644(0x3ac)+(_0x5c842a[_0x1e5644(0x3a4)](',\x20')||_0x1e5644(0x1da))),console['log'](_0x1e5644(0x4b3)),console[_0x1e5644(0x4f7)](_0x1e5644(0x3cf)+_0xf1f171+'\x0a');}finally{await _0x830200[_0x1e5644(0x241)]();}}async function _0x21c86d(_0x27c195){const _0x5421bb=_0x2feb2b,_0x3dd9df=require$$5,_0x8140b9=_0x1b65f1['resolve'](_0x27c195['dbPath']),_0x4a761a=new _0x3dd9df(_0x8140b9,_0x27c195[_0x5421bb(0x174)]?{'encryptionKey':_0x27c195[_0x5421bb(0x174)]}:{});await _0x4a761a['open']();try{const _0x44fc96=_0x4a761a[_0x5421bb(0x18f)];if(!_0x44fc96||!_0x44fc96['hasType'](_0x5421bb(0x471))){console[_0x5421bb(0x4f7)](_0x5421bb(0x2fe));return;}const _0x23f114=[];for(const {key:_0x3a4ec2,value:_0x2842ee}of _0x44fc96[_0x5421bb(0x391)]('~tokens')){_0x23f114[_0x5421bb(0x614)]({'id':_0x3a4ec2,'name':_0x2842ee['name']||_0x5421bb(0x406),'label':_0x2842ee[_0x5421bb(0x508)]||_0x5421bb(0x406),'permissions':Array[_0x5421bb(0x579)](_0x2842ee[_0x5421bb(0x3f3)])?_0x2842ee[_0x5421bb(0x3f3)]['join'](','):'','created':_0x2842ee[_0x5421bb(0x375)]?new Date(_0x2842ee[_0x5421bb(0x375)])[_0x5421bb(0x4c8)]()[_0x5421bb(0x45e)](0x0,0xa):''});}if(_0x23f114[_0x5421bb(0x2eb)]===0x0){console[_0x5421bb(0x4f7)](_0x5421bb(0x2fe));return;}const _0x37f545=!process[_0x5421bb(0x559)][_0x5421bb(0x59e)]||process[_0x5421bb(0x559)][_0x5421bb(0x59e)]>=0x64,_0x301b7c=_0x37f545?0x24:0xa,_0x185908=['ID'[_0x5421bb(0x2c9)](_0x301b7c),'NAME'['padEnd'](0x10),'LABEL'[_0x5421bb(0x2c9)](0x14),'PERMISSIONS'[_0x5421bb(0x2c9)](0x14),'CREATED'][_0x5421bb(0x3a4)]('\x20\x20');console[_0x5421bb(0x4f7)]('\x0a'+_0x185908),console[_0x5421bb(0x4f7)]('-'[_0x5421bb(0x473)](_0x185908[_0x5421bb(0x2eb)]));for(const _0xfee115 of _0x23f114){const _0x474259=_0x37f545?_0xfee115['id']:_0xfee115['id'][_0x5421bb(0x45e)](0x0,0x8)+'…';console[_0x5421bb(0x4f7)]([_0x474259[_0x5421bb(0x2c9)](_0x301b7c),_0xfee115[_0x5421bb(0x2cc)][_0x5421bb(0x45e)](0x0,0x10)[_0x5421bb(0x2c9)](0x10),_0xfee115[_0x5421bb(0x508)]['slice'](0x0,0x14)[_0x5421bb(0x2c9)](0x14),_0xfee115[_0x5421bb(0x3f3)]['slice'](0x0,0x14)[_0x5421bb(0x2c9)](0x14),_0xfee115[_0x5421bb(0x2be)]][_0x5421bb(0x3a4)]('\x20\x20'));}console[_0x5421bb(0x4f7)]('');}finally{await _0x4a761a[_0x5421bb(0x241)]();}}async function _0x2e0358(_0xd6c2b8,_0x166adb){const _0x26b541=_0x2feb2b;!_0xd6c2b8&&(console[_0x26b541(0x31b)]('[okdb]\x20error:\x20revoke\x20requires\x20an\x20id\x20argument'),process[_0x26b541(0x542)](0x1));const _0x2352d4=require$$5,_0x1007dd=_0x1b65f1[_0x26b541(0x4a1)](_0x166adb[_0x26b541(0x64c)]),_0x4787ec=new _0x2352d4(_0x1007dd,_0x166adb[_0x26b541(0x174)]?{'encryptionKey':_0x166adb[_0x26b541(0x174)]}:{});await _0x4787ec[_0x26b541(0x18d)]();try{const _0x4b1c73=_0x4787ec[_0x26b541(0x18f)];(!_0x4b1c73||!_0x4b1c73['hasType'](_0x26b541(0x471)))&&(console[_0x26b541(0x31b)]('[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22'+_0xd6c2b8+'\x22'),process[_0x26b541(0x542)](0x1));let _0x17af17=null,_0x1425ce=null;const _0x3b1733=_0x4b1c73[_0x26b541(0x3aa)](_0x26b541(0x471),_0xd6c2b8);if(_0x3b1733)_0x17af17=_0xd6c2b8,_0x1425ce=_0x3b1733;else{const _0x20dda8=[];for(const {key:_0x351bbf,value:_0xd922d7}of _0x4b1c73[_0x26b541(0x391)]('~tokens')){if(_0x351bbf[_0x26b541(0x3cc)](_0xd6c2b8))_0x20dda8['push']({'key':_0x351bbf,'value':_0xd922d7});}_0x20dda8[_0x26b541(0x2eb)]===0x0&&(console[_0x26b541(0x31b)](_0x26b541(0x505)+_0xd6c2b8+'\x22'),process['exit'](0x1));if(_0x20dda8['length']>0x1){console[_0x26b541(0x31b)]('[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22'+_0xd6c2b8+_0x26b541(0x500)+_0x20dda8[_0x26b541(0x2eb)]+'\x20tokens:');for(const _0x2af5a7 of _0x20dda8){console[_0x26b541(0x31b)]('\x20\x20'+_0x2af5a7['key']+'\x20\x20(name:\x20'+(_0x2af5a7[_0x26b541(0x392)][_0x26b541(0x2cc)]||_0x26b541(0x406))+')');}process['exit'](0x1);}_0x17af17=_0x20dda8[0x0][_0x26b541(0x174)],_0x1425ce=_0x20dda8[0x0]['value'];}await _0x4b1c73['remove']('~tokens',_0x17af17),console['log'](_0x26b541(0x139)+_0x17af17+_0x26b541(0x3ae)+(_0x1425ce[_0x26b541(0x2cc)]||_0x26b541(0x406))+_0x26b541(0x4dc)+(_0x1425ce['label']||_0x26b541(0x406))+')');}finally{await _0x4787ec['close']();}}function _0x1eeb01(_0x4fefa9,_0x59ffab){const _0x56c18e=_0x2feb2b;if(!_0x4fefa9[_0x56c18e(0x377)])return _0x56c18e(0x3a9);const _0x45e678=_0x4fefa9[_0x56c18e(0x63c)];if(!_0x45e678)return _0x56c18e(0x22d);if(_0x59ffab>_0x45e678)return _0x56c18e(0x2fc);return _0x56c18e(0x22d);}function _0x581cc9(_0x37bcfc){const _0x52a0ac=_0x2feb2b;if(!_0x37bcfc||typeof _0x37bcfc!==_0x52a0ac(0x20e))return'';const _0x5c6902=Object['entries'](_0x37bcfc)[_0x52a0ac(0x1c6)](([,_0x3c7ff4])=>_0x3c7ff4)[_0x52a0ac(0x601)](([_0x3ed2a2])=>_0x3ed2a2);if(_0x5c6902[_0x52a0ac(0x2eb)]===0x0)return _0x52a0ac(0x1da);if(_0x5c6902['length']<=0x3)return _0x5c6902[_0x52a0ac(0x3a4)]('\x20');return _0x5c6902[_0x52a0ac(0x45e)](0x0,0x3)[_0x52a0ac(0x3a4)]('\x20')+('\x20+'+(_0x5c6902[_0x52a0ac(0x2eb)]-0x3));}async function _0x2c9abf(_0x31aa83){const _0x173144=_0x2feb2b,_0x595094=require$$5,_0x29b1f7=requireOkdbLicenseCodec(),{_C:_0x5c5b1a}=requireOkdbLicense(),_0x102fce=_0x1b65f1[_0x173144(0x4a1)](_0x31aa83['dbPath']),_0x467745=new _0x595094(_0x102fce,_0x31aa83[_0x173144(0x174)]?{'encryptionKey':_0x31aa83[_0x173144(0x174)]}:{});await _0x467745[_0x173144(0x18d)]();try{const _0xc195b9=_0x467745[_0x173144(0x18f)],_0x563002=_0xc195b9?.['db']?.[_0x173144(0x3aa)]?.(_0x173144(0x25e))??0x0,_0x3bcdde=[..._0x467745[_0x173144(0x5bd)][_0x173144(0x2f1)]()][_0x173144(0x1c6)](_0x4e323a=>!_0x4e323a[_0x173144(0x3cc)]('~'))[_0x173144(0x2eb)],_0x314839=_0x467745[_0x173144(0x1e7)]?.['effective'];if(_0x314839){const _0x147a8f=_0x314839['_isFree']===!![],_0x505b64=_0x147a8f?_0x173144(0x26a):_0x467745['_license'][_0x173144(0x22d)]?.[_0x173144(0x56c)]||_0x173144(0x354);console[_0x173144(0x4f7)](''),console[_0x173144(0x4f7)](_0x173144(0x1c5)+_0x505b64);const _0xa64902=_0x314839[_0x173144(0x546)]||{};if(_0xa64902['maxWrites']){const _0x22574f=Math[_0x173144(0x1df)](_0x563002/_0xa64902[_0x173144(0x178)]*0x64);console[_0x173144(0x4f7)](_0x173144(0x3ec)+_0x563002[_0x173144(0x620)]()+_0x173144(0xf0)+_0xa64902[_0x173144(0x178)][_0x173144(0x620)]()+_0x173144(0x129)+_0x22574f+'%)');}else console[_0x173144(0x4f7)](_0x173144(0x3ec)+_0x563002[_0x173144(0x620)]());_0xa64902[_0x173144(0xec)]?console[_0x173144(0x4f7)](_0x173144(0x539)+_0x3bcdde+_0x173144(0xf0)+_0xa64902[_0x173144(0xec)]):console[_0x173144(0x4f7)](_0x173144(0x539)+_0x3bcdde),_0x5c5b1a?.[_0x173144(0x10e)]&&console[_0x173144(0x4f7)](_0x173144(0x627)+_0x5c5b1a[_0x173144(0x10e)]+_0x173144(0x208));}if(!_0xc195b9||!_0xc195b9[_0x173144(0x431)](_0x173144(0x3a6))){console[_0x173144(0x4f7)](''),console[_0x173144(0x4f7)]('\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.'),console[_0x173144(0x4f7)]('');return;}const _0x22bcf9=[],_0x449f44=Date[_0x173144(0x16a)](),_0x2c17dc=_0x467745['id'],_0x3707dc=_0x173144(0x106);for(const {key:_0x58089a,value:_0x2e132f}of _0xc195b9[_0x173144(0x391)](_0x173144(0x3a6))){const _0x54f0fa=_0x2e132f[_0x173144(0xe9)]?Buffer[_0x173144(0x36d)](_0x2e132f[_0x173144(0xe9)],_0x173144(0x439)):Buffer[_0x173144(0x4fe)](0x8);let _0x573bdd='';try{_0x573bdd=_0x29b1f7[_0x173144(0x5e3)](_0x2c17dc,_0x54f0fa,_0x3707dc)[_0x173144(0x41b)];}catch{}_0x22bcf9[_0x173144(0x614)]({'id':_0x58089a,'licensee':_0x2e132f[_0x173144(0x56c)]||'','expires':_0x2e132f[_0x173144(0x63c)]?new Date(_0x2e132f[_0x173144(0x63c)])[_0x173144(0x4c8)]()[_0x173144(0x45e)](0x0,0xa):'','features':_0x581cc9(_0x2e132f[_0x173144(0x26d)]),'pin':_0x573bdd,'status':_0x1eeb01(_0x2e132f,_0x449f44)});}if(_0x22bcf9[_0x173144(0x2eb)]===0x0){console['log'](''),console[_0x173144(0x4f7)]('\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.'),console[_0x173144(0x4f7)]('');return;}const _0x295280=['\x20\x20'+'ID'[_0x173144(0x2c9)](0xe),_0x173144(0x3fc)[_0x173144(0x2c9)](0xe),_0x173144(0x2a1)[_0x173144(0x2c9)](0xc),'FEATURES'[_0x173144(0x2c9)](0x1e),_0x173144(0x36a)[_0x173144(0x2c9)](0xa),_0x173144(0x237)][_0x173144(0x3a4)]('\x20');console[_0x173144(0x4f7)]('\x0a'+_0x295280);for(const _0x357335 of _0x22bcf9){const _0x8c003e=_0x357335['id']['slice'](0x0,0x8)+'…';console[_0x173144(0x4f7)](['\x20\x20'+_0x8c003e[_0x173144(0x2c9)](0xe),_0x357335[_0x173144(0x56c)]['slice'](0x0,0xe)[_0x173144(0x2c9)](0xe),_0x357335['expires'][_0x173144(0x2c9)](0xc),_0x357335['features']['slice'](0x0,0x1e)[_0x173144(0x2c9)](0x1e),_0x357335[_0x173144(0x41b)][_0x173144(0x2c9)](0xa),_0x357335['status']][_0x173144(0x3a4)]('\x20'));}console[_0x173144(0x4f7)]('');}finally{await _0x467745['close']();}}async function _0x595de3(_0x2e957d,_0x204b71){const _0x5cceef=_0x2feb2b,_0xd9e739=require$$5,_0x36c56e=requireOkdbLicenseCodec();let _0x1a8a8c=_0x2e957d;(_0x36c56e[_0x5cceef(0x5d9)](_0x2e957d)==='path'||_0x56a80a[_0x5cceef(0x5ee)](_0x2e957d)&&_0x56a80a['statSync'](_0x2e957d)[_0x5cceef(0x4e9)]())&&(_0x1a8a8c=_0x56a80a[_0x5cceef(0xe7)](_0x2e957d,'utf8')[_0x5cceef(0x486)]());const _0x3d9d68=_0x1b65f1[_0x5cceef(0x4a1)](_0x204b71[_0x5cceef(0x64c)]),_0x2a0eb3=new _0xd9e739(_0x3d9d68,_0x204b71[_0x5cceef(0x174)]?{'encryptionKey':_0x204b71[_0x5cceef(0x174)]}:{});await _0x2a0eb3['open']();try{!_0x2a0eb3[_0x5cceef(0x1e7)]&&(console[_0x5cceef(0x31b)](_0x5cceef(0x411)),process[_0x5cceef(0x542)](0x1));let _0x133d70;try{_0x133d70=await _0x2a0eb3['_license'][_0x5cceef(0x313)](_0x1a8a8c);}catch(_0x2d6f75){console[_0x5cceef(0x31b)](_0x5cceef(0x4b6)+_0x2d6f75[_0x5cceef(0x29c)]),process[_0x5cceef(0x542)](0x1);}const _0x4faeaa=_0x2a0eb3[_0x5cceef(0x1e7)][_0x5cceef(0x23a)](),_0x4b5222=_0x4faeaa[_0x5cceef(0x29a)](_0x5df53a=>_0x5df53a[_0x5cceef(0x57a)]===_0x133d70['id'])?.[_0x5cceef(0x41b)]||'',_0x57af43=Object['entries'](_0x133d70[_0x5cceef(0x26d)]||{})[_0x5cceef(0x1c6)](([,_0x4f6d58])=>_0x4f6d58)[_0x5cceef(0x601)](([_0x2083b7])=>_0x2083b7),_0x4a7d6a=_0x133d70[_0x5cceef(0x546)]||{},_0x58afd0=[_0x4a7d6a[_0x5cceef(0xec)]?_0x5cceef(0x240)+_0x4a7d6a['envs']:null,_0x4a7d6a[_0x5cceef(0x202)]?_0x5cceef(0x4f6)+_0x4a7d6a['typesPerEnv']:null,_0x4a7d6a['syncPeers']?'peers='+_0x4a7d6a[_0x5cceef(0x1dc)]:null,_0x4a7d6a[_0x5cceef(0x178)]?_0x5cceef(0x287)+_0x4a7d6a[_0x5cceef(0x178)][_0x5cceef(0x620)]():null][_0x5cceef(0x1c6)](Boolean)['join']('\x20\x20'),_0x4d5872=_0x133d70[_0x5cceef(0x400)]===_0x36c56e[_0x5cceef(0x2ad)];console[_0x5cceef(0x4f7)]('\x0a\x20\x20✓\x20License\x20added'),console[_0x5cceef(0x4f7)](_0x5cceef(0x41a)+_0x133d70['id']),console[_0x5cceef(0x4f7)](_0x5cceef(0x364)+_0x133d70[_0x5cceef(0x56c)]),console[_0x5cceef(0x4f7)]('\x20\x20\x20\x20expires:\x20\x20\x20'+new Date(_0x133d70['expiresAt'])['toISOString']()[_0x5cceef(0x45e)](0x0,0xa)),console[_0x5cceef(0x4f7)](_0x5cceef(0x1a6)+(_0x57af43['join'](',\x20')||'(none)'));if(_0x58afd0)console['log'](_0x5cceef(0x64e)+_0x58afd0);_0x4d5872?(console[_0x5cceef(0x4f7)](_0x5cceef(0x229)),console['log']('')):(console[_0x5cceef(0x4f7)]('\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20'+_0x4b5222),console['log'](_0x5cceef(0x497)),console[_0x5cceef(0x4f7)](''),console['log'](_0x5cceef(0x1bd)),console[_0x5cceef(0x4f7)](_0x5cceef(0x53e)+_0x4b5222+_0x5cceef(0xdc)),console[_0x5cceef(0x4f7)](_0x5cceef(0x1c8)),console[_0x5cceef(0x4f7)](_0x5cceef(0x1b5)),console[_0x5cceef(0x4f7)](''));}finally{await _0x2a0eb3['close']();}}async function _0x4e05a9(_0x2744fd,_0x4ac45b){const _0x22b8b5=_0x2feb2b,_0xc3fc1d=require$$5,_0x573ee4=_0x1b65f1[_0x22b8b5(0x4a1)](_0x4ac45b[_0x22b8b5(0x64c)]),_0x25eff4=new _0xc3fc1d(_0x573ee4,_0x4ac45b[_0x22b8b5(0x174)]?{'encryptionKey':_0x4ac45b[_0x22b8b5(0x174)]}:{});await _0x25eff4[_0x22b8b5(0x18d)]();try{!_0x25eff4[_0x22b8b5(0x1e7)]&&(console[_0x22b8b5(0x31b)]('[okdb]\x20error:\x20license\x20management\x20is\x20only\x20available\x20in\x20licensed\x20builds\x20(npm\x20run\x20build:prod).'),process[_0x22b8b5(0x542)](0x1));let _0x112ab0;try{_0x112ab0=await _0x25eff4[_0x22b8b5(0x1e7)]['activateLicense'](_0x2744fd['trim']());}catch(_0x35e7ef){console[_0x22b8b5(0x31b)](_0x22b8b5(0x4b6)+_0x35e7ef[_0x22b8b5(0x29c)]),console['error'](''),console[_0x22b8b5(0x31b)](_0x22b8b5(0x4b0)),console['error'](_0x22b8b5(0x19a)),console[_0x22b8b5(0x31b)]('\x20\x20\x20\x20-\x20The\x20activation\x20token\x20was\x20issued\x20for\x20a\x20different\x20node\x20—\x20share\x20this\x20node\x27s\x20PIN\x20with\x20the\x20vendor.'),console[_0x22b8b5(0x31b)](_0x22b8b5(0x2fd)),console[_0x22b8b5(0x31b)](''),process[_0x22b8b5(0x542)](0x1);}console[_0x22b8b5(0x4f7)](_0x22b8b5(0x16c)),console[_0x22b8b5(0x4f7)](_0x22b8b5(0x41a)+_0x112ab0['id']),console[_0x22b8b5(0x4f7)]('\x20\x20\x20\x20licensee:\x20\x20'+_0x112ab0['licensee']),console[_0x22b8b5(0x4f7)](_0x22b8b5(0x571)+new Date(_0x112ab0[_0x22b8b5(0x63c)])['toISOString']()[_0x22b8b5(0x45e)](0x0,0xa)),console['log'](_0x22b8b5(0x426)),console[_0x22b8b5(0x4f7)]('');}finally{await _0x25eff4[_0x22b8b5(0x241)]();}}async function _0x56c23b(_0x16052e,_0x54622c){const _0x496b5f=_0x2feb2b;!_0x16052e&&(console['error'](_0x496b5f(0x4a6)),process[_0x496b5f(0x542)](0x1));const _0x514cfc=require$$5,_0x5042d6=requireOkdbLicenseCodec(),_0x58b713=_0x1b65f1[_0x496b5f(0x4a1)](_0x54622c[_0x496b5f(0x64c)]),_0x4e104d=new _0x514cfc(_0x58b713,_0x54622c[_0x496b5f(0x174)]?{'encryptionKey':_0x54622c[_0x496b5f(0x174)]}:{});await _0x4e104d['open']();try{const _0x248b43=_0x4e104d['_systemEnv'];(!_0x248b43||!_0x248b43['hasType'](_0x496b5f(0x3a6)))&&(console['error']('[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22'+_0x16052e+'\x22'),process[_0x496b5f(0x542)](0x1));let _0x38638f=null,_0xfbd70a=null;const _0x3b866d=_0x248b43[_0x496b5f(0x3aa)](_0x496b5f(0x3a6),_0x16052e);if(_0x3b866d)_0x38638f=_0x16052e,_0xfbd70a=_0x3b866d;else{const _0x4d3995=[];for(const {key:_0x309fd0,value:_0x2cc05a}of _0x248b43[_0x496b5f(0x391)](_0x496b5f(0x3a6))){if(_0x309fd0[_0x496b5f(0x3cc)](_0x16052e))_0x4d3995['push']({'key':_0x309fd0,'value':_0x2cc05a});}_0x4d3995[_0x496b5f(0x2eb)]===0x0&&(console[_0x496b5f(0x31b)](_0x496b5f(0x1e8)+_0x16052e+'\x22'),process[_0x496b5f(0x542)](0x1)),_0x4d3995[_0x496b5f(0x2eb)]>0x1&&(console['error']('[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22'+_0x16052e+_0x496b5f(0x500)+_0x4d3995['length']+_0x496b5f(0x175)),process['exit'](0x1)),_0x38638f=_0x4d3995[0x0][_0x496b5f(0x174)],_0xfbd70a=_0x4d3995[0x0][_0x496b5f(0x392)];}const _0x1de12b=Date[_0x496b5f(0x16a)](),_0x47f1bc=_0x1eeb01(_0xfbd70a,_0x1de12b),_0x3ebe65=_0x4e104d['id'],_0xc4be21=_0x496b5f(0x106);let _0x328628='';try{const _0x542fd7=Buffer[_0x496b5f(0x36d)](_0xfbd70a[_0x496b5f(0xe9)],'hex');_0x328628=_0x5042d6[_0x496b5f(0x5e3)](_0x3ebe65,_0x542fd7,_0xc4be21)[_0x496b5f(0x41b)];}catch{}const _0x49ea2c=_0xfbd70a[_0x496b5f(0x26d)]?Object[_0x496b5f(0x427)](_0xfbd70a[_0x496b5f(0x26d)])['filter'](([,_0x4c182d])=>_0x4c182d)[_0x496b5f(0x601)](([_0x3018bc])=>_0x3018bc):[],_0x1e6a3a=_0xfbd70a[_0x496b5f(0x546)]||{},_0x1131c8=_0x248b43?.['db']?.[_0x496b5f(0x3aa)]?.(_0x496b5f(0x25e))??0x0,_0x2b57f2=[..._0x4e104d[_0x496b5f(0x5bd)]['keys']()][_0x496b5f(0x1c6)](_0x1f68f8=>!_0x1f68f8[_0x496b5f(0x3cc)]('~'))[_0x496b5f(0x2eb)];console[_0x496b5f(0x4f7)](_0x496b5f(0x470)),console[_0x496b5f(0x4f7)](_0x496b5f(0x41a)+_0x38638f),console[_0x496b5f(0x4f7)](_0x496b5f(0x364)+(_0xfbd70a[_0x496b5f(0x56c)]||'')),console[_0x496b5f(0x4f7)](_0x496b5f(0x571)+(_0xfbd70a['expiresAt']?new Date(_0xfbd70a[_0x496b5f(0x63c)])[_0x496b5f(0x4c8)]()[_0x496b5f(0x45e)](0x0,0xa):'')),console['log'](_0x496b5f(0x1a6)+(_0x49ea2c['join'](',\x20')||_0x496b5f(0x1da))),console[_0x496b5f(0x4f7)](_0x496b5f(0x576)+_0x328628),console[_0x496b5f(0x4f7)](_0x496b5f(0x345)+_0x47f1bc),console[_0x496b5f(0x4f7)](_0x496b5f(0x46d)+new Date(_0xfbd70a[_0x496b5f(0x5c6)])[_0x496b5f(0x4c8)]());if(_0x47f1bc==='active'){console['log'](''),console[_0x496b5f(0x4f7)](_0x496b5f(0x580));if(_0x1e6a3a['maxWrites']){const _0x4a29b5=Math[_0x496b5f(0x1df)](_0x1131c8/_0x1e6a3a[_0x496b5f(0x178)]*0x64);console[_0x496b5f(0x4f7)](_0x496b5f(0x420)+_0x1131c8[_0x496b5f(0x620)]()+'\x20/\x20'+_0x1e6a3a[_0x496b5f(0x178)][_0x496b5f(0x620)]()+_0x496b5f(0x129)+_0x4a29b5+'%)');}else console[_0x496b5f(0x4f7)](_0x496b5f(0x420)+_0x1131c8['toLocaleString']()+'\x20\x20(unlimited)');_0x1e6a3a['envs']?console[_0x496b5f(0x4f7)](_0x496b5f(0x27c)+_0x2b57f2+_0x496b5f(0xf0)+_0x1e6a3a[_0x496b5f(0xec)]):console[_0x496b5f(0x4f7)]('\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20'+_0x2b57f2+_0x496b5f(0x4e8));}console[_0x496b5f(0x4f7)]('');}finally{await _0x4e104d[_0x496b5f(0x241)]();}}async function _0x5d17e7(_0x45bd23,_0x40eff9){const _0x496960=_0x2feb2b;!_0x45bd23&&(console['error']('[okdb]\x20error:\x20remove\x20requires\x20an\x20id\x20argument'),process[_0x496960(0x542)](0x1));const _0x3df4f6=require$$5,_0xd5bade=_0x1b65f1[_0x496960(0x4a1)](_0x40eff9[_0x496960(0x64c)]),_0xd0295f=new _0x3df4f6(_0xd5bade,_0x40eff9['key']?{'encryptionKey':_0x40eff9[_0x496960(0x174)]}:{});await _0xd0295f[_0x496960(0x18d)]();try{const _0x3c91fe=_0xd0295f[_0x496960(0x18f)];(!_0x3c91fe||!_0x3c91fe[_0x496960(0x431)](_0x496960(0x3a6)))&&(console[_0x496960(0x31b)](_0x496960(0x1e8)+_0x45bd23+'\x22'),process[_0x496960(0x542)](0x1));let _0x46dfad=null,_0xcb9448=null;const _0x460282=_0x3c91fe[_0x496960(0x3aa)]('~licenses',_0x45bd23);if(_0x460282)_0x46dfad=_0x45bd23,_0xcb9448=_0x460282;else{const _0x30b505=[];for(const {key:_0x17eb85,value:_0x379dd8}of _0x3c91fe[_0x496960(0x391)](_0x496960(0x3a6))){if(_0x17eb85[_0x496960(0x3cc)](_0x45bd23))_0x30b505[_0x496960(0x614)]({'key':_0x17eb85,'value':_0x379dd8});}_0x30b505[_0x496960(0x2eb)]===0x0&&(console[_0x496960(0x31b)]('[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22'+_0x45bd23+'\x22'),process[_0x496960(0x542)](0x1)),_0x30b505[_0x496960(0x2eb)]>0x1&&(console[_0x496960(0x31b)]('[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22'+_0x45bd23+_0x496960(0x500)+_0x30b505['length']+_0x496960(0x175)),process[_0x496960(0x542)](0x1)),_0x46dfad=_0x30b505[0x0][_0x496960(0x174)],_0xcb9448=_0x30b505[0x0][_0x496960(0x392)];}await _0x3c91fe[_0x496960(0x1b1)](_0x496960(0x3a6),_0x46dfad),console[_0x496960(0x4f7)](_0x496960(0x16b)+_0x46dfad+_0x496960(0x443)+(_0xcb9448[_0x496960(0x56c)]||_0x496960(0x406))+')');}finally{await _0xd0295f[_0x496960(0x241)]();}}async function _0x1da8e5(_0x554add,_0x4cd400,_0x10c82d){const _0x4896ec=_0x2feb2b;!_0x554add&&(console[_0x4896ec(0x31b)](_0x4896ec(0x27d)),process[_0x4896ec(0x542)](0x1));!_0x10c82d[_0x4896ec(0x359)]&&!(_0x10c82d[_0x4896ec(0x112)]&&_0x10c82d[_0x4896ec(0x46f)])&&(console['error'](_0x4896ec(0x4e4)),process['exit'](0x1));const _0x2d9d87=_0x10c82d[_0x4896ec(0x5d5)]||_0x4cd400[_0x4896ec(0x32d)]?.[_0x4896ec(0x47f)];!_0x2d9d87&&(console[_0x4896ec(0x31b)](_0x4896ec(0x385)+'\x20\x20Example:\x20okdb\x20join\x20https://node-a.example.com\x20--token\x20<t>\x20--address\x20http://myhost:8484\x0a'+_0x4896ec(0x64b)),process[_0x4896ec(0x542)](0x1));const _0x96f882=require$$5,_0x9a78d0=new _0x96f882(_0x4cd400[_0x4896ec(0x64c)],{'sync':{'address':_0x2d9d87,'auto_reconcile':![]}});await _0x9a78d0[_0x4896ec(0x18d)]();try{const _0x3559ea=_0x9a78d0[_0x4896ec(0x18f)];if(_0x3559ea&&_0x3559ea['hasType'](_0x4896ec(0x471))){let _0x29871f=![];for(const _0x327bcd of _0x3559ea[_0x4896ec(0x391)](_0x4896ec(0x471))){_0x29871f=!![];break;}_0x29871f&&console['log'](_0x4896ec(0x588)+_0x4896ec(0x3fb));}console[_0x4896ec(0x4f7)](_0x4896ec(0x3fe)+_0x554add+'…'),await _0x9a78d0[_0x4896ec(0x32d)][_0x4896ec(0x3a4)](_0x554add['replace'](/\/+$/,''),{'token':_0x10c82d[_0x4896ec(0x359)],'username':_0x10c82d[_0x4896ec(0x112)],'password':_0x10c82d[_0x4896ec(0x46f)]}),console[_0x4896ec(0x4f7)](_0x4896ec(0x4ce)),console[_0x4896ec(0x4f7)](_0x4896ec(0x4f1));}finally{await _0x9a78d0[_0x4896ec(0x241)]();}}async function _0x508cad(){const _0x183505=_0x2feb2b,_0x2792ff=Date[_0x183505(0x16a)](),_0x3dfbf5=_0x4f700b(process[_0x183505(0x290)]),_0x1dded1=_0x58293d(_0x3dfbf5),_0x40578e=_0x1b65f1[_0x183505(0x4a1)](_0x1dded1[_0x183505(0x64c)]);!_0x1dded1['noRepl']&&!process[_0x183505(0x61c)][_0x183505(0x52b)]&&(_0x1dded1[_0x183505(0x2bd)]=!![]);const _0x1adc04=require$$5,{start:_0x226790,colorLog:_0x4d883a}=requireOkdbShell(),_0x46ba31=require$$1$2,_0x144a5={..._0x1dded1[_0x183505(0x174)]?{'encryptionKey':_0x1dded1['key']}:{},..._0x1dded1[_0x183505(0x673)]?{'admin':![]}:_0x2b35c1(_0x1dded1[_0x183505(0x27f)])?{'admin':_0x1dded1['admin']}:{},..._0x2b35c1(_0x1dded1[_0x183505(0x60f)])?{'api':_0x1dded1[_0x183505(0x60f)]}:{},..._0x2b35c1(_0x1dded1[_0x183505(0x37d)])?{'auth':_0x1dded1['auth']}:{},..._0x2b35c1(_0x1dded1['mcp'])?{'mcp':_0x1dded1[_0x183505(0x32b)]}:{},..._0x1dded1[_0x183505(0x232)]!==![]?{'timeMachine':_0x1dded1['timeMachine']}:{}},_0x43bbbe=_0x2c44bd(_0x1dded1);if(!_0x46ba31[_0x183505(0x60c)]){const _0x5caf19=_0x4b1d13(),_0x2b5083=_0x1dded1[_0x183505(0x289)]?_0x183505(0x300):_0x1dded1[_0x183505(0x194)]!=null&&_0x1dded1['workersFlag']!==''?_0x183505(0x102):process.env.OKDB_HTTP_WORKERS?_0x183505(0x4ef):_0x1dded1[_0x183505(0x5d0)]?.['workers']!=null?_0x183505(0x189):_0x183505(0x46b)+Math[_0x183505(0x47e)](0x1,require$$0['cpus']()[_0x183505(0x2eb)]-0x1);process['stdout'][_0x183505(0x4ae)](_0x183505(0x23d)+_0x43bbbe+'\x20('+_0x2b5083+(!_0x5caf19?_0x183505(0x63b):'')+')\x0a');}if(_0x46ba31[_0x183505(0x60c)]){const _0x3b7da6={..._0x144a5,'engines':![],'asyncProcessors':![],'compaction':_0x183505(0x573),'bus':!![]},_0x53d82b=new _0x1adc04(_0x40578e,_0x3b7da6);_0x53d82b['log']['detachConsole']?.();const _0x12bbea=process.env.OKDB_CLUSTER_SLOT??'?',_0x3dd986={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x34b7f0=_0x3dd986[_0x1dded1[_0x183505(0x45d)]]??_0x3dd986[_0x183505(0x3d7)];_0x53d82b[_0x183505(0x4f7)][_0x183505(0x649)](_0x40964c=>{const _0x188fb0=_0x183505;if((_0x3dd986[_0x40964c[_0x188fb0(0x294)]]??0x1)<_0x34b7f0)return;try{process[_0x188fb0(0x270)]?.({'__okdbCluster':_0x188fb0(0x4f7),'slot':_0x12bbea,'pid':process[_0x188fb0(0x3e7)],'entry':_0x40964c});}catch{}}),await _0x53d82b['open']();const {attachWorkerCluster:_0x383239}=requireOkdbCluster();_0x383239(_0x53d82b),await _0x47de7d(_0x53d82b,_0x1dded1[_0x183505(0x26f)]);return;}if(_0x43bbbe>0x1){const _0x2efce5=requireOkdbHttp(),_0x3a4707=new _0x2efce5(),_0x4a4128=new _0x1adc04(_0x40578e,_0x144a5);await _0x4a4128[_0x183505(0x18d)]();const _0x31c885=async()=>{const _0x6e1ad9=_0x183505,_0x725ef1={..._0x144a5,'engines':![],'asyncProcessors':![],'compaction':_0x6e1ad9(0x573),'bus':!![]},_0x4316f7=new _0x1adc04(_0x40578e,_0x725ef1);return await _0x4316f7[_0x6e1ad9(0x18d)](),_0x4316f7;},_0x2a773a=_0x3a4707[_0x183505(0x31f)](_0x1dded1[_0x183505(0x26f)],{'workers':_0x43bbbe,'makeOkdb':_0x31c885,'primaryOkdb':_0x4a4128});let _0x476897=![];async function _0x304e73(_0x178a13){const _0x2469c6=_0x183505;_0x476897&&(process['stderr'][_0x2469c6(0x4ae)](_0x2469c6(0x180)),process[_0x2469c6(0x542)](0x82));_0x476897=!![],process['stderr'][_0x2469c6(0x4ae)]('\x0a[okdb]\x20received\x20'+(_0x178a13||_0x2469c6(0x2d9))+_0x2469c6(0x13d));const _0x35a565=setTimeout(()=>{const _0x37443a=_0x2469c6;process[_0x37443a(0x16f)]['write'](_0x37443a(0xe6)),process[_0x37443a(0x542)](0x0);},0xbb8);_0x35a565[_0x2469c6(0x386)]?.();try{await _0x2a773a[_0x2469c6(0x241)]();}catch(_0x3670ff){process[_0x2469c6(0x16f)][_0x2469c6(0x4ae)](_0x2469c6(0x4aa)+(_0x3670ff?.['message']??_0x3670ff)+'\x0a');}try{await _0x4a4128[_0x2469c6(0x241)]();}catch(_0x44b80d){process[_0x2469c6(0x16f)][_0x2469c6(0x4ae)](_0x2469c6(0x3e0)+(_0x44b80d?.[_0x2469c6(0x29c)]??_0x44b80d)+'\x0a');}process[_0x2469c6(0x542)](0x0);}_0x1dded1[_0x183505(0x52c)]=_0x43bbbe;if(!_0x1dded1[_0x183505(0x2bd)]){_0x4a4128['log'][_0x183505(0x222)]?.(),_0x5b43a0(_0x4a4128[_0x183505(0x37d)]?.[_0x183505(0x1f2)]?.()??[]),await _0x226790(_0x4a4128,_0x1dded1);return;}process[_0x183505(0x559)][_0x183505(0x4ae)]('[okdb]\x20cluster\x20primary\x20pid='+process[_0x183505(0x3e7)]+':\x20processor\x20(HTTP-silent),\x20'+_0x43bbbe+'\x20'+(_0x183505(0x4ec)+_0x1dded1[_0x183505(0x26f)]+'\x0a')),console[_0x183505(0x4f7)](''),console[_0x183505(0x4f7)](_0x183505(0x41c)),console[_0x183505(0x4f7)](_0x183505(0x4fa)+_0x1dded1[_0x183505(0x26f)]+_0x183505(0x129)+_0x43bbbe+_0x183505(0x220)),console[_0x183505(0x4f7)](_0x183505(0x531)+_0x40578e),console[_0x183505(0x4f7)](_0x183505(0x2e0)+_0x4a4128['id']),console[_0x183505(0x4f7)](_0x183505(0x3f5)+_0x1dded1[_0x183505(0x26f)]+'/api');!_0x1dded1['noAdmin']&&console[_0x183505(0x4f7)](_0x183505(0x387)+_0x1dded1[_0x183505(0x26f)]+_0x183505(0x61f));console[_0x183505(0x4f7)](''),_0x5b43a0(_0x4a4128[_0x183505(0x37d)]?.[_0x183505(0x1f2)]?.()??[]),process['on']('SIGINT',()=>_0x304e73(_0x183505(0x53b))),process['on']('SIGTERM',()=>_0x304e73(_0x183505(0x61a))),process['on'](_0x183505(0x5e7),()=>_0x304e73('SIGBREAK'));return;}const _0x395adb=new _0x1adc04(_0x40578e,_0x144a5);_0x395adb[_0x183505(0x4f7)][_0x183505(0x222)]?.();const _0x36c564=_0x395adb[_0x183505(0x4f7)][_0x183505(0x649)](_0x122b18=>_0x4d883a(_0x122b18,_0x1dded1[_0x183505(0x45d)]));if(_0x1dded1[_0x183505(0x2bd)])process[_0x183505(0x559)]['write'](_0x183505(0x57c));await _0x395adb['open']();if(_0x1dded1[_0x183505(0x2bd)])process[_0x183505(0x559)][_0x183505(0x4ae)](_0x183505(0x5cd));try{await _0x47de7d(_0x395adb,_0x1dded1['port']);}catch(_0x2b99ee){_0x2b99ee[_0x183505(0x60e)]===_0x183505(0x2c8)&&(console[_0x183505(0x31b)](_0x183505(0x65a)+_0x1dded1[_0x183505(0x26f)]+_0x183505(0x4c0)),process[_0x183505(0x542)](0x1));throw _0x2b99ee;}if(_0x1dded1[_0x183505(0x2bd)])process[_0x183505(0x559)][_0x183505(0x4ae)](_0x183505(0x611)+_0x1dded1[_0x183505(0x26f)]+'\x0a');if(!_0x1dded1[_0x183505(0x2bd)])_0x395adb[_0x183505(0x4f7)]['detachConsole']?.(),_0x36c564?.(),_0x5b43a0(_0x395adb['auth']?.['getSecurityNotices']?.()??[]),await _0x226790(_0x395adb,_0x1dded1);else{const _0x523df3=_0x1b65f1[_0x183505(0x3a4)](_0x40578e,_0x183505(0x661));try{_0x56a80a[_0x183505(0x59d)](_0x523df3,String(process[_0x183505(0x3e7)]));}catch{}const _0x3259f2=Date[_0x183505(0x16a)]()-_0x2792ff;console[_0x183505(0x4f7)](''),console[_0x183505(0x4f7)](_0x183505(0x2ab)),console[_0x183505(0x4f7)](_0x183505(0x357)+_0x1dded1[_0x183505(0x26f)]),console[_0x183505(0x4f7)]('\x20\x20\x20\x20path:\x20\x20'+_0x40578e),console[_0x183505(0x4f7)]('\x20\x20\x20\x20id:\x20\x20\x20\x20'+_0x395adb['id']);{const _0xf315dd=_0x395adb[_0x183505(0x18f)]?.['db']?.[_0x183505(0x3aa)]?.(_0x183505(0x25e))??0x0,_0x2b7ea0=[..._0x395adb[_0x183505(0x5bd)][_0x183505(0x2f1)]()][_0x183505(0x1c6)](_0x2288fe=>!_0x2288fe[_0x183505(0x3cc)]('~'))[_0x183505(0x2eb)];if(_0x395adb[_0x183505(0x1e7)]?.['active']?.['licenseType']===0x1){const _0x1ac8f0=Math[_0x183505(0x602)]((_0x395adb[_0x183505(0x1e7)][_0x183505(0x22d)]['expiresAt']-Date[_0x183505(0x16a)]())/0x5265c00);console[_0x183505(0x4f7)]('\x20\x20\x20\x20license:\x20⚠\x20OPEN\x20—\x20'+_0x395adb['_license'][_0x183505(0x22d)][_0x183505(0x56c)]+_0x183505(0x2b3)+_0x1ac8f0+_0x183505(0x340));}else{if(_0x395adb[_0x183505(0x1e7)]?.[_0x183505(0x22d)]){const _0x5b1f38=_0x395adb['_license'][_0x183505(0x22d)];console[_0x183505(0x4f7)](_0x183505(0x59c)+_0x5b1f38[_0x183505(0x56c)]+_0x183505(0x2fa)+new Date(_0x5b1f38[_0x183505(0x63c)])[_0x183505(0x4c8)]()['slice'](0x0,0xa)+')');const _0x27f171=_0x5b1f38[_0x183505(0x546)]||{};if(_0x27f171[_0x183505(0x178)]){const _0x4e0c8e=Math[_0x183505(0x1df)](_0xf315dd/_0x27f171[_0x183505(0x178)]*0x64);console['log'](_0x183505(0x4e2)+_0xf315dd[_0x183505(0x620)]()+_0x183505(0xf0)+_0x27f171[_0x183505(0x178)][_0x183505(0x620)]()+_0x183505(0x39e)+_0x4e0c8e+_0x183505(0x24b)+_0x2b7ea0+(_0x27f171[_0x183505(0xec)]?'/'+_0x27f171[_0x183505(0xec)]:'')+_0x183505(0x20d)+(_0x2b7ea0===0x1?'':'s'));}}else{if(_0x395adb[_0x183505(0x1e7)]){const _0x34fb0f=_0x395adb[_0x183505(0x1e7)][_0x183505(0x23a)](),_0xafcaca=_0x34fb0f['length']?_0x34fb0f['map'](_0x1551c5=>_0x1551c5[_0x183505(0x41b)])[_0x183505(0x3a4)](',\x20'):'(add\x20a\x20license\x20first)',_0x198d4d=_0x395adb[_0x183505(0x1e7)]['effective'],_0x8b65c9=_0x198d4d['limits']['maxWrites']?Math['round'](_0xf315dd/_0x198d4d['limits'][_0x183505(0x178)]*0x64):0x0;console[_0x183505(0x4f7)](_0x183505(0x60a)),console[_0x183505(0x4f7)](_0x183505(0x4e2)+_0xf315dd[_0x183505(0x620)]()+_0x183505(0xf0)+_0x198d4d[_0x183505(0x546)]['maxWrites'][_0x183505(0x620)]()+_0x183505(0x39e)+_0x8b65c9+_0x183505(0x24b)+_0x2b7ea0+_0x183505(0xf0)+_0x198d4d[_0x183505(0x546)][_0x183505(0xec)]+_0x183505(0x21a)),console[_0x183505(0x4f7)](_0x183505(0x4cc)+_0xafcaca);}}}}console[_0x183505(0x4f7)]('\x20\x20\x20\x20api:\x20\x20\x20http://localhost:'+_0x1dded1[_0x183505(0x26f)]+_0x183505(0x253));!_0x1dded1[_0x183505(0x673)]&&console[_0x183505(0x4f7)]('\x20\x20\x20\x20admin:\x20http://localhost:'+_0x1dded1[_0x183505(0x26f)]+'/admin/index.html');console[_0x183505(0x4f7)](''),console[_0x183505(0x4f7)](_0x183505(0x44d)+_0x3259f2+'ms'),_0x5b43a0(_0x395adb['auth']?.[_0x183505(0x1f2)]?.()??[]);let _0x54fbeb=![];async function _0x4b2b2a(_0x22f448){const _0x39fbca=_0x183505;_0x54fbeb&&(process[_0x39fbca(0x16f)]['write'](_0x39fbca(0x180)),process[_0x39fbca(0x542)](0x82));_0x54fbeb=!![],process[_0x39fbca(0x16f)][_0x39fbca(0x4ae)](_0x39fbca(0x57e)+(_0x22f448||_0x39fbca(0x2d9))+_0x39fbca(0x33d));const _0x179129=setTimeout(()=>{const _0x5a0177=_0x39fbca;process[_0x5a0177(0x16f)][_0x5a0177(0x4ae)](_0x5a0177(0x281)),process[_0x5a0177(0x542)](0x1);},0x1388);try{_0x56a80a[_0x39fbca(0x207)](_0x523df3);}catch{}try{await _0x395adb['close']();}catch(_0x4b89bf){process[_0x39fbca(0x16f)][_0x39fbca(0x4ae)](_0x39fbca(0xf3)+(_0x4b89bf?.[_0x39fbca(0x29c)]??_0x4b89bf)+'\x0a');}clearTimeout(_0x179129),process[_0x39fbca(0x16f)][_0x39fbca(0x4ae)]('[okdb]\x20closed\x20cleanly\x0a'),process[_0x39fbca(0x542)](0x0);}process['on'](_0x183505(0x53b),()=>_0x4b2b2a(_0x183505(0x53b))),process['on'](_0x183505(0x61a),()=>_0x4b2b2a(_0x183505(0x61a))),process['on'](_0x183505(0x5e7),()=>_0x4b2b2a('SIGBREAK'));}}const _0x1482fe=new Set([_0x2feb2b(0x2ea),'doctor','init','backup',_0x2feb2b(0x2d6),_0x2feb2b(0x634),'reset',_0x2feb2b(0x359),'join',_0x2feb2b(0x58c)]),_0x584a2f=process[_0x2feb2b(0x290)][0x2];if(_0x584a2f===_0x2feb2b(0x2ea))console[_0x2feb2b(0x4f7)](require$$3[_0x2feb2b(0x2ea)]),process[_0x2feb2b(0x542)](0x0);else{if(_0x584a2f&&_0x1482fe[_0x2feb2b(0x39f)](_0x584a2f)){const _0x1932e0=process['argv'][_0x2feb2b(0x45e)](0x3),_0x2523dd=_0x4f700b([_0x2feb2b(0x3fa),_0x2feb2b(0x2d3),..._0x1932e0]),_0x11abeb=_0x58293d(_0x2523dd),_0x27e279=new Set([_0x2feb2b(0x1fe),'-d','--key','-k',_0x2feb2b(0x5b3),'-c','--port','-p',_0x2feb2b(0x417),_0x2feb2b(0x3c4),'-e',_0x2feb2b(0x66a),'--name','--password',_0x2feb2b(0x160),_0x2feb2b(0x53f),_0x2feb2b(0x58e),_0x2feb2b(0x5f4),_0x2feb2b(0x3e8),_0x2feb2b(0x463),'-u',_0x2feb2b(0x2d2)]);let _0x15f6f4=null;for(let _0x1a5c9b=0x0;_0x1a5c9b<_0x1932e0['length'];_0x1a5c9b++){if(_0x27e279[_0x2feb2b(0x39f)](_0x1932e0[_0x1a5c9b])){_0x1a5c9b++;continue;}if(!_0x1932e0[_0x1a5c9b][_0x2feb2b(0x3cc)]('-')){_0x15f6f4=_0x1932e0[_0x1a5c9b];break;}}(async()=>{const _0x53bdce=_0x2feb2b;if(_0x584a2f===_0x53bdce(0x359)){const _0xf734da=process['argv'][0x3],_0x2e8c81=process[_0x53bdce(0x290)]['slice'](0x4),_0x1e9039=_0x4f700b([_0x53bdce(0x3fa),_0x53bdce(0x2d3),..._0x2e8c81]),_0x287f08=_0x58293d(_0x1e9039),_0x5a5036=new Set(['--path','-d',_0x53bdce(0x231),'-k',_0x53bdce(0x5b3),'-c',_0x53bdce(0x322),'-p','--name',_0x53bdce(0x3d6),_0x53bdce(0x160),_0x53bdce(0x53f),_0x53bdce(0x58e),_0x53bdce(0x5f4),'--log-level',_0x53bdce(0x3c4),'-e',_0x53bdce(0x66a)]),_0x317a64=[];for(let _0xd4187e=0x0;_0xd4187e<_0x2e8c81[_0x53bdce(0x2eb)];_0xd4187e++){if(_0x5a5036[_0x53bdce(0x39f)](_0x2e8c81[_0xd4187e])){_0xd4187e++;continue;}if(_0x2e8c81[_0xd4187e][_0x53bdce(0x3cc)]('-'))continue;_0x317a64['push'](_0x2e8c81[_0xd4187e]);}switch(_0xf734da){case _0x53bdce(0x495):await _0x3217eb(_0x287f08,_0x1e9039);break;case _0x53bdce(0x25b):await _0x21c86d(_0x287f08);break;case _0x53bdce(0x338):await _0x2e0358(_0x317a64[0x0],_0x287f08);break;default:console[_0x53bdce(0x31b)](_0x53bdce(0x349)+_0xf734da+_0x53bdce(0x169)),process[_0x53bdce(0x542)](0x1);}return;}if(_0x584a2f==='license'){const _0x4c4573=requireOkdbLicenseCodec(),_0x251df0=process[_0x53bdce(0x290)][_0x53bdce(0x45e)](0x3),_0x3c8575=_0x4f700b([_0x53bdce(0x3fa),'okdb',..._0x251df0]),_0x412e5e=_0x58293d(_0x3c8575),_0xe065d7=new Set(['--path','-d',_0x53bdce(0x231),'-k',_0x53bdce(0x5b3),'-c',_0x53bdce(0x322),'-p','--log-level']),_0x2882f7=[];for(let _0x142229=0x0;_0x142229<_0x251df0[_0x53bdce(0x2eb)];_0x142229++){if(_0xe065d7[_0x53bdce(0x39f)](_0x251df0[_0x142229])){_0x142229++;continue;}if(_0x251df0[_0x142229][_0x53bdce(0x3cc)]('-'))continue;_0x2882f7[_0x53bdce(0x614)](_0x251df0[_0x142229]);}const _0x4489e2=_0x2882f7[0x0]??null;if(_0x4489e2===_0x53bdce(0x1b1))await _0x5d17e7(_0x2882f7[0x1],_0x412e5e);else{if(!_0x4489e2)await _0x2c9abf(_0x412e5e);else{let _0x46e21c=_0x4c4573['detectInputType'](_0x4489e2);if(_0x46e21c===_0x53bdce(0x326)&&_0x56a80a[_0x53bdce(0x5ee)](_0x4489e2))_0x46e21c='path';if(_0x46e21c===_0x53bdce(0x42d))try{const _0x4195a4=_0x56a80a[_0x53bdce(0xe7)](_0x4489e2,_0x53bdce(0x365))[_0x53bdce(0x486)](),_0x52ab52=_0x4c4573[_0x53bdce(0x5d9)](_0x4195a4);if(_0x52ab52===_0x53bdce(0x377)){await _0x4e05a9(_0x4195a4,_0x412e5e);return;}await _0x595de3(_0x4489e2,_0x412e5e);return;}catch(_0x87ab15){console[_0x53bdce(0x31b)]('[okdb]\x20error:\x20failed\x20to\x20read\x20'+_0x4489e2+':\x20'+_0x87ab15[_0x53bdce(0x29c)]),process[_0x53bdce(0x542)](0x1);}switch(_0x46e21c){case _0x53bdce(0x1d8):await _0x595de3(_0x4489e2,_0x412e5e);break;case _0x53bdce(0x377):await _0x4e05a9(_0x4489e2,_0x412e5e);break;case _0x53bdce(0x134):await _0x56c23b(_0x4489e2,_0x412e5e);break;default:console[_0x53bdce(0x31b)](_0x53bdce(0x2b2)+_0x4489e2+'\x22'),console[_0x53bdce(0x31b)](''),console[_0x53bdce(0x31b)](_0x53bdce(0xff)),console[_0x53bdce(0x31b)]('\x20\x20\x20\x20•\x20a\x20license\x20blob\x20\x20\x20(Crockford\x20base32,\x20~150–250\x20chars)'),console[_0x53bdce(0x31b)]('\x20\x20\x20\x20•\x20an\x20activation\x20token\x20\x20(124\x20chars)'),console[_0x53bdce(0x31b)](_0x53bdce(0xee)),console['error'](_0x53bdce(0x617)),console[_0x53bdce(0x31b)](''),console[_0x53bdce(0x31b)](_0x53bdce(0x4fb)),process[_0x53bdce(0x542)](0x1);}}}return;}switch(_0x584a2f){case _0x53bdce(0x498):await _0x3a8f5c(_0x11abeb);break;case'init':await _0x35ffc0();break;case _0x53bdce(0x1c2):await _0x44b834(_0x11abeb);break;case _0x53bdce(0x329):await _0x1eecf7(_0x15f6f4??_0x1b65f1[_0x53bdce(0x4a1)](_0x53bdce(0x40e)),_0x11abeb);break;case'export':await _0x27c3f3(_0x15f6f4??_0x1b65f1['resolve'](_0x53bdce(0x33a)),_0x11abeb,_0x2523dd);break;case _0x53bdce(0x634):await _0x58e636(_0x15f6f4??_0x1b65f1[_0x53bdce(0x4a1)](_0x53bdce(0x33a)),_0x11abeb,_0x2523dd);break;case'join':await _0x1da8e5(_0x15f6f4,_0x11abeb,_0x2523dd);break;}})()['then'](()=>process['exit'](0x0))[_0x2feb2b(0x255)](_0x3ae1c8=>{const _0x5dcbb8=_0x2feb2b;console[_0x5dcbb8(0x31b)](_0x5dcbb8(0x628)+(_0x3ae1c8[_0x5dcbb8(0x29c)]||_0x3ae1c8)+'\x0a'),process[_0x5dcbb8(0x542)](0x1);});}else _0x508cad()[_0x2feb2b(0x255)](_0x15cf91=>{const _0x1bc5ef=_0x2feb2b;console[_0x1bc5ef(0x31b)](_0x1bc5ef(0x10d)),console[_0x1bc5ef(0x31b)](_0x15cf91[_0x1bc5ef(0x1f3)]||_0x15cf91),process[_0x1bc5ef(0x542)](0x1);});}return okdb$1;}var okdbExports=requireOkdb(),okdb=getDefaultExportFromCjs(okdbExports);module[_0x4b361c(0x1b3)]=okdb;
2
+ 'use strict';function _0x4d96(){const _0x1dab39=['envsOpen','api','assertLimit','\x20\x20\x20\x20admin:\x20\x20\x20http://localhost:','closeAllConnections','HTTP_WORKERS_REQUIRE_PORTABLE_ROUTES','mcp','consumeLoginState','_groupByProcess','concat','gray','stringify','\x20\x20\x20\x20•\x20a\x20license\x20blob\x20\x20\x20(Crockford\x20base32,\x20~150–250\x20chars)','warn','--permissions','_buckets','unique:violation','node:perf_hooks','OKDBSchemaValidationError','_nodeDbFor','getDesired','isDead','Unknown\x20JWKS\x20kid:\x20','licenseHash','UNAUTHORIZED','\x0a\x20\x20[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a','drop','Create,\x20delete,\x20and\x20compact\x20environments.','listLicenses','OKDBNotFoundError','getSecurityNotices','Invalid\x20primary\x20key\x20type:\x20','exportBlobs','\x20\x20·\x20','Types','dropIndex','\x20(must\x20be\x20an\x20integer\x20>=\x201)\x20—\x20using\x201','cluster:\x20ready\x20(','payload-or-self','\x20(durable\x20desired-state)','\x20\x20\x20\x20\x20\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','stdin','_activateProcesses','\x20in\x20','reason','processKey','kid','pid','No\x20tokens.','Data','\x20bytes,\x20need\x20>=\x2065)','_lastCpuPct','recheck','\x20env','send','params','ENV','processor:paused','_matchRoute','Views','\x20\x20\x20\x20licensee:\x20\x20','_buildOwnRow','delete','ESRCH','[okdb]\x20closed\x20cleanly\x0a','LICENSE_ACTIVATION_INVALID','record','(null)','licensed','required','{}[]:,\x0a\x0d\x09\x20','next','revoke','null','\x20+\x20','role','HELP','setupPrimary','attach','\x20\x20\x20\x20usage:\x20\x20\x20','_children','start\x20','created','system','_rotateBucket','REMOVE','audiences','failures','remoteAddress','sha256','activation','red','listNodes','Get\x20and\x20list\x20records,\x20run\x20byIndex\x20queries.','_quantum','wrong_node','data','txn:end','(unset)','primaryOkdb','defaults','Write','--changes','\x20SECURITY\x20NOTICE','\x27,\x20cannot\x20map\x20to\x20\x27','loop-lag','registerIndex','url','backup','VERB','Execute\x20functions\x20over\x20HTTP/MCP/shell.','options','processor:ready','Examples','\x20more)','\x20\x20\x20\x20•\x20a\x20path\x20to\x20a\x20.license\x20file','then','_supervisorKey','label','\x20cf-ip=','FOREIGN_KEY_VIOLATION','cpuUsage','scope','Read','[okdb]\x20preserved:\x20','addLicense','_adminRelay','resolve','cyan','~licenses','operations','[okdb]\x20error:\x20license\x20management\x20is\x20only\x20available\x20in\x20licensed\x20builds\x20(npm\x20run\x20build:prod).','Type\x20\x27','\x20\x20\x20\x20admin:\x20http://localhost:','[okdb]\x20backup\x20complete','\x20log\x20level:\x20','_wrapApiResponse','dropType','(workers\x20can\x27t\x20share\x20the\x20cross-process\x20HLC/clock).\x20Forcing\x20single-process\x20(was\x20','\x20\x20[okdb]\x20','errors','clearTtl','\x20\x20→\x20\x20','changes','headers.','/.well-known/openid-configuration','_threadStats','force','_authOptions','_openEnvLazy','timingSafeEqual','_baselines','open','\x20\x20Usage:\x20okdb\x20license\x20[<blob|path|uuid|activation-token>]','toLowerCase','maxMs','listRoutes','engines','raw','\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.','unlinkSync','readUInt8','processor','expired','sig','listen','ttl:set','headers','tierList','some','\x20\x20@','\x20\x20✓\x20http\x20listening\x20on\x20:','question','start','--watch','_admissionStarted','Enqueue,\x20cancel,\x20retry,\x20remove\x20jobs;\x20manage\x20buckets;\x20reconcile\x20and\x20rebuild\x20stats.','data:read','\x20origin=','--log-level','JWT\x20signature\x20verification\x20failed','<json-body>','_licenseHash','[okdb]\x20error:\x20--address\x20is\x20required\x20for\x20join\x20(this\x20node\x27s\x20reachable\x20sync\x20address).\x0a','authorization',';\x20Max-Age=','\x20\x20score:','PUB_FINGERPRINT',':\x20expected\x20','authenticateToken','freeze','content-length','OKDBError','~processes:desired','--env','min','toString','\x20querySchema\x20references\x20missing\x20input\x20field:\x20','RS256','\x1b[33m','[okdb]\x20backing\x20up\x20to\x20',']\x20already\x20maps\x20to\x20\x27','includes','~tokens','match','index:progress','\x20\x20\x20\x20status:\x20\x20\x20\x20active','invalid','[okdb]\x20cluster\x20primary\x20pid=','/api','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20override\x20active\x20environment\x20for\x20this\x20call\x0a\x20\x20','_lookupByName','SYSTEM_POKE','padStart','_lastCpuWindowMs','--label','ITEM_CREATE','_nodeDead','\x20(expires\x20in\x20','push','build','_oidcDiscoveryCache','round','listenAddr','OPTIONS','\x0a\x20\x20okdb\x20doctor\x0a','decommissioning','processor:resumed','info','SYSTEM_PROC','exports','system:poke','cluster:\x20unavailable\x20(shmbuf\x20native\x20missing)\x20—\x20running\x20single-process','\x27\x20on\x20type\x20\x27','LICENSE_INVALID','--no-admin','yellow','processors','\x20not\x20found','__identity','files/','Work','\x20\x20Path\x20access','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20GET\x20(implicit)\x0a\x20\x20','peer','licenses','inputSchema','[okdb]\x20error:\x20show\x20requires\x20an\x20id\x20argument','JWT\x20expired','--name','auth=','username','\x20\x20Writes:\x20\x20','readFileSync','spki','_dedupeKey','threads','types','toUpperCase','category','envs','count','[okdb-cluster]\x20','timeMachine','_flushTimer','isSetupMode','userAdded','note','[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22','selfAddress','shutdown','[okdb]\x20warning:\x20failed\x20to\x20restore\x20identity/licenses\x20after\x20reset:\x20','~processes:cmd','_totalErrors','decodeLicenseBlob:\x20input\x20must\x20be\x20a\x20string','\x0a\x20\x20✓\x20Token\x20created','PERMISSIONS','detectInputType','description','\x20\x20[','address','\x20→\x20POST\x20/api/env/','_envs','INVALID_PRIMARY_KEY','Foreign\x20key\x20violation:\x20','http://','input:\x20','\x20\x20\x20\x20license:\x20free\x20tier\x20—\x20add\x20a\x20license\x20to\x20unlock\x20sync,\x20embeddings,\x20engines,\x20time-machine','registerFts','1659100DnhLXu','license:activated','_startedAt','--version','_activateProcessesReader','identity','decommission','startedAt','signCookie','form\x20listen(port,\x20{\x20workers,\x20makeOkdb\x20})\x20and\x20register\x20the\x20routes\x20inside\x20makeOkdb,\x20','blob','cursorKey','base64','removeNode','event','\x20\x20✓\x20joined\x20and\x20reconciliation\x20initiated','_clusterOnMessage','\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','Token\x20must\x20be\x20a\x20JWT','[req]\x20','\x20has\x20unbound\x20input\x20fields\x20with\x20bodyMode:none:\x20','Blob\x20storage:\x20large\x20file\x20uploads\x20attached\x20to\x20records\x20or\x20stored\x20standalone.','valid','GET','127.0.0.1','_processingPolicy','origin','_isOpen','\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/','log','slice','records','(code=','Create,\x20update,\x20and\x20delete\x20tokens\x20and\x20users;\x20rotate\x20keys.','noteListenAddr','[okdb]\x20shmbuf\x20native\x20binding\x20unavailable\x20—\x20multi-process\x20clustering\x20is\x20unsafe\x20','(no\x20types)','present','update','keys:','603861ZLSUXA','_totalRequests','hasDesired','\x20\x20(name:\x20','search:query','~processes','Functions','protected:read','readline','\x20\x20(licensee:\x20','feed:','decoded','\x20\x20\x20\x20\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/','License\x20signature\x20invalid\x20—\x20this\x20license\x20was\x20not\x20signed\x20by\x20the\x20key\x20paired\x20with\x20this\x20build.\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20browse\x20API\x20routes,\x20grouped\x20by\x20area\x0a\x20\x20','ms/','\x0a[okdb]\x20error:\x20','getRange','.kdbconfig','\x20\x20Tier:\x20\x20\x20\x20','[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22','\x0a\x20\x20License\x20details:','type/users\x20--help','noCluster','FORBIDDEN','--ttl','issuer','_jwksCache','allowMethods','hex','_selfKey','\x20logs\x20off\x0a','_statusEnv','cookieName','/type/users\x0a\x20\x20\x20\x20','key','.\x20Only\x20primitives,\x20null,\x20Buffers,\x20and\x20arrays\x20are\x20allowed.\x20Got:\x20','req','List,\x20download,\x20and\x20inspect\x20file\x20metadata.',';\x20Secure','_computeStatus','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20','indexes','body','other','LENGTH_REQUIRED','\x20worker\x20slot=','http.workers','--path','randomBytes','_isClusterController','_dedupeMax','rowKey','oauth','\x0a\x20\x20Joined.\x20Remote\x20tokens\x20replicated.\x20You\x20can\x20now\x20log\x20in\x20with\x20cluster\x20credentials.\x0a','[okdb]\x20error:\x20join\x20requires\x20credentials.\x20Provide\x20--token\x20<t>\x20or\x20--username\x20<u>\x20--password\x20<p>','string','createServer','peers=','env:removed','_runGuards','\x20already\x20in\x20use','stdout',')\x20to\x20your\x20license\x20vendor.','OKDBSchemaCollectionError','isInteger','ROUTES','x-okdb-raw-response','writeUInt8','\x20\x20\x20\x20features:\x20\x20','Unauthorized','access-control-max-age','addedAt','known\x20field','_lastPublishAt','\x20\x20\x20\x20path:\x20\x20\x20\x20','_hbTimer','hasCanonical','isFinite','Background\x20job\x20queue:\x20enqueue\x20work,\x20observe\x20state,\x20and\x20process\x20jobs.','\x20\x20skipped=','_totalWriteMs','pin','(empty)','setNoDelay','\x20}):\x20','\x20environment\x20','_sampleOwnStats','pathParams','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','ready','maxBodyBytes','operation','TYPES','\x0a\x20\x20Raw\x20token\x20(shown\x20once,\x20save\x20it\x20now):\x0a','_caps','\x0a\x0a\x20\x20','_lastCpuUsage','credentials','\x20\x20Next\x20step\x20—\x20activate\x20the\x20license:','OKDBTypeAlreadyRegisteredError','bus:proc','\x0a\x20\x20\x20\x20','cf-ray','Create,\x20update,\x20and\x20delete\x20records\x20(including\x20bulk\x20import).','isAuthenticated','body:\x20','_listenAddr','references','dropping','database\x20path\x20not\x20writable:\x20','createInterface',':\x20processor\x20(HTTP-silent),\x20','rawResponse','regex','percentile','instances','INDEX_HAS_CONSUMERS','\x20\x20(need\x20≥\x2018)','Forbidden\x20—\x20requires\x20','nbf','SIGBREAK','transaction','toFixed','ACTIVATION_EXPIRED','--inspect','\x22\x20on\x20\x22','getProcess','magenta','PUT','_buildProcessingFacet','--types','all','\x20\x20\x20\x20','_onItem','node:events','\x27\x20doesn\x27t\x20exist','dest','license:removed','\x20file','statSync','call',';\x20HttpOnly','authRequired','/admin/index.html','keys/public.pem','OIDC\x20discovery\x20missing\x20jwks_uri','parseInt','MALFORMED_TOKEN','TYPE_ALREADY_REGISTERED','application/x-www-form-urlencoded','set','Validation\x20failed','--port','rawBuf','embedded','verifyActivation','May\x20write\x20system\x20types\x20when\x20also\x20granted\x20the\x20underlying\x20write\x20permission.','connected','makeOkdb','[filter]','\x20deleted','boolean','run','standard','http://localhost:','_publishNow','debug','okdb','writeFileSync','_bucketIdx','\x0a\x20\x20No\x20documentation\x20found\x20for:\x20','Processors','API\x20tokens,\x20users,\x20and\x20credentials.','types:','getAuthOptions','assertFeature','\x20\x20Type\x20','hard-killed','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20set\x20active\x20environment\x20(persists\x20in\x20session)\x0a\x20\x20','\x20\x20Envs:\x20\x20\x20\x20','\x20\x20Shell\x20commands','Register,\x20update,\x20and\x20delete\x20function\x20definitions.','pending','VALIDATION_ERROR','Lax','array','listDesired','../okdb','single','[okdb]\x20exporting\x20blobs…','handler','index:ready','outputSchema','Origin','\x20\x20after\x20sync.\x20Duplicate\x20names\x20will\x20surface\x20as\x20ambiguous\x20logins\x20to\x20clean\x20up.','\x0a\x20\x20No\x20routes\x20matching\x20\x22','Invalid\x20index\x20key\x20type\x20for\x20\x27',';\x20Max-Age=0;\x20Expires=Thu,\x2001\x20Jan\x201970\x2000:00:00\x20GMT','\x20licenses','getChanges','_handleInProcess','[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a','[okdb]\x20nothing\x20to\x20reset\x20—\x20','okdb_session_','_nodeDbCache','listen({\x20workers:\x20','time','clearThreadStats','list','\x20\x20(unlimited)','Admin','\x20\x20✓\x20database\x20opened\x0a','heapTotal','\x20(must\x20be\x201–65535)','.\x20The\x20active\x20license\x20does\x20not\x20enable\x20\x22','Register/update/delete\x20types,\x20register/drop/rebuild\x20indexes,\x20set\x20TTL\x20policy.','_sockets','lag',')\x20—\x20they\x20will\x20NOT\x20be\x20preserved','pathname','\x20worker(s)\x20still\x20serving','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20','stopHeartbeat','\x20\x20(licenses\x20must\x20be\x20signed\x20by\x20the\x20matching\x20private\x20key)','_totalWrites','(none)','logLevel','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20','text/event-stream;\x20charset=utf-8','params.','License\x20already\x20stored','PUT\x20type/users/item/x\x20{\x22n\x22:1}','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','tokenType','\x27\x20is\x20already\x20registered','reap','exit','guards','email','lastClock','claimGated','decommissioned','[okdb]\x20imported\x20\x20types=','cause','child_process','SIGINT','catch','\x20\x20\x20\x20port:\x20\x20','_runMiddlewares','safety','LOGS','\x20binding\x20references\x20missing\x20input\x20field:\x20','undefined','already\x20in\x20use','argv','VERSION_MISMATCH','_jwksNegativeCache','quantum','[okdb-cluster]\x20primary\x20pid=','expiry','okdb.pid','history','OKDB_HTTP_WORKERS\x20env','\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','--blobs','building','JWT\x20is\x20missing\x20kid','cluster:','\x22\x20(must\x20be\x20debug|info|warn|error)','caps','_isFree','SERVICE_UNAVAILABLE','kill','[okdb]\x20created\x20.kdbconfig','toLocaleString','createdAt','clear','workers','indexOf','keys','_isWriter','closeIdleConnections','authenticateRequest','_putRowAsync','export','nodeKey','\x20│\x20','PATCH','\x20\x20records=','(primary\x20=\x20processor)','_ensureDesired','_instanceId','bumpCmd','slot','ttl:clear','bindings','type','type/users/item/alice\x20--env\x20staging','[okdb]\x20close\x20error:\x20','_getOidcDiscovery','base64url','handle','[okdb]\x20export\x20complete','Indexes','parseBearer','false','[okdb]\x20error:\x20failed\x20to\x20read\x20','platform','claims','http','create','disconnect','Unknown\x20error','grants','transport:\x20','tokenTtl','processors/','EXPIRES','no-cache,\x20no-transform','every','syncPeers','\x20active\x20env:\x20','close','fts:','INDEX_NOT_REGISTERED','List\x20views,\x20query\x20view\x20output,\x20inspect\x20metadata\x20and\x20definition.','./okdb-export.ndjson','\x20months\x20from\x20issuance)','permission','\x20has\x20canonical\x20metadata\x20but\x20missing\x20valid\x20inputSchema','stack','has','context','init','decodeActivationToken:\x20expected\x2077\x20bytes,\x20got\x20','stderr','\x20times\x20in\x20','supervisorKey','utf8','POST','maxWrites','uptime','txn:rollback','verify','cookie','authorizationUrl','(on\x20any\x20path\x20command)','doctor','ms\x0a','ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20','item:create','Cluster\x20replication.\x20The\x20\x22peer\x22\x20op\x20is\x20for\x20cluster\x20nodes,\x20not\x20human\x20users.','.okdb-write-test','config\x20file\x20invalid:\x20','remove','_userPhase','[okdb-cluster]\x20slot=','_cmd','level','halted','processor:error','__writeCounter','writeUInt32BE','route','\x20cf-ray=','must\x20be\x20',';\x20Path=','logs','env','repeat','readMs','[okdb]\x20starting…\x0a','GATEWAY_TIMEOUT','\x20\x20\x20\x20\x20\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','\x20\x20Usage:\x20logs\x20[on|off|debug|info|warn|error]','/\x20quit\x20/\x20Ctrl+C','[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot=','darwin','dynamic','cluster','?\x0a\x20\x20(node\x20identity\x20and\x20licenses\x20are\x20preserved)\x0a\x20\x20Type\x20\x22yes\x22\x20to\x20confirm:\x20','connections\x20blindly;\x20a\x20worker\x20lacking\x20the\x20route\x20404s).\x20Either\x20use\x20the\x20cooperative\x20','_normalizeOAuthAuthResult','_rootDb','[okdb]\x20error:\x20join\x20requires\x20a\x20remote\x20address.\x20Usage:\x20okdb\x20join\x20<address>\x20--token\x20<t>','noAdmin','writes=','include','index:reset','attachFeed','LICENSED_BUILD','treeView','OKDBVersionMismatchError','ephemeral','<path>','[okdb]\x20error:\x20token\x20with\x20name\x20\x22','token_endpoint',')\x20exited\x20','white','_onTick','\x20\x20\x20\x20writes:\x20\x20\x20\x20','[okdb]\x20created\x20./okdb-data','INDEX_REGISTERED','find','map','status','createHmac','Payload\x20too\x20large','INDEX_RESET','clearLine','true','use\x20<env>','resetFts','pause','licensee','meta','Open\x20licenses\x20cannot\x20exceed\x206\x20months\x20duration\x20(this\x20license\x20expires\x20','FTS_DROP','INTERNAL_ERROR','none','PUBLIC_KEY_PEM','alg','Invalid\x20activation\x20token:\x20','Queue','listen({\x20workers\x20>\x201\x20})\x20without\x20makeOkdb\x20requires\x20an\x20OPEN\x20okdb\x20—\x20call\x20after\x20open()\x20','default',':\x20key\x20[','digest','fast','INDEX_ALREADY_REGISTERED','sizeAfter',',\x20stopping\x20workers…\x0a','permissions',',\x20label:\x20','effective','pushEphemeral','\x20\x20Error:\x20','52840gpOlYW','standalone','bus:type_drop','_draining','type:registered','--help','system:type_drop','okdb_session','\x0a\x20\x20Joining\x20cluster\x20at\x20','\x0a\x20\x20✓\x20License\x20activated','[okdb]\x20./okdb-data\x20already\x20exists\x20—\x20skipping','_systemEnv','unknown','\x20(id:\x20','shmbuf.node','Invalid\x20token','\x20more','closures\x20in\x20THIS\x20process\x20—\x20forked\x20workers\x20cannot\x20serve\x20them\x20(cluster\x20distributes\x20','primary','\x20\x20Flags','mcp-session-id','updateSupervisedChildStats','Route\x20','Engines','integer','reduce','\x20which\x20does\x20not\x20exist','prototype','toUTCString','FEATURES','cf-connecting-ip','Feature\x20not\x20licensed:\x20','isPrimary','emit','--key','passive','⚠\x20INTERNAL\x20LICENSE\x20ACTIVE\x20—\x20all\x20features\x20and\x20limits\x20are\x20unlocked.\x20For\x20vendor/internal\x20use\x20only.','processor:retry','license:invalid','hasOwnProperty','\x20forked\x20','CONFLICT','Server\x20is\x20in\x20bootstrap\x20mode\x20and\x20only\x20accepts\x20localhost\x20connections\x20until\x20the\x20first\x20token\x20is\x20created.','_ensureTokensType','socket','compaction','header','resetIndex','_cursors','Embeddings','copy','\x20\x20Expected\x20one\x20of:','dim','--env\x20<name>','Pause/resume\x20processor,\x20trigger\x20backups,\x20restore.','sync-node','loop-lag\x20','object','_processStartedAt','resetting','payload','licenseType','\x20writes\x20(','use','\x20\x20Example:\x20okdb\x20join\x20https://node-a.example.com\x20--token\x20<t>\x20--address\x20http://myhost:8484\x0a','license:added','middlewares','byteLength','sse','\x20\x20Common\x20causes:','May\x20read\x20system\x20types\x20when\x20also\x20granted\x20the\x20underlying\x20read\x20permission.','formatCookie','\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',':\x20ping\x0a\x0a','value','\x20references\x20','FTS_RESET','\x20has\x20ambiguous\x20query/path\x20field:\x20','\x20for\x20system\x20env','setHeader','jwksTtlMs','entries','bootstrapBlocked','\x1b[0m','_desired','_buildChildRow','val','--log-requests','__OKDB_PUB_FINGERPRINT__','createPublicKey','\x20has\x20ambiguous\x20binding\x20for\x20path\x20field:\x20','.\x20Primary\x20keys\x20must\x20be\x20string\x20or\x20number.\x20Got:\x20','open\x20','fn-runner','keep-alive','addSSE','aud','isConnected','\x20supervised)','isTTY','uri','\x20for\x20commands,\x20','properties','Environments','\x20to\x20browse\x20the\x20API,\x20','running','write','\x20\x20\x20\x20expires:\x20\x20\x20','OPEN','respawnTimer','token','\x0a\x20\x20okdb\x20—\x20standalone\x20OKDB\x20server\x0a\x0a\x20\x20Usage:\x0a\x20\x20\x20\x20okdb\x20[options]\x0a\x20\x20\x20\x20okdb\x20<command>\x0a\x0a\x20\x20Options:\x0a\x20\x20\x20\x20-p,\x20--port\x20<port>\x20\x20\x20\x20\x20\x20\x20\x20HTTP\x20port\x20(default:\x208484)\x0a\x20\x20\x20\x20-d,\x20--path\x20<dir>\x20\x20\x20\x20\x20\x20\x20\x20\x20Database\x20directory\x20(default:\x20./okdb-data)\x0a\x20\x20\x20\x20-k,\x20--key\x20\x20<secret>\x20\x20\x20\x20\x20\x20Encryption\x20key\x20for\x20data\x20at\x20rest\x0a\x20\x20\x20\x20-c,\x20--config\x20<file>\x20\x20\x20\x20\x20\x20Config\x20file\x20path\x20(default:\x20.kdbconfig)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--log-level\x20<level>\x20\x20Log\x20level:\x20debug\x20|\x20info\x20|\x20warn\x20|\x20error\x20(default:\x20info)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-repl\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Start\x20server\x20without\x20interactive\x20shell\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-admin\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20admin\x20UI\x0a\x20\x20\x20\x20\x20\x20\x20\x20--open\x20[ip\x20...]\x20\x20\x20\x20\x20\x20Open\x20mode:\x20bypass\x20auth\x20for\x20listed\x20IPs\x20(default:\x20localhost).\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Examples:\x20--open\x20\x20--open\x20192.168.1.0/24\x20\x20--open\x20*\x0a\x20\x20\x20\x20\x20\x20\x20\x20--log-requests\x20\x20\x20\x20\x20\x20\x20Print\x20every\x20HTTP\x20request\x20to\x20stdout\x20(for\x20debugging)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--workers\x20<n>\x20\x20\x20\x20\x20\x20\x20\x20Number\x20of\x20passive\x20HTTP\x20worker\x20processes\x20(default:\x20cores\x20−\x201).\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20The\x20primary\x20runs\x20processing;\x20workers\x20serve\x20HTTP\x20+\x20SSE.\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-cluster\x20\x20\x20\x20\x20\x20\x20\x20\x20Run\x20single-process\x20(equivalent\x20to\x20--workers\x201)\x0a\x20\x20\x20\x20-v,\x20--version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Print\x20version\x20and\x20exit\x0a\x20\x20\x20\x20-h,\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x0a\x0a\x20\x20Commands:\x0a\x20\x20\x20\x20version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Print\x20version\x20and\x20exit\x0a\x20\x20\x20\x20doctor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Run\x20health\x20checks\x0a\x20\x20\x20\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Create\x20.kdbconfig\x20and\x20okdb-data/\x0a\x20\x20\x20\x20token\x20create\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Create\x20a\x20token\x20in\x20the\x20local\x20DB\x20(direct\x20access,\x20no\x20HTTP)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--name\x20<name>\x20\x20\x20\x20\x20\x20For\x20password\x20login\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--password\x20<pass>\x20\x20Password\x20(requires\x20--name)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--label\x20<text>\x20\x20\x20\x20\x20Human\x20description\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--permissions\x20<l>\x20\x20Comma-separated\x20baseline\x20permissions\x20(e.g.\x20\x22*\x22\x20or\x20\x22data:read\x22)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--grants\x20<json>\x20\x20\x20\x20Per-env\x20grants\x20as\x20JSON\x20(e.g.\x20\x27{\x22orders\x22:[\x22data:*\x22]}\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--ttl\x20<ms>\x20\x20\x20\x20\x20\x20\x20\x20\x20Optional\x20TTL\x20in\x20milliseconds\x0a\x20\x20\x20\x20token\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20List\x20all\x20tokens\x20in\x20the\x20local\x20DB\x0a\x20\x20\x20\x20token\x20revoke\x20<id>\x20\x20\x20\x20\x20\x20\x20\x20Revoke\x20(delete)\x20a\x20token\x20by\x20id\x20(full\x20uuid\x20or\x20unique\x20prefix)\x0a\x20\x20\x20\x20join\x20<address>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Join\x20an\x20existing\x20cluster\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--token\x20<t>\x20\x20\x20\x20\x20\x20\x20\x20Bearer\x20token\x20from\x20the\x20cluster\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--username\x20<u>\x20\x20\x20\x20\x20Or,\x20username\x20for\x20login\x20exchange\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--password\x20<p>\x20\x20\x20\x20\x20Password\x20for\x20login\x20exchange\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--address\x20<addr>\x20\x20\x20This\x20node\x27s\x20reachable\x20sync\x20address\x20(required)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--path\x20<dir>\x20\x20\x20\x20\x20\x20\x20Local\x20DB\x20path\x0a\x20\x20\x20\x20backup\x20[dir]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Hot\x20filesystem\x20backup\x20via\x20LMDB\x20native\x20copy\x20(default:\x20./okdb-backup)\x0a\x20\x20\x20\x20export\x20<file>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Streaming\x20NDJSON\x20logical\x20export\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env\x20<name>\x20\x20\x20\x20\x20\x20env\x20to\x20export\x20(default:\x20default)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--types\x20<a,b,...>\x20comma-separated\x20type\x20filter\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--changes\x20\x20\x20\x20\x20\x20\x20\x20\x20include\x20changelog\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--blobs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20also\x20export\x20blob\x20files\x20alongside\x0a\x20\x20\x20\x20import\x20<file>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Streaming\x20NDJSON\x20logical\x20import\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env\x20<name>\x20\x20\x20\x20\x20\x20target\x20env\x20override\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--types\x20<a,b,...>\x20import\x20only\x20these\x20types\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--drop\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20drop\x20&\x20recreate\x20existing\x20types\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--changes\x20\x20\x20\x20\x20\x20\x20\x20\x20restore\x20changelog\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--blobs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20also\x20import\x20blob\x20files\x20alongside\x0a\x20\x20\x20\x20reset\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Delete\x20and\x20recreate\x20database\x20(with\x20confirmation);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20node\x20identity\x20and\x20licenses\x20are\x20preserved\x0a\x20\x20\x20\x20license\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20List\x20stored\x20licenses,\x20current\x20tier,\x20and\x20usage\x0a\x20\x20\x20\x20license\x20<blob|path>\x20\x20\x20\x20\x20\x20Add\x20a\x20license\x20blob\x20(or\x20read\x20from\x20a\x20.license\x20file)\x0a\x20\x20\x20\x20license\x20<activation>\x20\x20\x20\x20\x20Activate\x20a\x20previously-added\x20license\x20with\x20the\x20vendor\x27s\x20token\x0a\x20\x20\x20\x20license\x20<id>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20details\x20for\x20one\x20stored\x20license\x20(by\x20uuid\x20or\x20prefix)\x0a\x20\x20\x20\x20license\x20remove\x20<id>\x20\x20\x20\x20\x20\x20Remove\x20a\x20stored\x20license\x0a\x0a\x20\x20Environment\x20variables:\x0a\x20\x20\x20\x20OKDB_PORT\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20HTTP\x20port\x0a\x20\x20\x20\x20OKDB_PATH\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Database\x20directory\x0a\x20\x20\x20\x20OKDB_LOG_LEVEL\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Log\x20level\x20(debug|info|warn|error)\x0a\x20\x20\x20\x20OKDB_KEY\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Encryption\x20key\x0a\x20\x20\x20\x20OKDB_NO_REPL=1\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20REPL\x0a\x20\x20\x20\x20OKDB_NO_ADMIN=1\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20admin\x20UI\x0a\x20\x20\x20\x20OKDB_HTTP_WORKERS\x20\x20\x20\x20\x20\x20\x20\x20\x20Number\x20of\x20passive\x20HTTP\x20worker\x20processes\x20(default:\x20cores\x20−\x201;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20forced\x20to\x201\x20if\x20the\x20shmbuf\x20native\x20binding\x20is\x20unavailable)\x0a\x0a\x20\x20Config\x20file\x20(.kdbconfig)\x20—\x20JSON,\x20all\x20keys\x20optional:\x0a\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22port\x22:\x20\x20\x20\x20\x208484,\x0a\x20\x20\x20\x20\x20\x20\x22path\x22:\x20\x20\x20\x20\x20\x22./okdb-data\x22,\x0a\x20\x20\x20\x20\x20\x20\x22key\x22:\x20\x20\x20\x20\x20\x20\x22...\x22,\x0a\x20\x20\x20\x20\x20\x20\x22logLevel\x22:\x20\x22info\x22,\x0a\x20\x20\x20\x20\x20\x20\x22noAdmin\x22:\x20\x20false,\x0a\x20\x20\x20\x20\x20\x20\x22noRepl\x22:\x20\x20\x20false,\x0a\x20\x20\x20\x20\x20\x20\x22auth\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22open\x22:\x20false\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20Examples:\x0a\x20\x20\x20\x20okdb\x0a\x20\x20\x20\x20okdb\x20--port\x209000\x20--path\x20./mydb\x0a\x20\x20\x20\x20okdb\x20--no-repl\x20--port\x208080\x0a\x20\x20\x20\x20okdb\x20--open\x0a\x20\x20\x20\x20okdb\x20--open\x20192.168.1.0/24\x0a\x20\x20\x20\x20okdb\x20doctor\x0a\x20\x20\x20\x20okdb\x20backup\x20./my-backup\x0a','endsWith','resume','decodeActivationToken:\x20input\x20must\x20be\x20a\x20string','_onProcEvent','⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20','fts','from','_isReader','origins','JWT\x20issuer\x20mismatch','item:remove','system:stopped','isWorker','\x20<path>\x20[json-body]','item:update','ingest','\x20\x20+','stream','\x20/\x20','readUInt32BE','_startAdmission','Forbidden','\x1b[34m','setPrompt','trim','fts:registered','\x1b[36m','registry-publish','port','\x20\x20\x20\x20\x20\x20\x20POST\x20(body\x20implies\x20POST)\x0a\x20\x20','[okdb]\x20.kdbconfig\x20already\x20exists\x20—\x20skipping','_drain','OKDB_CODE_TO_HTTP_STATUS','number','runtimeProcessesView','types/env=','forceAfterMs','_seen','\x1b[35m','response','sourceType','ttl','disable','PAYLOAD_TOO_LARGE','\x20\x20\x20\x20status:\x20\x20\x20\x20pending\x20activation','remaining-fields','__esModule','add','authMode','hostname','typeSubDbs','node\x20identity','\x20\x20\x20\x20•\x20an\x20activation\x20token\x20\x20(124\x20chars)','is\x20invalid','5239108gRwnpr','randomUUID','_scheduleFlush','_handlePoke','writeUInt16BE','protected:write','discoveryTtlMs','isBuffer','SIG_INVALID','reset','user','\x20\x20\x20\x20api:\x20\x20\x20http://localhost:','LICENSE_LIMIT_EXCEEDED','enabled','./okdb-data',');\x20','matcher','\x20\x20✗',';\x20SameSite=','[okdb]\x20importing\x20','_rowKey','\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','\x20uses\x20raw\x20bodyMode\x20without\x20addRaw/raw\x20route\x20metadata','method','rmSync','--eval','\x20already\x20exists','queue/','--password','sync','iss','version','result','[okdb]\x20port\x20','once','_shouldWrapResponse','Feature\x20not\x20available\x20on\x20free\x20tier:\x20','listen({\x20workers\x20}):\x20okdb\x20options\x20are\x20not\x20serializable\x20for\x20workers:\x20','cli','[res]\x20','jwks_uri','\x0a[okdb]\x20received\x20','ms\x20max=','x-requested-with','LICENSE_FEATURE_DISABLED','field','listening','\x20opening\x20','signingInput','writeMs','LABEL','destroyed','policy','toISOString','ID\x20token\x20is\x20not\x20accepted','param','details','reverse','level:\x20info','setSchema','[body]','fanout','{}[]:,\x27\x22','_loginStates','\x20MB\x20→\x20','forEach','configureAuth','setOwnMeta','ms\x20(attempt\x20','help','mode','/type/users/query\x0a\x20\x20\x20\x20','%),\x20','[okdb]\x20loaded\x20config:\x20','memoryUsage','--token','put','mean','config','licenseId','isActive','[okdb]\x20error:\x20--password\x20requires\x20--name','\x20\x20\x20\x20\x20\x20\x20','decodeLicenseBlob','_okdb','kind','ftsName','[okdb]\x20reset\x20aborted','schema:drop','[okdb]\x20invalid\x20port:\x20','\x0a\x20\x20Invalid\x20JSON:\x20','onLicenseExpired','code','--username','end','\x20logs\x20on\x20\x20','fts:reset','_log','unref','replace','(open-before-fork\x20seeds\x20the\x20shared\x20__tokenSecret\x20and\x20gives\x20workers\x20the\x20root\x20path).','\x0a\x20\x20','_validateOperationRequest','homedir','Content-Type','Release','\x20\x20✓\x20OKDB\x20cluster\x20running','padEnd','getClock','_role','[okdb]\x20import\x20complete','.kdb_history','isFile','schema:set','cpus','statusCode','online','\x20\x20\x20http://localhost:','mkdirSync','deaths','data:write','floor','https:','\x20does\x20not\x20exist','--no-cluster','100WUVtxM','line','1ofN:','ppid','ceil',',\x20got\x20','maxExtra','instanceId','processes','processes:\x20','rss','host','node\x20','columns','quit','sub','\x20\x20\x20\x20path:\x20\x20','\x20\x20\x20\x201.\x20Send\x20the\x20PIN\x20above\x20(','_validateOidcAccessToken','_flushDebounce','BOOTSTRAP_LOCALHOST_ONLY','clusterStatusView','_pending','activateLicense','SCHEMA_COLLECTION_INVALID','free\x20tier','content-type','\x20\x20\x20\x20-\x20The\x20license\x20blob\x20has\x20not\x20been\x20added\x20yet\x20—\x20run\x20`okdb\x20license\x20<blob>`\x20first.','\x20\x20changes=','\x20died\x20','enable','stats','targetType','type/users/query\x20{\x22active\x22:true}','--address','transport','kdb_admin_csrf','path','_markSeen','\x20\x20⚠\x20\x20','_userRouteCount','--no-repl','x-forwarded-for','createHash','STATUS','issueToken','fetch','\x20documents\x20fail\x20validation','importFromFile','(?:','removeSupervisedChild','hint','available','__okdbSlot','envs=','\x20\x20\x20\x20•\x20a\x20license\x20id\x20\x20\x20\x20\x20(uuid)','fill','\x22\x20is\x20used\x20by:\x20','--config','removeSync','server','groups','querySchema','SIGTERM','_windowCbs','test','31354336FtFmmN','bold','832647UsrgQB','dbPath','\x20day(s).','BAD_REQUEST','\x0a[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a','exposeHeaders','signature','--drop','Files','\x20\x20\x20\x20\x20http://localhost:','size','summary','worker','transactionSync','Create\x20and\x20delete\x20views,\x20start,\x20stop,\x20and\x20rebuild\x20them.','http-server',';\x20shmbuf\x20native\x20missing\x20→\x20forced\x20single-process','metrics','inst:','filter','exportToFile','4251480XcZaob','LICENSE_HASH_MISMATCH','OKDBIndexNotRegisteredError','decodeLicenseBlob:\x20failed\x20to\x20decode\x20payload:\x20','_onPoke','Upload,\x20update\x20metadata,\x20and\x20delete\x20files.','charCodeAt','scopes','\x20fetching\x20','internal','heapUsed','title','is\x20required','env:opened','selfKey','destroy','set-cookie','ref:violation_resolved','events','startsWith','../','tokenSecret','shutting\x20down…\x0a','-----BEGIN\x20CERTIFICATE-----\x0a','get','execArgv','features','[okdb]\x20started\x20in\x20','HEAD','lifecycle','error','[okdb]\x20invalid\x20log\x20level:\x20\x22','startHeartbeat','sizeBefore','exec','hidden','UNIQUE_CONSTRAINT','--grants','\x20(expires\x20','Sync','\x20\x20Usage:','sort','Invalid\x20license\x20blob:\x20','\x20\x20║','isArray','type:drop','OKDBInvalidValueError','tags','_lastCpuAt','routes','requests','items','validateRouteInput','import','System','writes','epoch','default:\x20cores−1\x20=\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20OKDB\x20SHELL\x20\x20\x20\x20\x20\x20\x20\x20','--workers','stopped','type/users','process','access','shmbufNative','_license','getPins','SCHEMA_VALIDATION_FAILED','slotKey','HTTP_','\x20\x20╔═══════════════════════════╗','workersFlag','\x20\x20http://localhost:','_admissionTimer','scrypt','external','existsSync','ES256','OKDBTypeNotRegisteredError','dirname','\x20MB)','RSA-SHA256','putNode','\x20\x20\x20\x20limits:\x20\x20\x20\x20','Execute\x20full-text\x20and\x20vector\x20searches.','\x20\x20\x20\x20id:\x20\x20\x20\x20','getCount','onWindow','HTTP\x20server\x20already\x20running','admin','creating','--open','_started','/type/users/item/alice\x0a\x20\x20\x20\x20','allowedAlgs','OKDB-PIN-V1:','QUIT','_totalReads','workersConfigured','license','FTS_REGISTERED','state','parse','\x20—\x20type\x20env\x20to\x20list\x20available\x0a','INDEX_PROGRESS','Internal\x20error','env/','processingStatusView','bodyMode','expiresAt','_nodeDb',',\x20signal=','(?:/(.*))?$','Bearer\x20','Register,\x20configure,\x20and\x20remove\x20cluster\x20peers.','\x20license(s)','\x0a\x20\x20Delete\x20ALL\x20data\x20in\x20','getHeader','auth','\x22.\x20Use:\x20create,\x20list,\x20revoke','License\x20signature\x20invalid:\x20','Protected\x20(gate)','createLoginState','ENVS','detachConsole','[okdb]\x20cluster\x20close\x20error:\x20','ref:violation','_drainOne','green','limits','Index\x20\x27','isSystem','values','is\x20not\x20allowed','allocUnsafe','confirm','_kind','msg','\x20records…','derivePin','[okdb]\x20error:\x20','\x20\x20\x20\x20license:\x20','\x0a\x20\x20Usage:\x20use\x20<env-name>\x0a','prompt','Records\x20inside\x20your\x20types\x20—\x20the\x20actual\x20rows\x20you\x20store.','\x20process','length','ms\x20mean=','current','_ownMeta','Forbidden\x20—\x20no\x20permissions\x20available','[okdb-cluster]\x20respawning\x20worker\x20slot=','noRepl','\x1b[32m','EXIT','started','xdg-open\x20','consecutiveFailures','cors','idx:','\x20\x20All\x20checks\x20passed.\x0a','Either\x20the\x20build\x20was\x20made\x20with\x20a\x20different\x20keypair,\x20or\x20the\x20license\x20was\x20issued\x20with\x20a\x20different\x20private\x20key.','.\x20Add\x20a\x20license\x20that\x20includes\x20\x22','ieee-p1363','embeddings','registerType','\x20\x20\x20\x20status:\x20\x20\x20\x20','HTTP\x20','OKDBAlreadyExistsError','dead','sync:apply','Worker-side:\x20claim,\x20heartbeat,\x20complete,\x20fail,\x20progress.','index','equals','List\x20tokens\x20and\x20users.','cpuWindowMs','\x22\x20to\x20enable\x20it.','publishChildRow','hasType','assign','Validation\x20failed:\x20','typesPerEnv','logRequests','--test','ALREADY_EXISTS','\x20\x20·\x20\x20','[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22','connection','\x20type','system:proc','pipe','cpuPct','query','system:bus_state_change','access:\x20','[okdb]\x20opening\x20','processing',':\x20connected\x0a\x0a','TOO_MANY_REQUESTS','PIN','reload','\x20\x20╚═══════════════════════════╝','cluster-wide','no\x20.kdbconfig\x20(using\x20defaults)','\x20\x20\x20\x203.\x20Run:\x20\x20okdb\x20license\x20<activation-token>','/api/','\x20ipc\x20error:\x20','migrate','stop','INVALID_INDEX_KEY','shell','openDB','now','\x20result','files','fromEntries','_timer','max','_clusterWorkerAttached','children','internalOnly','getCmd','application/json','\x1b[90m','\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','asyncProcessors','OKDB_HTTP_WORKERS','OKDBForeignKeyDeleteError','fieldPath','function','clusterWorkers','statuses','ITEM_UPDATE','\x20worker','\x22\x20matches\x20','_report','uuid','shmbuf/package.json','_totalReadMs','_active','node','OKDBForeignKeyError','stopping','Activation\x20invalid:\x20','split','processorsView','Gate\x20flag\x20required\x20to\x20touch\x20system\x20types\x20(those\x20whose\x20name\x20starts\x20with\x20\x22~\x22).\x20Combined\x20with\x20the\x20underlying\x20namespace\x20permission.','message','der','\x20\x20\x20\x20label:\x20\x20\x20\x20\x20\x20\x20','No\x20license\x20found\x20matching\x20this\x20activation\x20token','Materialized\x20views:\x20query\x20definitions\x20that\x20are\x20continuously\x20maintained\x20and\x20queryable.','\x0a\x20\x20Run\x20okdb\x20to\x20start\x20the\x20server.\x0a','data:\x20','\x0a-----END\x20CERTIFICATE-----\x0a','password','\x0a[okdb]\x20fatal\x20error:','okdb-http-worker-child.js','_cookieName','Cannot\x20set\x20enforce\x20schema\x20on\x20','SYSTEM_STOPPED','maxAge','_onStop','ttl:expired','active','\x20HTTP\x20workers\x20','addRaw','\x20envs','exp','readUInt16BE','[okdb]\x20reset:\x20','name','blobs','_fetchJwks','off','setEncoding','UNPROCESSABLE_ENTITY','ms\x20busy=','flushDebounce','roles','\x20tokens:','\x20\x20(','or\x20serve\x20single-process.','join'];_0x4d96=function(){return _0x1dab39;};return _0x4d96();}const _0x17fdfc=_0x240c;(function(_0xa646a,_0x38892c){const _0x3a8e64=_0x240c,_0x1a9f52=_0xa646a();while(!![]){try{const _0x4dce31=-parseInt(_0x3a8e64(0x5ff))/0x1+-parseInt(_0x3a8e64(0x5d7))/0x2+-parseInt(_0x3a8e64(0x385))/0x3+-parseInt(_0x3a8e64(0x341))/0x4*(parseInt(_0x3a8e64(0x21e))/0x5)+-parseInt(_0x3a8e64(0x39a))/0x6+-parseInt(_0x3a8e64(0x2c4))/0x7+parseInt(_0x3a8e64(0x383))/0x8;if(_0x4dce31===_0x38892c)break;else _0x1a9f52['push'](_0x1a9f52['shift']());}catch(_0x4d458a){_0x1a9f52['push'](_0x1a9f52['shift']());}}}(_0x4d96,0x76ec4));var require$$1=require(_0x17fdfc(0x366)),require$$1$1=require('fs'),require$$0=require('os'),require$$4$1=require('net'),require$$5=require('../okdb'),require$$0$2=require(_0x17fdfc(0x607)),require$$2=require('crypto'),require$$0$1=require('node:crypto'),require$$4=require(_0x17fdfc(0x15d)),require$$1$2=require('cluster'),require$$0$3=require(_0x17fdfc(0x4c7)),require$$0$4=require(_0x17fdfc(0xef)),require$$0$5=require(_0x17fdfc(0x19e)),require$$1$3=require('https'),require$$2$1=require(_0x17fdfc(0x521)),require$$8=require('stream'),commonjsGlobal=typeof globalThis!==_0x17fdfc(0x165)?globalThis:typeof window!==_0x17fdfc(0x165)?window:typeof global!==_0x17fdfc(0x165)?global:typeof self!==_0x17fdfc(0x165)?self:{};function getDefaultExportFromCjs(_0x510aa9){const _0x3c2d57=_0x17fdfc;return _0x510aa9&&_0x510aa9[_0x3c2d57(0x2bc)]&&Object[_0x3c2d57(0x239)][_0x3c2d57(0x245)][_0x3c2d57(0xf5)](_0x510aa9,'default')?_0x510aa9[_0x3c2d57(0x212)]:_0x510aa9;}var okdb$1={},okdbWorkers,hasRequiredOkdbWorkers;function requireOkdbWorkers(){if(hasRequiredOkdbWorkers)return okdbWorkers;hasRequiredOkdbWorkers=0x1;const _0x2b1b87=require$$0,_0x20c74b=require$$1$1,_0x287b43=require$$1;let _0x462806;function _0x141b76(){const _0x4db72b=_0x240c;if(process.env.OKDB_FORCE_SHMBUF_FALLBACK==='1')return![];if(_0x462806!==undefined)return _0x462806;try{const _0x26cef8=_0x287b43[_0x4db72b(0x3e9)](require[_0x4db72b(0x535)](_0x4db72b(0x487)));_0x462806=_0x20c74b[_0x4db72b(0x3e6)](_0x287b43[_0x4db72b(0x4b5)](_0x26cef8,_0x4db72b(0x592),_0x4db72b(0x32d),_0x4db72b(0x22c)));}catch{_0x462806=![];}return _0x462806;}function _0x11574f(){const _0x22db28=_0x240c,_0x1349bb=_0x2b1b87[_0x22db28(0x336)]()[_0x22db28(0x42c)];return Math['max'](0x1,_0x1349bb-0x1);}function _0x5e3582(_0x2f1598,_0x2624be={}){const _0x4b89f9=_0x240c,_0x5de2df=_0x2624be[_0x4b89f9(0x3da)]!==undefined?_0x2624be['shmbufNative']:_0x141b76();let _0x1633dd;if(_0x2f1598?.[_0x4b89f9(0x7f)])_0x1633dd=0x1;else{let _0x3345b3,_0x32cd5f;if(_0x2f1598?.[_0x4b89f9(0x3e1)]!==undefined&&_0x2f1598[_0x4b89f9(0x3e1)]!==null&&_0x2f1598[_0x4b89f9(0x3e1)]!=='')_0x3345b3=_0x2f1598[_0x4b89f9(0x3e1)],_0x32cd5f=_0x4b89f9(0x3d5);else{if(process.env.OKDB_HTTP_WORKERS!==undefined&&process.env.OKDB_HTTP_WORKERS!=='')_0x3345b3=process.env.OKDB_HTTP_WORKERS,_0x32cd5f=_0x4b89f9(0x47c);else _0x2f1598?.[_0x4b89f9(0x19e)]?.[_0x4b89f9(0x17e)]!==undefined&&_0x2f1598['http']['workers']!==null&&_0x2f1598[_0x4b89f9(0x19e)][_0x4b89f9(0x17e)]!==''&&(_0x3345b3=_0x2f1598['http']['workers'],_0x32cd5f=_0x4b89f9(0x97));}if(_0x3345b3===undefined)_0x1633dd=_0x11574f();else{const _0x3ae5a5=Number(_0x3345b3);!Number['isInteger'](_0x3ae5a5)||_0x3ae5a5<0x1?(console[_0x4b89f9(0x4c3)]('[okdb]\x20invalid\x20'+_0x32cd5f+'='+JSON[_0x4b89f9(0x4c1)](_0x3345b3)+_0x4b89f9(0x4da)),_0x1633dd=0x1):_0x1633dd=_0x3ae5a5;}}return!_0x5de2df&&_0x1633dd>0x1&&(console[_0x4b89f9(0x4c3)](_0x4b89f9(0x5fa)+(_0x4b89f9(0x540)+_0x1633dd+').')),_0x1633dd=0x1),_0x1633dd;}return okdbWorkers={'isShmbufNative':_0x141b76,'defaultWorkers':_0x11574f,'resolveWorkers':_0x5e3582},okdbWorkers;}var version='1.9.2',require$$3={'version':version},okdbAuthTokens,hasRequiredOkdbAuthTokens;function requireOkdbAuthTokens(){if(hasRequiredOkdbAuthTokens)return okdbAuthTokens;hasRequiredOkdbAuthTokens=0x1;const _0x3b12a2=require$$2;function _0x403724(_0x4d4ed4,_0xd69e90){const _0xcab42b=_0x240c;return _0x3b12a2['createHmac'](_0xcab42b(0x50f),_0xd69e90)[_0xcab42b(0x5fd)](_0x4d4ed4)[_0xcab42b(0x214)](_0xcab42b(0x195));}function _0x55f842(_0x2b567a,_0x3f651c){const _0x4cbe11=_0x240c;if(typeof _0x2b567a!==_0x4cbe11(0xa0)||typeof _0x3f651c!==_0x4cbe11(0xa0))return![];if(Buffer[_0x4cbe11(0x261)](_0x2b567a)!==Buffer['byteLength'](_0x3f651c))return![];return _0x3b12a2['timingSafeEqual'](Buffer[_0x4cbe11(0x294)](_0x2b567a),Buffer['from'](_0x3f651c));}function _0xef02a4(_0x1dcf29){const _0x4ed291=_0x240c;if(!_0x1dcf29?.['startsWith'](_0x4ed291(0x40b)))return null;return _0x1dcf29[_0x4ed291(0x5f5)](0x7);}function _0x3c993e(_0x21f80c=0x20){const _0x572cea=_0x240c;return _0x3b12a2[_0x572cea(0x99)](_0x21f80c)['toString'](_0x572cea(0x195));}function _0x237ca7(_0x15a088){const _0x56d28d=_0x240c;return _0x3b12a2[_0x56d28d(0x36c)]('sha256')[_0x56d28d(0x5fd)](_0x15a088)[_0x56d28d(0x214)](_0x56d28d(0x85));}function _0x18a84c(_0x3072f5,_0x1b5251,_0x46bfd1=0x36ee80){const _0xbdac7d=_0x240c;if(!_0x1b5251)throw new Error('Token\x20secret\x20not\x20configured');const _0x243a10=Date[_0xbdac7d(0x46e)](),_0x4a0f96=Buffer[_0xbdac7d(0x294)](JSON['stringify']({'iat':_0x243a10,'exp':_0x243a10+_0x46bfd1,'sub':_0x3072f5?.['id']??_0x3072f5?.[_0xbdac7d(0x350)]??null,'username':_0x3072f5?.[_0xbdac7d(0x5b1)]??_0x3072f5?.[_0xbdac7d(0x4a9)]??null,'roles':Array[_0xbdac7d(0x3c6)](_0x3072f5?.[_0xbdac7d(0x4b1)])?_0x3072f5[_0xbdac7d(0x4b1)]:[]}))[_0xbdac7d(0x57a)](_0xbdac7d(0x195)),_0x4f7c83=_0x403724(_0x4a0f96,_0x1b5251);return _0x4a0f96+'.'+_0x4f7c83;}function _0x18ff14(_0x3d1084,_0x3eb75e){const _0x2e4983=_0x240c;if(!_0x3eb75e||typeof _0x3d1084!==_0x2e4983(0xa0))return null;const [_0x3a6927,_0x59a495]=_0x3d1084[_0x2e4983(0x48e)]('.');if(!_0x3a6927||!_0x59a495)return null;const _0x57600d=_0x403724(_0x3a6927,_0x3eb75e);if(!_0x55f842(_0x59a495,_0x57600d))return null;try{const _0x3dc981=JSON[_0x2e4983(0x400)](Buffer['from'](_0x3a6927,'base64url')[_0x2e4983(0x57a)]()),_0x233785=0x7530;if(Date[_0x2e4983(0x46e)]()>Number(_0x3dc981?.[_0x2e4983(0x4a6)]??0x0)+_0x233785)return null;return _0x3dc981;}catch{return null;}}async function _0x3be1b9(_0x516140){return new Promise((_0x1bae87,_0x47b2f4)=>{const _0x231e25=_0x240c,_0x547c51=_0x3b12a2['randomBytes'](0x10);_0x3b12a2[_0x231e25(0x3e4)](_0x516140,_0x547c51,0x40,(_0x2ff6ad,_0x703d65)=>{const _0x30c20e=_0x231e25;if(_0x2ff6ad)_0x47b2f4(_0x2ff6ad);_0x1bae87(_0x547c51[_0x30c20e(0x57a)](_0x30c20e(0x85))+':'+_0x703d65[_0x30c20e(0x57a)]('hex'));});});}async function _0x28848a(_0x23e74a,_0x42ed8a){const _0x7fca5c=_0x240c,[_0x164796,_0x55d697]=_0x42ed8a[_0x7fca5c(0x48e)](':');if(!_0x164796||!_0x55d697)return![];const _0x36ab2a=Buffer[_0x7fca5c(0x294)](_0x164796,_0x7fca5c(0x85));return new Promise((_0x5b32c6,_0xd8db88)=>{_0x3b12a2['scrypt'](_0x23e74a,_0x36ab2a,0x40,(_0x53cd39,_0x4e10dd)=>{const _0x4ca282=_0x240c;if(_0x53cd39)_0xd8db88(_0x53cd39);_0x5b32c6(_0x3b12a2[_0x4ca282(0x54c)](_0x4e10dd,Buffer[_0x4ca282(0x294)](_0x55d697,_0x4ca282(0x85))));});});}return okdbAuthTokens={'hmac':_0x403724,'timingSafeEqual':_0x55f842,'parseBearer':_0xef02a4,'randomToken':_0x3c993e,'hashToken':_0x237ca7,'issueToken':_0x18a84c,'authenticateToken':_0x18ff14,'hashPassword':_0x3be1b9,'verifyPassword':_0x28848a},okdbAuthTokens;}var okdbLicenseCodec,hasRequiredOkdbLicenseCodec;function requireOkdbLicenseCodec(){const _0x12fbfc=_0x17fdfc;if(hasRequiredOkdbLicenseCodec)return okdbLicenseCodec;hasRequiredOkdbLicenseCodec=0x1;const _0x6b8708=require$$0$1,_0x43380e='0123456789ABCDEFGHJKMNPQRSTVWXYZ',_0x56bca9=new Uint8Array(0x100)[_0x12fbfc(0x379)](0xff);for(let _0x55a37d=0x0;_0x55a37d<_0x43380e['length'];_0x55a37d++){_0x56bca9[_0x43380e['charCodeAt'](_0x55a37d)]=_0x55a37d,_0x56bca9[_0x43380e['charCodeAt'](_0x55a37d)+0x20]=_0x55a37d;}_0x56bca9['O'[_0x12fbfc(0x3a0)](0x0)]=0x0,_0x56bca9['o'[_0x12fbfc(0x3a0)](0x0)]=0x0,_0x56bca9['I'[_0x12fbfc(0x3a0)](0x0)]=0x1,_0x56bca9['i'[_0x12fbfc(0x3a0)](0x0)]=0x1,_0x56bca9['L'[_0x12fbfc(0x3a0)](0x0)]=0x1,_0x56bca9['l'[_0x12fbfc(0x3a0)](0x0)]=0x1;function _0x58e8bb(_0x4e4de9){let _0x135e3c=0x0,_0x1044f6=0x0,_0x2bc174='';for(let _0x618227=0x0;_0x618227<_0x4e4de9['length'];_0x618227++){_0x1044f6=_0x1044f6<<0x8|_0x4e4de9[_0x618227],_0x135e3c+=0x8;while(_0x135e3c>=0x5){_0x135e3c-=0x5,_0x2bc174+=_0x43380e[_0x1044f6>>>_0x135e3c&0x1f];}}return _0x135e3c>0x0&&(_0x2bc174+=_0x43380e[_0x1044f6<<0x5-_0x135e3c&0x1f]),_0x2bc174;}function _0x3a278f(_0x31f851){const _0x1a7102=_0x12fbfc;_0x31f851=_0x31f851[_0x1a7102(0x327)](/-/g,'')['toUpperCase']();let _0x58f097=0x0,_0x30e76f=0x0;const _0x2438fd=[];for(let _0x5e1dd1=0x0;_0x5e1dd1<_0x31f851['length'];_0x5e1dd1++){const _0x83d71d=_0x56bca9[_0x31f851[_0x1a7102(0x3a0)](_0x5e1dd1)];if(_0x83d71d===0xff)continue;_0x30e76f=_0x30e76f<<0x5|_0x83d71d,_0x58f097+=0x5,_0x58f097>=0x8&&(_0x58f097-=0x8,_0x2438fd[_0x1a7102(0x591)](_0x30e76f>>>_0x58f097&0xff));}return Buffer['from'](_0x2438fd);}const _0x542eaf=[_0x12fbfc(0x2e1),_0x12fbfc(0x43e),_0x12fbfc(0x553),'fts','timeMachine','views',_0x12fbfc(0x4bc),'files'],_0x8e8e7a=0x0,_0x4ee21d=0x1,_0x1fabcd=0x2,_0x3e44df=0x6*0x1e*0x18*0x3c*0x3c*0x3e8;function _0x1b8f74({issuedAt:_0xd4d0f0,expiresAt:_0x2652ed,licensee:licensee='',features:features={},limits:limits={},licenseType:licenseType=_0x8e8e7a}){const _0x1888fe=_0x12fbfc,_0x11b4d7=Buffer['from'](licensee,'utf8')[_0x1888fe(0x5f5)](0x0,0x40),_0x1bcd22=0x1+0x1+0x4+0x4+0x1+_0x11b4d7[_0x1888fe(0x42c)]+0x2+0x10,_0x4683b2=Buffer['allocUnsafe'](_0x1bcd22);let _0x25894e=0x0;_0x4683b2['writeUInt8'](0x1,_0x25894e++),_0x4683b2[_0x1888fe(0xac)](licenseType,_0x25894e++),_0x4683b2[_0x1888fe(0x1d3)](Math[_0x1888fe(0x33d)](_0xd4d0f0/0x3e8),_0x25894e),_0x25894e+=0x4,_0x4683b2[_0x1888fe(0x1d3)](Math[_0x1888fe(0x33d)](_0x2652ed/0x3e8),_0x25894e),_0x25894e+=0x4,_0x4683b2['writeUInt8'](_0x11b4d7[_0x1888fe(0x42c)],_0x25894e++),_0x11b4d7[_0x1888fe(0x250)](_0x4683b2,_0x25894e),_0x25894e+=_0x11b4d7[_0x1888fe(0x42c)];let _0x300252=0x0;for(let _0x24705b=0x0;_0x24705b<_0x542eaf[_0x1888fe(0x42c)];_0x24705b++){if(features[_0x542eaf[_0x24705b]])_0x300252|=0x1<<_0x24705b;}_0x4683b2[_0x1888fe(0x2c8)](_0x300252,_0x25894e),_0x25894e+=0x2;const _0x169166=[_0x1888fe(0x5ba),_0x1888fe(0x44f),_0x1888fe(0x1a9),_0x1888fe(0x1bd)];for(const _0x1a8047 of _0x169166){_0x4683b2[_0x1888fe(0x1d3)](limits[_0x1a8047]||0x0,_0x25894e),_0x25894e+=0x4;}return _0x4683b2;}function _0x176916(_0x7c368d){const _0x19216c=_0x12fbfc;let _0x125bf5=0x0;const _0xb80fec=_0x7c368d[_0x19216c(0x557)](_0x125bf5++),_0x2ed908=_0x7c368d[_0x19216c(0x557)](_0x125bf5++),_0x214e62=_0x7c368d[_0x19216c(0x2a1)](_0x125bf5);_0x125bf5+=0x4;const _0x40ce82=_0x7c368d['readUInt32BE'](_0x125bf5);_0x125bf5+=0x4;const _0x50eb5f=_0x7c368d[_0x19216c(0x557)](_0x125bf5++),_0x30c368=_0x7c368d[_0x19216c(0x5f5)](_0x125bf5,_0x125bf5+_0x50eb5f)[_0x19216c(0x57a)](_0x19216c(0x1bb));_0x125bf5+=_0x50eb5f;const _0x4b3671=_0x7c368d[_0x19216c(0x4a7)](_0x125bf5);_0x125bf5+=0x2;const _0x3727d2={};for(let _0x3a91e8=0x0;_0x3a91e8<_0x542eaf[_0x19216c(0x42c)];_0x3a91e8++){_0x3727d2[_0x542eaf[_0x3a91e8]]=Boolean(_0x4b3671&0x1<<_0x3a91e8);}const _0x2db873=[_0x19216c(0x5ba),'typesPerEnv',_0x19216c(0x1a9),_0x19216c(0x1bd)],_0x4aceb2={};for(const _0x56fa11 of _0x2db873){const _0x263a1a=_0x7c368d[_0x19216c(0x2a1)](_0x125bf5);_0x125bf5+=0x4,_0x4aceb2[_0x56fa11]=_0x263a1a===0x0?null:_0x263a1a;}return{'v':_0xb80fec,'licenseType':_0x2ed908,'issuedAt':_0x214e62*0x3e8,'expiresAt':_0x40ce82*0x3e8,'licensee':_0x30c368,'features':_0x3727d2,'limits':_0x4aceb2};}function _0x2edef5(_0x346b57,_0x1000da){const _0x154cf1=_0x12fbfc,_0x3be35e=Buffer[_0x154cf1(0x4bf)]([_0x346b57,_0x1000da]),_0xf89803=_0x58e8bb(_0x3be35e),_0x54f637=[];for(let _0x5c94fa=0x0;_0x5c94fa<_0xf89803[_0x154cf1(0x42c)];_0x5c94fa+=0x8){_0x54f637[_0x154cf1(0x591)](_0xf89803[_0x154cf1(0x5f5)](_0x5c94fa,_0x5c94fa+0x8));}return _0x54f637[_0x154cf1(0x4b5)]('-');}function _0x327173(_0x28def7){const _0x17d373=_0x12fbfc;if(typeof _0x28def7!==_0x17d373(0xa0))throw new Error(_0x17d373(0x5c8));const _0x4f9c4f=_0x3a278f(_0x28def7['replace'](/-/g,''));if(_0x4f9c4f[_0x17d373(0x42c)]<0x41)throw new Error('decodeLicenseBlob:\x20blob\x20too\x20short\x20('+_0x4f9c4f[_0x17d373(0x42c)]+_0x17d373(0x4e8));const _0x2d8acb=_0x4f9c4f[_0x17d373(0x5f5)](0x0,_0x4f9c4f['length']-0x40),_0x3e79a2=_0x4f9c4f[_0x17d373(0x5f5)](_0x4f9c4f[_0x17d373(0x42c)]-0x40);let _0x5796df;try{_0x5796df=_0x176916(_0x2d8acb);}catch(_0x9ae07a){throw new Error(_0x17d373(0x39d)+_0x9ae07a['message']);}return{'rawBuf':_0x4f9c4f,'payload':_0x2d8acb,'sig':_0x3e79a2,'decoded':_0x5796df};}function _0x22c2c6(_0x14651f){const _0x2178b8=_0x12fbfc;return _0x6b8708['createHash'](_0x2178b8(0x50f))[_0x2178b8(0x5fd)](_0x14651f)[_0x2178b8(0x214)]()[_0x2178b8(0x5f5)](0x0,0x8);}function _0x4b492d(_0x501232,_0x5382c9,_0x3e96f5){const _0x37014a=_0x12fbfc,_0x487e07=_0x37014a(0x3f9)+_0x3e96f5,_0x2278d4=Buffer['concat']([Buffer[_0x37014a(0x294)](_0x501232,_0x37014a(0x1bb)),_0x5382c9]),_0x16b8ad=_0x6b8708[_0x37014a(0x1ff)](_0x37014a(0x50f),_0x487e07)[_0x37014a(0x5fd)](_0x2278d4)['digest'](),_0x4ea381=_0x58e8bb(_0x16b8ad[_0x37014a(0x5f5)](0x0,0x5));return{'pin':_0x4ea381,'pinHmac':_0x16b8ad};}function _0x1c7b97(_0x1a781c,_0x57679f,_0x3db16c){const _0x3f7f94=_0x12fbfc,_0x12e580=Buffer[_0x3f7f94(0x420)](0x4d);let _0x188e9b=0x0;_0x12e580[_0x3f7f94(0xac)](0x1,_0x188e9b++),_0x1a781c[_0x3f7f94(0x250)](_0x12e580,_0x188e9b),_0x188e9b+=0x8,_0x12e580['writeUInt32BE'](_0x57679f,_0x188e9b),_0x188e9b+=0x4,_0x3db16c['copy'](_0x12e580,_0x188e9b);const _0x373469=_0x58e8bb(_0x12e580),_0x3dc962=[];for(let _0x45546e=0x0;_0x45546e<_0x373469[_0x3f7f94(0x42c)];_0x45546e+=0x6){_0x3dc962[_0x3f7f94(0x591)](_0x373469[_0x3f7f94(0x5f5)](_0x45546e,_0x45546e+0x6));}return _0x3dc962['join']('-');}function _0x7a7637(_0x14e408){const _0x47e9bf=_0x12fbfc;if(typeof _0x14e408!==_0x47e9bf(0xa0))throw new Error(_0x47e9bf(0x290));const _0x391634=_0x3a278f(_0x14e408['replace'](/-/g,''));if(_0x391634['length']!==0x4d)throw new Error(_0x47e9bf(0x1b7)+_0x391634[_0x47e9bf(0x42c)]);let _0x5adc2a=0x0;const _0x3ab3df=_0x391634[_0x47e9bf(0x557)](_0x5adc2a++),_0xb66db3=_0x391634[_0x47e9bf(0x5f5)](_0x5adc2a,_0x5adc2a+0x8);_0x5adc2a+=0x8;const _0x306114=_0x391634['readUInt32BE'](_0x5adc2a);_0x5adc2a+=0x4;const _0x39bdd5=_0x391634[_0x47e9bf(0x5f5)](_0x5adc2a);return{'v':_0x3ab3df,'licenseHash':_0xb66db3,'expiry':_0x306114,'sig':_0x39bdd5};}function _0x3a84ed({tokenString:_0xcac2cf,nodeId:_0x1158e9,rawBlobBuf:_0x44bb93,pubKeyPem:_0x3cac03,pubFingerprint:_0x3c0345}){const _0x4df195=_0x12fbfc;let _0x19e99b;try{_0x19e99b=_0x7a7637(_0xcac2cf);}catch(_0x25b459){return{'valid':![],'reason':_0x4df195(0xfc)};}const _0x56d977=_0x22c2c6(_0x44bb93);if(!_0x56d977[_0x4df195(0x447)](_0x19e99b[_0x4df195(0x4cd)]))return{'valid':![],'reason':_0x4df195(0x39b)};const {pinHmac:_0x549e0c}=_0x4b492d(_0x1158e9,_0x56d977,_0x3c0345),_0x279f76=Buffer['allocUnsafe'](0x4);_0x279f76[_0x4df195(0x1d3)](_0x19e99b[_0x4df195(0x16c)],0x0);const _0x43c2fa=Buffer[_0x4df195(0x4bf)]([Buffer['from']([_0x19e99b['v']]),_0x549e0c[_0x4df195(0x5f5)](0x0,0x5),_0x19e99b[_0x4df195(0x4cd)],_0x279f76]);try{const _0x14e988=_0x6b8708['verify'](null,_0x43c2fa,_0x3cac03,_0x19e99b['sig']);if(!_0x14e988)return{'valid':![],'reason':'SIG_INVALID'};}catch(_0x3911bb){return{'valid':![],'reason':_0x4df195(0x2cc)};}if(_0x19e99b[_0x4df195(0x16c)]<Date[_0x4df195(0x46e)]()/0x3e8)return{'valid':![],'reason':_0x4df195(0xe4)};return{'valid':!![],'reason':'ok'};}function _0x4aaafd(_0x2e1687){const _0x383b43=_0x12fbfc;if(typeof _0x2e1687!==_0x383b43(0xa0))return _0x383b43(0x22a);const _0x427f4b=_0x2e1687[_0x383b43(0x2a6)]();if(_0x427f4b[_0x383b43(0x3ad)]('/')||_0x427f4b[_0x383b43(0x3ad)]('./')||_0x427f4b['startsWith'](_0x383b43(0x3ae))||/^[A-Za-z]:[\\/]/['test'](_0x427f4b))return _0x383b43(0x366);if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i[_0x383b43(0x382)](_0x427f4b))return _0x383b43(0x486);const _0x19c7de=_0x427f4b[_0x383b43(0x327)](/[\s-]+/g,'')[_0x383b43(0x42c)];if(_0x19c7de===0x7c)return'activation';if(_0x19c7de>=0x95&&_0x19c7de<=0xfc)return'blob';return _0x383b43(0x22a);}return okdbLicenseCodec={'toBase32':_0x58e8bb,'fromBase32':_0x3a278f,'encodeLicensePayload':_0x1b8f74,'decodeLicensePayload':_0x176916,'encodeLicenseBlob':_0x2edef5,'decodeLicenseBlob':_0x327173,'licenseHash':_0x22c2c6,'derivePin':_0x4b492d,'encodeActivationToken':_0x1c7b97,'decodeActivationToken':_0x7a7637,'verifyActivation':_0x3a84ed,'detectInputType':_0x4aaafd,'FEATURE_NAMES':_0x542eaf,'LICENSE_TYPE_STANDARD':_0x8e8e7a,'LICENSE_TYPE_OPEN':_0x4ee21d,'LICENSE_TYPE_INTERNAL':_0x1fabcd,'OPEN_LICENSE_MAX_DURATION_MS':_0x3e44df},okdbLicenseCodec;}var okdbError,hasRequiredOkdbError;function requireOkdbError(){if(hasRequiredOkdbError)return okdbError;hasRequiredOkdbError=0x1;class _0x15a3d4 extends Error{constructor(_0x4ca99e,_0x2fd31c,_0x32a78f={}){const _0xda9bef=_0x240c;super(_0x4ca99e),this['name']=_0xda9bef(0x576),this[_0xda9bef(0x320)]=_0x2fd31c,this[_0xda9bef(0x2fc)]=_0x32a78f,_0x32a78f[_0xda9bef(0x15c)]&&(this['cause']=_0x32a78f[_0xda9bef(0x15c)]),Error['captureStackTrace'](this,this['constructor']);}}class _0x56da8f extends _0x15a3d4{constructor(_0x5c0c24,_0x4fdcc4,_0x3626da,_0x4896b4){const _0x2eb959=_0x240c;super('Version\x20mismatch\x20for\x20'+_0x5c0c24+'@'+_0x4fdcc4+_0x2eb959(0x572)+_0x3626da+_0x2eb959(0x346)+_0x4896b4,_0x2eb959(0x168),{'type':_0x5c0c24,'key':_0x4fdcc4,'expectedVersion':_0x3626da,'actualVersion':_0x4896b4}),this[_0x2eb959(0x4a9)]=_0x2eb959(0x1f1);}}class _0x153c66 extends _0x15a3d4{constructor(_0x36310a,_0xd09b){const _0x5cad15=_0x240c;super(_0x36310a+'@'+_0xd09b+'\x20does\x20not\x20exist','NOT_FOUND',{'type':_0x36310a,'key':_0xd09b}),this[_0x5cad15(0x4a9)]=_0x5cad15(0x4d3);}}class _0x388a15 extends _0x15a3d4{constructor(_0x4672ab,_0x3aedd9){const _0x50f5e1=_0x240c;super(_0x4672ab+'@'+_0x3aedd9+_0x50f5e1(0x2de),_0x50f5e1(0x452),{'type':_0x4672ab,'key':_0x3aedd9}),this[_0x50f5e1(0x4a9)]=_0x50f5e1(0x442);}}class _0xc3bbf3 extends _0x15a3d4{constructor(_0x2980d1,_0x3896cd){const _0x3c898e=_0x240c,_0x30a3b8=typeof _0x3896cd;super(_0x3c898e(0x12d)+_0x2980d1+'\x27:\x20'+_0x30a3b8+_0x3c898e(0x8c)+_0x3896cd,_0x3c898e(0x46b),{'index':_0x2980d1,'key':_0x3896cd,'keyType':_0x30a3b8}),this[_0x3c898e(0x4a9)]='OKDBInvalidIndexKeyError';}}class _0x118f7f extends _0x15a3d4{constructor(_0x1ecff0){const _0x3ae52e=_0x240c,_0x119e16=typeof _0x1ecff0;super(_0x3ae52e(0x4d5)+_0x119e16+_0x3ae52e(0x279)+_0x1ecff0,_0x3ae52e(0x5d1),{'key':_0x1ecff0,'keyType':_0x119e16}),this[_0x3ae52e(0x4a9)]='OKDBInvalidPrimaryKeyError';}}class _0x157e76 extends _0x15a3d4{constructor(_0x1b8c30){const _0x10efb1=_0x240c;super(_0x10efb1(0x53a)+_0x1b8c30+_0x10efb1(0xf0),'TYPE_NOT_REGISTERED',{'type':_0x1b8c30}),this[_0x10efb1(0x4a9)]=_0x10efb1(0x3e8);}}class _0x2d9769 extends _0x15a3d4{constructor(_0x183df6){const _0x18cbfa=_0x240c;super(_0x18cbfa(0x53a)+_0x183df6+'\x27\x20already\x20registered',_0x18cbfa(0xfd),{'type':_0x183df6}),this[_0x18cbfa(0x4a9)]=_0x18cbfa(0xcc);}}class _0x40ecf1 extends _0x15a3d4{constructor(_0xb1e0d5,_0x2d6a91){const _0x40da99=_0x240c;super(_0x40da99(0x41c)+_0x2d6a91+_0x40da99(0x59f)+_0xb1e0d5+_0x40da99(0xf0),_0x40da99(0x1ad),{'type':_0xb1e0d5,'index':_0x2d6a91}),this[_0x40da99(0x4a9)]=_0x40da99(0x39c);}}class _0x32a2f2 extends _0x15a3d4{constructor(_0x566635,_0xdc691e){const _0x2473c3=_0x240c;super(_0x2473c3(0x41c)+_0xdc691e+_0x2473c3(0x59f)+_0x566635+_0x2473c3(0x153),_0x2473c3(0x216),{'type':_0x566635,'index':_0xdc691e}),this[_0x2473c3(0x4a9)]='OKDBIndexAlreadyRegisteredError';}}class _0x49e9dc extends _0x15a3d4{constructor(_0x12d902,_0x5249dc={}){const _0xc20680=_0x240c;super(_0x12d902,'INVALID_VALUE',_0x5249dc),this[_0xc20680(0x4a9)]=_0xc20680(0x3c8);}}class _0xe6eb17 extends _0x15a3d4{constructor(_0x30559f,_0x3e19f1,_0x3c88ce,_0x2f6125,_0x30cb3e){const _0x3bc63f=_0x240c;super('Unique\x20constraint\x20violated\x20on\x20'+_0x30559f+'@'+_0x3e19f1+_0x3bc63f(0x213)+_0x3c88ce+_0x3bc63f(0x57f)+_0x2f6125+_0x3bc63f(0x51e)+_0x30cb3e+'\x27',_0x3bc63f(0x3be),{'type':_0x30559f,'index':_0x3e19f1,'indexKey':_0x3c88ce,'existingKey':_0x2f6125,'conflictingKey':_0x30cb3e}),this[_0x3bc63f(0x4a9)]='OKDBUniqueConstraintError';}}class _0xc3d97 extends _0x15a3d4{constructor(_0x546636,_0x29d5e4,_0x17c554){const _0x5caf02=_0x240c;super('Schema\x20validation\x20failed\x20for\x20'+_0x546636+'@'+_0x29d5e4,_0x5caf02(0x3dd),{'type':_0x546636,'key':_0x29d5e4,'errors':_0x17c554}),this[_0x5caf02(0x4a9)]=_0x5caf02(0x4c8),this[_0x5caf02(0x191)]=_0x546636,this[_0x5caf02(0x8b)]=_0x29d5e4,this[_0x5caf02(0x542)]=_0x17c554;}}class _0x5107f6 extends _0x15a3d4{constructor(_0x48132c,_0x52618e){const _0x280771=_0x240c;super(_0x280771(0x49d)+_0x48132c+':\x20'+_0x52618e[_0x280771(0x42c)]+_0x280771(0x370),_0x280771(0x359),{'type':_0x48132c,'failures':_0x52618e}),this['name']=_0x280771(0xa8),this['type']=_0x48132c,this[_0x280771(0x50d)]=_0x52618e;}}class _0x500eea extends _0x15a3d4{constructor(_0x3dbb65,_0x5ef7d9,_0x506b5b,_0x3cdff7,_0x3a6805){const _0x35339c=_0x240c;super(_0x35339c(0x5d2)+_0x3dbb65+'@'+_0x5ef7d9+'.'+_0x506b5b+_0x35339c(0x269)+_0x3cdff7+'@'+_0x3a6805+_0x35339c(0x238),_0x35339c(0x52e),{'sourceType':_0x3dbb65,'sourceKey':_0x5ef7d9,'fieldPath':_0x506b5b,'targetType':_0x3cdff7,'targetKey':_0x3a6805}),this[_0x35339c(0x4a9)]=_0x35339c(0x48b),this[_0x35339c(0x2b6)]=_0x3dbb65,this['sourceKey']=_0x5ef7d9,this[_0x35339c(0x47e)]=_0x506b5b,this[_0x35339c(0x361)]=_0x3cdff7,this['targetKey']=_0x3a6805;}}class _0x5353a5 extends _0x15a3d4{constructor(_0x4053ea,_0x4e6397,_0x5daec3){const _0x3f7fd7=_0x240c;super('Cannot\x20delete\x20'+_0x4053ea+'@'+_0x4e6397+':\x20'+_0x5daec3[_0x3f7fd7(0x42c)]+'\x20document(s)\x20reference\x20it\x20with\x20onDelete:restrict','FOREIGN_KEY_DELETE_RESTRICTED',{'targetType':_0x4053ea,'targetKey':_0x4e6397,'references':_0x5daec3}),this[_0x3f7fd7(0x4a9)]=_0x3f7fd7(0x47d),this[_0x3f7fd7(0x361)]=_0x4053ea,this['targetKey']=_0x4e6397,this[_0x3f7fd7(0xd4)]=_0x5daec3;}}class _0x2598dc extends _0x15a3d4{constructor(_0x41b384,_0x2fb8bc,_0x3a50c5){const _0x3d2370=_0x240c;super('Index\x20\x22'+_0x2fb8bc+_0x3d2370(0xe6)+_0x41b384+_0x3d2370(0x37a)+_0x3a50c5[_0x3d2370(0x1fd)](_0x527f14=>_0x527f14['kind']+':'+_0x527f14[_0x3d2370(0x4a9)])[_0x3d2370(0x4b5)](',\x20'),_0x3d2370(0xdd),{'type':_0x41b384,'index':_0x2fb8bc,'usedBy':_0x3a50c5}),this[_0x3d2370(0x4a9)]='OKDBIndexHasConsumersError';}}return okdbError={'OKDBError':_0x15a3d4,'OKDBVersionMismatchError':_0x56da8f,'OKDBNotFoundError':_0x153c66,'OKDBAlreadyExistsError':_0x388a15,'OKDBInvalidIndexKeyError':_0xc3bbf3,'OKDBInvalidPrimaryKeyError':_0x118f7f,'OKDBTypeNotRegisteredError':_0x157e76,'OKDBTypeAlreadyRegisteredError':_0x2d9769,'OKDBIndexNotRegisteredError':_0x40ecf1,'OKDBIndexAlreadyRegisteredError':_0x32a2f2,'OKDBInvalidValueError':_0x49e9dc,'OKDBUniqueConstraintError':_0xe6eb17,'OKDBSchemaValidationError':_0xc3d97,'OKDBSchemaCollectionError':_0x5107f6,'OKDBForeignKeyError':_0x500eea,'OKDBForeignKeyDeleteError':_0x5353a5,'OKDBIndexHasConsumersError':_0x2598dc},okdbError;}var okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x47d863=_0x17fdfc;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x144c93={'PUT':_0x47d863(0x310),'REMOVE':'remove','INDEX_DROP':_0x47d863(0x4d9),'INDEX_REGISTER':_0x47d863(0x520),'INDEX_RESET':_0x47d863(0x24d),'TYPE_REGISTER':'registerType','TYPE_DROP':_0x47d863(0x53f),'FTS_REGISTER':_0x47d863(0x5d6),'FTS_DROP':'dropFts','FTS_RESET':_0x47d863(0x205),'SCHEMA_SET':_0x47d863(0x2ff),'SCHEMA_DROP':'dropSchema','TTL_SET':'setTtl','TTL_CLEAR':_0x47d863(0x543)},_0x5676c0={'SYSTEM_READY':'system:ready','SYSTEM_STOPPED':_0x47d863(0x299),'SYSTEM_CLOCK_CHANGE':'system:clock_change','SYSTEM_POKE':_0x47d863(0x59d),'SYSTEM_DRAIN':'system:drain','SYSTEM_TYPE_DROP':_0x47d863(0x224),'SYSTEM_PROC':_0x47d863(0x457),'SYSTEM_BUS_STATE_CHANGE':_0x47d863(0x45b),'ITEM_CREATE':_0x47d863(0x1c7),'ITEM_UPDATE':_0x47d863(0x29c),'ITEM_REMOVE':_0x47d863(0x298),'INDEX_RESET':_0x47d863(0x1ed),'INDEX_READY':_0x47d863(0x128),'INDEX_PROGRESS':_0x47d863(0x583),'VIEW_PROGRESS':'view:progress','INDEX_DROP':'index:drop','INDEX_REGISTERED':'index:registered','FTS_REGISTERED':_0x47d863(0x2a7),'FTS_DROP':'fts:drop','FTS_RESET':_0x47d863(0x324),'SCHEMA_SET':_0x47d863(0x335),'SCHEMA_DROP':_0x47d863(0x31c),'UNIQUE_VIOLATION':_0x47d863(0x4c6),'UNIQUE_VIOLATION_RESOLVED':'unique:violation_resolved','REF_VIOLATION':_0x47d863(0x418),'REF_VIOLATION_RESOLVED':_0x47d863(0x3ab),'SYNC_APPLY':_0x47d863(0x444),'TXN_START':'txn:start','TXN_END':_0x47d863(0x517),'TXN_ROLLBACK':_0x47d863(0x1bf),'TYPE_REGISTERED':_0x47d863(0x222),'TYPE_DROP':_0x47d863(0x3c7),'ENV_OPENED':_0x47d863(0x3a7),'ENV_REMOVED':_0x47d863(0xa3),'TTL_EXPIRED':_0x47d863(0x4a1),'TTL_SET':_0x47d863(0x55c),'TTL_CLEAR':_0x47d863(0x18f),'LICENSE_INVALID':_0x47d863(0x244),'LICENSE_ADDED':_0x47d863(0x25f),'LICENSE_ACTIVATED':_0x47d863(0x5d8),'LICENSE_REMOVED':_0x47d863(0xf2)},_0x49aa51={'CREATING':'creating','RESETTING':_0x47d863(0x259),'READY':_0x47d863(0xc2),'DROPPING':_0x47d863(0xd5),'WAITING':'waiting'},_0x23038e={'CREATED':_0x47d863(0x508),'STARTING':'starting','STARTED':_0x47d863(0x435),'STOPPING':_0x47d863(0x48c),'STOPPED':'stopped'},_0x14735a={'CREATING':_0x47d863(0x3f4),'READY':'ready','HALTED':_0x47d863(0x1d0),'STOPPED':_0x47d863(0x3d6),'RESETTING':'resetting'},_0x176d8b=Object[_0x47d863(0x574)]({'POKE':'bus:poke','DRAIN':'bus:drain','TYPE_DROP':_0x47d863(0x220),'PROC':_0x47d863(0xcd)});return okdbEnums={'BUS_EVENTS':_0x176d8b,'CHANGE_ACTIONS':_0x144c93,'EVENTS':_0x5676c0,'INDEX_STATE':_0x49aa51,'OKDB_STATE':_0x23038e,'VIEW_STATE':_0x14735a},okdbEnums;}var okdbPubkey,hasRequiredOkdbPubkey;function requireOkdbPubkey(){const _0x4dffaf=_0x17fdfc;if(hasRequiredOkdbPubkey)return okdbPubkey;hasRequiredOkdbPubkey=0x1;const _0x111fff=require$$1$1,_0x3d8d06=require$$1,_0x5a496b=require$$2,_0x435f69=_0x111fff[_0x4dffaf(0x5b3)](_0x3d8d06[_0x4dffaf(0x4b5)](__dirname,_0x4dffaf(0xf9)),_0x4dffaf(0x1bb))[_0x4dffaf(0x2a6)](),_0x3802b4=_0x5a496b[_0x4dffaf(0x277)](_0x435f69)[_0x4dffaf(0x185)]({'type':_0x4dffaf(0x5b4),'format':_0x4dffaf(0x492)}),_0x15a5a1=_0x5a496b[_0x4dffaf(0x36c)](_0x4dffaf(0x50f))[_0x4dffaf(0x5fd)](_0x3802b4)[_0x4dffaf(0x214)]('hex')['slice'](0x0,0x10);return okdbPubkey={'PUBLIC_KEY_PEM':_0x435f69,'PUB_FINGERPRINT':_0x15a5a1},okdbPubkey;}var okdbLicense,hasRequiredOkdbLicense;function requireOkdbLicense(){const _0x40e234=_0x17fdfc;if(hasRequiredOkdbLicense)return okdbLicense;hasRequiredOkdbLicense=0x1;const _0x4894ec=require$$2,{OKDBError:_0x5394ba}=requireOkdbError(),{EVENTS:_0x3be052}=requireOkdbEnums(),_0x45e14f=requireOkdbLicenseCodec(),{LICENSE_TYPE_OPEN:_0x37e92b,LICENSE_TYPE_INTERNAL:_0xd3d820,OPEN_LICENSE_MAX_DURATION_MS:_0x38effe}=_0x45e14f,_0x1c90c2=requireOkdbPubkey(),_0x10e2d5={'LICENSED_BUILD':_0x40e234(0x203),'PUBLIC_KEY_PEM':_0x1c90c2['PUBLIC_KEY_PEM'],'PUB_FINGERPRINT':_0x1c90c2[_0x40e234(0x571)],'LICENSE_EXPIRED_ACTION':_0x40e234(0x5f4)},_0x4f6f41=_0x40e234(0x537),_0x25bb71={'features':{'sync':![],'embeddings':![],'engines':![],'fts':!![],'timeMachine':![],'views':!![],'mcp':!![],'files':!![]},'limits':{'envs':0x2,'typesPerEnv':0xa,'syncPeers':0x0,'maxWrites':0xf4240},'_isFree':!![]};async function _0x5cfa47(_0x39a32a){const _0x2aab72=_0x40e234;!_0x39a32a[_0x2aab72(0x44c)](_0x4f6f41)&&await _0x39a32a[_0x2aab72(0x43f)](_0x4f6f41);}class _0x5a7b47{constructor(_0xebbb){const _0x342bc4=_0x40e234;this[_0x342bc4(0x110)]=_0xebbb,this[_0x342bc4(0x489)]=null;}async[_0x40e234(0x462)](){const _0x1691ad=_0x40e234,_0x5e9f1d=this['okdb'][_0x1691ad(0x229)];if(!_0x5e9f1d||!_0x5e9f1d[_0x1691ad(0x44c)](_0x4f6f41)){this[_0x1691ad(0x489)]=null;return;}const _0x4ff861=this[_0x1691ad(0x110)]['id'];let _0x337356=null;for(const {key:_0x3195d6,value:_0x278759}of _0x5e9f1d[_0x1691ad(0x610)](_0x4f6f41)){const _0x100e71=this[_0x1691ad(0x90)](_0x278759,_0x4ff861);_0x100e71===_0x1691ad(0x4a2)&&!_0x337356&&(_0x337356={..._0x278759,'id':_0x3195d6,'status':_0x100e71});}this[_0x1691ad(0x489)]=_0x337356;if(this[_0x1691ad(0x489)]&&this[_0x1691ad(0x489)][_0x1691ad(0x25b)]===_0x37e92b){const _0x191eb5=Math[_0x1691ad(0x345)]((this[_0x1691ad(0x489)][_0x1691ad(0x407)]-Date[_0x1691ad(0x46e)]())/0x5265c00);this[_0x1691ad(0x110)]['log']?.[_0x1691ad(0x4c3)]('⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20'+_0x191eb5+_0x1691ad(0x387),{'feature':_0x1691ad(0x3fd),'licensee':this['_active'][_0x1691ad(0x207)],'expiresAt':new Date(this[_0x1691ad(0x489)]['expiresAt'])[_0x1691ad(0x2f9)]()});}this[_0x1691ad(0x489)]&&this[_0x1691ad(0x489)][_0x1691ad(0x25b)]===_0xd3d820&&this[_0x1691ad(0x110)][_0x1691ad(0x5f4)]?.['warn'](_0x1691ad(0x242),{'feature':'license','licensee':this[_0x1691ad(0x489)][_0x1691ad(0x207)]});}[_0x40e234(0x90)](_0x169d79,_0x3afaae){const _0x2d17de=_0x40e234;if(!_0x169d79['blob'])return _0x2d17de(0x585);let _0x3eab9f;try{_0x3eab9f=_0x45e14f['decodeLicenseBlob'](_0x169d79[_0x2d17de(0x5e1)]);}catch(_0x3ed4c7){return _0x2d17de(0x585);}try{const _0x4a90ee=_0x4894ec[_0x2d17de(0x1c0)](null,_0x3eab9f[_0x2d17de(0x25a)],_0x10e2d5[_0x2d17de(0x20d)],_0x3eab9f[_0x2d17de(0x55a)]);if(!_0x4a90ee)return _0x2d17de(0x585);}catch(_0x544488){return _0x2d17de(0x585);}if(_0x3eab9f[_0x2d17de(0x60a)]['licenseType']===_0xd3d820)return _0x2d17de(0x4a2);if(_0x3eab9f[_0x2d17de(0x60a)]['expiresAt']<=Date[_0x2d17de(0x46e)]())return _0x2d17de(0x559);if(_0x3eab9f[_0x2d17de(0x60a)]['licenseType']===_0x37e92b)return _0x2d17de(0x4a2);if(!_0x169d79[_0x2d17de(0x510)])return _0x2d17de(0x11f);const _0x314ae7=_0x45e14f[_0x2d17de(0x104)]({'tokenString':_0x169d79[_0x2d17de(0x510)],'nodeId':_0x3afaae,'rawBlobBuf':_0x3eab9f['rawBuf'],'pubKeyPem':_0x10e2d5[_0x2d17de(0x20d)],'pubFingerprint':_0x10e2d5[_0x2d17de(0x571)]});if(_0x314ae7[_0x2d17de(0x4e2)]===_0x2d17de(0x39b)||_0x314ae7[_0x2d17de(0x4e2)]===_0x2d17de(0x2cc))return _0x2d17de(0x515);if(_0x314ae7['reason']===_0x2d17de(0xe4))return _0x2d17de(0x559);if(!_0x314ae7[_0x2d17de(0x5ed)])return _0x2d17de(0x515);return _0x2d17de(0x4a2);}get['active'](){const _0xf72698=_0x40e234;return this[_0xf72698(0x489)];}get[_0x40e234(0x21b)](){const _0x3ebe70=_0x40e234;return this[_0x3ebe70(0x489)]??_0x25bb71;}[_0x40e234(0x118)](_0x2b7add){const _0x4ce1ef=_0x40e234;if(_0x10e2d5[_0x4ce1ef(0x1ef)]!==_0x4ce1ef(0x203))return;const _0x30a97c=this['effective'];if(!_0x30a97c['features']?.[_0x2b7add]){const _0x47b7bd=_0x30a97c['_isFree']?_0x4ce1ef(0x2e8)+_0x2b7add+_0x4ce1ef(0x43c)+_0x2b7add+_0x4ce1ef(0x44a):_0x4ce1ef(0x23d)+_0x2b7add+_0x4ce1ef(0x13f)+_0x2b7add+'\x22.';throw new _0x5394ba(_0x47b7bd,_0x4ce1ef(0x2f0),{'feature':_0x2b7add});}}['isFeatureEnabled'](_0x46eaae){const _0x3ffbd1=_0x40e234;if(_0x10e2d5['LICENSED_BUILD']!=='true')return!![];return!!this[_0x3ffbd1(0x21b)][_0x3ffbd1(0x3b4)]?.[_0x46eaae];}[_0x40e234(0x4b8)](_0x1f1504,_0x6271ba){const _0x47c60e=_0x40e234;if(_0x10e2d5[_0x47c60e(0x1ef)]!==_0x47c60e(0x203))return;const _0x558325=this[_0x47c60e(0x21b)],_0x362443=_0x558325[_0x47c60e(0x41b)]?.[_0x1f1504];if(_0x362443===null||_0x362443===undefined||_0x362443===0x0)return;if(_0x6271ba>=_0x362443)throw new _0x5394ba('License\x20limit\x20exceeded:\x20'+_0x1f1504+'\x20('+_0x6271ba+'/'+_0x362443+')',_0x47c60e(0x2d0),{'limit':_0x1f1504,'current':_0x6271ba,'max':_0x362443});}async['addLicense'](_0x545d32){const _0x42f23e=_0x40e234;let _0x41989f;try{_0x41989f=_0x45e14f[_0x42f23e(0x317)](_0x545d32);}catch(_0x499a48){throw new _0x5394ba(_0x42f23e(0x3c4)+_0x499a48['message'],_0x42f23e(0x5a0));}let _0xf4cee7;try{_0xf4cee7=_0x4894ec['verify'](null,_0x41989f[_0x42f23e(0x25a)],_0x10e2d5[_0x42f23e(0x20d)],_0x41989f[_0x42f23e(0x55a)]);}catch(_0x4aae95){throw new _0x5394ba(_0x42f23e(0x412)+_0x4aae95[_0x42f23e(0x491)],_0x42f23e(0x5a0));}if(!_0xf4cee7)throw new _0x5394ba(_0x42f23e(0x60c)+('Build\x20expects\x20public\x20key\x20fingerprint\x20'+_0x10e2d5[_0x42f23e(0x571)]+'.\x20')+_0x42f23e(0x43b),_0x42f23e(0x5a0),{'expectedFingerprint':_0x10e2d5[_0x42f23e(0x571)]});if(_0x41989f['decoded']['licenseType']===_0x37e92b){const _0x321dba=_0x41989f[_0x42f23e(0x60a)][_0x42f23e(0x407)]-_0x41989f[_0x42f23e(0x60a)]['issuedAt'];if(_0x321dba>_0x38effe)throw new _0x5394ba(_0x42f23e(0x209)+Math[_0x42f23e(0x345)](_0x321dba/(0x1e*0x5265c00))+_0x42f23e(0x1b0),_0x42f23e(0x5a0));}const _0x46f614=this[_0x42f23e(0x110)]['_systemEnv'];await _0x5cfa47(_0x46f614);const _0x3da6c8=_0x45e14f['licenseHash'](_0x41989f[_0x42f23e(0x102)])['toString'](_0x42f23e(0x85));for(const {value:_0xcac382}of _0x46f614[_0x42f23e(0x610)](_0x4f6f41)){if(_0xcac382[_0x42f23e(0x56c)]===_0x3da6c8)throw new _0x5394ba(_0x42f23e(0x14f),'LICENSE_INVALID');}const _0x41e8c2=_0x4894ec[_0x42f23e(0x2c5)](),_0x550e01={'blob':_0x545d32,'activation':null,'addedAt':Date[_0x42f23e(0x46e)](),'_licenseHash':_0x3da6c8,'licensee':_0x41989f[_0x42f23e(0x60a)][_0x42f23e(0x207)],'expiresAt':_0x41989f[_0x42f23e(0x60a)]['expiresAt'],'features':_0x41989f[_0x42f23e(0x60a)]['features'],'limits':_0x41989f[_0x42f23e(0x60a)][_0x42f23e(0x41b)],'licenseType':_0x41989f[_0x42f23e(0x60a)][_0x42f23e(0x25b)]};return await _0x46f614['put'](_0x4f6f41,_0x41e8c2,_0x550e01),{'id':_0x41e8c2,..._0x550e01};}async[_0x40e234(0x358)](_0xcbd4b5){const _0x1cd179=_0x40e234;let _0x409fa3;try{_0x409fa3=_0x45e14f['decodeActivationToken'](_0xcbd4b5);}catch(_0x3d5dc3){throw new _0x5394ba(_0x1cd179(0x20f)+_0x3d5dc3[_0x1cd179(0x491)],_0x1cd179(0x4f7));}const _0x1d7186=_0x409fa3['licenseHash'][_0x1cd179(0x57a)]('hex'),_0x1a61b4=this[_0x1cd179(0x110)][_0x1cd179(0x229)];if(!_0x1a61b4||!_0x1a61b4[_0x1cd179(0x44c)](_0x4f6f41))throw new _0x5394ba(_0x1cd179(0x494),_0x1cd179(0x4f7));let _0x4bc839=null,_0x4f35f1=null;for(const {key:_0x5a9458,value:_0x143e77}of _0x1a61b4[_0x1cd179(0x610)](_0x4f6f41)){if(_0x143e77['_licenseHash']===_0x1d7186){_0x4bc839=_0x5a9458,_0x4f35f1=_0x143e77;break;}}if(!_0x4bc839)throw new _0x5394ba(_0x1cd179(0x494),_0x1cd179(0x4f7));const {rawBuf:_0x42e8de}=_0x45e14f['decodeLicenseBlob'](_0x4f35f1[_0x1cd179(0x5e1)]),_0x1e146a=_0x45e14f[_0x1cd179(0x104)]({'tokenString':_0xcbd4b5,'nodeId':this[_0x1cd179(0x110)]['id'],'rawBlobBuf':_0x42e8de,'pubKeyPem':_0x10e2d5[_0x1cd179(0x20d)],'pubFingerprint':_0x10e2d5['PUB_FINGERPRINT']});if(!_0x1e146a[_0x1cd179(0x5ed)])throw new _0x5394ba(_0x1cd179(0x48d)+_0x1e146a[_0x1cd179(0x4e2)],_0x1cd179(0x4f7),{'reason':_0x1e146a[_0x1cd179(0x4e2)]});const _0x1cfda0={..._0x4f35f1,'activation':_0xcbd4b5};return await _0x1a61b4[_0x1cd179(0x5fd)](_0x4f6f41,_0x4bc839,_0x1cfda0),{'id':_0x4bc839,..._0x1cfda0};}async['removeLicense'](_0x1c536e){const _0x589ca6=_0x40e234,_0x15aa33=this[_0x589ca6(0x110)][_0x589ca6(0x229)];if(!_0x15aa33||!_0x15aa33[_0x589ca6(0x44c)](_0x4f6f41))return;await _0x15aa33[_0x589ca6(0x1cb)](_0x4f6f41,_0x1c536e);}async[_0x40e234(0x4d2)](){const _0x2fa38f=_0x40e234,_0x485b04=this[_0x2fa38f(0x110)]['_systemEnv'];if(!_0x485b04||!_0x485b04[_0x2fa38f(0x44c)](_0x4f6f41))return[];const _0x1b7f25=this[_0x2fa38f(0x110)]['id'],_0x4f58a0=[];for(const {key:_0x1d3820,value:_0x5a5fd1}of _0x485b04['getRange'](_0x4f6f41)){const _0x510179=this[_0x2fa38f(0x90)](_0x5a5fd1,_0x1b7f25);_0x4f58a0[_0x2fa38f(0x591)]({..._0x5a5fd1,'id':_0x1d3820,'status':_0x510179});}return _0x4f58a0;}[_0x40e234(0x3dc)](){const _0xf15d3b=_0x40e234,_0x32c1c5=this[_0xf15d3b(0x110)]['_systemEnv'];if(!_0x32c1c5||!_0x32c1c5['hasType'](_0x4f6f41))return[];const _0x27d468=this['okdb']['id'],_0x1a4791=[];for(const {key:_0x3b1d19,value:_0x4d042a}of _0x32c1c5[_0xf15d3b(0x610)](_0x4f6f41)){if(_0x4d042a[_0xf15d3b(0x56c)]){if(_0x4d042a[_0xf15d3b(0x25b)]===_0x37e92b)_0x1a4791[_0xf15d3b(0x591)]({'licenseId':_0x3b1d19,'pin':null});else{const _0x518db9=Buffer[_0xf15d3b(0x294)](_0x4d042a['_licenseHash'],'hex'),{pin:_0x1c5fbc}=_0x45e14f[_0xf15d3b(0x425)](_0x27d468,_0x518db9,_0x10e2d5[_0xf15d3b(0x571)]);_0x1a4791[_0xf15d3b(0x591)]({'licenseId':_0x3b1d19,'pin':_0x1c5fbc});}}}return _0x1a4791;}async[_0x40e234(0x4ea)](){const _0x5abb2a=_0x40e234,_0x1f9d7e=this[_0x5abb2a(0x489)];await this[_0x5abb2a(0x462)]();if(this[_0x5abb2a(0x489)]&&this[_0x5abb2a(0x489)]['licenseType']===_0x37e92b){const _0x297b08=Math[_0x5abb2a(0x345)]((this[_0x5abb2a(0x489)]['expiresAt']-Date[_0x5abb2a(0x46e)]())/0x5265c00);this['okdb'][_0x5abb2a(0x5f4)]?.[_0x5abb2a(0x4c3)](_0x5abb2a(0x292)+_0x297b08+_0x5abb2a(0x387),{'feature':_0x5abb2a(0x3fd),'licensee':this[_0x5abb2a(0x489)]['licensee'],'expiresAt':new Date(this[_0x5abb2a(0x489)]['expiresAt'])[_0x5abb2a(0x2f9)]()});}this[_0x5abb2a(0x489)]&&this[_0x5abb2a(0x489)][_0x5abb2a(0x25b)]===_0xd3d820&&this['okdb'][_0x5abb2a(0x5f4)]?.['warn'](_0x5abb2a(0x242),{'feature':_0x5abb2a(0x3fd),'licensee':this[_0x5abb2a(0x489)][_0x5abb2a(0x207)]});if(_0x1f9d7e&&!this[_0x5abb2a(0x489)]){this[_0x5abb2a(0x110)][_0x5abb2a(0x5f4)]?.[_0x5abb2a(0x4c3)]('License\x20expired\x20or\x20invalidated',{'feature':'license'}),this[_0x5abb2a(0x110)][_0x5abb2a(0x3ac)]?.[_0x5abb2a(0x23f)](_0x3be052[_0x5abb2a(0x5a0)],{'previous':_0x1f9d7e});const _0x2d0d75=this[_0x5abb2a(0x110)][_0x5abb2a(0x525)]?.[_0x5abb2a(0x31f)]??_0x10e2d5['LICENSE_EXPIRED_ACTION'];_0x2d0d75===_0x5abb2a(0x5c4)&&(this[_0x5abb2a(0x110)]['log']?.[_0x5abb2a(0x3b8)]('Shutting\x20down\x20due\x20to\x20license\x20expiry',{'feature':'license'}),this[_0x5abb2a(0x110)][_0x5abb2a(0x1ab)]()['catch'](()=>{})['finally'](()=>process['exit'](0x1)));}}}return okdbLicense={'LicenseChecker':_0x5a7b47,'_C':_0x10e2d5},okdbLicense;}var okdbShell,hasRequiredOkdbShell;function requireOkdbShell(){const _0x20f478=_0x17fdfc;if(hasRequiredOkdbShell)return okdbShell;hasRequiredOkdbShell=0x1;const _0x3e45de=require$$0$2,_0x4bf33b=require$$1$1,_0x5d98f4=require$$0,_0x26756d=require$$1,_0x41799b=_0x26756d[_0x20f478(0x4b5)](_0x5d98f4[_0x20f478(0x32b)](),_0x20f478(0x333)),_0x5a37f0=0x3e8,_0x55d2ba={'reset':_0x20f478(0x271),'bold':'\x1b[1m','dim':'\x1b[2m','red':'\x1b[31m','green':_0x20f478(0x433),'yellow':_0x20f478(0x57d),'blue':_0x20f478(0x2a4),'magenta':_0x20f478(0x2b4),'cyan':_0x20f478(0x2a8),'white':'\x1b[37m','gray':_0x20f478(0x479)},_0x1b56bd=!process[_0x20f478(0xa6)][_0x20f478(0x281)]||!!process.env.NO_COLOR,_0x54865b=(_0x41c5c1,_0x5ec0ac)=>_0x1b56bd?_0x5ec0ac:''+_0x41c5c1+_0x5ec0ac+_0x55d2ba[_0x20f478(0x2cd)],_0x4a4294={'error':_0x55d2ba[_0x20f478(0x511)],'warn':_0x55d2ba['yellow'],'info':_0x55d2ba[_0x20f478(0x536)],'debug':_0x55d2ba['gray']},_0x15c20e={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3};function _0x2b63fa(_0xed6d6e,_0x145855=_0x20f478(0x59a)){const _0x534eee=_0x20f478,{level:_0x4a2980,msg:_0x508db3,meta:_0x173ff1,context:_0x283bd6,ts:_0x3d8352}=_0xed6d6e;if((_0x15c20e[_0x4a2980]??0x1)<(_0x15c20e[_0x145855]??0x1))return;const _0x32daba=_0x54865b(_0x55d2ba[_0x534eee(0x4c0)],new Date(_0x3d8352)[_0x534eee(0x2f9)]()),_0x4b84ea=_0x54865b(_0x4a4294[_0x4a2980]??_0x55d2ba[_0x534eee(0x1f7)],_0x4a2980[_0x534eee(0x32f)](0x5));let _0x2e59f0='\x20\x20'+_0x32daba+'\x20'+_0x54865b(_0x55d2ba[_0x534eee(0x384)],_0x4b84ea)+'\x20'+_0x508db3;if(_0x173ff1&&Object['keys'](_0x173ff1)[_0x534eee(0x42c)]>0x0){const _0x383681=Object[_0x534eee(0x26f)](_0x173ff1)['map'](([_0x468aba,_0x4a15c9])=>_0x468aba+'='+_0x4a15c9)[_0x534eee(0x4b5)]('\x20');_0x2e59f0+=_0x54865b(_0x55d2ba[_0x534eee(0x252)],_0x534eee(0x5cd)+_0x383681+']');}if(_0x283bd6!==undefined){const _0x4535df=typeof _0x283bd6===_0x534eee(0x257)?JSON['stringify'](_0x283bd6):String(_0x283bd6);_0x2e59f0+=_0x54865b(_0x55d2ba[_0x534eee(0x252)],'\x20\x20'+_0x4535df);}const _0x35b25e=_0x4a2980===_0x534eee(0x3b8)||_0x4a2980==='warn'?process[_0x534eee(0x1b8)][_0x534eee(0x288)]['bind'](process[_0x534eee(0x1b8)]):process['stdout'][_0x534eee(0x288)]['bind'](process[_0x534eee(0xa6)]);_0x35b25e(_0x2e59f0+'\x0a');}function _0x22bb51(_0x4a0e9f,_0x3928b4){const _0x46072a=_0x20f478;if(_0x4a0e9f===0xcc||_0x4a0e9f>=0xc8&&_0x4a0e9f<0x12c&&!_0x3928b4){console['log']('\x0a\x20\x20'+_0x54865b(_0x55d2ba[_0x46072a(0x41a)],'✓')+'\x0a');return;}if(_0x4a0e9f>=0x190||_0x3928b4?.[_0x46072a(0x3b8)]){const _0x1d228a=_0x3928b4?.[_0x46072a(0x3b8)]??_0x3928b4?.[_0x46072a(0x491)]??_0x46072a(0x441)+_0x4a0e9f;console[_0x46072a(0x5f4)]('\x0a\x20\x20'+_0x54865b(_0x55d2ba[_0x46072a(0x511)],'✗')+'\x20'+_0x54865b(_0x55d2ba[_0x46072a(0x384)]+_0x55d2ba[_0x46072a(0x511)],String(_0x4a0e9f))+'\x20\x20'+_0x1d228a+'\x0a');return;}const _0x351b7e=Object[_0x46072a(0x239)][_0x46072a(0x245)][_0x46072a(0xf5)](_0x3928b4??{},'result')?_0x3928b4[_0x46072a(0x2e4)]:_0x3928b4,_0x3ac9f4=_0x3928b4?.['meta'];console[_0x46072a(0x5f4)](''),_0x3397cb(_0x351b7e,'\x20\x20');if(_0x3ac9f4?.[_0x46072a(0x5bb)]!=null||_0x3ac9f4?.[_0x46072a(0x137)]!=null){const _0x142c8a=[];if(_0x3ac9f4[_0x46072a(0x5bb)]!=null)_0x142c8a['push'](_0x3ac9f4['count']+_0x46072a(0x46f)+(_0x3ac9f4[_0x46072a(0x5bb)]!==0x1?'s':''));if(_0x3ac9f4[_0x46072a(0x137)]!=null)_0x142c8a[_0x46072a(0x591)](_0x3ac9f4['time']+'ms');console[_0x46072a(0x5f4)](_0x46072a(0x329)+_0x54865b(_0x55d2ba[_0x46072a(0x252)],_0x142c8a['join'](_0x46072a(0x453))));}console[_0x46072a(0x5f4)]('');}function _0x3397cb(_0x5b994a,_0x55f686=''){const _0x1ae044=_0x20f478;if(_0x5b994a===null||_0x5b994a===undefined){console[_0x1ae044(0x5f4)](_0x55f686+_0x54865b(_0x55d2ba[_0x1ae044(0x252)],_0x1ae044(0x4f9)));return;}if(Array[_0x1ae044(0x3c6)](_0x5b994a)){if(_0x5b994a[_0x1ae044(0x42c)]===0x0){console['log'](_0x55f686+_0x54865b(_0x55d2ba[_0x1ae044(0x252)],_0x1ae044(0xbb)));return;}if(_0x5b994a[_0x1ae044(0x1a8)](_0x30bfe6=>_0x30bfe6&&typeof _0x30bfe6===_0x1ae044(0x257)&&'key'in _0x30bfe6&&_0x1ae044(0x268)in _0x30bfe6)){_0x4e717a(_0x5b994a,_0x55f686);return;}if(_0x5b994a[_0x1ae044(0x1a8)](_0x2a01a9=>_0x2a01a9&&typeof _0x2a01a9===_0x1ae044(0x257)&&_0x1ae044(0x191)in _0x2a01a9&&_0x1ae044(0x5bb)in _0x2a01a9)){_0x5163e2(_0x5b994a,_0x55f686);return;}if(_0x5b994a[_0x1ae044(0x1a8)](_0x528414=>typeof _0x528414!==_0x1ae044(0x257)||_0x528414===null)){_0x5b994a[_0x1ae044(0x305)]((_0x15f088,_0x1979d4)=>console[_0x1ae044(0x5f4)](_0x55f686+_0x54865b(_0x55d2ba['gray'],_0x1979d4+0x1+'.')+'\x20'+_0x54865b(_0x55d2ba[_0x1ae044(0x1f7)],String(_0x15f088))));return;}_0x5b994a[_0x1ae044(0x305)]((_0x4c6009,_0x405a18)=>{const _0x197410=_0x1ae044;console[_0x197410(0x5f4)](_0x55f686+_0x54865b(_0x55d2ba[_0x197410(0x252)],'['+_0x405a18+']'));if(typeof _0x4c6009===_0x197410(0x257)&&_0x4c6009!==null)_0x3c1488(_0x4c6009,_0x55f686+'\x20\x20');else console[_0x197410(0x5f4)](_0x55f686+'\x20\x20'+String(_0x4c6009));});return;}if(typeof _0x5b994a===_0x1ae044(0x257)){if(_0x1ae044(0x8b)in _0x5b994a&&'value'in _0x5b994a&&Object[_0x1ae044(0x180)](_0x5b994a)[_0x1ae044(0x42c)]<=0x3){console['log'](_0x55f686+_0x54865b(_0x55d2ba[_0x1ae044(0x384)]+_0x55d2ba['cyan'],String(_0x5b994a[_0x1ae044(0x8b)])));const _0x20e609=_0x5b994a['value'];if(_0x20e609&&typeof _0x20e609==='object')_0x3c1488(_0x20e609,_0x55f686);else console[_0x1ae044(0x5f4)](_0x55f686+_0x54865b(_0x55d2ba[_0x1ae044(0x1f7)],String(_0x20e609)));return;}_0x3c1488(_0x5b994a,_0x55f686);return;}console[_0x1ae044(0x5f4)](_0x55f686+_0x54865b(_0x55d2ba[_0x1ae044(0x1f7)],String(_0x5b994a)));}function _0x3c1488(_0x3d9a2d,_0x2e4b80=''){const _0x20e09c=_0x20f478,_0x4ffac7=Object[_0x20e09c(0x26f)](_0x3d9a2d);if(_0x4ffac7[_0x20e09c(0x42c)]===0x0){console[_0x20e09c(0x5f4)](_0x2e4b80+_0x54865b(_0x55d2ba[_0x20e09c(0x252)],'{}'));return;}const _0x580961=Math['min'](0x1c,Math['max'](..._0x4ffac7[_0x20e09c(0x1fd)](([_0x18bc66])=>_0x18bc66['length'])));for(const [_0x408332,_0x38e59f]of _0x4ffac7){const _0xcd2c84=_0x54865b(_0x55d2ba[_0x20e09c(0x536)],_0x408332[_0x20e09c(0x32f)](_0x580961));if(_0x38e59f===null||_0x38e59f===undefined)console[_0x20e09c(0x5f4)](_0x2e4b80+_0xcd2c84+'\x20\x20'+_0x54865b(_0x55d2ba[_0x20e09c(0x252)],_0x20e09c(0x4ff)));else{if(typeof _0x38e59f===_0x20e09c(0x257)){const _0x46c12a=JSON[_0x20e09c(0x4c1)](_0x38e59f);_0x46c12a[_0x20e09c(0x42c)]<=0x50?console[_0x20e09c(0x5f4)](_0x2e4b80+_0xcd2c84+'\x20\x20'+_0x54865b(_0x55d2ba[_0x20e09c(0x252)],_0x46c12a)):(console[_0x20e09c(0x5f4)](_0x2e4b80+_0xcd2c84),_0x3397cb(_0x38e59f,_0x2e4b80+'\x20\x20'));}else{const _0x4877fb=typeof _0x38e59f===_0x20e09c(0x10a)?_0x54865b(_0x38e59f?_0x55d2ba['green']:_0x55d2ba[_0x20e09c(0x5a2)],String(_0x38e59f)):typeof _0x38e59f===_0x20e09c(0x2af)?_0x54865b(_0x55d2ba['magenta'],String(_0x38e59f)):_0x54865b(_0x55d2ba[_0x20e09c(0x1f7)],String(_0x38e59f));console['log'](_0x2e4b80+_0xcd2c84+'\x20\x20'+_0x4877fb);}}}}function _0x4e717a(_0x100db6,_0x40289e=''){const _0x69883c=_0x20f478,_0x59cc6c=Math['min'](0x20,Math[_0x69883c(0x473)](..._0x100db6[_0x69883c(0x1fd)](_0x3cc432=>String(_0x3cc432[_0x69883c(0x8b)])[_0x69883c(0x42c)])));for(const {key:_0x17221c,value:_0x3749a1,score:_0x3e9f97,clock:_0x339f3d}of _0x100db6){const _0x29d959=_0x54865b(_0x55d2ba[_0x69883c(0x384)]+_0x55d2ba[_0x69883c(0x536)],String(_0x17221c)[_0x69883c(0x32f)](_0x59cc6c)),_0xcc0c80=_0x3749a1==null?_0x54865b(_0x55d2ba[_0x69883c(0x252)],'null'):typeof _0x3749a1==='object'?_0x54865b(_0x55d2ba[_0x69883c(0x252)],JSON[_0x69883c(0x4c1)](_0x3749a1)):_0x54865b(_0x55d2ba[_0x69883c(0x1f7)],String(_0x3749a1)),_0x4a121c=_0x3e9f97!=null?_0x54865b(_0x55d2ba[_0x69883c(0x4c0)],_0x69883c(0x570)+_0x3e9f97[_0x69883c(0xe3)](0x4)):'',_0x3a181d=_0x339f3d!=null?_0x54865b(_0x55d2ba['gray'],_0x69883c(0x560)+_0x339f3d):'';console[_0x69883c(0x5f4)](_0x40289e+_0x29d959+'\x20\x20'+_0xcc0c80+_0x4a121c+_0x3a181d);}}function _0x5163e2(_0x2f1d97,_0x12db07=''){const _0x860202=_0x20f478,_0x51f3d9=Math[_0x860202(0x579)](0x20,Math[_0x860202(0x473)](..._0x2f1d97[_0x860202(0x1fd)](_0x3f2a33=>_0x3f2a33['type']['length'])));for(const {type:_0x1f9142,count:_0x2cbd05,fields:_0x23d8d8}of _0x2f1d97){if(_0x1f9142[_0x860202(0x3ad)]('~'))continue;const _0x1c08c6=_0x54865b(_0x55d2ba[_0x860202(0x384)]+_0x55d2ba[_0x860202(0x536)],_0x1f9142[_0x860202(0x32f)](_0x51f3d9)),_0x50a07a=_0x54865b(_0x55d2ba[_0x860202(0xe8)],String(_0x2cbd05)[_0x860202(0x58b)](0x6))+_0x54865b(_0x55d2ba[_0x860202(0x252)],'\x20records'),_0x20376c=_0x23d8d8&&Object[_0x860202(0x180)](_0x23d8d8)[_0x860202(0x42c)]?_0x54865b(_0x55d2ba['dim'],_0x860202(0x4d7)+Object['keys'](_0x23d8d8)[_0x860202(0x5f5)](0x0,0x6)[_0x860202(0x4b5)](',\x20')+(Object['keys'](_0x23d8d8)['length']>0x6?'…':'')):'';console['log'](_0x12db07+_0x1c08c6+'\x20\x20'+_0x50a07a+_0x20376c);}}const _0x34ed3d=['types','type/',_0x20f478(0x2df),_0x20f478(0x5a6),_0x20f478(0xe2),_0x20f478(0x1a5)];function _0x5a4a3b(_0x1ab0b4,_0x3d1dbf){const _0x1de23d=_0x20f478;if(_0x1ab0b4[_0x1de23d(0x3ad)](_0x1de23d(0x467)))return _0x1ab0b4;if(_0x1ab0b4['startsWith']('/'))return'/api'+_0x1ab0b4;if(_0x1ab0b4[_0x1de23d(0x3ad)](_0x1de23d(0x404)))return _0x1de23d(0x467)+_0x1ab0b4;const _0x5645e4=_0x34ed3d[_0x1de23d(0x55f)](_0x4168ee=>_0x1ab0b4===_0x4168ee['replace'](/\/$/,'')||_0x1ab0b4[_0x1de23d(0x3ad)](_0x4168ee));return _0x5645e4?'/api/env/'+_0x3d1dbf+'/'+_0x1ab0b4:_0x1de23d(0x467)+_0x1ab0b4;}function _0x15d2a0(_0x5c2209){const _0x1d6a56=_0x20f478,_0x19fd60={},_0x43deab=[];let _0x19bfd7=0x0;while(_0x19bfd7<_0x5c2209[_0x1d6a56(0x42c)]){if((_0x5c2209[_0x19bfd7]==='--env'||_0x5c2209[_0x19bfd7]==='-e')&&_0x5c2209[_0x19bfd7+0x1]&&!_0x5c2209[_0x19bfd7+0x1][_0x1d6a56(0x3ad)]('-'))_0x19fd60[_0x1d6a56(0x1d9)]=_0x5c2209[++_0x19bfd7];else _0x5c2209[_0x19bfd7]===_0x1d6a56(0x223)||_0x5c2209[_0x19bfd7]==='-h'?_0x19fd60['help']=!![]:_0x43deab['push'](_0x5c2209[_0x19bfd7]);_0x19bfd7++;}return{'flags':_0x19fd60,'rest':_0x43deab};}const _0x2f9159={'system':_0x20f478(0x3d0),'envs':_0x20f478(0x285),'types':_0x20f478(0x4d8),'data':'Records','indexes':_0x20f478(0x198),'fts':'Full-text\x20search','sync':_0x20f478(0x3c1),'queue':_0x20f478(0x210),'files':_0x20f478(0x38d),'embeddings':_0x20f478(0x24f),'engines':_0x20f478(0x235),'admin':_0x20f478(0x13b),'event':'Events','processor':_0x20f478(0x114)},_0xa4b6a7=['system',_0x20f478(0x5ba),_0x20f478(0x5b7),'data',_0x20f478(0x92),_0x20f478(0x293),'sync','queue',_0x20f478(0x470),_0x20f478(0x43e),_0x20f478(0x553),'admin'];function _0x10101d(_0x25b853){const _0x2d2d49=_0x20f478;return _0x25b853['replace'](/^\/api/,'')[_0x2d2d49(0x327)](/^\[\/env\/:env=[^\]]*\]/,'[env]')[_0x2d2d49(0x327)](/^\/env\/:env/,'env/:env')[_0x2d2d49(0x327)](/^\//,'');}function _0x227408(_0xd38035,_0x40ec35=''){const _0x1270d3=_0x20f478,_0x23557a=_0xd38035[_0x1270d3(0x19e)][_0x1270d3(0x552)]()[_0x1270d3(0x398)](_0x12a6ce=>!_0x12a6ce[_0x1270d3(0x208)]?.[_0x1270d3(0x3bd)]),_0x51ac40=_0x40ec35?_0x23557a[_0x1270d3(0x398)](_0x3f142c=>_0x3f142c[_0x1270d3(0x366)][_0x1270d3(0x550)]()[_0x1270d3(0x580)](_0x40ec35[_0x1270d3(0x550)]())||(_0x2c06ea(_0x3f142c)??'')[_0x1270d3(0x550)]()[_0x1270d3(0x580)](_0x40ec35[_0x1270d3(0x550)]())||_0x35ece9(_0x3f142c)['some'](_0x2ad51c=>_0x2ad51c[_0x1270d3(0x550)]()[_0x1270d3(0x580)](_0x40ec35[_0x1270d3(0x550)]()))):_0x23557a;if(!_0x51ac40[_0x1270d3(0x42c)]){console[_0x1270d3(0x5f4)](_0x54865b(_0x55d2ba[_0x1270d3(0x5a2)],_0x1270d3(0x12c)+_0x40ec35+'\x22\x0a'));return;}const _0x2cf9e6=new Map();for(const _0x40dffa of _0x51ac40){const _0x588ee8=_0x35ece9(_0x40dffa)[0x0]??_0x1270d3(0x94);if(!_0x2cf9e6[_0x1270d3(0x1b4)](_0x588ee8))_0x2cf9e6[_0x1270d3(0xff)](_0x588ee8,[]);_0x2cf9e6[_0x1270d3(0x3b2)](_0x588ee8)['push'](_0x40dffa);}const _0x5040b8=[..._0xa4b6a7[_0x1270d3(0x398)](_0x58ce38=>_0x2cf9e6[_0x1270d3(0x1b4)](_0x58ce38)),...[..._0x2cf9e6[_0x1270d3(0x180)]()][_0x1270d3(0x398)](_0x371cbe=>!_0xa4b6a7['includes'](_0x371cbe))];console[_0x1270d3(0x5f4)]('');for(const _0x501dde of _0x5040b8){const _0x42da43=_0x2cf9e6[_0x1270d3(0x3b2)](_0x501dde);if(!_0x42da43?.[_0x1270d3(0x42c)])continue;console[_0x1270d3(0x5f4)](_0x54865b(_0x55d2ba[_0x1270d3(0x384)],'\x20\x20'+(_0x2f9159[_0x501dde]??_0x501dde)));for(const _0x20dcff of _0x42da43){const _0x478469=_0x54865b(_0x55d2ba[_0x1270d3(0xe8)],_0x20dcff[_0x1270d3(0x2db)][_0x1270d3(0x32f)](0x7)),_0xb62473=_0x54865b(_0x55d2ba[_0x1270d3(0x536)],_0x10101d(_0x20dcff[_0x1270d3(0x366)])),_0x4bfaf8=_0x2c06ea(_0x20dcff)?_0x54865b(_0x55d2ba[_0x1270d3(0x252)],'\x20\x20'+_0x2c06ea(_0x20dcff)):'',_0x313144=_0x20dcff['operation']?.['id']?_0x54865b(_0x55d2ba['gray'],_0x1270d3(0x5cd)+_0x20dcff[_0x1270d3(0xc4)]['id']+']'):'';console[_0x1270d3(0x5f4)](_0x1270d3(0xed)+_0x478469+'\x20'+_0xb62473+_0x4bfaf8+_0x313144);}console['log']('');}}function _0x3ed5a0(_0x3ceba4,_0x412919){const _0x2f8ab5=_0x20f478,_0x409d29=_0x412919['replace'](/^\/api(\/env\/[^/]+)?\//,'')[_0x2f8ab5(0x48e)]('/')[0x0],_0x57a813=_0x3ceba4[_0x2f8ab5(0x19e)][_0x2f8ab5(0x552)]()[_0x2f8ab5(0x398)](_0x42552b=>_0x42552b[_0x2f8ab5(0x366)]['toLowerCase']()[_0x2f8ab5(0x580)](_0x409d29[_0x2f8ab5(0x550)]()));if(!_0x57a813[_0x2f8ab5(0x42c)]){console['log'](_0x54865b(_0x55d2ba[_0x2f8ab5(0x5a2)],_0x2f8ab5(0x113)+_0x412919+'\x0a'));return;}console['log']('');for(const _0x508639 of _0x57a813[_0x2f8ab5(0x5f5)](0x0,0xc)){for(const _0x5bafef of _0x4b25d9(_0x508639)){console['log'](_0x5bafef);}console['log']('');}}function _0x2c06ea(_0x3c2829){const _0x4945df=_0x20f478;return _0x3c2829[_0x4945df(0xc4)]?.['summary']??_0x3c2829['meta']?.[_0x4945df(0x390)]??'';}function _0x272318(_0x4f4985){const _0x29d294=_0x20f478;return _0x4f4985['operation']?.[_0x29d294(0x5cc)]??_0x4f4985[_0x29d294(0x208)]?.[_0x29d294(0x5cc)]??'';}function _0x35ece9(_0x35ea68){const _0x191c9a=_0x20f478;return _0x35ea68[_0x191c9a(0xc4)]?.[_0x191c9a(0x3c9)]?.[_0x191c9a(0x42c)]?_0x35ea68[_0x191c9a(0xc4)][_0x191c9a(0x3c9)]:_0x35ea68[_0x191c9a(0x208)]?.['tags']??[];}function _0x4b25d9(_0x1cb63d){const _0x48d0e4=_0x20f478,_0x1dd148=[];_0x1dd148['push']('\x20\x20'+_0x54865b(_0x55d2ba[_0x48d0e4(0x384)]+_0x55d2ba['magenta'],_0x1cb63d[_0x48d0e4(0x2db)]['padEnd'](0x7))+'\x20'+_0x54865b(_0x55d2ba[_0x48d0e4(0x384)]+_0x55d2ba[_0x48d0e4(0x536)],_0x1cb63d['path']));_0x1cb63d[_0x48d0e4(0xc4)]?.['id']&&_0x1dd148['push'](_0x48d0e4(0xc1)+_0x54865b(_0x55d2ba['gray'],'id:\x20'+_0x1cb63d[_0x48d0e4(0xc4)]['id']));_0x2c06ea(_0x1cb63d)&&_0x1dd148[_0x48d0e4(0x591)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x54865b(_0x55d2ba[_0x48d0e4(0x1f7)],_0x2c06ea(_0x1cb63d)));_0x272318(_0x1cb63d)&&_0x1dd148[_0x48d0e4(0x591)](_0x48d0e4(0xc1)+_0x54865b(_0x55d2ba[_0x48d0e4(0x252)],_0x272318(_0x1cb63d)));_0x35ece9(_0x1cb63d)['length']&&_0x1dd148[_0x48d0e4(0x591)](_0x48d0e4(0xc1)+_0x54865b(_0x55d2ba[_0x48d0e4(0x4c0)],'tags:\x20'+_0x35ece9(_0x1cb63d)[_0x48d0e4(0x4b5)](',\x20')));_0x1cb63d['operation']?.[_0x48d0e4(0x162)]?.[_0x48d0e4(0x3d9)]&&_0x1dd148['push']('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x54865b(_0x55d2ba[_0x48d0e4(0x4c0)],_0x48d0e4(0x45c)+_0x1cb63d['operation'][_0x48d0e4(0x162)][_0x48d0e4(0x3d9)]));_0x1cb63d[_0x48d0e4(0xc4)]?.[_0x48d0e4(0x19e)]?.[_0x48d0e4(0x364)]&&_0x1cb63d[_0x48d0e4(0xc4)][_0x48d0e4(0x19e)][_0x48d0e4(0x364)]!==_0x48d0e4(0x10c)&&_0x1dd148['push'](_0x48d0e4(0xc1)+_0x54865b(_0x55d2ba[_0x48d0e4(0x4c0)],_0x48d0e4(0x1a3)+_0x1cb63d[_0x48d0e4(0xc4)]['http'][_0x48d0e4(0x364)]));if(_0x1cb63d[_0x48d0e4(0xc4)]?.['inputSchema']){const _0x320eb1=Object[_0x48d0e4(0x180)](_0x1cb63d[_0x48d0e4(0xc4)][_0x48d0e4(0x5ac)][_0x48d0e4(0x284)]||{});if(_0x320eb1[_0x48d0e4(0x42c)])_0x1dd148[_0x48d0e4(0x591)](_0x48d0e4(0xc1)+_0x54865b(_0x55d2ba[_0x48d0e4(0x4c0)],_0x48d0e4(0x5d4)+_0x320eb1[_0x48d0e4(0x4b5)](',\x20')));}return _0x1cb63d[_0x48d0e4(0x208)]?.[_0x48d0e4(0x93)]&&_0x1dd148[_0x48d0e4(0x591)](_0x48d0e4(0xc1)+_0x54865b(_0x55d2ba[_0x48d0e4(0x4c0)],_0x48d0e4(0xd2)+JSON[_0x48d0e4(0x4c1)](_0x1cb63d[_0x48d0e4(0x208)][_0x48d0e4(0x93)]))),_0x1dd148;}async function _0x2dd22e(_0x5da22d,_0x50ea5d,_0x304e41,_0x553f6b=null){const _0x1363af=_0x20f478,_0xdcee23=_0x304e41[_0x1363af(0x17f)]('?'),_0x21fcf1=_0xdcee23>=0x0?_0x304e41[_0x1363af(0x5f5)](0x0,_0xdcee23):_0x304e41,_0x253b2e=_0xdcee23>=0x0?_0x304e41['slice'](_0xdcee23+0x1):'',_0x5505e5=Object[_0x1363af(0x471)](new URLSearchParams(_0x253b2e)['entries']());return _0x5da22d[_0x1363af(0x19e)]['handle'](_0x50ea5d,_0x21fcf1,{'body':_0x553f6b,'query':_0x5505e5,'headers':{'content-type':_0x1363af(0x478)}},{'internal':!![]});}function _0x91dff(_0x1abfed){const _0x3181ca=_0x20f478;if(!_0x1abfed)return null;const _0x565108=_0x1abfed[_0x3181ca(0x2a6)]();if(!_0x565108)return null;try{return JSON[_0x3181ca(0x400)](_0x565108);}catch{}try{return JSON[_0x3181ca(0x400)](_0x4f4d17(_0x565108));}catch(_0x34af10){throw new SyntaxError(_0x34af10['message'],{'cause':_0x34af10});}}function _0x4f4d17(_0x5aa185){const _0x5c2874=_0x20f478;let _0x5298a8='',_0x58e5a1=0x0;while(_0x58e5a1<_0x5aa185['length']){const _0x3c4999=_0x5aa185[_0x58e5a1];if(_0x3c4999==='\x22'){_0x5298a8+='\x22',_0x58e5a1++;while(_0x58e5a1<_0x5aa185[_0x5c2874(0x42c)]&&_0x5aa185[_0x58e5a1]!=='\x22'){if(_0x5aa185[_0x58e5a1]==='\x5c'){_0x5298a8+=_0x5aa185[_0x58e5a1++];if(_0x58e5a1<_0x5aa185[_0x5c2874(0x42c)])_0x5298a8+=_0x5aa185[_0x58e5a1++];}else _0x5298a8+=_0x5aa185[_0x58e5a1++];}_0x5298a8+='\x22';if(_0x58e5a1<_0x5aa185['length'])_0x58e5a1++;continue;}if(_0x3c4999==='\x27'){_0x5298a8+='\x22',_0x58e5a1++;while(_0x58e5a1<_0x5aa185[_0x5c2874(0x42c)]&&_0x5aa185[_0x58e5a1]!=='\x27'){if(_0x5aa185[_0x58e5a1]==='\x5c'&&_0x5aa185[_0x58e5a1+0x1]==='\x27')_0x5298a8+='\x27',_0x58e5a1+=0x2;else _0x5aa185[_0x58e5a1]==='\x22'?(_0x5298a8+='\x5c\x22',_0x58e5a1++):_0x5298a8+=_0x5aa185[_0x58e5a1++];}_0x5298a8+='\x22';if(_0x58e5a1<_0x5aa185['length'])_0x58e5a1++;continue;}if(_0x5c2874(0x4fc)['includes'](_0x3c4999)){_0x5298a8+=_0x3c4999,_0x58e5a1++;continue;}let _0x44b33c='';while(_0x58e5a1<_0x5aa185[_0x5c2874(0x42c)]&&!_0x5c2874(0x302)[_0x5c2874(0x580)](_0x5aa185[_0x58e5a1])&&_0x5aa185[_0x58e5a1]!=='\x20'&&_0x5aa185[_0x58e5a1]!=='\x09'&&_0x5aa185[_0x58e5a1]!=='\x0a'&&_0x5aa185[_0x58e5a1]!=='\x0d'){_0x44b33c+=_0x5aa185[_0x58e5a1++];}let _0x4caa6e=_0x58e5a1;while(_0x4caa6e<_0x5aa185[_0x5c2874(0x42c)]&&(_0x5aa185[_0x4caa6e]==='\x20'||_0x5aa185[_0x4caa6e]==='\x09'))_0x4caa6e++;if(_0x5aa185[_0x4caa6e]===':')_0x5298a8+='\x22'+_0x44b33c+'\x22';else _0x44b33c===_0x5c2874(0x203)||_0x44b33c==='false'||_0x44b33c==='null'||/^-?\d+(\.\d+)?([eE][+-]?\d+)?$/[_0x5c2874(0x382)](_0x44b33c)?_0x5298a8+=_0x44b33c:_0x5298a8+='\x22'+_0x44b33c+'\x22';}return _0x5298a8[_0x5c2874(0x327)](/,(\s*[}\]])/g,'$1');}function _0x26fe6d(_0x4a45eb){const _0x4edc90=_0x20f478,_0x37eaba=[];let _0xf3c462=0x0;while(_0xf3c462<_0x4a45eb[_0x4edc90(0x42c)]){while(_0xf3c462<_0x4a45eb[_0x4edc90(0x42c)]&&(_0x4a45eb[_0xf3c462]==='\x20'||_0x4a45eb[_0xf3c462]==='\x09'))_0xf3c462++;if(_0xf3c462>=_0x4a45eb[_0x4edc90(0x42c)])break;const _0x4fd940=_0x4a45eb[_0xf3c462];if(_0x4fd940==='{'||_0x4fd940==='['){const _0x5d2ce9=_0x4fd940==='{'?'}':']',_0x5afb9e=_0xf3c462++;let _0x2aaac7=0x1,_0x259364=![],_0x15d86c='';while(_0xf3c462<_0x4a45eb[_0x4edc90(0x42c)]&&_0x2aaac7>0x0){const _0x16563b=_0x4a45eb[_0xf3c462];if(_0x259364){if(_0x16563b==='\x5c')_0xf3c462++;else{if(_0x16563b===_0x15d86c)_0x259364=![];}}else{if(_0x16563b==='\x22'||_0x16563b==='\x27')_0x259364=!![],_0x15d86c=_0x16563b;else{if(_0x16563b===_0x4fd940)_0x2aaac7++;else{if(_0x16563b===_0x5d2ce9)_0x2aaac7--;}}}_0xf3c462++;}_0x37eaba['push'](_0x4a45eb['slice'](_0x5afb9e,_0xf3c462));continue;}if(_0x4fd940==='\x22'||_0x4fd940==='\x27'){const _0x54eaa6=_0x4fd940;_0xf3c462++;let _0x4be065='';while(_0xf3c462<_0x4a45eb[_0x4edc90(0x42c)]&&_0x4a45eb[_0xf3c462]!==_0x54eaa6){if(_0x4a45eb[_0xf3c462]==='\x5c'&&_0xf3c462+0x1<_0x4a45eb['length'])_0xf3c462++,_0x4be065+=_0x4a45eb[_0xf3c462++];else _0x4be065+=_0x4a45eb[_0xf3c462++];}if(_0xf3c462<_0x4a45eb[_0x4edc90(0x42c)])_0xf3c462++;_0x37eaba[_0x4edc90(0x591)](_0x4be065);continue;}let _0x581e94='';while(_0xf3c462<_0x4a45eb[_0x4edc90(0x42c)]&&_0x4a45eb[_0xf3c462]!=='\x20'&&_0x4a45eb[_0xf3c462]!=='\x09'&&_0x4a45eb[_0xf3c462]!=='{'&&_0x4a45eb[_0xf3c462]!=='['){_0x581e94+=_0x4a45eb[_0xf3c462++];}if(_0x581e94)_0x37eaba[_0x4edc90(0x591)](_0x581e94);}return _0x37eaba;}function _0x3ad947(_0x16b9e4,_0x5a4f02){const _0x15e46f=_0x20f478,_0x1231be=[..._0x16b9e4[_0x15e46f(0x5d0)]['keys']()][_0x15e46f(0x398)](_0x49fb9f=>!_0x49fb9f['startsWith']('~'));console['log'](['',_0x54865b(_0x55d2ba[_0x15e46f(0x384)]+_0x55d2ba[_0x15e46f(0x536)],_0x15e46f(0x3e0)),_0x54865b(_0x55d2ba[_0x15e46f(0x384)]+_0x55d2ba['cyan'],_0x15e46f(0x3c5))+_0x54865b(_0x55d2ba[_0x15e46f(0x384)],_0x15e46f(0x3d4))+_0x54865b(_0x55d2ba[_0x15e46f(0x384)]+_0x55d2ba['cyan'],'║'),_0x54865b(_0x55d2ba[_0x15e46f(0x384)]+_0x55d2ba[_0x15e46f(0x536)],_0x15e46f(0x463)),'','\x20\x20'+_0x54865b(_0x55d2ba[_0x15e46f(0x41a)],'✓')+'\x20'+_0x54865b(_0x55d2ba[_0x15e46f(0x384)],'server')+_0x15e46f(0x3e2)+_0x5a4f02[_0x15e46f(0x2aa)],..._0x5a4f02['clusterWorkers']>0x1?['\x20\x20'+_0x54865b(_0x55d2ba[_0x15e46f(0x41a)],'✓')+'\x20'+_0x54865b(_0x55d2ba[_0x15e46f(0x384)],_0x15e46f(0x1e4))+'\x20'+_0x5a4f02['clusterWorkers']+_0x15e46f(0x4a3)+_0x54865b(_0x55d2ba[_0x15e46f(0x4c0)],_0x15e46f(0x18a))]:[],'\x20\x20'+_0x54865b(_0x55d2ba[_0x15e46f(0x41a)],'✓')+'\x20'+_0x54865b(_0x55d2ba['bold'],_0x15e46f(0x4b7))+_0x15e46f(0x38e)+_0x5a4f02[_0x15e46f(0x2aa)]+_0x15e46f(0x587),'\x20\x20'+_0x54865b(_0x55d2ba[_0x15e46f(0x41a)],'✓')+'\x20'+_0x54865b(_0x55d2ba['bold'],_0x15e46f(0x366))+'\x20\x20\x20\x20'+_0x5a4f02[_0x15e46f(0x386)],'\x20\x20'+_0x54865b(_0x55d2ba[_0x15e46f(0x41a)],'✓')+'\x20'+_0x54865b(_0x55d2ba[_0x15e46f(0x384)],'id')+'\x20\x20\x20\x20\x20\x20'+_0x54865b(_0x55d2ba[_0x15e46f(0x4c0)],_0x16b9e4['id']),'\x20\x20'+_0x54865b(_0x55d2ba[_0x15e46f(0x41a)],'✓')+'\x20'+_0x54865b(_0x55d2ba[_0x15e46f(0x384)],_0x15e46f(0x5ba))+_0x15e46f(0xed)+_0x1231be['map'](_0x2adf1f=>_0x54865b(_0x55d2ba[_0x15e46f(0x536)],_0x2adf1f))[_0x15e46f(0x4b5)]('\x20\x20'),..._0x5a4f02[_0x15e46f(0x1ea)]?[]:['\x20\x20'+_0x54865b(_0x55d2ba['green'],'✓')+'\x20'+_0x54865b(_0x55d2ba[_0x15e46f(0x384)],'admin')+_0x15e46f(0x339)+_0x5a4f02[_0x15e46f(0x2aa)]+'/admin/index.html'],'',_0x54865b(_0x55d2ba[_0x15e46f(0x252)],_0x15e46f(0x119)+_0x54865b(_0x55d2ba[_0x15e46f(0x384)],'help')+_0x15e46f(0x283)+_0x54865b(_0x55d2ba['bold'],_0x15e46f(0x3cb))+_0x15e46f(0x286)+_0x54865b(_0x55d2ba[_0x15e46f(0x384)],_0x15e46f(0x155))+'\x20to\x20quit.'),''][_0x15e46f(0x4b5)]('\x0a'));}function _0xfa84c6(_0x3a22c1){const _0x3a3af1=_0x20f478;console['log']('\x0a'+_0x54865b(_0x55d2ba[_0x3a3af1(0x384)],_0x3a3af1(0x5a8))+'\x20\x20'+_0x54865b(_0x55d2ba['dim'],'—\x20/api/\x20is\x20auto-prefixed,\x20env\x20is\x20auto-injected')+_0x3a3af1(0xc8)+_0x54865b(_0x55d2ba[_0x3a3af1(0x536)],_0x3a3af1(0x1f3))+_0x3a3af1(0x5a9)+_0x54865b(_0x55d2ba[_0x3a3af1(0x536)],_0x3a3af1(0x1f3))+'\x20'+_0x54865b(_0x55d2ba[_0x3a3af1(0x5a2)],_0x3a3af1(0x56b))+_0x3a3af1(0x2ab)+_0x54865b(_0x55d2ba[_0x3a3af1(0x536)],_0x3a3af1(0x523))+'\x20'+_0x54865b(_0x55d2ba['cyan'],_0x3a3af1(0x1f3))+'\x20'+_0x54865b(_0x55d2ba[_0x3a3af1(0x5a2)],_0x3a3af1(0x300))+'\x20\x20\x20\x20\x20explicit\x20method\x0a\x0a\x20\x20'+_0x54865b(_0x55d2ba['dim'],_0x3a3af1(0x527))+'\x0a\x20\x20\x20\x20'+_0x54865b(_0x55d2ba[_0x3a3af1(0x4c0)],_0x3a3af1(0x59a))+_0x3a3af1(0x4de)+_0x54865b(_0x55d2ba[_0x3a3af1(0x4c0)],'envs')+_0x3a3af1(0x1de)+_0x54865b(_0x55d2ba['gray'],_0x3a3af1(0x5b7))+_0x3a3af1(0x60b)+_0x3a22c1['env']+'/types\x0a\x20\x20\x20\x20'+_0x54865b(_0x55d2ba[_0x3a3af1(0x4c0)],_0x3a3af1(0x3d7))+_0x3a3af1(0x5f3)+_0x3a22c1[_0x3a3af1(0x1d9)]+_0x3a3af1(0x8a)+_0x54865b(_0x55d2ba[_0x3a3af1(0x4c0)],'type/users/item/alice')+_0x3a3af1(0x151)+_0x3a22c1['env']+_0x3a3af1(0x3f7)+_0x54865b(_0x55d2ba['gray'],_0x3a3af1(0x362))+_0x3a3af1(0x5cf)+_0x3a22c1[_0x3a3af1(0x1d9)]+_0x3a3af1(0x30b)+_0x54865b(_0x55d2ba[_0x3a3af1(0x4c0)],_0x3a3af1(0x150))+_0x3a3af1(0xce)+_0x54865b(_0x55d2ba['gray'],'DELETE\x20type/users/item/x')+'\x0a\x20\x20\x20\x20'+_0x54865b(_0x55d2ba[_0x3a3af1(0x4c0)],'env/staging/info')+_0x3a3af1(0x2d9)+_0x54865b(_0x55d2ba[_0x3a3af1(0x384)],_0x3a3af1(0x231))+'\x20\x20'+_0x54865b(_0x55d2ba['dim'],_0x3a3af1(0x1c3))+_0x3a3af1(0xc8)+_0x54865b(_0x55d2ba['cyan'],_0x3a3af1(0x253))+_0x3a3af1(0x588)+_0x54865b(_0x55d2ba[_0x3a3af1(0x536)],_0x3a3af1(0x223))+_0x3a3af1(0x47a)+_0x54865b(_0x55d2ba[_0x3a3af1(0x252)],_0x3a3af1(0x527))+_0x3a3af1(0xce)+_0x54865b(_0x55d2ba['gray'],'types\x20--env\x20staging')+_0x3a3af1(0xce)+_0x54865b(_0x55d2ba[_0x3a3af1(0x4c0)],_0x3a3af1(0x192))+'\x0a\x20\x20\x20\x20'+_0x54865b(_0x55d2ba[_0x3a3af1(0x4c0)],_0x3a3af1(0x7e))+'\x0a\x0a'+_0x54865b(_0x55d2ba['bold'],_0x3a3af1(0x11d))+_0x3a3af1(0xc8)+_0x54865b(_0x55d2ba[_0x3a3af1(0x536)],_0x3a3af1(0x204))+_0x3a3af1(0x11b)+_0x54865b(_0x55d2ba[_0x3a3af1(0x536)],_0x3a3af1(0x1d9))+_0x3a3af1(0x266)+_0x54865b(_0x55d2ba[_0x3a3af1(0x536)],_0x3a3af1(0x3cb))+'\x20'+_0x54865b(_0x55d2ba[_0x3a3af1(0x252)],_0x3a3af1(0x108))+_0x3a3af1(0x60d)+_0x54865b(_0x55d2ba[_0x3a3af1(0x536)],_0x3a3af1(0x1d8))+'\x20'+_0x54865b(_0x55d2ba['dim'],'[on|off|level]')+'\x20\x20\x20\x20\x20control\x20log\x20verbosity\x0a\x20\x20'+_0x54865b(_0x55d2ba['cyan'],_0x3a3af1(0x54e))+_0x3a3af1(0x5e8)+_0x54865b(_0x55d2ba['cyan'],_0x3a3af1(0x309))+_0x3a3af1(0x170)+_0x54865b(_0x55d2ba[_0x3a3af1(0x536)],'exit')+'\x20'+_0x54865b(_0x55d2ba[_0x3a3af1(0x252)],_0x3a3af1(0x1e0))+'\x20\x20\x20\x20graceful\x20shutdown\x0a');}let _0x2fb92f=![];async function _0x5a44d0(_0x1bae7f,_0x3d4a45=0x0,_0x4af12b=null){const _0x29d0ee=_0x20f478;_0x2fb92f&&(process['stderr']['write'](_0x54865b(_0x55d2ba[_0x29d0ee(0x511)],_0x29d0ee(0x4cf))),process[_0x29d0ee(0x155)](0x82));_0x2fb92f=!![],process[_0x29d0ee(0xa6)][_0x29d0ee(0x288)]('\x0a'),process[_0x29d0ee(0x1b8)][_0x29d0ee(0x288)](_0x54865b(_0x55d2ba[_0x29d0ee(0x5a2)],_0x29d0ee(0x541)+(_0x4af12b?'received\x20'+_0x4af12b+',\x20':'')+_0x29d0ee(0x3b0)));const _0x1cca25=setTimeout(()=>{const _0x3e72c1=_0x29d0ee;process[_0x3e72c1(0x1b8)][_0x3e72c1(0x288)](_0x54865b(_0x55d2ba[_0x3e72c1(0x511)],'\x20\x20[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a')),process[_0x3e72c1(0x155)](0x1);},0x1388);try{await _0x1bae7f['close']();}catch(_0x15ae14){console[_0x29d0ee(0x3b8)](_0x54865b(_0x55d2ba[_0x29d0ee(0x511)],'\x20\x20'+_0x15ae14[_0x29d0ee(0x491)]));}clearTimeout(_0x1cca25),process[_0x29d0ee(0x1b8)][_0x29d0ee(0x288)](_0x54865b(_0x55d2ba[_0x29d0ee(0x252)],'\x20\x20[okdb]\x20closed\x20cleanly\x0a')),process[_0x29d0ee(0x155)](_0x3d4a45);}function _0x96d17f(_0x2dc16f){const _0x14be10=_0x20f478,_0x2269f7=_0x2dc16f[_0x14be10(0x1d9)]!=='default'?_0x54865b(_0x55d2ba[_0x14be10(0x5a2)],'['+_0x2dc16f[_0x14be10(0x1d9)]+']'):'';return _0x54865b(_0x55d2ba[_0x14be10(0x384)]+_0x55d2ba[_0x14be10(0x536)],_0x14be10(0x110))+_0x2269f7+_0x54865b(_0x55d2ba['gray'],'>\x20');}const _0x126eb6=new Set([_0x20f478(0x5ee),_0x20f478(0x1bc),_0x20f478(0xe9),_0x20f478(0x188),'DELETE']);async function _0x38a13a(_0x127731,_0x4e4b4a,_0x12817f,_0x14db77,_0x8bf8e2,_0x4004a8){const _0x375efa=_0x20f478;_0x127731=_0x127731[_0x375efa(0x2a6)]();if(!_0x127731||_0x127731[_0x375efa(0x3ad)]('#'))return;const _0x3e1729=_0x26fe6d(_0x127731),{flags:_0x4b4ea5,rest:_0x4beab9}=_0x15d2a0(_0x3e1729);if(!_0x4beab9['length'])return;const _0x3f22cd=_0x4beab9[0x0],_0x1a1d3d=_0x3f22cd[_0x375efa(0x5b8)]();if(_0x1a1d3d===_0x375efa(0x502)){if(_0x4beab9[0x1])_0x3ed5a0(_0x4e4b4a,_0x5a4a3b(_0x4beab9[0x1],_0x4b4ea5[_0x375efa(0x1d9)]??_0x8bf8e2[_0x375efa(0x1d9)]));else _0xfa84c6(_0x8bf8e2);return;}if(_0x1a1d3d==='USE'){const _0x2aa510=_0x4beab9[0x1];if(!_0x2aa510){console[_0x375efa(0x5f4)](_0x54865b(_0x55d2ba['red'],_0x375efa(0x428)));return;}try{_0x4e4b4a[_0x375efa(0x1d9)](_0x2aa510),_0x8bf8e2[_0x375efa(0x1d9)]=_0x2aa510,_0x4004a8?.[_0x375efa(0x2a5)](_0x96d17f(_0x8bf8e2)),console[_0x375efa(0x5f4)](_0x375efa(0x329)+_0x54865b(_0x55d2ba[_0x375efa(0x41a)],'✓')+_0x375efa(0x1aa)+_0x54865b(_0x55d2ba[_0x375efa(0x384)]+_0x55d2ba['cyan'],_0x2aa510)+'\x0a');}catch{console['log'](_0x375efa(0x329)+_0x54865b(_0x55d2ba[_0x375efa(0x511)],'✗')+_0x375efa(0xbe)+_0x54865b(_0x55d2ba[_0x375efa(0x384)],_0x2aa510)+_0x375efa(0x5a4)+_0x54865b(_0x55d2ba[_0x375efa(0x252)],_0x375efa(0x401)));}return;}if(_0x1a1d3d===_0x375efa(0x4ee)){const _0x1b683b=[..._0x4e4b4a[_0x375efa(0x5d0)]['keys']()][_0x375efa(0x398)](_0x484108=>!_0x484108[_0x375efa(0x3ad)]('~'));console[_0x375efa(0x5f4)]('');for(const _0x294bdb of _0x1b683b){const _0x5c22c8=_0x294bdb===_0x8bf8e2[_0x375efa(0x1d9)];console[_0x375efa(0x5f4)]('\x20\x20'+(_0x5c22c8?_0x54865b(_0x55d2ba['green'],'●'):_0x54865b(_0x55d2ba[_0x375efa(0x252)],'○'))+'\x20\x20'+(_0x5c22c8?_0x54865b(_0x55d2ba[_0x375efa(0x384)]+_0x55d2ba[_0x375efa(0x536)],_0x294bdb):_0x54865b(_0x55d2ba[_0x375efa(0x252)],_0x294bdb)));}console[_0x375efa(0x5f4)](_0x375efa(0x329)+_0x54865b(_0x55d2ba[_0x375efa(0x252)],'active:')+'\x20'+_0x54865b(_0x55d2ba[_0x375efa(0x536)],_0x8bf8e2[_0x375efa(0x1d9)])),console[_0x375efa(0x5f4)]('');return;}if(_0x1a1d3d===_0x375efa(0x415)){const _0x33b55c=[..._0x4e4b4a[_0x375efa(0x5d0)][_0x375efa(0x41e)]()][_0x375efa(0x398)](_0x3b682e=>!_0x3b682e[_0x375efa(0x4a9)][_0x375efa(0x3ad)]('~'));console[_0x375efa(0x5f4)]('');const _0x2c2dd8=Math[_0x375efa(0x473)](..._0x33b55c['map'](_0x393e9c=>_0x393e9c[_0x375efa(0x4a9)][_0x375efa(0x42c)]));for(const _0x9ff1b6 of _0x33b55c){const _0x2c2694=_0x9ff1b6[_0x375efa(0x4a9)]===_0x8bf8e2[_0x375efa(0x1d9)],_0x9d70b2=_0x2c2694?_0x54865b(_0x55d2ba[_0x375efa(0x41a)],'●'):_0x54865b(_0x55d2ba['dim'],'○'),_0x59d94c=_0x2c2694?_0x54865b(_0x55d2ba['bold']+_0x55d2ba[_0x375efa(0x536)],_0x9ff1b6[_0x375efa(0x4a9)][_0x375efa(0x32f)](_0x2c2dd8)):_0x54865b(_0x55d2ba[_0x375efa(0x252)],_0x9ff1b6[_0x375efa(0x4a9)]['padEnd'](_0x2c2dd8)),_0x1e3353=[..._0x9ff1b6[_0x375efa(0x2c0)][_0x375efa(0x180)]()]['filter'](_0xc06bfb=>!_0xc06bfb[_0x375efa(0x3ad)]('~')),_0x56af4d=_0x1e3353[_0x375efa(0x42c)]?_0x54865b(_0x55d2ba[_0x375efa(0x252)],_0x1e3353[_0x375efa(0x5f5)](0x0,0x5)[_0x375efa(0x4b5)](',\x20')+(_0x1e3353['length']>0x5?_0x375efa(0x29e)+(_0x1e3353['length']-0x5)+_0x375efa(0x22e):'')):_0x54865b(_0x55d2ba[_0x375efa(0x252)],_0x375efa(0x5fb));console['log']('\x20\x20'+_0x9d70b2+'\x20\x20'+_0x59d94c+'\x20\x20'+_0x56af4d);}console[_0x375efa(0x5f4)]('');return;}if(_0x1a1d3d===_0x375efa(0xc5)){const _0x5353d2=_0x4b4ea5[_0x375efa(0x1d9)]??_0x4beab9[0x1]??_0x8bf8e2[_0x375efa(0x1d9)];try{const _0x5e9d8a=_0x4e4b4a['env'](_0x5353d2),_0x5a20d6=[..._0x5e9d8a[_0x375efa(0x2c0)][_0x375efa(0x180)]()][_0x375efa(0x398)](_0x5a0496=>!_0x5a0496['startsWith']('~'))[_0x375efa(0x3c3)]();console[_0x375efa(0x5f4)](_0x375efa(0x329)+_0x54865b(_0x55d2ba[_0x375efa(0x252)],_0x5a20d6[_0x375efa(0x42c)]+_0x375efa(0x456)+(_0x5a20d6[_0x375efa(0x42c)]!==0x1?'s':'')+_0x375efa(0x4e1)+_0x5353d2));for(const _0x194e38 of _0x5a20d6){const _0x229cd6=_0x5e9d8a['typeSubDbs'][_0x375efa(0x3b2)](_0x194e38),_0xa4b745=_0x229cd6?.[_0x375efa(0x516)]?.[_0x375efa(0x3f0)]?.()??0x0,_0x3c6399=_0x54865b(_0x55d2ba[_0x375efa(0x384)]+_0x55d2ba[_0x375efa(0x536)],_0x194e38[_0x375efa(0x32f)](0x1c));console[_0x375efa(0x5f4)]('\x20\x20\x20\x20'+_0x3c6399+'\x20\x20'+_0x54865b(_0x55d2ba[_0x375efa(0xe8)],String(_0xa4b745)[_0x375efa(0x58b)](0x6))+'\x20'+_0x54865b(_0x55d2ba['dim'],_0x375efa(0x5f6)));}console[_0x375efa(0x5f4)]('');}catch(_0x2ae4c8){console[_0x375efa(0x3b8)](_0x54865b(_0x55d2ba[_0x375efa(0x511)],_0x375efa(0x329)+_0x2ae4c8[_0x375efa(0x491)]+'\x0a'));}return;}if(_0x1a1d3d===_0x375efa(0xaa)){_0x227408(_0x4e4b4a,_0x4beab9[_0x375efa(0x5f5)](0x1)['join']('\x20'));return;}if(_0x1a1d3d===_0x375efa(0x163)){const _0x1ed240=(_0x4beab9[0x1]??'')[_0x375efa(0x550)]();if(!_0x1ed240||_0x1ed240==='on')_0x14db77[_0x375efa(0x2d1)]=!![],_0x14db77[_0x375efa(0x1cf)]=_0x375efa(0x59a),console[_0x375efa(0x5f4)](_0x375efa(0x329)+_0x54865b(_0x55d2ba['green'],'✓')+_0x375efa(0x323)+_0x54865b(_0x55d2ba[_0x375efa(0x252)],_0x375efa(0x2fe))+'\x0a');else{if(_0x1ed240===_0x375efa(0x4ac))_0x14db77['enabled']=![],console['log'](_0x375efa(0x329)+_0x54865b(_0x55d2ba[_0x375efa(0x5a2)],'○')+_0x375efa(0x87));else _0x15c20e[_0x1ed240]!==undefined?(_0x14db77[_0x375efa(0x2d1)]=!![],_0x14db77[_0x375efa(0x1cf)]=_0x1ed240,console['log']('\x0a\x20\x20'+_0x54865b(_0x55d2ba[_0x375efa(0x41a)],'✓')+_0x375efa(0x53d)+_0x54865b(_0x55d2ba['bold'],_0x1ed240)+'\x0a')):console[_0x375efa(0x3b8)](_0x54865b(_0x55d2ba[_0x375efa(0x511)],_0x375efa(0x1df)));}return;}if(_0x1a1d3d===_0x375efa(0x434)||_0x1a1d3d===_0x375efa(0x3fa)){await _0x5a44d0(_0x4e4b4a,0x0);return;}if(_0x1a1d3d===_0x375efa(0x28a)){const _0x3ca247=_0x375efa(0x10d)+_0x12817f[_0x375efa(0x2aa)]+_0x375efa(0xf8),_0xc71081=process['platform']==='win32'?_0x375efa(0x507)+_0x3ca247:process['platform']===_0x375efa(0x1e2)?_0x375efa(0x27a)+_0x3ca247:_0x375efa(0x436)+_0x3ca247;require$$4['exec'](_0xc71081),console[_0x375efa(0x5f4)](_0x375efa(0x329)+_0x54865b(_0x55d2ba[_0x375efa(0x41a)],'✓')+_0x375efa(0x2f3)+_0x54865b(_0x55d2ba['cyan'],_0x3ca247)+'\x0a');return;}let _0x4b49ca,_0xd39e83,_0x5c05f8;if(_0x126eb6[_0x375efa(0x1b4)](_0x1a1d3d)){_0x4b49ca=_0x1a1d3d,_0xd39e83=_0x4beab9[0x1],_0x5c05f8=_0x4beab9[_0x375efa(0x5f5)](0x2);if(!_0xd39e83){console[_0x375efa(0x3b8)](_0x54865b(_0x55d2ba['red'],'\x20\x20Usage:\x20'+_0x3f22cd+_0x375efa(0x29b)));return;}}else _0x4b49ca=null,_0xd39e83=_0x4beab9[0x0],_0x5c05f8=_0x4beab9['slice'](0x1);const _0x1bcc14=_0x4b4ea5[_0x375efa(0x1d9)]??_0x8bf8e2[_0x375efa(0x1d9)],_0xf5685=_0x5a4a3b(_0xd39e83,_0x1bcc14);if(_0x4b4ea5[_0x375efa(0x309)]){_0x3ed5a0(_0x4e4b4a,_0xf5685);return;}let _0x13a64e=null;if(_0x5c05f8['length']){const _0x37b0a0=_0x5c05f8[_0x375efa(0x4b5)]('\x20');try{_0x13a64e=_0x91dff(_0x37b0a0);}catch(_0x4aaf33){console['error'](_0x54865b(_0x55d2ba[_0x375efa(0x511)],_0x375efa(0x31e)+_0x37b0a0+'\x0a\x20\x20'+_0x54865b(_0x55d2ba['dim'],_0x4aaf33[_0x375efa(0x491)])+'\x0a'));return;}}if(!_0x4b49ca)_0x4b49ca=_0x13a64e!==null?_0x375efa(0x1bc):_0x375efa(0x5ee);try{const _0x35e17c=await _0x2dd22e(_0x4e4b4a,_0x4b49ca,_0xf5685,_0x13a64e);_0x22bb51(_0x35e17c[_0x375efa(0x1fe)],_0x35e17c['body']);}catch(_0x2e9b4a){console[_0x375efa(0x3b8)](_0x375efa(0x329)+_0x54865b(_0x55d2ba[_0x375efa(0x511)],'✗')+'\x20'+_0x2e9b4a[_0x375efa(0x491)]+'\x0a');}}class _0x3d6882{constructor(){const _0x22b83d=_0x20f478;this['children']=new Map(),this[_0x22b83d(0x1e3)]=null,this['terminal']=![];}}function _0x2eec0c(_0x31d3a0){const _0x37717f=_0x20f478,_0x4ace32=new _0x3d6882();for(const _0xa49934 of _0x31d3a0){if(_0xa49934[_0x37717f(0x208)]?.['hidden'])continue;const _0x2b1768=_0xa49934['path'][_0x37717f(0x327)](/^\/api/,'')[_0x37717f(0x327)](/^\[\/env\/:env=[^\]]*\]/,'')[_0x37717f(0x327)](/^\//,'');if(!_0x2b1768)continue;let _0x500904=_0x4ace32;for(const _0x87f07a of _0x2b1768['split']('/')[_0x37717f(0x398)](Boolean)){if(_0x87f07a[_0x37717f(0x3ad)](':')){const _0x3fa303=_0x87f07a[_0x37717f(0x5f5)](0x1);if(!_0x500904[_0x37717f(0x1e3)])_0x500904[_0x37717f(0x1e3)]={'param':_0x3fa303,'node':new _0x3d6882()};_0x500904=_0x500904[_0x37717f(0x1e3)][_0x37717f(0x48a)];}else{if(!_0x500904[_0x37717f(0x475)][_0x37717f(0x1b4)](_0x87f07a))_0x500904['children']['set'](_0x87f07a,new _0x3d6882());_0x500904=_0x500904['children'][_0x37717f(0x3b2)](_0x87f07a);}}_0x500904['terminal']=!![];}return _0x4ace32;}const _0x222710=new Map();function _0x4478ce(_0x2ced16,_0x3d7f03,_0x449891){const _0x4d5431=_0x20f478,_0x806f8a=_0x222710[_0x4d5431(0x3b2)](_0x2ced16);if(_0x806f8a&&_0x806f8a[_0x4d5431(0x4a6)]>Date[_0x4d5431(0x46e)]())return _0x806f8a[_0x4d5431(0x274)];const _0x554699=_0x449891();return _0x222710[_0x4d5431(0xff)](_0x2ced16,{'val':_0x554699,'exp':Date[_0x4d5431(0x46e)]()+_0x3d7f03}),_0x554699;}function _0x3c9b0d(_0x4fe5bc,_0x4dfae5,_0x405649,_0x29b9ba){const _0x3b8c94=_0x20f478,_0x4e27f0=_0x4dfae5[_0x3b8c94(0x1d9)]??_0x29b9ba[_0x3b8c94(0x1d9)];switch(_0x4fe5bc){case'env':return[..._0x405649['_envs']['keys']()][_0x3b8c94(0x398)](_0x1eb095=>!_0x1eb095[_0x3b8c94(0x3ad)]('~'));case'type':return _0x4478ce(_0x3b8c94(0x116)+_0x4e27f0,0x7d0,()=>{const _0x3cbe70=_0x3b8c94;try{return[..._0x405649[_0x3cbe70(0x1d9)](_0x4e27f0)['typeSubDbs']['keys']()][_0x3cbe70(0x398)](_0x13dadd=>!_0x13dadd[_0x3cbe70(0x3ad)]('~'));}catch{return[];}});case _0x3b8c94(0x8b):if(!_0x4dfae5[_0x3b8c94(0x191)])return[];return _0x4478ce(_0x3b8c94(0x5fe)+_0x4e27f0+':'+_0x4dfae5['type'],0x5dc,()=>{const _0x586679=_0x3b8c94;try{const _0x1210f9=_0x405649[_0x586679(0x1d9)](_0x4e27f0)[_0x586679(0x2c0)]['get'](_0x4dfae5[_0x586679(0x191)]);if(!_0x1210f9?.[_0x586679(0x516)])return[];const _0x1c13f2=[];for(const {key:_0x579952}of _0x1210f9[_0x586679(0x516)][_0x586679(0x610)]({'limit':0x32})){_0x1c13f2[_0x586679(0x591)](String(_0x579952));if(_0x1c13f2[_0x586679(0x42c)]>=0x32)break;}return _0x1c13f2;}catch{return[];}});case _0x3b8c94(0x446):if(!_0x4dfae5[_0x3b8c94(0x191)])return[];return _0x4478ce(_0x3b8c94(0x439)+_0x4e27f0+':'+_0x4dfae5[_0x3b8c94(0x191)],0x7d0,()=>{const _0x14c609=_0x3b8c94;try{const _0x197fc0=_0x405649[_0x14c609(0x1d9)](_0x4e27f0)[_0x14c609(0x2c0)]['get'](_0x4dfae5[_0x14c609(0x191)]);return _0x197fc0?[..._0x197fc0['indexToDb']?.['keys']()??[]]:[];}catch{return[];}});case _0x3b8c94(0x31a):if(!_0x4dfae5[_0x3b8c94(0x191)])return[];return _0x4478ce(_0x3b8c94(0x1ac)+_0x4e27f0+':'+_0x4dfae5[_0x3b8c94(0x191)],0x7d0,()=>{const _0x25bd6d=_0x3b8c94;try{return _0x405649[_0x25bd6d(0x293)]?.[_0x25bd6d(0x139)]?.(_0x4dfae5[_0x25bd6d(0x191)],_0x405649[_0x25bd6d(0x1d9)](_0x4e27f0))?.['map'](_0x18f064=>_0x18f064[_0x25bd6d(0x4a9)])??[];}catch{return[];}});default:return[];}}function _0x51acf4(_0x51a49a,_0x58f766,_0x439b7c,_0x1005ec){const _0x5a256f=_0x20f478,_0x3aacc1=_0x51a49a[_0x5a256f(0x28e)]('/'),_0x396c14=_0x51a49a[_0x5a256f(0x48e)]('/'),_0x4f297a=_0x3aacc1?_0x396c14['slice'](0x0,-0x1):_0x396c14[_0x5a256f(0x5f5)](0x0,-0x1),_0x10bfeb=_0x3aacc1?'':_0x396c14[_0x396c14['length']-0x1];let _0x282426=_0x58f766;const _0x352f16={};for(const _0x43b914 of _0x4f297a){if(!_0x43b914)continue;if(_0x282426[_0x5a256f(0x475)][_0x5a256f(0x1b4)](_0x43b914))_0x282426=_0x282426[_0x5a256f(0x475)][_0x5a256f(0x3b2)](_0x43b914);else{if(_0x282426['dynamic'])_0x352f16[_0x282426['dynamic'][_0x5a256f(0x2fb)]]=_0x43b914,_0x282426=_0x282426['dynamic']['node'];else return[];}}const _0x543723=_0x4f297a[_0x5a256f(0x398)](Boolean),_0x20dcbf=_0x543723[_0x5a256f(0x42c)]?_0x543723[_0x5a256f(0x4b5)]('/')+'/':'',_0x299468=[];for(const [_0xf9cc8]of _0x282426[_0x5a256f(0x475)]){if(_0xf9cc8[_0x5a256f(0x3ad)](_0x10bfeb))_0x299468[_0x5a256f(0x591)](_0x20dcbf+_0xf9cc8);}if(_0x282426[_0x5a256f(0x1e3)])for(const _0x4a4db6 of _0x3c9b0d(_0x282426[_0x5a256f(0x1e3)][_0x5a256f(0x2fb)],_0x352f16,_0x439b7c,_0x1005ec)){if(String(_0x4a4db6)[_0x5a256f(0x3ad)](_0x10bfeb))_0x299468[_0x5a256f(0x591)](_0x20dcbf+_0x4a4db6);}return _0x299468[_0x5a256f(0x5f5)](0x0,0x64);}const _0x3139b8=[_0x20f478(0x309),_0x20f478(0x25d),_0x20f478(0x1d9),_0x20f478(0x5ba),_0x20f478(0x5b7),'routes',_0x20f478(0x1d8),'open','exit',_0x20f478(0x34f)];function _0x1f0dfc(_0x15735b,_0x51ed90,_0x1a2269){return function _0x5cdbc8(_0x1af6b9){const _0x1af500=_0x240c;try{const _0x46ac43=_0x1af6b9['search'](/\s[{[]/),_0x27a405=_0x46ac43>=0x0?_0x1af6b9[_0x1af500(0x5f5)](0x0,_0x46ac43):_0x1af6b9,_0xdf7232=_0x27a405['trimStart']();if(!_0xdf7232){const _0x1c2569=[..._0x3139b8,...[..._0x15735b[_0x1af500(0x475)]['keys']()]]['slice'](0x0,0x64);return[_0x1c2569,''];}const _0x84e6c5=_0xdf7232[_0x1af500(0x48e)](/\s+/),_0xc1cee8=_0x84e6c5[0x0],_0x2a9cc0=_0xc1cee8[_0x1af500(0x5b8)]();if(_0x84e6c5['length']===0x1){const _0x5af6a8=_0xc1cee8[_0x1af500(0x550)](),_0x321113=_0x3139b8[_0x1af500(0x398)](_0x5850db=>_0x5850db['startsWith'](_0x5af6a8)),_0x261143=_0x51acf4(_0xc1cee8,_0x15735b,_0x51ed90,_0x1a2269),_0x3a0775=[...new Set([..._0x321113,..._0x261143])][_0x1af500(0x5f5)](0x0,0x64);return[_0x3a0775,_0xc1cee8];}if(_0x126eb6[_0x1af500(0x1b4)](_0x2a9cc0)&&_0x84e6c5['length']===0x2){const _0x2b4e5c=_0x84e6c5[0x1],_0x27a6fe=_0x51acf4(_0x2b4e5c,_0x15735b,_0x51ed90,_0x1a2269);return[_0x27a6fe[_0x1af500(0x1fd)](_0x3c179d=>_0xc1cee8+'\x20'+_0x3c179d),_0xc1cee8+'\x20'+_0x2b4e5c];}if(!_0x126eb6[_0x1af500(0x1b4)](_0x2a9cc0)&&_0x84e6c5[_0x1af500(0x42c)]>0x1){const _0xce87af=_0x51acf4(_0xc1cee8,_0x15735b,_0x51ed90,_0x1a2269),_0x2ef268='\x20'+_0x84e6c5['slice'](0x1)[_0x1af500(0x4b5)]('\x20');return[_0xce87af[_0x1af500(0x1fd)](_0x5531e6=>_0x5531e6+_0x2ef268),_0xc1cee8+_0x2ef268];}return[[],_0x1af6b9];}catch{return[[],_0x1af6b9];}};}async function _0x73095b(_0x5afa43,_0x40af9a){const _0x5170af=_0x20f478,_0x4f90a4={'enabled':!![],'level':_0x40af9a[_0x5170af(0x14b)]??_0x5170af(0x59a)},_0x157f3a={'env':'default'},_0x596eb3={'current':null},_0x17cd5b=_0x2eec0c(_0x5afa43[_0x5170af(0x19e)][_0x5170af(0x552)]()),_0x3e3bf9=_0x1f0dfc(_0x17cd5b,_0x5afa43,_0x157f3a);_0x5afa43['log'][_0x5170af(0x504)](_0x32fac2=>{const _0x542bae=_0x5170af;if(!_0x4f90a4[_0x542bae(0x2d1)])return;_0x2b63fa(_0x32fac2,_0x4f90a4[_0x542bae(0x1cf)]),_0x596eb3[_0x542bae(0x42e)]?.[_0x542bae(0x429)](!![]);}),_0x3ad947(_0x5afa43,_0x40af9a);const _0x3031c7=_0x3e45de[_0x5170af(0xd7)]({'input':process[_0x5170af(0x4df)],'output':process[_0x5170af(0xa6)],'terminal':!![],'completer':_0x3e3bf9,'prompt':_0x96d17f(_0x157f3a),'historySize':_0x5a37f0});try{const _0xb3505b=_0x4bf33b['readFileSync'](_0x41799b,_0x5170af(0x1bb))['split']('\x0a')['filter'](Boolean);_0x3031c7['history']=_0xb3505b[_0x5170af(0x2fd)]()[_0x5170af(0x5f5)](0x0,_0x5a37f0);}catch{}_0x596eb3[_0x5170af(0x42e)]=_0x3031c7,_0x3031c7['on']('line',async _0x2c6ede=>{const _0x52363c=_0x5170af;_0x3031c7[_0x52363c(0x206)]();try{await _0x38a13a(_0x2c6ede,_0x5afa43,_0x40af9a,_0x4f90a4,_0x157f3a,_0x3031c7);}catch(_0x910409){console[_0x52363c(0x3b8)](_0x54865b(_0x55d2ba[_0x52363c(0x511)],_0x52363c(0x21d)+_0x910409[_0x52363c(0x491)]));}finally{_0x3031c7[_0x52363c(0x28f)](),_0x3031c7['prompt']();}}),_0x3031c7['on'](_0x5170af(0x1ab),()=>{const _0xc56901=_0x5170af;try{const _0x120f5e=[..._0x3031c7[_0xc56901(0x16e)]]['reverse']()['filter'](Boolean)['slice'](0x0,_0x5a37f0);_0x4bf33b[_0xc56901(0x111)](_0x41799b,_0x120f5e[_0xc56901(0x4b5)]('\x0a')+'\x0a');}catch{}_0x5a44d0(_0x5afa43,0x0);});let _0x31635f=0x0;return process['on'](_0x5170af(0x15e),()=>{const _0x2a6b5d=_0x5170af;if(_0x2fb92f)return _0x5a44d0(_0x5afa43,0x82,_0x2a6b5d(0x15e));if(_0x3031c7[_0x2a6b5d(0x342)]==='')return _0x5a44d0(_0x5afa43,0x0,_0x2a6b5d(0x15e));const _0x48e704=Date[_0x2a6b5d(0x46e)]();if(_0x48e704-_0x31635f<0x5dc)return _0x5a44d0(_0x5afa43,0x0,'SIGINT\x20(double-tap)');_0x31635f=_0x48e704,process[_0x2a6b5d(0xa6)][_0x2a6b5d(0x288)]('\x0a'),_0x3031c7[_0x2a6b5d(0x202)](0x0),_0x3031c7[_0x2a6b5d(0x429)](),process[_0x2a6b5d(0x1b8)][_0x2a6b5d(0x288)](_0x54865b(_0x55d2ba['dim'],'\x20\x20(press\x20Ctrl+C\x20again\x20to\x20exit)\x0a'));}),process['on'](_0x5170af(0x380),()=>_0x5a44d0(_0x5afa43,0x0,_0x5170af(0x380))),process['on'](_0x5170af(0xe1),()=>_0x5a44d0(_0x5afa43,0x0,_0x5170af(0xe1))),_0x3031c7[_0x5170af(0x429)](),_0x3031c7;}return okdbShell={'start':_0x73095b,'colorLog':_0x2b63fa,'lenientParse':_0x91dff,'_splitLine':_0x26fe6d,'_formatRouteHelpLines':_0x4b25d9,'_routeSummary':_0x2c06ea,'_routeTags':_0x35ece9},okdbShell;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x5976b6=_0x17fdfc;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x1f6983,performance:_0x17fb61}=require$$0$3,_0x23e925=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG==='true',_0x2f761f=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x5048ca=process.env.OKDB_LOOP_LAG_ALL==='1',_0x1f8bc1=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x2bf2ad{constructor(){const _0x4674fc=_0x240c;this[_0x4674fc(0x2d1)]=_0x23e925,this['_buckets']=new Map(),this['_h']=null,this[_0x4674fc(0x472)]=null,this[_0x4674fc(0x3f6)]=![],this['_log']=(_0x2d5620,_0x2c8c07)=>process[_0x4674fc(0x1b8)][_0x4674fc(0x288)](_0x2d5620+(_0x2c8c07?'\x20'+JSON['stringify'](_0x2c8c07):'')+'\x0a');}['now'](){const _0x9ea1f9=_0x240c;return _0x17fb61[_0x9ea1f9(0x46e)]();}['setLogger'](_0x44cd44){const _0x5085cb=_0x240c;if(typeof _0x44cd44===_0x5085cb(0x47f))this[_0x5085cb(0x325)]=_0x44cd44;}['note'](_0x242bf7,_0x56b76e,_0x25f8a3){const _0x974366=_0x240c;if(!this['enabled'])return;let _0x2d3d03=this[_0x974366(0x4c5)][_0x974366(0x3b2)](_0x242bf7);!_0x2d3d03&&(_0x2d3d03={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x974366(0x4c5)][_0x974366(0xff)](_0x242bf7,_0x2d3d03)),_0x2d3d03['ms']+=_0x56b76e,_0x2d3d03[_0x974366(0x5bb)]+=0x1,_0x56b76e>_0x2d3d03[_0x974366(0x551)]&&(_0x2d3d03[_0x974366(0x551)]=_0x56b76e,_0x2d3d03['maxExtra']=_0x25f8a3||'');}['start'](_0x134945){const _0x180a96=_0x240c;if(!this[_0x180a96(0x2d1)]||this[_0x180a96(0x3f6)])return;this[_0x180a96(0x3f6)]=!![];if(_0x134945)this[_0x180a96(0x325)]=_0x134945;this['_h']=_0x1f6983({'resolution':0xa}),this['_h'][_0x180a96(0x35f)](),this[_0x180a96(0x472)]=setInterval(()=>this[_0x180a96(0x485)](),_0x2f761f);if(this[_0x180a96(0x472)][_0x180a96(0x326)])this[_0x180a96(0x472)][_0x180a96(0x326)]();}[_0x5976b6(0x3f1)](_0x495eca){const _0x5f0489=_0x5976b6;if(!this[_0x5f0489(0x381)])this[_0x5f0489(0x381)]=new Set();this[_0x5f0489(0x381)][_0x5f0489(0x2bd)](_0x495eca);if(!this[_0x5f0489(0x3f6)])this[_0x5f0489(0x2a2)]();}['offWindow'](_0x2cac75){const _0x453ed1=_0x5976b6;this[_0x453ed1(0x381)]?.[_0x453ed1(0x4f4)](_0x2cac75);}['_startAdmission'](){const _0x5a7193=_0x5976b6;if(this[_0x5a7193(0x565)])return;this[_0x5a7193(0x565)]=!![];!this['_h']&&(this['_h']=_0x1f6983({'resolution':0xa}),this['_h'][_0x5a7193(0x35f)]());const _0x5f089b=_0x2f761f;this[_0x5a7193(0x3e3)]=setInterval(()=>{const _0x598df9=_0x5a7193,_0x319745=this['_h'];if(!_0x319745)return;const _0x1e3877=_0x319745[_0x598df9(0xdb)](0x63)/0xf4240,_0x4001a8=_0x319745[_0x598df9(0x473)]/0xf4240,_0x48df7e=_0x319745[_0x598df9(0x311)]/0xf4240;_0x319745[_0x598df9(0x2cd)]();if(this[_0x598df9(0x381)])for(const _0x427f4c of this[_0x598df9(0x381)]){try{_0x427f4c({'p99Ms':_0x1e3877,'maxMs':_0x4001a8,'meanMs':_0x48df7e,'reportMs':_0x5f089b});}catch{}}},_0x5f089b);if(this[_0x5a7193(0x3e3)][_0x5a7193(0x326)])this[_0x5a7193(0x3e3)]['unref']();}[_0x5976b6(0x485)](){const _0xeaf67d=_0x5976b6,_0x9f0000=this['_h'],_0x1bf13b=_0x9f0000[_0xeaf67d(0x473)]/0xf4240,_0x9e6395=_0x9f0000['percentile'](0x63)/0xf4240,_0x15ac2d=_0x9f0000[_0xeaf67d(0x311)]/0xf4240;_0x9f0000[_0xeaf67d(0x2cd)]();const _0x5c07a0=[...this[_0xeaf67d(0x4c5)][_0xeaf67d(0x26f)]()][_0xeaf67d(0x1fd)](([_0x2ec1ed,_0x3bdce5])=>({'label':_0x2ec1ed,..._0x3bdce5}))[_0xeaf67d(0x3c3)]((_0x14d8f4,_0x24baba)=>_0x24baba['ms']-_0x14d8f4['ms'])[_0xeaf67d(0x5f5)](0x0,0x8);this[_0xeaf67d(0x4c5)][_0xeaf67d(0x17d)]();const _0x1f43ee=_0x5c07a0[_0xeaf67d(0x237)]((_0xe9df7c,_0x202c41)=>_0xe9df7c+_0x202c41['ms'],0x0),_0x46bec8=_0x5c07a0['map'](_0x22153e=>_0x22153e[_0xeaf67d(0x52c)]+'='+_0x22153e['ms'][_0xeaf67d(0xe3)](0x0)+_0xeaf67d(0x60e)+_0x22153e[_0xeaf67d(0x5bb)]+(_0x22153e[_0xeaf67d(0x551)]>0x5?'(worst\x20'+_0x22153e['maxMs']['toFixed'](0x0)+'ms'+(_0x22153e[_0xeaf67d(0x347)]?'\x20'+_0x22153e[_0xeaf67d(0x347)]:'')+')':''));(_0x5048ca||_0x1bf13b>=_0x1f8bc1)&&this[_0xeaf67d(0x325)](_0xeaf67d(0x256)+_0x2f761f+_0xeaf67d(0x2ee)+_0x1bf13b[_0xeaf67d(0xe3)](0x0)+'ms\x20p99='+_0x9e6395[_0xeaf67d(0xe3)](0x0)+_0xeaf67d(0x42d)+_0x15ac2d['toFixed'](0x0)+_0xeaf67d(0x4af)+_0x1f43ee[_0xeaf67d(0xe3)](0x0)+'ms'+(_0x46bec8[_0xeaf67d(0x42c)]?_0xeaf67d(0x187)+_0x46bec8[_0xeaf67d(0x4b5)]('\x20\x20'):''),{'feature':_0xeaf67d(0x51f)});if(this[_0xeaf67d(0x381)])for(const _0xd15fdc of this['_windowCbs']){try{_0xd15fdc({'p99Ms':_0x9e6395,'maxMs':_0x1bf13b,'meanMs':_0x15ac2d,'reportMs':_0x2f761f});}catch{}}}[_0x5976b6(0x46a)](){const _0x41c272=_0x5976b6;if(this[_0x41c272(0x472)])clearInterval(this[_0x41c272(0x472)]);if(this['_h'])this['_h'][_0x41c272(0x2b8)]();this[_0x41c272(0x472)]=null,this['_h']=null,this[_0x41c272(0x3f6)]=![];}}const _0xe91937=new _0x2bf2ad();if(_0xe91937['enabled'])_0xe91937[_0x5976b6(0x563)]();return okdbLoopMonitor={'LOOP':_0xe91937},okdbLoopMonitor;}var okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x439656=_0x17fdfc;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x5cf03f=require$$0,_0x4b52a0=require$$1$2,_0x24836c=require$$2,{LOOP:_0x52f518}=requireOkdbLoopMonitor(),_0xbd726f=_0x439656(0x604),_0x1899fe='node',_0x18c50e=_0x439656(0x577),_0x53d2c0=_0x439656(0x5c6),_0x548403=(_0x527c03,_0x3bb3ad)=>_0x527c03+':'+_0x3bb3ad,_0xdc19f0=(_0x1c9f72,_0x182f51)=>_0x1c9f72+'::'+_0x182f51,_0x19fdc5=(_0x1d083d,_0x31cb1d)=>_0x1d083d+'/'+_0x31cb1d,_0x5f0c3d=(_0x18f113,_0x52ae1d)=>_0x18f113+'#'+_0x52ae1d,_0x34d28f=_0x49e29f=>{const _0x3adf80=_0x439656;if(_0x49e29f?.[_0x3adf80(0x4e3)])return _0x49e29f['processKey'];const _0x560b30=_0x49e29f?.[_0x3adf80(0x186)];return typeof _0x560b30==='string'&&_0x560b30['includes']('#')?_0x560b30[_0x3adf80(0x5f5)](0x0,_0x560b30['indexOf']('#')):_0x560b30;},_0x404999=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x4a3ade=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x3438ec=_0x404999*0x3,_0x161760=['processor:progress',_0x439656(0x526),_0x439656(0x243),_0x439656(0x1d1)];let _0x53946a=null;function _0x18ce41(){const _0x28cd18=_0x439656;if(_0x53946a==null)_0x53946a=Math[_0x28cd18(0x594)]((Date[_0x28cd18(0x46e)]()-process['uptime']()*0x3e8)/0x3e8)*0x3e8;return _0x53946a;}function _0x96da74(_0x4ba3f0){const _0x2efdbb=_0x439656;if(process.env.OKDB_PROCESS_KILL===_0x2efdbb(0x4ac))return![];if(_0x4ba3f0?.[_0x2efdbb(0x525)]?.[_0x2efdbb(0x349)]&&typeof _0x4ba3f0[_0x2efdbb(0x525)][_0x2efdbb(0x349)]==='object'&&_0x4ba3f0[_0x2efdbb(0x525)][_0x2efdbb(0x349)][_0x2efdbb(0x179)]===![])return![];return!![];}function _0x1ecda6(_0x306d67,_0x1ef209){const _0x3b692b=_0x439656,_0x402699=!!_0x1ef209?.[_0x3b692b(0x47b)];switch(_0x306d67){case'primary':return{'controllable':_0x402699,'decommissionable':![],'killable':!![],'killConfirm':_0x3b692b(0x464)};case _0x3b692b(0x2ea):case _0x3b692b(0x21f):return{'controllable':_0x402699,'decommissionable':![],'killable':!![],'killConfirm':_0x3b692b(0x421)};case _0x3b692b(0x103):return{'controllable':![],'decommissionable':![],'killable':![]};case _0x3b692b(0x394):case'queue-worker':case _0x3b692b(0x27b):case _0x3b692b(0x391):return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':_0x3b692b(0x549)};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x57b356{constructor(_0x3f5a2c){const _0x55a668=_0x439656;this['okdb']=_0x3f5a2c,this[_0x55a668(0x88)]=null,this[_0x55a668(0x272)]=null,this[_0x55a668(0x1ce)]=null,this[_0x55a668(0x181)]=![],this[_0x55a668(0x295)]=![],this[_0x55a668(0x258)]=_0x18ce41(),this['_selfKey']=_0x548403(process[_0x55a668(0x4e5)],this['_processStartedAt']),this[_0x55a668(0x18c)]=_0x24836c[_0x55a668(0x2c5)]()['slice'](0x0,0x8),this[_0x55a668(0x2d8)]=_0x5f0c3d(this[_0x55a668(0x86)],this[_0x55a668(0x18c)]),this[_0x55a668(0x5d9)]=Date['now'](),this['_kind']=null,this[_0x55a668(0x52b)]=null,this[_0x55a668(0xd3)]=null,this[_0x55a668(0xb4)]=null,this[_0x55a668(0x291)]=null,this['_onTick']=null,this[_0x55a668(0xb2)]=0x0,this['_ownMeta']={},this[_0x55a668(0x506)]=new Map(),this['_lastCpuUsage']=process['cpuUsage'](),this[_0x55a668(0x3ca)]=Date[_0x55a668(0x46e)](),this[_0x55a668(0x4e9)]=0x0,this['_threadStats']=new Map();}get['selfKey'](){const _0x1b742c=_0x439656;return this[_0x1b742c(0x86)];}get[_0x439656(0x9c)](){return this['_rowKey'];}[_0x439656(0xc7)](_0x9f2e22,_0x1277ad){const _0x4880a4=_0x439656,_0x4b038e=_0x1ecda6(_0x9f2e22,_0x1277ad);if(_0x4b038e['killable']&&!_0x96da74(this[_0x4880a4(0x110)]))return{..._0x4b038e,'killable':![],'killConfirm':undefined};return _0x4b038e;}[_0x439656(0x314)](){const _0x49bf5b=_0x439656;return!!this[_0x49bf5b(0x88)];}[_0x439656(0x307)](_0x22d338){const _0xcd97f2=_0x439656;Object[_0xcd97f2(0x44d)](this[_0xcd97f2(0x42f)],_0x22d338||{});}[_0x439656(0x5f9)](_0x117dba){const _0x4611da=_0x439656;if(_0x117dba)this[_0x4611da(0xd3)]=_0x117dba;}['register'](_0x44a83c={}){const _0x2c7df1=_0x439656;return this[_0x2c7df1(0x110)][_0x2c7df1(0x4e0)](_0x44a83c);}[_0x439656(0x405)](){const _0x413596=_0x439656;let _0x2ab37a=null;const _0x49d340={};for(const _0x261b7d of this[_0x413596(0x512)]()){const _0x4be270=_0x261b7d[_0x413596(0x45e)];if(!_0x4be270)continue;if(_0x2ab37a==null)_0x2ab37a=_0x4be270[_0x413596(0x2f8)];for(const _0x540ec4 of _0x4be270[_0x413596(0x5a3)]||[]){if(![_0x413596(0x125),_0x413596(0x301),'worker','async'][_0x413596(0x580)](_0x540ec4['mode']))continue;const _0x205c3a=_0x540ec4[_0x413596(0x1d9)]||_0x413596(0x212);(_0x49d340[_0x205c3a]||=[])['push']({'type':_0x540ec4['type'],'mode':_0x540ec4[_0x413596(0x30a)],'state':_0x540ec4['state'],'lastClock':_0x540ec4[_0x413596(0x158)],'headClock':_0x540ec4['headClock'],'lag':_0x540ec4[_0x413596(0x142)]});}}return{'envs':_0x49d340,'policy':_0x2ab37a,'source':_0x413596(0x17e)};}[_0x439656(0x48f)](){const _0x7987f1=_0x439656,_0x336d2e=_0x8693f0=>{const _0x91f613=_0x240c;if(_0x8693f0[_0x91f613(0x3ff)]===_0x91f613(0x338)||_0x8693f0[_0x91f613(0x3ff)]===_0x91f613(0x172)||_0x8693f0[_0x91f613(0x3ff)]===_0x91f613(0x3b8))return 0x3;if(_0x8693f0[_0x91f613(0x159)])return 0x1;return 0x2;},_0x101084=new Map();for(const _0x3c52dd of this[_0x7987f1(0x512)]()){for(const _0xf56c6 of _0x3c52dd[_0x7987f1(0x45e)]?.[_0x7987f1(0x5a3)]||[]){const _0x457ffc={..._0xf56c6,'owner':{'pid':_0x3c52dd[_0x7987f1(0x4e5)]??null,'kind':_0x3c52dd[_0x7987f1(0x319)]??null,'host':_0x3c52dd['host']??null}},_0x41922d=_0xf56c6[_0x7987f1(0x30a)]===_0x7987f1(0x125)?_0x7987f1(0x343)+(_0xf56c6[_0x7987f1(0x1d9)]??'')+'::'+(_0xf56c6[_0x7987f1(0x5e2)]??_0xf56c6['type']??_0xf56c6['id']):_0x7987f1(0x397)+(_0x3c52dd['nodeKey']??_0x3c52dd[_0x7987f1(0x4e3)]??'')+'::'+(_0xf56c6[_0x7987f1(0x1d9)]??'')+'::'+_0xf56c6['id'],_0x2437fa=_0x101084[_0x7987f1(0x3b2)](_0x41922d);if(!_0x2437fa||_0x336d2e(_0x457ffc)>_0x336d2e(_0x2437fa))_0x101084[_0x7987f1(0xff)](_0x41922d,_0x457ffc);}}return[..._0x101084['values']()];}[_0x439656(0x356)](){const _0x3b5b7b=_0x439656,_0x2ea5ed=Date[_0x3b5b7b(0x46e)](),_0xdd965f=this[_0x3b5b7b(0x512)](),_0x2fa18a=_0x1b6389=>Math[_0x3b5b7b(0x473)](0x0,Math[_0x3b5b7b(0x594)]((_0x2ea5ed-(_0x1b6389[_0x3b5b7b(0x5de)]||_0x2ea5ed))/0x3e8)),_0x43ecbb=_0xdd965f[_0x3b5b7b(0x1fc)](_0x143604=>_0x143604[_0x3b5b7b(0x319)]===_0x3b5b7b(0x230)),_0x2a4b0f=_0xdd965f['filter'](_0xd21829=>_0xd21829[_0x3b5b7b(0x319)]===_0x3b5b7b(0x394));if(_0x43ecbb||_0x2a4b0f['length'])return{'primary':_0x43ecbb?{'pid':_0x43ecbb[_0x3b5b7b(0x4e5)],'uptime':_0x2fa18a(_0x43ecbb)}:null,'workers':_0x2a4b0f[_0x3b5b7b(0x1fd)](_0x41beb9=>({'pid':_0x41beb9['pid'],'uptime':_0x2fa18a(_0x41beb9)})),'workersConfigured':_0x43ecbb?.[_0x3b5b7b(0x208)]?.[_0x3b5b7b(0x3fc)]??_0x2a4b0f[_0x3b5b7b(0x42c)],'mode':_0x3b5b7b(0x1e4)};const _0x4dd43c=_0xdd965f['find'](_0x352ff4=>_0x352ff4[_0x3b5b7b(0x319)]==='cli'||_0x352ff4[_0x3b5b7b(0x319)]===_0x3b5b7b(0x21f)||_0x352ff4[_0x3b5b7b(0x319)]===_0x3b5b7b(0x103)),_0x8055d4=_0x4dd43c?{'pid':_0x4dd43c[_0x3b5b7b(0x4e5)],'uptime':_0x2fa18a(_0x4dd43c)}:{'pid':process[_0x3b5b7b(0x4e5)],'uptime':Math[_0x3b5b7b(0x473)](0x0,Math['round'](process['uptime']()))};return{'primary':_0x8055d4,'workers':[_0x8055d4],'workersConfigured':0x1,'mode':_0x3b5b7b(0x125)};}['nodesView'](){const _0x263b3b=_0x439656;return this[_0x263b3b(0x4be)]();}[_0x439656(0x1f0)](){const _0x11566d=_0x439656,_0x3a501b=new Map();for(const _0x270898 of this[_0x11566d(0x4be)]())_0x3a501b[_0x11566d(0xff)](_0x270898[_0x11566d(0x4e3)],{..._0x270898,'children':[]});const _0x3ac7cb=[];for(const _0x44aa8a of _0x3a501b[_0x11566d(0x41e)]()){const _0x1c130e=_0x44aa8a[_0x11566d(0x1ba)]?_0x3a501b[_0x11566d(0x3b2)](_0x44aa8a[_0x11566d(0x1ba)]):null;if(_0x1c130e&&_0x1c130e!==_0x44aa8a)_0x1c130e['children']['push'](_0x44aa8a);else _0x3ac7cb[_0x11566d(0x591)](_0x44aa8a);}const _0x3509e3=(_0x252e1b,_0x370b74)=>_0x252e1b[_0x11566d(0x319)]===_0x370b74[_0x11566d(0x319)]?(_0x252e1b[_0x11566d(0x4e5)]||0x0)-(_0x370b74[_0x11566d(0x4e5)]||0x0):(_0x252e1b[_0x11566d(0x319)]??'')<(_0x370b74[_0x11566d(0x319)]??'')?-0x1:0x1,_0x577545=_0xca9356=>{const _0xaf4d3=_0x11566d;_0xca9356['sort'](_0x3509e3);for(const _0xe349ba of _0xca9356)if(_0xe349ba[_0xaf4d3(0x475)][_0xaf4d3(0x42c)])_0x577545(_0xe349ba[_0xaf4d3(0x475)]);};return _0x577545(_0x3ac7cb),_0x3ac7cb;}[_0x439656(0xe7)](_0x4b5cf0){const _0x132e66=_0x439656;return this[_0x132e66(0x4be)]()[_0x132e66(0x1fc)](_0x144e93=>_0x144e93[_0x132e66(0x4e3)]===_0x4b5cf0)??null;}['_groupByProcess'](_0x3cf227=Date[_0x439656(0x46e)]()){const _0x5c81d8=_0x439656,_0x2a741a=new Map();for(const _0x4bb59a of this['listNodes']()){const _0x162502=_0x34d28f(_0x4bb59a);let _0x2859b4=_0x2a741a['get'](_0x162502);!_0x2859b4&&(_0x2859b4={'processKey':_0x162502,'nodeKey':_0x162502,'pid':_0x4bb59a[_0x5c81d8(0x4e5)],'ppid':_0x4bb59a[_0x5c81d8(0x344)]??null,'host':_0x4bb59a[_0x5c81d8(0x34c)]??null,'kind':_0x4bb59a[_0x5c81d8(0x319)],'role':null,'supervisorKey':_0x4bb59a[_0x5c81d8(0x1ba)]??null,'slot':_0x4bb59a[_0x5c81d8(0x18e)]??null,'slotKey':_0x4bb59a[_0x5c81d8(0x3de)]??null,'caps':_0x4bb59a[_0x5c81d8(0x176)]??null,'lifecycle':_0x4bb59a[_0x5c81d8(0x3b7)]??null,'uptime':Math[_0x5c81d8(0x473)](0x0,Math[_0x5c81d8(0x594)]((_0x3cf227-(_0x4bb59a[_0x5c81d8(0x5de)]||_0x3cf227))/0x3e8)),'startedAt':_0x4bb59a[_0x5c81d8(0x5de)]??null,'meta':_0x4bb59a[_0x5c81d8(0x208)]??null,'listenAddr':null,'processing':null,'stats':null,'instances':[]},_0x2a741a['set'](_0x162502,_0x2859b4));_0x2859b4[_0x5c81d8(0xdc)][_0x5c81d8(0x591)]({'instanceId':_0x4bb59a[_0x5c81d8(0x348)]??null,'role':_0x4bb59a['role']??null,'listenAddr':_0x4bb59a['listenAddr']??null,'lifecycle':_0x4bb59a['lifecycle']??null,'processing':_0x4bb59a[_0x5c81d8(0x45e)]??null});if(!_0x2859b4[_0x5c81d8(0x501)]&&_0x4bb59a[_0x5c81d8(0x501)])_0x2859b4[_0x5c81d8(0x501)]=_0x4bb59a[_0x5c81d8(0x501)];if(!_0x2859b4['listenAddr']&&_0x4bb59a[_0x5c81d8(0x595)])_0x2859b4['listenAddr']=_0x4bb59a[_0x5c81d8(0x595)];if(!_0x2859b4['processing']&&_0x4bb59a['processing'])_0x2859b4[_0x5c81d8(0x45e)]=_0x4bb59a['processing'];if(_0x2859b4[_0x5c81d8(0x176)]==null&&_0x4bb59a[_0x5c81d8(0x176)])_0x2859b4[_0x5c81d8(0x176)]=_0x4bb59a[_0x5c81d8(0x176)];if(_0x4bb59a[_0x5c81d8(0x360)]&&(!_0x2859b4[_0x5c81d8(0x360)]||(_0x4bb59a['stats']['at']??0x0)>(_0x2859b4['stats']['at']??0x0)))_0x2859b4[_0x5c81d8(0x360)]=_0x4bb59a[_0x5c81d8(0x360)];}return[..._0x2a741a[_0x5c81d8(0x41e)]()];}[_0x439656(0x2b0)](){const _0x5812c9=_0x439656,_0x13a393=[],_0x446307={'rss':0x0,'heapUsed':0x0,'processes':0x0};for(const _0x42698f of this[_0x5812c9(0x4be)]()){_0x13a393[_0x5812c9(0x591)]({'processKey':_0x42698f['processKey'],'kind':_0x42698f[_0x5812c9(0x319)],'pid':_0x42698f[_0x5812c9(0x4e5)],'supervisorKey':_0x42698f[_0x5812c9(0x1ba)],'meta':_0x42698f[_0x5812c9(0x208)]??null,'uptime':_0x42698f[_0x5812c9(0x1be)],'stats':_0x42698f[_0x5812c9(0x360)]??null}),_0x446307['processes']++,_0x42698f['stats']&&(_0x446307['rss']+=_0x42698f[_0x5812c9(0x360)]['rss']||0x0,_0x446307[_0x5812c9(0x3a4)]+=(_0x42698f[_0x5812c9(0x360)][_0x5812c9(0x3a4)]||0x0)+(_0x42698f['stats'][_0x5812c9(0x5b6)]?.[_0x5812c9(0x3a4)]||0x0));}return{'totals':_0x446307,'nodes':_0x13a393};}async['open']({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x5948a0=_0x439656;this['_isWriter']=this[_0x5948a0(0x181)]||!!writer,this[_0x5948a0(0x295)]=this[_0x5948a0(0x295)]||!!reader,this[_0x5948a0(0x422)]=kind||this[_0x5948a0(0x422)]||(_0x4b52a0[_0x5948a0(0x29a)]?_0x5948a0(0x394):_0x5948a0(0x2ea)),this[_0x5948a0(0x52b)]=supervisorKey??this['_supervisorKey'],this[_0x5948a0(0xd3)]=listenAddr??this[_0x5948a0(0xd3)],this[_0x5948a0(0x18b)]();if(!writer&&!reader)return null;if(!this[_0x5948a0(0x88)]){const _0x57750e=await this['okdb']['createEnvironment'](_0xbd726f,{'sync':![],'durability':_0x5948a0(0x215)});if(!_0x57750e[_0x5948a0(0x44c)](_0x1899fe))await _0x57750e['registerType'](_0x1899fe);this['_statusEnv']=_0x57750e;}return this[_0x5948a0(0x88)];}[_0x439656(0x408)](){const _0x492da7=_0x439656;return this[_0x492da7(0x4c9)]!==this['_statusEnv']&&(this[_0x492da7(0x4c9)]=this[_0x492da7(0x88)],this[_0x492da7(0x135)]=this[_0x492da7(0x88)]['_getType'](_0x1899fe)[_0x492da7(0x516)]),this[_0x492da7(0x135)];}[_0x439656(0x184)](_0x374601){const _0x1f158d=_0x439656,_0x508845=this['_nodeDb']()[_0x1f158d(0x310)](_0x374601[_0x1f158d(0x186)],_0x374601,0x1);if(_0x508845&&typeof _0x508845[_0x1f158d(0x52a)]===_0x1f158d(0x47f))_0x508845[_0x1f158d(0x52a)](undefined,()=>{});return _0x508845;}['_removeRowAsync'](_0x309665){const _0x47a3f5=_0x439656,_0x583f57=this[_0x47a3f5(0x408)]()['remove'](_0x309665);if(_0x583f57&&typeof _0x583f57[_0x47a3f5(0x52a)]===_0x47a3f5(0x47f))_0x583f57[_0x47a3f5(0x52a)](undefined,()=>{});return _0x583f57;}async['putNode'](_0x167e13){const _0xb7c372=_0x439656;if(!this[_0xb7c372(0x88)]||!this['_isWriter']||!_0x167e13?.['nodeKey'])return;return this[_0xb7c372(0x184)](_0x167e13);}async['removeNode'](_0x1c684d){const _0x5add48=_0x439656;if(!this[_0x5add48(0x88)]||!this['_isWriter']||!_0x1c684d)return;const _0xc56199=_0x1c684d[_0x5add48(0x580)]('#'),_0x902cb8=[];for(const {key:_0x333286}of this['_statusEnv'][_0x5add48(0x610)](_0x1899fe)){if(_0x333286===_0x1c684d||!_0xc56199&&typeof _0x333286===_0x5add48(0xa0)&&_0x333286[_0x5add48(0x3ad)](_0x1c684d+'#'))_0x902cb8['push'](_0x333286);}return Promise['all'](_0x902cb8[_0x5add48(0x1fd)](_0x1caf48=>this['_removeRowAsync'](_0x1caf48)));}[_0x439656(0x58f)](_0x445d33){const _0x1ef66c=_0x439656;if(typeof _0x445d33?.[_0x1ef66c(0x4e5)]!==_0x1ef66c(0x2af))return![];if(_0x445d33['host']!==_0x5cf03f[_0x1ef66c(0x2bf)]())return![];if(_0x445d33[_0x1ef66c(0x4e5)]===process[_0x1ef66c(0x4e5)])return![];try{return process[_0x1ef66c(0x179)](_0x445d33[_0x1ef66c(0x4e5)],0x0),![];}catch(_0x3a486b){return _0x3a486b['code']===_0x1ef66c(0x4f5);}}['listNodes'](){const _0x46a99e=_0x439656;if(!this['_statusEnv'])return[];const _0x22199e=Date[_0x46a99e(0x46e)](),_0x7a8af0=[];for(const {value:_0x5420ed}of this[_0x46a99e(0x88)][_0x46a99e(0x610)](_0x1899fe)){if(_0x5420ed&&(_0x5420ed[_0x46a99e(0x407)]==null||_0x5420ed['expiresAt']>=_0x22199e)&&!this[_0x46a99e(0x58f)](_0x5420ed))_0x7a8af0[_0x46a99e(0x591)](_0x5420ed);}return _0x7a8af0;}[_0x439656(0x154)](_0xfa6192=0x0){const _0x33c9d0=_0x439656;if(!this[_0x33c9d0(0x88)]||!this[_0x33c9d0(0x181)])return;const _0x54e994=Date[_0x33c9d0(0x46e)]()-_0xfa6192,_0x4323e7=new Set(),_0x3ff834=[];for(const {key:_0x2c5486,value:_0x864a1f}of this[_0x33c9d0(0x88)][_0x33c9d0(0x610)](_0x1899fe)){if(_0x864a1f&&(_0x864a1f[_0x33c9d0(0x407)]!=null&&_0x864a1f[_0x33c9d0(0x407)]<_0x54e994||this[_0x33c9d0(0x58f)](_0x864a1f)))_0x3ff834['push'](_0x2c5486);else _0x4323e7[_0x33c9d0(0x2bd)](_0x34d28f(_0x864a1f)??_0x2c5486);}for(const _0x527e86 of _0x3ff834)this['_removeRowAsync'](_0x527e86);if(this[_0x33c9d0(0x18b)]())for(const {key:_0x32e857}of this[_0x33c9d0(0x123)]('node')){if(!_0x4323e7[_0x33c9d0(0x1b4)](_0x32e857))this[_0x33c9d0(0x272)][_0x33c9d0(0x37c)]('node/'+_0x32e857);}}[_0x439656(0x3ba)](_0x435f3c=null){const _0x1fe107=_0x439656;if(this[_0x1fe107(0xb4)]||!this['_isWriter']||!this[_0x1fe107(0x88)])return;this[_0x1fe107(0x1f8)]=_0x435f3c,this['_onProcEvent']=()=>this['_maybePublish']();for(const _0x3a9f4d of _0x161760)this[_0x1fe107(0x110)][_0x1fe107(0x3ac)]['on'](_0x3a9f4d,this[_0x1fe107(0x291)]);this[_0x1fe107(0x10e)]();const _0xb1c622=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x404999;this[_0x1fe107(0xb4)]=setInterval(()=>{const _0x866396=_0x1fe107;if(this['_onTick'])try{this[_0x866396(0x1f8)]();}catch{}this[_0x866396(0x10e)](),this[_0x866396(0x154)]();},_0xb1c622);if(this['_hbTimer'][_0x1fe107(0x326)])this[_0x1fe107(0xb4)]['unref']();}['_maybePublish'](){const _0x17a423=_0x439656;if(!this[_0x17a423(0x181)]||!this[_0x17a423(0x88)])return;if(Date[_0x17a423(0x46e)]()-this[_0x17a423(0xb2)]<_0x4a3ade)return;this[_0x17a423(0x10e)]();}[_0x439656(0x10e)](){const _0x3e496f=_0x439656;if(!this[_0x3e496f(0x181)]||!this['_statusEnv'])return;this[_0x3e496f(0xb2)]=Date['now']();try{const _0x272df9=[this[_0x3e496f(0x4f3)]()];for(const _0xd576cb of this[_0x3e496f(0x506)]['values']())_0x272df9[_0x3e496f(0x591)](this[_0x3e496f(0x273)](_0xd576cb));const _0x45b740=_0x52f518[_0x3e496f(0x2d1)]?_0x52f518[_0x3e496f(0x46e)]():0x0,_0x308b59=Promise[_0x3e496f(0xec)](_0x272df9[_0x3e496f(0x1fd)](_0x1aba96=>this[_0x3e496f(0x184)](_0x1aba96)))[_0x3e496f(0x15f)](()=>{});if(_0x52f518['enabled'])_0x52f518['note'](_0x3e496f(0x2a9),_0x52f518[_0x3e496f(0x46e)]()-_0x45b740,'rows='+_0x272df9[_0x3e496f(0x42c)]);return _0x308b59;}catch{}}async[_0x439656(0x147)](){const _0x100c9e=_0x439656;if(this[_0x100c9e(0x291)]){for(const _0x519340 of _0x161760){try{this['okdb'][_0x100c9e(0x3ac)][_0x100c9e(0x4ac)](_0x519340,this[_0x100c9e(0x291)]);}catch{}}this[_0x100c9e(0x291)]=null;}this[_0x100c9e(0xb4)]&&(clearInterval(this[_0x100c9e(0xb4)]),this[_0x100c9e(0xb4)]=null);try{if(this[_0x100c9e(0x88)]&&this['_isWriter'])await this[_0x100c9e(0x5e4)](this[_0x100c9e(0x2d8)]);}catch{}}async['deregisterSelf'](){const _0x2cfb16=_0x439656;if(!this[_0x2cfb16(0x88)]||!this[_0x2cfb16(0x181)])return;try{await this[_0x2cfb16(0x5e4)](this[_0x2cfb16(0x2d8)]);}catch{}try{const _0x1a3082=[];for(const {value:_0x57afc7}of this[_0x2cfb16(0x88)][_0x2cfb16(0x610)](_0x1899fe)){if(_0x57afc7?.[_0x2cfb16(0x344)]===process[_0x2cfb16(0x4e5)]&&_0x57afc7[_0x2cfb16(0x186)])_0x1a3082['push'](_0x57afc7['nodeKey']);}for(const _0x480004 of _0x1a3082){try{await this[_0x2cfb16(0x5e4)](_0x480004);}catch{}}}catch{}}async['publishOwnRow'](){const _0x4cb653=_0x439656;return this[_0x4cb653(0x3ec)](this[_0x4cb653(0x4f3)]());}async[_0x439656(0x44b)](_0x2827a8){const _0x52f7de=_0x439656;if(!this[_0x52f7de(0x88)]||!this[_0x52f7de(0x181)])return;return this[_0x52f7de(0x3ec)](this[_0x52f7de(0x273)](_0x2827a8));}['_buildChildRow']({pid:_0x398c8b,startedAt:_0xbaed44,kind:_0x249c13,supervisorKey:_0x471d38,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0x439656(0x287),meta:meta=null,stats:stats=null}){const _0x13dc8c=_0x439656,_0x53c0e0=Date['now'](),_0x32c850=_0x548403(_0x398c8b,_0xbaed44);return{'nodeKey':_0x5f0c3d(_0x32c850,'0'),'processKey':_0x32c850,'instanceId':'0','pid':_0x398c8b,'startedAt':_0xbaed44,'ppid':process['pid'],'host':_0x5cf03f[_0x13dc8c(0x2bf)](),'supervisorKey':_0x471d38,'slot':slot,'slotKey':slotKey,'kind':_0x249c13,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x53c0e0,'expiresAt':_0x53c0e0+_0x3438ec,'caps':this['_caps'](_0x249c13,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async['addSupervisedChild'](_0x5b5793){const _0x4c6e57=_0x439656;if(!_0x5b5793?.['pid'])return null;const _0x39375b=_0x548403(_0x5b5793[_0x4c6e57(0x4e5)],_0x5b5793[_0x4c6e57(0x5de)]);this['_children'][_0x4c6e57(0xff)](_0x39375b,{..._0x5b5793,'supervisorKey':_0x5b5793[_0x4c6e57(0x1ba)]??this[_0x4c6e57(0x86)]});if(this[_0x4c6e57(0x181)])await this[_0x4c6e57(0x44b)](this[_0x4c6e57(0x506)]['get'](_0x39375b))[_0x4c6e57(0x15f)]?.(()=>{});return _0x39375b;}[_0x439656(0x373)](_0x2e1cd9){if(!_0x2e1cd9)return;return this['_children']['delete'](_0x2e1cd9),this['removeNode'](_0x2e1cd9);}[_0x439656(0xbf)](){const _0x1fed48=_0x439656,_0x6f6e42=Date[_0x1fed48(0x46e)](),_0x90fdbd=process[_0x1fed48(0x52f)](),_0x3c93f5=(_0x6f6e42-this[_0x1fed48(0x3ca)])*0x3e8;if(_0x3c93f5>=0x3d090){const _0x2a8bf5=_0x90fdbd['user']-this[_0x1fed48(0xc9)][_0x1fed48(0x2ce)]+(_0x90fdbd['system']-this[_0x1fed48(0xc9)][_0x1fed48(0x509)]),_0x4876fb=_0x5cf03f[_0x1fed48(0x336)]()[_0x1fed48(0x42c)]||0x1;this[_0x1fed48(0x4e9)]=Math['min'](0x64,Math[_0x1fed48(0x594)](_0x2a8bf5/(_0x3c93f5*_0x4876fb)*0x64)),this[_0x1fed48(0x58c)]=Math['round'](_0x3c93f5/0x3e8),this[_0x1fed48(0xc9)]=_0x90fdbd,this[_0x1fed48(0x3ca)]=_0x6f6e42;}const _0x2022c2=process[_0x1fed48(0x30e)]();let _0x259aa9=null;if(this['_threadStats'][_0x1fed48(0x38f)]>0x0){let _0x60663f=0x0;for(const _0x3c5348 of this[_0x1fed48(0x548)][_0x1fed48(0x41e)]())_0x60663f+=_0x3c5348[_0x1fed48(0x3a4)]||0x0;_0x259aa9={'count':this[_0x1fed48(0x548)][_0x1fed48(0x38f)],'heapUsed':_0x60663f};}return{'rss':_0x2022c2[_0x1fed48(0x34b)],'heapUsed':_0x2022c2[_0x1fed48(0x3a4)],'heapTotal':_0x2022c2[_0x1fed48(0x13d)],'external':_0x2022c2[_0x1fed48(0x3e5)],'cpuPct':this[_0x1fed48(0x4e9)],'cpuWindowMs':this[_0x1fed48(0x58c)]??null,'threads':_0x259aa9,'at':_0x6f6e42};}['reportThreadStats'](_0x12d743,_0xab20ed){const _0x2fbda3=_0x439656;if(!_0x12d743||!_0xab20ed)return;this['_threadStats'][_0x2fbda3(0xff)](_0x12d743,_0xab20ed);}[_0x439656(0x138)](_0x154e23){const _0x30af8f=_0x439656;this[_0x30af8f(0x548)]['delete'](_0x154e23);}[_0x439656(0x233)](_0x2fbf12,_0x3a27a4,_0x6a8348=undefined){const _0x45d0c5=_0x439656,_0x2f8b1d=this[_0x45d0c5(0x506)][_0x45d0c5(0x3b2)](_0x2fbf12);if(!_0x2f8b1d||!_0x3a27a4)return;if(_0x6a8348!==undefined)_0x2f8b1d[_0x45d0c5(0x45e)]=_0x6a8348;_0x2f8b1d[_0x45d0c5(0x360)]={'rss':_0x3a27a4['rss']??null,'heapUsed':_0x3a27a4['heapUsed']??null,'heapTotal':_0x3a27a4[_0x45d0c5(0x13d)]??null,'external':_0x3a27a4[_0x45d0c5(0x3e5)]??null,'cpuPct':_0x3a27a4[_0x45d0c5(0x459)]??null,'cpuWindowMs':_0x3a27a4[_0x45d0c5(0x449)]??null,'threads':_0x3a27a4['threads']??null,'claims':_0x3a27a4[_0x45d0c5(0x19d)]??null,'envsOpen':_0x3a27a4[_0x45d0c5(0x4b6)]??null,'at':Date['now']()};}['_buildOwnRow'](){const _0x1bac45=_0x439656,_0xf1d7f0=Date['now'](),_0x3dea4b=this[_0x1bac45(0x110)][_0x1bac45(0x331)]||{},_0x3f34df=this[_0x1bac45(0x422)]||'cli';return{'nodeKey':this[_0x1bac45(0x2d8)],'processKey':this['_selfKey'],'instanceId':this[_0x1bac45(0x18c)],'pid':process[_0x1bac45(0x4e5)],'startedAt':this[_0x1bac45(0x258)],'instanceStartedAt':this[_0x1bac45(0x5d9)],'ppid':typeof process[_0x1bac45(0x344)]==='number'?process[_0x1bac45(0x344)]:null,'host':_0x5cf03f['hostname'](),'supervisorKey':this[_0x1bac45(0x52b)]??null,'kind':_0x3f34df,'role':{'engines':!!_0x3dea4b[_0x1bac45(0x553)],'asyncProcessors':!!_0x3dea4b['asyncProcessors'],'compaction':_0x3dea4b[_0x1bac45(0x24b)],'http':_0x3dea4b[_0x1bac45(0x19e)]},'listenAddr':this[_0x1bac45(0xd3)]??null,'heartbeatAt':_0xf1d7f0,'expiresAt':_0xf1d7f0+_0x3438ec,'caps':this[_0x1bac45(0xc7)](_0x3f34df,_0x3dea4b),'lifecycle':{'state':'running','desiredVersionApplied':null},'meta':{...this[_0x1bac45(0x42f)]},'processing':_0x3dea4b[_0x1bac45(0x47b)]?this[_0x1bac45(0xea)]():null,'stats':this[_0x1bac45(0xbf)]()};}[_0x439656(0xea)](){const _0x56c27c=_0x439656,_0x5c6c12=[];try{for(const [_0x1a4f4c,_0x33d67b]of this[_0x56c27c(0x110)][_0x56c27c(0x5d0)]){if(_0x1a4f4c['startsWith']('~'))continue;for(const _0x1504fb of _0x33d67b[_0x56c27c(0x558)][_0x56c27c(0x55e)]())_0x5c6c12[_0x56c27c(0x591)]({..._0x1504fb,'env':_0x1a4f4c});}}catch{}return{'policy':this['okdb'][_0x56c27c(0x5f0)]??null,'processors':_0x5c6c12};}[_0x439656(0x18b)](){const _0x204df0=_0x439656;if(this[_0x204df0(0x272)])return!![];const _0x3d6436=this[_0x204df0(0x110)][_0x204df0(0x1e8)];if(!_0x3d6436)return![];return this[_0x204df0(0x272)]=_0x3d6436[_0x204df0(0x46d)](_0x18c50e,{'dupSort':![]}),this[_0x204df0(0x1ce)]=_0x3d6436[_0x204df0(0x46d)](_0x53d2c0,{'dupSort':![]}),!![];}[_0x439656(0x601)](){const _0x5ba51d=_0x439656;return!!this[_0x5ba51d(0x272)];}[_0x439656(0x4ca)](_0x18244f,_0x5cae3b){const _0x558565=_0x439656;if(!this[_0x558565(0x18b)]())return null;return this[_0x558565(0x272)][_0x558565(0x3b2)](_0x18244f+'/'+_0x5cae3b)??null;}['setDesired'](_0xea32dd,_0x52c270,_0x22d2a1){const _0x3c74b0=_0x439656;if(!this[_0x3c74b0(0x18b)]())return null;const _0x4988ce=_0xea32dd+'/'+_0x52c270;let _0x34910e;return this[_0x3c74b0(0x272)][_0x3c74b0(0x392)](()=>{const _0x38f572=_0x3c74b0,_0x26d524=this[_0x38f572(0x272)]['get'](_0x4988ce)||{'version':0x0};_0x34910e=(_0x26d524['version']||0x0)+0x1,this['_desired']['put'](_0x4988ce,{..._0x26d524,..._0x22d2a1,'version':_0x34910e,'updatedAt':Date[_0x38f572(0x46e)]()});}),_0x34910e;}['listDesired'](_0x3a7bb1){const _0x260e44=_0x439656;if(!this[_0x260e44(0x18b)]())return[];const _0x418b21=_0x3a7bb1+'/',_0x3a1e0a=[];for(const {key:_0x31efe5,value:_0x2ca78f}of this['_desired'][_0x260e44(0x610)]({'start':_0x418b21,'end':_0x418b21+'ÿ'})){if(typeof _0x31efe5!=='string'||!_0x31efe5['startsWith'](_0x418b21))break;_0x3a1e0a['push']({'key':_0x31efe5['slice'](_0x418b21[_0x260e44(0x42c)]),'value':_0x2ca78f});}return _0x3a1e0a;}[_0x439656(0x477)](_0x2b1e3d){const _0x492d2c=_0x439656;if(!this[_0x492d2c(0x18b)]())return null;return this[_0x492d2c(0x1ce)]['get'](_0x2b1e3d)??null;}[_0x439656(0x18d)](_0x1b7d8f,_0x4eb54f,_0x1c060b={}){const _0x56e7ae=_0x439656;if(!this[_0x56e7ae(0x18b)]())return null;let _0x125c5e;return this[_0x56e7ae(0x1ce)]['transactionSync'](()=>{const _0x4841ec=_0x56e7ae,_0x144b1c=this[_0x4841ec(0x1ce)][_0x4841ec(0x3b2)](_0x1b7d8f)||{'epoch':0x0};_0x125c5e=(_0x144b1c[_0x4841ec(0x3d2)]||0x0)+0x1,this[_0x4841ec(0x1ce)][_0x4841ec(0x310)](_0x1b7d8f,{..._0x144b1c,..._0x1c060b,'cmd':_0x4eb54f,'epoch':_0x125c5e,'updatedAt':Date['now']()});}),_0x125c5e;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x57b356,'nodeKey':_0x548403,'logicalKey':_0xdc19f0,'slotKey':_0x19fdc5,'PROCESS_ENV':_0xbd726f,'NODE_TYPE':_0x1899fe},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x37d6d7=_0x17fdfc;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x3d9793=require$$0$4,{EVENTS:_0x1f6147,CHANGE_ACTIONS:_0x546f56}=requireOkdbEnums(),{LOOP:_0x443ed4}=requireOkdbLoopMonitor(),_0x3f48cf=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x332501=0x5,_0x677cc4=0x2710;class _0x175934 extends _0x3d9793{constructor(_0x28ee5d,_0x3f8fdf={}){const _0x20dd53=_0x240c;super(),this[_0x20dd53(0x110)]=_0x28ee5d,this[_0x20dd53(0x514)]=_0x3f8fdf[_0x20dd53(0x16a)]??_0x3f48cf,this['_flushDebounce']=_0x3f8fdf[_0x20dd53(0x4b0)]??_0x332501,this[_0x20dd53(0x9b)]=_0x3f8fdf['dedupeMax']??_0x677cc4,this[_0x20dd53(0x3f6)]=![],this[_0x20dd53(0x24e)]=new Map(),this['_baselines']=new Map(),this['_pending']=new Map(),this['_flushTimer']=null,this[_0x20dd53(0x221)]=![],this[_0x20dd53(0x2b3)]=new Set(),this[_0x20dd53(0xee)]=_0x20751b=>this[_0x20dd53(0x131)](_0x20751b),this[_0x20dd53(0x39e)]=_0x34a2ef=>this['_handlePoke'](_0x34a2ef),this[_0x20dd53(0x4a0)]=()=>this[_0x20dd53(0x46a)]();}[_0x37d6d7(0x563)](){const _0x25c087=_0x37d6d7;if(this['_started'])return;this[_0x25c087(0x3f6)]=!![];for(const [_0x3fd13b,_0x1ff071]of this[_0x25c087(0x110)]['_envs']){if(_0x3fd13b[_0x25c087(0x3ad)]('~'))continue;try{this[_0x25c087(0x54d)][_0x25c087(0xff)](_0x3fd13b,_0x1ff071['getClock']()||0x0);}catch{}}const {events:_0x380021}=this[_0x25c087(0x110)];_0x380021['on'](_0x1f6147[_0x25c087(0x58e)],this['_onItem']),_0x380021['on'](_0x1f6147['ITEM_UPDATE'],this[_0x25c087(0xee)]),_0x380021['on'](_0x1f6147['ITEM_REMOVE'],this[_0x25c087(0xee)]),_0x380021['on'](_0x1f6147[_0x25c087(0x58a)],this[_0x25c087(0x39e)]),_0x380021[_0x25c087(0x2e6)](_0x1f6147[_0x25c087(0x49e)],this[_0x25c087(0x4a0)]);}['stop'](){const _0x5aa29d=_0x37d6d7;if(!this[_0x5aa29d(0x3f6)])return;this['_started']=![];const {events:_0xeeb126}=this['okdb'];_0xeeb126[_0x5aa29d(0x4ac)](_0x1f6147['ITEM_CREATE'],this[_0x5aa29d(0xee)]),_0xeeb126[_0x5aa29d(0x4ac)](_0x1f6147[_0x5aa29d(0x482)],this[_0x5aa29d(0xee)]),_0xeeb126['off'](_0x1f6147['ITEM_REMOVE'],this['_onItem']),_0xeeb126[_0x5aa29d(0x4ac)](_0x1f6147['SYSTEM_POKE'],this['_onPoke']);try{_0xeeb126[_0x5aa29d(0x4ac)](_0x1f6147[_0x5aa29d(0x49e)],this['_onStop']);}catch{}this[_0x5aa29d(0x5be)]&&(clearTimeout(this['_flushTimer']),this['_flushTimer']=null),this[_0x5aa29d(0x357)][_0x5aa29d(0x17d)](),this['_cursors'][_0x5aa29d(0x17d)](),this[_0x5aa29d(0x54d)][_0x5aa29d(0x17d)](),this[_0x5aa29d(0x2b3)][_0x5aa29d(0x17d)]();}[_0x37d6d7(0x5b5)](_0xd6954d,_0xe730e5,_0x3c340e,_0x39afec){return _0xd6954d+'\x00'+_0xe730e5+'\x00'+_0x3c340e+'\x00'+_0x39afec;}[_0x37d6d7(0x367)](_0x1d36a4,_0x5a79c7,_0xd9bec,_0x151f25){const _0x4df298=_0x37d6d7,_0x5472ff=this['_dedupeKey'](_0x1d36a4,_0x5a79c7,_0xd9bec,_0x151f25);if(this['_seen'][_0x4df298(0x1b4)](_0x5472ff))return![];this[_0x4df298(0x2b3)][_0x4df298(0x2bd)](_0x5472ff);if(this['_seen'][_0x4df298(0x38f)]>this[_0x4df298(0x9b)]){const _0x3893ef=this[_0x4df298(0x2b3)][_0x4df298(0x41e)]()[_0x4df298(0x4fd)]()[_0x4df298(0x268)];this[_0x4df298(0x2b3)][_0x4df298(0x4f4)](_0x3893ef);}return!![];}[_0x37d6d7(0x131)](_0x557454){const _0x4ca322=_0x37d6d7;if(!this['_started']||!_0x557454)return;const {env:_0x78e25,type:_0x54702f,key:_0x49bd82,clock:_0x82480b,origin:_0x1711ec,action:_0x318928,newValue:_0x2d5536,oldValue:_0x52e91b}=_0x557454;if(_0x78e25==null||_0x54702f==null||_0x49bd82==null)return;if(typeof _0x78e25===_0x4ca322(0xa0)&&_0x78e25[_0x4ca322(0x3ad)]('~'))return;if(typeof _0x54702f===_0x4ca322(0xa0)&&_0x54702f[_0x4ca322(0x3ad)]('~'))return;if(!this[_0x4ca322(0x367)](_0x78e25,_0x54702f,_0x49bd82,_0x82480b))return;const _0x4483ba=_0x318928===_0x546f56[_0x4ca322(0x50b)]?_0x4ca322(0x1cb):'put';this[_0x4ca322(0x23f)]('change',{'env':_0x78e25,'type':_0x54702f,'key':_0x49bd82,'op':_0x4483ba,'clock':_0x82480b,'origin':_0x1711ec,'value':_0x4483ba===_0x4ca322(0x1cb)?null:_0x2d5536,'prevValue':_0x52e91b});}[_0x37d6d7(0x2c7)](_0x233365){const _0x34af3e=_0x37d6d7;if(!this[_0x34af3e(0x3f6)])return;if(!_0x233365||typeof _0x233365[_0x34af3e(0x1d9)]!==_0x34af3e(0xa0)||typeof _0x233365[_0x34af3e(0x191)]!==_0x34af3e(0xa0))return;const {env:_0x2a2433,type:_0x7fb4c3}=_0x233365;if(_0x2a2433[_0x34af3e(0x3ad)]('~')||_0x7fb4c3[_0x34af3e(0x3ad)]('~'))return;this['_pending'][_0x34af3e(0xff)](_0x2a2433+'\x00'+_0x7fb4c3,{'env':_0x2a2433,'type':_0x7fb4c3}),this[_0x34af3e(0x2c6)]();}[_0x37d6d7(0x2c6)](){const _0x316d67=_0x37d6d7;if(this['_flushTimer'])return;const _0x4c14cb=()=>{const _0x52208a=_0x240c;this[_0x52208a(0x5be)]=null,this[_0x52208a(0x2ad)]()[_0x52208a(0x15f)](()=>{});};this[_0x316d67(0x5be)]=setTimeout(_0x4c14cb,this[_0x316d67(0x354)]>0x0?this['_flushDebounce']:0x0);}async['_drain'](){const _0x70d70=_0x37d6d7;if(this['_draining']){this[_0x70d70(0x2c6)]();return;}this[_0x70d70(0x221)]=!![];try{const _0x4638d0=[...this[_0x70d70(0x357)]['values']()];this[_0x70d70(0x357)]['clear']();let _0x4ea26d=![];for(const {env:_0x5e9046,type:_0x580dfe}of _0x4638d0){try{const _0x9aba6a=await this[_0x70d70(0x419)](_0x5e9046,_0x580dfe);if(_0x9aba6a)_0x4ea26d=!![];}catch{this[_0x70d70(0x357)][_0x70d70(0xff)](_0x5e9046+'\x00'+_0x580dfe,{'env':_0x5e9046,'type':_0x580dfe}),_0x4ea26d=!![];}}if(_0x4ea26d||this['_pending'][_0x70d70(0x38f)]>0x0)this[_0x70d70(0x2c6)]();}finally{this[_0x70d70(0x221)]=![];}}async['_drainOne'](_0x3cbb2e,_0x1c9917){const _0x2b82e6=_0x37d6d7,_0xefebb2=await this[_0x2b82e6(0x110)][_0x2b82e6(0x54b)](_0x3cbb2e),_0x533676=_0x3cbb2e+'\x00'+_0x1c9917;!this[_0x2b82e6(0x24e)][_0x2b82e6(0x1b4)](_0x533676)&&(!this[_0x2b82e6(0x54d)][_0x2b82e6(0x1b4)](_0x3cbb2e)&&this[_0x2b82e6(0x54d)][_0x2b82e6(0xff)](_0x3cbb2e,_0xefebb2[_0x2b82e6(0x330)]()||0x0),this['_cursors'][_0x2b82e6(0xff)](_0x533676,this[_0x2b82e6(0x54d)]['get'](_0x3cbb2e)));const _0x4aa294=this[_0x2b82e6(0x24e)][_0x2b82e6(0x3b2)](_0x533676),_0x360696=_0xefebb2[_0x2b82e6(0x330)](_0x1c9917)||0x0;if(_0x360696<=_0x4aa294)return![];const _0x330b40=_0x4aa294+this[_0x2b82e6(0x514)],_0x3411c7=Math[_0x2b82e6(0x579)](_0x360696,_0x330b40),_0x17e8e4=_0x443ed4[_0x2b82e6(0x2d1)]?_0x443ed4[_0x2b82e6(0x46e)]():0x0,_0x393f91=Array[_0x2b82e6(0x294)](_0xefebb2[_0x2b82e6(0x130)](_0x1c9917,_0x4aa294+0x1,_0x3411c7));let _0x2363f2=_0x4aa294;for(const _0x2f3c8d of _0x393f91){const {clock:_0x2ee220,key:_0x3af2e5,action:_0xf19c62,origin:_0x221aa1}=_0x2f3c8d;if(_0x2ee220>_0x2363f2)_0x2363f2=_0x2ee220;if(_0x3af2e5==null)continue;if(!this[_0x2b82e6(0x367)](_0x3cbb2e,_0x1c9917,_0x3af2e5,_0x2ee220))continue;let _0x587e06,_0x5b0a6e;if(_0xf19c62===_0x546f56[_0x2b82e6(0x50b)])_0x587e06=_0x2b82e6(0x1cb),_0x5b0a6e=null;else{const _0x4890ec=_0xefebb2[_0x2b82e6(0x3b2)](_0x1c9917,_0x3af2e5);_0x4890ec==null?(_0x587e06='remove',_0x5b0a6e=null):(_0x587e06='put',_0x5b0a6e=_0x4890ec);}this[_0x2b82e6(0x23f)]('change',{'env':_0x3cbb2e,'type':_0x1c9917,'key':_0x3af2e5,'op':_0x587e06,'clock':_0x2ee220,'origin':_0x221aa1,'value':_0x5b0a6e});}if(_0x443ed4[_0x2b82e6(0x2d1)])_0x443ed4[_0x2b82e6(0x5c1)](_0x2b82e6(0x609)+_0x3cbb2e+':'+_0x1c9917,_0x443ed4[_0x2b82e6(0x46e)]()-_0x17e8e4,'n='+_0x393f91[_0x2b82e6(0x42c)]);return this['_cursors'][_0x2b82e6(0xff)](_0x533676,Math[_0x2b82e6(0x473)](_0x2363f2,_0x3411c7)),_0xefebb2[_0x2b82e6(0x330)](_0x1c9917)>_0x3411c7;}[_0x37d6d7(0x1fe)](){const _0x3289a7=_0x37d6d7;return{'started':this[_0x3289a7(0x3f6)],'quantum':this[_0x3289a7(0x514)],'flushDebounce':this[_0x3289a7(0x354)],'cursors':Object['fromEntries']([...this[_0x3289a7(0x24e)]['entries']()][_0x3289a7(0x1fd)](([_0xf57679,_0x3f36d1])=>[_0xf57679['replace']('\x00',':'),_0x3f36d1])),'pending':this[_0x3289a7(0x357)][_0x3289a7(0x38f)],'seen':this[_0x3289a7(0x2b3)][_0x3289a7(0x38f)]};}}return _0x175934['CHANGEFEED_QUANTUM']=_0x3f48cf,okdbChangefeed={'OKDBChangefeed':_0x175934},okdbChangefeed;}function _0x240c(_0x52bdc8,_0x24d9e2){_0x52bdc8=_0x52bdc8-0x7b;const _0x4d9694=_0x4d96();let _0x240c4b=_0x4d9694[_0x52bdc8];return _0x240c4b;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x5b94d6=_0x17fdfc;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x1f146e=require$$1$2,_0x266e85=require$$1,{EVENTS:_0x1118a2}=requireOkdbEnums(),_0x184548=require$$0,{slotKey:_0x406980}=requireOkdbProcessRegistry(),_0x4b7c73=0xfa,_0x3f2064=0xfa0,_0x39bcf7=0x5,_0x1beff7=0x2710,_0x180cf0=0xbb8,_0x2bfdb4=0x7d0,_0x1d176e='__okdbCluster',_0x3b7366=_0x5b94d6(0x1f2),_0x2fd196=_0x5b94d6(0x5f4),_0x4adf8f=_0x5b94d6(0x360),_0x4f2453=[_0x1118a2['VIEW_PROGRESS'],_0x1118a2[_0x5b94d6(0x3fe)],_0x1118a2[_0x5b94d6(0x20a)],_0x1118a2[_0x5b94d6(0x26a)],_0x1118a2[_0x5b94d6(0x402)],_0x1118a2['INDEX_READY'],_0x1118a2[_0x5b94d6(0x201)],_0x1118a2[_0x5b94d6(0x1fb)],_0x5b94d6(0x526),'processor:progress',_0x5b94d6(0x1d1),_0x5b94d6(0x4ef),_0x5b94d6(0x599),'processor:retry'],_0x1d64fb=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0;function _0x4a7f3b({workers:_0x3610fa,makeOkdb:_0x24fb81,port:_0x3a6a2e,primaryOkdb:_0x990fea,childEntry:childEntry=![],workerEnv:workerEnv=null}={}){const _0x5d177c=_0x5b94d6;if(_0x1f146e[_0x5d177c(0x23e)])return childEntry&&_0x1f146e[_0x5d177c(0x503)]({'exec':_0x266e85['join'](__dirname,_0x5d177c(0x49b)),'args':[],'execArgv':((()=>{const _0x4c7471=_0x5d177c,_0x38e80f=[];for(let _0x23708a=0x0;_0x23708a<process['execArgv'][_0x4c7471(0x42c)];_0x23708a++){const _0x173ab1=process[_0x4c7471(0x3b3)][_0x23708a];if(_0x173ab1[_0x4c7471(0x3ad)](_0x4c7471(0x451))||_0x173ab1['startsWith'](_0x4c7471(0x564))||_0x173ab1[_0x4c7471(0x3ad)](_0x4c7471(0xe5)))continue;if(_0x173ab1==='-e'||_0x173ab1===_0x4c7471(0x2dd)||_0x173ab1==='-p'||_0x173ab1==='--print'){_0x23708a++;continue;}_0x38e80f[_0x4c7471(0x591)](_0x173ab1);}return _0x38e80f;})())}),_0x1b3042({'workers':_0x3610fa,'port':_0x3a6a2e,'primaryOkdb':_0x990fea,'workerEnv':workerEnv});return _0x41affe({'makeOkdb':_0x24fb81,'port':_0x3a6a2e});}function _0x1b3042({workers:_0x54cc0a,port:_0x50890f,primaryOkdb:_0x2d4887,workerEnv:_0x3e867f}){const _0x592d55=_0x5b94d6,_0x5de081=new Map(),_0x3f73b7=new Map();let _0x966c4a=![];const _0x4492bd=_0x17f867=>_0x17f867?.[_0x592d55(0x376)],_0xd79fd7=_0x2f1081=>{const _0x1e01cd=_0x592d55,_0x5185b1=_0x1f146e['fork']({...process.env,..._0x3e867f||{},'OKDB_CLUSTER_SLOT':String(_0x2f1081)});return _0x5185b1['__okdbSlot']=_0x2f1081,_0x5de081['set'](_0x5185b1[_0x1e01cd(0x3d8)][_0x1e01cd(0x4e5)],{'worker':_0x5185b1,'startedAt':Date[_0x1e01cd(0x46e)](),'slot':_0x2f1081}),_0x5185b1['on'](_0x1e01cd(0x3b8),_0x58e38f=>{const _0x2b3a80=_0x1e01cd;console[_0x2b3a80(0x5f4)]('[okdb-cluster]\x20worker\x20pid='+_0x5185b1[_0x2b3a80(0x3d8)][_0x2b3a80(0x4e5)]+_0x2b3a80(0x468)+(_0x58e38f?.[_0x2b3a80(0x491)]??_0x58e38f));}),_0x5185b1['on'](_0x1e01cd(0x338),()=>_0xbd2507()),_0x5185b1;},_0x5879f1=_0x3d54e2=>{const _0x33793b=_0x592d55;for(const {worker:_0xbff1bd}of _0x5de081[_0x33793b(0x41e)]()){if(_0xbff1bd[_0x33793b(0x4cb)]()||!_0xbff1bd['isConnected']())continue;try{_0xbff1bd[_0x33793b(0x4ec)](_0x3d54e2);}catch{}}};_0x2d4887?.[_0x592d55(0x4e0)]?.({'kind':_0x592d55(0x230),'listenAddr':':'+_0x50890f})[_0x592d55(0x15f)](()=>{}),_0x2d4887?.[_0x592d55(0x349)]?.[_0x592d55(0x307)]?.({'workersConfigured':_0x54cc0a});const _0xe66496={'engines':![],'asyncProcessors':![],'compaction':_0x592d55(0x241),'http':!![]},_0xbd2507=()=>{const _0x452826=_0x592d55,_0x3139d2=_0x2d4887?.[_0x452826(0x349)];if(!_0x3139d2||!_0x3139d2[_0x452826(0x181)])return;const _0x4d6ab7=_0x3139d2[_0x452826(0x3a8)];for(const {worker:_0x3474df,startedAt:_0x1e1a25,slot:_0x1fa6d4,stats:_0x4b7c3f}of _0x5de081['values']()){if(_0x3474df[_0x452826(0x4cb)]())continue;const _0x475350=_0x3139d2[_0x452826(0x601)]?.()&&_0x3139d2[_0x452826(0x4ca)](_0x452826(0x18e),_0x2fda18(_0x1fa6d4))?.[_0x452826(0x5dd)]===!![];_0x3139d2[_0x452826(0x44b)]({'pid':_0x3474df['process'][_0x452826(0x4e5)],'startedAt':_0x1e1a25,'kind':'http-server','supervisorKey':_0x4d6ab7,'slot':_0x1fa6d4,'slotKey':_0x2fda18(_0x1fa6d4),'role':_0xe66496,'listenAddr':':'+_0x50890f,'lifecycle':_0x475350?_0x452826(0x598):'running','stats':_0x4b7c3f??null})[_0x452826(0x15f)](()=>{});}},_0x2fda18=_0x4765e6=>_0x406980(_0x592d55(0x174)+_0x50890f,_0x4765e6),_0x4b9d75=_0x151394=>{const _0x5cf0ab=_0x592d55,_0x3b7915=_0x2d4887?.[_0x5cf0ab(0x349)];if(!_0x3b7915?.['hasDesired']?.())return![];return _0x3b7915['getDesired'](_0x5cf0ab(0x18e),_0x2fda18(_0x151394))?.[_0x5cf0ab(0x5dd)]===!![];};for(let _0x244466=0x0;_0x244466<_0x54cc0a;_0x244466++){const _0x48314c=_0x4b9d75(_0x244466);_0x3f73b7[_0x592d55(0xff)](_0x244466,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x48314c,'respawnTimer':null}),_0x48314c?console['log'](_0x592d55(0x1cd)+_0x244466+'\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)'):_0xd79fd7(_0x244466);}const _0x458902=()=>{const _0x7a24f4=_0x592d55,_0x575459=_0x2d4887?.['processes'];if(!_0x575459?.['_isWriter']||!_0x575459[_0x7a24f4(0x601)]?.())return;for(const [_0x486346,_0x11065d]of _0x3f73b7[_0x7a24f4(0x26f)]()){const _0x502bc4=_0x575459[_0x7a24f4(0x4ca)](_0x7a24f4(0x18e),_0x2fda18(_0x486346)),_0x11c092=_0x502bc4?.[_0x7a24f4(0x5dd)]===!![],_0x2895bb=_0x502bc4?.[_0x7a24f4(0x179)]===!![];if(_0x11c092&&!_0x11065d[_0x7a24f4(0x443)]){_0x11065d[_0x7a24f4(0x443)]=!![];_0x11065d[_0x7a24f4(0x28b)]&&(clearTimeout(_0x11065d[_0x7a24f4(0x28b)]),_0x11065d[_0x7a24f4(0x28b)]=null);for(const {worker:_0x1f05ad}of _0x5de081[_0x7a24f4(0x41e)]()){if(_0x4492bd(_0x1f05ad)!==_0x486346||_0x1f05ad[_0x7a24f4(0x4cb)]())continue;try{if(_0x2895bb)_0x1f05ad['process'][_0x7a24f4(0x179)]('SIGKILL');else _0x1f05ad[_0x7a24f4(0x27f)]()&&_0x1f05ad[_0x7a24f4(0x1a0)]();}catch{}}console[_0x7a24f4(0x5f4)](_0x7a24f4(0x5bc)+(_0x2895bb?_0x7a24f4(0x11a):_0x7a24f4(0x15a))+_0x7a24f4(0x96)+_0x486346+_0x7a24f4(0x4dd));}else{if(!_0x11c092&&_0x11065d[_0x7a24f4(0x443)]&&_0x502bc4){_0x11065d[_0x7a24f4(0x443)]=![],_0x11065d[_0x7a24f4(0x33b)]=[],_0x11065d['consecutiveFailures']=0x0;const _0x5655ff=[..._0x5de081[_0x7a24f4(0x41e)]()]['some'](({worker:_0x475e02})=>_0x4492bd(_0x475e02)===_0x486346&&!_0x475e02['isDead']());!_0x5655ff&&!_0x966c4a&&(_0xd79fd7(_0x486346),console[_0x7a24f4(0x5f4)]('[okdb-cluster]\x20recommissioned\x20worker\x20slot='+_0x486346));}}}},_0x3fdbff=()=>{try{_0x458902();}catch{}};_0x2d4887?.[_0x592d55(0x3ac)]?.['on']?.(_0x1118a2[_0x592d55(0x59b)],_0x3fdbff);const _0xfc054f=[];if(_0x2d4887?.[_0x592d55(0x3ac)]?.['on'])for(const _0x4d712a of _0x4f2453){const _0x578e79=_0x3723f1=>{_0x5879f1({[_0x1d176e]:_0x3b7366,'event':_0x4d712a,'data':_0x3723f1??{}});};_0x2d4887[_0x592d55(0x3ac)]['on'](_0x4d712a,_0x578e79),_0xfc054f[_0x592d55(0x591)]({'event':_0x4d712a,'handler':_0x578e79});}const _0x1bcff5=setInterval(()=>{_0x458902(),_0xbd2507();},_0x1d64fb);_0x1bcff5[_0x592d55(0x326)]?.();const _0x5af0f3=(_0x187574,_0x188999)=>{const _0x39caaf=_0x592d55;if(!_0x188999||typeof _0x188999!==_0x39caaf(0x257)||_0x188999[_0x1d176e]!==_0x2fd196)return;if(!_0x2d4887?.['log']?.[_0x39caaf(0x29d)])return;const _0x441339=_0x188999['entry']||{};_0x2d4887[_0x39caaf(0x5f4)][_0x39caaf(0x29d)]({..._0x441339,'msg':'[w'+_0x188999['slot']+']\x20'+(_0x441339[_0x39caaf(0x423)]??''),'meta':{..._0x441339[_0x39caaf(0x208)]||{},'worker':_0x188999[_0x39caaf(0x18e)],'workerPid':_0x188999[_0x39caaf(0x4e5)]}});};_0x1f146e['on']('message',_0x5af0f3);const _0x69fbcf=(_0x4d3ab6,_0x256d00)=>{const _0x59b7a1=_0x592d55;if(!_0x256d00||typeof _0x256d00!==_0x59b7a1(0x257)||_0x256d00[_0x1d176e]!==_0x4adf8f)return;const _0x407471=_0x5de081[_0x59b7a1(0x3b2)](_0x4d3ab6[_0x59b7a1(0x3d8)][_0x59b7a1(0x4e5)]);if(_0x407471)_0x407471[_0x59b7a1(0x360)]={..._0x256d00['stats'],'at':Date[_0x59b7a1(0x46e)]()};};_0x1f146e['on'](_0x592d55(0x491),_0x69fbcf),_0x1f146e['on']('exit',(_0x3a6f32,_0x573748,_0x17c9a3)=>{const _0x310b6a=_0x592d55,_0x498bca=_0x3a6f32[_0x310b6a(0x3d8)][_0x310b6a(0x4e5)],_0x272cce=_0x4492bd(_0x3a6f32),_0x540be8=_0x5de081[_0x310b6a(0x3b2)](_0x498bca);if(_0x540be8&&_0x2d4887?.['processes'])_0x2d4887[_0x310b6a(0x349)][_0x310b6a(0x5e4)](_0x498bca+':'+_0x540be8[_0x310b6a(0x5de)])[_0x310b6a(0x15f)](()=>{});_0x5de081[_0x310b6a(0x4f4)](_0x498bca),console[_0x310b6a(0x5f4)]('[okdb-cluster]\x20worker\x20pid='+_0x498bca+'\x20(slot='+(_0x272cce??'?')+_0x310b6a(0x1f6)+(_0x310b6a(0x5f7)+_0x573748+_0x310b6a(0x409)+(_0x17c9a3??_0x310b6a(0x20c))+_0x310b6a(0x2d3)+_0x5de081['size']+'\x20worker(s)\x20remaining')),_0xbd2507();if(_0x966c4a||_0x272cce==null)return;const _0x41a70d=_0x3f73b7['get'](_0x272cce);if(!_0x41a70d||_0x41a70d['dead'])return;const _0x4b9404=Date[_0x310b6a(0x46e)]();_0x41a70d[_0x310b6a(0x33b)][_0x310b6a(0x591)](_0x4b9404),_0x41a70d['deaths']=_0x41a70d['deaths'][_0x310b6a(0x398)](_0x271ff5=>_0x4b9404-_0x271ff5<=_0x1beff7);if(_0x41a70d[_0x310b6a(0x33b)][_0x310b6a(0x42c)]>=_0x39bcf7){_0x41a70d[_0x310b6a(0x443)]=!![],console[_0x310b6a(0x3b8)](_0x310b6a(0x1e1)+_0x272cce+_0x310b6a(0x35e)+_0x41a70d[_0x310b6a(0x33b)]['length']+_0x310b6a(0x1b9)+(_0x1beff7+_0x310b6a(0x1c6)+_0x5de081['size']+_0x310b6a(0x145)));return;}_0x41a70d['consecutiveFailures']++;const _0x23a8fb=Math[_0x310b6a(0x579)](_0x3f2064,_0x4b7c73*0x2**(_0x41a70d[_0x310b6a(0x437)]-0x1));console[_0x310b6a(0x5f4)](_0x310b6a(0x431)+_0x272cce+_0x310b6a(0x4e1)+_0x23a8fb+_0x310b6a(0x308)+_0x41a70d[_0x310b6a(0x437)]+')'),_0x41a70d[_0x310b6a(0x28b)]=setTimeout(()=>{const _0x1ad754=_0x310b6a;_0x41a70d[_0x1ad754(0x28b)]=null;if(_0x966c4a||_0x41a70d[_0x1ad754(0x443)])return;const _0x4e4068=_0xd79fd7(_0x272cce);_0x4e4068[_0x1ad754(0x2e6)](_0x1ad754(0x2f2),()=>{const _0x38c015=_0x1ad754;if(_0x3f73b7['get'](_0x272cce)===_0x41a70d)_0x41a70d[_0x38c015(0x437)]=0x0;});},_0x23a8fb),_0x41a70d[_0x310b6a(0x28b)][_0x310b6a(0x326)]?.();});const _0x381044=[..._0x5de081[_0x592d55(0x180)]()];console[_0x592d55(0x5f4)](_0x592d55(0x16b)+process['pid']+_0x592d55(0x246)+_0x54cc0a+'\x20HTTP\x20server(s)\x20on\x20port\x20'+_0x50890f+':\x20'+('['+_0x381044[_0x592d55(0x4b5)](',\x20')+']'));const _0x3a6df2={'_isClusterController':!![],'port':_0x50890f,'primaryOkdb':_0x2d4887??null,'status'(){const _0x2a5742=_0x592d55;return{'clustered':!![],'primaryPid':process[_0x2a5742(0x4e5)],'port':_0x50890f,'primaryRole':_0x2d4887?.[_0x2a5742(0x501)]??null,'processorPid':_0x2d4887?process['pid']:null,'workers':[..._0x5de081[_0x2a5742(0x41e)]()][_0x2a5742(0x1fd)](({worker:_0x527614})=>({'pid':_0x527614['process']['pid'],'id':_0x527614['id'],'dead':_0x527614[_0x2a5742(0x4cb)]()}))};},async 'close'(){const _0x18c7dd=_0x592d55;_0x966c4a=!![];for(const _0x172d88 of _0x3f73b7[_0x18c7dd(0x41e)]()){_0x172d88[_0x18c7dd(0x443)]=!![],_0x172d88[_0x18c7dd(0x28b)]&&(clearTimeout(_0x172d88[_0x18c7dd(0x28b)]),_0x172d88[_0x18c7dd(0x28b)]=null);}clearInterval(_0x1bcff5),_0x1f146e[_0x18c7dd(0x4ac)](_0x18c7dd(0x491),_0x5af0f3),_0x1f146e['off'](_0x18c7dd(0x491),_0x69fbcf),_0x2d4887?.['events']?.[_0x18c7dd(0x4ac)]?.(_0x1118a2[_0x18c7dd(0x59b)],_0x3fdbff);if(_0x2d4887?.[_0x18c7dd(0x3ac)]?.['off'])for(const {event:_0x5925fe,handler:_0x3cabd0}of _0xfc054f){try{_0x2d4887['events'][_0x18c7dd(0x4ac)](_0x5925fe,_0x3cabd0);}catch{}}_0xfc054f[_0x18c7dd(0x42c)]=0x0;const _0x195a79=[..._0x5de081[_0x18c7dd(0x41e)]()]['map'](({worker:_0x3cc2fa})=>_0x3cc2fa);if(_0x195a79['length']===0x0)return;await Promise[_0x18c7dd(0xec)](_0x195a79[_0x18c7dd(0x1fd)](_0x5ae017=>new Promise(_0x410a8f=>{const _0x2e9e6a=_0x18c7dd;if(_0x5ae017['isDead']()){_0x410a8f();return;}let _0x3b72c7=![];const _0x15651d=()=>{if(_0x3b72c7)return;_0x3b72c7=!![];if(_0x43d4ef)clearTimeout(_0x43d4ef);_0x410a8f();};_0x5ae017['once'](_0x2e9e6a(0x155),_0x15651d);const _0x43d4ef=setTimeout(()=>{const _0x26dfdb=_0x2e9e6a;try{_0x5ae017[_0x26dfdb(0x3d8)][_0x26dfdb(0x179)]();}catch{}},_0x180cf0+0x1f4);_0x43d4ef[_0x2e9e6a(0x326)]?.();try{_0x5ae017[_0x2e9e6a(0x1a0)]();}catch{try{_0x5ae017['process'][_0x2e9e6a(0x179)]();}catch{}}})));}};return _0x3a6df2;}async function _0x41affe({makeOkdb:_0x2d80ce,port:_0x230661}){const _0x2acc74=_0x5b94d6,_0x36e0ea=await _0x2d80ce();return _0x2fde62(_0x36e0ea),_0x36e0ea[_0x2acc74(0x19e)][_0x2acc74(0x55b)](_0x230661);}function _0x2fde62(_0x56a10a){const _0xc128=_0x5b94d6;if(!_0x56a10a||_0x56a10a[_0xc128(0x474)])return;_0x56a10a[_0xc128(0x474)]=!![];try{const {OKDBChangefeed:_0xbbeb2f}=requireOkdbChangefeed(),_0x34eec6=_0x56a10a['_adminRelay'];if(_0x34eec6&&typeof _0x34eec6['attachFeed']===_0xc128(0x47f)){const _0x232276=new _0xbbeb2f(_0x56a10a);_0x232276[_0xc128(0x563)](),_0x34eec6[_0xc128(0x1ee)](_0x232276),_0x56a10a['_changefeed']=_0x232276;}}catch(_0x942b9f){_0x56a10a[_0xc128(0x5f4)]?.['warn']?.('[okdb-cluster]\x20change-feed\x20init\x20failed:\x20'+(_0x942b9f?.[_0xc128(0x491)]??_0x942b9f),{'feature':_0xc128(0x1e4)});}const _0x160762=_0x180a8b=>{const _0x4a7591=_0xc128;if(!_0x180a8b||typeof _0x180a8b!=='object'||_0x180a8b[_0x1d176e]==null)return;if(_0x180a8b[_0x1d176e]===_0x3b7366)try{_0x56a10a[_0x4a7591(0x534)]?.[_0x4a7591(0x21c)]?.(_0x180a8b[_0x4a7591(0x5e5)],_0x180a8b['data']);}catch{}};process['on'](_0xc128(0x491),_0x160762),_0x56a10a[_0xc128(0x5e7)]=_0x160762;{let _0x39b095=process['cpuUsage'](),_0x5a6e21=Date['now']();const _0x2821e7=()=>{const _0x262c9b=_0xc128;if(typeof process[_0x262c9b(0x4ec)]!==_0x262c9b(0x47f)||!process[_0x262c9b(0x106)])return;const _0x1d9ff3=Date[_0x262c9b(0x46e)](),_0x13d599=process['cpuUsage'](),_0x267810=(_0x1d9ff3-_0x5a6e21)*0x3e8,_0x4b703b=_0x13d599[_0x262c9b(0x2ce)]-_0x39b095[_0x262c9b(0x2ce)]+(_0x13d599[_0x262c9b(0x509)]-_0x39b095[_0x262c9b(0x509)]),_0x244dd4=_0x267810>0x0?Math[_0x262c9b(0x579)](0x64,Math[_0x262c9b(0x594)](_0x4b703b/(_0x267810*(_0x184548[_0x262c9b(0x336)]()[_0x262c9b(0x42c)]||0x1))*0x64)):0x0;_0x39b095=_0x13d599,_0x5a6e21=_0x1d9ff3;const _0x525a70=process['memoryUsage']();try{process['send']({[_0x1d176e]:_0x4adf8f,'stats':{'rss':_0x525a70[_0x262c9b(0x34b)],'heapUsed':_0x525a70[_0x262c9b(0x3a4)],'heapTotal':_0x525a70[_0x262c9b(0x13d)],'external':_0x525a70[_0x262c9b(0x3e5)],'cpuPct':_0x244dd4,'cpuWindowMs':Math[_0x262c9b(0x594)](_0x267810/0x3e8)||null}});}catch{}},_0x4a47da=Math[_0xc128(0x473)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x2bb451=setInterval(_0x2821e7,_0x4a47da);_0x2bb451[_0xc128(0x326)]?.(),_0x2821e7();}let _0x5a7aee=![];const _0x263db9=async _0x157a14=>{const _0x5035db=_0xc128;if(_0x5a7aee)return;_0x5a7aee=!![];const _0x14ff78=setTimeout(()=>process['exit'](_0x157a14),_0x180cf0);_0x14ff78['unref']?.();try{await _0x56a10a[_0x5035db(0x1ab)]?.();}catch{}process[_0x5035db(0x155)](_0x157a14);};process['on'](_0xc128(0x1a0),()=>_0x263db9(0x0));if(process[_0xc128(0x19c)]!=='win32'){const _0x593c49=setInterval(()=>{const _0x175e11=_0xc128;if(process[_0x175e11(0x344)]===0x1)_0x263db9(0x0);},_0x2bfdb4);_0x593c49['unref']?.(),_0x56a10a['_clusterOrphanWatch']=_0x593c49;}}return okdbCluster={'runClustered':_0x4a7f3b,'attachWorkerCluster':_0x2fde62},okdbCluster;}var okdbHttp={'exports':{}},okdbMetrics,hasRequiredOkdbMetrics;function requireOkdbMetrics(){const _0x526f7a=_0x17fdfc;if(hasRequiredOkdbMetrics)return okdbMetrics;hasRequiredOkdbMetrics=0x1;const _0x2873cf=0x3c;function _0x4c3e9(){return{'requests':0x0,'reads':0x0,'writes':0x0,'errors':0x0,'readMs':0x0,'writeMs':0x0};}class _0x10397a{constructor(){const _0x278755=_0x240c;this[_0x278755(0x600)]=0x0,this['_totalReads']=0x0,this[_0x278755(0x149)]=0x0,this['_totalErrors']=0x0,this[_0x278755(0x488)]=0x0,this[_0x278755(0xb9)]=0x0,this[_0x278755(0x4c5)]=Array[_0x278755(0x294)]({'length':_0x2873cf},_0x4c3e9),this[_0x278755(0x112)]=0x0,this['_lastTick']=Date['now'](),this[_0x278755(0x472)]=setInterval(()=>this[_0x278755(0x50a)](),0x3e8);if(this[_0x278755(0x472)]['unref'])this[_0x278755(0x472)][_0x278755(0x326)]();}[_0x526f7a(0x50a)](){const _0x4991d0=_0x526f7a;this[_0x4991d0(0x112)]=(this[_0x4991d0(0x112)]+0x1)%_0x2873cf,this[_0x4991d0(0x4c5)][this[_0x4991d0(0x112)]]=_0x4c3e9(),this['_lastTick']=Date[_0x4991d0(0x46e)]();}[_0x526f7a(0x4f8)](_0x288528,_0x38bce1,_0x3d9891){const _0x55816b=_0x526f7a,_0x9048b6=/^(POST|PUT|PATCH|DELETE)$/i[_0x55816b(0x382)](_0x288528),_0xf7e397=this['_buckets'][this['_bucketIdx']];this[_0x55816b(0x600)]++,_0xf7e397['requests']++,_0x3d9891&&(this[_0x55816b(0x5c7)]++,_0xf7e397[_0x55816b(0x542)]++),_0x9048b6?(this[_0x55816b(0x149)]++,this[_0x55816b(0xb9)]+=_0x38bce1,_0xf7e397['writes']++,_0xf7e397[_0x55816b(0x2f5)]+=_0x38bce1):(this['_totalReads']++,this['_totalReadMs']+=_0x38bce1,_0xf7e397['reads']++,_0xf7e397[_0x55816b(0x1db)]+=_0x38bce1);}[_0x526f7a(0x360)](){const _0x5aee12=_0x526f7a;let _0x2683ec=0x0,_0x4c7981=0x0,_0x89e03e=0x0,_0x42aa7b=0x0,_0x262be4=0x0,_0x322a11=0x0;for(const _0x49bde0 of this[_0x5aee12(0x4c5)]){_0x2683ec+=_0x49bde0[_0x5aee12(0x3cc)],_0x4c7981+=_0x49bde0['reads'],_0x89e03e+=_0x49bde0[_0x5aee12(0x3d1)],_0x42aa7b+=_0x49bde0[_0x5aee12(0x542)],_0x262be4+=_0x49bde0[_0x5aee12(0x1db)],_0x322a11+=_0x49bde0[_0x5aee12(0x2f5)];}const _0x4a02b0=_0x2873cf;return{'lifetime':{'requests':this['_totalRequests'],'reads':this[_0x5aee12(0x3fb)],'writes':this[_0x5aee12(0x149)],'errors':this[_0x5aee12(0x5c7)],'avgReadMs':this[_0x5aee12(0x3fb)]>0x0?+(this[_0x5aee12(0x488)]/this['_totalReads'])[_0x5aee12(0xe3)](0x2):null,'avgWriteMs':this[_0x5aee12(0x149)]>0x0?+(this['_totalWriteMs']/this[_0x5aee12(0x149)])[_0x5aee12(0xe3)](0x2):null},'window':{'seconds':_0x4a02b0,'requests':_0x2683ec,'reads':_0x4c7981,'writes':_0x89e03e,'errors':_0x42aa7b,'reqPerSec':+(_0x2683ec/_0x4a02b0)[_0x5aee12(0xe3)](0x2),'readPerSec':+(_0x4c7981/_0x4a02b0)[_0x5aee12(0xe3)](0x2),'writePerSec':+(_0x89e03e/_0x4a02b0)[_0x5aee12(0xe3)](0x2),'avgReadMs':_0x4c7981>0x0?+(_0x262be4/_0x4c7981)[_0x5aee12(0xe3)](0x2):null,'avgWriteMs':_0x89e03e>0x0?+(_0x322a11/_0x89e03e)[_0x5aee12(0xe3)](0x2):null}};}[_0x526f7a(0x1ab)](){const _0x4be282=_0x526f7a;clearInterval(this[_0x4be282(0x472)]);}}return okdbMetrics=_0x10397a,okdbMetrics;}var okdbAuthNamespaces,hasRequiredOkdbAuthNamespaces;function requireOkdbAuthNamespaces(){const _0xa04b98=_0x17fdfc;if(hasRequiredOkdbAuthNamespaces)return okdbAuthNamespaces;hasRequiredOkdbAuthNamespaces=0x1;const _0x9fda14={'data':{'label':_0xa04b98(0x4e7),'scope':'env','description':_0xa04b98(0x42a),'operations':{'read':{'label':_0xa04b98(0x531),'summary':_0xa04b98(0x513)},'write':{'label':'Write','summary':_0xa04b98(0xd0)}}},'schema':{'label':'Schema\x20&\x20Indexes','scope':'env','description':'Type\x20definitions,\x20all\x20index\x20registrations\x20(byIndex,\x20FTS,\x20vector),\x20and\x20TTL\x20policy.','operations':{'read':{'label':_0xa04b98(0x531),'summary':'List\x20types,\x20get\x20type\x20schema,\x20list\x20registered\x20indexes.'},'write':{'label':'Write','summary':_0xa04b98(0x140)}}},'search':{'label':'Search','scope':_0xa04b98(0x1d9),'description':'Run\x20searches\x20against\x20registered\x20FTS\x20and\x20vector\x20indexes.','operations':{'query':{'label':'Query','summary':_0xa04b98(0x3ee)}}},'queue':{'label':_0xa04b98(0x210),'scope':'env','description':_0xa04b98(0xb7),'operations':{'read':{'label':_0xa04b98(0x531),'summary':'List\x20jobs,\x20view\x20stats,\x20list\x20buckets.'},'write':{'label':_0xa04b98(0x51b),'summary':_0xa04b98(0x566)},'work':{'label':_0xa04b98(0x5a7),'summary':_0xa04b98(0x445)}}},'files':{'label':_0xa04b98(0x38d),'scope':_0xa04b98(0x1d9),'description':_0xa04b98(0x5ec),'operations':{'read':{'label':'Read','summary':_0xa04b98(0x8e)},'write':{'label':_0xa04b98(0x51b),'summary':_0xa04b98(0x39f)}}},'functions':{'label':_0xa04b98(0x605),'scope':_0xa04b98(0x1d9),'description':'Server-side\x20user-defined\x20functions\x20registered\x20per\x20environment.','operations':{'read':{'label':_0xa04b98(0x531),'summary':'List\x20functions\x20and\x20inspect\x20their\x20source.'},'write':{'label':_0xa04b98(0x51b),'summary':_0xa04b98(0x11e)},'run':{'label':'Run','summary':_0xa04b98(0x524)}}},'views':{'label':_0xa04b98(0x4f1),'scope':'env','description':_0xa04b98(0x495),'operations':{'read':{'label':_0xa04b98(0x531),'summary':_0xa04b98(0x1ae)},'write':{'label':'Write','summary':_0xa04b98(0x393)}}},'env':{'label':'Environments','scope':_0xa04b98(0x1d9),'description':'Environment\x20lifecycle.\x20Listing\x20and\x20creating\x20envs\x20is\x20system-level.','operations':{'read':{'label':_0xa04b98(0x531),'summary':'List\x20environments\x20and\x20read\x20environment\x20info.'},'write':{'label':'Write','summary':_0xa04b98(0x4d1)}}},'auth':{'label':'Auth','scope':_0xa04b98(0x509),'description':_0xa04b98(0x115),'operations':{'read':{'label':_0xa04b98(0x531),'summary':_0xa04b98(0x448)},'write':{'label':'Write','summary':_0xa04b98(0x5f8)}}},'system':{'label':_0xa04b98(0x3d0),'scope':_0xa04b98(0x509),'description':'Operator\x20surface:\x20server\x20info,\x20logs,\x20event\x20streams,\x20processor\x20status,\x20backups.','operations':{'read':{'label':'Read','summary':'View\x20server\x20info,\x20logs,\x20SSE\x20event\x20streams,\x20processor\x20status,\x20backup\x20list.'},'write':{'label':_0xa04b98(0x51b),'summary':_0xa04b98(0x254)}}},'sync':{'label':_0xa04b98(0x3c1),'scope':_0xa04b98(0x509),'description':_0xa04b98(0x1c8),'operations':{'read':{'label':_0xa04b98(0x531),'summary':'View\x20peer\x20status\x20and\x20replication\x20stats.'},'write':{'label':_0xa04b98(0x51b),'summary':_0xa04b98(0x40c)},'peer':{'label':'Peer','summary':'Machine-to-machine\x20cluster\x20protocol\x20(join\x20handshake,\x20replication\x20channel,\x20traffic).\x20Grant\x20only\x20to\x20peer\x20nodes\x20—\x20not\x20to\x20humans.','machineOnly':!![]}}},'protected':{'label':_0xa04b98(0x413),'scope':'gate','description':_0xa04b98(0x490),'operations':{'read':{'label':_0xa04b98(0x531),'summary':_0xa04b98(0x264)},'write':{'label':_0xa04b98(0x51b),'summary':_0xa04b98(0x105)}}}},_0x129a4e={'schema:read':[_0xa04b98(0x567),_0xa04b98(0x33c),_0xa04b98(0x603)]},_0x535f10=['read',_0xa04b98(0x45a),_0xa04b98(0x10b),_0xa04b98(0x288),'work',_0xa04b98(0x5aa)];function _0x36d9f8(){const _0x529a8f=_0xa04b98,_0x557990=[];for(const [_0x347270,_0x1d2086]of Object['entries'](_0x9fda14)){for(const _0x14b1d9 of Object['keys'](_0x1d2086[_0x529a8f(0x538)])){_0x557990[_0x529a8f(0x591)](_0x347270+':'+_0x14b1d9);}}return _0x557990;}function _0x2ce081(_0x5373ad){return _0x9fda14[_0x5373ad]||null;}function _0x52dd82(_0x2a7c95,_0x3d43fc){const _0x19f625=_0xa04b98;return _0x9fda14[_0x2a7c95]?.[_0x19f625(0x538)][_0x3d43fc]||null;}return okdbAuthNamespaces={'NAMESPACES':_0x9fda14,'IMPLIED_BY':_0x129a4e,'OP_ORDER':_0x535f10,'listAllPermissions':_0x36d9f8,'getNamespaceMeta':_0x2ce081,'getOperationMeta':_0x52dd82},okdbAuthNamespaces;}var okdbAuthPermissions,hasRequiredOkdbAuthPermissions;function requireOkdbAuthPermissions(){const _0x3da8ce=_0x17fdfc;if(hasRequiredOkdbAuthPermissions)return okdbAuthPermissions;hasRequiredOkdbAuthPermissions=0x1;const {IMPLIED_BY:_0x268048}=requireOkdbAuthNamespaces(),_0x2c1123=new Set(['read',_0x3da8ce(0x45a)]);function _0x8d212b(_0x50ae41,_0x5c45a1){const _0x2acd3f=_0x3da8ce;if(!Array[_0x2acd3f(0x3c6)](_0x50ae41)||_0x50ae41[_0x2acd3f(0x42c)]===0x0)return![];for(const _0x28ec0b of _0x50ae41){if(typeof _0x28ec0b!==_0x2acd3f(0xa0)||!_0x28ec0b[_0x2acd3f(0x580)](':')){if(_0x28ec0b==='*')return!![];continue;}const [_0x5e80d1,_0x22ad59]=_0x28ec0b[_0x2acd3f(0x48e)](':'),[_0x461efb,_0xff17ef]=_0x5c45a1['split'](':'),_0x3fb153=_0x5e80d1==='*'||_0x5e80d1===_0x461efb,_0x3edb91=_0x22ad59==='*'||_0x22ad59===_0xff17ef;if(_0x3fb153&&_0x3edb91)return!![];}const _0x3828c5=_0x268048[_0x5c45a1];if(_0x3828c5)for(const _0x4875dc of _0x3828c5){if(_0x8d212b(_0x50ae41,_0x4875dc))return!![];}return![];}function _0x390fa8(_0x18c0b0,_0x190cd2){const _0x5b22a2=_0x3da8ce,_0x133f84=new Set();if(Array[_0x5b22a2(0x3c6)](_0x18c0b0)){for(const _0x1efbd1 of _0x18c0b0)_0x133f84[_0x5b22a2(0x2bd)](_0x1efbd1);}if(Array['isArray'](_0x190cd2)){for(const _0x41ae54 of _0x190cd2)_0x133f84[_0x5b22a2(0x2bd)](_0x41ae54);}return Array[_0x5b22a2(0x294)](_0x133f84);}function _0x53c545(_0x242a28){const _0x374897=_0x3da8ce;if(typeof _0x242a28!=='string')return![];const [,_0x2c265c]=_0x242a28[_0x374897(0x48e)](':');return _0x2c1123[_0x374897(0x1b4)](_0x2c265c);}function _0x1ca3c8(_0x9ffac5){const _0x5487a1=_0x3da8ce;return _0x53c545(_0x9ffac5)?_0x5487a1(0x606):_0x5487a1(0x2c9);}function _0x5aaac9(_0x8fc79e,_0x1b27ba){const _0x806dc3=_0x3da8ce;return _0x390fa8(_0x8fc79e[_0x806dc3(0x219)]||[],_0x1b27ba?(_0x8fc79e['grants']||{})[_0x1b27ba]||[]:[]);}function _0x3421ae(_0x3cd7c3){const _0x11de40=_0x3da8ce,_0x2cb5e9=[];for(const _0x84948b of _0x3cd7c3[_0x11de40(0x552)]()){const _0x12cf53=_0x84948b['operation']?.['access'];if(!_0x12cf53)continue;_0x12cf53['authRequired']&&!_0x12cf53[_0x11de40(0x1b1)]&&_0x2cb5e9[_0x11de40(0x591)](_0x84948b[_0x11de40(0x2db)]+'\x20'+_0x84948b[_0x11de40(0x366)]+_0x11de40(0x22b)+(_0x84948b[_0x11de40(0xc4)]['id']??'?')+')');}if(_0x2cb5e9[_0x11de40(0x42c)])throw new Error('The\x20following\x20routes\x20require\x20auth\x20but\x20declare\x20no\x20permission:\x0a\x20\x20'+_0x2cb5e9['join'](_0x11de40(0x329)));}return okdbAuthPermissions={'hasPermission':_0x8d212b,'unionPermissions':_0x390fa8,'isReadOperation':_0x53c545,'resolveProtectedGate':_0x1ca3c8,'getEffectivePermissions':_0x5aaac9,'assertEveryRouteHasPermission':_0x3421ae},okdbAuthPermissions;}var okdbJwtUtils,hasRequiredOkdbJwtUtils;function requireOkdbJwtUtils(){if(hasRequiredOkdbJwtUtils)return okdbJwtUtils;hasRequiredOkdbJwtUtils=0x1;const _0x1f114b=require$$0$5,_0x1117df=require$$1$3,_0x4ccb59=require$$2;function _0x10cbbd(_0x189df9){const _0x545563=_0x240c,_0xefabb9=String(_0x189df9||'')[_0x545563(0x327)](/-/g,'+')[_0x545563(0x327)](/_/g,'/'),_0x240241=_0xefabb9+'='[_0x545563(0x1da)]((0x4-(_0xefabb9['length']%0x4||0x4))%0x4);return Buffer[_0x545563(0x294)](_0x240241,_0x545563(0x5e3));}function _0x52dfef(_0x148069){const _0x21c476=_0x240c;if(typeof _0x148069!==_0x21c476(0xa0))throw new Error(_0x21c476(0x22d));const _0x468216=_0x148069['split']('.');if(_0x468216[_0x21c476(0x42c)]!==0x3)throw new Error(_0x21c476(0x5e9));const [_0x27a28f,_0x52e698,_0x14ca88]=_0x468216,_0x5f046f=JSON[_0x21c476(0x400)](_0x10cbbd(_0x27a28f)[_0x21c476(0x57a)](_0x21c476(0x1bb))),_0x377a1b=JSON[_0x21c476(0x400)](_0x10cbbd(_0x52e698)['toString'](_0x21c476(0x1bb)));return{'header':_0x5f046f,'payload':_0x377a1b,'signature':_0x10cbbd(_0x14ca88),'signingInput':Buffer[_0x21c476(0x294)](_0x27a28f+'.'+_0x52e698),'encodedHeader':_0x27a28f,'encodedPayload':_0x52e698};}function _0x20b380(_0x14ab2d){if(Array['isArray'](_0x14ab2d))return _0x14ab2d;if(_0x14ab2d==null)return[];return[_0x14ab2d];}function _0x17b518(_0x3cad4b){const _0x3df874=_0x240c,_0x565a99=String(_0x3cad4b||'')[_0x3df874(0x582)](/.{1,64}/g)||[];return _0x3df874(0x3b1)+_0x565a99['join']('\x0a')+_0x3df874(0x498);}function _0x51ef2a(_0x88f1b9={}){const _0x11689c=_0x240c;if(_0x88f1b9['x5c']?.[0x0])return _0x4ccb59[_0x11689c(0x277)](_0x17b518(_0x88f1b9['x5c'][0x0]));return _0x4ccb59[_0x11689c(0x277)]({'key':_0x88f1b9,'format':'jwk'});}function _0x324854(_0x2349e5,_0x357461,_0x508ffe,_0x2c33a1){const _0x2d1c1d=_0x240c;if(_0x2349e5==='RS256')return _0x4ccb59['verify'](_0x2d1c1d(0x3eb),_0x508ffe,_0x357461,_0x2c33a1);if(_0x2349e5===_0x2d1c1d(0x3e7))return _0x4ccb59[_0x2d1c1d(0x1c0)](_0x2d1c1d(0x50f),_0x508ffe,{'key':_0x357461,'dsaEncoding':_0x2d1c1d(0x43d)},_0x2c33a1);return![];}function _0x3cda12(_0x166069){const _0x5c393c=_0x240c;if(typeof commonjsGlobal[_0x5c393c(0x36f)]===_0x5c393c(0x47f))return commonjsGlobal[_0x5c393c(0x36f)](_0x166069,{'headers':{'accept':_0x5c393c(0x478)}})['then'](async _0x5e2c1d=>{const _0x2b01c0=_0x5c393c;if(!_0x5e2c1d['ok']){const _0x13dfcc=new Error(_0x2b01c0(0x441)+_0x5e2c1d[_0x2b01c0(0x1fe)]+_0x2b01c0(0x3a2)+_0x166069);_0x13dfcc[_0x2b01c0(0x1fe)]=_0x5e2c1d[_0x2b01c0(0x1fe)];throw _0x13dfcc;}return _0x5e2c1d['json']();});return new Promise((_0x4101b9,_0xcecd43)=>{const _0x115c69=_0x5c393c,_0x2ae754=String(_0x166069)[_0x115c69(0x3ad)](_0x115c69(0x33e))?_0x1117df:_0x1f114b,_0x3ae4a0=_0x2ae754['get'](_0x166069,{'headers':{'accept':'application/json'}},_0x379182=>{const _0x580c7a=_0x115c69;let _0x3dd751='';_0x379182[_0x580c7a(0x4ad)]('utf8'),_0x379182['on'](_0x580c7a(0x516),_0x534e29=>{_0x3dd751+=_0x534e29;}),_0x379182['on'](_0x580c7a(0x322),()=>{const _0x4412f7=_0x580c7a;if(_0x379182[_0x4412f7(0x337)]<0xc8||_0x379182[_0x4412f7(0x337)]>=0x12c){const _0x293f59=new Error(_0x4412f7(0x441)+_0x379182['statusCode']+_0x4412f7(0x3a2)+_0x166069);return _0x293f59[_0x4412f7(0x1fe)]=_0x379182[_0x4412f7(0x337)],_0xcecd43(_0x293f59);}try{_0x4101b9(JSON[_0x4412f7(0x400)](_0x3dd751||'{}'));}catch(_0x180fee){_0xcecd43(_0x180fee);}});});_0x3ae4a0['on'](_0x115c69(0x3b8),_0xcecd43),_0x3ae4a0[_0x115c69(0x322)]();});}return okdbJwtUtils={'base64UrlDecode':_0x10cbbd,'parseJwt':_0x52dfef,'normalizeAudience':_0x20b380,'normalizePemCertificate':_0x17b518,'jwkToKeyObject':_0x51ef2a,'verifyJwtSignature':_0x324854,'fetchJson':_0x3cda12},okdbJwtUtils;}var hasRequiredOkdbHttp;function requireOkdbHttp(){const _0x23f3bd=_0x17fdfc;if(hasRequiredOkdbHttp)return okdbHttp[_0x23f3bd(0x59c)];hasRequiredOkdbHttp=0x1;const _0x1c4e6a=require$$0$5,{URL:_0x5c7ab7}=require$$2$1,_0x2779b2=requireOkdbMetrics(),_0xf44aaf=requireOkdbAuthTokens(),{hasPermission:_0x6c9a62,unionPermissions:_0x497d71,resolveProtectedGate:_0x3bed00}=requireOkdbAuthPermissions(),_0x6b4e2={0x190:_0x23f3bd(0x388),0x191:_0x23f3bd(0x4ce),0x193:_0x23f3bd(0x80),0x194:'NOT_FOUND',0x195:'METHOD_NOT_ALLOWED',0x198:'REQUEST_TIMEOUT',0x199:_0x23f3bd(0x247),0x19a:'GONE',0x19b:_0x23f3bd(0x95),0x19d:_0x23f3bd(0x2b9),0x19f:'UNSUPPORTED_MEDIA_TYPE',0x1a6:_0x23f3bd(0x4ae),0x1ad:_0x23f3bd(0x460),0x1f4:_0x23f3bd(0x20b),0x1f5:'NOT_IMPLEMENTED',0x1f6:'BAD_GATEWAY',0x1f7:_0x23f3bd(0x178),0x1f8:_0x23f3bd(0x1dd)},_0x48be03={'INVALID_VALUE':0x190,'BAD_CONFIG':0x190,'INVALID_PRIMARY_KEY':0x190,'INVALID_INDEX_KEY':0x190,'TYPE_NOT_REGISTERED':0x194,'INDEX_NOT_REGISTERED':0x194,'NOT_FOUND':0x194,'ALREADY_EXISTS':0x199,'VERSION_MISMATCH':0x199,'UNIQUE_CONSTRAINT':0x199,'TYPE_ALREADY_REGISTERED':0x199,'INDEX_ALREADY_REGISTERED':0x199,'FK_ERROR':0x199,'FK_DELETE_ERROR':0x199,'FOREIGN_KEY_VIOLATION':0x199,'FOREIGN_KEY_DELETE_RESTRICTED':0x199,'ENV_NOT_FOUND':0x194,'ENV_PROTECTED':0x193,'ENGINE_CONFIG_PATCH_UNSUPPORTED':0x190,'QUEUE_WORKER_JOB_TYPE_CONFLICT':0x199,'SCHEMA_VALIDATION_FAILED':0x1a6,'SCHEMA_COLLECTION_INVALID':0x199,'INVALID_SCHEMA':0x190,'BUCKET_CONFIG_INVALID':0x190,'BUCKET_INVALID_TIME_VALUE':0x1a6,'BUCKET_PROJECT_NOT_SYNCABLE':0x190,'RESERVED_VIEW_NAME':0x190,'VIEW_NOT_BUCKETED':0x190,'VIEW_NOT_FOUND':0x194,'VIEW_RANGE_GRANULARITY_MISMATCH':0x190,'VIEW_RANGE_GRANULARITY_REQUIRED':0x190,'VIEW_REF_UNSUPPORTED_REDUCER':0x190},{hmac:_0x691954,timingSafeEqual:_0x396ea6,parseBearer:_0x8ca6b,randomToken:_0xfbdbe5,issueToken:_0x27083f,authenticateToken:_0x4cd16b}=_0xf44aaf,{base64UrlDecode:_0x31c182,parseJwt:_0x54c93a,normalizeAudience:_0x47cd1b,normalizePemCertificate:_0x65c67,jwkToKeyObject:_0x5e92b0,verifyJwtSignature:_0x1ed931,fetchJson:_0x22d4b6}=requireOkdbJwtUtils();function _0x528b15(_0x3dbd6d){const _0x5c1fd1=_0x23f3bd;return(_0x3dbd6d||_0x5c1fd1(0x5ee))['toUpperCase']();}function _0x51dfd6(_0x3a2b3b){const _0xbf360=_0x23f3bd;if(Array['isArray'](_0x3a2b3b))return _0x3a2b3b['flatMap'](_0x51dfd6);return String(_0x3a2b3b||'')[_0xbf360(0x48e)](',')[_0xbf360(0x1fd)](_0x4e2849=>_0x4e2849[_0xbf360(0x2a6)]())[_0xbf360(0x398)](Boolean);}function _0x4160ba(..._0x33fde9){const _0x4e8ef4=_0x23f3bd;return[...new Set(_0x33fde9['flatMap'](_0x51dfd6))][_0x4e8ef4(0x4b5)](',\x20');}function _0x1218d5(_0xd646d6,_0x352ec7){const _0x43e53=_0x23f3bd;if(!_0xd646d6)return![];if(_0x352ec7==='*')return!![];if(_0x352ec7 instanceof RegExp)return _0x352ec7[_0x43e53(0x382)](_0xd646d6);if(typeof _0x352ec7==='function')return!!_0x352ec7(_0xd646d6);if(Array[_0x43e53(0x3c6)](_0x352ec7))return _0x352ec7[_0x43e53(0x580)](_0xd646d6);return _0x352ec7===_0xd646d6;}function _0x1740bc(_0xd9fefb={},_0x54eef5={},_0x15503d=null){const _0x40d8b7=_0x23f3bd;if(!_0x54eef5)return null;const _0x50d9ed=_0xd9fefb[_0x40d8b7(0x5f1)],_0x64bde7=_0x54eef5[_0x40d8b7(0x296)]??_0x54eef5['origin']??'*',_0x2c0d59=_0x64bde7==='*'?'*':_0x1218d5(_0x50d9ed,_0x64bde7)?_0x50d9ed:null;if(!_0x2c0d59)return null;const _0x265ee1=_0xd9fefb['access-control-request-headers'],_0x273c02=_0x54eef5['headers']??_0x54eef5['allowHeaders']??[_0x40d8b7(0x35b),_0x40d8b7(0x56e),_0x40d8b7(0x232),'last-event-id',_0x40d8b7(0x2ef)],_0x50ce9d=_0x54eef5['methods']??_0x54eef5[_0x40d8b7(0x84)]??(_0x15503d?[_0x15503d,_0x40d8b7(0x596)]:[_0x40d8b7(0x5ee),_0x40d8b7(0x1bc),_0x40d8b7(0x596)]),_0x37b4d0=_0x54eef5[_0x40d8b7(0x38a)]??[_0x40d8b7(0x232)],_0x56f462={'access-control-allow-origin':_0x2c0d59,'access-control-allow-methods':Array[_0x40d8b7(0x3c6)](_0x50ce9d)?_0x50ce9d[_0x40d8b7(0x4b5)](',\x20'):String(_0x50ce9d),'access-control-allow-headers':_0x265ee1?_0x4160ba(_0x273c02,_0x265ee1):Array[_0x40d8b7(0x3c6)](_0x273c02)?_0x273c02['join'](',\x20'):String(_0x273c02),'access-control-expose-headers':Array[_0x40d8b7(0x3c6)](_0x37b4d0)?_0x37b4d0[_0x40d8b7(0x4b5)](',\x20'):String(_0x37b4d0),'vary':_0x4160ba(_0x40d8b7(0x12a),_0x2c0d59==='*'?'':'Origin',_0x265ee1?'Access-Control-Request-Headers':'')};if(_0x54eef5[_0x40d8b7(0xca)])_0x56f462['access-control-allow-credentials']=_0x40d8b7(0x203);if(Number[_0x40d8b7(0xb6)](_0x54eef5['maxAge']))_0x56f462[_0x40d8b7(0xaf)]=String(_0x54eef5[_0x40d8b7(0x49f)]);return _0x56f462;}function _0x156a71(_0x4befb3){const _0x545554=_0x23f3bd,_0xb5fd8=[],_0x344ff5={};let _0x58899c=![];_0x4befb3[_0x545554(0x28e)]('/*')&&(_0x58899c=!![],_0x4befb3=_0x4befb3[_0x545554(0x5f5)](0x0,-0x2),_0xb5fd8[_0x545554(0x591)]('*'));let _0x476189=_0x4befb3['replace'](/\/+$/,'')[_0x545554(0x327)](/\[([^\]]*)\]/g,(_0x517024,_0xca284f)=>{const _0x15caef=_0x545554,_0x3c3026=_0xca284f[_0x15caef(0x327)](/\/:(\w+)(?:=([^/\]\s]*))?/g,(_0x5167c0,_0x401e85,_0x2a8189)=>{_0xb5fd8['push'](_0x401e85);if(_0x2a8189!==undefined)_0x344ff5[_0x401e85]=_0x2a8189;return'/([^/]+)';});return _0x15caef(0x372)+_0x3c3026+')?';})[_0x545554(0x327)](/\/:(\w+)/g,(_0x52d213,_0x2e003f)=>{const _0x40ed96=_0x545554;return _0xb5fd8[_0x40ed96(0x591)](_0x2e003f),'/([^/]+)';});if(_0x476189==='')_0x476189='/';return{'keys':_0xb5fd8,'defaults':_0x344ff5,'wildcard':_0x58899c,'regex':new RegExp(_0x58899c?'^'+_0x476189+_0x545554(0x40a):'^'+_0x476189+'$')};}function _0x2609f4(_0x335564){const _0x37ac4a=_0x23f3bd;if(_0x335564==null)return _0x335564;return JSON[_0x37ac4a(0x400)](JSON[_0x37ac4a(0x4c1)](_0x335564));}function _0x4c79e9(_0x256bba){const _0x14fd48=_0x23f3bd;if(_0x256bba==null)return null;if(_0x256bba[_0x14fd48(0x191)]===_0x14fd48(0x257)&&_0x256bba['properties']&&!Array[_0x14fd48(0x3c6)](_0x256bba[_0x14fd48(0x284)]))return _0x2609f4(_0x256bba);const _0xb61a8=Object['values'](_0x256bba),_0x59441a=_0xb61a8[_0x14fd48(0x42c)]>0x0&&_0xb61a8[_0x14fd48(0x1a8)](_0x3c3cd6=>{const _0x17145a=_0x14fd48;return _0x3c3cd6&&typeof _0x3c3cd6===_0x17145a(0x257)&&!Array[_0x17145a(0x3c6)](_0x3c3cd6)&&(Object[_0x17145a(0x239)][_0x17145a(0x245)][_0x17145a(0xf5)](_0x3c3cd6,_0x17145a(0x191))||Object['prototype'][_0x17145a(0x245)][_0x17145a(0xf5)](_0x3c3cd6,_0x17145a(0x284))||Object[_0x17145a(0x239)][_0x17145a(0x245)][_0x17145a(0xf5)](_0x3c3cd6,_0x17145a(0x3cd))||Object[_0x17145a(0x239)][_0x17145a(0x245)][_0x17145a(0xf5)](_0x3c3cd6,'default'));});if(_0x59441a)return{'type':'object','properties':_0x2609f4(_0x256bba),'required':[],'additionalProperties':![]};const _0x1ac0d5={},_0x50f8c0=[];for(const [_0x29b752,_0x1f8972]of Object['entries'](_0x256bba)){_0x1ac0d5[_0x29b752]=_0x26b585(_0x1f8972);if(_0x1f8972!==null&&_0x1f8972!==undefined)_0x50f8c0[_0x14fd48(0x591)](_0x29b752);}return{'type':_0x14fd48(0x257),'properties':_0x1ac0d5,'required':_0x50f8c0,'additionalProperties':![]};}function _0x26b585(_0x5c4aa0){const _0x2b19af=_0x23f3bd;if(_0x5c4aa0===null)return{'type':['null',_0x2b19af(0xa0),_0x2b19af(0x2af),_0x2b19af(0x10a),'object',_0x2b19af(0x122)]};if(Array['isArray'](_0x5c4aa0))return{'type':_0x2b19af(0x122),'items':_0x5c4aa0[_0x2b19af(0x42c)]>0x0?_0x26b585(_0x5c4aa0[0x0]):{}};switch(typeof _0x5c4aa0){case _0x2b19af(0xa0):return{'type':_0x2b19af(0xa0),'default':_0x5c4aa0};case _0x2b19af(0x2af):return{'type':Number['isInteger'](_0x5c4aa0)?'integer':'number','default':_0x5c4aa0};case'boolean':return{'type':_0x2b19af(0x10a),'default':_0x5c4aa0};case'object':{const _0x2aec38={};for(const [_0x11dee0,_0x1ac8c9]of Object['entries'](_0x5c4aa0))_0x2aec38[_0x11dee0]=_0x26b585(_0x1ac8c9);return{'type':'object','properties':_0x2aec38,'additionalProperties':!![],'default':_0x2609f4(_0x5c4aa0)};}default:return{};}}function _0x5ae768(_0x11eda5,_0x135438){const _0x5d188e=_0x23f3bd,_0x4a6e3f=[];for(const _0x305b01 of _0x135438[_0x5d188e(0x180)]){if(_0x305b01==='*')continue;_0x4a6e3f['push']({'name':_0x305b01,'required':!Object[_0x5d188e(0x239)]['hasOwnProperty'][_0x5d188e(0xf5)](_0x135438[_0x5d188e(0x51a)],_0x305b01),'default':_0x135438[_0x5d188e(0x51a)][_0x305b01]});}return _0x4a6e3f;}function _0x1dfd9b(_0x46bf1a={},_0x46ec15){const _0x4bd6a6=_0x23f3bd,_0x1202e1=_0x4c79e9(_0x46bf1a['http']?.[_0x4bd6a6(0x37f)]??_0x46bf1a[_0x4bd6a6(0x45a)]??null),_0x91f750=_0x46bf1a[_0x4bd6a6(0x19e)]?.['bodyMode']??(_0x46bf1a[_0x4bd6a6(0x554)]?_0x4bd6a6(0x554):_0x46ec15['method']===_0x4bd6a6(0x5ee)||_0x46ec15[_0x4bd6a6(0x2db)]==='HEAD'?_0x4bd6a6(0x20c):'remaining-fields');return{'querySchema':_0x1202e1,'bodyMode':_0x91f750,'bindings':_0x2609f4(_0x46bf1a[_0x4bd6a6(0x19e)]?.['bindings']??{}),'statuses':_0x2609f4(_0x46bf1a['http']?.[_0x4bd6a6(0x481)]??(_0x46bf1a['responseStatuses']||[])),'transport':_0x46bf1a[_0x4bd6a6(0x19e)]?.[_0x4bd6a6(0x364)]??(_0x46bf1a['sse']?'sse':_0x46bf1a[_0x4bd6a6(0x554)]?'raw':_0x4bd6a6(0x10c)),'rawResponse':_0x46bf1a[_0x4bd6a6(0x19e)]?.[_0x4bd6a6(0xd9)]??!!_0x46bf1a[_0x4bd6a6(0xd9)],'cors':_0x2609f4(_0x46bf1a[_0x4bd6a6(0x19e)]?.[_0x4bd6a6(0x438)]??_0x46bf1a[_0x4bd6a6(0x438)]??null)};}function _0x3f004d(_0x4efd78){const _0x422d3c=_0x23f3bd,_0x2f539d=_0x4efd78[_0x422d3c(0x208)]||{},_0x2d31bf=_0x5ae768(_0x4efd78['path'],_0x4efd78[_0x422d3c(0x2d4)]),_0x103d0d=!!(_0x2f539d['id']||_0x2f539d[_0x422d3c(0x5ac)]||_0x2f539d[_0x422d3c(0x129)]||_0x2f539d['http']||_0x2f539d[_0x422d3c(0x4bc)]||_0x2f539d['cli']||_0x2f539d[_0x422d3c(0x3d9)]||_0x2f539d[_0x422d3c(0x162)]),_0x2ac048=_0x1dfd9b(_0x2f539d,_0x4efd78),_0xea9c54=_0x2f539d[_0x422d3c(0x5ac)]?_0x2609f4(_0x2f539d[_0x422d3c(0x5ac)]):null;return{'id':_0x2f539d['id']??null,'summary':_0x2f539d[_0x422d3c(0x390)]??null,'description':_0x2f539d[_0x422d3c(0x5cc)]??null,'tags':_0x2609f4(_0x2f539d[_0x422d3c(0x3c9)]??[]),'category':_0x2f539d[_0x422d3c(0x5b9)]??null,'safety':_0x2609f4(_0x2f539d[_0x422d3c(0x162)]??null),'access':_0x2609f4(_0x2f539d[_0x422d3c(0x3d9)]??null),'inputSchema':_0xea9c54,'outputSchema':_0x2609f4(_0x2f539d[_0x422d3c(0x129)]??null),'examples':_0x2609f4(_0x2f539d['examples']??[]),'pathParams':_0x2d31bf,'http':_0x2ac048,'cli':_0x2609f4(_0x2f539d[_0x422d3c(0x2ea)]??null),'mcp':_0x2609f4(_0x2f539d[_0x422d3c(0x4bc)]??null),'legacy':{'params':_0x2609f4(_0x2f539d[_0x422d3c(0x4ed)]??null),'query':_0x2609f4(_0x2f539d['query']??null),'body':_0x2609f4(_0x2f539d[_0x422d3c(0x93)]??null),'response':_0x2609f4(_0x2f539d[_0x422d3c(0x2b5)]??null)},'transport':{'raw':!!_0x2f539d[_0x422d3c(0x554)],'sse':!!_0x2f539d['sse'],'rawResponse':!!_0x2f539d[_0x422d3c(0xd9)],'cors':_0x2609f4(_0x2f539d[_0x422d3c(0x438)]??null)},'hasCanonical':_0x103d0d};}function _0x5d95b9(_0x3e6339,_0x466f0d){const _0x385541=_0x23f3bd;if(!_0x466f0d?.['hasCanonical'])return;if(!_0x466f0d[_0x385541(0x5ac)]||_0x466f0d['inputSchema'][_0x385541(0x191)]!==_0x385541(0x257)||!_0x466f0d[_0x385541(0x5ac)]['properties'])throw new Error('Route\x20'+_0x3e6339[_0x385541(0x2db)]+'\x20'+_0x3e6339[_0x385541(0x366)]+_0x385541(0x1b2));const _0x5c06e9=_0x466f0d[_0x385541(0x5ac)][_0x385541(0x284)]||{},_0x906cc5=new Set(_0x466f0d[_0x385541(0xc0)]['map'](_0x22ef12=>_0x22ef12['name'])),_0x23b664=new Set(Object[_0x385541(0x180)](_0x466f0d[_0x385541(0x19e)]?.[_0x385541(0x37f)]?.[_0x385541(0x284)]||{})),_0xdae360=new Set(Object[_0x385541(0x180)](_0x466f0d[_0x385541(0x19e)]?.['bindings']||{}));for(const _0x29b14e of _0x466f0d['pathParams']){if(!_0x5c06e9[_0x29b14e[_0x385541(0x4a9)]])throw new Error(_0x385541(0x234)+_0x3e6339[_0x385541(0x2db)]+'\x20'+_0x3e6339['path']+'\x20missing\x20path\x20field\x20in\x20inputSchema:\x20'+_0x29b14e[_0x385541(0x4a9)]);}for(const _0x212b80 of _0x23b664){if(!_0x5c06e9[_0x212b80])throw new Error('Route\x20'+_0x3e6339[_0x385541(0x2db)]+'\x20'+_0x3e6339[_0x385541(0x366)]+_0x385541(0x57b)+_0x212b80);}for(const _0x57e9b8 of _0xdae360){if(!_0x5c06e9[_0x57e9b8])throw new Error(_0x385541(0x234)+_0x3e6339['method']+'\x20'+_0x3e6339[_0x385541(0x366)]+_0x385541(0x164)+_0x57e9b8);}for(const _0x2b7ce6 of _0xdae360){if(_0x906cc5[_0x385541(0x1b4)](_0x2b7ce6))throw new Error('Route\x20'+_0x3e6339[_0x385541(0x2db)]+'\x20'+_0x3e6339[_0x385541(0x366)]+_0x385541(0x278)+_0x2b7ce6);if(_0x23b664[_0x385541(0x1b4)](_0x2b7ce6))throw new Error(_0x385541(0x234)+_0x3e6339[_0x385541(0x2db)]+'\x20'+_0x3e6339[_0x385541(0x366)]+'\x20has\x20ambiguous\x20binding\x20for\x20query\x20field:\x20'+_0x2b7ce6);const _0xe8705c=_0x466f0d[_0x385541(0x19e)][_0x385541(0x190)][_0x2b7ce6];if(!/^params\.[A-Za-z0-9_*.-]+$/[_0x385541(0x382)](_0xe8705c)&&!/^query\.[A-Za-z0-9_*.-]+$/[_0x385541(0x382)](_0xe8705c)&&!/^body(?:\.[A-Za-z0-9_*.-]+)?$/[_0x385541(0x382)](_0xe8705c)&&!/^headers\.[A-Za-z0-9_*.-]+$/[_0x385541(0x382)](_0xe8705c))throw new Error(_0x385541(0x234)+_0x3e6339['method']+'\x20'+_0x3e6339[_0x385541(0x366)]+'\x20has\x20illegal\x20binding\x20target\x20for\x20'+_0x2b7ce6+':\x20'+_0xe8705c);}for(const _0x33c8ae of _0x23b664){if(_0x906cc5['has'](_0x33c8ae))throw new Error(_0x385541(0x234)+_0x3e6339[_0x385541(0x2db)]+'\x20'+_0x3e6339[_0x385541(0x366)]+_0x385541(0x26b)+_0x33c8ae);}const _0x76fd82=_0x466f0d['http']?.[_0x385541(0x406)],_0x549659=new Set([_0x385541(0x20c),_0x385541(0x2bb),'object',_0x385541(0x4dc),'array','raw']);if(!_0x549659[_0x385541(0x1b4)](_0x76fd82))throw new Error('Route\x20'+_0x3e6339['method']+'\x20'+_0x3e6339['path']+'\x20has\x20invalid\x20http.bodyMode:\x20'+_0x76fd82);if(_0x76fd82===_0x385541(0x554)&&!_0x3e6339[_0x385541(0x208)]?.[_0x385541(0x554)])throw new Error('Route\x20'+_0x3e6339[_0x385541(0x2db)]+'\x20'+_0x3e6339['path']+_0x385541(0x2da));if(_0x466f0d['mcp']?.[_0x385541(0x1ec)]!==![]&&(_0x3e6339[_0x385541(0x208)]?.[_0x385541(0x554)]||_0x3e6339['meta']?.[_0x385541(0x262)]||_0x466f0d[_0x385541(0x19e)]?.[_0x385541(0x364)]===_0x385541(0x29f)))throw new Error(_0x385541(0x234)+_0x3e6339[_0x385541(0x2db)]+'\x20'+_0x3e6339[_0x385541(0x366)]+'\x20cannot\x20be\x20MCP-exposed\x20without\x20an\x20explicit\x20adapter\x20because\x20it\x20uses\x20'+_0x466f0d[_0x385541(0x19e)]?.[_0x385541(0x364)]);const _0x1d62a6=Object[_0x385541(0x180)](_0x5c06e9)['filter'](_0xb29ee5=>{const _0x194cff=_0x385541;if(_0x906cc5['has'](_0xb29ee5))return![];if(_0x23b664[_0x194cff(0x1b4)](_0xb29ee5))return![];if(_0xdae360['has'](_0xb29ee5))return![];return!![];});if(_0x76fd82===_0x385541(0x20c)&&_0x1d62a6['length']>0x0)throw new Error(_0x385541(0x234)+_0x3e6339[_0x385541(0x2db)]+'\x20'+_0x3e6339[_0x385541(0x366)]+_0x385541(0x5eb)+_0x1d62a6[_0x385541(0x4b5)](',\x20'));}function _0x5efcde(_0xc788ed){if(Array['isArray'](_0xc788ed))return _0xc788ed;if(_0xc788ed==null)return[];return[_0xc788ed];}function _0x41e1e3(_0xee400e,_0x31d4d7){const _0x36fbd0=_0x23f3bd;return _0x5efcde(_0xee400e?.['type'])[_0x36fbd0(0x580)](_0x31d4d7);}function _0x4f1dc5(_0x3134c6,_0x5cb88b){const _0x1294c5=_0x23f3bd;if(_0x3134c6==null||typeof _0x3134c6!==_0x1294c5(0xa0))return _0x3134c6;const _0x47ed60=_0x5efcde(_0x5cb88b?.[_0x1294c5(0x191)]);if(_0x47ed60[_0x1294c5(0x42c)]===0x0)return _0x3134c6;if(_0x47ed60['includes']('null')&&_0x3134c6==='null')return null;if(_0x47ed60[_0x1294c5(0x580)](_0x1294c5(0x10a))){if(_0x3134c6===_0x1294c5(0x203))return!![];if(_0x3134c6===_0x1294c5(0x19a))return![];}if(_0x47ed60[_0x1294c5(0x580)](_0x1294c5(0x236))&&/^-?\d+$/[_0x1294c5(0x382)](_0x3134c6))return Number[_0x1294c5(0xfb)](_0x3134c6,0xa);if(_0x47ed60[_0x1294c5(0x580)](_0x1294c5(0x2af))&&/^-?(?:\d+|\d*\.\d+)$/[_0x1294c5(0x382)](_0x3134c6))return Number(_0x3134c6);return _0x3134c6;}function _0x140369(_0x384ac0){return _0x2609f4(_0x384ac0);}function _0x351c67(_0x3bac80,_0x17f741={},_0xbb1644={},_0x351dad=null,_0x45d1d8={}){const _0x320cf0=_0x23f3bd,_0x1fa872=_0x3bac80?.[_0x320cf0(0xc4)];if(!_0x1fa872?.[_0x320cf0(0xb5)]||!_0x1fa872[_0x320cf0(0x5ac)])return null;const _0x25ae3b=_0x1fa872['inputSchema'][_0x320cf0(0x284)]||{},_0x217ad7=_0x1fa872[_0x320cf0(0x19e)]?.[_0x320cf0(0x37f)]?.[_0x320cf0(0x284)]||{},_0x383ed1=_0x1fa872[_0x320cf0(0x19e)]?.['bindings']||{},_0x4e2320=new Set((_0x1fa872[_0x320cf0(0xc0)]||[])['map'](_0x1a925c=>_0x1a925c['name'])),_0x5ed13e=new Set(Object['keys'](_0x217ad7)),_0x3428e5={};for(const [_0x4ccd96,_0x139e88]of Object['entries'](_0x25ae3b)){Object[_0x320cf0(0x239)]['hasOwnProperty'][_0x320cf0(0xf5)](_0x139e88||{},_0x320cf0(0x212))&&(_0x3428e5[_0x4ccd96]=_0x140369(_0x139e88[_0x320cf0(0x212)]));}for(const _0x388421 of _0x1fa872[_0x320cf0(0xc0)]||[]){if(!Object[_0x320cf0(0x239)][_0x320cf0(0x245)][_0x320cf0(0xf5)](_0x17f741,_0x388421[_0x320cf0(0x4a9)]))continue;const _0x5d4609=_0x25ae3b[_0x388421[_0x320cf0(0x4a9)]]||{};_0x3428e5[_0x388421['name']]=_0x4f1dc5(_0x17f741[_0x388421['name']],_0x5d4609);}for(const [_0x30c3b7,_0x2f4904]of Object[_0x320cf0(0x26f)](_0x217ad7)){if(!Object[_0x320cf0(0x239)]['hasOwnProperty'][_0x320cf0(0xf5)](_0xbb1644,_0x30c3b7))continue;_0x3428e5[_0x30c3b7]=_0x4f1dc5(_0xbb1644[_0x30c3b7],_0x2f4904||_0x25ae3b[_0x30c3b7]||{});}for(const [_0x2162ad,_0xde2125]of Object['entries'](_0x383ed1)){if(typeof _0xde2125!==_0x320cf0(0xa0))continue;let _0x10d090;if(_0xde2125[_0x320cf0(0x3ad)](_0x320cf0(0x14e)))_0x10d090=_0x17f741[_0xde2125[_0x320cf0(0x5f5)](0x7)];else{if(_0xde2125[_0x320cf0(0x3ad)]('query.'))_0x10d090=_0xbb1644[_0xde2125[_0x320cf0(0x5f5)](0x6)];else{if(_0xde2125===_0x320cf0(0x93))_0x10d090=_0x351dad;else{if(_0xde2125[_0x320cf0(0x3ad)]('body.'))_0x10d090=_0x351dad?.[_0xde2125[_0x320cf0(0x5f5)](0x5)];else{if(_0xde2125['startsWith'](_0x320cf0(0x546)))_0x10d090=_0x45d1d8?.[_0xde2125['slice'](0x8)['toLowerCase']()]??_0x45d1d8?.[_0xde2125[_0x320cf0(0x5f5)](0x8)];}}}}if(_0x10d090!==undefined)_0x3428e5[_0x2162ad]=_0x10d090;}const _0x1cda52=_0x1fa872['http']?.[_0x320cf0(0x406)];if(_0x1cda52!==_0x320cf0(0x20c)&&_0x1cda52!=='raw'&&_0x351dad!=null){if(_0x1cda52===_0x320cf0(0x257))for(const [_0x5b82e1,_0x3722e0]of Object['entries'](_0x25ae3b)){if(_0x4e2320[_0x320cf0(0x1b4)](_0x5b82e1)||_0x5ed13e['has'](_0x5b82e1)||Object[_0x320cf0(0x239)]['hasOwnProperty'][_0x320cf0(0xf5)](_0x383ed1,_0x5b82e1))continue;if(Object[_0x320cf0(0x239)][_0x320cf0(0x245)]['call'](_0x351dad,_0x5b82e1))_0x3428e5[_0x5b82e1]=_0x351dad[_0x5b82e1];else{if(_0x41e1e3(_0x3722e0,_0x320cf0(0x257)))_0x3428e5[_0x5b82e1]=_0x351dad;}}else for(const [_0x11cad6,_0x4d3d4d]of Object[_0x320cf0(0x26f)](_0x351dad)){if(_0x4e2320[_0x320cf0(0x1b4)](_0x11cad6)||_0x5ed13e[_0x320cf0(0x1b4)](_0x11cad6)||Object['prototype'][_0x320cf0(0x245)][_0x320cf0(0xf5)](_0x383ed1,_0x11cad6))continue;_0x3428e5[_0x11cad6]=_0x4d3d4d;}}return _0x3428e5;}function _0x33ceed(_0x41e0c0,_0x88e0be,_0x4a0bb2,_0x37152b){const _0x1b384d=_0x23f3bd;if(!_0x88e0be)return;const _0x451889=_0x5efcde(_0x88e0be[_0x1b384d(0x191)]);if(_0x41e0c0===undefined)return;if(_0x41e0c0===null){_0x451889['length']>0x0&&!_0x451889[_0x1b384d(0x580)](_0x1b384d(0x4ff))&&_0x37152b[_0x1b384d(0x591)]({'field':_0x4a0bb2,'message':'must\x20not\x20be\x20null','expected':_0x451889['join']('|'),'actual':null});return;}if(_0x451889[_0x1b384d(0x42c)]===0x0)return;const _0x6ccdca=_0x451889[_0x1b384d(0x55f)](_0x120588=>{const _0x220e24=_0x1b384d;switch(_0x120588){case _0x220e24(0xa0):return typeof _0x41e0c0===_0x220e24(0xa0);case _0x220e24(0x236):return Number[_0x220e24(0xa9)](_0x41e0c0);case'number':return typeof _0x41e0c0===_0x220e24(0x2af)&&Number[_0x220e24(0xb6)](_0x41e0c0);case _0x220e24(0x10a):return typeof _0x41e0c0==='boolean';case _0x220e24(0x257):return _0x41e0c0&&typeof _0x41e0c0===_0x220e24(0x257)&&!Array[_0x220e24(0x3c6)](_0x41e0c0);case _0x220e24(0x122):return Array['isArray'](_0x41e0c0);case _0x220e24(0x4ff):return _0x41e0c0===null;default:return!![];}});if(!_0x6ccdca){_0x37152b[_0x1b384d(0x591)]({'field':_0x4a0bb2,'message':_0x1b384d(0x1d6)+_0x451889[_0x1b384d(0x4b5)]('|'),'expected':_0x451889[_0x1b384d(0x4b5)]('|'),'actual':_0x41e0c0});return;}Array[_0x1b384d(0x3c6)](_0x41e0c0)&&_0x88e0be[_0x1b384d(0x3cd)]&&_0x41e0c0[_0x1b384d(0x305)]((_0x4ed136,_0xf185aa)=>_0x33ceed(_0x4ed136,_0x88e0be[_0x1b384d(0x3cd)],_0x4a0bb2+'['+_0xf185aa+']',_0x37152b));}function _0x52038b(_0x277a86,_0x73b813){const _0x94d6cc=_0x23f3bd,_0x37026d=_0x277a86?.[_0x94d6cc(0xc4)];if(!_0x37026d?.[_0x94d6cc(0xb5)]||!_0x37026d['inputSchema'])return null;const _0x51da38=_0x37026d[_0x94d6cc(0x5ac)],_0x510c37=_0x51da38['properties']||{},_0x2531ec=new Set(_0x51da38[_0x94d6cc(0x4fb)]||[]),_0x161c58=[];for(const _0xe38804 of _0x2531ec){_0x73b813[_0xe38804]===undefined&&_0x161c58['push']({'field':_0xe38804,'message':_0x94d6cc(0x3a6),'expected':_0x94d6cc(0x5fc),'actual':undefined});}if(_0x51da38['additionalProperties']===![])for(const _0x3d8f52 of Object[_0x94d6cc(0x180)](_0x73b813||{})){!Object[_0x94d6cc(0x239)][_0x94d6cc(0x245)][_0x94d6cc(0xf5)](_0x510c37,_0x3d8f52)&&_0x161c58[_0x94d6cc(0x591)]({'field':_0x3d8f52,'message':_0x94d6cc(0x41f),'expected':_0x94d6cc(0xb1),'actual':_0x73b813[_0x3d8f52]});}for(const [_0x236d5f,_0x7d41f9]of Object[_0x94d6cc(0x26f)](_0x510c37)){_0x33ceed(_0x73b813[_0x236d5f],_0x7d41f9,_0x236d5f,_0x161c58);}if(_0x161c58[_0x94d6cc(0x42c)]===0x0)return null;return{'code':'VALIDATION_ERROR','errors':_0x161c58};}function _0x3a674c(_0x371bce=[]){const _0x172660=_0x23f3bd;if(!Array[_0x172660(0x3c6)](_0x371bce)||_0x371bce[_0x172660(0x42c)]===0x0)return null;const _0x24cb00=_0x371bce[_0x172660(0x5f5)](0x0,0x3)['map']((_0x91379d={})=>{const _0x4b7e72=_0x172660,_0x577a43=_0x91379d[_0x4b7e72(0x2f1)]?_0x91379d[_0x4b7e72(0x2f1)]+'\x20':'';return(''+_0x577a43+(_0x91379d['message']||_0x4b7e72(0x2c3)))[_0x4b7e72(0x2a6)]();})[_0x172660(0x4b5)](';\x20');return _0x371bce['length']>0x3?_0x24cb00+'\x20(+'+(_0x371bce[_0x172660(0x42c)]-0x3)+_0x172660(0x528):_0x24cb00;}function _0x36cdee(_0x3709b8,_0x24c9b6={}){const _0x4f10fa=_0x23f3bd,_0x3bad5c=_0x24c9b6?.['result']?.[_0x4f10fa(0x3b8)]??_0x24c9b6?.[_0x4f10fa(0x3b8)]??_0x4f10fa(0x1a1),_0x145b41=_0x24c9b6?.[_0x4f10fa(0x2e4)]?.[_0x4f10fa(0x2fc)]??_0x24c9b6?.['details']??_0x3bad5c?.[_0x4f10fa(0x2fc)]??null,_0x44e642=_0x24c9b6?.['result']?.[_0x4f10fa(0x320)]??_0x24c9b6?.['code']??_0x3bad5c?.[_0x4f10fa(0x320)]??null,_0x4ab52a=_0x24c9b6?.['result']?.[_0x4f10fa(0x491)]??_0x24c9b6?.[_0x4f10fa(0x491)]??_0x3bad5c?.[_0x4f10fa(0x491)]??null,_0x41204e=typeof _0x3bad5c===_0x4f10fa(0xa0)?_0x3bad5c:null,_0x50cbe6=typeof _0x41204e==='string'&&/^[A-Z0-9_]+$/[_0x4f10fa(0x382)](_0x41204e),_0x539f97=_0x44e642??(_0x50cbe6?_0x41204e:null)??(_0x6b4e2[_0x3709b8]||'HTTP_'+_0x3709b8);let _0x256541=_0x4ab52a;!_0x256541&&typeof _0x41204e===_0x4f10fa(0xa0)&&!_0x50cbe6&&(_0x256541=_0x41204e);if(!_0x256541&&_0x539f97===_0x4f10fa(0x120)){const _0x4c17d3=_0x3a674c(_0x145b41);_0x256541=_0x4c17d3?_0x4f10fa(0x44e)+_0x4c17d3:'Validation\x20failed';}if(!_0x256541&&Array[_0x4f10fa(0x3c6)](_0x145b41)&&_0x145b41[_0x4f10fa(0x42c)]>0x0){const _0x1f0664=_0x3a674c(_0x145b41);if(_0x1f0664)_0x256541=_0x1f0664;}if(!_0x256541)_0x256541=_0x6b4e2[_0x3709b8]||_0x4f10fa(0x1a1);const _0x20ea88={'code':_0x539f97,'message':_0x256541};if(_0x145b41!=null)_0x20ea88['details']=_0x145b41;return _0x20ea88;}function _0x110913(_0x36b783){const _0x50a9d8=_0x23f3bd,_0x473855={};if(!_0x36b783)return _0x473855;for(const _0x3dfa2e of _0x36b783[_0x50a9d8(0x48e)](';')){const _0x2b616c=_0x3dfa2e[_0x50a9d8(0x17f)]('=');if(_0x2b616c===-0x1)continue;const _0x7b0d06=_0x3dfa2e['slice'](0x0,_0x2b616c)[_0x50a9d8(0x2a6)](),_0x2b14ff=_0x3dfa2e[_0x50a9d8(0x5f5)](_0x2b616c+0x1)[_0x50a9d8(0x2a6)]();_0x473855[_0x7b0d06]=decodeURIComponent(_0x2b14ff);}return _0x473855;}function _0x5de36f(_0x3d864f,_0x3f88b0){const _0x3fc30b=_0x23f3bd;return _0x3f88b0=_0x3a1f05(_0x3f88b0),{'status':_0x3f88b0[_0x3fc30b(0x1fe)]??_0x3d864f[_0x3fc30b(0x1fe)],'headers':{..._0x3d864f[_0x3fc30b(0x55d)]||{},..._0x3f88b0['headers']||{}},'body':_0x3f88b0[_0x3fc30b(0x93)]??_0x3d864f[_0x3fc30b(0x93)]};}function _0x1eaa12(_0x341aca={}){const _0x16b4f1=_0x23f3bd;return _0x341aca[_0x16b4f1(0x364)]||(_0x341aca[_0x16b4f1(0x3a3)]?_0x16b4f1(0x3a3):'http');}function _0x410843(_0x243d35){const _0x2e339e=_0x23f3bd;if(_0x243d35[_0x2e339e(0x1b5)]?.['internal']===!![])return!![];if(_0x243d35[_0x2e339e(0x1b5)]?.['auth']?.[_0x2e339e(0xd1)]===!![])return!![];if(_0x243d35[_0x2e339e(0x1b5)]?.[_0x2e339e(0x410)]?.['ok']===!![])return!![];return![];}function _0x1415fa(_0x15988f,_0x4e9735){const _0x460dd2=_0x4e9735['split']('.');let _0x56e9ad=_0x15988f;for(const _0x3ba862 of _0x460dd2){_0x56e9ad=_0x56e9ad?.[_0x3ba862];}return _0x56e9ad||null;}class _0x5cb5f3{constructor(){const _0x172f4d=_0x23f3bd;this['middlewares']=[],this[_0x172f4d(0x156)]=[],this['routes']=[],this[_0x172f4d(0xc3)]=0x5*0x400*0x400,this['server']=null,this[_0x172f4d(0x141)]=new Set(),this[_0x172f4d(0x410)]={'cookieName':_0x172f4d(0x225),'stateCookieName':'kdb_admin_oauth_state','csrfCookieName':_0x172f4d(0x365)},this['_authOptions']={},this[_0x172f4d(0x303)]=new Map(),this[_0x172f4d(0x593)]=null,this[_0x172f4d(0x83)]=null,this[_0x172f4d(0x169)]=new Map(),this[_0x172f4d(0x396)]=new _0x2779b2(),this[_0x172f4d(0x1cc)]=![],this['_userRouteCount']=0x0;}[_0x23f3bd(0x306)](_0xb48767={}){const _0x1bf2c7=_0x23f3bd;return this['_authOptions']=_0xb48767||{},this[_0x1bf2c7(0x2be)]=_0xb48767[_0x1bf2c7(0x30a)]??'open',this['_authOptions'];}get[_0x23f3bd(0x5bf)](){const _0x235c7d=_0x23f3bd;if(this[_0x235c7d(0x318)]?.[_0x235c7d(0x410)])return this['_okdb'][_0x235c7d(0x410)][_0x235c7d(0x5bf)];return![];}['getAuthOptions'](){const _0x2ac69b=_0x23f3bd;if(this[_0x2ac69b(0x318)]?.[_0x2ac69b(0x410)])return this[_0x2ac69b(0x318)][_0x2ac69b(0x410)][_0x2ac69b(0x117)]();return this[_0x2ac69b(0x54a)]||{};}[_0x23f3bd(0x25d)](_0x148153){const _0x4a9d0b=_0x23f3bd;this[_0x4a9d0b(0x260)][_0x4a9d0b(0x591)](_0x148153);}['guard'](_0x3782b8,_0x5a69ed){const _0x4c362b=_0x23f3bd;this[_0x4c362b(0x156)]['push']({'match':_0x3782b8,'handler':_0x5a69ed});}[_0x23f3bd(0x2bd)](_0x39ba18,_0x3271f9,_0x2d8954,_0x100312={}){const _0x399017=_0x23f3bd,_0x2f79fb={'method':_0x528b15(_0x39ba18),'path':_0x3271f9,'matcher':_0x156a71(_0x3271f9),'handler':_0x2d8954,'meta':_0x100312||{}},_0x12ea4c=_0x3f004d(_0x2f79fb);_0x5d95b9(_0x2f79fb,_0x12ea4c),_0x2f79fb[_0x399017(0xc4)]=_0x12ea4c,_0x2f79fb[_0x399017(0x5c0)]=this[_0x399017(0x1cc)]===!![];if(_0x2f79fb['userAdded'])this[_0x399017(0x369)]++;this['routes'][_0x399017(0x591)](_0x2f79fb);}[_0x23f3bd(0x4a4)](_0x542266,_0xf5f05d,_0x43cb88,_0x5c6c37={}){const _0x545e37=_0x23f3bd;this[_0x545e37(0x2bd)](_0x542266,_0xf5f05d,_0x43cb88,{..._0x5c6c37,'raw':!![]});}['_matchRoute'](_0x58cd0c,_0x19e6e8){const _0xdeb423=_0x23f3bd;for(const _0x1926da of this['routes']){if(_0x1926da[_0xdeb423(0x2db)]!==_0x528b15(_0x58cd0c))continue;if(_0x1926da[_0xdeb423(0x2d4)][_0xdeb423(0xda)][_0xdeb423(0x382)](_0x19e6e8))return _0x1926da;}if(_0x528b15(_0x58cd0c)===_0xdeb423(0x596))for(const _0x4d3557 of this[_0xdeb423(0x3cb)]){if(_0x4d3557['matcher'][_0xdeb423(0xda)][_0xdeb423(0x382)](_0x19e6e8)&&_0x4d3557['meta']?.['cors'])return _0x4d3557;}return null;}[_0x23f3bd(0x2e7)](_0x3d646b,_0x518267){const _0x17306c=_0x23f3bd;if(_0x3d646b?.['meta']?.[_0x17306c(0xd9)])return![];if(_0x518267?.[_0x17306c(0x55d)]?.[_0x17306c(0xab)])return![];return!![];}['listRoutes'](){const _0x36ddd4=_0x23f3bd;return this['routes'][_0x36ddd4(0x398)](_0x28d220=>!_0x28d220['meta']?.['hidden'])[_0x36ddd4(0x1fd)](_0x4efda6=>({'method':_0x4efda6[_0x36ddd4(0x2db)],'path':_0x4efda6[_0x36ddd4(0x366)],'defaults':_0x4efda6[_0x36ddd4(0x2d4)]['defaults'],'meta':_0x4efda6['meta'],'operation':_0x4efda6[_0x36ddd4(0xc4)]}));}[_0x23f3bd(0x27d)](_0x52e9b0,_0x1553d1,_0x346baf={}){const _0x5573a2=_0x23f3bd,{PassThrough:_0x461f5f}=require$$8;this['add'](_0x5573a2(0x5ee),_0x52e9b0,({params:_0x5da0b0,query:_0x5d32bb,headers:_0x1abbc0,context:_0x4c50d5})=>{const _0x3455ad=_0x5573a2,_0x420739=new _0x461f5f();let _0x5cc8da=null;const _0xd9e12e={};try{_0x4c50d5?.[_0x3455ad(0x8d)]?.[_0x3455ad(0x24a)]?.[_0x3455ad(0xbc)](!![]);}catch{}_0x420739[_0x3455ad(0x288)](_0x3455ad(0x45f)),_0x5cc8da=setInterval(()=>{const _0x513c63=_0x3455ad;try{_0x420739['write'](_0x513c63(0x267));}catch{}},0x3a98);const _0x65827=(_0x109acb,_0x16a6aa,_0x1a8149={})=>{const _0x3ec6b8=_0x3455ad;try{const _0x20dd33=_0x1a8149['raw']?String(_0x16a6aa??''):JSON['stringify'](_0x16a6aa);_0x1a8149['id']!=null&&_0x420739[_0x3ec6b8(0x288)]('id:\x20'+_0x1a8149['id']+'\x0a');_0x420739[_0x3ec6b8(0x288)]('event:\x20'+_0x109acb+'\x0a');for(const _0x5aaeb9 of _0x20dd33[_0x3ec6b8(0x48e)]('\x0a')){_0x420739[_0x3ec6b8(0x288)](_0x3ec6b8(0x497)+_0x5aaeb9+'\x0a');}_0x420739[_0x3ec6b8(0x288)]('\x0a');}catch{}},_0x3dccf6=()=>{const _0x592e2f=_0x3455ad;_0x5cc8da&&(clearInterval(_0x5cc8da),_0x5cc8da=null);try{_0x420739[_0x592e2f(0x3a9)]();}catch{}},_0x4078ba=(_0x3bf02b,_0xb06c3d)=>{_0xd9e12e[_0x3bf02b]=_0xb06c3d;};_0x4c50d5?.[_0x3455ad(0x8d)]?.['on'](_0x3455ad(0x1ab),_0x3dccf6),_0x420739['on']('close',_0x3dccf6);const _0x17670b=_0x1553d1({'send':_0x65827,'close':_0x3dccf6,'params':_0x5da0b0??{},'query':_0x5d32bb??{},'headers':_0x1abbc0??{},'context':_0x4c50d5,'setHeader':_0x4078ba});return typeof _0x17670b===_0x3455ad(0x47f)&&_0x420739['on'](_0x3455ad(0x1ab),_0x17670b),{'status':0xc8,'headers':{'content-type':_0x3455ad(0x14d),'cache-control':_0x3455ad(0x1a7),'connection':_0x3455ad(0x27c),'x-accel-buffering':'no',..._0xd9e12e},'body':_0x420739};},{..._0x346baf,'sse':!![]});}async[_0x23f3bd(0xa4)](_0x490c60,_0x3fcd29){const _0x492690=_0x23f3bd;for(const _0x47fae1 of this[_0x492690(0x156)]){if(!_0x47fae1['match'](_0x490c60))continue;const _0x3bb59f=await _0x47fae1[_0x492690(0x127)](_0x490c60,_0x3fcd29);if(_0x3bb59f===![])return![];}return!![];}async[_0x23f3bd(0x161)](_0x9b5037,_0x29ded7,_0x27de31){let _0xa5d778=0x0;const _0xe10cc0=async()=>{const _0x52629b=_0x240c,_0x10056c=this[_0x52629b(0x260)][_0xa5d778++];if(!_0x10056c)return _0x27de31();return _0x10056c(_0x9b5037,_0x29ded7,_0xe10cc0);};return _0xe10cc0();}[_0x23f3bd(0x53e)](_0x48a591,_0xfd2780){const _0x30ba58=_0x23f3bd,{status:status=0xc8,headers:headers={},body:_0x5a14f5}=_0x48a591;if(status>=0x12c&&status<0x190)return _0x48a591;if(_0x352ffe(_0x5a14f5))return _0x48a591;if(Buffer[_0x30ba58(0x2cb)](_0x5a14f5))return _0x48a591;if(typeof _0x5a14f5===_0x30ba58(0xa0))return _0x48a591;const _0x509d13={'time':+_0xfd2780[_0x30ba58(0xe3)](0x2)};if(_0x5a14f5?.[_0x30ba58(0x208)]&&typeof _0x5a14f5[_0x30ba58(0x208)]===_0x30ba58(0x257)){const {time:_0x1fba86,..._0x1b9544}=_0x5a14f5['meta'];Object[_0x30ba58(0x44d)](_0x509d13,_0x1b9544);}let _0x2b5020;if(status>=0x190){const _0x24b8af=_0x36cdee(status,_0x5a14f5);_0x2b5020={'data':null,'error':_0x24b8af,'meta':_0x509d13};}else{if(status===0xcc||_0x5a14f5==null)_0x2b5020={'data':null,'error':null,'meta':_0x509d13};else{let _0x2dcc67;if(_0x30ba58(0x2e4)in _0x5a14f5)_0x2dcc67=_0x5a14f5['result'];else{const {meta:_0x48c4e5,..._0x5028eb}=_0x5a14f5;_0x2dcc67=Object[_0x30ba58(0x180)](_0x5028eb)[_0x30ba58(0x42c)]>0x0?_0x5028eb:null;}_0x2b5020={'data':_0x2dcc67,'error':null,'meta':_0x509d13};}}return{'status':status===0xcc?0xc8:status,'headers':headers,'body':_0x2b5020};}async[_0x23f3bd(0x196)](_0x8b225f,_0x4c6238,_0x35a2d9={},_0xefcd79={}){const _0x127af4=_0x23f3bd;_0x8b225f=_0x528b15(_0x8b225f);const _0x39e64a=this[_0x127af4(0x4f0)](_0x8b225f,_0x4c6238),_0x537485={'method':_0x8b225f,'path':_0x4c6238,'headers':_0x35a2d9[_0x127af4(0x55d)]??{},'body':_0x35a2d9[_0x127af4(0x93)]??null,'query':_0x35a2d9[_0x127af4(0x45a)]??{},'context':_0xefcd79,'cookies':_0x110913(_0x35a2d9['headers']?.[_0x127af4(0x1c1)]),'route':_0x39e64a,'socket':{'remoteAddress':_0x35a2d9[_0x127af4(0x50e)]??'127.0.0.1'}};_0x537485['context']=_0x537485[_0x127af4(0x1b5)]||{};!_0x537485['context'][_0x127af4(0x410)]&&(_0x537485[_0x127af4(0x1b5)][_0x127af4(0x410)]=await this[_0x127af4(0x183)](_0x537485));if(_0x537485[_0x127af4(0x1b5)][_0x127af4(0x410)]?.[_0x127af4(0x270)])return _0x3a1f05({'status':0x193,'body':{'error':{'code':_0x127af4(0x355),'message':_0x127af4(0x248)}}});_0x537485[_0x127af4(0x1b5)]['auth']?.[_0x127af4(0x2ce)]&&!_0x537485[_0x127af4(0x1b5)][_0x127af4(0x2ce)]&&(_0x537485[_0x127af4(0x1b5)][_0x127af4(0x2ce)]=_0x537485[_0x127af4(0x1b5)][_0x127af4(0x410)][_0x127af4(0x2ce)]);let _0x1467b3=null;const _0x52b48f={'status'(_0x49d4c0){_0x1467b3=_0x1467b3||{},_0x1467b3['status']=_0x49d4c0;},'setHeader'(_0x21ed00,_0x5f24d4){const _0x21fb57=_0x127af4;_0x1467b3=_0x1467b3||{},_0x1467b3['headers']=_0x1467b3[_0x21fb57(0x55d)]||{};const _0x549646=String(_0x21ed00)[_0x21fb57(0x550)]();if(_0x549646===_0x21fb57(0x3aa)){const _0x2d0ea2=_0x1467b3[_0x21fb57(0x55d)][_0x21ed00];if(!_0x2d0ea2)_0x1467b3[_0x21fb57(0x55d)][_0x21ed00]=_0x5f24d4;else{if(Array[_0x21fb57(0x3c6)](_0x2d0ea2))_0x2d0ea2['push'](_0x5f24d4);else _0x1467b3[_0x21fb57(0x55d)][_0x21ed00]=[_0x2d0ea2,_0x5f24d4];}return;}_0x1467b3[_0x21fb57(0x55d)][_0x21ed00]=_0x5f24d4;},'send'(_0x443bab){const _0x31ed98=_0x127af4;_0x1467b3=_0x1467b3||{},_0x1467b3[_0x31ed98(0x93)]=_0x443bab;}},_0x377acd=await this[_0x127af4(0xa4)](_0x537485,_0x52b48f);if(!_0x377acd)return _0x3a1f05(_0x1467b3??{'status':0x193});const _0xdf116c=this['_enforceOperationAccess'](_0x537485);if(_0xdf116c)return _0x3a1f05(_0xdf116c);const _0x4290ee=this[_0x127af4(0x32a)](_0x537485);if(_0x4290ee)return _0x3a1f05(_0x4290ee);return await this[_0x127af4(0x161)](_0x537485,_0x52b48f,async()=>{const _0x4334ac=await this['_dispatch'](_0x537485);if(_0x1467b3==null){_0x1467b3=_0x4334ac;return;}_0x1467b3=_0x5de36f(_0x1467b3,_0x4334ac);}),_0x3a1f05(_0x1467b3);}['_enforceOperationAccess'](_0x382e48){const _0x2c31c7=_0x23f3bd,_0x53ac75=_0x382e48['route']?.[_0x2c31c7(0xc4)],_0x2e529a=_0x53ac75?.[_0x2c31c7(0x3d9)];if(!_0x53ac75?.[_0x2c31c7(0xb5)]||!_0x2e529a)return null;if(_0x382e48[_0x2c31c7(0x1b5)]?.[_0x2c31c7(0x410)]?.[_0x2c31c7(0x54e)]===!![]||_0x382e48[_0x2c31c7(0x1b5)]?.['auth']?.[_0x2c31c7(0x41d)]===!![])return null;const _0x5854fa=_0x1eaa12(_0x382e48[_0x2c31c7(0x1b5)]),_0x1db3bf=Array[_0x2c31c7(0x3c6)](_0x2e529a[_0x2c31c7(0x50c)])?_0x2e529a[_0x2c31c7(0x50c)]:null;if(_0x2e529a[_0x2c31c7(0x476)]&&_0x382e48[_0x2c31c7(0x1b5)]?.[_0x2c31c7(0x3a3)]!==!![])return{'status':0x193,'body':{'error':_0x2c31c7(0x2a3)}};if(_0x1db3bf&&_0x1db3bf['length']>0x0&&!_0x1db3bf['includes'](_0x5854fa)&&!(_0x5854fa===_0x2c31c7(0x3a3)&&_0x1db3bf[_0x2c31c7(0x580)](_0x2c31c7(0x46c))))return{'status':0x193,'body':{'error':_0x2c31c7(0x2a3)}};if(_0x2e529a[_0x2c31c7(0xf7)]&&!_0x410843(_0x382e48))return{'status':0x191,'body':{'error':_0x2c31c7(0xae)}};const _0x17cc80=_0x2e529a['permission'];if(!_0x17cc80)return null;if(_0x382e48[_0x2c31c7(0x1b5)]?.['auth']?.['type']===_0x2c31c7(0x255))return null;const _0x44cdab=_0x382e48[_0x2c31c7(0x1b5)]?.['auth']?.['token'];if(!_0x44cdab){if(_0x382e48['context']?.[_0x2c31c7(0x410)]?.['ok']===!![])return null;return{'status':0x193,'body':{'error':_0x2c31c7(0x430)}};}if(!_0x382e48[_0x2c31c7(0x4ed)]&&_0x382e48[_0x2c31c7(0x1d4)]?.[_0x2c31c7(0x2d4)]){const _0x3c793f=_0x382e48['route']['matcher'][_0x2c31c7(0xda)][_0x2c31c7(0x3bc)](_0x382e48['path']);_0x3c793f&&(_0x382e48[_0x2c31c7(0x4ed)]={},_0x382e48[_0x2c31c7(0x1d4)][_0x2c31c7(0x2d4)][_0x2c31c7(0x180)][_0x2c31c7(0x305)]((_0x4d686b,_0x5555ee)=>{const _0x53891c=_0x2c31c7,_0x544276=_0x3c793f[_0x5555ee+0x1];_0x382e48['params'][_0x4d686b]=_0x544276?decodeURIComponent(_0x544276):_0x382e48[_0x53891c(0x1d4)]['matcher']['defaults'][_0x4d686b]??undefined;}));}let _0x12186a=null;_0x2e529a[_0x2c31c7(0x530)]?.[_0x2c31c7(0x1d9)]&&(_0x12186a=_0x1415fa(_0x382e48,_0x2e529a[_0x2c31c7(0x530)]['env']));if(_0x12186a&&_0x12186a[_0x2c31c7(0x3ad)]('~')){const _0x278777=_0x3bed00(_0x17cc80),_0x30d6ca=_0x497d71(_0x44cdab['permissions']||[],(_0x44cdab[_0x2c31c7(0x1a2)]||{})[_0x12186a]||[]);if(!_0x6c9a62(_0x30d6ca,_0x278777))return{'status':0x193,'body':{'error':_0x2c31c7(0xdf)+_0x278777+_0x2c31c7(0x26c)}};}const _0x2779b4=_0x497d71(_0x44cdab['permissions']||[],_0x12186a?(_0x44cdab[_0x2c31c7(0x1a2)]||{})[_0x12186a]||[]:[]);if(!_0x6c9a62(_0x2779b4,_0x17cc80))return{'status':0x193,'body':{'error':_0x2c31c7(0xdf)+_0x17cc80}};return null;}['_validateOperationRequest'](_0x2d55f3){const _0x27670e=_0x23f3bd,_0xeda2d0=_0x2d55f3['route'],_0x2ceac7=_0xeda2d0?.[_0x27670e(0xc4)];if(!_0x2ceac7?.[_0x27670e(0xb5)]||!_0x2ceac7[_0x27670e(0x5ac)])return null;let _0x479157=_0x2d55f3['params']??null;if(!_0x479157&&_0xeda2d0?.[_0x27670e(0x2d4)]){const _0x44a4e1=_0xeda2d0['matcher'][_0x27670e(0xda)][_0x27670e(0x3bc)](_0x2d55f3[_0x27670e(0x366)]);_0x44a4e1&&(_0x479157={},_0xeda2d0[_0x27670e(0x2d4)][_0x27670e(0x180)]['forEach']((_0x281424,_0x3021fc)=>{const _0x32b7db=_0x27670e,_0x11cba8=_0x44a4e1[_0x3021fc+0x1];_0x479157[_0x281424]=_0x11cba8?decodeURIComponent(_0x11cba8):_0xeda2d0[_0x32b7db(0x2d4)]['defaults'][_0x281424]??undefined;}));}const _0x52d344=_0x351c67(_0xeda2d0,_0x479157??{},_0x2d55f3['query']??{},_0x2d55f3['body'],_0x2d55f3[_0x27670e(0x55d)]??{}),_0x1e786c=_0x52038b(_0xeda2d0,_0x52d344||{});if(!_0x1e786c)return null;const _0x206532=_0x3a674c(_0x1e786c[_0x27670e(0x542)]);return{'status':0x190,'body':{'error':_0x1e786c[_0x27670e(0x320)],'code':_0x1e786c[_0x27670e(0x320)],'message':_0x206532?'Validation\x20failed:\x20'+_0x206532:_0x27670e(0x100),'details':_0x1e786c[_0x27670e(0x542)]}};}[_0x23f3bd(0x3ce)](_0x580116,_0x47aa7e){const _0x5bb252=_0x23f3bd,_0x412fc6=_0x52038b(_0x580116,_0x47aa7e||{});if(!_0x412fc6)return null;return{'code':_0x412fc6[_0x5bb252(0x320)],'message':_0x3a674c(_0x412fc6[_0x5bb252(0x542)])?_0x5bb252(0x44e)+_0x3a674c(_0x412fc6[_0x5bb252(0x542)]):_0x5bb252(0x100),'details':_0x412fc6[_0x5bb252(0x542)]};}async['_dispatch'](_0x1f42d2){const _0xa26cae=_0x23f3bd;if(_0x1f42d2[_0xa26cae(0x2db)]===_0xa26cae(0x596))for(const _0x244300 of this[_0xa26cae(0x3cb)]){const _0x3f1cae=_0x244300[_0xa26cae(0x2d4)][_0xa26cae(0xda)]['exec'](_0x1f42d2['path']);if(!_0x3f1cae||!_0x244300[_0xa26cae(0x208)]?.[_0xa26cae(0x438)])continue;return{'status':0xcc,'headers':_0x1740bc(_0x1f42d2['headers'],_0x244300['meta'][_0xa26cae(0x438)],_0x244300['method'])||{}};}for(const _0x3e5bc0 of this[_0xa26cae(0x3cb)]){if(_0x3e5bc0[_0xa26cae(0x2db)]!==_0x1f42d2[_0xa26cae(0x2db)])continue;const _0x451f2a=_0x3e5bc0['matcher'][_0xa26cae(0xda)][_0xa26cae(0x3bc)](_0x1f42d2[_0xa26cae(0x366)]);if(!_0x451f2a)continue;const _0x36f74f={};_0x3e5bc0[_0xa26cae(0x2d4)][_0xa26cae(0x180)][_0xa26cae(0x305)]((_0x30fa3c,_0x4d3701)=>{const _0x695787=_0x451f2a[_0x4d3701+0x1];_0x36f74f[_0x30fa3c]=_0x695787?decodeURIComponent(_0x695787):_0x3e5bc0['matcher']['defaults'][_0x30fa3c]??undefined;}),_0x1f42d2[_0xa26cae(0x4ed)]=_0x36f74f;try{const _0xde2703=await _0x3e5bc0['handler']({'params':_0x36f74f,'body':_0x1f42d2['body'],'query':_0x1f42d2['query'],'headers':_0x1f42d2['headers'],'context':_0x1f42d2[_0xa26cae(0x1b5)]}),_0x2388b3=_0x3a1f05(_0xde2703),_0x270ac9=_0x1740bc(_0x1f42d2[_0xa26cae(0x55d)],_0x3e5bc0['meta']?.[_0xa26cae(0x438)],_0x3e5bc0[_0xa26cae(0x2db)]);if(!_0x270ac9)return _0x2388b3;return{..._0x2388b3,'headers':{..._0x2388b3['headers']||{},..._0x270ac9}};}catch(_0x10aab8){const _0x2c2287=_0x10aab8?.[_0xa26cae(0x1fe)]||_0x48be03[_0x10aab8?.[_0xa26cae(0x320)]]||0x1f4;return{'status':_0x2c2287,'body':{'error':_0x10aab8[_0xa26cae(0x491)]||'Internal\x20error','code':_0x10aab8?.[_0xa26cae(0x320)]||_0x6b4e2[_0x2c2287]||_0xa26cae(0x3df)+_0x2c2287,'message':_0x10aab8?.[_0xa26cae(0x491)]||_0xa26cae(0x403),..._0x10aab8?.[_0xa26cae(0x2fc)]!=null?{'details':_0x10aab8[_0xa26cae(0x2fc)]}:{}}};}}return{'status':0x194,'body':{'error':'Not\x20Found'}};}[_0x23f3bd(0x55b)](_0x8cc6b4,_0x30adbe={}){const _0x15c307=_0x23f3bd,_0x50c776=require$$1$2,_0xe020df=Number(_0x30adbe['workers'])||0x0,_0x1ea2c2=_0x30adbe[_0x15c307(0x107)],_0xa30d6=_0x50c776['isPrimary']&&(typeof _0x1ea2c2===_0x15c307(0x47f)?_0xe020df>0x1:_0xe020df>=0x1);if(_0xa30d6){if(this[_0x15c307(0x37d)])throw new Error('HTTP\x20server\x20already\x20running');const {runClustered:_0x18eaa7}=requireOkdbCluster();if(typeof _0x1ea2c2===_0x15c307(0x47f))return this[_0x15c307(0x37d)]=_0x18eaa7({'workers':_0xe020df,'makeOkdb':_0x1ea2c2,'port':_0x8cc6b4,'primaryOkdb':_0x30adbe[_0x15c307(0x519)]}),this[_0x15c307(0x37d)];const _0x32ca8a=this[_0x15c307(0x318)];if(!_0x32ca8a?.[_0x15c307(0x5f2)])throw new Error(_0x15c307(0x211)+_0x15c307(0x328));if(this[_0x15c307(0x369)]>0x0){const _0x3b2129=new Error(_0x15c307(0x136)+_0xe020df+_0x15c307(0xbd)+this['_userRouteCount']+'\x20user-registered\x20route(s)\x20are\x20'+_0x15c307(0x22f)+_0x15c307(0x1e6)+_0x15c307(0x5e0)+_0x15c307(0x4b4));_0x3b2129[_0x15c307(0x320)]=_0x15c307(0x4bb);throw _0x3b2129;}let _0x322d0f;try{_0x322d0f=JSON[_0x15c307(0x400)](JSON[_0x15c307(0x4c1)](_0x32ca8a['options']??{}));}catch(_0x183ab3){throw new Error(_0x15c307(0x2e9)+_0x183ab3['message']);}return this[_0x15c307(0x37d)]=_0x18eaa7({'workers':_0xe020df,'port':_0x8cc6b4,'primaryOkdb':_0x32ca8a,'childEntry':!![],'workerEnv':{'OKDB_HTTP_CHILD':JSON[_0x15c307(0x4c1)]({'rootPath':_0x32ca8a[_0x15c307(0x366)],'port':_0x8cc6b4,'options':_0x322d0f,'logLevel':_0x32ca8a['options']?.['logLevel']??_0x15c307(0x59a)})}}),this[_0x15c307(0x37d)];}if(this['server'])throw new Error(_0x15c307(0x3f2));_0x8cc6b4&&this['auth'][_0x15c307(0x89)]===_0x15c307(0x225)&&(this[_0x15c307(0x410)][_0x15c307(0x89)]=_0x15c307(0x134)+_0x8cc6b4,this[_0x15c307(0x318)]?.[_0x15c307(0x410)]&&(this['_okdb']['auth'][_0x15c307(0x49c)]=this[_0x15c307(0x410)][_0x15c307(0x89)]));const _0x316bcb=this[_0x15c307(0x318)]?.[_0x15c307(0x525)]?.[_0x15c307(0x10f)]?.[_0x15c307(0x450)]??![];this[_0x15c307(0x37d)]=_0x1c4e6a['createServer'](async(_0x556ee6,_0xef4d3c)=>{const _0x3fba2a=_0x15c307,_0x50058a=Date[_0x3fba2a(0x46e)]();if(_0x316bcb){const _0x1badd2=_0x556ee6['url']||'/',_0x1e0986=_0x556ee6[_0x3fba2a(0x55d)]?.[_0x3fba2a(0x56e)]?_0x556ee6[_0x3fba2a(0x55d)][_0x3fba2a(0x56e)]['replace'](/^Bearer\s+(\S{0,8})\S*/i,'Bearer\x20$1…'):'-',_0x1b3ac4=_0x556ee6[_0x3fba2a(0x55d)]?.[_0x3fba2a(0xcf)]||'-',_0x148497=_0x556ee6[_0x3fba2a(0x55d)]?.[_0x3fba2a(0x23c)]||_0x556ee6[_0x3fba2a(0x55d)]?.[_0x3fba2a(0x36b)]||'-',_0xb5823=_0x556ee6[_0x3fba2a(0x55d)]?.[_0x3fba2a(0x5f1)]||'-';process[_0x3fba2a(0xa6)][_0x3fba2a(0x288)](_0x3fba2a(0x5ea)+_0x556ee6['method'][_0x3fba2a(0x32f)](0x7)+'\x20'+_0x1badd2['padEnd'](0x2d)+'\x20'+(_0x3fba2a(0x5b0)+_0x1e0986+_0x3fba2a(0x568)+_0xb5823+_0x3fba2a(0x1d5)+_0x1b3ac4+_0x3fba2a(0x52d)+_0x148497+'\x0a'));}try{const _0x51da76=new _0x5c7ab7(_0x556ee6[_0x3fba2a(0x521)],_0x3fba2a(0x5d3)+_0x556ee6[_0x3fba2a(0x55d)][_0x3fba2a(0x34c)]),_0x3b8bbc=this[_0x3fba2a(0x4f0)](_0x556ee6[_0x3fba2a(0x2db)],_0x51da76[_0x3fba2a(0x144)]),_0x4eaf8c=_0x3b8bbc?.['meta']?.[_0x3fba2a(0x554)]===!![];if(_0x4eaf8c){const _0x31e95b=_0x556ee6[_0x3fba2a(0x55d)]?.[_0x3fba2a(0x575)];if(_0x31e95b!=null){const _0x5696d4=Number(_0x31e95b);if(Number[_0x3fba2a(0xb6)](_0x5696d4)&&_0x5696d4>this[_0x3fba2a(0xc3)]){_0xef4d3c[_0x3fba2a(0x337)]=0x19d,_0xef4d3c[_0x3fba2a(0x322)](_0x3fba2a(0x200));return;}}}const _0x4b24b7=_0x4eaf8c?null:await _0x3946b6(_0x556ee6,this['maxBodyBytes']),_0x153453=_0x4eaf8c?_0x5b3fb8(_0x556ee6,this['maxBodyBytes']):undefined,_0xd3a200=await this[_0x3fba2a(0x196)](_0x556ee6[_0x3fba2a(0x2db)],_0x51da76[_0x3fba2a(0x144)],{'body':_0x4b24b7,'query':Object[_0x3fba2a(0x471)](_0x51da76['searchParams'][_0x3fba2a(0x26f)]()),'headers':_0x556ee6[_0x3fba2a(0x55d)]},{'req':_0x556ee6,'res':_0xef4d3c,'rawStream':_0x153453}),_0x4def79=this[_0x3fba2a(0x4f0)](_0x556ee6['method'],_0x51da76['pathname']),_0x2d4d49=Date[_0x3fba2a(0x46e)]()-_0x50058a,_0x356527=this[_0x3fba2a(0x2e7)](_0x4def79,_0xd3a200)?this['_wrapApiResponse'](_0xd3a200,_0x2d4d49):_0x3a1f05(_0xd3a200),_0x58fb39=(_0x356527[_0x3fba2a(0x1fe)]||0xc8)>=0x190;this[_0x3fba2a(0x396)][_0x3fba2a(0x4f8)](_0x556ee6[_0x3fba2a(0x2db)],_0x2d4d49,_0x58fb39),_0x180d63(_0xef4d3c,_0x356527);if(_0x316bcb){const _0x526fd5=_0x356527['status']||0xc8,_0x3e45dd=Date['now']()-_0x50058a;process[_0x3fba2a(0xa6)][_0x3fba2a(0x288)](_0x3fba2a(0x2eb)+_0x556ee6['method'][_0x3fba2a(0x32f)](0x7)+'\x20'+_0x51da76[_0x3fba2a(0x144)][_0x3fba2a(0x32f)](0x2d)+'\x20'+_0x526fd5+'\x20\x20'+_0x3e45dd+_0x3fba2a(0x1c5));}}catch(_0x3ef32c){const _0x2ab952=Date[_0x3fba2a(0x46e)]()-_0x50058a;this[_0x3fba2a(0x396)][_0x3fba2a(0x4f8)](_0x556ee6[_0x3fba2a(0x2db)],_0x2ab952,!![]);const _0x576d80=_0x3ef32c?.[_0x3fba2a(0x1fe)]||0x1f4;_0xef4d3c[_0x3fba2a(0x337)]=_0x576d80,_0x576d80===0x19d?_0xef4d3c['end'](_0x3fba2a(0x200)):_0xef4d3c[_0x3fba2a(0x322)](_0x3ef32c[_0x3fba2a(0x491)]||_0x3fba2a(0x403));}}),this[_0x15c307(0x37d)]['on'](_0x15c307(0x455),_0x224253=>{const _0x27756e=_0x15c307;this[_0x27756e(0x141)][_0x27756e(0x2bd)](_0x224253),_0x224253['on']('close',()=>this[_0x27756e(0x141)][_0x27756e(0x4f4)](_0x224253));}),this[_0x15c307(0x37d)]['listen'](_0x8cc6b4);const _0x4c24fe=this['_okdb'];return _0x4c24fe?.[_0x15c307(0x349)]&&(_0x4c24fe[_0x15c307(0x349)][_0x15c307(0x5f9)](':'+_0x8cc6b4),_0x50c776[_0x15c307(0x29a)]?_0x4c24fe[_0x15c307(0x5db)]?.({'kind':_0x15c307(0x394)})[_0x15c307(0x15f)](()=>{}):_0x4c24fe[_0x15c307(0x4e0)]?.({'kind':_0x15c307(0x21f),'listenAddr':':'+_0x8cc6b4})[_0x15c307(0x15f)](()=>{})),this[_0x15c307(0x37d)];}async['close'](_0x16f2e3={}){const _0x15ba00=_0x23f3bd,_0x845e65=this[_0x15ba00(0x37d)];this[_0x15ba00(0x37d)]=null;if(_0x845e65&&_0x845e65[_0x15ba00(0x9a)]){try{await _0x845e65['close']();}catch{}this[_0x15ba00(0x396)]&&this[_0x15ba00(0x396)][_0x15ba00(0x1ab)]();return;}if(_0x845e65){const _0x50d152=Number[_0x15ba00(0xb6)](_0x16f2e3[_0x15ba00(0x2b2)])?Math['max'](0x0,_0x16f2e3[_0x15ba00(0x2b2)]):0x3e8;await new Promise(_0x18aa52=>{const _0x3721f0=_0x15ba00;let _0x16d379=![],_0x3f402b=null,_0x3b5d3e=null;const _0x36f765=()=>{if(_0x16d379)return;_0x16d379=!![];if(_0x3f402b)clearTimeout(_0x3f402b);if(_0x3b5d3e)clearTimeout(_0x3b5d3e);_0x18aa52();};try{_0x845e65['close'](_0x36f765);}catch{_0x36f765();return;}try{_0x845e65[_0x3721f0(0x182)]?.();}catch{}_0x3f402b=setTimeout(()=>{const _0x5aa13a=_0x3721f0;try{_0x845e65[_0x5aa13a(0x4ba)]?.();}catch{}for(const _0x371d52 of this['_sockets']){try{_0x371d52[_0x5aa13a(0x3a9)]();}catch{}}_0x3b5d3e=setTimeout(_0x36f765,0x64),_0x3b5d3e[_0x5aa13a(0x326)]?.();},_0x50d152),_0x3f402b[_0x3721f0(0x326)]?.();});}this[_0x15ba00(0x396)]&&this[_0x15ba00(0x396)][_0x15ba00(0x1ab)]();}[_0x23f3bd(0x5df)](_0x50958,_0x239bff,_0xb5b977=0x36ee80){const _0x5e55b1=_0x23f3bd,_0x26a3cf=Date[_0x5e55b1(0x46e)](),_0x107b1=Buffer['from'](JSON[_0x5e55b1(0x4c1)]({'iat':_0x26a3cf,'exp':_0x26a3cf+_0xb5b977,..._0x50958}))[_0x5e55b1(0x57a)](_0x5e55b1(0x195)),_0xa3ed35=_0x691954(_0x107b1,_0x239bff);return _0x107b1+'.'+_0xa3ed35;}[_0x23f3bd(0x265)](_0x705961,_0x1034e5={}){const _0x377bb5=_0x23f3bd,{httpOnly:httpOnly=!![],sameSite:sameSite='Lax',path:path='/',secure:secure=![],maxAge:maxAge=null,expires:expires=null}=_0x1034e5;let _0x54f43f=this[_0x377bb5(0x410)][_0x377bb5(0x89)]+'='+_0x705961;if(httpOnly)_0x54f43f+=_0x377bb5(0xf6);if(sameSite)_0x54f43f+=_0x377bb5(0x2d6)+sameSite;if(path)_0x54f43f+=_0x377bb5(0x1d7)+path;if(secure)_0x54f43f+=_0x377bb5(0x8f);if(Number[_0x377bb5(0xb6)](maxAge))_0x54f43f+=_0x377bb5(0x56f)+Math[_0x377bb5(0x473)](0x0,Math[_0x377bb5(0x33d)](maxAge));if(expires instanceof Date)_0x54f43f+=';\x20Expires='+expires[_0x377bb5(0x23a)]();return _0x54f43f;}['clearCookie'](_0x95084a=this[_0x23f3bd(0x410)][_0x23f3bd(0x89)],_0x1713f8={}){const _0x26cad1=_0x23f3bd,{path:path='/',sameSite:sameSite=_0x26cad1(0x121),secure:secure=![],httpOnly:httpOnly=!![]}=_0x1713f8;let _0x11ea02=_0x95084a+'=';if(httpOnly)_0x11ea02+=_0x26cad1(0xf6);if(sameSite)_0x11ea02+=_0x26cad1(0x2d6)+sameSite;if(path)_0x11ea02+=_0x26cad1(0x1d7)+path;if(secure)_0x11ea02+=_0x26cad1(0x8f);return _0x11ea02+=_0x26cad1(0x12e),_0x11ea02;}['verifyCookie'](_0x1ae305,_0x32c382){const _0x3c10dd=_0x23f3bd;if(!_0x1ae305)return null;const [_0x3ec21c,_0x47c68d]=String(_0x1ae305)[_0x3c10dd(0x48e)]('.');if(!_0x3ec21c||!_0x47c68d)return null;const _0x3516f4=_0x691954(_0x3ec21c,_0x32c382);if(!_0x396ea6(_0x47c68d,_0x3516f4))return null;try{const _0x4e6eb9=JSON[_0x3c10dd(0x400)](Buffer[_0x3c10dd(0x294)](_0x3ec21c,_0x3c10dd(0x195))['toString']());if(_0x4e6eb9[_0x3c10dd(0x4a6)]<=Date[_0x3c10dd(0x46e)]())return null;return _0x4e6eb9;}catch{return null;}}['parseBearer'](_0x11294a){const _0x5d4698=_0x23f3bd;if(this[_0x5d4698(0x318)]?.[_0x5d4698(0x410)])return this[_0x5d4698(0x318)][_0x5d4698(0x410)][_0x5d4698(0x199)](_0x11294a);return _0x8ca6b(_0x11294a);}[_0x23f3bd(0x36e)](_0x2fd236){const _0x5c2380=_0x23f3bd;if(this[_0x5c2380(0x318)]?.[_0x5c2380(0x410)])return this[_0x5c2380(0x318)][_0x5c2380(0x410)][_0x5c2380(0x36e)](_0x2fd236);const _0x488217=this[_0x5c2380(0x54a)]?.[_0x5c2380(0x1a4)]??0x36ee80,_0x4d3c44=this[_0x5c2380(0x54a)]?.[_0x5c2380(0x3af)];return _0x27083f(_0x2fd236,_0x4d3c44,_0x488217);}[_0x23f3bd(0x573)](_0x48db94){const _0x444370=_0x23f3bd;if(this[_0x444370(0x318)]?.[_0x444370(0x410)])return this[_0x444370(0x318)]['auth'][_0x444370(0x573)](_0x48db94);const _0x1397bf=this[_0x444370(0x54a)]?.[_0x444370(0x3af)];return _0x4cd16b(_0x48db94,_0x1397bf);}async['authenticateRequest'](_0x4de6a4){const _0x286af9=_0x23f3bd;if(this[_0x286af9(0x318)]?.['auth'])return this[_0x286af9(0x318)][_0x286af9(0x410)][_0x286af9(0x183)](_0x4de6a4);if(_0x4de6a4[_0x286af9(0x1b5)]?.[_0x286af9(0x3a3)]===!![]||this[_0x286af9(0x2be)]===_0x286af9(0x54e))return{'id':_0x286af9(0x509),'username':'system','roles':[_0x286af9(0x3f3)],'isAuthenticated':!![],'isSystem':!![],'user':{'id':_0x286af9(0x509),'username':_0x286af9(0x509),'roles':['admin'],'isAuthenticated':!![],'isSystem':!![]}};const _0x3d2aac=this['parseBearer'](_0x4de6a4[_0x286af9(0x55d)]?.['authorization']),_0x1c6d02=_0x4de6a4['cookies']?.[this[_0x286af9(0x410)]['cookieName']],_0x225c96=_0x3d2aac||_0x1c6d02;if(!_0x225c96)return{'isAuthenticated':![],'isSystem':![],'user':null};const _0x1834fe=this['authenticateToken'](_0x225c96);if(!_0x1834fe)return{'isAuthenticated':![],'isSystem':![],'user':null};const _0x215b9c={'id':_0x1834fe[_0x286af9(0x350)]??null,'username':_0x1834fe[_0x286af9(0x5b1)]??null,'roles':Array[_0x286af9(0x3c6)](_0x1834fe['roles'])?_0x1834fe['roles']:[],'isAuthenticated':!![],'isSystem':![]};return{'id':_0x215b9c['id'],'username':_0x215b9c[_0x286af9(0x5b1)],'roles':_0x215b9c[_0x286af9(0x4b1)],'isAuthenticated':!![],'isSystem':![],'user':_0x215b9c,'claims':_0x1834fe,'subject':_0x215b9c['id']};}async[_0x23f3bd(0x353)](_0x56a224,_0x2150b3={}){const _0x505eb7=_0x23f3bd,_0x167c28=_0x54c93a(_0x56a224),_0x13d5a3=Array[_0x505eb7(0x3c6)](_0x2150b3['allowedAlgs'])&&_0x2150b3[_0x505eb7(0x3f8)]['length']>0x0?_0x2150b3[_0x505eb7(0x3f8)]:[_0x505eb7(0x57c),_0x505eb7(0x3e7)],_0x4c61b1=_0x167c28[_0x505eb7(0x24c)]?.[_0x505eb7(0x20e)];if(!_0x13d5a3[_0x505eb7(0x580)](_0x4c61b1))throw new Error('Unsupported\x20JWT\x20alg:\x20'+_0x4c61b1);if(!_0x167c28[_0x505eb7(0x24c)]?.[_0x505eb7(0x4e4)])throw new Error(_0x505eb7(0x173));const _0x51143d=await this[_0x505eb7(0x194)](_0x2150b3);if(!_0x51143d?.['jwks_uri'])throw new Error(_0x505eb7(0xfa));const _0x3f1b5b=await this['_getJwkKey'](_0x51143d[_0x505eb7(0x2ec)],_0x167c28[_0x505eb7(0x24c)][_0x505eb7(0x4e4)],_0x2150b3);if(!_0x1ed931(_0x4c61b1,_0x3f1b5b,_0x167c28[_0x505eb7(0x2f4)],_0x167c28[_0x505eb7(0x38b)]))throw new Error(_0x505eb7(0x56a));const _0x2e2108=Math[_0x505eb7(0x33d)](Date[_0x505eb7(0x46e)]()/0x3e8),_0x43398c=_0x167c28[_0x505eb7(0x25a)]||{};if(_0x43398c[_0x505eb7(0x2e2)]!==_0x51143d[_0x505eb7(0x82)])throw new Error(_0x505eb7(0x297));const _0x1e8cb2=_0x2150b3['audience'];if(_0x1e8cb2){const _0x2d19bc=_0x47cd1b(_0x43398c[_0x505eb7(0x27e)]);if(!_0x2d19bc[_0x505eb7(0x580)](_0x1e8cb2))throw new Error('JWT\x20audience\x20mismatch');}if(typeof _0x43398c[_0x505eb7(0x4a6)]!==_0x505eb7(0x2af)||_0x43398c[_0x505eb7(0x4a6)]<=_0x2e2108)throw new Error(_0x505eb7(0x5ae));if(_0x43398c[_0x505eb7(0xe0)]!=null&&_0x43398c[_0x505eb7(0xe0)]>_0x2e2108)throw new Error('JWT\x20not\x20yet\x20valid');if(_0x43398c['token_use']==='id')throw new Error(_0x505eb7(0x2fa));return{'subject':_0x43398c[_0x505eb7(0x350)]??null,'email':_0x43398c[_0x505eb7(0x157)]??null,'scopes':typeof _0x43398c['scope']===_0x505eb7(0xa0)?_0x43398c['scope'][_0x505eb7(0x48e)](/\s+/)['filter'](Boolean):[],'claims':_0x43398c,'tokenType':_0x505eb7(0x3d9)};}async['_getOidcDiscovery'](_0x454a4a={}){const _0x4ad0a4=_0x23f3bd,_0x5ae744=String(_0x454a4a[_0x4ad0a4(0x82)]||'')[_0x4ad0a4(0x327)](/\/+$/,'');if(!_0x5ae744)return null;const _0x564471=Number[_0x4ad0a4(0xb6)](_0x454a4a[_0x4ad0a4(0x2ca)])?_0x454a4a['discoveryTtlMs']:0xa*0x3c*0x3e8;if(this['_oidcDiscoveryCache']?.[_0x4ad0a4(0x82)]===_0x5ae744&&this[_0x4ad0a4(0x593)]['expiresAt']>Date[_0x4ad0a4(0x46e)]())return this[_0x4ad0a4(0x593)][_0x4ad0a4(0x268)];const _0x45fdcd=await _0x22d4b6(_0x5ae744+_0x4ad0a4(0x547)),_0x93e5ca={'issuer':_0x45fdcd[_0x4ad0a4(0x82)]||_0x5ae744,'authorization_endpoint':_0x454a4a[_0x4ad0a4(0x1c2)]||_0x45fdcd['authorization_endpoint'],'token_endpoint':_0x454a4a['tokenUrl']||_0x45fdcd[_0x4ad0a4(0x1f5)],'jwks_uri':_0x454a4a['jwksUri']||_0x45fdcd[_0x4ad0a4(0x2ec)]};return this[_0x4ad0a4(0x593)]={'issuer':_0x5ae744,'value':_0x93e5ca,'expiresAt':Date[_0x4ad0a4(0x46e)]()+_0x564471},_0x93e5ca;}async[_0x23f3bd(0x4ab)](_0x444bee,_0x484e98=0x5*0x3c*0x3e8){const _0x320a35=_0x23f3bd,_0xc78922=await _0x22d4b6(_0x444bee),_0x42e31c=new Map();for(const _0xe68267 of _0xc78922['keys']||[]){if(!_0xe68267?.['kid'])continue;_0x42e31c['set'](_0xe68267['kid'],_0x5e92b0(_0xe68267));}return this[_0x320a35(0x83)]={'uri':_0x444bee,'keys':_0x42e31c,'expiresAt':Date[_0x320a35(0x46e)]()+_0x484e98},this[_0x320a35(0x83)];}async['_getJwkKey'](_0x4a9bbf,_0x210adc,_0x2f1f55={}){const _0x4ffadd=_0x23f3bd,_0x1618f0=Number[_0x4ffadd(0xb6)](_0x2f1f55[_0x4ffadd(0x26e)])?_0x2f1f55[_0x4ffadd(0x26e)]:0x5*0x3c*0x3e8,_0x39bdb0=0x1e*0x3e8,_0x1166ec=this['_jwksNegativeCache'][_0x4ffadd(0x3b2)](_0x210adc);if(_0x1166ec!==undefined&&_0x1166ec>Date[_0x4ffadd(0x46e)]())throw new Error(_0x4ffadd(0x4cc)+_0x210adc);(!this[_0x4ffadd(0x83)]||this[_0x4ffadd(0x83)][_0x4ffadd(0x282)]!==_0x4a9bbf||this[_0x4ffadd(0x83)][_0x4ffadd(0x407)]<=Date[_0x4ffadd(0x46e)]())&&await this[_0x4ffadd(0x4ab)](_0x4a9bbf,_0x1618f0);let _0x415c41=this[_0x4ffadd(0x83)]?.[_0x4ffadd(0x180)]?.[_0x4ffadd(0x3b2)](_0x210adc);if(_0x415c41)return _0x415c41;await this['_fetchJwks'](_0x4a9bbf,_0x1618f0),_0x415c41=this['_jwksCache']?.[_0x4ffadd(0x180)]?.['get'](_0x210adc);if(!_0x415c41){this[_0x4ffadd(0x169)][_0x4ffadd(0xff)](_0x210adc,Date['now']()+_0x39bdb0);throw new Error(_0x4ffadd(0x4cc)+_0x210adc);}return _0x415c41;}[_0x23f3bd(0x1e7)](_0x1c4bb4){const _0x4de5b3=_0x23f3bd;if(this[_0x4de5b3(0x318)]?.['auth'])return this[_0x4de5b3(0x318)][_0x4de5b3(0x410)][_0x4de5b3(0x1e7)](_0x1c4bb4);const _0x8028cf=_0x1c4bb4?.[_0x4de5b3(0x19d)]||{},_0x8686b4={'sub':_0x1c4bb4?.['subject']??_0x8028cf['sub']??null,'email':_0x1c4bb4?.[_0x4de5b3(0x157)]??_0x8028cf[_0x4de5b3(0x157)]??null,'name':_0x1c4bb4?.[_0x4de5b3(0x4a9)]??_0x8028cf[_0x4de5b3(0x4a9)]??_0x8028cf['preferred_username']??null,'groups':_0x1c4bb4?.[_0x4de5b3(0x37e)]??_0x8028cf[_0x4de5b3(0x37e)]??[],'roles':_0x1c4bb4?.[_0x4de5b3(0x4b1)]??_0x8028cf[_0x4de5b3(0x4b1)]??[]};return{'type':_0x4de5b3(0x9d),'tokenType':_0x1c4bb4?.[_0x4de5b3(0x152)]??_0x4de5b3(0x3d9),'subject':_0x8686b4['sub'],'email':_0x8686b4[_0x4de5b3(0x157)],'scopes':_0x1c4bb4?.[_0x4de5b3(0x3a1)]??_0x8028cf[_0x4de5b3(0x530)]?.['split']?.('\x20')?.[_0x4de5b3(0x398)](Boolean)??[],'claims':_0x8028cf,'user':_0x8686b4,'isAuthenticated':!![]};}[_0x23f3bd(0x414)](_0x23668e={},_0x3f3e05=0x927c0){const _0x2d71c1=_0x23f3bd;if(this[_0x2d71c1(0x318)]?.['auth'])return this[_0x2d71c1(0x318)][_0x2d71c1(0x410)][_0x2d71c1(0x414)](_0x23668e,_0x3f3e05);const _0x218cc7=_0xfbdbe5(0x18);this[_0x2d71c1(0x303)]['set'](_0x218cc7,{..._0x23668e,'exp':Date[_0x2d71c1(0x46e)]()+_0x3f3e05});if(this[_0x2d71c1(0x303)][_0x2d71c1(0x38f)]%0x32===0x0){const _0x596750=Date[_0x2d71c1(0x46e)]();for(const [_0x551bb5,_0x421448]of this[_0x2d71c1(0x303)]){if(_0x421448['exp']<=_0x596750)this[_0x2d71c1(0x303)][_0x2d71c1(0x4f4)](_0x551bb5);}}return _0x218cc7;}[_0x23f3bd(0x4bd)](_0xc9c7fa){const _0x4fae41=_0x23f3bd;if(this[_0x4fae41(0x318)]?.[_0x4fae41(0x410)])return this[_0x4fae41(0x318)][_0x4fae41(0x410)][_0x4fae41(0x4bd)](_0xc9c7fa);if(!_0xc9c7fa)return null;const _0x48e919=this[_0x4fae41(0x303)][_0x4fae41(0x3b2)](_0xc9c7fa);this[_0x4fae41(0x303)][_0x4fae41(0x4f4)](_0xc9c7fa);if(!_0x48e919)return null;if(_0x48e919[_0x4fae41(0x4a6)]<=Date[_0x4fae41(0x46e)]())return null;return _0x48e919;}}function _0x3a1f05(_0x34b213){const _0x248a1a=_0x23f3bd;if(_0x34b213==null)return{'status':0xcc};if(Buffer[_0x248a1a(0x2cb)](_0x34b213)||_0x352ffe(_0x34b213))return{'status':0xc8,'body':_0x34b213};if(typeof _0x34b213===_0x248a1a(0x257)&&_0x248a1a(0x1fe)in _0x34b213){if(!(_0x248a1a(0x93)in _0x34b213)&&!_0x352ffe(_0x34b213['body'])){const {status:_0x520c66,headers:_0x1ebb2f,..._0x369785}=_0x34b213;if(Object[_0x248a1a(0x180)](_0x369785)[_0x248a1a(0x42c)]>0x0)return{'status':_0x520c66,'headers':_0x1ebb2f,'body':_0x369785};}return _0x34b213;}return{'status':0xc8,'body':_0x34b213};}function _0x352ffe(_0x355031){const _0x17c1d8=_0x23f3bd;return _0x355031&&typeof _0x355031[_0x17c1d8(0x458)]===_0x17c1d8(0x47f);}function _0x5b3fb8(_0x539fb6,_0x2c596a){const _0x459e82=_0x23f3bd,{PassThrough:_0x5f04e7}=require$$8;let _0x53a1f3=0x0,_0x9b9f7e=![];const _0x5d06f9=new _0x5f04e7();return _0x539fb6['on'](_0x459e82(0x516),_0x305f92=>{const _0x22c3cb=_0x459e82;if(_0x9b9f7e)return;_0x53a1f3+=_0x305f92[_0x22c3cb(0x42c)];if(_0x53a1f3>_0x2c596a){_0x9b9f7e=!![];const _0x56ef7c=new Error(_0x22c3cb(0x200));_0x56ef7c[_0x22c3cb(0x1fe)]=0x19d,_0x5d06f9[_0x22c3cb(0x3a9)](_0x56ef7c);return;}if(!_0x5d06f9[_0x22c3cb(0x2f7)])_0x5d06f9[_0x22c3cb(0x591)](_0x305f92);}),_0x539fb6['on'](_0x459e82(0x322),()=>{const _0xb73367=_0x459e82;!_0x9b9f7e&&!_0x5d06f9['destroyed']&&(_0x9b9f7e=!![],_0x5d06f9[_0xb73367(0x322)]());}),_0x539fb6['on']('error',_0x295ed4=>{const _0x361d5c=_0x459e82;if(!_0x5d06f9[_0x361d5c(0x2f7)])_0x5d06f9[_0x361d5c(0x3a9)](_0x295ed4);}),_0x539fb6[_0x459e82(0x206)](),_0x5d06f9['on'](_0x459e82(0x28f),()=>{const _0x139ea1=_0x459e82;if(!_0x5d06f9[_0x139ea1(0x2f7)])_0x539fb6[_0x139ea1(0x28f)]();}),_0x5d06f9;}function _0x3946b6(_0x3c7c2e,_0x3f7700){const _0x329de2=_0x23f3bd;if(_0x3c7c2e[_0x329de2(0x2db)]==='GET'||_0x3c7c2e[_0x329de2(0x2db)]===_0x329de2(0x3b6))return null;const _0x485afd=_0x3c7c2e[_0x329de2(0x55d)]?.[_0x329de2(0x575)];if(_0x485afd!=null){const _0x2d9f92=Number(_0x485afd);if(Number['isFinite'](_0x2d9f92)&&_0x2d9f92>_0x3f7700){const _0x422524=new Error(_0x329de2(0x200));_0x422524[_0x329de2(0x1fe)]=0x19d;throw _0x422524;}}return new Promise((_0x1e1822,_0x1e869e)=>{const _0x4dd50d=_0x329de2;let _0x5ce630='',_0x1eb6cc=0x0;_0x3c7c2e['on']('data',_0x536ed5=>{const _0x1d89ec=_0x240c;_0x1eb6cc+=_0x536ed5[_0x1d89ec(0x42c)];if(_0x1eb6cc>_0x3f7700){try{_0x3c7c2e[_0x1d89ec(0x3a9)]();}catch{}const _0xef1b09=new Error('Payload\x20too\x20large');_0xef1b09[_0x1d89ec(0x1fe)]=0x19d,_0x1e869e(_0xef1b09);return;}_0x5ce630+=_0x536ed5;}),_0x3c7c2e['on'](_0x4dd50d(0x322),()=>{const _0x2b77dc=_0x4dd50d;if(!_0x5ce630)return _0x1e1822(null);const _0x2523a5=_0x3c7c2e[_0x2b77dc(0x55d)]?.['content-type']||'';if(_0x2523a5[_0x2b77dc(0x580)](_0x2b77dc(0xfe))){const _0x1648b9={};for(const [_0x26e45b,_0x3e978d]of new URLSearchParams(_0x5ce630))_0x1648b9[_0x26e45b]=_0x3e978d;return _0x1e1822(_0x1648b9);}try{_0x1e1822(JSON['parse'](_0x5ce630));}catch(_0x2c95fd){_0x1e869e(_0x2c95fd);}}),_0x3c7c2e['on'](_0x4dd50d(0x3b8),_0x1e869e);});}function _0x180d63(_0x4ad91f,_0x41dec7){const _0x11cca0=_0x23f3bd,{status:status=0xc8,headers:headers={},body:_0x7ffdff}=_0x41dec7;_0x4ad91f[_0x11cca0(0x337)]=status;for(const [_0x132a75,_0x5c4549]of Object[_0x11cca0(0x26f)](headers)){_0x4ad91f[_0x11cca0(0x26d)](_0x132a75,_0x5c4549);}if(_0x7ffdff==null){_0x4ad91f['end']();return;}if(_0x352ffe(_0x7ffdff)){_0x7ffdff['pipe'](_0x4ad91f);return;}if(Buffer['isBuffer'](_0x7ffdff)){_0x4ad91f['end'](_0x7ffdff);return;}if(typeof _0x7ffdff==='object'){!_0x4ad91f[_0x11cca0(0x40f)](_0x11cca0(0x32c))&&_0x4ad91f['setHeader']('Content-Type',_0x11cca0(0x478));_0x4ad91f[_0x11cca0(0x322)](JSON[_0x11cca0(0x4c1)](_0x7ffdff));return;}_0x4ad91f['end'](String(_0x7ffdff));}return okdbHttp[_0x23f3bd(0x59c)]=_0x5cb5f3,okdbHttp[_0x23f3bd(0x59c)][_0x23f3bd(0x2ae)]=_0x48be03,okdbHttp[_0x23f3bd(0x59c)];}var hasRequiredOkdb;function requireOkdb(){const _0x488bc5=_0x17fdfc;if(hasRequiredOkdb)return okdb$1;hasRequiredOkdb=0x1;try{process['loadEnvFile']();}catch{}const _0x25d216=require$$1,_0x36b20d=require$$1$1,{resolveWorkers:_0x52a63f,isShmbufNative:_0xd8a116}=requireOkdbWorkers();function _0x35d3c9(_0xe33866){const _0x5a176a=_0x240c,_0x519e3a=_0xe33866[_0x5a176a(0x5f5)](0x2),_0x24d364={};let _0x50e582=0x0;while(_0x50e582<_0x519e3a[_0x5a176a(0x42c)]){const _0x163368=_0x519e3a[_0x50e582];if(_0x163368===_0x5a176a(0x101)||_0x163368==='-p')_0x24d364[_0x5a176a(0x2aa)]=Number(_0x519e3a[++_0x50e582]);else{if(_0x163368==='--path'||_0x163368==='-d')_0x24d364['path']=_0x519e3a[++_0x50e582];else{if(_0x163368==='--key'||_0x163368==='-k')_0x24d364[_0x5a176a(0x8b)]=_0x519e3a[++_0x50e582];else{if(_0x163368==='--config'||_0x163368==='-c')_0x24d364[_0x5a176a(0x312)]=_0x519e3a[++_0x50e582];else{if(_0x163368===_0x5a176a(0x569))_0x24d364[_0x5a176a(0x14b)]=_0x519e3a[++_0x50e582];else{if(_0x163368===_0x5a176a(0x36a))_0x24d364[_0x5a176a(0x432)]=!![];else{if(_0x163368===_0x5a176a(0x5a1))_0x24d364[_0x5a176a(0x1ea)]=!![];else{if(_0x163368===_0x5a176a(0x3d5))_0x24d364[_0x5a176a(0x17e)]=_0x519e3a[++_0x50e582];else{if(_0x163368===_0x5a176a(0x340))_0x24d364[_0x5a176a(0x7f)]=!![];else{if(_0x163368===_0x5a176a(0x578)||_0x163368==='-e')_0x24d364[_0x5a176a(0x1d9)]=_0x519e3a[++_0x50e582];else{if(_0x163368==='--types')_0x24d364['types']=_0x519e3a[++_0x50e582];else{if(_0x163368===_0x5a176a(0x51c))_0x24d364[_0x5a176a(0x545)]=!![];else{if(_0x163368===_0x5a176a(0x171))_0x24d364['blobs']=!![];else{if(_0x163368===_0x5a176a(0x38c))_0x24d364[_0x5a176a(0x4d0)]=!![];else{if(_0x163368===_0x5a176a(0x3f5)){const _0x486ffb=[];while(_0x50e582+0x1<_0x519e3a['length']&&!_0x519e3a[_0x50e582+0x1][_0x5a176a(0x3ad)]('--')){_0x486ffb['push'](_0x519e3a[++_0x50e582]);}_0x24d364[_0x5a176a(0x54e)]=_0x486ffb[_0x5a176a(0x42c)]>0x0?_0x486ffb:!![];}else{if(_0x163368===_0x5a176a(0x275))_0x24d364['logRequests']=!![];else{if(_0x163368===_0x5a176a(0x5af))_0x24d364[_0x5a176a(0x4a9)]=_0x519e3a[++_0x50e582];else{if(_0x163368===_0x5a176a(0x2e0))_0x24d364['password']=_0x519e3a[++_0x50e582];else{if(_0x163368===_0x5a176a(0x58d))_0x24d364[_0x5a176a(0x52c)]=_0x519e3a[++_0x50e582];else{if(_0x163368===_0x5a176a(0x4c4))_0x24d364['permissions']=_0x519e3a[++_0x50e582];else{if(_0x163368==='--grants')_0x24d364[_0x5a176a(0x1a2)]=_0x519e3a[++_0x50e582];else{if(_0x163368===_0x5a176a(0x81))_0x24d364[_0x5a176a(0x2b7)]=_0x519e3a[++_0x50e582];else{if(_0x163368===_0x5a176a(0x30f))_0x24d364['token']=_0x519e3a[++_0x50e582];else{if(_0x163368===_0x5a176a(0x321)||_0x163368==='-u')_0x24d364[_0x5a176a(0x5b1)]=_0x519e3a[++_0x50e582];else{if(_0x163368===_0x5a176a(0x363))_0x24d364[_0x5a176a(0x5c3)]=_0x519e3a[++_0x50e582];else{if(_0x163368===_0x5a176a(0x5da)||_0x163368==='-v'){const _0x214923=require$$3;console[_0x5a176a(0x5f4)](_0x214923[_0x5a176a(0x2e3)]),process['exit'](0x0);}else(_0x163368===_0x5a176a(0x223)||_0x163368==='-h')&&(_0x307ab7(),process[_0x5a176a(0x155)](0x0));}}}}}}}}}}}}}}}}}}}}}}}}}_0x50e582++;}return _0x24d364;}function _0x307ab7(){const _0x45f3ca=_0x240c;console[_0x45f3ca(0x5f4)](_0x45f3ca(0x28d));}const _0x3941e4=new Set([_0x488bc5(0x10f),_0x488bc5(0x59a),'warn',_0x488bc5(0x3b8)]);function _0x5d1c00(_0x2241b1){const _0x343643=_0x488bc5,_0xff3e57=_0x2241b1[_0x343643(0x312)]?_0x25d216[_0x343643(0x535)](_0x2241b1[_0x343643(0x312)]):_0x25d216[_0x343643(0x535)](_0x343643(0x611));let _0xb771bd={};if(_0x36b20d['existsSync'](_0xff3e57))try{const _0x3d56fc=_0x36b20d[_0x343643(0x5b3)](_0xff3e57,'utf8')[_0x343643(0x327)](/^\uFEFF/,'');_0xb771bd=JSON[_0x343643(0x400)](_0x3d56fc),console['log'](_0x343643(0x30d)+_0xff3e57);}catch(_0x59e314){console[_0x343643(0x3b8)]('[okdb]\x20failed\x20to\x20parse\x20config\x20file\x20'+_0xff3e57+':\x20'+_0x59e314[_0x343643(0x491)]),process[_0x343643(0x155)](0x1);}const _0x32d268={'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},_0x29fa5e={'port':_0x2241b1['port']??_0xb771bd[_0x343643(0x2aa)]??_0x32d268[_0x343643(0x2aa)]??0x2124,'dbPath':_0x2241b1['path']??_0xb771bd[_0x343643(0x366)]??_0x32d268[_0x343643(0x366)]??_0x343643(0x2d2),'key':_0x2241b1[_0x343643(0x8b)]??_0xb771bd[_0x343643(0x8b)]??_0x32d268['key']??undefined,'logLevel':_0x2241b1[_0x343643(0x14b)]??_0xb771bd[_0x343643(0x14b)]??_0x32d268[_0x343643(0x14b)]??'info','noRepl':_0x2241b1['noRepl']??_0xb771bd[_0x343643(0x432)]??_0x32d268[_0x343643(0x432)]??![],'noAdmin':_0x2241b1[_0x343643(0x1ea)]??_0xb771bd[_0x343643(0x1ea)]??_0x32d268[_0x343643(0x1ea)]??![],'admin':_0xb771bd[_0x343643(0x3f3)]??{},'api':_0xb771bd[_0x343643(0x4b7)]??undefined,'auth':_0xb771bd[_0x343643(0x410)]??undefined,'mcp':_0xb771bd['mcp']??undefined,'http':_0xb771bd[_0x343643(0x19e)]??undefined,'timeMachine':_0xb771bd[_0x343643(0x5bd)]!==![]?_0xb771bd[_0x343643(0x5bd)]??{}:![]};if(_0x2241b1['noCluster'])_0x29fa5e[_0x343643(0x7f)]=!![];if(_0x2241b1['workers']!==undefined)_0x29fa5e[_0x343643(0x3e1)]=_0x2241b1['workers'];return _0x2241b1[_0x343643(0x54e)]!==undefined&&(_0x29fa5e[_0x343643(0x410)]=_0x29fa5e['auth']||{},_0x29fa5e[_0x343643(0x410)][_0x343643(0x54e)]=_0x2241b1['open']),_0x2241b1['logRequests']&&(_0x29fa5e[_0x343643(0x10f)]=_0x29fa5e[_0x343643(0x10f)]||{},_0x29fa5e[_0x343643(0x10f)][_0x343643(0x450)]=!![]),(!Number['isInteger'](_0x29fa5e[_0x343643(0x2aa)])||_0x29fa5e[_0x343643(0x2aa)]<0x1||_0x29fa5e[_0x343643(0x2aa)]>0xffff)&&(console[_0x343643(0x3b8)](_0x343643(0x31d)+_0x29fa5e[_0x343643(0x2aa)]+_0x343643(0x13e)),process[_0x343643(0x155)](0x1)),!_0x3941e4[_0x343643(0x1b4)](_0x29fa5e[_0x343643(0x14b)])&&(console[_0x343643(0x3b8)](_0x343643(0x3b9)+_0x29fa5e[_0x343643(0x14b)]+_0x343643(0x175)),process[_0x343643(0x155)](0x1)),_0x29fa5e;}function _0xd01c17(_0x26570e){const _0x283184=_0x488bc5;return!!(_0x26570e&&typeof _0x26570e==='object'&&!Array[_0x283184(0x3c6)](_0x26570e)&&Object[_0x283184(0x180)](_0x26570e)[_0x283184(0x42c)]>0x0);}const _0xb7d5a6=!process['stdout'][_0x488bc5(0x281)]||!!process.env.NO_COLOR;function _0x51b4c3(_0x170e66,_0x517ee0){return _0xb7d5a6?_0x517ee0:'\x1b['+_0x170e66+'m'+_0x517ee0+'\x1b[0m';}function _0x199f3c(_0x201267){const _0x147b88=_0x488bc5;if(!_0x201267||_0x201267[_0x147b88(0x42c)]===0x0)return;const _0x5cf263='─'['repeat'](0x38);process['stderr'][_0x147b88(0x288)]('\x0a'),process[_0x147b88(0x1b8)][_0x147b88(0x288)](_0x51b4c3('33',_0x147b88(0x368)+_0x201267[_0x147b88(0x42c)]+_0x147b88(0x51d)+(_0x201267['length']>0x1?'S':'')+'\x0a')),process[_0x147b88(0x1b8)]['write']('\x20\x20'+_0x5cf263+'\x0a');for(const _0x35181f of _0x201267){const _0x191675=_0x35181f[_0x147b88(0x1cf)]==='error'?_0x51b4c3('31',_0x147b88(0x2d5)):_0x51b4c3('33','\x20\x20⚠');process['stderr'][_0x147b88(0x288)](_0x191675+'\x20\x20'+_0x51b4c3('1',_0x35181f[_0x147b88(0x3a5)])+'\x0a'),process[_0x147b88(0x1b8)][_0x147b88(0x288)](_0x147b88(0x316)+_0x35181f[_0x147b88(0x491)]+'\x0a');if(_0x35181f[_0x147b88(0x374)])process[_0x147b88(0x1b8)][_0x147b88(0x288)](_0x147b88(0x316)+_0x51b4c3('2','Hint:\x20'+_0x35181f[_0x147b88(0x374)])+'\x0a');process[_0x147b88(0x1b8)][_0x147b88(0x288)]('\x0a');}process['stderr'][_0x147b88(0x288)]('\x20\x20'+_0x5cf263+'\x0a\x0a');}function _0xca9dc3(_0x5ee44f,_0x1eac0f,_0x9fde4={}){const _0x2330d7=_0x488bc5,_0x32ff8d=_0x5ee44f[_0x2330d7(0x19e)]['listen'](_0x1eac0f,_0x9fde4);if(_0x32ff8d&&_0x32ff8d[_0x2330d7(0x9a)])return Promise['resolve'](_0x32ff8d);return new Promise((_0x2254b6,_0xbd3e82)=>{const _0x130e00=_0x2330d7;_0x32ff8d['once']('listening',_0x2254b6),_0x32ff8d[_0x130e00(0x2e6)](_0x130e00(0x3b8),_0xbd3e82);});}async function _0x261629(_0xa2449e){const _0x5911be=_0x488bc5,_0x3a265f=require$$4$1;console[_0x5911be(0x5f4)](_0x5911be(0x597));let _0x4910e3=!![];const _0x2fc6cb=(_0xababb0,_0x3fbe0f)=>{const _0x199352=_0x5911be;console[_0x199352(0x5f4)]('\x20\x20'+(_0xababb0?'✓':'✗')+'\x20'+_0x3fbe0f);if(!_0xababb0)_0x4910e3=![];},_0x5a2351=Number(process['version'][_0x5911be(0x327)]('v','')[_0x5911be(0x48e)]('.')[0x0]);_0x2fc6cb(_0x5a2351>=0x12,_0x5911be(0x34d)+process[_0x5911be(0x2e3)]+(_0x5a2351<0x12?_0x5911be(0xde):''));const _0xbca421=_0x25d216[_0x5911be(0x535)](_0xa2449e['dbPath']);try{_0x36b20d['mkdirSync'](_0xbca421,{'recursive':!![]});const _0xdabf42=_0x25d216['join'](_0xbca421,_0x5911be(0x1c9));_0x36b20d[_0x5911be(0x111)](_0xdabf42,''),_0x36b20d['unlinkSync'](_0xdabf42),_0x2fc6cb(!![],'database\x20path\x20writable:\x20'+_0xbca421);}catch(_0xa75d09){_0x2fc6cb(![],_0x5911be(0xd6)+_0xbca421+_0x5911be(0x4b3)+_0xa75d09[_0x5911be(0x491)]+')');}const _0x5d2f91=await new Promise(_0x3b594e=>{const _0x361c1f=_0x5911be,_0x67702=_0x3a265f[_0x361c1f(0xa1)]();_0x67702[_0x361c1f(0x2e6)]('error',()=>_0x3b594e(![])),_0x67702[_0x361c1f(0x2e6)](_0x361c1f(0x2f2),()=>{_0x67702['close'](),_0x3b594e(!![]);}),_0x67702[_0x361c1f(0x55b)](_0xa2449e[_0x361c1f(0x2aa)],_0x361c1f(0x5ef));});_0x2fc6cb(_0x5d2f91,'port\x20'+_0xa2449e['port']+'\x20'+(_0x5d2f91?_0x5911be(0x375):_0x5911be(0x166)));const _0x178248=_0x25d216[_0x5911be(0x535)](_0x5911be(0x611));if(_0x36b20d[_0x5911be(0x3e6)](_0x178248))try{JSON[_0x5911be(0x400)](_0x36b20d[_0x5911be(0x5b3)](_0x178248,_0x5911be(0x1bb))[_0x5911be(0x327)](/^\uFEFF/,'')),_0x2fc6cb(!![],'config\x20file\x20valid:\x20'+_0x178248);}catch(_0x421f29){_0x2fc6cb(![],_0x5911be(0x1ca)+_0x421f29['message']);}else _0x2fc6cb(!![],_0x5911be(0x465));if(_0xd8a116()){const _0x3fdb1b=_0x52a63f(_0xa2449e,{'shmbufNative':!![]});_0x2fc6cb(!![],_0x5911be(0x4db)+_0x3fdb1b+_0x5911be(0x483)+(_0x3fdb1b===0x1?'':'s')+')');}else _0x2fc6cb(!![],_0x5911be(0x59e));if(!_0x5d2f91)try{const _0x276641=require(_0x5911be(0x124)),_0x19b26d=new _0x276641(_0xbca421,{'engines':![],'asyncProcessors':![],'compaction':_0x5911be(0x241),'http':![],'bus':![],'auth':{'open':!![]}});await _0x19b26d[_0x5911be(0x54e)]();try{await _0x19b26d['processes'][_0x5911be(0x54e)]({'reader':!![]});const _0x1709ae=_0x19b26d['processes']['listNodes'](),_0x4dea87=_0x1709ae['filter'](_0x26f58a=>_0x26f58a[_0x5911be(0x1ba)]!=null)[_0x5911be(0x42c)];_0x2fc6cb(!![],_0x5911be(0x34a)+_0x1709ae[_0x5911be(0x42c)]+_0x5911be(0x42b)+(_0x1709ae[_0x5911be(0x42c)]===0x1?'':'es')+'\x20('+_0x4dea87+_0x5911be(0x280));}finally{await _0x19b26d[_0x5911be(0x1ab)]();}}catch{}console[_0x5911be(0x5f4)](''),_0x4910e3?console['log'](_0x5911be(0x43a)):(console[_0x5911be(0x5f4)]('\x20\x20Some\x20checks\x20failed.\x0a'),process[_0x5911be(0x155)](0x1));}async function _0x1a17f7(){const _0x1d31c5=_0x488bc5,_0x128709=_0x25d216[_0x1d31c5(0x535)](_0x1d31c5(0x611));!_0x36b20d['existsSync'](_0x128709)?(_0x36b20d[_0x1d31c5(0x111)](_0x128709,JSON['stringify']({'port':0x2124,'path':'./okdb-data','logLevel':_0x1d31c5(0x59a),'noRepl':![],'noAdmin':![]},null,0x2)+'\x0a'),console['log'](_0x1d31c5(0x17a))):console[_0x1d31c5(0x5f4)](_0x1d31c5(0x2ac));const _0x332be1=_0x25d216[_0x1d31c5(0x535)]('./okdb-data');!_0x36b20d[_0x1d31c5(0x3e6)](_0x332be1)?(_0x36b20d[_0x1d31c5(0x33a)](_0x332be1,{'recursive':!![]}),console[_0x1d31c5(0x5f4)](_0x1d31c5(0x1fa))):console['log'](_0x1d31c5(0x228)),console[_0x1d31c5(0x5f4)](_0x1d31c5(0x496));}async function _0x2addb5(_0x72c984){const _0x28b368=_0x488bc5,_0x3725f8=_0x25d216['resolve'](_0x72c984[_0x28b368(0x386)]);if(!_0x36b20d['existsSync'](_0x3725f8)){console[_0x28b368(0x5f4)](_0x28b368(0x133)+_0x3725f8+_0x28b368(0x33f));return;}const _0x359940=require$$0$2,_0x2c9837=_0x359940[_0x28b368(0xd7)]({'input':process[_0x28b368(0x4df)],'output':process['stdout']}),_0xbe7901=await new Promise(_0x5bb3a0=>_0x2c9837[_0x28b368(0x562)](_0x28b368(0x40e)+_0x3725f8+_0x28b368(0x1e5),_0x5bb3a0));_0x2c9837[_0x28b368(0x1ab)](),console['log']('');if(_0xbe7901[_0x28b368(0x2a6)]()[_0x28b368(0x550)]()!=='yes'){console['log'](_0x28b368(0x31b));return;}let _0x1db553=null;try{_0x1db553=await _0x1ef3e(_0x3725f8,_0x72c984,async _0x3a5fe5=>{const _0x243d8c=_0x28b368,_0x557f8b=_0x3a5fe5[_0x243d8c(0x229)],_0x52ad9b=_0x557f8b?.['db']?.[_0x243d8c(0x3b2)](_0x243d8c(0x5a5))??null,_0x573a5f=[];if(_0x557f8b?.[_0x243d8c(0x44c)](_0x243d8c(0x537)))for(const {key:_0x40d449,value:_0x2416ef}of _0x557f8b[_0x243d8c(0x610)](_0x243d8c(0x537))){_0x573a5f['push']({'key':_0x40d449,'value':_0x2416ef});}return{'identity':_0x52ad9b,'licenses':_0x573a5f};});}catch(_0x1e2c7c){console[_0x28b368(0x5f4)]('[okdb]\x20warning:\x20could\x20not\x20read\x20node\x20identity/licenses\x20before\x20reset\x20('+_0x1e2c7c[_0x28b368(0x491)]+_0x28b368(0x143));}_0x36b20d[_0x28b368(0x2dc)](_0x3725f8,{'recursive':!![],'force':!![]}),console['log'](_0x28b368(0x4a8)+_0x3725f8+_0x28b368(0x109));if(_0x1db553&&(_0x1db553['identity']||_0x1db553[_0x28b368(0x5ab)][_0x28b368(0x42c)]>0x0))try{await _0x1ef3e(_0x3725f8,_0x72c984,async _0x1e1212=>{const _0x193447=_0x28b368,_0x48d351=_0x1e1212[_0x193447(0x229)];_0x1db553['identity']&&_0x48d351['db']['putSync'](_0x193447(0x5a5),_0x1db553[_0x193447(0x5dc)]);if(_0x1db553[_0x193447(0x5ab)][_0x193447(0x42c)]>0x0){if(!_0x48d351[_0x193447(0x44c)](_0x193447(0x537)))await _0x48d351[_0x193447(0x43f)](_0x193447(0x537));for(const {key:_0x4949e9,value:_0x3c55db}of _0x1db553[_0x193447(0x5ab)]){await _0x48d351[_0x193447(0x310)](_0x193447(0x537),_0x4949e9,_0x3c55db);}}});const _0x2f295a=[];if(_0x1db553[_0x28b368(0x5dc)])_0x2f295a[_0x28b368(0x591)](_0x28b368(0x2c1));if(_0x1db553[_0x28b368(0x5ab)]['length']>0x0)_0x2f295a['push'](_0x1db553[_0x28b368(0x5ab)][_0x28b368(0x42c)]+_0x28b368(0x40d));console[_0x28b368(0x5f4)](_0x28b368(0x532)+_0x2f295a[_0x28b368(0x4b5)](_0x28b368(0x500)));}catch(_0xb24a2){console['log'](_0x28b368(0x5c5)+_0xb24a2[_0x28b368(0x491)]);}}async function _0x1ef3e(_0x4038af,_0x37fde1,_0x5f31f9){const _0x39693a=_0x488bc5,_0x1711ca=require$$5,_0x36a3a2=new _0x1711ca(_0x4038af,{'admin':![],'mcp':![],'http':![],'timeMachine':![],'engines':![],'asyncProcessors':![],'compaction':'passive','bus':![],'_skipBootRuntime':!![],..._0x37fde1['key']?{'encryptionKey':_0x37fde1['key']}:{}});await _0x36a3a2[_0x39693a(0x54e)]();try{return await _0x5f31f9(_0x36a3a2);}finally{await _0x36a3a2['close']();}}async function _0x45b10e(_0x36e12a,_0x404327){const _0x569d60=_0x488bc5,_0x2b667d=require$$5,_0x5430a6=_0x25d216[_0x569d60(0x535)](_0x404327[_0x569d60(0x386)]);console[_0x569d60(0x5f4)](_0x569d60(0x45d)+_0x5430a6+'…');const _0x47a8c2=new _0x2b667d(_0x5430a6,_0x404327['key']?{'encryptionKey':_0x404327['key']}:{});await _0x47a8c2[_0x569d60(0x54e)](),console[_0x569d60(0x5f4)](_0x569d60(0x57e)+_0x36e12a+'…');const {envs:_0x324885}=await _0x47a8c2[_0x569d60(0x469)]['backup'](_0x36e12a);for(const _0xe11220 of _0x324885){const _0x85acb6=_0xe11220['sizeBefore']>0x0?_0x569d60(0x4b3)+(_0xe11220[_0x569d60(0x3bb)]/0x400/0x400)[_0x569d60(0xe3)](0x2)+_0x569d60(0x304)+(_0xe11220[_0x569d60(0x217)]/0x400/0x400)[_0x569d60(0xe3)](0x2)+'\x20MB)':'';console[_0x569d60(0x5f4)]('\x20\x20✓\x20'+_0xe11220['name']+_0x569d60(0x544)+_0xe11220[_0x569d60(0xf1)]+_0x85acb6);}await _0x47a8c2[_0x569d60(0x1ab)](),console[_0x569d60(0x5f4)](_0x569d60(0x53c));}async function _0x119c5d(_0x371cd7,_0x488445,_0x2fef91){const _0x58e5d4=_0x488bc5,_0x5a1e86=require$$5,_0x533e43=_0x25d216[_0x58e5d4(0x535)](_0x488445[_0x58e5d4(0x386)]),_0x44ae79=_0x2fef91[_0x58e5d4(0x1d9)]??_0x58e5d4(0x212),_0x29f813=_0x2fef91[_0x58e5d4(0x5b7)]?_0x2fef91['types'][_0x58e5d4(0x48e)](',')[_0x58e5d4(0x1fd)](_0x47cec=>_0x47cec[_0x58e5d4(0x2a6)]()):null;console['log'](_0x58e5d4(0x45d)+_0x533e43+'…');const _0x2cbb12=new _0x5a1e86(_0x533e43,_0x488445['key']?{'encryptionKey':_0x488445[_0x58e5d4(0x8b)]}:{});await _0x2cbb12[_0x58e5d4(0x54e)](),console[_0x58e5d4(0x5f4)]('[okdb]\x20exporting\x20env\x20\x22'+_0x44ae79+'\x22\x20→\x20'+_0x371cd7+'…');const _0x2057e2=await _0x2cbb12[_0x58e5d4(0x469)][_0x58e5d4(0x399)](_0x371cd7,{'envName':_0x44ae79,'types':_0x29f813,'includeChanges':!!_0x2fef91[_0x58e5d4(0x545)]});console['log']('[okdb]\x20exported\x20\x20types='+_0x2057e2[_0x58e5d4(0x5b7)]+_0x58e5d4(0x189)+_0x2057e2[_0x58e5d4(0x5f6)]+'\x20\x20changes='+_0x2057e2[_0x58e5d4(0x545)]);if(_0x2fef91['blobs']){const _0x269862=_0x25d216[_0x58e5d4(0x4b5)](_0x25d216['dirname'](_0x371cd7),_0x58e5d4(0x4aa));process[_0x58e5d4(0xa6)][_0x58e5d4(0x288)](_0x58e5d4(0x126));const {count:_0x3f931c,bytes:_0x55e753}=await _0x2cbb12[_0x58e5d4(0x469)][_0x58e5d4(0x4d6)](_0x269862);console[_0x58e5d4(0x5f4)]('\x0d[okdb]\x20blobs:\x20'+_0x269862+'\x20\x20('+_0x3f931c+_0x58e5d4(0xf3)+(_0x3f931c!==0x1?'s':'')+',\x20'+(_0x55e753/0x400/0x400)['toFixed'](0x2)+_0x58e5d4(0x3ea));}await _0x2cbb12[_0x58e5d4(0x1ab)](),console[_0x58e5d4(0x5f4)](_0x58e5d4(0x197));}async function _0x52a5cc(_0x4ebad8,_0x5ef2ff,_0x2b71dc){const _0x38eca5=_0x488bc5,_0xd1d2d4=require$$5,_0x54bdbc=_0x25d216[_0x38eca5(0x535)](_0x5ef2ff[_0x38eca5(0x386)]),_0x291f33=_0x2b71dc[_0x38eca5(0x1d9)]??null,_0x3a8d51=_0x2b71dc[_0x38eca5(0x5b7)]?_0x2b71dc[_0x38eca5(0x5b7)]['split'](',')[_0x38eca5(0x1fd)](_0x244672=>_0x244672['trim']()):null,_0x356742=!!_0x2b71dc[_0x38eca5(0x4d0)];console[_0x38eca5(0x5f4)](_0x38eca5(0x45d)+_0x54bdbc+'…');const _0x1ced46=new _0xd1d2d4(_0x54bdbc,_0x5ef2ff['key']?{'encryptionKey':_0x5ef2ff[_0x38eca5(0x8b)]}:{});await _0x1ced46['open'](),console[_0x38eca5(0x5f4)](_0x38eca5(0x2d7)+_0x4ebad8+'…');const _0xdd1990=await _0x1ced46[_0x38eca5(0x469)][_0x38eca5(0x371)](_0x4ebad8,{'envName':_0x291f33,'types':_0x3a8d51,'dropExisting':_0x356742,'includeChanges':!!_0x2b71dc[_0x38eca5(0x545)],'onProgress':({type:_0x584bd,count:_0x295ae6})=>{const _0x1fb148=_0x38eca5;process[_0x1fb148(0xa6)]['write']('\x0d[okdb]\x20'+_0x584bd+':\x20'+_0x295ae6+_0x1fb148(0x424));}});process['stdout'][_0x38eca5(0x288)]('\x0a'),console[_0x38eca5(0x5f4)](_0x38eca5(0x15b)+_0xdd1990[_0x38eca5(0x5b7)]+_0x38eca5(0x189)+_0xdd1990[_0x38eca5(0x5f6)]+_0x38eca5(0x35d)+_0xdd1990[_0x38eca5(0x545)]);if(_0x2b71dc[_0x38eca5(0x4aa)]){const _0xbd63e1=_0x25d216['join'](_0x25d216['dirname'](_0x4ebad8),_0x38eca5(0x4aa));if(_0x36b20d[_0x38eca5(0x3e6)](_0xbd63e1)){const {imported:_0x95877a,skipped:_0xdcae8d}=await _0x1ced46[_0x38eca5(0x469)]['importBlobs'](_0xbd63e1);console['log']('[okdb]\x20blobs:\x20imported='+_0x95877a+_0x38eca5(0xb8)+_0xdcae8d);}}await _0x1ced46[_0x38eca5(0x1ab)](),console[_0x38eca5(0x5f4)](_0x38eca5(0x332));}async function _0x32962f(_0x2f9096,_0x3db97e){const _0x31a704=_0x488bc5;_0x3db97e[_0x31a704(0x499)]&&!_0x3db97e[_0x31a704(0x4a9)]&&(console['error'](_0x31a704(0x315)),process[_0x31a704(0x155)](0x1));const _0x2737bf=_0x3db97e['permissions']?_0x3db97e[_0x31a704(0x219)]['split'](',')[_0x31a704(0x1fd)](_0x245563=>_0x245563[_0x31a704(0x2a6)]())[_0x31a704(0x398)](Boolean):[];let _0x46937c={};if(_0x3db97e['grants'])try{_0x46937c=JSON[_0x31a704(0x400)](_0x3db97e[_0x31a704(0x1a2)]);if(typeof _0x46937c!==_0x31a704(0x257)||Array[_0x31a704(0x3c6)](_0x46937c)||_0x46937c===null)throw new Error();}catch{console[_0x31a704(0x3b8)]('[okdb]\x20error:\x20--grants\x20must\x20be\x20valid\x20JSON\x20object'),process[_0x31a704(0x155)](0x1);}const _0x5b3aac=require$$5,{randomToken:_0x44cd26,hashToken:_0xdcc049,hashPassword:_0x54e46e}=requireOkdbAuthTokens(),_0x12172f=require$$2,_0x219a4f=_0x25d216[_0x31a704(0x535)](_0x2f9096[_0x31a704(0x386)]),_0x42662e=new _0x5b3aac(_0x219a4f,_0x2f9096[_0x31a704(0x8b)]?{'encryptionKey':_0x2f9096[_0x31a704(0x8b)]}:{});await _0x42662e['open']();try{await _0x42662e[_0x31a704(0x410)][_0x31a704(0x249)]();if(_0x3db97e[_0x31a704(0x4a9)]){const _0x26ac07=await _0x42662e[_0x31a704(0x410)][_0x31a704(0x589)](_0x3db97e[_0x31a704(0x4a9)]);_0x26ac07&&(console[_0x31a704(0x3b8)](_0x31a704(0x1f4)+_0x3db97e[_0x31a704(0x4a9)]+'\x22\x20already\x20exists'),process[_0x31a704(0x155)](0x1));}const _0x401895=_0x44cd26(0x20),_0x292d81=_0xdcc049(_0x401895),_0x435cd2=_0x3db97e['password']?await _0x54e46e(_0x3db97e[_0x31a704(0x499)]):null,_0x510662=_0x12172f[_0x31a704(0x2c5)](),_0x4a2512={'tokenHash':_0x292d81,'name':_0x3db97e[_0x31a704(0x4a9)]||null,'passwordHash':_0x435cd2,'label':_0x3db97e[_0x31a704(0x52c)]||null,'permissions':_0x2737bf,'grants':_0x46937c,'createdAt':Date[_0x31a704(0x46e)](),'lastUsedAt':null},_0x59f7aa=_0x3db97e[_0x31a704(0x2b7)]?{'ttl':Number(_0x3db97e[_0x31a704(0x2b7)])}:undefined;await _0x42662e[_0x31a704(0x229)][_0x31a704(0x310)](_0x31a704(0x581),_0x510662,_0x4a2512,_0x59f7aa),console[_0x31a704(0x5f4)](_0x31a704(0x5c9)),console[_0x31a704(0x5f4)]('\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x510662),console['log']('\x20\x20\x20\x20name:\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x3db97e['name']||'(unset)')),console['log'](_0x31a704(0x493)+(_0x3db97e[_0x31a704(0x52c)]||_0x31a704(0x518))),console[_0x31a704(0x5f4)]('\x20\x20\x20\x20permissions:\x20'+(_0x2737bf[_0x31a704(0x4b5)](',\x20')||_0x31a704(0x14a))),console[_0x31a704(0x5f4)](_0x31a704(0xc6)),console[_0x31a704(0x5f4)](_0x31a704(0xed)+_0x401895+'\x0a');}finally{await _0x42662e['close']();}}async function _0x5e5c7c(_0x4f9935){const _0x296e9f=_0x488bc5,_0xb8f32=require$$5,_0x53f82a=_0x25d216[_0x296e9f(0x535)](_0x4f9935[_0x296e9f(0x386)]),_0x344741=new _0xb8f32(_0x53f82a,_0x4f9935[_0x296e9f(0x8b)]?{'encryptionKey':_0x4f9935[_0x296e9f(0x8b)]}:{});await _0x344741[_0x296e9f(0x54e)]();try{const _0x594a3f=_0x344741['_systemEnv'];if(!_0x594a3f||!_0x594a3f[_0x296e9f(0x44c)](_0x296e9f(0x581))){console[_0x296e9f(0x5f4)](_0x296e9f(0x4e6));return;}const _0x54e432=[];for(const {key:_0x43ccca,value:_0x187cfb}of _0x594a3f[_0x296e9f(0x610)](_0x296e9f(0x581))){_0x54e432[_0x296e9f(0x591)]({'id':_0x43ccca,'name':_0x187cfb['name']||_0x296e9f(0x518),'label':_0x187cfb[_0x296e9f(0x52c)]||'(unset)','permissions':Array[_0x296e9f(0x3c6)](_0x187cfb[_0x296e9f(0x219)])?_0x187cfb[_0x296e9f(0x219)][_0x296e9f(0x4b5)](','):'','created':_0x187cfb[_0x296e9f(0x17c)]?new Date(_0x187cfb[_0x296e9f(0x17c)])[_0x296e9f(0x2f9)]()['slice'](0x0,0xa):''});}if(_0x54e432[_0x296e9f(0x42c)]===0x0){console[_0x296e9f(0x5f4)]('No\x20tokens.');return;}const _0x2ddb6a=!process[_0x296e9f(0xa6)][_0x296e9f(0x34e)]||process[_0x296e9f(0xa6)][_0x296e9f(0x34e)]>=0x64,_0x1f50fa=_0x2ddb6a?0x24:0xa,_0x261158=['ID'[_0x296e9f(0x32f)](_0x1f50fa),'NAME'[_0x296e9f(0x32f)](0x10),_0x296e9f(0x2f6)['padEnd'](0x14),_0x296e9f(0x5ca)[_0x296e9f(0x32f)](0x14),'CREATED']['join']('\x20\x20');console[_0x296e9f(0x5f4)]('\x0a'+_0x261158),console['log']('-'[_0x296e9f(0x1da)](_0x261158['length']));for(const _0x2a2dd4 of _0x54e432){const _0x4652=_0x2ddb6a?_0x2a2dd4['id']:_0x2a2dd4['id'][_0x296e9f(0x5f5)](0x0,0x8)+'…';console[_0x296e9f(0x5f4)]([_0x4652[_0x296e9f(0x32f)](_0x1f50fa),_0x2a2dd4[_0x296e9f(0x4a9)][_0x296e9f(0x5f5)](0x0,0x10)[_0x296e9f(0x32f)](0x10),_0x2a2dd4[_0x296e9f(0x52c)][_0x296e9f(0x5f5)](0x0,0x14)['padEnd'](0x14),_0x2a2dd4['permissions'][_0x296e9f(0x5f5)](0x0,0x14)[_0x296e9f(0x32f)](0x14),_0x2a2dd4['created']][_0x296e9f(0x4b5)]('\x20\x20'));}console[_0x296e9f(0x5f4)]('');}finally{await _0x344741[_0x296e9f(0x1ab)]();}}async function _0x80744e(_0x159fae,_0x2183be){const _0x232c88=_0x488bc5;!_0x159fae&&(console[_0x232c88(0x3b8)]('[okdb]\x20error:\x20revoke\x20requires\x20an\x20id\x20argument'),process['exit'](0x1));const _0x52845f=require$$5,_0x51de0e=_0x25d216['resolve'](_0x2183be['dbPath']),_0x3c5c5f=new _0x52845f(_0x51de0e,_0x2183be[_0x232c88(0x8b)]?{'encryptionKey':_0x2183be[_0x232c88(0x8b)]}:{});await _0x3c5c5f[_0x232c88(0x54e)]();try{const _0x3123ad=_0x3c5c5f[_0x232c88(0x229)];(!_0x3123ad||!_0x3123ad[_0x232c88(0x44c)](_0x232c88(0x581)))&&(console[_0x232c88(0x3b8)](_0x232c88(0x7c)+_0x159fae+'\x22'),process[_0x232c88(0x155)](0x1));let _0x2787f5=null,_0x7063ce=null;const _0x343117=_0x3123ad[_0x232c88(0x3b2)](_0x232c88(0x581),_0x159fae);if(_0x343117)_0x2787f5=_0x159fae,_0x7063ce=_0x343117;else{const _0x562aaf=[];for(const {key:_0x306899,value:_0x403f7e}of _0x3123ad[_0x232c88(0x610)]('~tokens')){if(_0x306899[_0x232c88(0x3ad)](_0x159fae))_0x562aaf['push']({'key':_0x306899,'value':_0x403f7e});}_0x562aaf[_0x232c88(0x42c)]===0x0&&(console['error'](_0x232c88(0x7c)+_0x159fae+'\x22'),process[_0x232c88(0x155)](0x1));if(_0x562aaf[_0x232c88(0x42c)]>0x1){console[_0x232c88(0x3b8)]('[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22'+_0x159fae+_0x232c88(0x484)+_0x562aaf[_0x232c88(0x42c)]+_0x232c88(0x4b2));for(const _0x36933d of _0x562aaf){console['error']('\x20\x20'+_0x36933d['key']+_0x232c88(0x602)+(_0x36933d[_0x232c88(0x268)]['name']||_0x232c88(0x518))+')');}process[_0x232c88(0x155)](0x1);}_0x2787f5=_0x562aaf[0x0]['key'],_0x7063ce=_0x562aaf[0x0][_0x232c88(0x268)];}await _0x3123ad['remove'](_0x232c88(0x581),_0x2787f5),console['log']('\x20\x20✓\x20Revoked\x20token\x20'+_0x2787f5+_0x232c88(0x602)+(_0x7063ce[_0x232c88(0x4a9)]||_0x232c88(0x518))+_0x232c88(0x21a)+(_0x7063ce[_0x232c88(0x52c)]||'(unset)')+')');}finally{await _0x3c5c5f[_0x232c88(0x1ab)]();}}function _0x1a8a26(_0x41fcc9,_0xb7c1a4){const _0x3de680=_0x488bc5;if(!_0x41fcc9[_0x3de680(0x510)])return _0x3de680(0x11f);const _0xa93168=_0x41fcc9[_0x3de680(0x407)];if(!_0xa93168)return'active';if(_0xb7c1a4>_0xa93168)return _0x3de680(0x559);return _0x3de680(0x4a2);}function _0x1df833(_0x25f04b){const _0xb64cf1=_0x488bc5;if(!_0x25f04b||typeof _0x25f04b!==_0xb64cf1(0x257))return'';const _0x1ed2d6=Object['entries'](_0x25f04b)['filter'](([,_0x4c89ee])=>_0x4c89ee)[_0xb64cf1(0x1fd)](([_0x4d2c29])=>_0x4d2c29);if(_0x1ed2d6[_0xb64cf1(0x42c)]===0x0)return _0xb64cf1(0x14a);if(_0x1ed2d6['length']<=0x3)return _0x1ed2d6[_0xb64cf1(0x4b5)]('\x20');return _0x1ed2d6['slice'](0x0,0x3)[_0xb64cf1(0x4b5)]('\x20')+('\x20+'+(_0x1ed2d6[_0xb64cf1(0x42c)]-0x3));}async function _0x228ddb(_0x1dd42a){const _0x2a216d=_0x488bc5,_0xdd555e=require$$5,_0x3a33f3=requireOkdbLicenseCodec(),{_C:_0x3473a0}=requireOkdbLicense(),_0x5efa9f=_0x25d216[_0x2a216d(0x535)](_0x1dd42a['dbPath']),_0x581a75=new _0xdd555e(_0x5efa9f,_0x1dd42a['key']?{'encryptionKey':_0x1dd42a[_0x2a216d(0x8b)]}:{});await _0x581a75[_0x2a216d(0x54e)]();try{const _0x1078f3=_0x581a75[_0x2a216d(0x229)],_0xbed002=_0x1078f3?.['db']?.[_0x2a216d(0x3b2)]?.(_0x2a216d(0x1d2))??0x0,_0x5d1db4=[..._0x581a75[_0x2a216d(0x5d0)][_0x2a216d(0x180)]()][_0x2a216d(0x398)](_0x47d0b6=>!_0x47d0b6[_0x2a216d(0x3ad)]('~'))[_0x2a216d(0x42c)],_0x93ca9c=_0x581a75[_0x2a216d(0x3db)]?.[_0x2a216d(0x21b)];if(_0x93ca9c){const _0x4499b2=_0x93ca9c[_0x2a216d(0x177)]===!![],_0x365547=_0x4499b2?_0x2a216d(0x35a):_0x581a75[_0x2a216d(0x3db)][_0x2a216d(0x4a2)]?.[_0x2a216d(0x207)]||_0x2a216d(0x4fa);console[_0x2a216d(0x5f4)](''),console[_0x2a216d(0x5f4)](_0x2a216d(0x7b)+_0x365547);const _0x5e1c5f=_0x93ca9c['limits']||{};if(_0x5e1c5f[_0x2a216d(0x1bd)]){const _0x10e1f4=Math[_0x2a216d(0x594)](_0xbed002/_0x5e1c5f[_0x2a216d(0x1bd)]*0x64);console['log'](_0x2a216d(0x5b2)+_0xbed002[_0x2a216d(0x17b)]()+_0x2a216d(0x2a0)+_0x5e1c5f[_0x2a216d(0x1bd)][_0x2a216d(0x17b)]()+_0x2a216d(0x4b3)+_0x10e1f4+'%)');}else console[_0x2a216d(0x5f4)]('\x20\x20Writes:\x20\x20'+_0xbed002[_0x2a216d(0x17b)]());_0x5e1c5f[_0x2a216d(0x5ba)]?console[_0x2a216d(0x5f4)](_0x2a216d(0x11c)+_0x5d1db4+_0x2a216d(0x2a0)+_0x5e1c5f[_0x2a216d(0x5ba)]):console[_0x2a216d(0x5f4)]('\x20\x20Envs:\x20\x20\x20\x20'+_0x5d1db4),_0x3473a0?.['PUB_FINGERPRINT']&&console[_0x2a216d(0x5f4)]('\x20\x20Build:\x20\x20\x20key\x20fingerprint\x20'+_0x3473a0['PUB_FINGERPRINT']+_0x2a216d(0x148));}if(!_0x1078f3||!_0x1078f3['hasType'](_0x2a216d(0x537))){console[_0x2a216d(0x5f4)](''),console[_0x2a216d(0x5f4)](_0x2a216d(0x555)),console[_0x2a216d(0x5f4)]('');return;}const _0x4f470=[],_0x247cd1=Date['now'](),_0xf0f88e=_0x581a75['id'],_0x284dec=_0x2a216d(0x276);for(const {key:_0xdca234,value:_0x4359db}of _0x1078f3[_0x2a216d(0x610)](_0x2a216d(0x537))){const _0x198b2a=_0x4359db[_0x2a216d(0x56c)]?Buffer[_0x2a216d(0x294)](_0x4359db[_0x2a216d(0x56c)],_0x2a216d(0x85)):Buffer['alloc'](0x8);let _0x14b209='';try{_0x14b209=_0x3a33f3[_0x2a216d(0x425)](_0xf0f88e,_0x198b2a,_0x284dec)[_0x2a216d(0xba)];}catch{}_0x4f470[_0x2a216d(0x591)]({'id':_0xdca234,'licensee':_0x4359db[_0x2a216d(0x207)]||'','expires':_0x4359db[_0x2a216d(0x407)]?new Date(_0x4359db[_0x2a216d(0x407)])[_0x2a216d(0x2f9)]()[_0x2a216d(0x5f5)](0x0,0xa):'','features':_0x1df833(_0x4359db[_0x2a216d(0x3b4)]),'pin':_0x14b209,'status':_0x1a8a26(_0x4359db,_0x247cd1)});}if(_0x4f470[_0x2a216d(0x42c)]===0x0){console[_0x2a216d(0x5f4)](''),console[_0x2a216d(0x5f4)](_0x2a216d(0x555)),console[_0x2a216d(0x5f4)]('');return;}const _0x4c8a97=['\x20\x20'+'ID'[_0x2a216d(0x32f)](0xe),'LICENSEE'['padEnd'](0xe),_0x2a216d(0x1a6)[_0x2a216d(0x32f)](0xc),_0x2a216d(0x23b)['padEnd'](0x1e),_0x2a216d(0x461)['padEnd'](0xa),_0x2a216d(0x36d)][_0x2a216d(0x4b5)]('\x20');console[_0x2a216d(0x5f4)]('\x0a'+_0x4c8a97);for(const _0x4b905a of _0x4f470){const _0xb0cfdd=_0x4b905a['id']['slice'](0x0,0x8)+'…';console['log'](['\x20\x20'+_0xb0cfdd['padEnd'](0xe),_0x4b905a[_0x2a216d(0x207)]['slice'](0x0,0xe)['padEnd'](0xe),_0x4b905a['expires']['padEnd'](0xc),_0x4b905a['features'][_0x2a216d(0x5f5)](0x0,0x1e)['padEnd'](0x1e),_0x4b905a['pin']['padEnd'](0xa),_0x4b905a[_0x2a216d(0x1fe)]][_0x2a216d(0x4b5)]('\x20'));}console[_0x2a216d(0x5f4)]('');}finally{await _0x581a75[_0x2a216d(0x1ab)]();}}async function _0x1a926a(_0x304e38,_0x26748e){const _0x335ff7=_0x488bc5,_0x140433=require$$5,_0xf8091d=requireOkdbLicenseCodec();let _0x42d43a=_0x304e38;(_0xf8091d[_0x335ff7(0x5cb)](_0x304e38)===_0x335ff7(0x366)||_0x36b20d['existsSync'](_0x304e38)&&_0x36b20d[_0x335ff7(0xf4)](_0x304e38)[_0x335ff7(0x334)]())&&(_0x42d43a=_0x36b20d[_0x335ff7(0x5b3)](_0x304e38,_0x335ff7(0x1bb))['trim']());const _0x38fa0c=_0x25d216[_0x335ff7(0x535)](_0x26748e[_0x335ff7(0x386)]),_0xe977a4=new _0x140433(_0x38fa0c,_0x26748e[_0x335ff7(0x8b)]?{'encryptionKey':_0x26748e['key']}:{});await _0xe977a4[_0x335ff7(0x54e)]();try{!_0xe977a4[_0x335ff7(0x3db)]&&(console[_0x335ff7(0x3b8)]('[okdb]\x20error:\x20license\x20management\x20is\x20only\x20available\x20in\x20licensed\x20builds\x20(npm\x20run\x20build:prod).'),process[_0x335ff7(0x155)](0x1));let _0x2af1cb;try{_0x2af1cb=await _0xe977a4[_0x335ff7(0x3db)][_0x335ff7(0x533)](_0x42d43a);}catch(_0x5cc04d){console['error'](_0x335ff7(0x426)+_0x5cc04d[_0x335ff7(0x491)]),process[_0x335ff7(0x155)](0x1);}const _0x1f474c=_0xe977a4[_0x335ff7(0x3db)]['getPins'](),_0x3a16fd=_0x1f474c['find'](_0x4d5bd8=>_0x4d5bd8[_0x335ff7(0x313)]===_0x2af1cb['id'])?.[_0x335ff7(0xba)]||'',_0x107424=Object['entries'](_0x2af1cb['features']||{})['filter'](([,_0x123cd2])=>_0x123cd2)[_0x335ff7(0x1fd)](([_0x23c341])=>_0x23c341),_0x16f052=_0x2af1cb[_0x335ff7(0x41b)]||{},_0xb13804=[_0x16f052[_0x335ff7(0x5ba)]?_0x335ff7(0x377)+_0x16f052[_0x335ff7(0x5ba)]:null,_0x16f052[_0x335ff7(0x44f)]?_0x335ff7(0x2b1)+_0x16f052[_0x335ff7(0x44f)]:null,_0x16f052[_0x335ff7(0x1a9)]?_0x335ff7(0xa2)+_0x16f052['syncPeers']:null,_0x16f052[_0x335ff7(0x1bd)]?_0x335ff7(0x1eb)+_0x16f052[_0x335ff7(0x1bd)][_0x335ff7(0x17b)]():null]['filter'](Boolean)[_0x335ff7(0x4b5)]('\x20\x20'),_0x26a4ad=_0x2af1cb[_0x335ff7(0x25b)]===_0xf8091d['LICENSE_TYPE_OPEN'];console[_0x335ff7(0x5f4)]('\x0a\x20\x20✓\x20License\x20added'),console['log'](_0x335ff7(0x91)+_0x2af1cb['id']),console[_0x335ff7(0x5f4)]('\x20\x20\x20\x20licensee:\x20\x20'+_0x2af1cb[_0x335ff7(0x207)]),console[_0x335ff7(0x5f4)](_0x335ff7(0x289)+new Date(_0x2af1cb[_0x335ff7(0x407)])[_0x335ff7(0x2f9)]()[_0x335ff7(0x5f5)](0x0,0xa)),console[_0x335ff7(0x5f4)](_0x335ff7(0xad)+(_0x107424[_0x335ff7(0x4b5)](',\x20')||_0x335ff7(0x14a)));if(_0xb13804)console[_0x335ff7(0x5f4)](_0x335ff7(0x3ed)+_0xb13804);_0x26a4ad?(console[_0x335ff7(0x5f4)]('\x20\x20\x20\x20status:\x20\x20\x20\x20active\x20\x20(open\x20license\x20—\x20no\x20activation\x20needed)'),console['log']('')):(console[_0x335ff7(0x5f4)]('\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20'+_0x3a16fd),console[_0x335ff7(0x5f4)](_0x335ff7(0x2ba)),console[_0x335ff7(0x5f4)](''),console[_0x335ff7(0x5f4)](_0x335ff7(0xcb)),console[_0x335ff7(0x5f4)](_0x335ff7(0x352)+_0x3a16fd+_0x335ff7(0xa7)),console[_0x335ff7(0x5f4)]('\x20\x20\x20\x202.\x20The\x20vendor\x20returns\x20an\x20activation\x20token.'),console['log'](_0x335ff7(0x466)),console[_0x335ff7(0x5f4)](''));}finally{await _0xe977a4[_0x335ff7(0x1ab)]();}}async function _0x2232f3(_0x11d9c1,_0x3a220e){const _0x1436cc=_0x488bc5,_0x37b750=require$$5,_0x8193b7=_0x25d216[_0x1436cc(0x535)](_0x3a220e[_0x1436cc(0x386)]),_0xc9d707=new _0x37b750(_0x8193b7,_0x3a220e[_0x1436cc(0x8b)]?{'encryptionKey':_0x3a220e[_0x1436cc(0x8b)]}:{});await _0xc9d707[_0x1436cc(0x54e)]();try{!_0xc9d707[_0x1436cc(0x3db)]&&(console[_0x1436cc(0x3b8)](_0x1436cc(0x539)),process[_0x1436cc(0x155)](0x1));let _0x25e79b;try{_0x25e79b=await _0xc9d707[_0x1436cc(0x3db)][_0x1436cc(0x358)](_0x11d9c1[_0x1436cc(0x2a6)]());}catch(_0x13b3e8){console['error'](_0x1436cc(0x426)+_0x13b3e8['message']),console[_0x1436cc(0x3b8)](''),console[_0x1436cc(0x3b8)](_0x1436cc(0x263)),console[_0x1436cc(0x3b8)](_0x1436cc(0x35c)),console['error']('\x20\x20\x20\x20-\x20The\x20activation\x20token\x20was\x20issued\x20for\x20a\x20different\x20node\x20—\x20share\x20this\x20node\x27s\x20PIN\x20with\x20the\x20vendor.'),console['error']('\x20\x20\x20\x20-\x20The\x20activation\x20token\x20has\x20expired\x20—\x20request\x20a\x20fresh\x20one.'),console['error'](''),process['exit'](0x1);}console[_0x1436cc(0x5f4)](_0x1436cc(0x227)),console[_0x1436cc(0x5f4)](_0x1436cc(0x91)+_0x25e79b['id']),console[_0x1436cc(0x5f4)](_0x1436cc(0x4f2)+_0x25e79b['licensee']),console[_0x1436cc(0x5f4)](_0x1436cc(0x289)+new Date(_0x25e79b['expiresAt'])['toISOString']()[_0x1436cc(0x5f5)](0x0,0xa)),console['log'](_0x1436cc(0x584)),console[_0x1436cc(0x5f4)]('');}finally{await _0xc9d707[_0x1436cc(0x1ab)]();}}async function _0x45a651(_0x338464,_0x17e9d7){const _0xf85993=_0x488bc5;!_0x338464&&(console[_0xf85993(0x3b8)](_0xf85993(0x5ad)),process[_0xf85993(0x155)](0x1));const _0x10ad75=require$$5,_0x7e4289=requireOkdbLicenseCodec(),_0x1bb737=_0x25d216[_0xf85993(0x535)](_0x17e9d7['dbPath']),_0xd39897=new _0x10ad75(_0x1bb737,_0x17e9d7['key']?{'encryptionKey':_0x17e9d7['key']}:{});await _0xd39897[_0xf85993(0x54e)]();try{const _0x49cd24=_0xd39897[_0xf85993(0x229)];(!_0x49cd24||!_0x49cd24[_0xf85993(0x44c)](_0xf85993(0x537)))&&(console[_0xf85993(0x3b8)](_0xf85993(0x5c2)+_0x338464+'\x22'),process[_0xf85993(0x155)](0x1));let _0x5ee23c=null,_0x212986=null;const _0x1caf71=_0x49cd24[_0xf85993(0x3b2)](_0xf85993(0x537),_0x338464);if(_0x1caf71)_0x5ee23c=_0x338464,_0x212986=_0x1caf71;else{const _0x3bafbb=[];for(const {key:_0x39c72d,value:_0x328457}of _0x49cd24['getRange'](_0xf85993(0x537))){if(_0x39c72d[_0xf85993(0x3ad)](_0x338464))_0x3bafbb[_0xf85993(0x591)]({'key':_0x39c72d,'value':_0x328457});}_0x3bafbb[_0xf85993(0x42c)]===0x0&&(console[_0xf85993(0x3b8)](_0xf85993(0x5c2)+_0x338464+'\x22'),process['exit'](0x1)),_0x3bafbb[_0xf85993(0x42c)]>0x1&&(console[_0xf85993(0x3b8)](_0xf85993(0x454)+_0x338464+_0xf85993(0x484)+_0x3bafbb['length']+'\x20licenses'),process['exit'](0x1)),_0x5ee23c=_0x3bafbb[0x0][_0xf85993(0x8b)],_0x212986=_0x3bafbb[0x0]['value'];}const _0x13ff3a=Date[_0xf85993(0x46e)](),_0xc5b379=_0x1a8a26(_0x212986,_0x13ff3a),_0x11087e=_0xd39897['id'],_0x482d0b='__OKDB_PUB_FINGERPRINT__';let _0x37ecbb='';try{const _0x1bc0fa=Buffer['from'](_0x212986[_0xf85993(0x56c)],_0xf85993(0x85));_0x37ecbb=_0x7e4289[_0xf85993(0x425)](_0x11087e,_0x1bc0fa,_0x482d0b)[_0xf85993(0xba)];}catch{}const _0x3de919=_0x212986[_0xf85993(0x3b4)]?Object[_0xf85993(0x26f)](_0x212986[_0xf85993(0x3b4)])[_0xf85993(0x398)](([,_0x41b93a])=>_0x41b93a)[_0xf85993(0x1fd)](([_0x5f939])=>_0x5f939):[],_0x3303b2=_0x212986['limits']||{},_0x52b861=_0x49cd24?.['db']?.[_0xf85993(0x3b2)]?.(_0xf85993(0x1d2))??0x0,_0x4f27bd=[..._0xd39897['_envs']['keys']()][_0xf85993(0x398)](_0x4001f6=>!_0x4001f6[_0xf85993(0x3ad)]('~'))[_0xf85993(0x42c)];console['log'](_0xf85993(0x7d)),console[_0xf85993(0x5f4)]('\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x5ee23c),console[_0xf85993(0x5f4)](_0xf85993(0x4f2)+(_0x212986[_0xf85993(0x207)]||'')),console[_0xf85993(0x5f4)](_0xf85993(0x289)+(_0x212986[_0xf85993(0x407)]?new Date(_0x212986['expiresAt'])['toISOString']()[_0xf85993(0x5f5)](0x0,0xa):'')),console[_0xf85993(0x5f4)]('\x20\x20\x20\x20features:\x20\x20'+(_0x3de919[_0xf85993(0x4b5)](',\x20')||_0xf85993(0x14a))),console['log'](_0xf85993(0x146)+_0x37ecbb),console['log'](_0xf85993(0x440)+_0xc5b379),console[_0xf85993(0x5f4)]('\x20\x20\x20\x20addedAt:\x20\x20\x20'+new Date(_0x212986[_0xf85993(0xb0)])[_0xf85993(0x2f9)]());if(_0xc5b379===_0xf85993(0x4a2)){console[_0xf85993(0x5f4)](''),console['log'](_0xf85993(0x3c2));if(_0x3303b2[_0xf85993(0x1bd)]){const _0x56c64c=Math[_0xf85993(0x594)](_0x52b861/_0x3303b2[_0xf85993(0x1bd)]*0x64);console['log'](_0xf85993(0x1f9)+_0x52b861[_0xf85993(0x17b)]()+_0xf85993(0x2a0)+_0x3303b2['maxWrites'][_0xf85993(0x17b)]()+'\x20\x20('+_0x56c64c+'%)');}else console['log']('\x20\x20\x20\x20writes:\x20\x20\x20\x20'+_0x52b861[_0xf85993(0x17b)]()+_0xf85993(0x13a));_0x3303b2[_0xf85993(0x5ba)]?console['log']('\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20'+_0x4f27bd+_0xf85993(0x2a0)+_0x3303b2['envs']):console[_0xf85993(0x5f4)]('\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20'+_0x4f27bd+'\x20\x20(unlimited)');}console['log']('');}finally{await _0xd39897['close']();}}async function _0x17a4bc(_0x5cd38d,_0x243b8b){const _0x45f605=_0x488bc5;!_0x5cd38d&&(console[_0x45f605(0x3b8)]('[okdb]\x20error:\x20remove\x20requires\x20an\x20id\x20argument'),process[_0x45f605(0x155)](0x1));const _0x9b47cd=require$$5,_0x52c6e6=_0x25d216[_0x45f605(0x535)](_0x243b8b[_0x45f605(0x386)]),_0x1dac55=new _0x9b47cd(_0x52c6e6,_0x243b8b[_0x45f605(0x8b)]?{'encryptionKey':_0x243b8b['key']}:{});await _0x1dac55['open']();try{const _0x58ea24=_0x1dac55[_0x45f605(0x229)];(!_0x58ea24||!_0x58ea24['hasType']('~licenses'))&&(console[_0x45f605(0x3b8)](_0x45f605(0x5c2)+_0x5cd38d+'\x22'),process[_0x45f605(0x155)](0x1));let _0x12423a=null,_0x496164=null;const _0x484ee6=_0x58ea24['get']('~licenses',_0x5cd38d);if(_0x484ee6)_0x12423a=_0x5cd38d,_0x496164=_0x484ee6;else{const _0x41cb7e=[];for(const {key:_0x14ae4a,value:_0x1a0366}of _0x58ea24[_0x45f605(0x610)](_0x45f605(0x537))){if(_0x14ae4a[_0x45f605(0x3ad)](_0x5cd38d))_0x41cb7e['push']({'key':_0x14ae4a,'value':_0x1a0366});}_0x41cb7e[_0x45f605(0x42c)]===0x0&&(console[_0x45f605(0x3b8)](_0x45f605(0x5c2)+_0x5cd38d+'\x22'),process['exit'](0x1)),_0x41cb7e['length']>0x1&&(console['error'](_0x45f605(0x454)+_0x5cd38d+_0x45f605(0x484)+_0x41cb7e[_0x45f605(0x42c)]+_0x45f605(0x12f)),process[_0x45f605(0x155)](0x1)),_0x12423a=_0x41cb7e[0x0][_0x45f605(0x8b)],_0x496164=_0x41cb7e[0x0][_0x45f605(0x268)];}await _0x58ea24[_0x45f605(0x1cb)]('~licenses',_0x12423a),console[_0x45f605(0x5f4)]('\x20\x20✓\x20Removed\x20license\x20'+_0x12423a+_0x45f605(0x608)+(_0x496164[_0x45f605(0x207)]||_0x45f605(0x518))+')');}finally{await _0x1dac55[_0x45f605(0x1ab)]();}}async function _0x1e66ef(_0x3c877d,_0x47120b,_0x39d2e0){const _0x2d863c=_0x488bc5;!_0x3c877d&&(console['error'](_0x2d863c(0x1e9)),process[_0x2d863c(0x155)](0x1));!_0x39d2e0['token']&&!(_0x39d2e0['username']&&_0x39d2e0['password'])&&(console['error'](_0x2d863c(0x9f)),process[_0x2d863c(0x155)](0x1));const _0xd410f6=_0x39d2e0[_0x2d863c(0x5c3)]||_0x47120b['sync']?.[_0x2d863c(0x5ce)];!_0xd410f6&&(console[_0x2d863c(0x3b8)](_0x2d863c(0x56d)+_0x2d863c(0x25e)+'\x20\x20Or\x20set\x20sync.address\x20in\x20.kdbconfig'),process['exit'](0x1));const _0x237ba1=require$$5,_0x57f60f=new _0x237ba1(_0x47120b[_0x2d863c(0x386)],{'sync':{'address':_0xd410f6,'auto_reconcile':![]}});await _0x57f60f[_0x2d863c(0x54e)]();try{const _0x2e2759=_0x57f60f['_systemEnv'];if(_0x2e2759&&_0x2e2759['hasType'](_0x2d863c(0x581))){let _0x561fee=![];for(const _0x40823e of _0x2e2759[_0x2d863c(0x610)](_0x2d863c(0x581))){_0x561fee=!![];break;}_0x561fee&&console['log']('\x20\x20Note:\x20this\x20node\x20has\x20existing\x20tokens.\x20They\x20will\x20coexist\x20with\x20cluster\x20tokens\x0a'+_0x2d863c(0x12b));}console[_0x2d863c(0x5f4)](_0x2d863c(0x226)+_0x3c877d+'…'),await _0x57f60f[_0x2d863c(0x2e1)][_0x2d863c(0x4b5)](_0x3c877d[_0x2d863c(0x327)](/\/+$/,''),{'token':_0x39d2e0[_0x2d863c(0x28c)],'username':_0x39d2e0[_0x2d863c(0x5b1)],'password':_0x39d2e0[_0x2d863c(0x499)]}),console['log'](_0x2d863c(0x5e6)),console[_0x2d863c(0x5f4)](_0x2d863c(0x9e));}finally{await _0x57f60f[_0x2d863c(0x1ab)]();}}async function _0x10805f(){const _0x1c4ec8=_0x488bc5,_0xbacd21=Date[_0x1c4ec8(0x46e)](),_0x2c17d5=_0x35d3c9(process[_0x1c4ec8(0x167)]),_0x125f44=_0x5d1c00(_0x2c17d5),_0x515f2d=_0x25d216[_0x1c4ec8(0x535)](_0x125f44[_0x1c4ec8(0x386)]);!_0x125f44['noRepl']&&!process[_0x1c4ec8(0x4df)][_0x1c4ec8(0x281)]&&(_0x125f44[_0x1c4ec8(0x432)]=!![]);const _0x10d7e6=require$$5,{start:_0x1f85f3,colorLog:_0x997a00}=requireOkdbShell(),_0x2f0a44=require$$1$2,_0x5e99e4={..._0x125f44[_0x1c4ec8(0x8b)]?{'encryptionKey':_0x125f44[_0x1c4ec8(0x8b)]}:{},..._0x125f44['noAdmin']?{'admin':![]}:_0xd01c17(_0x125f44[_0x1c4ec8(0x3f3)])?{'admin':_0x125f44['admin']}:{},..._0xd01c17(_0x125f44[_0x1c4ec8(0x4b7)])?{'api':_0x125f44[_0x1c4ec8(0x4b7)]}:{},..._0xd01c17(_0x125f44[_0x1c4ec8(0x410)])?{'auth':_0x125f44[_0x1c4ec8(0x410)]}:{},..._0xd01c17(_0x125f44[_0x1c4ec8(0x4bc)])?{'mcp':_0x125f44[_0x1c4ec8(0x4bc)]}:{},..._0x125f44[_0x1c4ec8(0x5bd)]!==![]?{'timeMachine':_0x125f44['timeMachine']}:{}},_0xdd3373=_0x52a63f(_0x125f44);if(!_0x2f0a44[_0x1c4ec8(0x29a)]){const _0x3b944e=_0xd8a116(),_0x279edb=_0x125f44['noCluster']?'--no-cluster':_0x125f44[_0x1c4ec8(0x3e1)]!=null&&_0x125f44[_0x1c4ec8(0x3e1)]!==''?_0x1c4ec8(0x3d5):process.env.OKDB_HTTP_WORKERS?_0x1c4ec8(0x16f):_0x125f44[_0x1c4ec8(0x19e)]?.[_0x1c4ec8(0x17e)]!=null?'config\x20http.workers':_0x1c4ec8(0x3d3)+Math[_0x1c4ec8(0x473)](0x1,require$$0['cpus']()[_0x1c4ec8(0x42c)]-0x1);process['stdout'][_0x1c4ec8(0x288)]('[okdb]\x20http\x20workers:\x20'+_0xdd3373+'\x20('+_0x279edb+(!_0x3b944e?_0x1c4ec8(0x395):'')+')\x0a');}if(_0x2f0a44['isWorker']){const _0x3da5a9={..._0x5e99e4,'engines':![],'asyncProcessors':![],'compaction':_0x1c4ec8(0x241),'bus':!![]},_0x2aebec=new _0x10d7e6(_0x515f2d,_0x3da5a9);_0x2aebec['log'][_0x1c4ec8(0x416)]?.();const _0x1864c1=process.env.OKDB_CLUSTER_SLOT??'?',_0x336b39={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0xd110d9=_0x336b39[_0x125f44['logLevel']]??_0x336b39[_0x1c4ec8(0x59a)];_0x2aebec[_0x1c4ec8(0x5f4)][_0x1c4ec8(0x504)](_0x5640d5=>{const _0x3799dc=_0x1c4ec8;if((_0x336b39[_0x5640d5[_0x3799dc(0x1cf)]]??0x1)<_0xd110d9)return;try{process[_0x3799dc(0x4ec)]?.({'__okdbCluster':_0x3799dc(0x5f4),'slot':_0x1864c1,'pid':process[_0x3799dc(0x4e5)],'entry':_0x5640d5});}catch{}}),await _0x2aebec[_0x1c4ec8(0x54e)]();const {attachWorkerCluster:_0x431d61}=requireOkdbCluster();_0x431d61(_0x2aebec),await _0xca9dc3(_0x2aebec,_0x125f44[_0x1c4ec8(0x2aa)]);return;}if(_0xdd3373>0x1){const _0x6835e3=requireOkdbHttp(),_0x9dced6=new _0x6835e3(),_0x486fcd=new _0x10d7e6(_0x515f2d,_0x5e99e4);await _0x486fcd[_0x1c4ec8(0x54e)]();const _0x5b21de=async()=>{const _0x47f615=_0x1c4ec8,_0x532cc6={..._0x5e99e4,'engines':![],'asyncProcessors':![],'compaction':'passive','bus':!![]},_0x134bc8=new _0x10d7e6(_0x515f2d,_0x532cc6);return await _0x134bc8[_0x47f615(0x54e)](),_0x134bc8;},_0x4a5d7b=_0x9dced6[_0x1c4ec8(0x55b)](_0x125f44[_0x1c4ec8(0x2aa)],{'workers':_0xdd3373,'makeOkdb':_0x5b21de,'primaryOkdb':_0x486fcd});let _0x4d307a=![];async function _0x1f6f29(_0x4cb04b){const _0x24fd4e=_0x1c4ec8;_0x4d307a&&(process[_0x24fd4e(0x1b8)][_0x24fd4e(0x288)](_0x24fd4e(0x389)),process[_0x24fd4e(0x155)](0x82));_0x4d307a=!![],process[_0x24fd4e(0x1b8)][_0x24fd4e(0x288)](_0x24fd4e(0x2ed)+(_0x4cb04b||'shutdown')+_0x24fd4e(0x218));const _0x412ff2=setTimeout(()=>{const _0x1058fd=_0x24fd4e;process['stderr'][_0x1058fd(0x288)]('[okdb]\x20shutdown\x20drain\x20exceeded\x203000ms\x20—\x20hard-exiting\x0a'),process[_0x1058fd(0x155)](0x0);},0xbb8);_0x412ff2[_0x24fd4e(0x326)]?.();try{await _0x4a5d7b[_0x24fd4e(0x1ab)]();}catch(_0x355dcb){process[_0x24fd4e(0x1b8)][_0x24fd4e(0x288)](_0x24fd4e(0x417)+(_0x355dcb?.[_0x24fd4e(0x491)]??_0x355dcb)+'\x0a');}try{await _0x486fcd['close']();}catch(_0x5a9bef){process[_0x24fd4e(0x1b8)][_0x24fd4e(0x288)]('[okdb]\x20primary\x20okdb\x20close\x20error:\x20'+(_0x5a9bef?.[_0x24fd4e(0x491)]??_0x5a9bef)+'\x0a');}process[_0x24fd4e(0x155)](0x0);}_0x125f44[_0x1c4ec8(0x480)]=_0xdd3373;if(!_0x125f44[_0x1c4ec8(0x432)]){_0x486fcd['log'][_0x1c4ec8(0x416)]?.(),_0x199f3c(_0x486fcd[_0x1c4ec8(0x410)]?.['getSecurityNotices']?.()??[]),await _0x1f85f3(_0x486fcd,_0x125f44);return;}process[_0x1c4ec8(0xa6)][_0x1c4ec8(0x288)](_0x1c4ec8(0x586)+process[_0x1c4ec8(0x4e5)]+_0x1c4ec8(0xd8)+_0xdd3373+'\x20'+('passive\x20HTTP\x20worker(s)\x20serving\x20:'+_0x125f44[_0x1c4ec8(0x2aa)]+'\x0a')),console[_0x1c4ec8(0x5f4)](''),console[_0x1c4ec8(0x5f4)](_0x1c4ec8(0x32e)),console[_0x1c4ec8(0x5f4)]('\x20\x20\x20\x20port:\x20\x20\x20\x20'+_0x125f44[_0x1c4ec8(0x2aa)]+_0x1c4ec8(0x4b3)+_0xdd3373+'\x20HTTP\x20workers,\x20primary\x20=\x20processor)'),console[_0x1c4ec8(0x5f4)](_0x1c4ec8(0xb3)+_0x515f2d),console['log']('\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20'+_0x486fcd['id']),console[_0x1c4ec8(0x5f4)]('\x20\x20\x20\x20api:\x20\x20\x20\x20\x20http://localhost:'+_0x125f44[_0x1c4ec8(0x2aa)]+'/api');!_0x125f44[_0x1c4ec8(0x1ea)]&&console['log'](_0x1c4ec8(0x4b9)+_0x125f44[_0x1c4ec8(0x2aa)]+_0x1c4ec8(0xf8));console[_0x1c4ec8(0x5f4)](''),_0x199f3c(_0x486fcd[_0x1c4ec8(0x410)]?.[_0x1c4ec8(0x4d4)]?.()??[]),process['on'](_0x1c4ec8(0x15e),()=>_0x1f6f29(_0x1c4ec8(0x15e))),process['on'](_0x1c4ec8(0x380),()=>_0x1f6f29('SIGTERM')),process['on'](_0x1c4ec8(0xe1),()=>_0x1f6f29(_0x1c4ec8(0xe1)));return;}const _0x1144fd=new _0x10d7e6(_0x515f2d,_0x5e99e4);_0x1144fd['log'][_0x1c4ec8(0x416)]?.();const _0x2a928b=_0x1144fd[_0x1c4ec8(0x5f4)]['attach'](_0x328e72=>_0x997a00(_0x328e72,_0x125f44[_0x1c4ec8(0x14b)]));if(_0x125f44[_0x1c4ec8(0x432)])process[_0x1c4ec8(0xa6)]['write'](_0x1c4ec8(0x1dc));await _0x1144fd[_0x1c4ec8(0x54e)]();if(_0x125f44[_0x1c4ec8(0x432)])process[_0x1c4ec8(0xa6)]['write'](_0x1c4ec8(0x13c));try{await _0xca9dc3(_0x1144fd,_0x125f44[_0x1c4ec8(0x2aa)]);}catch(_0xa527e5){_0xa527e5[_0x1c4ec8(0x320)]==='EADDRINUSE'&&(console[_0x1c4ec8(0x3b8)](_0x1c4ec8(0x2e5)+_0x125f44[_0x1c4ec8(0x2aa)]+_0x1c4ec8(0xa5)),process[_0x1c4ec8(0x155)](0x1));throw _0xa527e5;}if(_0x125f44['noRepl'])process['stdout'][_0x1c4ec8(0x288)](_0x1c4ec8(0x561)+_0x125f44['port']+'\x0a');if(!_0x125f44['noRepl'])_0x1144fd[_0x1c4ec8(0x5f4)][_0x1c4ec8(0x416)]?.(),_0x2a928b?.(),_0x199f3c(_0x1144fd['auth']?.['getSecurityNotices']?.()??[]),await _0x1f85f3(_0x1144fd,_0x125f44);else{const _0x1d8c7f=_0x25d216[_0x1c4ec8(0x4b5)](_0x515f2d,_0x1c4ec8(0x16d));try{_0x36b20d['writeFileSync'](_0x1d8c7f,String(process['pid']));}catch{}const _0xb9d7a3=Date[_0x1c4ec8(0x46e)]()-_0xbacd21;console[_0x1c4ec8(0x5f4)](''),console[_0x1c4ec8(0x5f4)]('\x20\x20✓\x20OKDB\x20server\x20running'),console[_0x1c4ec8(0x5f4)](_0x1c4ec8(0x160)+_0x125f44[_0x1c4ec8(0x2aa)]),console[_0x1c4ec8(0x5f4)](_0x1c4ec8(0x351)+_0x515f2d),console[_0x1c4ec8(0x5f4)](_0x1c4ec8(0x3ef)+_0x1144fd['id']);{const _0x421639=_0x1144fd[_0x1c4ec8(0x229)]?.['db']?.[_0x1c4ec8(0x3b2)]?.(_0x1c4ec8(0x1d2))??0x0,_0x51c5b5=[..._0x1144fd[_0x1c4ec8(0x5d0)]['keys']()][_0x1c4ec8(0x398)](_0x5f346a=>!_0x5f346a[_0x1c4ec8(0x3ad)]('~'))[_0x1c4ec8(0x42c)];if(_0x1144fd['_license']?.[_0x1c4ec8(0x4a2)]?.[_0x1c4ec8(0x25b)]===0x1){const _0x239df8=Math[_0x1c4ec8(0x345)]((_0x1144fd[_0x1c4ec8(0x3db)]['active']['expiresAt']-Date[_0x1c4ec8(0x46e)]())/0x5265c00);console['log']('\x20\x20\x20\x20license:\x20⚠\x20OPEN\x20—\x20'+_0x1144fd[_0x1c4ec8(0x3db)][_0x1c4ec8(0x4a2)][_0x1c4ec8(0x207)]+_0x1c4ec8(0x590)+_0x239df8+'\x20days\x20—\x20POC/demo\x20only,\x20not\x20node-bound)');}else{if(_0x1144fd[_0x1c4ec8(0x3db)]?.[_0x1c4ec8(0x4a2)]){const _0x3130a5=_0x1144fd[_0x1c4ec8(0x3db)][_0x1c4ec8(0x4a2)];console['log'](_0x1c4ec8(0x427)+_0x3130a5[_0x1c4ec8(0x207)]+_0x1c4ec8(0x3c0)+new Date(_0x3130a5['expiresAt'])[_0x1c4ec8(0x2f9)]()[_0x1c4ec8(0x5f5)](0x0,0xa)+')');const _0x574f31=_0x3130a5[_0x1c4ec8(0x41b)]||{};if(_0x574f31[_0x1c4ec8(0x1bd)]){const _0x222a3f=Math[_0x1c4ec8(0x594)](_0x421639/_0x574f31['maxWrites']*0x64);console[_0x1c4ec8(0x5f4)](_0x1c4ec8(0x505)+_0x421639[_0x1c4ec8(0x17b)]()+'\x20/\x20'+_0x574f31['maxWrites']['toLocaleString']()+_0x1c4ec8(0x25c)+_0x222a3f+_0x1c4ec8(0x30c)+_0x51c5b5+(_0x574f31[_0x1c4ec8(0x5ba)]?'/'+_0x574f31[_0x1c4ec8(0x5ba)]:'')+_0x1c4ec8(0x4eb)+(_0x51c5b5===0x1?'':'s'));}}else{if(_0x1144fd[_0x1c4ec8(0x3db)]){const _0x378873=_0x1144fd['_license'][_0x1c4ec8(0x3dc)](),_0x28486b=_0x378873[_0x1c4ec8(0x42c)]?_0x378873['map'](_0x4cf9c6=>_0x4cf9c6[_0x1c4ec8(0xba)])[_0x1c4ec8(0x4b5)](',\x20'):'(add\x20a\x20license\x20first)',_0x435f7d=_0x1144fd[_0x1c4ec8(0x3db)][_0x1c4ec8(0x21b)],_0x30ff73=_0x435f7d['limits']['maxWrites']?Math[_0x1c4ec8(0x594)](_0x421639/_0x435f7d[_0x1c4ec8(0x41b)]['maxWrites']*0x64):0x0;console[_0x1c4ec8(0x5f4)](_0x1c4ec8(0x5d5)),console[_0x1c4ec8(0x5f4)](_0x1c4ec8(0x505)+_0x421639[_0x1c4ec8(0x17b)]()+_0x1c4ec8(0x2a0)+_0x435f7d[_0x1c4ec8(0x41b)][_0x1c4ec8(0x1bd)]['toLocaleString']()+_0x1c4ec8(0x25c)+_0x30ff73+_0x1c4ec8(0x30c)+_0x51c5b5+_0x1c4ec8(0x2a0)+_0x435f7d[_0x1c4ec8(0x41b)][_0x1c4ec8(0x5ba)]+_0x1c4ec8(0x4a5)),console[_0x1c4ec8(0x5f4)](_0x1c4ec8(0x14c)+_0x28486b);}}}}console[_0x1c4ec8(0x5f4)](_0x1c4ec8(0x2cf)+_0x125f44[_0x1c4ec8(0x2aa)]+_0x1c4ec8(0x587));!_0x125f44[_0x1c4ec8(0x1ea)]&&console[_0x1c4ec8(0x5f4)](_0x1c4ec8(0x53b)+_0x125f44['port']+_0x1c4ec8(0xf8));console[_0x1c4ec8(0x5f4)](''),console[_0x1c4ec8(0x5f4)](_0x1c4ec8(0x3b5)+_0xb9d7a3+'ms'),_0x199f3c(_0x1144fd[_0x1c4ec8(0x410)]?.['getSecurityNotices']?.()??[]);let _0x161900=![];async function _0x292ea8(_0x2728ff){const _0x5a14f3=_0x1c4ec8;_0x161900&&(process['stderr'][_0x5a14f3(0x288)](_0x5a14f3(0x389)),process[_0x5a14f3(0x155)](0x82));_0x161900=!![],process[_0x5a14f3(0x1b8)][_0x5a14f3(0x288)]('\x0a[okdb]\x20received\x20'+(_0x2728ff||'shutdown')+',\x20closing…\x0a');const _0x247cb8=setTimeout(()=>{const _0x1dae6a=_0x5a14f3;process[_0x1dae6a(0x1b8)][_0x1dae6a(0x288)](_0x1dae6a(0x132)),process[_0x1dae6a(0x155)](0x1);},0x1388);try{_0x36b20d[_0x5a14f3(0x556)](_0x1d8c7f);}catch{}try{await _0x1144fd[_0x5a14f3(0x1ab)]();}catch(_0x4ad22c){process[_0x5a14f3(0x1b8)][_0x5a14f3(0x288)](_0x5a14f3(0x193)+(_0x4ad22c?.[_0x5a14f3(0x491)]??_0x4ad22c)+'\x0a');}clearTimeout(_0x247cb8),process[_0x5a14f3(0x1b8)][_0x5a14f3(0x288)](_0x5a14f3(0x4f6)),process[_0x5a14f3(0x155)](0x0);}process['on'](_0x1c4ec8(0x15e),()=>_0x292ea8('SIGINT')),process['on'](_0x1c4ec8(0x380),()=>_0x292ea8(_0x1c4ec8(0x380))),process['on'](_0x1c4ec8(0xe1),()=>_0x292ea8(_0x1c4ec8(0xe1)));}}const _0x3a9bc6=new Set([_0x488bc5(0x2e3),_0x488bc5(0x1c4),_0x488bc5(0x1b6),_0x488bc5(0x522),'export',_0x488bc5(0x3cf),'reset','token',_0x488bc5(0x4b5),'license']),_0x16222c=process[_0x488bc5(0x167)][0x2];if(_0x16222c===_0x488bc5(0x2e3))console[_0x488bc5(0x5f4)](require$$3['version']),process[_0x488bc5(0x155)](0x0);else{if(_0x16222c&&_0x3a9bc6['has'](_0x16222c)){const _0x81ff86=process[_0x488bc5(0x167)]['slice'](0x3),_0x52fd7e=_0x35d3c9([_0x488bc5(0x48a),_0x488bc5(0x110),..._0x81ff86]),_0xed69d9=_0x5d1c00(_0x52fd7e),_0x11c74b=new Set([_0x488bc5(0x98),'-d','--key','-k',_0x488bc5(0x37b),'-c',_0x488bc5(0x101),'-p',_0x488bc5(0x569),'--env','-e',_0x488bc5(0xeb),'--name','--password',_0x488bc5(0x58d),_0x488bc5(0x4c4),'--grants',_0x488bc5(0x81),_0x488bc5(0x30f),'--username','-u','--address']);let _0x26f437=null;for(let _0xded787=0x0;_0xded787<_0x81ff86[_0x488bc5(0x42c)];_0xded787++){if(_0x11c74b[_0x488bc5(0x1b4)](_0x81ff86[_0xded787])){_0xded787++;continue;}if(!_0x81ff86[_0xded787][_0x488bc5(0x3ad)]('-')){_0x26f437=_0x81ff86[_0xded787];break;}}(async()=>{const _0x2a20cf=_0x488bc5;if(_0x16222c===_0x2a20cf(0x28c)){const _0x1dc768=process[_0x2a20cf(0x167)][0x3],_0x5c5b3e=process[_0x2a20cf(0x167)][_0x2a20cf(0x5f5)](0x4),_0x3fb309=_0x35d3c9([_0x2a20cf(0x48a),_0x2a20cf(0x110),..._0x5c5b3e]),_0xded313=_0x5d1c00(_0x3fb309),_0x2a51e1=new Set([_0x2a20cf(0x98),'-d',_0x2a20cf(0x240),'-k',_0x2a20cf(0x37b),'-c',_0x2a20cf(0x101),'-p',_0x2a20cf(0x5af),_0x2a20cf(0x2e0),'--label','--permissions',_0x2a20cf(0x3bf),'--ttl',_0x2a20cf(0x569),_0x2a20cf(0x578),'-e',_0x2a20cf(0xeb)]),_0x9366f=[];for(let _0x394b75=0x0;_0x394b75<_0x5c5b3e[_0x2a20cf(0x42c)];_0x394b75++){if(_0x2a51e1[_0x2a20cf(0x1b4)](_0x5c5b3e[_0x394b75])){_0x394b75++;continue;}if(_0x5c5b3e[_0x394b75][_0x2a20cf(0x3ad)]('-'))continue;_0x9366f[_0x2a20cf(0x591)](_0x5c5b3e[_0x394b75]);}switch(_0x1dc768){case _0x2a20cf(0x19f):await _0x32962f(_0xded313,_0x3fb309);break;case'list':await _0x5e5c7c(_0xded313);break;case _0x2a20cf(0x4fe):await _0x80744e(_0x9366f[0x0],_0xded313);break;default:console[_0x2a20cf(0x3b8)]('[okdb]\x20unknown\x20token\x20action:\x20\x22'+_0x1dc768+_0x2a20cf(0x411)),process[_0x2a20cf(0x155)](0x1);}return;}if(_0x16222c===_0x2a20cf(0x3fd)){const _0x5471d2=requireOkdbLicenseCodec(),_0x46eba4=process[_0x2a20cf(0x167)][_0x2a20cf(0x5f5)](0x3),_0xe4ef7c=_0x35d3c9([_0x2a20cf(0x48a),_0x2a20cf(0x110),..._0x46eba4]),_0x264392=_0x5d1c00(_0xe4ef7c),_0x570f9d=new Set([_0x2a20cf(0x98),'-d',_0x2a20cf(0x240),'-k',_0x2a20cf(0x37b),'-c',_0x2a20cf(0x101),'-p',_0x2a20cf(0x569)]),_0x140cf0=[];for(let _0x5902b5=0x0;_0x5902b5<_0x46eba4[_0x2a20cf(0x42c)];_0x5902b5++){if(_0x570f9d[_0x2a20cf(0x1b4)](_0x46eba4[_0x5902b5])){_0x5902b5++;continue;}if(_0x46eba4[_0x5902b5]['startsWith']('-'))continue;_0x140cf0[_0x2a20cf(0x591)](_0x46eba4[_0x5902b5]);}const _0x4326d0=_0x140cf0[0x0]??null;if(_0x4326d0==='remove')await _0x17a4bc(_0x140cf0[0x1],_0x264392);else{if(!_0x4326d0)await _0x228ddb(_0x264392);else{let _0x1956b1=_0x5471d2[_0x2a20cf(0x5cb)](_0x4326d0);if(_0x1956b1===_0x2a20cf(0x22a)&&_0x36b20d['existsSync'](_0x4326d0))_0x1956b1='path';if(_0x1956b1===_0x2a20cf(0x366))try{const _0x346d1a=_0x36b20d[_0x2a20cf(0x5b3)](_0x4326d0,_0x2a20cf(0x1bb))[_0x2a20cf(0x2a6)](),_0x33ab91=_0x5471d2['detectInputType'](_0x346d1a);if(_0x33ab91==='activation'){await _0x2232f3(_0x346d1a,_0x264392);return;}await _0x1a926a(_0x4326d0,_0x264392);return;}catch(_0xadc305){console[_0x2a20cf(0x3b8)](_0x2a20cf(0x19b)+_0x4326d0+':\x20'+_0xadc305['message']),process['exit'](0x1);}switch(_0x1956b1){case'blob':await _0x1a926a(_0x4326d0,_0x264392);break;case _0x2a20cf(0x510):await _0x2232f3(_0x4326d0,_0x264392);break;case _0x2a20cf(0x486):await _0x45a651(_0x4326d0,_0x264392);break;default:console[_0x2a20cf(0x3b8)]('[okdb]\x20error:\x20unrecognized\x20input:\x20\x22'+_0x4326d0+'\x22'),console['error'](''),console[_0x2a20cf(0x3b8)](_0x2a20cf(0x251)),console[_0x2a20cf(0x3b8)](_0x2a20cf(0x4c2)),console['error'](_0x2a20cf(0x2c2)),console[_0x2a20cf(0x3b8)](_0x2a20cf(0x378)),console[_0x2a20cf(0x3b8)](_0x2a20cf(0x529)),console[_0x2a20cf(0x3b8)](''),console[_0x2a20cf(0x3b8)](_0x2a20cf(0x54f)),process['exit'](0x1);}}}return;}switch(_0x16222c){case _0x2a20cf(0x1c4):await _0x261629(_0xed69d9);break;case _0x2a20cf(0x1b6):await _0x1a17f7();break;case'reset':await _0x2addb5(_0xed69d9);break;case'backup':await _0x45b10e(_0x26f437??_0x25d216[_0x2a20cf(0x535)]('./okdb-backup'),_0xed69d9);break;case _0x2a20cf(0x185):await _0x119c5d(_0x26f437??_0x25d216[_0x2a20cf(0x535)]('./okdb-export.ndjson'),_0xed69d9,_0x52fd7e);break;case _0x2a20cf(0x3cf):await _0x52a5cc(_0x26f437??_0x25d216[_0x2a20cf(0x535)](_0x2a20cf(0x1af)),_0xed69d9,_0x52fd7e);break;case _0x2a20cf(0x4b5):await _0x1e66ef(_0x26f437,_0xed69d9,_0x52fd7e);break;}})()[_0x488bc5(0x52a)](()=>process[_0x488bc5(0x155)](0x0))[_0x488bc5(0x15f)](_0x5965d6=>{const _0x41abb7=_0x488bc5;console['error'](_0x41abb7(0x60f)+(_0x5965d6[_0x41abb7(0x491)]||_0x5965d6)+'\x0a'),process['exit'](0x1);});}else _0x10805f()[_0x488bc5(0x15f)](_0x4ff570=>{const _0x2c7ac5=_0x488bc5;console[_0x2c7ac5(0x3b8)](_0x2c7ac5(0x49a)),console[_0x2c7ac5(0x3b8)](_0x4ff570[_0x2c7ac5(0x1b3)]||_0x4ff570),process[_0x2c7ac5(0x155)](0x1);});}return okdb$1;}var okdbExports=requireOkdb(),okdb=getDefaultExportFromCjs(okdbExports);module[_0x17fdfc(0x59c)]=okdb;