@hilbras/omnihilbras 2.9.6 → 2.9.8

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 (244) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +22 -22
  3. package/app/.next-cli-build/build-manifest.json +3 -3
  4. package/app/.next-cli-build/prerender-manifest.json +17 -17
  5. package/app/.next-cli-build/react-loadable-manifest.json +1 -1
  6. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  29. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  30. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  31. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  32. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  33. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  34. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  35. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  36. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  37. package/app/.next-cli-build/server/app/_not-found.rsc +4 -4
  38. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +4 -4
  39. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +4 -4
  40. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  41. package/app/.next-cli-build/server/app/api/models/chat/route.js +1 -1
  42. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  43. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  44. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  45. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +1 -1
  46. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  47. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  48. package/app/.next-cli-build/server/app/callback.html +1 -1
  49. package/app/.next-cli-build/server/app/callback.rsc +4 -4
  50. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +4 -4
  51. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
  52. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +4 -4
  53. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  54. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +4 -4
  55. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +4 -4
  56. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +4 -4
  57. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
  58. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  59. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +4 -4
  60. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +4 -4
  61. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +4 -4
  62. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
  63. package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  64. package/app/.next-cli-build/server/app/dashboard/combos.rsc +4 -4
  65. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +4 -4
  66. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +4 -4
  67. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
  68. package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  69. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +6 -6
  70. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +6 -6
  71. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +6 -6
  72. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
  73. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  74. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +4 -4
  75. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +4 -4
  76. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +4 -4
  77. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
  78. package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  79. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +4 -4
  80. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +4 -4
  81. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +4 -4
  82. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
  83. package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  84. package/app/.next-cli-build/server/app/dashboard/profile.rsc +4 -4
  85. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +4 -4
  86. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +4 -4
  87. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
  88. package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  89. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +4 -4
  90. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +4 -4
  91. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +4 -4
  92. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
  93. package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  94. package/app/.next-cli-build/server/app/dashboard/providers.rsc +4 -4
  95. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +4 -4
  96. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +4 -4
  97. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
  98. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  99. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +4 -4
  100. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +4 -4
  101. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +4 -4
  102. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
  103. package/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
  104. package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +4 -4
  105. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +4 -4
  106. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +4 -4
  107. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +2 -2
  108. package/app/.next-cli-build/server/app/dashboard/quota.html +1 -1
  109. package/app/.next-cli-build/server/app/dashboard/quota.rsc +4 -4
  110. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +4 -4
  111. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +4 -4
  112. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
  113. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  114. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  115. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +4 -4
  116. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +4 -4
  117. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  118. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +4 -4
  119. package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  120. package/app/.next-cli-build/server/app/dashboard/skills.rsc +4 -4
  121. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +4 -4
  122. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +4 -4
  123. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +2 -2
  124. package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  125. package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +4 -4
  126. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +4 -4
  127. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +4 -4
  128. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +2 -2
  129. package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  130. package/app/.next-cli-build/server/app/dashboard/translator.rsc +4 -4
  131. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +4 -4
  132. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +4 -4
  133. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
  134. package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  135. package/app/.next-cli-build/server/app/dashboard/usage.rsc +4 -4
  136. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +4 -4
  137. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +4 -4
  138. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
  139. package/app/.next-cli-build/server/app/dashboard.html +1 -1
  140. package/app/.next-cli-build/server/app/dashboard.rsc +6 -6
  141. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +6 -6
  142. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +6 -6
  143. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +2 -2
  144. package/app/.next-cli-build/server/app/index.html +1 -1
  145. package/app/.next-cli-build/server/app/index.rsc +4 -4
  146. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +4 -4
  147. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +4 -4
  148. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
  149. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  150. package/app/.next-cli-build/server/app/landing.html +1 -1
  151. package/app/.next-cli-build/server/app/landing.rsc +4 -4
  152. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +4 -4
  153. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
  154. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +4 -4
  155. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  156. package/app/.next-cli-build/server/app/login.html +1 -1
  157. package/app/.next-cli-build/server/app/login.rsc +4 -4
  158. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +4 -4
  159. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
  160. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +4 -4
  161. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  162. package/app/.next-cli-build/server/app-paths-manifest.json +22 -22
  163. package/app/.next-cli-build/server/chunks/2617.js +1 -1
  164. package/app/.next-cli-build/server/chunks/412.js +1 -1
  165. package/app/.next-cli-build/server/chunks/436.js +1 -1
  166. package/app/.next-cli-build/server/chunks/7431.js +3 -3
  167. package/app/.next-cli-build/server/chunks/820.js +1 -1
  168. package/app/.next-cli-build/server/chunks/8287.js +1 -1
  169. package/app/.next-cli-build/server/chunks/8525.js +1 -1
  170. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  171. package/app/.next-cli-build/server/middleware-react-loadable-manifest.js +1 -1
  172. package/app/.next-cli-build/server/pages/404.html +1 -1
  173. package/app/.next-cli-build/server/pages/500.html +1 -1
  174. package/app/.next-cli-build/static/chunks/{2723-7d202e913c52264d.js → 2723-6c3362ddd04a22cd.js} +1 -1
  175. package/app/.next-cli-build/static/chunks/{5497-df32bda6e3c66c2a.js → 5497-e2c10e10b7e013fc.js} +1 -1
  176. package/app/.next-cli-build/static/chunks/7958-888ab0e64e06ab2f.js +5 -0
  177. package/app/.next-cli-build/static/chunks/{webpack-2a9ce2c5b55aa5a4.js → webpack-a09b596b791957cc.js} +1 -1
  178. package/app/.next-cli-build/static/css/747780fc07d59019.css +1 -0
  179. package/app/node_modules/node-forge/LICENSE +331 -0
  180. package/app/node_modules/node-forge/README.md +2071 -0
  181. package/app/node_modules/node-forge/dist/forge.all.min.js +2 -0
  182. package/app/node_modules/node-forge/dist/forge.all.min.js.map +1 -0
  183. package/app/node_modules/node-forge/dist/forge.min.js +2 -0
  184. package/app/node_modules/node-forge/dist/forge.min.js.map +1 -0
  185. package/app/node_modules/node-forge/dist/prime.worker.min.js +2 -0
  186. package/app/node_modules/node-forge/dist/prime.worker.min.js.map +1 -0
  187. package/app/node_modules/node-forge/flash/swf/SocketPool.swf +0 -0
  188. package/app/node_modules/node-forge/lib/aes.js +1091 -0
  189. package/app/node_modules/node-forge/lib/aesCipherSuites.js +282 -0
  190. package/app/node_modules/node-forge/lib/asn1-validator.js +91 -0
  191. package/app/node_modules/node-forge/lib/asn1.js +1520 -0
  192. package/app/node_modules/node-forge/lib/baseN.js +186 -0
  193. package/app/node_modules/node-forge/lib/cipher.js +230 -0
  194. package/app/node_modules/node-forge/lib/cipherModes.js +999 -0
  195. package/app/node_modules/node-forge/lib/des.js +496 -0
  196. package/app/node_modules/node-forge/lib/ed25519.js +1091 -0
  197. package/app/node_modules/node-forge/lib/forge.js +13 -0
  198. package/app/node_modules/node-forge/lib/form.js +149 -0
  199. package/app/node_modules/node-forge/lib/hmac.js +146 -0
  200. package/app/node_modules/node-forge/lib/http.js +1346 -0
  201. package/app/node_modules/node-forge/lib/index.all.js +16 -0
  202. package/app/node_modules/node-forge/lib/index.js +33 -0
  203. package/app/node_modules/node-forge/lib/jsbn.js +1294 -0
  204. package/app/node_modules/node-forge/lib/kem.js +168 -0
  205. package/app/node_modules/node-forge/lib/log.js +319 -0
  206. package/app/node_modules/node-forge/lib/md.all.js +13 -0
  207. package/app/node_modules/node-forge/lib/md.js +11 -0
  208. package/app/node_modules/node-forge/lib/md5.js +289 -0
  209. package/app/node_modules/node-forge/lib/mgf.js +12 -0
  210. package/app/node_modules/node-forge/lib/mgf1.js +57 -0
  211. package/app/node_modules/node-forge/lib/oids.js +180 -0
  212. package/app/node_modules/node-forge/lib/pbe.js +1023 -0
  213. package/app/node_modules/node-forge/lib/pbkdf2.js +211 -0
  214. package/app/node_modules/node-forge/lib/pem.js +237 -0
  215. package/app/node_modules/node-forge/lib/pkcs1.js +276 -0
  216. package/app/node_modules/node-forge/lib/pkcs12.js +1078 -0
  217. package/app/node_modules/node-forge/lib/pkcs7.js +1260 -0
  218. package/app/node_modules/node-forge/lib/pkcs7asn1.js +410 -0
  219. package/app/node_modules/node-forge/lib/pki.js +102 -0
  220. package/app/node_modules/node-forge/lib/prime.js +297 -0
  221. package/app/node_modules/node-forge/lib/prime.worker.js +168 -0
  222. package/app/node_modules/node-forge/lib/prng.js +419 -0
  223. package/app/node_modules/node-forge/lib/pss.js +241 -0
  224. package/app/node_modules/node-forge/lib/random.js +191 -0
  225. package/app/node_modules/node-forge/lib/rc2.js +410 -0
  226. package/app/node_modules/node-forge/lib/rsa.js +1968 -0
  227. package/app/node_modules/node-forge/lib/sha1.js +319 -0
  228. package/app/node_modules/node-forge/lib/sha256.js +327 -0
  229. package/app/node_modules/node-forge/lib/sha512.js +561 -0
  230. package/app/node_modules/node-forge/lib/socket.js +287 -0
  231. package/app/node_modules/node-forge/lib/ssh.js +236 -0
  232. package/app/node_modules/node-forge/lib/tls.js +4282 -0
  233. package/app/node_modules/node-forge/lib/tlssocket.js +249 -0
  234. package/app/node_modules/node-forge/lib/util.js +2652 -0
  235. package/app/node_modules/node-forge/lib/x509.js +3251 -0
  236. package/app/node_modules/node-forge/lib/xhr.js +738 -0
  237. package/app/node_modules/node-forge/package.json +123 -0
  238. package/app/package.json +1 -1
  239. package/hooks/postinstall.js +22 -0
  240. package/package.json +3 -2
  241. package/app/.next-cli-build/static/chunks/7958-316473a002b2e084.js +0 -5
  242. package/app/.next-cli-build/static/css/73729572c2967c28.css +0 -1
  243. /package/app/.next-cli-build/static/{50L_O0gZpitHt-drH8zm8 → cZhiw78jUWQGJMmSZolvp}/_buildManifest.js +0 -0
  244. /package/app/.next-cli-build/static/{50L_O0gZpitHt-drH8zm8 → cZhiw78jUWQGJMmSZolvp}/_ssgManifest.js +0 -0
