@techysy/10router 1.6.4-test.1 → 1.6.5

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 (566) hide show
  1. package/app/.next-cli-build/BUILD_ID +1 -1
  2. package/app/.next-cli-build/app-path-routes-manifest.json +40 -40
  3. package/app/.next-cli-build/build-manifest.json +2 -2
  4. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  5. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  6. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +1 -1
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +1 -1
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/experimental/page.js.nft.json +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/experimental/page_client-reference-manifest.js +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  56. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  57. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  58. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  59. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  60. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  61. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  62. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  63. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  64. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  65. package/app/.next-cli-build/server/app/_not-found.html +2 -2
  66. package/app/.next-cli-build/server/app/_not-found.rsc +6 -6
  67. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +6 -6
  68. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +6 -6
  69. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  70. package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
  71. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  72. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  73. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
  74. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  75. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
  76. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  77. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
  78. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  79. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js +1 -1
  80. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
  81. package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js +1 -3
  82. package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js.nft.json +1 -1
  83. package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js +1 -3
  84. package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js.nft.json +1 -1
  85. package/app/.next-cli-build/server/app/api/auth/saml/start/route.js +1 -3
  86. package/app/.next-cli-build/server/app/api/auth/saml/start/route.js.nft.json +1 -1
  87. package/app/.next-cli-build/server/app/api/auth/saml/test/route.js +1 -3
  88. package/app/.next-cli-build/server/app/api/auth/saml/test/route.js.nft.json +1 -1
  89. package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -3
  90. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  91. package/app/.next-cli-build/server/app/api/auth/verify-password/route.js +1 -1
  92. package/app/.next-cli-build/server/app/api/auth/verify-password/route.js.nft.json +1 -1
  93. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  94. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  95. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  96. package/app/.next-cli-build/server/app/api/cli-tools/claude-profiles/route.js +1 -1
  97. package/app/.next-cli-build/server/app/api/cli-tools/claude-profiles/route.js.nft.json +1 -1
  98. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  99. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  100. package/app/.next-cli-build/server/app/api/cli-tools/codex-profiles/route.js.nft.json +1 -1
  101. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  102. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  103. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  104. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
  105. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  106. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  107. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  108. package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js.nft.json +1 -1
  109. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  110. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
  111. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  112. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  113. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  114. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  115. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  116. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  117. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  118. package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
  119. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  120. package/app/.next-cli-build/server/app/api/external-quota/[source]/route.js +1 -1
  121. package/app/.next-cli-build/server/app/api/external-quota/[source]/route.js.nft.json +1 -1
  122. package/app/.next-cli-build/server/app/api/gateway-probe/route.js.nft.json +1 -1
  123. package/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
  124. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js +1 -1
  125. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
  126. package/app/.next-cli-build/server/app/api/headroom/restart/route.js +1 -1
  127. package/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
  128. package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
  129. package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  130. package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
  131. package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  132. package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  133. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  134. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  135. package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
  136. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  137. package/app/.next-cli-build/server/app/api/keys/rotate/route.js +1 -1
  138. package/app/.next-cli-build/server/app/api/keys/rotate/route.js.nft.json +1 -1
  139. package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
  140. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  141. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  142. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  143. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  144. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
  145. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  146. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  147. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  148. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
  149. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  150. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
  151. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  152. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  153. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  154. package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
  155. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  156. package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
  157. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  158. package/app/.next-cli-build/server/app/api/models/caps/route.js +1 -1
  159. package/app/.next-cli-build/server/app/api/models/caps/route.js.nft.json +1 -1
  160. package/app/.next-cli-build/server/app/api/models/custom/bulk/route.js +1 -1
  161. package/app/.next-cli-build/server/app/api/models/custom/bulk/route.js.nft.json +1 -1
  162. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  163. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  164. package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
  165. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  166. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  167. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  168. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  169. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  170. package/app/.next-cli-build/server/app/api/network/egress-region/route.js.nft.json +1 -1
  171. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  172. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  173. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/route.js +1 -1
  174. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/bulk-import/route.js.nft.json +1 -1
  175. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/checkin/route.js.nft.json +1 -1
  176. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/claim-compensation/route.js.nft.json +1 -1
  177. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/export/route.js +1 -1
  178. package/app/.next-cli-build/server/app/api/oauth/codebuddy-cn/export/route.js.nft.json +1 -1
  179. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  180. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  181. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  182. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  183. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  184. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  185. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  186. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
  187. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  188. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
  189. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  190. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  191. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  192. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  193. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js +1 -1
  194. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  195. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  196. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  197. package/app/.next-cli-build/server/app/api/oauth/loomy/sms-login/route.js +1 -1
  198. package/app/.next-cli-build/server/app/api/oauth/loomy/sms-login/route.js.nft.json +1 -1
  199. package/app/.next-cli-build/server/app/api/oauth/loomy/sms-send/route.js +1 -1
  200. package/app/.next-cli-build/server/app/api/oauth/loomy/sms-send/route.js.nft.json +1 -1
  201. package/app/.next-cli-build/server/app/api/oauth/qoder/checkin/route.js.nft.json +1 -1
  202. package/app/.next-cli-build/server/app/api/oauth/qoder-cn/checkin/route.js.nft.json +1 -1
  203. package/app/.next-cli-build/server/app/api/oauth/transfer/export/route.js +1 -1
  204. package/app/.next-cli-build/server/app/api/oauth/transfer/export/route.js.nft.json +1 -1
  205. package/app/.next-cli-build/server/app/api/oauth/transfer/import/route.js +1 -1
  206. package/app/.next-cli-build/server/app/api/oauth/transfer/import/route.js.nft.json +1 -1
  207. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js +1 -1
  208. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js.nft.json +1 -1
  209. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js +1 -1
  210. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js.nft.json +1 -1
  211. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/desktop-kill/route.js.nft.json +1 -1
  212. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/desktop-status/route.js.nft.json +1 -1
  213. package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js.nft.json +1 -1
  214. package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js +1 -1
  215. package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js.nft.json +1 -1
  216. package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
  217. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  218. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  219. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  220. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
  221. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  222. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  223. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  224. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  225. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  226. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  227. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  228. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  229. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  230. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  231. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  232. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  233. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  234. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  235. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  236. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  237. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  238. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  239. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
  240. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  241. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
  242. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  243. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +1 -1
  244. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  245. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +1 -1
  246. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  247. package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
  248. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  249. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +1 -1
  250. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  251. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
  252. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
  253. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -1
  254. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
  255. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js +1 -1
  256. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
  257. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
  258. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +1 -1
  259. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
  260. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
  261. package/app/.next-cli-build/server/app/api/security/status/route.js +1 -1
  262. package/app/.next-cli-build/server/app/api/security/status/route.js.nft.json +1 -1
  263. package/app/.next-cli-build/server/app/api/settings/database/import-usage/route.js +1 -1
  264. package/app/.next-cli-build/server/app/api/settings/database/import-usage/route.js.nft.json +1 -1
  265. package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
  266. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  267. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  268. package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
  269. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  270. package/app/.next-cli-build/server/app/api/settings/route.js +2 -2
  271. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  272. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  273. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  274. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  275. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  276. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +1 -1
  277. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  278. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  279. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  280. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  281. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  282. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  283. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  284. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  285. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  286. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  287. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  288. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  289. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  290. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  291. package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js +1 -1
  292. package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js.nft.json +1 -1
  293. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  294. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  295. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  296. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  297. package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
  298. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  299. package/app/.next-cli-build/server/app/api/usage/dashboard/route.js +1 -1
  300. package/app/.next-cli-build/server/app/api/usage/dashboard/route.js.nft.json +1 -1
  301. package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
  302. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  303. package/app/.next-cli-build/server/app/api/usage/logs/route.js +1 -1
  304. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  305. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  306. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  307. package/app/.next-cli-build/server/app/api/usage/quotas/route.js +1 -1
  308. package/app/.next-cli-build/server/app/api/usage/quotas/route.js.nft.json +1 -1
  309. package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
  310. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  311. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
  312. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  313. package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
  314. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  315. package/app/.next-cli-build/server/app/api/usage/stream/route.js +1 -1
  316. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  317. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  318. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  319. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  320. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  321. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +1 -1
  322. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  323. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  324. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  325. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  326. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  327. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  328. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  329. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
  330. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  331. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  332. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  333. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  334. package/app/.next-cli-build/server/app/api/v1/models/[kind]/route.js.nft.json +1 -1
  335. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  336. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  337. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  338. package/app/.next-cli-build/server/app/api/v1/rerank/route.js +1 -1
  339. package/app/.next-cli-build/server/app/api/v1/rerank/route.js.nft.json +1 -1
  340. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  341. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  342. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  343. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  344. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  345. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  346. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  347. package/app/.next-cli-build/server/app/api/v1/systemone/route.js +1 -1
  348. package/app/.next-cli-build/server/app/api/v1/systemone/route.js.nft.json +1 -1
  349. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +1 -1
  350. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
  351. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js +1 -1
  352. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
  353. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js +1 -1
  354. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
  355. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js +1 -1
  356. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
  357. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  358. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  359. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  360. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  361. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  362. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  363. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  364. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  365. package/app/.next-cli-build/server/app/api/version/shell-update/route.js.nft.json +1 -1
  366. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  367. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  368. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  369. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  370. package/app/.next-cli-build/server/app/callback.html +2 -2
  371. package/app/.next-cli-build/server/app/callback.rsc +6 -6
  372. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +6 -6
  373. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
  374. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +6 -6
  375. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +2 -2
  376. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +8 -8
  377. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +8 -8
  378. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +8 -8
  379. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
  380. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +2 -2
  381. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +8 -8
  382. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +8 -8
  383. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +8 -8
  384. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
  385. package/app/.next-cli-build/server/app/dashboard/combos.html +2 -2
  386. package/app/.next-cli-build/server/app/dashboard/combos.rsc +8 -8
  387. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +8 -8
  388. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +8 -8
  389. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
  390. package/app/.next-cli-build/server/app/dashboard/endpoint.html +2 -2
  391. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +8 -8
  392. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +8 -8
  393. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +8 -8
  394. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
  395. package/app/.next-cli-build/server/app/dashboard/experimental.html +2 -2
  396. package/app/.next-cli-build/server/app/dashboard/experimental.rsc +8 -8
  397. package/app/.next-cli-build/server/app/dashboard/experimental.segments/!KGRhc2hib2FyZCk/dashboard/experimental/__PAGE__.segment.rsc +8 -8
  398. package/app/.next-cli-build/server/app/dashboard/experimental.segments/_full.segment.rsc +8 -8
  399. package/app/.next-cli-build/server/app/dashboard/experimental.segments/_tree.segment.rsc +2 -2
  400. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +2 -2
  401. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +8 -8
  402. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +8 -8
  403. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +8 -8
  404. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
  405. package/app/.next-cli-build/server/app/dashboard/mitm.html +2 -2
  406. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +8 -8
  407. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +8 -8
  408. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +8 -8
  409. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
  410. package/app/.next-cli-build/server/app/dashboard/profile.html +2 -2
  411. package/app/.next-cli-build/server/app/dashboard/profile.rsc +8 -8
  412. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +8 -8
  413. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +8 -8
  414. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
  415. package/app/.next-cli-build/server/app/dashboard/providers/new.html +2 -2
  416. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +8 -8
  417. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +8 -8
  418. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +8 -8
  419. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
  420. package/app/.next-cli-build/server/app/dashboard/providers.html +2 -2
  421. package/app/.next-cli-build/server/app/dashboard/providers.rsc +8 -8
  422. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +8 -8
  423. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +8 -8
  424. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
  425. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +2 -2
  426. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +8 -8
  427. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +8 -8
  428. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +8 -8
  429. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
  430. package/app/.next-cli-build/server/app/dashboard/pxpipe.html +2 -2
  431. package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +8 -8
  432. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +8 -8
  433. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +8 -8
  434. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +2 -2
  435. package/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
  436. package/app/.next-cli-build/server/app/dashboard/quota.rsc +9 -9
  437. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +9 -9
  438. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +9 -9
  439. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
  440. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  441. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  442. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +2 -2
  443. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +6 -6
  444. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +6 -6
  445. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
  446. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +6 -6
  447. package/app/.next-cli-build/server/app/dashboard/skills.html +2 -2
  448. package/app/.next-cli-build/server/app/dashboard/skills.rsc +8 -8
  449. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +8 -8
  450. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +8 -8
  451. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +2 -2
  452. package/app/.next-cli-build/server/app/dashboard/token-saver.html +2 -2
  453. package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +8 -8
  454. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +8 -8
  455. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +8 -8
  456. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +2 -2
  457. package/app/.next-cli-build/server/app/dashboard/translator.html +2 -2
  458. package/app/.next-cli-build/server/app/dashboard/translator.rsc +8 -8
  459. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +8 -8
  460. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +8 -8
  461. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
  462. package/app/.next-cli-build/server/app/dashboard/usage.html +2 -2
  463. package/app/.next-cli-build/server/app/dashboard/usage.rsc +8 -8
  464. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +8 -8
  465. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +8 -8
  466. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
  467. package/app/.next-cli-build/server/app/dashboard.html +2 -2
  468. package/app/.next-cli-build/server/app/dashboard.rsc +8 -8
  469. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +8 -8
  470. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +8 -8
  471. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +2 -2
  472. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  473. package/app/.next-cli-build/server/app/index.html +1 -1
  474. package/app/.next-cli-build/server/app/index.rsc +6 -6
  475. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +6 -6
  476. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +6 -6
  477. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
  478. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  479. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  480. package/app/.next-cli-build/server/app/landing.html +2 -2
  481. package/app/.next-cli-build/server/app/landing.rsc +6 -6
  482. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +6 -6
  483. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
  484. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +6 -6
  485. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  486. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  487. package/app/.next-cli-build/server/app/login.html +2 -2
  488. package/app/.next-cli-build/server/app/login.rsc +7 -7
  489. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +7 -7
  490. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
  491. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +7 -7
  492. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  493. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  494. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  495. package/app/.next-cli-build/server/app-paths-manifest.json +40 -40
  496. package/app/.next-cli-build/server/chunks/1310.js +9 -0
  497. package/app/.next-cli-build/server/chunks/1806.js +1 -1
  498. package/app/.next-cli-build/server/chunks/1819.js +1 -1
  499. package/app/.next-cli-build/server/chunks/2154.js +1 -0
  500. package/app/.next-cli-build/server/chunks/3662.js +1 -1
  501. package/app/.next-cli-build/server/chunks/3771.js +1 -1
  502. package/app/.next-cli-build/server/chunks/3792.js +1 -1
  503. package/app/.next-cli-build/server/chunks/3943.js +1 -1
  504. package/app/.next-cli-build/server/chunks/3962.js +1 -1
  505. package/app/.next-cli-build/server/chunks/4123.js +1 -1
  506. package/app/.next-cli-build/server/chunks/471.js +2 -0
  507. package/app/.next-cli-build/server/chunks/4859.js +6 -0
  508. package/app/.next-cli-build/server/chunks/4906.js +1 -1
  509. package/app/.next-cli-build/server/chunks/4927.js +1 -1
  510. package/app/.next-cli-build/server/chunks/5210.js +4 -4
  511. package/app/.next-cli-build/server/chunks/5527.js +1 -1
  512. package/app/.next-cli-build/server/chunks/5615.js +1 -1
  513. package/app/.next-cli-build/server/chunks/5757.js +1 -1
  514. package/app/.next-cli-build/server/chunks/5781.js +1 -1
  515. package/app/.next-cli-build/server/chunks/5787.js +9 -0
  516. package/app/.next-cli-build/server/chunks/5837.js +1 -1
  517. package/app/.next-cli-build/server/chunks/594.js +1 -0
  518. package/app/.next-cli-build/server/chunks/6212.js +1 -1
  519. package/app/.next-cli-build/server/chunks/6922.js +1 -1
  520. package/app/.next-cli-build/server/chunks/6960.js +1 -1
  521. package/app/.next-cli-build/server/chunks/7067.js +1 -1
  522. package/app/.next-cli-build/server/chunks/7274.js +1 -1
  523. package/app/.next-cli-build/server/chunks/8145.js +1 -1
  524. package/app/.next-cli-build/server/chunks/8172.js +1 -1
  525. package/app/.next-cli-build/server/chunks/8185.js +1 -0
  526. package/app/.next-cli-build/server/chunks/8318.js +1 -1
  527. package/app/.next-cli-build/server/chunks/8370.js +7 -7
  528. package/app/.next-cli-build/server/chunks/8410.js +1 -1
  529. package/app/.next-cli-build/server/chunks/8595.js +1 -1
  530. package/app/.next-cli-build/server/chunks/8658.js +1 -1
  531. package/app/.next-cli-build/server/chunks/8775.js +1 -1
  532. package/app/.next-cli-build/server/chunks/8895.js +4 -4
  533. package/app/.next-cli-build/server/chunks/8937.js +3 -0
  534. package/app/.next-cli-build/server/chunks/922.js +9 -0
  535. package/app/.next-cli-build/server/chunks/9377.js +1 -0
  536. package/app/.next-cli-build/server/chunks/9489.js +1 -1
  537. package/app/.next-cli-build/server/chunks/9781.js +1 -0
  538. package/app/.next-cli-build/server/instrumentation.js.nft.json +1 -1
  539. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  540. package/app/.next-cli-build/server/middleware.js +5 -5
  541. package/app/.next-cli-build/server/middleware.js.nft.json +1 -1
  542. package/app/.next-cli-build/server/pages/404.html +2 -2
  543. package/app/.next-cli-build/server/pages/500.html +1 -1
  544. package/app/.next-cli-build/static/chunks/1321-b8be93bbd911ff4d.js +1 -0
  545. package/app/.next-cli-build/static/chunks/{5497-100281ed6ce1f83b.js → 5497-f6d548a4a9538453.js} +1 -1
  546. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/{page-a2f5c1fa12df475b.js → page-7c4e389aed972469.js} +1 -1
  547. package/app/.next-cli-build/static/css/{63c4d9ca82aea954.css → 02a46e8ee21b7aaa.css} +1 -1
  548. package/app/package.json +71 -71
  549. package/app/public/i18n/changelog/en.md +4 -0
  550. package/app/public/i18n/changelog/zh-CN.md +4 -0
  551. package/app/public/i18n/changelog/zh-TW.md +4 -0
  552. package/app/public/i18n/literals/zh-CN.json +2 -0
  553. package/app/public/i18n/literals/zh-TW.json +2 -0
  554. package/package.json +1 -1
  555. package/app/.next-cli-build/server/chunks/1386.js +0 -9
  556. package/app/.next-cli-build/server/chunks/1622.js +0 -1
  557. package/app/.next-cli-build/server/chunks/2812.js +0 -2
  558. package/app/.next-cli-build/server/chunks/3389.js +0 -1
  559. package/app/.next-cli-build/server/chunks/4692.js +0 -6
  560. package/app/.next-cli-build/server/chunks/7209.js +0 -1
  561. package/app/.next-cli-build/server/chunks/8439.js +0 -1
  562. package/app/.next-cli-build/server/chunks/9451.js +0 -9
  563. package/app/.next-cli-build/server/chunks/976.js +0 -9
  564. package/app/.next-cli-build/static/chunks/1321-25956f9bfbc2e6da.js +0 -1
  565. /package/app/.next-cli-build/static/{ilH6FH_DABFzbJ122SgT6 → pP6WDLpkLVAa29nFOm7Ly}/_buildManifest.js +0 -0
  566. /package/app/.next-cli-build/static/{ilH6FH_DABFzbJ122SgT6 → pP6WDLpkLVAa29nFOm7Ly}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- "use strict";exports.id=4906,exports.ids=[4755,4906,8775],exports.modules={19225:(a,b,c)=>{a.exports=c(44870)},20669:(a,b,c)=>{c.d(b,{g:()=>w,s:()=>x});var d=c(75837),e=c(89718),f=c(38775),g=c(43659),h=c(41004),i=c(8590),j=c(26070);let k=Number(process.env.VIDEO_FETCH_TIMEOUT_MS||12e4),l=new Set(["generations","edits","extensions"]);function m(a){let b=j.B$[a]?.videoConfig||null;return b?.baseUrl?b:null}function n(a,b=null){if(!a)return a;let c=String(a).replace(/Bearer\s+[A-Za-z0-9._~+/=-]{8,}/gi,"Bearer [redacted]");for(let a of["accessToken","refreshToken","apiKey"]){let d=b?.[a];"string"==typeof d&&d.length>=8&&(c=c.split(d).join("[redacted]"))}return c}async function o({provider:a,action:b=null,requestId:c=null,rawBody:d=null,contentType:e=null,idempotencyKey:f=null,credentials:j,signal:p,timeoutMs:q=k,log:r,onCredentialsRefreshed:s,onCredentialsRefreshFailed:t}){let u,v,w,x=m(a);if(!x)return(0,g.A1)(h.gx.BAD_REQUEST,`Provider '${a}' does not support video generation`);if(!c&&!l.has(b))return(0,g.A1)(h.gx.BAD_REQUEST,`Unknown video action: ${b}`);let y=c?"GET":"POST",z=(v=x.baseUrl.replace(/\/$/,""),c?`${v}/${encodeURIComponent(c)}`:`${v}/${b}`),A=(w="function"==typeof AbortSignal?.timeout?AbortSignal.timeout(q):null,p&&w&&"function"==typeof AbortSignal.any?AbortSignal.any([p,w]):p||w||void 0),B=a=>fetch(z,{method:y,headers:function({token:a,contentType:b,idempotencyKey:c}){let d={Accept:"application/json"};return a&&(d.Authorization=`Bearer ${a}`),b&&(d["Content-Type"]=b),c&&(d["Idempotency-Key"]=c),d}({token:a,contentType:"POST"===y?e:null,idempotencyKey:"POST"===y?f:null}),body:"POST"===y?d:void 0,signal:A});try{u=await B(j?.accessToken||j?.apiKey)}catch(b){if(b?.name==="AbortError"||b?.name==="TimeoutError")return(0,g.A1)(h.gx.REQUEST_TIMEOUT,`[${a}] video ${y} aborted: ${b.message}`);return(0,g.A1)(h.gx.BAD_GATEWAY,n(`[${a}] video upstream fetch failed: ${b.message}`,j))}if((u.status===h.gx.UNAUTHORIZED||u.status===h.gx.FORBIDDEN)&&j?.refreshToken){let b=null;try{b=await (0,i.$B)(a,j,r)}catch(b){r?.warn?.("TOKEN",`${a} | video refresh error: ${n(b.message,j)}`)}if(b?.accessToken){r?.info?.("TOKEN",`${a.toUpperCase()} | refreshed for video ${y}`),Object.assign(j,b),s&&await s(b);try{await u.body?.cancel?.()}catch{}try{u=await B(j.accessToken||j.apiKey)}catch(b){return(0,g.A1)(h.gx.BAD_GATEWAY,n(`[${a}] video retry after refresh failed: ${b.message}`,j))}}else r?.warn?.("TOKEN",`${a.toUpperCase()} | video refresh failed — account needs re-auth`),await (0,i.Vf)(b,t,r)}let C=await u.text().catch(()=>"");if(!u.ok){let b=n(C||`HTTP ${u.status}`,j);return(0,g.A1)(u.status,`[${a}] ${b.slice(0,2e3)}`)}return{success:!0,response:new Response(C,{status:u.status,headers:{"Content-Type":u.headers.get("content-type")||"application/json","Access-Control-Allow-Origin":"*"}})}}var p=c(67828),q=c(7803);let r=new Set([h.gx.UNAUTHORIZED,h.gx.FORBIDDEN,h.gx.RATE_LIMITED]);async function s(a){let b=(0,d.Tr)(a);if((await (0,e.getSettings)()).requireApiKey){if(!b)return(0,g.yj)(h.gx.UNAUTHORIZED,"Missing API key");if(!await (0,d.kI)(b))return(0,g.yj)(h.gx.UNAUTHORIZED,"Invalid API key")}let c=await (0,d.uO)(b,{request:a});return c||null}async function t(a){let b=a.headers.get("content-type")||"";if(b.includes("application/json")){let c,d=await a.text();try{c=JSON.parse(d)}catch{return{error:(0,g.yj)(h.gx.BAD_REQUEST,"Invalid JSON body")}}return{raw:d,parsed:c,contentType:b}}return{raw:Buffer.from(await a.arrayBuffer()),parsed:null,contentType:b}}async function u(a){if(!a?.model)return{provider:"xai",model:null};let b=String(a.model),c=await (0,f.mA)(b);return c.provider?m(c.provider)?{provider:c.provider,model:c.model}:b.includes("/")?{error:(0,g.yj)(h.gx.BAD_REQUEST,`Provider '${c.provider}' does not support video generation`)}:{provider:"xai",model:b}:{error:(0,g.yj)(h.gx.BAD_REQUEST,"Combos are not supported for video generation")}}function v(a,b){if(!b)return a;let c=new Headers(a.headers);return c.set("x-10router-connection-id",String(b)),new Response(a.body,{status:a.status,headers:c})}async function w(a,b){let c=await s(a);if(c)return c;let e=await t(a);if(e.error)return e.error;let f=await u(e.parsed);if(f.error)return f.error;let{provider:i,model:j}=f,k=e.raw;e.parsed&&j&&e.parsed.model!==j&&(k=JSON.stringify({...e.parsed,model:j}));let l=a.headers.get("x-connection-id")||null,m=a.headers.get("idempotency-key")||null,w=new Set,x=null,y=null;for(;;){let c=await (0,d.c1)(i,w,j,{preferredConnectionId:l});if(!c||c.allRateLimited){if(c?.allRateLimited){let a=x||c.lastError||"Unavailable",b=y||Number(c.lastErrorCode)||h.gx.SERVICE_UNAVAILABLE;return(0,g.wO)(b,`[${i}/${j||"video"}] ${a}`,c.retryAfter,c.retryAfterHuman)}if(0===w.size)return(0,g.yj)(h.gx.BAD_REQUEST,`No credentials for provider: ${i}`);return(0,g.yj)(y||h.gx.SERVICE_UNAVAILABLE,x||"All accounts unavailable")}let f=await (0,p.checkAndRefreshToken)(i,c),s=await o({provider:i,action:b,rawBody:k,contentType:e.contentType||null,idempotencyKey:m,credentials:f,signal:a.signal,log:q,onCredentialsRefreshed:async a=>{await (0,p.Xg)(c.connectionId,a,{providerSpecificData:c.providerSpecificData,provider:i,log:q})},onCredentialsRefreshFailed:async a=>{await (0,p.Ug)(c.connectionId,{provider:i,reason:a,log:q})}});if(s.success)return await (0,d.Pt)(c.connectionId,c,j),q.info("VIDEO",`${i.toUpperCase()} | ${b} accepted (connection ${c.connectionId})`),v(s.response,c.connectionId);let{shouldFallback:t}=await (0,d.vk)(c.connectionId,s.status,n(s.error,f),i,j);if(t&&r.has(s.status)){w.add(c.connectionId),x=s.error,y=s.status;continue}return s.response}}async function x(a,b){let c=await s(a);if(c)return c;if(!b)return(0,g.yj)(h.gx.BAD_REQUEST,"Missing video request id");let e=a.headers.get("x-connection-id")||null,f=await (0,d.c1)("xai",null,null,{preferredConnectionId:e});if(!f||f.allRateLimited)return(0,g.yj)(h.gx.BAD_REQUEST,"No credentials for provider: xai");let i=await (0,p.checkAndRefreshToken)("xai",f),j=await o({provider:"xai",requestId:b,credentials:i,signal:a.signal,log:q,onCredentialsRefreshed:async a=>{await (0,p.Xg)(f.connectionId,a,{providerSpecificData:f.providerSpecificData,provider:"xai",log:q})},onCredentialsRefreshFailed:async a=>{await (0,p.Ug)(f.connectionId,{provider:"xai",reason:a,log:q})}});return j.success?(await (0,d.Pt)(f.connectionId,f,null),v(j.response,f.connectionId)):(await (0,d.vk)(f.connectionId,j.status,n(j.error,i),"xai",null),j.response)}},38775:(a,b,c)=>{c.d(b,{getComboModels:()=>j,mA:()=>i});var d=c(89718),e=c(40669),f=c(13771);let g={xmtp:"xiaomi-tokenplan","xiaomi-tokenplan":"xiaomi-tokenplan"},h=new Set(Object.keys(g));for(let a of f.default)for(let b of(h.add(a.id),a.alias&&h.add(a.alias),a.aliases||[]))h.add(b);async function i(a,{inferFallback:b=!0}={}){let c,f=(c=(0,e.Xh)(a),c?.providerAlias&&g[c.providerAlias]?{...c,provider:g[c.providerAlias]}:c);if(!f.isAlias){if(!h.has(f.providerAlias)){let a=(await (0,d.Fh)({type:"openai-compatible"})).find(a=>a.prefix===f.providerAlias);if(a)return{provider:a.id,model:f.model};let b=(await (0,d.Fh)({type:"anthropic-compatible"})).find(a=>a.prefix===f.providerAlias);if(b)return{provider:b.id,model:f.model};let c=(await (0,d.Fh)({type:"custom-embedding"})).find(a=>a.prefix===f.providerAlias);if(c)return{provider:c.id,model:f.model}}return{provider:f.provider,model:f.model}}if(await (0,d.Dj)(f.model))return{provider:null,model:f.model};let j=await (0,e.XO)(a,d.OM);return j||((0,e.hb)(f.model)?{provider:"codex",model:f.model}:b?(0,e.js)(a,d.OM):{provider:null,model:f.model})}async function j(a){if(a.includes("/"))return null;let b=await (0,d.Dj)(a);return b&&b.models&&b.models.length>0?b.models:null}},40669:(a,b,c)=>{c.d(b,{XO:()=>i,Xh:()=>g,hb:()=>l,js:()=>j});var d=c(13771);let e={el:"elevenlabs",jina:"jina-ai","jina-ai":"jina-ai",polly:"aws-polly","aws-polly":"aws-polly"};for(let a of d.default)for(let b of(e[a.id]=a.id,a.alias&&(e[a.alias]=a.id),a.aliases||[]))e[b]=a.id;let f={"grok-build":"gcli/grok-build"};function g(a){if(!a)return{provider:null,model:null,isAlias:!1,providerAlias:null};if(a.includes("/")){let b=a.indexOf("/"),c=a.slice(0,b),d=a.slice(b+1);return{provider:e[c]||c,model:d,isAlias:!1,providerAlias:c}}return{provider:null,model:a,isAlias:!0,providerAlias:null}}function h(a,b){var c,d;if(!b)return null;let f=b[a];if(!f)return null;if("string"==typeof f&&f.includes("/")){let a=f.indexOf("/");return{provider:e[c=f.slice(0,a)]||c,model:f.slice(a+1)}}return"object"==typeof f&&f.provider&&f.model?{provider:e[d=f.provider]||d,model:f.model}:null}async function i(a,b){let c=g(a);if(!c.isAlias)return null;let d="function"==typeof b?await b():b;return h(c.model,d)||h(c.model,f)||null}async function j(a,b){let c=g(a);if(!c.isAlias)return{provider:c.provider,model:c.model};let d=await i(a,b);return d||{provider:function(a){if(!a)return"openai";let b=a.toLowerCase();return m.find(([a])=>a.test(b))?.[1]||"openai"}(c.model),model:c.model}}let k=[/^gpt-[56]\./,/^gpt-6-/,/^gpt-daybreak-/,/^gpt-reserve/];function l(a){if(!a)return!1;let b=a.toLowerCase();return k.some(a=>a.test(b))}let m=[...k.map(a=>[a,"codex"]),[/^claude-/,"anthropic"],[/^gemini-/,"gemini"],[/^gpt-/,"openai"],[/^o[134]/,"openai"],[/^deepseek-/,"openrouter"]]},50122:(a,b,c)=>{c.d(b,{k:()=>e});let d=[];for(let a=0;a<256;++a)d.push((a+256).toString(16).slice(1));function e(a,b=0){return(d[a[b+0]]+d[a[b+1]]+d[a[b+2]]+d[a[b+3]]+"-"+d[a[b+4]]+d[a[b+5]]+"-"+d[a[b+6]]+d[a[b+7]]+"-"+d[a[b+8]]+d[a[b+9]]+"-"+d[a[b+10]]+d[a[b+11]]+d[a[b+12]]+d[a[b+13]]+d[a[b+14]]+d[a[b+15]]).toLowerCase()}},85081:(a,b,c)=>{c.d(b,{Ay:()=>j});var d=c(77598);let e=function(a){return Array.isArray(a)?a=Buffer.from(a):"string"==typeof a&&(a=Buffer.from(a,"utf8")),(0,d.createHash)("sha1").update(a).digest()},f=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i,g=function(a){let b;if(!("string"==typeof a&&f.test(a)))throw TypeError("Invalid UUID");return Uint8Array.of((b=parseInt(a.slice(0,8),16))>>>24,b>>>16&255,b>>>8&255,255&b,(b=parseInt(a.slice(9,13),16))>>>8,255&b,(b=parseInt(a.slice(14,18),16))>>>8,255&b,(b=parseInt(a.slice(19,23),16))>>>8,255&b,(b=parseInt(a.slice(24,36),16))/0x10000000000&255,b/0x100000000&255,b>>>24&255,b>>>16&255,b>>>8&255,255&b)};var h=c(50122);function i(a,b,c,d){var f=b,i=d;let j="string"==typeof a?function(a){let b=new Uint8Array((a=unescape(encodeURIComponent(a))).length);for(let c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b}(a):a,k="string"==typeof f?g(f):f;if("string"==typeof f&&(f=g(f)),f?.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let l=new Uint8Array(16+j.length);if(l.set(k),l.set(j,k.length),(l=e(l))[6]=15&l[6]|80,l[8]=63&l[8]|128,c){if((i=i||0)<0||i+16>c.length)throw RangeError(`UUID byte range ${i}:${i+15} is out of buffer bounds`);for(let a=0;a<16;++a)c[i+a]=l[a];return c}return(0,h.k)(l)}i.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",i.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8";let j=i},92280:(a,b,c)=>{Object.defineProperty(b,"I",{enumerable:!0,get:function(){return g}});let d=c(28208),e=c(47617),f=c(62018);async function g(a,b,c,g){if((0,d.isNodeNextResponse)(b)){var h;b.statusCode=c.status,b.statusMessage=c.statusText;let d=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(h=c.headers)||h.forEach((a,c)=>{if("x-middleware-set-cookie"!==c.toLowerCase())if("set-cookie"===c.toLowerCase())for(let d of(0,f.splitCookiesString)(a))b.appendHeader(c,d);else{let e=void 0!==b.getHeader(c);(d.includes(c.toLowerCase())||!e)&&b.appendHeader(c,a)}});let{originalResponse:i}=b;c.body&&"HEAD"!==a.method?await (0,e.pipeToNodeResponse)(c.body,i,g):i.end()}}},94755:(a,b,c)=>{c.d(b,{A:()=>i});var d=c(77598);let e={randomUUID:d.randomUUID},f=new Uint8Array(256),g=f.length;var h=c(50122);let i=function(a,b,c){if(e.randomUUID&&!b&&!a)return e.randomUUID();var i=a,j=c;let k=(i=i||{}).random??i.rng?.()??(g>f.length-16&&((0,d.randomFillSync)(f),g=0),f.slice(g,g+=16));if(k.length<16)throw Error("Random bytes length must be >= 16");if(k[6]=15&k[6]|64,k[8]=63&k[8]|128,b){if((j=j||0)<0||j+16>b.length)throw RangeError(`UUID byte range ${j}:${j+15} is out of buffer bounds`);for(let a=0;a<16;++a)b[j+a]=k[a];return b}return(0,h.k)(k)}}};
1
+ "use strict";exports.id=4906,exports.ids=[4755,4906,8775],exports.modules={19225:(a,b,c)=>{a.exports=c(44870)},20669:(a,b,c)=>{c.d(b,{g:()=>w,s:()=>x});var d=c(75837),e=c(89718),f=c(38775),g=c(43659),h=c(41004),i=c(8590),j=c(26070);let k=Number(process.env.VIDEO_FETCH_TIMEOUT_MS||12e4),l=new Set(["generations","edits","extensions"]);function m(a){let b=j.B$[a]?.videoConfig||null;return b?.baseUrl?b:null}function n(a,b=null){if(!a)return a;let c=String(a).replace(/Bearer\s+[A-Za-z0-9._~+/=-]{8,}/gi,"Bearer [redacted]");for(let a of["accessToken","refreshToken","apiKey"]){let d=b?.[a];"string"==typeof d&&d.length>=8&&(c=c.split(d).join("[redacted]"))}return c}async function o({provider:a,action:b=null,requestId:c=null,rawBody:d=null,contentType:e=null,idempotencyKey:f=null,credentials:j,signal:p,timeoutMs:q=k,log:r,onCredentialsRefreshed:s,onCredentialsRefreshFailed:t}){let u,v,w,x=m(a);if(!x)return(0,g.A1)(h.gx.BAD_REQUEST,`Provider '${a}' does not support video generation`);if(!c&&!l.has(b))return(0,g.A1)(h.gx.BAD_REQUEST,`Unknown video action: ${b}`);let y=c?"GET":"POST",z=(v=x.baseUrl.replace(/\/$/,""),c?`${v}/${encodeURIComponent(c)}`:`${v}/${b}`),A=(w="function"==typeof AbortSignal?.timeout?AbortSignal.timeout(q):null,p&&w&&"function"==typeof AbortSignal.any?AbortSignal.any([p,w]):p||w||void 0),B=a=>fetch(z,{method:y,headers:function({token:a,contentType:b,idempotencyKey:c}){let d={Accept:"application/json"};return a&&(d.Authorization=`Bearer ${a}`),b&&(d["Content-Type"]=b),c&&(d["Idempotency-Key"]=c),d}({token:a,contentType:"POST"===y?e:null,idempotencyKey:"POST"===y?f:null}),body:"POST"===y?d:void 0,signal:A});try{u=await B(j?.accessToken||j?.apiKey)}catch(b){if(b?.name==="AbortError"||b?.name==="TimeoutError")return(0,g.A1)(h.gx.REQUEST_TIMEOUT,`[${a}] video ${y} aborted: ${b.message}`);return(0,g.A1)(h.gx.BAD_GATEWAY,n(`[${a}] video upstream fetch failed: ${b.message}`,j))}if((u.status===h.gx.UNAUTHORIZED||u.status===h.gx.FORBIDDEN)&&j?.refreshToken){let b=null;try{b=await (0,i.$B)(a,j,r)}catch(b){r?.warn?.("TOKEN",`${a} | video refresh error: ${n(b.message,j)}`)}if(b?.accessToken){r?.info?.("TOKEN",`${a.toUpperCase()} | refreshed for video ${y}`),Object.assign(j,b),s&&await s(b);try{await u.body?.cancel?.()}catch{}try{u=await B(j.accessToken||j.apiKey)}catch(b){return(0,g.A1)(h.gx.BAD_GATEWAY,n(`[${a}] video retry after refresh failed: ${b.message}`,j))}}else r?.warn?.("TOKEN",`${a.toUpperCase()} | video refresh failed — account needs re-auth`),await (0,i.Vf)(b,t,r)}let C=await u.text().catch(()=>"");if(!u.ok){let b=n(C||`HTTP ${u.status}`,j);return(0,g.A1)(u.status,`[${a}] ${b.slice(0,2e3)}`)}return{success:!0,response:new Response(C,{status:u.status,headers:{"Content-Type":u.headers.get("content-type")||"application/json","Access-Control-Allow-Origin":"*"}})}}var p=c(67828),q=c(7803);let r=new Set([h.gx.UNAUTHORIZED,h.gx.FORBIDDEN,h.gx.RATE_LIMITED]);async function s(a){let b=(0,d.Tr)(a);if((await (0,e.getSettings)()).requireApiKey){if(!b)return(0,g.yj)(h.gx.UNAUTHORIZED,"Missing API key");if(!await (0,d.kI)(b))return(0,g.yj)(h.gx.UNAUTHORIZED,"Invalid API key")}let c=await (0,d.uO)(b,{request:a});return c||null}async function t(a){let b=a.headers.get("content-type")||"";if(b.includes("application/json")){let c,d=await a.text();try{c=JSON.parse(d)}catch{return{error:(0,g.yj)(h.gx.BAD_REQUEST,"Invalid JSON body")}}return{raw:d,parsed:c,contentType:b}}return{raw:Buffer.from(await a.arrayBuffer()),parsed:null,contentType:b}}async function u(a){if(!a?.model)return{provider:"xai",model:null};let b=String(a.model),c=await (0,f.mA)(b);return c.provider?m(c.provider)?{provider:c.provider,model:c.model}:b.includes("/")?{error:(0,g.yj)(h.gx.BAD_REQUEST,`Provider '${c.provider}' does not support video generation`)}:{provider:"xai",model:b}:{error:(0,g.yj)(h.gx.BAD_REQUEST,"Combos are not supported for video generation")}}function v(a,b){if(!b)return a;let c=new Headers(a.headers);return c.set("x-10router-connection-id",String(b)),new Response(a.body,{status:a.status,headers:c})}async function w(a,b){let c=await s(a);if(c)return c;let e=await t(a);if(e.error)return e.error;let f=await u(e.parsed);if(f.error)return f.error;let{provider:i,model:j}=f,k=e.raw;e.parsed&&j&&e.parsed.model!==j&&(k=JSON.stringify({...e.parsed,model:j}));let l=a.headers.get("x-connection-id")||null,m=a.headers.get("idempotency-key")||null,w=new Set,x=null,y=null;for(;;){let c=await (0,d.c1)(i,w,j,{preferredConnectionId:l});if(!c||c.allRateLimited){if(c?.allRateLimited){let a=x||c.lastError||"Unavailable",b=y||Number(c.lastErrorCode)||h.gx.SERVICE_UNAVAILABLE;return(0,g.wO)(b,`[${i}/${j||"video"}] ${a}`,c.retryAfter,c.retryAfterHuman)}if(0===w.size)return(0,g.yj)(h.gx.BAD_REQUEST,`No credentials for provider: ${i}`);return(0,g.yj)(y||h.gx.SERVICE_UNAVAILABLE,x||"All accounts unavailable")}let f=await (0,p.checkAndRefreshToken)(i,c),s=await o({provider:i,action:b,rawBody:k,contentType:e.contentType||null,idempotencyKey:m,credentials:f,signal:a.signal,log:q,onCredentialsRefreshed:async a=>{await (0,p.Xg)(c.connectionId,a,{providerSpecificData:c.providerSpecificData,provider:i,log:q})},onCredentialsRefreshFailed:async a=>{await (0,p.Ug)(c.connectionId,{provider:i,reason:a,log:q})}});if(s.success)return await (0,d.Pt)(c.connectionId,c,j),q.info("VIDEO",`${i.toUpperCase()} | ${b} accepted (connection ${c.connectionId})`),v(s.response,c.connectionId);let{shouldFallback:t}=await (0,d.vk)(c.connectionId,s.status,n(s.error,f),i,j);if(t&&r.has(s.status)){w.add(c.connectionId),x=s.error,y=s.status;continue}return s.response}}async function x(a,b){let c=await s(a);if(c)return c;if(!b)return(0,g.yj)(h.gx.BAD_REQUEST,"Missing video request id");let e=a.headers.get("x-connection-id")||null,f=await (0,d.c1)("xai",null,null,{preferredConnectionId:e});if(!f||f.allRateLimited)return(0,g.yj)(h.gx.BAD_REQUEST,"No credentials for provider: xai");let i=await (0,p.checkAndRefreshToken)("xai",f),j=await o({provider:"xai",requestId:b,credentials:i,signal:a.signal,log:q,onCredentialsRefreshed:async a=>{await (0,p.Xg)(f.connectionId,a,{providerSpecificData:f.providerSpecificData,provider:"xai",log:q})},onCredentialsRefreshFailed:async a=>{await (0,p.Ug)(f.connectionId,{provider:"xai",reason:a,log:q})}});return j.success?(await (0,d.Pt)(f.connectionId,f,null),v(j.response,f.connectionId)):(await (0,d.vk)(f.connectionId,j.status,n(j.error,i),"xai",null),j.response)}},38775:(a,b,c)=>{c.d(b,{getComboModels:()=>k,mA:()=>j});var d=c(89718),e=c(40669),f=c(92812),g=c(13771);let h={xmtp:"xiaomi-tokenplan","xiaomi-tokenplan":"xiaomi-tokenplan"},i=new Set(Object.keys(h));for(let a of g.default)for(let b of(i.add(a.id),a.alias&&i.add(a.alias),a.aliases||[]))i.add(b);async function j(a,{inferFallback:b=!0}={}){let c,f=(c=(0,e.Xh)(a),c?.providerAlias&&h[c.providerAlias]?{...c,provider:h[c.providerAlias]}:c);if(!f.isAlias){if(!i.has(f.providerAlias)){let a=(await (0,d.Fh)({type:"openai-compatible"})).find(a=>a.prefix===f.providerAlias);if(a)return{provider:a.id,model:f.model};let b=(await (0,d.Fh)({type:"anthropic-compatible"})).find(a=>a.prefix===f.providerAlias);if(b)return{provider:b.id,model:f.model};let c=(await (0,d.Fh)({type:"custom-embedding"})).find(a=>a.prefix===f.providerAlias);if(c)return{provider:c.id,model:f.model}}return{provider:f.provider,model:f.model}}if(await (0,d.Dj)(f.model))return{provider:null,model:f.model};let g=await (0,e.XO)(a,d.OM);return g||((0,e.hb)(f.model)?{provider:"codex",model:f.model}:b?(0,e.js)(a,d.OM):{provider:null,model:f.model})}async function k(a){if(a.includes("/"))return null;let b=await (0,d.Dj)(a);return b&&b.models&&b.models.length>0?(0,f.$l)(b.models,b.disabledModels):null}},40669:(a,b,c)=>{c.d(b,{XO:()=>i,Xh:()=>g,hb:()=>l,js:()=>j});var d=c(13771);let e={el:"elevenlabs",jina:"jina-ai","jina-ai":"jina-ai",polly:"aws-polly","aws-polly":"aws-polly"};for(let a of d.default)for(let b of(e[a.id]=a.id,a.alias&&(e[a.alias]=a.id),a.aliases||[]))e[b]=a.id;let f={"grok-build":"gcli/grok-build"};function g(a){if(!a)return{provider:null,model:null,isAlias:!1,providerAlias:null};if(a.includes("/")){let b=a.indexOf("/"),c=a.slice(0,b),d=a.slice(b+1);return{provider:e[c]||c,model:d,isAlias:!1,providerAlias:c}}return{provider:null,model:a,isAlias:!0,providerAlias:null}}function h(a,b){var c,d;if(!b)return null;let f=b[a];if(!f)return null;if("string"==typeof f&&f.includes("/")){let a=f.indexOf("/");return{provider:e[c=f.slice(0,a)]||c,model:f.slice(a+1)}}return"object"==typeof f&&f.provider&&f.model?{provider:e[d=f.provider]||d,model:f.model}:null}async function i(a,b){let c=g(a);if(!c.isAlias)return null;let d="function"==typeof b?await b():b;return h(c.model,d)||h(c.model,f)||null}async function j(a,b){let c=g(a);if(!c.isAlias)return{provider:c.provider,model:c.model};let d=await i(a,b);return d||{provider:function(a){if(!a)return"openai";let b=a.toLowerCase();return m.find(([a])=>a.test(b))?.[1]||"openai"}(c.model),model:c.model}}let k=[/^gpt-[56]\./,/^gpt-6-/,/^gpt-daybreak-/,/^gpt-reserve/];function l(a){if(!a)return!1;let b=a.toLowerCase();return k.some(a=>a.test(b))}let m=[...k.map(a=>[a,"codex"]),[/^claude-/,"anthropic"],[/^gemini-/,"gemini"],[/^gpt-/,"openai"],[/^o[134]/,"openai"],[/^deepseek-/,"openrouter"]]},50122:(a,b,c)=>{c.d(b,{k:()=>e});let d=[];for(let a=0;a<256;++a)d.push((a+256).toString(16).slice(1));function e(a,b=0){return(d[a[b+0]]+d[a[b+1]]+d[a[b+2]]+d[a[b+3]]+"-"+d[a[b+4]]+d[a[b+5]]+"-"+d[a[b+6]]+d[a[b+7]]+"-"+d[a[b+8]]+d[a[b+9]]+"-"+d[a[b+10]]+d[a[b+11]]+d[a[b+12]]+d[a[b+13]]+d[a[b+14]]+d[a[b+15]]).toLowerCase()}},85081:(a,b,c)=>{c.d(b,{Ay:()=>j});var d=c(77598);let e=function(a){return Array.isArray(a)?a=Buffer.from(a):"string"==typeof a&&(a=Buffer.from(a,"utf8")),(0,d.createHash)("sha1").update(a).digest()},f=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i,g=function(a){let b;if(!("string"==typeof a&&f.test(a)))throw TypeError("Invalid UUID");return Uint8Array.of((b=parseInt(a.slice(0,8),16))>>>24,b>>>16&255,b>>>8&255,255&b,(b=parseInt(a.slice(9,13),16))>>>8,255&b,(b=parseInt(a.slice(14,18),16))>>>8,255&b,(b=parseInt(a.slice(19,23),16))>>>8,255&b,(b=parseInt(a.slice(24,36),16))/0x10000000000&255,b/0x100000000&255,b>>>24&255,b>>>16&255,b>>>8&255,255&b)};var h=c(50122);function i(a,b,c,d){var f=b,i=d;let j="string"==typeof a?function(a){let b=new Uint8Array((a=unescape(encodeURIComponent(a))).length);for(let c=0;c<a.length;++c)b[c]=a.charCodeAt(c);return b}(a):a,k="string"==typeof f?g(f):f;if("string"==typeof f&&(f=g(f)),f?.length!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let l=new Uint8Array(16+j.length);if(l.set(k),l.set(j,k.length),(l=e(l))[6]=15&l[6]|80,l[8]=63&l[8]|128,c){if((i=i||0)<0||i+16>c.length)throw RangeError(`UUID byte range ${i}:${i+15} is out of buffer bounds`);for(let a=0;a<16;++a)c[i+a]=l[a];return c}return(0,h.k)(l)}i.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",i.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8";let j=i},92280:(a,b,c)=>{Object.defineProperty(b,"I",{enumerable:!0,get:function(){return g}});let d=c(28208),e=c(47617),f=c(62018);async function g(a,b,c,g){if((0,d.isNodeNextResponse)(b)){var h;b.statusCode=c.status,b.statusMessage=c.statusText;let d=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(h=c.headers)||h.forEach((a,c)=>{if("x-middleware-set-cookie"!==c.toLowerCase())if("set-cookie"===c.toLowerCase())for(let d of(0,f.splitCookiesString)(a))b.appendHeader(c,d);else{let e=void 0!==b.getHeader(c);(d.includes(c.toLowerCase())||!e)&&b.appendHeader(c,a)}});let{originalResponse:i}=b;c.body&&"HEAD"!==a.method?await (0,e.pipeToNodeResponse)(c.body,i,g):i.end()}}},94755:(a,b,c)=>{c.d(b,{A:()=>i});var d=c(77598);let e={randomUUID:d.randomUUID},f=new Uint8Array(256),g=f.length;var h=c(50122);let i=function(a,b,c){if(e.randomUUID&&!b&&!a)return e.randomUUID();var i=a,j=c;let k=(i=i||{}).random??i.rng?.()??(g>f.length-16&&((0,d.randomFillSync)(f),g=0),f.slice(g,g+=16));if(k.length<16)throw Error("Random bytes length must be >= 16");if(k[6]=15&k[6]|64,k[8]=63&k[8]|128,b){if((j=j||0)<0||j+16>b.length)throw RangeError(`UUID byte range ${j}:${j+15} is out of buffer bounds`);for(let a=0;a<16;++a)b[j+a]=k[a];return b}return(0,h.k)(k)}}};
@@ -18,7 +18,7 @@ exports.id=4927,exports.ids=[4927],exports.modules={794:(a,b,c)=>{"use strict";l
18
18
  '-WindowStyle','Hidden','-EncodedCommand','${b}'
19
19
  ) -Verb RunAs -Wait -PassThru -WindowStyle Hidden;
20
20
  if ($proc.ExitCode -ne 0) { throw "Elevated command exited with code $($proc.ExitCode)" }
21
- `;return new Promise((a,b)=>{d(`powershell -NoProfile -NonInteractive -ExecutionPolicy Bypass -Command ${h(c)}`,{windowsHide:!0},(c,d,e)=>{if(c){let a=e||c.message;a.includes("canceled by the user")||a.includes("operation was canceled")?b(Error("User canceled UAC prompt")):b(Error(a))}else a(d)})})},quotePs:h}},15529:(a,b,c)=>{var d=c(45654);c(41702),a.exports=d.mgf=d.mgf||{},d.mgf.mgf1=d.mgf1},15873:(a,b,c)=>{var d=c(45654);c(63070),c(76632),c(36105),c(56416),c(20308),c(29984),c(10401),c(4554),c(33889),c(65737);var e=d.asn1,f=d.pki,g=a.exports=d.pkcs12=d.pkcs12||{},h={name:"ContentInfo",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:e.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},i={name:"PFX",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,constructed:!1,capture:"version"},h,{name:"PFX.macData",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",optional:!0,tagClass:e.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},j={name:"SafeBag",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"SafeBag.bagId",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:e.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:e.Class.UNIVERSAL,type:e.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},k={name:"Attribute",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"oid"},{name:"Attribute.attrValues",tagClass:e.Class.UNIVERSAL,type:e.Type.SET,constructed:!0,capture:"values"}]},l={name:"CertBag",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:e.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:e.Class.UNIVERSAL,type:e.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};function m(a,b,c,d){for(var e=[],f=0;f<a.length;f++)for(var g=0;g<a[f].safeBags.length;g++){var h=a[f].safeBags[g];if(void 0===d||h.type===d){if(null===b){e.push(h);continue}void 0!==h.attributes[b]&&h.attributes[b].indexOf(c)>=0&&e.push(h)}}return e}function n(a){if(a.composed||a.constructed){for(var b=d.util.createBuffer(),c=0;c<a.value.length;++c)b.putBytes(a.value[c].value);a.composed=a.constructed=!1,a.value=b.getBytes()}return a}g.pkcs12FromAsn1=function(a,b,c){"string"==typeof b?(c=b,b=!0):void 0===b&&(b=!0);var o={};if(!e.validate(a,i,o,[])){var p=Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX.");throw p.errors=p,p}var q={version:o.version.charCodeAt(0),safeContents:[],getBags:function(a){var b,c={};return"localKeyId"in a?b=a.localKeyId:"localKeyIdHex"in a&&(b=d.util.hexToBytes(a.localKeyIdHex)),void 0===b&&!("friendlyName"in a)&&"bagType"in a&&(c[a.bagType]=m(q.safeContents,null,null,a.bagType)),void 0!==b&&(c.localKeyId=m(q.safeContents,"localKeyId",b,a.bagType)),"friendlyName"in a&&(c.friendlyName=m(q.safeContents,"friendlyName",a.friendlyName,a.bagType)),c},getBagsByFriendlyName:function(a,b){return m(q.safeContents,"friendlyName",a,b)},getBagsByLocalKeyId:function(a,b){return m(q.safeContents,"localKeyId",a,b)}};if(3!==o.version.charCodeAt(0)){var p=Error("PKCS#12 PFX of version other than 3 not supported.");throw p.version=o.version.charCodeAt(0),p}if(e.derToOid(o.contentType)!==f.oids.data){var p=Error("Only PKCS#12 PFX in password integrity mode supported.");throw p.oid=e.derToOid(o.contentType),p}var r=o.content.value[0];if(r.tagClass!==e.Class.UNIVERSAL||r.type!==e.Type.OCTETSTRING)throw Error("PKCS#12 authSafe content data is not an OCTET STRING.");if(r=n(r),o.mac){var s=null,t=0,u=e.derToOid(o.macAlgorithm);switch(u){case f.oids.sha1:s=d.md.sha1.create(),t=20;break;case f.oids.sha256:s=d.md.sha256.create(),t=32;break;case f.oids.sha384:s=d.md.sha384.create(),t=48;break;case f.oids.sha512:s=d.md.sha512.create(),t=64;break;case f.oids.md5:s=d.md.md5.create(),t=16}if(null===s)throw Error("PKCS#12 uses unsupported MAC algorithm: "+u);var v=new d.util.ByteBuffer(o.macSalt),w="macIterations"in o?parseInt(d.util.bytesToHex(o.macIterations),16):1,x=g.generateKey(c,v,3,w,t,s),y=d.hmac.create();if(y.start(s,x),y.update(r.value),y.getMac().getBytes()!==o.macDigest)throw Error("PKCS#12 MAC could not be verified. Invalid password?")}else if(Array.isArray(a.value)&&a.value.length>2)throw Error("Invalid PKCS#12. macData field present but MAC was not validated.");return function(a,b,c,g){if((b=e.fromDer(b,c)).tagClass!==e.Class.UNIVERSAL||b.type!==e.Type.SEQUENCE||!0!==b.constructed)throw Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");for(var i=0;i<b.value.length;i++){var m=b.value[i],o={},p=[];if(!e.validate(m,h,o,p)){var q=Error("Cannot read ContentInfo.");throw q.errors=p,q}var r={encrypted:!1},s=null,t=o.content.value[0];switch(e.derToOid(o.contentType)){case f.oids.data:if(t.tagClass!==e.Class.UNIVERSAL||t.type!==e.Type.OCTETSTRING)throw Error("PKCS#12 SafeContents Data is not an OCTET STRING.");s=n(t).value;break;case f.oids.encryptedData:s=function(a,b){var c={},g=[];if(!e.validate(a,d.pkcs7.asn1.encryptedDataValidator,c,g)){var h=Error("Cannot read EncryptedContentInfo.");throw h.errors=g,h}var i=e.derToOid(c.contentType);if(i!==f.oids.data){var h=Error("PKCS#12 EncryptedContentInfo ContentType is not Data.");throw h.oid=i,h}i=e.derToOid(c.encAlgorithm);var j=f.pbe.getCipher(i,c.encParameter,b),k=n(c.encryptedContentAsn1),l=d.util.createBuffer(k.value);if(j.update(l),!j.finish())throw Error("Failed to decrypt PKCS#12 SafeContents.");return j.output.getBytes()}(t,g),r.encrypted=!0;break;default:var q=Error("Unsupported PKCS#12 contentType.");throw q.contentType=e.derToOid(o.contentType),q}r.safeBags=function(a,b,c){if(!b&&0===a.length)return[];if((a=e.fromDer(a,b)).tagClass!==e.Class.UNIVERSAL||a.type!==e.Type.SEQUENCE||!0!==a.constructed)throw Error("PKCS#12 SafeContents expected to be a SEQUENCE OF SafeBag.");for(var d=[],g=0;g<a.value.length;g++){var h,i,m=a.value[g],n={},o=[];if(!e.validate(m,j,n,o)){var p=Error("Cannot read SafeBag.");throw p.errors=o,p}var q={type:e.derToOid(n.bagId),attributes:function(a){var b={};if(void 0!==a)for(var c=0;c<a.length;++c){var d={},g=[];if(!e.validate(a[c],k,d,g)){var h=Error("Cannot read PKCS#12 BagAttribute.");throw h.errors=g,h}var i=e.derToOid(d.oid);if(void 0!==f.oids[i]){b[f.oids[i]]=[];for(var j=0;j<d.values.length;++j)b[f.oids[i]].push(d.values[j].value)}}return b}(n.bagAttributes)};d.push(q);var r=n.bagValue.value[0];switch(q.type){case f.oids.pkcs8ShroudedKeyBag:if(null===(r=f.decryptPrivateKeyInfo(r,c)))throw Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case f.oids.keyBag:try{q.key=f.privateKeyFromAsn1(r)}catch(a){q.key=null,q.asn1=r}continue;case f.oids.certBag:h=l,i=function(){if(e.derToOid(n.certId)!==f.oids.x509Certificate){var a=Error("Unsupported certificate type, only X.509 supported.");throw a.oid=e.derToOid(n.certId),a}var c=e.fromDer(n.cert,b);try{q.cert=f.certificateFromAsn1(c,!0)}catch(a){q.cert=null,q.asn1=c}};break;default:var p=Error("Unsupported PKCS#12 SafeBag type.");throw p.oid=q.type,p}if(void 0!==h&&!e.validate(r,h,n,o)){var p=Error("Cannot read PKCS#12 "+h.name);throw p.errors=o,p}i()}return d}(s,c,g),a.safeContents.push(r)}}(q,r.value,b,c),q},g.toPkcs12Asn1=function(a,b,c,h){(h=h||{}).saltSize=h.saltSize||8,h.count=h.count||2048,h.algorithm=h.algorithm||h.encAlgorithm||"aes128","useMac"in h||(h.useMac=!0),"localKeyId"in h||(h.localKeyId=null),"generateLocalKeyId"in h||(h.generateLocalKeyId=!0);var i,j,k=h.localKeyId;if(null!==k)k=d.util.hexToBytes(k);else if(h.generateLocalKeyId)if(b){var l=d.util.isArray(b)?b[0]:b;"string"==typeof l&&(l=f.certificateFromPem(l));var m=d.md.sha1.create();m.update(e.toDer(f.certificateToAsn1(l)).getBytes()),k=m.digest().getBytes()}else k=d.random.getBytes(20);var n=[];null!==k&&n.push(e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(f.oids.localKeyId).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SET,!0,[e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,k)])])),"friendlyName"in h&&n.push(e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(f.oids.friendlyName).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SET,!0,[e.create(e.Class.UNIVERSAL,e.Type.BMPSTRING,!1,h.friendlyName)])])),n.length>0&&(i=e.create(e.Class.UNIVERSAL,e.Type.SET,!0,n));var o=[],p=[];null!==b&&(p=d.util.isArray(b)?b:[b]);for(var q=[],r=0;r<p.length;++r){"string"==typeof(b=p[r])&&(b=f.certificateFromPem(b));var s=0===r?i:void 0,t=f.certificateToAsn1(b),u=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(f.oids.certBag).getBytes()),e.create(e.Class.CONTEXT_SPECIFIC,0,!0,[e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(f.oids.x509Certificate).getBytes()),e.create(e.Class.CONTEXT_SPECIFIC,0,!0,[e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,e.toDer(t).getBytes())])])]),s]);q.push(u)}if(q.length>0){var v=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,q),w=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(f.oids.data).getBytes()),e.create(e.Class.CONTEXT_SPECIFIC,0,!0,[e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,e.toDer(v).getBytes())])]);o.push(w)}var x=null;if(null!==a){var y=f.wrapRsaPrivateKey(f.privateKeyToAsn1(a));x=null===c?e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(f.oids.keyBag).getBytes()),e.create(e.Class.CONTEXT_SPECIFIC,0,!0,[y]),i]):e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(f.oids.pkcs8ShroudedKeyBag).getBytes()),e.create(e.Class.CONTEXT_SPECIFIC,0,!0,[f.encryptPrivateKeyInfo(y,c,h)]),i]);var z=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[x]),A=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(f.oids.data).getBytes()),e.create(e.Class.CONTEXT_SPECIFIC,0,!0,[e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,e.toDer(z).getBytes())])]);o.push(A)}var B=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,o);if(h.useMac){var m=d.md.sha1.create(),C=new d.util.ByteBuffer(d.random.getBytes(h.saltSize)),D=h.count,a=g.generateKey(c,C,3,D,20),E=d.hmac.create();E.start(m,a),E.update(e.toDer(B).getBytes());var F=E.getMac();j=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(f.oids.sha1).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.NULL,!1,"")]),e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,F.getBytes())]),e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,C.getBytes()),e.create(e.Class.UNIVERSAL,e.Type.INTEGER,!1,e.integerToDer(D).getBytes())])}return e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.INTEGER,!1,e.integerToDer(3).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(f.oids.data).getBytes()),e.create(e.Class.CONTEXT_SPECIFIC,0,!0,[e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,e.toDer(B).getBytes())])]),j])},g.generateKey=d.pbe.generatePkcs12Key},19396:(a,b,c)=>{var d=c(45654);c(33889),d.cipher=d.cipher||{};var e=a.exports=d.cipher.modes=d.cipher.modes||{};function f(a,b){if("string"==typeof a&&(a=d.util.createBuffer(a)),d.util.isArray(a)&&a.length>4){var c=a;a=d.util.createBuffer();for(var e=0;e<c.length;++e)a.putByte(c[e])}if(a.length()<b)throw Error("Invalid IV length; got "+a.length()+" bytes and expected "+b+" bytes.");if(!d.util.isArray(a)){for(var f=[],g=b/4,e=0;e<g;++e)f.push(a.getInt32());a=f}return a}function g(a){a[a.length-1]=a[a.length-1]+1|0}function h(a){return[a/0x100000000|0,0|a]}e.ecb=function(a){a=a||{},this.name="ECB",this.cipher=a.cipher,this.blockSize=a.blockSize||16,this._ints=this.blockSize/4,this._inBlock=Array(this._ints),this._outBlock=Array(this._ints)},e.ecb.prototype.start=function(a){},e.ecb.prototype.encrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&a.length()>0))return!0;for(var d=0;d<this._ints;++d)this._inBlock[d]=a.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(var d=0;d<this._ints;++d)b.putInt32(this._outBlock[d])},e.ecb.prototype.decrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&a.length()>0))return!0;for(var d=0;d<this._ints;++d)this._inBlock[d]=a.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(var d=0;d<this._ints;++d)b.putInt32(this._outBlock[d])},e.ecb.prototype.pad=function(a,b){var c=a.length()===this.blockSize?this.blockSize:this.blockSize-a.length();return a.fillWithByte(c,c),!0},e.ecb.prototype.unpad=function(a,b){if(b.overflow>0)return!1;var c=a.length(),d=a.at(c-1);return!(d>this.blockSize<<2)&&(a.truncate(d),!0)},e.cbc=function(a){a=a||{},this.name="CBC",this.cipher=a.cipher,this.blockSize=a.blockSize||16,this._ints=this.blockSize/4,this._inBlock=Array(this._ints),this._outBlock=Array(this._ints)},e.cbc.prototype.start=function(a){if(null===a.iv){if(!this._prev)throw Error("Invalid IV parameter.");this._iv=this._prev.slice(0)}else if("iv"in a)this._iv=f(a.iv,this.blockSize),this._prev=this._iv.slice(0);else throw Error("Invalid IV parameter.")},e.cbc.prototype.encrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&a.length()>0))return!0;for(var d=0;d<this._ints;++d)this._inBlock[d]=this._prev[d]^a.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(var d=0;d<this._ints;++d)b.putInt32(this._outBlock[d]);this._prev=this._outBlock},e.cbc.prototype.decrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&a.length()>0))return!0;for(var d=0;d<this._ints;++d)this._inBlock[d]=a.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(var d=0;d<this._ints;++d)b.putInt32(this._prev[d]^this._outBlock[d]);this._prev=this._inBlock.slice(0)},e.cbc.prototype.pad=function(a,b){var c=a.length()===this.blockSize?this.blockSize:this.blockSize-a.length();return a.fillWithByte(c,c),!0},e.cbc.prototype.unpad=function(a,b){if(b.overflow>0)return!1;var c=a.length(),d=a.at(c-1);return!(d>this.blockSize<<2)&&(a.truncate(d),!0)},e.cfb=function(a){a=a||{},this.name="CFB",this.cipher=a.cipher,this.blockSize=a.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=Array(this._ints),this._partialBlock=Array(this._ints),this._partialOutput=d.util.createBuffer(),this._partialBytes=0},e.cfb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=f(a.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},e.cfb.prototype.encrypt=function(a,b,c){var d=a.length();if(0===d)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&d>=this.blockSize){for(var e=0;e<this._ints;++e)this._inBlock[e]=a.getInt32()^this._outBlock[e],b.putInt32(this._inBlock[e]);return}var f=(this.blockSize-d)%this.blockSize;f>0&&(f=this.blockSize-f),this._partialOutput.clear();for(var e=0;e<this._ints;++e)this._partialBlock[e]=a.getInt32()^this._outBlock[e],this._partialOutput.putInt32(this._partialBlock[e]);if(f>0)a.read-=this.blockSize;else for(var e=0;e<this._ints;++e)this._inBlock[e]=this._partialBlock[e];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),f>0&&!c)return b.putBytes(this._partialOutput.getBytes(f-this._partialBytes)),this._partialBytes=f,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes)),this._partialBytes=0},e.cfb.prototype.decrypt=function(a,b,c){var d=a.length();if(0===d)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&d>=this.blockSize){for(var e=0;e<this._ints;++e)this._inBlock[e]=a.getInt32(),b.putInt32(this._inBlock[e]^this._outBlock[e]);return}var f=(this.blockSize-d)%this.blockSize;f>0&&(f=this.blockSize-f),this._partialOutput.clear();for(var e=0;e<this._ints;++e)this._partialBlock[e]=a.getInt32(),this._partialOutput.putInt32(this._partialBlock[e]^this._outBlock[e]);if(f>0)a.read-=this.blockSize;else for(var e=0;e<this._ints;++e)this._inBlock[e]=this._partialBlock[e];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),f>0&&!c)return b.putBytes(this._partialOutput.getBytes(f-this._partialBytes)),this._partialBytes=f,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes)),this._partialBytes=0},e.ofb=function(a){a=a||{},this.name="OFB",this.cipher=a.cipher,this.blockSize=a.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=Array(this._ints),this._partialOutput=d.util.createBuffer(),this._partialBytes=0},e.ofb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=f(a.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},e.ofb.prototype.encrypt=function(a,b,c){var d=a.length();if(0===a.length())return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&d>=this.blockSize){for(var e=0;e<this._ints;++e)b.putInt32(a.getInt32()^this._outBlock[e]),this._inBlock[e]=this._outBlock[e];return}var f=(this.blockSize-d)%this.blockSize;f>0&&(f=this.blockSize-f),this._partialOutput.clear();for(var e=0;e<this._ints;++e)this._partialOutput.putInt32(a.getInt32()^this._outBlock[e]);if(f>0)a.read-=this.blockSize;else for(var e=0;e<this._ints;++e)this._inBlock[e]=this._outBlock[e];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),f>0&&!c)return b.putBytes(this._partialOutput.getBytes(f-this._partialBytes)),this._partialBytes=f,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes)),this._partialBytes=0},e.ofb.prototype.decrypt=e.ofb.prototype.encrypt,e.ctr=function(a){a=a||{},this.name="CTR",this.cipher=a.cipher,this.blockSize=a.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=Array(this._ints),this._partialOutput=d.util.createBuffer(),this._partialBytes=0},e.ctr.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=f(a.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},e.ctr.prototype.encrypt=function(a,b,c){var d=a.length();if(0===d)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&d>=this.blockSize)for(var e=0;e<this._ints;++e)b.putInt32(a.getInt32()^this._outBlock[e]);else{var f=(this.blockSize-d)%this.blockSize;f>0&&(f=this.blockSize-f),this._partialOutput.clear();for(var e=0;e<this._ints;++e)this._partialOutput.putInt32(a.getInt32()^this._outBlock[e]);if(f>0&&(a.read-=this.blockSize),this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),f>0&&!c)return b.putBytes(this._partialOutput.getBytes(f-this._partialBytes)),this._partialBytes=f,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes)),this._partialBytes=0}g(this._inBlock)},e.ctr.prototype.decrypt=e.ctr.prototype.encrypt,e.gcm=function(a){a=a||{},this.name="GCM",this.cipher=a.cipher,this.blockSize=a.blockSize||16,this._ints=this.blockSize/4,this._inBlock=Array(this._ints),this._outBlock=Array(this._ints),this._partialOutput=d.util.createBuffer(),this._partialBytes=0,this._R=0xe1000000},e.gcm.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");var b,c=d.util.createBuffer(a.iv);if(this._cipherLength=0,b="additionalData"in a?d.util.createBuffer(a.additionalData):d.util.createBuffer(),"tagLength"in a?this._tagLength=a.tagLength:this._tagLength=128,this._tag=null,a.decrypt&&(this._tag=d.util.createBuffer(a.tag).getBytes(),this._tag.length!==this._tagLength/8))throw Error("Authentication tag does not match tag length.");this._hashBlock=Array(this._ints),this.tag=null,this._hashSubkey=Array(this._ints),this.cipher.encrypt([0,0,0,0],this._hashSubkey),this.componentBits=4,this._m=this.generateHashTable(this._hashSubkey,this.componentBits);var e=c.length();if(12===e)this._j0=[c.getInt32(),c.getInt32(),c.getInt32(),1];else{for(this._j0=[0,0,0,0];c.length()>0;)this._j0=this.ghash(this._hashSubkey,this._j0,[c.getInt32(),c.getInt32(),c.getInt32(),c.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(h(8*e)))}this._inBlock=this._j0.slice(0),g(this._inBlock),this._partialBytes=0,b=d.util.createBuffer(b),this._aDataLength=h(8*b.length());var f=b.length()%this.blockSize;for(f&&b.fillWithByte(0,this.blockSize-f),this._s=[0,0,0,0];b.length()>0;)this._s=this.ghash(this._hashSubkey,this._s,[b.getInt32(),b.getInt32(),b.getInt32(),b.getInt32()])},e.gcm.prototype.encrypt=function(a,b,c){var d=a.length();if(0===d)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&d>=this.blockSize){for(var e=0;e<this._ints;++e)b.putInt32(this._outBlock[e]^=a.getInt32());this._cipherLength+=this.blockSize}else{var f=(this.blockSize-d)%this.blockSize;f>0&&(f=this.blockSize-f),this._partialOutput.clear();for(var e=0;e<this._ints;++e)this._partialOutput.putInt32(a.getInt32()^this._outBlock[e]);if(f<=0||c){if(c){var h=d%this.blockSize;this._cipherLength+=h,this._partialOutput.truncate(this.blockSize-h)}else this._cipherLength+=this.blockSize;for(var e=0;e<this._ints;++e)this._outBlock[e]=this._partialOutput.getInt32();this._partialOutput.read-=this.blockSize}if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),f>0&&!c)return a.read-=this.blockSize,b.putBytes(this._partialOutput.getBytes(f-this._partialBytes)),this._partialBytes=f,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes)),this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock),g(this._inBlock)},e.gcm.prototype.decrypt=function(a,b,c){var d=a.length();if(d<this.blockSize&&!(c&&d>0))return!0;this.cipher.encrypt(this._inBlock,this._outBlock),g(this._inBlock),this._hashBlock[0]=a.getInt32(),this._hashBlock[1]=a.getInt32(),this._hashBlock[2]=a.getInt32(),this._hashBlock[3]=a.getInt32(),this._s=this.ghash(this._hashSubkey,this._s,this._hashBlock);for(var e=0;e<this._ints;++e)b.putInt32(this._outBlock[e]^this._hashBlock[e]);d<this.blockSize?this._cipherLength+=d%this.blockSize:this._cipherLength+=this.blockSize},e.gcm.prototype.afterFinish=function(a,b){var c=!0;b.decrypt&&b.overflow&&a.truncate(this.blockSize-b.overflow),this.tag=d.util.createBuffer();var e=this._aDataLength.concat(h(8*this._cipherLength));this._s=this.ghash(this._hashSubkey,this._s,e);var f=[];this.cipher.encrypt(this._j0,f);for(var g=0;g<this._ints;++g)this.tag.putInt32(this._s[g]^f[g]);return this.tag.truncate(this.tag.length()%(this._tagLength/8)),b.decrypt&&this.tag.bytes()!==this._tag&&(c=!1),c},e.gcm.prototype.multiply=function(a,b){for(var c=[0,0,0,0],d=b.slice(0),e=0;e<128;++e)a[e/32|0]&1<<31-e%32&&(c[0]^=d[0],c[1]^=d[1],c[2]^=d[2],c[3]^=d[3]),this.pow(d,d);return c},e.gcm.prototype.pow=function(a,b){for(var c=1&a[3],d=3;d>0;--d)b[d]=a[d]>>>1|(1&a[d-1])<<31;b[0]=a[0]>>>1,c&&(b[0]^=this._R)},e.gcm.prototype.tableMultiply=function(a){for(var b=[0,0,0,0],c=0;c<32;++c){var d=a[c/8|0]>>>(7-c%8)*4&15,e=this._m[c][d];b[0]^=e[0],b[1]^=e[1],b[2]^=e[2],b[3]^=e[3]}return b},e.gcm.prototype.ghash=function(a,b,c){return b[0]^=c[0],b[1]^=c[1],b[2]^=c[2],b[3]^=c[3],this.tableMultiply(b)},e.gcm.prototype.generateHashTable=function(a,b){for(var c=8/b,d=4*c,e=16*c,f=Array(e),g=0;g<e;++g){var h=[0,0,0,0],i=g/d|0,j=(d-1-g%d)*b;h[i]=1<<b-1<<j,f[g]=this.generateSubHashTable(this.multiply(h,a),b)}return f},e.gcm.prototype.generateSubHashTable=function(a,b){var c=1<<b,d=c>>>1,e=Array(c);e[d]=a.slice(0);for(var f=d>>>1;f>0;)this.pow(e[2*f],e[f]=[]),f>>=1;for(f=2;f<d;){for(var g=1;g<f;++g){var h=e[f],i=e[g];e[f+g]=[h[0]^i[0],h[1]^i[1],h[2]^i[2],h[3]^i[3]]}f*=2}for(e[0]=[0,0,0,0],f=d+1;f<c;++f){var j=e[f^d];e[f]=[a[0]^j[0],a[1]^j[1],a[2]^j[2],a[3]^j[3]]}return e}},20096:a=>{var b={};a.exports=b;var c={};b.encode=function(a,b,c){if("string"!=typeof b)throw TypeError('"alphabet" must be a string.');if(void 0!==c&&"number"!=typeof c)throw TypeError('"maxline" must be a number.');var d="";if(a instanceof Uint8Array){var e=0,f=b.length,g=b.charAt(0),h=[0];for(e=0;e<a.length;++e){for(var i=0,j=a[e];i<h.length;++i)j+=h[i]<<8,h[i]=j%f,j=j/f|0;for(;j>0;)h.push(j%f),j=j/f|0}for(e=0;0===a[e]&&e<a.length-1;++e)d+=g;for(e=h.length-1;e>=0;--e)d+=b[h[e]]}else d=function(a,b){var c=0,d=b.length,e=b.charAt(0),f=[0];for(c=0;c<a.length();++c){for(var g=0,h=a.at(c);g<f.length;++g)h+=f[g]<<8,f[g]=h%d,h=h/d|0;for(;h>0;)f.push(h%d),h=h/d|0}var i="";for(c=0;0===a.at(c)&&c<a.length()-1;++c)i+=e;for(c=f.length-1;c>=0;--c)i+=b[f[c]];return i}(a,b);if(c){var k=RegExp(".{1,"+c+"}","g");d=d.match(k).join("\r\n")}return d},b.decode=function(a,b){if("string"!=typeof a)throw TypeError('"input" must be a string.');if("string"!=typeof b)throw TypeError('"alphabet" must be a string.');var d=c[b];if(!d){d=c[b]=[];for(var e=0;e<b.length;++e)d[b.charCodeAt(e)]=e}a=a.replace(/\s/g,"");for(var f=b.length,g=b.charAt(0),h=[0],e=0;e<a.length;e++){var i=d[a.charCodeAt(e)];if(void 0===i)return;for(var j=0,k=i;j<h.length;++j)k+=h[j]*f,h[j]=255&k,k>>=8;for(;k>0;)h.push(255&k),k>>=8}for(var l=0;a[l]===g&&l<a.length-1;++l)h.push(0);return"u">typeof Buffer?Buffer.from(h.reverse()):new Uint8Array(h.reverse())}},20308:(a,b,c)=>{var d=c(45654);if(c(45518),c(63070),c(88819),c(23658),c(36105),c(70710),c(49345),c(29984),c(67382),c(10401),c(33889),void 0===e)var e=d.jsbn.BigInteger;var f=d.asn1,g=d.pki=d.pki||{};a.exports=g.pbe=d.pbe=d.pbe||{};var h=g.oids,i={name:"EncryptedPrivateKeyInfo",tagClass:f.Class.UNIVERSAL,type:f.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:f.Class.UNIVERSAL,type:f.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:f.Class.UNIVERSAL,type:f.Type.OID,constructed:!1,capture:"encryptionOid"},{name:"AlgorithmIdentifier.parameters",tagClass:f.Class.UNIVERSAL,type:f.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:f.Class.UNIVERSAL,type:f.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},j={name:"PBES2Algorithms",tagClass:f.Class.UNIVERSAL,type:f.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:f.Class.UNIVERSAL,type:f.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",tagClass:f.Class.UNIVERSAL,type:f.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:f.Class.UNIVERSAL,type:f.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:f.Class.UNIVERSAL,type:f.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:f.Class.UNIVERSAL,type:f.Type.INTEGER,constructed:!1,capture:"kdfIterationCount"},{name:"PBES2Algorithms.params.keyLength",tagClass:f.Class.UNIVERSAL,type:f.Type.INTEGER,constructed:!1,optional:!0,capture:"keyLength"},{name:"PBES2Algorithms.params.prf",tagClass:f.Class.UNIVERSAL,type:f.Type.SEQUENCE,constructed:!0,optional:!0,value:[{name:"PBES2Algorithms.params.prf.algorithm",tagClass:f.Class.UNIVERSAL,type:f.Type.OID,constructed:!1,capture:"prfOid"}]}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:f.Class.UNIVERSAL,type:f.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:f.Class.UNIVERSAL,type:f.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:f.Class.UNIVERSAL,type:f.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},k={name:"pkcs-12PbeParams",tagClass:f.Class.UNIVERSAL,type:f.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:f.Class.UNIVERSAL,type:f.Type.OCTETSTRING,constructed:!1,capture:"salt"},{name:"pkcs-12PbeParams.iterations",tagClass:f.Class.UNIVERSAL,type:f.Type.INTEGER,constructed:!1,capture:"iterations"}]};function l(a,b){return a.start().update(b).digest().getBytes()}function m(a){var b;if(a){if(!(b=g.oids[f.derToOid(a)])){var c=Error("Unsupported PRF OID.");throw c.oid=a,c.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],c}}else b="hmacWithSHA1";return n(b)}function n(a){var b=d.md;switch(a){case"hmacWithSHA224":b=d.md.sha512;case"hmacWithSHA1":case"hmacWithSHA256":case"hmacWithSHA384":case"hmacWithSHA512":a=a.substr(8).toLowerCase();break;default:var c=Error("Unsupported PRF algorithm.");throw c.algorithm=a,c.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],c}if(!b||!(a in b))throw Error("Unknown hash algorithm: "+a);return b[a].create()}g.encryptPrivateKeyInfo=function(a,b,c){(c=c||{}).saltSize=c.saltSize||8,c.count=c.count||2048,c.algorithm=c.algorithm||"aes128",c.prfAlgorithm=c.prfAlgorithm||"sha1";var e=d.random.getBytesSync(c.saltSize),i=c.count,j=f.integerToDer(i);if(0===c.algorithm.indexOf("aes")||"des"===c.algorithm){switch(c.algorithm){case"aes128":q=16,t=16,u=h["aes128-CBC"],v=d.aes.createEncryptionCipher;break;case"aes192":q=24,t=16,u=h["aes192-CBC"],v=d.aes.createEncryptionCipher;break;case"aes256":q=32,t=16,u=h["aes256-CBC"],v=d.aes.createEncryptionCipher;break;case"des":q=8,t=8,u=h.desCBC,v=d.des.createEncryptionCipher;break;default:var k,l,m,o,p,q,r,s,t,u,v,w=Error("Cannot encrypt private key. Unknown encryption algorithm.");throw w.algorithm=c.algorithm,w}var x="hmacWith"+c.prfAlgorithm.toUpperCase(),y=n(x),z=d.pkcs5.pbkdf2(b,e,i,q,y),A=d.random.getBytesSync(t),B=v(z);B.start(A),B.update(f.toDer(a)),B.finish(),s=B.output.getBytes();var C=(k=e,l=j,m=q,o=x,p=f.create(f.Class.UNIVERSAL,f.Type.SEQUENCE,!0,[f.create(f.Class.UNIVERSAL,f.Type.OCTETSTRING,!1,k),f.create(f.Class.UNIVERSAL,f.Type.INTEGER,!1,l.getBytes())]),"hmacWithSHA1"!==o&&p.value.push(f.create(f.Class.UNIVERSAL,f.Type.INTEGER,!1,d.util.hexToBytes(m.toString(16))),f.create(f.Class.UNIVERSAL,f.Type.SEQUENCE,!0,[f.create(f.Class.UNIVERSAL,f.Type.OID,!1,f.oidToDer(g.oids[o]).getBytes()),f.create(f.Class.UNIVERSAL,f.Type.NULL,!1,"")])),p);r=f.create(f.Class.UNIVERSAL,f.Type.SEQUENCE,!0,[f.create(f.Class.UNIVERSAL,f.Type.OID,!1,f.oidToDer(h.pkcs5PBES2).getBytes()),f.create(f.Class.UNIVERSAL,f.Type.SEQUENCE,!0,[f.create(f.Class.UNIVERSAL,f.Type.SEQUENCE,!0,[f.create(f.Class.UNIVERSAL,f.Type.OID,!1,f.oidToDer(h.pkcs5PBKDF2).getBytes()),C]),f.create(f.Class.UNIVERSAL,f.Type.SEQUENCE,!0,[f.create(f.Class.UNIVERSAL,f.Type.OID,!1,f.oidToDer(u).getBytes()),f.create(f.Class.UNIVERSAL,f.Type.OCTETSTRING,!1,A)])])])}else if("3des"===c.algorithm){q=24;var D=new d.util.ByteBuffer(e),z=g.pbe.generatePkcs12Key(b,D,1,i,q),A=g.pbe.generatePkcs12Key(b,D,2,i,q),B=d.des.createEncryptionCipher(z);B.start(A),B.update(f.toDer(a)),B.finish(),s=B.output.getBytes(),r=f.create(f.Class.UNIVERSAL,f.Type.SEQUENCE,!0,[f.create(f.Class.UNIVERSAL,f.Type.OID,!1,f.oidToDer(h["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),f.create(f.Class.UNIVERSAL,f.Type.SEQUENCE,!0,[f.create(f.Class.UNIVERSAL,f.Type.OCTETSTRING,!1,e),f.create(f.Class.UNIVERSAL,f.Type.INTEGER,!1,j.getBytes())])])}else{var w=Error("Cannot encrypt private key. Unknown encryption algorithm.");throw w.algorithm=c.algorithm,w}return f.create(f.Class.UNIVERSAL,f.Type.SEQUENCE,!0,[r,f.create(f.Class.UNIVERSAL,f.Type.OCTETSTRING,!1,s)])},g.decryptPrivateKeyInfo=function(a,b){var c=null,e={},h=[];if(!f.validate(a,i,e,h)){var j=Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw j.errors=h,j}var k=f.derToOid(e.encryptionOid),l=g.pbe.getCipher(k,e.encryptionParams,b),m=d.util.createBuffer(e.encryptedData);return l.update(m),l.finish()&&(c=f.fromDer(l.output)),c},g.encryptedPrivateKeyToPem=function(a,b){var c={type:"ENCRYPTED PRIVATE KEY",body:f.toDer(a).getBytes()};return d.pem.encode(c,{maxline:b})},g.encryptedPrivateKeyFromPem=function(a){var b=d.pem.decode(a)[0];if("ENCRYPTED PRIVATE KEY"!==b.type){var c=Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');throw c.headerType=b.type,c}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return f.fromDer(b.body)},g.encryptRsaPrivateKey=function(a,b,c){if(!(c=c||{}).legacy){var e,h,i,j,k=g.wrapRsaPrivateKey(g.privateKeyToAsn1(a));return k=g.encryptPrivateKeyInfo(k,b,c),g.encryptedPrivateKeyToPem(k)}switch(c.algorithm){case"aes128":e="AES-128-CBC",i=16,h=d.random.getBytesSync(16),j=d.aes.createEncryptionCipher;break;case"aes192":e="AES-192-CBC",i=24,h=d.random.getBytesSync(16),j=d.aes.createEncryptionCipher;break;case"aes256":e="AES-256-CBC",i=32,h=d.random.getBytesSync(16),j=d.aes.createEncryptionCipher;break;case"3des":e="DES-EDE3-CBC",i=24,h=d.random.getBytesSync(8),j=d.des.createEncryptionCipher;break;case"des":e="DES-CBC",i=8,h=d.random.getBytesSync(8),j=d.des.createEncryptionCipher;break;default:var l=Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+c.algorithm+'".');throw l.algorithm=c.algorithm,l}var m=j(d.pbe.opensslDeriveBytes(b,h.substr(0,8),i));m.start(h),m.update(f.toDer(g.privateKeyToAsn1(a))),m.finish();var n={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:e,parameters:d.util.bytesToHex(h).toUpperCase()},body:m.output.getBytes()};return d.pem.encode(n)},g.decryptRsaPrivateKey=function(a,b){var c=null,e=d.pem.decode(a)[0];if("ENCRYPTED PRIVATE KEY"!==e.type&&"PRIVATE KEY"!==e.type&&"RSA PRIVATE KEY"!==e.type){var h=Error('Could not convert private key from PEM; PEM header type is not "ENCRYPTED PRIVATE KEY", "PRIVATE KEY", or "RSA PRIVATE KEY".');throw h.headerType=h,h}if(e.procType&&"ENCRYPTED"===e.procType.type){switch(e.dekInfo.algorithm){case"DES-CBC":i=8,j=d.des.createDecryptionCipher;break;case"DES-EDE3-CBC":i=24,j=d.des.createDecryptionCipher;break;case"AES-128-CBC":i=16,j=d.aes.createDecryptionCipher;break;case"AES-192-CBC":i=24,j=d.aes.createDecryptionCipher;break;case"AES-256-CBC":i=32,j=d.aes.createDecryptionCipher;break;case"RC2-40-CBC":i=5,j=function(a){return d.rc2.createDecryptionCipher(a,40)};break;case"RC2-64-CBC":i=8,j=function(a){return d.rc2.createDecryptionCipher(a,64)};break;case"RC2-128-CBC":i=16,j=function(a){return d.rc2.createDecryptionCipher(a,128)};break;default:var i,j,h=Error('Could not decrypt private key; unsupported encryption algorithm "'+e.dekInfo.algorithm+'".');throw h.algorithm=e.dekInfo.algorithm,h}var k=d.util.hexToBytes(e.dekInfo.parameters),l=j(d.pbe.opensslDeriveBytes(b,k.substr(0,8),i));if(l.start(k),l.update(d.util.createBuffer(e.body)),!l.finish())return c;c=l.output.getBytes()}else c=e.body;return null!==(c="ENCRYPTED PRIVATE KEY"===e.type?g.decryptPrivateKeyInfo(f.fromDer(c),b):f.fromDer(c))&&(c=g.privateKeyFromAsn1(c)),c},g.pbe.generatePkcs12Key=function(a,b,c,e,f,g){if(null==g){if(!("sha1"in d.md))throw Error('"sha1" hash algorithm unavailable.');g=d.md.sha1.create()}var h,i,j=g.digestLength,k=g.blockLength,l=new d.util.ByteBuffer,m=new d.util.ByteBuffer;if(null!=a){for(i=0;i<a.length;i++)m.putInt16(a.charCodeAt(i));m.putInt16(0)}var n=m.length(),o=b.length(),p=new d.util.ByteBuffer;p.fillWithByte(c,k);var q=k*Math.ceil(o/k),r=new d.util.ByteBuffer;for(i=0;i<q;i++)r.putByte(b.at(i%o));var s=k*Math.ceil(n/k),t=new d.util.ByteBuffer;for(i=0;i<s;i++)t.putByte(m.at(i%n));var u=r;u.putBuffer(t);for(var v=Math.ceil(f/j),w=1;w<=v;w++){var x=new d.util.ByteBuffer;x.putBytes(p.bytes()),x.putBytes(u.bytes());for(var y=0;y<e;y++)g.start(),g.update(x.getBytes()),x=g.digest();var z=new d.util.ByteBuffer;for(i=0;i<k;i++)z.putByte(x.at(i%j));var A=Math.ceil(o/k)+Math.ceil(n/k),B=new d.util.ByteBuffer;for(h=0;h<A;h++){var C=new d.util.ByteBuffer(u.getBytes(k)),D=511;for(i=z.length()-1;i>=0;i--)D>>=8,D+=z.at(i)+C.at(i),C.setAt(i,255&D);B.putBuffer(C)}u=B,l.putBuffer(x)}return l.truncate(l.length()-f),l},g.pbe.getCipher=function(a,b,c){switch(a){case g.oids.pkcs5PBES2:return g.pbe.getCipherForPBES2(a,b,c);case g.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case g.oids["pbewithSHAAnd40BitRC2-CBC"]:return g.pbe.getCipherForPKCS12PBE(a,b,c);default:var d=Error("Cannot read encrypted PBE data block. Unsupported OID.");throw d.oid=a,d.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC","pbewithSHAAnd40BitRC2-CBC"],d}},g.pbe.getCipherForPBES2=function(a,b,c){var e,h,i={},k=[];if(!f.validate(b,j,i,k)){var l=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw l.errors=k,l}if((a=f.derToOid(i.kdfOid))!==g.oids.pkcs5PBKDF2){var l=Error("Cannot read encrypted private key. Unsupported key derivation function OID.");throw l.oid=a,l.supportedOids=["pkcs5PBKDF2"],l}if((a=f.derToOid(i.encOid))!==g.oids["aes128-CBC"]&&a!==g.oids["aes192-CBC"]&&a!==g.oids["aes256-CBC"]&&a!==g.oids["des-EDE3-CBC"]&&a!==g.oids.desCBC){var l=Error("Cannot read encrypted private key. Unsupported encryption scheme OID.");throw l.oid=a,l.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],l}var n=i.kdfSalt,o=d.util.createBuffer(i.kdfIterationCount);switch(o=o.getInt(o.length()<<3),g.oids[a]){case"aes128-CBC":e=16,h=d.aes.createDecryptionCipher;break;case"aes192-CBC":e=24,h=d.aes.createDecryptionCipher;break;case"aes256-CBC":e=32,h=d.aes.createDecryptionCipher;break;case"des-EDE3-CBC":e=24,h=d.des.createDecryptionCipher;break;case"desCBC":e=8,h=d.des.createDecryptionCipher}var p=m(i.prfOid),q=d.pkcs5.pbkdf2(c,n,o,e,p),r=i.encIv,s=h(q);return s.start(r),s},g.pbe.getCipherForPKCS12PBE=function(a,b,c){var e,h,i,j={},l=[];if(!f.validate(b,k,j,l)){var n=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw n.errors=l,n}var o=d.util.createBuffer(j.salt),p=d.util.createBuffer(j.iterations);switch(p=p.getInt(p.length()<<3),a){case g.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:e=24,h=8,i=d.des.startDecrypting;break;case g.oids["pbewithSHAAnd40BitRC2-CBC"]:e=5,h=8,i=function(a,b){var c=d.rc2.createDecryptionCipher(a,40);return c.start(b,null),c};break;default:var n=Error("Cannot read PKCS #12 PBE data block. Unsupported OID.");throw n.oid=a,n}var q=m(j.prfOid),r=g.pbe.generatePkcs12Key(c,o,1,p,e,q);return q.start(),i(r,g.pbe.generatePkcs12Key(c,o,2,p,h,q))},g.pbe.opensslDeriveBytes=function(a,b,c,e){if(null==e){if(!("md5"in d.md))throw Error('"md5" hash algorithm unavailable.');e=d.md.md5.create()}null===b&&(b="");for(var f=[l(e,a+b)],g=16,h=1;g<c;++h,g+=16)f.push(l(e,f[h-1]+a+b));return f.join("").substr(0,c)}},20437:(a,b,c)=>{"use strict";c.d(b,{AL:()=>j,HG:()=>i,Jh:()=>n,KQ:()=>k,Or:()=>m,Rf:()=>l});var d=c(76760),e=c.n(d),f=c(73024),g=c.n(f),h=c(53859);let i=e().join(h.nJ,"db"),j=e().join(i,"data.sqlite"),k=e().join(i,"backups"),l=e().join(h.nJ,"runtime"),m=Object.fromEntries(Object.entries(h.jL).map(([a,b])=>[a,e().join(h.nJ,b)]));function n(){for(let a of[h.nJ,i,k])g().existsSync(a)||g().mkdirSync(a,{recursive:!0})}},22164:(a,b,c)=>{var d=c(45654);c(32e3),c(29984),c(37691),c(33889);var e=c(24547),f=e.publicKeyValidator,g=e.privateKeyValidator;if(void 0===h)var h=d.jsbn.BigInteger;var i=d.util.ByteBuffer,j="u"<typeof Buffer?Uint8Array:Buffer;d.pki=d.pki||{},a.exports=d.pki.ed25519=d.ed25519=d.ed25519||{};var k=d.ed25519;function l(a){var b=a.message;if(b instanceof Uint8Array||b instanceof j)return b;var c=a.encoding;if(void 0===b)if(a.md)b=a.md.digest().getBytes(),c="binary";else throw TypeError('"options.message" or "options.md" not specified.');if("string"==typeof b&&!c)throw TypeError('"options.encoding" must be "binary" or "utf8".');if("string"==typeof b){if("u">typeof Buffer)return Buffer.from(b,c);b=new i(b,c)}else if(!(b instanceof i))throw TypeError('"options.message" must be a node.js Buffer, a Uint8Array, a forge ByteBuffer, or a string with "options.encoding" specifying its encoding.');for(var d=new j(b.length()),e=0;e<d.length;++e)d[e]=b.at(e);return d}k.constants={},k.constants.PUBLIC_KEY_BYTE_LENGTH=32,k.constants.PRIVATE_KEY_BYTE_LENGTH=64,k.constants.SEED_BYTE_LENGTH=32,k.constants.SIGN_BYTE_LENGTH=64,k.constants.HASH_BYTE_LENGTH=64,k.generateKeyPair=function(a){var b=(a=a||{}).seed;if(void 0===b)b=d.random.getBytesSync(k.constants.SEED_BYTE_LENGTH);else if("string"==typeof b){if(b.length!==k.constants.SEED_BYTE_LENGTH)throw TypeError('"seed" must be '+k.constants.SEED_BYTE_LENGTH+" bytes in length.")}else if(!(b instanceof Uint8Array))throw TypeError('"seed" must be a node.js Buffer, Uint8Array, or a binary string.');b=l({message:b,encoding:"binary"});for(var c=new j(k.constants.PUBLIC_KEY_BYTE_LENGTH),e=new j(k.constants.PRIVATE_KEY_BYTE_LENGTH),f=0;f<32;++f)e[f]=b[f];return function(a,b){var c,d=[J(),J(),J(),J()],e=u(b,32);for(e[0]&=248,e[31]&=127,e[31]|=64,F(d,e),z(a,d),c=0;c<32;++c)b[c+32]=a[c]}(c,e),{publicKey:c,privateKey:e}},k.privateKeyFromAsn1=function(a){var b={},c=[];if(!d.asn1.validate(a,g,b,c)){var e=Error("Invalid Key.");throw e.errors=c,e}var f=d.asn1.derToOid(b.privateKeyOid),h=d.oids.EdDSA25519;if(f!==h)throw Error('Invalid OID "'+f+'"; OID must be "'+h+'".');var i=b.privateKey;return{privateKeyBytes:l({message:d.asn1.fromDer(i).value,encoding:"binary"})}},k.publicKeyFromAsn1=function(a){var b={},c=[];if(!d.asn1.validate(a,f,b,c)){var e=Error("Invalid Key.");throw e.errors=c,e}var g=d.asn1.derToOid(b.publicKeyOid),h=d.oids.EdDSA25519;if(g!==h)throw Error('Invalid OID "'+g+'"; OID must be "'+h+'".');var i=b.ed25519PublicKey;if(i.length!==k.constants.PUBLIC_KEY_BYTE_LENGTH)throw Error("Key length is invalid.");return l({message:i,encoding:"binary"})},k.publicKeyFromPrivateKey=function(a){var b=l({message:(a=a||{}).privateKey,encoding:"binary"});if(b.length!==k.constants.PRIVATE_KEY_BYTE_LENGTH)throw TypeError('"options.privateKey" must have a byte length of '+k.constants.PRIVATE_KEY_BYTE_LENGTH);for(var c=new j(k.constants.PUBLIC_KEY_BYTE_LENGTH),d=0;d<c.length;++d)c[d]=b[32+d];return c},k.sign=function(a){var b=l(a=a||{}),c=l({message:a.privateKey,encoding:"binary"});if(c.length===k.constants.SEED_BYTE_LENGTH)c=k.generateKeyPair({seed:c}).privateKey;else if(c.length!==k.constants.PRIVATE_KEY_BYTE_LENGTH)throw TypeError('"options.privateKey" must have a byte length of '+k.constants.SEED_BYTE_LENGTH+" or "+k.constants.PRIVATE_KEY_BYTE_LENGTH);var d=new j(k.constants.SIGN_BYTE_LENGTH+b.length);!function(a,b,c,d){var e,f,g=new Float64Array(64),h=[J(),J(),J(),J()],i=u(d,32);for(i[0]&=248,i[31]&=127,i[31]|=64,e=0;e<c;++e)a[64+e]=b[e];for(e=0;e<32;++e)a[32+e]=i[32+e];var j=u(a.subarray(32),c+32);for(w(j),F(h,j),z(a,h),e=32;e<64;++e)a[e]=d[e];var k=u(a,c+64);for(w(k),e=32;e<64;++e)g[e]=0;for(e=0;e<32;++e)g[e]=j[e];for(e=0;e<32;++e)for(f=0;f<32;f++)g[e+f]+=k[e]*i[f];v(a.subarray(32),g)}(d,b,b.length,c);for(var e=new j(k.constants.SIGN_BYTE_LENGTH),f=0;f<e.length;++f)e[f]=d[f];return e},k.verify=function(a){var b,c=l(a=a||{});if(void 0===a.signature)throw TypeError('"options.signature" must be a node.js Buffer, a Uint8Array, a forge ByteBuffer, or a binary string.');var d=l({message:a.signature,encoding:"binary"});if(d.length!==k.constants.SIGN_BYTE_LENGTH)throw TypeError('"options.signature" must have a byte length of '+k.constants.SIGN_BYTE_LENGTH);var e=l({message:a.publicKey,encoding:"binary"});if(e.length!==k.constants.PUBLIC_KEY_BYTE_LENGTH)throw TypeError('"options.publicKey" must have a byte length of '+k.constants.PUBLIC_KEY_BYTE_LENGTH);var f=new j(k.constants.SIGN_BYTE_LENGTH+c.length),g=new j(k.constants.SIGN_BYTE_LENGTH+c.length);for(b=0;b<k.constants.SIGN_BYTE_LENGTH;++b)f[b]=d[b];for(b=0;b<c.length;++b)f[b+k.constants.SIGN_BYTE_LENGTH]=c[b];return function(a,b,c,d){var e,f,g,h,i,k,l,p,q,r,v=new j(32),y=[J(),J(),J(),J()],A=[J(),J(),J(),J()];if(c<64||(e=A,f=d,g=J(),h=J(),i=J(),k=J(),l=J(),p=J(),q=J(),(G(e[2],n),function(a,b){var c;for(c=0;c<16;++c)a[c]=b[2*c]+(b[2*c+1]<<8);a[15]&=32767}(e[1],f),function(a,b){M(a,b,b)}(i,e[1]),M(k,i,o),L(i,i,e[2]),K(k,e[2],k),function(a,b){M(a,b,b)}(l,k),function(a,b){M(a,b,b)}(p,l),M(q,p,l),M(g,q,i),M(g,g,k),function(a,b){var c,d=J();for(c=0;c<16;++c)d[c]=b[c];for(c=250;c>=0;--c)(function(a,b){M(a,b,b)})(d,d),1!==c&&M(d,d,b);for(c=0;c<16;++c)a[c]=d[c]}(g,g),M(g,g,i),M(g,g,k),M(g,g,k),M(e[0],g,k),function(a,b){M(a,b,b)}(h,e[0]),M(h,h,k),B(h,i)&&M(e[0],e[0],t),function(a,b){M(a,b,b)}(h,e[0]),M(h,h,k),B(h,i))?-1:(D(e[0])===f[31]>>7&&L(e[0],m,e[0]),M(e[3],e[0],e[1]),0))||!function(a){var b;for(b=31;b>=0;--b){if(a[32+b]<s[b])return!0;if(a[32+b]>s[b])break}return!1}(b))return -1;for(r=0;r<c;++r)a[r]=b[r];for(r=0;r<32;++r)a[r+32]=d[r];var H=u(a,c);if(w(H),E(y,A,H),F(A,b.subarray(32)),x(y,A),z(v,y),c-=64,function(a,b,c,d){return C(a,b,c,d,32)}(b,0,v,0)){for(r=0;r<c;++r)a[r]=0;return -1}for(r=0;r<c;++r)a[r]=b[r+64];return c}(g,f,f.length,e)>=0};var m=J(),n=J([1]),o=J([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),p=J([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),q=J([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),r=J([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),s=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]),t=J([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function u(a,b){var c=d.md.sha512.create(),e=new i(a);c.update(e.getBytes(b),"binary");var f=c.digest().getBytes();if("u">typeof Buffer)return Buffer.from(f,"binary");for(var g=new j(k.constants.HASH_BYTE_LENGTH),h=0;h<64;++h)g[h]=f.charCodeAt(h);return g}function v(a,b){var c,d,e,f;for(d=63;d>=32;--d){for(c=0,e=d-32,f=d-12;e<f;++e)b[e]+=c-16*b[d]*s[e-(d-32)],c=b[e]+128>>8,b[e]-=256*c;b[e]+=c,b[d]=0}for(e=0,c=0;e<32;++e)b[e]+=c-(b[31]>>4)*s[e],c=b[e]>>8,b[e]&=255;for(e=0;e<32;++e)b[e]-=c*s[e];for(d=0;d<32;++d)b[d+1]+=b[d]>>8,a[d]=255&b[d]}function w(a){for(var b=new Float64Array(64),c=0;c<64;++c)b[c]=a[c],a[c]=0;v(a,b)}function x(a,b){var c=J(),d=J(),e=J(),f=J(),g=J(),h=J(),i=J(),j=J(),k=J();L(c,a[1],a[0]),L(k,b[1],b[0]),M(c,c,k),K(d,a[0],a[1]),K(k,b[0],b[1]),M(d,d,k),M(e,a[3],b[3]),M(e,e,p),M(f,a[2],b[2]),K(f,f,f),L(g,d,c),L(h,f,e),K(i,f,e),K(j,d,c),M(a[0],g,h),M(a[1],j,i),M(a[2],i,h),M(a[3],g,j)}function y(a,b,c){for(var d=0;d<4;++d)I(a[d],b[d],c)}function z(a,b){var c=J(),d=J(),e=J();(function(a,b){var c,d=J();for(c=0;c<16;++c)d[c]=b[c];for(c=253;c>=0;--c)(function(a,b){M(a,b,b)})(d,d),2!==c&&4!==c&&M(d,d,b);for(c=0;c<16;++c)a[c]=d[c]})(e,b[2]),M(c,b[0],e),M(d,b[1],e),A(a,d),a[31]^=D(c)<<7}function A(a,b){var c,d,e,f=J(),g=J();for(c=0;c<16;++c)g[c]=b[c];for(H(g),H(g),H(g),d=0;d<2;++d){for(f[0]=g[0]-65517,c=1;c<15;++c)f[c]=g[c]-65535-(f[c-1]>>16&1),f[c-1]&=65535;f[15]=g[15]-32767-(f[14]>>16&1),e=f[15]>>16&1,f[14]&=65535,I(g,f,1-e)}for(c=0;c<16;c++)a[2*c]=255&g[c],a[2*c+1]=g[c]>>8}function B(a,b){var c=new j(32),d=new j(32);return A(c,a),A(d,b),C(c,0,d,0,32)}function C(a,b,c,d,e){var f,g=0;for(f=0;f<e;++f)g|=a[b+f]^c[d+f];return(1&g-1>>>8)-1}function D(a){var b=new j(32);return A(b,a),1&b[0]}function E(a,b,c){var d,e;for(G(a[0],m),G(a[1],n),G(a[2],n),G(a[3],m),e=255;e>=0;--e)y(a,b,d=c[e/8|0]>>(7&e)&1),x(b,a),x(a,a),y(a,b,d)}function F(a,b){var c=[J(),J(),J(),J()];G(c[0],q),G(c[1],r),G(c[2],n),M(c[3],q,r),E(a,c,b)}function G(a,b){var c;for(c=0;c<16;c++)a[c]=0|b[c]}function H(a){var b,c,d=1;for(b=0;b<16;++b)d=Math.floor((c=a[b]+d+65535)/65536),a[b]=c-65536*d;a[0]+=d-1+37*(d-1)}function I(a,b,c){for(var d,e=~(c-1),f=0;f<16;++f)d=e&(a[f]^b[f]),a[f]^=d,b[f]^=d}function J(a){var b,c=new Float64Array(16);if(a)for(b=0;b<a.length;++b)c[b]=a[b];return c}function K(a,b,c){for(var d=0;d<16;++d)a[d]=b[d]+c[d]}function L(a,b,c){for(var d=0;d<16;++d)a[d]=b[d]-c[d]}function M(a,b,c){var d,e,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=c[0],L=c[1],M=c[2],N=c[3],O=c[4],P=c[5],Q=c[6],R=c[7],S=c[8],T=c[9],U=c[10],V=c[11],W=c[12],X=c[13],Y=c[14],Z=c[15];f+=(d=b[0])*K,g+=d*L,h+=d*M,i+=d*N,j+=d*O,k+=d*P,l+=d*Q,m+=d*R,n+=d*S,o+=d*T,p+=d*U,q+=d*V,r+=d*W,s+=d*X,t+=d*Y,u+=d*Z,g+=(d=b[1])*K,h+=d*L,i+=d*M,j+=d*N,k+=d*O,l+=d*P,m+=d*Q,n+=d*R,o+=d*S,p+=d*T,q+=d*U,r+=d*V,s+=d*W,t+=d*X,u+=d*Y,v+=d*Z,h+=(d=b[2])*K,i+=d*L,j+=d*M,k+=d*N,l+=d*O,m+=d*P,n+=d*Q,o+=d*R,p+=d*S,q+=d*T,r+=d*U,s+=d*V,t+=d*W,u+=d*X,v+=d*Y,w+=d*Z,i+=(d=b[3])*K,j+=d*L,k+=d*M,l+=d*N,m+=d*O,n+=d*P,o+=d*Q,p+=d*R,q+=d*S,r+=d*T,s+=d*U,t+=d*V,u+=d*W,v+=d*X,w+=d*Y,x+=d*Z,j+=(d=b[4])*K,k+=d*L,l+=d*M,m+=d*N,n+=d*O,o+=d*P,p+=d*Q,q+=d*R,r+=d*S,s+=d*T,t+=d*U,u+=d*V,v+=d*W,w+=d*X,x+=d*Y,y+=d*Z,k+=(d=b[5])*K,l+=d*L,m+=d*M,n+=d*N,o+=d*O,p+=d*P,q+=d*Q,r+=d*R,s+=d*S,t+=d*T,u+=d*U,v+=d*V,w+=d*W,x+=d*X,y+=d*Y,z+=d*Z,l+=(d=b[6])*K,m+=d*L,n+=d*M,o+=d*N,p+=d*O,q+=d*P,r+=d*Q,s+=d*R,t+=d*S,u+=d*T,v+=d*U,w+=d*V,x+=d*W,y+=d*X,z+=d*Y,A+=d*Z,m+=(d=b[7])*K,n+=d*L,o+=d*M,p+=d*N,q+=d*O,r+=d*P,s+=d*Q,t+=d*R,u+=d*S,v+=d*T,w+=d*U,x+=d*V,y+=d*W,z+=d*X,A+=d*Y,B+=d*Z,n+=(d=b[8])*K,o+=d*L,p+=d*M,q+=d*N,r+=d*O,s+=d*P,t+=d*Q,u+=d*R,v+=d*S,w+=d*T,x+=d*U,y+=d*V,z+=d*W,A+=d*X,B+=d*Y,C+=d*Z,o+=(d=b[9])*K,p+=d*L,q+=d*M,r+=d*N,s+=d*O,t+=d*P,u+=d*Q,v+=d*R,w+=d*S,x+=d*T,y+=d*U,z+=d*V,A+=d*W,B+=d*X,C+=d*Y,D+=d*Z,p+=(d=b[10])*K,q+=d*L,r+=d*M,s+=d*N,t+=d*O,u+=d*P,v+=d*Q,w+=d*R,x+=d*S,y+=d*T,z+=d*U,A+=d*V,B+=d*W,C+=d*X,D+=d*Y,E+=d*Z,q+=(d=b[11])*K,r+=d*L,s+=d*M,t+=d*N,u+=d*O,v+=d*P,w+=d*Q,x+=d*R,y+=d*S,z+=d*T,A+=d*U,B+=d*V,C+=d*W,D+=d*X,E+=d*Y,F+=d*Z,r+=(d=b[12])*K,s+=d*L,t+=d*M,u+=d*N,v+=d*O,w+=d*P,x+=d*Q,y+=d*R,z+=d*S,A+=d*T,B+=d*U,C+=d*V,D+=d*W,E+=d*X,F+=d*Y,G+=d*Z,s+=(d=b[13])*K,t+=d*L,u+=d*M,v+=d*N,w+=d*O,x+=d*P,y+=d*Q,z+=d*R,A+=d*S,B+=d*T,C+=d*U,D+=d*V,E+=d*W,F+=d*X,G+=d*Y,H+=d*Z,t+=(d=b[14])*K,u+=d*L,v+=d*M,w+=d*N,x+=d*O,y+=d*P,z+=d*Q,A+=d*R,B+=d*S,C+=d*T,D+=d*U,E+=d*V,F+=d*W,G+=d*X,H+=d*Y,I+=d*Z,u+=(d=b[15])*K,v+=d*L,w+=d*M,x+=d*N,y+=d*O,z+=d*P,A+=d*Q,B+=d*R,C+=d*S,D+=d*T,E+=d*U,F+=d*V,G+=d*W,H+=d*X,I+=d*Y,J+=d*Z,f+=38*v,g+=38*w,h+=38*x,i+=38*y,j+=38*z,k+=38*A,l+=38*B,m+=38*C,n+=38*D,o+=38*E,p+=38*F,q+=38*G,r+=38*H,s+=38*I,t+=38*J,e=Math.floor((d=f+(e=1)+65535)/65536),f=d-65536*e,e=Math.floor((d=g+e+65535)/65536),g=d-65536*e,e=Math.floor((d=h+e+65535)/65536),h=d-65536*e,e=Math.floor((d=i+e+65535)/65536),i=d-65536*e,e=Math.floor((d=j+e+65535)/65536),j=d-65536*e,e=Math.floor((d=k+e+65535)/65536),k=d-65536*e,e=Math.floor((d=l+e+65535)/65536),l=d-65536*e,e=Math.floor((d=m+e+65535)/65536),m=d-65536*e,e=Math.floor((d=n+e+65535)/65536),n=d-65536*e,e=Math.floor((d=o+e+65535)/65536),o=d-65536*e,e=Math.floor((d=p+e+65535)/65536),p=d-65536*e,e=Math.floor((d=q+e+65535)/65536),q=d-65536*e,e=Math.floor((d=r+e+65535)/65536),r=d-65536*e,e=Math.floor((d=s+e+65535)/65536),s=d-65536*e,e=Math.floor((d=t+e+65535)/65536),t=d-65536*e,e=Math.floor((d=u+e+65535)/65536),u=d-65536*e,f+=e-1+37*(e-1),e=Math.floor((d=f+(e=1)+65535)/65536),f=d-65536*e,e=Math.floor((d=g+e+65535)/65536),g=d-65536*e,e=Math.floor((d=h+e+65535)/65536),h=d-65536*e,e=Math.floor((d=i+e+65535)/65536),i=d-65536*e,e=Math.floor((d=j+e+65535)/65536),j=d-65536*e,e=Math.floor((d=k+e+65535)/65536),k=d-65536*e,e=Math.floor((d=l+e+65535)/65536),l=d-65536*e,e=Math.floor((d=m+e+65535)/65536),m=d-65536*e,e=Math.floor((d=n+e+65535)/65536),n=d-65536*e,e=Math.floor((d=o+e+65535)/65536),o=d-65536*e,e=Math.floor((d=p+e+65535)/65536),p=d-65536*e,e=Math.floor((d=q+e+65535)/65536),q=d-65536*e,e=Math.floor((d=r+e+65535)/65536),r=d-65536*e,e=Math.floor((d=s+e+65535)/65536),s=d-65536*e,e=Math.floor((d=t+e+65535)/65536),t=d-65536*e,e=Math.floor((d=u+e+65535)/65536),u=d-65536*e,f+=e-1+37*(e-1),a[0]=f,a[1]=g,a[2]=h,a[3]=i,a[4]=j,a[5]=k,a[6]=l,a[7]=m,a[8]=n,a[9]=o,a[10]=p,a[11]=q,a[12]=r,a[13]=s,a[14]=t,a[15]=u}},23658:(a,b,c)=>{var d=c(45654);a.exports=d.md=d.md||{},d.md.algorithms=d.md.algorithms||{}},24081:(a,b,c)=>{"use strict";c.d(b,{cK:()=>n});var d=c(76760),e=c.n(d),f=c(20437);global._dbAdapter||(global._dbAdapter={instance:null,initPromise:null,logged:!1,lastDriverError:null});let g=global._dbAdapter;async function h(){try{let{createRequire:a}=await Promise.resolve().then(c.t.bind(c,98995,23)),b=a(e().join(f.Rf,"_noop.js"))("better-sqlite3");return b?.default??b}catch{}try{let a=await Promise.resolve().then(c.t.bind(c,87550,23));return a?.default??a}catch{return null}}async function i(){if(!process.versions.bun)return null;try{let{createBunSqliteAdapter:a}=await c.e(8062).then(c.bind(c,38062));return await a(f.AL)}catch(a){return g.lastDriverError=`bun:sqlite: ${a.message}`,console.warn(`[DB] bun:sqlite unavailable: ${a.message}`),null}}async function j(){if(process.versions.bun)return null;let[a]=process.versions.node.split(".").map(Number);if(a>=24)return null;try{let a=await h();if(!a)throw Error("not installed (runtime copy and bare specifier both missing)");let{createBetterSqliteAdapter:b}=await c.e(8469).then(c.bind(c,88469));return b(f.AL,a)}catch(a){return g.lastDriverError=`better-sqlite3: ${a.message}`,console.warn(`[DB] better-sqlite3 unavailable: ${a.message}`),null}}async function k(){if(process.versions.bun)return null;let[a,b]=process.versions.node.split(".").map(Number);if(a<22||22===a&&b<5)return null;try{let{createNodeSqliteAdapter:a}=await c.e(4803).then(c.bind(c,54803));return await a(f.AL)}catch(a){return g.lastDriverError=`node:sqlite: ${a.message}`,console.warn(`[DB] node:sqlite unavailable: ${a.message}`),null}}async function l(){try{let{createSqlJsAdapter:a}=await c.e(6252).then(c.bind(c,66252));return await a(f.AL)}catch(a){return g.lastDriverError=`sql.js: ${a.message}`,console.warn(`[DB] sql.js unavailable: ${a.message}`),null}}async function m(){(0,f.Jh)();let a=await i();if(a||(a=await j()),a||(a=await k()),a||(a=await l()),!a)throw Error("[DB] No SQLite driver available (bun/better/node/sql.js all failed)");g.logged||(console.log(`[DB] Driver: ${a.driver} | file: ${f.AL}`),g.logged=!0);let{runMigrationOnce:b}=await c.e(1386).then(c.bind(c,21386));return await b(a),a}async function n(){return g.instance?g.instance:(g.initPromise||(g.initPromise=m().then(a=>(g.instance=a,a))),g.initPromise)}},24464:a=>{"use strict";a.exports={TOOL_HOSTS:{antigravity:["daily-cloudcode-pa.googleapis.com","cloudcode-pa.googleapis.com"],copilot:["api.individual.githubcopilot.com"],kiro:["runtime.us-east-1.kiro.dev","q.us-east-1.amazonaws.com","codewhisperer.us-east-1.amazonaws.com"],cursor:["api2.cursor.sh"]}}},24547:(a,b,c)=>{var d=c(45654);c(63070);var e=d.asn1;b.privateKeyValidator={name:"PrivateKeyInfo",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},b.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{tagClass:e.Class.UNIVERSAL,type:e.Type.BITSTRING,constructed:!1,composed:!0,captureBitStringValue:"ed25519PublicKey"}]}},24985:(a,b,c)=>{var d=c(45654);c(33889),c(29984),c(4554);var e=a.exports=d.pkcs1=d.pkcs1||{};function f(a,b,c){c||(c=d.md.sha1.create());for(var e="",f=Math.ceil(b/c.digestLength),g=0;g<f;++g){var h=String.fromCharCode(g>>24&255,g>>16&255,g>>8&255,255&g);c.start(),c.update(a+h),e+=c.digest().getBytes()}return e.substring(0,b)}e.encode_rsa_oaep=function(a,b,c){"string"==typeof c?(e=c,g=arguments[3]||void 0,h=arguments[4]||void 0):c&&(e=c.label||void 0,g=c.seed||void 0,h=c.md||void 0,c.mgf1&&c.mgf1.md&&(i=c.mgf1.md)),h?h.start():h=d.md.sha1.create(),i||(i=h);var e,g,h,i,j=Math.ceil(a.n.bitLength()/8),k=j-2*h.digestLength-2;if(b.length>k){var l=Error("RSAES-OAEP input message length is too long.");throw l.length=b.length,l.maxLength=k,l}e||(e=""),h.update(e,"raw");for(var m=h.digest(),n="",o=k-b.length,p=0;p<o;p++)n+="\0";var q=m.getBytes()+n+"\x01"+b;if(g){if(g.length!==h.digestLength){var l=Error("Invalid RSAES-OAEP seed. The seed length must match the digest length.");throw l.seedLength=g.length,l.digestLength=h.digestLength,l}}else g=d.random.getBytes(h.digestLength);var r=f(g,j-h.digestLength-1,i),s=d.util.xorBytes(q,r,q.length),t=f(s,h.digestLength,i);return"\0"+d.util.xorBytes(g,t,g.length)+s},e.decode_rsa_oaep=function(a,b,c){"string"==typeof c?(e=c,g=arguments[3]||void 0):c&&(e=c.label||void 0,g=c.md||void 0,c.mgf1&&c.mgf1.md&&(h=c.mgf1.md));var e,g,h,i=Math.ceil(a.n.bitLength()/8);if(b.length!==i){var j=Error("RSAES-OAEP encoded message length is invalid.");throw j.length=b.length,j.expectedLength=i,j}if(void 0===g?g=d.md.sha1.create():g.start(),h||(h=g),i<2*g.digestLength+2)throw Error("RSAES-OAEP key is too short for the hash function.");e||(e=""),g.update(e,"raw");for(var k=g.digest().getBytes(),l=b.charAt(0),m=b.substring(1,g.digestLength+1),n=b.substring(1+g.digestLength),o=f(n,g.digestLength,h),p=f(d.util.xorBytes(m,o,m.length),i-g.digestLength-1,h),q=d.util.xorBytes(n,p,n.length),r=q.substring(0,g.digestLength),j="\0"!==l,s=0;s<g.digestLength;++s)j|=k.charAt(s)!==r.charAt(s);for(var t=1,u=g.digestLength,v=g.digestLength;v<q.length;v++){var w=q.charCodeAt(v),x=1&w^1;j|=w&65534*!!t,t&=x,u+=t}if(j||1!==q.charCodeAt(u))throw Error("Invalid RSAES-OAEP padding.");return q.substring(u+1)}},25346:(a,b,c)=>{"use strict";c.d(b,{cV:()=>n});var d=c(94735),e=c(24081),f=c(50743),g=c(8677);c(43556);var h=c(48595);global._pendingRequests||(global._pendingRequests={byModel:{},byAccount:{}}),global._lastErrorProvider||(global._lastErrorProvider={provider:"",ts:0}),global._statsEmitter||(global._statsEmitter=new d.EventEmitter,global._statsEmitter.setMaxListeners(50)),global._pendingTimers||(global._pendingTimers={}),global._recentRing||(global._recentRing={items:[],initialized:!1}),global._connectionMapCache||(global._connectionMapCache={map:{},ts:0}),global._statsEmitTimers||(global._statsEmitTimers={pending:null,update:null}),global._pendingRequests,global._lastErrorProvider,global._pendingTimers,global._recentRing,global._connectionMapCache;let i=global._statsEmitTimers,j=global._statsEmitter;async function k(a,b,d){if(!d||!a||!b)return 0;try{let{getPricingForModel:e}=await Promise.resolve().then(c.bind(c,90181)),f=await e(a,b);if(!f)return 0;let{calculateCostFromTokens:g}=await c.e(539).then(c.bind(c,40539));return g(d,f)}catch(a){return console.error("Error calculating cost:",a),0}}let l="usageCostRepair";async function m({limit:a=2e4,version:b=h.vQ.version}={}){let c=await (0,e.cK)(),d=(0,f.q)(await (0,g.IQ)(l),null),n=d&&d.version===b&&Number(d.lastId)||0,o=c.all("SELECT id FROM usageHistory WHERE id > ? ORDER BY id ASC LIMIT ?",[n,a]);if(!o.length)return d&&d.version===b||await (0,g.iZ)(l,(0,f.s)({version:b,lastId:n})),{scanned:0,repaired:0};let p=o[o.length-1].id,q=c.all(`SELECT id, timestamp, provider, model, connectionId, apiKeyHash, endpoint, tokens,
21
+ `;return new Promise((a,b)=>{d(`powershell -NoProfile -NonInteractive -ExecutionPolicy Bypass -Command ${h(c)}`,{windowsHide:!0},(c,d,e)=>{if(c){let a=e||c.message;a.includes("canceled by the user")||a.includes("operation was canceled")?b(Error("User canceled UAC prompt")):b(Error(a))}else a(d)})})},quotePs:h}},15529:(a,b,c)=>{var d=c(45654);c(41702),a.exports=d.mgf=d.mgf||{},d.mgf.mgf1=d.mgf1},15873:(a,b,c)=>{var d=c(45654);c(63070),c(76632),c(36105),c(56416),c(20308),c(29984),c(10401),c(4554),c(33889),c(65737);var e=d.asn1,f=d.pki,g=a.exports=d.pkcs12=d.pkcs12||{},h={name:"ContentInfo",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"ContentInfo.contentType",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"contentType"},{name:"ContentInfo.content",tagClass:e.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"content"}]},i={name:"PFX",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.version",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,constructed:!1,capture:"version"},h,{name:"PFX.macData",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,optional:!0,captureAsn1:"mac",value:[{name:"PFX.macData.mac",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PFX.macData.mac.digestAlgorithm.algorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"macAlgorithm"},{name:"PFX.macData.mac.digestAlgorithm.parameters",optional:!0,tagClass:e.Class.UNIVERSAL,captureAsn1:"macAlgorithmParameters"}]},{name:"PFX.macData.mac.digest",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"macDigest"}]},{name:"PFX.macData.macSalt",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"macSalt"},{name:"PFX.macData.iterations",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,constructed:!1,optional:!0,capture:"macIterations"}]}]},j={name:"SafeBag",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"SafeBag.bagId",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"bagId"},{name:"SafeBag.bagValue",tagClass:e.Class.CONTEXT_SPECIFIC,constructed:!0,captureAsn1:"bagValue"},{name:"SafeBag.bagAttributes",tagClass:e.Class.UNIVERSAL,type:e.Type.SET,constructed:!0,optional:!0,capture:"bagAttributes"}]},k={name:"Attribute",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"Attribute.attrId",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"oid"},{name:"Attribute.attrValues",tagClass:e.Class.UNIVERSAL,type:e.Type.SET,constructed:!0,capture:"values"}]},l={name:"CertBag",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"CertBag.certId",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"certId"},{name:"CertBag.certValue",tagClass:e.Class.CONTEXT_SPECIFIC,constructed:!0,value:[{name:"CertBag.certValue[0]",tagClass:e.Class.UNIVERSAL,type:e.Class.OCTETSTRING,constructed:!1,capture:"cert"}]}]};function m(a,b,c,d){for(var e=[],f=0;f<a.length;f++)for(var g=0;g<a[f].safeBags.length;g++){var h=a[f].safeBags[g];if(void 0===d||h.type===d){if(null===b){e.push(h);continue}void 0!==h.attributes[b]&&h.attributes[b].indexOf(c)>=0&&e.push(h)}}return e}function n(a){if(a.composed||a.constructed){for(var b=d.util.createBuffer(),c=0;c<a.value.length;++c)b.putBytes(a.value[c].value);a.composed=a.constructed=!1,a.value=b.getBytes()}return a}g.pkcs12FromAsn1=function(a,b,c){"string"==typeof b?(c=b,b=!0):void 0===b&&(b=!0);var o={};if(!e.validate(a,i,o,[])){var p=Error("Cannot read PKCS#12 PFX. ASN.1 object is not an PKCS#12 PFX.");throw p.errors=p,p}var q={version:o.version.charCodeAt(0),safeContents:[],getBags:function(a){var b,c={};return"localKeyId"in a?b=a.localKeyId:"localKeyIdHex"in a&&(b=d.util.hexToBytes(a.localKeyIdHex)),void 0===b&&!("friendlyName"in a)&&"bagType"in a&&(c[a.bagType]=m(q.safeContents,null,null,a.bagType)),void 0!==b&&(c.localKeyId=m(q.safeContents,"localKeyId",b,a.bagType)),"friendlyName"in a&&(c.friendlyName=m(q.safeContents,"friendlyName",a.friendlyName,a.bagType)),c},getBagsByFriendlyName:function(a,b){return m(q.safeContents,"friendlyName",a,b)},getBagsByLocalKeyId:function(a,b){return m(q.safeContents,"localKeyId",a,b)}};if(3!==o.version.charCodeAt(0)){var p=Error("PKCS#12 PFX of version other than 3 not supported.");throw p.version=o.version.charCodeAt(0),p}if(e.derToOid(o.contentType)!==f.oids.data){var p=Error("Only PKCS#12 PFX in password integrity mode supported.");throw p.oid=e.derToOid(o.contentType),p}var r=o.content.value[0];if(r.tagClass!==e.Class.UNIVERSAL||r.type!==e.Type.OCTETSTRING)throw Error("PKCS#12 authSafe content data is not an OCTET STRING.");if(r=n(r),o.mac){var s=null,t=0,u=e.derToOid(o.macAlgorithm);switch(u){case f.oids.sha1:s=d.md.sha1.create(),t=20;break;case f.oids.sha256:s=d.md.sha256.create(),t=32;break;case f.oids.sha384:s=d.md.sha384.create(),t=48;break;case f.oids.sha512:s=d.md.sha512.create(),t=64;break;case f.oids.md5:s=d.md.md5.create(),t=16}if(null===s)throw Error("PKCS#12 uses unsupported MAC algorithm: "+u);var v=new d.util.ByteBuffer(o.macSalt),w="macIterations"in o?parseInt(d.util.bytesToHex(o.macIterations),16):1,x=g.generateKey(c,v,3,w,t,s),y=d.hmac.create();if(y.start(s,x),y.update(r.value),y.getMac().getBytes()!==o.macDigest)throw Error("PKCS#12 MAC could not be verified. Invalid password?")}else if(Array.isArray(a.value)&&a.value.length>2)throw Error("Invalid PKCS#12. macData field present but MAC was not validated.");return function(a,b,c,g){if((b=e.fromDer(b,c)).tagClass!==e.Class.UNIVERSAL||b.type!==e.Type.SEQUENCE||!0!==b.constructed)throw Error("PKCS#12 AuthenticatedSafe expected to be a SEQUENCE OF ContentInfo");for(var i=0;i<b.value.length;i++){var m=b.value[i],o={},p=[];if(!e.validate(m,h,o,p)){var q=Error("Cannot read ContentInfo.");throw q.errors=p,q}var r={encrypted:!1},s=null,t=o.content.value[0];switch(e.derToOid(o.contentType)){case f.oids.data:if(t.tagClass!==e.Class.UNIVERSAL||t.type!==e.Type.OCTETSTRING)throw Error("PKCS#12 SafeContents Data is not an OCTET STRING.");s=n(t).value;break;case f.oids.encryptedData:s=function(a,b){var c={},g=[];if(!e.validate(a,d.pkcs7.asn1.encryptedDataValidator,c,g)){var h=Error("Cannot read EncryptedContentInfo.");throw h.errors=g,h}var i=e.derToOid(c.contentType);if(i!==f.oids.data){var h=Error("PKCS#12 EncryptedContentInfo ContentType is not Data.");throw h.oid=i,h}i=e.derToOid(c.encAlgorithm);var j=f.pbe.getCipher(i,c.encParameter,b),k=n(c.encryptedContentAsn1),l=d.util.createBuffer(k.value);if(j.update(l),!j.finish())throw Error("Failed to decrypt PKCS#12 SafeContents.");return j.output.getBytes()}(t,g),r.encrypted=!0;break;default:var q=Error("Unsupported PKCS#12 contentType.");throw q.contentType=e.derToOid(o.contentType),q}r.safeBags=function(a,b,c){if(!b&&0===a.length)return[];if((a=e.fromDer(a,b)).tagClass!==e.Class.UNIVERSAL||a.type!==e.Type.SEQUENCE||!0!==a.constructed)throw Error("PKCS#12 SafeContents expected to be a SEQUENCE OF SafeBag.");for(var d=[],g=0;g<a.value.length;g++){var h,i,m=a.value[g],n={},o=[];if(!e.validate(m,j,n,o)){var p=Error("Cannot read SafeBag.");throw p.errors=o,p}var q={type:e.derToOid(n.bagId),attributes:function(a){var b={};if(void 0!==a)for(var c=0;c<a.length;++c){var d={},g=[];if(!e.validate(a[c],k,d,g)){var h=Error("Cannot read PKCS#12 BagAttribute.");throw h.errors=g,h}var i=e.derToOid(d.oid);if(void 0!==f.oids[i]){b[f.oids[i]]=[];for(var j=0;j<d.values.length;++j)b[f.oids[i]].push(d.values[j].value)}}return b}(n.bagAttributes)};d.push(q);var r=n.bagValue.value[0];switch(q.type){case f.oids.pkcs8ShroudedKeyBag:if(null===(r=f.decryptPrivateKeyInfo(r,c)))throw Error("Unable to decrypt PKCS#8 ShroudedKeyBag, wrong password?");case f.oids.keyBag:try{q.key=f.privateKeyFromAsn1(r)}catch(a){q.key=null,q.asn1=r}continue;case f.oids.certBag:h=l,i=function(){if(e.derToOid(n.certId)!==f.oids.x509Certificate){var a=Error("Unsupported certificate type, only X.509 supported.");throw a.oid=e.derToOid(n.certId),a}var c=e.fromDer(n.cert,b);try{q.cert=f.certificateFromAsn1(c,!0)}catch(a){q.cert=null,q.asn1=c}};break;default:var p=Error("Unsupported PKCS#12 SafeBag type.");throw p.oid=q.type,p}if(void 0!==h&&!e.validate(r,h,n,o)){var p=Error("Cannot read PKCS#12 "+h.name);throw p.errors=o,p}i()}return d}(s,c,g),a.safeContents.push(r)}}(q,r.value,b,c),q},g.toPkcs12Asn1=function(a,b,c,h){(h=h||{}).saltSize=h.saltSize||8,h.count=h.count||2048,h.algorithm=h.algorithm||h.encAlgorithm||"aes128","useMac"in h||(h.useMac=!0),"localKeyId"in h||(h.localKeyId=null),"generateLocalKeyId"in h||(h.generateLocalKeyId=!0);var i,j,k=h.localKeyId;if(null!==k)k=d.util.hexToBytes(k);else if(h.generateLocalKeyId)if(b){var l=d.util.isArray(b)?b[0]:b;"string"==typeof l&&(l=f.certificateFromPem(l));var m=d.md.sha1.create();m.update(e.toDer(f.certificateToAsn1(l)).getBytes()),k=m.digest().getBytes()}else k=d.random.getBytes(20);var n=[];null!==k&&n.push(e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(f.oids.localKeyId).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SET,!0,[e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,k)])])),"friendlyName"in h&&n.push(e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(f.oids.friendlyName).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SET,!0,[e.create(e.Class.UNIVERSAL,e.Type.BMPSTRING,!1,h.friendlyName)])])),n.length>0&&(i=e.create(e.Class.UNIVERSAL,e.Type.SET,!0,n));var o=[],p=[];null!==b&&(p=d.util.isArray(b)?b:[b]);for(var q=[],r=0;r<p.length;++r){"string"==typeof(b=p[r])&&(b=f.certificateFromPem(b));var s=0===r?i:void 0,t=f.certificateToAsn1(b),u=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(f.oids.certBag).getBytes()),e.create(e.Class.CONTEXT_SPECIFIC,0,!0,[e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(f.oids.x509Certificate).getBytes()),e.create(e.Class.CONTEXT_SPECIFIC,0,!0,[e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,e.toDer(t).getBytes())])])]),s]);q.push(u)}if(q.length>0){var v=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,q),w=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(f.oids.data).getBytes()),e.create(e.Class.CONTEXT_SPECIFIC,0,!0,[e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,e.toDer(v).getBytes())])]);o.push(w)}var x=null;if(null!==a){var y=f.wrapRsaPrivateKey(f.privateKeyToAsn1(a));x=null===c?e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(f.oids.keyBag).getBytes()),e.create(e.Class.CONTEXT_SPECIFIC,0,!0,[y]),i]):e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(f.oids.pkcs8ShroudedKeyBag).getBytes()),e.create(e.Class.CONTEXT_SPECIFIC,0,!0,[f.encryptPrivateKeyInfo(y,c,h)]),i]);var z=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[x]),A=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(f.oids.data).getBytes()),e.create(e.Class.CONTEXT_SPECIFIC,0,!0,[e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,e.toDer(z).getBytes())])]);o.push(A)}var B=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,o);if(h.useMac){var m=d.md.sha1.create(),C=new d.util.ByteBuffer(d.random.getBytes(h.saltSize)),D=h.count,a=g.generateKey(c,C,3,D,20),E=d.hmac.create();E.start(m,a),E.update(e.toDer(B).getBytes());var F=E.getMac();j=e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(f.oids.sha1).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.NULL,!1,"")]),e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,F.getBytes())]),e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,C.getBytes()),e.create(e.Class.UNIVERSAL,e.Type.INTEGER,!1,e.integerToDer(D).getBytes())])}return e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.INTEGER,!1,e.integerToDer(3).getBytes()),e.create(e.Class.UNIVERSAL,e.Type.SEQUENCE,!0,[e.create(e.Class.UNIVERSAL,e.Type.OID,!1,e.oidToDer(f.oids.data).getBytes()),e.create(e.Class.CONTEXT_SPECIFIC,0,!0,[e.create(e.Class.UNIVERSAL,e.Type.OCTETSTRING,!1,e.toDer(B).getBytes())])]),j])},g.generateKey=d.pbe.generatePkcs12Key},19396:(a,b,c)=>{var d=c(45654);c(33889),d.cipher=d.cipher||{};var e=a.exports=d.cipher.modes=d.cipher.modes||{};function f(a,b){if("string"==typeof a&&(a=d.util.createBuffer(a)),d.util.isArray(a)&&a.length>4){var c=a;a=d.util.createBuffer();for(var e=0;e<c.length;++e)a.putByte(c[e])}if(a.length()<b)throw Error("Invalid IV length; got "+a.length()+" bytes and expected "+b+" bytes.");if(!d.util.isArray(a)){for(var f=[],g=b/4,e=0;e<g;++e)f.push(a.getInt32());a=f}return a}function g(a){a[a.length-1]=a[a.length-1]+1|0}function h(a){return[a/0x100000000|0,0|a]}e.ecb=function(a){a=a||{},this.name="ECB",this.cipher=a.cipher,this.blockSize=a.blockSize||16,this._ints=this.blockSize/4,this._inBlock=Array(this._ints),this._outBlock=Array(this._ints)},e.ecb.prototype.start=function(a){},e.ecb.prototype.encrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&a.length()>0))return!0;for(var d=0;d<this._ints;++d)this._inBlock[d]=a.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(var d=0;d<this._ints;++d)b.putInt32(this._outBlock[d])},e.ecb.prototype.decrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&a.length()>0))return!0;for(var d=0;d<this._ints;++d)this._inBlock[d]=a.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(var d=0;d<this._ints;++d)b.putInt32(this._outBlock[d])},e.ecb.prototype.pad=function(a,b){var c=a.length()===this.blockSize?this.blockSize:this.blockSize-a.length();return a.fillWithByte(c,c),!0},e.ecb.prototype.unpad=function(a,b){if(b.overflow>0)return!1;var c=a.length(),d=a.at(c-1);return!(d>this.blockSize<<2)&&(a.truncate(d),!0)},e.cbc=function(a){a=a||{},this.name="CBC",this.cipher=a.cipher,this.blockSize=a.blockSize||16,this._ints=this.blockSize/4,this._inBlock=Array(this._ints),this._outBlock=Array(this._ints)},e.cbc.prototype.start=function(a){if(null===a.iv){if(!this._prev)throw Error("Invalid IV parameter.");this._iv=this._prev.slice(0)}else if("iv"in a)this._iv=f(a.iv,this.blockSize),this._prev=this._iv.slice(0);else throw Error("Invalid IV parameter.")},e.cbc.prototype.encrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&a.length()>0))return!0;for(var d=0;d<this._ints;++d)this._inBlock[d]=this._prev[d]^a.getInt32();this.cipher.encrypt(this._inBlock,this._outBlock);for(var d=0;d<this._ints;++d)b.putInt32(this._outBlock[d]);this._prev=this._outBlock},e.cbc.prototype.decrypt=function(a,b,c){if(a.length()<this.blockSize&&!(c&&a.length()>0))return!0;for(var d=0;d<this._ints;++d)this._inBlock[d]=a.getInt32();this.cipher.decrypt(this._inBlock,this._outBlock);for(var d=0;d<this._ints;++d)b.putInt32(this._prev[d]^this._outBlock[d]);this._prev=this._inBlock.slice(0)},e.cbc.prototype.pad=function(a,b){var c=a.length()===this.blockSize?this.blockSize:this.blockSize-a.length();return a.fillWithByte(c,c),!0},e.cbc.prototype.unpad=function(a,b){if(b.overflow>0)return!1;var c=a.length(),d=a.at(c-1);return!(d>this.blockSize<<2)&&(a.truncate(d),!0)},e.cfb=function(a){a=a||{},this.name="CFB",this.cipher=a.cipher,this.blockSize=a.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=Array(this._ints),this._partialBlock=Array(this._ints),this._partialOutput=d.util.createBuffer(),this._partialBytes=0},e.cfb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=f(a.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},e.cfb.prototype.encrypt=function(a,b,c){var d=a.length();if(0===d)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&d>=this.blockSize){for(var e=0;e<this._ints;++e)this._inBlock[e]=a.getInt32()^this._outBlock[e],b.putInt32(this._inBlock[e]);return}var f=(this.blockSize-d)%this.blockSize;f>0&&(f=this.blockSize-f),this._partialOutput.clear();for(var e=0;e<this._ints;++e)this._partialBlock[e]=a.getInt32()^this._outBlock[e],this._partialOutput.putInt32(this._partialBlock[e]);if(f>0)a.read-=this.blockSize;else for(var e=0;e<this._ints;++e)this._inBlock[e]=this._partialBlock[e];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),f>0&&!c)return b.putBytes(this._partialOutput.getBytes(f-this._partialBytes)),this._partialBytes=f,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes)),this._partialBytes=0},e.cfb.prototype.decrypt=function(a,b,c){var d=a.length();if(0===d)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&d>=this.blockSize){for(var e=0;e<this._ints;++e)this._inBlock[e]=a.getInt32(),b.putInt32(this._inBlock[e]^this._outBlock[e]);return}var f=(this.blockSize-d)%this.blockSize;f>0&&(f=this.blockSize-f),this._partialOutput.clear();for(var e=0;e<this._ints;++e)this._partialBlock[e]=a.getInt32(),this._partialOutput.putInt32(this._partialBlock[e]^this._outBlock[e]);if(f>0)a.read-=this.blockSize;else for(var e=0;e<this._ints;++e)this._inBlock[e]=this._partialBlock[e];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),f>0&&!c)return b.putBytes(this._partialOutput.getBytes(f-this._partialBytes)),this._partialBytes=f,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes)),this._partialBytes=0},e.ofb=function(a){a=a||{},this.name="OFB",this.cipher=a.cipher,this.blockSize=a.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=Array(this._ints),this._partialOutput=d.util.createBuffer(),this._partialBytes=0},e.ofb.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=f(a.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},e.ofb.prototype.encrypt=function(a,b,c){var d=a.length();if(0===a.length())return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&d>=this.blockSize){for(var e=0;e<this._ints;++e)b.putInt32(a.getInt32()^this._outBlock[e]),this._inBlock[e]=this._outBlock[e];return}var f=(this.blockSize-d)%this.blockSize;f>0&&(f=this.blockSize-f),this._partialOutput.clear();for(var e=0;e<this._ints;++e)this._partialOutput.putInt32(a.getInt32()^this._outBlock[e]);if(f>0)a.read-=this.blockSize;else for(var e=0;e<this._ints;++e)this._inBlock[e]=this._outBlock[e];if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),f>0&&!c)return b.putBytes(this._partialOutput.getBytes(f-this._partialBytes)),this._partialBytes=f,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes)),this._partialBytes=0},e.ofb.prototype.decrypt=e.ofb.prototype.encrypt,e.ctr=function(a){a=a||{},this.name="CTR",this.cipher=a.cipher,this.blockSize=a.blockSize||16,this._ints=this.blockSize/4,this._inBlock=null,this._outBlock=Array(this._ints),this._partialOutput=d.util.createBuffer(),this._partialBytes=0},e.ctr.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");this._iv=f(a.iv,this.blockSize),this._inBlock=this._iv.slice(0),this._partialBytes=0},e.ctr.prototype.encrypt=function(a,b,c){var d=a.length();if(0===d)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&d>=this.blockSize)for(var e=0;e<this._ints;++e)b.putInt32(a.getInt32()^this._outBlock[e]);else{var f=(this.blockSize-d)%this.blockSize;f>0&&(f=this.blockSize-f),this._partialOutput.clear();for(var e=0;e<this._ints;++e)this._partialOutput.putInt32(a.getInt32()^this._outBlock[e]);if(f>0&&(a.read-=this.blockSize),this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),f>0&&!c)return b.putBytes(this._partialOutput.getBytes(f-this._partialBytes)),this._partialBytes=f,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes)),this._partialBytes=0}g(this._inBlock)},e.ctr.prototype.decrypt=e.ctr.prototype.encrypt,e.gcm=function(a){a=a||{},this.name="GCM",this.cipher=a.cipher,this.blockSize=a.blockSize||16,this._ints=this.blockSize/4,this._inBlock=Array(this._ints),this._outBlock=Array(this._ints),this._partialOutput=d.util.createBuffer(),this._partialBytes=0,this._R=0xe1000000},e.gcm.prototype.start=function(a){if(!("iv"in a))throw Error("Invalid IV parameter.");var b,c=d.util.createBuffer(a.iv);if(this._cipherLength=0,b="additionalData"in a?d.util.createBuffer(a.additionalData):d.util.createBuffer(),"tagLength"in a?this._tagLength=a.tagLength:this._tagLength=128,this._tag=null,a.decrypt&&(this._tag=d.util.createBuffer(a.tag).getBytes(),this._tag.length!==this._tagLength/8))throw Error("Authentication tag does not match tag length.");this._hashBlock=Array(this._ints),this.tag=null,this._hashSubkey=Array(this._ints),this.cipher.encrypt([0,0,0,0],this._hashSubkey),this.componentBits=4,this._m=this.generateHashTable(this._hashSubkey,this.componentBits);var e=c.length();if(12===e)this._j0=[c.getInt32(),c.getInt32(),c.getInt32(),1];else{for(this._j0=[0,0,0,0];c.length()>0;)this._j0=this.ghash(this._hashSubkey,this._j0,[c.getInt32(),c.getInt32(),c.getInt32(),c.getInt32()]);this._j0=this.ghash(this._hashSubkey,this._j0,[0,0].concat(h(8*e)))}this._inBlock=this._j0.slice(0),g(this._inBlock),this._partialBytes=0,b=d.util.createBuffer(b),this._aDataLength=h(8*b.length());var f=b.length()%this.blockSize;for(f&&b.fillWithByte(0,this.blockSize-f),this._s=[0,0,0,0];b.length()>0;)this._s=this.ghash(this._hashSubkey,this._s,[b.getInt32(),b.getInt32(),b.getInt32(),b.getInt32()])},e.gcm.prototype.encrypt=function(a,b,c){var d=a.length();if(0===d)return!0;if(this.cipher.encrypt(this._inBlock,this._outBlock),0===this._partialBytes&&d>=this.blockSize){for(var e=0;e<this._ints;++e)b.putInt32(this._outBlock[e]^=a.getInt32());this._cipherLength+=this.blockSize}else{var f=(this.blockSize-d)%this.blockSize;f>0&&(f=this.blockSize-f),this._partialOutput.clear();for(var e=0;e<this._ints;++e)this._partialOutput.putInt32(a.getInt32()^this._outBlock[e]);if(f<=0||c){if(c){var h=d%this.blockSize;this._cipherLength+=h,this._partialOutput.truncate(this.blockSize-h)}else this._cipherLength+=this.blockSize;for(var e=0;e<this._ints;++e)this._outBlock[e]=this._partialOutput.getInt32();this._partialOutput.read-=this.blockSize}if(this._partialBytes>0&&this._partialOutput.getBytes(this._partialBytes),f>0&&!c)return a.read-=this.blockSize,b.putBytes(this._partialOutput.getBytes(f-this._partialBytes)),this._partialBytes=f,!0;b.putBytes(this._partialOutput.getBytes(d-this._partialBytes)),this._partialBytes=0}this._s=this.ghash(this._hashSubkey,this._s,this._outBlock),g(this._inBlock)},e.gcm.prototype.decrypt=function(a,b,c){var d=a.length();if(d<this.blockSize&&!(c&&d>0))return!0;this.cipher.encrypt(this._inBlock,this._outBlock),g(this._inBlock),this._hashBlock[0]=a.getInt32(),this._hashBlock[1]=a.getInt32(),this._hashBlock[2]=a.getInt32(),this._hashBlock[3]=a.getInt32(),this._s=this.ghash(this._hashSubkey,this._s,this._hashBlock);for(var e=0;e<this._ints;++e)b.putInt32(this._outBlock[e]^this._hashBlock[e]);d<this.blockSize?this._cipherLength+=d%this.blockSize:this._cipherLength+=this.blockSize},e.gcm.prototype.afterFinish=function(a,b){var c=!0;b.decrypt&&b.overflow&&a.truncate(this.blockSize-b.overflow),this.tag=d.util.createBuffer();var e=this._aDataLength.concat(h(8*this._cipherLength));this._s=this.ghash(this._hashSubkey,this._s,e);var f=[];this.cipher.encrypt(this._j0,f);for(var g=0;g<this._ints;++g)this.tag.putInt32(this._s[g]^f[g]);return this.tag.truncate(this.tag.length()%(this._tagLength/8)),b.decrypt&&this.tag.bytes()!==this._tag&&(c=!1),c},e.gcm.prototype.multiply=function(a,b){for(var c=[0,0,0,0],d=b.slice(0),e=0;e<128;++e)a[e/32|0]&1<<31-e%32&&(c[0]^=d[0],c[1]^=d[1],c[2]^=d[2],c[3]^=d[3]),this.pow(d,d);return c},e.gcm.prototype.pow=function(a,b){for(var c=1&a[3],d=3;d>0;--d)b[d]=a[d]>>>1|(1&a[d-1])<<31;b[0]=a[0]>>>1,c&&(b[0]^=this._R)},e.gcm.prototype.tableMultiply=function(a){for(var b=[0,0,0,0],c=0;c<32;++c){var d=a[c/8|0]>>>(7-c%8)*4&15,e=this._m[c][d];b[0]^=e[0],b[1]^=e[1],b[2]^=e[2],b[3]^=e[3]}return b},e.gcm.prototype.ghash=function(a,b,c){return b[0]^=c[0],b[1]^=c[1],b[2]^=c[2],b[3]^=c[3],this.tableMultiply(b)},e.gcm.prototype.generateHashTable=function(a,b){for(var c=8/b,d=4*c,e=16*c,f=Array(e),g=0;g<e;++g){var h=[0,0,0,0],i=g/d|0,j=(d-1-g%d)*b;h[i]=1<<b-1<<j,f[g]=this.generateSubHashTable(this.multiply(h,a),b)}return f},e.gcm.prototype.generateSubHashTable=function(a,b){var c=1<<b,d=c>>>1,e=Array(c);e[d]=a.slice(0);for(var f=d>>>1;f>0;)this.pow(e[2*f],e[f]=[]),f>>=1;for(f=2;f<d;){for(var g=1;g<f;++g){var h=e[f],i=e[g];e[f+g]=[h[0]^i[0],h[1]^i[1],h[2]^i[2],h[3]^i[3]]}f*=2}for(e[0]=[0,0,0,0],f=d+1;f<c;++f){var j=e[f^d];e[f]=[a[0]^j[0],a[1]^j[1],a[2]^j[2],a[3]^j[3]]}return e}},20096:a=>{var b={};a.exports=b;var c={};b.encode=function(a,b,c){if("string"!=typeof b)throw TypeError('"alphabet" must be a string.');if(void 0!==c&&"number"!=typeof c)throw TypeError('"maxline" must be a number.');var d="";if(a instanceof Uint8Array){var e=0,f=b.length,g=b.charAt(0),h=[0];for(e=0;e<a.length;++e){for(var i=0,j=a[e];i<h.length;++i)j+=h[i]<<8,h[i]=j%f,j=j/f|0;for(;j>0;)h.push(j%f),j=j/f|0}for(e=0;0===a[e]&&e<a.length-1;++e)d+=g;for(e=h.length-1;e>=0;--e)d+=b[h[e]]}else d=function(a,b){var c=0,d=b.length,e=b.charAt(0),f=[0];for(c=0;c<a.length();++c){for(var g=0,h=a.at(c);g<f.length;++g)h+=f[g]<<8,f[g]=h%d,h=h/d|0;for(;h>0;)f.push(h%d),h=h/d|0}var i="";for(c=0;0===a.at(c)&&c<a.length()-1;++c)i+=e;for(c=f.length-1;c>=0;--c)i+=b[f[c]];return i}(a,b);if(c){var k=RegExp(".{1,"+c+"}","g");d=d.match(k).join("\r\n")}return d},b.decode=function(a,b){if("string"!=typeof a)throw TypeError('"input" must be a string.');if("string"!=typeof b)throw TypeError('"alphabet" must be a string.');var d=c[b];if(!d){d=c[b]=[];for(var e=0;e<b.length;++e)d[b.charCodeAt(e)]=e}a=a.replace(/\s/g,"");for(var f=b.length,g=b.charAt(0),h=[0],e=0;e<a.length;e++){var i=d[a.charCodeAt(e)];if(void 0===i)return;for(var j=0,k=i;j<h.length;++j)k+=h[j]*f,h[j]=255&k,k>>=8;for(;k>0;)h.push(255&k),k>>=8}for(var l=0;a[l]===g&&l<a.length-1;++l)h.push(0);return"u">typeof Buffer?Buffer.from(h.reverse()):new Uint8Array(h.reverse())}},20308:(a,b,c)=>{var d=c(45654);if(c(45518),c(63070),c(88819),c(23658),c(36105),c(70710),c(49345),c(29984),c(67382),c(10401),c(33889),void 0===e)var e=d.jsbn.BigInteger;var f=d.asn1,g=d.pki=d.pki||{};a.exports=g.pbe=d.pbe=d.pbe||{};var h=g.oids,i={name:"EncryptedPrivateKeyInfo",tagClass:f.Class.UNIVERSAL,type:f.Type.SEQUENCE,constructed:!0,value:[{name:"EncryptedPrivateKeyInfo.encryptionAlgorithm",tagClass:f.Class.UNIVERSAL,type:f.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:f.Class.UNIVERSAL,type:f.Type.OID,constructed:!1,capture:"encryptionOid"},{name:"AlgorithmIdentifier.parameters",tagClass:f.Class.UNIVERSAL,type:f.Type.SEQUENCE,constructed:!0,captureAsn1:"encryptionParams"}]},{name:"EncryptedPrivateKeyInfo.encryptedData",tagClass:f.Class.UNIVERSAL,type:f.Type.OCTETSTRING,constructed:!1,capture:"encryptedData"}]},j={name:"PBES2Algorithms",tagClass:f.Class.UNIVERSAL,type:f.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc",tagClass:f.Class.UNIVERSAL,type:f.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.keyDerivationFunc.oid",tagClass:f.Class.UNIVERSAL,type:f.Type.OID,constructed:!1,capture:"kdfOid"},{name:"PBES2Algorithms.params",tagClass:f.Class.UNIVERSAL,type:f.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.params.salt",tagClass:f.Class.UNIVERSAL,type:f.Type.OCTETSTRING,constructed:!1,capture:"kdfSalt"},{name:"PBES2Algorithms.params.iterationCount",tagClass:f.Class.UNIVERSAL,type:f.Type.INTEGER,constructed:!1,capture:"kdfIterationCount"},{name:"PBES2Algorithms.params.keyLength",tagClass:f.Class.UNIVERSAL,type:f.Type.INTEGER,constructed:!1,optional:!0,capture:"keyLength"},{name:"PBES2Algorithms.params.prf",tagClass:f.Class.UNIVERSAL,type:f.Type.SEQUENCE,constructed:!0,optional:!0,value:[{name:"PBES2Algorithms.params.prf.algorithm",tagClass:f.Class.UNIVERSAL,type:f.Type.OID,constructed:!1,capture:"prfOid"}]}]}]},{name:"PBES2Algorithms.encryptionScheme",tagClass:f.Class.UNIVERSAL,type:f.Type.SEQUENCE,constructed:!0,value:[{name:"PBES2Algorithms.encryptionScheme.oid",tagClass:f.Class.UNIVERSAL,type:f.Type.OID,constructed:!1,capture:"encOid"},{name:"PBES2Algorithms.encryptionScheme.iv",tagClass:f.Class.UNIVERSAL,type:f.Type.OCTETSTRING,constructed:!1,capture:"encIv"}]}]},k={name:"pkcs-12PbeParams",tagClass:f.Class.UNIVERSAL,type:f.Type.SEQUENCE,constructed:!0,value:[{name:"pkcs-12PbeParams.salt",tagClass:f.Class.UNIVERSAL,type:f.Type.OCTETSTRING,constructed:!1,capture:"salt"},{name:"pkcs-12PbeParams.iterations",tagClass:f.Class.UNIVERSAL,type:f.Type.INTEGER,constructed:!1,capture:"iterations"}]};function l(a,b){return a.start().update(b).digest().getBytes()}function m(a){var b;if(a){if(!(b=g.oids[f.derToOid(a)])){var c=Error("Unsupported PRF OID.");throw c.oid=a,c.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],c}}else b="hmacWithSHA1";return n(b)}function n(a){var b=d.md;switch(a){case"hmacWithSHA224":b=d.md.sha512;case"hmacWithSHA1":case"hmacWithSHA256":case"hmacWithSHA384":case"hmacWithSHA512":a=a.substr(8).toLowerCase();break;default:var c=Error("Unsupported PRF algorithm.");throw c.algorithm=a,c.supported=["hmacWithSHA1","hmacWithSHA224","hmacWithSHA256","hmacWithSHA384","hmacWithSHA512"],c}if(!b||!(a in b))throw Error("Unknown hash algorithm: "+a);return b[a].create()}g.encryptPrivateKeyInfo=function(a,b,c){(c=c||{}).saltSize=c.saltSize||8,c.count=c.count||2048,c.algorithm=c.algorithm||"aes128",c.prfAlgorithm=c.prfAlgorithm||"sha1";var e=d.random.getBytesSync(c.saltSize),i=c.count,j=f.integerToDer(i);if(0===c.algorithm.indexOf("aes")||"des"===c.algorithm){switch(c.algorithm){case"aes128":q=16,t=16,u=h["aes128-CBC"],v=d.aes.createEncryptionCipher;break;case"aes192":q=24,t=16,u=h["aes192-CBC"],v=d.aes.createEncryptionCipher;break;case"aes256":q=32,t=16,u=h["aes256-CBC"],v=d.aes.createEncryptionCipher;break;case"des":q=8,t=8,u=h.desCBC,v=d.des.createEncryptionCipher;break;default:var k,l,m,o,p,q,r,s,t,u,v,w=Error("Cannot encrypt private key. Unknown encryption algorithm.");throw w.algorithm=c.algorithm,w}var x="hmacWith"+c.prfAlgorithm.toUpperCase(),y=n(x),z=d.pkcs5.pbkdf2(b,e,i,q,y),A=d.random.getBytesSync(t),B=v(z);B.start(A),B.update(f.toDer(a)),B.finish(),s=B.output.getBytes();var C=(k=e,l=j,m=q,o=x,p=f.create(f.Class.UNIVERSAL,f.Type.SEQUENCE,!0,[f.create(f.Class.UNIVERSAL,f.Type.OCTETSTRING,!1,k),f.create(f.Class.UNIVERSAL,f.Type.INTEGER,!1,l.getBytes())]),"hmacWithSHA1"!==o&&p.value.push(f.create(f.Class.UNIVERSAL,f.Type.INTEGER,!1,d.util.hexToBytes(m.toString(16))),f.create(f.Class.UNIVERSAL,f.Type.SEQUENCE,!0,[f.create(f.Class.UNIVERSAL,f.Type.OID,!1,f.oidToDer(g.oids[o]).getBytes()),f.create(f.Class.UNIVERSAL,f.Type.NULL,!1,"")])),p);r=f.create(f.Class.UNIVERSAL,f.Type.SEQUENCE,!0,[f.create(f.Class.UNIVERSAL,f.Type.OID,!1,f.oidToDer(h.pkcs5PBES2).getBytes()),f.create(f.Class.UNIVERSAL,f.Type.SEQUENCE,!0,[f.create(f.Class.UNIVERSAL,f.Type.SEQUENCE,!0,[f.create(f.Class.UNIVERSAL,f.Type.OID,!1,f.oidToDer(h.pkcs5PBKDF2).getBytes()),C]),f.create(f.Class.UNIVERSAL,f.Type.SEQUENCE,!0,[f.create(f.Class.UNIVERSAL,f.Type.OID,!1,f.oidToDer(u).getBytes()),f.create(f.Class.UNIVERSAL,f.Type.OCTETSTRING,!1,A)])])])}else if("3des"===c.algorithm){q=24;var D=new d.util.ByteBuffer(e),z=g.pbe.generatePkcs12Key(b,D,1,i,q),A=g.pbe.generatePkcs12Key(b,D,2,i,q),B=d.des.createEncryptionCipher(z);B.start(A),B.update(f.toDer(a)),B.finish(),s=B.output.getBytes(),r=f.create(f.Class.UNIVERSAL,f.Type.SEQUENCE,!0,[f.create(f.Class.UNIVERSAL,f.Type.OID,!1,f.oidToDer(h["pbeWithSHAAnd3-KeyTripleDES-CBC"]).getBytes()),f.create(f.Class.UNIVERSAL,f.Type.SEQUENCE,!0,[f.create(f.Class.UNIVERSAL,f.Type.OCTETSTRING,!1,e),f.create(f.Class.UNIVERSAL,f.Type.INTEGER,!1,j.getBytes())])])}else{var w=Error("Cannot encrypt private key. Unknown encryption algorithm.");throw w.algorithm=c.algorithm,w}return f.create(f.Class.UNIVERSAL,f.Type.SEQUENCE,!0,[r,f.create(f.Class.UNIVERSAL,f.Type.OCTETSTRING,!1,s)])},g.decryptPrivateKeyInfo=function(a,b){var c=null,e={},h=[];if(!f.validate(a,i,e,h)){var j=Error("Cannot read encrypted private key. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw j.errors=h,j}var k=f.derToOid(e.encryptionOid),l=g.pbe.getCipher(k,e.encryptionParams,b),m=d.util.createBuffer(e.encryptedData);return l.update(m),l.finish()&&(c=f.fromDer(l.output)),c},g.encryptedPrivateKeyToPem=function(a,b){var c={type:"ENCRYPTED PRIVATE KEY",body:f.toDer(a).getBytes()};return d.pem.encode(c,{maxline:b})},g.encryptedPrivateKeyFromPem=function(a){var b=d.pem.decode(a)[0];if("ENCRYPTED PRIVATE KEY"!==b.type){var c=Error('Could not convert encrypted private key from PEM; PEM header type is "ENCRYPTED PRIVATE KEY".');throw c.headerType=b.type,c}if(b.procType&&"ENCRYPTED"===b.procType.type)throw Error("Could not convert encrypted private key from PEM; PEM is encrypted.");return f.fromDer(b.body)},g.encryptRsaPrivateKey=function(a,b,c){if(!(c=c||{}).legacy){var e,h,i,j,k=g.wrapRsaPrivateKey(g.privateKeyToAsn1(a));return k=g.encryptPrivateKeyInfo(k,b,c),g.encryptedPrivateKeyToPem(k)}switch(c.algorithm){case"aes128":e="AES-128-CBC",i=16,h=d.random.getBytesSync(16),j=d.aes.createEncryptionCipher;break;case"aes192":e="AES-192-CBC",i=24,h=d.random.getBytesSync(16),j=d.aes.createEncryptionCipher;break;case"aes256":e="AES-256-CBC",i=32,h=d.random.getBytesSync(16),j=d.aes.createEncryptionCipher;break;case"3des":e="DES-EDE3-CBC",i=24,h=d.random.getBytesSync(8),j=d.des.createEncryptionCipher;break;case"des":e="DES-CBC",i=8,h=d.random.getBytesSync(8),j=d.des.createEncryptionCipher;break;default:var l=Error('Could not encrypt RSA private key; unsupported encryption algorithm "'+c.algorithm+'".');throw l.algorithm=c.algorithm,l}var m=j(d.pbe.opensslDeriveBytes(b,h.substr(0,8),i));m.start(h),m.update(f.toDer(g.privateKeyToAsn1(a))),m.finish();var n={type:"RSA PRIVATE KEY",procType:{version:"4",type:"ENCRYPTED"},dekInfo:{algorithm:e,parameters:d.util.bytesToHex(h).toUpperCase()},body:m.output.getBytes()};return d.pem.encode(n)},g.decryptRsaPrivateKey=function(a,b){var c=null,e=d.pem.decode(a)[0];if("ENCRYPTED PRIVATE KEY"!==e.type&&"PRIVATE KEY"!==e.type&&"RSA PRIVATE KEY"!==e.type){var h=Error('Could not convert private key from PEM; PEM header type is not "ENCRYPTED PRIVATE KEY", "PRIVATE KEY", or "RSA PRIVATE KEY".');throw h.headerType=h,h}if(e.procType&&"ENCRYPTED"===e.procType.type){switch(e.dekInfo.algorithm){case"DES-CBC":i=8,j=d.des.createDecryptionCipher;break;case"DES-EDE3-CBC":i=24,j=d.des.createDecryptionCipher;break;case"AES-128-CBC":i=16,j=d.aes.createDecryptionCipher;break;case"AES-192-CBC":i=24,j=d.aes.createDecryptionCipher;break;case"AES-256-CBC":i=32,j=d.aes.createDecryptionCipher;break;case"RC2-40-CBC":i=5,j=function(a){return d.rc2.createDecryptionCipher(a,40)};break;case"RC2-64-CBC":i=8,j=function(a){return d.rc2.createDecryptionCipher(a,64)};break;case"RC2-128-CBC":i=16,j=function(a){return d.rc2.createDecryptionCipher(a,128)};break;default:var i,j,h=Error('Could not decrypt private key; unsupported encryption algorithm "'+e.dekInfo.algorithm+'".');throw h.algorithm=e.dekInfo.algorithm,h}var k=d.util.hexToBytes(e.dekInfo.parameters),l=j(d.pbe.opensslDeriveBytes(b,k.substr(0,8),i));if(l.start(k),l.update(d.util.createBuffer(e.body)),!l.finish())return c;c=l.output.getBytes()}else c=e.body;return null!==(c="ENCRYPTED PRIVATE KEY"===e.type?g.decryptPrivateKeyInfo(f.fromDer(c),b):f.fromDer(c))&&(c=g.privateKeyFromAsn1(c)),c},g.pbe.generatePkcs12Key=function(a,b,c,e,f,g){if(null==g){if(!("sha1"in d.md))throw Error('"sha1" hash algorithm unavailable.');g=d.md.sha1.create()}var h,i,j=g.digestLength,k=g.blockLength,l=new d.util.ByteBuffer,m=new d.util.ByteBuffer;if(null!=a){for(i=0;i<a.length;i++)m.putInt16(a.charCodeAt(i));m.putInt16(0)}var n=m.length(),o=b.length(),p=new d.util.ByteBuffer;p.fillWithByte(c,k);var q=k*Math.ceil(o/k),r=new d.util.ByteBuffer;for(i=0;i<q;i++)r.putByte(b.at(i%o));var s=k*Math.ceil(n/k),t=new d.util.ByteBuffer;for(i=0;i<s;i++)t.putByte(m.at(i%n));var u=r;u.putBuffer(t);for(var v=Math.ceil(f/j),w=1;w<=v;w++){var x=new d.util.ByteBuffer;x.putBytes(p.bytes()),x.putBytes(u.bytes());for(var y=0;y<e;y++)g.start(),g.update(x.getBytes()),x=g.digest();var z=new d.util.ByteBuffer;for(i=0;i<k;i++)z.putByte(x.at(i%j));var A=Math.ceil(o/k)+Math.ceil(n/k),B=new d.util.ByteBuffer;for(h=0;h<A;h++){var C=new d.util.ByteBuffer(u.getBytes(k)),D=511;for(i=z.length()-1;i>=0;i--)D>>=8,D+=z.at(i)+C.at(i),C.setAt(i,255&D);B.putBuffer(C)}u=B,l.putBuffer(x)}return l.truncate(l.length()-f),l},g.pbe.getCipher=function(a,b,c){switch(a){case g.oids.pkcs5PBES2:return g.pbe.getCipherForPBES2(a,b,c);case g.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:case g.oids["pbewithSHAAnd40BitRC2-CBC"]:return g.pbe.getCipherForPKCS12PBE(a,b,c);default:var d=Error("Cannot read encrypted PBE data block. Unsupported OID.");throw d.oid=a,d.supportedOids=["pkcs5PBES2","pbeWithSHAAnd3-KeyTripleDES-CBC","pbewithSHAAnd40BitRC2-CBC"],d}},g.pbe.getCipherForPBES2=function(a,b,c){var e,h,i={},k=[];if(!f.validate(b,j,i,k)){var l=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw l.errors=k,l}if((a=f.derToOid(i.kdfOid))!==g.oids.pkcs5PBKDF2){var l=Error("Cannot read encrypted private key. Unsupported key derivation function OID.");throw l.oid=a,l.supportedOids=["pkcs5PBKDF2"],l}if((a=f.derToOid(i.encOid))!==g.oids["aes128-CBC"]&&a!==g.oids["aes192-CBC"]&&a!==g.oids["aes256-CBC"]&&a!==g.oids["des-EDE3-CBC"]&&a!==g.oids.desCBC){var l=Error("Cannot read encrypted private key. Unsupported encryption scheme OID.");throw l.oid=a,l.supportedOids=["aes128-CBC","aes192-CBC","aes256-CBC","des-EDE3-CBC","desCBC"],l}var n=i.kdfSalt,o=d.util.createBuffer(i.kdfIterationCount);switch(o=o.getInt(o.length()<<3),g.oids[a]){case"aes128-CBC":e=16,h=d.aes.createDecryptionCipher;break;case"aes192-CBC":e=24,h=d.aes.createDecryptionCipher;break;case"aes256-CBC":e=32,h=d.aes.createDecryptionCipher;break;case"des-EDE3-CBC":e=24,h=d.des.createDecryptionCipher;break;case"desCBC":e=8,h=d.des.createDecryptionCipher}var p=m(i.prfOid),q=d.pkcs5.pbkdf2(c,n,o,e,p),r=i.encIv,s=h(q);return s.start(r),s},g.pbe.getCipherForPKCS12PBE=function(a,b,c){var e,h,i,j={},l=[];if(!f.validate(b,k,j,l)){var n=Error("Cannot read password-based-encryption algorithm parameters. ASN.1 object is not a supported EncryptedPrivateKeyInfo.");throw n.errors=l,n}var o=d.util.createBuffer(j.salt),p=d.util.createBuffer(j.iterations);switch(p=p.getInt(p.length()<<3),a){case g.oids["pbeWithSHAAnd3-KeyTripleDES-CBC"]:e=24,h=8,i=d.des.startDecrypting;break;case g.oids["pbewithSHAAnd40BitRC2-CBC"]:e=5,h=8,i=function(a,b){var c=d.rc2.createDecryptionCipher(a,40);return c.start(b,null),c};break;default:var n=Error("Cannot read PKCS #12 PBE data block. Unsupported OID.");throw n.oid=a,n}var q=m(j.prfOid),r=g.pbe.generatePkcs12Key(c,o,1,p,e,q);return q.start(),i(r,g.pbe.generatePkcs12Key(c,o,2,p,h,q))},g.pbe.opensslDeriveBytes=function(a,b,c,e){if(null==e){if(!("md5"in d.md))throw Error('"md5" hash algorithm unavailable.');e=d.md.md5.create()}null===b&&(b="");for(var f=[l(e,a+b)],g=16,h=1;g<c;++h,g+=16)f.push(l(e,f[h-1]+a+b));return f.join("").substr(0,c)}},20437:(a,b,c)=>{"use strict";c.d(b,{AL:()=>j,HG:()=>i,Jh:()=>n,KQ:()=>k,Or:()=>m,Rf:()=>l});var d=c(76760),e=c.n(d),f=c(73024),g=c.n(f),h=c(53859);let i=e().join(h.nJ,"db"),j=e().join(i,"data.sqlite"),k=e().join(i,"backups"),l=e().join(h.nJ,"runtime"),m=Object.fromEntries(Object.entries(h.jL).map(([a,b])=>[a,e().join(h.nJ,b)]));function n(){for(let a of[h.nJ,i,k])g().existsSync(a)||g().mkdirSync(a,{recursive:!0})}},22164:(a,b,c)=>{var d=c(45654);c(32e3),c(29984),c(37691),c(33889);var e=c(24547),f=e.publicKeyValidator,g=e.privateKeyValidator;if(void 0===h)var h=d.jsbn.BigInteger;var i=d.util.ByteBuffer,j="u"<typeof Buffer?Uint8Array:Buffer;d.pki=d.pki||{},a.exports=d.pki.ed25519=d.ed25519=d.ed25519||{};var k=d.ed25519;function l(a){var b=a.message;if(b instanceof Uint8Array||b instanceof j)return b;var c=a.encoding;if(void 0===b)if(a.md)b=a.md.digest().getBytes(),c="binary";else throw TypeError('"options.message" or "options.md" not specified.');if("string"==typeof b&&!c)throw TypeError('"options.encoding" must be "binary" or "utf8".');if("string"==typeof b){if("u">typeof Buffer)return Buffer.from(b,c);b=new i(b,c)}else if(!(b instanceof i))throw TypeError('"options.message" must be a node.js Buffer, a Uint8Array, a forge ByteBuffer, or a string with "options.encoding" specifying its encoding.');for(var d=new j(b.length()),e=0;e<d.length;++e)d[e]=b.at(e);return d}k.constants={},k.constants.PUBLIC_KEY_BYTE_LENGTH=32,k.constants.PRIVATE_KEY_BYTE_LENGTH=64,k.constants.SEED_BYTE_LENGTH=32,k.constants.SIGN_BYTE_LENGTH=64,k.constants.HASH_BYTE_LENGTH=64,k.generateKeyPair=function(a){var b=(a=a||{}).seed;if(void 0===b)b=d.random.getBytesSync(k.constants.SEED_BYTE_LENGTH);else if("string"==typeof b){if(b.length!==k.constants.SEED_BYTE_LENGTH)throw TypeError('"seed" must be '+k.constants.SEED_BYTE_LENGTH+" bytes in length.")}else if(!(b instanceof Uint8Array))throw TypeError('"seed" must be a node.js Buffer, Uint8Array, or a binary string.');b=l({message:b,encoding:"binary"});for(var c=new j(k.constants.PUBLIC_KEY_BYTE_LENGTH),e=new j(k.constants.PRIVATE_KEY_BYTE_LENGTH),f=0;f<32;++f)e[f]=b[f];return function(a,b){var c,d=[J(),J(),J(),J()],e=u(b,32);for(e[0]&=248,e[31]&=127,e[31]|=64,F(d,e),z(a,d),c=0;c<32;++c)b[c+32]=a[c]}(c,e),{publicKey:c,privateKey:e}},k.privateKeyFromAsn1=function(a){var b={},c=[];if(!d.asn1.validate(a,g,b,c)){var e=Error("Invalid Key.");throw e.errors=c,e}var f=d.asn1.derToOid(b.privateKeyOid),h=d.oids.EdDSA25519;if(f!==h)throw Error('Invalid OID "'+f+'"; OID must be "'+h+'".');var i=b.privateKey;return{privateKeyBytes:l({message:d.asn1.fromDer(i).value,encoding:"binary"})}},k.publicKeyFromAsn1=function(a){var b={},c=[];if(!d.asn1.validate(a,f,b,c)){var e=Error("Invalid Key.");throw e.errors=c,e}var g=d.asn1.derToOid(b.publicKeyOid),h=d.oids.EdDSA25519;if(g!==h)throw Error('Invalid OID "'+g+'"; OID must be "'+h+'".');var i=b.ed25519PublicKey;if(i.length!==k.constants.PUBLIC_KEY_BYTE_LENGTH)throw Error("Key length is invalid.");return l({message:i,encoding:"binary"})},k.publicKeyFromPrivateKey=function(a){var b=l({message:(a=a||{}).privateKey,encoding:"binary"});if(b.length!==k.constants.PRIVATE_KEY_BYTE_LENGTH)throw TypeError('"options.privateKey" must have a byte length of '+k.constants.PRIVATE_KEY_BYTE_LENGTH);for(var c=new j(k.constants.PUBLIC_KEY_BYTE_LENGTH),d=0;d<c.length;++d)c[d]=b[32+d];return c},k.sign=function(a){var b=l(a=a||{}),c=l({message:a.privateKey,encoding:"binary"});if(c.length===k.constants.SEED_BYTE_LENGTH)c=k.generateKeyPair({seed:c}).privateKey;else if(c.length!==k.constants.PRIVATE_KEY_BYTE_LENGTH)throw TypeError('"options.privateKey" must have a byte length of '+k.constants.SEED_BYTE_LENGTH+" or "+k.constants.PRIVATE_KEY_BYTE_LENGTH);var d=new j(k.constants.SIGN_BYTE_LENGTH+b.length);!function(a,b,c,d){var e,f,g=new Float64Array(64),h=[J(),J(),J(),J()],i=u(d,32);for(i[0]&=248,i[31]&=127,i[31]|=64,e=0;e<c;++e)a[64+e]=b[e];for(e=0;e<32;++e)a[32+e]=i[32+e];var j=u(a.subarray(32),c+32);for(w(j),F(h,j),z(a,h),e=32;e<64;++e)a[e]=d[e];var k=u(a,c+64);for(w(k),e=32;e<64;++e)g[e]=0;for(e=0;e<32;++e)g[e]=j[e];for(e=0;e<32;++e)for(f=0;f<32;f++)g[e+f]+=k[e]*i[f];v(a.subarray(32),g)}(d,b,b.length,c);for(var e=new j(k.constants.SIGN_BYTE_LENGTH),f=0;f<e.length;++f)e[f]=d[f];return e},k.verify=function(a){var b,c=l(a=a||{});if(void 0===a.signature)throw TypeError('"options.signature" must be a node.js Buffer, a Uint8Array, a forge ByteBuffer, or a binary string.');var d=l({message:a.signature,encoding:"binary"});if(d.length!==k.constants.SIGN_BYTE_LENGTH)throw TypeError('"options.signature" must have a byte length of '+k.constants.SIGN_BYTE_LENGTH);var e=l({message:a.publicKey,encoding:"binary"});if(e.length!==k.constants.PUBLIC_KEY_BYTE_LENGTH)throw TypeError('"options.publicKey" must have a byte length of '+k.constants.PUBLIC_KEY_BYTE_LENGTH);var f=new j(k.constants.SIGN_BYTE_LENGTH+c.length),g=new j(k.constants.SIGN_BYTE_LENGTH+c.length);for(b=0;b<k.constants.SIGN_BYTE_LENGTH;++b)f[b]=d[b];for(b=0;b<c.length;++b)f[b+k.constants.SIGN_BYTE_LENGTH]=c[b];return function(a,b,c,d){var e,f,g,h,i,k,l,p,q,r,v=new j(32),y=[J(),J(),J(),J()],A=[J(),J(),J(),J()];if(c<64||(e=A,f=d,g=J(),h=J(),i=J(),k=J(),l=J(),p=J(),q=J(),(G(e[2],n),function(a,b){var c;for(c=0;c<16;++c)a[c]=b[2*c]+(b[2*c+1]<<8);a[15]&=32767}(e[1],f),function(a,b){M(a,b,b)}(i,e[1]),M(k,i,o),L(i,i,e[2]),K(k,e[2],k),function(a,b){M(a,b,b)}(l,k),function(a,b){M(a,b,b)}(p,l),M(q,p,l),M(g,q,i),M(g,g,k),function(a,b){var c,d=J();for(c=0;c<16;++c)d[c]=b[c];for(c=250;c>=0;--c)(function(a,b){M(a,b,b)})(d,d),1!==c&&M(d,d,b);for(c=0;c<16;++c)a[c]=d[c]}(g,g),M(g,g,i),M(g,g,k),M(g,g,k),M(e[0],g,k),function(a,b){M(a,b,b)}(h,e[0]),M(h,h,k),B(h,i)&&M(e[0],e[0],t),function(a,b){M(a,b,b)}(h,e[0]),M(h,h,k),B(h,i))?-1:(D(e[0])===f[31]>>7&&L(e[0],m,e[0]),M(e[3],e[0],e[1]),0))||!function(a){var b;for(b=31;b>=0;--b){if(a[32+b]<s[b])return!0;if(a[32+b]>s[b])break}return!1}(b))return -1;for(r=0;r<c;++r)a[r]=b[r];for(r=0;r<32;++r)a[r+32]=d[r];var H=u(a,c);if(w(H),E(y,A,H),F(A,b.subarray(32)),x(y,A),z(v,y),c-=64,function(a,b,c,d){return C(a,b,c,d,32)}(b,0,v,0)){for(r=0;r<c;++r)a[r]=0;return -1}for(r=0;r<c;++r)a[r]=b[r+64];return c}(g,f,f.length,e)>=0};var m=J(),n=J([1]),o=J([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),p=J([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),q=J([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),r=J([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),s=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]),t=J([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function u(a,b){var c=d.md.sha512.create(),e=new i(a);c.update(e.getBytes(b),"binary");var f=c.digest().getBytes();if("u">typeof Buffer)return Buffer.from(f,"binary");for(var g=new j(k.constants.HASH_BYTE_LENGTH),h=0;h<64;++h)g[h]=f.charCodeAt(h);return g}function v(a,b){var c,d,e,f;for(d=63;d>=32;--d){for(c=0,e=d-32,f=d-12;e<f;++e)b[e]+=c-16*b[d]*s[e-(d-32)],c=b[e]+128>>8,b[e]-=256*c;b[e]+=c,b[d]=0}for(e=0,c=0;e<32;++e)b[e]+=c-(b[31]>>4)*s[e],c=b[e]>>8,b[e]&=255;for(e=0;e<32;++e)b[e]-=c*s[e];for(d=0;d<32;++d)b[d+1]+=b[d]>>8,a[d]=255&b[d]}function w(a){for(var b=new Float64Array(64),c=0;c<64;++c)b[c]=a[c],a[c]=0;v(a,b)}function x(a,b){var c=J(),d=J(),e=J(),f=J(),g=J(),h=J(),i=J(),j=J(),k=J();L(c,a[1],a[0]),L(k,b[1],b[0]),M(c,c,k),K(d,a[0],a[1]),K(k,b[0],b[1]),M(d,d,k),M(e,a[3],b[3]),M(e,e,p),M(f,a[2],b[2]),K(f,f,f),L(g,d,c),L(h,f,e),K(i,f,e),K(j,d,c),M(a[0],g,h),M(a[1],j,i),M(a[2],i,h),M(a[3],g,j)}function y(a,b,c){for(var d=0;d<4;++d)I(a[d],b[d],c)}function z(a,b){var c=J(),d=J(),e=J();(function(a,b){var c,d=J();for(c=0;c<16;++c)d[c]=b[c];for(c=253;c>=0;--c)(function(a,b){M(a,b,b)})(d,d),2!==c&&4!==c&&M(d,d,b);for(c=0;c<16;++c)a[c]=d[c]})(e,b[2]),M(c,b[0],e),M(d,b[1],e),A(a,d),a[31]^=D(c)<<7}function A(a,b){var c,d,e,f=J(),g=J();for(c=0;c<16;++c)g[c]=b[c];for(H(g),H(g),H(g),d=0;d<2;++d){for(f[0]=g[0]-65517,c=1;c<15;++c)f[c]=g[c]-65535-(f[c-1]>>16&1),f[c-1]&=65535;f[15]=g[15]-32767-(f[14]>>16&1),e=f[15]>>16&1,f[14]&=65535,I(g,f,1-e)}for(c=0;c<16;c++)a[2*c]=255&g[c],a[2*c+1]=g[c]>>8}function B(a,b){var c=new j(32),d=new j(32);return A(c,a),A(d,b),C(c,0,d,0,32)}function C(a,b,c,d,e){var f,g=0;for(f=0;f<e;++f)g|=a[b+f]^c[d+f];return(1&g-1>>>8)-1}function D(a){var b=new j(32);return A(b,a),1&b[0]}function E(a,b,c){var d,e;for(G(a[0],m),G(a[1],n),G(a[2],n),G(a[3],m),e=255;e>=0;--e)y(a,b,d=c[e/8|0]>>(7&e)&1),x(b,a),x(a,a),y(a,b,d)}function F(a,b){var c=[J(),J(),J(),J()];G(c[0],q),G(c[1],r),G(c[2],n),M(c[3],q,r),E(a,c,b)}function G(a,b){var c;for(c=0;c<16;c++)a[c]=0|b[c]}function H(a){var b,c,d=1;for(b=0;b<16;++b)d=Math.floor((c=a[b]+d+65535)/65536),a[b]=c-65536*d;a[0]+=d-1+37*(d-1)}function I(a,b,c){for(var d,e=~(c-1),f=0;f<16;++f)d=e&(a[f]^b[f]),a[f]^=d,b[f]^=d}function J(a){var b,c=new Float64Array(16);if(a)for(b=0;b<a.length;++b)c[b]=a[b];return c}function K(a,b,c){for(var d=0;d<16;++d)a[d]=b[d]+c[d]}function L(a,b,c){for(var d=0;d<16;++d)a[d]=b[d]-c[d]}function M(a,b,c){var d,e,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=c[0],L=c[1],M=c[2],N=c[3],O=c[4],P=c[5],Q=c[6],R=c[7],S=c[8],T=c[9],U=c[10],V=c[11],W=c[12],X=c[13],Y=c[14],Z=c[15];f+=(d=b[0])*K,g+=d*L,h+=d*M,i+=d*N,j+=d*O,k+=d*P,l+=d*Q,m+=d*R,n+=d*S,o+=d*T,p+=d*U,q+=d*V,r+=d*W,s+=d*X,t+=d*Y,u+=d*Z,g+=(d=b[1])*K,h+=d*L,i+=d*M,j+=d*N,k+=d*O,l+=d*P,m+=d*Q,n+=d*R,o+=d*S,p+=d*T,q+=d*U,r+=d*V,s+=d*W,t+=d*X,u+=d*Y,v+=d*Z,h+=(d=b[2])*K,i+=d*L,j+=d*M,k+=d*N,l+=d*O,m+=d*P,n+=d*Q,o+=d*R,p+=d*S,q+=d*T,r+=d*U,s+=d*V,t+=d*W,u+=d*X,v+=d*Y,w+=d*Z,i+=(d=b[3])*K,j+=d*L,k+=d*M,l+=d*N,m+=d*O,n+=d*P,o+=d*Q,p+=d*R,q+=d*S,r+=d*T,s+=d*U,t+=d*V,u+=d*W,v+=d*X,w+=d*Y,x+=d*Z,j+=(d=b[4])*K,k+=d*L,l+=d*M,m+=d*N,n+=d*O,o+=d*P,p+=d*Q,q+=d*R,r+=d*S,s+=d*T,t+=d*U,u+=d*V,v+=d*W,w+=d*X,x+=d*Y,y+=d*Z,k+=(d=b[5])*K,l+=d*L,m+=d*M,n+=d*N,o+=d*O,p+=d*P,q+=d*Q,r+=d*R,s+=d*S,t+=d*T,u+=d*U,v+=d*V,w+=d*W,x+=d*X,y+=d*Y,z+=d*Z,l+=(d=b[6])*K,m+=d*L,n+=d*M,o+=d*N,p+=d*O,q+=d*P,r+=d*Q,s+=d*R,t+=d*S,u+=d*T,v+=d*U,w+=d*V,x+=d*W,y+=d*X,z+=d*Y,A+=d*Z,m+=(d=b[7])*K,n+=d*L,o+=d*M,p+=d*N,q+=d*O,r+=d*P,s+=d*Q,t+=d*R,u+=d*S,v+=d*T,w+=d*U,x+=d*V,y+=d*W,z+=d*X,A+=d*Y,B+=d*Z,n+=(d=b[8])*K,o+=d*L,p+=d*M,q+=d*N,r+=d*O,s+=d*P,t+=d*Q,u+=d*R,v+=d*S,w+=d*T,x+=d*U,y+=d*V,z+=d*W,A+=d*X,B+=d*Y,C+=d*Z,o+=(d=b[9])*K,p+=d*L,q+=d*M,r+=d*N,s+=d*O,t+=d*P,u+=d*Q,v+=d*R,w+=d*S,x+=d*T,y+=d*U,z+=d*V,A+=d*W,B+=d*X,C+=d*Y,D+=d*Z,p+=(d=b[10])*K,q+=d*L,r+=d*M,s+=d*N,t+=d*O,u+=d*P,v+=d*Q,w+=d*R,x+=d*S,y+=d*T,z+=d*U,A+=d*V,B+=d*W,C+=d*X,D+=d*Y,E+=d*Z,q+=(d=b[11])*K,r+=d*L,s+=d*M,t+=d*N,u+=d*O,v+=d*P,w+=d*Q,x+=d*R,y+=d*S,z+=d*T,A+=d*U,B+=d*V,C+=d*W,D+=d*X,E+=d*Y,F+=d*Z,r+=(d=b[12])*K,s+=d*L,t+=d*M,u+=d*N,v+=d*O,w+=d*P,x+=d*Q,y+=d*R,z+=d*S,A+=d*T,B+=d*U,C+=d*V,D+=d*W,E+=d*X,F+=d*Y,G+=d*Z,s+=(d=b[13])*K,t+=d*L,u+=d*M,v+=d*N,w+=d*O,x+=d*P,y+=d*Q,z+=d*R,A+=d*S,B+=d*T,C+=d*U,D+=d*V,E+=d*W,F+=d*X,G+=d*Y,H+=d*Z,t+=(d=b[14])*K,u+=d*L,v+=d*M,w+=d*N,x+=d*O,y+=d*P,z+=d*Q,A+=d*R,B+=d*S,C+=d*T,D+=d*U,E+=d*V,F+=d*W,G+=d*X,H+=d*Y,I+=d*Z,u+=(d=b[15])*K,v+=d*L,w+=d*M,x+=d*N,y+=d*O,z+=d*P,A+=d*Q,B+=d*R,C+=d*S,D+=d*T,E+=d*U,F+=d*V,G+=d*W,H+=d*X,I+=d*Y,J+=d*Z,f+=38*v,g+=38*w,h+=38*x,i+=38*y,j+=38*z,k+=38*A,l+=38*B,m+=38*C,n+=38*D,o+=38*E,p+=38*F,q+=38*G,r+=38*H,s+=38*I,t+=38*J,e=Math.floor((d=f+(e=1)+65535)/65536),f=d-65536*e,e=Math.floor((d=g+e+65535)/65536),g=d-65536*e,e=Math.floor((d=h+e+65535)/65536),h=d-65536*e,e=Math.floor((d=i+e+65535)/65536),i=d-65536*e,e=Math.floor((d=j+e+65535)/65536),j=d-65536*e,e=Math.floor((d=k+e+65535)/65536),k=d-65536*e,e=Math.floor((d=l+e+65535)/65536),l=d-65536*e,e=Math.floor((d=m+e+65535)/65536),m=d-65536*e,e=Math.floor((d=n+e+65535)/65536),n=d-65536*e,e=Math.floor((d=o+e+65535)/65536),o=d-65536*e,e=Math.floor((d=p+e+65535)/65536),p=d-65536*e,e=Math.floor((d=q+e+65535)/65536),q=d-65536*e,e=Math.floor((d=r+e+65535)/65536),r=d-65536*e,e=Math.floor((d=s+e+65535)/65536),s=d-65536*e,e=Math.floor((d=t+e+65535)/65536),t=d-65536*e,e=Math.floor((d=u+e+65535)/65536),u=d-65536*e,f+=e-1+37*(e-1),e=Math.floor((d=f+(e=1)+65535)/65536),f=d-65536*e,e=Math.floor((d=g+e+65535)/65536),g=d-65536*e,e=Math.floor((d=h+e+65535)/65536),h=d-65536*e,e=Math.floor((d=i+e+65535)/65536),i=d-65536*e,e=Math.floor((d=j+e+65535)/65536),j=d-65536*e,e=Math.floor((d=k+e+65535)/65536),k=d-65536*e,e=Math.floor((d=l+e+65535)/65536),l=d-65536*e,e=Math.floor((d=m+e+65535)/65536),m=d-65536*e,e=Math.floor((d=n+e+65535)/65536),n=d-65536*e,e=Math.floor((d=o+e+65535)/65536),o=d-65536*e,e=Math.floor((d=p+e+65535)/65536),p=d-65536*e,e=Math.floor((d=q+e+65535)/65536),q=d-65536*e,e=Math.floor((d=r+e+65535)/65536),r=d-65536*e,e=Math.floor((d=s+e+65535)/65536),s=d-65536*e,e=Math.floor((d=t+e+65535)/65536),t=d-65536*e,e=Math.floor((d=u+e+65535)/65536),u=d-65536*e,f+=e-1+37*(e-1),a[0]=f,a[1]=g,a[2]=h,a[3]=i,a[4]=j,a[5]=k,a[6]=l,a[7]=m,a[8]=n,a[9]=o,a[10]=p,a[11]=q,a[12]=r,a[13]=s,a[14]=t,a[15]=u}},23658:(a,b,c)=>{var d=c(45654);a.exports=d.md=d.md||{},d.md.algorithms=d.md.algorithms||{}},24081:(a,b,c)=>{"use strict";c.d(b,{cK:()=>n});var d=c(76760),e=c.n(d),f=c(20437);global._dbAdapter||(global._dbAdapter={instance:null,initPromise:null,logged:!1,lastDriverError:null});let g=global._dbAdapter;async function h(){try{let{createRequire:a}=await Promise.resolve().then(c.t.bind(c,98995,23)),b=a(e().join(f.Rf,"_noop.js"))("better-sqlite3");return b?.default??b}catch{}try{let a=await Promise.resolve().then(c.t.bind(c,87550,23));return a?.default??a}catch{return null}}async function i(){if(!process.versions.bun)return null;try{let{createBunSqliteAdapter:a}=await c.e(8062).then(c.bind(c,38062));return await a(f.AL)}catch(a){return g.lastDriverError=`bun:sqlite: ${a.message}`,console.warn(`[DB] bun:sqlite unavailable: ${a.message}`),null}}async function j(){if(process.versions.bun)return null;let[a]=process.versions.node.split(".").map(Number);if(a>=24)return null;try{let a=await h();if(!a)throw Error("not installed (runtime copy and bare specifier both missing)");let{createBetterSqliteAdapter:b}=await c.e(8469).then(c.bind(c,88469));return b(f.AL,a)}catch(a){return g.lastDriverError=`better-sqlite3: ${a.message}`,console.warn(`[DB] better-sqlite3 unavailable: ${a.message}`),null}}async function k(){if(process.versions.bun)return null;let[a,b]=process.versions.node.split(".").map(Number);if(a<22||22===a&&b<5)return null;try{let{createNodeSqliteAdapter:a}=await c.e(4803).then(c.bind(c,54803));return await a(f.AL)}catch(a){return g.lastDriverError=`node:sqlite: ${a.message}`,console.warn(`[DB] node:sqlite unavailable: ${a.message}`),null}}async function l(){try{let{createSqlJsAdapter:a}=await c.e(6252).then(c.bind(c,66252));return await a(f.AL)}catch(a){return g.lastDriverError=`sql.js: ${a.message}`,console.warn(`[DB] sql.js unavailable: ${a.message}`),null}}async function m(){(0,f.Jh)();let a=await i();if(a||(a=await j()),a||(a=await k()),a||(a=await l()),!a)throw Error("[DB] No SQLite driver available (bun/better/node/sql.js all failed)");g.logged||(console.log(`[DB] Driver: ${a.driver} | file: ${f.AL}`),g.logged=!0);let{runMigrationOnce:b}=await c.e(1310).then(c.bind(c,98929));return await b(a),a}async function n(){return g.instance?g.instance:(g.initPromise||(g.initPromise=m().then(a=>(g.instance=a,a))),g.initPromise)}},24464:a=>{"use strict";a.exports={TOOL_HOSTS:{antigravity:["daily-cloudcode-pa.googleapis.com","cloudcode-pa.googleapis.com"],copilot:["api.individual.githubcopilot.com"],kiro:["runtime.us-east-1.kiro.dev","q.us-east-1.amazonaws.com","codewhisperer.us-east-1.amazonaws.com"],cursor:["api2.cursor.sh"]}}},24547:(a,b,c)=>{var d=c(45654);c(63070);var e=d.asn1;b.privateKeyValidator={name:"PrivateKeyInfo",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"PrivateKeyInfo.version",tagClass:e.Class.UNIVERSAL,type:e.Type.INTEGER,constructed:!1,capture:"privateKeyVersion"},{name:"PrivateKeyInfo.privateKeyAlgorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"privateKeyOid"}]},{name:"PrivateKeyInfo",tagClass:e.Class.UNIVERSAL,type:e.Type.OCTETSTRING,constructed:!1,capture:"privateKey"}]},b.publicKeyValidator={name:"SubjectPublicKeyInfo",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,captureAsn1:"subjectPublicKeyInfo",value:[{name:"SubjectPublicKeyInfo.AlgorithmIdentifier",tagClass:e.Class.UNIVERSAL,type:e.Type.SEQUENCE,constructed:!0,value:[{name:"AlgorithmIdentifier.algorithm",tagClass:e.Class.UNIVERSAL,type:e.Type.OID,constructed:!1,capture:"publicKeyOid"}]},{tagClass:e.Class.UNIVERSAL,type:e.Type.BITSTRING,constructed:!1,composed:!0,captureBitStringValue:"ed25519PublicKey"}]}},24985:(a,b,c)=>{var d=c(45654);c(33889),c(29984),c(4554);var e=a.exports=d.pkcs1=d.pkcs1||{};function f(a,b,c){c||(c=d.md.sha1.create());for(var e="",f=Math.ceil(b/c.digestLength),g=0;g<f;++g){var h=String.fromCharCode(g>>24&255,g>>16&255,g>>8&255,255&g);c.start(),c.update(a+h),e+=c.digest().getBytes()}return e.substring(0,b)}e.encode_rsa_oaep=function(a,b,c){"string"==typeof c?(e=c,g=arguments[3]||void 0,h=arguments[4]||void 0):c&&(e=c.label||void 0,g=c.seed||void 0,h=c.md||void 0,c.mgf1&&c.mgf1.md&&(i=c.mgf1.md)),h?h.start():h=d.md.sha1.create(),i||(i=h);var e,g,h,i,j=Math.ceil(a.n.bitLength()/8),k=j-2*h.digestLength-2;if(b.length>k){var l=Error("RSAES-OAEP input message length is too long.");throw l.length=b.length,l.maxLength=k,l}e||(e=""),h.update(e,"raw");for(var m=h.digest(),n="",o=k-b.length,p=0;p<o;p++)n+="\0";var q=m.getBytes()+n+"\x01"+b;if(g){if(g.length!==h.digestLength){var l=Error("Invalid RSAES-OAEP seed. The seed length must match the digest length.");throw l.seedLength=g.length,l.digestLength=h.digestLength,l}}else g=d.random.getBytes(h.digestLength);var r=f(g,j-h.digestLength-1,i),s=d.util.xorBytes(q,r,q.length),t=f(s,h.digestLength,i);return"\0"+d.util.xorBytes(g,t,g.length)+s},e.decode_rsa_oaep=function(a,b,c){"string"==typeof c?(e=c,g=arguments[3]||void 0):c&&(e=c.label||void 0,g=c.md||void 0,c.mgf1&&c.mgf1.md&&(h=c.mgf1.md));var e,g,h,i=Math.ceil(a.n.bitLength()/8);if(b.length!==i){var j=Error("RSAES-OAEP encoded message length is invalid.");throw j.length=b.length,j.expectedLength=i,j}if(void 0===g?g=d.md.sha1.create():g.start(),h||(h=g),i<2*g.digestLength+2)throw Error("RSAES-OAEP key is too short for the hash function.");e||(e=""),g.update(e,"raw");for(var k=g.digest().getBytes(),l=b.charAt(0),m=b.substring(1,g.digestLength+1),n=b.substring(1+g.digestLength),o=f(n,g.digestLength,h),p=f(d.util.xorBytes(m,o,m.length),i-g.digestLength-1,h),q=d.util.xorBytes(n,p,n.length),r=q.substring(0,g.digestLength),j="\0"!==l,s=0;s<g.digestLength;++s)j|=k.charAt(s)!==r.charAt(s);for(var t=1,u=g.digestLength,v=g.digestLength;v<q.length;v++){var w=q.charCodeAt(v),x=1&w^1;j|=w&65534*!!t,t&=x,u+=t}if(j||1!==q.charCodeAt(u))throw Error("Invalid RSAES-OAEP padding.");return q.substring(u+1)}},25346:(a,b,c)=>{"use strict";c.d(b,{cV:()=>n});var d=c(94735),e=c(24081),f=c(50743),g=c(8677);c(43556);var h=c(48595);global._pendingRequests||(global._pendingRequests={byModel:{},byAccount:{}}),global._lastErrorProvider||(global._lastErrorProvider={provider:"",ts:0}),global._statsEmitter||(global._statsEmitter=new d.EventEmitter,global._statsEmitter.setMaxListeners(50)),global._pendingTimers||(global._pendingTimers={}),global._recentRing||(global._recentRing={items:[],initialized:!1}),global._connectionMapCache||(global._connectionMapCache={map:{},ts:0}),global._statsEmitTimers||(global._statsEmitTimers={pending:null,update:null}),global._pendingRequests,global._lastErrorProvider,global._pendingTimers,global._recentRing,global._connectionMapCache;let i=global._statsEmitTimers,j=global._statsEmitter;async function k(a,b,d){if(!d||!a||!b)return 0;try{let{getPricingForModel:e}=await Promise.resolve().then(c.bind(c,90181)),f=await e(a,b);if(!f)return 0;let{calculateCostFromTokens:g}=await c.e(539).then(c.bind(c,40539));return g(d,f)}catch(a){return console.error("Error calculating cost:",a),0}}let l="usageCostRepair";async function m({limit:a=2e4,version:b=h.vQ.version}={}){let c=await (0,e.cK)(),d=(0,f.q)(await (0,g.IQ)(l),null),n=d&&d.version===b&&Number(d.lastId)||0,o=c.all("SELECT id FROM usageHistory WHERE id > ? ORDER BY id ASC LIMIT ?",[n,a]);if(!o.length)return d&&d.version===b||await (0,g.iZ)(l,(0,f.s)({version:b,lastId:n})),{scanned:0,repaired:0};let p=o[o.length-1].id,q=c.all(`SELECT id, timestamp, provider, model, connectionId, apiKeyHash, endpoint, tokens,
22
22
  promptTokens, completionTokens
23
23
  FROM usageHistory
24
24
  WHERE id > ? AND id <= ?