@kedem/okdb 2.3.4 → 2.4.0

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.
Files changed (60) hide show
  1. package/CHANGELOG.md +366 -0
  2. package/algorithm-worker-thread.js +1 -1
  3. package/bin/okdb.js +1 -1
  4. package/docs/auth-and-sync.md +28 -4
  5. package/docs/auth-permissions.md +19 -6
  6. package/docs/change-log.md +79 -59
  7. package/docs/data-model.md +20 -18
  8. package/docs/deployment.md +25 -0
  9. package/docs/diagnostics.md +59 -17
  10. package/docs/embeddings.md +57 -6
  11. package/docs/files.md +1 -1
  12. package/docs/fts.md +50 -5
  13. package/docs/functions.md +21 -8
  14. package/docs/http-api.md +139 -98
  15. package/docs/http-cluster.md +30 -8
  16. package/docs/indexes.md +5 -4
  17. package/docs/logging.md +18 -0
  18. package/docs/migration.md +94 -2
  19. package/docs/pipelines.md +6 -1
  20. package/docs/plugins.md +12 -18
  21. package/docs/process-registry.md +50 -39
  22. package/docs/processors.md +40 -22
  23. package/docs/querying.md +50 -36
  24. package/docs/queue.md +110 -14
  25. package/docs/subscriptions.md +35 -24
  26. package/docs/sync.md +96 -37
  27. package/docs/time-machine.md +23 -17
  28. package/docs/transactions.md +11 -19
  29. package/docs/ttl.md +118 -67
  30. package/docs/upgrade-2.0.md +2 -2
  31. package/docs/views.md +71 -52
  32. package/okdb-functions-sandbox-worker.js +1 -1
  33. package/okdb-http-worker-child.js +1 -1
  34. package/okdb-views-bootstrap-worker.js +1 -1
  35. package/okdb.js +1 -1
  36. package/package.json +1 -1
  37. package/public/sections/db/parts/type-viewer.ok.js +1 -1
  38. package/public/sections/embeddings/parts/engines-overview.ok.js +1 -1
  39. package/public/sections/queue/parts/queue-jobs.ok.js +1 -1
  40. package/public/sections/system/modals/data-ops-modal.ok.js +1 -1
  41. package/types/environment.d.ts +320 -52
  42. package/types/features/admin.d.ts +8 -2
  43. package/types/features/api.d.ts +10 -16
  44. package/types/features/auth.d.ts +135 -16
  45. package/types/features/embeddings.d.ts +639 -31
  46. package/types/features/engines.d.ts +368 -14
  47. package/types/features/files.d.ts +2 -4
  48. package/types/features/fts.d.ts +98 -26
  49. package/types/features/functions.d.ts +175 -15
  50. package/types/features/mcp.d.ts +23 -10
  51. package/types/features/pipelines.d.ts +268 -9
  52. package/types/features/queue.d.ts +230 -34
  53. package/types/features/sync.d.ts +177 -14
  54. package/types/features/time-machine.d.ts +117 -16
  55. package/types/features/views.d.ts +230 -39
  56. package/types/index.d.ts +357 -254
  57. package/types/okdb.d.ts +377 -0
  58. package/types/options.d.ts +309 -48
  59. package/public/test-cron-input.html +0 -60
  60. package/public/test-json-input.html +0 -280
package/bin/okdb.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- 'use strict';const _0x5411c3=_0x5511;(function(_0x4214a2,_0x3484be){const _0xc643ce=_0x5511,_0x1499f6=_0x4214a2();while(!![]){try{const _0xcf17a4=-parseInt(_0xc643ce(0x2eb))/0x1+-parseInt(_0xc643ce(0x730))/0x2*(parseInt(_0xc643ce(0x5ee))/0x3)+parseInt(_0xc643ce(0x4d0))/0x4+-parseInt(_0xc643ce(0x190))/0x5*(-parseInt(_0xc643ce(0x719))/0x6)+-parseInt(_0xc643ce(0x467))/0x7+-parseInt(_0xc643ce(0x379))/0x8*(parseInt(_0xc643ce(0x38e))/0x9)+parseInt(_0xc643ce(0x72a))/0xa;if(_0xcf17a4===_0x3484be)break;else _0x1499f6['push'](_0x1499f6['shift']());}catch(_0x51e184){_0x1499f6['push'](_0x1499f6['shift']());}}}(_0x358f,0x2993b));var require$$1=require(_0x5411c3(0x504)),require$$1$1=require('fs'),require$$0=require('os'),require$$4$1=require(_0x5411c3(0x303)),require$$5=require(_0x5411c3(0x6ec)),require$$0$2=require(_0x5411c3(0x439)),require$$2=require(_0x5411c3(0x3d2)),require$$0$1=require('node:crypto'),require$$4=require(_0x5411c3(0x3f0)),require$$1$2=require(_0x5411c3(0x543)),require$$0$3=require(_0x5411c3(0x253)),require$$0$4=require(_0x5411c3(0x519)),require$$0$5=require(_0x5411c3(0x2ea)),require$$0$6=require(_0x5411c3(0x277)),require$$1$3=require(_0x5411c3(0x500)),require$$2$1=require(_0x5411c3(0x51d)),require$$8=require(_0x5411c3(0x508)),commonjsGlobal=typeof globalThis!==_0x5411c3(0x31e)?globalThis:typeof window!==_0x5411c3(0x31e)?window:typeof global!==_0x5411c3(0x31e)?global:typeof self!=='undefined'?self:{};function getDefaultExportFromCjs(_0xa13eb0){const _0x199eb9=_0x5411c3;return _0xa13eb0&&_0xa13eb0[_0x199eb9(0x3cc)]&&Object[_0x199eb9(0x6f7)][_0x199eb9(0x60b)][_0x199eb9(0x65a)](_0xa13eb0,'default')?_0xa13eb0[_0x199eb9(0x45b)]:_0xa13eb0;}var okdb$1={},okdbWorkers,hasRequiredOkdbWorkers;function requireOkdbWorkers(){if(hasRequiredOkdbWorkers)return okdbWorkers;hasRequiredOkdbWorkers=0x1;const _0x3bb0bc=require$$0,_0x2b7267=require$$1$1,_0x340292=require$$1;let _0x53c2a8;function _0x2e1999(){const _0x266dd5=_0x5511;if(process.env.OKDB_FORCE_SHMBUF_FALLBACK==='1')return![];if(_0x53c2a8!==undefined)return _0x53c2a8;try{const _0x511aff=_0x340292[_0x266dd5(0x5e9)](require[_0x266dd5(0x25c)](_0x266dd5(0x393)));_0x53c2a8=_0x2b7267[_0x266dd5(0x2d5)](_0x340292[_0x266dd5(0x2b6)](_0x511aff,_0x266dd5(0x25b),_0x266dd5(0x396),_0x266dd5(0x73b)));}catch{_0x53c2a8=![];}return _0x53c2a8;}function _0x5348f5(){const _0x479d1b=_0x5511,_0x140dda=_0x3bb0bc[_0x479d1b(0x383)]()[_0x479d1b(0x1b1)];return Math['max'](0x1,_0x140dda-0x1);}function _0x300a21(_0x39f858,_0x2e923d={}){const _0x1c9d59=_0x5511,_0x343488=_0x2e923d['shmbufNative']!==undefined?_0x2e923d[_0x1c9d59(0x20f)]:_0x2e1999();let _0x53004d;if(_0x39f858?.[_0x1c9d59(0x37c)])_0x53004d=0x1;else{let _0x26e689,_0x535f8d;if(_0x39f858?.[_0x1c9d59(0x74e)]!==undefined&&_0x39f858[_0x1c9d59(0x74e)]!==null&&_0x39f858['workersFlag']!=='')_0x26e689=_0x39f858[_0x1c9d59(0x74e)],_0x535f8d='--workers';else{if(process.env.OKDB_HTTP_WORKERS!==undefined&&process.env.OKDB_HTTP_WORKERS!=='')_0x26e689=process.env.OKDB_HTTP_WORKERS,_0x535f8d=_0x1c9d59(0x537);else _0x39f858?.[_0x1c9d59(0x277)]?.[_0x1c9d59(0x4d1)]!==undefined&&_0x39f858['http'][_0x1c9d59(0x4d1)]!==null&&_0x39f858[_0x1c9d59(0x277)][_0x1c9d59(0x4d1)]!==''&&(_0x26e689=_0x39f858['http'][_0x1c9d59(0x4d1)],_0x535f8d='http.workers');}if(_0x26e689===undefined)_0x53004d=_0x5348f5();else{const _0xc712be=Number(_0x26e689);!Number[_0x1c9d59(0x428)](_0xc712be)||_0xc712be<0x1?(console[_0x1c9d59(0x305)](_0x1c9d59(0x5ad)+_0x535f8d+'='+JSON[_0x1c9d59(0x540)](_0x26e689)+'\x20(must\x20be\x20an\x20integer\x20>=\x201)\x20—\x20using\x201'),_0x53004d=0x1):_0x53004d=_0xc712be;}}return!_0x343488&&_0x53004d>0x1&&(console[_0x1c9d59(0x305)]('[okdb]\x20shmbuf\x20native\x20binding\x20unavailable\x20—\x20multi-process\x20clustering\x20is\x20unsafe\x20'+(_0x1c9d59(0x432)+_0x53004d+').')),_0x53004d=0x1),_0x53004d;}return okdbWorkers={'isShmbufNative':_0x2e1999,'defaultWorkers':_0x5348f5,'resolveWorkers':_0x300a21},okdbWorkers;}function _0x5511(_0x3f2074,_0x3a0262){_0x3f2074=_0x3f2074-0x185;const _0x358fd3=_0x358f();let _0x551101=_0x358fd3[_0x3f2074];return _0x551101;}var version='2.3.4',require$$3={'version':version},okdbAuthTokens,hasRequiredOkdbAuthTokens;function requireOkdbAuthTokens(){if(hasRequiredOkdbAuthTokens)return okdbAuthTokens;hasRequiredOkdbAuthTokens=0x1;const _0x4d50d6=require$$2;function _0x472e84(_0x1b865c,_0x2d57d9){const _0x4a7e01=_0x5511;return _0x4d50d6['createHmac'](_0x4a7e01(0x755),_0x2d57d9)[_0x4a7e01(0x751)](_0x1b865c)['digest'](_0x4a7e01(0x465));}function _0x4530b9(_0x1aba88,_0x3869de){const _0x4fae55=_0x5511;if(typeof _0x1aba88!=='string'||typeof _0x3869de!==_0x4fae55(0x54f))return![];if(Buffer[_0x4fae55(0x3f8)](_0x1aba88)!==Buffer[_0x4fae55(0x3f8)](_0x3869de))return![];return _0x4d50d6[_0x4fae55(0x42b)](Buffer['from'](_0x1aba88),Buffer[_0x4fae55(0x716)](_0x3869de));}function _0x273516(_0x1d9b0d){const _0x1e30b8=_0x5511;if(!_0x1d9b0d?.['startsWith'](_0x1e30b8(0x4be)))return null;return _0x1d9b0d['slice'](0x7);}function _0x23cfc5(_0x19a8b5=0x20){return _0x4d50d6['randomBytes'](_0x19a8b5)['toString']('base64url');}function _0x7e1fe3(_0x558eff){const _0x530118=_0x5511;return _0x4d50d6[_0x530118(0x78f)](_0x530118(0x755))[_0x530118(0x751)](_0x558eff)['digest'](_0x530118(0x723));}function _0xaf640f(_0x455fee,_0x18e208,_0x43e82e=0x36ee80){const _0x283b78=_0x5511;if(!_0x18e208)throw new Error('Token\x20secret\x20not\x20configured');const _0x574b2f=Date[_0x283b78(0x6a7)](),_0x269bb2=Buffer['from'](JSON[_0x283b78(0x540)]({'iat':_0x574b2f,'exp':_0x574b2f+_0x43e82e,'sub':_0x455fee?.['id']??_0x455fee?.[_0x283b78(0x6ca)]??null,'username':_0x455fee?.['username']??_0x455fee?.[_0x283b78(0x60a)]??null,'roles':Array[_0x283b78(0x729)](_0x455fee?.[_0x283b78(0x56c)])?_0x455fee[_0x283b78(0x56c)]:[]}))[_0x283b78(0x202)](_0x283b78(0x465)),_0xe3a93d=_0x472e84(_0x269bb2,_0x18e208);return _0x269bb2+'.'+_0xe3a93d;}function _0x3deaec(_0x1570e5,_0x1a3e93){const _0x5818d9=_0x5511;if(!_0x1a3e93||typeof _0x1570e5!==_0x5818d9(0x54f))return null;const [_0x179c70,_0x59805e]=_0x1570e5['split']('.');if(!_0x179c70||!_0x59805e)return null;const _0x3beb43=_0x472e84(_0x179c70,_0x1a3e93);if(!_0x4530b9(_0x59805e,_0x3beb43))return null;try{const _0xd694eb=JSON[_0x5818d9(0x355)](Buffer[_0x5818d9(0x716)](_0x179c70,_0x5818d9(0x465))[_0x5818d9(0x202)]()),_0x2938ad=0x7530;if(Date['now']()>Number(_0xd694eb?.['exp']??0x0)+_0x2938ad)return null;return _0xd694eb;}catch{return null;}}async function _0x6fe079(_0x2fb76d){return new Promise((_0x6d4fa1,_0x33df2a)=>{const _0x4c3ab1=_0x5511,_0x34e27e=_0x4d50d6[_0x4c3ab1(0x209)](0x10);_0x4d50d6[_0x4c3ab1(0x19a)](_0x2fb76d,_0x34e27e,0x40,(_0x3b369b,_0x505f09)=>{const _0x5ef70a=_0x4c3ab1;if(_0x3b369b)_0x33df2a(_0x3b369b);_0x6d4fa1(_0x34e27e[_0x5ef70a(0x202)](_0x5ef70a(0x723))+':'+_0x505f09[_0x5ef70a(0x202)](_0x5ef70a(0x723)));});});}async function _0x1a75cd(_0x12b6a5,_0x872876){const _0x358b01=_0x5511,[_0x34a0b3,_0x5207a4]=_0x872876['split'](':');if(!_0x34a0b3||!_0x5207a4)return![];const _0x118df6=Buffer[_0x358b01(0x716)](_0x34a0b3,_0x358b01(0x723));return new Promise((_0x5b2c39,_0x56d163)=>{const _0x3a0a81=_0x358b01;_0x4d50d6[_0x3a0a81(0x19a)](_0x12b6a5,_0x118df6,0x40,(_0x531e49,_0x1d3bb7)=>{const _0x1f5cff=_0x3a0a81;if(_0x531e49)_0x56d163(_0x531e49);_0x5b2c39(_0x4d50d6['timingSafeEqual'](_0x1d3bb7,Buffer[_0x1f5cff(0x716)](_0x5207a4,_0x1f5cff(0x723))));});});}return okdbAuthTokens={'hmac':_0x472e84,'timingSafeEqual':_0x4530b9,'parseBearer':_0x273516,'randomToken':_0x23cfc5,'hashToken':_0x7e1fe3,'issueToken':_0xaf640f,'authenticateToken':_0x3deaec,'hashPassword':_0x6fe079,'verifyPassword':_0x1a75cd},okdbAuthTokens;}var okdbLicenseCodec,hasRequiredOkdbLicenseCodec;function requireOkdbLicenseCodec(){const _0x279b05=_0x5411c3;if(hasRequiredOkdbLicenseCodec)return okdbLicenseCodec;hasRequiredOkdbLicenseCodec=0x1;const _0x6fa97e=require$$0$1,_0x152cc5=_0x279b05(0x79f),_0x4d1e0c=new Uint8Array(0x100)[_0x279b05(0x481)](0xff);for(let _0x4cb11b=0x0;_0x4cb11b<_0x152cc5[_0x279b05(0x1b1)];_0x4cb11b++){_0x4d1e0c[_0x152cc5[_0x279b05(0x37f)](_0x4cb11b)]=_0x4cb11b,_0x4d1e0c[_0x152cc5['charCodeAt'](_0x4cb11b)+0x20]=_0x4cb11b;}_0x4d1e0c['O'[_0x279b05(0x37f)](0x0)]=0x0,_0x4d1e0c['o'[_0x279b05(0x37f)](0x0)]=0x0,_0x4d1e0c['I'[_0x279b05(0x37f)](0x0)]=0x1,_0x4d1e0c['i'[_0x279b05(0x37f)](0x0)]=0x1,_0x4d1e0c['L'[_0x279b05(0x37f)](0x0)]=0x1,_0x4d1e0c['l'[_0x279b05(0x37f)](0x0)]=0x1;function _0x4954b0(_0x2b44b2){let _0x12d06c=0x0,_0x5d57d0=0x0,_0xc0d96e='';for(let _0x5e5df3=0x0;_0x5e5df3<_0x2b44b2['length'];_0x5e5df3++){_0x5d57d0=_0x5d57d0<<0x8|_0x2b44b2[_0x5e5df3],_0x12d06c+=0x8;while(_0x12d06c>=0x5){_0x12d06c-=0x5,_0xc0d96e+=_0x152cc5[_0x5d57d0>>>_0x12d06c&0x1f];}}return _0x12d06c>0x0&&(_0xc0d96e+=_0x152cc5[_0x5d57d0<<0x5-_0x12d06c&0x1f]),_0xc0d96e;}function _0x2b4791(_0x52abb2){const _0x4a5869=_0x279b05;_0x52abb2=_0x52abb2[_0x4a5869(0x1f7)](/-/g,'')[_0x4a5869(0x26a)]();let _0x1ad981=0x0,_0x174da4=0x0;const _0x310545=[];for(let _0x566f00=0x0;_0x566f00<_0x52abb2[_0x4a5869(0x1b1)];_0x566f00++){const _0x1fc859=_0x4d1e0c[_0x52abb2[_0x4a5869(0x37f)](_0x566f00)];if(_0x1fc859===0xff)continue;_0x174da4=_0x174da4<<0x5|_0x1fc859,_0x1ad981+=0x5,_0x1ad981>=0x8&&(_0x1ad981-=0x8,_0x310545[_0x4a5869(0x494)](_0x174da4>>>_0x1ad981&0xff));}return Buffer[_0x4a5869(0x716)](_0x310545);}const _0x380f93=['sync',_0x279b05(0x64c),_0x279b05(0x5bf),_0x279b05(0x37a),_0x279b05(0x556),_0x279b05(0x696),_0x279b05(0x3b5),_0x279b05(0x261)],_0x489b13=0x0,_0x5b7e17=0x1,_0x502cb6=0x2,_0x240929=0x6*0x1e*0x18*0x3c*0x3c*0x3e8;function _0x3226fb({issuedAt:_0x297720,expiresAt:_0x2bc86,licensee:licensee='',features:features={},limits:limits={},licenseType:licenseType=_0x489b13}){const _0x1bada9=_0x279b05,_0x19eb74=Buffer[_0x1bada9(0x716)](licensee,_0x1bada9(0x1f4))[_0x1bada9(0x7a7)](0x0,0x40),_0x302c24=0x1+0x1+0x4+0x4+0x1+_0x19eb74[_0x1bada9(0x1b1)]+0x2+0x10,_0x1fc3af=Buffer['allocUnsafe'](_0x302c24);let _0x2eaf67=0x0;_0x1fc3af[_0x1bada9(0x414)](0x1,_0x2eaf67++),_0x1fc3af[_0x1bada9(0x414)](licenseType,_0x2eaf67++),_0x1fc3af[_0x1bada9(0x35e)](Math[_0x1bada9(0x1f9)](_0x297720/0x3e8),_0x2eaf67),_0x2eaf67+=0x4,_0x1fc3af[_0x1bada9(0x35e)](Math[_0x1bada9(0x1f9)](_0x2bc86/0x3e8),_0x2eaf67),_0x2eaf67+=0x4,_0x1fc3af[_0x1bada9(0x414)](_0x19eb74['length'],_0x2eaf67++),_0x19eb74[_0x1bada9(0x79d)](_0x1fc3af,_0x2eaf67),_0x2eaf67+=_0x19eb74[_0x1bada9(0x1b1)];let _0x56d5c0=0x0;for(let _0x4bc19c=0x0;_0x4bc19c<_0x380f93[_0x1bada9(0x1b1)];_0x4bc19c++){if(features[_0x380f93[_0x4bc19c]])_0x56d5c0|=0x1<<_0x4bc19c;}_0x1fc3af[_0x1bada9(0x576)](_0x56d5c0,_0x2eaf67),_0x2eaf67+=0x2;const _0x15b8e2=[_0x1bada9(0x71b),_0x1bada9(0x761),_0x1bada9(0x3b3),_0x1bada9(0x1d8)];for(const _0x79f98e of _0x15b8e2){_0x1fc3af[_0x1bada9(0x35e)](limits[_0x79f98e]||0x0,_0x2eaf67),_0x2eaf67+=0x4;}return _0x1fc3af;}function _0x1fc224(_0x2899d2){const _0x462acf=_0x279b05;let _0x4ab210=0x0;const _0x40e921=_0x2899d2['readUInt8'](_0x4ab210++),_0x2548a7=_0x2899d2[_0x462acf(0x4b2)](_0x4ab210++),_0x26909a=_0x2899d2[_0x462acf(0x33a)](_0x4ab210);_0x4ab210+=0x4;const _0x3b47d8=_0x2899d2[_0x462acf(0x33a)](_0x4ab210);_0x4ab210+=0x4;const _0x3eb7e1=_0x2899d2[_0x462acf(0x4b2)](_0x4ab210++),_0x4a3f87=_0x2899d2['slice'](_0x4ab210,_0x4ab210+_0x3eb7e1)[_0x462acf(0x202)](_0x462acf(0x1f4));_0x4ab210+=_0x3eb7e1;const _0x1ba97f=_0x2899d2['readUInt16BE'](_0x4ab210);_0x4ab210+=0x2;const _0x2095f4={};for(let _0x51b28a=0x0;_0x51b28a<_0x380f93[_0x462acf(0x1b1)];_0x51b28a++){_0x2095f4[_0x380f93[_0x51b28a]]=Boolean(_0x1ba97f&0x1<<_0x51b28a);}const _0x2bc216=[_0x462acf(0x71b),_0x462acf(0x761),'syncPeers',_0x462acf(0x1d8)],_0x3488ba={};for(const _0x160071 of _0x2bc216){const _0x2e928a=_0x2899d2['readUInt32BE'](_0x4ab210);_0x4ab210+=0x4,_0x3488ba[_0x160071]=_0x2e928a===0x0?null:_0x2e928a;}return{'v':_0x40e921,'licenseType':_0x2548a7,'issuedAt':_0x26909a*0x3e8,'expiresAt':_0x3b47d8*0x3e8,'licensee':_0x4a3f87,'features':_0x2095f4,'limits':_0x3488ba};}function _0x20fd84(_0x26a080,_0x46aed3){const _0x2b221d=_0x279b05,_0x5dc6a4=Buffer[_0x2b221d(0x33f)]([_0x26a080,_0x46aed3]),_0xfc5695=_0x4954b0(_0x5dc6a4),_0x2e323a=[];for(let _0x38cd4e=0x0;_0x38cd4e<_0xfc5695[_0x2b221d(0x1b1)];_0x38cd4e+=0x8){_0x2e323a['push'](_0xfc5695[_0x2b221d(0x7a7)](_0x38cd4e,_0x38cd4e+0x8));}return _0x2e323a[_0x2b221d(0x2b6)]('-');}function _0x545e90(_0xd7653a){const _0x1ffbc9=_0x279b05;if(typeof _0xd7653a!==_0x1ffbc9(0x54f))throw new Error(_0x1ffbc9(0x6e7));const _0x3601bd=_0x2b4791(_0xd7653a['replace'](/-/g,''));if(_0x3601bd[_0x1ffbc9(0x1b1)]<0x41)throw new Error(_0x1ffbc9(0x60f)+_0x3601bd[_0x1ffbc9(0x1b1)]+_0x1ffbc9(0x703));const _0x35e425=_0x3601bd[_0x1ffbc9(0x7a7)](0x0,_0x3601bd['length']-0x40),_0x43f10e=_0x3601bd[_0x1ffbc9(0x7a7)](_0x3601bd['length']-0x40);let _0x4d9b73;try{_0x4d9b73=_0x1fc224(_0x35e425);}catch(_0xbc7cc1){throw new Error(_0x1ffbc9(0x41c)+_0xbc7cc1['message']);}return{'rawBuf':_0x3601bd,'payload':_0x35e425,'sig':_0x43f10e,'decoded':_0x4d9b73};}function _0x2b3d0f(_0x21f7a0){const _0x39bc49=_0x279b05;return _0x6fa97e[_0x39bc49(0x78f)]('sha256')[_0x39bc49(0x751)](_0x21f7a0)[_0x39bc49(0x2ab)]()[_0x39bc49(0x7a7)](0x0,0x8);}function _0x139259(_0x30e4bb,_0x37779d,_0xbba941){const _0x365e74=_0x279b05,_0x5266ea='OKDB-PIN-V1:'+_0xbba941,_0x12e67a=Buffer[_0x365e74(0x33f)]([Buffer[_0x365e74(0x716)](_0x30e4bb,_0x365e74(0x1f4)),_0x37779d]),_0x40aaa2=_0x6fa97e[_0x365e74(0x630)](_0x365e74(0x755),_0x5266ea)[_0x365e74(0x751)](_0x12e67a)[_0x365e74(0x2ab)](),_0x4f01c9=_0x4954b0(_0x40aaa2[_0x365e74(0x7a7)](0x0,0x5));return{'pin':_0x4f01c9,'pinHmac':_0x40aaa2};}function _0x10f085(_0x425e15,_0x28d767,_0x4275ff){const _0x40fd6b=_0x279b05,_0x222590=Buffer[_0x40fd6b(0x5eb)](0x4d);let _0x43de44=0x0;_0x222590['writeUInt8'](0x1,_0x43de44++),_0x425e15[_0x40fd6b(0x79d)](_0x222590,_0x43de44),_0x43de44+=0x8,_0x222590[_0x40fd6b(0x35e)](_0x28d767,_0x43de44),_0x43de44+=0x4,_0x4275ff[_0x40fd6b(0x79d)](_0x222590,_0x43de44);const _0x48a3b4=_0x4954b0(_0x222590),_0x5a6ed9=[];for(let _0x3e0d97=0x0;_0x3e0d97<_0x48a3b4[_0x40fd6b(0x1b1)];_0x3e0d97+=0x6){_0x5a6ed9[_0x40fd6b(0x494)](_0x48a3b4[_0x40fd6b(0x7a7)](_0x3e0d97,_0x3e0d97+0x6));}return _0x5a6ed9[_0x40fd6b(0x2b6)]('-');}function _0x1747e6(_0x519568){const _0x2e2d4e=_0x279b05;if(typeof _0x519568!==_0x2e2d4e(0x54f))throw new Error(_0x2e2d4e(0x620));const _0xd8bf88=_0x2b4791(_0x519568[_0x2e2d4e(0x1f7)](/-/g,''));if(_0xd8bf88[_0x2e2d4e(0x1b1)]!==0x4d)throw new Error(_0x2e2d4e(0x53c)+_0xd8bf88[_0x2e2d4e(0x1b1)]);let _0x297c19=0x0;const _0x34ffee=_0xd8bf88[_0x2e2d4e(0x4b2)](_0x297c19++),_0x404ece=_0xd8bf88['slice'](_0x297c19,_0x297c19+0x8);_0x297c19+=0x8;const _0x262c4d=_0xd8bf88[_0x2e2d4e(0x33a)](_0x297c19);_0x297c19+=0x4;const _0x25d106=_0xd8bf88['slice'](_0x297c19);return{'v':_0x34ffee,'licenseHash':_0x404ece,'expiry':_0x262c4d,'sig':_0x25d106};}function _0x22cbea({tokenString:_0x7ed1ff,nodeId:_0x3ae957,rawBlobBuf:_0xa6ae69,pubKeyPem:_0xbcc411,pubFingerprint:_0x12adc5}){const _0x5d4d5e=_0x279b05;let _0x1ed6aa;try{_0x1ed6aa=_0x1747e6(_0x7ed1ff);}catch(_0x19c954){return{'valid':![],'reason':_0x5d4d5e(0x1c5)};}const _0x587176=_0x2b3d0f(_0xa6ae69);if(!_0x587176[_0x5d4d5e(0x3e3)](_0x1ed6aa['licenseHash']))return{'valid':![],'reason':_0x5d4d5e(0x346)};const {pinHmac:_0x522079}=_0x139259(_0x3ae957,_0x587176,_0x12adc5),_0x534b3d=Buffer[_0x5d4d5e(0x5eb)](0x4);_0x534b3d['writeUInt32BE'](_0x1ed6aa['expiry'],0x0);const _0x4233db=Buffer[_0x5d4d5e(0x33f)]([Buffer[_0x5d4d5e(0x716)]([_0x1ed6aa['v']]),_0x522079[_0x5d4d5e(0x7a7)](0x0,0x5),_0x1ed6aa[_0x5d4d5e(0x4bd)],_0x534b3d]);try{const _0x566a4f=_0x6fa97e['verify'](null,_0x4233db,_0xbcc411,_0x1ed6aa['sig']);if(!_0x566a4f)return{'valid':![],'reason':'SIG_INVALID'};}catch(_0x4f64df){return{'valid':![],'reason':_0x5d4d5e(0x293)};}if(_0x1ed6aa[_0x5d4d5e(0x650)]<Date[_0x5d4d5e(0x6a7)]()/0x3e8)return{'valid':![],'reason':_0x5d4d5e(0x389)};return{'valid':!![],'reason':'ok'};}function _0x21e02a(_0x38535c){const _0x15d74a=_0x279b05;if(typeof _0x38535c!=='string')return _0x15d74a(0x2e0);const _0x58c73f=_0x38535c[_0x15d74a(0x29c)]();if(_0x58c73f[_0x15d74a(0x72d)]('/')||_0x58c73f[_0x15d74a(0x72d)]('./')||_0x58c73f['startsWith']('../')||/^[A-Za-z]:[\\/]/['test'](_0x58c73f))return _0x15d74a(0x504);if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i[_0x15d74a(0x279)](_0x58c73f))return _0x15d74a(0x376);const _0x1a6f6d=_0x58c73f['replace'](/[\s-]+/g,'')[_0x15d74a(0x1b1)];if(_0x1a6f6d===0x7c)return _0x15d74a(0x50b);if(_0x1a6f6d>=0x95&&_0x1a6f6d<=0xfc)return _0x15d74a(0x5e2);return _0x15d74a(0x2e0);}return okdbLicenseCodec={'toBase32':_0x4954b0,'fromBase32':_0x2b4791,'encodeLicensePayload':_0x3226fb,'decodeLicensePayload':_0x1fc224,'encodeLicenseBlob':_0x20fd84,'decodeLicenseBlob':_0x545e90,'licenseHash':_0x2b3d0f,'derivePin':_0x139259,'encodeActivationToken':_0x10f085,'decodeActivationToken':_0x1747e6,'verifyActivation':_0x22cbea,'detectInputType':_0x21e02a,'FEATURE_NAMES':_0x380f93,'LICENSE_TYPE_STANDARD':_0x489b13,'LICENSE_TYPE_OPEN':_0x5b7e17,'LICENSE_TYPE_INTERNAL':_0x502cb6,'OPEN_LICENSE_MAX_DURATION_MS':_0x240929},okdbLicenseCodec;}var okdbError,hasRequiredOkdbError;function requireOkdbError(){if(hasRequiredOkdbError)return okdbError;hasRequiredOkdbError=0x1;class _0xdf8de1 extends Error{constructor(_0x1f5cfc,_0x5f1235,_0xe83bc9={}){const _0x5a9ebb=_0x5511;super(_0x1f5cfc),this['name']=_0x5a9ebb(0x6d3),this['code']=_0x5f1235,this['details']=_0xe83bc9,_0xe83bc9['cause']&&(this['cause']=_0xe83bc9[_0x5a9ebb(0x5ab)]),Error[_0x5a9ebb(0x71f)](this,this[_0x5a9ebb(0x4ca)]);}}class _0xd9af98 extends _0xdf8de1{constructor(_0x4b2774,_0xe7d1bd,_0x4031e7,_0xf146e3){const _0x4a5583=_0x5511;super(_0x4a5583(0x2de)+_0x4b2774+'@'+_0xe7d1bd+':\x20expected\x20'+_0x4031e7+_0x4a5583(0x19c)+_0xf146e3,_0x4a5583(0x374),{'type':_0x4b2774,'key':_0xe7d1bd,'expectedVersion':_0x4031e7,'actualVersion':_0xf146e3}),this[_0x4a5583(0x60a)]=_0x4a5583(0x3f9);}}class _0x1ba0f8 extends _0xdf8de1{constructor(_0x35b898,_0x3685c6){const _0x153f66=_0x5511;super(_0x35b898+'@'+_0x3685c6+_0x153f66(0x52c),_0x153f66(0x5c1),{'type':_0x35b898,'key':_0x3685c6}),this[_0x153f66(0x60a)]=_0x153f66(0x40e);}}class _0x2dc2c6 extends _0xdf8de1{constructor(_0x5c3de3,_0x4c2932){const _0xa83834=_0x5511;super(_0x5c3de3+'@'+_0x4c2932+_0xa83834(0x40b),_0xa83834(0x516),{'type':_0x5c3de3,'key':_0x4c2932}),this[_0xa83834(0x60a)]='OKDBAlreadyExistsError';}}class _0x5804bf extends _0xdf8de1{constructor(_0x28e5e6,_0x2142e3){const _0x4ed0a8=_0x5511,_0x36dd5a=typeof _0x2142e3;super(_0x4ed0a8(0x579)+_0x28e5e6+_0x4ed0a8(0x5ac)+_0x36dd5a+'.\x20Only\x20primitives,\x20null,\x20Buffers,\x20and\x20arrays\x20are\x20allowed.\x20Got:\x20'+_0x2142e3,_0x4ed0a8(0x325),{'index':_0x28e5e6,'key':_0x2142e3,'keyType':_0x36dd5a}),this[_0x4ed0a8(0x60a)]='OKDBInvalidIndexKeyError';}}class _0x1c57c7 extends _0xdf8de1{constructor(_0x257fe9){const _0x19d536=_0x5511,_0x5e17f5=typeof _0x257fe9;super(_0x19d536(0x658)+_0x5e17f5+_0x19d536(0x3bf)+_0x257fe9,_0x19d536(0x558),{'key':_0x257fe9,'keyType':_0x5e17f5}),this[_0x19d536(0x60a)]=_0x19d536(0x33e);}}class _0x4bff00 extends _0xdf8de1{constructor(_0xf86d50){const _0x44fe51=_0x5511;super(_0x44fe51(0x370)+_0xf86d50+_0x44fe51(0x30b),_0x44fe51(0x4da),{'type':_0xf86d50}),this[_0x44fe51(0x60a)]=_0x44fe51(0x40a);}}class _0x4b662c extends _0xdf8de1{constructor(_0x3523a7){const _0xe825b7=_0x5511;super('Type\x20\x27'+_0x3523a7+'\x27\x20already\x20registered',_0xe825b7(0x646),{'type':_0x3523a7}),this['name']=_0xe825b7(0x4bb);}}class _0x392d10 extends _0xdf8de1{constructor(_0x51e2ae,_0x40cc04){const _0x4031e4=_0x5511;super('Index\x20\x27'+_0x40cc04+_0x4031e4(0x787)+_0x51e2ae+'\x27\x20doesn\x27t\x20exist',_0x4031e4(0x783),{'type':_0x51e2ae,'index':_0x40cc04}),this[_0x4031e4(0x60a)]=_0x4031e4(0x457);}}class _0x50dc1b extends _0xdf8de1{constructor(_0x27635d,_0x587fde){const _0x270c9b=_0x5511;super(_0x270c9b(0x482)+_0x587fde+_0x270c9b(0x787)+_0x27635d+'\x27\x20is\x20already\x20registered',_0x270c9b(0x283),{'type':_0x27635d,'index':_0x587fde}),this[_0x270c9b(0x60a)]=_0x270c9b(0x363);}}class _0x2f6443 extends _0xdf8de1{constructor(_0x4fd26e,_0x1272a2={}){const _0x4fdcd5=_0x5511;super(_0x4fd26e,'INVALID_VALUE',_0x1272a2),this['name']=_0x4fdcd5(0x2ce);}}class _0x4a7001 extends _0xdf8de1{constructor(_0x26e146,_0x5853bb,_0x4d04ab,_0x3969ba,_0x2c9f92){const _0x27d58a=_0x5511;super(_0x27d58a(0x6d5)+_0x26e146+'@'+_0x5853bb+':\x20key\x20['+_0x4d04ab+']\x20already\x20maps\x20to\x20\x27'+_0x3969ba+_0x27d58a(0x6f5)+_0x2c9f92+'\x27','UNIQUE_CONSTRAINT',{'type':_0x26e146,'index':_0x5853bb,'indexKey':_0x4d04ab,'existingKey':_0x3969ba,'conflictingKey':_0x2c9f92}),this['name']='OKDBUniqueConstraintError';}}class _0x1029a7 extends _0xdf8de1{constructor(_0x2e3f4a,_0x23813c,_0x210275){const _0x5da772=_0x5511;super(_0x5da772(0x61e)+_0x2e3f4a+'@'+_0x23813c,_0x5da772(0x743),{'type':_0x2e3f4a,'key':_0x23813c,'errors':_0x210275}),this[_0x5da772(0x60a)]=_0x5da772(0x475),this[_0x5da772(0x737)]=_0x2e3f4a,this[_0x5da772(0x5af)]=_0x23813c,this[_0x5da772(0x5bc)]=_0x210275;}}class _0x41f32b extends _0xdf8de1{constructor(_0x5a28e8,_0x59e509){const _0x4346cb=_0x5511;super('Cannot\x20set\x20enforce\x20schema\x20on\x20'+_0x5a28e8+':\x20'+_0x59e509[_0x4346cb(0x1b1)]+_0x4346cb(0x695),'SCHEMA_COLLECTION_INVALID',{'type':_0x5a28e8,'failures':_0x59e509}),this['name']=_0x4346cb(0x77c),this[_0x4346cb(0x737)]=_0x5a28e8,this[_0x4346cb(0x725)]=_0x59e509;}}class _0x317178 extends _0xdf8de1{constructor(_0x541bdc,_0x18da1d,_0x2b942e,_0x21e044,_0x1a88ab){const _0x1d993b=_0x5511;super(_0x1d993b(0x5f2)+_0x541bdc+'@'+_0x18da1d+'.'+_0x2b942e+_0x1d993b(0x1c0)+_0x21e044+'@'+_0x1a88ab+_0x1d993b(0x3a5),_0x1d993b(0x276),{'sourceType':_0x541bdc,'sourceKey':_0x18da1d,'fieldPath':_0x2b942e,'targetType':_0x21e044,'targetKey':_0x1a88ab}),this[_0x1d993b(0x60a)]=_0x1d993b(0x3e4),this[_0x1d993b(0x242)]=_0x541bdc,this[_0x1d993b(0x712)]=_0x18da1d,this[_0x1d993b(0x5b1)]=_0x2b942e,this[_0x1d993b(0x27c)]=_0x21e044,this[_0x1d993b(0x416)]=_0x1a88ab;}}class _0x8c08e1 extends _0xdf8de1{constructor(_0x165b1d,_0xeb626,_0x25e228){const _0x3a0e16=_0x5511;super('Cannot\x20delete\x20'+_0x165b1d+'@'+_0xeb626+':\x20'+_0x25e228[_0x3a0e16(0x1b1)]+_0x3a0e16(0x664),'FOREIGN_KEY_DELETE_RESTRICTED',{'targetType':_0x165b1d,'targetKey':_0xeb626,'references':_0x25e228}),this[_0x3a0e16(0x60a)]=_0x3a0e16(0x1c7),this[_0x3a0e16(0x27c)]=_0x165b1d,this[_0x3a0e16(0x416)]=_0xeb626,this[_0x3a0e16(0x5fd)]=_0x25e228;}}class _0x39936c extends _0xdf8de1{constructor(_0x47a325,_0x11c2ad,_0x452fbe){const _0xb00c82=_0x5511;super(_0xb00c82(0x405)+_0x11c2ad+_0xb00c82(0x2d4)+_0x47a325+_0xb00c82(0x418)+_0x452fbe[_0xb00c82(0x2cc)](_0x268130=>_0x268130[_0xb00c82(0x3cb)]+':'+_0x268130[_0xb00c82(0x60a)])[_0xb00c82(0x2b6)](',\x20'),_0xb00c82(0x19e),{'type':_0x47a325,'index':_0x11c2ad,'usedBy':_0x452fbe}),this[_0xb00c82(0x60a)]=_0xb00c82(0x1f3);}}return okdbError={'OKDBError':_0xdf8de1,'OKDBVersionMismatchError':_0xd9af98,'OKDBNotFoundError':_0x1ba0f8,'OKDBAlreadyExistsError':_0x2dc2c6,'OKDBInvalidIndexKeyError':_0x5804bf,'OKDBInvalidPrimaryKeyError':_0x1c57c7,'OKDBTypeNotRegisteredError':_0x4bff00,'OKDBTypeAlreadyRegisteredError':_0x4b662c,'OKDBIndexNotRegisteredError':_0x392d10,'OKDBIndexAlreadyRegisteredError':_0x50dc1b,'OKDBInvalidValueError':_0x2f6443,'OKDBUniqueConstraintError':_0x4a7001,'OKDBSchemaValidationError':_0x1029a7,'OKDBSchemaCollectionError':_0x41f32b,'OKDBForeignKeyError':_0x317178,'OKDBForeignKeyDeleteError':_0x8c08e1,'OKDBIndexHasConsumersError':_0x39936c},okdbError;}var okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x2ca608=_0x5411c3;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x43075e={'PUT':'put','REMOVE':_0x2ca608(0x43f),'INDEX_DROP':_0x2ca608(0x531),'INDEX_REGISTER':_0x2ca608(0x2f8),'INDEX_RESET':_0x2ca608(0x1c3),'TYPE_REGISTER':_0x2ca608(0x300),'TYPE_DROP':_0x2ca608(0x388),'FTS_REGISTER':'registerFts','FTS_DROP':_0x2ca608(0x385),'FTS_RESET':'resetFts','SCHEMA_SET':_0x2ca608(0x607),'SCHEMA_DROP':_0x2ca608(0x1aa),'TTL_SET':_0x2ca608(0x2c7),'TTL_CLEAR':_0x2ca608(0x479)},_0x404b64={'SYSTEM_READY':_0x2ca608(0x51f),'FIELD_RESOLVER_REGISTERED':_0x2ca608(0x1c2),'SYSTEM_STOPPED':_0x2ca608(0x66b),'SYSTEM_CLOCK_CHANGE':'system:clock_change','SYSTEM_POKE':_0x2ca608(0x4bc),'SYSTEM_DRAIN':'system:drain','SYSTEM_TYPE_DROP':_0x2ca608(0x79a),'SYSTEM_PROC':'system:proc','SYSTEM_BUS_STATE_CHANGE':_0x2ca608(0x406),'ITEM_CREATE':_0x2ca608(0x3dd),'ITEM_UPDATE':_0x2ca608(0x239),'ITEM_REMOVE':'item:remove','INDEX_RESET':_0x2ca608(0x567),'INDEX_READY':_0x2ca608(0x1c4),'INDEX_PROGRESS':'index:progress','VIEW_PROGRESS':_0x2ca608(0x5cb),'INDEX_DROP':_0x2ca608(0x68b),'INDEX_REGISTERED':_0x2ca608(0x62d),'FTS_REGISTERED':'fts:registered','FTS_DROP':_0x2ca608(0x411),'FTS_RESET':_0x2ca608(0x5fa),'SCHEMA_SET':_0x2ca608(0x62c),'SCHEMA_DROP':_0x2ca608(0x59e),'UNIQUE_VIOLATION':_0x2ca608(0x69a),'UNIQUE_VIOLATION_RESOLVED':'unique:violation_resolved','REF_VIOLATION':_0x2ca608(0x3b7),'REF_VIOLATION_RESOLVED':'ref:violation_resolved','SYNC_APPLY':_0x2ca608(0x2a2),'TXN_START':'txn:start','TXN_END':_0x2ca608(0x7a9),'TXN_ROLLBACK':_0x2ca608(0x1c6),'TYPE_REGISTERED':_0x2ca608(0x61f),'TYPE_DROP':_0x2ca608(0x39c),'ENV_OPENED':'env:opened','ENV_REMOVED':_0x2ca608(0x21c),'SYSTEM_ENV_RELEASE':_0x2ca608(0x67e),'TTL_EXPIRED':_0x2ca608(0x473),'TTL_SET':'ttl:set','TTL_CLEAR':_0x2ca608(0x542),'LICENSE_INVALID':_0x2ca608(0x6b9),'LICENSE_ADDED':_0x2ca608(0x211),'LICENSE_ACTIVATED':'license:activated','LICENSE_REMOVED':'license:removed'},_0x56b7a0={'CREATING':'creating','RESETTING':'resetting','READY':'ready','DROPPING':'dropping','WAITING':_0x2ca608(0x30e),'ERROR':'error'},_0x43d5d1={'CREATED':_0x2ca608(0x1fe),'STARTING':_0x2ca608(0x7ab),'STARTED':_0x2ca608(0x3e9),'STOPPING':_0x2ca608(0x275),'STOPPED':_0x2ca608(0x447)},_0x4d7632={'CREATING':_0x2ca608(0x349),'READY':_0x2ca608(0x512),'HALTED':'halted','STOPPED':_0x2ca608(0x447),'RESETTING':_0x2ca608(0x29d)},_0x56746c=Object['freeze']({'POKE':'bus:poke','DRAIN':_0x2ca608(0x5ae),'TYPE_DROP':'bus:type_drop','PROC':_0x2ca608(0x739),'ENV_RELEASE':_0x2ca608(0x2e3)});return okdbEnums={'BUS_EVENTS':_0x56746c,'CHANGE_ACTIONS':_0x43075e,'EVENTS':_0x404b64,'INDEX_STATE':_0x56b7a0,'OKDB_STATE':_0x43d5d1,'VIEW_STATE':_0x4d7632},okdbEnums;}var okdbPubkey,hasRequiredOkdbPubkey;function requireOkdbPubkey(){const _0x987863=_0x5411c3;if(hasRequiredOkdbPubkey)return okdbPubkey;hasRequiredOkdbPubkey=0x1;const _0x1e7277=require$$1$1,_0xf4462a=require$$1,_0x161feb=require$$2,_0x1f98b1=_0x1e7277[_0x987863(0x6ba)](_0xf4462a[_0x987863(0x2b6)](__dirname,_0x987863(0x306)),_0x987863(0x1f4))['trim'](),_0x30c079=_0x161feb['createPublicKey'](_0x1f98b1)[_0x987863(0x62f)]({'type':_0x987863(0x464),'format':_0x987863(0x609)}),_0x4efc4c=_0x161feb[_0x987863(0x78f)](_0x987863(0x755))[_0x987863(0x751)](_0x30c079)[_0x987863(0x2ab)]('hex')[_0x987863(0x7a7)](0x0,0x10);return okdbPubkey={'PUBLIC_KEY_PEM':_0x1f98b1,'PUB_FINGERPRINT':_0x4efc4c},okdbPubkey;}var okdbLicense,hasRequiredOkdbLicense;function requireOkdbLicense(){const _0x54229d=_0x5411c3;if(hasRequiredOkdbLicense)return okdbLicense;hasRequiredOkdbLicense=0x1;const _0xe2ea94=require$$2,{OKDBError:_0x425b58}=requireOkdbError(),{EVENTS:_0x48935e}=requireOkdbEnums(),_0x379c49=requireOkdbLicenseCodec(),{LICENSE_TYPE_OPEN:_0x3ce500,LICENSE_TYPE_INTERNAL:_0x50d4a7,OPEN_LICENSE_MAX_DURATION_MS:_0x52c716}=_0x379c49,_0x4d1987=requireOkdbPubkey(),_0x527d5d={'LICENSED_BUILD':_0x54229d(0x434),'PUBLIC_KEY_PEM':_0x4d1987[_0x54229d(0x3b9)],'PUB_FINGERPRINT':_0x4d1987[_0x54229d(0x4a0)],'LICENSE_EXPIRED_ACTION':'log'},_0x385f4e=_0x54229d(0x259),_0xcfa781={'features':{'sync':![],'embeddings':!![],'engines':![],'fts':!![],'timeMachine':![],'views':!![],'mcp':!![],'files':!![]},'limits':{'envs':0x5,'typesPerEnv':0xa,'syncPeers':0x0,'maxWrites':0xf4240,'pipelinesPerEnv':0x2},'_isFree':!![]};async function _0x2af888(_0xe1fbf){const _0x17a4c8=_0x54229d;await _0xe1fbf[_0x17a4c8(0x443)](_0x385f4e);}class _0x5bc160{constructor(_0xc725d0){const _0x988d64=_0x54229d;this['okdb']=_0xc725d0,this[_0x988d64(0x778)]=null;}async[_0x54229d(0x5bb)](){const _0x5b4ef7=_0x54229d,_0x21d4c9=this[_0x5b4ef7(0x3ea)][_0x5b4ef7(0x6cd)];if(!_0x21d4c9||!_0x21d4c9[_0x5b4ef7(0x6b6)](_0x385f4e)){this['_active']=null;return;}const _0x268f73=this['okdb']['id'];let _0x2b4a82=null;for(const {key:_0x2afa1f,value:_0x421ff1}of _0x21d4c9['getRange'](_0x385f4e)){const _0x51c470=this[_0x5b4ef7(0x6ea)](_0x421ff1,_0x268f73);_0x51c470==='active'&&!_0x2b4a82&&(_0x2b4a82={..._0x421ff1,'id':_0x2afa1f,'status':_0x51c470});}this['_active']=_0x2b4a82;if(this[_0x5b4ef7(0x778)]&&this[_0x5b4ef7(0x778)][_0x5b4ef7(0x297)]===_0x3ce500){const _0x5104d2=Math['ceil']((this[_0x5b4ef7(0x778)][_0x5b4ef7(0x337)]-Date[_0x5b4ef7(0x6a7)]())/0x5265c00);this[_0x5b4ef7(0x3ea)][_0x5b4ef7(0x547)]?.['warn'](_0x5b4ef7(0x2ee)+_0x5104d2+_0x5b4ef7(0x35f),{'feature':'license','licensee':this[_0x5b4ef7(0x778)]['licensee'],'expiresAt':new Date(this[_0x5b4ef7(0x778)][_0x5b4ef7(0x337)])[_0x5b4ef7(0x219)]()});}this[_0x5b4ef7(0x778)]&&this['_active'][_0x5b4ef7(0x297)]===_0x50d4a7&&this['okdb'][_0x5b4ef7(0x547)]?.[_0x5b4ef7(0x305)](_0x5b4ef7(0x497),{'feature':'license','licensee':this['_active'][_0x5b4ef7(0x5a8)]});}[_0x54229d(0x6ea)](_0x33d874,_0x4ff997){const _0x17f725=_0x54229d;if(!_0x33d874[_0x17f725(0x5e2)])return _0x17f725(0x536);let _0x44b484;try{_0x44b484=_0x379c49[_0x17f725(0x792)](_0x33d874[_0x17f725(0x5e2)]);}catch(_0x53946a){return _0x17f725(0x536);}try{const _0x39c6c2=_0xe2ea94[_0x17f725(0x66e)](null,_0x44b484['payload'],_0x527d5d[_0x17f725(0x3b9)],_0x44b484[_0x17f725(0x272)]);if(!_0x39c6c2)return _0x17f725(0x536);}catch(_0xe5594a){return _0x17f725(0x536);}if(_0x44b484[_0x17f725(0x68c)][_0x17f725(0x297)]===_0x50d4a7)return'active';if(_0x44b484[_0x17f725(0x68c)][_0x17f725(0x337)]<=Date[_0x17f725(0x6a7)]())return _0x17f725(0x2c6);if(_0x44b484[_0x17f725(0x68c)][_0x17f725(0x297)]===_0x3ce500)return _0x17f725(0x30f);if(!_0x33d874[_0x17f725(0x50b)])return _0x17f725(0x3fe);const _0x7cdf9f=_0x379c49[_0x17f725(0x18a)]({'tokenString':_0x33d874[_0x17f725(0x50b)],'nodeId':_0x4ff997,'rawBlobBuf':_0x44b484['rawBuf'],'pubKeyPem':_0x527d5d[_0x17f725(0x3b9)],'pubFingerprint':_0x527d5d[_0x17f725(0x4a0)]});if(_0x7cdf9f['reason']==='LICENSE_HASH_MISMATCH'||_0x7cdf9f[_0x17f725(0x781)]==='SIG_INVALID')return _0x17f725(0x688);if(_0x7cdf9f[_0x17f725(0x781)]===_0x17f725(0x389))return _0x17f725(0x2c6);if(!_0x7cdf9f[_0x17f725(0x207)])return _0x17f725(0x688);return _0x17f725(0x30f);}get[_0x54229d(0x30f)](){const _0x3bec0f=_0x54229d;return this[_0x3bec0f(0x778)];}get[_0x54229d(0x74b)](){const _0x3f9580=_0x54229d;return this[_0x3f9580(0x778)]??_0xcfa781;}[_0x54229d(0x74d)](_0x3c73de){const _0x1edea3=_0x54229d;if(_0x527d5d[_0x1edea3(0x420)]!=='true')return;const _0x55a063=this[_0x1edea3(0x74b)];if(!_0x55a063[_0x1edea3(0x429)]?.[_0x3c73de]){const _0x49ef8c=_0x55a063[_0x1edea3(0x2ba)]?_0x1edea3(0x485)+_0x3c73de+'.\x20Add\x20a\x20license\x20that\x20includes\x20\x22'+_0x3c73de+_0x1edea3(0x616):_0x1edea3(0x461)+_0x3c73de+'.\x20The\x20active\x20license\x20does\x20not\x20enable\x20\x22'+_0x3c73de+'\x22.';throw new _0x425b58(_0x49ef8c,'LICENSE_FEATURE_DISABLED',{'feature':_0x3c73de});}}[_0x54229d(0x5f8)](_0x3582e8){const _0x6a00f9=_0x54229d;if(_0x527d5d[_0x6a00f9(0x420)]!==_0x6a00f9(0x434))return!![];return!!this[_0x6a00f9(0x74b)][_0x6a00f9(0x429)]?.[_0x3582e8];}[_0x54229d(0x6f1)](_0x4e155d){const _0x270c82=_0x54229d;if(_0x527d5d[_0x270c82(0x420)]!==_0x270c82(0x434))return![];const _0x2421b2=this[_0x270c82(0x74b)][_0x270c82(0x36a)]?.[_0x4e155d];return!(_0x2421b2===null||_0x2421b2===undefined||_0x2421b2===0x0);}[_0x54229d(0x5cf)](_0x4ced94,_0x307953){const _0x2a0bf9=_0x54229d;if(_0x527d5d['LICENSED_BUILD']!==_0x2a0bf9(0x434))return;const _0x213847=this[_0x2a0bf9(0x74b)],_0x288153=_0x213847['limits']?.[_0x4ced94];if(_0x288153===null||_0x288153===undefined||_0x288153===0x0)return;if(_0x307953>=_0x288153)throw new _0x425b58('License\x20limit\x20exceeded:\x20'+_0x4ced94+'\x20('+_0x307953+'/'+_0x288153+')','LICENSE_LIMIT_EXCEEDED',{'limit':_0x4ced94,'current':_0x307953,'max':_0x288153});}async['addLicense'](_0x2e3b57){const _0x15808b=_0x54229d;let _0x2861de;try{_0x2861de=_0x379c49[_0x15808b(0x792)](_0x2e3b57);}catch(_0x8b9317){throw new _0x425b58('Invalid\x20license\x20blob:\x20'+_0x8b9317[_0x15808b(0x246)],_0x15808b(0x745));}let _0x63303c;try{_0x63303c=_0xe2ea94[_0x15808b(0x66e)](null,_0x2861de[_0x15808b(0x4fe)],_0x527d5d['PUBLIC_KEY_PEM'],_0x2861de[_0x15808b(0x272)]);}catch(_0x5587c6){throw new _0x425b58(_0x15808b(0x4c1)+_0x5587c6[_0x15808b(0x246)],'LICENSE_INVALID');}if(!_0x63303c)throw new _0x425b58(_0x15808b(0x453)+(_0x15808b(0x342)+_0x527d5d[_0x15808b(0x4a0)]+'.\x20')+'Either\x20the\x20build\x20was\x20made\x20with\x20a\x20different\x20keypair,\x20or\x20the\x20license\x20was\x20issued\x20with\x20a\x20different\x20private\x20key.',_0x15808b(0x745),{'expectedFingerprint':_0x527d5d[_0x15808b(0x4a0)]});if(_0x2861de[_0x15808b(0x68c)][_0x15808b(0x297)]===_0x3ce500){const _0xe4d7bc=_0x2861de[_0x15808b(0x68c)][_0x15808b(0x337)]-_0x2861de['decoded']['issuedAt'];if(_0xe4d7bc>_0x52c716)throw new _0x425b58(_0x15808b(0x58f)+Math['ceil'](_0xe4d7bc/(0x1e*0x5265c00))+_0x15808b(0x2da),_0x15808b(0x745));}const _0x51c5dc=this[_0x15808b(0x3ea)][_0x15808b(0x6cd)];await _0x2af888(_0x51c5dc);const _0x2767e2=_0x379c49[_0x15808b(0x4bd)](_0x2861de['rawBuf'])['toString'](_0x15808b(0x723));for(const {key:_0x5c9425,value:_0x2f831f}of _0x51c5dc[_0x15808b(0x433)](_0x385f4e)){if(_0x2f831f[_0x15808b(0x545)]===_0x2767e2)throw new _0x425b58(_0x15808b(0x4e6),_0x15808b(0x6c5),{'id':_0x5c9425});}const _0x4e2194=_0xe2ea94[_0x15808b(0x78f)](_0x15808b(0x755))['update']('okdb-license-id:')[_0x15808b(0x751)](_0x2861de['rawBuf'])['digest']('hex'),_0x5e5589=_0x4e2194[_0x15808b(0x7a7)](0x0,0x8)+'-'+_0x4e2194[_0x15808b(0x7a7)](0x8,0xc)+'-5'+_0x4e2194['slice'](0xd,0x10)+'-'+(parseInt(_0x4e2194[0x10],0x10)&0x3|0x8)['toString'](0x10)+_0x4e2194[_0x15808b(0x7a7)](0x11,0x14)+'-'+_0x4e2194[_0x15808b(0x7a7)](0x14,0x20),_0x43b8af={'blob':_0x2e3b57,'activation':null,'addedAt':Date[_0x15808b(0x6a7)](),'_licenseHash':_0x2767e2,'licensee':_0x2861de[_0x15808b(0x68c)]['licensee'],'expiresAt':_0x2861de[_0x15808b(0x68c)]['expiresAt'],'features':_0x2861de['decoded'][_0x15808b(0x429)],'limits':_0x2861de[_0x15808b(0x68c)][_0x15808b(0x36a)],'licenseType':_0x2861de['decoded'][_0x15808b(0x297)]};return await _0x51c5dc['put'](_0x385f4e,_0x5e5589,_0x43b8af),{'id':_0x5e5589,..._0x43b8af};}async['activateLicense'](_0x1a35ba){const _0x49dc04=_0x54229d;let _0x401b55;try{_0x401b55=_0x379c49[_0x49dc04(0x735)](_0x1a35ba);}catch(_0x3a3d52){throw new _0x425b58('Invalid\x20activation\x20token:\x20'+_0x3a3d52[_0x49dc04(0x246)],_0x49dc04(0x727));}const _0x29bf4c=_0x401b55[_0x49dc04(0x4bd)][_0x49dc04(0x202)](_0x49dc04(0x723)),_0x113e23=this[_0x49dc04(0x3ea)][_0x49dc04(0x6cd)];if(!_0x113e23||!_0x113e23[_0x49dc04(0x6b6)](_0x385f4e))throw new _0x425b58('No\x20license\x20found\x20matching\x20this\x20activation\x20token',_0x49dc04(0x727));let _0x50a2a9=null,_0x54190d=null;for(const {key:_0x2532b4,value:_0x6d5c69}of _0x113e23[_0x49dc04(0x433)](_0x385f4e)){if(_0x6d5c69['_licenseHash']===_0x29bf4c){_0x50a2a9=_0x2532b4,_0x54190d=_0x6d5c69;break;}}if(!_0x50a2a9)throw new _0x425b58(_0x49dc04(0x6a1),_0x49dc04(0x727));const {rawBuf:_0xd3a342}=_0x379c49[_0x49dc04(0x792)](_0x54190d[_0x49dc04(0x5e2)]),_0x373f17=_0x379c49[_0x49dc04(0x18a)]({'tokenString':_0x1a35ba,'nodeId':this[_0x49dc04(0x3ea)]['id'],'rawBlobBuf':_0xd3a342,'pubKeyPem':_0x527d5d[_0x49dc04(0x3b9)],'pubFingerprint':_0x527d5d['PUB_FINGERPRINT']});if(!_0x373f17[_0x49dc04(0x207)])throw new _0x425b58(_0x49dc04(0x19b)+_0x373f17[_0x49dc04(0x781)],_0x49dc04(0x727),{'reason':_0x373f17['reason']});const _0x4dcffd={..._0x54190d,'activation':_0x1a35ba};return await _0x113e23[_0x49dc04(0x751)](_0x385f4e,_0x50a2a9,_0x4dcffd),{'id':_0x50a2a9,..._0x4dcffd};}async[_0x54229d(0x5a1)](_0x2ec136){const _0x1363cd=_0x54229d,_0x3f92b7=this['okdb'][_0x1363cd(0x6cd)];if(!_0x3f92b7||!_0x3f92b7[_0x1363cd(0x6b6)](_0x385f4e))return;await _0x3f92b7[_0x1363cd(0x43f)](_0x385f4e,_0x2ec136);}async[_0x54229d(0x6c3)](){const _0x76c4a0=_0x54229d,_0x450812=this[_0x76c4a0(0x3ea)][_0x76c4a0(0x6cd)];if(!_0x450812||!_0x450812['hasType'](_0x385f4e))return[];const _0xcba127=this[_0x76c4a0(0x3ea)]['id'],_0x441f73=[];for(const {key:_0x3136ca,value:_0x21e3ef}of _0x450812[_0x76c4a0(0x433)](_0x385f4e)){const _0x365d03=this['_computeStatus'](_0x21e3ef,_0xcba127);_0x441f73['push']({..._0x21e3ef,'id':_0x3136ca,'status':_0x365d03});}return _0x441f73;}[_0x54229d(0x19f)](){const _0x1b8ca6=_0x54229d,_0x59cadb=this['okdb'][_0x1b8ca6(0x6cd)];if(!_0x59cadb||!_0x59cadb['hasType'](_0x385f4e))return[];const _0xa2cbcc=this[_0x1b8ca6(0x3ea)]['id'],_0x41f618=[];for(const {key:_0x27e125,value:_0x23a6e5}of _0x59cadb[_0x1b8ca6(0x433)](_0x385f4e)){if(_0x23a6e5[_0x1b8ca6(0x545)]){if(_0x23a6e5[_0x1b8ca6(0x297)]===_0x3ce500)_0x41f618['push']({'licenseId':_0x27e125,'pin':null});else{const _0x13c429=Buffer[_0x1b8ca6(0x716)](_0x23a6e5[_0x1b8ca6(0x545)],_0x1b8ca6(0x723)),{pin:_0xa794af}=_0x379c49[_0x1b8ca6(0x6c4)](_0xa2cbcc,_0x13c429,_0x527d5d[_0x1b8ca6(0x4a0)]);_0x41f618['push']({'licenseId':_0x27e125,'pin':_0xa794af});}}}return _0x41f618;}async[_0x54229d(0x746)](){const _0x179b25=_0x54229d,_0x326ff5=this[_0x179b25(0x778)];await this['reload']();if(this[_0x179b25(0x778)]&&this['_active'][_0x179b25(0x297)]===_0x3ce500){const _0x6874ee=Math[_0x179b25(0x392)]((this['_active'][_0x179b25(0x337)]-Date[_0x179b25(0x6a7)]())/0x5265c00);this[_0x179b25(0x3ea)][_0x179b25(0x547)]?.['warn'](_0x179b25(0x2ee)+_0x6874ee+_0x179b25(0x35f),{'feature':_0x179b25(0x707),'licensee':this[_0x179b25(0x778)][_0x179b25(0x5a8)],'expiresAt':new Date(this[_0x179b25(0x778)][_0x179b25(0x337)])[_0x179b25(0x219)]()});}this['_active']&&this['_active'][_0x179b25(0x297)]===_0x50d4a7&&this['okdb']['log']?.['warn'](_0x179b25(0x497),{'feature':_0x179b25(0x707),'licensee':this['_active']['licensee']});if(_0x326ff5&&!this[_0x179b25(0x778)]){this[_0x179b25(0x3ea)][_0x179b25(0x547)]?.[_0x179b25(0x305)]('License\x20expired\x20or\x20invalidated',{'feature':_0x179b25(0x707)}),this[_0x179b25(0x3ea)][_0x179b25(0x2b0)]?.[_0x179b25(0x652)](_0x48935e[_0x179b25(0x745)],{'previous':_0x326ff5});const _0x24e8e0=this[_0x179b25(0x3ea)][_0x179b25(0x76b)]?.[_0x179b25(0x65f)]??_0x527d5d[_0x179b25(0x66d)];_0x24e8e0===_0x179b25(0x4a4)&&(this[_0x179b25(0x3ea)][_0x179b25(0x547)]?.[_0x179b25(0x3ba)](_0x179b25(0x54c),{'feature':_0x179b25(0x707)}),this[_0x179b25(0x3ea)][_0x179b25(0x5e4)]()['catch'](()=>{})['finally'](()=>process[_0x179b25(0x592)](0x1)));}}}return okdbLicense={'LicenseChecker':_0x5bc160,'_C':_0x527d5d,'FREE_TIER':_0xcfa781},okdbLicense;}var okdbShell,hasRequiredOkdbShell;function requireOkdbShell(){const _0x270959=_0x5411c3;if(hasRequiredOkdbShell)return okdbShell;hasRequiredOkdbShell=0x1;const _0x16ad62=require$$0$2,_0x1c9c99=require$$1$1,_0x4e56da=require$$0,_0x1a676f=require$$1,_0x1f5b2f=_0x1a676f[_0x270959(0x2b6)](_0x4e56da[_0x270959(0x1d9)](),_0x270959(0x78a)),_0xabdfa6=0x3e8,_0x17f52b={'reset':_0x270959(0x5ec),'bold':_0x270959(0x267),'dim':_0x270959(0x51c),'red':_0x270959(0x1b9),'green':_0x270959(0x78d),'yellow':'\x1b[33m','blue':_0x270959(0x4aa),'magenta':_0x270959(0x419),'cyan':_0x270959(0x398),'white':_0x270959(0x6b7),'gray':_0x270959(0x588)},_0x4d66a=!process[_0x270959(0x5c6)][_0x270959(0x338)]||!!process.env.NO_COLOR,_0x4e3371=(_0x2393a0,_0x558651)=>_0x4d66a?_0x558651:''+_0x2393a0+_0x558651+_0x17f52b['reset'],_0x2537b9={'error':_0x17f52b[_0x270959(0x67b)],'warn':_0x17f52b[_0x270959(0x19d)],'info':_0x17f52b[_0x270959(0x462)],'debug':_0x17f52b['gray']},_0x4824f9={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3};function _0x449a03(_0x321b1f,_0x3920bc=_0x270959(0x380)){const _0x479fdf=_0x270959,{level:_0x22d916,msg:_0x120f21,meta:_0x495a06,context:_0x4e8cbf,ts:_0x5da3b2}=_0x321b1f;if((_0x4824f9[_0x22d916]??0x1)<(_0x4824f9[_0x3920bc]??0x1))return;const _0x191916=_0x4e3371(_0x17f52b[_0x479fdf(0x266)],new Date(_0x5da3b2)['toISOString']()),_0x24f103=_0x4e3371(_0x2537b9[_0x22d916]??_0x17f52b[_0x479fdf(0x5f3)],_0x22d916[_0x479fdf(0x48a)](0x5));let _0x4c375f='\x20\x20'+_0x191916+'\x20'+_0x4e3371(_0x17f52b[_0x479fdf(0x732)],_0x24f103)+'\x20'+_0x120f21;if(_0x495a06&&Object[_0x479fdf(0x35c)](_0x495a06)[_0x479fdf(0x1b1)]>0x0){const _0x4f8479=Object['entries'](_0x495a06)['map'](([_0x1602e0,_0x24553e])=>_0x1602e0+'='+_0x24553e)[_0x479fdf(0x2b6)]('\x20');_0x4c375f+=_0x4e3371(_0x17f52b['dim'],_0x479fdf(0x39a)+_0x4f8479+']');}if(_0x4e8cbf!==undefined){const _0x1ffd7f=typeof _0x4e8cbf===_0x479fdf(0x336)?JSON[_0x479fdf(0x540)](_0x4e8cbf):String(_0x4e8cbf);_0x4c375f+=_0x4e3371(_0x17f52b['dim'],'\x20\x20'+_0x1ffd7f);}const _0x342486=_0x22d916===_0x479fdf(0x3ba)||_0x22d916===_0x479fdf(0x305)?process[_0x479fdf(0x391)][_0x479fdf(0x4f7)]['bind'](process[_0x479fdf(0x391)]):process[_0x479fdf(0x5c6)][_0x479fdf(0x4f7)][_0x479fdf(0x5e1)](process[_0x479fdf(0x5c6)]);_0x342486(_0x4c375f+'\x0a');}function _0x3a7bf0(_0x39249a,_0x4ebf92){const _0x4c4c30=_0x270959;if(_0x39249a===0xcc||_0x39249a>=0xc8&&_0x39249a<0x12c&&!_0x4ebf92){console[_0x4c4c30(0x547)](_0x4c4c30(0x7ad)+_0x4e3371(_0x17f52b[_0x4c4c30(0x3df)],'✓')+'\x0a');return;}if(_0x39249a>=0x190||_0x4ebf92?.[_0x4c4c30(0x3ba)]){const _0x129b61=_0x4ebf92?.[_0x4c4c30(0x3ba)]??_0x4ebf92?.[_0x4c4c30(0x246)]??_0x4c4c30(0x697)+_0x39249a;console['log'](_0x4c4c30(0x7ad)+_0x4e3371(_0x17f52b[_0x4c4c30(0x67b)],'✗')+'\x20'+_0x4e3371(_0x17f52b[_0x4c4c30(0x732)]+_0x17f52b[_0x4c4c30(0x67b)],String(_0x39249a))+'\x20\x20'+_0x129b61+'\x0a');return;}const _0x3ac431=Object[_0x4c4c30(0x6f7)][_0x4c4c30(0x60b)][_0x4c4c30(0x65a)](_0x4ebf92??{},_0x4c4c30(0x59d))?_0x4ebf92['result']:_0x4ebf92,_0x192492=_0x4ebf92?.[_0x4c4c30(0x2e5)];console[_0x4c4c30(0x547)](''),_0x3113f5(_0x3ac431,'\x20\x20');if(_0x192492?.[_0x4c4c30(0x1df)]!=null||_0x192492?.[_0x4c4c30(0x395)]!=null){const _0x491c14=[];if(_0x192492[_0x4c4c30(0x1df)]!=null)_0x491c14['push'](_0x192492[_0x4c4c30(0x1df)]+_0x4c4c30(0x205)+(_0x192492['count']!==0x1?'s':''));if(_0x192492['time']!=null)_0x491c14[_0x4c4c30(0x494)](_0x192492['time']+'ms');console[_0x4c4c30(0x547)](_0x4c4c30(0x7ad)+_0x4e3371(_0x17f52b[_0x4c4c30(0x60c)],_0x491c14[_0x4c4c30(0x2b6)](_0x4c4c30(0x563))));}console[_0x4c4c30(0x547)]('');}function _0x3113f5(_0x1efede,_0x3720b9=''){const _0x94719e=_0x270959;if(_0x1efede===null||_0x1efede===undefined){console[_0x94719e(0x547)](_0x3720b9+_0x4e3371(_0x17f52b[_0x94719e(0x60c)],_0x94719e(0x6fe)));return;}if(Array[_0x94719e(0x729)](_0x1efede)){if(_0x1efede[_0x94719e(0x1b1)]===0x0){console[_0x94719e(0x547)](_0x3720b9+_0x4e3371(_0x17f52b[_0x94719e(0x60c)],_0x94719e(0x788)));return;}if(_0x1efede[_0x94719e(0x595)](_0x1a5f7c=>_0x1a5f7c&&typeof _0x1a5f7c===_0x94719e(0x336)&&_0x94719e(0x5af)in _0x1a5f7c&&'value'in _0x1a5f7c)){_0xbd102(_0x1efede,_0x3720b9);return;}if(_0x1efede['every'](_0x200905=>_0x200905&&typeof _0x200905==='object'&&_0x94719e(0x737)in _0x200905&&_0x94719e(0x1df)in _0x200905)){_0x584af3(_0x1efede,_0x3720b9);return;}if(_0x1efede[_0x94719e(0x595)](_0x60f473=>typeof _0x60f473!==_0x94719e(0x336)||_0x60f473===null)){_0x1efede[_0x94719e(0x4ff)]((_0x11f905,_0x4ea802)=>console['log'](_0x3720b9+_0x4e3371(_0x17f52b[_0x94719e(0x266)],_0x4ea802+0x1+'.')+'\x20'+_0x4e3371(_0x17f52b['white'],String(_0x11f905))));return;}_0x1efede[_0x94719e(0x4ff)]((_0x362e2c,_0x15b7cf)=>{const _0xccba77=_0x94719e;console['log'](_0x3720b9+_0x4e3371(_0x17f52b['dim'],'['+_0x15b7cf+']'));if(typeof _0x362e2c===_0xccba77(0x336)&&_0x362e2c!==null)_0x5198f1(_0x362e2c,_0x3720b9+'\x20\x20');else console['log'](_0x3720b9+'\x20\x20'+String(_0x362e2c));});return;}if(typeof _0x1efede===_0x94719e(0x336)){if(_0x94719e(0x5af)in _0x1efede&&_0x94719e(0x643)in _0x1efede&&Object['keys'](_0x1efede)[_0x94719e(0x1b1)]<=0x3){console[_0x94719e(0x547)](_0x3720b9+_0x4e3371(_0x17f52b[_0x94719e(0x732)]+_0x17f52b[_0x94719e(0x462)],String(_0x1efede[_0x94719e(0x5af)])));const _0x491bca=_0x1efede[_0x94719e(0x643)];if(_0x491bca&&typeof _0x491bca===_0x94719e(0x336))_0x5198f1(_0x491bca,_0x3720b9);else console['log'](_0x3720b9+_0x4e3371(_0x17f52b['white'],String(_0x491bca)));return;}_0x5198f1(_0x1efede,_0x3720b9);return;}console[_0x94719e(0x547)](_0x3720b9+_0x4e3371(_0x17f52b[_0x94719e(0x5f3)],String(_0x1efede)));}function _0x5198f1(_0x9db974,_0x54eda2=''){const _0x4cee93=_0x270959,_0x380537=Object[_0x4cee93(0x352)](_0x9db974);if(_0x380537['length']===0x0){console['log'](_0x54eda2+_0x4e3371(_0x17f52b[_0x4cee93(0x60c)],'{}'));return;}const _0x4b6675=Math['min'](0x1c,Math[_0x4cee93(0x46c)](..._0x380537['map'](([_0x5ef0b2])=>_0x5ef0b2[_0x4cee93(0x1b1)])));for(const [_0xf75bf0,_0x12cdaa]of _0x380537){const _0x38548c=_0x4e3371(_0x17f52b[_0x4cee93(0x462)],_0xf75bf0[_0x4cee93(0x48a)](_0x4b6675));if(_0x12cdaa===null||_0x12cdaa===undefined)console[_0x4cee93(0x547)](_0x54eda2+_0x38548c+'\x20\x20'+_0x4e3371(_0x17f52b[_0x4cee93(0x60c)],_0x4cee93(0x50a)));else{if(typeof _0x12cdaa===_0x4cee93(0x336)){const _0x3fc80d=JSON[_0x4cee93(0x540)](_0x12cdaa);_0x3fc80d[_0x4cee93(0x1b1)]<=0x50?console[_0x4cee93(0x547)](_0x54eda2+_0x38548c+'\x20\x20'+_0x4e3371(_0x17f52b[_0x4cee93(0x60c)],_0x3fc80d)):(console[_0x4cee93(0x547)](_0x54eda2+_0x38548c),_0x3113f5(_0x12cdaa,_0x54eda2+'\x20\x20'));}else{const _0x3a79e6=typeof _0x12cdaa===_0x4cee93(0x312)?_0x4e3371(_0x12cdaa?_0x17f52b[_0x4cee93(0x3df)]:_0x17f52b['yellow'],String(_0x12cdaa)):typeof _0x12cdaa===_0x4cee93(0x758)?_0x4e3371(_0x17f52b['magenta'],String(_0x12cdaa)):_0x4e3371(_0x17f52b[_0x4cee93(0x5f3)],String(_0x12cdaa));console[_0x4cee93(0x547)](_0x54eda2+_0x38548c+'\x20\x20'+_0x3a79e6);}}}}function _0xbd102(_0x2247ba,_0x6d6a99=''){const _0x17c81d=_0x270959,_0x516587=Math['min'](0x20,Math['max'](..._0x2247ba[_0x17c81d(0x2cc)](_0x33dd10=>String(_0x33dd10[_0x17c81d(0x5af)])['length'])));for(const {key:_0x2ebccf,value:_0x309f4d,score:_0x27deef,clock:_0x53d78f}of _0x2247ba){const _0x397062=_0x4e3371(_0x17f52b[_0x17c81d(0x732)]+_0x17f52b[_0x17c81d(0x462)],String(_0x2ebccf)[_0x17c81d(0x48a)](_0x516587)),_0x4e791d=_0x309f4d==null?_0x4e3371(_0x17f52b[_0x17c81d(0x60c)],_0x17c81d(0x50a)):typeof _0x309f4d===_0x17c81d(0x336)?_0x4e3371(_0x17f52b[_0x17c81d(0x60c)],JSON['stringify'](_0x309f4d)):_0x4e3371(_0x17f52b[_0x17c81d(0x5f3)],String(_0x309f4d)),_0x323af0=_0x27deef!=null?_0x4e3371(_0x17f52b[_0x17c81d(0x266)],'\x20\x20score:'+_0x27deef[_0x17c81d(0x26b)](0x4)):'',_0x504cad=_0x53d78f!=null?_0x4e3371(_0x17f52b[_0x17c81d(0x266)],'\x20\x20@'+_0x53d78f):'';console[_0x17c81d(0x547)](_0x6d6a99+_0x397062+'\x20\x20'+_0x4e791d+_0x323af0+_0x504cad);}}function _0x584af3(_0x4e5119,_0x1c90a5=''){const _0x59c82f=_0x270959,_0x403903=Math[_0x59c82f(0x4a8)](0x20,Math['max'](..._0x4e5119[_0x59c82f(0x2cc)](_0x507505=>_0x507505[_0x59c82f(0x737)][_0x59c82f(0x1b1)])));for(const {type:_0xf632cc,count:_0x31ccd6,fields:_0x5666d3}of _0x4e5119){if(_0xf632cc['startsWith']('~'))continue;const _0x590e2c=_0x4e3371(_0x17f52b['bold']+_0x17f52b[_0x59c82f(0x462)],_0xf632cc[_0x59c82f(0x48a)](_0x403903)),_0x3ee374=_0x4e3371(_0x17f52b[_0x59c82f(0x22a)],String(_0x31ccd6)['padStart'](0x6))+_0x4e3371(_0x17f52b[_0x59c82f(0x60c)],_0x59c82f(0x4d7)),_0x4aca38=_0x5666d3&&Object[_0x59c82f(0x35c)](_0x5666d3)[_0x59c82f(0x1b1)]?_0x4e3371(_0x17f52b['dim'],_0x59c82f(0x642)+Object[_0x59c82f(0x35c)](_0x5666d3)['slice'](0x0,0x6)[_0x59c82f(0x2b6)](',\x20')+(Object[_0x59c82f(0x35c)](_0x5666d3)[_0x59c82f(0x1b1)]>0x6?'…':'')):'';console[_0x59c82f(0x547)](_0x1c90a5+_0x590e2c+'\x20\x20'+_0x3ee374+_0x4aca38);}}const _0x4a62f2=['types','type/','queue/',_0x270959(0x56d),_0x270959(0x480),_0x270959(0x2fe)];function _0x20051a(_0x396b40,_0x3d0ffb){const _0x17c002=_0x270959;if(_0x396b40[_0x17c002(0x72d)](_0x17c002(0x41e)))return _0x396b40;if(_0x396b40[_0x17c002(0x72d)]('/'))return _0x17c002(0x6e5)+_0x396b40;if(_0x396b40[_0x17c002(0x72d)]('env/'))return _0x17c002(0x41e)+_0x396b40;const _0x256cd9=_0x4a62f2[_0x17c002(0x7a8)](_0x3582fd=>_0x396b40===_0x3582fd[_0x17c002(0x1f7)](/\/$/,'')||_0x396b40['startsWith'](_0x3582fd));return _0x256cd9?_0x17c002(0x185)+_0x3d0ffb+'/'+_0x396b40:_0x17c002(0x41e)+_0x396b40;}function _0x45829d(_0x4bbb30){const _0x102bd2=_0x270959,_0x106b59={},_0x1e5baa=[];let _0x12c107=0x0;while(_0x12c107<_0x4bbb30[_0x102bd2(0x1b1)]){if((_0x4bbb30[_0x12c107]===_0x102bd2(0x657)||_0x4bbb30[_0x12c107]==='-e')&&_0x4bbb30[_0x12c107+0x1]&&!_0x4bbb30[_0x12c107+0x1][_0x102bd2(0x72d)]('-'))_0x106b59['env']=_0x4bbb30[++_0x12c107];else _0x4bbb30[_0x12c107]==='--help'||_0x4bbb30[_0x12c107]==='-h'?_0x106b59['help']=!![]:_0x1e5baa[_0x102bd2(0x494)](_0x4bbb30[_0x12c107]);_0x12c107++;}return{'flags':_0x106b59,'rest':_0x1e5baa};}const _0xa78d3a={'system':_0x270959(0x371),'envs':_0x270959(0x6ad),'types':'Types','data':'Records','indexes':_0x270959(0x35b),'fts':'Full-text\x20search','sync':'Sync','queue':_0x270959(0x4c3),'files':_0x270959(0x20c),'embeddings':_0x270959(0x566),'engines':_0x270959(0x675),'admin':_0x270959(0x460),'event':'Events','processor':_0x270959(0x34d)},_0x4aeee1=[_0x270959(0x256),_0x270959(0x71b),_0x270959(0x2bd),_0x270959(0x268),_0x270959(0x39e),_0x270959(0x37a),_0x270959(0x45e),_0x270959(0x2c9),_0x270959(0x261),_0x270959(0x64c),'engines','admin'];function _0x14615c(_0x2cc1ef){const _0x4a6537=_0x270959;return _0x2cc1ef[_0x4a6537(0x1f7)](/^\/api/,'')['replace'](/^\[\/env\/:env=[^\]]*\]/,_0x4a6537(0x3ff))['replace'](/^\/env\/:env/,_0x4a6537(0x61b))[_0x4a6537(0x1f7)](/^\//,'');}function _0x5b0abc(_0xabaf83,_0x303d04=''){const _0x33969a=_0x270959,_0x5ca3e6=_0xabaf83['http']['listRoutes']()[_0x33969a(0x3fb)](_0xf10ed8=>!_0xf10ed8[_0x33969a(0x2e5)]?.[_0x33969a(0x24f)]),_0x399431=_0x303d04?_0x5ca3e6[_0x33969a(0x3fb)](_0x3daaf4=>_0x3daaf4[_0x33969a(0x504)][_0x33969a(0x2be)]()[_0x33969a(0x70f)](_0x303d04[_0x33969a(0x2be)]())||(_0x3d7911(_0x3daaf4)??'')[_0x33969a(0x2be)]()[_0x33969a(0x70f)](_0x303d04[_0x33969a(0x2be)]())||_0x84b1d6(_0x3daaf4)[_0x33969a(0x7a8)](_0x1f1c01=>_0x1f1c01[_0x33969a(0x2be)]()[_0x33969a(0x70f)](_0x303d04[_0x33969a(0x2be)]()))):_0x5ca3e6;if(!_0x399431[_0x33969a(0x1b1)]){console['log'](_0x4e3371(_0x17f52b[_0x33969a(0x19d)],_0x33969a(0x321)+_0x303d04+'\x22\x0a'));return;}const _0x24b0c4=new Map();for(const _0x5c80c5 of _0x399431){const _0xcc0112=_0x84b1d6(_0x5c80c5)[0x0]??'other';if(!_0x24b0c4[_0x33969a(0x4e7)](_0xcc0112))_0x24b0c4[_0x33969a(0x238)](_0xcc0112,[]);_0x24b0c4[_0x33969a(0x5e0)](_0xcc0112)[_0x33969a(0x494)](_0x5c80c5);}const _0x4db983=[..._0x4aeee1[_0x33969a(0x3fb)](_0x3ef8bb=>_0x24b0c4['has'](_0x3ef8bb)),...[..._0x24b0c4[_0x33969a(0x35c)]()][_0x33969a(0x3fb)](_0x5a1e04=>!_0x4aeee1[_0x33969a(0x70f)](_0x5a1e04))];console[_0x33969a(0x547)]('');for(const _0x58fa21 of _0x4db983){const _0x637e23=_0x24b0c4[_0x33969a(0x5e0)](_0x58fa21);if(!_0x637e23?.[_0x33969a(0x1b1)])continue;console[_0x33969a(0x547)](_0x4e3371(_0x17f52b[_0x33969a(0x732)],'\x20\x20'+(_0xa78d3a[_0x58fa21]??_0x58fa21)));for(const _0x355452 of _0x637e23){const _0x2c1895=_0x4e3371(_0x17f52b[_0x33969a(0x22a)],_0x355452[_0x33969a(0x399)][_0x33969a(0x48a)](0x7)),_0x5ad8a9=_0x4e3371(_0x17f52b[_0x33969a(0x462)],_0x14615c(_0x355452[_0x33969a(0x504)])),_0x33acfa=_0x3d7911(_0x355452)?_0x4e3371(_0x17f52b[_0x33969a(0x60c)],'\x20\x20'+_0x3d7911(_0x355452)):'',_0x3772d4=_0x355452['operation']?.['id']?_0x4e3371(_0x17f52b[_0x33969a(0x266)],_0x33969a(0x39a)+_0x355452[_0x33969a(0x43b)]['id']+']'):'';console[_0x33969a(0x547)](_0x33969a(0x1d1)+_0x2c1895+'\x20'+_0x5ad8a9+_0x33acfa+_0x3772d4);}console[_0x33969a(0x547)]('');}}function _0x27259f(_0x4e3118,_0x51048f){const _0x1560b3=_0x270959,_0x21f0f2=_0x51048f[_0x1560b3(0x1f7)](/^\/api(\/env\/[^/]+)?\//,'')[_0x1560b3(0x5ed)]('/')[0x0],_0x452340=_0x4e3118[_0x1560b3(0x277)][_0x1560b3(0x33c)]()[_0x1560b3(0x3fb)](_0x7fc5ff=>_0x7fc5ff['path'][_0x1560b3(0x2be)]()[_0x1560b3(0x70f)](_0x21f0f2[_0x1560b3(0x2be)]()));if(!_0x452340['length']){console['log'](_0x4e3371(_0x17f52b[_0x1560b3(0x19d)],_0x1560b3(0x54a)+_0x51048f+'\x0a'));return;}console[_0x1560b3(0x547)]('');for(const _0x42b291 of _0x452340[_0x1560b3(0x7a7)](0x0,0xc)){for(const _0x4a9d00 of _0x598304(_0x42b291)){console['log'](_0x4a9d00);}console['log']('');}}function _0x3d7911(_0xaa2e11){const _0x907696=_0x270959;return _0xaa2e11['operation']?.[_0x907696(0x22e)]??_0xaa2e11[_0x907696(0x2e5)]?.[_0x907696(0x22e)]??'';}function _0x137e77(_0x550cc7){const _0x4726bb=_0x270959;return _0x550cc7[_0x4726bb(0x43b)]?.[_0x4726bb(0x4b0)]??_0x550cc7[_0x4726bb(0x2e5)]?.['description']??'';}function _0x84b1d6(_0x842e31){const _0xe9c596=_0x270959;return _0x842e31[_0xe9c596(0x43b)]?.[_0xe9c596(0x27b)]?.[_0xe9c596(0x1b1)]?_0x842e31[_0xe9c596(0x43b)][_0xe9c596(0x27b)]:_0x842e31[_0xe9c596(0x2e5)]?.[_0xe9c596(0x27b)]??[];}function _0x598304(_0xe40b11){const _0x5ce8f9=_0x270959,_0x16a2b7=[];_0x16a2b7['push']('\x20\x20'+_0x4e3371(_0x17f52b[_0x5ce8f9(0x732)]+_0x17f52b[_0x5ce8f9(0x22a)],_0xe40b11['method'][_0x5ce8f9(0x48a)](0x7))+'\x20'+_0x4e3371(_0x17f52b[_0x5ce8f9(0x732)]+_0x17f52b[_0x5ce8f9(0x462)],_0xe40b11[_0x5ce8f9(0x504)]));_0xe40b11[_0x5ce8f9(0x43b)]?.['id']&&_0x16a2b7[_0x5ce8f9(0x494)](_0x5ce8f9(0x3a3)+_0x4e3371(_0x17f52b[_0x5ce8f9(0x266)],_0x5ce8f9(0x759)+_0xe40b11[_0x5ce8f9(0x43b)]['id']));_0x3d7911(_0xe40b11)&&_0x16a2b7[_0x5ce8f9(0x494)](_0x5ce8f9(0x3a3)+_0x4e3371(_0x17f52b[_0x5ce8f9(0x5f3)],_0x3d7911(_0xe40b11)));_0x137e77(_0xe40b11)&&_0x16a2b7['push'](_0x5ce8f9(0x3a3)+_0x4e3371(_0x17f52b[_0x5ce8f9(0x60c)],_0x137e77(_0xe40b11)));_0x84b1d6(_0xe40b11)[_0x5ce8f9(0x1b1)]&&_0x16a2b7[_0x5ce8f9(0x494)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x4e3371(_0x17f52b['gray'],'tags:\x20'+_0x84b1d6(_0xe40b11)[_0x5ce8f9(0x2b6)](',\x20')));_0xe40b11[_0x5ce8f9(0x43b)]?.[_0x5ce8f9(0x6b8)]?.[_0x5ce8f9(0x557)]&&_0x16a2b7[_0x5ce8f9(0x494)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x4e3371(_0x17f52b['gray'],'access:\x20'+_0xe40b11[_0x5ce8f9(0x43b)][_0x5ce8f9(0x6b8)][_0x5ce8f9(0x557)]));_0xe40b11[_0x5ce8f9(0x43b)]?.[_0x5ce8f9(0x277)]?.[_0x5ce8f9(0x4b4)]&&_0xe40b11[_0x5ce8f9(0x43b)][_0x5ce8f9(0x277)][_0x5ce8f9(0x4b4)]!==_0x5ce8f9(0x1f0)&&_0x16a2b7[_0x5ce8f9(0x494)](_0x5ce8f9(0x3a3)+_0x4e3371(_0x17f52b[_0x5ce8f9(0x266)],'transport:\x20'+_0xe40b11['operation'][_0x5ce8f9(0x277)]['transport']));if(_0xe40b11[_0x5ce8f9(0x43b)]?.[_0x5ce8f9(0x57a)]){const _0x4778d4=Object[_0x5ce8f9(0x35c)](_0xe40b11['operation'][_0x5ce8f9(0x57a)]['properties']||{});if(_0x4778d4[_0x5ce8f9(0x1b1)])_0x16a2b7[_0x5ce8f9(0x494)](_0x5ce8f9(0x3a3)+_0x4e3371(_0x17f52b[_0x5ce8f9(0x266)],'input:\x20'+_0x4778d4['join'](',\x20')));}return _0xe40b11['meta']?.[_0x5ce8f9(0x6bd)]&&_0x16a2b7[_0x5ce8f9(0x494)](_0x5ce8f9(0x3a3)+_0x4e3371(_0x17f52b[_0x5ce8f9(0x266)],_0x5ce8f9(0x1b3)+JSON[_0x5ce8f9(0x540)](_0xe40b11[_0x5ce8f9(0x2e5)][_0x5ce8f9(0x6bd)]))),_0x16a2b7;}async function _0x37bd43(_0x1d92d9,_0x53eec0,_0x1cfbfb,_0x2e2bce=null){const _0x473f9a=_0x270959,_0x51d585=_0x1cfbfb[_0x473f9a(0x2db)]('?'),_0x237c12=_0x51d585>=0x0?_0x1cfbfb[_0x473f9a(0x7a7)](0x0,_0x51d585):_0x1cfbfb,_0x4d26e6=_0x51d585>=0x0?_0x1cfbfb['slice'](_0x51d585+0x1):'',_0x276928=Object[_0x473f9a(0x26f)](new URLSearchParams(_0x4d26e6)[_0x473f9a(0x352)]());return _0x1d92d9['http'][_0x473f9a(0x27f)](_0x53eec0,_0x237c12,{'body':_0x2e2bce,'query':_0x276928,'headers':{'content-type':_0x473f9a(0x541)}},{'internal':!![]});}function _0x319d99(_0x90b9b1){const _0x46273f=_0x270959;if(!_0x90b9b1)return null;const _0x8f0a3a=_0x90b9b1['trim']();if(!_0x8f0a3a)return null;try{return JSON['parse'](_0x8f0a3a);}catch{}try{return JSON[_0x46273f(0x355)](_0x6d6112(_0x8f0a3a));}catch(_0x2da5b0){throw new SyntaxError(_0x2da5b0[_0x46273f(0x246)],{'cause':_0x2da5b0});}}function _0x6d6112(_0x50540f){const _0x2129ad=_0x270959;let _0x5b666a='',_0xf069f0=0x0;while(_0xf069f0<_0x50540f[_0x2129ad(0x1b1)]){const _0x4b3fdd=_0x50540f[_0xf069f0];if(_0x4b3fdd==='\x22'){_0x5b666a+='\x22',_0xf069f0++;while(_0xf069f0<_0x50540f[_0x2129ad(0x1b1)]&&_0x50540f[_0xf069f0]!=='\x22'){if(_0x50540f[_0xf069f0]==='\x5c'){_0x5b666a+=_0x50540f[_0xf069f0++];if(_0xf069f0<_0x50540f[_0x2129ad(0x1b1)])_0x5b666a+=_0x50540f[_0xf069f0++];}else _0x5b666a+=_0x50540f[_0xf069f0++];}_0x5b666a+='\x22';if(_0xf069f0<_0x50540f[_0x2129ad(0x1b1)])_0xf069f0++;continue;}if(_0x4b3fdd==='\x27'){_0x5b666a+='\x22',_0xf069f0++;while(_0xf069f0<_0x50540f['length']&&_0x50540f[_0xf069f0]!=='\x27'){if(_0x50540f[_0xf069f0]==='\x5c'&&_0x50540f[_0xf069f0+0x1]==='\x27')_0x5b666a+='\x27',_0xf069f0+=0x2;else _0x50540f[_0xf069f0]==='\x22'?(_0x5b666a+='\x5c\x22',_0xf069f0++):_0x5b666a+=_0x50540f[_0xf069f0++];}_0x5b666a+='\x22';if(_0xf069f0<_0x50540f[_0x2129ad(0x1b1)])_0xf069f0++;continue;}if(_0x2129ad(0x600)[_0x2129ad(0x70f)](_0x4b3fdd)){_0x5b666a+=_0x4b3fdd,_0xf069f0++;continue;}let _0x3162bd='';while(_0xf069f0<_0x50540f[_0x2129ad(0x1b1)]&&!_0x2129ad(0x247)['includes'](_0x50540f[_0xf069f0])&&_0x50540f[_0xf069f0]!=='\x20'&&_0x50540f[_0xf069f0]!=='\x09'&&_0x50540f[_0xf069f0]!=='\x0a'&&_0x50540f[_0xf069f0]!=='\x0d'){_0x3162bd+=_0x50540f[_0xf069f0++];}let _0x35f750=_0xf069f0;while(_0x35f750<_0x50540f[_0x2129ad(0x1b1)]&&(_0x50540f[_0x35f750]==='\x20'||_0x50540f[_0x35f750]==='\x09'))_0x35f750++;if(_0x50540f[_0x35f750]===':')_0x5b666a+='\x22'+_0x3162bd+'\x22';else _0x3162bd===_0x2129ad(0x434)||_0x3162bd==='false'||_0x3162bd===_0x2129ad(0x50a)||/^-?\d+(\.\d+)?([eE][+-]?\d+)?$/[_0x2129ad(0x279)](_0x3162bd)?_0x5b666a+=_0x3162bd:_0x5b666a+='\x22'+_0x3162bd+'\x22';}return _0x5b666a[_0x2129ad(0x1f7)](/,(\s*[}\]])/g,'$1');}function _0xcec720(_0x47a154){const _0x40ab3e=_0x270959,_0x165fd3=[];let _0x4a9905=0x0;while(_0x4a9905<_0x47a154[_0x40ab3e(0x1b1)]){while(_0x4a9905<_0x47a154[_0x40ab3e(0x1b1)]&&(_0x47a154[_0x4a9905]==='\x20'||_0x47a154[_0x4a9905]==='\x09'))_0x4a9905++;if(_0x4a9905>=_0x47a154[_0x40ab3e(0x1b1)])break;const _0x522ab4=_0x47a154[_0x4a9905];if(_0x522ab4==='{'||_0x522ab4==='['){const _0x15fe03=_0x522ab4==='{'?'}':']',_0x56cc9d=_0x4a9905++;let _0xd37921=0x1,_0x3c5819=![],_0x490e50='';while(_0x4a9905<_0x47a154['length']&&_0xd37921>0x0){const _0x5e3166=_0x47a154[_0x4a9905];if(_0x3c5819){if(_0x5e3166==='\x5c')_0x4a9905++;else{if(_0x5e3166===_0x490e50)_0x3c5819=![];}}else{if(_0x5e3166==='\x22'||_0x5e3166==='\x27')_0x3c5819=!![],_0x490e50=_0x5e3166;else{if(_0x5e3166===_0x522ab4)_0xd37921++;else{if(_0x5e3166===_0x15fe03)_0xd37921--;}}}_0x4a9905++;}_0x165fd3[_0x40ab3e(0x494)](_0x47a154[_0x40ab3e(0x7a7)](_0x56cc9d,_0x4a9905));continue;}if(_0x522ab4==='\x22'||_0x522ab4==='\x27'){const _0x48e02e=_0x522ab4;_0x4a9905++;let _0x3f2aef='';while(_0x4a9905<_0x47a154[_0x40ab3e(0x1b1)]&&_0x47a154[_0x4a9905]!==_0x48e02e){if(_0x47a154[_0x4a9905]==='\x5c'&&_0x4a9905+0x1<_0x47a154['length'])_0x4a9905++,_0x3f2aef+=_0x47a154[_0x4a9905++];else _0x3f2aef+=_0x47a154[_0x4a9905++];}if(_0x4a9905<_0x47a154[_0x40ab3e(0x1b1)])_0x4a9905++;_0x165fd3['push'](_0x3f2aef);continue;}let _0x3ebdf2='';while(_0x4a9905<_0x47a154[_0x40ab3e(0x1b1)]&&_0x47a154[_0x4a9905]!=='\x20'&&_0x47a154[_0x4a9905]!=='\x09'&&_0x47a154[_0x4a9905]!=='{'&&_0x47a154[_0x4a9905]!=='['){_0x3ebdf2+=_0x47a154[_0x4a9905++];}if(_0x3ebdf2)_0x165fd3['push'](_0x3ebdf2);}return _0x165fd3;}function _0x4b9b48(_0x1c9844,_0x2e857f){const _0x1c1bbc=_0x270959,_0x1be30e=[..._0x1c9844['_envs']['keys']()]['filter'](_0x123892=>!_0x123892[_0x1c1bbc(0x72d)]('~'));console[_0x1c1bbc(0x547)](['',_0x4e3371(_0x17f52b['bold']+_0x17f52b['cyan'],_0x1c1bbc(0x2b4)),_0x4e3371(_0x17f52b[_0x1c1bbc(0x732)]+_0x17f52b[_0x1c1bbc(0x462)],_0x1c1bbc(0x188))+_0x4e3371(_0x17f52b[_0x1c1bbc(0x732)],_0x1c1bbc(0x50e))+_0x4e3371(_0x17f52b[_0x1c1bbc(0x732)]+_0x17f52b[_0x1c1bbc(0x462)],'║'),_0x4e3371(_0x17f52b[_0x1c1bbc(0x732)]+_0x17f52b[_0x1c1bbc(0x462)],_0x1c1bbc(0x265)),'','\x20\x20'+_0x4e3371(_0x17f52b[_0x1c1bbc(0x3df)],'✓')+'\x20'+_0x4e3371(_0x17f52b[_0x1c1bbc(0x732)],'server')+'\x20\x20http://localhost:'+_0x2e857f['port'],..._0x2e857f[_0x1c1bbc(0x619)]>0x1?['\x20\x20'+_0x4e3371(_0x17f52b[_0x1c1bbc(0x3df)],'✓')+'\x20'+_0x4e3371(_0x17f52b[_0x1c1bbc(0x732)],_0x1c1bbc(0x543))+'\x20'+_0x2e857f[_0x1c1bbc(0x619)]+_0x1c1bbc(0x334)+_0x4e3371(_0x17f52b[_0x1c1bbc(0x266)],'(primary\x20=\x20processor)')]:[],'\x20\x20'+_0x4e3371(_0x17f52b[_0x1c1bbc(0x3df)],'✓')+'\x20'+_0x4e3371(_0x17f52b[_0x1c1bbc(0x732)],'api')+_0x1c1bbc(0x291)+_0x2e857f[_0x1c1bbc(0x3a7)]+'/api','\x20\x20'+_0x4e3371(_0x17f52b[_0x1c1bbc(0x3df)],'✓')+'\x20'+_0x4e3371(_0x17f52b[_0x1c1bbc(0x732)],_0x1c1bbc(0x504))+_0x1c1bbc(0x1d1)+_0x2e857f[_0x1c1bbc(0x3d8)],'\x20\x20'+_0x4e3371(_0x17f52b[_0x1c1bbc(0x3df)],'✓')+'\x20'+_0x4e3371(_0x17f52b[_0x1c1bbc(0x732)],'id')+_0x1c1bbc(0x564)+_0x4e3371(_0x17f52b[_0x1c1bbc(0x266)],_0x1c9844['id']),'\x20\x20'+_0x4e3371(_0x17f52b[_0x1c1bbc(0x3df)],'✓')+'\x20'+_0x4e3371(_0x17f52b[_0x1c1bbc(0x732)],_0x1c1bbc(0x71b))+_0x1c1bbc(0x1d1)+_0x1be30e[_0x1c1bbc(0x2cc)](_0x212abf=>_0x4e3371(_0x17f52b[_0x1c1bbc(0x462)],_0x212abf))[_0x1c1bbc(0x2b6)]('\x20\x20'),..._0x2e857f['noAdmin']?[]:['\x20\x20'+_0x4e3371(_0x17f52b[_0x1c1bbc(0x3df)],'✓')+'\x20'+_0x4e3371(_0x17f52b[_0x1c1bbc(0x732)],_0x1c1bbc(0x731))+_0x1c1bbc(0x5c9)+_0x2e857f['port']+_0x1c1bbc(0x4b6)],'',_0x4e3371(_0x17f52b[_0x1c1bbc(0x60c)],'\x20\x20Type\x20'+_0x4e3371(_0x17f52b[_0x1c1bbc(0x732)],_0x1c1bbc(0x1ce))+_0x1c1bbc(0x1a5)+_0x4e3371(_0x17f52b[_0x1c1bbc(0x732)],_0x1c1bbc(0x3af))+'\x20to\x20browse\x20the\x20API,\x20'+_0x4e3371(_0x17f52b[_0x1c1bbc(0x732)],_0x1c1bbc(0x592))+'\x20to\x20quit.'),''][_0x1c1bbc(0x2b6)]('\x0a'));}function _0x1f59e0(_0x3daf8a){const _0x27acdf=_0x270959;console[_0x27acdf(0x547)]('\x0a'+_0x4e3371(_0x17f52b[_0x27acdf(0x732)],_0x27acdf(0x5fb))+'\x20\x20'+_0x4e3371(_0x17f52b['dim'],_0x27acdf(0x2a0))+_0x27acdf(0x2e2)+_0x4e3371(_0x17f52b[_0x27acdf(0x462)],_0x27acdf(0x551))+_0x27acdf(0x4b9)+_0x4e3371(_0x17f52b[_0x27acdf(0x462)],_0x27acdf(0x551))+'\x20'+_0x4e3371(_0x17f52b[_0x27acdf(0x19d)],_0x27acdf(0x301))+_0x27acdf(0x3a0)+_0x4e3371(_0x17f52b['cyan'],'VERB')+'\x20'+_0x4e3371(_0x17f52b['cyan'],_0x27acdf(0x551))+'\x20'+_0x4e3371(_0x17f52b[_0x27acdf(0x19d)],_0x27acdf(0x34e))+_0x27acdf(0x208)+_0x4e3371(_0x17f52b[_0x27acdf(0x60c)],'Examples')+'\x0a\x20\x20\x20\x20'+_0x4e3371(_0x17f52b[_0x27acdf(0x266)],_0x27acdf(0x380))+_0x27acdf(0x195)+_0x4e3371(_0x17f52b[_0x27acdf(0x266)],'envs')+_0x27acdf(0x31a)+_0x4e3371(_0x17f52b[_0x27acdf(0x266)],_0x27acdf(0x2bd))+_0x27acdf(0x28c)+_0x3daf8a[_0x27acdf(0x1a1)]+_0x27acdf(0x7ae)+_0x4e3371(_0x17f52b[_0x27acdf(0x266)],'type/users')+_0x27acdf(0x5f6)+_0x3daf8a['env']+_0x27acdf(0x458)+_0x4e3371(_0x17f52b[_0x27acdf(0x266)],_0x27acdf(0x627))+_0x27acdf(0x42c)+_0x3daf8a[_0x27acdf(0x1a1)]+_0x27acdf(0x704)+_0x4e3371(_0x17f52b[_0x27acdf(0x266)],_0x27acdf(0x1b4))+_0x27acdf(0x46d)+_0x3daf8a[_0x27acdf(0x1a1)]+_0x27acdf(0x76f)+_0x4e3371(_0x17f52b[_0x27acdf(0x266)],_0x27acdf(0x401))+_0x27acdf(0x5a4)+_0x4e3371(_0x17f52b[_0x27acdf(0x266)],_0x27acdf(0x77b))+_0x27acdf(0x5a4)+_0x4e3371(_0x17f52b[_0x27acdf(0x266)],_0x27acdf(0x796))+_0x27acdf(0x34f)+_0x4e3371(_0x17f52b['bold'],_0x27acdf(0x320))+'\x20\x20'+_0x4e3371(_0x17f52b[_0x27acdf(0x60c)],_0x27acdf(0x2b2))+_0x27acdf(0x2e2)+_0x4e3371(_0x17f52b[_0x27acdf(0x462)],_0x27acdf(0x679))+_0x27acdf(0x718)+_0x4e3371(_0x17f52b[_0x27acdf(0x462)],_0x27acdf(0x43c))+_0x27acdf(0x230)+_0x4e3371(_0x17f52b[_0x27acdf(0x60c)],_0x27acdf(0x52e))+_0x27acdf(0x5a4)+_0x4e3371(_0x17f52b[_0x27acdf(0x266)],_0x27acdf(0x3e8))+_0x27acdf(0x5a4)+_0x4e3371(_0x17f52b[_0x27acdf(0x266)],'type/users/item/alice\x20--env\x20staging')+_0x27acdf(0x5a4)+_0x4e3371(_0x17f52b['gray'],_0x27acdf(0x290))+'\x0a\x0a'+_0x4e3371(_0x17f52b[_0x27acdf(0x732)],_0x27acdf(0x32b))+_0x27acdf(0x2e2)+_0x4e3371(_0x17f52b[_0x27acdf(0x462)],_0x27acdf(0x369))+_0x27acdf(0x771)+_0x4e3371(_0x17f52b[_0x27acdf(0x462)],_0x27acdf(0x1a1))+_0x27acdf(0x4f3)+_0x4e3371(_0x17f52b[_0x27acdf(0x462)],_0x27acdf(0x3af))+'\x20'+_0x4e3371(_0x17f52b[_0x27acdf(0x60c)],_0x27acdf(0x760))+'\x20\x20\x20\x20\x20\x20\x20\x20\x20browse\x20API\x20routes,\x20grouped\x20by\x20area\x0a\x20\x20'+_0x4e3371(_0x17f52b['cyan'],_0x27acdf(0x7a6))+'\x20'+_0x4e3371(_0x17f52b['dim'],_0x27acdf(0x47f))+_0x27acdf(0x70b)+_0x4e3371(_0x17f52b['cyan'],_0x27acdf(0x6ef))+'\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'+_0x4e3371(_0x17f52b[_0x27acdf(0x462)],_0x27acdf(0x1ce))+_0x27acdf(0x754)+_0x4e3371(_0x17f52b[_0x27acdf(0x462)],_0x27acdf(0x592))+'\x20'+_0x4e3371(_0x17f52b['dim'],_0x27acdf(0x311))+'\x20\x20\x20\x20graceful\x20shutdown\x0a');}let _0x42f182=![];async function _0x223e2f(_0xa9ee25,_0x40c946=0x0,_0x4ace98=null){const _0xeee120=_0x270959;_0x42f182&&(process[_0xeee120(0x391)][_0xeee120(0x4f7)](_0x4e3371(_0x17f52b['red'],_0xeee120(0x54d))),process['exit'](0x82));_0x42f182=!![],process[_0xeee120(0x5c6)][_0xeee120(0x4f7)]('\x0a'),process['stderr']['write'](_0x4e3371(_0x17f52b[_0xeee120(0x19d)],_0xeee120(0x28f)+(_0x4ace98?_0xeee120(0x1a8)+_0x4ace98+',\x20':'')+_0xeee120(0x666)));const _0x20cd9b=setTimeout(()=>{const _0x599da0=_0xeee120;process[_0x599da0(0x391)]['write'](_0x4e3371(_0x17f52b[_0x599da0(0x67b)],_0x599da0(0x32d))),process['exit'](0x1);},0x1388);try{await _0xa9ee25[_0xeee120(0x5e4)]();}catch(_0xc5dc8b){console[_0xeee120(0x3ba)](_0x4e3371(_0x17f52b[_0xeee120(0x67b)],'\x20\x20'+_0xc5dc8b[_0xeee120(0x246)]));}clearTimeout(_0x20cd9b),process[_0xeee120(0x391)]['write'](_0x4e3371(_0x17f52b[_0xeee120(0x60c)],_0xeee120(0x3fd))),process[_0xeee120(0x592)](_0x40c946);}function _0x11c628(_0x360d97){const _0x388922=_0x270959,_0x3d061b=_0x360d97[_0x388922(0x1a1)]!==_0x388922(0x45b)?_0x4e3371(_0x17f52b[_0x388922(0x19d)],'['+_0x360d97[_0x388922(0x1a1)]+']'):'';return _0x4e3371(_0x17f52b['bold']+_0x17f52b[_0x388922(0x462)],'okdb')+_0x3d061b+_0x4e3371(_0x17f52b[_0x388922(0x266)],'>\x20');}const _0x49ed40=new Set(['GET',_0x270959(0x1cd),_0x270959(0x1ba),_0x270959(0x6d4),_0x270959(0x6e9)]);async function _0x1fe650(_0x22cfc2,_0x4b4d1c,_0x3ffef2,_0x52780c,_0x510a22,_0x223d25){const _0x462b09=_0x270959;_0x22cfc2=_0x22cfc2[_0x462b09(0x29c)]();if(!_0x22cfc2||_0x22cfc2[_0x462b09(0x72d)]('#'))return;const _0x4faa54=_0xcec720(_0x22cfc2),{flags:_0xb10630,rest:_0x2ead0d}=_0x45829d(_0x4faa54);if(!_0x2ead0d['length'])return;const _0x46a336=_0x2ead0d[0x0],_0x25baf1=_0x46a336['toUpperCase']();if(_0x25baf1===_0x462b09(0x448)){if(_0x2ead0d[0x1])_0x27259f(_0x4b4d1c,_0x20051a(_0x2ead0d[0x1],_0xb10630[_0x462b09(0x1a1)]??_0x510a22[_0x462b09(0x1a1)]));else _0x1f59e0(_0x510a22);return;}if(_0x25baf1===_0x462b09(0x23e)){const _0x37abbb=_0x2ead0d[0x1];if(!_0x37abbb){console[_0x462b09(0x547)](_0x4e3371(_0x17f52b['red'],_0x462b09(0x6cf)));return;}try{_0x4b4d1c['env'](_0x37abbb),_0x510a22['env']=_0x37abbb,_0x223d25?.['setPrompt'](_0x11c628(_0x510a22)),console[_0x462b09(0x547)](_0x462b09(0x7ad)+_0x4e3371(_0x17f52b[_0x462b09(0x3df)],'✓')+'\x20active\x20env:\x20'+_0x4e3371(_0x17f52b['bold']+_0x17f52b[_0x462b09(0x462)],_0x37abbb)+'\x0a');}catch{console[_0x462b09(0x547)](_0x462b09(0x7ad)+_0x4e3371(_0x17f52b[_0x462b09(0x67b)],'✗')+_0x462b09(0x698)+_0x4e3371(_0x17f52b['bold'],_0x37abbb)+_0x462b09(0x333)+_0x4e3371(_0x17f52b['dim'],'\x20—\x20type\x20env\x20to\x20list\x20available\x0a'));}return;}if(_0x25baf1===_0x462b09(0x18d)){const _0x3817bc=[..._0x4b4d1c[_0x462b09(0x221)][_0x462b09(0x35c)]()]['filter'](_0x2025d8=>!_0x2025d8[_0x462b09(0x72d)]('~'));console['log']('');for(const _0x279cc5 of _0x3817bc){const _0x5cafff=_0x279cc5===_0x510a22['env'];console[_0x462b09(0x547)]('\x20\x20'+(_0x5cafff?_0x4e3371(_0x17f52b[_0x462b09(0x3df)],'●'):_0x4e3371(_0x17f52b[_0x462b09(0x60c)],'○'))+'\x20\x20'+(_0x5cafff?_0x4e3371(_0x17f52b[_0x462b09(0x732)]+_0x17f52b[_0x462b09(0x462)],_0x279cc5):_0x4e3371(_0x17f52b[_0x462b09(0x60c)],_0x279cc5)));}console[_0x462b09(0x547)](_0x462b09(0x7ad)+_0x4e3371(_0x17f52b['dim'],_0x462b09(0x55b))+'\x20'+_0x4e3371(_0x17f52b[_0x462b09(0x462)],_0x510a22['env'])),console[_0x462b09(0x547)]('');return;}if(_0x25baf1===_0x462b09(0x3c2)){const _0x47e08f=[..._0x4b4d1c[_0x462b09(0x221)][_0x462b09(0x637)]()][_0x462b09(0x3fb)](_0x4d364f=>!_0x4d364f['name']['startsWith']('~'));console[_0x462b09(0x547)]('');const _0x479f5c=Math[_0x462b09(0x46c)](..._0x47e08f['map'](_0x1ac397=>_0x1ac397[_0x462b09(0x60a)]['length']));for(const _0x5367ef of _0x47e08f){const _0x4629ec=_0x5367ef[_0x462b09(0x60a)]===_0x510a22['env'],_0xda35f0=_0x4629ec?_0x4e3371(_0x17f52b['green'],'●'):_0x4e3371(_0x17f52b[_0x462b09(0x60c)],'○'),_0xdc7684=_0x4629ec?_0x4e3371(_0x17f52b['bold']+_0x17f52b[_0x462b09(0x462)],_0x5367ef[_0x462b09(0x60a)]['padEnd'](_0x479f5c)):_0x4e3371(_0x17f52b['dim'],_0x5367ef[_0x462b09(0x60a)][_0x462b09(0x48a)](_0x479f5c)),_0x103266=[..._0x5367ef[_0x462b09(0x799)][_0x462b09(0x35c)]()][_0x462b09(0x3fb)](_0x4208a3=>!_0x4208a3['startsWith']('~')),_0x2e3046=_0x103266['length']?_0x4e3371(_0x17f52b[_0x462b09(0x60c)],_0x103266[_0x462b09(0x7a7)](0x0,0x5)[_0x462b09(0x2b6)](',\x20')+(_0x103266['length']>0x5?_0x462b09(0x58d)+(_0x103266[_0x462b09(0x1b1)]-0x5)+_0x462b09(0x5c2):'')):_0x4e3371(_0x17f52b[_0x462b09(0x60c)],_0x462b09(0x3d5));console[_0x462b09(0x547)]('\x20\x20'+_0xda35f0+'\x20\x20'+_0xdc7684+'\x20\x20'+_0x2e3046);}console[_0x462b09(0x547)]('');return;}if(_0x25baf1==='TYPES'){const _0x398a09=_0xb10630[_0x462b09(0x1a1)]??_0x2ead0d[0x1]??_0x510a22[_0x462b09(0x1a1)];try{const _0x3e809d=_0x4b4d1c[_0x462b09(0x1a1)](_0x398a09),_0x286b15=[..._0x3e809d[_0x462b09(0x799)][_0x462b09(0x35c)]()][_0x462b09(0x3fb)](_0x37d4dc=>!_0x37d4dc['startsWith']('~'))[_0x462b09(0x4ba)]();console[_0x462b09(0x547)](_0x462b09(0x7ad)+_0x4e3371(_0x17f52b[_0x462b09(0x60c)],_0x286b15[_0x462b09(0x1b1)]+_0x462b09(0x5ba)+(_0x286b15[_0x462b09(0x1b1)]!==0x1?'s':'')+'\x20in\x20'+_0x398a09));for(const _0x3393db of _0x286b15){const _0x251374=_0x3e809d[_0x462b09(0x799)][_0x462b09(0x5e0)](_0x3393db),_0xa59ffe=_0x251374?.['data']?.[_0x462b09(0x359)]?.()??0x0,_0x26f869=_0x4e3371(_0x17f52b[_0x462b09(0x732)]+_0x17f52b[_0x462b09(0x462)],_0x3393db['padEnd'](0x1c));console[_0x462b09(0x547)](_0x462b09(0x1d1)+_0x26f869+'\x20\x20'+_0x4e3371(_0x17f52b['magenta'],String(_0xa59ffe)[_0x462b09(0x1d0)](0x6))+'\x20'+_0x4e3371(_0x17f52b['dim'],_0x462b09(0x4a2)));}console[_0x462b09(0x547)]('');}catch(_0x273d33){console['error'](_0x4e3371(_0x17f52b[_0x462b09(0x67b)],_0x462b09(0x7ad)+_0x273d33['message']+'\x0a'));}return;}if(_0x25baf1==='ROUTES'){_0x5b0abc(_0x4b4d1c,_0x2ead0d[_0x462b09(0x7a7)](0x1)[_0x462b09(0x2b6)]('\x20'));return;}if(_0x25baf1===_0x462b09(0x3e1)){const _0x122d1e=(_0x2ead0d[0x1]??'')[_0x462b09(0x2be)]();if(!_0x122d1e||_0x122d1e==='on')_0x52780c[_0x462b09(0x344)]=!![],_0x52780c[_0x462b09(0x407)]='info',console['log'](_0x462b09(0x7ad)+_0x4e3371(_0x17f52b[_0x462b09(0x3df)],'✓')+'\x20logs\x20on\x20\x20'+_0x4e3371(_0x17f52b[_0x462b09(0x60c)],_0x462b09(0x282))+'\x0a');else{if(_0x122d1e==='off')_0x52780c[_0x462b09(0x344)]=![],console[_0x462b09(0x547)](_0x462b09(0x7ad)+_0x4e3371(_0x17f52b[_0x462b09(0x19d)],'○')+_0x462b09(0x73d));else _0x4824f9[_0x122d1e]!==undefined?(_0x52780c[_0x462b09(0x344)]=!![],_0x52780c[_0x462b09(0x407)]=_0x122d1e,console['log'](_0x462b09(0x7ad)+_0x4e3371(_0x17f52b[_0x462b09(0x3df)],'✓')+_0x462b09(0x1a7)+_0x4e3371(_0x17f52b[_0x462b09(0x732)],_0x122d1e)+'\x0a')):console[_0x462b09(0x3ba)](_0x4e3371(_0x17f52b[_0x462b09(0x67b)],_0x462b09(0x538)));}return;}if(_0x25baf1===_0x462b09(0x51b)||_0x25baf1==='QUIT'){await _0x223e2f(_0x4b4d1c,0x0);return;}if(_0x25baf1===_0x462b09(0x521)){const _0x28dfee=_0x462b09(0x193)+_0x3ffef2[_0x462b09(0x3a7)]+_0x462b09(0x4b6),_0x44001d=process['platform']==='win32'?_0x462b09(0x318)+_0x28dfee:process[_0x462b09(0x3be)]===_0x462b09(0x763)?'open\x20'+_0x28dfee:_0x462b09(0x27d)+_0x28dfee;require$$4['exec'](_0x44001d),console[_0x462b09(0x547)]('\x0a\x20\x20'+_0x4e3371(_0x17f52b[_0x462b09(0x3df)],'✓')+_0x462b09(0x5dc)+_0x4e3371(_0x17f52b[_0x462b09(0x462)],_0x28dfee)+'\x0a');return;}let _0x51a1ec,_0x2d40f6,_0x452ba2;if(_0x49ed40[_0x462b09(0x4e7)](_0x25baf1)){_0x51a1ec=_0x25baf1,_0x2d40f6=_0x2ead0d[0x1],_0x452ba2=_0x2ead0d[_0x462b09(0x7a7)](0x2);if(!_0x2d40f6){console['error'](_0x4e3371(_0x17f52b['red'],_0x462b09(0x3a4)+_0x46a336+_0x462b09(0x191)));return;}}else _0x51a1ec=null,_0x2d40f6=_0x2ead0d[0x0],_0x452ba2=_0x2ead0d[_0x462b09(0x7a7)](0x1);const _0x52dbce=_0xb10630[_0x462b09(0x1a1)]??_0x510a22[_0x462b09(0x1a1)],_0x3ed7e4=_0x20051a(_0x2d40f6,_0x52dbce);if(_0xb10630[_0x462b09(0x1ce)]){_0x27259f(_0x4b4d1c,_0x3ed7e4);return;}let _0x25637e=null;if(_0x452ba2[_0x462b09(0x1b1)]){const _0x14795f=_0x452ba2[_0x462b09(0x2b6)]('\x20');try{_0x25637e=_0x319d99(_0x14795f);}catch(_0x38068d){console[_0x462b09(0x3ba)](_0x4e3371(_0x17f52b[_0x462b09(0x67b)],_0x462b09(0x492)+_0x14795f+_0x462b09(0x7ad)+_0x4e3371(_0x17f52b[_0x462b09(0x60c)],_0x38068d[_0x462b09(0x246)])+'\x0a'));return;}}if(!_0x51a1ec)_0x51a1ec=_0x25637e!==null?_0x462b09(0x1cd):_0x462b09(0x523);try{const _0x197c1a=await _0x37bd43(_0x4b4d1c,_0x51a1ec,_0x3ed7e4,_0x25637e);_0x3a7bf0(_0x197c1a['status'],_0x197c1a[_0x462b09(0x6bd)]);}catch(_0x3da489){console[_0x462b09(0x3ba)](_0x462b09(0x7ad)+_0x4e3371(_0x17f52b[_0x462b09(0x67b)],'✗')+'\x20'+_0x3da489[_0x462b09(0x246)]+'\x0a');}}class _0x42255d{constructor(){const _0x45a49a=_0x270959;this['children']=new Map(),this[_0x45a49a(0x4f5)]=null,this[_0x45a49a(0x47c)]=![];}}function _0x48e461(_0x1371b6){const _0x588edb=_0x270959,_0x16980e=new _0x42255d();for(const _0x455786 of _0x1371b6){if(_0x455786[_0x588edb(0x2e5)]?.[_0x588edb(0x24f)])continue;const _0x1e3c5e=_0x455786[_0x588edb(0x504)][_0x588edb(0x1f7)](/^\/api/,'')[_0x588edb(0x1f7)](/^\[\/env\/:env=[^\]]*\]/,'')[_0x588edb(0x1f7)](/^\//,'');if(!_0x1e3c5e)continue;let _0x5e4c07=_0x16980e;for(const _0x429cdb of _0x1e3c5e['split']('/')['filter'](Boolean)){if(_0x429cdb[_0x588edb(0x72d)](':')){const _0x8d7b6d=_0x429cdb['slice'](0x1);if(!_0x5e4c07[_0x588edb(0x4f5)])_0x5e4c07['dynamic']={'param':_0x8d7b6d,'node':new _0x42255d()};_0x5e4c07=_0x5e4c07['dynamic'][_0x588edb(0x4b5)];}else{if(!_0x5e4c07[_0x588edb(0x6d2)][_0x588edb(0x4e7)](_0x429cdb))_0x5e4c07[_0x588edb(0x6d2)][_0x588edb(0x238)](_0x429cdb,new _0x42255d());_0x5e4c07=_0x5e4c07[_0x588edb(0x6d2)][_0x588edb(0x5e0)](_0x429cdb);}}_0x5e4c07['terminal']=!![];}return _0x16980e;}const _0xe980cd=new Map();function _0x5c0f57(_0x4e4c77,_0x209093,_0x3df441){const _0x5a2581=_0x270959,_0x80639c=_0xe980cd['get'](_0x4e4c77);if(_0x80639c&&_0x80639c['exp']>Date[_0x5a2581(0x6a7)]())return _0x80639c[_0x5a2581(0x6af)];const _0x454154=_0x3df441();return _0xe980cd['set'](_0x4e4c77,{'val':_0x454154,'exp':Date[_0x5a2581(0x6a7)]()+_0x209093}),_0x454154;}function _0x536d49(_0x1bc67a,_0x5c037e,_0x3284d0,_0x58e372){const _0xdecaa2=_0x270959,_0x104d2e=_0x5c037e['env']??_0x58e372[_0xdecaa2(0x1a1)];switch(_0x1bc67a){case'env':return[..._0x3284d0['_envs'][_0xdecaa2(0x35c)]()][_0xdecaa2(0x3fb)](_0x3f0154=>!_0x3f0154[_0xdecaa2(0x72d)]('~'));case _0xdecaa2(0x737):return _0x5c0f57('types:'+_0x104d2e,0x7d0,()=>{const _0xb0e76a=_0xdecaa2;try{return[..._0x3284d0[_0xb0e76a(0x1a1)](_0x104d2e)[_0xb0e76a(0x799)][_0xb0e76a(0x35c)]()][_0xb0e76a(0x3fb)](_0x579296=>!_0x579296[_0xb0e76a(0x72d)]('~'));}catch{return[];}});case'key':if(!_0x5c037e[_0xdecaa2(0x737)])return[];return _0x5c0f57(_0xdecaa2(0x522)+_0x104d2e+':'+_0x5c037e['type'],0x5dc,()=>{const _0x367c05=_0xdecaa2;try{const _0x289138=_0x3284d0['env'](_0x104d2e)[_0x367c05(0x799)][_0x367c05(0x5e0)](_0x5c037e['type']);if(!_0x289138?.[_0x367c05(0x268)])return[];const _0x53feec=[];for(const {key:_0x4a7997}of _0x289138['data'][_0x367c05(0x433)]({'limit':0x32})){_0x53feec['push'](String(_0x4a7997));if(_0x53feec['length']>=0x32)break;}return _0x53feec;}catch{return[];}});case _0xdecaa2(0x332):if(!_0x5c037e[_0xdecaa2(0x737)])return[];return _0x5c0f57(_0xdecaa2(0x610)+_0x104d2e+':'+_0x5c037e['type'],0x7d0,()=>{const _0x179611=_0xdecaa2;try{const _0x3e42ab=_0x3284d0[_0x179611(0x1a1)](_0x104d2e)['typeSubDbs'][_0x179611(0x5e0)](_0x5c037e[_0x179611(0x737)]);return _0x3e42ab?[..._0x3e42ab[_0x179611(0x1e8)]?.['keys']()??[]]:[];}catch{return[];}});case _0xdecaa2(0x602):if(!_0x5c037e[_0xdecaa2(0x737)])return[];return _0x5c0f57(_0xdecaa2(0x1f6)+_0x104d2e+':'+_0x5c037e[_0xdecaa2(0x737)],0x7d0,()=>{const _0x1ad923=_0xdecaa2;try{return _0x3284d0[_0x1ad923(0x37a)]?.['list']?.(_0x5c037e[_0x1ad923(0x737)],_0x3284d0[_0x1ad923(0x1a1)](_0x104d2e))?.[_0x1ad923(0x2cc)](_0x132025=>_0x132025[_0x1ad923(0x60a)])??[];}catch{return[];}});default:return[];}}function _0x163023(_0x50a9ef,_0x10446c,_0x30bedd,_0x268c99){const _0x5d7c0c=_0x270959,_0x1e613d=_0x50a9ef['endsWith']('/'),_0x18cd5d=_0x50a9ef[_0x5d7c0c(0x5ed)]('/'),_0x2d6352=_0x1e613d?_0x18cd5d[_0x5d7c0c(0x7a7)](0x0,-0x1):_0x18cd5d[_0x5d7c0c(0x7a7)](0x0,-0x1),_0x44cc3c=_0x1e613d?'':_0x18cd5d[_0x18cd5d[_0x5d7c0c(0x1b1)]-0x1];let _0x1960b5=_0x10446c;const _0x3d3ae2={};for(const _0x551721 of _0x2d6352){if(!_0x551721)continue;if(_0x1960b5['children']['has'](_0x551721))_0x1960b5=_0x1960b5[_0x5d7c0c(0x6d2)][_0x5d7c0c(0x5e0)](_0x551721);else{if(_0x1960b5[_0x5d7c0c(0x4f5)])_0x3d3ae2[_0x1960b5[_0x5d7c0c(0x4f5)][_0x5d7c0c(0x544)]]=_0x551721,_0x1960b5=_0x1960b5[_0x5d7c0c(0x4f5)]['node'];else return[];}}const _0x4d8475=_0x2d6352[_0x5d7c0c(0x3fb)](Boolean),_0x146cd3=_0x4d8475['length']?_0x4d8475[_0x5d7c0c(0x2b6)]('/')+'/':'',_0x5b5431=[];for(const [_0x302c88]of _0x1960b5[_0x5d7c0c(0x6d2)]){if(_0x302c88[_0x5d7c0c(0x72d)](_0x44cc3c))_0x5b5431[_0x5d7c0c(0x494)](_0x146cd3+_0x302c88);}if(_0x1960b5[_0x5d7c0c(0x4f5)])for(const _0x285899 of _0x536d49(_0x1960b5[_0x5d7c0c(0x4f5)]['param'],_0x3d3ae2,_0x30bedd,_0x268c99)){if(String(_0x285899)['startsWith'](_0x44cc3c))_0x5b5431[_0x5d7c0c(0x494)](_0x146cd3+_0x285899);}return _0x5b5431['slice'](0x0,0x64);}const _0x2b2532=[_0x270959(0x1ce),_0x270959(0x34c),'env',_0x270959(0x71b),'types','routes',_0x270959(0x7a6),_0x270959(0x6ef),_0x270959(0x592),_0x270959(0x69d)];function _0x4a122c(_0x3a106b,_0x56af88,_0x3678cb){return function _0x3b8c07(_0x515d97){const _0x336180=_0x5511;try{const _0xc5fe2c=_0x515d97[_0x336180(0x427)](/\s[{[]/),_0xf0d97d=_0xc5fe2c>=0x0?_0x515d97[_0x336180(0x7a7)](0x0,_0xc5fe2c):_0x515d97,_0x4386cd=_0xf0d97d['trimStart']();if(!_0x4386cd){const _0x5b1b95=[..._0x2b2532,...[..._0x3a106b[_0x336180(0x6d2)][_0x336180(0x35c)]()]][_0x336180(0x7a7)](0x0,0x64);return[_0x5b1b95,''];}const _0x543669=_0x4386cd[_0x336180(0x5ed)](/\s+/),_0x46153a=_0x543669[0x0],_0x2ede29=_0x46153a[_0x336180(0x26a)]();if(_0x543669[_0x336180(0x1b1)]===0x1){const _0x2e73af=_0x46153a[_0x336180(0x2be)](),_0x13cfe1=_0x2b2532[_0x336180(0x3fb)](_0xeb5bb5=>_0xeb5bb5[_0x336180(0x72d)](_0x2e73af)),_0x2b25e8=_0x163023(_0x46153a,_0x3a106b,_0x56af88,_0x3678cb),_0x5e4998=[...new Set([..._0x13cfe1,..._0x2b25e8])]['slice'](0x0,0x64);return[_0x5e4998,_0x46153a];}if(_0x49ed40['has'](_0x2ede29)&&_0x543669[_0x336180(0x1b1)]===0x2){const _0x4dfe80=_0x543669[0x1],_0x15d353=_0x163023(_0x4dfe80,_0x3a106b,_0x56af88,_0x3678cb);return[_0x15d353['map'](_0x108ea3=>_0x46153a+'\x20'+_0x108ea3),_0x46153a+'\x20'+_0x4dfe80];}if(!_0x49ed40[_0x336180(0x4e7)](_0x2ede29)&&_0x543669[_0x336180(0x1b1)]>0x1){const _0x23ffe7=_0x163023(_0x46153a,_0x3a106b,_0x56af88,_0x3678cb),_0x2ca0a0='\x20'+_0x543669['slice'](0x1)[_0x336180(0x2b6)]('\x20');return[_0x23ffe7[_0x336180(0x2cc)](_0x3806b4=>_0x3806b4+_0x2ca0a0),_0x46153a+_0x2ca0a0];}return[[],_0x515d97];}catch{return[[],_0x515d97];}};}async function _0x3ca1f4(_0x55f258,_0x54f880){const _0xa65b3d=_0x270959,_0x57d511={'enabled':!![],'level':_0x54f880[_0xa65b3d(0x3a2)]??_0xa65b3d(0x380)},_0x3627d1={'env':_0xa65b3d(0x45b)},_0x4fdb00={'current':null},_0x5e7e94=_0x48e461(_0x55f258['http'][_0xa65b3d(0x33c)]()),_0x255774=_0x4a122c(_0x5e7e94,_0x55f258,_0x3627d1);_0x55f258[_0xa65b3d(0x547)][_0xa65b3d(0x714)](_0x24163e=>{const _0x5e31e3=_0xa65b3d;if(!_0x57d511[_0x5e31e3(0x344)])return;_0x449a03(_0x24163e,_0x57d511[_0x5e31e3(0x407)]),_0x4fdb00[_0x5e31e3(0x534)]?.[_0x5e31e3(0x660)](!![]);}),_0x4b9b48(_0x55f258,_0x54f880);const _0x2d5461=_0x16ad62[_0xa65b3d(0x3d0)]({'input':process['stdin'],'output':process['stdout'],'terminal':!![],'completer':_0x255774,'prompt':_0x11c628(_0x3627d1),'historySize':_0xabdfa6});try{const _0x228f16=_0x1c9c99[_0xa65b3d(0x6ba)](_0x1f5b2f,'utf8')[_0xa65b3d(0x5ed)]('\x0a')['filter'](Boolean);_0x2d5461['history']=_0x228f16[_0xa65b3d(0x605)]()['slice'](0x0,_0xabdfa6);}catch{}_0x4fdb00[_0xa65b3d(0x534)]=_0x2d5461,_0x2d5461['on'](_0xa65b3d(0x21d),async _0x2d5dff=>{const _0x75a7e0=_0xa65b3d;_0x2d5461[_0x75a7e0(0x795)]();try{await _0x1fe650(_0x2d5dff,_0x55f258,_0x54f880,_0x57d511,_0x3627d1,_0x2d5461);}catch(_0x45f2de){console['error'](_0x4e3371(_0x17f52b[_0x75a7e0(0x67b)],_0x75a7e0(0x511)+_0x45f2de['message']));}finally{_0x2d5461[_0x75a7e0(0x39b)](),_0x2d5461[_0x75a7e0(0x660)]();}}),_0x2d5461['on']('close',()=>{const _0x56c935=_0xa65b3d;try{const _0x26f041=[..._0x2d5461[_0x56c935(0x1f1)]][_0x56c935(0x605)]()[_0x56c935(0x3fb)](Boolean)['slice'](0x0,_0xabdfa6);_0x1c9c99[_0x56c935(0x639)](_0x1f5b2f,_0x26f041['join']('\x0a')+'\x0a');}catch{}_0x223e2f(_0x55f258,0x0);});let _0x328a79=0x0;return process['on']('SIGINT',()=>{const _0x596bda=_0xa65b3d;if(_0x42f182)return _0x223e2f(_0x55f258,0x82,_0x596bda(0x66a));if(_0x2d5461[_0x596bda(0x21d)]==='')return _0x223e2f(_0x55f258,0x0,_0x596bda(0x66a));const _0x45d57c=Date[_0x596bda(0x6a7)]();if(_0x45d57c-_0x328a79<0x5dc)return _0x223e2f(_0x55f258,0x0,_0x596bda(0x715));_0x328a79=_0x45d57c,process[_0x596bda(0x5c6)][_0x596bda(0x4f7)]('\x0a'),_0x2d5461['clearLine'](0x0),_0x2d5461[_0x596bda(0x660)](),process[_0x596bda(0x391)][_0x596bda(0x4f7)](_0x4e3371(_0x17f52b[_0x596bda(0x60c)],'\x20\x20(press\x20Ctrl+C\x20again\x20to\x20exit)\x0a'));}),process['on'](_0xa65b3d(0x2bc),()=>_0x223e2f(_0x55f258,0x0,_0xa65b3d(0x2bc))),process['on']('SIGBREAK',()=>_0x223e2f(_0x55f258,0x0,_0xa65b3d(0x44c))),_0x2d5461[_0xa65b3d(0x660)](),_0x2d5461;}return okdbShell={'start':_0x3ca1f4,'colorLog':_0x449a03,'lenientParse':_0x319d99,'_splitLine':_0xcec720,'_formatRouteHelpLines':_0x598304,'_routeSummary':_0x3d7911,'_routeTags':_0x84b1d6},okdbShell;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x402c6a=_0x5411c3;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x5a350c,performance:_0x56cf54}=require$$0$3,_0x30cef4=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG===_0x402c6a(0x434),_0xb99ba6=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x3ac0dc=process.env.OKDB_LOOP_LAG_ALL==='1',_0xffefe3=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x4e9be4{constructor(){const _0x16e938=_0x402c6a;this[_0x16e938(0x344)]=_0x30cef4,this[_0x16e938(0x510)]=new Map(),this['_h']=null,this['_timer']=null,this[_0x16e938(0x44a)]=![],this[_0x16e938(0x35d)]=(_0xc61a40,_0x3091e9)=>process[_0x16e938(0x391)][_0x16e938(0x4f7)](_0xc61a40+(_0x3091e9?'\x20'+JSON[_0x16e938(0x540)](_0x3091e9):'')+'\x0a');}[_0x402c6a(0x6a7)](){const _0x512017=_0x402c6a;return _0x56cf54[_0x512017(0x6a7)]();}[_0x402c6a(0x32a)](_0x46352c){const _0x58226d=_0x402c6a;if(typeof _0x46352c==='function')this[_0x58226d(0x35d)]=_0x46352c;}['note'](_0xced00d,_0x2b90ea,_0x3f881e){const _0x4d9f1e=_0x402c6a;if(!this['enabled'])return;let _0x3d8700=this[_0x4d9f1e(0x510)]['get'](_0xced00d);!_0x3d8700&&(_0x3d8700={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x4d9f1e(0x510)][_0x4d9f1e(0x238)](_0xced00d,_0x3d8700)),_0x3d8700['ms']+=_0x2b90ea,_0x3d8700[_0x4d9f1e(0x1df)]+=0x1,_0x2b90ea>_0x3d8700['maxMs']&&(_0x3d8700[_0x4d9f1e(0x740)]=_0x2b90ea,_0x3d8700[_0x4d9f1e(0x618)]=_0x3f881e||'');}['start'](_0x23091a){const _0x49eb72=_0x402c6a;if(!this['enabled']||this[_0x49eb72(0x44a)])return;this[_0x49eb72(0x44a)]=!![];if(_0x23091a)this[_0x49eb72(0x35d)]=_0x23091a;this['_h']=_0x5a350c({'resolution':0xa}),this['_h'][_0x49eb72(0x47e)](),this[_0x49eb72(0x74a)]=setInterval(()=>this['_report'](),_0xb99ba6);if(this[_0x49eb72(0x74a)][_0x49eb72(0x6d1)])this[_0x49eb72(0x74a)][_0x49eb72(0x6d1)]();}[_0x402c6a(0x2dc)](_0x1f68cf){const _0x39904=_0x402c6a;if(!this[_0x39904(0x3ad)])this[_0x39904(0x3ad)]=new Set();this[_0x39904(0x3ad)]['add'](_0x1f68cf);if(!this['_started'])this[_0x39904(0x38c)]();}[_0x402c6a(0x445)](_0x56f58f){const _0x2b6cd9=_0x402c6a;this[_0x2b6cd9(0x3ad)]?.[_0x2b6cd9(0x614)](_0x56f58f);}[_0x402c6a(0x38c)](){const _0x1f7183=_0x402c6a;if(this[_0x1f7183(0x5d9)])return;this['_admissionStarted']=!![];!this['_h']&&(this['_h']=_0x5a350c({'resolution':0xa}),this['_h'][_0x1f7183(0x47e)]());const _0x1e1e83=_0xb99ba6;this[_0x1f7183(0x580)]=setInterval(()=>{const _0x13d70a=_0x1f7183,_0x40e023=this['_h'];if(!_0x40e023)return;const _0x33862b=_0x40e023['percentile'](0x63)/0xf4240,_0x592d95=_0x40e023[_0x13d70a(0x46c)]/0xf4240,_0x42ab45=_0x40e023[_0x13d70a(0x6e1)]/0xf4240;_0x40e023[_0x13d70a(0x21f)]();if(this[_0x13d70a(0x3ad)])for(const _0x2430fa of this[_0x13d70a(0x3ad)]){try{_0x2430fa({'p99Ms':_0x33862b,'maxMs':_0x592d95,'meanMs':_0x42ab45,'reportMs':_0x1e1e83});}catch{}}},_0x1e1e83);if(this[_0x1f7183(0x580)][_0x1f7183(0x6d1)])this[_0x1f7183(0x580)][_0x1f7183(0x6d1)]();}[_0x402c6a(0x724)](){const _0x2dad8d=_0x402c6a,_0x479b88=this['_h'],_0x87c94e=_0x479b88[_0x2dad8d(0x46c)]/0xf4240,_0x53b8b9=_0x479b88[_0x2dad8d(0x1ed)](0x63)/0xf4240,_0x32571c=_0x479b88['mean']/0xf4240;_0x479b88[_0x2dad8d(0x21f)]();const _0x315052=[...this[_0x2dad8d(0x510)][_0x2dad8d(0x352)]()][_0x2dad8d(0x2cc)](([_0x1bf475,_0x5b7ff9])=>({'label':_0x1bf475,..._0x5b7ff9}))['sort']((_0x2f73da,_0x453138)=>_0x453138['ms']-_0x2f73da['ms'])[_0x2dad8d(0x7a7)](0x0,0x8);this[_0x2dad8d(0x510)][_0x2dad8d(0x22f)]();const _0x2f91d8=_0x315052['reduce']((_0x294738,_0x293d15)=>_0x294738+_0x293d15['ms'],0x0),_0x366e46=_0x315052['map'](_0x4bb5ff=>_0x4bb5ff[_0x2dad8d(0x52b)]+'='+_0x4bb5ff['ms'][_0x2dad8d(0x26b)](0x0)+_0x2dad8d(0x4db)+_0x4bb5ff[_0x2dad8d(0x1df)]+(_0x4bb5ff['maxMs']>0x5?_0x2dad8d(0x248)+_0x4bb5ff[_0x2dad8d(0x740)][_0x2dad8d(0x26b)](0x0)+'ms'+(_0x4bb5ff[_0x2dad8d(0x618)]?'\x20'+_0x4bb5ff['maxExtra']:'')+')':''));(_0x3ac0dc||_0x87c94e>=_0xffefe3)&&this['_log'](_0x2dad8d(0x1ca)+_0xb99ba6+_0x2dad8d(0x3d1)+_0x87c94e['toFixed'](0x0)+_0x2dad8d(0x1f5)+_0x53b8b9[_0x2dad8d(0x26b)](0x0)+_0x2dad8d(0x617)+_0x32571c[_0x2dad8d(0x26b)](0x0)+_0x2dad8d(0x520)+_0x2f91d8[_0x2dad8d(0x26b)](0x0)+'ms'+(_0x366e46[_0x2dad8d(0x1b1)]?'\x20│\x20'+_0x366e46['join']('\x20\x20'):''),{'feature':_0x2dad8d(0x41f)});if(this[_0x2dad8d(0x3ad)])for(const _0x121bfb of this[_0x2dad8d(0x3ad)]){try{_0x121bfb({'p99Ms':_0x53b8b9,'maxMs':_0x87c94e,'meanMs':_0x32571c,'reportMs':_0xb99ba6});}catch{}}}[_0x402c6a(0x687)](){const _0x188335=_0x402c6a;if(this[_0x188335(0x74a)])clearInterval(this[_0x188335(0x74a)]);if(this['_h'])this['_h'][_0x188335(0x42a)]();this[_0x188335(0x74a)]=null,this['_h']=null,this['_started']=![];}}const _0x1ce101=new _0x4e9be4();if(_0x1ce101['enabled'])_0x1ce101[_0x402c6a(0x45f)]();return okdbLoopMonitor={'LOOP':_0x1ce101},okdbLoopMonitor;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x30f8e6=require$$1$1,_0x2bbe77=require$$1;let _0x3fcb87,_0x5de22a,_0xecba8c,_0x434b5b,_0x86dd26,_0x5e3445,_0x23f332,_0x56cb30=![];const _0x304a1a=new Set();let _0x3c5367=null;const _0x3163a1=new Map();function _0x672b50(){const _0x5806b7=_0x5511;if(_0x3fcb87!==undefined)return _0x3fcb87;_0x3fcb87=process.env.OKDB_DIAG==='1';if(!_0x3fcb87)return![];_0x5de22a=process.env.OKDB_DIAG_STACK==='1',_0x434b5b=Math[_0x5806b7(0x46c)](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0xecba8c=new Array(_0x434b5b),_0x86dd26=0x0,_0x5e3445=0x0,_0x23f332=process.env.OKDB_DIAG_DIR||null;if(_0x23f332)try{_0x30f8e6[_0x5806b7(0x65b)](_0x23f332,{'recursive':!![]});}catch{}return!![];}function _0x4cb6d4(){return _0x3fcb87===undefined?_0x672b50():_0x3fcb87;}function _0x197896(_0x1ccc39,_0x2ded4b){const _0x2235d3=_0x5511;if(_0x3fcb87===undefined?!_0x672b50():!_0x3fcb87)return;let _0x387e83;if(_0x5de22a){const _0x198255=new Error()[_0x2235d3(0x2ae)]||'';_0x387e83=_0x198255[_0x2235d3(0x5ed)]('\x0a')[_0x2235d3(0x7a7)](0x3)[_0x2235d3(0x2cc)](_0x1a5e81=>_0x1a5e81['trim']())[_0x2235d3(0x3fb)](Boolean)[_0x2235d3(0x7a7)](0x0,0x8);}_0xecba8c[_0x86dd26]={'seq':_0x5e3445++,'t':Date[_0x2235d3(0x6a7)](),'env':_0x1ccc39,'kind':_0x2ded4b||'commit','stack':_0x387e83},_0x86dd26=(_0x86dd26+0x1)%_0x434b5b;}function _0x378d35(_0x4f0cdb){const _0x2599d1=_0x5511,_0x298053=[];for(let _0x119b6c=0x0;_0x119b6c<_0x434b5b;_0x119b6c++){const _0x4a0c09=_0xecba8c[(_0x86dd26-0x1-_0x119b6c+_0x434b5b*0x2)%_0x434b5b];if(!_0x4a0c09)continue;_0x298053[_0x2599d1(0x494)](_0x4a0c09);if(_0x298053[_0x2599d1(0x1b1)]>=_0x4f0cdb)break;}return _0x298053;}function _0x262bfb(_0x4d167c){const _0xaa87b6=_0x5511;try{process[_0xaa87b6(0x391)][_0xaa87b6(0x4f7)](_0x4d167c+'\x0a');}catch{}if(_0x23f332)try{_0x30f8e6[_0xaa87b6(0x654)](_0x2bbe77[_0xaa87b6(0x2b6)](_0x23f332,_0xaa87b6(0x54e)+process[_0xaa87b6(0x690)]+_0xaa87b6(0x532)),_0x4d167c+'\x0a');}catch{}}function _0x126def(_0x4a9139){const _0x5058c1=_0x5511,_0x5a59cd=_0x378d35(_0x4a9139);if(!_0x5a59cd['length'])return _0x5058c1(0x2ff);const _0x424625=Date['now']();return _0x5a59cd['map'](_0x5b35d9=>{const _0x5948da=_0x5058c1,_0x51afae=_0x5948da(0x597)+_0x5b35d9['seq']+'\x20-'+(_0x424625-_0x5b35d9['t'])+_0x5948da(0x3f7)+_0x5b35d9[_0x5948da(0x1a1)]+'\x20'+_0x5b35d9['kind'];return _0x5b35d9['stack']&&_0x5b35d9['stack']['length']?_0x51afae+'\x0a\x20\x20\x20\x20\x20\x20'+_0x5b35d9[_0x5948da(0x2ae)]['join'](_0x5948da(0x584)):_0x51afae;})[_0x5058c1(0x2b6)]('\x0a');}function _0x12a27e(_0x5eaa9f,_0x57830f){const _0x594bde=_0x5511,_0x17013f=_0x594bde(0x75c)+_0x5eaa9f+_0x594bde(0x5d6)+new Date()['toISOString']()+_0x594bde(0x5bd)+process['pid']+_0x594bde(0x24b),_0x37ebc9=[_0x17013f,_0x594bde(0x635)+(_0x57830f&&_0x57830f['stack']?_0x57830f[_0x594bde(0x2ae)][_0x594bde(0x5ed)]('\x0a')[0x0]:_0x57830f),_0x594bde(0x2d7)+(_0x5de22a?'':_0x594bde(0x1dd))+':',_0x126def(0x18),_0x1df4d1(),'='[_0x594bde(0x1f2)](_0x17013f['length']-0x1)];_0x262bfb(_0x37ebc9[_0x594bde(0x2b6)]('\x0a'));}function _0x30b5fd(_0x19d8f2){const _0x3fea34=_0x5511;if(!_0x4cb6d4())return;const _0x3d33ba=String(_0x19d8f2&&_0x19d8f2[_0x3fea34(0x246)]||_0x19d8f2||''),_0x191275=/already closed|environment is already|invalid read txn|reset an invalid/i[_0x3fea34(0x279)](_0x3d33ba);_0x12a27e(_0x191275?'ORPHAN\x20(env-closed\x20write)':_0x3fea34(0x6ff),_0x19d8f2);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x191275)return;try{console[_0x3fea34(0x3ba)](_0x19d8f2&&_0x19d8f2[_0x3fea34(0x2ae)]?_0x19d8f2[_0x3fea34(0x2ae)]:_0x19d8f2);}catch{}process['exit'](0x1);}function _0xdc4872(_0x116805){const _0x3a4664=_0x5511;if(!_0x4cb6d4())return;const _0x1ecd2d=String(_0x116805&&_0x116805[_0x3a4664(0x246)]||_0x116805||'');/already closed|environment is already|invalid read txn|reset an invalid/i[_0x3a4664(0x279)](_0x1ecd2d)&&_0x12a27e(_0x3a4664(0x3ca),_0x116805);}function _0x1df4d1(){const _0xaa9377=_0x5511,_0x2d4c5f=['drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):'];let _0x26ec77=![];for(const _0x55a634 of _0x304a1a){const _0x2c7fc9=_0x55a634&&_0x55a634['_envs'];if(!_0x2c7fc9)continue;for(const [_0x58f248,_0x40be70]of _0x2c7fc9){const _0x37abb0=_0x40be70&&_0x40be70[_0xaa9377(0x2d9)]&&_0x40be70[_0xaa9377(0x2d9)]['view'];if(!_0x37abb0)continue;let _0x296971,_0x431ec8;try{_0x296971=Atomics[_0xaa9377(0x578)](_0x37abb0,0x0),_0x431ec8=Atomics[_0xaa9377(0x578)](_0x37abb0,0x1);}catch{continue;}if(_0x296971===0x0)continue;_0x26ec77=!![];const _0x597cd6=_0x296971>0x0?_0xaa9377(0x55c):_0xaa9377(0x79d),_0x2fa43f=Date[_0xaa9377(0x6a7)]()-Math[_0xaa9377(0x2e8)](_0x296971)*0x3e8,_0x25a2e3=((()=>{const _0x1ccfff=_0xaa9377;try{return _0x40be70[_0x1ccfff(0x1c8)]&&_0x40be70[_0x1ccfff(0x1c8)]['status']?_0x40be70[_0x1ccfff(0x1c8)][_0x1ccfff(0x57d)]():null;}catch{return null;}})());_0x2d4c5f[_0xaa9377(0x494)]('\x20\x20env='+_0x58f248+_0xaa9377(0x26d)+_0x597cd6+_0xaa9377(0x528)+_0x2fa43f+_0xaa9377(0x75e)+_0x431ec8+(_0x25a2e3?_0xaa9377(0x583)+_0x25a2e3[_0xaa9377(0x440)]+_0xaa9377(0x791)+_0x25a2e3[_0xaa9377(0x402)]+_0xaa9377(0x734)+_0x25a2e3[_0xaa9377(0x31c)]+'}':''));}}if(!_0x26ec77)_0x2d4c5f[_0xaa9377(0x494)](_0xaa9377(0x335));return _0x2d4c5f[_0xaa9377(0x2b6)]('\x0a');}function _0x11af07(){const _0x49f475=_0x5511;if(!_0x4cb6d4())return;const _0x308b3e=Math[_0x49f475(0x46c)](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x2c3376=Date[_0x49f475(0x6a7)]();for(const _0x509490 of _0x304a1a){const _0x4a854b=_0x509490&&_0x509490[_0x49f475(0x221)];if(!_0x4a854b)continue;for(const [_0x11296a,_0xf71f1f]of _0x4a854b){const _0x2d6682=_0xf71f1f&&_0xf71f1f['_coordinator']&&_0xf71f1f[_0x49f475(0x2d9)][_0x49f475(0x1d3)];if(!_0x2d6682)continue;let _0x51b2b3;try{_0x51b2b3=Atomics[_0x49f475(0x578)](_0x2d6682,0x0);}catch{continue;}const _0x27d36b=_0x509490['path']+'|'+_0x11296a;if(_0x51b2b3<=0x0){_0x3163a1['delete'](_0x27d36b);continue;}const _0x2b072a=_0x2c3376-_0x51b2b3*0x3e8,_0x5deecb=_0x3163a1['get'](_0x27d36b);if(_0x2b072a<_0x308b3e)continue;if(_0x5deecb&&_0x2c3376-_0x5deecb[_0x49f475(0x69e)]<_0x308b3e)continue;_0x3163a1['set'](_0x27d36b,{'firstTs':_0x5deecb?_0x5deecb[_0x49f475(0x23b)]:_0x51b2b3,'dumpedAt':_0x2c3376});const _0xf20f27=_0x49f475(0x362)+_0x2b072a+_0x49f475(0x53f)+_0x11296a+_0x49f475(0x5d6)+new Date()['toISOString']()+_0x49f475(0x5bd)+process[_0x49f475(0x690)]+_0x49f475(0x24b);_0x262bfb([_0xf20f27,_0x1df4d1(),'='[_0x49f475(0x1f2)](_0xf20f27['length']-0x1)][_0x49f475(0x2b6)]('\x0a'));}}}function _0x2317e8(){const _0x37bb10=_0x5511;if(!_0x4cb6d4()||_0x56cb30)return;_0x56cb30=!![],process['prependListener'](_0x37bb10(0x6ff),_0x30b5fd),process[_0x37bb10(0x250)]('unhandledRejection',_0xdc4872);const _0x50a4ad=Math['max'](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x3c5367=setInterval(_0x11af07,_0x50a4ad);if(_0x3c5367[_0x37bb10(0x6d1)])_0x3c5367[_0x37bb10(0x6d1)]();}function _0x2a388c(_0x1e29e4){const _0x15039d=_0x5511;if(!_0x4cb6d4()||!_0x1e29e4)return;_0x304a1a[_0x15039d(0x41a)](_0x1e29e4),_0x2317e8();}function _0x27a614(_0x366f39){const _0x1aea9c=_0x5511;_0x304a1a[_0x1aea9c(0x614)](_0x366f39);}function _0x2bffd9(){const _0x42f169=_0x5511;if(!_0x4cb6d4())return{'enabled':![],'hint':_0x42f169(0x226)};return{'enabled':!![],'stackCapture':!!_0x5de22a,'recentWrites':_0x378d35(0x10),'drain':_0x1df4d1()};}return okdbDiag={'isEnabled':_0x4cb6d4,'recordWrite':_0x197896,'installDiag':_0x2317e8,'registerOkdb':_0x2a388c,'unregisterOkdb':_0x27a614,'snapshot':_0x2bffd9},okdbDiag;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x51f693=_0x5411c3;if(hasRequiredOkdbWriter)return okdbWriter[_0x51f693(0x577)];hasRequiredOkdbWriter=0x1;const {performance:_0x477bea}=require$$0$4,_0x3c9a37=requireOkdbDiag(),_0x3c6cb4=process.env.OKDB_COMMIT_MODE===_0x51f693(0x45e);class _0x31c22f{constructor(_0x1fea06){const _0x465c1a=_0x51f693;this[_0x465c1a(0x1a1)]=_0x1fea06,this[_0x465c1a(0x769)]=new Set(),this[_0x465c1a(0x4c0)]=new Map(),this['_committed']=0x0,this[_0x465c1a(0x5fc)]=[],this[_0x465c1a(0x71e)]=[],this['_highWater']=Math[_0x465c1a(0x46c)](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this[_0x465c1a(0x229)]=0x0,this['_bpWaiters']=[],this[_0x465c1a(0x2c1)]=0x0,this[_0x465c1a(0x1e0)]=null,this['_heldTotal']=0x0,this['_nestedTotal']=0x0,this[_0x465c1a(0x44f)]=![];}async[_0x51f693(0x480)](_0x32021d,_0x3f56aa){const _0x857eba=_0x51f693;if(_0x3c9a37[_0x857eba(0x5c8)]())_0x3c9a37[_0x857eba(0x790)](this[_0x857eba(0x1a1)]?.['name'],_0x3f56aa);if(this[_0x857eba(0x2e4)]){const _0x2ca41e=new Error(_0x857eba(0x368));_0x2ca41e[_0x857eba(0x5cc)]=_0x857eba(0x4f9);throw _0x2ca41e;}if(this[_0x857eba(0x524)]>0x0){let _0x2cf27c=![];while(this[_0x857eba(0x229)]>=this[_0x857eba(0x524)]&&!this[_0x857eba(0x2e4)]){!_0x2cf27c&&(_0x2cf27c=!![],this[_0x857eba(0x2c1)]++),await new Promise(_0xa8fd6d=>this[_0x857eba(0x75f)]['push'](_0xa8fd6d));}if(this[_0x857eba(0x2e4)]){const _0x6f66f6=new Error('okdb-writer:\x20env\x20closing\x20—\x20retry');_0x6f66f6[_0x857eba(0x5cc)]=_0x857eba(0x4f9);throw _0x6f66f6;}}this[_0x857eba(0x229)]++;const _0x280729=this['env']['_coordinator'];for(;;){while(this[_0x857eba(0x1e0)])await this['_held'];if(_0x280729)await _0x280729[_0x857eba(0x302)]();if(!this['_held'])break;if(_0x280729)_0x280729[_0x857eba(0x67c)]();}if(this[_0x857eba(0x2e4)]){if(_0x280729)_0x280729[_0x857eba(0x67c)]();this['_outstanding']--;if(this['_bpWaiters'][_0x857eba(0x1b1)]&&this[_0x857eba(0x229)]<this['_highWater'])this[_0x857eba(0x75f)][_0x857eba(0x6d9)]()();const _0x2097da=new Error(_0x857eba(0x368));_0x2097da[_0x857eba(0x5cc)]=_0x857eba(0x4f9);throw _0x2097da;}const _0x1e548e=_0x477bea['now']();if(_0x3c6cb4)try{const _0xfdc097=this[_0x857eba(0x1a1)]['db'][_0x857eba(0x1ff)](_0x32021d);this[_0x857eba(0x6f6)]++;if(this[_0x857eba(0x5fc)][_0x857eba(0x494)](_0x477bea[_0x857eba(0x6a7)]()-_0x1e548e)>0x100)this[_0x857eba(0x5fc)]['shift']();if(this[_0x857eba(0x71e)][_0x857eba(0x494)](_0x477bea['now']())>0x800)this[_0x857eba(0x71e)][_0x857eba(0x6d9)]();return _0xfdc097;}finally{this[_0x857eba(0x229)]--;if(this[_0x857eba(0x75f)][_0x857eba(0x1b1)]&&this[_0x857eba(0x229)]<this[_0x857eba(0x524)])this[_0x857eba(0x75f)][_0x857eba(0x6d9)]()();if(_0x280729)_0x280729[_0x857eba(0x67c)]();}let _0x51ddd3=null;const _0xd1ed72=()=>{const _0x1d82ba=_0x857eba,_0x34216f=_0x32021d();if(_0x34216f&&typeof _0x34216f[_0x1d82ba(0x1c9)]===_0x1d82ba(0x76e)&&!_0x51ddd3){this[_0x1d82ba(0x25d)]++;let _0x19d166;const _0x3b81e1=new Promise(_0x5df3bc=>_0x19d166=_0x5df3bc);this[_0x1d82ba(0x1e0)]=_0x3b81e1,_0x51ddd3=()=>{const _0xea8b8=_0x1d82ba;if(this[_0xea8b8(0x1e0)]===_0x3b81e1)this[_0xea8b8(0x1e0)]=null;_0x19d166();};}return _0x34216f;};let _0x3124c4;try{_0x3124c4=this[_0x857eba(0x1a1)]['db']['childTransaction'](_0xd1ed72);}catch(_0x49d686){_0x3124c4=Promise['reject'](_0x49d686);}(!_0x3124c4||typeof _0x3124c4['then']!==_0x857eba(0x76e))&&(this[_0x857eba(0x64d)]++,!this['_nestedWarned']&&(this[_0x857eba(0x44f)]=!![],console[_0x857eba(0x305)]('okdb-writer['+(this[_0x857eba(0x1a1)]?.[_0x857eba(0x60a)]??'?')+_0x857eba(0x58e))),_0x3124c4=Promise[_0x857eba(0x25c)](_0x3124c4));const _0x3b348b=()=>{if(_0x51ddd3)_0x51ddd3();};_0x3124c4[_0x857eba(0x1c9)](_0x3b348b,_0x3b348b),this['_inflight'][_0x857eba(0x41a)](_0x3124c4),this['_enqueuedAt']['set'](_0x3124c4,_0x1e548e);const _0x5bef19=()=>{const _0x3daae1=_0x857eba;this[_0x3daae1(0x769)][_0x3daae1(0x614)](_0x3124c4),this[_0x3daae1(0x4c0)]['delete'](_0x3124c4),this[_0x3daae1(0x6f6)]++,this[_0x3daae1(0x229)]--;this[_0x3daae1(0x75f)][_0x3daae1(0x1b1)]&&this[_0x3daae1(0x229)]<this['_highWater']&&this['_bpWaiters']['shift']()();if(this[_0x3daae1(0x5fc)][_0x3daae1(0x494)](_0x477bea[_0x3daae1(0x6a7)]()-_0x1e548e)>0x100)this[_0x3daae1(0x5fc)]['shift']();if(this[_0x3daae1(0x71e)][_0x3daae1(0x494)](_0x477bea['now']())>0x800)this[_0x3daae1(0x71e)][_0x3daae1(0x6d9)]();};_0x3124c4['then'](_0x5bef19,_0x5bef19);try{return await _0x3124c4;}finally{if(_0x280729)_0x280729[_0x857eba(0x67c)]();}}[_0x51f693(0x57d)](){const _0x3d4d93=_0x51f693,_0x33c618=_0x477bea['now']();let _0x3d3436=0x0;for(const _0x1390e1 of this[_0x3d4d93(0x4c0)]['values']()){const _0x1d0922=_0x33c618-_0x1390e1;if(_0x1d0922>_0x3d3436)_0x3d3436=_0x1d0922;}let _0x3e98fa=0x0;for(let _0x4b33a0=this[_0x3d4d93(0x71e)][_0x3d4d93(0x1b1)]-0x1;_0x4b33a0>=0x0;_0x4b33a0--){if(_0x33c618-this[_0x3d4d93(0x71e)][_0x4b33a0]>0x3e8)break;_0x3e98fa++;}let _0x15f16b=0x0;if(this['_durs']['length']){const _0x5f3eb9=[...this['_durs']][_0x3d4d93(0x4ba)]((_0x5686eb,_0x2e1c99)=>_0x5686eb-_0x2e1c99);_0x15f16b=_0x5f3eb9[Math[_0x3d4d93(0x4a8)](_0x5f3eb9[_0x3d4d93(0x1b1)]-0x1,Math[_0x3d4d93(0x1f9)](_0x5f3eb9[_0x3d4d93(0x1b1)]*0.99))];}return{'depth':this[_0x3d4d93(0x769)]['size'],'oldestPendingMs':Math[_0x3d4d93(0x40d)](_0x3d3436),'committed':this['_committed'],'commitsPerSec':_0x3e98fa,'commitP99Ms':Math['round'](_0x15f16b),'parkedNow':this['_bpWaiters'][_0x3d4d93(0x1b1)],'parkedTotal':this[_0x3d4d93(0x2c1)],'highWater':this[_0x3d4d93(0x524)]};}[_0x51f693(0x356)](){const _0x2b9b69=_0x51f693,_0x7f3596=_0x477bea['now']();return[...this['_enqueuedAt'][_0x2b9b69(0x637)]()][_0x2b9b69(0x2cc)](_0x1a2c61=>Math['round'](_0x7f3596-_0x1a2c61))[_0x2b9b69(0x4ba)]((_0x64470c,_0x3c8e4e)=>_0x3c8e4e-_0x64470c);}['markClosed'](){const _0x2f56e6=_0x51f693;this['_closed']=!![];for(const _0x1583fe of this[_0x2f56e6(0x75f)][_0x2f56e6(0x3e0)](0x0))_0x1583fe();}async[_0x51f693(0x55d)](){const _0x2e98ca=_0x51f693;let _0x18f2c8=0x0;while(this[_0x2e98ca(0x769)]['size']&&_0x18f2c8++<0x3e8){await Promise['allSettled']([...this[_0x2e98ca(0x769)]]);}}async['put'](_0x73b1fe,_0x3cde10,_0x58a929,_0x337dd1){const _0x1c27e2=_0x51f693;return this[_0x1c27e2(0x480)](()=>{const _0x1a68cc=_0x1c27e2;if(_0x337dd1===undefined)_0x73b1fe['putSync'](_0x3cde10,_0x58a929);else _0x73b1fe[_0x1a68cc(0x48f)](_0x3cde10,_0x58a929,_0x337dd1);},_0x1c27e2(0x590));}async[_0x51f693(0x43f)](_0x1ec362,_0x9bc519){const _0x592153=_0x51f693;return this[_0x592153(0x480)](()=>_0x1ec362[_0x592153(0x5b4)](_0x9bc519),_0x592153(0x1fd));}}async function _0x4130a2(_0x386f3a,_0x588f6e){const _0x4bd75e=_0x51f693;if(_0x588f6e==null)_0x588f6e=Math['max'](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0x12e6ee=_0x386f3a?.['flushed'];if(!_0x12e6ee||typeof _0x12e6ee[_0x4bd75e(0x1c9)]!=='function')return;await Promise['race']([Promise[_0x4bd75e(0x25c)](_0x12e6ee)['catch'](()=>{}),new Promise(_0x41e301=>{const _0x3956df=_0x4bd75e,_0x5cb007=setTimeout(_0x41e301,_0x588f6e);if(_0x5cb007[_0x3956df(0x6d1)])_0x5cb007['unref']();})]);}catch{}}function _0x1a14a5(_0x503c14){const _0x56ae44=_0x51f693;if(_0x3c6cb4)return Promise[_0x56ae44(0x25c)]();const _0x3ed332=_0x503c14?.['committed'];return _0x3ed332&&typeof _0x3ed332[_0x56ae44(0x1c9)]===_0x56ae44(0x76e)?_0x3ed332:Promise[_0x56ae44(0x25c)]();}return okdbWriter[_0x51f693(0x577)]=_0x31c22f,okdbWriter[_0x51f693(0x577)][_0x51f693(0x4f6)]=_0x4130a2,okdbWriter['exports'][_0x51f693(0x327)]=_0x1a14a5,okdbWriter[_0x51f693(0x577)]['SYNC_COMMITS']=_0x3c6cb4,okdbWriter[_0x51f693(0x577)];}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0x45513d=_0x5411c3;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x517dd0=require$$0,{SYNC_COMMITS:_0x1ec4f6}=requireOkdbWriter(),_0x52dece=_0x45513d(0x2f3);class _0x5c50e9{constructor(_0x178dd8,_0x19d30a,_0x21f777){const _0x4fb250=_0x45513d;this['_lock']=_0x178dd8,this[_0x4fb250(0x647)]=_0x19d30a,this[_0x4fb250(0x52a)]=_0x21f777,this[_0x4fb250(0x766)]=![],this[_0x4fb250(0x6b1)]=null,this['_heartbeatInFlight']=null;}[_0x45513d(0x706)](){const _0x107315=_0x45513d;if(this[_0x107315(0x766)])return![];try{const _0x4c879f=this[_0x107315(0x1b7)][_0x107315(0x2fd)]()[_0x107315(0x5e0)](this[_0x107315(0x647)]);if(!_0x4c879f||_0x4c879f[_0x107315(0x40f)]!==this[_0x107315(0x52a)])return![];const _0x5b37d6=_0x4c879f[_0x107315(0x1b8)]??_0x4c879f[_0x107315(0x40f)];if(_0x5b37d6+_0x4c879f[_0x107315(0x4a6)]<Date[_0x107315(0x6a7)]())return![];return!![];}catch{return!this[_0x107315(0x766)];}}[_0x45513d(0x74c)](){const _0x33c53a=_0x45513d;if(this[_0x33c53a(0x766)])return null;try{return this['_lock'][_0x33c53a(0x2fd)]()[_0x33c53a(0x5e0)](this[_0x33c53a(0x647)])??null;}catch{return null;}}async[_0x45513d(0x561)](_0x9780f7){const _0x218b45=_0x45513d;if(this['_released'])return;try{const _0x30a496=this[_0x218b45(0x1b7)][_0x218b45(0x2fd)]()[_0x218b45(0x5e0)](this[_0x218b45(0x647)]);if(!_0x30a496||_0x30a496[_0x218b45(0x40f)]!==this[_0x218b45(0x52a)])return;if(_0x1ec4f6)this['_lock']['_db']()[_0x218b45(0x48f)](this[_0x218b45(0x647)],{..._0x30a496,'ttlMs':_0x30a496[_0x218b45(0x4a6)]+_0x9780f7});else await this[_0x218b45(0x1b7)]['_db']()[_0x218b45(0x4cd)](this[_0x218b45(0x647)],{..._0x30a496,'ttlMs':_0x30a496[_0x218b45(0x4a6)]+_0x9780f7});}catch{}}async['release'](){const _0x10528d=_0x45513d;if(this[_0x10528d(0x766)])return;if(this['_heartbeatInFlight'])try{await this[_0x10528d(0x514)];}catch{}clearInterval(this[_0x10528d(0x6b1)]),this['_heartbeatTimer']=null,this[_0x10528d(0x766)]=!![];try{const _0xb27456=this[_0x10528d(0x1b7)][_0x10528d(0x2fd)]()['get'](this[_0x10528d(0x647)]);if(_0xb27456&&_0xb27456['acquiredAt']===this[_0x10528d(0x52a)]){if(_0x1ec4f6)this[_0x10528d(0x1b7)][_0x10528d(0x2fd)]()[_0x10528d(0x5b4)](this['_key']);else await this['_lock'][_0x10528d(0x2fd)]()[_0x10528d(0x43f)](this[_0x10528d(0x647)]);}}catch{}}[_0x45513d(0x5e6)](_0x3a9970,_0x4b4aa8){const _0x21b4b2=_0x45513d,_0x2af614=_0x4b4aa8??Math[_0x21b4b2(0x1f9)](_0x3a9970/0x3);this[_0x21b4b2(0x6b1)]=setInterval(()=>{const _0x21f3ff=_0x21b4b2;if(this[_0x21f3ff(0x766)])return;this[_0x21f3ff(0x514)]=((async()=>{const _0x410591=_0x21f3ff;try{const _0x53a74e=this['_lock'][_0x410591(0x2fd)]()[_0x410591(0x5e0)](this['_key']);if(!_0x53a74e||_0x53a74e[_0x410591(0x40f)]!==this['_acquiredAt']){this[_0x410591(0x766)]=!![],clearInterval(this[_0x410591(0x6b1)]),this[_0x410591(0x6b1)]=null;return;}if(_0x1ec4f6)this[_0x410591(0x1b7)][_0x410591(0x2fd)]()[_0x410591(0x48f)](this['_key'],{..._0x53a74e,'updatedAt':Date[_0x410591(0x6a7)]()});else await this[_0x410591(0x1b7)]['_db']()[_0x410591(0x4cd)](this[_0x410591(0x647)],{..._0x53a74e,'updatedAt':Date[_0x410591(0x6a7)]()});}catch{}this['_heartbeatInFlight']=null;})());},_0x2af614);if(this[_0x21b4b2(0x6b1)]['unref'])this[_0x21b4b2(0x6b1)][_0x21b4b2(0x6d1)]();}}class _0x2c8c68{constructor(_0x4bdfdf,{namespace:_0x5f1f17,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x1986f7=_0x45513d;this[_0x1986f7(0x471)]=_0x4bdfdf,this['namespace']=_0x5f1f17,this['ttlMs']=ttlMs,this[_0x1986f7(0x581)]=heartbeatMs,this['_lockDb']=null;}[_0x45513d(0x2fd)](){const _0x1f0ddb=_0x45513d;return!this[_0x1f0ddb(0x6a8)]&&(this['_lockDb']=this[_0x1f0ddb(0x471)][_0x1f0ddb(0x748)](_0x52dece,{'dupSort':![]})),this[_0x1f0ddb(0x6a8)];}[_0x45513d(0x6c8)](){const _0xd78f8e=_0x45513d;return!this[_0xd78f8e(0x6fd)]&&(this[_0xd78f8e(0x6fd)]=this[_0xd78f8e(0x471)][_0xd78f8e(0x748)](_0x52dece+_0xd78f8e(0x733),{'dupSort':![]})),this[_0xd78f8e(0x6fd)];}['_key'](_0x1aa24e){return this['namespace']+':'+_0x1aa24e;}[_0x45513d(0x2e6)](_0x2e0e22){const _0x29fda3=_0x45513d;try{_0x1ec4f6?this[_0x29fda3(0x6c8)]()['putSync'](this['_key'](_0x2e0e22),Date[_0x29fda3(0x6a7)]()):this[_0x29fda3(0x6c8)]()[_0x29fda3(0x4cd)](this[_0x29fda3(0x647)](_0x2e0e22),Date['now']())?.[_0x29fda3(0x58b)]?.(()=>{});}catch{}}[_0x45513d(0x324)](_0x922420,_0x9994c9=0x3e8){const _0x13e225=_0x45513d;try{const _0x103830=this['_wantDb']()[_0x13e225(0x5e0)](this[_0x13e225(0x647)](_0x922420));return typeof _0x103830===_0x13e225(0x758)&&Date[_0x13e225(0x6a7)]()-_0x103830<_0x9994c9;}catch{return![];}}[_0x45513d(0x5c7)](_0x4c0afa){const _0x3b985e=_0x45513d,_0xfdf389=_0x4c0afa[_0x3b985e(0x1b8)]??_0x4c0afa[_0x3b985e(0x40f)];return _0xfdf389+_0x4c0afa[_0x3b985e(0x4a6)]<Date['now']();}static[_0x45513d(0x21e)](_0x39af36){const _0x101612=_0x45513d,_0x2bf487=_0x39af36?.[_0x101612(0x74c)];if(!_0x2bf487||typeof _0x2bf487[_0x101612(0x690)]!==_0x101612(0x758))return![];if(_0x2bf487[_0x101612(0x394)]!==_0x517dd0['hostname']())return![];if(_0x2bf487['pid']===process[_0x101612(0x690)])return![];try{return process[_0x101612(0x4fc)](_0x2bf487[_0x101612(0x690)],0x0),![];}catch(_0xf72548){return _0xf72548['code']===_0x101612(0x25a);}}async[_0x45513d(0x5fe)](_0x390136,_0x477458={},_0x2f734f={}){const _0x50ccdf=_0x45513d,_0x59337a=this[_0x50ccdf(0x647)](_0x390136),_0x50255a=_0x2f734f[_0x50ccdf(0x4a6)]??this[_0x50ccdf(0x4a6)],_0x1d688f=Date['now'](),_0x5eea6d={'holder':{'pid':process[_0x50ccdf(0x690)],'hostname':_0x517dd0[_0x50ccdf(0x394)](),..._0x477458},'acquiredAt':_0x1d688f,'updatedAt':_0x1d688f,'ttlMs':_0x50255a};let _0x45f165=![],_0x4891cb=null;try{const _0x12c1c9=()=>{const _0x9895f3=_0x50ccdf,_0x2ce280=this[_0x9895f3(0x2fd)]()['get'](_0x59337a);if(_0x2ce280&&!this['_isStale'](_0x2ce280)&&!_0x2c8c68[_0x9895f3(0x21e)](_0x2ce280)){const _0x42135c=_0x477458[_0x9895f3(0x38b)]!=null&&_0x2ce280[_0x9895f3(0x74c)][_0x9895f3(0x690)]===process[_0x9895f3(0x690)]&&_0x2ce280['holder'][_0x9895f3(0x38b)]===_0x477458[_0x9895f3(0x38b)];if(!_0x42135c){_0x45f165=![],_0x4891cb=_0x2ce280;return;}_0x5eea6d[_0x9895f3(0x40f)]<=_0x2ce280[_0x9895f3(0x40f)]&&(_0x5eea6d[_0x9895f3(0x40f)]=_0x2ce280[_0x9895f3(0x40f)]+0x1,_0x5eea6d['updatedAt']=_0x5eea6d[_0x9895f3(0x40f)]);}this[_0x9895f3(0x2fd)]()[_0x9895f3(0x4cd)](_0x59337a,_0x5eea6d),_0x45f165=!![],_0x4891cb=_0x5eea6d;};if(_0x1ec4f6)this[_0x50ccdf(0x2fd)]()[_0x50ccdf(0x1ff)](_0x12c1c9);else await this[_0x50ccdf(0x2fd)]()['childTransaction'](_0x12c1c9);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x45f165)return{'acquired':![],'handle':null,'current':_0x4891cb};const _0x57274b=new _0x5c50e9(this,_0x59337a,_0x5eea6d[_0x50ccdf(0x40f)]);return _0x57274b[_0x50ccdf(0x5e6)](_0x50255a,this['heartbeatMs']),{'acquired':!![],'handle':_0x57274b,'current':_0x4891cb};}['inspect'](_0x19cc5c){const _0x5da01d=_0x45513d;try{return this[_0x5da01d(0x2fd)]()[_0x5da01d(0x5e0)](this[_0x5da01d(0x647)](_0x19cc5c))??null;}catch{return null;}}[_0x45513d(0x772)](){const _0x1f719f=_0x45513d,_0x41d0dd=this['namespace']+':',_0x485660=[];try{for(const {key:_0x3b35b3,value:_0x454b80}of this[_0x1f719f(0x2fd)]()[_0x1f719f(0x433)]({'start':_0x41d0dd,'end':_0x41d0dd+'\xff'})){typeof _0x3b35b3===_0x1f719f(0x54f)&&_0x3b35b3[_0x1f719f(0x72d)](_0x41d0dd)&&_0x485660[_0x1f719f(0x494)]({'id':_0x3b35b3[_0x1f719f(0x7a7)](_0x41d0dd[_0x1f719f(0x1b1)]),'entry':_0x454b80});}}catch{}return _0x485660;}static['listAll'](_0x381b69){const _0x4a4edc=_0x45513d,_0x4f0df5=[];try{const _0x1fbfc1=_0x381b69[_0x4a4edc(0x748)](_0x52dece,{'dupSort':![]});for(const {key:_0xadbb9a,value:_0x18d861}of _0x1fbfc1[_0x4a4edc(0x433)]({})){if(typeof _0xadbb9a!==_0x4a4edc(0x54f))continue;const _0x3a2d90=_0xadbb9a['indexOf'](':');if(_0x3a2d90<0x1)continue;_0x4f0df5[_0x4a4edc(0x494)]({'namespace':_0xadbb9a[_0x4a4edc(0x7a7)](0x0,_0x3a2d90),'id':_0xadbb9a[_0x4a4edc(0x7a7)](_0x3a2d90+0x1),'entry':_0x18d861});}}catch{}return _0x4f0df5;}}return okdbLock={'OKDBLock':_0x2c8c68},okdbLock;}var okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x56c6d7=_0x5411c3;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x48a730=require$$0,_0x17d07e=require$$1$2,_0x403477=require$$2,{LOOP:_0x5b89aa}=requireOkdbLoopMonitor(),{OKDBLock:_0x200f4c}=requireOkdbLock(),{SYNC_COMMITS:_0x4c34c9}=requireOkdbWriter(),_0x5b8670='~processes',_0x11e5a7=_0x56c6d7(0x4b5),_0x66c40d=_0x56c6d7(0x55f),_0x147395=_0x56c6d7(0x4ed),_0x1e284e=(_0x151e5e,_0xbda989)=>_0x151e5e+':'+_0xbda989,_0x20c1e7=(_0x355c64,_0x57fd99)=>_0x355c64+'::'+_0x57fd99,_0x32fd5b=(_0x2deeb4,_0x5cd3d7)=>_0x2deeb4+'/'+_0x5cd3d7,_0x33c90c=(_0x5963c0,_0x4b20b1)=>_0x5963c0+'#'+_0x4b20b1,_0x4b8e71=_0x53ad38=>{const _0x2d466a=_0x56c6d7;if(_0x53ad38?.['processKey'])return _0x53ad38[_0x2d466a(0x51a)];const _0x157806=_0x53ad38?.[_0x2d466a(0x2e1)];return typeof _0x157806==='string'&&_0x157806[_0x2d466a(0x70f)]('#')?_0x157806['slice'](0x0,_0x157806[_0x2d466a(0x2db)]('#')):_0x157806;},_0x46f492=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x9fad60=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x4a1334=_0x46f492*0x3,_0xedac51=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math['max'](0x927c0,_0x4a1334*0x14),_0x5c550e=[_0x56c6d7(0x767),_0x56c6d7(0x3c9),_0x56c6d7(0x752),'processor:error',_0x56c6d7(0x3f6),_0x56c6d7(0x665)];let _0x9d12b7=null;function _0x284ea1(){const _0x5cb897=_0x56c6d7;if(_0x9d12b7==null)_0x9d12b7=Math['round']((Date[_0x5cb897(0x6a7)]()-process[_0x5cb897(0x6db)]()*0x3e8)/0x3e8)*0x3e8;return _0x9d12b7;}function _0x4cd821(_0x5688fc){const _0x224db6=_0x56c6d7;if(process.env.OKDB_PROCESS_KILL===_0x224db6(0x4ad))return![];if(_0x5688fc?.[_0x224db6(0x76b)]?.[_0x224db6(0x683)]&&typeof _0x5688fc['options'][_0x224db6(0x683)]===_0x224db6(0x336)&&_0x5688fc[_0x224db6(0x76b)][_0x224db6(0x683)][_0x224db6(0x4fc)]===![])return![];return!![];}function _0x5c03db(_0x37759e,_0x1d9e91){const _0x44fa15=_0x56c6d7,_0x4dfd5e=!!_0x1d9e91?.[_0x44fa15(0x1a4)];switch(_0x37759e){case _0x44fa15(0x5de):return{'controllable':_0x4dfd5e,'decommissionable':![],'killable':!![],'killConfirm':_0x44fa15(0x700)};case _0x44fa15(0x2b5):case _0x44fa15(0x29f):return{'controllable':_0x4dfd5e,'decommissionable':![],'killable':!![],'killConfirm':_0x44fa15(0x271)};case'embedded':return{'controllable':![],'decommissionable':![],'killable':![]};case _0x44fa15(0x42e):case _0x44fa15(0x284):case _0x44fa15(0x1ee):case'worker':return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':_0x44fa15(0x50c)};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x46bb1d{constructor(_0x2d8071){const _0x2677c2=_0x56c6d7;this['okdb']=_0x2d8071,this['_statusEnv']=null,this[_0x2677c2(0x1cc)]=null,this['_desiredOverlay']=new Map(),this[_0x2677c2(0x7a2)]=null,this[_0x2677c2(0x72b)]=![],this['_isReader']=![],this['_processStartedAt']=_0x284ea1(),this[_0x2677c2(0x668)]=_0x1e284e(process[_0x2677c2(0x690)],this[_0x2677c2(0x526)]),this[_0x2677c2(0x199)]=_0x403477[_0x2677c2(0x20a)]()[_0x2677c2(0x7a7)](0x0,0x8),this[_0x2677c2(0x47d)]=_0x33c90c(this[_0x2677c2(0x668)],this[_0x2677c2(0x199)]),this['_startedAt']=Date[_0x2677c2(0x6a7)](),this['_kind']=null,this[_0x2677c2(0x27a)]=null,this['_listenAddr']=null,this['_hbTimer']=null,this[_0x2677c2(0x326)]=null,this[_0x2677c2(0x5a0)]=null,this['_lastPublishAt']=0x0,this[_0x2677c2(0x4c7)]={},this[_0x2677c2(0x1d4)]=new Map(),this[_0x2677c2(0x67f)]=process[_0x2677c2(0x560)](),this[_0x2677c2(0x659)]=Date[_0x2677c2(0x6a7)](),this[_0x2677c2(0x489)]=0x0,this['_threadStats']=new Map();}get[_0x56c6d7(0x75d)](){const _0x38b411=_0x56c6d7;return this[_0x38b411(0x668)];}get[_0x56c6d7(0x5df)](){const _0x51bec0=_0x56c6d7;return this[_0x51bec0(0x47d)];}[_0x56c6d7(0x569)](_0xfe31b4,_0x3b86c7){const _0x57a8ed=_0x56c6d7,_0x215b7e=_0x5c03db(_0xfe31b4,_0x3b86c7);if(_0x215b7e[_0x57a8ed(0x6f9)]&&!_0x4cd821(this['okdb']))return{..._0x215b7e,'killable':![],'killConfirm':undefined};return _0x215b7e;}[_0x56c6d7(0x27e)](){const _0x4cb2b1=_0x56c6d7;return!!this[_0x4cb2b1(0x4e9)];}[_0x56c6d7(0x49f)](_0x460b4d){const _0x18e642=_0x56c6d7;Object['assign'](this[_0x18e642(0x4c7)],_0x460b4d||{});}[_0x56c6d7(0x32c)](_0x55b130){const _0xa30b5d=_0x56c6d7;if(_0x55b130)this[_0xa30b5d(0x4ab)]=_0x55b130;}[_0x56c6d7(0x18e)](_0x31b29e={}){const _0x4614a7=_0x56c6d7;return this[_0x4614a7(0x3ea)][_0x4614a7(0x308)](_0x31b29e);}[_0x56c6d7(0x1b0)](){const _0x3ae2d0=_0x56c6d7,_0x3ac374={};let _0x2118bf=0x0,_0x182b81=0x0;const _0x51faa6=new Set();for(const _0x1fc08f of this[_0x3ae2d0(0x606)]()){_0x182b81++;const _0x120b66=_0x1fc08f[_0x3ae2d0(0x304)];if(!_0x120b66)continue;if(_0x120b66[_0x3ae2d0(0x5e3)])_0x2118bf++;for(const _0x19c6bf of _0x120b66[_0x3ae2d0(0x1a4)]||[]){if(![_0x3ae2d0(0x4a3),'fanout'][_0x3ae2d0(0x70f)](_0x19c6bf[_0x3ae2d0(0x274)]))continue;(_0x19c6bf[_0x3ae2d0(0x4c4)]===_0x3ae2d0(0x372)||_0x19c6bf[_0x3ae2d0(0x4c4)]===_0x3ae2d0(0x64f))&&_0x19c6bf['cursorKey']&&_0x51faa6[_0x3ae2d0(0x41a)]((_0x19c6bf[_0x3ae2d0(0x1a1)]||_0x3ae2d0(0x45b))+':'+_0x19c6bf['cursorKey']);const _0x581e77=_0x19c6bf['env']||_0x3ae2d0(0x45b);(_0x3ac374[_0x581e77]||=[])['push']({..._0x19c6bf,'env':_0x581e77,'owner':{'pid':_0x1fc08f[_0x3ae2d0(0x690)]??null,'kind':_0x1fc08f['kind']??null}});}}for(const [_0x40e8b8,_0x219c68]of Object[_0x3ae2d0(0x352)](_0x3ac374)){for(const _0x270fd7 of _0x219c68){if(_0x270fd7[_0x3ae2d0(0x274)]===_0x3ae2d0(0x4a3)&&!_0x270fd7[_0x3ae2d0(0x2c8)]){const _0x4d9936=_0x40e8b8+':'+(_0x270fd7[_0x3ae2d0(0x582)]??'');if(!_0x51faa6[_0x3ae2d0(0x4e7)](_0x4d9936))_0x270fd7[_0x3ae2d0(0x2a7)]=!![];}}}return{'envs':_0x3ac374,'policy':null,'participation':{'participating':_0x2118bf,'total':_0x182b81},'source':_0x3ae2d0(0x4d1)};}[_0x56c6d7(0x5c0)](){const _0x284a24=_0x56c6d7,_0x5a7435=_0x38ff03=>{const _0x20caff=_0x5511;if(_0x38ff03[_0x20caff(0x4c4)]===_0x20caff(0x372)||_0x38ff03[_0x20caff(0x4c4)]==='building'||_0x38ff03[_0x20caff(0x4c4)]===_0x20caff(0x3ba))return 0x3;if(_0x38ff03['claimGated'])return 0x1;return 0x2;},_0x25d21b=new Map();for(const _0x467aa8 of this[_0x284a24(0x606)]()){for(const _0x242be3 of _0x467aa8[_0x284a24(0x304)]?.['processors']||[]){const _0x546e33={..._0x242be3,'owner':{'pid':_0x467aa8[_0x284a24(0x690)]??null,'kind':_0x467aa8['kind']??null,'host':_0x467aa8['host']??null}},_0x35e08b=_0x242be3['mode']===_0x284a24(0x4a3)?_0x284a24(0x26e)+(_0x242be3['env']??'')+'::'+(_0x242be3['cursorKey']??_0x242be3[_0x284a24(0x737)]??_0x242be3['id']):'inst:'+(_0x467aa8['nodeKey']??_0x467aa8[_0x284a24(0x51a)]??'')+'::'+(_0x242be3['env']??'')+'::'+_0x242be3['id'],_0x3860da=_0x25d21b[_0x284a24(0x5e0)](_0x35e08b);if(!_0x3860da||_0x5a7435(_0x546e33)>_0x5a7435(_0x3860da))_0x25d21b[_0x284a24(0x238)](_0x35e08b,_0x546e33);}}return[..._0x25d21b[_0x284a24(0x637)]()];}['clusterStatusView'](){const _0x42ae37=_0x56c6d7,_0x1b6a04=Date[_0x42ae37(0x6a7)](),_0x19c2d1=this[_0x42ae37(0x606)](),_0x2df2aa=_0x11483a=>Math[_0x42ae37(0x46c)](0x0,Math[_0x42ae37(0x40d)]((_0x1b6a04-(_0x11483a['startedAt']||_0x1b6a04))/0x3e8)),_0x1c766a=_0x19c2d1[_0x42ae37(0x4d9)](_0x1cf9e2=>_0x1cf9e2[_0x42ae37(0x3cb)]===_0x42ae37(0x5de)),_0x3df62d=_0x19c2d1[_0x42ae37(0x3fb)](_0x192920=>_0x192920[_0x42ae37(0x3cb)]===_0x42ae37(0x42e));if(_0x1c766a||_0x3df62d[_0x42ae37(0x1b1)])return{'primary':_0x1c766a?{'pid':_0x1c766a[_0x42ae37(0x690)],'uptime':_0x2df2aa(_0x1c766a)}:null,'workers':_0x3df62d['map'](_0x43e17d=>({'pid':_0x43e17d[_0x42ae37(0x690)],'uptime':_0x2df2aa(_0x43e17d)})),'workersConfigured':_0x1c766a?.['meta']?.['workersConfigured']??_0x3df62d[_0x42ae37(0x1b1)],'mode':_0x42ae37(0x543)};const _0x498830=_0x19c2d1['find'](_0x2baff7=>_0x2baff7[_0x42ae37(0x3cb)]===_0x42ae37(0x2b5)||_0x2baff7[_0x42ae37(0x3cb)]==='standalone'||_0x2baff7[_0x42ae37(0x3cb)]===_0x42ae37(0x3ac)),_0x19d63e=_0x498830?{'pid':_0x498830[_0x42ae37(0x690)],'uptime':_0x2df2aa(_0x498830)}:{'pid':process['pid'],'uptime':Math[_0x42ae37(0x46c)](0x0,Math['round'](process['uptime']()))};return{'primary':_0x19d63e,'workers':[_0x19d63e],'workersConfigured':0x1,'mode':_0x42ae37(0x4a3)};}[_0x56c6d7(0x2cf)](){const _0x1cf497=_0x56c6d7;return this[_0x1cf497(0x5d8)]();}['treeView'](){const _0x12688f=_0x56c6d7,_0x1bfa02=new Map();for(const _0x3b35d5 of this[_0x12688f(0x5d8)]())_0x1bfa02['set'](_0x3b35d5[_0x12688f(0x51a)],{..._0x3b35d5,'children':[]});const _0xa01079=[];for(const _0x448299 of _0x1bfa02['values']()){const _0x365bed=_0x448299[_0x12688f(0x53b)]?_0x1bfa02[_0x12688f(0x5e0)](_0x448299['supervisorKey']):null;if(_0x365bed&&_0x365bed!==_0x448299)_0x365bed[_0x12688f(0x6d2)][_0x12688f(0x494)](_0x448299);else _0xa01079['push'](_0x448299);}const _0x337f51=(_0x2ebc1c,_0x5944d1)=>_0x2ebc1c[_0x12688f(0x3cb)]===_0x5944d1[_0x12688f(0x3cb)]?(_0x2ebc1c['pid']||0x0)-(_0x5944d1['pid']||0x0):(_0x2ebc1c[_0x12688f(0x3cb)]??'')<(_0x5944d1[_0x12688f(0x3cb)]??'')?-0x1:0x1,_0x4cc78d=_0x4fa917=>{const _0x3ee41e=_0x12688f;_0x4fa917[_0x3ee41e(0x4ba)](_0x337f51);for(const _0x3607fb of _0x4fa917)if(_0x3607fb[_0x3ee41e(0x6d2)][_0x3ee41e(0x1b1)])_0x4cc78d(_0x3607fb['children']);};return _0x4cc78d(_0xa01079),_0xa01079;}[_0x56c6d7(0x415)](_0x1d91ba){const _0xf0de54=_0x56c6d7;return this[_0xf0de54(0x5d8)]()[_0xf0de54(0x4d9)](_0x81a7d3=>_0x81a7d3[_0xf0de54(0x51a)]===_0x1d91ba)??null;}[_0x56c6d7(0x5d8)](_0x31e079=Date[_0x56c6d7(0x6a7)]()){const _0x602df3=_0x56c6d7,_0x5f32cd=new Map();for(const _0x51c99a of this['listNodes']()){const _0x2a387f=_0x4b8e71(_0x51c99a);let _0x1f940a=_0x5f32cd[_0x602df3(0x5e0)](_0x2a387f);!_0x1f940a&&(_0x1f940a={'processKey':_0x2a387f,'nodeKey':_0x2a387f,'pid':_0x51c99a[_0x602df3(0x690)],'ppid':_0x51c99a[_0x602df3(0x2ed)]??null,'host':_0x51c99a[_0x602df3(0x2d6)]??null,'kind':_0x51c99a[_0x602df3(0x3cb)],'role':null,'supervisorKey':_0x51c99a[_0x602df3(0x53b)]??null,'slot':_0x51c99a[_0x602df3(0x5ce)]??null,'slotKey':_0x51c99a[_0x602df3(0x678)]??null,'caps':_0x51c99a['caps']??null,'lifecycle':_0x51c99a[_0x602df3(0x63a)]??null,'uptime':Math[_0x602df3(0x46c)](0x0,Math[_0x602df3(0x40d)]((_0x31e079-(_0x51c99a[_0x602df3(0x314)]||_0x31e079))/0x3e8)),'startedAt':_0x51c99a['startedAt']??null,'meta':_0x51c99a[_0x602df3(0x2e5)]??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x5f32cd[_0x602df3(0x238)](_0x2a387f,_0x1f940a));_0x1f940a[_0x602df3(0x1bf)][_0x602df3(0x494)]({'instanceId':_0x51c99a[_0x602df3(0x377)]??null,'role':_0x51c99a[_0x602df3(0x222)]??null,'listenAddr':_0x51c99a['listenAddr']??null,'lifecycle':_0x51c99a[_0x602df3(0x63a)]??null,'processing':_0x51c99a['processing']??null});if(!_0x1f940a[_0x602df3(0x222)]&&_0x51c99a[_0x602df3(0x222)])_0x1f940a[_0x602df3(0x222)]=_0x51c99a[_0x602df3(0x222)];if(!_0x1f940a[_0x602df3(0x41b)]&&_0x51c99a[_0x602df3(0x41b)])_0x1f940a[_0x602df3(0x41b)]=_0x51c99a[_0x602df3(0x41b)];if(!_0x1f940a[_0x602df3(0x304)]&&_0x51c99a[_0x602df3(0x304)])_0x1f940a[_0x602df3(0x304)]=_0x51c99a['processing'];if(!_0x1f940a[_0x602df3(0x5bf)]&&_0x51c99a[_0x602df3(0x5bf)])_0x1f940a[_0x602df3(0x5bf)]=_0x51c99a[_0x602df3(0x5bf)];if(!_0x1f940a[_0x602df3(0x70a)]&&_0x51c99a[_0x602df3(0x70a)])_0x1f940a[_0x602df3(0x70a)]=_0x51c99a['singletonClaims'];if(_0x1f940a[_0x602df3(0x56e)]==null&&_0x51c99a[_0x602df3(0x56e)])_0x1f940a[_0x602df3(0x56e)]=_0x51c99a['caps'];if(_0x51c99a[_0x602df3(0x55e)]&&(!_0x1f940a[_0x602df3(0x55e)]||(_0x51c99a[_0x602df3(0x55e)]['at']??0x0)>(_0x1f940a[_0x602df3(0x55e)]['at']??0x0)))_0x1f940a[_0x602df3(0x55e)]=_0x51c99a[_0x602df3(0x55e)];}return[..._0x5f32cd['values']()];}[_0x56c6d7(0x6f2)](){const _0x4c6c2d=_0x56c6d7,_0x11d2a0=[],_0x5b7e02={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0x2f81fe of this[_0x4c6c2d(0x5d8)]()){_0x11d2a0[_0x4c6c2d(0x494)]({'processKey':_0x2f81fe[_0x4c6c2d(0x51a)],'kind':_0x2f81fe[_0x4c6c2d(0x3cb)],'pid':_0x2f81fe[_0x4c6c2d(0x690)],'supervisorKey':_0x2f81fe[_0x4c6c2d(0x53b)],'meta':_0x2f81fe[_0x4c6c2d(0x2e5)]??null,'uptime':_0x2f81fe[_0x4c6c2d(0x6db)],'stats':_0x2f81fe[_0x4c6c2d(0x55e)]??null}),_0x5b7e02[_0x4c6c2d(0x683)]++;if(_0x2f81fe['stats']){_0x5b7e02[_0x4c6c2d(0x2d3)]+=_0x2f81fe['stats'][_0x4c6c2d(0x2d3)]||0x0,_0x5b7e02[_0x4c6c2d(0x262)]+=(_0x2f81fe[_0x4c6c2d(0x55e)][_0x4c6c2d(0x262)]||0x0)+(_0x2f81fe[_0x4c6c2d(0x55e)][_0x4c6c2d(0x451)]?.['heapUsed']||0x0);const _0x8ef75c=_0x2f81fe[_0x4c6c2d(0x55e)][_0x4c6c2d(0x451)];_0x8ef75c&&(_0x5b7e02[_0x4c6c2d(0x451)][_0x4c6c2d(0x1df)]+=_0x8ef75c[_0x4c6c2d(0x1df)]||0x0,_0x5b7e02[_0x4c6c2d(0x451)][_0x4c6c2d(0x2d8)]+=_0x8ef75c[_0x4c6c2d(0x2d8)]||0x0,_0x5b7e02[_0x4c6c2d(0x451)][_0x4c6c2d(0x34a)]+=_0x8ef75c['busy']||0x0);}}return{'totals':_0x5b7e02,'nodes':_0x11d2a0};}async[_0x56c6d7(0x6ef)]({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x15b23c=_0x56c6d7;this['_isWriter']=this[_0x15b23c(0x72b)]||!!writer,this[_0x15b23c(0x472)]=this['_isReader']||!!reader,this['_kind']=kind||this[_0x15b23c(0x4ac)]||(_0x17d07e[_0x15b23c(0x4cb)]?'http-server':_0x15b23c(0x2b5)),this[_0x15b23c(0x27a)]=supervisorKey??this[_0x15b23c(0x27a)],this[_0x15b23c(0x4ab)]=listenAddr??this[_0x15b23c(0x4ab)],this[_0x15b23c(0x2b9)](),await this[_0x15b23c(0x65c)]();if(!writer&&!reader)return null;if(!this['_statusEnv']){const _0x108856=await this['okdb'][_0x15b23c(0x77e)](_0x5b8670,{'sync':![],'durability':_0x15b23c(0x1bc)});await _0x108856['ensureType'](_0x11e5a7),this['_statusEnv']=_0x108856;}return this[_0x15b23c(0x4e9)];}[_0x56c6d7(0x358)](){const _0x4098e3=_0x56c6d7;return this[_0x4098e3(0x3d3)]!==this['_statusEnv']&&(this[_0x4098e3(0x3d3)]=this['_statusEnv'],this[_0x4098e3(0x641)]=this[_0x4098e3(0x4e9)][_0x4098e3(0x63b)](_0x11e5a7)[_0x4098e3(0x268)]),this[_0x4098e3(0x641)];}['_putRowAsync'](_0x3db7b5){const _0x239661=_0x56c6d7;if(_0x4c34c9)return this[_0x239661(0x358)]()['putSync'](_0x3db7b5[_0x239661(0x2e1)],_0x3db7b5,0x1);const _0x4c319d=this['_nodeDb']()['put'](_0x3db7b5[_0x239661(0x2e1)],_0x3db7b5,0x1);if(_0x4c319d&&typeof _0x4c319d[_0x239661(0x1c9)]===_0x239661(0x76e))_0x4c319d[_0x239661(0x1c9)](undefined,()=>{});return _0x4c319d;}[_0x56c6d7(0x3f1)](_0xfdc8c3){const _0x106657=_0x56c6d7;return this[_0x106657(0x358)]()['putSync'](_0xfdc8c3['nodeKey'],_0xfdc8c3,0x1);}['_removeRowAsync'](_0x137294){const _0x54861c=_0x56c6d7;if(_0x4c34c9)try{return this['_nodeDb']()[_0x54861c(0x5b4)](_0x137294);}catch{return![];}const _0x32b908=this[_0x54861c(0x358)]()[_0x54861c(0x43f)](_0x137294);if(_0x32b908&&typeof _0x32b908[_0x54861c(0x1c9)]===_0x54861c(0x76e))_0x32b908[_0x54861c(0x1c9)](undefined,()=>{});return _0x32b908;}async[_0x56c6d7(0x6ab)](_0x1477aa){const _0x56c6bb=_0x56c6d7;if(!this[_0x56c6bb(0x4e9)]||!this[_0x56c6bb(0x72b)]||!_0x1477aa?.['nodeKey'])return;return this[_0x56c6bb(0x365)](_0x1477aa);}async['removeNode'](_0x59fe9d){const _0x3ba18f=_0x56c6d7;if(!this[_0x3ba18f(0x4e9)]||!this[_0x3ba18f(0x72b)]||!_0x59fe9d)return;const _0x26915a=_0x59fe9d[_0x3ba18f(0x70f)]('#'),_0x13254f=[];for(const {key:_0x494832}of this[_0x3ba18f(0x4e9)][_0x3ba18f(0x433)](_0x11e5a7)){if(_0x494832===_0x59fe9d||!_0x26915a&&typeof _0x494832===_0x3ba18f(0x54f)&&_0x494832['startsWith'](_0x59fe9d+'#'))_0x13254f[_0x3ba18f(0x494)](_0x494832);}for(const _0x20fb7e of _0x13254f){try{this[_0x3ba18f(0x358)]()['removeSync'](_0x20fb7e);}catch{}}}[_0x56c6d7(0x631)](_0x3b3c5f){const _0x5ea04b=_0x56c6d7;if(typeof _0x3b3c5f?.[_0x5ea04b(0x690)]!==_0x5ea04b(0x758))return![];if(_0x3b3c5f[_0x5ea04b(0x2d6)]!==_0x48a730['hostname']())return![];if(_0x3b3c5f[_0x5ea04b(0x690)]===process[_0x5ea04b(0x690)])return![];if(_0x3b3c5f[_0x5ea04b(0x337)]!=null&&_0x3b3c5f[_0x5ea04b(0x337)]<Date[_0x5ea04b(0x6a7)]()-_0xedac51)return!![];try{return process['kill'](_0x3b3c5f[_0x5ea04b(0x690)],0x0),![];}catch(_0x32c080){return _0x32c080['code']===_0x5ea04b(0x25a);}}[_0x56c6d7(0x606)](){const _0x460845=_0x56c6d7;if(!this['_statusEnv'])return[];try{this[_0x460845(0x4e9)]['db']?.[_0x460845(0x1e1)]?.();}catch{}const _0x2d5a9c=Date[_0x460845(0x6a7)](),_0x4e8860=_0x48a730['hostname'](),_0x4756cc=[];for(const {value:_0x48dc4a}of this[_0x460845(0x4e9)][_0x460845(0x433)](_0x11e5a7)){if(!_0x48dc4a)continue;let _0x3c56a6=null;_0x48dc4a[_0x460845(0x2d6)]===_0x4e8860&&typeof _0x48dc4a[_0x460845(0x690)]==='number'&&(_0x3c56a6=!this[_0x460845(0x631)](_0x48dc4a));if(_0x3c56a6===![])continue;const _0x3cb135=_0x48dc4a['expiresAt']==null||_0x48dc4a[_0x460845(0x337)]>=_0x2d5a9c;if(_0x3c56a6===!![]||_0x3cb135)_0x4756cc['push'](_0x48dc4a);}return _0x4756cc;}async[_0x56c6d7(0x6ce)](_0xa72859=0x0){const _0x5f4cc=_0x56c6d7;if(!this[_0x5f4cc(0x4e9)]||!this[_0x5f4cc(0x72b)])return;const _0x5346a8=Date[_0x5f4cc(0x6a7)]()-_0xa72859,_0xd56b6f=new Set(),_0x1ffc18=[],_0x1cb933=_0x48a730['hostname'](),_0x4eb2b2=require$$3['version'];for(const {key:_0x155143,value:_0x46b239}of this['_statusEnv']['getRange'](_0x11e5a7)){if(!_0x46b239)continue;const _0x5ca093=_0x46b239[_0x5f4cc(0x2d6)]===_0x1cb933&&typeof _0x46b239[_0x5f4cc(0x690)]===_0x5f4cc(0x758),_0x64977a=_0x5ca093?this[_0x5f4cc(0x631)](_0x46b239):_0x46b239[_0x5f4cc(0x337)]!=null&&_0x46b239[_0x5f4cc(0x337)]<_0x5346a8;if(_0x64977a)_0x1ffc18[_0x5f4cc(0x494)](_0x155143);else{_0xd56b6f['add'](_0x4b8e71(_0x46b239)??_0x155143);if(_0x46b239['version']&&_0x46b239[_0x5f4cc(0x214)]!==_0x4eb2b2){if(!this[_0x5f4cc(0x18f)])this[_0x5f4cc(0x18f)]=new Set();!this[_0x5f4cc(0x18f)][_0x5f4cc(0x4e7)](_0x46b239['version'])&&(this['_versionSkewWarned']['add'](_0x46b239[_0x5f4cc(0x214)]),this[_0x5f4cc(0x3ea)][_0x5f4cc(0x547)]?.[_0x5f4cc(0x305)]?.(_0x5f4cc(0x701)+(_0x46b239[_0x5f4cc(0x690)]??'?')+_0x5f4cc(0x798)+_0x46b239[_0x5f4cc(0x214)]+'\x20while\x20this\x20process\x20runs\x20'+_0x4eb2b2+_0x5f4cc(0x43e)+'mixed\x20versions\x20on\x20one\x20store\x20are\x20unsafe\x20across\x20storage\x20migrations;\x20align\x20versions\x20before\x20upgrading\x20further.',{'feature':_0x5f4cc(0x2af)}));}}}for(const _0x84d5b of _0x1ffc18)this[_0x5f4cc(0x29a)](_0x84d5b);if(this[_0x5f4cc(0x2b9)]()){const _0x559885=[];for(const {key:_0x181447}of this[_0x5f4cc(0x621)](_0x5f4cc(0x4b5))){if(!_0xd56b6f[_0x5f4cc(0x4e7)](_0x181447)){if(_0x4c34c9)try{this[_0x5f4cc(0x1cc)]['removeSync'](_0x5f4cc(0x587)+_0x181447);}catch{}else _0x559885[_0x5f4cc(0x494)](this['_desired'][_0x5f4cc(0x43f)]('node/'+_0x181447));}}if(_0x559885[_0x5f4cc(0x1b1)])await Promise[_0x5f4cc(0x757)](_0x559885);}}['startHeartbeat'](_0x48028b=null){const _0x938c5c=_0x56c6d7;if(this[_0x938c5c(0x4f0)])return;if(!this['_isWriter']||!this[_0x938c5c(0x4e9)]){this['okdb']?.[_0x938c5c(0x547)]?.[_0x938c5c(0x305)]?.(_0x938c5c(0x770)+this[_0x938c5c(0x72b)]+_0x938c5c(0x720)+!!this[_0x938c5c(0x4e9)]+_0x938c5c(0x604),{'feature':_0x938c5c(0x683)});return;}this[_0x938c5c(0x5a0)]=_0x48028b,this[_0x938c5c(0x326)]=()=>this[_0x938c5c(0x21a)]();for(const _0x106a59 of _0x5c550e)this['okdb'][_0x938c5c(0x2b0)]['on'](_0x106a59,this[_0x938c5c(0x326)]);this[_0x938c5c(0x59f)]();const _0x15df8e=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x46f492;this[_0x938c5c(0x4f0)]=setInterval(()=>{const _0x10f234=_0x938c5c;if(this[_0x10f234(0x5a0)])try{this[_0x10f234(0x5a0)]();}catch{}this[_0x10f234(0x59f)](),this[_0x10f234(0x6ce)]()[_0x10f234(0x58b)](()=>{});},_0x15df8e);if(this[_0x938c5c(0x4f0)][_0x938c5c(0x6d1)])this[_0x938c5c(0x4f0)]['unref']();}[_0x56c6d7(0x21a)](){const _0x215bc1=_0x56c6d7;if(!this[_0x215bc1(0x72b)]||!this[_0x215bc1(0x4e9)])return;if(Date[_0x215bc1(0x6a7)]()-this[_0x215bc1(0x220)]<_0x9fad60)return;this[_0x215bc1(0x59f)]();}[_0x56c6d7(0x59f)](){const _0x1911dc=_0x56c6d7;if(!this[_0x1911dc(0x72b)]||!this['_statusEnv'])return;this[_0x1911dc(0x220)]=Date[_0x1911dc(0x6a7)]();try{const _0x4dd5d4=[this[_0x1911dc(0x28d)]()];for(const _0x474e19 of this['_children']['values']())_0x4dd5d4[_0x1911dc(0x494)](this[_0x1911dc(0x296)](_0x474e19));const _0x43dbcc=_0x5b89aa[_0x1911dc(0x344)]?_0x5b89aa[_0x1911dc(0x6a7)]():0x0;for(const _0x1e7717 of _0x4dd5d4){try{this['_putRowSync'](_0x1e7717),this[_0x1911dc(0x49b)]=![];}catch(_0x4b4fbc){!this[_0x1911dc(0x49b)]&&(this['_publishFailWarned']=!![],this['okdb']?.[_0x1911dc(0x547)]?.[_0x1911dc(0x305)]?.(_0x1911dc(0x2c0)+_0x4b4fbc[_0x1911dc(0x246)],{'feature':_0x1911dc(0x683)}));}}if(_0x5b89aa[_0x1911dc(0x344)])_0x5b89aa[_0x1911dc(0x1cb)]('registry-publish',_0x5b89aa['now']()-_0x43dbcc,'rows='+_0x4dd5d4[_0x1911dc(0x1b1)]+_0x1911dc(0x20d));}catch(_0x323c67){!this[_0x1911dc(0x49b)]&&(this['_publishFailWarned']=!![],this[_0x1911dc(0x3ea)]?.[_0x1911dc(0x547)]?.['warn']?.(_0x1911dc(0x2c0)+_0x323c67[_0x1911dc(0x246)],{'feature':_0x1911dc(0x683)}));}}async[_0x56c6d7(0x5c4)](){const _0x153ab1=_0x56c6d7;if(this[_0x153ab1(0x326)]){for(const _0x25a60d of _0x5c550e){try{this['okdb']['events']['off'](_0x25a60d,this['_onProcEvent']);}catch{}}this[_0x153ab1(0x326)]=null;}this[_0x153ab1(0x4f0)]&&(clearInterval(this[_0x153ab1(0x4f0)]),this[_0x153ab1(0x4f0)]=null);try{if(this[_0x153ab1(0x4e9)]&&this[_0x153ab1(0x72b)])await this['removeNode'](this['_rowKey']);}catch{}}async['deregisterSelf'](){const _0x170598=_0x56c6d7;if(!this[_0x170598(0x4e9)]||!this['_isWriter'])return;try{await this[_0x170598(0x649)](this[_0x170598(0x47d)]);}catch{}try{const _0x53e49e=[];for(const {value:_0x518efd}of this[_0x170598(0x4e9)][_0x170598(0x433)](_0x11e5a7)){if(_0x518efd?.[_0x170598(0x2ed)]===process[_0x170598(0x690)]&&_0x518efd[_0x170598(0x2e1)])_0x53e49e[_0x170598(0x494)](_0x518efd[_0x170598(0x2e1)]);}for(const _0xb03255 of _0x53e49e){try{await this['removeNode'](_0xb03255);}catch{}}}catch{}}async['publishOwnRow'](){const _0x709276=_0x56c6d7;return this[_0x709276(0x6ab)](this[_0x709276(0x28d)]());}async['publishChildRow'](_0x4aab8b){const _0x4d3c70=_0x56c6d7;if(!this[_0x4d3c70(0x4e9)]||!this[_0x4d3c70(0x72b)])return;return this['putNode'](this[_0x4d3c70(0x296)](_0x4aab8b));}['_buildChildRow']({pid:_0x141e2a,startedAt:_0x2acd06,kind:_0x326631,supervisorKey:_0x2dd928,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle='running',meta:meta=null,stats:stats=null}){const _0x4a850d=_0x56c6d7,_0x44ca4e=Date[_0x4a850d(0x6a7)](),_0x2319d7=_0x1e284e(_0x141e2a,_0x2acd06);return{'nodeKey':_0x33c90c(_0x2319d7,'0'),'processKey':_0x2319d7,'instanceId':'0','pid':_0x141e2a,'startedAt':_0x2acd06,'ppid':process[_0x4a850d(0x690)],'host':_0x48a730[_0x4a850d(0x394)](),'supervisorKey':_0x2dd928,'slot':slot,'slotKey':slotKey,'kind':_0x326631,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x44ca4e,'expiresAt':_0x44ca4e+_0x4a1334,'caps':this[_0x4a850d(0x569)](_0x326631,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0x56c6d7(0x5b8)](_0x2fbec7){const _0x563865=_0x56c6d7;if(!_0x2fbec7?.[_0x563865(0x690)])return null;const _0x455651=_0x1e284e(_0x2fbec7['pid'],_0x2fbec7[_0x563865(0x314)]);this['_children'][_0x563865(0x238)](_0x455651,{..._0x2fbec7,'supervisorKey':_0x2fbec7['supervisorKey']??this[_0x563865(0x668)]});if(this['_isWriter'])await this[_0x563865(0x478)](this[_0x563865(0x1d4)]['get'](_0x455651))[_0x563865(0x58b)]?.(()=>{});return _0x455651;}['removeSupervisedChild'](_0x4514ad){const _0x15f80b=_0x56c6d7;if(!_0x4514ad)return;return this['_children'][_0x15f80b(0x614)](_0x4514ad),this[_0x15f80b(0x649)](_0x4514ad);}['_sampleOwnStats'](){const _0x48f0d6=_0x56c6d7,_0x164668=Date['now'](),_0x1db6b1=process[_0x48f0d6(0x560)](),_0x20cd2f=(_0x164668-this['_lastCpuAt'])*0x3e8;if(_0x20cd2f>=0x3d090){const _0x245d0a=_0x1db6b1['user']-this[_0x48f0d6(0x67f)][_0x48f0d6(0x468)]+(_0x1db6b1['system']-this[_0x48f0d6(0x67f)][_0x48f0d6(0x256)]),_0x54ed4d=_0x48a730['cpus']()['length']||0x1;this[_0x48f0d6(0x489)]=Math[_0x48f0d6(0x4a8)](0x64,Math[_0x48f0d6(0x40d)](_0x245d0a/(_0x20cd2f*_0x54ed4d)*0x64)),this['_lastCpuWindowMs']=Math[_0x48f0d6(0x40d)](_0x20cd2f/0x3e8),this[_0x48f0d6(0x67f)]=_0x1db6b1,this['_lastCpuAt']=_0x164668;}const _0x1b4757=process['memoryUsage'](),_0x47b4d7=this[_0x48f0d6(0x1b5)][_0x48f0d6(0x50f)];let _0x50c3eb=0x0;if(_0x47b4d7>0x0){const _0x2a5bcb=[this[_0x48f0d6(0x3ea)],...this['okdb'][_0x48f0d6(0x221)]?.[_0x48f0d6(0x637)]?.()??[]];for(const _0x354c48 of _0x2a5bcb){const _0x51b90e=_0x354c48[_0x48f0d6(0x6d7)]?.[_0x48f0d6(0x3cf)];if(_0x51b90e)_0x50c3eb+=_0x51b90e[_0x48f0d6(0x78e)][_0x48f0d6(0x34a)];}}let _0x3f379b=null;const _0x3c33d1=_0x47b4d7;if(_0x3c33d1>0x0){let _0x33ea28=0x0;for(const _0x4c69dc of this['_threadStats'][_0x48f0d6(0x637)]())_0x33ea28+=_0x4c69dc[_0x48f0d6(0x262)]||0x0;_0x3f379b={'count':_0x3c33d1,'heapUsed':_0x33ea28,'sandbox':_0x47b4d7,'busy':_0x50c3eb};}return{'rss':_0x1b4757[_0x48f0d6(0x2d3)],'heapUsed':_0x1b4757[_0x48f0d6(0x262)],'heapTotal':_0x1b4757[_0x48f0d6(0x4ae)],'external':_0x1b4757[_0x48f0d6(0x50d)],'cpuPct':this[_0x48f0d6(0x489)],'cpuWindowMs':this[_0x48f0d6(0x785)]??null,'threads':_0x3f379b,'at':_0x164668};}[_0x56c6d7(0x36b)](_0x13d60f,_0xf00d44){const _0x5d889d=_0x56c6d7;if(!_0x13d60f||!_0xf00d44)return;this[_0x5d889d(0x1b5)][_0x5d889d(0x238)](_0x13d60f,_0xf00d44);}[_0x56c6d7(0x6d0)](_0x2b36b0){const _0x1f15a2=_0x56c6d7;this[_0x1f15a2(0x1b5)][_0x1f15a2(0x614)](_0x2b36b0);}[_0x56c6d7(0x2e7)](_0x49c0c4,_0x3c3b5f,_0xf23c0c=undefined){const _0x526c4a=_0x56c6d7,_0x423f7b=this[_0x526c4a(0x1d4)][_0x526c4a(0x5e0)](_0x49c0c4);if(!_0x423f7b||!_0x3c3b5f)return;if(_0xf23c0c!==undefined)_0x423f7b['processing']=_0xf23c0c;_0x423f7b[_0x526c4a(0x55e)]={'rss':_0x3c3b5f['rss']??null,'heapUsed':_0x3c3b5f[_0x526c4a(0x262)]??null,'heapTotal':_0x3c3b5f['heapTotal']??null,'external':_0x3c3b5f[_0x526c4a(0x50d)]??null,'cpuPct':_0x3c3b5f['cpuPct']??null,'cpuWindowMs':_0x3c3b5f[_0x526c4a(0x483)]??null,'threads':_0x3c3b5f[_0x526c4a(0x451)]??null,'claims':_0x3c3b5f[_0x526c4a(0x343)]??null,'envsOpen':_0x3c3b5f[_0x526c4a(0x225)]??null,'at':Date[_0x526c4a(0x6a7)]()};}['_buildOwnRow'](){const _0x1cf188=_0x56c6d7,_0x1e965a=Date[_0x1cf188(0x6a7)](),_0x287692=this['okdb'][_0x1cf188(0x1fb)]||{},_0x333608=this[_0x1cf188(0x4ac)]||_0x1cf188(0x2b5);return{'nodeKey':this[_0x1cf188(0x47d)],'processKey':this[_0x1cf188(0x668)],'instanceId':this[_0x1cf188(0x199)],'pid':process['pid'],'startedAt':this[_0x1cf188(0x526)],'instanceStartedAt':this[_0x1cf188(0x684)],'ppid':typeof process[_0x1cf188(0x2ed)]===_0x1cf188(0x758)?process[_0x1cf188(0x2ed)]:null,'host':_0x48a730[_0x1cf188(0x394)](),'supervisorKey':this['_supervisorKey']??null,'version':require$$3[_0x1cf188(0x214)],'kind':_0x333608,'role':{'engines':!!_0x287692[_0x1cf188(0x5bf)],'processors':!!_0x287692[_0x1cf188(0x1a4)],'compaction':_0x287692[_0x1cf188(0x37b)],'http':_0x287692[_0x1cf188(0x277)]},'listenAddr':this[_0x1cf188(0x4ab)]??null,'heartbeatAt':_0x1e965a,'expiresAt':_0x1e965a+_0x4a1334,'caps':this['_caps'](_0x333608,_0x287692),'lifecycle':{'state':'running','desiredVersionApplied':null},'meta':{...this[_0x1cf188(0x4c7)]},'processing':_0x287692[_0x1cf188(0x1a4)]?this[_0x1cf188(0x6dd)]():null,'engines':_0x287692['engines']?[...this['okdb']['_servingEngines']??[]]:null,'singletonClaims':this['_collectSingletonClaims'](),'stats':this[_0x1cf188(0x2e9)](),'writers':this[_0x1cf188(0x4d3)]()};}[_0x56c6d7(0x4d3)](){const _0x4e7d18=_0x56c6d7,_0x22cb5e={};try{for(const [_0x31ccf6,_0x259c5d]of this['okdb'][_0x4e7d18(0x221)]){try{const _0x1c5aa5=_0x259c5d['writerStatus']?.();if(!_0x1c5aa5)continue;if(!_0x1c5aa5[_0x4e7d18(0x440)]&&!_0x1c5aa5[_0x4e7d18(0x327)]&&!(_0x1c5aa5[_0x4e7d18(0x31c)]??0x0)&&!_0x1c5aa5[_0x4e7d18(0x18b)])continue;_0x22cb5e[_0x31ccf6]={'depth':_0x1c5aa5[_0x4e7d18(0x440)],'oldestPendingMs':_0x1c5aa5[_0x4e7d18(0x402)],'committed':_0x1c5aa5[_0x4e7d18(0x327)],'commitsPerSec':_0x1c5aa5[_0x4e7d18(0x69f)],'commitP99Ms':_0x1c5aa5[_0x4e7d18(0x3f5)],'parkedNow':_0x1c5aa5[_0x4e7d18(0x31c)]??0x0,'draining':!!_0x1c5aa5[_0x4e7d18(0x18b)]};}catch{}}}catch{}return Object[_0x4e7d18(0x35c)](_0x22cb5e)[_0x4e7d18(0x1b1)]?_0x22cb5e:null;}[_0x56c6d7(0x6c6)](){const _0x56b151=_0x56c6d7,_0x1462db=process['pid'],_0x233d4b=Date[_0x56b151(0x6a7)](),_0x29d95a=_0x26272d=>{const _0x58fecc=_0x56b151;if(!_0x26272d)return[];const _0x54bc06=[];try{for(const {id:_0xda0317,entry:_0x4a0b77}of _0x26272d[_0x58fecc(0x772)]()){if(_0x4a0b77?.['holder']?.['pid']!==_0x1462db)continue;const _0x1c5e7d=_0x4a0b77[_0x58fecc(0x1b8)]??_0x4a0b77[_0x58fecc(0x40f)]??0x0;if(_0x1c5e7d+(_0x4a0b77['ttlMs']??0x0)<_0x233d4b)continue;_0x54bc06['push'](_0xda0317);}}catch{}return _0x54bc06;},_0x3b2db5=_0x29d95a(this[_0x56b151(0x424)]('compact')),_0x1b5670=_0x29d95a(this[_0x56b151(0x424)](_0x56b151(0x45e)));if(!_0x3b2db5[_0x56b151(0x1b1)]&&!_0x1b5670[_0x56b151(0x1b1)])return null;return{'compact':_0x3b2db5,'replicate':_0x1b5670};}['_singletonLock'](_0x3aacb2){const _0x547285=_0x56c6d7;if(!this[_0x547285(0x3ea)]?.[_0x547285(0x442)])return null;if(!this[_0x547285(0x4ec)])this[_0x547285(0x4ec)]=new Map();let _0x17696a=this[_0x547285(0x4ec)][_0x547285(0x5e0)](_0x3aacb2);if(!_0x17696a)try{_0x17696a=new _0x200f4c(this[_0x547285(0x3ea)][_0x547285(0x442)],{'namespace':_0x3aacb2}),this['_singletonLocks'][_0x547285(0x238)](_0x3aacb2,_0x17696a);}catch{return null;}return _0x17696a;}[_0x56c6d7(0x6dd)](){const _0x59b68a=_0x56c6d7,_0x50389f=[];try{for(const [_0x46ecf7,_0x45a510]of this[_0x59b68a(0x3ea)][_0x59b68a(0x221)]){if(_0x46ecf7['startsWith']('~'))continue;for(const _0x2e0563 of _0x45a510[_0x59b68a(0x6c0)][_0x59b68a(0x59c)]())_0x50389f[_0x59b68a(0x494)]({..._0x2e0563,'env':_0x46ecf7});}}catch{}return{'participate':this['okdb']['processors']?.['_participate']??![],'processors':_0x50389f};}[_0x56c6d7(0x2b9)](){const _0x24e432=_0x56c6d7;if(this[_0x24e432(0x1cc)])return!![];const _0x467d6e=this[_0x24e432(0x3ea)]['_rootDb'];if(!_0x467d6e)return![];return this[_0x24e432(0x1cc)]=_0x467d6e['openDB'](_0x66c40d,{'dupSort':![]}),this[_0x24e432(0x7a2)]=_0x467d6e[_0x24e432(0x748)](_0x147395,{'dupSort':![]}),!![];}async[_0x56c6d7(0x65c)](){const _0x2cef2d=_0x56c6d7;if(!this[_0x2cef2d(0x2b9)]())return;const _0x37ac48=_0x2cef2d(0x339),_0x10ac05=0x1,_0x56aee5=this[_0x2cef2d(0x1cc)][_0x2cef2d(0x5e0)](_0x37ac48)??0x0;if(_0x56aee5>=_0x10ac05)return;const _0x3a1d2c=_0xa2603b=>{const _0x49be18=_0x2cef2d;if(_0xa2603b===_0x49be18(0x5d7))return'single';if(_0xa2603b==='async')return _0x49be18(0x52d);return _0xa2603b;};await this['okdb'][_0x2cef2d(0x6cd)][_0x2cef2d(0x1c8)]['transaction'](()=>{const _0x5f04f1=_0x2cef2d;for(const _0x385d59 of[_0x5f04f1(0x47a),_0x5f04f1(0x2f5)]){for(const {key:_0x22c517,value:_0x42658b}of this[_0x5f04f1(0x1cc)][_0x5f04f1(0x433)]({'start':_0x385d59,'end':_0x385d59+'\xff'})){if(typeof _0x22c517!==_0x5f04f1(0x54f)||!_0x22c517['startsWith'](_0x385d59))break;const _0x5a9f35=_0x3a1d2c(_0x42658b[_0x5f04f1(0x274)]);if(_0x5a9f35!==_0x42658b[_0x5f04f1(0x274)])this[_0x5f04f1(0x1cc)][_0x5f04f1(0x4cd)](_0x22c517,{..._0x42658b,'mode':_0x5a9f35});}}this['_desired'][_0x5f04f1(0x4cd)](_0x37ac48,_0x10ac05);});}[_0x56c6d7(0x4cc)](){const _0x487e80=_0x56c6d7;return!!this[_0x487e80(0x1cc)];}[_0x56c6d7(0x6a3)](_0x4d154a,_0x5175fa){const _0x56801=_0x56c6d7;if(!this['_ensureDesired']())return null;const _0x3e6266=_0x4d154a+'/'+_0x5175fa;return this['_refreshDesiredSnapshot'](),this[_0x56801(0x501)][_0x56801(0x5e0)](_0x3e6266)??this[_0x56801(0x1cc)]['get'](_0x3e6266)??null;}[_0x56c6d7(0x32e)](){const _0x362066=_0x56c6d7;if(!_0x4c34c9)return;try{this[_0x362066(0x3ea)][_0x362066(0x6cd)]?.['db']?.[_0x362066(0x1e1)]?.();}catch{}}async[_0x56c6d7(0x6dc)](_0x4a2558,_0x53c192,_0x54f9b5){const _0x5d6a26=_0x56c6d7;if(!this[_0x5d6a26(0x2b9)]())return null;const _0x51ad9b=_0x4a2558+'/'+_0x53c192;this[_0x5d6a26(0x32e)]();const _0x4f3905=this[_0x5d6a26(0x501)]['get'](_0x51ad9b)??this['_desired'][_0x5d6a26(0x5e0)](_0x51ad9b)??{'version':0x0},_0xffc0c6=(_0x4f3905[_0x5d6a26(0x214)]||0x0)+0x1,_0x1cd5e9={..._0x4f3905,..._0x54f9b5,'version':_0xffc0c6,'updatedAt':Date[_0x5d6a26(0x6a7)]()};this['_desiredOverlay'][_0x5d6a26(0x238)](_0x51ad9b,_0x1cd5e9);try{await this[_0x5d6a26(0x3ea)][_0x5d6a26(0x6cd)][_0x5d6a26(0x1c8)][_0x5d6a26(0x480)](()=>{const _0x237815=_0x5d6a26;this[_0x237815(0x1cc)][_0x237815(0x4cd)](_0x51ad9b,_0x1cd5e9);});}finally{if(this[_0x5d6a26(0x501)][_0x5d6a26(0x5e0)](_0x51ad9b)===_0x1cd5e9)this['_desiredOverlay'][_0x5d6a26(0x614)](_0x51ad9b);}return _0xffc0c6;}['listDesired'](_0x41a33d){const _0x4589c7=_0x56c6d7;if(!this[_0x4589c7(0x2b9)]())return[];this[_0x4589c7(0x32e)]();const _0x190eb8=_0x41a33d+'/',_0x12667b=[];for(const {key:_0x36a701,value:_0xc40d31}of this[_0x4589c7(0x1cc)]['getRange']({'start':_0x190eb8,'end':_0x190eb8+'\xff'})){if(typeof _0x36a701!=='string'||!_0x36a701[_0x4589c7(0x72d)](_0x190eb8))break;_0x12667b[_0x4589c7(0x494)]({'key':_0x36a701[_0x4589c7(0x7a7)](_0x190eb8[_0x4589c7(0x1b1)]),'value':_0xc40d31});}return _0x12667b;}[_0x56c6d7(0x484)](_0x13b810){const _0x32a1a3=_0x56c6d7;if(!this[_0x32a1a3(0x2b9)]())return null;return this['_cmd'][_0x32a1a3(0x5e0)](_0x13b810)??null;}async['bumpCmd'](_0x243a4a,_0x189de4,_0x173238={}){const _0x40c8d2=_0x56c6d7;if(!this[_0x40c8d2(0x2b9)]())return null;let _0xfe8cea;return await this[_0x40c8d2(0x3ea)][_0x40c8d2(0x6cd)]['_writer'][_0x40c8d2(0x480)](()=>{const _0x52903a=_0x40c8d2,_0x3aa41b=this[_0x52903a(0x7a2)]['get'](_0x243a4a)||{'epoch':0x0};_0xfe8cea=(_0x3aa41b[_0x52903a(0x7ac)]||0x0)+0x1,this['_cmd'][_0x52903a(0x4cd)](_0x243a4a,{..._0x3aa41b,..._0x173238,'cmd':_0x189de4,'epoch':_0xfe8cea,'updatedAt':Date[_0x52903a(0x6a7)]()});}),_0xfe8cea;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x46bb1d,'nodeKey':_0x1e284e,'logicalKey':_0x20c1e7,'slotKey':_0x32fd5b,'PROCESS_ENV':_0x5b8670,'NODE_TYPE':_0x11e5a7},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x42c138=_0x5411c3;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x5c9e21=require$$0$5,{EVENTS:_0x25970d,CHANGE_ACTIONS:_0x509b79}=requireOkdbEnums(),{LOOP:_0x2d6303}=requireOkdbLoopMonitor(),_0x68b248=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x29cf3e=0x5,_0xc44711=0x2710;class _0x437e47 extends _0x5c9e21{constructor(_0x136f55,_0x39bfe6={}){const _0x5bb5f0=_0x5511;super(),this[_0x5bb5f0(0x3ea)]=_0x136f55,this[_0x5bb5f0(0x44d)]=_0x39bfe6[_0x5bb5f0(0x60d)]??_0x68b248,this[_0x5bb5f0(0x2a4)]=_0x39bfe6[_0x5bb5f0(0x329)]??_0x29cf3e,this[_0x5bb5f0(0x436)]=_0x39bfe6[_0x5bb5f0(0x3b1)]??_0xc44711,this[_0x5bb5f0(0x44a)]=![],this[_0x5bb5f0(0x57f)]=new Map(),this[_0x5bb5f0(0x63d)]=new Map(),this['_pending']=new Map(),this[_0x5bb5f0(0x476)]=null,this[_0x5bb5f0(0x4eb)]=![],this[_0x5bb5f0(0x435)]=new Set(),this[_0x5bb5f0(0x2bf)]=_0x211602=>this[_0x5bb5f0(0x38d)](_0x211602),this[_0x5bb5f0(0x400)]=_0x31a798=>this['_handlePoke'](_0x31a798),this[_0x5bb5f0(0x591)]=()=>this['stop']();}['start'](){const _0x2c43a7=_0x5511;if(this[_0x2c43a7(0x44a)])return;this[_0x2c43a7(0x44a)]=!![];for(const [_0x92b7ac,_0x3c3dcd]of this[_0x2c43a7(0x3ea)][_0x2c43a7(0x221)]){if(_0x92b7ac[_0x2c43a7(0x72d)]('~'))continue;try{_0x3c3dcd[_0x2c43a7(0x554)]();}catch{}}for(const [_0x14dadc,_0x437e83]of this[_0x2c43a7(0x3ea)][_0x2c43a7(0x221)]){if(_0x14dadc[_0x2c43a7(0x72d)]('~'))continue;try{this[_0x2c43a7(0x63d)][_0x2c43a7(0x238)](_0x14dadc,_0x437e83[_0x2c43a7(0x61a)]()||0x0);}catch{}}const {events:_0xe43901}=this[_0x2c43a7(0x3ea)];_0xe43901['on'](_0x25970d[_0x2c43a7(0x32f)],this[_0x2c43a7(0x2bf)]),_0xe43901['on'](_0x25970d['ITEM_UPDATE'],this[_0x2c43a7(0x2bf)]),_0xe43901['on'](_0x25970d['ITEM_REMOVE'],this['_onItem']),_0xe43901['on'](_0x25970d[_0x2c43a7(0x2f6)],this[_0x2c43a7(0x400)]),_0xe43901[_0x2c43a7(0x78b)](_0x25970d[_0x2c43a7(0x2ec)],this[_0x2c43a7(0x591)]);}['stop'](){const _0x1b60ca=_0x5511;if(!this[_0x1b60ca(0x44a)])return;this['_started']=![];const {events:_0x504bf5}=this[_0x1b60ca(0x3ea)];_0x504bf5[_0x1b60ca(0x4ad)](_0x25970d['ITEM_CREATE'],this[_0x1b60ca(0x2bf)]),_0x504bf5[_0x1b60ca(0x4ad)](_0x25970d[_0x1b60ca(0x470)],this[_0x1b60ca(0x2bf)]),_0x504bf5[_0x1b60ca(0x4ad)](_0x25970d[_0x1b60ca(0x43d)],this[_0x1b60ca(0x2bf)]),_0x504bf5[_0x1b60ca(0x4ad)](_0x25970d['SYSTEM_POKE'],this[_0x1b60ca(0x400)]);try{_0x504bf5[_0x1b60ca(0x4ad)](_0x25970d['SYSTEM_STOPPED'],this['_onStop']);}catch{}this[_0x1b60ca(0x476)]&&(clearTimeout(this[_0x1b60ca(0x476)]),this[_0x1b60ca(0x476)]=null),this[_0x1b60ca(0x2a8)]['clear'](),this['_cursors']['clear'](),this[_0x1b60ca(0x63d)]['clear'](),this[_0x1b60ca(0x435)][_0x1b60ca(0x22f)]();}[_0x42c138(0x1e3)](_0x470683,_0x3388f6,_0x4be74f,_0x876a73){return _0x470683+'\x00'+_0x3388f6+'\x00'+_0x4be74f+'\x00'+_0x876a73;}[_0x42c138(0x3ab)](_0x33b59f,_0x13db2e,_0x8a339f,_0x5818a9){const _0x1a6a78=_0x42c138,_0x134817=this[_0x1a6a78(0x1e3)](_0x33b59f,_0x13db2e,_0x8a339f,_0x5818a9);if(this[_0x1a6a78(0x435)][_0x1a6a78(0x4e7)](_0x134817))return![];this[_0x1a6a78(0x435)][_0x1a6a78(0x41a)](_0x134817);if(this[_0x1a6a78(0x435)][_0x1a6a78(0x50f)]>this[_0x1a6a78(0x436)]){const _0xcfc240=this['_seen'][_0x1a6a78(0x637)]()[_0x1a6a78(0x64e)]()[_0x1a6a78(0x643)];this[_0x1a6a78(0x435)]['delete'](_0xcfc240);}return!![];}[_0x42c138(0x38d)](_0x329568){const _0x576ab7=_0x42c138;if(!this[_0x576ab7(0x44a)]||!_0x329568)return;const {env:_0xdda7a5,type:_0x47d07d,key:_0x475fdf,clock:_0x4d1e5d,origin:_0x44d16c,action:_0x2f0676,newValue:_0x588ed5,oldValue:_0x4ba765}=_0x329568;if(_0xdda7a5==null||_0x47d07d==null||_0x475fdf==null)return;if(typeof _0xdda7a5===_0x576ab7(0x54f)&&_0xdda7a5[_0x576ab7(0x72d)]('~'))return;if(typeof _0x47d07d===_0x576ab7(0x54f)&&_0x47d07d[_0x576ab7(0x72d)]('~'))return;if(!this[_0x576ab7(0x3ab)](_0xdda7a5,_0x47d07d,_0x475fdf,_0x4d1e5d))return;const _0x16284c=_0x2f0676===_0x509b79[_0x576ab7(0x3c8)]?_0x576ab7(0x43f):_0x576ab7(0x4cd);this[_0x576ab7(0x652)](_0x576ab7(0x49d),{'env':_0xdda7a5,'type':_0x47d07d,'key':_0x475fdf,'op':_0x16284c,'clock':_0x4d1e5d,'origin':_0x44d16c,'value':_0x16284c==='remove'?null:_0x588ed5,'prevValue':_0x4ba765});}['_handlePoke'](_0x143fb6){const _0x56dce2=_0x42c138;if(!this[_0x56dce2(0x44a)])return;if(!_0x143fb6||typeof _0x143fb6[_0x56dce2(0x1a1)]!==_0x56dce2(0x54f)||typeof _0x143fb6[_0x56dce2(0x737)]!==_0x56dce2(0x54f))return;const {env:_0x3a68ba,type:_0x1d65ec}=_0x143fb6;if(_0x3a68ba[_0x56dce2(0x72d)]('~')||_0x1d65ec[_0x56dce2(0x72d)]('~'))return;this[_0x56dce2(0x2a8)][_0x56dce2(0x238)](_0x3a68ba+'\x00'+_0x1d65ec,{'env':_0x3a68ba,'type':_0x1d65ec}),this[_0x56dce2(0x410)]();}[_0x42c138(0x410)](){const _0x5bf64f=_0x42c138;if(this[_0x5bf64f(0x476)])return;const _0x32cbd5=()=>{const _0x539bf5=_0x5bf64f;this[_0x539bf5(0x476)]=null,this[_0x539bf5(0x217)]()['catch'](()=>{});};this['_flushTimer']=setTimeout(_0x32cbd5,this[_0x5bf64f(0x2a4)]>0x0?this[_0x5bf64f(0x2a4)]:0x0);}async[_0x42c138(0x217)](){const _0x2c44bc=_0x42c138;if(this[_0x2c44bc(0x4eb)]){this[_0x2c44bc(0x410)]();return;}this[_0x2c44bc(0x4eb)]=!![];try{const _0x4dee06=[...this[_0x2c44bc(0x2a8)][_0x2c44bc(0x637)]()];this[_0x2c44bc(0x2a8)][_0x2c44bc(0x22f)]();let _0x41f7db=![];for(const {env:_0x3f4207,type:_0x125789}of _0x4dee06){try{const _0x5900c7=await this[_0x2c44bc(0x3ec)](_0x3f4207,_0x125789);if(_0x5900c7)_0x41f7db=!![];}catch{this['_pending'][_0x2c44bc(0x238)](_0x3f4207+'\x00'+_0x125789,{'env':_0x3f4207,'type':_0x125789}),_0x41f7db=!![];}}if(_0x41f7db||this['_pending'][_0x2c44bc(0x50f)]>0x0)this[_0x2c44bc(0x410)]();}finally{this['_draining']=![];}}async[_0x42c138(0x3ec)](_0x31beea,_0x1aa1aa){const _0x312f48=_0x42c138,_0x3c824e=await this[_0x312f48(0x3ea)][_0x312f48(0x7a3)](_0x31beea),_0x246d9a=_0x31beea+'\x00'+_0x1aa1aa;!this[_0x312f48(0x57f)][_0x312f48(0x4e7)](_0x246d9a)&&(!this[_0x312f48(0x63d)][_0x312f48(0x4e7)](_0x31beea)&&(_0x3c824e[_0x312f48(0x554)](),this[_0x312f48(0x63d)][_0x312f48(0x238)](_0x31beea,_0x3c824e['getClock']()||0x0)),this[_0x312f48(0x57f)]['set'](_0x246d9a,this['_baselines'][_0x312f48(0x5e0)](_0x31beea)));const _0x1e4167=this[_0x312f48(0x57f)][_0x312f48(0x5e0)](_0x246d9a),_0x560526=_0x3c824e[_0x312f48(0x61a)](_0x1aa1aa)||0x0;if(_0x560526<=_0x1e4167)return![];const _0x9f724d=_0x1e4167+this[_0x312f48(0x44d)],_0x28f341=Math['min'](_0x560526,_0x9f724d),_0x37c640=_0x2d6303[_0x312f48(0x344)]?_0x2d6303['now']():0x0,_0xe0754=Array['from'](_0x3c824e['getChanges'](_0x1aa1aa,_0x1e4167+0x1,_0x28f341));let _0x16c7b8=_0x1e4167;for(const _0x4adcdf of _0xe0754){const {clock:_0x41c0ff,key:_0x232099,action:_0x2e4677,origin:_0x99a6c4}=_0x4adcdf;if(_0x41c0ff>_0x16c7b8)_0x16c7b8=_0x41c0ff;if(_0x232099==null)continue;if(!this[_0x312f48(0x3ab)](_0x31beea,_0x1aa1aa,_0x232099,_0x41c0ff))continue;let _0x375a28,_0x1ad112;if(_0x2e4677===_0x509b79['REMOVE'])_0x375a28=_0x312f48(0x43f),_0x1ad112=null;else{const _0x124d5f=_0x3c824e[_0x312f48(0x5e0)](_0x1aa1aa,_0x232099);_0x124d5f==null?(_0x375a28=_0x312f48(0x43f),_0x1ad112=null):(_0x375a28='put',_0x1ad112=_0x124d5f);}this[_0x312f48(0x652)]('change',{'env':_0x31beea,'type':_0x1aa1aa,'key':_0x232099,'op':_0x375a28,'clock':_0x41c0ff,'origin':_0x99a6c4,'value':_0x1ad112});}if(_0x2d6303[_0x312f48(0x344)])_0x2d6303[_0x312f48(0x1cb)](_0x312f48(0x375)+_0x31beea+':'+_0x1aa1aa,_0x2d6303[_0x312f48(0x6a7)]()-_0x37c640,'n='+_0xe0754['length']);return this['_cursors'][_0x312f48(0x238)](_0x246d9a,Math['max'](_0x16c7b8,_0x28f341)),_0x3c824e['getClock'](_0x1aa1aa)>_0x28f341;}[_0x42c138(0x57d)](){const _0xb04b91=_0x42c138;return{'started':this[_0xb04b91(0x44a)],'quantum':this['_quantum'],'flushDebounce':this['_flushDebounce'],'cursors':Object[_0xb04b91(0x26f)]([...this[_0xb04b91(0x57f)][_0xb04b91(0x352)]()][_0xb04b91(0x2cc)](([_0x525e63,_0x33974e])=>[_0x525e63[_0xb04b91(0x1f7)]('\x00',':'),_0x33974e])),'pending':this['_pending'][_0xb04b91(0x50f)],'seen':this[_0xb04b91(0x435)]['size']};}}return _0x437e47[_0x42c138(0x2dd)]=_0x68b248,okdbChangefeed={'OKDBChangefeed':_0x437e47},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x339483=_0x5411c3;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0x17ab4a=require$$1$2,_0x4e111f=require$$1,{EVENTS:_0x3f607a}=requireOkdbEnums(),_0x15b4d2=require$$0,{slotKey:_0x1de56d}=requireOkdbProcessRegistry(),_0x12322e=0xfa,_0x248946=0xfa0,_0x3fa278=0x5,_0x2ee65e=0x2710,_0x3dc876=0xbb8,_0xc7f0de=0x7d0,_0x351d99='__okdbCluster',_0x406a30='ephemeral',_0x181425=_0x339483(0x547),_0x1e5b0e='stats',_0x21a543=[_0x3f607a[_0x339483(0x789)],_0x3f607a[_0x339483(0x559)],_0x3f607a[_0x339483(0x341)],_0x3f607a[_0x339483(0x736)],_0x3f607a[_0x339483(0x404)],_0x3f607a[_0x339483(0x51e)],_0x3f607a[_0x339483(0x4dc)],_0x3f607a[_0x339483(0x236)],_0x339483(0x3c9),'processor:progress',_0x339483(0x5be),_0x339483(0x3f6),'processor:resumed',_0x339483(0x752)],_0x5e51f7=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0;function _0x1b3ab3({workers:_0x981a3f,makeOkdb:_0x5389c7,port:_0xa7f88d,primaryOkdb:_0x2d33cb,childEntry:childEntry=![],workerEnv:workerEnv=null,workerRole:workerRole=null,listenAddr:listenAddr=null}={}){const _0x210b24=_0x339483;if(_0x17ab4a[_0x210b24(0x608)])return childEntry&&_0x17ab4a[_0x210b24(0x2d0)]({'exec':_0x4e111f[_0x210b24(0x2b6)](__dirname,_0x210b24(0x237)),'args':[],'execArgv':((()=>{const _0x20d077=_0x210b24,_0x165309=[];for(let _0x41ee5d=0x0;_0x41ee5d<process[_0x20d077(0x672)][_0x20d077(0x1b1)];_0x41ee5d++){const _0xbce612=process[_0x20d077(0x672)][_0x41ee5d];if(_0xbce612[_0x20d077(0x72d)](_0x20d077(0x70c))||_0xbce612[_0x20d077(0x72d)](_0x20d077(0x192))||_0xbce612['startsWith']('--inspect'))continue;if(_0xbce612==='-e'||_0xbce612===_0x20d077(0x710)||_0xbce612==='-p'||_0xbce612===_0x20d077(0x4a5)){_0x41ee5d++;continue;}_0x165309['push'](_0xbce612);}return _0x165309;})())}),_0x2f6b7c({'workers':_0x981a3f,'port':_0xa7f88d,'primaryOkdb':_0x2d33cb,'workerEnv':workerEnv,'workerRole':workerRole,'listenAddr':listenAddr??':'+_0xa7f88d});return _0x5bd428({'makeOkdb':_0x5389c7,'port':_0xa7f88d});}function _0x2f6b7c({workers:_0xd685a8,port:_0x4ae93d,primaryOkdb:_0x3e4a39,workerEnv:_0x3c4230,workerRole:_0x1cd070,listenAddr:_0x498a0d}){const _0x5352ea=_0x339483,_0x184054=new Map(),_0x117139=new Map();let _0x23fb44=![];const _0x633d6c=_0x53a374=>_0x53a374?.[_0x5352ea(0x3bc)],_0x152242=_0x62ad6b=>{const _0xeb9230=_0x5352ea,_0x4caf9f=_0x17ab4a[_0xeb9230(0x422)]({...process.env,..._0x3c4230||{},'OKDB_CLUSTER_SLOT':String(_0x62ad6b)});return _0x4caf9f[_0xeb9230(0x3bc)]=_0x62ad6b,_0x184054[_0xeb9230(0x238)](_0x4caf9f[_0xeb9230(0x509)][_0xeb9230(0x690)],{'worker':_0x4caf9f,'startedAt':Date[_0xeb9230(0x6a7)](),'slot':_0x62ad6b}),_0x4caf9f['on'](_0xeb9230(0x3ba),_0x2a27d8=>{const _0x212796=_0xeb9230;console[_0x212796(0x547)](_0x212796(0x3ce)+_0x4caf9f['process'][_0x212796(0x690)]+_0x212796(0x450)+(_0x2a27d8?.['message']??_0x2a27d8));}),_0x4caf9f['on'](_0xeb9230(0x372),()=>_0x80a272()),_0x4caf9f;},_0x36bab4=_0x37935b=>{const _0x37803d=_0x5352ea;for(const {worker:_0x38a586}of _0x184054[_0x37803d(0x637)]()){if(_0x38a586[_0x37803d(0x762)]()||!_0x38a586[_0x37803d(0x44e)]())continue;try{_0x38a586[_0x37803d(0x61d)](_0x37935b);}catch{}}};_0x3e4a39?.[_0x5352ea(0x308)]?.({'kind':_0x5352ea(0x5de),'listenAddr':_0x498a0d})[_0x5352ea(0x58b)](()=>{}),_0x3e4a39?.[_0x5352ea(0x683)]?.['setOwnMeta']?.({'workersConfigured':_0xd685a8});const _0x1d0fe3={'engines':!![],'processors':!![],'compaction':!![],..._0x1cd070,'http':!![]},_0x80a272=()=>{const _0x4d541a=_0x5352ea,_0x4f7715=_0x3e4a39?.[_0x4d541a(0x683)];if(!_0x4f7715||!_0x4f7715[_0x4d541a(0x72b)])return;const _0x635f6f=_0x4f7715[_0x4d541a(0x75d)];for(const {worker:_0x2b4491,startedAt:_0x91c386,slot:_0x331287,stats:_0x5e0886,processing:_0x375792}of _0x184054[_0x4d541a(0x637)]()){if(_0x2b4491[_0x4d541a(0x762)]())continue;const _0x2056ff=_0x4f7715[_0x4d541a(0x4cc)]?.()&&_0x4f7715[_0x4d541a(0x6a3)](_0x4d541a(0x5ce),_0x3c6145(_0x331287))?.[_0x4d541a(0x5a6)]===!![];_0x4f7715[_0x4d541a(0x478)]({'pid':_0x2b4491[_0x4d541a(0x509)]['pid'],'startedAt':_0x91c386,'kind':'http-server','supervisorKey':_0x635f6f,'slot':_0x331287,'slotKey':_0x3c6145(_0x331287),'role':_0x1d0fe3,'listenAddr':_0x498a0d,'lifecycle':_0x2056ff?'decommissioning':_0x4d541a(0x601),'processing':_0x375792??null,'stats':_0x5e0886??null})[_0x4d541a(0x58b)](()=>{});}},_0x3c6145=_0x4eedde=>_0x1de56d(_0x5352ea(0x79c)+_0x4ae93d,_0x4eedde),_0x236f41=_0x322014=>{const _0x1031b0=_0x5352ea,_0x41be67=_0x3e4a39?.[_0x1031b0(0x683)];if(!_0x41be67?.['hasDesired']?.())return![];return _0x41be67[_0x1031b0(0x6a3)](_0x1031b0(0x5ce),_0x3c6145(_0x322014))?.[_0x1031b0(0x5a6)]===!![];};for(let _0x26e2e6=0x0;_0x26e2e6<_0xd685a8;_0x26e2e6++){const _0x1e9874=_0x236f41(_0x26e2e6);_0x117139[_0x5352ea(0x238)](_0x26e2e6,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x1e9874,'respawnTimer':null}),_0x1e9874?console[_0x5352ea(0x547)](_0x5352ea(0x1a6)+_0x26e2e6+_0x5352ea(0x6c7)):_0x152242(_0x26e2e6);}const _0x205ed3=()=>{const _0x29e15e=_0x5352ea,_0x38d903=_0x3e4a39?.[_0x29e15e(0x683)];if(!_0x38d903?.[_0x29e15e(0x72b)]||!_0x38d903[_0x29e15e(0x4cc)]?.())return;for(const [_0x32c946,_0x5afab1]of _0x117139['entries']()){const _0x155a9e=_0x38d903['getDesired'](_0x29e15e(0x5ce),_0x3c6145(_0x32c946)),_0x1c6423=_0x155a9e?.[_0x29e15e(0x5a6)]===!![],_0x32cba4=_0x155a9e?.[_0x29e15e(0x4fc)]===!![];if(_0x1c6423&&!_0x5afab1[_0x29e15e(0x76d)]){_0x5afab1['dead']=!![];_0x5afab1[_0x29e15e(0x4e8)]&&(clearTimeout(_0x5afab1[_0x29e15e(0x4e8)]),_0x5afab1[_0x29e15e(0x4e8)]=null);for(const {worker:_0x31764b}of _0x184054[_0x29e15e(0x637)]()){if(_0x633d6c(_0x31764b)!==_0x32c946||_0x31764b[_0x29e15e(0x762)]())continue;try{if(_0x32cba4)_0x31764b['process'][_0x29e15e(0x4fc)](_0x29e15e(0x694));else _0x31764b[_0x29e15e(0x44e)]()&&_0x31764b[_0x29e15e(0x438)]();}catch{}}console[_0x29e15e(0x547)](_0x29e15e(0x77d)+(_0x32cba4?_0x29e15e(0x3bd):_0x29e15e(0x4c9))+_0x29e15e(0x408)+_0x32c946+'\x20(durable\x20desired-state)');}else{if(!_0x1c6423&&_0x5afab1[_0x29e15e(0x76d)]&&_0x155a9e){_0x5afab1[_0x29e15e(0x76d)]=![],_0x5afab1[_0x29e15e(0x68e)]=[],_0x5afab1[_0x29e15e(0x5f5)]=0x0;const _0x3e2faf=[..._0x184054[_0x29e15e(0x637)]()]['some'](({worker:_0x2224e9})=>_0x633d6c(_0x2224e9)===_0x32c946&&!_0x2224e9[_0x29e15e(0x762)]());!_0x3e2faf&&!_0x23fb44&&(_0x152242(_0x32c946),console[_0x29e15e(0x547)](_0x29e15e(0x454)+_0x32c946));}}}},_0x304344=()=>{try{_0x205ed3();}catch{}};_0x3e4a39?.['events']?.['on']?.(_0x3f607a[_0x5352ea(0x487)],_0x304344);const _0x5499d9=[];if(_0x3e4a39?.[_0x5352ea(0x2b0)]?.['on'])for(const _0x1a751b of _0x21a543){const _0x28c60b=_0x415f65=>{_0x36bab4({[_0x351d99]:_0x406a30,'event':_0x1a751b,'data':_0x415f65??{}});};_0x3e4a39[_0x5352ea(0x2b0)]['on'](_0x1a751b,_0x28c60b),_0x5499d9[_0x5352ea(0x494)]({'event':_0x1a751b,'handler':_0x28c60b});}const _0x4e86fe=setInterval(()=>{_0x205ed3(),_0x80a272();},_0x5e51f7);_0x4e86fe['unref']?.();const _0x2c188b=(_0xd42045,_0x248897)=>{const _0x4a1485=_0x5352ea;if(!_0x248897||typeof _0x248897!=='object'||_0x248897[_0x351d99]!==_0x181425)return;if(!_0x3e4a39?.[_0x4a1485(0x547)]?.['ingest'])return;const _0x2c0990=_0x248897['entry']||{};_0x3e4a39[_0x4a1485(0x547)][_0x4a1485(0x7a4)]({..._0x2c0990,'msg':'[w'+_0x248897['slot']+']\x20'+(_0x2c0990[_0x4a1485(0x495)]??''),'meta':{..._0x2c0990['meta']||{},'worker':_0x248897[_0x4a1485(0x5ce)],'workerPid':_0x248897[_0x4a1485(0x690)]}});};_0x17ab4a['on']('message',_0x2c188b);const _0x112cde=(_0x292e7a,_0x2062c4)=>{const _0x1a3ae6=_0x5352ea;if(!_0x2062c4||typeof _0x2062c4!=='object'||_0x2062c4[_0x351d99]!==_0x1e5b0e)return;const _0x51b6e4=_0x184054['get'](_0x292e7a[_0x1a3ae6(0x509)][_0x1a3ae6(0x690)]);if(_0x51b6e4){_0x51b6e4['stats']={..._0x2062c4[_0x1a3ae6(0x55e)],'at':Date[_0x1a3ae6(0x6a7)]()};if(_0x2062c4[_0x1a3ae6(0x304)]!==undefined)_0x51b6e4['processing']=_0x2062c4[_0x1a3ae6(0x304)];}};_0x17ab4a['on'](_0x5352ea(0x246),_0x112cde),_0x17ab4a['on'](_0x5352ea(0x592),(_0x2721c5,_0x44400d,_0x477fcd)=>{const _0x82b161=_0x5352ea,_0x5e4aa7=_0x2721c5['process']['pid'],_0x2d1abd=_0x633d6c(_0x2721c5),_0x361fb5=_0x184054[_0x82b161(0x5e0)](_0x5e4aa7);if(_0x361fb5&&_0x3e4a39?.[_0x82b161(0x683)])_0x3e4a39[_0x82b161(0x683)]['removeNode'](_0x5e4aa7+':'+_0x361fb5[_0x82b161(0x314)])[_0x82b161(0x58b)](()=>{});_0x184054['delete'](_0x5e4aa7),console[_0x82b161(0x547)](_0x82b161(0x3ce)+_0x5e4aa7+_0x82b161(0x430)+(_0x2d1abd??'?')+_0x82b161(0x1a9)+(_0x82b161(0x397)+_0x44400d+',\x20signal='+(_0x477fcd??_0x82b161(0x552))+_0x82b161(0x777)+_0x184054[_0x82b161(0x50f)]+_0x82b161(0x589))),_0x80a272();if(_0x23fb44||_0x2d1abd==null)return;const _0x28bd9d=_0x117139[_0x82b161(0x5e0)](_0x2d1abd);if(!_0x28bd9d||_0x28bd9d[_0x82b161(0x76d)])return;const _0x17a6d2=Date[_0x82b161(0x6a7)]();_0x28bd9d['deaths'][_0x82b161(0x494)](_0x17a6d2),_0x28bd9d[_0x82b161(0x68e)]=_0x28bd9d[_0x82b161(0x68e)][_0x82b161(0x3fb)](_0x55a9e2=>_0x17a6d2-_0x55a9e2<=_0x2ee65e);if(_0x28bd9d['deaths'][_0x82b161(0x1b1)]>=_0x3fa278){_0x28bd9d[_0x82b161(0x76d)]=!![],console[_0x82b161(0x3ba)]('[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot='+_0x2d1abd+'\x20died\x20'+_0x28bd9d[_0x82b161(0x68e)][_0x82b161(0x1b1)]+_0x82b161(0x3eb)+(_0x2ee65e+_0x82b161(0x469)+_0x184054[_0x82b161(0x50f)]+_0x82b161(0x4e4)));return;}_0x28bd9d[_0x82b161(0x5f5)]++;const _0xb1cf89=Math[_0x82b161(0x4a8)](_0x248946,_0x12322e*0x2**(_0x28bd9d[_0x82b161(0x5f5)]-0x1));console['log'](_0x82b161(0x3cd)+_0x2d1abd+_0x82b161(0x30d)+_0xb1cf89+'ms\x20(attempt\x20'+_0x28bd9d[_0x82b161(0x5f5)]+')'),_0x28bd9d[_0x82b161(0x4e8)]=setTimeout(()=>{const _0x8ec9a8=_0x82b161;_0x28bd9d[_0x8ec9a8(0x4e8)]=null;if(_0x23fb44||_0x28bd9d[_0x8ec9a8(0x76d)])return;const _0xbdcdac=_0x152242(_0x2d1abd);_0xbdcdac[_0x8ec9a8(0x78b)](_0x8ec9a8(0x6fc),()=>{const _0x1837bb=_0x8ec9a8;if(_0x117139[_0x1837bb(0x5e0)](_0x2d1abd)===_0x28bd9d)_0x28bd9d['consecutiveFailures']=0x0;});},_0xb1cf89),_0x28bd9d[_0x82b161(0x4e8)][_0x82b161(0x6d1)]?.();});const _0x3b2ca8=[..._0x184054['keys']()];console[_0x5352ea(0x547)]('[okdb-cluster]\x20primary\x20pid='+process[_0x5352ea(0x690)]+_0x5352ea(0x2a1)+_0xd685a8+_0x5352ea(0x6bf)+_0x4ae93d+':\x20'+('['+_0x3b2ca8['join'](',\x20')+']'));const _0x792361={'_isClusterController':!![],'port':_0x4ae93d,'primaryOkdb':_0x3e4a39??null,'status'(){const _0x245a9d=_0x5352ea;return{'clustered':!![],'primaryPid':process[_0x245a9d(0x690)],'port':_0x4ae93d,'primaryRole':_0x3e4a39?.[_0x245a9d(0x222)]??null,'processorPid':null,'supervisorPid':process['pid'],'workers':[..._0x184054[_0x245a9d(0x637)]()][_0x245a9d(0x2cc)](({worker:_0x1e31b3})=>({'pid':_0x1e31b3[_0x245a9d(0x509)][_0x245a9d(0x690)],'id':_0x1e31b3['id'],'dead':_0x1e31b3[_0x245a9d(0x762)]()}))};},async 'close'(){const _0x56d78a=_0x5352ea;_0x23fb44=!![];for(const _0x4480a4 of _0x117139[_0x56d78a(0x637)]()){_0x4480a4[_0x56d78a(0x76d)]=!![],_0x4480a4['respawnTimer']&&(clearTimeout(_0x4480a4['respawnTimer']),_0x4480a4[_0x56d78a(0x4e8)]=null);}clearInterval(_0x4e86fe),_0x17ab4a['off'](_0x56d78a(0x246),_0x2c188b),_0x17ab4a[_0x56d78a(0x4ad)](_0x56d78a(0x246),_0x112cde),_0x3e4a39?.['events']?.[_0x56d78a(0x4ad)]?.(_0x3f607a[_0x56d78a(0x487)],_0x304344);if(_0x3e4a39?.[_0x56d78a(0x2b0)]?.[_0x56d78a(0x4ad)])for(const {event:_0x122c9f,handler:_0x4a8791}of _0x5499d9){try{_0x3e4a39['events'][_0x56d78a(0x4ad)](_0x122c9f,_0x4a8791);}catch{}}_0x5499d9[_0x56d78a(0x1b1)]=0x0;const _0x52465f=[..._0x184054['values']()][_0x56d78a(0x2cc)](({worker:_0x1d3c01})=>_0x1d3c01);if(_0x52465f[_0x56d78a(0x1b1)]===0x0)return;await Promise['all'](_0x52465f['map'](_0x357912=>new Promise(_0x4752d1=>{const _0x3da97f=_0x56d78a;if(_0x357912[_0x3da97f(0x762)]()){_0x4752d1();return;}let _0x304c0c=![];const _0x22992b=()=>{if(_0x304c0c)return;_0x304c0c=!![];if(_0x25b1a3)clearTimeout(_0x25b1a3);_0x4752d1();};_0x357912[_0x3da97f(0x78b)](_0x3da97f(0x592),_0x22992b);const _0x25b1a3=setTimeout(()=>{try{_0x357912['process']['kill']();}catch{}},_0x3dc876+0x1f4);_0x25b1a3[_0x3da97f(0x6d1)]?.();try{_0x357912['disconnect']();}catch{try{_0x357912[_0x3da97f(0x509)][_0x3da97f(0x4fc)]();}catch{}}})));}};return _0x792361;}async function _0x5bd428({makeOkdb:_0x47ff9e,port:_0x21b9ed}){const _0x2df8c8=_0x339483,_0x780b4f=await _0x47ff9e();return _0x426577(_0x780b4f),_0x780b4f[_0x2df8c8(0x277)][_0x2df8c8(0x2b1)](_0x21b9ed);}function _0x426577(_0x4db56f){const _0x12c241=_0x339483;if(!_0x4db56f||_0x4db56f[_0x12c241(0x550)])return;_0x4db56f[_0x12c241(0x550)]=!![];try{const {OKDBChangefeed:_0x2f6aae}=requireOkdbChangefeed(),_0x44f146=_0x4db56f['_adminRelay'];if(_0x44f146&&typeof _0x44f146[_0x12c241(0x774)]===_0x12c241(0x76e)){const _0x53ffc6=new _0x2f6aae(_0x4db56f);_0x53ffc6[_0x12c241(0x45f)](),_0x44f146[_0x12c241(0x774)](_0x53ffc6),_0x4db56f[_0x12c241(0x722)]=_0x53ffc6;}}catch(_0x53b561){_0x4db56f[_0x12c241(0x547)]?.[_0x12c241(0x305)]?.(_0x12c241(0x212)+(_0x53b561?.[_0x12c241(0x246)]??_0x53b561),{'feature':_0x12c241(0x543)});}const _0x24c0e3=_0xdd9bed=>{const _0xf3c412=_0x12c241;if(!_0xdd9bed||typeof _0xdd9bed!=='object'||_0xdd9bed[_0x351d99]==null)return;if(_0xdd9bed[_0x351d99]===_0x406a30)try{_0x4db56f[_0xf3c412(0x200)]?.[_0xf3c412(0x4c2)]?.(_0xdd9bed[_0xf3c412(0x241)],_0xdd9bed[_0xf3c412(0x268)]);}catch{}};process['on'](_0x12c241(0x246),_0x24c0e3),_0x4db56f['_clusterOnMessage']=_0x24c0e3;{let _0x3ebe35=process[_0x12c241(0x560)](),_0x4fd255=Date[_0x12c241(0x6a7)]();const _0x2651af=()=>{const _0x38e835=_0x12c241;if(typeof process[_0x38e835(0x61d)]!=='function'||!process[_0x38e835(0x3a8)])return;const _0x273b26=Date[_0x38e835(0x6a7)](),_0x164745=process[_0x38e835(0x560)](),_0x2f6e2c=(_0x273b26-_0x4fd255)*0x3e8,_0x14c65f=_0x164745[_0x38e835(0x468)]-_0x3ebe35[_0x38e835(0x468)]+(_0x164745[_0x38e835(0x256)]-_0x3ebe35['system']),_0x595273=_0x2f6e2c>0x0?Math[_0x38e835(0x4a8)](0x64,Math[_0x38e835(0x40d)](_0x14c65f/(_0x2f6e2c*(_0x15b4d2['cpus']()[_0x38e835(0x1b1)]||0x1))*0x64)):0x0;_0x3ebe35=_0x164745,_0x4fd255=_0x273b26;const _0x59d950=process[_0x38e835(0x280)]();let _0x44c673=null;try{_0x44c673=_0x4db56f['role']?.[_0x38e835(0x1a4)]?_0x4db56f[_0x38e835(0x683)]?.[_0x38e835(0x6dd)]?.()??null:null;}catch{}try{process[_0x38e835(0x61d)]({[_0x351d99]:_0x1e5b0e,'stats':{'rss':_0x59d950[_0x38e835(0x2d3)],'heapUsed':_0x59d950[_0x38e835(0x262)],'heapTotal':_0x59d950[_0x38e835(0x4ae)],'external':_0x59d950[_0x38e835(0x50d)],'cpuPct':_0x595273,'cpuWindowMs':Math['round'](_0x2f6e2c/0x3e8)||null},'processing':_0x44c673});}catch{}},_0x59b58=Math['max'](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x51b44b=setInterval(_0x2651af,_0x59b58);_0x51b44b[_0x12c241(0x6d1)]?.(),_0x2651af();for(const _0x5cd8d3 of[_0x12c241(0x3f6),_0x12c241(0x665)]){_0x4db56f[_0x12c241(0x2b0)]?.['on']?.(_0x5cd8d3,()=>{try{_0x2651af();}catch{}});}}let _0x427553=![];const _0x4a6b50=async _0x5c1b01=>{const _0x1813bb=_0x12c241;if(_0x427553)return;_0x427553=!![];const _0x2a6831=setTimeout(()=>process[_0x1813bb(0x592)](_0x5c1b01),_0x3dc876);_0x2a6831[_0x1813bb(0x6d1)]?.();try{await _0x4db56f[_0x1813bb(0x5e4)]?.();}catch{}process['exit'](_0x5c1b01);};process['on'](_0x12c241(0x438),()=>_0x4a6b50(0x0));if(process[_0x12c241(0x3be)]!==_0x12c241(0x4dd)){const _0xe976f=setInterval(()=>{const _0x3c7444=_0x12c241;if(process[_0x3c7444(0x2ed)]===0x1)_0x4a6b50(0x0);},_0xc7f0de);_0xe976f[_0x12c241(0x6d1)]?.(),_0x4db56f[_0x12c241(0x36f)]=_0xe976f;}}return okdbCluster={'runClustered':_0x1b3ab3,'attachWorkerCluster':_0x426577},okdbCluster;}var okdbHttp={'exports':{}},okdbMetrics,hasRequiredOkdbMetrics;function requireOkdbMetrics(){const _0x2ab882=_0x5411c3;if(hasRequiredOkdbMetrics)return okdbMetrics;hasRequiredOkdbMetrics=0x1;const _0x28cab0=0x3c;function _0x3b4968(){return{'requests':0x0,'reads':0x0,'writes':0x0,'errors':0x0,'readMs':0x0,'writeMs':0x0};}class _0x4e0990{constructor(){const _0x18ebc1=_0x5511;this['_totalRequests']=0x0,this['_totalReads']=0x0,this[_0x18ebc1(0x57e)]=0x0,this['_totalErrors']=0x0,this[_0x18ebc1(0x1ec)]=0x0,this[_0x18ebc1(0x2c4)]=0x0,this['_buckets']=Array[_0x18ebc1(0x716)]({'length':_0x28cab0},_0x3b4968),this[_0x18ebc1(0x506)]=0x0,this[_0x18ebc1(0x3c6)]=Date[_0x18ebc1(0x6a7)](),this[_0x18ebc1(0x74a)]=setInterval(()=>this[_0x18ebc1(0x685)](),0x3e8);if(this[_0x18ebc1(0x74a)]['unref'])this[_0x18ebc1(0x74a)]['unref']();}['_rotateBucket'](){const _0x5cddcc=_0x5511;this[_0x5cddcc(0x506)]=(this['_bucketIdx']+0x1)%_0x28cab0,this[_0x5cddcc(0x510)][this[_0x5cddcc(0x506)]]=_0x3b4968(),this[_0x5cddcc(0x3c6)]=Date['now']();}['record'](_0x343a7d,_0xb12d9e,_0x52ab16){const _0x32cd5f=_0x5511,_0x5ab360=/^(POST|PUT|PATCH|DELETE)$/i[_0x32cd5f(0x279)](_0x343a7d),_0x344524=this['_buckets'][this['_bucketIdx']];this[_0x32cd5f(0x2a3)]++,_0x344524['requests']++,_0x52ab16&&(this[_0x32cd5f(0x593)]++,_0x344524[_0x32cd5f(0x5bc)]++),_0x5ab360?(this[_0x32cd5f(0x57e)]++,this['_totalWriteMs']+=_0xb12d9e,_0x344524['writes']++,_0x344524[_0x32cd5f(0x565)]+=_0xb12d9e):(this[_0x32cd5f(0x1ae)]++,this[_0x32cd5f(0x1ec)]+=_0xb12d9e,_0x344524[_0x32cd5f(0x3da)]++,_0x344524[_0x32cd5f(0x1e4)]+=_0xb12d9e);}[_0x2ab882(0x55e)](){const _0x27af23=_0x2ab882;let _0x3d68bd=0x0,_0xdbc5f8=0x0,_0x2d32f5=0x0,_0x594ed1=0x0,_0x4ee96d=0x0,_0x375ad4=0x0;for(const _0x18a7c0 of this['_buckets']){_0x3d68bd+=_0x18a7c0['requests'],_0xdbc5f8+=_0x18a7c0[_0x27af23(0x3da)],_0x2d32f5+=_0x18a7c0[_0x27af23(0x1bd)],_0x594ed1+=_0x18a7c0['errors'],_0x4ee96d+=_0x18a7c0['readMs'],_0x375ad4+=_0x18a7c0[_0x27af23(0x565)];}const _0x56cd4b=_0x28cab0;return{'lifetime':{'requests':this['_totalRequests'],'reads':this[_0x27af23(0x1ae)],'writes':this['_totalWrites'],'errors':this[_0x27af23(0x593)],'avgReadMs':this[_0x27af23(0x1ae)]>0x0?+(this[_0x27af23(0x1ec)]/this[_0x27af23(0x1ae)])['toFixed'](0x2):null,'avgWriteMs':this[_0x27af23(0x57e)]>0x0?+(this[_0x27af23(0x2c4)]/this['_totalWrites'])[_0x27af23(0x26b)](0x2):null},'window':{'seconds':_0x56cd4b,'requests':_0x3d68bd,'reads':_0xdbc5f8,'writes':_0x2d32f5,'errors':_0x594ed1,'reqPerSec':+(_0x3d68bd/_0x56cd4b)['toFixed'](0x2),'readPerSec':+(_0xdbc5f8/_0x56cd4b)[_0x27af23(0x26b)](0x2),'writePerSec':+(_0x2d32f5/_0x56cd4b)[_0x27af23(0x26b)](0x2),'avgReadMs':_0xdbc5f8>0x0?+(_0x4ee96d/_0xdbc5f8)[_0x27af23(0x26b)](0x2):null,'avgWriteMs':_0x2d32f5>0x0?+(_0x375ad4/_0x2d32f5)['toFixed'](0x2):null}};}[_0x2ab882(0x5e4)](){clearInterval(this['_timer']);}}return okdbMetrics=_0x4e0990,okdbMetrics;}var okdbAuthNamespaces,hasRequiredOkdbAuthNamespaces;function requireOkdbAuthNamespaces(){const _0x3e2809=_0x5411c3;if(hasRequiredOkdbAuthNamespaces)return okdbAuthNamespaces;hasRequiredOkdbAuthNamespaces=0x1;const _0x9831bb={'data':{'label':_0x3e2809(0x599),'scope':_0x3e2809(0x1a1),'description':_0x3e2809(0x299),'operations':{'read':{'label':_0x3e2809(0x474),'summary':_0x3e2809(0x310)},'write':{'label':'Write','summary':_0x3e2809(0x315)}}},'schema':{'label':_0x3e2809(0x1fa),'scope':'env','description':_0x3e2809(0x786),'operations':{'read':{'label':'Read','summary':_0x3e2809(0x693)},'write':{'label':_0x3e2809(0x6bc),'summary':_0x3e2809(0x686)}}},'search':{'label':_0x3e2809(0x2ac),'scope':_0x3e2809(0x1a1),'description':'Run\x20searches\x20against\x20registered\x20FTS\x20and\x20vector\x20indexes.','operations':{'query':{'label':_0x3e2809(0x76c),'summary':_0x3e2809(0x4f2)}}},'queue':{'label':_0x3e2809(0x4c3),'scope':_0x3e2809(0x1a1),'description':_0x3e2809(0x57c),'operations':{'read':{'label':'Read','summary':_0x3e2809(0x5a9)},'write':{'label':_0x3e2809(0x6bc),'summary':_0x3e2809(0x738)},'work':{'label':'Work','summary':'Worker-side:\x20claim,\x20heartbeat,\x20complete,\x20fail,\x20progress.'}}},'files':{'label':_0x3e2809(0x20c),'scope':_0x3e2809(0x1a1),'description':'Blob\x20storage:\x20large\x20file\x20uploads\x20attached\x20to\x20records\x20or\x20stored\x20standalone.','operations':{'read':{'label':_0x3e2809(0x474),'summary':_0x3e2809(0x2f7)},'write':{'label':_0x3e2809(0x6bc),'summary':'Upload,\x20update\x20metadata,\x20and\x20delete\x20files.'}}},'functions':{'label':'Functions','scope':'env','description':_0x3e2809(0x378),'operations':{'read':{'label':_0x3e2809(0x474),'summary':_0x3e2809(0x1ad)},'write':{'label':_0x3e2809(0x6bc),'summary':_0x3e2809(0x533)},'run':{'label':_0x3e2809(0x70e),'summary':_0x3e2809(0x775)}}},'views':{'label':_0x3e2809(0x517),'scope':_0x3e2809(0x1a1),'description':'Materialized\x20views:\x20query\x20definitions\x20that\x20are\x20continuously\x20maintained\x20and\x20queryable.','operations':{'read':{'label':'Read','summary':'List\x20views,\x20query\x20view\x20output,\x20inspect\x20metadata\x20and\x20definition.'},'write':{'label':_0x3e2809(0x6bc),'summary':_0x3e2809(0x499)}}},'env':{'label':_0x3e2809(0x6ad),'scope':_0x3e2809(0x1a1),'description':_0x3e2809(0x6d8),'operations':{'read':{'label':'Read','summary':_0x3e2809(0x669)},'write':{'label':_0x3e2809(0x6bc),'summary':_0x3e2809(0x2b3)}}},'auth':{'label':_0x3e2809(0x6a4),'scope':_0x3e2809(0x256),'description':_0x3e2809(0x4bf),'operations':{'read':{'label':_0x3e2809(0x474),'summary':'List\x20tokens\x20and\x20users.'},'write':{'label':'Write','summary':'Create,\x20update,\x20and\x20delete\x20tokens\x20and\x20users;\x20rotate\x20keys.'}}},'system':{'label':_0x3e2809(0x371),'scope':_0x3e2809(0x256),'description':_0x3e2809(0x1a2),'operations':{'read':{'label':_0x3e2809(0x474),'summary':_0x3e2809(0x35a)},'write':{'label':_0x3e2809(0x6bc),'summary':_0x3e2809(0x18c)}}},'sync':{'label':'Sync','scope':_0x3e2809(0x256),'description':_0x3e2809(0x5db),'operations':{'read':{'label':_0x3e2809(0x474),'summary':_0x3e2809(0x5b6)},'write':{'label':_0x3e2809(0x6bc),'summary':_0x3e2809(0x4e0)},'peer':{'label':_0x3e2809(0x5b9),'summary':_0x3e2809(0x1b2),'machineOnly':!![]}}},'protected':{'label':_0x3e2809(0x42d),'scope':_0x3e2809(0x216),'description':_0x3e2809(0x527),'operations':{'read':{'label':'Read','summary':'May\x20read\x20system\x20types\x20when\x20also\x20granted\x20the\x20underlying\x20read\x20permission.'},'write':{'label':_0x3e2809(0x6bc),'summary':_0x3e2809(0x47b)}}}},_0x1bbad9={'schema:read':[_0x3e2809(0x638),_0x3e2809(0x72c),_0x3e2809(0x5e5)]},_0x29338c=['read',_0x3e2809(0x194),_0x3e2809(0x2ca),_0x3e2809(0x4f7),_0x3e2809(0x73a),_0x3e2809(0x322)];function _0x40a412(){const _0x651845=_0x3e2809,_0x556d31=[];for(const [_0x5887be,_0x5ea913]of Object[_0x651845(0x352)](_0x9831bb)){for(const _0x2eb172 of Object[_0x651845(0x35c)](_0x5ea913['operations'])){_0x556d31[_0x651845(0x494)](_0x5887be+':'+_0x2eb172);}}return _0x556d31;}function _0x3fdc66(_0x5944c7){return _0x9831bb[_0x5944c7]||null;}function _0x50c9f3(_0x160b17,_0xd5353e){const _0x17ab9e=_0x3e2809;return _0x9831bb[_0x160b17]?.[_0x17ab9e(0x347)][_0xd5353e]||null;}return okdbAuthNamespaces={'NAMESPACES':_0x9831bb,'IMPLIED_BY':_0x1bbad9,'OP_ORDER':_0x29338c,'listAllPermissions':_0x40a412,'getNamespaceMeta':_0x3fdc66,'getOperationMeta':_0x50c9f3},okdbAuthNamespaces;}var okdbAuthPermissions,hasRequiredOkdbAuthPermissions;function requireOkdbAuthPermissions(){const _0x638ad7=_0x5411c3;if(hasRequiredOkdbAuthPermissions)return okdbAuthPermissions;hasRequiredOkdbAuthPermissions=0x1;const {IMPLIED_BY:_0x52d51b}=requireOkdbAuthNamespaces(),_0x130539=new Set([_0x638ad7(0x6cc),_0x638ad7(0x194)]);function _0xacaed6(_0x3f3279,_0x46c4b4){const _0x2a410d=_0x638ad7;if(!Array[_0x2a410d(0x729)](_0x3f3279)||_0x3f3279['length']===0x0)return![];for(const _0x3f4271 of _0x3f3279){if(typeof _0x3f4271!==_0x2a410d(0x54f)||!_0x3f4271['includes'](':')){if(_0x3f4271==='*')return!![];continue;}const [_0x3b085e,_0x2ea8bd]=_0x3f4271[_0x2a410d(0x5ed)](':'),[_0x5c04c7,_0x464d2b]=_0x46c4b4['split'](':'),_0x301d0d=_0x3b085e==='*'||_0x3b085e===_0x5c04c7,_0x4fecff=_0x2ea8bd==='*'||_0x2ea8bd===_0x464d2b;if(_0x301d0d&&_0x4fecff)return!![];}const _0x999e03=_0x52d51b[_0x46c4b4];if(_0x999e03)for(const _0x23e886 of _0x999e03){if(_0xacaed6(_0x3f3279,_0x23e886))return!![];}return![];}function _0x4b83b7(_0x1a6e83,_0x1f0bdd){const _0x41d2d1=_0x638ad7,_0x2857fc=new Set();if(Array[_0x41d2d1(0x729)](_0x1a6e83)){for(const _0x5b746b of _0x1a6e83)_0x2857fc[_0x41d2d1(0x41a)](_0x5b746b);}if(Array['isArray'](_0x1f0bdd)){for(const _0x4c57ee of _0x1f0bdd)_0x2857fc[_0x41d2d1(0x41a)](_0x4c57ee);}return Array[_0x41d2d1(0x716)](_0x2857fc);}function _0x31aa08(_0x4eea8e){const _0x251191=_0x638ad7;if(typeof _0x4eea8e!==_0x251191(0x54f))return![];const [,_0x43fa90]=_0x4eea8e['split'](':');return _0x130539[_0x251191(0x4e7)](_0x43fa90);}function _0xa49263(_0x43ddf3){const _0xb9e2db=_0x638ad7;return _0x31aa08(_0x43ddf3)?'protected:read':_0xb9e2db(0x3d7);}function _0x743ab5(_0x4dd98f,_0x29993e){const _0x735fff=_0x638ad7;return _0x4b83b7(_0x4dd98f['permissions']||[],_0x29993e?(_0x4dd98f[_0x735fff(0x1bb)]||{})[_0x29993e]||[]:[]);}function _0x1d0a1c(_0x21ac7f){const _0x5eaa8e=_0x638ad7,_0x459c50=[];for(const _0x51b95f of _0x21ac7f[_0x5eaa8e(0x33c)]()){const _0x2f2a45=_0x51b95f[_0x5eaa8e(0x43b)]?.[_0x5eaa8e(0x557)];if(!_0x2f2a45)continue;_0x2f2a45[_0x5eaa8e(0x68d)]&&!_0x2f2a45[_0x5eaa8e(0x235)]&&_0x459c50['push'](_0x51b95f['method']+'\x20'+_0x51b95f[_0x5eaa8e(0x504)]+_0x5eaa8e(0x4fd)+(_0x51b95f['operation']['id']??'?')+')');}if(_0x459c50[_0x5eaa8e(0x1b1)])throw new Error(_0x5eaa8e(0x513)+_0x459c50[_0x5eaa8e(0x2b6)](_0x5eaa8e(0x7ad)));}return okdbAuthPermissions={'hasPermission':_0xacaed6,'unionPermissions':_0x4b83b7,'isReadOperation':_0x31aa08,'resolveProtectedGate':_0xa49263,'getEffectivePermissions':_0x743ab5,'assertEveryRouteHasPermission':_0x1d0a1c},okdbAuthPermissions;}var okdbJwtUtils,hasRequiredOkdbJwtUtils;function _0x358f(){const _0x42f1c7=['PIN','[okdb]\x20port\x20','SCHEMA_VALIDATION_FAILED','[okdb]\x20warning:\x20could\x20not\x20read\x20node\x20identity/licenses\x20before\x20reset\x20(','LICENSE_INVALID','recheck','authMode','openDB','\x20\x20Note:\x20this\x20node\x20has\x20existing\x20tokens.\x20They\x20will\x20coexist\x20with\x20cluster\x20tokens\x0a','_timer','effective','holder','assertFeature','workersFlag','regex','bodyMode','update','processor:retry','[okdb]\x20backing\x20up\x20to\x20','\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','sha256','\x20cf-ray=','allSettled','number','id:\x20','req','createServer','\x0a===\x20OKDB_DIAG\x20','selfKey','ms\x20activeWriters=','_bpWaiters','[filter]','typesPerEnv','isDead','darwin','params','\x20\x20Common\x20causes:','_released','processor:progress','OKDB_HTTP_WORKERS\x20env','_inflight','_normalizeOAuthAuthResult','options','Query','dead','function','/type/users/query\x0a\x20\x20\x20\x20','registry\x20heartbeat\x20skipped\x20(writer=','\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','list','_authOptions','attachFeed','Execute\x20functions\x20over\x20HTTP/MCP/shell.','\x20licenses',');\x20','_active',':\x20processor\x20(HTTP-silent),\x20','_jwksCache','DELETE\x20type/users/item/x','OKDBSchemaCollectionError','[okdb-cluster]\x20','createEnvironment','INTERNAL_ERROR','stdin','reason','_fetchJwks','INDEX_NOT_REGISTERED','Forbidden\x20—\x20no\x20permissions\x20available','_lastCpuWindowMs','Type\x20definitions,\x20all\x20index\x20registrations\x20(byIndex,\x20FTS,\x20vector),\x20and\x20TTL\x20policy.','\x27\x20on\x20type\x20\x27','(empty)','VIEW_PROGRESS','.kdb_history','once','groups','\x1b[32m','liveThreadStats','createHash','recordWrite','\x20oldestPendingMs=','decodeLicenseBlob','maxAge','\x20uses\x20raw\x20bodyMode\x20without\x20addRaw/raw\x20route\x20metadata','pause','env/staging/info','\x20\x20Envs:\x20\x20\x20\x20','\x20on\x20this\x20data\x20path\x20runs\x20okdb\x20','typeSubDbs','system:type_drop','__OKDB_PUB_FINGERPRINT__','cluster:','copy','[okdb]\x20loaded\x20config:\x20','0123456789ABCDEFGHJKMNPQRSTVWXYZ','[okdb]\x20reset\x20aborted','\x20\x20(name:\x20','_cmd','_openEnvLazy','ingest','\x20\x20(','logs','slice','some','txn:end','\x20\x20\x20\x20\x20\x20\x20','starting','epoch','\x0a\x20\x20','/types\x0a\x20\x20\x20\x20','/api/env/','[okdb]\x20error:\x20--address\x20is\x20required\x20for\x20join\x20(this\x20node\x27s\x20reachable\x20sync\x20address).\x0a','UNPROCESSABLE_ENTITY','\x20\x20║','include','verifyActivation','draining','Pause/resume\x20processor,\x20trigger\x20backups,\x20restore.','ENV','register','_versionSkewWarned','81720LBNpjL','\x20<path>\x20[json-body]','--watch','http://localhost:','query','\x20\x20\x20\x20\x20\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','EADDRINUSE','access-control-max-age','--no-admin','_instanceId','scrypt','Activation\x20invalid:\x20',',\x20got\x20','yellow','INDEX_HAS_CONSUMERS','getPins',')\x20—\x20they\x20will\x20NOT\x20be\x20preserved','env','Operator\x20surface:\x20server\x20info,\x20logs,\x20event\x20streams,\x20processor\x20status,\x20backups.','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20','processors','\x20for\x20commands,\x20','[okdb-cluster]\x20slot=','\x20log\x20level:\x20','received\x20',')\x20exited\x20','dropSchema','Invalid\x20token','address','List\x20functions\x20and\x20inspect\x20their\x20source.','_totalReads','\x20\x20\x20\x20path:\x20\x20\x20\x20','processingStatusView','length','Machine-to-machine\x20cluster\x20protocol\x20(join\x20handshake,\x20replication\x20channel,\x20traffic).\x20Grant\x20only\x20to\x20peer\x20nodes\x20—\x20not\x20to\x20humans.','body:\x20','type/users/query\x20{\x22active\x22:true}','_threadStats','okdb_session','_lock','updatedAt','\x1b[31m','PUT','grants','fast','writes','~tokens','instances','\x20references\x20','identity','field:resolver_registered','resetIndex','index:ready','MALFORMED_TOKEN','txn:rollback','OKDBForeignKeyDeleteError','_writer','then','loop-lag\x20','note','_desired','POST','help','cookieName','padStart','\x20\x20\x20\x20','server','view','_children','[okdb]\x20error:\x20remove\x20requires\x20an\x20id\x20argument','[okdb]\x20./okdb-data\x20already\x20exists\x20—\x20skipping','\x20process','maxWrites','homedir','authenticateRequest','\x20\x20\x20\x20license:\x20⚠\x20OPEN\x20—\x20','oauth','\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site','[okdb]\x20invalid\x20port:\x20','count','_held','resetReadTxn','\x0a\x20\x20Joined.\x20Remote\x20tokens\x20replicated.\x20You\x20can\x20now\x20log\x20in\x20with\x20cluster\x20credentials.\x0a','_dedupeKey','readMs','formatCookie','hasCanonical','\x20days\x20—\x20POC/demo\x20only,\x20not\x20node-bound)','indexToDb','\x22.\x20Use:\x20create,\x20list,\x20revoke',',\x20stopping\x20workers…\x0a','assign','_totalReadMs','percentile','fn-runner','integer','standard','history','repeat','OKDBIndexHasConsumersError','utf8','ms\x20p99=','fts:','replace','[okdb]\x20invalid\x20log\x20level:\x20\x22','floor','Schema\x20&\x20Indexes','_role','[okdb]\x20exporting\x20env\x20\x22','raw-remove','created','transactionSync','_adminRelay','exec','toString','middlewares','iss','\x20result','selfAddress','valid','\x20\x20\x20\x20\x20explicit\x20method\x0a\x0a\x20\x20','randomBytes','randomUUID','destroy','Files','\x20sync','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20has\x20expired\x20—\x20request\x20a\x20fresh\x20one.','shmbufNative','\x20+\x20','license:added','[okdb-cluster]\x20change-feed\x20init\x20failed:\x20','[okdb]\x20shutdown\x20drain\x20exceeded\x203000ms\x20—\x20hard-exiting\x0a','version','\x20MB)','gate','_drain','allowedAlgs','toISOString','_maybePublish','token','env:removed','line','_holderDead','reset','_lastPublishAt','_envs','role','expires','isBuffer','envsOpen','set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)','closeIdleConnections','\x0a-----END\x20CERTIFICATE-----\x0a','_outstanding','magenta','metrics','\x20\x20All\x20checks\x20passed.\x0a','parseInt','summary','clear','\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','createPublicKey','--drop','Bearer\x20$1…','cookie','permission','INDEX_REGISTERED','okdb-http-worker-child.js','set','item:update','No\x20tokens.','firstTs','[okdb]\x20started\x20in\x20','./okdb-export.ndjson','USE','FEATURES','query.','event','sourceType','--address','\x20\x20\x20\x20•\x20an\x20activation\x20token\x20\x20(124\x20chars)','database\x20path\x20not\x20writable:\x20','message','{}[]:,\x27\x22','(worst\x20','signCookie','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20','\x20===','[okdb]\x20export\x20complete','__writeCounter','importBlobs','hidden','prependListener','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Unsupported\x20JWT\x20alg:\x20','node:perf_hooks','handler','response','system','jwks_uri','servers','~licenses','ESRCH','build','resolve','_heldTotal','_getJwkKey',';\x20Secure','HTTP\x20server\x20already\x20running','files','heapUsed','_bestMatch','debug','\x20\x20╚═══════════════════════════╝','gray','\x1b[1m','data','loadEnvFile','toUpperCase','toFixed','--no-cluster','\x20phase=','1ofN:','fromEntries','[okdb]\x20error:\x20show\x20requires\x20an\x20id\x20argument','confirm','sig','getHeader','mode','stopping','FOREIGN_KEY_VIOLATION','http','[okdb]\x20created\x20.kdbconfig','test','_supervisorKey','tags','targetType','xdg-open\x20','isActive','handle','memoryUsage','end','level:\x20info','INDEX_ALREADY_REGISTERED','queue-worker','closeAllConnections','credentials','cf-connecting-ip','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20','ms\x0a','pathParams','\x20records…','\x20\x20\x20\x20\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/','_buildOwnRow','_shouldWrapResponse','\x20\x20[okdb]\x20','type/users\x20--help','\x20\x20\x20\x20\x20http://localhost:','Validation\x20failed:\x20','SIG_INVALID','kdb_admin_oauth_state','\x20HTTP\x20workers,\x20primary\x20=\x20processor)','_buildChildRow','licenseType','_lookupByName','Records\x20inside\x20your\x20types\x20—\x20the\x20actual\x20rows\x20you\x20store.','_removeRowAsync','--no-repl','trim','resetting','fetch','standalone','—\x20/api/\x20is\x20auto-prefixed,\x20env\x20is\x20auto-injected','\x20forked\x20','sync:apply','_totalRequests','_flushDebounce','bootstrapBlocked','addSSE','unclaimed','_pending','\x20deleted','[okdb]\x20closed\x20cleanly\x0a','digest','Search','[okdb]\x20error:\x20','stack','migrations','events','listen','(on\x20any\x20path\x20command)','Create,\x20delete,\x20and\x20compact\x20environments.','\x20\x20╔═══════════════════════════╗','cli','join','config\x20http.workers','--types','_ensureDesired','_isFree','drop','SIGTERM','types','toLowerCase','_onItem','registry\x20publish\x20failing:\x20','_bpParkedTotal','false','statusCode','_totalWriteMs',':\x20connected\x0a\x0a','expired','setTtl','claimGated','queue','run','--username','map','\x20missing\x20path\x20field\x20in\x20inputSchema:\x20','OKDBInvalidValueError','nodesView','setupPrimary','--workers','keep-alive','rss','\x22\x20on\x20\x22','existsSync','host','recent\x20writes\x20(newest\x20first)','sandbox','_coordinator','\x20months\x20from\x20issuance)','indexOf','onWindow','CHANGEFEED_QUANTUM','Version\x20mismatch\x20for\x20','(none)','unknown','nodeKey','\x0a\x0a\x20\x20','bus:env_release','_closed','meta','signalWant','updateSupervisedChildStats','abs','_sampleOwnStats','node:events','282548TmseZG','SYSTEM_STOPPED','ppid','⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20','[okdb]\x20error:\x20failed\x20to\x20read\x20','question','\x20\x20(unlimited)','\x20\x20\x20\x20license:\x20free\x20tier\x20—\x20add\x20a\x20license\x20to\x20unlock\x20sync,\x20embeddings,\x20engines,\x20time-machine','~lock','internal','procmodeack/','SYSTEM_POKE','List,\x20download,\x20and\x20inspect\x20file\x20metadata.','registerIndex','issuer','sizeBefore','access-control-request-headers','rmSync','_db','processors/','\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)','registerType','<json-body>','beforeWrite','net','processing','warn','keys/public.pem','_jwksNegativeCache','_activateProcesses','pipe',';\x20SameSite=','\x27\x20doesn\x27t\x20exist','\x20env','\x20in\x20','waiting','active','Get\x20and\x20list\x20records,\x20run\x20byIndex\x20queries.','/\x20quit\x20/\x20Ctrl+C','boolean','headers','startedAt','Create,\x20update,\x20and\x20delete\x20records\x20(including\x20bulk\x20import).','no-cache,\x20no-transform','_runMiddlewares','start\x20','\x20\x20\x20\x20writes:\x20\x20\x20\x20','\x20\x20\x20\x20\x20\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\x20\x20\x20admin:\x20http://localhost:','parkedNow','columns','undefined','match','\x20\x20Flags','\x0a\x20\x20No\x20routes\x20matching\x20\x22','peer','writes=','isWanted','INVALID_INDEX_KEY','_onProcEvent','committed','--log-level','flushDebounce','setLogger','\x20\x20Shell\x20commands','noteListenAddr','\x20\x20[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a','_refreshDesiredSnapshot','ITEM_CREATE','configureAuth','x-okdb-raw-response','index','\x20not\x20found','\x20HTTP\x20workers\x20','\x20\x20(no\x20env\x20draining)','object','expiresAt','isTTY','__vocab/version','readUInt32BE','getAuthOptions','listRoutes','validateRouteInput','OKDBInvalidPrimaryKeyError','concat','HTTP_','FTS_DROP','Build\x20expects\x20public\x20key\x20fingerprint\x20','claims','enabled','tokenSecret','LICENSE_HASH_MISMATCH','operations','_license','creating','busy','toLocaleString','use','Processors','[body]','\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','changed','--permissions','entries','\x22\x20(must\x20be\x20debug|info|warn|error)','--path','parse','inflightAgesMs','params.','_nodeDb','getCount','View\x20server\x20info,\x20logs,\x20SSE\x20event\x20streams,\x20processor\x20status,\x20backup\x20list.','Indexes','keys','_log','writeUInt32BE','\x20day(s).','alloc','subject','\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20','OKDBIndexAlreadyRegisteredError','\x20\x20\x20\x20status:\x20\x20\x20\x20active','_putRowAsync','properties','./okdb-backup','okdb-writer:\x20env\x20closing\x20—\x20retry','use\x20<env>','limits','reportThreadStats','--token','Forbidden\x20—\x20requires\x20','data:\x20','_clusterOrphanWatch','Type\x20\x27','System','online','Unauthorized','VERSION_MISMATCH','feed:','uuid','instanceId','Server-side\x20user-defined\x20functions\x20registered\x20per\x20environment.','480632HqLRQV','fts','compaction','noCluster','\x20\x20\x20\x20-\x20The\x20license\x20blob\x20has\x20not\x20been\x20added\x20yet\x20—\x20run\x20`okdb\x20license\x20<blob>`\x20first.','event:\x20','charCodeAt','info','cookies','jwksTtlMs','cpus','\x0a[okdb]\x20error:\x20','dropFts','GONE','\x20\x20✓\x20Removed\x20license\x20','dropType','ACTIVATION_EXPIRED','outputSchema','processorId','_startAdmission','_handleInProcess','36PifAWI','[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22','JWT\x20issuer\x20mismatch','stderr','ceil','shmbuf/package.json','hostname','time','Release','(code=','\x1b[36m','method','\x20\x20[','resume','type:drop','getSecurityNotices','indexes','isFinite','\x20\x20\x20\x20\x20\x20\x20POST\x20(body\x20implies\x20POST)\x0a\x20\x20','context','logLevel','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Usage:\x20','\x20which\x20does\x20not\x20exist','Token\x20must\x20be\x20a\x20JWT','port','connected','setHeader','importFromFile','_markSeen','embedded','_windowCbs','known\x20field','routes','import','dedupeMax','blobs','syncPeers',')\x20to\x20your\x20license\x20vendor.','mcp','uri','ref:violation','[res]\x20','PUBLIC_KEY_PEM','error','\x20\x20\x20\x20license:\x20','__okdbSlot','hard-killed','platform','.\x20Primary\x20keys\x20must\x20be\x20string\x20or\x20number.\x20Got:\x20','[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22','\x20querySchema\x20references\x20missing\x20input\x20field:\x20','ENVS','[okdb]\x20starting…\x0a','doctor','destroyed','_lastTick','--changes','REMOVE','processor:ready','ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)','kind','__esModule','[okdb-cluster]\x20respawning\x20worker\x20slot=','[okdb-cluster]\x20worker\x20pid=','_sandbox','createInterface','ms\x20max=','crypto','_nodeDbFor','items','(no\x20types)','cluster:\x20ready\x20(','protected:write','dbPath','Payload\x20too\x20large','reads','hint','\x20\x20\x20\x20path:\x20\x20','item:create','BOOTSTRAP_LOCALHOST_ONLY','green','splice','LOGS','\x20(must\x20be\x201–65535)','equals','OKDBForeignKeyError','JWT\x20signature\x20verification\x20failed','forceAfterMs','createLoginState','types\x20--env\x20staging','started','okdb','\x20times\x20in\x20','_drainOne','[okdb]\x20unknown\x20token\x20action:\x20\x22','statuses','route','child_process','_putRowSync','sizeAfter','\x22:\x20','(?:','commitP99Ms','processor:paused','ms\x20env=','byteLength','OKDBVersionMismatchError','\x20\x20✓\x20Revoked\x20token\x20','filter','pin','\x20\x20[okdb]\x20closed\x20cleanly\x0a','pending','[env]','_onPoke','PUT\x20type/users/item/x\x20{\x22n\x22:1}','oldestPendingMs','array','INDEX_PROGRESS','Index\x20\x22','system:bus_state_change','level','\x20worker\x20slot=','\x0a\x20\x20okdb\x20doctor\x0a','OKDBTypeNotRegisteredError','\x20already\x20exists','http.listen({workers/makeOkdb/primaryOkdb})\x20is\x20no\x20longer\x20supported\x20in\x20the\x20','round','OKDBNotFoundError','acquiredAt','_scheduleFlush','fts:drop','socket','searchParams','writeUInt8','getProcess','targetKey','guards','\x22\x20is\x20used\x20by:\x20','\x1b[35m','add','listenAddr','decodeLicenseBlob:\x20failed\x20to\x20decode\x20payload:\x20','ES256','/api/','loop-lag','LICENSED_BUILD','ID\x20token\x20is\x20not\x20accepted','fork','tokenTtl','_singletonLock','signingInput','_okdb','search','isInteger','features','disable','timingSafeEqual','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','Protected\x20(gate)','http-server','--blobs','\x20(slot=','STATUS','(workers\x20can\x27t\x20share\x20the\x20cross-process\x20HLC/clock).\x20Forcing\x20single-process\x20(was\x20','getRange','true','_seen','_dedupeMax','--ttl','disconnect','readline','CLI\x20(`okdb\x20listen`),\x20or\x20use\x20Node\x27s\x20built-in\x20`cluster`\x20module\x20and\x20call\x20','operation','--help','ITEM_REMOVE','\x20—\x20','remove','depth','issueToken','_rootDb','ensureType','base64','offWindow','origins','stopped','HELP','--version','_started','\x20\x20\x20\x20id:\x20\x20\x20\x20','SIGBREAK','_quantum','isConnected','_nestedWarned','\x20ipc\x20error:\x20','threads','audiences','License\x20signature\x20invalid\x20—\x20this\x20license\x20was\x20not\x20signed\x20by\x20the\x20key\x20paired\x20with\x20this\x20build.\x20','[okdb-cluster]\x20recommissioned\x20worker\x20slot=','_getOidcDiscovery','\x20file','OKDBIndexNotRegisteredError','/type/users\x0a\x20\x20\x20\x20','default:\x20cores−1\x20=\x20',',\x20label:\x20','default','api','is\x20not\x20allowed','sync','start','Admin','Feature\x20not\x20licensed:\x20','cyan','cors','spki','base64url','\x20(expires\x20','763812dBOBgG','user','ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20','allowHeaders','Content-Type','max','\x20→\x20POST\x20/api/env/','\x20\x20\x20\x20•\x20a\x20path\x20to\x20a\x20.license\x20file','--config','ITEM_UPDATE','_rawDb','_isReader','ttl:expired','Read','OKDBSchemaValidationError','_flushTimer','\x20writes\x20(','publishChildRow','clearTtl','procmode/','May\x20write\x20system\x20types\x20when\x20also\x20granted\x20the\x20underlying\x20write\x20permission.','terminal','_rowKey','enable','[on|off|level]','transaction','fill','Index\x20\x27','cpuWindowMs','getCmd','Feature\x20not\x20available\x20on\x20free\x20tier:\x20','BAD_GATEWAY','SYSTEM_PROC','access-control-allow-credentials','_lastCpuPct','padEnd','\x20\x20\x20\x20status:\x20\x20\x20\x20pending\x20activation','permissions',':\x20ping\x0a\x0a','passive\x20HTTP\x20worker(s)\x20serving\x20:','putSync','rawResponse','127.0.0.1','\x0a\x20\x20Invalid\x20JSON:\x20','consumeLoginState','push','msg','?\x0a\x20\x20(node\x20identity\x20and\x20licenses\x20are\x20preserved)\x0a\x20\x20Type\x20\x22yes\x22\x20to\x20confirm:\x20','⚠\x20INTERNAL\x20LICENSE\x20ACTIVE\x20—\x20all\x20features\x20and\x20limits\x20are\x20unlocked.\x20For\x20vendor/internal\x20use\x20only.','--label','Create\x20and\x20delete\x20views,\x20start,\x20stop,\x20and\x20rebuild\x20them.','types/env=','_publishFailWarned','\x20\x20\x20\x20features:\x20\x20','change','%),\x20','setOwnMeta','PUB_FINGERPRINT','authorization','records','single','shutdown','--print','ttlMs','already\x20in\x20use','min','kid','\x1b[34m','_listenAddr','_kind','off','heapTotal','peers=','description','\x20\x20\x20\x20•\x20a\x20license\x20blob\x20\x20\x20(Crockford\x20base32,\x20~150–250\x20chars)','readUInt8','\x20for\x20system\x20env','transport','node','/admin/index.html','_matchRoute','must\x20not\x20be\x20null','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20GET\x20(implicit)\x0a\x20\x20','sort','OKDBTypeAlreadyRegisteredError','system:poke','licenseHash','Bearer\x20','API\x20tokens,\x20users,\x20and\x20credentials.','_enqueuedAt','License\x20signature\x20invalid:\x20','pushEphemeral','Queue','state','free\x20tier','PERMISSIONS','_ownMeta','\x20supervised)','decommissioned','constructor','isWorker','hasDesired','put','\x20\x20skipped=','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20was\x20issued\x20for\x20a\x20different\x20node\x20—\x20share\x20this\x20node\x27s\x20PIN\x20with\x20the\x20vendor.','1085068MjkmzO','workers','Lax','_collectWriterFacet','sse','\x20license(s)','\x20\x20✓\x20database\x20opened\x0a','\x20records','scope','find','TYPE_NOT_REGISTERED','ms/','INDEX_RESET','win32','logRequests','flatMap','Register,\x20configure,\x20and\x20remove\x20cluster\x20peers.','\x20has\x20ambiguous\x20binding\x20for\x20path\x20field:\x20','x-forwarded-for','HEAD','\x20worker(s)\x20still\x20serving','isSetupMode','License\x20already\x20stored','has','respawnTimer','_statusEnv','mcp-session-id','_draining','_singletonLocks','~processes:cmd','backup','no\x20.kdbconfig\x20(using\x20defaults)','_hbTimer','shell','Execute\x20full-text\x20and\x20vector\x20searches.','\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','auth=','dynamic','flushLmdb','write','parseBearer','ENV_CLOSING_RETRY','remaining-fields','\x20\x20Tier:\x20\x20\x20\x20','kill','\x20(id:\x20','payload','forEach','https','_desiredOverlay','never','\x20has\x20illegal\x20binding\x20target\x20for\x20','path','\x20more)','_bucketIdx','SERVICE_UNAVAILABLE','stream','process','null','activation','force','external','\x20\x20\x20\x20\x20\x20\x20\x20\x20OKDB\x20SHELL\x20\x20\x20\x20\x20\x20\x20\x20','size','_buckets','\x20\x20Error:\x20','ready','The\x20following\x20routes\x20require\x20auth\x20but\x20declare\x20no\x20permission:\x0a\x20\x20','_heartbeatInFlight','noRepl','ALREADY_EXISTS','Views','allowMethods','perf_hooks','processKey','EXIT','\x1b[2m','url','INDEX_READY','system:ready','ms\x20busy=','OPEN','keys:','GET','_highWater','\x20\x20✗','_processStartedAt','Gate\x20flag\x20required\x20to\x20touch\x20system\x20types\x20(those\x20whose\x20name\x20starts\x20with\x20\x22~\x22).\x20Combined\x20with\x20the\x20underlying\x20namespace\x20permission.','\x20drainAge=','\x0a\x20\x20✓\x20License\x20added','_acquiredAt','label','\x20does\x20not\x20exist','fanout','Examples','[okdb]\x20importing\x20','\x22\x20already\x20exists','dropIndex','.log','Register,\x20update,\x20and\x20delete\x20function\x20definitions.','current','[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22','invalid','OKDB_HTTP_WORKERS','\x20\x20Usage:\x20logs\x20[on|off|debug|info|warn|error]','\x20\x20\x20\x20api:\x20\x20\x20http://localhost:','isSystem','supervisorKey','decodeActivationToken:\x20expected\x2077\x20bytes,\x20got\x20','\x22\x20matches\x20','x-requested-with','ms\x20on\x20env=','stringify','application/json','ttl:clear','cluster','param','_licenseHash','exportBlobs','log','revoke','title','\x0a\x20\x20No\x20documentation\x20found\x20for:\x20','migrate','Shutting\x20down\x20due\x20to\x20license\x20expiry','\x0a\x20\x20[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a','okdb-diag.','string','_clusterWorkerAttached','<path>','none','FORBIDDEN','_enableChangelog','changes','timeMachine','access','INVALID_PRIMARY_KEY','FTS_REGISTERED','\x20\x20Example:\x20okdb\x20join\x20https://node-a.example.com\x20--token\x20<t>\x20--address\x20http://myhost:8484\x0a','active:','SWAP','drain','stats','~processes:desired','cpuUsage','extend','--password','\x20\x20·\x20\x20','\x20\x20\x20\x20\x20\x20','writeMs','Embeddings','index:reset','[okdb]\x20failed\x20to\x20parse\x20config\x20file\x20','_caps','.okdb-write-test','Hint:\x20','roles','files/','caps','UNSUPPORTED_MEDIA_TYPE','isFile','_oidcDiscoveryCache','\x20\x20\x20\x20api:\x20\x20\x20\x20\x20http://localhost:','pathname','\x20(must\x20be\x20true\x20or\x20false)','bindings','writeUInt16BE','exports','load','Invalid\x20index\x20key\x20type\x20for\x20\x27','inputSchema','detachConsole','Background\x20job\x20queue:\x20enqueue\x20work,\x20observe\x20state,\x20and\x20process\x20jobs.','status','_totalWrites','_cursors','_admissionTimer','heartbeatMs','cursorKey','\x20writer{depth=','\x0a\x20\x20\x20\x20\x20\x20','VALIDATION_ERROR','config','node/','\x1b[90m','\x20worker(s)\x20remaining',';\x20Expires=','catch','licenses','\x20\x20+',']:\x20transaction\x20ran\x20nested\x20inside\x20a\x20write\x20txn\x20held\x20open\x20by\x20a\x20non-writer\x20caller','Open\x20licenses\x20cannot\x20exceed\x206\x20months\x20duration\x20(this\x20license\x20expires\x20','raw-put','_onStop','exit','_totalErrors','okdb.http.listen(port)\x20in\x20each\x20worker.','every','\x20/\x20','\x20\x20#','OPTIONS','Data','init','activate','tierList','result','schema:drop','_publishNow','_onTick','removeLicense','_enforceOperationAccess','\x20\x20\x20\x20name:\x20\x20\x20\x20\x20\x20\x20\x20','\x0a\x20\x20\x20\x20','--name','decommission','[okdb]\x20error:\x20--password\x20requires\x20--name','licensee','List\x20jobs,\x20view\x20stats,\x20list\x20buckets.','\x20\x20✓\x20OKDB\x20server\x20running','cause','\x27:\x20','[okdb]\x20invalid\x20','bus:drain','key','verifyCookie','fieldPath','Origin','remoteAddress','removeSync','exp','View\x20peer\x20status\x20and\x20replication\x20stats.','\x20cannot\x20be\x20MCP-exposed\x20without\x20an\x20explicit\x20adapter\x20because\x20it\x20uses\x20','addSupervisedChild','Peer','\x20type','reload','errors','\x20pid=','processor:error','engines','processorsView','NOT_FOUND','\x20more','_validateOidcAccessToken','stopHeartbeat','json','stdout','_isStale','isEnabled','\x20\x20\x20http://localhost:','[okdb]\x20primary\x20okdb\x20close\x20error:\x20','view:progress','code','config\x20file\x20valid:\x20','slot','assertLimit','argv','Unknown\x20error','_activateProcessesReader','last-event-id',';\x20Path=','[okdb]\x20.kdbconfig\x20already\x20exists\x20—\x20skipping','\x20@\x20','worker','_groupByProcess','_admissionStarted','matcher','Cluster\x20replication.\x20The\x20\x22peer\x22\x20op\x20is\x20for\x20cluster\x20nodes,\x20not\x20human\x20users.','\x20opening\x20','\x20\x20Or\x20set\x20sync.address\x20in\x20.kdbconfig','primary','rowKey','get','bind','blob','participate','close','search:query','_startHeartbeat','jwksUri','okdb_session_','dirname','/([^/]+)','allocUnsafe','\x1b[0m','split','9rkZAZR','--log-requests','\x0a[okdb]\x20received\x20','clearCookie','Foreign\x20key\x20violation:\x20','white','\x0a\x20\x20okdb\x20—\x20standalone\x20OKDB\x20server\x0a\x0a\x20\x20Usage:\x0a\x20\x20\x20\x20okdb\x20[options]\x0a\x20\x20\x20\x20okdb\x20<command>\x0a\x0a\x20\x20Options:\x0a\x20\x20\x20\x20-p,\x20--port\x20<port>\x20\x20\x20\x20\x20\x20\x20\x20HTTP\x20port\x20(default:\x208484)\x0a\x20\x20\x20\x20-d,\x20--path\x20<dir>\x20\x20\x20\x20\x20\x20\x20\x20\x20Database\x20directory\x20(default:\x20./okdb-data)\x0a\x20\x20\x20\x20-k,\x20--key\x20\x20<secret>\x20\x20\x20\x20\x20\x20Encryption\x20key\x20for\x20data\x20at\x20rest\x0a\x20\x20\x20\x20-c,\x20--config\x20<file>\x20\x20\x20\x20\x20\x20Config\x20file\x20path\x20(default:\x20.kdbconfig)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--log-level\x20<level>\x20\x20Log\x20level:\x20debug\x20|\x20info\x20|\x20warn\x20|\x20error\x20(default:\x20info)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-repl\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Start\x20server\x20without\x20interactive\x20shell\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-admin\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20admin\x20UI\x0a\x20\x20\x20\x20\x20\x20\x20\x20--open\x20[ip\x20...]\x20\x20\x20\x20\x20\x20Open\x20mode:\x20bypass\x20auth\x20for\x20listed\x20IPs\x20(default:\x20localhost).\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Examples:\x20--open\x20\x20--open\x20192.168.1.0/24\x20\x20--open\x20*\x0a\x20\x20\x20\x20\x20\x20\x20\x20--log-requests\x20\x20\x20\x20\x20\x20\x20Print\x20every\x20HTTP\x20request\x20to\x20stdout\x20(for\x20debugging)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--workers\x20<n>\x20\x20\x20\x20\x20\x20\x20\x20Number\x20of\x20capable\x20worker\x20processes\x20sharing\x20the\x20listen\x20socket\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20(default:\x20cores\x20−\x201).\x20Each\x20worker\x20serves\x20HTTP\x20+\x20SSE\x20AND\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20processes\x20(claims\x20leases,\x20drains\x20on\x20its\x20own\x20loop);\x20the\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20cluster\x20primary\x20is\x20a\x20thin\x20passive\x20supervisor.\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-cluster\x20\x20\x20\x20\x20\x20\x20\x20\x20Run\x20single-process\x20(equivalent\x20to\x20--workers\x201)\x0a\x20\x20\x20\x20-v,\x20--version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Print\x20version\x20and\x20exit\x0a\x20\x20\x20\x20-h,\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x0a\x0a\x20\x20Commands:\x0a\x20\x20\x20\x20version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Print\x20version\x20and\x20exit\x0a\x20\x20\x20\x20doctor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Run\x20health\x20checks\x0a\x20\x20\x20\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Create\x20.kdbconfig\x20and\x20okdb-data/\x0a\x20\x20\x20\x20token\x20create\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Create\x20a\x20token\x20in\x20the\x20local\x20DB\x20(direct\x20access,\x20no\x20HTTP)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--name\x20<name>\x20\x20\x20\x20\x20\x20For\x20password\x20login\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--password\x20<pass>\x20\x20Password\x20(requires\x20--name)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--label\x20<text>\x20\x20\x20\x20\x20Human\x20description\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--permissions\x20<l>\x20\x20Comma-separated\x20baseline\x20permissions\x20(e.g.\x20\x22*\x22\x20or\x20\x22data:read\x22)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--grants\x20<json>\x20\x20\x20\x20Per-env\x20grants\x20as\x20JSON\x20(e.g.\x20\x27{\x22orders\x22:[\x22data:*\x22]}\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--ttl\x20<ms>\x20\x20\x20\x20\x20\x20\x20\x20\x20Optional\x20TTL\x20in\x20milliseconds\x0a\x20\x20\x20\x20token\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20List\x20all\x20tokens\x20in\x20the\x20local\x20DB\x0a\x20\x20\x20\x20token\x20revoke\x20<id>\x20\x20\x20\x20\x20\x20\x20\x20Revoke\x20(delete)\x20a\x20token\x20by\x20id\x20(full\x20uuid\x20or\x20unique\x20prefix)\x0a\x20\x20\x20\x20join\x20<address>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Join\x20an\x20existing\x20cluster\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--token\x20<t>\x20\x20\x20\x20\x20\x20\x20\x20Bearer\x20token\x20from\x20the\x20cluster\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--username\x20<u>\x20\x20\x20\x20\x20Or,\x20username\x20for\x20login\x20exchange\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--password\x20<p>\x20\x20\x20\x20\x20Password\x20for\x20login\x20exchange\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--address\x20<addr>\x20\x20\x20This\x20node\x27s\x20reachable\x20sync\x20address\x20(required)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--path\x20<dir>\x20\x20\x20\x20\x20\x20\x20Local\x20DB\x20path\x0a\x20\x20\x20\x20backup\x20[dir]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Hot\x20filesystem\x20backup\x20via\x20LMDB\x20native\x20copy\x20(default:\x20./okdb-backup)\x0a\x20\x20\x20\x20export\x20<file>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Streaming\x20NDJSON\x20logical\x20export\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env\x20<name>\x20\x20\x20\x20\x20\x20env\x20to\x20export\x20(default:\x20default)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--types\x20<a,b,...>\x20comma-separated\x20type\x20filter\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--changes\x20\x20\x20\x20\x20\x20\x20\x20\x20include\x20changelog\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--blobs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20also\x20export\x20blob\x20files\x20alongside\x0a\x20\x20\x20\x20import\x20<file>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Streaming\x20NDJSON\x20logical\x20import\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env\x20<name>\x20\x20\x20\x20\x20\x20target\x20env\x20override\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--types\x20<a,b,...>\x20import\x20only\x20these\x20types\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--drop\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20drop\x20&\x20recreate\x20existing\x20types\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--changes\x20\x20\x20\x20\x20\x20\x20\x20\x20restore\x20changelog\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--blobs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20also\x20import\x20blob\x20files\x20alongside\x0a\x20\x20\x20\x20reset\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Delete\x20and\x20recreate\x20database\x20(with\x20confirmation);\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20node\x20identity\x20and\x20licenses\x20are\x20preserved\x0a\x20\x20\x20\x20license\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20List\x20stored\x20licenses,\x20current\x20tier,\x20and\x20usage\x0a\x20\x20\x20\x20license\x20<blob|path>\x20\x20\x20\x20\x20\x20Add\x20a\x20license\x20blob\x20(or\x20read\x20from\x20a\x20.license\x20file)\x0a\x20\x20\x20\x20license\x20<activation>\x20\x20\x20\x20\x20Activate\x20a\x20previously-added\x20license\x20with\x20the\x20vendor\x27s\x20token\x0a\x20\x20\x20\x20license\x20<id>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20details\x20for\x20one\x20stored\x20license\x20(by\x20uuid\x20or\x20prefix)\x0a\x20\x20\x20\x20license\x20remove\x20<id>\x20\x20\x20\x20\x20\x20Remove\x20a\x20stored\x20license\x0a\x0a\x20\x20Environment\x20variables:\x0a\x20\x20\x20\x20OKDB_PORT\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20HTTP\x20port\x0a\x20\x20\x20\x20OKDB_PATH\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Database\x20directory\x0a\x20\x20\x20\x20OKDB_LOG_LEVEL\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Log\x20level\x20(debug|info|warn|error)\x0a\x20\x20\x20\x20OKDB_KEY\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Encryption\x20key\x0a\x20\x20\x20\x20OKDB_NO_REPL=1\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20REPL\x0a\x20\x20\x20\x20OKDB_NO_ADMIN=1\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20admin\x20UI\x0a\x20\x20\x20\x20OKDB_HTTP_WORKERS\x20\x20\x20\x20\x20\x20\x20\x20\x20Number\x20of\x20passive\x20HTTP\x20worker\x20processes\x20(default:\x20cores\x20−\x201;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20forced\x20to\x201\x20if\x20the\x20shmbuf\x20native\x20binding\x20is\x20unavailable)\x0a\x0a\x20\x20Config\x20file\x20(.kdbconfig)\x20—\x20JSON,\x20all\x20keys\x20optional:\x0a\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22port\x22:\x20\x20\x20\x20\x208484,\x0a\x20\x20\x20\x20\x20\x20\x22path\x22:\x20\x20\x20\x20\x20\x22./okdb-data\x22,\x0a\x20\x20\x20\x20\x20\x20\x22key\x22:\x20\x20\x20\x20\x20\x20\x22...\x22,\x0a\x20\x20\x20\x20\x20\x20\x22logLevel\x22:\x20\x22info\x22,\x0a\x20\x20\x20\x20\x20\x20\x22noAdmin\x22:\x20\x20false,\x0a\x20\x20\x20\x20\x20\x20\x22noRepl\x22:\x20\x20\x20false,\x0a\x20\x20\x20\x20\x20\x20\x22auth\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22open\x22:\x20false\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20Examples:\x0a\x20\x20\x20\x20okdb\x0a\x20\x20\x20\x20okdb\x20--port\x209000\x20--path\x20./mydb\x0a\x20\x20\x20\x20okdb\x20--no-repl\x20--port\x208080\x0a\x20\x20\x20\x20okdb\x20--open\x0a\x20\x20\x20\x20okdb\x20--open\x20192.168.1.0/24\x0a\x20\x20\x20\x20okdb\x20doctor\x0a\x20\x20\x20\x20okdb\x20backup\x20./my-backup\x0a','consecutiveFailures','\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/','raw','isFeatureEnabled','NAME','fts:reset','\x20\x20Path\x20access','_durs','references','tryAcquire','(unset)','{}[]:,\x0a\x0d\x09\x20','running','ftsName','.kdbconfig',')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census','reverse','listNodes','setSchema','isPrimary','der','name','hasOwnProperty','dim','quantum','responseStatuses','decodeLicenseBlob:\x20blob\x20too\x20short\x20(','idx:','makeOkdb','--grants','EXPIRES','delete','exposeHeaders','\x22\x20to\x20enable\x20it.','ms\x20mean=','maxExtra','clusterWorkers','getClock','env/:env','signature','send','Schema\x20validation\x20failed\x20for\x20','type:registered','decodeActivationToken:\x20input\x20must\x20be\x20a\x20string','listDesired','isAuthenticated','[okdb]\x20error:\x20--grants\x20must\x20be\x20valid\x20JSON\x20object','--open','Validation\x20failed','[okdb]\x20invalid\x20config\x20\x22http.host\x22:\x20','type/users/item/alice','OKDB_CODE_TO_HTTP_STATUS','[okdb]\x20opening\x20','\x20\x20Expected\x20one\x20of:','\x20has\x20unbound\x20input\x20fields\x20with\x20bodyMode:none:\x20','schema:set','index:registered','\x20\x20\x20\x20port:\x20\x20\x20\x20','export','createHmac','_nodeDead','unlinkSync','_cookieName','NOT_IMPLEMENTED','error:\x20','_runGuards','values','data:read','writeFileSync','lifecycle','_getType','_loginStates','_baselines','\x20already\x20in\x20use','\x0a[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a','\x20(+','_nodeDbCache','\x20\x20·\x20','value','[okdb]\x20created\x20./okdb-data','\x20has\x20ambiguous\x20query/path\x20field:\x20','TYPE_ALREADY_REGISTERED','_key','userAdded','removeNode','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20\x20\x20•\x20a\x20license\x20id\x20\x20\x20\x20\x20(uuid)','embeddings','_nestedTotal','next','building','expiry','connection','emit','statSync','appendFileSync','_sockets','details','--env','Invalid\x20primary\x20key\x20type:\x20','_lastCpuAt','call','mkdirSync','_migrateVocab','_userRouteCount','header','onLicenseExpired','prompt','\x0a\x20\x20Joining\x20cluster\x20at\x20','BAD_REQUEST','RS256','\x20document(s)\x20reference\x20it\x20with\x20onDelete:restrict','processor:resumed','shutting\x20down…\x0a','\x20\x20\x20\x203.\x20Run:\x20\x20okdb\x20license\x20<activation-token>','_selfKey','List\x20environments\x20and\x20read\x20environment\x20info.','SIGINT','system:stopped','x5c','LICENSE_EXPIRED_ACTION','verify','\x0a\x20\x20Delete\x20ALL\x20data\x20in\x20','\x20\x20\x20\x20addedAt:\x20\x20\x20','_wrapApiResponse','execArgv',';\x20shmbuf\x20native\x20missing\x20→\x20forced\x20single-process','noAdmin','Engines','ttl','aud','slotKey','--env\x20<name>','available','red','afterWrite','\x20fetching\x20','system:env_release','_lastCpuUsage','UNAUTHORIZED','guard','Forbidden','processes','_startedAt','_rotateBucket','Register/update/delete\x20types,\x20register/drop/rebuild\x20indexes,\x20set\x20TTL\x20policy.','stop','wrong_node','_dispatch','\x20SECURITY\x20NOTICE','index:drop','decoded','authRequired','deaths','[okdb]\x20imported\x20\x20types=','pid','maxBodyBytes','authenticateToken','List\x20types,\x20get\x20type\x20schema,\x20list\x20registered\x20indexes.','SIGKILL','\x20documents\x20fail\x20validation','views','HTTP\x20','\x20environment\x20','[okdb]\x20error:\x20join\x20requires\x20a\x20remote\x20address.\x20Usage:\x20okdb\x20join\x20<address>\x20--token\x20<t>','unique:violation','\x20has\x20ambiguous\x20binding\x20for\x20query\x20field:\x20',',\x20closing…\x0a','quit','dumpedAt','commitsPerSec','defaults','No\x20license\x20found\x20matching\x20this\x20activation\x20token','[okdb]\x20error:\x20join\x20requires\x20credentials.\x20Provide\x20--token\x20<t>\x20or\x20--username\x20<u>\x20--password\x20<p>','getDesired','Auth','email','tokenType','now','_lockDb','field','content-type','putNode','\x0a\x20\x20✓\x20License\x20activated','Environments','\x20(must\x20be\x20a\x20string\x20or\x20array\x20of\x20strings)','val','\x20\x20records=','_heartbeatTimer','username','\x20\x20Writes:\x20\x20','Access-Control-Request-Headers','[okdb]\x20exporting\x20blobs…','hasType','\x1b[37m','safety','license:invalid','readFileSync','_isClusterController','Write','body','./okdb-data','\x20HTTP\x20server(s)\x20on\x20port\x20','processor',';\x20Max-Age=0;\x20Expires=Thu,\x2001\x20Jan\x201970\x2000:00:00\x20GMT','\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.','listLicenses','derivePin','LICENSE_ALREADY_STORED','_collectSingletonClaims','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','_wantDb','addedAt','sub','[okdb]\x20error:\x20revoke\x20requires\x20an\x20id\x20argument','read','_systemEnv','reap','\x0a\x20\x20Usage:\x20use\x20<env-name>\x0a','clearThreadStats','unref','children','OKDBError','PATCH','Unique\x20constraint\x20violated\x20on\x20',';\x20HttpOnly','functions','Environment\x20lifecycle.\x20Listing\x20and\x20creating\x20envs\x20is\x20system-level.','shift','Internal\x20error','uptime','setDesired','_buildProcessingFacet','[okdb]\x20invalid\x20config\x20\x22','\x20\x20Build:\x20\x20\x20key\x20fingerprint\x20','createdAt','mean','\x20(expires\x20in\x20','__identity','Unknown\x20JWKS\x20kid:\x20','/api','http.listen:\x20host\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20an\x20array\x20of\x20them','decodeLicenseBlob:\x20input\x20must\x20be\x20a\x20string','\x20origin=','DELETE','_computeStatus','LABEL','../okdb','present','primaryOkdb','open','\x20\x20(need\x20≥\x2018)','hasLimit','runtimeProcessesView','\x0d[okdb]\x20blobs:\x20','\x20\x20✓\x20http\x20listening\x20on\x20','\x27,\x20cannot\x20map\x20to\x20\x27','_committed','prototype','\x20\x20\x20\x20licensee:\x20\x20','killable','[okdb]\x20error:\x20unrecognized\x20input:\x20\x22','\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20','listening','_wantDbHandle','(null)','uncaughtException','cluster-wide','process\x20','\x20\x20\x20\x20expires:\x20\x20\x20','\x20bytes,\x20need\x20>=\x2065)','/type/users/item/alice\x0a\x20\x20\x20\x20','nbf','isHeld','license','HTTP_CLUSTER_REMOVED','detectInputType','singletonClaims','\x20\x20\x20\x20\x20control\x20log\x20verbosity\x0a\x20\x20','--test','all','Run','includes','--eval','create','sourceKey','[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a','attach','SIGINT\x20(double-tap)','from','auth','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20override\x20active\x20environment\x20for\x20this\x20call\x0a\x20\x20','114ensMrp','_validateOperationRequest','envs','is\x20required','discoveryTtlMs','_done','captureStackTrace','\x20statusEnv=','--key','_changefeed','hex','_report','failures','password','LICENSE_ACTIVATION_INVALID','--port','isArray','4654590SUUcsM','_isWriter','data:write','startsWith','origin','library\x20(okdb\x20node-model\x202.0).\x20For\x20multi-process\x20HTTP\x20serving\x20use\x20the\x20okdb\x20','163322ZCQQjC','admin','bold',':want','\x20parkedNow=','decodeActivationToken','FTS_RESET','type','Enqueue,\x20cancel,\x20retry,\x20remove\x20jobs;\x20manage\x20buckets;\x20reconcile\x20and\x20rebuild\x20stats.','bus:proc','work','shmbuf.node','querySchema','\x20logs\x20off\x0a','category','Route\x20','maxMs'];_0x358f=function(){return _0x42f1c7;};return _0x358f();}function requireOkdbJwtUtils(){if(hasRequiredOkdbJwtUtils)return okdbJwtUtils;hasRequiredOkdbJwtUtils=0x1;const _0x4d6eb9=require$$0$6,_0xacc883=require$$1$3,_0x48a878=require$$2;function _0x52b4a2(_0x14053f){const _0x398e00=_0x5511,_0x496988=String(_0x14053f||'')[_0x398e00(0x1f7)](/-/g,'+')[_0x398e00(0x1f7)](/_/g,'/'),_0xff73f0=_0x496988+'='[_0x398e00(0x1f2)]((0x4-(_0x496988['length']%0x4||0x4))%0x4);return Buffer[_0x398e00(0x716)](_0xff73f0,_0x398e00(0x444));}function _0x22d904(_0x48a05f){const _0x2f87ce=_0x5511;if(typeof _0x48a05f!==_0x2f87ce(0x54f))throw new Error(_0x2f87ce(0x1ab));const _0x36b980=_0x48a05f[_0x2f87ce(0x5ed)]('.');if(_0x36b980['length']!==0x3)throw new Error(_0x2f87ce(0x3a6));const [_0x5d2483,_0x4ab5fc,_0x1dd1f6]=_0x36b980,_0x15bfef=JSON[_0x2f87ce(0x355)](_0x52b4a2(_0x5d2483)[_0x2f87ce(0x202)](_0x2f87ce(0x1f4))),_0xb2284e=JSON[_0x2f87ce(0x355)](_0x52b4a2(_0x4ab5fc)[_0x2f87ce(0x202)](_0x2f87ce(0x1f4)));return{'header':_0x15bfef,'payload':_0xb2284e,'signature':_0x52b4a2(_0x1dd1f6),'signingInput':Buffer[_0x2f87ce(0x716)](_0x5d2483+'.'+_0x4ab5fc),'encodedHeader':_0x5d2483,'encodedPayload':_0x4ab5fc};}function _0x4fab81(_0xa02dbe){if(Array['isArray'](_0xa02dbe))return _0xa02dbe;if(_0xa02dbe==null)return[];return[_0xa02dbe];}function _0x1aa93d(_0x134034){const _0x3a1891=_0x5511,_0x17d18d=String(_0x134034||'')[_0x3a1891(0x31f)](/.{1,64}/g)||[];return'-----BEGIN\x20CERTIFICATE-----\x0a'+_0x17d18d[_0x3a1891(0x2b6)]('\x0a')+_0x3a1891(0x228);}function _0x4a33d0(_0x4b3fc0={}){const _0x28ee5e=_0x5511;if(_0x4b3fc0[_0x28ee5e(0x66c)]?.[0x0])return _0x48a878[_0x28ee5e(0x231)](_0x1aa93d(_0x4b3fc0[_0x28ee5e(0x66c)][0x0]));return _0x48a878[_0x28ee5e(0x231)]({'key':_0x4b3fc0,'format':'jwk'});}function _0x5f532b(_0x197ccf,_0x399719,_0x1e6fd8,_0x5586b7){const _0x1cc830=_0x5511;if(_0x197ccf===_0x1cc830(0x663))return _0x48a878[_0x1cc830(0x66e)]('RSA-SHA256',_0x1e6fd8,_0x399719,_0x5586b7);if(_0x197ccf===_0x1cc830(0x41d))return _0x48a878[_0x1cc830(0x66e)](_0x1cc830(0x755),_0x1e6fd8,{'key':_0x399719,'dsaEncoding':'ieee-p1363'},_0x5586b7);return![];}function _0x2fb168(_0x51dfc7){const _0x377220=_0x5511;if(typeof commonjsGlobal[_0x377220(0x29e)]===_0x377220(0x76e))return commonjsGlobal[_0x377220(0x29e)](_0x51dfc7,{'headers':{'accept':'application/json'}})[_0x377220(0x1c9)](async _0x5a8539=>{const _0x118c8c=_0x377220;if(!_0x5a8539['ok']){const _0x161a47=new Error(_0x118c8c(0x697)+_0x5a8539['status']+'\x20fetching\x20'+_0x51dfc7);_0x161a47[_0x118c8c(0x57d)]=_0x5a8539[_0x118c8c(0x57d)];throw _0x161a47;}return _0x5a8539[_0x118c8c(0x5c5)]();});return new Promise((_0x5f2d6f,_0x1e9aca)=>{const _0x5bdf6d=_0x377220,_0x300019=String(_0x51dfc7)[_0x5bdf6d(0x72d)]('https:')?_0xacc883:_0x4d6eb9,_0x865c91=_0x300019[_0x5bdf6d(0x5e0)](_0x51dfc7,{'headers':{'accept':_0x5bdf6d(0x541)}},_0x299cda=>{const _0x15becc=_0x5bdf6d;let _0x3c59ff='';_0x299cda['setEncoding'](_0x15becc(0x1f4)),_0x299cda['on'](_0x15becc(0x268),_0x284694=>{_0x3c59ff+=_0x284694;}),_0x299cda['on'](_0x15becc(0x281),()=>{const _0x7996bf=_0x15becc;if(_0x299cda[_0x7996bf(0x2c3)]<0xc8||_0x299cda['statusCode']>=0x12c){const _0x3a1447=new Error(_0x7996bf(0x697)+_0x299cda[_0x7996bf(0x2c3)]+_0x7996bf(0x67d)+_0x51dfc7);return _0x3a1447[_0x7996bf(0x57d)]=_0x299cda[_0x7996bf(0x2c3)],_0x1e9aca(_0x3a1447);}try{_0x5f2d6f(JSON['parse'](_0x3c59ff||'{}'));}catch(_0x1778b6){_0x1e9aca(_0x1778b6);}});});_0x865c91['on'](_0x5bdf6d(0x3ba),_0x1e9aca),_0x865c91['end']();});}return okdbJwtUtils={'base64UrlDecode':_0x52b4a2,'parseJwt':_0x22d904,'normalizeAudience':_0x4fab81,'normalizePemCertificate':_0x1aa93d,'jwkToKeyObject':_0x4a33d0,'verifyJwtSignature':_0x5f532b,'fetchJson':_0x2fb168},okdbJwtUtils;}var hasRequiredOkdbHttp;function requireOkdbHttp(){const _0x5d5633=_0x5411c3;if(hasRequiredOkdbHttp)return okdbHttp[_0x5d5633(0x577)];hasRequiredOkdbHttp=0x1;const _0x301872=require$$0$6,{URL:_0x15e479}=require$$2$1,_0x1497ad=requireOkdbMetrics(),_0x126eeb=requireOkdbAuthTokens(),{hasPermission:_0x103ae3,unionPermissions:_0x540eab,resolveProtectedGate:_0x39651c}=requireOkdbAuthPermissions(),_0x474957={0x190:_0x5d5633(0x662),0x191:_0x5d5633(0x680),0x193:_0x5d5633(0x553),0x194:_0x5d5633(0x5c1),0x195:'METHOD_NOT_ALLOWED',0x198:'REQUEST_TIMEOUT',0x199:'CONFLICT',0x19a:_0x5d5633(0x386),0x19b:'LENGTH_REQUIRED',0x19d:'PAYLOAD_TOO_LARGE',0x19f:_0x5d5633(0x56f),0x1a6:_0x5d5633(0x187),0x1ad:'TOO_MANY_REQUESTS',0x1f4:_0x5d5633(0x77f),0x1f5:_0x5d5633(0x634),0x1f6:_0x5d5633(0x486),0x1f7:_0x5d5633(0x507),0x1f8:'GATEWAY_TIMEOUT'},_0x59cfaf={'INVALID_VALUE':0x190,'BAD_CONFIG':0x190,'INVALID_PRIMARY_KEY':0x190,'INVALID_INDEX_KEY':0x190,'TYPE_NOT_REGISTERED':0x194,'INDEX_NOT_REGISTERED':0x194,'NOT_FOUND':0x194,'ALREADY_EXISTS':0x199,'VERSION_MISMATCH':0x199,'UNIQUE_CONSTRAINT':0x199,'TYPE_ALREADY_REGISTERED':0x199,'INDEX_ALREADY_REGISTERED':0x199,'FK_ERROR':0x199,'FK_DELETE_ERROR':0x199,'FOREIGN_KEY_VIOLATION':0x199,'FOREIGN_KEY_DELETE_RESTRICTED':0x199,'ENV_NOT_FOUND':0x194,'ENV_PROTECTED':0x193,'ENGINE_CONFIG_PATCH_UNSUPPORTED':0x190,'QUEUE_WORKER_JOB_TYPE_CONFLICT':0x199,'SCHEMA_VALIDATION_FAILED':0x1a6,'SCHEMA_COLLECTION_INVALID':0x199,'INVALID_SCHEMA':0x190,'BUCKET_CONFIG_INVALID':0x190,'BUCKET_INVALID_TIME_VALUE':0x1a6,'RESERVED_VIEW_NAME':0x190,'VIEW_NOT_BUCKETED':0x190,'VIEW_NOT_FOUND':0x194,'VIEW_RANGE_GRANULARITY_MISMATCH':0x190,'VIEW_RANGE_GRANULARITY_REQUIRED':0x190,'VIEW_REF_UNSUPPORTED_REDUCER':0x190},{hmac:_0x273263,timingSafeEqual:_0xb2fab6,parseBearer:_0x2ce7fb,randomToken:_0x13e04f,issueToken:_0xc4a5a6,authenticateToken:_0x175736}=_0x126eeb,{base64UrlDecode:_0x166aed,parseJwt:_0x1be0f0,normalizeAudience:_0x564998,normalizePemCertificate:_0x395b07,jwkToKeyObject:_0x6dd18d,verifyJwtSignature:_0xf110ca,fetchJson:_0x4fa889}=requireOkdbJwtUtils();function _0x113ee9(_0x53cea6){const _0x4f62cb=_0x5d5633;return(_0x53cea6||_0x4f62cb(0x523))[_0x4f62cb(0x26a)]();}function _0x81e0b3(_0x219038){const _0x44166b=_0x5d5633;if(Array[_0x44166b(0x729)](_0x219038))return _0x219038[_0x44166b(0x4df)](_0x81e0b3);return String(_0x219038||'')['split'](',')['map'](_0xb1703d=>_0xb1703d['trim']())[_0x44166b(0x3fb)](Boolean);}function _0x957522(..._0x55aa2b){const _0x4d0370=_0x5d5633;return[...new Set(_0x55aa2b[_0x4d0370(0x4df)](_0x81e0b3))]['join'](',\x20');}function _0x472d5a(_0x45c09f,_0x100cb0){const _0x1bf255=_0x5d5633;if(!_0x45c09f)return![];if(_0x100cb0==='*')return!![];if(_0x100cb0 instanceof RegExp)return _0x100cb0['test'](_0x45c09f);if(typeof _0x100cb0==='function')return!!_0x100cb0(_0x45c09f);if(Array['isArray'](_0x100cb0))return _0x100cb0[_0x1bf255(0x70f)](_0x45c09f);return _0x100cb0===_0x45c09f;}function _0x1907c1(_0x54e51a={},_0x2454db={},_0x5a9b8d=null){const _0x464999=_0x5d5633;if(!_0x2454db)return null;const _0x4ee163=_0x54e51a[_0x464999(0x72e)],_0x272c5f=_0x2454db[_0x464999(0x446)]??_0x2454db[_0x464999(0x72e)]??'*',_0x1c05bf=_0x272c5f==='*'?'*':_0x472d5a(_0x4ee163,_0x272c5f)?_0x4ee163:null;if(!_0x1c05bf)return null;const _0x3e29ce=_0x54e51a[_0x464999(0x2fb)],_0x1a97e6=_0x2454db[_0x464999(0x313)]??_0x2454db[_0x464999(0x46a)]??[_0x464999(0x6aa),_0x464999(0x4a1),_0x464999(0x4ea),_0x464999(0x5d3),_0x464999(0x53e)],_0x446349=_0x2454db['methods']??_0x2454db[_0x464999(0x518)]??(_0x5a9b8d?[_0x5a9b8d,_0x464999(0x598)]:['GET','POST',_0x464999(0x598)]),_0x4bdb9e=_0x2454db[_0x464999(0x615)]??[_0x464999(0x4ea)],_0x19f73f={'access-control-allow-origin':_0x1c05bf,'access-control-allow-methods':Array['isArray'](_0x446349)?_0x446349[_0x464999(0x2b6)](',\x20'):String(_0x446349),'access-control-allow-headers':_0x3e29ce?_0x957522(_0x1a97e6,_0x3e29ce):Array[_0x464999(0x729)](_0x1a97e6)?_0x1a97e6[_0x464999(0x2b6)](',\x20'):String(_0x1a97e6),'access-control-expose-headers':Array[_0x464999(0x729)](_0x4bdb9e)?_0x4bdb9e['join'](',\x20'):String(_0x4bdb9e),'vary':_0x957522(_0x464999(0x5b2),_0x1c05bf==='*'?'':_0x464999(0x5b2),_0x3e29ce?_0x464999(0x6b4):'')};if(_0x2454db[_0x464999(0x286)])_0x19f73f[_0x464999(0x488)]=_0x464999(0x434);if(Number['isFinite'](_0x2454db[_0x464999(0x793)]))_0x19f73f[_0x464999(0x197)]=String(_0x2454db[_0x464999(0x793)]);return _0x19f73f;}function _0x4eacc1(_0x433a4b){const _0x53f633=_0x5d5633,_0x727e35=[],_0x35c9f5={};let _0x2dcb03=![];_0x433a4b['endsWith']('/*')&&(_0x2dcb03=!![],_0x433a4b=_0x433a4b[_0x53f633(0x7a7)](0x0,-0x2),_0x727e35[_0x53f633(0x494)]('*'));let _0x2ad474=_0x433a4b['replace'](/\/+$/,'')[_0x53f633(0x1f7)](/\[([^\]]*)\]/g,(_0x49b6a5,_0x2e9344)=>{const _0x5ca4f8=_0x53f633,_0x2a8afb=_0x2e9344[_0x5ca4f8(0x1f7)](/\/:(\w+)(?:=([^/\]\s]*))?/g,(_0x4d2606,_0x2eb94b,_0x2522e1)=>{const _0x384de9=_0x5ca4f8;_0x727e35['push'](_0x2eb94b);if(_0x2522e1!==undefined)_0x35c9f5[_0x2eb94b]=_0x2522e1;return _0x384de9(0x5ea);});return _0x5ca4f8(0x3f4)+_0x2a8afb+')?';})[_0x53f633(0x1f7)](/\/:(\w+)/g,(_0x1f73af,_0x2e038b)=>{const _0x53a26c=_0x53f633;return _0x727e35[_0x53a26c(0x494)](_0x2e038b),_0x53a26c(0x5ea);});if(_0x2ad474==='')_0x2ad474='/';return{'keys':_0x727e35,'defaults':_0x35c9f5,'wildcard':_0x2dcb03,'regex':new RegExp(_0x2dcb03?'^'+_0x2ad474+'(?:/(.*))?$':'^'+_0x2ad474+'$')};}function _0x328e45(_0x5c9ae8){const _0x52dbb4=_0x5d5633;if(_0x5c9ae8==null)return _0x5c9ae8;return JSON['parse'](JSON[_0x52dbb4(0x540)](_0x5c9ae8));}function _0x1b02e0(_0x594246){const _0x1e4b44=_0x5d5633;if(_0x594246==null)return null;if(_0x594246[_0x1e4b44(0x737)]==='object'&&_0x594246['properties']&&!Array[_0x1e4b44(0x729)](_0x594246[_0x1e4b44(0x366)]))return _0x328e45(_0x594246);const _0x57bf6f=Object[_0x1e4b44(0x637)](_0x594246),_0x219701=_0x57bf6f[_0x1e4b44(0x1b1)]>0x0&&_0x57bf6f[_0x1e4b44(0x595)](_0x17015a=>{const _0x392b34=_0x1e4b44;return _0x17015a&&typeof _0x17015a===_0x392b34(0x336)&&!Array[_0x392b34(0x729)](_0x17015a)&&(Object[_0x392b34(0x6f7)][_0x392b34(0x60b)]['call'](_0x17015a,_0x392b34(0x737))||Object[_0x392b34(0x6f7)][_0x392b34(0x60b)][_0x392b34(0x65a)](_0x17015a,_0x392b34(0x366))||Object['prototype'][_0x392b34(0x60b)][_0x392b34(0x65a)](_0x17015a,_0x392b34(0x3d4))||Object['prototype'][_0x392b34(0x60b)][_0x392b34(0x65a)](_0x17015a,'default'));});if(_0x219701)return{'type':_0x1e4b44(0x336),'properties':_0x328e45(_0x594246),'required':[],'additionalProperties':![]};const _0x6546ed={},_0x523cc4=[];for(const [_0x2c4d77,_0x4636bf]of Object['entries'](_0x594246)){_0x6546ed[_0x2c4d77]=_0x37452a(_0x4636bf);if(_0x4636bf!==null&&_0x4636bf!==undefined)_0x523cc4['push'](_0x2c4d77);}return{'type':_0x1e4b44(0x336),'properties':_0x6546ed,'required':_0x523cc4,'additionalProperties':![]};}function _0x37452a(_0x3449ce){const _0x5d2178=_0x5d5633;if(_0x3449ce===null)return{'type':['null',_0x5d2178(0x54f),_0x5d2178(0x758),_0x5d2178(0x312),_0x5d2178(0x336),_0x5d2178(0x403)]};if(Array[_0x5d2178(0x729)](_0x3449ce))return{'type':_0x5d2178(0x403),'items':_0x3449ce[_0x5d2178(0x1b1)]>0x0?_0x37452a(_0x3449ce[0x0]):{}};switch(typeof _0x3449ce){case _0x5d2178(0x54f):return{'type':_0x5d2178(0x54f),'default':_0x3449ce};case _0x5d2178(0x758):return{'type':Number[_0x5d2178(0x428)](_0x3449ce)?_0x5d2178(0x1ef):_0x5d2178(0x758),'default':_0x3449ce};case _0x5d2178(0x312):return{'type':_0x5d2178(0x312),'default':_0x3449ce};case'object':{const _0x799d79={};for(const [_0x39e2a0,_0x27d8f9]of Object[_0x5d2178(0x352)](_0x3449ce))_0x799d79[_0x39e2a0]=_0x37452a(_0x27d8f9);return{'type':'object','properties':_0x799d79,'additionalProperties':!![],'default':_0x328e45(_0x3449ce)};}default:return{};}}function _0x2f1e55(_0x5ef719,_0x6a2af1){const _0x6a85e6=_0x5d5633,_0x289a7b=[];for(const _0xf200ea of _0x6a2af1[_0x6a85e6(0x35c)]){if(_0xf200ea==='*')continue;_0x289a7b[_0x6a85e6(0x494)]({'name':_0xf200ea,'required':!Object[_0x6a85e6(0x6f7)][_0x6a85e6(0x60b)][_0x6a85e6(0x65a)](_0x6a2af1[_0x6a85e6(0x6a0)],_0xf200ea),'default':_0x6a2af1[_0x6a85e6(0x6a0)][_0xf200ea]});}return _0x289a7b;}function _0x81b7e0(_0x182400={},_0x5ecb24){const _0x2d2957=_0x5d5633,_0x1a4776=_0x1b02e0(_0x182400['http']?.[_0x2d2957(0x73c)]??_0x182400[_0x2d2957(0x194)]??null),_0x3dc52c=_0x182400[_0x2d2957(0x277)]?.[_0x2d2957(0x750)]??(_0x182400[_0x2d2957(0x5f7)]?'raw':_0x5ecb24[_0x2d2957(0x399)]==='GET'||_0x5ecb24[_0x2d2957(0x399)]===_0x2d2957(0x4e3)?'none':_0x2d2957(0x4fa));return{'querySchema':_0x1a4776,'bodyMode':_0x3dc52c,'bindings':_0x328e45(_0x182400[_0x2d2957(0x277)]?.[_0x2d2957(0x575)]??{}),'statuses':_0x328e45(_0x182400[_0x2d2957(0x277)]?.[_0x2d2957(0x3ee)]??(_0x182400[_0x2d2957(0x60e)]||[])),'transport':_0x182400[_0x2d2957(0x277)]?.[_0x2d2957(0x4b4)]??(_0x182400[_0x2d2957(0x4d4)]?'sse':_0x182400[_0x2d2957(0x5f7)]?_0x2d2957(0x5f7):_0x2d2957(0x1f0)),'rawResponse':_0x182400[_0x2d2957(0x277)]?.[_0x2d2957(0x490)]??!!_0x182400[_0x2d2957(0x490)],'cors':_0x328e45(_0x182400['http']?.[_0x2d2957(0x463)]??_0x182400[_0x2d2957(0x463)]??null)};}function _0x3566f7(_0xe9efd3){const _0x27e08e=_0x5d5633,_0x36937a=_0xe9efd3['meta']||{},_0x4737ec=_0x2f1e55(_0xe9efd3[_0x27e08e(0x504)],_0xe9efd3[_0x27e08e(0x5da)]),_0x1f073e=!!(_0x36937a['id']||_0x36937a[_0x27e08e(0x57a)]||_0x36937a['outputSchema']||_0x36937a[_0x27e08e(0x277)]||_0x36937a[_0x27e08e(0x3b5)]||_0x36937a['cli']||_0x36937a['access']||_0x36937a[_0x27e08e(0x6b8)]),_0xad8252=_0x81b7e0(_0x36937a,_0xe9efd3),_0x158f26=_0x36937a[_0x27e08e(0x57a)]?_0x328e45(_0x36937a['inputSchema']):null;return{'id':_0x36937a['id']??null,'summary':_0x36937a[_0x27e08e(0x22e)]??null,'description':_0x36937a[_0x27e08e(0x4b0)]??null,'tags':_0x328e45(_0x36937a['tags']??[]),'category':_0x36937a[_0x27e08e(0x73e)]??null,'safety':_0x328e45(_0x36937a[_0x27e08e(0x6b8)]??null),'access':_0x328e45(_0x36937a['access']??null),'inputSchema':_0x158f26,'outputSchema':_0x328e45(_0x36937a[_0x27e08e(0x38a)]??null),'examples':_0x328e45(_0x36937a['examples']??[]),'pathParams':_0x4737ec,'http':_0xad8252,'cli':_0x328e45(_0x36937a[_0x27e08e(0x2b5)]??null),'mcp':_0x328e45(_0x36937a[_0x27e08e(0x3b5)]??null),'legacy':{'params':_0x328e45(_0x36937a[_0x27e08e(0x764)]??null),'query':_0x328e45(_0x36937a['query']??null),'body':_0x328e45(_0x36937a[_0x27e08e(0x6bd)]??null),'response':_0x328e45(_0x36937a[_0x27e08e(0x255)]??null)},'transport':{'raw':!!_0x36937a[_0x27e08e(0x5f7)],'sse':!!_0x36937a[_0x27e08e(0x4d4)],'rawResponse':!!_0x36937a['rawResponse'],'cors':_0x328e45(_0x36937a[_0x27e08e(0x463)]??null)},'hasCanonical':_0x1f073e};}function _0xe346dd(_0x137d09,_0x3aaa60){const _0x36fb28=_0x5d5633;if(!_0x3aaa60?.[_0x36fb28(0x1e6)])return;if(!_0x3aaa60[_0x36fb28(0x57a)]||_0x3aaa60[_0x36fb28(0x57a)]['type']!==_0x36fb28(0x336)||!_0x3aaa60[_0x36fb28(0x57a)][_0x36fb28(0x366)])throw new Error(_0x36fb28(0x73f)+_0x137d09[_0x36fb28(0x399)]+'\x20'+_0x137d09[_0x36fb28(0x504)]+'\x20has\x20canonical\x20metadata\x20but\x20missing\x20valid\x20inputSchema');const _0x22315e=_0x3aaa60[_0x36fb28(0x57a)][_0x36fb28(0x366)]||{},_0x2fdd76=new Set(_0x3aaa60[_0x36fb28(0x28a)]['map'](_0x4b2c8b=>_0x4b2c8b[_0x36fb28(0x60a)])),_0x380289=new Set(Object[_0x36fb28(0x35c)](_0x3aaa60[_0x36fb28(0x277)]?.[_0x36fb28(0x73c)]?.[_0x36fb28(0x366)]||{})),_0x30cc19=new Set(Object[_0x36fb28(0x35c)](_0x3aaa60[_0x36fb28(0x277)]?.[_0x36fb28(0x575)]||{}));for(const _0x314cb0 of _0x3aaa60[_0x36fb28(0x28a)]){if(!_0x22315e[_0x314cb0['name']])throw new Error(_0x36fb28(0x73f)+_0x137d09[_0x36fb28(0x399)]+'\x20'+_0x137d09[_0x36fb28(0x504)]+_0x36fb28(0x2cd)+_0x314cb0[_0x36fb28(0x60a)]);}for(const _0x51f2c7 of _0x380289){if(!_0x22315e[_0x51f2c7])throw new Error(_0x36fb28(0x73f)+_0x137d09[_0x36fb28(0x399)]+'\x20'+_0x137d09[_0x36fb28(0x504)]+_0x36fb28(0x3c1)+_0x51f2c7);}for(const _0x176a2b of _0x30cc19){if(!_0x22315e[_0x176a2b])throw new Error(_0x36fb28(0x73f)+_0x137d09[_0x36fb28(0x399)]+'\x20'+_0x137d09['path']+'\x20binding\x20references\x20missing\x20input\x20field:\x20'+_0x176a2b);}for(const _0x2b96b0 of _0x30cc19){if(_0x2fdd76[_0x36fb28(0x4e7)](_0x2b96b0))throw new Error('Route\x20'+_0x137d09[_0x36fb28(0x399)]+'\x20'+_0x137d09[_0x36fb28(0x504)]+_0x36fb28(0x4e1)+_0x2b96b0);if(_0x380289[_0x36fb28(0x4e7)](_0x2b96b0))throw new Error(_0x36fb28(0x73f)+_0x137d09[_0x36fb28(0x399)]+'\x20'+_0x137d09['path']+_0x36fb28(0x69b)+_0x2b96b0);const _0x50f26c=_0x3aaa60[_0x36fb28(0x277)][_0x36fb28(0x575)][_0x2b96b0];if(!/^params\.[A-Za-z0-9_*.-]+$/['test'](_0x50f26c)&&!/^query\.[A-Za-z0-9_*.-]+$/['test'](_0x50f26c)&&!/^body(?:\.[A-Za-z0-9_*.-]+)?$/['test'](_0x50f26c)&&!/^headers\.[A-Za-z0-9_*.-]+$/[_0x36fb28(0x279)](_0x50f26c))throw new Error('Route\x20'+_0x137d09[_0x36fb28(0x399)]+'\x20'+_0x137d09['path']+_0x36fb28(0x503)+_0x2b96b0+':\x20'+_0x50f26c);}for(const _0x28397b of _0x380289){if(_0x2fdd76[_0x36fb28(0x4e7)](_0x28397b))throw new Error(_0x36fb28(0x73f)+_0x137d09[_0x36fb28(0x399)]+'\x20'+_0x137d09[_0x36fb28(0x504)]+_0x36fb28(0x645)+_0x28397b);}const _0x9ce7bb=_0x3aaa60['http']?.[_0x36fb28(0x750)],_0x165e98=new Set(['none','remaining-fields','object','payload-or-self',_0x36fb28(0x403),_0x36fb28(0x5f7)]);if(!_0x165e98['has'](_0x9ce7bb))throw new Error(_0x36fb28(0x73f)+_0x137d09[_0x36fb28(0x399)]+'\x20'+_0x137d09[_0x36fb28(0x504)]+'\x20has\x20invalid\x20http.bodyMode:\x20'+_0x9ce7bb);if(_0x9ce7bb===_0x36fb28(0x5f7)&&!_0x137d09[_0x36fb28(0x2e5)]?.[_0x36fb28(0x5f7)])throw new Error(_0x36fb28(0x73f)+_0x137d09[_0x36fb28(0x399)]+'\x20'+_0x137d09['path']+_0x36fb28(0x794));if(_0x3aaa60[_0x36fb28(0x3b5)]?.[_0x36fb28(0x189)]!==![]&&(_0x137d09['meta']?.[_0x36fb28(0x5f7)]||_0x137d09[_0x36fb28(0x2e5)]?.[_0x36fb28(0x4d4)]||_0x3aaa60['http']?.[_0x36fb28(0x4b4)]===_0x36fb28(0x508)))throw new Error(_0x36fb28(0x73f)+_0x137d09[_0x36fb28(0x399)]+'\x20'+_0x137d09[_0x36fb28(0x504)]+_0x36fb28(0x5b7)+_0x3aaa60[_0x36fb28(0x277)]?.[_0x36fb28(0x4b4)]);const _0x3e2870=Object[_0x36fb28(0x35c)](_0x22315e)[_0x36fb28(0x3fb)](_0x5ea1ac=>{const _0x82df4d=_0x36fb28;if(_0x2fdd76[_0x82df4d(0x4e7)](_0x5ea1ac))return![];if(_0x380289[_0x82df4d(0x4e7)](_0x5ea1ac))return![];if(_0x30cc19['has'](_0x5ea1ac))return![];return!![];});if(_0x9ce7bb===_0x36fb28(0x552)&&_0x3e2870['length']>0x0)throw new Error(_0x36fb28(0x73f)+_0x137d09['method']+'\x20'+_0x137d09[_0x36fb28(0x504)]+_0x36fb28(0x62b)+_0x3e2870[_0x36fb28(0x2b6)](',\x20'));}function _0x12c166(_0x2f7fb7){const _0x123e04=_0x5d5633;if(Array[_0x123e04(0x729)](_0x2f7fb7))return _0x2f7fb7;if(_0x2f7fb7==null)return[];return[_0x2f7fb7];}function _0x25818b(_0x11a39d,_0x1d464a){const _0x4e56a2=_0x5d5633;return _0x12c166(_0x11a39d?.[_0x4e56a2(0x737)])[_0x4e56a2(0x70f)](_0x1d464a);}function _0x26cebf(_0x4682fd,_0x7f37ab){const _0x41fedd=_0x5d5633;if(_0x4682fd==null||typeof _0x4682fd!==_0x41fedd(0x54f))return _0x4682fd;const _0x27c228=_0x12c166(_0x7f37ab?.[_0x41fedd(0x737)]);if(_0x27c228['length']===0x0)return _0x4682fd;if(_0x27c228[_0x41fedd(0x70f)](_0x41fedd(0x50a))&&_0x4682fd===_0x41fedd(0x50a))return null;if(_0x27c228[_0x41fedd(0x70f)](_0x41fedd(0x312))){if(_0x4682fd===_0x41fedd(0x434))return!![];if(_0x4682fd===_0x41fedd(0x2c2))return![];}if(_0x27c228[_0x41fedd(0x70f)](_0x41fedd(0x1ef))&&/^-?\d+$/[_0x41fedd(0x279)](_0x4682fd))return Number[_0x41fedd(0x22d)](_0x4682fd,0xa);if(_0x27c228[_0x41fedd(0x70f)](_0x41fedd(0x758))&&/^-?(?:\d+|\d*\.\d+)$/[_0x41fedd(0x279)](_0x4682fd))return Number(_0x4682fd);return _0x4682fd;}function _0x135f27(_0x10c544){return _0x328e45(_0x10c544);}function _0x3156df(_0x289927,_0x4f760e={},_0x207aff={},_0x12e426=null,_0x41b7ea={}){const _0x16b547=_0x5d5633,_0x2b1f92=_0x289927?.[_0x16b547(0x43b)];if(!_0x2b1f92?.[_0x16b547(0x1e6)]||!_0x2b1f92[_0x16b547(0x57a)])return null;const _0x2edae5=_0x2b1f92[_0x16b547(0x57a)][_0x16b547(0x366)]||{},_0x4a3105=_0x2b1f92[_0x16b547(0x277)]?.['querySchema']?.['properties']||{},_0x44b4e3=_0x2b1f92[_0x16b547(0x277)]?.[_0x16b547(0x575)]||{},_0x4e045f=new Set((_0x2b1f92[_0x16b547(0x28a)]||[])['map'](_0x5925cf=>_0x5925cf[_0x16b547(0x60a)])),_0x5c0c30=new Set(Object[_0x16b547(0x35c)](_0x4a3105)),_0x4b6335={};for(const [_0x1e1d0a,_0x226f29]of Object['entries'](_0x2edae5)){Object[_0x16b547(0x6f7)][_0x16b547(0x60b)][_0x16b547(0x65a)](_0x226f29||{},_0x16b547(0x45b))&&(_0x4b6335[_0x1e1d0a]=_0x135f27(_0x226f29['default']));}for(const _0xbdff28 of _0x2b1f92['pathParams']||[]){if(!Object['prototype'][_0x16b547(0x60b)]['call'](_0x4f760e,_0xbdff28[_0x16b547(0x60a)]))continue;const _0x4cab80=_0x2edae5[_0xbdff28['name']]||{};_0x4b6335[_0xbdff28[_0x16b547(0x60a)]]=_0x26cebf(_0x4f760e[_0xbdff28['name']],_0x4cab80);}for(const [_0x5a0dc6,_0x15511c]of Object[_0x16b547(0x352)](_0x4a3105)){if(!Object[_0x16b547(0x6f7)][_0x16b547(0x60b)]['call'](_0x207aff,_0x5a0dc6))continue;_0x4b6335[_0x5a0dc6]=_0x26cebf(_0x207aff[_0x5a0dc6],_0x15511c||_0x2edae5[_0x5a0dc6]||{});}for(const [_0x2897fb,_0x1bf9df]of Object[_0x16b547(0x352)](_0x44b4e3)){if(typeof _0x1bf9df!==_0x16b547(0x54f))continue;let _0x1096b6;if(_0x1bf9df[_0x16b547(0x72d)](_0x16b547(0x357)))_0x1096b6=_0x4f760e[_0x1bf9df['slice'](0x7)];else{if(_0x1bf9df[_0x16b547(0x72d)](_0x16b547(0x240)))_0x1096b6=_0x207aff[_0x1bf9df[_0x16b547(0x7a7)](0x6)];else{if(_0x1bf9df===_0x16b547(0x6bd))_0x1096b6=_0x12e426;else{if(_0x1bf9df['startsWith']('body.'))_0x1096b6=_0x12e426?.[_0x1bf9df[_0x16b547(0x7a7)](0x5)];else{if(_0x1bf9df[_0x16b547(0x72d)]('headers.'))_0x1096b6=_0x41b7ea?.[_0x1bf9df[_0x16b547(0x7a7)](0x8)[_0x16b547(0x2be)]()]??_0x41b7ea?.[_0x1bf9df[_0x16b547(0x7a7)](0x8)];}}}}if(_0x1096b6!==undefined)_0x4b6335[_0x2897fb]=_0x1096b6;}const _0x26d326=_0x2b1f92['http']?.[_0x16b547(0x750)];if(_0x26d326!==_0x16b547(0x552)&&_0x26d326!=='raw'&&_0x12e426!=null){if(_0x26d326===_0x16b547(0x336))for(const [_0x2d47fd,_0x27406c]of Object[_0x16b547(0x352)](_0x2edae5)){if(_0x4e045f['has'](_0x2d47fd)||_0x5c0c30['has'](_0x2d47fd)||Object[_0x16b547(0x6f7)][_0x16b547(0x60b)][_0x16b547(0x65a)](_0x44b4e3,_0x2d47fd))continue;if(Object[_0x16b547(0x6f7)][_0x16b547(0x60b)]['call'](_0x12e426,_0x2d47fd))_0x4b6335[_0x2d47fd]=_0x12e426[_0x2d47fd];else{if(_0x25818b(_0x27406c,_0x16b547(0x336)))_0x4b6335[_0x2d47fd]=_0x12e426;}}else for(const [_0x26f7b4,_0x1b46e5]of Object[_0x16b547(0x352)](_0x12e426)){if(_0x4e045f[_0x16b547(0x4e7)](_0x26f7b4)||_0x5c0c30[_0x16b547(0x4e7)](_0x26f7b4)||Object['prototype'][_0x16b547(0x60b)][_0x16b547(0x65a)](_0x44b4e3,_0x26f7b4))continue;_0x4b6335[_0x26f7b4]=_0x1b46e5;}}return _0x4b6335;}function _0x1398e6(_0x50d65d,_0x5e3a69,_0x11c03c,_0x1b054e){const _0x320808=_0x5d5633;if(!_0x5e3a69)return;const _0x17a364=_0x12c166(_0x5e3a69[_0x320808(0x737)]);if(_0x50d65d===undefined)return;if(_0x50d65d===null){_0x17a364[_0x320808(0x1b1)]>0x0&&!_0x17a364['includes'](_0x320808(0x50a))&&_0x1b054e[_0x320808(0x494)]({'field':_0x11c03c,'message':_0x320808(0x4b8),'expected':_0x17a364['join']('|'),'actual':null});return;}if(_0x17a364[_0x320808(0x1b1)]===0x0)return;const _0x1ff372=_0x17a364['some'](_0x5f1eb4=>{const _0x2ddb4d=_0x320808;switch(_0x5f1eb4){case _0x2ddb4d(0x54f):return typeof _0x50d65d===_0x2ddb4d(0x54f);case _0x2ddb4d(0x1ef):return Number['isInteger'](_0x50d65d);case'number':return typeof _0x50d65d===_0x2ddb4d(0x758)&&Number['isFinite'](_0x50d65d);case _0x2ddb4d(0x312):return typeof _0x50d65d===_0x2ddb4d(0x312);case _0x2ddb4d(0x336):return _0x50d65d&&typeof _0x50d65d===_0x2ddb4d(0x336)&&!Array['isArray'](_0x50d65d);case _0x2ddb4d(0x403):return Array[_0x2ddb4d(0x729)](_0x50d65d);case _0x2ddb4d(0x50a):return _0x50d65d===null;default:return!![];}});if(!_0x1ff372){_0x1b054e[_0x320808(0x494)]({'field':_0x11c03c,'message':'must\x20be\x20'+_0x17a364['join']('|'),'expected':_0x17a364[_0x320808(0x2b6)]('|'),'actual':_0x50d65d});return;}Array[_0x320808(0x729)](_0x50d65d)&&_0x5e3a69[_0x320808(0x3d4)]&&_0x50d65d[_0x320808(0x4ff)]((_0xa92512,_0x5039e8)=>_0x1398e6(_0xa92512,_0x5e3a69[_0x320808(0x3d4)],_0x11c03c+'['+_0x5039e8+']',_0x1b054e));}function _0x10d068(_0xbc6ce4,_0x5cadbc){const _0x8df8e5=_0x5d5633,_0x42bbb8=_0xbc6ce4?.['operation'];if(!_0x42bbb8?.['hasCanonical']||!_0x42bbb8[_0x8df8e5(0x57a)])return null;const _0x5039de=_0x42bbb8[_0x8df8e5(0x57a)],_0x709f=_0x5039de[_0x8df8e5(0x366)]||{},_0x3a421e=new Set(_0x5039de['required']||[]),_0x331487=[];for(const _0x5b3f85 of _0x3a421e){_0x5cadbc[_0x5b3f85]===undefined&&_0x331487[_0x8df8e5(0x494)]({'field':_0x5b3f85,'message':_0x8df8e5(0x71c),'expected':_0x8df8e5(0x6ed),'actual':undefined});}if(_0x5039de['additionalProperties']===![])for(const _0x1e8112 of Object['keys'](_0x5cadbc||{})){!Object['prototype'][_0x8df8e5(0x60b)][_0x8df8e5(0x65a)](_0x709f,_0x1e8112)&&_0x331487[_0x8df8e5(0x494)]({'field':_0x1e8112,'message':_0x8df8e5(0x45d),'expected':_0x8df8e5(0x3ae),'actual':_0x5cadbc[_0x1e8112]});}for(const [_0x2e7810,_0x415a50]of Object[_0x8df8e5(0x352)](_0x709f)){_0x1398e6(_0x5cadbc[_0x2e7810],_0x415a50,_0x2e7810,_0x331487);}if(_0x331487[_0x8df8e5(0x1b1)]===0x0)return null;return{'code':_0x8df8e5(0x585),'errors':_0x331487};}function _0x5ba0c6(_0x41a024=[]){const _0x42ffe2=_0x5d5633;if(!Array[_0x42ffe2(0x729)](_0x41a024)||_0x41a024[_0x42ffe2(0x1b1)]===0x0)return null;const _0x45a1da=_0x41a024[_0x42ffe2(0x7a7)](0x0,0x3)[_0x42ffe2(0x2cc)]((_0x1fe016={})=>{const _0x282bad=_0x42ffe2,_0x3f496c=_0x1fe016[_0x282bad(0x6a9)]?_0x1fe016[_0x282bad(0x6a9)]+'\x20':'';return(''+_0x3f496c+(_0x1fe016['message']||'is\x20invalid'))[_0x282bad(0x29c)]();})[_0x42ffe2(0x2b6)](';\x20');return _0x41a024['length']>0x3?_0x45a1da+_0x42ffe2(0x640)+(_0x41a024['length']-0x3)+_0x42ffe2(0x505):_0x45a1da;}function _0x570026(_0x3fe5e4,_0x504063={}){const _0x314691=_0x5d5633,_0x3ebdbb=_0x504063?.['result']?.[_0x314691(0x3ba)]??_0x504063?.[_0x314691(0x3ba)]??_0x314691(0x5d1),_0x3051dc=_0x504063?.[_0x314691(0x59d)]?.[_0x314691(0x656)]??_0x504063?.[_0x314691(0x656)]??_0x3ebdbb?.['details']??null,_0x569dac=_0x504063?.[_0x314691(0x59d)]?.[_0x314691(0x5cc)]??_0x504063?.['code']??_0x3ebdbb?.[_0x314691(0x5cc)]??null,_0x55dc69=_0x504063?.[_0x314691(0x59d)]?.[_0x314691(0x246)]??_0x504063?.[_0x314691(0x246)]??_0x3ebdbb?.[_0x314691(0x246)]??null,_0x217675=typeof _0x3ebdbb===_0x314691(0x54f)?_0x3ebdbb:null,_0x3c794c=typeof _0x217675===_0x314691(0x54f)&&/^[A-Z0-9_]+$/[_0x314691(0x279)](_0x217675),_0x166bf3=_0x569dac??(_0x3c794c?_0x217675:null)??(_0x474957[_0x3fe5e4]||_0x314691(0x340)+_0x3fe5e4);let _0xc0f7=_0x55dc69;!_0xc0f7&&typeof _0x217675===_0x314691(0x54f)&&!_0x3c794c&&(_0xc0f7=_0x217675);if(!_0xc0f7&&_0x166bf3===_0x314691(0x585)){const _0x50da33=_0x5ba0c6(_0x3051dc);_0xc0f7=_0x50da33?_0x314691(0x292)+_0x50da33:_0x314691(0x625);}if(!_0xc0f7&&Array[_0x314691(0x729)](_0x3051dc)&&_0x3051dc[_0x314691(0x1b1)]>0x0){const _0x374f5d=_0x5ba0c6(_0x3051dc);if(_0x374f5d)_0xc0f7=_0x374f5d;}if(!_0xc0f7)_0xc0f7=_0x474957[_0x3fe5e4]||_0x314691(0x5d1);const _0x113113={'code':_0x166bf3,'message':_0xc0f7};if(_0x3051dc!=null)_0x113113[_0x314691(0x656)]=_0x3051dc;return _0x113113;}function _0x3f5b03(_0xd8da57){const _0xb1b0fc=_0x5d5633,_0x483c7f={};if(!_0xd8da57)return _0x483c7f;for(const _0x43897b of _0xd8da57[_0xb1b0fc(0x5ed)](';')){const _0x561796=_0x43897b[_0xb1b0fc(0x2db)]('=');if(_0x561796===-0x1)continue;const _0x19f9be=_0x43897b['slice'](0x0,_0x561796)[_0xb1b0fc(0x29c)](),_0x3f3906=_0x43897b[_0xb1b0fc(0x7a7)](_0x561796+0x1)['trim']();_0x483c7f[_0x19f9be]=decodeURIComponent(_0x3f3906);}return _0x483c7f;}function _0x466409(_0x2c9987,_0x323ee1){const _0x3e8aec=_0x5d5633;return _0x323ee1=_0x11fe7b(_0x323ee1),{'status':_0x323ee1[_0x3e8aec(0x57d)]??_0x2c9987[_0x3e8aec(0x57d)],'headers':{..._0x2c9987[_0x3e8aec(0x313)]||{},..._0x323ee1[_0x3e8aec(0x313)]||{}},'body':_0x323ee1['body']??_0x2c9987[_0x3e8aec(0x6bd)]};}function _0x4a87b9(_0x3086fa={}){const _0x3dc3ef=_0x5d5633;return _0x3086fa[_0x3dc3ef(0x4b4)]||(_0x3086fa[_0x3dc3ef(0x2f4)]?_0x3dc3ef(0x2f4):_0x3dc3ef(0x277));}function _0x4a56fd(_0x4accfd){const _0x324c2a=_0x5d5633;if(_0x4accfd[_0x324c2a(0x3a1)]?.['internal']===!![])return!![];if(_0x4accfd[_0x324c2a(0x3a1)]?.[_0x324c2a(0x717)]?.[_0x324c2a(0x622)]===!![])return!![];if(_0x4accfd[_0x324c2a(0x3a1)]?.[_0x324c2a(0x717)]?.['ok']===!![])return!![];return![];}function _0x47569f(_0x2e95e7,_0x4f3474){const _0x5b2cb3=_0x5d5633,_0x3a42c4=_0x4f3474[_0x5b2cb3(0x5ed)]('.');let _0x16d139=_0x2e95e7;for(const _0x4b5177 of _0x3a42c4){_0x16d139=_0x16d139?.[_0x4b5177];}return _0x16d139||null;}class _0x3f0d50{constructor(){const _0x50eb04=_0x5d5633;this[_0x50eb04(0x203)]=[],this[_0x50eb04(0x417)]=[],this['routes']=[],this[_0x50eb04(0x691)]=0x5*0x400*0x400,this[_0x50eb04(0x1d2)]=null,this[_0x50eb04(0x258)]=[],this[_0x50eb04(0x655)]=new Set(),this[_0x50eb04(0x717)]={'cookieName':'okdb_session','stateCookieName':_0x50eb04(0x294),'csrfCookieName':'kdb_admin_csrf'},this[_0x50eb04(0x773)]={},this['_loginStates']=new Map(),this['_oidcDiscoveryCache']=null,this[_0x50eb04(0x77a)]=null,this[_0x50eb04(0x307)]=new Map(),this['metrics']=new _0x1497ad(),this['_userPhase']=![],this[_0x50eb04(0x65d)]=0x0;}[_0x5d5633(0x330)](_0x2a8338={}){const _0x35db29=_0x5d5633;return this[_0x35db29(0x773)]=_0x2a8338||{},this[_0x35db29(0x747)]=_0x2a8338['mode']??_0x35db29(0x6ef),this['_authOptions'];}get[_0x5d5633(0x4e5)](){const _0x322c10=_0x5d5633;if(this[_0x322c10(0x426)]?.[_0x322c10(0x717)])return this['_okdb']['auth'][_0x322c10(0x4e5)];return![];}['getAuthOptions'](){const _0x1020ad=_0x5d5633;if(this[_0x1020ad(0x426)]?.['auth'])return this[_0x1020ad(0x426)][_0x1020ad(0x717)][_0x1020ad(0x33b)]();return this['_authOptions']||{};}['use'](_0x337a6c){this['middlewares']['push'](_0x337a6c);}[_0x5d5633(0x681)](_0x4858c1,_0x46b843){const _0x5003a2=_0x5d5633;this[_0x5003a2(0x417)][_0x5003a2(0x494)]({'match':_0x4858c1,'handler':_0x46b843});}[_0x5d5633(0x41a)](_0x1a1526,_0x47ed78,_0x525d77,_0x1a61a0={}){const _0x26362a=_0x5d5633,_0xdd9e72={'method':_0x113ee9(_0x1a1526),'path':_0x47ed78,'matcher':_0x4eacc1(_0x47ed78),'handler':_0x525d77,'meta':_0x1a61a0||{}},_0x5840fe=_0x3566f7(_0xdd9e72);_0xe346dd(_0xdd9e72,_0x5840fe),_0xdd9e72['operation']=_0x5840fe,_0xdd9e72['userAdded']=this['_userPhase']===!![];if(_0xdd9e72[_0x26362a(0x648)])this[_0x26362a(0x65d)]++;this[_0x26362a(0x3af)][_0x26362a(0x494)](_0xdd9e72);}['addRaw'](_0x284295,_0x122888,_0x7b7a24,_0x19229c={}){const _0x124b8b=_0x5d5633;this[_0x124b8b(0x41a)](_0x284295,_0x122888,_0x7b7a24,{..._0x19229c,'raw':!![]});}['_bestMatch'](_0x444869,_0x2ae309,{corsOnly:corsOnly=![]}={}){const _0x37f804=_0x5d5633;let _0x21a070=null,_0x3a2cf7=Infinity;for(const _0x20ec06 of this['routes']){if(corsOnly){if(!_0x20ec06[_0x37f804(0x2e5)]?.['cors'])continue;}else{if(_0x20ec06['method']!==_0x444869)continue;}if(!_0x20ec06[_0x37f804(0x5da)]['regex'][_0x37f804(0x279)](_0x2ae309))continue;const _0x37938c=_0x20ec06[_0x37f804(0x5da)]['keys']?.[_0x37f804(0x1b1)]??0x0;if(_0x37938c<_0x3a2cf7){_0x21a070=_0x20ec06,_0x3a2cf7=_0x37938c;if(_0x37938c===0x0)break;}}return _0x21a070;}[_0x5d5633(0x4b7)](_0x52c20d,_0x5c7881){const _0x3edf19=_0x5d5633,_0x2f8c18=_0x113ee9(_0x52c20d),_0x334e62=this[_0x3edf19(0x263)](_0x2f8c18,_0x5c7881);if(_0x334e62)return _0x334e62;if(_0x2f8c18===_0x3edf19(0x598))return this[_0x3edf19(0x263)](_0x2f8c18,_0x5c7881,{'corsOnly':!![]});return null;}['_shouldWrapResponse'](_0x2a325a,_0x300da4){const _0x4b7331=_0x5d5633;if(_0x2a325a?.[_0x4b7331(0x2e5)]?.[_0x4b7331(0x490)])return![];if(_0x300da4?.[_0x4b7331(0x313)]?.[_0x4b7331(0x331)])return![];return!![];}['listRoutes'](){const _0x3f8b7f=_0x5d5633;return this[_0x3f8b7f(0x3af)][_0x3f8b7f(0x3fb)](_0x335454=>!_0x335454[_0x3f8b7f(0x2e5)]?.[_0x3f8b7f(0x24f)])[_0x3f8b7f(0x2cc)](_0x40c9f0=>({'method':_0x40c9f0[_0x3f8b7f(0x399)],'path':_0x40c9f0['path'],'defaults':_0x40c9f0[_0x3f8b7f(0x5da)][_0x3f8b7f(0x6a0)],'meta':_0x40c9f0[_0x3f8b7f(0x2e5)],'operation':_0x40c9f0[_0x3f8b7f(0x43b)]}));}[_0x5d5633(0x2a6)](_0x15d288,_0x24d8e6,_0x46adea={}){const _0x21d017=_0x5d5633,{PassThrough:_0x2ab2ab}=require$$8;this[_0x21d017(0x41a)](_0x21d017(0x523),_0x15d288,({params:_0x139500,query:_0x2bb619,headers:_0x333c0a,context:_0x261851})=>{const _0x1b02ae=_0x21d017,_0x3d293e=new _0x2ab2ab();let _0x51870a=null;const _0x2860cd={};try{_0x261851?.[_0x1b02ae(0x75a)]?.[_0x1b02ae(0x412)]?.['setNoDelay'](!![]);}catch{}_0x3d293e[_0x1b02ae(0x4f7)](_0x1b02ae(0x2c5)),_0x51870a=setInterval(()=>{const _0x1c9c20=_0x1b02ae;try{_0x3d293e['write'](_0x1c9c20(0x48d));}catch{}},0x3a98);const _0x2ace49=(_0x5c67b8,_0x4dd92f,_0x25f135={})=>{const _0x5004ac=_0x1b02ae;try{const _0x454bf2=_0x25f135['raw']?String(_0x4dd92f??''):JSON[_0x5004ac(0x540)](_0x4dd92f);_0x25f135['id']!=null&&_0x3d293e[_0x5004ac(0x4f7)](_0x5004ac(0x759)+_0x25f135['id']+'\x0a');_0x3d293e[_0x5004ac(0x4f7)](_0x5004ac(0x37e)+_0x5c67b8+'\x0a');for(const _0x2e4b1b of _0x454bf2[_0x5004ac(0x5ed)]('\x0a')){_0x3d293e[_0x5004ac(0x4f7)](_0x5004ac(0x36e)+_0x2e4b1b+'\x0a');}_0x3d293e['write']('\x0a');}catch{}},_0x1e2466=()=>{const _0x1737e6=_0x1b02ae;_0x51870a&&(clearInterval(_0x51870a),_0x51870a=null);try{_0x3d293e[_0x1737e6(0x20b)]();}catch{}},_0x50a4f4=(_0x1be690,_0x2f2bc9)=>{_0x2860cd[_0x1be690]=_0x2f2bc9;};_0x261851?.['req']?.['on'](_0x1b02ae(0x5e4),_0x1e2466),_0x3d293e['on']('close',_0x1e2466);if(_0x261851?.['auth']&&_0x261851[_0x1b02ae(0x717)][_0x1b02ae(0x6ef)]!==!![]&&_0x261851[_0x1b02ae(0x717)][_0x1b02ae(0x622)]){const _0x4c2ce1={'headers':_0x333c0a??{},'cookies':_0x3f5b03(_0x333c0a?.[_0x1b02ae(0x234)]),'context':{},'socket':_0x261851?.[_0x1b02ae(0x75a)]?.[_0x1b02ae(0x412)]??{'remoteAddress':null}},_0x448a67=setInterval(async()=>{const _0x3acc6b=_0x1b02ae;try{const _0x39354f=await this[_0x3acc6b(0x1da)](_0x4c2ce1);if(_0x39354f?.[_0x3acc6b(0x6ef)]===!![]||_0x39354f?.['isAuthenticated'])return;_0x2ace49('auth',{'expired':!![]}),_0x1e2466();}catch{_0x1e2466();}},0xea60);_0x448a67['unref']?.(),_0x3d293e['on']('close',()=>clearInterval(_0x448a67));}const _0x1ac25e=_0x24d8e6({'send':_0x2ace49,'close':_0x1e2466,'params':_0x139500??{},'query':_0x2bb619??{},'headers':_0x333c0a??{},'context':_0x261851,'setHeader':_0x50a4f4});return typeof _0x1ac25e===_0x1b02ae(0x76e)&&_0x3d293e['on'](_0x1b02ae(0x5e4),_0x1ac25e),{'status':0xc8,'headers':{'content-type':'text/event-stream;\x20charset=utf-8','cache-control':_0x1b02ae(0x316),'connection':_0x1b02ae(0x2d2),'x-accel-buffering':'no',..._0x2860cd},'body':_0x3d293e};},{..._0x46adea,'sse':!![]});}async['_runGuards'](_0x5bfbe0,_0x17f111){const _0x1db957=_0x5d5633;for(const _0xf64f32 of this[_0x1db957(0x417)]){if(!_0xf64f32[_0x1db957(0x31f)](_0x5bfbe0))continue;const _0xe0b152=await _0xf64f32[_0x1db957(0x254)](_0x5bfbe0,_0x17f111);if(_0xe0b152===![])return![];}return!![];}async[_0x5d5633(0x317)](_0x1e4f0f,_0xda9ce0,_0x52b133){let _0x468516=0x0;const _0x4c9b7e=async()=>{const _0x4a193f=_0x5511,_0x1672fb=this[_0x4a193f(0x203)][_0x468516++];if(!_0x1672fb)return _0x52b133();return _0x1672fb(_0x1e4f0f,_0xda9ce0,_0x4c9b7e);};return _0x4c9b7e();}['_wrapApiResponse'](_0x3cae45,_0x5144ef){const _0x165b79=_0x5d5633,{status:status=0xc8,headers:headers={},body:_0x397e0b}=_0x3cae45;if(status>=0x12c&&status<0x190)return _0x3cae45;if(_0x5ce215(_0x397e0b))return _0x3cae45;if(Buffer[_0x165b79(0x224)](_0x397e0b))return _0x3cae45;if(typeof _0x397e0b===_0x165b79(0x54f))return _0x3cae45;const _0x1650f1={'time':+_0x5144ef[_0x165b79(0x26b)](0x2)};if(_0x397e0b?.['meta']&&typeof _0x397e0b[_0x165b79(0x2e5)]==='object'){const {time:_0x1b1171,..._0x4f0eaf}=_0x397e0b[_0x165b79(0x2e5)];Object[_0x165b79(0x1eb)](_0x1650f1,_0x4f0eaf);}let _0x36b47b;if(status>=0x190){const _0x1fca8d=_0x570026(status,_0x397e0b);_0x36b47b={'data':null,'error':_0x1fca8d,'meta':_0x1650f1};}else{if(status===0xcc||_0x397e0b==null)_0x36b47b={'data':null,'error':null,'meta':_0x1650f1};else{let _0x4f7348;if(_0x165b79(0x59d)in _0x397e0b)_0x4f7348=_0x397e0b['result'];else{const {meta:_0x3bd6c7,..._0x5dd3e0}=_0x397e0b;_0x4f7348=Object[_0x165b79(0x35c)](_0x5dd3e0)[_0x165b79(0x1b1)]>0x0?_0x5dd3e0:null;}_0x36b47b={'data':_0x4f7348,'error':null,'meta':_0x1650f1};}}return{'status':status===0xcc?0xc8:status,'headers':headers,'body':_0x36b47b};}async[_0x5d5633(0x27f)](_0x56bd09,_0x232f7a,_0x357271={},_0x5dc67f={}){const _0x1aa65c=_0x5d5633;_0x56bd09=_0x113ee9(_0x56bd09);const _0x4c0f66=this['_matchRoute'](_0x56bd09,_0x232f7a),_0x2919c0={'method':_0x56bd09,'path':_0x232f7a,'headers':_0x357271['headers']??{},'body':_0x357271[_0x1aa65c(0x6bd)]??null,'query':_0x357271[_0x1aa65c(0x194)]??{},'context':_0x5dc67f,'cookies':_0x3f5b03(_0x357271[_0x1aa65c(0x313)]?.[_0x1aa65c(0x234)]),'route':_0x4c0f66,'socket':{'remoteAddress':_0x357271[_0x1aa65c(0x5b3)]??'127.0.0.1'}};_0x2919c0[_0x1aa65c(0x3a1)]=_0x2919c0[_0x1aa65c(0x3a1)]||{};!_0x2919c0['context'][_0x1aa65c(0x717)]&&(_0x2919c0[_0x1aa65c(0x3a1)][_0x1aa65c(0x717)]=await this['authenticateRequest'](_0x2919c0));if(_0x2919c0[_0x1aa65c(0x3a1)][_0x1aa65c(0x717)]?.[_0x1aa65c(0x2a5)])return _0x11fe7b({'status':0x193,'body':{'error':{'code':_0x1aa65c(0x3de),'message':'Server\x20is\x20in\x20bootstrap\x20mode\x20and\x20only\x20accepts\x20localhost\x20connections\x20until\x20the\x20first\x20token\x20is\x20created.'}}});_0x2919c0[_0x1aa65c(0x3a1)][_0x1aa65c(0x717)]?.['user']&&!_0x2919c0[_0x1aa65c(0x3a1)][_0x1aa65c(0x468)]&&(_0x2919c0[_0x1aa65c(0x3a1)]['user']=_0x2919c0[_0x1aa65c(0x3a1)][_0x1aa65c(0x717)][_0x1aa65c(0x468)]);let _0x19d918=null;const _0x33d3b4={'status'(_0x2c8b89){const _0x51094=_0x1aa65c;_0x19d918=_0x19d918||{},_0x19d918[_0x51094(0x57d)]=_0x2c8b89;},'setHeader'(_0x201e5c,_0x77b86f){const _0x1dd3e0=_0x1aa65c;_0x19d918=_0x19d918||{},_0x19d918[_0x1dd3e0(0x313)]=_0x19d918[_0x1dd3e0(0x313)]||{};const _0x3b2b14=String(_0x201e5c)[_0x1dd3e0(0x2be)]();if(_0x3b2b14==='set-cookie'){const _0x1cbff5=_0x19d918[_0x1dd3e0(0x313)][_0x201e5c];if(!_0x1cbff5)_0x19d918[_0x1dd3e0(0x313)][_0x201e5c]=_0x77b86f;else{if(Array[_0x1dd3e0(0x729)](_0x1cbff5))_0x1cbff5[_0x1dd3e0(0x494)](_0x77b86f);else _0x19d918[_0x1dd3e0(0x313)][_0x201e5c]=[_0x1cbff5,_0x77b86f];}return;}_0x19d918['headers'][_0x201e5c]=_0x77b86f;},'send'(_0x3a54d8){const _0x1b44c2=_0x1aa65c;_0x19d918=_0x19d918||{},_0x19d918[_0x1b44c2(0x6bd)]=_0x3a54d8;}},_0x2299d7=await this[_0x1aa65c(0x636)](_0x2919c0,_0x33d3b4);if(!_0x2299d7)return _0x11fe7b(_0x19d918??{'status':0x193});const _0x1a7e86=this['_enforceOperationAccess'](_0x2919c0);if(_0x1a7e86)return _0x11fe7b(_0x1a7e86);const _0x21c8b8=this['_validateOperationRequest'](_0x2919c0);if(_0x21c8b8)return _0x11fe7b(_0x21c8b8);return await this[_0x1aa65c(0x317)](_0x2919c0,_0x33d3b4,async()=>{const _0x1c9d44=_0x1aa65c,_0x393e4e=await this[_0x1c9d44(0x689)](_0x2919c0);if(_0x19d918==null){_0x19d918=_0x393e4e;return;}_0x19d918=_0x466409(_0x19d918,_0x393e4e);}),_0x11fe7b(_0x19d918);}[_0x5d5633(0x5a2)](_0x33131d){const _0x31fb75=_0x5d5633,_0x5f2fa8=_0x33131d[_0x31fb75(0x3ef)]?.[_0x31fb75(0x43b)],_0xd064c1=_0x5f2fa8?.['access'];if(!_0x5f2fa8?.[_0x31fb75(0x1e6)]||!_0xd064c1)return null;if(_0x33131d['context']?.[_0x31fb75(0x717)]?.[_0x31fb75(0x6ef)]===!![]||_0x33131d['context']?.[_0x31fb75(0x717)]?.[_0x31fb75(0x53a)]===!![])return null;const _0x14e8ad=_0x4a87b9(_0x33131d['context']),_0x3ae4c5=Array[_0x31fb75(0x729)](_0xd064c1[_0x31fb75(0x452)])?_0xd064c1[_0x31fb75(0x452)]:null;if(_0xd064c1['internalOnly']&&_0x33131d[_0x31fb75(0x3a1)]?.[_0x31fb75(0x2f4)]!==!![])return{'status':0x193,'body':{'error':_0x31fb75(0x682)}};if(_0x3ae4c5&&_0x3ae4c5[_0x31fb75(0x1b1)]>0x0&&!_0x3ae4c5['includes'](_0x14e8ad)&&!(_0x14e8ad==='internal'&&_0x3ae4c5[_0x31fb75(0x70f)](_0x31fb75(0x4f1))))return{'status':0x193,'body':{'error':_0x31fb75(0x682)}};if(_0xd064c1['authRequired']&&!_0x4a56fd(_0x33131d))return{'status':0x191,'body':{'error':_0x31fb75(0x373)}};const _0x34fd28=_0xd064c1['permission'];if(!_0x34fd28)return null;if(_0x33131d['context']?.[_0x31fb75(0x717)]?.[_0x31fb75(0x737)]==='sync-node')return null;const _0x2641fa=_0x33131d[_0x31fb75(0x3a1)]?.[_0x31fb75(0x717)]?.['token'];if(!_0x2641fa){if(_0x33131d[_0x31fb75(0x3a1)]?.[_0x31fb75(0x717)]?.['ok']===!![])return null;return{'status':0x193,'body':{'error':_0x31fb75(0x784)}};}if(!_0x33131d[_0x31fb75(0x764)]&&_0x33131d['route']?.['matcher']){const _0xb9aff5=_0x33131d[_0x31fb75(0x3ef)]['matcher'][_0x31fb75(0x74f)]['exec'](_0x33131d[_0x31fb75(0x504)]);_0xb9aff5&&(_0x33131d[_0x31fb75(0x764)]={},_0x33131d[_0x31fb75(0x3ef)][_0x31fb75(0x5da)][_0x31fb75(0x35c)][_0x31fb75(0x4ff)]((_0x3ea550,_0xfff6b2)=>{const _0x4ceac6=_0x31fb75,_0x97ee9=_0xb9aff5[_0xfff6b2+0x1];_0x33131d[_0x4ceac6(0x764)][_0x3ea550]=_0x97ee9?decodeURIComponent(_0x97ee9):_0x33131d['route'][_0x4ceac6(0x5da)][_0x4ceac6(0x6a0)][_0x3ea550]??undefined;}));}let _0x440717=null;_0xd064c1[_0x31fb75(0x4d8)]?.['env']&&(_0x440717=_0x47569f(_0x33131d,_0xd064c1[_0x31fb75(0x4d8)][_0x31fb75(0x1a1)]));if(_0x440717&&_0x440717[_0x31fb75(0x72d)]('~')){const _0x5ebaab=_0x39651c(_0x34fd28),_0x483301=_0x540eab(_0x2641fa[_0x31fb75(0x48c)]||[],(_0x2641fa['grants']||{})[_0x440717]||[]);if(!_0x103ae3(_0x483301,_0x5ebaab))return{'status':0x193,'body':{'error':_0x31fb75(0x36d)+_0x5ebaab+_0x31fb75(0x4b3)}};}const _0x33425b=_0x540eab(_0x2641fa[_0x31fb75(0x48c)]||[],_0x440717?(_0x2641fa[_0x31fb75(0x1bb)]||{})[_0x440717]||[]:[]);if(!_0x103ae3(_0x33425b,_0x34fd28))return{'status':0x193,'body':{'error':_0x31fb75(0x36d)+_0x34fd28}};return null;}[_0x5d5633(0x71a)](_0x2b9a65){const _0x3c9f02=_0x5d5633,_0x27cdd5=_0x2b9a65[_0x3c9f02(0x3ef)],_0x1770e1=_0x27cdd5?.[_0x3c9f02(0x43b)];if(!_0x1770e1?.[_0x3c9f02(0x1e6)]||!_0x1770e1[_0x3c9f02(0x57a)])return null;let _0x12e264=_0x2b9a65[_0x3c9f02(0x764)]??null;if(!_0x12e264&&_0x27cdd5?.[_0x3c9f02(0x5da)]){const _0x8b538d=_0x27cdd5[_0x3c9f02(0x5da)][_0x3c9f02(0x74f)][_0x3c9f02(0x201)](_0x2b9a65[_0x3c9f02(0x504)]);_0x8b538d&&(_0x12e264={},_0x27cdd5[_0x3c9f02(0x5da)][_0x3c9f02(0x35c)][_0x3c9f02(0x4ff)]((_0x506ff7,_0x300870)=>{const _0xa57615=_0x3c9f02,_0x571b45=_0x8b538d[_0x300870+0x1];_0x12e264[_0x506ff7]=_0x571b45?decodeURIComponent(_0x571b45):_0x27cdd5[_0xa57615(0x5da)][_0xa57615(0x6a0)][_0x506ff7]??undefined;}));}const _0x4a2287=_0x3156df(_0x27cdd5,_0x12e264??{},_0x2b9a65[_0x3c9f02(0x194)]??{},_0x2b9a65['body'],_0x2b9a65[_0x3c9f02(0x313)]??{}),_0x5980c8=_0x10d068(_0x27cdd5,_0x4a2287||{});if(!_0x5980c8)return null;const _0x430914=_0x5ba0c6(_0x5980c8[_0x3c9f02(0x5bc)]);return{'status':0x190,'body':{'error':_0x5980c8['code'],'code':_0x5980c8['code'],'message':_0x430914?_0x3c9f02(0x292)+_0x430914:_0x3c9f02(0x625),'details':_0x5980c8[_0x3c9f02(0x5bc)]}};}[_0x5d5633(0x33d)](_0x98e470,_0x26ce4a){const _0x2aeb50=_0x5d5633,_0x1de674=_0x10d068(_0x98e470,_0x26ce4a||{});if(!_0x1de674)return null;return{'code':_0x1de674['code'],'message':_0x5ba0c6(_0x1de674['errors'])?_0x2aeb50(0x292)+_0x5ba0c6(_0x1de674['errors']):_0x2aeb50(0x625),'details':_0x1de674[_0x2aeb50(0x5bc)]};}async[_0x5d5633(0x689)](_0x269fb4){const _0xe3699d=_0x5d5633;if(_0x269fb4[_0xe3699d(0x399)]===_0xe3699d(0x598)){const _0x830a3=this[_0xe3699d(0x263)](_0xe3699d(0x598),_0x269fb4[_0xe3699d(0x504)],{'corsOnly':!![]});if(_0x830a3)return{'status':0xcc,'headers':_0x1907c1(_0x269fb4[_0xe3699d(0x313)],_0x830a3[_0xe3699d(0x2e5)]['cors'],_0x830a3[_0xe3699d(0x399)])||{}};}const _0x709d9b=this[_0xe3699d(0x263)](_0x269fb4[_0xe3699d(0x399)],_0x269fb4[_0xe3699d(0x504)]);if(_0x709d9b){const _0x19652c=_0x709d9b[_0xe3699d(0x5da)]['regex'][_0xe3699d(0x201)](_0x269fb4['path']),_0x34dfbf={};_0x709d9b['matcher'][_0xe3699d(0x35c)]['forEach']((_0x125ab1,_0x186d95)=>{const _0x470431=_0xe3699d,_0x96190c=_0x19652c[_0x186d95+0x1];_0x34dfbf[_0x125ab1]=_0x96190c?decodeURIComponent(_0x96190c):_0x709d9b['matcher'][_0x470431(0x6a0)][_0x125ab1]??undefined;}),_0x269fb4['params']=_0x34dfbf;try{const _0x5e194a=await _0x709d9b[_0xe3699d(0x254)]({'params':_0x34dfbf,'body':_0x269fb4[_0xe3699d(0x6bd)],'query':_0x269fb4[_0xe3699d(0x194)],'headers':_0x269fb4[_0xe3699d(0x313)],'context':_0x269fb4[_0xe3699d(0x3a1)]}),_0x273fd4=_0x11fe7b(_0x5e194a),_0x6af241=_0x1907c1(_0x269fb4[_0xe3699d(0x313)],_0x709d9b[_0xe3699d(0x2e5)]?.[_0xe3699d(0x463)],_0x709d9b[_0xe3699d(0x399)]);if(!_0x6af241)return _0x273fd4;return{..._0x273fd4,'headers':{..._0x273fd4[_0xe3699d(0x313)]||{},..._0x6af241}};}catch(_0x2c78ba){const _0x4159e8=_0x2c78ba?.[_0xe3699d(0x57d)]||_0x59cfaf[_0x2c78ba?.[_0xe3699d(0x5cc)]]||0x1f4;return{'status':_0x4159e8,'body':{'error':_0x2c78ba[_0xe3699d(0x246)]||_0xe3699d(0x6da),'code':_0x2c78ba?.[_0xe3699d(0x5cc)]||_0x474957[_0x4159e8]||'HTTP_'+_0x4159e8,'message':_0x2c78ba?.[_0xe3699d(0x246)]||_0xe3699d(0x6da),..._0x2c78ba?.[_0xe3699d(0x656)]!=null?{'details':_0x2c78ba[_0xe3699d(0x656)]}:{}}};}}return{'status':0x194,'body':{'error':'Not\x20Found'}};}[_0x5d5633(0x2b1)](_0x4469a3,_0x4e6493={}){const _0x3eea8f=_0x5d5633;if(typeof _0x4e6493==='string'||Array[_0x3eea8f(0x729)](_0x4e6493))_0x4e6493={'host':_0x4e6493};_0x4e6493=_0x4e6493??{};const _0x43ae63=Number(_0x4e6493[_0x3eea8f(0x4d1)])||0x0;if(_0x43ae63>=0x1||_0x4e6493[_0x3eea8f(0x611)]!=null||_0x4e6493[_0x3eea8f(0x6ee)]!=null){const _0x103804=new Error(_0x3eea8f(0x40c)+_0x3eea8f(0x72f)+_0x3eea8f(0x43a)+_0x3eea8f(0x594));_0x103804[_0x3eea8f(0x5cc)]=_0x3eea8f(0x708);throw _0x103804;}if(this[_0x3eea8f(0x1d2)])throw new Error(_0x3eea8f(0x260));const _0x39f6e4=_0x4e6493[_0x3eea8f(0x2d6)]==null?[undefined]:[][_0x3eea8f(0x33f)](_0x4e6493['host']);if(!_0x39f6e4[_0x3eea8f(0x1b1)]||_0x39f6e4[_0x3eea8f(0x7a8)](_0x5c9bda=>_0x5c9bda!==undefined&&(typeof _0x5c9bda!==_0x3eea8f(0x54f)||!_0x5c9bda))){const _0x44bb07=new Error(_0x3eea8f(0x6e6));_0x44bb07[_0x3eea8f(0x5cc)]='BAD_HOST';throw _0x44bb07;}_0x4469a3&&this[_0x3eea8f(0x717)][_0x3eea8f(0x1cf)]===_0x3eea8f(0x1b6)&&(this[_0x3eea8f(0x717)][_0x3eea8f(0x1cf)]=_0x3eea8f(0x5e8)+_0x4469a3,this[_0x3eea8f(0x426)]?.['auth']&&(this[_0x3eea8f(0x426)][_0x3eea8f(0x717)][_0x3eea8f(0x633)]=this[_0x3eea8f(0x717)][_0x3eea8f(0x1cf)]));const _0xa37640=this[_0x3eea8f(0x426)]?.[_0x3eea8f(0x76b)]?.['debug']?.[_0x3eea8f(0x4de)]??![],_0x9d3383=async(_0x55a715,_0x2665e7)=>{const _0x498aca=_0x3eea8f,_0x2f99b2=Date['now']();if(_0xa37640){const _0x3e17a4=_0x55a715[_0x498aca(0x51d)]||'/',_0x2a757d=_0x55a715[_0x498aca(0x313)]?.[_0x498aca(0x4a1)]?_0x55a715[_0x498aca(0x313)][_0x498aca(0x4a1)][_0x498aca(0x1f7)](/^Bearer\s+(\S{0,8})\S*/i,_0x498aca(0x233)):'-',_0x41320d=_0x55a715[_0x498aca(0x313)]?.['cf-ray']||'-',_0x499544=_0x55a715[_0x498aca(0x313)]?.[_0x498aca(0x287)]||_0x55a715[_0x498aca(0x313)]?.[_0x498aca(0x4e2)]||'-',_0x5e50cc=_0x55a715['headers']?.[_0x498aca(0x72e)]||'-';process[_0x498aca(0x5c6)]['write']('[req]\x20'+_0x55a715[_0x498aca(0x399)]['padEnd'](0x7)+'\x20'+_0x3e17a4[_0x498aca(0x48a)](0x2d)+'\x20'+(_0x498aca(0x4f4)+_0x2a757d+_0x498aca(0x6e8)+_0x5e50cc+_0x498aca(0x756)+_0x41320d+'\x20cf-ip='+_0x499544+'\x0a'));}try{const _0x3737b4=new _0x15e479(_0x55a715['url'],'http://'+_0x55a715[_0x498aca(0x313)][_0x498aca(0x2d6)]),_0x2d4157=this['_matchRoute'](_0x55a715[_0x498aca(0x399)],_0x3737b4['pathname']),_0x35f325=_0x2d4157?.['meta']?.[_0x498aca(0x5f7)]===!![];if(_0x35f325){const _0x4b76a0=_0x55a715[_0x498aca(0x313)]?.['content-length'];if(_0x4b76a0!=null){const _0xc14a3a=Number(_0x4b76a0);if(Number[_0x498aca(0x39f)](_0xc14a3a)&&_0xc14a3a>this[_0x498aca(0x691)]){_0x2665e7[_0x498aca(0x2c3)]=0x19d,_0x2665e7[_0x498aca(0x281)](_0x498aca(0x3d9));return;}}}const _0x137c88=_0x35f325?null:await _0x1b30dc(_0x55a715,this[_0x498aca(0x691)]),_0x5253f4=_0x35f325?_0x130746(_0x55a715,this['maxBodyBytes']):undefined,_0xec59ec=await this['handle'](_0x55a715[_0x498aca(0x399)],_0x3737b4[_0x498aca(0x573)],{'body':_0x137c88,'query':Object[_0x498aca(0x26f)](_0x3737b4[_0x498aca(0x413)][_0x498aca(0x352)]()),'headers':_0x55a715['headers']},{'req':_0x55a715,'res':_0x2665e7,'rawStream':_0x5253f4}),_0x39bf30=this[_0x498aca(0x4b7)](_0x55a715[_0x498aca(0x399)],_0x3737b4['pathname']),_0x1d873b=Date[_0x498aca(0x6a7)]()-_0x2f99b2,_0x78fac2=this[_0x498aca(0x28e)](_0x39bf30,_0xec59ec)?this[_0x498aca(0x671)](_0xec59ec,_0x1d873b):_0x11fe7b(_0xec59ec),_0x159cbb=(_0x78fac2['status']||0xc8)>=0x190;this[_0x498aca(0x22b)]['record'](_0x55a715[_0x498aca(0x399)],_0x1d873b,_0x159cbb),_0x2acb87(_0x2665e7,_0x78fac2);if(_0xa37640){const _0x2681ba=_0x78fac2[_0x498aca(0x57d)]||0xc8,_0xde3b2b=Date['now']()-_0x2f99b2;process['stdout'][_0x498aca(0x4f7)](_0x498aca(0x3b8)+_0x55a715[_0x498aca(0x399)]['padEnd'](0x7)+'\x20'+_0x3737b4[_0x498aca(0x573)][_0x498aca(0x48a)](0x2d)+'\x20'+_0x2681ba+'\x20\x20'+_0xde3b2b+_0x498aca(0x289));}}catch(_0x37e4a9){const _0x1a35a7=Date[_0x498aca(0x6a7)]()-_0x2f99b2;this[_0x498aca(0x22b)]['record'](_0x55a715[_0x498aca(0x399)],_0x1a35a7,!![]);const _0x5baeee=_0x37e4a9?.[_0x498aca(0x57d)]||0x1f4;_0x2665e7[_0x498aca(0x2c3)]=_0x5baeee,_0x5baeee===0x19d?_0x2665e7['end']('Payload\x20too\x20large'):_0x2665e7[_0x498aca(0x281)](_0x37e4a9[_0x498aca(0x246)]||_0x498aca(0x6da));}};this[_0x3eea8f(0x258)]=_0x39f6e4['map'](_0x3d2dd4=>{const _0x2940c6=_0x3eea8f,_0x352402=_0x301872['createServer'](_0x9d3383);_0x352402['on'](_0x2940c6(0x651),_0x6604cc=>{const _0x22888a=_0x2940c6;this[_0x22888a(0x655)][_0x22888a(0x41a)](_0x6604cc),_0x6604cc['on'](_0x22888a(0x5e4),()=>this[_0x22888a(0x655)]['delete'](_0x6604cc));});if(_0x3d2dd4===undefined)_0x352402[_0x2940c6(0x2b1)](_0x4469a3);else _0x352402['listen'](_0x4469a3,_0x3d2dd4);return _0x352402;}),this[_0x3eea8f(0x1d2)]=this[_0x3eea8f(0x258)][0x0];for(const _0x20ebb9 of this[_0x3eea8f(0x258)][_0x3eea8f(0x7a7)](0x1))_0x20ebb9['on'](_0x3eea8f(0x3ba),_0x19d30f=>this[_0x3eea8f(0x1d2)]?.[_0x3eea8f(0x652)](_0x3eea8f(0x3ba),_0x19d30f));const _0x3bef35=_0x34c89c(_0x4469a3,_0x4e6493[_0x3eea8f(0x2d6)]),_0x8f7b61=this[_0x3eea8f(0x426)];return _0x8f7b61?.[_0x3eea8f(0x683)]&&(_0x8f7b61['processes']['noteListenAddr'](_0x3bef35),require$$1$2[_0x3eea8f(0x4cb)]?_0x8f7b61[_0x3eea8f(0x5d2)]?.({'kind':'http-server'})[_0x3eea8f(0x58b)](()=>{}):_0x8f7b61[_0x3eea8f(0x308)]?.({'kind':_0x3eea8f(0x29f),'listenAddr':_0x3bef35})[_0x3eea8f(0x58b)](()=>{})),this[_0x3eea8f(0x1d2)];}async[_0x5d5633(0x5e4)](_0xce36ac={}){const _0x4a8c62=_0x5d5633,_0x4a2649=this['server'];this[_0x4a8c62(0x1d2)]=null;const _0x1164e5=this[_0x4a8c62(0x258)][_0x4a8c62(0x70f)](_0x4a2649)?this[_0x4a8c62(0x258)]:_0x4a2649?[_0x4a2649]:[];this[_0x4a8c62(0x258)]=[];if(_0x4a2649&&_0x4a2649[_0x4a8c62(0x6bb)]){try{await _0x4a2649[_0x4a8c62(0x5e4)]();}catch{}this['metrics']&&this[_0x4a8c62(0x22b)]['close']();return;}if(_0x1164e5['length']){const _0x5f301f=Number[_0x4a8c62(0x39f)](_0xce36ac['forceAfterMs'])?Math[_0x4a8c62(0x46c)](0x0,_0xce36ac[_0x4a8c62(0x3e6)]):0x3e8,_0x2a8afd=_0x2ec69f=>new Promise(_0x18e233=>{const _0x20bf84=_0x4a8c62;let _0x5b8cf4=![],_0x28ecde=null,_0x2857f1=null;const _0x4bbf4b=()=>{if(_0x5b8cf4)return;_0x5b8cf4=!![];if(_0x28ecde)clearTimeout(_0x28ecde);if(_0x2857f1)clearTimeout(_0x2857f1);_0x18e233();};try{_0x2ec69f['close'](_0x4bbf4b);}catch{_0x4bbf4b();return;}try{_0x2ec69f[_0x20bf84(0x227)]?.();}catch{}_0x28ecde=setTimeout(()=>{const _0x2ee950=_0x20bf84;try{_0x2ec69f[_0x2ee950(0x285)]?.();}catch{}for(const _0x1ca311 of this['_sockets']){try{_0x1ca311[_0x2ee950(0x20b)]();}catch{}}_0x2857f1=setTimeout(_0x4bbf4b,0x64),_0x2857f1[_0x2ee950(0x6d1)]?.();},_0x5f301f),_0x28ecde[_0x20bf84(0x6d1)]?.();});await Promise[_0x4a8c62(0x70d)](_0x1164e5['map'](_0x2a8afd));}this['metrics']&&this[_0x4a8c62(0x22b)][_0x4a8c62(0x5e4)]();}[_0x5d5633(0x249)](_0x5467e4,_0x258275,_0xc13afd=0x36ee80){const _0x5d72e3=_0x5d5633,_0x3a8095=Date['now'](),_0x3a1c16=Buffer[_0x5d72e3(0x716)](JSON[_0x5d72e3(0x540)]({'iat':_0x3a8095,'exp':_0x3a8095+_0xc13afd,..._0x5467e4}))[_0x5d72e3(0x202)](_0x5d72e3(0x465)),_0x21ade6=_0x273263(_0x3a1c16,_0x258275);return _0x3a1c16+'.'+_0x21ade6;}[_0x5d5633(0x1e5)](_0x4d24d5,_0x31dfdc={}){const _0x515008=_0x5d5633,{httpOnly:httpOnly=!![],sameSite:sameSite=_0x515008(0x4d2),path:path='/',secure:secure=![],maxAge:maxAge=null,expires:expires=null}=_0x31dfdc;let _0x13be71=this[_0x515008(0x717)]['cookieName']+'='+_0x4d24d5;if(httpOnly)_0x13be71+=_0x515008(0x6d6);if(sameSite)_0x13be71+=_0x515008(0x30a)+sameSite;if(path)_0x13be71+=_0x515008(0x5d4)+path;if(secure)_0x13be71+=_0x515008(0x25f);if(Number['isFinite'](maxAge))_0x13be71+=';\x20Max-Age='+Math['max'](0x0,Math[_0x515008(0x1f9)](maxAge));if(expires instanceof Date)_0x13be71+=_0x515008(0x58a)+expires['toUTCString']();return _0x13be71;}[_0x5d5633(0x5f1)](_0x535817=this[_0x5d5633(0x717)][_0x5d5633(0x1cf)],_0xd977d2={}){const _0x3a3eed=_0x5d5633,{path:path='/',sameSite:sameSite='Lax',secure:secure=![],httpOnly:httpOnly=!![]}=_0xd977d2;let _0xde7e08=_0x535817+'=';if(httpOnly)_0xde7e08+=_0x3a3eed(0x6d6);if(sameSite)_0xde7e08+=_0x3a3eed(0x30a)+sameSite;if(path)_0xde7e08+=_0x3a3eed(0x5d4)+path;if(secure)_0xde7e08+=_0x3a3eed(0x25f);return _0xde7e08+=_0x3a3eed(0x6c1),_0xde7e08;}[_0x5d5633(0x5b0)](_0x2999e4,_0x74c52b){const _0x9ba899=_0x5d5633;if(!_0x2999e4)return null;const [_0x3c3864,_0x461118]=String(_0x2999e4)[_0x9ba899(0x5ed)]('.');if(!_0x3c3864||!_0x461118)return null;const _0x56e143=_0x273263(_0x3c3864,_0x74c52b);if(!_0xb2fab6(_0x461118,_0x56e143))return null;try{const _0x5e2a5e=JSON[_0x9ba899(0x355)](Buffer[_0x9ba899(0x716)](_0x3c3864,_0x9ba899(0x465))[_0x9ba899(0x202)]());if(_0x5e2a5e[_0x9ba899(0x5b5)]<=Date[_0x9ba899(0x6a7)]())return null;return _0x5e2a5e;}catch{return null;}}[_0x5d5633(0x4f8)](_0x173cf5){const _0x27688d=_0x5d5633;if(this[_0x27688d(0x426)]?.[_0x27688d(0x717)])return this['_okdb']['auth'][_0x27688d(0x4f8)](_0x173cf5);return _0x2ce7fb(_0x173cf5);}[_0x5d5633(0x441)](_0x26273f){const _0x1807d4=_0x5d5633;if(this[_0x1807d4(0x426)]?.[_0x1807d4(0x717)])return this[_0x1807d4(0x426)][_0x1807d4(0x717)][_0x1807d4(0x441)](_0x26273f);const _0x5c72fd=this[_0x1807d4(0x773)]?.[_0x1807d4(0x423)]??0x36ee80,_0x47b248=this['_authOptions']?.['tokenSecret'];return _0xc4a5a6(_0x26273f,_0x47b248,_0x5c72fd);}[_0x5d5633(0x692)](_0x32ff01){const _0x5a1704=_0x5d5633;if(this[_0x5a1704(0x426)]?.['auth'])return this[_0x5a1704(0x426)][_0x5a1704(0x717)][_0x5a1704(0x692)](_0x32ff01);const _0x5d385e=this[_0x5a1704(0x773)]?.[_0x5a1704(0x345)];return _0x175736(_0x32ff01,_0x5d385e);}async['authenticateRequest'](_0x88a548){const _0x248e8c=_0x5d5633;if(this[_0x248e8c(0x426)]?.['auth'])return this[_0x248e8c(0x426)][_0x248e8c(0x717)][_0x248e8c(0x1da)](_0x88a548);if(_0x88a548[_0x248e8c(0x3a1)]?.[_0x248e8c(0x2f4)]===!![]||this[_0x248e8c(0x747)]===_0x248e8c(0x6ef))return{'id':_0x248e8c(0x256),'username':_0x248e8c(0x256),'roles':[_0x248e8c(0x731)],'isAuthenticated':!![],'isSystem':!![],'user':{'id':_0x248e8c(0x256),'username':_0x248e8c(0x256),'roles':[_0x248e8c(0x731)],'isAuthenticated':!![],'isSystem':!![]}};const _0x33dda9=this[_0x248e8c(0x4f8)](_0x88a548[_0x248e8c(0x313)]?.[_0x248e8c(0x4a1)]),_0x3fa941=_0x88a548[_0x248e8c(0x381)]?.[this['auth'][_0x248e8c(0x1cf)]],_0x44258b=_0x33dda9||_0x3fa941;if(!_0x44258b)return{'isAuthenticated':![],'isSystem':![],'user':null};const _0x5a76df=this['authenticateToken'](_0x44258b);if(!_0x5a76df)return{'isAuthenticated':![],'isSystem':![],'user':null};const _0x578b1d={'id':_0x5a76df[_0x248e8c(0x6ca)]??null,'username':_0x5a76df[_0x248e8c(0x6b2)]??null,'roles':Array[_0x248e8c(0x729)](_0x5a76df[_0x248e8c(0x56c)])?_0x5a76df[_0x248e8c(0x56c)]:[],'isAuthenticated':!![],'isSystem':![]};return{'id':_0x578b1d['id'],'username':_0x578b1d[_0x248e8c(0x6b2)],'roles':_0x578b1d[_0x248e8c(0x56c)],'isAuthenticated':!![],'isSystem':![],'user':_0x578b1d,'claims':_0x5a76df,'subject':_0x578b1d['id']};}async[_0x5d5633(0x5c3)](_0x5f4655,_0x1fc685={}){const _0x43935c=_0x5d5633,_0x122a93=_0x1be0f0(_0x5f4655),_0x6f417b=Array[_0x43935c(0x729)](_0x1fc685[_0x43935c(0x218)])&&_0x1fc685[_0x43935c(0x218)][_0x43935c(0x1b1)]>0x0?_0x1fc685[_0x43935c(0x218)]:[_0x43935c(0x663),'ES256'],_0x584eba=_0x122a93[_0x43935c(0x65e)]?.['alg'];if(!_0x6f417b[_0x43935c(0x70f)](_0x584eba))throw new Error(_0x43935c(0x252)+_0x584eba);if(!_0x122a93[_0x43935c(0x65e)]?.[_0x43935c(0x4a9)])throw new Error('JWT\x20is\x20missing\x20kid');const _0x35aa30=await this[_0x43935c(0x455)](_0x1fc685);if(!_0x35aa30?.[_0x43935c(0x257)])throw new Error('OIDC\x20discovery\x20missing\x20jwks_uri');const _0x5bac8b=await this[_0x43935c(0x25e)](_0x35aa30[_0x43935c(0x257)],_0x122a93[_0x43935c(0x65e)][_0x43935c(0x4a9)],_0x1fc685);if(!_0xf110ca(_0x584eba,_0x5bac8b,_0x122a93[_0x43935c(0x425)],_0x122a93[_0x43935c(0x61c)]))throw new Error(_0x43935c(0x3e5));const _0xe8088d=Math[_0x43935c(0x1f9)](Date[_0x43935c(0x6a7)]()/0x3e8),_0x342581=_0x122a93[_0x43935c(0x4fe)]||{};if(_0x342581[_0x43935c(0x204)]!==_0x35aa30[_0x43935c(0x2f9)])throw new Error(_0x43935c(0x390));const _0x5e8cfd=_0x1fc685['audience'];if(_0x5e8cfd){const _0x601f73=_0x564998(_0x342581[_0x43935c(0x677)]);if(!_0x601f73[_0x43935c(0x70f)](_0x5e8cfd))throw new Error('JWT\x20audience\x20mismatch');}if(typeof _0x342581['exp']!==_0x43935c(0x758)||_0x342581['exp']<=_0xe8088d)throw new Error('JWT\x20expired');if(_0x342581[_0x43935c(0x705)]!=null&&_0x342581[_0x43935c(0x705)]>_0xe8088d)throw new Error('JWT\x20not\x20yet\x20valid');if(_0x342581['token_use']==='id')throw new Error(_0x43935c(0x421));return{'subject':_0x342581[_0x43935c(0x6ca)]??null,'email':_0x342581[_0x43935c(0x6a5)]??null,'scopes':typeof _0x342581[_0x43935c(0x4d8)]===_0x43935c(0x54f)?_0x342581[_0x43935c(0x4d8)]['split'](/\s+/)[_0x43935c(0x3fb)](Boolean):[],'claims':_0x342581,'tokenType':_0x43935c(0x557)};}async[_0x5d5633(0x455)](_0x2cb0ec={}){const _0x5be7e5=_0x5d5633,_0x793b3e=String(_0x2cb0ec['issuer']||'')['replace'](/\/+$/,'');if(!_0x793b3e)return null;const _0x150e5b=Number[_0x5be7e5(0x39f)](_0x2cb0ec[_0x5be7e5(0x71d)])?_0x2cb0ec[_0x5be7e5(0x71d)]:0xa*0x3c*0x3e8;if(this[_0x5be7e5(0x571)]?.[_0x5be7e5(0x2f9)]===_0x793b3e&&this['_oidcDiscoveryCache'][_0x5be7e5(0x337)]>Date[_0x5be7e5(0x6a7)]())return this[_0x5be7e5(0x571)]['value'];const _0x6ff472=await _0x4fa889(_0x793b3e+'/.well-known/openid-configuration'),_0x14f6ae={'issuer':_0x6ff472[_0x5be7e5(0x2f9)]||_0x793b3e,'authorization_endpoint':_0x2cb0ec['authorizationUrl']||_0x6ff472['authorization_endpoint'],'token_endpoint':_0x2cb0ec['tokenUrl']||_0x6ff472['token_endpoint'],'jwks_uri':_0x2cb0ec[_0x5be7e5(0x5e7)]||_0x6ff472['jwks_uri']};return this[_0x5be7e5(0x571)]={'issuer':_0x793b3e,'value':_0x14f6ae,'expiresAt':Date['now']()+_0x150e5b},_0x14f6ae;}async['_fetchJwks'](_0x37c54a,_0x633c70=0x5*0x3c*0x3e8){const _0xdb6167=_0x5d5633,_0x2c453a=await _0x4fa889(_0x37c54a),_0x202898=new Map();for(const _0x1b212d of _0x2c453a[_0xdb6167(0x35c)]||[]){if(!_0x1b212d?.[_0xdb6167(0x4a9)])continue;_0x202898[_0xdb6167(0x238)](_0x1b212d[_0xdb6167(0x4a9)],_0x6dd18d(_0x1b212d));}return this['_jwksCache']={'uri':_0x37c54a,'keys':_0x202898,'expiresAt':Date[_0xdb6167(0x6a7)]()+_0x633c70},this[_0xdb6167(0x77a)];}async['_getJwkKey'](_0x41d259,_0x2f4628,_0x1b356a={}){const _0x401984=_0x5d5633,_0x29147f=Number[_0x401984(0x39f)](_0x1b356a[_0x401984(0x382)])?_0x1b356a[_0x401984(0x382)]:0x5*0x3c*0x3e8,_0x28eae4=0x1e*0x3e8,_0x583618=this[_0x401984(0x307)][_0x401984(0x5e0)](_0x2f4628);if(_0x583618!==undefined&&_0x583618>Date[_0x401984(0x6a7)]())throw new Error(_0x401984(0x6e4)+_0x2f4628);(!this[_0x401984(0x77a)]||this['_jwksCache'][_0x401984(0x3b6)]!==_0x41d259||this[_0x401984(0x77a)][_0x401984(0x337)]<=Date[_0x401984(0x6a7)]())&&await this[_0x401984(0x782)](_0x41d259,_0x29147f);let _0x32cacf=this[_0x401984(0x77a)]?.[_0x401984(0x35c)]?.['get'](_0x2f4628);if(_0x32cacf)return _0x32cacf;await this[_0x401984(0x782)](_0x41d259,_0x29147f),_0x32cacf=this[_0x401984(0x77a)]?.[_0x401984(0x35c)]?.[_0x401984(0x5e0)](_0x2f4628);if(!_0x32cacf){this[_0x401984(0x307)][_0x401984(0x238)](_0x2f4628,Date[_0x401984(0x6a7)]()+_0x28eae4);throw new Error(_0x401984(0x6e4)+_0x2f4628);}return _0x32cacf;}[_0x5d5633(0x76a)](_0x44bd4a){const _0x327ca2=_0x5d5633;if(this[_0x327ca2(0x426)]?.[_0x327ca2(0x717)])return this['_okdb'][_0x327ca2(0x717)][_0x327ca2(0x76a)](_0x44bd4a);const _0x4eec9d=_0x44bd4a?.[_0x327ca2(0x343)]||{},_0x2f3a53={'sub':_0x44bd4a?.[_0x327ca2(0x361)]??_0x4eec9d['sub']??null,'email':_0x44bd4a?.['email']??_0x4eec9d[_0x327ca2(0x6a5)]??null,'name':_0x44bd4a?.['name']??_0x4eec9d[_0x327ca2(0x60a)]??_0x4eec9d['preferred_username']??null,'groups':_0x44bd4a?.[_0x327ca2(0x78c)]??_0x4eec9d['groups']??[],'roles':_0x44bd4a?.['roles']??_0x4eec9d[_0x327ca2(0x56c)]??[]};return{'type':_0x327ca2(0x1dc),'tokenType':_0x44bd4a?.[_0x327ca2(0x6a6)]??'access','subject':_0x2f3a53[_0x327ca2(0x6ca)],'email':_0x2f3a53[_0x327ca2(0x6a5)],'scopes':_0x44bd4a?.['scopes']??_0x4eec9d[_0x327ca2(0x4d8)]?.[_0x327ca2(0x5ed)]?.('\x20')?.[_0x327ca2(0x3fb)](Boolean)??[],'claims':_0x4eec9d,'user':_0x2f3a53,'isAuthenticated':!![]};}[_0x5d5633(0x3e7)](_0x2e8e0e={},_0x334f47=0x927c0){const _0x3da5c6=_0x5d5633;if(this['_okdb']?.[_0x3da5c6(0x717)])return this[_0x3da5c6(0x426)][_0x3da5c6(0x717)][_0x3da5c6(0x3e7)](_0x2e8e0e,_0x334f47);const _0x4c58ce=_0x13e04f(0x18);this['_loginStates'][_0x3da5c6(0x238)](_0x4c58ce,{..._0x2e8e0e,'exp':Date[_0x3da5c6(0x6a7)]()+_0x334f47});if(this[_0x3da5c6(0x63c)][_0x3da5c6(0x50f)]%0x32===0x0){const _0x114148=Date['now']();for(const [_0x4a52a0,_0x36963e]of this[_0x3da5c6(0x63c)]){if(_0x36963e[_0x3da5c6(0x5b5)]<=_0x114148)this[_0x3da5c6(0x63c)][_0x3da5c6(0x614)](_0x4a52a0);}}return _0x4c58ce;}[_0x5d5633(0x493)](_0x55e638){const _0xaa570=_0x5d5633;if(this[_0xaa570(0x426)]?.[_0xaa570(0x717)])return this[_0xaa570(0x426)][_0xaa570(0x717)][_0xaa570(0x493)](_0x55e638);if(!_0x55e638)return null;const _0x52c2e2=this[_0xaa570(0x63c)][_0xaa570(0x5e0)](_0x55e638);this['_loginStates'][_0xaa570(0x614)](_0x55e638);if(!_0x52c2e2)return null;if(_0x52c2e2['exp']<=Date['now']())return null;return _0x52c2e2;}}function _0x11fe7b(_0x201f11){const _0x44bcce=_0x5d5633;if(_0x201f11==null)return{'status':0xcc};if(Buffer[_0x44bcce(0x224)](_0x201f11)||_0x5ce215(_0x201f11))return{'status':0xc8,'body':_0x201f11};if(typeof _0x201f11==='object'&&_0x44bcce(0x57d)in _0x201f11){if(!(_0x44bcce(0x6bd)in _0x201f11)&&!_0x5ce215(_0x201f11[_0x44bcce(0x6bd)])){const {status:_0x896a3a,headers:_0x561adb,..._0x2820a9}=_0x201f11;if(Object[_0x44bcce(0x35c)](_0x2820a9)['length']>0x0)return{'status':_0x896a3a,'headers':_0x561adb,'body':_0x2820a9};}return _0x201f11;}return{'status':0xc8,'body':_0x201f11};}function _0x5ce215(_0x2dad4f){const _0x3e0881=_0x5d5633;return _0x2dad4f&&typeof _0x2dad4f[_0x3e0881(0x309)]===_0x3e0881(0x76e);}function _0x130746(_0x4d05d9,_0x6650ef){const _0x15fb2c=_0x5d5633,{PassThrough:_0x3adcd7}=require$$8;let _0x18823d=0x0,_0x3ad90f=![];const _0x3630f2=new _0x3adcd7();return _0x4d05d9['on'](_0x15fb2c(0x268),_0x5065e1=>{const _0x4e90fc=_0x15fb2c;if(_0x3ad90f)return;_0x18823d+=_0x5065e1[_0x4e90fc(0x1b1)];if(_0x18823d>_0x6650ef){_0x3ad90f=!![];const _0x272b9d=new Error('Payload\x20too\x20large');_0x272b9d[_0x4e90fc(0x57d)]=0x19d,_0x3630f2['destroy'](_0x272b9d);return;}if(!_0x3630f2[_0x4e90fc(0x3c5)])_0x3630f2['push'](_0x5065e1);}),_0x4d05d9['on'](_0x15fb2c(0x281),()=>{const _0x3f0611=_0x15fb2c;!_0x3ad90f&&!_0x3630f2[_0x3f0611(0x3c5)]&&(_0x3ad90f=!![],_0x3630f2[_0x3f0611(0x281)]());}),_0x4d05d9['on'](_0x15fb2c(0x3ba),_0x186bd0=>{const _0x5d140e=_0x15fb2c;if(!_0x3630f2[_0x5d140e(0x3c5)])_0x3630f2['destroy'](_0x186bd0);}),_0x4d05d9[_0x15fb2c(0x795)](),_0x3630f2['on'](_0x15fb2c(0x39b),()=>{const _0x481771=_0x15fb2c;if(!_0x3630f2['destroyed'])_0x4d05d9[_0x481771(0x39b)]();}),_0x3630f2;}function _0x1b30dc(_0xaa8847,_0x18a8a9){const _0x1b229c=_0x5d5633;if(_0xaa8847[_0x1b229c(0x399)]===_0x1b229c(0x523)||_0xaa8847[_0x1b229c(0x399)]===_0x1b229c(0x4e3))return null;const _0x18ec61=_0xaa8847[_0x1b229c(0x313)]?.['content-length'];if(_0x18ec61!=null){const _0x4ebf61=Number(_0x18ec61);if(Number[_0x1b229c(0x39f)](_0x4ebf61)&&_0x4ebf61>_0x18a8a9){const _0x5d30e6=new Error(_0x1b229c(0x3d9));_0x5d30e6[_0x1b229c(0x57d)]=0x19d;throw _0x5d30e6;}}return new Promise((_0xdcee5e,_0x30959f)=>{const _0x29ad43=_0x1b229c;let _0x2100f3='',_0x28f72f=0x0;_0xaa8847['on'](_0x29ad43(0x268),_0x3de3a0=>{const _0x56de24=_0x29ad43;_0x28f72f+=_0x3de3a0[_0x56de24(0x1b1)];if(_0x28f72f>_0x18a8a9){try{_0xaa8847['destroy']();}catch{}const _0x30b375=new Error(_0x56de24(0x3d9));_0x30b375['status']=0x19d,_0x30959f(_0x30b375);return;}_0x2100f3+=_0x3de3a0;}),_0xaa8847['on'](_0x29ad43(0x281),()=>{const _0x322163=_0x29ad43;if(!_0x2100f3)return _0xdcee5e(null);const _0x555262=_0xaa8847[_0x322163(0x313)]?.[_0x322163(0x6aa)]||'';if(_0x555262[_0x322163(0x70f)]('application/x-www-form-urlencoded')){const _0x410f54={};for(const [_0x2d9ce5,_0x486f32]of new URLSearchParams(_0x2100f3))_0x410f54[_0x2d9ce5]=_0x486f32;return _0xdcee5e(_0x410f54);}try{_0xdcee5e(JSON[_0x322163(0x355)](_0x2100f3));}catch(_0x4cf14c){_0x30959f(_0x4cf14c);}}),_0xaa8847['on'](_0x29ad43(0x3ba),_0x30959f);});}function _0x2acb87(_0x1ab42c,_0x1c7ec8){const _0x1520c8=_0x5d5633,{status:status=0xc8,headers:headers={},body:_0x15f22b}=_0x1c7ec8;_0x1ab42c[_0x1520c8(0x2c3)]=status;for(const [_0x1f8bb5,_0x212854]of Object[_0x1520c8(0x352)](headers)){_0x1ab42c[_0x1520c8(0x3a9)](_0x1f8bb5,_0x212854);}if(_0x15f22b==null){_0x1ab42c[_0x1520c8(0x281)]();return;}if(_0x5ce215(_0x15f22b)){_0x15f22b[_0x1520c8(0x309)](_0x1ab42c);return;}if(Buffer[_0x1520c8(0x224)](_0x15f22b)){_0x1ab42c[_0x1520c8(0x281)](_0x15f22b);return;}if(typeof _0x15f22b==='object'){!_0x1ab42c[_0x1520c8(0x273)](_0x1520c8(0x46b))&&_0x1ab42c[_0x1520c8(0x3a9)](_0x1520c8(0x46b),'application/json');_0x1ab42c[_0x1520c8(0x281)](JSON[_0x1520c8(0x540)](_0x15f22b));return;}_0x1ab42c['end'](String(_0x15f22b));}function _0x34c89c(_0x2ec589,_0xad40ba){const _0x25d0b2=_0x5d5633;if(_0xad40ba==null)return':'+_0x2ec589;return[][_0x25d0b2(0x33f)](_0xad40ba)[_0x25d0b2(0x2cc)](_0x55b7be=>(_0x55b7be['includes'](':')?'['+_0x55b7be+']':_0x55b7be)+':'+_0x2ec589)[_0x25d0b2(0x2b6)](',\x20');}return okdbHttp[_0x5d5633(0x577)]=_0x3f0d50,okdbHttp[_0x5d5633(0x577)]['formatListenAddr']=_0x34c89c,okdbHttp[_0x5d5633(0x577)][_0x5d5633(0x628)]=_0x59cfaf,okdbHttp['exports'];}var hasRequiredOkdb;function requireOkdb(){const _0x4756d7=_0x5411c3;if(hasRequiredOkdb)return okdb$1;hasRequiredOkdb=0x1;try{process[_0x4756d7(0x269)]();}catch{}const _0x17c7c1=require$$1,_0x408499=require$$1$1,{resolveWorkers:_0x39ef6a,isShmbufNative:_0x1e86d6}=requireOkdbWorkers();function _0x4473e3(_0x25e2a8){const _0x42d30b=_0x4756d7,_0xdab21=_0x25e2a8[_0x42d30b(0x7a7)](0x2),_0x71be1a={};let _0x5b8124=0x0;while(_0x5b8124<_0xdab21[_0x42d30b(0x1b1)]){const _0x4b371b=_0xdab21[_0x5b8124];if(_0x4b371b===_0x42d30b(0x728)||_0x4b371b==='-p')_0x71be1a[_0x42d30b(0x3a7)]=Number(_0xdab21[++_0x5b8124]);else{if(_0x4b371b===_0x42d30b(0x354)||_0x4b371b==='-d')_0x71be1a['path']=_0xdab21[++_0x5b8124];else{if(_0x4b371b===_0x42d30b(0x721)||_0x4b371b==='-k')_0x71be1a[_0x42d30b(0x5af)]=_0xdab21[++_0x5b8124];else{if(_0x4b371b==='--config'||_0x4b371b==='-c')_0x71be1a[_0x42d30b(0x586)]=_0xdab21[++_0x5b8124];else{if(_0x4b371b===_0x42d30b(0x328))_0x71be1a['logLevel']=_0xdab21[++_0x5b8124];else{if(_0x4b371b===_0x42d30b(0x29b))_0x71be1a[_0x42d30b(0x515)]=!![];else{if(_0x4b371b===_0x42d30b(0x198))_0x71be1a[_0x42d30b(0x674)]=!![];else{if(_0x4b371b===_0x42d30b(0x2d1))_0x71be1a[_0x42d30b(0x4d1)]=_0xdab21[++_0x5b8124];else{if(_0x4b371b==='--no-cluster')_0x71be1a[_0x42d30b(0x37c)]=!![];else{if(_0x4b371b===_0x42d30b(0x657)||_0x4b371b==='-e')_0x71be1a[_0x42d30b(0x1a1)]=_0xdab21[++_0x5b8124];else{if(_0x4b371b===_0x42d30b(0x2b8))_0x71be1a[_0x42d30b(0x2bd)]=_0xdab21[++_0x5b8124];else{if(_0x4b371b===_0x42d30b(0x3c7))_0x71be1a[_0x42d30b(0x555)]=!![];else{if(_0x4b371b===_0x42d30b(0x42f))_0x71be1a['blobs']=!![];else{if(_0x4b371b===_0x42d30b(0x232))_0x71be1a[_0x42d30b(0x2bb)]=!![];else{if(_0x4b371b===_0x42d30b(0x624)){const _0x5da554=[];while(_0x5b8124+0x1<_0xdab21['length']&&!_0xdab21[_0x5b8124+0x1][_0x42d30b(0x72d)]('--')){_0x5da554[_0x42d30b(0x494)](_0xdab21[++_0x5b8124]);}_0x71be1a['open']=_0x5da554[_0x42d30b(0x1b1)]>0x0?_0x5da554:!![];}else{if(_0x4b371b===_0x42d30b(0x5ef))_0x71be1a['logRequests']=!![];else{if(_0x4b371b===_0x42d30b(0x5a5))_0x71be1a[_0x42d30b(0x60a)]=_0xdab21[++_0x5b8124];else{if(_0x4b371b===_0x42d30b(0x562))_0x71be1a['password']=_0xdab21[++_0x5b8124];else{if(_0x4b371b==='--label')_0x71be1a[_0x42d30b(0x52b)]=_0xdab21[++_0x5b8124];else{if(_0x4b371b===_0x42d30b(0x351))_0x71be1a['permissions']=_0xdab21[++_0x5b8124];else{if(_0x4b371b===_0x42d30b(0x612))_0x71be1a[_0x42d30b(0x1bb)]=_0xdab21[++_0x5b8124];else{if(_0x4b371b==='--ttl')_0x71be1a['ttl']=_0xdab21[++_0x5b8124];else{if(_0x4b371b===_0x42d30b(0x36c))_0x71be1a[_0x42d30b(0x21b)]=_0xdab21[++_0x5b8124];else{if(_0x4b371b===_0x42d30b(0x2cb)||_0x4b371b==='-u')_0x71be1a[_0x42d30b(0x6b2)]=_0xdab21[++_0x5b8124];else{if(_0x4b371b===_0x42d30b(0x243))_0x71be1a[_0x42d30b(0x206)]=_0xdab21[++_0x5b8124];else{if(_0x4b371b===_0x42d30b(0x449)||_0x4b371b==='-v'){const _0xf54bfc=require$$3;console[_0x42d30b(0x547)](_0xf54bfc[_0x42d30b(0x214)]),process['exit'](0x0);}else(_0x4b371b===_0x42d30b(0x43c)||_0x4b371b==='-h')&&(_0x310703(),process[_0x42d30b(0x592)](0x0));}}}}}}}}}}}}}}}}}}}}}}}}}_0x5b8124++;}return _0x71be1a;}function _0x310703(){const _0x58e6ee=_0x4756d7;console['log'](_0x58e6ee(0x5f4));}const _0x288549=new Set(['debug',_0x4756d7(0x380),'warn','error']);function _0x2f8070(_0x1b5f46){const _0x3e8b01=_0x4756d7,_0x58ee39=_0x1b5f46[_0x3e8b01(0x586)]?_0x17c7c1[_0x3e8b01(0x25c)](_0x1b5f46[_0x3e8b01(0x586)]):_0x17c7c1['resolve'](_0x3e8b01(0x603));let _0x33be81={};if(_0x408499[_0x3e8b01(0x2d5)](_0x58ee39))try{const _0x17707a=_0x408499[_0x3e8b01(0x6ba)](_0x58ee39,_0x3e8b01(0x1f4))[_0x3e8b01(0x1f7)](/^\uFEFF/,'');_0x33be81=JSON[_0x3e8b01(0x355)](_0x17707a),console[_0x3e8b01(0x547)](_0x3e8b01(0x79e)+_0x58ee39);}catch(_0x39898f){console[_0x3e8b01(0x3ba)](_0x3e8b01(0x568)+_0x58ee39+':\x20'+_0x39898f['message']),process['exit'](0x1);}const _0x116fd4={'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},_0x59e5c5={'port':_0x1b5f46['port']??_0x33be81[_0x3e8b01(0x3a7)]??_0x116fd4[_0x3e8b01(0x3a7)]??0x2124,'dbPath':_0x1b5f46['path']??_0x33be81[_0x3e8b01(0x504)]??_0x116fd4[_0x3e8b01(0x504)]??'./okdb-data','key':_0x1b5f46[_0x3e8b01(0x5af)]??_0x33be81[_0x3e8b01(0x5af)]??_0x116fd4['key']??undefined,'logLevel':_0x1b5f46[_0x3e8b01(0x3a2)]??_0x33be81['logLevel']??_0x116fd4[_0x3e8b01(0x3a2)]??_0x3e8b01(0x380),'noRepl':_0x1b5f46['noRepl']??_0x33be81['noRepl']??_0x116fd4['noRepl']??![],'noAdmin':_0x1b5f46['noAdmin']??_0x33be81[_0x3e8b01(0x674)]??_0x116fd4[_0x3e8b01(0x674)]??![],'admin':_0x33be81[_0x3e8b01(0x731)]??{},'api':_0x33be81[_0x3e8b01(0x45c)]??undefined,'auth':_0x33be81[_0x3e8b01(0x717)]??undefined,'mcp':_0x33be81['mcp']??undefined,'http':_0x33be81['http']??undefined,'timeMachine':_0x33be81[_0x3e8b01(0x556)]!==![]?_0x33be81['timeMachine']??{}:![],'processors':_0x33be81[_0x3e8b01(0x1a4)],'engines':_0x33be81[_0x3e8b01(0x5bf)],'compaction':_0x33be81[_0x3e8b01(0x37b)]};if(_0x1b5f46[_0x3e8b01(0x37c)])_0x59e5c5[_0x3e8b01(0x37c)]=!![];if(_0x1b5f46[_0x3e8b01(0x4d1)]!==undefined)_0x59e5c5[_0x3e8b01(0x74e)]=_0x1b5f46['workers'];_0x1b5f46[_0x3e8b01(0x6ef)]!==undefined&&(_0x59e5c5[_0x3e8b01(0x717)]=_0x59e5c5[_0x3e8b01(0x717)]||{},_0x59e5c5['auth'][_0x3e8b01(0x6ef)]=_0x1b5f46[_0x3e8b01(0x6ef)]);_0x1b5f46['logRequests']&&(_0x59e5c5[_0x3e8b01(0x264)]=_0x59e5c5[_0x3e8b01(0x264)]||{},_0x59e5c5[_0x3e8b01(0x264)][_0x3e8b01(0x4de)]=!![]);(!Number[_0x3e8b01(0x428)](_0x59e5c5[_0x3e8b01(0x3a7)])||_0x59e5c5[_0x3e8b01(0x3a7)]<0x1||_0x59e5c5[_0x3e8b01(0x3a7)]>0xffff)&&(console['error'](_0x3e8b01(0x1de)+_0x59e5c5[_0x3e8b01(0x3a7)]+_0x3e8b01(0x3e2)),process[_0x3e8b01(0x592)](0x1));!_0x288549[_0x3e8b01(0x4e7)](_0x59e5c5[_0x3e8b01(0x3a2)])&&(console[_0x3e8b01(0x3ba)](_0x3e8b01(0x1f8)+_0x59e5c5[_0x3e8b01(0x3a2)]+_0x3e8b01(0x353)),process[_0x3e8b01(0x592)](0x1));const _0xfb14e2=_0x59e5c5[_0x3e8b01(0x277)]?.[_0x3e8b01(0x2d6)];_0xfb14e2!==undefined&&!(typeof _0xfb14e2===_0x3e8b01(0x54f)&&_0xfb14e2)&&!(Array[_0x3e8b01(0x729)](_0xfb14e2)&&_0xfb14e2[_0x3e8b01(0x1b1)]&&_0xfb14e2['every'](_0x50eaeb=>typeof _0x50eaeb==='string'&&_0x50eaeb))&&(console[_0x3e8b01(0x3ba)](_0x3e8b01(0x626)+JSON['stringify'](_0xfb14e2)+_0x3e8b01(0x6ae)),process[_0x3e8b01(0x592)](0x1));for(const _0x49777f of _0x29f83b){_0x59e5c5[_0x49777f]!==undefined&&typeof _0x59e5c5[_0x49777f]!==_0x3e8b01(0x312)&&(console['error'](_0x3e8b01(0x6de)+_0x49777f+_0x3e8b01(0x3f3)+JSON[_0x3e8b01(0x540)](_0x59e5c5[_0x49777f])+_0x3e8b01(0x574)),process[_0x3e8b01(0x592)](0x1));}return _0x59e5c5;}const _0x29f83b=[_0x4756d7(0x1a4),'engines',_0x4756d7(0x37b)];function _0x17f4e3(_0x3b2f17){const _0x51d8ba=_0x4756d7;return!!(_0x3b2f17&&typeof _0x3b2f17===_0x51d8ba(0x336)&&!Array[_0x51d8ba(0x729)](_0x3b2f17)&&Object[_0x51d8ba(0x35c)](_0x3b2f17)[_0x51d8ba(0x1b1)]>0x0);}function _0x4caf29(_0x245f82){const _0x2cface=_0x4756d7;return{..._0x245f82['key']?{'encryptionKey':_0x245f82[_0x2cface(0x5af)]}:{},'engines':![],'processors':![],'compaction':![]};}const _0x1ac530=!process[_0x4756d7(0x5c6)][_0x4756d7(0x338)]||!!process.env.NO_COLOR;function _0x19cfb4(_0x3c2ef7,_0x1bc7de){return _0x1ac530?_0x1bc7de:'\x1b['+_0x3c2ef7+'m'+_0x1bc7de+'\x1b[0m';}function _0x3300f1(_0x1501a2){const _0x144b53=_0x4756d7;if(!_0x1501a2||_0x1501a2[_0x144b53(0x1b1)]===0x0)return;const _0xb96867='─'[_0x144b53(0x1f2)](0x38);process['stderr'][_0x144b53(0x4f7)]('\x0a'),process[_0x144b53(0x391)][_0x144b53(0x4f7)](_0x19cfb4('33','\x20\x20⚠\x20\x20'+_0x1501a2[_0x144b53(0x1b1)]+_0x144b53(0x68a)+(_0x1501a2[_0x144b53(0x1b1)]>0x1?'S':'')+'\x0a')),process[_0x144b53(0x391)]['write']('\x20\x20'+_0xb96867+'\x0a');for(const _0x4f8312 of _0x1501a2){const _0x5b4973=_0x4f8312[_0x144b53(0x407)]===_0x144b53(0x3ba)?_0x19cfb4('31',_0x144b53(0x525)):_0x19cfb4('33','\x20\x20⚠');process['stderr'][_0x144b53(0x4f7)](_0x5b4973+'\x20\x20'+_0x19cfb4('1',_0x4f8312[_0x144b53(0x549)])+'\x0a'),process[_0x144b53(0x391)][_0x144b53(0x4f7)](_0x144b53(0x7aa)+_0x4f8312[_0x144b53(0x246)]+'\x0a');if(_0x4f8312[_0x144b53(0x3db)])process['stderr'][_0x144b53(0x4f7)]('\x20\x20\x20\x20\x20\x20\x20'+_0x19cfb4('2',_0x144b53(0x56b)+_0x4f8312[_0x144b53(0x3db)])+'\x0a');process[_0x144b53(0x391)]['write']('\x0a');}process[_0x144b53(0x391)][_0x144b53(0x4f7)]('\x20\x20'+_0xb96867+'\x0a\x0a');}function _0x150920(_0x540747,_0x12e1bc,_0x4c8a45={}){const _0x56ffe4=_0x4756d7,_0x4e08a8=_0x540747[_0x56ffe4(0x277)][_0x56ffe4(0x2b1)](_0x12e1bc,_0x4c8a45);if(_0x4e08a8&&_0x4e08a8[_0x56ffe4(0x6bb)])return Promise[_0x56ffe4(0x25c)](_0x4e08a8);const _0x581775=_0x540747[_0x56ffe4(0x277)][_0x56ffe4(0x258)]?.[_0x56ffe4(0x1b1)]?_0x540747[_0x56ffe4(0x277)][_0x56ffe4(0x258)]:[_0x4e08a8];return new Promise((_0x315d8d,_0x4f7065)=>{const _0x2c397a=_0x56ffe4;_0x4e08a8['once']('error',_0x4f7065),Promise[_0x2c397a(0x70d)](_0x581775[_0x2c397a(0x2cc)](_0x1945ce=>_0x1945ce[_0x2c397a(0x6fc)]?null:new Promise(_0x4fd465=>_0x1945ce[_0x2c397a(0x78b)](_0x2c397a(0x6fc),_0x4fd465))))[_0x2c397a(0x1c9)](()=>_0x315d8d(_0x4e08a8));});}function _0x9e9136(_0x56963a){const _0x407217=_0x4756d7;return _0x56963a[_0x407217(0x277)]?.[_0x407217(0x2d6)]!==undefined?{'host':_0x56963a[_0x407217(0x277)][_0x407217(0x2d6)]}:{};}async function _0x19d876(_0x138360){const _0x29118c=_0x4756d7,_0x2579c5=require$$4$1;console[_0x29118c(0x547)](_0x29118c(0x409));let _0x588dd8=!![];const _0xb870d4=(_0x380aae,_0x218b29)=>{console['log']('\x20\x20'+(_0x380aae?'✓':'✗')+'\x20'+_0x218b29);if(!_0x380aae)_0x588dd8=![];},_0x5b70cb=Number(process['version'][_0x29118c(0x1f7)]('v','')[_0x29118c(0x5ed)]('.')[0x0]);_0xb870d4(_0x5b70cb>=0x12,'node\x20'+process[_0x29118c(0x214)]+(_0x5b70cb<0x12?_0x29118c(0x6f0):''));const _0x10cc73=_0x17c7c1['resolve'](_0x138360[_0x29118c(0x3d8)]);try{_0x408499[_0x29118c(0x65b)](_0x10cc73,{'recursive':!![]});const _0x4b1d32=_0x17c7c1['join'](_0x10cc73,_0x29118c(0x56a));_0x408499['writeFileSync'](_0x4b1d32,''),_0x408499[_0x29118c(0x632)](_0x4b1d32),_0xb870d4(!![],'database\x20path\x20writable:\x20'+_0x10cc73);}catch(_0x4bc24e){_0xb870d4(![],_0x29118c(0x245)+_0x10cc73+_0x29118c(0x7a5)+_0x4bc24e['message']+')');}const _0x55068f=await new Promise(_0x1c268e=>{const _0x3d9ae6=_0x29118c,_0x2d86a0=_0x2579c5[_0x3d9ae6(0x75b)]();_0x2d86a0[_0x3d9ae6(0x78b)](_0x3d9ae6(0x3ba),()=>_0x1c268e(![])),_0x2d86a0[_0x3d9ae6(0x78b)]('listening',()=>{const _0x234219=_0x3d9ae6;_0x2d86a0[_0x234219(0x5e4)](),_0x1c268e(!![]);}),_0x2d86a0[_0x3d9ae6(0x2b1)](_0x138360[_0x3d9ae6(0x3a7)],_0x3d9ae6(0x491));});_0xb870d4(_0x55068f,'port\x20'+_0x138360[_0x29118c(0x3a7)]+'\x20'+(_0x55068f?_0x29118c(0x67a):_0x29118c(0x4a7)));const _0x2de362=_0x17c7c1[_0x29118c(0x25c)](_0x29118c(0x603));if(_0x408499[_0x29118c(0x2d5)](_0x2de362))try{JSON['parse'](_0x408499[_0x29118c(0x6ba)](_0x2de362,'utf8')['replace'](/^\uFEFF/,'')),_0xb870d4(!![],_0x29118c(0x5cd)+_0x2de362);}catch(_0x266cd6){_0xb870d4(![],'config\x20file\x20invalid:\x20'+_0x266cd6['message']);}else _0xb870d4(!![],_0x29118c(0x4ef));if(_0x1e86d6()){const _0x5c36ff=_0x39ef6a(_0x138360,{'shmbufNative':!![]});_0xb870d4(!![],_0x29118c(0x3d6)+_0x5c36ff+'\x20worker'+(_0x5c36ff===0x1?'':'s')+')');}else _0xb870d4(!![],'cluster:\x20unavailable\x20(shmbuf\x20native\x20missing)\x20—\x20running\x20single-process');if(!_0x55068f)try{const _0xc0ed91=require(_0x29118c(0x6ec)),_0x4491d4=new _0xc0ed91(_0x10cc73,{'engines':![],'processors':![],'compaction':![],'http':![],'auth':{'open':!![]}});await _0x4491d4[_0x29118c(0x6ef)]();try{await _0x4491d4[_0x29118c(0x683)][_0x29118c(0x6ef)]({'reader':!![]});const _0x359cda=_0x4491d4[_0x29118c(0x683)][_0x29118c(0x606)](),_0x326d95=_0x359cda[_0x29118c(0x3fb)](_0x29abc3=>_0x29abc3['supervisorKey']!=null)['length'];_0xb870d4(!![],'processes:\x20'+_0x359cda[_0x29118c(0x1b1)]+_0x29118c(0x1d7)+(_0x359cda['length']===0x1?'':'es')+'\x20('+_0x326d95+_0x29118c(0x4c8));}finally{await _0x4491d4[_0x29118c(0x5e4)]();}}catch{}console['log'](''),_0x588dd8?console[_0x29118c(0x547)](_0x29118c(0x22c)):(console[_0x29118c(0x547)]('\x20\x20Some\x20checks\x20failed.\x0a'),process[_0x29118c(0x592)](0x1));}async function _0x1cb293(){const _0x1fce4d=_0x4756d7,_0x234b21=_0x17c7c1[_0x1fce4d(0x25c)]('.kdbconfig');!_0x408499[_0x1fce4d(0x2d5)](_0x234b21)?(_0x408499['writeFileSync'](_0x234b21,JSON['stringify']({'port':0x2124,'path':_0x1fce4d(0x6be),'logLevel':_0x1fce4d(0x380),'noRepl':![],'noAdmin':![]},null,0x2)+'\x0a'),console[_0x1fce4d(0x547)](_0x1fce4d(0x278))):console[_0x1fce4d(0x547)](_0x1fce4d(0x5d5));const _0x5415af=_0x17c7c1['resolve']('./okdb-data');!_0x408499[_0x1fce4d(0x2d5)](_0x5415af)?(_0x408499[_0x1fce4d(0x65b)](_0x5415af,{'recursive':!![]}),console[_0x1fce4d(0x547)](_0x1fce4d(0x644))):console['log'](_0x1fce4d(0x1d6)),console[_0x1fce4d(0x547)]('\x0a\x20\x20Run\x20okdb\x20to\x20start\x20the\x20server.\x0a');}async function _0x4dc58d(_0x5af489){const _0x55ff54=_0x4756d7,_0x4e20c6=_0x17c7c1[_0x55ff54(0x25c)](_0x5af489['dbPath']);if(!_0x408499[_0x55ff54(0x2d5)](_0x4e20c6)){console[_0x55ff54(0x547)]('[okdb]\x20nothing\x20to\x20reset\x20—\x20'+_0x4e20c6+_0x55ff54(0x52c));return;}const _0x116695=require$$0$2,_0x869944=_0x116695['createInterface']({'input':process[_0x55ff54(0x780)],'output':process[_0x55ff54(0x5c6)]}),_0x4020e7=await new Promise(_0x35c98c=>_0x869944[_0x55ff54(0x2f0)](_0x55ff54(0x66f)+_0x4e20c6+_0x55ff54(0x496),_0x35c98c));_0x869944[_0x55ff54(0x5e4)](),console[_0x55ff54(0x547)]('');if(_0x4020e7[_0x55ff54(0x29c)]()[_0x55ff54(0x2be)]()!=='yes'){console[_0x55ff54(0x547)](_0x55ff54(0x7a0));return;}let _0x11a280=null;try{_0x11a280=await _0x4adbdd(_0x4e20c6,_0x5af489,async _0x3679b6=>{const _0x40de07=_0x55ff54,_0x4f9229=_0x3679b6['_systemEnv'],_0x161554=_0x4f9229?.['db']?.['get']('__identity')??null,_0x56d7cc=[];if(_0x4f9229?.['hasType'](_0x40de07(0x259)))for(const {key:_0x4e79ad,value:_0x354bc4}of _0x4f9229[_0x40de07(0x433)](_0x40de07(0x259))){_0x56d7cc['push']({'key':_0x4e79ad,'value':_0x354bc4});}return{'identity':_0x161554,'licenses':_0x56d7cc};});}catch(_0x139221){console[_0x55ff54(0x547)](_0x55ff54(0x744)+_0x139221[_0x55ff54(0x246)]+_0x55ff54(0x1a0));}_0x408499[_0x55ff54(0x2fc)](_0x4e20c6,{'recursive':!![],'force':!![]}),console[_0x55ff54(0x547)]('[okdb]\x20reset:\x20'+_0x4e20c6+_0x55ff54(0x2a9));if(_0x11a280&&(_0x11a280[_0x55ff54(0x1c1)]||_0x11a280[_0x55ff54(0x58c)][_0x55ff54(0x1b1)]>0x0))try{await _0x4adbdd(_0x4e20c6,_0x5af489,async _0x156297=>{const _0x35f03a=_0x55ff54,_0x545cf7=_0x156297[_0x35f03a(0x6cd)];_0x11a280['identity']&&_0x545cf7['db'][_0x35f03a(0x48f)](_0x35f03a(0x6e3),_0x11a280[_0x35f03a(0x1c1)]);if(_0x11a280[_0x35f03a(0x58c)][_0x35f03a(0x1b1)]>0x0){if(!_0x545cf7['hasType'](_0x35f03a(0x259)))await _0x545cf7[_0x35f03a(0x300)]('~licenses');for(const {key:_0x4e744d,value:_0x533280}of _0x11a280[_0x35f03a(0x58c)]){await _0x545cf7[_0x35f03a(0x4cd)](_0x35f03a(0x259),_0x4e744d,_0x533280);}}});const _0x15fb87=[];if(_0x11a280[_0x55ff54(0x1c1)])_0x15fb87[_0x55ff54(0x494)]('node\x20identity');if(_0x11a280[_0x55ff54(0x58c)][_0x55ff54(0x1b1)]>0x0)_0x15fb87[_0x55ff54(0x494)](_0x11a280[_0x55ff54(0x58c)][_0x55ff54(0x1b1)]+_0x55ff54(0x4d5));console[_0x55ff54(0x547)]('[okdb]\x20preserved:\x20'+_0x15fb87[_0x55ff54(0x2b6)](_0x55ff54(0x210)));}catch(_0x16cc65){console[_0x55ff54(0x547)]('[okdb]\x20warning:\x20failed\x20to\x20restore\x20identity/licenses\x20after\x20reset:\x20'+_0x16cc65[_0x55ff54(0x246)]);}}async function _0x4adbdd(_0x3bc8c3,_0x5159a5,_0x10d758){const _0x12477b=_0x4756d7,_0x33575f=require$$5,_0x3652b6=new _0x33575f(_0x3bc8c3,{'admin':![],'mcp':![],'http':![],'timeMachine':![],'engines':![],'processors':![],'compaction':![],'_skipBootRuntime':!![],..._0x4caf29(_0x5159a5)});await _0x3652b6[_0x12477b(0x6ef)]();try{return await _0x10d758(_0x3652b6);}finally{await _0x3652b6['close']();}}async function _0x40df23(_0x2c2a99,_0x94a531){const _0x48ef24=_0x4756d7,_0x485fd1=require$$5,_0x4eeb52=_0x17c7c1[_0x48ef24(0x25c)](_0x94a531['dbPath']);console['log'](_0x48ef24(0x629)+_0x4eeb52+'…');const _0x3c0fe5=new _0x485fd1(_0x4eeb52,_0x4caf29(_0x94a531));await _0x3c0fe5[_0x48ef24(0x6ef)](),console[_0x48ef24(0x547)](_0x48ef24(0x753)+_0x2c2a99+'…');const {envs:_0x3a161a}=await _0x3c0fe5['migrate'][_0x48ef24(0x4ee)](_0x2c2a99);for(const _0x161518 of _0x3a161a){const _0x151895=_0x161518['sizeBefore']>0x0?_0x48ef24(0x7a5)+(_0x161518[_0x48ef24(0x2fa)]/0x400/0x400)['toFixed'](0x2)+'\x20MB\x20→\x20'+(_0x161518[_0x48ef24(0x3f2)]/0x400/0x400)[_0x48ef24(0x26b)](0x2)+_0x48ef24(0x215):'';console['log']('\x20\x20✓\x20'+_0x161518[_0x48ef24(0x60a)]+'\x20\x20→\x20\x20'+_0x161518['dest']+_0x151895);}await _0x3c0fe5[_0x48ef24(0x5e4)](),console[_0x48ef24(0x547)]('[okdb]\x20backup\x20complete');}async function _0x408e93(_0x56f869,_0x4901fe,_0x3ec3bb){const _0x506909=_0x4756d7,_0x295544=require$$5,_0x39a766=_0x17c7c1[_0x506909(0x25c)](_0x4901fe[_0x506909(0x3d8)]),_0x32c1bd=_0x3ec3bb[_0x506909(0x1a1)]??_0x506909(0x45b),_0x546725=_0x3ec3bb[_0x506909(0x2bd)]?_0x3ec3bb[_0x506909(0x2bd)][_0x506909(0x5ed)](',')[_0x506909(0x2cc)](_0x491b59=>_0x491b59[_0x506909(0x29c)]()):null;console[_0x506909(0x547)]('[okdb]\x20opening\x20'+_0x39a766+'…');const _0x573000=new _0x295544(_0x39a766,_0x4caf29(_0x4901fe));await _0x573000[_0x506909(0x6ef)](),console['log'](_0x506909(0x1fc)+_0x32c1bd+'\x22\x20→\x20'+_0x56f869+'…');const _0x1e565c=await _0x573000['migrate']['exportToFile'](_0x56f869,{'envName':_0x32c1bd,'types':_0x546725,'includeChanges':!!_0x3ec3bb[_0x506909(0x555)]});console[_0x506909(0x547)]('[okdb]\x20exported\x20\x20types='+_0x1e565c['types']+'\x20\x20records='+_0x1e565c[_0x506909(0x4a2)]+'\x20\x20changes='+_0x1e565c[_0x506909(0x555)]);if(_0x3ec3bb[_0x506909(0x3b2)]){const _0x1a3295=_0x17c7c1[_0x506909(0x2b6)](_0x17c7c1[_0x506909(0x5e9)](_0x56f869),_0x506909(0x3b2));process[_0x506909(0x5c6)]['write'](_0x506909(0x6b5));const {count:_0x507f40,bytes:_0x3be1de}=await _0x573000[_0x506909(0x54b)][_0x506909(0x546)](_0x1a3295);console[_0x506909(0x547)](_0x506909(0x6f3)+_0x1a3295+_0x506909(0x7a5)+_0x507f40+_0x506909(0x456)+(_0x507f40!==0x1?'s':'')+',\x20'+(_0x3be1de/0x400/0x400)['toFixed'](0x2)+_0x506909(0x215));}await _0x573000[_0x506909(0x5e4)](),console[_0x506909(0x547)](_0x506909(0x24c));}async function _0x580f4a(_0x4127c9,_0x45658c,_0x36fa90){const _0x358646=_0x4756d7,_0x2dd63e=require$$5,_0x14d6b4=_0x17c7c1['resolve'](_0x45658c[_0x358646(0x3d8)]),_0x5cf7e6=_0x36fa90['env']??null,_0x569430=_0x36fa90[_0x358646(0x2bd)]?_0x36fa90['types']['split'](',')[_0x358646(0x2cc)](_0x3c2e18=>_0x3c2e18['trim']()):null,_0x1a1145=!!_0x36fa90['drop'];console[_0x358646(0x547)](_0x358646(0x629)+_0x14d6b4+'…');const _0x4f792a=new _0x2dd63e(_0x14d6b4,_0x4caf29(_0x45658c));await _0x4f792a[_0x358646(0x6ef)](),console[_0x358646(0x547)](_0x358646(0x52f)+_0x4127c9+'…');const _0x3d3142=await _0x4f792a[_0x358646(0x54b)][_0x358646(0x3aa)](_0x4127c9,{'envName':_0x5cf7e6,'types':_0x569430,'dropExisting':_0x1a1145,'includeChanges':!!_0x36fa90['changes'],'onProgress':({type:_0x4a59b5,count:_0x3782e3})=>{const _0x3e6df5=_0x358646;process['stdout'][_0x3e6df5(0x4f7)]('\x0d[okdb]\x20'+_0x4a59b5+':\x20'+_0x3782e3+_0x3e6df5(0x28b));}});process[_0x358646(0x5c6)][_0x358646(0x4f7)]('\x0a'),console[_0x358646(0x547)](_0x358646(0x68f)+_0x3d3142[_0x358646(0x2bd)]+_0x358646(0x6b0)+_0x3d3142[_0x358646(0x4a2)]+'\x20\x20changes='+_0x3d3142[_0x358646(0x555)]);if(_0x36fa90[_0x358646(0x3b2)]){const _0x35b99c=_0x17c7c1[_0x358646(0x2b6)](_0x17c7c1[_0x358646(0x5e9)](_0x4127c9),'blobs');if(_0x408499[_0x358646(0x2d5)](_0x35b99c)){const {imported:_0x3aa64a,skipped:_0x28d4d9}=await _0x4f792a[_0x358646(0x54b)][_0x358646(0x24e)](_0x35b99c);console['log']('[okdb]\x20blobs:\x20imported='+_0x3aa64a+_0x358646(0x4ce)+_0x28d4d9);}}await _0x4f792a[_0x358646(0x5e4)](),console['log']('[okdb]\x20import\x20complete');}async function _0x565d68(_0x25ea3d,_0x200a9f){const _0x1828d3=_0x4756d7;_0x200a9f[_0x1828d3(0x726)]&&!_0x200a9f[_0x1828d3(0x60a)]&&(console[_0x1828d3(0x3ba)](_0x1828d3(0x5a7)),process[_0x1828d3(0x592)](0x1));const _0x173f3a=_0x200a9f[_0x1828d3(0x48c)]?_0x200a9f[_0x1828d3(0x48c)]['split'](',')[_0x1828d3(0x2cc)](_0x7bac1=>_0x7bac1[_0x1828d3(0x29c)]())[_0x1828d3(0x3fb)](Boolean):[];let _0x153bca={};if(_0x200a9f[_0x1828d3(0x1bb)])try{_0x153bca=JSON[_0x1828d3(0x355)](_0x200a9f[_0x1828d3(0x1bb)]);if(typeof _0x153bca!=='object'||Array[_0x1828d3(0x729)](_0x153bca)||_0x153bca===null)throw new Error();}catch{console[_0x1828d3(0x3ba)](_0x1828d3(0x623)),process[_0x1828d3(0x592)](0x1);}const _0x58fde5=require$$5,{randomToken:_0x5a3d51,hashToken:_0x4d4cfd,hashPassword:_0x592d88}=requireOkdbAuthTokens(),_0x11547a=require$$2,_0x19f3d9=_0x17c7c1[_0x1828d3(0x25c)](_0x25ea3d[_0x1828d3(0x3d8)]),_0x2234c7=new _0x58fde5(_0x19f3d9,_0x4caf29(_0x25ea3d));await _0x2234c7[_0x1828d3(0x6ef)]();try{await _0x2234c7[_0x1828d3(0x717)]['_ensureTokensType']();if(_0x200a9f[_0x1828d3(0x60a)]){const _0x52556a=await _0x2234c7[_0x1828d3(0x717)][_0x1828d3(0x298)](_0x200a9f[_0x1828d3(0x60a)]);_0x52556a&&(console['error']('[okdb]\x20error:\x20token\x20with\x20name\x20\x22'+_0x200a9f[_0x1828d3(0x60a)]+_0x1828d3(0x530)),process[_0x1828d3(0x592)](0x1));}const _0x3d629f=_0x5a3d51(0x20),_0x52e1d4=_0x4d4cfd(_0x3d629f),_0x5c4a8b=_0x200a9f[_0x1828d3(0x726)]?await _0x592d88(_0x200a9f[_0x1828d3(0x726)]):null,_0x305b8e=_0x11547a[_0x1828d3(0x20a)](),_0x343006={'tokenHash':_0x52e1d4,'name':_0x200a9f[_0x1828d3(0x60a)]||null,'passwordHash':_0x5c4a8b,'label':_0x200a9f[_0x1828d3(0x52b)]||null,'permissions':_0x173f3a,'grants':_0x153bca,'createdAt':Date['now'](),'lastUsedAt':null},_0x393537=_0x200a9f[_0x1828d3(0x676)]?{'ttl':Number(_0x200a9f[_0x1828d3(0x676)])}:undefined;await _0x2234c7[_0x1828d3(0x6cd)][_0x1828d3(0x4cd)](_0x1828d3(0x1be),_0x305b8e,_0x343006,_0x393537),console[_0x1828d3(0x547)]('\x0a\x20\x20\u2713\x20Token\x20created'),console[_0x1828d3(0x547)](_0x1828d3(0x251)+_0x305b8e),console[_0x1828d3(0x547)](_0x1828d3(0x5a3)+(_0x200a9f[_0x1828d3(0x60a)]||_0x1828d3(0x5ff))),console[_0x1828d3(0x547)]('\x20\x20\x20\x20label:\x20\x20\x20\x20\x20\x20\x20'+(_0x200a9f[_0x1828d3(0x52b)]||_0x1828d3(0x5ff))),console[_0x1828d3(0x547)]('\x20\x20\x20\x20permissions:\x20'+(_0x173f3a['join'](',\x20')||_0x1828d3(0x2df))),console['log']('\x0a\x20\x20Raw\x20token\x20(shown\x20once,\x20save\x20it\x20now):\x0a'),console[_0x1828d3(0x547)](_0x1828d3(0x1d1)+_0x3d629f+'\x0a');}finally{await _0x2234c7[_0x1828d3(0x5e4)]();}}async function _0x218981(_0x1b4a9c){const _0x234c49=_0x4756d7,_0x122c6f=require$$5,_0x1a2c4b=_0x17c7c1['resolve'](_0x1b4a9c[_0x234c49(0x3d8)]),_0x567af1=new _0x122c6f(_0x1a2c4b,_0x4caf29(_0x1b4a9c));await _0x567af1[_0x234c49(0x6ef)]();try{const _0x51825b=_0x567af1[_0x234c49(0x6cd)];if(!_0x51825b||!_0x51825b[_0x234c49(0x6b6)](_0x234c49(0x1be))){console[_0x234c49(0x547)]('No\x20tokens.');return;}const _0x1fd9b3=[];for(const {key:_0x339947,value:_0x3ef79d}of _0x51825b[_0x234c49(0x433)](_0x234c49(0x1be))){_0x1fd9b3[_0x234c49(0x494)]({'id':_0x339947,'name':_0x3ef79d[_0x234c49(0x60a)]||_0x234c49(0x5ff),'label':_0x3ef79d[_0x234c49(0x52b)]||_0x234c49(0x5ff),'permissions':Array[_0x234c49(0x729)](_0x3ef79d['permissions'])?_0x3ef79d['permissions']['join'](','):'','created':_0x3ef79d[_0x234c49(0x6e0)]?new Date(_0x3ef79d[_0x234c49(0x6e0)])[_0x234c49(0x219)]()[_0x234c49(0x7a7)](0x0,0xa):''});}if(_0x1fd9b3[_0x234c49(0x1b1)]===0x0){console[_0x234c49(0x547)](_0x234c49(0x23a));return;}const _0x5c332d=!process[_0x234c49(0x5c6)][_0x234c49(0x31d)]||process['stdout']['columns']>=0x64,_0xbfe3b=_0x5c332d?0x24:0xa,_0x32441d=['ID'[_0x234c49(0x48a)](_0xbfe3b),_0x234c49(0x5f9)['padEnd'](0x10),_0x234c49(0x6eb)[_0x234c49(0x48a)](0x14),_0x234c49(0x4c6)[_0x234c49(0x48a)](0x14),'CREATED'][_0x234c49(0x2b6)]('\x20\x20');console[_0x234c49(0x547)]('\x0a'+_0x32441d),console[_0x234c49(0x547)]('-'[_0x234c49(0x1f2)](_0x32441d[_0x234c49(0x1b1)]));for(const _0x50ac51 of _0x1fd9b3){const _0x4eb2ee=_0x5c332d?_0x50ac51['id']:_0x50ac51['id'][_0x234c49(0x7a7)](0x0,0x8)+'…';console['log']([_0x4eb2ee[_0x234c49(0x48a)](_0xbfe3b),_0x50ac51[_0x234c49(0x60a)][_0x234c49(0x7a7)](0x0,0x10)[_0x234c49(0x48a)](0x10),_0x50ac51[_0x234c49(0x52b)][_0x234c49(0x7a7)](0x0,0x14)['padEnd'](0x14),_0x50ac51[_0x234c49(0x48c)][_0x234c49(0x7a7)](0x0,0x14)[_0x234c49(0x48a)](0x14),_0x50ac51['created']][_0x234c49(0x2b6)]('\x20\x20'));}console['log']('');}finally{await _0x567af1[_0x234c49(0x5e4)]();}}async function _0x2392a9(_0x3373ba,_0x207c63){const _0x42968e=_0x4756d7;!_0x3373ba&&(console[_0x42968e(0x3ba)](_0x42968e(0x6cb)),process[_0x42968e(0x592)](0x1));const _0x186282=require$$5,_0x1ee6ba=_0x17c7c1[_0x42968e(0x25c)](_0x207c63['dbPath']),_0x4e77e4=new _0x186282(_0x1ee6ba,_0x4caf29(_0x207c63));await _0x4e77e4[_0x42968e(0x6ef)]();try{const _0x1d13bf=_0x4e77e4[_0x42968e(0x6cd)];(!_0x1d13bf||!_0x1d13bf[_0x42968e(0x6b6)](_0x42968e(0x1be)))&&(console[_0x42968e(0x3ba)]('[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22'+_0x3373ba+'\x22'),process[_0x42968e(0x592)](0x1));let _0x367b0d=null,_0x1f7434=null;const _0x1aabdf=_0x1d13bf[_0x42968e(0x5e0)](_0x42968e(0x1be),_0x3373ba);if(_0x1aabdf)_0x367b0d=_0x3373ba,_0x1f7434=_0x1aabdf;else{const _0x1f0900=[];for(const {key:_0x237b48,value:_0x56d8b1}of _0x1d13bf[_0x42968e(0x433)](_0x42968e(0x1be))){if(_0x237b48[_0x42968e(0x72d)](_0x3373ba))_0x1f0900['push']({'key':_0x237b48,'value':_0x56d8b1});}_0x1f0900[_0x42968e(0x1b1)]===0x0&&(console[_0x42968e(0x3ba)](_0x42968e(0x535)+_0x3373ba+'\x22'),process['exit'](0x1));if(_0x1f0900['length']>0x1){console['error']('[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22'+_0x3373ba+_0x42968e(0x53d)+_0x1f0900[_0x42968e(0x1b1)]+'\x20tokens:');for(const _0x36870f of _0x1f0900){console['error']('\x20\x20'+_0x36870f[_0x42968e(0x5af)]+'\x20\x20(name:\x20'+(_0x36870f['value'][_0x42968e(0x60a)]||_0x42968e(0x5ff))+')');}process['exit'](0x1);}_0x367b0d=_0x1f0900[0x0][_0x42968e(0x5af)],_0x1f7434=_0x1f0900[0x0][_0x42968e(0x643)];}await _0x1d13bf[_0x42968e(0x43f)](_0x42968e(0x1be),_0x367b0d),console['log'](_0x42968e(0x3fa)+_0x367b0d+_0x42968e(0x7a1)+(_0x1f7434[_0x42968e(0x60a)]||_0x42968e(0x5ff))+_0x42968e(0x45a)+(_0x1f7434[_0x42968e(0x52b)]||_0x42968e(0x5ff))+')');}finally{await _0x4e77e4[_0x42968e(0x5e4)]();}}function _0x31c2a4(_0x26860a,_0x5533ed){const _0x82c3f7=_0x4756d7;if(!_0x26860a['activation'])return _0x82c3f7(0x3fe);const _0x40e651=_0x26860a['expiresAt'];if(!_0x40e651)return _0x82c3f7(0x30f);if(_0x5533ed>_0x40e651)return _0x82c3f7(0x2c6);return _0x82c3f7(0x30f);}function _0xf67d52(_0x399170){const _0x5d8d42=_0x4756d7;if(!_0x399170||typeof _0x399170!==_0x5d8d42(0x336))return'';const _0x2fdc95=Object[_0x5d8d42(0x352)](_0x399170)[_0x5d8d42(0x3fb)](([,_0x2a39a9])=>_0x2a39a9)['map'](([_0xeb3d74])=>_0xeb3d74);if(_0x2fdc95['length']===0x0)return'(none)';if(_0x2fdc95[_0x5d8d42(0x1b1)]<=0x3)return _0x2fdc95['join']('\x20');return _0x2fdc95['slice'](0x0,0x3)[_0x5d8d42(0x2b6)]('\x20')+('\x20+'+(_0x2fdc95[_0x5d8d42(0x1b1)]-0x3));}async function _0x4afb90(_0x25b970){const _0x120e9d=_0x4756d7,_0x11791d=require$$5,_0x264446=requireOkdbLicenseCodec(),{_C:_0x5aaa44}=requireOkdbLicense(),_0x443896=_0x17c7c1[_0x120e9d(0x25c)](_0x25b970[_0x120e9d(0x3d8)]),_0x38aa7d=new _0x11791d(_0x443896,_0x4caf29(_0x25b970));await _0x38aa7d[_0x120e9d(0x6ef)]();try{const _0x28fd59=_0x38aa7d['_systemEnv'],_0x19e5b5=_0x28fd59?.['db']?.[_0x120e9d(0x5e0)]?.(_0x120e9d(0x24d))??0x0,_0x1aa26f=[..._0x38aa7d[_0x120e9d(0x221)][_0x120e9d(0x35c)]()]['filter'](_0x21da5e=>!_0x21da5e['startsWith']('~'))[_0x120e9d(0x1b1)],_0x44fd47=_0x38aa7d[_0x120e9d(0x348)]?.[_0x120e9d(0x74b)];if(_0x44fd47){const _0x10f9ed=_0x44fd47[_0x120e9d(0x2ba)]===!![],_0x4031ff=_0x10f9ed?_0x120e9d(0x4c5):_0x38aa7d[_0x120e9d(0x348)][_0x120e9d(0x30f)]?.[_0x120e9d(0x5a8)]||'licensed';console[_0x120e9d(0x547)](''),console[_0x120e9d(0x547)](_0x120e9d(0x4fb)+_0x4031ff);const _0x3ef9c3=_0x44fd47[_0x120e9d(0x36a)]||{};if(_0x3ef9c3[_0x120e9d(0x1d8)]){const _0x12216e=Math[_0x120e9d(0x40d)](_0x19e5b5/_0x3ef9c3['maxWrites']*0x64);console[_0x120e9d(0x547)](_0x120e9d(0x6b3)+_0x19e5b5[_0x120e9d(0x34b)]()+'\x20/\x20'+_0x3ef9c3['maxWrites'][_0x120e9d(0x34b)]()+_0x120e9d(0x7a5)+_0x12216e+'%)');}else console[_0x120e9d(0x547)](_0x120e9d(0x6b3)+_0x19e5b5['toLocaleString']());_0x3ef9c3[_0x120e9d(0x71b)]?console[_0x120e9d(0x547)](_0x120e9d(0x797)+_0x1aa26f+_0x120e9d(0x596)+_0x3ef9c3[_0x120e9d(0x71b)]):console[_0x120e9d(0x547)](_0x120e9d(0x797)+_0x1aa26f),_0x5aaa44?.[_0x120e9d(0x4a0)]&&console['log'](_0x120e9d(0x6df)+_0x5aaa44[_0x120e9d(0x4a0)]+'\x20\x20(licenses\x20must\x20be\x20signed\x20by\x20the\x20matching\x20private\x20key)');}if(!_0x28fd59||!_0x28fd59[_0x120e9d(0x6b6)](_0x120e9d(0x259))){console['log'](''),console[_0x120e9d(0x547)]('\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.'),console[_0x120e9d(0x547)]('');return;}const _0x3eb3c2=[],_0x19a13c=Date['now'](),_0x240820=_0x38aa7d['id'],_0x49d4a6=_0x120e9d(0x79b);for(const {key:_0x21cd06,value:_0x5ab170}of _0x28fd59['getRange']('~licenses')){const _0x522b14=_0x5ab170[_0x120e9d(0x545)]?Buffer[_0x120e9d(0x716)](_0x5ab170[_0x120e9d(0x545)],_0x120e9d(0x723)):Buffer[_0x120e9d(0x360)](0x8);let _0x1d35a3='';try{_0x1d35a3=_0x264446[_0x120e9d(0x6c4)](_0x240820,_0x522b14,_0x49d4a6)['pin'];}catch{}_0x3eb3c2[_0x120e9d(0x494)]({'id':_0x21cd06,'licensee':_0x5ab170[_0x120e9d(0x5a8)]||'','expires':_0x5ab170[_0x120e9d(0x337)]?new Date(_0x5ab170[_0x120e9d(0x337)])[_0x120e9d(0x219)]()[_0x120e9d(0x7a7)](0x0,0xa):'','features':_0xf67d52(_0x5ab170[_0x120e9d(0x429)]),'pin':_0x1d35a3,'status':_0x31c2a4(_0x5ab170,_0x19a13c)});}if(_0x3eb3c2['length']===0x0){console[_0x120e9d(0x547)](''),console[_0x120e9d(0x547)](_0x120e9d(0x6c2)),console['log']('');return;}const _0xda598f=['\x20\x20'+'ID'[_0x120e9d(0x48a)](0xe),'LICENSEE'[_0x120e9d(0x48a)](0xe),_0x120e9d(0x613)[_0x120e9d(0x48a)](0xc),_0x120e9d(0x23f)[_0x120e9d(0x48a)](0x1e),_0x120e9d(0x741)['padEnd'](0xa),_0x120e9d(0x431)][_0x120e9d(0x2b6)]('\x20');console[_0x120e9d(0x547)]('\x0a'+_0xda598f);for(const _0xb898c2 of _0x3eb3c2){const _0xfa01d8=_0xb898c2['id'][_0x120e9d(0x7a7)](0x0,0x8)+'\u2026';console['log'](['\x20\x20'+_0xfa01d8[_0x120e9d(0x48a)](0xe),_0xb898c2['licensee']['slice'](0x0,0xe)[_0x120e9d(0x48a)](0xe),_0xb898c2[_0x120e9d(0x223)][_0x120e9d(0x48a)](0xc),_0xb898c2[_0x120e9d(0x429)][_0x120e9d(0x7a7)](0x0,0x1e)[_0x120e9d(0x48a)](0x1e),_0xb898c2[_0x120e9d(0x3fc)][_0x120e9d(0x48a)](0xa),_0xb898c2['status']]['join']('\x20'));}console[_0x120e9d(0x547)]('');}finally{await _0x38aa7d[_0x120e9d(0x5e4)]();}}async function _0x587af2(_0x51c5dd,_0x4f513){const _0x5bb99b=_0x4756d7,_0x23d135=require$$5,_0x23bfbc=requireOkdbLicenseCodec();let _0x58de05=_0x51c5dd;(_0x23bfbc[_0x5bb99b(0x709)](_0x51c5dd)==='path'||_0x408499[_0x5bb99b(0x2d5)](_0x51c5dd)&&_0x408499[_0x5bb99b(0x653)](_0x51c5dd)[_0x5bb99b(0x570)]())&&(_0x58de05=_0x408499[_0x5bb99b(0x6ba)](_0x51c5dd,_0x5bb99b(0x1f4))[_0x5bb99b(0x29c)]());const _0x15ceeb=_0x17c7c1[_0x5bb99b(0x25c)](_0x4f513[_0x5bb99b(0x3d8)]),_0x3d70eb=new _0x23d135(_0x15ceeb,_0x4caf29(_0x4f513));await _0x3d70eb[_0x5bb99b(0x6ef)]();try{let _0x4c6759;try{_0x4c6759=await _0x3d70eb[_0x5bb99b(0x58c)][_0x5bb99b(0x41a)]({'blob':_0x58de05});}catch(_0x3aa1bd){console[_0x5bb99b(0x3ba)](_0x5bb99b(0x2ad)+_0x3aa1bd['message']),process['exit'](0x1);}const _0x10ed2a=_0x4c6759['pin']||'',_0x1a7c8c=Object[_0x5bb99b(0x352)](_0x4c6759[_0x5bb99b(0x429)]||{})[_0x5bb99b(0x3fb)](([,_0x4dad10])=>_0x4dad10)[_0x5bb99b(0x2cc)](([_0xdeffe3])=>_0xdeffe3),_0x19129e=_0x4c6759[_0x5bb99b(0x36a)]||{},_0x1a8d45=[_0x19129e[_0x5bb99b(0x71b)]?'envs='+_0x19129e[_0x5bb99b(0x71b)]:null,_0x19129e[_0x5bb99b(0x761)]?_0x5bb99b(0x49a)+_0x19129e[_0x5bb99b(0x761)]:null,_0x19129e[_0x5bb99b(0x3b3)]?_0x5bb99b(0x4af)+_0x19129e[_0x5bb99b(0x3b3)]:null,_0x19129e['maxWrites']?_0x5bb99b(0x323)+_0x19129e[_0x5bb99b(0x1d8)]['toLocaleString']():null][_0x5bb99b(0x3fb)](Boolean)[_0x5bb99b(0x2b6)]('\x20\x20'),_0xe46018=_0x4c6759[_0x5bb99b(0x737)]!==_0x5bb99b(0x1f0);console[_0x5bb99b(0x547)](_0x4c6759[_0x5bb99b(0x350)]?_0x5bb99b(0x529):'\x0a\x20\x20\u2713\x20License\x20already\x20stored\x20(no\x20change)'),console[_0x5bb99b(0x547)](_0x5bb99b(0x64a)+_0x4c6759['id']),console[_0x5bb99b(0x547)](_0x5bb99b(0x6f8)+_0x4c6759[_0x5bb99b(0x5a8)]),console[_0x5bb99b(0x547)](_0x5bb99b(0x702)+(_0x4c6759[_0x5bb99b(0x337)]?new Date(_0x4c6759['expiresAt'])[_0x5bb99b(0x219)]()[_0x5bb99b(0x7a7)](0x0,0xa):_0x5bb99b(0x502))),console['log'](_0x5bb99b(0x49c)+(_0x1a7c8c['join'](',\x20')||_0x5bb99b(0x2df)));if(_0x1a8d45)console[_0x5bb99b(0x547)]('\x20\x20\x20\x20limits:\x20\x20\x20\x20'+_0x1a8d45);if(_0xe46018)console['log']('\x20\x20\x20\x20status:\x20\x20\x20\x20active\x20\x20('+_0x4c6759[_0x5bb99b(0x737)]+'\x20license\x20—\x20no\x20activation\x20needed)'),console[_0x5bb99b(0x547)]('');else!_0x4c6759['needsActivation']?(console[_0x5bb99b(0x547)]('\x20\x20\x20\x20status:\x20\x20\x20\x20'+_0x4c6759['status']),console[_0x5bb99b(0x547)]('')):(console[_0x5bb99b(0x547)](_0x5bb99b(0x1a3)+_0x10ed2a),console[_0x5bb99b(0x547)](_0x5bb99b(0x48b)),console['log'](''),console[_0x5bb99b(0x547)]('\x20\x20Next\x20step\x20\u2014\x20activate\x20the\x20license:'),console[_0x5bb99b(0x547)]('\x20\x20\x20\x201.\x20Send\x20the\x20PIN\x20above\x20('+_0x10ed2a+_0x5bb99b(0x3b4)),console[_0x5bb99b(0x547)]('\x20\x20\x20\x202.\x20The\x20vendor\x20returns\x20an\x20activation\x20token.'),console[_0x5bb99b(0x547)](_0x5bb99b(0x667)),console['log'](''));}finally{await _0x3d70eb['close']();}}async function _0x2ff5ff(_0x3bfe01,_0x59e1ba){const _0x4c5b22=_0x4756d7,_0x1983e8=require$$5,_0x4ad32f=_0x17c7c1[_0x4c5b22(0x25c)](_0x59e1ba[_0x4c5b22(0x3d8)]),_0x574e7f=new _0x1983e8(_0x4ad32f,_0x4caf29(_0x59e1ba));await _0x574e7f[_0x4c5b22(0x6ef)]();try{let _0x5b6f94;try{_0x5b6f94=await _0x574e7f[_0x4c5b22(0x58c)][_0x4c5b22(0x59b)](_0x3bfe01);}catch(_0x20da66){console[_0x4c5b22(0x3ba)]('[okdb]\x20error:\x20'+_0x20da66[_0x4c5b22(0x246)]),console[_0x4c5b22(0x3ba)](''),console[_0x4c5b22(0x3ba)](_0x4c5b22(0x765)),console[_0x4c5b22(0x3ba)](_0x4c5b22(0x37d)),console[_0x4c5b22(0x3ba)](_0x4c5b22(0x4cf)),console[_0x4c5b22(0x3ba)](_0x4c5b22(0x20e)),console[_0x4c5b22(0x3ba)](''),process[_0x4c5b22(0x592)](0x1);}console[_0x4c5b22(0x547)](_0x4c5b22(0x6ac)),console['log'](_0x4c5b22(0x64a)+_0x5b6f94['id']),console[_0x4c5b22(0x547)](_0x4c5b22(0x6f8)+_0x5b6f94[_0x4c5b22(0x5a8)]),console['log'](_0x4c5b22(0x702)+(_0x5b6f94['expiresAt']?new Date(_0x5b6f94['expiresAt'])[_0x4c5b22(0x219)]()['slice'](0x0,0xa):_0x4c5b22(0x502))),console[_0x4c5b22(0x547)](_0x4c5b22(0x364)),console[_0x4c5b22(0x547)]('');}finally{await _0x574e7f['close']();}}async function _0x24b70b(_0x2a6bd6,_0x48659b){const _0x35b73e=_0x4756d7;!_0x2a6bd6&&(console[_0x35b73e(0x3ba)](_0x35b73e(0x270)),process[_0x35b73e(0x592)](0x1));const _0x54f36c=require$$5,_0xec4f86=requireOkdbLicenseCodec(),_0x19a5b6=_0x17c7c1[_0x35b73e(0x25c)](_0x48659b[_0x35b73e(0x3d8)]),_0x482548=new _0x54f36c(_0x19a5b6,_0x4caf29(_0x48659b));await _0x482548[_0x35b73e(0x6ef)]();try{const _0x3ee370=_0x482548[_0x35b73e(0x6cd)];(!_0x3ee370||!_0x3ee370[_0x35b73e(0x6b6)](_0x35b73e(0x259)))&&(console[_0x35b73e(0x3ba)]('[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22'+_0x2a6bd6+'\x22'),process[_0x35b73e(0x592)](0x1));let _0x1722fc=null,_0x4ec0b0=null;const _0xede553=_0x3ee370[_0x35b73e(0x5e0)](_0x35b73e(0x259),_0x2a6bd6);if(_0xede553)_0x1722fc=_0x2a6bd6,_0x4ec0b0=_0xede553;else{const _0x502652=[];for(const {key:_0x244964,value:_0x8469aa}of _0x3ee370[_0x35b73e(0x433)](_0x35b73e(0x259))){if(_0x244964[_0x35b73e(0x72d)](_0x2a6bd6))_0x502652[_0x35b73e(0x494)]({'key':_0x244964,'value':_0x8469aa});}_0x502652[_0x35b73e(0x1b1)]===0x0&&(console[_0x35b73e(0x3ba)](_0x35b73e(0x38f)+_0x2a6bd6+'\x22'),process[_0x35b73e(0x592)](0x1)),_0x502652[_0x35b73e(0x1b1)]>0x1&&(console[_0x35b73e(0x3ba)](_0x35b73e(0x3c0)+_0x2a6bd6+_0x35b73e(0x53d)+_0x502652[_0x35b73e(0x1b1)]+_0x35b73e(0x776)),process[_0x35b73e(0x592)](0x1)),_0x1722fc=_0x502652[0x0][_0x35b73e(0x5af)],_0x4ec0b0=_0x502652[0x0][_0x35b73e(0x643)];}const _0x360ea7=Date['now'](),_0x4e07ea=_0x31c2a4(_0x4ec0b0,_0x360ea7),_0x5208dc=_0x482548['id'],_0x36c7ab='__OKDB_PUB_FINGERPRINT__';let _0x43d635='';try{const _0x461c06=Buffer[_0x35b73e(0x716)](_0x4ec0b0['_licenseHash'],_0x35b73e(0x723));_0x43d635=_0xec4f86[_0x35b73e(0x6c4)](_0x5208dc,_0x461c06,_0x36c7ab)[_0x35b73e(0x3fc)];}catch{}const _0x8d803f=_0x4ec0b0[_0x35b73e(0x429)]?Object[_0x35b73e(0x352)](_0x4ec0b0[_0x35b73e(0x429)])[_0x35b73e(0x3fb)](([,_0xb0bbaf])=>_0xb0bbaf)[_0x35b73e(0x2cc)](([_0x205a25])=>_0x205a25):[],_0x12f39d=_0x4ec0b0[_0x35b73e(0x36a)]||{},_0x2ee46a=_0x3ee370?.['db']?.['get']?.(_0x35b73e(0x24d))??0x0,_0x2fa1e4=[..._0x482548['_envs'][_0x35b73e(0x35c)]()][_0x35b73e(0x3fb)](_0x54dfca=>!_0x54dfca[_0x35b73e(0x72d)]('~'))[_0x35b73e(0x1b1)];console[_0x35b73e(0x547)]('\x0a\x20\x20License\x20details:'),console[_0x35b73e(0x547)]('\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x1722fc),console[_0x35b73e(0x547)](_0x35b73e(0x6f8)+(_0x4ec0b0[_0x35b73e(0x5a8)]||'')),console[_0x35b73e(0x547)](_0x35b73e(0x702)+(_0x4ec0b0[_0x35b73e(0x337)]?new Date(_0x4ec0b0['expiresAt'])['toISOString']()[_0x35b73e(0x7a7)](0x0,0xa):'')),console['log'](_0x35b73e(0x49c)+(_0x8d803f[_0x35b73e(0x2b6)](',\x20')||_0x35b73e(0x2df))),console[_0x35b73e(0x547)](_0x35b73e(0x1a3)+_0x43d635),console[_0x35b73e(0x547)]('\x20\x20\x20\x20status:\x20\x20\x20\x20'+_0x4e07ea),console[_0x35b73e(0x547)](_0x35b73e(0x670)+new Date(_0x4ec0b0[_0x35b73e(0x6c9)])['toISOString']());if(_0x4e07ea===_0x35b73e(0x30f)){console[_0x35b73e(0x547)](''),console['log']('\x20\x20Usage:');if(_0x12f39d['maxWrites']){const _0x431b8e=Math[_0x35b73e(0x40d)](_0x2ee46a/_0x12f39d[_0x35b73e(0x1d8)]*0x64);console[_0x35b73e(0x547)](_0x35b73e(0x319)+_0x2ee46a[_0x35b73e(0x34b)]()+_0x35b73e(0x596)+_0x12f39d[_0x35b73e(0x1d8)][_0x35b73e(0x34b)]()+_0x35b73e(0x7a5)+_0x431b8e+'%)');}else console[_0x35b73e(0x547)](_0x35b73e(0x319)+_0x2ee46a[_0x35b73e(0x34b)]()+_0x35b73e(0x2f1));_0x12f39d[_0x35b73e(0x71b)]?console[_0x35b73e(0x547)](_0x35b73e(0x6fb)+_0x2fa1e4+'\x20/\x20'+_0x12f39d[_0x35b73e(0x71b)]):console[_0x35b73e(0x547)](_0x35b73e(0x6fb)+_0x2fa1e4+'\x20\x20(unlimited)');}console[_0x35b73e(0x547)]('');}finally{await _0x482548['close']();}}async function _0x18cc42(_0x504d1a,_0x4edfa5){const _0x417c71=_0x4756d7;!_0x504d1a&&(console['error'](_0x417c71(0x1d5)),process[_0x417c71(0x592)](0x1));const _0x54e16a=require$$5,_0x38b90f=_0x17c7c1[_0x417c71(0x25c)](_0x4edfa5[_0x417c71(0x3d8)]),_0x11883b=new _0x54e16a(_0x38b90f,_0x4caf29(_0x4edfa5));await _0x11883b[_0x417c71(0x6ef)]();try{const _0x5170bc=_0x11883b[_0x417c71(0x6cd)];(!_0x5170bc||!_0x5170bc[_0x417c71(0x6b6)](_0x417c71(0x259)))&&(console[_0x417c71(0x3ba)](_0x417c71(0x38f)+_0x504d1a+'\x22'),process[_0x417c71(0x592)](0x1));let _0x595101=null,_0x132633=null;const _0x211b47=_0x5170bc[_0x417c71(0x5e0)](_0x417c71(0x259),_0x504d1a);if(_0x211b47)_0x595101=_0x504d1a,_0x132633=_0x211b47;else{const _0x3efc09=[];for(const {key:_0x570004,value:_0x411dd7}of _0x5170bc[_0x417c71(0x433)]('~licenses')){if(_0x570004['startsWith'](_0x504d1a))_0x3efc09[_0x417c71(0x494)]({'key':_0x570004,'value':_0x411dd7});}_0x3efc09[_0x417c71(0x1b1)]===0x0&&(console[_0x417c71(0x3ba)](_0x417c71(0x38f)+_0x504d1a+'\x22'),process[_0x417c71(0x592)](0x1)),_0x3efc09[_0x417c71(0x1b1)]>0x1&&(console[_0x417c71(0x3ba)]('[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22'+_0x504d1a+_0x417c71(0x53d)+_0x3efc09[_0x417c71(0x1b1)]+'\x20licenses'),process[_0x417c71(0x592)](0x1)),_0x595101=_0x3efc09[0x0]['key'],_0x132633=_0x3efc09[0x0][_0x417c71(0x643)];}await _0x5170bc[_0x417c71(0x43f)]('~licenses',_0x595101),console[_0x417c71(0x547)](_0x417c71(0x387)+_0x595101+'\x20\x20(licensee:\x20'+(_0x132633[_0x417c71(0x5a8)]||'(unset)')+')');}finally{await _0x11883b[_0x417c71(0x5e4)]();}}async function _0x193c36(_0x48c212,_0x4c971a,_0x447c88){const _0x5c1e37=_0x4756d7;!_0x48c212&&(console[_0x5c1e37(0x3ba)](_0x5c1e37(0x699)),process[_0x5c1e37(0x592)](0x1));!_0x447c88[_0x5c1e37(0x21b)]&&!(_0x447c88[_0x5c1e37(0x6b2)]&&_0x447c88[_0x5c1e37(0x726)])&&(console['error'](_0x5c1e37(0x6a2)),process['exit'](0x1));const _0x39a3b8=_0x447c88[_0x5c1e37(0x206)]||_0x4c971a['sync']?.[_0x5c1e37(0x1ac)];!_0x39a3b8&&(console[_0x5c1e37(0x3ba)](_0x5c1e37(0x186)+_0x5c1e37(0x55a)+_0x5c1e37(0x5dd)),process[_0x5c1e37(0x592)](0x1));const _0x4da105=require$$5,_0x45025d=new _0x4da105(_0x4c971a['dbPath'],{'sync':{'address':_0x39a3b8,'auto_reconcile':![]}});await _0x45025d[_0x5c1e37(0x6ef)]();try{const _0xa2e79b=_0x45025d[_0x5c1e37(0x6cd)];if(_0xa2e79b&&_0xa2e79b[_0x5c1e37(0x6b6)](_0x5c1e37(0x1be))){let _0x5c679d=![];for(const _0x2dcf0e of _0xa2e79b['getRange'](_0x5c1e37(0x1be))){_0x5c679d=!![];break;}_0x5c679d&&console['log'](_0x5c1e37(0x749)+'\x20\x20after\x20sync.\x20Duplicate\x20names\x20will\x20surface\x20as\x20ambiguous\x20logins\x20to\x20clean\x20up.');}console['log'](_0x5c1e37(0x661)+_0x48c212+'…'),await _0x45025d[_0x5c1e37(0x45e)]['join'](_0x48c212[_0x5c1e37(0x1f7)](/\/+$/,''),{'token':_0x447c88['token'],'username':_0x447c88[_0x5c1e37(0x6b2)],'password':_0x447c88[_0x5c1e37(0x726)]}),console[_0x5c1e37(0x547)]('\x20\x20✓\x20joined\x20and\x20reconciliation\x20initiated'),console[_0x5c1e37(0x547)](_0x5c1e37(0x1e2));}finally{await _0x45025d['close']();}}async function _0x1bf842(){const _0x40b34b=_0x4756d7,_0x2cc0f6=Date['now'](),_0x40ee0b=_0x4473e3(process[_0x40b34b(0x5d0)]),_0x472ee6=_0x2f8070(_0x40ee0b),_0x86e40d=_0x17c7c1['resolve'](_0x472ee6[_0x40b34b(0x3d8)]);!_0x472ee6[_0x40b34b(0x515)]&&!process['stdin'][_0x40b34b(0x338)]&&(_0x472ee6[_0x40b34b(0x515)]=!![]);const _0x30d101=require$$5,{start:_0x2a1880,colorLog:_0x348116}=requireOkdbShell(),_0x2afded=require$$1$2,_0x1d7f8c={..._0x472ee6[_0x40b34b(0x5af)]?{'encryptionKey':_0x472ee6[_0x40b34b(0x5af)]}:{},..._0x472ee6[_0x40b34b(0x674)]?{'admin':![]}:_0x17f4e3(_0x472ee6[_0x40b34b(0x731)])?{'admin':_0x472ee6[_0x40b34b(0x731)]}:{},..._0x17f4e3(_0x472ee6['api'])?{'api':_0x472ee6['api']}:{},..._0x17f4e3(_0x472ee6[_0x40b34b(0x717)])?{'auth':_0x472ee6[_0x40b34b(0x717)]}:{},..._0x17f4e3(_0x472ee6[_0x40b34b(0x3b5)])?{'mcp':_0x472ee6['mcp']}:{},..._0x472ee6[_0x40b34b(0x556)]!==![]?{'timeMachine':_0x472ee6[_0x40b34b(0x556)]}:{},...Object['fromEntries'](_0x29f83b['filter'](_0xe82df7=>_0x472ee6[_0xe82df7]!==undefined)['map'](_0x4a1640=>[_0x4a1640,_0x472ee6[_0x4a1640]]))},_0x1911ec=_0x39ef6a(_0x472ee6);if(!_0x2afded[_0x40b34b(0x4cb)]){const _0x571d12=_0x1e86d6(),_0x1ea4ac=_0x472ee6[_0x40b34b(0x37c)]?_0x40b34b(0x26c):_0x472ee6['workersFlag']!=null&&_0x472ee6['workersFlag']!==''?_0x40b34b(0x2d1):process.env.OKDB_HTTP_WORKERS?_0x40b34b(0x768):_0x472ee6['http']?.[_0x40b34b(0x4d1)]!=null?_0x40b34b(0x2b7):_0x40b34b(0x459)+Math[_0x40b34b(0x46c)](0x1,require$$0[_0x40b34b(0x383)]()[_0x40b34b(0x1b1)]-0x1);process[_0x40b34b(0x5c6)]['write']('[okdb]\x20http\x20workers:\x20'+_0x1911ec+'\x20('+_0x1ea4ac+(!_0x571d12?_0x40b34b(0x673):'')+')\x0a');}if(_0x2afded['isWorker']){const _0x5d78bb={..._0x1d7f8c},_0x184247=new _0x30d101(_0x86e40d,_0x5d78bb);_0x184247[_0x40b34b(0x547)][_0x40b34b(0x57b)]?.();const _0x3bdd11=process.env.OKDB_CLUSTER_SLOT??'?',_0xb78719={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x153e06=_0xb78719[_0x472ee6[_0x40b34b(0x3a2)]]??_0xb78719[_0x40b34b(0x380)];_0x184247[_0x40b34b(0x547)]['attach'](_0x5d8398=>{const _0x12fcb8=_0x40b34b;if((_0xb78719[_0x5d8398[_0x12fcb8(0x407)]]??0x1)<_0x153e06)return;try{process[_0x12fcb8(0x61d)]?.({'__okdbCluster':_0x12fcb8(0x547),'slot':_0x3bdd11,'pid':process['pid'],'entry':_0x5d8398});}catch{}}),await _0x184247[_0x40b34b(0x6ef)]();const {attachWorkerCluster:_0x32e338}=requireOkdbCluster();_0x32e338(_0x184247),await _0x150920(_0x184247,_0x472ee6[_0x40b34b(0x3a7)],_0x9e9136(_0x472ee6));return;}if(_0x1911ec>0x1){const {runClustered:_0x15fa65}=requireOkdbCluster(),_0x3a7a31=new _0x30d101(_0x86e40d,{..._0x1d7f8c,'engines':![],'processors':![],'compaction':![]});await _0x3a7a31[_0x40b34b(0x6ef)]();const _0x1118cd=async()=>{const _0x3157ff=_0x40b34b,_0x474a37=new _0x30d101(_0x86e40d,{..._0x1d7f8c});return await _0x474a37[_0x3157ff(0x6ef)](),_0x474a37;},_0x476aec=Object['fromEntries'](_0x29f83b['map'](_0x160365=>[_0x160365,_0x1d7f8c[_0x160365]??!![]])),{formatListenAddr:_0x22c001}=requireOkdbHttp(),_0x470d03=_0x22c001(_0x472ee6[_0x40b34b(0x3a7)],_0x472ee6[_0x40b34b(0x277)]?.[_0x40b34b(0x2d6)]),_0x3eb08e=_0x15fa65({'workers':_0x1911ec,'makeOkdb':_0x1118cd,'port':_0x472ee6[_0x40b34b(0x3a7)],'primaryOkdb':_0x3a7a31,'workerRole':_0x476aec,'listenAddr':_0x470d03});let _0x5d5a42=![];async function _0x841ce6(_0x4da830){const _0x226361=_0x40b34b;_0x5d5a42&&(process[_0x226361(0x391)]['write'](_0x226361(0x63f)),process[_0x226361(0x592)](0x82));_0x5d5a42=!![],process[_0x226361(0x391)][_0x226361(0x4f7)](_0x226361(0x5f0)+(_0x4da830||_0x226361(0x4a4))+_0x226361(0x1ea));const _0x539980=setTimeout(()=>{const _0x305d7e=_0x226361;process[_0x305d7e(0x391)][_0x305d7e(0x4f7)](_0x305d7e(0x213)),process['exit'](0x0);},0xbb8);_0x539980[_0x226361(0x6d1)]?.();try{await _0x3eb08e[_0x226361(0x5e4)]();}catch(_0x522f16){process[_0x226361(0x391)]['write']('[okdb]\x20cluster\x20close\x20error:\x20'+(_0x522f16?.[_0x226361(0x246)]??_0x522f16)+'\x0a');}try{await _0x3a7a31[_0x226361(0x5e4)]();}catch(_0x231f0b){process[_0x226361(0x391)][_0x226361(0x4f7)](_0x226361(0x5ca)+(_0x231f0b?.[_0x226361(0x246)]??_0x231f0b)+'\x0a');}process['exit'](0x0);}_0x472ee6[_0x40b34b(0x619)]=_0x1911ec;if(!_0x472ee6['noRepl']){_0x3a7a31[_0x40b34b(0x547)][_0x40b34b(0x57b)]?.(),_0x3300f1(_0x3a7a31[_0x40b34b(0x717)]?.[_0x40b34b(0x39d)]?.()??[]),await _0x2a1880(_0x3a7a31,_0x472ee6);return;}process[_0x40b34b(0x5c6)][_0x40b34b(0x4f7)]('[okdb]\x20cluster\x20primary\x20pid='+process['pid']+_0x40b34b(0x779)+_0x1911ec+'\x20'+(_0x40b34b(0x48e)+_0x472ee6[_0x40b34b(0x3a7)]+'\x0a')),console['log'](''),console[_0x40b34b(0x547)]('\x20\x20✓\x20OKDB\x20cluster\x20running'),console[_0x40b34b(0x547)](_0x40b34b(0x62e)+_0x472ee6['port']+'\x20\x20('+_0x1911ec+_0x40b34b(0x295)),console[_0x40b34b(0x547)](_0x40b34b(0x1af)+_0x86e40d),console[_0x40b34b(0x547)](_0x40b34b(0x288)+_0x3a7a31['id']),console[_0x40b34b(0x547)](_0x40b34b(0x572)+_0x472ee6[_0x40b34b(0x3a7)]+_0x40b34b(0x6e5));!_0x472ee6[_0x40b34b(0x674)]&&console['log']('\x20\x20\x20\x20admin:\x20\x20\x20http://localhost:'+_0x472ee6[_0x40b34b(0x3a7)]+'/admin/index.html');console[_0x40b34b(0x547)](''),_0x3300f1(_0x3a7a31['auth']?.[_0x40b34b(0x39d)]?.()??[]),process['on'](_0x40b34b(0x66a),()=>_0x841ce6('SIGINT')),process['on']('SIGTERM',()=>_0x841ce6(_0x40b34b(0x2bc))),process['on'](_0x40b34b(0x44c),()=>_0x841ce6(_0x40b34b(0x44c)));return;}const _0x249077=new _0x30d101(_0x86e40d,_0x1d7f8c);_0x249077[_0x40b34b(0x547)][_0x40b34b(0x57b)]?.();const _0x18ac6f=_0x249077[_0x40b34b(0x547)]['attach'](_0x1d2e54=>_0x348116(_0x1d2e54,_0x472ee6[_0x40b34b(0x3a2)]));if(_0x472ee6[_0x40b34b(0x515)])process['stdout'][_0x40b34b(0x4f7)](_0x40b34b(0x3c3));await _0x249077['open']();if(_0x472ee6[_0x40b34b(0x515)])process[_0x40b34b(0x5c6)][_0x40b34b(0x4f7)](_0x40b34b(0x4d6));try{await _0x150920(_0x249077,_0x472ee6[_0x40b34b(0x3a7)],_0x9e9136(_0x472ee6));}catch(_0x542e5b){_0x542e5b[_0x40b34b(0x5cc)]===_0x40b34b(0x196)&&(console['error'](_0x40b34b(0x742)+_0x472ee6[_0x40b34b(0x3a7)]+_0x40b34b(0x63e)),process[_0x40b34b(0x592)](0x1));throw _0x542e5b;}if(_0x472ee6[_0x40b34b(0x515)]){const _0x35bbf1=_0x472ee6[_0x40b34b(0x277)]?.[_0x40b34b(0x2d6)]!==undefined?[][_0x40b34b(0x33f)](_0x472ee6[_0x40b34b(0x277)]['host'])[_0x40b34b(0x2b6)](',\x20')+'\x20':'';process[_0x40b34b(0x5c6)][_0x40b34b(0x4f7)](_0x40b34b(0x6f4)+_0x35bbf1+':'+_0x472ee6[_0x40b34b(0x3a7)]+'\x0a');}if(!_0x472ee6['noRepl'])_0x249077['log']['detachConsole']?.(),_0x18ac6f?.(),_0x3300f1(_0x249077[_0x40b34b(0x717)]?.[_0x40b34b(0x39d)]?.()??[]),await _0x2a1880(_0x249077,_0x472ee6);else{const _0x4ec72d=_0x17c7c1[_0x40b34b(0x2b6)](_0x86e40d,'okdb.pid');try{_0x408499[_0x40b34b(0x639)](_0x4ec72d,String(process[_0x40b34b(0x690)]));}catch{}const _0x842d41=Date['now']()-_0x2cc0f6;console[_0x40b34b(0x547)](''),console['log'](_0x40b34b(0x5aa)),console['log']('\x20\x20\x20\x20port:\x20\x20'+_0x472ee6[_0x40b34b(0x3a7)]),console['log'](_0x40b34b(0x3dc)+_0x86e40d),console[_0x40b34b(0x547)](_0x40b34b(0x44b)+_0x249077['id']);{const _0xa5e384=_0x249077[_0x40b34b(0x6cd)]?.['db']?.['get']?.(_0x40b34b(0x24d))??0x0,_0x15e834=[..._0x249077[_0x40b34b(0x221)][_0x40b34b(0x35c)]()][_0x40b34b(0x3fb)](_0x1446cb=>!_0x1446cb[_0x40b34b(0x72d)]('~'))['length'];if(_0x249077['_license']?.[_0x40b34b(0x30f)]?.['licenseType']===0x1){const _0x541866=Math[_0x40b34b(0x392)]((_0x249077[_0x40b34b(0x348)]['active'][_0x40b34b(0x337)]-Date[_0x40b34b(0x6a7)]())/0x5265c00);console['log'](_0x40b34b(0x1db)+_0x249077[_0x40b34b(0x348)][_0x40b34b(0x30f)][_0x40b34b(0x5a8)]+_0x40b34b(0x6e2)+_0x541866+_0x40b34b(0x1e7));}else{if(_0x249077[_0x40b34b(0x348)]?.[_0x40b34b(0x30f)]){const _0x48a11c=_0x249077[_0x40b34b(0x348)][_0x40b34b(0x30f)];console[_0x40b34b(0x547)](_0x40b34b(0x3bb)+_0x48a11c[_0x40b34b(0x5a8)]+_0x40b34b(0x466)+new Date(_0x48a11c[_0x40b34b(0x337)])['toISOString']()['slice'](0x0,0xa)+')');const _0xff6c7c=_0x48a11c[_0x40b34b(0x36a)]||{};if(_0xff6c7c[_0x40b34b(0x1d8)]){const _0x3ed02e=Math[_0x40b34b(0x40d)](_0xa5e384/_0xff6c7c[_0x40b34b(0x1d8)]*0x64);console[_0x40b34b(0x547)]('\x20\x20\x20\x20usage:\x20\x20\x20'+_0xa5e384[_0x40b34b(0x34b)]()+_0x40b34b(0x596)+_0xff6c7c[_0x40b34b(0x1d8)][_0x40b34b(0x34b)]()+_0x40b34b(0x477)+_0x3ed02e+_0x40b34b(0x49e)+_0x15e834+(_0xff6c7c[_0x40b34b(0x71b)]?'/'+_0xff6c7c[_0x40b34b(0x71b)]:'')+_0x40b34b(0x30c)+(_0x15e834===0x1?'':'s'));}}else{if(_0x249077['_license']){const _0x9a3e2=_0x249077[_0x40b34b(0x348)]['getPins'](),_0x190f78=_0x9a3e2[_0x40b34b(0x1b1)]?_0x9a3e2[_0x40b34b(0x2cc)](_0x27a14a=>_0x27a14a[_0x40b34b(0x3fc)])[_0x40b34b(0x2b6)](',\x20'):'(add\x20a\x20license\x20first)',_0x450ec1=_0x249077[_0x40b34b(0x348)][_0x40b34b(0x74b)],_0x2c2646=_0x450ec1['limits'][_0x40b34b(0x1d8)]?Math[_0x40b34b(0x40d)](_0xa5e384/_0x450ec1['limits'][_0x40b34b(0x1d8)]*0x64):0x0;console[_0x40b34b(0x547)](_0x40b34b(0x2f2)),console[_0x40b34b(0x547)]('\x20\x20\x20\x20usage:\x20\x20\x20'+_0xa5e384[_0x40b34b(0x34b)]()+'\x20/\x20'+_0x450ec1[_0x40b34b(0x36a)][_0x40b34b(0x1d8)][_0x40b34b(0x34b)]()+'\x20writes\x20('+_0x2c2646+_0x40b34b(0x49e)+_0x15e834+'\x20/\x20'+_0x450ec1[_0x40b34b(0x36a)]['envs']+'\x20envs'),console['log'](_0x40b34b(0x24a)+_0x190f78);}}}}console[_0x40b34b(0x547)](_0x40b34b(0x539)+_0x472ee6[_0x40b34b(0x3a7)]+_0x40b34b(0x6e5));!_0x472ee6[_0x40b34b(0x674)]&&console[_0x40b34b(0x547)](_0x40b34b(0x31b)+_0x472ee6[_0x40b34b(0x3a7)]+_0x40b34b(0x4b6));console[_0x40b34b(0x547)](''),console['log'](_0x40b34b(0x23c)+_0x842d41+'ms'),_0x3300f1(_0x249077[_0x40b34b(0x717)]?.[_0x40b34b(0x39d)]?.()??[]);let _0x4e4687=![];async function _0x517b10(_0x5facc5){const _0x55e315=_0x40b34b;_0x4e4687&&(process[_0x55e315(0x391)][_0x55e315(0x4f7)](_0x55e315(0x63f)),process[_0x55e315(0x592)](0x82));_0x4e4687=!![],process[_0x55e315(0x391)]['write']('\x0a[okdb]\x20received\x20'+(_0x5facc5||_0x55e315(0x4a4))+_0x55e315(0x69c));const _0xf9c775=setTimeout(()=>{const _0x131baa=_0x55e315;process[_0x131baa(0x391)][_0x131baa(0x4f7)](_0x131baa(0x713)),process['exit'](0x1);},0x1388);try{_0x408499[_0x55e315(0x632)](_0x4ec72d);}catch{}try{await _0x249077[_0x55e315(0x5e4)]();}catch(_0x434b12){process[_0x55e315(0x391)][_0x55e315(0x4f7)]('[okdb]\x20close\x20error:\x20'+(_0x434b12?.[_0x55e315(0x246)]??_0x434b12)+'\x0a');}clearTimeout(_0xf9c775),process[_0x55e315(0x391)][_0x55e315(0x4f7)](_0x55e315(0x2aa)),process[_0x55e315(0x592)](0x0);}process['on'](_0x40b34b(0x66a),()=>_0x517b10(_0x40b34b(0x66a))),process['on'](_0x40b34b(0x2bc),()=>_0x517b10(_0x40b34b(0x2bc))),process['on'](_0x40b34b(0x44c),()=>_0x517b10(_0x40b34b(0x44c)));}}const _0x29083d=new Set([_0x4756d7(0x214),_0x4756d7(0x3c4),'init',_0x4756d7(0x4ee),'export','import','reset',_0x4756d7(0x21b),_0x4756d7(0x2b6),'license']),_0x5b4494=process[_0x4756d7(0x5d0)][0x2];if(_0x5b4494===_0x4756d7(0x214))console[_0x4756d7(0x547)](require$$3[_0x4756d7(0x214)]),process[_0x4756d7(0x592)](0x0);else{if(_0x5b4494&&_0x29083d['has'](_0x5b4494)){const _0x4f25aa=process['argv'][_0x4756d7(0x7a7)](0x3),_0x1adcac=_0x4473e3([_0x4756d7(0x4b5),_0x4756d7(0x3ea),..._0x4f25aa]),_0x49c8e3=_0x2f8070(_0x1adcac),_0xea9ff1=new Set([_0x4756d7(0x354),'-d',_0x4756d7(0x721),'-k',_0x4756d7(0x46f),'-c','--port','-p',_0x4756d7(0x328),_0x4756d7(0x657),'-e',_0x4756d7(0x2b8),'--name',_0x4756d7(0x562),_0x4756d7(0x498),_0x4756d7(0x351),'--grants',_0x4756d7(0x437),_0x4756d7(0x36c),_0x4756d7(0x2cb),'-u',_0x4756d7(0x243)]);let _0x269b1a=null;for(let _0xfa014f=0x0;_0xfa014f<_0x4f25aa[_0x4756d7(0x1b1)];_0xfa014f++){if(_0xea9ff1['has'](_0x4f25aa[_0xfa014f])){_0xfa014f++;continue;}if(!_0x4f25aa[_0xfa014f]['startsWith']('-')){_0x269b1a=_0x4f25aa[_0xfa014f];break;}}(async()=>{const _0x594c8a=_0x4756d7;if(_0x5b4494===_0x594c8a(0x21b)){const _0x325252=process['argv'][0x3],_0x3a242c=process[_0x594c8a(0x5d0)][_0x594c8a(0x7a7)](0x4),_0x59f582=_0x4473e3([_0x594c8a(0x4b5),_0x594c8a(0x3ea),..._0x3a242c]),_0x102e87=_0x2f8070(_0x59f582),_0x2964e9=new Set(['--path','-d','--key','-k',_0x594c8a(0x46f),'-c','--port','-p',_0x594c8a(0x5a5),_0x594c8a(0x562),_0x594c8a(0x498),_0x594c8a(0x351),_0x594c8a(0x612),_0x594c8a(0x437),_0x594c8a(0x328),'--env','-e',_0x594c8a(0x2b8)]),_0x388377=[];for(let _0x20eede=0x0;_0x20eede<_0x3a242c[_0x594c8a(0x1b1)];_0x20eede++){if(_0x2964e9['has'](_0x3a242c[_0x20eede])){_0x20eede++;continue;}if(_0x3a242c[_0x20eede][_0x594c8a(0x72d)]('-'))continue;_0x388377[_0x594c8a(0x494)](_0x3a242c[_0x20eede]);}switch(_0x325252){case _0x594c8a(0x711):await _0x565d68(_0x102e87,_0x59f582);break;case _0x594c8a(0x772):await _0x218981(_0x102e87);break;case _0x594c8a(0x548):await _0x2392a9(_0x388377[0x0],_0x102e87);break;default:console['error'](_0x594c8a(0x3ed)+_0x325252+_0x594c8a(0x1e9)),process[_0x594c8a(0x592)](0x1);}return;}if(_0x5b4494===_0x594c8a(0x707)){const _0x1dba04=requireOkdbLicenseCodec(),_0x1a137b=process['argv'][_0x594c8a(0x7a7)](0x3),_0x321730=_0x4473e3([_0x594c8a(0x4b5),_0x594c8a(0x3ea),..._0x1a137b]),_0x349650=_0x2f8070(_0x321730),_0x215d27=new Set([_0x594c8a(0x354),'-d',_0x594c8a(0x721),'-k',_0x594c8a(0x46f),'-c',_0x594c8a(0x728),'-p','--log-level']),_0x1e3dfc=[];for(let _0x2ae298=0x0;_0x2ae298<_0x1a137b[_0x594c8a(0x1b1)];_0x2ae298++){if(_0x215d27[_0x594c8a(0x4e7)](_0x1a137b[_0x2ae298])){_0x2ae298++;continue;}if(_0x1a137b[_0x2ae298][_0x594c8a(0x72d)]('-'))continue;_0x1e3dfc['push'](_0x1a137b[_0x2ae298]);}const _0x282710=_0x1e3dfc[0x0]??null;if(_0x282710===_0x594c8a(0x43f))await _0x18cc42(_0x1e3dfc[0x1],_0x349650);else{if(!_0x282710)await _0x4afb90(_0x349650);else{let _0x42151d=_0x1dba04[_0x594c8a(0x709)](_0x282710);if(_0x42151d==='unknown'&&_0x408499['existsSync'](_0x282710))_0x42151d=_0x594c8a(0x504);if(_0x42151d==='path')try{const _0xde2541=_0x408499[_0x594c8a(0x6ba)](_0x282710,_0x594c8a(0x1f4))[_0x594c8a(0x29c)](),_0x34f461=_0x1dba04[_0x594c8a(0x709)](_0xde2541);if(_0x34f461===_0x594c8a(0x50b)){await _0x2ff5ff(_0xde2541,_0x349650);return;}await _0x587af2(_0x282710,_0x349650);return;}catch(_0x338e24){console[_0x594c8a(0x3ba)](_0x594c8a(0x2ef)+_0x282710+':\x20'+_0x338e24['message']),process[_0x594c8a(0x592)](0x1);}switch(_0x42151d){case _0x594c8a(0x5e2):await _0x587af2(_0x282710,_0x349650);break;case _0x594c8a(0x50b):await _0x2ff5ff(_0x282710,_0x349650);break;case _0x594c8a(0x376):await _0x24b70b(_0x282710,_0x349650);break;default:console[_0x594c8a(0x3ba)](_0x594c8a(0x6fa)+_0x282710+'\x22'),console['error'](''),console[_0x594c8a(0x3ba)](_0x594c8a(0x62a)),console[_0x594c8a(0x3ba)](_0x594c8a(0x4b1)),console['error'](_0x594c8a(0x244)),console[_0x594c8a(0x3ba)](_0x594c8a(0x64b)),console[_0x594c8a(0x3ba)](_0x594c8a(0x46e)),console['error'](''),console[_0x594c8a(0x3ba)]('\x20\x20Usage:\x20okdb\x20license\x20[<blob|path|uuid|activation-token>]'),process[_0x594c8a(0x592)](0x1);}}}return;}switch(_0x5b4494){case _0x594c8a(0x3c4):await _0x19d876(_0x49c8e3);break;case _0x594c8a(0x59a):await _0x1cb293();break;case'reset':await _0x4dc58d(_0x49c8e3);break;case _0x594c8a(0x4ee):await _0x40df23(_0x269b1a??_0x17c7c1['resolve'](_0x594c8a(0x367)),_0x49c8e3);break;case _0x594c8a(0x62f):await _0x408e93(_0x269b1a??_0x17c7c1[_0x594c8a(0x25c)]('./okdb-export.ndjson'),_0x49c8e3,_0x1adcac);break;case _0x594c8a(0x3b0):await _0x580f4a(_0x269b1a??_0x17c7c1[_0x594c8a(0x25c)](_0x594c8a(0x23d)),_0x49c8e3,_0x1adcac);break;case _0x594c8a(0x2b6):await _0x193c36(_0x269b1a,_0x49c8e3,_0x1adcac);break;}})()['then'](()=>process[_0x4756d7(0x592)](0x0))[_0x4756d7(0x58b)](_0x100a87=>{const _0x3abb09=_0x4756d7;console[_0x3abb09(0x3ba)](_0x3abb09(0x384)+(_0x100a87[_0x3abb09(0x246)]||_0x100a87)+'\x0a'),process[_0x3abb09(0x592)](0x1);});}else _0x1bf842()[_0x4756d7(0x58b)](_0xeaccbf=>{const _0x401a6a=_0x4756d7;console[_0x401a6a(0x3ba)]('\x0a[okdb]\x20fatal\x20error:'),console[_0x401a6a(0x3ba)](_0xeaccbf[_0x401a6a(0x2ae)]||_0xeaccbf),process[_0x401a6a(0x592)](0x1);});}return okdb$1;}var okdbExports=requireOkdb(),okdb=getDefaultExportFromCjs(okdbExports);module[_0x5411c3(0x577)]=okdb;
2
+ 'use strict';const _0x563deb=_0x3dbc;(function(_0x47585f,_0x28045){const _0xbc90bc=_0x3dbc,_0x1293f0=_0x47585f();while(!![]){try{const _0x127530=parseInt(_0xbc90bc(0x4c3))/0x1*(-parseInt(_0xbc90bc(0xb1))/0x2)+parseInt(_0xbc90bc(0x171))/0x3*(-parseInt(_0xbc90bc(0x626))/0x4)+-parseInt(_0xbc90bc(0x528))/0x5+-parseInt(_0xbc90bc(0x277))/0x6*(-parseInt(_0xbc90bc(0xd4))/0x7)+-parseInt(_0xbc90bc(0x8a))/0x8*(parseInt(_0xbc90bc(0x54a))/0x9)+parseInt(_0xbc90bc(0x1f8))/0xa+parseInt(_0xbc90bc(0x503))/0xb*(parseInt(_0xbc90bc(0x11a))/0xc);if(_0x127530===_0x28045)break;else _0x1293f0['push'](_0x1293f0['shift']());}catch(_0x1c93e4){_0x1293f0['push'](_0x1293f0['shift']());}}}(_0x9790,0x1ee3f));var require$$1=require('path'),require$$0$1=require('fs'),require$$0=require('os'),require$$4$1=require(_0x563deb(0x31c)),require$$5$1=require(_0x563deb(0x303)),require$$0$3=require('readline'),require$$2=require(_0x563deb(0x359)),require$$5=require(_0x563deb(0x415)),require$$2$1=require(_0x563deb(0x4a9)),require$$0$2=require(_0x563deb(0x2c9)),require$$4=require('child_process'),require$$1$1=require('cluster'),require$$0$4=require(_0x563deb(0x70d)),require$$0$5=require(_0x563deb(0x3a3)),require$$0$6=require(_0x563deb(0x604)),require$$0$7=require('http'),require$$1$2=require('https'),require$$2$2=require('url'),commonjsGlobal=typeof globalThis!=='undefined'?globalThis:typeof window!==_0x563deb(0x3f3)?window:typeof global!==_0x563deb(0x3f3)?global:typeof self!==_0x563deb(0x3f3)?self:{};function getDefaultExportFromCjs(_0x486e6b){const _0x345dff=_0x563deb;return _0x486e6b&&_0x486e6b[_0x345dff(0x565)]&&Object[_0x345dff(0x33a)][_0x345dff(0x296)][_0x345dff(0x45a)](_0x486e6b,_0x345dff(0x34b))?_0x486e6b[_0x345dff(0x34b)]:_0x486e6b;}var okdb$1={},okdbWorkers,hasRequiredOkdbWorkers;function requireOkdbWorkers(){if(hasRequiredOkdbWorkers)return okdbWorkers;hasRequiredOkdbWorkers=0x1;const _0x2b3d7a=require$$0,_0xcd4e4c=require$$0$1,_0x1f4545=require$$1;let _0x18b95e;function _0x261eb5(){const _0x42d5e0=_0x3dbc;if(process.env.OKDB_FORCE_SHMBUF_FALLBACK==='1')return![];if(_0x18b95e!==undefined)return _0x18b95e;try{const _0xb0de1e=_0x1f4545[_0x42d5e0(0x283)](require[_0x42d5e0(0x429)](_0x42d5e0(0x2e6)));_0x18b95e=_0xcd4e4c[_0x42d5e0(0x525)](_0x1f4545[_0x42d5e0(0x139)](_0xb0de1e,_0x42d5e0(0x239),_0x42d5e0(0x2a5),_0x42d5e0(0x6ee)));}catch{_0x18b95e=![];}return _0x18b95e;}function _0x8769e8(){const _0x527b48=_0x3dbc,_0x740bf9=_0x2b3d7a[_0x527b48(0x2c6)]()[_0x527b48(0x249)];return Math[_0x527b48(0x234)](0x1,_0x740bf9-0x1);}function _0x11c18d(_0xae5810,_0x2b1c2b={}){const _0x2b599b=_0x3dbc,_0x2fd036=_0x2b1c2b[_0x2b599b(0x5e6)]!==undefined?_0x2b1c2b['shmbufNative']:_0x261eb5();let _0xcb8cd7;if(_0xae5810?.[_0x2b599b(0x200)])_0xcb8cd7=0x1;else{let _0x1c1d64,_0x44e489;if(_0xae5810?.[_0x2b599b(0x129)]!==undefined&&_0xae5810[_0x2b599b(0x129)]!==null&&_0xae5810[_0x2b599b(0x129)]!=='')_0x1c1d64=_0xae5810['workersFlag'],_0x44e489=_0x2b599b(0xe0);else{if(process.env.OKDB_HTTP_WORKERS!==undefined&&process.env.OKDB_HTTP_WORKERS!=='')_0x1c1d64=process.env.OKDB_HTTP_WORKERS,_0x44e489=_0x2b599b(0x737);else _0xae5810?.[_0x2b599b(0x57f)]?.[_0x2b599b(0x6d7)]!==undefined&&_0xae5810[_0x2b599b(0x57f)][_0x2b599b(0x6d7)]!==null&&_0xae5810[_0x2b599b(0x57f)][_0x2b599b(0x6d7)]!==''&&(_0x1c1d64=_0xae5810[_0x2b599b(0x57f)][_0x2b599b(0x6d7)],_0x44e489=_0x2b599b(0x14e));}if(_0x1c1d64===undefined)_0xcb8cd7=_0x8769e8();else{const _0x27cc90=Number(_0x1c1d64);!Number[_0x2b599b(0x53a)](_0x27cc90)||_0x27cc90<0x1?(console[_0x2b599b(0x14c)](_0x2b599b(0x419)+_0x44e489+'='+JSON[_0x2b599b(0x316)](_0x1c1d64)+_0x2b599b(0x97)),_0xcb8cd7=0x1):_0xcb8cd7=_0x27cc90;}}return!_0x2fd036&&_0xcb8cd7>0x1&&(console[_0x2b599b(0x14c)](_0x2b599b(0x206)+(_0x2b599b(0x23d)+_0xcb8cd7+').')),_0xcb8cd7=0x1),_0xcb8cd7;}return okdbWorkers={'isShmbufNative':_0x261eb5,'defaultWorkers':_0x8769e8,'resolveWorkers':_0x11c18d},okdbWorkers;}var version='2.4.0',require$$3={'version':version},okdbMigrate={'exports':{}},okdbError,hasRequiredOkdbError;function requireOkdbError(){if(hasRequiredOkdbError)return okdbError;hasRequiredOkdbError=0x1;class _0x5a406e extends Error{constructor(_0x8429d4,_0x12dde0,_0x275936={}){const _0x1aeb0b=_0x3dbc;super(_0x8429d4),this[_0x1aeb0b(0x1cf)]=_0x1aeb0b(0x58e),this['code']=_0x12dde0,this[_0x1aeb0b(0x744)]=_0x275936,_0x275936[_0x1aeb0b(0x30f)]&&(this[_0x1aeb0b(0x30f)]=_0x275936[_0x1aeb0b(0x30f)]),Error[_0x1aeb0b(0x6e9)](this,this['constructor']);}}class _0x31dae8 extends _0x5a406e{constructor(_0x1d2f87,_0x5879a7,_0x1b6ed6,_0x5a4485){const _0x3407ec=_0x3dbc;super('Version\x20mismatch\x20for\x20'+_0x1d2f87+'@'+_0x5879a7+_0x3407ec(0x512)+_0x1b6ed6+',\x20got\x20'+_0x5a4485,_0x3407ec(0x62e),{'type':_0x1d2f87,'key':_0x5879a7,'expectedVersion':_0x1b6ed6,'actualVersion':_0x5a4485}),this[_0x3407ec(0x1cf)]=_0x3407ec(0x71e);}}class _0x580afc extends _0x5a406e{constructor(_0x59895b,_0x2583a7){const _0x3bb0f2=_0x3dbc;super(_0x59895b+'@'+_0x2583a7+'\x20does\x20not\x20exist',_0x3bb0f2(0xe8),{'type':_0x59895b,'key':_0x2583a7}),this[_0x3bb0f2(0x1cf)]=_0x3bb0f2(0x5c5);}}class _0x2f574a extends _0x5a406e{constructor(_0x1162ee,_0xfa20c0){const _0x3ef952=_0x3dbc;super(_0x1162ee+'@'+_0xfa20c0+_0x3ef952(0x398),_0x3ef952(0x2a2),{'type':_0x1162ee,'key':_0xfa20c0}),this['name']=_0x3ef952(0x746);}}class _0x2e0be1 extends _0x5a406e{constructor(_0xe05638,_0x177609){const _0x431cd4=_0x3dbc,_0x3e0844=typeof _0x177609;super(_0x431cd4(0x3a9)+_0xe05638+_0x431cd4(0x2fb)+_0x3e0844+'.\x20Only\x20primitives,\x20null,\x20Buffers,\x20and\x20arrays\x20are\x20allowed.\x20Got:\x20'+_0x177609,'INVALID_INDEX_KEY',{'index':_0xe05638,'key':_0x177609,'keyType':_0x3e0844}),this[_0x431cd4(0x1cf)]='OKDBInvalidIndexKeyError';}}class _0x8e3bdb extends _0x5a406e{constructor(_0x2b1c3e){const _0x12b906=_0x3dbc,_0x1e550f=typeof _0x2b1c3e;super('Invalid\x20primary\x20key\x20type:\x20'+_0x1e550f+'.\x20Primary\x20keys\x20must\x20be\x20string\x20or\x20number.\x20Got:\x20'+_0x2b1c3e,_0x12b906(0x4be),{'key':_0x2b1c3e,'keyType':_0x1e550f}),this[_0x12b906(0x1cf)]=_0x12b906(0x21d);}}class _0x44d941 extends _0x5a406e{constructor(_0x4a4b16){const _0xaeaac3=_0x3dbc;super(_0xaeaac3(0x262)+_0x4a4b16+_0xaeaac3(0x64b),_0xaeaac3(0x19f),{'type':_0x4a4b16}),this[_0xaeaac3(0x1cf)]=_0xaeaac3(0x5b0);}}class _0x4d6dca extends _0x5a406e{constructor(_0x53fdbc){const _0x2a0198=_0x3dbc;super(_0x2a0198(0x262)+_0x53fdbc+_0x2a0198(0x6e6),_0x2a0198(0x522),{'type':_0x53fdbc}),this[_0x2a0198(0x1cf)]='OKDBTypeAlreadyRegisteredError';}}class _0x12c7d3 extends _0x5a406e{constructor(_0x540226,_0x2f56d9){const _0x26d908=_0x3dbc;super(_0x26d908(0x5a8)+_0x2f56d9+_0x26d908(0x256)+_0x540226+_0x26d908(0x64b),_0x26d908(0x6c4),{'type':_0x540226,'index':_0x2f56d9}),this[_0x26d908(0x1cf)]=_0x26d908(0x5e5);}}class _0x1026b3 extends _0x5a406e{constructor(_0x2bcb38,_0x62e4ec){const _0x45c72d=_0x3dbc;super(_0x45c72d(0x5a8)+_0x62e4ec+_0x45c72d(0x256)+_0x2bcb38+_0x45c72d(0x3cb),_0x45c72d(0x16b),{'type':_0x2bcb38,'index':_0x62e4ec}),this[_0x45c72d(0x1cf)]='OKDBIndexAlreadyRegisteredError';}}class _0x33b3cc extends _0x5a406e{constructor(_0x306172,_0x18b8be={}){const _0x5572bf=_0x3dbc;super(_0x306172,_0x5572bf(0x5c7),_0x18b8be),this[_0x5572bf(0x1cf)]=_0x5572bf(0x104);}}class _0x3e388d extends _0x5a406e{constructor(_0x25ed1d,_0x29000b,_0x3df814,_0x200691,_0x22beca){const _0x515827=_0x3dbc;super(_0x515827(0x29d)+_0x25ed1d+'@'+_0x29000b+_0x515827(0x9d)+_0x3df814+_0x515827(0x317)+_0x200691+_0x515827(0x6e5)+_0x22beca+'\x27',_0x515827(0x2df),{'type':_0x25ed1d,'index':_0x29000b,'indexKey':_0x3df814,'existingKey':_0x200691,'conflictingKey':_0x22beca}),this['name']=_0x515827(0x3ea);}}class _0x41d797 extends _0x5a406e{constructor(_0x33f933,_0x258e55,_0x78db9b){const _0x4e2f8c=_0x3dbc;super(_0x4e2f8c(0x5e3)+_0x33f933+'@'+_0x258e55,_0x4e2f8c(0x3ce),{'type':_0x33f933,'key':_0x258e55,'errors':_0x78db9b}),this[_0x4e2f8c(0x1cf)]='OKDBSchemaValidationError',this[_0x4e2f8c(0x563)]=_0x33f933,this['key']=_0x258e55,this['errors']=_0x78db9b;}}class _0x1905fc extends _0x5a406e{constructor(_0x3e5dec,_0x402e34){const _0x597335=_0x3dbc;super(_0x597335(0x4e6)+_0x3e5dec+':\x20'+_0x402e34['length']+_0x597335(0xec),'SCHEMA_COLLECTION_INVALID',{'type':_0x3e5dec,'failures':_0x402e34}),this[_0x597335(0x1cf)]='OKDBSchemaCollectionError',this[_0x597335(0x563)]=_0x3e5dec,this[_0x597335(0x473)]=_0x402e34;}}class _0xb72527 extends _0x5a406e{constructor(_0x2b2432,_0x4c3eee,_0x93b8d3,_0x2ddf5f,_0x1578fb){const _0x91ca35=_0x3dbc;super(_0x91ca35(0x461)+_0x2b2432+'@'+_0x4c3eee+'.'+_0x93b8d3+_0x91ca35(0x66f)+_0x2ddf5f+'@'+_0x1578fb+'\x20which\x20does\x20not\x20exist',_0x91ca35(0x3a0),{'sourceType':_0x2b2432,'sourceKey':_0x4c3eee,'fieldPath':_0x93b8d3,'targetType':_0x2ddf5f,'targetKey':_0x1578fb}),this[_0x91ca35(0x1cf)]='OKDBForeignKeyError',this[_0x91ca35(0xba)]=_0x2b2432,this[_0x91ca35(0x1fa)]=_0x4c3eee,this['fieldPath']=_0x93b8d3,this['targetType']=_0x2ddf5f,this[_0x91ca35(0x21f)]=_0x1578fb;}}class _0x2e4cd2 extends _0x5a406e{constructor(_0x14af79,_0x70e480,_0x5153d7){const _0x120678=_0x3dbc;super(_0x120678(0x51e)+_0x14af79+'@'+_0x70e480+':\x20'+_0x5153d7[_0x120678(0x249)]+'\x20document(s)\x20reference\x20it\x20with\x20onDelete:restrict',_0x120678(0x2b5),{'targetType':_0x14af79,'targetKey':_0x70e480,'references':_0x5153d7}),this[_0x120678(0x1cf)]=_0x120678(0x49c),this['targetType']=_0x14af79,this[_0x120678(0x21f)]=_0x70e480,this['references']=_0x5153d7;}}class _0x23c6e6 extends _0x5a406e{constructor(_0xb8caab,_0xbf68d8,_0x50d0b9){const _0x4ee43c=_0x3dbc;super(_0x4ee43c(0x2aa)+_0xbf68d8+_0x4ee43c(0x15f)+_0xb8caab+_0x4ee43c(0x6cc)+_0x50d0b9[_0x4ee43c(0x539)](_0x17d4f4=>_0x17d4f4[_0x4ee43c(0x3c3)]+':'+_0x17d4f4['name'])['join'](',\x20'),'INDEX_HAS_CONSUMERS',{'type':_0xb8caab,'index':_0xbf68d8,'usedBy':_0x50d0b9}),this[_0x4ee43c(0x1cf)]=_0x4ee43c(0x312);}}return okdbError={'OKDBError':_0x5a406e,'OKDBVersionMismatchError':_0x31dae8,'OKDBNotFoundError':_0x580afc,'OKDBAlreadyExistsError':_0x2f574a,'OKDBInvalidIndexKeyError':_0x2e0be1,'OKDBInvalidPrimaryKeyError':_0x8e3bdb,'OKDBTypeNotRegisteredError':_0x44d941,'OKDBTypeAlreadyRegisteredError':_0x4d6dca,'OKDBIndexNotRegisteredError':_0x12c7d3,'OKDBIndexAlreadyRegisteredError':_0x1026b3,'OKDBInvalidValueError':_0x33b3cc,'OKDBUniqueConstraintError':_0x3e388d,'OKDBSchemaValidationError':_0x41d797,'OKDBSchemaCollectionError':_0x1905fc,'OKDBForeignKeyError':_0xb72527,'OKDBForeignKeyDeleteError':_0x2e4cd2,'OKDBIndexHasConsumersError':_0x23c6e6},okdbError;}var hasRequiredOkdbMigrate;function requireOkdbMigrate(){const _0x5aca23=_0x563deb;if(hasRequiredOkdbMigrate)return okdbMigrate[_0x5aca23(0x5d5)];hasRequiredOkdbMigrate=0x1;const _0x37aeb1=require$$0$1,_0x5c6e5f=require$$1,_0x922bf0=require$$2,{OKDBError:_0x106e9b}=requireOkdbError(),_0x430e29='header',_0x6e4a0f=_0x5aca23(0x215),_0xf535d0=_0x5aca23(0x155),_0xeb6d8b=_0x5aca23(0x527),_0x25cb6d=_0x5aca23(0x5d3),_0x236d2b=0x1f4,_0x2cff70=0x3e8,_0x1803d8=_0x5aca23(0x741);async function _0x313394(_0x30a055,_0x2144a3,_0x4b63e7,_0x347836){const _0x580355=_0x5aca23;if(_0x30a055){await _0x30a055[_0x580355(0x3c4)](_0x4b63e7,Boolean(_0x347836));return;}const _0x506137=_0x922bf0[_0x580355(0x472)](_0x2144a3,{'readOnly':!![],'maxDbs':0x8});try{await _0x506137[_0x580355(0x3c4)](_0x4b63e7,Boolean(_0x347836));}finally{await _0x506137[_0x580355(0x5b2)]();}}const _0x1c870f=()=>new Promise(_0x3e0e78=>setImmediate(_0x3e0e78));function _0x330ba8(_0x584a86,_0x307a97){const _0x269438=_0x5aca23;if(_0x584a86[_0x269438(0x360)](_0x307a97))return Promise['resolve']();return new Promise((_0x3b7681,_0x40cd1e)=>{const _0x117ee7=_0x269438,_0x19f2cd=_0x2f8c17=>{const _0x3c3123=_0x3dbc;_0x584a86[_0x3c3123(0x14d)]?.(_0x3c3123(0xa6),_0x23215e),_0x584a86[_0x3c3123(0x14d)]?.('error',_0x5305e4),_0x584a86[_0x3c3123(0x14d)]?.(_0x3c3123(0x5b2),_0x37ec03);if(_0x2f8c17)_0x40cd1e(_0x2f8c17);else _0x3b7681();},_0x23215e=()=>_0x19f2cd(),_0x5305e4=_0xc1560c=>_0x19f2cd(_0xc1560c),_0x37ec03=()=>_0x19f2cd(new Error(_0x117ee7(0xa9)));_0x584a86['once']('drain',_0x23215e),_0x584a86[_0x117ee7(0x572)](_0x117ee7(0x271),_0x5305e4),_0x584a86['once'](_0x117ee7(0x5b2),_0x37ec03);});}async function _0x345d57(_0x215f44,_0x1cd1af,_0x4017bd){const _0x59f2f5=_0x5aca23;let _0x3afa79=0x0,_0x5943c2,_0x5d253c=!![];for(;;){const _0x315445={'snapshot':!![],'limit':_0x2cff70};!_0x5d253c&&(_0x315445[_0x59f2f5(0x15c)]=_0x5943c2,_0x315445[_0x59f2f5(0x57c)]=!![]);_0x5d253c=![];const _0x50b332=Array[_0x59f2f5(0x4f7)](_0x1cd1af[_0x59f2f5(0x4fa)](_0x315445));if(_0x50b332[_0x59f2f5(0x249)]===0x0)break;let _0x2cd69c='';for(const _0x560177 of _0x50b332)_0x2cd69c+=_0x4017bd(_0x560177)+'\x0a';_0x5943c2=_0x50b332[_0x50b332[_0x59f2f5(0x249)]-0x1][_0x59f2f5(0x6eb)],_0x3afa79+=_0x50b332[_0x59f2f5(0x249)],await _0x330ba8(_0x215f44,_0x2cd69c);if(_0x50b332[_0x59f2f5(0x249)]<_0x2cff70)break;await _0x1c870f();}return _0x3afa79;}class _0x229b09{constructor(_0x3aa155){const _0x518911=_0x5aca23;this[_0x518911(0x11b)]=_0x3aa155;}[_0x5aca23(0x428)](_0x3e390f=_0x5aca23(0x34b)){const _0x5a8a15=_0x5aca23;return this[_0x5a8a15(0x11b)]['env'](_0x3e390f);}async[_0x5aca23(0x61f)](_0x16e50b=_0x5aca23(0x34b)){const _0x3364d3=_0x5aca23;return!this[_0x3364d3(0x11b)][_0x3364d3(0x1aa)][_0x3364d3(0xe5)](_0x16e50b)&&await this[_0x3364d3(0x11b)][_0x3364d3(0x6c1)](_0x16e50b,{'sync':!![]}),this[_0x3364d3(0x11b)]['env'](_0x16e50b);}[_0x5aca23(0x1e7)](_0x186541,_0x207ea5){const _0xc52833=_0x5aca23,_0x1c4cb7=[..._0x186541[_0xc52833(0x2a6)]['getKeys']()][_0xc52833(0x69e)](_0x31901c=>!_0x31901c['startsWith']('~')&&!_0x31901c[_0xc52833(0x334)]('__fts:'));if(!_0x207ea5)return _0x1c4cb7;return _0x1c4cb7['filter'](_0x3bd641=>_0x207ea5[_0xc52833(0x52b)](_0x3bd641));}[_0x5aca23(0x705)](_0x8d42c9,_0x19e4fd){const _0x143d4a=_0x5aca23,_0x42d67e=_0x8d42c9[_0x143d4a(0x67d)]['get'](_0x19e4fd),_0x5ea392=_0x8d42c9[_0x143d4a(0x2a6)][_0x143d4a(0x1ed)](_0x19e4fd)||{},_0xf727f2=[];for(const [,_0x1ae370]of _0x42d67e?.[_0x143d4a(0x6a9)]??new Map()){const _0x3f7d42={'fields':_0x1ae370[_0x143d4a(0x51a)]};if(_0x1ae370[_0x143d4a(0x3d6)])_0x3f7d42[_0x143d4a(0x65f)]=_0x1ae370[_0x143d4a(0x3d6)];if(_0x1ae370['unique'])_0x3f7d42['unique']=!![];_0xf727f2[_0x143d4a(0x39b)](_0x3f7d42);}const _0xc22a25={};for(const [_0x1e092d,_0x32fc2d]of Object[_0x143d4a(0x707)](_0x5ea392['ftsIndexes']||{})){_0xc22a25[_0x1e092d]={'fields':_0x32fc2d['config']?.[_0x143d4a(0xfe)],'tokenizer':_0x32fc2d[_0x143d4a(0x5df)]?.[_0x143d4a(0x709)]};}const _0x1baa6c={'indexes':_0xf727f2,'ftsIndexes':_0xc22a25};return _0x5ea392[_0x143d4a(0x155)]&&(_0x1baa6c[_0x143d4a(0x155)]=_0x5ea392[_0x143d4a(0x155)]),_0x1baa6c;}async[_0x5aca23(0x3d1)](_0x1bd61b,_0x46f3a1={}){const _0x4dbafe=_0x5aca23,{envName:envName=_0x4dbafe(0x34b),types:types=null,includeChanges:includeChanges=![],_noHeader:_noHeader=![]}=_0x46f3a1,_0x56cdd5=this[_0x4dbafe(0x428)](envName),_0x434ac3=this[_0x4dbafe(0x1e7)](_0x56cdd5,types);let _0x399c43=0x0,_0x87c432=0x0;!_noHeader&&await _0x330ba8(_0x1bd61b,JSON[_0x4dbafe(0x316)]({'r':_0x430e29,'kdbVersion':require$$3[_0x4dbafe(0x276)],'exportedAt':Date['now'](),'envName':envName})+'\x0a');for(const _0x5764ac of _0x434ac3){const _0x43f2bd=_0x56cdd5[_0x4dbafe(0x67d)][_0x4dbafe(0x1ed)](_0x5764ac);if(!_0x43f2bd)continue;const _0x42a577=this[_0x4dbafe(0x705)](_0x56cdd5,_0x5764ac);await _0x330ba8(_0x1bd61b,JSON['stringify']({'r':_0xf535d0,'type':_0x5764ac,..._0x42a577})+'\x0a'),_0x399c43+=await _0x345d57(_0x1bd61b,_0x43f2bd['data'],({key:_0x19679d,value:_0x504b9c,version:_0x11b26e})=>JSON[_0x4dbafe(0x316)]({'r':_0xeb6d8b,'t':_0x5764ac,'k':_0x19679d,'v':_0x504b9c,'ver':_0x11b26e}));}return includeChanges&&_0x56cdd5['_sync']&&(_0x87c432=await _0x345d57(_0x1bd61b,_0x56cdd5[_0x4dbafe(0x26b)],({key:_0x39b272,value:_0x20d7e6})=>JSON['stringify']({'r':_0x25cb6d,'clock':_0x39b272,'event':_0x20d7e6}))),{'types':_0x434ac3[_0x4dbafe(0x249)],'records':_0x399c43,'changes':_0x87c432};}async[_0x5aca23(0x478)](_0x2bab52,_0x4f982d={}){const _0x409b38=_0x5aca23;_0x37aeb1[_0x409b38(0x180)](_0x5c6e5f[_0x409b38(0x283)](_0x2bab52),{'recursive':!![]});const _0x44dda0=_0x37aeb1[_0x409b38(0x654)](_0x2bab52),_0x4ede59=await this['exportToStream'](_0x44dda0,_0x4f982d);return await new Promise((_0x229c00,_0x585235)=>{const _0xd19b5e=_0x409b38;_0x44dda0['end'](),_0x44dda0[_0xd19b5e(0x572)]('finish',_0x229c00),_0x44dda0['once']('error',_0x585235);}),{..._0x4ede59,'filePath':_0x2bab52};}async[_0x5aca23(0x287)](_0x25e994,_0x3716a5={}){const _0x5bbc6d=_0x5aca23,{envNames:envNames=null,types:types=null,includeChanges:includeChanges=![]}=_0x3716a5,_0xa10c3e=[...this[_0x5bbc6d(0x11b)][_0x5bbc6d(0x1aa)][_0x5bbc6d(0x2b3)]()]['filter'](_0xe5fa56=>!_0xe5fa56[_0x5bbc6d(0x334)]('~')),_0x134ff7=envNames?_0xa10c3e[_0x5bbc6d(0x69e)](_0x4df0bf=>envNames[_0x5bbc6d(0x52b)](_0x4df0bf)):_0xa10c3e;await _0x330ba8(_0x25e994,JSON[_0x5bbc6d(0x316)]({'r':_0x430e29,'kdbVersion':require$$3['version'],'exportedAt':Date[_0x5bbc6d(0x28a)](),'envNames':_0x134ff7})+'\x0a');let _0x189118=0x0,_0x214e3e=0x0,_0x1e8d20=0x0;for(const _0x1c4bea of _0x134ff7){await _0x330ba8(_0x25e994,JSON[_0x5bbc6d(0x316)]({'r':_0x6e4a0f,'name':_0x1c4bea})+'\x0a');const _0xba7218=await this[_0x5bbc6d(0x3d1)](_0x25e994,{'envName':_0x1c4bea,'types':types,'includeChanges':includeChanges,'_noHeader':!![]});_0x189118+=_0xba7218[_0x5bbc6d(0x199)],_0x214e3e+=_0xba7218[_0x5bbc6d(0x613)],_0x1e8d20+=_0xba7218[_0x5bbc6d(0x700)];}return{'envs':_0x134ff7[_0x5bbc6d(0x249)],'types':_0x189118,'records':_0x214e3e,'changes':_0x1e8d20};}async[_0x5aca23(0x338)](_0x397856,_0x1db211={}){const _0x2f5398=_0x5aca23,{envName:_0x4471e5=null,types:_0x3878d7=null,dropExisting:dropExisting=![],batchSize:batchSize=_0x236d2b,includeChanges:includeChanges=![],onProgress:onProgress=null}=_0x1db211;let _0x4a3db8=_0x4471e5??_0x2f5398(0x34b),_0x5e70fc=null,_0x396e83=0x0,_0x3ff519=0x0,_0x467e50=0x0,_0x3f7dbc=null,_0xfdaffa=[];const _0x2c8aa9=[],_0x57cd52=async()=>{const _0x2a7aac=_0x2f5398;if(!_0xfdaffa['length']||!_0x3f7dbc||!_0x5e70fc)return;await _0x5e70fc[_0x2a7aac(0x387)][_0x2a7aac(0x4ba)](()=>{const _0x595484=_0x2a7aac;for(const {k:_0xff25c3,v:_0x2c2e05,ver:_0x396d8d}of _0xfdaffa){_0x5e70fc['_put'](null,_0x3f7dbc,_0xff25c3,_0x2c2e05,{'version':_0x396d8d,'origin':_0x595484(0x67a)});}}),_0x3ff519+=_0xfdaffa[_0x2a7aac(0x249)],onProgress?.({'type':_0x3f7dbc,'count':_0x3ff519}),_0xfdaffa=[];};await this[_0x2f5398(0x117)](_0x397856,async _0x4725b2=>{const _0x4b81c2=_0x2f5398,_0x102109=_0x4725b2['r'];if(_0x102109===_0x430e29){if(!_0x4471e5&&_0x4725b2['envName'])_0x4a3db8=_0x4725b2['envName'];_0x5e70fc=await this['_resolveOrCreateEnv'](_0x4a3db8);return;}if(!_0x5e70fc)_0x5e70fc=await this['_resolveOrCreateEnv'](_0x4a3db8);if(_0x102109===_0x6e4a0f){await _0x57cd52(),_0x3f7dbc=null,_0x4a3db8=_0x4471e5??_0x4725b2[_0x4b81c2(0x1cf)],_0x5e70fc=await this[_0x4b81c2(0x61f)](_0x4a3db8);return;}if(_0x102109===_0xf535d0){const {type:_0x1fcd9c,indexes:indexes=[],ftsIndexes:ftsIndexes={},schema:_0x3a4e9a}=_0x4725b2;if(_0x3878d7&&!_0x3878d7[_0x4b81c2(0x52b)](_0x1fcd9c))return;await _0x57cd52(),_0x3f7dbc=_0x1fcd9c;dropExisting&&_0x5e70fc[_0x4b81c2(0x135)](_0x1fcd9c)&&await _0x5e70fc[_0x4b81c2(0x466)](_0x1fcd9c);!_0x5e70fc[_0x4b81c2(0x135)](_0x1fcd9c)&&(await _0x5e70fc[_0x4b81c2(0x30b)](_0x1fcd9c),_0x396e83++);for(const _0x5a3d42 of indexes){if(!_0x5e70fc[_0x4b81c2(0x653)](_0x1fcd9c,_0x5a3d42[_0x4b81c2(0xfe)])){const _0x4ce280={};_0x5a3d42[_0x4b81c2(0x65f)]&&(_0x4ce280[_0x4b81c2(0x563)]=_0x4b81c2(0x65f),_0x4ce280[_0x4b81c2(0x556)]=_0x5a3d42[_0x4b81c2(0x65f)][_0x4b81c2(0x556)]);if(_0x5a3d42[_0x4b81c2(0x3b0)])_0x4ce280[_0x4b81c2(0x3b0)]=!![];await _0x5e70fc[_0x4b81c2(0x1a0)](_0x1fcd9c,_0x5a3d42[_0x4b81c2(0xfe)],_0x4ce280);}}for(const [_0x47450c,_0xa3ba33]of Object[_0x4b81c2(0x707)](ftsIndexes)){!this['okdb'][_0x4b81c2(0x6b5)][_0x4b81c2(0xe5)](_0x1fcd9c,_0x47450c,_0x5e70fc)&&await this[_0x4b81c2(0x11b)]['fts'][_0x4b81c2(0x465)](_0x1fcd9c,_0x47450c,{'fields':_0xa3ba33[_0x4b81c2(0xfe)],'tokenizer':_0xa3ba33[_0x4b81c2(0x709)]},undefined,_0x5e70fc);}_0x3a4e9a?.['definition']&&_0x2c8aa9[_0x4b81c2(0x39b)]({'env':_0x5e70fc,'type':_0x1fcd9c,'schema':_0x3a4e9a});return;}if(_0x102109===_0xeb6d8b){if(_0x3878d7&&!_0x3878d7[_0x4b81c2(0x52b)](_0x4725b2['t']))return;_0x4725b2['t']!==_0x3f7dbc&&(await _0x57cd52(),_0x3f7dbc=_0x4725b2['t']);_0xfdaffa['push']({'k':_0x4725b2['k'],'v':_0x4725b2['v'],'ver':_0x4725b2['ver']});if(_0xfdaffa[_0x4b81c2(0x249)]>=batchSize)await _0x57cd52();return;}_0x102109===_0x25cb6d&&includeChanges&&_0x5e70fc[_0x4b81c2(0x209)]&&(_0x5e70fc['clockToChangeDb'][_0x4b81c2(0x23c)](_0x4725b2[_0x4b81c2(0x600)],_0x4725b2[_0x4b81c2(0x311)]),_0x467e50++);}),await _0x57cd52();for(const {env:_0x22b380,type:_0x4f3c11,schema:_0xe8817}of _0x2c8aa9){try{await _0x22b380[_0x2f5398(0x1af)](_0x4f3c11,_0xe8817);}catch{if(_0xe8817['enforce'])try{await _0x22b380['setSchema'](_0x4f3c11,{..._0xe8817,'enforce':![]});}catch{}}}return{'types':_0x396e83,'records':_0x3ff519,'changes':_0x467e50};}async[_0x5aca23(0x5f1)](_0x4ae34c,_0x5edfdd={}){const _0x55a3c3=_0x5aca23,_0x4b61e9=_0x37aeb1[_0x55a3c3(0x65a)](_0x4ae34c,{'encoding':'utf8'});return this[_0x55a3c3(0x338)](_0x4b61e9,_0x5edfdd);}[_0x5aca23(0x117)](_0x5ed003,_0x58b133){return new Promise((_0x2affe8,_0x1672a0)=>{const _0x1d8d90=_0x3dbc;let _0x38132e='',_0x2d06e9=Promise[_0x1d8d90(0x429)]();const _0x2fb068=async _0xa35105=>{const _0x321da7=_0x1d8d90;_0x38132e+=_0xa35105;const _0x4082fc=_0x38132e[_0x321da7(0x48b)]('\x0a');_0x38132e=_0x4082fc[_0x321da7(0xb6)]();for(const _0x400fb1 of _0x4082fc){const _0x5e0baa=_0x400fb1['trim']();if(!_0x5e0baa)continue;let _0x50709d;try{_0x50709d=JSON[_0x321da7(0x2fd)](_0x5e0baa);}catch{continue;}await _0x58b133(_0x50709d);}};_0x5ed003['on'](_0x1d8d90(0x527),_0x4f151d=>{const _0xdabe36=_0x1d8d90;_0x2d06e9=_0x2d06e9[_0xdabe36(0x722)](()=>_0x2fb068(String(_0x4f151d)));}),_0x5ed003['on']('end',()=>{const _0x5cc477=_0x1d8d90;_0x2d06e9['then'](async()=>{const _0x306569=_0x3dbc,_0x50123e=_0x38132e[_0x306569(0x541)]();if(_0x50123e)try{await _0x58b133(JSON['parse'](_0x50123e));}catch{}_0x2affe8();})[_0x5cc477(0x4ec)](_0x1672a0);}),_0x5ed003['on'](_0x1d8d90(0x271),_0x1672a0);});}async[_0x5aca23(0x3c4)](_0x25d09f,_0x2983b9={}){const _0xf34eb1=_0x5aca23,{envNames:envNames=null,compact:compact=!![]}=_0x2983b9,_0x417b15=this[_0xf34eb1(0x11b)],_0x2e75c9=_0x5c6e5f[_0xf34eb1(0x429)](_0x417b15[_0xf34eb1(0x5a4)]),_0xe608ec=_0x5c6e5f[_0xf34eb1(0x429)](_0x25d09f),_0x4525dc=_0x5c6e5f[_0xf34eb1(0x607)](_0x2e75c9,_0xe608ec);if(_0x4525dc===''||!(_0x4525dc[_0xf34eb1(0x334)]('..')||_0x5c6e5f[_0xf34eb1(0x396)](_0x4525dc)))throw new _0x106e9b('backup\x20destination\x20\x22'+_0xe608ec+'\x22\x20is\x20inside\x20the\x20store\x20\x22'+_0x2e75c9+_0xf34eb1(0x561),_0xf34eb1(0x57b));if(_0x37aeb1[_0xf34eb1(0x525)](_0xe608ec)&&_0x37aeb1[_0xf34eb1(0x132)](_0xe608ec)['length']>0x0)throw new _0x106e9b('backup\x20destination\x20\x22'+_0xe608ec+_0xf34eb1(0x66a),_0xf34eb1(0x441));_0x37aeb1['mkdirSync'](_0xe608ec,{'recursive':!![]});const _0xbb2bbb=envNames?new Set([...envNames,_0xf34eb1(0x43d)]):null,_0x5c6bcb=[],_0x46c026=[],_0x3cd987=[];for(const [_0x5399e9,_0xfb36b2]of[..._0x417b15[_0xf34eb1(0x1aa)][_0xf34eb1(0x707)]()]){if(_0xbb2bbb&&!_0xbb2bbb['has'](_0x5399e9))continue;if(_0x5399e9===_0xf34eb1(0x521))continue;if(!_0xfb36b2['_isOpen']||!_0xfb36b2['db']){_0x46c026[_0xf34eb1(0x39b)]({'name':_0x5399e9,'reason':_0xf34eb1(0xcc)});continue;}const _0x211f1e=_0x5c6e5f['resolve'](_0xfb36b2[_0xf34eb1(0x5a4)]),_0x457daf=_0x5c6e5f[_0xf34eb1(0x607)](_0x2e75c9,_0x211f1e),_0x374f05=_0x457daf===''||_0x457daf['startsWith']('..')||_0x5c6e5f['isAbsolute'](_0x457daf),_0x338ad0=_0x374f05?_0x417b15['_safeEnvDirName'](_0x5399e9):_0x457daf,_0x40eb2e=_0x5c6e5f[_0xf34eb1(0x139)](_0xe608ec,_0x338ad0);_0x37aeb1[_0xf34eb1(0x180)](_0x40eb2e,{'recursive':!![]});const _0x5d30b5=_0x5c6e5f[_0xf34eb1(0x139)](_0x211f1e,_0xf34eb1(0x357));let _0x47fd8b=![];if(_0x37aeb1[_0xf34eb1(0x525)](_0x5c6e5f[_0xf34eb1(0x139)](_0x5d30b5,_0xf34eb1(0x13a)))){const _0x16ba3a=_0x5c6e5f[_0xf34eb1(0x139)](_0x40eb2e,'time-machine');_0x37aeb1[_0xf34eb1(0x180)](_0x16ba3a,{'recursive':!![]}),await _0x313394(_0xfb36b2[_0xf34eb1(0x72f)]?.[_0xf34eb1(0x5cb)]?.['db'],_0x5d30b5,_0x16ba3a,compact),_0x47fd8b=!![];}let _0x3f86d8=0x0;try{_0x3f86d8=_0x37aeb1[_0xf34eb1(0x493)](_0x5c6e5f[_0xf34eb1(0x139)](_0x211f1e,'data.mdb'))[_0xf34eb1(0xd1)];}catch{}await _0xfb36b2['db']['backup'](_0x40eb2e,Boolean(compact));let _0x356220=0x0;try{_0x356220=_0x37aeb1[_0xf34eb1(0x493)](_0x5c6e5f[_0xf34eb1(0x139)](_0x40eb2e,_0xf34eb1(0x13a)))[_0xf34eb1(0xd1)];}catch{}_0x5c6bcb[_0xf34eb1(0x39b)]({'name':_0x5399e9,'dest':_0x40eb2e,'sizeBefore':_0x3f86d8,'sizeAfter':_0x356220,'timeMachine':_0x47fd8b}),_0x3cd987[_0xf34eb1(0x39b)]({'name':_0x5399e9,'dir':_0x338ad0,'timeMachine':_0x47fd8b,..._0x374f05?{'outOfTree':_0x374f05,'sourcePath':_0x211f1e}:{}});}for(const [_0x2d72ab,_0x478126]of _0x417b15[_0xf34eb1(0x540)]??[]){if(_0xbb2bbb&&!_0xbb2bbb[_0xf34eb1(0xe5)](_0x2d72ab))continue;_0x46c026[_0xf34eb1(0x39b)]({'name':_0x2d72ab,'reason':_0xf34eb1(0x649)+(_0x478126?.[_0xf34eb1(0x271)]??_0xf34eb1(0x59d))});}const _0x1d8091={'count':0x0,'bytes':0x0},_0x28bd6e=_0x417b15['files']?.[_0xf34eb1(0x6bd)];_0x28bd6e&&_0x37aeb1[_0xf34eb1(0x525)](_0x28bd6e)&&await this[_0xf34eb1(0x420)](_0x28bd6e,_0x5c6e5f[_0xf34eb1(0x139)](_0xe608ec,_0xf34eb1(0x534)),_0x1d8091,(_0x332396,_0x19354c)=>_0x19354c===0x0&&_0x332396==='tmp');const _0x295a3a=_0x5c6e5f[_0xf34eb1(0x139)](_0xe608ec,_0x1803d8),_0x1b2622={'format':0x1,'okdbVersion':require$$3[_0xf34eb1(0x276)],'createdAt':new Date()['toISOString'](),'source':_0x2e75c9,'compact':Boolean(compact),'envs':_0x3cd987,'blobs':_0x1d8091,'skipped':_0x46c026,'excluded':{'~fts':_0xf34eb1(0x5e1),'~processes':'live\x20process\x20registry;\x20disposable'}};return _0x37aeb1[_0xf34eb1(0x5b6)](_0x295a3a,JSON[_0xf34eb1(0x316)](_0x1b2622,null,0x2)+'\x0a'),{'ok':!![],'dest':_0xe608ec,'envs':_0x5c6bcb,'blobs':_0x1d8091,'skipped':_0x46c026,'manifest':_0x295a3a};}[_0x5aca23(0x273)](){const _0x28aa0d=_0x5aca23,_0x4b651a=this[_0x28aa0d(0x11b)][_0x28aa0d(0x2d9)]?.[_0x28aa0d(0x3c4)]?.[_0x28aa0d(0x57e)];if(_0x4b651a)return _0x5c6e5f[_0x28aa0d(0x429)](_0x4b651a);const _0xb081cb=_0x5c6e5f[_0x28aa0d(0x429)](this[_0x28aa0d(0x11b)][_0x28aa0d(0x5a4)]);return _0x5c6e5f[_0x28aa0d(0x139)](_0x5c6e5f['dirname'](_0xb081cb),_0x5c6e5f[_0x28aa0d(0x559)](_0xb081cb)+_0x28aa0d(0x232));}[_0x5aca23(0x3c9)](_0xa3eb9c){const _0x2bed94=_0x5aca23,_0xacda0=this['backupRoot']();_0x37aeb1['mkdirSync'](_0xacda0,{'recursive':!![]});const _0x3eb6f5=_0x37aeb1[_0x2bed94(0x41b)](_0xacda0),_0x3e962f=_0xa3eb9c==null||String(_0xa3eb9c)['trim']()===''?_0x2bed94(0x46b)+new Date()[_0x2bed94(0x3c2)]()[_0x2bed94(0x176)](/[:.]/g,'-'):String(_0xa3eb9c)[_0x2bed94(0x541)](),_0x477019=_0x5c6e5f[_0x2bed94(0x429)](_0xacda0,_0x3e962f);let _0x5d4c76=_0x477019;const _0x1f692f=[];while(!_0x37aeb1[_0x2bed94(0x525)](_0x5d4c76)){_0x1f692f[_0x2bed94(0x646)](_0x5c6e5f[_0x2bed94(0x559)](_0x5d4c76));const _0x198229=_0x5c6e5f[_0x2bed94(0x283)](_0x5d4c76);if(_0x198229===_0x5d4c76)break;_0x5d4c76=_0x198229;}const _0x3da660=_0x5c6e5f[_0x2bed94(0x139)](_0x37aeb1[_0x2bed94(0x41b)](_0x5d4c76),..._0x1f692f),_0x44750c=_0x5c6e5f['relative'](_0x3eb6f5,_0x3da660);if(_0x44750c===''||_0x44750c['startsWith']('..')||_0x5c6e5f[_0x2bed94(0x396)](_0x44750c))throw new _0x106e9b(_0x2bed94(0x706)+_0x3e962f+'\x22\x20resolves\x20outside\x20the\x20backup\x20root\x20\x22'+_0xacda0+_0x2bed94(0x1db),_0x2bed94(0x340),{'root':_0xacda0,'destDir':_0x3e962f});return{'root':_0xacda0,'dest':_0x3da660};}async[_0x5aca23(0x420)](_0x112295,_0x11abce,_0x63ee3={'count':0x0,'bytes':0x0},_0x5b8ec9=null,_0x4bb0f6=0x0){const _0x1ecf10=_0x5aca23;_0x37aeb1[_0x1ecf10(0x180)](_0x11abce,{'recursive':!![]});for(const _0x313a4e of _0x37aeb1[_0x1ecf10(0x132)](_0x112295,{'withFileTypes':!![]})){if(_0x5b8ec9?.(_0x313a4e[_0x1ecf10(0x1cf)],_0x4bb0f6))continue;const _0x2bc8cd=_0x5c6e5f[_0x1ecf10(0x139)](_0x112295,_0x313a4e[_0x1ecf10(0x1cf)]),_0x5827ed=_0x5c6e5f[_0x1ecf10(0x139)](_0x11abce,_0x313a4e[_0x1ecf10(0x1cf)]);if(_0x313a4e[_0x1ecf10(0x2d7)]())await this['_copyDir'](_0x2bc8cd,_0x5827ed,_0x63ee3,_0x5b8ec9,_0x4bb0f6+0x1);else{try{await _0x37aeb1['promises'][_0x1ecf10(0x300)](_0x2bc8cd,_0x5827ed);}catch(_0x40741b){if(_0x40741b?.[_0x1ecf10(0x5f2)]==='ENOENT')continue;throw _0x40741b;}_0x63ee3[_0x1ecf10(0x417)]++;try{_0x63ee3[_0x1ecf10(0x4de)]+=_0x37aeb1[_0x1ecf10(0x493)](_0x5827ed)[_0x1ecf10(0xd1)];}catch{}}}return _0x63ee3;}async[_0x5aca23(0x579)](_0x5a9164={}){const _0x32c7d4=_0x5aca23,{envName:envName=_0x32c7d4(0x34b),types:types=null,includeChanges:includeChanges=![]}=_0x5a9164,_0x412c2e={'types':{},'changes':[]},_0x4a6f2d=[],_0x5638b7=new require$$5[(_0x32c7d4(0xd8))]({'write'(_0x585fc2,_0x415217,_0xfca26d){const _0x3f042e=_0x32c7d4;_0x4a6f2d[_0x3f042e(0x39b)](String(_0x585fc2)),_0xfca26d();}});await this[_0x32c7d4(0x3d1)](_0x5638b7,{'envName':envName,'types':types,'includeChanges':includeChanges});for(const _0x1e02bf of _0x4a6f2d[_0x32c7d4(0x139)]('')['split']('\x0a')){const _0x2d3b20=_0x1e02bf[_0x32c7d4(0x541)]();if(!_0x2d3b20)continue;let _0x5a24dc;try{_0x5a24dc=JSON[_0x32c7d4(0x2fd)](_0x2d3b20);}catch{continue;}if(_0x5a24dc['r']===_0xf535d0){if(!_0x412c2e[_0x32c7d4(0x199)][_0x5a24dc[_0x32c7d4(0x563)]])_0x412c2e[_0x32c7d4(0x199)][_0x5a24dc['type']]={'entries':[]};if(_0x5a24dc[_0x32c7d4(0x2fc)])_0x412c2e['types'][_0x5a24dc[_0x32c7d4(0x563)]][_0x32c7d4(0x2fc)]=_0x5a24dc[_0x32c7d4(0x2fc)];if(_0x5a24dc['ftsIndexes'])_0x412c2e['types'][_0x5a24dc[_0x32c7d4(0x563)]][_0x32c7d4(0x743)]=_0x5a24dc[_0x32c7d4(0x743)];if(_0x5a24dc[_0x32c7d4(0x155)])_0x412c2e['types'][_0x5a24dc[_0x32c7d4(0x563)]][_0x32c7d4(0x155)]=_0x5a24dc['schema'];}else{if(_0x5a24dc['r']===_0xeb6d8b){if(!_0x412c2e[_0x32c7d4(0x199)][_0x5a24dc['t']])_0x412c2e[_0x32c7d4(0x199)][_0x5a24dc['t']]={'entries':[]};_0x412c2e[_0x32c7d4(0x199)][_0x5a24dc['t']][_0x32c7d4(0x707)][_0x32c7d4(0x39b)]({'key':_0x5a24dc['k'],'value':_0x5a24dc['v'],'version':_0x5a24dc[_0x32c7d4(0x332)]});}else _0x5a24dc['r']===_0x25cb6d&&_0x412c2e[_0x32c7d4(0x700)][_0x32c7d4(0x39b)]({'clock':_0x5a24dc[_0x32c7d4(0x600)],'event':_0x5a24dc['event']});}}return _0x412c2e;}async['import'](_0x5f5d73,_0x3d7245={}){const _0x12e5a9=_0x5aca23,_0x5dbf08=[];for(const [_0x80562f,_0xd4b2c7]of Object[_0x12e5a9(0x707)](_0x5f5d73[_0x12e5a9(0x199)]||{})){const _0x6abbfa={'r':_0xf535d0,'type':_0x80562f,'indexes':_0xd4b2c7['indexes']||[],'ftsIndexes':_0xd4b2c7[_0x12e5a9(0x743)]||{}};if(_0xd4b2c7[_0x12e5a9(0x155)])_0x6abbfa[_0x12e5a9(0x155)]=_0xd4b2c7['schema'];_0x5dbf08[_0x12e5a9(0x39b)](JSON[_0x12e5a9(0x316)](_0x6abbfa));for(const {key:_0x5b28dd,value:_0x592193,version:_0x5aebf3}of _0xd4b2c7[_0x12e5a9(0x707)]||[]){_0x5dbf08[_0x12e5a9(0x39b)](JSON[_0x12e5a9(0x316)]({'r':_0xeb6d8b,'t':_0x80562f,'k':_0x5b28dd,'v':_0x592193,'ver':_0x5aebf3}));}}for(const {clock:_0x5bf092,event:_0x3e350d}of _0x5f5d73[_0x12e5a9(0x700)]||[]){_0x5dbf08['push'](JSON[_0x12e5a9(0x316)]({'r':_0x25cb6d,'clock':_0x5bf092,'event':_0x3e350d}));}const {Readable:_0x2f9e35}=require$$5,_0x1bc075=_0x2f9e35[_0x12e5a9(0x4f7)](_0x5dbf08[_0x12e5a9(0x139)]('\x0a')+'\x0a');return this[_0x12e5a9(0x338)](_0x1bc075,{..._0x3d7245,'dropExisting':_0x3d7245['dropExisting']??!![]});}async['exportJSON']({pretty:pretty=![]}={}){const _0x46f4a5=_0x5aca23,_0x257f89=await this[_0x46f4a5(0x579)]();return JSON[_0x46f4a5(0x316)](_0x257f89,null,pretty?0x2:0x0);}async[_0x5aca23(0x2f4)](_0x5f4884){const _0x5bc75a=_0x5aca23,_0xa25a=JSON[_0x5bc75a(0x2fd)](_0x5f4884);return this[_0x5bc75a(0x67a)](_0xa25a);}async[_0x5aca23(0x146)](_0x56ebe4){const _0x4c93d0=_0x5aca23;if(!this[_0x4c93d0(0x11b)][_0x4c93d0(0x510)])throw new Error(_0x4c93d0(0x4ae));const _0xa89ec6=this[_0x4c93d0(0x11b)][_0x4c93d0(0x510)][_0x4c93d0(0x6bd)];let _0x27fb68=0x0,_0x1d544f=0x0;const _0x2794df=_0x3eda8c=>{const _0x520b5c=_0x4c93d0;if(!_0x37aeb1[_0x520b5c(0x525)](_0x3eda8c))return;for(const _0x21cf65 of _0x37aeb1[_0x520b5c(0x132)](_0x3eda8c,{'withFileTypes':!![]})){const _0x6ddc1b=_0x5c6e5f['join'](_0x3eda8c,_0x21cf65['name']);if(_0x21cf65[_0x520b5c(0x2d7)]()){if(_0x21cf65[_0x520b5c(0x1cf)]===_0x520b5c(0x3f8))continue;_0x2794df(_0x6ddc1b);}else{const _0x273042=_0x5c6e5f[_0x520b5c(0x559)](_0x5c6e5f[_0x520b5c(0x283)](_0x6ddc1b)),_0x53a9cb=_0x273042+_0x21cf65['name'],_0x140b0c=_0x5c6e5f[_0x520b5c(0x139)](_0x56ebe4,_0x53a9cb[_0x520b5c(0x3e6)](0x0,0x2)),_0x4db279=_0x5c6e5f[_0x520b5c(0x139)](_0x140b0c,_0x53a9cb[_0x520b5c(0x3e6)](0x2));_0x37aeb1[_0x520b5c(0x180)](_0x140b0c,{'recursive':!![]}),_0x37aeb1[_0x520b5c(0x30a)](_0x6ddc1b,_0x4db279),_0x27fb68++;try{_0x1d544f+=_0x37aeb1['statSync'](_0x6ddc1b)[_0x520b5c(0xd1)];}catch{}}}};return _0x37aeb1[_0x4c93d0(0x180)](_0x56ebe4,{'recursive':!![]}),_0x2794df(_0xa89ec6),{'count':_0x27fb68,'bytes':_0x1d544f};}async[_0x5aca23(0x601)](_0x437aa7){const _0x476d25=_0x5aca23;if(!this[_0x476d25(0x11b)][_0x476d25(0x510)])throw new Error('files\x20feature\x20not\x20available');await this[_0x476d25(0x11b)][_0x476d25(0x510)][_0x476d25(0x21e)]();let _0x3b4c88=0x0,_0x1966d0=0x0;const _0x31caab=_0x266e1c=>{const _0x30781f=_0x476d25;if(!_0x37aeb1[_0x30781f(0x525)](_0x266e1c))return;for(const _0x594833 of _0x37aeb1['readdirSync'](_0x266e1c,{'withFileTypes':!![]})){const _0x3835b7=_0x5c6e5f[_0x30781f(0x139)](_0x266e1c,_0x594833['name']);if(_0x594833['isDirectory']())_0x31caab(_0x3835b7);else{const _0x52853e=_0x5c6e5f[_0x30781f(0x559)](_0x5c6e5f[_0x30781f(0x283)](_0x3835b7)),_0x1fc91b=_0x52853e+_0x594833[_0x30781f(0x1cf)],_0x2a82c7=this[_0x30781f(0x11b)]['files'][_0x30781f(0x3bb)](_0x1fc91b);if(_0x37aeb1[_0x30781f(0x525)](_0x2a82c7)){_0x1966d0++;continue;}const _0x25cda3=_0x5c6e5f['dirname'](_0x2a82c7);_0x37aeb1['mkdirSync'](_0x25cda3,{'recursive':!![]}),_0x37aeb1['copyFileSync'](_0x3835b7,_0x2a82c7);const _0x2b95c9=this[_0x30781f(0x11b)][_0x30781f(0x510)][_0x30781f(0x6d0)](_0x1fc91b);this[_0x30781f(0x11b)][_0x30781f(0x510)][_0x30781f(0x610)]?.['putSync'](_0x1fc91b,{'refs':_0x2b95c9}),_0x3b4c88++;}}};return _0x31caab(_0x437aa7),{'imported':_0x3b4c88,'skipped':_0x1966d0};}['_allEnvsWithFiles'](){const _0x525489=_0x5aca23,_0x1a0e3f=[];for(const [,_0x95d12d]of this[_0x525489(0x11b)][_0x525489(0x1aa)]){if(_0x95d12d[_0x525489(0x209)]&&_0x95d12d[_0x525489(0x135)](_0x525489(0x3af)))_0x1a0e3f['push'](_0x95d12d);}return _0x1a0e3f;}async[_0x5aca23(0x4e0)](){const _0x4ac21a=_0x5aca23;if(!this['okdb'][_0x4ac21a(0x510)])throw new Error(_0x4ac21a(0x4ae));await this['okdb'][_0x4ac21a(0x510)]['_ensure']();const _0x196370=[],_0xa63011=this[_0x4ac21a(0x11b)][_0x4ac21a(0x510)];for(const _0x520785 of this[_0x4ac21a(0x275)]()){for(const {key:_0x5cc5c9,value:_0x18668b}of _0x520785[_0x4ac21a(0x4fa)](_0x4ac21a(0x3af))){if(!_0x18668b[_0x4ac21a(0x62a)])continue;const _0x5c0ff7=_0xa63011['_blobPath'](_0x18668b[_0x4ac21a(0x62a)]);!_0x37aeb1[_0x4ac21a(0x525)](_0x5c0ff7)&&_0x196370[_0x4ac21a(0x39b)]({'type':'missing_blob','env':_0x520785['name'],'id':String(_0x5cc5c9),'hash':_0x18668b[_0x4ac21a(0x62a)],'message':_0x4ac21a(0x1ee)+_0x5cc5c9+_0x4ac21a(0x2cd)+_0x520785[_0x4ac21a(0x1cf)]+'\x22\x20(hash:\x20'+_0x18668b[_0x4ac21a(0x62a)][_0x4ac21a(0x3e6)](0x0,0x8)+'…)'});const _0xd83d28=_0xa63011['_blobStatusDb']?.[_0x4ac21a(0x1ed)](_0x18668b[_0x4ac21a(0x62a)]);(!_0xd83d28||_0xd83d28[_0x4ac21a(0x4f0)]<=0x0)&&_0x196370[_0x4ac21a(0x39b)]({'type':_0x4ac21a(0x224),'env':_0x520785['name'],'id':String(_0x5cc5c9),'hash':_0x18668b['hash'],'message':_0x4ac21a(0x676)+_0x5cc5c9+_0x4ac21a(0x2cd)+_0x520785[_0x4ac21a(0x1cf)]+_0x4ac21a(0x2f1)+_0x18668b['hash'][_0x4ac21a(0x3e6)](0x0,0x8)+'…)'});}}const _0x42a218=new Set();for(const _0x33509b of this[_0x4ac21a(0x275)]()){for(const {value:_0x53ab49}of _0x33509b[_0x4ac21a(0x4fa)]('~files')){if(_0x53ab49[_0x4ac21a(0x62a)])_0x42a218[_0x4ac21a(0x32e)](_0x53ab49[_0x4ac21a(0x62a)]);}}const _0x326aeb=_0x984ec3=>{const _0x3ce8e8=_0x4ac21a;if(!_0x37aeb1[_0x3ce8e8(0x525)](_0x984ec3))return;for(const _0x5e7453 of _0x37aeb1[_0x3ce8e8(0x132)](_0x984ec3,{'withFileTypes':!![]})){const _0x1ee474=_0x5c6e5f[_0x3ce8e8(0x139)](_0x984ec3,_0x5e7453[_0x3ce8e8(0x1cf)]);if(_0x5e7453['isDirectory']()){if(_0x5e7453[_0x3ce8e8(0x1cf)]===_0x3ce8e8(0x3f8))continue;_0x326aeb(_0x1ee474);}else{const _0x4ccca5=_0x5c6e5f['basename'](_0x5c6e5f[_0x3ce8e8(0x283)](_0x1ee474)),_0x5229df=_0x4ccca5+_0x5e7453[_0x3ce8e8(0x1cf)];!_0x42a218[_0x3ce8e8(0xe5)](_0x5229df)&&_0x196370['push']({'type':'orphan_blob','hash':_0x5229df,'message':_0x3ce8e8(0x5f6)+_0x5229df['slice'](0x0,0x8)+'…)'});}}};return _0x326aeb(_0xa63011[_0x4ac21a(0x6bd)]),_0x196370;}async[_0x5aca23(0x691)](){const _0x4118a1=_0x5aca23;if(!this[_0x4118a1(0x11b)][_0x4118a1(0x510)])throw new Error('files\x20feature\x20not\x20available');await this[_0x4118a1(0x11b)]['files'][_0x4118a1(0x21e)]();const _0x55eb43=this[_0x4118a1(0x11b)][_0x4118a1(0x510)][_0x4118a1(0x610)];if(!_0x55eb43)throw new Error('blob\x20status\x20db\x20not\x20available');const _0x17c4b4=[];for(const {key:_0x374426}of _0x55eb43[_0x4118a1(0x4fa)]())_0x17c4b4[_0x4118a1(0x39b)](_0x374426);for(const _0x279411 of _0x17c4b4)_0x55eb43[_0x4118a1(0x14a)](_0x279411);const _0x20ea41=new Map();for(const _0x503ec2 of this[_0x4118a1(0x275)]()){for(const {value:_0xa38de9}of _0x503ec2[_0x4118a1(0x4fa)](_0x4118a1(0x3af))){_0xa38de9[_0x4118a1(0x62a)]&&_0x20ea41[_0x4118a1(0x494)](_0xa38de9[_0x4118a1(0x62a)],(_0x20ea41[_0x4118a1(0x1ed)](_0xa38de9[_0x4118a1(0x62a)])??0x0)+0x1);}}for(const [_0x5167c1,_0x1a147d]of _0x20ea41){_0x55eb43[_0x4118a1(0x23c)](_0x5167c1,{'refs':_0x1a147d});}return{'rebuilt':_0x20ea41['size']};}}return okdbMigrate[_0x5aca23(0x5d5)]=_0x229b09,okdbMigrate[_0x5aca23(0x5d5)][_0x5aca23(0x564)]=_0x1803d8,okdbMigrate[_0x5aca23(0x5d5)];}var okdbAuthTokens,hasRequiredOkdbAuthTokens;function requireOkdbAuthTokens(){if(hasRequiredOkdbAuthTokens)return okdbAuthTokens;hasRequiredOkdbAuthTokens=0x1;const _0x2475ec=require$$2$1;function _0xb813ef(_0x4c5130,_0x279a41){const _0x3bfa25=_0x3dbc;return _0x2475ec[_0x3bfa25(0x3cf)](_0x3bfa25(0x31a),_0x279a41)[_0x3bfa25(0x4d1)](_0x4c5130)[_0x3bfa25(0x411)](_0x3bfa25(0x6d5));}function _0x3ecea8(_0x3d53de,_0x54e6e4){const _0x55026d=_0x3dbc;if(typeof _0x3d53de!=='string'||typeof _0x54e6e4!==_0x55026d(0x242))return![];if(Buffer[_0x55026d(0x196)](_0x3d53de)!==Buffer['byteLength'](_0x54e6e4))return![];return _0x2475ec['timingSafeEqual'](Buffer[_0x55026d(0x4f7)](_0x3d53de),Buffer['from'](_0x54e6e4));}function _0xd10e4c(_0x52563d){const _0x11959d=_0x3dbc;if(!_0x52563d?.[_0x11959d(0x334)](_0x11959d(0x5d8)))return null;return _0x52563d['slice'](0x7);}function _0x533c0f(_0x51b325=0x20){const _0x91b46c=_0x3dbc;return _0x2475ec[_0x91b46c(0xa8)](_0x51b325)['toString'](_0x91b46c(0x6d5));}function _0x520f77(_0x26c169){const _0x158c9e=_0x3dbc;return _0x2475ec[_0x158c9e(0xe7)](_0x158c9e(0x31a))[_0x158c9e(0x4d1)](_0x26c169)[_0x158c9e(0x411)](_0x158c9e(0x5db));}function _0x2869dc(_0x5036c7,_0x40572,_0x564395=0x36ee80){const _0x169671=_0x3dbc;if(!_0x40572)throw new Error(_0x169671(0x20e));const _0x5be6d3=Date[_0x169671(0x28a)](),_0x2ce684=Buffer[_0x169671(0x4f7)](JSON[_0x169671(0x316)]({'iat':_0x5be6d3,'exp':_0x5be6d3+_0x564395,'sub':_0x5036c7?.['id']??_0x5036c7?.[_0x169671(0x69d)]??null,'username':_0x5036c7?.[_0x169671(0x247)]??_0x5036c7?.[_0x169671(0x1cf)]??null,'roles':Array[_0x169671(0x17b)](_0x5036c7?.[_0x169671(0x252)])?_0x5036c7[_0x169671(0x252)]:[]}))[_0x169671(0x299)](_0x169671(0x6d5)),_0x39fc0c=_0xb813ef(_0x2ce684,_0x40572);return _0x2ce684+'.'+_0x39fc0c;}function _0x35be29(_0x3d571b,_0x5bf69e){const _0x43e9a5=_0x3dbc;if(!_0x5bf69e||typeof _0x3d571b!==_0x43e9a5(0x242))return null;const [_0x5da02a,_0x2fac3b]=_0x3d571b[_0x43e9a5(0x48b)]('.');if(!_0x5da02a||!_0x2fac3b)return null;const _0x418715=_0xb813ef(_0x5da02a,_0x5bf69e);if(!_0x3ecea8(_0x2fac3b,_0x418715))return null;try{const _0x1d2a41=JSON[_0x43e9a5(0x2fd)](Buffer[_0x43e9a5(0x4f7)](_0x5da02a,_0x43e9a5(0x6d5))[_0x43e9a5(0x299)]()),_0xaa25e8=0x7530;if(Date[_0x43e9a5(0x28a)]()>Number(_0x1d2a41?.[_0x43e9a5(0x492)]??0x0)+_0xaa25e8)return null;return _0x1d2a41;}catch{return null;}}async function _0x50c8f1(_0xb29d6b){return new Promise((_0x2b415c,_0x3d22ef)=>{const _0x530ce1=_0x3dbc,_0x398ed8=_0x2475ec['randomBytes'](0x10);_0x2475ec[_0x530ce1(0x526)](_0xb29d6b,_0x398ed8,0x40,(_0x1130e5,_0x8f2eda)=>{const _0x570cde=_0x530ce1;if(_0x1130e5)return _0x3d22ef(_0x1130e5);_0x2b415c(_0x398ed8[_0x570cde(0x299)](_0x570cde(0x5db))+':'+_0x8f2eda[_0x570cde(0x299)](_0x570cde(0x5db)));});});}async function _0x4ec61c(_0x54c084,_0xe68c49){const _0x5c1827=_0x3dbc;if(typeof _0xe68c49!==_0x5c1827(0x242))return![];const [_0x1ae0b0,_0x1df7fd]=_0xe68c49[_0x5c1827(0x48b)](':');if(!_0x1ae0b0||!_0x1df7fd)return![];const _0x331320=Buffer[_0x5c1827(0x4f7)](_0x1ae0b0,_0x5c1827(0x5db)),_0x59fdce=Buffer['from'](_0x1df7fd,'hex');if(_0x59fdce['length']!==0x40)return![];return new Promise((_0x20272b,_0x492785)=>{const _0xc4dcf1=_0x5c1827;_0x2475ec[_0xc4dcf1(0x526)](_0x54c084,_0x331320,0x40,(_0x285742,_0x29f721)=>{const _0x18f689=_0xc4dcf1;if(_0x285742)return _0x492785(_0x285742);_0x20272b(_0x2475ec[_0x18f689(0x309)](_0x29f721,_0x59fdce));});});}return okdbAuthTokens={'hmac':_0xb813ef,'timingSafeEqual':_0x3ecea8,'parseBearer':_0xd10e4c,'randomToken':_0x533c0f,'hashToken':_0x520f77,'issueToken':_0x2869dc,'authenticateToken':_0x35be29,'hashPassword':_0x50c8f1,'verifyPassword':_0x4ec61c},okdbAuthTokens;}var okdbLicenseCodec,hasRequiredOkdbLicenseCodec;function requireOkdbLicenseCodec(){const _0x4b7857=_0x563deb;if(hasRequiredOkdbLicenseCodec)return okdbLicenseCodec;hasRequiredOkdbLicenseCodec=0x1;const _0x8ef4f7=require$$0$2,_0xbeaa7f='0123456789ABCDEFGHJKMNPQRSTVWXYZ',_0x581a3d=new Uint8Array(0x100)['fill'](0xff);for(let _0x41cbc2=0x0;_0x41cbc2<_0xbeaa7f[_0x4b7857(0x249)];_0x41cbc2++){_0x581a3d[_0xbeaa7f[_0x4b7857(0x669)](_0x41cbc2)]=_0x41cbc2,_0x581a3d[_0xbeaa7f[_0x4b7857(0x669)](_0x41cbc2)+0x20]=_0x41cbc2;}_0x581a3d['O'[_0x4b7857(0x669)](0x0)]=0x0,_0x581a3d['o'['charCodeAt'](0x0)]=0x0,_0x581a3d['I'['charCodeAt'](0x0)]=0x1,_0x581a3d['i'[_0x4b7857(0x669)](0x0)]=0x1,_0x581a3d['L'[_0x4b7857(0x669)](0x0)]=0x1,_0x581a3d['l'['charCodeAt'](0x0)]=0x1;function _0x3930ce(_0x295d49){const _0x4bd435=_0x4b7857;let _0x2e3404=0x0,_0x1ac22e=0x0,_0x29b41e='';for(let _0x4e4eb2=0x0;_0x4e4eb2<_0x295d49[_0x4bd435(0x249)];_0x4e4eb2++){_0x1ac22e=_0x1ac22e<<0x8|_0x295d49[_0x4e4eb2],_0x2e3404+=0x8;while(_0x2e3404>=0x5){_0x2e3404-=0x5,_0x29b41e+=_0xbeaa7f[_0x1ac22e>>>_0x2e3404&0x1f];}}return _0x2e3404>0x0&&(_0x29b41e+=_0xbeaa7f[_0x1ac22e<<0x5-_0x2e3404&0x1f]),_0x29b41e;}function _0x317869(_0x47ce93){const _0x17a25d=_0x4b7857;_0x47ce93=_0x47ce93['replace'](/-/g,'')[_0x17a25d(0x452)]();let _0x8f6b1d=0x0,_0x1df03a=0x0;const _0x77e5ea=[];for(let _0x49b9b3=0x0;_0x49b9b3<_0x47ce93[_0x17a25d(0x249)];_0x49b9b3++){const _0x2bf321=_0x581a3d[_0x47ce93[_0x17a25d(0x669)](_0x49b9b3)];if(_0x2bf321===0xff)continue;_0x1df03a=_0x1df03a<<0x5|_0x2bf321,_0x8f6b1d+=0x5,_0x8f6b1d>=0x8&&(_0x8f6b1d-=0x8,_0x77e5ea[_0x17a25d(0x39b)](_0x1df03a>>>_0x8f6b1d&0xff));}return Buffer[_0x17a25d(0x4f7)](_0x77e5ea);}const _0x4481a6=[_0x4b7857(0x1a8),_0x4b7857(0x652),_0x4b7857(0x5ad),_0x4b7857(0x6b5),_0x4b7857(0x72f),_0x4b7857(0x11f),_0x4b7857(0x248),_0x4b7857(0x510)],_0x307ee4=0x0,_0x55357e=0x1,_0x384037=0x2,_0x45bb14=0x6*0x1e*0x18*0x3c*0x3c*0x3e8;function _0x4d874c({issuedAt:_0x1a9e22,expiresAt:_0x134f88,licensee:licensee='',features:features={},limits:limits={},licenseType:licenseType=_0x307ee4}){const _0x3377f6=_0x4b7857,_0x5a8e2d=Buffer[_0x3377f6(0x4f7)](licensee,_0x3377f6(0x714))[_0x3377f6(0x3e6)](0x0,0x40),_0x4f78bf=0x1+0x1+0x4+0x4+0x1+_0x5a8e2d[_0x3377f6(0x249)]+0x2+0x10,_0x29c97c=Buffer[_0x3377f6(0x5e9)](_0x4f78bf);let _0x1c3ad1=0x0;_0x29c97c['writeUInt8'](0x1,_0x1c3ad1++),_0x29c97c['writeUInt8'](licenseType,_0x1c3ad1++),_0x29c97c[_0x3377f6(0x4d2)](Math[_0x3377f6(0x557)](_0x1a9e22/0x3e8),_0x1c3ad1),_0x1c3ad1+=0x4,_0x29c97c[_0x3377f6(0x4d2)](Math[_0x3377f6(0x557)](_0x134f88/0x3e8),_0x1c3ad1),_0x1c3ad1+=0x4,_0x29c97c['writeUInt8'](_0x5a8e2d['length'],_0x1c3ad1++),_0x5a8e2d[_0x3377f6(0x3a6)](_0x29c97c,_0x1c3ad1),_0x1c3ad1+=_0x5a8e2d['length'];let _0x22e786=0x0;for(let _0x2c6b0c=0x0;_0x2c6b0c<_0x4481a6[_0x3377f6(0x249)];_0x2c6b0c++){if(features[_0x4481a6[_0x2c6b0c]])_0x22e786|=0x1<<_0x2c6b0c;}_0x29c97c[_0x3377f6(0x6f7)](_0x22e786,_0x1c3ad1),_0x1c3ad1+=0x2;const _0x338d6c=[_0x3377f6(0x45d),_0x3377f6(0x671),'syncPeers',_0x3377f6(0x16c)];for(const _0x144eea of _0x338d6c){_0x29c97c['writeUInt32BE'](limits[_0x144eea]||0x0,_0x1c3ad1),_0x1c3ad1+=0x4;}return _0x29c97c;}function _0x1d5db5(_0x1dadac){const _0x6b542c=_0x4b7857;let _0x1797a8=0x0;const _0x26f233=_0x1dadac['readUInt8'](_0x1797a8++),_0x3db5e6=_0x1dadac['readUInt8'](_0x1797a8++),_0x343aa4=_0x1dadac[_0x6b542c(0x6dc)](_0x1797a8);_0x1797a8+=0x4;const _0x5898ee=_0x1dadac[_0x6b542c(0x6dc)](_0x1797a8);_0x1797a8+=0x4;const _0x222f34=_0x1dadac['readUInt8'](_0x1797a8++),_0x3fb33f=_0x1dadac[_0x6b542c(0x3e6)](_0x1797a8,_0x1797a8+_0x222f34)[_0x6b542c(0x299)](_0x6b542c(0x714));_0x1797a8+=_0x222f34;const _0x800b12=_0x1dadac[_0x6b542c(0x34d)](_0x1797a8);_0x1797a8+=0x2;const _0x1c5e5a={};for(let _0x26b096=0x0;_0x26b096<_0x4481a6[_0x6b542c(0x249)];_0x26b096++){_0x1c5e5a[_0x4481a6[_0x26b096]]=Boolean(_0x800b12&0x1<<_0x26b096);}const _0x1d207a=[_0x6b542c(0x45d),_0x6b542c(0x671),_0x6b542c(0x2b2),_0x6b542c(0x16c)],_0x2da100={};for(const _0x261235 of _0x1d207a){const _0xed3dae=_0x1dadac[_0x6b542c(0x6dc)](_0x1797a8);_0x1797a8+=0x4,_0x2da100[_0x261235]=_0xed3dae===0x0?null:_0xed3dae;}return{'v':_0x26f233,'licenseType':_0x3db5e6,'issuedAt':_0x343aa4*0x3e8,'expiresAt':_0x5898ee*0x3e8,'licensee':_0x3fb33f,'features':_0x1c5e5a,'limits':_0x2da100};}function _0x2c9874(_0x32b8c3,_0x16b40b){const _0x40d26c=_0x4b7857,_0x59b4c9=Buffer['concat']([_0x32b8c3,_0x16b40b]),_0x1fcb6c=_0x3930ce(_0x59b4c9),_0x2b3c0a=[];for(let _0x16e65b=0x0;_0x16e65b<_0x1fcb6c[_0x40d26c(0x249)];_0x16e65b+=0x8){_0x2b3c0a[_0x40d26c(0x39b)](_0x1fcb6c[_0x40d26c(0x3e6)](_0x16e65b,_0x16e65b+0x8));}return _0x2b3c0a[_0x40d26c(0x139)]('-');}function _0x5dec87(_0x511dad){const _0x164678=_0x4b7857;if(typeof _0x511dad!==_0x164678(0x242))throw new Error(_0x164678(0x36b));const _0x4f64b8=_0x317869(_0x511dad['replace'](/-/g,''));if(_0x4f64b8[_0x164678(0x249)]<0x41)throw new Error('decodeLicenseBlob:\x20blob\x20too\x20short\x20('+_0x4f64b8[_0x164678(0x249)]+_0x164678(0xad));const _0x3ae04e=_0x4f64b8[_0x164678(0x3e6)](0x0,_0x4f64b8[_0x164678(0x249)]-0x40),_0x25265f=_0x4f64b8[_0x164678(0x3e6)](_0x4f64b8['length']-0x40);let _0x52e790;try{_0x52e790=_0x1d5db5(_0x3ae04e);}catch(_0xb6d7b8){throw new Error('decodeLicenseBlob:\x20failed\x20to\x20decode\x20payload:\x20'+_0xb6d7b8['message']);}return{'rawBuf':_0x4f64b8,'payload':_0x3ae04e,'sig':_0x25265f,'decoded':_0x52e790};}function _0x19ddc9(_0x55ad80){const _0x2bd7cd=_0x4b7857;return _0x8ef4f7['createHash'](_0x2bd7cd(0x31a))[_0x2bd7cd(0x4d1)](_0x55ad80)[_0x2bd7cd(0x411)]()['slice'](0x0,0x8);}function _0xb285d7(_0x67f14e,_0x329a13,_0x49217a){const _0x3a8fe8=_0x4b7857,_0x1a9856=_0x3a8fe8(0xf3)+_0x49217a,_0x5385b1=Buffer[_0x3a8fe8(0x529)]([Buffer[_0x3a8fe8(0x4f7)](_0x67f14e,_0x3a8fe8(0x714)),_0x329a13]),_0x5ced9c=_0x8ef4f7[_0x3a8fe8(0x3cf)](_0x3a8fe8(0x31a),_0x1a9856)['update'](_0x5385b1)['digest'](),_0x18a209=_0x3930ce(_0x5ced9c[_0x3a8fe8(0x3e6)](0x0,0x5));return{'pin':_0x18a209,'pinHmac':_0x5ced9c};}function _0x5bd3ef(_0x5e715b,_0x57a115,_0x34b66a){const _0x2ab88d=_0x4b7857,_0x130f94=Buffer[_0x2ab88d(0x5e9)](0x4d);let _0x5626be=0x0;_0x130f94['writeUInt8'](0x1,_0x5626be++),_0x5e715b[_0x2ab88d(0x3a6)](_0x130f94,_0x5626be),_0x5626be+=0x8,_0x130f94['writeUInt32BE'](_0x57a115,_0x5626be),_0x5626be+=0x4,_0x34b66a[_0x2ab88d(0x3a6)](_0x130f94,_0x5626be);const _0x464fbe=_0x3930ce(_0x130f94),_0x30337=[];for(let _0x5ad6fe=0x0;_0x5ad6fe<_0x464fbe[_0x2ab88d(0x249)];_0x5ad6fe+=0x6){_0x30337[_0x2ab88d(0x39b)](_0x464fbe['slice'](_0x5ad6fe,_0x5ad6fe+0x6));}return _0x30337[_0x2ab88d(0x139)]('-');}function _0x4cc3c0(_0x533d5a){const _0x28e9f1=_0x4b7857;if(typeof _0x533d5a!==_0x28e9f1(0x242))throw new Error(_0x28e9f1(0x261));const _0x10c715=_0x317869(_0x533d5a[_0x28e9f1(0x176)](/-/g,''));if(_0x10c715[_0x28e9f1(0x249)]!==0x4d)throw new Error(_0x28e9f1(0x2ed)+_0x10c715[_0x28e9f1(0x249)]);let _0x48fa59=0x0;const _0x58515b=_0x10c715['readUInt8'](_0x48fa59++),_0x45c1cf=_0x10c715[_0x28e9f1(0x3e6)](_0x48fa59,_0x48fa59+0x8);_0x48fa59+=0x8;const _0xb4b8d1=_0x10c715[_0x28e9f1(0x6dc)](_0x48fa59);_0x48fa59+=0x4;const _0x12a9d8=_0x10c715[_0x28e9f1(0x3e6)](_0x48fa59);return{'v':_0x58515b,'licenseHash':_0x45c1cf,'expiry':_0xb4b8d1,'sig':_0x12a9d8};}function _0x22f378({tokenString:_0x474274,nodeId:_0x3ccff6,rawBlobBuf:_0x2202e2,pubKeyPem:_0x20452a,pubFingerprint:_0x27f6d6}){const _0x462468=_0x4b7857;let _0x26c532;try{_0x26c532=_0x4cc3c0(_0x474274);}catch(_0x1915fe){return{'valid':![],'reason':_0x462468(0x1c6)};}const _0xb59fe=_0x19ddc9(_0x2202e2);if(!_0xb59fe[_0x462468(0x31f)](_0x26c532[_0x462468(0x3dd)]))return{'valid':![],'reason':_0x462468(0x724)};const {pinHmac:_0x3ff1da}=_0xb285d7(_0x3ccff6,_0xb59fe,_0x27f6d6),_0x555e6c=Buffer[_0x462468(0x5e9)](0x4);_0x555e6c[_0x462468(0x4d2)](_0x26c532[_0x462468(0x67b)],0x0);const _0x14e375=Buffer['concat']([Buffer[_0x462468(0x4f7)]([_0x26c532['v']]),_0x3ff1da[_0x462468(0x3e6)](0x0,0x5),_0x26c532[_0x462468(0x3dd)],_0x555e6c]);try{const _0x4b4fba=_0x8ef4f7['verify'](null,_0x14e375,_0x20452a,_0x26c532[_0x462468(0x505)]);if(!_0x4b4fba)return{'valid':![],'reason':_0x462468(0x504)};}catch(_0x4ecd42){return{'valid':![],'reason':_0x462468(0x504)};}if(_0x26c532[_0x462468(0x67b)]<Date[_0x462468(0x28a)]()/0x3e8)return{'valid':![],'reason':_0x462468(0x4b7)};return{'valid':!![],'reason':'ok'};}function _0x359144(_0x508f7b){const _0x120054=_0x4b7857;if(typeof _0x508f7b!==_0x120054(0x242))return'unknown';const _0x2709a1=_0x508f7b[_0x120054(0x541)]();if(_0x2709a1['startsWith']('/')||_0x2709a1[_0x120054(0x334)]('./')||_0x2709a1[_0x120054(0x334)](_0x120054(0x713))||/^[A-Za-z]:[\\/]/['test'](_0x2709a1))return'path';if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i[_0x120054(0x3b6)](_0x2709a1))return _0x120054(0x2c7);const _0x4f7f76=_0x2709a1[_0x120054(0x176)](/[\s-]+/g,'')[_0x120054(0x249)];if(_0x4f7f76===0x7c)return'activation';if(_0x4f7f76>=0x95&&_0x4f7f76<=0xfc)return'blob';return _0x120054(0x397);}return okdbLicenseCodec={'toBase32':_0x3930ce,'fromBase32':_0x317869,'encodeLicensePayload':_0x4d874c,'decodeLicensePayload':_0x1d5db5,'encodeLicenseBlob':_0x2c9874,'decodeLicenseBlob':_0x5dec87,'licenseHash':_0x19ddc9,'derivePin':_0xb285d7,'encodeActivationToken':_0x5bd3ef,'decodeActivationToken':_0x4cc3c0,'verifyActivation':_0x22f378,'detectInputType':_0x359144,'FEATURE_NAMES':_0x4481a6,'LICENSE_TYPE_STANDARD':_0x307ee4,'LICENSE_TYPE_OPEN':_0x55357e,'LICENSE_TYPE_INTERNAL':_0x384037,'OPEN_LICENSE_MAX_DURATION_MS':_0x45bb14},okdbLicenseCodec;}var okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0xa5ddde=_0x563deb;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x3a9a25={'PUT':_0xa5ddde(0x170),'REMOVE':_0xa5ddde(0x5c3),'INDEX_DROP':_0xa5ddde(0x3de),'INDEX_REGISTER':_0xa5ddde(0x1a0),'INDEX_RESET':_0xa5ddde(0x595),'TYPE_REGISTER':_0xa5ddde(0x30b),'TYPE_DROP':_0xa5ddde(0x466),'FTS_REGISTER':'registerFts','FTS_DROP':_0xa5ddde(0x55b),'FTS_RESET':_0xa5ddde(0x3a5),'SCHEMA_SET':_0xa5ddde(0x1af),'SCHEMA_DROP':_0xa5ddde(0x331),'TTL_SET':_0xa5ddde(0x1e1),'TTL_CLEAR':_0xa5ddde(0x484)},_0x1e414d={'SYSTEM_READY':_0xa5ddde(0x727),'FIELD_RESOLVER_REGISTERED':_0xa5ddde(0x152),'SYSTEM_STOPPED':_0xa5ddde(0x723),'SYSTEM_CLOCK_CHANGE':_0xa5ddde(0x499),'SYSTEM_POKE':_0xa5ddde(0x5c8),'SYSTEM_DRAIN':_0xa5ddde(0x131),'SYSTEM_TYPE_DROP':_0xa5ddde(0x108),'SYSTEM_PROC':_0xa5ddde(0xfa),'SYSTEM_BUS_STATE_CHANGE':_0xa5ddde(0x647),'ITEM_CREATE':_0xa5ddde(0x2cf),'ITEM_UPDATE':_0xa5ddde(0x2de),'ITEM_REMOVE':_0xa5ddde(0xdd),'ITEM_PENDING':'item:pending','INDEX_RESET':_0xa5ddde(0x6c6),'INDEX_READY':'index:ready','INDEX_PROGRESS':'index:progress','VIEW_PROGRESS':'view:progress','INDEX_DROP':_0xa5ddde(0x2fa),'INDEX_REGISTERED':_0xa5ddde(0xd7),'FTS_REGISTERED':_0xa5ddde(0x17e),'FTS_DROP':_0xa5ddde(0x3b2),'FTS_RESET':_0xa5ddde(0x5fa),'SCHEMA_SET':_0xa5ddde(0x3fb),'SCHEMA_DROP':_0xa5ddde(0x3f9),'UNIQUE_VIOLATION':_0xa5ddde(0x231),'UNIQUE_VIOLATION_RESOLVED':_0xa5ddde(0x69f),'REF_VIOLATION':_0xa5ddde(0x4d5),'REF_VIOLATION_RESOLVED':_0xa5ddde(0x55d),'SYNC_APPLY':_0xa5ddde(0x581),'TXN_START':_0xa5ddde(0x615),'TXN_END':_0xa5ddde(0x68b),'TXN_ROLLBACK':'txn:rollback','TYPE_REGISTERED':'type:registered','TYPE_DROP':_0xa5ddde(0x6ab),'ENV_OPENED':'env:opened','ENV_REMOVED':_0xa5ddde(0x711),'SYSTEM_ENV_RELEASE':'system:env_release','TTL_EXPIRED':_0xa5ddde(0x4d3),'TTL_SET':'ttl:set','TTL_CLEAR':_0xa5ddde(0x136),'LICENSE_INVALID':_0xa5ddde(0x5cf),'LICENSE_ADDED':'license:added','LICENSE_ACTIVATED':'license:activated','LICENSE_REMOVED':_0xa5ddde(0x413)},_0x1271ae={'CREATING':'creating','RESETTING':_0xa5ddde(0x24a),'READY':_0xa5ddde(0x2ca),'DROPPING':_0xa5ddde(0x3e8),'WAITING':_0xa5ddde(0x34a),'ERROR':'error'},_0x32acc7={'CREATED':'created','STARTING':_0xa5ddde(0x1bc),'STARTED':_0xa5ddde(0x650),'STOPPING':'stopping','STOPPED':_0xa5ddde(0x380)},_0x5a4ae0={'CREATING':_0xa5ddde(0x6f4),'READY':_0xa5ddde(0x2ca),'HALTED':'halted','STOPPED':_0xa5ddde(0x380),'RESETTING':_0xa5ddde(0x24a)},_0x25d4b6=Object[_0xa5ddde(0x12e)]({'POKE':'bus:poke','DRAIN':_0xa5ddde(0x267),'TYPE_DROP':_0xa5ddde(0x3ae),'PROC':_0xa5ddde(0x3a4),'ENV_RELEASE':'bus:env_release'});return okdbEnums={'BUS_EVENTS':_0x25d4b6,'CHANGE_ACTIONS':_0x3a9a25,'EVENTS':_0x1e414d,'INDEX_STATE':_0x1271ae,'OKDB_STATE':_0x32acc7,'VIEW_STATE':_0x5a4ae0},okdbEnums;}function _0x9790(){const _0x282ce4=['\x20lived\x20outside\x20the\x20store\x20at\x20','instances','\x0a\x0a\x20\x20','uri','known\x20field','_getOidcDiscovery','Work','available','\x0a\x20\x20Raw\x20token\x20(shown\x20once,\x20save\x20it\x20now):\x0a','body:\x20','content-type','\x20\x20#','envs=','_windowCbs','seq','created','_quantum','ensureType','iss','makeOkdb','activateLicense','\x20uses\x20bodyMode:array\x20but\x20does\x20not\x20have\x20exactly\x20one\x20unbound\x20array\x20input\x20field','unshift','system:bus_state_change','_systemEnv','quarantined:\x20','SIGKILL','\x27\x20doesn\x27t\x20exist','Run','--types','alloc','_totalReadMs','started','PIN','embeddings','hasIndex','createWriteStream','startHeartbeat','type/','setDesired','parkedNow','_shouldWrapResponse','createReadStream','--changes','_totalErrors','INDEX_READY','Create\x20and\x20delete\x20views,\x20start,\x20stop,\x20and\x20rebuild\x20them.','geo','\x20binding\x20references\x20missing\x20input\x20field:\x20','--label','publishChildRow','[okdb]\x20warning:\x20could\x20not\x20read\x20node\x20identity/licenses\x20before\x20reset\x20(','types:','Access-Control-Request-Headers','isWanted','_putRowSync','\x20\x20(licensee:\x20','charCodeAt','\x22\x20is\x20not\x20empty\x20—\x20backups\x20never\x20overwrite;\x20choose\x20a\x20new\x20directory','processor','heapUsed','\x20worker(s)\x20remaining','logLevel','\x20references\x20','destroy','typesPerEnv','[okdb-cluster]\x20worker\x20pid=','activation','isAuthenticated','procmode/','Blob\x20ref-count\x20is\x20zero\x20for\x20~files\x20record\x20\x22','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20','inflightAgesMs','never','import','expiry','authenticateToken','typeSubDbs','signingInput','[okdb-cluster]\x20','[okdb]\x20closed\x20cleanly\x0a','config\x20file\x20valid:\x20','Unauthorized','listenAddr','\x20\x20\x20http://localhost:','\x20(slot=','\x20\x20\x20\x20\x20\x20\x20\x20\x20OKDB\x20SHELL\x20\x20\x20\x20\x20\x20\x20\x20','VALIDATION_ERROR','reload','--blobs','_okdb','txn:end','--address','\x1b[35m','INDEX_RESET','field','Unsupported\x20JWT\x20alg:\x20','repairBlobRefs','JWT\x20issuer\x20mismatch','Machine-to-machine\x20cluster\x20protocol\x20(join\x20handshake,\x20replication\x20channel,\x20traffic).\x20Grant\x20only\x20to\x20peer\x20nodes\x20—\x20not\x20to\x20humans.','_bpWaiters','getHeader','some','_children','execArgv','\x20HTTP\x20workers,\x20each\x20serves\x20+\x20processes)','PUT','\x1b[0m','pushEphemeral','sub','filter','unique:violation_resolved','deaths','restore','_jwksCache','/admin/index.html','shell','reportThreadStats','NAME','EXPIRES','_cursors','indexToDb','expiresAt','type:drop','--help','<json-body>','_normalizeOAuthAuthResult','ms/','regex','Hint:\x20','\x20\x20Build:\x20\x20\x20key\x20fingerprint\x20','_oidcDiscoveryCache','read','fts','help','already\x20in\x20use','feed:','\x20\x20(','List,\x20download,\x20and\x20inspect\x20file\x20metadata.','listAll','servers','_blobsDir','_bucketIdx','hint','_released','createEnvironment','disable','toFixed','INDEX_NOT_REGISTERED','_heldTotal','index:reset','_cmd','publishOwnRow','\x20\x20\x20\x20license:\x20⚠\x20OPEN\x20—\x20','blob','decodeLicenseBlob','\x22\x20is\x20used\x20by:\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20show\x20active\x20environment\x20+\x20list\x20all\x20envs\x0a\x20\x20','okdb-lock:\x20env\x20closed','_rotateBucket','_countFileRefs','openDB',')\x20—\x20this\x20process\x20will\x20not\x20appear\x20in\x20the\x20process\x20census','List\x20tokens\x20and\x20users.','\x20\x20(unlimited)','base64url','hard-killed','workers','[okdb]\x20error:\x20show\x20requires\x20an\x20id\x20argument','_userPhase','init','server','readUInt32BE','noAdmin','DELETE\x20type/users/item/x','createInterface','committed','flatMap','signature','processors','ENVS','\x27,\x20cannot\x20map\x20to\x20\x27','\x27\x20already\x20registered','__vocab/version','\x20worker','captureStackTrace','\x20\x20changes=','key','INDEX_PROGRESS','[okdb]\x20error:\x20join\x20requires\x20a\x20remote\x20address.\x20Usage:\x20okdb\x20join\x20<address>\x20--token\x20<t>','shmbuf.node','[okdb]\x20started\x20in\x20','\x20in\x20','\x20\x20\x20\x20\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/','removeSupervisedChild','putNode','creating','kid','\x0a[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a','writeUInt16BE','/.well-known/openid-configuration','getClock','is\x20invalid','\x20\x20\x20\x20\x20control\x20log\x20verbosity\x0a\x20\x20','fn-runner','cluster','noRepl','debug','changes','--password','system','result','GET','_typeSchema','backup\x20destination\x20\x22','entries','_sandbox','tokenizer','\x20(passive),\x20','maxBodyBytes','aud','node:perf_hooks','enabled','_ensureDesired','\x20querySchema\x20references\x20missing\x20input\x20field:\x20','env:removed','_wantDbOf','../','utf8','ORPHAN\x20(env-closed\x20write,\x20unhandledRejection)','cpuPct','.\x20The\x20active\x20license\x20does\x20not\x20enable\x20\x22','updatedAt','exit','OIDC\x20discovery\x20missing\x20jwks_uri','_isReader','sse','Execute\x20full-text\x20and\x20vector\x20searches.','OKDBVersionMismatchError','derivePin','rows=','_startAdmission','then','system:stopped','LICENSE_HASH_MISMATCH','ESRCH','free\x20tier','system:ready','\x20\x20\x20\x20license:\x20','Token\x20must\x20be\x20a\x20JWT','\x20\x20\x20\x20\x20\x20','_refreshDesiredSnapshot','_lock','processes:\x20','\x20\x20\x20\x20\x20\x20\x20','timeMachine','fetch','[okdb]\x20export\x20complete','--no-cluster','_singletonLock','acquiredAt','cpuWindowMs','\x20(id:\x20','OKDB_HTTP_WORKERS','\x20\x20+','\x20cf-ray=','nbf','green','start\x20','kill','HELP','_enableChangelog','GATEWAY_TIMEOUT','okdb-backup.json','inspect','ftsIndexes','details','offWindow','OKDBAlreadyExistsError','null','workersConfigured','listRoutes','processing','dbPath','BAD_REQUEST','\x20MB\x20→\x20','--config',',\x20label:\x20','isSetupMode','\x0a\x20\x20No\x20routes\x20matching\x20\x22','listNodes','24uDnzWu','PATCH','consumeLoginState','(primary\x20=\x20processor)','\x20\x20Tier:\x20\x20\x20\x20','shutdown','/([^/]+)','\x20\x20\x20\x20\x20\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','JWT\x20not\x20yet\x20valid','QUIT','der','headers','okdb-license-id:','\x20(must\x20be\x20an\x20integer\x20>=\x201)\x20—\x20using\x201','Peer','/type/users\x0a\x20\x20\x20\x20','\x20already\x20in\x20use','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20override\x20active\x20environment\x20for\x20this\x20call\x0a\x20\x20','\x20on\x20this\x20data\x20path\x20runs\x20okdb\x20',':\x20key\x20[','_ownMeta','{}[]:,\x27\x22','processes','sandbox','--path','supervisorKey','\x20(expires\x20','processingSig','drain','getProcess','randomBytes','export:\x20stream\x20closed\x20before\x20drain','_supervisorKey','Query','kdb_admin_oauth_state','\x20bytes,\x20need\x20>=\x2065)','--eval','ITEM_UPDATE','\x20supervised)','106396bpGKuy','\x20to\x20browse\x20the\x20API,\x20','Worker-side:\x20claim,\x20heartbeat,\x20complete,\x20fail,\x20progress.','envsOpen','query','pop','\x20\x20\x20\x20graceful\x20shutdown\x0a','properties','[okdb]\x20exporting\x20env\x20\x22','sourceType','hostname','invalid','setNoDelay','content-length','all','RS256','dead','fts:','\x20writer{depth=','TYPES','parseBearer','embedded','magenta','\x20(durable\x20desired-state)','LICENSE_FEATURE_DISABLED','List\x20jobs,\x20view\x20stats,\x20list\x20buckets.','searchParams','not\x20open','\x20—\x20type\x20env\x20to\x20list\x20available\x0a','drop','input:\x20','port\x20','size','gray','ES256','189LQRqNr','\x20oldestPendingMs=','credentials','index:registered','Writable','FEATURES','\x20sync','additionalProperties','_ensureTokensType','item:remove','\x20\x20\x20\x20•\x20a\x20license\x20blob\x20\x20\x20(Crockford\x20base32,\x20~150–250\x20chars)','run','--workers','_drain','UNPROCESSABLE_ENTITY','\x20\x20\x20\x20admin:\x20http://localhost:',':\x20ping\x0a\x0a','has','statusCode','createHash','NOT_FOUND','level:\x20info','setupPrimary','toLowerCase','\x20documents\x20fail\x20validation','resume','_jwksNegativeCache','responseStatuses','ms\x20mean=','payload-or-self','_inflight','OKDB-PIN-V1:','unhandledRejection','_nodeDbFor','forceAfterMs','columns','childTransaction','processor:retry','system:proc','permissions','building','authMode','fields','okdb_session_','_startHeartbeat','node/','\x20\x20\x20\x20status:\x20\x20\x20\x20pending\x20activation','[okdb]\x20invalid\x20config\x20\x22http.host\x22:\x20','OKDBInvalidValueError','Internal\x20error','\x20pid=','_pending','system:type_drop','_outstanding','cors','createServer','\x20\x20✓\x20joined\x20and\x20reconciliation\x20initiated','issuer','rmSync','SERVICE_UNAVAILABLE','mcp-session-id','\x22.\x20Use:\x20create,\x20list,\x20revoke','_lastPublishAt','licenses','namespace','/types\x0a\x20\x20\x20\x20','log','_readNDJSON','cpSync','\x0a\x20\x20✓\x20License\x20already\x20stored\x20(no\x20change)','12WoJDFG','okdb','afterWrite','\x20\x20\x20\x20\x20\x20\x20\x20\x20browse\x20API\x20routes,\x20grouped\x20by\x20area\x0a\x20\x20','destroyed','views','context','ttl','assign','_baselines','_lastCpuAt','safety','consecutiveFailures','mode','node\x20','workersFlag','fanout','[okdb]\x20warning:\x20failed\x20to\x20restore\x20identity/licenses\x20after\x20reset:\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20GET\x20(implicit)\x0a\x20\x20','[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22','freeze','[okdb]\x20cluster\x20supervisor\x20pid=','{}[]:,\x0a\x0d\x09\x20','system:drain','readdirSync','Read','License\x20already\x20stored','hasType','ttl:clear','VERB','reverse','join','data.mdb','ENV_CLOSING_RETRY','_totalWriteMs','ms\x20—\x20giving\x20up\x20on\x20this\x20slot;\x20',';\x20Secure','allSettled','required','groups','[okdb]\x20loaded\x20config:\x20','functions','argv','\x0a\x20\x20okdb\x20doctor\x0a','exportBlobs','Embeddings','token_use','_bestMatch','removeSync','audiences','warn','off','http.workers','--ttl','UNAUTHORIZED','~processes:desired','field:resolver_registered','memoryUsage','\x20\x20\x20\x20','schema','_nodeDb','win32','note','killable','prompt','--grants','start','\x20\x20Type\x20','HTTP\x20','\x22\x20on\x20\x22','cluster-wide','[okdb]\x20error:\x20--grants\x20must\x20be\x20valid\x20JSON\x20object','[okdb]\x20primary\x20okdb\x20close\x20error:\x20','--print','_db','[okdb]\x20starting…\x0a','_selfKey','(none)','beforeWrite','\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/','[okdb]\x20.kdbconfig\x20already\x20exists\x20—\x20skipping','INDEX_ALREADY_REGISTERED','maxWrites','valid','\x20\x20(licenses\x20must\x20be\x20signed\x20by\x20the\x20matching\x20private\x20key)','\x20\x20skipped:\x20','put','15cStMbY','[okdb]\x20error:\x20remove\x20requires\x20an\x20id\x20argument','HTTP\x20server\x20already\x20running','_statusEnv','[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22','replace','selfKey','load','connection','_onProcEvent','isArray','active:','_threadStats','fts:registered','[okdb]\x20error:\x20','mkdirSync','api','access-control-request-headers','finally','createLoginState','./okdb-backup','Gate\x20flag\x20required\x20to\x20touch\x20system\x20types\x20(those\x20whose\x20name\x20starts\x20with\x20\x22~\x22).\x20Combined\x20with\x20the\x20underlying\x20namespace\x20permission.','Search','pathname','getChanges','[okdb]\x20restoring\x20','view','isFeatureEnabled','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20','_holderDead','\x20\x20\x20\x20api:\x20\x20\x20http://localhost:','DELETE','\x20\x20Usage:\x20logs\x20[on|off|debug|info|warn|error]','[req]\x20','_fetchJwks','\x20—\x20','TOO_MANY_REQUESTS','byteLength','rawResponse','Admin','types','PERMISSIONS','\x20\x20records=','_assertUsable','fromEntries','cpuUsage','TYPE_NOT_REGISTERED','registerIndex','Full-text\x20search','_isClusterController','listening','\x20stays\x20down\x20on\x20boot\x20(durable\x20decommission)','LOGS','[env]','[okdb]\x20invalid\x20log\x20level:\x20\x22','sync','[okdb]\x20error:\x20--address\x20is\x20required\x20for\x20join\x20(this\x20node\x27s\x20reachable\x20sync\x20address).\x0a','_envs','_acquiredAt','env/:env','Feature\x20not\x20available\x20on\x20free\x20tier:\x20','View\x20peer\x20status\x20and\x20replication\x20stats.','setSchema','queue-worker','none','closeAllConnections','unref','./okdb-data','--port','_getType','_computeStatus','Data','tokenTtl','--permissions','role','starting','_sockets','_publishFailWarned','quit','\x20\x20\x20\x20port:\x20\x20\x20\x20','Cluster\x20replication.\x20The\x20\x22peer\x22\x20op\x20is\x20for\x20cluster\x20nodes,\x20not\x20human\x20users.','port','req','writes=','access-control-max-age','MALFORMED_TOKEN','bindings','SYSTEM_POKE','_highWater','ms\x20p99=','LICENSE_EXPIRED_ACTION','_isFree','requests','id:\x20','name','url','assertFeature','okdb-writer:\x20env\x20closing\x20—\x20retry',';\x20Max-Age=0;\x20Expires=Thu,\x2001\x20Jan\x201970\x2000:00:00\x20GMT','method','clusterStatusView','\x20\x20\x20\x20-\x20The\x20license\x20blob\x20has\x20not\x20been\x20added\x20yet\x20—\x20run\x20`okdb\x20license\x20<blob>`\x20first.','_matchRoute','title','_totalRequests','\x20is\x20not\x20a\x20complete\x20okdb\x20backup\x20(no\x20','\x22\x20—\x20pass\x20a\x20path\x20relative\x20to\x20it\x20(configure\x20with\x20the\x20`backup.root`\x20option)','_lastTick','\x20│\x20','\x20\x20\x20\x20\x20\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','processorId','exec','setTtl','config\x20file\x20invalid:\x20','ITEM_CREATE','ftsName','isSystem','--env','_listTypes','Events','--no-admin','no\x20.kdbconfig\x20(using\x20defaults)','\x20(must\x20be\x201–65535)','\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','get','Blob\x20file\x20missing\x20for\x20~files\x20record\x20\x22','middlewares','identity','(code=','\x0a\x20\x20Run\x20okdb\x20to\x20start\x20the\x20server.\x0a','\x20\x20\x20\x20permissions:\x20','\x20\x20·\x20','OPEN','busy','SIGBREAK','1886320NkLzQb','paused','sourceKey','addSSE','--name','okdb.pid','\x20+\x20','ms\x0a','noCluster','sync-node','disconnect','\x20(expires\x20in\x20','route','issuedAt','[okdb]\x20shmbuf\x20native\x20binding\x20unavailable\x20—\x20multi-process\x20clustering\x20is\x20unsafe\x20','uptime','firstTs','_sync','registry\x20publish\x20failing:\x20','shift','scope','\x1b[33m','Token\x20secret\x20not\x20configured','\x0a[okdb]\x20error:\x20','default:\x20cores−1\x20=\x20','commitsPerSec','writeMs','info','PUT\x20type/users/item/x\x20{\x22n\x22:1}','env','dest','config\x20http.workers','\x20has\x20ambiguous\x20query/path\x20field:\x20','closed','address','cf-connecting-ip','cluster:\x20ready\x20(','OKDBInvalidPrimaryKeyError','_ensure','targetKey','SYNC_COMMITS',';\x20Max-Age=','[okdb]\x20invalid\x20port:\x20','\x20\x20Flags','zero_refs','\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20','license','ID\x20token\x20is\x20not\x20accepted','Create,\x20update,\x20and\x20delete\x20tokens\x20and\x20users;\x20rotate\x20keys.','sizeBefore','(on\x20any\x20path\x20command)','Invalid\x20license\x20blob:\x20','_publishNow','matcher','_runMiddlewares','\x20\x20All\x20checks\x20passed.\x0a','\x20\x20\x20\x20admin:\x20\x20\x20http://localhost:','unique:violation','-backups','_lockDb','max','_removeRowAsync','node','ppid','active','build','queue/','__writeCounter','putSync','(workers\x20can\x27t\x20share\x20the\x20cross-process\x20HLC/clock).\x20Forcing\x20single-process\x20(was\x20','guards','description','\x20\x20╚═══════════════════════════╝','stdin','string','[okdb]\x20created\x20./okdb-data','_rawDb','object','verifyCookie','username','mcp','length','resetting','okdb_session','[okdb-cluster]\x20respawning\x20worker\x20slot=','type/users/item/alice\x20--env\x20staging','OPTIONS','JWT\x20expired','closing','[on|off|level]','roles','type/users/query\x20{\x22active\x22:true}','\x20/\x20','\x20\x20Envs:\x20\x20\x20\x20','\x27\x20on\x20type\x20\x27','CLI\x20(`okdb\x20listen`),\x20or\x20use\x20Node\x27s\x20built-in\x20`cluster`\x20module\x20and\x20call\x20','No\x20license\x20found\x20matching\x20this\x20activation\x20token','flushDebounce','okdb-diag.','operation','\x0a\x20\x20\x20\x20\x20\x20','_scheduleFlush','\x20\x20\x20\x20features:\x20\x20',',\x20which\x20still\x20exists\x20—\x20the\x20restored\x20','http.listen({workers/makeOkdb/primaryOkdb})\x20is\x20no\x20longer\x20supported\x20in\x20the\x20','decodeActivationToken:\x20input\x20must\x20be\x20a\x20string','Type\x20\x27','\x20has\x20unbound\x20input\x20fields\x20with\x20bodyMode:none:\x20','\x20records…','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20','\x20records','bus:drain','limits','EXIT','text/event-stream;\x20charset=utf-8','clockToChangeDb','heldBy','\x20\x20Next\x20step\x20—\x20activate\x20the\x20license:','detachConsole','\x20licenses','pipe','error','\x20\x20\x20\x20licensee:\x20\x20','backupRoot','\x20more','_allEnvsWithFiles','version','38562KkcPoC','Unknown\x20JWKS\x20kid:\x20','migrate','host','_committed','EADDRINUSE','_markSeen','toLocaleString','_pendingLocal','\x20drainAge=','\x20(must\x20be\x20true\x20or\x20false)','holder','dirname','OKDB_CODE_TO_HTTP_STATUS','data:write','\x0a===\x20OKDB_DIAG\x20STALL:\x20swap\x20drain\x20held\x20','exportEnvsToStream','getAuthOptions','[okdb]\x20error:\x20revoke\x20requires\x20an\x20id\x20argument','now','depth','clusterWorkers','_admissionStarted','[okdb]\x20created\x20.kdbconfig','received\x20','\x20\x20╔═══════════════════════════╗','\x20\x20(name:\x20','grants','Activation\x20invalid:\x20','writerStatus','entry','hasOwnProperty','\x20\x20\x20\x20id:\x20\x20\x20\x20','issueToken','toString','\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','\x0a\x20\x20✓\x20Token\x20created','__identity','Unique\x20constraint\x20violated\x20on\x20','worker','set-cookie','search:query','ms\x20activeWriters=','ALREADY_EXISTS','idx:','_nodeDead','Release','typesDb','stop','\x20\x20\x20\x20•\x20a\x20license\x20id\x20\x20\x20\x20\x20(uuid)','addLicense','Index\x20\x22','_nestedTotal','operations','reason','\x20===','No\x20tokens.','\x20\x20[','(empty)','syncPeers','keys','rss','FOREIGN_KEY_DELETE_RESTRICTED','licenseType','authorization_endpoint','open\x20','cursorKey','match','dynamic','_dispatch','_bpParkedTotal','function','~tokens','\x20envs','\x0a-----END\x20CERTIFICATE-----\x0a','cookies','licensee','GONE','effective','cpus','uuid','[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22','node:crypto','ready','hidden','[okdb]\x20importing\x20','\x22\x20in\x20env\x20\x22','processor:error','item:create','_licenseHash','_onPoke','_isWriter','inputSchema','\x20\x20\x20\x20usage:\x20\x20\x20','liveThreadStats','View\x20server\x20info,\x20logs,\x20SSE\x20event\x20streams,\x20processor\x20status,\x20backup\x20list.','isDirectory','_clusterWorkerAttached','options','-----BEGIN\x20CERTIFICATE-----\x0a','\x20logs\x20off\x0a','recent\x20writes\x20(newest\x20first)','primaryOkdb','item:update','UNIQUE_CONSTRAINT','resetReadTxn','\x0a\x20\x20Joined.\x20Remote\x20tokens\x20replicated.\x20You\x20can\x20now\x20log\x20in\x20with\x20cluster\x20credentials.\x0a','\x20statusEnv=','\x20type','errors','types\x20--env\x20staging','shmbuf/package.json','__OKDB_PUB_FINGERPRINT__','_listenAddr','data:read','error:\x20','bumpCmd','padStart','decodeActivationToken:\x20expected\x2077\x20bytes,\x20got\x20','[okdb-cluster]\x20CRASH-LOOP:\x20worker\x20slot=','sourcePath','_totalWrites','\x22\x20(hash:\x20','\x20parkedNow=','darwin','importJSON','\x20more)','Processors','\x20\x20(+\x20time-machine)','discoveryTtlMs','BAD_GATEWAY','index:drop','\x27:\x20','indexes','parse','meta','Open\x20licenses\x20cannot\x20exceed\x206\x20months\x20duration\x20(this\x20license\x20expires\x20','copyFile','setHeader','formatListenAddr','../okdb','bold','getDesired','PUB_FINGERPRINT','history',']:\x20transaction\x20ran\x20nested\x20inside\x20a\x20write\x20txn\x20held\x20open\x20by\x20a\x20non-writer\x20caller','timingSafeEqual','copyFileSync','registerType','reads','\x20\x20Common\x20causes:','nodesView','cause','payload','event','OKDBIndexHasConsumersError','Forbidden','isFinite','\x0a\x20\x20[okdb]\x20force-exiting\x20(second\x20interrupt)\x0a','stringify',']\x20already\x20maps\x20to\x20\x27','\x1b[36m','next','sha256','statuses','net','STATUS','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','equals','_userRouteCount','boolean','~licenses','\x20worker\x20slot=','System','clearCookie','emit','removeNode','METHOD_NOT_ALLOWED','drain\x20state\x20(envs\x20with\x20a\x20non-zero\x20drain):','LICENSE_ACTIVATION_INVALID','_loginStates','HTTP_','library\x20(okdb\x20node-model\x202.0).\x20For\x20multi-process\x20HTTP\x20serving\x20use\x20the\x20okdb\x20','add',');\x20','/type/users/query\x0a\x20\x20\x20\x20','dropSchema','ver','reduce','startsWith','getSecurityNotices','round','processorsView','importFromStream','\x20\x20✗','prototype','revoke','\x20\x20(write\x20ring\x20empty\x20—\x20was\x20OKDB_DIAG\x20set\x20before\x20any\x20write?)','value','\x20\x20\x20\x20writes:\x20\x20\x20\x20','enable','BACKUP_PATH_OUTSIDE_ROOT','_desired','database\x20path\x20not\x20writable:\x20','threads','reap','transport:\x20','env/','_flushDebounce','Schema\x20&\x20Indexes','--open','waiting','default','FTS_REGISTERED','readUInt16BE','[okdb]\x20blobs:\x20imported=','BOOTSTRAP_LOCALHOST_ONLY','ingest','Get\x20and\x20list\x20records,\x20run\x20byIndex\x20queries.','SYSTEM_STOPPED','\x20\x20\x20\x20•\x20an\x20activation\x20token\x20\x20(124\x20chars)',',\x20closing…\x0a','_wantDb','params.','time-machine','.okdb-write-test','lmdb','commit','updateSupervisedChildStats','_buckets','_buildChildRow','\x20has\x20canonical\x20metadata\x20but\x20missing\x20valid\x20inputSchema','external','write','(no\x20types)','prependListener','SIGTERM','randomUUID','LICENSE_INVALID','socket','_wrapApiResponse','remaining-fields','/api/env/','attachFeed','decodeLicenseBlob:\x20input\x20must\x20be\x20a\x20string','isConnected','pin','stderr','\x20\x20(need\x20≥\x2018)','_log','[okdb]\x20reset\x20aborted','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20was\x20issued\x20for\x20a\x20different\x20node\x20—\x20share\x20this\x20node\x27s\x20PIN\x20with\x20the\x20vendor.','handle','[okdb]\x20reset:\x20','getCount','\x20SECURITY\x20NOTICE','response','Files','tokenType','\x20file','\x20\x20@','Create,\x20update,\x20and\x20delete\x20records\x20(including\x20bulk\x20import).','changed','Environments','\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','stopped','state','REMOVE','instanceId','\x20(+','--no-repl','_coordinator','_writer','_handleInProcess','include','\x0a[okdb]\x20received\x20','/api/','_putRowAsync','repeat','pathParams','_openEnvLazy','tokenSecret','_handlePoke','addRaw','\x20environment\x20','standard','application/json','isAbsolute','unknown','\x20already\x20exists','_desiredOverlay','setEncoding','push','[okdb]\x20restore\x20complete\x20—\x20full-text\x20indexes\x20rebuild\x20on\x20first\x20open','doctor','closeIdleConnections','License\x20signature\x20invalid:\x20','FOREIGN_KEY_VIOLATION','stack','decoded','perf_hooks','bus:proc','resetFts','copy','_lockDbOf','Write','Invalid\x20index\x20key\x20type\x20for\x20\x27','JWT\x20audience\x20mismatch','Protected\x20(gate)','\x20has\x20ambiguous\x20binding\x20for\x20path\x20field:\x20','RSA-SHA256','bus:type_drop','~files','unique','processor:paused','fts:drop','/api','\x20(okdb\x20','access-control-allow-credentials','test','_rootDb','registry\x20heartbeat\x20skipped\x20(writer=','readFileSync','--version','_blobPath','headers.','_dedupeMax','_buildOwnRow','_dedupeKey','procmodeack/','noteListenAddr','toISOString','kind','backup','\x20\x20\x20\x20name:\x20\x20\x20\x20\x20\x20\x20\x20','user','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20','userAdded','resolveBackupDest','LICENSED_BUILD','\x27\x20is\x20already\x20registered','online','mean','SCHEMA_VALIDATION_FAILED','createHmac','addSupervisedChild','exportToStream','SIGINT\x20(double-tap)','array','\x20has\x20ambiguous\x20binding\x20for\x20query\x20field:\x20','\x20\x20\x20\x20label:\x20\x20\x20\x20\x20\x20\x20','geoConfig','white','.kdbconfig','processor:ready','\x20has\x20illegal\x20binding\x20target\x20for\x20','record','\x0a\x20\x20\x20\x20','licenseHash','dropIndex','hasDesired','\x20\x20║','maxAge','LICENSE_ALREADY_STORED','other','tierList','rawBuf','slice','capable\x20HTTP\x20worker(s)\x20serving\x20:','dropping','ITEM_PENDING','OKDBUniqueConstraintError','_heartbeatTimer','isHeld','processKey','\x20\x20⚠\x20\x20','is\x20not\x20allowed','List\x20types,\x20get\x20type\x20schema,\x20list\x20registered\x20indexes.','\x20\x20\x20\x20\x20http://localhost:','_servingEngines','undefined','search','Validation\x20failed:\x20','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20has\x20expired\x20—\x20request\x20a\x20fresh\x20one.','INDEX_REGISTERED','tmp','schema:drop','kdb_admin_csrf','schema:set','\x20phase=','\x20MB)','Engines','\x20\x20\x20\x201.\x20Send\x20the\x20PIN\x20above\x20(','\x20log\x20level:\x20','send','cookieName','\x20while\x20this\x20process\x20runs\x20','createPublicKey','authenticateRequest','attach','Route\x20','toUTCString','false','caps','_handlePending','/\x20quit\x20/\x20Ctrl+C','indexOf','activate','keep-alive',',\x20stopping\x20workers…\x0a','digest','dedupeMax','license:removed','slotKey','stream','confirm','count','x-okdb-raw-response','[okdb]\x20invalid\x20','Forbidden\x20—\x20requires\x20','realpathSync','_caps','_groupByProcess','parseInt','_runGuards','_copyDir','\x20ipc\x20error:\x20','maxExtra','_done','x-forwarded-for','Environment\x20lifecycle.\x20Listing\x20and\x20creating\x20envs\x20is\x20system-level.','terminal','\x0a\x20\x20License\x20details:','_resolveEnv','resolve','https:','_report','decommissioned','setLogger','red','hasCanonical','SYSTEM_PROC','\x20\x20\x20\x20path:\x20\x20\x20\x20','\x20not\x20found','[okdb]\x20backing\x20up\x20to\x20','use','_clusterOnMessage','Sync','Content-Type','verifyActivation','onLicenseExpired','\x20\x20\x20\x20status:\x20\x20\x20\x20','ms\x20on\x20env=','isBuffer','~system','Examples','\x1b[34m','raw','BACKUP_DEST_NOT_EMPTY','VIEW_PROGRESS','jwk','\x22\x20to\x20enable\x20it.','verify',';\x20Path=','The\x20following\x20routes\x20require\x20auth\x20but\x20declare\x20no\x20permission:\x0a\x20\x20','flushed','number','(unset)','oauth','signalWant','forEach','Build\x20expects\x20public\x20key\x20fingerprint\x20','_adminRelay','\x20\x20\x20\x202.\x20The\x20vendor\x20returns\x20an\x20activation\x20token.','metrics','toUpperCase','dumpedAt','createdAt','okdb.http.listen(port)\x20in\x20each\x20worker.','okdb-writer[','xdg-open\x20','tags:\x20','body','call','LABEL','\x20for\x20commands,\x20','envs','stdout','_lastCpuPct','processor:resumed','Foreign\x20key\x20violation:\x20','set\x20OKDB_DIAG=1\x20(and\x20OKDB_DIAG_STACK=1\x20to\x20name\x20write\x20sites)','_versionSkewWarned','participate','register','dropType','PUBLIC_KEY_PEM','type/users/item/alice','\x20\x20Example:\x20okdb\x20join\x20https://node-a.example.com\x20--token\x20<t>\x20--address\x20http://myhost:8484\x0a','registry-publish','okdb-backup-','password','_admissionTimer','ms\x20max=','assertLimit','⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20','\x20env','open','failures','params.env','_license','claimGated','internalOnly','exportToFile','\x20\x20Path\x20access','_held','_onTick','transport','\x20result','handler','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','_validateOperationRequest','fast','tokenUrl','sort','clearTtl','\x0a\x20\x20No\x20documentation\x20found\x20for:\x20','lifecycle','loadEnvFile','uncaughtException','recordWrite','true','split','internal','isTTY','License\x20expired\x20or\x20invalidated','\x22\x20already\x20exists','routes','[okdb]\x20close\x20error:\x20','exp','statSync','set','delete','audience','./okdb-export.ndjson','body.','system:clock_change','env/staging/info','\x20\x20✓\x20OKDB\x20server\x20running','OKDBForeignKeyDeleteError','[okdb]\x20error:\x20token\x20with\x20name\x20\x22','list','_migrateVocab','_buildProcessingFacet','\x20\x20Expected\x20one\x20of:','isDead','maxMs','\x20\x20Note:\x20this\x20node\x20has\x20existing\x20tokens.\x20They\x20will\x20coexist\x20with\x20cluster\x20tokens\x0a','ms\x20env=','clearLine','isWorker','--inspect','crypto','jwksTtlMs','param','async','primary','files\x20feature\x20not\x20available','isActive','List\x20environments\x20and\x20read\x20environment\x20info.','min','_activateProcessesReader','--username','transactionSync','[okdb]\x20error:\x20join\x20requires\x20credentials.\x20Provide\x20--token\x20<t>\x20or\x20--username\x20<u>\x20--password\x20<p>','commitP99Ms','ACTIVATION_EXPIRED','cli','\x20\x20after\x20sync.\x20Duplicate\x20names\x20will\x20surface\x20as\x20ambiguous\x20logins\x20to\x20clean\x20up.','transaction','_validateOidcAccessToken','Server-side\x20user-defined\x20functions\x20registered\x20per\x20environment.','\x20\x20(press\x20Ctrl+C\x20again\x20to\x20exit)\x0a','INVALID_PRIMARY_KEY','quantum','flushLmdb','integer','[okdb]\x20port\x20','1MtvMKq','1ofN:','_heartbeatInFlight','methods','scopes','_sampleOwnStats','process','markClosed','Records','_startedAt','every','listen','/type/users/item/alice\x0a\x20\x20\x20\x20','~lock','update','writeUInt32BE','ttl:expired','level','ref:violation','List\x20functions\x20and\x20inspect\x20their\x20source.','clearThreadStats','ieee-p1363','_isStale','\x0a\x20\x20Invalid\x20JSON:\x20','<path>','email','\x20\x20\x20\x20addedAt:\x20\x20\x20','bytes','heartbeatMs','validateBlobIntegrity','items','compact','_hbTimer','Operator\x20surface:\x20server\x20info,\x20logs,\x20event\x20streams,\x20processor\x20status,\x20backups.','Invalid\x20activation\x20token:\x20','Cannot\x20set\x20enforce\x20schema\x20on\x20','tags','singletonClaims','access','runtimeProcessesView','—\x20/api/\x20is\x20auto-prefixed,\x20env\x20is\x20auto-injected','catch','\x20\x20Shell\x20commands','cf-ray','x5c','refs','getPins','compaction','--key','Payload\x20too\x20large','_closed','_durs','from','single','wrong_node','getRange','\x20\x20\x20\x20\x20\x20\x20POST\x20(body\x20implies\x20POST)\x0a\x20\x20','OKDB_HTTP_WORKERS\x20env','allowMethods','cyan','\x20\x20✓\x20Revoked\x20token\x20','loop-lag\x20','keys/public.pem','POST','2672021TfxHaW','SIG_INVALID','sig','summary','_timer','\x20missing\x20path\x20field\x20in\x20inputSchema:\x20','release','present','\x20\x20\x20\x203.\x20Run:\x20\x20okdb\x20license\x20<activation-token>','raw-put','\x20\x20\x20\x20\x20explicit\x20method\x0a\x0a\x20\x20','_getJwkKey','\x20deleted','files','[okdb]\x20nothing\x20to\x20reset\x20—\x20',':\x20expected\x20','http-server','claims','origin','\x20\x20skipped=','listLicenses','endsWith','reset','parts','_draining','application/x-www-form-urlencoded','_onPending','Cannot\x20delete\x20','oldestPendingMs','\x20license\x20—\x20no\x20activation\x20needed)','~processes','TYPE_ALREADY_REGISTERED','Origin','\x20\x20Some\x20checks\x20failed.\x0a','existsSync','scrypt','data','823140juqrar','concat','Materialized\x20views:\x20query\x20definitions\x20that\x20are\x20continuously\x20maintained\x20and\x20queryable.','includes','platform','%),\x20','examples','_seen','raw-remove','[okdb]\x20error:\x20unrecognized\x20input:\x20\x22','listDesired','_nodeDbCache','~blobs','\x20→\x20POST\x20/api/env/','migrations','race','querySchema','map','isInteger','spki','\x0a\x20\x20Usage:\x20use\x20<env-name>\x0a','[okdb]\x20imported\x20\x20types=','event:\x20','logRequests','_quarantinedEnvs','trim','params','_kind','_lastCpuUsage','jwksUri','\x20license(s)','extend','\x20\x20✗\x20','_cookieName','542007kqAmgY',':want','decommissioning','permission','status','\x20worker(s)\x20still\x20serving','Execute\x20functions\x20over\x20HTTP/MCP/shell.','[filter]','\x0a\x20\x20','_authOptions','index','.\x20Move\x20it\x20away\x20first\x20to\x20use\x20the\x20copy.','precision','floor','clear','basename','ceil','dropFts','BAD_HOST','ref:violation_resolved','\x20writes\x20(','tryAcquire','features','\x22\x20—\x20choose\x20a\x20directory\x20outside\x20it','_enforceOperationAccess','type','BACKUP_MANIFEST','__esModule','_processStartedAt','(null)','unclaimed','percentile','\x1b[31m','respawnTimer','SWAP','unlinkSync','slot','data:\x20','\x0d[okdb]\x20','use\x20<env>','once','[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a','token','outputSchema','loop-lag','_onStop','_maybePublish','export','writes','BACKUP_DEST_INSIDE_STORE','exclusiveStart','HEAD','root','http','[okdb]\x20opening\x20','sync:apply','jwks_uri','\x20process','queue','_wantDbHandle','label','Register,\x20update,\x20and\x20delete\x20function\x20definitions.','\x20HTTP\x20workers\x20','expired','FTS_DROP','\x20\x20Or\x20set\x20sync.address\x20in\x20.kdbconfig','__okdbSlot','\x20\x20\x20\x20port:\x20\x20','OKDBError','[okdb-cluster]\x20primary\x20pid=','\x20\x20\x20\x20expires:\x20\x20\x20','USE','find','_onItem','startedAt','resetIndex','\x20has\x20invalid\x20http.bodyMode:\x20','Unknown\x20error','detectInputType','running','Views',';\x20HttpOnly','NOT_IMPLEMENTED','failed\x20to\x20open','\x20\x20✓\x20database\x20opened\x0a','defaults','_changefeed','(add\x20a\x20license\x20first)','[okdb-cluster]\x20slot=','message','path','children','(worst\x20','Invalid\x20token','Index\x20\x27','__okdbCluster','end','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','ENV','engines',';\x20shmbuf\x20native\x20missing\x20→\x20forced\x20single-process','type/users','OKDBTypeNotRegisteredError','values','close','heapTotal','(?:','\x20\x20Usage:','writeFileSync','blobs','signCookie','padEnd','readMs','bind','deregisterSelf','onWindow','\x0a\x20\x20Joining\x20cluster\x20at\x20','\x0a[okdb]\x20fatal\x20error:','removeLicense','protected:write','remoteAddress','remove','files/','OKDBNotFoundError','\x20uses\x20raw\x20bodyMode\x20without\x20addRaw/raw\x20route\x20metadata','INVALID_VALUE','system:poke','_nestedWarned','pid','_store','\x22\x20matches\x20','_singletonLocks','events','license:invalid','_enqueuedAt','authRequired',',\x20signal=','change','SIGINT','exports','database\x20path\x20writable:\x20','dim','Bearer\x20','types/env=','JWT\x20signature\x20verification\x20failed','hex','bodyMode','.kdb_history','_flushTimer','config','_active','derived;\x20rebuilt\x20from\x20source\x20docs\x20on\x20first\x20open\x20of\x20the\x20restored\x20store','allowedAlgs','Schema\x20validation\x20failed\x20for\x20','mixed\x20versions\x20on\x20one\x20store\x20are\x20unsafe\x20across\x20storage\x20migrations;\x20align\x20versions\x20before\x20upgrading\x20further.','OKDBIndexNotRegisteredError','shmbufNative','ITEM_REMOVE','\x20\x20Usage:\x20okdb\x20license\x20[<blob|path|uuid|activation-token>]','allocUnsafe','_lastCpuWindowMs','ttlMs','_key','_rowKey','stopHeartbeat','HTTP_CLUSTER_REMOVED','isFile','importFromFile','code','_totalReads','stats','--log-requests','Blob\x20on\x20disk\x20has\x20no\x20~files\x20record\x20in\x20any\x20env\x20(hash:\x20','base64','_drainOne','json','fts:reset','_collectWriterFacet','target\x20','selfAddress','processor:progress','authorizationUrl','clock','importBlobs','.\x20Add\x20a\x20license\x20that\x20includes\x20\x22','header','node:events',':\x20connected\x0a\x0a','_started','relative','fork','LICENSEE','\x20\x20\x20\x20api:\x20\x20\x20\x20\x20http://localhost:','peers=','--env\x20<name>','time','\x20\x20\x20\x20path:\x20\x20','--log-level','_blobStatusDb','_collectSingletonClaims','[okdb]\x20cluster\x20close\x20error:\x20','records','setOwnMeta','txn:start',';\x20SameSite=','nodeKey','okdbVersion','admin','standalone','draining','Lax','_clusterOrphanWatch','Records\x20inside\x20your\x20types\x20—\x20the\x20actual\x20rows\x20you\x20store.','_resolveOrCreateEnv','authorization','\x22\x20→\x20','List\x20views,\x20query\x20view\x20output,\x20inspect\x20metadata\x20and\x20definition.','_participate','_role','yellow','64040olwQLB','logs','\x1b[90m','_instanceId','hash','auth','pending','Validation\x20failed','VERSION_MISMATCH','License\x20limit\x20exceeded:\x20'];_0x9790=function(){return _0x282ce4;};return _0x9790();}var okdbPubkey,hasRequiredOkdbPubkey;function requireOkdbPubkey(){const _0x2b59e1=_0x563deb;if(hasRequiredOkdbPubkey)return okdbPubkey;hasRequiredOkdbPubkey=0x1;const _0x3820db=require$$0$1,_0x4d9310=require$$1,_0x30a961=require$$2$1,_0x2e1e49=_0x3820db[_0x2b59e1(0x3b9)](_0x4d9310[_0x2b59e1(0x139)](__dirname,_0x2b59e1(0x501)),_0x2b59e1(0x714))[_0x2b59e1(0x541)](),_0x33152b=_0x30a961['createPublicKey'](_0x2e1e49)[_0x2b59e1(0x579)]({'type':_0x2b59e1(0x53b),'format':_0x2b59e1(0x94)}),_0x2b508d=_0x30a961['createHash'](_0x2b59e1(0x31a))[_0x2b59e1(0x4d1)](_0x33152b)[_0x2b59e1(0x411)](_0x2b59e1(0x5db))[_0x2b59e1(0x3e6)](0x0,0x10);return okdbPubkey={'PUBLIC_KEY_PEM':_0x2e1e49,'PUB_FINGERPRINT':_0x2b508d},okdbPubkey;}var okdbLicense,hasRequiredOkdbLicense;function requireOkdbLicense(){const _0x528a5e=_0x563deb;if(hasRequiredOkdbLicense)return okdbLicense;hasRequiredOkdbLicense=0x1;const _0x571921=require$$2$1,{OKDBError:_0x442e5c}=requireOkdbError(),{EVENTS:_0x29b01a}=requireOkdbEnums(),_0x1e6bb1=requireOkdbLicenseCodec(),{LICENSE_TYPE_OPEN:_0x13ebed,LICENSE_TYPE_INTERNAL:_0x133709,OPEN_LICENSE_MAX_DURATION_MS:_0x2fc189}=_0x1e6bb1,_0x28932b=requireOkdbPubkey(),_0x6d1ba2={'LICENSED_BUILD':_0x528a5e(0x48a),'PUBLIC_KEY_PEM':_0x28932b[_0x528a5e(0x467)],'PUB_FINGERPRINT':_0x28932b[_0x528a5e(0x306)],'LICENSE_EXPIRED_ACTION':_0x528a5e(0x116)},_0x24e8b7=_0x528a5e(0x322),_0x331ed6={'features':{'sync':![],'embeddings':!![],'engines':![],'fts':!![],'timeMachine':![],'views':!![],'mcp':!![],'files':!![]},'limits':{'envs':0x5,'typesPerEnv':0xa,'syncPeers':0x0,'maxWrites':0xf4240,'pipelinesPerEnv':0x2},'_isFree':!![]};async function _0x27b02b(_0x2f583e){const _0x15b173=_0x528a5e;await _0x2f583e[_0x15b173(0x641)](_0x24e8b7);}class _0xe6a607{constructor(_0x2125c1){const _0x20e991=_0x528a5e;this[_0x20e991(0x11b)]=_0x2125c1,this['_active']=null;}async[_0x528a5e(0x688)](){const _0x4861a0=_0x528a5e,_0x367cbe=this['okdb'][_0x4861a0(0x648)];if(!_0x367cbe||!_0x367cbe['hasType'](_0x24e8b7)){this[_0x4861a0(0x5e0)]=null;return;}const _0x3ded34=this[_0x4861a0(0x11b)]['id'];let _0x1c7dbc=null;for(const {key:_0x2e04e2,value:_0x172d25}of _0x367cbe[_0x4861a0(0x4fa)](_0x24e8b7)){const _0x5ed541=this[_0x4861a0(0x1b7)](_0x172d25,_0x3ded34);_0x5ed541===_0x4861a0(0x238)&&!_0x1c7dbc&&(_0x1c7dbc={..._0x172d25,'id':_0x2e04e2,'status':_0x5ed541});}this[_0x4861a0(0x5e0)]=_0x1c7dbc;if(this[_0x4861a0(0x5e0)]&&this[_0x4861a0(0x5e0)][_0x4861a0(0x2b6)]===_0x13ebed){const _0x125895=Math[_0x4861a0(0x55a)]((this[_0x4861a0(0x5e0)][_0x4861a0(0x6aa)]-Date[_0x4861a0(0x28a)]())/0x5265c00);this[_0x4861a0(0x11b)][_0x4861a0(0x116)]?.[_0x4861a0(0x14c)](_0x4861a0(0x470)+_0x125895+'\x20day(s).',{'feature':_0x4861a0(0x226),'licensee':this[_0x4861a0(0x5e0)][_0x4861a0(0x2c3)],'expiresAt':new Date(this[_0x4861a0(0x5e0)][_0x4861a0(0x6aa)])[_0x4861a0(0x3c2)]()});}this['_active']&&this['_active']['licenseType']===_0x133709&&this[_0x4861a0(0x11b)][_0x4861a0(0x116)]?.['warn']('⚠\x20INTERNAL\x20LICENSE\x20ACTIVE\x20—\x20all\x20features\x20and\x20limits\x20are\x20unlocked.\x20For\x20vendor/internal\x20use\x20only.',{'feature':_0x4861a0(0x226),'licensee':this[_0x4861a0(0x5e0)][_0x4861a0(0x2c3)]});}['_computeStatus'](_0x10a754,_0x30adf2){const _0x31ee6b=_0x528a5e;if(!_0x10a754[_0x31ee6b(0x6ca)])return'invalid';let _0x1004a6;try{_0x1004a6=_0x1e6bb1[_0x31ee6b(0x6cb)](_0x10a754[_0x31ee6b(0x6ca)]);}catch(_0x546c51){return'invalid';}try{const _0x25c065=_0x571921['verify'](null,_0x1004a6[_0x31ee6b(0x310)],_0x6d1ba2[_0x31ee6b(0x467)],_0x1004a6['sig']);if(!_0x25c065)return _0x31ee6b(0xbc);}catch(_0x7658ff){return _0x31ee6b(0xbc);}if(_0x1004a6[_0x31ee6b(0x3a2)]['licenseType']===_0x133709)return _0x31ee6b(0x238);if(_0x1004a6[_0x31ee6b(0x3a2)]['expiresAt']<=Date[_0x31ee6b(0x28a)]())return _0x31ee6b(0x589);if(_0x1004a6[_0x31ee6b(0x3a2)][_0x31ee6b(0x2b6)]===_0x13ebed)return _0x31ee6b(0x238);if(!_0x10a754[_0x31ee6b(0x673)])return _0x31ee6b(0x62c);const _0x1ac748=_0x1e6bb1[_0x31ee6b(0x438)]({'tokenString':_0x10a754[_0x31ee6b(0x673)],'nodeId':_0x30adf2,'rawBlobBuf':_0x1004a6['rawBuf'],'pubKeyPem':_0x6d1ba2['PUBLIC_KEY_PEM'],'pubFingerprint':_0x6d1ba2[_0x31ee6b(0x306)]});if(_0x1ac748[_0x31ee6b(0x2ad)]===_0x31ee6b(0x724)||_0x1ac748[_0x31ee6b(0x2ad)]===_0x31ee6b(0x504))return _0x31ee6b(0x4f9);if(_0x1ac748[_0x31ee6b(0x2ad)]==='ACTIVATION_EXPIRED')return _0x31ee6b(0x589);if(!_0x1ac748['valid'])return _0x31ee6b(0x4f9);return _0x31ee6b(0x238);}get['active'](){return this['_active'];}get[_0x528a5e(0x2c5)](){const _0x2b6f16=_0x528a5e;return this[_0x2b6f16(0x5e0)]??_0x331ed6;}[_0x528a5e(0x1d1)](_0x399ca4){const _0x2937c0=_0x528a5e;if(_0x6d1ba2[_0x2937c0(0x3ca)]!==_0x2937c0(0x48a))return;const _0x119244=this['effective'];if(!_0x119244['features']?.[_0x399ca4]){const _0x294d0e=_0x119244[_0x2937c0(0x1cc)]?_0x2937c0(0x1ad)+_0x399ca4+_0x2937c0(0x602)+_0x399ca4+_0x2937c0(0x444):'Feature\x20not\x20licensed:\x20'+_0x399ca4+_0x2937c0(0x717)+_0x399ca4+'\x22.';throw new _0x442e5c(_0x294d0e,_0x2937c0(0xc9),{'feature':_0x399ca4});}}[_0x528a5e(0x18c)](_0x49d86d){const _0x440c21=_0x528a5e;if(_0x6d1ba2[_0x440c21(0x3ca)]!==_0x440c21(0x48a))return!![];return!!this[_0x440c21(0x2c5)][_0x440c21(0x560)]?.[_0x49d86d];}['hasLimit'](_0x398920){const _0x597f4f=_0x528a5e;if(_0x6d1ba2[_0x597f4f(0x3ca)]!=='true')return![];const _0x3da9af=this[_0x597f4f(0x2c5)][_0x597f4f(0x268)]?.[_0x398920];return!(_0x3da9af===null||_0x3da9af===undefined||_0x3da9af===0x0);}[_0x528a5e(0x46f)](_0x56aac7,_0xfcf708){const _0x5390d6=_0x528a5e;if(_0x6d1ba2['LICENSED_BUILD']!=='true')return;const _0x3bd832=this['effective'],_0xcd0275=_0x3bd832['limits']?.[_0x56aac7];if(_0xcd0275===null||_0xcd0275===undefined||_0xcd0275===0x0)return;if(_0xfcf708>=_0xcd0275)throw new _0x442e5c(_0x5390d6(0x62f)+_0x56aac7+'\x20('+_0xfcf708+'/'+_0xcd0275+')','LICENSE_LIMIT_EXCEEDED',{'limit':_0x56aac7,'current':_0xfcf708,'max':_0xcd0275});}async[_0x528a5e(0x2a9)](_0x383fae){const _0x16e3fc=_0x528a5e;let _0x466e96;try{_0x466e96=_0x1e6bb1[_0x16e3fc(0x6cb)](_0x383fae);}catch(_0xd041f3){throw new _0x442e5c(_0x16e3fc(0x22b)+_0xd041f3[_0x16e3fc(0x5a3)],_0x16e3fc(0x365));}let _0x49ace7;try{_0x49ace7=_0x571921[_0x16e3fc(0x445)](null,_0x466e96['payload'],_0x6d1ba2[_0x16e3fc(0x467)],_0x466e96[_0x16e3fc(0x505)]);}catch(_0x5e8ced){throw new _0x442e5c(_0x16e3fc(0x39f)+_0x5e8ced[_0x16e3fc(0x5a3)],_0x16e3fc(0x365));}if(!_0x49ace7)throw new _0x442e5c('License\x20signature\x20invalid\x20—\x20this\x20license\x20was\x20not\x20signed\x20by\x20the\x20key\x20paired\x20with\x20this\x20build.\x20'+(_0x16e3fc(0x44e)+_0x6d1ba2[_0x16e3fc(0x306)]+'.\x20')+'Either\x20the\x20build\x20was\x20made\x20with\x20a\x20different\x20keypair,\x20or\x20the\x20license\x20was\x20issued\x20with\x20a\x20different\x20private\x20key.',_0x16e3fc(0x365),{'expectedFingerprint':_0x6d1ba2[_0x16e3fc(0x306)]});if(_0x466e96['decoded']['licenseType']===_0x13ebed){const _0x1ab8d2=_0x466e96[_0x16e3fc(0x3a2)]['expiresAt']-_0x466e96[_0x16e3fc(0x3a2)][_0x16e3fc(0x205)];if(_0x1ab8d2>_0x2fc189)throw new _0x442e5c(_0x16e3fc(0x2ff)+Math[_0x16e3fc(0x55a)](_0x1ab8d2/(0x1e*0x5265c00))+'\x20months\x20from\x20issuance)',_0x16e3fc(0x365));}const _0x4da9af=this[_0x16e3fc(0x11b)][_0x16e3fc(0x648)];await _0x27b02b(_0x4da9af);const _0x1dd76a=_0x1e6bb1[_0x16e3fc(0x3dd)](_0x466e96[_0x16e3fc(0x3e5)])[_0x16e3fc(0x299)](_0x16e3fc(0x5db));for(const {key:_0x2faaca,value:_0x4dc274}of _0x4da9af[_0x16e3fc(0x4fa)](_0x24e8b7)){if(_0x4dc274[_0x16e3fc(0x2d0)]===_0x1dd76a)throw new _0x442e5c(_0x16e3fc(0x134),_0x16e3fc(0x3e2),{'id':_0x2faaca});}const _0x401fd2=_0x571921['createHash']('sha256')[_0x16e3fc(0x4d1)](_0x16e3fc(0x96))[_0x16e3fc(0x4d1)](_0x466e96[_0x16e3fc(0x3e5)])[_0x16e3fc(0x411)](_0x16e3fc(0x5db)),_0x2447cf=_0x401fd2[_0x16e3fc(0x3e6)](0x0,0x8)+'-'+_0x401fd2[_0x16e3fc(0x3e6)](0x8,0xc)+'-5'+_0x401fd2[_0x16e3fc(0x3e6)](0xd,0x10)+'-'+(parseInt(_0x401fd2[0x10],0x10)&0x3|0x8)[_0x16e3fc(0x299)](0x10)+_0x401fd2[_0x16e3fc(0x3e6)](0x11,0x14)+'-'+_0x401fd2[_0x16e3fc(0x3e6)](0x14,0x20),_0x2cee08={'blob':_0x383fae,'activation':null,'addedAt':Date[_0x16e3fc(0x28a)](),'_licenseHash':_0x1dd76a,'licensee':_0x466e96[_0x16e3fc(0x3a2)][_0x16e3fc(0x2c3)],'expiresAt':_0x466e96[_0x16e3fc(0x3a2)]['expiresAt'],'features':_0x466e96[_0x16e3fc(0x3a2)][_0x16e3fc(0x560)],'limits':_0x466e96['decoded'][_0x16e3fc(0x268)],'licenseType':_0x466e96[_0x16e3fc(0x3a2)]['licenseType']};return await _0x4da9af['put'](_0x24e8b7,_0x2447cf,_0x2cee08),{'id':_0x2447cf,..._0x2cee08};}async[_0x528a5e(0x644)](_0x1c2d95){const _0x133928=_0x528a5e;let _0x2a58ea;try{_0x2a58ea=_0x1e6bb1['decodeActivationToken'](_0x1c2d95);}catch(_0xc73768){throw new _0x442e5c(_0x133928(0x4e5)+_0xc73768[_0x133928(0x5a3)],_0x133928(0x32a));}const _0x5af02f=_0x2a58ea[_0x133928(0x3dd)][_0x133928(0x299)](_0x133928(0x5db)),_0x192aa7=this[_0x133928(0x11b)]['_systemEnv'];if(!_0x192aa7||!_0x192aa7[_0x133928(0x135)](_0x24e8b7))throw new _0x442e5c('No\x20license\x20found\x20matching\x20this\x20activation\x20token',_0x133928(0x32a));let _0x4dadd8=null,_0x31f7b9=null;for(const {key:_0x23646f,value:_0x404cd7}of _0x192aa7['getRange'](_0x24e8b7)){if(_0x404cd7[_0x133928(0x2d0)]===_0x5af02f){_0x4dadd8=_0x23646f,_0x31f7b9=_0x404cd7;break;}}if(!_0x4dadd8)throw new _0x442e5c(_0x133928(0x258),_0x133928(0x32a));const {rawBuf:_0x3b5486}=_0x1e6bb1[_0x133928(0x6cb)](_0x31f7b9['blob']),_0x231cb9=_0x1e6bb1[_0x133928(0x438)]({'tokenString':_0x1c2d95,'nodeId':this[_0x133928(0x11b)]['id'],'rawBlobBuf':_0x3b5486,'pubKeyPem':_0x6d1ba2[_0x133928(0x467)],'pubFingerprint':_0x6d1ba2[_0x133928(0x306)]});if(!_0x231cb9[_0x133928(0x16d)])throw new _0x442e5c(_0x133928(0x293)+_0x231cb9[_0x133928(0x2ad)],_0x133928(0x32a),{'reason':_0x231cb9[_0x133928(0x2ad)]});const _0x5c8c1c={..._0x31f7b9,'activation':_0x1c2d95};return await _0x192aa7['update'](_0x24e8b7,_0x4dadd8,_0x5c8c1c),{'id':_0x4dadd8,..._0x5c8c1c};}async[_0x528a5e(0x5c0)](_0x43702e){const _0x395c55=_0x528a5e,_0x386ea1=this[_0x395c55(0x11b)]['_systemEnv'];if(!_0x386ea1||!_0x386ea1['hasType'](_0x24e8b7))return;await _0x386ea1[_0x395c55(0x5c3)](_0x24e8b7,_0x43702e);}async[_0x528a5e(0x517)](){const _0x30ff59=_0x528a5e,_0x5ab087=this[_0x30ff59(0x11b)][_0x30ff59(0x648)];if(!_0x5ab087||!_0x5ab087['hasType'](_0x24e8b7))return[];const _0x2f15ce=this[_0x30ff59(0x11b)]['id'],_0x38548c=[];for(const {key:_0x234e00,value:_0x1b6b9b}of _0x5ab087[_0x30ff59(0x4fa)](_0x24e8b7)){const _0x29a94f=this[_0x30ff59(0x1b7)](_0x1b6b9b,_0x2f15ce);_0x38548c[_0x30ff59(0x39b)]({..._0x1b6b9b,'id':_0x234e00,'status':_0x29a94f});}return _0x38548c;}[_0x528a5e(0x4f1)](){const _0x3e52ae=_0x528a5e,_0x3f6c48=this[_0x3e52ae(0x11b)]['_systemEnv'];if(!_0x3f6c48||!_0x3f6c48[_0x3e52ae(0x135)](_0x24e8b7))return[];const _0x37e7e5=this['okdb']['id'],_0x58f270=[];for(const {key:_0xa0488e,value:_0x1a1ba6}of _0x3f6c48['getRange'](_0x24e8b7)){if(_0x1a1ba6['_licenseHash']){if(_0x1a1ba6[_0x3e52ae(0x2b6)]===_0x13ebed)_0x58f270[_0x3e52ae(0x39b)]({'licenseId':_0xa0488e,'pin':null});else{const _0x2d5241=Buffer[_0x3e52ae(0x4f7)](_0x1a1ba6[_0x3e52ae(0x2d0)],_0x3e52ae(0x5db)),{pin:_0x205122}=_0x1e6bb1['derivePin'](_0x37e7e5,_0x2d5241,_0x6d1ba2[_0x3e52ae(0x306)]);_0x58f270[_0x3e52ae(0x39b)]({'licenseId':_0xa0488e,'pin':_0x205122});}}}return _0x58f270;}async['recheck'](){const _0x2e6857=_0x528a5e,_0x2ea276=this[_0x2e6857(0x5e0)];await this['reload']();if(this[_0x2e6857(0x5e0)]&&this[_0x2e6857(0x5e0)][_0x2e6857(0x2b6)]===_0x13ebed){const _0x5cbbf9=Math[_0x2e6857(0x55a)]((this[_0x2e6857(0x5e0)][_0x2e6857(0x6aa)]-Date['now']())/0x5265c00);this[_0x2e6857(0x11b)][_0x2e6857(0x116)]?.[_0x2e6857(0x14c)](_0x2e6857(0x470)+_0x5cbbf9+'\x20day(s).',{'feature':_0x2e6857(0x226),'licensee':this[_0x2e6857(0x5e0)][_0x2e6857(0x2c3)],'expiresAt':new Date(this[_0x2e6857(0x5e0)][_0x2e6857(0x6aa)])['toISOString']()});}this[_0x2e6857(0x5e0)]&&this[_0x2e6857(0x5e0)][_0x2e6857(0x2b6)]===_0x133709&&this[_0x2e6857(0x11b)][_0x2e6857(0x116)]?.[_0x2e6857(0x14c)]('⚠\x20INTERNAL\x20LICENSE\x20ACTIVE\x20—\x20all\x20features\x20and\x20limits\x20are\x20unlocked.\x20For\x20vendor/internal\x20use\x20only.',{'feature':_0x2e6857(0x226),'licensee':this['_active'][_0x2e6857(0x2c3)]});if(_0x2ea276&&!this['_active']){this[_0x2e6857(0x11b)][_0x2e6857(0x116)]?.['warn'](_0x2e6857(0x48e),{'feature':_0x2e6857(0x226)}),this[_0x2e6857(0x11b)][_0x2e6857(0x5ce)]?.[_0x2e6857(0x326)](_0x29b01a[_0x2e6857(0x365)],{'previous':_0x2ea276});const _0x128d83=this[_0x2e6857(0x11b)][_0x2e6857(0x2d9)]?.[_0x2e6857(0x439)]??_0x6d1ba2[_0x2e6857(0x1cb)];_0x128d83===_0x2e6857(0x8f)&&(this['okdb']['log']?.[_0x2e6857(0x271)]('Shutting\x20down\x20due\x20to\x20license\x20expiry',{'feature':_0x2e6857(0x226)}),this[_0x2e6857(0x11b)][_0x2e6857(0x5b2)]()['catch'](()=>{})[_0x2e6857(0x183)](()=>process[_0x2e6857(0x719)](0x1)));}}}return okdbLicense={'LicenseChecker':_0xe6a607,'_C':_0x6d1ba2,'FREE_TIER':_0x331ed6},okdbLicense;}var okdbShell,hasRequiredOkdbShell;function requireOkdbShell(){const _0x2b6d91=_0x563deb;if(hasRequiredOkdbShell)return okdbShell;hasRequiredOkdbShell=0x1;const _0x5c47c0=require$$0$3,_0x29785e=require$$0$1,_0x40e879=require$$0,_0x4dfc13=require$$1,_0x4b79c6=_0x4dfc13[_0x2b6d91(0x139)](_0x40e879['homedir'](),_0x2b6d91(0x5dd)),_0x40e1cc=0x3e8,_0x40cb16={'reset':_0x2b6d91(0x69b),'bold':'\x1b[1m','dim':'\x1b[2m','red':_0x2b6d91(0x56a),'green':'\x1b[32m','yellow':_0x2b6d91(0x20d),'blue':_0x2b6d91(0x43f),'magenta':_0x2b6d91(0x68d),'cyan':_0x2b6d91(0x318),'white':'\x1b[37m','gray':_0x2b6d91(0x628)},_0x14e87c=!process['stdout'][_0x2b6d91(0x48d)]||!!process.env.NO_COLOR,_0x5de7e0=(_0x1062a4,_0x142caf)=>_0x14e87c?_0x142caf:''+_0x1062a4+_0x142caf+_0x40cb16[_0x2b6d91(0x519)],_0x2dd384={'error':_0x40cb16[_0x2b6d91(0x42e)],'warn':_0x40cb16['yellow'],'info':_0x40cb16[_0x2b6d91(0x4fe)],'debug':_0x40cb16['gray']},_0x576140={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3};function _0x2461cb(_0x230c9a,_0x39608a=_0x2b6d91(0x213)){const _0x3da89b=_0x2b6d91,{level:_0x1cc97e,msg:_0x3f72bc,meta:_0x5e556e,context:_0x46fac2,ts:_0x14a23f}=_0x230c9a;if((_0x576140[_0x1cc97e]??0x1)<(_0x576140[_0x39608a]??0x1))return;const _0x4bab9f=_0x5de7e0(_0x40cb16[_0x3da89b(0xd2)],new Date(_0x14a23f)[_0x3da89b(0x3c2)]()),_0x113acc=_0x5de7e0(_0x2dd384[_0x1cc97e]??_0x40cb16[_0x3da89b(0x3d7)],_0x1cc97e['padEnd'](0x5));let _0x450bfc='\x20\x20'+_0x4bab9f+'\x20'+_0x5de7e0(_0x40cb16['bold'],_0x113acc)+'\x20'+_0x3f72bc;if(_0x5e556e&&Object[_0x3da89b(0x2b3)](_0x5e556e)['length']>0x0){const _0x13aa37=Object['entries'](_0x5e556e)[_0x3da89b(0x539)](([_0xda0fda,_0x2d89db])=>_0xda0fda+'='+_0x2d89db)[_0x3da89b(0x139)]('\x20');_0x450bfc+=_0x5de7e0(_0x40cb16['dim'],'\x20\x20['+_0x13aa37+']');}if(_0x46fac2!==undefined){const _0x4150b3=typeof _0x46fac2===_0x3da89b(0x245)?JSON[_0x3da89b(0x316)](_0x46fac2):String(_0x46fac2);_0x450bfc+=_0x5de7e0(_0x40cb16[_0x3da89b(0x5d7)],'\x20\x20'+_0x4150b3);}const _0x567a90=_0x1cc97e===_0x3da89b(0x271)||_0x1cc97e===_0x3da89b(0x14c)?process['stderr']['write']['bind'](process[_0x3da89b(0x36e)]):process[_0x3da89b(0x45e)][_0x3da89b(0x360)][_0x3da89b(0x5bb)](process['stdout']);_0x567a90(_0x450bfc+'\x0a');}function _0x312681(_0x4eed88,_0x33be7c){const _0xd63841=_0x2b6d91;if(_0x4eed88===0xcc||_0x4eed88>=0xc8&&_0x4eed88<0x12c&&!_0x33be7c){console['log'](_0xd63841(0x552)+_0x5de7e0(_0x40cb16['green'],'✓')+'\x0a');return;}if(_0x4eed88>=0x190||_0x33be7c?.[_0xd63841(0x271)]){const _0x54eda8=_0x33be7c?.[_0xd63841(0x271)]??_0x33be7c?.['message']??_0xd63841(0x15e)+_0x4eed88;console[_0xd63841(0x116)](_0xd63841(0x552)+_0x5de7e0(_0x40cb16[_0xd63841(0x42e)],'✗')+'\x20'+_0x5de7e0(_0x40cb16[_0xd63841(0x304)]+_0x40cb16[_0xd63841(0x42e)],String(_0x4eed88))+'\x20\x20'+_0x54eda8+'\x0a');return;}const _0x5d0b24=Object[_0xd63841(0x33a)][_0xd63841(0x296)][_0xd63841(0x45a)](_0x33be7c??{},_0xd63841(0x703))?_0x33be7c[_0xd63841(0x703)]:_0x33be7c,_0x2b48c4=_0x33be7c?.['meta'];console[_0xd63841(0x116)](''),_0x1e3eda(_0x5d0b24,'\x20\x20');if(_0x2b48c4?.[_0xd63841(0x417)]!=null||_0x2b48c4?.['time']!=null){const _0x5681e4=[];if(_0x2b48c4[_0xd63841(0x417)]!=null)_0x5681e4[_0xd63841(0x39b)](_0x2b48c4[_0xd63841(0x417)]+_0xd63841(0x47d)+(_0x2b48c4[_0xd63841(0x417)]!==0x1?'s':''));if(_0x2b48c4[_0xd63841(0x60d)]!=null)_0x5681e4[_0xd63841(0x39b)](_0x2b48c4[_0xd63841(0x60d)]+'ms');console[_0xd63841(0x116)](_0xd63841(0x552)+_0x5de7e0(_0x40cb16[_0xd63841(0x5d7)],_0x5681e4[_0xd63841(0x139)]('\x20\x20·\x20\x20')));}console[_0xd63841(0x116)]('');}function _0x1e3eda(_0x5d5800,_0x3075d2=''){const _0x3f6ebb=_0x2b6d91;if(_0x5d5800===null||_0x5d5800===undefined){console[_0x3f6ebb(0x116)](_0x3075d2+_0x5de7e0(_0x40cb16[_0x3f6ebb(0x5d7)],_0x3f6ebb(0x567)));return;}if(Array[_0x3f6ebb(0x17b)](_0x5d5800)){if(_0x5d5800[_0x3f6ebb(0x249)]===0x0){console[_0x3f6ebb(0x116)](_0x3075d2+_0x5de7e0(_0x40cb16[_0x3f6ebb(0x5d7)],_0x3f6ebb(0x2b1)));return;}if(_0x5d5800[_0x3f6ebb(0x4cd)](_0x3b7c17=>_0x3b7c17&&typeof _0x3b7c17===_0x3f6ebb(0x245)&&_0x3f6ebb(0x6eb)in _0x3b7c17&&_0x3f6ebb(0x33d)in _0x3b7c17)){_0x247a64(_0x5d5800,_0x3075d2);return;}if(_0x5d5800[_0x3f6ebb(0x4cd)](_0x4e3817=>_0x4e3817&&typeof _0x4e3817===_0x3f6ebb(0x245)&&_0x3f6ebb(0x563)in _0x4e3817&&_0x3f6ebb(0x417)in _0x4e3817)){_0xbcdee7(_0x5d5800,_0x3075d2);return;}if(_0x5d5800['every'](_0x141750=>typeof _0x141750!==_0x3f6ebb(0x245)||_0x141750===null)){_0x5d5800[_0x3f6ebb(0x44d)]((_0x588dd3,_0x460bcb)=>console[_0x3f6ebb(0x116)](_0x3075d2+_0x5de7e0(_0x40cb16[_0x3f6ebb(0xd2)],_0x460bcb+0x1+'.')+'\x20'+_0x5de7e0(_0x40cb16[_0x3f6ebb(0x3d7)],String(_0x588dd3))));return;}_0x5d5800['forEach']((_0xcd031b,_0x3a5ec2)=>{const _0x101c96=_0x3f6ebb;console[_0x101c96(0x116)](_0x3075d2+_0x5de7e0(_0x40cb16[_0x101c96(0x5d7)],'['+_0x3a5ec2+']'));if(typeof _0xcd031b===_0x101c96(0x245)&&_0xcd031b!==null)_0x269672(_0xcd031b,_0x3075d2+'\x20\x20');else console[_0x101c96(0x116)](_0x3075d2+'\x20\x20'+String(_0xcd031b));});return;}if(typeof _0x5d5800===_0x3f6ebb(0x245)){if(_0x3f6ebb(0x6eb)in _0x5d5800&&'value'in _0x5d5800&&Object[_0x3f6ebb(0x2b3)](_0x5d5800)['length']<=0x3){console['log'](_0x3075d2+_0x5de7e0(_0x40cb16[_0x3f6ebb(0x304)]+_0x40cb16[_0x3f6ebb(0x4fe)],String(_0x5d5800[_0x3f6ebb(0x6eb)])));const _0x1ebbaf=_0x5d5800[_0x3f6ebb(0x33d)];if(_0x1ebbaf&&typeof _0x1ebbaf===_0x3f6ebb(0x245))_0x269672(_0x1ebbaf,_0x3075d2);else console[_0x3f6ebb(0x116)](_0x3075d2+_0x5de7e0(_0x40cb16[_0x3f6ebb(0x3d7)],String(_0x1ebbaf)));return;}_0x269672(_0x5d5800,_0x3075d2);return;}console['log'](_0x3075d2+_0x5de7e0(_0x40cb16['white'],String(_0x5d5800)));}function _0x269672(_0x56d54c,_0x59bb0a=''){const _0x265f92=_0x2b6d91,_0x42d543=Object[_0x265f92(0x707)](_0x56d54c);if(_0x42d543[_0x265f92(0x249)]===0x0){console['log'](_0x59bb0a+_0x5de7e0(_0x40cb16[_0x265f92(0x5d7)],'{}'));return;}const _0x2e80fd=Math[_0x265f92(0x4b1)](0x1c,Math[_0x265f92(0x234)](..._0x42d543[_0x265f92(0x539)](([_0x2f207b])=>_0x2f207b[_0x265f92(0x249)])));for(const [_0x248157,_0x2d803c]of _0x42d543){const _0x451eaf=_0x5de7e0(_0x40cb16[_0x265f92(0x4fe)],_0x248157[_0x265f92(0x5b9)](_0x2e80fd));if(_0x2d803c===null||_0x2d803c===undefined)console[_0x265f92(0x116)](_0x59bb0a+_0x451eaf+'\x20\x20'+_0x5de7e0(_0x40cb16[_0x265f92(0x5d7)],_0x265f92(0x7e)));else{if(typeof _0x2d803c===_0x265f92(0x245)){const _0x4c1c8a=JSON['stringify'](_0x2d803c);_0x4c1c8a[_0x265f92(0x249)]<=0x50?console[_0x265f92(0x116)](_0x59bb0a+_0x451eaf+'\x20\x20'+_0x5de7e0(_0x40cb16[_0x265f92(0x5d7)],_0x4c1c8a)):(console[_0x265f92(0x116)](_0x59bb0a+_0x451eaf),_0x1e3eda(_0x2d803c,_0x59bb0a+'\x20\x20'));}else{const _0x1557c3=typeof _0x2d803c===_0x265f92(0x321)?_0x5de7e0(_0x2d803c?_0x40cb16['green']:_0x40cb16[_0x265f92(0x625)],String(_0x2d803c)):typeof _0x2d803c===_0x265f92(0x449)?_0x5de7e0(_0x40cb16[_0x265f92(0xc7)],String(_0x2d803c)):_0x5de7e0(_0x40cb16['white'],String(_0x2d803c));console['log'](_0x59bb0a+_0x451eaf+'\x20\x20'+_0x1557c3);}}}}function _0x247a64(_0x5ad225,_0x35ddbf=''){const _0x41d201=_0x2b6d91,_0x19fbda=Math[_0x41d201(0x4b1)](0x20,Math[_0x41d201(0x234)](..._0x5ad225[_0x41d201(0x539)](_0xec82e8=>String(_0xec82e8[_0x41d201(0x6eb)])[_0x41d201(0x249)])));for(const {key:_0x367af3,value:_0x261170,score:_0x2eaf7a,clock:_0xc69b6a}of _0x5ad225){const _0x29ed21=_0x5de7e0(_0x40cb16[_0x41d201(0x304)]+_0x40cb16['cyan'],String(_0x367af3)['padEnd'](_0x19fbda)),_0x24497e=_0x261170==null?_0x5de7e0(_0x40cb16[_0x41d201(0x5d7)],_0x41d201(0x7e)):typeof _0x261170==='object'?_0x5de7e0(_0x40cb16[_0x41d201(0x5d7)],JSON[_0x41d201(0x316)](_0x261170)):_0x5de7e0(_0x40cb16[_0x41d201(0x3d7)],String(_0x261170)),_0x69284f=_0x2eaf7a!=null?_0x5de7e0(_0x40cb16['gray'],'\x20\x20score:'+_0x2eaf7a[_0x41d201(0x6c3)](0x4)):'',_0x280458=_0xc69b6a!=null?_0x5de7e0(_0x40cb16[_0x41d201(0xd2)],_0x41d201(0x37b)+_0xc69b6a):'';console['log'](_0x35ddbf+_0x29ed21+'\x20\x20'+_0x24497e+_0x69284f+_0x280458);}}function _0xbcdee7(_0x39dd79,_0x4ca8a5=''){const _0x45eaf1=_0x2b6d91,_0x17b790=Math[_0x45eaf1(0x4b1)](0x20,Math[_0x45eaf1(0x234)](..._0x39dd79[_0x45eaf1(0x539)](_0x155da1=>_0x155da1[_0x45eaf1(0x563)]['length'])));for(const {type:_0x39ae77,count:_0x44d9be,fields:_0x55dc94}of _0x39dd79){if(_0x39ae77[_0x45eaf1(0x334)]('~'))continue;const _0x51b68d=_0x5de7e0(_0x40cb16[_0x45eaf1(0x304)]+_0x40cb16[_0x45eaf1(0x4fe)],_0x39ae77['padEnd'](_0x17b790)),_0x86ae77=_0x5de7e0(_0x40cb16[_0x45eaf1(0xc7)],String(_0x44d9be)[_0x45eaf1(0x2ec)](0x6))+_0x5de7e0(_0x40cb16['dim'],_0x45eaf1(0x266)),_0x5aa8ab=_0x55dc94&&Object[_0x45eaf1(0x2b3)](_0x55dc94)[_0x45eaf1(0x249)]?_0x5de7e0(_0x40cb16[_0x45eaf1(0x5d7)],_0x45eaf1(0x1f4)+Object[_0x45eaf1(0x2b3)](_0x55dc94)[_0x45eaf1(0x3e6)](0x0,0x6)[_0x45eaf1(0x139)](',\x20')+(Object[_0x45eaf1(0x2b3)](_0x55dc94)[_0x45eaf1(0x249)]>0x6?'…':'')):'';console[_0x45eaf1(0x116)](_0x4ca8a5+_0x51b68d+'\x20\x20'+_0x86ae77+_0x5aa8ab);}}const _0x31189d=[_0x2b6d91(0x199),_0x2b6d91(0x656),_0x2b6d91(0x23a),_0x2b6d91(0x5c4),'transaction','processors/'];function _0x19fa31(_0x513e79,_0xe07666){const _0x2db74b=_0x2b6d91;if(_0x513e79['startsWith'](_0x2db74b(0x38b)))return _0x513e79;if(_0x513e79[_0x2db74b(0x334)]('/'))return _0x2db74b(0x3b3)+_0x513e79;if(_0x513e79[_0x2db74b(0x334)](_0x2db74b(0x346)))return _0x2db74b(0x38b)+_0x513e79;const _0x4b8236=_0x31189d['some'](_0x446360=>_0x513e79===_0x446360[_0x2db74b(0x176)](/\/$/,'')||_0x513e79[_0x2db74b(0x334)](_0x446360));return _0x4b8236?_0x2db74b(0x369)+_0xe07666+'/'+_0x513e79:_0x2db74b(0x38b)+_0x513e79;}function _0x554559(_0x2b4ac4){const _0x30f2bf=_0x2b6d91,_0x1b8dbb={},_0x4aea8d=[];let _0xd4737=0x0;while(_0xd4737<_0x2b4ac4[_0x30f2bf(0x249)]){if((_0x2b4ac4[_0xd4737]===_0x30f2bf(0x1e6)||_0x2b4ac4[_0xd4737]==='-e')&&_0x2b4ac4[_0xd4737+0x1]&&!_0x2b4ac4[_0xd4737+0x1][_0x30f2bf(0x334)]('-'))_0x1b8dbb['env']=_0x2b4ac4[++_0xd4737];else _0x2b4ac4[_0xd4737]==='--help'||_0x2b4ac4[_0xd4737]==='-h'?_0x1b8dbb[_0x30f2bf(0x6b6)]=!![]:_0x4aea8d[_0x30f2bf(0x39b)](_0x2b4ac4[_0xd4737]);_0xd4737++;}return{'flags':_0x1b8dbb,'rest':_0x4aea8d};}const _0x1e63e0={'system':'System','envs':_0x2b6d91(0x37e),'types':'Types','data':_0x2b6d91(0x4cb),'indexes':'Indexes','fts':_0x2b6d91(0x1a1),'sync':_0x2b6d91(0x436),'queue':'Queue','files':_0x2b6d91(0x378),'embeddings':_0x2b6d91(0x147),'engines':_0x2b6d91(0x3fe),'admin':_0x2b6d91(0x198),'event':_0x2b6d91(0x1e8),'processor':_0x2b6d91(0x2f6)},_0x3ad722=[_0x2b6d91(0x702),_0x2b6d91(0x45d),'types',_0x2b6d91(0x527),_0x2b6d91(0x2fc),'fts','sync',_0x2b6d91(0x584),'files','embeddings',_0x2b6d91(0x5ad),_0x2b6d91(0x619)];function _0x3d3cfe(_0x5a84ef){const _0x8964c2=_0x2b6d91;return _0x5a84ef['replace'](/^\/api/,'')[_0x8964c2(0x176)](/^\[\/env\/:env=[^\]]*\]/,_0x8964c2(0x1a6))[_0x8964c2(0x176)](/^\/env\/:env/,_0x8964c2(0x1ac))[_0x8964c2(0x176)](/^\//,'');}function _0x452e95(_0x2cc656,_0x41a3c7=''){const _0x40469f=_0x2b6d91,_0x246b00=_0x2cc656[_0x40469f(0x57f)]['listRoutes']()['filter'](_0x570e99=>!_0x570e99['meta']?.[_0x40469f(0x2cb)]),_0x784bc0=_0x41a3c7?_0x246b00[_0x40469f(0x69e)](_0x34a09a=>_0x34a09a['path']['toLowerCase']()[_0x40469f(0x52b)](_0x41a3c7['toLowerCase']())||(_0x4c1b88(_0x34a09a)??'')[_0x40469f(0xeb)]()[_0x40469f(0x52b)](_0x41a3c7[_0x40469f(0xeb)]())||_0x5d1624(_0x34a09a)[_0x40469f(0x696)](_0x5c3eba=>_0x5c3eba[_0x40469f(0xeb)]()[_0x40469f(0x52b)](_0x41a3c7[_0x40469f(0xeb)]()))):_0x246b00;if(!_0x784bc0[_0x40469f(0x249)]){console[_0x40469f(0x116)](_0x5de7e0(_0x40cb16[_0x40469f(0x625)],_0x40469f(0x88)+_0x41a3c7+'\x22\x0a'));return;}const _0x25ce51=new Map();for(const _0x21ab7c of _0x784bc0){const _0x56b1a3=_0x5d1624(_0x21ab7c)[0x0]??_0x40469f(0x3e3);if(!_0x25ce51[_0x40469f(0xe5)](_0x56b1a3))_0x25ce51[_0x40469f(0x494)](_0x56b1a3,[]);_0x25ce51['get'](_0x56b1a3)[_0x40469f(0x39b)](_0x21ab7c);}const _0x563721=[..._0x3ad722[_0x40469f(0x69e)](_0x41d31d=>_0x25ce51[_0x40469f(0xe5)](_0x41d31d)),...[..._0x25ce51[_0x40469f(0x2b3)]()][_0x40469f(0x69e)](_0x78bbf=>!_0x3ad722['includes'](_0x78bbf))];console[_0x40469f(0x116)]('');for(const _0x2f1cb5 of _0x563721){const _0x4264b9=_0x25ce51[_0x40469f(0x1ed)](_0x2f1cb5);if(!_0x4264b9?.[_0x40469f(0x249)])continue;console['log'](_0x5de7e0(_0x40cb16[_0x40469f(0x304)],'\x20\x20'+(_0x1e63e0[_0x2f1cb5]??_0x2f1cb5)));for(const _0x4371bd of _0x4264b9){const _0x14c4f2=_0x5de7e0(_0x40cb16[_0x40469f(0xc7)],_0x4371bd[_0x40469f(0x1d4)][_0x40469f(0x5b9)](0x7)),_0x55b2e2=_0x5de7e0(_0x40cb16[_0x40469f(0x4fe)],_0x3d3cfe(_0x4371bd[_0x40469f(0x5a4)])),_0x1fbafe=_0x4c1b88(_0x4371bd)?_0x5de7e0(_0x40cb16[_0x40469f(0x5d7)],'\x20\x20'+_0x4c1b88(_0x4371bd)):'',_0x222b90=_0x4371bd[_0x40469f(0x25b)]?.['id']?_0x5de7e0(_0x40cb16['gray'],_0x40469f(0x2b0)+_0x4371bd[_0x40469f(0x25b)]['id']+']'):'';console[_0x40469f(0x116)]('\x20\x20\x20\x20'+_0x14c4f2+'\x20'+_0x55b2e2+_0x1fbafe+_0x222b90);}console[_0x40469f(0x116)]('');}}function _0xaeae8d(_0x27b1c6,_0x3e72d7){const _0x1e8ff2=_0x2b6d91,_0x4fb0e6=_0x3e72d7[_0x1e8ff2(0x176)](/^\/api(\/env\/[^/]+)?\//,'')[_0x1e8ff2(0x48b)]('/')[0x0],_0x59ba76=_0x27b1c6[_0x1e8ff2(0x57f)][_0x1e8ff2(0x80)]()['filter'](_0x225d4c=>_0x225d4c[_0x1e8ff2(0x5a4)]['toLowerCase']()[_0x1e8ff2(0x52b)](_0x4fb0e6[_0x1e8ff2(0xeb)]()));if(!_0x59ba76[_0x1e8ff2(0x249)]){console[_0x1e8ff2(0x116)](_0x5de7e0(_0x40cb16[_0x1e8ff2(0x625)],_0x1e8ff2(0x485)+_0x3e72d7+'\x0a'));return;}console[_0x1e8ff2(0x116)]('');for(const _0x38d06e of _0x59ba76['slice'](0x0,0xc)){for(const _0x5af80d of _0x35cb16(_0x38d06e)){console[_0x1e8ff2(0x116)](_0x5af80d);}console[_0x1e8ff2(0x116)]('');}}function _0x4c1b88(_0x2d278f){const _0x3f5149=_0x2b6d91;return _0x2d278f[_0x3f5149(0x25b)]?.[_0x3f5149(0x506)]??_0x2d278f[_0x3f5149(0x2fe)]?.[_0x3f5149(0x506)]??'';}function _0x37147f(_0x26a554){const _0x5d8be5=_0x2b6d91;return _0x26a554[_0x5d8be5(0x25b)]?.[_0x5d8be5(0x23f)]??_0x26a554[_0x5d8be5(0x2fe)]?.[_0x5d8be5(0x23f)]??'';}function _0x5d1624(_0x42dc55){const _0xa86e3f=_0x2b6d91;return _0x42dc55[_0xa86e3f(0x25b)]?.[_0xa86e3f(0x4e7)]?.[_0xa86e3f(0x249)]?_0x42dc55['operation'][_0xa86e3f(0x4e7)]:_0x42dc55['meta']?.['tags']??[];}function _0x35cb16(_0xab63c2){const _0x50ab6d=_0x2b6d91,_0x120c5b=[];_0x120c5b['push']('\x20\x20'+_0x5de7e0(_0x40cb16[_0x50ab6d(0x304)]+_0x40cb16[_0x50ab6d(0xc7)],_0xab63c2['method']['padEnd'](0x7))+'\x20'+_0x5de7e0(_0x40cb16[_0x50ab6d(0x304)]+_0x40cb16[_0x50ab6d(0x4fe)],_0xab63c2[_0x50ab6d(0x5a4)]));_0xab63c2[_0x50ab6d(0x25b)]?.['id']&&_0x120c5b['push'](_0x50ab6d(0x5ab)+_0x5de7e0(_0x40cb16[_0x50ab6d(0xd2)],_0x50ab6d(0x1ce)+_0xab63c2[_0x50ab6d(0x25b)]['id']));_0x4c1b88(_0xab63c2)&&_0x120c5b[_0x50ab6d(0x39b)](_0x50ab6d(0x5ab)+_0x5de7e0(_0x40cb16[_0x50ab6d(0x3d7)],_0x4c1b88(_0xab63c2)));_0x37147f(_0xab63c2)&&_0x120c5b[_0x50ab6d(0x39b)](_0x50ab6d(0x5ab)+_0x5de7e0(_0x40cb16[_0x50ab6d(0x5d7)],_0x37147f(_0xab63c2)));_0x5d1624(_0xab63c2)[_0x50ab6d(0x249)]&&_0x120c5b[_0x50ab6d(0x39b)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x5de7e0(_0x40cb16['gray'],_0x50ab6d(0x458)+_0x5d1624(_0xab63c2)[_0x50ab6d(0x139)](',\x20')));_0xab63c2[_0x50ab6d(0x25b)]?.[_0x50ab6d(0x125)]?.[_0x50ab6d(0x4e9)]&&_0x120c5b[_0x50ab6d(0x39b)](_0x50ab6d(0x5ab)+_0x5de7e0(_0x40cb16[_0x50ab6d(0xd2)],'access:\x20'+_0xab63c2[_0x50ab6d(0x25b)][_0x50ab6d(0x125)][_0x50ab6d(0x4e9)]));_0xab63c2[_0x50ab6d(0x25b)]?.[_0x50ab6d(0x57f)]?.['transport']&&_0xab63c2[_0x50ab6d(0x25b)]['http'][_0x50ab6d(0x47c)]!==_0x50ab6d(0x394)&&_0x120c5b[_0x50ab6d(0x39b)](_0x50ab6d(0x5ab)+_0x5de7e0(_0x40cb16[_0x50ab6d(0xd2)],_0x50ab6d(0x345)+_0xab63c2[_0x50ab6d(0x25b)][_0x50ab6d(0x57f)][_0x50ab6d(0x47c)]));if(_0xab63c2[_0x50ab6d(0x25b)]?.[_0x50ab6d(0x2d3)]){const _0x255090=Object[_0x50ab6d(0x2b3)](_0xab63c2[_0x50ab6d(0x25b)][_0x50ab6d(0x2d3)][_0x50ab6d(0xb8)]||{});if(_0x255090['length'])_0x120c5b['push'](_0x50ab6d(0x5ab)+_0x5de7e0(_0x40cb16[_0x50ab6d(0xd2)],_0x50ab6d(0xcf)+_0x255090[_0x50ab6d(0x139)](',\x20')));}return _0xab63c2[_0x50ab6d(0x2fe)]?.[_0x50ab6d(0x459)]&&_0x120c5b[_0x50ab6d(0x39b)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x5de7e0(_0x40cb16[_0x50ab6d(0xd2)],_0x50ab6d(0x639)+JSON[_0x50ab6d(0x316)](_0xab63c2[_0x50ab6d(0x2fe)][_0x50ab6d(0x459)]))),_0x120c5b;}async function _0x589166(_0x3d5ab7,_0x5b8c2a,_0x3ebfeb,_0x520145=null){const _0x597212=_0x2b6d91,_0x4eb15f=_0x3ebfeb[_0x597212(0x40d)]('?'),_0x5bdc56=_0x4eb15f>=0x0?_0x3ebfeb['slice'](0x0,_0x4eb15f):_0x3ebfeb,_0x17ad49=_0x4eb15f>=0x0?_0x3ebfeb[_0x597212(0x3e6)](_0x4eb15f+0x1):'',_0x1ba20c=Object['fromEntries'](new URLSearchParams(_0x17ad49)['entries']());return _0x3d5ab7[_0x597212(0x57f)][_0x597212(0x373)](_0x5b8c2a,_0x5bdc56,{'body':_0x520145,'query':_0x1ba20c,'headers':{'content-type':_0x597212(0x395)}},{'internal':!![]});}function _0x471fbb(_0x1845fe){const _0x159ca7=_0x2b6d91;if(!_0x1845fe)return null;const _0x59b980=_0x1845fe[_0x159ca7(0x541)]();if(!_0x59b980)return null;try{return JSON['parse'](_0x59b980);}catch{}try{return JSON[_0x159ca7(0x2fd)](_0x13a220(_0x59b980));}catch(_0x58658a){throw new SyntaxError(_0x58658a['message'],{'cause':_0x58658a});}}function _0x13a220(_0x8dac05){const _0x5a40f2=_0x2b6d91;let _0x4abf8d='',_0x2245ae=0x0;while(_0x2245ae<_0x8dac05[_0x5a40f2(0x249)]){const _0x4cffc3=_0x8dac05[_0x2245ae];if(_0x4cffc3==='\x22'){_0x4abf8d+='\x22',_0x2245ae++;while(_0x2245ae<_0x8dac05[_0x5a40f2(0x249)]&&_0x8dac05[_0x2245ae]!=='\x22'){if(_0x8dac05[_0x2245ae]==='\x5c'){_0x4abf8d+=_0x8dac05[_0x2245ae++];if(_0x2245ae<_0x8dac05[_0x5a40f2(0x249)])_0x4abf8d+=_0x8dac05[_0x2245ae++];}else _0x4abf8d+=_0x8dac05[_0x2245ae++];}_0x4abf8d+='\x22';if(_0x2245ae<_0x8dac05['length'])_0x2245ae++;continue;}if(_0x4cffc3==='\x27'){_0x4abf8d+='\x22',_0x2245ae++;while(_0x2245ae<_0x8dac05[_0x5a40f2(0x249)]&&_0x8dac05[_0x2245ae]!=='\x27'){if(_0x8dac05[_0x2245ae]==='\x5c'&&_0x8dac05[_0x2245ae+0x1]==='\x27')_0x4abf8d+='\x27',_0x2245ae+=0x2;else _0x8dac05[_0x2245ae]==='\x22'?(_0x4abf8d+='\x5c\x22',_0x2245ae++):_0x4abf8d+=_0x8dac05[_0x2245ae++];}_0x4abf8d+='\x22';if(_0x2245ae<_0x8dac05[_0x5a40f2(0x249)])_0x2245ae++;continue;}if(_0x5a40f2(0x130)[_0x5a40f2(0x52b)](_0x4cffc3)){_0x4abf8d+=_0x4cffc3,_0x2245ae++;continue;}let _0x558053='';while(_0x2245ae<_0x8dac05[_0x5a40f2(0x249)]&&!_0x5a40f2(0x9f)[_0x5a40f2(0x52b)](_0x8dac05[_0x2245ae])&&_0x8dac05[_0x2245ae]!=='\x20'&&_0x8dac05[_0x2245ae]!=='\x09'&&_0x8dac05[_0x2245ae]!=='\x0a'&&_0x8dac05[_0x2245ae]!=='\x0d'){_0x558053+=_0x8dac05[_0x2245ae++];}let _0x58b98f=_0x2245ae;while(_0x58b98f<_0x8dac05[_0x5a40f2(0x249)]&&(_0x8dac05[_0x58b98f]==='\x20'||_0x8dac05[_0x58b98f]==='\x09'))_0x58b98f++;if(_0x8dac05[_0x58b98f]===':')_0x4abf8d+='\x22'+_0x558053+'\x22';else _0x558053==='true'||_0x558053===_0x5a40f2(0x409)||_0x558053===_0x5a40f2(0x7e)||/^-?\d+(\.\d+)?([eE][+-]?\d+)?$/[_0x5a40f2(0x3b6)](_0x558053)?_0x4abf8d+=_0x558053:_0x4abf8d+='\x22'+_0x558053+'\x22';}return _0x4abf8d[_0x5a40f2(0x176)](/,(\s*[}\]])/g,'$1');}function _0x1b675c(_0x317445){const _0x3e6f45=_0x2b6d91,_0xe77c2d=[];let _0x4fa4fa=0x0;while(_0x4fa4fa<_0x317445['length']){while(_0x4fa4fa<_0x317445['length']&&(_0x317445[_0x4fa4fa]==='\x20'||_0x317445[_0x4fa4fa]==='\x09'))_0x4fa4fa++;if(_0x4fa4fa>=_0x317445['length'])break;const _0x34079f=_0x317445[_0x4fa4fa];if(_0x34079f==='{'||_0x34079f==='['){const _0x159c97=_0x34079f==='{'?'}':']',_0x6354de=_0x4fa4fa++;let _0x5be147=0x1,_0x19ca2c=![],_0x3123a8='';while(_0x4fa4fa<_0x317445['length']&&_0x5be147>0x0){const _0x299319=_0x317445[_0x4fa4fa];if(_0x19ca2c){if(_0x299319==='\x5c')_0x4fa4fa++;else{if(_0x299319===_0x3123a8)_0x19ca2c=![];}}else{if(_0x299319==='\x22'||_0x299319==='\x27')_0x19ca2c=!![],_0x3123a8=_0x299319;else{if(_0x299319===_0x34079f)_0x5be147++;else{if(_0x299319===_0x159c97)_0x5be147--;}}}_0x4fa4fa++;}_0xe77c2d[_0x3e6f45(0x39b)](_0x317445[_0x3e6f45(0x3e6)](_0x6354de,_0x4fa4fa));continue;}if(_0x34079f==='\x22'||_0x34079f==='\x27'){const _0x31bb06=_0x34079f;_0x4fa4fa++;let _0x1c5d59='';while(_0x4fa4fa<_0x317445[_0x3e6f45(0x249)]&&_0x317445[_0x4fa4fa]!==_0x31bb06){if(_0x317445[_0x4fa4fa]==='\x5c'&&_0x4fa4fa+0x1<_0x317445['length'])_0x4fa4fa++,_0x1c5d59+=_0x317445[_0x4fa4fa++];else _0x1c5d59+=_0x317445[_0x4fa4fa++];}if(_0x4fa4fa<_0x317445['length'])_0x4fa4fa++;_0xe77c2d[_0x3e6f45(0x39b)](_0x1c5d59);continue;}let _0x465528='';while(_0x4fa4fa<_0x317445[_0x3e6f45(0x249)]&&_0x317445[_0x4fa4fa]!=='\x20'&&_0x317445[_0x4fa4fa]!=='\x09'&&_0x317445[_0x4fa4fa]!=='{'&&_0x317445[_0x4fa4fa]!=='['){_0x465528+=_0x317445[_0x4fa4fa++];}if(_0x465528)_0xe77c2d['push'](_0x465528);}return _0xe77c2d;}function _0x20d54e(_0x254479,_0x353ef8){const _0x20cd62=_0x2b6d91,_0x542da4=[..._0x254479[_0x20cd62(0x1aa)][_0x20cd62(0x2b3)]()][_0x20cd62(0x69e)](_0x58b595=>!_0x58b595['startsWith']('~'));console['log'](['',_0x5de7e0(_0x40cb16[_0x20cd62(0x304)]+_0x40cb16[_0x20cd62(0x4fe)],_0x20cd62(0x290)),_0x5de7e0(_0x40cb16[_0x20cd62(0x304)]+_0x40cb16['cyan'],_0x20cd62(0x3e0))+_0x5de7e0(_0x40cb16[_0x20cd62(0x304)],_0x20cd62(0x686))+_0x5de7e0(_0x40cb16[_0x20cd62(0x304)]+_0x40cb16['cyan'],'║'),_0x5de7e0(_0x40cb16[_0x20cd62(0x304)]+_0x40cb16['cyan'],_0x20cd62(0x240)),'','\x20\x20'+_0x5de7e0(_0x40cb16[_0x20cd62(0x73b)],'✓')+'\x20'+_0x5de7e0(_0x40cb16['bold'],'server')+'\x20\x20http://localhost:'+_0x353ef8[_0x20cd62(0x1c2)],..._0x353ef8[_0x20cd62(0x28c)]>0x1?['\x20\x20'+_0x5de7e0(_0x40cb16[_0x20cd62(0x73b)],'✓')+'\x20'+_0x5de7e0(_0x40cb16['bold'],'cluster')+'\x20'+_0x353ef8[_0x20cd62(0x28c)]+_0x20cd62(0x588)+_0x5de7e0(_0x40cb16[_0x20cd62(0xd2)],_0x20cd62(0x8d))]:[],'\x20\x20'+_0x5de7e0(_0x40cb16[_0x20cd62(0x73b)],'✓')+'\x20'+_0x5de7e0(_0x40cb16[_0x20cd62(0x304)],'api')+_0x20cd62(0x3f1)+_0x353ef8['port']+'/api','\x20\x20'+_0x5de7e0(_0x40cb16[_0x20cd62(0x73b)],'✓')+'\x20'+_0x5de7e0(_0x40cb16[_0x20cd62(0x304)],'path')+'\x20\x20\x20\x20'+_0x353ef8['dbPath'],'\x20\x20'+_0x5de7e0(_0x40cb16[_0x20cd62(0x73b)],'✓')+'\x20'+_0x5de7e0(_0x40cb16['bold'],'id')+_0x20cd62(0x72a)+_0x5de7e0(_0x40cb16[_0x20cd62(0xd2)],_0x254479['id']),'\x20\x20'+_0x5de7e0(_0x40cb16[_0x20cd62(0x73b)],'✓')+'\x20'+_0x5de7e0(_0x40cb16['bold'],_0x20cd62(0x45d))+_0x20cd62(0x154)+_0x542da4[_0x20cd62(0x539)](_0x4234c2=>_0x5de7e0(_0x40cb16[_0x20cd62(0x4fe)],_0x4234c2))['join']('\x20\x20'),..._0x353ef8[_0x20cd62(0x6dd)]?[]:['\x20\x20'+_0x5de7e0(_0x40cb16[_0x20cd62(0x73b)],'✓')+'\x20'+_0x5de7e0(_0x40cb16[_0x20cd62(0x304)],'admin')+_0x20cd62(0x684)+_0x353ef8[_0x20cd62(0x1c2)]+'/admin/index.html'],'',_0x5de7e0(_0x40cb16[_0x20cd62(0x5d7)],_0x20cd62(0x15d)+_0x5de7e0(_0x40cb16[_0x20cd62(0x304)],_0x20cd62(0x6b6))+_0x20cd62(0x45c)+_0x5de7e0(_0x40cb16[_0x20cd62(0x304)],_0x20cd62(0x490))+_0x20cd62(0xb2)+_0x5de7e0(_0x40cb16[_0x20cd62(0x304)],'exit')+'\x20to\x20quit.'),''][_0x20cd62(0x139)]('\x0a'));}function _0x3e8185(_0x309d6b){const _0x1e0cbe=_0x2b6d91;console[_0x1e0cbe(0x116)]('\x0a'+_0x5de7e0(_0x40cb16[_0x1e0cbe(0x304)],_0x1e0cbe(0x479))+'\x20\x20'+_0x5de7e0(_0x40cb16[_0x1e0cbe(0x5d7)],_0x1e0cbe(0x4eb))+_0x1e0cbe(0x632)+_0x5de7e0(_0x40cb16['cyan'],_0x1e0cbe(0x4db))+_0x1e0cbe(0x12c)+_0x5de7e0(_0x40cb16[_0x1e0cbe(0x4fe)],_0x1e0cbe(0x4db))+'\x20'+_0x5de7e0(_0x40cb16['yellow'],_0x1e0cbe(0x6ad))+_0x1e0cbe(0x4fb)+_0x5de7e0(_0x40cb16[_0x1e0cbe(0x4fe)],_0x1e0cbe(0x137))+'\x20'+_0x5de7e0(_0x40cb16[_0x1e0cbe(0x4fe)],_0x1e0cbe(0x4db))+'\x20'+_0x5de7e0(_0x40cb16[_0x1e0cbe(0x625)],'[body]')+_0x1e0cbe(0x50d)+_0x5de7e0(_0x40cb16[_0x1e0cbe(0x5d7)],'Examples')+_0x1e0cbe(0x3dc)+_0x5de7e0(_0x40cb16[_0x1e0cbe(0xd2)],'info')+_0x1e0cbe(0x1de)+_0x5de7e0(_0x40cb16[_0x1e0cbe(0xd2)],_0x1e0cbe(0x45d))+_0x1e0cbe(0x91)+_0x5de7e0(_0x40cb16[_0x1e0cbe(0xd2)],_0x1e0cbe(0x199))+_0x1e0cbe(0x6f1)+_0x309d6b[_0x1e0cbe(0x215)]+_0x1e0cbe(0x115)+_0x5de7e0(_0x40cb16[_0x1e0cbe(0xd2)],_0x1e0cbe(0x5af))+_0x1e0cbe(0x169)+_0x309d6b[_0x1e0cbe(0x215)]+_0x1e0cbe(0x99)+_0x5de7e0(_0x40cb16['gray'],_0x1e0cbe(0x468))+_0x1e0cbe(0x47f)+_0x309d6b['env']+_0x1e0cbe(0x4cf)+_0x5de7e0(_0x40cb16[_0x1e0cbe(0xd2)],_0x1e0cbe(0x253))+_0x1e0cbe(0x535)+_0x309d6b[_0x1e0cbe(0x215)]+_0x1e0cbe(0x330)+_0x5de7e0(_0x40cb16[_0x1e0cbe(0xd2)],_0x1e0cbe(0x214))+_0x1e0cbe(0x3dc)+_0x5de7e0(_0x40cb16[_0x1e0cbe(0xd2)],_0x1e0cbe(0x6de))+_0x1e0cbe(0x3dc)+_0x5de7e0(_0x40cb16[_0x1e0cbe(0xd2)],_0x1e0cbe(0x49a))+'\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'+_0x5de7e0(_0x40cb16[_0x1e0cbe(0x304)],_0x1e0cbe(0x223))+'\x20\x20'+_0x5de7e0(_0x40cb16[_0x1e0cbe(0x5d7)],_0x1e0cbe(0x22a))+_0x1e0cbe(0x632)+_0x5de7e0(_0x40cb16['cyan'],_0x1e0cbe(0x60c))+_0x1e0cbe(0x9b)+_0x5de7e0(_0x40cb16[_0x1e0cbe(0x4fe)],_0x1e0cbe(0x6ac))+_0x1e0cbe(0x1ec)+_0x5de7e0(_0x40cb16[_0x1e0cbe(0x5d7)],_0x1e0cbe(0x43e))+'\x0a\x20\x20\x20\x20'+_0x5de7e0(_0x40cb16[_0x1e0cbe(0xd2)],_0x1e0cbe(0x2e5))+_0x1e0cbe(0x3dc)+_0x5de7e0(_0x40cb16[_0x1e0cbe(0xd2)],_0x1e0cbe(0x24d))+'\x0a\x20\x20\x20\x20'+_0x5de7e0(_0x40cb16[_0x1e0cbe(0xd2)],'type/users\x20--help')+'\x0a\x0a'+_0x5de7e0(_0x40cb16['bold'],_0x1e0cbe(0x4ed))+'\x0a\x0a\x20\x20'+_0x5de7e0(_0x40cb16['cyan'],_0x1e0cbe(0x571))+_0x1e0cbe(0x29a)+_0x5de7e0(_0x40cb16[_0x1e0cbe(0x4fe)],_0x1e0cbe(0x215))+_0x1e0cbe(0x6cd)+_0x5de7e0(_0x40cb16[_0x1e0cbe(0x4fe)],_0x1e0cbe(0x490))+'\x20'+_0x5de7e0(_0x40cb16['dim'],_0x1e0cbe(0x551))+_0x1e0cbe(0x11d)+_0x5de7e0(_0x40cb16[_0x1e0cbe(0x4fe)],_0x1e0cbe(0x627))+'\x20'+_0x5de7e0(_0x40cb16[_0x1e0cbe(0x5d7)],_0x1e0cbe(0x251))+_0x1e0cbe(0x6fb)+_0x5de7e0(_0x40cb16[_0x1e0cbe(0x4fe)],'open')+_0x1e0cbe(0x37f)+_0x5de7e0(_0x40cb16[_0x1e0cbe(0x4fe)],'help')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20show\x20this\x20help\x0a\x20\x20'+_0x5de7e0(_0x40cb16['cyan'],_0x1e0cbe(0x719))+'\x20'+_0x5de7e0(_0x40cb16[_0x1e0cbe(0x5d7)],_0x1e0cbe(0x40c))+_0x1e0cbe(0xb7));}let _0x3ffecc=![];async function _0x5cf1cd(_0x1ead91,_0x5611f4=0x0,_0x576713=null){const _0x268719=_0x2b6d91;_0x3ffecc&&(process[_0x268719(0x36e)][_0x268719(0x360)](_0x5de7e0(_0x40cb16['red'],_0x268719(0x315))),process[_0x268719(0x719)](0x82));_0x3ffecc=!![],process[_0x268719(0x45e)][_0x268719(0x360)]('\x0a'),process['stderr'][_0x268719(0x360)](_0x5de7e0(_0x40cb16[_0x268719(0x625)],'\x20\x20[okdb]\x20'+(_0x576713?_0x268719(0x28f)+_0x576713+',\x20':'')+'shutting\x20down…\x0a'));const _0x861a06=setTimeout(()=>{const _0x51d022=_0x268719;process[_0x51d022(0x36e)][_0x51d022(0x360)](_0x5de7e0(_0x40cb16['red'],'\x20\x20[okdb]\x20shutdown\x20took\x20too\x20long,\x20force-exiting\x0a')),process['exit'](0x1);},0x1388);try{await _0x1ead91[_0x268719(0x5b2)]();}catch(_0x4f046d){console[_0x268719(0x271)](_0x5de7e0(_0x40cb16[_0x268719(0x42e)],'\x20\x20'+_0x4f046d[_0x268719(0x5a3)]));}clearTimeout(_0x861a06),process['stderr']['write'](_0x5de7e0(_0x40cb16[_0x268719(0x5d7)],'\x20\x20[okdb]\x20closed\x20cleanly\x0a')),process[_0x268719(0x719)](_0x5611f4);}function _0x1184ad(_0x42b8d2){const _0x2c311=_0x2b6d91,_0x65e718=_0x42b8d2['env']!==_0x2c311(0x34b)?_0x5de7e0(_0x40cb16['yellow'],'['+_0x42b8d2[_0x2c311(0x215)]+']'):'';return _0x5de7e0(_0x40cb16[_0x2c311(0x304)]+_0x40cb16[_0x2c311(0x4fe)],'okdb')+_0x65e718+_0x5de7e0(_0x40cb16['gray'],'>\x20');}const _0x47e416=new Set(['GET',_0x2b6d91(0x502),_0x2b6d91(0x69a),_0x2b6d91(0x8b),_0x2b6d91(0x190)]);async function _0x109353(_0x50cfc0,_0xe12a49,_0x3626d2,_0x3149be,_0x4f7d26,_0x243e2b){const _0x34480c=_0x2b6d91;_0x50cfc0=_0x50cfc0['trim']();if(!_0x50cfc0||_0x50cfc0[_0x34480c(0x334)]('#'))return;const _0xddb62=_0x1b675c(_0x50cfc0),{flags:_0x3feb59,rest:_0x3ee215}=_0x554559(_0xddb62);if(!_0x3ee215[_0x34480c(0x249)])return;const _0x425780=_0x3ee215[0x0],_0x5d9d2c=_0x425780[_0x34480c(0x452)]();if(_0x5d9d2c===_0x34480c(0x73e)){if(_0x3ee215[0x1])_0xaeae8d(_0xe12a49,_0x19fa31(_0x3ee215[0x1],_0x3feb59[_0x34480c(0x215)]??_0x4f7d26[_0x34480c(0x215)]));else _0x3e8185(_0x4f7d26);return;}if(_0x5d9d2c===_0x34480c(0x591)){const _0x1ed9de=_0x3ee215[0x1];if(!_0x1ed9de){console[_0x34480c(0x116)](_0x5de7e0(_0x40cb16[_0x34480c(0x42e)],_0x34480c(0x53c)));return;}try{_0xe12a49['env'](_0x1ed9de),_0x4f7d26[_0x34480c(0x215)]=_0x1ed9de,_0x243e2b?.['setPrompt'](_0x1184ad(_0x4f7d26)),console[_0x34480c(0x116)](_0x34480c(0x552)+_0x5de7e0(_0x40cb16[_0x34480c(0x73b)],'✓')+'\x20active\x20env:\x20'+_0x5de7e0(_0x40cb16[_0x34480c(0x304)]+_0x40cb16[_0x34480c(0x4fe)],_0x1ed9de)+'\x0a');}catch{console['log'](_0x34480c(0x552)+_0x5de7e0(_0x40cb16['red'],'✗')+_0x34480c(0x393)+_0x5de7e0(_0x40cb16[_0x34480c(0x304)],_0x1ed9de)+_0x34480c(0x432)+_0x5de7e0(_0x40cb16['dim'],_0x34480c(0xcd)));}return;}if(_0x5d9d2c===_0x34480c(0x5ac)){const _0x47d408=[..._0xe12a49[_0x34480c(0x1aa)][_0x34480c(0x2b3)]()][_0x34480c(0x69e)](_0x1fe3d0=>!_0x1fe3d0[_0x34480c(0x334)]('~'));console[_0x34480c(0x116)]('');for(const _0x52ee90 of _0x47d408){const _0x453aaa=_0x52ee90===_0x4f7d26[_0x34480c(0x215)];console['log']('\x20\x20'+(_0x453aaa?_0x5de7e0(_0x40cb16['green'],'●'):_0x5de7e0(_0x40cb16[_0x34480c(0x5d7)],'○'))+'\x20\x20'+(_0x453aaa?_0x5de7e0(_0x40cb16[_0x34480c(0x304)]+_0x40cb16[_0x34480c(0x4fe)],_0x52ee90):_0x5de7e0(_0x40cb16[_0x34480c(0x5d7)],_0x52ee90)));}console[_0x34480c(0x116)]('\x0a\x20\x20'+_0x5de7e0(_0x40cb16['dim'],_0x34480c(0x17c))+'\x20'+_0x5de7e0(_0x40cb16[_0x34480c(0x4fe)],_0x4f7d26['env'])),console['log']('');return;}if(_0x5d9d2c===_0x34480c(0x6e4)){const _0x2e8cbf=[..._0xe12a49[_0x34480c(0x1aa)][_0x34480c(0x5b1)]()][_0x34480c(0x69e)](_0x394858=>!_0x394858[_0x34480c(0x1cf)][_0x34480c(0x334)]('~'));console['log']('');const _0xcae71e=Math['max'](..._0x2e8cbf[_0x34480c(0x539)](_0x2a1659=>_0x2a1659['name']['length']));for(const _0xcbbb57 of _0x2e8cbf){const _0x107142=_0xcbbb57[_0x34480c(0x1cf)]===_0x4f7d26[_0x34480c(0x215)],_0x35da39=_0x107142?_0x5de7e0(_0x40cb16[_0x34480c(0x73b)],'●'):_0x5de7e0(_0x40cb16[_0x34480c(0x5d7)],'○'),_0x300158=_0x107142?_0x5de7e0(_0x40cb16[_0x34480c(0x304)]+_0x40cb16[_0x34480c(0x4fe)],_0xcbbb57[_0x34480c(0x1cf)][_0x34480c(0x5b9)](_0xcae71e)):_0x5de7e0(_0x40cb16[_0x34480c(0x5d7)],_0xcbbb57[_0x34480c(0x1cf)]['padEnd'](_0xcae71e)),_0x2f7ba1=[..._0xcbbb57[_0x34480c(0x67d)][_0x34480c(0x2b3)]()][_0x34480c(0x69e)](_0x116712=>!_0x116712['startsWith']('~')),_0x22d25d=_0x2f7ba1[_0x34480c(0x249)]?_0x5de7e0(_0x40cb16[_0x34480c(0x5d7)],_0x2f7ba1[_0x34480c(0x3e6)](0x0,0x5)[_0x34480c(0x139)](',\x20')+(_0x2f7ba1[_0x34480c(0x249)]>0x5?_0x34480c(0x738)+(_0x2f7ba1[_0x34480c(0x249)]-0x5)+_0x34480c(0x274):'')):_0x5de7e0(_0x40cb16[_0x34480c(0x5d7)],_0x34480c(0x361));console[_0x34480c(0x116)]('\x20\x20'+_0x35da39+'\x20\x20'+_0x300158+'\x20\x20'+_0x22d25d);}console[_0x34480c(0x116)]('');return;}if(_0x5d9d2c===_0x34480c(0xc4)){const _0x59c5e9=_0x3feb59[_0x34480c(0x215)]??_0x3ee215[0x1]??_0x4f7d26[_0x34480c(0x215)];try{const _0x1c8080=_0xe12a49[_0x34480c(0x215)](_0x59c5e9),_0x4aea65=[..._0x1c8080[_0x34480c(0x67d)][_0x34480c(0x2b3)]()]['filter'](_0x4d1653=>!_0x4d1653[_0x34480c(0x334)]('~'))[_0x34480c(0x483)]();console[_0x34480c(0x116)](_0x34480c(0x552)+_0x5de7e0(_0x40cb16[_0x34480c(0x5d7)],_0x4aea65['length']+_0x34480c(0x2e3)+(_0x4aea65[_0x34480c(0x249)]!==0x1?'s':'')+_0x34480c(0x6f0)+_0x59c5e9));for(const _0x573018 of _0x4aea65){const _0x371a93=_0x1c8080[_0x34480c(0x67d)]['get'](_0x573018),_0xf03b7f=_0x371a93?.['data']?.[_0x34480c(0x375)]?.()??0x0,_0x51d2cd=_0x5de7e0(_0x40cb16[_0x34480c(0x304)]+_0x40cb16[_0x34480c(0x4fe)],_0x573018[_0x34480c(0x5b9)](0x1c));console['log']('\x20\x20\x20\x20'+_0x51d2cd+'\x20\x20'+_0x5de7e0(_0x40cb16[_0x34480c(0xc7)],String(_0xf03b7f)[_0x34480c(0x2ec)](0x6))+'\x20'+_0x5de7e0(_0x40cb16[_0x34480c(0x5d7)],_0x34480c(0x613)));}console['log']('');}catch(_0x209a1){console[_0x34480c(0x271)](_0x5de7e0(_0x40cb16[_0x34480c(0x42e)],_0x34480c(0x552)+_0x209a1['message']+'\x0a'));}return;}if(_0x5d9d2c==='ROUTES'){_0x452e95(_0xe12a49,_0x3ee215[_0x34480c(0x3e6)](0x1)[_0x34480c(0x139)]('\x20'));return;}if(_0x5d9d2c===_0x34480c(0x1a5)){const _0x200dc3=(_0x3ee215[0x1]??'')[_0x34480c(0xeb)]();if(!_0x200dc3||_0x200dc3==='on')_0x3149be['enabled']=!![],_0x3149be['level']='info',console['log']('\x0a\x20\x20'+_0x5de7e0(_0x40cb16[_0x34480c(0x73b)],'✓')+'\x20logs\x20on\x20\x20'+_0x5de7e0(_0x40cb16['dim'],_0x34480c(0xe9))+'\x0a');else{if(_0x200dc3===_0x34480c(0x14d))_0x3149be['enabled']=![],console[_0x34480c(0x116)](_0x34480c(0x552)+_0x5de7e0(_0x40cb16[_0x34480c(0x625)],'○')+_0x34480c(0x2db));else _0x576140[_0x200dc3]!==undefined?(_0x3149be[_0x34480c(0x70e)]=!![],_0x3149be[_0x34480c(0x4d4)]=_0x200dc3,console['log'](_0x34480c(0x552)+_0x5de7e0(_0x40cb16['green'],'✓')+_0x34480c(0x400)+_0x5de7e0(_0x40cb16['bold'],_0x200dc3)+'\x0a')):console[_0x34480c(0x271)](_0x5de7e0(_0x40cb16[_0x34480c(0x42e)],_0x34480c(0x191)));}return;}if(_0x5d9d2c===_0x34480c(0x269)||_0x5d9d2c===_0x34480c(0x93)){await _0x5cf1cd(_0xe12a49,0x0);return;}if(_0x5d9d2c===_0x34480c(0x1f5)){const _0x542036='http://localhost:'+_0x3626d2[_0x34480c(0x1c2)]+_0x34480c(0x6a3),_0x4bba6d=process['platform']==='win32'?_0x34480c(0x73c)+_0x542036:process[_0x34480c(0x52c)]===_0x34480c(0x2f3)?_0x34480c(0x2b8)+_0x542036:_0x34480c(0x457)+_0x542036;require$$4[_0x34480c(0x1e0)](_0x4bba6d),console[_0x34480c(0x116)](_0x34480c(0x552)+_0x5de7e0(_0x40cb16['green'],'✓')+'\x20opening\x20'+_0x5de7e0(_0x40cb16[_0x34480c(0x4fe)],_0x542036)+'\x0a');return;}let _0x5993d1,_0x2223ab,_0x410ef0;if(_0x47e416[_0x34480c(0xe5)](_0x5d9d2c)){_0x5993d1=_0x5d9d2c,_0x2223ab=_0x3ee215[0x1],_0x410ef0=_0x3ee215['slice'](0x2);if(!_0x2223ab){console[_0x34480c(0x271)](_0x5de7e0(_0x40cb16[_0x34480c(0x42e)],'\x20\x20Usage:\x20'+_0x425780+'\x20<path>\x20[json-body]'));return;}}else _0x5993d1=null,_0x2223ab=_0x3ee215[0x0],_0x410ef0=_0x3ee215[_0x34480c(0x3e6)](0x1);const _0x33e080=_0x3feb59[_0x34480c(0x215)]??_0x4f7d26[_0x34480c(0x215)],_0x4c3a7c=_0x19fa31(_0x2223ab,_0x33e080);if(_0x3feb59[_0x34480c(0x6b6)]){_0xaeae8d(_0xe12a49,_0x4c3a7c);return;}let _0xb41284=null;if(_0x410ef0[_0x34480c(0x249)]){const _0x533cb8=_0x410ef0[_0x34480c(0x139)]('\x20');try{_0xb41284=_0x471fbb(_0x533cb8);}catch(_0x3cf37f){console[_0x34480c(0x271)](_0x5de7e0(_0x40cb16[_0x34480c(0x42e)],_0x34480c(0x4da)+_0x533cb8+_0x34480c(0x552)+_0x5de7e0(_0x40cb16['dim'],_0x3cf37f[_0x34480c(0x5a3)])+'\x0a'));return;}}if(!_0x5993d1)_0x5993d1=_0xb41284!==null?_0x34480c(0x502):_0x34480c(0x704);try{const _0x25f815=await _0x589166(_0xe12a49,_0x5993d1,_0x4c3a7c,_0xb41284);_0x312681(_0x25f815['status'],_0x25f815[_0x34480c(0x459)]);}catch(_0x53f99f){console[_0x34480c(0x271)](_0x34480c(0x552)+_0x5de7e0(_0x40cb16[_0x34480c(0x42e)],'✗')+'\x20'+_0x53f99f[_0x34480c(0x5a3)]+'\x0a');}}class _0x15f8cc{constructor(){const _0xc310cc=_0x2b6d91;this[_0xc310cc(0x5a5)]=new Map(),this[_0xc310cc(0x2bb)]=null,this[_0xc310cc(0x426)]=![];}}function _0x1aa8ee(_0x44ac04){const _0x212796=_0x2b6d91,_0x15b618=new _0x15f8cc();for(const _0x115713 of _0x44ac04){if(_0x115713['meta']?.[_0x212796(0x2cb)])continue;const _0x4207fc=_0x115713[_0x212796(0x5a4)][_0x212796(0x176)](/^\/api/,'')[_0x212796(0x176)](/^\[\/env\/:env=[^\]]*\]/,'')['replace'](/^\//,'');if(!_0x4207fc)continue;let _0x42cae9=_0x15b618;for(const _0x53f8c7 of _0x4207fc[_0x212796(0x48b)]('/')[_0x212796(0x69e)](Boolean)){if(_0x53f8c7[_0x212796(0x334)](':')){const _0x3a4134=_0x53f8c7[_0x212796(0x3e6)](0x1);if(!_0x42cae9[_0x212796(0x2bb)])_0x42cae9['dynamic']={'param':_0x3a4134,'node':new _0x15f8cc()};_0x42cae9=_0x42cae9[_0x212796(0x2bb)][_0x212796(0x236)];}else{if(!_0x42cae9[_0x212796(0x5a5)][_0x212796(0xe5)](_0x53f8c7))_0x42cae9[_0x212796(0x5a5)]['set'](_0x53f8c7,new _0x15f8cc());_0x42cae9=_0x42cae9[_0x212796(0x5a5)][_0x212796(0x1ed)](_0x53f8c7);}}_0x42cae9['terminal']=!![];}return _0x15b618;}const _0x4ea9f7=new Map();function _0x237806(_0x25c884,_0x29b47f,_0x24bf90){const _0x49dd7a=_0x2b6d91,_0x39af02=_0x4ea9f7[_0x49dd7a(0x1ed)](_0x25c884);if(_0x39af02&&_0x39af02[_0x49dd7a(0x492)]>Date[_0x49dd7a(0x28a)]())return _0x39af02['val'];const _0x511c58=_0x24bf90();return _0x4ea9f7[_0x49dd7a(0x494)](_0x25c884,{'val':_0x511c58,'exp':Date[_0x49dd7a(0x28a)]()+_0x29b47f}),_0x511c58;}function _0x3ef56e(_0x4c9d67,_0xa14676,_0x534790,_0x4c6ba9){const _0x2f5c2d=_0x2b6d91,_0x384d2f=_0xa14676[_0x2f5c2d(0x215)]??_0x4c6ba9[_0x2f5c2d(0x215)];switch(_0x4c9d67){case _0x2f5c2d(0x215):return[..._0x534790[_0x2f5c2d(0x1aa)][_0x2f5c2d(0x2b3)]()][_0x2f5c2d(0x69e)](_0x29415c=>!_0x29415c[_0x2f5c2d(0x334)]('~'));case _0x2f5c2d(0x563):return _0x237806(_0x2f5c2d(0x664)+_0x384d2f,0x7d0,()=>{const _0x654967=_0x2f5c2d;try{return[..._0x534790[_0x654967(0x215)](_0x384d2f)[_0x654967(0x67d)]['keys']()][_0x654967(0x69e)](_0x3bb1aa=>!_0x3bb1aa[_0x654967(0x334)]('~'));}catch{return[];}});case _0x2f5c2d(0x6eb):if(!_0xa14676['type'])return[];return _0x237806('keys:'+_0x384d2f+':'+_0xa14676['type'],0x5dc,()=>{const _0x3f9c3d=_0x2f5c2d;try{const _0x48ce80=_0x534790[_0x3f9c3d(0x215)](_0x384d2f)[_0x3f9c3d(0x67d)][_0x3f9c3d(0x1ed)](_0xa14676[_0x3f9c3d(0x563)]);if(!_0x48ce80?.['data'])return[];const _0xb2bf64=[];for(const {key:_0x171123}of _0x48ce80[_0x3f9c3d(0x527)][_0x3f9c3d(0x4fa)]({'limit':0x32})){_0xb2bf64[_0x3f9c3d(0x39b)](String(_0x171123));if(_0xb2bf64[_0x3f9c3d(0x249)]>=0x32)break;}return _0xb2bf64;}catch{return[];}});case _0x2f5c2d(0x554):if(!_0xa14676[_0x2f5c2d(0x563)])return[];return _0x237806(_0x2f5c2d(0x2a3)+_0x384d2f+':'+_0xa14676[_0x2f5c2d(0x563)],0x7d0,()=>{const _0x18f5c1=_0x2f5c2d;try{const _0x329c8d=_0x534790[_0x18f5c1(0x215)](_0x384d2f)['typeSubDbs'][_0x18f5c1(0x1ed)](_0xa14676['type']);return _0x329c8d?[..._0x329c8d[_0x18f5c1(0x6a9)]?.['keys']()??[]]:[];}catch{return[];}});case _0x2f5c2d(0x1e4):if(!_0xa14676[_0x2f5c2d(0x563)])return[];return _0x237806(_0x2f5c2d(0xc2)+_0x384d2f+':'+_0xa14676['type'],0x7d0,()=>{const _0x5b714d=_0x2f5c2d;try{return _0x534790['fts']?.[_0x5b714d(0x49e)]?.(_0xa14676['type'],_0x534790[_0x5b714d(0x215)](_0x384d2f))?.[_0x5b714d(0x539)](_0x4021e1=>_0x4021e1['name'])??[];}catch{return[];}});default:return[];}}function _0x161e9e(_0x12b3d3,_0x555e9a,_0x12985b,_0x4bd62b){const _0x31361f=_0x2b6d91,_0x4e7404=_0x12b3d3[_0x31361f(0x518)]('/'),_0x42d210=_0x12b3d3['split']('/'),_0x4efd4d=_0x4e7404?_0x42d210[_0x31361f(0x3e6)](0x0,-0x1):_0x42d210[_0x31361f(0x3e6)](0x0,-0x1),_0x2a85e6=_0x4e7404?'':_0x42d210[_0x42d210[_0x31361f(0x249)]-0x1];let _0x4f908d=_0x555e9a;const _0x1c7010={};for(const _0x50ac0b of _0x4efd4d){if(!_0x50ac0b)continue;if(_0x4f908d[_0x31361f(0x5a5)][_0x31361f(0xe5)](_0x50ac0b))_0x4f908d=_0x4f908d[_0x31361f(0x5a5)][_0x31361f(0x1ed)](_0x50ac0b);else{if(_0x4f908d[_0x31361f(0x2bb)])_0x1c7010[_0x4f908d[_0x31361f(0x2bb)]['param']]=_0x50ac0b,_0x4f908d=_0x4f908d[_0x31361f(0x2bb)][_0x31361f(0x236)];else return[];}}const _0x45d678=_0x4efd4d[_0x31361f(0x69e)](Boolean),_0x366186=_0x45d678['length']?_0x45d678[_0x31361f(0x139)]('/')+'/':'',_0x3c0f11=[];for(const [_0x20379c]of _0x4f908d[_0x31361f(0x5a5)]){if(_0x20379c[_0x31361f(0x334)](_0x2a85e6))_0x3c0f11[_0x31361f(0x39b)](_0x366186+_0x20379c);}if(_0x4f908d[_0x31361f(0x2bb)])for(const _0x4ad659 of _0x3ef56e(_0x4f908d[_0x31361f(0x2bb)][_0x31361f(0x4ab)],_0x1c7010,_0x12985b,_0x4bd62b)){if(String(_0x4ad659)[_0x31361f(0x334)](_0x2a85e6))_0x3c0f11[_0x31361f(0x39b)](_0x366186+_0x4ad659);}return _0x3c0f11[_0x31361f(0x3e6)](0x0,0x64);}const _0x2e563f=[_0x2b6d91(0x6b6),_0x2b6d91(0x434),_0x2b6d91(0x215),'envs',_0x2b6d91(0x199),_0x2b6d91(0x490),_0x2b6d91(0x627),_0x2b6d91(0x472),_0x2b6d91(0x719),_0x2b6d91(0x1bf)];function _0x375356(_0x25e40e,_0x1db04e,_0x5424d1){return function _0x3fad14(_0x50294d){const _0x215210=_0x3dbc;try{const _0x4f673b=_0x50294d[_0x215210(0x3f4)](/\s[{[]/),_0x53ed45=_0x4f673b>=0x0?_0x50294d[_0x215210(0x3e6)](0x0,_0x4f673b):_0x50294d,_0x555a92=_0x53ed45['trimStart']();if(!_0x555a92){const _0x128916=[..._0x2e563f,...[..._0x25e40e[_0x215210(0x5a5)][_0x215210(0x2b3)]()]]['slice'](0x0,0x64);return[_0x128916,''];}const _0x4971ff=_0x555a92[_0x215210(0x48b)](/\s+/),_0x104f4f=_0x4971ff[0x0],_0x46d8ad=_0x104f4f[_0x215210(0x452)]();if(_0x4971ff[_0x215210(0x249)]===0x1){const _0x503c9b=_0x104f4f[_0x215210(0xeb)](),_0x9bc837=_0x2e563f[_0x215210(0x69e)](_0x573b3b=>_0x573b3b[_0x215210(0x334)](_0x503c9b)),_0x52122f=_0x161e9e(_0x104f4f,_0x25e40e,_0x1db04e,_0x5424d1),_0x390af0=[...new Set([..._0x9bc837,..._0x52122f])][_0x215210(0x3e6)](0x0,0x64);return[_0x390af0,_0x104f4f];}if(_0x47e416[_0x215210(0xe5)](_0x46d8ad)&&_0x4971ff[_0x215210(0x249)]===0x2){const _0x153ab7=_0x4971ff[0x1],_0x309d92=_0x161e9e(_0x153ab7,_0x25e40e,_0x1db04e,_0x5424d1);return[_0x309d92[_0x215210(0x539)](_0x48e5d1=>_0x104f4f+'\x20'+_0x48e5d1),_0x104f4f+'\x20'+_0x153ab7];}if(!_0x47e416[_0x215210(0xe5)](_0x46d8ad)&&_0x4971ff[_0x215210(0x249)]>0x1){const _0xe4254b=_0x161e9e(_0x104f4f,_0x25e40e,_0x1db04e,_0x5424d1),_0x539bc5='\x20'+_0x4971ff[_0x215210(0x3e6)](0x1)['join']('\x20');return[_0xe4254b[_0x215210(0x539)](_0x31d8a6=>_0x31d8a6+_0x539bc5),_0x104f4f+_0x539bc5];}return[[],_0x50294d];}catch{return[[],_0x50294d];}};}async function _0x599914(_0x4b6400,_0x315587){const _0x10685d=_0x2b6d91,_0xb81d4b={'enabled':!![],'level':_0x315587['logLevel']??_0x10685d(0x213)},_0x2f2ec3={'env':'default'},_0x478e36={'current':null},_0x22c466=_0x1aa8ee(_0x4b6400['http'][_0x10685d(0x80)]()),_0x1c431b=_0x375356(_0x22c466,_0x4b6400,_0x2f2ec3);_0x4b6400[_0x10685d(0x116)]['attach'](_0x1ddbf1=>{const _0x4b2fce=_0x10685d;if(!_0xb81d4b[_0x4b2fce(0x70e)])return;_0x2461cb(_0x1ddbf1,_0xb81d4b[_0x4b2fce(0x4d4)]),_0x478e36['current']?.['prompt'](!![]);}),_0x20d54e(_0x4b6400,_0x315587);const _0x20c069=_0x5c47c0[_0x10685d(0x6df)]({'input':process[_0x10685d(0x241)],'output':process['stdout'],'terminal':!![],'completer':_0x1c431b,'prompt':_0x1184ad(_0x2f2ec3),'historySize':_0x40e1cc});try{const _0x909a26=_0x29785e[_0x10685d(0x3b9)](_0x4b79c6,_0x10685d(0x714))['split']('\x0a')[_0x10685d(0x69e)](Boolean);_0x20c069[_0x10685d(0x307)]=_0x909a26['reverse']()[_0x10685d(0x3e6)](0x0,_0x40e1cc);}catch{}_0x478e36['current']=_0x20c069,_0x20c069['on']('line',async _0x2bb9b0=>{const _0x36b3cd=_0x10685d;_0x20c069['pause']();try{await _0x109353(_0x2bb9b0,_0x4b6400,_0x315587,_0xb81d4b,_0x2f2ec3,_0x20c069);}catch(_0x21c927){console[_0x36b3cd(0x271)](_0x5de7e0(_0x40cb16[_0x36b3cd(0x42e)],'\x20\x20Error:\x20'+_0x21c927[_0x36b3cd(0x5a3)]));}finally{_0x20c069['resume'](),_0x20c069[_0x36b3cd(0x15a)]();}}),_0x20c069['on'](_0x10685d(0x5b2),()=>{const _0x188faf=_0x10685d;try{const _0x5f5d06=[..._0x20c069[_0x188faf(0x307)]][_0x188faf(0x138)]()[_0x188faf(0x69e)](Boolean)[_0x188faf(0x3e6)](0x0,_0x40e1cc);_0x29785e[_0x188faf(0x5b6)](_0x4b79c6,_0x5f5d06[_0x188faf(0x139)]('\x0a')+'\x0a');}catch{}_0x5cf1cd(_0x4b6400,0x0);});let _0x3a92c8=0x0;return process['on'](_0x10685d(0x5d4),()=>{const _0x3a0271=_0x10685d;if(_0x3ffecc)return _0x5cf1cd(_0x4b6400,0x82,_0x3a0271(0x5d4));if(_0x20c069['line']==='')return _0x5cf1cd(_0x4b6400,0x0,_0x3a0271(0x5d4));const _0xba0e1d=Date[_0x3a0271(0x28a)]();if(_0xba0e1d-_0x3a92c8<0x5dc)return _0x5cf1cd(_0x4b6400,0x0,_0x3a0271(0x3d2));_0x3a92c8=_0xba0e1d,process['stdout'][_0x3a0271(0x360)]('\x0a'),_0x20c069[_0x3a0271(0x4a6)](0x0),_0x20c069['prompt'](),process[_0x3a0271(0x36e)][_0x3a0271(0x360)](_0x5de7e0(_0x40cb16['dim'],_0x3a0271(0x4bd)));}),process['on'](_0x10685d(0x363),()=>_0x5cf1cd(_0x4b6400,0x0,_0x10685d(0x363))),process['on'](_0x10685d(0x1f7),()=>_0x5cf1cd(_0x4b6400,0x0,_0x10685d(0x1f7))),_0x20c069['prompt'](),_0x20c069;}return okdbShell={'start':_0x599914,'colorLog':_0x2461cb,'lenientParse':_0x471fbb,'_splitLine':_0x1b675c,'_formatRouteHelpLines':_0x35cb16,'_routeSummary':_0x4c1b88,'_routeTags':_0x5d1624},okdbShell;}var okdbLoopMonitor,hasRequiredOkdbLoopMonitor;function requireOkdbLoopMonitor(){const _0x41d3a4=_0x563deb;if(hasRequiredOkdbLoopMonitor)return okdbLoopMonitor;hasRequiredOkdbLoopMonitor=0x1;const {monitorEventLoopDelay:_0x15fd96,performance:_0x26bba5}=require$$0$4,_0x34fc84=process.env.OKDB_LOOP_LAG==='1'||process.env.OKDB_LOOP_LAG===_0x41d3a4(0x48a),_0x1783ce=Number(process.env.OKDB_LOOP_LAG_MS)||0x7d0,_0x477da8=process.env.OKDB_LOOP_LAG_ALL==='1',_0x47ecec=Number(process.env.OKDB_LOOP_LAG_MIN_MS)||0x64;class _0x14c174{constructor(){const _0x2e3329=_0x41d3a4;this['enabled']=_0x34fc84,this[_0x2e3329(0x35c)]=new Map(),this['_h']=null,this[_0x2e3329(0x507)]=null,this[_0x2e3329(0x606)]=![],this['_log']=(_0x43fffe,_0x13812b)=>process[_0x2e3329(0x36e)][_0x2e3329(0x360)](_0x43fffe+(_0x13812b?'\x20'+JSON[_0x2e3329(0x316)](_0x13812b):'')+'\x0a');}[_0x41d3a4(0x28a)](){return _0x26bba5['now']();}[_0x41d3a4(0x42d)](_0xe78f6f){const _0x344d31=_0x41d3a4;if(typeof _0xe78f6f===_0x344d31(0x2be))this[_0x344d31(0x370)]=_0xe78f6f;}[_0x41d3a4(0x158)](_0x363c8f,_0x6a570d,_0x369b51){const _0x830e41=_0x41d3a4;if(!this['enabled'])return;let _0x59376b=this[_0x830e41(0x35c)][_0x830e41(0x1ed)](_0x363c8f);!_0x59376b&&(_0x59376b={'ms':0x0,'count':0x0,'maxMs':0x0,'maxExtra':''},this[_0x830e41(0x35c)]['set'](_0x363c8f,_0x59376b)),_0x59376b['ms']+=_0x6a570d,_0x59376b[_0x830e41(0x417)]+=0x1,_0x6a570d>_0x59376b[_0x830e41(0x4a3)]&&(_0x59376b[_0x830e41(0x4a3)]=_0x6a570d,_0x59376b[_0x830e41(0x422)]=_0x369b51||'');}[_0x41d3a4(0x15c)](_0x4052b4){const _0x2a2a88=_0x41d3a4;if(!this[_0x2a2a88(0x70e)]||this['_started'])return;this[_0x2a2a88(0x606)]=!![];if(_0x4052b4)this[_0x2a2a88(0x370)]=_0x4052b4;this['_h']=_0x15fd96({'resolution':0xa}),this['_h'][_0x2a2a88(0x33f)](),this['_timer']=setInterval(()=>this[_0x2a2a88(0x42b)](),_0x1783ce);if(this['_timer'][_0x2a2a88(0x1b3)])this[_0x2a2a88(0x507)]['unref']();}[_0x41d3a4(0x5bd)](_0x10d73d){const _0x51cfcf=_0x41d3a4;if(!this['_windowCbs'])this[_0x51cfcf(0x63d)]=new Set();this[_0x51cfcf(0x63d)][_0x51cfcf(0x32e)](_0x10d73d);if(!this[_0x51cfcf(0x606)])this['_startAdmission']();}[_0x41d3a4(0x745)](_0x7437cb){const _0x513ce5=_0x41d3a4;this[_0x513ce5(0x63d)]?.[_0x513ce5(0x495)](_0x7437cb);}[_0x41d3a4(0x721)](){const _0x546f2e=_0x41d3a4;if(this[_0x546f2e(0x28d)])return;this[_0x546f2e(0x28d)]=!![];!this['_h']&&(this['_h']=_0x15fd96({'resolution':0xa}),this['_h']['enable']());const _0x11e615=_0x1783ce;this[_0x546f2e(0x46d)]=setInterval(()=>{const _0x3c5a1a=_0x546f2e,_0x3dba3c=this['_h'];if(!_0x3dba3c)return;const _0x1dcd02=_0x3dba3c[_0x3c5a1a(0x569)](0x63)/0xf4240,_0xa00658=_0x3dba3c[_0x3c5a1a(0x234)]/0xf4240,_0x1d7112=_0x3dba3c[_0x3c5a1a(0x3cd)]/0xf4240;_0x3dba3c[_0x3c5a1a(0x519)]();if(this[_0x3c5a1a(0x63d)])for(const _0x58f3ab of this[_0x3c5a1a(0x63d)]){try{_0x58f3ab({'p99Ms':_0x1dcd02,'maxMs':_0xa00658,'meanMs':_0x1d7112,'reportMs':_0x11e615});}catch{}}},_0x11e615);if(this['_admissionTimer'][_0x546f2e(0x1b3)])this[_0x546f2e(0x46d)][_0x546f2e(0x1b3)]();}[_0x41d3a4(0x42b)](){const _0x5ab185=_0x41d3a4,_0x55a963=this['_h'],_0x2aea4d=_0x55a963[_0x5ab185(0x234)]/0xf4240,_0x60169d=_0x55a963[_0x5ab185(0x569)](0x63)/0xf4240,_0x5ae985=_0x55a963['mean']/0xf4240;_0x55a963[_0x5ab185(0x519)]();const _0x4f656c=[...this['_buckets'][_0x5ab185(0x707)]()][_0x5ab185(0x539)](([_0x495649,_0x5be1ef])=>({'label':_0x495649,..._0x5be1ef}))[_0x5ab185(0x483)]((_0x2c5df0,_0x181361)=>_0x181361['ms']-_0x2c5df0['ms'])[_0x5ab185(0x3e6)](0x0,0x8);this[_0x5ab185(0x35c)][_0x5ab185(0x558)]();const _0x7227b1=_0x4f656c[_0x5ab185(0x333)]((_0x240f9c,_0x3e51cf)=>_0x240f9c+_0x3e51cf['ms'],0x0),_0x4578be=_0x4f656c[_0x5ab185(0x539)](_0x30e514=>_0x30e514[_0x5ab185(0x586)]+'='+_0x30e514['ms'][_0x5ab185(0x6c3)](0x0)+_0x5ab185(0x6af)+_0x30e514['count']+(_0x30e514[_0x5ab185(0x4a3)]>0x5?_0x5ab185(0x5a6)+_0x30e514[_0x5ab185(0x4a3)][_0x5ab185(0x6c3)](0x0)+'ms'+(_0x30e514[_0x5ab185(0x422)]?'\x20'+_0x30e514['maxExtra']:'')+')':''));(_0x477da8||_0x2aea4d>=_0x47ecec)&&this['_log'](_0x5ab185(0x500)+_0x1783ce+_0x5ab185(0x46e)+_0x2aea4d['toFixed'](0x0)+_0x5ab185(0x1ca)+_0x60169d[_0x5ab185(0x6c3)](0x0)+_0x5ab185(0xf0)+_0x5ae985['toFixed'](0x0)+'ms\x20busy='+_0x7227b1[_0x5ab185(0x6c3)](0x0)+'ms'+(_0x4578be[_0x5ab185(0x249)]?_0x5ab185(0x1dd)+_0x4578be[_0x5ab185(0x139)]('\x20\x20'):''),{'feature':_0x5ab185(0x576)});if(this[_0x5ab185(0x63d)])for(const _0x4409d2 of this[_0x5ab185(0x63d)]){try{_0x4409d2({'p99Ms':_0x60169d,'maxMs':_0x2aea4d,'meanMs':_0x5ae985,'reportMs':_0x1783ce});}catch{}}}['stop'](){const _0x13e15a=_0x41d3a4;if(this[_0x13e15a(0x507)])clearInterval(this[_0x13e15a(0x507)]);if(this['_h'])this['_h'][_0x13e15a(0x6c2)]();this['_timer']=null,this['_h']=null,this['_started']=![];}}const _0xdd5179=new _0x14c174();if(_0xdd5179['enabled'])_0xdd5179[_0x41d3a4(0x15c)]();return okdbLoopMonitor={'LOOP':_0xdd5179},okdbLoopMonitor;}var okdbWriter={'exports':{}},okdbDiag,hasRequiredOkdbDiag;function requireOkdbDiag(){if(hasRequiredOkdbDiag)return okdbDiag;hasRequiredOkdbDiag=0x1;const _0x4fcc59=require$$0$1,_0x3188e0=require$$1;let _0x44a830,_0x410387,_0x398bc5,_0xd7de6,_0x5e66d2,_0xd47338,_0x1171b0,_0x49cdf5=![];const _0x398b3f=new Set();let _0x2c386b=null;const _0x4fafee=new Map();function _0x331347(){const _0xdcf06e=_0x3dbc;if(_0x44a830!==undefined)return _0x44a830;_0x44a830=process.env.OKDB_DIAG==='1';if(!_0x44a830)return![];_0x410387=process.env.OKDB_DIAG_STACK==='1',_0xd7de6=Math[_0xdcf06e(0x234)](0x10,Number(process.env.OKDB_DIAG_RING)||0x100),_0x398bc5=new Array(_0xd7de6),_0x5e66d2=0x0,_0xd47338=0x0,_0x1171b0=process.env.OKDB_DIAG_DIR||null;if(_0x1171b0)try{_0x4fcc59[_0xdcf06e(0x180)](_0x1171b0,{'recursive':!![]});}catch{}return!![];}function _0x3267c2(){return _0x44a830===undefined?_0x331347():_0x44a830;}function _0x2b975c(_0x30b69f,_0x45f073){const _0x252a0c=_0x3dbc;if(_0x44a830===undefined?!_0x331347():!_0x44a830)return;let _0x244673;if(_0x410387){const _0x83111c=new Error()[_0x252a0c(0x3a1)]||'';_0x244673=_0x83111c[_0x252a0c(0x48b)]('\x0a')[_0x252a0c(0x3e6)](0x3)[_0x252a0c(0x539)](_0x35c72e=>_0x35c72e['trim']())[_0x252a0c(0x69e)](Boolean)[_0x252a0c(0x3e6)](0x0,0x8);}_0x398bc5[_0x5e66d2]={'seq':_0xd47338++,'t':Date[_0x252a0c(0x28a)](),'env':_0x30b69f,'kind':_0x45f073||_0x252a0c(0x35a),'stack':_0x244673},_0x5e66d2=(_0x5e66d2+0x1)%_0xd7de6;}function _0x1038f2(_0x4b38bd){const _0x11ddd1=_0x3dbc,_0x7d9cbc=[];for(let _0xd548d0=0x0;_0xd548d0<_0xd7de6;_0xd548d0++){const _0x18a5e8=_0x398bc5[(_0x5e66d2-0x1-_0xd548d0+_0xd7de6*0x2)%_0xd7de6];if(!_0x18a5e8)continue;_0x7d9cbc['push'](_0x18a5e8);if(_0x7d9cbc[_0x11ddd1(0x249)]>=_0x4b38bd)break;}return _0x7d9cbc;}function _0x17d63a(_0x45dcff){const _0x34ef50=_0x3dbc;try{process['stderr']['write'](_0x45dcff+'\x0a');}catch{}if(_0x1171b0)try{_0x4fcc59['appendFileSync'](_0x3188e0[_0x34ef50(0x139)](_0x1171b0,_0x34ef50(0x25a)+process[_0x34ef50(0x5ca)]+'.log'),_0x45dcff+'\x0a');}catch{}}function _0x79cf6(_0xf6794){const _0x566ed6=_0x3dbc,_0xbfbee3=_0x1038f2(_0xf6794);if(!_0xbfbee3[_0x566ed6(0x249)])return _0x566ed6(0x33c);const _0x326348=Date['now']();return _0xbfbee3['map'](_0x1dfbce=>{const _0xead1af=_0x566ed6,_0x1f7784=_0xead1af(0x63b)+_0x1dfbce[_0xead1af(0x63e)]+'\x20-'+(_0x326348-_0x1dfbce['t'])+_0xead1af(0x4a5)+_0x1dfbce['env']+'\x20'+_0x1dfbce[_0xead1af(0x3c3)];return _0x1dfbce[_0xead1af(0x3a1)]&&_0x1dfbce[_0xead1af(0x3a1)][_0xead1af(0x249)]?_0x1f7784+_0xead1af(0x25c)+_0x1dfbce[_0xead1af(0x3a1)]['join']('\x0a\x20\x20\x20\x20\x20\x20'):_0x1f7784;})[_0x566ed6(0x139)]('\x0a');}function _0x51d784(_0x51cb52,_0x16b38c){const _0x47e38e=_0x3dbc,_0x1b3814='\x0a===\x20OKDB_DIAG\x20'+_0x51cb52+'\x20@\x20'+new Date()['toISOString']()+_0x47e38e(0x106)+process[_0x47e38e(0x5ca)]+_0x47e38e(0x2ae),_0x40d30d=[_0x1b3814,_0x47e38e(0x2ea)+(_0x16b38c&&_0x16b38c[_0x47e38e(0x3a1)]?_0x16b38c[_0x47e38e(0x3a1)][_0x47e38e(0x48b)]('\x0a')[0x0]:_0x16b38c),_0x47e38e(0x2dc)+(_0x410387?'':'\x20—\x20set\x20OKDB_DIAG_STACK=1\x20to\x20name\x20the\x20call\x20site')+':',_0x79cf6(0x18),_0x4dcad6(),'='[_0x47e38e(0x38d)](_0x1b3814[_0x47e38e(0x249)]-0x1)];_0x17d63a(_0x40d30d[_0x47e38e(0x139)]('\x0a'));}function _0x1c895c(_0x1a178a){const _0x497bae=_0x3dbc;if(!_0x3267c2())return;const _0xf5af15=String(_0x1a178a&&_0x1a178a[_0x497bae(0x5a3)]||_0x1a178a||''),_0x2f2415=/already closed|environment is already|invalid read txn|reset an invalid/i['test'](_0xf5af15);_0x51d784(_0x2f2415?'ORPHAN\x20(env-closed\x20write)':_0x497bae(0x488),_0x1a178a);if(process.env.OKDB_DIAG_SURVIVE==='1'&&_0x2f2415)return;try{console[_0x497bae(0x271)](_0x1a178a&&_0x1a178a['stack']?_0x1a178a[_0x497bae(0x3a1)]:_0x1a178a);}catch{}process[_0x497bae(0x719)](0x1);}function _0xa83023(_0x25c127){const _0x1d0ff2=_0x3dbc;if(!_0x3267c2())return;const _0x3aed76=String(_0x25c127&&_0x25c127['message']||_0x25c127||'');/already closed|environment is already|invalid read txn|reset an invalid/i['test'](_0x3aed76)&&_0x51d784(_0x1d0ff2(0x715),_0x25c127);}function _0x4dcad6(){const _0x4cdfce=_0x3dbc,_0x46a0fb=[_0x4cdfce(0x329)];let _0x3e6d8b=![];for(const _0x4eb66a of _0x398b3f){const _0x1b10ce=_0x4eb66a&&_0x4eb66a[_0x4cdfce(0x1aa)];if(!_0x1b10ce)continue;for(const [_0x3f2ea0,_0x2cbff2]of _0x1b10ce){const _0x4c4990=_0x2cbff2&&_0x2cbff2[_0x4cdfce(0x386)]&&_0x2cbff2[_0x4cdfce(0x386)][_0x4cdfce(0x18b)];if(!_0x4c4990)continue;let _0x2ecc81,_0x22e0a4;try{_0x2ecc81=Atomics[_0x4cdfce(0x178)](_0x4c4990,0x0),_0x22e0a4=Atomics['load'](_0x4c4990,0x1);}catch{continue;}if(_0x2ecc81===0x0)continue;_0x3e6d8b=!![];const _0x2eb41d=_0x2ecc81>0x0?_0x4cdfce(0x56c):'copy',_0x90374b=Date['now']()-Math['abs'](_0x2ecc81)*0x3e8,_0x4bcacc=((()=>{const _0x578724=_0x4cdfce;try{return _0x2cbff2[_0x578724(0x387)]&&_0x2cbff2[_0x578724(0x387)][_0x578724(0x54e)]?_0x2cbff2[_0x578724(0x387)][_0x578724(0x54e)]():null;}catch{return null;}})());_0x46a0fb[_0x4cdfce(0x39b)]('\x20\x20env='+_0x3f2ea0+_0x4cdfce(0x3fc)+_0x2eb41d+_0x4cdfce(0x280)+_0x90374b+_0x4cdfce(0x2a1)+_0x22e0a4+(_0x4bcacc?_0x4cdfce(0xc3)+_0x4bcacc[_0x4cdfce(0x28b)]+_0x4cdfce(0xd5)+_0x4bcacc[_0x4cdfce(0x51f)]+_0x4cdfce(0x2f2)+_0x4bcacc[_0x4cdfce(0x658)]+'}':''));}}if(!_0x3e6d8b)_0x46a0fb[_0x4cdfce(0x39b)]('\x20\x20(no\x20env\x20draining)');return _0x46a0fb[_0x4cdfce(0x139)]('\x0a');}function _0x37a2de(){const _0x2e3fa1=_0x3dbc;if(!_0x3267c2())return;const _0x31b95f=Math['max'](0x3e8,Number(process.env.OKDB_DIAG_STALL_MS)||0x1f40),_0x10b715=Date[_0x2e3fa1(0x28a)]();for(const _0x3a0377 of _0x398b3f){const _0x1d65b5=_0x3a0377&&_0x3a0377[_0x2e3fa1(0x1aa)];if(!_0x1d65b5)continue;for(const [_0x104ef4,_0x1e0c7e]of _0x1d65b5){const _0x75f54b=_0x1e0c7e&&_0x1e0c7e[_0x2e3fa1(0x386)]&&_0x1e0c7e['_coordinator']['view'];if(!_0x75f54b)continue;let _0x4c0c7c;try{_0x4c0c7c=Atomics[_0x2e3fa1(0x178)](_0x75f54b,0x0);}catch{continue;}const _0x3f0301=_0x3a0377[_0x2e3fa1(0x5a4)]+'|'+_0x104ef4;if(_0x4c0c7c<=0x0){_0x4fafee[_0x2e3fa1(0x495)](_0x3f0301);continue;}const _0x2615a2=_0x10b715-_0x4c0c7c*0x3e8,_0x1a1505=_0x4fafee[_0x2e3fa1(0x1ed)](_0x3f0301);if(_0x2615a2<_0x31b95f)continue;if(_0x1a1505&&_0x10b715-_0x1a1505[_0x2e3fa1(0x453)]<_0x31b95f)continue;_0x4fafee[_0x2e3fa1(0x494)](_0x3f0301,{'firstTs':_0x1a1505?_0x1a1505[_0x2e3fa1(0x208)]:_0x4c0c7c,'dumpedAt':_0x10b715});const _0x1a8b9c=_0x2e3fa1(0x286)+_0x2615a2+_0x2e3fa1(0x43b)+_0x104ef4+'\x20@\x20'+new Date()['toISOString']()+_0x2e3fa1(0x106)+process[_0x2e3fa1(0x5ca)]+'\x20===';_0x17d63a([_0x1a8b9c,_0x4dcad6(),'='['repeat'](_0x1a8b9c['length']-0x1)][_0x2e3fa1(0x139)]('\x0a'));}}}function _0x4cdbea(){const _0x54d3a6=_0x3dbc;if(!_0x3267c2()||_0x49cdf5)return;_0x49cdf5=!![],process[_0x54d3a6(0x362)](_0x54d3a6(0x488),_0x1c895c),process['prependListener'](_0x54d3a6(0xf4),_0xa83023);const _0xa16288=Math['max'](0xfa,Number(process.env.OKDB_DIAG_WATCH_MS)||0x7d0);_0x2c386b=setInterval(_0x37a2de,_0xa16288);if(_0x2c386b[_0x54d3a6(0x1b3)])_0x2c386b['unref']();}function _0x22537c(_0x529070){const _0x3091a6=_0x3dbc;if(!_0x3267c2()||!_0x529070)return;_0x398b3f[_0x3091a6(0x32e)](_0x529070),_0x4cdbea();}function _0x343e66(_0x537e66){const _0xb30492=_0x3dbc;_0x398b3f[_0xb30492(0x495)](_0x537e66);}function _0x53ee66(){const _0x4aa399=_0x3dbc;if(!_0x3267c2())return{'enabled':![],'hint':_0x4aa399(0x462)};return{'enabled':!![],'stackCapture':!!_0x410387,'recentWrites':_0x1038f2(0x10),'drain':_0x4dcad6()};}return okdbDiag={'isEnabled':_0x3267c2,'recordWrite':_0x2b975c,'installDiag':_0x4cdbea,'registerOkdb':_0x22537c,'unregisterOkdb':_0x343e66,'snapshot':_0x53ee66},okdbDiag;}var hasRequiredOkdbWriter;function requireOkdbWriter(){const _0x4813f6=_0x563deb;if(hasRequiredOkdbWriter)return okdbWriter['exports'];hasRequiredOkdbWriter=0x1;const {performance:_0x4ba395}=require$$0$5,_0x239605=requireOkdbDiag(),_0x30b490=process.env.OKDB_COMMIT_MODE==='sync';class _0x4e7224{constructor(_0x49c967){const _0x1c779d=_0x3dbc;this[_0x1c779d(0x215)]=_0x49c967,this[_0x1c779d(0xf2)]=new Set(),this[_0x1c779d(0x5d0)]=new Map(),this[_0x1c779d(0x27b)]=0x0,this[_0x1c779d(0x4f6)]=[],this[_0x1c779d(0x423)]=[],this[_0x1c779d(0x1c9)]=Math[_0x1c779d(0x234)](0x0,Number(process.env.OKDB_WRITER_HIGH_WATER??0x400)),this[_0x1c779d(0x109)]=0x0,this[_0x1c779d(0x694)]=[],this[_0x1c779d(0x2bd)]=0x0,this[_0x1c779d(0x47a)]=null,this[_0x1c779d(0x6c5)]=0x0,this['_nestedTotal']=0x0,this[_0x1c779d(0x5c9)]=![];}async[_0x4813f6(0x4ba)](_0x37c609,_0x2c6000,{admitted:admitted=![]}={}){const _0x476629=_0x4813f6;if(_0x239605['isEnabled']())_0x239605[_0x476629(0x489)](this['env']?.['name'],_0x2c6000);if(this[_0x476629(0x4f5)]){const _0x35942e=new Error(_0x476629(0x1d2));_0x35942e[_0x476629(0x5f2)]='ENV_CLOSING_RETRY';throw _0x35942e;}if(this[_0x476629(0x1c9)]>0x0){let _0x15e97b=![];while(this[_0x476629(0x109)]>=this[_0x476629(0x1c9)]&&!this[_0x476629(0x4f5)]){!_0x15e97b&&(_0x15e97b=!![],this[_0x476629(0x2bd)]++),await new Promise(_0x3217f6=>this[_0x476629(0x694)]['push'](_0x3217f6));}if(this['_closed']){const _0x3d2814=new Error(_0x476629(0x1d2));_0x3d2814['code']=_0x476629(0x13b);throw _0x3d2814;}}this[_0x476629(0x109)]++;const _0x5aac9f=admitted?null:this[_0x476629(0x215)][_0x476629(0x386)];for(;;){while(this[_0x476629(0x47a)])await this[_0x476629(0x47a)];if(_0x5aac9f)try{await _0x5aac9f[_0x476629(0x168)]();}catch(_0x76e6d8){this[_0x476629(0x109)]--;if(this['_bpWaiters'][_0x476629(0x249)]&&this['_outstanding']<this[_0x476629(0x1c9)])this[_0x476629(0x694)][_0x476629(0x20b)]()();throw _0x76e6d8;}if(!this[_0x476629(0x47a)])break;if(_0x5aac9f)_0x5aac9f[_0x476629(0x11c)]();}if(this[_0x476629(0x4f5)]){if(_0x5aac9f)_0x5aac9f[_0x476629(0x11c)]();this[_0x476629(0x109)]--;if(this[_0x476629(0x694)][_0x476629(0x249)]&&this[_0x476629(0x109)]<this['_highWater'])this[_0x476629(0x694)][_0x476629(0x20b)]()();const _0x3a3aa1=new Error('okdb-writer:\x20env\x20closing\x20—\x20retry');_0x3a3aa1[_0x476629(0x5f2)]=_0x476629(0x13b);throw _0x3a3aa1;}const _0x301121=_0x4ba395['now']();if(_0x30b490)try{const _0x292f3e=this['env']['db']['transactionSync'](_0x37c609);this[_0x476629(0x27b)]++;if(this[_0x476629(0x4f6)][_0x476629(0x39b)](_0x4ba395['now']()-_0x301121)>0x100)this[_0x476629(0x4f6)][_0x476629(0x20b)]();if(this[_0x476629(0x423)][_0x476629(0x39b)](_0x4ba395['now']())>0x800)this[_0x476629(0x423)][_0x476629(0x20b)]();return _0x292f3e;}finally{this['_outstanding']--;if(this[_0x476629(0x694)]['length']&&this[_0x476629(0x109)]<this[_0x476629(0x1c9)])this[_0x476629(0x694)][_0x476629(0x20b)]()();if(_0x5aac9f)_0x5aac9f[_0x476629(0x11c)]();}let _0x1f6559=null;const _0x24713e=()=>{const _0x39db72=_0x476629,_0x19634e=_0x37c609();if(_0x19634e&&typeof _0x19634e[_0x39db72(0x722)]===_0x39db72(0x2be)&&!_0x1f6559){this[_0x39db72(0x6c5)]++;let _0x5c741e;const _0x5f56e7=new Promise(_0x5a345f=>_0x5c741e=_0x5a345f);this['_held']=_0x5f56e7,_0x1f6559=()=>{const _0x4a9f4e=_0x39db72;if(this['_held']===_0x5f56e7)this[_0x4a9f4e(0x47a)]=null;_0x5c741e();};}return _0x19634e;};let _0x140172;try{_0x140172=this[_0x476629(0x215)]['db'][_0x476629(0xf8)](_0x24713e);}catch(_0x24e4cf){_0x140172=Promise['reject'](_0x24e4cf);}(!_0x140172||typeof _0x140172[_0x476629(0x722)]!==_0x476629(0x2be))&&(this[_0x476629(0x2ab)]++,!this['_nestedWarned']&&(this[_0x476629(0x5c9)]=!![],console[_0x476629(0x14c)](_0x476629(0x456)+(this[_0x476629(0x215)]?.['name']??'?')+_0x476629(0x308))),_0x140172=Promise['resolve'](_0x140172));const _0x3e2b24=()=>{if(_0x1f6559)_0x1f6559();};_0x140172[_0x476629(0x722)](_0x3e2b24,_0x3e2b24),this[_0x476629(0xf2)]['add'](_0x140172),this[_0x476629(0x5d0)][_0x476629(0x494)](_0x140172,_0x301121);const _0x32b1bb=()=>{const _0x5581a9=_0x476629;this[_0x5581a9(0xf2)][_0x5581a9(0x495)](_0x140172),this['_enqueuedAt']['delete'](_0x140172),this[_0x5581a9(0x27b)]++,this['_outstanding']--;this[_0x5581a9(0x694)]['length']&&this[_0x5581a9(0x109)]<this[_0x5581a9(0x1c9)]&&this['_bpWaiters']['shift']()();if(this[_0x5581a9(0x4f6)][_0x5581a9(0x39b)](_0x4ba395[_0x5581a9(0x28a)]()-_0x301121)>0x100)this['_durs'][_0x5581a9(0x20b)]();if(this[_0x5581a9(0x423)][_0x5581a9(0x39b)](_0x4ba395[_0x5581a9(0x28a)]())>0x800)this['_done'][_0x5581a9(0x20b)]();};_0x140172[_0x476629(0x722)](_0x32b1bb,_0x32b1bb);try{return await _0x140172;}finally{if(_0x5aac9f)_0x5aac9f[_0x476629(0x11c)]();}}['status'](){const _0x1e0d3b=_0x4813f6,_0x400f39=_0x4ba395[_0x1e0d3b(0x28a)]();let _0x4a000f=0x0;for(const _0x11a51f of this[_0x1e0d3b(0x5d0)][_0x1e0d3b(0x5b1)]()){const _0x233fd7=_0x400f39-_0x11a51f;if(_0x233fd7>_0x4a000f)_0x4a000f=_0x233fd7;}let _0x18e025=0x0;for(let _0x10edd9=this['_done'][_0x1e0d3b(0x249)]-0x1;_0x10edd9>=0x0;_0x10edd9--){if(_0x400f39-this[_0x1e0d3b(0x423)][_0x10edd9]>0x3e8)break;_0x18e025++;}let _0x3afff6=0x0;if(this['_durs'][_0x1e0d3b(0x249)]){const _0x2d0dd4=[...this[_0x1e0d3b(0x4f6)]][_0x1e0d3b(0x483)]((_0x3619ab,_0x319fcf)=>_0x3619ab-_0x319fcf);_0x3afff6=_0x2d0dd4[Math[_0x1e0d3b(0x4b1)](_0x2d0dd4['length']-0x1,Math['floor'](_0x2d0dd4[_0x1e0d3b(0x249)]*0.99))];}return{'depth':this[_0x1e0d3b(0xf2)][_0x1e0d3b(0xd1)],'oldestPendingMs':Math[_0x1e0d3b(0x336)](_0x4a000f),'committed':this[_0x1e0d3b(0x27b)],'commitsPerSec':_0x18e025,'commitP99Ms':Math[_0x1e0d3b(0x336)](_0x3afff6),'parkedNow':this[_0x1e0d3b(0x694)][_0x1e0d3b(0x249)],'parkedTotal':this[_0x1e0d3b(0x2bd)],'highWater':this[_0x1e0d3b(0x1c9)]};}[_0x4813f6(0x678)](){const _0x55b0b7=_0x4813f6,_0x4d5320=_0x4ba395[_0x55b0b7(0x28a)]();return[...this['_enqueuedAt']['values']()]['map'](_0x19c7a5=>Math[_0x55b0b7(0x336)](_0x4d5320-_0x19c7a5))['sort']((_0x3a674c,_0x2078ab)=>_0x2078ab-_0x3a674c);}[_0x4813f6(0x4ca)](){const _0x2ad48b=_0x4813f6;this[_0x2ad48b(0x4f5)]=!![];for(const _0x569c29 of this[_0x2ad48b(0x694)]['splice'](0x0))_0x569c29();}async['drain'](){const _0x2e85c3=_0x4813f6;let _0x1cb4a5=0x0;while(this[_0x2e85c3(0xf2)][_0x2e85c3(0xd1)]&&_0x1cb4a5++<0x3e8){await Promise[_0x2e85c3(0x13f)]([...this[_0x2e85c3(0xf2)]]);}}async[_0x4813f6(0x170)](_0x321287,_0x5c95f1,_0x3c6dd3,_0x3ce5c1){const _0x1e43f4=_0x4813f6;return this[_0x1e43f4(0x4ba)](()=>{const _0x38b242=_0x1e43f4;if(_0x3ce5c1===undefined)_0x321287[_0x38b242(0x23c)](_0x5c95f1,_0x3c6dd3);else _0x321287[_0x38b242(0x23c)](_0x5c95f1,_0x3c6dd3,_0x3ce5c1);},_0x1e43f4(0x50c));}async[_0x4813f6(0x5c3)](_0x4f0ea2,_0x3e0303){const _0x411884=_0x4813f6;return this['transaction'](()=>_0x4f0ea2['removeSync'](_0x3e0303),_0x411884(0x530));}}async function _0x51522a(_0x44b028,_0x2ccfc0){const _0x58e1fe=_0x4813f6;if(_0x2ccfc0==null)_0x2ccfc0=Math[_0x58e1fe(0x234)](0x3e8,Number(process.env.OKDB_FLUSH_BEFORE_CLOSE_MS)||0x1d4c0);try{const _0x275cfd=_0x44b028?.[_0x58e1fe(0x448)];if(!_0x275cfd||typeof _0x275cfd[_0x58e1fe(0x722)]!==_0x58e1fe(0x2be))return;await Promise[_0x58e1fe(0x537)]([Promise[_0x58e1fe(0x429)](_0x275cfd)[_0x58e1fe(0x4ec)](()=>{}),new Promise(_0x5490e7=>{const _0x2f44dc=_0x58e1fe,_0x3047b4=setTimeout(_0x5490e7,_0x2ccfc0);if(_0x3047b4[_0x2f44dc(0x1b3)])_0x3047b4[_0x2f44dc(0x1b3)]();})]);}catch{}}function _0x2c8e87(_0x86a65a){const _0x277878=_0x4813f6;if(_0x30b490)return Promise[_0x277878(0x429)]();const _0x4cfd74=_0x86a65a?.['committed'];return _0x4cfd74&&typeof _0x4cfd74['then']===_0x277878(0x2be)?_0x4cfd74:Promise[_0x277878(0x429)]();}return okdbWriter[_0x4813f6(0x5d5)]=_0x4e7224,okdbWriter[_0x4813f6(0x5d5)][_0x4813f6(0x4c0)]=_0x51522a,okdbWriter[_0x4813f6(0x5d5)][_0x4813f6(0x6e0)]=_0x2c8e87,okdbWriter['exports'][_0x4813f6(0x220)]=_0x30b490,okdbWriter[_0x4813f6(0x5d5)];}var okdbLock,hasRequiredOkdbLock;function requireOkdbLock(){const _0x1fe9b9=_0x563deb;if(hasRequiredOkdbLock)return okdbLock;hasRequiredOkdbLock=0x1;const _0x4d1b21=require$$0,{SYNC_COMMITS:_0x4e05f1}=requireOkdbWriter(),_0x176488=_0x1fe9b9(0x4d0);class _0x417624{constructor(_0x17944f,_0x3c74ea,_0x42c4d9){const _0xf48d8d=_0x1fe9b9;this[_0xf48d8d(0x72c)]=_0x17944f,this[_0xf48d8d(0x5ec)]=_0x3c74ea,this['_acquiredAt']=_0x42c4d9,this[_0xf48d8d(0x6c0)]=![],this[_0xf48d8d(0x3eb)]=null,this[_0xf48d8d(0x4c5)]=null;}[_0x1fe9b9(0x3ec)](){const _0x5ce942=_0x1fe9b9;if(this[_0x5ce942(0x6c0)])return![];try{const _0x57bb1f=this['_lock']['_db']()['get'](this[_0x5ce942(0x5ec)]);if(!_0x57bb1f||_0x57bb1f[_0x5ce942(0x734)]!==this[_0x5ce942(0x1ab)])return![];const _0xfb1d69=_0x57bb1f['updatedAt']??_0x57bb1f[_0x5ce942(0x734)];if(_0xfb1d69+_0x57bb1f[_0x5ce942(0x5eb)]<Date['now']())return![];return!![];}catch{return!this[_0x5ce942(0x6c0)];}}[_0x1fe9b9(0x282)](){const _0x39a70d=_0x1fe9b9;if(this['_released'])return null;try{return this['_lock'][_0x39a70d(0x164)]()[_0x39a70d(0x1ed)](this['_key'])??null;}catch{return null;}}async[_0x1fe9b9(0x547)](_0x347bbc){const _0x4b3c91=_0x1fe9b9;if(this['_released'])return;try{if(this[_0x4b3c91(0x72c)][_0x4b3c91(0x4f5)]())return;const _0x3a9dc9=this['_lock']['_db']()[_0x4b3c91(0x1ed)](this[_0x4b3c91(0x5ec)]);if(!_0x3a9dc9||_0x3a9dc9['acquiredAt']!==this[_0x4b3c91(0x1ab)])return;if(_0x4e05f1)this[_0x4b3c91(0x72c)][_0x4b3c91(0x164)]()[_0x4b3c91(0x23c)](this[_0x4b3c91(0x5ec)],{..._0x3a9dc9,'ttlMs':_0x3a9dc9[_0x4b3c91(0x5eb)]+_0x347bbc});else await this[_0x4b3c91(0x72c)]['_db']()[_0x4b3c91(0x170)](this[_0x4b3c91(0x5ec)],{..._0x3a9dc9,'ttlMs':_0x3a9dc9[_0x4b3c91(0x5eb)]+_0x347bbc});}catch{}}async[_0x1fe9b9(0x509)](){const _0x8d21fb=_0x1fe9b9;if(this[_0x8d21fb(0x6c0)])return;if(this[_0x8d21fb(0x4c5)])try{await this[_0x8d21fb(0x4c5)];}catch{}clearInterval(this[_0x8d21fb(0x3eb)]),this[_0x8d21fb(0x3eb)]=null,this[_0x8d21fb(0x6c0)]=!![];try{if(this[_0x8d21fb(0x72c)][_0x8d21fb(0x4f5)]())return;const _0x5e0fc2=this['_lock']['_db']()[_0x8d21fb(0x1ed)](this['_key']);if(_0x5e0fc2&&_0x5e0fc2[_0x8d21fb(0x734)]===this['_acquiredAt']){if(_0x4e05f1)this[_0x8d21fb(0x72c)][_0x8d21fb(0x164)]()[_0x8d21fb(0x14a)](this[_0x8d21fb(0x5ec)]);else await this[_0x8d21fb(0x72c)]['_db']()[_0x8d21fb(0x5c3)](this[_0x8d21fb(0x5ec)]);}}catch{}}[_0x1fe9b9(0x100)](_0xc6e8e1,_0x5cd1bc){const _0xb3411=_0x1fe9b9,_0x3df562=_0x5cd1bc??Math[_0xb3411(0x557)](_0xc6e8e1/0x3);this[_0xb3411(0x3eb)]=setInterval(()=>{const _0x5af3bc=_0xb3411;if(this[_0x5af3bc(0x6c0)])return;this[_0x5af3bc(0x4c5)]=((async()=>{const _0xec2bc6=_0x5af3bc;try{if(this['_lock'][_0xec2bc6(0x4f5)]())return;const _0x1a0ae1=this[_0xec2bc6(0x72c)]['_db']()['get'](this[_0xec2bc6(0x5ec)]);if(!_0x1a0ae1||_0x1a0ae1[_0xec2bc6(0x734)]!==this['_acquiredAt']){this[_0xec2bc6(0x6c0)]=!![],clearInterval(this['_heartbeatTimer']),this[_0xec2bc6(0x3eb)]=null;return;}if(_0x4e05f1)this[_0xec2bc6(0x72c)][_0xec2bc6(0x164)]()[_0xec2bc6(0x23c)](this[_0xec2bc6(0x5ec)],{..._0x1a0ae1,'updatedAt':Date[_0xec2bc6(0x28a)]()});else await this['_lock'][_0xec2bc6(0x164)]()[_0xec2bc6(0x170)](this[_0xec2bc6(0x5ec)],{..._0x1a0ae1,'updatedAt':Date['now']()});}catch{}this['_heartbeatInFlight']=null;})());},_0x3df562);if(this[_0xb3411(0x3eb)][_0xb3411(0x1b3)])this[_0xb3411(0x3eb)]['unref']();}}class _0x42d9ca{constructor(_0x25e6e9,{namespace:_0x2c5d8b,ttlMs:ttlMs=0x7530,heartbeatMs:heartbeatMs=null}={}){const _0x439d73=_0x1fe9b9;this[_0x439d73(0x244)]=_0x25e6e9,this[_0x439d73(0x114)]=_0x2c5d8b,this['ttlMs']=ttlMs,this[_0x439d73(0x4df)]=heartbeatMs,this[_0x439d73(0x233)]=null;}[_0x1fe9b9(0x164)](){const _0x1d4941=_0x1fe9b9;return this[_0x1d4941(0x19c)](),(!this[_0x1d4941(0x233)]||this[_0x1d4941(0x3a7)]!==this[_0x1d4941(0x244)])&&(this['_lockDb']=this[_0x1d4941(0x244)][_0x1d4941(0x6d1)](_0x176488,{'dupSort':![]}),this[_0x1d4941(0x3a7)]=this[_0x1d4941(0x244)]),this['_lockDb'];}[_0x1fe9b9(0x355)](){const _0x38bb3d=_0x1fe9b9;return this[_0x38bb3d(0x19c)](),(!this['_wantDbHandle']||this[_0x38bb3d(0x712)]!==this['_rawDb'])&&(this['_wantDbHandle']=this[_0x38bb3d(0x244)][_0x38bb3d(0x6d1)](_0x176488+_0x38bb3d(0x54b),{'dupSort':![]}),this[_0x38bb3d(0x712)]=this[_0x38bb3d(0x244)]),this[_0x38bb3d(0x585)];}['_closed'](){const _0x497508=_0x1fe9b9,_0x158147=this['_rawDb']?.['status'];return _0x158147===_0x497508(0x250)||_0x158147===_0x497508(0x219);}[_0x1fe9b9(0x19c)](){const _0x28bde8=_0x1fe9b9;if(this[_0x28bde8(0x4f5)]())throw new Error(_0x28bde8(0x6ce));}['_key'](_0x193eaf){const _0x56751c=_0x1fe9b9;return this[_0x56751c(0x114)]+':'+_0x193eaf;}[_0x1fe9b9(0x44c)](_0x3f7605){const _0x5e7fc1=_0x1fe9b9;try{if(this[_0x5e7fc1(0x4f5)]())return;_0x4e05f1?this[_0x5e7fc1(0x355)]()['putSync'](this[_0x5e7fc1(0x5ec)](_0x3f7605),Date['now']()):this[_0x5e7fc1(0x355)]()[_0x5e7fc1(0x170)](this[_0x5e7fc1(0x5ec)](_0x3f7605),Date[_0x5e7fc1(0x28a)]())?.[_0x5e7fc1(0x4ec)]?.(()=>{});}catch{}}[_0x1fe9b9(0x666)](_0x358203,_0x3ec6f1=0x3e8){const _0x17622c=_0x1fe9b9;try{const _0x49cbeb=this['_wantDb']()['get'](this[_0x17622c(0x5ec)](_0x358203));return typeof _0x49cbeb===_0x17622c(0x449)&&Date[_0x17622c(0x28a)]()-_0x49cbeb<_0x3ec6f1;}catch{return![];}}[_0x1fe9b9(0x4d9)](_0x256e0b){const _0x5dd336=_0x1fe9b9,_0x15b7a3=_0x256e0b['updatedAt']??_0x256e0b[_0x5dd336(0x734)];return _0x15b7a3+_0x256e0b[_0x5dd336(0x5eb)]<Date[_0x5dd336(0x28a)]();}static[_0x1fe9b9(0x18e)](_0x20805b){const _0x20c8ec=_0x1fe9b9,_0x3e5acf=_0x20805b?.[_0x20c8ec(0x282)];if(!_0x3e5acf||typeof _0x3e5acf[_0x20c8ec(0x5ca)]!==_0x20c8ec(0x449))return![];if(_0x3e5acf[_0x20c8ec(0xbb)]!==_0x4d1b21[_0x20c8ec(0xbb)]())return![];if(_0x3e5acf[_0x20c8ec(0x5ca)]===process[_0x20c8ec(0x5ca)])return![];try{return process[_0x20c8ec(0x73d)](_0x3e5acf[_0x20c8ec(0x5ca)],0x0),![];}catch(_0x35f3f6){return _0x35f3f6['code']===_0x20c8ec(0x725);}}async[_0x1fe9b9(0x55f)](_0x56125b,_0x2ba6fc={},_0x10619e={}){const _0x29b8d7=_0x1fe9b9,_0x44f967=this[_0x29b8d7(0x5ec)](_0x56125b),_0x125dcd=_0x10619e['ttlMs']??this['ttlMs'],_0x5f3c3b=Date[_0x29b8d7(0x28a)](),_0x4123d7={'holder':{'pid':process[_0x29b8d7(0x5ca)],'hostname':_0x4d1b21['hostname'](),..._0x2ba6fc},'acquiredAt':_0x5f3c3b,'updatedAt':_0x5f3c3b,'ttlMs':_0x125dcd};let _0x43db50=![],_0x3a176f=null;if(this[_0x29b8d7(0x4f5)]())return{'acquired':![],'handle':null,'current':null};try{const _0x4378c6=()=>{const _0x3701c9=_0x29b8d7,_0x4d30fa=this[_0x3701c9(0x164)]()[_0x3701c9(0x1ed)](_0x44f967);if(_0x4d30fa&&!this[_0x3701c9(0x4d9)](_0x4d30fa)&&!_0x42d9ca[_0x3701c9(0x18e)](_0x4d30fa)){const _0x42cd5d=_0x2ba6fc[_0x3701c9(0x1df)]!=null&&_0x4d30fa['holder']['pid']===process[_0x3701c9(0x5ca)]&&_0x4d30fa[_0x3701c9(0x282)][_0x3701c9(0x1df)]===_0x2ba6fc['processorId'];if(!_0x42cd5d){_0x43db50=![],_0x3a176f=_0x4d30fa;return;}_0x4123d7[_0x3701c9(0x734)]<=_0x4d30fa[_0x3701c9(0x734)]&&(_0x4123d7[_0x3701c9(0x734)]=_0x4d30fa[_0x3701c9(0x734)]+0x1,_0x4123d7[_0x3701c9(0x718)]=_0x4123d7[_0x3701c9(0x734)]);}this['_db']()['put'](_0x44f967,_0x4123d7),_0x43db50=!![],_0x3a176f=_0x4123d7;};if(_0x4e05f1)this['_db']()[_0x29b8d7(0x4b4)](_0x4378c6);else await this[_0x29b8d7(0x164)]()[_0x29b8d7(0xf8)](_0x4378c6);}catch{return{'acquired':![],'handle':null,'current':null};}if(!_0x43db50)return{'acquired':![],'handle':null,'current':_0x3a176f};const _0x41e209=new _0x417624(this,_0x44f967,_0x4123d7[_0x29b8d7(0x734)]);return _0x41e209[_0x29b8d7(0x100)](_0x125dcd,this[_0x29b8d7(0x4df)]),{'acquired':!![],'handle':_0x41e209,'current':_0x3a176f};}[_0x1fe9b9(0x742)](_0x302459){const _0x75d62=_0x1fe9b9;try{return this[_0x75d62(0x164)]()['get'](this[_0x75d62(0x5ec)](_0x302459))??null;}catch{return null;}}[_0x1fe9b9(0x49e)](){const _0x25f1aa=_0x1fe9b9,_0x225406=this[_0x25f1aa(0x114)]+':',_0x4c4cd6=[];try{for(const {key:_0x41b914,value:_0xba40e}of this['_db']()[_0x25f1aa(0x4fa)]({'start':_0x225406,'end':_0x225406+'\xff'})){typeof _0x41b914===_0x25f1aa(0x242)&&_0x41b914[_0x25f1aa(0x334)](_0x225406)&&_0x4c4cd6[_0x25f1aa(0x39b)]({'id':_0x41b914['slice'](_0x225406[_0x25f1aa(0x249)]),'entry':_0xba40e});}}catch{}return _0x4c4cd6;}static[_0x1fe9b9(0x6bb)](_0x10eaf7){const _0x4ee406=_0x1fe9b9,_0x3e0a0c=[];try{const _0xba339c=_0x10eaf7[_0x4ee406(0x6d1)](_0x176488,{'dupSort':![]});for(const {key:_0x1f1cc0,value:_0x41e91}of _0xba339c['getRange']({})){if(typeof _0x1f1cc0!=='string')continue;const _0x2a6af3=_0x1f1cc0[_0x4ee406(0x40d)](':');if(_0x2a6af3<0x1)continue;_0x3e0a0c[_0x4ee406(0x39b)]({'namespace':_0x1f1cc0[_0x4ee406(0x3e6)](0x0,_0x2a6af3),'id':_0x1f1cc0[_0x4ee406(0x3e6)](_0x2a6af3+0x1),'entry':_0x41e91});}}catch{}return _0x3e0a0c;}}return okdbLock={'OKDBLock':_0x42d9ca},okdbLock;}var okdbProcessRegistry,hasRequiredOkdbProcessRegistry;function requireOkdbProcessRegistry(){const _0x3063cd=_0x563deb;if(hasRequiredOkdbProcessRegistry)return okdbProcessRegistry;hasRequiredOkdbProcessRegistry=0x1;const _0x593584=require$$0,_0x1393ec=require$$1$1,_0x2bddaa=require$$2$1,{LOOP:_0x388bc4}=requireOkdbLoopMonitor(),{OKDBLock:_0x5daf87}=requireOkdbLock(),{SYNC_COMMITS:_0x2019b4}=requireOkdbWriter(),_0x1cf062=_0x3063cd(0x521),_0x4b159f='node',_0x2c5a67=_0x3063cd(0x151),_0x93de4d='~processes:cmd',_0x465494=(_0x100de8,_0x332e2b)=>_0x100de8+':'+_0x332e2b,_0x3cae6c=(_0x4b478f,_0x10af9c)=>_0x4b478f+'::'+_0x10af9c,_0x2e0618=(_0x3abd84,_0x3146cd)=>_0x3abd84+'/'+_0x3146cd,_0xc2d7d=(_0x102bb1,_0x21728a)=>_0x102bb1+'#'+_0x21728a,_0x196fd0=_0x1c741a=>{const _0x234a15=_0x3063cd;if(_0x1c741a?.[_0x234a15(0x3ed)])return _0x1c741a[_0x234a15(0x3ed)];const _0xcb2bed=_0x1c741a?.[_0x234a15(0x617)];return typeof _0xcb2bed===_0x234a15(0x242)&&_0xcb2bed[_0x234a15(0x52b)]('#')?_0xcb2bed['slice'](0x0,_0xcb2bed[_0x234a15(0x40d)]('#')):_0xcb2bed;},_0x165415=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||0x2710,_0x42269a=Number(process.env.OKDB_WORKERS_PUBLISH_MS)||0x3e8,_0x5e05eb=_0x165415*0x3,_0x84c7a0=Number(process.env.OKDB_PID_REUSE_HORIZON_MS)||Math[_0x3063cd(0x234)](0x927c0,_0x5e05eb*0x14),_0x3ac555=[_0x3063cd(0x5fe),_0x3063cd(0x3d9),_0x3063cd(0xf9),_0x3063cd(0x2ce),_0x3063cd(0x3b1),'processor:resumed'];let _0x116964=null;function _0x5c5a41(){const _0x33e56a=_0x3063cd;if(_0x116964==null)_0x116964=Math[_0x33e56a(0x336)]((Date[_0x33e56a(0x28a)]()-process[_0x33e56a(0x207)]()*0x3e8)/0x3e8)*0x3e8;return _0x116964;}function _0x4e9e0f(_0x586d20){const _0x451e9a=_0x3063cd;if(process.env.OKDB_PROCESS_KILL===_0x451e9a(0x14d))return![];if(_0x586d20?.[_0x451e9a(0x2d9)]?.['processes']&&typeof _0x586d20['options']['processes']===_0x451e9a(0x245)&&_0x586d20[_0x451e9a(0x2d9)][_0x451e9a(0xa0)]['kill']===![])return![];return!![];}function _0x41fc5f(_0x43faca,_0x173844){const _0x4a8187=_0x3063cd,_0x308e88=!!_0x173844?.[_0x4a8187(0x6e3)];switch(_0x43faca){case _0x4a8187(0x4ad):return{'controllable':_0x308e88,'decommissionable':![],'killable':!![],'killConfirm':_0x4a8187(0x160)};case _0x4a8187(0x4b8):case _0x4a8187(0x61a):return{'controllable':_0x308e88,'decommissionable':![],'killable':!![],'killConfirm':_0x4a8187(0x416)};case'embedded':return{'controllable':![],'decommissionable':![],'killable':![]};case _0x4a8187(0x513):case _0x4a8187(0x1b0):case _0x4a8187(0x6fc):case _0x4a8187(0x29e):return{'controllable':![],'decommissionable':!![],'killable':!![],'killConfirm':'force'};default:return{'controllable':![],'decommissionable':![],'killable':![]};}}class _0x3ba242{constructor(_0x1da631){const _0x4f2d94=_0x3063cd;this['okdb']=_0x1da631,this['_statusEnv']=null,this[_0x4f2d94(0x341)]=null,this[_0x4f2d94(0x399)]=new Map(),this['_cmd']=null,this[_0x4f2d94(0x2d2)]=![],this[_0x4f2d94(0x71b)]=![],this[_0x4f2d94(0x566)]=_0x5c5a41(),this[_0x4f2d94(0x166)]=_0x465494(process['pid'],this['_processStartedAt']),this[_0x4f2d94(0x629)]=_0x2bddaa[_0x4f2d94(0x364)]()[_0x4f2d94(0x3e6)](0x0,0x8),this[_0x4f2d94(0x5ed)]=_0xc2d7d(this[_0x4f2d94(0x166)],this[_0x4f2d94(0x629)]),this[_0x4f2d94(0x4cc)]=Date[_0x4f2d94(0x28a)](),this['_kind']=null,this[_0x4f2d94(0xaa)]=null,this[_0x4f2d94(0x2e8)]=null,this[_0x4f2d94(0x4e3)]=null,this[_0x4f2d94(0x17a)]=null,this[_0x4f2d94(0x47b)]=null,this[_0x4f2d94(0x112)]=0x0,this[_0x4f2d94(0x9e)]={},this[_0x4f2d94(0x697)]=new Map(),this['_lastCpuUsage']=process[_0x4f2d94(0x19e)](),this['_lastCpuAt']=Date[_0x4f2d94(0x28a)](),this['_lastCpuPct']=0x0,this[_0x4f2d94(0x17d)]=new Map();}get[_0x3063cd(0x177)](){const _0x679682=_0x3063cd;return this[_0x679682(0x166)];}get['rowKey'](){return this['_rowKey'];}['_caps'](_0x1a451b,_0x14448d){const _0x1d8b08=_0x3063cd,_0x2a1170=_0x41fc5f(_0x1a451b,_0x14448d);if(_0x2a1170[_0x1d8b08(0x159)]&&!_0x4e9e0f(this['okdb']))return{..._0x2a1170,'killable':![],'killConfirm':undefined};return _0x2a1170;}[_0x3063cd(0x4af)](){const _0x1e571f=_0x3063cd;return!!this[_0x1e571f(0x174)];}[_0x3063cd(0x614)](_0x43f5c4){const _0x15b3f5=_0x3063cd;Object[_0x15b3f5(0x122)](this[_0x15b3f5(0x9e)],_0x43f5c4||{});}[_0x3063cd(0x3c1)](_0x509e82){const _0x3886f5=_0x3063cd;if(_0x509e82)this[_0x3886f5(0x2e8)]=_0x509e82;}['register'](_0x2e8e81={}){const _0x1d3662=_0x3063cd;return this[_0x1d3662(0x11b)]['_activateProcesses'](_0x2e8e81);}['processingStatusView'](){const _0x1e5ef8=_0x3063cd,_0x5bc26f={};let _0x2bbb97=0x0,_0x32ccea=0x0;const _0x1a98c0=new Set();for(const _0x163f5a of this[_0x1e5ef8(0x89)]()){_0x32ccea++;const _0xa29535=_0x163f5a['processing'];if(!_0xa29535)continue;if(_0xa29535[_0x1e5ef8(0x464)])_0x2bbb97++;for(const _0x50dd80 of _0xa29535[_0x1e5ef8(0x6e3)]||[]){if(![_0x1e5ef8(0x4f8),_0x1e5ef8(0x12a)][_0x1e5ef8(0x52b)](_0x50dd80[_0x1e5ef8(0x127)]))continue;(_0x50dd80[_0x1e5ef8(0x381)]==='online'||_0x50dd80[_0x1e5ef8(0x381)]===_0x1e5ef8(0xfc))&&_0x50dd80[_0x1e5ef8(0x2b9)]&&_0x1a98c0[_0x1e5ef8(0x32e)]((_0x50dd80[_0x1e5ef8(0x215)]||_0x1e5ef8(0x34b))+':'+_0x50dd80['cursorKey']);const _0x3e4ade=_0x50dd80['env']||_0x1e5ef8(0x34b);(_0x5bc26f[_0x3e4ade]||=[])[_0x1e5ef8(0x39b)]({..._0x50dd80,'env':_0x3e4ade,'owner':{'pid':_0x163f5a[_0x1e5ef8(0x5ca)]??null,'kind':_0x163f5a['kind']??null}});}}for(const [_0x4dd9cc,_0x5b593d]of Object[_0x1e5ef8(0x707)](_0x5bc26f)){for(const _0x348818 of _0x5b593d){if(_0x348818[_0x1e5ef8(0x127)]===_0x1e5ef8(0x4f8)&&!_0x348818[_0x1e5ef8(0x476)]){const _0x4492c9=_0x4dd9cc+':'+(_0x348818['cursorKey']??'');if(!_0x1a98c0[_0x1e5ef8(0xe5)](_0x4492c9))_0x348818[_0x1e5ef8(0x568)]=!![];}}}return{'envs':_0x5bc26f,'policy':null,'participation':{'participating':_0x2bbb97,'total':_0x32ccea},'source':'workers'};}[_0x3063cd(0x337)](){const _0x186f12=_0x3063cd,_0x517e32=_0x25fe39=>{const _0x5a7c12=_0x3dbc;if(_0x25fe39[_0x5a7c12(0x381)]===_0x5a7c12(0x3cc)||_0x25fe39[_0x5a7c12(0x381)]===_0x5a7c12(0xfc)||_0x25fe39[_0x5a7c12(0x381)]===_0x5a7c12(0x271))return 0x3;if(_0x25fe39['claimGated'])return 0x1;return 0x2;},_0x391266=new Map();for(const _0x13abc9 of this[_0x186f12(0x89)]()){for(const _0x11b7d7 of _0x13abc9[_0x186f12(0x81)]?.[_0x186f12(0x6e3)]||[]){const _0x193867={..._0x11b7d7,'owner':{'pid':_0x13abc9[_0x186f12(0x5ca)]??null,'kind':_0x13abc9[_0x186f12(0x3c3)]??null,'host':_0x13abc9['host']??null}},_0x21b505=_0x11b7d7[_0x186f12(0x127)]===_0x186f12(0x4f8)?_0x186f12(0x4c4)+(_0x11b7d7['env']??'')+'::'+(_0x11b7d7[_0x186f12(0x2b9)]??_0x11b7d7[_0x186f12(0x563)]??_0x11b7d7['id']):'inst:'+(_0x13abc9[_0x186f12(0x617)]??_0x13abc9[_0x186f12(0x3ed)]??'')+'::'+(_0x11b7d7[_0x186f12(0x215)]??'')+'::'+_0x11b7d7['id'],_0x2debbb=_0x391266[_0x186f12(0x1ed)](_0x21b505);if(!_0x2debbb||_0x517e32(_0x193867)>_0x517e32(_0x2debbb))_0x391266[_0x186f12(0x494)](_0x21b505,_0x193867);}}return[..._0x391266[_0x186f12(0x5b1)]()];}[_0x3063cd(0x1d5)](){const _0x6c7a60=_0x3063cd,_0x227f6f=Date['now'](),_0x2b0d2e=this[_0x6c7a60(0x89)](),_0x51fc88=_0xa7552a=>Math[_0x6c7a60(0x234)](0x0,Math[_0x6c7a60(0x336)]((_0x227f6f-(_0xa7552a[_0x6c7a60(0x594)]||_0x227f6f))/0x3e8)),_0x2690f5=_0x2b0d2e[_0x6c7a60(0x592)](_0x5d5c1a=>_0x5d5c1a['kind']===_0x6c7a60(0x4ad)),_0x4eb5ab=_0x2b0d2e[_0x6c7a60(0x69e)](_0x282b79=>_0x282b79[_0x6c7a60(0x3c3)]==='http-server');if(_0x2690f5||_0x4eb5ab[_0x6c7a60(0x249)])return{'primary':_0x2690f5?{'pid':_0x2690f5[_0x6c7a60(0x5ca)],'uptime':_0x51fc88(_0x2690f5)}:null,'workers':_0x4eb5ab['map'](_0x402c8e=>({'pid':_0x402c8e['pid'],'uptime':_0x51fc88(_0x402c8e)})),'workersConfigured':_0x2690f5?.['meta']?.[_0x6c7a60(0x7f)]??_0x4eb5ab['length'],'mode':_0x6c7a60(0x6fd)};const _0x565b5a=_0x2b0d2e[_0x6c7a60(0x592)](_0x1c28eb=>_0x1c28eb[_0x6c7a60(0x3c3)]===_0x6c7a60(0x4b8)||_0x1c28eb[_0x6c7a60(0x3c3)]===_0x6c7a60(0x61a)||_0x1c28eb[_0x6c7a60(0x3c3)]===_0x6c7a60(0xc6)),_0x18a92a=_0x565b5a?{'pid':_0x565b5a[_0x6c7a60(0x5ca)],'uptime':_0x51fc88(_0x565b5a)}:{'pid':process[_0x6c7a60(0x5ca)],'uptime':Math[_0x6c7a60(0x234)](0x0,Math[_0x6c7a60(0x336)](process[_0x6c7a60(0x207)]()))};return{'primary':_0x18a92a,'workers':[_0x18a92a],'workersConfigured':0x1,'mode':_0x6c7a60(0x4f8)};}[_0x3063cd(0x30e)](){return this['_groupByProcess']();}['treeView'](){const _0x7a32df=_0x3063cd,_0x2d1f0d=new Map();for(const _0x39dd9b of this[_0x7a32df(0x41d)]())_0x2d1f0d['set'](_0x39dd9b['processKey'],{..._0x39dd9b,'children':[]});const _0x505eb1=[];for(const _0x282246 of _0x2d1f0d['values']()){const _0x596363=_0x282246[_0x7a32df(0xa3)]?_0x2d1f0d['get'](_0x282246[_0x7a32df(0xa3)]):null;if(_0x596363&&_0x596363!==_0x282246)_0x596363[_0x7a32df(0x5a5)][_0x7a32df(0x39b)](_0x282246);else _0x505eb1['push'](_0x282246);}const _0x10111a=(_0x41db13,_0x83e210)=>_0x41db13[_0x7a32df(0x3c3)]===_0x83e210['kind']?(_0x41db13['pid']||0x0)-(_0x83e210['pid']||0x0):(_0x41db13['kind']??'')<(_0x83e210[_0x7a32df(0x3c3)]??'')?-0x1:0x1,_0x59969b=_0x5917fb=>{const _0x207ec7=_0x7a32df;_0x5917fb[_0x207ec7(0x483)](_0x10111a);for(const _0x39dbef of _0x5917fb)if(_0x39dbef[_0x207ec7(0x5a5)]['length'])_0x59969b(_0x39dbef[_0x207ec7(0x5a5)]);};return _0x59969b(_0x505eb1),_0x505eb1;}[_0x3063cd(0xa7)](_0x10822d){const _0x5108f7=_0x3063cd;return this[_0x5108f7(0x41d)]()[_0x5108f7(0x592)](_0x31bb45=>_0x31bb45['processKey']===_0x10822d)??null;}['_groupByProcess'](_0x292a07=Date[_0x3063cd(0x28a)]()){const _0x240572=_0x3063cd,_0x56b6b2=new Map();for(const _0x3f2000 of this['listNodes']()){const _0x4d0ebd=_0x196fd0(_0x3f2000);let _0x199389=_0x56b6b2[_0x240572(0x1ed)](_0x4d0ebd);!_0x199389&&(_0x199389={'processKey':_0x4d0ebd,'nodeKey':_0x4d0ebd,'pid':_0x3f2000[_0x240572(0x5ca)],'ppid':_0x3f2000['ppid']??null,'host':_0x3f2000['host']??null,'kind':_0x3f2000['kind'],'role':null,'supervisorKey':_0x3f2000[_0x240572(0xa3)]??null,'slot':_0x3f2000[_0x240572(0x56e)]??null,'slotKey':_0x3f2000[_0x240572(0x414)]??null,'caps':_0x3f2000[_0x240572(0x40a)]??null,'lifecycle':_0x3f2000[_0x240572(0x486)]??null,'uptime':Math[_0x240572(0x234)](0x0,Math[_0x240572(0x336)]((_0x292a07-(_0x3f2000[_0x240572(0x594)]||_0x292a07))/0x3e8)),'startedAt':_0x3f2000[_0x240572(0x594)]??null,'meta':_0x3f2000[_0x240572(0x2fe)]??null,'listenAddr':null,'processing':null,'engines':null,'singletonClaims':null,'stats':null,'instances':[]},_0x56b6b2[_0x240572(0x494)](_0x4d0ebd,_0x199389));_0x199389[_0x240572(0x631)]['push']({'instanceId':_0x3f2000[_0x240572(0x383)]??null,'role':_0x3f2000[_0x240572(0x1bb)]??null,'listenAddr':_0x3f2000[_0x240572(0x683)]??null,'lifecycle':_0x3f2000[_0x240572(0x486)]??null,'processing':_0x3f2000[_0x240572(0x81)]??null});if(!_0x199389[_0x240572(0x1bb)]&&_0x3f2000[_0x240572(0x1bb)])_0x199389[_0x240572(0x1bb)]=_0x3f2000[_0x240572(0x1bb)];if(!_0x199389[_0x240572(0x683)]&&_0x3f2000[_0x240572(0x683)])_0x199389['listenAddr']=_0x3f2000[_0x240572(0x683)];if(!_0x199389[_0x240572(0x81)]&&_0x3f2000[_0x240572(0x81)])_0x199389[_0x240572(0x81)]=_0x3f2000['processing'];if(!_0x199389[_0x240572(0x5ad)]&&_0x3f2000[_0x240572(0x5ad)])_0x199389['engines']=_0x3f2000[_0x240572(0x5ad)];if(!_0x199389[_0x240572(0x4e8)]&&_0x3f2000[_0x240572(0x4e8)])_0x199389['singletonClaims']=_0x3f2000[_0x240572(0x4e8)];if(_0x199389['caps']==null&&_0x3f2000[_0x240572(0x40a)])_0x199389[_0x240572(0x40a)]=_0x3f2000[_0x240572(0x40a)];if(_0x3f2000['stats']&&(!_0x199389['stats']||(_0x3f2000[_0x240572(0x5f4)]['at']??0x0)>(_0x199389[_0x240572(0x5f4)]['at']??0x0)))_0x199389[_0x240572(0x5f4)]=_0x3f2000[_0x240572(0x5f4)];}return[..._0x56b6b2[_0x240572(0x5b1)]()];}[_0x3063cd(0x4ea)](){const _0x5b905c=_0x3063cd,_0x39f8dd=[],_0x31a2f3={'rss':0x0,'heapUsed':0x0,'processes':0x0,'threads':{'count':0x0,'sandbox':0x0,'busy':0x0}};for(const _0xbc3f09 of this[_0x5b905c(0x41d)]()){_0x39f8dd[_0x5b905c(0x39b)]({'processKey':_0xbc3f09['processKey'],'kind':_0xbc3f09[_0x5b905c(0x3c3)],'pid':_0xbc3f09[_0x5b905c(0x5ca)],'supervisorKey':_0xbc3f09[_0x5b905c(0xa3)],'meta':_0xbc3f09[_0x5b905c(0x2fe)]??null,'uptime':_0xbc3f09['uptime'],'stats':_0xbc3f09[_0x5b905c(0x5f4)]??null}),_0x31a2f3[_0x5b905c(0xa0)]++;if(_0xbc3f09['stats']){_0x31a2f3[_0x5b905c(0x2b4)]+=_0xbc3f09[_0x5b905c(0x5f4)]['rss']||0x0,_0x31a2f3[_0x5b905c(0x66c)]+=(_0xbc3f09[_0x5b905c(0x5f4)][_0x5b905c(0x66c)]||0x0)+(_0xbc3f09['stats']['threads']?.[_0x5b905c(0x66c)]||0x0);const _0x5eb835=_0xbc3f09['stats'][_0x5b905c(0x343)];_0x5eb835&&(_0x31a2f3[_0x5b905c(0x343)]['count']+=_0x5eb835[_0x5b905c(0x417)]||0x0,_0x31a2f3['threads'][_0x5b905c(0xa1)]+=_0x5eb835[_0x5b905c(0xa1)]||0x0,_0x31a2f3[_0x5b905c(0x343)]['busy']+=_0x5eb835[_0x5b905c(0x1f6)]||0x0);}}return{'totals':_0x31a2f3,'nodes':_0x39f8dd};}async['open']({writer:writer=![],reader:reader=![],kind:kind=null,supervisorKey:supervisorKey=null,listenAddr:listenAddr=null}={}){const _0x282fd8=_0x3063cd;this[_0x282fd8(0x2d2)]=this[_0x282fd8(0x2d2)]||!!writer,this[_0x282fd8(0x71b)]=this['_isReader']||!!reader,this['_kind']=kind||this[_0x282fd8(0x543)]||(_0x1393ec[_0x282fd8(0x4a7)]?_0x282fd8(0x513):'cli'),this[_0x282fd8(0xaa)]=supervisorKey??this[_0x282fd8(0xaa)],this[_0x282fd8(0x2e8)]=listenAddr??this['_listenAddr'],this[_0x282fd8(0x70f)](),await this[_0x282fd8(0x49f)]();if(!writer&&!reader)return null;if(!this[_0x282fd8(0x174)]){const _0x3092d4=await this[_0x282fd8(0x11b)][_0x282fd8(0x6c1)](_0x1cf062,{'sync':![],'durability':_0x282fd8(0x481)});await _0x3092d4[_0x282fd8(0x641)](_0x4b159f),this[_0x282fd8(0x174)]=_0x3092d4;}return this[_0x282fd8(0x174)];}[_0x3063cd(0x156)](){const _0x25872e=_0x3063cd;return this[_0x25872e(0xf5)]!==this[_0x25872e(0x174)]&&(this[_0x25872e(0xf5)]=this[_0x25872e(0x174)],this[_0x25872e(0x533)]=this[_0x25872e(0x174)][_0x25872e(0x1b6)](_0x4b159f)[_0x25872e(0x527)]),this[_0x25872e(0x533)];}['_putRowAsync'](_0x531a97){const _0x148af7=_0x3063cd;if(_0x2019b4)return this[_0x148af7(0x156)]()[_0x148af7(0x23c)](_0x531a97[_0x148af7(0x617)],_0x531a97,0x1);const _0xac72bc=this[_0x148af7(0x156)]()[_0x148af7(0x170)](_0x531a97[_0x148af7(0x617)],_0x531a97,0x1);if(_0xac72bc&&typeof _0xac72bc[_0x148af7(0x722)]===_0x148af7(0x2be))_0xac72bc[_0x148af7(0x722)](undefined,()=>{});return _0xac72bc;}[_0x3063cd(0x667)](_0x19b0c8){const _0x4b902f=_0x3063cd;return this['_nodeDb']()['putSync'](_0x19b0c8[_0x4b902f(0x617)],_0x19b0c8,0x1);}[_0x3063cd(0x235)](_0x130329){const _0x3ac508=_0x3063cd;if(_0x2019b4)try{return this[_0x3ac508(0x156)]()[_0x3ac508(0x14a)](_0x130329);}catch{return![];}const _0x470805=this[_0x3ac508(0x156)]()[_0x3ac508(0x5c3)](_0x130329);if(_0x470805&&typeof _0x470805[_0x3ac508(0x722)]===_0x3ac508(0x2be))_0x470805[_0x3ac508(0x722)](undefined,()=>{});return _0x470805;}async[_0x3063cd(0x6f3)](_0x11271a){const _0x4a2999=_0x3063cd;if(!this['_statusEnv']||!this[_0x4a2999(0x2d2)]||!_0x11271a?.[_0x4a2999(0x617)])return;return this[_0x4a2999(0x38c)](_0x11271a);}async['removeNode'](_0x5edb51){const _0x42a95c=_0x3063cd;if(!this[_0x42a95c(0x174)]||!this[_0x42a95c(0x2d2)]||!_0x5edb51)return;const _0x4381c0=_0x5edb51['includes']('#'),_0x10b717=[];for(const {key:_0xa0a3f2}of this['_statusEnv'][_0x42a95c(0x4fa)](_0x4b159f)){if(_0xa0a3f2===_0x5edb51||!_0x4381c0&&typeof _0xa0a3f2===_0x42a95c(0x242)&&_0xa0a3f2[_0x42a95c(0x334)](_0x5edb51+'#'))_0x10b717[_0x42a95c(0x39b)](_0xa0a3f2);}for(const _0xb2debd of _0x10b717){try{this[_0x42a95c(0x156)]()[_0x42a95c(0x14a)](_0xb2debd);}catch{}}}['_nodeDead'](_0x1bb57e){const _0x2a8445=_0x3063cd;if(typeof _0x1bb57e?.[_0x2a8445(0x5ca)]!=='number')return![];if(_0x1bb57e[_0x2a8445(0x27a)]!==_0x593584[_0x2a8445(0xbb)]())return![];if(_0x1bb57e[_0x2a8445(0x5ca)]===process['pid'])return![];if(_0x1bb57e['expiresAt']!=null&&_0x1bb57e['expiresAt']<Date['now']()-_0x84c7a0)return!![];try{return process[_0x2a8445(0x73d)](_0x1bb57e[_0x2a8445(0x5ca)],0x0),![];}catch(_0x1981a9){return _0x1981a9[_0x2a8445(0x5f2)]===_0x2a8445(0x725);}}[_0x3063cd(0x89)](){const _0x4e3e97=_0x3063cd;if(!this['_statusEnv'])return[];try{this[_0x4e3e97(0x174)]['db']?.[_0x4e3e97(0x2e0)]?.();}catch{}const _0x2fe971=Date[_0x4e3e97(0x28a)](),_0x46cbbd=_0x593584['hostname'](),_0x34827d=[];for(const {value:_0x98cad4}of this[_0x4e3e97(0x174)]['getRange'](_0x4b159f)){if(!_0x98cad4)continue;let _0x4b72c4=null;_0x98cad4['host']===_0x46cbbd&&typeof _0x98cad4['pid']===_0x4e3e97(0x449)&&(_0x4b72c4=!this[_0x4e3e97(0x2a4)](_0x98cad4));if(_0x4b72c4===![])continue;const _0x395388=_0x98cad4['expiresAt']==null||_0x98cad4['expiresAt']>=_0x2fe971;if(_0x4b72c4===!![]||_0x395388)_0x34827d[_0x4e3e97(0x39b)](_0x98cad4);}return _0x34827d;}async[_0x3063cd(0x344)](_0x1f0831=0x0){const _0x48d478=_0x3063cd;if(!this[_0x48d478(0x174)]||!this['_isWriter'])return;const _0x42341d=Date[_0x48d478(0x28a)]()-_0x1f0831,_0x30792f=new Set(),_0x534c72=[],_0x11575b=_0x593584[_0x48d478(0xbb)](),_0x41c36a=require$$3[_0x48d478(0x276)];for(const {key:_0x23e4f0,value:_0x3ec474}of this['_statusEnv']['getRange'](_0x4b159f)){if(!_0x3ec474)continue;const _0x1e19e7=_0x3ec474['host']===_0x11575b&&typeof _0x3ec474[_0x48d478(0x5ca)]===_0x48d478(0x449),_0x2bfa2d=_0x1e19e7?this[_0x48d478(0x2a4)](_0x3ec474):_0x3ec474[_0x48d478(0x6aa)]!=null&&_0x3ec474[_0x48d478(0x6aa)]<_0x42341d;if(_0x2bfa2d)_0x534c72[_0x48d478(0x39b)](_0x23e4f0);else{_0x30792f[_0x48d478(0x32e)](_0x196fd0(_0x3ec474)??_0x23e4f0);if(_0x3ec474[_0x48d478(0x276)]&&_0x3ec474[_0x48d478(0x276)]!==_0x41c36a){if(!this[_0x48d478(0x463)])this[_0x48d478(0x463)]=new Set();!this[_0x48d478(0x463)]['has'](_0x3ec474[_0x48d478(0x276)])&&(this[_0x48d478(0x463)][_0x48d478(0x32e)](_0x3ec474[_0x48d478(0x276)]),this[_0x48d478(0x11b)][_0x48d478(0x116)]?.['warn']?.('process\x20'+(_0x3ec474[_0x48d478(0x5ca)]??'?')+_0x48d478(0x9c)+_0x3ec474['version']+_0x48d478(0x403)+_0x41c36a+_0x48d478(0x194)+_0x48d478(0x5e4),{'feature':_0x48d478(0x536)}));}}}for(const _0x2013ec of _0x534c72)this[_0x48d478(0x235)](_0x2013ec);if(this['_ensureDesired']()){const _0x48d85c=[];for(const {key:_0x31307a}of this[_0x48d478(0x532)](_0x48d478(0x236))){if(!_0x30792f[_0x48d478(0xe5)](_0x31307a)){if(_0x2019b4)try{this[_0x48d478(0x341)]['removeSync'](_0x48d478(0x101)+_0x31307a);}catch{}else _0x48d85c[_0x48d478(0x39b)](this['_desired']['remove'](_0x48d478(0x101)+_0x31307a));}}if(_0x48d85c['length'])await Promise[_0x48d478(0x13f)](_0x48d85c);}}[_0x3063cd(0x655)](_0x3341cc=null){const _0x1ab177=_0x3063cd;if(this['_hbTimer'])return;if(!this[_0x1ab177(0x2d2)]||!this['_statusEnv']){this[_0x1ab177(0x11b)]?.['log']?.[_0x1ab177(0x14c)]?.(_0x1ab177(0x3b8)+this[_0x1ab177(0x2d2)]+_0x1ab177(0x2e2)+!!this[_0x1ab177(0x174)]+_0x1ab177(0x6d2),{'feature':_0x1ab177(0xa0)});return;}this[_0x1ab177(0x47b)]=_0x3341cc,this['_onProcEvent']=()=>this[_0x1ab177(0x578)]();for(const _0x29142e of _0x3ac555)this['okdb']['events']['on'](_0x29142e,this[_0x1ab177(0x17a)]);this[_0x1ab177(0x22c)]();const _0x595860=Number(process.env.OKDB_WORKERS_HEARTBEAT_MS)||_0x165415;this[_0x1ab177(0x4e3)]=setInterval(()=>{const _0x34596e=_0x1ab177;if(this[_0x34596e(0x47b)])try{this[_0x34596e(0x47b)]();}catch{}this[_0x34596e(0x22c)](),this[_0x34596e(0x344)]()[_0x34596e(0x4ec)](()=>{});},_0x595860);if(this[_0x1ab177(0x4e3)][_0x1ab177(0x1b3)])this[_0x1ab177(0x4e3)]['unref']();}[_0x3063cd(0x578)](){const _0x3e6ec4=_0x3063cd;if(!this[_0x3e6ec4(0x2d2)]||!this[_0x3e6ec4(0x174)])return;if(Date[_0x3e6ec4(0x28a)]()-this[_0x3e6ec4(0x112)]<_0x42269a)return;this['_publishNow']();}[_0x3063cd(0x22c)](){const _0xd444ed=_0x3063cd;if(!this[_0xd444ed(0x2d2)]||!this[_0xd444ed(0x174)])return;this['_lastPublishAt']=Date[_0xd444ed(0x28a)]();try{const _0x4129d3=[this[_0xd444ed(0x3be)]()];for(const _0x1acd3a of this[_0xd444ed(0x697)][_0xd444ed(0x5b1)]())_0x4129d3[_0xd444ed(0x39b)](this[_0xd444ed(0x35d)](_0x1acd3a));const _0x1c3bd5=_0x388bc4['enabled']?_0x388bc4[_0xd444ed(0x28a)]():0x0;for(const _0x167f67 of _0x4129d3){try{this[_0xd444ed(0x667)](_0x167f67),this[_0xd444ed(0x1be)]=![];}catch(_0x485bc3){!this[_0xd444ed(0x1be)]&&(this[_0xd444ed(0x1be)]=!![],this[_0xd444ed(0x11b)]?.['log']?.['warn']?.('registry\x20publish\x20failing:\x20'+_0x485bc3[_0xd444ed(0x5a3)],{'feature':_0xd444ed(0xa0)}));}}if(_0x388bc4['enabled'])_0x388bc4['note'](_0xd444ed(0x46a),_0x388bc4['now']()-_0x1c3bd5,_0xd444ed(0x720)+_0x4129d3[_0xd444ed(0x249)]+_0xd444ed(0xda));}catch(_0x591cb2){!this[_0xd444ed(0x1be)]&&(this[_0xd444ed(0x1be)]=!![],this[_0xd444ed(0x11b)]?.[_0xd444ed(0x116)]?.[_0xd444ed(0x14c)]?.(_0xd444ed(0x20a)+_0x591cb2['message'],{'feature':_0xd444ed(0xa0)}));}}async[_0x3063cd(0x5ee)](){const _0x5f43f1=_0x3063cd;if(this[_0x5f43f1(0x17a)]){for(const _0x4ae080 of _0x3ac555){try{this[_0x5f43f1(0x11b)][_0x5f43f1(0x5ce)][_0x5f43f1(0x14d)](_0x4ae080,this['_onProcEvent']);}catch{}}this[_0x5f43f1(0x17a)]=null;}this['_hbTimer']&&(clearInterval(this[_0x5f43f1(0x4e3)]),this[_0x5f43f1(0x4e3)]=null);try{if(this[_0x5f43f1(0x174)]&&this[_0x5f43f1(0x2d2)])await this[_0x5f43f1(0x327)](this[_0x5f43f1(0x5ed)]);}catch{}}async[_0x3063cd(0x5bc)](){const _0x2da0f3=_0x3063cd;if(!this['_statusEnv']||!this[_0x2da0f3(0x2d2)])return;try{await this[_0x2da0f3(0x327)](this[_0x2da0f3(0x5ed)]);}catch{}try{const _0x3e5bce=[];for(const {value:_0xd91836}of this['_statusEnv']['getRange'](_0x4b159f)){if(_0xd91836?.[_0x2da0f3(0x237)]===process[_0x2da0f3(0x5ca)]&&_0xd91836[_0x2da0f3(0x617)])_0x3e5bce[_0x2da0f3(0x39b)](_0xd91836[_0x2da0f3(0x617)]);}for(const _0x3c4a77 of _0x3e5bce){try{await this[_0x2da0f3(0x327)](_0x3c4a77);}catch{}}}catch{}}async[_0x3063cd(0x6c8)](){const _0x57a994=_0x3063cd;return this[_0x57a994(0x6f3)](this[_0x57a994(0x3be)]());}async[_0x3063cd(0x662)](_0x51530d){const _0xd482fa=_0x3063cd;if(!this[_0xd482fa(0x174)]||!this[_0xd482fa(0x2d2)])return;return this[_0xd482fa(0x6f3)](this[_0xd482fa(0x35d)](_0x51530d));}[_0x3063cd(0x35d)]({pid:_0x3c4740,startedAt:_0x36b4e6,kind:_0x2faece,supervisorKey:_0x31b61f,slot:slot=null,slotKey:slotKey=null,role:role={},listenAddr:listenAddr=null,processing:processing=null,lifecycle:lifecycle=_0x3063cd(0x599),meta:meta=null,stats:stats=null}){const _0x51c510=_0x3063cd,_0x4c9113=Date['now'](),_0x45aed3=_0x465494(_0x3c4740,_0x36b4e6);return{'nodeKey':_0xc2d7d(_0x45aed3,'0'),'processKey':_0x45aed3,'instanceId':'0','pid':_0x3c4740,'startedAt':_0x36b4e6,'ppid':process['pid'],'host':_0x593584[_0x51c510(0xbb)](),'supervisorKey':_0x31b61f,'slot':slot,'slotKey':slotKey,'kind':_0x2faece,'role':role,'listenAddr':listenAddr,'heartbeatAt':_0x4c9113,'expiresAt':_0x4c9113+_0x5e05eb,'caps':this[_0x51c510(0x41c)](_0x2faece,role),'lifecycle':{'state':lifecycle,'desiredVersionApplied':null},'processing':processing,'meta':meta,'stats':stats};}async[_0x3063cd(0x3d0)](_0x417580){const _0x5d38df=_0x3063cd;if(!_0x417580?.[_0x5d38df(0x5ca)])return null;const _0x22e8bf=_0x465494(_0x417580[_0x5d38df(0x5ca)],_0x417580[_0x5d38df(0x594)]);this[_0x5d38df(0x697)][_0x5d38df(0x494)](_0x22e8bf,{..._0x417580,'supervisorKey':_0x417580[_0x5d38df(0xa3)]??this[_0x5d38df(0x166)]});if(this[_0x5d38df(0x2d2)])await this[_0x5d38df(0x662)](this[_0x5d38df(0x697)][_0x5d38df(0x1ed)](_0x22e8bf))[_0x5d38df(0x4ec)]?.(()=>{});return _0x22e8bf;}[_0x3063cd(0x6f2)](_0x4d2e7a){const _0x31b808=_0x3063cd;if(!_0x4d2e7a)return;return this[_0x31b808(0x697)][_0x31b808(0x495)](_0x4d2e7a),this[_0x31b808(0x327)](_0x4d2e7a);}['_sampleOwnStats'](){const _0x18eefd=_0x3063cd,_0x5e7090=Date[_0x18eefd(0x28a)](),_0x260040=process[_0x18eefd(0x19e)](),_0x23768e=(_0x5e7090-this[_0x18eefd(0x124)])*0x3e8;if(_0x23768e>=0x3d090){const _0x3486a1=_0x260040[_0x18eefd(0x3c6)]-this[_0x18eefd(0x544)][_0x18eefd(0x3c6)]+(_0x260040[_0x18eefd(0x702)]-this['_lastCpuUsage'][_0x18eefd(0x702)]),_0xfd729d=_0x593584[_0x18eefd(0x2c6)]()['length']||0x1;this[_0x18eefd(0x45f)]=Math[_0x18eefd(0x4b1)](0x64,Math[_0x18eefd(0x336)](_0x3486a1/(_0x23768e*_0xfd729d)*0x64)),this[_0x18eefd(0x5ea)]=Math[_0x18eefd(0x336)](_0x23768e/0x3e8),this[_0x18eefd(0x544)]=_0x260040,this[_0x18eefd(0x124)]=_0x5e7090;}const _0x2eab7d=process[_0x18eefd(0x153)](),_0x552b08=this[_0x18eefd(0x17d)][_0x18eefd(0xd1)];let _0x5c5f6b=0x0;if(_0x552b08>0x0){const _0x351695=[this[_0x18eefd(0x11b)],...this[_0x18eefd(0x11b)][_0x18eefd(0x1aa)]?.[_0x18eefd(0x5b1)]?.()??[]];for(const _0x496993 of _0x351695){const _0x173554=_0x496993[_0x18eefd(0x143)]?.[_0x18eefd(0x708)];if(_0x173554)_0x5c5f6b+=_0x173554[_0x18eefd(0x2d5)]['busy'];}}let _0x5a19b7=null;const _0x4cfc08=_0x552b08;if(_0x4cfc08>0x0){let _0x4deb8f=0x0;for(const _0x205475 of this['_threadStats'][_0x18eefd(0x5b1)]())_0x4deb8f+=_0x205475[_0x18eefd(0x66c)]||0x0;_0x5a19b7={'count':_0x4cfc08,'heapUsed':_0x4deb8f,'sandbox':_0x552b08,'busy':_0x5c5f6b};}return{'rss':_0x2eab7d['rss'],'heapUsed':_0x2eab7d['heapUsed'],'heapTotal':_0x2eab7d['heapTotal'],'external':_0x2eab7d[_0x18eefd(0x35f)],'cpuPct':this['_lastCpuPct'],'cpuWindowMs':this[_0x18eefd(0x5ea)]??null,'threads':_0x5a19b7,'at':_0x5e7090};}[_0x3063cd(0x6a5)](_0x20f34e,_0x68cbdf){const _0x457ae8=_0x3063cd;if(!_0x20f34e||!_0x68cbdf)return;this['_threadStats'][_0x457ae8(0x494)](_0x20f34e,_0x68cbdf);}[_0x3063cd(0x4d7)](_0x42619c){const _0x4fa0bd=_0x3063cd;this[_0x4fa0bd(0x17d)]['delete'](_0x42619c);}[_0x3063cd(0x35b)](_0x1fa370,_0x4f961a,_0x29c2d0=undefined){const _0x1da7e5=_0x3063cd,_0x18dbe8=this[_0x1da7e5(0x697)]['get'](_0x1fa370);if(!_0x18dbe8||!_0x4f961a)return;if(_0x29c2d0!==undefined)_0x18dbe8[_0x1da7e5(0x81)]=_0x29c2d0;_0x18dbe8[_0x1da7e5(0x5f4)]={'rss':_0x4f961a[_0x1da7e5(0x2b4)]??null,'heapUsed':_0x4f961a['heapUsed']??null,'heapTotal':_0x4f961a[_0x1da7e5(0x5b3)]??null,'external':_0x4f961a[_0x1da7e5(0x35f)]??null,'cpuPct':_0x4f961a[_0x1da7e5(0x716)]??null,'cpuWindowMs':_0x4f961a[_0x1da7e5(0x735)]??null,'threads':_0x4f961a[_0x1da7e5(0x343)]??null,'claims':_0x4f961a[_0x1da7e5(0x514)]??null,'envsOpen':_0x4f961a[_0x1da7e5(0xb4)]??null,'at':Date[_0x1da7e5(0x28a)]()};}[_0x3063cd(0x3be)](){const _0x2cd3d5=_0x3063cd,_0x3f2117=Date[_0x2cd3d5(0x28a)](),_0x4f2340=this[_0x2cd3d5(0x11b)][_0x2cd3d5(0x624)]||{},_0x4ebf02=this[_0x2cd3d5(0x543)]||_0x2cd3d5(0x4b8);return{'nodeKey':this[_0x2cd3d5(0x5ed)],'processKey':this['_selfKey'],'instanceId':this[_0x2cd3d5(0x629)],'pid':process[_0x2cd3d5(0x5ca)],'startedAt':this[_0x2cd3d5(0x566)],'instanceStartedAt':this[_0x2cd3d5(0x4cc)],'ppid':typeof process[_0x2cd3d5(0x237)]===_0x2cd3d5(0x449)?process[_0x2cd3d5(0x237)]:null,'host':_0x593584[_0x2cd3d5(0xbb)](),'supervisorKey':this[_0x2cd3d5(0xaa)]??null,'version':require$$3[_0x2cd3d5(0x276)],'kind':_0x4ebf02,'role':{'engines':!!_0x4f2340[_0x2cd3d5(0x5ad)],'processors':!!_0x4f2340[_0x2cd3d5(0x6e3)],'compaction':_0x4f2340[_0x2cd3d5(0x4f2)],'http':_0x4f2340[_0x2cd3d5(0x57f)]},'listenAddr':this[_0x2cd3d5(0x2e8)]??null,'heartbeatAt':_0x3f2117,'expiresAt':_0x3f2117+_0x5e05eb,'caps':this[_0x2cd3d5(0x41c)](_0x4ebf02,_0x4f2340),'lifecycle':{'state':_0x2cd3d5(0x599),'desiredVersionApplied':null},'meta':{...this[_0x2cd3d5(0x9e)]},'processing':_0x4f2340[_0x2cd3d5(0x6e3)]?this[_0x2cd3d5(0x4a0)]():null,'engines':_0x4f2340[_0x2cd3d5(0x5ad)]?[...this['okdb'][_0x2cd3d5(0x3f2)]??[]]:null,'singletonClaims':this['_collectSingletonClaims'](),'stats':this[_0x2cd3d5(0x4c8)](),'writers':this[_0x2cd3d5(0x5fb)]()};}[_0x3063cd(0x5fb)](){const _0x19f3cc=_0x3063cd,_0x259be6={};try{for(const [_0x56975d,_0x4a44b2]of this[_0x19f3cc(0x11b)]['_envs']){try{const _0x48e4b2=_0x4a44b2[_0x19f3cc(0x294)]?.();if(!_0x48e4b2)continue;if(!_0x48e4b2['depth']&&!_0x48e4b2[_0x19f3cc(0x6e0)]&&!(_0x48e4b2[_0x19f3cc(0x658)]??0x0)&&!_0x48e4b2['draining'])continue;_0x259be6[_0x56975d]={'depth':_0x48e4b2['depth'],'oldestPendingMs':_0x48e4b2[_0x19f3cc(0x51f)],'committed':_0x48e4b2['committed'],'commitsPerSec':_0x48e4b2[_0x19f3cc(0x211)],'commitP99Ms':_0x48e4b2[_0x19f3cc(0x4b6)],'parkedNow':_0x48e4b2['parkedNow']??0x0,'draining':!!_0x48e4b2[_0x19f3cc(0x61b)]};}catch{}}}catch{}return Object[_0x19f3cc(0x2b3)](_0x259be6)[_0x19f3cc(0x249)]?_0x259be6:null;}[_0x3063cd(0x611)](){const _0x37ca9c=_0x3063cd,_0x8e806b=process['pid'],_0x3aa9ef=Date[_0x37ca9c(0x28a)](),_0x331aae=_0xdb8fc5=>{const _0x7a25b1=_0x37ca9c;if(!_0xdb8fc5)return[];const _0x54f00c=[];try{for(const {id:_0xe5c251,entry:_0x3b2cc5}of _0xdb8fc5[_0x7a25b1(0x49e)]()){if(_0x3b2cc5?.[_0x7a25b1(0x282)]?.['pid']!==_0x8e806b)continue;const _0x1129b8=_0x3b2cc5[_0x7a25b1(0x718)]??_0x3b2cc5['acquiredAt']??0x0;if(_0x1129b8+(_0x3b2cc5[_0x7a25b1(0x5eb)]??0x0)<_0x3aa9ef)continue;_0x54f00c[_0x7a25b1(0x39b)](_0xe5c251);}}catch{}return _0x54f00c;},_0xfa6ede=_0x331aae(this['_singletonLock'](_0x37ca9c(0x4e2))),_0x2d7d12=_0x331aae(this['_singletonLock'](_0x37ca9c(0x1a8)));if(!_0xfa6ede[_0x37ca9c(0x249)]&&!_0x2d7d12[_0x37ca9c(0x249)])return null;return{'compact':_0xfa6ede,'replicate':_0x2d7d12};}[_0x3063cd(0x733)](_0x5a05d9){const _0x3d83a2=_0x3063cd;if(!this['okdb']?.[_0x3d83a2(0x3b7)])return null;if(!this[_0x3d83a2(0x5cd)])this['_singletonLocks']=new Map();let _0xf84ab3=this[_0x3d83a2(0x5cd)]['get'](_0x5a05d9);if(!_0xf84ab3)try{_0xf84ab3=new _0x5daf87(this[_0x3d83a2(0x11b)][_0x3d83a2(0x3b7)],{'namespace':_0x5a05d9}),this[_0x3d83a2(0x5cd)][_0x3d83a2(0x494)](_0x5a05d9,_0xf84ab3);}catch{return null;}return _0xf84ab3;}[_0x3063cd(0x4a0)](){const _0x38eefb=_0x3063cd,_0x36bffb=[];try{for(const [_0x1dc344,_0x2f27a2]of this[_0x38eefb(0x11b)][_0x38eefb(0x1aa)]){if(_0x1dc344[_0x38eefb(0x334)]('~'))continue;for(const _0x3054ca of _0x2f27a2[_0x38eefb(0x66b)][_0x38eefb(0x3e4)]())_0x36bffb[_0x38eefb(0x39b)]({..._0x3054ca,'env':_0x1dc344});}}catch{}return{'participate':this[_0x38eefb(0x11b)][_0x38eefb(0x6e3)]?.[_0x38eefb(0x623)]??![],'processors':_0x36bffb};}['_ensureDesired'](){const _0x2ca29f=_0x3063cd;if(this[_0x2ca29f(0x341)])return!![];const _0x24def6=this[_0x2ca29f(0x11b)][_0x2ca29f(0x3b7)];if(!_0x24def6)return![];return this[_0x2ca29f(0x341)]=_0x24def6[_0x2ca29f(0x6d1)](_0x2c5a67,{'dupSort':![]}),this[_0x2ca29f(0x6c7)]=_0x24def6[_0x2ca29f(0x6d1)](_0x93de4d,{'dupSort':![]}),!![];}async['_migrateVocab'](){const _0x283047=_0x3063cd;if(!this[_0x283047(0x70f)]())return;const _0x4f2fb4=_0x283047(0x6e7),_0x3bf8bb=0x1,_0x27d272=this[_0x283047(0x341)][_0x283047(0x1ed)](_0x4f2fb4)??0x0;if(_0x27d272>=_0x3bf8bb)return;const _0x3540a2=_0x5a0790=>{const _0x32dce9=_0x283047;if(_0x5a0790===_0x32dce9(0x29e))return _0x32dce9(0x4f8);if(_0x5a0790===_0x32dce9(0x4ac))return _0x32dce9(0x12a);return _0x5a0790;};await this[_0x283047(0x11b)][_0x283047(0x648)]['_writer'][_0x283047(0x4ba)](()=>{const _0x32b024=_0x283047;for(const _0x211024 of[_0x32b024(0x675),_0x32b024(0x3c0)]){for(const {key:_0x347977,value:_0x1e3740}of this['_desired']['getRange']({'start':_0x211024,'end':_0x211024+'\xff'})){if(typeof _0x347977!==_0x32b024(0x242)||!_0x347977['startsWith'](_0x211024))break;const _0x1690b4=_0x3540a2(_0x1e3740[_0x32b024(0x127)]);if(_0x1690b4!==_0x1e3740[_0x32b024(0x127)])this['_desired'][_0x32b024(0x170)](_0x347977,{..._0x1e3740,'mode':_0x1690b4});}}this[_0x32b024(0x341)]['put'](_0x4f2fb4,_0x3bf8bb);});}[_0x3063cd(0x3df)](){const _0x318d1f=_0x3063cd;return!!this[_0x318d1f(0x341)];}[_0x3063cd(0x305)](_0x2ee4ab,_0xa4bce7){const _0x159a3b=_0x3063cd;if(!this['_ensureDesired']())return null;const _0x2515c2=_0x2ee4ab+'/'+_0xa4bce7;return this[_0x159a3b(0x72b)](),this[_0x159a3b(0x399)][_0x159a3b(0x1ed)](_0x2515c2)??this['_desired'][_0x159a3b(0x1ed)](_0x2515c2)??null;}['_refreshDesiredSnapshot'](){const _0x99368e=_0x3063cd;if(!_0x2019b4)return;try{this[_0x99368e(0x11b)][_0x99368e(0x648)]?.['db']?.[_0x99368e(0x2e0)]?.();}catch{}}async[_0x3063cd(0x657)](_0x25105a,_0x5677cd,_0x4b9c9b){const _0x5e20c7=_0x3063cd;if(!this[_0x5e20c7(0x70f)]())return null;const _0x3dfc81=_0x25105a+'/'+_0x5677cd;this[_0x5e20c7(0x72b)]();const _0x1abd06=this['_desiredOverlay']['get'](_0x3dfc81)??this[_0x5e20c7(0x341)][_0x5e20c7(0x1ed)](_0x3dfc81)??{'version':0x0},_0x38ba52=(_0x1abd06['version']||0x0)+0x1,_0x3ce383={..._0x1abd06,..._0x4b9c9b,'version':_0x38ba52,'updatedAt':Date['now']()};this[_0x5e20c7(0x399)][_0x5e20c7(0x494)](_0x3dfc81,_0x3ce383);try{await this[_0x5e20c7(0x11b)]['_systemEnv'][_0x5e20c7(0x387)][_0x5e20c7(0x4ba)](()=>{const _0x5f3730=_0x5e20c7;this[_0x5f3730(0x341)]['put'](_0x3dfc81,_0x3ce383);});}finally{if(this[_0x5e20c7(0x399)]['get'](_0x3dfc81)===_0x3ce383)this[_0x5e20c7(0x399)]['delete'](_0x3dfc81);}return _0x38ba52;}['listDesired'](_0x57b4a3){const _0x3f1ad5=_0x3063cd;if(!this['_ensureDesired']())return[];this[_0x3f1ad5(0x72b)]();const _0x274bab=_0x57b4a3+'/',_0x6c1139=[];for(const {key:_0x204875,value:_0x2a9eba}of this[_0x3f1ad5(0x341)][_0x3f1ad5(0x4fa)]({'start':_0x274bab,'end':_0x274bab+'\xff'})){if(typeof _0x204875!==_0x3f1ad5(0x242)||!_0x204875[_0x3f1ad5(0x334)](_0x274bab))break;_0x6c1139['push']({'key':_0x204875['slice'](_0x274bab['length']),'value':_0x2a9eba});}return _0x6c1139;}['getCmd'](_0x1503cd){const _0x63f2d6=_0x3063cd;if(!this[_0x63f2d6(0x70f)]())return null;return this[_0x63f2d6(0x6c7)][_0x63f2d6(0x1ed)](_0x1503cd)??null;}async[_0x3063cd(0x2eb)](_0x59eec1,_0x50f624,_0x323165={}){const _0x11d8bf=_0x3063cd;if(!this[_0x11d8bf(0x70f)]())return null;let _0x3c7115;return await this[_0x11d8bf(0x11b)][_0x11d8bf(0x648)][_0x11d8bf(0x387)]['transaction'](()=>{const _0x36eefe=_0x11d8bf,_0xa32cef=this[_0x36eefe(0x6c7)][_0x36eefe(0x1ed)](_0x59eec1)||{'epoch':0x0};_0x3c7115=(_0xa32cef['epoch']||0x0)+0x1,this[_0x36eefe(0x6c7)][_0x36eefe(0x170)](_0x59eec1,{..._0xa32cef,..._0x323165,'cmd':_0x50f624,'epoch':_0x3c7115,'updatedAt':Date[_0x36eefe(0x28a)]()});}),_0x3c7115;}}return okdbProcessRegistry={'OKDBProcessRegistry':_0x3ba242,'nodeKey':_0x465494,'logicalKey':_0x3cae6c,'slotKey':_0x2e0618,'PROCESS_ENV':_0x1cf062,'NODE_TYPE':_0x4b159f},okdbProcessRegistry;}var okdbChangefeed,hasRequiredOkdbChangefeed;function requireOkdbChangefeed(){const _0x17905c=_0x563deb;if(hasRequiredOkdbChangefeed)return okdbChangefeed;hasRequiredOkdbChangefeed=0x1;const _0x355c8a=require$$0$6,{EVENTS:_0x6fa281,CHANGE_ACTIONS:_0x329873}=requireOkdbEnums(),{LOOP:_0x2180e6}=requireOkdbLoopMonitor(),_0x4380cc=Number(process.env.OKDB_CHANGEFEED_QUANTUM)||0x3e8,_0x3664a=0x5,_0x463097=0x2710;class _0x32f20e extends _0x355c8a{constructor(_0x57a298,_0xb4db5c={}){const _0x5639cf=_0x3dbc;super(),this[_0x5639cf(0x11b)]=_0x57a298,this[_0x5639cf(0x640)]=_0xb4db5c[_0x5639cf(0x4bf)]??_0x4380cc,this[_0x5639cf(0x347)]=_0xb4db5c[_0x5639cf(0x259)]??_0x3664a,this['_dedupeMax']=_0xb4db5c[_0x5639cf(0x412)]??_0x463097,this[_0x5639cf(0x606)]=![],this[_0x5639cf(0x6a8)]=new Map(),this[_0x5639cf(0x123)]=new Map(),this[_0x5639cf(0x107)]=new Map(),this['_flushTimer']=null,this[_0x5639cf(0x51b)]=![],this[_0x5639cf(0x52f)]=new Set(),this[_0x5639cf(0x27f)]=new Set(),this[_0x5639cf(0x593)]=_0x191d89=>this[_0x5639cf(0x388)](_0x191d89),this[_0x5639cf(0x51d)]=_0xe4b132=>this[_0x5639cf(0x40b)](_0xe4b132),this[_0x5639cf(0x2d1)]=_0x5cb780=>this[_0x5639cf(0x391)](_0x5cb780),this['_onStop']=()=>this[_0x5639cf(0x2a7)]();}[_0x17905c(0x15c)](){const _0x1ffc88=_0x17905c;if(this['_started'])return;this[_0x1ffc88(0x606)]=!![];for(const [_0x4db7e2,_0x2c2b1d]of this[_0x1ffc88(0x11b)][_0x1ffc88(0x1aa)]){if(_0x4db7e2[_0x1ffc88(0x334)]('~'))continue;try{_0x2c2b1d[_0x1ffc88(0x73f)]();}catch{}}for(const [_0x2ada82,_0x59b904]of this[_0x1ffc88(0x11b)][_0x1ffc88(0x1aa)]){if(_0x2ada82['startsWith']('~'))continue;try{this[_0x1ffc88(0x123)][_0x1ffc88(0x494)](_0x2ada82,_0x59b904[_0x1ffc88(0x6f9)]()||0x0);}catch{}}const {events:_0x5e6ac6}=this['okdb'];_0x5e6ac6['on'](_0x6fa281[_0x1ffc88(0x3e9)],this[_0x1ffc88(0x51d)]),_0x5e6ac6['on'](_0x6fa281[_0x1ffc88(0x1e3)],this[_0x1ffc88(0x593)]),_0x5e6ac6['on'](_0x6fa281[_0x1ffc88(0xaf)],this[_0x1ffc88(0x593)]),_0x5e6ac6['on'](_0x6fa281['ITEM_REMOVE'],this['_onItem']),_0x5e6ac6['on'](_0x6fa281['SYSTEM_POKE'],this[_0x1ffc88(0x2d1)]),_0x5e6ac6['once'](_0x6fa281[_0x1ffc88(0x352)],this[_0x1ffc88(0x577)]);}[_0x17905c(0x2a7)](){const _0x7adcf1=_0x17905c;if(!this[_0x7adcf1(0x606)])return;this[_0x7adcf1(0x606)]=![];const {events:_0x9c8ff4}=this[_0x7adcf1(0x11b)];_0x9c8ff4[_0x7adcf1(0x14d)](_0x6fa281['ITEM_PENDING'],this[_0x7adcf1(0x51d)]),_0x9c8ff4[_0x7adcf1(0x14d)](_0x6fa281[_0x7adcf1(0x1e3)],this['_onItem']),_0x9c8ff4[_0x7adcf1(0x14d)](_0x6fa281['ITEM_UPDATE'],this['_onItem']),_0x9c8ff4['off'](_0x6fa281[_0x7adcf1(0x5e7)],this[_0x7adcf1(0x593)]),_0x9c8ff4[_0x7adcf1(0x14d)](_0x6fa281[_0x7adcf1(0x1c8)],this[_0x7adcf1(0x2d1)]);try{_0x9c8ff4[_0x7adcf1(0x14d)](_0x6fa281['SYSTEM_STOPPED'],this['_onStop']);}catch{}this[_0x7adcf1(0x5de)]&&(clearTimeout(this[_0x7adcf1(0x5de)]),this[_0x7adcf1(0x5de)]=null),this['_pending']['clear'](),this['_cursors'][_0x7adcf1(0x558)](),this[_0x7adcf1(0x123)][_0x7adcf1(0x558)](),this[_0x7adcf1(0x52f)][_0x7adcf1(0x558)](),this[_0x7adcf1(0x27f)][_0x7adcf1(0x558)]();}[_0x17905c(0x3bf)](_0x41d2c1,_0x4a3008,_0x3e92f4,_0x59d838){return _0x41d2c1+'\x00'+_0x4a3008+'\x00'+_0x3e92f4+'\x00'+_0x59d838;}[_0x17905c(0x27d)](_0x3a9bc8,_0x3029d1,_0x53585d,_0x49f834){const _0x29fd07=_0x17905c,_0x4f53b0=this[_0x29fd07(0x3bf)](_0x3a9bc8,_0x3029d1,_0x53585d,_0x49f834);if(this[_0x29fd07(0x52f)]['has'](_0x4f53b0))return![];this[_0x29fd07(0x52f)]['add'](_0x4f53b0);if(this[_0x29fd07(0x52f)]['size']>this[_0x29fd07(0x3bd)]){const _0x1a4cf7=this['_seen'][_0x29fd07(0x5b1)]()[_0x29fd07(0x319)]()[_0x29fd07(0x33d)];this['_seen'][_0x29fd07(0x495)](_0x1a4cf7);}return!![];}[_0x17905c(0x40b)](_0x5c3655){const _0x57f6a3=_0x17905c;if(!this[_0x57f6a3(0x606)]||!_0x5c3655)return;const {env:_0x4ba13e,type:_0x147d4e,key:_0x80ad9b,clock:_0x215e3d}=_0x5c3655;if(_0x4ba13e==null||_0x147d4e==null||_0x80ad9b==null)return;if(typeof _0x4ba13e===_0x57f6a3(0x242)&&_0x4ba13e['startsWith']('~'))return;if(typeof _0x147d4e===_0x57f6a3(0x242)&&_0x147d4e[_0x57f6a3(0x334)]('~'))return;this[_0x57f6a3(0x27f)][_0x57f6a3(0x32e)](this[_0x57f6a3(0x3bf)](_0x4ba13e,_0x147d4e,_0x80ad9b,_0x215e3d)),this[_0x57f6a3(0x27f)][_0x57f6a3(0xd1)]>this[_0x57f6a3(0x3bd)]&&this[_0x57f6a3(0x27f)][_0x57f6a3(0x495)](this['_pendingLocal']['values']()[_0x57f6a3(0x319)]()[_0x57f6a3(0x33d)]);}[_0x17905c(0x388)](_0x2fcf99){const _0xed215b=_0x17905c;if(!this['_started']||!_0x2fcf99)return;const {env:_0x14a62d,type:_0x32b455,key:_0x359a52,clock:_0x162583,origin:_0x26db18,action:_0x2d6b98,newValue:_0x4d0128,oldValue:_0x51ffc7}=_0x2fcf99;if(_0x14a62d==null||_0x32b455==null||_0x359a52==null)return;if(typeof _0x14a62d==='string'&&_0x14a62d['startsWith']('~'))return;if(typeof _0x32b455===_0xed215b(0x242)&&_0x32b455[_0xed215b(0x334)]('~'))return;this[_0xed215b(0x27f)]['delete'](this[_0xed215b(0x3bf)](_0x14a62d,_0x32b455,_0x359a52,_0x162583));if(!this[_0xed215b(0x27d)](_0x14a62d,_0x32b455,_0x359a52,_0x162583))return;const _0x2167d4=_0x2d6b98===_0x329873[_0xed215b(0x382)]?_0xed215b(0x5c3):_0xed215b(0x170);this[_0xed215b(0x326)]('change',{'env':_0x14a62d,'type':_0x32b455,'key':_0x359a52,'op':_0x2167d4,'clock':_0x162583,'origin':_0x26db18,'value':_0x2167d4===_0xed215b(0x5c3)?null:_0x4d0128,'prevValue':_0x51ffc7});}[_0x17905c(0x391)](_0xabb851){const _0x505021=_0x17905c;if(!this[_0x505021(0x606)])return;if(!_0xabb851||typeof _0xabb851['env']!==_0x505021(0x242)||typeof _0xabb851[_0x505021(0x563)]!==_0x505021(0x242))return;const {env:_0x4eab38,type:_0x457e00}=_0xabb851;if(_0x4eab38[_0x505021(0x334)]('~')||_0x457e00[_0x505021(0x334)]('~'))return;this[_0x505021(0x107)][_0x505021(0x494)](_0x4eab38+'\x00'+_0x457e00,{'env':_0x4eab38,'type':_0x457e00}),this[_0x505021(0x25d)]();}[_0x17905c(0x25d)](){const _0x1202f8=_0x17905c;if(this[_0x1202f8(0x5de)])return;const _0x3f3d7d=()=>{const _0x217de7=_0x1202f8;this['_flushTimer']=null,this[_0x217de7(0xe1)]()[_0x217de7(0x4ec)](()=>{});};this[_0x1202f8(0x5de)]=setTimeout(_0x3f3d7d,this[_0x1202f8(0x347)]>0x0?this[_0x1202f8(0x347)]:0x0);}async[_0x17905c(0xe1)](){const _0x8beff0=_0x17905c;if(this[_0x8beff0(0x51b)]){this[_0x8beff0(0x25d)]();return;}this[_0x8beff0(0x51b)]=!![];try{const _0x1e92cb=[...this[_0x8beff0(0x107)][_0x8beff0(0x5b1)]()];this[_0x8beff0(0x107)]['clear']();let _0x1d746d=![];for(const {env:_0x164a9f,type:_0x3ebf8a}of _0x1e92cb){try{const _0xe55a43=await this[_0x8beff0(0x5f8)](_0x164a9f,_0x3ebf8a);if(_0xe55a43)_0x1d746d=!![];}catch{this[_0x8beff0(0x107)][_0x8beff0(0x494)](_0x164a9f+'\x00'+_0x3ebf8a,{'env':_0x164a9f,'type':_0x3ebf8a}),_0x1d746d=!![];}}if(_0x1d746d||this[_0x8beff0(0x107)][_0x8beff0(0xd1)]>0x0)this[_0x8beff0(0x25d)]();}finally{this[_0x8beff0(0x51b)]=![];}}async[_0x17905c(0x5f8)](_0x34a242,_0x4466a){const _0x32a16a=_0x17905c,_0x56bc85=await this[_0x32a16a(0x11b)][_0x32a16a(0x38f)](_0x34a242),_0x11f02d=_0x34a242+'\x00'+_0x4466a;!this[_0x32a16a(0x6a8)]['has'](_0x11f02d)&&(!this[_0x32a16a(0x123)]['has'](_0x34a242)&&(_0x56bc85[_0x32a16a(0x73f)](),this[_0x32a16a(0x123)][_0x32a16a(0x494)](_0x34a242,_0x56bc85[_0x32a16a(0x6f9)]()||0x0)),this[_0x32a16a(0x6a8)]['set'](_0x11f02d,this[_0x32a16a(0x123)][_0x32a16a(0x1ed)](_0x34a242)));const _0x4f3e66=this[_0x32a16a(0x6a8)]['get'](_0x11f02d),_0x29c90c=_0x56bc85[_0x32a16a(0x6f9)](_0x4466a)||0x0;if(_0x29c90c<=_0x4f3e66)return![];const _0x435c95=_0x4f3e66+this['_quantum'],_0xef005c=Math[_0x32a16a(0x4b1)](_0x29c90c,_0x435c95),_0x5e0465=_0x2180e6['enabled']?_0x2180e6[_0x32a16a(0x28a)]():0x0,_0x5b36ee=Array[_0x32a16a(0x4f7)](_0x56bc85[_0x32a16a(0x189)](_0x4466a,_0x4f3e66+0x1,_0xef005c));let _0x58e798=_0x4f3e66;for(const _0x1c3b82 of _0x5b36ee){const {clock:_0x58f4ac,key:_0x2a66ae,action:_0xba89c5,origin:_0x4b0cb1}=_0x1c3b82;if(_0x58f4ac>_0x58e798)_0x58e798=_0x58f4ac;if(_0x2a66ae==null)continue;if(this['_pendingLocal'][_0x32a16a(0xe5)](this[_0x32a16a(0x3bf)](_0x34a242,_0x4466a,_0x2a66ae,_0x58f4ac)))continue;if(!this[_0x32a16a(0x27d)](_0x34a242,_0x4466a,_0x2a66ae,_0x58f4ac))continue;let _0x5711f8,_0x362878;if(_0xba89c5===_0x329873['REMOVE'])_0x5711f8=_0x32a16a(0x5c3),_0x362878=null;else{const _0x2011bd=_0x56bc85[_0x32a16a(0x1ed)](_0x4466a,_0x2a66ae);_0x2011bd==null?(_0x5711f8=_0x32a16a(0x5c3),_0x362878=null):(_0x5711f8=_0x32a16a(0x170),_0x362878=_0x2011bd);}this[_0x32a16a(0x326)](_0x32a16a(0x5d3),{'env':_0x34a242,'type':_0x4466a,'key':_0x2a66ae,'op':_0x5711f8,'clock':_0x58f4ac,'origin':_0x4b0cb1,'value':_0x362878});}if(_0x2180e6[_0x32a16a(0x70e)])_0x2180e6[_0x32a16a(0x158)](_0x32a16a(0x6b8)+_0x34a242+':'+_0x4466a,_0x2180e6['now']()-_0x5e0465,'n='+_0x5b36ee[_0x32a16a(0x249)]);return this['_cursors']['set'](_0x11f02d,Math[_0x32a16a(0x234)](_0x58e798,_0xef005c)),_0x56bc85[_0x32a16a(0x6f9)](_0x4466a)>_0xef005c;}[_0x17905c(0x54e)](){const _0x4e3a58=_0x17905c;return{'started':this['_started'],'quantum':this[_0x4e3a58(0x640)],'flushDebounce':this[_0x4e3a58(0x347)],'cursors':Object[_0x4e3a58(0x19d)]([...this[_0x4e3a58(0x6a8)]['entries']()][_0x4e3a58(0x539)](([_0x4a18ba,_0x1f700b])=>[_0x4a18ba[_0x4e3a58(0x176)]('\x00',':'),_0x1f700b])),'pending':this['_pending']['size'],'seen':this[_0x4e3a58(0x52f)][_0x4e3a58(0xd1)]};}}return _0x32f20e['CHANGEFEED_QUANTUM']=_0x4380cc,okdbChangefeed={'OKDBChangefeed':_0x32f20e},okdbChangefeed;}var okdbCluster,hasRequiredOkdbCluster;function requireOkdbCluster(){const _0x327833=_0x563deb;if(hasRequiredOkdbCluster)return okdbCluster;hasRequiredOkdbCluster=0x1;const _0xd1ee7=require$$1$1,_0x397d20=require$$1,{EVENTS:_0x45b729}=requireOkdbEnums(),_0x41c595=require$$0,{slotKey:_0x4230c3}=requireOkdbProcessRegistry(),_0x454daf=Number(process.env.OKDB_CLUSTER_RESPAWN_BACKOFF_MS)||0xfa,_0x3f234d=0xfa0,_0x13736f=0x5,_0x250c24=0x2710,_0x344d40=0xbb8,_0x1425ef=0x7d0,_0x2fd4ab=_0x327833(0x5a9),_0x1c3153='ephemeral',_0x4e4578=_0x327833(0x116),_0x2b87b1='stats',_0x1a4a39=[_0x45b729[_0x327833(0x442)],_0x45b729[_0x327833(0x34c)],_0x45b729[_0x327833(0x58a)],_0x45b729['FTS_RESET'],_0x45b729[_0x327833(0x6ec)],_0x45b729[_0x327833(0x65d)],_0x45b729[_0x327833(0x68e)],_0x45b729[_0x327833(0x3f7)],_0x327833(0x3d9),_0x327833(0x5fe),_0x327833(0x2ce),_0x327833(0x3b1),_0x327833(0x460),_0x327833(0xf9)],_0x48e12b=Number(process.env.OKDB_CLUSTER_STATUS_MS)||0x7d0,_0x39fb48=0x64;function _0x54d2d0(_0x58c2e7){const _0x26c36=_0x327833;if(!_0x58c2e7)return _0x26c36(0x7e);const _0x53f059=(_0x58c2e7[_0x26c36(0x6e3)]||[])[_0x26c36(0x539)](_0x1ffcb5=>[_0x1ffcb5['env'],_0x1ffcb5['id'],_0x1ffcb5[_0x26c36(0x127)],_0x1ffcb5[_0x26c36(0x381)],!!_0x1ffcb5[_0x26c36(0x1f9)],!!_0x1ffcb5[_0x26c36(0x568)],!!_0x1ffcb5[_0x26c36(0x476)],_0x1ffcb5[_0x26c36(0x26c)]?.['pid']??null,_0x1ffcb5[_0x26c36(0x271)]?String(_0x1ffcb5[_0x26c36(0x271)]?.['message']??_0x1ffcb5[_0x26c36(0x271)]):null]);return JSON['stringify']([!!_0x58c2e7['participate'],_0x53f059]);}function _0x420dff({workers:_0x32afe7,makeOkdb:_0x3ce0a3,port:_0x11ae5e,primaryOkdb:_0x221521,childEntry:childEntry=![],workerEnv:workerEnv=null,workerRole:workerRole=null,listenAddr:listenAddr=null}={}){const _0x3e3ab6=_0x327833;if(_0xd1ee7['isPrimary'])return childEntry&&_0xd1ee7[_0x3e3ab6(0xea)]({'exec':_0x397d20[_0x3e3ab6(0x139)](__dirname,'okdb-http-worker-child.js'),'args':[],'execArgv':((()=>{const _0x29a45d=_0x3e3ab6,_0x197a51=[];for(let _0x2a9953=0x0;_0x2a9953<process[_0x29a45d(0x698)][_0x29a45d(0x249)];_0x2a9953++){const _0x526b94=process['execArgv'][_0x2a9953];if(_0x526b94['startsWith']('--test')||_0x526b94[_0x29a45d(0x334)]('--watch')||_0x526b94[_0x29a45d(0x334)](_0x29a45d(0x4a8)))continue;if(_0x526b94==='-e'||_0x526b94===_0x29a45d(0xae)||_0x526b94==='-p'||_0x526b94===_0x29a45d(0x163)){_0x2a9953++;continue;}_0x197a51[_0x29a45d(0x39b)](_0x526b94);}return _0x197a51;})())}),_0x219b6b({'workers':_0x32afe7,'port':_0x11ae5e,'primaryOkdb':_0x221521,'workerEnv':workerEnv,'workerRole':workerRole,'listenAddr':listenAddr??':'+_0x11ae5e});return _0x3a08a3({'makeOkdb':_0x3ce0a3,'port':_0x11ae5e});}function _0x219b6b({workers:_0x4328cc,port:_0x48b6f4,primaryOkdb:_0x222e7f,workerEnv:_0x154367,workerRole:_0x275fa2,listenAddr:_0xf1b5b4}){const _0xf441c6=_0x327833,_0x32826a=new Map(),_0x5e63e2=new Map();let _0x3a6753=![];const _0xf5bb65=_0x25840d=>_0x25840d?.[_0xf441c6(0x58c)],_0x5c5326=_0x12bdea=>{const _0x5d8c69=_0xf441c6,_0x4afc85=_0xd1ee7[_0x5d8c69(0x608)]({...process.env,..._0x154367||{},'OKDB_CLUSTER_SLOT':String(_0x12bdea)});return _0x4afc85[_0x5d8c69(0x58c)]=_0x12bdea,_0x32826a[_0x5d8c69(0x494)](_0x4afc85[_0x5d8c69(0x4c9)]['pid'],{'worker':_0x4afc85,'startedAt':Date[_0x5d8c69(0x28a)](),'slot':_0x12bdea}),_0x4afc85['on'](_0x5d8c69(0x271),_0x174d28=>{const _0x41c737=_0x5d8c69;console['log'](_0x41c737(0x672)+_0x4afc85['process']['pid']+_0x41c737(0x421)+(_0x174d28?.[_0x41c737(0x5a3)]??_0x174d28));}),_0x4afc85['on'](_0x5d8c69(0x3cc),()=>_0x370414()),_0x4afc85;},_0x5b32d7=_0x217165=>{const _0x206fe2=_0xf441c6;for(const {worker:_0x2fc123}of _0x32826a[_0x206fe2(0x5b1)]()){if(_0x2fc123[_0x206fe2(0x4a2)]()||!_0x2fc123['isConnected']())continue;try{_0x2fc123[_0x206fe2(0x401)](_0x217165);}catch{}}};_0x222e7f?.['_activateProcesses']?.({'kind':'primary','listenAddr':_0xf1b5b4})[_0xf441c6(0x4ec)](()=>{}),_0x222e7f?.['processes']?.[_0xf441c6(0x614)]?.({'workersConfigured':_0x4328cc});const _0x50db69={'engines':!![],'processors':!![],'compaction':!![],..._0x275fa2,'http':!![]},_0x370414=()=>{const _0x257b9d=_0xf441c6,_0x3af50a=_0x222e7f?.['processes'];if(!_0x3af50a||!_0x3af50a['_isWriter'])return;const _0x2b9691=_0x3af50a[_0x257b9d(0x177)];for(const {worker:_0x32e753,startedAt:_0x375bb3,slot:_0x3bf7fc,stats:_0x3f5195,processing:_0x5beb2e}of _0x32826a[_0x257b9d(0x5b1)]()){if(_0x32e753[_0x257b9d(0x4a2)]())continue;const _0x4f9b1f=_0x3af50a[_0x257b9d(0x3df)]?.()&&_0x3af50a['getDesired'](_0x257b9d(0x56e),_0x27f73e(_0x3bf7fc))?.['decommission']===!![];_0x3af50a[_0x257b9d(0x662)]({'pid':_0x32e753['process'][_0x257b9d(0x5ca)],'startedAt':_0x375bb3,'kind':_0x257b9d(0x513),'supervisorKey':_0x2b9691,'slot':_0x3bf7fc,'slotKey':_0x27f73e(_0x3bf7fc),'role':_0x50db69,'listenAddr':_0xf1b5b4,'lifecycle':_0x4f9b1f?_0x257b9d(0x54c):_0x257b9d(0x599),'processing':_0x5beb2e??null,'stats':_0x3f5195??null})[_0x257b9d(0x4ec)](()=>{});}},_0x27f73e=_0x212330=>_0x4230c3('cluster:'+_0x48b6f4,_0x212330),_0xed0af4=_0x6bfee1=>{const _0x4f042a=_0xf441c6,_0x339e17=_0x222e7f?.['processes'];if(!_0x339e17?.['hasDesired']?.())return![];return _0x339e17[_0x4f042a(0x305)](_0x4f042a(0x56e),_0x27f73e(_0x6bfee1))?.['decommission']===!![];};for(let _0x4f028d=0x0;_0x4f028d<_0x4328cc;_0x4f028d++){const _0x1489ef=_0xed0af4(_0x4f028d);_0x5e63e2['set'](_0x4f028d,{'deaths':[],'consecutiveFailures':0x0,'dead':_0x1489ef,'respawnTimer':null}),_0x1489ef?console[_0xf441c6(0x116)](_0xf441c6(0x5a2)+_0x4f028d+_0xf441c6(0x1a4)):_0x5c5326(_0x4f028d);}const _0x1019be=()=>{const _0x366c42=_0xf441c6,_0x12a9de=_0x222e7f?.[_0x366c42(0xa0)];if(!_0x12a9de?.[_0x366c42(0x2d2)]||!_0x12a9de[_0x366c42(0x3df)]?.())return;for(const [_0x2ac0d6,_0x57efc8]of _0x5e63e2[_0x366c42(0x707)]()){const _0x4d4d17=_0x12a9de[_0x366c42(0x305)]('slot',_0x27f73e(_0x2ac0d6)),_0x3d66bf=_0x4d4d17?.['decommission']===!![],_0x17bf2c=_0x4d4d17?.['kill']===!![];if(_0x3d66bf&&!_0x57efc8[_0x366c42(0xc1)]){_0x57efc8[_0x366c42(0xc1)]=!![];_0x57efc8[_0x366c42(0x56b)]&&(clearTimeout(_0x57efc8[_0x366c42(0x56b)]),_0x57efc8['respawnTimer']=null);for(const {worker:_0x14f338}of _0x32826a[_0x366c42(0x5b1)]()){if(_0xf5bb65(_0x14f338)!==_0x2ac0d6||_0x14f338[_0x366c42(0x4a2)]())continue;try{if(_0x17bf2c)_0x14f338[_0x366c42(0x4c9)][_0x366c42(0x73d)](_0x366c42(0x64a));else _0x14f338[_0x366c42(0x36c)]()&&_0x14f338['disconnect']();}catch{}}console[_0x366c42(0x116)](_0x366c42(0x67f)+(_0x17bf2c?_0x366c42(0x6d6):_0x366c42(0x42c))+_0x366c42(0x323)+_0x2ac0d6+_0x366c42(0xc8));}else{if(!_0x3d66bf&&_0x57efc8[_0x366c42(0xc1)]&&_0x4d4d17){_0x57efc8[_0x366c42(0xc1)]=![],_0x57efc8[_0x366c42(0x6a0)]=[],_0x57efc8[_0x366c42(0x126)]=0x0;const _0x15fc5b=[..._0x32826a[_0x366c42(0x5b1)]()][_0x366c42(0x696)](({worker:_0x5df105})=>_0xf5bb65(_0x5df105)===_0x2ac0d6&&!_0x5df105[_0x366c42(0x4a2)]());!_0x15fc5b&&!_0x3a6753&&(_0x5c5326(_0x2ac0d6),console[_0x366c42(0x116)]('[okdb-cluster]\x20recommissioned\x20worker\x20slot='+_0x2ac0d6));}}}},_0x1d3b34=()=>{try{_0x1019be();}catch{}};_0x222e7f?.[_0xf441c6(0x5ce)]?.['on']?.(_0x45b729[_0xf441c6(0x430)],_0x1d3b34);const _0xd4f931=[];if(_0x222e7f?.[_0xf441c6(0x5ce)]?.['on'])for(const _0x5df832 of _0x1a4a39){const _0x593936=_0xdeaacf=>{_0x5b32d7({[_0x2fd4ab]:_0x1c3153,'event':_0x5df832,'data':_0xdeaacf??{}});};_0x222e7f[_0xf441c6(0x5ce)]['on'](_0x5df832,_0x593936),_0xd4f931[_0xf441c6(0x39b)]({'event':_0x5df832,'handler':_0x593936});}const _0x56fac7=setInterval(()=>{_0x1019be(),_0x370414();},_0x48e12b);_0x56fac7[_0xf441c6(0x1b3)]?.();const _0x4cb8df=(_0x573669,_0xdd5377)=>{const _0x19652a=_0xf441c6;if(!_0xdd5377||typeof _0xdd5377!==_0x19652a(0x245)||_0xdd5377[_0x2fd4ab]!==_0x4e4578)return;if(!_0x222e7f?.[_0x19652a(0x116)]?.[_0x19652a(0x350)])return;const _0x33edc2=_0xdd5377[_0x19652a(0x295)]||{};_0x222e7f[_0x19652a(0x116)][_0x19652a(0x350)]({..._0x33edc2,'msg':'[w'+_0xdd5377[_0x19652a(0x56e)]+']\x20'+(_0x33edc2['msg']??''),'meta':{..._0x33edc2['meta']||{},'worker':_0xdd5377['slot'],'workerPid':_0xdd5377[_0x19652a(0x5ca)]}});};_0xd1ee7['on'](_0xf441c6(0x5a3),_0x4cb8df);const _0x2b33c6=(_0x537ed4,_0xde77e9)=>{const _0x397ede=_0xf441c6;if(!_0xde77e9||typeof _0xde77e9!==_0x397ede(0x245)||_0xde77e9[_0x2fd4ab]!==_0x2b87b1)return;const _0x5089d7=_0x32826a[_0x397ede(0x1ed)](_0x537ed4[_0x397ede(0x4c9)][_0x397ede(0x5ca)]);if(_0x5089d7){_0x5089d7[_0x397ede(0x5f4)]={..._0xde77e9[_0x397ede(0x5f4)],'at':Date[_0x397ede(0x28a)]()};if(_0xde77e9[_0x397ede(0x81)]!==undefined){const _0x506d5b=_0x54d2d0(_0xde77e9[_0x397ede(0x81)]);_0x506d5b!==_0x5089d7[_0x397ede(0xa5)]&&(_0x5089d7['processingSig']=_0x506d5b,_0x36ee95()),_0x5089d7['processing']=_0xde77e9[_0x397ede(0x81)];}}};let _0x4be30a=null;const _0x36ee95=()=>{if(_0x4be30a||_0x3a6753)return;_0x4be30a=setTimeout(()=>{_0x4be30a=null;if(!_0x3a6753)_0x370414();},_0x39fb48),_0x4be30a['unref']?.();};_0xd1ee7['on'](_0xf441c6(0x5a3),_0x2b33c6),_0xd1ee7['on'](_0xf441c6(0x719),(_0x2a4f36,_0x4b89f3,_0x4a6cf8)=>{const _0x4b68c7=_0xf441c6,_0x4c54f4=_0x2a4f36[_0x4b68c7(0x4c9)][_0x4b68c7(0x5ca)],_0xc7ae3a=_0xf5bb65(_0x2a4f36),_0x57c061=_0x32826a[_0x4b68c7(0x1ed)](_0x4c54f4);if(_0x57c061&&_0x222e7f?.[_0x4b68c7(0xa0)])_0x222e7f['processes']['removeNode'](_0x4c54f4+':'+_0x57c061[_0x4b68c7(0x594)])[_0x4b68c7(0x4ec)](()=>{});_0x32826a[_0x4b68c7(0x495)](_0x4c54f4),console[_0x4b68c7(0x116)](_0x4b68c7(0x672)+_0x4c54f4+_0x4b68c7(0x685)+(_0xc7ae3a??'?')+')\x20exited\x20'+(_0x4b68c7(0x1f1)+_0x4b89f3+_0x4b68c7(0x5d2)+(_0x4a6cf8??'none')+_0x4b68c7(0x32f)+_0x32826a['size']+_0x4b68c7(0x66d))),_0x370414();if(_0x3a6753||_0xc7ae3a==null)return;const _0x3304ed=_0x5e63e2[_0x4b68c7(0x1ed)](_0xc7ae3a);if(!_0x3304ed||_0x3304ed[_0x4b68c7(0xc1)])return;const _0x504e84=Date[_0x4b68c7(0x28a)]();_0x3304ed['deaths'][_0x4b68c7(0x39b)](_0x504e84),_0x3304ed[_0x4b68c7(0x6a0)]=_0x3304ed[_0x4b68c7(0x6a0)][_0x4b68c7(0x69e)](_0x465a0b=>_0x504e84-_0x465a0b<=_0x250c24);if(_0x3304ed[_0x4b68c7(0x6a0)][_0x4b68c7(0x249)]>=_0x13736f){_0x3304ed['dead']=!![],console['error'](_0x4b68c7(0x2ee)+_0xc7ae3a+'\x20died\x20'+_0x3304ed[_0x4b68c7(0x6a0)]['length']+'\x20times\x20in\x20'+(_0x250c24+_0x4b68c7(0x13d)+_0x32826a[_0x4b68c7(0xd1)]+_0x4b68c7(0x54f)));return;}_0x3304ed[_0x4b68c7(0x126)]++;const _0x13f29e=Math[_0x4b68c7(0x4b1)](_0x3f234d,_0x454daf*0x2**(_0x3304ed[_0x4b68c7(0x126)]-0x1));console[_0x4b68c7(0x116)](_0x4b68c7(0x24c)+_0xc7ae3a+_0x4b68c7(0x6f0)+_0x13f29e+'ms\x20(attempt\x20'+_0x3304ed[_0x4b68c7(0x126)]+')'),_0x3304ed[_0x4b68c7(0x56b)]=setTimeout(()=>{const _0x1c14c7=_0x4b68c7;_0x3304ed[_0x1c14c7(0x56b)]=null;if(_0x3a6753||_0x3304ed[_0x1c14c7(0xc1)])return;const _0x46f675=_0x5c5326(_0xc7ae3a);_0x46f675['once']('listening',()=>{const _0x4b6ed2=_0x1c14c7;if(_0x5e63e2[_0x4b6ed2(0x1ed)](_0xc7ae3a)===_0x3304ed)_0x3304ed['consecutiveFailures']=0x0;});},_0x13f29e),_0x3304ed['respawnTimer']['unref']?.();});const _0x43ac19=[..._0x32826a[_0xf441c6(0x2b3)]()];console[_0xf441c6(0x116)](_0xf441c6(0x58f)+process['pid']+'\x20forked\x20'+_0x4328cc+'\x20HTTP\x20server(s)\x20on\x20port\x20'+_0x48b6f4+':\x20'+('['+_0x43ac19[_0xf441c6(0x139)](',\x20')+']'));const _0x13341c={'_isClusterController':!![],'port':_0x48b6f4,'primaryOkdb':_0x222e7f??null,'status'(){const _0x40e26c=_0xf441c6;return{'clustered':!![],'primaryPid':process[_0x40e26c(0x5ca)],'port':_0x48b6f4,'primaryRole':_0x222e7f?.['role']??null,'processorPid':null,'supervisorPid':process['pid'],'workers':[..._0x32826a['values']()]['map'](({worker:_0x1ae2e1})=>({'pid':_0x1ae2e1[_0x40e26c(0x4c9)][_0x40e26c(0x5ca)],'id':_0x1ae2e1['id'],'dead':_0x1ae2e1[_0x40e26c(0x4a2)]()}))};},async 'close'(){const _0x401559=_0xf441c6;_0x3a6753=!![];for(const _0x551f75 of _0x5e63e2['values']()){_0x551f75[_0x401559(0xc1)]=!![],_0x551f75[_0x401559(0x56b)]&&(clearTimeout(_0x551f75[_0x401559(0x56b)]),_0x551f75['respawnTimer']=null);}clearInterval(_0x56fac7);_0x4be30a&&(clearTimeout(_0x4be30a),_0x4be30a=null);_0xd1ee7[_0x401559(0x14d)]('message',_0x4cb8df),_0xd1ee7[_0x401559(0x14d)](_0x401559(0x5a3),_0x2b33c6),_0x222e7f?.['events']?.['off']?.(_0x45b729[_0x401559(0x430)],_0x1d3b34);if(_0x222e7f?.[_0x401559(0x5ce)]?.[_0x401559(0x14d)])for(const {event:_0x17aa72,handler:_0x2a72fa}of _0xd4f931){try{_0x222e7f[_0x401559(0x5ce)]['off'](_0x17aa72,_0x2a72fa);}catch{}}_0xd4f931[_0x401559(0x249)]=0x0;const _0x40cde1=[..._0x32826a[_0x401559(0x5b1)]()]['map'](({worker:_0x142be5})=>_0x142be5);if(_0x40cde1[_0x401559(0x249)]===0x0)return;await Promise['all'](_0x40cde1['map'](_0x1ccef4=>new Promise(_0x111fcd=>{const _0x1ce610=_0x401559;if(_0x1ccef4[_0x1ce610(0x4a2)]()){_0x111fcd();return;}let _0xb4eace=![];const _0x29a3a0=()=>{if(_0xb4eace)return;_0xb4eace=!![];if(_0x2a62b1)clearTimeout(_0x2a62b1);_0x111fcd();};_0x1ccef4[_0x1ce610(0x572)](_0x1ce610(0x719),_0x29a3a0);const _0x2a62b1=setTimeout(()=>{const _0x49b53c=_0x1ce610;try{_0x1ccef4[_0x49b53c(0x4c9)][_0x49b53c(0x73d)]();}catch{}},_0x344d40+0x1f4);_0x2a62b1['unref']?.();try{_0x1ccef4[_0x1ce610(0x202)]();}catch{try{_0x1ccef4['process'][_0x1ce610(0x73d)]();}catch{}}})));}};return _0x13341c;}async function _0x3a08a3({makeOkdb:_0x5e9a33,port:_0x2c880c}){const _0x1f5b9a=_0x327833,_0x2f9435=await _0x5e9a33();return _0x3c1b2c(_0x2f9435),_0x2f9435[_0x1f5b9a(0x57f)][_0x1f5b9a(0x4ce)](_0x2c880c);}function _0x3c1b2c(_0x1ceec3){const _0xd8e07c=_0x327833;if(!_0x1ceec3||_0x1ceec3[_0xd8e07c(0x2d8)])return;_0x1ceec3[_0xd8e07c(0x2d8)]=!![];try{const {OKDBChangefeed:_0x2aee21}=requireOkdbChangefeed(),_0x4aef6c=_0x1ceec3[_0xd8e07c(0x44f)];if(_0x4aef6c&&typeof _0x4aef6c[_0xd8e07c(0x36a)]===_0xd8e07c(0x2be)){const _0x42b4bf=new _0x2aee21(_0x1ceec3);_0x42b4bf[_0xd8e07c(0x15c)](),_0x4aef6c['attachFeed'](_0x42b4bf),_0x1ceec3[_0xd8e07c(0x5a0)]=_0x42b4bf;}}catch(_0x5ccabf){_0x1ceec3[_0xd8e07c(0x116)]?.[_0xd8e07c(0x14c)]?.('[okdb-cluster]\x20change-feed\x20init\x20failed:\x20'+(_0x5ccabf?.['message']??_0x5ccabf),{'feature':_0xd8e07c(0x6fd)});}const _0x209682=_0x5af61f=>{const _0x4e4946=_0xd8e07c;if(!_0x5af61f||typeof _0x5af61f!=='object'||_0x5af61f[_0x2fd4ab]==null)return;if(_0x5af61f[_0x2fd4ab]===_0x1c3153)try{_0x1ceec3[_0x4e4946(0x44f)]?.[_0x4e4946(0x69c)]?.(_0x5af61f[_0x4e4946(0x311)],_0x5af61f[_0x4e4946(0x527)]);}catch{}};process['on'](_0xd8e07c(0x5a3),_0x209682),_0x1ceec3[_0xd8e07c(0x435)]=_0x209682;{let _0x36143b=process[_0xd8e07c(0x19e)](),_0x97939=Date['now']();const _0x4444a5=()=>{const _0x503b34=_0xd8e07c;if(typeof process[_0x503b34(0x401)]!==_0x503b34(0x2be)||!process['connected'])return;const _0x1a60ba=Date['now'](),_0x14f857=process[_0x503b34(0x19e)](),_0xd0c28e=(_0x1a60ba-_0x97939)*0x3e8,_0x2d858f=_0x14f857[_0x503b34(0x3c6)]-_0x36143b['user']+(_0x14f857[_0x503b34(0x702)]-_0x36143b[_0x503b34(0x702)]),_0x34d58d=_0xd0c28e>0x0?Math[_0x503b34(0x4b1)](0x64,Math[_0x503b34(0x336)](_0x2d858f/(_0xd0c28e*(_0x41c595[_0x503b34(0x2c6)]()[_0x503b34(0x249)]||0x1))*0x64)):0x0;_0x36143b=_0x14f857,_0x97939=_0x1a60ba;const _0x1f912a=process[_0x503b34(0x153)]();let _0x4e9a51=null;try{_0x4e9a51=_0x1ceec3[_0x503b34(0x1bb)]?.['processors']?_0x1ceec3['processes']?.[_0x503b34(0x4a0)]?.()??null:null;}catch{}try{process[_0x503b34(0x401)]({[_0x2fd4ab]:_0x2b87b1,'stats':{'rss':_0x1f912a['rss'],'heapUsed':_0x1f912a[_0x503b34(0x66c)],'heapTotal':_0x1f912a['heapTotal'],'external':_0x1f912a[_0x503b34(0x35f)],'cpuPct':_0x34d58d,'cpuWindowMs':Math[_0x503b34(0x336)](_0xd0c28e/0x3e8)||null},'processing':_0x4e9a51});}catch{}},_0x52975c=Math[_0xd8e07c(0x234)](0x3e8,Number(process.env.OKDB_STATS_INTERVAL_MS)||0x1388),_0x151d71=setInterval(_0x4444a5,_0x52975c);_0x151d71[_0xd8e07c(0x1b3)]?.(),_0x4444a5();for(const _0x14d612 of[_0xd8e07c(0x3b1),_0xd8e07c(0x460)]){_0x1ceec3['events']?.['on']?.(_0x14d612,()=>{try{_0x4444a5();}catch{}});}}let _0x207007=![];const _0x3da16e=async _0x580eb5=>{const _0x570286=_0xd8e07c;if(_0x207007)return;_0x207007=!![];const _0x1d9260=setTimeout(()=>process[_0x570286(0x719)](_0x580eb5),_0x344d40);_0x1d9260[_0x570286(0x1b3)]?.();try{await _0x1ceec3[_0x570286(0x5b2)]?.();}catch{}process[_0x570286(0x719)](_0x580eb5);};process['on']('disconnect',()=>_0x3da16e(0x0));if(process[_0xd8e07c(0x52c)]!==_0xd8e07c(0x157)){const _0x2d326f=setInterval(()=>{const _0x1e85c7=_0xd8e07c;if(process[_0x1e85c7(0x237)]===0x1)_0x3da16e(0x0);},_0x1425ef);_0x2d326f[_0xd8e07c(0x1b3)]?.(),_0x1ceec3[_0xd8e07c(0x61d)]=_0x2d326f;}}return okdbCluster={'runClustered':_0x420dff,'attachWorkerCluster':_0x3c1b2c},okdbCluster;}var okdbHttp={'exports':{}},okdbMetrics,hasRequiredOkdbMetrics;function requireOkdbMetrics(){const _0x42e390=_0x563deb;if(hasRequiredOkdbMetrics)return okdbMetrics;hasRequiredOkdbMetrics=0x1;const _0x2aaf14=0x3c;function _0x33e121(){return{'requests':0x0,'reads':0x0,'writes':0x0,'errors':0x0,'readMs':0x0,'writeMs':0x0};}class _0x4e2d28{constructor(){const _0x59ddc1=_0x3dbc;this[_0x59ddc1(0x1d9)]=0x0,this[_0x59ddc1(0x5f3)]=0x0,this['_totalWrites']=0x0,this[_0x59ddc1(0x65c)]=0x0,this[_0x59ddc1(0x64f)]=0x0,this[_0x59ddc1(0x13c)]=0x0,this[_0x59ddc1(0x35c)]=Array[_0x59ddc1(0x4f7)]({'length':_0x2aaf14},_0x33e121),this['_bucketIdx']=0x0,this['_lastTick']=Date[_0x59ddc1(0x28a)](),this['_timer']=setInterval(()=>this[_0x59ddc1(0x6cf)](),0x3e8);if(this['_timer']['unref'])this[_0x59ddc1(0x507)][_0x59ddc1(0x1b3)]();}[_0x42e390(0x6cf)](){const _0x29d299=_0x42e390;this[_0x29d299(0x6be)]=(this['_bucketIdx']+0x1)%_0x2aaf14,this['_buckets'][this[_0x29d299(0x6be)]]=_0x33e121(),this[_0x29d299(0x1dc)]=Date[_0x29d299(0x28a)]();}[_0x42e390(0x3db)](_0x2a24f2,_0x54f5a4,_0x408a96){const _0x28c836=_0x42e390,_0x276040=/^(POST|PUT|PATCH|DELETE)$/i[_0x28c836(0x3b6)](_0x2a24f2),_0x568eb0=this[_0x28c836(0x35c)][this[_0x28c836(0x6be)]];this[_0x28c836(0x1d9)]++,_0x568eb0[_0x28c836(0x1cd)]++,_0x408a96&&(this[_0x28c836(0x65c)]++,_0x568eb0['errors']++),_0x276040?(this[_0x28c836(0x2f0)]++,this[_0x28c836(0x13c)]+=_0x54f5a4,_0x568eb0[_0x28c836(0x57a)]++,_0x568eb0[_0x28c836(0x212)]+=_0x54f5a4):(this[_0x28c836(0x5f3)]++,this[_0x28c836(0x64f)]+=_0x54f5a4,_0x568eb0[_0x28c836(0x30c)]++,_0x568eb0[_0x28c836(0x5ba)]+=_0x54f5a4);}['stats'](){const _0x1edb65=_0x42e390;let _0x3a9b25=0x0,_0x2de626=0x0,_0x2a4231=0x0,_0x16abc9=0x0,_0x1decdb=0x0,_0x17bb31=0x0;for(const _0xdf101e of this['_buckets']){_0x3a9b25+=_0xdf101e[_0x1edb65(0x1cd)],_0x2de626+=_0xdf101e[_0x1edb65(0x30c)],_0x2a4231+=_0xdf101e[_0x1edb65(0x57a)],_0x16abc9+=_0xdf101e[_0x1edb65(0x2e4)],_0x1decdb+=_0xdf101e[_0x1edb65(0x5ba)],_0x17bb31+=_0xdf101e[_0x1edb65(0x212)];}const _0x20b8d4=_0x2aaf14;return{'lifetime':{'requests':this['_totalRequests'],'reads':this[_0x1edb65(0x5f3)],'writes':this[_0x1edb65(0x2f0)],'errors':this[_0x1edb65(0x65c)],'avgReadMs':this['_totalReads']>0x0?+(this[_0x1edb65(0x64f)]/this[_0x1edb65(0x5f3)])[_0x1edb65(0x6c3)](0x2):null,'avgWriteMs':this[_0x1edb65(0x2f0)]>0x0?+(this[_0x1edb65(0x13c)]/this['_totalWrites'])[_0x1edb65(0x6c3)](0x2):null},'window':{'seconds':_0x20b8d4,'requests':_0x3a9b25,'reads':_0x2de626,'writes':_0x2a4231,'errors':_0x16abc9,'reqPerSec':+(_0x3a9b25/_0x20b8d4)[_0x1edb65(0x6c3)](0x2),'readPerSec':+(_0x2de626/_0x20b8d4)[_0x1edb65(0x6c3)](0x2),'writePerSec':+(_0x2a4231/_0x20b8d4)[_0x1edb65(0x6c3)](0x2),'avgReadMs':_0x2de626>0x0?+(_0x1decdb/_0x2de626)[_0x1edb65(0x6c3)](0x2):null,'avgWriteMs':_0x2a4231>0x0?+(_0x17bb31/_0x2a4231)[_0x1edb65(0x6c3)](0x2):null}};}['close'](){const _0x2b38b3=_0x42e390;clearInterval(this[_0x2b38b3(0x507)]);}}return okdbMetrics=_0x4e2d28,okdbMetrics;}var okdbAuthNamespaces,hasRequiredOkdbAuthNamespaces;function requireOkdbAuthNamespaces(){const _0x13afc6=_0x563deb;if(hasRequiredOkdbAuthNamespaces)return okdbAuthNamespaces;hasRequiredOkdbAuthNamespaces=0x1;const _0x13c4a0={'data':{'label':_0x13afc6(0x1b8),'scope':_0x13afc6(0x215),'description':_0x13afc6(0x61e),'operations':{'read':{'label':_0x13afc6(0x133),'summary':_0x13afc6(0x351)},'write':{'label':_0x13afc6(0x3a8),'summary':_0x13afc6(0x37c)}}},'schema':{'label':_0x13afc6(0x348),'scope':_0x13afc6(0x215),'description':'Type\x20definitions,\x20all\x20index\x20registrations\x20(byIndex,\x20FTS,\x20vector),\x20and\x20TTL\x20policy.','operations':{'read':{'label':_0x13afc6(0x133),'summary':_0x13afc6(0x3f0)},'write':{'label':'Write','summary':'Register/update/delete\x20types,\x20register/drop/rebuild\x20indexes,\x20set\x20TTL\x20policy.'}}},'search':{'label':_0x13afc6(0x187),'scope':_0x13afc6(0x215),'description':'Run\x20searches\x20against\x20registered\x20FTS\x20and\x20vector\x20indexes.','operations':{'query':{'label':_0x13afc6(0xab),'summary':_0x13afc6(0x71d)}}},'queue':{'label':'Queue','scope':_0x13afc6(0x215),'description':'Background\x20job\x20queue:\x20enqueue\x20work,\x20observe\x20state,\x20and\x20process\x20jobs.','operations':{'read':{'label':'Read','summary':_0x13afc6(0xca)},'write':{'label':'Write','summary':'Enqueue,\x20cancel,\x20retry,\x20remove\x20jobs;\x20manage\x20buckets;\x20reconcile\x20and\x20rebuild\x20stats.'},'work':{'label':_0x13afc6(0x636),'summary':_0x13afc6(0xb3)}}},'files':{'label':_0x13afc6(0x378),'scope':_0x13afc6(0x215),'description':'Blob\x20storage:\x20large\x20file\x20uploads\x20attached\x20to\x20records\x20or\x20stored\x20standalone.','operations':{'read':{'label':_0x13afc6(0x133),'summary':_0x13afc6(0x6ba)},'write':{'label':_0x13afc6(0x3a8),'summary':'Upload,\x20update\x20metadata,\x20and\x20delete\x20files.'}}},'functions':{'label':'Functions','scope':_0x13afc6(0x215),'description':_0x13afc6(0x4bc),'operations':{'read':{'label':'Read','summary':_0x13afc6(0x4d6)},'write':{'label':_0x13afc6(0x3a8),'summary':_0x13afc6(0x587)},'run':{'label':_0x13afc6(0x64c),'summary':_0x13afc6(0x550)}}},'views':{'label':_0x13afc6(0x59a),'scope':_0x13afc6(0x215),'description':_0x13afc6(0x52a),'operations':{'read':{'label':_0x13afc6(0x133),'summary':_0x13afc6(0x622)},'write':{'label':_0x13afc6(0x3a8),'summary':_0x13afc6(0x65e)}}},'env':{'label':_0x13afc6(0x37e),'scope':_0x13afc6(0x215),'description':_0x13afc6(0x425),'operations':{'read':{'label':'Read','summary':_0x13afc6(0x4b0)},'write':{'label':_0x13afc6(0x3a8),'summary':'Create,\x20delete,\x20and\x20compact\x20environments.'}}},'auth':{'label':'Auth','scope':_0x13afc6(0x702),'description':'API\x20tokens,\x20users,\x20and\x20credentials.','operations':{'read':{'label':_0x13afc6(0x133),'summary':_0x13afc6(0x6d3)},'write':{'label':_0x13afc6(0x3a8),'summary':_0x13afc6(0x228)}}},'system':{'label':_0x13afc6(0x324),'scope':_0x13afc6(0x702),'description':_0x13afc6(0x4e4),'operations':{'read':{'label':_0x13afc6(0x133),'summary':_0x13afc6(0x2d6)},'write':{'label':'Write','summary':'Pause/resume\x20processor,\x20trigger\x20backups,\x20restore.'}}},'sync':{'label':_0x13afc6(0x436),'scope':_0x13afc6(0x702),'description':_0x13afc6(0x1c1),'operations':{'read':{'label':_0x13afc6(0x133),'summary':_0x13afc6(0x1ae)},'write':{'label':_0x13afc6(0x3a8),'summary':'Register,\x20configure,\x20and\x20remove\x20cluster\x20peers.'},'peer':{'label':_0x13afc6(0x98),'summary':_0x13afc6(0x693),'machineOnly':!![]}}},'protected':{'label':_0x13afc6(0x3ab),'scope':'gate','description':_0x13afc6(0x186),'operations':{'read':{'label':_0x13afc6(0x133),'summary':'May\x20read\x20system\x20types\x20when\x20also\x20granted\x20the\x20underlying\x20read\x20permission.'},'write':{'label':_0x13afc6(0x3a8),'summary':'May\x20write\x20system\x20types\x20when\x20also\x20granted\x20the\x20underlying\x20write\x20permission.'}}}},_0x4728b3={'schema:read':[_0x13afc6(0x2e9),_0x13afc6(0x285),_0x13afc6(0x2a0)]},_0x2ba4c6=[_0x13afc6(0x6b4),'query',_0x13afc6(0xdf),'write','work','peer'];function _0x3bf807(){const _0x20fb86=_0x13afc6,_0x449281=[];for(const [_0x119754,_0x5b14c4]of Object[_0x20fb86(0x707)](_0x13c4a0)){for(const _0xb9f1d1 of Object[_0x20fb86(0x2b3)](_0x5b14c4[_0x20fb86(0x2ac)])){_0x449281['push'](_0x119754+':'+_0xb9f1d1);}}return _0x449281;}function _0x267d65(_0x4e39ae){return _0x13c4a0[_0x4e39ae]||null;}function _0x40c0d0(_0x511101,_0x330380){const _0x2abc4b=_0x13afc6;return _0x13c4a0[_0x511101]?.[_0x2abc4b(0x2ac)][_0x330380]||null;}return okdbAuthNamespaces={'NAMESPACES':_0x13c4a0,'IMPLIED_BY':_0x4728b3,'OP_ORDER':_0x2ba4c6,'listAllPermissions':_0x3bf807,'getNamespaceMeta':_0x267d65,'getOperationMeta':_0x40c0d0},okdbAuthNamespaces;}var okdbAuthPermissions,hasRequiredOkdbAuthPermissions;function requireOkdbAuthPermissions(){const _0x2933ce=_0x563deb;if(hasRequiredOkdbAuthPermissions)return okdbAuthPermissions;hasRequiredOkdbAuthPermissions=0x1;const {IMPLIED_BY:_0x3dee0e}=requireOkdbAuthNamespaces(),_0x481cc8=new Set([_0x2933ce(0x6b4),_0x2933ce(0xb5)]);function _0x1f1a1c(_0x58df67,_0x557a63){const _0x1d3e37=_0x2933ce;if(!Array[_0x1d3e37(0x17b)](_0x58df67)||_0x58df67['length']===0x0)return![];for(const _0x32fd10 of _0x58df67){if(typeof _0x32fd10!==_0x1d3e37(0x242)||!_0x32fd10[_0x1d3e37(0x52b)](':')){if(_0x32fd10==='*')return!![];continue;}const [_0x4a8a0d,_0x1cbf87]=_0x32fd10[_0x1d3e37(0x48b)](':'),[_0x2a651f,_0x5d27ed]=_0x557a63['split'](':'),_0x19597d=_0x4a8a0d==='*'||_0x4a8a0d===_0x2a651f,_0x60cee0=_0x1cbf87==='*'||_0x1cbf87===_0x5d27ed;if(_0x19597d&&_0x60cee0)return!![];}const _0x38a450=_0x3dee0e[_0x557a63];if(_0x38a450)for(const _0x5b12f0 of _0x38a450){if(_0x1f1a1c(_0x58df67,_0x5b12f0))return!![];}return![];}function _0x43541f(_0x28054d,_0x38fc30){const _0x34ef76=_0x2933ce,_0x22c5bb=new Set();if(Array[_0x34ef76(0x17b)](_0x28054d)){for(const _0x5d1dfc of _0x28054d)_0x22c5bb['add'](_0x5d1dfc);}if(Array[_0x34ef76(0x17b)](_0x38fc30)){for(const _0x26c996 of _0x38fc30)_0x22c5bb[_0x34ef76(0x32e)](_0x26c996);}return Array[_0x34ef76(0x4f7)](_0x22c5bb);}function _0x1af9ee(_0x478d9f){const _0x58f97f=_0x2933ce;if(typeof _0x478d9f!==_0x58f97f(0x242))return![];const [,_0x583574]=_0x478d9f['split'](':');return _0x481cc8[_0x58f97f(0xe5)](_0x583574);}function _0x207937(_0x465a7b){const _0x354e7f=_0x2933ce;return _0x1af9ee(_0x465a7b)?'protected:read':_0x354e7f(0x5c1);}function _0xe08b32(_0xc0b72c,_0xaf5f1f){const _0x47b227=_0x2933ce;return _0x43541f(_0xc0b72c['permissions']||[],_0xaf5f1f?(_0xc0b72c[_0x47b227(0x292)]||{})[_0xaf5f1f]||[]:[]);}function _0xdba046(_0x5e64d8){const _0x277241=_0x2933ce,_0x333d2d=[];for(const _0x5284ce of _0x5e64d8[_0x277241(0x80)]()){const _0x3d35f9=_0x5284ce[_0x277241(0x25b)]?.['access'];if(!_0x3d35f9)continue;_0x3d35f9[_0x277241(0x5d1)]&&!_0x3d35f9['permission']&&_0x333d2d['push'](_0x5284ce[_0x277241(0x1d4)]+'\x20'+_0x5284ce[_0x277241(0x5a4)]+_0x277241(0x736)+(_0x5284ce[_0x277241(0x25b)]['id']??'?')+')');}if(_0x333d2d['length'])throw new Error(_0x277241(0x447)+_0x333d2d[_0x277241(0x139)](_0x277241(0x552)));}return okdbAuthPermissions={'hasPermission':_0x1f1a1c,'unionPermissions':_0x43541f,'isReadOperation':_0x1af9ee,'resolveProtectedGate':_0x207937,'getEffectivePermissions':_0xe08b32,'assertEveryRouteHasPermission':_0xdba046},okdbAuthPermissions;}var okdbJwtUtils,hasRequiredOkdbJwtUtils;function requireOkdbJwtUtils(){if(hasRequiredOkdbJwtUtils)return okdbJwtUtils;hasRequiredOkdbJwtUtils=0x1;const _0x3a383f=require$$0$7,_0x1b8cd1=require$$1$2,_0x178378=require$$2$1;function _0x514799(_0x2f7bc4){const _0x56322a=_0x3dbc,_0x411cf9=String(_0x2f7bc4||'')[_0x56322a(0x176)](/-/g,'+')[_0x56322a(0x176)](/_/g,'/'),_0x3514fc=_0x411cf9+'='[_0x56322a(0x38d)]((0x4-(_0x411cf9['length']%0x4||0x4))%0x4);return Buffer[_0x56322a(0x4f7)](_0x3514fc,_0x56322a(0x5f7));}function _0x4d68c1(_0x2fd10c){const _0xf9e715=_0x3dbc;if(typeof _0x2fd10c!==_0xf9e715(0x242))throw new Error(_0xf9e715(0x5a7));const _0x3be3a3=_0x2fd10c[_0xf9e715(0x48b)]('.');if(_0x3be3a3[_0xf9e715(0x249)]!==0x3)throw new Error(_0xf9e715(0x729));const [_0x4124af,_0x1bb9de,_0x113aa6]=_0x3be3a3,_0xce742e=JSON[_0xf9e715(0x2fd)](_0x514799(_0x4124af)[_0xf9e715(0x299)](_0xf9e715(0x714))),_0x47fdd5=JSON[_0xf9e715(0x2fd)](_0x514799(_0x1bb9de)['toString']('utf8'));return{'header':_0xce742e,'payload':_0x47fdd5,'signature':_0x514799(_0x113aa6),'signingInput':Buffer[_0xf9e715(0x4f7)](_0x4124af+'.'+_0x1bb9de),'encodedHeader':_0x4124af,'encodedPayload':_0x1bb9de};}function _0x15cae2(_0x5d6c09){const _0x153fd9=_0x3dbc;if(Array[_0x153fd9(0x17b)](_0x5d6c09))return _0x5d6c09;if(_0x5d6c09==null)return[];return[_0x5d6c09];}function _0x5308a3(_0x40c4f7){const _0x48e1e6=_0x3dbc,_0x5b8a50=String(_0x40c4f7||'')[_0x48e1e6(0x2ba)](/.{1,64}/g)||[];return _0x48e1e6(0x2da)+_0x5b8a50[_0x48e1e6(0x139)]('\x0a')+_0x48e1e6(0x2c1);}function _0x2819af(_0x19e94d={}){const _0x16967c=_0x3dbc;if(_0x19e94d[_0x16967c(0x4ef)]?.[0x0])return _0x178378[_0x16967c(0x404)](_0x5308a3(_0x19e94d[_0x16967c(0x4ef)][0x0]));return _0x178378['createPublicKey']({'key':_0x19e94d,'format':_0x16967c(0x443)});}function _0x585152(_0x5c629d,_0x38942e,_0x5e1b6d,_0x5d8824){const _0x133f95=_0x3dbc;if(_0x5c629d===_0x133f95(0xc0))return _0x178378[_0x133f95(0x445)](_0x133f95(0x3ad),_0x5e1b6d,_0x38942e,_0x5d8824);if(_0x5c629d===_0x133f95(0xd3))return _0x178378[_0x133f95(0x445)]('sha256',_0x5e1b6d,{'key':_0x38942e,'dsaEncoding':_0x133f95(0x4d8)},_0x5d8824);return![];}function _0x7aea60(_0xaf0650){const _0x2dd869=_0x3dbc;if(typeof commonjsGlobal[_0x2dd869(0x730)]===_0x2dd869(0x2be))return commonjsGlobal[_0x2dd869(0x730)](_0xaf0650,{'headers':{'accept':_0x2dd869(0x395)}})[_0x2dd869(0x722)](async _0x518dc=>{const _0x34c7d8=_0x2dd869;if(!_0x518dc['ok']){const _0x10b1d4=new Error(_0x34c7d8(0x15e)+_0x518dc[_0x34c7d8(0x54e)]+'\x20fetching\x20'+_0xaf0650);_0x10b1d4[_0x34c7d8(0x54e)]=_0x518dc[_0x34c7d8(0x54e)];throw _0x10b1d4;}return _0x518dc[_0x34c7d8(0x5f9)]();});return new Promise((_0x4a9f74,_0x320a55)=>{const _0x542bd4=_0x2dd869,_0x2707f8=String(_0xaf0650)[_0x542bd4(0x334)](_0x542bd4(0x42a))?_0x1b8cd1:_0x3a383f,_0x1af3e8=_0x2707f8[_0x542bd4(0x1ed)](_0xaf0650,{'headers':{'accept':'application/json'}},_0x3c983f=>{const _0x201601=_0x542bd4;let _0x50db46='';_0x3c983f[_0x201601(0x39a)]('utf8'),_0x3c983f['on']('data',_0x5a323f=>{_0x50db46+=_0x5a323f;}),_0x3c983f['on'](_0x201601(0x5aa),()=>{const _0x4ba3e0=_0x201601;if(_0x3c983f[_0x4ba3e0(0xe6)]<0xc8||_0x3c983f[_0x4ba3e0(0xe6)]>=0x12c){const _0x46b7d2=new Error('HTTP\x20'+_0x3c983f[_0x4ba3e0(0xe6)]+'\x20fetching\x20'+_0xaf0650);return _0x46b7d2[_0x4ba3e0(0x54e)]=_0x3c983f[_0x4ba3e0(0xe6)],_0x320a55(_0x46b7d2);}try{_0x4a9f74(JSON[_0x4ba3e0(0x2fd)](_0x50db46||'{}'));}catch(_0x759fa6){_0x320a55(_0x759fa6);}});});_0x1af3e8['on'](_0x542bd4(0x271),_0x320a55),_0x1af3e8[_0x542bd4(0x5aa)]();});}return okdbJwtUtils={'base64UrlDecode':_0x514799,'parseJwt':_0x4d68c1,'normalizeAudience':_0x15cae2,'normalizePemCertificate':_0x5308a3,'jwkToKeyObject':_0x2819af,'verifyJwtSignature':_0x585152,'fetchJson':_0x7aea60},okdbJwtUtils;}var hasRequiredOkdbHttp;function requireOkdbHttp(){const _0x23e96f=_0x563deb;if(hasRequiredOkdbHttp)return okdbHttp[_0x23e96f(0x5d5)];hasRequiredOkdbHttp=0x1;const _0x400df9=require$$0$7,{URL:_0x43ed2e}=require$$2$2,_0x1068e6=requireOkdbMetrics(),_0xd45579=requireOkdbAuthTokens(),{hasPermission:_0x5077c8,unionPermissions:_0x2d1906,resolveProtectedGate:_0x3a6b9e}=requireOkdbAuthPermissions(),_0x52c01d={0x190:_0x23e96f(0x83),0x191:_0x23e96f(0x150),0x193:'FORBIDDEN',0x194:_0x23e96f(0xe8),0x195:_0x23e96f(0x328),0x198:'REQUEST_TIMEOUT',0x199:'CONFLICT',0x19a:_0x23e96f(0x2c4),0x19b:'LENGTH_REQUIRED',0x19d:'PAYLOAD_TOO_LARGE',0x19f:'UNSUPPORTED_MEDIA_TYPE',0x1a6:_0x23e96f(0xe2),0x1ad:_0x23e96f(0x195),0x1f4:'INTERNAL_ERROR',0x1f5:_0x23e96f(0x59c),0x1f6:_0x23e96f(0x2f9),0x1f7:_0x23e96f(0x10f),0x1f8:_0x23e96f(0x740)},_0x4280ca={'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,'QUERY_OPERATOR_FORBIDDEN':0x190,'BUCKET_CONFIG_INVALID':0x190,'BUCKET_INVALID_TIME_VALUE':0x1a6,'BUCKET_PROJECT_NOT_PERSISTABLE':0x190,'BUCKET_PROJECT_UNKNOWN':0x190,'VIEW_UNKNOWN_REDUCER':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:_0x4aafa3,timingSafeEqual:_0x385d7b,parseBearer:_0x367e93,randomToken:_0x12e54f,issueToken:_0x42f7b4,authenticateToken:_0xfc399}=_0xd45579,{base64UrlDecode:_0x1aa194,parseJwt:_0x192dbd,normalizeAudience:_0x2d8187,normalizePemCertificate:_0x1d9336,jwkToKeyObject:_0x821b48,verifyJwtSignature:_0x32476b,fetchJson:_0x4ff148}=requireOkdbJwtUtils();function _0x6ddbf4(_0x259e1c){const _0x292012=_0x23e96f;return(_0x259e1c||_0x292012(0x704))[_0x292012(0x452)]();}function _0x2fc02a(_0x316341){const _0x5ca3e3=_0x23e96f;if(Array['isArray'](_0x316341))return _0x316341[_0x5ca3e3(0x6e1)](_0x2fc02a);return String(_0x316341||'')[_0x5ca3e3(0x48b)](',')[_0x5ca3e3(0x539)](_0x36b25f=>_0x36b25f[_0x5ca3e3(0x541)]())[_0x5ca3e3(0x69e)](Boolean);}function _0x35d929(..._0x1223cf){const _0x5c7a11=_0x23e96f;return[...new Set(_0x1223cf[_0x5c7a11(0x6e1)](_0x2fc02a))][_0x5c7a11(0x139)](',\x20');}function _0x43cc92(_0x54d4e2,_0x480937){const _0x58264f=_0x23e96f;if(!_0x54d4e2)return![];if(_0x480937==='*')return!![];if(_0x480937 instanceof RegExp)return _0x480937[_0x58264f(0x3b6)](_0x54d4e2);if(typeof _0x480937===_0x58264f(0x2be))return!!_0x480937(_0x54d4e2);if(Array[_0x58264f(0x17b)](_0x480937))return _0x480937['includes'](_0x54d4e2);return _0x480937===_0x54d4e2;}function _0x59e694(_0x6e59c9={},_0x43b9e1={},_0x2466f6=null){const _0x106367=_0x23e96f;if(!_0x43b9e1)return null;const _0x31eee1=_0x6e59c9[_0x106367(0x515)],_0x478791=_0x43b9e1['origins']??_0x43b9e1[_0x106367(0x515)]??'*',_0x550ae2=_0x478791==='*'?'*':_0x43cc92(_0x31eee1,_0x478791)?_0x31eee1:null;if(!_0x550ae2)return null;const _0x580c69=_0x6e59c9[_0x106367(0x182)],_0x4be212=_0x43b9e1[_0x106367(0x95)]??_0x43b9e1['allowHeaders']??[_0x106367(0x63a),_0x106367(0x620),_0x106367(0x110),'last-event-id','x-requested-with'],_0x298376=_0x43b9e1[_0x106367(0x4c6)]??_0x43b9e1[_0x106367(0x4fd)]??(_0x2466f6?[_0x2466f6,_0x106367(0x24e)]:['GET',_0x106367(0x502),_0x106367(0x24e)]),_0x3737cc=_0x43b9e1['exposeHeaders']??['mcp-session-id'],_0x20ba13={'access-control-allow-origin':_0x550ae2,'access-control-allow-methods':Array[_0x106367(0x17b)](_0x298376)?_0x298376['join'](',\x20'):String(_0x298376),'access-control-allow-headers':_0x580c69?_0x35d929(_0x4be212,_0x580c69):Array['isArray'](_0x4be212)?_0x4be212['join'](',\x20'):String(_0x4be212),'access-control-expose-headers':Array[_0x106367(0x17b)](_0x3737cc)?_0x3737cc[_0x106367(0x139)](',\x20'):String(_0x3737cc),'vary':_0x35d929(_0x106367(0x523),_0x550ae2==='*'?'':'Origin',_0x580c69?_0x106367(0x665):'')};if(_0x43b9e1[_0x106367(0xd6)])_0x20ba13[_0x106367(0x3b5)]='true';if(Number[_0x106367(0x314)](_0x43b9e1[_0x106367(0x3e1)]))_0x20ba13[_0x106367(0x1c5)]=String(_0x43b9e1[_0x106367(0x3e1)]);return _0x20ba13;}function _0x4e186b(_0x40650f){const _0x1c4c63=_0x23e96f,_0x54f4f5=[],_0x3adcf1={};let _0x5c18ab=![];_0x40650f[_0x1c4c63(0x518)]('/*')&&(_0x5c18ab=!![],_0x40650f=_0x40650f[_0x1c4c63(0x3e6)](0x0,-0x2),_0x54f4f5[_0x1c4c63(0x39b)]('*'));let _0xb41610=_0x40650f[_0x1c4c63(0x176)](/\/+$/,'')[_0x1c4c63(0x176)](/\[([^\]]*)\]/g,(_0x207b7f,_0xf26d80)=>{const _0x9a33db=_0x1c4c63,_0x2ef219=_0xf26d80['replace'](/\/:(\w+)(?:=([^/\]\s]*))?/g,(_0xed4138,_0x3db2c9,_0x6171a8)=>{const _0x5c7a33=_0x3dbc;_0x54f4f5['push'](_0x3db2c9);if(_0x6171a8!==undefined)_0x3adcf1[_0x3db2c9]=_0x6171a8;return _0x5c7a33(0x90);});return _0x9a33db(0x5b4)+_0x2ef219+')?';})['replace'](/\/:(\w+)/g,(_0x3fb4fe,_0x5c6d1d)=>{const _0x25e8a2=_0x1c4c63;return _0x54f4f5['push'](_0x5c6d1d),_0x25e8a2(0x90);});if(_0xb41610==='')_0xb41610='/';return{'keys':_0x54f4f5,'defaults':_0x3adcf1,'wildcard':_0x5c18ab,'regex':new RegExp(_0x5c18ab?'^'+_0xb41610+'(?:/(.*))?$':'^'+_0xb41610+'$')};}function _0x58fdce(_0x256053){const _0x20c8e8=_0x23e96f;if(_0x256053==null)return _0x256053;return JSON[_0x20c8e8(0x2fd)](JSON[_0x20c8e8(0x316)](_0x256053));}function _0x5b08e3(_0x37585f){const _0x11a9ea=_0x23e96f;if(_0x37585f==null)return null;if(_0x37585f[_0x11a9ea(0x563)]===_0x11a9ea(0x245)&&_0x37585f[_0x11a9ea(0xb8)]&&!Array['isArray'](_0x37585f['properties']))return _0x58fdce(_0x37585f);const _0xd678a2=Object['values'](_0x37585f),_0x20db2a=_0xd678a2[_0x11a9ea(0x249)]>0x0&&_0xd678a2[_0x11a9ea(0x4cd)](_0x3e93d8=>{const _0x14e22e=_0x11a9ea;return _0x3e93d8&&typeof _0x3e93d8===_0x14e22e(0x245)&&!Array[_0x14e22e(0x17b)](_0x3e93d8)&&(Object[_0x14e22e(0x33a)][_0x14e22e(0x296)][_0x14e22e(0x45a)](_0x3e93d8,_0x14e22e(0x563))||Object[_0x14e22e(0x33a)][_0x14e22e(0x296)][_0x14e22e(0x45a)](_0x3e93d8,_0x14e22e(0xb8))||Object['prototype'][_0x14e22e(0x296)]['call'](_0x3e93d8,_0x14e22e(0x4e1))||Object[_0x14e22e(0x33a)][_0x14e22e(0x296)]['call'](_0x3e93d8,_0x14e22e(0x34b)));});if(_0x20db2a)return{'type':_0x11a9ea(0x245),'properties':_0x58fdce(_0x37585f),'required':[],'additionalProperties':![]};const _0x579089={},_0x10b123=[];for(const [_0x10afd1,_0x1458d1]of Object['entries'](_0x37585f)){_0x579089[_0x10afd1]=_0x22cfdf(_0x1458d1);if(_0x1458d1!==null&&_0x1458d1!==undefined)_0x10b123[_0x11a9ea(0x39b)](_0x10afd1);}return{'type':'object','properties':_0x579089,'required':_0x10b123,'additionalProperties':![]};}function _0x22cfdf(_0x126547){const _0x3698de=_0x23e96f;if(_0x126547===null)return{'type':[_0x3698de(0x7e),_0x3698de(0x242),'number',_0x3698de(0x321),_0x3698de(0x245),_0x3698de(0x3d3)]};if(Array[_0x3698de(0x17b)](_0x126547))return{'type':_0x3698de(0x3d3),'items':_0x126547[_0x3698de(0x249)]>0x0?_0x22cfdf(_0x126547[0x0]):{}};switch(typeof _0x126547){case'string':return{'type':'string','default':_0x126547};case'number':return{'type':Number[_0x3698de(0x53a)](_0x126547)?_0x3698de(0x4c1):_0x3698de(0x449),'default':_0x126547};case _0x3698de(0x321):return{'type':_0x3698de(0x321),'default':_0x126547};case _0x3698de(0x245):{const _0x111251={};for(const [_0x55e34b,_0x479490]of Object[_0x3698de(0x707)](_0x126547))_0x111251[_0x55e34b]=_0x22cfdf(_0x479490);return{'type':_0x3698de(0x245),'properties':_0x111251,'additionalProperties':!![],'default':_0x58fdce(_0x126547)};}default:return{};}}function _0x27f233(_0x53e5cb,_0xedf256){const _0x1663ec=_0x23e96f,_0x555b3d=[];for(const _0x4c65f9 of _0xedf256['keys']){if(_0x4c65f9==='*')continue;_0x555b3d[_0x1663ec(0x39b)]({'name':_0x4c65f9,'required':!Object[_0x1663ec(0x33a)][_0x1663ec(0x296)][_0x1663ec(0x45a)](_0xedf256[_0x1663ec(0x59f)],_0x4c65f9),'default':_0xedf256[_0x1663ec(0x59f)][_0x4c65f9]});}return _0x555b3d;}function _0x161721(_0x58a411={},_0x1ff742){const _0x11faa3=_0x23e96f,_0x242df3=_0x5b08e3(_0x58a411['http']?.['querySchema']??_0x58a411[_0x11faa3(0xb5)]??null),_0x3bd9b6=_0x58a411[_0x11faa3(0x57f)]?.[_0x11faa3(0x5dc)]??(_0x58a411['raw']?_0x11faa3(0x440):_0x1ff742[_0x11faa3(0x1d4)]===_0x11faa3(0x704)||_0x1ff742[_0x11faa3(0x1d4)]==='HEAD'?_0x11faa3(0x1b1):_0x11faa3(0x368));return{'querySchema':_0x242df3,'bodyMode':_0x3bd9b6,'bindings':_0x58fdce(_0x58a411[_0x11faa3(0x57f)]?.[_0x11faa3(0x1c7)]??{}),'statuses':_0x58fdce(_0x58a411[_0x11faa3(0x57f)]?.[_0x11faa3(0x31b)]??(_0x58a411[_0x11faa3(0xef)]||[])),'transport':_0x58a411[_0x11faa3(0x57f)]?.['transport']??(_0x58a411[_0x11faa3(0x71c)]?'sse':_0x58a411[_0x11faa3(0x440)]?'raw':_0x11faa3(0x394)),'rawResponse':_0x58a411[_0x11faa3(0x57f)]?.[_0x11faa3(0x197)]??!!_0x58a411['rawResponse'],'cors':_0x58fdce(_0x58a411[_0x11faa3(0x57f)]?.[_0x11faa3(0x10a)]??_0x58a411['cors']??null)};}function _0x2ec964(_0x2799f4){const _0x49967f=_0x23e96f,_0x306efd=_0x2799f4[_0x49967f(0x2fe)]||{},_0x277111=_0x27f233(_0x2799f4[_0x49967f(0x5a4)],_0x2799f4['matcher']),_0xba1c70=!!(_0x306efd['id']||_0x306efd[_0x49967f(0x2d3)]||_0x306efd[_0x49967f(0x575)]||_0x306efd[_0x49967f(0x57f)]||_0x306efd[_0x49967f(0x248)]||_0x306efd[_0x49967f(0x4b8)]||_0x306efd[_0x49967f(0x4e9)]||_0x306efd[_0x49967f(0x125)]),_0x3353ab=_0x161721(_0x306efd,_0x2799f4),_0x1ba035=_0x306efd[_0x49967f(0x2d3)]?_0x58fdce(_0x306efd['inputSchema']):null;return{'id':_0x306efd['id']??null,'summary':_0x306efd[_0x49967f(0x506)]??null,'description':_0x306efd[_0x49967f(0x23f)]??null,'tags':_0x58fdce(_0x306efd[_0x49967f(0x4e7)]??[]),'category':_0x306efd['category']??null,'safety':_0x58fdce(_0x306efd[_0x49967f(0x125)]??null),'access':_0x58fdce(_0x306efd[_0x49967f(0x4e9)]??null),'inputSchema':_0x1ba035,'outputSchema':_0x58fdce(_0x306efd['outputSchema']??null),'examples':_0x58fdce(_0x306efd[_0x49967f(0x52e)]??[]),'pathParams':_0x277111,'http':_0x3353ab,'cli':_0x58fdce(_0x306efd[_0x49967f(0x4b8)]??null),'mcp':_0x58fdce(_0x306efd['mcp']??null),'legacy':{'params':_0x58fdce(_0x306efd[_0x49967f(0x542)]??null),'query':_0x58fdce(_0x306efd[_0x49967f(0xb5)]??null),'body':_0x58fdce(_0x306efd[_0x49967f(0x459)]??null),'response':_0x58fdce(_0x306efd[_0x49967f(0x377)]??null)},'transport':{'raw':!!_0x306efd[_0x49967f(0x440)],'sse':!!_0x306efd['sse'],'rawResponse':!!_0x306efd[_0x49967f(0x197)],'cors':_0x58fdce(_0x306efd[_0x49967f(0x10a)]??null)},'hasCanonical':_0xba1c70};}function _0x2bd100(_0x5ace98,_0x492d86){const _0x31639c=_0x23e96f;if(!_0x492d86?.['hasCanonical'])return;if(!_0x492d86[_0x31639c(0x2d3)]||_0x492d86[_0x31639c(0x2d3)][_0x31639c(0x563)]!==_0x31639c(0x245)||!_0x492d86['inputSchema'][_0x31639c(0xb8)])throw new Error(_0x31639c(0x407)+_0x5ace98[_0x31639c(0x1d4)]+'\x20'+_0x5ace98['path']+_0x31639c(0x35e));const _0x32ec83=_0x492d86[_0x31639c(0x2d3)][_0x31639c(0xb8)]||{},_0x284625=new Set(_0x492d86[_0x31639c(0x38e)]['map'](_0x2f04c6=>_0x2f04c6[_0x31639c(0x1cf)])),_0x4ba3c4=new Set(Object[_0x31639c(0x2b3)](_0x492d86[_0x31639c(0x57f)]?.[_0x31639c(0x538)]?.[_0x31639c(0xb8)]||{})),_0x25bef8=new Set(Object[_0x31639c(0x2b3)](_0x492d86[_0x31639c(0x57f)]?.[_0x31639c(0x1c7)]||{}));for(const _0x285317 of _0x492d86[_0x31639c(0x38e)]){if(!_0x32ec83[_0x285317['name']])throw new Error(_0x31639c(0x407)+_0x5ace98[_0x31639c(0x1d4)]+'\x20'+_0x5ace98['path']+_0x31639c(0x508)+_0x285317[_0x31639c(0x1cf)]);}for(const _0x448d1c of _0x4ba3c4){if(!_0x32ec83[_0x448d1c])throw new Error(_0x31639c(0x407)+_0x5ace98[_0x31639c(0x1d4)]+'\x20'+_0x5ace98[_0x31639c(0x5a4)]+_0x31639c(0x710)+_0x448d1c);}for(const _0x20b022 of _0x25bef8){if(!_0x32ec83[_0x20b022])throw new Error('Route\x20'+_0x5ace98['method']+'\x20'+_0x5ace98['path']+_0x31639c(0x660)+_0x20b022);}for(const _0x288dd9 of _0x25bef8){if(_0x284625[_0x31639c(0xe5)](_0x288dd9))throw new Error('Route\x20'+_0x5ace98[_0x31639c(0x1d4)]+'\x20'+_0x5ace98['path']+_0x31639c(0x3ac)+_0x288dd9);if(_0x4ba3c4[_0x31639c(0xe5)](_0x288dd9))throw new Error(_0x31639c(0x407)+_0x5ace98[_0x31639c(0x1d4)]+'\x20'+_0x5ace98[_0x31639c(0x5a4)]+_0x31639c(0x3d4)+_0x288dd9);const _0x226b75=_0x492d86[_0x31639c(0x57f)][_0x31639c(0x1c7)][_0x288dd9];if(!/^params\.[A-Za-z0-9_*.-]+$/[_0x31639c(0x3b6)](_0x226b75)&&!/^query\.[A-Za-z0-9_*.-]+$/[_0x31639c(0x3b6)](_0x226b75)&&!/^body(?:\.[A-Za-z0-9_*.-]+)?$/[_0x31639c(0x3b6)](_0x226b75)&&!/^headers\.[A-Za-z0-9_*.-]+$/[_0x31639c(0x3b6)](_0x226b75))throw new Error(_0x31639c(0x407)+_0x5ace98[_0x31639c(0x1d4)]+'\x20'+_0x5ace98[_0x31639c(0x5a4)]+_0x31639c(0x3da)+_0x288dd9+':\x20'+_0x226b75);}for(const _0x31f4c5 of _0x4ba3c4){if(_0x284625['has'](_0x31f4c5))throw new Error(_0x31639c(0x407)+_0x5ace98[_0x31639c(0x1d4)]+'\x20'+_0x5ace98[_0x31639c(0x5a4)]+_0x31639c(0x218)+_0x31f4c5);}const _0x15f14a=_0x492d86[_0x31639c(0x57f)]?.['bodyMode'],_0x53948d=new Set([_0x31639c(0x1b1),'remaining-fields',_0x31639c(0x245),_0x31639c(0xf1),_0x31639c(0x3d3),_0x31639c(0x440)]);if(!_0x53948d[_0x31639c(0xe5)](_0x15f14a))throw new Error(_0x31639c(0x407)+_0x5ace98[_0x31639c(0x1d4)]+'\x20'+_0x5ace98[_0x31639c(0x5a4)]+_0x31639c(0x596)+_0x15f14a);if(_0x15f14a===_0x31639c(0x440)&&!_0x5ace98[_0x31639c(0x2fe)]?.['raw'])throw new Error(_0x31639c(0x407)+_0x5ace98[_0x31639c(0x1d4)]+'\x20'+_0x5ace98[_0x31639c(0x5a4)]+_0x31639c(0x5c6));if(_0x492d86[_0x31639c(0x248)]?.[_0x31639c(0x389)]!==![]&&(_0x5ace98[_0x31639c(0x2fe)]?.[_0x31639c(0x440)]||_0x5ace98[_0x31639c(0x2fe)]?.[_0x31639c(0x71c)]||_0x492d86[_0x31639c(0x57f)]?.['transport']===_0x31639c(0x415)))throw new Error('Route\x20'+_0x5ace98['method']+'\x20'+_0x5ace98['path']+'\x20cannot\x20be\x20MCP-exposed\x20without\x20an\x20explicit\x20adapter\x20because\x20it\x20uses\x20'+_0x492d86['http']?.[_0x31639c(0x47c)]);const _0x55d28e=Object[_0x31639c(0x2b3)](_0x32ec83)[_0x31639c(0x69e)](_0x241821=>{const _0x5dcbd9=_0x31639c;if(_0x284625[_0x5dcbd9(0xe5)](_0x241821))return![];if(_0x4ba3c4[_0x5dcbd9(0xe5)](_0x241821))return![];if(_0x25bef8[_0x5dcbd9(0xe5)](_0x241821))return![];return!![];});if(_0x15f14a==='none'&&_0x55d28e[_0x31639c(0x249)]>0x0)throw new Error(_0x31639c(0x407)+_0x5ace98[_0x31639c(0x1d4)]+'\x20'+_0x5ace98['path']+_0x31639c(0x263)+_0x55d28e[_0x31639c(0x139)](',\x20'));if(_0x15f14a===_0x31639c(0x3d3)&&_0x55d28e[_0x31639c(0x69e)](_0x377d31=>_0x281882(_0x32ec83[_0x377d31],_0x31639c(0x3d3)))[_0x31639c(0x249)]!==0x1)throw new Error(_0x31639c(0x407)+_0x5ace98[_0x31639c(0x1d4)]+'\x20'+_0x5ace98[_0x31639c(0x5a4)]+_0x31639c(0x645));}function _0x379a5e(_0x1dc7e2,_0x29d7ed,_0x3432a9,_0xccbfad){const _0x153a76=_0x23e96f;for(const [_0x1b2fed,_0x2b054f]of Object[_0x153a76(0x707)](_0x1dc7e2)){if(_0x29d7ed[_0x153a76(0xe5)](_0x1b2fed)||_0x3432a9[_0x153a76(0xe5)](_0x1b2fed)||Object[_0x153a76(0x33a)][_0x153a76(0x296)][_0x153a76(0x45a)](_0xccbfad,_0x1b2fed))continue;if(_0x281882(_0x2b054f,_0x153a76(0x3d3)))return _0x1b2fed;}return null;}function _0xb39b44(_0x5c676b){const _0x21be10=_0x23e96f;if(Array[_0x21be10(0x17b)](_0x5c676b))return _0x5c676b;if(_0x5c676b==null)return[];return[_0x5c676b];}function _0x281882(_0x55b05f,_0x31b970){const _0x156362=_0x23e96f;return _0xb39b44(_0x55b05f?.[_0x156362(0x563)])[_0x156362(0x52b)](_0x31b970);}function _0xbe4b48(_0x1769d0,_0x2a79b9){const _0x4b92c3=_0x23e96f;if(_0x1769d0==null||typeof _0x1769d0!==_0x4b92c3(0x242))return _0x1769d0;const _0x501740=_0xb39b44(_0x2a79b9?.[_0x4b92c3(0x563)]);if(_0x501740['length']===0x0)return _0x1769d0;if(_0x501740[_0x4b92c3(0x52b)](_0x4b92c3(0x7e))&&_0x1769d0===_0x4b92c3(0x7e))return null;if(_0x501740['includes'](_0x4b92c3(0x321))){if(_0x1769d0===_0x4b92c3(0x48a))return!![];if(_0x1769d0==='false')return![];}if(_0x501740[_0x4b92c3(0x52b)](_0x4b92c3(0x4c1))&&/^-?\d+$/['test'](_0x1769d0))return Number[_0x4b92c3(0x41e)](_0x1769d0,0xa);if(_0x501740[_0x4b92c3(0x52b)](_0x4b92c3(0x449))&&/^-?(?:\d+|\d*\.\d+)$/[_0x4b92c3(0x3b6)](_0x1769d0))return Number(_0x1769d0);return _0x1769d0;}function _0x2dbe90(_0x2c9366){return _0x58fdce(_0x2c9366);}function _0x1e570c(_0x220fd1,_0x4b4d9e={},_0x569de3={},_0x2f2846=null,_0x2592f3={}){const _0x2a525a=_0x23e96f,_0x51379f=_0x220fd1?.[_0x2a525a(0x25b)];if(!_0x51379f?.['hasCanonical']||!_0x51379f[_0x2a525a(0x2d3)])return null;const _0x947338=_0x51379f['inputSchema']['properties']||{},_0x3c60d9=_0x51379f['http']?.[_0x2a525a(0x538)]?.[_0x2a525a(0xb8)]||{},_0x445351=_0x51379f[_0x2a525a(0x57f)]?.[_0x2a525a(0x1c7)]||{},_0x359c1b=new Set((_0x51379f['pathParams']||[])[_0x2a525a(0x539)](_0x2377b5=>_0x2377b5[_0x2a525a(0x1cf)])),_0xe2d160=new Set(Object[_0x2a525a(0x2b3)](_0x3c60d9)),_0x1b1811={};for(const [_0x36e91a,_0x51c987]of Object[_0x2a525a(0x707)](_0x947338)){Object[_0x2a525a(0x33a)][_0x2a525a(0x296)][_0x2a525a(0x45a)](_0x51c987||{},_0x2a525a(0x34b))&&(_0x1b1811[_0x36e91a]=_0x2dbe90(_0x51c987[_0x2a525a(0x34b)]));}for(const _0x15726e of _0x51379f[_0x2a525a(0x38e)]||[]){if(!Object[_0x2a525a(0x33a)]['hasOwnProperty'][_0x2a525a(0x45a)](_0x4b4d9e,_0x15726e['name']))continue;const _0x26c81a=_0x947338[_0x15726e[_0x2a525a(0x1cf)]]||{};_0x1b1811[_0x15726e['name']]=_0xbe4b48(_0x4b4d9e[_0x15726e[_0x2a525a(0x1cf)]],_0x26c81a);}for(const [_0x26dd4e,_0xa6dbd8]of Object[_0x2a525a(0x707)](_0x3c60d9)){if(!Object['prototype']['hasOwnProperty']['call'](_0x569de3,_0x26dd4e))continue;_0x1b1811[_0x26dd4e]=_0xbe4b48(_0x569de3[_0x26dd4e],_0xa6dbd8||_0x947338[_0x26dd4e]||{});}for(const [_0x3e368b,_0x531402]of Object[_0x2a525a(0x707)](_0x445351)){if(typeof _0x531402!==_0x2a525a(0x242))continue;let _0x3de1b2;if(_0x531402['startsWith'](_0x2a525a(0x356)))_0x3de1b2=_0x4b4d9e[_0x531402['slice'](0x7)];else{if(_0x531402[_0x2a525a(0x334)]('query.'))_0x3de1b2=_0x569de3[_0x531402[_0x2a525a(0x3e6)](0x6)];else{if(_0x531402==='body')_0x3de1b2=_0x2f2846;else{if(_0x531402[_0x2a525a(0x334)](_0x2a525a(0x498)))_0x3de1b2=_0x2f2846?.[_0x531402[_0x2a525a(0x3e6)](0x5)];else{if(_0x531402[_0x2a525a(0x334)](_0x2a525a(0x3bc)))_0x3de1b2=_0x2592f3?.[_0x531402['slice'](0x8)[_0x2a525a(0xeb)]()]??_0x2592f3?.[_0x531402[_0x2a525a(0x3e6)](0x8)];}}}}if(_0x3de1b2!==undefined)_0x1b1811[_0x3e368b]=_0x3de1b2;}const _0x1d10eb=_0x51379f[_0x2a525a(0x57f)]?.['bodyMode'];if(_0x1d10eb!==_0x2a525a(0x1b1)&&_0x1d10eb!=='raw'&&_0x2f2846!=null){if(_0x1d10eb===_0x2a525a(0x3d3)&&Array[_0x2a525a(0x17b)](_0x2f2846)){const _0x1795da=_0x379a5e(_0x947338,_0x359c1b,_0xe2d160,_0x445351);if(_0x1795da)_0x1b1811[_0x1795da]=_0x2f2846;}else{if(_0x1d10eb===_0x2a525a(0x245))for(const [_0x399f11,_0x191e20]of Object[_0x2a525a(0x707)](_0x947338)){if(_0x359c1b['has'](_0x399f11)||_0xe2d160[_0x2a525a(0xe5)](_0x399f11)||Object['prototype'][_0x2a525a(0x296)][_0x2a525a(0x45a)](_0x445351,_0x399f11))continue;if(Object[_0x2a525a(0x33a)]['hasOwnProperty'][_0x2a525a(0x45a)](_0x2f2846,_0x399f11))_0x1b1811[_0x399f11]=_0x2f2846[_0x399f11];else{if(_0x281882(_0x191e20,_0x2a525a(0x245)))_0x1b1811[_0x399f11]=_0x2f2846;}}else for(const [_0x2c55e2,_0x1bff9f]of Object[_0x2a525a(0x707)](_0x2f2846)){if(_0x359c1b[_0x2a525a(0xe5)](_0x2c55e2)||_0xe2d160['has'](_0x2c55e2)||Object[_0x2a525a(0x33a)]['hasOwnProperty'][_0x2a525a(0x45a)](_0x445351,_0x2c55e2))continue;_0x1b1811[_0x2c55e2]=_0x1bff9f;}}}return _0x1b1811;}function _0x7dbbd(_0x44b2f3,_0x4c809b,_0x18a0e5,_0x2b664c){const _0x3613d1=_0x23e96f;if(!_0x4c809b)return;const _0x30a711=_0xb39b44(_0x4c809b['type']);if(_0x44b2f3===undefined)return;if(_0x44b2f3===null){_0x30a711['length']>0x0&&!_0x30a711[_0x3613d1(0x52b)](_0x3613d1(0x7e))&&_0x2b664c['push']({'field':_0x18a0e5,'message':'must\x20not\x20be\x20null','expected':_0x30a711[_0x3613d1(0x139)]('|'),'actual':null});return;}if(_0x30a711[_0x3613d1(0x249)]===0x0)return;const _0x2e23b0=_0x30a711[_0x3613d1(0x696)](_0x4a8de1=>{const _0x512d75=_0x3613d1;switch(_0x4a8de1){case'string':return typeof _0x44b2f3===_0x512d75(0x242);case'integer':return Number[_0x512d75(0x53a)](_0x44b2f3);case _0x512d75(0x449):return typeof _0x44b2f3==='number'&&Number[_0x512d75(0x314)](_0x44b2f3);case _0x512d75(0x321):return typeof _0x44b2f3===_0x512d75(0x321);case _0x512d75(0x245):return _0x44b2f3&&typeof _0x44b2f3===_0x512d75(0x245)&&!Array[_0x512d75(0x17b)](_0x44b2f3);case _0x512d75(0x3d3):return Array['isArray'](_0x44b2f3);case _0x512d75(0x7e):return _0x44b2f3===null;default:return!![];}});if(!_0x2e23b0){_0x2b664c[_0x3613d1(0x39b)]({'field':_0x18a0e5,'message':'must\x20be\x20'+_0x30a711[_0x3613d1(0x139)]('|'),'expected':_0x30a711[_0x3613d1(0x139)]('|'),'actual':_0x44b2f3});return;}Array[_0x3613d1(0x17b)](_0x44b2f3)&&_0x4c809b[_0x3613d1(0x4e1)]&&_0x44b2f3['forEach']((_0x3c1181,_0x228ea4)=>_0x7dbbd(_0x3c1181,_0x4c809b['items'],_0x18a0e5+'['+_0x228ea4+']',_0x2b664c));}function _0x420dc0(_0x29c5db,_0x2df220){const _0x1027c2=_0x23e96f,_0x468aa8=_0x29c5db?.[_0x1027c2(0x25b)];if(!_0x468aa8?.['hasCanonical']||!_0x468aa8[_0x1027c2(0x2d3)])return null;const _0x106d78=_0x468aa8[_0x1027c2(0x2d3)],_0x35a317=_0x106d78[_0x1027c2(0xb8)]||{},_0x21c712=new Set(_0x106d78[_0x1027c2(0x140)]||[]),_0x3f0c89=[];for(const _0x41471a of _0x21c712){_0x2df220[_0x41471a]===undefined&&_0x3f0c89[_0x1027c2(0x39b)]({'field':_0x41471a,'message':'is\x20required','expected':_0x1027c2(0x50a),'actual':undefined});}if(_0x106d78[_0x1027c2(0xdb)]===![])for(const _0x3193c8 of Object['keys'](_0x2df220||{})){!Object[_0x1027c2(0x33a)]['hasOwnProperty'][_0x1027c2(0x45a)](_0x35a317,_0x3193c8)&&_0x3f0c89[_0x1027c2(0x39b)]({'field':_0x3193c8,'message':_0x1027c2(0x3ef),'expected':_0x1027c2(0x634),'actual':_0x2df220[_0x3193c8]});}for(const [_0x5470db,_0x46451a]of Object[_0x1027c2(0x707)](_0x35a317)){_0x7dbbd(_0x2df220[_0x5470db],_0x46451a,_0x5470db,_0x3f0c89);}if(_0x3f0c89[_0x1027c2(0x249)]===0x0)return null;return{'code':_0x1027c2(0x687),'errors':_0x3f0c89};}function _0x3837c2(_0x527bf1=[]){const _0x4298f2=_0x23e96f;if(!Array['isArray'](_0x527bf1)||_0x527bf1[_0x4298f2(0x249)]===0x0)return null;const _0x2e8513=_0x527bf1[_0x4298f2(0x3e6)](0x0,0x3)[_0x4298f2(0x539)]((_0x340c47={})=>{const _0x166776=_0x4298f2,_0x4c01ce=_0x340c47[_0x166776(0x68f)]?_0x340c47['field']+'\x20':'';return(''+_0x4c01ce+(_0x340c47[_0x166776(0x5a3)]||_0x166776(0x6fa)))['trim']();})[_0x4298f2(0x139)](';\x20');return _0x527bf1[_0x4298f2(0x249)]>0x3?_0x2e8513+_0x4298f2(0x384)+(_0x527bf1[_0x4298f2(0x249)]-0x3)+_0x4298f2(0x2f5):_0x2e8513;}function _0x1ce0d5(_0x2d03e8,_0x323e72={}){const _0x27a56c=_0x23e96f,_0x49b71e=_0x323e72?.[_0x27a56c(0x703)]?.[_0x27a56c(0x271)]??_0x323e72?.[_0x27a56c(0x271)]??'Unknown\x20error',_0xf2f9d5=_0x323e72?.['result']?.['details']??_0x323e72?.[_0x27a56c(0x744)]??_0x49b71e?.['details']??null,_0xc84ee1=_0x323e72?.[_0x27a56c(0x703)]?.[_0x27a56c(0x5f2)]??_0x323e72?.[_0x27a56c(0x5f2)]??_0x49b71e?.[_0x27a56c(0x5f2)]??null,_0xf83539=_0x323e72?.[_0x27a56c(0x703)]?.[_0x27a56c(0x5a3)]??_0x323e72?.[_0x27a56c(0x5a3)]??_0x49b71e?.[_0x27a56c(0x5a3)]??null,_0x5cf12f=typeof _0x49b71e===_0x27a56c(0x242)?_0x49b71e:null,_0x52376c=typeof _0x5cf12f===_0x27a56c(0x242)&&/^[A-Z0-9_]+$/[_0x27a56c(0x3b6)](_0x5cf12f),_0x1f656a=_0xc84ee1??(_0x52376c?_0x5cf12f:null)??(_0x52c01d[_0x2d03e8]||_0x27a56c(0x32c)+_0x2d03e8);let _0x18d4c8=_0xf83539;!_0x18d4c8&&typeof _0x5cf12f===_0x27a56c(0x242)&&!_0x52376c&&(_0x18d4c8=_0x5cf12f);if(!_0x18d4c8&&_0x1f656a===_0x27a56c(0x687)){const _0x4c7430=_0x3837c2(_0xf2f9d5);_0x18d4c8=_0x4c7430?_0x27a56c(0x3f5)+_0x4c7430:_0x27a56c(0x62d);}if(!_0x18d4c8&&Array[_0x27a56c(0x17b)](_0xf2f9d5)&&_0xf2f9d5[_0x27a56c(0x249)]>0x0){const _0x4ec804=_0x3837c2(_0xf2f9d5);if(_0x4ec804)_0x18d4c8=_0x4ec804;}if(!_0x18d4c8)_0x18d4c8=_0x52c01d[_0x2d03e8]||_0x27a56c(0x597);const _0x450662={'code':_0x1f656a,'message':_0x18d4c8};if(_0xf2f9d5!=null)_0x450662['details']=_0xf2f9d5;return _0x450662;}function _0x469a42(_0x599017){const _0xd5ea0f=_0x23e96f,_0x443d0b={};if(!_0x599017)return _0x443d0b;for(const _0x43f4a7 of _0x599017[_0xd5ea0f(0x48b)](';')){const _0x3f6040=_0x43f4a7[_0xd5ea0f(0x40d)]('=');if(_0x3f6040===-0x1)continue;const _0x593703=_0x43f4a7[_0xd5ea0f(0x3e6)](0x0,_0x3f6040)[_0xd5ea0f(0x541)](),_0x4b18d1=_0x43f4a7['slice'](_0x3f6040+0x1)[_0xd5ea0f(0x541)]();_0x443d0b[_0x593703]=decodeURIComponent(_0x4b18d1);}return _0x443d0b;}function _0x459ccc(_0x55a1a2,_0x382a80){const _0x43e886=_0x23e96f;return _0x382a80=_0x3703b8(_0x382a80),{'status':_0x382a80[_0x43e886(0x54e)]??_0x55a1a2[_0x43e886(0x54e)],'headers':{..._0x55a1a2[_0x43e886(0x95)]||{},..._0x382a80['headers']||{}},'body':_0x382a80[_0x43e886(0x459)]??_0x55a1a2['body']};}function _0x100d03(_0x5cd4f7={}){const _0xb563e4=_0x23e96f;return _0x5cd4f7[_0xb563e4(0x47c)]||(_0x5cd4f7[_0xb563e4(0x48c)]?_0xb563e4(0x48c):_0xb563e4(0x57f));}function _0x404d7(_0x466c6e){const _0x1a49ea=_0x23e96f;if(_0x466c6e['context']?.[_0x1a49ea(0x48c)]===!![])return!![];if(_0x466c6e['context']?.[_0x1a49ea(0x62b)]?.[_0x1a49ea(0x674)]===!![])return!![];if(_0x466c6e['context']?.[_0x1a49ea(0x62b)]?.['ok']===!![])return!![];return![];}function _0x429f24(_0x3ad513,_0x573468){const _0x46cfde=_0x23e96f,_0x352ae1=_0x573468[_0x46cfde(0x48b)]('.');let _0x43ec23=_0x3ad513;for(const _0x295df1 of _0x352ae1){_0x43ec23=_0x43ec23?.[_0x295df1];}return _0x43ec23||null;}class _0x2ac5c5{constructor(){const _0x1cfcf7=_0x23e96f;this[_0x1cfcf7(0x1ef)]=[],this[_0x1cfcf7(0x23e)]=[],this['routes']=[],this[_0x1cfcf7(0x70b)]=0x5*0x400*0x400,this[_0x1cfcf7(0x6db)]=null,this[_0x1cfcf7(0x6bc)]=[],this[_0x1cfcf7(0x1bd)]=new Set(),this[_0x1cfcf7(0x62b)]={'cookieName':_0x1cfcf7(0x24b),'stateCookieName':_0x1cfcf7(0xac),'csrfCookieName':_0x1cfcf7(0x3fa)},this[_0x1cfcf7(0x553)]={},this['_loginStates']=new Map(),this['_oidcDiscoveryCache']=null,this[_0x1cfcf7(0x6a2)]=null,this['_jwksNegativeCache']=new Map(),this[_0x1cfcf7(0x451)]=new _0x1068e6(),this['_userPhase']=![],this[_0x1cfcf7(0x320)]=0x0;}['configureAuth'](_0x1945ae={}){const _0x8ab337=_0x23e96f;return this['_authOptions']=_0x1945ae||{},this['authMode']=_0x1945ae['mode']??_0x8ab337(0x472),this['_authOptions'];}get[_0x23e96f(0x87)](){const _0x3625d8=_0x23e96f;if(this[_0x3625d8(0x68a)]?.[_0x3625d8(0x62b)])return this[_0x3625d8(0x68a)][_0x3625d8(0x62b)]['isSetupMode'];return![];}[_0x23e96f(0x288)](){const _0x434926=_0x23e96f;if(this[_0x434926(0x68a)]?.[_0x434926(0x62b)])return this[_0x434926(0x68a)]['auth']['getAuthOptions']();return this[_0x434926(0x553)]||{};}[_0x23e96f(0x434)](_0x5abbb8){const _0x5a01a1=_0x23e96f;this[_0x5a01a1(0x1ef)][_0x5a01a1(0x39b)](_0x5abbb8);}['guard'](_0xa1abce,_0x166112){const _0x39a548=_0x23e96f;this[_0x39a548(0x23e)]['push']({'match':_0xa1abce,'handler':_0x166112});}[_0x23e96f(0x32e)](_0x2eda72,_0x308bb5,_0x31ef2d,_0x301a1f={}){const _0x38dda7=_0x23e96f,_0x503f19={'method':_0x6ddbf4(_0x2eda72),'path':_0x308bb5,'matcher':_0x4e186b(_0x308bb5),'handler':_0x31ef2d,'meta':_0x301a1f||{}},_0x58a50f=_0x2ec964(_0x503f19);_0x2bd100(_0x503f19,_0x58a50f),_0x503f19[_0x38dda7(0x25b)]=_0x58a50f,_0x503f19[_0x38dda7(0x3c8)]=this[_0x38dda7(0x6d9)]===!![];if(_0x503f19[_0x38dda7(0x3c8)])this[_0x38dda7(0x320)]++;this['routes'][_0x38dda7(0x39b)](_0x503f19);}[_0x23e96f(0x392)](_0x461334,_0x1ab70e,_0x4148d7,_0x16322e={}){const _0xf526eb=_0x23e96f;this[_0xf526eb(0x32e)](_0x461334,_0x1ab70e,_0x4148d7,{..._0x16322e,'raw':!![]});}['_bestMatch'](_0x290fa1,_0xf5154d,{corsOnly:corsOnly=![]}={}){const _0x9e9cd4=_0x23e96f;let _0x48c1dc=null,_0x286afe=Infinity;for(const _0x6f0518 of this['routes']){if(corsOnly){if(!_0x6f0518[_0x9e9cd4(0x2fe)]?.[_0x9e9cd4(0x10a)])continue;}else{if(_0x6f0518['method']!==_0x290fa1)continue;}if(!_0x6f0518[_0x9e9cd4(0x22d)]['regex'][_0x9e9cd4(0x3b6)](_0xf5154d))continue;const _0x415c19=_0x6f0518[_0x9e9cd4(0x22d)]['keys']?.[_0x9e9cd4(0x249)]??0x0;if(_0x415c19<_0x286afe){_0x48c1dc=_0x6f0518,_0x286afe=_0x415c19;if(_0x415c19===0x0)break;}}return _0x48c1dc;}[_0x23e96f(0x1d7)](_0x3f6a76,_0x107691){const _0x4ab7da=_0x23e96f,_0x153885=_0x6ddbf4(_0x3f6a76),_0x10296e=this[_0x4ab7da(0x149)](_0x153885,_0x107691);if(_0x10296e)return _0x10296e;if(_0x153885===_0x4ab7da(0x24e))return this[_0x4ab7da(0x149)](_0x153885,_0x107691,{'corsOnly':!![]});return null;}['_shouldWrapResponse'](_0xb674d3,_0x414fdf){const _0x2b2492=_0x23e96f;if(_0xb674d3?.[_0x2b2492(0x2fe)]?.[_0x2b2492(0x197)])return![];if(_0x414fdf?.['headers']?.[_0x2b2492(0x418)])return![];return!![];}[_0x23e96f(0x80)](){const _0x29b771=_0x23e96f;return this[_0x29b771(0x490)][_0x29b771(0x69e)](_0xc99c5b=>!_0xc99c5b[_0x29b771(0x2fe)]?.[_0x29b771(0x2cb)])[_0x29b771(0x539)](_0x68c22d=>({'method':_0x68c22d[_0x29b771(0x1d4)],'path':_0x68c22d[_0x29b771(0x5a4)],'defaults':_0x68c22d[_0x29b771(0x22d)]['defaults'],'meta':_0x68c22d['meta'],'operation':_0x68c22d[_0x29b771(0x25b)]}));}[_0x23e96f(0x1fb)](_0x31fc50,_0x167337,_0x1fbda4={}){const _0x518119=_0x23e96f,{PassThrough:_0x474ea1}=require$$5;this['add'](_0x518119(0x704),_0x31fc50,({params:_0x2d990d,query:_0x3a5af1,headers:_0x2965ce,context:_0x2abf1c})=>{const _0x29e087=_0x518119,_0x4163d3=new _0x474ea1();let _0x370707=null;const _0x42f1c9={};try{_0x2abf1c?.[_0x29e087(0x1c3)]?.['socket']?.[_0x29e087(0xbd)](!![]);}catch{}_0x4163d3[_0x29e087(0x360)](_0x29e087(0x605)),_0x370707=setInterval(()=>{const _0x2329bc=_0x29e087;try{_0x4163d3['write'](_0x2329bc(0xe4));}catch{}},0x3a98);const _0x569a8b=(_0x27fcbc,_0xa8e9a9,_0x4ea534={})=>{const _0x470d3d=_0x29e087;try{const _0x2011ac=_0x4ea534[_0x470d3d(0x440)]?String(_0xa8e9a9??''):JSON[_0x470d3d(0x316)](_0xa8e9a9);_0x4ea534['id']!=null&&_0x4163d3[_0x470d3d(0x360)]('id:\x20'+_0x4ea534['id']+'\x0a');_0x4163d3['write'](_0x470d3d(0x53e)+_0x27fcbc+'\x0a');for(const _0x325c6a of _0x2011ac['split']('\x0a')){_0x4163d3[_0x470d3d(0x360)](_0x470d3d(0x56f)+_0x325c6a+'\x0a');}_0x4163d3['write']('\x0a');}catch{}},_0x5b3ec8=()=>{_0x370707&&(clearInterval(_0x370707),_0x370707=null);try{_0x4163d3['destroy']();}catch{}},_0x264943=(_0x16d252,_0x42b2da)=>{_0x42f1c9[_0x16d252]=_0x42b2da;};_0x2abf1c?.[_0x29e087(0x1c3)]?.['on']('close',_0x5b3ec8),_0x4163d3['on']('close',_0x5b3ec8);if(_0x2abf1c?.['auth']&&_0x2abf1c[_0x29e087(0x62b)][_0x29e087(0x472)]!==!![]&&_0x2abf1c[_0x29e087(0x62b)]['isAuthenticated']){const _0x26dd41={'headers':_0x2965ce??{},'cookies':_0x469a42(_0x2965ce?.['cookie']),'context':{},'socket':_0x2abf1c?.[_0x29e087(0x1c3)]?.[_0x29e087(0x366)]??{'remoteAddress':null}},_0x2d2dc0=setInterval(async()=>{const _0x1416e4=_0x29e087;try{const _0x3611cd=await this[_0x1416e4(0x405)](_0x26dd41);if(_0x3611cd?.[_0x1416e4(0x472)]===!![]||_0x3611cd?.[_0x1416e4(0x674)])return;_0x569a8b('auth',{'expired':!![]}),_0x5b3ec8();}catch{_0x5b3ec8();}},0xea60);_0x2d2dc0['unref']?.(),_0x4163d3['on'](_0x29e087(0x5b2),()=>clearInterval(_0x2d2dc0));}const _0x3e999b=_0x167337({'send':_0x569a8b,'close':_0x5b3ec8,'params':_0x2d990d??{},'query':_0x3a5af1??{},'headers':_0x2965ce??{},'context':_0x2abf1c,'setHeader':_0x264943});return typeof _0x3e999b===_0x29e087(0x2be)&&_0x4163d3['on'](_0x29e087(0x5b2),_0x3e999b),{'status':0xc8,'headers':{'content-type':_0x29e087(0x26a),'cache-control':'no-cache,\x20no-transform','connection':_0x29e087(0x40f),'x-accel-buffering':'no',..._0x42f1c9},'body':_0x4163d3};},{..._0x1fbda4,'sse':!![]});}async['_runGuards'](_0x981bf0,_0x35a845){const _0xb6855c=_0x23e96f;for(const _0x282a28 of this[_0xb6855c(0x23e)]){if(!_0x282a28['match'](_0x981bf0))continue;const _0x470f56=await _0x282a28[_0xb6855c(0x47e)](_0x981bf0,_0x35a845);if(_0x470f56===![])return![];}return!![];}async[_0x23e96f(0x22e)](_0x2f76c5,_0x12263b,_0x5c4b00){let _0x2f2148=0x0;const _0x5e1e72=async()=>{const _0xa3601d=_0x3dbc,_0x25679f=this[_0xa3601d(0x1ef)][_0x2f2148++];if(!_0x25679f)return _0x5c4b00();return _0x25679f(_0x2f76c5,_0x12263b,_0x5e1e72);};return _0x5e1e72();}[_0x23e96f(0x367)](_0x39d105,_0xf91a2c){const _0x16bad4=_0x23e96f,{status:status=0xc8,headers:headers={},body:_0x13b3fb}=_0x39d105;if(status>=0x12c&&status<0x190)return _0x39d105;if(_0x4d4403(_0x13b3fb))return _0x39d105;if(Buffer['isBuffer'](_0x13b3fb))return _0x39d105;if(typeof _0x13b3fb===_0x16bad4(0x242))return _0x39d105;const _0x5c2133={'time':+_0xf91a2c[_0x16bad4(0x6c3)](0x2)};if(_0x13b3fb?.[_0x16bad4(0x2fe)]&&typeof _0x13b3fb[_0x16bad4(0x2fe)]==='object'){const {time:_0x76c547,..._0x54d72e}=_0x13b3fb[_0x16bad4(0x2fe)];Object[_0x16bad4(0x122)](_0x5c2133,_0x54d72e);}let _0xbdb479;if(status>=0x190){const _0x2aaad3=_0x1ce0d5(status,_0x13b3fb);_0xbdb479={'data':null,'error':_0x2aaad3,'meta':_0x5c2133};}else{if(status===0xcc||_0x13b3fb==null)_0xbdb479={'data':null,'error':null,'meta':_0x5c2133};else{let _0x1b540e;if('result'in _0x13b3fb)_0x1b540e=_0x13b3fb[_0x16bad4(0x703)];else{const {meta:_0x5e7931,..._0xa862b2}=_0x13b3fb;_0x1b540e=Object[_0x16bad4(0x2b3)](_0xa862b2)['length']>0x0?_0xa862b2:null;}_0xbdb479={'data':_0x1b540e,'error':null,'meta':_0x5c2133};}}return{'status':status===0xcc?0xc8:status,'headers':headers,'body':_0xbdb479};}async[_0x23e96f(0x373)](_0x35d6e7,_0x2fe76f,_0x4e6678={},_0x761e67={}){const _0x5d6ea5=_0x23e96f;_0x35d6e7=_0x6ddbf4(_0x35d6e7);const _0xfda200=this[_0x5d6ea5(0x1d7)](_0x35d6e7,_0x2fe76f),_0x4657bb={'method':_0x35d6e7,'path':_0x2fe76f,'headers':_0x4e6678[_0x5d6ea5(0x95)]??{},'body':_0x4e6678[_0x5d6ea5(0x459)]??null,'query':_0x4e6678[_0x5d6ea5(0xb5)]??{},'context':_0x761e67,'cookies':_0x469a42(_0x4e6678[_0x5d6ea5(0x95)]?.['cookie']),'route':_0xfda200,'socket':{'remoteAddress':_0x4e6678[_0x5d6ea5(0x5c2)]??'127.0.0.1'}};_0x4657bb[_0x5d6ea5(0x120)]=_0x4657bb[_0x5d6ea5(0x120)]||{};!_0x4657bb[_0x5d6ea5(0x120)][_0x5d6ea5(0x62b)]&&(_0x4657bb[_0x5d6ea5(0x120)][_0x5d6ea5(0x62b)]=await this[_0x5d6ea5(0x405)](_0x4657bb));if(_0x4657bb['context'][_0x5d6ea5(0x62b)]?.['bootstrapBlocked'])return _0x3703b8({'status':0x193,'body':{'error':{'code':_0x5d6ea5(0x34f),'message':'Server\x20is\x20in\x20bootstrap\x20mode\x20and\x20only\x20accepts\x20localhost\x20connections\x20until\x20the\x20first\x20token\x20is\x20created.'}}});_0x4657bb['context'][_0x5d6ea5(0x62b)]?.[_0x5d6ea5(0x3c6)]&&!_0x4657bb['context'][_0x5d6ea5(0x3c6)]&&(_0x4657bb[_0x5d6ea5(0x120)][_0x5d6ea5(0x3c6)]=_0x4657bb[_0x5d6ea5(0x120)][_0x5d6ea5(0x62b)][_0x5d6ea5(0x3c6)]);let _0x2c6d5c=null;const _0x589c9={'status'(_0x5b626b){const _0x18faf2=_0x5d6ea5;_0x2c6d5c=_0x2c6d5c||{},_0x2c6d5c[_0x18faf2(0x54e)]=_0x5b626b;},'setHeader'(_0x9882e1,_0x26d3ba){const _0xfa5c08=_0x5d6ea5;_0x2c6d5c=_0x2c6d5c||{},_0x2c6d5c[_0xfa5c08(0x95)]=_0x2c6d5c['headers']||{};const _0x4f15e7=String(_0x9882e1)[_0xfa5c08(0xeb)]();if(_0x4f15e7===_0xfa5c08(0x29f)){const _0x5b4b08=_0x2c6d5c[_0xfa5c08(0x95)][_0x9882e1];if(!_0x5b4b08)_0x2c6d5c[_0xfa5c08(0x95)][_0x9882e1]=_0x26d3ba;else{if(Array['isArray'](_0x5b4b08))_0x5b4b08[_0xfa5c08(0x39b)](_0x26d3ba);else _0x2c6d5c[_0xfa5c08(0x95)][_0x9882e1]=[_0x5b4b08,_0x26d3ba];}return;}_0x2c6d5c[_0xfa5c08(0x95)][_0x9882e1]=_0x26d3ba;},'send'(_0x5b98d6){_0x2c6d5c=_0x2c6d5c||{},_0x2c6d5c['body']=_0x5b98d6;}},_0x43c296=await this[_0x5d6ea5(0x41f)](_0x4657bb,_0x589c9);if(!_0x43c296)return _0x3703b8(_0x2c6d5c??{'status':0x193});const _0x3dff24=this[_0x5d6ea5(0x562)](_0x4657bb);if(_0x3dff24)return _0x3703b8(_0x3dff24);const _0x59f0de=this[_0x5d6ea5(0x480)](_0x4657bb);if(_0x59f0de)return _0x3703b8(_0x59f0de);return await this[_0x5d6ea5(0x22e)](_0x4657bb,_0x589c9,async()=>{const _0x2eb840=_0x5d6ea5,_0x1be996=await this[_0x2eb840(0x2bc)](_0x4657bb);if(_0x2c6d5c==null){_0x2c6d5c=_0x1be996;return;}_0x2c6d5c=_0x459ccc(_0x2c6d5c,_0x1be996);}),_0x3703b8(_0x2c6d5c);}[_0x23e96f(0x562)](_0x4f9b72){const _0x24004c=_0x23e96f,_0x3ebf52=_0x4f9b72['route']?.[_0x24004c(0x25b)],_0x36c4e7=_0x3ebf52?.[_0x24004c(0x4e9)];if(!_0x3ebf52?.['hasCanonical']||!_0x36c4e7)return null;if(_0x4f9b72['context']?.[_0x24004c(0x62b)]?.['open']===!![]||_0x4f9b72['context']?.[_0x24004c(0x62b)]?.[_0x24004c(0x1e5)]===!![])return null;const _0x59f85c=_0x100d03(_0x4f9b72['context']),_0x5cb731=Array['isArray'](_0x36c4e7[_0x24004c(0x14b)])?_0x36c4e7['audiences']:null;if(_0x36c4e7[_0x24004c(0x477)]&&_0x4f9b72[_0x24004c(0x120)]?.[_0x24004c(0x48c)]!==!![])return{'status':0x193,'body':{'error':_0x24004c(0x313)}};if(_0x5cb731&&_0x5cb731[_0x24004c(0x249)]>0x0&&!_0x5cb731[_0x24004c(0x52b)](_0x59f85c)&&!(_0x59f85c==='internal'&&_0x5cb731[_0x24004c(0x52b)](_0x24004c(0x6a4))))return{'status':0x193,'body':{'error':'Forbidden'}};if(_0x36c4e7[_0x24004c(0x5d1)]&&!_0x404d7(_0x4f9b72))return{'status':0x191,'body':{'error':_0x24004c(0x682)}};const _0x382513=_0x36c4e7[_0x24004c(0x54d)];if(!_0x382513)return null;if(_0x4f9b72[_0x24004c(0x120)]?.[_0x24004c(0x62b)]?.[_0x24004c(0x563)]===_0x24004c(0x201))return null;const _0x4a9ed6=_0x4f9b72['context']?.[_0x24004c(0x62b)]?.[_0x24004c(0x574)];if(!_0x4a9ed6){if(_0x4f9b72[_0x24004c(0x120)]?.[_0x24004c(0x62b)]?.['ok']===!![])return null;return{'status':0x193,'body':{'error':'Forbidden\x20—\x20no\x20permissions\x20available'}};}if(!_0x4f9b72[_0x24004c(0x542)]&&_0x4f9b72['route']?.[_0x24004c(0x22d)]){const _0xddc938=_0x4f9b72[_0x24004c(0x204)]['matcher'][_0x24004c(0x6b0)][_0x24004c(0x1e0)](_0x4f9b72[_0x24004c(0x5a4)]);_0xddc938&&(_0x4f9b72[_0x24004c(0x542)]={},_0x4f9b72['route']['matcher'][_0x24004c(0x2b3)][_0x24004c(0x44d)]((_0x123039,_0x4df0d4)=>{const _0x59b3c2=_0x24004c,_0x15c769=_0xddc938[_0x4df0d4+0x1];_0x4f9b72[_0x59b3c2(0x542)][_0x123039]=_0x15c769?decodeURIComponent(_0x15c769):_0x4f9b72[_0x59b3c2(0x204)][_0x59b3c2(0x22d)]['defaults'][_0x123039]??undefined;}));}let _0x353188=null;const _0x2dbdca=_0x36c4e7[_0x24004c(0x20c)]===_0x24004c(0x215)?_0x24004c(0x474):_0x36c4e7['scope']?.[_0x24004c(0x215)];_0x2dbdca&&(_0x353188=_0x429f24(_0x4f9b72,_0x2dbdca));if(_0x353188&&_0x353188[_0x24004c(0x334)]('~')){const _0x52c0ff=_0x3a6b9e(_0x382513),_0xe47c24=_0x2d1906(_0x4a9ed6[_0x24004c(0xfb)]||[],(_0x4a9ed6[_0x24004c(0x292)]||{})[_0x353188]||[]);if(!_0x5077c8(_0xe47c24,_0x52c0ff))return{'status':0x193,'body':{'error':_0x24004c(0x41a)+_0x52c0ff+'\x20for\x20system\x20env'}};}const _0x4add17=_0x2d1906(_0x4a9ed6[_0x24004c(0xfb)]||[],_0x353188?(_0x4a9ed6[_0x24004c(0x292)]||{})[_0x353188]||[]:[]);if(!_0x5077c8(_0x4add17,_0x382513))return{'status':0x193,'body':{'error':_0x24004c(0x41a)+_0x382513}};return null;}[_0x23e96f(0x480)](_0x25463e){const _0x1a9fe6=_0x23e96f,_0x49bbd8=_0x25463e[_0x1a9fe6(0x204)],_0x48397b=_0x49bbd8?.[_0x1a9fe6(0x25b)];if(!_0x48397b?.[_0x1a9fe6(0x42f)]||!_0x48397b[_0x1a9fe6(0x2d3)])return null;let _0x30adb1=_0x25463e['params']??null;if(!_0x30adb1&&_0x49bbd8?.[_0x1a9fe6(0x22d)]){const _0x37525c=_0x49bbd8[_0x1a9fe6(0x22d)][_0x1a9fe6(0x6b0)]['exec'](_0x25463e['path']);_0x37525c&&(_0x30adb1={},_0x49bbd8[_0x1a9fe6(0x22d)][_0x1a9fe6(0x2b3)][_0x1a9fe6(0x44d)]((_0xc9bad6,_0x4e778d)=>{const _0x2d6b4e=_0x1a9fe6,_0x14af87=_0x37525c[_0x4e778d+0x1];_0x30adb1[_0xc9bad6]=_0x14af87?decodeURIComponent(_0x14af87):_0x49bbd8[_0x2d6b4e(0x22d)][_0x2d6b4e(0x59f)][_0xc9bad6]??undefined;}));}const _0x13a4e0=_0x1e570c(_0x49bbd8,_0x30adb1??{},_0x25463e['query']??{},_0x25463e[_0x1a9fe6(0x459)],_0x25463e['headers']??{}),_0x1f2538=_0x420dc0(_0x49bbd8,_0x13a4e0||{});if(!_0x1f2538)return null;const _0x3a5b4f=_0x3837c2(_0x1f2538[_0x1a9fe6(0x2e4)]);return{'status':0x190,'body':{'error':_0x1f2538[_0x1a9fe6(0x5f2)],'code':_0x1f2538[_0x1a9fe6(0x5f2)],'message':_0x3a5b4f?_0x1a9fe6(0x3f5)+_0x3a5b4f:'Validation\x20failed','details':_0x1f2538[_0x1a9fe6(0x2e4)]}};}['validateRouteInput'](_0x28cbbd,_0x1825bf){const _0x5b1884=_0x23e96f,_0x47edfb=_0x420dc0(_0x28cbbd,_0x1825bf||{});if(!_0x47edfb)return null;return{'code':_0x47edfb[_0x5b1884(0x5f2)],'message':_0x3837c2(_0x47edfb[_0x5b1884(0x2e4)])?_0x5b1884(0x3f5)+_0x3837c2(_0x47edfb[_0x5b1884(0x2e4)]):'Validation\x20failed','details':_0x47edfb[_0x5b1884(0x2e4)]};}async[_0x23e96f(0x2bc)](_0x4c6995){const _0x399154=_0x23e96f;if(_0x4c6995[_0x399154(0x1d4)]==='OPTIONS'){const _0x29b310=this[_0x399154(0x149)](_0x399154(0x24e),_0x4c6995['path'],{'corsOnly':!![]});if(_0x29b310)return{'status':0xcc,'headers':_0x59e694(_0x4c6995[_0x399154(0x95)],_0x29b310[_0x399154(0x2fe)][_0x399154(0x10a)],_0x29b310['method'])||{}};}const _0x40cd31=this[_0x399154(0x149)](_0x4c6995[_0x399154(0x1d4)],_0x4c6995['path']);if(_0x40cd31){const _0x370104=_0x40cd31[_0x399154(0x22d)][_0x399154(0x6b0)][_0x399154(0x1e0)](_0x4c6995[_0x399154(0x5a4)]),_0x480916={};_0x40cd31[_0x399154(0x22d)][_0x399154(0x2b3)][_0x399154(0x44d)]((_0x3a1e58,_0x4acbf7)=>{const _0x218c78=_0x399154,_0x3c6122=_0x370104[_0x4acbf7+0x1];_0x480916[_0x3a1e58]=_0x3c6122?decodeURIComponent(_0x3c6122):_0x40cd31[_0x218c78(0x22d)][_0x218c78(0x59f)][_0x3a1e58]??undefined;}),_0x4c6995[_0x399154(0x542)]=_0x480916;try{const _0x275afc=await _0x40cd31[_0x399154(0x47e)]({'params':_0x480916,'body':_0x4c6995[_0x399154(0x459)],'query':_0x4c6995[_0x399154(0xb5)],'headers':_0x4c6995[_0x399154(0x95)],'context':_0x4c6995['context']}),_0x454d17=_0x3703b8(_0x275afc),_0x5c0d06=_0x59e694(_0x4c6995['headers'],_0x40cd31[_0x399154(0x2fe)]?.[_0x399154(0x10a)],_0x40cd31['method']);if(!_0x5c0d06)return _0x454d17;return{..._0x454d17,'headers':{..._0x454d17[_0x399154(0x95)]||{},..._0x5c0d06}};}catch(_0x1812da){const _0x51c70=_0x1812da?.[_0x399154(0x54e)]||_0x4280ca[_0x1812da?.['code']]||0x1f4;return{'status':_0x51c70,'body':{'error':_0x1812da[_0x399154(0x5a3)]||_0x399154(0x105),'code':_0x1812da?.[_0x399154(0x5f2)]||_0x52c01d[_0x51c70]||_0x399154(0x32c)+_0x51c70,'message':_0x1812da?.[_0x399154(0x5a3)]||_0x399154(0x105),..._0x1812da?.['details']!=null?{'details':_0x1812da[_0x399154(0x744)]}:{}}};}}return{'status':0x194,'body':{'error':'Not\x20Found'}};}[_0x23e96f(0x4ce)](_0x17a872,_0x3f8939={}){const _0x18314c=_0x23e96f;if(typeof _0x3f8939===_0x18314c(0x242)||Array[_0x18314c(0x17b)](_0x3f8939))_0x3f8939={'host':_0x3f8939};_0x3f8939=_0x3f8939??{};const _0x5056fb=Number(_0x3f8939[_0x18314c(0x6d7)])||0x0;if(_0x5056fb>=0x1||_0x3f8939[_0x18314c(0x643)]!=null||_0x3f8939[_0x18314c(0x2dd)]!=null){const _0x2ffbc9=new Error(_0x18314c(0x260)+_0x18314c(0x32d)+_0x18314c(0x257)+_0x18314c(0x455));_0x2ffbc9[_0x18314c(0x5f2)]=_0x18314c(0x5ef);throw _0x2ffbc9;}if(this[_0x18314c(0x6db)])throw new Error(_0x18314c(0x173));const _0x377c54=_0x3f8939[_0x18314c(0x27a)]==null?[undefined]:[]['concat'](_0x3f8939['host']);if(!_0x377c54[_0x18314c(0x249)]||_0x377c54['some'](_0x31a648=>_0x31a648!==undefined&&(typeof _0x31a648!==_0x18314c(0x242)||!_0x31a648))){const _0x422602=new Error('http.listen:\x20host\x20must\x20be\x20a\x20non-empty\x20string\x20or\x20an\x20array\x20of\x20them');_0x422602['code']=_0x18314c(0x55c);throw _0x422602;}_0x17a872&&this[_0x18314c(0x62b)][_0x18314c(0x402)]===_0x18314c(0x24b)&&(this[_0x18314c(0x62b)][_0x18314c(0x402)]=_0x18314c(0xff)+_0x17a872,this[_0x18314c(0x68a)]?.['auth']&&(this[_0x18314c(0x68a)]['auth'][_0x18314c(0x549)]=this[_0x18314c(0x62b)][_0x18314c(0x402)]));const _0x23cb0d=this[_0x18314c(0x68a)]?.['options']?.[_0x18314c(0x6ff)]?.[_0x18314c(0x53f)]??![],_0x5afc95=async(_0x3430aa,_0x585509)=>{const _0x593e49=_0x18314c,_0x37e4d3=Date[_0x593e49(0x28a)]();if(_0x23cb0d){const _0x1940af=_0x3430aa[_0x593e49(0x1d0)]||'/',_0x58ee20=_0x3430aa[_0x593e49(0x95)]?.[_0x593e49(0x620)]?_0x3430aa[_0x593e49(0x95)][_0x593e49(0x620)]['replace'](/^Bearer\s+(\S{0,8})\S*/i,'Bearer\x20$1…'):'-',_0x5c8c37=_0x3430aa['headers']?.[_0x593e49(0x4ee)]||'-',_0x5efc26=_0x3430aa[_0x593e49(0x95)]?.[_0x593e49(0x21b)]||_0x3430aa[_0x593e49(0x95)]?.[_0x593e49(0x424)]||'-',_0x1c9c72=_0x3430aa['headers']?.[_0x593e49(0x515)]||'-';process['stdout'][_0x593e49(0x360)](_0x593e49(0x192)+_0x3430aa[_0x593e49(0x1d4)]['padEnd'](0x7)+'\x20'+_0x1940af[_0x593e49(0x5b9)](0x2d)+'\x20'+('auth='+_0x58ee20+'\x20origin='+_0x1c9c72+_0x593e49(0x739)+_0x5c8c37+'\x20cf-ip='+_0x5efc26+'\x0a'));}try{const _0x50c9a7=new _0x43ed2e(_0x3430aa[_0x593e49(0x1d0)],'http://'+_0x3430aa['headers'][_0x593e49(0x27a)]),_0x4451b7=this[_0x593e49(0x1d7)](_0x3430aa[_0x593e49(0x1d4)],_0x50c9a7[_0x593e49(0x188)]),_0x255c5d=_0x4451b7?.[_0x593e49(0x2fe)]?.[_0x593e49(0x440)]===!![];if(_0x255c5d){const _0x1ee4f0=_0x3430aa[_0x593e49(0x95)]?.['content-length'];if(_0x1ee4f0!=null){const _0x2e2459=Number(_0x1ee4f0);if(Number[_0x593e49(0x314)](_0x2e2459)&&_0x2e2459>this[_0x593e49(0x70b)]){_0x585509[_0x593e49(0xe6)]=0x19d,_0x585509['end']('Payload\x20too\x20large');return;}}}const _0x45bcfa=_0x255c5d?null:await _0x39eacf(_0x3430aa,this[_0x593e49(0x70b)]),_0x47612f=_0x255c5d?_0x3183b4(_0x3430aa,this[_0x593e49(0x70b)]):undefined,_0x34e5b7=await this[_0x593e49(0x373)](_0x3430aa[_0x593e49(0x1d4)],_0x50c9a7['pathname'],{'body':_0x45bcfa,'query':Object['fromEntries'](_0x50c9a7[_0x593e49(0xcb)]['entries']()),'headers':_0x3430aa[_0x593e49(0x95)]},{'req':_0x3430aa,'res':_0x585509,'rawStream':_0x47612f}),_0x21cea6=this[_0x593e49(0x1d7)](_0x3430aa['method'],_0x50c9a7[_0x593e49(0x188)]),_0x529f19=Date[_0x593e49(0x28a)]()-_0x37e4d3,_0xeaad75=this[_0x593e49(0x659)](_0x21cea6,_0x34e5b7)?this[_0x593e49(0x367)](_0x34e5b7,_0x529f19):_0x3703b8(_0x34e5b7),_0x30963a=(_0xeaad75['status']||0xc8)>=0x190;this[_0x593e49(0x451)]['record'](_0x3430aa['method'],_0x529f19,_0x30963a),_0x18823a(_0x585509,_0xeaad75);if(_0x23cb0d){const _0x418b13=_0xeaad75[_0x593e49(0x54e)]||0xc8,_0x41cbf6=Date[_0x593e49(0x28a)]()-_0x37e4d3;process[_0x593e49(0x45e)][_0x593e49(0x360)]('[res]\x20'+_0x3430aa['method']['padEnd'](0x7)+'\x20'+_0x50c9a7[_0x593e49(0x188)][_0x593e49(0x5b9)](0x2d)+'\x20'+_0x418b13+'\x20\x20'+_0x41cbf6+_0x593e49(0x1ff));}}catch(_0x3d29bc){const _0x3f2b07=Date['now']()-_0x37e4d3;this['metrics']['record'](_0x3430aa['method'],_0x3f2b07,!![]);const _0x323fde=_0x3d29bc?.['status']||0x1f4;_0x585509['statusCode']=_0x323fde,_0x323fde===0x19d?_0x585509[_0x593e49(0x5aa)]('Payload\x20too\x20large'):_0x585509['end'](_0x3d29bc['message']||_0x593e49(0x105));}};this[_0x18314c(0x6bc)]=_0x377c54[_0x18314c(0x539)](_0x5d0a01=>{const _0x2ef0f6=_0x18314c,_0x4333a1=_0x400df9[_0x2ef0f6(0x10b)](_0x5afc95);_0x4333a1['on'](_0x2ef0f6(0x179),_0x4e0961=>{const _0x10d85a=_0x2ef0f6;this['_sockets']['add'](_0x4e0961),_0x4e0961['on'](_0x10d85a(0x5b2),()=>this[_0x10d85a(0x1bd)][_0x10d85a(0x495)](_0x4e0961));});if(_0x5d0a01===undefined)_0x4333a1[_0x2ef0f6(0x4ce)](_0x17a872);else _0x4333a1[_0x2ef0f6(0x4ce)](_0x17a872,_0x5d0a01);return _0x4333a1;}),this['server']=this[_0x18314c(0x6bc)][0x0];for(const _0x476565 of this[_0x18314c(0x6bc)][_0x18314c(0x3e6)](0x1))_0x476565['on']('error',_0x2ab9fa=>this[_0x18314c(0x6db)]?.[_0x18314c(0x326)](_0x18314c(0x271),_0x2ab9fa));const _0x5ed54b=_0x24c952(_0x17a872,_0x3f8939[_0x18314c(0x27a)]),_0x24bcf1=this[_0x18314c(0x68a)];return _0x24bcf1?.['processes']&&(_0x24bcf1[_0x18314c(0xa0)][_0x18314c(0x3c1)](_0x5ed54b),require$$1$1['isWorker']?_0x24bcf1[_0x18314c(0x4b2)]?.({'kind':_0x18314c(0x513)})['catch'](()=>{}):_0x24bcf1['_activateProcesses']?.({'kind':_0x18314c(0x61a),'listenAddr':_0x5ed54b})['catch'](()=>{})),this[_0x18314c(0x6db)];}async['close'](_0x57e62f={}){const _0x2cfc47=_0x23e96f,_0x1dc2e6=this[_0x2cfc47(0x6db)];this[_0x2cfc47(0x6db)]=null;const _0x42e44b=this[_0x2cfc47(0x6bc)][_0x2cfc47(0x52b)](_0x1dc2e6)?this[_0x2cfc47(0x6bc)]:_0x1dc2e6?[_0x1dc2e6]:[];this['servers']=[];if(_0x1dc2e6&&_0x1dc2e6['_isClusterController']){try{await _0x1dc2e6[_0x2cfc47(0x5b2)]();}catch{}this[_0x2cfc47(0x451)]&&this[_0x2cfc47(0x451)]['close']();return;}if(_0x42e44b[_0x2cfc47(0x249)]){const _0x193089=Number[_0x2cfc47(0x314)](_0x57e62f[_0x2cfc47(0xf6)])?Math[_0x2cfc47(0x234)](0x0,_0x57e62f[_0x2cfc47(0xf6)]):0x3e8,_0x58bb16=_0x1ee156=>new Promise(_0x23f1d2=>{const _0x1e76a4=_0x2cfc47;let _0x50e6de=![],_0x524893=null,_0x433ade=null;const _0x2c3f3b=()=>{if(_0x50e6de)return;_0x50e6de=!![];if(_0x524893)clearTimeout(_0x524893);if(_0x433ade)clearTimeout(_0x433ade);_0x23f1d2();};try{_0x1ee156['close'](_0x2c3f3b);}catch{_0x2c3f3b();return;}try{_0x1ee156[_0x1e76a4(0x39e)]?.();}catch{}_0x524893=setTimeout(()=>{const _0x43fce2=_0x1e76a4;try{_0x1ee156[_0x43fce2(0x1b2)]?.();}catch{}for(const _0x4b87f4 of this['_sockets']){try{_0x4b87f4[_0x43fce2(0x670)]();}catch{}}_0x433ade=setTimeout(_0x2c3f3b,0x64),_0x433ade[_0x43fce2(0x1b3)]?.();},_0x193089),_0x524893[_0x1e76a4(0x1b3)]?.();});await Promise[_0x2cfc47(0xbf)](_0x42e44b['map'](_0x58bb16));}this[_0x2cfc47(0x451)]&&this[_0x2cfc47(0x451)][_0x2cfc47(0x5b2)]();}[_0x23e96f(0x5b8)](_0xc5b528,_0x27db30,_0x54466e=0x36ee80){const _0x370c31=_0x23e96f,_0x3dd018=Date[_0x370c31(0x28a)](),_0x510cc0=Buffer[_0x370c31(0x4f7)](JSON[_0x370c31(0x316)]({'iat':_0x3dd018,'exp':_0x3dd018+_0x54466e,..._0xc5b528}))[_0x370c31(0x299)](_0x370c31(0x6d5)),_0x4535da=_0x4aafa3(_0x510cc0,_0x27db30);return _0x510cc0+'.'+_0x4535da;}['formatCookie'](_0x479d88,_0x5ed191={}){const _0x38d34a=_0x23e96f,{httpOnly:httpOnly=!![],sameSite:sameSite=_0x38d34a(0x61c),path:path='/',secure:secure=![],maxAge:maxAge=null,expires:expires=null}=_0x5ed191;let _0x2bf29f=this[_0x38d34a(0x62b)][_0x38d34a(0x402)]+'='+_0x479d88;if(httpOnly)_0x2bf29f+=_0x38d34a(0x59b);if(sameSite)_0x2bf29f+=_0x38d34a(0x616)+sameSite;if(path)_0x2bf29f+=_0x38d34a(0x446)+path;if(secure)_0x2bf29f+=_0x38d34a(0x13e);if(Number['isFinite'](maxAge))_0x2bf29f+=_0x38d34a(0x221)+Math[_0x38d34a(0x234)](0x0,Math[_0x38d34a(0x557)](maxAge));if(expires instanceof Date)_0x2bf29f+=';\x20Expires='+expires[_0x38d34a(0x408)]();return _0x2bf29f;}[_0x23e96f(0x325)](_0x4d578c=this[_0x23e96f(0x62b)][_0x23e96f(0x402)],_0x557ab9={}){const _0x2dad63=_0x23e96f,{path:path='/',sameSite:sameSite=_0x2dad63(0x61c),secure:secure=![],httpOnly:httpOnly=!![]}=_0x557ab9;let _0x29bf6a=_0x4d578c+'=';if(httpOnly)_0x29bf6a+=';\x20HttpOnly';if(sameSite)_0x29bf6a+=_0x2dad63(0x616)+sameSite;if(path)_0x29bf6a+=_0x2dad63(0x446)+path;if(secure)_0x29bf6a+=_0x2dad63(0x13e);return _0x29bf6a+=_0x2dad63(0x1d3),_0x29bf6a;}[_0x23e96f(0x246)](_0x3d3c64,_0xb4a054){const _0x3d16ef=_0x23e96f;if(!_0x3d3c64)return null;const [_0x2a53cc,_0x159858]=String(_0x3d3c64)['split']('.');if(!_0x2a53cc||!_0x159858)return null;const _0xb41e=_0x4aafa3(_0x2a53cc,_0xb4a054);if(!_0x385d7b(_0x159858,_0xb41e))return null;try{const _0x42995e=JSON[_0x3d16ef(0x2fd)](Buffer['from'](_0x2a53cc,_0x3d16ef(0x6d5))[_0x3d16ef(0x299)]());if(_0x42995e[_0x3d16ef(0x492)]<=Date[_0x3d16ef(0x28a)]())return null;return _0x42995e;}catch{return null;}}[_0x23e96f(0xc5)](_0x63639){const _0x243149=_0x23e96f;if(this[_0x243149(0x68a)]?.[_0x243149(0x62b)])return this[_0x243149(0x68a)][_0x243149(0x62b)][_0x243149(0xc5)](_0x63639);return _0x367e93(_0x63639);}[_0x23e96f(0x298)](_0x2266c5){const _0x23f6bc=_0x23e96f;if(this['_okdb']?.[_0x23f6bc(0x62b)])return this[_0x23f6bc(0x68a)][_0x23f6bc(0x62b)][_0x23f6bc(0x298)](_0x2266c5);const _0x255b1c=this[_0x23f6bc(0x553)]?.[_0x23f6bc(0x1b9)]??0x36ee80,_0x4b1b5a=this[_0x23f6bc(0x553)]?.[_0x23f6bc(0x390)];return _0x42f7b4(_0x2266c5,_0x4b1b5a,_0x255b1c);}['authenticateToken'](_0x19f600){const _0x319d9f=_0x23e96f;if(this[_0x319d9f(0x68a)]?.[_0x319d9f(0x62b)])return this['_okdb']['auth']['authenticateToken'](_0x19f600);const _0x58db49=this['_authOptions']?.[_0x319d9f(0x390)];return _0xfc399(_0x19f600,_0x58db49);}async['authenticateRequest'](_0x5f357c){const _0x5669a6=_0x23e96f;if(this[_0x5669a6(0x68a)]?.[_0x5669a6(0x62b)])return this[_0x5669a6(0x68a)][_0x5669a6(0x62b)]['authenticateRequest'](_0x5f357c);if(_0x5f357c['context']?.[_0x5669a6(0x48c)]===!![]||this[_0x5669a6(0xfd)]===_0x5669a6(0x472))return{'id':_0x5669a6(0x702),'username':_0x5669a6(0x702),'roles':[_0x5669a6(0x619)],'isAuthenticated':!![],'isSystem':!![],'user':{'id':_0x5669a6(0x702),'username':_0x5669a6(0x702),'roles':[_0x5669a6(0x619)],'isAuthenticated':!![],'isSystem':!![]}};const _0x9e1dc5=this[_0x5669a6(0xc5)](_0x5f357c[_0x5669a6(0x95)]?.[_0x5669a6(0x620)]),_0x2e98c6=_0x5f357c[_0x5669a6(0x2c2)]?.[this['auth']['cookieName']],_0x371598=_0x9e1dc5||_0x2e98c6;if(!_0x371598)return{'isAuthenticated':![],'isSystem':![],'user':null};const _0x483bb0=this[_0x5669a6(0x67c)](_0x371598);if(!_0x483bb0)return{'isAuthenticated':![],'isSystem':![],'user':null};const _0x3e1464={'id':_0x483bb0[_0x5669a6(0x69d)]??null,'username':_0x483bb0[_0x5669a6(0x247)]??null,'roles':Array['isArray'](_0x483bb0[_0x5669a6(0x252)])?_0x483bb0[_0x5669a6(0x252)]:[],'isAuthenticated':!![],'isSystem':![]};return{'id':_0x3e1464['id'],'username':_0x3e1464[_0x5669a6(0x247)],'roles':_0x3e1464['roles'],'isAuthenticated':!![],'isSystem':![],'user':_0x3e1464,'claims':_0x483bb0,'subject':_0x3e1464['id']};}async[_0x23e96f(0x4bb)](_0x3a30a0,_0xf96cc7={}){const _0x34533f=_0x23e96f,_0x2651e4=_0x192dbd(_0x3a30a0),_0xe4a91b=Array[_0x34533f(0x17b)](_0xf96cc7['allowedAlgs'])&&_0xf96cc7[_0x34533f(0x5e2)][_0x34533f(0x249)]>0x0?_0xf96cc7[_0x34533f(0x5e2)]:[_0x34533f(0xc0),_0x34533f(0xd3)],_0x176142=_0x2651e4[_0x34533f(0x603)]?.['alg'];if(!_0xe4a91b[_0x34533f(0x52b)](_0x176142))throw new Error(_0x34533f(0x690)+_0x176142);if(!_0x2651e4[_0x34533f(0x603)]?.['kid'])throw new Error('JWT\x20is\x20missing\x20kid');const _0x41d3f8=await this[_0x34533f(0x635)](_0xf96cc7);if(!_0x41d3f8?.[_0x34533f(0x582)])throw new Error(_0x34533f(0x71a));const _0xc77d6f=await this[_0x34533f(0x50e)](_0x41d3f8['jwks_uri'],_0x2651e4[_0x34533f(0x603)][_0x34533f(0x6f5)],_0xf96cc7);if(!_0x32476b(_0x176142,_0xc77d6f,_0x2651e4[_0x34533f(0x67e)],_0x2651e4[_0x34533f(0x6e2)]))throw new Error(_0x34533f(0x5da));const _0x1ad4d7=Math[_0x34533f(0x557)](Date['now']()/0x3e8),_0x35dff2=_0x2651e4[_0x34533f(0x310)]||{};if(_0x35dff2[_0x34533f(0x642)]!==_0x41d3f8['issuer'])throw new Error(_0x34533f(0x692));const _0x168b2e=_0xf96cc7[_0x34533f(0x496)];if(_0x168b2e){const _0x1ae2f7=_0x2d8187(_0x35dff2[_0x34533f(0x70c)]);if(!_0x1ae2f7[_0x34533f(0x52b)](_0x168b2e))throw new Error(_0x34533f(0x3aa));}if(typeof _0x35dff2[_0x34533f(0x492)]!=='number'||_0x35dff2[_0x34533f(0x492)]<=_0x1ad4d7)throw new Error(_0x34533f(0x24f));if(_0x35dff2[_0x34533f(0x73a)]!=null&&_0x35dff2[_0x34533f(0x73a)]>_0x1ad4d7)throw new Error(_0x34533f(0x92));if(_0x35dff2[_0x34533f(0x148)]==='id')throw new Error(_0x34533f(0x227));return{'subject':_0x35dff2[_0x34533f(0x69d)]??null,'email':_0x35dff2['email']??null,'scopes':typeof _0x35dff2['scope']===_0x34533f(0x242)?_0x35dff2[_0x34533f(0x20c)]['split'](/\s+/)['filter'](Boolean):[],'claims':_0x35dff2,'tokenType':_0x34533f(0x4e9)};}async[_0x23e96f(0x635)](_0x1b8c6b={}){const _0x4703e3=_0x23e96f,_0x15e97e=String(_0x1b8c6b[_0x4703e3(0x10d)]||'')[_0x4703e3(0x176)](/\/+$/,'');if(!_0x15e97e)return null;const _0x572fbd=Number[_0x4703e3(0x314)](_0x1b8c6b[_0x4703e3(0x2f8)])?_0x1b8c6b[_0x4703e3(0x2f8)]:0xa*0x3c*0x3e8;if(this[_0x4703e3(0x6b3)]?.['issuer']===_0x15e97e&&this['_oidcDiscoveryCache'][_0x4703e3(0x6aa)]>Date[_0x4703e3(0x28a)]())return this['_oidcDiscoveryCache']['value'];const _0x4c386c=await _0x4ff148(_0x15e97e+_0x4703e3(0x6f8)),_0x126387={'issuer':_0x4c386c[_0x4703e3(0x10d)]||_0x15e97e,'authorization_endpoint':_0x1b8c6b[_0x4703e3(0x5ff)]||_0x4c386c[_0x4703e3(0x2b7)],'token_endpoint':_0x1b8c6b[_0x4703e3(0x482)]||_0x4c386c['token_endpoint'],'jwks_uri':_0x1b8c6b[_0x4703e3(0x545)]||_0x4c386c[_0x4703e3(0x582)]};return this[_0x4703e3(0x6b3)]={'issuer':_0x15e97e,'value':_0x126387,'expiresAt':Date[_0x4703e3(0x28a)]()+_0x572fbd},_0x126387;}async['_fetchJwks'](_0x5ca9e3,_0x405ead=0x5*0x3c*0x3e8){const _0x3e46dd=_0x23e96f,_0x3f1f47=await _0x4ff148(_0x5ca9e3),_0x4d181a=new Map();for(const _0x1fd020 of _0x3f1f47[_0x3e46dd(0x2b3)]||[]){if(!_0x1fd020?.[_0x3e46dd(0x6f5)])continue;_0x4d181a[_0x3e46dd(0x494)](_0x1fd020['kid'],_0x821b48(_0x1fd020));}return this[_0x3e46dd(0x6a2)]={'uri':_0x5ca9e3,'keys':_0x4d181a,'expiresAt':Date[_0x3e46dd(0x28a)]()+_0x405ead},this[_0x3e46dd(0x6a2)];}async[_0x23e96f(0x50e)](_0x518d9c,_0x1db740,_0x159358={}){const _0x285c5f=_0x23e96f,_0x1f32fb=Number[_0x285c5f(0x314)](_0x159358['jwksTtlMs'])?_0x159358[_0x285c5f(0x4aa)]:0x5*0x3c*0x3e8,_0x25300f=0x1e*0x3e8,_0x495a42=this[_0x285c5f(0xee)][_0x285c5f(0x1ed)](_0x1db740);if(_0x495a42!==undefined&&_0x495a42>Date[_0x285c5f(0x28a)]())throw new Error(_0x285c5f(0x278)+_0x1db740);(!this[_0x285c5f(0x6a2)]||this[_0x285c5f(0x6a2)][_0x285c5f(0x633)]!==_0x518d9c||this[_0x285c5f(0x6a2)][_0x285c5f(0x6aa)]<=Date[_0x285c5f(0x28a)]())&&await this[_0x285c5f(0x193)](_0x518d9c,_0x1f32fb);let _0x29f7d4=this[_0x285c5f(0x6a2)]?.[_0x285c5f(0x2b3)]?.['get'](_0x1db740);if(_0x29f7d4)return _0x29f7d4;await this['_fetchJwks'](_0x518d9c,_0x1f32fb),_0x29f7d4=this['_jwksCache']?.['keys']?.['get'](_0x1db740);if(!_0x29f7d4){this[_0x285c5f(0xee)][_0x285c5f(0x494)](_0x1db740,Date[_0x285c5f(0x28a)]()+_0x25300f);throw new Error('Unknown\x20JWKS\x20kid:\x20'+_0x1db740);}return _0x29f7d4;}['_normalizeOAuthAuthResult'](_0x1c127b){const _0x31ae68=_0x23e96f;if(this[_0x31ae68(0x68a)]?.[_0x31ae68(0x62b)])return this[_0x31ae68(0x68a)]['auth'][_0x31ae68(0x6ae)](_0x1c127b);const _0x17695d=_0x1c127b?.[_0x31ae68(0x514)]||{},_0x2a1dd0={'sub':_0x1c127b?.['subject']??_0x17695d[_0x31ae68(0x69d)]??null,'email':_0x1c127b?.[_0x31ae68(0x4dc)]??_0x17695d[_0x31ae68(0x4dc)]??null,'name':_0x1c127b?.[_0x31ae68(0x1cf)]??_0x17695d[_0x31ae68(0x1cf)]??_0x17695d['preferred_username']??null,'groups':_0x1c127b?.[_0x31ae68(0x141)]??_0x17695d[_0x31ae68(0x141)]??[],'roles':_0x1c127b?.[_0x31ae68(0x252)]??_0x17695d[_0x31ae68(0x252)]??[]};return{'type':_0x31ae68(0x44b),'tokenType':_0x1c127b?.[_0x31ae68(0x379)]??_0x31ae68(0x4e9),'subject':_0x2a1dd0[_0x31ae68(0x69d)],'email':_0x2a1dd0[_0x31ae68(0x4dc)],'scopes':_0x1c127b?.[_0x31ae68(0x4c7)]??_0x17695d[_0x31ae68(0x20c)]?.[_0x31ae68(0x48b)]?.('\x20')?.[_0x31ae68(0x69e)](Boolean)??[],'claims':_0x17695d,'user':_0x2a1dd0,'isAuthenticated':!![]};}['createLoginState'](_0x56cf4d={},_0x1a6c63=0x927c0){const _0x2f841b=_0x23e96f;if(this[_0x2f841b(0x68a)]?.[_0x2f841b(0x62b)])return this[_0x2f841b(0x68a)]['auth'][_0x2f841b(0x184)](_0x56cf4d,_0x1a6c63);const _0x2bcebd=_0x12e54f(0x18);this[_0x2f841b(0x32b)][_0x2f841b(0x494)](_0x2bcebd,{..._0x56cf4d,'exp':Date[_0x2f841b(0x28a)]()+_0x1a6c63});if(this['_loginStates'][_0x2f841b(0xd1)]%0x32===0x0){const _0x291922=Date['now']();for(const [_0x5ae554,_0x1c9ff9]of this[_0x2f841b(0x32b)]){if(_0x1c9ff9['exp']<=_0x291922)this[_0x2f841b(0x32b)]['delete'](_0x5ae554);}}return _0x2bcebd;}['consumeLoginState'](_0x59f88f){const _0x747700=_0x23e96f;if(this[_0x747700(0x68a)]?.[_0x747700(0x62b)])return this[_0x747700(0x68a)][_0x747700(0x62b)][_0x747700(0x8c)](_0x59f88f);if(!_0x59f88f)return null;const _0x29ab0a=this[_0x747700(0x32b)][_0x747700(0x1ed)](_0x59f88f);this[_0x747700(0x32b)][_0x747700(0x495)](_0x59f88f);if(!_0x29ab0a)return null;if(_0x29ab0a[_0x747700(0x492)]<=Date['now']())return null;return _0x29ab0a;}}function _0x3703b8(_0x40d52c){const _0x4c9c28=_0x23e96f;if(_0x40d52c==null)return{'status':0xcc};if(Buffer[_0x4c9c28(0x43c)](_0x40d52c)||_0x4d4403(_0x40d52c))return{'status':0xc8,'body':_0x40d52c};if(typeof _0x40d52c===_0x4c9c28(0x245)&&_0x4c9c28(0x54e)in _0x40d52c){if(!(_0x4c9c28(0x459)in _0x40d52c)&&!_0x4d4403(_0x40d52c[_0x4c9c28(0x459)])){const {status:_0x42d325,headers:_0x3f08b1,..._0x576bc4}=_0x40d52c;if(Object[_0x4c9c28(0x2b3)](_0x576bc4)[_0x4c9c28(0x249)]>0x0)return{'status':_0x42d325,'headers':_0x3f08b1,'body':_0x576bc4};}return _0x40d52c;}return{'status':0xc8,'body':_0x40d52c};}function _0x4d4403(_0x1501a5){const _0x3a01de=_0x23e96f;return _0x1501a5&&typeof _0x1501a5[_0x3a01de(0x270)]==='function';}function _0x3183b4(_0x13fd0f,_0x14e582){const _0x220d3f=_0x23e96f,{PassThrough:_0x27a286}=require$$5;let _0x45d4e0=0x0,_0x43090a=![];const _0x31a47c=new _0x27a286();return _0x13fd0f['on'](_0x220d3f(0x527),_0x4ecd54=>{const _0x479fb6=_0x220d3f;if(_0x43090a)return;_0x45d4e0+=_0x4ecd54[_0x479fb6(0x249)];if(_0x45d4e0>_0x14e582){_0x43090a=!![];const _0x3483b3=new Error(_0x479fb6(0x4f4));_0x3483b3[_0x479fb6(0x54e)]=0x19d,_0x31a47c[_0x479fb6(0x670)](_0x3483b3);return;}if(!_0x31a47c[_0x479fb6(0x11e)])_0x31a47c[_0x479fb6(0x39b)](_0x4ecd54);}),_0x13fd0f['on']('end',()=>{const _0x2b5bc7=_0x220d3f;!_0x43090a&&!_0x31a47c[_0x2b5bc7(0x11e)]&&(_0x43090a=!![],_0x31a47c['end']());}),_0x13fd0f['on'](_0x220d3f(0x271),_0x21cf86=>{const _0x46164c=_0x220d3f;if(!_0x31a47c[_0x46164c(0x11e)])_0x31a47c[_0x46164c(0x670)](_0x21cf86);}),_0x13fd0f['pause'](),_0x31a47c['on'](_0x220d3f(0xed),()=>{const _0x208a14=_0x220d3f;if(!_0x31a47c[_0x208a14(0x11e)])_0x13fd0f[_0x208a14(0xed)]();}),_0x31a47c;}function _0x39eacf(_0x1467bc,_0x219945){const _0x3a524a=_0x23e96f;if(_0x1467bc[_0x3a524a(0x1d4)]==='GET'||_0x1467bc['method']===_0x3a524a(0x57d))return null;const _0xc6db11=_0x1467bc[_0x3a524a(0x95)]?.[_0x3a524a(0xbe)];if(_0xc6db11!=null){const _0xde4fcc=Number(_0xc6db11);if(Number[_0x3a524a(0x314)](_0xde4fcc)&&_0xde4fcc>_0x219945){const _0x3a114f=new Error(_0x3a524a(0x4f4));_0x3a114f[_0x3a524a(0x54e)]=0x19d;throw _0x3a114f;}}return new Promise((_0x339716,_0x30c179)=>{const _0x79b5bd=_0x3a524a;let _0x34b27c='',_0x5e91cd=0x0;_0x1467bc['on']('data',_0x3d1a12=>{const _0x12983c=_0x3dbc;_0x5e91cd+=_0x3d1a12['length'];if(_0x5e91cd>_0x219945){try{_0x1467bc['destroy']();}catch{}const _0x1de7eb=new Error('Payload\x20too\x20large');_0x1de7eb[_0x12983c(0x54e)]=0x19d,_0x30c179(_0x1de7eb);return;}_0x34b27c+=_0x3d1a12;}),_0x1467bc['on']('end',()=>{const _0x322221=_0x3dbc;if(!_0x34b27c)return _0x339716(null);const _0x524db9=_0x1467bc[_0x322221(0x95)]?.[_0x322221(0x63a)]||'';if(_0x524db9[_0x322221(0x52b)](_0x322221(0x51c))){const _0x4205b0={};for(const [_0x268538,_0x351b6c]of new URLSearchParams(_0x34b27c))_0x4205b0[_0x268538]=_0x351b6c;return _0x339716(_0x4205b0);}try{_0x339716(JSON[_0x322221(0x2fd)](_0x34b27c));}catch(_0x3d39d2){_0x30c179(_0x3d39d2);}}),_0x1467bc['on'](_0x79b5bd(0x271),_0x30c179);});}function _0x18823a(_0x1ce6aa,_0x32dfb8){const _0x525c86=_0x23e96f,{status:status=0xc8,headers:headers={},body:_0x26291a}=_0x32dfb8;_0x1ce6aa[_0x525c86(0xe6)]=status;for(const [_0x47866a,_0x3d06b6]of Object[_0x525c86(0x707)](headers)){_0x1ce6aa[_0x525c86(0x301)](_0x47866a,_0x3d06b6);}if(_0x26291a==null){_0x1ce6aa['end']();return;}if(_0x4d4403(_0x26291a)){_0x26291a[_0x525c86(0x270)](_0x1ce6aa);return;}if(Buffer['isBuffer'](_0x26291a)){_0x1ce6aa[_0x525c86(0x5aa)](_0x26291a);return;}if(typeof _0x26291a===_0x525c86(0x245)){!_0x1ce6aa[_0x525c86(0x695)](_0x525c86(0x437))&&_0x1ce6aa[_0x525c86(0x301)](_0x525c86(0x437),_0x525c86(0x395));_0x1ce6aa[_0x525c86(0x5aa)](JSON[_0x525c86(0x316)](_0x26291a));return;}_0x1ce6aa['end'](String(_0x26291a));}function _0x24c952(_0x3c2fda,_0x552d88){const _0x580098=_0x23e96f;if(_0x552d88==null)return':'+_0x3c2fda;return[]['concat'](_0x552d88)[_0x580098(0x539)](_0x957e40=>(_0x957e40[_0x580098(0x52b)](':')?'['+_0x957e40+']':_0x957e40)+':'+_0x3c2fda)[_0x580098(0x139)](',\x20');}return okdbHttp[_0x23e96f(0x5d5)]=_0x2ac5c5,okdbHttp['exports'][_0x23e96f(0x302)]=_0x24c952,okdbHttp['exports'][_0x23e96f(0x284)]=_0x4280ca,okdbHttp[_0x23e96f(0x5d5)];}var hasRequiredOkdb;function _0x3dbc(_0x3798b0,_0x324b2b){_0x3798b0=_0x3798b0-0x7e;const _0x97900a=_0x9790();let _0x3dbc5f=_0x97900a[_0x3798b0];return _0x3dbc5f;}function requireOkdb(){const _0x3fb590=_0x563deb;if(hasRequiredOkdb)return okdb$1;hasRequiredOkdb=0x1;try{process[_0x3fb590(0x487)]();}catch{}const _0x1492d5=require$$1,_0x16127a=require$$0$1,{resolveWorkers:_0x251fda,isShmbufNative:_0x50dfd5}=requireOkdbWorkers();function _0x465846(_0x261933){const _0x15b9b9=_0x3fb590,_0x6e1d61=_0x261933[_0x15b9b9(0x3e6)](0x2),_0x3bb38a={};let _0x2feb58=0x0;while(_0x2feb58<_0x6e1d61[_0x15b9b9(0x249)]){const _0x1458db=_0x6e1d61[_0x2feb58];if(_0x1458db===_0x15b9b9(0x1b5)||_0x1458db==='-p')_0x3bb38a[_0x15b9b9(0x1c2)]=Number(_0x6e1d61[++_0x2feb58]);else{if(_0x1458db==='--path'||_0x1458db==='-d')_0x3bb38a[_0x15b9b9(0x5a4)]=_0x6e1d61[++_0x2feb58];else{if(_0x1458db===_0x15b9b9(0x4f3)||_0x1458db==='-k')_0x3bb38a[_0x15b9b9(0x6eb)]=_0x6e1d61[++_0x2feb58];else{if(_0x1458db===_0x15b9b9(0x85)||_0x1458db==='-c')_0x3bb38a[_0x15b9b9(0x5df)]=_0x6e1d61[++_0x2feb58];else{if(_0x1458db==='--log-level')_0x3bb38a[_0x15b9b9(0x66e)]=_0x6e1d61[++_0x2feb58];else{if(_0x1458db===_0x15b9b9(0x385))_0x3bb38a[_0x15b9b9(0x6fe)]=!![];else{if(_0x1458db===_0x15b9b9(0x1e9))_0x3bb38a[_0x15b9b9(0x6dd)]=!![];else{if(_0x1458db==='--workers')_0x3bb38a[_0x15b9b9(0x6d7)]=_0x6e1d61[++_0x2feb58];else{if(_0x1458db===_0x15b9b9(0x732))_0x3bb38a[_0x15b9b9(0x200)]=!![];else{if(_0x1458db===_0x15b9b9(0x1e6)||_0x1458db==='-e')_0x3bb38a['env']=_0x6e1d61[++_0x2feb58];else{if(_0x1458db===_0x15b9b9(0x64d))_0x3bb38a['types']=_0x6e1d61[++_0x2feb58];else{if(_0x1458db===_0x15b9b9(0x65b))_0x3bb38a[_0x15b9b9(0x700)]=!![];else{if(_0x1458db===_0x15b9b9(0x689))_0x3bb38a['blobs']=!![];else{if(_0x1458db==='--drop')_0x3bb38a[_0x15b9b9(0xce)]=!![];else{if(_0x1458db===_0x15b9b9(0x349)){const _0x4be71b=[];while(_0x2feb58+0x1<_0x6e1d61[_0x15b9b9(0x249)]&&!_0x6e1d61[_0x2feb58+0x1][_0x15b9b9(0x334)]('--')){_0x4be71b[_0x15b9b9(0x39b)](_0x6e1d61[++_0x2feb58]);}_0x3bb38a[_0x15b9b9(0x472)]=_0x4be71b['length']>0x0?_0x4be71b:!![];}else{if(_0x1458db===_0x15b9b9(0x5f5))_0x3bb38a[_0x15b9b9(0x53f)]=!![];else{if(_0x1458db==='--name')_0x3bb38a[_0x15b9b9(0x1cf)]=_0x6e1d61[++_0x2feb58];else{if(_0x1458db===_0x15b9b9(0x701))_0x3bb38a[_0x15b9b9(0x46c)]=_0x6e1d61[++_0x2feb58];else{if(_0x1458db==='--label')_0x3bb38a['label']=_0x6e1d61[++_0x2feb58];else{if(_0x1458db==='--permissions')_0x3bb38a['permissions']=_0x6e1d61[++_0x2feb58];else{if(_0x1458db==='--grants')_0x3bb38a[_0x15b9b9(0x292)]=_0x6e1d61[++_0x2feb58];else{if(_0x1458db===_0x15b9b9(0x14f))_0x3bb38a[_0x15b9b9(0x121)]=_0x6e1d61[++_0x2feb58];else{if(_0x1458db==='--token')_0x3bb38a[_0x15b9b9(0x574)]=_0x6e1d61[++_0x2feb58];else{if(_0x1458db===_0x15b9b9(0x4b3)||_0x1458db==='-u')_0x3bb38a[_0x15b9b9(0x247)]=_0x6e1d61[++_0x2feb58];else{if(_0x1458db===_0x15b9b9(0x68c))_0x3bb38a[_0x15b9b9(0x5fd)]=_0x6e1d61[++_0x2feb58];else{if(_0x1458db===_0x15b9b9(0x3ba)||_0x1458db==='-v'){const _0x28b3bd=require$$3;console['log'](_0x28b3bd[_0x15b9b9(0x276)]),process['exit'](0x0);}else(_0x1458db===_0x15b9b9(0x6ac)||_0x1458db==='-h')&&(_0x559624(),process[_0x15b9b9(0x719)](0x0));}}}}}}}}}}}}}}}}}}}}}}}}}_0x2feb58++;}return _0x3bb38a;}function _0x559624(){const _0x43ee5d=_0x3fb590;console[_0x43ee5d(0x116)]('\x0a\x20\x20okdb\x20—\x20standalone\x20OKDB\x20server\x0a\x0a\x20\x20Usage:\x0a\x20\x20\x20\x20okdb\x20[options]\x0a\x20\x20\x20\x20okdb\x20<command>\x0a\x0a\x20\x20Options:\x0a\x20\x20\x20\x20-p,\x20--port\x20<port>\x20\x20\x20\x20\x20\x20\x20\x20HTTP\x20port\x20(default:\x208484)\x0a\x20\x20\x20\x20-d,\x20--path\x20<dir>\x20\x20\x20\x20\x20\x20\x20\x20\x20Database\x20directory\x20(default:\x20./okdb-data)\x0a\x20\x20\x20\x20-k,\x20--key\x20\x20<secret>\x20\x20\x20\x20\x20\x20Encryption\x20key\x20for\x20data\x20at\x20rest\x0a\x20\x20\x20\x20-c,\x20--config\x20<file>\x20\x20\x20\x20\x20\x20Config\x20file\x20path\x20(default:\x20.kdbconfig)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--log-level\x20<level>\x20\x20Log\x20level:\x20debug\x20|\x20info\x20|\x20warn\x20|\x20error\x20(default:\x20info)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-repl\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Start\x20server\x20without\x20interactive\x20shell\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-admin\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20admin\x20UI\x0a\x20\x20\x20\x20\x20\x20\x20\x20--open\x20[ip\x20...]\x20\x20\x20\x20\x20\x20Open\x20mode:\x20bypass\x20auth\x20for\x20listed\x20IPs\x20(default:\x20localhost).\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Examples:\x20--open\x20\x20--open\x20192.168.1.0/24\x20\x20--open\x20*\x0a\x20\x20\x20\x20\x20\x20\x20\x20--log-requests\x20\x20\x20\x20\x20\x20\x20Print\x20every\x20HTTP\x20request\x20to\x20stdout\x20(for\x20debugging)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--workers\x20<n>\x20\x20\x20\x20\x20\x20\x20\x20Number\x20of\x20capable\x20worker\x20processes\x20sharing\x20the\x20listen\x20socket\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20(default:\x20cores\x20−\x201).\x20Each\x20worker\x20serves\x20HTTP\x20+\x20SSE\x20AND\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20processes\x20(claims\x20leases,\x20drains\x20on\x20its\x20own\x20loop);\x20the\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20cluster\x20primary\x20is\x20a\x20thin\x20passive\x20supervisor.\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-cluster\x20\x20\x20\x20\x20\x20\x20\x20\x20Run\x20single-process\x20(equivalent\x20to\x20--workers\x201)\x0a\x20\x20\x20\x20-v,\x20--version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Print\x20version\x20and\x20exit\x0a\x20\x20\x20\x20-h,\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x0a\x0a\x20\x20Commands:\x0a\x20\x20\x20\x20version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Print\x20version\x20and\x20exit\x0a\x20\x20\x20\x20doctor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Run\x20health\x20checks\x0a\x20\x20\x20\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Create\x20.kdbconfig\x20and\x20okdb-data/\x0a\x20\x20\x20\x20token\x20create\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Create\x20a\x20token\x20in\x20the\x20local\x20DB\x20(direct\x20access,\x20no\x20HTTP)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--name\x20<name>\x20\x20\x20\x20\x20\x20For\x20password\x20login\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--password\x20<pass>\x20\x20Password\x20(requires\x20--name)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--label\x20<text>\x20\x20\x20\x20\x20Human\x20description\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--permissions\x20<l>\x20\x20Comma-separated\x20baseline\x20permissions\x20(e.g.\x20\x22*\x22\x20or\x20\x22data:read\x22)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--grants\x20<json>\x20\x20\x20\x20Per-env\x20grants\x20as\x20JSON\x20(e.g.\x20\x27{\x22orders\x22:[\x22data:*\x22]}\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--ttl\x20<ms>\x20\x20\x20\x20\x20\x20\x20\x20\x20Optional\x20TTL\x20in\x20milliseconds\x0a\x20\x20\x20\x20token\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20List\x20all\x20tokens\x20in\x20the\x20local\x20DB\x0a\x20\x20\x20\x20token\x20revoke\x20<id>\x20\x20\x20\x20\x20\x20\x20\x20Revoke\x20(delete)\x20a\x20token\x20by\x20id\x20(full\x20uuid\x20or\x20unique\x20prefix)\x0a\x20\x20\x20\x20join\x20<address>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Join\x20an\x20existing\x20cluster\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--token\x20<t>\x20\x20\x20\x20\x20\x20\x20\x20Bearer\x20token\x20from\x20the\x20cluster\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--username\x20<u>\x20\x20\x20\x20\x20Or,\x20username\x20for\x20login\x20exchange\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--password\x20<p>\x20\x20\x20\x20\x20Password\x20for\x20login\x20exchange\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--address\x20<addr>\x20\x20\x20This\x20node\x27s\x20reachable\x20sync\x20address\x20(required)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--path\x20<dir>\x20\x20\x20\x20\x20\x20\x20Local\x20DB\x20path\x0a\x20\x20\x20\x20backup\x20[dir]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Hot\x20backup:\x20LMDB\x20snapshot\x20copy\x20of\x20every\x20env\x20+\x20time-machine\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\x20history\x20+\x20file\x20blobs\x20into\x20a\x20NEW\x20dir\x20(default:\x20./okdb-backup);\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\x20full-text\x20indexes\x20are\x20rebuilt\x20on\x20first\x20open,\x20not\x20copied\x0a\x20\x20\x20\x20restore\x20<dir>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Restore\x20a\x20backup\x20dir\x20into\x20--path\x20(must\x20not\x20exist\x20or\x20be\x20empty)\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\x20\x20\x20\x20okdb\x20restore\x20./my-backup\x20--path\x20./okdb-data\x0a');}const _0x10c9e3=new Set([_0x3fb590(0x6ff),_0x3fb590(0x213),_0x3fb590(0x14c),_0x3fb590(0x271)]);function _0xc08c46(_0x512dd0){const _0x2a125c=_0x3fb590,_0x53175c=_0x512dd0[_0x2a125c(0x5df)]?_0x1492d5[_0x2a125c(0x429)](_0x512dd0[_0x2a125c(0x5df)]):_0x1492d5[_0x2a125c(0x429)]('.kdbconfig');let _0x284175={};if(_0x16127a[_0x2a125c(0x525)](_0x53175c))try{const _0x33e00c=_0x16127a['readFileSync'](_0x53175c,_0x2a125c(0x714))[_0x2a125c(0x176)](/^\uFEFF/,'');_0x284175=JSON[_0x2a125c(0x2fd)](_0x33e00c),console['log'](_0x2a125c(0x142)+_0x53175c);}catch(_0x37f331){console[_0x2a125c(0x271)]('[okdb]\x20failed\x20to\x20parse\x20config\x20file\x20'+_0x53175c+':\x20'+_0x37f331['message']),process[_0x2a125c(0x719)](0x1);}const _0x26c3f5={'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},_0x446042={'port':_0x512dd0[_0x2a125c(0x1c2)]??_0x284175[_0x2a125c(0x1c2)]??_0x26c3f5[_0x2a125c(0x1c2)]??0x2124,'dbPath':_0x512dd0['path']??_0x284175[_0x2a125c(0x5a4)]??_0x26c3f5[_0x2a125c(0x5a4)]??_0x2a125c(0x1b4),'key':_0x512dd0[_0x2a125c(0x6eb)]??_0x284175['key']??_0x26c3f5[_0x2a125c(0x6eb)]??undefined,'logLevel':_0x512dd0[_0x2a125c(0x66e)]??_0x284175[_0x2a125c(0x66e)]??_0x26c3f5[_0x2a125c(0x66e)]??_0x2a125c(0x213),'noRepl':_0x512dd0[_0x2a125c(0x6fe)]??_0x284175[_0x2a125c(0x6fe)]??_0x26c3f5[_0x2a125c(0x6fe)]??![],'noAdmin':_0x512dd0[_0x2a125c(0x6dd)]??_0x284175[_0x2a125c(0x6dd)]??_0x26c3f5[_0x2a125c(0x6dd)]??![],'admin':_0x284175[_0x2a125c(0x619)]??{},'api':_0x284175[_0x2a125c(0x181)]??undefined,'auth':_0x284175[_0x2a125c(0x62b)]??undefined,'mcp':_0x284175[_0x2a125c(0x248)]??undefined,'http':_0x284175[_0x2a125c(0x57f)]??undefined,'backup':_0x284175[_0x2a125c(0x3c4)]??undefined,'timeMachine':_0x284175[_0x2a125c(0x72f)]!==![]?_0x284175['timeMachine']??{}:![],'processors':_0x284175[_0x2a125c(0x6e3)],'engines':_0x284175[_0x2a125c(0x5ad)],'compaction':_0x284175[_0x2a125c(0x4f2)]};if(_0x512dd0[_0x2a125c(0x200)])_0x446042[_0x2a125c(0x200)]=!![];if(_0x512dd0[_0x2a125c(0x6d7)]!==undefined)_0x446042['workersFlag']=_0x512dd0['workers'];_0x512dd0['open']!==undefined&&(_0x446042[_0x2a125c(0x62b)]=_0x446042[_0x2a125c(0x62b)]||{},_0x446042[_0x2a125c(0x62b)][_0x2a125c(0x472)]=_0x512dd0[_0x2a125c(0x472)]);_0x512dd0[_0x2a125c(0x53f)]&&(_0x446042[_0x2a125c(0x6ff)]=_0x446042[_0x2a125c(0x6ff)]||{},_0x446042[_0x2a125c(0x6ff)][_0x2a125c(0x53f)]=!![]);(!Number[_0x2a125c(0x53a)](_0x446042[_0x2a125c(0x1c2)])||_0x446042[_0x2a125c(0x1c2)]<0x1||_0x446042[_0x2a125c(0x1c2)]>0xffff)&&(console['error'](_0x2a125c(0x222)+_0x446042[_0x2a125c(0x1c2)]+_0x2a125c(0x1eb)),process[_0x2a125c(0x719)](0x1));!_0x10c9e3[_0x2a125c(0xe5)](_0x446042[_0x2a125c(0x66e)])&&(console[_0x2a125c(0x271)](_0x2a125c(0x1a7)+_0x446042[_0x2a125c(0x66e)]+'\x22\x20(must\x20be\x20debug|info|warn|error)'),process[_0x2a125c(0x719)](0x1));const _0x39d85e=_0x446042[_0x2a125c(0x57f)]?.[_0x2a125c(0x27a)];_0x39d85e!==undefined&&!(typeof _0x39d85e===_0x2a125c(0x242)&&_0x39d85e)&&!(Array[_0x2a125c(0x17b)](_0x39d85e)&&_0x39d85e[_0x2a125c(0x249)]&&_0x39d85e['every'](_0x3ee0d6=>typeof _0x3ee0d6==='string'&&_0x3ee0d6))&&(console[_0x2a125c(0x271)](_0x2a125c(0x103)+JSON['stringify'](_0x39d85e)+'\x20(must\x20be\x20a\x20string\x20or\x20array\x20of\x20strings)'),process[_0x2a125c(0x719)](0x1));for(const _0x81a1ae of _0x1688d4){_0x446042[_0x81a1ae]!==undefined&&typeof _0x446042[_0x81a1ae]!==_0x2a125c(0x321)&&(console[_0x2a125c(0x271)]('[okdb]\x20invalid\x20config\x20\x22'+_0x81a1ae+'\x22:\x20'+JSON[_0x2a125c(0x316)](_0x446042[_0x81a1ae])+_0x2a125c(0x281)),process[_0x2a125c(0x719)](0x1));}return _0x446042;}const _0x1688d4=['processors',_0x3fb590(0x5ad),'compaction'];function _0x27d7b1(_0x5acab9){const _0x419cbd=_0x3fb590;return!!(_0x5acab9&&typeof _0x5acab9===_0x419cbd(0x245)&&!Array[_0x419cbd(0x17b)](_0x5acab9)&&Object[_0x419cbd(0x2b3)](_0x5acab9)[_0x419cbd(0x249)]>0x0);}function _0x49e43e(_0x503068){const _0x6dec55=_0x3fb590;return{..._0x503068[_0x6dec55(0x6eb)]?{'encryptionKey':_0x503068[_0x6dec55(0x6eb)]}:{},'engines':![],'processors':![],'compaction':![]};}const _0x4c60d5=!process[_0x3fb590(0x45e)][_0x3fb590(0x48d)]||!!process.env.NO_COLOR;function _0x9bd0a5(_0x3365a1,_0xe1a7a0){return _0x4c60d5?_0xe1a7a0:'\x1b['+_0x3365a1+'m'+_0xe1a7a0+'\x1b[0m';}function _0x4913db(_0x406b1e){const _0x4ed4d8=_0x3fb590;if(!_0x406b1e||_0x406b1e['length']===0x0)return;const _0x15f5fa='─'['repeat'](0x38);process[_0x4ed4d8(0x36e)]['write']('\x0a'),process[_0x4ed4d8(0x36e)][_0x4ed4d8(0x360)](_0x9bd0a5('33',_0x4ed4d8(0x3ee)+_0x406b1e['length']+_0x4ed4d8(0x376)+(_0x406b1e['length']>0x1?'S':'')+'\x0a')),process[_0x4ed4d8(0x36e)]['write']('\x20\x20'+_0x15f5fa+'\x0a');for(const _0x522d5c of _0x406b1e){const _0x57247e=_0x522d5c[_0x4ed4d8(0x4d4)]==='error'?_0x9bd0a5('31',_0x4ed4d8(0x339)):_0x9bd0a5('33','\x20\x20⚠');process[_0x4ed4d8(0x36e)][_0x4ed4d8(0x360)](_0x57247e+'\x20\x20'+_0x9bd0a5('1',_0x522d5c[_0x4ed4d8(0x1d8)])+'\x0a'),process[_0x4ed4d8(0x36e)]['write'](_0x4ed4d8(0x72e)+_0x522d5c['message']+'\x0a');if(_0x522d5c[_0x4ed4d8(0x6bf)])process[_0x4ed4d8(0x36e)]['write'](_0x4ed4d8(0x72e)+_0x9bd0a5('2',_0x4ed4d8(0x6b1)+_0x522d5c[_0x4ed4d8(0x6bf)])+'\x0a');process[_0x4ed4d8(0x36e)]['write']('\x0a');}process[_0x4ed4d8(0x36e)][_0x4ed4d8(0x360)]('\x20\x20'+_0x15f5fa+'\x0a\x0a');}function _0x2b8a3a(_0x3e73e7,_0x30e953,_0x2a8b96={}){const _0x4a24a3=_0x3fb590,_0x5723c7=_0x3e73e7[_0x4a24a3(0x57f)][_0x4a24a3(0x4ce)](_0x30e953,_0x2a8b96);if(_0x5723c7&&_0x5723c7[_0x4a24a3(0x1a2)])return Promise[_0x4a24a3(0x429)](_0x5723c7);const _0x27c882=_0x3e73e7[_0x4a24a3(0x57f)][_0x4a24a3(0x6bc)]?.[_0x4a24a3(0x249)]?_0x3e73e7[_0x4a24a3(0x57f)]['servers']:[_0x5723c7];return new Promise((_0x53c37a,_0x453ff4)=>{const _0x206243=_0x4a24a3;_0x5723c7[_0x206243(0x572)]('error',_0x453ff4),Promise['all'](_0x27c882[_0x206243(0x539)](_0x575b1b=>_0x575b1b[_0x206243(0x1a3)]?null:new Promise(_0xacbc79=>_0x575b1b[_0x206243(0x572)]('listening',_0xacbc79))))[_0x206243(0x722)](()=>_0x53c37a(_0x5723c7));});}function _0x57428e(_0x2729aa){const _0x53e4b9=_0x3fb590;return _0x2729aa[_0x53e4b9(0x57f)]?.['host']!==undefined?{'host':_0x2729aa[_0x53e4b9(0x57f)]['host']}:{};}async function _0xf76a20(_0x20c5f7){const _0x39b2af=_0x3fb590,_0x13d5eb=require$$4$1;console[_0x39b2af(0x116)](_0x39b2af(0x145));let _0xa6199d=!![];const _0x33a662=(_0x18a66e,_0x343ddb)=>{const _0x1642d1=_0x39b2af;console[_0x1642d1(0x116)]('\x20\x20'+(_0x18a66e?'✓':'✗')+'\x20'+_0x343ddb);if(!_0x18a66e)_0xa6199d=![];},_0x380205=Number(process['version'][_0x39b2af(0x176)]('v','')['split']('.')[0x0]);_0x33a662(_0x380205>=0x12,_0x39b2af(0x128)+process[_0x39b2af(0x276)]+(_0x380205<0x12?_0x39b2af(0x36f):''));const _0x4a7107=_0x1492d5[_0x39b2af(0x429)](_0x20c5f7['dbPath']);try{_0x16127a['mkdirSync'](_0x4a7107,{'recursive':!![]});const _0x37cac4=_0x1492d5[_0x39b2af(0x139)](_0x4a7107,_0x39b2af(0x358));_0x16127a[_0x39b2af(0x5b6)](_0x37cac4,''),_0x16127a[_0x39b2af(0x56d)](_0x37cac4),_0x33a662(!![],_0x39b2af(0x5d6)+_0x4a7107);}catch(_0x3b300d){_0x33a662(![],_0x39b2af(0x342)+_0x4a7107+_0x39b2af(0x6b9)+_0x3b300d[_0x39b2af(0x5a3)]+')');}const _0x4647a1=await new Promise(_0x1627cc=>{const _0x42210d=_0x39b2af,_0x1b3075=_0x13d5eb[_0x42210d(0x10b)]();_0x1b3075['once']('error',()=>_0x1627cc(![])),_0x1b3075[_0x42210d(0x572)](_0x42210d(0x1a3),()=>{const _0x52b7ee=_0x42210d;_0x1b3075[_0x52b7ee(0x5b2)](),_0x1627cc(!![]);}),_0x1b3075[_0x42210d(0x4ce)](_0x20c5f7['port'],'127.0.0.1');});_0x33a662(_0x4647a1,_0x39b2af(0xd0)+_0x20c5f7[_0x39b2af(0x1c2)]+'\x20'+(_0x4647a1?_0x39b2af(0x637):_0x39b2af(0x6b7)));const _0x2c1985=_0x1492d5[_0x39b2af(0x429)](_0x39b2af(0x3d8));if(_0x16127a[_0x39b2af(0x525)](_0x2c1985))try{JSON[_0x39b2af(0x2fd)](_0x16127a[_0x39b2af(0x3b9)](_0x2c1985,_0x39b2af(0x714))[_0x39b2af(0x176)](/^\uFEFF/,'')),_0x33a662(!![],_0x39b2af(0x681)+_0x2c1985);}catch(_0x3bfac8){_0x33a662(![],_0x39b2af(0x1e2)+_0x3bfac8['message']);}else _0x33a662(!![],_0x39b2af(0x1ea));if(_0x50dfd5()){const _0x50674f=_0x251fda(_0x20c5f7,{'shmbufNative':!![]});_0x33a662(!![],_0x39b2af(0x21c)+_0x50674f+_0x39b2af(0x6e8)+(_0x50674f===0x1?'':'s')+')');}else _0x33a662(!![],'cluster:\x20unavailable\x20(shmbuf\x20native\x20missing)\x20—\x20running\x20single-process');if(!_0x4647a1)try{const _0x4a6ee6=require(_0x39b2af(0x303)),_0x2907a3=new _0x4a6ee6(_0x4a7107,{'engines':![],'processors':![],'compaction':![],'auth':{'open':!![]}});await _0x2907a3[_0x39b2af(0x472)]();try{await _0x2907a3[_0x39b2af(0xa0)]['open']({'reader':!![]});const _0x5da194=_0x2907a3[_0x39b2af(0xa0)][_0x39b2af(0x89)](),_0x31f539=_0x5da194[_0x39b2af(0x69e)](_0x377563=>_0x377563['supervisorKey']!=null)[_0x39b2af(0x249)];_0x33a662(!![],_0x39b2af(0x72d)+_0x5da194[_0x39b2af(0x249)]+_0x39b2af(0x583)+(_0x5da194[_0x39b2af(0x249)]===0x1?'':'es')+'\x20('+_0x31f539+_0x39b2af(0xb0));}finally{await _0x2907a3[_0x39b2af(0x5b2)]();}}catch{}console['log'](''),_0xa6199d?console[_0x39b2af(0x116)](_0x39b2af(0x22f)):(console[_0x39b2af(0x116)](_0x39b2af(0x524)),process[_0x39b2af(0x719)](0x1));}async function _0x192b2f(){const _0x1bf11f=_0x3fb590,_0x2ff8fb=_0x1492d5['resolve'](_0x1bf11f(0x3d8));!_0x16127a[_0x1bf11f(0x525)](_0x2ff8fb)?(_0x16127a[_0x1bf11f(0x5b6)](_0x2ff8fb,JSON[_0x1bf11f(0x316)]({'port':0x2124,'path':_0x1bf11f(0x1b4),'logLevel':'info','noRepl':![],'noAdmin':![]},null,0x2)+'\x0a'),console[_0x1bf11f(0x116)](_0x1bf11f(0x28e))):console[_0x1bf11f(0x116)](_0x1bf11f(0x16a));const _0x145894=_0x1492d5[_0x1bf11f(0x429)](_0x1bf11f(0x1b4));!_0x16127a[_0x1bf11f(0x525)](_0x145894)?(_0x16127a['mkdirSync'](_0x145894,{'recursive':!![]}),console['log'](_0x1bf11f(0x243))):console['log']('[okdb]\x20./okdb-data\x20already\x20exists\x20—\x20skipping'),console[_0x1bf11f(0x116)](_0x1bf11f(0x1f2));}async function _0x3dd1f7(_0x2632aa){const _0x4875fa=_0x3fb590,_0x4c87b2=_0x1492d5[_0x4875fa(0x429)](_0x2632aa['dbPath']);if(!_0x16127a[_0x4875fa(0x525)](_0x4c87b2)){console[_0x4875fa(0x116)](_0x4875fa(0x511)+_0x4c87b2+'\x20does\x20not\x20exist');return;}const _0x1a3aae=require$$0$3,_0x553666=_0x1a3aae['createInterface']({'input':process['stdin'],'output':process['stdout']}),_0x1c1a85=await new Promise(_0xd3948e=>_0x553666['question']('\x0a\x20\x20Delete\x20ALL\x20data\x20in\x20'+_0x4c87b2+'?\x0a\x20\x20(node\x20identity\x20and\x20licenses\x20are\x20preserved)\x0a\x20\x20Type\x20\x22yes\x22\x20to\x20confirm:\x20',_0xd3948e));_0x553666[_0x4875fa(0x5b2)](),console[_0x4875fa(0x116)]('');if(_0x1c1a85[_0x4875fa(0x541)]()['toLowerCase']()!=='yes'){console[_0x4875fa(0x116)](_0x4875fa(0x371));return;}let _0x234aba=null;try{_0x234aba=await _0x21cc09(_0x4c87b2,_0x2632aa,async _0x37f454=>{const _0x560ba3=_0x4875fa,_0x48b874=_0x37f454[_0x560ba3(0x648)],_0x32d3c9=_0x48b874?.['db']?.[_0x560ba3(0x1ed)](_0x560ba3(0x29c))??null,_0x53028d=[];if(_0x48b874?.['hasType'](_0x560ba3(0x322)))for(const {key:_0x4f3d4d,value:_0x50a074}of _0x48b874[_0x560ba3(0x4fa)](_0x560ba3(0x322))){_0x53028d[_0x560ba3(0x39b)]({'key':_0x4f3d4d,'value':_0x50a074});}return{'identity':_0x32d3c9,'licenses':_0x53028d};});}catch(_0x7d70db){console[_0x4875fa(0x116)](_0x4875fa(0x663)+_0x7d70db[_0x4875fa(0x5a3)]+')\x20—\x20they\x20will\x20NOT\x20be\x20preserved');}_0x16127a[_0x4875fa(0x10e)](_0x4c87b2,{'recursive':!![],'force':!![]}),console['log'](_0x4875fa(0x374)+_0x4c87b2+_0x4875fa(0x50f));if(_0x234aba&&(_0x234aba[_0x4875fa(0x1f0)]||_0x234aba[_0x4875fa(0x113)]['length']>0x0))try{await _0x21cc09(_0x4c87b2,_0x2632aa,async _0x396f94=>{const _0x2b1f60=_0x4875fa,_0x3d47b8=_0x396f94[_0x2b1f60(0x648)];_0x234aba[_0x2b1f60(0x1f0)]&&_0x3d47b8['db'][_0x2b1f60(0x23c)](_0x2b1f60(0x29c),_0x234aba[_0x2b1f60(0x1f0)]);if(_0x234aba[_0x2b1f60(0x113)][_0x2b1f60(0x249)]>0x0){if(!_0x3d47b8[_0x2b1f60(0x135)](_0x2b1f60(0x322)))await _0x3d47b8[_0x2b1f60(0x30b)](_0x2b1f60(0x322));for(const {key:_0x84dccd,value:_0x92524d}of _0x234aba[_0x2b1f60(0x113)]){await _0x3d47b8[_0x2b1f60(0x170)](_0x2b1f60(0x322),_0x84dccd,_0x92524d);}}});const _0x2f8956=[];if(_0x234aba[_0x4875fa(0x1f0)])_0x2f8956[_0x4875fa(0x39b)]('node\x20identity');if(_0x234aba['licenses'][_0x4875fa(0x249)]>0x0)_0x2f8956[_0x4875fa(0x39b)](_0x234aba[_0x4875fa(0x113)][_0x4875fa(0x249)]+_0x4875fa(0x546));console[_0x4875fa(0x116)]('[okdb]\x20preserved:\x20'+_0x2f8956[_0x4875fa(0x139)](_0x4875fa(0x1fe)));}catch(_0x207810){console[_0x4875fa(0x116)](_0x4875fa(0x12b)+_0x207810['message']);}}async function _0x21cc09(_0x160d17,_0x44a298,_0x1ce0cc){const _0x4bc93c=_0x3fb590,_0x167830=require$$5$1,_0x1641ad=new _0x167830(_0x160d17,{'admin':![],'mcp':![],'timeMachine':![],'engines':![],'processors':![],'compaction':![],'_skipBootRuntime':!![],..._0x49e43e(_0x44a298)});await _0x1641ad[_0x4bc93c(0x472)]();try{return await _0x1ce0cc(_0x1641ad);}finally{await _0x1641ad[_0x4bc93c(0x5b2)]();}}async function _0x39df1f(_0x35a83a,_0x360efb){const _0x57052a=_0x3fb590,_0x560df0=require$$5$1,_0x459175=_0x1492d5['resolve'](_0x360efb[_0x57052a(0x82)]);console['log'](_0x57052a(0x580)+_0x459175+'…');const _0x3768db=new _0x560df0(_0x459175,_0x49e43e(_0x360efb));await _0x3768db[_0x57052a(0x472)](),console[_0x57052a(0x116)](_0x57052a(0x433)+_0x35a83a+'…');const {envs:_0x3538a3,blobs:_0x5e1cb3,skipped:_0x2d8164}=await _0x3768db[_0x57052a(0x279)][_0x57052a(0x3c4)](_0x35a83a);for(const _0x42b776 of _0x3538a3){const _0x5aebd9=_0x42b776[_0x57052a(0x229)]>0x0?_0x57052a(0x6b9)+(_0x42b776[_0x57052a(0x229)]/0x400/0x400)[_0x57052a(0x6c3)](0x2)+_0x57052a(0x84)+(_0x42b776['sizeAfter']/0x400/0x400)['toFixed'](0x2)+_0x57052a(0x3fd):'';console[_0x57052a(0x116)]('\x20\x20✓\x20'+_0x42b776[_0x57052a(0x1cf)]+'\x20\x20→\x20\x20'+_0x42b776[_0x57052a(0x216)]+_0x5aebd9+(_0x42b776[_0x57052a(0x72f)]?_0x57052a(0x2f7):''));}if(_0x5e1cb3[_0x57052a(0x417)]>0x0)console[_0x57052a(0x116)]('\x20\x20✓\x20~blobs\x20\x20('+_0x5e1cb3['count']+'\x20files)');for(const _0x1d8352 of _0x2d8164)console[_0x57052a(0x116)](_0x57052a(0x548)+_0x1d8352[_0x57052a(0x1cf)]+_0x57052a(0x16f)+_0x1d8352[_0x57052a(0x2ad)]);await _0x3768db[_0x57052a(0x5b2)](),console['log']('[okdb]\x20backup\x20complete');}async function _0x4ec805(_0x2cb134,_0x578a9e){const _0x5dab50=_0x3fb590,{BACKUP_MANIFEST:_0x15f487}=requireOkdbMigrate(),_0x2b9c80=_0x1492d5[_0x5dab50(0x429)](_0x578a9e[_0x5dab50(0x82)]),_0x1c1272=_0x1492d5[_0x5dab50(0x139)](_0x2cb134,_0x15f487);if(!_0x16127a[_0x5dab50(0x525)](_0x1c1272))throw new Error(_0x2cb134+_0x5dab50(0x1da)+_0x15f487+')');const _0x117772=JSON['parse'](_0x16127a[_0x5dab50(0x3b9)](_0x1c1272,_0x5dab50(0x714))),_0x109e7d=_0x1492d5[_0x5dab50(0x607)](_0x2cb134,_0x2b9c80);if(_0x109e7d===''||!(_0x109e7d[_0x5dab50(0x334)]('..')||_0x1492d5[_0x5dab50(0x396)](_0x109e7d)))throw new Error('target\x20'+_0x2b9c80+'\x20is\x20inside\x20the\x20backup\x20'+_0x2cb134);if(_0x16127a['existsSync'](_0x2b9c80)&&_0x16127a[_0x5dab50(0x132)](_0x2b9c80)[_0x5dab50(0x249)]>0x0)throw new Error(_0x5dab50(0x5fc)+_0x2b9c80+'\x20is\x20not\x20empty\x20—\x20restore\x20only\x20into\x20a\x20new\x20or\x20empty\x20directory');console[_0x5dab50(0x116)](_0x5dab50(0x18a)+_0x2cb134+_0x5dab50(0x3b4)+_0x117772[_0x5dab50(0x618)]+',\x20'+_0x117772[_0x5dab50(0x454)]+')\x20→\x20'+_0x2b9c80+'…'),_0x16127a[_0x5dab50(0x118)](_0x2cb134,_0x2b9c80,{'recursive':!![],'errorOnExist':!![]});for(const _0x32ebe4 of _0x117772[_0x5dab50(0x45d)]??[]){console[_0x5dab50(0x116)]('\x20\x20✓\x20'+_0x32ebe4[_0x5dab50(0x1cf)]+(_0x32ebe4[_0x5dab50(0x72f)]?_0x5dab50(0x2f7):'')),_0x32ebe4['outOfTree']&&_0x32ebe4[_0x5dab50(0x2ef)]&&_0x16127a['existsSync'](_0x32ebe4[_0x5dab50(0x2ef)])&&console[_0x5dab50(0x116)]('\x20\x20!\x20'+_0x32ebe4[_0x5dab50(0x1cf)]+_0x5dab50(0x630)+_0x32ebe4[_0x5dab50(0x2ef)]+_0x5dab50(0x25f)+('store\x20will\x20open\x20THAT\x20directory,\x20not\x20the\x20copy\x20in\x20'+_0x32ebe4['dir']+_0x5dab50(0x555)));}console[_0x5dab50(0x116)](_0x5dab50(0x39c));}async function _0x4e9ebc(_0x522462,_0xec5828,_0x7c4be8){const _0x6ee203=_0x3fb590,_0x1f0140=require$$5$1,_0x1af069=_0x1492d5[_0x6ee203(0x429)](_0xec5828[_0x6ee203(0x82)]),_0x37ac5c=_0x7c4be8[_0x6ee203(0x215)]??_0x6ee203(0x34b),_0x5e9426=_0x7c4be8[_0x6ee203(0x199)]?_0x7c4be8[_0x6ee203(0x199)][_0x6ee203(0x48b)](',')[_0x6ee203(0x539)](_0x2f4961=>_0x2f4961[_0x6ee203(0x541)]()):null;console[_0x6ee203(0x116)](_0x6ee203(0x580)+_0x1af069+'…');const _0x3679cb=new _0x1f0140(_0x1af069,_0x49e43e(_0xec5828));await _0x3679cb[_0x6ee203(0x472)](),console[_0x6ee203(0x116)](_0x6ee203(0xb9)+_0x37ac5c+_0x6ee203(0x621)+_0x522462+'…');const _0x2c4862=await _0x3679cb['migrate'][_0x6ee203(0x478)](_0x522462,{'envName':_0x37ac5c,'types':_0x5e9426,'includeChanges':!!_0x7c4be8['changes']});console[_0x6ee203(0x116)]('[okdb]\x20exported\x20\x20types='+_0x2c4862[_0x6ee203(0x199)]+_0x6ee203(0x19b)+_0x2c4862[_0x6ee203(0x613)]+_0x6ee203(0x6ea)+_0x2c4862[_0x6ee203(0x700)]);if(_0x7c4be8[_0x6ee203(0x5b7)]){const _0x45c874=_0x1492d5[_0x6ee203(0x139)](_0x1492d5[_0x6ee203(0x283)](_0x522462),'blobs');process[_0x6ee203(0x45e)][_0x6ee203(0x360)]('[okdb]\x20exporting\x20blobs…');const {count:_0x3602f5,bytes:_0x59f572}=await _0x3679cb[_0x6ee203(0x279)]['exportBlobs'](_0x45c874);console[_0x6ee203(0x116)]('\x0d[okdb]\x20blobs:\x20'+_0x45c874+_0x6ee203(0x6b9)+_0x3602f5+_0x6ee203(0x37a)+(_0x3602f5!==0x1?'s':'')+',\x20'+(_0x59f572/0x400/0x400)['toFixed'](0x2)+'\x20MB)');}await _0x3679cb['close'](),console[_0x6ee203(0x116)](_0x6ee203(0x731));}async function _0x463b79(_0x29523f,_0x2d6db5,_0x50a14c){const _0x2c5195=_0x3fb590,_0x18f2bb=require$$5$1,_0x440a00=_0x1492d5[_0x2c5195(0x429)](_0x2d6db5['dbPath']),_0x4bfde4=_0x50a14c[_0x2c5195(0x215)]??null,_0x235e28=_0x50a14c[_0x2c5195(0x199)]?_0x50a14c['types'][_0x2c5195(0x48b)](',')[_0x2c5195(0x539)](_0x4e17a0=>_0x4e17a0['trim']()):null,_0x1e35dd=!!_0x50a14c[_0x2c5195(0xce)];console[_0x2c5195(0x116)](_0x2c5195(0x580)+_0x440a00+'…');const _0x21f296=new _0x18f2bb(_0x440a00,_0x49e43e(_0x2d6db5));await _0x21f296[_0x2c5195(0x472)](),console[_0x2c5195(0x116)](_0x2c5195(0x2cc)+_0x29523f+'…');const _0x3e223d=await _0x21f296['migrate'][_0x2c5195(0x5f1)](_0x29523f,{'envName':_0x4bfde4,'types':_0x235e28,'dropExisting':_0x1e35dd,'includeChanges':!!_0x50a14c[_0x2c5195(0x700)],'onProgress':({type:_0x2cea67,count:_0x127cf8})=>{const _0x4555c4=_0x2c5195;process[_0x4555c4(0x45e)][_0x4555c4(0x360)](_0x4555c4(0x570)+_0x2cea67+':\x20'+_0x127cf8+_0x4555c4(0x264));}});process['stdout'][_0x2c5195(0x360)]('\x0a'),console['log'](_0x2c5195(0x53d)+_0x3e223d[_0x2c5195(0x199)]+_0x2c5195(0x19b)+_0x3e223d['records']+_0x2c5195(0x6ea)+_0x3e223d['changes']);if(_0x50a14c[_0x2c5195(0x5b7)]){const _0x2d00d0=_0x1492d5[_0x2c5195(0x139)](_0x1492d5['dirname'](_0x29523f),_0x2c5195(0x5b7));if(_0x16127a[_0x2c5195(0x525)](_0x2d00d0)){const {imported:_0x475647,skipped:_0x54da2d}=await _0x21f296['migrate'][_0x2c5195(0x601)](_0x2d00d0);console['log'](_0x2c5195(0x34e)+_0x475647+_0x2c5195(0x516)+_0x54da2d);}}await _0x21f296[_0x2c5195(0x5b2)](),console[_0x2c5195(0x116)]('[okdb]\x20import\x20complete');}async function _0x16deab(_0x121f01,_0x3acfa8){const _0x58f0e0=_0x3fb590;_0x3acfa8['password']&&!_0x3acfa8['name']&&(console[_0x58f0e0(0x271)]('[okdb]\x20error:\x20--password\x20requires\x20--name'),process[_0x58f0e0(0x719)](0x1));const _0x1218d2=_0x3acfa8[_0x58f0e0(0xfb)]?_0x3acfa8[_0x58f0e0(0xfb)][_0x58f0e0(0x48b)](',')[_0x58f0e0(0x539)](_0x1e9cdc=>_0x1e9cdc[_0x58f0e0(0x541)]())[_0x58f0e0(0x69e)](Boolean):[];let _0x284506={};if(_0x3acfa8[_0x58f0e0(0x292)])try{_0x284506=JSON[_0x58f0e0(0x2fd)](_0x3acfa8[_0x58f0e0(0x292)]);if(typeof _0x284506!==_0x58f0e0(0x245)||Array['isArray'](_0x284506)||_0x284506===null)throw new Error();}catch{console[_0x58f0e0(0x271)](_0x58f0e0(0x161)),process[_0x58f0e0(0x719)](0x1);}const _0x4d6365=require$$5$1,{randomToken:_0x2a77bc,hashToken:_0x76a50f,hashPassword:_0x4519f4}=requireOkdbAuthTokens(),_0x43edf1=require$$2$1,_0x4bb1de=_0x1492d5[_0x58f0e0(0x429)](_0x121f01['dbPath']),_0x1f34f5=new _0x4d6365(_0x4bb1de,_0x49e43e(_0x121f01));await _0x1f34f5[_0x58f0e0(0x472)]();try{await _0x1f34f5[_0x58f0e0(0x62b)][_0x58f0e0(0xdc)]();if(_0x3acfa8[_0x58f0e0(0x1cf)]){const _0x4a91a8=await _0x1f34f5[_0x58f0e0(0x62b)]['_lookupByName'](_0x3acfa8[_0x58f0e0(0x1cf)]);_0x4a91a8&&(console[_0x58f0e0(0x271)](_0x58f0e0(0x49d)+_0x3acfa8[_0x58f0e0(0x1cf)]+_0x58f0e0(0x48f)),process['exit'](0x1));}const _0x207e25=_0x2a77bc(0x20),_0x24a31f=_0x76a50f(_0x207e25),_0x611724=_0x3acfa8[_0x58f0e0(0x46c)]?await _0x4519f4(_0x3acfa8[_0x58f0e0(0x46c)]):null,_0x4c5bbe=_0x43edf1[_0x58f0e0(0x364)](),_0x2ac868={'tokenHash':_0x24a31f,'name':_0x3acfa8['name']||null,'passwordHash':_0x611724,'label':_0x3acfa8['label']||null,'permissions':_0x1218d2,'grants':_0x284506,'createdAt':Date['now'](),'lastUsedAt':null},_0x3b64b2=_0x3acfa8['ttl']?{'ttl':Number(_0x3acfa8[_0x58f0e0(0x121)])}:undefined;await _0x1f34f5[_0x58f0e0(0x648)]['put']('~tokens',_0x4c5bbe,_0x2ac868,_0x3b64b2),console[_0x58f0e0(0x116)](_0x58f0e0(0x29b)),console[_0x58f0e0(0x116)](_0x58f0e0(0x31e)+_0x4c5bbe),console[_0x58f0e0(0x116)](_0x58f0e0(0x3c5)+(_0x3acfa8[_0x58f0e0(0x1cf)]||_0x58f0e0(0x44a))),console[_0x58f0e0(0x116)](_0x58f0e0(0x3d5)+(_0x3acfa8['label']||_0x58f0e0(0x44a))),console[_0x58f0e0(0x116)](_0x58f0e0(0x1f3)+(_0x1218d2[_0x58f0e0(0x139)](',\x20')||_0x58f0e0(0x167))),console[_0x58f0e0(0x116)](_0x58f0e0(0x638)),console[_0x58f0e0(0x116)]('\x20\x20\x20\x20'+_0x207e25+'\x0a');}finally{await _0x1f34f5[_0x58f0e0(0x5b2)]();}}async function _0x4c0d94(_0x34b1bf){const _0x6d5807=_0x3fb590,_0x1febe4=require$$5$1,_0x1c982f=_0x1492d5[_0x6d5807(0x429)](_0x34b1bf[_0x6d5807(0x82)]),_0x8bc772=new _0x1febe4(_0x1c982f,_0x49e43e(_0x34b1bf));await _0x8bc772[_0x6d5807(0x472)]();try{const _0x23394e=_0x8bc772[_0x6d5807(0x648)];if(!_0x23394e||!_0x23394e[_0x6d5807(0x135)](_0x6d5807(0x2bf))){console['log'](_0x6d5807(0x2af));return;}const _0x47bcf6=[];for(const {key:_0x976bd4,value:_0x72db76}of _0x23394e[_0x6d5807(0x4fa)]('~tokens')){_0x47bcf6[_0x6d5807(0x39b)]({'id':_0x976bd4,'name':_0x72db76[_0x6d5807(0x1cf)]||_0x6d5807(0x44a),'label':_0x72db76[_0x6d5807(0x586)]||_0x6d5807(0x44a),'permissions':Array['isArray'](_0x72db76[_0x6d5807(0xfb)])?_0x72db76['permissions'][_0x6d5807(0x139)](','):'','created':_0x72db76[_0x6d5807(0x454)]?new Date(_0x72db76[_0x6d5807(0x454)])[_0x6d5807(0x3c2)]()['slice'](0x0,0xa):''});}if(_0x47bcf6['length']===0x0){console[_0x6d5807(0x116)](_0x6d5807(0x2af));return;}const _0x3889ad=!process[_0x6d5807(0x45e)][_0x6d5807(0xf7)]||process['stdout'][_0x6d5807(0xf7)]>=0x64,_0x98ae53=_0x3889ad?0x24:0xa,_0x13b25e=['ID'[_0x6d5807(0x5b9)](_0x98ae53),_0x6d5807(0x6a6)[_0x6d5807(0x5b9)](0x10),_0x6d5807(0x45b)[_0x6d5807(0x5b9)](0x14),_0x6d5807(0x19a)[_0x6d5807(0x5b9)](0x14),'CREATED'][_0x6d5807(0x139)]('\x20\x20');console[_0x6d5807(0x116)]('\x0a'+_0x13b25e),console['log']('-'[_0x6d5807(0x38d)](_0x13b25e['length']));for(const _0x5c312e of _0x47bcf6){const _0x39bdd2=_0x3889ad?_0x5c312e['id']:_0x5c312e['id'][_0x6d5807(0x3e6)](0x0,0x8)+'…';console['log']([_0x39bdd2[_0x6d5807(0x5b9)](_0x98ae53),_0x5c312e[_0x6d5807(0x1cf)][_0x6d5807(0x3e6)](0x0,0x10)[_0x6d5807(0x5b9)](0x10),_0x5c312e['label']['slice'](0x0,0x14)['padEnd'](0x14),_0x5c312e[_0x6d5807(0xfb)]['slice'](0x0,0x14)[_0x6d5807(0x5b9)](0x14),_0x5c312e[_0x6d5807(0x63f)]]['join']('\x20\x20'));}console['log']('');}finally{await _0x8bc772[_0x6d5807(0x5b2)]();}}async function _0x5eaadf(_0x15a666,_0x41b6ea){const _0xd3da12=_0x3fb590;!_0x15a666&&(console[_0xd3da12(0x271)](_0xd3da12(0x289)),process[_0xd3da12(0x719)](0x1));const _0x518580=require$$5$1,_0x5ce0ba=_0x1492d5[_0xd3da12(0x429)](_0x41b6ea[_0xd3da12(0x82)]),_0x49d27e=new _0x518580(_0x5ce0ba,_0x49e43e(_0x41b6ea));await _0x49d27e['open']();try{const _0x5ad84f=_0x49d27e[_0xd3da12(0x648)];(!_0x5ad84f||!_0x5ad84f['hasType']('~tokens'))&&(console[_0xd3da12(0x271)](_0xd3da12(0x12d)+_0x15a666+'\x22'),process[_0xd3da12(0x719)](0x1));let _0xe462db=null,_0x376c86=null;const _0x3a20a3=_0x5ad84f[_0xd3da12(0x1ed)](_0xd3da12(0x2bf),_0x15a666);if(_0x3a20a3)_0xe462db=_0x15a666,_0x376c86=_0x3a20a3;else{const _0x3fb9b9=[];for(const {key:_0x11fd64,value:_0x2c8fdb}of _0x5ad84f[_0xd3da12(0x4fa)](_0xd3da12(0x2bf))){if(_0x11fd64[_0xd3da12(0x334)](_0x15a666))_0x3fb9b9[_0xd3da12(0x39b)]({'key':_0x11fd64,'value':_0x2c8fdb});}_0x3fb9b9[_0xd3da12(0x249)]===0x0&&(console[_0xd3da12(0x271)](_0xd3da12(0x12d)+_0x15a666+'\x22'),process[_0xd3da12(0x719)](0x1));if(_0x3fb9b9[_0xd3da12(0x249)]>0x1){console['error'](_0xd3da12(0x2c8)+_0x15a666+_0xd3da12(0x5cc)+_0x3fb9b9[_0xd3da12(0x249)]+'\x20tokens:');for(const _0xdd3b0e of _0x3fb9b9){console[_0xd3da12(0x271)]('\x20\x20'+_0xdd3b0e[_0xd3da12(0x6eb)]+_0xd3da12(0x291)+(_0xdd3b0e[_0xd3da12(0x33d)][_0xd3da12(0x1cf)]||_0xd3da12(0x44a))+')');}process[_0xd3da12(0x719)](0x1);}_0xe462db=_0x3fb9b9[0x0][_0xd3da12(0x6eb)],_0x376c86=_0x3fb9b9[0x0][_0xd3da12(0x33d)];}await _0x5ad84f[_0xd3da12(0x5c3)](_0xd3da12(0x2bf),_0xe462db),console['log'](_0xd3da12(0x4ff)+_0xe462db+'\x20\x20(name:\x20'+(_0x376c86[_0xd3da12(0x1cf)]||_0xd3da12(0x44a))+_0xd3da12(0x86)+(_0x376c86[_0xd3da12(0x586)]||_0xd3da12(0x44a))+')');}finally{await _0x49d27e['close']();}}function _0x1cce27(_0x54b26c,_0x232a7c){const _0x32817b=_0x3fb590;if(!_0x54b26c[_0x32817b(0x673)])return'pending';const _0x377bfa=_0x54b26c[_0x32817b(0x6aa)];if(!_0x377bfa)return _0x32817b(0x238);if(_0x232a7c>_0x377bfa)return _0x32817b(0x589);return _0x32817b(0x238);}function _0x4c81f9(_0xd54b34){const _0xd9348e=_0x3fb590;if(!_0xd54b34||typeof _0xd54b34!==_0xd9348e(0x245))return'';const _0x51f5e3=Object[_0xd9348e(0x707)](_0xd54b34)['filter'](([,_0x25c7c5])=>_0x25c7c5)[_0xd9348e(0x539)](([_0x4b0f2a])=>_0x4b0f2a);if(_0x51f5e3['length']===0x0)return'(none)';if(_0x51f5e3[_0xd9348e(0x249)]<=0x3)return _0x51f5e3[_0xd9348e(0x139)]('\x20');return _0x51f5e3[_0xd9348e(0x3e6)](0x0,0x3)[_0xd9348e(0x139)]('\x20')+('\x20+'+(_0x51f5e3[_0xd9348e(0x249)]-0x3));}async function _0x560255(_0xcc7691){const _0x32afcf=_0x3fb590,_0xe4282c=require$$5$1,_0x3c5324=requireOkdbLicenseCodec(),{_C:_0x2fa7ad}=requireOkdbLicense(),_0x27b124=_0x1492d5['resolve'](_0xcc7691[_0x32afcf(0x82)]),_0x4c9a81=new _0xe4282c(_0x27b124,_0x49e43e(_0xcc7691));await _0x4c9a81[_0x32afcf(0x472)]();try{const _0x1eaf73=_0x4c9a81[_0x32afcf(0x648)],_0x2d24e3=_0x1eaf73?.['db']?.['get']?.(_0x32afcf(0x23b))??0x0,_0x2c86d1=[..._0x4c9a81[_0x32afcf(0x1aa)]['keys']()]['filter'](_0x3bdca5=>!_0x3bdca5[_0x32afcf(0x334)]('~'))[_0x32afcf(0x249)],_0x51cf19=_0x4c9a81['_license']?.[_0x32afcf(0x2c5)];if(_0x51cf19){const _0x2459ac=_0x51cf19[_0x32afcf(0x1cc)]===!![],_0x16c1a3=_0x2459ac?_0x32afcf(0x726):_0x4c9a81[_0x32afcf(0x475)][_0x32afcf(0x238)]?.[_0x32afcf(0x2c3)]||'licensed';console['log'](''),console[_0x32afcf(0x116)](_0x32afcf(0x8e)+_0x16c1a3);const _0x1f964d=_0x51cf19[_0x32afcf(0x268)]||{};if(_0x1f964d[_0x32afcf(0x16c)]){const _0x25eb51=Math['round'](_0x2d24e3/_0x1f964d['maxWrites']*0x64);console[_0x32afcf(0x116)]('\x20\x20Writes:\x20\x20'+_0x2d24e3[_0x32afcf(0x27e)]()+_0x32afcf(0x254)+_0x1f964d['maxWrites'][_0x32afcf(0x27e)]()+_0x32afcf(0x6b9)+_0x25eb51+'%)');}else console['log']('\x20\x20Writes:\x20\x20'+_0x2d24e3['toLocaleString']());_0x1f964d[_0x32afcf(0x45d)]?console[_0x32afcf(0x116)](_0x32afcf(0x255)+_0x2c86d1+_0x32afcf(0x254)+_0x1f964d[_0x32afcf(0x45d)]):console[_0x32afcf(0x116)]('\x20\x20Envs:\x20\x20\x20\x20'+_0x2c86d1),_0x2fa7ad?.[_0x32afcf(0x306)]&&console[_0x32afcf(0x116)](_0x32afcf(0x6b2)+_0x2fa7ad[_0x32afcf(0x306)]+_0x32afcf(0x16e));}if(!_0x1eaf73||!_0x1eaf73[_0x32afcf(0x135)]('~licenses')){console['log'](''),console[_0x32afcf(0x116)]('\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.'),console[_0x32afcf(0x116)]('');return;}const _0x44f817=[],_0x42de3b=Date[_0x32afcf(0x28a)](),_0x5aa356=_0x4c9a81['id'],_0x246796=_0x32afcf(0x2e7);for(const {key:_0x419a17,value:_0x52d4ae}of _0x1eaf73['getRange'](_0x32afcf(0x322))){const _0xaf2d88=_0x52d4ae[_0x32afcf(0x2d0)]?Buffer[_0x32afcf(0x4f7)](_0x52d4ae[_0x32afcf(0x2d0)],'hex'):Buffer[_0x32afcf(0x64e)](0x8);let _0x955bfc='';try{_0x955bfc=_0x3c5324['derivePin'](_0x5aa356,_0xaf2d88,_0x246796)[_0x32afcf(0x36d)];}catch{}_0x44f817['push']({'id':_0x419a17,'licensee':_0x52d4ae[_0x32afcf(0x2c3)]||'','expires':_0x52d4ae['expiresAt']?new Date(_0x52d4ae[_0x32afcf(0x6aa)])[_0x32afcf(0x3c2)]()[_0x32afcf(0x3e6)](0x0,0xa):'','features':_0x4c81f9(_0x52d4ae[_0x32afcf(0x560)]),'pin':_0x955bfc,'status':_0x1cce27(_0x52d4ae,_0x42de3b)});}if(_0x44f817[_0x32afcf(0x249)]===0x0){console[_0x32afcf(0x116)](''),console[_0x32afcf(0x116)]('\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.'),console['log']('');return;}const _0x49b0a1=['\x20\x20'+'ID'['padEnd'](0xe),_0x32afcf(0x609)[_0x32afcf(0x5b9)](0xe),_0x32afcf(0x6a7)[_0x32afcf(0x5b9)](0xc),_0x32afcf(0xd9)['padEnd'](0x1e),_0x32afcf(0x651)[_0x32afcf(0x5b9)](0xa),_0x32afcf(0x31d)][_0x32afcf(0x139)]('\x20');console[_0x32afcf(0x116)]('\x0a'+_0x49b0a1);for(const _0x2f6106 of _0x44f817){const _0x3f7a4c=_0x2f6106['id'][_0x32afcf(0x3e6)](0x0,0x8)+'\u2026';console['log'](['\x20\x20'+_0x3f7a4c[_0x32afcf(0x5b9)](0xe),_0x2f6106['licensee'][_0x32afcf(0x3e6)](0x0,0xe)['padEnd'](0xe),_0x2f6106['expires'][_0x32afcf(0x5b9)](0xc),_0x2f6106['features'][_0x32afcf(0x3e6)](0x0,0x1e)[_0x32afcf(0x5b9)](0x1e),_0x2f6106[_0x32afcf(0x36d)][_0x32afcf(0x5b9)](0xa),_0x2f6106[_0x32afcf(0x54e)]][_0x32afcf(0x139)]('\x20'));}console[_0x32afcf(0x116)]('');}finally{await _0x4c9a81[_0x32afcf(0x5b2)]();}}async function _0x29ad77(_0x264e10,_0x17d081){const _0x5d7830=_0x3fb590,_0x2128f2=require$$5$1,_0x1058c8=requireOkdbLicenseCodec();let _0x23d80e=_0x264e10;(_0x1058c8[_0x5d7830(0x598)](_0x264e10)===_0x5d7830(0x5a4)||_0x16127a[_0x5d7830(0x525)](_0x264e10)&&_0x16127a['statSync'](_0x264e10)[_0x5d7830(0x5f0)]())&&(_0x23d80e=_0x16127a[_0x5d7830(0x3b9)](_0x264e10,_0x5d7830(0x714))[_0x5d7830(0x541)]());const _0x355525=_0x1492d5[_0x5d7830(0x429)](_0x17d081['dbPath']),_0x15aa16=new _0x2128f2(_0x355525,_0x49e43e(_0x17d081));await _0x15aa16['open']();try{let _0x630e06;try{_0x630e06=await _0x15aa16[_0x5d7830(0x113)][_0x5d7830(0x32e)]({'blob':_0x23d80e});}catch(_0x32b56f){console[_0x5d7830(0x271)](_0x5d7830(0x17f)+_0x32b56f[_0x5d7830(0x5a3)]),process[_0x5d7830(0x719)](0x1);}const _0x5e30b7=_0x630e06[_0x5d7830(0x36d)]||'',_0x39641c=Object['entries'](_0x630e06[_0x5d7830(0x560)]||{})['filter'](([,_0x5a2b65])=>_0x5a2b65)[_0x5d7830(0x539)](([_0x4afe7c])=>_0x4afe7c),_0x3f2bc5=_0x630e06[_0x5d7830(0x268)]||{},_0x244410=[_0x3f2bc5[_0x5d7830(0x45d)]?_0x5d7830(0x63c)+_0x3f2bc5['envs']:null,_0x3f2bc5[_0x5d7830(0x671)]?_0x5d7830(0x5d9)+_0x3f2bc5[_0x5d7830(0x671)]:null,_0x3f2bc5[_0x5d7830(0x2b2)]?_0x5d7830(0x60b)+_0x3f2bc5[_0x5d7830(0x2b2)]:null,_0x3f2bc5['maxWrites']?_0x5d7830(0x1c4)+_0x3f2bc5[_0x5d7830(0x16c)][_0x5d7830(0x27e)]():null][_0x5d7830(0x69e)](Boolean)['join']('\x20\x20'),_0x4faef3=_0x630e06[_0x5d7830(0x563)]!==_0x5d7830(0x394);console[_0x5d7830(0x116)](_0x630e06[_0x5d7830(0x37d)]?'\x0a\x20\x20\u2713\x20License\x20added':_0x5d7830(0x119)),console['log'](_0x5d7830(0x3c7)+_0x630e06['id']),console['log'](_0x5d7830(0x272)+_0x630e06[_0x5d7830(0x2c3)]),console[_0x5d7830(0x116)](_0x5d7830(0x590)+(_0x630e06[_0x5d7830(0x6aa)]?new Date(_0x630e06['expiresAt'])[_0x5d7830(0x3c2)]()[_0x5d7830(0x3e6)](0x0,0xa):'never')),console[_0x5d7830(0x116)](_0x5d7830(0x25e)+(_0x39641c[_0x5d7830(0x139)](',\x20')||'(none)'));if(_0x244410)console[_0x5d7830(0x116)]('\x20\x20\x20\x20limits:\x20\x20\x20\x20'+_0x244410);if(_0x4faef3)console['log']('\x20\x20\x20\x20status:\x20\x20\x20\x20active\x20\x20('+_0x630e06[_0x5d7830(0x563)]+_0x5d7830(0x520)),console['log']('');else!_0x630e06['needsActivation']?(console[_0x5d7830(0x116)]('\x20\x20\x20\x20status:\x20\x20\x20\x20'+_0x630e06[_0x5d7830(0x54e)]),console['log']('')):(console['log'](_0x5d7830(0x265)+_0x5e30b7),console[_0x5d7830(0x116)](_0x5d7830(0x102)),console[_0x5d7830(0x116)](''),console['log'](_0x5d7830(0x26d)),console[_0x5d7830(0x116)](_0x5d7830(0x3ff)+_0x5e30b7+')\x20to\x20your\x20license\x20vendor.'),console[_0x5d7830(0x116)](_0x5d7830(0x450)),console[_0x5d7830(0x116)](_0x5d7830(0x50b)),console[_0x5d7830(0x116)](''));}finally{await _0x15aa16['close']();}}async function _0x26b364(_0x146b94,_0x57b98a){const _0x44f650=_0x3fb590,_0x293114=require$$5$1,_0x50df09=_0x1492d5[_0x44f650(0x429)](_0x57b98a[_0x44f650(0x82)]),_0x4b911e=new _0x293114(_0x50df09,_0x49e43e(_0x57b98a));await _0x4b911e['open']();try{let _0x1d5e9a;try{_0x1d5e9a=await _0x4b911e[_0x44f650(0x113)][_0x44f650(0x40e)](_0x146b94);}catch(_0x2ddce6){console[_0x44f650(0x271)]('[okdb]\x20error:\x20'+_0x2ddce6[_0x44f650(0x5a3)]),console[_0x44f650(0x271)](''),console['error'](_0x44f650(0x30d)),console[_0x44f650(0x271)](_0x44f650(0x1d6)),console['error'](_0x44f650(0x372)),console[_0x44f650(0x271)](_0x44f650(0x3f6)),console[_0x44f650(0x271)](''),process[_0x44f650(0x719)](0x1);}console[_0x44f650(0x116)]('\x0a\x20\x20✓\x20License\x20activated'),console[_0x44f650(0x116)](_0x44f650(0x3c7)+_0x1d5e9a['id']),console[_0x44f650(0x116)](_0x44f650(0x272)+_0x1d5e9a[_0x44f650(0x2c3)]),console[_0x44f650(0x116)]('\x20\x20\x20\x20expires:\x20\x20\x20'+(_0x1d5e9a[_0x44f650(0x6aa)]?new Date(_0x1d5e9a[_0x44f650(0x6aa)])[_0x44f650(0x3c2)]()[_0x44f650(0x3e6)](0x0,0xa):_0x44f650(0x679))),console[_0x44f650(0x116)]('\x20\x20\x20\x20status:\x20\x20\x20\x20active'),console[_0x44f650(0x116)]('');}finally{await _0x4b911e[_0x44f650(0x5b2)]();}}async function _0x150714(_0x1a010b,_0x2dff4c){const _0x3ba194=_0x3fb590;!_0x1a010b&&(console[_0x3ba194(0x271)](_0x3ba194(0x6d8)),process[_0x3ba194(0x719)](0x1));const _0x124b29=require$$5$1,_0x5315b8=requireOkdbLicenseCodec(),_0x563dde=_0x1492d5[_0x3ba194(0x429)](_0x2dff4c[_0x3ba194(0x82)]),_0x48ef8e=new _0x124b29(_0x563dde,_0x49e43e(_0x2dff4c));await _0x48ef8e[_0x3ba194(0x472)]();try{const _0x4715bc=_0x48ef8e[_0x3ba194(0x648)];(!_0x4715bc||!_0x4715bc[_0x3ba194(0x135)](_0x3ba194(0x322)))&&(console[_0x3ba194(0x271)]('[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22'+_0x1a010b+'\x22'),process[_0x3ba194(0x719)](0x1));let _0x3cf8fb=null,_0x8d94aa=null;const _0x381952=_0x4715bc['get'](_0x3ba194(0x322),_0x1a010b);if(_0x381952)_0x3cf8fb=_0x1a010b,_0x8d94aa=_0x381952;else{const _0x1b1c54=[];for(const {key:_0x13ef11,value:_0x3040d3}of _0x4715bc[_0x3ba194(0x4fa)](_0x3ba194(0x322))){if(_0x13ef11[_0x3ba194(0x334)](_0x1a010b))_0x1b1c54[_0x3ba194(0x39b)]({'key':_0x13ef11,'value':_0x3040d3});}_0x1b1c54['length']===0x0&&(console[_0x3ba194(0x271)](_0x3ba194(0x175)+_0x1a010b+'\x22'),process[_0x3ba194(0x719)](0x1)),_0x1b1c54[_0x3ba194(0x249)]>0x1&&(console['error']('[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22'+_0x1a010b+'\x22\x20matches\x20'+_0x1b1c54[_0x3ba194(0x249)]+_0x3ba194(0x26f)),process[_0x3ba194(0x719)](0x1)),_0x3cf8fb=_0x1b1c54[0x0][_0x3ba194(0x6eb)],_0x8d94aa=_0x1b1c54[0x0][_0x3ba194(0x33d)];}const _0x4f9bf0=Date[_0x3ba194(0x28a)](),_0x1d6336=_0x1cce27(_0x8d94aa,_0x4f9bf0),_0x52093e=_0x48ef8e['id'],_0x20dc39=_0x3ba194(0x2e7);let _0x1391bc='';try{const _0x1653fc=Buffer[_0x3ba194(0x4f7)](_0x8d94aa[_0x3ba194(0x2d0)],_0x3ba194(0x5db));_0x1391bc=_0x5315b8[_0x3ba194(0x71f)](_0x52093e,_0x1653fc,_0x20dc39)[_0x3ba194(0x36d)];}catch{}const _0x4e01f4=_0x8d94aa[_0x3ba194(0x560)]?Object['entries'](_0x8d94aa[_0x3ba194(0x560)])[_0x3ba194(0x69e)](([,_0x5b5ab7])=>_0x5b5ab7)['map'](([_0x4e718a])=>_0x4e718a):[],_0x1e9c24=_0x8d94aa[_0x3ba194(0x268)]||{},_0x1b3672=_0x4715bc?.['db']?.[_0x3ba194(0x1ed)]?.('__writeCounter')??0x0,_0x314057=[..._0x48ef8e['_envs'][_0x3ba194(0x2b3)]()][_0x3ba194(0x69e)](_0x3d7b00=>!_0x3d7b00[_0x3ba194(0x334)]('~'))[_0x3ba194(0x249)];console[_0x3ba194(0x116)](_0x3ba194(0x427)),console['log']('\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x3cf8fb),console[_0x3ba194(0x116)](_0x3ba194(0x272)+(_0x8d94aa['licensee']||'')),console[_0x3ba194(0x116)](_0x3ba194(0x590)+(_0x8d94aa[_0x3ba194(0x6aa)]?new Date(_0x8d94aa[_0x3ba194(0x6aa)])['toISOString']()[_0x3ba194(0x3e6)](0x0,0xa):'')),console[_0x3ba194(0x116)](_0x3ba194(0x25e)+(_0x4e01f4[_0x3ba194(0x139)](',\x20')||_0x3ba194(0x167))),console[_0x3ba194(0x116)]('\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20'+_0x1391bc),console[_0x3ba194(0x116)](_0x3ba194(0x43a)+_0x1d6336),console['log'](_0x3ba194(0x4dd)+new Date(_0x8d94aa['addedAt'])[_0x3ba194(0x3c2)]());if(_0x1d6336===_0x3ba194(0x238)){console[_0x3ba194(0x116)](''),console[_0x3ba194(0x116)](_0x3ba194(0x5b5));if(_0x1e9c24[_0x3ba194(0x16c)]){const _0x451e0a=Math[_0x3ba194(0x336)](_0x1b3672/_0x1e9c24['maxWrites']*0x64);console[_0x3ba194(0x116)](_0x3ba194(0x33e)+_0x1b3672[_0x3ba194(0x27e)]()+_0x3ba194(0x254)+_0x1e9c24[_0x3ba194(0x16c)]['toLocaleString']()+_0x3ba194(0x6b9)+_0x451e0a+'%)');}else console[_0x3ba194(0x116)](_0x3ba194(0x33e)+_0x1b3672[_0x3ba194(0x27e)]()+_0x3ba194(0x6d4));_0x1e9c24[_0x3ba194(0x45d)]?console[_0x3ba194(0x116)](_0x3ba194(0x225)+_0x314057+_0x3ba194(0x254)+_0x1e9c24[_0x3ba194(0x45d)]):console[_0x3ba194(0x116)](_0x3ba194(0x225)+_0x314057+'\x20\x20(unlimited)');}console[_0x3ba194(0x116)]('');}finally{await _0x48ef8e[_0x3ba194(0x5b2)]();}}async function _0x113b8f(_0x2dbcd8,_0x1c7490){const _0x1b1a7b=_0x3fb590;!_0x2dbcd8&&(console[_0x1b1a7b(0x271)](_0x1b1a7b(0x172)),process['exit'](0x1));const _0x8b776e=require$$5$1,_0x46ecb0=_0x1492d5['resolve'](_0x1c7490[_0x1b1a7b(0x82)]),_0x4436d8=new _0x8b776e(_0x46ecb0,_0x49e43e(_0x1c7490));await _0x4436d8['open']();try{const _0x2ab697=_0x4436d8[_0x1b1a7b(0x648)];(!_0x2ab697||!_0x2ab697[_0x1b1a7b(0x135)](_0x1b1a7b(0x322)))&&(console[_0x1b1a7b(0x271)](_0x1b1a7b(0x175)+_0x2dbcd8+'\x22'),process[_0x1b1a7b(0x719)](0x1));let _0x24ee07=null,_0x392793=null;const _0x151972=_0x2ab697[_0x1b1a7b(0x1ed)](_0x1b1a7b(0x322),_0x2dbcd8);if(_0x151972)_0x24ee07=_0x2dbcd8,_0x392793=_0x151972;else{const _0x15f22e=[];for(const {key:_0x5408f5,value:_0xdc6d7}of _0x2ab697['getRange'](_0x1b1a7b(0x322))){if(_0x5408f5[_0x1b1a7b(0x334)](_0x2dbcd8))_0x15f22e[_0x1b1a7b(0x39b)]({'key':_0x5408f5,'value':_0xdc6d7});}_0x15f22e['length']===0x0&&(console[_0x1b1a7b(0x271)](_0x1b1a7b(0x175)+_0x2dbcd8+'\x22'),process[_0x1b1a7b(0x719)](0x1)),_0x15f22e['length']>0x1&&(console['error'](_0x1b1a7b(0x2c8)+_0x2dbcd8+_0x1b1a7b(0x5cc)+_0x15f22e['length']+_0x1b1a7b(0x26f)),process['exit'](0x1)),_0x24ee07=_0x15f22e[0x0][_0x1b1a7b(0x6eb)],_0x392793=_0x15f22e[0x0][_0x1b1a7b(0x33d)];}await _0x2ab697[_0x1b1a7b(0x5c3)](_0x1b1a7b(0x322),_0x24ee07),console[_0x1b1a7b(0x116)]('\x20\x20✓\x20Removed\x20license\x20'+_0x24ee07+_0x1b1a7b(0x668)+(_0x392793[_0x1b1a7b(0x2c3)]||_0x1b1a7b(0x44a))+')');}finally{await _0x4436d8['close']();}}async function _0x3527bc(_0x5e8821,_0x3e6eb1,_0x207d4a){const _0x25cdd7=_0x3fb590;!_0x5e8821&&(console[_0x25cdd7(0x271)](_0x25cdd7(0x6ed)),process[_0x25cdd7(0x719)](0x1));!_0x207d4a['token']&&!(_0x207d4a[_0x25cdd7(0x247)]&&_0x207d4a[_0x25cdd7(0x46c)])&&(console[_0x25cdd7(0x271)](_0x25cdd7(0x4b5)),process[_0x25cdd7(0x719)](0x1));const _0x31c3ef=_0x207d4a[_0x25cdd7(0x5fd)]||_0x3e6eb1[_0x25cdd7(0x1a8)]?.[_0x25cdd7(0x21a)];!_0x31c3ef&&(console[_0x25cdd7(0x271)](_0x25cdd7(0x1a9)+_0x25cdd7(0x469)+_0x25cdd7(0x58b)),process[_0x25cdd7(0x719)](0x1));const _0x30fde7=require$$5$1,_0x2ed0bf=new _0x30fde7(_0x3e6eb1['dbPath'],{'sync':{'address':_0x31c3ef,'auto_reconcile':![]}});await _0x2ed0bf['open']();try{const _0x1a87e6=_0x2ed0bf['_systemEnv'];if(_0x1a87e6&&_0x1a87e6[_0x25cdd7(0x135)](_0x25cdd7(0x2bf))){let _0x4192da=![];for(const _0x1850f2 of _0x1a87e6[_0x25cdd7(0x4fa)]('~tokens')){_0x4192da=!![];break;}_0x4192da&&console[_0x25cdd7(0x116)](_0x25cdd7(0x4a4)+_0x25cdd7(0x4b9));}console[_0x25cdd7(0x116)](_0x25cdd7(0x5be)+_0x5e8821+'…'),await _0x2ed0bf[_0x25cdd7(0x1a8)]['join'](_0x5e8821[_0x25cdd7(0x176)](/\/+$/,''),{'token':_0x207d4a[_0x25cdd7(0x574)],'username':_0x207d4a['username'],'password':_0x207d4a[_0x25cdd7(0x46c)]}),console['log'](_0x25cdd7(0x10c)),console[_0x25cdd7(0x116)](_0x25cdd7(0x2e1));}finally{await _0x2ed0bf[_0x25cdd7(0x5b2)]();}}async function _0x472252(){const _0x45fc5b=_0x3fb590,_0x558b92=Date[_0x45fc5b(0x28a)](),_0x38eb17=_0x465846(process[_0x45fc5b(0x144)]),_0x36f1f1=_0xc08c46(_0x38eb17),_0x4bdf15=_0x1492d5[_0x45fc5b(0x429)](_0x36f1f1['dbPath']);!_0x36f1f1[_0x45fc5b(0x6fe)]&&!process[_0x45fc5b(0x241)]['isTTY']&&(_0x36f1f1[_0x45fc5b(0x6fe)]=!![]);const _0x2de2ba=require$$5$1,{start:_0x147941,colorLog:_0x915027}=requireOkdbShell(),_0x3fb8dc=require$$1$1,_0x19f2e5={..._0x36f1f1['key']?{'encryptionKey':_0x36f1f1[_0x45fc5b(0x6eb)]}:{},..._0x36f1f1[_0x45fc5b(0x6dd)]?{'admin':![]}:_0x27d7b1(_0x36f1f1[_0x45fc5b(0x619)])?{'admin':_0x36f1f1[_0x45fc5b(0x619)]}:{},..._0x27d7b1(_0x36f1f1[_0x45fc5b(0x181)])?{'api':_0x36f1f1[_0x45fc5b(0x181)]}:{},..._0x27d7b1(_0x36f1f1['auth'])?{'auth':_0x36f1f1[_0x45fc5b(0x62b)]}:{},..._0x27d7b1(_0x36f1f1[_0x45fc5b(0x248)])?{'mcp':_0x36f1f1[_0x45fc5b(0x248)]}:{},..._0x27d7b1(_0x36f1f1[_0x45fc5b(0x3c4)])?{'backup':_0x36f1f1[_0x45fc5b(0x3c4)]}:{},..._0x36f1f1[_0x45fc5b(0x72f)]!==![]?{'timeMachine':_0x36f1f1[_0x45fc5b(0x72f)]}:{},...Object['fromEntries'](_0x1688d4[_0x45fc5b(0x69e)](_0x3bdb3=>_0x36f1f1[_0x3bdb3]!==undefined)[_0x45fc5b(0x539)](_0x1a9804=>[_0x1a9804,_0x36f1f1[_0x1a9804]]))},_0x21c582=_0x251fda(_0x36f1f1);if(!_0x3fb8dc['isWorker']){const _0x7f9f19=_0x50dfd5(),_0x3e5816=_0x36f1f1[_0x45fc5b(0x200)]?'--no-cluster':_0x36f1f1[_0x45fc5b(0x129)]!=null&&_0x36f1f1[_0x45fc5b(0x129)]!==''?_0x45fc5b(0xe0):process.env.OKDB_HTTP_WORKERS?_0x45fc5b(0x4fc):_0x36f1f1[_0x45fc5b(0x57f)]?.[_0x45fc5b(0x6d7)]!=null?_0x45fc5b(0x217):_0x45fc5b(0x210)+Math[_0x45fc5b(0x234)](0x1,require$$0['cpus']()['length']-0x1);process[_0x45fc5b(0x45e)][_0x45fc5b(0x360)]('[okdb]\x20http\x20workers:\x20'+_0x21c582+'\x20('+_0x3e5816+(!_0x7f9f19?_0x45fc5b(0x5ae):'')+')\x0a');}if(_0x3fb8dc[_0x45fc5b(0x4a7)]){const _0x246cad={..._0x19f2e5},_0xc02407=new _0x2de2ba(_0x4bdf15,_0x246cad);_0xc02407['log'][_0x45fc5b(0x26e)]?.();const _0x3116d2=process.env.OKDB_CLUSTER_SLOT??'?',_0x4c71c3={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3},_0x2b5d8f=_0x4c71c3[_0x36f1f1[_0x45fc5b(0x66e)]]??_0x4c71c3['info'];_0xc02407['log'][_0x45fc5b(0x406)](_0x150a0e=>{const _0x2b7100=_0x45fc5b;if((_0x4c71c3[_0x150a0e['level']]??0x1)<_0x2b5d8f)return;try{process[_0x2b7100(0x401)]?.({'__okdbCluster':_0x2b7100(0x116),'slot':_0x3116d2,'pid':process['pid'],'entry':_0x150a0e});}catch{}}),await _0xc02407[_0x45fc5b(0x472)]();const {attachWorkerCluster:_0x1e710a}=requireOkdbCluster();_0x1e710a(_0xc02407),await _0x2b8a3a(_0xc02407,_0x36f1f1[_0x45fc5b(0x1c2)],_0x57428e(_0x36f1f1));return;}if(_0x21c582>0x1){const {runClustered:_0x4caa31}=requireOkdbCluster(),_0x161913=new _0x2de2ba(_0x4bdf15,{..._0x19f2e5,'engines':![],'processors':![],'compaction':![]});await _0x161913[_0x45fc5b(0x472)]();const _0x587e72=async()=>{const _0x3fe730=_0x45fc5b,_0x22a2e5=new _0x2de2ba(_0x4bdf15,{..._0x19f2e5});return await _0x22a2e5[_0x3fe730(0x472)](),_0x22a2e5;},_0x577821=Object[_0x45fc5b(0x19d)](_0x1688d4[_0x45fc5b(0x539)](_0x5d7677=>[_0x5d7677,_0x19f2e5[_0x5d7677]??!![]])),{formatListenAddr:_0x506cfd}=requireOkdbHttp(),_0x4b5b9d=_0x506cfd(_0x36f1f1[_0x45fc5b(0x1c2)],_0x36f1f1['http']?.[_0x45fc5b(0x27a)]),_0x461cde=_0x4caa31({'workers':_0x21c582,'makeOkdb':_0x587e72,'port':_0x36f1f1[_0x45fc5b(0x1c2)],'primaryOkdb':_0x161913,'workerRole':_0x577821,'listenAddr':_0x4b5b9d});let _0x97a5d8=![];async function _0x201f38(_0x12f672){const _0x2ba38c=_0x45fc5b;_0x97a5d8&&(process['stderr']['write'](_0x2ba38c(0x6f6)),process[_0x2ba38c(0x719)](0x82));_0x97a5d8=!![],process[_0x2ba38c(0x36e)][_0x2ba38c(0x360)]('\x0a[okdb]\x20received\x20'+(_0x12f672||_0x2ba38c(0x8f))+_0x2ba38c(0x410));const _0x554058=setTimeout(()=>{const _0x502cba=_0x2ba38c;process[_0x502cba(0x36e)]['write']('[okdb]\x20shutdown\x20drain\x20exceeded\x203000ms\x20—\x20hard-exiting\x0a'),process[_0x502cba(0x719)](0x0);},0xbb8);_0x554058[_0x2ba38c(0x1b3)]?.();try{await _0x461cde[_0x2ba38c(0x5b2)]();}catch(_0x52dd13){process[_0x2ba38c(0x36e)][_0x2ba38c(0x360)](_0x2ba38c(0x612)+(_0x52dd13?.[_0x2ba38c(0x5a3)]??_0x52dd13)+'\x0a');}try{await _0x161913[_0x2ba38c(0x5b2)]();}catch(_0xcc21e0){process[_0x2ba38c(0x36e)]['write'](_0x2ba38c(0x162)+(_0xcc21e0?.[_0x2ba38c(0x5a3)]??_0xcc21e0)+'\x0a');}process[_0x2ba38c(0x719)](0x0);}_0x36f1f1['clusterWorkers']=_0x21c582;if(!_0x36f1f1['noRepl']){_0x161913[_0x45fc5b(0x116)][_0x45fc5b(0x26e)]?.(),_0x4913db(_0x161913[_0x45fc5b(0x62b)]?.['getSecurityNotices']?.()??[]),await _0x147941(_0x161913,_0x36f1f1);return;}process[_0x45fc5b(0x45e)][_0x45fc5b(0x360)](_0x45fc5b(0x12f)+process['pid']+_0x45fc5b(0x70a)+_0x21c582+'\x20'+(_0x45fc5b(0x3e7)+_0x36f1f1['port']+'\x0a')),console[_0x45fc5b(0x116)](''),console[_0x45fc5b(0x116)]('\x20\x20✓\x20OKDB\x20cluster\x20running'),console[_0x45fc5b(0x116)](_0x45fc5b(0x1c0)+_0x36f1f1[_0x45fc5b(0x1c2)]+_0x45fc5b(0x6b9)+_0x21c582+_0x45fc5b(0x699)),console['log'](_0x45fc5b(0x431)+_0x4bdf15),console[_0x45fc5b(0x116)](_0x45fc5b(0x18d)+_0x161913['id']),console[_0x45fc5b(0x116)](_0x45fc5b(0x60a)+_0x36f1f1[_0x45fc5b(0x1c2)]+_0x45fc5b(0x3b3));!_0x36f1f1[_0x45fc5b(0x6dd)]&&console[_0x45fc5b(0x116)](_0x45fc5b(0x230)+_0x36f1f1[_0x45fc5b(0x1c2)]+'/admin/index.html');console[_0x45fc5b(0x116)](''),_0x4913db(_0x161913[_0x45fc5b(0x62b)]?.[_0x45fc5b(0x335)]?.()??[]),process['on']('SIGINT',()=>_0x201f38('SIGINT')),process['on']('SIGTERM',()=>_0x201f38('SIGTERM')),process['on']('SIGBREAK',()=>_0x201f38(_0x45fc5b(0x1f7)));return;}const _0x5aca61=new _0x2de2ba(_0x4bdf15,_0x19f2e5);_0x5aca61[_0x45fc5b(0x116)][_0x45fc5b(0x26e)]?.();const _0x4467c6=_0x5aca61[_0x45fc5b(0x116)][_0x45fc5b(0x406)](_0x4b78c9=>_0x915027(_0x4b78c9,_0x36f1f1[_0x45fc5b(0x66e)]));if(_0x36f1f1['noRepl'])process[_0x45fc5b(0x45e)]['write'](_0x45fc5b(0x165));await _0x5aca61[_0x45fc5b(0x472)]();if(_0x36f1f1[_0x45fc5b(0x6fe)])process[_0x45fc5b(0x45e)][_0x45fc5b(0x360)](_0x45fc5b(0x59e));try{await _0x2b8a3a(_0x5aca61,_0x36f1f1[_0x45fc5b(0x1c2)],_0x57428e(_0x36f1f1));}catch(_0x5338d9){_0x5338d9[_0x45fc5b(0x5f2)]===_0x45fc5b(0x27c)&&(console[_0x45fc5b(0x271)](_0x45fc5b(0x4c2)+_0x36f1f1[_0x45fc5b(0x1c2)]+_0x45fc5b(0x9a)),process[_0x45fc5b(0x719)](0x1));throw _0x5338d9;}if(_0x36f1f1[_0x45fc5b(0x6fe)]){const _0x5b1fca=_0x36f1f1['http']?.['host']!==undefined?[][_0x45fc5b(0x529)](_0x36f1f1['http']['host'])[_0x45fc5b(0x139)](',\x20')+'\x20':'';process[_0x45fc5b(0x45e)][_0x45fc5b(0x360)]('\x20\x20✓\x20http\x20listening\x20on\x20'+_0x5b1fca+':'+_0x36f1f1[_0x45fc5b(0x1c2)]+'\x0a');}if(!_0x36f1f1[_0x45fc5b(0x6fe)])_0x5aca61[_0x45fc5b(0x116)][_0x45fc5b(0x26e)]?.(),_0x4467c6?.(),_0x4913db(_0x5aca61[_0x45fc5b(0x62b)]?.['getSecurityNotices']?.()??[]),await _0x147941(_0x5aca61,_0x36f1f1);else{const _0x15f7d7=_0x1492d5[_0x45fc5b(0x139)](_0x4bdf15,_0x45fc5b(0x1fd));try{_0x16127a[_0x45fc5b(0x5b6)](_0x15f7d7,String(process[_0x45fc5b(0x5ca)]));}catch{}const _0x599d32=Date[_0x45fc5b(0x28a)]()-_0x558b92;console[_0x45fc5b(0x116)](''),console['log'](_0x45fc5b(0x49b)),console[_0x45fc5b(0x116)](_0x45fc5b(0x58d)+_0x36f1f1[_0x45fc5b(0x1c2)]),console[_0x45fc5b(0x116)](_0x45fc5b(0x60e)+_0x4bdf15),console['log'](_0x45fc5b(0x297)+_0x5aca61['id']);{const _0x5c0175=_0x5aca61['_systemEnv']?.['db']?.[_0x45fc5b(0x1ed)]?.(_0x45fc5b(0x23b))??0x0,_0x239909=[..._0x5aca61[_0x45fc5b(0x1aa)][_0x45fc5b(0x2b3)]()]['filter'](_0x1d5c94=>!_0x1d5c94[_0x45fc5b(0x334)]('~'))[_0x45fc5b(0x249)];if(_0x5aca61[_0x45fc5b(0x475)]?.[_0x45fc5b(0x238)]?.[_0x45fc5b(0x2b6)]===0x1){const _0x2b2671=Math[_0x45fc5b(0x55a)]((_0x5aca61['_license'][_0x45fc5b(0x238)]['expiresAt']-Date['now']())/0x5265c00);console[_0x45fc5b(0x116)](_0x45fc5b(0x6c9)+_0x5aca61[_0x45fc5b(0x475)][_0x45fc5b(0x238)][_0x45fc5b(0x2c3)]+_0x45fc5b(0x203)+_0x2b2671+'\x20days\x20—\x20POC/demo\x20only,\x20not\x20node-bound)');}else{if(_0x5aca61[_0x45fc5b(0x475)]?.['active']){const _0x13c179=_0x5aca61[_0x45fc5b(0x475)][_0x45fc5b(0x238)];console[_0x45fc5b(0x116)](_0x45fc5b(0x728)+_0x13c179['licensee']+_0x45fc5b(0xa4)+new Date(_0x13c179[_0x45fc5b(0x6aa)])[_0x45fc5b(0x3c2)]()[_0x45fc5b(0x3e6)](0x0,0xa)+')');const _0x231bb5=_0x13c179['limits']||{};if(_0x231bb5[_0x45fc5b(0x16c)]){const _0x3e57bc=Math[_0x45fc5b(0x336)](_0x5c0175/_0x231bb5[_0x45fc5b(0x16c)]*0x64);console[_0x45fc5b(0x116)](_0x45fc5b(0x2d4)+_0x5c0175[_0x45fc5b(0x27e)]()+_0x45fc5b(0x254)+_0x231bb5['maxWrites'][_0x45fc5b(0x27e)]()+_0x45fc5b(0x55e)+_0x3e57bc+_0x45fc5b(0x52d)+_0x239909+(_0x231bb5['envs']?'/'+_0x231bb5[_0x45fc5b(0x45d)]:'')+_0x45fc5b(0x471)+(_0x239909===0x1?'':'s'));}}else{if(_0x5aca61[_0x45fc5b(0x475)]){const _0x5a6c6b=_0x5aca61[_0x45fc5b(0x475)]['getPins'](),_0x386094=_0x5a6c6b['length']?_0x5a6c6b['map'](_0xc5e17b=>_0xc5e17b[_0x45fc5b(0x36d)])[_0x45fc5b(0x139)](',\x20'):_0x45fc5b(0x5a1),_0x1c0d01=_0x5aca61['_license'][_0x45fc5b(0x2c5)],_0x2bce7c=_0x1c0d01[_0x45fc5b(0x268)][_0x45fc5b(0x16c)]?Math[_0x45fc5b(0x336)](_0x5c0175/_0x1c0d01[_0x45fc5b(0x268)][_0x45fc5b(0x16c)]*0x64):0x0;console['log']('\x20\x20\x20\x20license:\x20free\x20tier\x20—\x20add\x20a\x20license\x20to\x20unlock\x20sync,\x20embeddings,\x20engines,\x20time-machine'),console[_0x45fc5b(0x116)](_0x45fc5b(0x2d4)+_0x5c0175[_0x45fc5b(0x27e)]()+_0x45fc5b(0x254)+_0x1c0d01[_0x45fc5b(0x268)][_0x45fc5b(0x16c)]['toLocaleString']()+_0x45fc5b(0x55e)+_0x2bce7c+'%),\x20'+_0x239909+_0x45fc5b(0x254)+_0x1c0d01[_0x45fc5b(0x268)]['envs']+_0x45fc5b(0x2c0)),console['log'](_0x45fc5b(0x677)+_0x386094);}}}}console[_0x45fc5b(0x116)](_0x45fc5b(0x18f)+_0x36f1f1['port']+'/api');!_0x36f1f1[_0x45fc5b(0x6dd)]&&console[_0x45fc5b(0x116)](_0x45fc5b(0xe3)+_0x36f1f1[_0x45fc5b(0x1c2)]+_0x45fc5b(0x6a3));console['log'](''),console[_0x45fc5b(0x116)](_0x45fc5b(0x6ef)+_0x599d32+'ms'),_0x4913db(_0x5aca61[_0x45fc5b(0x62b)]?.[_0x45fc5b(0x335)]?.()??[]);let _0x4a82f2=![];async function _0x401722(_0x1b53c3){const _0x413dbb=_0x45fc5b;_0x4a82f2&&(process['stderr'][_0x413dbb(0x360)](_0x413dbb(0x6f6)),process['exit'](0x82));_0x4a82f2=!![],process[_0x413dbb(0x36e)]['write'](_0x413dbb(0x38a)+(_0x1b53c3||_0x413dbb(0x8f))+_0x413dbb(0x354));const _0x111f37=setTimeout(()=>{const _0x1b5129=_0x413dbb;process['stderr']['write'](_0x1b5129(0x573)),process[_0x1b5129(0x719)](0x1);},0x1388);try{_0x16127a[_0x413dbb(0x56d)](_0x15f7d7);}catch{}try{await _0x5aca61[_0x413dbb(0x5b2)]();}catch(_0x308091){process[_0x413dbb(0x36e)]['write'](_0x413dbb(0x491)+(_0x308091?.[_0x413dbb(0x5a3)]??_0x308091)+'\x0a');}clearTimeout(_0x111f37),process['stderr'][_0x413dbb(0x360)](_0x413dbb(0x680)),process[_0x413dbb(0x719)](0x0);}process['on'](_0x45fc5b(0x5d4),()=>_0x401722(_0x45fc5b(0x5d4))),process['on'](_0x45fc5b(0x363),()=>_0x401722(_0x45fc5b(0x363))),process['on'](_0x45fc5b(0x1f7),()=>_0x401722(_0x45fc5b(0x1f7)));}}const _0x475fe0=new Set([_0x3fb590(0x276),_0x3fb590(0x39d),_0x3fb590(0x6da),_0x3fb590(0x3c4),'restore',_0x3fb590(0x579),_0x3fb590(0x67a),_0x3fb590(0x519),_0x3fb590(0x574),_0x3fb590(0x139),_0x3fb590(0x226)]),_0x1ae084=process[_0x3fb590(0x144)][0x2];if(_0x1ae084===_0x3fb590(0x276))console['log'](require$$3[_0x3fb590(0x276)]),process[_0x3fb590(0x719)](0x0);else{if(_0x1ae084&&_0x475fe0['has'](_0x1ae084)){const _0x11976d=process[_0x3fb590(0x144)][_0x3fb590(0x3e6)](0x3),_0x8b1a3d=_0x465846([_0x3fb590(0x236),_0x3fb590(0x11b),..._0x11976d]),_0x8bc460=_0xc08c46(_0x8b1a3d),_0x5e428d=new Set([_0x3fb590(0xa2),'-d','--key','-k','--config','-c',_0x3fb590(0x1b5),'-p',_0x3fb590(0x60f),_0x3fb590(0x1e6),'-e',_0x3fb590(0x64d),_0x3fb590(0x1fc),_0x3fb590(0x701),_0x3fb590(0x661),_0x3fb590(0x1ba),_0x3fb590(0x15b),_0x3fb590(0x14f),'--token',_0x3fb590(0x4b3),'-u',_0x3fb590(0x68c)]);let _0x25b3fe=null;for(let _0x1eda94=0x0;_0x1eda94<_0x11976d[_0x3fb590(0x249)];_0x1eda94++){if(_0x5e428d['has'](_0x11976d[_0x1eda94])){_0x1eda94++;continue;}if(!_0x11976d[_0x1eda94]['startsWith']('-')){_0x25b3fe=_0x11976d[_0x1eda94];break;}}(async()=>{const _0x53f9eb=_0x3fb590;if(_0x1ae084===_0x53f9eb(0x574)){const _0x452298=process['argv'][0x3],_0x12d58f=process['argv'][_0x53f9eb(0x3e6)](0x4),_0x1d230c=_0x465846(['node',_0x53f9eb(0x11b),..._0x12d58f]),_0x1d9e8f=_0xc08c46(_0x1d230c),_0x24ea7e=new Set([_0x53f9eb(0xa2),'-d',_0x53f9eb(0x4f3),'-k',_0x53f9eb(0x85),'-c',_0x53f9eb(0x1b5),'-p','--name',_0x53f9eb(0x701),_0x53f9eb(0x661),'--permissions',_0x53f9eb(0x15b),_0x53f9eb(0x14f),_0x53f9eb(0x60f),_0x53f9eb(0x1e6),'-e','--types']),_0x30538f=[];for(let _0x4599b8=0x0;_0x4599b8<_0x12d58f[_0x53f9eb(0x249)];_0x4599b8++){if(_0x24ea7e[_0x53f9eb(0xe5)](_0x12d58f[_0x4599b8])){_0x4599b8++;continue;}if(_0x12d58f[_0x4599b8]['startsWith']('-'))continue;_0x30538f['push'](_0x12d58f[_0x4599b8]);}switch(_0x452298){case'create':await _0x16deab(_0x1d9e8f,_0x1d230c);break;case _0x53f9eb(0x49e):await _0x4c0d94(_0x1d9e8f);break;case _0x53f9eb(0x33b):await _0x5eaadf(_0x30538f[0x0],_0x1d9e8f);break;default:console[_0x53f9eb(0x271)]('[okdb]\x20unknown\x20token\x20action:\x20\x22'+_0x452298+_0x53f9eb(0x111)),process[_0x53f9eb(0x719)](0x1);}return;}if(_0x1ae084===_0x53f9eb(0x226)){const _0x5e11ac=requireOkdbLicenseCodec(),_0x555c27=process[_0x53f9eb(0x144)][_0x53f9eb(0x3e6)](0x3),_0x54b6b5=_0x465846([_0x53f9eb(0x236),_0x53f9eb(0x11b),..._0x555c27]),_0x4c2f5f=_0xc08c46(_0x54b6b5),_0x21ce4f=new Set([_0x53f9eb(0xa2),'-d','--key','-k',_0x53f9eb(0x85),'-c',_0x53f9eb(0x1b5),'-p',_0x53f9eb(0x60f)]),_0x2feeac=[];for(let _0x4543a1=0x0;_0x4543a1<_0x555c27['length'];_0x4543a1++){if(_0x21ce4f[_0x53f9eb(0xe5)](_0x555c27[_0x4543a1])){_0x4543a1++;continue;}if(_0x555c27[_0x4543a1][_0x53f9eb(0x334)]('-'))continue;_0x2feeac[_0x53f9eb(0x39b)](_0x555c27[_0x4543a1]);}const _0x99064f=_0x2feeac[0x0]??null;if(_0x99064f==='remove')await _0x113b8f(_0x2feeac[0x1],_0x4c2f5f);else{if(!_0x99064f)await _0x560255(_0x4c2f5f);else{let _0x20371e=_0x5e11ac[_0x53f9eb(0x598)](_0x99064f);if(_0x20371e==='unknown'&&_0x16127a['existsSync'](_0x99064f))_0x20371e=_0x53f9eb(0x5a4);if(_0x20371e===_0x53f9eb(0x5a4))try{const _0x5cc250=_0x16127a[_0x53f9eb(0x3b9)](_0x99064f,_0x53f9eb(0x714))[_0x53f9eb(0x541)](),_0x1949ca=_0x5e11ac[_0x53f9eb(0x598)](_0x5cc250);if(_0x1949ca===_0x53f9eb(0x673)){await _0x26b364(_0x5cc250,_0x4c2f5f);return;}await _0x29ad77(_0x99064f,_0x4c2f5f);return;}catch(_0x323488){console[_0x53f9eb(0x271)]('[okdb]\x20error:\x20failed\x20to\x20read\x20'+_0x99064f+':\x20'+_0x323488[_0x53f9eb(0x5a3)]),process[_0x53f9eb(0x719)](0x1);}switch(_0x20371e){case _0x53f9eb(0x6ca):await _0x29ad77(_0x99064f,_0x4c2f5f);break;case _0x53f9eb(0x673):await _0x26b364(_0x99064f,_0x4c2f5f);break;case _0x53f9eb(0x2c7):await _0x150714(_0x99064f,_0x4c2f5f);break;default:console[_0x53f9eb(0x271)](_0x53f9eb(0x531)+_0x99064f+'\x22'),console[_0x53f9eb(0x271)](''),console[_0x53f9eb(0x271)](_0x53f9eb(0x4a1)),console[_0x53f9eb(0x271)](_0x53f9eb(0xde)),console[_0x53f9eb(0x271)](_0x53f9eb(0x353)),console['error'](_0x53f9eb(0x2a8)),console['error']('\x20\x20\x20\x20•\x20a\x20path\x20to\x20a\x20.license\x20file'),console[_0x53f9eb(0x271)](''),console[_0x53f9eb(0x271)](_0x53f9eb(0x5e8)),process['exit'](0x1);}}}return;}switch(_0x1ae084){case _0x53f9eb(0x39d):await _0xf76a20(_0x8bc460);break;case _0x53f9eb(0x6da):await _0x192b2f();break;case'reset':await _0x3dd1f7(_0x8bc460);break;case _0x53f9eb(0x3c4):await _0x39df1f(_0x25b3fe??_0x1492d5['resolve'](_0x53f9eb(0x185)),_0x8bc460);break;case _0x53f9eb(0x6a1):if(!_0x25b3fe)throw new Error('usage:\x20okdb\x20restore\x20<backup-dir>\x20--path\x20<target-data-dir>');await _0x4ec805(_0x1492d5[_0x53f9eb(0x429)](_0x25b3fe),_0x8bc460);break;case'export':await _0x4e9ebc(_0x25b3fe??_0x1492d5[_0x53f9eb(0x429)](_0x53f9eb(0x497)),_0x8bc460,_0x8b1a3d);break;case _0x53f9eb(0x67a):await _0x463b79(_0x25b3fe??_0x1492d5[_0x53f9eb(0x429)]('./okdb-export.ndjson'),_0x8bc460,_0x8b1a3d);break;case _0x53f9eb(0x139):await _0x3527bc(_0x25b3fe,_0x8bc460,_0x8b1a3d);break;}})()[_0x3fb590(0x722)](()=>process[_0x3fb590(0x719)](0x0))[_0x3fb590(0x4ec)](_0x58b24e=>{const _0x209bfe=_0x3fb590;console[_0x209bfe(0x271)](_0x209bfe(0x20f)+(_0x58b24e[_0x209bfe(0x5a3)]||_0x58b24e)+'\x0a'),process['exit'](0x1);});}else _0x472252()[_0x3fb590(0x4ec)](_0x176a66=>{const _0x4d2316=_0x3fb590;console['error'](_0x4d2316(0x5bf)),console[_0x4d2316(0x271)](_0x176a66[_0x4d2316(0x3a1)]||_0x176a66),process[_0x4d2316(0x719)](0x1);});}return okdb$1;}var okdbExports=requireOkdb(),okdb=getDefaultExportFromCjs(okdbExports);module[_0x563deb(0x5d5)]=okdb;