@@ -0,0 +1,123 @@
1
+ {
2
+ "name": "node-forge",
3
+ "version": "1.4.0",
4
+ "description": "JavaScript implementations of network transports, cryptography, ciphers, PKI, message digests, and various utilities.",
5
+ "homepage": "https://github.com/digitalbazaar/forge",
6
+ "author": {
7
+ "name": "Digital Bazaar, Inc.",
8
+ "email": "support@digitalbazaar.com",
9
+ "url": "http://digitalbazaar.com/"
10
+ },
11
+ "contributors": [
12
+ "Dave Longley <dlongley@digitalbazaar.com>",
13
+ "David I. Lehn <dlehn@digitalbazaar.com>",
14
+ "Stefan Siegl <stesie@brokenpipe.de>",
15
+ "Christoph Dorn <christoph@christophdorn.com>"
16
+ ],
17
+ "devDependencies": {
18
+ "browserify": "^16.5.2",
19
+ "commander": "^2.20.0",
20
+ "cross-env": "^5.2.1",
21
+ "eslint": "^7.27.0",
22
+ "eslint-config-digitalbazaar": "^2.8.0",
23
+ "express": "^4.16.2",
24
+ "karma": "^4.4.1",
25
+ "karma-browserify": "^7.0.0",
26
+ "karma-chrome-launcher": "^3.1.0",
27
+ "karma-edge-launcher": "^0.4.2",
28
+ "karma-firefox-launcher": "^1.3.0",
29
+ "karma-ie-launcher": "^1.0.0",
30
+ "karma-mocha": "^1.3.0",
31
+ "karma-mocha-reporter": "^2.2.5",
32
+ "karma-safari-launcher": "^1.0.0",
33
+ "karma-sauce-launcher": "^2.0.2",
34
+ "karma-sourcemap-loader": "^0.3.8",
35
+ "karma-tap-reporter": "0.0.6",
36
+ "karma-webpack": "^4.0.2",
37
+ "mocha": "^5.2.0",
38
+ "mocha-lcov-reporter": "^1.2.0",
39
+ "nodejs-websocket": "^1.7.1",
40
+ "nyc": "^15.1.0",
41
+ "opts": "^1.2.7",
42
+ "webpack": "^4.44.1",
43
+ "webpack-cli": "^3.3.12",
44
+ "worker-loader": "^2.0.0"
45
+ },
46
+ "repository": {
47
+ "type": "git",
48
+ "url": "https://github.com/digitalbazaar/forge"
49
+ },
50
+ "bugs": {
51
+ "url": "https://github.com/digitalbazaar/forge/issues",
52
+ "email": "support@digitalbazaar.com"
53
+ },
54
+ "license": "(BSD-3-Clause OR GPL-2.0)",
55
+ "main": "lib/index.js",
56
+ "files": [
57
+ "lib/*.js",
58
+ "flash/swf/*.swf",
59
+ "dist/*.min.js",
60
+ "dist/*.min.js.map"
61
+ ],
62
+ "engines": {
63
+ "node": ">= 6.13.0"
64
+ },
65
+ "keywords": [
66
+ "aes",
67
+ "asn",
68
+ "asn.1",
69
+ "cbc",
70
+ "crypto",
71
+ "cryptography",
72
+ "csr",
73
+ "des",
74
+ "gcm",
75
+ "hmac",
76
+ "http",
77
+ "https",
78
+ "md5",
79
+ "network",
80
+ "pkcs",
81
+ "pki",
82
+ "prng",
83
+ "rc2",
84
+ "rsa",
85
+ "sha1",
86
+ "sha256",
87
+ "sha384",
88
+ "sha512",
89
+ "ssh",
90
+ "tls",
91
+ "x.509",
92
+ "x509"
93
+ ],
94
+ "scripts": {
95
+ "prepublish": "npm run build",
96
+ "build": "webpack",
97
+ "test-build": "webpack --config webpack-tests.config.js",
98
+ "test": "npm run test-node",
99
+ "test-node": "cross-env NODE_ENV=test mocha -t 30000 -R ${REPORTER:-spec} tests/unit/index.js",
100
+ "test-karma": "karma start",
101
+ "test-karma-sauce": "karma start karma-sauce.conf",
102
+ "test-server": "node tests/server.js",
103
+ "test-server-ws": "node tests/websockets/server-ws.js",
104
+ "test-server-webid": "node tests/websockets/server-webid.js",
105
+ "coverage": "rm -rf coverage && nyc --reporter=lcov --reporter=text-summary npm test",
106
+ "coverage-ci": "rm -rf coverage && nyc --reporter=lcovonly npm test",
107
+ "coverage-report": "nyc report",
108
+ "lint": "eslint *.js lib/*.js tests/*.js tests/**/*.js examples/*.js flash/*.js"
109
+ },
110
+ "nyc": {
111
+ "exclude": [
112
+ "tests"
113
+ ]
114
+ },
115
+ "jspm": {
116
+ "format": "amd"
117
+ },
118
+ "browser": {
119
+ "buffer": false,
120
+ "crypto": false,
121
+ "process": false
122
+ }
123
+ }
package/app/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omnihilbras-app",
3
- "version": "2.9.6",
3
+ "version": "2.9.8",
4
4
  "description": "OmniHilbras web dashboard",
