@kedem/okdb 1.0.0 → 1.0.3

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 (188) hide show
  1. package/README.md +1 -1
  2. package/bin/okdb.js +1 -1
  3. package/keys/public.pem +3 -0
  4. package/okdb.js +1 -1
  5. package/package.json +2 -2
  6. package/public/admin-app.js +1 -1
  7. package/public/components/admin-route-host.ok.js +1 -1
  8. package/public/components/env-picker.ok.js +1 -1
  9. package/public/components/field-path-input.ok.js +1 -1
  10. package/public/components/geo-map.ok.js +1 -1
  11. package/public/components/ok-cron-input.ok.js +1 -1
  12. package/public/components/ok-dropzone.ok.js +1 -1
  13. package/public/components/ok-js-input.ok.js +1 -1
  14. package/public/components/ok-json-input.ok.js +1 -1
  15. package/public/components/ok-text-monaco-input.ok.js +1 -1
  16. package/public/components/theme-toggle.ok.js +1 -1
  17. package/public/login-app.js +1 -1
  18. package/public/modules/ok.js +1 -1
  19. package/public/sections/api/parts/api-endpoint.ok.js +1 -1
  20. package/public/sections/auth/modals/create-token-modal.ok.js +1 -1
  21. package/public/sections/auth/modals/edit-token-modal.ok.js +1 -1
  22. package/public/sections/auth/modals/perm-info-popover.ok.js +1 -1
  23. package/public/sections/auth/parts/token-detail.ok.js +1 -1
  24. package/public/sections/auth/parts/token-list.ok.js +1 -1
  25. package/public/sections/db/modals/add-item-modal.ok.js +1 -1
  26. package/public/sections/db/modals/create-env-modal.ok.js +1 -1
  27. package/public/sections/db/modals/create-fts-modal.ok.js +1 -1
  28. package/public/sections/db/modals/create-index-modal.ok.js +1 -1
  29. package/public/sections/db/modals/create-pipeline-modal.ok.js +1 -1
  30. package/public/sections/db/modals/demo-env-modal.ok.js +1 -1
  31. package/public/sections/db/modals/remove-env-modal.ok.js +1 -1
  32. package/public/sections/db/modals/schema-edit-modal.ok.js +1 -1
  33. package/public/sections/db/parts/db-overview.ok.js +1 -1
  34. package/public/sections/db/parts/db-pipelines-panel.ok.js +1 -1
  35. package/public/sections/db/parts/edit-row.ok.js +1 -1
  36. package/public/sections/db/parts/tm-timeline.ok.js +1 -1
  37. package/public/sections/db/parts/type-changelog.ok.js +1 -1
  38. package/public/sections/db/parts/type-list.ok.js +1 -1
  39. package/public/sections/db/parts/type-pipelines-tab.ok.js +1 -1
  40. package/public/sections/db/parts/type-schema-tab.ok.js +1 -1
  41. package/public/sections/db/parts/type-viewer.ok.js +1 -1
  42. package/public/sections/db/parts/type-violations-tab.ok.js +1 -1
  43. package/public/sections/embeddings/modals/register-model-modal.ok.js +1 -1
  44. package/public/sections/embeddings/parts/embed-create-panel.ok.js +1 -1
  45. package/public/sections/embeddings/parts/embed-embedder-panel.ok.js +1 -1
  46. package/public/sections/embeddings/parts/embed-engine-declaration-editor.ok.js +1 -1
  47. package/public/sections/embeddings/parts/embed-engine-list.ok.js +1 -1
  48. package/public/sections/embeddings/parts/embed-indexer-panel.ok.js +1 -1
  49. package/public/sections/embeddings/parts/embed-lifecycle-bar.ok.js +1 -1
  50. package/public/sections/embeddings/parts/embed-model-catalog.ok.js +1 -1
  51. package/public/sections/embeddings/parts/embed-overview.ok.js +1 -1
  52. package/public/sections/embeddings/parts/embed-search-panel.ok.js +1 -1
  53. package/public/sections/embeddings/parts/embed-worker-panel.ok.js +1 -1
  54. package/public/sections/embeddings/parts/embeddings-engine-panel.ok.js +1 -1
  55. package/public/sections/embeddings/parts/engines-overview.ok.js +1 -1
  56. package/public/sections/embeddings/parts/pipeline-create-panel.ok.js +1 -1
  57. package/public/sections/engines/engine-panel-shared-style.js +1 -1
  58. package/public/sections/engines/engine-ui-utils.js +1 -1
  59. package/public/sections/engines/modals/engine-modal.ok.js +1 -1
  60. package/public/sections/engines/parts/engine-declaration-editor.ok.js +1 -1
  61. package/public/sections/engines/parts/engine-lifecycle-actions.ok.js +1 -1
  62. package/public/sections/engines/parts/engine-panel-shell.ok.js +1 -1
  63. package/public/sections/engines/parts/engine-resource-card.ok.js +1 -1
  64. package/public/sections/engines/parts/engine-row-item.ok.js +1 -1
  65. package/public/sections/engines/parts/generic-engine-panel.ok.js +1 -1
  66. package/public/sections/files/parts/files-blob-status.ok.js +1 -1
  67. package/public/sections/files/parts/files-collection-list.ok.js +1 -1
  68. package/public/sections/files/parts/files-collection-panel.ok.js +1 -1
  69. package/public/sections/files/parts/files-file-list.ok.js +1 -1
  70. package/public/sections/files/parts/files-overview.ok.js +1 -1
  71. package/public/sections/files/parts/files-path-browser.ok.js +1 -1
  72. package/public/sections/files/parts/files-upload-panel.ok.js +1 -1
  73. package/public/sections/functions/modals/function-modal.ok.js +1 -1
  74. package/public/sections/functions/parts/function-detail.ok.js +1 -1
  75. package/public/sections/functions/parts/function-logs.ok.js +1 -1
  76. package/public/sections/functions/parts/function-runner.ok.js +1 -1
  77. package/public/sections/functions/parts/functions-list.ok.js +1 -1
  78. package/public/sections/license/parts/license-panel.ok.js +1 -1
  79. package/public/sections/queue/modals/create-bucket-modal.ok.js +1 -1
  80. package/public/sections/queue/modals/edit-bucket-modal.ok.js +1 -1
  81. package/public/sections/queue/modals/edit-job-modal.ok.js +1 -1
  82. package/public/sections/queue/modals/enqueue-job-modal.ok.js +1 -1
  83. package/public/sections/queue/modals/job-type-modal.ok.js +1 -1
  84. package/public/sections/queue/parts/ok-job-form.ok.js +1 -1
  85. package/public/sections/queue/parts/queue-buckets.ok.js +1 -1
  86. package/public/sections/queue/parts/queue-job-types.ok.js +1 -1
  87. package/public/sections/queue/parts/queue-jobs.ok.js +1 -1
  88. package/public/sections/queue/parts/queue-types.ok.js +1 -1
  89. package/public/sections/queue/parts/queue-workers.ok.js +1 -1
  90. package/public/sections/sync/parts/sync-node-detail.ok.js +1 -1
  91. package/public/sections/sync/parts/sync-retention.ok.js +1 -1
  92. package/public/sections/sync/parts/sync-topology.ok.js +1 -1
  93. package/public/sections/system/modals/data-ops-modal.ok.js +1 -1
  94. package/public/sections/system/parts/system-api-panel.ok.js +1 -1
  95. package/public/sections/system/parts/system-auth-panel.ok.js +1 -1
  96. package/public/sections/system/parts/system-log-history.ok.js +1 -1
  97. package/public/sections/system/parts/system-log.ok.js +1 -1
  98. package/public/sections/system/parts/system-status.ok.js +1 -1
  99. package/public/sections/system/parts/system-sync-panel.ok.js +1 -1
  100. package/public/sections/views/modals/create-view-modal.ok.js +1 -1
  101. package/public/sections/views/parts/view-detail.ok.js +1 -1
  102. package/public/sections/views/parts/views-list.ok.js +1 -1
  103. package/public/sections/views/parts/views-overview.ok.js +1 -1
  104. package/public/setup-app.js +1 -1
  105. package/public/stores/auth-store.js +1 -1
  106. package/public/stores/events-store.js +1 -1
  107. package/public/stores/functions-store.js +1 -1
  108. package/public/stores/okdb-store.js +1 -1
  109. package/public/stores/theme-store.js +1 -1
  110. package/public/util/permissions.js +1 -1
  111. package/public/util/sift-schema.js +1 -1
  112. package/public/vendor/okjs/ok.esm.min.js +1 -2
  113. package/public/vendor/okjs/toolkit/behavior/async.ok.js +1 -1
  114. package/public/vendor/okjs/toolkit/components/ok-chart.ok.js +1 -1
  115. package/public/vendor/okjs/toolkit/components/ok-doc-viewer.ok.js +1 -1
  116. package/public/vendor/okjs/toolkit/components/ok-marked.ok.js +1 -1
  117. package/public/vendor/okjs/toolkit/components/ok-monaco.ok.js +1 -1
  118. package/public/vendor/okjs/toolkit/core/ok-layer-service.ok.js +1 -1
  119. package/public/vendor/okjs/toolkit/core/ok-layer.ok.js +1 -1
  120. package/public/vendor/okjs/toolkit/core/ok-overlay.ok.js +1 -1
  121. package/public/vendor/okjs/toolkit/core/ok-sandbox.ok.js +1 -1
  122. package/public/vendor/okjs/toolkit/core/transition.ok.js +1 -1
  123. package/public/vendor/okjs/toolkit/core/virtualized.ok.js +1 -1
  124. package/public/vendor/okjs/toolkit/devtools/ok-console-service.ok.js +1 -1
  125. package/public/vendor/okjs/toolkit/devtools/ok-console.ok.js +1 -1
  126. package/public/vendor/okjs/toolkit/devtools/ok-fps-monitor-service.ok.js +1 -1
  127. package/public/vendor/okjs/toolkit/devtools/ok-fps-monitor.ok.js +1 -1
  128. package/public/vendor/okjs/toolkit/devtools/ok-inspector-service.ok.js +1 -1
  129. package/public/vendor/okjs/toolkit/devtools/ok-inspector.ok.js +1 -1
  130. package/public/vendor/okjs/toolkit/devtools/ok-js-tree.ok.js +1 -1
  131. package/public/vendor/okjs/toolkit/devtools/ok-timeline-service.ok.js +1 -1
  132. package/public/vendor/okjs/toolkit/devtools/ok-timeline.ok.js +1 -1
  133. package/public/vendor/okjs/toolkit/docs/doc-viewer.ok.js +1 -1
  134. package/public/vendor/okjs/toolkit/editor/ok-live-component.ok.js +1 -1
  135. package/public/vendor/okjs/toolkit/editor/ok-live-example.ok.js +1 -1
  136. package/public/vendor/okjs/toolkit/editor/ok-live-shell.ok.js +1 -1
  137. package/public/vendor/okjs/toolkit/elements/ok-dropdown.ok.js +1 -1
  138. package/public/vendor/okjs/toolkit/elements/ok-icon.ok.js +1 -1
  139. package/public/vendor/okjs/toolkit/elements/ok-select.ok.js +1 -1
  140. package/public/vendor/okjs/toolkit/elements/ok-table.ok.js +1 -1
  141. package/public/vendor/okjs/toolkit/errors/ok-crash-boundary.ok.js +1 -1
  142. package/public/vendor/okjs/toolkit/errors/ok-crash-info.ok.js +1 -1
  143. package/public/vendor/okjs/toolkit/i18n/i18n-editor-examples.ok.js +1 -1
  144. package/public/vendor/okjs/toolkit/i18n/i18n-editor.ok.js +1 -1
  145. package/public/vendor/okjs/toolkit/i18n/i18n-key-editor-tips.ok.js +1 -1
  146. package/public/vendor/okjs/toolkit/i18n/i18n-key-editor.ok.js +1 -1
  147. package/public/vendor/okjs/toolkit/i18n/i18n-service.ok.js +1 -1
  148. package/public/vendor/okjs/toolkit/i18n/ok-i18n.js +1 -1
  149. package/public/vendor/okjs/toolkit/interaction/ok-contextmenu.ok.js +1 -1
  150. package/public/vendor/okjs/toolkit/interaction/ok-dismiss-service.ok.js +1 -1
  151. package/public/vendor/okjs/toolkit/interaction/ok-draggable.ok.js +1 -1
  152. package/public/vendor/okjs/toolkit/interaction/ok-flyover-panel.ok.js +1 -1
  153. package/public/vendor/okjs/toolkit/interaction/ok-flyover.ok.js +1 -1
  154. package/public/vendor/okjs/toolkit/interaction/ok-highlight-service.ok.js +1 -1
  155. package/public/vendor/okjs/toolkit/interaction/ok-highlight.ok.js +1 -1
  156. package/public/vendor/okjs/toolkit/interaction/ok-hotkeys-service.ok.js +1 -1
  157. package/public/vendor/okjs/toolkit/interaction/ok-picker-service.ok.js +1 -1
  158. package/public/vendor/okjs/toolkit/interaction/ok-popout-service.ok.js +1 -1
  159. package/public/vendor/okjs/toolkit/interaction/ok-popout.ok.js +1 -1
  160. package/public/vendor/okjs/toolkit/interaction/ok-portal-service.ok.js +1 -1
  161. package/public/vendor/okjs/toolkit/interaction/ok-submenu.ok.js +1 -1
  162. package/public/vendor/okjs/toolkit/layout/ok-resizer.ok.js +1 -1
  163. package/public/vendor/okjs/toolkit/manifest.js +1 -1
  164. package/public/vendor/okjs/toolkit/modals/ok-modal-service.ok.js +1 -1
  165. package/public/vendor/okjs/toolkit/modals/ok-modal.ok.js +1 -1
  166. package/public/vendor/okjs/toolkit/modals/ok-toast-service.ok.js +1 -1
  167. package/public/vendor/okjs/toolkit/modals/ok-window.ok.js +1 -1
  168. package/public/vendor/okjs/toolkit/navigation/hash-router.ok.js +1 -1
  169. package/public/vendor/okjs/toolkit/navigation/history-router.ok.js +1 -1
  170. package/public/vendor/okjs/toolkit/navigation/router.ok.js +1 -1
  171. package/public/vendor/okjs/toolkit/sync/reactive-sync-service.ok.js +1 -1
  172. package/public/vendor/okjs/toolkit/sync/reactive-sync.js +1 -1
  173. package/public/vendor/okjs/toolkit/theming/blocks/ok-design-button.css.js +1 -1
  174. package/public/vendor/okjs/toolkit/theming/blocks/ok-design-input.css.js +1 -1
  175. package/public/vendor/okjs/toolkit/theming/ok-design-style.js +1 -1
  176. package/public/vendor/okjs/toolkit/theming/ok-design-vars.js +1 -1
  177. package/public/vendor/okjs/toolkit/theming/ok-design.ok.js +1 -1
  178. package/public/vendor/okjs/toolkit/theming/ok-theme-editor/ok-theme-editor-input.ok.js +1 -1
  179. package/public/vendor/okjs/toolkit/theming/ok-theme-editor/ok-theme-editor-service.ok.js +1 -1
  180. package/public/vendor/okjs/toolkit/theming/ok-theme-editor/ok-theme-editor-style.js +1 -1
  181. package/public/vendor/okjs/toolkit/theming/ok-theme-editor/ok-theme-editor-utils.js +1 -1
  182. package/public/vendor/okjs/toolkit/theming/ok-theme-editor/ok-theme-editor-variable.ok.js +1 -1
  183. package/public/vendor/okjs/toolkit/theming/ok-theme-editor/ok-theme-editor-vm.js +1 -1
  184. package/public/vendor/okjs/toolkit/theming/ok-theme-editor/ok-theme-editor.ok.js +1 -1
  185. package/public/vendor/okjs/toolkit/theming/ok-theme.ok.js +1 -1
  186. package/public/view-models/type-query-vm.js +1 -1
  187. package/public/images/logo.png +0 -0
  188. package/public/images/logo.svg +0 -333
package/bin/okdb.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- 'use strict';const _0xecd54b=_0x57c2;(function(_0x34f881,_0x2c1ba4){const _0x78fc46=_0x57c2,_0x55e503=_0x34f881();while(!![]){try{const _0x510972=parseInt(_0x78fc46(0x2aa))/0x1+parseInt(_0x78fc46(0x374))/0x2+-parseInt(_0x78fc46(0x158))/0x3+parseInt(_0x78fc46(0x285))/0x4*(parseInt(_0x78fc46(0xcc))/0x5)+parseInt(_0x78fc46(0x35a))/0x6+-parseInt(_0x78fc46(0x193))/0x7*(parseInt(_0x78fc46(0x115))/0x8)+-parseInt(_0x78fc46(0x233))/0x9;if(_0x510972===_0x2c1ba4)break;else _0x55e503['push'](_0x55e503['shift']());}catch(_0x550ca5){_0x55e503['push'](_0x55e503['shift']());}}}(_0x3e71,0xdd630));var require$$3=require('path'),require$$1=require('fs'),require$$3$1=require(_0xecd54b(0x130)),require$$0$2=require(_0xecd54b(0x26f)),require$$5=require(_0xecd54b(0x1c0)),require$$0=require(_0xecd54b(0x328)),require$$0$1=require(_0xecd54b(0x39d)),require$$2$1=require('os'),require$$4=require('child_process');function getDefaultExportFromCjs(_0x5e1792){const _0x1b31cb=_0xecd54b;return _0x5e1792&&_0x5e1792[_0x1b31cb(0x382)]&&Object[_0x1b31cb(0x372)][_0x1b31cb(0x2e6)][_0x1b31cb(0x314)](_0x5e1792,_0x1b31cb(0x1dc))?_0x5e1792[_0x1b31cb(0x1dc)]:_0x5e1792;}var okdb$1={},version=_0xecd54b(0x23e),require$$2={'version':version},okdbAuthTokens,hasRequiredOkdbAuthTokens;function requireOkdbAuthTokens(){if(hasRequiredOkdbAuthTokens)return okdbAuthTokens;hasRequiredOkdbAuthTokens=0x1;const _0x5d6b06=require$$0;function _0x1e5f50(_0x8acd1e,_0x553d14){const _0x54bd09=_0x57c2;return _0x5d6b06[_0x54bd09(0x160)]('sha256',_0x553d14)['update'](_0x8acd1e)[_0x54bd09(0x105)]('base64url');}function _0x379ddb(_0x1fad74,_0x3a457a){const _0x5369fe=_0x57c2;if(typeof _0x1fad74!==_0x5369fe(0xe7)||typeof _0x3a457a!==_0x5369fe(0xe7))return![];if(Buffer[_0x5369fe(0x1fa)](_0x1fad74)!==Buffer['byteLength'](_0x3a457a))return![];return _0x5d6b06[_0x5369fe(0x2a3)](Buffer[_0x5369fe(0x2c3)](_0x1fad74),Buffer['from'](_0x3a457a));}function _0x39360c(_0x15269a){const _0x22693e=_0x57c2;if(!_0x15269a?.['startsWith'](_0x22693e(0x209)))return null;return _0x15269a[_0x22693e(0x1e5)](0x7);}function _0x1a7764(_0x4d998f=0x20){const _0x5e6845=_0x57c2;return _0x5d6b06[_0x5e6845(0x1a6)](_0x4d998f)[_0x5e6845(0x3a9)]('base64url');}function _0x541954(_0x592563){const _0x4a781a=_0x57c2;return _0x5d6b06['createHash'](_0x4a781a(0x2f5))[_0x4a781a(0x29f)](_0x592563)['digest'](_0x4a781a(0x10d));}function _0x20c3ce(_0x2719e1,_0x1f9119,_0x1d71ea=0x36ee80){const _0x49a258=_0x57c2;if(!_0x1f9119)throw new Error(_0x49a258(0x287));const _0x54400d=Date[_0x49a258(0x1bf)](),_0x299536=Buffer[_0x49a258(0x2c3)](JSON[_0x49a258(0x2d2)]({'iat':_0x54400d,'exp':_0x54400d+_0x1d71ea,'sub':_0x2719e1?.['id']??_0x2719e1?.[_0x49a258(0x2f6)]??null,'username':_0x2719e1?.[_0x49a258(0x2e3)]??_0x2719e1?.[_0x49a258(0x17a)]??null,'roles':Array['isArray'](_0x2719e1?.[_0x49a258(0xe4)])?_0x2719e1[_0x49a258(0xe4)]:[]}))['toString']('base64url'),_0x1552fb=_0x1e5f50(_0x299536,_0x1f9119);return _0x299536+'.'+_0x1552fb;}function _0x3419dc(_0x200ef2,_0x2509d0){const _0xad6b36=_0x57c2;if(!_0x2509d0||typeof _0x200ef2!==_0xad6b36(0xe7))return null;const [_0x4b7096,_0x906534]=_0x200ef2['split']('.');if(!_0x4b7096||!_0x906534)return null;const _0x12ad50=_0x1e5f50(_0x4b7096,_0x2509d0);if(!_0x379ddb(_0x906534,_0x12ad50))return null;try{const _0x3c9124=JSON['parse'](Buffer[_0xad6b36(0x2c3)](_0x4b7096,_0xad6b36(0x123))[_0xad6b36(0x3a9)]()),_0x14b7d3=0x7530;if(Date[_0xad6b36(0x1bf)]()>Number(_0x3c9124?.[_0xad6b36(0x238)]??0x0)+_0x14b7d3)return null;return _0x3c9124;}catch{return null;}}async function _0x213044(_0x35140a){return new Promise((_0x500fe8,_0x1cef8f)=>{const _0x33423d=_0x57c2,_0x5edd39=_0x5d6b06[_0x33423d(0x1a6)](0x10);_0x5d6b06['scrypt'](_0x35140a,_0x5edd39,0x40,(_0x472847,_0x4ed600)=>{const _0x81595b=_0x33423d;if(_0x472847)_0x1cef8f(_0x472847);_0x500fe8(_0x5edd39[_0x81595b(0x3a9)](_0x81595b(0x10d))+':'+_0x4ed600['toString'](_0x81595b(0x10d)));});});}async function _0x1f1847(_0x427791,_0x4a7704){const _0x4271cc=_0x57c2,[_0x45101a,_0x300f24]=_0x4a7704['split'](':');if(!_0x45101a||!_0x300f24)return![];const _0x3ced61=Buffer[_0x4271cc(0x2c3)](_0x45101a,'hex');return new Promise((_0x465baf,_0x33c002)=>{const _0x8908de=_0x4271cc;_0x5d6b06[_0x8908de(0x3b1)](_0x427791,_0x3ced61,0x40,(_0x56339a,_0x11a33a)=>{const _0x310076=_0x8908de;if(_0x56339a)_0x33c002(_0x56339a);_0x465baf(_0x5d6b06[_0x310076(0x2a3)](_0x11a33a,Buffer[_0x310076(0x2c3)](_0x300f24,_0x310076(0x10d))));});});}return okdbAuthTokens={'hmac':_0x1e5f50,'timingSafeEqual':_0x379ddb,'parseBearer':_0x39360c,'randomToken':_0x1a7764,'hashToken':_0x541954,'issueToken':_0x20c3ce,'authenticateToken':_0x3419dc,'hashPassword':_0x213044,'verifyPassword':_0x1f1847},okdbAuthTokens;}var okdbLicenseCodec,hasRequiredOkdbLicenseCodec;function _0x3e71(){const _0x2b1b80=['exportBlobs','EXIT','stopped','padEnd','543569kaqHxY','description','--no-repl','LOGS','[okdb]\x20error:\x20show\x20requires\x20an\x20id\x20argument','\x20\x20\x20\x20id:\x20\x20\x20\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','SCHEMA_COLLECTION_INVALID','_license','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20override\x20active\x20environment\x20for\x20this\x20call\x0a\x20\x20','failures','node','charCodeAt','bind','\x1b[90m','\x20\x20⚠\x20\x20','targetType','\x20\x20\x20\x20\x20\x20','Full-text\x20search','bold','warn','--token','.\x20Add\x20a\x20license\x20that\x20includes\x20\x22','assertFeature','Queue','from','/api/','Cannot\x20delete\x20','\x20to\x20quit.','open','(none)','trim','true','peers=','\x0a\x20\x20No\x20routes\x20matching\x20\x22','records','database\x20path\x20writable:\x20','\x1b[1m','noRepl','listRoutes','stringify','[okdb]\x20port\x20','Hint:\x20','Files','access:\x20','title','\x20to\x20browse\x20the\x20API,\x20','decodeLicenseBlob:\x20failed\x20to\x20decode\x20payload:\x20','argv','\x20env','\x20\x20\x20http://localhost:','(empty)','floor','./okdb-backup','dropping','removeLicense','Admin','username','[okdb]\x20backing\x20up\x20to\x20','listen','hasOwnProperty','TYPES','xdg-open\x20','\x20\x20\x20\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20browse\x20API\x20routes,\x20grouped\x20by\x20area\x0a\x20\x20','views','[body]','\x20—\x20type\x20env\x20to\x20list\x20available\x0a','hidden','database\x20path\x20not\x20writable:\x20','body','port','concat','/api','[okdb]\x20error:\x20license\x20management\x20is\x20only\x20available\x20in\x20licensed\x20builds\x20(npm\x20run\x20build:prod).','sha256','sub','ACTIVATION_EXPIRED','detectInputType','toUpperCase','license:activated','--no-admin','env/staging/info','\x20more','_isFree','\x20logs\x20off\x0a','Examples','index:progress','version','createInterface','System','\x22\x20matches\x20','level','INVALID_PRIMARY_KEY','OKDBInvalidIndexKeyError','export','pause','\x20\x20✓\x20Revoked\x20token\x20','{}[]:,\x27\x22','limits','sourceKey','\x20\x20Usage:\x20logs\x20[on|off|debug|info|warn|error]','tags:\x20','\x20documents\x20fail\x20validation','rmSync','\x20\x20\x20\x20limits:\x20\x20\x20\x20','call','\x20\x20\x20\x20name:\x20\x20\x20\x20\x20\x20\x20\x20','type/users','method','level:\x20info','--config','isArray','registerFts','\x0a\x20\x20Invalid\x20JSON:\x20','License\x20signature\x20invalid\x20—\x20this\x20license\x20was\x20not\x20signed\x20by\x20the\x20key\x20paired\x20with\x20this\x20build.\x20','write','\x20\x20Next\x20step\x20—\x20activate\x20the\x20license:','\x20\x20\x20\x20status:\x20\x20\x20\x20active\x20\x20(open\x20license\x20—\x20no\x20activation\x20needed)','auth','\x20\x20\x20\x20permissions:\x20','application/json','writeUInt16BE','\x20\x20\x20\x20-\x20The\x20license\x20blob\x20has\x20not\x20been\x20added\x20yet\x20—\x20run\x20`okdb\x20license\x20<blob>`\x20first.','[okdb]\x20reset:\x20','types/env=','crypto','features','unlinkSync','darwin','off','targetKey','help','--name','address','allocUnsafe','index:reset','port\x20','repeat','remove','password','false','resetFts','type/users/query\x20{\x22active\x22:true}','OKDBIndexAlreadyRegisteredError','../','.kdb_history','types','\x0a\x20\x20✓\x20License\x20added','OKDBSchemaCollectionError','[okdb]\x20error:\x20--address\x20is\x20required\x20for\x20join\x20(this\x20node\x27s\x20reachable\x20sync\x20address).\x0a','\x20\x20\x20\x203.\x20Run:\x20\x20okdb\x20license\x20<activation-token>','round','\x0a\x20\x20\x20\x20','history','INVALID_VALUE','\x20\x20Error:\x20','~licenses','\x20references\x20','children','sizeAfter','\x20\x20Type\x20','\x20does\x20not\x20exist','type/users\x20--help','\x20already\x20in\x20use','\x0a\x20\x20Usage:\x20use\x20<env-name>\x0a','events','\x27:\x20','stopping','files','startsWith','index:ready','files/','\x0a\x20\x20Raw\x20token\x20(shown\x20once,\x20save\x20it\x20now):\x0a','\x20in\x20','logs','8596110KLPyRy','\x1b[2m','--permissions','enabled','permissions','__OKDB_PUB_FINGERPRINT__','\x20which\x20does\x20not\x20exist','\x20\x20\x20\x20\x20\x20\x20POST\x20(body\x20implies\x20POST)\x0a\x20\x20','\x20\x20\x20\x202.\x20The\x20vendor\x20returns\x20an\x20activation\x20token.','\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\x20→\x20GET\x20/api/envs\x0a\x20\x20\x20\x20','changes','PATCH','unique:violation','blob','system:clock_change','freeze','\x1b[36m','has','dropType','\x20\x20\x20\x20\x20\x20\x20','key','Schema\x20validation\x20failed\x20for\x20','OKDBUniqueConstraintError','prototype','\x20\x20\x20\x20license:\x20free\x20tier\x20—\x20add\x20a\x20license\x20to\x20unlock\x20sync,\x20embeddings,\x20engines,\x20time-machine','1812126BsHJOP','decodeLicenseBlob:\x20input\x20must\x20be\x20a\x20string','use','value','object','shutdown','values','join','\x22.\x20Use:\x20create,\x20list,\x20revoke','get','okdb.pid','./okdb-export.ndjson','reason','min','__esModule','resolve','[okdb]\x20error:\x20token\x20with\x20name\x20\x22','EADDRINUSE','dropSchema','length','\x20\x20\x20\x20addedAt:\x20\x20\x20','.okdb-write-test','created','\x0a\x20\x20No\x20documentation\x20found\x20for:\x20','env/:env','\x20\x20→\x20\x20','\x20writes\x20(','alloc','waiting','PIN','invalid','\x1b[34m','put','_systemEnv','OKDBIndexNotRegisteredError','\x20\x20\x20\x20port:\x20\x20','[okdb]\x20unknown\x20token\x20action:\x20\x22','\x20tokens:','verifyActivation','[okdb]\x20error:\x20--password\x20requires\x20--name','server','node:crypto','EXPIRES','Invalid\x20primary\x20key\x20type:\x20','\x0a\x20\x20okdb\x20—\x20standalone\x20OKDB\x20server\x0a\x0a\x20\x20Usage:\x0a\x20\x20\x20\x20okdb\x20[options]\x0a\x20\x20\x20\x20okdb\x20<command>\x0a\x0a\x20\x20Options:\x0a\x20\x20\x20\x20-p,\x20--port\x20<port>\x20\x20\x20\x20\x20\x20\x20\x20HTTP\x20port\x20(default:\x208484)\x0a\x20\x20\x20\x20-d,\x20--path\x20<dir>\x20\x20\x20\x20\x20\x20\x20\x20\x20Database\x20directory\x20(default:\x20./okdb-data)\x0a\x20\x20\x20\x20-k,\x20--key\x20\x20<secret>\x20\x20\x20\x20\x20\x20Encryption\x20key\x20for\x20data\x20at\x20rest\x0a\x20\x20\x20\x20-c,\x20--config\x20<file>\x20\x20\x20\x20\x20\x20Config\x20file\x20path\x20(default:\x20.kdbconfig)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--log-level\x20<level>\x20\x20Log\x20level:\x20debug\x20|\x20info\x20|\x20warn\x20|\x20error\x20(default:\x20info)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-repl\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Start\x20server\x20without\x20interactive\x20shell\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-admin\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20admin\x20UI\x0a\x20\x20\x20\x20\x20\x20\x20\x20--open\x20[ip\x20...]\x20\x20\x20\x20\x20\x20Open\x20mode:\x20bypass\x20auth\x20for\x20listed\x20IPs\x20(default:\x20localhost).\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Examples:\x20--open\x20\x20--open\x20192.168.1.0/24\x20\x20--open\x20*\x0a\x20\x20\x20\x20\x20\x20\x20\x20--log-requests\x20\x20\x20\x20\x20\x20\x20Print\x20every\x20HTTP\x20request\x20to\x20stdout\x20(for\x20debugging)\x0a\x20\x20\x20\x20-v,\x20--version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Print\x20version\x20and\x20exit\x0a\x20\x20\x20\x20-h,\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x0a\x0a\x20\x20Commands:\x0a\x20\x20\x20\x20version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Print\x20version\x20and\x20exit\x0a\x20\x20\x20\x20doctor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Run\x20health\x20checks\x0a\x20\x20\x20\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Create\x20.kdbconfig\x20and\x20okdb-data/\x0a\x20\x20\x20\x20token\x20create\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Create\x20a\x20token\x20in\x20the\x20local\x20DB\x20(direct\x20access,\x20no\x20HTTP)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--name\x20<name>\x20\x20\x20\x20\x20\x20For\x20password\x20login\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--password\x20<pass>\x20\x20Password\x20(requires\x20--name)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--label\x20<text>\x20\x20\x20\x20\x20Human\x20description\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--permissions\x20<l>\x20\x20Comma-separated\x20baseline\x20permissions\x20(e.g.\x20\x22*\x22\x20or\x20\x22data:read\x22)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--grants\x20<json>\x20\x20\x20\x20Per-env\x20grants\x20as\x20JSON\x20(e.g.\x20\x27{\x22orders\x22:[\x22data:*\x22]}\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--ttl\x20<ms>\x20\x20\x20\x20\x20\x20\x20\x20\x20Optional\x20TTL\x20in\x20milliseconds\x0a\x20\x20\x20\x20token\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20List\x20all\x20tokens\x20in\x20the\x20local\x20DB\x0a\x20\x20\x20\x20token\x20revoke\x20<id>\x20\x20\x20\x20\x20\x20\x20\x20Revoke\x20(delete)\x20a\x20token\x20by\x20id\x20(full\x20uuid\x20or\x20unique\x20prefix)\x0a\x20\x20\x20\x20join\x20<address>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Join\x20an\x20existing\x20cluster\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--token\x20<t>\x20\x20\x20\x20\x20\x20\x20\x20Bearer\x20token\x20from\x20the\x20cluster\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--username\x20<u>\x20\x20\x20\x20\x20Or,\x20username\x20for\x20login\x20exchange\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--password\x20<p>\x20\x20\x20\x20\x20Password\x20for\x20login\x20exchange\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--address\x20<addr>\x20\x20\x20This\x20node\x27s\x20reachable\x20sync\x20address\x20(required)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--path\x20<dir>\x20\x20\x20\x20\x20\x20\x20Local\x20DB\x20path\x0a\x20\x20\x20\x20backup\x20[dir]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Hot\x20filesystem\x20backup\x20via\x20LMDB\x20native\x20copy\x20(default:\x20./okdb-backup)\x0a\x20\x20\x20\x20export\x20<file>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Streaming\x20NDJSON\x20logical\x20export\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env\x20<name>\x20\x20\x20\x20\x20\x20env\x20to\x20export\x20(default:\x20default)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--types\x20<a,b,...>\x20comma-separated\x20type\x20filter\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--changes\x20\x20\x20\x20\x20\x20\x20\x20\x20include\x20changelog\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--blobs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20also\x20export\x20blob\x20files\x20alongside\x0a\x20\x20\x20\x20import\x20<file>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Streaming\x20NDJSON\x20logical\x20import\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env\x20<name>\x20\x20\x20\x20\x20\x20target\x20env\x20override\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--types\x20<a,b,...>\x20import\x20only\x20these\x20types\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--drop\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20drop\x20&\x20recreate\x20existing\x20types\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--changes\x20\x20\x20\x20\x20\x20\x20\x20\x20restore\x20changelog\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--blobs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20also\x20import\x20blob\x20files\x20alongside\x0a\x20\x20\x20\x20reset\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Delete\x20and\x20recreate\x20database\x20(with\x20confirmation)\x0a\x20\x20\x20\x20license\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20List\x20stored\x20licenses,\x20current\x20tier,\x20and\x20usage\x0a\x20\x20\x20\x20license\x20<blob|path>\x20\x20\x20\x20\x20\x20Add\x20a\x20license\x20blob\x20(or\x20read\x20from\x20a\x20.license\x20file)\x0a\x20\x20\x20\x20license\x20<activation>\x20\x20\x20\x20\x20Activate\x20a\x20previously-added\x20license\x20with\x20the\x20vendor\x27s\x20token\x0a\x20\x20\x20\x20license\x20<id>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20details\x20for\x20one\x20stored\x20license\x20(by\x20uuid\x20or\x20prefix)\x0a\x20\x20\x20\x20license\x20remove\x20<id>\x20\x20\x20\x20\x20\x20Remove\x20a\x20stored\x20license\x0a\x0a\x20\x20Environment\x20variables:\x0a\x20\x20\x20\x20OKDB_PORT\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20HTTP\x20port\x0a\x20\x20\x20\x20OKDB_PATH\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Database\x20directory\x0a\x20\x20\x20\x20OKDB_LOG_LEVEL\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Log\x20level\x20(debug|info|warn|error)\x0a\x20\x20\x20\x20OKDB_KEY\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Encryption\x20key\x0a\x20\x20\x20\x20OKDB_NO_REPL=1\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20REPL\x0a\x20\x20\x20\x20OKDB_NO_ADMIN=1\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20admin\x20UI\x0a\x0a\x20\x20Config\x20file\x20(.kdbconfig)\x20—\x20JSON,\x20all\x20keys\x20optional:\x0a\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22port\x22:\x20\x20\x20\x20\x208484,\x0a\x20\x20\x20\x20\x20\x20\x22path\x22:\x20\x20\x20\x20\x20\x22./okdb-data\x22,\x0a\x20\x20\x20\x20\x20\x20\x22key\x22:\x20\x20\x20\x20\x20\x20\x22...\x22,\x0a\x20\x20\x20\x20\x20\x20\x22logLevel\x22:\x20\x22info\x22,\x0a\x20\x20\x20\x20\x20\x20\x22noAdmin\x22:\x20\x20false,\x0a\x20\x20\x20\x20\x20\x20\x22noRepl\x22:\x20\x20\x20false,\x0a\x20\x20\x20\x20\x20\x20\x22auth\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22open\x22:\x20false\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20Examples:\x0a\x20\x20\x20\x20okdb\x0a\x20\x20\x20\x20okdb\x20--port\x209000\x20--path\x20./mydb\x0a\x20\x20\x20\x20okdb\x20--no-repl\x20--port\x208080\x0a\x20\x20\x20\x20okdb\x20--open\x0a\x20\x20\x20\x20okdb\x20--open\x20192.168.1.0/24\x0a\x20\x20\x20\x20okdb\x20doctor\x0a\x20\x20\x20\x20okdb\x20backup\x20./my-backup\x0a','\x1b[32m','Indexes','\x20→\x20POST\x20/api/env/','emit','indexOf','OKDBNotFoundError','\x20\x20Path\x20access','hasType','toString','activateLicense','exit','start\x20','Environments','LICENSE_FEATURE_DISABLED','--env','\x20\x20\x20\x20label:\x20\x20\x20\x20\x20\x20\x20','scrypt','isFile','[okdb]\x20imported\x20\x20types=','Index\x20\x22','\x20\x20╔═══════════════════════════╗','\x20\x20Example:\x20okdb\x20join\x20https://node-a.example.com\x20--token\x20<t>\x20--address\x20http://myhost:8484\x0a','env','LICENSE_TYPE_OPEN','\x22\x20is\x20used\x20by:\x20','expires','\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','_computeStatus','trimStart','fts','timeMachine','?\x0a\x20\x20Type\x20\x22yes\x22\x20to\x20confirm:\x20','transaction','.kdbconfig','<json-body>','\x20MB\x20→\x20','schema:drop','queue','push','--grants','derivePin',']\x20already\x20maps\x20to\x20\x27',',\x20got\x20','\x0a\x20\x20Joining\x20cluster\x20at\x20','body:\x20','\x27\x20doesn\x27t\x20exist','905TRNPXM','unique:violation_resolved','map','\x20\x20\x20\x20license:\x20⚠\x20OPEN\x20—\x20','current','ALREADY_EXISTS','\x20\x20(licensee:\x20','handle','line','\x20\x20\x20\x20status:\x20\x20\x20\x20','OKDBSchemaValidationError','INVALID_INDEX_KEY','find','\x20\x20Common\x20causes:','bus:poke','[okdb]\x20exported\x20\x20types=','.\x20Only\x20primitives,\x20null,\x20Buffers,\x20and\x20arrays\x20are\x20allowed.\x20Got:\x20','\x20\x20Envs:\x20\x20\x20\x20','admin','\x1b[31m','number','0123456789ABCDEFGHJKMNPQRSTVWXYZ','--changes',':\x20expected\x20','roles','\x22\x20already\x20exists','kind','string','message','recheck','envs','question','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','--types','writeFileSync','createServer','toISOString','\x20\x20\x20\x20\x20control\x20log\x20verbosity\x0a\x20\x20','\x20day(s).','yes','dim','debug','VERSION_MISMATCH','Type\x20\x27','\x20records…','filter','\x20result','stdout','processors/','ftsName','maxWrites','mcp','yellow','license','\x20\x20\x20\x20usage:\x20\x20\x20','grants','digest','No\x20tokens.','test','safety','\x20<path>\x20[json-body]','Sync','_envs','pin','hex','\x20\x20records=','createdAt','\x20months\x20from\x20issuance)','listening','null','schema:set','\x20(expires\x20','156680bGSSNI','\x20\x20·\x20\x20','wrong_node','result','Engines','operation','PUBLIC_KEY_PEM','[okdb]\x20./okdb-data\x20already\x20exists\x20—\x20skipping','transport','includes','every','FOREIGN_KEY_DELETE_RESTRICTED','finally','green','base64url','copy','\x20SECURITY\x20NOTICE','dirname','--address','--env\x20<name>','getRange','[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22','⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20','writes=','no\x20.kdbconfig\x20(using\x20defaults)','payload','isFeatureEnabled','net','(unset)','POST','__writeCounter','system:stopped','embeddings','setTtl','License\x20expired\x20or\x20invalidated','txn:start','unknown','OKDBVersionMismatchError','sizeBefore','Build\x20expects\x20public\x20key\x20fingerprint\x20','--port','\x20\x20\x20\x20•\x20a\x20path\x20to\x20a\x20.license\x20file','max','free\x20tier','Events','\x20days\x20—\x20POC/demo\x20only,\x20not\x20node-bound)','[okdb]\x20invalid\x20port:\x20','okdb','LICENSE_HASH_MISMATCH','OKDBTypeNotRegisteredError','127.0.0.1','\x1b[37m','rawBuf','\x20\x20✗','once','resetIndex','types:','revoke','[okdb]\x20starting…\x0a','split',',\x20label:\x20','some','captureStackTrace','\x20\x20\x20\x20licensee:\x20\x20','type/users/item/alice','http://localhost:','system:poke','4298271Tyxmvh','licenseType','parse','\x20\x20║','config\x20file\x20valid:\x20','\x20\x20Writes:\x20\x20','label','\x20type','createHmac','\x20deleted','\x20environment\x20','noAdmin','\x20\x20✓\x20joined\x20and\x20reconciliation\x20initiated','api','-----BEGIN\x20PUBLIC\x20KEY-----\x0aMCowBQYDK2VwAyEAacrkExPrhxNVHyeQBLDwg8xfm1OwyxDAPNdGXABYS2s=\x0a-----END\x20PUBLIC\x20KEY-----','valid','win32','sort','item:create','\x0a\x20\x20✓\x20Token\x20created','readUInt8','replace','decoded','drop','ceil','\x1b[35m','log','Open\x20licenses\x20cannot\x20exceed\x206\x20months\x20duration\x20(this\x20license\x20expires\x20','\x20\x20\x20\x20writes:\x20\x20\x20\x20','activation','readUInt32BE','\x20\x20\x20\x20license:\x20','clearLine','exportToFile','name','tags','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20','OKDBError','import','equals','config','[okdb]\x20exporting\x20blobs…','\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','[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22','sync','stderr','doctor','\x20\x20after\x20sync.\x20Duplicate\x20names\x20will\x20surface\x20as\x20ambiguous\x20logins\x20to\x20clean\x20up.','PUT\x20type/users/item/x\x20{\x22n\x22:1}','\x0d[okdb]\x20blobs:\x20','\x1b[33m','SIGTERM','boolean','\x20\x20(name:\x20','keys','\x1b[0m','--log-level','type/','starting','315IAkmbf','UNIQUE_CONSTRAINT','PUB_FINGERPRINT','--help','\x20\x20Flags','fill','resume','init','[okdb]\x20error:\x20join\x20requires\x20a\x20remote\x20address.\x20Usage:\x20okdb\x20join\x20<address>\x20--token\x20<t>','LICENSE_LIMIT_EXCEEDED','\x20\x20Some\x20checks\x20failed.\x0a','reset','\x20not\x20found','close','\x20\x20+','_licenseHash','id:\x20','addedAt','exec','randomBytes','red','list','input:\x20','backup','\x20\x20(unlimited)','param','ready','effective','search','5cf671aada50aa8e','stdin','padStart','[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22','already\x20in\x20use','existsSync','GET','\x0a\x20\x20Joined.\x20Remote\x20tokens\x20replicated.\x20You\x20can\x20now\x20log\x20in\x20with\x20cluster\x20credentials.\x0a','loadEnvFile','_active','licensee','catch','\x20\x20Usage:\x20','registerType','\x20\x20(need\x20≥\x2018)','now','../okdb','\x0a\x0a\x20\x20','[okdb]\x20opening\x20','token','cause','\x20envs','--username','DELETE','isTTY','system:ready','dynamic','\x20\x20Shell\x20commands','\x20\x20\x20\x20\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/','issuedAt','active','txn:rollback','meta','(no\x20types)','\x27,\x20cannot\x20map\x20to\x20\x27','typeSubDbs','NAME','reverse','pending','hint','forEach','~tokens','mkdirSync','\x20file','default','txn:end','Embeddings',':\x20key\x20[','details','[okdb]\x20reset\x20aborted','\x20\x20Usage:\x20okdb\x20license\x20[<blob|path|uuid|activation-token>]','migrate','\x20\x20All\x20checks\x20passed.\x0a','slice','--key','\x20for\x20commands,\x20','getPins','\x20\x20score:','dest','dbPath','fts:registered','\x20\x20Tier:\x20\x20\x20\x20','{}[]:,\x0a\x0d\x09\x20','count','isInteger','platform','OKDBForeignKeyError','quit','SCHEMA_VALIDATION_FAILED','\x0a\x20\x20','system:bus_state_change','toLowerCase','attach','info','byteLength','--label','terminal','\x22\x20on\x20\x22','.\x20Primary\x20keys\x20must\x20be\x20string\x20or\x20number.\x20Got:\x20','\x20\x20\x20\x20\x20explicit\x20method\x0a\x0a\x20\x20','\x20\x20changes=','item:update','detachConsole','TYPE_ALREADY_REGISTERED','\x0d[okdb]\x20','reload','\x27\x20on\x20type\x20\x27','\x20\x20\x20\x20•\x20a\x20license\x20blob\x20\x20\x20(Crockford\x20base32,\x20~150–250\x20chars)','index','Bearer\x20','/\x20quit\x20/\x20Ctrl+C','ttl:set','[okdb]\x20error:\x20','OKDBAlreadyExistsError','fieldPath','--path','—\x20/api/\x20is\x20auto-prefixed,\x20env\x20is\x20auto-injected','decodeLicenseBlob','writeUInt8','registerIndex','Records','creating','\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20','\x0a\x20\x20License\x20details:','uuid','Types','\x20licenses','license:removed','fts:drop','/api/env/','white','standard','error','./okdb-data','bus:drain',')\x20to\x20your\x20license\x20vendor.','\x20\x20\x20\x20status:\x20\x20\x20\x20pending\x20activation','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20','INDEX_ALREADY_REGISTERED','syncPeers','[okdb]\x20loaded\x20config:\x20','SIG_INVALID','[okdb]\x20created\x20./okdb-data','\x22\x20→\x20','http','constructor','type','\x20\x20http://localhost:','time','Activation\x20invalid:\x20','env/','12777021UQdnHi','utf8','\x0a\x20\x20Delete\x20ALL\x20data\x20in\x20','blobs','%),\x20','exp','code','summary','Shutting\x20down\x20due\x20to\x20license\x20expiry','ENV','addLicense','1.0.0','TYPE_NOT_REGISTERED','QUIT','Index\x20\x27','onLicenseExpired','prompt','routes','idx:','\x20\x20skipped=','\x27\x20already\x20registered','status','FEATURES','/type/users/item/alice\x0a\x20\x20\x20\x20','\x20(must\x20be\x201–65535)','Cannot\x20set\x20enforce\x20schema\x20on\x20','\x20\x20\x20\x20•\x20a\x20license\x20id\x20\x20\x20\x20\x20(uuid)','getCount','setPrompt','assertLimit','\x20\x20\x20\x20expires:\x20\x20\x20','\x20\x20\x20\x20path:\x20\x20','fromEntries','\x20\x20⚠','\x20\x20·\x20','data','active:','\x20/\x20','\x20\x20Usage:','resetting','path','OKDBIndexHasConsumersError','\x20\x20(','readFileSync','<path>','LABEL','type:registered','inputSchema','\x20\x20✓\x20OKDB\x20server\x20running','licenseHash','LICENSEE','INDEX_HAS_CONSUMERS','options','\x20MB)','started','set','sig','\x20log\x20level:\x20','license:invalid','expiresAt','readline','indexes','(add\x20a\x20license\x20first)','toFixed','[okdb]\x20error:\x20failed\x20to\x20read\x20','entries','Processors','clearTtl','type/users/item/alice\x20--env\x20staging','\x20\x20[okdb]\x20shutting\x20down…','[okdb]\x20error:\x20revoke\x20requires\x20an\x20id\x20argument','VERB','cyan','\x20\x20✓\x20Removed\x20license\x20','--ttl','selfAddress','\x20\x20\x20\x20\x20http://localhost:','\x20\x20(licenses\x20must\x20be\x20signed\x20by\x20the\x20matching\x20private\x20key)','[okdb]\x20error:\x20remove\x20requires\x20an\x20id\x20argument','\x20already\x20exists','pid','logLevel','38856pDLltq','\x20\x20[','Token\x20secret\x20not\x20configured','\x0a\x20\x20✓\x20License\x20activated','--password','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','NOT_FOUND','writeUInt32BE','ttl','ttl:expired','USE','typesPerEnv','engines','verify','\x20opening\x20','[on|off|level]','\x20\x20\x20\x20features:\x20\x20','\x0a[okdb]\x20shutting\x20down…\x0a','--blobs','toLocaleString','gray','randomUUID','No\x20license\x20found\x20matching\x20this\x20activation\x20token','LICENSE_INVALID','OPEN','ref:violation','update','[filter]','magenta','exports','timingSafeEqual','LICENSE_ACTIVATION_INVALID','columns'];_0x3e71=function(){return _0x2b1b80;};return _0x3e71();}function requireOkdbLicenseCodec(){const _0x492832=_0xecd54b;if(hasRequiredOkdbLicenseCodec)return okdbLicenseCodec;hasRequiredOkdbLicenseCodec=0x1;const _0x27589c=require$$0$1,_0x225c32=_0x492832(0xe1),_0x4ebf35=new Uint8Array(0x100)[_0x492832(0x198)](0xff);for(let _0x543274=0x0;_0x543274<_0x225c32[_0x492832(0x387)];_0x543274++){_0x4ebf35[_0x225c32[_0x492832(0x2b6)](_0x543274)]=_0x543274,_0x4ebf35[_0x225c32[_0x492832(0x2b6)](_0x543274)+0x20]=_0x543274;}_0x4ebf35['O'[_0x492832(0x2b6)](0x0)]=0x0,_0x4ebf35['o'['charCodeAt'](0x0)]=0x0,_0x4ebf35['I'[_0x492832(0x2b6)](0x0)]=0x1,_0x4ebf35['i'[_0x492832(0x2b6)](0x0)]=0x1,_0x4ebf35['L'[_0x492832(0x2b6)](0x0)]=0x1,_0x4ebf35['l'['charCodeAt'](0x0)]=0x1;function _0x3ccc74(_0x278fcf){const _0x471fd7=_0x492832;let _0x17cc1f=0x0,_0x5bc7dd=0x0,_0x5cf03a='';for(let _0x2a5ebf=0x0;_0x2a5ebf<_0x278fcf[_0x471fd7(0x387)];_0x2a5ebf++){_0x5bc7dd=_0x5bc7dd<<0x8|_0x278fcf[_0x2a5ebf],_0x17cc1f+=0x8;while(_0x17cc1f>=0x5){_0x17cc1f-=0x5,_0x5cf03a+=_0x225c32[_0x5bc7dd>>>_0x17cc1f&0x1f];}}return _0x17cc1f>0x0&&(_0x5cf03a+=_0x225c32[_0x5bc7dd<<0x5-_0x17cc1f&0x1f]),_0x5cf03a;}function _0x4daf8c(_0x5a8b14){const _0x4e0a1e=_0x492832;_0x5a8b14=_0x5a8b14['replace'](/-/g,'')[_0x4e0a1e(0x2f9)]();let _0x36e938=0x0,_0x2e6f6d=0x0;const _0x295184=[];for(let _0x322654=0x0;_0x322654<_0x5a8b14[_0x4e0a1e(0x387)];_0x322654++){const _0x465dae=_0x4ebf35[_0x5a8b14[_0x4e0a1e(0x2b6)](_0x322654)];if(_0x465dae===0xff)continue;_0x2e6f6d=_0x2e6f6d<<0x5|_0x465dae,_0x36e938+=0x5,_0x36e938>=0x8&&(_0x36e938-=0x8,_0x295184[_0x4e0a1e(0xc4)](_0x2e6f6d>>>_0x36e938&0xff));}return Buffer[_0x4e0a1e(0x2c3)](_0x295184);}const _0x553aa4=[_0x492832(0x184),_0x492832(0x135),_0x492832(0x291),_0x492832(0xbb),_0x492832(0xbc),_0x492832(0x2eb),_0x492832(0x100),'files'],_0x2162d9=0x0,_0x1bea12=0x1,_0x41147f=0x6*0x1e*0x18*0x3c*0x3c*0x3e8;function _0x571cb7({issuedAt:_0x22a27d,expiresAt:_0x11eecb,licensee:licensee='',features:features={},limits:limits={},licenseType:licenseType=_0x2162d9}){const _0x6094a2=_0x492832,_0x4b8517=Buffer[_0x6094a2(0x2c3)](licensee,_0x6094a2(0x234))[_0x6094a2(0x1e5)](0x0,0x40),_0x533692=0x1+0x1+0x4+0x4+0x1+_0x4b8517[_0x6094a2(0x387)]+0x2+0x10,_0x4d1d1a=Buffer['allocUnsafe'](_0x533692);let _0x3f743f=0x0;_0x4d1d1a[_0x6094a2(0x212)](0x1,_0x3f743f++),_0x4d1d1a['writeUInt8'](licenseType,_0x3f743f++),_0x4d1d1a[_0x6094a2(0x28c)](Math['floor'](_0x22a27d/0x3e8),_0x3f743f),_0x3f743f+=0x4,_0x4d1d1a[_0x6094a2(0x28c)](Math[_0x6094a2(0x2de)](_0x11eecb/0x3e8),_0x3f743f),_0x3f743f+=0x4,_0x4d1d1a[_0x6094a2(0x212)](_0x4b8517[_0x6094a2(0x387)],_0x3f743f++),_0x4b8517['copy'](_0x4d1d1a,_0x3f743f),_0x3f743f+=_0x4b8517[_0x6094a2(0x387)];let _0x2c3114=0x0;for(let _0x46e6b7=0x0;_0x46e6b7<_0x553aa4[_0x6094a2(0x387)];_0x46e6b7++){if(features[_0x553aa4[_0x46e6b7]])_0x2c3114|=0x1<<_0x46e6b7;}_0x4d1d1a[_0x6094a2(0x324)](_0x2c3114,_0x3f743f),_0x3f743f+=0x2;const _0x2dbf97=[_0x6094a2(0xea),_0x6094a2(0x290),_0x6094a2(0x227),_0x6094a2(0xff)];for(const _0x2d6b8e of _0x2dbf97){_0x4d1d1a[_0x6094a2(0x28c)](limits[_0x2d6b8e]||0x0,_0x3f743f),_0x3f743f+=0x4;}return _0x4d1d1a;}function _0x5b2021(_0x45db7a){const _0x108028=_0x492832;let _0x5ded3b=0x0;const _0x300684=_0x45db7a['readUInt8'](_0x5ded3b++),_0x22640b=_0x45db7a[_0x108028(0x16c)](_0x5ded3b++),_0x489c16=_0x45db7a[_0x108028(0x176)](_0x5ded3b);_0x5ded3b+=0x4;const _0x2c3d93=_0x45db7a[_0x108028(0x176)](_0x5ded3b);_0x5ded3b+=0x4;const _0x4e685e=_0x45db7a[_0x108028(0x16c)](_0x5ded3b++),_0x5acaf0=_0x45db7a[_0x108028(0x1e5)](_0x5ded3b,_0x5ded3b+_0x4e685e)['toString'](_0x108028(0x234));_0x5ded3b+=_0x4e685e;const _0x12a148=_0x45db7a['readUInt16BE'](_0x5ded3b);_0x5ded3b+=0x2;const _0x21a657={};for(let _0x356ae2=0x0;_0x356ae2<_0x553aa4[_0x108028(0x387)];_0x356ae2++){_0x21a657[_0x553aa4[_0x356ae2]]=Boolean(_0x12a148&0x1<<_0x356ae2);}const _0x307dcc=[_0x108028(0xea),_0x108028(0x290),_0x108028(0x227),_0x108028(0xff)],_0x177999={};for(const _0x189d92 of _0x307dcc){const _0x112fbd=_0x45db7a[_0x108028(0x176)](_0x5ded3b);_0x5ded3b+=0x4,_0x177999[_0x189d92]=_0x112fbd===0x0?null:_0x112fbd;}return{'v':_0x300684,'licenseType':_0x22640b,'issuedAt':_0x489c16*0x3e8,'expiresAt':_0x2c3d93*0x3e8,'licensee':_0x5acaf0,'features':_0x21a657,'limits':_0x177999};}function _0x11c436(_0x38e501,_0x46126f){const _0x2bfb8c=_0x492832,_0x4530fb=Buffer['concat']([_0x38e501,_0x46126f]),_0x2adc16=_0x3ccc74(_0x4530fb),_0x2742b3=[];for(let _0x1c9254=0x0;_0x1c9254<_0x2adc16[_0x2bfb8c(0x387)];_0x1c9254+=0x8){_0x2742b3[_0x2bfb8c(0xc4)](_0x2adc16['slice'](_0x1c9254,_0x1c9254+0x8));}return _0x2742b3[_0x2bfb8c(0x37b)]('-');}function _0x8df239(_0x62bac3){const _0x4a9e4a=_0x492832;if(typeof _0x62bac3!==_0x4a9e4a(0xe7))throw new Error(_0x4a9e4a(0x375));const _0x18a748=_0x4daf8c(_0x62bac3['replace'](/-/g,''));if(_0x18a748[_0x4a9e4a(0x387)]<0x41)throw new Error('decodeLicenseBlob:\x20blob\x20too\x20short\x20('+_0x18a748[_0x4a9e4a(0x387)]+'\x20bytes,\x20need\x20>=\x2065)');const _0x4804c9=_0x18a748[_0x4a9e4a(0x1e5)](0x0,_0x18a748[_0x4a9e4a(0x387)]-0x40),_0x5df103=_0x18a748[_0x4a9e4a(0x1e5)](_0x18a748['length']-0x40);let _0x17865c;try{_0x17865c=_0x5b2021(_0x4804c9);}catch(_0x46aef6){throw new Error(_0x4a9e4a(0x2d9)+_0x46aef6['message']);}return{'rawBuf':_0x18a748,'payload':_0x4804c9,'sig':_0x5df103,'decoded':_0x17865c};}function _0x1a079c(_0x6e83f1){const _0x7939e4=_0x492832;return _0x27589c['createHash'](_0x7939e4(0x2f5))[_0x7939e4(0x29f)](_0x6e83f1)[_0x7939e4(0x105)]()[_0x7939e4(0x1e5)](0x0,0x8);}function _0x526cb6(_0x503aed,_0x511bfb,_0x4ec840){const _0x26f93b=_0x492832,_0x2a5c83='OKDB-PIN-V1:'+_0x4ec840,_0x30bca0=Buffer[_0x26f93b(0x2f2)]([Buffer[_0x26f93b(0x2c3)](_0x503aed,_0x26f93b(0x234)),_0x511bfb]),_0x409a8f=_0x27589c[_0x26f93b(0x160)](_0x26f93b(0x2f5),_0x2a5c83)[_0x26f93b(0x29f)](_0x30bca0)['digest'](),_0x1ebbe9=_0x3ccc74(_0x409a8f['slice'](0x0,0x5));return{'pin':_0x1ebbe9,'pinHmac':_0x409a8f};}function _0x4ce89f(_0x5de3c8,_0x2a589d,_0xeecc2b){const _0x227fd7=_0x492832,_0x474286=Buffer[_0x227fd7(0x331)](0x4d);let _0xe8eef1=0x0;_0x474286['writeUInt8'](0x1,_0xe8eef1++),_0x5de3c8[_0x227fd7(0x124)](_0x474286,_0xe8eef1),_0xe8eef1+=0x8,_0x474286[_0x227fd7(0x28c)](_0x2a589d,_0xe8eef1),_0xe8eef1+=0x4,_0xeecc2b['copy'](_0x474286,_0xe8eef1);const _0x1caba5=_0x3ccc74(_0x474286),_0x5e439f=[];for(let _0x53cf1f=0x0;_0x53cf1f<_0x1caba5[_0x227fd7(0x387)];_0x53cf1f+=0x6){_0x5e439f[_0x227fd7(0xc4)](_0x1caba5[_0x227fd7(0x1e5)](_0x53cf1f,_0x53cf1f+0x6));}return _0x5e439f[_0x227fd7(0x37b)]('-');}function _0x422b3f(_0xe20e04){const _0x301135=_0x492832;if(typeof _0xe20e04!==_0x301135(0xe7))throw new Error('decodeActivationToken:\x20input\x20must\x20be\x20a\x20string');const _0xf9a4ec=_0x4daf8c(_0xe20e04[_0x301135(0x16d)](/-/g,''));if(_0xf9a4ec[_0x301135(0x387)]!==0x4d)throw new Error('decodeActivationToken:\x20expected\x2077\x20bytes,\x20got\x20'+_0xf9a4ec[_0x301135(0x387)]);let _0x38084e=0x0;const _0x1fbc2c=_0xf9a4ec[_0x301135(0x16c)](_0x38084e++),_0x240db5=_0xf9a4ec['slice'](_0x38084e,_0x38084e+0x8);_0x38084e+=0x8;const _0x5488a4=_0xf9a4ec[_0x301135(0x176)](_0x38084e);_0x38084e+=0x4;const _0x2037a1=_0xf9a4ec[_0x301135(0x1e5)](_0x38084e);return{'v':_0x1fbc2c,'licenseHash':_0x240db5,'expiry':_0x5488a4,'sig':_0x2037a1};}function _0x1a67a9({tokenString:_0x2e5eab,nodeId:_0x4fdeff,rawBlobBuf:_0x17df9c,pubKeyPem:_0x46bdaf,pubFingerprint:_0x505c22}){const _0x421b2a=_0x492832;let _0x40fed4;try{_0x40fed4=_0x422b3f(_0x2e5eab);}catch(_0x2fba56){return{'valid':![],'reason':'MALFORMED_TOKEN'};}const _0x5a2f5f=_0x1a079c(_0x17df9c);if(!_0x5a2f5f[_0x421b2a(0x17f)](_0x40fed4[_0x421b2a(0x264)]))return{'valid':![],'reason':_0x421b2a(0x145)};const {pinHmac:_0xeb2de5}=_0x526cb6(_0x4fdeff,_0x5a2f5f,_0x505c22),_0x555ac2=Buffer[_0x421b2a(0x331)](0x4);_0x555ac2[_0x421b2a(0x28c)](_0x40fed4['expiry'],0x0);const _0x52b42e=Buffer[_0x421b2a(0x2f2)]([Buffer[_0x421b2a(0x2c3)]([_0x40fed4['v']]),_0xeb2de5['slice'](0x0,0x5),_0x40fed4[_0x421b2a(0x264)],_0x555ac2]);try{const _0x328ab4=_0x27589c[_0x421b2a(0x292)](null,_0x52b42e,_0x46bdaf,_0x40fed4['sig']);if(!_0x328ab4)return{'valid':![],'reason':_0x421b2a(0x229)};}catch(_0x5a07e0){return{'valid':![],'reason':_0x421b2a(0x229)};}if(_0x40fed4['expiry']<Date[_0x421b2a(0x1bf)]()/0x3e8)return{'valid':![],'reason':_0x421b2a(0x2f7)};return{'valid':!![],'reason':'ok'};}function _0x2aeda9(_0x377556){const _0x45aa4b=_0x492832;if(typeof _0x377556!==_0x45aa4b(0xe7))return _0x45aa4b(0x139);const _0x1bf27d=_0x377556[_0x45aa4b(0x2c9)]();if(_0x1bf27d[_0x45aa4b(0x354)]('/')||_0x1bf27d[_0x45aa4b(0x354)]('./')||_0x1bf27d[_0x45aa4b(0x354)](_0x45aa4b(0x33b))||/^[A-Za-z]:[\\/]/[_0x45aa4b(0x107)](_0x1bf27d))return _0x45aa4b(0x25b);if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i[_0x45aa4b(0x107)](_0x1bf27d))return'uuid';const _0x31aa0a=_0x1bf27d[_0x45aa4b(0x16d)](/[\s-]+/g,'')[_0x45aa4b(0x387)];if(_0x31aa0a===0x7c)return _0x45aa4b(0x175);if(_0x31aa0a>=0x95&&_0x31aa0a<=0xfc)return _0x45aa4b(0x368);return _0x45aa4b(0x139);}return okdbLicenseCodec={'toBase32':_0x3ccc74,'fromBase32':_0x4daf8c,'encodeLicensePayload':_0x571cb7,'decodeLicensePayload':_0x5b2021,'encodeLicenseBlob':_0x11c436,'decodeLicenseBlob':_0x8df239,'licenseHash':_0x1a079c,'derivePin':_0x526cb6,'encodeActivationToken':_0x4ce89f,'decodeActivationToken':_0x422b3f,'verifyActivation':_0x1a67a9,'detectInputType':_0x2aeda9,'FEATURE_NAMES':_0x553aa4,'LICENSE_TYPE_STANDARD':_0x2162d9,'LICENSE_TYPE_OPEN':_0x1bea12,'OPEN_LICENSE_MAX_DURATION_MS':_0x41147f},okdbLicenseCodec;}function _0x57c2(_0x3e6f33,_0x4922c4){_0x3e6f33=_0x3e6f33-0xb4;const _0x3e7126=_0x3e71();let _0x57c221=_0x3e7126[_0x3e6f33];return _0x57c221;}var okdbError,hasRequiredOkdbError;function requireOkdbError(){if(hasRequiredOkdbError)return okdbError;hasRequiredOkdbError=0x1;class _0x62328 extends Error{constructor(_0x45c8a8,_0x5491f1,_0x2359a9={}){const _0x4250c8=_0x57c2;super(_0x45c8a8),this[_0x4250c8(0x17a)]=_0x4250c8(0x17d),this[_0x4250c8(0x239)]=_0x5491f1,this[_0x4250c8(0x1e0)]=_0x2359a9,_0x2359a9['cause']&&(this[_0x4250c8(0x1c4)]=_0x2359a9[_0x4250c8(0x1c4)]),Error[_0x4250c8(0x153)](this,this[_0x4250c8(0x22d)]);}}class _0x12da21 extends _0x62328{constructor(_0x443565,_0x16075a,_0x23f78e,_0x4fea13){const _0xbdf1da=_0x57c2;super('Version\x20mismatch\x20for\x20'+_0x443565+'@'+_0x16075a+_0xbdf1da(0xe3)+_0x23f78e+_0xbdf1da(0xc8)+_0x4fea13,_0xbdf1da(0xf7),{'type':_0x443565,'key':_0x16075a,'expectedVersion':_0x23f78e,'actualVersion':_0x4fea13}),this[_0xbdf1da(0x17a)]=_0xbdf1da(0x13a);}}class _0x5410dc extends _0x62328{constructor(_0xc02721,_0x699dd4){const _0x3aad96=_0x57c2;super(_0xc02721+'@'+_0x699dd4+_0x3aad96(0x34c),_0x3aad96(0x28b),{'type':_0xc02721,'key':_0x699dd4}),this[_0x3aad96(0x17a)]=_0x3aad96(0x3a6);}}class _0x416928 extends _0x62328{constructor(_0x365e0a,_0x3d7a3d){const _0x37764e=_0x57c2;super(_0x365e0a+'@'+_0x3d7a3d+_0x37764e(0x282),_0x37764e(0xd1),{'type':_0x365e0a,'key':_0x3d7a3d}),this[_0x37764e(0x17a)]=_0x37764e(0x20d);}}class _0x4781e2 extends _0x62328{constructor(_0x211cb5,_0x5904d8){const _0x49ce74=_0x57c2,_0x81ff09=typeof _0x5904d8;super('Invalid\x20index\x20key\x20type\x20for\x20\x27'+_0x211cb5+_0x49ce74(0x351)+_0x81ff09+_0x49ce74(0xdc)+_0x5904d8,_0x49ce74(0xd7),{'index':_0x211cb5,'key':_0x5904d8,'keyType':_0x81ff09}),this[_0x49ce74(0x17a)]=_0x49ce74(0x308);}}class _0x684b8 extends _0x62328{constructor(_0x28bb0f){const _0x566867=_0x57c2,_0x4ba615=typeof _0x28bb0f;super(_0x566867(0x39f)+_0x4ba615+_0x566867(0x1fe)+_0x28bb0f,_0x566867(0x307),{'key':_0x28bb0f,'keyType':_0x4ba615}),this[_0x566867(0x17a)]='OKDBInvalidPrimaryKeyError';}}class _0xaaaf61 extends _0x62328{constructor(_0x4f2709){const _0x205eae=_0x57c2;super(_0x205eae(0xf8)+_0x4f2709+_0x205eae(0xcb),_0x205eae(0x23f),{'type':_0x4f2709}),this['name']=_0x205eae(0x146);}}class _0x5b0d81 extends _0x62328{constructor(_0x5f33e5){const _0x16259d=_0x57c2;super(_0x16259d(0xf8)+_0x5f33e5+_0x16259d(0x247),_0x16259d(0x203),{'type':_0x5f33e5}),this[_0x16259d(0x17a)]='OKDBTypeAlreadyRegisteredError';}}class _0x709699 extends _0x62328{constructor(_0xd7378,_0x2f3e69){const _0x48b981=_0x57c2;super(_0x48b981(0x241)+_0x2f3e69+'\x27\x20on\x20type\x20\x27'+_0xd7378+'\x27\x20doesn\x27t\x20exist','INDEX_NOT_REGISTERED',{'type':_0xd7378,'index':_0x2f3e69}),this[_0x48b981(0x17a)]=_0x48b981(0x396);}}class _0x5a1ef3 extends _0x62328{constructor(_0x33855a,_0x599a53){const _0x21a072=_0x57c2;super(_0x21a072(0x241)+_0x599a53+_0x21a072(0x206)+_0x33855a+'\x27\x20is\x20already\x20registered',_0x21a072(0x226),{'type':_0x33855a,'index':_0x599a53}),this['name']=_0x21a072(0x33a);}}class _0xe255de extends _0x62328{constructor(_0x59268f,_0x26331e={}){const _0x41ae5c=_0x57c2;super(_0x59268f,_0x41ae5c(0x345),_0x26331e),this[_0x41ae5c(0x17a)]='OKDBInvalidValueError';}}class _0x1f8a90 extends _0x62328{constructor(_0x2e6108,_0xf836b6,_0x22e574,_0x5bc3c8,_0xce9b4){const _0x3b997e=_0x57c2;super('Unique\x20constraint\x20violated\x20on\x20'+_0x2e6108+'@'+_0xf836b6+_0x3b997e(0x1df)+_0x22e574+_0x3b997e(0xc7)+_0x5bc3c8+_0x3b997e(0x1d2)+_0xce9b4+'\x27',_0x3b997e(0x194),{'type':_0x2e6108,'index':_0xf836b6,'indexKey':_0x22e574,'existingKey':_0x5bc3c8,'conflictingKey':_0xce9b4}),this['name']=_0x3b997e(0x371);}}class _0x43792d extends _0x62328{constructor(_0xe46037,_0x21402e,_0x58dafa){const _0x46f5b0=_0x57c2;super(_0x46f5b0(0x370)+_0xe46037+'@'+_0x21402e,_0x46f5b0(0x1f4),{'type':_0xe46037,'key':_0x21402e,'errors':_0x58dafa}),this[_0x46f5b0(0x17a)]=_0x46f5b0(0xd6),this[_0x46f5b0(0x22e)]=_0xe46037,this[_0x46f5b0(0x36f)]=_0x21402e,this['errors']=_0x58dafa;}}class _0x5d3d7c extends _0x62328{constructor(_0x283c61,_0x46d48e){const _0x2ee39e=_0x57c2;super(_0x2ee39e(0x24c)+_0x283c61+':\x20'+_0x46d48e[_0x2ee39e(0x387)]+_0x2ee39e(0x311),_0x2ee39e(0x2b1),{'type':_0x283c61,'failures':_0x46d48e}),this[_0x2ee39e(0x17a)]=_0x2ee39e(0x33f),this[_0x2ee39e(0x22e)]=_0x283c61,this[_0x2ee39e(0x2b4)]=_0x46d48e;}}class _0x1750c0 extends _0x62328{constructor(_0x4922e1,_0x531883,_0x43e09,_0x2ed188,_0x5b423b){const _0xe278c3=_0x57c2;super('Foreign\x20key\x20violation:\x20'+_0x4922e1+'@'+_0x531883+'.'+_0x43e09+_0xe278c3(0x348)+_0x2ed188+'@'+_0x5b423b+_0xe278c3(0x360),'FOREIGN_KEY_VIOLATION',{'sourceType':_0x4922e1,'sourceKey':_0x531883,'fieldPath':_0x43e09,'targetType':_0x2ed188,'targetKey':_0x5b423b}),this[_0xe278c3(0x17a)]=_0xe278c3(0x1f2),this['sourceType']=_0x4922e1,this[_0xe278c3(0x30e)]=_0x531883,this[_0xe278c3(0x20e)]=_0x43e09,this['targetType']=_0x2ed188,this[_0xe278c3(0x32d)]=_0x5b423b;}}class _0x12103a extends _0x62328{constructor(_0x27c41b,_0x47170f,_0x7c6e65){const _0x237510=_0x57c2;super(_0x237510(0x2c5)+_0x27c41b+'@'+_0x47170f+':\x20'+_0x7c6e65[_0x237510(0x387)]+'\x20document(s)\x20reference\x20it\x20with\x20onDelete:restrict',_0x237510(0x120),{'targetType':_0x27c41b,'targetKey':_0x47170f,'references':_0x7c6e65}),this[_0x237510(0x17a)]='OKDBForeignKeyDeleteError',this[_0x237510(0x2ba)]=_0x27c41b,this[_0x237510(0x32d)]=_0x47170f,this['references']=_0x7c6e65;}}class _0x2c9ac5 extends _0x62328{constructor(_0x4a6125,_0xe8d626,_0xb830f9){const _0x4f418f=_0x57c2;super(_0x4f418f(0x3b4)+_0xe8d626+_0x4f418f(0x1fd)+_0x4a6125+_0x4f418f(0xb6)+_0xb830f9[_0x4f418f(0xce)](_0x13815d=>_0x13815d[_0x4f418f(0xe6)]+':'+_0x13815d['name'])['join'](',\x20'),_0x4f418f(0x266),{'type':_0x4a6125,'index':_0xe8d626,'usedBy':_0xb830f9}),this[_0x4f418f(0x17a)]=_0x4f418f(0x25c);}}return okdbError={'OKDBError':_0x62328,'OKDBVersionMismatchError':_0x12da21,'OKDBNotFoundError':_0x5410dc,'OKDBAlreadyExistsError':_0x416928,'OKDBInvalidIndexKeyError':_0x4781e2,'OKDBInvalidPrimaryKeyError':_0x684b8,'OKDBTypeNotRegisteredError':_0xaaaf61,'OKDBTypeAlreadyRegisteredError':_0x5b0d81,'OKDBIndexNotRegisteredError':_0x709699,'OKDBIndexAlreadyRegisteredError':_0x5a1ef3,'OKDBInvalidValueError':_0xe255de,'OKDBUniqueConstraintError':_0x1f8a90,'OKDBSchemaValidationError':_0x43792d,'OKDBSchemaCollectionError':_0x5d3d7c,'OKDBForeignKeyError':_0x1750c0,'OKDBForeignKeyDeleteError':_0x12103a,'OKDBIndexHasConsumersError':_0x2c9ac5},okdbError;}var okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0x3e0b7d=_0xecd54b;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x357dd6={'PUT':_0x3e0b7d(0x394),'REMOVE':_0x3e0b7d(0x335),'INDEX_DROP':'dropIndex','INDEX_REGISTER':_0x3e0b7d(0x213),'INDEX_RESET':_0x3e0b7d(0x14c),'TYPE_REGISTER':_0x3e0b7d(0x1bd),'TYPE_DROP':_0x3e0b7d(0x36d),'FTS_REGISTER':_0x3e0b7d(0x31b),'FTS_DROP':'dropFts','FTS_RESET':_0x3e0b7d(0x338),'SCHEMA_SET':'setSchema','SCHEMA_DROP':_0x3e0b7d(0x386),'TTL_SET':_0x3e0b7d(0x136),'TTL_CLEAR':_0x3e0b7d(0x276)},_0x3c8fa2={'SYSTEM_READY':_0x3e0b7d(0x1c9),'SYSTEM_STOPPED':_0x3e0b7d(0x134),'SYSTEM_CLOCK_CHANGE':_0x3e0b7d(0x369),'SYSTEM_POKE':_0x3e0b7d(0x157),'SYSTEM_DRAIN':'system:drain','SYSTEM_BUS_STATE_CHANGE':_0x3e0b7d(0x1f6),'ITEM_CREATE':_0x3e0b7d(0x16a),'ITEM_UPDATE':_0x3e0b7d(0x201),'ITEM_REMOVE':'item:remove','INDEX_RESET':_0x3e0b7d(0x332),'INDEX_READY':_0x3e0b7d(0x355),'INDEX_PROGRESS':_0x3e0b7d(0x301),'INDEX_DROP':'index:drop','INDEX_REGISTERED':'index:registered','FTS_REGISTERED':_0x3e0b7d(0x1ec),'FTS_DROP':_0x3e0b7d(0x21c),'FTS_RESET':'fts:reset','SCHEMA_SET':_0x3e0b7d(0x113),'SCHEMA_DROP':_0x3e0b7d(0xc2),'UNIQUE_VIOLATION':_0x3e0b7d(0x367),'UNIQUE_VIOLATION_RESOLVED':_0x3e0b7d(0xcd),'REF_VIOLATION':_0x3e0b7d(0x29e),'REF_VIOLATION_RESOLVED':'ref:violation_resolved','SYNC_APPLY':'sync:apply','TXN_START':_0x3e0b7d(0x138),'TXN_END':_0x3e0b7d(0x1dd),'TXN_ROLLBACK':_0x3e0b7d(0x1cf),'TYPE_REGISTERED':_0x3e0b7d(0x261),'TYPE_DROP':'type:drop','ENV_OPENED':'env:opened','ENV_REMOVED':'env:removed','TTL_EXPIRED':_0x3e0b7d(0x28e),'TTL_SET':_0x3e0b7d(0x20b),'TTL_CLEAR':'ttl:clear','LICENSE_INVALID':_0x3e0b7d(0x26d),'LICENSE_ADDED':'license:added','LICENSE_ACTIVATED':_0x3e0b7d(0x2fa),'LICENSE_REMOVED':_0x3e0b7d(0x21b)},_0x38236d={'CREATING':'creating','RESETTING':_0x3e0b7d(0x25a),'READY':_0x3e0b7d(0x1ad),'DROPPING':_0x3e0b7d(0x2e0),'WAITING':_0x3e0b7d(0x390)},_0x23f3c9={'CREATED':_0x3e0b7d(0x38a),'STARTING':_0x3e0b7d(0x192),'STARTED':_0x3e0b7d(0x269),'STOPPING':_0x3e0b7d(0x352),'STOPPED':_0x3e0b7d(0x2a8)},_0x3f8eae={'CREATING':_0x3e0b7d(0x215),'READY':_0x3e0b7d(0x1ad),'HALTED':'halted','STOPPED':_0x3e0b7d(0x2a8),'RESETTING':_0x3e0b7d(0x25a)},_0x567776=Object[_0x3e0b7d(0x36a)]({'POKE':_0x3e0b7d(0xda),'DRAIN':_0x3e0b7d(0x222)});return okdbEnums={'BUS_EVENTS':_0x567776,'CHANGE_ACTIONS':_0x357dd6,'EVENTS':_0x3c8fa2,'INDEX_STATE':_0x38236d,'OKDB_STATE':_0x23f3c9,'VIEW_STATE':_0x3f8eae},okdbEnums;}var okdbPubkey,hasRequiredOkdbPubkey;function requireOkdbPubkey(){const _0xc40072=_0xecd54b;if(hasRequiredOkdbPubkey)return okdbPubkey;hasRequiredOkdbPubkey=0x1;const _0x2e47f2=_0xc40072(0x166),_0x5be5a5=_0xc40072(0x1b0);return okdbPubkey={'PUBLIC_KEY_PEM':_0x2e47f2,'PUB_FINGERPRINT':_0x5be5a5},okdbPubkey;}var okdbLicense,hasRequiredOkdbLicense;function requireOkdbLicense(){const _0x29798f=_0xecd54b;if(hasRequiredOkdbLicense)return okdbLicense;hasRequiredOkdbLicense=0x1;const _0x429bd3=require$$0,{OKDBError:_0x27fb16}=requireOkdbError(),{EVENTS:_0x129978}=requireOkdbEnums(),_0xcc6d68=requireOkdbLicenseCodec(),{LICENSE_TYPE_OPEN:_0x555c5d,OPEN_LICENSE_MAX_DURATION_MS:_0x4ace0c}=_0xcc6d68,_0x3d3f02=requireOkdbPubkey(),_0x5e4859={'LICENSED_BUILD':_0x29798f(0x2ca),'PUBLIC_KEY_PEM':_0x3d3f02['PUBLIC_KEY_PEM'],'PUB_FINGERPRINT':_0x3d3f02[_0x29798f(0x195)],'LICENSE_EXPIRED_ACTION':_0x29798f(0x172)},_0x1edddb=_0x29798f(0x347),_0x137280={'features':{'sync':![],'embeddings':![],'engines':![],'fts':!![],'timeMachine':![],'views':!![],'mcp':!![],'files':!![]},'limits':{'envs':0x2,'typesPerEnv':0xa,'syncPeers':0x0,'maxWrites':0xf4240},'_isFree':!![]};async function _0x1b1d4c(_0x2ffe80){const _0x53a2a7=_0x29798f;!_0x2ffe80[_0x53a2a7(0x3a8)](_0x1edddb)&&await _0x2ffe80[_0x53a2a7(0x1bd)](_0x1edddb);}class _0x3cca23{constructor(_0x3bd5f7){const _0x24da88=_0x29798f;this[_0x24da88(0x144)]=_0x3bd5f7,this[_0x24da88(0x1b9)]=null;}async[_0x29798f(0x205)](){const _0x4405d8=_0x29798f,_0xdcd18c=this[_0x4405d8(0x144)][_0x4405d8(0x395)];if(!_0xdcd18c||!_0xdcd18c[_0x4405d8(0x3a8)](_0x1edddb)){this[_0x4405d8(0x1b9)]=null;return;}const _0x3a7419=this[_0x4405d8(0x144)]['id'];let _0x471c3d=null;for(const {key:_0x57fec8,value:_0x3415bf}of _0xdcd18c[_0x4405d8(0x129)](_0x1edddb)){const _0x24dfe3=this[_0x4405d8(0xb9)](_0x3415bf,_0x3a7419);_0x24dfe3==='active'&&!_0x471c3d&&(_0x471c3d={..._0x3415bf,'id':_0x57fec8,'status':_0x24dfe3});}this['_active']=_0x471c3d;if(this[_0x4405d8(0x1b9)]&&this[_0x4405d8(0x1b9)][_0x4405d8(0x159)]===_0x555c5d){const _0x562f87=Math[_0x4405d8(0x170)]((this[_0x4405d8(0x1b9)][_0x4405d8(0x26e)]-Date['now']())/0x5265c00);this[_0x4405d8(0x144)][_0x4405d8(0x172)]?.['warn'](_0x4405d8(0x12b)+_0x562f87+_0x4405d8(0xf3),{'feature':'license','licensee':this[_0x4405d8(0x1b9)][_0x4405d8(0x1ba)],'expiresAt':new Date(this['_active'][_0x4405d8(0x26e)])[_0x4405d8(0xf1)]()});}}[_0x29798f(0xb9)](_0x174203,_0x18c10e){const _0x239d83=_0x29798f;if(!_0x174203['blob'])return _0x239d83(0x392);let _0xfa5ab5;try{_0xfa5ab5=_0xcc6d68[_0x239d83(0x211)](_0x174203['blob']);}catch(_0x45800b){return'invalid';}try{const _0x829986=_0x429bd3['verify'](null,_0xfa5ab5[_0x239d83(0x12e)],_0x5e4859[_0x239d83(0x11b)],_0xfa5ab5['sig']);if(!_0x829986)return'invalid';}catch(_0x10b54e){return _0x239d83(0x392);}if(_0xfa5ab5['decoded']['expiresAt']<=Date[_0x239d83(0x1bf)]())return'expired';if(_0xfa5ab5['decoded']['licenseType']===_0x555c5d)return _0x239d83(0x1ce);if(!_0x174203[_0x239d83(0x175)])return'pending';const _0x396946=_0xcc6d68[_0x239d83(0x39a)]({'tokenString':_0x174203['activation'],'nodeId':_0x18c10e,'rawBlobBuf':_0xfa5ab5[_0x239d83(0x149)],'pubKeyPem':_0x5e4859[_0x239d83(0x11b)],'pubFingerprint':_0x5e4859[_0x239d83(0x195)]});if(_0x396946[_0x239d83(0x380)]===_0x239d83(0x145)||_0x396946[_0x239d83(0x380)]===_0x239d83(0x229))return _0x239d83(0x117);if(_0x396946['reason']===_0x239d83(0x2f7))return'expired';if(!_0x396946[_0x239d83(0x167)])return'wrong_node';return'active';}get[_0x29798f(0x1ce)](){const _0x470fc3=_0x29798f;return this[_0x470fc3(0x1b9)];}get[_0x29798f(0x1ae)](){const _0x13e369=_0x29798f;return this[_0x13e369(0x1b9)]??_0x137280;}[_0x29798f(0x2c1)](_0x21cf45){const _0x497e08=_0x29798f;if(_0x5e4859['LICENSED_BUILD']!=='true')return;const _0x44c15c=this[_0x497e08(0x1ae)];if(!_0x44c15c[_0x497e08(0x329)]?.[_0x21cf45]){const _0x29b580=_0x44c15c[_0x497e08(0x2fe)]?'Feature\x20not\x20available\x20on\x20free\x20tier:\x20'+_0x21cf45+_0x497e08(0x2c0)+_0x21cf45+'\x22\x20to\x20enable\x20it.':'Feature\x20not\x20licensed:\x20'+_0x21cf45+'.\x20The\x20active\x20license\x20does\x20not\x20enable\x20\x22'+_0x21cf45+'\x22.';throw new _0x27fb16(_0x29b580,_0x497e08(0x3ae),{'feature':_0x21cf45});}}[_0x29798f(0x12f)](_0x295635){const _0x4bbf73=_0x29798f;if(_0x5e4859['LICENSED_BUILD']!=='true')return!![];return!!this[_0x4bbf73(0x1ae)][_0x4bbf73(0x329)]?.[_0x295635];}[_0x29798f(0x250)](_0x12a689,_0x3bf01e){const _0x5c7d38=_0x29798f;if(_0x5e4859['LICENSED_BUILD']!==_0x5c7d38(0x2ca))return;const _0x56b3a5=this[_0x5c7d38(0x1ae)],_0x3623a7=_0x56b3a5['limits']?.[_0x12a689];if(_0x3623a7===null||_0x3623a7===undefined||_0x3623a7===0x0)return;if(_0x3bf01e>=_0x3623a7)throw new _0x27fb16('License\x20limit\x20exceeded:\x20'+_0x12a689+'\x20('+_0x3bf01e+'/'+_0x3623a7+')',_0x5c7d38(0x19c),{'limit':_0x12a689,'current':_0x3bf01e,'max':_0x3623a7});}async[_0x29798f(0x23d)](_0x4c105b){const _0x2524ba=_0x29798f;let _0x5cb316;try{_0x5cb316=_0xcc6d68[_0x2524ba(0x211)](_0x4c105b);}catch(_0x4aaa4b){throw new _0x27fb16('Invalid\x20license\x20blob:\x20'+_0x4aaa4b[_0x2524ba(0xe8)],_0x2524ba(0x29c));}let _0x13adb8;try{_0x13adb8=_0x429bd3[_0x2524ba(0x292)](null,_0x5cb316[_0x2524ba(0x12e)],_0x5e4859['PUBLIC_KEY_PEM'],_0x5cb316[_0x2524ba(0x26b)]);}catch(_0x2c0ed7){throw new _0x27fb16('License\x20signature\x20invalid:\x20'+_0x2c0ed7[_0x2524ba(0xe8)],_0x2524ba(0x29c));}if(!_0x13adb8)throw new _0x27fb16(_0x2524ba(0x31d)+(_0x2524ba(0x13c)+_0x5e4859[_0x2524ba(0x195)]+'.\x20')+'Either\x20the\x20build\x20was\x20made\x20with\x20a\x20different\x20keypair,\x20or\x20the\x20license\x20was\x20issued\x20with\x20a\x20different\x20private\x20key.',_0x2524ba(0x29c),{'expectedFingerprint':_0x5e4859[_0x2524ba(0x195)]});if(_0x5cb316[_0x2524ba(0x16e)][_0x2524ba(0x159)]===_0x555c5d){const _0x1c829d=_0x5cb316[_0x2524ba(0x16e)][_0x2524ba(0x26e)]-_0x5cb316[_0x2524ba(0x16e)][_0x2524ba(0x1cd)];if(_0x1c829d>_0x4ace0c)throw new _0x27fb16(_0x2524ba(0x173)+Math[_0x2524ba(0x170)](_0x1c829d/(0x1e*0x5265c00))+_0x2524ba(0x110),_0x2524ba(0x29c));}const _0x182f0d=this[_0x2524ba(0x144)][_0x2524ba(0x395)];await _0x1b1d4c(_0x182f0d);const _0x387095=_0xcc6d68['licenseHash'](_0x5cb316[_0x2524ba(0x149)])['toString'](_0x2524ba(0x10d));for(const {value:_0x46bee5}of _0x182f0d['getRange'](_0x1edddb)){if(_0x46bee5[_0x2524ba(0x1a2)]===_0x387095)throw new _0x27fb16('License\x20already\x20stored','LICENSE_INVALID');}const _0x1031f0=_0x429bd3[_0x2524ba(0x29a)](),_0xaf75ce={'blob':_0x4c105b,'activation':null,'addedAt':Date[_0x2524ba(0x1bf)](),'_licenseHash':_0x387095,'licensee':_0x5cb316[_0x2524ba(0x16e)][_0x2524ba(0x1ba)],'expiresAt':_0x5cb316[_0x2524ba(0x16e)][_0x2524ba(0x26e)],'features':_0x5cb316[_0x2524ba(0x16e)][_0x2524ba(0x329)],'limits':_0x5cb316[_0x2524ba(0x16e)][_0x2524ba(0x30d)],'licenseType':_0x5cb316[_0x2524ba(0x16e)]['licenseType']};return await _0x182f0d[_0x2524ba(0x394)](_0x1edddb,_0x1031f0,_0xaf75ce),{'id':_0x1031f0,..._0xaf75ce};}async[_0x29798f(0x3aa)](_0x254163){const _0x971346=_0x29798f;let _0x59ac37;try{_0x59ac37=_0xcc6d68['decodeActivationToken'](_0x254163);}catch(_0x51afec){throw new _0x27fb16('Invalid\x20activation\x20token:\x20'+_0x51afec['message'],_0x971346(0x2a4));}const _0x11be93=_0x59ac37[_0x971346(0x264)]['toString']('hex'),_0x33c327=this[_0x971346(0x144)]['_systemEnv'];if(!_0x33c327||!_0x33c327[_0x971346(0x3a8)](_0x1edddb))throw new _0x27fb16(_0x971346(0x29b),'LICENSE_ACTIVATION_INVALID');let _0xf57bb7=null,_0x422021=null;for(const {key:_0x1a2474,value:_0xc0ce80}of _0x33c327['getRange'](_0x1edddb)){if(_0xc0ce80[_0x971346(0x1a2)]===_0x11be93){_0xf57bb7=_0x1a2474,_0x422021=_0xc0ce80;break;}}if(!_0xf57bb7)throw new _0x27fb16(_0x971346(0x29b),_0x971346(0x2a4));const {rawBuf:_0x3545f4}=_0xcc6d68['decodeLicenseBlob'](_0x422021[_0x971346(0x368)]),_0x5096af=_0xcc6d68[_0x971346(0x39a)]({'tokenString':_0x254163,'nodeId':this[_0x971346(0x144)]['id'],'rawBlobBuf':_0x3545f4,'pubKeyPem':_0x5e4859[_0x971346(0x11b)],'pubFingerprint':_0x5e4859[_0x971346(0x195)]});if(!_0x5096af[_0x971346(0x167)])throw new _0x27fb16(_0x971346(0x231)+_0x5096af['reason'],_0x971346(0x2a4),{'reason':_0x5096af[_0x971346(0x380)]});const _0x434b40={..._0x422021,'activation':_0x254163};return await _0x33c327[_0x971346(0x29f)](_0x1edddb,_0xf57bb7,_0x434b40),{'id':_0xf57bb7,..._0x434b40};}async[_0x29798f(0x2e1)](_0xa435ab){const _0x4e5b8e=_0x29798f,_0x58a02b=this[_0x4e5b8e(0x144)][_0x4e5b8e(0x395)];if(!_0x58a02b||!_0x58a02b[_0x4e5b8e(0x3a8)](_0x1edddb))return;await _0x58a02b[_0x4e5b8e(0x335)](_0x1edddb,_0xa435ab);}async['listLicenses'](){const _0x497442=_0x29798f,_0x585cd8=this['okdb'][_0x497442(0x395)];if(!_0x585cd8||!_0x585cd8[_0x497442(0x3a8)](_0x1edddb))return[];const _0x30dd47=this[_0x497442(0x144)]['id'],_0x22db2c=[];for(const {key:_0x239105,value:_0x547a67}of _0x585cd8[_0x497442(0x129)](_0x1edddb)){const _0x13d171=this[_0x497442(0xb9)](_0x547a67,_0x30dd47);_0x22db2c[_0x497442(0xc4)]({..._0x547a67,'id':_0x239105,'status':_0x13d171});}return _0x22db2c;}[_0x29798f(0x1e8)](){const _0x5d947a=_0x29798f,_0x26aae4=this[_0x5d947a(0x144)][_0x5d947a(0x395)];if(!_0x26aae4||!_0x26aae4[_0x5d947a(0x3a8)](_0x1edddb))return[];const _0x5ae5e7=this[_0x5d947a(0x144)]['id'],_0x312d28=[];for(const {key:_0xecfc4d,value:_0x5b81a7}of _0x26aae4[_0x5d947a(0x129)](_0x1edddb)){if(_0x5b81a7['_licenseHash']){if(_0x5b81a7[_0x5d947a(0x159)]===_0x555c5d)_0x312d28[_0x5d947a(0xc4)]({'licenseId':_0xecfc4d,'pin':null});else{const _0x1eb5cf=Buffer['from'](_0x5b81a7[_0x5d947a(0x1a2)],_0x5d947a(0x10d)),{pin:_0x49a992}=_0xcc6d68[_0x5d947a(0xc6)](_0x5ae5e7,_0x1eb5cf,_0x5e4859[_0x5d947a(0x195)]);_0x312d28[_0x5d947a(0xc4)]({'licenseId':_0xecfc4d,'pin':_0x49a992});}}}return _0x312d28;}async[_0x29798f(0xe9)](){const _0x3d577b=_0x29798f,_0x331152=this['_active'];await this[_0x3d577b(0x205)]();if(this['_active']&&this[_0x3d577b(0x1b9)][_0x3d577b(0x159)]===_0x555c5d){const _0x5e4ade=Math[_0x3d577b(0x170)]((this[_0x3d577b(0x1b9)][_0x3d577b(0x26e)]-Date['now']())/0x5265c00);this[_0x3d577b(0x144)]['log']?.['warn'](_0x3d577b(0x12b)+_0x5e4ade+_0x3d577b(0xf3),{'feature':_0x3d577b(0x102),'licensee':this[_0x3d577b(0x1b9)][_0x3d577b(0x1ba)],'expiresAt':new Date(this['_active'][_0x3d577b(0x26e)])[_0x3d577b(0xf1)]()});}if(_0x331152&&!this[_0x3d577b(0x1b9)]){this['okdb'][_0x3d577b(0x172)]?.[_0x3d577b(0x2be)](_0x3d577b(0x137),{'feature':_0x3d577b(0x102)}),this[_0x3d577b(0x144)][_0x3d577b(0x350)]?.[_0x3d577b(0x3a4)](_0x129978['LICENSE_INVALID'],{'previous':_0x331152});const _0x969a55=this[_0x3d577b(0x144)][_0x3d577b(0x267)]?.[_0x3d577b(0x242)]??_0x5e4859['LICENSE_EXPIRED_ACTION'];_0x969a55===_0x3d577b(0x379)&&(this[_0x3d577b(0x144)]['log']?.['error'](_0x3d577b(0x23b),{'feature':'license'}),this['okdb'][_0x3d577b(0x1a0)]()['catch'](()=>{})[_0x3d577b(0x121)](()=>process[_0x3d577b(0x3ab)](0x1)));}}}return okdbLicense={'LicenseChecker':_0x3cca23,'_C':_0x5e4859},okdbLicense;}var okdbShell,hasRequiredOkdbShell;function requireOkdbShell(){const _0x12f930=_0xecd54b;if(hasRequiredOkdbShell)return okdbShell;hasRequiredOkdbShell=0x1;const _0x467618=require$$0$2,_0x419024=require$$1,_0xf468d=require$$2$1,_0x2512e8=require$$3,_0x106980=_0x2512e8[_0x12f930(0x37b)](_0xf468d['homedir'](),_0x12f930(0x33c)),_0x1e848f=0x3e8,_0x3609e4={'reset':'\x1b[0m','bold':_0x12f930(0x2cf),'dim':_0x12f930(0x35b),'red':_0x12f930(0xdf),'green':_0x12f930(0x3a1),'yellow':_0x12f930(0x18a),'blue':_0x12f930(0x393),'magenta':_0x12f930(0x171),'cyan':_0x12f930(0x36b),'white':_0x12f930(0x148),'gray':_0x12f930(0x2b8)},_0x1b3595=!process[_0x12f930(0xfc)][_0x12f930(0x1c8)]||!!process.env.NO_COLOR,_0xcfca11=(_0x40ca40,_0xbc42b0)=>_0x1b3595?_0xbc42b0:''+_0x40ca40+_0xbc42b0+_0x3609e4['reset'],_0x3b6066={'error':_0x3609e4[_0x12f930(0x1a7)],'warn':_0x3609e4[_0x12f930(0x101)],'info':_0x3609e4['cyan'],'debug':_0x3609e4[_0x12f930(0x299)]},_0x246ab8={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3};function _0x40fa8c(_0x3bd6d7,_0xe2b0e5=_0x12f930(0x1f9)){const _0x1ca794=_0x12f930,{level:_0x392aba,msg:_0x4c0188,meta:_0x101a79,context:_0x31a8ff,ts:_0x24474f}=_0x3bd6d7;if((_0x246ab8[_0x392aba]??0x1)<(_0x246ab8[_0xe2b0e5]??0x1))return;const _0x286145=_0xcfca11(_0x3609e4[_0x1ca794(0x299)],new Date(_0x24474f)[_0x1ca794(0xf1)]()),_0x179f3f=_0xcfca11(_0x3b6066[_0x392aba]??_0x3609e4[_0x1ca794(0x21e)],_0x392aba['padEnd'](0x5));let _0x1218d3='\x20\x20'+_0x286145+'\x20'+_0xcfca11(_0x3609e4[_0x1ca794(0x2bd)],_0x179f3f)+'\x20'+_0x4c0188;if(_0x101a79&&Object[_0x1ca794(0x18e)](_0x101a79)[_0x1ca794(0x387)]>0x0){const _0x58ca80=Object[_0x1ca794(0x274)](_0x101a79)[_0x1ca794(0xce)](([_0x45d241,_0x527fdf])=>_0x45d241+'='+_0x527fdf)[_0x1ca794(0x37b)]('\x20');_0x1218d3+=_0xcfca11(_0x3609e4[_0x1ca794(0xf5)],_0x1ca794(0x286)+_0x58ca80+']');}if(_0x31a8ff!==undefined){const _0x1c7ce3=typeof _0x31a8ff===_0x1ca794(0x378)?JSON['stringify'](_0x31a8ff):String(_0x31a8ff);_0x1218d3+=_0xcfca11(_0x3609e4[_0x1ca794(0xf5)],'\x20\x20'+_0x1c7ce3);}const _0x4d1259=_0x392aba===_0x1ca794(0x220)||_0x392aba==='warn'?process[_0x1ca794(0x185)]['write'][_0x1ca794(0x2b7)](process[_0x1ca794(0x185)]):process[_0x1ca794(0xfc)][_0x1ca794(0x31e)][_0x1ca794(0x2b7)](process[_0x1ca794(0xfc)]);_0x4d1259(_0x1218d3+'\x0a');}function _0x5f5135(_0x41c555,_0x15979e){const _0x36ca1e=_0x12f930;if(_0x41c555===0xcc||_0x41c555>=0xc8&&_0x41c555<0x12c&&!_0x15979e){console[_0x36ca1e(0x172)](_0x36ca1e(0x1f5)+_0xcfca11(_0x3609e4[_0x36ca1e(0x122)],'✓')+'\x0a');return;}if(_0x41c555>=0x190||_0x15979e?.['error']){const _0x4c621c=_0x15979e?.['error']??_0x15979e?.[_0x36ca1e(0xe8)]??'HTTP\x20'+_0x41c555;console['log'](_0x36ca1e(0x1f5)+_0xcfca11(_0x3609e4[_0x36ca1e(0x1a7)],'✗')+'\x20'+_0xcfca11(_0x3609e4['bold']+_0x3609e4['red'],String(_0x41c555))+'\x20\x20'+_0x4c621c+'\x0a');return;}const _0xc72f4c=Object[_0x36ca1e(0x372)][_0x36ca1e(0x2e6)][_0x36ca1e(0x314)](_0x15979e??{},_0x36ca1e(0x118))?_0x15979e[_0x36ca1e(0x118)]:_0x15979e,_0x529d7f=_0x15979e?.[_0x36ca1e(0x1d0)];console[_0x36ca1e(0x172)](''),_0x3494ec(_0xc72f4c,'\x20\x20');if(_0x529d7f?.[_0x36ca1e(0x1ef)]!=null||_0x529d7f?.[_0x36ca1e(0x230)]!=null){const _0x1a4efc=[];if(_0x529d7f[_0x36ca1e(0x1ef)]!=null)_0x1a4efc[_0x36ca1e(0xc4)](_0x529d7f['count']+_0x36ca1e(0xfb)+(_0x529d7f['count']!==0x1?'s':''));if(_0x529d7f[_0x36ca1e(0x230)]!=null)_0x1a4efc[_0x36ca1e(0xc4)](_0x529d7f['time']+'ms');console['log'](_0x36ca1e(0x1f5)+_0xcfca11(_0x3609e4['dim'],_0x1a4efc[_0x36ca1e(0x37b)](_0x36ca1e(0x116))));}console[_0x36ca1e(0x172)]('');}function _0x3494ec(_0x2f3932,_0x57510b=''){const _0x461745=_0x12f930;if(_0x2f3932===null||_0x2f3932===undefined){console[_0x461745(0x172)](_0x57510b+_0xcfca11(_0x3609e4[_0x461745(0xf5)],'(null)'));return;}if(Array[_0x461745(0x31a)](_0x2f3932)){if(_0x2f3932[_0x461745(0x387)]===0x0){console[_0x461745(0x172)](_0x57510b+_0xcfca11(_0x3609e4[_0x461745(0xf5)],_0x461745(0x2dd)));return;}if(_0x2f3932[_0x461745(0x11f)](_0x3e5f3d=>_0x3e5f3d&&typeof _0x3e5f3d===_0x461745(0x378)&&_0x461745(0x36f)in _0x3e5f3d&&_0x461745(0x377)in _0x3e5f3d)){_0x1680bf(_0x2f3932,_0x57510b);return;}if(_0x2f3932[_0x461745(0x11f)](_0x3ebace=>_0x3ebace&&typeof _0x3ebace===_0x461745(0x378)&&'type'in _0x3ebace&&_0x461745(0x1ef)in _0x3ebace)){_0xfce8e9(_0x2f3932,_0x57510b);return;}if(_0x2f3932['every'](_0x4f4510=>typeof _0x4f4510!==_0x461745(0x378)||_0x4f4510===null)){_0x2f3932[_0x461745(0x1d8)]((_0x14a440,_0x226257)=>console[_0x461745(0x172)](_0x57510b+_0xcfca11(_0x3609e4[_0x461745(0x299)],_0x226257+0x1+'.')+'\x20'+_0xcfca11(_0x3609e4[_0x461745(0x21e)],String(_0x14a440))));return;}_0x2f3932['forEach']((_0x4e0afe,_0x390d73)=>{const _0x34ca9e=_0x461745;console['log'](_0x57510b+_0xcfca11(_0x3609e4[_0x34ca9e(0xf5)],'['+_0x390d73+']'));if(typeof _0x4e0afe==='object'&&_0x4e0afe!==null)_0x33a8ac(_0x4e0afe,_0x57510b+'\x20\x20');else console['log'](_0x57510b+'\x20\x20'+String(_0x4e0afe));});return;}if(typeof _0x2f3932===_0x461745(0x378)){if('key'in _0x2f3932&&_0x461745(0x377)in _0x2f3932&&Object[_0x461745(0x18e)](_0x2f3932)[_0x461745(0x387)]<=0x3){console[_0x461745(0x172)](_0x57510b+_0xcfca11(_0x3609e4[_0x461745(0x2bd)]+_0x3609e4['cyan'],String(_0x2f3932[_0x461745(0x36f)])));const _0x4f3b1d=_0x2f3932[_0x461745(0x377)];if(_0x4f3b1d&&typeof _0x4f3b1d==='object')_0x33a8ac(_0x4f3b1d,_0x57510b);else console[_0x461745(0x172)](_0x57510b+_0xcfca11(_0x3609e4[_0x461745(0x21e)],String(_0x4f3b1d)));return;}_0x33a8ac(_0x2f3932,_0x57510b);return;}console['log'](_0x57510b+_0xcfca11(_0x3609e4[_0x461745(0x21e)],String(_0x2f3932)));}function _0x33a8ac(_0x47bbb8,_0x1a15d2=''){const _0x4a7909=_0x12f930,_0x46bb7f=Object[_0x4a7909(0x274)](_0x47bbb8);if(_0x46bb7f[_0x4a7909(0x387)]===0x0){console['log'](_0x1a15d2+_0xcfca11(_0x3609e4[_0x4a7909(0xf5)],'{}'));return;}const _0x2fb591=Math['min'](0x1c,Math[_0x4a7909(0x13f)](..._0x46bb7f['map'](([_0x1f0b09])=>_0x1f0b09[_0x4a7909(0x387)])));for(const [_0x1a445e,_0x10fad8]of _0x46bb7f){const _0x52df09=_0xcfca11(_0x3609e4[_0x4a7909(0x27b)],_0x1a445e[_0x4a7909(0x2a9)](_0x2fb591));if(_0x10fad8===null||_0x10fad8===undefined)console[_0x4a7909(0x172)](_0x1a15d2+_0x52df09+'\x20\x20'+_0xcfca11(_0x3609e4[_0x4a7909(0xf5)],'null'));else{if(typeof _0x10fad8===_0x4a7909(0x378)){const _0x31e311=JSON[_0x4a7909(0x2d2)](_0x10fad8);_0x31e311[_0x4a7909(0x387)]<=0x50?console[_0x4a7909(0x172)](_0x1a15d2+_0x52df09+'\x20\x20'+_0xcfca11(_0x3609e4[_0x4a7909(0xf5)],_0x31e311)):(console[_0x4a7909(0x172)](_0x1a15d2+_0x52df09),_0x3494ec(_0x10fad8,_0x1a15d2+'\x20\x20'));}else{const _0x29f1f6=typeof _0x10fad8===_0x4a7909(0x18c)?_0xcfca11(_0x10fad8?_0x3609e4[_0x4a7909(0x122)]:_0x3609e4['yellow'],String(_0x10fad8)):typeof _0x10fad8===_0x4a7909(0xe0)?_0xcfca11(_0x3609e4['magenta'],String(_0x10fad8)):_0xcfca11(_0x3609e4[_0x4a7909(0x21e)],String(_0x10fad8));console[_0x4a7909(0x172)](_0x1a15d2+_0x52df09+'\x20\x20'+_0x29f1f6);}}}}function _0x1680bf(_0x2d4e5f,_0x513a23=''){const _0x5f5138=_0x12f930,_0x8d0af2=Math[_0x5f5138(0x381)](0x20,Math['max'](..._0x2d4e5f[_0x5f5138(0xce)](_0xd4e32f=>String(_0xd4e32f['key'])[_0x5f5138(0x387)])));for(const {key:_0x1eb10c,value:_0x2df43a,score:_0x89c098,clock:_0xf84d5e}of _0x2d4e5f){const _0x538c7c=_0xcfca11(_0x3609e4['bold']+_0x3609e4[_0x5f5138(0x27b)],String(_0x1eb10c)[_0x5f5138(0x2a9)](_0x8d0af2)),_0x1c3096=_0x2df43a==null?_0xcfca11(_0x3609e4['dim'],'null'):typeof _0x2df43a==='object'?_0xcfca11(_0x3609e4[_0x5f5138(0xf5)],JSON[_0x5f5138(0x2d2)](_0x2df43a)):_0xcfca11(_0x3609e4['white'],String(_0x2df43a)),_0x8645a0=_0x89c098!=null?_0xcfca11(_0x3609e4['gray'],_0x5f5138(0x1e9)+_0x89c098[_0x5f5138(0x272)](0x4)):'',_0x3af177=_0xf84d5e!=null?_0xcfca11(_0x3609e4[_0x5f5138(0x299)],'\x20\x20@'+_0xf84d5e):'';console[_0x5f5138(0x172)](_0x513a23+_0x538c7c+'\x20\x20'+_0x1c3096+_0x8645a0+_0x3af177);}}function _0xfce8e9(_0x1dfa67,_0x5378fd=''){const _0x558e4f=_0x12f930,_0xba5991=Math[_0x558e4f(0x381)](0x20,Math[_0x558e4f(0x13f)](..._0x1dfa67[_0x558e4f(0xce)](_0x19bc81=>_0x19bc81[_0x558e4f(0x22e)][_0x558e4f(0x387)])));for(const {type:_0x200163,count:_0xaa2653,fields:_0x2f5116}of _0x1dfa67){if(_0x200163['startsWith']('~'))continue;const _0x287fb9=_0xcfca11(_0x3609e4['bold']+_0x3609e4[_0x558e4f(0x27b)],_0x200163['padEnd'](_0xba5991)),_0x141bc7=_0xcfca11(_0x3609e4[_0x558e4f(0x2a1)],String(_0xaa2653)[_0x558e4f(0x1b2)](0x6))+_0xcfca11(_0x3609e4['dim'],_0x558e4f(0x363)),_0x4af3fe=_0x2f5116&&Object['keys'](_0x2f5116)['length']?_0xcfca11(_0x3609e4[_0x558e4f(0xf5)],_0x558e4f(0x255)+Object[_0x558e4f(0x18e)](_0x2f5116)[_0x558e4f(0x1e5)](0x0,0x6)[_0x558e4f(0x37b)](',\x20')+(Object[_0x558e4f(0x18e)](_0x2f5116)[_0x558e4f(0x387)]>0x6?'…':'')):'';console[_0x558e4f(0x172)](_0x5378fd+_0x287fb9+'\x20\x20'+_0x141bc7+_0x4af3fe);}}const _0x5f5bf5=[_0x12f930(0x33d),_0x12f930(0x191),'queue/',_0x12f930(0x356),_0x12f930(0xbe),_0x12f930(0xfd)];function _0x2b2c6f(_0xc0f8ee,_0x3bbb13){const _0x15ec24=_0x12f930;if(_0xc0f8ee[_0x15ec24(0x354)]('/api/'))return _0xc0f8ee;if(_0xc0f8ee['startsWith']('/'))return _0x15ec24(0x2f3)+_0xc0f8ee;if(_0xc0f8ee[_0x15ec24(0x354)](_0x15ec24(0x232)))return'/api/'+_0xc0f8ee;const _0x341a9f=_0x5f5bf5['some'](_0x501e80=>_0xc0f8ee===_0x501e80['replace'](/\/$/,'')||_0xc0f8ee[_0x15ec24(0x354)](_0x501e80));return _0x341a9f?_0x15ec24(0x21d)+_0x3bbb13+'/'+_0xc0f8ee:_0x15ec24(0x2c4)+_0xc0f8ee;}function _0x3f4cb1(_0xb0c0e6){const _0xfe295c=_0x12f930,_0x1f1225={},_0x1fdb1c=[];let _0x15a97a=0x0;while(_0x15a97a<_0xb0c0e6[_0xfe295c(0x387)]){if((_0xb0c0e6[_0x15a97a]===_0xfe295c(0x3af)||_0xb0c0e6[_0x15a97a]==='-e')&&_0xb0c0e6[_0x15a97a+0x1]&&!_0xb0c0e6[_0x15a97a+0x1]['startsWith']('-'))_0x1f1225[_0xfe295c(0xb4)]=_0xb0c0e6[++_0x15a97a];else _0xb0c0e6[_0x15a97a]===_0xfe295c(0x196)||_0xb0c0e6[_0x15a97a]==='-h'?_0x1f1225['help']=!![]:_0x1fdb1c[_0xfe295c(0xc4)](_0xb0c0e6[_0x15a97a]);_0x15a97a++;}return{'flags':_0x1f1225,'rest':_0x1fdb1c};}const _0x51d269={'system':_0x12f930(0x304),'envs':_0x12f930(0x3ad),'types':_0x12f930(0x219),'data':_0x12f930(0x214),'indexes':_0x12f930(0x3a2),'fts':_0x12f930(0x2bc),'sync':_0x12f930(0x10a),'queue':_0x12f930(0x2c2),'files':_0x12f930(0x2d5),'embeddings':_0x12f930(0x1de),'engines':_0x12f930(0x119),'admin':_0x12f930(0x2e2),'event':_0x12f930(0x141),'processor':_0x12f930(0x275)},_0x4556b0=['system','envs',_0x12f930(0x33d),_0x12f930(0x256),_0x12f930(0x270),_0x12f930(0xbb),'sync',_0x12f930(0xc3),_0x12f930(0x353),'embeddings',_0x12f930(0x291),_0x12f930(0xde)];function _0x4a8f47(_0x533e1a){const _0x259cd9=_0x12f930;return _0x533e1a['replace'](/^\/api/,'')[_0x259cd9(0x16d)](/^\[\/env\/:env=[^\]]*\]/,'[env]')[_0x259cd9(0x16d)](/^\/env\/:env/,_0x259cd9(0x38c))[_0x259cd9(0x16d)](/^\//,'');}function _0x278dc8(_0x3273e8,_0x4dc455=''){const _0x568b1d=_0x12f930,_0x2376c6=_0x3273e8[_0x568b1d(0x22c)][_0x568b1d(0x2d1)]()['filter'](_0x156bcf=>!_0x156bcf[_0x568b1d(0x1d0)]?.[_0x568b1d(0x2ee)]),_0x150ea2=_0x4dc455?_0x2376c6['filter'](_0x52e867=>_0x52e867['path'][_0x568b1d(0x1f7)]()[_0x568b1d(0x11e)](_0x4dc455['toLowerCase']())||(_0x5af43c(_0x52e867)??'')[_0x568b1d(0x1f7)]()[_0x568b1d(0x11e)](_0x4dc455['toLowerCase']())||_0x1bf4c7(_0x52e867)[_0x568b1d(0x152)](_0x2beeef=>_0x2beeef['toLowerCase']()[_0x568b1d(0x11e)](_0x4dc455[_0x568b1d(0x1f7)]()))):_0x2376c6;if(!_0x150ea2['length']){console[_0x568b1d(0x172)](_0xcfca11(_0x3609e4['yellow'],_0x568b1d(0x2cc)+_0x4dc455+'\x22\x0a'));return;}const _0x2c940c=new Map();for(const _0x49da24 of _0x150ea2){const _0x34fef4=_0x1bf4c7(_0x49da24)[0x0]??'other';if(!_0x2c940c['has'](_0x34fef4))_0x2c940c['set'](_0x34fef4,[]);_0x2c940c[_0x568b1d(0x37d)](_0x34fef4)['push'](_0x49da24);}const _0x1aec61=[..._0x4556b0[_0x568b1d(0xfa)](_0x55081b=>_0x2c940c[_0x568b1d(0x36c)](_0x55081b)),...[..._0x2c940c[_0x568b1d(0x18e)]()][_0x568b1d(0xfa)](_0x53f2df=>!_0x4556b0['includes'](_0x53f2df))];console[_0x568b1d(0x172)]('');for(const _0x2c0838 of _0x1aec61){const _0x596149=_0x2c940c[_0x568b1d(0x37d)](_0x2c0838);if(!_0x596149?.[_0x568b1d(0x387)])continue;console[_0x568b1d(0x172)](_0xcfca11(_0x3609e4[_0x568b1d(0x2bd)],'\x20\x20'+(_0x51d269[_0x2c0838]??_0x2c0838)));for(const _0x721a7d of _0x596149){const _0x3cca22=_0xcfca11(_0x3609e4[_0x568b1d(0x2a1)],_0x721a7d['method'][_0x568b1d(0x2a9)](0x7)),_0x4e2173=_0xcfca11(_0x3609e4['cyan'],_0x4a8f47(_0x721a7d[_0x568b1d(0x25b)])),_0x581954=_0x5af43c(_0x721a7d)?_0xcfca11(_0x3609e4[_0x568b1d(0xf5)],'\x20\x20'+_0x5af43c(_0x721a7d)):'',_0x13ef97=_0x721a7d[_0x568b1d(0x11a)]?.['id']?_0xcfca11(_0x3609e4[_0x568b1d(0x299)],'\x20\x20['+_0x721a7d[_0x568b1d(0x11a)]['id']+']'):'';console['log'](_0x568b1d(0x2e9)+_0x3cca22+'\x20'+_0x4e2173+_0x581954+_0x13ef97);}console[_0x568b1d(0x172)]('');}}function _0x1efb18(_0xbe348f,_0x452c49){const _0x5334fa=_0x12f930,_0x37027f=_0x452c49[_0x5334fa(0x16d)](/^\/api(\/env\/[^/]+)?\//,'')[_0x5334fa(0x150)]('/')[0x0],_0x50827f=_0xbe348f[_0x5334fa(0x22c)][_0x5334fa(0x2d1)]()[_0x5334fa(0xfa)](_0x499ae9=>_0x499ae9[_0x5334fa(0x25b)][_0x5334fa(0x1f7)]()[_0x5334fa(0x11e)](_0x37027f[_0x5334fa(0x1f7)]()));if(!_0x50827f[_0x5334fa(0x387)]){console[_0x5334fa(0x172)](_0xcfca11(_0x3609e4[_0x5334fa(0x101)],_0x5334fa(0x38b)+_0x452c49+'\x0a'));return;}console[_0x5334fa(0x172)]('');for(const _0x27dd0f of _0x50827f['slice'](0x0,0xc)){for(const _0x555a21 of _0x3dd44b(_0x27dd0f)){console['log'](_0x555a21);}console[_0x5334fa(0x172)]('');}}function _0x5af43c(_0x208478){const _0x1375d8=_0x12f930;return _0x208478[_0x1375d8(0x11a)]?.[_0x1375d8(0x23a)]??_0x208478[_0x1375d8(0x1d0)]?.[_0x1375d8(0x23a)]??'';}function _0x1b2aa8(_0x1d080b){const _0x3e8cd0=_0x12f930;return _0x1d080b[_0x3e8cd0(0x11a)]?.[_0x3e8cd0(0x2ab)]??_0x1d080b[_0x3e8cd0(0x1d0)]?.[_0x3e8cd0(0x2ab)]??'';}function _0x1bf4c7(_0x1efcce){const _0x3b1749=_0x12f930;return _0x1efcce[_0x3b1749(0x11a)]?.['tags']?.['length']?_0x1efcce['operation'][_0x3b1749(0x17b)]:_0x1efcce[_0x3b1749(0x1d0)]?.[_0x3b1749(0x17b)]??[];}function _0x3dd44b(_0x52796c){const _0x5290e0=_0x12f930,_0x2d139b=[];_0x2d139b[_0x5290e0(0xc4)]('\x20\x20'+_0xcfca11(_0x3609e4[_0x5290e0(0x2bd)]+_0x3609e4[_0x5290e0(0x2a1)],_0x52796c[_0x5290e0(0x317)]['padEnd'](0x7))+'\x20'+_0xcfca11(_0x3609e4[_0x5290e0(0x2bd)]+_0x3609e4[_0x5290e0(0x27b)],_0x52796c[_0x5290e0(0x25b)]));_0x52796c[_0x5290e0(0x11a)]?.['id']&&_0x2d139b[_0x5290e0(0xc4)](_0x5290e0(0xed)+_0xcfca11(_0x3609e4[_0x5290e0(0x299)],_0x5290e0(0x1a3)+_0x52796c['operation']['id']));_0x5af43c(_0x52796c)&&_0x2d139b[_0x5290e0(0xc4)](_0x5290e0(0xed)+_0xcfca11(_0x3609e4[_0x5290e0(0x21e)],_0x5af43c(_0x52796c)));_0x1b2aa8(_0x52796c)&&_0x2d139b['push'](_0x5290e0(0xed)+_0xcfca11(_0x3609e4[_0x5290e0(0xf5)],_0x1b2aa8(_0x52796c)));_0x1bf4c7(_0x52796c)[_0x5290e0(0x387)]&&_0x2d139b[_0x5290e0(0xc4)](_0x5290e0(0xed)+_0xcfca11(_0x3609e4['gray'],_0x5290e0(0x310)+_0x1bf4c7(_0x52796c)[_0x5290e0(0x37b)](',\x20')));_0x52796c['operation']?.[_0x5290e0(0x108)]?.['access']&&_0x2d139b['push'](_0x5290e0(0xed)+_0xcfca11(_0x3609e4[_0x5290e0(0x299)],_0x5290e0(0x2d6)+_0x52796c[_0x5290e0(0x11a)][_0x5290e0(0x108)]['access']));_0x52796c['operation']?.['http']?.[_0x5290e0(0x11d)]&&_0x52796c[_0x5290e0(0x11a)]['http']['transport']!==_0x5290e0(0x21f)&&_0x2d139b[_0x5290e0(0xc4)](_0x5290e0(0xed)+_0xcfca11(_0x3609e4[_0x5290e0(0x299)],'transport:\x20'+_0x52796c[_0x5290e0(0x11a)][_0x5290e0(0x22c)]['transport']));if(_0x52796c[_0x5290e0(0x11a)]?.[_0x5290e0(0x262)]){const _0x37c43e=Object['keys'](_0x52796c[_0x5290e0(0x11a)][_0x5290e0(0x262)]['properties']||{});if(_0x37c43e['length'])_0x2d139b['push']('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0xcfca11(_0x3609e4['gray'],_0x5290e0(0x1a9)+_0x37c43e['join'](',\x20')));}return _0x52796c[_0x5290e0(0x1d0)]?.[_0x5290e0(0x2f0)]&&_0x2d139b[_0x5290e0(0xc4)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0xcfca11(_0x3609e4['gray'],_0x5290e0(0xca)+JSON[_0x5290e0(0x2d2)](_0x52796c[_0x5290e0(0x1d0)][_0x5290e0(0x2f0)]))),_0x2d139b;}async function _0x1ae8eb(_0x59649a,_0x402bd3,_0x2ae333,_0x3c2741=null){const _0x529d27=_0x12f930,_0x1a0d08=_0x2ae333[_0x529d27(0x3a5)]('?'),_0x1bf5c2=_0x1a0d08>=0x0?_0x2ae333[_0x529d27(0x1e5)](0x0,_0x1a0d08):_0x2ae333,_0x2434a5=_0x1a0d08>=0x0?_0x2ae333['slice'](_0x1a0d08+0x1):'',_0x3d480a=Object[_0x529d27(0x253)](new URLSearchParams(_0x2434a5)['entries']());return _0x59649a['http'][_0x529d27(0xd3)](_0x402bd3,_0x1bf5c2,{'body':_0x3c2741,'query':_0x3d480a,'headers':{'content-type':_0x529d27(0x323)}},{'internal':!![]});}function _0x255393(_0x1111e){const _0x2dea0c=_0x12f930;if(!_0x1111e)return null;const _0x956e07=_0x1111e[_0x2dea0c(0x2c9)]();if(!_0x956e07)return null;try{return JSON[_0x2dea0c(0x15a)](_0x956e07);}catch{}try{return JSON[_0x2dea0c(0x15a)](_0x170fee(_0x956e07));}catch(_0x260663){throw new SyntaxError(_0x260663[_0x2dea0c(0xe8)],{'cause':_0x260663});}}function _0x170fee(_0x333511){const _0x51c4b2=_0x12f930;let _0x2bbeb2='',_0x4a22f9=0x0;while(_0x4a22f9<_0x333511[_0x51c4b2(0x387)]){const _0x48bf97=_0x333511[_0x4a22f9];if(_0x48bf97==='\x22'){_0x2bbeb2+='\x22',_0x4a22f9++;while(_0x4a22f9<_0x333511[_0x51c4b2(0x387)]&&_0x333511[_0x4a22f9]!=='\x22'){if(_0x333511[_0x4a22f9]==='\x5c'){_0x2bbeb2+=_0x333511[_0x4a22f9++];if(_0x4a22f9<_0x333511[_0x51c4b2(0x387)])_0x2bbeb2+=_0x333511[_0x4a22f9++];}else _0x2bbeb2+=_0x333511[_0x4a22f9++];}_0x2bbeb2+='\x22';if(_0x4a22f9<_0x333511['length'])_0x4a22f9++;continue;}if(_0x48bf97==='\x27'){_0x2bbeb2+='\x22',_0x4a22f9++;while(_0x4a22f9<_0x333511['length']&&_0x333511[_0x4a22f9]!=='\x27'){if(_0x333511[_0x4a22f9]==='\x5c'&&_0x333511[_0x4a22f9+0x1]==='\x27')_0x2bbeb2+='\x27',_0x4a22f9+=0x2;else _0x333511[_0x4a22f9]==='\x22'?(_0x2bbeb2+='\x5c\x22',_0x4a22f9++):_0x2bbeb2+=_0x333511[_0x4a22f9++];}_0x2bbeb2+='\x22';if(_0x4a22f9<_0x333511[_0x51c4b2(0x387)])_0x4a22f9++;continue;}if(_0x51c4b2(0x1ee)['includes'](_0x48bf97)){_0x2bbeb2+=_0x48bf97,_0x4a22f9++;continue;}let _0x3712ba='';while(_0x4a22f9<_0x333511[_0x51c4b2(0x387)]&&!_0x51c4b2(0x30c)[_0x51c4b2(0x11e)](_0x333511[_0x4a22f9])&&_0x333511[_0x4a22f9]!=='\x20'&&_0x333511[_0x4a22f9]!=='\x09'&&_0x333511[_0x4a22f9]!=='\x0a'&&_0x333511[_0x4a22f9]!=='\x0d'){_0x3712ba+=_0x333511[_0x4a22f9++];}let _0x12642d=_0x4a22f9;while(_0x12642d<_0x333511[_0x51c4b2(0x387)]&&(_0x333511[_0x12642d]==='\x20'||_0x333511[_0x12642d]==='\x09'))_0x12642d++;if(_0x333511[_0x12642d]===':')_0x2bbeb2+='\x22'+_0x3712ba+'\x22';else _0x3712ba===_0x51c4b2(0x2ca)||_0x3712ba===_0x51c4b2(0x337)||_0x3712ba===_0x51c4b2(0x112)||/^-?\d+(\.\d+)?([eE][+-]?\d+)?$/[_0x51c4b2(0x107)](_0x3712ba)?_0x2bbeb2+=_0x3712ba:_0x2bbeb2+='\x22'+_0x3712ba+'\x22';}return _0x2bbeb2['replace'](/,(\s*[}\]])/g,'$1');}function _0x467528(_0x13458f){const _0x2a23a6=_0x12f930,_0x4c8944=[];let _0x896768=0x0;while(_0x896768<_0x13458f[_0x2a23a6(0x387)]){while(_0x896768<_0x13458f[_0x2a23a6(0x387)]&&(_0x13458f[_0x896768]==='\x20'||_0x13458f[_0x896768]==='\x09'))_0x896768++;if(_0x896768>=_0x13458f[_0x2a23a6(0x387)])break;const _0x4c3324=_0x13458f[_0x896768];if(_0x4c3324==='{'||_0x4c3324==='['){const _0x2e0305=_0x4c3324==='{'?'}':']',_0x531c46=_0x896768++;let _0x3da282=0x1,_0x7f0642=![],_0x68b446='';while(_0x896768<_0x13458f['length']&&_0x3da282>0x0){const _0x226819=_0x13458f[_0x896768];if(_0x7f0642){if(_0x226819==='\x5c')_0x896768++;else{if(_0x226819===_0x68b446)_0x7f0642=![];}}else{if(_0x226819==='\x22'||_0x226819==='\x27')_0x7f0642=!![],_0x68b446=_0x226819;else{if(_0x226819===_0x4c3324)_0x3da282++;else{if(_0x226819===_0x2e0305)_0x3da282--;}}}_0x896768++;}_0x4c8944[_0x2a23a6(0xc4)](_0x13458f[_0x2a23a6(0x1e5)](_0x531c46,_0x896768));continue;}if(_0x4c3324==='\x22'||_0x4c3324==='\x27'){const _0x52b0a5=_0x4c3324;_0x896768++;let _0x1e537a='';while(_0x896768<_0x13458f[_0x2a23a6(0x387)]&&_0x13458f[_0x896768]!==_0x52b0a5){if(_0x13458f[_0x896768]==='\x5c'&&_0x896768+0x1<_0x13458f[_0x2a23a6(0x387)])_0x896768++,_0x1e537a+=_0x13458f[_0x896768++];else _0x1e537a+=_0x13458f[_0x896768++];}if(_0x896768<_0x13458f[_0x2a23a6(0x387)])_0x896768++;_0x4c8944[_0x2a23a6(0xc4)](_0x1e537a);continue;}let _0x35c24a='';while(_0x896768<_0x13458f[_0x2a23a6(0x387)]&&_0x13458f[_0x896768]!=='\x20'&&_0x13458f[_0x896768]!=='\x09'&&_0x13458f[_0x896768]!=='{'&&_0x13458f[_0x896768]!=='['){_0x35c24a+=_0x13458f[_0x896768++];}if(_0x35c24a)_0x4c8944['push'](_0x35c24a);}return _0x4c8944;}function _0x25ae6(_0x433451,_0x21bb5d){const _0x29f80b=_0x12f930,_0x47aa22=[..._0x433451[_0x29f80b(0x10b)][_0x29f80b(0x18e)]()][_0x29f80b(0xfa)](_0xf35188=>!_0xf35188[_0x29f80b(0x354)]('~'));console[_0x29f80b(0x172)](['',_0xcfca11(_0x3609e4[_0x29f80b(0x2bd)]+_0x3609e4[_0x29f80b(0x27b)],_0x29f80b(0x3b5)),_0xcfca11(_0x3609e4['bold']+_0x3609e4[_0x29f80b(0x27b)],_0x29f80b(0x15b))+_0xcfca11(_0x3609e4[_0x29f80b(0x2bd)],'\x20\x20\x20\x20\x20\x20\x20\x20\x20OKDB\x20SHELL\x20\x20\x20\x20\x20\x20\x20\x20\x20')+_0xcfca11(_0x3609e4['bold']+_0x3609e4['cyan'],'║'),_0xcfca11(_0x3609e4[_0x29f80b(0x2bd)]+_0x3609e4[_0x29f80b(0x27b)],'\x20\x20╚═══════════════════════════╝'),'','\x20\x20'+_0xcfca11(_0x3609e4[_0x29f80b(0x122)],'✓')+'\x20'+_0xcfca11(_0x3609e4[_0x29f80b(0x2bd)],_0x29f80b(0x39c))+_0x29f80b(0x22f)+_0x21bb5d[_0x29f80b(0x2f1)],'\x20\x20'+_0xcfca11(_0x3609e4[_0x29f80b(0x122)],'✓')+'\x20'+_0xcfca11(_0x3609e4[_0x29f80b(0x2bd)],_0x29f80b(0x165))+_0x29f80b(0x27f)+_0x21bb5d['port']+_0x29f80b(0x2f3),'\x20\x20'+_0xcfca11(_0x3609e4['green'],'✓')+'\x20'+_0xcfca11(_0x3609e4[_0x29f80b(0x2bd)],_0x29f80b(0x25b))+_0x29f80b(0x2e9)+_0x21bb5d[_0x29f80b(0x1eb)],'\x20\x20'+_0xcfca11(_0x3609e4['green'],'✓')+'\x20'+_0xcfca11(_0x3609e4['bold'],'id')+_0x29f80b(0x2bb)+_0xcfca11(_0x3609e4[_0x29f80b(0x299)],_0x433451['id']),'\x20\x20'+_0xcfca11(_0x3609e4[_0x29f80b(0x122)],'✓')+'\x20'+_0xcfca11(_0x3609e4['bold'],'envs')+_0x29f80b(0x2e9)+_0x47aa22[_0x29f80b(0xce)](_0x22e2e8=>_0xcfca11(_0x3609e4['cyan'],_0x22e2e8))[_0x29f80b(0x37b)]('\x20\x20'),..._0x21bb5d[_0x29f80b(0x163)]?[]:['\x20\x20'+_0xcfca11(_0x3609e4[_0x29f80b(0x122)],'✓')+'\x20'+_0xcfca11(_0x3609e4[_0x29f80b(0x2bd)],_0x29f80b(0xde))+_0x29f80b(0x2dc)+_0x21bb5d['port']+'/admin/index.html'],'',_0xcfca11(_0x3609e4[_0x29f80b(0xf5)],_0x29f80b(0x34b)+_0xcfca11(_0x3609e4[_0x29f80b(0x2bd)],_0x29f80b(0x32e))+_0x29f80b(0x1e7)+_0xcfca11(_0x3609e4[_0x29f80b(0x2bd)],_0x29f80b(0x244))+_0x29f80b(0x2d8)+_0xcfca11(_0x3609e4[_0x29f80b(0x2bd)],_0x29f80b(0x3ab))+_0x29f80b(0x2c6)),''][_0x29f80b(0x37b)]('\x0a'));}function _0x5198f8(_0xe6806){const _0x4a9ff3=_0x12f930;console['log']('\x0a'+_0xcfca11(_0x3609e4[_0x4a9ff3(0x2bd)],_0x4a9ff3(0x3a7))+'\x20\x20'+_0xcfca11(_0x3609e4[_0x4a9ff3(0xf5)],_0x4a9ff3(0x210))+_0x4a9ff3(0x1c1)+_0xcfca11(_0x3609e4[_0x4a9ff3(0x27b)],_0x4a9ff3(0x25f))+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20GET\x20(implicit)\x0a\x20\x20'+_0xcfca11(_0x3609e4['cyan'],'<path>')+'\x20'+_0xcfca11(_0x3609e4['yellow'],_0x4a9ff3(0xc0))+_0x4a9ff3(0x361)+_0xcfca11(_0x3609e4[_0x4a9ff3(0x27b)],_0x4a9ff3(0x27a))+'\x20'+_0xcfca11(_0x3609e4['cyan'],_0x4a9ff3(0x25f))+'\x20'+_0xcfca11(_0x3609e4[_0x4a9ff3(0x101)],_0x4a9ff3(0x2ec))+_0x4a9ff3(0x1ff)+_0xcfca11(_0x3609e4[_0x4a9ff3(0xf5)],'Examples')+_0x4a9ff3(0x343)+_0xcfca11(_0x3609e4[_0x4a9ff3(0x299)],'info')+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/info\x0a\x20\x20\x20\x20'+_0xcfca11(_0x3609e4[_0x4a9ff3(0x299)],_0x4a9ff3(0xea))+_0x4a9ff3(0x364)+_0xcfca11(_0x3609e4[_0x4a9ff3(0x299)],_0x4a9ff3(0x33d))+_0x4a9ff3(0x1cc)+_0xe6806['env']+'/types\x0a\x20\x20\x20\x20'+_0xcfca11(_0x3609e4['gray'],_0x4a9ff3(0x316))+_0x4a9ff3(0xec)+_0xe6806[_0x4a9ff3(0xb4)]+'/type/users\x0a\x20\x20\x20\x20'+_0xcfca11(_0x3609e4[_0x4a9ff3(0x299)],_0x4a9ff3(0x155))+_0x4a9ff3(0x28a)+_0xe6806[_0x4a9ff3(0xb4)]+_0x4a9ff3(0x24a)+_0xcfca11(_0x3609e4[_0x4a9ff3(0x299)],_0x4a9ff3(0x339))+_0x4a9ff3(0x3a3)+_0xe6806[_0x4a9ff3(0xb4)]+'/type/users/query\x0a\x20\x20\x20\x20'+_0xcfca11(_0x3609e4['gray'],_0x4a9ff3(0x188))+'\x0a\x20\x20\x20\x20'+_0xcfca11(_0x3609e4[_0x4a9ff3(0x299)],'DELETE\x20type/users/item/x')+_0x4a9ff3(0x343)+_0xcfca11(_0x3609e4['gray'],_0x4a9ff3(0x2fc))+'\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'+_0xcfca11(_0x3609e4[_0x4a9ff3(0x2bd)],_0x4a9ff3(0x197))+'\x20\x20'+_0xcfca11(_0x3609e4['dim'],'(on\x20any\x20path\x20command)')+_0x4a9ff3(0x1c1)+_0xcfca11(_0x3609e4[_0x4a9ff3(0x27b)],_0x4a9ff3(0x128))+_0x4a9ff3(0x2b3)+_0xcfca11(_0x3609e4['cyan'],_0x4a9ff3(0x196))+'\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'+_0xcfca11(_0x3609e4[_0x4a9ff3(0xf5)],_0x4a9ff3(0x300))+_0x4a9ff3(0x343)+_0xcfca11(_0x3609e4['gray'],'types\x20--env\x20staging')+_0x4a9ff3(0x343)+_0xcfca11(_0x3609e4[_0x4a9ff3(0x299)],_0x4a9ff3(0x277))+_0x4a9ff3(0x343)+_0xcfca11(_0x3609e4[_0x4a9ff3(0x299)],_0x4a9ff3(0x34d))+'\x0a\x0a'+_0xcfca11(_0x3609e4['bold'],_0x4a9ff3(0x1cb))+_0x4a9ff3(0x1c1)+_0xcfca11(_0x3609e4[_0x4a9ff3(0x27b)],'use\x20<env>')+_0x4a9ff3(0xb8)+_0xcfca11(_0x3609e4[_0x4a9ff3(0x27b)],_0x4a9ff3(0xb4))+'\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'+_0xcfca11(_0x3609e4[_0x4a9ff3(0x27b)],_0x4a9ff3(0x244))+'\x20'+_0xcfca11(_0x3609e4[_0x4a9ff3(0xf5)],_0x4a9ff3(0x2a0))+_0x4a9ff3(0x2ea)+_0xcfca11(_0x3609e4[_0x4a9ff3(0x27b)],_0x4a9ff3(0x359))+'\x20'+_0xcfca11(_0x3609e4[_0x4a9ff3(0xf5)],_0x4a9ff3(0x294))+_0x4a9ff3(0xf2)+_0xcfca11(_0x3609e4[_0x4a9ff3(0x27b)],_0x4a9ff3(0x2c7))+_0x4a9ff3(0x182)+_0xcfca11(_0x3609e4[_0x4a9ff3(0x27b)],'help')+_0x4a9ff3(0x2b0)+_0xcfca11(_0x3609e4[_0x4a9ff3(0x27b)],_0x4a9ff3(0x3ab))+'\x20'+_0xcfca11(_0x3609e4['dim'],_0x4a9ff3(0x20a))+'\x20\x20\x20\x20graceful\x20shutdown\x0a');}async function _0x2d00b9(_0x8aea36,_0xe8aa50=0x0){const _0x280264=_0x12f930;process[_0x280264(0xfc)]['write']('\x0a'),console[_0x280264(0x172)](_0xcfca11(_0x3609e4['yellow'],_0x280264(0x278)));try{await _0x8aea36['close']();}catch(_0x26d1eb){console[_0x280264(0x220)](_0xcfca11(_0x3609e4[_0x280264(0x1a7)],'\x20\x20'+_0x26d1eb[_0x280264(0xe8)]));}process['exit'](_0xe8aa50);}function _0x59142d(_0x25dc10){const _0x2baea3=_0x12f930,_0xa421c1=_0x25dc10[_0x2baea3(0xb4)]!==_0x2baea3(0x1dc)?_0xcfca11(_0x3609e4[_0x2baea3(0x101)],'['+_0x25dc10['env']+']'):'';return _0xcfca11(_0x3609e4['bold']+_0x3609e4[_0x2baea3(0x27b)],_0x2baea3(0x144))+_0xa421c1+_0xcfca11(_0x3609e4[_0x2baea3(0x299)],'>\x20');}const _0x118192=new Set([_0x12f930(0x1b6),_0x12f930(0x132),'PUT',_0x12f930(0x366),_0x12f930(0x1c7)]);async function _0x356373(_0x5be907,_0x4b0dd2,_0x5b1218,_0x4b579e,_0x45a96b,_0x16fec3){const _0x4b294e=_0x12f930;_0x5be907=_0x5be907[_0x4b294e(0x2c9)]();if(!_0x5be907||_0x5be907[_0x4b294e(0x354)]('#'))return;const _0x22cf55=_0x467528(_0x5be907),{flags:_0x2102bd,rest:_0x13226f}=_0x3f4cb1(_0x22cf55);if(!_0x13226f['length'])return;const _0x14ffab=_0x13226f[0x0],_0x557514=_0x14ffab[_0x4b294e(0x2f9)]();if(_0x557514==='HELP'){if(_0x13226f[0x1])_0x1efb18(_0x4b0dd2,_0x2b2c6f(_0x13226f[0x1],_0x2102bd[_0x4b294e(0xb4)]??_0x45a96b[_0x4b294e(0xb4)]));else _0x5198f8(_0x45a96b);return;}if(_0x557514===_0x4b294e(0x28f)){const _0x26c9fd=_0x13226f[0x1];if(!_0x26c9fd){console[_0x4b294e(0x172)](_0xcfca11(_0x3609e4[_0x4b294e(0x1a7)],_0x4b294e(0x34f)));return;}try{_0x4b0dd2[_0x4b294e(0xb4)](_0x26c9fd),_0x45a96b['env']=_0x26c9fd,_0x16fec3?.[_0x4b294e(0x24f)](_0x59142d(_0x45a96b)),console[_0x4b294e(0x172)](_0x4b294e(0x1f5)+_0xcfca11(_0x3609e4['green'],'✓')+'\x20active\x20env:\x20'+_0xcfca11(_0x3609e4[_0x4b294e(0x2bd)]+_0x3609e4[_0x4b294e(0x27b)],_0x26c9fd)+'\x0a');}catch{console[_0x4b294e(0x172)](_0x4b294e(0x1f5)+_0xcfca11(_0x3609e4[_0x4b294e(0x1a7)],'✗')+_0x4b294e(0x162)+_0xcfca11(_0x3609e4[_0x4b294e(0x2bd)],_0x26c9fd)+_0x4b294e(0x19f)+_0xcfca11(_0x3609e4[_0x4b294e(0xf5)],_0x4b294e(0x2ed)));}return;}if(_0x557514===_0x4b294e(0x23c)){const _0x3a6d27=[..._0x4b0dd2[_0x4b294e(0x10b)][_0x4b294e(0x18e)]()][_0x4b294e(0xfa)](_0x5ed269=>!_0x5ed269[_0x4b294e(0x354)]('~'));console[_0x4b294e(0x172)]('');for(const _0x17a967 of _0x3a6d27){const _0x39b40c=_0x17a967===_0x45a96b[_0x4b294e(0xb4)];console[_0x4b294e(0x172)]('\x20\x20'+(_0x39b40c?_0xcfca11(_0x3609e4[_0x4b294e(0x122)],'●'):_0xcfca11(_0x3609e4[_0x4b294e(0xf5)],'○'))+'\x20\x20'+(_0x39b40c?_0xcfca11(_0x3609e4['bold']+_0x3609e4[_0x4b294e(0x27b)],_0x17a967):_0xcfca11(_0x3609e4[_0x4b294e(0xf5)],_0x17a967)));}console[_0x4b294e(0x172)](_0x4b294e(0x1f5)+_0xcfca11(_0x3609e4[_0x4b294e(0xf5)],_0x4b294e(0x257))+'\x20'+_0xcfca11(_0x3609e4[_0x4b294e(0x27b)],_0x45a96b[_0x4b294e(0xb4)])),console[_0x4b294e(0x172)]('');return;}if(_0x557514==='ENVS'){const _0x3e11a6=[..._0x4b0dd2[_0x4b294e(0x10b)][_0x4b294e(0x37a)]()][_0x4b294e(0xfa)](_0xfe32c5=>!_0xfe32c5[_0x4b294e(0x17a)][_0x4b294e(0x354)]('~'));console[_0x4b294e(0x172)]('');const _0x1b4530=Math[_0x4b294e(0x13f)](..._0x3e11a6[_0x4b294e(0xce)](_0x3e493d=>_0x3e493d[_0x4b294e(0x17a)][_0x4b294e(0x387)]));for(const _0x3bb9b8 of _0x3e11a6){const _0x33710f=_0x3bb9b8['name']===_0x45a96b[_0x4b294e(0xb4)],_0x5d7fed=_0x33710f?_0xcfca11(_0x3609e4['green'],'●'):_0xcfca11(_0x3609e4[_0x4b294e(0xf5)],'○'),_0x58cdb6=_0x33710f?_0xcfca11(_0x3609e4[_0x4b294e(0x2bd)]+_0x3609e4[_0x4b294e(0x27b)],_0x3bb9b8[_0x4b294e(0x17a)][_0x4b294e(0x2a9)](_0x1b4530)):_0xcfca11(_0x3609e4[_0x4b294e(0xf5)],_0x3bb9b8[_0x4b294e(0x17a)][_0x4b294e(0x2a9)](_0x1b4530)),_0x4b62c5=[..._0x3bb9b8['typeSubDbs'][_0x4b294e(0x18e)]()][_0x4b294e(0xfa)](_0x5ef78c=>!_0x5ef78c[_0x4b294e(0x354)]('~')),_0x29c0da=_0x4b62c5['length']?_0xcfca11(_0x3609e4[_0x4b294e(0xf5)],_0x4b62c5[_0x4b294e(0x1e5)](0x0,0x5)[_0x4b294e(0x37b)](',\x20')+(_0x4b62c5[_0x4b294e(0x387)]>0x5?_0x4b294e(0x1a1)+(_0x4b62c5[_0x4b294e(0x387)]-0x5)+_0x4b294e(0x2fd):'')):_0xcfca11(_0x3609e4[_0x4b294e(0xf5)],_0x4b294e(0x1d1));console['log']('\x20\x20'+_0x5d7fed+'\x20\x20'+_0x58cdb6+'\x20\x20'+_0x29c0da);}console[_0x4b294e(0x172)]('');return;}if(_0x557514===_0x4b294e(0x2e7)){const _0x588152=_0x2102bd[_0x4b294e(0xb4)]??_0x13226f[0x1]??_0x45a96b[_0x4b294e(0xb4)];try{const _0x1ad4ea=_0x4b0dd2[_0x4b294e(0xb4)](_0x588152),_0x4b51d9=[..._0x1ad4ea['typeSubDbs'][_0x4b294e(0x18e)]()][_0x4b294e(0xfa)](_0x147a06=>!_0x147a06[_0x4b294e(0x354)]('~'))[_0x4b294e(0x169)]();console[_0x4b294e(0x172)]('\x0a\x20\x20'+_0xcfca11(_0x3609e4[_0x4b294e(0xf5)],_0x4b51d9[_0x4b294e(0x387)]+_0x4b294e(0x15f)+(_0x4b51d9[_0x4b294e(0x387)]!==0x1?'s':'')+_0x4b294e(0x358)+_0x588152));for(const _0x4695c0 of _0x4b51d9){const _0x2a043f=_0x1ad4ea[_0x4b294e(0x1d3)][_0x4b294e(0x37d)](_0x4695c0),_0x547f14=_0x2a043f?.[_0x4b294e(0x256)]?.[_0x4b294e(0x24e)]?.()??0x0,_0x401d48=_0xcfca11(_0x3609e4['bold']+_0x3609e4[_0x4b294e(0x27b)],_0x4695c0[_0x4b294e(0x2a9)](0x1c));console[_0x4b294e(0x172)](_0x4b294e(0x2e9)+_0x401d48+'\x20\x20'+_0xcfca11(_0x3609e4[_0x4b294e(0x2a1)],String(_0x547f14)[_0x4b294e(0x1b2)](0x6))+'\x20'+_0xcfca11(_0x3609e4['dim'],_0x4b294e(0x2cd)));}console['log']('');}catch(_0x368a52){console[_0x4b294e(0x220)](_0xcfca11(_0x3609e4[_0x4b294e(0x1a7)],'\x0a\x20\x20'+_0x368a52[_0x4b294e(0xe8)]+'\x0a'));}return;}if(_0x557514==='ROUTES'){_0x278dc8(_0x4b0dd2,_0x13226f[_0x4b294e(0x1e5)](0x1)[_0x4b294e(0x37b)]('\x20'));return;}if(_0x557514===_0x4b294e(0x2ad)){const _0xb882dd=(_0x13226f[0x1]??'')[_0x4b294e(0x1f7)]();if(!_0xb882dd||_0xb882dd==='on')_0x4b579e[_0x4b294e(0x35d)]=!![],_0x4b579e['level']=_0x4b294e(0x1f9),console[_0x4b294e(0x172)](_0x4b294e(0x1f5)+_0xcfca11(_0x3609e4['green'],'✓')+'\x20logs\x20on\x20\x20'+_0xcfca11(_0x3609e4[_0x4b294e(0xf5)],_0x4b294e(0x318))+'\x0a');else{if(_0xb882dd===_0x4b294e(0x32c))_0x4b579e[_0x4b294e(0x35d)]=![],console[_0x4b294e(0x172)]('\x0a\x20\x20'+_0xcfca11(_0x3609e4[_0x4b294e(0x101)],'○')+_0x4b294e(0x2ff));else _0x246ab8[_0xb882dd]!==undefined?(_0x4b579e[_0x4b294e(0x35d)]=!![],_0x4b579e[_0x4b294e(0x306)]=_0xb882dd,console[_0x4b294e(0x172)](_0x4b294e(0x1f5)+_0xcfca11(_0x3609e4[_0x4b294e(0x122)],'✓')+_0x4b294e(0x26c)+_0xcfca11(_0x3609e4[_0x4b294e(0x2bd)],_0xb882dd)+'\x0a')):console[_0x4b294e(0x220)](_0xcfca11(_0x3609e4[_0x4b294e(0x1a7)],_0x4b294e(0x30f)));}return;}if(_0x557514===_0x4b294e(0x2a7)||_0x557514===_0x4b294e(0x240)){await _0x2d00b9(_0x4b0dd2,0x0);return;}if(_0x557514===_0x4b294e(0x29d)){const _0x41ec27=_0x4b294e(0x156)+_0x5b1218[_0x4b294e(0x2f1)]+'/admin/index.html',_0x1619cc=process['platform']===_0x4b294e(0x168)?_0x4b294e(0x3ac)+_0x41ec27:process[_0x4b294e(0x1f1)]===_0x4b294e(0x32b)?'open\x20'+_0x41ec27:_0x4b294e(0x2e8)+_0x41ec27;require$$4[_0x4b294e(0x1a5)](_0x1619cc),console['log'](_0x4b294e(0x1f5)+_0xcfca11(_0x3609e4[_0x4b294e(0x122)],'✓')+_0x4b294e(0x293)+_0xcfca11(_0x3609e4[_0x4b294e(0x27b)],_0x41ec27)+'\x0a');return;}let _0x3796be,_0x4432cd,_0x1904d2;if(_0x118192['has'](_0x557514)){_0x3796be=_0x557514,_0x4432cd=_0x13226f[0x1],_0x1904d2=_0x13226f['slice'](0x2);if(!_0x4432cd){console[_0x4b294e(0x220)](_0xcfca11(_0x3609e4[_0x4b294e(0x1a7)],_0x4b294e(0x1bc)+_0x14ffab+_0x4b294e(0x109)));return;}}else _0x3796be=null,_0x4432cd=_0x13226f[0x0],_0x1904d2=_0x13226f['slice'](0x1);const _0x4d6a5f=_0x2102bd['env']??_0x45a96b[_0x4b294e(0xb4)],_0x16c110=_0x2b2c6f(_0x4432cd,_0x4d6a5f);if(_0x2102bd[_0x4b294e(0x32e)]){_0x1efb18(_0x4b0dd2,_0x16c110);return;}let _0x22324b=null;if(_0x1904d2[_0x4b294e(0x387)]){const _0x1a4120=_0x1904d2['join']('\x20');try{_0x22324b=_0x255393(_0x1a4120);}catch(_0x2d2c40){console[_0x4b294e(0x220)](_0xcfca11(_0x3609e4['red'],_0x4b294e(0x31c)+_0x1a4120+_0x4b294e(0x1f5)+_0xcfca11(_0x3609e4[_0x4b294e(0xf5)],_0x2d2c40[_0x4b294e(0xe8)])+'\x0a'));return;}}if(!_0x3796be)_0x3796be=_0x22324b!==null?_0x4b294e(0x132):_0x4b294e(0x1b6);try{const _0x55303d=await _0x1ae8eb(_0x4b0dd2,_0x3796be,_0x16c110,_0x22324b);_0x5f5135(_0x55303d[_0x4b294e(0x248)],_0x55303d[_0x4b294e(0x2f0)]);}catch(_0x41517a){console[_0x4b294e(0x220)](_0x4b294e(0x1f5)+_0xcfca11(_0x3609e4[_0x4b294e(0x1a7)],'✗')+'\x20'+_0x41517a[_0x4b294e(0xe8)]+'\x0a');}}class _0x2022ea{constructor(){const _0x2e2272=_0x12f930;this[_0x2e2272(0x349)]=new Map(),this['dynamic']=null,this[_0x2e2272(0x1fc)]=![];}}function _0x436769(_0x1dee83){const _0x2779d0=_0x12f930,_0x426402=new _0x2022ea();for(const _0x1c42d1 of _0x1dee83){if(_0x1c42d1[_0x2779d0(0x1d0)]?.[_0x2779d0(0x2ee)])continue;const _0x39e557=_0x1c42d1[_0x2779d0(0x25b)][_0x2779d0(0x16d)](/^\/api/,'')[_0x2779d0(0x16d)](/^\[\/env\/:env=[^\]]*\]/,'')[_0x2779d0(0x16d)](/^\//,'');if(!_0x39e557)continue;let _0x3e9395=_0x426402;for(const _0x10400d of _0x39e557['split']('/')[_0x2779d0(0xfa)](Boolean)){if(_0x10400d[_0x2779d0(0x354)](':')){const _0x52e160=_0x10400d[_0x2779d0(0x1e5)](0x1);if(!_0x3e9395[_0x2779d0(0x1ca)])_0x3e9395['dynamic']={'param':_0x52e160,'node':new _0x2022ea()};_0x3e9395=_0x3e9395['dynamic'][_0x2779d0(0x2b5)];}else{if(!_0x3e9395[_0x2779d0(0x349)][_0x2779d0(0x36c)](_0x10400d))_0x3e9395[_0x2779d0(0x349)][_0x2779d0(0x26a)](_0x10400d,new _0x2022ea());_0x3e9395=_0x3e9395['children'][_0x2779d0(0x37d)](_0x10400d);}}_0x3e9395['terminal']=!![];}return _0x426402;}const _0x4fc65d=new Map();function _0x51df32(_0x263936,_0x568826,_0x5dad57){const _0x5f1a32=_0x12f930,_0x3b8802=_0x4fc65d[_0x5f1a32(0x37d)](_0x263936);if(_0x3b8802&&_0x3b8802[_0x5f1a32(0x238)]>Date[_0x5f1a32(0x1bf)]())return _0x3b8802['val'];const _0x403b5d=_0x5dad57();return _0x4fc65d[_0x5f1a32(0x26a)](_0x263936,{'val':_0x403b5d,'exp':Date[_0x5f1a32(0x1bf)]()+_0x568826}),_0x403b5d;}function _0x1116c3(_0x4c04ed,_0x1e44df,_0x62d924,_0x19b8d1){const _0x100366=_0x12f930,_0x432d34=_0x1e44df[_0x100366(0xb4)]??_0x19b8d1[_0x100366(0xb4)];switch(_0x4c04ed){case'env':return[..._0x62d924['_envs'][_0x100366(0x18e)]()][_0x100366(0xfa)](_0xb58785=>!_0xb58785[_0x100366(0x354)]('~'));case _0x100366(0x22e):return _0x51df32(_0x100366(0x14d)+_0x432d34,0x7d0,()=>{const _0x3c9177=_0x100366;try{return[..._0x62d924[_0x3c9177(0xb4)](_0x432d34)[_0x3c9177(0x1d3)]['keys']()][_0x3c9177(0xfa)](_0x295cfd=>!_0x295cfd['startsWith']('~'));}catch{return[];}});case _0x100366(0x36f):if(!_0x1e44df['type'])return[];return _0x51df32('keys:'+_0x432d34+':'+_0x1e44df[_0x100366(0x22e)],0x5dc,()=>{const _0x3e5006=_0x100366;try{const _0x467584=_0x62d924[_0x3e5006(0xb4)](_0x432d34)['typeSubDbs']['get'](_0x1e44df[_0x3e5006(0x22e)]);if(!_0x467584?.[_0x3e5006(0x256)])return[];const _0xca845=[];for(const {key:_0x4b72ab}of _0x467584['data'][_0x3e5006(0x129)]({'limit':0x32})){_0xca845[_0x3e5006(0xc4)](String(_0x4b72ab));if(_0xca845[_0x3e5006(0x387)]>=0x32)break;}return _0xca845;}catch{return[];}});case _0x100366(0x208):if(!_0x1e44df[_0x100366(0x22e)])return[];return _0x51df32(_0x100366(0x245)+_0x432d34+':'+_0x1e44df['type'],0x7d0,()=>{const _0x3f0672=_0x100366;try{const _0x5ddf86=_0x62d924['env'](_0x432d34)[_0x3f0672(0x1d3)]['get'](_0x1e44df['type']);return _0x5ddf86?[..._0x5ddf86['indexToDb']?.['keys']()??[]]:[];}catch{return[];}});case _0x100366(0xfe):if(!_0x1e44df['type'])return[];return _0x51df32('fts:'+_0x432d34+':'+_0x1e44df[_0x100366(0x22e)],0x7d0,()=>{const _0x280f53=_0x100366;try{return _0x62d924[_0x280f53(0xbb)]?.[_0x280f53(0x1a8)]?.(_0x1e44df[_0x280f53(0x22e)],_0x62d924[_0x280f53(0xb4)](_0x432d34))?.['map'](_0x351a9b=>_0x351a9b[_0x280f53(0x17a)])??[];}catch{return[];}});default:return[];}}function _0xeb64c6(_0x41ce1f,_0x9d5050,_0x1c9967,_0x12997c){const _0x5b88f8=_0x12f930,_0x4c0156=_0x41ce1f['endsWith']('/'),_0x247d43=_0x41ce1f[_0x5b88f8(0x150)]('/'),_0x2a0877=_0x4c0156?_0x247d43[_0x5b88f8(0x1e5)](0x0,-0x1):_0x247d43['slice'](0x0,-0x1),_0x8333c5=_0x4c0156?'':_0x247d43[_0x247d43['length']-0x1];let _0x451dce=_0x9d5050;const _0x5ed8ee={};for(const _0x5a236f of _0x2a0877){if(!_0x5a236f)continue;if(_0x451dce['children'][_0x5b88f8(0x36c)](_0x5a236f))_0x451dce=_0x451dce[_0x5b88f8(0x349)][_0x5b88f8(0x37d)](_0x5a236f);else{if(_0x451dce[_0x5b88f8(0x1ca)])_0x5ed8ee[_0x451dce[_0x5b88f8(0x1ca)][_0x5b88f8(0x1ac)]]=_0x5a236f,_0x451dce=_0x451dce[_0x5b88f8(0x1ca)][_0x5b88f8(0x2b5)];else return[];}}const _0x48189d=_0x2a0877[_0x5b88f8(0xfa)](Boolean),_0x553c73=_0x48189d[_0x5b88f8(0x387)]?_0x48189d[_0x5b88f8(0x37b)]('/')+'/':'',_0x207046=[];for(const [_0x382d12]of _0x451dce['children']){if(_0x382d12[_0x5b88f8(0x354)](_0x8333c5))_0x207046[_0x5b88f8(0xc4)](_0x553c73+_0x382d12);}if(_0x451dce['dynamic'])for(const _0x4922f4 of _0x1116c3(_0x451dce['dynamic'][_0x5b88f8(0x1ac)],_0x5ed8ee,_0x1c9967,_0x12997c)){if(String(_0x4922f4)[_0x5b88f8(0x354)](_0x8333c5))_0x207046[_0x5b88f8(0xc4)](_0x553c73+_0x4922f4);}return _0x207046[_0x5b88f8(0x1e5)](0x0,0x64);}const _0x4d362b=['help',_0x12f930(0x376),_0x12f930(0xb4),_0x12f930(0xea),_0x12f930(0x33d),_0x12f930(0x244),_0x12f930(0x359),_0x12f930(0x2c7),_0x12f930(0x3ab),_0x12f930(0x1f3)];function _0x3dad66(_0x313cbb,_0x4f142d,_0x21a235){return function _0x1a809e(_0x35c151){const _0x2707cf=_0x57c2;try{const _0xc242fb=_0x35c151[_0x2707cf(0x1af)](/\s[{[]/),_0x5294ba=_0xc242fb>=0x0?_0x35c151[_0x2707cf(0x1e5)](0x0,_0xc242fb):_0x35c151,_0xa2f90a=_0x5294ba[_0x2707cf(0xba)]();if(!_0xa2f90a){const _0x3fc3a3=[..._0x4d362b,...[..._0x313cbb['children'][_0x2707cf(0x18e)]()]]['slice'](0x0,0x64);return[_0x3fc3a3,''];}const _0x531818=_0xa2f90a[_0x2707cf(0x150)](/\s+/),_0x905bd8=_0x531818[0x0],_0x1c9267=_0x905bd8[_0x2707cf(0x2f9)]();if(_0x531818[_0x2707cf(0x387)]===0x1){const _0x2d5d8b=_0x905bd8[_0x2707cf(0x1f7)](),_0x31d7d1=_0x4d362b[_0x2707cf(0xfa)](_0x498eb8=>_0x498eb8[_0x2707cf(0x354)](_0x2d5d8b)),_0x5f0c27=_0xeb64c6(_0x905bd8,_0x313cbb,_0x4f142d,_0x21a235),_0x24fff1=[...new Set([..._0x31d7d1,..._0x5f0c27])][_0x2707cf(0x1e5)](0x0,0x64);return[_0x24fff1,_0x905bd8];}if(_0x118192['has'](_0x1c9267)&&_0x531818[_0x2707cf(0x387)]===0x2){const _0x16ce44=_0x531818[0x1],_0x5ec78c=_0xeb64c6(_0x16ce44,_0x313cbb,_0x4f142d,_0x21a235);return[_0x5ec78c['map'](_0x211676=>_0x905bd8+'\x20'+_0x211676),_0x905bd8+'\x20'+_0x16ce44];}if(!_0x118192[_0x2707cf(0x36c)](_0x1c9267)&&_0x531818[_0x2707cf(0x387)]>0x1){const _0xe6b41a=_0xeb64c6(_0x905bd8,_0x313cbb,_0x4f142d,_0x21a235),_0x552be7='\x20'+_0x531818[_0x2707cf(0x1e5)](0x1)[_0x2707cf(0x37b)]('\x20');return[_0xe6b41a['map'](_0x4752c9=>_0x4752c9+_0x552be7),_0x905bd8+_0x552be7];}return[[],_0x35c151];}catch{return[[],_0x35c151];}};}async function _0x5db5c6(_0x13f8b3,_0x4bdffc){const _0x213cc8=_0x12f930,_0x11c6b8={'enabled':!![],'level':_0x4bdffc['logLevel']??_0x213cc8(0x1f9)},_0x43691d={'env':_0x213cc8(0x1dc)},_0x188bfb={'current':null},_0x468466=_0x436769(_0x13f8b3[_0x213cc8(0x22c)][_0x213cc8(0x2d1)]()),_0x425040=_0x3dad66(_0x468466,_0x13f8b3,_0x43691d);_0x13f8b3['log']['attach'](_0x1c8930=>{const _0x14f3e2=_0x213cc8;if(!_0x11c6b8['enabled'])return;_0x40fa8c(_0x1c8930,_0x11c6b8[_0x14f3e2(0x306)]),_0x188bfb[_0x14f3e2(0xd0)]?.[_0x14f3e2(0x243)](!![]);}),_0x25ae6(_0x13f8b3,_0x4bdffc);const _0x48eb6a=_0x467618[_0x213cc8(0x303)]({'input':process['stdin'],'output':process['stdout'],'terminal':!![],'completer':_0x425040,'prompt':_0x59142d(_0x43691d),'historySize':_0x1e848f});try{const _0x13a014=_0x419024[_0x213cc8(0x25e)](_0x106980,_0x213cc8(0x234))[_0x213cc8(0x150)]('\x0a')['filter'](Boolean);_0x48eb6a[_0x213cc8(0x344)]=_0x13a014[_0x213cc8(0x1d5)]()[_0x213cc8(0x1e5)](0x0,_0x1e848f);}catch{}return _0x188bfb[_0x213cc8(0xd0)]=_0x48eb6a,_0x48eb6a['on'](_0x213cc8(0xd4),async _0x642c34=>{const _0x46deaa=_0x213cc8;_0x48eb6a[_0x46deaa(0x30a)]();try{await _0x356373(_0x642c34,_0x13f8b3,_0x4bdffc,_0x11c6b8,_0x43691d,_0x48eb6a);}catch(_0x58f8dd){console['error'](_0xcfca11(_0x3609e4[_0x46deaa(0x1a7)],_0x46deaa(0x346)+_0x58f8dd['message']));}finally{_0x48eb6a[_0x46deaa(0x199)](),_0x48eb6a['prompt']();}}),_0x48eb6a['on'](_0x213cc8(0x1a0),()=>{const _0x330072=_0x213cc8;try{const _0x2bbb7e=[..._0x48eb6a[_0x330072(0x344)]][_0x330072(0x1d5)]()[_0x330072(0xfa)](Boolean)[_0x330072(0x1e5)](0x0,_0x1e848f);_0x419024['writeFileSync'](_0x106980,_0x2bbb7e['join']('\x0a')+'\x0a');}catch{}_0x2d00b9(_0x13f8b3,0x0);}),process['on']('SIGINT',()=>{const _0x44f096=_0x213cc8;if(_0x48eb6a[_0x44f096(0xd4)]==='')_0x2d00b9(_0x13f8b3,0x0);else process[_0x44f096(0xfc)][_0x44f096(0x31e)]('\x0a'),_0x48eb6a[_0x44f096(0x178)](0x0),_0x48eb6a[_0x44f096(0x243)]();}),process['on'](_0x213cc8(0x18b),()=>_0x2d00b9(_0x13f8b3,0x0)),_0x48eb6a['prompt'](),_0x48eb6a;}return okdbShell={'start':_0x5db5c6,'colorLog':_0x40fa8c,'lenientParse':_0x255393,'_splitLine':_0x467528,'_formatRouteHelpLines':_0x3dd44b,'_routeSummary':_0x5af43c,'_routeTags':_0x1bf4c7},okdbShell;}var hasRequiredOkdb;function requireOkdb(){const _0x2bedfe=_0xecd54b;if(hasRequiredOkdb)return okdb$1;hasRequiredOkdb=0x1;try{process[_0x2bedfe(0x1b8)]();}catch{}const _0x1e1d6a=require$$3,_0x42261a=require$$1;function _0x30dbb1(_0x496701){const _0x5c599f=_0x2bedfe,_0x120045=_0x496701[_0x5c599f(0x1e5)](0x2),_0x5534e7={};let _0x47ccd5=0x0;while(_0x47ccd5<_0x120045[_0x5c599f(0x387)]){const _0x45e836=_0x120045[_0x47ccd5];if(_0x45e836===_0x5c599f(0x13d)||_0x45e836==='-p')_0x5534e7[_0x5c599f(0x2f1)]=Number(_0x120045[++_0x47ccd5]);else{if(_0x45e836===_0x5c599f(0x20f)||_0x45e836==='-d')_0x5534e7[_0x5c599f(0x25b)]=_0x120045[++_0x47ccd5];else{if(_0x45e836==='--key'||_0x45e836==='-k')_0x5534e7['key']=_0x120045[++_0x47ccd5];else{if(_0x45e836===_0x5c599f(0x319)||_0x45e836==='-c')_0x5534e7[_0x5c599f(0x180)]=_0x120045[++_0x47ccd5];else{if(_0x45e836==='--log-level')_0x5534e7[_0x5c599f(0x284)]=_0x120045[++_0x47ccd5];else{if(_0x45e836===_0x5c599f(0x2ac))_0x5534e7[_0x5c599f(0x2d0)]=!![];else{if(_0x45e836===_0x5c599f(0x2fb))_0x5534e7[_0x5c599f(0x163)]=!![];else{if(_0x45e836===_0x5c599f(0x3af)||_0x45e836==='-e')_0x5534e7[_0x5c599f(0xb4)]=_0x120045[++_0x47ccd5];else{if(_0x45e836===_0x5c599f(0xee))_0x5534e7[_0x5c599f(0x33d)]=_0x120045[++_0x47ccd5];else{if(_0x45e836===_0x5c599f(0xe2))_0x5534e7['changes']=!![];else{if(_0x45e836===_0x5c599f(0x297))_0x5534e7[_0x5c599f(0x236)]=!![];else{if(_0x45e836==='--drop')_0x5534e7[_0x5c599f(0x16f)]=!![];else{if(_0x45e836==='--open'){const _0x2fb8cc=[];while(_0x47ccd5+0x1<_0x120045['length']&&!_0x120045[_0x47ccd5+0x1][_0x5c599f(0x354)]('--')){_0x2fb8cc[_0x5c599f(0xc4)](_0x120045[++_0x47ccd5]);}_0x5534e7[_0x5c599f(0x2c7)]=_0x2fb8cc['length']>0x0?_0x2fb8cc:!![];}else{if(_0x45e836==='--log-requests')_0x5534e7['logRequests']=!![];else{if(_0x45e836===_0x5c599f(0x32f))_0x5534e7[_0x5c599f(0x17a)]=_0x120045[++_0x47ccd5];else{if(_0x45e836===_0x5c599f(0x289))_0x5534e7[_0x5c599f(0x336)]=_0x120045[++_0x47ccd5];else{if(_0x45e836===_0x5c599f(0x1fb))_0x5534e7[_0x5c599f(0x15e)]=_0x120045[++_0x47ccd5];else{if(_0x45e836==='--permissions')_0x5534e7[_0x5c599f(0x35e)]=_0x120045[++_0x47ccd5];else{if(_0x45e836===_0x5c599f(0xc5))_0x5534e7[_0x5c599f(0x104)]=_0x120045[++_0x47ccd5];else{if(_0x45e836===_0x5c599f(0x27d))_0x5534e7[_0x5c599f(0x28d)]=_0x120045[++_0x47ccd5];else{if(_0x45e836===_0x5c599f(0x2bf))_0x5534e7[_0x5c599f(0x1c3)]=_0x120045[++_0x47ccd5];else{if(_0x45e836===_0x5c599f(0x1c6)||_0x45e836==='-u')_0x5534e7[_0x5c599f(0x2e3)]=_0x120045[++_0x47ccd5];else{if(_0x45e836==='--address')_0x5534e7['selfAddress']=_0x120045[++_0x47ccd5];else{if(_0x45e836==='--version'||_0x45e836==='-v'){const _0x556e58=require$$2;console[_0x5c599f(0x172)](_0x556e58[_0x5c599f(0x302)]),process[_0x5c599f(0x3ab)](0x0);}else(_0x45e836==='--help'||_0x45e836==='-h')&&(_0x8d18e3(),process['exit'](0x0));}}}}}}}}}}}}}}}}}}}}}}}_0x47ccd5++;}return _0x5534e7;}function _0x8d18e3(){const _0x3f3354=_0x2bedfe;console[_0x3f3354(0x172)](_0x3f3354(0x3a0));}const _0x578f0a=new Set(['debug',_0x2bedfe(0x1f9),_0x2bedfe(0x2be),'error']);function _0x51c5ae(_0x30320b){const _0x4a2666=_0x2bedfe,_0x10fc6c=_0x30320b[_0x4a2666(0x180)]?_0x1e1d6a[_0x4a2666(0x383)](_0x30320b[_0x4a2666(0x180)]):_0x1e1d6a[_0x4a2666(0x383)]('.kdbconfig');let _0x2a280e={};if(_0x42261a[_0x4a2666(0x1b5)](_0x10fc6c))try{const _0xe8b936=_0x42261a[_0x4a2666(0x25e)](_0x10fc6c,_0x4a2666(0x234))[_0x4a2666(0x16d)](/^\uFEFF/,'');_0x2a280e=JSON[_0x4a2666(0x15a)](_0xe8b936),console['log'](_0x4a2666(0x228)+_0x10fc6c);}catch(_0x47ad6a){console[_0x4a2666(0x220)]('[okdb]\x20failed\x20to\x20parse\x20config\x20file\x20'+_0x10fc6c+':\x20'+_0x47ad6a[_0x4a2666(0xe8)]),process[_0x4a2666(0x3ab)](0x1);}const _0xeaa81b={'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},_0x751243={'port':_0x30320b[_0x4a2666(0x2f1)]??_0x2a280e[_0x4a2666(0x2f1)]??_0xeaa81b[_0x4a2666(0x2f1)]??0x2124,'dbPath':_0x30320b['path']??_0x2a280e[_0x4a2666(0x25b)]??_0xeaa81b[_0x4a2666(0x25b)]??_0x4a2666(0x221),'key':_0x30320b[_0x4a2666(0x36f)]??_0x2a280e[_0x4a2666(0x36f)]??_0xeaa81b['key']??undefined,'logLevel':_0x30320b[_0x4a2666(0x284)]??_0x2a280e[_0x4a2666(0x284)]??_0xeaa81b[_0x4a2666(0x284)]??_0x4a2666(0x1f9),'noRepl':_0x30320b['noRepl']??_0x2a280e[_0x4a2666(0x2d0)]??_0xeaa81b[_0x4a2666(0x2d0)]??![],'noAdmin':_0x30320b[_0x4a2666(0x163)]??_0x2a280e[_0x4a2666(0x163)]??_0xeaa81b['noAdmin']??![],'admin':_0x2a280e[_0x4a2666(0xde)]??{},'api':_0x2a280e[_0x4a2666(0x165)]??undefined,'auth':_0x2a280e[_0x4a2666(0x321)]??undefined,'mcp':_0x2a280e[_0x4a2666(0x100)]??undefined,'timeMachine':_0x2a280e[_0x4a2666(0xbc)]!==![]?_0x2a280e[_0x4a2666(0xbc)]??{}:![]};return _0x30320b[_0x4a2666(0x2c7)]!==undefined&&(_0x751243[_0x4a2666(0x321)]=_0x751243['auth']||{},_0x751243[_0x4a2666(0x321)][_0x4a2666(0x2c7)]=_0x30320b[_0x4a2666(0x2c7)]),_0x30320b['logRequests']&&(_0x751243[_0x4a2666(0xf6)]=_0x751243[_0x4a2666(0xf6)]||{},_0x751243['debug']['logRequests']=!![]),(!Number[_0x4a2666(0x1f0)](_0x751243[_0x4a2666(0x2f1)])||_0x751243[_0x4a2666(0x2f1)]<0x1||_0x751243['port']>0xffff)&&(console[_0x4a2666(0x220)](_0x4a2666(0x143)+_0x751243[_0x4a2666(0x2f1)]+_0x4a2666(0x24b)),process[_0x4a2666(0x3ab)](0x1)),!_0x578f0a['has'](_0x751243[_0x4a2666(0x284)])&&(console[_0x4a2666(0x220)]('[okdb]\x20invalid\x20log\x20level:\x20\x22'+_0x751243[_0x4a2666(0x284)]+'\x22\x20(must\x20be\x20debug|info|warn|error)'),process[_0x4a2666(0x3ab)](0x1)),_0x751243;}function _0x567231(_0x368925){const _0x1b756a=_0x2bedfe;return!!(_0x368925&&typeof _0x368925===_0x1b756a(0x378)&&!Array[_0x1b756a(0x31a)](_0x368925)&&Object[_0x1b756a(0x18e)](_0x368925)[_0x1b756a(0x387)]>0x0);}const _0x4fe0cd=!process['stdout']['isTTY']||!!process.env.NO_COLOR;function _0x452774(_0x5cb5b9,_0x12c668){const _0x9372b8=_0x2bedfe;return _0x4fe0cd?_0x12c668:'\x1b['+_0x5cb5b9+'m'+_0x12c668+_0x9372b8(0x18f);}function _0x3b6597(_0x51e6da){const _0x1b2e15=_0x2bedfe;if(!_0x51e6da||_0x51e6da['length']===0x0)return;const _0x213247='─'['repeat'](0x38);process[_0x1b2e15(0x185)][_0x1b2e15(0x31e)]('\x0a'),process[_0x1b2e15(0x185)]['write'](_0x452774('33',_0x1b2e15(0x2b9)+_0x51e6da['length']+_0x1b2e15(0x125)+(_0x51e6da[_0x1b2e15(0x387)]>0x1?'S':'')+'\x0a')),process[_0x1b2e15(0x185)][_0x1b2e15(0x31e)]('\x20\x20'+_0x213247+'\x0a');for(const _0x9c04e1 of _0x51e6da){const _0x436928=_0x9c04e1[_0x1b2e15(0x306)]===_0x1b2e15(0x220)?_0x452774('31',_0x1b2e15(0x14a)):_0x452774('33',_0x1b2e15(0x254));process[_0x1b2e15(0x185)][_0x1b2e15(0x31e)](_0x436928+'\x20\x20'+_0x452774('1',_0x9c04e1[_0x1b2e15(0x2d7)])+'\x0a'),process[_0x1b2e15(0x185)][_0x1b2e15(0x31e)](_0x1b2e15(0x36e)+_0x9c04e1['message']+'\x0a');if(_0x9c04e1[_0x1b2e15(0x1d7)])process[_0x1b2e15(0x185)][_0x1b2e15(0x31e)](_0x1b2e15(0x36e)+_0x452774('2',_0x1b2e15(0x2d4)+_0x9c04e1[_0x1b2e15(0x1d7)])+'\x0a');process['stderr'][_0x1b2e15(0x31e)]('\x0a');}process[_0x1b2e15(0x185)][_0x1b2e15(0x31e)]('\x20\x20'+_0x213247+'\x0a\x0a');}function _0x1abd0e(_0x301f60,_0x2d5781){const _0x3f4430=_0x2bedfe,_0x50ace7=_0x301f60[_0x3f4430(0x22c)][_0x3f4430(0x2e5)](_0x2d5781);return new Promise((_0x6d7f9b,_0x155386)=>{const _0x339ee7=_0x3f4430;_0x50ace7[_0x339ee7(0x14b)](_0x339ee7(0x111),_0x6d7f9b),_0x50ace7['once'](_0x339ee7(0x220),_0x155386);});}async function _0x467ec2(_0x461630){const _0x32e255=_0x2bedfe,_0x2d43ee=require$$3$1;console['log']('\x0a\x20\x20okdb\x20doctor\x0a');let _0x45e2d1=!![];const _0x463cfa=(_0x1489ef,_0x168c14)=>{const _0x35bfef=_0x57c2;console[_0x35bfef(0x172)]('\x20\x20'+(_0x1489ef?'✓':'✗')+'\x20'+_0x168c14);if(!_0x1489ef)_0x45e2d1=![];},_0x23f34d=Number(process[_0x32e255(0x302)][_0x32e255(0x16d)]('v','')[_0x32e255(0x150)]('.')[0x0]);_0x463cfa(_0x23f34d>=0x12,'node\x20'+process[_0x32e255(0x302)]+(_0x23f34d<0x12?_0x32e255(0x1be):''));const _0x107b98=_0x1e1d6a[_0x32e255(0x383)](_0x461630[_0x32e255(0x1eb)]);try{_0x42261a[_0x32e255(0x1da)](_0x107b98,{'recursive':!![]});const _0x2acf11=_0x1e1d6a[_0x32e255(0x37b)](_0x107b98,_0x32e255(0x389));_0x42261a['writeFileSync'](_0x2acf11,''),_0x42261a[_0x32e255(0x32a)](_0x2acf11),_0x463cfa(!![],_0x32e255(0x2ce)+_0x107b98);}catch(_0x3d2041){_0x463cfa(![],_0x32e255(0x2ef)+_0x107b98+'\x20\x20('+_0x3d2041['message']+')');}const _0x43e8ff=await new Promise(_0x1ee155=>{const _0x312158=_0x32e255,_0x301e82=_0x2d43ee[_0x312158(0xf0)]();_0x301e82[_0x312158(0x14b)](_0x312158(0x220),()=>_0x1ee155(![])),_0x301e82[_0x312158(0x14b)](_0x312158(0x111),()=>{const _0x6152a0=_0x312158;_0x301e82[_0x6152a0(0x1a0)](),_0x1ee155(!![]);}),_0x301e82['listen'](_0x461630[_0x312158(0x2f1)],_0x312158(0x147));});_0x463cfa(_0x43e8ff,_0x32e255(0x333)+_0x461630[_0x32e255(0x2f1)]+'\x20'+(_0x43e8ff?'available':_0x32e255(0x1b4)));const _0x64560a=_0x1e1d6a[_0x32e255(0x383)](_0x32e255(0xbf));if(_0x42261a['existsSync'](_0x64560a))try{JSON[_0x32e255(0x15a)](_0x42261a[_0x32e255(0x25e)](_0x64560a,'utf8')[_0x32e255(0x16d)](/^\uFEFF/,'')),_0x463cfa(!![],_0x32e255(0x15c)+_0x64560a);}catch(_0x3d5a02){_0x463cfa(![],'config\x20file\x20invalid:\x20'+_0x3d5a02['message']);}else _0x463cfa(!![],_0x32e255(0x12d));console[_0x32e255(0x172)](''),_0x45e2d1?console[_0x32e255(0x172)](_0x32e255(0x1e4)):(console[_0x32e255(0x172)](_0x32e255(0x19d)),process['exit'](0x1));}async function _0x432867(){const _0x5e458c=_0x2bedfe,_0x1f7c19=_0x1e1d6a[_0x5e458c(0x383)](_0x5e458c(0xbf));!_0x42261a[_0x5e458c(0x1b5)](_0x1f7c19)?(_0x42261a[_0x5e458c(0xef)](_0x1f7c19,JSON[_0x5e458c(0x2d2)]({'port':0x2124,'path':_0x5e458c(0x221),'logLevel':_0x5e458c(0x1f9),'noRepl':![],'noAdmin':![]},null,0x2)+'\x0a'),console[_0x5e458c(0x172)]('[okdb]\x20created\x20.kdbconfig')):console[_0x5e458c(0x172)]('[okdb]\x20.kdbconfig\x20already\x20exists\x20—\x20skipping');const _0x4c5211=_0x1e1d6a[_0x5e458c(0x383)](_0x5e458c(0x221));!_0x42261a[_0x5e458c(0x1b5)](_0x4c5211)?(_0x42261a['mkdirSync'](_0x4c5211,{'recursive':!![]}),console[_0x5e458c(0x172)](_0x5e458c(0x22a))):console[_0x5e458c(0x172)](_0x5e458c(0x11c)),console['log']('\x0a\x20\x20Run\x20okdb\x20to\x20start\x20the\x20server.\x0a');}async function _0x219593(_0x399c3f){const _0x166dc3=_0x2bedfe,_0x489b6d=_0x1e1d6a['resolve'](_0x399c3f[_0x166dc3(0x1eb)]);if(!_0x42261a['existsSync'](_0x489b6d)){console[_0x166dc3(0x172)]('[okdb]\x20nothing\x20to\x20reset\x20—\x20'+_0x489b6d+'\x20does\x20not\x20exist');return;}const _0x31cf1a=require$$0$2,_0x3c984a=_0x31cf1a['createInterface']({'input':process[_0x166dc3(0x1b1)],'output':process[_0x166dc3(0xfc)]}),_0x1f27bf=await new Promise(_0x566545=>_0x3c984a[_0x166dc3(0xeb)](_0x166dc3(0x235)+_0x489b6d+_0x166dc3(0xbd),_0x566545));_0x3c984a[_0x166dc3(0x1a0)](),console[_0x166dc3(0x172)]('');if(_0x1f27bf[_0x166dc3(0x2c9)]()[_0x166dc3(0x1f7)]()!==_0x166dc3(0xf4)){console[_0x166dc3(0x172)](_0x166dc3(0x1e1));return;}_0x42261a[_0x166dc3(0x312)](_0x489b6d,{'recursive':!![],'force':!![]}),console[_0x166dc3(0x172)](_0x166dc3(0x326)+_0x489b6d+_0x166dc3(0x161));}async function _0x2a40e2(_0x33ff7d,_0x17e978){const _0x19a43a=_0x2bedfe,_0x512327=require$$5,_0x3bfb44=_0x1e1d6a[_0x19a43a(0x383)](_0x17e978[_0x19a43a(0x1eb)]);console[_0x19a43a(0x172)](_0x19a43a(0x1c2)+_0x3bfb44+'…');const _0x405052=new _0x512327(_0x3bfb44,_0x17e978[_0x19a43a(0x36f)]?{'encryptionKey':_0x17e978[_0x19a43a(0x36f)]}:{});await _0x405052[_0x19a43a(0x2c7)](),console[_0x19a43a(0x172)](_0x19a43a(0x2e4)+_0x33ff7d+'…');const {envs:_0xfed159}=await _0x405052['migrate'][_0x19a43a(0x1aa)](_0x33ff7d);for(const _0x10b879 of _0xfed159){const _0x157255=_0x10b879[_0x19a43a(0x13b)]>0x0?_0x19a43a(0x25d)+(_0x10b879[_0x19a43a(0x13b)]/0x400/0x400)[_0x19a43a(0x272)](0x2)+_0x19a43a(0xc1)+(_0x10b879[_0x19a43a(0x34a)]/0x400/0x400)['toFixed'](0x2)+_0x19a43a(0x268):'';console['log']('\x20\x20✓\x20'+_0x10b879[_0x19a43a(0x17a)]+_0x19a43a(0x38d)+_0x10b879[_0x19a43a(0x1ea)]+_0x157255);}await _0x405052[_0x19a43a(0x1a0)](),console[_0x19a43a(0x172)]('[okdb]\x20backup\x20complete');}async function _0x43ef91(_0x14ddc6,_0x437d23,_0x4e86bf){const _0x33d31a=_0x2bedfe,_0x1840d2=require$$5,_0x922b07=_0x1e1d6a[_0x33d31a(0x383)](_0x437d23[_0x33d31a(0x1eb)]),_0x1326a2=_0x4e86bf[_0x33d31a(0xb4)]??_0x33d31a(0x1dc),_0x145e90=_0x4e86bf['types']?_0x4e86bf['types']['split'](',')[_0x33d31a(0xce)](_0x19f1a4=>_0x19f1a4[_0x33d31a(0x2c9)]()):null;console[_0x33d31a(0x172)](_0x33d31a(0x1c2)+_0x922b07+'…');const _0x31a51e=new _0x1840d2(_0x922b07,_0x437d23[_0x33d31a(0x36f)]?{'encryptionKey':_0x437d23['key']}:{});await _0x31a51e['open'](),console[_0x33d31a(0x172)]('[okdb]\x20exporting\x20env\x20\x22'+_0x1326a2+_0x33d31a(0x22b)+_0x14ddc6+'…');const _0x2b8e3d=await _0x31a51e['migrate'][_0x33d31a(0x179)](_0x14ddc6,{'envName':_0x1326a2,'types':_0x145e90,'includeChanges':!!_0x4e86bf[_0x33d31a(0x365)]});console[_0x33d31a(0x172)](_0x33d31a(0xdb)+_0x2b8e3d[_0x33d31a(0x33d)]+_0x33d31a(0x10e)+_0x2b8e3d[_0x33d31a(0x2cd)]+'\x20\x20changes='+_0x2b8e3d[_0x33d31a(0x365)]);if(_0x4e86bf['blobs']){const _0x2dec12=_0x1e1d6a[_0x33d31a(0x37b)](_0x1e1d6a[_0x33d31a(0x126)](_0x14ddc6),_0x33d31a(0x236));process[_0x33d31a(0xfc)][_0x33d31a(0x31e)](_0x33d31a(0x181));const {count:_0x30fae9,bytes:_0x150310}=await _0x31a51e['migrate'][_0x33d31a(0x2a6)](_0x2dec12);console[_0x33d31a(0x172)](_0x33d31a(0x189)+_0x2dec12+_0x33d31a(0x25d)+_0x30fae9+_0x33d31a(0x1db)+(_0x30fae9!==0x1?'s':'')+',\x20'+(_0x150310/0x400/0x400)[_0x33d31a(0x272)](0x2)+_0x33d31a(0x268));}await _0x31a51e['close'](),console[_0x33d31a(0x172)]('[okdb]\x20export\x20complete');}async function _0x25e278(_0x1438a9,_0x131b8c,_0x1cf061){const _0x12c047=_0x2bedfe,_0x5e48fa=require$$5,_0x1a96e4=_0x1e1d6a[_0x12c047(0x383)](_0x131b8c[_0x12c047(0x1eb)]),_0xb9ca81=_0x1cf061[_0x12c047(0xb4)]??null,_0x2589a0=_0x1cf061[_0x12c047(0x33d)]?_0x1cf061[_0x12c047(0x33d)]['split'](',')[_0x12c047(0xce)](_0x5aa576=>_0x5aa576[_0x12c047(0x2c9)]()):null,_0x142373=!!_0x1cf061['drop'];console[_0x12c047(0x172)](_0x12c047(0x1c2)+_0x1a96e4+'…');const _0x10ddb9=new _0x5e48fa(_0x1a96e4,_0x131b8c[_0x12c047(0x36f)]?{'encryptionKey':_0x131b8c[_0x12c047(0x36f)]}:{});await _0x10ddb9[_0x12c047(0x2c7)](),console[_0x12c047(0x172)]('[okdb]\x20importing\x20'+_0x1438a9+'…');const _0x1a0344=await _0x10ddb9[_0x12c047(0x1e3)]['importFromFile'](_0x1438a9,{'envName':_0xb9ca81,'types':_0x2589a0,'dropExisting':_0x142373,'includeChanges':!!_0x1cf061[_0x12c047(0x365)],'onProgress':({type:_0x267059,count:_0x3129fb})=>{const _0x4f1295=_0x12c047;process[_0x4f1295(0xfc)]['write'](_0x4f1295(0x204)+_0x267059+':\x20'+_0x3129fb+_0x4f1295(0xf9));}});process[_0x12c047(0xfc)][_0x12c047(0x31e)]('\x0a'),console['log'](_0x12c047(0x3b3)+_0x1a0344['types']+_0x12c047(0x10e)+_0x1a0344[_0x12c047(0x2cd)]+_0x12c047(0x200)+_0x1a0344['changes']);if(_0x1cf061[_0x12c047(0x236)]){const _0x4c75f5=_0x1e1d6a[_0x12c047(0x37b)](_0x1e1d6a['dirname'](_0x1438a9),_0x12c047(0x236));if(_0x42261a[_0x12c047(0x1b5)](_0x4c75f5)){const {imported:_0x5a92fe,skipped:_0x3e0ac4}=await _0x10ddb9[_0x12c047(0x1e3)]['importBlobs'](_0x4c75f5);console[_0x12c047(0x172)]('[okdb]\x20blobs:\x20imported='+_0x5a92fe+_0x12c047(0x246)+_0x3e0ac4);}}await _0x10ddb9['close'](),console[_0x12c047(0x172)]('[okdb]\x20import\x20complete');}async function _0x4102df(_0x16cdf9,_0x3df051){const _0x56eb9c=_0x2bedfe;_0x3df051[_0x56eb9c(0x336)]&&!_0x3df051[_0x56eb9c(0x17a)]&&(console['error'](_0x56eb9c(0x39b)),process[_0x56eb9c(0x3ab)](0x1));const _0xf4425b=_0x3df051[_0x56eb9c(0x35e)]?_0x3df051[_0x56eb9c(0x35e)][_0x56eb9c(0x150)](',')[_0x56eb9c(0xce)](_0x5c0cd4=>_0x5c0cd4[_0x56eb9c(0x2c9)]())[_0x56eb9c(0xfa)](Boolean):[];let _0x56697e={};if(_0x3df051[_0x56eb9c(0x104)])try{_0x56697e=JSON[_0x56eb9c(0x15a)](_0x3df051[_0x56eb9c(0x104)]);if(typeof _0x56697e!=='object'||Array[_0x56eb9c(0x31a)](_0x56697e)||_0x56697e===null)throw new Error();}catch{console[_0x56eb9c(0x220)]('[okdb]\x20error:\x20--grants\x20must\x20be\x20valid\x20JSON\x20object'),process[_0x56eb9c(0x3ab)](0x1);}const _0x233a0b=require$$5,{randomToken:_0x15427b,hashToken:_0x21e130,hashPassword:_0x5cb585}=requireOkdbAuthTokens(),_0x1644ef=require$$0,_0x4641d3=_0x1e1d6a[_0x56eb9c(0x383)](_0x16cdf9[_0x56eb9c(0x1eb)]),_0x3aca5c=new _0x233a0b(_0x4641d3,_0x16cdf9[_0x56eb9c(0x36f)]?{'encryptionKey':_0x16cdf9['key']}:{});await _0x3aca5c[_0x56eb9c(0x2c7)]();try{await _0x3aca5c[_0x56eb9c(0x321)]['_ensureTokensType']();if(_0x3df051[_0x56eb9c(0x17a)]){const _0x139171=await _0x3aca5c['auth']['_lookupByName'](_0x3df051['name']);_0x139171&&(console[_0x56eb9c(0x220)](_0x56eb9c(0x384)+_0x3df051[_0x56eb9c(0x17a)]+_0x56eb9c(0xe5)),process[_0x56eb9c(0x3ab)](0x1));}const _0x4d4d39=_0x15427b(0x20),_0x339083=_0x21e130(_0x4d4d39),_0x4706ff=_0x3df051[_0x56eb9c(0x336)]?await _0x5cb585(_0x3df051['password']):null,_0x4b146e=_0x1644ef[_0x56eb9c(0x29a)](),_0x32181e={'tokenHash':_0x339083,'name':_0x3df051[_0x56eb9c(0x17a)]||null,'passwordHash':_0x4706ff,'label':_0x3df051[_0x56eb9c(0x15e)]||null,'permissions':_0xf4425b,'grants':_0x56697e,'createdAt':Date[_0x56eb9c(0x1bf)](),'lastUsedAt':null},_0x28769f=_0x3df051[_0x56eb9c(0x28d)]?{'ttl':Number(_0x3df051[_0x56eb9c(0x28d)])}:undefined;await _0x3aca5c[_0x56eb9c(0x395)][_0x56eb9c(0x394)](_0x56eb9c(0x1d9),_0x4b146e,_0x32181e,_0x28769f),console[_0x56eb9c(0x172)](_0x56eb9c(0x16b)),console['log']('\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x4b146e),console[_0x56eb9c(0x172)](_0x56eb9c(0x315)+(_0x3df051[_0x56eb9c(0x17a)]||_0x56eb9c(0x131))),console['log'](_0x56eb9c(0x3b0)+(_0x3df051[_0x56eb9c(0x15e)]||'(unset)')),console[_0x56eb9c(0x172)](_0x56eb9c(0x322)+(_0xf4425b[_0x56eb9c(0x37b)](',\x20')||_0x56eb9c(0x2c8))),console['log'](_0x56eb9c(0x357)),console['log'](_0x56eb9c(0x2e9)+_0x4d4d39+'\x0a');}finally{await _0x3aca5c['close']();}}async function _0x1d0633(_0x71e712){const _0x4b8143=_0x2bedfe,_0x45e208=require$$5,_0x2929bf=_0x1e1d6a[_0x4b8143(0x383)](_0x71e712[_0x4b8143(0x1eb)]),_0x475f4c=new _0x45e208(_0x2929bf,_0x71e712[_0x4b8143(0x36f)]?{'encryptionKey':_0x71e712[_0x4b8143(0x36f)]}:{});await _0x475f4c['open']();try{const _0x31dc4e=_0x475f4c[_0x4b8143(0x395)];if(!_0x31dc4e||!_0x31dc4e[_0x4b8143(0x3a8)]('~tokens')){console[_0x4b8143(0x172)](_0x4b8143(0x106));return;}const _0x34ee4f=[];for(const {key:_0x3eac03,value:_0x115bc3}of _0x31dc4e[_0x4b8143(0x129)]('~tokens')){_0x34ee4f['push']({'id':_0x3eac03,'name':_0x115bc3[_0x4b8143(0x17a)]||_0x4b8143(0x131),'label':_0x115bc3['label']||_0x4b8143(0x131),'permissions':Array[_0x4b8143(0x31a)](_0x115bc3[_0x4b8143(0x35e)])?_0x115bc3[_0x4b8143(0x35e)][_0x4b8143(0x37b)](','):'','created':_0x115bc3[_0x4b8143(0x10f)]?new Date(_0x115bc3[_0x4b8143(0x10f)])[_0x4b8143(0xf1)]()[_0x4b8143(0x1e5)](0x0,0xa):''});}if(_0x34ee4f[_0x4b8143(0x387)]===0x0){console[_0x4b8143(0x172)]('No\x20tokens.');return;}const _0x530940=!process['stdout'][_0x4b8143(0x2a5)]||process[_0x4b8143(0xfc)][_0x4b8143(0x2a5)]>=0x64,_0xd2120e=_0x530940?0x24:0xa,_0x9f9ab9=['ID'[_0x4b8143(0x2a9)](_0xd2120e),_0x4b8143(0x1d4)[_0x4b8143(0x2a9)](0x10),_0x4b8143(0x260)[_0x4b8143(0x2a9)](0x14),'PERMISSIONS'[_0x4b8143(0x2a9)](0x14),'CREATED'][_0x4b8143(0x37b)]('\x20\x20');console[_0x4b8143(0x172)]('\x0a'+_0x9f9ab9),console[_0x4b8143(0x172)]('-'[_0x4b8143(0x334)](_0x9f9ab9[_0x4b8143(0x387)]));for(const _0xd93aa3 of _0x34ee4f){const _0x154438=_0x530940?_0xd93aa3['id']:_0xd93aa3['id'][_0x4b8143(0x1e5)](0x0,0x8)+'…';console[_0x4b8143(0x172)]([_0x154438['padEnd'](_0xd2120e),_0xd93aa3[_0x4b8143(0x17a)][_0x4b8143(0x1e5)](0x0,0x10)[_0x4b8143(0x2a9)](0x10),_0xd93aa3[_0x4b8143(0x15e)][_0x4b8143(0x1e5)](0x0,0x14)['padEnd'](0x14),_0xd93aa3[_0x4b8143(0x35e)][_0x4b8143(0x1e5)](0x0,0x14)['padEnd'](0x14),_0xd93aa3[_0x4b8143(0x38a)]][_0x4b8143(0x37b)]('\x20\x20'));}console['log']('');}finally{await _0x475f4c[_0x4b8143(0x1a0)]();}}async function _0x36d10b(_0xe7815a,_0x14c6c6){const _0x326d81=_0x2bedfe;!_0xe7815a&&(console['error'](_0x326d81(0x279)),process[_0x326d81(0x3ab)](0x1));const _0x550ec2=require$$5,_0x3aa496=_0x1e1d6a[_0x326d81(0x383)](_0x14c6c6[_0x326d81(0x1eb)]),_0x4980f9=new _0x550ec2(_0x3aa496,_0x14c6c6[_0x326d81(0x36f)]?{'encryptionKey':_0x14c6c6[_0x326d81(0x36f)]}:{});await _0x4980f9[_0x326d81(0x2c7)]();try{const _0x55f937=_0x4980f9[_0x326d81(0x395)];(!_0x55f937||!_0x55f937[_0x326d81(0x3a8)](_0x326d81(0x1d9)))&&(console[_0x326d81(0x220)](_0x326d81(0x183)+_0xe7815a+'\x22'),process[_0x326d81(0x3ab)](0x1));let _0x55219d=null,_0x2d4cbd=null;const _0x2ef453=_0x55f937['get'](_0x326d81(0x1d9),_0xe7815a);if(_0x2ef453)_0x55219d=_0xe7815a,_0x2d4cbd=_0x2ef453;else{const _0x1f2dac=[];for(const {key:_0x549e8e,value:_0x27777a}of _0x55f937['getRange'](_0x326d81(0x1d9))){if(_0x549e8e['startsWith'](_0xe7815a))_0x1f2dac['push']({'key':_0x549e8e,'value':_0x27777a});}_0x1f2dac['length']===0x0&&(console[_0x326d81(0x220)](_0x326d81(0x183)+_0xe7815a+'\x22'),process['exit'](0x1));if(_0x1f2dac[_0x326d81(0x387)]>0x1){console[_0x326d81(0x220)](_0x326d81(0x1b3)+_0xe7815a+_0x326d81(0x305)+_0x1f2dac['length']+_0x326d81(0x399));for(const _0x3baa55 of _0x1f2dac){console[_0x326d81(0x220)]('\x20\x20'+_0x3baa55[_0x326d81(0x36f)]+_0x326d81(0x18d)+(_0x3baa55['value'][_0x326d81(0x17a)]||_0x326d81(0x131))+')');}process[_0x326d81(0x3ab)](0x1);}_0x55219d=_0x1f2dac[0x0][_0x326d81(0x36f)],_0x2d4cbd=_0x1f2dac[0x0][_0x326d81(0x377)];}await _0x55f937[_0x326d81(0x335)]('~tokens',_0x55219d),console[_0x326d81(0x172)](_0x326d81(0x30b)+_0x55219d+'\x20\x20(name:\x20'+(_0x2d4cbd['name']||'(unset)')+_0x326d81(0x151)+(_0x2d4cbd[_0x326d81(0x15e)]||_0x326d81(0x131))+')');}finally{await _0x4980f9[_0x326d81(0x1a0)]();}}function _0x576bcb(_0x5f4bbd,_0x49e99d){const _0x291f18=_0x2bedfe;if(!_0x5f4bbd[_0x291f18(0x175)])return _0x291f18(0x1d6);const _0x4301eb=_0x5f4bbd[_0x291f18(0x26e)];if(!_0x4301eb)return'active';if(_0x49e99d>_0x4301eb)return'expired';return _0x291f18(0x1ce);}function _0x39d4ec(_0x3063c2){const _0x2ef751=_0x2bedfe;if(!_0x3063c2||typeof _0x3063c2!==_0x2ef751(0x378))return'';const _0xff6bc1=Object[_0x2ef751(0x274)](_0x3063c2)[_0x2ef751(0xfa)](([,_0x4fb6fa])=>_0x4fb6fa)['map'](([_0x24e015])=>_0x24e015);if(_0xff6bc1[_0x2ef751(0x387)]===0x0)return _0x2ef751(0x2c8);if(_0xff6bc1[_0x2ef751(0x387)]<=0x3)return _0xff6bc1['join']('\x20');return _0xff6bc1[_0x2ef751(0x1e5)](0x0,0x3)[_0x2ef751(0x37b)]('\x20')+('\x20+'+(_0xff6bc1[_0x2ef751(0x387)]-0x3));}async function _0x2c0425(_0x1392a2){const _0x177891=_0x2bedfe,_0x345815=require$$5,_0x31bf36=requireOkdbLicenseCodec(),{_C:_0x29bb4c}=requireOkdbLicense(),_0x539bac=_0x1e1d6a[_0x177891(0x383)](_0x1392a2[_0x177891(0x1eb)]),_0x337c78=new _0x345815(_0x539bac,_0x1392a2[_0x177891(0x36f)]?{'encryptionKey':_0x1392a2[_0x177891(0x36f)]}:{});await _0x337c78['open']();try{const _0xc9d5ca=_0x337c78[_0x177891(0x395)],_0x147b6a=_0xc9d5ca?.['db']?.[_0x177891(0x37d)]?.(_0x177891(0x133))??0x0,_0x2b3944=[..._0x337c78['_envs'][_0x177891(0x18e)]()][_0x177891(0xfa)](_0x17c45f=>!_0x17c45f[_0x177891(0x354)]('~'))[_0x177891(0x387)],_0x3e4d06=_0x337c78[_0x177891(0x2b2)]?.['effective'];if(_0x3e4d06){const _0x265b49=_0x3e4d06['_isFree']===!![],_0x4c193c=_0x265b49?_0x177891(0x140):_0x337c78['_license'][_0x177891(0x1ce)]?.['licensee']||'licensed';console[_0x177891(0x172)](''),console[_0x177891(0x172)](_0x177891(0x1ed)+_0x4c193c);const _0x313f36=_0x3e4d06[_0x177891(0x30d)]||{};if(_0x313f36['maxWrites']){const _0x105a64=Math['round'](_0x147b6a/_0x313f36[_0x177891(0xff)]*0x64);console['log'](_0x177891(0x15d)+_0x147b6a[_0x177891(0x298)]()+_0x177891(0x258)+_0x313f36[_0x177891(0xff)]['toLocaleString']()+_0x177891(0x25d)+_0x105a64+'%)');}else console[_0x177891(0x172)]('\x20\x20Writes:\x20\x20'+_0x147b6a['toLocaleString']());_0x313f36[_0x177891(0xea)]?console[_0x177891(0x172)]('\x20\x20Envs:\x20\x20\x20\x20'+_0x2b3944+_0x177891(0x258)+_0x313f36[_0x177891(0xea)]):console[_0x177891(0x172)](_0x177891(0xdd)+_0x2b3944),_0x29bb4c?.[_0x177891(0x195)]&&console[_0x177891(0x172)]('\x20\x20Build:\x20\x20\x20key\x20fingerprint\x20'+_0x29bb4c[_0x177891(0x195)]+_0x177891(0x280));}if(!_0xc9d5ca||!_0xc9d5ca[_0x177891(0x3a8)](_0x177891(0x347))){console[_0x177891(0x172)](''),console[_0x177891(0x172)]('\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.'),console[_0x177891(0x172)]('');return;}const _0x2bdf8f=[],_0x3074db=Date[_0x177891(0x1bf)](),_0x3f4420=_0x337c78['id'],_0x227e16=_0x177891(0x35f);for(const {key:_0x1fc68d,value:_0x8898ae}of _0xc9d5ca[_0x177891(0x129)](_0x177891(0x347))){const _0x471bf3=_0x8898ae[_0x177891(0x1a2)]?Buffer['from'](_0x8898ae['_licenseHash'],_0x177891(0x10d)):Buffer[_0x177891(0x38f)](0x8);let _0x17167c='';try{_0x17167c=_0x31bf36['derivePin'](_0x3f4420,_0x471bf3,_0x227e16)[_0x177891(0x10c)];}catch{}_0x2bdf8f[_0x177891(0xc4)]({'id':_0x1fc68d,'licensee':_0x8898ae[_0x177891(0x1ba)]||'','expires':_0x8898ae['expiresAt']?new Date(_0x8898ae['expiresAt'])[_0x177891(0xf1)]()[_0x177891(0x1e5)](0x0,0xa):'','features':_0x39d4ec(_0x8898ae[_0x177891(0x329)]),'pin':_0x17167c,'status':_0x576bcb(_0x8898ae,_0x3074db)});}if(_0x2bdf8f['length']===0x0){console[_0x177891(0x172)](''),console['log']('\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.'),console[_0x177891(0x172)]('');return;}const _0x3c7634=['\x20\x20'+'ID'['padEnd'](0xe),_0x177891(0x265)[_0x177891(0x2a9)](0xe),_0x177891(0x39e)['padEnd'](0xc),_0x177891(0x249)[_0x177891(0x2a9)](0x1e),_0x177891(0x391)[_0x177891(0x2a9)](0xa),'STATUS']['join']('\x20');console[_0x177891(0x172)]('\x0a'+_0x3c7634);for(const _0x1f2c72 of _0x2bdf8f){const _0x50f0de=_0x1f2c72['id'][_0x177891(0x1e5)](0x0,0x8)+'…';console[_0x177891(0x172)](['\x20\x20'+_0x50f0de[_0x177891(0x2a9)](0xe),_0x1f2c72[_0x177891(0x1ba)][_0x177891(0x1e5)](0x0,0xe)['padEnd'](0xe),_0x1f2c72[_0x177891(0xb7)][_0x177891(0x2a9)](0xc),_0x1f2c72[_0x177891(0x329)][_0x177891(0x1e5)](0x0,0x1e)[_0x177891(0x2a9)](0x1e),_0x1f2c72['pin'][_0x177891(0x2a9)](0xa),_0x1f2c72[_0x177891(0x248)]][_0x177891(0x37b)]('\x20'));}console[_0x177891(0x172)]('');}finally{await _0x337c78[_0x177891(0x1a0)]();}}async function _0x38e926(_0x5c1a55,_0x1b6f39){const _0x2539a6=_0x2bedfe,_0x49934a=require$$5,_0x1b9917=requireOkdbLicenseCodec();let _0xdf3621=_0x5c1a55;(_0x1b9917['detectInputType'](_0x5c1a55)===_0x2539a6(0x25b)||_0x42261a['existsSync'](_0x5c1a55)&&_0x42261a['statSync'](_0x5c1a55)[_0x2539a6(0x3b2)]())&&(_0xdf3621=_0x42261a[_0x2539a6(0x25e)](_0x5c1a55,_0x2539a6(0x234))[_0x2539a6(0x2c9)]());const _0x1ef986=_0x1e1d6a['resolve'](_0x1b6f39['dbPath']),_0x530c89=new _0x49934a(_0x1ef986,_0x1b6f39[_0x2539a6(0x36f)]?{'encryptionKey':_0x1b6f39['key']}:{});await _0x530c89[_0x2539a6(0x2c7)]();try{!_0x530c89[_0x2539a6(0x2b2)]&&(console[_0x2539a6(0x220)](_0x2539a6(0x2f4)),process['exit'](0x1));let _0x5152ef;try{_0x5152ef=await _0x530c89[_0x2539a6(0x2b2)][_0x2539a6(0x23d)](_0xdf3621);}catch(_0xef9079){console[_0x2539a6(0x220)](_0x2539a6(0x20c)+_0xef9079[_0x2539a6(0xe8)]),process[_0x2539a6(0x3ab)](0x1);}const _0x444c79=_0x530c89[_0x2539a6(0x2b2)][_0x2539a6(0x1e8)](),_0x4d0a13=_0x444c79[_0x2539a6(0xd8)](_0x516985=>_0x516985['licenseId']===_0x5152ef['id'])?.[_0x2539a6(0x10c)]||'',_0x16c076=Object[_0x2539a6(0x274)](_0x5152ef[_0x2539a6(0x329)]||{})['filter'](([,_0x5f0dd8])=>_0x5f0dd8)[_0x2539a6(0xce)](([_0x502801])=>_0x502801),_0x85f340=_0x5152ef[_0x2539a6(0x30d)]||{},_0x4347b3=[_0x85f340[_0x2539a6(0xea)]?'envs='+_0x85f340['envs']:null,_0x85f340[_0x2539a6(0x290)]?_0x2539a6(0x327)+_0x85f340[_0x2539a6(0x290)]:null,_0x85f340[_0x2539a6(0x227)]?_0x2539a6(0x2cb)+_0x85f340[_0x2539a6(0x227)]:null,_0x85f340['maxWrites']?_0x2539a6(0x12c)+_0x85f340['maxWrites'][_0x2539a6(0x298)]():null][_0x2539a6(0xfa)](Boolean)[_0x2539a6(0x37b)]('\x20\x20'),_0x4c8943=_0x5152ef[_0x2539a6(0x159)]===_0x1b9917[_0x2539a6(0xb5)];console[_0x2539a6(0x172)](_0x2539a6(0x33e)),console['log']('\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x5152ef['id']),console[_0x2539a6(0x172)](_0x2539a6(0x154)+_0x5152ef[_0x2539a6(0x1ba)]),console[_0x2539a6(0x172)]('\x20\x20\x20\x20expires:\x20\x20\x20'+new Date(_0x5152ef[_0x2539a6(0x26e)])[_0x2539a6(0xf1)]()[_0x2539a6(0x1e5)](0x0,0xa)),console[_0x2539a6(0x172)](_0x2539a6(0x295)+(_0x16c076[_0x2539a6(0x37b)](',\x20')||_0x2539a6(0x2c8)));if(_0x4347b3)console[_0x2539a6(0x172)](_0x2539a6(0x313)+_0x4347b3);_0x4c8943?(console[_0x2539a6(0x172)](_0x2539a6(0x320)),console[_0x2539a6(0x172)]('')):(console['log'](_0x2539a6(0x225)+_0x4d0a13),console['log'](_0x2539a6(0x224)),console['log'](''),console[_0x2539a6(0x172)](_0x2539a6(0x31f)),console[_0x2539a6(0x172)]('\x20\x20\x20\x201.\x20Send\x20the\x20PIN\x20above\x20('+_0x4d0a13+_0x2539a6(0x223)),console['log'](_0x2539a6(0x362)),console[_0x2539a6(0x172)](_0x2539a6(0x341)),console[_0x2539a6(0x172)](''));}finally{await _0x530c89[_0x2539a6(0x1a0)]();}}async function _0xef4471(_0x3f0a35,_0x346900){const _0x268e3d=_0x2bedfe,_0x5ec6c8=require$$5,_0x266c3f=_0x1e1d6a[_0x268e3d(0x383)](_0x346900[_0x268e3d(0x1eb)]),_0x2e576d=new _0x5ec6c8(_0x266c3f,_0x346900[_0x268e3d(0x36f)]?{'encryptionKey':_0x346900['key']}:{});await _0x2e576d['open']();try{!_0x2e576d['_license']&&(console['error'](_0x268e3d(0x2f4)),process[_0x268e3d(0x3ab)](0x1));let _0xf84884;try{_0xf84884=await _0x2e576d[_0x268e3d(0x2b2)][_0x268e3d(0x3aa)](_0x3f0a35[_0x268e3d(0x2c9)]());}catch(_0x5cf119){console[_0x268e3d(0x220)](_0x268e3d(0x20c)+_0x5cf119[_0x268e3d(0xe8)]),console[_0x268e3d(0x220)](''),console[_0x268e3d(0x220)](_0x268e3d(0xd9)),console[_0x268e3d(0x220)](_0x268e3d(0x325)),console['error']('\x20\x20\x20\x20-\x20The\x20activation\x20token\x20was\x20issued\x20for\x20a\x20different\x20node\x20—\x20share\x20this\x20node\x27s\x20PIN\x20with\x20the\x20vendor.'),console[_0x268e3d(0x220)]('\x20\x20\x20\x20-\x20The\x20activation\x20token\x20has\x20expired\x20—\x20request\x20a\x20fresh\x20one.'),console[_0x268e3d(0x220)](''),process[_0x268e3d(0x3ab)](0x1);}console[_0x268e3d(0x172)](_0x268e3d(0x288)),console[_0x268e3d(0x172)](_0x268e3d(0x17c)+_0xf84884['id']),console[_0x268e3d(0x172)](_0x268e3d(0x154)+_0xf84884[_0x268e3d(0x1ba)]),console[_0x268e3d(0x172)]('\x20\x20\x20\x20expires:\x20\x20\x20'+new Date(_0xf84884[_0x268e3d(0x26e)])[_0x268e3d(0xf1)]()[_0x268e3d(0x1e5)](0x0,0xa)),console[_0x268e3d(0x172)]('\x20\x20\x20\x20status:\x20\x20\x20\x20active'),console[_0x268e3d(0x172)]('');}finally{await _0x2e576d[_0x268e3d(0x1a0)]();}}async function _0x23058d(_0x489558,_0x2b1237){const _0x2d2430=_0x2bedfe;!_0x489558&&(console['error'](_0x2d2430(0x2ae)),process[_0x2d2430(0x3ab)](0x1));const _0x4747f4=require$$5,_0x58aacf=requireOkdbLicenseCodec(),_0x3d18f9=_0x1e1d6a[_0x2d2430(0x383)](_0x2b1237[_0x2d2430(0x1eb)]),_0x56f274=new _0x4747f4(_0x3d18f9,_0x2b1237['key']?{'encryptionKey':_0x2b1237[_0x2d2430(0x36f)]}:{});await _0x56f274[_0x2d2430(0x2c7)]();try{const _0x24eb82=_0x56f274[_0x2d2430(0x395)];(!_0x24eb82||!_0x24eb82[_0x2d2430(0x3a8)]('~licenses'))&&(console[_0x2d2430(0x220)](_0x2d2430(0x12a)+_0x489558+'\x22'),process['exit'](0x1));let _0x1589b5=null,_0x5bf8e1=null;const _0x45d212=_0x24eb82['get'](_0x2d2430(0x347),_0x489558);if(_0x45d212)_0x1589b5=_0x489558,_0x5bf8e1=_0x45d212;else{const _0x265351=[];for(const {key:_0x582796,value:_0x13c096}of _0x24eb82[_0x2d2430(0x129)](_0x2d2430(0x347))){if(_0x582796['startsWith'](_0x489558))_0x265351[_0x2d2430(0xc4)]({'key':_0x582796,'value':_0x13c096});}_0x265351[_0x2d2430(0x387)]===0x0&&(console['error']('[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22'+_0x489558+'\x22'),process[_0x2d2430(0x3ab)](0x1)),_0x265351[_0x2d2430(0x387)]>0x1&&(console[_0x2d2430(0x220)](_0x2d2430(0x1b3)+_0x489558+_0x2d2430(0x305)+_0x265351[_0x2d2430(0x387)]+_0x2d2430(0x21a)),process[_0x2d2430(0x3ab)](0x1)),_0x1589b5=_0x265351[0x0][_0x2d2430(0x36f)],_0x5bf8e1=_0x265351[0x0][_0x2d2430(0x377)];}const _0x1355ee=Date[_0x2d2430(0x1bf)](),_0x4773dc=_0x576bcb(_0x5bf8e1,_0x1355ee),_0x3123b0=_0x56f274['id'],_0x1fa3f7=_0x2d2430(0x35f);let _0x4a18dc='';try{const _0x9f76cd=Buffer[_0x2d2430(0x2c3)](_0x5bf8e1[_0x2d2430(0x1a2)],'hex');_0x4a18dc=_0x58aacf[_0x2d2430(0xc6)](_0x3123b0,_0x9f76cd,_0x1fa3f7)[_0x2d2430(0x10c)];}catch{}const _0x501840=_0x5bf8e1[_0x2d2430(0x329)]?Object[_0x2d2430(0x274)](_0x5bf8e1[_0x2d2430(0x329)])[_0x2d2430(0xfa)](([,_0x3af0fd])=>_0x3af0fd)[_0x2d2430(0xce)](([_0x16b9e3])=>_0x16b9e3):[],_0x1303fb=_0x5bf8e1[_0x2d2430(0x30d)]||{},_0x248e94=_0x24eb82?.['db']?.[_0x2d2430(0x37d)]?.(_0x2d2430(0x133))??0x0,_0x5a4f4e=[..._0x56f274[_0x2d2430(0x10b)][_0x2d2430(0x18e)]()][_0x2d2430(0xfa)](_0x592d9c=>!_0x592d9c[_0x2d2430(0x354)]('~'))['length'];console[_0x2d2430(0x172)](_0x2d2430(0x217)),console[_0x2d2430(0x172)](_0x2d2430(0x17c)+_0x1589b5),console['log'](_0x2d2430(0x154)+(_0x5bf8e1[_0x2d2430(0x1ba)]||'')),console['log'](_0x2d2430(0x251)+(_0x5bf8e1[_0x2d2430(0x26e)]?new Date(_0x5bf8e1[_0x2d2430(0x26e)])[_0x2d2430(0xf1)]()[_0x2d2430(0x1e5)](0x0,0xa):'')),console[_0x2d2430(0x172)]('\x20\x20\x20\x20features:\x20\x20'+(_0x501840[_0x2d2430(0x37b)](',\x20')||_0x2d2430(0x2c8))),console[_0x2d2430(0x172)](_0x2d2430(0x225)+_0x4a18dc),console[_0x2d2430(0x172)](_0x2d2430(0xd5)+_0x4773dc),console[_0x2d2430(0x172)](_0x2d2430(0x388)+new Date(_0x5bf8e1[_0x2d2430(0x1a4)])[_0x2d2430(0xf1)]());if(_0x4773dc===_0x2d2430(0x1ce)){console[_0x2d2430(0x172)](''),console['log'](_0x2d2430(0x259));if(_0x1303fb[_0x2d2430(0xff)]){const _0x35da65=Math[_0x2d2430(0x342)](_0x248e94/_0x1303fb['maxWrites']*0x64);console[_0x2d2430(0x172)](_0x2d2430(0x174)+_0x248e94[_0x2d2430(0x298)]()+_0x2d2430(0x258)+_0x1303fb[_0x2d2430(0xff)]['toLocaleString']()+_0x2d2430(0x25d)+_0x35da65+'%)');}else console[_0x2d2430(0x172)](_0x2d2430(0x174)+_0x248e94[_0x2d2430(0x298)]()+_0x2d2430(0x1ab));_0x1303fb[_0x2d2430(0xea)]?console['log'](_0x2d2430(0x216)+_0x5a4f4e+_0x2d2430(0x258)+_0x1303fb['envs']):console['log'](_0x2d2430(0x216)+_0x5a4f4e+_0x2d2430(0x1ab));}console[_0x2d2430(0x172)]('');}finally{await _0x56f274['close']();}}async function _0x228899(_0x360400,_0x4e5ac6){const _0x10da5c=_0x2bedfe;!_0x360400&&(console[_0x10da5c(0x220)](_0x10da5c(0x281)),process[_0x10da5c(0x3ab)](0x1));const _0x575270=require$$5,_0x1eee52=_0x1e1d6a[_0x10da5c(0x383)](_0x4e5ac6[_0x10da5c(0x1eb)]),_0x2c4419=new _0x575270(_0x1eee52,_0x4e5ac6[_0x10da5c(0x36f)]?{'encryptionKey':_0x4e5ac6[_0x10da5c(0x36f)]}:{});await _0x2c4419['open']();try{const _0x3fdb85=_0x2c4419[_0x10da5c(0x395)];(!_0x3fdb85||!_0x3fdb85['hasType'](_0x10da5c(0x347)))&&(console[_0x10da5c(0x220)](_0x10da5c(0x12a)+_0x360400+'\x22'),process['exit'](0x1));let _0x5d4e69=null,_0x4b4468=null;const _0x4dc826=_0x3fdb85[_0x10da5c(0x37d)](_0x10da5c(0x347),_0x360400);if(_0x4dc826)_0x5d4e69=_0x360400,_0x4b4468=_0x4dc826;else{const _0x78d329=[];for(const {key:_0x36f728,value:_0x5ebed6}of _0x3fdb85[_0x10da5c(0x129)]('~licenses')){if(_0x36f728[_0x10da5c(0x354)](_0x360400))_0x78d329[_0x10da5c(0xc4)]({'key':_0x36f728,'value':_0x5ebed6});}_0x78d329['length']===0x0&&(console[_0x10da5c(0x220)]('[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22'+_0x360400+'\x22'),process['exit'](0x1)),_0x78d329['length']>0x1&&(console[_0x10da5c(0x220)](_0x10da5c(0x1b3)+_0x360400+_0x10da5c(0x305)+_0x78d329['length']+_0x10da5c(0x21a)),process[_0x10da5c(0x3ab)](0x1)),_0x5d4e69=_0x78d329[0x0][_0x10da5c(0x36f)],_0x4b4468=_0x78d329[0x0][_0x10da5c(0x377)];}await _0x3fdb85[_0x10da5c(0x335)](_0x10da5c(0x347),_0x5d4e69),console[_0x10da5c(0x172)](_0x10da5c(0x27c)+_0x5d4e69+_0x10da5c(0xd2)+(_0x4b4468[_0x10da5c(0x1ba)]||_0x10da5c(0x131))+')');}finally{await _0x2c4419[_0x10da5c(0x1a0)]();}}async function _0x2810a2(_0x5d67a2,_0x219f03,_0x1fb2b7){const _0x590dbd=_0x2bedfe;!_0x5d67a2&&(console[_0x590dbd(0x220)](_0x590dbd(0x19b)),process[_0x590dbd(0x3ab)](0x1));!_0x1fb2b7[_0x590dbd(0x1c3)]&&!(_0x1fb2b7[_0x590dbd(0x2e3)]&&_0x1fb2b7['password'])&&(console[_0x590dbd(0x220)]('[okdb]\x20error:\x20join\x20requires\x20credentials.\x20Provide\x20--token\x20<t>\x20or\x20--username\x20<u>\x20--password\x20<p>'),process['exit'](0x1));const _0x1afc90=_0x1fb2b7[_0x590dbd(0x27e)]||_0x219f03[_0x590dbd(0x184)]?.[_0x590dbd(0x330)];!_0x1afc90&&(console[_0x590dbd(0x220)](_0x590dbd(0x340)+_0x590dbd(0x3b6)+'\x20\x20Or\x20set\x20sync.address\x20in\x20.kdbconfig'),process['exit'](0x1));const _0x46073b=require$$5,_0x10416e=new _0x46073b(_0x219f03[_0x590dbd(0x1eb)],{'sync':{'address':_0x1afc90,'auto_reconcile':![]}});await _0x10416e[_0x590dbd(0x2c7)]();try{const _0x5173d5=_0x10416e[_0x590dbd(0x395)];if(_0x5173d5&&_0x5173d5[_0x590dbd(0x3a8)](_0x590dbd(0x1d9))){let _0x489942=![];for(const _0x344802 of _0x5173d5[_0x590dbd(0x129)](_0x590dbd(0x1d9))){_0x489942=!![];break;}_0x489942&&console['log']('\x20\x20Note:\x20this\x20node\x20has\x20existing\x20tokens.\x20They\x20will\x20coexist\x20with\x20cluster\x20tokens\x0a'+_0x590dbd(0x187));}console['log'](_0x590dbd(0xc9)+_0x5d67a2+'…'),await _0x10416e['sync'][_0x590dbd(0x37b)](_0x5d67a2['replace'](/\/+$/,''),{'token':_0x1fb2b7[_0x590dbd(0x1c3)],'username':_0x1fb2b7['username'],'password':_0x1fb2b7[_0x590dbd(0x336)]}),console['log'](_0x590dbd(0x164)),console[_0x590dbd(0x172)](_0x590dbd(0x1b7));}finally{await _0x10416e[_0x590dbd(0x1a0)]();}}async function _0x4155cc(){const _0x46bceb=_0x2bedfe,_0x39e772=Date[_0x46bceb(0x1bf)](),_0x45abd8=_0x30dbb1(process[_0x46bceb(0x2da)]),_0x3c99d3=_0x51c5ae(_0x45abd8),_0x1c24fc=_0x1e1d6a[_0x46bceb(0x383)](_0x3c99d3[_0x46bceb(0x1eb)]);!_0x3c99d3[_0x46bceb(0x2d0)]&&!process[_0x46bceb(0x1b1)][_0x46bceb(0x1c8)]&&(_0x3c99d3[_0x46bceb(0x2d0)]=!![]);const _0x16bd00=require$$5,{start:_0x51a72d,colorLog:_0x349f16}=requireOkdbShell(),_0xc76fe2={..._0x3c99d3[_0x46bceb(0x36f)]?{'encryptionKey':_0x3c99d3[_0x46bceb(0x36f)]}:{},..._0x3c99d3[_0x46bceb(0x163)]?{}:_0x567231(_0x3c99d3[_0x46bceb(0xde)])?{'admin':_0x3c99d3[_0x46bceb(0xde)]}:{},..._0x567231(_0x3c99d3[_0x46bceb(0x165)])?{'api':_0x3c99d3[_0x46bceb(0x165)]}:{},..._0x567231(_0x3c99d3['auth'])?{'auth':_0x3c99d3['auth']}:{},..._0x567231(_0x3c99d3[_0x46bceb(0x100)])?{'mcp':_0x3c99d3[_0x46bceb(0x100)]}:{},..._0x3c99d3[_0x46bceb(0xbc)]!==![]?{'timeMachine':_0x3c99d3['timeMachine']}:{}},_0x17f0fe=new _0x16bd00(_0x1c24fc,_0xc76fe2);_0x17f0fe['log'][_0x46bceb(0x202)]?.();const _0x4a1076=_0x17f0fe[_0x46bceb(0x172)][_0x46bceb(0x1f8)](_0x56cc6d=>_0x349f16(_0x56cc6d,_0x3c99d3[_0x46bceb(0x284)]));if(_0x3c99d3[_0x46bceb(0x2d0)])process[_0x46bceb(0xfc)][_0x46bceb(0x31e)](_0x46bceb(0x14f));await _0x17f0fe[_0x46bceb(0x2c7)]();if(_0x3c99d3['noRepl'])process[_0x46bceb(0xfc)]['write']('\x20\x20✓\x20database\x20opened\x0a');try{await _0x1abd0e(_0x17f0fe,_0x3c99d3[_0x46bceb(0x2f1)]);}catch(_0x354e77){_0x354e77['code']===_0x46bceb(0x385)&&(console[_0x46bceb(0x220)](_0x46bceb(0x2d3)+_0x3c99d3['port']+_0x46bceb(0x34e)),process[_0x46bceb(0x3ab)](0x1));throw _0x354e77;}if(_0x3c99d3[_0x46bceb(0x2d0)])process[_0x46bceb(0xfc)][_0x46bceb(0x31e)]('\x20\x20✓\x20http\x20listening\x20on\x20:'+_0x3c99d3[_0x46bceb(0x2f1)]+'\x0a');if(!_0x3c99d3['noRepl'])_0x17f0fe[_0x46bceb(0x172)][_0x46bceb(0x202)]?.(),_0x4a1076?.(),_0x3b6597(_0x17f0fe[_0x46bceb(0x321)]?.['getSecurityNotices']?.()??[]),await _0x51a72d(_0x17f0fe,_0x3c99d3);else{const _0x3ea63d=_0x1e1d6a['join'](_0x1c24fc,_0x46bceb(0x37e));try{_0x42261a[_0x46bceb(0xef)](_0x3ea63d,String(process[_0x46bceb(0x283)]));}catch{}const _0x2ff690=Date[_0x46bceb(0x1bf)]()-_0x39e772;console[_0x46bceb(0x172)](''),console[_0x46bceb(0x172)](_0x46bceb(0x263)),console[_0x46bceb(0x172)](_0x46bceb(0x397)+_0x3c99d3[_0x46bceb(0x2f1)]),console[_0x46bceb(0x172)](_0x46bceb(0x252)+_0x1c24fc),console[_0x46bceb(0x172)](_0x46bceb(0x2af)+_0x17f0fe['id']);{const _0x3c6bee=_0x17f0fe[_0x46bceb(0x395)]?.['db']?.[_0x46bceb(0x37d)]?.(_0x46bceb(0x133))??0x0,_0x36fd07=[..._0x17f0fe[_0x46bceb(0x10b)]['keys']()][_0x46bceb(0xfa)](_0x2335df=>!_0x2335df[_0x46bceb(0x354)]('~'))[_0x46bceb(0x387)];if(_0x17f0fe[_0x46bceb(0x2b2)]?.[_0x46bceb(0x1ce)]?.['licenseType']===0x1){const _0x81d8bb=Math[_0x46bceb(0x170)]((_0x17f0fe[_0x46bceb(0x2b2)][_0x46bceb(0x1ce)][_0x46bceb(0x26e)]-Date[_0x46bceb(0x1bf)]())/0x5265c00);console[_0x46bceb(0x172)](_0x46bceb(0xcf)+_0x17f0fe[_0x46bceb(0x2b2)][_0x46bceb(0x1ce)][_0x46bceb(0x1ba)]+'\x20(expires\x20in\x20'+_0x81d8bb+_0x46bceb(0x142));}else{if(_0x17f0fe['_license']?.['active']){const _0x2850b5=_0x17f0fe[_0x46bceb(0x2b2)][_0x46bceb(0x1ce)];console[_0x46bceb(0x172)](_0x46bceb(0x177)+_0x2850b5[_0x46bceb(0x1ba)]+_0x46bceb(0x114)+new Date(_0x2850b5['expiresAt'])[_0x46bceb(0xf1)]()[_0x46bceb(0x1e5)](0x0,0xa)+')');const _0x1fe1b0=_0x2850b5[_0x46bceb(0x30d)]||{};if(_0x1fe1b0[_0x46bceb(0xff)]){const _0x31f110=Math[_0x46bceb(0x342)](_0x3c6bee/_0x1fe1b0[_0x46bceb(0xff)]*0x64);console[_0x46bceb(0x172)](_0x46bceb(0x103)+_0x3c6bee[_0x46bceb(0x298)]()+_0x46bceb(0x258)+_0x1fe1b0[_0x46bceb(0xff)][_0x46bceb(0x298)]()+_0x46bceb(0x38e)+_0x31f110+'%),\x20'+_0x36fd07+(_0x1fe1b0[_0x46bceb(0xea)]?'/'+_0x1fe1b0[_0x46bceb(0xea)]:'')+_0x46bceb(0x2db)+(_0x36fd07===0x1?'':'s'));}}else{if(_0x17f0fe['_license']){const _0x7bfc16=_0x17f0fe['_license'][_0x46bceb(0x1e8)](),_0x39bb91=_0x7bfc16[_0x46bceb(0x387)]?_0x7bfc16[_0x46bceb(0xce)](_0x174177=>_0x174177[_0x46bceb(0x10c)])['join'](',\x20'):_0x46bceb(0x271),_0x14bb3e=_0x17f0fe['_license']['effective'],_0x44db4d=_0x14bb3e[_0x46bceb(0x30d)]['maxWrites']?Math['round'](_0x3c6bee/_0x14bb3e[_0x46bceb(0x30d)][_0x46bceb(0xff)]*0x64):0x0;console[_0x46bceb(0x172)](_0x46bceb(0x373)),console[_0x46bceb(0x172)](_0x46bceb(0x103)+_0x3c6bee[_0x46bceb(0x298)]()+_0x46bceb(0x258)+_0x14bb3e['limits'][_0x46bceb(0xff)]['toLocaleString']()+'\x20writes\x20('+_0x44db4d+_0x46bceb(0x237)+_0x36fd07+_0x46bceb(0x258)+_0x14bb3e[_0x46bceb(0x30d)]['envs']+_0x46bceb(0x1c5)),console[_0x46bceb(0x172)]('\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20'+_0x39bb91);}}}}console['log']('\x20\x20\x20\x20api:\x20\x20\x20http://localhost:'+_0x3c99d3['port']+'/api');!_0x3c99d3[_0x46bceb(0x163)]&&console['log']('\x20\x20\x20\x20admin:\x20http://localhost:'+_0x3c99d3[_0x46bceb(0x2f1)]+'/admin/index.html');console[_0x46bceb(0x172)](''),console[_0x46bceb(0x172)]('[okdb]\x20started\x20in\x20'+_0x2ff690+'ms'),_0x3b6597(_0x17f0fe['auth']?.['getSecurityNotices']?.()??[]);async function _0x559e84(){const _0x47fa9f=_0x46bceb;process[_0x47fa9f(0xfc)][_0x47fa9f(0x31e)](_0x47fa9f(0x296));try{_0x42261a[_0x47fa9f(0x32a)](_0x3ea63d);}catch{}await _0x17f0fe[_0x47fa9f(0x1a0)](),process[_0x47fa9f(0x3ab)](0x0);}process['on']('SIGINT',_0x559e84),process['on'](_0x46bceb(0x18b),_0x559e84);}}const _0x9b5cc4=new Set([_0x2bedfe(0x302),'doctor',_0x2bedfe(0x19a),_0x2bedfe(0x1aa),_0x2bedfe(0x309),_0x2bedfe(0x17e),_0x2bedfe(0x19e),'token',_0x2bedfe(0x37b),_0x2bedfe(0x102)]),_0x391d84=process['argv'][0x2];if(_0x391d84===_0x2bedfe(0x302))console['log'](require$$2[_0x2bedfe(0x302)]),process[_0x2bedfe(0x3ab)](0x0);else{if(_0x391d84&&_0x9b5cc4[_0x2bedfe(0x36c)](_0x391d84)){const _0x3d9bd4=process[_0x2bedfe(0x2da)]['slice'](0x3),_0x14f9e4=_0x30dbb1([_0x2bedfe(0x2b5),_0x2bedfe(0x144),..._0x3d9bd4]),_0x32d738=_0x51c5ae(_0x14f9e4),_0x8e1a19=new Set([_0x2bedfe(0x20f),'-d',_0x2bedfe(0x1e6),'-k',_0x2bedfe(0x319),'-c',_0x2bedfe(0x13d),'-p','--log-level',_0x2bedfe(0x3af),'-e',_0x2bedfe(0xee),_0x2bedfe(0x32f),_0x2bedfe(0x289),_0x2bedfe(0x1fb),_0x2bedfe(0x35c),_0x2bedfe(0xc5),_0x2bedfe(0x27d),_0x2bedfe(0x2bf),'--username','-u',_0x2bedfe(0x127)]);let _0x163b86=null;for(let _0x4248a1=0x0;_0x4248a1<_0x3d9bd4[_0x2bedfe(0x387)];_0x4248a1++){if(_0x8e1a19['has'](_0x3d9bd4[_0x4248a1])){_0x4248a1++;continue;}if(!_0x3d9bd4[_0x4248a1][_0x2bedfe(0x354)]('-')){_0x163b86=_0x3d9bd4[_0x4248a1];break;}}(async()=>{const _0x32ce08=_0x2bedfe;if(_0x391d84===_0x32ce08(0x1c3)){const _0x1bb5b7=process['argv'][0x3],_0xf308c7=process['argv'][_0x32ce08(0x1e5)](0x4),_0x5970ae=_0x30dbb1(['node',_0x32ce08(0x144),..._0xf308c7]),_0x4c39b2=_0x51c5ae(_0x5970ae),_0x9de335=new Set([_0x32ce08(0x20f),'-d',_0x32ce08(0x1e6),'-k',_0x32ce08(0x319),'-c',_0x32ce08(0x13d),'-p','--name',_0x32ce08(0x289),_0x32ce08(0x1fb),_0x32ce08(0x35c),_0x32ce08(0xc5),_0x32ce08(0x27d),_0x32ce08(0x190),_0x32ce08(0x3af),'-e','--types']),_0x586dc9=[];for(let _0x3da330=0x0;_0x3da330<_0xf308c7['length'];_0x3da330++){if(_0x9de335[_0x32ce08(0x36c)](_0xf308c7[_0x3da330])){_0x3da330++;continue;}if(_0xf308c7[_0x3da330]['startsWith']('-'))continue;_0x586dc9['push'](_0xf308c7[_0x3da330]);}switch(_0x1bb5b7){case'create':await _0x4102df(_0x4c39b2,_0x5970ae);break;case'list':await _0x1d0633(_0x4c39b2);break;case _0x32ce08(0x14e):await _0x36d10b(_0x586dc9[0x0],_0x4c39b2);break;default:console[_0x32ce08(0x220)](_0x32ce08(0x398)+_0x1bb5b7+_0x32ce08(0x37c)),process[_0x32ce08(0x3ab)](0x1);}return;}if(_0x391d84===_0x32ce08(0x102)){const _0xa01a32=requireOkdbLicenseCodec(),_0x49342b=process[_0x32ce08(0x2da)]['slice'](0x3),_0x4e4ea3=_0x30dbb1([_0x32ce08(0x2b5),_0x32ce08(0x144),..._0x49342b]),_0x3b7b73=_0x51c5ae(_0x4e4ea3),_0x107876=new Set([_0x32ce08(0x20f),'-d',_0x32ce08(0x1e6),'-k',_0x32ce08(0x319),'-c',_0x32ce08(0x13d),'-p','--log-level']),_0x23be36=[];for(let _0x556497=0x0;_0x556497<_0x49342b[_0x32ce08(0x387)];_0x556497++){if(_0x107876[_0x32ce08(0x36c)](_0x49342b[_0x556497])){_0x556497++;continue;}if(_0x49342b[_0x556497][_0x32ce08(0x354)]('-'))continue;_0x23be36[_0x32ce08(0xc4)](_0x49342b[_0x556497]);}const _0x4f1304=_0x23be36[0x0]??null;if(_0x4f1304===_0x32ce08(0x335))await _0x228899(_0x23be36[0x1],_0x3b7b73);else{if(!_0x4f1304)await _0x2c0425(_0x3b7b73);else{let _0x26b231=_0xa01a32[_0x32ce08(0x2f8)](_0x4f1304);if(_0x26b231===_0x32ce08(0x139)&&_0x42261a[_0x32ce08(0x1b5)](_0x4f1304))_0x26b231=_0x32ce08(0x25b);if(_0x26b231==='path')try{const _0x556ca6=_0x42261a[_0x32ce08(0x25e)](_0x4f1304,_0x32ce08(0x234))[_0x32ce08(0x2c9)](),_0x3ebc27=_0xa01a32[_0x32ce08(0x2f8)](_0x556ca6);if(_0x3ebc27===_0x32ce08(0x175)){await _0xef4471(_0x556ca6,_0x3b7b73);return;}await _0x38e926(_0x4f1304,_0x3b7b73);return;}catch(_0x2584ab){console['error'](_0x32ce08(0x273)+_0x4f1304+':\x20'+_0x2584ab['message']),process['exit'](0x1);}switch(_0x26b231){case'blob':await _0x38e926(_0x4f1304,_0x3b7b73);break;case'activation':await _0xef4471(_0x4f1304,_0x3b7b73);break;case _0x32ce08(0x218):await _0x23058d(_0x4f1304,_0x3b7b73);break;default:console[_0x32ce08(0x220)]('[okdb]\x20error:\x20unrecognized\x20input:\x20\x22'+_0x4f1304+'\x22'),console[_0x32ce08(0x220)](''),console[_0x32ce08(0x220)]('\x20\x20Expected\x20one\x20of:'),console[_0x32ce08(0x220)](_0x32ce08(0x207)),console[_0x32ce08(0x220)]('\x20\x20\x20\x20•\x20an\x20activation\x20token\x20\x20(124\x20chars)'),console['error'](_0x32ce08(0x24d)),console[_0x32ce08(0x220)](_0x32ce08(0x13e)),console[_0x32ce08(0x220)](''),console['error'](_0x32ce08(0x1e2)),process['exit'](0x1);}}}return;}switch(_0x391d84){case _0x32ce08(0x186):await _0x467ec2(_0x32d738);break;case _0x32ce08(0x19a):await _0x432867();break;case _0x32ce08(0x19e):await _0x219593(_0x32d738);break;case _0x32ce08(0x1aa):await _0x2a40e2(_0x163b86??_0x1e1d6a['resolve'](_0x32ce08(0x2df)),_0x32d738);break;case _0x32ce08(0x309):await _0x43ef91(_0x163b86??_0x1e1d6a['resolve']('./okdb-export.ndjson'),_0x32d738,_0x14f9e4);break;case _0x32ce08(0x17e):await _0x25e278(_0x163b86??_0x1e1d6a[_0x32ce08(0x383)](_0x32ce08(0x37f)),_0x32d738,_0x14f9e4);break;case _0x32ce08(0x37b):await _0x2810a2(_0x163b86,_0x32d738,_0x14f9e4);break;}})()['then'](()=>process[_0x2bedfe(0x3ab)](0x0))['catch'](_0x2752a5=>{const _0x569014=_0x2bedfe;console[_0x569014(0x220)]('\x0a[okdb]\x20error:\x20'+(_0x2752a5[_0x569014(0xe8)]||_0x2752a5)+'\x0a'),process[_0x569014(0x3ab)](0x1);});}else _0x4155cc()[_0x2bedfe(0x1bb)](_0x5d6bf0=>{const _0xdfcd6e=_0x2bedfe;console[_0xdfcd6e(0x220)]('\x0a[okdb]\x20fatal\x20error:'),console['error'](_0x5d6bf0['stack']||_0x5d6bf0),process['exit'](0x1);});}return okdb$1;}var okdbExports=requireOkdb(),okdb=getDefaultExportFromCjs(okdbExports);module[_0xecd54b(0x2a2)]=okdb;
2
+ 'use strict';const _0x2a866b=_0x48ce;(function(_0x17f3f5,_0x364e11){const _0x41ba36=_0x48ce,_0x5214ce=_0x17f3f5();while(!![]){try{const _0x3e4100=-parseInt(_0x41ba36(0x253))/0x1+parseInt(_0x41ba36(0x15c))/0x2+parseInt(_0x41ba36(0x2cc))/0x3+-parseInt(_0x41ba36(0x3f1))/0x4*(-parseInt(_0x41ba36(0x288))/0x5)+parseInt(_0x41ba36(0x1ff))/0x6+parseInt(_0x41ba36(0x2d1))/0x7+-parseInt(_0x41ba36(0x326))/0x8*(parseInt(_0x41ba36(0x390))/0x9);if(_0x3e4100===_0x364e11)break;else _0x5214ce['push'](_0x5214ce['shift']());}catch(_0x47cc96){_0x5214ce['push'](_0x5214ce['shift']());}}}(_0x9ed8,0xd68ef));var require$$1$1=require(_0x2a866b(0x3b5)),require$$1=require('fs'),require$$3=require(_0x2a866b(0x1ed)),require$$0$2=require(_0x2a866b(0x3cc)),require$$5=require(_0x2a866b(0x330)),require$$0=require(_0x2a866b(0x2e2)),require$$0$1=require(_0x2a866b(0x274)),require$$2$1=require('os'),require$$4=require(_0x2a866b(0x247));function getDefaultExportFromCjs(_0x61782){const _0x890b7a=_0x2a866b;return _0x61782&&_0x61782['__esModule']&&Object[_0x890b7a(0x22d)]['hasOwnProperty'][_0x890b7a(0x1b2)](_0x61782,'default')?_0x61782[_0x890b7a(0x342)]:_0x61782;}function _0x48ce(_0x37c3df,_0x136f22){_0x37c3df=_0x37c3df-0x13b;const _0x9ed891=_0x9ed8();let _0x48ce75=_0x9ed891[_0x37c3df];return _0x48ce75;}var okdb$1={},version='1.0.3',require$$2={'version':version},okdbAuthTokens,hasRequiredOkdbAuthTokens;function requireOkdbAuthTokens(){if(hasRequiredOkdbAuthTokens)return okdbAuthTokens;hasRequiredOkdbAuthTokens=0x1;const _0x3e37d3=require$$0;function _0x47430f(_0x594884,_0x5dd058){const _0xf90e8a=_0x48ce;return _0x3e37d3[_0xf90e8a(0x3e5)](_0xf90e8a(0x2a5),_0x5dd058)[_0xf90e8a(0x318)](_0x594884)[_0xf90e8a(0x3f0)](_0xf90e8a(0x3ec));}function _0x1949a1(_0x1f4a67,_0x5ef7fd){const _0x339d21=_0x48ce;if(typeof _0x1f4a67!==_0x339d21(0x2e7)||typeof _0x5ef7fd!==_0x339d21(0x2e7))return![];if(Buffer[_0x339d21(0x24c)](_0x1f4a67)!==Buffer[_0x339d21(0x24c)](_0x5ef7fd))return![];return _0x3e37d3[_0x339d21(0x408)](Buffer['from'](_0x1f4a67),Buffer[_0x339d21(0x418)](_0x5ef7fd));}function _0x4206cb(_0x12a0cb){const _0x1f56e5=_0x48ce;if(!_0x12a0cb?.[_0x1f56e5(0x397)](_0x1f56e5(0x21d)))return null;return _0x12a0cb['slice'](0x7);}function _0x1fd8cd(_0x176f2d=0x20){const _0x39eed1=_0x48ce;return _0x3e37d3[_0x39eed1(0x29f)](_0x176f2d)[_0x39eed1(0x23e)](_0x39eed1(0x3ec));}function _0xfc780e(_0x2251eb){const _0x294ce4=_0x48ce;return _0x3e37d3[_0x294ce4(0x1b6)](_0x294ce4(0x2a5))['update'](_0x2251eb)[_0x294ce4(0x3f0)](_0x294ce4(0x1ae));}function _0x4fa331(_0x81504,_0x4a50df,_0x3ded2a=0x36ee80){const _0x3c6c9e=_0x48ce;if(!_0x4a50df)throw new Error(_0x3c6c9e(0x40c));const _0x19597c=Date[_0x3c6c9e(0x208)](),_0x267286=Buffer[_0x3c6c9e(0x418)](JSON[_0x3c6c9e(0x2f7)]({'iat':_0x19597c,'exp':_0x19597c+_0x3ded2a,'sub':_0x81504?.['id']??_0x81504?.[_0x3c6c9e(0x14f)]??null,'username':_0x81504?.[_0x3c6c9e(0x2a8)]??_0x81504?.[_0x3c6c9e(0x188)]??null,'roles':Array[_0x3c6c9e(0x283)](_0x81504?.[_0x3c6c9e(0x30f)])?_0x81504[_0x3c6c9e(0x30f)]:[]}))[_0x3c6c9e(0x23e)]('base64url'),_0x28c473=_0x47430f(_0x267286,_0x4a50df);return _0x267286+'.'+_0x28c473;}function _0x4df476(_0x2f4d39,_0x41eeae){const _0x1e30d0=_0x48ce;if(!_0x41eeae||typeof _0x2f4d39!==_0x1e30d0(0x2e7))return null;const [_0xacb1ad,_0x4a9fde]=_0x2f4d39[_0x1e30d0(0x343)]('.');if(!_0xacb1ad||!_0x4a9fde)return null;const _0xa4a2d2=_0x47430f(_0xacb1ad,_0x41eeae);if(!_0x1949a1(_0x4a9fde,_0xa4a2d2))return null;try{const _0x1465d1=JSON[_0x1e30d0(0x345)](Buffer[_0x1e30d0(0x418)](_0xacb1ad,'base64url')[_0x1e30d0(0x23e)]()),_0x44d036=0x7530;if(Date[_0x1e30d0(0x208)]()>Number(_0x1465d1?.[_0x1e30d0(0x2ac)]??0x0)+_0x44d036)return null;return _0x1465d1;}catch{return null;}}async function _0x2c1357(_0x577563){return new Promise((_0x1afc7b,_0x44736f)=>{const _0x7aced1=_0x3e37d3['randomBytes'](0x10);_0x3e37d3['scrypt'](_0x577563,_0x7aced1,0x40,(_0x4d0ff6,_0x3a6345)=>{const _0x377681=_0x48ce;if(_0x4d0ff6)_0x44736f(_0x4d0ff6);_0x1afc7b(_0x7aced1[_0x377681(0x23e)]('hex')+':'+_0x3a6345[_0x377681(0x23e)](_0x377681(0x1ae)));});});}async function _0x5e2417(_0x476fb2,_0x1d0319){const _0x4b12ed=_0x48ce,[_0x5d3cde,_0x460f60]=_0x1d0319[_0x4b12ed(0x343)](':');if(!_0x5d3cde||!_0x460f60)return![];const _0x4fb671=Buffer[_0x4b12ed(0x418)](_0x5d3cde,'hex');return new Promise((_0x2eac3b,_0x3a9ac3)=>{const _0x351228=_0x4b12ed;_0x3e37d3[_0x351228(0x217)](_0x476fb2,_0x4fb671,0x40,(_0x3281f0,_0xc74f6b)=>{const _0x3eb6ab=_0x351228;if(_0x3281f0)_0x3a9ac3(_0x3281f0);_0x2eac3b(_0x3e37d3[_0x3eb6ab(0x408)](_0xc74f6b,Buffer[_0x3eb6ab(0x418)](_0x460f60,_0x3eb6ab(0x1ae))));});});}return okdbAuthTokens={'hmac':_0x47430f,'timingSafeEqual':_0x1949a1,'parseBearer':_0x4206cb,'randomToken':_0x1fd8cd,'hashToken':_0xfc780e,'issueToken':_0x4fa331,'authenticateToken':_0x4df476,'hashPassword':_0x2c1357,'verifyPassword':_0x5e2417},okdbAuthTokens;}var okdbLicenseCodec,hasRequiredOkdbLicenseCodec;function requireOkdbLicenseCodec(){const _0x509675=_0x2a866b;if(hasRequiredOkdbLicenseCodec)return okdbLicenseCodec;hasRequiredOkdbLicenseCodec=0x1;const _0x6cb2cd=require$$0$1,_0x353fbc=_0x509675(0x166),_0x31135b=new Uint8Array(0x100)[_0x509675(0x32d)](0xff);for(let _0x3390a7=0x0;_0x3390a7<_0x353fbc[_0x509675(0x2b6)];_0x3390a7++){_0x31135b[_0x353fbc[_0x509675(0x25d)](_0x3390a7)]=_0x3390a7,_0x31135b[_0x353fbc['charCodeAt'](_0x3390a7)+0x20]=_0x3390a7;}_0x31135b['O'[_0x509675(0x25d)](0x0)]=0x0,_0x31135b['o'[_0x509675(0x25d)](0x0)]=0x0,_0x31135b['I'[_0x509675(0x25d)](0x0)]=0x1,_0x31135b['i'[_0x509675(0x25d)](0x0)]=0x1,_0x31135b['L'['charCodeAt'](0x0)]=0x1,_0x31135b['l'[_0x509675(0x25d)](0x0)]=0x1;function _0x3c45f1(_0x5236fd){let _0x6a0e61=0x0,_0x41dc54=0x0,_0x2fa76d='';for(let _0x1468d1=0x0;_0x1468d1<_0x5236fd['length'];_0x1468d1++){_0x41dc54=_0x41dc54<<0x8|_0x5236fd[_0x1468d1],_0x6a0e61+=0x8;while(_0x6a0e61>=0x5){_0x6a0e61-=0x5,_0x2fa76d+=_0x353fbc[_0x41dc54>>>_0x6a0e61&0x1f];}}return _0x6a0e61>0x0&&(_0x2fa76d+=_0x353fbc[_0x41dc54<<0x5-_0x6a0e61&0x1f]),_0x2fa76d;}function _0xaed5b6(_0x4802c8){const _0x54720a=_0x509675;_0x4802c8=_0x4802c8['replace'](/-/g,'')[_0x54720a(0x2b2)]();let _0x712575=0x0,_0x1a4a24=0x0;const _0x7493ce=[];for(let _0x3efbb9=0x0;_0x3efbb9<_0x4802c8['length'];_0x3efbb9++){const _0x23c73c=_0x31135b[_0x4802c8[_0x54720a(0x25d)](_0x3efbb9)];if(_0x23c73c===0xff)continue;_0x1a4a24=_0x1a4a24<<0x5|_0x23c73c,_0x712575+=0x5,_0x712575>=0x8&&(_0x712575-=0x8,_0x7493ce['push'](_0x1a4a24>>>_0x712575&0xff));}return Buffer['from'](_0x7493ce);}const _0x2bd878=['sync','embeddings','engines','fts','timeMachine','views',_0x509675(0x26d),'files'],_0x32084c=0x0,_0x4bc3b2=0x1,_0x3f65d5=0x6*0x1e*0x18*0x3c*0x3c*0x3e8;function _0x4ea41f({issuedAt:_0x44ef66,expiresAt:_0x493fbf,licensee:licensee='',features:features={},limits:limits={},licenseType:licenseType=_0x32084c}){const _0x3e62e9=_0x509675,_0x14a707=Buffer['from'](licensee,_0x3e62e9(0x2d0))['slice'](0x0,0x40),_0x127cb4=0x1+0x1+0x4+0x4+0x1+_0x14a707[_0x3e62e9(0x2b6)]+0x2+0x10,_0x674e6b=Buffer[_0x3e62e9(0x2d9)](_0x127cb4);let _0x315ffb=0x0;_0x674e6b['writeUInt8'](0x1,_0x315ffb++),_0x674e6b[_0x3e62e9(0x14d)](licenseType,_0x315ffb++),_0x674e6b[_0x3e62e9(0x395)](Math[_0x3e62e9(0x1d5)](_0x44ef66/0x3e8),_0x315ffb),_0x315ffb+=0x4,_0x674e6b['writeUInt32BE'](Math['floor'](_0x493fbf/0x3e8),_0x315ffb),_0x315ffb+=0x4,_0x674e6b[_0x3e62e9(0x14d)](_0x14a707[_0x3e62e9(0x2b6)],_0x315ffb++),_0x14a707[_0x3e62e9(0x2f5)](_0x674e6b,_0x315ffb),_0x315ffb+=_0x14a707['length'];let _0x521c71=0x0;for(let _0x26fa73=0x0;_0x26fa73<_0x2bd878[_0x3e62e9(0x2b6)];_0x26fa73++){if(features[_0x2bd878[_0x26fa73]])_0x521c71|=0x1<<_0x26fa73;}_0x674e6b[_0x3e62e9(0x399)](_0x521c71,_0x315ffb),_0x315ffb+=0x2;const _0x1b8acd=[_0x3e62e9(0x182),'typesPerEnv','syncPeers',_0x3e62e9(0x236)];for(const _0xf25f18 of _0x1b8acd){_0x674e6b[_0x3e62e9(0x395)](limits[_0xf25f18]||0x0,_0x315ffb),_0x315ffb+=0x4;}return _0x674e6b;}function _0x381d6b(_0x2ebf64){const _0x53526e=_0x509675;let _0x1a1635=0x0;const _0x55f15b=_0x2ebf64[_0x53526e(0x276)](_0x1a1635++),_0x39bfed=_0x2ebf64[_0x53526e(0x276)](_0x1a1635++),_0x35e4b9=_0x2ebf64[_0x53526e(0x2bc)](_0x1a1635);_0x1a1635+=0x4;const _0x19fb5f=_0x2ebf64['readUInt32BE'](_0x1a1635);_0x1a1635+=0x4;const _0x2f46ad=_0x2ebf64[_0x53526e(0x276)](_0x1a1635++),_0x266d96=_0x2ebf64['slice'](_0x1a1635,_0x1a1635+_0x2f46ad)['toString'](_0x53526e(0x2d0));_0x1a1635+=_0x2f46ad;const _0x5a6ed7=_0x2ebf64['readUInt16BE'](_0x1a1635);_0x1a1635+=0x2;const _0x11c6aa={};for(let _0x5a3191=0x0;_0x5a3191<_0x2bd878[_0x53526e(0x2b6)];_0x5a3191++){_0x11c6aa[_0x2bd878[_0x5a3191]]=Boolean(_0x5a6ed7&0x1<<_0x5a3191);}const _0x5bbcf4=[_0x53526e(0x182),_0x53526e(0x2ce),_0x53526e(0x2ab),_0x53526e(0x236)],_0x4d9562={};for(const _0x5c6adb of _0x5bbcf4){const _0x7f7de2=_0x2ebf64['readUInt32BE'](_0x1a1635);_0x1a1635+=0x4,_0x4d9562[_0x5c6adb]=_0x7f7de2===0x0?null:_0x7f7de2;}return{'v':_0x55f15b,'licenseType':_0x39bfed,'issuedAt':_0x35e4b9*0x3e8,'expiresAt':_0x19fb5f*0x3e8,'licensee':_0x266d96,'features':_0x11c6aa,'limits':_0x4d9562};}function _0xa29b28(_0x224595,_0x284843){const _0x4d7468=_0x509675,_0x22fac0=Buffer[_0x4d7468(0x2c4)]([_0x224595,_0x284843]),_0x286627=_0x3c45f1(_0x22fac0),_0x57e12b=[];for(let _0x5d5c5a=0x0;_0x5d5c5a<_0x286627[_0x4d7468(0x2b6)];_0x5d5c5a+=0x8){_0x57e12b[_0x4d7468(0x1ca)](_0x286627[_0x4d7468(0x2e9)](_0x5d5c5a,_0x5d5c5a+0x8));}return _0x57e12b[_0x4d7468(0x3db)]('-');}function _0x9429e(_0x2e7b38){const _0x17ad4d=_0x509675;if(typeof _0x2e7b38!==_0x17ad4d(0x2e7))throw new Error(_0x17ad4d(0x3dd));const _0x1fcdfd=_0xaed5b6(_0x2e7b38[_0x17ad4d(0x24b)](/-/g,''));if(_0x1fcdfd[_0x17ad4d(0x2b6)]<0x41)throw new Error('decodeLicenseBlob:\x20blob\x20too\x20short\x20('+_0x1fcdfd[_0x17ad4d(0x2b6)]+'\x20bytes,\x20need\x20>=\x2065)');const _0x72d1ae=_0x1fcdfd[_0x17ad4d(0x2e9)](0x0,_0x1fcdfd['length']-0x40),_0x4a5d90=_0x1fcdfd[_0x17ad4d(0x2e9)](_0x1fcdfd[_0x17ad4d(0x2b6)]-0x40);let _0x3a04c6;try{_0x3a04c6=_0x381d6b(_0x72d1ae);}catch(_0x38d89d){throw new Error(_0x17ad4d(0x181)+_0x38d89d[_0x17ad4d(0x1bd)]);}return{'rawBuf':_0x1fcdfd,'payload':_0x72d1ae,'sig':_0x4a5d90,'decoded':_0x3a04c6};}function _0x2c5174(_0x4dee6c){const _0x45462e=_0x509675;return _0x6cb2cd[_0x45462e(0x1b6)](_0x45462e(0x2a5))[_0x45462e(0x318)](_0x4dee6c)['digest']()[_0x45462e(0x2e9)](0x0,0x8);}function _0xb120e0(_0x468646,_0x22620f,_0x565023){const _0x5a7fdf=_0x509675,_0x187bf6=_0x5a7fdf(0x37c)+_0x565023,_0x5674b=Buffer[_0x5a7fdf(0x2c4)]([Buffer[_0x5a7fdf(0x418)](_0x468646,_0x5a7fdf(0x2d0)),_0x22620f]),_0x56bf8c=_0x6cb2cd['createHmac'](_0x5a7fdf(0x2a5),_0x187bf6)['update'](_0x5674b)[_0x5a7fdf(0x3f0)](),_0x48f304=_0x3c45f1(_0x56bf8c[_0x5a7fdf(0x2e9)](0x0,0x5));return{'pin':_0x48f304,'pinHmac':_0x56bf8c};}function _0x7c54fc(_0x584c3f,_0x38b5eb,_0x18bc4){const _0x277417=_0x509675,_0xa0f202=Buffer['allocUnsafe'](0x4d);let _0x1b8fe1=0x0;_0xa0f202[_0x277417(0x14d)](0x1,_0x1b8fe1++),_0x584c3f[_0x277417(0x2f5)](_0xa0f202,_0x1b8fe1),_0x1b8fe1+=0x8,_0xa0f202[_0x277417(0x395)](_0x38b5eb,_0x1b8fe1),_0x1b8fe1+=0x4,_0x18bc4[_0x277417(0x2f5)](_0xa0f202,_0x1b8fe1);const _0x138756=_0x3c45f1(_0xa0f202),_0x5f2678=[];for(let _0x4aff0b=0x0;_0x4aff0b<_0x138756[_0x277417(0x2b6)];_0x4aff0b+=0x6){_0x5f2678['push'](_0x138756[_0x277417(0x2e9)](_0x4aff0b,_0x4aff0b+0x6));}return _0x5f2678['join']('-');}function _0x5f4f35(_0x4e9063){const _0x4fa160=_0x509675;if(typeof _0x4e9063!==_0x4fa160(0x2e7))throw new Error(_0x4fa160(0x38a));const _0x37043c=_0xaed5b6(_0x4e9063[_0x4fa160(0x24b)](/-/g,''));if(_0x37043c['length']!==0x4d)throw new Error(_0x4fa160(0x322)+_0x37043c[_0x4fa160(0x2b6)]);let _0x20cec6=0x0;const _0x424cf8=_0x37043c[_0x4fa160(0x276)](_0x20cec6++),_0x2cefef=_0x37043c[_0x4fa160(0x2e9)](_0x20cec6,_0x20cec6+0x8);_0x20cec6+=0x8;const _0x35e9ad=_0x37043c[_0x4fa160(0x2bc)](_0x20cec6);_0x20cec6+=0x4;const _0x237167=_0x37043c['slice'](_0x20cec6);return{'v':_0x424cf8,'licenseHash':_0x2cefef,'expiry':_0x35e9ad,'sig':_0x237167};}function _0x50f5c5({tokenString:_0x864941,nodeId:_0x3d2094,rawBlobBuf:_0x39d1a6,pubKeyPem:_0x520d8d,pubFingerprint:_0x41684f}){const _0xd27620=_0x509675;let _0x3b93f0;try{_0x3b93f0=_0x5f4f35(_0x864941);}catch(_0x4f4e16){return{'valid':![],'reason':_0xd27620(0x209)};}const _0x284082=_0x2c5174(_0x39d1a6);if(!_0x284082[_0xd27620(0x42b)](_0x3b93f0[_0xd27620(0x376)]))return{'valid':![],'reason':'LICENSE_HASH_MISMATCH'};const {pinHmac:_0x5dbd0f}=_0xb120e0(_0x3d2094,_0x284082,_0x41684f),_0x394113=Buffer[_0xd27620(0x2d9)](0x4);_0x394113[_0xd27620(0x395)](_0x3b93f0[_0xd27620(0x14e)],0x0);const _0x25c6e4=Buffer['concat']([Buffer[_0xd27620(0x418)]([_0x3b93f0['v']]),_0x5dbd0f[_0xd27620(0x2e9)](0x0,0x5),_0x3b93f0['licenseHash'],_0x394113]);try{const _0x168e9b=_0x6cb2cd[_0xd27620(0x19a)](null,_0x25c6e4,_0x520d8d,_0x3b93f0['sig']);if(!_0x168e9b)return{'valid':![],'reason':_0xd27620(0x213)};}catch(_0x2987cb){return{'valid':![],'reason':_0xd27620(0x213)};}if(_0x3b93f0[_0xd27620(0x14e)]<Date['now']()/0x3e8)return{'valid':![],'reason':_0xd27620(0x219)};return{'valid':!![],'reason':'ok'};}function _0x36084d(_0x1eeffb){const _0x22a7b0=_0x509675;if(typeof _0x1eeffb!=='string')return _0x22a7b0(0x2a1);const _0xc9dc74=_0x1eeffb[_0x22a7b0(0x336)]();if(_0xc9dc74[_0x22a7b0(0x397)]('/')||_0xc9dc74[_0x22a7b0(0x397)]('./')||_0xc9dc74[_0x22a7b0(0x397)](_0x22a7b0(0x26f))||/^[A-Za-z]:[\\/]/[_0x22a7b0(0x3e4)](_0xc9dc74))return _0x22a7b0(0x3b5);if(/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i['test'](_0xc9dc74))return _0x22a7b0(0x415);const _0x7d8167=_0xc9dc74[_0x22a7b0(0x24b)](/[\s-]+/g,'')['length'];if(_0x7d8167===0x7c)return _0x22a7b0(0x21a);if(_0x7d8167>=0x95&&_0x7d8167<=0xfc)return _0x22a7b0(0x300);return _0x22a7b0(0x2a1);}return okdbLicenseCodec={'toBase32':_0x3c45f1,'fromBase32':_0xaed5b6,'encodeLicensePayload':_0x4ea41f,'decodeLicensePayload':_0x381d6b,'encodeLicenseBlob':_0xa29b28,'decodeLicenseBlob':_0x9429e,'licenseHash':_0x2c5174,'derivePin':_0xb120e0,'encodeActivationToken':_0x7c54fc,'decodeActivationToken':_0x5f4f35,'verifyActivation':_0x50f5c5,'detectInputType':_0x36084d,'FEATURE_NAMES':_0x2bd878,'LICENSE_TYPE_STANDARD':_0x32084c,'LICENSE_TYPE_OPEN':_0x4bc3b2,'OPEN_LICENSE_MAX_DURATION_MS':_0x3f65d5},okdbLicenseCodec;}var okdbError,hasRequiredOkdbError;function requireOkdbError(){if(hasRequiredOkdbError)return okdbError;hasRequiredOkdbError=0x1;class _0x283681 extends Error{constructor(_0x4987bf,_0xf2bfd3,_0x180a36={}){const _0x5b3b7e=_0x48ce;super(_0x4987bf),this[_0x5b3b7e(0x188)]='OKDBError',this[_0x5b3b7e(0x362)]=_0xf2bfd3,this[_0x5b3b7e(0x28e)]=_0x180a36,_0x180a36[_0x5b3b7e(0x3b7)]&&(this[_0x5b3b7e(0x3b7)]=_0x180a36['cause']),Error[_0x5b3b7e(0x364)](this,this[_0x5b3b7e(0x1a6)]);}}class _0x488004 extends _0x283681{constructor(_0x4d8632,_0x354240,_0x5cb4ae,_0x4caa2e){const _0x4f2fdc=_0x48ce;super(_0x4f2fdc(0x1a9)+_0x4d8632+'@'+_0x354240+':\x20expected\x20'+_0x5cb4ae+',\x20got\x20'+_0x4caa2e,_0x4f2fdc(0x179),{'type':_0x4d8632,'key':_0x354240,'expectedVersion':_0x5cb4ae,'actualVersion':_0x4caa2e}),this[_0x4f2fdc(0x188)]='OKDBVersionMismatchError';}}class _0x20a14d extends _0x283681{constructor(_0x4a853c,_0x41e3ae){const _0x7d6eaf=_0x48ce;super(_0x4a853c+'@'+_0x41e3ae+_0x7d6eaf(0x200),'NOT_FOUND',{'type':_0x4a853c,'key':_0x41e3ae}),this[_0x7d6eaf(0x188)]=_0x7d6eaf(0x15d);}}class _0x28bab1 extends _0x283681{constructor(_0x1c9141,_0x6d07a2){const _0x262e1d=_0x48ce;super(_0x1c9141+'@'+_0x6d07a2+_0x262e1d(0x17e),_0x262e1d(0x1ce),{'type':_0x1c9141,'key':_0x6d07a2}),this['name']=_0x262e1d(0x168);}}class _0x55d533 extends _0x283681{constructor(_0x3cbbc0,_0x5b4d34){const _0x24242f=_0x48ce,_0x2f8f0a=typeof _0x5b4d34;super(_0x24242f(0x1da)+_0x3cbbc0+_0x24242f(0x248)+_0x2f8f0a+_0x24242f(0x3ae)+_0x5b4d34,_0x24242f(0x423),{'index':_0x3cbbc0,'key':_0x5b4d34,'keyType':_0x2f8f0a}),this['name']=_0x24242f(0x16e);}}class _0x4fc76c extends _0x283681{constructor(_0x1c83c9){const _0x395821=_0x48ce,_0x503253=typeof _0x1c83c9;super('Invalid\x20primary\x20key\x20type:\x20'+_0x503253+'.\x20Primary\x20keys\x20must\x20be\x20string\x20or\x20number.\x20Got:\x20'+_0x1c83c9,_0x395821(0x3a7),{'key':_0x1c83c9,'keyType':_0x503253}),this['name']=_0x395821(0x32f);}}class _0x54348e extends _0x283681{constructor(_0x4175e0){const _0x6dd6bc=_0x48ce;super(_0x6dd6bc(0x254)+_0x4175e0+_0x6dd6bc(0x391),_0x6dd6bc(0x162),{'type':_0x4175e0}),this['name']=_0x6dd6bc(0x400);}}class _0x5919f8 extends _0x283681{constructor(_0x549012){const _0x156a55=_0x48ce;super(_0x156a55(0x254)+_0x549012+_0x156a55(0x2b3),_0x156a55(0x341),{'type':_0x549012}),this['name']='OKDBTypeAlreadyRegisteredError';}}class _0x46c8b5 extends _0x283681{constructor(_0x22f7f9,_0x49efa1){const _0x22ddc4=_0x48ce;super(_0x22ddc4(0x2bb)+_0x49efa1+_0x22ddc4(0x16b)+_0x22f7f9+'\x27\x20doesn\x27t\x20exist',_0x22ddc4(0x2e5),{'type':_0x22f7f9,'index':_0x49efa1}),this[_0x22ddc4(0x188)]='OKDBIndexNotRegisteredError';}}class _0x24feb3 extends _0x283681{constructor(_0x7e6ab,_0xa1dd44){const _0x1b1ae5=_0x48ce;super(_0x1b1ae5(0x2bb)+_0xa1dd44+_0x1b1ae5(0x16b)+_0x7e6ab+_0x1b1ae5(0x171),'INDEX_ALREADY_REGISTERED',{'type':_0x7e6ab,'index':_0xa1dd44}),this['name']=_0x1b1ae5(0x38c);}}class _0x581cf4 extends _0x283681{constructor(_0x225036,_0x4d444d={}){const _0x3bc7b4=_0x48ce;super(_0x225036,_0x3bc7b4(0x35e),_0x4d444d),this[_0x3bc7b4(0x188)]='OKDBInvalidValueError';}}class _0x486c27 extends _0x283681{constructor(_0x3b681b,_0x84a2ea,_0xac4057,_0x1a4ad4,_0x195521){const _0x45a64b=_0x48ce;super(_0x45a64b(0x146)+_0x3b681b+'@'+_0x84a2ea+_0x45a64b(0x230)+_0xac4057+_0x45a64b(0x428)+_0x1a4ad4+'\x27,\x20cannot\x20map\x20to\x20\x27'+_0x195521+'\x27',_0x45a64b(0x32c),{'type':_0x3b681b,'index':_0x84a2ea,'indexKey':_0xac4057,'existingKey':_0x1a4ad4,'conflictingKey':_0x195521}),this[_0x45a64b(0x188)]='OKDBUniqueConstraintError';}}class _0x77700a extends _0x283681{constructor(_0xeca9c2,_0x22dec0,_0x4cdead){const _0x4e4c5a=_0x48ce;super('Schema\x20validation\x20failed\x20for\x20'+_0xeca9c2+'@'+_0x22dec0,_0x4e4c5a(0x40e),{'type':_0xeca9c2,'key':_0x22dec0,'errors':_0x4cdead}),this[_0x4e4c5a(0x188)]=_0x4e4c5a(0x379),this[_0x4e4c5a(0x3de)]=_0xeca9c2,this[_0x4e4c5a(0x373)]=_0x22dec0,this['errors']=_0x4cdead;}}class _0x58f3c0 extends _0x283681{constructor(_0x2d17b3,_0x24e85a){const _0x226629=_0x48ce;super('Cannot\x20set\x20enforce\x20schema\x20on\x20'+_0x2d17b3+':\x20'+_0x24e85a[_0x226629(0x2b6)]+'\x20documents\x20fail\x20validation',_0x226629(0x1c4),{'type':_0x2d17b3,'failures':_0x24e85a}),this['name']=_0x226629(0x240),this[_0x226629(0x3de)]=_0x2d17b3,this[_0x226629(0x231)]=_0x24e85a;}}class _0x4f3778 extends _0x283681{constructor(_0x43ba82,_0x2fe757,_0x19d05c,_0x16911c,_0x2175f8){const _0x232af6=_0x48ce;super(_0x232af6(0x1e5)+_0x43ba82+'@'+_0x2fe757+'.'+_0x19d05c+'\x20references\x20'+_0x16911c+'@'+_0x2175f8+'\x20which\x20does\x20not\x20exist',_0x232af6(0x1e6),{'sourceType':_0x43ba82,'sourceKey':_0x2fe757,'fieldPath':_0x19d05c,'targetType':_0x16911c,'targetKey':_0x2175f8}),this[_0x232af6(0x188)]=_0x232af6(0x197),this[_0x232af6(0x267)]=_0x43ba82,this[_0x232af6(0x224)]=_0x2fe757,this[_0x232af6(0x3ff)]=_0x19d05c,this[_0x232af6(0x189)]=_0x16911c,this['targetKey']=_0x2175f8;}}class _0x28c68b extends _0x283681{constructor(_0x26ce34,_0x1631d0,_0x2ba76a){const _0x44a170=_0x48ce;super('Cannot\x20delete\x20'+_0x26ce34+'@'+_0x1631d0+':\x20'+_0x2ba76a['length']+_0x44a170(0x2d5),'FOREIGN_KEY_DELETE_RESTRICTED',{'targetType':_0x26ce34,'targetKey':_0x1631d0,'references':_0x2ba76a}),this[_0x44a170(0x188)]=_0x44a170(0x2d3),this[_0x44a170(0x189)]=_0x26ce34,this[_0x44a170(0x3f8)]=_0x1631d0,this[_0x44a170(0x305)]=_0x2ba76a;}}class _0x29862e extends _0x283681{constructor(_0x29bcaf,_0x43c640,_0x197cbf){const _0x4b74a8=_0x48ce;super(_0x4b74a8(0x349)+_0x43c640+_0x4b74a8(0x1ab)+_0x29bcaf+_0x4b74a8(0x204)+_0x197cbf[_0x4b74a8(0x158)](_0x4598c3=>_0x4598c3[_0x4b74a8(0x435)]+':'+_0x4598c3[_0x4b74a8(0x188)])[_0x4b74a8(0x3db)](',\x20'),_0x4b74a8(0x227),{'type':_0x29bcaf,'index':_0x43c640,'usedBy':_0x197cbf}),this['name']=_0x4b74a8(0x37d);}}return okdbError={'OKDBError':_0x283681,'OKDBVersionMismatchError':_0x488004,'OKDBNotFoundError':_0x20a14d,'OKDBAlreadyExistsError':_0x28bab1,'OKDBInvalidIndexKeyError':_0x55d533,'OKDBInvalidPrimaryKeyError':_0x4fc76c,'OKDBTypeNotRegisteredError':_0x54348e,'OKDBTypeAlreadyRegisteredError':_0x5919f8,'OKDBIndexNotRegisteredError':_0x46c8b5,'OKDBIndexAlreadyRegisteredError':_0x24feb3,'OKDBInvalidValueError':_0x581cf4,'OKDBUniqueConstraintError':_0x486c27,'OKDBSchemaValidationError':_0x77700a,'OKDBSchemaCollectionError':_0x58f3c0,'OKDBForeignKeyError':_0x4f3778,'OKDBForeignKeyDeleteError':_0x28c68b,'OKDBIndexHasConsumersError':_0x29862e},okdbError;}var okdbEnums,hasRequiredOkdbEnums;function requireOkdbEnums(){const _0xb783fb=_0x2a866b;if(hasRequiredOkdbEnums)return okdbEnums;hasRequiredOkdbEnums=0x1;const _0x2936a5={'PUT':_0xb783fb(0x33e),'REMOVE':_0xb783fb(0x147),'INDEX_DROP':_0xb783fb(0x16d),'INDEX_REGISTER':_0xb783fb(0x3d7),'INDEX_RESET':_0xb783fb(0x1a1),'TYPE_REGISTER':_0xb783fb(0x252),'TYPE_DROP':'dropType','FTS_REGISTER':_0xb783fb(0x443),'FTS_DROP':'dropFts','FTS_RESET':_0xb783fb(0x426),'SCHEMA_SET':'setSchema','SCHEMA_DROP':'dropSchema','TTL_SET':_0xb783fb(0x1e3),'TTL_CLEAR':_0xb783fb(0x39a)},_0x3f33b6={'SYSTEM_READY':'system:ready','SYSTEM_STOPPED':_0xb783fb(0x1c2),'SYSTEM_CLOCK_CHANGE':_0xb783fb(0x2cd),'SYSTEM_POKE':_0xb783fb(0x34e),'SYSTEM_DRAIN':'system:drain','SYSTEM_BUS_STATE_CHANGE':_0xb783fb(0x25e),'ITEM_CREATE':_0xb783fb(0x430),'ITEM_UPDATE':_0xb783fb(0x20c),'ITEM_REMOVE':_0xb783fb(0x1d9),'INDEX_RESET':_0xb783fb(0x429),'INDEX_READY':'index:ready','INDEX_PROGRESS':_0xb783fb(0x31a),'INDEX_DROP':_0xb783fb(0x266),'INDEX_REGISTERED':_0xb783fb(0x275),'FTS_REGISTERED':_0xb783fb(0x13c),'FTS_DROP':_0xb783fb(0x1f9),'FTS_RESET':_0xb783fb(0x15e),'SCHEMA_SET':_0xb783fb(0x3e6),'SCHEMA_DROP':_0xb783fb(0x3df),'UNIQUE_VIOLATION':_0xb783fb(0x1b7),'UNIQUE_VIOLATION_RESOLVED':_0xb783fb(0x163),'REF_VIOLATION':_0xb783fb(0x2b5),'REF_VIOLATION_RESOLVED':_0xb783fb(0x241),'SYNC_APPLY':_0xb783fb(0x41e),'TXN_START':_0xb783fb(0x2a3),'TXN_END':_0xb783fb(0x331),'TXN_ROLLBACK':_0xb783fb(0x176),'TYPE_REGISTERED':_0xb783fb(0x277),'TYPE_DROP':_0xb783fb(0x374),'ENV_OPENED':_0xb783fb(0x279),'ENV_REMOVED':_0xb783fb(0x293),'TTL_EXPIRED':'ttl:expired','TTL_SET':_0xb783fb(0x2da),'TTL_CLEAR':'ttl:clear','LICENSE_INVALID':'license:invalid','LICENSE_ADDED':_0xb783fb(0x232),'LICENSE_ACTIVATED':'license:activated','LICENSE_REMOVED':_0xb783fb(0x302)},_0x3f2662={'CREATING':'creating','RESETTING':_0xb783fb(0x2cf),'READY':_0xb783fb(0x24e),'DROPPING':_0xb783fb(0x327),'WAITING':_0xb783fb(0x424)},_0x30a53b={'CREATED':_0xb783fb(0x2f9),'STARTING':_0xb783fb(0x36a),'STARTED':_0xb783fb(0x3d1),'STOPPING':_0xb783fb(0x1f3),'STOPPED':_0xb783fb(0x382)},_0x26e37a={'CREATING':_0xb783fb(0x20d),'READY':'ready','HALTED':_0xb783fb(0x413),'STOPPED':_0xb783fb(0x382),'RESETTING':'resetting'},_0xb80e29=Object['freeze']({'POKE':'bus:poke','DRAIN':_0xb783fb(0x1d4)});return okdbEnums={'BUS_EVENTS':_0xb80e29,'CHANGE_ACTIONS':_0x2936a5,'EVENTS':_0x3f33b6,'INDEX_STATE':_0x3f2662,'OKDB_STATE':_0x30a53b,'VIEW_STATE':_0x26e37a},okdbEnums;}var okdbPubkey,hasRequiredOkdbPubkey;function requireOkdbPubkey(){const _0x47ec71=_0x2a866b;if(hasRequiredOkdbPubkey)return okdbPubkey;hasRequiredOkdbPubkey=0x1;const _0x46d7fb=require$$1,_0x49e506=require$$1$1,_0x13ebcd=require$$0,_0x5b61c6=_0x46d7fb[_0x47ec71(0x172)](_0x49e506[_0x47ec71(0x3db)](__dirname,'keys/public.pem'),_0x47ec71(0x2d0))[_0x47ec71(0x336)](),_0x1ea2d3=_0x13ebcd[_0x47ec71(0x3d9)](_0x5b61c6)[_0x47ec71(0x145)]({'type':'spki','format':_0x47ec71(0x207)}),_0x3fccb2=_0x13ebcd[_0x47ec71(0x1b6)](_0x47ec71(0x2a5))['update'](_0x1ea2d3)['digest'](_0x47ec71(0x1ae))[_0x47ec71(0x2e9)](0x0,0x10);return okdbPubkey={'PUBLIC_KEY_PEM':_0x5b61c6,'PUB_FINGERPRINT':_0x3fccb2},okdbPubkey;}var okdbLicense,hasRequiredOkdbLicense;function requireOkdbLicense(){const _0x36478d=_0x2a866b;if(hasRequiredOkdbLicense)return okdbLicense;hasRequiredOkdbLicense=0x1;const _0x1bfc3b=require$$0,{OKDBError:_0x455358}=requireOkdbError(),{EVENTS:_0x224dce}=requireOkdbEnums(),_0x3de7d5=requireOkdbLicenseCodec(),{LICENSE_TYPE_OPEN:_0x7883af,OPEN_LICENSE_MAX_DURATION_MS:_0x50899a}=_0x3de7d5,_0x40d2e6=requireOkdbPubkey(),_0x296695={'LICENSED_BUILD':_0x36478d(0x28c),'PUBLIC_KEY_PEM':_0x40d2e6[_0x36478d(0x352)],'PUB_FINGERPRINT':_0x40d2e6[_0x36478d(0x2e3)],'LICENSE_EXPIRED_ACTION':'log'},_0x516b6a=_0x36478d(0x334),_0x57cff5={'features':{'sync':![],'embeddings':![],'engines':![],'fts':!![],'timeMachine':![],'views':!![],'mcp':!![],'files':!![]},'limits':{'envs':0x2,'typesPerEnv':0xa,'syncPeers':0x0,'maxWrites':0xf4240},'_isFree':!![]};async function _0x2e927e(_0x2ca7a3){const _0x36da49=_0x36478d;!_0x2ca7a3[_0x36da49(0x384)](_0x516b6a)&&await _0x2ca7a3[_0x36da49(0x252)](_0x516b6a);}class _0x2554c2{constructor(_0xaaf46){const _0x65074c=_0x36478d;this[_0x65074c(0x2a0)]=_0xaaf46,this[_0x65074c(0x20b)]=null;}async[_0x36478d(0x2dc)](){const _0x41ea0b=_0x36478d,_0x1b6c4d=this[_0x41ea0b(0x2a0)][_0x41ea0b(0x425)];if(!_0x1b6c4d||!_0x1b6c4d['hasType'](_0x516b6a)){this[_0x41ea0b(0x20b)]=null;return;}const _0x585413=this['okdb']['id'];let _0x5ec8c7=null;for(const {key:_0x360e02,value:_0x3ed493}of _0x1b6c4d['getRange'](_0x516b6a)){const _0x2cc2f1=this['_computeStatus'](_0x3ed493,_0x585413);_0x2cc2f1===_0x41ea0b(0x140)&&!_0x5ec8c7&&(_0x5ec8c7={..._0x3ed493,'id':_0x360e02,'status':_0x2cc2f1});}this[_0x41ea0b(0x20b)]=_0x5ec8c7;if(this['_active']&&this[_0x41ea0b(0x20b)]['licenseType']===_0x7883af){const _0x17cb3f=Math[_0x41ea0b(0x2b0)]((this[_0x41ea0b(0x20b)][_0x41ea0b(0x389)]-Date[_0x41ea0b(0x208)]())/0x5265c00);this[_0x41ea0b(0x2a0)]['log']?.[_0x41ea0b(0x40f)]('⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20'+_0x17cb3f+_0x41ea0b(0x3d4),{'feature':_0x41ea0b(0x1ac),'licensee':this[_0x41ea0b(0x20b)][_0x41ea0b(0x22c)],'expiresAt':new Date(this[_0x41ea0b(0x20b)][_0x41ea0b(0x389)])[_0x41ea0b(0x19f)]()});}}['_computeStatus'](_0x13bdbf,_0x44d4c1){const _0x22b305=_0x36478d;if(!_0x13bdbf[_0x22b305(0x300)])return _0x22b305(0x403);let _0x3cb349;try{_0x3cb349=_0x3de7d5[_0x22b305(0x22b)](_0x13bdbf[_0x22b305(0x300)]);}catch(_0x4f0841){return'invalid';}try{const _0x3047b5=_0x1bfc3b['verify'](null,_0x3cb349[_0x22b305(0x271)],_0x296695[_0x22b305(0x352)],_0x3cb349[_0x22b305(0x338)]);if(!_0x3047b5)return _0x22b305(0x403);}catch(_0x29e9c9){return'invalid';}if(_0x3cb349[_0x22b305(0x278)][_0x22b305(0x389)]<=Date[_0x22b305(0x208)]())return _0x22b305(0x270);if(_0x3cb349[_0x22b305(0x278)][_0x22b305(0x442)]===_0x7883af)return _0x22b305(0x140);if(!_0x13bdbf['activation'])return _0x22b305(0x1d6);const _0x5d58ef=_0x3de7d5[_0x22b305(0x3fd)]({'tokenString':_0x13bdbf[_0x22b305(0x21a)],'nodeId':_0x44d4c1,'rawBlobBuf':_0x3cb349[_0x22b305(0x15b)],'pubKeyPem':_0x296695[_0x22b305(0x352)],'pubFingerprint':_0x296695[_0x22b305(0x2e3)]});if(_0x5d58ef['reason']===_0x22b305(0x256)||_0x5d58ef[_0x22b305(0x1c6)]===_0x22b305(0x213))return _0x22b305(0x3c8);if(_0x5d58ef[_0x22b305(0x1c6)]===_0x22b305(0x219))return _0x22b305(0x270);if(!_0x5d58ef[_0x22b305(0x440)])return _0x22b305(0x3c8);return'active';}get['active'](){return this['_active'];}get[_0x36478d(0x3e8)](){const _0x3c0812=_0x36478d;return this[_0x3c0812(0x20b)]??_0x57cff5;}['assertFeature'](_0x255931){const _0x4f3e7a=_0x36478d;if(_0x296695['LICENSED_BUILD']!==_0x4f3e7a(0x28c))return;const _0x4f367c=this[_0x4f3e7a(0x3e8)];if(!_0x4f367c[_0x4f3e7a(0x199)]?.[_0x255931]){const _0x2dcb24=_0x4f367c[_0x4f3e7a(0x3c0)]?_0x4f3e7a(0x36d)+_0x255931+'.\x20Add\x20a\x20license\x20that\x20includes\x20\x22'+_0x255931+'\x22\x20to\x20enable\x20it.':_0x4f3e7a(0x3c7)+_0x255931+_0x4f3e7a(0x317)+_0x255931+'\x22.';throw new _0x455358(_0x2dcb24,_0x4f3e7a(0x348),{'feature':_0x255931});}}[_0x36478d(0x3bf)](_0x2d2ce0){const _0x47b696=_0x36478d;if(_0x296695[_0x47b696(0x2c6)]!==_0x47b696(0x28c))return!![];return!!this[_0x47b696(0x3e8)][_0x47b696(0x199)]?.[_0x2d2ce0];}[_0x36478d(0x312)](_0x4449d9,_0x3a5940){const _0x248774=_0x36478d;if(_0x296695[_0x248774(0x2c6)]!==_0x248774(0x28c))return;const _0x3216da=this[_0x248774(0x3e8)],_0x2e21e6=_0x3216da[_0x248774(0x3c6)]?.[_0x4449d9];if(_0x2e21e6===null||_0x2e21e6===undefined||_0x2e21e6===0x0)return;if(_0x3a5940>=_0x2e21e6)throw new _0x455358('License\x20limit\x20exceeded:\x20'+_0x4449d9+'\x20('+_0x3a5940+'/'+_0x2e21e6+')',_0x248774(0x183),{'limit':_0x4449d9,'current':_0x3a5940,'max':_0x2e21e6});}async['addLicense'](_0x46d94f){const _0x564f9e=_0x36478d;let _0x1b1c15;try{_0x1b1c15=_0x3de7d5[_0x564f9e(0x22b)](_0x46d94f);}catch(_0xe24f62){throw new _0x455358(_0x564f9e(0x2d8)+_0xe24f62[_0x564f9e(0x1bd)],'LICENSE_INVALID');}let _0x28739a;try{_0x28739a=_0x1bfc3b[_0x564f9e(0x19a)](null,_0x1b1c15[_0x564f9e(0x271)],_0x296695[_0x564f9e(0x352)],_0x1b1c15[_0x564f9e(0x338)]);}catch(_0x31d50c){throw new _0x455358(_0x564f9e(0x1b5)+_0x31d50c[_0x564f9e(0x1bd)],_0x564f9e(0x319));}if(!_0x28739a)throw new _0x455358(_0x564f9e(0x23f)+(_0x564f9e(0x19d)+_0x296695[_0x564f9e(0x2e3)]+'.\x20')+_0x564f9e(0x371),'LICENSE_INVALID',{'expectedFingerprint':_0x296695[_0x564f9e(0x2e3)]});if(_0x1b1c15[_0x564f9e(0x278)][_0x564f9e(0x442)]===_0x7883af){const _0x54d337=_0x1b1c15[_0x564f9e(0x278)][_0x564f9e(0x389)]-_0x1b1c15[_0x564f9e(0x278)][_0x564f9e(0x43c)];if(_0x54d337>_0x50899a)throw new _0x455358(_0x564f9e(0x27d)+Math['ceil'](_0x54d337/(0x1e*0x5265c00))+_0x564f9e(0x444),_0x564f9e(0x319));}const _0x6380c5=this[_0x564f9e(0x2a0)][_0x564f9e(0x425)];await _0x2e927e(_0x6380c5);const _0x176cb1=_0x3de7d5[_0x564f9e(0x376)](_0x1b1c15['rawBuf'])[_0x564f9e(0x23e)](_0x564f9e(0x1ae));for(const {value:_0x204ea1}of _0x6380c5['getRange'](_0x516b6a)){if(_0x204ea1['_licenseHash']===_0x176cb1)throw new _0x455358(_0x564f9e(0x378),_0x564f9e(0x319));}const _0x362b87=_0x1bfc3b['randomUUID'](),_0x1c8e84={'blob':_0x46d94f,'activation':null,'addedAt':Date[_0x564f9e(0x208)](),'_licenseHash':_0x176cb1,'licensee':_0x1b1c15[_0x564f9e(0x278)][_0x564f9e(0x22c)],'expiresAt':_0x1b1c15[_0x564f9e(0x278)]['expiresAt'],'features':_0x1b1c15['decoded'][_0x564f9e(0x199)],'limits':_0x1b1c15[_0x564f9e(0x278)][_0x564f9e(0x3c6)],'licenseType':_0x1b1c15[_0x564f9e(0x278)]['licenseType']};return await _0x6380c5[_0x564f9e(0x33e)](_0x516b6a,_0x362b87,_0x1c8e84),{'id':_0x362b87,..._0x1c8e84};}async[_0x36478d(0x1b1)](_0x43e8ce){const _0x5485ab=_0x36478d;let _0x50d222;try{_0x50d222=_0x3de7d5[_0x5485ab(0x3fc)](_0x43e8ce);}catch(_0x4a574f){throw new _0x455358('Invalid\x20activation\x20token:\x20'+_0x4a574f['message'],'LICENSE_ACTIVATION_INVALID');}const _0x23c7b5=_0x50d222['licenseHash']['toString'](_0x5485ab(0x1ae)),_0xad4eea=this['okdb'][_0x5485ab(0x425)];if(!_0xad4eea||!_0xad4eea['hasType'](_0x516b6a))throw new _0x455358(_0x5485ab(0x3c9),_0x5485ab(0x344));let _0x4d1b82=null,_0x272935=null;for(const {key:_0x5cc80b,value:_0x4b1f4e}of _0xad4eea['getRange'](_0x516b6a)){if(_0x4b1f4e[_0x5485ab(0x420)]===_0x23c7b5){_0x4d1b82=_0x5cc80b,_0x272935=_0x4b1f4e;break;}}if(!_0x4d1b82)throw new _0x455358('No\x20license\x20found\x20matching\x20this\x20activation\x20token',_0x5485ab(0x344));const {rawBuf:_0x4e2ce1}=_0x3de7d5[_0x5485ab(0x22b)](_0x272935['blob']),_0x95af6d=_0x3de7d5[_0x5485ab(0x3fd)]({'tokenString':_0x43e8ce,'nodeId':this[_0x5485ab(0x2a0)]['id'],'rawBlobBuf':_0x4e2ce1,'pubKeyPem':_0x296695[_0x5485ab(0x352)],'pubFingerprint':_0x296695['PUB_FINGERPRINT']});if(!_0x95af6d[_0x5485ab(0x440)])throw new _0x455358(_0x5485ab(0x1e9)+_0x95af6d['reason'],_0x5485ab(0x344),{'reason':_0x95af6d[_0x5485ab(0x1c6)]});const _0x4cbb2b={..._0x272935,'activation':_0x43e8ce};return await _0xad4eea['update'](_0x516b6a,_0x4d1b82,_0x4cbb2b),{'id':_0x4d1b82,..._0x4cbb2b};}async[_0x36478d(0x3fa)](_0x5228b2){const _0x4a3db2=_0x36478d,_0x24f200=this[_0x4a3db2(0x2a0)]['_systemEnv'];if(!_0x24f200||!_0x24f200[_0x4a3db2(0x384)](_0x516b6a))return;await _0x24f200[_0x4a3db2(0x147)](_0x516b6a,_0x5228b2);}async[_0x36478d(0x297)](){const _0x454ec6=_0x36478d,_0x49484a=this[_0x454ec6(0x2a0)]['_systemEnv'];if(!_0x49484a||!_0x49484a[_0x454ec6(0x384)](_0x516b6a))return[];const _0x137d90=this[_0x454ec6(0x2a0)]['id'],_0x542bd9=[];for(const {key:_0x1d1d37,value:_0xfe8573}of _0x49484a[_0x454ec6(0x148)](_0x516b6a)){const _0x4b70ca=this[_0x454ec6(0x1fd)](_0xfe8573,_0x137d90);_0x542bd9[_0x454ec6(0x1ca)]({..._0xfe8573,'id':_0x1d1d37,'status':_0x4b70ca});}return _0x542bd9;}[_0x36478d(0x316)](){const _0xb3b9c0=_0x36478d,_0x98374f=this[_0xb3b9c0(0x2a0)][_0xb3b9c0(0x425)];if(!_0x98374f||!_0x98374f[_0xb3b9c0(0x384)](_0x516b6a))return[];const _0xf9d9aa=this[_0xb3b9c0(0x2a0)]['id'],_0x2e5291=[];for(const {key:_0x53a701,value:_0x4ac14e}of _0x98374f[_0xb3b9c0(0x148)](_0x516b6a)){if(_0x4ac14e[_0xb3b9c0(0x420)]){if(_0x4ac14e[_0xb3b9c0(0x442)]===_0x7883af)_0x2e5291[_0xb3b9c0(0x1ca)]({'licenseId':_0x53a701,'pin':null});else{const _0x55d259=Buffer[_0xb3b9c0(0x418)](_0x4ac14e[_0xb3b9c0(0x420)],'hex'),{pin:_0x1a13ef}=_0x3de7d5[_0xb3b9c0(0x1b3)](_0xf9d9aa,_0x55d259,_0x296695[_0xb3b9c0(0x2e3)]);_0x2e5291[_0xb3b9c0(0x1ca)]({'licenseId':_0x53a701,'pin':_0x1a13ef});}}}return _0x2e5291;}async[_0x36478d(0x177)](){const _0x6a81fc=_0x36478d,_0x28bb70=this[_0x6a81fc(0x20b)];await this['reload']();if(this[_0x6a81fc(0x20b)]&&this[_0x6a81fc(0x20b)][_0x6a81fc(0x442)]===_0x7883af){const _0x4dd9b2=Math[_0x6a81fc(0x2b0)]((this[_0x6a81fc(0x20b)][_0x6a81fc(0x389)]-Date[_0x6a81fc(0x208)]())/0x5265c00);this[_0x6a81fc(0x2a0)][_0x6a81fc(0x445)]?.[_0x6a81fc(0x40f)](_0x6a81fc(0x150)+_0x4dd9b2+_0x6a81fc(0x3d4),{'feature':_0x6a81fc(0x1ac),'licensee':this[_0x6a81fc(0x20b)][_0x6a81fc(0x22c)],'expiresAt':new Date(this[_0x6a81fc(0x20b)][_0x6a81fc(0x389)])[_0x6a81fc(0x19f)]()});}if(_0x28bb70&&!this['_active']){this['okdb'][_0x6a81fc(0x445)]?.[_0x6a81fc(0x40f)](_0x6a81fc(0x398),{'feature':_0x6a81fc(0x1ac)}),this[_0x6a81fc(0x2a0)][_0x6a81fc(0x2c2)]?.[_0x6a81fc(0x29e)](_0x224dce[_0x6a81fc(0x319)],{'previous':_0x28bb70});const _0x2bb43c=this['okdb'][_0x6a81fc(0x190)]?.[_0x6a81fc(0x409)]??_0x296695['LICENSE_EXPIRED_ACTION'];_0x2bb43c==='shutdown'&&(this[_0x6a81fc(0x2a0)]['log']?.[_0x6a81fc(0x255)](_0x6a81fc(0x43f),{'feature':_0x6a81fc(0x1ac)}),this[_0x6a81fc(0x2a0)]['close']()[_0x6a81fc(0x149)](()=>{})['finally'](()=>process[_0x6a81fc(0x225)](0x1)));}}}return okdbLicense={'LicenseChecker':_0x2554c2,'_C':_0x296695},okdbLicense;}var okdbShell,hasRequiredOkdbShell;function requireOkdbShell(){const _0x5de947=_0x2a866b;if(hasRequiredOkdbShell)return okdbShell;hasRequiredOkdbShell=0x1;const _0x4ca7ae=require$$0$2,_0x149d26=require$$1,_0x130f00=require$$2$1,_0xa61962=require$$1$1,_0x1276f3=_0xa61962['join'](_0x130f00['homedir'](),_0x5de947(0x16f)),_0x384f74=0x3e8,_0x22c899={'reset':_0x5de947(0x144),'bold':_0x5de947(0x1d7),'dim':_0x5de947(0x42f),'red':_0x5de947(0x412),'green':'\x1b[32m','yellow':_0x5de947(0x41f),'blue':_0x5de947(0x29a),'magenta':_0x5de947(0x249),'cyan':_0x5de947(0x17b),'white':_0x5de947(0x205),'gray':_0x5de947(0x282)},_0x5cc774=!process[_0x5de947(0x3c1)]['isTTY']||!!process.env.NO_COLOR,_0x15dc36=(_0x21c329,_0x2dbc9e)=>_0x5cc774?_0x2dbc9e:''+_0x21c329+_0x2dbc9e+_0x22c899[_0x5de947(0x3f6)],_0x21c11e={'error':_0x22c899[_0x5de947(0x2b7)],'warn':_0x22c899[_0x5de947(0x350)],'info':_0x22c899[_0x5de947(0x1c0)],'debug':_0x22c899[_0x5de947(0x295)]},_0x4f2d79={'debug':0x0,'info':0x1,'warn':0x2,'error':0x3};function _0x47290a(_0x420b9e,_0x1a4bdf=_0x5de947(0x356)){const _0x5af654=_0x5de947,{level:_0x39af25,msg:_0x5093b6,meta:_0x2cc58a,context:_0x5a7160,ts:_0x457382}=_0x420b9e;if((_0x4f2d79[_0x39af25]??0x1)<(_0x4f2d79[_0x1a4bdf]??0x1))return;const _0x596747=_0x15dc36(_0x22c899[_0x5af654(0x295)],new Date(_0x457382)[_0x5af654(0x19f)]()),_0x937a8f=_0x15dc36(_0x21c11e[_0x39af25]??_0x22c899[_0x5af654(0x1be)],_0x39af25['padEnd'](0x5));let _0x25e835='\x20\x20'+_0x596747+'\x20'+_0x15dc36(_0x22c899[_0x5af654(0x446)],_0x937a8f)+'\x20'+_0x5093b6;if(_0x2cc58a&&Object[_0x5af654(0x3cb)](_0x2cc58a)[_0x5af654(0x2b6)]>0x0){const _0x417441=Object[_0x5af654(0x34d)](_0x2cc58a)[_0x5af654(0x158)](([_0xcc7725,_0x7c7cb3])=>_0xcc7725+'='+_0x7c7cb3)[_0x5af654(0x3db)]('\x20');_0x25e835+=_0x15dc36(_0x22c899['dim'],_0x5af654(0x198)+_0x417441+']');}if(_0x5a7160!==undefined){const _0x237ad9=typeof _0x5a7160==='object'?JSON[_0x5af654(0x2f7)](_0x5a7160):String(_0x5a7160);_0x25e835+=_0x15dc36(_0x22c899[_0x5af654(0x2fe)],'\x20\x20'+_0x237ad9);}const _0x4d9e85=_0x39af25===_0x5af654(0x255)||_0x39af25===_0x5af654(0x40f)?process[_0x5af654(0x25c)]['write'][_0x5af654(0x335)](process[_0x5af654(0x25c)]):process[_0x5af654(0x3c1)][_0x5af654(0x13f)][_0x5af654(0x335)](process[_0x5af654(0x3c1)]);_0x4d9e85(_0x25e835+'\x0a');}function _0x444fbf(_0xa8df6c,_0x416070){const _0x486c85=_0x5de947;if(_0xa8df6c===0xcc||_0xa8df6c>=0xc8&&_0xa8df6c<0x12c&&!_0x416070){console['log'](_0x486c85(0x1d2)+_0x15dc36(_0x22c899[_0x486c85(0x1bb)],'✓')+'\x0a');return;}if(_0xa8df6c>=0x190||_0x416070?.[_0x486c85(0x255)]){const _0x1a6326=_0x416070?.['error']??_0x416070?.[_0x486c85(0x1bd)]??_0x486c85(0x1df)+_0xa8df6c;console[_0x486c85(0x445)]('\x0a\x20\x20'+_0x15dc36(_0x22c899[_0x486c85(0x2b7)],'✗')+'\x20'+_0x15dc36(_0x22c899['bold']+_0x22c899[_0x486c85(0x2b7)],String(_0xa8df6c))+'\x20\x20'+_0x1a6326+'\x0a');return;}const _0xc1cd64=Object[_0x486c85(0x22d)][_0x486c85(0x3a8)][_0x486c85(0x1b2)](_0x416070??{},_0x486c85(0x203))?_0x416070[_0x486c85(0x203)]:_0x416070,_0x466730=_0x416070?.[_0x486c85(0x2fb)];console[_0x486c85(0x445)](''),_0x3649c8(_0xc1cd64,'\x20\x20');if(_0x466730?.['count']!=null||_0x466730?.['time']!=null){const _0xc1b49b=[];if(_0x466730['count']!=null)_0xc1b49b[_0x486c85(0x1ca)](_0x466730[_0x486c85(0x2af)]+'\x20result'+(_0x466730[_0x486c85(0x2af)]!==0x1?'s':''));if(_0x466730[_0x486c85(0x42d)]!=null)_0xc1b49b[_0x486c85(0x1ca)](_0x466730[_0x486c85(0x42d)]+'ms');console[_0x486c85(0x445)](_0x486c85(0x1d2)+_0x15dc36(_0x22c899[_0x486c85(0x2fe)],_0xc1b49b['join'](_0x486c85(0x2e1))));}console[_0x486c85(0x445)]('');}function _0x3649c8(_0x337623,_0xa28483=''){const _0x344771=_0x5de947;if(_0x337623===null||_0x337623===undefined){console[_0x344771(0x445)](_0xa28483+_0x15dc36(_0x22c899['dim'],'(null)'));return;}if(Array[_0x344771(0x283)](_0x337623)){if(_0x337623[_0x344771(0x2b6)]===0x0){console['log'](_0xa28483+_0x15dc36(_0x22c899[_0x344771(0x2fe)],'(empty)'));return;}if(_0x337623[_0x344771(0x3ab)](_0xa61012=>_0xa61012&&typeof _0xa61012===_0x344771(0x3fe)&&'key'in _0xa61012&&_0x344771(0x405)in _0xa61012)){_0x4d6da6(_0x337623,_0xa28483);return;}if(_0x337623[_0x344771(0x3ab)](_0x5af31b=>_0x5af31b&&typeof _0x5af31b==='object'&&'type'in _0x5af31b&&_0x344771(0x2af)in _0x5af31b)){_0x576b6e(_0x337623,_0xa28483);return;}if(_0x337623[_0x344771(0x3ab)](_0x25f20f=>typeof _0x25f20f!==_0x344771(0x3fe)||_0x25f20f===null)){_0x337623[_0x344771(0x33f)]((_0x5a451b,_0xb256d1)=>console['log'](_0xa28483+_0x15dc36(_0x22c899[_0x344771(0x295)],_0xb256d1+0x1+'.')+'\x20'+_0x15dc36(_0x22c899[_0x344771(0x1be)],String(_0x5a451b))));return;}_0x337623[_0x344771(0x33f)]((_0xeb9ea4,_0x357984)=>{const _0x206239=_0x344771;console['log'](_0xa28483+_0x15dc36(_0x22c899['dim'],'['+_0x357984+']'));if(typeof _0xeb9ea4===_0x206239(0x3fe)&&_0xeb9ea4!==null)_0x531b42(_0xeb9ea4,_0xa28483+'\x20\x20');else console['log'](_0xa28483+'\x20\x20'+String(_0xeb9ea4));});return;}if(typeof _0x337623==='object'){if('key'in _0x337623&&'value'in _0x337623&&Object[_0x344771(0x3cb)](_0x337623)[_0x344771(0x2b6)]<=0x3){console[_0x344771(0x445)](_0xa28483+_0x15dc36(_0x22c899['bold']+_0x22c899[_0x344771(0x1c0)],String(_0x337623[_0x344771(0x373)])));const _0x1ae72c=_0x337623['value'];if(_0x1ae72c&&typeof _0x1ae72c===_0x344771(0x3fe))_0x531b42(_0x1ae72c,_0xa28483);else console[_0x344771(0x445)](_0xa28483+_0x15dc36(_0x22c899[_0x344771(0x1be)],String(_0x1ae72c)));return;}_0x531b42(_0x337623,_0xa28483);return;}console[_0x344771(0x445)](_0xa28483+_0x15dc36(_0x22c899[_0x344771(0x1be)],String(_0x337623)));}function _0x531b42(_0x47422b,_0x2557ce=''){const _0x3c08dd=_0x5de947,_0x21d384=Object[_0x3c08dd(0x34d)](_0x47422b);if(_0x21d384[_0x3c08dd(0x2b6)]===0x0){console['log'](_0x2557ce+_0x15dc36(_0x22c899['dim'],'{}'));return;}const _0x5cf9d5=Math[_0x3c08dd(0x1c7)](0x1c,Math[_0x3c08dd(0x298)](..._0x21d384[_0x3c08dd(0x158)](([_0x548955])=>_0x548955[_0x3c08dd(0x2b6)])));for(const [_0x30900f,_0x566435]of _0x21d384){const _0x1497ca=_0x15dc36(_0x22c899['cyan'],_0x30900f[_0x3c08dd(0x153)](_0x5cf9d5));if(_0x566435===null||_0x566435===undefined)console['log'](_0x2557ce+_0x1497ca+'\x20\x20'+_0x15dc36(_0x22c899[_0x3c08dd(0x2fe)],'null'));else{if(typeof _0x566435===_0x3c08dd(0x3fe)){const _0x54de4e=JSON['stringify'](_0x566435);_0x54de4e[_0x3c08dd(0x2b6)]<=0x50?console[_0x3c08dd(0x445)](_0x2557ce+_0x1497ca+'\x20\x20'+_0x15dc36(_0x22c899['dim'],_0x54de4e)):(console[_0x3c08dd(0x445)](_0x2557ce+_0x1497ca),_0x3649c8(_0x566435,_0x2557ce+'\x20\x20'));}else{const _0x781339=typeof _0x566435==='boolean'?_0x15dc36(_0x566435?_0x22c899[_0x3c08dd(0x1bb)]:_0x22c899['yellow'],String(_0x566435)):typeof _0x566435===_0x3c08dd(0x32a)?_0x15dc36(_0x22c899[_0x3c08dd(0x285)],String(_0x566435)):_0x15dc36(_0x22c899[_0x3c08dd(0x1be)],String(_0x566435));console['log'](_0x2557ce+_0x1497ca+'\x20\x20'+_0x781339);}}}}function _0x4d6da6(_0x762116,_0x158dc6=''){const _0x480f65=_0x5de947,_0x559f2a=Math[_0x480f65(0x1c7)](0x20,Math['max'](..._0x762116[_0x480f65(0x158)](_0x1f34d0=>String(_0x1f34d0[_0x480f65(0x373)])[_0x480f65(0x2b6)])));for(const {key:_0x5d880f,value:_0x416d76,score:_0x33e8f6,clock:_0x5074d6}of _0x762116){const _0x2d482c=_0x15dc36(_0x22c899['bold']+_0x22c899[_0x480f65(0x1c0)],String(_0x5d880f)[_0x480f65(0x153)](_0x559f2a)),_0xb60c57=_0x416d76==null?_0x15dc36(_0x22c899[_0x480f65(0x2fe)],_0x480f65(0x1fa)):typeof _0x416d76==='object'?_0x15dc36(_0x22c899[_0x480f65(0x2fe)],JSON[_0x480f65(0x2f7)](_0x416d76)):_0x15dc36(_0x22c899['white'],String(_0x416d76)),_0x5343ba=_0x33e8f6!=null?_0x15dc36(_0x22c899[_0x480f65(0x295)],_0x480f65(0x2fd)+_0x33e8f6[_0x480f65(0x38e)](0x4)):'',_0x369cbb=_0x5074d6!=null?_0x15dc36(_0x22c899['gray'],_0x480f65(0x2f2)+_0x5074d6):'';console['log'](_0x158dc6+_0x2d482c+'\x20\x20'+_0xb60c57+_0x5343ba+_0x369cbb);}}function _0x576b6e(_0x33ee58,_0x1b6c26=''){const _0x3838f5=_0x5de947,_0x3c2a61=Math[_0x3838f5(0x1c7)](0x20,Math[_0x3838f5(0x298)](..._0x33ee58[_0x3838f5(0x158)](_0x4645d7=>_0x4645d7[_0x3838f5(0x3de)][_0x3838f5(0x2b6)])));for(const {type:_0x3d9d83,count:_0x17d405,fields:_0x20f971}of _0x33ee58){if(_0x3d9d83[_0x3838f5(0x397)]('~'))continue;const _0x26b248=_0x15dc36(_0x22c899['bold']+_0x22c899[_0x3838f5(0x1c0)],_0x3d9d83[_0x3838f5(0x153)](_0x3c2a61)),_0xf74f12=_0x15dc36(_0x22c899['magenta'],String(_0x17d405)[_0x3838f5(0x329)](0x6))+_0x15dc36(_0x22c899[_0x3838f5(0x2fe)],_0x3838f5(0x3e9)),_0x311fcf=_0x20f971&&Object[_0x3838f5(0x3cb)](_0x20f971)[_0x3838f5(0x2b6)]?_0x15dc36(_0x22c899[_0x3838f5(0x2fe)],_0x3838f5(0x160)+Object['keys'](_0x20f971)[_0x3838f5(0x2e9)](0x0,0x6)[_0x3838f5(0x3db)](',\x20')+(Object[_0x3838f5(0x3cb)](_0x20f971)[_0x3838f5(0x2b6)]>0x6?'…':'')):'';console['log'](_0x1b6c26+_0x26b248+'\x20\x20'+_0xf74f12+_0x311fcf);}}const _0x1657e6=[_0x5de947(0x264),_0x5de947(0x3ee),'queue/','files/',_0x5de947(0x260),_0x5de947(0x433)];function _0x2e3936(_0x497a61,_0x4ff9ee){const _0x5a6b54=_0x5de947;if(_0x497a61['startsWith'](_0x5a6b54(0x281)))return _0x497a61;if(_0x497a61[_0x5a6b54(0x397)]('/'))return _0x5a6b54(0x154)+_0x497a61;if(_0x497a61[_0x5a6b54(0x397)](_0x5a6b54(0x24d)))return _0x5a6b54(0x281)+_0x497a61;const _0x1536c7=_0x1657e6['some'](_0x3fe4ef=>_0x497a61===_0x3fe4ef[_0x5a6b54(0x24b)](/\/$/,'')||_0x497a61[_0x5a6b54(0x397)](_0x3fe4ef));return _0x1536c7?'/api/env/'+_0x4ff9ee+'/'+_0x497a61:_0x5a6b54(0x281)+_0x497a61;}function _0xfdb01(_0x4b4c63){const _0x53d214=_0x5de947,_0x5a4074={},_0x113065=[];let _0xd4efc8=0x0;while(_0xd4efc8<_0x4b4c63[_0x53d214(0x2b6)]){if((_0x4b4c63[_0xd4efc8]===_0x53d214(0x306)||_0x4b4c63[_0xd4efc8]==='-e')&&_0x4b4c63[_0xd4efc8+0x1]&&!_0x4b4c63[_0xd4efc8+0x1][_0x53d214(0x397)]('-'))_0x5a4074['env']=_0x4b4c63[++_0xd4efc8];else _0x4b4c63[_0xd4efc8]===_0x53d214(0x261)||_0x4b4c63[_0xd4efc8]==='-h'?_0x5a4074[_0x53d214(0x1e4)]=!![]:_0x113065[_0x53d214(0x1ca)](_0x4b4c63[_0xd4efc8]);_0xd4efc8++;}return{'flags':_0x5a4074,'rest':_0x113065};}const _0x5534aa={'system':_0x5de947(0x1e1),'envs':_0x5de947(0x417),'types':_0x5de947(0x242),'data':_0x5de947(0x2ee),'indexes':_0x5de947(0x3dc),'fts':_0x5de947(0x394),'sync':_0x5de947(0x2ff),'queue':_0x5de947(0x174),'files':'Files','embeddings':_0x5de947(0x180),'engines':'Engines','admin':_0x5de947(0x407),'event':_0x5de947(0x432),'processor':_0x5de947(0x2a2)},_0x26640a=[_0x5de947(0x353),_0x5de947(0x182),_0x5de947(0x264),_0x5de947(0x269),_0x5de947(0x387),_0x5de947(0x1e0),_0x5de947(0x375),_0x5de947(0x2d4),_0x5de947(0x43a),_0x5de947(0x31e),_0x5de947(0x1e2),_0x5de947(0x360)];function _0x3a6d5c(_0x1762d1){const _0x14ab37=_0x5de947;return _0x1762d1[_0x14ab37(0x24b)](/^\/api/,'')['replace'](/^\[\/env\/:env=[^\]]*\]/,_0x14ab37(0x1a2))[_0x14ab37(0x24b)](/^\/env\/:env/,_0x14ab37(0x13d))[_0x14ab37(0x24b)](/^\//,'');}function _0x59aad0(_0x55e353,_0x4975f9=''){const _0x2fbe82=_0x5de947,_0x4059ea=_0x55e353[_0x2fbe82(0x18c)][_0x2fbe82(0x3a9)]()['filter'](_0x582ed1=>!_0x582ed1['meta']?.[_0x2fbe82(0x15a)]),_0x4ed153=_0x4975f9?_0x4059ea['filter'](_0x55fe2d=>_0x55fe2d[_0x2fbe82(0x3b5)][_0x2fbe82(0x23c)]()[_0x2fbe82(0x30d)](_0x4975f9[_0x2fbe82(0x23c)]())||(_0x5babfc(_0x55fe2d)??'')[_0x2fbe82(0x23c)]()[_0x2fbe82(0x30d)](_0x4975f9['toLowerCase']())||_0x26e3ed(_0x55fe2d)[_0x2fbe82(0x155)](_0x345577=>_0x345577['toLowerCase']()[_0x2fbe82(0x30d)](_0x4975f9[_0x2fbe82(0x23c)]()))):_0x4059ea;if(!_0x4ed153[_0x2fbe82(0x2b6)]){console[_0x2fbe82(0x445)](_0x15dc36(_0x22c899[_0x2fbe82(0x350)],_0x2fbe82(0x2c8)+_0x4975f9+'\x22\x0a'));return;}const _0x1d9c26=new Map();for(const _0x2fcfe2 of _0x4ed153){const _0x3463e9=_0x26e3ed(_0x2fcfe2)[0x0]??_0x2fbe82(0x1d0);if(!_0x1d9c26['has'](_0x3463e9))_0x1d9c26['set'](_0x3463e9,[]);_0x1d9c26[_0x2fbe82(0x28f)](_0x3463e9)['push'](_0x2fcfe2);}const _0x1a4152=[..._0x26640a[_0x2fbe82(0x263)](_0x166c4d=>_0x1d9c26[_0x2fbe82(0x3ad)](_0x166c4d)),...[..._0x1d9c26[_0x2fbe82(0x3cb)]()][_0x2fbe82(0x263)](_0x55a84c=>!_0x26640a[_0x2fbe82(0x30d)](_0x55a84c))];console[_0x2fbe82(0x445)]('');for(const _0x268b7d of _0x1a4152){const _0x3f4bfd=_0x1d9c26[_0x2fbe82(0x28f)](_0x268b7d);if(!_0x3f4bfd?.[_0x2fbe82(0x2b6)])continue;console[_0x2fbe82(0x445)](_0x15dc36(_0x22c899['bold'],'\x20\x20'+(_0x5534aa[_0x268b7d]??_0x268b7d)));for(const _0x42bbbc of _0x3f4bfd){const _0x5bbbf6=_0x15dc36(_0x22c899[_0x2fbe82(0x285)],_0x42bbbc['method'][_0x2fbe82(0x153)](0x7)),_0x188386=_0x15dc36(_0x22c899['cyan'],_0x3a6d5c(_0x42bbbc['path'])),_0x13a5a0=_0x5babfc(_0x42bbbc)?_0x15dc36(_0x22c899[_0x2fbe82(0x2fe)],'\x20\x20'+_0x5babfc(_0x42bbbc)):'',_0x409c9f=_0x42bbbc[_0x2fbe82(0x195)]?.['id']?_0x15dc36(_0x22c899[_0x2fbe82(0x295)],_0x2fbe82(0x198)+_0x42bbbc[_0x2fbe82(0x195)]['id']+']'):'';console[_0x2fbe82(0x445)](_0x2fbe82(0x2c5)+_0x5bbbf6+'\x20'+_0x188386+_0x13a5a0+_0x409c9f);}console['log']('');}}function _0x89d2df(_0x33b482,_0x590ed3){const _0x36a599=_0x5de947,_0x82a820=_0x590ed3[_0x36a599(0x24b)](/^\/api(\/env\/[^/]+)?\//,'')[_0x36a599(0x343)]('/')[0x0],_0x109737=_0x33b482[_0x36a599(0x18c)][_0x36a599(0x3a9)]()[_0x36a599(0x263)](_0x1f7f1c=>_0x1f7f1c[_0x36a599(0x3b5)]['toLowerCase']()['includes'](_0x82a820[_0x36a599(0x23c)]()));if(!_0x109737[_0x36a599(0x2b6)]){console[_0x36a599(0x445)](_0x15dc36(_0x22c899[_0x36a599(0x350)],_0x36a599(0x304)+_0x590ed3+'\x0a'));return;}console[_0x36a599(0x445)]('');for(const _0x2af70e of _0x109737['slice'](0x0,0xc)){for(const _0x339900 of _0x1e553e(_0x2af70e)){console[_0x36a599(0x445)](_0x339900);}console[_0x36a599(0x445)]('');}}function _0x5babfc(_0x5a1e96){const _0x4f9544=_0x5de947;return _0x5a1e96[_0x4f9544(0x195)]?.[_0x4f9544(0x245)]??_0x5a1e96[_0x4f9544(0x2fb)]?.['summary']??'';}function _0x279152(_0x22d402){const _0x7d6fc=_0x5de947;return _0x22d402[_0x7d6fc(0x195)]?.[_0x7d6fc(0x30c)]??_0x22d402[_0x7d6fc(0x2fb)]?.[_0x7d6fc(0x30c)]??'';}function _0x26e3ed(_0x52a9a0){const _0x3f3412=_0x5de947;return _0x52a9a0['operation']?.[_0x3f3412(0x15f)]?.[_0x3f3412(0x2b6)]?_0x52a9a0['operation'][_0x3f3412(0x15f)]:_0x52a9a0[_0x3f3412(0x2fb)]?.[_0x3f3412(0x15f)]??[];}function _0x1e553e(_0x4519a8){const _0x252965=_0x5de947,_0x35d09b=[];_0x35d09b['push']('\x20\x20'+_0x15dc36(_0x22c899[_0x252965(0x446)]+_0x22c899['magenta'],_0x4519a8[_0x252965(0x414)][_0x252965(0x153)](0x7))+'\x20'+_0x15dc36(_0x22c899[_0x252965(0x446)]+_0x22c899[_0x252965(0x1c0)],_0x4519a8[_0x252965(0x3b5)]));_0x4519a8[_0x252965(0x195)]?.['id']&&_0x35d09b[_0x252965(0x1ca)](_0x252965(0x1fc)+_0x15dc36(_0x22c899['gray'],_0x252965(0x2ae)+_0x4519a8[_0x252965(0x195)]['id']));_0x5babfc(_0x4519a8)&&_0x35d09b[_0x252965(0x1ca)](_0x252965(0x1fc)+_0x15dc36(_0x22c899[_0x252965(0x1be)],_0x5babfc(_0x4519a8)));_0x279152(_0x4519a8)&&_0x35d09b[_0x252965(0x1ca)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x15dc36(_0x22c899['dim'],_0x279152(_0x4519a8)));_0x26e3ed(_0x4519a8)[_0x252965(0x2b6)]&&_0x35d09b[_0x252965(0x1ca)](_0x252965(0x1fc)+_0x15dc36(_0x22c899[_0x252965(0x295)],'tags:\x20'+_0x26e3ed(_0x4519a8)['join'](',\x20')));_0x4519a8['operation']?.['safety']?.[_0x252965(0x221)]&&_0x35d09b[_0x252965(0x1ca)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x15dc36(_0x22c899[_0x252965(0x295)],'access:\x20'+_0x4519a8['operation']['safety'][_0x252965(0x221)]));_0x4519a8[_0x252965(0x195)]?.[_0x252965(0x18c)]?.['transport']&&_0x4519a8['operation'][_0x252965(0x18c)][_0x252965(0x1de)]!=='standard'&&_0x35d09b['push'](_0x252965(0x1fc)+_0x15dc36(_0x22c899[_0x252965(0x295)],'transport:\x20'+_0x4519a8[_0x252965(0x195)]['http'][_0x252965(0x1de)]));if(_0x4519a8[_0x252965(0x195)]?.[_0x252965(0x3ea)]){const _0x56f6a3=Object[_0x252965(0x3cb)](_0x4519a8[_0x252965(0x195)]['inputSchema'][_0x252965(0x238)]||{});if(_0x56f6a3['length'])_0x35d09b[_0x252965(0x1ca)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x15dc36(_0x22c899['gray'],'input:\x20'+_0x56f6a3[_0x252965(0x3db)](',\x20')));}return _0x4519a8[_0x252965(0x2fb)]?.[_0x252965(0x212)]&&_0x35d09b[_0x252965(0x1ca)]('\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x15dc36(_0x22c899['gray'],_0x252965(0x402)+JSON[_0x252965(0x2f7)](_0x4519a8['meta'][_0x252965(0x212)]))),_0x35d09b;}async function _0x32ac76(_0x276258,_0x411cd2,_0x2b76d9,_0x130e7b=null){const _0xfb3c22=_0x5de947,_0x2b87c3=_0x2b76d9['indexOf']('?'),_0x1404bc=_0x2b87c3>=0x0?_0x2b76d9[_0xfb3c22(0x2e9)](0x0,_0x2b87c3):_0x2b76d9,_0x55fef9=_0x2b87c3>=0x0?_0x2b76d9[_0xfb3c22(0x2e9)](_0x2b87c3+0x1):'',_0x4088aa=Object[_0xfb3c22(0x1b9)](new URLSearchParams(_0x55fef9)['entries']());return _0x276258['http'][_0xfb3c22(0x1ec)](_0x411cd2,_0x1404bc,{'body':_0x130e7b,'query':_0x4088aa,'headers':{'content-type':_0xfb3c22(0x286)}},{'internal':!![]});}function _0x44f490(_0x3065d9){const _0x4c852d=_0x5de947;if(!_0x3065d9)return null;const _0x37bef3=_0x3065d9[_0x4c852d(0x336)]();if(!_0x37bef3)return null;try{return JSON[_0x4c852d(0x345)](_0x37bef3);}catch{}try{return JSON[_0x4c852d(0x345)](_0x5a59f0(_0x37bef3));}catch(_0x55c1d3){throw new SyntaxError(_0x55c1d3[_0x4c852d(0x1bd)],{'cause':_0x55c1d3});}}function _0x5a59f0(_0xd6b0a1){const _0x1940a7=_0x5de947;let _0x386706='',_0x2bc6dc=0x0;while(_0x2bc6dc<_0xd6b0a1[_0x1940a7(0x2b6)]){const _0x3513e5=_0xd6b0a1[_0x2bc6dc];if(_0x3513e5==='\x22'){_0x386706+='\x22',_0x2bc6dc++;while(_0x2bc6dc<_0xd6b0a1['length']&&_0xd6b0a1[_0x2bc6dc]!=='\x22'){if(_0xd6b0a1[_0x2bc6dc]==='\x5c'){_0x386706+=_0xd6b0a1[_0x2bc6dc++];if(_0x2bc6dc<_0xd6b0a1[_0x1940a7(0x2b6)])_0x386706+=_0xd6b0a1[_0x2bc6dc++];}else _0x386706+=_0xd6b0a1[_0x2bc6dc++];}_0x386706+='\x22';if(_0x2bc6dc<_0xd6b0a1[_0x1940a7(0x2b6)])_0x2bc6dc++;continue;}if(_0x3513e5==='\x27'){_0x386706+='\x22',_0x2bc6dc++;while(_0x2bc6dc<_0xd6b0a1[_0x1940a7(0x2b6)]&&_0xd6b0a1[_0x2bc6dc]!=='\x27'){if(_0xd6b0a1[_0x2bc6dc]==='\x5c'&&_0xd6b0a1[_0x2bc6dc+0x1]==='\x27')_0x386706+='\x27',_0x2bc6dc+=0x2;else _0xd6b0a1[_0x2bc6dc]==='\x22'?(_0x386706+='\x5c\x22',_0x2bc6dc++):_0x386706+=_0xd6b0a1[_0x2bc6dc++];}_0x386706+='\x22';if(_0x2bc6dc<_0xd6b0a1['length'])_0x2bc6dc++;continue;}if(_0x1940a7(0x3d0)['includes'](_0x3513e5)){_0x386706+=_0x3513e5,_0x2bc6dc++;continue;}let _0x4ffc72='';while(_0x2bc6dc<_0xd6b0a1[_0x1940a7(0x2b6)]&&!'{}[]:,\x27\x22'[_0x1940a7(0x30d)](_0xd6b0a1[_0x2bc6dc])&&_0xd6b0a1[_0x2bc6dc]!=='\x20'&&_0xd6b0a1[_0x2bc6dc]!=='\x09'&&_0xd6b0a1[_0x2bc6dc]!=='\x0a'&&_0xd6b0a1[_0x2bc6dc]!=='\x0d'){_0x4ffc72+=_0xd6b0a1[_0x2bc6dc++];}let _0x1bce44=_0x2bc6dc;while(_0x1bce44<_0xd6b0a1['length']&&(_0xd6b0a1[_0x1bce44]==='\x20'||_0xd6b0a1[_0x1bce44]==='\x09'))_0x1bce44++;if(_0xd6b0a1[_0x1bce44]===':')_0x386706+='\x22'+_0x4ffc72+'\x22';else _0x4ffc72===_0x1940a7(0x28c)||_0x4ffc72===_0x1940a7(0x339)||_0x4ffc72==='null'||/^-?\d+(\.\d+)?([eE][+-]?\d+)?$/[_0x1940a7(0x3e4)](_0x4ffc72)?_0x386706+=_0x4ffc72:_0x386706+='\x22'+_0x4ffc72+'\x22';}return _0x386706[_0x1940a7(0x24b)](/,(\s*[}\]])/g,'$1');}function _0x19e09f(_0x1c9f8b){const _0x3156bb=_0x5de947,_0x4f62c4=[];let _0x671086=0x0;while(_0x671086<_0x1c9f8b[_0x3156bb(0x2b6)]){while(_0x671086<_0x1c9f8b['length']&&(_0x1c9f8b[_0x671086]==='\x20'||_0x1c9f8b[_0x671086]==='\x09'))_0x671086++;if(_0x671086>=_0x1c9f8b[_0x3156bb(0x2b6)])break;const _0x2793ef=_0x1c9f8b[_0x671086];if(_0x2793ef==='{'||_0x2793ef==='['){const _0x1aeb09=_0x2793ef==='{'?'}':']',_0x484e1b=_0x671086++;let _0x33a1a6=0x1,_0x34b3f4=![],_0x25d6cf='';while(_0x671086<_0x1c9f8b[_0x3156bb(0x2b6)]&&_0x33a1a6>0x0){const _0x54423e=_0x1c9f8b[_0x671086];if(_0x34b3f4){if(_0x54423e==='\x5c')_0x671086++;else{if(_0x54423e===_0x25d6cf)_0x34b3f4=![];}}else{if(_0x54423e==='\x22'||_0x54423e==='\x27')_0x34b3f4=!![],_0x25d6cf=_0x54423e;else{if(_0x54423e===_0x2793ef)_0x33a1a6++;else{if(_0x54423e===_0x1aeb09)_0x33a1a6--;}}}_0x671086++;}_0x4f62c4[_0x3156bb(0x1ca)](_0x1c9f8b[_0x3156bb(0x2e9)](_0x484e1b,_0x671086));continue;}if(_0x2793ef==='\x22'||_0x2793ef==='\x27'){const _0x2f2e4c=_0x2793ef;_0x671086++;let _0x44df02='';while(_0x671086<_0x1c9f8b[_0x3156bb(0x2b6)]&&_0x1c9f8b[_0x671086]!==_0x2f2e4c){if(_0x1c9f8b[_0x671086]==='\x5c'&&_0x671086+0x1<_0x1c9f8b[_0x3156bb(0x2b6)])_0x671086++,_0x44df02+=_0x1c9f8b[_0x671086++];else _0x44df02+=_0x1c9f8b[_0x671086++];}if(_0x671086<_0x1c9f8b[_0x3156bb(0x2b6)])_0x671086++;_0x4f62c4['push'](_0x44df02);continue;}let _0x57de37='';while(_0x671086<_0x1c9f8b['length']&&_0x1c9f8b[_0x671086]!=='\x20'&&_0x1c9f8b[_0x671086]!=='\x09'&&_0x1c9f8b[_0x671086]!=='{'&&_0x1c9f8b[_0x671086]!=='['){_0x57de37+=_0x1c9f8b[_0x671086++];}if(_0x57de37)_0x4f62c4[_0x3156bb(0x1ca)](_0x57de37);}return _0x4f62c4;}function _0x36878e(_0x31878c,_0xc9462e){const _0xb8874b=_0x5de947,_0x5bcbc8=[..._0x31878c['_envs'][_0xb8874b(0x3cb)]()]['filter'](_0x43391c=>!_0x43391c[_0xb8874b(0x397)]('~'));console[_0xb8874b(0x445)](['',_0x15dc36(_0x22c899['bold']+_0x22c899[_0xb8874b(0x1c0)],'\x20\x20╔═══════════════════════════╗'),_0x15dc36(_0x22c899[_0xb8874b(0x446)]+_0x22c899['cyan'],_0xb8874b(0x3f3))+_0x15dc36(_0x22c899[_0xb8874b(0x446)],'\x20\x20\x20\x20\x20\x20\x20\x20\x20OKDB\x20SHELL\x20\x20\x20\x20\x20\x20\x20\x20\x20')+_0x15dc36(_0x22c899[_0xb8874b(0x446)]+_0x22c899['cyan'],'║'),_0x15dc36(_0x22c899['bold']+_0x22c899[_0xb8874b(0x1c0)],_0xb8874b(0x2c7)),'','\x20\x20'+_0x15dc36(_0x22c899[_0xb8874b(0x1bb)],'✓')+'\x20'+_0x15dc36(_0x22c899['bold'],'server')+_0xb8874b(0x40d)+_0xc9462e[_0xb8874b(0x36b)],'\x20\x20'+_0x15dc36(_0x22c899['green'],'✓')+'\x20'+_0x15dc36(_0x22c899[_0xb8874b(0x446)],_0xb8874b(0x222))+_0xb8874b(0x367)+_0xc9462e[_0xb8874b(0x36b)]+_0xb8874b(0x154),'\x20\x20'+_0x15dc36(_0x22c899[_0xb8874b(0x1bb)],'✓')+'\x20'+_0x15dc36(_0x22c899['bold'],_0xb8874b(0x3b5))+_0xb8874b(0x2c5)+_0xc9462e[_0xb8874b(0x41d)],'\x20\x20'+_0x15dc36(_0x22c899[_0xb8874b(0x1bb)],'✓')+'\x20'+_0x15dc36(_0x22c899['bold'],'id')+_0xb8874b(0x239)+_0x15dc36(_0x22c899[_0xb8874b(0x295)],_0x31878c['id']),'\x20\x20'+_0x15dc36(_0x22c899[_0xb8874b(0x1bb)],'✓')+'\x20'+_0x15dc36(_0x22c899[_0xb8874b(0x446)],_0xb8874b(0x182))+_0xb8874b(0x2c5)+_0x5bcbc8[_0xb8874b(0x158)](_0x2a980d=>_0x15dc36(_0x22c899['cyan'],_0x2a980d))[_0xb8874b(0x3db)]('\x20\x20'),..._0xc9462e[_0xb8874b(0x1f7)]?[]:['\x20\x20'+_0x15dc36(_0x22c899[_0xb8874b(0x1bb)],'✓')+'\x20'+_0x15dc36(_0x22c899[_0xb8874b(0x446)],'admin')+_0xb8874b(0x18a)+_0xc9462e['port']+_0xb8874b(0x396)],'',_0x15dc36(_0x22c899['dim'],_0xb8874b(0x34f)+_0x15dc36(_0x22c899[_0xb8874b(0x446)],_0xb8874b(0x1e4))+_0xb8874b(0x2f1)+_0x15dc36(_0x22c899[_0xb8874b(0x446)],_0xb8874b(0x31c))+_0xb8874b(0x142)+_0x15dc36(_0x22c899[_0xb8874b(0x446)],_0xb8874b(0x225))+'\x20to\x20quit.'),''][_0xb8874b(0x3db)]('\x0a'));}function _0x45a6d(_0x22645c){const _0x1f0a4a=_0x5de947;console[_0x1f0a4a(0x445)]('\x0a'+_0x15dc36(_0x22c899[_0x1f0a4a(0x446)],_0x1f0a4a(0x18b))+'\x20\x20'+_0x15dc36(_0x22c899[_0x1f0a4a(0x2fe)],_0x1f0a4a(0x268))+_0x1f0a4a(0x169)+_0x15dc36(_0x22c899[_0x1f0a4a(0x1c0)],_0x1f0a4a(0x38f))+'\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20GET\x20(implicit)\x0a\x20\x20'+_0x15dc36(_0x22c899['cyan'],_0x1f0a4a(0x38f))+'\x20'+_0x15dc36(_0x22c899['yellow'],_0x1f0a4a(0x28d))+_0x1f0a4a(0x18d)+_0x15dc36(_0x22c899[_0x1f0a4a(0x1c0)],_0x1f0a4a(0x2dd))+'\x20'+_0x15dc36(_0x22c899[_0x1f0a4a(0x1c0)],_0x1f0a4a(0x38f))+'\x20'+_0x15dc36(_0x22c899[_0x1f0a4a(0x350)],_0x1f0a4a(0x411))+_0x1f0a4a(0x43b)+_0x15dc36(_0x22c899[_0x1f0a4a(0x2fe)],'Examples')+'\x0a\x20\x20\x20\x20'+_0x15dc36(_0x22c899[_0x1f0a4a(0x295)],_0x1f0a4a(0x356))+'\x20\x20\x20\x20\x20\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'+_0x15dc36(_0x22c899[_0x1f0a4a(0x295)],'envs')+_0x1f0a4a(0x438)+_0x15dc36(_0x22c899[_0x1f0a4a(0x295)],_0x1f0a4a(0x264))+'\x20\x20\x20\x20\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/'+_0x22645c[_0x1f0a4a(0x313)]+_0x1f0a4a(0x13e)+_0x15dc36(_0x22c899[_0x1f0a4a(0x295)],_0x1f0a4a(0x244))+'\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/'+_0x22645c[_0x1f0a4a(0x313)]+_0x1f0a4a(0x167)+_0x15dc36(_0x22c899[_0x1f0a4a(0x295)],_0x1f0a4a(0x24f))+_0x1f0a4a(0x2e4)+_0x22645c[_0x1f0a4a(0x313)]+_0x1f0a4a(0x404)+_0x15dc36(_0x22c899[_0x1f0a4a(0x295)],_0x1f0a4a(0x333))+_0x1f0a4a(0x25b)+_0x22645c[_0x1f0a4a(0x313)]+_0x1f0a4a(0x3f4)+_0x15dc36(_0x22c899[_0x1f0a4a(0x295)],'PUT\x20type/users/item/x\x20{\x22n\x22:1}')+_0x1f0a4a(0x30e)+_0x15dc36(_0x22c899[_0x1f0a4a(0x295)],_0x1f0a4a(0x243))+_0x1f0a4a(0x30e)+_0x15dc36(_0x22c899[_0x1f0a4a(0x295)],_0x1f0a4a(0x159))+_0x1f0a4a(0x1f4)+_0x15dc36(_0x22c899[_0x1f0a4a(0x446)],_0x1f0a4a(0x2a6))+'\x20\x20'+_0x15dc36(_0x22c899[_0x1f0a4a(0x2fe)],_0x1f0a4a(0x2e8))+_0x1f0a4a(0x169)+_0x15dc36(_0x22c899[_0x1f0a4a(0x1c0)],_0x1f0a4a(0x226))+_0x1f0a4a(0x2ec)+_0x15dc36(_0x22c899[_0x1f0a4a(0x1c0)],_0x1f0a4a(0x261))+_0x1f0a4a(0x340)+_0x15dc36(_0x22c899['dim'],'Examples')+_0x1f0a4a(0x30e)+_0x15dc36(_0x22c899[_0x1f0a4a(0x295)],'types\x20--env\x20staging')+'\x0a\x20\x20\x20\x20'+_0x15dc36(_0x22c899[_0x1f0a4a(0x295)],_0x1f0a4a(0x14a))+'\x0a\x20\x20\x20\x20'+_0x15dc36(_0x22c899[_0x1f0a4a(0x295)],_0x1f0a4a(0x21f))+'\x0a\x0a'+_0x15dc36(_0x22c899[_0x1f0a4a(0x446)],_0x1f0a4a(0x1dc))+_0x1f0a4a(0x169)+_0x15dc36(_0x22c899[_0x1f0a4a(0x1c0)],'use\x20<env>')+_0x1f0a4a(0x303)+_0x15dc36(_0x22c899[_0x1f0a4a(0x1c0)],_0x1f0a4a(0x313))+_0x1f0a4a(0x1a4)+_0x15dc36(_0x22c899[_0x1f0a4a(0x1c0)],'routes')+'\x20'+_0x15dc36(_0x22c899[_0x1f0a4a(0x2fe)],_0x1f0a4a(0x2de))+_0x1f0a4a(0x3cf)+_0x15dc36(_0x22c899[_0x1f0a4a(0x1c0)],'logs')+'\x20'+_0x15dc36(_0x22c899[_0x1f0a4a(0x2fe)],_0x1f0a4a(0x447))+_0x1f0a4a(0x3af)+_0x15dc36(_0x22c899[_0x1f0a4a(0x1c0)],'open')+'\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'+_0x15dc36(_0x22c899[_0x1f0a4a(0x1c0)],_0x1f0a4a(0x1e4))+_0x1f0a4a(0x1fe)+_0x15dc36(_0x22c899[_0x1f0a4a(0x1c0)],'exit')+'\x20'+_0x15dc36(_0x22c899[_0x1f0a4a(0x2fe)],_0x1f0a4a(0x37a))+_0x1f0a4a(0x3ca));}async function _0x4d067e(_0x3e22d3,_0x31f27d=0x0){const _0x531654=_0x5de947;process['stdout'][_0x531654(0x13f)]('\x0a'),console[_0x531654(0x445)](_0x15dc36(_0x22c899[_0x531654(0x350)],_0x531654(0x184)));try{await _0x3e22d3[_0x531654(0x310)]();}catch(_0x3a4ad9){console[_0x531654(0x255)](_0x15dc36(_0x22c899['red'],'\x20\x20'+_0x3a4ad9[_0x531654(0x1bd)]));}process['exit'](_0x31f27d);}function _0x198d4a(_0x259d58){const _0x568e3c=_0x5de947,_0x90085c=_0x259d58[_0x568e3c(0x313)]!==_0x568e3c(0x342)?_0x15dc36(_0x22c899['yellow'],'['+_0x259d58[_0x568e3c(0x313)]+']'):'';return _0x15dc36(_0x22c899[_0x568e3c(0x446)]+_0x22c899[_0x568e3c(0x1c0)],_0x568e3c(0x2a0))+_0x90085c+_0x15dc36(_0x22c899[_0x568e3c(0x295)],'>\x20');}const _0x40a908=new Set(['GET',_0x5de947(0x31b),_0x5de947(0x33b),_0x5de947(0x152),_0x5de947(0x370)]);async function _0x347345(_0x4d0e36,_0x3e3aa1,_0x3ec34c,_0x2757f0,_0x887066,_0x21572a){const _0x5ec27d=_0x5de947;_0x4d0e36=_0x4d0e36[_0x5ec27d(0x336)]();if(!_0x4d0e36||_0x4d0e36['startsWith']('#'))return;const _0x43c900=_0x19e09f(_0x4d0e36),{flags:_0x3c1583,rest:_0xfdb9b0}=_0xfdb01(_0x43c900);if(!_0xfdb9b0[_0x5ec27d(0x2b6)])return;const _0x28c004=_0xfdb9b0[0x0],_0x45f602=_0x28c004['toUpperCase']();if(_0x45f602===_0x5ec27d(0x262)){if(_0xfdb9b0[0x1])_0x89d2df(_0x3e3aa1,_0x2e3936(_0xfdb9b0[0x1],_0x3c1583[_0x5ec27d(0x313)]??_0x887066[_0x5ec27d(0x313)]));else _0x45a6d(_0x887066);return;}if(_0x45f602===_0x5ec27d(0x38d)){const _0x2c04db=_0xfdb9b0[0x1];if(!_0x2c04db){console['log'](_0x15dc36(_0x22c899[_0x5ec27d(0x2b7)],'\x0a\x20\x20Usage:\x20use\x20<env-name>\x0a'));return;}try{_0x3e3aa1[_0x5ec27d(0x313)](_0x2c04db),_0x887066[_0x5ec27d(0x313)]=_0x2c04db,_0x21572a?.[_0x5ec27d(0x377)](_0x198d4a(_0x887066)),console['log'](_0x5ec27d(0x1d2)+_0x15dc36(_0x22c899['green'],'✓')+_0x5ec27d(0x32e)+_0x15dc36(_0x22c899[_0x5ec27d(0x446)]+_0x22c899[_0x5ec27d(0x1c0)],_0x2c04db)+'\x0a');}catch{console['log']('\x0a\x20\x20'+_0x15dc36(_0x22c899[_0x5ec27d(0x2b7)],'✗')+_0x5ec27d(0x39e)+_0x15dc36(_0x22c899['bold'],_0x2c04db)+_0x5ec27d(0x1f0)+_0x15dc36(_0x22c899[_0x5ec27d(0x2fe)],_0x5ec27d(0x3f7)));}return;}if(_0x45f602===_0x5ec27d(0x2a7)){const _0x2a3f16=[..._0x3e3aa1[_0x5ec27d(0x3b9)][_0x5ec27d(0x3cb)]()][_0x5ec27d(0x263)](_0xdaf89b=>!_0xdaf89b[_0x5ec27d(0x397)]('~'));console[_0x5ec27d(0x445)]('');for(const _0x1aa647 of _0x2a3f16){const _0x1e0ed7=_0x1aa647===_0x887066[_0x5ec27d(0x313)];console[_0x5ec27d(0x445)]('\x20\x20'+(_0x1e0ed7?_0x15dc36(_0x22c899['green'],'●'):_0x15dc36(_0x22c899[_0x5ec27d(0x2fe)],'○'))+'\x20\x20'+(_0x1e0ed7?_0x15dc36(_0x22c899[_0x5ec27d(0x446)]+_0x22c899[_0x5ec27d(0x1c0)],_0x1aa647):_0x15dc36(_0x22c899[_0x5ec27d(0x2fe)],_0x1aa647)));}console[_0x5ec27d(0x445)](_0x5ec27d(0x1d2)+_0x15dc36(_0x22c899[_0x5ec27d(0x2fe)],_0x5ec27d(0x218))+'\x20'+_0x15dc36(_0x22c899[_0x5ec27d(0x1c0)],_0x887066['env'])),console['log']('');return;}if(_0x45f602===_0x5ec27d(0x1c5)){const _0x1d71bd=[..._0x3e3aa1[_0x5ec27d(0x3b9)][_0x5ec27d(0x206)]()][_0x5ec27d(0x263)](_0x54d564=>!_0x54d564['name'][_0x5ec27d(0x397)]('~'));console['log']('');const _0x5bc88f=Math[_0x5ec27d(0x298)](..._0x1d71bd['map'](_0x312114=>_0x312114[_0x5ec27d(0x188)][_0x5ec27d(0x2b6)]));for(const _0x28582e of _0x1d71bd){const _0x527969=_0x28582e['name']===_0x887066[_0x5ec27d(0x313)],_0x547677=_0x527969?_0x15dc36(_0x22c899[_0x5ec27d(0x1bb)],'●'):_0x15dc36(_0x22c899[_0x5ec27d(0x2fe)],'○'),_0x53789c=_0x527969?_0x15dc36(_0x22c899[_0x5ec27d(0x446)]+_0x22c899['cyan'],_0x28582e[_0x5ec27d(0x188)][_0x5ec27d(0x153)](_0x5bc88f)):_0x15dc36(_0x22c899[_0x5ec27d(0x2fe)],_0x28582e['name']['padEnd'](_0x5bc88f)),_0x552171=[..._0x28582e[_0x5ec27d(0x143)][_0x5ec27d(0x3cb)]()][_0x5ec27d(0x263)](_0x141667=>!_0x141667[_0x5ec27d(0x397)]('~')),_0x43e605=_0x552171['length']?_0x15dc36(_0x22c899['dim'],_0x552171[_0x5ec27d(0x2e9)](0x0,0x5)[_0x5ec27d(0x3db)](',\x20')+(_0x552171[_0x5ec27d(0x2b6)]>0x5?'\x20\x20+'+(_0x552171[_0x5ec27d(0x2b6)]-0x5)+'\x20more':'')):_0x15dc36(_0x22c899[_0x5ec27d(0x2fe)],'(no\x20types)');console[_0x5ec27d(0x445)]('\x20\x20'+_0x547677+'\x20\x20'+_0x53789c+'\x20\x20'+_0x43e605);}console['log']('');return;}if(_0x45f602===_0x5ec27d(0x2ba)){const _0x2468ae=_0x3c1583[_0x5ec27d(0x313)]??_0xfdb9b0[0x1]??_0x887066['env'];try{const _0x7fb5ff=_0x3e3aa1[_0x5ec27d(0x313)](_0x2468ae),_0x1593b5=[..._0x7fb5ff['typeSubDbs']['keys']()][_0x5ec27d(0x263)](_0x53a77e=>!_0x53a77e[_0x5ec27d(0x397)]('~'))[_0x5ec27d(0x178)]();console['log'](_0x5ec27d(0x1d2)+_0x15dc36(_0x22c899[_0x5ec27d(0x2fe)],_0x1593b5[_0x5ec27d(0x2b6)]+_0x5ec27d(0x2b8)+(_0x1593b5[_0x5ec27d(0x2b6)]!==0x1?'s':'')+_0x5ec27d(0x272)+_0x2468ae));for(const _0x1712de of _0x1593b5){const _0x7545df=_0x7fb5ff[_0x5ec27d(0x143)][_0x5ec27d(0x28f)](_0x1712de),_0x5a994b=_0x7545df?.[_0x5ec27d(0x269)]?.['getCount']?.()??0x0,_0x1a9892=_0x15dc36(_0x22c899[_0x5ec27d(0x446)]+_0x22c899['cyan'],_0x1712de['padEnd'](0x1c));console['log'](_0x5ec27d(0x2c5)+_0x1a9892+'\x20\x20'+_0x15dc36(_0x22c899[_0x5ec27d(0x285)],String(_0x5a994b)['padStart'](0x6))+'\x20'+_0x15dc36(_0x22c899[_0x5ec27d(0x2fe)],_0x5ec27d(0x1d1)));}console['log']('');}catch(_0x3296dc){console['error'](_0x15dc36(_0x22c899[_0x5ec27d(0x2b7)],'\x0a\x20\x20'+_0x3296dc[_0x5ec27d(0x1bd)]+'\x0a'));}return;}if(_0x45f602===_0x5ec27d(0x220)){_0x59aad0(_0x3e3aa1,_0xfdb9b0[_0x5ec27d(0x2e9)](0x1)[_0x5ec27d(0x3db)]('\x20'));return;}if(_0x45f602===_0x5ec27d(0x2df)){const _0x481bf3=(_0xfdb9b0[0x1]??'')[_0x5ec27d(0x23c)]();if(!_0x481bf3||_0x481bf3==='on')_0x2757f0[_0x5ec27d(0x309)]=!![],_0x2757f0[_0x5ec27d(0x2b4)]='info',console[_0x5ec27d(0x445)]('\x0a\x20\x20'+_0x15dc36(_0x22c899['green'],'✓')+_0x5ec27d(0x157)+_0x15dc36(_0x22c899[_0x5ec27d(0x2fe)],'level:\x20info')+'\x0a');else{if(_0x481bf3===_0x5ec27d(0x291))_0x2757f0[_0x5ec27d(0x309)]=![],console[_0x5ec27d(0x445)]('\x0a\x20\x20'+_0x15dc36(_0x22c899[_0x5ec27d(0x350)],'○')+_0x5ec27d(0x308));else _0x4f2d79[_0x481bf3]!==undefined?(_0x2757f0[_0x5ec27d(0x309)]=!![],_0x2757f0[_0x5ec27d(0x2b4)]=_0x481bf3,console[_0x5ec27d(0x445)]('\x0a\x20\x20'+_0x15dc36(_0x22c899['green'],'✓')+_0x5ec27d(0x383)+_0x15dc36(_0x22c899[_0x5ec27d(0x446)],_0x481bf3)+'\x0a')):console[_0x5ec27d(0x255)](_0x15dc36(_0x22c899[_0x5ec27d(0x2b7)],_0x5ec27d(0x3a6)));}return;}if(_0x45f602===_0x5ec27d(0x1ee)||_0x45f602===_0x5ec27d(0x26a)){await _0x4d067e(_0x3e3aa1,0x0);return;}if(_0x45f602===_0x5ec27d(0x406)){const _0x57f664=_0x5ec27d(0x210)+_0x3ec34c[_0x5ec27d(0x36b)]+_0x5ec27d(0x396),_0x2655ba=process['platform']===_0x5ec27d(0x33c)?'start\x20'+_0x57f664:process['platform']===_0x5ec27d(0x328)?_0x5ec27d(0x27f)+_0x57f664:_0x5ec27d(0x2ca)+_0x57f664;require$$4[_0x5ec27d(0x3a3)](_0x2655ba),console[_0x5ec27d(0x445)]('\x0a\x20\x20'+_0x15dc36(_0x22c899[_0x5ec27d(0x1bb)],'✓')+_0x5ec27d(0x2fa)+_0x15dc36(_0x22c899[_0x5ec27d(0x1c0)],_0x57f664)+'\x0a');return;}let _0x5a1466,_0x29dc65,_0x39252f;if(_0x40a908[_0x5ec27d(0x3ad)](_0x45f602)){_0x5a1466=_0x45f602,_0x29dc65=_0xfdb9b0[0x1],_0x39252f=_0xfdb9b0[_0x5ec27d(0x2e9)](0x2);if(!_0x29dc65){console['error'](_0x15dc36(_0x22c899['red'],_0x5ec27d(0x233)+_0x28c004+_0x5ec27d(0x321)));return;}}else _0x5a1466=null,_0x29dc65=_0xfdb9b0[0x0],_0x39252f=_0xfdb9b0[_0x5ec27d(0x2e9)](0x1);const _0x2ef6c8=_0x3c1583[_0x5ec27d(0x313)]??_0x887066[_0x5ec27d(0x313)],_0x37f036=_0x2e3936(_0x29dc65,_0x2ef6c8);if(_0x3c1583[_0x5ec27d(0x1e4)]){_0x89d2df(_0x3e3aa1,_0x37f036);return;}let _0x2ee8d8=null;if(_0x39252f[_0x5ec27d(0x2b6)]){const _0x2c1a08=_0x39252f[_0x5ec27d(0x3db)]('\x20');try{_0x2ee8d8=_0x44f490(_0x2c1a08);}catch(_0x16a168){console[_0x5ec27d(0x255)](_0x15dc36(_0x22c899[_0x5ec27d(0x2b7)],_0x5ec27d(0x3e7)+_0x2c1a08+_0x5ec27d(0x1d2)+_0x15dc36(_0x22c899[_0x5ec27d(0x2fe)],_0x16a168[_0x5ec27d(0x1bd)])+'\x0a'));return;}}if(!_0x5a1466)_0x5a1466=_0x2ee8d8!==null?_0x5ec27d(0x31b):_0x5ec27d(0x3ed);try{const _0x3411d6=await _0x32ac76(_0x3e3aa1,_0x5a1466,_0x37f036,_0x2ee8d8);_0x444fbf(_0x3411d6[_0x5ec27d(0x43e)],_0x3411d6['body']);}catch(_0x95347b){console['error'](_0x5ec27d(0x1d2)+_0x15dc36(_0x22c899[_0x5ec27d(0x2b7)],'✗')+'\x20'+_0x95347b[_0x5ec27d(0x1bd)]+'\x0a');}}class _0x162e7c{constructor(){const _0x10c0c8=_0x5de947;this[_0x10c0c8(0x381)]=new Map(),this[_0x10c0c8(0x25a)]=null,this[_0x10c0c8(0x2e0)]=![];}}function _0x4aee14(_0x3e0fe6){const _0x2240a0=_0x5de947,_0x39e922=new _0x162e7c();for(const _0x4f5420 of _0x3e0fe6){if(_0x4f5420[_0x2240a0(0x2fb)]?.[_0x2240a0(0x15a)])continue;const _0x190510=_0x4f5420['path'][_0x2240a0(0x24b)](/^\/api/,'')[_0x2240a0(0x24b)](/^\[\/env\/:env=[^\]]*\]/,'')['replace'](/^\//,'');if(!_0x190510)continue;let _0x573dbb=_0x39e922;for(const _0x10aee6 of _0x190510[_0x2240a0(0x343)]('/')[_0x2240a0(0x263)](Boolean)){if(_0x10aee6[_0x2240a0(0x397)](':')){const _0x258de2=_0x10aee6['slice'](0x1);if(!_0x573dbb['dynamic'])_0x573dbb['dynamic']={'param':_0x258de2,'node':new _0x162e7c()};_0x573dbb=_0x573dbb[_0x2240a0(0x25a)]['node'];}else{if(!_0x573dbb[_0x2240a0(0x381)][_0x2240a0(0x3ad)](_0x10aee6))_0x573dbb['children'][_0x2240a0(0x21c)](_0x10aee6,new _0x162e7c());_0x573dbb=_0x573dbb[_0x2240a0(0x381)][_0x2240a0(0x28f)](_0x10aee6);}}_0x573dbb[_0x2240a0(0x2e0)]=!![];}return _0x39e922;}const _0x388809=new Map();function _0x51bee8(_0x1d5af7,_0x26200a,_0x4d8ba9){const _0x19a0a1=_0x5de947,_0x2e91e5=_0x388809[_0x19a0a1(0x28f)](_0x1d5af7);if(_0x2e91e5&&_0x2e91e5['exp']>Date[_0x19a0a1(0x208)]())return _0x2e91e5[_0x19a0a1(0x346)];const _0x42be5a=_0x4d8ba9();return _0x388809[_0x19a0a1(0x21c)](_0x1d5af7,{'val':_0x42be5a,'exp':Date['now']()+_0x26200a}),_0x42be5a;}function _0x13a517(_0x2c7da9,_0x440e4f,_0x334358,_0xe5ddb8){const _0x330ed4=_0x5de947,_0x1c6ca3=_0x440e4f[_0x330ed4(0x313)]??_0xe5ddb8['env'];switch(_0x2c7da9){case _0x330ed4(0x313):return[..._0x334358['_envs'][_0x330ed4(0x3cb)]()][_0x330ed4(0x263)](_0x14e952=>!_0x14e952[_0x330ed4(0x397)]('~'));case _0x330ed4(0x3de):return _0x51bee8(_0x330ed4(0x34b)+_0x1c6ca3,0x7d0,()=>{const _0x35eb91=_0x330ed4;try{return[..._0x334358[_0x35eb91(0x313)](_0x1c6ca3)[_0x35eb91(0x143)][_0x35eb91(0x3cb)]()][_0x35eb91(0x263)](_0x39c9d7=>!_0x39c9d7[_0x35eb91(0x397)]('~'));}catch{return[];}});case _0x330ed4(0x373):if(!_0x440e4f[_0x330ed4(0x3de)])return[];return _0x51bee8(_0x330ed4(0x325)+_0x1c6ca3+':'+_0x440e4f[_0x330ed4(0x3de)],0x5dc,()=>{const _0x22abfd=_0x330ed4;try{const _0x14d409=_0x334358[_0x22abfd(0x313)](_0x1c6ca3)[_0x22abfd(0x143)][_0x22abfd(0x28f)](_0x440e4f['type']);if(!_0x14d409?.[_0x22abfd(0x269)])return[];const _0x15b036=[];for(const {key:_0x44c670}of _0x14d409['data'][_0x22abfd(0x148)]({'limit':0x32})){_0x15b036[_0x22abfd(0x1ca)](String(_0x44c670));if(_0x15b036['length']>=0x32)break;}return _0x15b036;}catch{return[];}});case _0x330ed4(0x33d):if(!_0x440e4f[_0x330ed4(0x3de)])return[];return _0x51bee8('idx:'+_0x1c6ca3+':'+_0x440e4f[_0x330ed4(0x3de)],0x7d0,()=>{const _0x30041c=_0x330ed4;try{const _0x353191=_0x334358[_0x30041c(0x313)](_0x1c6ca3)[_0x30041c(0x143)][_0x30041c(0x28f)](_0x440e4f[_0x30041c(0x3de)]);return _0x353191?[..._0x353191[_0x30041c(0x23b)]?.[_0x30041c(0x3cb)]()??[]]:[];}catch{return[];}});case _0x330ed4(0x17d):if(!_0x440e4f[_0x330ed4(0x3de)])return[];return _0x51bee8(_0x330ed4(0x3b0)+_0x1c6ca3+':'+_0x440e4f['type'],0x7d0,()=>{const _0x1d43ef=_0x330ed4;try{return _0x334358[_0x1d43ef(0x1e0)]?.[_0x1d43ef(0x3b2)]?.(_0x440e4f[_0x1d43ef(0x3de)],_0x334358['env'](_0x1c6ca3))?.[_0x1d43ef(0x158)](_0x5cf5e2=>_0x5cf5e2[_0x1d43ef(0x188)])??[];}catch{return[];}});default:return[];}}function _0x38e854(_0x57b633,_0x5eb28f,_0x429fea,_0x1f6521){const _0x5f27ed=_0x5de947,_0x535820=_0x57b633[_0x5f27ed(0x13b)]('/'),_0x261029=_0x57b633['split']('/'),_0x2bca98=_0x535820?_0x261029[_0x5f27ed(0x2e9)](0x0,-0x1):_0x261029[_0x5f27ed(0x2e9)](0x0,-0x1),_0x58c7b4=_0x535820?'':_0x261029[_0x261029['length']-0x1];let _0x5f7484=_0x5eb28f;const _0x43a6cd={};for(const _0x38d178 of _0x2bca98){if(!_0x38d178)continue;if(_0x5f7484[_0x5f27ed(0x381)][_0x5f27ed(0x3ad)](_0x38d178))_0x5f7484=_0x5f7484[_0x5f27ed(0x381)][_0x5f27ed(0x28f)](_0x38d178);else{if(_0x5f7484[_0x5f27ed(0x25a)])_0x43a6cd[_0x5f7484[_0x5f27ed(0x25a)]['param']]=_0x38d178,_0x5f7484=_0x5f7484['dynamic'][_0x5f27ed(0x369)];else return[];}}const _0x397bf3=_0x2bca98[_0x5f27ed(0x263)](Boolean),_0x208a0c=_0x397bf3['length']?_0x397bf3[_0x5f27ed(0x3db)]('/')+'/':'',_0x15f2cf=[];for(const [_0x4d0361]of _0x5f7484[_0x5f27ed(0x381)]){if(_0x4d0361['startsWith'](_0x58c7b4))_0x15f2cf[_0x5f27ed(0x1ca)](_0x208a0c+_0x4d0361);}if(_0x5f7484[_0x5f27ed(0x25a)])for(const _0x35f1e2 of _0x13a517(_0x5f7484[_0x5f27ed(0x25a)]['param'],_0x43a6cd,_0x429fea,_0x1f6521)){if(String(_0x35f1e2)[_0x5f27ed(0x397)](_0x58c7b4))_0x15f2cf[_0x5f27ed(0x1ca)](_0x208a0c+_0x35f1e2);}return _0x15f2cf['slice'](0x0,0x64);}const _0xfc64d2=[_0x5de947(0x1e4),'use',_0x5de947(0x313),_0x5de947(0x182),_0x5de947(0x264),_0x5de947(0x31c),_0x5de947(0x1eb),_0x5de947(0x2ea),'exit','quit'];function _0x1daaf3(_0x24d1f3,_0x1a7137,_0x258063){return function _0x1d051e(_0x236d80){const _0x368e1d=_0x48ce;try{const _0x32fb14=_0x236d80[_0x368e1d(0x27a)](/\s[{[]/),_0x22a789=_0x32fb14>=0x0?_0x236d80['slice'](0x0,_0x32fb14):_0x236d80,_0x2e383c=_0x22a789[_0x368e1d(0x3aa)]();if(!_0x2e383c){const _0x91c973=[..._0xfc64d2,...[..._0x24d1f3['children'][_0x368e1d(0x3cb)]()]][_0x368e1d(0x2e9)](0x0,0x64);return[_0x91c973,''];}const _0x4d82e3=_0x2e383c[_0x368e1d(0x343)](/\s+/),_0x1742f0=_0x4d82e3[0x0],_0xe9d1d2=_0x1742f0['toUpperCase']();if(_0x4d82e3[_0x368e1d(0x2b6)]===0x1){const _0x412abf=_0x1742f0[_0x368e1d(0x23c)](),_0x4a5fb3=_0xfc64d2[_0x368e1d(0x263)](_0x5ebb8c=>_0x5ebb8c['startsWith'](_0x412abf)),_0x11be8e=_0x38e854(_0x1742f0,_0x24d1f3,_0x1a7137,_0x258063),_0x3bfea2=[...new Set([..._0x4a5fb3,..._0x11be8e])][_0x368e1d(0x2e9)](0x0,0x64);return[_0x3bfea2,_0x1742f0];}if(_0x40a908['has'](_0xe9d1d2)&&_0x4d82e3[_0x368e1d(0x2b6)]===0x2){const _0x27a056=_0x4d82e3[0x1],_0x3fd7c3=_0x38e854(_0x27a056,_0x24d1f3,_0x1a7137,_0x258063);return[_0x3fd7c3['map'](_0x327046=>_0x1742f0+'\x20'+_0x327046),_0x1742f0+'\x20'+_0x27a056];}if(!_0x40a908['has'](_0xe9d1d2)&&_0x4d82e3[_0x368e1d(0x2b6)]>0x1){const _0x388abf=_0x38e854(_0x1742f0,_0x24d1f3,_0x1a7137,_0x258063),_0x5182db='\x20'+_0x4d82e3[_0x368e1d(0x2e9)](0x1)[_0x368e1d(0x3db)]('\x20');return[_0x388abf[_0x368e1d(0x158)](_0x16da5a=>_0x16da5a+_0x5182db),_0x1742f0+_0x5182db];}return[[],_0x236d80];}catch{return[[],_0x236d80];}};}async function _0x211f35(_0x14eb2a,_0xd8a3fc){const _0x1e72be=_0x5de947,_0x63b762={'enabled':!![],'level':_0xd8a3fc[_0x1e72be(0x39b)]??'info'},_0x8afdb1={'env':_0x1e72be(0x342)},_0x2c1090={'current':null},_0x244e35=_0x4aee14(_0x14eb2a['http'][_0x1e72be(0x3a9)]()),_0xbe3fe6=_0x1daaf3(_0x244e35,_0x14eb2a,_0x8afdb1);_0x14eb2a[_0x1e72be(0x445)][_0x1e72be(0x223)](_0x226c1d=>{const _0x5e8240=_0x1e72be;if(!_0x63b762[_0x5e8240(0x309)])return;_0x47290a(_0x226c1d,_0x63b762[_0x5e8240(0x2b4)]),_0x2c1090[_0x5e8240(0x416)]?.[_0x5e8240(0x2f4)](!![]);}),_0x36878e(_0x14eb2a,_0xd8a3fc);const _0x1047cf=_0x4ca7ae[_0x1e72be(0x39c)]({'input':process[_0x1e72be(0x1e8)],'output':process[_0x1e72be(0x3c1)],'terminal':!![],'completer':_0xbe3fe6,'prompt':_0x198d4a(_0x8afdb1),'historySize':_0x384f74});try{const _0x3162d2=_0x149d26[_0x1e72be(0x172)](_0x1276f3,_0x1e72be(0x2d0))[_0x1e72be(0x343)]('\x0a')[_0x1e72be(0x263)](Boolean);_0x1047cf[_0x1e72be(0x436)]=_0x3162d2['reverse']()[_0x1e72be(0x2e9)](0x0,_0x384f74);}catch{}return _0x2c1090[_0x1e72be(0x416)]=_0x1047cf,_0x1047cf['on']('line',async _0x8791d3=>{const _0x3536d9=_0x1e72be;_0x1047cf[_0x3536d9(0x41c)]();try{await _0x347345(_0x8791d3,_0x14eb2a,_0xd8a3fc,_0x63b762,_0x8afdb1,_0x1047cf);}catch(_0x4bd59d){console[_0x3536d9(0x255)](_0x15dc36(_0x22c899[_0x3536d9(0x2b7)],'\x20\x20Error:\x20'+_0x4bd59d['message']));}finally{_0x1047cf['resume'](),_0x1047cf['prompt']();}}),_0x1047cf['on']('close',()=>{const _0x4d8d26=_0x1e72be;try{const _0x37418e=[..._0x1047cf[_0x4d8d26(0x436)]]['reverse']()['filter'](Boolean)[_0x4d8d26(0x2e9)](0x0,_0x384f74);_0x149d26['writeFileSync'](_0x1276f3,_0x37418e[_0x4d8d26(0x3db)]('\x0a')+'\x0a');}catch{}_0x4d067e(_0x14eb2a,0x0);}),process['on'](_0x1e72be(0x27e),()=>{const _0x3167df=_0x1e72be;if(_0x1047cf[_0x3167df(0x257)]==='')_0x4d067e(_0x14eb2a,0x0);else process['stdout'][_0x3167df(0x13f)]('\x0a'),_0x1047cf[_0x3167df(0x26e)](0x0),_0x1047cf[_0x3167df(0x2f4)]();}),process['on'](_0x1e72be(0x39d),()=>_0x4d067e(_0x14eb2a,0x0)),_0x1047cf[_0x1e72be(0x2f4)](),_0x1047cf;}return okdbShell={'start':_0x211f35,'colorLog':_0x47290a,'lenientParse':_0x44f490,'_splitLine':_0x19e09f,'_formatRouteHelpLines':_0x1e553e,'_routeSummary':_0x5babfc,'_routeTags':_0x26e3ed},okdbShell;}var hasRequiredOkdb;function _0x9ed8(){const _0x2a9558=['\x20\x20Example:\x20okdb\x20join\x20https://node-a.example.com\x20--token\x20<t>\x20--address\x20http://myhost:8484\x0a','exports','backup','PIN','isFeatureEnabled','_isFree','stdout','import','exportBlobs','randomUUID','--changes','limits','Feature\x20not\x20licensed:\x20','wrong_node','No\x20license\x20found\x20matching\x20this\x20activation\x20token','\x20\x20\x20\x20graceful\x20shutdown\x0a','keys','readline','addLicense','pid','\x20\x20\x20\x20\x20\x20\x20\x20\x20browse\x20API\x20routes,\x20grouped\x20by\x20area\x0a\x20\x20','{}[]:,\x0a\x0d\x09\x20','started','\x20\x20\x20\x20license:\x20free\x20tier\x20—\x20add\x20a\x20license\x20to\x20unlock\x20sync,\x20embeddings,\x20engines,\x20time-machine','getSecurityNotices','\x20day(s).','listening','\x20\x20\x20\x20\x20\x20\x20','registerIndex','\x20\x20(name:\x20','createPublicKey','\x20deleted','join','Indexes','decodeLicenseBlob:\x20input\x20must\x20be\x20a\x20string','type','schema:drop','password','[okdb]\x20import\x20complete','[okdb]\x20error:\x20token\x20with\x20name\x20\x22','--address','test','createHmac','schema:set','\x0a\x20\x20Invalid\x20JSON:\x20','effective','\x20records','inputSchema','[okdb]\x20created\x20.kdbconfig','base64url','GET','type/','\x20\x20\x20\x201.\x20Send\x20the\x20PIN\x20above\x20(','digest','4LYJWTT','\x20\x20\x20\x20label:\x20\x20\x20\x20\x20\x20\x20','\x20\x20║','/type/users/query\x0a\x20\x20\x20\x20','\x20\x20\x20\x20port:\x20\x20','reset','\x20—\x20type\x20env\x20to\x20list\x20available\x0a','targetKey','importBlobs','removeLicense','[okdb]\x20.kdbconfig\x20already\x20exists\x20—\x20skipping','decodeActivationToken','verifyActivation','object','fieldPath','OKDBTypeNotRegisteredError','[okdb]\x20error:\x20join\x20requires\x20a\x20remote\x20address.\x20Usage:\x20okdb\x20join\x20<address>\x20--token\x20<t>','body:\x20','invalid','/type/users/item/alice\x0a\x20\x20\x20\x20','value','OPEN','Admin','timingSafeEqual','onLicenseExpired','--no-admin','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20\x20\x20','Token\x20secret\x20not\x20configured','\x20\x20http://localhost:','SCHEMA_VALIDATION_FAILED','warn','\x20\x20Some\x20checks\x20failed.\x0a','[body]','\x1b[31m','halted','method','uuid','current','Environments','from','node\x20','--types','\x20\x20\x20\x20status:\x20\x20\x20\x20active\x20\x20(open\x20license\x20—\x20no\x20activation\x20needed)','pause','dbPath','sync:apply','\x1b[33m','_licenseHash','columns','--key','INVALID_INDEX_KEY','waiting','_systemEnv','resetFts','\x0a\x20\x20✓\x20Token\x20created',']\x20already\x20maps\x20to\x20\x27','index:reset','./okdb-backup','equals','LABEL','time','--blobs','\x1b[2m','item:create','resolve','Events','processors/','detachConsole','kind','history','init','\x20\x20\x20\x20\x20\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\x20usage:\x20\x20\x20','files','\x20\x20\x20\x20\x20explicit\x20method\x0a\x0a\x20\x20','issuedAt','\x20\x20Envs:\x20\x20\x20\x20','status','Shutting\x20down\x20due\x20to\x20license\x20expiry','valid','\x20\x20Expected\x20one\x20of:','licenseType','registerFts','\x20months\x20from\x20issuance)','log','bold','[on|off|level]','database\x20path\x20writable:\x20','endsWith','fts:registered','env/:env','/types\x0a\x20\x20\x20\x20','write','active','sizeBefore','\x20to\x20browse\x20the\x20API,\x20','typeSubDbs','\x1b[0m','export','Unique\x20constraint\x20violated\x20on\x20','remove','getRange','catch','type/users/item/alice\x20--env\x20staging','[okdb]\x20error:\x20revoke\x20requires\x20an\x20id\x20argument','\x20\x20✓\x20database\x20opened\x0a','writeUInt8','expiry','sub','⚠\x20OPEN\x20LICENSE\x20ACTIVE\x20—\x20this\x20license\x20is\x20not\x20node-bound\x20and\x20is\x20intended\x20for\x20POC/demo\x20use\x20only.\x20Expires\x20in\x20','config','PATCH','padEnd','/api','some','\x20\x20\x20\x20•\x20a\x20license\x20id\x20\x20\x20\x20\x20(uuid)','\x20logs\x20on\x20\x20','map','env/staging/info','hidden','rawBuf','1861350LNEOEI','OKDBNotFoundError','fts:reset','tags','\x20\x20·\x20','\x20\x20\x20\x20status:\x20\x20\x20\x20active','TYPE_NOT_REGISTERED','unique:violation_resolved','label','auth','0123456789ABCDEFGHJKMNPQRSTVWXYZ','/type/users\x0a\x20\x20\x20\x20','OKDBAlreadyExistsError','\x0a\x0a\x20\x20','\x0a[okdb]\x20error:\x20','\x27\x20on\x20type\x20\x27','NAME','dropIndex','OKDBInvalidIndexKeyError','.kdb_history','\x20\x20\x20\x20•\x20a\x20path\x20to\x20a\x20.license\x20file','\x27\x20is\x20already\x20registered','readFileSync','--open','Queue','blobs','txn:rollback','recheck','sort','VERSION_MISMATCH','\x20tokens:','\x1b[36m','\x20\x20Writes:\x20\x20','ftsName','\x20already\x20exists','changes','Embeddings','decodeLicenseBlob:\x20failed\x20to\x20decode\x20payload:\x20','envs','LICENSE_LIMIT_EXCEEDED','\x20\x20[okdb]\x20shutting\x20down…','[okdb]\x20error:\x20failed\x20to\x20read\x20','--permissions','okdb.pid','name','targetType','\x20\x20\x20http://localhost:','\x20\x20Path\x20access','http','\x20\x20\x20\x20\x20\x20\x20POST\x20(body\x20implies\x20POST)\x0a\x20\x20','unlinkSync','\x20\x20\x20\x20•\x20an\x20activation\x20token\x20\x20(124\x20chars)','options','(unset)','[okdb]\x20./okdb-data\x20already\x20exists\x20—\x20skipping','free\x20tier','\x20\x20(','operation','[okdb]\x20backing\x20up\x20to\x20','OKDBForeignKeyError','\x20\x20[','features','verify','\x20/\x20',')\x20to\x20your\x20license\x20vendor.','Build\x20expects\x20public\x20key\x20fingerprint\x20','drop','toISOString','addedAt','resetIndex','[env]','licenseId','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20show\x20active\x20environment\x20+\x20list\x20all\x20envs\x0a\x20\x20','\x20\x20skipped=','constructor','createServer','licensed','Version\x20mismatch\x20for\x20','revoke','\x22\x20on\x20\x22','license','alloc','hex','\x20\x20\x20\x20license:\x20⚠\x20OPEN\x20—\x20','[okdb]\x20reset:\x20','activateLicense','call','derivePin','\x0a\x20\x20okdb\x20doctor\x0a','License\x20signature\x20invalid:\x20','createHash','unique:violation','selfAddress','fromEntries','pin','green','createdAt','message','white','\x20(must\x20be\x201–65535)','cyan','argv','system:stopped','[okdb]\x20created\x20./okdb-data','SCHEMA_COLLECTION_INVALID','ENVS','reason','min','\x20\x20\x20\x20name:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20\x20\x20path:\x20\x20','push','repeat','\x20\x20(unlimited)','[okdb]\x20error:\x20--password\x20requires\x20--name','ALREADY_EXISTS','\x20\x20\x20\x20-\x20The\x20activation\x20token\x20has\x20expired\x20—\x20request\x20a\x20fresh\x20one.','other','records','\x0a\x20\x20','\x20\x20→\x20\x20','bus:drain','floor','pending','\x1b[1m','envs=','item:remove','Invalid\x20index\x20key\x20type\x20for\x20\x27','\x0a[okdb]\x20shutting\x20down…\x0a','\x20\x20Shell\x20commands','\x20\x20✗','transport','HTTP\x20','fts','System','engines','setTtl','help','Foreign\x20key\x20violation:\x20','FOREIGN_KEY_VIOLATION','\x20(expires\x20in\x20','stdin','Activation\x20invalid:\x20','[okdb]\x20error:\x20license\x20management\x20is\x20only\x20available\x20in\x20licensed\x20builds\x20(npm\x20run\x20build:prod).','logs','handle','net','EXIT','hint','\x20not\x20found','\x20\x20No\x20licenses\x20stored.\x20Use\x20`okdb\x20license\x20<blob>`\x20to\x20add\x20one.','\x0a\x20\x20Run\x20okdb\x20to\x20start\x20the\x20server.\x0a','stopping','\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','\x20\x20✓\x20Revoked\x20token\x20','\x20\x20Next\x20step\x20—\x20activate\x20the\x20license:','noAdmin','\x20\x20\x20\x20licensee:\x20\x20','fts:drop','null','\x20\x20(licensee:\x20','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','_computeStatus','\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','8594940rZYgZP','\x20does\x20not\x20exist','\x20\x20\x20\x20expires:\x20\x20\x20','--path','result','\x22\x20is\x20used\x20by:\x20','\x1b[37m','values','der','now','MALFORMED_TOKEN','\x20env','_active','item:update','creating','\x20writes\x20(','[okdb]\x20backup\x20complete','http://localhost:','\x20\x20✓\x20OKDB\x20server\x20running','body','SIG_INVALID','\x20SECURITY\x20NOTICE','migrate','\x22\x20(must\x20be\x20debug|info|warn|error)','scrypt','active:','ACTIVATION_EXPIRED','activation','\x22\x20already\x20exists','set','Bearer\x20','[okdb]\x20imported\x20\x20types=','type/users\x20--help','ROUTES','access','api','attach','sourceKey','exit','--env\x20<name>','INDEX_HAS_CONSUMERS','\x20\x20Build:\x20\x20\x20key\x20fingerprint\x20','\x20\x20Usage:','toLocaleString','decodeLicenseBlob','licensee','prototype','address','writes=',':\x20key\x20[','failures','license:added','\x20\x20Usage:\x20','dirname','debug','maxWrites','[okdb]\x20starting…\x0a','properties','\x20\x20\x20\x20\x20\x20','--log-level','indexToDb','toLowerCase','--no-repl','toString','License\x20signature\x20invalid\x20—\x20this\x20license\x20was\x20not\x20signed\x20by\x20the\x20key\x20paired\x20with\x20this\x20build.\x20','OKDBSchemaCollectionError','ref:violation_resolved','Types','DELETE\x20type/users/item/x','type/users','summary','[okdb]\x20error:\x20unrecognized\x20input:\x20\x22','child_process','\x27:\x20','\x1b[35m','127.0.0.1','replace','byteLength','env/','ready','type/users/item/alice','\x20\x20\x20\x20pin:\x20\x20\x20\x20\x20','\x20\x20✓\x20http\x20listening\x20on\x20:','registerType','1450528iFPRQo','Type\x20\x27','error','LICENSE_HASH_MISMATCH','line','port\x20','__writeCounter','dynamic','\x20→\x20POST\x20/api/env/','stderr','charCodeAt','system:bus_state_change','_lookupByName','transaction','--help','HELP','filter','types','\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20','index:drop','sourceType','—\x20/api/\x20is\x20auto-prefixed,\x20env\x20is\x20auto-injected','data','QUIT','\x20\x20after\x20sync.\x20Duplicate\x20names\x20will\x20surface\x20as\x20ambiguous\x20logins\x20to\x20clean\x20up.','\x0a\x20\x20✓\x20License\x20activated','mcp','clearLine','../','expired','payload','\x20in\x20','grants','node:crypto','index:registered','readUInt8','type:registered','decoded','env:opened','search','--password','[okdb]\x20port\x20','Open\x20licenses\x20cannot\x20exceed\x206\x20months\x20duration\x20(this\x20license\x20expires\x20','SIGINT','open\x20','[okdb]\x20export\x20complete','/api/','\x1b[90m','isArray','permissions','magenta','application/json','detectInputType','1788440hhVLdp','\x20\x20\x20\x20•\x20a\x20license\x20blob\x20\x20\x20(Crockford\x20base32,\x20~150–250\x20chars)','_license','--username','true','<json-body>','details','get','(none)','off','\x20\x20\x20\x20addedAt:\x20\x20\x20','env:removed','exportToFile','gray',',\x20label:\x20','listLicenses','max','--label','\x1b[34m','then','\x22\x20matches\x20','expires','emit','randomBytes','okdb','unknown','Processors','txn:start','[okdb]\x20error:\x20--address\x20is\x20required\x20for\x20join\x20(this\x20node\x27s\x20reachable\x20sync\x20address).\x0a','sha256','\x20\x20Flags','ENV','username','\x22.\x20Use:\x20create,\x20list,\x20revoke','[okdb]\x20exporting\x20env\x20\x22','syncPeers','exp','(add\x20a\x20license\x20first)','id:\x20','count','ceil','token','toUpperCase','\x27\x20already\x20registered','level','ref:violation','length','red','\x20type','\x20(expires\x20','TYPES','Index\x20\x27','readUInt32BE','title','[okdb]\x20error:\x20remove\x20requires\x20an\x20id\x20argument','database\x20path\x20not\x20writable:\x20','[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22','isInteger','events','Hint:\x20','concat','\x20\x20\x20\x20','LICENSED_BUILD','\x20\x20╚═══════════════════════════╝','\x0a\x20\x20No\x20routes\x20matching\x20\x22','timeMachine','xdg-open\x20','\x20\x20records=','2172096uSmVNS','system:clock_change','typesPerEnv','resetting','utf8','8921367zRHbEB','[okdb]\x20invalid\x20log\x20level:\x20\x22','OKDBForeignKeyDeleteError','queue','\x20document(s)\x20reference\x20it\x20with\x20onDelete:restrict','isTTY','no\x20.kdbconfig\x20(using\x20defaults)','Invalid\x20license\x20blob:\x20','allocUnsafe','ttl:set','doctor','reload','VERB','[filter]','LOGS','terminal','\x20\x20·\x20\x20','crypto','PUB_FINGERPRINT','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20→\x20GET\x20/api/env/','INDEX_NOT_REGISTERED','FEATURES','string','(on\x20any\x20path\x20command)','slice','open','.kdbconfig','\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20override\x20active\x20environment\x20for\x20this\x20call\x0a\x20\x20','[okdb]\x20blobs:\x20imported=','Records','[okdb]\x20opening\x20','?\x0a\x20\x20Type\x20\x22yes\x22\x20to\x20confirm:\x20','\x20for\x20commands,\x20','\x20\x20@','logRequests','prompt','copy','\x0a\x20\x20Delete\x20ALL\x20data\x20in\x20','stringify','./okdb-export.ndjson','created','\x20opening\x20','meta','--drop','\x20\x20score:','dim','Sync','blob','--port','license:removed','\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\x20No\x20documentation\x20found\x20for:\x20','references','--env','\x20\x20⚠','\x20logs\x20off\x0a','enabled','\x20\x20\x20\x20features:\x20\x20','~tokens','description','includes','\x0a\x20\x20\x20\x20','roles','close','\x20licenses','assertLimit','env','\x20\x20(need\x20≥\x2018)','mkdirSync','getPins','.\x20The\x20active\x20license\x20does\x20not\x20enable\x20\x22','update','LICENSE_INVALID','index:progress','POST','routes','existsSync','embeddings','listen','.okdb-write-test','\x20<path>\x20[json-body]','decodeActivationToken:\x20expected\x2077\x20bytes,\x20got\x20','yes','version','keys:','23064bCZLxw','dropping','darwin','padStart','number','noRepl','UNIQUE_CONSTRAINT','fill','\x20active\x20env:\x20','OKDBInvalidPrimaryKeyError','../okdb','txn:end','[okdb]\x20exporting\x20blobs…','type/users/query\x20{\x22active\x22:true}','~licenses','bind','trim','writeFileSync','sig','false','[okdb]\x20unknown\x20token\x20action:\x20\x22','PUT','win32','index','put','forEach','\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','TYPE_ALREADY_REGISTERED','default','split','LICENSE_ACTIVATION_INVALID','parse','val','\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20','LICENSE_FEATURE_DISABLED','Index\x20\x22','EADDRINUSE','types:','--token','entries','system:poke','\x20\x20Type\x20','yellow','[okdb]\x20error:\x20show\x20requires\x20an\x20id\x20argument','PUBLIC_KEY_PEM','system','peers=','[okdb]\x20error:\x20ambiguous\x20prefix\x20\x22','info','\x20envs','\x0a\x20\x20Joining\x20cluster\x20at\x20','\x20\x20Tier:\x20\x20\x20\x20','[okdb]\x20error:\x20','\x0a[okdb]\x20fatal\x20error:','\x20records…','\x20\x20Note:\x20this\x20node\x20has\x20existing\x20tokens.\x20They\x20will\x20coexist\x20with\x20cluster\x20tokens\x0a','INVALID_VALUE','LICENSE_TYPE_OPEN','admin','[okdb]\x20error:\x20join\x20requires\x20credentials.\x20Provide\x20--token\x20<t>\x20or\x20--username\x20<u>\x20--password\x20<p>','code','create','captureStackTrace','\x20\x20\x20\x20api:\x20\x20\x20http://localhost:','\x20\x20Common\x20causes:','\x20\x20\x20\x20\x20http://localhost:','--grants','node','starting','port','--ttl','Feature\x20not\x20available\x20on\x20free\x20tier:\x20','\x20file','loadEnvFile','DELETE','Either\x20the\x20build\x20was\x20made\x20with\x20a\x20different\x20keypair,\x20or\x20the\x20license\x20was\x20issued\x20with\x20a\x20different\x20private\x20key.','\x20\x20\x20\x202.\x20The\x20vendor\x20returns\x20an\x20activation\x20token.','key','type:drop','sync','licenseHash','setPrompt','License\x20already\x20stored','OKDBSchemaValidationError','/\x20quit\x20/\x20Ctrl+C','--config','OKDB-PIN-V1:','OKDBIndexHasConsumersError','\x20\x20Or\x20set\x20sync.address\x20in\x20.kdbconfig','ttl','\x20\x20\x20\x20limits:\x20\x20\x20\x20','children','stopped','\x20log\x20level:\x20','hasType','\x20\x20\x20\x20writes:\x20\x20\x20\x20','No\x20tokens.','indexes','\x20\x20✓\x20joined\x20and\x20reconciliation\x20initiated','expiresAt','decodeActivationToken:\x20input\x20must\x20be\x20a\x20string','[okdb]\x20nothing\x20to\x20reset\x20—\x20','OKDBIndexAlreadyRegisteredError','USE','toFixed','<path>','7461VtdYAy','\x27\x20doesn\x27t\x20exist','\x20\x20changes=','[okdb]\x20loaded\x20config:\x20','Full-text\x20search','writeUInt32BE','/admin/index.html','startsWith','License\x20expired\x20or\x20invalidated','writeUInt16BE','clearTtl','logLevel','createInterface','SIGTERM','\x20environment\x20','config\x20file\x20valid:\x20','--name','\x20already\x20in\x20use','once','exec','\x0d[okdb]\x20blobs:\x20','round','\x20\x20Usage:\x20logs\x20[on|off|debug|info|warn|error]','INVALID_PRIMARY_KEY','hasOwnProperty','listRoutes','trimStart','every','\x20\x20\x20\x20status:\x20\x20\x20\x20pending\x20activation','has','.\x20Only\x20primitives,\x20null,\x20Buffers,\x20and\x20arrays\x20are\x20allowed.\x20Got:\x20','\x20\x20\x20\x20\x20control\x20log\x20verbosity\x0a\x20\x20','fts:','find','list','already\x20in\x20use','\x0a\x20\x20Joined.\x20Remote\x20tokens\x20replicated.\x20You\x20can\x20now\x20log\x20in\x20with\x20cluster\x20credentials.\x0a','path','./okdb-data','cause','[okdb]\x20started\x20in\x20','_envs','EXPIRES'];_0x9ed8=function(){return _0x2a9558;};return _0x9ed8();}function requireOkdb(){const _0x324f6a=_0x2a866b;if(hasRequiredOkdb)return okdb$1;hasRequiredOkdb=0x1;try{process[_0x324f6a(0x36f)]();}catch{}const _0x158bed=require$$1$1,_0x47e2f8=require$$1;function _0xddef8d(_0x191f4b){const _0x27e932=_0x324f6a,_0x2abca9=_0x191f4b[_0x27e932(0x2e9)](0x2),_0x3580f1={};let _0x562f36=0x0;while(_0x562f36<_0x2abca9[_0x27e932(0x2b6)]){const _0x2a5987=_0x2abca9[_0x562f36];if(_0x2a5987==='--port'||_0x2a5987==='-p')_0x3580f1[_0x27e932(0x36b)]=Number(_0x2abca9[++_0x562f36]);else{if(_0x2a5987==='--path'||_0x2a5987==='-d')_0x3580f1['path']=_0x2abca9[++_0x562f36];else{if(_0x2a5987===_0x27e932(0x422)||_0x2a5987==='-k')_0x3580f1[_0x27e932(0x373)]=_0x2abca9[++_0x562f36];else{if(_0x2a5987===_0x27e932(0x37b)||_0x2a5987==='-c')_0x3580f1[_0x27e932(0x151)]=_0x2abca9[++_0x562f36];else{if(_0x2a5987==='--log-level')_0x3580f1[_0x27e932(0x39b)]=_0x2abca9[++_0x562f36];else{if(_0x2a5987===_0x27e932(0x23d))_0x3580f1[_0x27e932(0x32b)]=!![];else{if(_0x2a5987===_0x27e932(0x40a))_0x3580f1[_0x27e932(0x1f7)]=!![];else{if(_0x2a5987===_0x27e932(0x306)||_0x2a5987==='-e')_0x3580f1['env']=_0x2abca9[++_0x562f36];else{if(_0x2a5987===_0x27e932(0x41a))_0x3580f1[_0x27e932(0x264)]=_0x2abca9[++_0x562f36];else{if(_0x2a5987===_0x27e932(0x3c5))_0x3580f1[_0x27e932(0x17f)]=!![];else{if(_0x2a5987===_0x27e932(0x42e))_0x3580f1['blobs']=!![];else{if(_0x2a5987===_0x27e932(0x2fc))_0x3580f1[_0x27e932(0x19e)]=!![];else{if(_0x2a5987===_0x27e932(0x173)){const _0x3627ec=[];while(_0x562f36+0x1<_0x2abca9[_0x27e932(0x2b6)]&&!_0x2abca9[_0x562f36+0x1][_0x27e932(0x397)]('--')){_0x3627ec[_0x27e932(0x1ca)](_0x2abca9[++_0x562f36]);}_0x3580f1[_0x27e932(0x2ea)]=_0x3627ec[_0x27e932(0x2b6)]>0x0?_0x3627ec:!![];}else{if(_0x2a5987==='--log-requests')_0x3580f1[_0x27e932(0x2f3)]=!![];else{if(_0x2a5987===_0x27e932(0x3a0))_0x3580f1[_0x27e932(0x188)]=_0x2abca9[++_0x562f36];else{if(_0x2a5987===_0x27e932(0x27b))_0x3580f1[_0x27e932(0x3e0)]=_0x2abca9[++_0x562f36];else{if(_0x2a5987===_0x27e932(0x299))_0x3580f1[_0x27e932(0x164)]=_0x2abca9[++_0x562f36];else{if(_0x2a5987==='--permissions')_0x3580f1['permissions']=_0x2abca9[++_0x562f36];else{if(_0x2a5987===_0x27e932(0x368))_0x3580f1[_0x27e932(0x273)]=_0x2abca9[++_0x562f36];else{if(_0x2a5987==='--ttl')_0x3580f1[_0x27e932(0x37f)]=_0x2abca9[++_0x562f36];else{if(_0x2a5987===_0x27e932(0x34c))_0x3580f1[_0x27e932(0x2b1)]=_0x2abca9[++_0x562f36];else{if(_0x2a5987===_0x27e932(0x28b)||_0x2a5987==='-u')_0x3580f1[_0x27e932(0x2a8)]=_0x2abca9[++_0x562f36];else{if(_0x2a5987===_0x27e932(0x3e3))_0x3580f1[_0x27e932(0x1b8)]=_0x2abca9[++_0x562f36];else{if(_0x2a5987==='--version'||_0x2a5987==='-v'){const _0x4c6812=require$$2;console[_0x27e932(0x445)](_0x4c6812['version']),process[_0x27e932(0x225)](0x0);}else(_0x2a5987===_0x27e932(0x261)||_0x2a5987==='-h')&&(_0x149e09(),process[_0x27e932(0x225)](0x0));}}}}}}}}}}}}}}}}}}}}}}}_0x562f36++;}return _0x3580f1;}function _0x149e09(){const _0x45cc1b=_0x324f6a;console[_0x45cc1b(0x445)]('\x0a\x20\x20okdb\x20—\x20standalone\x20OKDB\x20server\x0a\x0a\x20\x20Usage:\x0a\x20\x20\x20\x20okdb\x20[options]\x0a\x20\x20\x20\x20okdb\x20<command>\x0a\x0a\x20\x20Options:\x0a\x20\x20\x20\x20-p,\x20--port\x20<port>\x20\x20\x20\x20\x20\x20\x20\x20HTTP\x20port\x20(default:\x208484)\x0a\x20\x20\x20\x20-d,\x20--path\x20<dir>\x20\x20\x20\x20\x20\x20\x20\x20\x20Database\x20directory\x20(default:\x20./okdb-data)\x0a\x20\x20\x20\x20-k,\x20--key\x20\x20<secret>\x20\x20\x20\x20\x20\x20Encryption\x20key\x20for\x20data\x20at\x20rest\x0a\x20\x20\x20\x20-c,\x20--config\x20<file>\x20\x20\x20\x20\x20\x20Config\x20file\x20path\x20(default:\x20.kdbconfig)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--log-level\x20<level>\x20\x20Log\x20level:\x20debug\x20|\x20info\x20|\x20warn\x20|\x20error\x20(default:\x20info)\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-repl\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Start\x20server\x20without\x20interactive\x20shell\x0a\x20\x20\x20\x20\x20\x20\x20\x20--no-admin\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20admin\x20UI\x0a\x20\x20\x20\x20\x20\x20\x20\x20--open\x20[ip\x20...]\x20\x20\x20\x20\x20\x20Open\x20mode:\x20bypass\x20auth\x20for\x20listed\x20IPs\x20(default:\x20localhost).\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Examples:\x20--open\x20\x20--open\x20192.168.1.0/24\x20\x20--open\x20*\x0a\x20\x20\x20\x20\x20\x20\x20\x20--log-requests\x20\x20\x20\x20\x20\x20\x20Print\x20every\x20HTTP\x20request\x20to\x20stdout\x20(for\x20debugging)\x0a\x20\x20\x20\x20-v,\x20--version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Print\x20version\x20and\x20exit\x0a\x20\x20\x20\x20-h,\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20this\x20help\x0a\x0a\x20\x20Commands:\x0a\x20\x20\x20\x20version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Print\x20version\x20and\x20exit\x0a\x20\x20\x20\x20doctor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Run\x20health\x20checks\x0a\x20\x20\x20\x20init\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Create\x20.kdbconfig\x20and\x20okdb-data/\x0a\x20\x20\x20\x20token\x20create\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Create\x20a\x20token\x20in\x20the\x20local\x20DB\x20(direct\x20access,\x20no\x20HTTP)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--name\x20<name>\x20\x20\x20\x20\x20\x20For\x20password\x20login\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--password\x20<pass>\x20\x20Password\x20(requires\x20--name)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--label\x20<text>\x20\x20\x20\x20\x20Human\x20description\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--permissions\x20<l>\x20\x20Comma-separated\x20baseline\x20permissions\x20(e.g.\x20\x22*\x22\x20or\x20\x22data:read\x22)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--grants\x20<json>\x20\x20\x20\x20Per-env\x20grants\x20as\x20JSON\x20(e.g.\x20\x27{\x22orders\x22:[\x22data:*\x22]}\x27)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--ttl\x20<ms>\x20\x20\x20\x20\x20\x20\x20\x20\x20Optional\x20TTL\x20in\x20milliseconds\x0a\x20\x20\x20\x20token\x20list\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20List\x20all\x20tokens\x20in\x20the\x20local\x20DB\x0a\x20\x20\x20\x20token\x20revoke\x20<id>\x20\x20\x20\x20\x20\x20\x20\x20Revoke\x20(delete)\x20a\x20token\x20by\x20id\x20(full\x20uuid\x20or\x20unique\x20prefix)\x0a\x20\x20\x20\x20join\x20<address>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Join\x20an\x20existing\x20cluster\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--token\x20<t>\x20\x20\x20\x20\x20\x20\x20\x20Bearer\x20token\x20from\x20the\x20cluster\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--username\x20<u>\x20\x20\x20\x20\x20Or,\x20username\x20for\x20login\x20exchange\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--password\x20<p>\x20\x20\x20\x20\x20Password\x20for\x20login\x20exchange\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--address\x20<addr>\x20\x20\x20This\x20node\x27s\x20reachable\x20sync\x20address\x20(required)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--path\x20<dir>\x20\x20\x20\x20\x20\x20\x20Local\x20DB\x20path\x0a\x20\x20\x20\x20backup\x20[dir]\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Hot\x20filesystem\x20backup\x20via\x20LMDB\x20native\x20copy\x20(default:\x20./okdb-backup)\x0a\x20\x20\x20\x20export\x20<file>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Streaming\x20NDJSON\x20logical\x20export\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env\x20<name>\x20\x20\x20\x20\x20\x20env\x20to\x20export\x20(default:\x20default)\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--types\x20<a,b,...>\x20comma-separated\x20type\x20filter\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--changes\x20\x20\x20\x20\x20\x20\x20\x20\x20include\x20changelog\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--blobs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20also\x20export\x20blob\x20files\x20alongside\x0a\x20\x20\x20\x20import\x20<file>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Streaming\x20NDJSON\x20logical\x20import\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--env\x20<name>\x20\x20\x20\x20\x20\x20target\x20env\x20override\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--types\x20<a,b,...>\x20import\x20only\x20these\x20types\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--drop\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20drop\x20&\x20recreate\x20existing\x20types\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--changes\x20\x20\x20\x20\x20\x20\x20\x20\x20restore\x20changelog\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20--blobs\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20also\x20import\x20blob\x20files\x20alongside\x0a\x20\x20\x20\x20reset\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Delete\x20and\x20recreate\x20database\x20(with\x20confirmation)\x0a\x20\x20\x20\x20license\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20List\x20stored\x20licenses,\x20current\x20tier,\x20and\x20usage\x0a\x20\x20\x20\x20license\x20<blob|path>\x20\x20\x20\x20\x20\x20Add\x20a\x20license\x20blob\x20(or\x20read\x20from\x20a\x20.license\x20file)\x0a\x20\x20\x20\x20license\x20<activation>\x20\x20\x20\x20\x20Activate\x20a\x20previously-added\x20license\x20with\x20the\x20vendor\x27s\x20token\x0a\x20\x20\x20\x20license\x20<id>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20details\x20for\x20one\x20stored\x20license\x20(by\x20uuid\x20or\x20prefix)\x0a\x20\x20\x20\x20license\x20remove\x20<id>\x20\x20\x20\x20\x20\x20Remove\x20a\x20stored\x20license\x0a\x0a\x20\x20Environment\x20variables:\x0a\x20\x20\x20\x20OKDB_PORT\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20HTTP\x20port\x0a\x20\x20\x20\x20OKDB_PATH\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Database\x20directory\x0a\x20\x20\x20\x20OKDB_LOG_LEVEL\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Log\x20level\x20(debug|info|warn|error)\x0a\x20\x20\x20\x20OKDB_KEY\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Encryption\x20key\x0a\x20\x20\x20\x20OKDB_NO_REPL=1\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20REPL\x0a\x20\x20\x20\x20OKDB_NO_ADMIN=1\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Disable\x20admin\x20UI\x0a\x0a\x20\x20Config\x20file\x20(.kdbconfig)\x20—\x20JSON,\x20all\x20keys\x20optional:\x0a\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x22port\x22:\x20\x20\x20\x20\x208484,\x0a\x20\x20\x20\x20\x20\x20\x22path\x22:\x20\x20\x20\x20\x20\x22./okdb-data\x22,\x0a\x20\x20\x20\x20\x20\x20\x22key\x22:\x20\x20\x20\x20\x20\x20\x22...\x22,\x0a\x20\x20\x20\x20\x20\x20\x22logLevel\x22:\x20\x22info\x22,\x0a\x20\x20\x20\x20\x20\x20\x22noAdmin\x22:\x20\x20false,\x0a\x20\x20\x20\x20\x20\x20\x22noRepl\x22:\x20\x20\x20false,\x0a\x20\x20\x20\x20\x20\x20\x22auth\x22:\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x22open\x22:\x20false\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20}\x0a\x0a\x20\x20Examples:\x0a\x20\x20\x20\x20okdb\x0a\x20\x20\x20\x20okdb\x20--port\x209000\x20--path\x20./mydb\x0a\x20\x20\x20\x20okdb\x20--no-repl\x20--port\x208080\x0a\x20\x20\x20\x20okdb\x20--open\x0a\x20\x20\x20\x20okdb\x20--open\x20192.168.1.0/24\x0a\x20\x20\x20\x20okdb\x20doctor\x0a\x20\x20\x20\x20okdb\x20backup\x20./my-backup\x0a');}const _0x37616b=new Set([_0x324f6a(0x235),_0x324f6a(0x356),_0x324f6a(0x40f),_0x324f6a(0x255)]);function _0x28c740(_0x1d8abd){const _0xb7c513=_0x324f6a,_0x40f130=_0x1d8abd[_0xb7c513(0x151)]?_0x158bed[_0xb7c513(0x431)](_0x1d8abd[_0xb7c513(0x151)]):_0x158bed[_0xb7c513(0x431)](_0xb7c513(0x2eb));let _0x144d97={};if(_0x47e2f8['existsSync'](_0x40f130))try{const _0x5f1473=_0x47e2f8[_0xb7c513(0x172)](_0x40f130,_0xb7c513(0x2d0))[_0xb7c513(0x24b)](/^\uFEFF/,'');_0x144d97=JSON[_0xb7c513(0x345)](_0x5f1473),console[_0xb7c513(0x445)](_0xb7c513(0x393)+_0x40f130);}catch(_0x5cbd4a){console[_0xb7c513(0x255)]('[okdb]\x20failed\x20to\x20parse\x20config\x20file\x20'+_0x40f130+':\x20'+_0x5cbd4a[_0xb7c513(0x1bd)]),process['exit'](0x1);}const _0x514ffd={'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},_0x7869fd={'port':_0x1d8abd[_0xb7c513(0x36b)]??_0x144d97[_0xb7c513(0x36b)]??_0x514ffd[_0xb7c513(0x36b)]??0x2124,'dbPath':_0x1d8abd['path']??_0x144d97['path']??_0x514ffd[_0xb7c513(0x3b5)]??_0xb7c513(0x3b6),'key':_0x1d8abd['key']??_0x144d97[_0xb7c513(0x373)]??_0x514ffd['key']??undefined,'logLevel':_0x1d8abd[_0xb7c513(0x39b)]??_0x144d97[_0xb7c513(0x39b)]??_0x514ffd['logLevel']??'info','noRepl':_0x1d8abd['noRepl']??_0x144d97[_0xb7c513(0x32b)]??_0x514ffd['noRepl']??![],'noAdmin':_0x1d8abd[_0xb7c513(0x1f7)]??_0x144d97[_0xb7c513(0x1f7)]??_0x514ffd[_0xb7c513(0x1f7)]??![],'admin':_0x144d97[_0xb7c513(0x360)]??{},'api':_0x144d97[_0xb7c513(0x222)]??undefined,'auth':_0x144d97['auth']??undefined,'mcp':_0x144d97['mcp']??undefined,'timeMachine':_0x144d97[_0xb7c513(0x2c9)]!==![]?_0x144d97['timeMachine']??{}:![]};return _0x1d8abd['open']!==undefined&&(_0x7869fd[_0xb7c513(0x165)]=_0x7869fd['auth']||{},_0x7869fd[_0xb7c513(0x165)][_0xb7c513(0x2ea)]=_0x1d8abd['open']),_0x1d8abd[_0xb7c513(0x2f3)]&&(_0x7869fd[_0xb7c513(0x235)]=_0x7869fd['debug']||{},_0x7869fd[_0xb7c513(0x235)][_0xb7c513(0x2f3)]=!![]),(!Number[_0xb7c513(0x2c1)](_0x7869fd[_0xb7c513(0x36b)])||_0x7869fd[_0xb7c513(0x36b)]<0x1||_0x7869fd[_0xb7c513(0x36b)]>0xffff)&&(console[_0xb7c513(0x255)]('[okdb]\x20invalid\x20port:\x20'+_0x7869fd[_0xb7c513(0x36b)]+_0xb7c513(0x1bf)),process['exit'](0x1)),!_0x37616b[_0xb7c513(0x3ad)](_0x7869fd[_0xb7c513(0x39b)])&&(console['error'](_0xb7c513(0x2d2)+_0x7869fd[_0xb7c513(0x39b)]+_0xb7c513(0x216)),process[_0xb7c513(0x225)](0x1)),_0x7869fd;}function _0x4ffe04(_0x5cb6c0){const _0xe63739=_0x324f6a;return!!(_0x5cb6c0&&typeof _0x5cb6c0===_0xe63739(0x3fe)&&!Array['isArray'](_0x5cb6c0)&&Object[_0xe63739(0x3cb)](_0x5cb6c0)[_0xe63739(0x2b6)]>0x0);}const _0x188af3=!process[_0x324f6a(0x3c1)][_0x324f6a(0x2d6)]||!!process.env.NO_COLOR;function _0x381962(_0x5a8d5e,_0xabfb5a){const _0x4b650d=_0x324f6a;return _0x188af3?_0xabfb5a:'\x1b['+_0x5a8d5e+'m'+_0xabfb5a+_0x4b650d(0x144);}function _0xb9b3bc(_0x1b8ae9){const _0x240c63=_0x324f6a;if(!_0x1b8ae9||_0x1b8ae9['length']===0x0)return;const _0x49f754='─'['repeat'](0x38);process[_0x240c63(0x25c)][_0x240c63(0x13f)]('\x0a'),process[_0x240c63(0x25c)][_0x240c63(0x13f)](_0x381962('33','\x20\x20⚠\x20\x20'+_0x1b8ae9[_0x240c63(0x2b6)]+_0x240c63(0x214)+(_0x1b8ae9[_0x240c63(0x2b6)]>0x1?'S':'')+'\x0a')),process[_0x240c63(0x25c)][_0x240c63(0x13f)]('\x20\x20'+_0x49f754+'\x0a');for(const _0x211a0a of _0x1b8ae9){const _0x21a173=_0x211a0a[_0x240c63(0x2b4)]===_0x240c63(0x255)?_0x381962('31',_0x240c63(0x1dd)):_0x381962('33',_0x240c63(0x307));process['stderr'][_0x240c63(0x13f)](_0x21a173+'\x20\x20'+_0x381962('1',_0x211a0a[_0x240c63(0x2bd)])+'\x0a'),process[_0x240c63(0x25c)][_0x240c63(0x13f)](_0x240c63(0x3d6)+_0x211a0a['message']+'\x0a');if(_0x211a0a[_0x240c63(0x1ef)])process[_0x240c63(0x25c)][_0x240c63(0x13f)]('\x20\x20\x20\x20\x20\x20\x20'+_0x381962('2',_0x240c63(0x2c3)+_0x211a0a['hint'])+'\x0a');process['stderr'][_0x240c63(0x13f)]('\x0a');}process[_0x240c63(0x25c)]['write']('\x20\x20'+_0x49f754+'\x0a\x0a');}function _0x5e531d(_0x2563a3,_0xc0b3f7){const _0x186046=_0x324f6a,_0x44f8e4=_0x2563a3[_0x186046(0x18c)]['listen'](_0xc0b3f7);return new Promise((_0x474440,_0x1c826f)=>{const _0x8af23e=_0x186046;_0x44f8e4[_0x8af23e(0x3a2)](_0x8af23e(0x3d5),_0x474440),_0x44f8e4['once'](_0x8af23e(0x255),_0x1c826f);});}async function _0x4c019f(_0x30b03d){const _0x5ac1f7=_0x324f6a,_0x1b873d=require$$3;console[_0x5ac1f7(0x445)](_0x5ac1f7(0x1b4));let _0xa029a8=!![];const _0x302710=(_0x5e03bd,_0x23402e)=>{const _0xc393ce=_0x5ac1f7;console[_0xc393ce(0x445)]('\x20\x20'+(_0x5e03bd?'✓':'✗')+'\x20'+_0x23402e);if(!_0x5e03bd)_0xa029a8=![];},_0x4fa3df=Number(process[_0x5ac1f7(0x324)][_0x5ac1f7(0x24b)]('v','')['split']('.')[0x0]);_0x302710(_0x4fa3df>=0x12,_0x5ac1f7(0x419)+process[_0x5ac1f7(0x324)]+(_0x4fa3df<0x12?_0x5ac1f7(0x314):''));const _0x43ec9a=_0x158bed['resolve'](_0x30b03d['dbPath']);try{_0x47e2f8[_0x5ac1f7(0x315)](_0x43ec9a,{'recursive':!![]});const _0xe0ae29=_0x158bed[_0x5ac1f7(0x3db)](_0x43ec9a,_0x5ac1f7(0x320));_0x47e2f8['writeFileSync'](_0xe0ae29,''),_0x47e2f8[_0x5ac1f7(0x18e)](_0xe0ae29),_0x302710(!![],_0x5ac1f7(0x448)+_0x43ec9a);}catch(_0x53345d){_0x302710(![],_0x5ac1f7(0x2bf)+_0x43ec9a+_0x5ac1f7(0x194)+_0x53345d[_0x5ac1f7(0x1bd)]+')');}const _0x4fd39e=await new Promise(_0x5cfe3c=>{const _0x54a832=_0x5ac1f7,_0x55bb4d=_0x1b873d[_0x54a832(0x1a7)]();_0x55bb4d[_0x54a832(0x3a2)](_0x54a832(0x255),()=>_0x5cfe3c(![])),_0x55bb4d['once'](_0x54a832(0x3d5),()=>{const _0x4dc735=_0x54a832;_0x55bb4d[_0x4dc735(0x310)](),_0x5cfe3c(!![]);}),_0x55bb4d[_0x54a832(0x31f)](_0x30b03d['port'],_0x54a832(0x24a));});_0x302710(_0x4fd39e,_0x5ac1f7(0x258)+_0x30b03d['port']+'\x20'+(_0x4fd39e?'available':_0x5ac1f7(0x3b3)));const _0x3d6bd4=_0x158bed[_0x5ac1f7(0x431)](_0x5ac1f7(0x2eb));if(_0x47e2f8[_0x5ac1f7(0x31d)](_0x3d6bd4))try{JSON[_0x5ac1f7(0x345)](_0x47e2f8[_0x5ac1f7(0x172)](_0x3d6bd4,'utf8')[_0x5ac1f7(0x24b)](/^\uFEFF/,'')),_0x302710(!![],_0x5ac1f7(0x39f)+_0x3d6bd4);}catch(_0x385929){_0x302710(![],'config\x20file\x20invalid:\x20'+_0x385929[_0x5ac1f7(0x1bd)]);}else _0x302710(!![],_0x5ac1f7(0x2d7));console['log'](''),_0xa029a8?console[_0x5ac1f7(0x445)]('\x20\x20All\x20checks\x20passed.\x0a'):(console['log'](_0x5ac1f7(0x410)),process['exit'](0x1));}async function _0x336615(){const _0x1f4861=_0x324f6a,_0x58426f=_0x158bed[_0x1f4861(0x431)](_0x1f4861(0x2eb));!_0x47e2f8['existsSync'](_0x58426f)?(_0x47e2f8[_0x1f4861(0x337)](_0x58426f,JSON[_0x1f4861(0x2f7)]({'port':0x2124,'path':_0x1f4861(0x3b6),'logLevel':_0x1f4861(0x356),'noRepl':![],'noAdmin':![]},null,0x2)+'\x0a'),console['log'](_0x1f4861(0x3eb))):console[_0x1f4861(0x445)](_0x1f4861(0x3fb));const _0x54db07=_0x158bed[_0x1f4861(0x431)](_0x1f4861(0x3b6));!_0x47e2f8[_0x1f4861(0x31d)](_0x54db07)?(_0x47e2f8[_0x1f4861(0x315)](_0x54db07,{'recursive':!![]}),console[_0x1f4861(0x445)](_0x1f4861(0x1c3))):console[_0x1f4861(0x445)](_0x1f4861(0x192)),console['log'](_0x1f4861(0x1f2));}async function _0x2c788b(_0x397e6c){const _0xa15701=_0x324f6a,_0x221979=_0x158bed[_0xa15701(0x431)](_0x397e6c['dbPath']);if(!_0x47e2f8['existsSync'](_0x221979)){console['log'](_0xa15701(0x38b)+_0x221979+'\x20does\x20not\x20exist');return;}const _0xb3bcf3=require$$0$2,_0x3d7db3=_0xb3bcf3[_0xa15701(0x39c)]({'input':process[_0xa15701(0x1e8)],'output':process[_0xa15701(0x3c1)]}),_0xdd7fff=await new Promise(_0x36f586=>_0x3d7db3['question'](_0xa15701(0x2f6)+_0x221979+_0xa15701(0x2f0),_0x36f586));_0x3d7db3[_0xa15701(0x310)](),console[_0xa15701(0x445)]('');if(_0xdd7fff[_0xa15701(0x336)]()[_0xa15701(0x23c)]()!==_0xa15701(0x323)){console[_0xa15701(0x445)]('[okdb]\x20reset\x20aborted');return;}_0x47e2f8['rmSync'](_0x221979,{'recursive':!![],'force':!![]}),console[_0xa15701(0x445)](_0xa15701(0x1b0)+_0x221979+_0xa15701(0x3da));}async function _0x1ad921(_0x1bf692,_0x5be853){const _0x3d67ab=_0x324f6a,_0xdeb6d7=require$$5,_0x1f2d31=_0x158bed[_0x3d67ab(0x431)](_0x5be853[_0x3d67ab(0x41d)]);console[_0x3d67ab(0x445)](_0x3d67ab(0x2ef)+_0x1f2d31+'…');const _0x3ec5e2=new _0xdeb6d7(_0x1f2d31,_0x5be853[_0x3d67ab(0x373)]?{'encryptionKey':_0x5be853[_0x3d67ab(0x373)]}:{});await _0x3ec5e2[_0x3d67ab(0x2ea)](),console[_0x3d67ab(0x445)](_0x3d67ab(0x196)+_0x1bf692+'…');const {envs:_0x47d701}=await _0x3ec5e2['migrate']['backup'](_0x1bf692);for(const _0x5e9c12 of _0x47d701){const _0x447c85=_0x5e9c12[_0x3d67ab(0x141)]>0x0?_0x3d67ab(0x194)+(_0x5e9c12[_0x3d67ab(0x141)]/0x400/0x400)[_0x3d67ab(0x38e)](0x2)+'\x20MB\x20→\x20'+(_0x5e9c12['sizeAfter']/0x400/0x400)['toFixed'](0x2)+'\x20MB)':'';console[_0x3d67ab(0x445)]('\x20\x20✓\x20'+_0x5e9c12[_0x3d67ab(0x188)]+_0x3d67ab(0x1d3)+_0x5e9c12['dest']+_0x447c85);}await _0x3ec5e2['close'](),console[_0x3d67ab(0x445)](_0x3d67ab(0x20f));}async function _0x3e9e0b(_0x34e0d3,_0x599511,_0x386892){const _0x34eb39=_0x324f6a,_0x4f0729=require$$5,_0x1d1364=_0x158bed[_0x34eb39(0x431)](_0x599511[_0x34eb39(0x41d)]),_0x2de957=_0x386892[_0x34eb39(0x313)]??_0x34eb39(0x342),_0x6cb38d=_0x386892[_0x34eb39(0x264)]?_0x386892['types'][_0x34eb39(0x343)](',')[_0x34eb39(0x158)](_0x58d75f=>_0x58d75f['trim']()):null;console[_0x34eb39(0x445)](_0x34eb39(0x2ef)+_0x1d1364+'…');const _0x2d1e81=new _0x4f0729(_0x1d1364,_0x599511['key']?{'encryptionKey':_0x599511['key']}:{});await _0x2d1e81[_0x34eb39(0x2ea)](),console['log'](_0x34eb39(0x2aa)+_0x2de957+'\x22\x20→\x20'+_0x34e0d3+'…');const _0x154faa=await _0x2d1e81[_0x34eb39(0x215)][_0x34eb39(0x294)](_0x34e0d3,{'envName':_0x2de957,'types':_0x6cb38d,'includeChanges':!!_0x386892[_0x34eb39(0x17f)]});console['log']('[okdb]\x20exported\x20\x20types='+_0x154faa[_0x34eb39(0x264)]+'\x20\x20records='+_0x154faa[_0x34eb39(0x1d1)]+_0x34eb39(0x392)+_0x154faa['changes']);if(_0x386892[_0x34eb39(0x175)]){const _0xa87959=_0x158bed[_0x34eb39(0x3db)](_0x158bed[_0x34eb39(0x234)](_0x34e0d3),'blobs');process[_0x34eb39(0x3c1)]['write'](_0x34eb39(0x332));const {count:_0x16cc4b,bytes:_0x4704cf}=await _0x2d1e81['migrate'][_0x34eb39(0x3c3)](_0xa87959);console['log'](_0x34eb39(0x3a4)+_0xa87959+_0x34eb39(0x194)+_0x16cc4b+_0x34eb39(0x36e)+(_0x16cc4b!==0x1?'s':'')+',\x20'+(_0x4704cf/0x400/0x400)[_0x34eb39(0x38e)](0x2)+'\x20MB)');}await _0x2d1e81[_0x34eb39(0x310)](),console[_0x34eb39(0x445)](_0x34eb39(0x280));}async function _0x3eecec(_0x2fcdb5,_0x2bf1f3,_0x7ae80){const _0x716a6a=_0x324f6a,_0x3b8f28=require$$5,_0x5bf78e=_0x158bed['resolve'](_0x2bf1f3[_0x716a6a(0x41d)]),_0xa6c2dd=_0x7ae80['env']??null,_0xdfa2cd=_0x7ae80[_0x716a6a(0x264)]?_0x7ae80[_0x716a6a(0x264)][_0x716a6a(0x343)](',')[_0x716a6a(0x158)](_0x250e6f=>_0x250e6f[_0x716a6a(0x336)]()):null,_0xedc0a1=!!_0x7ae80[_0x716a6a(0x19e)];console['log'](_0x716a6a(0x2ef)+_0x5bf78e+'…');const _0x4b09e0=new _0x3b8f28(_0x5bf78e,_0x2bf1f3[_0x716a6a(0x373)]?{'encryptionKey':_0x2bf1f3['key']}:{});await _0x4b09e0['open'](),console[_0x716a6a(0x445)]('[okdb]\x20importing\x20'+_0x2fcdb5+'…');const _0x502af0=await _0x4b09e0[_0x716a6a(0x215)]['importFromFile'](_0x2fcdb5,{'envName':_0xa6c2dd,'types':_0xdfa2cd,'dropExisting':_0xedc0a1,'includeChanges':!!_0x7ae80[_0x716a6a(0x17f)],'onProgress':({type:_0x3ed28a,count:_0xcc66d2})=>{const _0x11e192=_0x716a6a;process['stdout'][_0x11e192(0x13f)]('\x0d[okdb]\x20'+_0x3ed28a+':\x20'+_0xcc66d2+_0x11e192(0x35c));}});process[_0x716a6a(0x3c1)][_0x716a6a(0x13f)]('\x0a'),console['log'](_0x716a6a(0x21e)+_0x502af0[_0x716a6a(0x264)]+_0x716a6a(0x2cb)+_0x502af0['records']+_0x716a6a(0x392)+_0x502af0[_0x716a6a(0x17f)]);if(_0x7ae80[_0x716a6a(0x175)]){const _0x1bf535=_0x158bed[_0x716a6a(0x3db)](_0x158bed[_0x716a6a(0x234)](_0x2fcdb5),_0x716a6a(0x175));if(_0x47e2f8[_0x716a6a(0x31d)](_0x1bf535)){const {imported:_0x28de17,skipped:_0x401bcc}=await _0x4b09e0[_0x716a6a(0x215)][_0x716a6a(0x3f9)](_0x1bf535);console[_0x716a6a(0x445)](_0x716a6a(0x2ed)+_0x28de17+_0x716a6a(0x1a5)+_0x401bcc);}}await _0x4b09e0[_0x716a6a(0x310)](),console[_0x716a6a(0x445)](_0x716a6a(0x3e1));}async function _0x467f5f(_0x23cb6d,_0xee9681){const _0xddde0a=_0x324f6a;_0xee9681[_0xddde0a(0x3e0)]&&!_0xee9681[_0xddde0a(0x188)]&&(console[_0xddde0a(0x255)](_0xddde0a(0x1cd)),process[_0xddde0a(0x225)](0x1));const _0x2f5464=_0xee9681[_0xddde0a(0x284)]?_0xee9681[_0xddde0a(0x284)]['split'](',')[_0xddde0a(0x158)](_0x5451fa=>_0x5451fa[_0xddde0a(0x336)]())[_0xddde0a(0x263)](Boolean):[];let _0x3e6e64={};if(_0xee9681[_0xddde0a(0x273)])try{_0x3e6e64=JSON[_0xddde0a(0x345)](_0xee9681['grants']);if(typeof _0x3e6e64!==_0xddde0a(0x3fe)||Array[_0xddde0a(0x283)](_0x3e6e64)||_0x3e6e64===null)throw new Error();}catch{console[_0xddde0a(0x255)]('[okdb]\x20error:\x20--grants\x20must\x20be\x20valid\x20JSON\x20object'),process['exit'](0x1);}const _0x4d2e30=require$$5,{randomToken:_0x2ed682,hashToken:_0xc3d30b,hashPassword:_0x437fa6}=requireOkdbAuthTokens(),_0x52f103=require$$0,_0x3577a4=_0x158bed[_0xddde0a(0x431)](_0x23cb6d['dbPath']),_0x4258a6=new _0x4d2e30(_0x3577a4,_0x23cb6d[_0xddde0a(0x373)]?{'encryptionKey':_0x23cb6d[_0xddde0a(0x373)]}:{});await _0x4258a6['open']();try{await _0x4258a6['auth']['_ensureTokensType']();if(_0xee9681[_0xddde0a(0x188)]){const _0x54aad6=await _0x4258a6[_0xddde0a(0x165)][_0xddde0a(0x25f)](_0xee9681['name']);_0x54aad6&&(console['error'](_0xddde0a(0x3e2)+_0xee9681[_0xddde0a(0x188)]+_0xddde0a(0x21b)),process[_0xddde0a(0x225)](0x1));}const _0x240527=_0x2ed682(0x20),_0x5caff9=_0xc3d30b(_0x240527),_0x1828b4=_0xee9681[_0xddde0a(0x3e0)]?await _0x437fa6(_0xee9681[_0xddde0a(0x3e0)]):null,_0x100243=_0x52f103[_0xddde0a(0x3c4)](),_0x1e9a29={'tokenHash':_0x5caff9,'name':_0xee9681[_0xddde0a(0x188)]||null,'passwordHash':_0x1828b4,'label':_0xee9681['label']||null,'permissions':_0x2f5464,'grants':_0x3e6e64,'createdAt':Date[_0xddde0a(0x208)](),'lastUsedAt':null},_0x2cea4a=_0xee9681[_0xddde0a(0x37f)]?{'ttl':Number(_0xee9681['ttl'])}:undefined;await _0x4258a6[_0xddde0a(0x425)][_0xddde0a(0x33e)]('~tokens',_0x100243,_0x1e9a29,_0x2cea4a),console[_0xddde0a(0x445)](_0xddde0a(0x427)),console[_0xddde0a(0x445)]('\x20\x20\x20\x20id:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x100243),console[_0xddde0a(0x445)](_0xddde0a(0x1c8)+(_0xee9681[_0xddde0a(0x188)]||_0xddde0a(0x191))),console[_0xddde0a(0x445)](_0xddde0a(0x3f2)+(_0xee9681[_0xddde0a(0x164)]||_0xddde0a(0x191))),console['log']('\x20\x20\x20\x20permissions:\x20'+(_0x2f5464[_0xddde0a(0x3db)](',\x20')||'(none)')),console[_0xddde0a(0x445)]('\x0a\x20\x20Raw\x20token\x20(shown\x20once,\x20save\x20it\x20now):\x0a'),console[_0xddde0a(0x445)](_0xddde0a(0x2c5)+_0x240527+'\x0a');}finally{await _0x4258a6[_0xddde0a(0x310)]();}}async function _0x208276(_0x5d7de8){const _0x5eb621=_0x324f6a,_0x2aff7f=require$$5,_0x3d1123=_0x158bed[_0x5eb621(0x431)](_0x5d7de8[_0x5eb621(0x41d)]),_0xb1398e=new _0x2aff7f(_0x3d1123,_0x5d7de8[_0x5eb621(0x373)]?{'encryptionKey':_0x5d7de8['key']}:{});await _0xb1398e[_0x5eb621(0x2ea)]();try{const _0x4fee5f=_0xb1398e['_systemEnv'];if(!_0x4fee5f||!_0x4fee5f[_0x5eb621(0x384)](_0x5eb621(0x30b))){console[_0x5eb621(0x445)](_0x5eb621(0x386));return;}const _0x3f21ef=[];for(const {key:_0x50944a,value:_0x24f620}of _0x4fee5f[_0x5eb621(0x148)](_0x5eb621(0x30b))){_0x3f21ef[_0x5eb621(0x1ca)]({'id':_0x50944a,'name':_0x24f620[_0x5eb621(0x188)]||'(unset)','label':_0x24f620[_0x5eb621(0x164)]||_0x5eb621(0x191),'permissions':Array[_0x5eb621(0x283)](_0x24f620['permissions'])?_0x24f620[_0x5eb621(0x284)]['join'](','):'','created':_0x24f620[_0x5eb621(0x1bc)]?new Date(_0x24f620[_0x5eb621(0x1bc)])[_0x5eb621(0x19f)]()['slice'](0x0,0xa):''});}if(_0x3f21ef['length']===0x0){console[_0x5eb621(0x445)]('No\x20tokens.');return;}const _0x5d1482=!process[_0x5eb621(0x3c1)][_0x5eb621(0x421)]||process[_0x5eb621(0x3c1)]['columns']>=0x64,_0x3ee7d2=_0x5d1482?0x24:0xa,_0x309dd7=['ID'[_0x5eb621(0x153)](_0x3ee7d2),_0x5eb621(0x16c)['padEnd'](0x10),_0x5eb621(0x42c)[_0x5eb621(0x153)](0x14),'PERMISSIONS'[_0x5eb621(0x153)](0x14),'CREATED'][_0x5eb621(0x3db)]('\x20\x20');console[_0x5eb621(0x445)]('\x0a'+_0x309dd7),console[_0x5eb621(0x445)]('-'[_0x5eb621(0x1cb)](_0x309dd7[_0x5eb621(0x2b6)]));for(const _0x5eac28 of _0x3f21ef){const _0x52904c=_0x5d1482?_0x5eac28['id']:_0x5eac28['id'][_0x5eb621(0x2e9)](0x0,0x8)+'…';console[_0x5eb621(0x445)]([_0x52904c[_0x5eb621(0x153)](_0x3ee7d2),_0x5eac28[_0x5eb621(0x188)][_0x5eb621(0x2e9)](0x0,0x10)[_0x5eb621(0x153)](0x10),_0x5eac28[_0x5eb621(0x164)][_0x5eb621(0x2e9)](0x0,0x14)[_0x5eb621(0x153)](0x14),_0x5eac28[_0x5eb621(0x284)][_0x5eb621(0x2e9)](0x0,0x14)[_0x5eb621(0x153)](0x14),_0x5eac28[_0x5eb621(0x2f9)]][_0x5eb621(0x3db)]('\x20\x20'));}console[_0x5eb621(0x445)]('');}finally{await _0xb1398e[_0x5eb621(0x310)]();}}async function _0x487278(_0x184e5a,_0x4e5cc3){const _0x19231c=_0x324f6a;!_0x184e5a&&(console['error'](_0x19231c(0x14b)),process['exit'](0x1));const _0x4d34f0=require$$5,_0x381cf7=_0x158bed[_0x19231c(0x431)](_0x4e5cc3[_0x19231c(0x41d)]),_0x2c4e47=new _0x4d34f0(_0x381cf7,_0x4e5cc3[_0x19231c(0x373)]?{'encryptionKey':_0x4e5cc3[_0x19231c(0x373)]}:{});await _0x2c4e47[_0x19231c(0x2ea)]();try{const _0xe54bb1=_0x2c4e47[_0x19231c(0x425)];(!_0xe54bb1||!_0xe54bb1[_0x19231c(0x384)](_0x19231c(0x30b)))&&(console[_0x19231c(0x255)]('[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22'+_0x184e5a+'\x22'),process[_0x19231c(0x225)](0x1));let _0xc9e232=null,_0x45aaa2=null;const _0x4641a4=_0xe54bb1[_0x19231c(0x28f)](_0x19231c(0x30b),_0x184e5a);if(_0x4641a4)_0xc9e232=_0x184e5a,_0x45aaa2=_0x4641a4;else{const _0xa0dcf7=[];for(const {key:_0x2ebc6a,value:_0x190a82}of _0xe54bb1[_0x19231c(0x148)](_0x19231c(0x30b))){if(_0x2ebc6a[_0x19231c(0x397)](_0x184e5a))_0xa0dcf7[_0x19231c(0x1ca)]({'key':_0x2ebc6a,'value':_0x190a82});}_0xa0dcf7['length']===0x0&&(console[_0x19231c(0x255)]('[okdb]\x20error:\x20no\x20token\x20with\x20id\x20\x22'+_0x184e5a+'\x22'),process['exit'](0x1));if(_0xa0dcf7[_0x19231c(0x2b6)]>0x1){console[_0x19231c(0x255)](_0x19231c(0x355)+_0x184e5a+_0x19231c(0x29c)+_0xa0dcf7['length']+_0x19231c(0x17a));for(const _0x1d8997 of _0xa0dcf7){console[_0x19231c(0x255)]('\x20\x20'+_0x1d8997[_0x19231c(0x373)]+'\x20\x20(name:\x20'+(_0x1d8997[_0x19231c(0x405)][_0x19231c(0x188)]||_0x19231c(0x191))+')');}process[_0x19231c(0x225)](0x1);}_0xc9e232=_0xa0dcf7[0x0]['key'],_0x45aaa2=_0xa0dcf7[0x0][_0x19231c(0x405)];}await _0xe54bb1['remove'](_0x19231c(0x30b),_0xc9e232),console['log'](_0x19231c(0x1f5)+_0xc9e232+_0x19231c(0x3d8)+(_0x45aaa2['name']||_0x19231c(0x191))+_0x19231c(0x296)+(_0x45aaa2[_0x19231c(0x164)]||_0x19231c(0x191))+')');}finally{await _0x2c4e47[_0x19231c(0x310)]();}}function _0xcdfe0a(_0x198d4c,_0xa7ffba){const _0x216cb1=_0x324f6a;if(!_0x198d4c[_0x216cb1(0x21a)])return _0x216cb1(0x1d6);const _0x1d3804=_0x198d4c['expiresAt'];if(!_0x1d3804)return'active';if(_0xa7ffba>_0x1d3804)return'expired';return _0x216cb1(0x140);}function _0x3cf251(_0x544286){const _0xd6278a=_0x324f6a;if(!_0x544286||typeof _0x544286!==_0xd6278a(0x3fe))return'';const _0x2c1918=Object[_0xd6278a(0x34d)](_0x544286)[_0xd6278a(0x263)](([,_0x77253c])=>_0x77253c)[_0xd6278a(0x158)](([_0x3abf22])=>_0x3abf22);if(_0x2c1918['length']===0x0)return _0xd6278a(0x290);if(_0x2c1918[_0xd6278a(0x2b6)]<=0x3)return _0x2c1918['join']('\x20');return _0x2c1918[_0xd6278a(0x2e9)](0x0,0x3)[_0xd6278a(0x3db)]('\x20')+('\x20+'+(_0x2c1918['length']-0x3));}async function _0x3612a7(_0x54edbe){const _0x68306=_0x324f6a,_0x4efc8c=require$$5,_0xf3618f=requireOkdbLicenseCodec(),{_C:_0x2a124c}=requireOkdbLicense(),_0x58f021=_0x158bed[_0x68306(0x431)](_0x54edbe['dbPath']),_0x52b988=new _0x4efc8c(_0x58f021,_0x54edbe[_0x68306(0x373)]?{'encryptionKey':_0x54edbe[_0x68306(0x373)]}:{});await _0x52b988[_0x68306(0x2ea)]();try{const _0x50c129=_0x52b988[_0x68306(0x425)],_0x2e0714=_0x50c129?.['db']?.[_0x68306(0x28f)]?.(_0x68306(0x259))??0x0,_0x5f1b01=[..._0x52b988['_envs'][_0x68306(0x3cb)]()][_0x68306(0x263)](_0x5460f2=>!_0x5460f2[_0x68306(0x397)]('~'))[_0x68306(0x2b6)],_0x297ccc=_0x52b988[_0x68306(0x28a)]?.['effective'];if(_0x297ccc){const _0x778564=_0x297ccc[_0x68306(0x3c0)]===!![],_0x74286b=_0x778564?_0x68306(0x193):_0x52b988[_0x68306(0x28a)]['active']?.[_0x68306(0x22c)]||_0x68306(0x1a8);console[_0x68306(0x445)](''),console[_0x68306(0x445)](_0x68306(0x359)+_0x74286b);const _0x4282d3=_0x297ccc[_0x68306(0x3c6)]||{};if(_0x4282d3['maxWrites']){const _0x51a27c=Math[_0x68306(0x3a5)](_0x2e0714/_0x4282d3[_0x68306(0x236)]*0x64);console[_0x68306(0x445)](_0x68306(0x17c)+_0x2e0714[_0x68306(0x22a)]()+_0x68306(0x19b)+_0x4282d3[_0x68306(0x236)]['toLocaleString']()+'\x20\x20('+_0x51a27c+'%)');}else console['log'](_0x68306(0x17c)+_0x2e0714[_0x68306(0x22a)]());_0x4282d3['envs']?console[_0x68306(0x445)](_0x68306(0x43d)+_0x5f1b01+'\x20/\x20'+_0x4282d3[_0x68306(0x182)]):console[_0x68306(0x445)](_0x68306(0x43d)+_0x5f1b01),_0x2a124c?.[_0x68306(0x2e3)]&&console[_0x68306(0x445)](_0x68306(0x228)+_0x2a124c['PUB_FINGERPRINT']+'\x20\x20(licenses\x20must\x20be\x20signed\x20by\x20the\x20matching\x20private\x20key)');}if(!_0x50c129||!_0x50c129['hasType'](_0x68306(0x334))){console[_0x68306(0x445)](''),console['log'](_0x68306(0x1f1)),console[_0x68306(0x445)]('');return;}const _0x518270=[],_0x3da661=Date[_0x68306(0x208)](),_0x273d08=_0x52b988['id'],_0xae0d38='__OKDB_PUB_FINGERPRINT__';for(const {key:_0x43fe9a,value:_0x374465}of _0x50c129[_0x68306(0x148)]('~licenses')){const _0xb1328a=_0x374465[_0x68306(0x420)]?Buffer[_0x68306(0x418)](_0x374465[_0x68306(0x420)],_0x68306(0x1ae)):Buffer[_0x68306(0x1ad)](0x8);let _0x242852='';try{_0x242852=_0xf3618f[_0x68306(0x1b3)](_0x273d08,_0xb1328a,_0xae0d38)['pin'];}catch{}_0x518270[_0x68306(0x1ca)]({'id':_0x43fe9a,'licensee':_0x374465[_0x68306(0x22c)]||'','expires':_0x374465[_0x68306(0x389)]?new Date(_0x374465[_0x68306(0x389)])[_0x68306(0x19f)]()['slice'](0x0,0xa):'','features':_0x3cf251(_0x374465[_0x68306(0x199)]),'pin':_0x242852,'status':_0xcdfe0a(_0x374465,_0x3da661)});}if(_0x518270['length']===0x0){console['log'](''),console[_0x68306(0x445)](_0x68306(0x1f1)),console[_0x68306(0x445)]('');return;}const _0x103a8a=['\x20\x20'+'ID'[_0x68306(0x153)](0xe),'LICENSEE'[_0x68306(0x153)](0xe),_0x68306(0x3ba)[_0x68306(0x153)](0xc),_0x68306(0x2e6)['padEnd'](0x1e),_0x68306(0x3be)[_0x68306(0x153)](0xa),'STATUS'][_0x68306(0x3db)]('\x20');console[_0x68306(0x445)]('\x0a'+_0x103a8a);for(const _0x202de9 of _0x518270){const _0x130707=_0x202de9['id']['slice'](0x0,0x8)+'…';console['log'](['\x20\x20'+_0x130707[_0x68306(0x153)](0xe),_0x202de9[_0x68306(0x22c)]['slice'](0x0,0xe)['padEnd'](0xe),_0x202de9[_0x68306(0x29d)][_0x68306(0x153)](0xc),_0x202de9[_0x68306(0x199)]['slice'](0x0,0x1e)['padEnd'](0x1e),_0x202de9[_0x68306(0x1ba)][_0x68306(0x153)](0xa),_0x202de9[_0x68306(0x43e)]][_0x68306(0x3db)]('\x20'));}console[_0x68306(0x445)]('');}finally{await _0x52b988[_0x68306(0x310)]();}}async function _0x5ce6c5(_0x4be70d,_0xd14c){const _0x375005=_0x324f6a,_0x2f9a80=require$$5,_0x5070bd=requireOkdbLicenseCodec();let _0x562886=_0x4be70d;(_0x5070bd['detectInputType'](_0x4be70d)===_0x375005(0x3b5)||_0x47e2f8[_0x375005(0x31d)](_0x4be70d)&&_0x47e2f8['statSync'](_0x4be70d)['isFile']())&&(_0x562886=_0x47e2f8[_0x375005(0x172)](_0x4be70d,_0x375005(0x2d0))[_0x375005(0x336)]());const _0x488bd6=_0x158bed[_0x375005(0x431)](_0xd14c[_0x375005(0x41d)]),_0x11e99b=new _0x2f9a80(_0x488bd6,_0xd14c[_0x375005(0x373)]?{'encryptionKey':_0xd14c[_0x375005(0x373)]}:{});await _0x11e99b[_0x375005(0x2ea)]();try{!_0x11e99b[_0x375005(0x28a)]&&(console[_0x375005(0x255)](_0x375005(0x1ea)),process[_0x375005(0x225)](0x1));let _0x48e098;try{_0x48e098=await _0x11e99b[_0x375005(0x28a)][_0x375005(0x3cd)](_0x562886);}catch(_0xb0c9ca){console[_0x375005(0x255)]('[okdb]\x20error:\x20'+_0xb0c9ca['message']),process[_0x375005(0x225)](0x1);}const _0x3b418a=_0x11e99b[_0x375005(0x28a)]['getPins'](),_0x33fd0f=_0x3b418a[_0x375005(0x3b1)](_0x1f3a44=>_0x1f3a44[_0x375005(0x1a3)]===_0x48e098['id'])?.[_0x375005(0x1ba)]||'',_0xf621a5=Object['entries'](_0x48e098['features']||{})[_0x375005(0x263)](([,_0x37d587])=>_0x37d587)[_0x375005(0x158)](([_0xf4706a])=>_0xf4706a),_0x29b6f6=_0x48e098['limits']||{},_0x488d17=[_0x29b6f6['envs']?_0x375005(0x1d8)+_0x29b6f6[_0x375005(0x182)]:null,_0x29b6f6[_0x375005(0x2ce)]?'types/env='+_0x29b6f6[_0x375005(0x2ce)]:null,_0x29b6f6[_0x375005(0x2ab)]?_0x375005(0x354)+_0x29b6f6['syncPeers']:null,_0x29b6f6[_0x375005(0x236)]?_0x375005(0x22f)+_0x29b6f6[_0x375005(0x236)][_0x375005(0x22a)]():null]['filter'](Boolean)[_0x375005(0x3db)]('\x20\x20'),_0x1ee0ed=_0x48e098['licenseType']===_0x5070bd[_0x375005(0x35f)];console[_0x375005(0x445)]('\x0a\x20\x20✓\x20License\x20added'),console[_0x375005(0x445)](_0x375005(0x347)+_0x48e098['id']),console[_0x375005(0x445)]('\x20\x20\x20\x20licensee:\x20\x20'+_0x48e098['licensee']),console[_0x375005(0x445)](_0x375005(0x201)+new Date(_0x48e098[_0x375005(0x389)])['toISOString']()[_0x375005(0x2e9)](0x0,0xa)),console[_0x375005(0x445)](_0x375005(0x30a)+(_0xf621a5[_0x375005(0x3db)](',\x20')||_0x375005(0x290)));if(_0x488d17)console['log'](_0x375005(0x380)+_0x488d17);_0x1ee0ed?(console['log'](_0x375005(0x41b)),console[_0x375005(0x445)]('')):(console['log'](_0x375005(0x40b)+_0x33fd0f),console[_0x375005(0x445)](_0x375005(0x3ac)),console[_0x375005(0x445)](''),console[_0x375005(0x445)](_0x375005(0x1f6)),console[_0x375005(0x445)](_0x375005(0x3ef)+_0x33fd0f+_0x375005(0x19c)),console['log'](_0x375005(0x372)),console[_0x375005(0x445)]('\x20\x20\x20\x203.\x20Run:\x20\x20okdb\x20license\x20<activation-token>'),console[_0x375005(0x445)](''));}finally{await _0x11e99b[_0x375005(0x310)]();}}async function _0x35951a(_0x291c92,_0x19af4f){const _0x5873b1=_0x324f6a,_0x7ee6e1=require$$5,_0x5ec6a5=_0x158bed[_0x5873b1(0x431)](_0x19af4f[_0x5873b1(0x41d)]),_0x158d93=new _0x7ee6e1(_0x5ec6a5,_0x19af4f[_0x5873b1(0x373)]?{'encryptionKey':_0x19af4f[_0x5873b1(0x373)]}:{});await _0x158d93['open']();try{!_0x158d93[_0x5873b1(0x28a)]&&(console['error']('[okdb]\x20error:\x20license\x20management\x20is\x20only\x20available\x20in\x20licensed\x20builds\x20(npm\x20run\x20build:prod).'),process['exit'](0x1));let _0x4cf625;try{_0x4cf625=await _0x158d93[_0x5873b1(0x28a)][_0x5873b1(0x1b1)](_0x291c92[_0x5873b1(0x336)]());}catch(_0x449491){console[_0x5873b1(0x255)](_0x5873b1(0x35a)+_0x449491[_0x5873b1(0x1bd)]),console[_0x5873b1(0x255)](''),console[_0x5873b1(0x255)](_0x5873b1(0x366)),console[_0x5873b1(0x255)]('\x20\x20\x20\x20-\x20The\x20license\x20blob\x20has\x20not\x20been\x20added\x20yet\x20—\x20run\x20`okdb\x20license\x20<blob>`\x20first.'),console[_0x5873b1(0x255)]('\x20\x20\x20\x20-\x20The\x20activation\x20token\x20was\x20issued\x20for\x20a\x20different\x20node\x20—\x20share\x20this\x20node\x27s\x20PIN\x20with\x20the\x20vendor.'),console['error'](_0x5873b1(0x1cf)),console[_0x5873b1(0x255)](''),process[_0x5873b1(0x225)](0x1);}console['log'](_0x5873b1(0x26c)),console[_0x5873b1(0x445)](_0x5873b1(0x347)+_0x4cf625['id']),console[_0x5873b1(0x445)](_0x5873b1(0x1f8)+_0x4cf625[_0x5873b1(0x22c)]),console[_0x5873b1(0x445)](_0x5873b1(0x201)+new Date(_0x4cf625[_0x5873b1(0x389)])[_0x5873b1(0x19f)]()['slice'](0x0,0xa)),console['log'](_0x5873b1(0x161)),console[_0x5873b1(0x445)]('');}finally{await _0x158d93[_0x5873b1(0x310)]();}}async function _0x25cc05(_0x54631e,_0x32002b){const _0x2fc8df=_0x324f6a;!_0x54631e&&(console[_0x2fc8df(0x255)](_0x2fc8df(0x351)),process[_0x2fc8df(0x225)](0x1));const _0x10ba55=require$$5,_0x49bdaf=requireOkdbLicenseCodec(),_0x4a67b7=_0x158bed['resolve'](_0x32002b[_0x2fc8df(0x41d)]),_0x261a70=new _0x10ba55(_0x4a67b7,_0x32002b[_0x2fc8df(0x373)]?{'encryptionKey':_0x32002b[_0x2fc8df(0x373)]}:{});await _0x261a70[_0x2fc8df(0x2ea)]();try{const _0xfa3942=_0x261a70[_0x2fc8df(0x425)];(!_0xfa3942||!_0xfa3942[_0x2fc8df(0x384)](_0x2fc8df(0x334)))&&(console['error'](_0x2fc8df(0x2c0)+_0x54631e+'\x22'),process[_0x2fc8df(0x225)](0x1));let _0x4fda75=null,_0x2f8503=null;const _0x2d2273=_0xfa3942[_0x2fc8df(0x28f)]('~licenses',_0x54631e);if(_0x2d2273)_0x4fda75=_0x54631e,_0x2f8503=_0x2d2273;else{const _0x5bca69=[];for(const {key:_0x1d3b73,value:_0x588854}of _0xfa3942[_0x2fc8df(0x148)](_0x2fc8df(0x334))){if(_0x1d3b73[_0x2fc8df(0x397)](_0x54631e))_0x5bca69[_0x2fc8df(0x1ca)]({'key':_0x1d3b73,'value':_0x588854});}_0x5bca69['length']===0x0&&(console['error'](_0x2fc8df(0x2c0)+_0x54631e+'\x22'),process[_0x2fc8df(0x225)](0x1)),_0x5bca69[_0x2fc8df(0x2b6)]>0x1&&(console[_0x2fc8df(0x255)](_0x2fc8df(0x355)+_0x54631e+_0x2fc8df(0x29c)+_0x5bca69[_0x2fc8df(0x2b6)]+_0x2fc8df(0x311)),process[_0x2fc8df(0x225)](0x1)),_0x4fda75=_0x5bca69[0x0]['key'],_0x2f8503=_0x5bca69[0x0][_0x2fc8df(0x405)];}const _0x238ae4=Date[_0x2fc8df(0x208)](),_0x5dc7cc=_0xcdfe0a(_0x2f8503,_0x238ae4),_0x31f9b0=_0x261a70['id'],_0x6ce7c0='__OKDB_PUB_FINGERPRINT__';let _0x1fe563='';try{const _0x4f7822=Buffer[_0x2fc8df(0x418)](_0x2f8503[_0x2fc8df(0x420)],_0x2fc8df(0x1ae));_0x1fe563=_0x49bdaf[_0x2fc8df(0x1b3)](_0x31f9b0,_0x4f7822,_0x6ce7c0)['pin'];}catch{}const _0x2b760e=_0x2f8503[_0x2fc8df(0x199)]?Object[_0x2fc8df(0x34d)](_0x2f8503[_0x2fc8df(0x199)])[_0x2fc8df(0x263)](([,_0x58fbb9])=>_0x58fbb9)[_0x2fc8df(0x158)](([_0x45dd73])=>_0x45dd73):[],_0x418da5=_0x2f8503[_0x2fc8df(0x3c6)]||{},_0x2c75f6=_0xfa3942?.['db']?.[_0x2fc8df(0x28f)]?.('__writeCounter')??0x0,_0x29b178=[..._0x261a70[_0x2fc8df(0x3b9)][_0x2fc8df(0x3cb)]()][_0x2fc8df(0x263)](_0xee08e3=>!_0xee08e3[_0x2fc8df(0x397)]('~'))['length'];console[_0x2fc8df(0x445)]('\x0a\x20\x20License\x20details:'),console[_0x2fc8df(0x445)](_0x2fc8df(0x347)+_0x4fda75),console['log']('\x20\x20\x20\x20licensee:\x20\x20'+(_0x2f8503[_0x2fc8df(0x22c)]||'')),console['log'](_0x2fc8df(0x201)+(_0x2f8503[_0x2fc8df(0x389)]?new Date(_0x2f8503[_0x2fc8df(0x389)])['toISOString']()[_0x2fc8df(0x2e9)](0x0,0xa):'')),console[_0x2fc8df(0x445)]('\x20\x20\x20\x20features:\x20\x20'+(_0x2b760e['join'](',\x20')||'(none)')),console[_0x2fc8df(0x445)](_0x2fc8df(0x40b)+_0x1fe563),console[_0x2fc8df(0x445)]('\x20\x20\x20\x20status:\x20\x20\x20\x20'+_0x5dc7cc),console[_0x2fc8df(0x445)](_0x2fc8df(0x292)+new Date(_0x2f8503[_0x2fc8df(0x1a0)])[_0x2fc8df(0x19f)]());if(_0x5dc7cc===_0x2fc8df(0x140)){console[_0x2fc8df(0x445)](''),console[_0x2fc8df(0x445)](_0x2fc8df(0x229));if(_0x418da5['maxWrites']){const _0x121f2c=Math[_0x2fc8df(0x3a5)](_0x2c75f6/_0x418da5[_0x2fc8df(0x236)]*0x64);console['log'](_0x2fc8df(0x385)+_0x2c75f6[_0x2fc8df(0x22a)]()+'\x20/\x20'+_0x418da5['maxWrites'][_0x2fc8df(0x22a)]()+_0x2fc8df(0x194)+_0x121f2c+'%)');}else console[_0x2fc8df(0x445)](_0x2fc8df(0x385)+_0x2c75f6[_0x2fc8df(0x22a)]()+_0x2fc8df(0x1cc));_0x418da5[_0x2fc8df(0x182)]?console[_0x2fc8df(0x445)]('\x20\x20\x20\x20envs:\x20\x20\x20\x20\x20\x20'+_0x29b178+_0x2fc8df(0x19b)+_0x418da5['envs']):console[_0x2fc8df(0x445)](_0x2fc8df(0x265)+_0x29b178+'\x20\x20(unlimited)');}console['log']('');}finally{await _0x261a70[_0x2fc8df(0x310)]();}}async function _0x3cea24(_0x2ee095,_0x4ee71d){const _0x7769e=_0x324f6a;!_0x2ee095&&(console[_0x7769e(0x255)](_0x7769e(0x2be)),process['exit'](0x1));const _0x505430=require$$5,_0x6fdb86=_0x158bed[_0x7769e(0x431)](_0x4ee71d[_0x7769e(0x41d)]),_0x597454=new _0x505430(_0x6fdb86,_0x4ee71d[_0x7769e(0x373)]?{'encryptionKey':_0x4ee71d['key']}:{});await _0x597454[_0x7769e(0x2ea)]();try{const _0x106405=_0x597454[_0x7769e(0x425)];(!_0x106405||!_0x106405[_0x7769e(0x384)](_0x7769e(0x334)))&&(console['error'](_0x7769e(0x2c0)+_0x2ee095+'\x22'),process[_0x7769e(0x225)](0x1));let _0x14710e=null,_0x421d3d=null;const _0x3ec676=_0x106405[_0x7769e(0x28f)](_0x7769e(0x334),_0x2ee095);if(_0x3ec676)_0x14710e=_0x2ee095,_0x421d3d=_0x3ec676;else{const _0x4eb967=[];for(const {key:_0x22f7cd,value:_0x334e2a}of _0x106405[_0x7769e(0x148)](_0x7769e(0x334))){if(_0x22f7cd[_0x7769e(0x397)](_0x2ee095))_0x4eb967['push']({'key':_0x22f7cd,'value':_0x334e2a});}_0x4eb967[_0x7769e(0x2b6)]===0x0&&(console['error']('[okdb]\x20error:\x20no\x20license\x20with\x20id\x20\x22'+_0x2ee095+'\x22'),process[_0x7769e(0x225)](0x1)),_0x4eb967['length']>0x1&&(console[_0x7769e(0x255)](_0x7769e(0x355)+_0x2ee095+_0x7769e(0x29c)+_0x4eb967[_0x7769e(0x2b6)]+'\x20licenses'),process[_0x7769e(0x225)](0x1)),_0x14710e=_0x4eb967[0x0][_0x7769e(0x373)],_0x421d3d=_0x4eb967[0x0][_0x7769e(0x405)];}await _0x106405['remove'](_0x7769e(0x334),_0x14710e),console['log']('\x20\x20✓\x20Removed\x20license\x20'+_0x14710e+_0x7769e(0x1fb)+(_0x421d3d['licensee']||_0x7769e(0x191))+')');}finally{await _0x597454['close']();}}async function _0x163f6a(_0x3c49a,_0x3a7b96,_0x5ced33){const _0x57fe3f=_0x324f6a;!_0x3c49a&&(console[_0x57fe3f(0x255)](_0x57fe3f(0x401)),process[_0x57fe3f(0x225)](0x1));!_0x5ced33[_0x57fe3f(0x2b1)]&&!(_0x5ced33['username']&&_0x5ced33[_0x57fe3f(0x3e0)])&&(console[_0x57fe3f(0x255)](_0x57fe3f(0x361)),process[_0x57fe3f(0x225)](0x1));const _0x4482f2=_0x5ced33[_0x57fe3f(0x1b8)]||_0x3a7b96[_0x57fe3f(0x375)]?.[_0x57fe3f(0x22e)];!_0x4482f2&&(console[_0x57fe3f(0x255)](_0x57fe3f(0x2a4)+_0x57fe3f(0x3bb)+_0x57fe3f(0x37e)),process[_0x57fe3f(0x225)](0x1));const _0x4b9b78=require$$5,_0x14a670=new _0x4b9b78(_0x3a7b96[_0x57fe3f(0x41d)],{'sync':{'address':_0x4482f2,'auto_reconcile':![]}});await _0x14a670[_0x57fe3f(0x2ea)]();try{const _0x28a0da=_0x14a670['_systemEnv'];if(_0x28a0da&&_0x28a0da[_0x57fe3f(0x384)]('~tokens')){let _0xda3ffa=![];for(const _0x4cdb9b of _0x28a0da[_0x57fe3f(0x148)](_0x57fe3f(0x30b))){_0xda3ffa=!![];break;}_0xda3ffa&&console[_0x57fe3f(0x445)](_0x57fe3f(0x35d)+_0x57fe3f(0x26b));}console[_0x57fe3f(0x445)](_0x57fe3f(0x358)+_0x3c49a+'…'),await _0x14a670[_0x57fe3f(0x375)][_0x57fe3f(0x3db)](_0x3c49a[_0x57fe3f(0x24b)](/\/+$/,''),{'token':_0x5ced33[_0x57fe3f(0x2b1)],'username':_0x5ced33[_0x57fe3f(0x2a8)],'password':_0x5ced33[_0x57fe3f(0x3e0)]}),console[_0x57fe3f(0x445)](_0x57fe3f(0x388)),console[_0x57fe3f(0x445)](_0x57fe3f(0x3b4));}finally{await _0x14a670[_0x57fe3f(0x310)]();}}async function _0x477e49(){const _0x2dead9=_0x324f6a,_0x5f084e=Date[_0x2dead9(0x208)](),_0x30eba3=_0xddef8d(process['argv']),_0x3f5633=_0x28c740(_0x30eba3),_0x2bd7bf=_0x158bed[_0x2dead9(0x431)](_0x3f5633[_0x2dead9(0x41d)]);!_0x3f5633[_0x2dead9(0x32b)]&&!process[_0x2dead9(0x1e8)][_0x2dead9(0x2d6)]&&(_0x3f5633['noRepl']=!![]);const _0x1d31d4=require$$5,{start:_0x116ca6,colorLog:_0x764ab8}=requireOkdbShell(),_0x320e2c={..._0x3f5633[_0x2dead9(0x373)]?{'encryptionKey':_0x3f5633['key']}:{},..._0x3f5633[_0x2dead9(0x1f7)]?{}:_0x4ffe04(_0x3f5633['admin'])?{'admin':_0x3f5633[_0x2dead9(0x360)]}:{},..._0x4ffe04(_0x3f5633[_0x2dead9(0x222)])?{'api':_0x3f5633[_0x2dead9(0x222)]}:{},..._0x4ffe04(_0x3f5633[_0x2dead9(0x165)])?{'auth':_0x3f5633[_0x2dead9(0x165)]}:{},..._0x4ffe04(_0x3f5633[_0x2dead9(0x26d)])?{'mcp':_0x3f5633[_0x2dead9(0x26d)]}:{},..._0x3f5633[_0x2dead9(0x2c9)]!==![]?{'timeMachine':_0x3f5633[_0x2dead9(0x2c9)]}:{}},_0x245869=new _0x1d31d4(_0x2bd7bf,_0x320e2c);_0x245869[_0x2dead9(0x445)][_0x2dead9(0x434)]?.();const _0x23b167=_0x245869[_0x2dead9(0x445)][_0x2dead9(0x223)](_0x2cbf74=>_0x764ab8(_0x2cbf74,_0x3f5633[_0x2dead9(0x39b)]));if(_0x3f5633['noRepl'])process[_0x2dead9(0x3c1)]['write'](_0x2dead9(0x237));await _0x245869[_0x2dead9(0x2ea)]();if(_0x3f5633[_0x2dead9(0x32b)])process[_0x2dead9(0x3c1)][_0x2dead9(0x13f)](_0x2dead9(0x14c));try{await _0x5e531d(_0x245869,_0x3f5633[_0x2dead9(0x36b)]);}catch(_0xf2de5c){_0xf2de5c['code']===_0x2dead9(0x34a)&&(console['error'](_0x2dead9(0x27c)+_0x3f5633[_0x2dead9(0x36b)]+_0x2dead9(0x3a1)),process[_0x2dead9(0x225)](0x1));throw _0xf2de5c;}if(_0x3f5633['noRepl'])process['stdout']['write'](_0x2dead9(0x251)+_0x3f5633[_0x2dead9(0x36b)]+'\x0a');if(!_0x3f5633['noRepl'])_0x245869[_0x2dead9(0x445)][_0x2dead9(0x434)]?.(),_0x23b167?.(),_0xb9b3bc(_0x245869[_0x2dead9(0x165)]?.['getSecurityNotices']?.()??[]),await _0x116ca6(_0x245869,_0x3f5633);else{const _0x50a364=_0x158bed[_0x2dead9(0x3db)](_0x2bd7bf,_0x2dead9(0x187));try{_0x47e2f8[_0x2dead9(0x337)](_0x50a364,String(process[_0x2dead9(0x3ce)]));}catch{}const _0x353546=Date[_0x2dead9(0x208)]()-_0x5f084e;console[_0x2dead9(0x445)](''),console[_0x2dead9(0x445)](_0x2dead9(0x211)),console[_0x2dead9(0x445)](_0x2dead9(0x3f5)+_0x3f5633[_0x2dead9(0x36b)]),console[_0x2dead9(0x445)](_0x2dead9(0x1c9)+_0x2bd7bf),console['log']('\x20\x20\x20\x20id:\x20\x20\x20\x20'+_0x245869['id']);{const _0x1957d7=_0x245869[_0x2dead9(0x425)]?.['db']?.[_0x2dead9(0x28f)]?.(_0x2dead9(0x259))??0x0,_0x4e4fd4=[..._0x245869[_0x2dead9(0x3b9)][_0x2dead9(0x3cb)]()][_0x2dead9(0x263)](_0x4edbc2=>!_0x4edbc2[_0x2dead9(0x397)]('~'))[_0x2dead9(0x2b6)];if(_0x245869[_0x2dead9(0x28a)]?.[_0x2dead9(0x140)]?.['licenseType']===0x1){const _0x23261e=Math['ceil']((_0x245869[_0x2dead9(0x28a)][_0x2dead9(0x140)][_0x2dead9(0x389)]-Date['now']())/0x5265c00);console[_0x2dead9(0x445)](_0x2dead9(0x1af)+_0x245869[_0x2dead9(0x28a)][_0x2dead9(0x140)]['licensee']+_0x2dead9(0x1e7)+_0x23261e+'\x20days\x20—\x20POC/demo\x20only,\x20not\x20node-bound)');}else{if(_0x245869[_0x2dead9(0x28a)]?.['active']){const _0x13fe57=_0x245869[_0x2dead9(0x28a)]['active'];console[_0x2dead9(0x445)]('\x20\x20\x20\x20license:\x20'+_0x13fe57[_0x2dead9(0x22c)]+_0x2dead9(0x2b9)+new Date(_0x13fe57[_0x2dead9(0x389)])[_0x2dead9(0x19f)]()[_0x2dead9(0x2e9)](0x0,0xa)+')');const _0x14e8c2=_0x13fe57[_0x2dead9(0x3c6)]||{};if(_0x14e8c2[_0x2dead9(0x236)]){const _0x2bebad=Math['round'](_0x1957d7/_0x14e8c2[_0x2dead9(0x236)]*0x64);console[_0x2dead9(0x445)](_0x2dead9(0x439)+_0x1957d7[_0x2dead9(0x22a)]()+_0x2dead9(0x19b)+_0x14e8c2[_0x2dead9(0x236)][_0x2dead9(0x22a)]()+_0x2dead9(0x20e)+_0x2bebad+'%),\x20'+_0x4e4fd4+(_0x14e8c2[_0x2dead9(0x182)]?'/'+_0x14e8c2[_0x2dead9(0x182)]:'')+_0x2dead9(0x20a)+(_0x4e4fd4===0x1?'':'s'));}}else{if(_0x245869[_0x2dead9(0x28a)]){const _0x1355f5=_0x245869[_0x2dead9(0x28a)][_0x2dead9(0x316)](),_0x1d46fe=_0x1355f5[_0x2dead9(0x2b6)]?_0x1355f5[_0x2dead9(0x158)](_0x444f45=>_0x444f45[_0x2dead9(0x1ba)])['join'](',\x20'):_0x2dead9(0x2ad),_0x21bdb8=_0x245869[_0x2dead9(0x28a)]['effective'],_0xab690=_0x21bdb8[_0x2dead9(0x3c6)][_0x2dead9(0x236)]?Math['round'](_0x1957d7/_0x21bdb8[_0x2dead9(0x3c6)][_0x2dead9(0x236)]*0x64):0x0;console['log'](_0x2dead9(0x3d2)),console[_0x2dead9(0x445)]('\x20\x20\x20\x20usage:\x20\x20\x20'+_0x1957d7['toLocaleString']()+_0x2dead9(0x19b)+_0x21bdb8['limits'][_0x2dead9(0x236)][_0x2dead9(0x22a)]()+_0x2dead9(0x20e)+_0xab690+'%),\x20'+_0x4e4fd4+_0x2dead9(0x19b)+_0x21bdb8[_0x2dead9(0x3c6)][_0x2dead9(0x182)]+_0x2dead9(0x357)),console[_0x2dead9(0x445)](_0x2dead9(0x250)+_0x1d46fe);}}}}console['log'](_0x2dead9(0x365)+_0x3f5633[_0x2dead9(0x36b)]+_0x2dead9(0x154));!_0x3f5633['noAdmin']&&console[_0x2dead9(0x445)]('\x20\x20\x20\x20admin:\x20http://localhost:'+_0x3f5633[_0x2dead9(0x36b)]+_0x2dead9(0x396));console[_0x2dead9(0x445)](''),console['log'](_0x2dead9(0x3b8)+_0x353546+'ms'),_0xb9b3bc(_0x245869[_0x2dead9(0x165)]?.[_0x2dead9(0x3d3)]?.()??[]);async function _0x4ace91(){const _0x2a9034=_0x2dead9;process[_0x2a9034(0x3c1)][_0x2a9034(0x13f)](_0x2a9034(0x1db));try{_0x47e2f8['unlinkSync'](_0x50a364);}catch{}await _0x245869[_0x2a9034(0x310)](),process[_0x2a9034(0x225)](0x0);}process['on'](_0x2dead9(0x27e),_0x4ace91),process['on'](_0x2dead9(0x39d),_0x4ace91);}}const _0x2f68da=new Set([_0x324f6a(0x324),_0x324f6a(0x2db),'init',_0x324f6a(0x3bd),_0x324f6a(0x145),_0x324f6a(0x3c2),_0x324f6a(0x3f6),_0x324f6a(0x2b1),'join',_0x324f6a(0x1ac)]),_0x430507=process[_0x324f6a(0x1c1)][0x2];if(_0x430507===_0x324f6a(0x324))console['log'](require$$2[_0x324f6a(0x324)]),process['exit'](0x0);else{if(_0x430507&&_0x2f68da['has'](_0x430507)){const _0x377cea=process[_0x324f6a(0x1c1)]['slice'](0x3),_0x229e25=_0xddef8d([_0x324f6a(0x369),_0x324f6a(0x2a0),..._0x377cea]),_0x508d56=_0x28c740(_0x229e25),_0x271665=new Set([_0x324f6a(0x202),'-d',_0x324f6a(0x422),'-k','--config','-c','--port','-p',_0x324f6a(0x23a),'--env','-e',_0x324f6a(0x41a),_0x324f6a(0x3a0),_0x324f6a(0x27b),_0x324f6a(0x299),_0x324f6a(0x186),_0x324f6a(0x368),'--ttl',_0x324f6a(0x34c),_0x324f6a(0x28b),'-u',_0x324f6a(0x3e3)]);let _0xd9e626=null;for(let _0x2c18de=0x0;_0x2c18de<_0x377cea[_0x324f6a(0x2b6)];_0x2c18de++){if(_0x271665[_0x324f6a(0x3ad)](_0x377cea[_0x2c18de])){_0x2c18de++;continue;}if(!_0x377cea[_0x2c18de][_0x324f6a(0x397)]('-')){_0xd9e626=_0x377cea[_0x2c18de];break;}}(async()=>{const _0x26bcd9=_0x324f6a;if(_0x430507==='token'){const _0x118dc6=process[_0x26bcd9(0x1c1)][0x3],_0x3beb0d=process[_0x26bcd9(0x1c1)][_0x26bcd9(0x2e9)](0x4),_0x2eb2be=_0xddef8d(['node',_0x26bcd9(0x2a0),..._0x3beb0d]),_0x5d1158=_0x28c740(_0x2eb2be),_0x59087d=new Set([_0x26bcd9(0x202),'-d',_0x26bcd9(0x422),'-k',_0x26bcd9(0x37b),'-c',_0x26bcd9(0x301),'-p',_0x26bcd9(0x3a0),_0x26bcd9(0x27b),_0x26bcd9(0x299),_0x26bcd9(0x186),'--grants',_0x26bcd9(0x36c),'--log-level',_0x26bcd9(0x306),'-e',_0x26bcd9(0x41a)]),_0xc4cfb9=[];for(let _0x9ead9e=0x0;_0x9ead9e<_0x3beb0d[_0x26bcd9(0x2b6)];_0x9ead9e++){if(_0x59087d[_0x26bcd9(0x3ad)](_0x3beb0d[_0x9ead9e])){_0x9ead9e++;continue;}if(_0x3beb0d[_0x9ead9e][_0x26bcd9(0x397)]('-'))continue;_0xc4cfb9[_0x26bcd9(0x1ca)](_0x3beb0d[_0x9ead9e]);}switch(_0x118dc6){case _0x26bcd9(0x363):await _0x467f5f(_0x5d1158,_0x2eb2be);break;case'list':await _0x208276(_0x5d1158);break;case _0x26bcd9(0x1aa):await _0x487278(_0xc4cfb9[0x0],_0x5d1158);break;default:console['error'](_0x26bcd9(0x33a)+_0x118dc6+_0x26bcd9(0x2a9)),process[_0x26bcd9(0x225)](0x1);}return;}if(_0x430507==='license'){const _0x502380=requireOkdbLicenseCodec(),_0x2aab8b=process[_0x26bcd9(0x1c1)]['slice'](0x3),_0x133b85=_0xddef8d([_0x26bcd9(0x369),_0x26bcd9(0x2a0),..._0x2aab8b]),_0x24abd3=_0x28c740(_0x133b85),_0x2ba541=new Set([_0x26bcd9(0x202),'-d',_0x26bcd9(0x422),'-k',_0x26bcd9(0x37b),'-c','--port','-p',_0x26bcd9(0x23a)]),_0x29a938=[];for(let _0x2c7ab8=0x0;_0x2c7ab8<_0x2aab8b[_0x26bcd9(0x2b6)];_0x2c7ab8++){if(_0x2ba541[_0x26bcd9(0x3ad)](_0x2aab8b[_0x2c7ab8])){_0x2c7ab8++;continue;}if(_0x2aab8b[_0x2c7ab8][_0x26bcd9(0x397)]('-'))continue;_0x29a938[_0x26bcd9(0x1ca)](_0x2aab8b[_0x2c7ab8]);}const _0x2447f7=_0x29a938[0x0]??null;if(_0x2447f7==='remove')await _0x3cea24(_0x29a938[0x1],_0x24abd3);else{if(!_0x2447f7)await _0x3612a7(_0x24abd3);else{let _0x6efc68=_0x502380[_0x26bcd9(0x287)](_0x2447f7);if(_0x6efc68==='unknown'&&_0x47e2f8[_0x26bcd9(0x31d)](_0x2447f7))_0x6efc68=_0x26bcd9(0x3b5);if(_0x6efc68==='path')try{const _0x3bb58f=_0x47e2f8[_0x26bcd9(0x172)](_0x2447f7,_0x26bcd9(0x2d0))[_0x26bcd9(0x336)](),_0x3727cc=_0x502380['detectInputType'](_0x3bb58f);if(_0x3727cc===_0x26bcd9(0x21a)){await _0x35951a(_0x3bb58f,_0x24abd3);return;}await _0x5ce6c5(_0x2447f7,_0x24abd3);return;}catch(_0x469eb2){console[_0x26bcd9(0x255)](_0x26bcd9(0x185)+_0x2447f7+':\x20'+_0x469eb2['message']),process['exit'](0x1);}switch(_0x6efc68){case _0x26bcd9(0x300):await _0x5ce6c5(_0x2447f7,_0x24abd3);break;case _0x26bcd9(0x21a):await _0x35951a(_0x2447f7,_0x24abd3);break;case _0x26bcd9(0x415):await _0x25cc05(_0x2447f7,_0x24abd3);break;default:console[_0x26bcd9(0x255)](_0x26bcd9(0x246)+_0x2447f7+'\x22'),console[_0x26bcd9(0x255)](''),console[_0x26bcd9(0x255)](_0x26bcd9(0x441)),console[_0x26bcd9(0x255)](_0x26bcd9(0x289)),console[_0x26bcd9(0x255)](_0x26bcd9(0x18f)),console['error'](_0x26bcd9(0x156)),console[_0x26bcd9(0x255)](_0x26bcd9(0x170)),console['error'](''),console[_0x26bcd9(0x255)]('\x20\x20Usage:\x20okdb\x20license\x20[<blob|path|uuid|activation-token>]'),process[_0x26bcd9(0x225)](0x1);}}}return;}switch(_0x430507){case _0x26bcd9(0x2db):await _0x4c019f(_0x508d56);break;case _0x26bcd9(0x437):await _0x336615();break;case _0x26bcd9(0x3f6):await _0x2c788b(_0x508d56);break;case'backup':await _0x1ad921(_0xd9e626??_0x158bed[_0x26bcd9(0x431)](_0x26bcd9(0x42a)),_0x508d56);break;case _0x26bcd9(0x145):await _0x3e9e0b(_0xd9e626??_0x158bed[_0x26bcd9(0x431)](_0x26bcd9(0x2f8)),_0x508d56,_0x229e25);break;case _0x26bcd9(0x3c2):await _0x3eecec(_0xd9e626??_0x158bed[_0x26bcd9(0x431)](_0x26bcd9(0x2f8)),_0x508d56,_0x229e25);break;case'join':await _0x163f6a(_0xd9e626,_0x508d56,_0x229e25);break;}})()[_0x324f6a(0x29b)](()=>process[_0x324f6a(0x225)](0x0))[_0x324f6a(0x149)](_0x149faf=>{const _0x32dd23=_0x324f6a;console[_0x32dd23(0x255)](_0x32dd23(0x16a)+(_0x149faf['message']||_0x149faf)+'\x0a'),process['exit'](0x1);});}else _0x477e49()['catch'](_0x1b709a=>{const _0x5c2402=_0x324f6a;console[_0x5c2402(0x255)](_0x5c2402(0x35b)),console[_0x5c2402(0x255)](_0x1b709a['stack']||_0x1b709a),process[_0x5c2402(0x225)](0x1);});}return okdb$1;}var okdbExports=requireOkdb(),okdb=getDefaultExportFromCjs(okdbExports);module[_0x2a866b(0x3bc)]=okdb;