claude-code-best 2.5.0 → 2.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 (614) hide show
  1. package/dist/chunks/AddWorkspaceDirectory-BYyM_V0q.js +1 -0
  2. package/dist/chunks/App-BboadKdn.js +1 -0
  3. package/dist/chunks/ApproveApiKey-BLp4742y.js +1 -0
  4. package/dist/chunks/ApproveApiKey-DiEe4eui.js +1 -0
  5. package/dist/chunks/AssistantSessionChooser-B88DM0Oq.js +1 -0
  6. package/dist/chunks/BackgroundTasksDialog-ByraVuXh.js +2 -0
  7. package/dist/chunks/BypassPermissionsModeDialog-BDvmz12S.js +1 -0
  8. package/dist/chunks/ClaudeInChromeOnboarding-B6XNhFqq.js +1 -0
  9. package/dist/chunks/ClaudeMdExternalIncludesDialog-B4ocUjev.js +1 -0
  10. package/dist/chunks/ClaudeMdExternalIncludesDialog-BNhlq7_K.js +1 -0
  11. package/dist/chunks/ConsoleOAuthFlow-BvaB9b0y.js +1 -0
  12. package/dist/chunks/DesktopHandoff-S-w4bs5T.js +1 -0
  13. package/dist/chunks/DevChannelsDialog-BljR0X9X.js +1 -0
  14. package/dist/chunks/Dialog-DYFGqyDs.js +1 -0
  15. package/dist/chunks/DiffDialog-BhQ2QaLW.js +3 -0
  16. package/dist/chunks/Doctor-BXb0qv6n.js +3 -0
  17. package/dist/chunks/Doctor-C5DYPEGl.js +1 -0
  18. package/dist/chunks/ExitFlow-CSBDxw9H.js +2 -0
  19. package/dist/chunks/Feedback-DwHzc4UT.js +2 -0
  20. package/dist/chunks/Grove-DSXRnXKv.js +11 -0
  21. package/dist/chunks/Grove-DnTo982-.js +1 -0
  22. package/dist/chunks/HybridTransport-CuT3KI5e.js +4 -0
  23. package/dist/chunks/ITermBackend-mokGZVH_.js +1 -0
  24. package/dist/chunks/InProcessTransport-DB52dh4f.js +1 -0
  25. package/dist/chunks/InvalidConfigDialog-Bi4RKYlk.js +1 -0
  26. package/dist/chunks/InvalidSettingsDialog-0zKo4-so.js +1 -0
  27. package/dist/chunks/ListItem-OFARanN7.js +1 -0
  28. package/dist/chunks/MCPConnectionManager-DYGoS1Ht.js +1 -0
  29. package/dist/chunks/McpParsingWarnings-EzgsOoHw.js +1 -0
  30. package/dist/chunks/MessageSelector-DTmUuEKJ.js +3 -0
  31. package/dist/chunks/Messages-DWiKTx5o.js +11 -0
  32. package/dist/chunks/Onboarding-odmthwzz.js +1 -0
  33. package/dist/chunks/OverageCreditUpsell-Cpk_5Lv0.js +1 -0
  34. package/dist/chunks/PermissionDialog-5MlJf7ew.js +1 -0
  35. package/dist/chunks/PluginSettings-eYcWehI8.js +17 -0
  36. package/dist/chunks/PressEnterToContinue-BdA9zDGs.js +1 -0
  37. package/dist/chunks/PromptInputFooterSuggestions-DrrkNOuS.js +1 -0
  38. package/dist/chunks/PromptInputHelpMenu-DMsF4D6d.js +1 -0
  39. package/dist/chunks/QueryEngine-C_KZts4y.js +1 -0
  40. package/dist/chunks/REPL-C6YR0VKU.js +1 -0
  41. package/dist/chunks/REPL-DzHz-LOY.js +97 -0
  42. package/dist/chunks/RemoteCallout-CnpCWRPk.js +1 -0
  43. package/dist/chunks/RemoteSessionManager-OWg_Yccq.js +2 -0
  44. package/dist/chunks/ResumeConversation-BktSnsCm.js +1 -0
  45. package/dist/chunks/SSETransport-BpnapvlK.js +4 -0
  46. package/dist/chunks/SearchBox-DfOmUoaI.js +1 -0
  47. package/dist/chunks/SearchExtraToolsTool-CqFD8vVS.js +1 -0
  48. package/dist/chunks/SentryErrorBoundary-BUirJRWU.js +1 -0
  49. package/dist/chunks/SentryErrorBoundary-C-NlfQZw.js +2 -0
  50. package/dist/chunks/Settings-vfFvcweR.js +2 -0
  51. package/dist/chunks/TeleportProgress-CYXay2ZL.js +1 -0
  52. package/dist/chunks/TeleportRepoMismatchDialog-_zbZTvcJ.js +1 -0
  53. package/dist/chunks/TeleportResumeWrapper-DiHQeZIM.js +1 -0
  54. package/dist/chunks/ThemePicker-BRh027fA.js +1 -0
  55. package/dist/chunks/TmuxBackend-BaX2U7iZ.js +9 -0
  56. package/dist/chunks/TrustDialog-CVbzrv6g.js +1 -0
  57. package/dist/chunks/TungstenTool-C5IqKVr0.js +1 -0
  58. package/dist/chunks/TungstenTool-V-Bwqlx3.js +1 -0
  59. package/dist/chunks/ValidationErrorsList-CdCUgfIl.js +2 -0
  60. package/dist/chunks/WelcomeV2-DCXcYd2x.js +1 -0
  61. package/dist/chunks/WindowsTerminalBackend-BE9NX5IH.js +2 -0
  62. package/dist/chunks/add-dir-ldGd3Ppz.js +1 -0
  63. package/dist/chunks/agentDisplay-CVnAeURF.js +1 -0
  64. package/dist/chunks/agents-C08NzRZx.js +2 -0
  65. package/dist/chunks/agents-DH5fmbVw.js +103 -0
  66. package/dist/chunks/ajv-B_OpU_Uh.js +8 -0
  67. package/dist/chunks/analytics-DqMQntaB.js +1 -0
  68. package/dist/chunks/ant-DJren1Aa.js +1 -0
  69. package/dist/chunks/api-6tcwJlf_.js +1 -0
  70. package/dist/chunks/api-CGOR_Xfl.js +1 -0
  71. package/dist/chunks/asciicast-aoKFhc7C.js +1 -0
  72. package/dist/chunks/asciicast-o5Zg4dJt.js +4 -0
  73. package/dist/chunks/assistant-BlzrMSkM.js +1 -0
  74. package/dist/chunks/assistant-CwbhlCM-.js +1 -0
  75. package/dist/chunks/assistant-aWkDcurV.js +1 -0
  76. package/dist/chunks/attributionHooks-PygdohOh.js +1 -0
  77. package/dist/chunks/attributionTrailer-BpvhXgRP.js +1 -0
  78. package/dist/chunks/auth-CSB2RDKF.js +1 -0
  79. package/dist/chunks/auth-GxZhOvQ1.js +1 -0
  80. package/dist/chunks/autoMode-CWvZs1jO.js +45 -0
  81. package/dist/chunks/autoModeDenials-Cp6VFdsm.js +1 -0
  82. package/dist/chunks/autonomy-BkVcSMCZ.js +19 -0
  83. package/dist/chunks/autonomy-DK42aJYt.js +1 -0
  84. package/dist/chunks/autonomyPanel-Cn4IhXgE.js +1 -0
  85. package/dist/chunks/axios-DLnc2dVy.js +1 -0
  86. package/dist/chunks/axios-DhfaybwJ.js +12 -0
  87. package/dist/chunks/backgroundHousekeeping-BIZTAYho.js +17 -0
  88. package/dist/chunks/backgroundHousekeeping-Csh58CxV.js +1 -0
  89. package/dist/chunks/banner-CVXH2xts.js +2 -0
  90. package/dist/chunks/base64-js-DIVSFswY.js +1 -0
  91. package/dist/chunks/bedrockClient-qi1-JCOK.js +15 -0
  92. package/dist/chunks/bg-DK0E4ZtW.js +9 -0
  93. package/dist/chunks/bg-Dbh5z3Y8.js +1 -0
  94. package/dist/chunks/branch-juox_fko.js +3 -0
  95. package/dist/chunks/break-cache-ByJ7U2Ts.js +8 -0
  96. package/dist/chunks/bridge-DudsCZkh.js +2 -0
  97. package/dist/chunks/bridgeConfig-D4tpc568.js +1 -0
  98. package/dist/chunks/bridgeConfig-lRZfQqmA.js +1 -0
  99. package/dist/chunks/bridgeEnabled-B8_c_Ppq.js +1 -0
  100. package/dist/chunks/bridgeEnabled-D2IykaHE.js +1 -0
  101. package/dist/chunks/bridgeMain-C5RDihlX.js +68 -0
  102. package/dist/chunks/bridgeMain-D7_lg2iJ.js +1 -0
  103. package/dist/chunks/bridgeMessaging-CqNURC4-.js +1 -0
  104. package/dist/chunks/bridgePointer-FvAMj3re.js +1 -0
  105. package/dist/chunks/browser-fLRXxIsQ.js +1 -0
  106. package/dist/chunks/btw-DKlE3Dea.js +1 -0
  107. package/dist/chunks/buddy-DQYgHR63.js +3 -0
  108. package/dist/chunks/bundledMode-kSQejuY4.js +1 -0
  109. package/dist/chunks/bypassPermissionsKillswitch-Bof-UtM-.js +1 -0
  110. package/dist/chunks/caches-B5QZDncQ.js +3 -0
  111. package/dist/chunks/caches-dGk7xsDu.js +1 -0
  112. package/dist/chunks/capacityWake-BXlUpptF.js +1 -0
  113. package/dist/chunks/ccrClient-BaWg4E9-.js +1 -0
  114. package/dist/chunks/ccshareResume-DWLjTF22.js +1 -0
  115. package/dist/chunks/changeDetector-DoLfg8a6.js +1 -0
  116. package/dist/chunks/channelNotification-B7A-9DIl.js +1 -0
  117. package/dist/chunks/channelNotification-DDErroWn.js +1 -0
  118. package/dist/chunks/chokidar-BcI3rIKm.js +1 -0
  119. package/dist/chunks/chokidar-SzksMqYp.js +1 -0
  120. package/dist/chunks/chrome-jMAks7-w.js +1 -0
  121. package/dist/chunks/chromeNativeHost-4U39yLtd.js +1 -0
  122. package/dist/chunks/chunk-DR8-3Aex.js +1 -0
  123. package/dist/chunks/classPrivateFieldSet2-EAQNhHs8.js +1 -0
  124. package/dist/chunks/claudeDesktop-D0S1eq1F.js +1 -0
  125. package/dist/chunks/cleanup-Bg_gFgcj.js +1 -0
  126. package/dist/chunks/clear-OudnCGa7.js +1 -0
  127. package/dist/chunks/cliLaunch-BQa48gsr.js +1 -0
  128. package/dist/chunks/client-CPn1wQyc.js +7 -0
  129. package/dist/chunks/client-DxDmXXTh.js +1 -0
  130. package/dist/chunks/client-_sjL0I7A.js +35 -0
  131. package/dist/chunks/color-DG_R5-hl.js +1 -0
  132. package/dist/chunks/color-convert-ULbeSgNC.js +1 -0
  133. package/dist/chunks/commands-BWIOEBPs.js +1 -0
  134. package/dist/chunks/commitAttribution-BA4fcbHf.js +1 -0
  135. package/dist/chunks/commitAttribution-C22a3OCi.js +2 -0
  136. package/dist/chunks/common-B379wT22.js +1 -0
  137. package/dist/chunks/common-B_BC3eMY.js +1 -0
  138. package/dist/chunks/common-CMCv4N_v.js +1 -0
  139. package/dist/chunks/compact-BWvnb4or.js +3 -0
  140. package/dist/chunks/companion-Bkn2lSLj.js +1 -0
  141. package/dist/chunks/completionCache-DHfUBBMH.js +1 -0
  142. package/dist/chunks/completionCache-DORrtxkS.js +4 -0
  143. package/dist/chunks/computerUseLock-BjoDJH2h.js +1 -0
  144. package/dist/chunks/config-BvpTbJ5p.js +1 -0
  145. package/dist/chunks/config-D-dzD6n-.js +1 -0
  146. package/dist/chunks/connectHeadless-CwsFt-Mh.js +1 -0
  147. package/dist/chunks/constants-41VpZw2G.js +1 -0
  148. package/dist/chunks/context-DzNahdyP.js +1 -0
  149. package/dist/chunks/context-noninteractive-CM1-lUSe.js +1 -0
  150. package/dist/chunks/context-noninteractive-yiyJriiw.js +54 -0
  151. package/dist/chunks/controlMessageCompat-BJhFiS7u.js +1 -0
  152. package/dist/chunks/conversation-DKlz47xf.js +1 -0
  153. package/dist/chunks/conversation-cUxdb8MN.js +1 -0
  154. package/dist/chunks/copy-9k9JPRqW.js +7 -0
  155. package/dist/chunks/createSSHSession-BZf-Loo5.js +6 -0
  156. package/dist/chunks/createSession-BuJcoBAj.js +1 -0
  157. package/dist/chunks/createSession-kiTHYXSL.js +1 -0
  158. package/dist/chunks/cron-DiW7eIPP.js +1 -0
  159. package/dist/chunks/cronJitterConfig-CYP7yrQu.js +6 -0
  160. package/dist/chunks/crossProjectResume-BJisir9Z.js +40 -0
  161. package/dist/chunks/cwd--iizewsn.js +1 -0
  162. package/dist/chunks/cwd-BgpSJxd7.js +1 -0
  163. package/dist/chunks/daemon-VYRit6Aq.js +2 -0
  164. package/dist/chunks/dangerousBackend-BU_PHGR2.js +1 -0
  165. package/dist/chunks/datadog-Bg-zL-i7.js +1 -0
  166. package/dist/chunks/datadog-CVeFkaQu.js +1 -0
  167. package/dist/chunks/debug-DM5ezCBS.js +1 -0
  168. package/dist/chunks/debug-UI3T040K.js +5 -0
  169. package/dist/chunks/debugUtils-BBMFODKH.js +1 -0
  170. package/dist/chunks/defineProperty-80gRi2ZW.js +1 -0
  171. package/dist/chunks/desktop-DpaStjc-.js +1 -0
  172. package/dist/chunks/detached-D300jlhj.js +5 -0
  173. package/dist/chunks/detect-libc-DNuQfUvI.js +1 -0
  174. package/dist/chunks/detectRepository-CBk3S2zv.js +1 -0
  175. package/dist/chunks/detectRepository-DCTvg4p0.js +1 -0
  176. package/dist/chunks/detection-CQsNad64.js +1 -0
  177. package/dist/chunks/detection-DJ-vTbBf.js +1 -0
  178. package/dist/chunks/diff-N_VSBo3Z.js +1 -0
  179. package/dist/chunks/directoryCompletion-DP_4B1GL.js +1 -0
  180. package/dist/chunks/dist-CanSxOZ1.js +5 -0
  181. package/dist/chunks/dist-Cg1a1Exw.js +29 -0
  182. package/dist/chunks/dist-Q7YNoZ0H.js +20 -0
  183. package/dist/chunks/dist-es-4z5T3Jzm.js +1 -0
  184. package/dist/chunks/dist-es-B2jg52tM2.js +1 -0
  185. package/dist/chunks/dist-es-B6OXHQ1S.js +1 -0
  186. package/dist/chunks/dist-es-B8NEy5hc.js +1 -0
  187. package/dist/chunks/dist-es-BVGppqE4.js +1 -0
  188. package/dist/chunks/dist-es-Bcw5GZko.js +1 -0
  189. package/dist/chunks/dist-es-BoIJpncb.js +9 -0
  190. package/dist/chunks/dist-es-Bu_Fshi1.js +1 -0
  191. package/dist/chunks/dist-es-C-1vn4OP2.js +1 -0
  192. package/dist/chunks/dist-es-C41b_0B5.js +1 -0
  193. package/dist/chunks/dist-es-CCZYybbG2.js +1 -0
  194. package/dist/chunks/dist-es-CLK1mey-.js +1 -0
  195. package/dist/chunks/dist-es-CQz2aNf72.js +1 -0
  196. package/dist/chunks/dist-es-CSfI8B8l.js +1 -0
  197. package/dist/chunks/dist-es-CUZBYppo.js +1 -0
  198. package/dist/chunks/dist-es-CZkzHpjF.js +1 -0
  199. package/dist/chunks/dist-es-Cbf0_D8d.js +5 -0
  200. package/dist/chunks/dist-es-ChHe-SVL.js +1 -0
  201. package/dist/chunks/dist-es-ClYOf0My.js +1 -0
  202. package/dist/chunks/dist-es-D-kJbj4A2.js +1 -0
  203. package/dist/chunks/dist-es-D1LN6CJd.js +1 -0
  204. package/dist/chunks/dist-es-DC1sC3ph.js +1 -0
  205. package/dist/chunks/dist-es-DGn8uOwQ2.js +1 -0
  206. package/dist/chunks/dist-es-DK5fTeKM2.js +1 -0
  207. package/dist/chunks/dist-es-DN7otr6F.js +1 -0
  208. package/dist/chunks/dist-es-DPM0mPK5.js +1 -0
  209. package/dist/chunks/dist-es-DqZAh3nG.js +1 -0
  210. package/dist/chunks/dist-es-DuAZyxJ02.js +5 -0
  211. package/dist/chunks/dist-es-HVQrM0oE.js +1 -0
  212. package/dist/chunks/dist-es-OVleIB54.js +1 -0
  213. package/dist/chunks/dist-es-UAs0rdXg.js +1 -0
  214. package/dist/chunks/dist-es-WvMMuHmx2.js +1 -0
  215. package/dist/chunks/dist-es-fjXft-jH.js +1 -0
  216. package/dist/chunks/dist-es-hdN_ShpZ.js +3 -0
  217. package/dist/chunks/dist-es-neiUvMJb.js +1 -0
  218. package/dist/chunks/dist-es-yMYpDtui2.js +1 -0
  219. package/dist/chunks/dist-es-zjcbuB72.js +1 -0
  220. package/dist/chunks/distRoot-CcxmnzqQ.js +1 -0
  221. package/dist/chunks/doctor-CUWjbh1X.js +1 -0
  222. package/dist/chunks/earlyInput-JGJo1zcC.js +1 -0
  223. package/dist/chunks/earlyInput-tRkbxFv2.js +2 -0
  224. package/dist/chunks/effort-loH1TUvE.js +9 -0
  225. package/dist/chunks/entry-D58E-E6Y.js +14 -0
  226. package/dist/chunks/env-chR0gV31.js +1 -0
  227. package/dist/chunks/envLessBridgeConfig-CT8sdmFu.js +1 -0
  228. package/dist/chunks/envLessBridgeConfig-SPEr9oqO.js +1 -0
  229. package/dist/chunks/envUtils-BWeoiL4Y.js +1 -0
  230. package/dist/chunks/escHotkey-Cyz0yyh1.js +259 -0
  231. package/dist/chunks/esm--xjzB1hI.js +1 -0
  232. package/dist/chunks/esm-B2HIF0XY.js +1 -0
  233. package/dist/chunks/esm-BGQPWnJy.js +1 -0
  234. package/dist/chunks/esm-C-1qL9Mn.js +1 -0
  235. package/dist/chunks/esm-C3jcs1DH.js +1 -0
  236. package/dist/chunks/esm-C97WL9nC.js +1 -0
  237. package/dist/chunks/esm-CIL-SKM8.js +1 -0
  238. package/dist/chunks/esm-CJlBxjtx.js +1 -0
  239. package/dist/chunks/esm-CsGLyWmS.js +56 -0
  240. package/dist/chunks/esm-DQHmDm-H.js +1 -0
  241. package/dist/chunks/esm-DcdOXSzi.js +1 -0
  242. package/dist/chunks/esm-DhNYgGTV.js +1 -0
  243. package/dist/chunks/esm-DxPW7qPs.js +1 -0
  244. package/dist/chunks/esm-FBUWr3vI.js +1 -0
  245. package/dist/chunks/esm-QgL6y---.js +10 -0
  246. package/dist/chunks/esm-v0kPjgVS.js +1 -0
  247. package/dist/chunks/esm-vIn-YV_h.js +1 -0
  248. package/dist/chunks/event-streams-BV7ngMXu.js +1 -0
  249. package/dist/chunks/eventLoopStallDetector-Dnh1fc31.js +1 -0
  250. package/dist/chunks/execAsync-BkA6ogic.js +1 -0
  251. package/dist/chunks/execFileNoThrow-CuQN1sz8.js +1 -0
  252. package/dist/chunks/execSyncWrapper-C2XQnFVo.js +1 -0
  253. package/dist/chunks/execa-CGue6Z3n.js +34 -0
  254. package/dist/chunks/executor-4EeD8GNm.js +1561 -0
  255. package/dist/chunks/executor-BHEuNh5F.js +1 -0
  256. package/dist/chunks/exit-D-tuPpbx.js +1 -0
  257. package/dist/chunks/exit-_obETqBv.js +2 -0
  258. package/dist/chunks/export-BIZ_SPXJ.js +2 -0
  259. package/dist/chunks/exportRenderer-CWPSMaqM.js +1 -0
  260. package/dist/chunks/extra-usage-CCMwIa85.js +1 -0
  261. package/dist/chunks/extra-usage-core-BNW4VT7o.js +1 -0
  262. package/dist/chunks/extra-usage-noninteractive-B_WjXO1E.js +1 -0
  263. package/dist/chunks/extra-usage-rdJ7ecEb.js +1 -0
  264. package/dist/chunks/extraUsage-CNMMTNJi.js +1 -0
  265. package/dist/chunks/extractMemories-BrvZVsmM.js +1 -0
  266. package/dist/chunks/fast-CG1v3fRr.js +1 -0
  267. package/dist/chunks/fast-CLKKsx2H.js +1 -0
  268. package/dist/chunks/featureCheck-Cm0YNDXO.js +1 -0
  269. package/dist/chunks/featureCheck-p7OeCYzj.js +1 -0
  270. package/dist/chunks/feedback-CG4mS_-B.js +1 -0
  271. package/dist/chunks/figures-gfT9mM8P.js +1 -0
  272. package/dist/chunks/fileStateCache-C7-TxF8G.js +1 -0
  273. package/dist/chunks/files-DYvAZGxp.js +2 -0
  274. package/dist/chunks/firstPartyEventLogger-Y_jAnHoR.js +1 -0
  275. package/dist/chunks/flushGate-COPcye5f.js +1 -0
  276. package/dist/chunks/foundry-sdk-BFN5VDFQ.js +1 -0
  277. package/dist/chunks/fpsMetrics-DeezdcwV.js +1 -0
  278. package/dist/chunks/fuse-Ch_OAlm3.js +1 -0
  279. package/dist/chunks/gates-CSHuXnUx.js +1 -0
  280. package/dist/chunks/gates-CSKxLmMJ.js +1 -0
  281. package/dist/chunks/gemini-B3uSLiNp.js +1 -0
  282. package/dist/chunks/generateRecap-D7rG3jIm.js +1 -0
  283. package/dist/chunks/generateSessionName-zbqanivg.js +1 -0
  284. package/dist/chunks/genericProcessUtils-BGvcwuPt.js +23 -0
  285. package/dist/chunks/getMachineId-bsd-BMtYGBUL.js +1 -0
  286. package/dist/chunks/getMachineId-darwin-CiLdFH7z.js +2 -0
  287. package/dist/chunks/getMachineId-linux-Cr27rIeY.js +1 -0
  288. package/dist/chunks/getMachineId-unsupported-ceiBLwAN.js +1 -0
  289. package/dist/chunks/getMachineId-win-DFTmsQHq.js +1 -0
  290. package/dist/chunks/git-CN3qtTb_.js +6 -0
  291. package/dist/chunks/git-D23Mzu_K.js +1 -0
  292. package/dist/chunks/githubRepoPathMapping-B04nEUDG.js +1 -0
  293. package/dist/chunks/graceful-fs-Cgc0rjGF.js +2 -0
  294. package/dist/chunks/grok-CDOpos8E.js +1 -0
  295. package/dist/chunks/growthbook-C_EY78Sn.js +1 -0
  296. package/dist/chunks/hash-BRmOQc3c.js +1 -0
  297. package/dist/chunks/heapdump-CpmhJ55b.js +5 -0
  298. package/dist/chunks/help-EHn2neTv.js +1 -0
  299. package/dist/chunks/hooks-BFdX17Za.js +1 -0
  300. package/dist/chunks/hooks-BV6HqbU4.js +79 -0
  301. package/dist/chunks/hostAdapter-_SmFAVNf.js +1 -0
  302. package/dist/chunks/hostGuard-zim_4F9V.js +1 -0
  303. package/dist/chunks/httpAuthSchemes-Wq4XWeLL.js +13 -0
  304. package/dist/chunks/ide-DkN0KdTR.js +2 -0
  305. package/dist/chunks/inboundAttachments-BVUunfAX.js +1 -0
  306. package/dist/chunks/inboundAttachments-DnGQw7Pf.js +1 -0
  307. package/dist/chunks/index.min-BJnb9GQI.js +1 -0
  308. package/dist/chunks/initReplBridge-tPRGPBq7.js +1 -0
  309. package/dist/chunks/insights-Bs9kJDG6.js +822 -0
  310. package/dist/chunks/install-CFX_ph9z.js +1 -0
  311. package/dist/chunks/install-github-app-CvRjY1Wi.js +147 -0
  312. package/dist/chunks/install-slack-app-DjhnVSe0.js +1 -0
  313. package/dist/chunks/instinctParser-DHMa8xa0.js +1 -0
  314. package/dist/chunks/instrumentation-c5zlOWom.js +12 -0
  315. package/dist/chunks/intl-Pse97ORk.js +1 -0
  316. package/dist/chunks/isObject-DaxDnPKm.js +1 -0
  317. package/dist/chunks/isSymbol-Dp3irZaY.js +1 -0
  318. package/dist/chunks/job-3QwLq609.js +2 -0
  319. package/dist/chunks/json-bigint-OxRwRvup.js +8 -0
  320. package/dist/chunks/jsx-runtime-D-D469L8.js +1 -0
  321. package/dist/chunks/jws-2vqRyZtR.js +3 -0
  322. package/dist/chunks/jwtUtils-CpXwh_du.js +1 -0
  323. package/dist/chunks/keybindings-7mDm3UKD.js +2 -0
  324. package/dist/chunks/lang-DyyjY20G.js +1 -0
  325. package/dist/chunks/language-CPRGmY8Q.js +1 -0
  326. package/dist/chunks/language-Cf6bMI4N.js +1 -0
  327. package/dist/chunks/launchAgentsPlatform-CpsMsTqQ.js +1 -0
  328. package/dist/chunks/launchAutofixPr-D9h6YAZY.js +2 -0
  329. package/dist/chunks/launchCommand-Du91jxMC.js +1 -0
  330. package/dist/chunks/launchLocalMemory-DlYQcEQJ.js +3 -0
  331. package/dist/chunks/launchLocalVault-CP0AyPjj.js +3 -0
  332. package/dist/chunks/launchMemoryStores-BHoDFkJ5.js +1 -0
  333. package/dist/chunks/launchOnboarding-CFTNXcnc.js +8 -0
  334. package/dist/chunks/launchSchedule-5KQr6x_A.js +1 -0
  335. package/dist/chunks/launchSkillStore-D0yGuE68.js +1 -0
  336. package/dist/chunks/launchTeleport-DRKnXOwY.js +3 -0
  337. package/dist/chunks/launchVault-XA-zAswX.js +1 -0
  338. package/dist/chunks/lazySchema-2sOku3cX.js +1 -0
  339. package/dist/chunks/lib-B4Q0Nrpb.js +14 -0
  340. package/dist/chunks/lib-Ca3QWJjN.js +2 -0
  341. package/dist/chunks/lib-inCisXen.js +8 -0
  342. package/dist/chunks/loadAgentsDir-DCyiY0MN.js +1 -0
  343. package/dist/chunks/loadAgentsDir-DI1a76pd.js +4601 -0
  344. package/dist/chunks/loadPluginHooks-C0Ei-0E2.js +1 -0
  345. package/dist/chunks/loadSso-sDs471GC.js +1 -0
  346. package/dist/chunks/localSearch-CDOJNc_E.js +1 -0
  347. package/dist/chunks/localSearch-MBx7KzC2.js +1 -0
  348. package/dist/chunks/lockfile-DBwdlC3K.js +1 -0
  349. package/dist/chunks/log-CzsijfHZ.js +1 -0
  350. package/dist/chunks/login-D8UKKaud.js +1 -0
  351. package/dist/chunks/login-nwTOoyxv.js +1 -0
  352. package/dist/chunks/logoV2Utils-DDUoPClc.js +1 -0
  353. package/dist/chunks/logout-B0BjqlGi.js +1 -0
  354. package/dist/chunks/magicDocs-CmUlOWjI.js +57 -0
  355. package/dist/chunks/main-C6be1KFk.js +31 -0
  356. package/dist/chunks/main-CeG_nUsC.js +1108 -0
  357. package/dist/chunks/mappers-CJ8IO1o1.js +1 -0
  358. package/dist/chunks/mcp-CanCqnch.js +2 -0
  359. package/dist/chunks/mcp-Dq0kxZFx.js +6 -0
  360. package/dist/chunks/mcp-zbxZM9BP.js +1 -0
  361. package/dist/chunks/mcpServer-DPHQVYdC.js +1 -0
  362. package/dist/chunks/mcpServer-lIneUZ5p.js +1 -0
  363. package/dist/chunks/memoize-DNnuA2aU.js +1 -0
  364. package/dist/chunks/memoize-DxwLawI2.js +1 -0
  365. package/dist/chunks/memory-BcWBkKV8.js +1 -0
  366. package/dist/chunks/mobile-umu5P0cM.js +2 -0
  367. package/dist/chunks/modalContext-CmSKRyea.js +1 -0
  368. package/dist/chunks/model-DJLzVvcF.js +1 -0
  369. package/dist/chunks/model-H3rtl6eR.js +1 -0
  370. package/dist/chunks/normalization-Cox8C0dP.js +1 -0
  371. package/dist/chunks/oauth-CdZEzMww.js +1 -0
  372. package/dist/chunks/oauth-CmensepG.js +1 -0
  373. package/dist/chunks/observationStore-tvkldXUo.js +4 -0
  374. package/dist/chunks/onChangeAppState-Dxbl8fvk.js +1 -0
  375. package/dist/chunks/open-CDditBQ-.js +1 -0
  376. package/dist/chunks/openai-DkYK4THc.js +10 -0
  377. package/dist/chunks/openaiShared-D5lOejS1.js +16 -0
  378. package/dist/chunks/output-style-XDb9-2Kk.js +1 -0
  379. package/dist/chunks/overageCreditGrant-DLKadMYU.js +1 -0
  380. package/dist/chunks/p-map-9Ud1LOrJ.js +1 -0
  381. package/dist/chunks/p-map-D7WEmnBE.js +1 -0
  382. package/dist/chunks/package-BhL7chzt.js +1 -0
  383. package/dist/chunks/panel-ByW1omJn.js +1 -0
  384. package/dist/chunks/panel-Bz_8td5D.js +1 -0
  385. package/dist/chunks/parseConnectUrl-BS6i9JPo.js +1 -0
  386. package/dist/chunks/parser-CmngCwjB.js +1 -0
  387. package/dist/chunks/parser-SWIZo39J.js +1 -0
  388. package/dist/chunks/passes-BIfuerjL.js +1 -0
  389. package/dist/chunks/path-C4kbwvSH.js +1 -0
  390. package/dist/chunks/paths-BBvuDQl9.js +39 -0
  391. package/dist/chunks/permissions-DXLfdE7b.js +1 -0
  392. package/dist/chunks/permissions-Ps_D01ZB.js +1 -0
  393. package/dist/chunks/permissions-S2EvIRKj.js +3 -0
  394. package/dist/chunks/pipeTransport-DVoIA1uN.js +1 -0
  395. package/dist/chunks/plan--lnWxB3Q.js +1 -0
  396. package/dist/chunks/platform-CuyedWpe.js +2 -0
  397. package/dist/chunks/plist-BO4ZqMZc.js +6 -0
  398. package/dist/chunks/plugin-DWLyrLw4.js +1 -0
  399. package/dist/chunks/pluginAutoupdate-CGXIWBrb.js +1 -0
  400. package/dist/chunks/pluginBlocklist-DJrMdzT0.js +1 -0
  401. package/dist/chunks/pluginCliCommands-C08q9dHk.js +1 -0
  402. package/dist/chunks/pluginFlagging-Dggxke70.js +1 -0
  403. package/dist/chunks/pluginOperations-CNCImIe8.js +2 -0
  404. package/dist/chunks/pluginStartupCheck-BW2fjg2P.js +1 -0
  405. package/dist/chunks/pluginStartupCheck-DpxQPXJE.js +1 -0
  406. package/dist/chunks/plugins-DQ3CRWWO.js +4 -0
  407. package/dist/chunks/policyLimits-BotYrS-v.js +1 -0
  408. package/dist/chunks/pollConfig-DAQ-ives.js +1 -0
  409. package/dist/chunks/poller-Ds0Y6Cir.js +1 -0
  410. package/dist/chunks/poor-DqfrQT61.js +1 -0
  411. package/dist/chunks/poorMode-DEAe3hiK.js +1 -0
  412. package/dist/chunks/poorMode-DzYT47KW.js +1 -0
  413. package/dist/chunks/postCommitAttribution-Ehmwzzuq.js +1 -0
  414. package/dist/chunks/print-GGVp62vj.js +39 -0
  415. package/dist/chunks/privacy-settings-agwqjYJo.js +1 -0
  416. package/dist/chunks/process-CWupreF6.js +1 -0
  417. package/dist/chunks/process-DMKLUQIO.js +1 -0
  418. package/dist/chunks/processBashCommand-DHHN8Ca4.js +1 -0
  419. package/dist/chunks/processSlashCommand-COtIO6Jy.js +6 -0
  420. package/dist/chunks/projectContext-0fpRKUeH.js +1 -0
  421. package/dist/chunks/projectContext-eXMSfgdZ.js +1 -0
  422. package/dist/chunks/prompt-4tea6NJQ.js +54 -0
  423. package/dist/chunks/prompt-CO160cIr.js +1 -0
  424. package/dist/chunks/prompt-CjFAtm3w.js +222 -0
  425. package/dist/chunks/prompt-GY9hlRvI.js +1 -0
  426. package/dist/chunks/promptEditor-EgosPsy-.js +4 -0
  427. package/dist/chunks/protocolHandler-mtPUT9U0.js +13 -0
  428. package/dist/chunks/protocols-CAyQOlkr.js +7 -0
  429. package/dist/chunks/proxy-CfZp-wce.js +99 -0
  430. package/dist/chunks/rate-limit-options-C6SFOHue.js +1 -0
  431. package/dist/chunks/rcDebugLog-CPKZCtR8.js +11 -0
  432. package/dist/chunks/referral-DeDr9zAE.js +1 -0
  433. package/dist/chunks/refresh-D7pdoY_X.js +1 -0
  434. package/dist/chunks/registerProtocol-BZBH8Zgl.js +36 -0
  435. package/dist/chunks/registry-Dz6AbiYP.js +1 -0
  436. package/dist/chunks/release-notes-DiUNOrg9.js +4 -0
  437. package/dist/chunks/releaseNotes-CnhQit0y.js +2 -0
  438. package/dist/chunks/reload-plugins-Dx52GcaG.js +1 -0
  439. package/dist/chunks/remote-env-B67Oo3sI.js +1 -0
  440. package/dist/chunks/remoteBridgeCore-BzSUgPbt.js +1 -0
  441. package/dist/chunks/remoteControlServer-L8smP7Zu.js +3 -0
  442. package/dist/chunks/rename-C4PauyTZ.js +1 -0
  443. package/dist/chunks/renderOptions-BiyC2rj1.js +1 -0
  444. package/dist/chunks/resume-CrSn26xq.js +2 -0
  445. package/dist/chunks/rewind-CXplHgh_.js +1 -0
  446. package/dist/chunks/rollback-DbSpxmJE.js +11 -0
  447. package/dist/chunks/runtimeObserver-YNy3mIb7.js +1 -0
  448. package/dist/chunks/runtimeObserver-nAhH4Wca.js +10 -0
  449. package/dist/chunks/sandbox-adapter-CzwHes1i.js +1 -0
  450. package/dist/chunks/sandbox-toggle-BYqbcI5d.js +1 -0
  451. package/dist/chunks/sanitization-CYp-9DbE.js +1 -0
  452. package/dist/chunks/satisfies-BaHgd_ie.js +1 -0
  453. package/dist/chunks/schemas-BGAvj1T4.js +40 -0
  454. package/dist/chunks/sdk-DEtgRZvI.js +1 -0
  455. package/dist/chunks/sdkHeapDumpMonitor--fevrC5z.js +1 -0
  456. package/dist/chunks/searchExtraTools-CcpdCO6l.js +1 -0
  457. package/dist/chunks/semver-Cq33BYay.js +1 -0
  458. package/dist/chunks/semver-Tw0AFar5.js +1 -0
  459. package/dist/chunks/sentry-BNVxoVLS.js +13 -0
  460. package/dist/chunks/server-C5XZSlto.js +1 -0
  461. package/dist/chunks/server-DzOdtq8A.js +1 -0
  462. package/dist/chunks/serverBanner-WlSYP-f8.js +1 -0
  463. package/dist/chunks/serverLog-DtsUvDiY.js +1 -0
  464. package/dist/chunks/session-BuEmHrqM.js +2 -0
  465. package/dist/chunks/sessionDataUploader-Ctjo1bgR.js +1 -0
  466. package/dist/chunks/sessionDiscovery-Mcsfa0g-.js +1 -0
  467. package/dist/chunks/sessionFileAccessHooks-qnNiGMnE.js +1 -0
  468. package/dist/chunks/sessionManager-Dw72ZUTg.js +1 -0
  469. package/dist/chunks/sessionMemory-CMahwDdW.js +1 -0
  470. package/dist/chunks/sessionMemory-pFSn4HSN.js +1 -0
  471. package/dist/chunks/sessionMemoryUtils-Du5jUl7M.js +1 -0
  472. package/dist/chunks/sessionObserver-DG2zQgfi.js +20 -0
  473. package/dist/chunks/sessionObserver-Je868MC9.js +1 -0
  474. package/dist/chunks/sessionStorage-D3FhAADV.js +1 -0
  475. package/dist/chunks/sessionStoragePortable-BI9q2WcJ.js +3 -0
  476. package/dist/chunks/sessionTitle-zUVSAHO7.js +14 -0
  477. package/dist/chunks/sessionTracing-DoRJ4nSa.js +11 -0
  478. package/dist/chunks/settingsSync-B9bz77E1.js +1 -0
  479. package/dist/chunks/setup-B1JbPepL.js +9 -0
  480. package/dist/chunks/setup-CCOLlRtP.js +1 -0
  481. package/dist/chunks/setup-DWkSjA49.js +2 -0
  482. package/dist/chunks/shadowedRuleDetection-BBR3uEgx.js +1 -0
  483. package/dist/chunks/shellQuote-DgjT8KBA.js +1 -0
  484. package/dist/chunks/sideQuestion-DHW5rgKz.js +20 -0
  485. package/dist/chunks/signin-QEeYpJZw.js +1 -0
  486. package/dist/chunks/sink-DxDOsLa2.js +1 -0
  487. package/dist/chunks/sink-cQOgsnw3.js +1 -0
  488. package/dist/chunks/sinks-BrrTUxkC.js +2 -0
  489. package/dist/chunks/sinks-Djiz_5-Z.js +1 -0
  490. package/dist/chunks/skill-learning-C0nOKZfg.js +5 -0
  491. package/dist/chunks/skillChangeDetector-D8C-uQSQ.js +1 -0
  492. package/dist/chunks/skillGapStore-Czi5jKjJ.js +1 -0
  493. package/dist/chunks/skillGapStore-_YuJP5KI.js +5 -0
  494. package/dist/chunks/skillGenerator-kbaRbpqJ.js +8 -0
  495. package/dist/chunks/skillLearning-3KWrBczS.js +1 -0
  496. package/dist/chunks/skillLearning-DBbdGbk-.js +1 -0
  497. package/dist/chunks/skillPanel-BxDvlPzd.js +28 -0
  498. package/dist/chunks/skillSearchPanel-D-MX6Qgt.js +21 -0
  499. package/dist/chunks/skills-NpEgFkFZ.js +1 -0
  500. package/dist/chunks/slashCommandParsing-Cari0pNg.js +1 -0
  501. package/dist/chunks/sleep-8Eb9j_Ly.js +1 -0
  502. package/dist/chunks/sprites-DD4eIkN7.js +1 -0
  503. package/dist/chunks/src-BIPP3_mo.js +26 -0
  504. package/dist/chunks/src-BJz1KAd_.js +6 -0
  505. package/dist/chunks/src-BRAdBA8A.js +1 -0
  506. package/dist/chunks/src-BRC_BuUP.js +1 -0
  507. package/dist/chunks/src-BaB-bpCj.js +5 -0
  508. package/dist/chunks/src-BlLavFUS.js +7 -0
  509. package/dist/chunks/src-C5yhFG0C.js +19 -0
  510. package/dist/chunks/src-CI_jaaBj.js +2 -0
  511. package/dist/chunks/src-CRsA-Z4y.js +1 -0
  512. package/dist/chunks/src-CYLfL70h.js +1 -0
  513. package/dist/chunks/src-DJXCzwyJ.js +1 -0
  514. package/dist/chunks/src-DJXKJavk.js +1 -0
  515. package/dist/chunks/src-Di342QoJ.js +53 -0
  516. package/dist/chunks/src-DsMd9Q9e.js +2 -0
  517. package/dist/chunks/src-DzH9IdOo.js +1 -0
  518. package/dist/chunks/src-hdbPEvzO.js +9 -0
  519. package/dist/chunks/src-poaoYkuc.js +1 -0
  520. package/dist/chunks/src-x7u_sB6m.js +1 -0
  521. package/dist/chunks/sso-oidc-BX1MlBX0.js +1 -0
  522. package/dist/chunks/startupProfiler-DnXZaX4A.js +3 -0
  523. package/dist/chunks/startupProfiler-SOE--nM9.js +1 -0
  524. package/dist/chunks/state-B2GIOsTB.js +1 -0
  525. package/dist/chunks/state-Ce1HlR-H.js +1 -0
  526. package/dist/chunks/state-sIHsFpDu.js +1 -0
  527. package/dist/chunks/staticRender-Br64h1E1.js +1 -0
  528. package/dist/chunks/stats-xL3NHwhp.js +1 -0
  529. package/dist/chunks/status-B5E70xRv.js +1 -0
  530. package/dist/chunks/statusNoticeHelpers-DcssRhLw.js +1 -0
  531. package/dist/chunks/stdio-BEEzuxaZ.js +1 -0
  532. package/dist/chunks/stdio-D4cT86R0.js +3 -0
  533. package/dist/chunks/stickers-2K05wjSp.js +1 -0
  534. package/dist/chunks/store-DhI7Lcan.js +1 -0
  535. package/dist/chunks/sts-BDFJ-6QE.js +1 -0
  536. package/dist/chunks/subprocessEnv-CggQWZCx.js +1 -0
  537. package/dist/chunks/subprocessEnv-DV6q6o6w.js +1 -0
  538. package/dist/chunks/supports-color-lkzOMQ6u.js +1 -0
  539. package/dist/chunks/systemPromptSections-BcN_XBTx.js +1 -0
  540. package/dist/chunks/systemPromptSections-DB93ZNWP.js +1 -0
  541. package/dist/chunks/systemTheme-dDbitcxB.js +1 -0
  542. package/dist/chunks/tag-BELr-qIa.js +11 -0
  543. package/dist/chunks/tasks-CrdWcSt-.js +1 -0
  544. package/dist/chunks/teamHelpers--3ZyNDlv.js +1 -0
  545. package/dist/chunks/teamHelpers-CUAiXng3.js +1 -0
  546. package/dist/chunks/teammate-DMYOtLTK.js +1 -0
  547. package/dist/chunks/teammateModeSnapshot-C6EWhR0X.js +1 -0
  548. package/dist/chunks/teammateModeSnapshot-DOQMTKbQ.js +1 -0
  549. package/dist/chunks/teleport-LXFOan9C.js +1 -0
  550. package/dist/chunks/templateJobs-8IY2Cgig.js +12 -0
  551. package/dist/chunks/terminalSetup-C4psrmpb.js +1 -0
  552. package/dist/chunks/terminalSetup-Lyg4NbGA.js +33 -0
  553. package/dist/chunks/theme-B8GNnJ_q.js +1 -0
  554. package/dist/chunks/thinkback-DPXwEK3B.js +1 -0
  555. package/dist/chunks/thinkback-DZW3Mcx_.js +1 -0
  556. package/dist/chunks/thinkback-play-BMOE-ceh.js +1 -0
  557. package/dist/chunks/tmux-CvbhsfwG.js +1 -0
  558. package/dist/chunks/toolEventObserver-D0TSHm01.js +1 -0
  559. package/dist/chunks/toolEventObserver-DzLd0MSn.js +1 -0
  560. package/dist/chunks/toolPool-DVOfpjDz.js +1 -0
  561. package/dist/chunks/toolPool-Dq-Vtvrj.js +1 -0
  562. package/dist/chunks/trustedDevice-1iTu4LEm.js +1 -0
  563. package/dist/chunks/trustedDevice-BvYYXfd8.js +1 -0
  564. package/dist/chunks/tui-BVc2q4Xv.js +6 -0
  565. package/dist/chunks/turndown.es-Bv06VjMb.js +69 -0
  566. package/dist/chunks/types-CQ1wrnQ0.js +1 -0
  567. package/dist/chunks/types-Csi32ZXh.js +17 -0
  568. package/dist/chunks/types-RJTEOuIt.js +3 -0
  569. package/dist/chunks/udsClient-BvG_Jip0.js +1 -0
  570. package/dist/chunks/ultrareviewCommand-BTXAN2wP.js +3 -0
  571. package/dist/chunks/undercover-C_44e3oN.js +1 -0
  572. package/dist/chunks/undercover-DvvnEmsX.js +31 -0
  573. package/dist/chunks/up-D-U4wUCe.js +12 -0
  574. package/dist/chunks/updateCCB-C-qfLi0j.js +11 -0
  575. package/dist/chunks/upgrade-CGXa5Dwy.js +1 -0
  576. package/dist/chunks/upgrade-DTBZSxwv.js +1 -0
  577. package/dist/chunks/upload-BF8tf_Eo.js +1 -0
  578. package/dist/chunks/upstreamproxy-DcLeL2XX.js +11 -0
  579. package/dist/chunks/usage-BRYRRgNt.js +1 -0
  580. package/dist/chunks/usage-DvSTXEYY.js +1 -0
  581. package/dist/chunks/useKeybinding-FsOnjW6T.js +1 -0
  582. package/dist/chunks/useMainLoopModel-CwvuTRXn.js +1 -0
  583. package/dist/chunks/useManagePlugins-GmnI9K53.js +1 -0
  584. package/dist/chunks/useMergedTools-Dah5KDMi.js +1 -0
  585. package/dist/chunks/useSearchInput-BV_azHiA.js +1 -0
  586. package/dist/chunks/useSettingsErrors-C-j_Zt7g.js +1 -0
  587. package/dist/chunks/useVoice-DR69NLxp.js +1 -0
  588. package/dist/chunks/util-BpyJ4Bom.js +1 -0
  589. package/dist/chunks/utils-CrZcpypC.js +1 -0
  590. package/dist/chunks/v4-f1i_CNUT.js +1 -0
  591. package/dist/chunks/validatePlugin-vptAYuYu.js +1 -0
  592. package/dist/chunks/vertex-sdk-CSGw3fvU.js +9 -0
  593. package/dist/chunks/vim-DvOw8dfR.js +1 -0
  594. package/dist/chunks/voice-B3BZs53f.js +2 -0
  595. package/dist/chunks/voice-DXiiy8HX.js +8 -0
  596. package/dist/chunks/voiceModeEnabled-DA76xN1Q.js +1 -0
  597. package/dist/chunks/voiceModeEnabled-DIveLYGb.js +1 -0
  598. package/dist/chunks/voiceStreamSTT-_w1VjIOs.js +1 -0
  599. package/dist/chunks/voiceStreamSTT-hpzWd_zl.js +1 -0
  600. package/dist/chunks/which-DqSAIvp2.js +1 -0
  601. package/dist/chunks/windowsPaths-C9CigqoF.js +1 -0
  602. package/dist/chunks/windowsPaths-swxCp7bX.js +2 -0
  603. package/dist/chunks/workSecret-mS2OrpxF.js +1 -0
  604. package/dist/chunks/workerRegistry-2_MZVih1.js +1 -0
  605. package/dist/chunks/worktree-CCuDwRmS.js +1 -0
  606. package/dist/chunks/worktreeModeEnabled-Db6b_Iy_.js +1 -0
  607. package/dist/chunks/worktreeModeEnabled-THQb19xR.js +1 -0
  608. package/dist/chunks/wrapper-BSK0MCQH.js +1 -0
  609. package/dist/chunks/wrapper-D5qL1aQL.js +6 -0
  610. package/dist/chunks/xdg-CBxMmQux.js +1 -0
  611. package/dist/chunks/xml-Dx--sNE1.js +1 -0
  612. package/dist/chunks/zod-DT6hytkp.js +1 -0
  613. package/dist/cli.js +1 -10978
  614. package/package.json +1 -1