5
5
  "private": true,
6
6
  "scripts": {
@@ -23,4 +23,26 @@ try {
23
23
  console.warn(`[omnihilbras] tray runtime skipped: ${e.message}`);
24
24
  }
25
25
 
26
+ // Apply the node-forge security patch (CVE-2026-85393) to the copy that ships
27
+ // with this package. The patch script is bundled at <pkg>/app/scripts/; the
28
+ // runtime-resolved node-forge is at <pkg>/app/node_modules/node-forge (the
29
+ // standalone server loads it from there). Both are resolved from __dirname
30
+ // (which is <pkg>/hooks/ at install time). Failure is non-fatal: the app
31
+ // still starts, only the MITM cert-generation path stays unpatched.
32
+ const forgePatchSrc = require("path").join(__dirname, "..", "app", "scripts", "apply-node-forge-patch.cjs");
33
+ if (require("fs").existsSync(forgePatchSrc)) {
34
+ try {
35
+ // Point the script at <pkg>/app/node_modules/node-forge — the copy the
36
+ // standalone server actually loads. The script's own default
37
+ // (../node_modules from app/scripts/) resolves to the same path, so this
38
+ // env override is belt-and-braces for non-standard layouts.
39
+ process.env.NODE_FORGE_ASN1_JS = require("path").join(
40
+ __dirname, "..", "app", "node_modules", "node-forge", "lib", "asn1.js"
41
+ );
42
+ require(forgePatchSrc);
43
+ } catch (e) {
44
+ console.warn(`[omnihilbras] node-forge patch skipped: ${e.message}`);
45
+ }
46
+ }
47
+
26
48
  process.exit(0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hilbras/omnihilbras",
3
- "version": "2.9.6",
3
+ "version": "2.9.8",
4
4
  "description": "OmniHilbras CLI - Start and manage OmniHilbras server",
5
5
  "bin": {
6
6
  "omnihilbras": "./cli.js"
@@ -27,7 +27,8 @@
27
27
  "node-machine-id": "^1.1.12",
28
28
  "react": "19.2.1",
29
29
  "react-dom": "19.2.1",
30
- "confbox": "^0.2.4"
30
+ "confbox": "^0.2.4",
31
+ "node-forge": "^1.4.0"
31
32
  },
32
33
  "comment_sqlite": "sql.js + better-sqlite3 are NOT bundled here. They are installed into ~/.omnihilbras/runtime/node_modules by hooks/postinstall.js (and re-checked at runtime by cli.js). This avoids Windows EBUSY errors when updating the global CLI, since native .node files no longer live under the locked install dir.",
33
34
  "comment_systray": "systray2 is NOT bundled here. It is lazy-installed into ~/.omnihilbras/runtime/node_modules by hooks/postinstall.js on macOS/Linux only. Windows uses PowerShell NotifyIcon (zero binary). This avoids shipping unsigned Go binaries that trigger antivirus false positives (Kaspersky). We use the systray2 fork because the legacy systray@1.0.5 ships a 2017 x86_64 binary that fails to load on modern macOS dyld. Neither package ships an arm64 macOS binary, so on Apple Silicon hooks/trayRuntime.js overlays our own arm64 build from the tray-binaries GitHub release; without it the tray requires Rosetta 2.",
@@ -1,5 +0,0 @@
1
- (self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7958],{15536:(e,t,s)=>{"use strict";s.d(t,{Cp:()=>n,Hx:()=>r,Iv:()=>m,N9:()=>u,Nv:()=>h,RL:()=>d,YR:()=>o,ev:()=>x,fl:()=>i,hT:()=>a,oX:()=>l,t6:()=>c});let a=["zh-CN","zh-TW"],l=[{icon:"public",title:"Access Anywhere",desc:"Use your API from any network"},{icon:"group",title:"Share Endpoint",desc:"Share URL with team members"},{icon:"code",title:"Use in Cursor/Cline",desc:"Connect AI tools remotely"},{icon:"lock",title:"Encrypted",desc:"End-to-end TLS via Cloudflare"}],r=2e3,n=3e5,i=5e3,o=3e4,c=5,d=1e4,u=6e4,m=5e3,x=[{id:"lite",label:"Lite",desc:"Drop filler, keep grammar"},{id:"full",label:"Full",desc:"Drop articles, fragments OK"},{id:"ultra",label:"Ultra",desc:"Telegraphic, max compression"},{id:"wenyan-lite",label:"文 Lite",desc:"Classical Chinese, light compression",wenyan:!0},{id:"wenyan",label:"文 Full",desc:"Maximum 文言文, 80-90% reduction",wenyan:!0},{id:"wenyan-ultra",label:"文 Ultra",desc:"Extreme classical compression",wenyan:!0}],h=[{id:"lite",label:"Lite",desc:"Build asked, name lazier option"},{id:"full",label:"Full",desc:"Ladder enforced: stdlib/native first"},{id:"ultra",label:"Ultra",desc:"YAGNI extremist, deletion first"}]},21280:(e,t,s)=>{"use strict";s.d(t,{default:()=>w});var a=s(95155),l=s(12115),r=s(35497),n=s(5293),i=s(15536);async function o(e){if(!e)return!1;try{return(await fetch(`${e}/api/health`,{mode:"cors",cache:"no-store",signal:AbortSignal.timeout(i.Iv)})).ok}catch{return!1}}async function c(...e){let t=e.filter(Boolean).map(o);return!!t.length&&new Promise(e=>{let s=t.length;t.forEach(t=>t.then(t=>{t?e(!0):0==--s&&e(!1)}))})}var d=s(72767);function u({label:e,url:t,copyId:s,copied:l,onCopy:n}){return(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:"text-xs font-mono px-1.5 py-0.5 rounded shrink-0 min-w-[88px] text-center bg-surface-2 text-text-muted",children:e}),(0,a.jsx)(r.pd,{value:t,readOnly:!0,className:"flex-1 font-mono text-sm"}),(0,a.jsx)("button",{onClick:()=>n(t,s),className:"p-2 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-colors shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:l===s?"check":"content_copy"})})]})}function m({status:e,className:t=""}){return(0,a.jsx)("div",{className:`p-2 rounded text-sm ${t} ${"success"===e.type?"bg-green-500/10 text-green-600 dark:text-green-400":"warning"===e.type?"bg-yellow-500/10 text-yellow-600 dark:text-yellow-400":"info"===e.type?"bg-blue-500/10 text-blue-600 dark:text-blue-400":"bg-red-500/10 text-red-600 dark:text-red-400"}`,children:e.message.split(/(https?:\/\/[^\s]+)/g).map((e,t)=>/^https?:\/\//.test(e)?(0,a.jsx)("a",{href:e,target:"_blank",rel:"noreferrer",className:"underline font-medium",children:e},t):e)})}function x({text:e}){return(0,a.jsxs)("span",{className:"relative group inline-flex items-center",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[14px] text-text-muted cursor-help",children:"help"}),(0,a.jsx)("span",{className:"pointer-events-none absolute left-5 top-1/2 -translate-y-1/2 z-50 w-64 rounded bg-gray-900 dark:bg-gray-800 text-white text-xs px-2.5 py-1.5 opacity-0 group-hover:opacity-100 transition-opacity shadow-lg",children:e})]})}function h({message:e,action:t}){return(0,a.jsxs)("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg bg-amber-500/10 border border-amber-500/20 text-amber-700 dark:text-amber-400",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px] shrink-0 mt-0.5",children:"warning"}),(0,a.jsx)("p",{className:"text-xs flex-1",children:e}),t&&(0,a.jsx)("a",{href:t.href,className:"text-xs font-medium underline shrink-0 hover:opacity-80",onClick:t.href.startsWith("#")?e=>{e.preventDefault(),document.getElementById(t.href.slice(1))?.scrollIntoView({behavior:"smooth"})}:void 0,children:t.label})]})}var p=s(14051),y=s.n(p);function g({apiKey:e,onChange:t,onRequestRestrict:s}){let n=e.access||{restricted:!1,allow:[]},[i,o]=(0,l.useState)(!1),[c,d]=(0,l.useState)([]),[u,m]=(0,l.useState)({}),x=async()=>{o(!0);try{let[e,t]=await Promise.all([fetch("/api/providers"),fetch("/api/models/alias")]);e.ok&&d((await e.json()).connections||[]),t.ok&&m((await t.json()).aliases||{})}catch(e){console.log("Error loading picker data:",e)}},h=e=>t({restricted:!0,allow:e}),p=e=>h(n.allow.filter(t=>t!==e));return(0,a.jsxs)("div",{className:"mt-2","data-testid":"key-access",children:[(0,a.jsx)(r.lM,{size:"sm",checked:n.restricted,label:"Restrict access",onChange:e=>e?s():t({restricted:!1,allow:n.allow})}),n.restricted&&(0,a.jsxs)("div",{className:"mt-2 flex flex-wrap items-center gap-1.5",children:[0===n.allow.length&&(0,a.jsx)("span",{className:"text-xs text-orange-500",children:"No combos or models allowed — this key can call nothing."}),n.allow.map(e=>(0,a.jsxs)("span",{className:"flex items-center gap-1 rounded-xl border border-primary/30 bg-primary/10 px-2 py-0.5 font-mono text-xs text-text-main",children:[e,(0,a.jsx)("button",{onClick:()=>p(e),className:"rounded text-text-muted hover:text-red-500",title:`Remove ${e}`,"aria-label":`Remove ${e}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined leading-none",style:{fontSize:"12px"},children:"close"})})]},e)),(0,a.jsxs)("button",{onClick:x,className:"flex items-center gap-0.5 rounded-xl border border-dashed border-black/10 px-2 py-0.5 text-xs font-medium text-primary hover:border-primary/50 dark:border-white/10",children:[(0,a.jsx)("span",{className:"material-symbols-outlined leading-none",style:{fontSize:"14px"},children:"add"}),"Add combo or model"]})]}),i&&(0,a.jsx)(r.rq,{isOpen:i,onClose:()=>o(!1),onSelect:e=>{let t=e?.value;t&&!n.allow.some(e=>e.toLowerCase()===t.toLowerCase())&&h([...n.allow,t])},onDeselect:e=>p(n.allow.find(t=>t.toLowerCase()===String(e?.value).toLowerCase())),activeProviders:c,modelAliases:u,title:`Allowed for "${e.name}"`,addedModelValues:n.allow,closeOnSelect:!1})]})}function b(e,t){if(""===e||null==e)return t??0;let s=Number(e);return Number.isFinite(s)?s:0}function f({apiKey:e}){let t=(0,d.A)(e=>e.settings),s=t?.rateLimit||{},r=s.keyOverrides?.[e.id]||null,[n,i]=(0,l.useState)(!1),o=r?`Rate limit: ${b(r.requestsPerMinute,s.requestsPerMinute)}/min, ${b(r.tokensPerMinute,s.tokensPerMinute)} tokens/min`:"Rate limit: global";return(0,a.jsxs)("div",{className:"mt-2","data-testid":"key-rate-limit",children:[(0,a.jsx)("button",{type:"button",onClick:()=>i(e=>!e),className:"text-xs font-medium text-primary hover:underline",children:o}),n&&(0,a.jsx)(k,{apiKey:e},`${e.id}:${r?.requestsPerMinute}:${r?.tokensPerMinute}:${s.requestsPerMinute}:${s.tokensPerMinute}`),n&&(0,a.jsx)(j,{apiKeyId:e.id})]})}function j({apiKeyId:e}){let[t,s]=(0,l.useState)(null);if((0,l.useEffect)(()=>{let t=!1,a=async()=>{if(!document.hidden)try{let a=await fetch("/api/usage/rate-limit",{cache:"no-store"});if(!a.ok)return;let l=await a.json();if(t)return;let r=(l.identities||[]).find(t=>t.keyId===e);s(r||null)}catch{}},l=()=>{document.hidden||a()};document.addEventListener("visibilitychange",l),a();let r=setInterval(a,15e3);return()=>{t=!0,clearInterval(r),document.removeEventListener("visibilitychange",l)}},[e]),!t)return null;let r=Object.values(t.rejections||{}).reduce((e,t)=>e+(Number(t)||0),0);return(0,a.jsxs)("p",{className:"mt-1 text-xs text-text-muted","data-testid":"key-rate-limit-usage",children:["Last minute: ",t.requestsPerMinute," requests, ",t.tokensPerMinute," tokens",r>0?`, ${r} refused`:""]})}function k({apiKey:e}){let t=(0,d.A)(e=>e.settings),s=(0,d.A)(e=>e.patchSettings),n=t?.rateLimit||{},i=n.keyOverrides?.[e.id]||null,[o,c]=(0,l.useState)(String(i?.requestsPerMinute??n.requestsPerMinute??"")),[u,m]=(0,l.useState)(String(i?.tokensPerMinute??n.tokensPerMinute??"")),[x,h]=(0,l.useState)(!1),[p,y]=(0,l.useState)(""),g=async e=>{h(!0),y("");try{await s({rateLimit:{...n,keyOverrides:e}})||y(d.A.getState().error||"The limit was not saved — the server refused the change.")}finally{h(!1)}};return(0,a.jsxs)("div",{className:"mt-2 flex flex-col gap-2 rounded-xl border border-black/[0.05] dark:border-white/[0.06] p-3",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row",children:[(0,a.jsx)(r.pd,{type:"number",min:"0",label:"Requests / minute",value:o,onChange:e=>c(e.target.value),className:"flex-1"}),(0,a.jsx)(r.pd,{type:"number",min:"0",label:"Tokens / minute",value:u,onChange:e=>m(e.target.value),className:"flex-1"})]}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"0 means unlimited for this key. Leave empty to use the global ceiling."}),p&&(0,a.jsx)("p",{className:"text-xs text-red-500","data-testid":"key-rate-limit-error",children:p}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)(r.$n,{size:"sm",onClick:()=>{let t={...n.keyOverrides||{}};t[e.id]={requestsPerMinute:""===o.trim()?"":Number(o)||0,tokensPerMinute:""===u.trim()?"":Number(u)||0},g(t)},disabled:x,children:"Save"}),i&&(0,a.jsx)(r.$n,{size:"sm",variant:"ghost",onClick:()=>{let t={...n.keyOverrides||{}};delete t[e.id],g(t)},disabled:x,children:"Use global"})]})]})}function w(){let[e,t]=(0,l.useState)([]),[s,p]=(0,l.useState)(!0),[y,b]=(0,l.useState)(""),[j,k]=(0,l.useState)(""),[w,v]=(0,l.useState)(""),[N,C]=(0,l.useState)(!1),[S,P]=(0,l.useState)(""),[T,$]=(0,l.useState)(null),[E,A]=(0,l.useState)(null),[R,_]=(0,l.useState)(!1),[I,O]=(0,l.useState)(!0),[q,F]=(0,l.useState)(!0),[U,L]=(0,l.useState)(!1),[D,K]=(0,l.useState)(!0),[M,W]=(0,l.useState)(!1),[z,H]=(0,l.useState)(!1),[J,B]=(0,l.useState)(""),[Y,Q]=(0,l.useState)(""),[V,X]=(0,l.useState)(!1),[Z,G]=(0,l.useState)(""),[ee,et]=(0,l.useState)(null),[es,ea]=(0,l.useState)(!1),[el,er]=(0,l.useState)(!1),[en,ei]=(0,l.useState)(!1),[eo,ec]=(0,l.useState)(!1),[ed,eu]=(0,l.useState)(""),[em,ex]=(0,l.useState)(!1),[eh,ep]=(0,l.useState)(""),[ey,eg]=(0,l.useState)(null),[eb,ef]=(0,l.useState)(""),[ej,ek]=(0,l.useState)(""),[ew,ev]=(0,l.useState)(null),[eN,eC]=(0,l.useState)(!1),[eS,eP]=(0,l.useState)([]),[eT,e$]=(0,l.useState)(""),[eE,eA]=(0,l.useState)(!1),[eR,e_]=(0,l.useState)(!1),[eI,eO]=(0,l.useState)(!1),eq=(0,l.useRef)(null),eF=(0,l.useRef)(!0),eU=(0,l.useRef)(null);(0,l.useEffect)(()=>(eF.current=!0,()=>{eF.current=!1,eU.current?.abort()}),[]);let eL=(0,l.useRef)(0),eD=(0,l.useRef)(0),eK=(0,l.useRef)(!1),eM=(0,l.useRef)(!1),eW=(0,l.useRef)(!1),ez=(0,l.useRef)(!1),[eH,eJ]=(0,l.useState)(!1),[eB,eY]=(0,l.useState)(!1),[eQ,eV]=(0,l.useState)(!1);(0,l.useEffect)(()=>{eV(!["localhost","127.0.0.1","::1"].includes(window.location.hostname))},[]);let{copied:eX,copy:eZ}=(0,n.C)(),eG=!I||!q,e0=I?"Change the default dashboard password before activating the tunnel.":'Enable "Require login" and set a custom password before activating the tunnel.';(0,l.useEffect)(()=>{eq.current&&(eq.current.scrollTop=eq.current.scrollHeight)},[eS]),(0,l.useEffect)(()=>{e8(),e2()},[]),(0,l.useEffect)(()=>{if(!(M||en))return;let e=!M||z,t=!en||eo,s=()=>{document.hidden||e5()};document.addEventListener("visibilitychange",s);let a=setInterval(()=>{document.hidden||e5()},e&&t?i.YR:i.fl);return()=>{clearInterval(a),document.removeEventListener("visibilitychange",s)}},[M,en,z,eo]),(0,l.useEffect)(()=>{let e=async()=>{if(!document.hidden){if(M&&(J||Y)){let e=await c(Y,J);eK.current=e,e?(eL.current=0,H(!0),eW.current||(eW.current=!0,eJ(!0))):(eL.current+=1,eL.current>=i.t6&&H(!1))}else eK.current=!1;if(en&&ed){let e=await o(ed);eM.current=e,e?(eD.current=0,ec(!0),ez.current||(ez.current=!0,eY(!0))):(eD.current+=1,eD.current>=i.t6&&ec(!1))}else eM.current=!1}};if(!(M&&(J||Y)||en&&ed))return;e();let t=!en||eo,s=setInterval(e,(!M||z)&&t?i.N9:i.RL);return()=>clearInterval(s)},[M,J,Y,en,ed,z,eo]);let e1=(0,l.useCallback)((e,t,s,a,l,r)=>{t.current?(s.current=0,a(!0),l.current||(l.current=!0,r(!0))):(s.current+=1,s.current>=i.t6&&a(!1))},[]),e5=async()=>{try{let e=await fetch("/api/tunnel/status",{cache:"no-store"});if(!e.ok)return;let t=await e.json(),s=t.tunnel?.settingsEnabled??t.tunnel?.enabled??!1,a=t.tunnel?.tunnelUrl||"";B(a),Q(t.tunnel?.publicUrl||""),W(s),e1(null,eK,eL,H,eW,eJ);let l=t.tailscale?.settingsEnabled??t.tailscale?.enabled??!1,r=t.tailscale?.tunnelUrl||"";eu(r),ei(l),e1(null,eM,eD,ec,ez,eY)}catch{}},e2=async()=>{K(!0);try{let[e,t]=await Promise.all([d.A.getState().fetchSettings(),fetch("/api/tunnel/status",{cache:"no-store"})]);if(e&&(_(e.requireApiKey||!1),O(!1!==e.requireLogin),F(e.hasPassword||!1),L(e.tunnelDashboardAccess||!1)),t.ok){let e=await t.json(),s=e.tunnel?.settingsEnabled??e.tunnel?.enabled??!1,a=e.tunnel?.tunnelUrl||"";B(a),Q(e.tunnel?.publicUrl||""),W(s),e1(null,eK,eL,H,eW,eJ);let l=e.tailscale?.settingsEnabled??e.tailscale?.enabled??!1,r=e.tailscale?.tunnelUrl||"";eu(r),ei(l),e1(null,eM,eD,ec,ez,eY)}}catch(e){console.log("Error loading settings:",e)}finally{K(!1)}},e4=async e=>{try{await d.A.getState().patchSettings({tunnelDashboardAccess:e})&&L(e)}catch(e){console.log("Error updating tunnelDashboardAccess:",e)}},e3=async e=>{try{await d.A.getState().patchSettings({requireApiKey:e})&&_(e)}catch(e){console.log("Error updating requireApiKey:",e)}},e8=async()=>{try{let e=async()=>{let e=await fetch("/api/keys");if(!e.ok)throw Error(`Failed to load the API keys (HTTP ${e.status})`);return(await e.json()).keys||[]},s=await e();if(0===s.length){let t=!1;try{t=(await fetch("/api/keys",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:"Default Key"})})).ok}catch{}t&&(s=await e())}t(s),b("")}catch(e){console.log("Error fetching data:",e),b(e.message||"Failed to load the API keys.")}finally{p(!1)}},e6=async(...e)=>{if(!eF.current)return!1;X(!0),G("Waiting for tunnel ready...");let t=e.filter(Boolean).map(e=>`${e}/api/health`),s=new AbortController,{signal:a}=s,l=Date.now();for(;Date.now()-l<i.Cp&&eF.current&&(await new Promise(e=>setTimeout(e,i.Hx)),eF.current);){if(await Promise.any(t.map(async e=>{if((await fetch(e,{mode:"cors",cache:"no-store",signal:a})).ok)return!0;throw Error("not ready")})).catch(()=>!1))return W(!0),X(!1),G(""),!0;if((Date.now()-l)%1e4<i.Hx)try{let e=await fetch("/api/tunnel/status",{signal:a});if(e.ok){let t=await e.json();if(!t.tunnel?.enabled)return et({type:"error",message:"Tunnel process stopped unexpectedly."}),X(!1),G(""),!1}}catch{}}return s.abort(),!!eF.current&&(et({type:"error",message:"Tunnel created but not reachable. Please try again."}),X(!1),G(""),!1)},e7=async()=>{ea(!1),X(!0),et(null),G("Creating tunnel...");let e=!0;(async()=>{let t=new AbortController;for(eU.current=t;e;){if(!eF.current){e=!1;break}try{let s=await fetch("/api/tunnel/status",{signal:t.signal});if(s.ok){let t=await s.json();t.download?.downloading?G(`Downloading cloudflared... ${t.download.progress}%`):e&&G("Creating tunnel...")}}catch{}if(!e||!eF.current)break;await new Promise(e=>setTimeout(e,1e3))}eU.current===t&&(eU.current=null)})();try{let t=await fetch("/api/tunnel/enable",{method:"POST"});e=!1;let s=await t.json();if(!t.ok)return void et({type:"error",message:s.error||"Failed to enable tunnel"});let a=s.tunnelUrl;if(!a)return void et({type:"error",message:"No tunnel URL returned"});B(a),Q(s.publicUrl||""),await e6(s.publicUrl,a)}catch(e){et({type:"error",message:e.message})}finally{e=!1,X(!1),G("")}},e9=async()=>{X(!0),et(null);try{let e=await fetch("/api/tunnel/disable",{method:"POST"}),t=await e.json();e.ok?(W(!1),B(""),er(!1),et({type:"success",message:"Tunnel disabled"})):et({type:"error",message:t.error||"Failed to disable tunnel"})}catch(e){et({type:"error",message:e.message})}finally{X(!1)}},te=async()=>{ev(null);try{let e=await fetch("/api/tunnel/tailscale-check");if(e.ok){let t=await e.json();return ev(t.installed),t}}catch{}return ev(!1),{installed:!1}},tt=async()=>{eC(!0),eg(null),eP([]);try{let e=await fetch("/api/tunnel/tailscale-install",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sudoPassword:eT})});e$("");let t=e.body.getReader(),s=new TextDecoder,a="";for(;;){let{done:e,value:l}=await t.read();if(e)break;let r=(a+=s.decode(l,{stream:!0})).split("\n\n");for(let e of(a=r.pop()||"",r)){let t=e.split("\n"),s="progress",a=null;for(let e of t)if(e.startsWith("event: ")&&(s=e.slice(7).trim()),e.startsWith("data: "))try{a=JSON.parse(e.slice(6))}catch{}if(a)if("progress"===s)eP(e=>[...e.slice(-50),a.message]);else if("done"===s){ev(!0),eC(!1),e_(!1),tr();return}else"error"===s&&eg({type:"error",message:a.error||"Install failed"})}}}catch(e){eg({type:"error",message:e.message})}finally{eC(!1)}},ts=async e=>{if(!eF.current)return!1;ep("Waiting for Tailscale ready...");let t=`${e}/api/health`,s=new AbortController,{signal:a}=s,l=Date.now();for(;Date.now()-l<i.Cp&&eF.current&&(await new Promise(e=>setTimeout(e,i.Hx)),eF.current);)try{let e=await fetch(t,{mode:"no-cors",cache:"no-store",signal:a});if(e.ok||"opaque"===e.type)return!0}catch{}return s.abort(),!1},ta=(e,t)=>{ef(e),ek(t)},tl=()=>{ef(""),ek("")},tr=async()=>{e_(!1),eA(!0),ex(!0),eg(null),ep("Connecting..."),tl();try{let e=await fetch("/api/tunnel/tailscale-enable",{method:"POST"}),t=await e.json();if(e.ok&&t.success){eu(t.tunnelUrl||"");let e=await ts(t.tunnelUrl);ei(!0),eg(e?null:{type:"warning",message:"Connected but not reachable yet."});return}if(t.needsLogin&&t.authUrl){ta(t.authUrl,"Open Login Page"),ep('Login required — click "Open Login Page" to continue');for(let e=0;e<40;e++){if(await new Promise(e=>setTimeout(e,3e3)),!eF.current)return;try{let e=await fetch("/api/tunnel/tailscale-check");if(e.ok&&(await e.json()).loggedIn){tl(),ep("Starting funnel...");let e=await fetch("/api/tunnel/tailscale-enable",{method:"POST"}),t=await e.json();if(e.ok&&t.success){eu(t.tunnelUrl||"");let e=await ts(t.tunnelUrl);ei(!0),eg(e?null:{type:"warning",message:"Connected but not reachable yet."})}else t.funnelNotEnabled&&t.enableUrl?await tn(t.enableUrl):eg({type:"error",message:t.error||"Failed to start funnel"});return}}catch{}}tl(),eg({type:"error",message:"Login timed out. Please try again."});return}if(t.funnelNotEnabled&&t.enableUrl)return void await tn(t.enableUrl);eg({type:"error",message:t.error||"Failed to connect"})}catch(e){eg({type:"error",message:e.message})}finally{ex(!1),eA(!1),ep(""),tl()}},tn=async e=>{ta(e,"Open Funnel Settings"),ep('Click "Open Funnel Settings" to enable Funnel...');for(let e=0;e<40;e++){if(await new Promise(e=>setTimeout(e,3e3)),!eF.current)return;try{let e=await fetch("/api/tunnel/tailscale-enable",{method:"POST"}),t=await e.json();if(e.ok&&t.success){tl(),eu(t.tunnelUrl||"");let e=await ts(t.tunnelUrl);ei(!0),eg(e?null:{type:"warning",message:"Connected but not reachable yet."});return}if(t.funnelNotEnabled)continue;if(t.error){tl(),eg({type:"error",message:t.error});return}}catch{}}tl(),eg({type:"error",message:"Timed out waiting for Funnel to be enabled."})},ti=async()=>{ex(!0),eg(null);try{let e=await fetch("/api/tunnel/tailscale-disable",{method:"POST"}),t=await e.json();e.ok?(ei(!1),eu(""),eO(!1),eg({type:"success",message:"Tailscale disabled"})):eg({type:"error",message:t.error||"Failed to disable Tailscale"})}catch(e){eg({type:"error",message:e.message})}finally{ex(!1)}},to=async()=>{eg(null),eP([]);let e=await te();e?.installed&&e?.hasCachedPassword?tr():e_(!0)},tc=async()=>{if(S.trim()){v("");try{let e=await fetch("/api/keys",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:S})}),t=await e.json().catch(()=>({}));if(!e.ok)return void v(t.error||"Failed to create the key.");$(t.key),await e8(),P(""),C(!1)}catch(e){console.log("Error creating key:",e),v(e.message||"Failed to create the key.")}}},td=async s=>{A({title:"Delete API Key",message:"Delete this API key?",onConfirm:async()=>{A(null);try{(await fetch(`/api/keys/${s}`,{method:"DELETE"})).ok&&t(e.filter(e=>e.id!==s))}catch(e){console.log("Error deleting key:",e)}}})},tu=async(e,s)=>{k("");try{let a=await fetch(`/api/keys/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({isActive:s})});if(a.ok)t(t=>t.map(t=>t.id===e?{...t,isActive:s}:t));else{let e=await a.json().catch(()=>({}));k(e.error||"Failed to update the key.")}}catch(e){console.log("Error toggling key:",e),k(e.message||"Failed to update the key.")}},tm=async(e,s)=>{k("");try{let a=await fetch(`/api/keys/${e}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({access:s})}),l=await a.json().catch(()=>({}));a.ok&&l.key?t(t=>t.map(t=>t.id===e?{...t,access:l.key.access}:t)):k(l.error||"Failed to update the key access.")}catch(e){console.log("Error updating key access:",e),k(e.message||"Failed to update the key access.")}},[tx,th]=(0,l.useState)("/v1");return((0,l.useEffect)(()=>{th(`${window.location.origin}/v1`)},[]),s)?(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsx)(r.Qv,{}),(0,a.jsx)(r.Qv,{})]}):(0,a.jsxs)("div",{className:"flex flex-col gap-8",children:[(0,a.jsxs)(r.Zp,{children:[(0,a.jsxs)("h2",{className:"text-lg font-semibold mb-4 flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary",children:"api"}),"API Endpoint"]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsx)(u,{label:"Local",url:tx,copyId:"local_url",copied:eX,onCopy:eZ}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:`text-xs font-mono px-1.5 py-0.5 rounded shrink-0 min-w-[88px] text-center ${M?"bg-primary/10 text-primary":"bg-surface-2 text-text-muted"}`,children:"Tunnel"}),M&&!V&&z?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(r.pd,{value:`${Y||J}/v1`,readOnly:!0,className:"flex-1 font-mono text-sm"}),(0,a.jsx)("button",{onClick:()=>eZ(`${Y||J}/v1`,"tunnel_url"),className:"p-2 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-colors shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"tunnel_url"===eX?"check":"content_copy"})}),(0,a.jsx)("button",{onClick:()=>er(!0),className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Disable Tunnel",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):!M||V||z?V?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-border bg-input text-sm text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),Z||"Creating tunnel..."]}),(0,a.jsx)("button",{onClick:()=>{eU.current?.abort(),eU.current=null,X(!1),G("")},className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Stop",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):ee?.type==="error"?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-red-300 dark:border-red-800 bg-red-500/5 text-sm text-red-600 dark:text-red-400",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"error"}),ee.message]}),(0,a.jsx)(r.$n,{size:"sm",icon:"cloud_upload",onClick:()=>ea(!0),children:"Enable"})]}):D?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-border bg-input text-sm text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"Checking..."]}),(0,a.jsx)("button",{onClick:()=>K(!1),className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Stop",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):(0,a.jsx)(r.$n,{size:"sm",icon:"cloud_upload",onClick:()=>{eG?et({type:"error",message:`Security required: ${e0}`}):R?ea(!0):et({type:"error",message:'Security required: Enable "Require API key" before activating the tunnel.'})},children:"Enable"}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-amber-300 dark:border-amber-800 bg-amber-500/5 text-sm text-amber-600 dark:text-amber-400",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),eH?"Tunnel reconnecting...":"Tunnel checking..."]}),(0,a.jsx)("button",{onClick:()=>er(!0),className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Disable Tunnel",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2",children:[(0,a.jsx)("span",{className:`text-xs font-mono px-1.5 py-0.5 rounded shrink-0 min-w-[88px] text-center ${en?"bg-primary/10 text-primary":"bg-surface-2 text-text-muted"}`,children:"Tailscale"}),en&&!em&&eo?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(r.pd,{value:`${ed}/v1`,readOnly:!0,className:"flex-1 font-mono text-sm"}),(0,a.jsx)("button",{onClick:()=>eZ(`${ed}/v1`,"ts_url"),className:"p-2 hover:bg-black/5 dark:hover:bg-white/5 rounded text-text-muted hover:text-primary transition-colors shrink-0",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"ts_url"===eX?"check":"content_copy"})}),(0,a.jsx)("button",{onClick:()=>eO(!0),className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Disable Tailscale",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):!en||em||eo?em||eE?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-border bg-input text-sm text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),eh||"Connecting..."]}),eb&&(0,a.jsx)(r.$n,{size:"sm",icon:"open_in_new",onClick:()=>window.open(eb,"tailscale_auth","width=600,height=700,noopener,noreferrer"),children:ej||"Open"}),(0,a.jsx)("button",{onClick:()=>{ex(!1),eA(!1),ep(""),tl()},className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Stop",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]}):ey?.type==="error"?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-red-300 dark:border-red-800 bg-red-500/5 text-sm text-red-600 dark:text-red-400",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-sm",children:"error"}),ey.message]}),(0,a.jsx)(r.$n,{size:"sm",icon:"vpn_lock",onClick:to,children:"Enable"})]}):(0,a.jsx)(r.$n,{size:"sm",icon:"vpn_lock",onClick:()=>{eG?eg({type:"error",message:`Security required: ${e0}`}):to()},className:"bg-linear-to-r from-indigo-500 to-purple-500 hover:from-indigo-600 hover:to-purple-600 text-white!",children:"Enable"}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex-1 flex items-center gap-2 px-3 py-1.5 rounded border border-amber-300 dark:border-amber-800 bg-amber-500/5 text-sm text-amber-600 dark:text-amber-400",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),eB?"Tailscale reconnecting...":"Tailscale checking..."]}),(0,a.jsx)("button",{onClick:()=>eO(!0),className:"p-2 hover:bg-red-500/10 rounded text-red-500 transition-colors shrink-0",title:"Disable Tailscale",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"power_settings_new"})})]})]})]}),eG&&!M&&!en&&(0,a.jsx)("div",{className:"mt-4",children:(0,a.jsx)(h,{message:e0,action:{label:"Open settings",href:"/dashboard/profile"}})}),(M||en)&&(0,a.jsxs)("div",{className:"mt-4 flex flex-col gap-2",children:[!R&&(0,a.jsx)(h,{message:"Require API key is disabled — your endpoint is publicly accessible without authentication.",action:{label:"Enable",href:"#require-api-key"}}),(!I||!q)&&(0,a.jsx)(h,{message:I?"Dashboard uses the default password — change it in Profile settings.":"Require login is disabled — anyone can access your dashboard via tunnel.",action:{label:I?"Change password":"Enable",href:"/dashboard/profile"}})]}),(M||en)&&(0,a.jsxs)("div",{className:"mt-4 pt-4 border-t border-border flex items-center gap-3",children:[(0,a.jsx)(r.lM,{checked:U,onChange:()=>e4(!U)}),(0,a.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,a.jsx)("p",{className:"font-medium text-sm",children:"Allow dashboard access via tunnel"}),(0,a.jsx)(x,{text:"When enabled, the dashboard can be accessed through your tunnel or Tailscale URL (login still required). When disabled, dashboard access via tunnel/Tailscale is completely blocked."})]})]})]}),(0,a.jsxs)(r.Zp,{id:"require-api-key",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[(0,a.jsxs)("h2",{className:"text-lg font-semibold flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary",children:"vpn_key"}),"API Keys"]}),(0,a.jsx)(r.$n,{icon:"add",onClick:()=>{v(""),C(!0)},children:"Create Key"})]}),(0,a.jsxs)("div",{className:"flex items-center justify-between pb-4 mb-4 border-b border-border",children:[(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"font-medium",children:"Require API key"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Requests without a valid key will be rejected"})]}),(0,a.jsx)(r.lM,{checked:R,onChange:()=>e3(!R)})]}),eQ&&!R&&(0,a.jsx)("div",{className:"mb-4 -mt-2",children:(0,a.jsx)(h,{message:"Endpoint is exposed without an API key."})}),y||j?(0,a.jsxs)("div",{className:"flex items-center gap-2 rounded-lg border border-red-300 dark:border-red-800 bg-red-500/5 px-3 py-2 text-sm text-red-600 dark:text-red-400",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"error"}),y||j]}):null,0===e.length?(0,a.jsxs)("div",{className:"text-center py-12",children:[(0,a.jsx)("div",{className:`inline-flex items-center justify-center w-16 h-16 rounded-full mb-4 ${y?"bg-red-500/10 text-red-500":"bg-primary/10 text-primary"}`,children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[32px]",children:y?"error":"vpn_key"})}),(0,a.jsx)("p",{className:"text-text-main font-medium mb-1",children:y?"Could not load the API keys":"No API keys yet"}),(0,a.jsx)("p",{className:"text-sm text-text-muted mb-4",children:y||"Create your first API key to get started"}),!y&&(0,a.jsx)(r.$n,{icon:"add",onClick:()=>{v(""),C(!0)},children:"Create Key"})]}):(0,a.jsx)("div",{className:"flex flex-col",children:e.map(e=>(0,a.jsxs)("div",{className:`group flex items-start justify-between gap-3 py-3 border-b border-black/[0.03] dark:border-white/[0.03] last:border-b-0 ${!1===e.isActive?"opacity-60":""}`,children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("p",{className:"text-sm font-medium",children:e.name}),(0,a.jsx)("div",{className:"flex items-center gap-2 mt-1 min-w-0 flex-wrap",children:(0,a.jsx)("code",{className:"text-xs text-text-muted font-mono break-all min-w-0",children:e.key})}),(0,a.jsxs)("p",{className:"text-xs text-text-muted mt-1",children:["Created ",new Date(e.createdAt).toLocaleDateString()]}),!1===e.isActive&&(0,a.jsx)("p",{className:"text-xs text-orange-500 mt-1",children:"Paused"}),(0,a.jsx)(g,{apiKey:e,onChange:t=>tm(e.id,t),onRequestRestrict:()=>A({title:"Restrict API Key",message:`Restrict API key "${e.name}"?
2
-
3
- It will only be able to call the combos and models you add. Until you add one, it can call nothing.`,onConfirm:async()=>{A(null),tm(e.id,{restricted:!0,allow:e.access?.allow||[]})}})}),(0,a.jsx)(f,{apiKey:e})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2 shrink-0 pt-0.5",children:[(0,a.jsx)(r.lM,{size:"sm",checked:e.isActive??!0,onChange:t=>{e.isActive&&!t?A({title:"Pause API Key",message:`Pause API key "${e.name}"?
4
-
5
- This key will stop working immediately but can be resumed later.`,onConfirm:async()=>{A(null),tu(e.id,t)}}):tu(e.id,t)},title:e.isActive?"Pause key":"Resume key"}),(0,a.jsx)("button",{onClick:()=>td(e.id),className:"p-2 hover:bg-red-500/10 rounded text-red-500 opacity-100 sm:opacity-0 sm:group-hover:opacity-100 transition-all",children:(0,a.jsx)("span",{className:"material-symbols-outlined text-[18px]",children:"delete"})})]})]},e.id))})]}),(0,a.jsx)(r.aF,{isOpen:N,title:"Create API Key",onClose:()=>{C(!1),P(""),v("")},children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)(r.pd,{label:"Key Name",value:S,onChange:e=>P(e.target.value),placeholder:"Production Key"}),w&&(0,a.jsx)("p",{className:"text-sm text-red-600 dark:text-red-400",children:w}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(r.$n,{onClick:tc,fullWidth:!0,disabled:!S.trim(),children:"Create"}),(0,a.jsx)(r.$n,{onClick:()=>{C(!1),P("")},variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}),(0,a.jsx)(r.aF,{isOpen:!!T,title:"API Key Created",onClose:()=>$(null),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 rounded-lg p-4",children:[(0,a.jsx)("p",{className:"text-sm text-yellow-800 dark:text-yellow-200 mb-2 font-medium",children:"Save this key now!"}),(0,a.jsx)("p",{className:"text-sm text-yellow-700 dark:text-yellow-300",children:"This is the only time you will see this key. Store it securely."})]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(r.pd,{value:T||"",readOnly:!0,className:"flex-1 font-mono text-sm"}),(0,a.jsx)(r.$n,{variant:"secondary",icon:"created_key"===eX?"check":"content_copy",onClick:()=>eZ(T,"created_key"),children:"created_key"===eX?"Copied!":"Copy"})]}),(0,a.jsx)(r.$n,{onClick:()=>$(null),fullWidth:!0,children:"Done"})]})}),(0,a.jsx)(r.aF,{isOpen:es,title:"Enable Tunnel",onClose:()=>ea(!1),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)("div",{className:"bg-surface-2 border border-border-subtle rounded-lg p-4",children:(0,a.jsxs)("div",{className:"flex items-start gap-3",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-primary",children:"cloud_upload"}),(0,a.jsxs)("div",{children:[(0,a.jsx)("p",{className:"text-sm text-text-main font-medium mb-1",children:"Cloudflare Tunnel"}),(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Expose your local OmniHilbras to the internet. No port forwarding, no static IP needed. Share endpoint URL with your team or use it in Cursor, Cline, and other AI tools from anywhere."})]})]})}),(0,a.jsx)("div",{className:"grid grid-cols-2 gap-3",children:i.oX.map(e=>(0,a.jsxs)("div",{className:"flex flex-col items-center text-center p-3 rounded-lg bg-sidebar/50",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-xl text-primary mb-1",children:e.icon}),(0,a.jsx)("p",{className:"text-xs font-semibold",children:e.title}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:e.desc})]},e.title))}),(0,a.jsx)("p",{className:"text-xs text-text-muted",children:"Requires outbound port 7844 (TCP/UDP). Connection may take 10-30s."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(r.$n,{onClick:e7,fullWidth:!0,children:"Start Tunnel"}),(0,a.jsx)(r.$n,{onClick:()=>ea(!1),variant:"ghost",fullWidth:!0,children:"Cancel"})]})]})}),(0,a.jsx)(r.aF,{isOpen:el,title:"Disable Tunnel",onClose:()=>!V&&er(!1),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"The Cloudflare tunnel will be disconnected. Remote access via tunnel URL will stop working."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(r.$n,{onClick:e9,fullWidth:!0,disabled:V,variant:"danger",children:V?"Disabling...":"Disable"}),(0,a.jsx)(r.$n,{onClick:()=>er(!1),variant:"ghost",fullWidth:!0,disabled:V,children:"Cancel"})]})]})}),(0,a.jsx)(r.aF,{isOpen:eR,title:"Tailscale Funnel",onClose:()=>{eN||(e_(!1),e$(""),eg(null))},children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[null===ew&&(0,a.jsxs)("p",{className:"text-sm text-text-muted flex items-center gap-2",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"Checking..."]}),!1===ew&&!eN&&(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Tailscale is not installed. Install it to enable Funnel."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(r.$n,{onClick:tt,fullWidth:!0,children:"Install Tailscale"}),(0,a.jsx)(r.$n,{onClick:()=>e_(!1),variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),eN&&(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-text-muted",children:[(0,a.jsx)("span",{className:"material-symbols-outlined animate-spin text-sm",children:"progress_activity"}),"Installing Tailscale..."]}),eS.length>0&&(0,a.jsx)("div",{ref:eq,className:"bg-black/5 dark:bg-white/5 rounded p-2 max-h-40 overflow-y-auto font-mono text-xs text-text-muted",children:eS.map((e,t)=>(0,a.jsx)("div",{children:e},t))})]}),!0===ew&&!eN&&(0,a.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm text-green-600 dark:text-green-400",children:[(0,a.jsx)("span",{className:"material-symbols-outlined text-[16px]",children:"check_circle"}),"Tailscale installed"]}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(r.$n,{onClick:()=>tr(),fullWidth:!0,children:"Connect"}),(0,a.jsx)(r.$n,{onClick:()=>e_(!1),variant:"ghost",fullWidth:!0,children:"Cancel"})]})]}),ey&&(0,a.jsx)(m,{status:ey})]})}),(0,a.jsx)(r.aF,{isOpen:eI,title:"Disable Tailscale",onClose:()=>!em&&eO(!1),children:(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsx)("p",{className:"text-sm text-text-muted",children:"Tailscale Funnel will be stopped. Remote access via Tailscale URL will stop working."}),(0,a.jsxs)("div",{className:"flex gap-2",children:[(0,a.jsx)(r.$n,{onClick:ti,fullWidth:!0,disabled:em,variant:"danger",children:em?"Disabling...":"Disable"}),(0,a.jsx)(r.$n,{onClick:()=>eO(!1),variant:"ghost",fullWidth:!0,disabled:em,children:"Cancel"})]})]})}),(0,a.jsx)(r.uo,{isOpen:!!E,onClose:()=>A(null),onConfirm:E?.onConfirm,title:E?.title||"Confirm",message:E?.message,variant:"danger"})]})}g.propTypes={apiKey:y().shape({id:y().string.isRequired,name:y().string,access:y().shape({restricted:y().bool,allow:y().arrayOf(y().string)})}).isRequired,onChange:y().func.isRequired,onRequestRestrict:y().func.isRequired},f.propTypes={apiKey:y().shape({id:y().string.isRequired,name:y().string}).isRequired},k.propTypes={apiKey:y().shape({id:y().string.isRequired,name:y().string}).isRequired}},67958:(e,t,s)=>{Promise.resolve().then(s.bind(s,21280))}}]);