@@ -0,0 +1,2 @@
1
+ import{a as e,i as t,t as n}from"./chunk-DR8-3Aex.js";import{n as r,t as i}from"./defineProperty-80gRi2ZW.js";import{n as a,t as o}from"./esm-CJlBxjtx.js";import{A as s,c,j as l,s as u}from"./esm-DcdOXSzi.js";import{n as d,t as f}from"./esm-QgL6y---.js";var p=n((t=>{r(),Object.defineProperty(t,`__esModule`,{value:!0}),t.PrometheusSerializer=void 0;var n=(a(),e(o)),p=(d(),e(f)),m=(c(),e(u)),h=(l(),e(s)),g=`otel.scope.schema_url`;function _(e){return e.replace(/\\/g,`\\\\`).replace(/\n/g,`\\n`)}function v(e=``){return typeof e!=`string`&&(e=JSON.stringify(e)),_(e).replace(/"/g,`\\"`)}var y=/[^a-z0-9_]/gi,b=/_{2,}/g;function x(e){return e.replace(y,`_`).replace(b,`_`)}function S(e,t){return!e.endsWith(`_total`)&&t.dataPointType===p.DataPointType.SUM&&t.isMonotonic&&(e+=`_total`),e}function C(e){return e===1/0?`+Inf`:e===-1/0?`-Inf`:`${e}`}function w(e){switch(e.dataPointType){case p.DataPointType.SUM:return e.isMonotonic?`counter`:`gauge`;case p.DataPointType.GAUGE:return`gauge`;case p.DataPointType.HISTOGRAM:return`histogram`;default:return`untyped`}}function T(e,t,n,r,i){let a=!1,o=``;for(let[e,n]of Object.entries(t)){let t=x(e);a=!0,o+=`${o.length>0?`,`:``}${t}="${v(n)}"`}if(i)for(let[e,t]of Object.entries(i)){let n=x(e);a=!0,o+=`${o.length>0?`,`:``}${n}="${v(t)}"`}return a&&(e+=`{${o}}`),`${e} ${C(n)}${r===void 0?``:` `+String(r)}\n`}var E=`# no registered metrics`;t.PrometheusSerializer=class{constructor(e,t=!1,n,r,a){i(this,`_prefix`,void 0),i(this,`_appendTimestamp`,void 0),i(this,`_additionalAttributes`,void 0),i(this,`_withResourceConstantLabels`,void 0),i(this,`_withoutScopeInfo`,void 0),i(this,`_withoutTargetInfo`,void 0),e&&(this._prefix=e+`_`),this._appendTimestamp=t,this._withResourceConstantLabels=n,this._withoutScopeInfo=!!a,this._withoutTargetInfo=!!r}serialize(e){let t=``;this._additionalAttributes=this._filterResourceConstantLabels(e.resource.attributes,this._withResourceConstantLabels);for(let n of e.scopeMetrics)t+=this._serializeScopeMetrics(n);return t===``&&(t+=E),this._serializeResource(e.resource)+t}_filterResourceConstantLabels(e,t){if(t){let n={};for(let[r,i]of Object.entries(e))r.match(t)&&(n[r]=i);return n}}_serializeScopeMetrics(e){let t=``;for(let n of e.metrics)t+=this._serializeMetricData(n,e.scope)+`
2
+ `;return t}_serializeMetricData(e,t){let r=x(_(e.descriptor.name));this._prefix&&(r=`${this._prefix}${r}`);let i=e.dataPointType;r=S(r,e);let a=`# HELP ${r} ${_(e.descriptor.description||`description missing`)}`,o=e.descriptor.unit?`\n# UNIT ${r} ${_(e.descriptor.unit)}`:``,s=`# TYPE ${r} ${w(e)}`,c;if(this._withoutScopeInfo)c=this._additionalAttributes;else{let e={[h.ATTR_OTEL_SCOPE_NAME]:t.name};t.schemaUrl&&(e[g]=t.schemaUrl),t.version&&(e[h.ATTR_OTEL_SCOPE_VERSION]=t.version),c=Object.assign(e,this._additionalAttributes)}let l=``;switch(i){case p.DataPointType.SUM:case p.DataPointType.GAUGE:l=e.dataPoints.map(t=>this._serializeSingularDataPoint(r,e,t,c)).join(``);break;case p.DataPointType.HISTOGRAM:l=e.dataPoints.map(t=>this._serializeHistogramDataPoint(r,e,t,c)).join(``);break;default:n.diag.error(`Unrecognizable DataPointType: ${i} for metric "${r}"`)}return`${a}${o}\n${s}\n${l}`.trim()}_serializeSingularDataPoint(e,t,n,r){let i=``;e=S(e,t);let{value:a,attributes:o}=n,s=(0,m.hrTimeToMilliseconds)(n.endTime);return i+=T(e,o,a,this._appendTimestamp?s:void 0,r),i}_serializeHistogramDataPoint(e,t,n,r){let i=``;e=S(e,t);let a=n.attributes,o=n.value,s=(0,m.hrTimeToMilliseconds)(n.endTime);for(let t of[`count`,`sum`]){let n=o[t];n!=null&&(i+=T(e+`_`+t,a,n,this._appendTimestamp?s:void 0,r))}let c=0,l=o.buckets.counts.entries(),u=!1;for(let[t,n]of l){c+=n;let l=o.buckets.boundaries[t];if(l===void 0&&u)break;l===1/0&&(u=!0),i+=T(e+`_bucket`,a,c,this._appendTimestamp?s:void 0,Object.assign({},r,{le:l===void 0||l===1/0?`+Inf`:String(l)}))}return i}_serializeResource(e){if(this._withoutTargetInfo===!0)return``;let t=`target_info`;return`${`# HELP ${t} Target metadata`}\n${`# TYPE ${t} gauge`}\n${T(t,e.attributes,1).trim()}\n`}}})),m=n((n=>{r(),Object.defineProperty(n,`__esModule`,{value:!0}),n.PrometheusExporter=void 0;var s=(a(),e(o)),l=(c(),e(u)),m=(d(),e(f)),h=t(`http`),g=p(),_=t(`url`),v=class e extends m.MetricReader{constructor(t={},n=()=>{}){super({aggregationSelector:e=>({type:m.AggregationType.DEFAULT}),aggregationTemporalitySelector:e=>m.AggregationTemporality.CUMULATIVE,metricProducers:t.metricProducers}),i(this,`_host`,void 0),i(this,`_port`,void 0),i(this,`_baseUrl`,void 0),i(this,`_endpoint`,void 0),i(this,`_server`,void 0),i(this,`_prefix`,void 0),i(this,`_appendTimestamp`,void 0),i(this,`_serializer`,void 0),i(this,`_startServerPromise`,void 0),i(this,`_requestHandler`,(e,t)=>{e.url!=null&&new _.URL(e.url,this._baseUrl).pathname===this._endpoint?this._exportMetrics(t):this._notFound(t)}),i(this,`_exportMetrics`,e=>{e.statusCode=200,e.setHeader(`content-type`,`text/plain`),this.collect().then(t=>{let{resourceMetrics:n,errors:r}=t;r.length&&s.diag.error(`PrometheusExporter: metrics collection errors`,...r),e.end(this._serializer.serialize(n))},t=>{e.end(`# failed to export metrics: ${t}`)})}),i(this,`_notFound`,e=>{e.statusCode=404,e.end()}),this._host=t.host||process.env.OTEL_EXPORTER_PROMETHEUS_HOST||e.DEFAULT_OPTIONS.host,this._port=t.port||Number(process.env.OTEL_EXPORTER_PROMETHEUS_PORT)||e.DEFAULT_OPTIONS.port,this._prefix=t.prefix||e.DEFAULT_OPTIONS.prefix,this._appendTimestamp=typeof t.appendTimestamp==`boolean`?t.appendTimestamp:e.DEFAULT_OPTIONS.appendTimestamp;let r=t.withResourceConstantLabels||e.DEFAULT_OPTIONS.withResourceConstantLabels,a=t.withoutScopeInfo||e.DEFAULT_OPTIONS.withoutScopeInfo,o=t.withoutTargetInfo||e.DEFAULT_OPTIONS.withoutTargetInfo;this._server=(0,h.createServer)(this._requestHandler).unref(),this._serializer=new g.PrometheusSerializer(this._prefix,this._appendTimestamp,r,o,a),this._baseUrl=`http://${this._host}:${this._port}/`,this._endpoint=(t.endpoint||e.DEFAULT_OPTIONS.endpoint).replace(/^([^/])/,`/$1`),t.preventServerStart===!0?n&&queueMicrotask(n):this.startServer().then(n,e=>{s.diag.error(e),n(e)})}async onForceFlush(){}onShutdown(){return this.stopServer()}stopServer(){return this._server?new Promise(e=>{this._server.close(t=>{t?t.code!==`ERR_SERVER_NOT_RUNNING`&&(0,l.globalErrorHandler)(t):s.diag.debug(`Prometheus exporter was stopped`),e()})}):(s.diag.debug(`Prometheus stopServer() was called but server was never started.`),Promise.resolve())}startServer(){return this._startServerPromise??(this._startServerPromise=new Promise((e,t)=>{this._server.once(`error`,t),this._server.listen({port:this._port,host:this._host},()=>{s.diag.debug(`Prometheus exporter server started: ${this._host}:${this._port}/${this._endpoint}`),e()})})),this._startServerPromise}getMetricsRequestHandler(e,t){this._exportMetrics(t)}};i(v,`DEFAULT_OPTIONS`,{host:void 0,port:9464,endpoint:`/metrics`,prefix:``,appendTimestamp:!1,withResourceConstantLabels:void 0,withoutScopeInfo:!1,withoutTargetInfo:!1}),n.PrometheusExporter=v})),h=n((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.PrometheusSerializer=e.PrometheusExporter=void 0;var t=m();Object.defineProperty(e,`PrometheusExporter`,{enumerable:!0,get:function(){return t.PrometheusExporter}});var n=p();Object.defineProperty(e,`PrometheusSerializer`,{enumerable:!0,get:function(){return n.PrometheusSerializer}})}));export default h();export{};
@@ -0,0 +1 @@
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{createRequire as t}from"node:module";import{dirname as n,resolve as r,sep as i}from"node:path";import{fileURLToPath as a}from"node:url";function o(){let e=n(a(import.meta.url)),t=e.split(i),o=t.lastIndexOf(`dist`);return o===-1?r(e,`..`,`..`,`..`,`vendor`):t.slice(0,o+1).join(i)+i+`vendor`}function s(){if(y)return v;y=!0;let e=process.platform;if(e!==`darwin`&&e!==`linux`&&e!==`win32`)return null;if(process.env.AUDIO_CAPTURE_NODE_PATH)try{return v=_(process.env.AUDIO_CAPTURE_NODE_PATH),v}catch{}let t=`audio-capture/${`${process.arch}-${e}`}/audio-capture.node`,n=[r(o(),t),`./vendor/${t}`,`../vendor/${t}`,`../../vendor/${t}`,`${process.cwd()}/vendor/${t}`];for(let e of n)try{return v=_(e),v}catch{}return null}function c(){return s()!==null}function l(e,t){let n=s();return n?n.startRecording(e,t):!1}function u(){let e=s();e&&e.stopRecording()}function d(){let e=s();return e?e.isRecording():!1}function f(e,t){let n=s();return n?n.startPlayback(e,t):!1}function p(e){let t=s();t&&t.writePlaybackData(e)}function m(){let e=s();e&&e.stopPlayback()}function h(){let e=s();return e?e.isPlaying():!1}function g(){let e=s();return!e||!e.microphoneAuthorizationStatus?0:e.microphoneAuthorizationStatus()}var _,v,y;e((()=>{_=t(import.meta.url),v=null,y=!1}))();export{c as isNativeAudioAvailable,h as isNativePlaying,d as isNativeRecordingActive,g as microphoneAuthorizationStatus,f as startNativePlayback,l as startNativeRecording,m as stopNativePlayback,u as stopNativeRecording,p as writeNativePlaybackData};
@@ -0,0 +1,9 @@
1
+ import{a as e,i as t,n,r,t as i}from"./chunk-DR8-3Aex.js";import{n as a,t as o}from"./defineProperty-80gRi2ZW.js";import{a as s,c,i as l,l as u,n as d,o as f,r as p,s as m,t as h,u as g}from"./classPrivateFieldSet2-EAQNhHs8.js";import{n as _,t as v}from"./json-bigint-OxRwRvup.js";import{t as y}from"./base64-js-DIVSFswY.js";import{n as b,t as x}from"./jws-2vqRyZtR.js";var S=r({author:()=>P,default:()=>ee,dependencies:()=>L,description:()=>T,devDependencies:()=>I,engines:()=>N,exports:()=>k,files:()=>O,homepage:()=>R,keywords:()=>M,license:()=>F,main:()=>E,name:()=>C,repository:()=>j,scripts:()=>A,types:()=>D,version:()=>w}),C,w,T,E,D,O,k,A,j,M,N,P,F,I,L,R,ee,te=n((()=>{C=`gaxios`,w=`7.1.4`,T=`A simple common HTTP client specifically for Google APIs and services.`,E=`build/cjs/src/index.js`,D=`build/cjs/src/index.d.ts`,O=[`build/`],k={".":{import:{types:`./build/esm/src/index.d.ts`,default:`./build/esm/src/index.js`},require:{types:`./build/cjs/src/index.d.ts`,default:`./build/cjs/src/index.js`}}},A={lint:`gts check --no-inline-config`,test:`c8 mocha build/esm/test`,"presystem-test":`npm run compile`,"system-test":`mocha build/esm/system-test --timeout 80000`,compile:`tsc -b ./tsconfig.json ./tsconfig.cjs.json && node utils/enable-esm.mjs`,fix:`gts fix`,prepare:`npm run compile`,pretest:`npm run compile`,webpack:`webpack`,"prebrowser-test":`npm run compile`,"browser-test":`node build/browser-test/browser-test-runner.js`,docs:`jsdoc -c .jsdoc.js`,"docs-test":`linkinator docs`,"predocs-test":`npm run docs`,"samples-test":`cd samples/ && npm link ../ && npm test && cd ../`,prelint:`cd samples; npm link ../; npm install`,clean:`gts clean`},j={type:`git`,directory:`packages/gaxios`,url:`https://github.com/googleapis/google-cloud-node-core.git`},M=[`google`],N={node:`>=18`},P=`Google, LLC`,F=`Apache-2.0`,I={"@babel/plugin-proposal-private-methods":`^7.18.6`,"@types/cors":`^2.8.6`,"@types/express":`^5.0.0`,"@types/extend":`^3.0.1`,"@types/mocha":`^10.0.10`,"@types/multiparty":`4.2.1`,"@types/mv":`^2.1.0`,"@types/ncp":`^2.0.8`,"@types/node":`^22.13.1`,"@types/sinon":`^17.0.3`,"@types/tmp":`^0.2.6`,assert:`^2.0.0`,browserify:`^17.0.0`,c8:`^10.1.3`,cors:`^2.8.5`,express:`^5.0.0`,gts:`^6.0.2`,"is-docker":`^3.0.0`,jsdoc:`^4.0.4`,"jsdoc-fresh":`^5.0.0`,"jsdoc-region-tag":`^4.0.0`,karma:`^6.0.0`,"karma-chrome-launcher":`^3.0.0`,"karma-coverage":`^2.0.0`,"karma-firefox-launcher":`^2.0.0`,"karma-mocha":`^2.0.0`,"karma-remap-coverage":`^0.1.5`,"karma-sourcemap-loader":`^0.4.0`,"karma-webpack":`^5.0.1`,linkinator:`^6.1.2`,mocha:`^11.1.0`,multiparty:`^4.2.1`,mv:`^2.1.1`,ncp:`^2.0.0`,nock:`^14.0.5`,"null-loader":`^4.0.1`,"pack-n-play":`^4.0.0`,puppeteer:`^24.0.0`,sinon:`^21.0.0`,"stream-browserify":`^3.0.0`,tmp:`0.2.5`,"ts-loader":`^9.5.2`,typescript:`5.8.3`,webpack:`^5.97.1`,"webpack-cli":`^6.0.1`},L={extend:`^3.0.2`,"https-proxy-agent":`^7.0.1`,"node-fetch":`^3.3.2`},R=`https://github.com/googleapis/google-cloud-node-core/tree/main/packages/gaxios`,ee={name:C,version:w,description:T,main:E,types:D,files:O,exports:k,scripts:A,repository:j,keywords:M,engines:N,author:P,license:F,devDependencies:I,dependencies:L,homepage:R}})),ne=i(((t,n)=>{n.exports={pkg:(te(),e(S).default)}})),re=i((e=>{a();var t,n,r=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(e,`__esModule`,{value:!0}),e.GaxiosError=e.GAXIOS_ERROR_SYMBOL=void 0,e.defaultErrorRedactor=l;var i=r(_()),s=r(ne()).default.pkg;e.GAXIOS_ERROR_SYMBOL=Symbol.for(`${s.name}-gaxios-error`),t=e.GAXIOS_ERROR_SYMBOL,n=Symbol.hasInstance,e.GaxiosError=class r extends Error{static[n](t){return t&&typeof t==`object`&&e.GAXIOS_ERROR_SYMBOL in t&&t[e.GAXIOS_ERROR_SYMBOL]===s.version?!0:Function.prototype[Symbol.hasInstance].call(r,t)}constructor(e,n,r,a){if(super(e,{cause:a}),o(this,`config`,void 0),o(this,`response`,void 0),o(this,`code`,void 0),o(this,`status`,void 0),o(this,`error`,void 0),o(this,t,s.version),this.config=n,this.response=r,this.error=a instanceof Error?a:void 0,this.config=(0,i.default)(!0,{},n),this.response&&(this.response.config=(0,i.default)(!0,{},this.response.config)),this.response){try{this.response.data=c(this.config.responseType,this.response?.bodyUsed?this.response?.data:void 0)}catch{}this.status=this.response.status}a instanceof DOMException?this.code=a.name:a&&typeof a==`object`&&`code`in a&&(typeof a.code==`string`||typeof a.code==`number`)&&(this.code=a.code)}static extractAPIErrorFromResponse(e,t=`The request failed`){let n=t;if(typeof e.data==`string`&&(n=e.data),e.data&&typeof e.data==`object`&&`error`in e.data&&e.data.error&&!e.ok){if(typeof e.data.error==`string`)return{message:e.data.error,code:e.status,status:e.statusText};if(typeof e.data.error==`object`){n=`message`in e.data.error&&typeof e.data.error.message==`string`?e.data.error.message:n;let t=`status`in e.data.error&&typeof e.data.error.status==`string`?e.data.error.status:e.statusText,r=`code`in e.data.error&&typeof e.data.error.code==`number`?e.data.error.code:e.status;if(`errors`in e.data.error&&Array.isArray(e.data.error.errors)){let i=[];for(let t of e.data.error.errors)typeof t==`object`&&`message`in t&&typeof t.message==`string`&&i.push(t.message);return Object.assign({message:i.join(`
2
+ `)||n,code:r,status:t},e.data.error)}return Object.assign({message:n,code:r,status:t},e.data.error)}}return{message:n,code:e.status,status:e.statusText}}};function c(e,t){switch(e){case`stream`:return t;case`json`:return JSON.parse(JSON.stringify(t));case`arraybuffer`:return JSON.parse(Buffer.from(t).toString(`utf8`));case`blob`:return JSON.parse(t.text());default:return t}}function l(e){let t="<<REDACTED> - See `errorRedactor` option in `gaxios` for configuration>.";function n(e){e&&e.forEach((n,r)=>{(/^authentication$/i.test(r)||/^authorization$/i.test(r)||/secret/i.test(r))&&e.set(r,t)})}function r(e,n){if(typeof e==`object`&&e&&typeof e[n]==`string`){let r=e[n];(/grant_type=/i.test(r)||/assertion=/i.test(r)||/secret/i.test(r))&&(e[n]=t)}}function i(e){!e||typeof e!=`object`||(e instanceof FormData||e instanceof URLSearchParams||`forEach`in e&&`set`in e?e.forEach((n,r)=>{([`grant_type`,`assertion`].includes(r)||/secret/.test(r))&&e.set(r,t)}):(`grant_type`in e&&(e.grant_type=t),`assertion`in e&&(e.assertion=t),`client_secret`in e&&(e.client_secret=t)))}return e.config&&(n(e.config.headers),r(e.config,`data`),i(e.config.data),r(e.config,`body`),i(e.config.body),e.config.url.searchParams.has(`token`)&&e.config.url.searchParams.set(`token`,t),e.config.url.searchParams.has(`client_secret`)&&e.config.url.searchParams.set(`client_secret`,t)),e.response&&(l({config:e.response.config}),n(e.response.headers),e.response.bodyUsed&&(r(e.response,`data`),i(e.response.data))),e}})),ie=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.getRetryConfig=t;async function t(e){let t=r(e);if(!e||!e.config||!t&&!e.config.retry)return{shouldRetry:!1};if(t=t||{},t.currentRetryAttempt=t.currentRetryAttempt||0,t.retry=t.retry===void 0||t.retry===null?3:t.retry,t.httpMethodsToRetry=t.httpMethodsToRetry||[`GET`,`HEAD`,`PUT`,`OPTIONS`,`DELETE`],t.noResponseRetries=t.noResponseRetries===void 0||t.noResponseRetries===null?2:t.noResponseRetries,t.retryDelayMultiplier=t.retryDelayMultiplier?t.retryDelayMultiplier:2,t.timeOfFirstRequest=t.timeOfFirstRequest?t.timeOfFirstRequest:Date.now(),t.totalTimeout=t.totalTimeout?t.totalTimeout:2**53-1,t.maxRetryDelay=t.maxRetryDelay?t.maxRetryDelay:2**53-1,t.statusCodesToRetry=t.statusCodesToRetry||[[100,199],[408,408],[429,429],[500,599]],e.config.retryConfig=t,!await(t.shouldRetry||n)(e))return{shouldRetry:!1,config:e.config};let a=i(t);e.config.retryConfig.currentRetryAttempt+=1;let o=t.retryBackoff?t.retryBackoff(e,a):new Promise(e=>{setTimeout(e,a)});return t.onRetryAttempt&&await t.onRetryAttempt(e),await o,{shouldRetry:!0,config:e.config}}function n(e){let t=r(e);if(e.config.signal?.aborted&&e.code!==`TimeoutError`||e.code===`AbortError`||!t||t.retry===0||!e.response&&(t.currentRetryAttempt||0)>=t.noResponseRetries||!t.httpMethodsToRetry||!t.httpMethodsToRetry.includes(e.config.method?.toUpperCase()||`GET`))return!1;if(e.response&&e.response.status){let n=!1;for(let[r,i]of t.statusCodesToRetry){let t=e.response.status;if(t>=r&&t<=i){n=!0;break}}if(!n)return!1}return t.currentRetryAttempt=t.currentRetryAttempt||0,!(t.currentRetryAttempt>=t.retry)}function r(e){if(e&&e.config&&e.config.retryConfig)return e.config.retryConfig}function i(e){let t=(e.currentRetryAttempt?0:e.retryDelay??100)+(e.retryDelayMultiplier**+e.currentRetryAttempt-1)/2*1e3,n=e.totalTimeout-(Date.now()-e.timeOfFirstRequest);return Math.min(t,n,e.maxRetryDelay)}})),ae=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.GaxiosInterceptorManager=void 0,e.GaxiosInterceptorManager=class extends Set{}})),oe=i((e=>{g(),a(),f();var n,r=e&&e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},i;Object.defineProperty(e,`__esModule`,{value:!0}),e.Gaxios=void 0;var c=r(_()),l=t(`https`),d=re(),p=ie(),m=t(`stream`),h=ae(),v=async()=>globalThis.crypto?.randomUUID()||(await import(`crypto`)).randomUUID(),y=204,b=new WeakSet,x=class e{constructor(e){u(this,b),o(this,`agentCache`,new Map),o(this,`defaults`,void 0),o(this,`interceptors`,void 0),this.defaults=e||{},this.interceptors={request:new h.GaxiosInterceptorManager,response:new h.GaxiosInterceptorManager}}fetch(...e){let t=e[0],n=e[1],r,a=new Headers;return typeof t==`string`?r=new URL(t):t instanceof URL?r=t:t&&t.url&&(r=new URL(t.url)),t&&typeof t==`object`&&`headers`in t&&i.mergeHeaders(a,t.headers),n&&i.mergeHeaders(a,new Headers(n.headers)),typeof t==`object`&&!(t instanceof URL)?this.request({...n,...t,headers:a,url:r}):this.request({...n,headers:a,url:r})}async request(e={}){let t=await s(b,this,T).call(this,e);return t=await s(b,this,C).call(this,t),s(b,this,w).call(this,this._request(t))}async _defaultAdapter(t){let n=t.fetchImplementation||this.defaults.fetchImplementation||await s(e,i,O).call(i),r={...t};delete r.data;let a=await n(t.url,r),o=await this.getResponseData(t,a);return Object.getOwnPropertyDescriptor(a,`data`)?.configurable||Object.defineProperties(a,{data:{configurable:!0,writable:!0,enumerable:!0,value:o}}),Object.assign(a,{config:t,data:o})}async _request(e){try{let t;if(t=e.adapter?await e.adapter(e,this._defaultAdapter.bind(this)):await this._defaultAdapter(e),!e.validateStatus(t.status)){if(e.responseType===`stream`){let e=[];for await(let n of t.data)e.push(n);t.data=e.toString()}let n=d.GaxiosError.extractAPIErrorFromResponse(t,`Request failed with status code ${t.status}`);throw new d.GaxiosError(n?.message,e,t,n)}return t}catch(t){let n;n=t instanceof d.GaxiosError?t:t instanceof Error?new d.GaxiosError(t.message,e,void 0,t):new d.GaxiosError(`Unexpected Gaxios Error`,e,void 0,t);let{shouldRetry:r,config:i}=await(0,p.getRetryConfig)(n);if(r&&i)return n.config.retryConfig.currentRetryAttempt=i.retryConfig.currentRetryAttempt,e.retryConfig=n.config?.retryConfig,s(b,this,E).call(this,e),this._request(e);throw e.errorRedactor&&e.errorRedactor(n),n}}async getResponseData(e,t){if(t.status===y)return``;if(e.maxContentLength&&t.headers.has(`content-length`)&&e.maxContentLength<Number.parseInt(t.headers?.get(`content-length`)||``))throw new d.GaxiosError("Response's `Content-Length` is over the limit.",e,Object.assign(t,{config:e}));switch(e.responseType){case`stream`:return t.body;case`json`:{let e=await t.text();try{return JSON.parse(e)}catch{return e}}case`arraybuffer`:return t.arrayBuffer();case`blob`:return t.blob();case`text`:return t.text();default:return this.getResponseDataFromContentType(t)}}validateStatus(e){return e>=200&&e<300}async getResponseDataFromContentType(e){let t=e.headers.get(`Content-Type`);if(t===null)return e.text();if(t=t.toLowerCase(),t.includes(`application/json`)){let t=await e.text();try{t=JSON.parse(t)}catch{}return t}else if(t.match(/^text\//))return e.text();else return e.blob()}async*getMultipartRequest(e,t){let n=`--${t}--`;for(let n of e)yield`--${t}\r\nContent-Type: ${n.headers.get(`Content-Type`)||`application/octet-stream`}\r\n\r\n`,typeof n.content==`string`?yield n.content:yield*n.content,yield`\r
3
+ `;yield n}static mergeHeaders(e,...t){e=e instanceof Headers?e:new Headers(e);for(let n of t)(n instanceof Headers?n:new Headers(n)).forEach((t,n)=>{n===`set-cookie`?e.append(n,t):e.set(n,t)});return e}};n=x;function S(e,t=[]){let n=new URL(e),r=[...t],i=(process.env.NO_PROXY??process.env.no_proxy)?.split(`,`)||[];for(let e of i)r.push(e.trim());for(let e of r)if(e instanceof RegExp){if(e.test(n.toString()))return!1}else if(e instanceof URL){if(e.origin===n.origin)return!1}else if(e.startsWith(`*.`)||e.startsWith(`.`)){let t=e.replace(/^\*\./,`.`);if(n.hostname.endsWith(t))return!1}else if(e===n.origin||e===n.hostname||e===n.href)return!1;return!0}async function C(e){let t=Promise.resolve(e);for(let e of this.interceptors.request.values())e&&(t=t.then(e.resolved,e.rejected));return t}async function w(e){let t=Promise.resolve(e);for(let e of this.interceptors.response.values())e&&(t=t.then(e.resolved,e.rejected));return t}async function T(e){let t=new Headers(this.defaults.headers);i.mergeHeaders(t,e.headers);let r=(0,c.default)(!0,{},this.defaults,e);if(!r.url)throw Error(`URL is required.`);if(r.baseURL&&(r.url=new URL(r.url,r.baseURL)),r.url=new URL(r.url),r.params)if(r.paramsSerializer){let e=r.paramsSerializer(r.params);e.startsWith(`?`)&&(e=e.slice(1));let t=r.url.toString().includes(`?`)?`&`:`?`;r.url=r.url+t+e}else{let e=r.url instanceof URL?r.url:new URL(r.url);for(let[t,n]of new URLSearchParams(r.params))e.searchParams.append(t,n);r.url=e}typeof e.maxContentLength==`number`&&(r.size=e.maxContentLength),typeof e.maxRedirects==`number`&&(r.follow=e.maxRedirects);let a=typeof r.data==`string`||r.data instanceof ArrayBuffer||r.data instanceof Blob||globalThis.File&&r.data instanceof File||r.data instanceof FormData||r.data instanceof m.Readable||r.data instanceof ReadableStream||r.data instanceof String||r.data instanceof URLSearchParams||ArrayBuffer.isView(r.data)||[`Blob`,`File`,`FormData`].includes(r.data?.constructor?.name||``);if(r.multipart?.length){let e=await v();t.set(`content-type`,`multipart/related; boundary=${e}`),r.body=m.Readable.from(this.getMultipartRequest(r.multipart,e))}else a?r.body=r.data:typeof r.data==`object`?t.get(`Content-Type`)===`application/x-www-form-urlencoded`?r.body=r.paramsSerializer?r.paramsSerializer(r.data):new URLSearchParams(r.data):(t.has(`content-type`)||t.set(`content-type`,`application/json`),r.body=JSON.stringify(r.data)):r.data&&(r.body=r.data);r.validateStatus=r.validateStatus||this.validateStatus,r.responseType=r.responseType||`unknown`,!t.has(`accept`)&&r.responseType===`json`&&t.set(`accept`,`application/json`);let o=r.proxy||process?.env?.HTTPS_PROXY||process?.env?.https_proxy||process?.env?.HTTP_PROXY||process?.env?.http_proxy;if(!r.agent)if(o&&s(b,this,S).call(this,r.url,r.noProxy)){let e=await s(n,i,D).call(i);this.agentCache.has(o)?r.agent=this.agentCache.get(o):(r.agent=new e(o,{cert:r.cert,key:r.key}),this.agentCache.set(o,r.agent))}else r.cert&&r.key&&(this.agentCache.has(r.key)?r.agent=this.agentCache.get(r.key):(r.agent=new l.Agent({cert:r.cert,key:r.key}),this.agentCache.set(r.key,r.agent)));return typeof r.errorRedactor!=`function`&&r.errorRedactor!==!1&&(r.errorRedactor=d.defaultErrorRedactor),r.body&&!(`duplex`in r)&&(r.duplex=`half`),s(b,this,E).call(this,r),Object.assign(r,{headers:t,url:r.url instanceof URL?r.url:new URL(r.url)})}function E(e){if(e.timeout){let t=AbortSignal.timeout(e.timeout);e.signal&&!e.signal.aborted?e.signal=AbortSignal.any([e.signal,t]):e.signal=t}}async function D(){return s(n,this,k)._||(k._=s(n,this,null)),s(n,this,k)._}async function O(){return s(n,this,A)._||(A._=s(n,this,null)),s(n,this,A)._}var k={_:void 0},A={_:void 0};e.Gaxios=x,i=x})),z=i((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,`__esModule`,{value:!0}),e.instance=e.Gaxios=e.GaxiosError=void 0,e.request=a;var r=oe();Object.defineProperty(e,`Gaxios`,{enumerable:!0,get:function(){return r.Gaxios}});var i=re();Object.defineProperty(e,`GaxiosError`,{enumerable:!0,get:function(){return i.GaxiosError}}),n(ae(),e),e.instance=new r.Gaxios;async function a(t){return e.instance.request(t)}})),se=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.GCE_LINUX_BIOS_PATHS=void 0,e.isGoogleCloudServerless=a,e.isGoogleComputeEngineLinux=o,e.isGoogleComputeEngineMACAddress=s,e.isGoogleComputeEngine=c,e.detectGCPResidency=l;var n=t(`fs`),r=t(`os`);e.GCE_LINUX_BIOS_PATHS={BIOS_DATE:`/sys/class/dmi/id/bios_date`,BIOS_VENDOR:`/sys/class/dmi/id/bios_vendor`};var i=/^42:01/;function a(){return!!(process.env.CLOUD_RUN_JOB||process.env.FUNCTION_NAME||process.env.K_SERVICE)}function o(){if((0,r.platform)()!==`linux`)return!1;try{(0,n.statSync)(e.GCE_LINUX_BIOS_PATHS.BIOS_DATE);let t=(0,n.readFileSync)(e.GCE_LINUX_BIOS_PATHS.BIOS_VENDOR,`utf8`);return/Google/.test(t)}catch{return!1}}function s(){let e=(0,r.networkInterfaces)();for(let t of Object.values(e))if(t){for(let{mac:e}of t)if(i.test(e))return!0}return!1}function c(){return o()||s()}function l(){return a()||c()}})),ce=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Colours=void 0;var t=class e{static isEnabled(e){return e&&e.isTTY&&(typeof e.getColorDepth==`function`?e.getColorDepth()>2:!0)}static refresh(){e.enabled=e.isEnabled(process==null?void 0:process.stderr),this.enabled?(e.reset=`\x1B[0m`,e.bright=`\x1B[1m`,e.dim=`\x1B[2m`,e.red=`\x1B[31m`,e.green=`\x1B[32m`,e.yellow=`\x1B[33m`,e.blue=`\x1B[34m`,e.magenta=`\x1B[35m`,e.cyan=`\x1B[36m`,e.white=`\x1B[37m`,e.grey=`\x1B[90m`):(e.reset=``,e.bright=``,e.dim=``,e.red=``,e.green=``,e.yellow=``,e.blue=``,e.magenta=``,e.cyan=``,e.white=``,e.grey=``)}};e.Colours=t,t.enabled=!1,t.reset=``,t.bright=``,t.dim=``,t.red=``,t.green=``,t.yellow=``,t.blue=``,t.magenta=``,t.cyan=``,t.white=``,t.grey=``,t.refresh()})),le=i((e=>{var n=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),r=e&&e.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,`default`,{enumerable:!0,value:t})}):function(e,t){e.default=t}),i=e&&e.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},e(t)};return function(t){if(t&&t.__esModule)return t;var i={};if(t!=null)for(var a=e(t),o=0;o<a.length;o++)a[o]!==`default`&&n(i,t,a[o]);return r(i,t),i}})();Object.defineProperty(e,`__esModule`,{value:!0}),e.env=e.DebugLogBackendBase=e.placeholder=e.AdhocDebugLogger=e.LogSeverity=void 0,e.getNodeBackend=p,e.getDebugBackend=h,e.getStructuredBackend=_,e.setBackend=b,e.log=x;var a=t(`events`),o=i(t(`process`)),s=i(t(`util`)),c=ce(),l;(function(e){e.DEFAULT=`DEFAULT`,e.DEBUG=`DEBUG`,e.INFO=`INFO`,e.WARNING=`WARNING`,e.ERROR=`ERROR`})(l||(e.LogSeverity=l={}));var u=class extends a.EventEmitter{constructor(e,t){super(),this.namespace=e,this.upstream=t,this.func=Object.assign(this.invoke.bind(this),{instance:this,on:(e,t)=>this.on(e,t)}),this.func.debug=(...e)=>this.invokeSeverity(l.DEBUG,...e),this.func.info=(...e)=>this.invokeSeverity(l.INFO,...e),this.func.warn=(...e)=>this.invokeSeverity(l.WARNING,...e),this.func.error=(...e)=>this.invokeSeverity(l.ERROR,...e),this.func.sublog=e=>x(e,this.func)}invoke(e,...t){if(this.upstream)try{this.upstream(e,...t)}catch{}try{this.emit(`log`,e,t)}catch{}}invokeSeverity(e,...t){this.invoke({severity:e},...t)}};e.AdhocDebugLogger=u,e.placeholder=new u(``,()=>{}).func;var d=class{constructor(){this.cached=new Map,this.filters=[],this.filtersSet=!1;let t=o.env[e.env.nodeEnables]??`*`;t===`all`&&(t=`*`),this.filters=t.split(`,`)}log(e,t,...n){try{this.filtersSet||(this.setFilters(),this.filtersSet=!0);let r=this.cached.get(e);r||(r=this.makeLogger(e),this.cached.set(e,r)),r(t,...n)}catch(e){console.error(e)}}};e.DebugLogBackendBase=d;var f=class extends d{constructor(){super(...arguments),this.enabledRegexp=/.*/g}isEnabled(e){return this.enabledRegexp.test(e)}makeLogger(e){return this.enabledRegexp.test(e)?(t,...n)=>{let r=`${c.Colours.green}${e}${c.Colours.reset}`,i=`${c.Colours.yellow}${o.pid}${c.Colours.reset}`,a;switch(t.severity){case l.ERROR:a=`${c.Colours.red}${t.severity}${c.Colours.reset}`;break;case l.INFO:a=`${c.Colours.magenta}${t.severity}${c.Colours.reset}`;break;case l.WARNING:a=`${c.Colours.yellow}${t.severity}${c.Colours.reset}`;break;default:a=t.severity??l.DEFAULT;break}let u=s.formatWithOptions({colors:c.Colours.enabled},...n),d=Object.assign({},t);delete d.severity;let f=Object.getOwnPropertyNames(d).length?JSON.stringify(d):``,p=f?`${c.Colours.grey}${f}${c.Colours.reset}`:``;console.error(`%s [%s|%s] %s%s`,i,r,a,u,f?` ${p}`:``)}:()=>{}}setFilters(){let e=this.filters.join(`,`).replace(/[|\\{}()[\]^$+?.]/g,`\\$&`).replace(/\*/g,`.*`).replace(/,/g,`$|^`);this.enabledRegexp=RegExp(`^${e}$`,`i`)}};function p(){return new f}var m=class extends d{constructor(e){super(),this.debugPkg=e}makeLogger(e){let t=this.debugPkg(e);return(e,...n)=>{t(n[0],...n.slice(1))}}setFilters(){let e=o.env.NODE_DEBUG??``;o.env.NODE_DEBUG=`${e}${e?`,`:``}${this.filters.join(`,`)}`}};function h(e){return new m(e)}var g=class extends d{constructor(e){super(),this.upstream=e??void 0}makeLogger(e){let t=this.upstream?.makeLogger(e);return(e,...n)=>{let r=e.severity??l.INFO,i=Object.assign({severity:r,message:s.format(...n)},e),a=JSON.stringify(i);t?t(e,a):console.log(`%s`,a)}}setFilters(){var e;(e=this.upstream)==null||e.setFilters()}};function _(e){return new g(e)}e.env={nodeEnables:`GOOGLE_SDK_NODE_LOGGING`};var v=new Map,y=void 0;function b(e){y=e,v.clear()}function x(t,n){if(!y&&!o.env[e.env.nodeEnables]||!t)return e.placeholder;n&&(t=`${n.instance.namespace}:${t}`);let r=v.get(t);if(r)return r.func;if(y===null)return e.placeholder;y===void 0&&(y=p());let i=(()=>{let e;return new u(t,(n,...r)=>{if(e!==y){if(y===null)return;y===void 0&&(y=p()),e=y}y?.log(t,n,...r)})})();return v.set(t,i),i.func}})),ue=i((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,`__esModule`,{value:!0}),n(le(),e)})),B=i((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,`default`,{enumerable:!0,value:t})}):function(e,t){e.default=t}),r=e&&e.__importStar||(function(){var e=function(t){return e=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},e(t)};return function(r){if(r&&r.__esModule)return r;var i={};if(r!=null)for(var a=e(r),o=0;o<a.length;o++)a[o]!==`default`&&t(i,r,a[o]);return n(i,r),i}})(),i=e&&e.__exportStar||function(e,n){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,`__esModule`,{value:!0}),e.gcpResidencyCache=e.METADATA_SERVER_DETECTION=e.HEADERS=e.HEADER_VALUE=e.HEADER_NAME=e.SECONDARY_HOST_ADDRESS=e.HOST_ADDRESS=e.BASE_PATH=void 0,e.instance=m,e.project=h,e.universe=g,e.bulk=_,e.isAvailable=x,e.resetIsAvailableCache=S,e.getGCPResidency=C,e.setGCPResidency=w,e.requestTimeout=T;var a=z(),o=v(),s=se(),c=r(ue());e.BASE_PATH=`/computeMetadata/v1`,e.HOST_ADDRESS=`http://169.254.169.254`,e.SECONDARY_HOST_ADDRESS=`http://metadata.google.internal.`,e.HEADER_NAME=`Metadata-Flavor`,e.HEADER_VALUE=`Google`,e.HEADERS=Object.freeze({[e.HEADER_NAME]:e.HEADER_VALUE});var l=c.log(`gcp-metadata`);e.METADATA_SERVER_DETECTION=Object.freeze({"assume-present":`don't try to ping the metadata server, but assume it's present`,none:`don't try to ping the metadata server, but don't try to use it either`,"bios-only":`treat the result of a BIOS probe as canonical (don't fall back to pinging)`,"ping-only":`skip the BIOS probe, and go straight to pinging`});function u(t){return t||(t=process.env.GCE_METADATA_IP||process.env.GCE_METADATA_HOST||e.HOST_ADDRESS),/^https?:\/\//.test(t)||(t=`http://${t}`),new URL(e.BASE_PATH,t).href}function d(e){Object.keys(e).forEach(e=>{switch(e){case`params`:case`property`:case`headers`:break;case`qs`:throw Error(`'qs' is not a valid configuration option. Please use 'params' instead.`);default:throw Error(`'${e}' is not a valid configuration option.`)}})}async function f(t,n={},r=3,i=!1){let s=new Headers(e.HEADERS),c=``,f={};if(typeof t==`object`){let e=t;new Headers(e.headers).forEach((e,t)=>s.set(t,e)),c=e.metadataKey,f=e.params||f,r=e.noResponseRetries||r,i=e.fastFail||i}else c=t;typeof n==`string`?c+=`/${n}`:(d(n),n.property&&(c+=`/${n.property}`),new Headers(n.headers).forEach((e,t)=>s.set(t,e)),f=n.params||f);let m=i?p:a.request,h={url:`${u()}/${c}`,headers:s,retryConfig:{noResponseRetries:r},params:f,responseType:`text`,timeout:T()};l.info(`instance request %j`,h);let g=await m(h);l.info(`instance metadata is %s`,g.data);let _=g.headers.get(e.HEADER_NAME);if(_!==e.HEADER_VALUE)throw RangeError(`Invalid response from metadata service: incorrect ${e.HEADER_NAME} header. Expected '${e.HEADER_VALUE}', got ${_?`'${_}'`:`no header`}`);if(typeof g.data==`string`)try{return o.parse(g.data)}catch{}return g.data}async function p(t){let n={...t,url:t.url?.toString().replace(u(),u(e.SECONDARY_HOST_ADDRESS))},r=(0,a.request)(t),i=(0,a.request)(n);return Promise.any([r,i])}function m(e){return f(`instance`,e)}function h(e){return f(`project`,e)}function g(e){return f(`universe`,e)}async function _(e){let t={};return await Promise.all(e.map(e=>(async()=>{let n=await f(e),r=e.metadataKey;t[r]=n})())),t}function y(){return process.env.DETECT_GCP_RETRIES?Number(process.env.DETECT_GCP_RETRIES):0}var b;async function x(){if(process.env.METADATA_SERVER_DETECTION){let t=process.env.METADATA_SERVER_DETECTION.trim().toLocaleLowerCase();if(!(t in e.METADATA_SERVER_DETECTION))throw RangeError(`Unknown \`METADATA_SERVER_DETECTION\` env variable. Got \`${t}\`, but it should be \`${Object.keys(e.METADATA_SERVER_DETECTION).join("`, `")}\`, or unset`);switch(t){case`assume-present`:return!0;case`none`:return!1;case`bios-only`:return C();case`ping-only`:}}try{return b===void 0&&(b=f(`instance`,void 0,y(),!(process.env.GCE_METADATA_IP||process.env.GCE_METADATA_HOST))),await b,!0}catch(e){let t=e;if(process.env.DEBUG_AUTH&&console.info(t),t.type===`request-timeout`||t.response&&t.response.status===404)return!1;if(!(t.response&&t.response.status===404)&&(!t.code||![`EHOSTDOWN`,`EHOSTUNREACH`,`ENETUNREACH`,`ENOENT`,`ENOTFOUND`,`ECONNREFUSED`].includes(t.code.toString()))){let e=`UNKNOWN`;t.code&&(e=t.code.toString()),process.emitWarning(`received unexpected error = ${t.message} code = ${e}`,`MetadataLookupWarning`)}return!1}}function S(){b=void 0}e.gcpResidencyCache=null;function C(){return e.gcpResidencyCache===null&&w(),e.gcpResidencyCache}function w(t=null){e.gcpResidencyCache=t===null?(0,s.detectGCPResidency)():t}function T(){return C()?0:3e3}i(se(),e)})),de=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.fromArrayBufferToHex=t;function t(e){return Array.from(new Uint8Array(e)).map(e=>e.toString(16).padStart(2,`0`)).join(``)}})),fe=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.BrowserCrypto=void 0;var t=y(),n=de();e.BrowserCrypto=class e{constructor(){if(typeof window>`u`||window.crypto===void 0||window.crypto.subtle===void 0)throw Error(`SubtleCrypto not found. Make sure it's an https:// website.`)}async sha256DigestBase64(e){let n=new TextEncoder().encode(e),r=await window.crypto.subtle.digest(`SHA-256`,n);return t.fromByteArray(new Uint8Array(r))}randomBytesBase64(e){let n=new Uint8Array(e);return window.crypto.getRandomValues(n),t.fromByteArray(n)}static padBase64(e){for(;e.length%4!=0;)e+=`=`;return e}async verify(n,r,i){let a={name:`RSASSA-PKCS1-v1_5`,hash:{name:`SHA-256`}},o=new TextEncoder().encode(r),s=t.toByteArray(e.padBase64(i)),c=await window.crypto.subtle.importKey(`jwk`,n,a,!0,[`verify`]);return await window.crypto.subtle.verify(a,c,Buffer.from(s),o)}async sign(e,n){let r={name:`RSASSA-PKCS1-v1_5`,hash:{name:`SHA-256`}},i=new TextEncoder().encode(n),a=await window.crypto.subtle.importKey(`jwk`,e,r,!0,[`sign`]),o=await window.crypto.subtle.sign(r,a,i);return t.fromByteArray(new Uint8Array(o))}decodeBase64StringUtf8(n){let r=t.toByteArray(e.padBase64(n));return new TextDecoder().decode(r)}encodeBase64StringUtf8(e){let n=new TextEncoder().encode(e);return t.fromByteArray(n)}async sha256DigestHex(e){let t=new TextEncoder().encode(e),r=await window.crypto.subtle.digest(`SHA-256`,t);return(0,n.fromArrayBufferToHex)(r)}async signWithHmacSha256(e,t){let n=typeof e==`string`?e:String.fromCharCode(...new Uint16Array(e)),r=new TextEncoder,i=await window.crypto.subtle.importKey(`raw`,r.encode(n),{name:`HMAC`,hash:{name:`SHA-256`}},!1,[`sign`]);return window.crypto.subtle.sign(`HMAC`,i,r.encode(t))}}})),pe=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.NodeCrypto=void 0;var n=t(`crypto`);e.NodeCrypto=class{async sha256DigestBase64(e){return n.createHash(`sha256`).update(e).digest(`base64`)}randomBytesBase64(e){return n.randomBytes(e).toString(`base64`)}async verify(e,t,r){let i=n.createVerify(`RSA-SHA256`);return i.update(t),i.end(),i.verify(e,r,`base64`)}async sign(e,t){let r=n.createSign(`RSA-SHA256`);return r.update(t),r.end(),r.sign(e,`base64`)}decodeBase64StringUtf8(e){return Buffer.from(e,`base64`).toString(`utf-8`)}encodeBase64StringUtf8(e){return Buffer.from(e,`utf-8`).toString(`base64`)}async sha256DigestHex(e){return n.createHash(`sha256`).update(e).digest(`hex`)}async signWithHmacSha256(e,t){let a=typeof e==`string`?e:i(e);return r(n.createHmac(`sha256`,a).update(t).digest())}};function r(e){let t=new ArrayBuffer(e.length),n=new Uint8Array(t);for(let t=0;t<e.length;++t)n[t]=e[t];return t}function i(e){return Buffer.from(e)}})),V=i((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,`__esModule`,{value:!0}),e.createCrypto=a,e.hasBrowserCrypto=o;var r=fe(),i=pe();n(de(),e);function a(){return o()?new r.BrowserCrypto:new i.NodeCrypto}function o(){return typeof window<`u`&&window.crypto!==void 0&&window.crypto.subtle!==void 0}})),H=i((e=>{g(),a(),c(),l(),f(),Object.defineProperty(e,`__esModule`,{value:!0}),e.LRUCache=void 0,e.snakeToCamel=_,e.originalOrCamelOptions=v,e.removeUndefinedValuesInObject=w,e.isValidFile=T,e.getWellKnownCertificateConfigFileLocation=E;var n=t(`fs`),r=t(`os`),i=t(`path`),d=`certificate_config.json`,h=`gcloud`;function _(e){return e.replace(/([_][^_])/g,e=>e.slice(1).toUpperCase())}function v(e){function t(t){let n=e||{};return n[t]??n[_(t)]}return{get:t}}var y=new WeakMap,b=new WeakSet,x=class{constructor(e){u(this,b),o(this,`capacity`,void 0),m(this,y,new Map),o(this,`maxAge`,void 0),this.capacity=e.capacity,this.maxAge=e.maxAge}set(e,t){s(b,this,S).call(this,e,t),s(b,this,C).call(this)}get(e){let t=p(y,this).get(e);if(t)return s(b,this,S).call(this,e,t.value),s(b,this,C).call(this),t.value}};function S(e,t){p(y,this).delete(e),p(y,this).set(e,{value:t,lastAccessed:Date.now()})}function C(){let e=this.maxAge?Date.now()-this.maxAge:0,t=p(y,this).entries().next();for(;!t.done&&(p(y,this).size>this.capacity||t.value[1].lastAccessed<e);)p(y,this).delete(t.value[0]),t=p(y,this).entries().next()}e.LRUCache=x;function w(e){return Object.entries(e).forEach(([t,n])=>{(n===void 0||n===`undefined`)&&delete e[t]}),e}async function T(e){try{return(await n.promises.lstat(e)).isFile()}catch{return!1}}function E(){let e=process.env.CLOUDSDK_CONFIG||(D()?i.join(process.env.APPDATA||``,h):i.join(process.env.HOME||``,`.config`,h));return i.join(e,d)}function D(){return r.platform().startsWith(`win`)}})),me=r({author:()=>G,default:()=>Se,dependencies:()=>ge,description:()=>K,devDependencies:()=>_e,engines:()=>q,files:()=>ve,homepage:()=>xe,keywords:()=>he,license:()=>be,main:()=>J,name:()=>U,repository:()=>X,scripts:()=>ye,types:()=>Y,version:()=>W}),U,W,G,K,q,J,Y,X,he,ge,_e,ve,ye,be,xe,Se,Ce=n((()=>{U=`google-auth-library`,W=`10.6.2`,G=`Google Inc.`,K=`Google APIs Authentication Client Library for Node.js`,q={node:`>=18`},J=`./build/src/index.js`,Y=`./build/src/index.d.ts`,X={type:`git`,directory:`packages/google-auth-library-nodejs`,url:`https://github.com/googleapis/google-cloud-node-core.git`},he=[`google`,`api`,`google apis`,`client`,`client library`],ge={"base64-js":`^1.3.0`,"ecdsa-sig-formatter":`^1.0.11`,gaxios:`^7.1.4`,"gcp-metadata":`8.1.2`,"google-logging-utils":`1.1.3`,jws:`^4.0.0`},_e={"@types/base64-js":`^1.2.5`,"@types/jws":`^3.1.0`,"@types/mocha":`^10.0.10`,"@types/mv":`^2.1.0`,"@types/ncp":`^2.0.8`,"@types/node":`^24.0.0`,"@types/sinon":`^21.0.0`,"assert-rejects":`^1.0.0`,c8:`^10.1.3`,codecov:`^3.8.3`,gts:`^6.0.2`,"is-docker":`^3.0.0`,jsdoc:`^4.0.4`,"jsdoc-fresh":`^5.0.0`,"jsdoc-region-tag":`^4.0.0`,karma:`^6.0.0`,"karma-chrome-launcher":`^3.0.0`,"karma-coverage":`^2.0.0`,"karma-firefox-launcher":`^2.0.0`,"karma-mocha":`^2.0.0`,"karma-sourcemap-loader":`^0.4.0`,"karma-webpack":`^5.0.1`,keypair:`^1.0.4`,mocha:`^11.1.0`,mv:`^2.1.1`,ncp:`^2.0.0`,nock:`^14.0.5`,"null-loader":`^4.0.1`,puppeteer:`^24.0.0`,sinon:`^21.0.0`,"ts-loader":`^9.5.2`,typescript:`5.8.3`,webpack:`^5.97.1`,"webpack-cli":`^6.0.1`},ve=[`build/src`,`!build/src/**/*.map`],ye={test:`c8 mocha build/test`,clean:`gts clean`,prepare:`npm run compile`,lint:`gts check --no-inline-config`,compile:`tsc -p .`,fix:`gts fix`,pretest:`npm run compile -- --sourceMap`,docs:`jsdoc -c .jsdoc.js`,"samples-setup":`cd samples/ && npm link ../ && npm run setup && cd ../`,"samples-test":`cd samples/ && npm link ../ && npm test && cd ../`,"system-test":`mocha build/system-test --timeout 60000`,"presystem-test":`npm run compile -- --sourceMap`,webpack:`webpack`,"browser-test":`karma start`,"docs-test":`echo 'disabled until linkinator is fixed'`,"predocs-test":`npm run docs`,prelint:`cd samples; npm link ../; npm install`},be=`Apache-2.0`,xe=`https://github.com/googleapis/google-cloud-node-core/tree/main/packages/google-auth-library-nodejs`,Se={name:U,version:W,author:G,description:K,engines:q,main:J,types:Y,repository:X,keywords:he,dependencies:ge,devDependencies:_e,files:ve,scripts:ye,license:be,homepage:xe}})),we=i((t=>{Object.defineProperty(t,`__esModule`,{value:!0}),t.USER_AGENT=t.PRODUCT_NAME=t.pkg=void 0;var n=(Ce(),e(me).default);t.pkg=n;var r=`google-api-nodejs-client`;t.PRODUCT_NAME=r,t.USER_AGENT=`${r}/${n.version}`})),Z=i((e=>{a();var n;Object.defineProperty(e,`__esModule`,{value:!0}),e.AuthClient=e.DEFAULT_EAGER_REFRESH_THRESHOLD_MILLIS=e.DEFAULT_UNIVERSE=void 0;var r=t(`events`),i=z(),s=H(),c=ue(),l=we();e.DEFAULT_UNIVERSE=`googleapis.com`,e.DEFAULT_EAGER_REFRESH_THRESHOLD_MILLIS=300*1e3;var u=class t extends r.EventEmitter{constructor(n={}){super(),o(this,`apiKey`,void 0),o(this,`projectId`,void 0),o(this,`quotaProjectId`,void 0),o(this,`transporter`,void 0),o(this,`credentials`,{}),o(this,`eagerRefreshThresholdMillis`,e.DEFAULT_EAGER_REFRESH_THRESHOLD_MILLIS),o(this,`forceRefreshOnFailure`,!1),o(this,`universeDomain`,e.DEFAULT_UNIVERSE);let r=(0,s.originalOrCamelOptions)(n);this.apiKey=n.apiKey,this.projectId=r.get(`project_id`)??null,this.quotaProjectId=r.get(`quota_project_id`),this.credentials=r.get(`credentials`)??{},this.universeDomain=r.get(`universe_domain`)??e.DEFAULT_UNIVERSE,this.transporter=n.transporter??new i.Gaxios(n.transporterOptions),r.get(`useAuthRequestParameters`)!==!1&&(this.transporter.interceptors.request.add(t.DEFAULT_REQUEST_INTERCEPTOR),this.transporter.interceptors.response.add(t.DEFAULT_RESPONSE_INTERCEPTOR)),n.eagerRefreshThresholdMillis&&(this.eagerRefreshThresholdMillis=n.eagerRefreshThresholdMillis),this.forceRefreshOnFailure=n.forceRefreshOnFailure??!1}fetch(...e){let t=e[0],n=e[1],r,a=new Headers;return typeof t==`string`?r=new URL(t):t instanceof URL?r=t:t&&t.url&&(r=new URL(t.url)),t&&typeof t==`object`&&`headers`in t&&i.Gaxios.mergeHeaders(a,t.headers),n&&i.Gaxios.mergeHeaders(a,new Headers(n.headers)),typeof t==`object`&&!(t instanceof URL)?this.request({...n,...t,headers:a,url:r}):this.request({...n,headers:a,url:r})}setCredentials(e){this.credentials=e}addSharedMetadataHeaders(e){return!e.has(`x-goog-user-project`)&&this.quotaProjectId&&e.set(`x-goog-user-project`,this.quotaProjectId),e}addUserProjectAndAuthHeaders(e,t){let n=t.get(`x-goog-user-project`),r=t.get(`authorization`);return n&&e.set(`x-goog-user-project`,n),r&&e.set(`authorization`,r),e}static setMethodName(e,n){try{let r=e;r[t.RequestMethodNameSymbol]=n}catch{}}static get RETRY_CONFIG(){return{retry:!0,retryConfig:{httpMethodsToRetry:[`GET`,`PUT`,`POST`,`HEAD`,`OPTIONS`,`DELETE`]}}}};n=u,o(u,`RequestMethodNameSymbol`,Symbol(`request method name`)),o(u,`RequestLogIdSymbol`,Symbol(`request log id`)),o(u,`log`,(0,c.log)(`auth`)),o(u,`DEFAULT_REQUEST_INTERCEPTOR`,{resolved:async e=>{if(!e.headers.has(`x-goog-api-client`)){let t=process.version.replace(/^v/,``);e.headers.set(`x-goog-api-client`,`gl-node/${t}`)}let t=e.headers.get(`User-Agent`);t?t.includes(`${l.PRODUCT_NAME}/`)||e.headers.set(`User-Agent`,`${t} ${l.USER_AGENT}`):e.headers.set(`User-Agent`,l.USER_AGENT);try{let t=e,r=t[n.RequestMethodNameSymbol],i=`${Math.floor(Math.random()*1e3)}`;t[n.RequestLogIdSymbol]=i;let a={url:e.url,headers:e.headers};r?n.log.info(`%s [%s] request %j`,r,i,a):n.log.info(`[%s] request %j`,i,a)}catch{}return e}}),o(u,`DEFAULT_RESPONSE_INTERCEPTOR`,{resolved:async e=>{try{let t=e.config,r=t[n.RequestMethodNameSymbol],i=t[n.RequestLogIdSymbol];r?n.log.info(`%s [%s] response %j`,r,i,e.data):n.log.info(`[%s] response %j`,i,e.data)}catch{}return e},rejected:async e=>{try{let t=e.config,r=t[n.RequestMethodNameSymbol],i=t[n.RequestLogIdSymbol];r?n.log.info(`%s [%s] error %j`,r,i,e.response?.data):n.log.error(`[%s] error %j`,i,e.response?.data)}catch{}throw e}}),e.AuthClient=u})),Te=i((e=>{a(),Object.defineProperty(e,`__esModule`,{value:!0}),e.LoginTicket=void 0,e.LoginTicket=class{constructor(e,t){o(this,`envelope`,void 0),o(this,`payload`,void 0),this.envelope=e,this.payload=t}getEnvelope(){return this.envelope}getPayload(){return this.payload}getUserId(){let e=this.getPayload();return e&&e.sub?e.sub:null}getAttributes(){return{envelope:this.getEnvelope(),payload:this.getPayload()}}}})),Q=i((e=>{a(),Object.defineProperty(e,`__esModule`,{value:!0}),e.OAuth2Client=e.ClientAuthentication=e.CertificateFormat=e.CodeChallengeMethod=void 0;var n=z(),r=t(`querystring`),i=t(`stream`),s=b(),c=H(),l=V(),u=Z(),d=Te(),f;(function(e){e.Plain=`plain`,e.S256=`S256`})(f||(e.CodeChallengeMethod=f={}));var p;(function(e){e.PEM=`PEM`,e.JWK=`JWK`})(p||(e.CertificateFormat=p={}));var m;(function(e){e.ClientSecretPost=`ClientSecretPost`,e.ClientSecretBasic=`ClientSecretBasic`,e.None=`None`})(m||(e.ClientAuthentication=m={}));var h=class e extends u.AuthClient{constructor(e={},t,n){super(typeof e==`object`?e:{}),o(this,`redirectUri`,void 0),o(this,`certificateCache`,{}),o(this,`certificateExpiry`,null),o(this,`certificateCacheFormat`,p.PEM),o(this,`refreshTokenPromises`,new Map),o(this,`endpoints`,void 0),o(this,`issuers`,void 0),o(this,`clientAuthentication`,void 0),o(this,`_clientId`,void 0),o(this,`_clientSecret`,void 0),o(this,`refreshHandler`,void 0),typeof e!=`object`&&(e={clientId:e,clientSecret:t,redirectUri:n}),this._clientId=e.clientId||e.client_id,this._clientSecret=e.clientSecret||e.client_secret,this.redirectUri=e.redirectUri||e.redirect_uris?.[0],this.endpoints={tokenInfoUrl:`https://oauth2.googleapis.com/tokeninfo`,oauth2AuthBaseUrl:`https://accounts.google.com/o/oauth2/v2/auth`,oauth2TokenUrl:`https://oauth2.googleapis.com/token`,oauth2RevokeUrl:`https://oauth2.googleapis.com/revoke`,oauth2FederatedSignonPemCertsUrl:`https://www.googleapis.com/oauth2/v1/certs`,oauth2FederatedSignonJwkCertsUrl:`https://www.googleapis.com/oauth2/v3/certs`,oauth2IapPublicKeyUrl:`https://www.gstatic.com/iap/verify/public_key`,...e.endpoints},this.clientAuthentication=e.clientAuthentication||m.ClientSecretPost,this.issuers=e.issuers||[`accounts.google.com`,`https://accounts.google.com`,this.universeDomain]}generateAuthUrl(e={}){if(e.code_challenge_method&&!e.code_challenge)throw Error(`If a code_challenge_method is provided, code_challenge must be included.`);return e.response_type=e.response_type||`code`,e.client_id=e.client_id||this._clientId,e.redirect_uri=e.redirect_uri||this.redirectUri,Array.isArray(e.scope)&&(e.scope=e.scope.join(` `)),this.endpoints.oauth2AuthBaseUrl.toString()+`?`+r.stringify(e)}generateCodeVerifier(){throw Error(`generateCodeVerifier is removed, please use generateCodeVerifierAsync instead.`)}async generateCodeVerifierAsync(){let e=(0,l.createCrypto)(),t=e.randomBytesBase64(96).replace(/\+/g,`~`).replace(/=/g,`_`).replace(/\//g,`-`);return{codeVerifier:t,codeChallenge:(await e.sha256DigestBase64(t)).split(`=`)[0].replace(/\+/g,`-`).replace(/\//g,`_`)}}getToken(e,t){let n=typeof e==`string`?{code:e}:e;if(t)this.getTokenAsync(n).then(e=>t(null,e.tokens,e.res),e=>t(e,null,e.response));else return this.getTokenAsync(n)}async getTokenAsync(t){let n=this.endpoints.oauth2TokenUrl.toString(),r=new Headers,i={client_id:t.client_id||this._clientId,code_verifier:t.codeVerifier,code:t.code,grant_type:`authorization_code`,redirect_uri:t.redirect_uri||this.redirectUri};if(this.clientAuthentication===m.ClientSecretBasic){let e=Buffer.from(`${this._clientId}:${this._clientSecret}`);r.set(`authorization`,`Basic ${e.toString(`base64`)}`)}this.clientAuthentication===m.ClientSecretPost&&(i.client_secret=this._clientSecret);let a={...e.RETRY_CONFIG,method:`POST`,url:n,data:new URLSearchParams((0,c.removeUndefinedValuesInObject)(i)),headers:r};u.AuthClient.setMethodName(a,`getTokenAsync`);let o=await this.transporter.request(a),s=o.data;return o.data&&o.data.expires_in&&(s.expiry_date=new Date().getTime()+o.data.expires_in*1e3,delete s.expires_in),this.emit(`tokens`,s),{tokens:s,res:o}}async refreshToken(e){if(!e)return this.refreshTokenNoCache(e);if(this.refreshTokenPromises.has(e))return this.refreshTokenPromises.get(e);let t=this.refreshTokenNoCache(e).then(t=>(this.refreshTokenPromises.delete(e),t),t=>{throw this.refreshTokenPromises.delete(e),t});return this.refreshTokenPromises.set(e,t),t}async refreshTokenNoCache(t){if(!t)throw Error(`No refresh token is set.`);let r=this.endpoints.oauth2TokenUrl.toString(),i={refresh_token:t,client_id:this._clientId,client_secret:this._clientSecret,grant_type:`refresh_token`},a;try{let t={...e.RETRY_CONFIG,method:`POST`,url:r,data:new URLSearchParams((0,c.removeUndefinedValuesInObject)(i))};u.AuthClient.setMethodName(t,`refreshTokenNoCache`),a=await this.transporter.request(t)}catch(e){throw e instanceof n.GaxiosError&&e.message===`invalid_grant`&&e.response?.data&&/ReAuth/i.test(e.response.data.error_description)&&(e.message=JSON.stringify(e.response.data)),e}let o=a.data;return a.data&&a.data.expires_in&&(o.expiry_date=new Date().getTime()+a.data.expires_in*1e3,delete o.expires_in),this.emit(`tokens`,o),{tokens:o,res:a}}refreshAccessToken(e){if(e)this.refreshAccessTokenAsync().then(t=>e(null,t.credentials,t.res),e);else return this.refreshAccessTokenAsync()}async refreshAccessTokenAsync(){let e=await this.refreshToken(this.credentials.refresh_token),t=e.tokens;return t.refresh_token=this.credentials.refresh_token,this.credentials=t,{credentials:this.credentials,res:e.res}}getAccessToken(e){if(e)this.getAccessTokenAsync().then(t=>e(null,t.token,t.res),e);else return this.getAccessTokenAsync()}async getAccessTokenAsync(){if(!this.credentials.access_token||this.isTokenExpiring()){if(!this.credentials.refresh_token)if(this.refreshHandler){let e=await this.processAndValidateRefreshHandler();if(e?.access_token)return this.setCredentials(e),{token:this.credentials.access_token}}else throw Error(`No refresh token or refresh handler callback is set.`);let e=await this.refreshAccessTokenAsync();if(!e.credentials||e.credentials&&!e.credentials.access_token)throw Error(`Could not refresh access token.`);return{token:e.credentials.access_token,res:e.res}}else return{token:this.credentials.access_token}}async getRequestHeaders(e){return(await this.getRequestMetadataAsync(e)).headers}async getRequestMetadataAsync(e){let t=this.credentials;if(!t.access_token&&!t.refresh_token&&!this.apiKey&&!this.refreshHandler)throw Error(`No access, refresh token, API key or refresh handler callback is set.`);if(t.access_token&&!this.isTokenExpiring()){t.token_type=t.token_type||`Bearer`;let e=new Headers({authorization:t.token_type+` `+t.access_token});return{headers:this.addSharedMetadataHeaders(e)}}if(this.refreshHandler){let e=await this.processAndValidateRefreshHandler();if(e?.access_token){this.setCredentials(e);let t=new Headers({authorization:`Bearer `+this.credentials.access_token});return{headers:this.addSharedMetadataHeaders(t)}}}if(this.apiKey)return{headers:new Headers({"X-Goog-Api-Key":this.apiKey})};let n=null,r=null;try{n=await this.refreshToken(t.refresh_token),r=n.tokens}catch(e){let t=e;throw t.response&&(t.response.status===403||t.response.status===404)&&(t.message=`Could not refresh access token: ${t.message}`),t}let i=this.credentials;i.token_type=i.token_type||`Bearer`,r.refresh_token=i.refresh_token,this.credentials=r;let a=new Headers({authorization:i.token_type+` `+r.access_token});return{headers:this.addSharedMetadataHeaders(a),res:n.res}}static getRevokeTokenUrl(t){return new e().getRevokeTokenURL(t).toString()}getRevokeTokenURL(e){let t=new URL(this.endpoints.oauth2RevokeUrl);return t.searchParams.append(`token`,e),t}revokeToken(t,n){let r={...e.RETRY_CONFIG,url:this.getRevokeTokenURL(t).toString(),method:`POST`};if(u.AuthClient.setMethodName(r,`revokeToken`),n)this.transporter.request(r).then(e=>n(null,e),n);else return this.transporter.request(r)}revokeCredentials(e){if(e)this.revokeCredentialsAsync().then(t=>e(null,t),e);else return this.revokeCredentialsAsync()}async revokeCredentialsAsync(){let e=this.credentials.access_token;if(this.credentials={},e)return this.revokeToken(e);throw Error(`No access token to revoke.`)}request(e,t){if(t)this.requestAsync(e).then(e=>t(null,e),e=>t(e,e.response));else return this.requestAsync(e)}async requestAsync(e,t=!1){try{let t=await this.getRequestMetadataAsync();return e.headers=n.Gaxios.mergeHeaders(e.headers),this.addUserProjectAndAuthHeaders(e.headers,t.headers),this.apiKey&&e.headers.set(`X-Goog-Api-Key`,this.apiKey),await this.transporter.request(e)}catch(n){let r=n.response;if(r){let n=r.status,a=this.credentials&&this.credentials.access_token&&this.credentials.refresh_token&&(!this.credentials.expiry_date||this.forceRefreshOnFailure),o=this.credentials&&this.credentials.access_token&&!this.credentials.refresh_token&&(!this.credentials.expiry_date||this.forceRefreshOnFailure)&&this.refreshHandler,s=r.config.data instanceof i.Readable,c=n===401||n===403;if(!t&&c&&!s&&a)return await this.refreshAccessTokenAsync(),this.requestAsync(e,!0);if(!t&&c&&!s&&o){let t=await this.processAndValidateRefreshHandler();return t?.access_token&&this.setCredentials(t),this.requestAsync(e,!0)}}throw n}}verifyIdToken(e,t){if(t&&typeof t!=`function`)throw Error(`This method accepts an options object as the first parameter, which includes the idToken, audience, and maxExpiry.`);if(t)this.verifyIdTokenAsync(e).then(e=>t(null,e),t);else return this.verifyIdTokenAsync(e)}async verifyIdTokenAsync(e){if(!e.idToken)throw Error(`The verifyIdToken method requires an ID Token`);let t=await this.getFederatedSignonCertsAsync();return await this.verifySignedJwtWithCertsAsync(e.idToken,t.certs,e.audience,this.issuers,e.maxExpiry)}async getTokenInfo(t){let{data:n}=await this.transporter.request({...e.RETRY_CONFIG,method:`POST`,headers:{"content-type":`application/x-www-form-urlencoded;charset=UTF-8`,authorization:`Bearer ${t}`},url:this.endpoints.tokenInfoUrl.toString()}),r=Object.assign({expiry_date:new Date().getTime()+n.expires_in*1e3,scopes:n.scope.split(` `)},n);return delete r.expires_in,delete r.scope,r}getFederatedSignonCerts(e){if(e)this.getFederatedSignonCertsAsync().then(t=>e(null,t.certs,t.res),e);else return this.getFederatedSignonCertsAsync()}async getFederatedSignonCertsAsync(){let t=new Date().getTime(),n=(0,l.hasBrowserCrypto)()?p.JWK:p.PEM;if(this.certificateExpiry&&t<this.certificateExpiry.getTime()&&this.certificateCacheFormat===n)return{certs:this.certificateCache,format:n};let r,i;switch(n){case p.PEM:i=this.endpoints.oauth2FederatedSignonPemCertsUrl.toString();break;case p.JWK:i=this.endpoints.oauth2FederatedSignonJwkCertsUrl.toString();break;default:throw Error(`Unsupported certificate format ${n}`)}try{let t={...e.RETRY_CONFIG,url:i};u.AuthClient.setMethodName(t,`getFederatedSignonCertsAsync`),r=await this.transporter.request(t)}catch(e){throw e instanceof Error&&(e.message=`Failed to retrieve verification certificates: ${e.message}`),e}let a=r?.headers.get(`cache-control`),o=-1;if(a){let e=/max-age=(?<maxAge>[0-9]+)/.exec(a)?.groups?.maxAge;e&&(o=Number(e)*1e3)}let s={};switch(n){case p.PEM:s=r.data;break;case p.JWK:for(let e of r.data.keys)s[e.kid]=e;break;default:throw Error(`Unsupported certificate format ${n}`)}return this.certificateExpiry=o===-1?null:new Date(new Date().getTime()+o),this.certificateCache=s,this.certificateCacheFormat=n,{certs:s,format:n,res:r}}getIapPublicKeys(e){if(e)this.getIapPublicKeysAsync().then(t=>e(null,t.pubkeys,t.res),e);else return this.getIapPublicKeysAsync()}async getIapPublicKeysAsync(){let t,n=this.endpoints.oauth2IapPublicKeyUrl.toString();try{let r={...e.RETRY_CONFIG,url:n};u.AuthClient.setMethodName(r,`getIapPublicKeysAsync`),t=await this.transporter.request(r)}catch(e){throw e instanceof Error&&(e.message=`Failed to retrieve verification certificates: ${e.message}`),e}return{pubkeys:t.data,res:t}}verifySignedJwtWithCerts(){throw Error(`verifySignedJwtWithCerts is removed, please use verifySignedJwtWithCertsAsync instead.`)}async verifySignedJwtWithCertsAsync(t,n,r,i,a){let o=(0,l.createCrypto)();a||(a=e.DEFAULT_MAX_TOKEN_LIFETIME_SECS_);let c=t.split(`.`);if(c.length!==3)throw Error(`Wrong number of segments in token: `+t);let u=c[0]+`.`+c[1],f=c[2],p,m;try{p=JSON.parse(o.decodeBase64StringUtf8(c[0]))}catch(e){throw e instanceof Error&&(e.message=`Can't parse token envelope: ${c[0]}': ${e.message}`),e}if(!p)throw Error(`Can't parse token envelope: `+c[0]);try{m=JSON.parse(o.decodeBase64StringUtf8(c[1]))}catch(e){throw e instanceof Error&&(e.message=`Can't parse token payload '${c[0]}`),e}if(!m)throw Error(`Can't parse token payload: `+c[1]);if(!Object.prototype.hasOwnProperty.call(n,p.kid))throw Error(`No pem found for envelope: `+JSON.stringify(p));let h=n[p.kid];if(p.alg===`ES256`&&(f=s.joseToDer(f,`ES256`).toString(`base64`)),!await o.verify(h,u,f))throw Error(`Invalid token signature: `+t);if(!m.iat)throw Error(`No issue time in token: `+JSON.stringify(m));if(!m.exp)throw Error(`No expiration time in token: `+JSON.stringify(m));let g=Number(m.iat);if(isNaN(g))throw Error(`iat field using invalid format`);let _=Number(m.exp);if(isNaN(_))throw Error(`exp field using invalid format`);let v=new Date().getTime()/1e3;if(_>=v+a)throw Error(`Expiration time too far in future: `+JSON.stringify(m));let y=g-e.CLOCK_SKEW_SECS_,b=_+e.CLOCK_SKEW_SECS_;if(v<y)throw Error(`Token used too early, `+v+` < `+y+`: `+JSON.stringify(m));if(v>b)throw Error(`Token used too late, `+v+` > `+b+`: `+JSON.stringify(m));if(i&&i.indexOf(m.iss)<0)throw Error(`Invalid issuer, expected one of [`+i+`], but got `+m.iss);if(r!=null){let e=m.aud,t=!1;if(t=r.constructor===Array?r.indexOf(e)>-1:e===r,!t)throw Error(`Wrong recipient, payload audience != requiredAudience`)}return new d.LoginTicket(p,m)}async processAndValidateRefreshHandler(){if(this.refreshHandler){let e=await this.refreshHandler();if(!e.access_token)throw Error(`No access token is returned by the refreshHandler callback.`);return e}}isTokenExpiring(){let e=this.credentials.expiry_date;return e?e<=new Date().getTime()+this.eagerRefreshThresholdMillis:!1}};o(h,`GOOGLE_TOKEN_INFO_URL`,`https://oauth2.googleapis.com/tokeninfo`),o(h,`CLOCK_SKEW_SECS_`,300),o(h,`DEFAULT_MAX_TOKEN_LIFETIME_SECS_`,86400),e.OAuth2Client=h})),Ee=i((e=>{a(),Object.defineProperty(e,`__esModule`,{value:!0}),e.Compute=void 0;var t=z(),n=B(),r=Q();e.Compute=class extends r.OAuth2Client{constructor(e={}){super(e),o(this,`serviceAccountEmail`,void 0),o(this,`scopes`,void 0),this.credentials={expiry_date:1,refresh_token:`compute-placeholder`},this.serviceAccountEmail=e.serviceAccountEmail||`default`,this.scopes=Array.isArray(e.scopes)?e.scopes:e.scopes?[e.scopes]:[]}async refreshTokenNoCache(){let e=`service-accounts/${this.serviceAccountEmail}/token`,r;try{let t={property:e};this.scopes.length>0&&(t.params={scopes:this.scopes.join(`,`)}),r=await n.instance(t)}catch(e){throw e instanceof t.GaxiosError&&(e.message=`Could not refresh access token: ${e.message}`,this.wrapError(e)),e}let i=r;return r&&r.expires_in&&(i.expiry_date=new Date().getTime()+r.expires_in*1e3,delete i.expires_in),this.emit(`tokens`,i),{tokens:i,res:null}}async fetchIdToken(e){let t=`service-accounts/${this.serviceAccountEmail}/identity?format=full&audience=${e}`,r;try{let e={property:t};r=await n.instance(e)}catch(e){throw e instanceof Error&&(e.message=`Could not fetch ID token: ${e.message}`),e}return r}wrapError(e){let t=e.response;t&&t.status&&(e.status=t.status,t.status===403?e.message=`A Forbidden error was returned while attempting to retrieve an access token for the Compute Engine built-in service account. This may be because the Compute Engine instance does not have the correct permission scopes specified: `+e.message:t.status===404&&(e.message=`A Not Found error was returned while attempting to retrieve an accesstoken for the Compute Engine built-in service account. This may be because the Compute Engine instance does not have any permission scopes specified: `+e.message))}}})),De=i((e=>{a(),Object.defineProperty(e,`__esModule`,{value:!0}),e.IdTokenClient=void 0;var t=Q();e.IdTokenClient=class extends t.OAuth2Client{constructor(e){super(e),o(this,`targetAudience`,void 0),o(this,`idTokenProvider`,void 0),this.targetAudience=e.targetAudience,this.idTokenProvider=e.idTokenProvider}async getRequestMetadataAsync(){if(!this.credentials.id_token||!this.credentials.expiry_date||this.isTokenExpiring()){let e=await this.idTokenProvider.fetchIdToken(this.targetAudience);this.credentials={id_token:e,expiry_date:this.getIdTokenExpiryDate(e)}}return{headers:new Headers({authorization:`Bearer `+this.credentials.id_token})}}getIdTokenExpiryDate(e){let t=e.split(`.`)[1];if(t)return JSON.parse(Buffer.from(t,`base64`).toString(`ascii`)).exp*1e3}}})),Oe=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.GCPEnv=void 0,e.clear=i,e.getEnv=a;var t=B(),n;(function(e){e.APP_ENGINE=`APP_ENGINE`,e.KUBERNETES_ENGINE=`KUBERNETES_ENGINE`,e.CLOUD_FUNCTIONS=`CLOUD_FUNCTIONS`,e.COMPUTE_ENGINE=`COMPUTE_ENGINE`,e.CLOUD_RUN=`CLOUD_RUN`,e.CLOUD_RUN_JOBS=`CLOUD_RUN_JOBS`,e.NONE=`NONE`})(n||(e.GCPEnv=n={}));var r;function i(){r=void 0}async function a(){return r||(r=o(),r)}async function o(){let e=n.NONE;return e=s()?n.APP_ENGINE:c()?n.CLOUD_FUNCTIONS:await f()?await d()?n.KUBERNETES_ENGINE:l()?n.CLOUD_RUN:u()?n.CLOUD_RUN_JOBS:n.COMPUTE_ENGINE:n.NONE,e}function s(){return!!(process.env.GAE_SERVICE||process.env.GAE_MODULE_NAME)}function c(){return!!(process.env.FUNCTION_NAME||process.env.FUNCTION_TARGET)}function l(){return!!process.env.K_CONFIGURATION}function u(){return!!process.env.CLOUD_RUN_JOB}async function d(){try{return await t.instance(`attributes/cluster-name`),!0}catch{return!1}}async function f(){return t.isAvailable()}})),ke=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.buildPayloadForJwsSign=i,e.getJwsSign=a;var t=x(),n=`RS256`,r=`https://oauth2.googleapis.com/token`;function i(e){let t=Math.floor(new Date().getTime()/1e3);return{iss:e.iss,scope:e.scope,aud:r,exp:t+3600,iat:t,sub:e.sub,...e.additionalClaims}}function a(e){let r=i(e);return(0,t.sign)({header:{alg:n},payload:r,secret:e.key})}})),Ae=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.getToken=a;var t=ke(),n=`https://oauth2.googleapis.com/token`,r=`urn:ietf:params:oauth:grant-type:jwt-bearer`,i=e=>({method:`POST`,url:n,data:new URLSearchParams({grant_type:r,assertion:(0,t.getJwsSign)(e)}),responseType:`json`,retryConfig:{httpMethodsToRetry:[`POST`]}});async function a(e){if(!e.transporter)throw Error(`No transporter set.`);try{let t=i(e);return(await e.transporter.request(t)).data}catch(e){let t=e,n=t.response?.data;throw n?.error&&(t.message=`${n.error}: ${n.error_description}`),t}}})),je=i((e=>{a(),Object.defineProperty(e,`__esModule`,{value:!0}),e.ErrorWithCode=void 0,e.ErrorWithCode=class extends Error{constructor(e,t){super(e),o(this,`code`,void 0),this.code=t}}})),Me=i((e=>{a(),Object.defineProperty(e,`__esModule`,{value:!0}),e.getCredentials=m;var n=t(`path`),r=t(`fs`),i=t(`util`),s=je(),c=r.readFile?(0,i.promisify)(r.readFile):async()=>{throw new s.ErrorWithCode(`use key rather than keyFile.`,`MISSING_CREDENTIALS`)},l;(function(e){e.JSON=`.json`,e.DER=`.der`,e.CRT=`.crt`,e.PEM=`.pem`,e.P12=`.p12`,e.PFX=`.pfx`})(l||(l={}));var u=class{constructor(e){o(this,`keyFilePath`,void 0),this.keyFilePath=e}async getCredentials(){let e=await c(this.keyFilePath,`utf8`),t;try{t=JSON.parse(e)}catch(e){throw Error(`Invalid JSON key file: ${e.message}`)}let n=t.private_key,r=t.client_email;if(!n||!r)throw new s.ErrorWithCode(`private_key and client_email are required.`,`MISSING_CREDENTIALS`);return{privateKey:n,clientEmail:r}}},d=class{constructor(e){o(this,`keyFilePath`,void 0),this.keyFilePath=e}async getCredentials(){return{privateKey:await c(this.keyFilePath,`utf8`)}}},f=class{async getCredentials(){throw new s.ErrorWithCode(`*.p12 certificates are not supported after v6.1.2. Consider utilizing *.json format or converting *.p12 to *.pem using the OpenSSL CLI.`,`UNKNOWN_CERTIFICATE_TYPE`)}},p=class{static create(e){switch(n.extname(e)){case l.JSON:return new u(e);case l.DER:case l.CRT:case l.PEM:return new d(e);case l.P12:case l.PFX:return new f;default:throw new s.ErrorWithCode(`Unknown certificate type. Type is determined based on file extension. Current supported extensions are *.json, and *.pem.`,`UNKNOWN_CERTIFICATE_TYPE`)}}};async function m(e){return p.create(e).getCredentials()}})),Ne=i((e=>{a(),Object.defineProperty(e,`__esModule`,{value:!0}),e.TokenHandler=void 0;var t=Ae(),n=Me();e.TokenHandler=class{constructor(e){o(this,`token`,void 0),o(this,`tokenExpiresAt`,void 0),o(this,`inFlightRequest`,void 0),o(this,`tokenOptions`,void 0),this.tokenOptions=e}async processCredentials(){if(!this.tokenOptions.key&&!this.tokenOptions.keyFile)throw Error(`No key or keyFile set.`);if(!this.tokenOptions.key&&this.tokenOptions.keyFile){let e=await(0,n.getCredentials)(this.tokenOptions.keyFile);this.tokenOptions.key=e.privateKey,this.tokenOptions.email=e.clientEmail}}isTokenExpiring(){if(!this.token||!this.tokenExpiresAt)return!0;let e=new Date().getTime(),t=this.tokenOptions.eagerRefreshThresholdMillis??0;return this.tokenExpiresAt<=e+t}hasExpired(){return new Date().getTime(),this.token&&this.tokenExpiresAt?new Date().getTime()>=this.tokenExpiresAt:!0}async getToken(e){if(await this.processCredentials(),this.inFlightRequest&&!e)return this.inFlightRequest;if(this.token&&!this.isTokenExpiring()&&!e)return this.token;try{this.inFlightRequest=(0,t.getToken)(this.tokenOptions);let e=await this.inFlightRequest;return this.token=e,this.tokenExpiresAt=new Date().getTime()+(e.expires_in??0)*1e3,e}finally{this.inFlightRequest=void 0}}}})),Pe=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.revokeToken=r;var t=`https://oauth2.googleapis.com/revoke?token=`,n=!0;async function r(e,r){let i=t+e;return await r.request({url:i,retry:n})}})),Fe=i((e=>{a(),Object.defineProperty(e,`__esModule`,{value:!0}),e.GoogleToken=void 0;var t=z(),n=Ne(),r=Pe();e.GoogleToken=class{constructor(e){o(this,`tokenOptions`,void 0),o(this,`tokenHandler`,void 0),this.tokenOptions=e||{},this.tokenOptions.transporter=this.tokenOptions.transporter||{request:e=>(0,t.request)(e)},this.tokenOptions.iss||(this.tokenOptions.iss=this.tokenOptions.email),typeof this.tokenOptions.scope==`object`&&(this.tokenOptions.scope=this.tokenOptions.scope.join(` `)),this.tokenHandler=new n.TokenHandler(this.tokenOptions)}get expiresAt(){return this.tokenHandler.tokenExpiresAt}get accessToken(){return this.tokenHandler.token?.access_token}get idToken(){return this.tokenHandler.token?.id_token}get tokenType(){return this.tokenHandler.token?.token_type}get refreshToken(){return this.tokenHandler.token?.refresh_token}hasExpired(){return this.tokenHandler.hasExpired()}isTokenExpiring(){return this.tokenHandler.isTokenExpiring()}getToken(e,t={forceRefresh:!1}){let n;typeof e==`function`?n=e:typeof e==`object`&&(t=e);let r=this.tokenHandler.getToken(t.forceRefresh??!1);return n&&r.then(e=>n(null,e),n),r}revokeToken(e){if(!this.accessToken)return Promise.reject(Error(`No token to revoke.`));let t=(0,r.revokeToken)(this.accessToken,this.tokenOptions.transporter);e&&t.then(()=>e(),e),this.tokenHandler=new n.TokenHandler(this.tokenOptions)}get googleTokenOptions(){return this.tokenOptions}}})),Ie=i((e=>{a(),Object.defineProperty(e,`__esModule`,{value:!0}),e.JWTAccess=void 0;var t=x(),n=H(),r={alg:`RS256`,typ:`JWT`};e.JWTAccess=class e{constructor(e,t,r,i){o(this,`email`,void 0),o(this,`key`,void 0),o(this,`keyId`,void 0),o(this,`projectId`,void 0),o(this,`eagerRefreshThresholdMillis`,void 0),o(this,`cache`,new n.LRUCache({capacity:500,maxAge:3600*1e3})),this.email=e,this.key=t,this.keyId=r,this.eagerRefreshThresholdMillis=i??300*1e3}getCachedKey(e,t){let n=e;if(t&&Array.isArray(t)&&t.length?n=e?`${e}_${t.join(`_`)}`:`${t.join(`_`)}`:typeof t==`string`&&(n=e?`${e}_${t}`:t),!n)throw Error(`Scopes or url must be provided`);return n}getRequestHeaders(n,i,a){let o=this.getCachedKey(n,a),s=this.cache.get(o),c=Date.now();if(s&&s.expiration-c>this.eagerRefreshThresholdMillis)return new Headers(s.headers);let l=Math.floor(Date.now()/1e3),u=e.getExpirationTime(l),d;if(Array.isArray(a)&&(a=a.join(` `)),d=a?{iss:this.email,sub:this.email,scope:a,exp:u,iat:l}:{iss:this.email,sub:this.email,aud:n,exp:u,iat:l},i){for(let e in d)if(i[e])throw Error(`The '${e}' property is not allowed when passing additionalClaims. This claim is included in the JWT by default.`)}let f=this.keyId?{...r,kid:this.keyId}:r,p=Object.assign(d,i),m=t.sign({header:f,payload:p,secret:this.key}),h=new Headers({authorization:`Bearer ${m}`});return this.cache.set(o,{expiration:u*1e3,headers:h}),h}static getExpirationTime(e){return e+3600}fromJSON(e){if(!e)throw Error(`Must pass in a JSON object containing the service account auth settings.`);if(!e.client_email)throw Error(`The incoming JSON object does not contain a client_email field`);if(!e.private_key)throw Error(`The incoming JSON object does not contain a private_key field`);this.email=e.client_email,this.key=e.private_key,this.keyId=e.private_key_id,this.projectId=e.project_id}fromStream(e,t){if(t)this.fromStreamAsync(e).then(()=>t(),t);else return this.fromStreamAsync(e)}fromStreamAsync(e){return new Promise((t,n)=>{e||n(Error(`Must pass in a stream containing the service account auth settings.`));let r=``;e.setEncoding(`utf8`).on(`data`,e=>r+=e).on(`error`,n).on(`end`,()=>{try{let e=JSON.parse(r);this.fromJSON(e),t()}catch(e){n(e)}})})}}})),Le=i((e=>{a(),Object.defineProperty(e,`__esModule`,{value:!0}),e.JWT=void 0;var t=Fe(),n=Me(),r=Ie(),i=Q(),s=Z();e.JWT=class e extends i.OAuth2Client{constructor(e={}){super(e),o(this,`email`,void 0),o(this,`keyFile`,void 0),o(this,`key`,void 0),o(this,`keyId`,void 0),o(this,`defaultScopes`,void 0),o(this,`scopes`,void 0),o(this,`scope`,void 0),o(this,`subject`,void 0),o(this,`gtoken`,void 0),o(this,`additionalClaims`,void 0),o(this,`useJWTAccessWithScope`,void 0),o(this,`defaultServicePath`,void 0),o(this,`access`,void 0),this.email=e.email,this.keyFile=e.keyFile,this.key=e.key,this.keyId=e.keyId,this.scopes=e.scopes,this.subject=e.subject,this.additionalClaims=e.additionalClaims,this.credentials={refresh_token:`jwt-placeholder`,expiry_date:1}}createScoped(t){let n=new e(this);return n.scopes=t,n}async getRequestMetadataAsync(e){e=this.defaultServicePath?`https://${this.defaultServicePath}/`:e;let t=!this.hasUserScopes()&&e||this.useJWTAccessWithScope&&this.hasAnyScopes()||this.universeDomain!==s.DEFAULT_UNIVERSE;if(this.subject&&this.universeDomain!==s.DEFAULT_UNIVERSE)throw RangeError(`Service Account user is configured for the credential. Domain-wide delegation is not supported in universes other than ${s.DEFAULT_UNIVERSE}`);if(!this.apiKey&&t)if(this.additionalClaims&&this.additionalClaims.target_audience){let{tokens:e}=await this.refreshToken();return{headers:this.addSharedMetadataHeaders(new Headers({authorization:`Bearer ${e.id_token}`}))}}else{this.access||(this.access=new r.JWTAccess(this.email,this.key,this.keyId,this.eagerRefreshThresholdMillis));let t;this.hasUserScopes()?t=this.scopes:e||(t=this.defaultScopes);let n=this.useJWTAccessWithScope||this.universeDomain!==s.DEFAULT_UNIVERSE,i=await this.access.getRequestHeaders(e??void 0,this.additionalClaims,n?t:void 0);return{headers:this.addSharedMetadataHeaders(i)}}else if(this.hasAnyScopes()||this.apiKey)return super.getRequestMetadataAsync(e);else return{headers:new Headers}}async fetchIdToken(e){let n=new t.GoogleToken({iss:this.email,sub:this.subject,scope:this.scopes||this.defaultScopes,keyFile:this.keyFile,key:this.key,additionalClaims:{target_audience:e},transporter:this.transporter});if(await n.getToken({forceRefresh:!0}),!n.idToken)throw Error(`Unknown error: Failed to fetch ID token`);return n.idToken}hasUserScopes(){return this.scopes?this.scopes.length>0:!1}hasAnyScopes(){return!!(this.scopes&&this.scopes.length>0||this.defaultScopes&&this.defaultScopes.length>0)}authorize(e){if(e)this.authorizeAsync().then(t=>e(null,t),e);else return this.authorizeAsync()}async authorizeAsync(){let e=await this.refreshToken();if(!e)throw Error(`No result returned`);return this.credentials=e.tokens,this.credentials.refresh_token=`jwt-placeholder`,this.key=this.gtoken.googleTokenOptions?.key,this.email=this.gtoken.googleTokenOptions?.iss,e.tokens}async refreshTokenNoCache(){let e=this.createGToken(),t={access_token:(await e.getToken({forceRefresh:this.isTokenExpiring()})).access_token,token_type:`Bearer`,expiry_date:e.expiresAt,id_token:e.idToken};return this.emit(`tokens`,t),{res:null,tokens:t}}createGToken(){return this.gtoken||(this.gtoken=new t.GoogleToken({iss:this.email,sub:this.subject,scope:this.scopes||this.defaultScopes,keyFile:this.keyFile,key:this.key,additionalClaims:this.additionalClaims,transporter:this.transporter})),this.gtoken}fromJSON(e){if(!e)throw Error(`Must pass in a JSON object containing the service account auth settings.`);if(!e.client_email)throw Error(`The incoming JSON object does not contain a client_email field`);if(!e.private_key)throw Error(`The incoming JSON object does not contain a private_key field`);this.email=e.client_email,this.key=e.private_key,this.keyId=e.private_key_id,this.projectId=e.project_id,this.quotaProjectId=e.quota_project_id,this.universeDomain=e.universe_domain||this.universeDomain}fromStream(e,t){if(t)this.fromStreamAsync(e).then(()=>t(),t);else return this.fromStreamAsync(e)}fromStreamAsync(e){return new Promise((t,n)=>{if(!e)throw Error(`Must pass in a stream containing the service account auth settings.`);let r=``;e.setEncoding(`utf8`).on(`error`,n).on(`data`,e=>r+=e).on(`end`,()=>{try{let e=JSON.parse(r);this.fromJSON(e),t()}catch(e){n(e)}})})}fromAPIKey(e){if(typeof e!=`string`)throw Error(`Must provide an API Key string.`);this.apiKey=e}async getCredentials(){if(this.key)return{private_key:this.key,client_email:this.email};if(this.keyFile){this.createGToken();let e=await(0,n.getCredentials)(this.keyFile);return{private_key:e.privateKey,client_email:e.clientEmail}}throw Error(`A key or a keyFile must be provided to getCredentials.`)}}})),Re=i((e=>{a(),Object.defineProperty(e,`__esModule`,{value:!0}),e.UserRefreshClient=e.USER_REFRESH_ACCOUNT_TYPE=void 0;var t=Q(),n=Z();e.USER_REFRESH_ACCOUNT_TYPE=`authorized_user`,e.UserRefreshClient=class e extends t.OAuth2Client{constructor(e,t,n,r,i){let a=e&&typeof e==`object`?e:{clientId:e,clientSecret:t,refreshToken:n,eagerRefreshThresholdMillis:r,forceRefreshOnFailure:i};super(a),o(this,`_refreshToken`,void 0),this._refreshToken=a.refreshToken,this.credentials.refresh_token=a.refreshToken}async refreshTokenNoCache(){return super.refreshTokenNoCache(this._refreshToken)}async fetchIdToken(t){let r={...e.RETRY_CONFIG,url:this.endpoints.oauth2TokenUrl,method:`POST`,data:new URLSearchParams({client_id:this._clientId,client_secret:this._clientSecret,grant_type:`refresh_token`,refresh_token:this._refreshToken,target_audience:t}),responseType:`json`};return n.AuthClient.setMethodName(r,`fetchIdToken`),(await this.transporter.request(r)).data.id_token}fromJSON(e){if(!e)throw Error(`Must pass in a JSON object containing the user refresh token`);if(e.type!==`authorized_user`)throw Error(`The incoming JSON object does not have the "authorized_user" type`);if(!e.client_id)throw Error(`The incoming JSON object does not contain a client_id field`);if(!e.client_secret)throw Error(`The incoming JSON object does not contain a client_secret field`);if(!e.refresh_token)throw Error(`The incoming JSON object does not contain a refresh_token field`);this._clientId=e.client_id,this._clientSecret=e.client_secret,this._refreshToken=e.refresh_token,this.credentials.refresh_token=e.refresh_token,this.quotaProjectId=e.quota_project_id,this.universeDomain=e.universe_domain||this.universeDomain}fromStream(e,t){if(t)this.fromStreamAsync(e).then(()=>t(),t);else return this.fromStreamAsync(e)}async fromStreamAsync(e){return new Promise((t,n)=>{if(!e)return n(Error(`Must pass in a stream containing the user refresh token.`));let r=``;e.setEncoding(`utf8`).on(`error`,n).on(`data`,e=>r+=e).on(`end`,()=>{try{let e=JSON.parse(r);return this.fromJSON(e),t()}catch(e){return n(e)}})})}static fromJSON(t){let n=new e;return n.fromJSON(t),n}}})),ze=i((e=>{a(),Object.defineProperty(e,`__esModule`,{value:!0}),e.Impersonated=e.IMPERSONATED_ACCOUNT_TYPE=void 0;var t=Q(),n=z(),r=H();e.IMPERSONATED_ACCOUNT_TYPE=`impersonated_service_account`,e.Impersonated=class e extends t.OAuth2Client{constructor(e={}){if(super(e),o(this,`sourceClient`,void 0),o(this,`targetPrincipal`,void 0),o(this,`targetScopes`,void 0),o(this,`delegates`,void 0),o(this,`lifetime`,void 0),o(this,`endpoint`,void 0),this.credentials={expiry_date:1,refresh_token:`impersonated-placeholder`},this.sourceClient=e.sourceClient??new t.OAuth2Client,this.targetPrincipal=e.targetPrincipal??``,this.delegates=e.delegates??[],this.targetScopes=e.targetScopes??[],this.lifetime=e.lifetime??3600,!(0,r.originalOrCamelOptions)(e).get(`universe_domain`))this.universeDomain=this.sourceClient.universeDomain;else if(this.sourceClient.universeDomain!==this.universeDomain)throw RangeError(`Universe domain ${this.sourceClient.universeDomain} in source credentials does not match ${this.universeDomain} universe domain set for impersonated credentials.`);this.endpoint=e.endpoint??`https://iamcredentials.${this.universeDomain}`}async sign(t){await this.sourceClient.getAccessToken();let n=`projects/-/serviceAccounts/${this.targetPrincipal}`,r=`${this.endpoint}/v1/${n}:signBlob`,i={delegates:this.delegates,payload:Buffer.from(t).toString(`base64`)};return(await this.sourceClient.request({...e.RETRY_CONFIG,url:r,data:i,method:`POST`})).data}getTargetPrincipal(){return this.targetPrincipal}async refreshToken(){try{await this.sourceClient.getAccessToken();let t=`projects/-/serviceAccounts/`+this.targetPrincipal,n=`${this.endpoint}/v1/${t}:generateAccessToken`,r={delegates:this.delegates,scope:this.targetScopes,lifetime:this.lifetime+`s`},i=await this.sourceClient.request({...e.RETRY_CONFIG,url:n,data:r,method:`POST`}),a=i.data;return this.credentials.access_token=a.accessToken,this.credentials.expiry_date=Date.parse(a.expireTime),{tokens:this.credentials,res:i}}catch(e){if(!(e instanceof Error))throw e;let t=0,r=``;throw e instanceof n.GaxiosError&&(t=e?.response?.data?.error?.status,r=e?.response?.data?.error?.message),t&&r?(e.message=`${t}: unable to impersonate: ${r}`,e):(e.message=`unable to impersonate: ${e}`,e)}}async fetchIdToken(t,n){await this.sourceClient.getAccessToken();let r=`projects/-/serviceAccounts/${this.targetPrincipal}`,i=`${this.endpoint}/v1/${r}:generateIdToken`,a={delegates:this.delegates,audience:t,includeEmail:n?.includeEmail??!0,useEmailAzp:n?.includeEmail??!0};return(await this.sourceClient.request({...e.RETRY_CONFIG,url:i,data:a,method:`POST`})).data.token}}})),Be=i((e=>{c(),a(),d(),l(),Object.defineProperty(e,`__esModule`,{value:!0}),e.OAuthClientAuthHandler=void 0,e.getErrorFromOAuthErrorResponse=u;var t=z(),n=V(),r=[`PUT`,`POST`,`PATCH`],i=new WeakMap,s=new WeakMap;e.OAuthClientAuthHandler=class{constructor(e){m(this,i,(0,n.createCrypto)()),m(this,s,void 0),o(this,`transporter`,void 0),e&&`clientId`in e?(h(s,this,e),this.transporter=new t.Gaxios):(h(s,this,e?.clientAuthentication),this.transporter=e?.transporter||new t.Gaxios)}applyClientAuthenticationOptions(e,n){e.headers=t.Gaxios.mergeHeaders(e.headers),this.injectAuthenticatedHeaders(e,n),n||this.injectAuthenticatedRequestBody(e)}injectAuthenticatedHeaders(e,n){if(n)e.headers=t.Gaxios.mergeHeaders(e.headers,{authorization:`Bearer ${n}`});else if(p(s,this)?.confidentialClientType===`basic`){e.headers=t.Gaxios.mergeHeaders(e.headers);let n=p(s,this).clientId,r=p(s,this).clientSecret||``,a=p(i,this).encodeBase64StringUtf8(`${n}:${r}`);t.Gaxios.mergeHeaders(e.headers,{authorization:`Basic ${a}`})}}injectAuthenticatedRequestBody(e){if(p(s,this)?.confidentialClientType===`request-body`){let t=(e.method||`GET`).toUpperCase();if(!r.includes(t))throw Error(`${t} HTTP method does not support ${p(s,this).confidentialClientType} client authentication`);let n=new Headers(e.headers).get(`content-type`);if(n?.startsWith(`application/x-www-form-urlencoded`)||e.data instanceof URLSearchParams){let t=new URLSearchParams(e.data??``);t.append(`client_id`,p(s,this).clientId),t.append(`client_secret`,p(s,this).clientSecret||``),e.data=t}else if(n?.startsWith(`application/json`))e.data=e.data||{},Object.assign(e.data,{client_id:p(s,this).clientId,client_secret:p(s,this).clientSecret||``});else throw Error(`${n} content-types are not supported with ${p(s,this).confidentialClientType} client authentication`)}}static get RETRY_CONFIG(){return{retry:!0,retryConfig:{httpMethodsToRetry:[`GET`,`PUT`,`POST`,`HEAD`,`OPTIONS`,`DELETE`]}}}};function u(e,t){let n=e.error,r=e.error_description,i=e.error_uri,a=`Error code ${n}`;r!==void 0&&(a+=`: ${r}`),i!==void 0&&(a+=` - ${i}`);let o=Error(a);if(t){let e=Object.keys(t);t.stack&&e.push(`stack`),e.forEach(e=>{e!==`message`&&Object.defineProperty(o,e,{value:t[e],writable:!1,enumerable:!0})})}return o}})),Ve=i((e=>{c(),d(),l(),Object.defineProperty(e,`__esModule`,{value:!0}),e.StsCredentials=void 0;var t=z(),n=Z(),r=Be(),i=H(),a=new WeakMap;e.StsCredentials=class e extends r.OAuthClientAuthHandler{constructor(e={tokenExchangeEndpoint:``},t){(typeof e!=`object`||e instanceof URL)&&(e={tokenExchangeEndpoint:e,clientAuthentication:t}),super(e),m(this,a,void 0),h(a,this,e.tokenExchangeEndpoint)}async exchangeToken(o,s,c){let l={grant_type:o.grantType,resource:o.resource,audience:o.audience,scope:o.scope?.join(` `),requested_token_type:o.requestedTokenType,subject_token:o.subjectToken,subject_token_type:o.subjectTokenType,actor_token:o.actingParty?.actorToken,actor_token_type:o.actingParty?.actorTokenType,options:c&&JSON.stringify(c)},u={...e.RETRY_CONFIG,url:p(a,this).toString(),method:`POST`,headers:s,data:new URLSearchParams((0,i.removeUndefinedValuesInObject)(l)),responseType:`json`};n.AuthClient.setMethodName(u,`exchangeToken`),this.applyClientAuthenticationOptions(u);try{let e=await this.transporter.request(u),t=e.data;return t.res=e,t}catch(e){throw e instanceof t.GaxiosError&&e.response?(0,r.getErrorFromOAuthErrorResponse)(e.response.data,e):e}}}})),$=i((e=>{g(),a(),c(),d(),l(),f(),Object.defineProperty(e,`__esModule`,{value:!0}),e.BaseExternalAccountClient=e.CLOUD_RESOURCE_MANAGER=e.EXTERNAL_ACCOUNT_TYPE=e.EXPIRATION_TIME_OFFSET=void 0;var n=z(),r=t(`stream`),i=Z(),_=Ve(),v=H(),y=we(),b=`urn:ietf:params:oauth:grant-type:token-exchange`,x=`urn:ietf:params:oauth:token-type:access_token`,S=`https://www.googleapis.com/auth/cloud-platform`,C=3600;e.EXPIRATION_TIME_OFFSET=300*1e3,e.EXTERNAL_ACCOUNT_TYPE=`external_account`,e.CLOUD_RESOURCE_MANAGER=`https://cloudresourcemanager.googleapis.com/v1/projects/`;var w=`//iam\\.googleapis\\.com/locations/[^/]+/workforcePools/[^/]+/providers/.+`,T=`https://sts.{universeDomain}/v1/token`,E=new WeakMap,D=new WeakSet,O=class t extends i.AuthClient{constructor(t){super(t),u(this,D),o(this,`scopes`,void 0),o(this,`projectNumber`,void 0),o(this,`audience`,void 0),o(this,`subjectTokenType`,void 0),o(this,`stsCredential`,void 0),o(this,`clientAuth`,void 0),o(this,`credentialSourceType`,void 0),o(this,`cachedAccessToken`,void 0),o(this,`serviceAccountImpersonationUrl`,void 0),o(this,`serviceAccountImpersonationLifetime`,void 0),o(this,`workforcePoolUserProject`,void 0),o(this,`configLifetimeRequested`,void 0),o(this,`tokenUrl`,void 0),o(this,`cloudResourceManagerURL`,void 0),o(this,`supplierContext`,void 0),m(this,E,null);let n=(0,v.originalOrCamelOptions)(t),r=n.get(`type`);if(r&&r!==e.EXTERNAL_ACCOUNT_TYPE)throw Error(`Expected "${e.EXTERNAL_ACCOUNT_TYPE}" type but received "${t.type}"`);let i=n.get(`client_id`),a=n.get(`client_secret`);this.tokenUrl=n.get(`token_url`)??T.replace(`{universeDomain}`,this.universeDomain);let s=n.get(`subject_token_type`),c=n.get(`workforce_pool_user_project`),l=n.get(`service_account_impersonation_url`),d=n.get(`service_account_impersonation`),f=(0,v.originalOrCamelOptions)(d).get(`token_lifetime_seconds`);this.cloudResourceManagerURL=new URL(n.get(`cloud_resource_manager_url`)||`https://cloudresourcemanager.${this.universeDomain}/v1/projects/`),i&&(this.clientAuth={confidentialClientType:`basic`,clientId:i,clientSecret:a}),this.stsCredential=new _.StsCredentials({tokenExchangeEndpoint:this.tokenUrl,clientAuthentication:this.clientAuth}),this.scopes=n.get(`scopes`)||[S],this.cachedAccessToken=null,this.audience=n.get(`audience`),this.subjectTokenType=s,this.workforcePoolUserProject=c;let p=new RegExp(w);if(this.workforcePoolUserProject&&!this.audience.match(p))throw Error(`workforcePoolUserProject should not be set for non-workforce pool credentials.`);this.serviceAccountImpersonationUrl=l,this.serviceAccountImpersonationLifetime=f,this.serviceAccountImpersonationLifetime?this.configLifetimeRequested=!0:(this.configLifetimeRequested=!1,this.serviceAccountImpersonationLifetime=C),this.projectNumber=this.getProjectNumber(this.audience),this.supplierContext={audience:this.audience,subjectTokenType:this.subjectTokenType,transporter:this.transporter}}getServiceAccountEmail(){if(this.serviceAccountImpersonationUrl){if(this.serviceAccountImpersonationUrl.length>256)throw RangeError(`URL is too long: ${this.serviceAccountImpersonationUrl}`);return/serviceAccounts\/(?<email>[^:]+):generateAccessToken$/.exec(this.serviceAccountImpersonationUrl)?.groups?.email||null}return null}setCredentials(e){super.setCredentials(e),this.cachedAccessToken=e}async getAccessToken(){return(!this.cachedAccessToken||this.isExpired(this.cachedAccessToken))&&await this.refreshAccessTokenAsync(),{token:this.cachedAccessToken.access_token,res:this.cachedAccessToken.res}}async getRequestHeaders(){let e=await this.getAccessToken(),t=new Headers({authorization:`Bearer ${e.token}`});return this.addSharedMetadataHeaders(t)}request(e,t){if(t)this.requestAsync(e).then(e=>t(null,e),e=>t(e,e.response));else return this.requestAsync(e)}async getProjectId(){let e=this.projectNumber||this.workforcePoolUserProject;if(this.projectId)return this.projectId;if(e){let n=await this.getRequestHeaders(),r={...t.RETRY_CONFIG,headers:n,url:`${this.cloudResourceManagerURL.toString()}${e}`,responseType:`json`};return i.AuthClient.setMethodName(r,`getProjectId`),this.projectId=(await this.transporter.request(r)).data.projectId,this.projectId}return null}async requestAsync(e,t=!1){let i;try{let t=await this.getRequestHeaders();e.headers=n.Gaxios.mergeHeaders(e.headers),this.addUserProjectAndAuthHeaders(e.headers,t),i=await this.transporter.request(e)}catch(n){let i=n.response;if(i){let n=i.status,a=i.config.data instanceof r.Readable;if(!t&&(n===401||n===403)&&!a&&this.forceRefreshOnFailure)return await this.refreshAccessTokenAsync(),await this.requestAsync(e,!0)}throw n}return i}async refreshAccessTokenAsync(){h(E,this,p(E,this)||s(D,this,k).call(this));try{return await p(E,this)}finally{h(E,this,null)}}getProjectNumber(e){let t=e.match(/\/projects\/([^/]+)/);return t?t[1]:null}async getImpersonatedAccessToken(e){let n={...t.RETRY_CONFIG,url:this.serviceAccountImpersonationUrl,method:`POST`,headers:{"content-type":`application/json`,authorization:`Bearer ${e}`},data:{scope:this.getScopesArray(),lifetime:this.serviceAccountImpersonationLifetime+`s`},responseType:`json`};i.AuthClient.setMethodName(n,`getImpersonatedAccessToken`);let r=await this.transporter.request(n),a=r.data;return{access_token:a.accessToken,expiry_date:new Date(a.expireTime).getTime(),res:r}}isExpired(e){let t=new Date().getTime();return e.expiry_date?t>=e.expiry_date-this.eagerRefreshThresholdMillis:!1}getScopesArray(){return typeof this.scopes==`string`?[this.scopes]:this.scopes||[S]}getMetricsHeaderValue(){let e=process.version.replace(/^v/,``),t=this.serviceAccountImpersonationUrl!==void 0,n=this.credentialSourceType?this.credentialSourceType:`unknown`;return`gl-node/${e} auth/${y.pkg.version} google-byoid-sdk source/${n} sa-impersonation/${t} config-lifetime/${this.configLifetimeRequested}`}getTokenUrl(){return this.tokenUrl}};async function k(){let e=await this.retrieveSubjectToken(),t={grantType:b,audience:this.audience,requestedTokenType:x,subjectToken:e,subjectTokenType:this.subjectTokenType,scope:this.serviceAccountImpersonationUrl?[S]:this.getScopesArray()},n=!this.clientAuth&&this.workforcePoolUserProject?{userProject:this.workforcePoolUserProject}:void 0,r=new Headers({"x-goog-api-client":this.getMetricsHeaderValue()}),i=await this.stsCredential.exchangeToken(t,r,n);return this.serviceAccountImpersonationUrl?this.cachedAccessToken=await this.getImpersonatedAccessToken(i.access_token):i.expires_in?this.cachedAccessToken={access_token:i.access_token,expiry_date:new Date().getTime()+i.expires_in*1e3,res:i.res}:this.cachedAccessToken={access_token:i.access_token,res:i.res},this.credentials={},Object.assign(this.credentials,this.cachedAccessToken),delete this.credentials.res,this.emit(`tokens`,{refresh_token:null,expiry_date:this.cachedAccessToken.expiry_date,access_token:this.cachedAccessToken.access_token,token_type:`Bearer`,id_token:null}),this.cachedAccessToken}e.BaseExternalAccountClient=O})),He=i((e=>{a(),Object.defineProperty(e,`__esModule`,{value:!0}),e.FileSubjectTokenSupplier=void 0;var n=t(`util`),r=t(`fs`),i=(0,n.promisify)(r.readFile??(()=>{})),s=(0,n.promisify)(r.realpath??(()=>{})),c=(0,n.promisify)(r.lstat??(()=>{}));e.FileSubjectTokenSupplier=class{constructor(e){o(this,`filePath`,void 0),o(this,`formatType`,void 0),o(this,`subjectTokenFieldName`,void 0),this.filePath=e.filePath,this.formatType=e.formatType,this.subjectTokenFieldName=e.subjectTokenFieldName}async getSubjectToken(){let e=this.filePath;try{if(e=await s(e),!(await c(e)).isFile())throw Error()}catch(t){throw t instanceof Error&&(t.message=`The file at ${e} does not exist, or it is not a file. ${t.message}`),t}let t,n=await i(e,{encoding:`utf8`});if(this.formatType===`text`?t=n:this.formatType===`json`&&this.subjectTokenFieldName&&(t=JSON.parse(n)[this.subjectTokenFieldName]),!t)throw Error(`Unable to parse the subject_token from the credential_source file`);return t}}})),Ue=i((e=>{a(),Object.defineProperty(e,`__esModule`,{value:!0}),e.UrlSubjectTokenSupplier=void 0;var t=Z();e.UrlSubjectTokenSupplier=class{constructor(e){o(this,`url`,void 0),o(this,`headers`,void 0),o(this,`formatType`,void 0),o(this,`subjectTokenFieldName`,void 0),o(this,`additionalGaxiosOptions`,void 0),this.url=e.url,this.formatType=e.formatType,this.subjectTokenFieldName=e.subjectTokenFieldName,this.headers=e.headers,this.additionalGaxiosOptions=e.additionalGaxiosOptions}async getSubjectToken(e){let n={...this.additionalGaxiosOptions,url:this.url,method:`GET`,headers:this.headers,responseType:this.formatType};t.AuthClient.setMethodName(n,`getSubjectToken`);let r;if(this.formatType===`text`?r=(await e.transporter.request(n)).data:this.formatType===`json`&&this.subjectTokenFieldName&&(r=(await e.transporter.request(n)).data[this.subjectTokenFieldName]),!r)throw Error(`Unable to parse the subject_token from the credential_source URL`);return r}}})),We=i((e=>{g(),a(),f(),Object.defineProperty(e,`__esModule`,{value:!0}),e.CertificateSubjectTokenSupplier=e.InvalidConfigurationError=e.CertificateSourceUnavailableError=e.CERTIFICATE_CONFIGURATION_ENV_VARIABLE=void 0;var n=H(),r=t(`fs`),i=t(`crypto`),c=t(`https`);e.CERTIFICATE_CONFIGURATION_ENV_VARIABLE=`GOOGLE_API_CERTIFICATE_CONFIG`;var l=class extends Error{constructor(e){super(e),this.name=`CertificateSourceUnavailableError`}};e.CertificateSourceUnavailableError=l;var d=class extends Error{constructor(e){super(e),this.name=`InvalidConfigurationError`}};e.InvalidConfigurationError=d;var p=new WeakSet,m=class{constructor(e){if(u(this,p),o(this,`certificateConfigPath`,void 0),o(this,`trustChainPath`,void 0),o(this,`cert`,void 0),o(this,`key`,void 0),!e.useDefaultCertificateConfig&&!e.certificateConfigLocation)throw new d("Either `useDefaultCertificateConfig` must be true or a `certificateConfigLocation` must be provided.");if(e.useDefaultCertificateConfig&&e.certificateConfigLocation)throw new d("Both `useDefaultCertificateConfig` and `certificateConfigLocation` cannot be provided.");this.trustChainPath=e.trustChainPath,this.certificateConfigPath=e.certificateConfigLocation??``}async createMtlsHttpsAgent(){if(!this.key||!this.cert)throw new d(`Cannot create mTLS Agent with missing certificate or key`);return new c.Agent({key:this.key,cert:this.cert})}async getSubjectToken(){this.certificateConfigPath=await s(p,this,h).call(this);let{certPath:e,keyPath:t}=await s(p,this,_).call(this);return{cert:this.cert,key:this.key}=await s(p,this,v).call(this,e,t),await s(p,this,y).call(this,this.cert)}};async function h(){let t=this.certificateConfigPath;if(t){if(await(0,n.isValidFile)(t))return t;throw new l(`Provided certificate config path is invalid: ${t}`)}let r=process.env[e.CERTIFICATE_CONFIGURATION_ENV_VARIABLE];if(r){if(await(0,n.isValidFile)(r))return r;throw new l(`Path from environment variable "${e.CERTIFICATE_CONFIGURATION_ENV_VARIABLE}" is invalid: ${r}`)}let i=(0,n.getWellKnownCertificateConfigFileLocation)();if(await(0,n.isValidFile)(i))return i;throw new l(`Could not find certificate configuration file. Searched override path, the "${e.CERTIFICATE_CONFIGURATION_ENV_VARIABLE}" env var, and the gcloud path (${i}).`)}async function _(){let e=this.certificateConfigPath,t;try{t=await r.promises.readFile(e,`utf8`)}catch{throw new l(`Failed to read certificate config file at: ${e}`)}try{let n=JSON.parse(t),r=n?.cert_configs?.workload?.cert_path,i=n?.cert_configs?.workload?.key_path;if(!r||!i)throw new d(`Certificate config file (${e}) is missing required "cert_path" or "key_path" in the workload config.`);return{certPath:r,keyPath:i}}catch(t){throw t instanceof d?t:new d(`Failed to parse certificate config from ${e}: ${t.message}`)}}async function v(e,t){let n,a;try{n=await r.promises.readFile(e),new i.X509Certificate(n)}catch(t){throw new l(`Failed to read certificate file at ${e}: ${t instanceof Error?t.message:String(t)}`)}try{a=await r.promises.readFile(t),(0,i.createPrivateKey)(a)}catch(e){throw new l(`Failed to read private key file at ${t}: ${e instanceof Error?e.message:String(e)}`)}return{cert:n,key:a}}async function y(e){let t=new i.X509Certificate(e);if(!this.trustChainPath)return JSON.stringify([t.raw.toString(`base64`)]);try{let e=((await r.promises.readFile(this.trustChainPath,`utf8`)).match(/-----BEGIN CERTIFICATE-----[^-]+-----END CERTIFICATE-----/g)??[]).map((e,t)=>{try{return new i.X509Certificate(e)}catch(e){let n=e instanceof Error?e.message:String(e);throw new d(`Failed to parse certificate at index ${t} in trust chain file ${this.trustChainPath}: ${n}`)}}),n=e.findIndex(e=>t.raw.equals(e.raw)),a;if(n===-1)a=[t,...e];else if(n===0)a=e;else throw new d(`Leaf certificate exists in the trust chain but is not the first entry (found at index ${n}).`);return JSON.stringify(a.map(e=>e.raw.toString(`base64`)))}catch(e){if(e instanceof d)throw e;let t=e instanceof Error?e.message:String(e);throw new l(`Failed to process certificate chain from ${this.trustChainPath}: ${t}`)}}e.CertificateSubjectTokenSupplier=m})),Ge=i((e=>{a(),Object.defineProperty(e,`__esModule`,{value:!0}),e.IdentityPoolClient=void 0;var t=$(),n=H(),r=He(),i=Ue(),s=We(),c=Ve(),l=z();e.IdentityPoolClient=class e extends t.BaseExternalAccountClient{constructor(t){super(t),o(this,`subjectTokenSupplier`,void 0);let a=(0,n.originalOrCamelOptions)(t),c=a.get(`credential_source`),l=a.get(`subject_token_supplier`);if(!c&&!l)throw Error(`A credential source or subject token supplier must be specified.`);if(c&&l)throw Error(`Only one of credential source or subject token supplier can be specified.`);if(l)this.subjectTokenSupplier=l,this.credentialSourceType=`programmatic`;else{let t=(0,n.originalOrCamelOptions)(c),a=(0,n.originalOrCamelOptions)(t.get(`format`)),o=a.get(`type`)||`text`,l=a.get(`subject_token_field_name`);if(o!==`json`&&o!==`text`)throw Error(`Invalid credential_source format "${o}"`);if(o===`json`&&!l)throw Error(`Missing subject_token_field_name for JSON credential_source format`);let u=t.get(`file`),d=t.get(`url`),f=t.get(`certificate`),p=t.get(`headers`);if(u&&d||d&&f||u&&f)throw Error(`No valid Identity Pool "credential_source" provided, must be either file, url, or certificate.`);if(u)this.credentialSourceType=`file`,this.subjectTokenSupplier=new r.FileSubjectTokenSupplier({filePath:u,formatType:o,subjectTokenFieldName:l});else if(d)this.credentialSourceType=`url`,this.subjectTokenSupplier=new i.UrlSubjectTokenSupplier({url:d,formatType:o,subjectTokenFieldName:l,headers:p,additionalGaxiosOptions:e.RETRY_CONFIG});else if(f)this.credentialSourceType=`certificate`,this.subjectTokenSupplier=new s.CertificateSubjectTokenSupplier({useDefaultCertificateConfig:f.use_default_certificate_config,certificateConfigLocation:f.certificate_config_location,trustChainPath:f.trust_chain_path});else throw Error(`No valid Identity Pool "credential_source" provided, must be either file, url, or certificate.`)}}async retrieveSubjectToken(){let e=await this.subjectTokenSupplier.getSubjectToken(this.supplierContext);if(this.subjectTokenSupplier instanceof s.CertificateSubjectTokenSupplier){let e=await this.subjectTokenSupplier.createMtlsHttpsAgent();this.stsCredential=new c.StsCredentials({tokenExchangeEndpoint:this.getTokenUrl(),clientAuthentication:this.clientAuth,transporter:new l.Gaxios({agent:e})}),this.transporter=new l.Gaxios({...this.transporter.defaults||{},agent:e})}return e}}})),Ke=i((e=>{a(),Object.defineProperty(e,`__esModule`,{value:!0}),e.AwsRequestSigner=void 0;var t=z(),n=V(),r=`AWS4-HMAC-SHA256`,i=`aws4_request`;e.AwsRequestSigner=class{constructor(e,t){o(this,`getCredentials`,void 0),o(this,`region`,void 0),o(this,`crypto`,void 0),this.getCredentials=e,this.region=t,this.crypto=(0,n.createCrypto)()}async getRequestOptions(e){if(!e.url)throw RangeError(`"url" is required in "amzOptions"`);let n=typeof e.data==`object`?JSON.stringify(e.data):e.data,r=e.url,i=e.method||`GET`,a=e.body||n,o=e.headers,s=await this.getCredentials(),c=new URL(r);if(typeof a!=`string`&&a!==void 0)throw TypeError(`'requestPayload' is expected to be a string if provided. Got: ${a}`);let u=await l({crypto:this.crypto,host:c.host,canonicalUri:c.pathname,canonicalQuerystring:c.search.slice(1),method:i,region:this.region,securityCredentials:s,requestPayload:a,additionalAmzHeaders:o}),d=t.Gaxios.mergeHeaders(u.amzDate?{"x-amz-date":u.amzDate}:{},{authorization:u.authorizationHeader,host:c.host},o||{});s.token&&t.Gaxios.mergeHeaders(d,{"x-amz-security-token":s.token});let f={url:r,method:i,headers:d};return a!==void 0&&(f.body=a),f}};async function s(e,t,n){return await e.signWithHmacSha256(t,n)}async function c(e,t,n,r,i){return await s(e,await s(e,await s(e,await s(e,`AWS4${t}`,n),r),i),`aws4_request`)}async function l(e){let a=t.Gaxios.mergeHeaders(e.additionalAmzHeaders),o=e.requestPayload||``,l=e.host.split(`.`)[0],u=new Date,d=u.toISOString().replace(/[-:]/g,``).replace(/\.[0-9]+/,``),f=u.toISOString().replace(/[-]/g,``).replace(/T.*/,``);e.securityCredentials.token&&a.set(`x-amz-security-token`,e.securityCredentials.token);let p=t.Gaxios.mergeHeaders({host:e.host},a.has(`date`)?{}:{"x-amz-date":d},a),m=``,h=[...p.keys()].sort();h.forEach(e=>{m+=`${e}:${p.get(e)}\n`});let g=h.join(`;`),_=await e.crypto.sha256DigestHex(o),v=`${e.method.toUpperCase()}\n${e.canonicalUri}\n${e.canonicalQuerystring}\n${m}\n${g}\n${_}`,y=`${f}/${e.region}/${l}/${i}`,b=`${r}\n${d}\n${y}\n`+await e.crypto.sha256DigestHex(v),x=await c(e.crypto,e.securityCredentials.secretAccessKey,f,e.region,l),S=await s(e.crypto,x,b),C=`${r} Credential=${e.securityCredentials.accessKeyId}/${y}, SignedHeaders=${g}, Signature=${(0,n.fromArrayBufferToHex)(S)}`;return{amzDate:a.has(`date`)?void 0:d,authorizationHeader:C,canonicalQuerystring:e.canonicalQuerystring}}})),qe=i((e=>{g(),a(),f(),Object.defineProperty(e,`__esModule`,{value:!0}),e.DefaultAwsSecurityCredentialsSupplier=void 0;var t=Z(),n=new WeakSet,r=class{constructor(e){u(this,n),o(this,`regionUrl`,void 0),o(this,`securityCredentialsUrl`,void 0),o(this,`imdsV2SessionTokenUrl`,void 0),o(this,`additionalGaxiosOptions`,void 0),this.regionUrl=e.regionUrl,this.securityCredentialsUrl=e.securityCredentialsUrl,this.imdsV2SessionTokenUrl=e.imdsV2SessionTokenUrl,this.additionalGaxiosOptions=e.additionalGaxiosOptions}async getAwsRegion(e){if(d.call(s(n,this)))return d.call(s(n,this));let r=new Headers;if(!d.call(s(n,this))&&this.imdsV2SessionTokenUrl&&r.set(`x-aws-ec2-metadata-token`,await s(n,this,i).call(this,e.transporter)),!this.regionUrl)throw RangeError(`Unable to determine AWS region due to missing "options.credential_source.region_url"`);let a={...this.additionalGaxiosOptions,url:this.regionUrl,method:`GET`,responseType:`text`,headers:r};t.AuthClient.setMethodName(a,`getAwsRegion`);let o=await e.transporter.request(a);return o.data.substr(0,o.data.length-1)}async getAwsSecurityCredentials(e){if(p.call(s(n,this)))return p.call(s(n,this));let t=new Headers;this.imdsV2SessionTokenUrl&&t.set(`x-aws-ec2-metadata-token`,await s(n,this,i).call(this,e.transporter));let r=await s(n,this,c).call(this,t,e.transporter),a=await s(n,this,l).call(this,r,t,e.transporter);return{accessKeyId:a.AccessKeyId,secretAccessKey:a.SecretAccessKey,token:a.Token}}};async function i(e){let n={...this.additionalGaxiosOptions,url:this.imdsV2SessionTokenUrl,method:`PUT`,responseType:`text`,headers:{"x-aws-ec2-metadata-token-ttl-seconds":`300`}};return t.AuthClient.setMethodName(n,`#getImdsV2SessionToken`),(await e.request(n)).data}async function c(e,n){if(!this.securityCredentialsUrl)throw Error(`Unable to determine AWS role name due to missing "options.credential_source.url"`);let r={...this.additionalGaxiosOptions,url:this.securityCredentialsUrl,method:`GET`,responseType:`text`,headers:e};return t.AuthClient.setMethodName(r,`#getAwsRoleName`),(await n.request(r)).data}async function l(e,n,r){let i={...this.additionalGaxiosOptions,url:`${this.securityCredentialsUrl}/${e}`,headers:n,responseType:`json`};return t.AuthClient.setMethodName(i,`#retrieveAwsSecurityCredentials`),(await r.request(i)).data}function d(){return process.env.AWS_REGION||process.env.AWS_DEFAULT_REGION||null}function p(){return process.env.AWS_ACCESS_KEY_ID&&process.env.AWS_SECRET_ACCESS_KEY?{accessKeyId:process.env.AWS_ACCESS_KEY_ID,secretAccessKey:process.env.AWS_SECRET_ACCESS_KEY,token:process.env.AWS_SESSION_TOKEN}:null}e.DefaultAwsSecurityCredentialsSupplier=r})),Je=i((e=>{a(),Object.defineProperty(e,`__esModule`,{value:!0}),e.AwsClient=void 0;var t=Ke(),n=$(),r=qe(),i=H(),s=z(),c=class e extends n.BaseExternalAccountClient{constructor(e){super(e),o(this,`environmentId`,void 0),o(this,`awsSecurityCredentialsSupplier`,void 0),o(this,`regionalCredVerificationUrl`,void 0),o(this,`awsRequestSigner`,void 0),o(this,`region`,void 0);let t=(0,i.originalOrCamelOptions)(e),n=t.get(`credential_source`),a=t.get(`aws_security_credentials_supplier`);if(!n&&!a)throw Error(`A credential source or AWS security credentials supplier must be specified.`);if(n&&a)throw Error(`Only one of credential source or AWS security credentials supplier can be specified.`);if(a)this.awsSecurityCredentialsSupplier=a,this.regionalCredVerificationUrl=l._,this.credentialSourceType=`programmatic`;else{let e=(0,i.originalOrCamelOptions)(n);this.environmentId=e.get(`environment_id`);let t=e.get(`region_url`),a=e.get(`url`),o=e.get(`imdsv2_session_token_url`);this.awsSecurityCredentialsSupplier=new r.DefaultAwsSecurityCredentialsSupplier({regionUrl:t,securityCredentialsUrl:a,imdsV2SessionTokenUrl:o}),this.regionalCredVerificationUrl=e.get(`regional_cred_verification_url`),this.credentialSourceType=`aws`,this.validateEnvironmentId()}this.awsRequestSigner=null,this.region=``}validateEnvironmentId(){let e=this.environmentId?.match(/^(aws)(\d+)$/);if(!e||!this.regionalCredVerificationUrl)throw Error(`No valid AWS "credential_source" provided`);if(parseInt(e[2],10)!==1)throw Error(`aws version "${e[2]}" is not supported in the current build.`)}async retrieveSubjectToken(){this.awsRequestSigner||(this.region=await this.awsSecurityCredentialsSupplier.getAwsRegion(this.supplierContext),this.awsRequestSigner=new t.AwsRequestSigner(async()=>this.awsSecurityCredentialsSupplier.getAwsSecurityCredentials(this.supplierContext),this.region));let n=await this.awsRequestSigner.getRequestOptions({...e.RETRY_CONFIG,url:this.regionalCredVerificationUrl.replace(`{region}`,this.region),method:`POST`}),r=[];return s.Gaxios.mergeHeaders({"x-goog-cloud-target-resource":this.audience},n.headers).forEach((e,t)=>r.push({key:t,value:e})),encodeURIComponent(JSON.stringify({url:n.url,method:n.method,headers:r}))}},l={_:`https://sts.{region}.amazonaws.com?Action=GetCallerIdentity&Version=2011-06-15`};o(c,`AWS_EC2_METADATA_IPV4_ADDRESS`,`169.254.169.254`),o(c,`AWS_EC2_METADATA_IPV6_ADDRESS`,`fd00:ec2::254`),e.AwsClient=c})),Ye=i((e=>{a(),Object.defineProperty(e,`__esModule`,{value:!0}),e.InvalidSubjectTokenError=e.InvalidMessageFieldError=e.InvalidCodeFieldError=e.InvalidTokenTypeFieldError=e.InvalidExpirationTimeFieldError=e.InvalidSuccessFieldError=e.InvalidVersionFieldError=e.ExecutableResponseError=e.ExecutableResponse=void 0;var t=`urn:ietf:params:oauth:token-type:saml2`,n=`urn:ietf:params:oauth:token-type:id_token`,r=`urn:ietf:params:oauth:token-type:jwt`;e.ExecutableResponse=class{constructor(e){if(o(this,`version`,void 0),o(this,`success`,void 0),o(this,`expirationTime`,void 0),o(this,`tokenType`,void 0),o(this,`errorCode`,void 0),o(this,`errorMessage`,void 0),o(this,`subjectToken`,void 0),!e.version)throw new s(`Executable response must contain a 'version' field.`);if(e.success===void 0)throw new c(`Executable response must contain a 'success' field.`);if(this.version=e.version,this.success=e.success,this.success){if(this.expirationTime=e.expiration_time,this.tokenType=e.token_type,this.tokenType!==t&&this.tokenType!==n&&this.tokenType!==r)throw new l(`Executable response must contain a 'token_type' field when successful and it must be one of ${n}, ${r}, or ${t}.`);if(this.tokenType===t){if(!e.saml_response)throw new f(`Executable response must contain a 'saml_response' field when token_type=${t}.`);this.subjectToken=e.saml_response}else{if(!e.id_token)throw new f(`Executable response must contain a 'id_token' field when token_type=${n} or ${r}.`);this.subjectToken=e.id_token}}else{if(!e.code)throw new u(`Executable response must contain a 'code' field when unsuccessful.`);if(!e.message)throw new d(`Executable response must contain a 'message' field when unsuccessful.`);this.errorCode=e.code,this.errorMessage=e.message}}isValid(){return!this.isExpired()&&this.success}isExpired(){return this.expirationTime!==void 0&&this.expirationTime<Math.round(Date.now()/1e3)}};var i=class extends Error{constructor(e){super(e),Object.setPrototypeOf(this,new.target.prototype)}};e.ExecutableResponseError=i;var s=class extends i{};e.InvalidVersionFieldError=s;var c=class extends i{};e.InvalidSuccessFieldError=c,e.InvalidExpirationTimeFieldError=class extends i{};var l=class extends i{};e.InvalidTokenTypeFieldError=l;var u=class extends i{};e.InvalidCodeFieldError=u;var d=class extends i{};e.InvalidMessageFieldError=d;var f=class extends i{};e.InvalidSubjectTokenError=f})),Xe=i((e=>{a(),Object.defineProperty(e,`__esModule`,{value:!0}),e.PluggableAuthHandler=e.ExecutableError=void 0;var n=Ye(),r=t(`child_process`),i=t(`fs`),s=class extends Error{constructor(e,t){super(`The executable failed with exit code: ${t} and error message: ${e}.`),o(this,`code`,void 0),this.code=t,Object.setPrototypeOf(this,new.target.prototype)}};e.ExecutableError=s,e.PluggableAuthHandler=class e{constructor(t){if(o(this,`commandComponents`,void 0),o(this,`timeoutMillis`,void 0),o(this,`outputFile`,void 0),!t.command)throw Error(`No command provided.`);if(this.commandComponents=e.parseCommand(t.command),this.timeoutMillis=t.timeoutMillis,!this.timeoutMillis)throw Error(`No timeoutMillis provided.`);this.outputFile=t.outputFile}retrieveResponseFromExecutable(e){return new Promise((t,i)=>{let a=r.spawn(this.commandComponents[0],this.commandComponents.slice(1),{env:{...process.env,...Object.fromEntries(e)}}),o=``;a.stdout.on(`data`,e=>{o+=e}),a.stderr.on(`data`,e=>{o+=e});let c=setTimeout(()=>(a.removeAllListeners(),a.kill(),i(Error(`The executable failed to finish within the timeout specified.`))),this.timeoutMillis);a.on(`close`,e=>{if(clearTimeout(c),e===0)try{let e=JSON.parse(o);return t(new n.ExecutableResponse(e))}catch(e){return e instanceof n.ExecutableResponseError?i(e):i(new n.ExecutableResponseError(`The executable returned an invalid response: ${o}`))}else return i(new s(o,e.toString()))})})}async retrieveCachedResponse(){if(!this.outputFile||this.outputFile.length===0)return;let e;try{e=await i.promises.realpath(this.outputFile)}catch{return}if(!(await i.promises.lstat(e)).isFile())return;let t=await i.promises.readFile(e,{encoding:`utf8`});if(t!==``)try{let e=JSON.parse(t);return new n.ExecutableResponse(e).isValid()?new n.ExecutableResponse(e):void 0}catch(e){throw e instanceof n.ExecutableResponseError?e:new n.ExecutableResponseError(`The output file contained an invalid response: ${t}`)}}static parseCommand(e){let t=e.match(/(?:[^\s"]+|"[^"]*")+/g);if(!t)throw Error(`Provided command: "${e}" could not be parsed.`);for(let e=0;e<t.length;e++)t[e][0]===`"`&&t[e].slice(-1)===`"`&&(t[e]=t[e].slice(1,-1));return t}}})),Ze=i((e=>{a(),Object.defineProperty(e,`__esModule`,{value:!0}),e.PluggableAuthClient=e.ExecutableError=void 0;var t=$(),n=Ye(),r=Xe(),i=Xe();Object.defineProperty(e,`ExecutableError`,{enumerable:!0,get:function(){return i.ExecutableError}});var s=30*1e3,c=5*1e3,l=120*1e3,u=`GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES`,d=1;e.PluggableAuthClient=class extends t.BaseExternalAccountClient{constructor(e){if(super(e),o(this,`command`,void 0),o(this,`timeoutMillis`,void 0),o(this,`outputFile`,void 0),o(this,`handler`,void 0),!e.credential_source.executable||(this.command=e.credential_source.executable.command,!this.command))throw Error(`No valid Pluggable Auth "credential_source" provided.`);if(e.credential_source.executable.timeout_millis===void 0)this.timeoutMillis=s;else if(this.timeoutMillis=e.credential_source.executable.timeout_millis,this.timeoutMillis<c||this.timeoutMillis>l)throw Error(`Timeout must be between ${c} and ${l} milliseconds.`);this.outputFile=e.credential_source.executable.output_file,this.handler=new r.PluggableAuthHandler({command:this.command,timeoutMillis:this.timeoutMillis,outputFile:this.outputFile}),this.credentialSourceType=`executable`}async retrieveSubjectToken(){if(process.env[u]!==`1`)throw Error(`Pluggable Auth executables need to be explicitly allowed to run by setting the GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES environment Variable to 1.`);let e;if(this.outputFile&&(e=await this.handler.retrieveCachedResponse()),!e){let t=new Map;t.set(`GOOGLE_EXTERNAL_ACCOUNT_AUDIENCE`,this.audience),t.set(`GOOGLE_EXTERNAL_ACCOUNT_TOKEN_TYPE`,this.subjectTokenType),t.set(`GOOGLE_EXTERNAL_ACCOUNT_INTERACTIVE`,`0`),this.outputFile&&t.set(`GOOGLE_EXTERNAL_ACCOUNT_OUTPUT_FILE`,this.outputFile);let n=this.getServiceAccountEmail();n&&t.set(`GOOGLE_EXTERNAL_ACCOUNT_IMPERSONATED_EMAIL`,n),e=await this.handler.retrieveResponseFromExecutable(t)}if(e.version>d)throw Error(`Version of executable is not currently supported, maximum supported version is ${d}.`);if(!e.success)throw new r.ExecutableError(e.errorMessage,e.errorCode);if(this.outputFile&&!e.expirationTime)throw new n.InvalidExpirationTimeFieldError("The executable response must contain the `expiration_time` field for successful responses when an output_file has been specified in the configuration.");if(e.isExpired())throw Error(`Executable response is expired.`);return e.subjectToken}}})),Qe=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.ExternalAccountClient=void 0;var t=$(),n=Ge(),r=Je(),i=Ze();e.ExternalAccountClient=class{constructor(){throw Error(`ExternalAccountClients should be initialized via: ExternalAccountClient.fromJSON(), directly via explicit constructors, eg. new AwsClient(options), new IdentityPoolClient(options), newPluggableAuthClientOptions, or via new GoogleAuth(options).getClient()`)}static fromJSON(e){return e&&e.type===t.EXTERNAL_ACCOUNT_TYPE?e.credential_source?.environment_id?new r.AwsClient(e):e.credential_source?.executable?new i.PluggableAuthClient(e):new n.IdentityPoolClient(e):null}}})),$e=i((e=>{c(),d(),l(),a(),Object.defineProperty(e,`__esModule`,{value:!0}),e.ExternalAccountAuthorizedUserClient=e.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE=void 0;var n=Z(),r=Be(),i=z(),s=t(`stream`),u=$();e.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE=`external_account_authorized_user`;var f=`https://sts.{universeDomain}/v1/oauthtoken`,g=new WeakMap,_=class e extends r.OAuthClientAuthHandler{constructor(e){super(e),m(this,g,void 0),h(g,this,e.tokenRefreshEndpoint)}async refreshToken(t,a){let o={...e.RETRY_CONFIG,url:p(g,this),method:`POST`,headers:a,data:new URLSearchParams({grant_type:`refresh_token`,refresh_token:t}),responseType:`json`};n.AuthClient.setMethodName(o,`refreshToken`),this.applyClientAuthenticationOptions(o);try{let e=await this.transporter.request(o),t=e.data;return t.res=e,t}catch(e){throw e instanceof i.GaxiosError&&e.response?(0,r.getErrorFromOAuthErrorResponse)(e.response.data,e):e}}};e.ExternalAccountAuthorizedUserClient=class extends n.AuthClient{constructor(e){super(e),o(this,`cachedAccessToken`,void 0),o(this,`externalAccountAuthorizedUserHandler`,void 0),o(this,`refreshToken`,void 0),e.universe_domain&&(this.universeDomain=e.universe_domain),this.refreshToken=e.refresh_token;let t={confidentialClientType:`basic`,clientId:e.client_id,clientSecret:e.client_secret};this.externalAccountAuthorizedUserHandler=new _({tokenRefreshEndpoint:e.token_url??f.replace(`{universeDomain}`,this.universeDomain),transporter:this.transporter,clientAuthentication:t}),this.cachedAccessToken=null,this.quotaProjectId=e.quota_project_id,typeof e?.eagerRefreshThresholdMillis==`number`?this.eagerRefreshThresholdMillis=e.eagerRefreshThresholdMillis:this.eagerRefreshThresholdMillis=u.EXPIRATION_TIME_OFFSET,this.forceRefreshOnFailure=!!e?.forceRefreshOnFailure}async getAccessToken(){return(!this.cachedAccessToken||this.isExpired(this.cachedAccessToken))&&await this.refreshAccessTokenAsync(),{token:this.cachedAccessToken.access_token,res:this.cachedAccessToken.res}}async getRequestHeaders(){let e=await this.getAccessToken(),t=new Headers({authorization:`Bearer ${e.token}`});return this.addSharedMetadataHeaders(t)}request(e,t){if(t)this.requestAsync(e).then(e=>t(null,e),e=>t(e,e.response));else return this.requestAsync(e)}async requestAsync(e,t=!1){let n;try{let t=await this.getRequestHeaders();e.headers=i.Gaxios.mergeHeaders(e.headers),this.addUserProjectAndAuthHeaders(e.headers,t),n=await this.transporter.request(e)}catch(n){let r=n.response;if(r){let n=r.status,i=r.config.data instanceof s.Readable;if(!t&&(n===401||n===403)&&!i&&this.forceRefreshOnFailure)return await this.refreshAccessTokenAsync(),await this.requestAsync(e,!0)}throw n}return n}async refreshAccessTokenAsync(){let e=await this.externalAccountAuthorizedUserHandler.refreshToken(this.refreshToken);return this.cachedAccessToken={access_token:e.access_token,expiry_date:new Date().getTime()+e.expires_in*1e3,res:e.res},e.refresh_token!==void 0&&(this.refreshToken=e.refresh_token),this.cachedAccessToken}isExpired(e){let t=new Date().getTime();return e.expiry_date?t>=e.expiry_date-this.eagerRefreshThresholdMillis:!1}}})),et=i((e=>{g(),a(),c(),f(),d(),l(),Object.defineProperty(e,`__esModule`,{value:!0}),e.GoogleAuth=e.GoogleAuthExceptionMessages=void 0;var n=t(`child_process`),r=t(`fs`),i=z(),_=B(),v=t(`os`),y=t(`path`),b=V(),x=Ee(),S=De(),C=Oe(),w=Le(),T=Re(),E=ze(),D=Qe(),O=$(),k=Z(),A=$e(),j=H();e.GoogleAuthExceptionMessages={API_KEY_WITH_CREDENTIALS:`API Keys and Credentials are mutually exclusive authentication methods and cannot be used together.`,NO_PROJECT_ID_FOUND:`Unable to detect a Project Id in the current environment.
4
+ To learn more about authentication and Google APIs, visit:
5
+ https://cloud.google.com/docs/authentication/getting-started`,NO_CREDENTIALS_FOUND:`Unable to find credentials in current environment.
6
+ To learn more about authentication and Google APIs, visit:
7
+ https://cloud.google.com/docs/authentication/getting-started`,NO_ADC_FOUND:`Could not load the default credentials. Browse to https://cloud.google.com/docs/authentication/getting-started for more information.`,NO_UNIVERSE_DOMAIN_FOUND:`Unable to detect a Universe Domain in the current environment.
8
+ To learn more about Universe Domain retrieval, visit:
9
+ https://cloud.google.com/compute/docs/metadata/predefined-metadata-keys`};var M=new WeakMap,N=new WeakSet,P=class{get isGCE(){return this.checkIsGCE}constructor(t={}){if(u(this,N),o(this,`checkIsGCE`,void 0),o(this,`useJWTAccessWithScope`,void 0),o(this,`defaultServicePath`,void 0),o(this,`_findProjectIdPromise`,void 0),o(this,`_cachedProjectId`,void 0),o(this,`jsonContent`,null),o(this,`apiKey`,void 0),o(this,`cachedCredential`,null),m(this,M,null),o(this,`defaultScopes`,void 0),o(this,`keyFilename`,void 0),o(this,`scopes`,void 0),o(this,`clientOptions`,{}),this._cachedProjectId=t.projectId||null,this.cachedCredential=t.authClient||null,this.keyFilename=t.keyFilename||t.keyFile,this.scopes=t.scopes,this.clientOptions=t.clientOptions||{},this.jsonContent=t.credentials||null,this.apiKey=t.apiKey||this.clientOptions.apiKey||null,this.apiKey&&(this.jsonContent||this.clientOptions.credentials))throw RangeError(e.GoogleAuthExceptionMessages.API_KEY_WITH_CREDENTIALS);t.universeDomain&&(this.clientOptions.universeDomain=t.universeDomain)}setGapicJWTValues(e){e.defaultServicePath=this.defaultServicePath,e.useJWTAccessWithScope=this.useJWTAccessWithScope,e.defaultScopes=this.defaultScopes}getProjectId(e){if(e)this.getProjectIdAsync().then(t=>e(null,t),e);else return this.getProjectIdAsync()}async getProjectIdOptional(){try{return await this.getProjectId()}catch(t){if(t instanceof Error&&t.message===e.GoogleAuthExceptionMessages.NO_PROJECT_ID_FOUND)return null;throw t}}async findAndCacheProjectId(){let t=null;if(t||(t=await this.getProductionProjectId()),t||(t=await this.getFileProjectId()),t||(t=await this.getDefaultServiceProjectId()),t||(t=await this.getGCEProjectId()),t||(t=await this.getExternalAccountClientProjectId()),t)return this._cachedProjectId=t,t;throw Error(e.GoogleAuthExceptionMessages.NO_PROJECT_ID_FOUND)}async getProjectIdAsync(){return this._cachedProjectId?this._cachedProjectId:(this._findProjectIdPromise||(this._findProjectIdPromise=this.findAndCacheProjectId()),this._findProjectIdPromise)}async getUniverseDomainFromMetadataServer(){let e;try{e=await _.universe(`universe-domain`),e||(e=k.DEFAULT_UNIVERSE)}catch(t){if(t&&t?.response?.status===404)e=k.DEFAULT_UNIVERSE;else throw t}return e}async getUniverseDomain(){let e=(0,j.originalOrCamelOptions)(this.clientOptions).get(`universe_domain`);try{e??(e=(await this.getClient()).universeDomain)}catch{e??(e=k.DEFAULT_UNIVERSE)}return e}getAnyScopes(){return this.scopes||this.defaultScopes}getApplicationDefault(e={},t){let n;if(typeof e==`function`?t=e:n=e,t)this.getApplicationDefaultAsync(n).then(e=>t(null,e.credential,e.projectId),t);else return this.getApplicationDefaultAsync(n)}async getApplicationDefaultAsync(t={}){if(this.cachedCredential)return await s(N,this,F).call(this,this.cachedCredential,null);let n;if(n=await this._tryGetApplicationCredentialsFromEnvironmentVariable(t),n||(n=await this._tryGetApplicationCredentialsFromWellKnownFile(t),n))return n instanceof w.JWT?n.scopes=this.scopes:n instanceof O.BaseExternalAccountClient&&(n.scopes=this.getAnyScopes()),await s(N,this,F).call(this,n);if(await this._checkIsGCE())return t.scopes=this.getAnyScopes(),await s(N,this,F).call(this,new x.Compute(t));throw Error(e.GoogleAuthExceptionMessages.NO_ADC_FOUND)}async _checkIsGCE(){return this.checkIsGCE===void 0&&(this.checkIsGCE=_.getGCPResidency()||await _.isAvailable()),this.checkIsGCE}async _tryGetApplicationCredentialsFromEnvironmentVariable(e){let t=process.env.GOOGLE_APPLICATION_CREDENTIALS||process.env.google_application_credentials;if(!t||t.length===0)return null;try{return this._getApplicationCredentialsFromFilePath(t,e)}catch(e){throw e instanceof Error&&(e.message=`Unable to read the credential file specified by the GOOGLE_APPLICATION_CREDENTIALS environment variable: ${e.message}`),e}}async _tryGetApplicationCredentialsFromWellKnownFile(e){let t=null;if(this._isWindows())t=process.env.APPDATA;else{let e=process.env.HOME;e&&(t=y.join(e,`.config`))}return t&&(t=y.join(t,`gcloud`,`application_default_credentials.json`),r.existsSync(t)||(t=null)),t?await this._getApplicationCredentialsFromFilePath(t,e):null}async _getApplicationCredentialsFromFilePath(e,t={}){if(!e||e.length===0)throw Error(`The file path is invalid.`);try{if(e=r.realpathSync(e),!r.lstatSync(e).isFile())throw Error()}catch(t){throw t instanceof Error&&(t.message=`The file at ${e} does not exist, or it is not a file. ${t.message}`),t}let n=r.createReadStream(e);return this.fromStream(n,t)}fromImpersonatedJSON(e){if(!e)throw Error(`Must pass in a JSON object containing an impersonated refresh token`);if(e.type!==E.IMPERSONATED_ACCOUNT_TYPE)throw Error(`The incoming JSON object does not have the "${E.IMPERSONATED_ACCOUNT_TYPE}" type`);if(!e.source_credentials)throw Error(`The incoming JSON object does not contain a source_credentials field`);if(!e.service_account_impersonation_url)throw Error(`The incoming JSON object does not contain a service_account_impersonation_url field`);let t=this.fromJSON(e.source_credentials);if(e.service_account_impersonation_url?.length>256)throw RangeError(`Target principal is too long: ${e.service_account_impersonation_url}`);let n=/(?<target>[^/]+):(generateAccessToken|generateIdToken)$/.exec(e.service_account_impersonation_url)?.groups?.target;if(!n)throw RangeError(`Cannot extract target principal from ${e.service_account_impersonation_url}`);let r=(this.scopes||e.scopes||this.defaultScopes)??[];return new E.Impersonated({...e,sourceClient:t,targetPrincipal:n,targetScopes:Array.isArray(r)?r:[r]})}fromJSON(e,t={}){let n,r=(0,j.originalOrCamelOptions)(t).get(`universe_domain`);return e.type===T.USER_REFRESH_ACCOUNT_TYPE?(n=new T.UserRefreshClient(t),n.fromJSON(e)):e.type===E.IMPERSONATED_ACCOUNT_TYPE?n=this.fromImpersonatedJSON(e):e.type===O.EXTERNAL_ACCOUNT_TYPE?(n=D.ExternalAccountClient.fromJSON({...e,...t}),n.scopes=this.getAnyScopes()):e.type===A.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE?n=new A.ExternalAccountAuthorizedUserClient({...e,...t}):(t.scopes=this.scopes,n=new w.JWT(t),this.setGapicJWTValues(n),n.fromJSON(e)),r&&(n.universeDomain=r),n}_cacheClientFromJSON(e,t){let n=this.fromJSON(e,t);return this.jsonContent=e,this.cachedCredential=n,n}fromStream(e,t={},n){let r={};if(typeof t==`function`?n=t:r=t,n)this.fromStreamAsync(e,r).then(e=>n(null,e),n);else return this.fromStreamAsync(e,r)}fromStreamAsync(e,t){return new Promise((n,r)=>{if(!e)throw Error(`Must pass in a stream containing the Google auth settings.`);let i=[];e.setEncoding(`utf8`).on(`error`,r).on(`data`,e=>i.push(e)).on(`end`,()=>{try{try{let e=JSON.parse(i.join(``));return n(this._cacheClientFromJSON(e,t))}catch(e){if(!this.keyFilename)throw e;let t=new w.JWT({...this.clientOptions,keyFile:this.keyFilename});return this.cachedCredential=t,this.setGapicJWTValues(t),n(t)}}catch(e){return r(e)}})})}fromAPIKey(e,t={}){return new w.JWT({...t,apiKey:e})}_isWindows(){let e=v.platform();return!!(e&&e.length>=3&&e.substring(0,3).toLowerCase()===`win`)}async getDefaultServiceProjectId(){return new Promise(e=>{(0,n.exec)(`gcloud config config-helper --format json`,(t,n)=>{if(!t&&n)try{let t=JSON.parse(n).configuration.properties.core.project;e(t);return}catch{}e(null)})})}getProductionProjectId(){return process.env.GCLOUD_PROJECT||process.env.GOOGLE_CLOUD_PROJECT||process.env.gcloud_project||process.env.google_cloud_project}async getFileProjectId(){if(this.cachedCredential)return this.cachedCredential.projectId;if(this.keyFilename){let e=await this.getClient();if(e&&e.projectId)return e.projectId}let e=await this._tryGetApplicationCredentialsFromEnvironmentVariable();return e?e.projectId:null}async getExternalAccountClientProjectId(){return!this.jsonContent||this.jsonContent.type!==O.EXTERNAL_ACCOUNT_TYPE?null:await(await this.getClient()).getProjectId()}async getGCEProjectId(){try{return await _.project(`project-id`)}catch{return null}}getCredentials(e){if(e)this.getCredentialsAsync().then(t=>e(null,t),e);else return this.getCredentialsAsync()}async getCredentialsAsync(){let t=await this.getClient();if(t instanceof E.Impersonated)return{client_email:t.getTargetPrincipal()};if(t instanceof O.BaseExternalAccountClient){let e=t.getServiceAccountEmail();if(e)return{client_email:e,universe_domain:t.universeDomain}}if(this.jsonContent)return{client_email:this.jsonContent.client_email,private_key:this.jsonContent.private_key,universe_domain:this.jsonContent.universe_domain};if(await this._checkIsGCE()){let[e,t]=await Promise.all([_.instance(`service-accounts/default/email`),this.getUniverseDomain()]);return{client_email:e,universe_domain:t}}throw Error(e.GoogleAuthExceptionMessages.NO_CREDENTIALS_FOUND)}async getClient(){if(this.cachedCredential)return this.cachedCredential;h(M,this,p(M,this)||s(N,this,I).call(this));try{return await p(M,this)}finally{h(M,this,null)}}async getIdTokenClient(e){let t=await this.getClient();if(!(`fetchIdToken`in t))throw Error(`Cannot fetch ID token in this environment, use GCE or set the GOOGLE_APPLICATION_CREDENTIALS environment variable to a service account credentials JSON file.`);return new S.IdTokenClient({targetAudience:e,idTokenProvider:t})}async getAccessToken(){return(await(await this.getClient()).getAccessToken()).token}async getRequestHeaders(e){return(await this.getClient()).getRequestHeaders(e)}async authorizeRequest(e={}){let t=e.url,n=await(await this.getClient()).getRequestHeaders(t);return e.headers=i.Gaxios.mergeHeaders(e.headers,n),e}async fetch(...e){return(await this.getClient()).fetch(...e)}async request(e){return(await this.getClient()).request(e)}getEnv(){return(0,C.getEnv)()}async sign(e,t){let n=await this.getClient(),r=await this.getUniverseDomain();if(t=t||`https://iamcredentials.${r}/v1/projects/-/serviceAccounts/`,n instanceof E.Impersonated)return(await n.sign(e)).signedBlob;let i=(0,b.createCrypto)();if(n instanceof w.JWT&&n.key)return await i.sign(n.key,e);let a=await this.getCredentials();if(!a.client_email)throw Error("Cannot sign data without `client_email`.");return this.signBlob(i,a.client_email,e,t)}async signBlob(e,t,n,r){let i=new URL(r+`${t}:signBlob`);return(await this.request({method:`POST`,url:i.href,data:{payload:e.encodeBase64StringUtf8(n)},retry:!0,retryConfig:{httpMethodsToRetry:[`POST`]}})).data.signedBlob}};async function F(e,t=process.env.GOOGLE_CLOUD_QUOTA_PROJECT||null){let n=await this.getProjectIdOptional();return t&&(e.quotaProjectId=t),this.cachedCredential=e,{credential:e,projectId:n}}async function I(){if(this.jsonContent)return this._cacheClientFromJSON(this.jsonContent,this.clientOptions);if(this.keyFilename){let e=y.resolve(this.keyFilename),t=r.createReadStream(e);return await this.fromStreamAsync(t,this.clientOptions)}else if(this.apiKey){let e=await this.fromAPIKey(this.apiKey,this.clientOptions);e.scopes=this.scopes;let{credential:t}=await s(N,this,F).call(this,e);return t}else{let{credential:e}=await this.getApplicationDefaultAsync(this.clientOptions);return e}}e.GoogleAuth=P})),tt=i((e=>{a(),Object.defineProperty(e,`__esModule`,{value:!0}),e.IAMAuth=void 0,e.IAMAuth=class{constructor(e,t){o(this,`selector`,void 0),o(this,`token`,void 0),this.selector=e,this.token=t,this.selector=e,this.token=t}getRequestHeaders(){return{"x-goog-iam-authority-selector":this.selector,"x-goog-iam-authorization-token":this.token}}}})),nt=i((e=>{a(),Object.defineProperty(e,`__esModule`,{value:!0}),e.DownscopedClient=e.EXPIRATION_TIME_OFFSET=e.MAX_ACCESS_BOUNDARY_RULES_COUNT=void 0;var n=z(),r=t(`stream`),i=Z(),s=Ve(),c=`urn:ietf:params:oauth:grant-type:token-exchange`,l=`urn:ietf:params:oauth:token-type:access_token`,u=`urn:ietf:params:oauth:token-type:access_token`;e.MAX_ACCESS_BOUNDARY_RULES_COUNT=10,e.EXPIRATION_TIME_OFFSET=300*1e3,e.DownscopedClient=class extends i.AuthClient{constructor(t,n={accessBoundary:{accessBoundaryRules:[]}}){if(super(t instanceof i.AuthClient?{}:t),o(this,`authClient`,void 0),o(this,`credentialAccessBoundary`,void 0),o(this,`cachedDownscopedAccessToken`,void 0),o(this,`stsCredential`,void 0),t instanceof i.AuthClient?(this.authClient=t,this.credentialAccessBoundary=n):(this.authClient=t.authClient,this.credentialAccessBoundary=t.credentialAccessBoundary),this.credentialAccessBoundary.accessBoundary.accessBoundaryRules.length===0)throw Error(`At least one access boundary rule needs to be defined.`);if(this.credentialAccessBoundary.accessBoundary.accessBoundaryRules.length>e.MAX_ACCESS_BOUNDARY_RULES_COUNT)throw Error(`The provided access boundary has more than ${e.MAX_ACCESS_BOUNDARY_RULES_COUNT} access boundary rules.`);for(let e of this.credentialAccessBoundary.accessBoundary.accessBoundaryRules)if(e.availablePermissions.length===0)throw Error(`At least one permission should be defined in access boundary rules.`);this.stsCredential=new s.StsCredentials({tokenExchangeEndpoint:`https://sts.${this.universeDomain}/v1/token`}),this.cachedDownscopedAccessToken=null}setCredentials(e){if(!e.expiry_date)throw Error(`The access token expiry_date field is missing in the provided credentials.`);super.setCredentials(e),this.cachedDownscopedAccessToken=e}async getAccessToken(){return(!this.cachedDownscopedAccessToken||this.isExpired(this.cachedDownscopedAccessToken))&&await this.refreshAccessTokenAsync(),{token:this.cachedDownscopedAccessToken.access_token,expirationTime:this.cachedDownscopedAccessToken.expiry_date,res:this.cachedDownscopedAccessToken.res}}async getRequestHeaders(){let e=await this.getAccessToken(),t=new Headers({authorization:`Bearer ${e.token}`});return this.addSharedMetadataHeaders(t)}request(e,t){if(t)this.requestAsync(e).then(e=>t(null,e),e=>t(e,e.response));else return this.requestAsync(e)}async requestAsync(e,t=!1){let i;try{let t=await this.getRequestHeaders();e.headers=n.Gaxios.mergeHeaders(e.headers),this.addUserProjectAndAuthHeaders(e.headers,t),i=await this.transporter.request(e)}catch(n){let i=n.response;if(i){let n=i.status,a=i.config.data instanceof r.Readable;if(!t&&(n===401||n===403)&&!a&&this.forceRefreshOnFailure)return await this.refreshAccessTokenAsync(),await this.requestAsync(e,!0)}throw n}return i}async refreshAccessTokenAsync(){let e={grantType:c,requestedTokenType:l,subjectToken:(await this.authClient.getAccessToken()).token,subjectTokenType:u},t=await this.stsCredential.exchangeToken(e,void 0,this.credentialAccessBoundary),n=this.authClient.credentials?.expiry_date||null,r=t.expires_in?new Date().getTime()+t.expires_in*1e3:n;return this.cachedDownscopedAccessToken={access_token:t.access_token,expiry_date:r,res:t.res},this.credentials={},Object.assign(this.credentials,this.cachedDownscopedAccessToken),delete this.credentials.res,this.emit(`tokens`,{refresh_token:null,expiry_date:this.cachedDownscopedAccessToken.expiry_date,access_token:this.cachedDownscopedAccessToken.access_token,token_type:`Bearer`,id_token:null}),this.cachedDownscopedAccessToken}isExpired(e){let t=new Date().getTime();return e.expiry_date?t>=e.expiry_date-this.eagerRefreshThresholdMillis:!1}}})),rt=i((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.PassThroughClient=void 0;var t=Z();e.PassThroughClient=class extends t.AuthClient{async request(e){return this.transporter.request(e)}async getAccessToken(){return{}}async getRequestHeaders(){return new Headers}}})),it=i((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||(`get`in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__exportStar||function(e,n){for(var r in e)r!==`default`&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,`__esModule`,{value:!0}),e.GoogleAuth=e.auth=e.PassThroughClient=e.ExternalAccountAuthorizedUserClient=e.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE=e.ExecutableError=e.PluggableAuthClient=e.DownscopedClient=e.BaseExternalAccountClient=e.ExternalAccountClient=e.IdentityPoolClient=e.AwsRequestSigner=e.AwsClient=e.UserRefreshClient=e.LoginTicket=e.ClientAuthentication=e.OAuth2Client=e.CodeChallengeMethod=e.Impersonated=e.JWT=e.JWTAccess=e.IdTokenClient=e.IAMAuth=e.GCPEnv=e.Compute=e.DEFAULT_UNIVERSE=e.AuthClient=e.gaxios=e.gcpMetadata=void 0;var r=et();Object.defineProperty(e,`GoogleAuth`,{enumerable:!0,get:function(){return r.GoogleAuth}}),e.gcpMetadata=B(),e.gaxios=z();var i=Z();Object.defineProperty(e,`AuthClient`,{enumerable:!0,get:function(){return i.AuthClient}}),Object.defineProperty(e,`DEFAULT_UNIVERSE`,{enumerable:!0,get:function(){return i.DEFAULT_UNIVERSE}});var a=Ee();Object.defineProperty(e,`Compute`,{enumerable:!0,get:function(){return a.Compute}});var o=Oe();Object.defineProperty(e,`GCPEnv`,{enumerable:!0,get:function(){return o.GCPEnv}});var s=tt();Object.defineProperty(e,`IAMAuth`,{enumerable:!0,get:function(){return s.IAMAuth}});var c=De();Object.defineProperty(e,`IdTokenClient`,{enumerable:!0,get:function(){return c.IdTokenClient}});var l=Ie();Object.defineProperty(e,`JWTAccess`,{enumerable:!0,get:function(){return l.JWTAccess}});var u=Le();Object.defineProperty(e,`JWT`,{enumerable:!0,get:function(){return u.JWT}});var d=ze();Object.defineProperty(e,`Impersonated`,{enumerable:!0,get:function(){return d.Impersonated}});var f=Q();Object.defineProperty(e,`CodeChallengeMethod`,{enumerable:!0,get:function(){return f.CodeChallengeMethod}}),Object.defineProperty(e,`OAuth2Client`,{enumerable:!0,get:function(){return f.OAuth2Client}}),Object.defineProperty(e,`ClientAuthentication`,{enumerable:!0,get:function(){return f.ClientAuthentication}});var p=Te();Object.defineProperty(e,`LoginTicket`,{enumerable:!0,get:function(){return p.LoginTicket}});var m=Re();Object.defineProperty(e,`UserRefreshClient`,{enumerable:!0,get:function(){return m.UserRefreshClient}});var h=Je();Object.defineProperty(e,`AwsClient`,{enumerable:!0,get:function(){return h.AwsClient}});var g=Ke();Object.defineProperty(e,`AwsRequestSigner`,{enumerable:!0,get:function(){return g.AwsRequestSigner}});var _=Ge();Object.defineProperty(e,`IdentityPoolClient`,{enumerable:!0,get:function(){return _.IdentityPoolClient}});var v=Qe();Object.defineProperty(e,`ExternalAccountClient`,{enumerable:!0,get:function(){return v.ExternalAccountClient}});var y=$();Object.defineProperty(e,`BaseExternalAccountClient`,{enumerable:!0,get:function(){return y.BaseExternalAccountClient}});var b=nt();Object.defineProperty(e,`DownscopedClient`,{enumerable:!0,get:function(){return b.DownscopedClient}});var x=Ze();Object.defineProperty(e,`PluggableAuthClient`,{enumerable:!0,get:function(){return x.PluggableAuthClient}}),Object.defineProperty(e,`ExecutableError`,{enumerable:!0,get:function(){return x.ExecutableError}});var S=$e();Object.defineProperty(e,`EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE`,{enumerable:!0,get:function(){return S.EXTERNAL_ACCOUNT_AUTHORIZED_USER_TYPE}}),Object.defineProperty(e,`ExternalAccountAuthorizedUserClient`,{enumerable:!0,get:function(){return S.ExternalAccountAuthorizedUserClient}});var C=rt();Object.defineProperty(e,`PassThroughClient`,{enumerable:!0,get:function(){return C.PassThroughClient}}),n(Fe(),e),e.auth=new r.GoogleAuth}));export default it();export{};
@@ -0,0 +1 @@
1
+ import{$ as e,$t as t,A as n,An as r,At as i,B as a,Bt as o,C as s,Cn as c,D as l,Dn as u,Dt as d,E as f,En as p,Et as m,F as h,Ft as g,G as _,Gt as v,H as y,Ht as b,I as x,It as S,J as C,Jt as w,K as T,Kt as E,L as D,Lt as O,M as k,Mn as A,Mt as j,N as M,Nn as N,Nt as P,O as F,On as I,Ot as L,P as R,Pn as z,Pt as B,Q as V,Qt as H,R as U,Rt as W,S as G,St as K,T as q,U as J,Ut as Y,V as X,Vt as Z,W as Q,Wt as $,X as ee,Xt as te,Y as ne,Yt as re,Z as ie,Zt as ae,_ as oe,_n as se,_t as ce,a as le,an as ue,at as de,b as fe,bt as pe,c as me,cn as he,ct as ge,d as _e,dn as ve,dt as ye,en as be,et as xe,f as Se,fn as Ce,ft as we,g as Te,gn as Ee,gt as De,h as Oe,hn as ke,ht as Ae,i as je,in as Me,it as Ne,j as Pe,jn as Fe,jt as Ie,k as Le,kn as Re,kt as ze,l as Be,ln as Ve,lt as He,m as Ue,mn as We,mt as Ge,n as Ke,nn as qe,nt as Je,o as Ye,on as Xe,ot as Ze,p as Qe,pn as $e,pt as et,q as tt,qt as nt,r as rt,rn as it,rt as at,s as ot,sn as st,st as ct,t as lt,tn as ut,tt as dt,u as ft,un as pt,ut as mt,v as ht,vt as gt,w as _t,x as vt,xt as yt,y as bt,yt as xt,z as St,zt as Ct}from"./src-Di342QoJ.js";lt();export{J as AlternateScreen,ie as Ansi,b as BaseBox,Z as BaseText,vt as Box,ne as Button,Oe as Byline,ae as CLEAR_ITERM2_PROGRESS,H as CLEAR_TAB_STATUS,t as CLEAR_TERMINAL_TITLE,W as ClickEvent,Me as DBP,ue as DFE,I as DISABLE_KITTY_KEYBOARD,Re as DISABLE_MODIFY_OTHER_KEYS,Xe as DISABLE_MOUSE_TRACKING,Pe as DOUBLE_PRESS_TIMEOUT_MS,Se as Dialog,Ue as Divider,st as ENABLE_MOUSE_TRACKING,he as ENTER_ALT_SCREEN,Ve as EXIT_ALT_SCREEN,Fe as Event,r as EventEmitter,ke as FocusEvent,We as FocusManager,ft as FuzzyPicker,pt as HIDE_CURSOR,P as Ink,u as InputEvent,at as KeybindingProvider,xe as KeybindingSetup,Ct as KeyboardEvent,Te as KeyboardShortcutHint,V as Link,_e as ListItem,Be as LoadingState,C as Newline,T as NoSelect,Qe as Pane,me as ProgressBar,ot as Ratchet,_ as RawAnsi,ve as SHOW_CURSOR,Q as ScrollBox,oe as SearchBox,tt as Spacer,Ye as StatusIcon,m as THEME_NAMES,d as THEME_SETTINGS,Ke as Tab,rt as Tabs,p as TerminalFocusEvent,o as TerminalSizeContext,B as TerminalWriteProvider,fe as Text,bt as TextHoverColorContext,G as ThemeProvider,A as applyColor,N as applyTextStyles,ye as chordToDisplayString,we as chordToString,Ce as clamp,ht as color,z as colorize,i as createRoot,ct as getBindingDisplayText,be as getClipboardPath,gt as getKeyName,$ as getTerminalFocusState,v as getTerminalFocused,L as getTheme,nt as hasCursorUpViewportYankBug,O as instances,w as isSynchronizedOutputSupported,re as isXtermJs,et as keystrokeToDisplayString,Ge as keystrokeToString,ge as keystrokesEqual,xt as matchesBinding,pe as matchesKeystroke,ee as measureElement,Ae as parseBindings,De as parseChord,ce as parseKeystroke,S as renderBorder,Ie as renderSync,He as resolveKey,mt as resolveKeyWithChordState,ut as setClipboard,s as setThemeConfigCallbacks,c as stringWidth,$e as styles,E as subscribeTerminalFocus,e as supportsHyperlinks,qe as supportsTabStatus,ze as themeColorToAnsi,a as useAnimationFrame,U as useAnimationTimer,y as useApp,l as useDeclaredCursor,k as useDoublePress,x as useHasSelection,yt as useInput,St as useInterval,dt as useKeybinding,Ne as useKeybindingContext,Je as useKeybindings,M as useMinDisplayTime,de as useOptionalKeybindingContext,_t as usePreviewTheme,Ze as useRegisterKeybindingContext,F as useSearchHighlight,D as useSelection,K as useStdin,je as useTabHeaderFocus,n as useTabStatus,le as useTabsWidth,Y as useTerminalFocus,g as useTerminalNotification,h as useTerminalSize,Le as useTerminalTitle,X as useTerminalViewport,q as useTheme,f as useThemeSetting,R as useTimeout,se as wrapAnsi,it as wrapForMultiplexer,Ee as wrapText,j as wrappedRender,te as writeDiffToTerminal};
@@ -0,0 +1 @@
1
+ import{n as e,r as t}from"./chunk-DR8-3Aex.js";var n=t({isModifierPressed:()=>a,prewarm:()=>i});async function r(){if(!(l||process.platform!==`darwin`)){l=!0;try{let e=await import(`bun:ffi`),t=e.dlopen(`/System/Library/Frameworks/Carbon.framework/Carbon`,{CGEventSourceFlagsState:{args:[e.FFIType.i32],returns:e.FFIType.u64}});c=e=>Number(t.symbols.CGEventSourceFlagsState(e))}catch{c=null}}}async function i(){await r()}function a(e){if(process.platform!==`darwin`||c===null)return!1;let t=o[e];return t===void 0?!1:(c(s)&t)!==0}var o,s,c,l,u=e((()=>{o={shift:131072,control:262144,option:524288,command:1048576},s=0,c=null,l=!1}));export{n as i,a as n,i as r,u as t};
@@ -0,0 +1 @@
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./defineProperty-80gRi2ZW.js";import{a as r,i,t as ee}from"./dist-es-C41b_0B5.js";import{A as te,C as ne,D as re,E as ie,F as ae,I as oe,L as se,M as ce,N as le,O as ue,P as de,R as fe,S as a,_ as o,a as pe,b as me,c as he,d as ge,f as _e,g as ve,h as ye,i as be,j as xe,k as Se,l as Ce,m as we,p as Te,r as Ee,s as De,t as Oe,u as ke,v as Ae,w as je,x as Me,y as Ne,z as Pe}from"./dist-es-Cbf0_D8d.js";import{C as Fe,S as Ie,c as Le,d as Re,f as s,g as ze,n as Be,t as c,v as Ve}from"./httpAuthSchemes-Wq4XWeLL.js";import{n as l,r as He,t as Ue}from"./dist-es-Bu_Fshi1.js";import{i as We,n as Ge,t as Ke}from"./dist-es-BVGppqE4.js";import{I as qe,L as Je,N as Ye,P as Xe,R as Ze,v as u,x as Qe,y as d,z as $e}from"./protocols-CAyQOlkr.js";import{n as et,t as tt}from"./dist-es-CSfI8B8l.js";import{a as nt,d as rt,g as it,h as at,i as ot,m as st,n as ct,o as lt,r as ut,t as f,u as p}from"./dist-es-OVleIB54.js";import{g as dt,i as ft,p as pt,t as mt}from"./client-CPn1wQyc.js";import{n as m,t as ht}from"./dist-es-zjcbuB72.js";import{a as gt,c as _t,d as vt,f as yt,i as bt,n as xt,o as St,s as Ct,t as h,u as wt}from"./dist-es-UAs0rdXg.js";import{n as Tt,t as Et}from"./package-BhL7chzt.js";function Dt(e){return{schemeId:`aws.auth#sigv4`,signingProperties:{name:`sso-oauth`,region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}function Ot(e){return{schemeId:`smithy.api#noAuth`}}var g,_,v,y=e((()=>{c(),Ue(),g=async(e,t,n)=>({operation:He(t).operation,region:await l(e.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),_=e=>{let t=[];switch(e.operation){case`CreateToken`:t.push(Ot(e));break;default:t.push(Dt(e))}return t},v=e=>{let t=Be(e);return Object.assign(t,{authSchemePreference:l(e.authSchemePreference??[])})}})),b,x,S=e((()=>{b=e=>Object.assign(e,{useDualstackEndpoint:e.useDualstackEndpoint??!1,useFipsEndpoint:e.useFipsEndpoint??!1,defaultSigningName:`sso-oauth`}),x={UseFIPS:{type:`builtInParams`,name:`useFipsEndpoint`},Endpoint:{type:`builtInParams`,name:`endpoint`},Region:{type:`builtInParams`,name:`region`},UseDualStack:{type:`builtInParams`,name:`useDualstackEndpoint`}}})),C,w,T,E,D,O,k,A,j,M,N,P,kt,F,At,jt,Mt=e((()=>{p(),C=`ref`,w=-1,T=!0,E=`isSet`,D=`PartitionResult`,O=`booleanEquals`,k=`getAttr`,A={[C]:`Endpoint`},j={[C]:D},M={},N=[{[C]:`Region`}],P={conditions:[[E,[A]],[E,N],[`aws.partition`,N,D],[O,[{[C]:`UseFIPS`},T]],[O,[{[C]:`UseDualStack`},T]],[O,[{fn:k,argv:[j,`supportsDualStack`]},T]],[O,[{fn:k,argv:[j,`supportsFIPS`]},T]],[`stringEquals`,[{fn:k,argv:[j,`name`]},`aws-us-gov`]]],results:[[w],[w,`Invalid Configuration: FIPS and custom endpoint are not supported`],[w,`Invalid Configuration: Dualstack and custom endpoint are not supported`],[A,M],[`https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}`,M],[w,`FIPS and DualStack are enabled, but this partition does not support one or both`],[`https://oidc.{Region}.amazonaws.com`,M],[`https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}`,M],[w,`FIPS is enabled but this partition does not support FIPS`],[`https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}`,M],[w,`DualStack is enabled but this partition does not support DualStack`],[`https://oidc.{Region}.{PartitionResult#dnsSuffix}`,M],[w,`Invalid Configuration: Missing Region`]]},kt=2,F=1e8,At=new Int32Array([-1,1,-1,0,13,3,1,4,F+12,2,5,F+12,3,8,6,4,7,F+11,5,F+9,F+10,4,11,9,6,10,F+8,7,F+6,F+7,5,12,F+5,6,F+4,F+5,3,F+1,14,4,F+2,F+3]),jt=it.from(At,kt,P.conditions,P.results)})),Nt,Pt,Ft=e((()=>{te(),p(),Mt(),Nt=new at({size:50,params:[`Endpoint`,`Region`,`UseDualStack`,`UseFIPS`]}),Pt=(e,t={})=>Nt.get(e,()=>rt(jt,{endpointParams:e,logger:t.logger})),st.aws=xe})),I,L=e((()=>{h(),I=class e extends _t{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}}})),It,Lt,Rt,zt,Bt,R,Vt,Ht,Ut,Wt,Gt,Kt=e((()=>{L(),t(),It=class e extends I{constructor(t){super({name:`AccessDeniedException`,$fault:`client`,...t}),n(this,`name`,`AccessDeniedException`),n(this,`$fault`,`client`),n(this,`error`,void 0),n(this,`reason`,void 0),n(this,`error_description`,void 0),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.reason=t.reason,this.error_description=t.error_description}},Lt=class e extends I{constructor(t){super({name:`AuthorizationPendingException`,$fault:`client`,...t}),n(this,`name`,`AuthorizationPendingException`),n(this,`$fault`,`client`),n(this,`error`,void 0),n(this,`error_description`,void 0),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},Rt=class e extends I{constructor(t){super({name:`ExpiredTokenException`,$fault:`client`,...t}),n(this,`name`,`ExpiredTokenException`),n(this,`$fault`,`client`),n(this,`error`,void 0),n(this,`error_description`,void 0),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},zt=class e extends I{constructor(t){super({name:`InternalServerException`,$fault:`server`,...t}),n(this,`name`,`InternalServerException`),n(this,`$fault`,`server`),n(this,`error`,void 0),n(this,`error_description`,void 0),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},Bt=class e extends I{constructor(t){super({name:`InvalidClientException`,$fault:`client`,...t}),n(this,`name`,`InvalidClientException`),n(this,`$fault`,`client`),n(this,`error`,void 0),n(this,`error_description`,void 0),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},R=class e extends I{constructor(t){super({name:`InvalidGrantException`,$fault:`client`,...t}),n(this,`name`,`InvalidGrantException`),n(this,`$fault`,`client`),n(this,`error`,void 0),n(this,`error_description`,void 0),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},Vt=class e extends I{constructor(t){super({name:`InvalidRequestException`,$fault:`client`,...t}),n(this,`name`,`InvalidRequestException`),n(this,`$fault`,`client`),n(this,`error`,void 0),n(this,`reason`,void 0),n(this,`error_description`,void 0),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.reason=t.reason,this.error_description=t.error_description}},Ht=class e extends I{constructor(t){super({name:`InvalidScopeException`,$fault:`client`,...t}),n(this,`name`,`InvalidScopeException`),n(this,`$fault`,`client`),n(this,`error`,void 0),n(this,`error_description`,void 0),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},Ut=class e extends I{constructor(t){super({name:`SlowDownException`,$fault:`client`,...t}),n(this,`name`,`SlowDownException`),n(this,`$fault`,`client`),n(this,`error`,void 0),n(this,`error_description`,void 0),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},Wt=class e extends I{constructor(t){super({name:`UnauthorizedClientException`,$fault:`client`,...t}),n(this,`name`,`UnauthorizedClientException`),n(this,`$fault`,`client`),n(this,`error`,void 0),n(this,`error_description`,void 0),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}},Gt=class e extends I{constructor(t){super({name:`UnsupportedGrantTypeException`,$fault:`client`,...t}),n(this,`name`,`UnsupportedGrantTypeException`),n(this,`$fault`,`client`),n(this,`error`,void 0),n(this,`error_description`,void 0),Object.setPrototypeOf(this,e.prototype),this.error=t.error,this.error_description=t.error_description}}})),qt,Jt,Yt,Xt,Zt,Qt,$t,en,tn,nn,rn,an,on,sn,cn,ln,un,dn,fn,pn,z,mn,hn,gn,_n,vn,B,yn,V,bn,xn,H,Sn,U,W,Cn,G,wn,Tn,En,K,q,Dn,J,On,kn,An,jn,Mn,Nn,Pn,Fn,In,Ln,Rn,zn,Bn,Vn,Hn,Un,Y,Wn,Gn,Kn,X=e((()=>{u(),Kt(),L(),qt=`AccessDeniedException`,Jt=`AuthorizationPendingException`,Yt=`AccessToken`,Xt=`ClientSecret`,Zt=`CreateToken`,Qt=`CreateTokenRequest`,$t=`CreateTokenResponse`,en=`CodeVerifier`,tn=`ExpiredTokenException`,nn=`InvalidClientException`,rn=`InvalidGrantException`,an=`InvalidRequestException`,on=`InternalServerException`,sn=`InvalidScopeException`,cn=`IdToken`,ln=`RefreshToken`,un=`SlowDownException`,dn=`UnauthorizedClientException`,fn=`UnsupportedGrantTypeException`,pn=`accessToken`,z=`client`,mn=`clientId`,hn=`clientSecret`,gn=`codeVerifier`,_n=`code`,vn=`deviceCode`,B=`error`,yn=`expiresIn`,V=`error_description`,bn=`grantType`,xn=`http`,H=`httpError`,Sn=`idToken`,U=`reason`,W=`refreshToken`,Cn=`redirectUri`,G=`smithy.ts.sdk.synthetic.com.amazonaws.ssooidc`,wn=`scope`,Tn=`server`,En=`tokenType`,K=`com.amazonaws.ssooidc`,q=d.for(G),Dn=[-3,G,`SSOOIDCServiceException`,0,[],[]],q.registerError(Dn,I),J=d.for(K),On=[-3,K,qt,{[B]:z,[H]:400},[B,U,V],[0,0,0]],J.registerError(On,It),kn=[-3,K,Jt,{[B]:z,[H]:400},[B,V],[0,0]],J.registerError(kn,Lt),An=[-3,K,tn,{[B]:z,[H]:400},[B,V],[0,0]],J.registerError(An,Rt),jn=[-3,K,on,{[B]:Tn,[H]:500},[B,V],[0,0]],J.registerError(jn,zt),Mn=[-3,K,nn,{[B]:z,[H]:401},[B,V],[0,0]],J.registerError(Mn,Bt),Nn=[-3,K,rn,{[B]:z,[H]:400},[B,V],[0,0]],J.registerError(Nn,R),Pn=[-3,K,an,{[B]:z,[H]:400},[B,U,V],[0,0,0]],J.registerError(Pn,Vt),Fn=[-3,K,sn,{[B]:z,[H]:400},[B,V],[0,0]],J.registerError(Fn,Ht),In=[-3,K,un,{[B]:z,[H]:400},[B,V],[0,0]],J.registerError(In,Ut),Ln=[-3,K,dn,{[B]:z,[H]:400},[B,V],[0,0]],J.registerError(Ln,Wt),Rn=[-3,K,fn,{[B]:z,[H]:400},[B,V],[0,0]],J.registerError(Rn,Gt),zn=[q,J],Bn=[0,K,Yt,8,0],Vn=[0,K,Xt,8,0],Hn=[0,K,en,8,0],Un=[0,K,cn,8,0],Y=[0,K,ln,8,0],Wn=[3,K,Qt,0,[mn,hn,bn,vn,_n,W,wn,Cn,gn],[0,[()=>Vn,0],0,0,0,[()=>Y,0],64,0,[()=>Hn,0]],3],Gn=[3,K,$t,0,[pn,En,yn,W,Sn],[[()=>Bn,0],0,1,[()=>Y,0],[()=>Un,0]]],Kn=[9,K,Zt,{[xn]:[`POST`,`/token`,200]},()=>Wn,()=>Gn]})),qn,Jn=e((()=>{c(),pe(),s(),h(),tt(),Je(),Ke(),y(),Ft(),X(),qn=e=>({apiVersion:`2019-06-10`,base64Decoder:e?.base64Decoder??$e,base64Encoder:e?.base64Encoder??Ze,disableHostPrefix:e?.disableHostPrefix??!1,endpointProvider:e?.endpointProvider??Pt,extensions:e?.extensions??[],httpAuthSchemeProvider:e?.httpAuthSchemeProvider??_,httpAuthSchemes:e?.httpAuthSchemes??[{schemeId:`aws.auth#sigv4`,identityProvider:e=>e.getIdentityProvider(`aws.auth#sigv4`),signer:new Re},{schemeId:`smithy.api#noAuth`,identityProvider:e=>e.getIdentityProvider(`smithy.api#noAuth`)||(async()=>({})),signer:new ze}],logger:e?.logger??new xt,protocol:e?.protocol??De,protocolSettings:e?.protocolSettings??{defaultNamespace:`com.amazonaws.ssooidc`,errorTypeRegistries:zn,version:`2019-06-10`,serviceTarget:`AWSSSOOIDCService`},serviceId:e?.serviceId??`SSO OIDC`,urlParser:e?.urlParser??et,utf8Decoder:e?.utf8Decoder??We,utf8Encoder:e?.utf8Encoder??Ge})})),Yn,Xn=e((()=>{Et(),mt(),c(),we(),f(),Te(),o(),ht(),Ye(),h(),ke(),he(),ft(),Jn(),Yn=e=>{St(process.version);let t=Ce(e),n=()=>t().then(Ct),r=qn(e);dt(process.version);let i={profile:e?.profile,logger:r.logger};return{...r,...e,runtime:`node`,defaultsMode:t,authSchemePreference:e?.authSchemePreference??m(Le,i),bodyLengthChecker:e?.bodyLengthChecker??ge,defaultUserAgentProvider:e?.defaultUserAgentProvider??ve({serviceId:r.serviceId,clientVersion:Tt.version}),maxAttempts:e?.maxAttempts??m(Ne,e),region:e?.region??m(ot,{...ut,...i}),requestHandler:qe.create(e?.requestHandler??n),retryMode:e?.retryMode??m({...me,default:async()=>(await n()).retryMode||pt},e),sha256:e?.sha256??_e.bind(null,`sha256`),streamCollector:e?.streamCollector??Xe,useDualstackEndpoint:e?.useDualstackEndpoint??m(lt,i),useFipsEndpoint:e?.useFipsEndpoint??m(nt,i),userAgentAppId:e?.userAgentAppId??m(ye,i)}}})),Zn,Qn,$n=e((()=>{Zn=e=>{let t=e.httpAuthSchemes,n=e.httpAuthSchemeProvider,r=e.credentials;return{setHttpAuthScheme(e){let n=t.findIndex(t=>t.schemeId===e.schemeId);n===-1?t.push(e):t.splice(n,1,e)},httpAuthSchemes(){return t},setHttpAuthSchemeProvider(e){n=e},httpAuthSchemeProvider(){return n},setCredentials(e){r=e},credentials(){return r}}},Qn=e=>({httpAuthSchemes:e.httpAuthSchemes(),httpAuthSchemeProvider:e.httpAuthSchemeProvider(),credentials:e.credentials()})})),er,tr=e((()=>{Oe(),ee(),h(),$n(),er=(e,t)=>{let n=Object.assign(Ee(e),bt(e),i(e),Zn(e));return t.forEach(e=>e.configure(n)),Object.assign(e,be(n),gt(n),r(n),Qn(n))}})),Z,nr=e((()=>{fe(),ae(),le(),ue(),f(),s(),u(),re(),a(),o(),h(),y(),S(),Xn(),tr(),t(),Z=class extends yt{constructor(...[e]){let t=Yn(e||{});super(t),n(this,`config`,void 0),this.initConfig=t,this.config=er(v(ne(Pe(ct(Me(ce(b(t))))))),e?.extensions||[]),this.middlewareStack.use(Qe(this.config)),this.middlewareStack.use(Se(this.config)),this.middlewareStack.use(Ae(this.config)),this.middlewareStack.use(ie(this.config)),this.middlewareStack.use(se(this.config)),this.middlewareStack.use(oe(this.config)),this.middlewareStack.use(de(this.config)),this.middlewareStack.use(Fe(this.config,{httpAuthSchemeParametersProvider:g,identityProviderConfigProvider:async e=>new Ve({"aws.auth#sigv4":e.credentials})})),this.middlewareStack.use(Ie(this.config))}destroy(){super.destroy()}}})),Q,rr=e((()=>{a(),h(),S(),X(),Q=class extends vt.classBuilder().ep(x).m(function(e,t,n,r){return[je(n,e.getEndpointParameterInstructions())]}).s(`AWSSSOOIDCService`,`CreateToken`,{}).n(`SSOOIDCClient`,`CreateTokenCommand`).sc(Kn).build(){}})),ir,$,ar=e((()=>{h(),rr(),nr(),ir={CreateTokenCommand:Q},$=class extends Z{},wt(ir,$)})),or=e((()=>{rr()})),sr=e((()=>{})),cr=e((()=>{}));e((()=>{nr(),ar(),or(),X(),sr(),Kt(),cr(),L()}))();export{Q as CreateTokenCommand,Z as SSOOIDCClient};
@@ -0,0 +1,3 @@
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,s as n,u as r}from"./envUtils-BWeoiL4Y.js";import{n as i,t as a}from"./defineProperty-80gRi2ZW.js";import{Cn as o,t as s}from"./src-Di342QoJ.js";import{Ct as ee,cn as te}from"./state-sIHsFpDu.js";import{O as c,d as l,h as u,p as ne,s as re,w as d}from"./debug-UI3T040K.js";import{n as f,r as p}from"./analytics-DqMQntaB.js";import{a as m,n as h,r as g,s as _}from"./intl-Pse97ORk.js";import{dirname as ie,join as v}from"path";function y(e,t){if(o(e)<=t)return e;if(t<=0)return`…`;if(t<5)return b(e,t);let n=e.lastIndexOf(`/`),r=n>=0?e.slice(n):e,i=n>=0?e.slice(0,n):``,a=o(r);if(a>=t-1)return x(e,t);let s=t-1-a;return s<=0?x(r,t):S(i,s)+`…`+r}function b(e,t){if(o(e)<=t)return e;if(t<=1)return`…`;let n=0,r=``;for(let{segment:i}of h().segment(e)){let e=o(i);if(n+e>t-1)break;r+=i,n+=e}return r+`…`}function x(e,t){if(o(e)<=t)return e;if(t<=1)return`…`;let n=[...h().segment(e)],r=0,i=n.length;for(let e=n.length-1;e>=0;e--){let a=o(n[e].segment);if(r+a>t-1)break;r+=a,i=e}return`…`+n.slice(i).map(e=>e.segment).join(``)}function S(e,t){if(o(e)<=t)return e;if(t<=0)return``;let n=0,r=``;for(let{segment:i}of h().segment(e)){let e=o(i);if(n+e>t)break;r+=i,n+=e}return r}function C(e,t,n=!1){if(e==null)return``;let r=e;if(n){let n=e.indexOf(`
2
+ `);if(n!==-1)return r=e.substring(0,n),o(r)+1>t?b(r,t):`${r}…`}return o(r)<=t?r:b(r,t)}var w=e((()=>{s(),_()}));function T(e){let t=e/1024;if(t<1)return`${e} bytes`;if(t<1024)return`${t.toFixed(1).replace(/\.0$/,``)}KB`;let n=t/1024;return n<1024?`${n.toFixed(1).replace(/\.0$/,``)}MB`:`${(n/1024).toFixed(1).replace(/\.0$/,``)}GB`}function ae(e){return`${(e/1e3).toFixed(1)}s`}function E(e,t){if(e<6e4)return e===0?`0s`:e<1?`${(e/1e3).toFixed(1)}s`:`${Math.floor(e/1e3).toString()}s`;let n=Math.floor(e/864e5),r=Math.floor(e%864e5/36e5),i=Math.floor(e%36e5/6e4),a=Math.round(e%6e4/1e3);a===60&&(a=0,i++),i===60&&(i=0,r++),r===24&&(r=0,n++);let o=t?.hideTrailingZeros;return t?.mostSignificantOnly?n>0?`${n}d`:r>0?`${r}h`:i>0?`${i}m`:`${a}s`:n>0?o&&r===0&&i===0?`${n}d`:o&&i===0?`${n}d ${r}h`:`${n}d ${r}h ${i}m`:r>0?o&&i===0&&a===0?`${r}h`:o&&a===0?`${r}h ${i}m`:`${r}h ${i}m ${a}s`:i>0?o&&a===0?`${i}m`:`${i}m ${a}s`:`${a}s`}function D(e){return P(e>=1e3).format(e).toLowerCase()}function O(e){return D(e).replace(`.0`,``)}function k(e,t={}){let{style:n=`narrow`,numeric:r=`always`,now:i=new Date}=t,a=e.getTime()-i.getTime(),o=Math.trunc(a/1e3);for(let{unit:e,seconds:t,shortUnit:i}of[{unit:`year`,seconds:31536e3,shortUnit:`y`},{unit:`month`,seconds:2592e3,shortUnit:`mo`},{unit:`week`,seconds:604800,shortUnit:`w`},{unit:`day`,seconds:86400,shortUnit:`d`},{unit:`hour`,seconds:3600,shortUnit:`h`},{unit:`minute`,seconds:60,shortUnit:`m`},{unit:`second`,seconds:1,shortUnit:`s`}])if(Math.abs(o)>=t){let a=Math.trunc(o/t);return n===`narrow`?o<0?`${Math.abs(a)}${i} ago`:`in ${a}${i}`:g(`long`,r).format(a,e)}return n===`narrow`?o<=0?`0s ago`:`in 0s`:g(n,r).format(0,`second`)}function A(e,t={}){let{now:n=new Date,...r}=t;return e>n?k(e,{...r,now:n}):k(e,{...r,numeric:`always`,now:n})}function oe(e){let t=e.fileSize===void 0?`${e.messageCount} messages`:T(e.fileSize),n=[A(e.modified,{style:`short`}),...e.gitBranch?[e.gitBranch]:[],t];return e.tag&&n.push(`#${e.tag}`),e.agentSetting&&n.push(`@${e.agentSetting}`),e.prNumber&&n.push(e.prRepository?`${e.prRepository}#${e.prNumber}`:`#${e.prNumber}`),n.join(` · `)}function j(e,t=!1,n=!0){if(!e)return;let r=new Date(e*1e3),i=new Date,a=r.getMinutes();if((r.getTime()-i.getTime())/(1e3*60*60)>24){let e={month:`short`,day:`numeric`,hour:n?`numeric`:void 0,minute:!n||a===0?void 0:`2-digit`,hour12:n?!0:void 0};return r.getFullYear()!==i.getFullYear()&&(e.year=`numeric`),r.toLocaleString(`en-US`,e).replace(/ ([AP]M)/i,(e,t)=>t.toLowerCase())+(t?` (${m()})`:``)}return r.toLocaleTimeString(`en-US`,{hour:`numeric`,minute:a===0?void 0:`2-digit`,hour12:!0}).replace(/ ([AP]M)/i,(e,t)=>t.toLowerCase())+(t?` (${m()})`:``)}function se(e,t=!1,n=!0){let r=new Date(e);return`${j(Math.floor(r.getTime()/1e3),t,n)}`}var M,N,P,F=e((()=>{_(),w(),M=null,N=null,P=e=>e?(M||(M=new Intl.NumberFormat(`en-US`,{notation:`compact`,maximumFractionDigits:1,minimumFractionDigits:1})),M):(N||(N=new Intl.NumberFormat(`en-US`,{notation:`compact`,maximumFractionDigits:1,minimumFractionDigits:0})),N)}));function I(){return B}function L(e){return e.toFixed(3)}function R(e,t,n,r,i,a,o=``){let s=r?` | RSS: ${T(r.rss)}, Heap: ${T(r.heapUsed)}`:``;return`[+${L(e).padStart(i)}ms] (+${L(t).padStart(a)}ms) ${n}${o}${s}`}var z,B,V=e((()=>{F(),i(),z=class{constructor(){a(this,`marks`,new Map),a(this,`_origin`,void 0),this._origin=Number(process.hrtime.bigint()/1000n)/1e3}mark(e){this.marks.set(e,this.now())}getEntriesByType(e){if(e!==`mark`)return[];let t=[];for(let[e,n]of this.marks)t.push({name:e,startTime:n,entryType:`mark`});return t}clearMarks(e){e===void 0?this.marks.clear():this.marks.delete(e)}now(){return Number(process.hrtime.bigint()/1000n)/1e3-this._origin}},B=new z}));function H(e){X&&(I().mark(e),J&&Z.push(process.memoryUsage()))}function U(){if(!J)return`Startup profiling not enabled`;let e=I().getEntriesByType(`mark`);if(e.length===0)return`No profiling checkpoints recorded`;let t=[];t.push(`=`.repeat(80)),t.push(`STARTUP PROFILING REPORT`),t.push(`=`.repeat(80)),t.push(``);let n=0;for(let[r,i]of e.entries())t.push(R(i.startTime,i.startTime-n,i.name,Z[r],8,7)),n=i.startTime;let r=e[e.length-1];return t.push(``),t.push(`Total startup time: ${L(r?.startTime??0)}ms`),t.push(`=`.repeat(80)),t.join(`
3
+ `)}function W(){if(!$){if($=!0,q(),J){let e=K(),t=ie(e);ne().mkdirSync(t),c(e,U(),{encoding:`utf8`,flush:!0}),l(`Startup profiling report:`),l(U())}I().clearMarks(),Z.length=0}}function G(){return J}function K(){return v(t(),`startup-perf`,`${ee()}.txt`)}function q(){if(!Y)return;let e=I().getEntriesByType(`mark`);if(e.length===0)return;let t=new Map;for(let n of e)t.set(n.name,n.startTime);let n={};for(let[e,[r,i]]of Object.entries(Q)){let a=t.get(r),o=t.get(i);a!==void 0&&o!==void 0&&(n[`${e}_ms`]=Math.round(o-a))}n.checkpoint_count=e.length,p(`tengu_startup_perf`,n)}var J,Y,X,Z,Q,$,ce=e((()=>{te(),f(),re(),n(),u(),V(),d(),J=r(process.env.CLAUDE_CODE_PROFILE_STARTUP),Y=process.env.USER_TYPE===`ant`||Math.random()<.005,X=J||Y,Z=[],Q={import_time:[`cli_entry`,`main_tsx_imports_loaded`],init_time:[`init_function_start`,`init_function_end`],settings_time:[`eagerLoadSettings_start`,`eagerLoadSettings_end`],total_time:[`cli_entry`,`main_after_run`]},X&&H(`profiler_initialized`),$=!1}));export{C,S as D,b as E,w as S,x as T,se as _,H as a,O as b,R as c,E as d,T as f,A as g,k as h,q as i,I as l,D as m,ce as n,W as o,oe as p,G as r,L as s,K as t,V as u,j as v,y as w,F as x,ae as y};
@@ -0,0 +1 @@
1
+ import{a as e,n as t}from"./startupProfiler-DnXZaX4A.js";t();export{e as profileCheckpoint};
@@ -0,0 +1 @@
1
+ import{Ct as e,Mn as t,cn as n,lr as r,t as i}from"./state-sIHsFpDu.js";n();export{i as addInvokedSkill,e as getSessionId,t as setCwdState,r as setOriginalCwd};
@@ -0,0 +1 @@
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,s as n}from"./envUtils-BWeoiL4Y.js";import{dirname as r,join as i}from"path";import{mkdirSync as a,readFileSync as o,unlinkSync as s,writeFileSync as c}from"fs";function l(e=`remote-control`){return i(t(),`daemon`,`${e}.json`)}function u(e,t=`remote-control`){let n=l(t);a(r(n),{recursive:!0}),c(n,JSON.stringify(e,null,2),`utf-8`)}function d(e=`remote-control`){let t=l(e);try{let e=o(t,`utf-8`);return JSON.parse(e)}catch{return null}}function f(e=`remote-control`){let t=l(e);try{s(t)}catch{}}function p(e){try{return process.kill(e,0),!0}catch{return!1}}function m(e=`remote-control`){let t=d(e);return t?p(t.pid)?{status:`running`,state:t}:(f(e),{status:`stale`}):{status:`stopped`}}async function h(e=`remote-control`,t=1e4){let n=d(e);if(!n)return!1;let{pid:r}=n;if(!p(r))return f(e),!1;try{process.kill(r,`SIGTERM`)}catch{return f(e),!1}let i=Date.now()+t;for(;Date.now()<i;){if(!p(r))return f(e),!0;await new Promise(e=>setTimeout(e,200))}try{process.kill(r,`SIGKILL`)}catch{}return await new Promise(e=>setTimeout(e,500)),f(e),!0}var g=e((()=>{n()}));export{u as a,h as i,m as n,f as r,g as t};
@@ -0,0 +1 @@
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{a as t,c as n,i as r,l as i,n as a,o,r as s,s as c,t as l,u}from"./isObject-DaxDnPKm.js";import{a as d,c as f,d as p,f as m,g as h,h as g,i as _,l as v,m as y,n as ee,o as te,p as ne,r as re,s as ie,t as ae,u as oe}from"./memoize-DNnuA2aU.js";import{i as b,n as se,r as x,t as ce}from"./isSymbol-Dp3irZaY.js";import{realpathSync as le}from"fs";import{randomUUID as ue}from"crypto";import{cwd as de}from"process";function fe(){this.__data__=new ie,this.size=0}var pe=e((()=>{f()}));function me(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}var he=e((()=>{}));function ge(e){return this.__data__.get(e)}var _e=e((()=>{}));function ve(e){return this.__data__.has(e)}var ye=e((()=>{}));function be(e,t){var n=this.__data__;if(n instanceof ie){var r=n.__data__;if(!d||r.length<xe-1)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new re(r)}return n.set(e,t),this.size=n.size,this}var xe,Se=e((()=>{f(),te(),_(),xe=200}));function S(e){this.size=(this.__data__=new ie(e)).size}var Ce=e((()=>{f(),pe(),he(),_e(),ye(),Se(),S.prototype.clear=fe,S.prototype.delete=me,S.prototype.get=ge,S.prototype.has=ve,S.prototype.set=be}));function we(e){return this.__data__.set(e,Te),this}var Te,Ee=e((()=>{Te=`__lodash_hash_undefined__`}));function De(e){return this.__data__.has(e)}var Oe=e((()=>{}));function C(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new re;++t<n;)this.add(e[t])}var ke=e((()=>{_(),Ee(),Oe(),C.prototype.add=C.prototype.push=we,C.prototype.has=De}));function Ae(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var je=e((()=>{}));function Me(e,t){return e.has(t)}var Ne=e((()=>{}));function Pe(e,t,n,r,i,a){var o=n&Fe,s=e.length,c=t.length;if(s!=c&&!(o&&c>s))return!1;var l=a.get(e),u=a.get(t);if(l&&u)return l==t&&u==e;var d=-1,f=!0,p=n&Ie?new C:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var m=e[d],h=t[d];if(r)var g=o?r(h,m,d,t,e,a):r(m,h,d,e,t,a);if(g!==void 0){if(g)continue;f=!1;break}if(p){if(!Ae(t,function(e,t){if(!Me(p,t)&&(m===e||i(m,e,n,r,a)))return p.push(t)})){f=!1;break}}else if(!(m===h||i(m,h,n,r,a))){f=!1;break}}return a.delete(e),a.delete(t),f}var Fe,Ie,Le=e((()=>{ke(),je(),Ne(),Fe=1,Ie=2})),w,Re=e((()=>{c(),w=n.Uint8Array}));function ze(e){var t=-1,n=Array(e.size);return e.forEach(function(e,r){n[++t]=[r,e]}),n}var Be=e((()=>{}));function Ve(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}var He=e((()=>{}));function Ue(e,t,n,r,i,a,o){switch(n){case nt:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case tt:return!(e.byteLength!=t.byteLength||!a(new w(e),new w(t)));case Ke:case qe:case Xe:return v(+e,+t);case Je:return e.name==t.name&&e.message==t.message;case Ze:case $e:return e==t+``;case Ye:var s=ze;case Qe:var c=r&We;if(s||(s=Ve),e.size!=t.size&&!c)return!1;var l=o.get(e);if(l)return l==t;r|=Ge,o.set(e,t);var u=Pe(s(e),s(t),r,i,a,o);return o.delete(e),u;case et:if(T)return T.call(e)==T.call(t)}return!1}var We,Ge,Ke,qe,Je,Ye,Xe,Ze,Qe,$e,et,tt,nt,rt,T,it=e((()=>{o(),Re(),oe(),Le(),Be(),He(),We=1,Ge=2,Ke=`[object Boolean]`,qe=`[object Date]`,Je=`[object Error]`,Ye=`[object Map]`,Xe=`[object Number]`,Ze=`[object RegExp]`,Qe=`[object Set]`,$e=`[object String]`,et=`[object Symbol]`,tt=`[object ArrayBuffer]`,nt=`[object DataView]`,rt=t?t.prototype:void 0,T=rt?rt.valueOf:void 0}));function at(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}var ot=e((()=>{})),E,D=e((()=>{E=Array.isArray}));function st(e,t,n){var r=t(e);return E(e)?r:at(r,n(e))}var ct=e((()=>{ot(),D()}));function lt(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}var ut=e((()=>{}));function dt(){return[]}var ft=e((()=>{})),pt,mt,ht,gt=e((()=>{ut(),ft(),pt=Object.prototype.propertyIsEnumerable,mt=Object.getOwnPropertySymbols,ht=mt?function(e){return e==null?[]:(e=Object(e),lt(mt(e),function(t){return pt.call(e,t)}))}:dt}));function _t(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}var vt=e((()=>{}));function yt(e){return b(e)&&s(e)==bt}var bt,xt=e((()=>{r(),x(),bt=`[object Arguments]`})),St,Ct,wt,O,Tt=e((()=>{xt(),x(),St=Object.prototype,Ct=St.hasOwnProperty,wt=St.propertyIsEnumerable,O=yt(function(){return arguments}())?yt:function(e){return b(e)&&Ct.call(e,`callee`)&&!wt.call(e,`callee`)}}));function Et(){return!1}var Dt=e((()=>{})),Ot,kt,At,k,jt=e((()=>{c(),Dt(),Ot=typeof exports==`object`&&exports&&!exports.nodeType&&exports,kt=Ot&&typeof module==`object`&&module&&!module.nodeType&&module,At=kt&&kt.exports===Ot?n.Buffer:void 0,k=(At?At.isBuffer:void 0)||Et}));function Mt(e,t){var n=typeof e;return t=t??Nt,!!t&&(n==`number`||n!=`symbol`&&Pt.test(e))&&e>-1&&e%1==0&&e<t}var Nt,Pt,A=e((()=>{Nt=9007199254740991,Pt=/^(?:0|[1-9]\d*)$/}));function j(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=Ft}var Ft,It=e((()=>{Ft=9007199254740991}));function Lt(e){return b(e)&&j(e.length)&&!!M[s(e)]}var Rt,zt,Bt,Vt,Ht,Ut,Wt,Gt,Kt,qt,Jt,Yt,Xt,Zt,Qt,$t,en,tn,nn,rn,an,on,sn,cn,M,ln=e((()=>{r(),It(),x(),Rt=`[object Arguments]`,zt=`[object Array]`,Bt=`[object Boolean]`,Vt=`[object Date]`,Ht=`[object Error]`,Ut=`[object Function]`,Wt=`[object Map]`,Gt=`[object Number]`,Kt=`[object Object]`,qt=`[object RegExp]`,Jt=`[object Set]`,Yt=`[object String]`,Xt=`[object WeakMap]`,Zt=`[object ArrayBuffer]`,Qt=`[object DataView]`,$t=`[object Float32Array]`,en=`[object Float64Array]`,tn=`[object Int8Array]`,nn=`[object Int16Array]`,rn=`[object Int32Array]`,an=`[object Uint8Array]`,on=`[object Uint8ClampedArray]`,sn=`[object Uint16Array]`,cn=`[object Uint32Array]`,M={},M[$t]=M[en]=M[tn]=M[nn]=M[rn]=M[an]=M[on]=M[sn]=M[cn]=!0,M[Rt]=M[zt]=M[Zt]=M[Bt]=M[Qt]=M[Vt]=M[Ht]=M[Ut]=M[Wt]=M[Gt]=M[Kt]=M[qt]=M[Jt]=M[Yt]=M[Xt]=!1}));function un(e){return function(t){return e(t)}}var dn=e((()=>{})),fn,N,P,F,pn=e((()=>{u(),fn=typeof exports==`object`&&exports&&!exports.nodeType&&exports,N=fn&&typeof module==`object`&&module&&!module.nodeType&&module,P=N&&N.exports===fn&&i.process,F=function(){try{return N&&N.require&&N.require(`util`).types||P&&P.binding&&P.binding(`util`)}catch{}}()})),mn,I,hn=e((()=>{ln(),dn(),pn(),mn=F&&F.isTypedArray,I=mn?un(mn):Lt}));function gn(e,t){var n=E(e),r=!n&&O(e),i=!n&&!r&&k(e),a=!n&&!r&&!i&&I(e),o=n||r||i||a,s=o?_t(e.length,String):[],c=s.length;for(var l in e)(t||_n.call(e,l))&&!(o&&(l==`length`||i&&(l==`offset`||l==`parent`)||a&&(l==`buffer`||l==`byteLength`||l==`byteOffset`)||Mt(l,c)))&&s.push(l);return s}var _n,vn=e((()=>{vt(),Tt(),D(),jt(),A(),hn(),_n=Object.prototype.hasOwnProperty}));function yn(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||bn)}var bn,xn=e((()=>{bn=Object.prototype}));function Sn(e,t){return function(n){return e(t(n))}}var Cn=e((()=>{})),wn,Tn=e((()=>{Cn(),wn=Sn(Object.keys,Object)}));function En(e){if(!yn(e))return wn(e);var t=[];for(var n in Object(e))Dn.call(e,n)&&n!=`constructor`&&t.push(n);return t}var Dn,On=e((()=>{xn(),Tn(),Dn=Object.prototype.hasOwnProperty}));function kn(e){return e!=null&&j(e.length)&&!h(e)}var An=e((()=>{g(),It()}));function L(e){return kn(e)?gn(e):En(e)}var jn=e((()=>{vn(),On(),An()}));function Mn(e){return st(e,L,ht)}var Nn=e((()=>{ct(),gt(),jn()}));function Pn(e,t,n,r,i,a){var o=n&Fn,s=Mn(e),c=s.length;if(c!=Mn(t).length&&!o)return!1;for(var l=c;l--;){var u=s[l];if(!(o?u in t:In.call(t,u)))return!1}var d=a.get(e),f=a.get(t);if(d&&f)return d==t&&f==e;var p=!0;a.set(e,t),a.set(t,e);for(var m=o;++l<c;){u=s[l];var h=e[u],g=t[u];if(r)var _=o?r(g,h,u,t,e,a):r(h,g,u,e,t,a);if(!(_===void 0?h===g||i(h,g,n,r,a):_)){p=!1;break}m||(m=u==`constructor`)}if(p&&!m){var v=e.constructor,y=t.constructor;v!=y&&`constructor`in e&&`constructor`in t&&!(typeof v==`function`&&v instanceof v&&typeof y==`function`&&y instanceof y)&&(p=!1)}return a.delete(e),a.delete(t),p}var Fn,In,Ln=e((()=>{Nn(),Fn=1,In=Object.prototype.hasOwnProperty})),R,Rn=e((()=>{m(),c(),R=p(n,`DataView`)})),z,zn=e((()=>{m(),c(),z=p(n,`Promise`)})),B,Bn=e((()=>{m(),c(),B=p(n,`Set`)})),V,Vn=e((()=>{m(),c(),V=p(n,`WeakMap`)})),Hn,Un,Wn,Gn,Kn,qn,Jn,Yn,Xn,Zn,Qn,H,U,$n=e((()=>{Rn(),te(),zn(),Bn(),Vn(),r(),ne(),Hn=`[object Map]`,Un=`[object Object]`,Wn=`[object Promise]`,Gn=`[object Set]`,Kn=`[object WeakMap]`,qn=`[object DataView]`,Jn=y(R),Yn=y(d),Xn=y(z),Zn=y(B),Qn=y(V),H=s,(R&&H(new R(new ArrayBuffer(1)))!=qn||d&&H(new d)!=Hn||z&&H(z.resolve())!=Wn||B&&H(new B)!=Gn||V&&H(new V)!=Kn)&&(H=function(e){var t=s(e),n=t==Un?e.constructor:void 0,r=n?y(n):``;if(r)switch(r){case Jn:return qn;case Yn:return Hn;case Xn:return Wn;case Zn:return Gn;case Qn:return Kn}return t}),U=H}));function er(e,t,n,r,i,a){var o=E(e),s=E(t),c=o?rr:U(e),l=s?rr:U(t);c=c==nr?W:c,l=l==nr?W:l;var u=c==W,d=l==W,f=c==l;if(f&&k(e)){if(!k(t))return!1;o=!0,u=!1}if(f&&!u)return a||(a=new S),o||I(e)?Pe(e,t,n,r,i,a):Ue(e,t,c,n,r,i,a);if(!(n&tr)){var p=u&&ir.call(e,`__wrapped__`),m=d&&ir.call(t,`__wrapped__`);if(p||m){var h=p?e.value():e,g=m?t.value():t;return a||(a=new S),i(h,g,n,r,a)}}return f?(a||(a=new S),Pn(e,t,n,r,i,a)):!1}var tr,nr,rr,W,ir,ar=e((()=>{Ce(),Le(),it(),Ln(),$n(),D(),jt(),hn(),tr=1,nr=`[object Arguments]`,rr=`[object Array]`,W=`[object Object]`,ir=Object.prototype.hasOwnProperty}));function G(e,t,n,r,i){return e===t?!0:e==null||t==null||!b(e)&&!b(t)?e!==e&&t!==t:er(e,t,n,r,G,i)}var or=e((()=>{ar(),x()}));function sr(e,t,n,r){var i=n.length,a=i,o=!r;if(e==null)return!a;for(e=Object(e);i--;){var s=n[i];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<a;){s=n[i];var c=s[0],l=e[c],u=s[1];if(o&&s[2]){if(l===void 0&&!(c in e))return!1}else{var d=new S;if(r)var f=r(l,u,c,e,t,d);if(!(f===void 0?G(u,l,cr|lr,r,d):f))return!1}}return!0}var cr,lr,ur=e((()=>{Ce(),or(),cr=1,lr=2}));function dr(e){return e===e&&!a(e)}var fr=e((()=>{l()}));function pr(e){for(var t=L(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,dr(i)]}return t}var mr=e((()=>{fr(),jn()}));function hr(e,t){return function(n){return n==null?!1:n[e]===t&&(t!==void 0||e in Object(n))}}var gr=e((()=>{}));function _r(e){var t=pr(e);return t.length==1&&t[0][2]?hr(t[0][0],t[0][1]):function(n){return n===e||sr(n,e,t)}}var vr=e((()=>{ur(),mr(),gr()}));function yr(e,t){if(E(e))return!1;var n=typeof e;return n==`number`||n==`symbol`||n==`boolean`||e==null||se(e)?!0:xr.test(e)||!br.test(e)||t!=null&&e in Object(t)}var br,xr,Sr=e((()=>{D(),ce(),br=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,xr=/^\w*$/}));function Cr(e){var t=ee(e,function(e){return n.size===wr&&n.clear(),e}),n=t.cache;return t}var wr,Tr=e((()=>{ae(),wr=500})),Er,Dr,Or,kr=e((()=>{Tr(),Er=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Dr=/\\(\\)?/g,Or=Cr(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(Er,function(e,n,r,i){t.push(r?i.replace(Dr,`$1`):n||e)}),t})}));function Ar(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}var jr=e((()=>{}));function Mr(e){if(typeof e==`string`)return e;if(E(e))return Ar(e,Mr)+``;if(se(e))return Fr?Fr.call(e):``;var t=e+``;return t==`0`&&1/e==-Nr?`-0`:t}var Nr,Pr,Fr,Ir=e((()=>{o(),jr(),D(),ce(),Nr=1/0,Pr=t?t.prototype:void 0,Fr=Pr?Pr.toString:void 0}));function Lr(e){return e==null?``:Mr(e)}var Rr=e((()=>{Ir()}));function zr(e,t){return E(e)?e:yr(e,t)?[e]:Or(Lr(e))}var Br=e((()=>{D(),Sr(),kr(),Rr()}));function K(e){if(typeof e==`string`||se(e))return e;var t=e+``;return t==`0`&&1/e==-Vr?`-0`:t}var Vr,q=e((()=>{ce(),Vr=1/0}));function Hr(e,t){t=zr(t,e);for(var n=0,r=t.length;e!=null&&n<r;)e=e[K(t[n++])];return n&&n==r?e:void 0}var Ur=e((()=>{Br(),q()}));function Wr(e,t,n){var r=e==null?void 0:Hr(e,t);return r===void 0?n:r}var Gr=e((()=>{Ur()}));function Kr(e,t){return e!=null&&t in Object(e)}var qr=e((()=>{}));function Jr(e,t,n){t=zr(t,e);for(var r=-1,i=t.length,a=!1;++r<i;){var o=K(t[r]);if(!(a=e!=null&&n(e,o)))break;e=e[o]}return a||++r!=i?a:(i=e==null?0:e.length,!!i&&j(i)&&Mt(o,i)&&(E(e)||O(e)))}var Yr=e((()=>{Br(),Tt(),D(),A(),It(),q()}));function Xr(e,t){return e!=null&&Jr(e,t,Kr)}var Zr=e((()=>{qr(),Yr()}));function Qr(e,t){return yr(e)&&dr(t)?hr(K(e),t):function(n){var r=Wr(n,e);return r===void 0&&r===t?Xr(n,e):G(t,r,$r|ei)}}var $r,ei,ti=e((()=>{or(),Gr(),Zr(),Sr(),fr(),gr(),q(),$r=1,ei=2}));function ni(e){return e}var ri=e((()=>{}));function ii(e){return function(t){return t?.[e]}}var ai=e((()=>{}));function oi(e){return function(t){return Hr(t,e)}}var si=e((()=>{Ur()}));function ci(e){return yr(e)?ii(K(e)):oi(e)}var li=e((()=>{ai(),si(),Sr(),q()}));function ui(e){return typeof e==`function`?e:e==null?ni:typeof e==`object`?E(e)?Qr(e[0],e[1]):_r(e):ci(e)}var di=e((()=>{vr(),ti(),ri(),D(),li()}));function fi(e,t){for(var n,r=-1,i=e.length;++r<i;){var a=t(e[r]);a!==void 0&&(n=n===void 0?a:n+a)}return n}var pi=e((()=>{}));function J(e,t){return e&&e.length?fi(e,ui(t,2)):0}var mi=e((()=>{di(),pi()})),hi=e((()=>{}));function gi(){return Y}function _i(e){Y=e}function vi(e){return X.has(e)?X.get(e):void 0}function yi(e,t){X.set(e,t)}function bi(e){return Z.get(e)}function xi(e,t){Z.set(e,t)}function Si(){Y=null,X.clear(),Z.clear()}function Ci(){return Ei}function wi(e){Ei=e}function Ti(){Ei=void 0}var Y,X,Z,Ei,Di=e((()=>{Y=null,X=new Map,Z=new Map}));function Oi(){let e=new Set;return{subscribe(t){return e.add(t),()=>{e.delete(t)}},emit(...t){for(let n of e)n(...t)},clear(){e.clear()}}}var ki=e((()=>{}));function Ai(){let e=``;if(typeof process<`u`&&typeof process.cwd==`function`&&typeof le==`function`){let t=de();try{e=le(t).normalize(`NFC`)}catch{e=t.normalize(`NFC`)}}return{originalCwd:e,projectRoot:e,totalCostUSD:0,totalAPIDuration:0,totalAPIDurationWithoutRetries:0,totalToolDuration:0,turnHookDurationMs:0,turnToolDurationMs:0,turnClassifierDurationMs:0,turnToolCount:0,turnHookCount:0,turnClassifierCount:0,startTime:Date.now(),lastInteractionTime:Date.now(),totalLinesAdded:0,totalLinesRemoved:0,hasUnknownModelCost:!1,cwd:e,modelUsage:{},mainLoopModelOverride:void 0,initialMainLoopModel:null,modelStrings:null,isInteractive:!1,kairosActive:!1,strictToolResultPairing:!1,sdkAgentProgressSummariesEnabled:!1,userMsgOptIn:!1,clientType:`cli`,sessionSource:void 0,questionPreviewFormat:void 0,sessionIngressToken:void 0,oauthTokenFromFd:void 0,apiKeyFromFd:void 0,flagSettingsPath:void 0,flagSettingsInline:null,allowedSettingSources:[`userSettings`,`projectSettings`,`localSettings`,`flagSettings`,`policySettings`],meter:null,sessionCounter:null,locCounter:null,prCounter:null,commitCounter:null,costCounter:null,tokenCounter:null,codeEditToolDecisionCounter:null,activeTimeCounter:null,statsStore:null,sessionId:ue(),parentSessionId:void 0,loggerProvider:null,eventLogger:null,meterProvider:null,tracerProvider:null,agentColorMap:new Map,agentColorIndex:0,lastAPIRequest:null,lastAPIRequestMessages:null,lastClassifierRequests:null,cachedClaudeMdContent:null,inMemoryErrorLog:[],inlinePlugins:[],chromeFlagOverride:void 0,useCoworkPlugins:!1,sessionBypassPermissionsMode:!1,scheduledTasksEnabled:!1,sessionCronTasks:[],sessionCreatedTeams:new Set,sessionTrustAccepted:!1,sessionPersistenceDisabled:!1,hasExitedPlanMode:!1,needsPlanModeExitAttachment:!1,needsAutoModeExitAttachment:!1,lspRecommendationShownThisSession:!1,initJsonSchema:null,registeredHooks:null,planSlugCache:new Map,teleportedSessionInfo:null,invokedSkills:new Map,slowOperations:[],sdkBetas:void 0,mainThreadAgentType:void 0,isRemoteMode:!1,...process.env.USER_TYPE===`ant`?{replBridgeActive:!1}:{},directConnectServerUrl:void 0,systemPromptSectionCache:new Map,lastEmittedDate:null,additionalDirectoriesForClaudeMd:[],allowedChannels:[],hasDevChannels:!1,sessionProjectDir:null,promptCache1hAllowlist:null,promptCache1hEligible:null,afkModeHeaderLatched:null,fastModeHeaderLatched:null,cacheEditingHeaderLatched:null,promptId:null,lastMainRequestId:void 0,lastApiCompletionTimestamp:null,pendingPostCompaction:!1}}function ji(){return Q.sessionId}function Mi(e={}){return e.setCurrentAsParent&&(Q.parentSessionId=Q.sessionId),Q.planSlugCache.delete(Q.sessionId),Q.sessionId=ue(),Q.sessionProjectDir=null,Q.sessionId}function Ni(){return Q.parentSessionId}function Pi(e,t=null){Q.planSlugCache.delete(Q.sessionId),Q.sessionId=e,Q.sessionProjectDir=t,uc.emit(e)}function Fi(){return Q.sessionProjectDir}function Ii(){return Q.originalCwd}function Li(){return Q.projectRoot}function Ri(e){Q.originalCwd=e.normalize(`NFC`)}function zi(e){Q.projectRoot=e.normalize(`NFC`)}function Bi(){return Q.cwd}function Vi(e){Q.cwd=e.normalize(`NFC`)}function Hi(){return Q.directConnectServerUrl}function Ui(e){Q.directConnectServerUrl=e}function Wi(e,t){Q.totalAPIDuration+=e,Q.totalAPIDurationWithoutRetries+=t}function Gi(e,t,n){Q.modelUsage[n]=t,Q.totalCostUSD+=e}function Ki(){return Q.totalCostUSD}function qi(){return Q.totalAPIDuration}function Ji(){return Date.now()-Q.startTime}function Yi(){return Q.totalAPIDurationWithoutRetries}function Xi(){return Q.totalToolDuration}function Zi(e){Q.totalToolDuration+=e,Q.turnToolDurationMs+=e,Q.turnToolCount++}function Qi(){return Q.turnHookDurationMs}function $i(e){Q.turnHookDurationMs+=e,Q.turnHookCount++}function ea(){Q.turnHookDurationMs=0,Q.turnHookCount=0}function ta(){return Q.turnHookCount}function na(){return Q.turnToolDurationMs}function ra(){Q.turnToolDurationMs=0,Q.turnToolCount=0}function ia(){return Q.turnToolCount}function aa(){return Q.turnClassifierDurationMs}function oa(e){Q.turnClassifierDurationMs+=e,Q.turnClassifierCount++}function sa(){Q.turnClassifierDurationMs=0,Q.turnClassifierCount=0}function ca(){return Q.turnClassifierCount}function la(){return Q.statsStore}function ua(e){Q.statsStore=e}function da(e){e?fa():fc=!0}function fa(){Q.lastInteractionTime=Date.now(),fc=!1}function pa(e,t){Q.totalLinesAdded+=e,Q.totalLinesRemoved+=t}function ma(){return Q.totalLinesAdded}function ha(){return Q.totalLinesRemoved}function ga(){return J(Object.values(Q.modelUsage),`inputTokens`)}function _a(){return J(Object.values(Q.modelUsage),`outputTokens`)}function va(){return J(Object.values(Q.modelUsage),`cacheReadInputTokens`)}function ya(){return J(Object.values(Q.modelUsage),`cacheCreationInputTokens`)}function ba(){return J(Object.values(Q.modelUsage),`webSearchRequests`)}function xa(){return _a()-pc}function Sa(){return mc}function Ca(e){pc=_a(),mc=e,$=0}function wa(){return $}function Ta(){$++}function Ea(){Q.hasUnknownModelCost=!0}function Da(){return Q.hasUnknownModelCost}function Oa(){return Q.lastMainRequestId}function ka(e){Q.lastMainRequestId=e}function Aa(){return Q.lastApiCompletionTimestamp}function ja(e){Q.lastApiCompletionTimestamp=e}function Ma(){Q.pendingPostCompaction=!0}function Na(){let e=Q.pendingPostCompaction;return Q.pendingPostCompaction=!1,e}function Pa(){return Q.lastInteractionTime}function Fa(){return hc}async function Ia(){for(;hc;)await new Promise(e=>setTimeout(e,gc).unref?.())}function La(){return Q.modelUsage}function Ra(e){return Q.modelUsage[e]}function za(){return Q.mainLoopModelOverride}function Ba(){return Q.initialMainLoopModel}function Va(e){Q.mainLoopModelOverride=e}function Ha(e){Q.initialMainLoopModel=e}function Ua(){return Q.sdkBetas}function Wa(e){Q.sdkBetas=e}function Ga(){Q.totalCostUSD=0,Q.totalAPIDuration=0,Q.totalAPIDurationWithoutRetries=0,Q.totalToolDuration=0,Q.startTime=Date.now(),Q.totalLinesAdded=0,Q.totalLinesRemoved=0,Q.hasUnknownModelCost=!1,Q.modelUsage={},Q.promptId=null}function Ka({totalCostUSD:e,totalAPIDuration:t,totalAPIDurationWithoutRetries:n,totalToolDuration:r,totalLinesAdded:i,totalLinesRemoved:a,lastDuration:o,modelUsage:s}){Q.totalCostUSD=e,Q.totalAPIDuration=t,Q.totalAPIDurationWithoutRetries=n,Q.totalToolDuration=r,Q.totalLinesAdded=i,Q.totalLinesRemoved=a,s&&(Q.modelUsage=s),o&&(Q.startTime=Date.now()-o)}function qa(){return Q.modelStrings}function Ja(e){Q.modelStrings=e}function Ya(e,t){Q.meter=e,Q.sessionCounter=t(`claude_code.session.count`,{description:`Count of CLI sessions started`}),Q.locCounter=t(`claude_code.lines_of_code.count`,{description:`Count of lines of code modified, with the 'type' attribute indicating whether lines were added or removed`}),Q.prCounter=t(`claude_code.pull_request.count`,{description:`Number of pull requests created`}),Q.commitCounter=t(`claude_code.commit.count`,{description:`Number of git commits created`}),Q.costCounter=t(`claude_code.cost.usage`,{description:`Cost of the Claude Code session`,unit:`USD`}),Q.tokenCounter=t(`claude_code.token.usage`,{description:`Number of tokens used`,unit:`tokens`}),Q.codeEditToolDecisionCounter=t(`claude_code.code_edit_tool.decision`,{description:`Count of code editing tool permission decisions (accept/reject) for Edit, Write, and NotebookEdit tools`}),Q.activeTimeCounter=t(`claude_code.active_time.total`,{description:`Total active time in seconds`,unit:`s`})}function Xa(){return Q.sessionCounter}function Za(){return Q.locCounter}function Qa(){return Q.prCounter}function $a(){return Q.commitCounter}function eo(){return Q.costCounter}function to(){return Q.tokenCounter}function no(){return Q.codeEditToolDecisionCounter}function ro(){return Q.activeTimeCounter}function io(){return Q.loggerProvider}function ao(e){Q.loggerProvider=e}function oo(){return Q.eventLogger}function so(e){Q.eventLogger=e}function co(){return Q.meterProvider}function lo(e){Q.meterProvider=e}function uo(){return Q.tracerProvider}function fo(e){Q.tracerProvider=e}function po(){return!Q.isInteractive}function mo(){return Q.isInteractive}function ho(e){Q.isInteractive=e}function go(){return Q.clientType}function _o(e){Q.clientType=e}function vo(){return Q.sdkAgentProgressSummariesEnabled}function yo(e){Q.sdkAgentProgressSummariesEnabled=e}function bo(){return Q.kairosActive}function xo(e){Q.kairosActive=e}function So(){return Q.strictToolResultPairing}function Co(){return Q.userMsgOptIn}function wo(e){Q.userMsgOptIn=e}function To(e){Q.sessionSource=e}function Eo(){return Q.questionPreviewFormat}function Do(e){Q.questionPreviewFormat=e}function Oo(){return Q.agentColorMap}function ko(){return Q.flagSettingsPath}function Ao(e){Q.flagSettingsPath=e}function jo(){return Q.flagSettingsInline}function Mo(e){Q.flagSettingsInline=e}function No(){return Q.sessionIngressToken}function Po(e){Q.sessionIngressToken=e}function Fo(){return Q.oauthTokenFromFd}function Io(e){Q.oauthTokenFromFd=e}function Lo(){return Q.apiKeyFromFd}function Ro(e){Q.apiKeyFromFd=e}function zo(e){Q.lastAPIRequest=e}function Bo(){return Q.lastAPIRequest}function Vo(e){Q.lastAPIRequestMessages=e}function Ho(e){Q.lastClassifierRequests=e}function Uo(e){Q.cachedClaudeMdContent=e}function Wo(){return Q.cachedClaudeMdContent}function Go(){return Q.allowedSettingSources}function Ko(e){Q.allowedSettingSources=e}function qo(){return po()&&Q.clientType!==`claude-vscode`}function Jo(e){Q.inlinePlugins=e}function Yo(){return Q.inlinePlugins}function Xo(e){Q.chromeFlagOverride=e}function Zo(){return Q.chromeFlagOverride}function Qo(e){Q.useCoworkPlugins=e,Si()}function $o(){return Q.useCoworkPlugins}function es(e){Q.sessionBypassPermissionsMode=e}function ts(){return Q.sessionBypassPermissionsMode}function ns(e){Q.scheduledTasksEnabled=e}function rs(){return Q.scheduledTasksEnabled}function is(){return Q.sessionCronTasks}function as(e){Q.sessionCronTasks.push(e)}function os(e){if(e.length===0)return 0;let t=new Set(e),n=Q.sessionCronTasks.filter(e=>!t.has(e.id)),r=Q.sessionCronTasks.length-n.length;return r===0?0:(Q.sessionCronTasks=n,r)}function ss(e){Q.sessionTrustAccepted=e}function cs(){return Q.sessionTrustAccepted}function ls(e){Q.sessionPersistenceDisabled=e}function us(){return Q.sessionPersistenceDisabled}function ds(){return Q.hasExitedPlanMode}function fs(e){Q.hasExitedPlanMode=e}function ps(){return Q.needsPlanModeExitAttachment}function ms(e){Q.needsPlanModeExitAttachment=e}function hs(e,t){t===`plan`&&e!==`plan`&&(Q.needsPlanModeExitAttachment=!1),e===`plan`&&t!==`plan`&&(Q.needsPlanModeExitAttachment=!0)}function gs(){return Q.needsAutoModeExitAttachment}function _s(e){Q.needsAutoModeExitAttachment=e}function vs(e,t){if(e===`auto`&&t===`plan`||e===`plan`&&t===`auto`)return;let n=e===`auto`,r=t===`auto`;r&&!n&&(Q.needsAutoModeExitAttachment=!1),n&&!r&&(Q.needsAutoModeExitAttachment=!0)}function ys(){return Q.lspRecommendationShownThisSession}function bs(e){Q.lspRecommendationShownThisSession=e}function xs(e){Q.initJsonSchema=e}function Ss(){return Q.initJsonSchema}function Cs(e){Q.registeredHooks||(Q.registeredHooks={});for(let[t,n]of Object.entries(e)){let e=t;Q.registeredHooks[e]||(Q.registeredHooks[e]=[]),Q.registeredHooks[e].push(...n??[])}}function ws(){return Q.registeredHooks}function Ts(){if(!Q.registeredHooks)return;let e={};for(let[t,n]of Object.entries(Q.registeredHooks)){let r=(n??[]).filter(e=>!(`pluginRoot`in e));r.length>0&&(e[t]=r)}Q.registeredHooks=Object.keys(e).length>0?e:null}function Es(){return Q.planSlugCache}function Ds(e,t){if(Q.planSlugCache.size>=50){let e=Q.planSlugCache.keys().next().value;e!==void 0&&Q.planSlugCache.delete(e)}Q.planSlugCache.set(e,t)}function Os(){return Q.sessionCreatedTeams}function ks(e){Q.teleportedSessionInfo={isTeleported:!0,hasLoggedFirstMessage:!1,sessionId:e.sessionId}}function As(){return Q.teleportedSessionInfo}function js(){Q.teleportedSessionInfo&&(Q.teleportedSessionInfo.hasLoggedFirstMessage=!0)}function Ms(e,t,n,r=null){let i=`${r??``}:${e}`;Q.invokedSkills.set(i,{skillName:e,skillPath:t,content:n,invokedAt:Date.now(),agentId:r})}function Ns(e){let t=e??null,n=new Map;for(let[e,r]of Q.invokedSkills)r.agentId===t&&n.set(e,r);return n}function Ps(e){if(!e||e.size===0){Q.invokedSkills.clear();return}for(let[t,n]of Q.invokedSkills)(n.agentId===null||!e.has(n.agentId))&&Q.invokedSkills.delete(t)}function Fs(e){for(let[t,n]of Q.invokedSkills)n.agentId===e&&Q.invokedSkills.delete(t)}function Is(){if(Q.slowOperations.length===0)return vc;let e=Date.now();return Q.slowOperations.some(t=>e-t.timestamp>=_c)&&(Q.slowOperations=Q.slowOperations.filter(t=>e-t.timestamp<_c),Q.slowOperations.length===0)?vc:Q.slowOperations}function Ls(){return Q.mainThreadAgentType}function Rs(e){Q.mainThreadAgentType=e}function zs(){return Q.isRemoteMode}function Bs(e){Q.isRemoteMode=e}function Vs(){return Q.systemPromptSectionCache}function Hs(e,t){if(Q.systemPromptSectionCache.size>=100){let e=Q.systemPromptSectionCache.keys().next().value;e!==void 0&&Q.systemPromptSectionCache.delete(e)}Q.systemPromptSectionCache.set(e,t)}function Us(){Q.systemPromptSectionCache.clear()}function Ws(){return Q.lastEmittedDate}function Gs(e){Q.lastEmittedDate=e}function Ks(){return Q.additionalDirectoriesForClaudeMd}function qs(e){Q.additionalDirectoriesForClaudeMd=e}function Js(){return Q.allowedChannels}function Ys(e){Q.allowedChannels=e}function Xs(){return Q.hasDevChannels}function Zs(e){Q.hasDevChannels=e}function Qs(){return Q.promptCache1hAllowlist}function $s(e){Q.promptCache1hAllowlist=e}function ec(){return Q.promptCache1hEligible}function tc(e){Q.promptCache1hEligible=e}function nc(){return Q.afkModeHeaderLatched}function rc(e){Q.afkModeHeaderLatched=e}function ic(){return Q.fastModeHeaderLatched}function ac(e){Q.fastModeHeaderLatched=e}function oc(){return Q.cacheEditingHeaderLatched}function sc(){Q.afkModeHeaderLatched=null,Q.fastModeHeaderLatched=null,Q.cacheEditingHeaderLatched=null}function cc(){return Q.promptId}function lc(e){Q.promptId=e}var Q,uc,dc,fc,pc,mc,$,hc,gc,_c,vc,yc=e((()=>{mi(),hi(),Di(),ki(),Q=Ai(),uc=Oi(),dc=uc.subscribe,pc=0,mc=null,$=0,hc=!1,gc=150,_c=1e4,vc=[]}));export{io as $,Me as $i,ao as $n,q as $r,Ra as $t,Sa as A,dn as Ai,_o as An,Ca as Ar,Vs as At,Yo as B,dt as Bi,Ea as Bn,gi as Br,ma as Bt,oc as C,gn as Ci,qs as Cn,ss as Cr,ji as Ct,no as D,pn as Di,Ro as Dn,fo as Dr,Is as Dt,go as E,I as Ei,Ko as En,ks as Er,cs as Et,jo as F,Tt as Fi,ac as Fn,ki as Fr,ya as Ft,Fa as G,D as Gi,Bs as Gn,wi as Gr,uo as Gt,mo as H,ut as Hi,Ha as Hn,Si as Hr,_a as Ht,ko as I,O as Ii,Mo as In,Ti as Ir,va as It,Aa as J,ot as Ji,Vo as Jn,di as Jr,ta as Jt,bo as K,E as Ki,xo as Kn,_i as Kr,ca as Kt,Xs as L,ht as Li,Ao as Ln,bi as Lr,Ki as Lt,Hi as M,Mt as Mi,Vi as Mn,da as Mr,to as Mt,oo as N,jt as Ni,Ui as Nn,Ia as Nr,qi as Nt,$a as O,F as Oi,Uo as On,Qo as Or,la as Ot,ic as P,k as Pi,so as Pn,Oi as Pr,Yi as Pt,Za as Q,Re as Qi,ka as Qn,Ur as Qr,na as Qt,Ss as R,gt as Ri,Zs as Rn,vi as Rr,Ji as Rt,wa as S,yn as Si,ra as Sn,To as Sr,is as St,Zo as T,hn as Ti,Ys as Tn,Hs as Tr,Fi as Tt,po as U,st as Ui,Jo as Un,xi as Ur,Xi as Ut,Ns as V,lt as Vi,xs as Vn,Di as Vr,ha as Vt,zs as W,ct as Wi,ho as Wn,yi as Wr,ba as Wt,Pa as X,Ve as Xi,Ho as Xn,ri as Xr,xa as Xt,Ws as Y,He as Yi,ja as Yn,ni as Yr,Qi as Yt,Oa as Z,w as Zi,Gs as Zn,Hr as Zr,ia as Zt,nc as _,An as _i,Cs as _n,yo as _r,vo as _t,Wi as a,Ar as ai,ys as an,Ja as ar,Fo as at,Go as b,Sn as bi,sa as bn,Po as br,Xa as bt,$i as c,or as ci,yc as cn,Io as cr,Es as ct,Fs as d,B as di,Ma as dn,zi as dr,Qs as dt,Ne as ea,K as ei,$o as en,bs as er,za as et,Ts as f,Bn as fi,gs as fn,$s as fr,ec as ft,Ks as g,L as gi,Mi as gn,ns as gr,rs as gt,ro as h,jn as hi,qo as hn,Do as hr,ws as ht,Gi as i,Ce as ia,Lr as ii,ds as in,lo as ir,La as it,Bi as j,A as ji,Ka as jn,Pi as jr,As as jt,eo as k,un as ki,Xo as kn,wo as kr,So as kt,sc as l,U as li,us as ln,Ri as lr,Qa as lt,Na as m,Nn as mi,dc as mn,lc as mr,Eo as mt,as as n,ke as na,Br as ni,vs as nn,Rs as nr,co as nt,pa as o,jr as oi,Da as on,_s as or,Ii as ot,Us as p,Mn as pi,ps as pn,tc as pr,cc as pt,Bo as q,at as qi,zo as qn,ui as qr,aa as qt,Zi as r,S as ra,Rr as ri,hs as rn,Ya as rr,qa as rt,oa as s,G as si,Ta as sn,ms as sr,Ni as st,Ms as t,C as ta,zr as ti,Co as tn,Va as tr,Ls as tt,Ps as u,$n as ui,js as un,Ds as ur,Li as ut,Oo as v,kn as vi,os as vn,Wa as vr,Ua as vt,Wo as w,vn as wi,rc as wn,ua as wr,No as wt,Lo as x,xn as xi,ea as xn,ls as xr,Os as xt,Js as y,Cn as yi,Ga as yn,es as yr,ts as yt,Ba as z,ft as zi,fs as zn,Ci as zr,ga as zt};
@@ -0,0 +1 @@
1
+ import{n as e,o as t}from"./chunk-DR8-3Aex.js";import{H as n,Mt as r,Rn as i,Tn as a,t as o,wn as s}from"./src-Di342QoJ.js";import{t as c}from"./jsx-runtime-D-D469L8.js";import{PassThrough as l}from"stream";function u({children:e}){let{exit:t}=n();return(0,m.useLayoutEffect)(()=>{let e=setTimeout(t,0);return()=>clearTimeout(e)},[t]),(0,h.jsx)(h.Fragment,{children:e})}function d(e){let t=e.indexOf(g);if(t===-1)return e;let n=t+8,r=e.indexOf(_,n);return r===-1?e:e.slice(n,r)}async function f(e,t){let n=``,i=new l;return t!==void 0&&(i.columns=t),i.on(`data`,e=>{n+=e.toString()}),await(await r((0,h.jsx)(u,{children:e}),{stdout:i,patchConsole:!1})).waitUntilExit(),d(n)}async function p(e,t){return a(await f(e,t))}var m,h,g,_,v=e((()=>{i(),m=t(i(),1),s(),o(),h=c(),g=`\x1B[?2026h`,_=`\x1B[?2026l`}));export{f as n,p as r,v as t};
@@ -0,0 +1 @@
1
+ import{o as e}from"./chunk-DR8-3Aex.js";import{Rn as t}from"./src-Di342QoJ.js";import{t as n}from"./jsx-runtime-D-D469L8.js";import{Ac as r,Nc as i}from"./paths-BBvuDQl9.js";var a=e(t(),1);r();var o=n();function s(e,t){let n=t/100*(e.length-1),r=Math.floor(n),i=Math.ceil(n);return r===i?e[r]:e[r]+(e[i]-e[r])*(n-r)}var c=1024;function l(){let e=new Map,t=new Map,n=new Map;return{increment(t,n=1){e.set(t,(e.get(t)??0)+n)},set(t,n){e.set(t,n)},observe(e,n){let r=t.get(e);if(r||(r={reservoir:[],count:0,sum:0,min:n,max:n},t.set(e,r)),r.count++,r.sum+=n,n<r.min&&(r.min=n),n>r.max&&(r.max=n),r.reservoir.length<c)r.reservoir.push(n);else{let e=Math.floor(Math.random()*r.count);e<c&&(r.reservoir[e]=n)}},add(e,t){let r=n.get(e);r||(r=new Set,n.set(e,r)),r.add(t)},getAll(){let r=Object.fromEntries(e);for(let[e,n]of t){if(n.count===0)continue;r[`${e}_count`]=n.count,r[`${e}_min`]=n.min,r[`${e}_max`]=n.max,r[`${e}_avg`]=n.sum/n.count;let t=[...n.reservoir].sort((e,t)=>e-t);r[`${e}_p50`]=s(t,50),r[`${e}_p95`]=s(t,95),r[`${e}_p99`]=s(t,99)}for(let[e,t]of n)r[e]=t.size;return r}}}var u=(0,a.createContext)(null);function d({store:e,children:t}){let n=(0,a.useMemo)(()=>l(),[]),r=e??n;return(0,a.useEffect)(()=>{let e=()=>{let e=r.getAll();Object.keys(e).length>0&&i(t=>({...t,lastSessionMetrics:e}))};return process.on(`exit`,e),()=>{process.off(`exit`,e)}},[r]),(0,o.jsx)(u.Provider,{value:r,children:t})}export{l as n,d as t};
@@ -0,0 +1 @@
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{Rn as t}from"./src-Di342QoJ.js";import{t as n}from"./jsx-runtime-D-D469L8.js";import{n as r,t as i}from"./Settings-vfFvcweR.js";async function a(e,t){return(0,o.jsx)(i,{onClose:e,context:t,defaultTab:`Status`})}var o;e((()=>{t(),r(),o=n()}))();export{a as call};
@@ -0,0 +1 @@
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{Uc as t,Wc as n}from"./loadAgentsDir-DI1a76pd.js";function r(e){return e?e.activeAgents.filter(e=>e.source!==`built-in`).reduce((e,t)=>e+n(`${t.agentType}: ${t.whenToUse}`),0):0}var i,a=e((()=>{t(),i=15e3}));export{r as n,a as r,i as t};
@@ -0,0 +1 @@
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,r as n,t as r}from"./stdio-D4cT86R0.js";import i from"node:process";var a,o=e((()=>{t(),a=class{constructor(e=i.stdin,t=i.stdout){this._stdin=e,this._stdout=t,this._readBuffer=new r,this._started=!1,this._ondata=e=>{this._readBuffer.append(e),this.processReadBuffer()},this._onerror=e=>{this.onerror?.(e)}}async start(){if(this._started)throw Error(`StdioServerTransport already started! If using Server class, note that connect() calls start() automatically.`);this._started=!0,this._stdin.on(`data`,this._ondata),this._stdin.on(`error`,this._onerror)}processReadBuffer(){for(;;)try{let e=this._readBuffer.readMessage();if(e===null)break;this.onmessage?.(e)}catch(e){this.onerror?.(e)}}async close(){this._stdin.off(`data`,this._ondata),this._stdin.off(`error`,this._onerror),this._stdin.listenerCount(`data`)===0&&this._stdin.pause(),this._readBuffer.clear(),this.onclose?.()}send(e){return new Promise(t=>{let r=n(e);this._stdout.write(r)?t():this._stdout.once(`drain`,t)})}}}));export{o as n,a as t};
@@ -0,0 +1,3 @@
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{B as t,T as n}from"./server-DzOdtq8A.js";function r(e){return n.parse(JSON.parse(e))}function i(e){return JSON.stringify(e)+`
2
+ `}var a,o=e((()=>{t(),a=class{append(e){this._buffer=this._buffer?Buffer.concat([this._buffer,e]):e}readMessage(){if(!this._buffer)return null;let e=this._buffer.indexOf(`
3
+ `);if(e===-1)return null;let t=this._buffer.toString(`utf8`,0,e).replace(/\r$/,``);return this._buffer=this._buffer.subarray(e+1),r(t)}clear(){this._buffer=void 0}}}));export{o as n,i as r,a as t};
@@ -0,0 +1 @@
1
+ import{n as e}from"./chunk-DR8-3Aex.js";import{n as t,t as n}from"./browser-fLRXxIsQ.js";async function r(){let e=`https://www.stickermule.com/claudecode`;return await t(e)?{type:`text`,value:`Opening sticker page in browser…`}:{type:`text`,value:`Failed to open browser. Visit: ${e}`}}e((()=>{n()}))();export{r as call};
@@ -0,0 +1 @@
1
+ import{n as e}from"./chunk-DR8-3Aex.js";function t(e,t){i={...i,providerId:e,buckets:t},r()}function n(e,t){i={...i,providerId:e,...t===null?{balance:void 0}:{balance:t}},r()}function r(){for(let e of a)try{e(i)}catch{}}var i,a,o=e((()=>{i={providerId:`unknown`,buckets:[]},a=new Set}));export{n,t as r,o as t};