@humain/humain-code 0.4.18 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (444) hide show
  1. package/CHANGELOG.md +247 -0
  2. package/dist/bundle/agent-monitor.js +1 -1
  3. package/dist/bundle/chunks/anthropic-messages-ZP5KUK52.js +67 -0
  4. package/dist/bundle/chunks/anthropic.js +2 -2
  5. package/dist/bundle/chunks/azure-openai-responses-QJFYQ3DF.js +15 -0
  6. package/dist/bundle/chunks/bedrock-converse-stream.js +152 -200
  7. package/dist/bundle/chunks/chunk-2GCMACT4.js +1956 -0
  8. package/dist/bundle/chunks/{chunk-7VY5IL74.js → chunk-476XBL3W.js} +3 -3
  9. package/dist/bundle/chunks/{chunk-P4UKLIQB.js → chunk-5C4VL2AR.js} +4 -4
  10. package/dist/bundle/chunks/{chunk-QEF72EIZ.js → chunk-A6B2QMA7.js} +40 -96
  11. package/dist/bundle/chunks/{chunk-3UXBFT4Q.js → chunk-A6YBWW4T.js} +1428 -1334
  12. package/dist/bundle/chunks/{chunk-OWLBGSXY.js → chunk-CN3Q5UNB.js} +388 -310
  13. package/dist/bundle/chunks/{chunk-SCIGZFN5.js → chunk-DNGJMRJW.js} +11 -11
  14. package/dist/bundle/chunks/{chunk-YMBXWW36.js → chunk-DR37WKFZ.js} +9 -8
  15. package/dist/bundle/chunks/chunk-DU6POZ7E.js +10 -0
  16. package/dist/bundle/chunks/{chunk-G6ABHCPB.js → chunk-FO2NYB6O.js} +655 -663
  17. package/dist/bundle/chunks/{chunk-RXOCQRBG.js → chunk-GEISZXXH.js} +1 -1
  18. package/dist/bundle/chunks/{chunk-OKALNPTJ.js → chunk-HIZWUSPN.js} +24 -24
  19. package/dist/bundle/chunks/{chunk-MVYV6MJY.js → chunk-HT5YN3LX.js} +1 -1
  20. package/dist/bundle/chunks/chunk-IDU5BNNI.js +15 -0
  21. package/dist/bundle/chunks/{chunk-TIFFHHW6.js → chunk-JCXXRCP6.js} +5 -5
  22. package/dist/bundle/chunks/{chunk-QYCOHSI7.js → chunk-KKCMWB63.js} +8 -7
  23. package/dist/bundle/chunks/{chunk-SCBU5WOP.js → chunk-M74U5X4S.js} +30 -23
  24. package/dist/bundle/chunks/{chunk-AWCJWXGD.js → chunk-MIJHJNNQ.js} +3 -2
  25. package/dist/bundle/chunks/{chunk-Y26OS23T.js → chunk-N7CQ3UV3.js} +4 -4
  26. package/dist/bundle/chunks/{chunk-XQZG5HPT.js → chunk-O4DO5RWS.js} +11 -6
  27. package/dist/bundle/chunks/chunk-OR25QDSS.js +365 -0
  28. package/dist/bundle/chunks/{chunk-7PRU6YW3.js → chunk-OZNC2W4B.js} +306 -286
  29. package/dist/bundle/chunks/{chunk-Z33NNMNB.js → chunk-PH7UP57J.js} +1 -1
  30. package/dist/bundle/chunks/{chunk-HPSQKIWK.js → chunk-PS7DGA7B.js} +1 -1
  31. package/dist/bundle/chunks/chunk-Q3SFYT2X.js +1965 -0
  32. package/dist/bundle/chunks/chunk-QW6PTCAB.js +10 -0
  33. package/dist/bundle/chunks/{chunk-5CDES42D.js → chunk-QWXPGBAG.js} +1 -1
  34. package/dist/bundle/chunks/{chunk-NCQ6WAQK.js → chunk-ROZV2IYD.js} +1 -1
  35. package/dist/bundle/chunks/{chunk-3XDL5ZE4.js → chunk-RTXDU3AA.js} +148 -122
  36. package/dist/bundle/chunks/{chunk-L5OUCJ7N.js → chunk-T3HXWZG4.js} +11 -11
  37. package/dist/bundle/chunks/{chunk-FZUJXM6D.js → chunk-UDB6NI4G.js} +309 -240
  38. package/dist/bundle/chunks/chunk-UTNHGOFS.js +88 -0
  39. package/dist/bundle/chunks/{chunk-H2FY3PEV.js → chunk-V62QBESW.js} +4 -3
  40. package/dist/bundle/chunks/{chunk-NSMMDV3N.js → chunk-XA7CJAYH.js} +4 -3
  41. package/dist/bundle/chunks/chunk-XQX7S3GM.js +7 -0
  42. package/dist/bundle/chunks/chunk-YFOLLX5D.js +23 -0
  43. package/dist/bundle/chunks/{chunk-YRCLNWFV.js → chunk-ZI7TK7HM.js} +1 -1
  44. package/dist/bundle/chunks/{chunk-V76YPIMT.js → chunk-ZR4GF4WU.js} +21 -15
  45. package/dist/bundle/chunks/{cli-2NKM2RNJ.js → cli-VXU7OWFU.js} +1 -1
  46. package/dist/bundle/chunks/cloudflare-workers-ai-system-one-T7TPP7SQ.js +4 -0
  47. package/dist/bundle/chunks/codemode-worker.js +27 -27
  48. package/dist/bundle/chunks/compat-S2IBVV6V.js +13 -0
  49. package/dist/bundle/chunks/{dist-ZJIYY3GA.js → dist-645GFIWH.js} +452 -448
  50. package/dist/bundle/chunks/{dist-XVXV2CL4.js → dist-IBUWEKEE.js} +3 -3
  51. package/dist/bundle/chunks/dist-YFMJEHPH.js +8 -0
  52. package/dist/bundle/chunks/{dist-cjs-AXBW3N4F.js → dist-cjs-HTASUQXQ.js} +82 -80
  53. package/dist/bundle/chunks/{easter-egg-3d-VGJ77XZQ.js → easter-egg-3d-YOPLCOVW.js} +2 -2
  54. package/dist/bundle/chunks/es-YEFEOGR3.js +1905 -0
  55. package/dist/bundle/chunks/{esm-GIR7QH65.js → esm-R6HJ4QEG.js} +5 -5
  56. package/dist/bundle/chunks/{event-streams-NXFTZDSF.js → event-streams-BR2IL6C5.js} +1 -1
  57. package/dist/bundle/chunks/{execute-ZBEZNJ4E.js → execute-2JXEKQ2X.js} +17 -8
  58. package/dist/bundle/chunks/{extract-RFWEHH6W.js → extract-OTCGZGTL.js} +50 -47
  59. package/dist/bundle/chunks/github-copilot.js +42 -40
  60. package/dist/bundle/chunks/google-generative-ai-HVPCGIZ6.js +21 -0
  61. package/dist/bundle/chunks/google-vertex-UM5MAALA.js +25 -0
  62. package/dist/bundle/chunks/host-ZHEL5XQW.js +2 -0
  63. package/dist/bundle/chunks/{https-proxy-agent-7CAXVAFH.js → https-proxy-agent-JQICCRPH.js} +1 -1
  64. package/dist/bundle/chunks/{llama-cpp-classify-AGCW7HYN.js → llama-cpp-classify-B3G57LVR.js} +5 -5
  65. package/dist/bundle/chunks/{mistral-conversations-G3GN6CMT.js → mistral-conversations-AH72RLXK.js} +11 -11
  66. package/dist/bundle/chunks/{node-A6SZ3T7E.js → node-SJPZTR4K.js} +190 -190
  67. package/dist/bundle/chunks/{node-DZCAT4Q6.js → node-VSA4ZN7D.js} +1 -1
  68. package/dist/bundle/chunks/openai-chatgpt.js +2 -2
  69. package/dist/bundle/chunks/{openai-codex-responses-FJFDAWHI.js → openai-codex-responses-L366637C.js} +48 -47
  70. package/dist/bundle/chunks/openai-codex.js +2 -2
  71. package/dist/bundle/chunks/openai-completions-ZP62QXJX.js +83 -0
  72. package/dist/bundle/chunks/{openai-decisions-HESOHYZB.js → openai-decisions-WOWUC65P.js} +1 -1
  73. package/dist/bundle/chunks/openai-responses-DXUGSUTN.js +26 -0
  74. package/dist/bundle/chunks/openrouter-images-5K47HDAT.js +8 -0
  75. package/dist/bundle/chunks/openrouter.js +2 -2
  76. package/dist/bundle/chunks/{pi-messages-SAOV3JNW.js → pi-messages-MOQQDZBK.js} +5 -4
  77. package/dist/bundle/chunks/radius.js +2 -2
  78. package/dist/bundle/chunks/{runtime-HJEUOD4R.js → runtime-5VFZTMWL.js} +1 -1
  79. package/dist/bundle/chunks/typesafe-system-one-43OCHGKP.js +3 -0
  80. package/dist/bundle/chunks/{undici-4BK3MVJV.js → undici-EK3EUI2E.js} +1 -1
  81. package/dist/bundle/chunks/virtual-modules-GU6AW5ZK.js +5 -0
  82. package/dist/bundle/cli-runtime.js +3 -3
  83. package/dist/bundle/flow/package.json +4 -4
  84. package/dist/bundle/index.js +6 -6
  85. package/dist/bundle/rpc-entry.js +3 -3
  86. package/dist/cli/args.d.ts +6 -0
  87. package/dist/cli/args.d.ts.map +1 -1
  88. package/dist/cli/args.js +11 -0
  89. package/dist/cli/args.js.map +1 -1
  90. package/dist/coordination/adapter/tool.d.ts.map +1 -1
  91. package/dist/coordination/adapter/tool.js +3 -1
  92. package/dist/coordination/adapter/tool.js.map +1 -1
  93. package/dist/coordination/broker/broker.d.ts +6 -2
  94. package/dist/coordination/broker/broker.d.ts.map +1 -1
  95. package/dist/coordination/broker/broker.js +20 -8
  96. package/dist/coordination/broker/broker.js.map +1 -1
  97. package/dist/coordination/client/client.d.ts.map +1 -1
  98. package/dist/coordination/client/client.js +4 -2
  99. package/dist/coordination/client/client.js.map +1 -1
  100. package/dist/coordination/transport/discovery.d.ts +10 -3
  101. package/dist/coordination/transport/discovery.d.ts.map +1 -1
  102. package/dist/coordination/transport/discovery.js +18 -5
  103. package/dist/coordination/transport/discovery.js.map +1 -1
  104. package/dist/core/agent-session.d.ts +35 -2
  105. package/dist/core/agent-session.d.ts.map +1 -1
  106. package/dist/core/agent-session.js +163 -40
  107. package/dist/core/agent-session.js.map +1 -1
  108. package/dist/core/anthropic-subscription-usage.d.ts +47 -0
  109. package/dist/core/anthropic-subscription-usage.d.ts.map +1 -0
  110. package/dist/core/anthropic-subscription-usage.js +170 -0
  111. package/dist/core/anthropic-subscription-usage.js.map +1 -0
  112. package/dist/core/bash-executor.d.ts.map +1 -1
  113. package/dist/core/bash-executor.js +7 -1
  114. package/dist/core/bash-executor.js.map +1 -1
  115. package/dist/core/client-identity.d.ts +13 -0
  116. package/dist/core/client-identity.d.ts.map +1 -0
  117. package/dist/core/client-identity.js +25 -0
  118. package/dist/core/client-identity.js.map +1 -0
  119. package/dist/core/codex-usage.d.ts +37 -1
  120. package/dist/core/codex-usage.d.ts.map +1 -1
  121. package/dist/core/codex-usage.js +104 -11
  122. package/dist/core/codex-usage.js.map +1 -1
  123. package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
  124. package/dist/core/compaction/branch-summarization.js +1 -2
  125. package/dist/core/compaction/branch-summarization.js.map +1 -1
  126. package/dist/core/compaction/compaction.d.ts +2 -2
  127. package/dist/core/compaction/compaction.d.ts.map +1 -1
  128. package/dist/core/compaction/compaction.js +20 -15
  129. package/dist/core/compaction/compaction.js.map +1 -1
  130. package/dist/core/export-html/index.d.ts.map +1 -1
  131. package/dist/core/export-html/index.js +2 -0
  132. package/dist/core/export-html/index.js.map +1 -1
  133. package/dist/core/export-html/template.html +1 -0
  134. package/dist/core/export-html/template.js +2 -1
  135. package/dist/core/export-html/vendor/marked-cjk-friendly.min.js +6 -0
  136. package/dist/core/export-html/vendor/marked.min.js +30 -29
  137. package/dist/core/extensions/loader.d.ts.map +1 -1
  138. package/dist/core/extensions/loader.js +3 -0
  139. package/dist/core/extensions/loader.js.map +1 -1
  140. package/dist/core/extensions/runner.d.ts +14 -0
  141. package/dist/core/extensions/runner.d.ts.map +1 -1
  142. package/dist/core/extensions/runner.js +86 -2
  143. package/dist/core/extensions/runner.js.map +1 -1
  144. package/dist/core/extensions/virtual-modules.d.ts.map +1 -1
  145. package/dist/core/extensions/virtual-modules.js +3 -0
  146. package/dist/core/extensions/virtual-modules.js.map +1 -1
  147. package/dist/core/model-config.d.ts +920 -0
  148. package/dist/core/model-config.d.ts.map +1 -1
  149. package/dist/core/model-config.js +48 -24
  150. package/dist/core/model-config.js.map +1 -1
  151. package/dist/core/model-registry.d.ts +18 -0
  152. package/dist/core/model-registry.d.ts.map +1 -1
  153. package/dist/core/model-registry.js +20 -0
  154. package/dist/core/model-registry.js.map +1 -1
  155. package/dist/core/model-resolver.d.ts.map +1 -1
  156. package/dist/core/model-resolver.js +14 -6
  157. package/dist/core/model-resolver.js.map +1 -1
  158. package/dist/core/model-runtime.d.ts +9 -0
  159. package/dist/core/model-runtime.d.ts.map +1 -1
  160. package/dist/core/model-runtime.js +99 -12
  161. package/dist/core/model-runtime.js.map +1 -1
  162. package/dist/core/output-guard.d.ts +13 -1
  163. package/dist/core/output-guard.d.ts.map +1 -1
  164. package/dist/core/output-guard.js +101 -11
  165. package/dist/core/output-guard.js.map +1 -1
  166. package/dist/core/provider-composer.d.ts +2 -1
  167. package/dist/core/provider-composer.d.ts.map +1 -1
  168. package/dist/core/provider-composer.js +7 -3
  169. package/dist/core/provider-composer.js.map +1 -1
  170. package/dist/core/remote-catalog-provider.d.ts.map +1 -1
  171. package/dist/core/remote-catalog-provider.js +7 -2
  172. package/dist/core/remote-catalog-provider.js.map +1 -1
  173. package/dist/core/sdk.d.ts.map +1 -1
  174. package/dist/core/sdk.js +8 -9
  175. package/dist/core/sdk.js.map +1 -1
  176. package/dist/core/session-manager.d.ts +4 -0
  177. package/dist/core/session-manager.d.ts.map +1 -1
  178. package/dist/core/session-manager.js +242 -26
  179. package/dist/core/session-manager.js.map +1 -1
  180. package/dist/core/system-prompt.d.ts +6 -1
  181. package/dist/core/system-prompt.d.ts.map +1 -1
  182. package/dist/core/system-prompt.js +93 -1
  183. package/dist/core/system-prompt.js.map +1 -1
  184. package/dist/core/tools/grep.d.ts.map +1 -1
  185. package/dist/core/tools/grep.js +3 -1
  186. package/dist/core/tools/grep.js.map +1 -1
  187. package/dist/core/tools/ls.d.ts.map +1 -1
  188. package/dist/core/tools/ls.js +37 -12
  189. package/dist/core/tools/ls.js.map +1 -1
  190. package/dist/extensions/codemode/execute.d.ts.map +1 -1
  191. package/dist/extensions/codemode/execute.js +102 -24
  192. package/dist/extensions/codemode/execute.js.map +1 -1
  193. package/dist/extensions/index.d.ts.map +1 -1
  194. package/dist/extensions/index.js +3 -1
  195. package/dist/extensions/index.js.map +1 -1
  196. package/dist/extensions/mcp/config.d.ts.map +1 -1
  197. package/dist/extensions/mcp/config.js +3 -2
  198. package/dist/extensions/mcp/config.js.map +1 -1
  199. package/dist/extensions/usage/index.d.ts +15 -0
  200. package/dist/extensions/usage/index.d.ts.map +1 -0
  201. package/dist/extensions/usage/index.js +110 -0
  202. package/dist/extensions/usage/index.js.map +1 -0
  203. package/dist/extensions/usage/overview.d.ts +90 -0
  204. package/dist/extensions/usage/overview.d.ts.map +1 -0
  205. package/dist/extensions/usage/overview.js +215 -0
  206. package/dist/extensions/usage/overview.js.map +1 -0
  207. package/dist/extensions/usage/popup.d.ts +21 -0
  208. package/dist/extensions/usage/popup.d.ts.map +1 -0
  209. package/dist/extensions/usage/popup.js +98 -0
  210. package/dist/extensions/usage/popup.js.map +1 -0
  211. package/dist/humain/bedrock-provider/vendor/index.bundle.mjs +21 -2
  212. package/dist/humain/bundled-extension-names.d.ts +6 -0
  213. package/dist/humain/bundled-extension-names.d.ts.map +1 -0
  214. package/dist/humain/bundled-extension-names.js +9 -0
  215. package/dist/humain/bundled-extension-names.js.map +1 -0
  216. package/dist/humain/index.d.ts +2 -2
  217. package/dist/humain/index.d.ts.map +1 -1
  218. package/dist/humain/index.js +3 -2
  219. package/dist/humain/index.js.map +1 -1
  220. package/dist/humain/web-access/vendor/anysearch.d.ts.map +1 -1
  221. package/dist/humain/web-access/vendor/anysearch.js +3 -3
  222. package/dist/humain/web-access/vendor/anysearch.js.map +1 -1
  223. package/dist/humain/web-access/vendor/bocha.d.ts.map +1 -1
  224. package/dist/humain/web-access/vendor/bocha.js +3 -3
  225. package/dist/humain/web-access/vendor/bocha.js.map +1 -1
  226. package/dist/humain/web-access/vendor/brightdata-unlocker.d.ts.map +1 -1
  227. package/dist/humain/web-access/vendor/brightdata-unlocker.js +2 -2
  228. package/dist/humain/web-access/vendor/brightdata-unlocker.js.map +1 -1
  229. package/dist/humain/web-access/vendor/brightdata.d.ts.map +1 -1
  230. package/dist/humain/web-access/vendor/brightdata.js +3 -3
  231. package/dist/humain/web-access/vendor/brightdata.js.map +1 -1
  232. package/dist/humain/web-access/vendor/ceramic.d.ts.map +1 -1
  233. package/dist/humain/web-access/vendor/ceramic.js +2 -2
  234. package/dist/humain/web-access/vendor/ceramic.js.map +1 -1
  235. package/dist/humain/web-access/vendor/curator-page.d.ts.map +1 -1
  236. package/dist/humain/web-access/vendor/curator-page.js +3 -1
  237. package/dist/humain/web-access/vendor/curator-page.js.map +1 -1
  238. package/dist/humain/web-access/vendor/curator-server.d.ts.map +1 -1
  239. package/dist/humain/web-access/vendor/curator-server.js +2 -0
  240. package/dist/humain/web-access/vendor/curator-server.js.map +1 -1
  241. package/dist/humain/web-access/vendor/deepseek.d.ts +11 -1
  242. package/dist/humain/web-access/vendor/deepseek.d.ts.map +1 -1
  243. package/dist/humain/web-access/vendor/deepseek.js +170 -5
  244. package/dist/humain/web-access/vendor/deepseek.js.map +1 -1
  245. package/dist/humain/web-access/vendor/extract.d.ts.map +1 -1
  246. package/dist/humain/web-access/vendor/extract.js +63 -6
  247. package/dist/humain/web-access/vendor/extract.js.map +1 -1
  248. package/dist/humain/web-access/vendor/gemini-search.d.ts +5 -3
  249. package/dist/humain/web-access/vendor/gemini-search.d.ts.map +1 -1
  250. package/dist/humain/web-access/vendor/gemini-search.js +33 -7
  251. package/dist/humain/web-access/vendor/gemini-search.js.map +1 -1
  252. package/dist/humain/web-access/vendor/index.d.ts +1 -0
  253. package/dist/humain/web-access/vendor/index.d.ts.map +1 -1
  254. package/dist/humain/web-access/vendor/index.js +18 -3
  255. package/dist/humain/web-access/vendor/index.js.map +1 -1
  256. package/dist/humain/web-access/vendor/jina-search.d.ts.map +1 -1
  257. package/dist/humain/web-access/vendor/jina-search.js +6 -4
  258. package/dist/humain/web-access/vendor/jina-search.js.map +1 -1
  259. package/dist/humain/web-access/vendor/kagi.d.ts.map +1 -1
  260. package/dist/humain/web-access/vendor/kagi.js +4 -4
  261. package/dist/humain/web-access/vendor/kagi.js.map +1 -1
  262. package/dist/humain/web-access/vendor/keenable.d.ts.map +1 -1
  263. package/dist/humain/web-access/vendor/keenable.js +2 -2
  264. package/dist/humain/web-access/vendor/keenable.js.map +1 -1
  265. package/dist/humain/web-access/vendor/linkup.d.ts +6 -0
  266. package/dist/humain/web-access/vendor/linkup.d.ts.map +1 -0
  267. package/dist/humain/web-access/vendor/linkup.js +167 -0
  268. package/dist/humain/web-access/vendor/linkup.js.map +1 -0
  269. package/dist/humain/web-access/vendor/mistral-search.d.ts.map +1 -1
  270. package/dist/humain/web-access/vendor/mistral-search.js +3 -3
  271. package/dist/humain/web-access/vendor/mistral-search.js.map +1 -1
  272. package/dist/humain/web-access/vendor/ollama.d.ts.map +1 -1
  273. package/dist/humain/web-access/vendor/ollama.js +4 -4
  274. package/dist/humain/web-access/vendor/ollama.js.map +1 -1
  275. package/dist/humain/web-access/vendor/parallel.js +6 -7
  276. package/dist/humain/web-access/vendor/parallel.js.map +1 -1
  277. package/dist/humain/web-access/vendor/perplexity.d.ts.map +1 -1
  278. package/dist/humain/web-access/vendor/perplexity.js +4 -3
  279. package/dist/humain/web-access/vendor/perplexity.js.map +1 -1
  280. package/dist/humain/web-access/vendor/querit.d.ts.map +1 -1
  281. package/dist/humain/web-access/vendor/querit.js +3 -3
  282. package/dist/humain/web-access/vendor/querit.js.map +1 -1
  283. package/dist/humain/web-access/vendor/search1api.d.ts.map +1 -1
  284. package/dist/humain/web-access/vendor/search1api.js +3 -3
  285. package/dist/humain/web-access/vendor/search1api.js.map +1 -1
  286. package/dist/humain/web-access/vendor/searchinfinity.d.ts.map +1 -1
  287. package/dist/humain/web-access/vendor/searchinfinity.js +3 -3
  288. package/dist/humain/web-access/vendor/searchinfinity.js.map +1 -1
  289. package/dist/humain/web-access/vendor/serpapi.d.ts.map +1 -1
  290. package/dist/humain/web-access/vendor/serpapi.js +6 -5
  291. package/dist/humain/web-access/vendor/serpapi.js.map +1 -1
  292. package/dist/humain/web-access/vendor/serpbase.d.ts.map +1 -1
  293. package/dist/humain/web-access/vendor/serpbase.js +4 -4
  294. package/dist/humain/web-access/vendor/serpbase.js.map +1 -1
  295. package/dist/humain/web-access/vendor/serpdive.d.ts.map +1 -1
  296. package/dist/humain/web-access/vendor/serpdive.js +3 -3
  297. package/dist/humain/web-access/vendor/serpdive.js.map +1 -1
  298. package/dist/humain/web-access/vendor/serper.d.ts.map +1 -1
  299. package/dist/humain/web-access/vendor/serper.js +5 -4
  300. package/dist/humain/web-access/vendor/serper.js.map +1 -1
  301. package/dist/humain/web-access/vendor/serply.d.ts.map +1 -1
  302. package/dist/humain/web-access/vendor/serply.js +2 -2
  303. package/dist/humain/web-access/vendor/serply.js.map +1 -1
  304. package/dist/humain/web-access/vendor/utils.d.ts +3 -1
  305. package/dist/humain/web-access/vendor/utils.d.ts.map +1 -1
  306. package/dist/humain/web-access/vendor/utils.js +27 -2
  307. package/dist/humain/web-access/vendor/utils.js.map +1 -1
  308. package/dist/humain/web-access/vendor/valyu.d.ts.map +1 -1
  309. package/dist/humain/web-access/vendor/valyu.js +3 -3
  310. package/dist/humain/web-access/vendor/valyu.js.map +1 -1
  311. package/dist/humain/web-access/vendor/web-tool-core.d.ts +2 -0
  312. package/dist/humain/web-access/vendor/web-tool-core.d.ts.map +1 -1
  313. package/dist/humain/web-access/vendor/web-tool-core.js +3 -0
  314. package/dist/humain/web-access/vendor/web-tool-core.js.map +1 -1
  315. package/dist/humain/web-access/vendor/xai-search.d.ts.map +1 -1
  316. package/dist/humain/web-access/vendor/xai-search.js +51 -8
  317. package/dist/humain/web-access/vendor/xai-search.js.map +1 -1
  318. package/dist/humain/web-access/vendor/xcrawl.d.ts.map +1 -1
  319. package/dist/humain/web-access/vendor/xcrawl.js +3 -3
  320. package/dist/humain/web-access/vendor/xcrawl.js.map +1 -1
  321. package/dist/humain/web-access/vendor/you.d.ts.map +1 -1
  322. package/dist/humain/web-access/vendor/you.js +2 -2
  323. package/dist/humain/web-access/vendor/you.js.map +1 -1
  324. package/dist/main.d.ts.map +1 -1
  325. package/dist/main.js +15 -2
  326. package/dist/main.js.map +1 -1
  327. package/dist/modes/interactive/components/assistant-message.d.ts +14 -2
  328. package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
  329. package/dist/modes/interactive/components/assistant-message.js +62 -7
  330. package/dist/modes/interactive/components/assistant-message.js.map +1 -1
  331. package/dist/modes/interactive/components/config-selector.js +1 -1
  332. package/dist/modes/interactive/components/config-selector.js.map +1 -1
  333. package/dist/modes/interactive/components/custom-editor.d.ts +2 -0
  334. package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -1
  335. package/dist/modes/interactive/components/custom-editor.js +6 -1
  336. package/dist/modes/interactive/components/custom-editor.js.map +1 -1
  337. package/dist/modes/interactive/components/easter-egg-3d.js +1 -1
  338. package/dist/modes/interactive/components/easter-egg-3d.js.map +1 -1
  339. package/dist/modes/interactive/components/footer.d.ts +10 -2
  340. package/dist/modes/interactive/components/footer.d.ts.map +1 -1
  341. package/dist/modes/interactive/components/footer.js +141 -66
  342. package/dist/modes/interactive/components/footer.js.map +1 -1
  343. package/dist/modes/interactive/components/mermaid.d.ts.map +1 -1
  344. package/dist/modes/interactive/components/mermaid.js +16 -3
  345. package/dist/modes/interactive/components/mermaid.js.map +1 -1
  346. package/dist/modes/interactive/components/model-selector.js +1 -1
  347. package/dist/modes/interactive/components/model-selector.js.map +1 -1
  348. package/dist/modes/interactive/components/themed-text.d.ts.map +1 -1
  349. package/dist/modes/interactive/components/themed-text.js +3 -2
  350. package/dist/modes/interactive/components/themed-text.js.map +1 -1
  351. package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
  352. package/dist/modes/interactive/components/tool-execution.js +17 -6
  353. package/dist/modes/interactive/components/tool-execution.js.map +1 -1
  354. package/dist/modes/interactive/components/user-message.d.ts.map +1 -1
  355. package/dist/modes/interactive/components/user-message.js +3 -2
  356. package/dist/modes/interactive/components/user-message.js.map +1 -1
  357. package/dist/modes/interactive/components/visual-truncate.d.ts.map +1 -1
  358. package/dist/modes/interactive/components/visual-truncate.js +4 -2
  359. package/dist/modes/interactive/components/visual-truncate.js.map +1 -1
  360. package/dist/modes/interactive/interactive-mode.d.ts +13 -17
  361. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  362. package/dist/modes/interactive/interactive-mode.js +90 -122
  363. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  364. package/dist/modes/print-mode.d.ts.map +1 -1
  365. package/dist/modes/print-mode.js +2 -5
  366. package/dist/modes/print-mode.js.map +1 -1
  367. package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
  368. package/dist/modes/rpc/rpc-mode.js +2 -3
  369. package/dist/modes/rpc/rpc-mode.js.map +1 -1
  370. package/dist/package-manager-cli.d.ts.map +1 -1
  371. package/dist/package-manager-cli.js +2 -1
  372. package/dist/package-manager-cli.js.map +1 -1
  373. package/dist/utils/child-process.d.ts.map +1 -1
  374. package/dist/utils/child-process.js +3 -2
  375. package/dist/utils/child-process.js.map +1 -1
  376. package/dist/utils/clipboard-command.d.ts.map +1 -1
  377. package/dist/utils/clipboard-command.js +3 -0
  378. package/dist/utils/clipboard-command.js.map +1 -1
  379. package/dist/utils/pi-user-agent.d.ts +1 -0
  380. package/dist/utils/pi-user-agent.d.ts.map +1 -1
  381. package/dist/utils/pi-user-agent.js +3 -2
  382. package/dist/utils/pi-user-agent.js.map +1 -1
  383. package/dist/utils/shell.d.ts.map +1 -1
  384. package/dist/utils/shell.js +45 -13
  385. package/dist/utils/shell.js.map +1 -1
  386. package/dist/utils/tools-manager.d.ts.map +1 -1
  387. package/dist/utils/tools-manager.js +4 -3
  388. package/dist/utils/tools-manager.js.map +1 -1
  389. package/docs/codemode.md +2 -2
  390. package/docs/compaction.md +3 -3
  391. package/docs/coordination.md +1 -1
  392. package/docs/custom-provider.md +53 -1
  393. package/docs/docs.json +4 -0
  394. package/docs/environment-variables.md +2 -0
  395. package/docs/extensions.md +133 -10
  396. package/docs/models-configuration.md +197 -0
  397. package/docs/models.md +21 -5
  398. package/docs/settings.md +1 -1
  399. package/docs/slash-commands.md +10 -0
  400. package/docs/tui.md +70 -0
  401. package/docs/windows.md +16 -2
  402. package/examples/extensions/custom-provider-anthropic/package.json +2 -2
  403. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  404. package/examples/extensions/gondolin/package-lock.json +2 -2
  405. package/examples/extensions/gondolin/package.json +1 -1
  406. package/examples/extensions/sandbox/package-lock.json +2 -2
  407. package/examples/extensions/sandbox/package.json +2 -2
  408. package/examples/extensions/with-deps/package.json +1 -1
  409. package/examples/plugins/pi-example-plugin/package.json +2 -2
  410. package/npm-shrinkwrap.json +243 -219
  411. package/package.json +21 -20
  412. package/schemas/models.schema.json +84 -30
  413. package/src/coordination/UPSTREAM.md +36 -3
  414. package/src/coordination/upstream.json +3 -3
  415. package/src/humain/web-access/UPSTREAM.md +72 -1
  416. package/src/humain/web-access/upstream.json +5 -4
  417. package/dist/bundle/chunks/anthropic-messages-TSNY5MWH.js +0 -67
  418. package/dist/bundle/chunks/azure-openai-responses-Z4DCXO2G.js +0 -15
  419. package/dist/bundle/chunks/chunk-26EAEXO5.js +0 -167
  420. package/dist/bundle/chunks/chunk-2ZFUMXOZ.js +0 -1790
  421. package/dist/bundle/chunks/chunk-5K5RFXXO.js +0 -74
  422. package/dist/bundle/chunks/chunk-PY7SOXCA.js +0 -10
  423. package/dist/bundle/chunks/chunk-UGJAAWNC.js +0 -7
  424. package/dist/bundle/chunks/chunk-UGXYG7HN.js +0 -22
  425. package/dist/bundle/chunks/chunk-VEYTRNQC.js +0 -5
  426. package/dist/bundle/chunks/chunk-X3O5MCKJ.js +0 -7
  427. package/dist/bundle/chunks/chunk-YLYOJQQX.js +0 -1951
  428. package/dist/bundle/chunks/cloudflare-workers-ai-system-one-MUJQ6LT2.js +0 -4
  429. package/dist/bundle/chunks/compat-VDGEZSVM.js +0 -13
  430. package/dist/bundle/chunks/dist-LKDZAEUQ.js +0 -7
  431. package/dist/bundle/chunks/es-N6YFJOD7.js +0 -1901
  432. package/dist/bundle/chunks/google-generative-ai-4OVYRP24.js +0 -21
  433. package/dist/bundle/chunks/google-vertex-3WQAZJQD.js +0 -25
  434. package/dist/bundle/chunks/host-63SNKK5Y.js +0 -2
  435. package/dist/bundle/chunks/openai-completions-IC7WRLTI.js +0 -82
  436. package/dist/bundle/chunks/openai-responses-XXCYDFSM.js +0 -24
  437. package/dist/bundle/chunks/openrouter-images-DT2HMZNO.js +0 -8
  438. package/dist/bundle/chunks/typesafe-system-one-HCMGHK6A.js +0 -2
  439. package/dist/bundle/chunks/virtual-modules-CFJTDIXL.js +0 -5
  440. package/dist/core/provider-attribution.d.ts +0 -4
  441. package/dist/core/provider-attribution.d.ts.map +0 -1
  442. package/dist/core/provider-attribution.js +0 -85
  443. package/dist/core/provider-attribution.js.map +0 -1
  444. /package/dist/bundle/chunks/{chunk-WZMA7HAJ.js → chunk-XQRYOCHA.js} +0 -0
@@ -1,5 +1,5 @@
1
1
  import { createRequire as __piCreateRequire } from "node:module"; const require = __piCreateRequire(import.meta.url);
2
- import{FileAuthStorageBackend,JSON_RPC_ERROR_CODES,LATEST_PROTOCOL_VERSION,McpAuthRequiredError,McpClient,McpError,McpHttpError,McpSessionExpiredError,StdioTransport,StreamableHttpTransport,isObject,mcpNamespace,require_proper_lockfile,resolveConfigValueOrThrow,resolveHeadersOrThrow}from"./chunk-L5OUCJ7N.js";import{APP_TITLE,ENV_MCP_CLIENT_METADATA_URL,VERSION,getAgentDir}from"./chunk-YRCLNWFV.js";import{__toESM}from"./chunk-JXWJOIH4.js";import{homedir}from"node:os";import{basename,join as join2,resolve}from"node:path";import{setTimeout as sleep}from"node:timers/promises";import{pathToFileURL}from"node:url";import{createServer}from"node:http";var ALLOWED_ERROR_CODES=new Set(["invalid_request","invalid_client","invalid_grant","unauthorized_client","unsupported_grant_type","invalid_scope","access_denied","unsupported_response_type","server_error","temporarily_unavailable","invalid_token","insufficient_scope","authorization_pending","slow_down","expired_token","invalid_redirect_uri","invalid_client_metadata","invalid_software_statement","unapproved_software_statement"]);function isAllowedOAuthErrorCode(value){return ALLOWED_ERROR_CODES.
2
+ import{FileAuthStorageBackend,JSON_RPC_ERROR_CODES,LATEST_PROTOCOL_VERSION,McpAuthRequiredError,McpClient,McpError,McpHttpError,McpSessionExpiredError,StdioTransport,StreamableHttpTransport,isObject,mcpNamespace,require_proper_lockfile,resolveConfigValueOrThrow,resolveHeadersOrThrow}from"./chunk-T3HXWZG4.js";import{APP_TITLE,ENV_MCP_CLIENT_METADATA_URL,VERSION,getAgentDir}from"./chunk-ZI7TK7HM.js";import{__toESM}from"./chunk-JXWJOIH4.js";import{homedir}from"node:os";import{basename,join as join2,resolve}from"node:path";import{setTimeout as sleep}from"node:timers/promises";import{pathToFileURL}from"node:url";import{createServer}from"node:http";var ALLOWED_ERROR_CODES=new Set(["invalid_request","invalid_client","invalid_grant","unauthorized_client","unsupported_grant_type","invalid_scope","access_denied","unsupported_response_type","server_error","temporarily_unavailable","invalid_token","insufficient_scope","authorization_pending","slow_down","expired_token","invalid_redirect_uri","invalid_client_metadata","invalid_software_statement","unapproved_software_statement"]);function isAllowedOAuthErrorCode(value){return ALLOWED_ERROR_CODES.
3
3
  has(value)}function sanitizeOAuthErrorCode(value,fallback="server_error"){return value&&ALLOWED_ERROR_CODES.has(value)?value:fallback}var OAuthError=class extends Error{code;errorUri;constructor(code,message,errorUri){super(message||code),this.name="OAuthError",this.code=code,this.errorUri=errorUri}},OAuthIssuerMismatchError=class extends Error{expected;received;constructor(expected,received){let format=issuer=>issuer===void 0?"none":JSON.stringify(issuer);super(`OAuth issuer mismatch: expected ${format(
4
4
  expected)}, received ${format(received)}`),this.name="OAuthIssuerMismatchError",this.expected=expected,this.received=received}},OAuthInsecureEndpointError=class extends Error{endpoint;constructor(endpoint){super(`Refusing to send OAuth credentials to non-HTTPS endpoint ${endpoint}`),this.name="OAuthInsecureEndpointError",this.endpoint=endpoint}},OAuthRedirectError=class extends Error{constructor(){super("OAuth endpoint redirected; refusing to follow the redirect"),this.name="OAuthRedirectError"}},
5
5
  OAuthRegistrationError=class extends Error{status;code;constructor(status,code){super(`OAuth dynamic client registration failed with status ${status}${code?`: ${code}`:""}`),this.name="OAuthRegistrationError",this.status=status,this.code=code}},McpOAuthAuthorizationRequiredError=class extends Error{constructor(){super("MCP OAuth authorization requires user interaction"),this.name="McpOAuthAuthorizationRequiredError"}};function plainText(page){return page.ok?"Authorization complete. You may close this window.":page.details?`${page.message}
@@ -52,8 +52,8 @@ horized_client"].includes(error.code))return await provider.invalidateCredential
52
52
  store=options.store??new MemoryOAuthStateStore,this.onRedirect=options.onRedirect}async state(){let existing=(await this.load()).oauthState;if(existing)return existing;let state=Buffer.from(crypto.getRandomValues(new Uint8Array(32))).toString("hex");return await this.update(value=>({...value,oauthState:state})),state}async clientInformation(){return this.configuredClient??(await this.load()).clientInformation}async saveClientInformation(information){this.configuredClient||await this.update(value=>({
53
53
  ...value,clientInformation:information}))}async tokens(){return(await this.load()).tokens}async saveTokens(tokens){let expiresAt=tokens.expires_in===void 0?void 0:Date.now()+tokens.expires_in*1e3;await this.update(value=>{let next={...value,tokens};return expiresAt===void 0?delete next.tokensExpireAt:next.tokensExpireAt=expiresAt,next})}async redirectToAuthorization(url){await this.onRedirect(url)}async saveCodeVerifier(verifier){await this.update(value=>({...value,codeVerifier:verifier}))}async codeVerifier(){
54
54
  let verifier=(await this.load()).codeVerifier;if(!verifier)throw new Error("No OAuth PKCE code verifier is stored");return verifier}async invalidateCredentials(kind){await this.update(value=>{let next={...value};return(kind==="all"||kind==="client")&&delete next.clientInformation,(kind==="all"||kind==="tokens")&&(delete next.tokens,delete next.tokensExpireAt),(kind==="all"||kind==="verifier")&&delete next.codeVerifier,(kind==="all"||kind==="discovery")&&delete next.discovery,kind==="all"&&delete next.
55
- oauthState,next})}async saveDiscoveryState(discovery){await this.update(value=>({...value,discovery}))}async discoveryState(){return(await this.load()).discovery}async load(){return await this.writes,this.own(await this.store.load())}async update(update){this.writes=this.writes.then(async()=>{await this.store.save(update(this.own(await this.store.load())))}),await this.writes}own(state){return state?.serverUrl===this.serverUrl?state:{serverUrl:this.serverUrl}}};import{createHash}from"node:crypto";import{mkdirSync}from"node:fs";import{join}from"node:path";var LOGO_SVG='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 800" aria-hidden="true"><path fill="#fff" fill-rule="evenodd" d="M165.29 165.29 H517.36 V400 H400 V517.36 H282.65 V634.72 H165.29 Z M282.65 282.65 V400 H400 V282.65 Z"/><path fill="#fff" d="M517.36 400 H634.72 V634.72 H517.36 Z"/></svg>';function escapeHtml(value){return value.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;").replaceAll("'","&#39;")}function renderPage(options){let title=escapeHtml(
56
- options.title),heading=escapeHtml(options.heading),message=escapeHtml(options.message),details=options.details?escapeHtml(options.details):void 0;return`<!doctype html>
55
+ oauthState,next})}async saveDiscoveryState(discovery){await this.update(value=>({...value,discovery}))}async discoveryState(){return(await this.load()).discovery}async load(){return await this.writes,this.own(await this.store.load())}async update(update){this.writes=this.writes.then(async()=>{await this.store.save(update(this.own(await this.store.load())))}),await this.writes}own(state){return state?.serverUrl===this.serverUrl?state:{serverUrl:this.serverUrl}}};import{createHash}from"node:crypto";import{mkdirSync}from"node:fs";import{join}from"node:path";var LOGO_SVG='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -4 15 15" role="img" aria-label="HUMAIN Code"><path fill="#fff" d="M0 0h6v1H2v5h4v1H0Zm9 0h6v7H9V6h4V1H9ZM3 2h9v1H3Zm0 2h9v1H3Z"/></svg>';function escapeHtml(value){return value.replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;").replaceAll("'","&#39;")}function renderPage(options){let title=escapeHtml(options.title),heading=escapeHtml(options.heading),message=escapeHtml(options.message),details=options.
56
+ details?escapeHtml(options.details):void 0;return`<!doctype html>
57
57
  <html lang="en">
58
58
  <head>
59
59
  <meta charset="utf-8" />
@@ -4,10 +4,10 @@ FLOW_SETUP_TERMINAL_ONLY,FLOW_SUBCOMMANDS,FooterComponent,InteractiveMode,LoginD
4
4
  compact,completeFlowArguments,convertToPng,copyToClipboard,createAgentSession,createAgentSessionFromServices,createAgentSessionRuntime,createAgentSessionServices,createBashTool,createBashToolDefinition,createCodemodeExtension,createCodingTools,createEditTool,createEditToolDefinition,createEventBus,createExtensionRuntime,createFindTool,createFindToolDefinition,createGrepTool,createGrepToolDefinition,createLocalBashOperations,createLocalPowerShellOperations,createLsTool,createLsToolDefinition,createMcpExtension,
5
5
  createPiAgentExecutionHost,createPowerShellTool,createPowerShellToolDefinition,createReadOnlyTools,createReadTool,createReadToolDefinition,createSubagentTool,createSyntheticSourceInfo,createToolSearchExtension,createWriteTool,createWriteToolDefinition,defineTool,detectSupportedImageMimeTypeFromFile,discoverAgents,discoverAndLoadExtensions,estimateTokens,executeHumainAgentRequest,findCutPoint,findTurnStartIndex,flowBuildUnavailable,formatSkillsForPrompt,generateBranchSummary,generateDiffString,generateSummary,
6
6
  generateSummaryWithUsage,generateUnifiedPatch,getFlowAccountsHost,getFlowChildLaunchHost,getFlowControlHost,getFlowTraceProducer,getLastAssistantUsage,isBashToolResult,isEditToolResult,isFindToolResult,isGrepToolResult,isLsToolResult,isPowerShellToolResult,isReadToolResult,isToolCallEventType,isWriteToolResult,loadProjectContextFiles,loadSkills,loadSkillsFromDir,main,parseArgs,parseFlowCommand,parseFrontmatter,parseSkillBlock,prepareBranchEntries,prepareChildLaunch,renderDiff,renderFlowHelp,renderTaskWithContext,
7
- resolveCliModel,resolveModelScopeWithDiagnostics,runAgentExecMode,runPrintMode,runRpcMode,serializeConversation,shouldCompact,stripFrontmatter,withFileMutationQueue,wrapRegisteredTool,wrapRegisteredTools}from"./chunk-3UXBFT4Q.js";import{ArminComponent}from"./chunk-HPSQKIWK.js";import{ProjectTrustStore,hasTrustRequiringProjectResources}from"./chunk-YMBXWW36.js";import{CURRENT_SESSION_VERSION,SessionManager,buildContextEntries,buildSessionContext,buildSessionProjection,convertToLlm,
8
- formatDimensionNote,getLatestCompactionEntry,migrateSessionEntries,parseSessionEntries,resizeImage,sessionEntryToContextMessages}from"./chunk-SCBU5WOP.js";import{DEFAULT_MAX_BYTES,DEFAULT_MAX_LINES,formatReadLineRange,formatSize,truncateHead,truncateLine,truncateTail,truncateToVisualLines}from"./chunk-NSMMDV3N.js";import{Container,SelectList,Theme,getAvailableThemes,getLanguageFromPath,getMarkdownTheme,getSelectListTheme,getSettingsListTheme,highlightCode,initTheme,keyHint,keyText,rawKeyHint}from"./chunk-OWLBGSXY.js";
9
- import{readStoredCredential}from"./chunk-L5OUCJ7N.js";import{getPowerShellConfig,getShellConfig}from"./chunk-UGXYG7HN.js";import{HUMAIN_AGENT_EXECUTION_FAILURE_CODES,HUMAIN_AGENT_EXECUTION_SCHEMA_VERSION,HumainAgentArtifactSchema,HumainAgentExecutionClaimSchema,HumainAgentExecutionControlsSchema,HumainAgentExecutionOutcomeSchema,HumainAgentExecutionRequestSchema,HumainAgentExecutionResponseSchema,HumainAgentRouteRefSchema,HumainAgentUsageSchema,parseHumainAgentExecutionRequest,parseHumainAgentExecutionResponse}from"./chunk-NCQ6WAQK.js";
10
- import{CONFIG_DIR_NAME,UPSTREAM_PI_VERSION,VERSION,getAgentDir,getDocsPath,getExamplesPath,getPackageDir,getReadmePath}from"./chunk-YRCLNWFV.js";import{__export}from"./chunk-JXWJOIH4.js";var dist_exports={};__export(dist_exports,{ACCOUNT_RETURN_COOLDOWN_MS:()=>ACCOUNT_RETURN_COOLDOWN_MS,ACCOUNT_RETURN_MAX_COOLDOWN_MS:()=>ACCOUNT_RETURN_MAX_COOLDOWN_MS,AgentExecInputError:()=>AgentExecInputError,AgentSession:()=>AgentSession,AgentSessionRuntime:()=>AgentSessionRuntime,ArminComponent:()=>ArminComponent,AssistantMessageComponent:()=>AssistantMessageComponent,BashExecutionComponent:()=>BashExecutionComponent,BorderedLoader:()=>BorderedLoader,BranchSummaryMessageComponent:()=>BranchSummaryMessageComponent,
7
+ resolveCliModel,resolveModelScopeWithDiagnostics,runAgentExecMode,runPrintMode,runRpcMode,serializeConversation,shouldCompact,stripFrontmatter,withFileMutationQueue,wrapRegisteredTool,wrapRegisteredTools}from"./chunk-A6YBWW4T.js";import{ArminComponent}from"./chunk-PS7DGA7B.js";import{ProjectTrustStore,hasTrustRequiringProjectResources}from"./chunk-DR37WKFZ.js";import{CURRENT_SESSION_VERSION,SessionManager,buildContextEntries,buildSessionContext,buildSessionProjection,convertToLlm,
8
+ formatDimensionNote,getLatestCompactionEntry,migrateSessionEntries,parseSessionEntries,resizeImage,sessionEntryToContextMessages}from"./chunk-M74U5X4S.js";import{DEFAULT_MAX_BYTES,DEFAULT_MAX_LINES,formatReadLineRange,formatSize,truncateHead,truncateLine,truncateTail,truncateToVisualLines}from"./chunk-XA7CJAYH.js";import{Container,SelectList,Theme,getAvailableThemes,getLanguageFromPath,getMarkdownTheme,getSelectListTheme,getSettingsListTheme,highlightCode,initTheme,keyHint,keyText,rawKeyHint}from"./chunk-CN3Q5UNB.js";
9
+ import{readStoredCredential}from"./chunk-T3HXWZG4.js";import{getPowerShellConfig,getShellConfig}from"./chunk-YFOLLX5D.js";import{HUMAIN_AGENT_EXECUTION_FAILURE_CODES,HUMAIN_AGENT_EXECUTION_SCHEMA_VERSION,HumainAgentArtifactSchema,HumainAgentExecutionClaimSchema,HumainAgentExecutionControlsSchema,HumainAgentExecutionOutcomeSchema,HumainAgentExecutionRequestSchema,HumainAgentExecutionResponseSchema,HumainAgentRouteRefSchema,HumainAgentUsageSchema,parseHumainAgentExecutionRequest,parseHumainAgentExecutionResponse}from"./chunk-ROZV2IYD.js";
10
+ import{CONFIG_DIR_NAME,UPSTREAM_PI_VERSION,VERSION,getAgentDir,getDocsPath,getExamplesPath,getPackageDir,getReadmePath}from"./chunk-ZI7TK7HM.js";import{__export}from"./chunk-JXWJOIH4.js";var dist_exports={};__export(dist_exports,{ACCOUNT_RETURN_COOLDOWN_MS:()=>ACCOUNT_RETURN_COOLDOWN_MS,ACCOUNT_RETURN_MAX_COOLDOWN_MS:()=>ACCOUNT_RETURN_MAX_COOLDOWN_MS,AgentExecInputError:()=>AgentExecInputError,AgentSession:()=>AgentSession,AgentSessionRuntime:()=>AgentSessionRuntime,ArminComponent:()=>ArminComponent,AssistantMessageComponent:()=>AssistantMessageComponent,BashExecutionComponent:()=>BashExecutionComponent,BorderedLoader:()=>BorderedLoader,BranchSummaryMessageComponent:()=>BranchSummaryMessageComponent,
11
11
  CONFIG_DIR_NAME:()=>CONFIG_DIR_NAME,CURRENT_SESSION_VERSION:()=>CURRENT_SESSION_VERSION,CompactionSummaryMessageComponent:()=>CompactionSummaryMessageComponent,CredentialSynchronizationError:()=>CredentialSynchronizationError,CustomEditor:()=>CustomEditor,CustomMessageComponent:()=>CustomMessageComponent,DEFAULT_COMPACTION_SETTINGS:()=>DEFAULT_COMPACTION_SETTINGS,DEFAULT_MAX_BYTES:()=>DEFAULT_MAX_BYTES,DEFAULT_MAX_LINES:()=>DEFAULT_MAX_LINES,DefaultPackageManager:()=>DefaultPackageManager,DefaultResourceLoader:()=>DefaultResourceLoader,
12
12
  DynamicBorder:()=>DynamicBorder,ExtensionEditorComponent:()=>ExtensionEditorComponent,ExtensionInputComponent:()=>ExtensionInputComponent,ExtensionRunner:()=>ExtensionRunner,ExtensionSelectorComponent:()=>ExtensionSelectorComponent,FLOW_ACCOUNT_PERSISTENCE_NOTICE:()=>FLOW_ACCOUNT_PERSISTENCE_NOTICE,FLOW_SETUP_TERMINAL_ONLY:()=>FLOW_SETUP_TERMINAL_ONLY,FLOW_SUBCOMMANDS:()=>FLOW_SUBCOMMANDS,FooterComponent:()=>FooterComponent,HUMAIN_AGENT_EXECUTION_FAILURE_CODES:()=>HUMAIN_AGENT_EXECUTION_FAILURE_CODES,
13
13
  HUMAIN_AGENT_EXECUTION_SCHEMA_VERSION:()=>HUMAIN_AGENT_EXECUTION_SCHEMA_VERSION,HumainAgentArtifactSchema:()=>HumainAgentArtifactSchema,HumainAgentExecutionClaimSchema:()=>HumainAgentExecutionClaimSchema,HumainAgentExecutionControlsSchema:()=>HumainAgentExecutionControlsSchema,HumainAgentExecutionOutcomeSchema:()=>HumainAgentExecutionOutcomeSchema,HumainAgentExecutionRequestSchema:()=>HumainAgentExecutionRequestSchema,HumainAgentExecutionResponseSchema:()=>HumainAgentExecutionResponseSchema,HumainAgentRouteRefSchema:()=>HumainAgentRouteRefSchema,
@@ -1,14 +1,14 @@
1
1
  import { createRequire as __piCreateRequire } from "node:module"; const require = __piCreateRequire(import.meta.url);
2
2
  import{BinaryDecisionDiagram,Client,Command,EndpointCache,EndpointError,HttpRequest,HttpResponse,LazyJsonString,NODE_REGION_CONFIG_FILE_OPTIONS,NODE_REGION_CONFIG_OPTIONS,NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,NoOpLogger,NormalizedSchema,NumericValue,ProviderError,REGION_ENV_NAME,REGION_INI_NAME,SelectorType,ServiceException,Sha256Node,TypeRegistry,Uint8ArrayBlobAdapter,_parseEpochTimestamp,_parseRfc3339DateTimeWithOffset,_parseRfc7231DateTime,booleanSelector,
3
3
  calculateBodyLength,client_exports,config_exports,createAggregatedClient,customEndpointFunctions,dateToUtcString,decideEndpoint,decorateServiceException,deref,emitWarningIfUnsupportedVersion,expectUnion,fromBase64,fromUtf8,generateIdempotencyToken,getDefaultExtensionConfiguration,getEndpointPlugin,getSchemaSerdePlugin,getSmithyContext,getValueFromTextNode,hasOwn,init_checksum,init_client,init_config,init_endpoints,init_schema,init_serde,init_transport,isIpAddress,isValidHostLabel,isValidHostname,
4
- loadConfig,loadConfigsForDefaultMode,makeBuilder,normalizeProvider,nv,parseEpochTimestamp,parseQueryString,parseRfc3339DateTimeWithOffset,parseRfc7231DateTime,parseUrl,quoteHeader,require_dist_cjs,resolveDefaultRuntimeConfig,resolveDefaultsModeConfig,resolveEndpoint,resolveEndpointConfig,resolveParams,resolveRegionConfig,sdkStreamMixin,serde_exports,splitEvery,splitHeader,toBase64,toUtf8,translateTraits,v4}from"./chunk-H2FY3PEV.js";import{__commonJS,__esm,__export,__require,__toCommonJS,__toESM}from"./chunk-JXWJOIH4.js";var collectBody,init_collect_stream_body=__esm({"node_modules/@smithy/core/dist-es/submodules/protocols/collect-stream-body.js"(){init_serde();collectBody=async(streamBody=new Uint8Array,context)=>{if(streamBody instanceof Uint8Array)return Uint8ArrayBlobAdapter.mutate(streamBody);if(!streamBody)return Uint8ArrayBlobAdapter.mutate(new Uint8Array);let fromContext=context.streamCollector(streamBody);return Uint8ArrayBlobAdapter.mutate(await fromContext)}}});function extendedEncodeURIComponent(str){return encodeURIComponent(str).replace(/[!'()*]/g,function(c5){return"%"+c5.charCodeAt(0).toString(16).toUpperCase()})}var init_extended_encode_uri_component=__esm({"node_modules/@smithy/core/dist-es/submodules/protocols/extended-encode-uri-component.js"(){}});var SerdeContext,init_SerdeContext=__esm({"node_modules/@smithy/core/dist-es/submodules/protocols/SerdeContext.js"(){SerdeContext=class{serdeContext;setSerdeContext(serdeContext){this.serdeContext=serdeContext}}}});var HttpProtocol,init_HttpProtocol=__esm({"node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js"(){init_transport();init_schema();init_transport();init_SerdeContext();HttpProtocol=class extends SerdeContext{options;compositeErrorRegistry;constructor(options){super(),this.options=options,this.compositeErrorRegistry=new TypeRegistry(options.defaultNamespace);for(let etr of options.errorTypeRegistries??[])this.compositeErrorRegistry.copyFrom(etr)}getRequestType(){return HttpRequest}getResponseType(){
4
+ loadConfig,loadConfigsForDefaultMode,makeBuilder,normalizeProvider,nv,parseEpochTimestamp,parseQueryString,parseRfc3339DateTimeWithOffset,parseRfc7231DateTime,parseUrl,quoteHeader,require_dist_cjs,resolveDefaultRuntimeConfig,resolveDefaultsModeConfig,resolveEndpoint,resolveEndpointConfig,resolveParams,resolveRegionConfig,sdkStreamMixin,serde_exports,splitEvery,splitHeader,toBase64,toUtf8,translateTraits,v4}from"./chunk-V62QBESW.js";import{__commonJS,__esm,__export,__require,__toCommonJS,__toESM}from"./chunk-JXWJOIH4.js";var collectBody,init_collect_stream_body=__esm({"node_modules/@smithy/core/dist-es/submodules/protocols/collect-stream-body.js"(){init_serde();collectBody=async(streamBody=new Uint8Array,context)=>{if(streamBody instanceof Uint8Array)return Uint8ArrayBlobAdapter.mutate(streamBody);if(!streamBody)return Uint8ArrayBlobAdapter.mutate(new Uint8Array);let fromContext=context.streamCollector(streamBody);return Uint8ArrayBlobAdapter.mutate(await fromContext)}}});function extendedEncodeURIComponent(str){return encodeURIComponent(str).replace(/[!'()*]/g,function(c5){return"%"+c5.charCodeAt(0).toString(16).toUpperCase()})}var init_extended_encode_uri_component=__esm({"node_modules/@smithy/core/dist-es/submodules/protocols/extended-encode-uri-component.js"(){}});var SerdeContext,init_SerdeContext=__esm({"node_modules/@smithy/core/dist-es/submodules/protocols/SerdeContext.js"(){SerdeContext=class{serdeContext;setSerdeContext(serdeContext){this.serdeContext=serdeContext}}}});var HttpProtocol,init_HttpProtocol=__esm({"node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js"(){init_transport();init_schema();init_transport();init_SerdeContext();HttpProtocol=class extends SerdeContext{options;compositeErrorRegistry;constructor(options){super(),this.options=options,this.compositeErrorRegistry=new TypeRegistry(options.defaultNamespace);for(let etr of options.errorTypeRegistries??[])this.compositeErrorRegistry.copyFrom(etr)}getRequestType(){return HttpRequest}getResponseType(){
5
5
  return HttpResponse}setSerdeContext(serdeContext){this.serdeContext=serdeContext,this.serializer.setSerdeContext(serdeContext),this.deserializer.setSerdeContext(serdeContext),this.getPayloadCodec()&&this.getPayloadCodec().setSerdeContext(serdeContext)}updateServiceEndpoint(request,endpoint){if("url"in endpoint){request.protocol=endpoint.url.protocol,request.hostname=endpoint.url.hostname,request.port=endpoint.url.port?Number(endpoint.url.port):void 0,request.path=endpoint.url.pathname,request.fragment=
6
6
  endpoint.url.hash||void 0,request.username=endpoint.url.username||void 0,request.password=endpoint.url.password||void 0,request.query||(request.query={});for(let[k5,v]of endpoint.url.searchParams.entries())request.query[k5]=v;if(endpoint.headers)for(let name in endpoint.headers)hasOwn(endpoint.headers,name)&&(request.headers[name]=endpoint.headers[name].join(", "));return request}else{if(request.protocol=endpoint.protocol,request.hostname=endpoint.hostname,request.port=endpoint.port?Number(endpoint.
7
7
  port):void 0,request.path=endpoint.path,request.query={...endpoint.query},endpoint.headers)for(let name in endpoint.headers)hasOwn(endpoint.headers,name)&&(request.headers[name]=endpoint.headers[name]);return request}}setHostPrefix(request,operationSchema,input){if(this.serdeContext?.disableHostPrefix)return;let inputNs=NormalizedSchema.of(operationSchema.input),opTraits=translateTraits(operationSchema.traits??{});if(opTraits.endpoint){let hostPrefix=opTraits.endpoint?.[0];if(typeof hostPrefix==
8
8
  "string"){for(let[name,member]of inputNs.structIterator()){if(!member.getMergedTraits().hostLabel)continue;let replacement=input[name];if(typeof replacement!="string")throw new Error(`@smithy/core/schema - ${name} in input must be a string as hostLabel.`);hostPrefix=hostPrefix.replace(`{${name}}`,replacement)}if(request.hostname=hostPrefix+request.hostname,!isValidHostname(request.hostname))throw new Error(`[${request.hostname}] is not a valid hostname.`)}}}deserializeMetadata(output){return{httpStatusCode:output.
9
9
  statusCode,requestId:output.headers["x-amzn-requestid"]??output.headers["x-amzn-request-id"]??output.headers["x-amz-request-id"],extendedRequestId:output.headers["x-amz-id-2"],cfId:output.headers["x-amz-cf-id"]}}resolveError(name,namespaces,registries){let defaultErrorSchema=[-3,"","Error",0,[],[],0],schema;for(let registry of registries)for(let ns of namespaces)try{ns==="*"?schema=registry.getSchema(name):schema=registry.getSchema(ns+"#"+name);let errorCtor=registry.getErrorCtor(schema);if(errorCtor)
10
10
  return[schema,errorCtor,"modeled"];{let syntheticErrorSchema=registry.getBaseException();if(syntheticErrorSchema){let syntheticErrorCtor=registry.getErrorCtor(syntheticErrorSchema);if(syntheticErrorCtor)return[schema,syntheticErrorCtor,"synthetic"]}}}catch{}for(let registry of registries){let syntheticErrorSchema=registry.getBaseException();if(syntheticErrorSchema){let syntheticErrorCtor=registry.getErrorCtor(syntheticErrorSchema);if(syntheticErrorCtor)return[syntheticErrorSchema,syntheticErrorCtor,
11
- "synthetic"]}}return[defaultErrorSchema,Error,"native"]}async serializeEventStream({eventStream,requestSchema,initialRequest}){return(await this.loadEventStreamCapability()).serializeEventStream({eventStream,requestSchema,initialRequest})}async deserializeEventStream({response,responseSchema,initialResponseContainer}){return(await this.loadEventStreamCapability()).deserializeEventStream({response,responseSchema,initialResponseContainer})}async loadEventStreamCapability(){let{EventStreamSerde,eventStreamSerdeProvider}=await import("./event-streams-NXFTZDSF.js"),
11
+ "synthetic"]}}return[defaultErrorSchema,Error,"native"]}async serializeEventStream({eventStream,requestSchema,initialRequest}){return(await this.loadEventStreamCapability()).serializeEventStream({eventStream,requestSchema,initialRequest})}async deserializeEventStream({response,responseSchema,initialResponseContainer}){return(await this.loadEventStreamCapability()).deserializeEventStream({response,responseSchema,initialResponseContainer})}async loadEventStreamCapability(){let{EventStreamSerde,eventStreamSerdeProvider}=await import("./event-streams-BR2IL6C5.js"),
12
12
  marshaller=this.resolveEventStreamMarshaller(eventStreamSerdeProvider);return new EventStreamSerde({marshaller,serializer:this.serializer,deserializer:this.deserializer,serdeContext:this.serdeContext,defaultContentType:this.getDefaultContentType(),compositeErrorRegistry:this.compositeErrorRegistry})}getDefaultContentType(){throw new Error(`@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.`)}async deserializeHttpMessage(schema,context,response,arg4,arg5){
13
13
  return[]}getEventStreamMarshaller(){let context=this.serdeContext;if(!context.eventStreamMarshaller)throw new Error("@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext.");return context.eventStreamMarshaller}resolveEventStreamMarshaller(importedProvider){let context=this.serdeContext;return context.eventStreamMarshaller?context.eventStreamMarshaller:importedProvider(this.serdeContext)}}}});var HttpBindingProtocol,init_HttpBindingProtocol=__esm({"node_modules/@smithy/core/dist-es/submodules/protocols/HttpBindingProtocol.js"(){init_transport();init_schema();init_serde();init_transport();init_HttpProtocol();init_collect_stream_body();init_extended_encode_uri_component();HttpBindingProtocol=class extends HttpProtocol{async serializeRequest(operationSchema,_input,context){let input=_input&&typeof _input=="object"?_input:{},serializer=this.serializer,query={},headers={},endpoint=await context.
14
14
  endpoint(),ns=NormalizedSchema.of(operationSchema?.input),payloadMemberNames=[],payloadMemberSchemas=[],hasNonHttpBindingMember=!1,payload2,request=new HttpRequest({protocol:"",hostname:"",port:void 0,path:"",fragment:void 0,query,headers,body:void 0});if(endpoint){this.updateServiceEndpoint(request,endpoint),this.setHostPrefix(request,operationSchema,input);let opTraits=translateTraits(operationSchema.traits);if(opTraits.http){request.method=opTraits.http[0];let[path,search]=opTraits.http[1].split(
@@ -75,16 +75,16 @@ new TextEncoder,OPEN_BRACE=123,CLOSE_BRACE=125,OPEN_BRACKET=91,CLOSE_BRACKET=93,
75
75
  toString(16).padStart(2,"0"));INITIAL_BUFFER_SIZE=2048;JsonShapeSerializer2=class _JsonShapeSerializer2 extends SerdeContextConfig{settings;json;i=0;rootSchema;rawValue;passthrough=!1;constructor(settings){super(),this.settings=settings,this.json=alloc(INITIAL_BUFFER_SIZE)}write(schema,value){this.i=0,this.rawValue=value,this.rootSchema=NormalizedSchema.of(schema),this.passthrough=this.rootSchema.isBlobSchema()||this.rootSchema.isStringSchema(),this.passthrough||this.writeValue(this.rootSchema,value,
76
76
  void 0)}writeDiscriminatedDocument(schema,value){this.i=0,this.rootSchema=NormalizedSchema.of(schema);let ns=this.rootSchema;if(ns.isStructSchema()&&value!=null&&typeof value=="object"){this.writeValue(ns,value,void 0);let prefix=`"__type":"${ns.getName(!0)??"Unknown"}",`,z=prefix.length;this.ensure(z),this.json.copyWithin(1+z,1,this.i),encoder.encodeInto(prefix,this.json.subarray(1)),this.i+=z}else this.writeValue(ns,value,void 0)}flush(){this.rootSchema=void 0;let finalPosition=this.i;this.i=0;
77
77
  let raw=this.rawValue;if(this.rawValue=void 0,finalPosition===0)return raw;let result=this.json.subarray(0,finalPosition);return this.json=alloc(INITIAL_BUFFER_SIZE),result}ensure(byteCount){let{i:i5,json}=this;if(i5+byteCount>json.length){let newSize=json.length*2;for(;newSize<i5+byteCount;)newSize*=2;let next=alloc(newSize);next.set(this.json),this.json=next}}writeAscii(s2){let z=s2.length;this.ensure(z);let{i:i5,json}=this;for(let j5=0;j5<z;++j5)json[i5]=s2.charCodeAt(j5),i5+=1;this.i=i5}writeAsciiQuoted(s2){
78
- let z=s2.length;this.ensure(z+4);let{json,i:i5}=this;json[i5++]=QUOTE;for(let j5=0;j5<z;++j5)json[i5++]=s2.charCodeAt(j5);json[i5++]=QUOTE,this.i=i5}writeJsonString(s2){this.ensure(s2.length*3+2),this.json[this.i++]=QUOTE;let z=s2.length;for(let j5=0;j5<z;++j5){let c5=s2.charCodeAt(j5);if(c5>34&&c5<92)this.json[this.i++]=c5;else if(c5<128){let esc=ESCAPE_TABLE[c5];if(esc!==null){this.ensure(esc.length+1),this.json[this.i++]=BACKSLASH;for(let k5=0;k5<esc.length;k5++)this.json[this.i++]=esc.charCodeAt(
79
- k5)}else this.json[this.i++]=c5}else if(c5>=55296&&c5<=56319){let next=j5+1<z?s2.charCodeAt(j5+1):0;if(next>=56320&&next<=57343){this.ensure(4);let{written}=encoder.encodeInto(s2.substring(j5,j5+2),this.json.subarray(this.i));this.i+=written,++j5}else this.ensure(6),this.writeUnicodeEscape(c5)}else if(c5>=56320&&c5<=57343)this.ensure(6),this.writeUnicodeEscape(c5);else{let{i:i5,json}=this;c5<2048?(json[i5++]=192|c5>>6,json[i5++]=128|c5&63):(json[i5++]=224|c5>>12,json[i5++]=128|c5>>6&63,json[i5++]=
80
- 128|c5&63),this.i=i5}}this.json[this.i++]=QUOTE}writeUnicodeEscape(code){let{json,i:i5}=this;json[i5++]=BACKSLASH,json[i5++]=117;let hex=code.toString(16).padStart(4,"0");for(let j5=0;j5<4;++j5)json[i5++]=hex.charCodeAt(j5);this.i=i5}static B64=(()=>{let chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",table=new Uint8Array(64);for(let i5=0;i5<64;++i5)table[i5]=chars.charCodeAt(i5);return table})();writeBase64(data){let b64Len=Math.ceil(data.length/3)*4;this.ensure(b64Len+
81
- 2);let json=this.json,B64=_JsonShapeSerializer2.B64,i5=this.i;json[i5++]=QUOTE;let len=data.length,remainder=len%3,mainLen=len-remainder;for(let j5=0;j5<mainLen;j5+=3){let a5=data[j5],b5=data[j5+1],c5=data[j5+2];json[i5++]=B64[a5>>2],json[i5++]=B64[(a5&3)<<4|b5>>4],json[i5++]=B64[(b5&15)<<2|c5>>6],json[i5++]=B64[c5&63]}if(remainder===2){let a5=data[mainLen],b5=data[mainLen+1];json[i5++]=B64[a5>>2],json[i5++]=B64[(a5&3)<<4|b5>>4],json[i5++]=B64[(b5&15)<<2],json[i5++]=61}else if(remainder===1){let a5=data[mainLen];
82
- json[i5++]=B64[a5>>2],json[i5++]=B64[(a5&3)<<4],json[i5++]=61,json[i5++]=61}json[i5++]=QUOTE,this.i=i5}writeValue(schema,value,container){if(value==null){if(container?.isStructSchema()){if(value===void 0&&NormalizedSchema.of(schema).isIdempotencyToken()){this.writeAsciiQuoted(generateIdempotencyToken());return}return}this.ensure(4),this.json.set(NULL,this.i),this.i+=4;return}let ns=NormalizedSchema.of(schema),isObject=typeof value=="object";if(ns.isStringSchema()){let mediaType=ns.getMergedTraits().
83
- mediaType;if(mediaType&&(mediaType==="application/json"||mediaType.endsWith("+json"))){this.writeJsonString(LazyJsonString.from(value).toString());return}}if(this.settings.bigNumberAsString&&value!=null&&(ns.isBigIntegerSchema()||ns.isBigDecimalSchema())){let asString=value instanceof NumericValue?value.string:String(value);this.writeAsciiQuoted(asString);return}if(isObject){if(ns.isStructSchema()){this.writeStruct(ns,value);return}if(Array.isArray(value)&&(ns.isListSchema()||ns.isDocumentSchema())){
84
- this.writeList(ns,value,ns.isDocumentSchema());return}if(ns.isMapSchema()){this.writeMap(ns,value,!1);return}if(value instanceof Uint8Array&&(ns.isBlobSchema()||ns.isDocumentSchema())){this.writeBase64(value);return}if(value instanceof Date&&(ns.isTimestampSchema()||ns.isDocumentSchema())){this.writeTimestamp(ns,value);return}if(value instanceof NumericValue){this.writeAscii(value.string);return}if(ns.isDocumentSchema()){Array.isArray(value)?this.writeList(ns,value,!0):this.writeMap(ns,value,!0);
85
- return}let json=JSON.stringify(value);this.writeAscii(json);return}if(typeof value=="string"){if(ns.isBlobSchema()){let b64=(this.serdeContext?.base64Encoder??toBase64)(value);this.writeAsciiQuoted(b64);return}this.writeJsonString(value);return}if(typeof value=="number"){if(Math.abs(value)===1/0||Number.isNaN(value)){this.writeAsciiQuoted(String(value));return}let numStr=String(value);this.writeAscii(numStr);return}if(typeof value=="boolean"){this.ensure(5);let{i:i5,json}=this;value?(json.set(TRUE,
86
- i5),i5+=4):(json.set(FALSE,i5),i5+=5),this.i=i5;return}if(typeof value=="bigint"){this.writeAscii(value.toString());return}this.writeAscii(String(value))}writeStruct(ns,value){this.ensure(2),this.json[this.i++]=OPEN_BRACE;let wroteAny=!1,hasType=typeof value.__type=="string",writtenKeys;hasType&&(writtenKeys=new Set);for(let[memberName,memberSchema]of ns.structIterator()){let item=value[memberName];if(item==null&&!memberSchema.isIdempotencyToken())continue;wroteAny&&(this.ensure(1),this.json[this.
87
- i++]=COMMA),wroteAny=!0;let targetKey=this.settings.jsonName?memberSchema.getMergedTraits().jsonName??memberName:memberName;writtenKeys&&(writtenKeys.add(memberName),writtenKeys.add(targetKey)),this.writeAsciiQuoted(targetKey),this.json[this.i++]=COLON,this.writeValue(memberSchema,item,ns)}if(!wroteAny&&ns.isUnionSchema()){let{$unknown}=value;if(Array.isArray($unknown)){let[k5,v]=$unknown;this.writeAsciiQuoted(k5),this.ensure(1),this.json[this.i++]=COLON,this.writeValue(15,v,ns)}}else if(hasType)
78
+ let z=s2.length;this.ensure(z+4);let{json,i:i5}=this;json[i5++]=QUOTE;for(let j5=0;j5<z;++j5)json[i5++]=s2.charCodeAt(j5);json[i5++]=QUOTE,this.i=i5}writeJsonString(s2){let z=s2.length;this.ensure(z*3+2),this.json[this.i++]=QUOTE;for(let j5=0;j5<z;++j5){let c5=s2.charCodeAt(j5);if(c5>34&&c5<92)this.json[this.i++]=c5;else if(c5<128){let esc=ESCAPE_TABLE[c5];if(esc!==null){this.ensure(esc.length+1+(z-j5-1)*3+1),this.json[this.i++]=BACKSLASH;for(let k5=0;k5<esc.length;k5++)this.json[this.i++]=esc.charCodeAt(
79
+ k5)}else this.json[this.i++]=c5}else if(c5>=55296&&c5<=56319){let next=j5+1<z?s2.charCodeAt(j5+1):0;if(next>=56320&&next<=57343){this.ensure(4);let{written}=encoder.encodeInto(s2.substring(j5,j5+2),this.json.subarray(this.i));this.i+=written,++j5}else this.ensure(6+(z-j5-1)*3+1),this.writeUnicodeEscape(c5)}else if(c5>=56320&&c5<=57343)this.ensure(6+(z-j5-1)*3+1),this.writeUnicodeEscape(c5);else{let{i:i5,json}=this;c5<2048?(json[i5++]=192|c5>>6,json[i5++]=128|c5&63):(json[i5++]=224|c5>>12,json[i5++]=
80
+ 128|c5>>6&63,json[i5++]=128|c5&63),this.i=i5}}this.json[this.i++]=QUOTE}writeUnicodeEscape(code){let{json,i:i5}=this;json[i5++]=BACKSLASH,json[i5++]=117;let hex=code.toString(16).padStart(4,"0");for(let j5=0;j5<4;++j5)json[i5++]=hex.charCodeAt(j5);this.i=i5}static B64=(()=>{let chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",table=new Uint8Array(64);for(let i5=0;i5<64;++i5)table[i5]=chars.charCodeAt(i5);return table})();writeBase64(data){let b64Len=Math.ceil(data.length/
81
+ 3)*4;this.ensure(b64Len+2);let json=this.json,B64=_JsonShapeSerializer2.B64,i5=this.i;json[i5++]=QUOTE;let len=data.length,remainder=len%3,mainLen=len-remainder;for(let j5=0;j5<mainLen;j5+=3){let a5=data[j5],b5=data[j5+1],c5=data[j5+2];json[i5++]=B64[a5>>2],json[i5++]=B64[(a5&3)<<4|b5>>4],json[i5++]=B64[(b5&15)<<2|c5>>6],json[i5++]=B64[c5&63]}if(remainder===2){let a5=data[mainLen],b5=data[mainLen+1];json[i5++]=B64[a5>>2],json[i5++]=B64[(a5&3)<<4|b5>>4],json[i5++]=B64[(b5&15)<<2],json[i5++]=61}else if(remainder===
82
+ 1){let a5=data[mainLen];json[i5++]=B64[a5>>2],json[i5++]=B64[(a5&3)<<4],json[i5++]=61,json[i5++]=61}json[i5++]=QUOTE,this.i=i5}writeValue(schema,value,container){if(value==null){if(container?.isStructSchema()){if(value===void 0&&NormalizedSchema.of(schema).isIdempotencyToken()){this.writeAsciiQuoted(generateIdempotencyToken());return}return}this.ensure(4),this.json.set(NULL,this.i),this.i+=4;return}let ns=NormalizedSchema.of(schema),isObject=typeof value=="object";if(ns.isStringSchema()){let mediaType=ns.
83
+ getMergedTraits().mediaType;if(mediaType&&(mediaType==="application/json"||mediaType.endsWith("+json"))){this.writeJsonString(LazyJsonString.from(value).toString());return}}if(this.settings.bigNumberAsString&&value!=null&&(ns.isBigIntegerSchema()||ns.isBigDecimalSchema())){let asString=value instanceof NumericValue?value.string:String(value);this.writeAsciiQuoted(asString);return}if(isObject){if(ns.isStructSchema()){this.writeStruct(ns,value);return}if(Array.isArray(value)&&(ns.isListSchema()||ns.
84
+ isDocumentSchema())){this.writeList(ns,value,ns.isDocumentSchema());return}if(ns.isMapSchema()){this.writeMap(ns,value,!1);return}if(value instanceof Uint8Array&&(ns.isBlobSchema()||ns.isDocumentSchema())){this.writeBase64(value);return}if(value instanceof Date&&(ns.isTimestampSchema()||ns.isDocumentSchema())){this.writeTimestamp(ns,value);return}if(value instanceof NumericValue){this.writeAscii(value.string);return}if(ns.isDocumentSchema()){Array.isArray(value)?this.writeList(ns,value,!0):this.
85
+ writeMap(ns,value,!0);return}let json=JSON.stringify(value);this.writeAscii(json);return}if(typeof value=="string"){if(ns.isBlobSchema()){let b64=(this.serdeContext?.base64Encoder??toBase64)(value);this.writeAsciiQuoted(b64);return}this.writeJsonString(value);return}if(typeof value=="number"){if(Math.abs(value)===1/0||Number.isNaN(value)){this.writeAsciiQuoted(String(value));return}let numStr=String(value);this.writeAscii(numStr);return}if(typeof value=="boolean"){this.ensure(5);let{i:i5,json}=this;
86
+ value?(json.set(TRUE,i5),i5+=4):(json.set(FALSE,i5),i5+=5),this.i=i5;return}if(typeof value=="bigint"){this.writeAscii(value.toString());return}this.writeAscii(String(value))}writeStruct(ns,value){this.ensure(2),this.json[this.i++]=OPEN_BRACE;let wroteAny=!1,hasType=typeof value.__type=="string",writtenKeys;hasType&&(writtenKeys=new Set);for(let[memberName,memberSchema]of ns.structIterator()){let item=value[memberName];if(item==null&&!memberSchema.isIdempotencyToken())continue;wroteAny&&(this.ensure(
87
+ 1),this.json[this.i++]=COMMA),wroteAny=!0;let targetKey=this.settings.jsonName?memberSchema.getMergedTraits().jsonName??memberName:memberName;writtenKeys&&(writtenKeys.add(memberName),writtenKeys.add(targetKey)),this.writeAsciiQuoted(targetKey),this.json[this.i++]=COLON,this.writeValue(memberSchema,item,ns)}if(!wroteAny&&ns.isUnionSchema()){let{$unknown}=value;if(Array.isArray($unknown)){let[k5,v]=$unknown;this.writeAsciiQuoted(k5),this.ensure(1),this.json[this.i++]=COLON,this.writeValue(15,v,ns)}}else if(hasType)
88
88
  for(let k5 in value){if(writtenKeys.has(k5))continue;writtenKeys.add(k5);let v=value[k5];wroteAny&&(this.ensure(1),this.json[this.i++]=COMMA),wroteAny=!0,this.writeAsciiQuoted(k5),this.ensure(1),this.json[this.i++]=COLON,this.writeValue(15,v,void 0)}this.ensure(1),this.json[this.i++]=CLOSE_BRACE}writeList(ns,value,isDocument){let sparse=!!ns.getMergedTraits().sparse,valueSchema=ns.getValueSchema();if(!isDocument&&(valueSchema.isStringSchema()||valueSchema.isNumericSchema()||valueSchema.isBooleanSchema())){
89
89
  let hasSpecials=!1;for(let i5=0;i5<value.length;++i5){let v=value[i5];if(Number.isNaN(v)||v===1/0||v===-1/0||v==null&&!sparse){hasSpecials=!0;break}}let json;if(!hasSpecials)json=JSON.stringify(value);else{let out=[];for(let i5=0;i5<value.length;++i5){let v=value[i5];v==null&&!sparse||(Number.isNaN(v)||v===1/0||v===-1/0?out.push(String(v)):out.push(v))}json=JSON.stringify(out)}this.ensure(json.length*3),this.i+=encoder.encodeInto(json,this.json.subarray(this.i)).written;return}this.ensure(2),this.
90
90
  json[this.i++]=OPEN_BRACKET;let wroteFirstItem=!1;for(let i5=0;i5<value.length;++i5){let item=value[i5];(isDocument?item===void 0:item==null&&!sparse)||(wroteFirstItem&&(this.ensure(1),this.json[this.i++]=COMMA),this.writeValue(valueSchema,item,void 0),wroteFirstItem=!0)}this.ensure(1),this.json[this.i++]=CLOSE_BRACKET}writeMap(ns,value,isDocument){let sparse=!!ns.getMergedTraits().sparse,valueSchema=ns.getValueSchema();if(!isDocument&&(valueSchema.isStringSchema()||valueSchema.isNumericSchema()||
@@ -335,7 +335,7 @@ ref=useIsolatedSession?this.connectionManager.createIsolatedSession(requestConte
335
335
  tion"){let signal=abortSignal;signal.addEventListener("abort",onAbort,{once:!0}),clientHttp2Stream.once("close",()=>signal.removeEventListener("abort",onAbort))}else abortSignal.onabort=onAbort}clientHttp2Stream.on("frameError",(type,code,id)=>{rejectWithDestroy(new Error(`Frame type id ${type} in stream id ${id} has failed with code ${code}.`))}),clientHttp2Stream.on("error",rejectWithDestroy),clientHttp2Stream.on("aborted",()=>{rejectWithDestroy(new Error(`HTTP/2 stream is abnormally aborted i\
336
336
  n mid-communication with result code ${clientHttp2Stream.rstCode}.`))}),clientHttp2Stream.on("response",headers=>{let httpResponse=new HttpResponse2({statusCode:headers[":status"]??-1,headers:getTransformedHeaders(headers),body:clientHttp2Stream});fulfilled=!0,resolve({response:httpResponse}),useIsolatedSession&&(session.close(),clientHttp2Stream.on("end",()=>{ref.destroy()}))}),clientHttp2Stream.on("close",()=>{if(useIsolatedSession?ref.destroy():this.connectionManager.release(requestContext,ref),
337
337
  !fulfilled){let error=new Error("Unexpected error: http2 request did not get a response");session.destroyed&&(error.name="TimeoutError"),rejectWithDestroy(error)}}),writeRequestBodyPromise=writeRequestBody(clientHttp2Stream,request,effectiveRequestTimeout)})}updateHttpClientConfig(key,value){this.config=void 0,this.configProvider=this.configProvider.then(config=>({...config,[key]:value}))}httpHandlerConfigs(){return this.config??{}}};exports.DEFAULT_REQUEST_TIMEOUT=DEFAULT_REQUEST_TIMEOUT;exports.
338
- NodeHttp2Handler=NodeHttp2Handler;exports.NodeHttpHandler=NodeHttpHandler}});var tagSymbol,init_cbor_types=__esm({"node_modules/@smithy/core/dist-es/submodules/cbor/cbor-types.js"(){tagSymbol=Symbol("@smithy/core/cbor::tagSymbol")}});var loadSmithyRpcV2CborErrorCode,init_parseCborBody=__esm({"node_modules/@smithy/core/dist-es/submodules/cbor/parseCborBody.js"(){loadSmithyRpcV2CborErrorCode=(output,data)=>{let sanitizeErrorCode3=rawValue=>{let cleanValue=rawValue;return typeof cleanValue=="number"&&(cleanValue=cleanValue.toString()),cleanValue.indexOf(",")>=0&&(cleanValue=cleanValue.split(",")[0]),cleanValue.indexOf(":")>=0&&(cleanValue=cleanValue.split(":")[0]),cleanValue};if(data.__type!==void 0)return sanitizeErrorCode3(data.
338
+ NodeHttp2Handler=NodeHttp2Handler;exports.NodeHttpHandler=NodeHttpHandler}});var tagSymbol,init_cbor_types=__esm({"node_modules/@smithy/core/dist-es/submodules/cbor/cbor-types.js"(){tagSymbol=Symbol("@smithy/core/cbor::tagSymbol")}});var loadSmithyRpcV2CborErrorCode,init_parseCborBody=__esm({"node_modules/@smithy/core/dist-es/submodules/cbor/parseCborBody.js"(){loadSmithyRpcV2CborErrorCode=(output,data)=>{let sanitizeErrorCode2=rawValue=>{let cleanValue=rawValue;return typeof cleanValue=="number"&&(cleanValue=cleanValue.toString()),cleanValue.indexOf(",")>=0&&(cleanValue=cleanValue.split(",")[0]),cleanValue.indexOf(":")>=0&&(cleanValue=cleanValue.split(":")[0]),cleanValue};if(data.__type!==void 0)return sanitizeErrorCode2(data.
339
339
  __type)}}});function loadCborStructIterator(ns){let schema=ns.getSchema(),existing=schema[CBOR_STRUCT_CACHE];if(existing)return existing;let memberNames=[],memberSchemas=[];for(let[name,memberSchema]of ns.structIterator())memberNames.push(name),memberSchemas.push(memberSchema);let encodedKeys=new Array(memberNames.length);for(let i5=0;i5<memberNames.length;++i5)encodedKeys[i5]=encodeCborStringKey(memberNames[i5]);let cache5={memberNames,memberSchemas,encodedKeys};return schema[CBOR_STRUCT_CACHE]=cache5,cache5}
340
340
  function encodeCborStringKey(s2){let utf8Bytes;USE_BUFFER?utf8Bytes=Buffer.from(s2,"utf-8"):utf8Bytes=new TextEncoder().encode(s2);let byteLen=utf8Bytes.length,headerSize;byteLen<24?headerSize=1:byteLen<256?headerSize=2:headerSize=3;let result=new Uint8Array(headerSize+byteLen);return headerSize===1?result[0]=96|byteLen:headerSize===2?(result[0]=120,result[1]=byteLen):(result[0]=121,result[1]=byteLen>>8,result[2]=byteLen&255),result.set(utf8Bytes,headerSize),result}function allocUnsafe(size){return USE_BUFFER?
341
341
  Buffer.allocUnsafe(size):new Uint8Array(size)}function writeValue(ns,value,container,serdeContext){if(value==null){if(value===void 0&&ns.isIdempotencyToken()){writeString(generateIdempotencyToken());return}ensure(1),buf[cursor++]=246;return}if(ns.isUnitSchema()){ensure(1),encodeHeader(5,0);return}if(typeof value=="object"){if(ns.isBlobSchema()&&value instanceof Uint8Array){writeBytes(value);return}if(ns.isTimestampSchema()&&value instanceof Date){writeTimestamp(value);return}if(ns.isStructSchema()){
@@ -396,76 +396,19 @@ Type]=queryErrorHeader.split(";"),keys=Object.keys(output),Error2={Code,Type};ou
396
396
  Code)}findQueryCompatibleError(registry,errorName){try{return registry.getSchema(errorName)}catch{return registry.find(schema=>NormalizedSchema.of(schema).getMergedTraits().awsQueryError?.[0]===errorName)}}}}});var AwsSmithyRpcV2CborProtocol,init_AwsSmithyRpcV2CborProtocol=__esm({"node_modules/@aws-sdk/core/dist-es/submodules/protocols/cbor/AwsSmithyRpcV2CborProtocol.js"(){init_cbor();init_schema();init_ProtocolLib();AwsSmithyRpcV2CborProtocol=class extends SmithyRpcV2CborProtocol{awsQueryCompatible;mixin;constructor({defaultNamespace,errorTypeRegistries:errorTypeRegistries5,awsQueryCompatible}){super({defaultNamespace,errorTypeRegistries:errorTypeRegistries5}),this.awsQueryCompatible=!!awsQueryCompatible,
397
397
  this.mixin=new ProtocolLib(this.awsQueryCompatible)}async serializeRequest(operationSchema,input,context){let request=await super.serializeRequest(operationSchema,input,context);return this.awsQueryCompatible&&(request.headers["x-amzn-query-mode"]="true"),request}async handleError(operationSchema,context,response,dataObject,metadata){this.awsQueryCompatible&&this.mixin.setQueryCompatError(dataObject,response);let errorName=(()=>{let compatHeader=response.headers["x-amzn-query-error"];return compatHeader&&
398
398
  this.awsQueryCompatible?compatHeader.split(";")[0]:loadSmithyRpcV2CborErrorCode(response,dataObject)??"Unknown"})();this.mixin.compose(this.compositeErrorRegistry,errorName,this.options.defaultNamespace);let{errorSchema,errorMetadata}=await this.mixin.getErrorSchemaOrThrowBaseException(errorName,this.options.defaultNamespace,response,dataObject,metadata,this.awsQueryCompatible?this.mixin.findQueryCompatibleError:void 0),ns=NormalizedSchema.of(errorSchema),message=dataObject.message??dataObject.Message??
399
- "UnknownError",ErrorCtor=this.compositeErrorRegistry.getErrorCtor(errorSchema)??Error,exception=new ErrorCtor({}),output={};for(let[name,member]of ns.structIterator())dataObject[name]!=null&&(output[name]=this.deserializer.readValue(member,dataObject[name]));throw this.awsQueryCompatible&&this.mixin.queryCompatOutput(dataObject,output),this.mixin.decorateServiceException(Object.assign(exception,errorMetadata,{$fault:ns.getMergedTraits().error,message},output),dataObject)}}}});var SerdeContextConfig2,init_ConfigurableSerdeContext2=__esm({"node_modules/@aws-sdk/core/dist-es/submodules/protocols/ConfigurableSerdeContext.js"(){SerdeContextConfig2=class{serdeContext;setSerdeContext(serdeContext){this.serdeContext=serdeContext}}}});var UnionSerde2,init_UnionSerde2=__esm({"node_modules/@aws-sdk/core/dist-es/submodules/protocols/UnionSerde.js"(){UnionSerde2=class{from;to;keys;constructor(from,to){this.from=from,this.to=to;let keys=Object.keys(this.from),set=new Set(keys);set.delete("__type"),this.keys=set}mark(key){this.keys.delete(key)}hasUnknown(){return this.keys.size===1&&Object.keys(this.to).length===0}writeUnknown(){if(this.hasUnknown()){let k5=this.keys.values().next().value,v=this.from[k5];this.to.$unknown=[k5,v]}}}}});function detectBufferParsing2(){if(canParseBuffer2===void 0)try{if(typeof Buffer!="function")canParseBuffer2=!1;else{let result=JSON.parse(Buffer.from([123,125]));canParseBuffer2=result!==null&&typeof result=="object"}}catch{canParseBuffer2=!1}return canParseBuffer2}var canParseBuffer2,init_detectBufferParsing2=__esm({"node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/detectBufferParsing.js"(){}});function jsonReviver2(key,value,context){if(context?.source){let numericString=context.source;if(typeof value=="number")return value<=Number.MAX_SAFE_INTEGER&&value>=Number.MIN_SAFE_INTEGER?isRepresentable2(numericString,value)?value:new NumericValue(numericString,"bigDecimal"):isFractionalBigNumeric2(numericString)?new NumericValue(numericString,"bigDecimal"):/[eE]/.test(numericString)?expandExponentToBigInt2(numericString):BigInt(numericString)}return value}function isFractionalBigNumeric2(s2){
400
- let dotIndex=s2.indexOf(".");if(dotIndex===-1)return!1;let eIndex=s2.search(/[eE]/);if(eIndex===-1)return!0;let fracDigits=eIndex-dotIndex-1;return parseInt(s2.slice(eIndex+1),10)<fracDigits}function isRepresentable2(numericString,value){if(numericString===String(value)||Object.is(value,-0))return!0;if(/[eE]/.test(numericString))return expandToDecimal2(numericString)===expandToDecimal2(String(value));let normalized=numericString.replace(/(\.\d*?)0+$/,"$1").replace(/\.$/,""),canonical=String(value);
401
- return normalized===canonical?!0:/[eE]/.test(canonical)?normalized===expandToDecimal2(canonical):!1}function expandToDecimal2(s2){let negative=s2.startsWith("-"),abs=negative?s2.slice(1):s2,eIndex=abs.search(/[eE]/),result;if(eIndex===-1)result=abs;else{let exp=parseInt(abs.slice(eIndex+1),10),mantissa=abs.slice(0,eIndex),dotIndex=mantissa.indexOf("."),digits,intLen;dotIndex===-1?(digits=mantissa,intLen=mantissa.length):(digits=mantissa.slice(0,dotIndex)+mantissa.slice(dotIndex+1),intLen=dotIndex),
402
- digits=digits.replace(/0+$/,"")||"0";let newDotPos=intLen+exp;digits==="0"?result="0":newDotPos<=0?result="0."+"0".repeat(-newDotPos)+digits:newDotPos>=digits.length?result=digits+"0".repeat(newDotPos-digits.length):result=digits.slice(0,newDotPos)+"."+digits.slice(newDotPos)}return result.includes(".")&&(result=result.replace(/(\.\d*?)0+$/,"$1").replace(/\.$/,"")),(negative?"-":"")+result}function expandExponentToBigInt2(s2){let eIndex=s2.search(/[eE]/),exp=parseInt(s2.slice(eIndex+1),10),negative=s2.
403
- startsWith("-"),mantissa=s2.slice(negative?1:0,eIndex),dotIndex=mantissa.indexOf("."),digits,shift;if(dotIndex===-1)digits=mantissa,shift=exp;else{digits=mantissa.slice(0,dotIndex)+mantissa.slice(dotIndex+1);let fracDigits=mantissa.length-dotIndex-1;shift=exp-fracDigits}digits=digits.replace(/0+$/,"")||"0";let result=BigInt(digits)*10n**BigInt(shift+(mantissa.replace(".","").length-digits.length));return negative?-result:result}var init_jsonReviver2=__esm({"node_modules/@aws-sdk/core/dist-es/sub\
404
- modules/protocols/json/jsonReviver.js"(){init_serde()}});function needsReviver2(schema){let ns=NormalizedSchema.of(schema),raw=ns.getSchema();if(Array.isArray(raw)&&ns.isStructSchema()){if(REVIVER_SYMBOL2 in raw)return raw[REVIVER_SYMBOL2];let result=_check2(ns,new Set);return raw[REVIVER_SYMBOL2]=result,result}return _check2(ns,new Set)}function _check2(ns,seen){let raw=ns.getSchema();if(seen.has(raw))return!1;if(seen.add(raw),ns.isBigIntegerSchema()||ns.isBigDecimalSchema())return!0;if(ns.isStructSchema()){for(let[,memberSchema]of ns.structIterator())
405
- if(_check2(memberSchema,seen))return!0}else if(ns.isListSchema()||ns.isMapSchema()){if(_check2(ns.getValueSchema(),seen))return!0}else if(ns.isDocumentSchema())return!0;return!1}var REVIVER_SYMBOL2,init_needsReviver2=__esm({"node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/needsReviver.js"(){init_schema();REVIVER_SYMBOL2=Symbol.for("@aws-sdk/reviver")}});var collectBodyString2,init_common2=__esm({"node_modules/@aws-sdk/core/dist-es/submodules/protocols/common.js"(){init_protocols();init_serde();collectBodyString2=(streamBody,context)=>collectBody(streamBody,context).then(body=>(context?.utf8Encoder??toUtf8)(body))}});async function parseJsonBody2(streamBody,context,schema){let parsingInput;if(detectBufferParsing2()&&typeof streamBody?.[Symbol.asyncIterator]=="function"){let buffer=await collectBody(streamBody,context);typeof Buffer=="function"&&(Buffer.isBuffer(buffer)?parsingInput=buffer:parsingInput=Buffer.from(buffer.buffer,buffer.byteOffset,buffer.byteLength))}if(parsingInput||(parsingInput=await collectBodyString2(streamBody,context)),parsingInput.length===0)return{};let reviver=schema&&needsReviver2(schema)?
406
- jsonReviver2:void 0;try{return JSON.parse(parsingInput,reviver)}catch(e5){throw e5?.name==="SyntaxError"&&Object.defineProperty(e5,"$responseBodyText",{value:typeof parsingInput=="string"?parsingInput:parsingInput.toString("utf8")}),e5}}var parseJsonErrorBody2,findKey2,sanitizeErrorCode2,loadRestJsonErrorCode2,loadJsonRpcErrorCode2,loadErrorCode2,init_parseJsonBody2=__esm({"node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/parseJsonBody.js"(){init_protocols();init_common2();init_detectBufferParsing2();
407
- init_jsonReviver2();init_needsReviver2();parseJsonErrorBody2=async(errorBody,context)=>{let value=await parseJsonBody2(errorBody,context);return value.message=value.message??value.Message,value},findKey2=(object,key)=>Object.keys(object).find(k5=>k5.toLowerCase()===key.toLowerCase()),sanitizeErrorCode2=rawValue=>{let cleanValue=rawValue;return typeof cleanValue=="number"&&(cleanValue=cleanValue.toString()),cleanValue.indexOf(",")>=0&&(cleanValue=cleanValue.split(",")[0]),cleanValue.indexOf(":")>=
408
- 0&&(cleanValue=cleanValue.split(":")[0]),cleanValue.indexOf("#")>=0&&(cleanValue=cleanValue.split("#")[1]),cleanValue},loadRestJsonErrorCode2=(output,data)=>loadErrorCode2(output,data,["header","code","type"]),loadJsonRpcErrorCode2=(output,data,queryCompat=!1)=>loadErrorCode2(output,data,queryCompat?["code","header","type"]:["type","code","header"]),loadErrorCode2=({headers},data,order)=>{for(;order.length>0;)switch(order.shift()){case"header":let headerKey=findKey2(headers??{},"x-amzn-errortype");
409
- if(headerKey!==void 0)return sanitizeErrorCode2(headers[headerKey]);break;case"code":let codeKey=findKey2(data??{},"code");if(codeKey&&data[codeKey]!==void 0)return sanitizeErrorCode2(data[codeKey]);break;case"type":if(data?.__type!==void 0)return sanitizeErrorCode2(data.__type);break}}}});function writeKey2(obj){Object.defineProperty(obj,"__proto__",{value:void 0,writable:!0,enumerable:!0,configurable:!0})}var init_writeKey2=__esm({"node_modules/@aws-sdk/core/dist-es/submodules/protocols/writeKey.js"(){}});var JsonShapeDeserializer22,init_JsonShapeDeserializer22=__esm({"node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v2/JsonShapeDeserializer2.js"(){init_protocols();init_schema();init_serde();init_ConfigurableSerdeContext2();init_UnionSerde2();init_detectBufferParsing2();init_jsonReviver2();init_needsReviver2();init_parseJsonBody2();init_writeKey2();JsonShapeDeserializer22=class extends SerdeContextConfig2{settings;constructor(settings){super(),this.settings=settings}async read(schema,data){
410
- let reviver=needsReviver2(schema)?jsonReviver2:void 0,parsed;if(typeof data=="string"){if(data.length===0)return{};parsed=JSON.parse(data,reviver)}else if(data instanceof Uint8Array&&detectBufferParsing2()){if(data.byteLength===0)return{};let buf2=Buffer.isBuffer(data)?data:Buffer.from(data.buffer,data.byteOffset,data.byteLength);parsed=JSON.parse(buf2,reviver)}else parsed=await parseJsonBody2(data,this.serdeContext,schema);return this._read(schema,parsed)}readObject(schema,data){return this._read(
411
- schema,data)}_read(schema,value){let isObject=value!==null&&typeof value=="object",ns=NormalizedSchema.of(schema);if(isObject){if(ns.isStructSchema())return this._readStruct(ns,value);if(Array.isArray(value)&&ns.isListSchema()){let listMember=ns.getValueSchema();if(this.needsTransform(listMember))for(let i5=0;i5<value.length;++i5)value[i5]=this._read(listMember,value[i5]);return value}if(ns.isMapSchema()){let mapMember=ns.getValueSchema(),map=value;if(this.needsTransform(mapMember))for(let k5 in map)
412
- k5==="__proto__"&&writeKey2(map),map[k5]=this._read(mapMember,map[k5]);return map}}if(ns.isBlobSchema()&&typeof value=="string")return fromBase64(value);let mediaType=ns.getMergedTraits().mediaType;if(ns.isStringSchema()&&typeof value=="string"&&mediaType)return mediaType==="application/json"||mediaType.endsWith("+json")?LazyJsonString.from(value):value;if(ns.isTimestampSchema()&&value!=null)switch(determineTimestampFormat(ns,this.settings)){case 5:return parseRfc3339DateTimeWithOffset(value);case 6:
413
- return parseRfc7231DateTime(value);case 7:return parseEpochTimestamp(value);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",value),new Date(value)}if(ns.isBigIntegerSchema()&&(typeof value=="number"||typeof value=="string"))return BigInt(value);if(ns.isBigDecimalSchema()&&value!=null){if(value instanceof NumericValue)return value;let untyped=value;return untyped.type==="bigDecimal"&&"string"in untyped?new NumericValue(untyped.string,untyped.type):new NumericValue(
414
- String(value),"bigDecimal")}if(ns.isNumericSchema()&&typeof value=="string"){switch(value){case"Infinity":return 1/0;case"-Infinity":return-1/0;case"NaN":return NaN}return value}if(ns.isDocumentSchema()&&isObject)if(Array.isArray(value))for(let i5=0;i5<value.length;++i5){let v=value[i5];v instanceof NumericValue||(value[i5]=this._read(ns,v))}else{let doc=value;for(let k5 in doc){k5==="__proto__"&&writeKey2(doc);let v=doc[k5];v instanceof NumericValue||(doc[k5]=this._read(ns,v))}}return value}_readStruct(ns,record){
415
- let union=ns.isUnionSchema(),out={},nameMap,hasType=typeof record.__type=="string",{jsonName}=this.settings;jsonName&&hasType&&(nameMap={});let unionSerde;union&&(unionSerde=new UnionSerde2(record,out));for(let[memberName,memberSchema]of ns.structIterator()){let fromKey=memberName;jsonName&&(fromKey=memberSchema.getMergedTraits().jsonName??fromKey,hasType&&(nameMap[fromKey]=memberName)),union&&unionSerde.mark(fromKey),record[fromKey]!=null&&(out[memberName]=this._read(memberSchema,record[fromKey]))}
416
- if(union)unionSerde.writeUnknown();else if(hasType)for(let k5 in record){let v=record[k5],t=jsonName?nameMap[k5]??k5:k5;t in out||(out[t]=v)}return out}needsTransform(ns){return!!(ns.isBlobSchema()||ns.isTimestampSchema()||ns.isBigIntegerSchema()||ns.isBigDecimalSchema()||ns.isDocumentSchema()||ns.isStructSchema()||ns.isListSchema()||ns.isMapSchema()||ns.isStringSchema()&&ns.getMergedTraits().mediaType)}}}});var JsonBytesStringAdapter2,warned2,init_JsonBytesStringAdapter2=__esm({"node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v2/JsonBytesStringAdapter.js"(){init_serde();JsonBytesStringAdapter2=class _JsonBytesStringAdapter extends Uint8Array{string=null;static allocUnsafe(bytes){if(typeof Buffer=="function"){let buffer=Buffer.allocUnsafe(bytes);return new _JsonBytesStringAdapter(buffer.buffer,buffer.byteOffset,buffer.byteLength)}return new _JsonBytesStringAdapter(bytes)}toString(){
417
- return this.s()}valueOf(){return this.s()}includes(searchString,position){return typeof searchString=="string"?this.s().includes(searchString,position):Uint8Array.prototype.includes.call(this,searchString,position)}indexOf(searchString,position){return typeof searchString=="string"?this.s().indexOf(searchString,position):Uint8Array.prototype.indexOf.call(this,searchString,position)}lastIndexOf(searchString,position){if(typeof searchString=="string")return this.s().lastIndexOf(searchString,position);
418
- let fn=Uint8Array.prototype.lastIndexOf;return position!==void 0?fn.call(this,searchString,position):fn.call(this,searchString)}startsWith(searchString,position){return this.s().startsWith(searchString,position)}endsWith(searchString,endPosition){return this.s().endsWith(searchString,endPosition)}match(regexp){return this.s().match(regexp)}replace(searchValue,replaceValue){return this.s().replace(searchValue,replaceValue)}search(regexp){return this.s().search(regexp)}split(separator,limit){return this.
419
- s().split(separator,limit)}substring(start,end2){return this.s().substring(start,end2)}trim(){return this.s().trim()}trimStart(){return this.s().trimStart()}trimEnd(){return this.s().trimEnd()}charAt(pos2){return this.s().charAt(pos2)}charCodeAt(index){return this.s().charCodeAt(index)}padStart(maxLength,fillString){return this.s().padStart(maxLength,fillString)}padEnd(maxLength,fillString){return this.s().padEnd(maxLength,fillString)}repeat(count){return this.s().repeat(count)}toUpperCase(){return this.
420
- s().toUpperCase()}toLowerCase(){return this.s().toLowerCase()}s(){if(this.string==null){let n3=Date.now();n3>warned2+6e4&&(console.warn("@aws-sdk/core/protocols - WARN - JsonCodec2: you have called a string method on a Uint8Array request body. It has been automatically converted to string. In a future version this will throw an error."),warned2=n3),this.string=toUtf8(this)}return this.string}},warned2=0}});function alloc2(size){return JsonBytesStringAdapter2.allocUnsafe(size)}var encoder2,OPEN_BRACE2,CLOSE_BRACE2,OPEN_BRACKET2,CLOSE_BRACKET2,QUOTE2,COLON2,COMMA2,BACKSLASH2,TRUE2,FALSE2,NULL2,ESCAPE_TABLE2,INITIAL_BUFFER_SIZE3,JsonShapeSerializer22,init_JsonShapeSerializer22=__esm({"node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v2/JsonShapeSerializer2.js"(){init_protocols();init_schema();init_serde();init_ConfigurableSerdeContext2();init_JsonBytesStringAdapter2();encoder2=new TextEncoder,
421
- OPEN_BRACE2=123,CLOSE_BRACE2=125,OPEN_BRACKET2=91,CLOSE_BRACKET2=93,QUOTE2=34,COLON2=58,COMMA2=44,BACKSLASH2=92,TRUE2=new Uint8Array([116,114,117,101]),FALSE2=new Uint8Array([102,97,108,115,101]),NULL2=new Uint8Array([110,117,108,108]),ESCAPE_TABLE2=new Array(128).fill(null);ESCAPE_TABLE2[8]="b";ESCAPE_TABLE2[9]="t";ESCAPE_TABLE2[10]="n";ESCAPE_TABLE2[12]="f";ESCAPE_TABLE2[13]="r";ESCAPE_TABLE2[34]='"';ESCAPE_TABLE2[92]="\\";for(let i5=0;i5<32;i5++)ESCAPE_TABLE2[i5]===null&&(ESCAPE_TABLE2[i5]="u\
422
- 00"+i5.toString(16).padStart(2,"0"));INITIAL_BUFFER_SIZE3=2048;JsonShapeSerializer22=class _JsonShapeSerializer2 extends SerdeContextConfig2{settings;json;i=0;rootSchema;rawValue;passthrough=!1;constructor(settings){super(),this.settings=settings,this.json=alloc2(INITIAL_BUFFER_SIZE3)}write(schema,value){this.i=0,this.rawValue=value,this.rootSchema=NormalizedSchema.of(schema),this.passthrough=this.rootSchema.isBlobSchema()||this.rootSchema.isStringSchema(),this.passthrough||this.writeValue(this.
423
- rootSchema,value,void 0)}writeDiscriminatedDocument(schema,value){this.i=0,this.rootSchema=NormalizedSchema.of(schema);let ns=this.rootSchema;if(ns.isStructSchema()&&value!=null&&typeof value=="object"){this.writeValue(ns,value,void 0);let prefix=`"__type":"${ns.getName(!0)??"Unknown"}",`,z=prefix.length;this.ensure(z),this.json.copyWithin(1+z,1,this.i),encoder2.encodeInto(prefix,this.json.subarray(1)),this.i+=z}else this.writeValue(ns,value,void 0)}flush(){this.rootSchema=void 0;let finalPosition=this.
424
- i;this.i=0;let raw=this.rawValue;if(this.rawValue=void 0,finalPosition===0)return raw;let result=this.json.subarray(0,finalPosition);return this.json=alloc2(INITIAL_BUFFER_SIZE3),result}ensure(byteCount){let{i:i5,json}=this;if(i5+byteCount>json.length){let newSize=json.length*2;for(;newSize<i5+byteCount;)newSize*=2;let next=alloc2(newSize);next.set(this.json),this.json=next}}writeAscii(s2){let z=s2.length;this.ensure(z);let{i:i5,json}=this;for(let j5=0;j5<z;++j5)json[i5]=s2.charCodeAt(j5),i5+=1;
425
- this.i=i5}writeAsciiQuoted(s2){let z=s2.length;this.ensure(z+4);let{json,i:i5}=this;json[i5++]=QUOTE2;for(let j5=0;j5<z;++j5)json[i5++]=s2.charCodeAt(j5);json[i5++]=QUOTE2,this.i=i5}writeJsonString(s2){this.ensure(s2.length*3+2),this.json[this.i++]=QUOTE2;let z=s2.length;for(let j5=0;j5<z;++j5){let c5=s2.charCodeAt(j5);if(c5>34&&c5<92)this.json[this.i++]=c5;else if(c5<128){let esc=ESCAPE_TABLE2[c5];if(esc!==null){this.ensure(esc.length+1),this.json[this.i++]=BACKSLASH2;for(let k5=0;k5<esc.length;k5++)
426
- this.json[this.i++]=esc.charCodeAt(k5)}else this.json[this.i++]=c5}else if(c5>=55296&&c5<=56319){let next=j5+1<z?s2.charCodeAt(j5+1):0;if(next>=56320&&next<=57343){this.ensure(4);let{written}=encoder2.encodeInto(s2.substring(j5,j5+2),this.json.subarray(this.i));this.i+=written,++j5}else this.ensure(6),this.writeUnicodeEscape(c5)}else if(c5>=56320&&c5<=57343)this.ensure(6),this.writeUnicodeEscape(c5);else{let{i:i5,json}=this;c5<2048?(json[i5++]=192|c5>>6,json[i5++]=128|c5&63):(json[i5++]=224|c5>>
427
- 12,json[i5++]=128|c5>>6&63,json[i5++]=128|c5&63),this.i=i5}}this.json[this.i++]=QUOTE2}writeUnicodeEscape(code){let{json,i:i5}=this;json[i5++]=BACKSLASH2,json[i5++]=117;let hex=code.toString(16).padStart(4,"0");for(let j5=0;j5<4;++j5)json[i5++]=hex.charCodeAt(j5);this.i=i5}static B64=(()=>{let chars="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",table=new Uint8Array(64);for(let i5=0;i5<64;++i5)table[i5]=chars.charCodeAt(i5);return table})();writeBase64(data){let b64Len=Math.ceil(
428
- data.length/3)*4;this.ensure(b64Len+2);let json=this.json,B64=_JsonShapeSerializer2.B64,i5=this.i;json[i5++]=QUOTE2;let len=data.length,remainder=len%3,mainLen=len-remainder;for(let j5=0;j5<mainLen;j5+=3){let a5=data[j5],b5=data[j5+1],c5=data[j5+2];json[i5++]=B64[a5>>2],json[i5++]=B64[(a5&3)<<4|b5>>4],json[i5++]=B64[(b5&15)<<2|c5>>6],json[i5++]=B64[c5&63]}if(remainder===2){let a5=data[mainLen],b5=data[mainLen+1];json[i5++]=B64[a5>>2],json[i5++]=B64[(a5&3)<<4|b5>>4],json[i5++]=B64[(b5&15)<<2],json[i5++]=
429
- 61}else if(remainder===1){let a5=data[mainLen];json[i5++]=B64[a5>>2],json[i5++]=B64[(a5&3)<<4],json[i5++]=61,json[i5++]=61}json[i5++]=QUOTE2,this.i=i5}writeValue(schema,value,container){if(value==null){if(container?.isStructSchema()){if(value===void 0&&NormalizedSchema.of(schema).isIdempotencyToken()){this.writeAsciiQuoted(generateIdempotencyToken());return}return}this.ensure(4),this.json.set(NULL2,this.i),this.i+=4;return}let ns=NormalizedSchema.of(schema),isObject=typeof value=="object";if(ns.
430
- isStringSchema()){let mediaType=ns.getMergedTraits().mediaType;if(mediaType&&(mediaType==="application/json"||mediaType.endsWith("+json"))){this.writeJsonString(LazyJsonString.from(value).toString());return}}if(isObject){if(ns.isStructSchema()){this.writeStruct(ns,value);return}if(Array.isArray(value)&&(ns.isListSchema()||ns.isDocumentSchema())){this.writeList(ns,value,ns.isDocumentSchema());return}if(ns.isMapSchema()){this.writeMap(ns,value,!1);return}if(value instanceof Uint8Array&&(ns.isBlobSchema()||
431
- ns.isDocumentSchema())){this.writeBase64(value);return}if(value instanceof Date&&(ns.isTimestampSchema()||ns.isDocumentSchema())){this.writeTimestamp(ns,value);return}if(value instanceof NumericValue){this.writeAscii(value.string);return}if(ns.isDocumentSchema()){Array.isArray(value)?this.writeList(ns,value,!0):this.writeMap(ns,value,!0);return}let json=JSON.stringify(value);this.writeAscii(json);return}if(typeof value=="string"){if(ns.isBlobSchema()){let b64=(this.serdeContext?.base64Encoder??toBase64)(
432
- value);this.writeAsciiQuoted(b64);return}this.writeJsonString(value);return}if(typeof value=="number"){if(Math.abs(value)===1/0||Number.isNaN(value)){this.writeAsciiQuoted(String(value));return}let numStr=String(value);this.writeAscii(numStr);return}if(typeof value=="boolean"){this.ensure(5);let{i:i5,json}=this;value?(json.set(TRUE2,i5),i5+=4):(json.set(FALSE2,i5),i5+=5),this.i=i5;return}if(typeof value=="bigint"){this.writeAscii(value.toString());return}this.writeAscii(String(value))}writeStruct(ns,value){
433
- this.ensure(2),this.json[this.i++]=OPEN_BRACE2;let wroteAny=!1,hasType=typeof value.__type=="string",writtenKeys;hasType&&(writtenKeys=new Set);for(let[memberName,memberSchema]of ns.structIterator()){let item=value[memberName];if(item==null&&!memberSchema.isIdempotencyToken())continue;wroteAny&&(this.ensure(1),this.json[this.i++]=COMMA2),wroteAny=!0;let targetKey=this.settings.jsonName?memberSchema.getMergedTraits().jsonName??memberName:memberName;writtenKeys&&(writtenKeys.add(memberName),writtenKeys.
434
- add(targetKey)),this.writeAsciiQuoted(targetKey),this.json[this.i++]=COLON2,this.writeValue(memberSchema,item,ns)}if(!wroteAny&&ns.isUnionSchema()){let{$unknown}=value;if(Array.isArray($unknown)){let[k5,v]=$unknown;this.writeAsciiQuoted(k5),this.ensure(1),this.json[this.i++]=COLON2,this.writeValue(15,v,ns)}}else if(hasType)for(let k5 in value){if(writtenKeys.has(k5))continue;writtenKeys.add(k5);let v=value[k5];wroteAny&&(this.ensure(1),this.json[this.i++]=COMMA2),wroteAny=!0,this.writeAsciiQuoted(
435
- k5),this.ensure(1),this.json[this.i++]=COLON2,this.writeValue(15,v,void 0)}this.ensure(1),this.json[this.i++]=CLOSE_BRACE2}writeList(ns,value,isDocument){let sparse=!!ns.getMergedTraits().sparse,valueSchema=ns.getValueSchema();if(!isDocument&&(valueSchema.isStringSchema()||valueSchema.isNumericSchema()||valueSchema.isBooleanSchema())){let hasSpecials=!1;for(let i5=0;i5<value.length;++i5){let v=value[i5];if(Number.isNaN(v)||v===1/0||v===-1/0||v==null&&!sparse){hasSpecials=!0;break}}let json;if(!hasSpecials)
436
- json=JSON.stringify(value);else{let out=[];for(let i5=0;i5<value.length;++i5){let v=value[i5];v==null&&!sparse||(Number.isNaN(v)||v===1/0||v===-1/0?out.push(String(v)):out.push(v))}json=JSON.stringify(out)}this.ensure(json.length*3),this.i+=encoder2.encodeInto(json,this.json.subarray(this.i)).written;return}this.ensure(2),this.json[this.i++]=OPEN_BRACKET2;let wroteFirstItem=!1;for(let i5=0;i5<value.length;++i5){let item=value[i5];(isDocument?item===void 0:item==null&&!sparse)||(wroteFirstItem&&(this.
437
- ensure(1),this.json[this.i++]=COMMA2),this.writeValue(valueSchema,item,void 0),wroteFirstItem=!0)}this.ensure(1),this.json[this.i++]=CLOSE_BRACKET2}writeMap(ns,value,isDocument){let sparse=!!ns.getMergedTraits().sparse,valueSchema=ns.getValueSchema();if(!isDocument&&(valueSchema.isStringSchema()||valueSchema.isNumericSchema()||valueSchema.isBooleanSchema())){let modifications;for(let k5 in value){let v=value[k5];Number.isNaN(v)||v===1/0||v===-1/0?((modifications??={})[k5]=v,value[k5]=String(v)):
438
- v===null&&!sparse&&((modifications??={})[k5]=null,value[k5]=void 0)}let json=JSON.stringify(value);modifications&&Object.assign(value,modifications),this.ensure(json.length*3),this.i+=encoder2.encodeInto(json,this.json.subarray(this.i)).written;return}this.ensure(2),this.json[this.i++]=OPEN_BRACE2;let first=!0;for(let k5 in value){let v=value[k5];(isDocument?v===void 0:v==null&&!sparse)||(first||(this.ensure(1),this.json[this.i++]=COMMA2),first=!1,this.writeJsonString(k5),this.ensure(1),this.json[this.
439
- i++]=COLON2,this.writeValue(valueSchema,v,void 0))}this.ensure(1),this.json[this.i++]=CLOSE_BRACE2}writeTimestamp(ns,value){switch(determineTimestampFormat(ns,this.settings)){case 5:{let iso=value.toISOString().replace(".000Z","Z");this.writeAsciiQuoted(iso);return}case 6:{this.writeAsciiQuoted(dateToUtcString(value));return}case 7:{let epochSecs=String(value.getTime()/1e3);this.writeAscii(epochSecs);return}default:{let epochSecs=String(value.getTime()/1e3);this.writeAscii(epochSecs);return}}}}}});var JsonCodec22,init_JsonCodec22=__esm({"node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v2/JsonCodec2.js"(){init_ConfigurableSerdeContext2();init_JsonShapeDeserializer22();init_JsonShapeSerializer22();JsonCodec22=class extends SerdeContextConfig2{settings;constructor(settings){super(),this.settings=settings}createSerializer(){let serializer=new JsonShapeSerializer22(this.settings);return serializer.setSerdeContext(this.serdeContext),serializer}createDeserializer(){let deserializer=new JsonShapeDeserializer22(
440
- this.settings);return deserializer.setSerdeContext(this.serdeContext),deserializer}}}});var AwsJsonRpcProtocol,init_AwsJsonRpcProtocol=__esm({"node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJsonRpcProtocol.js"(){init_protocols();init_schema();init_ProtocolLib();init_JsonCodec22();init_parseJsonBody2();AwsJsonRpcProtocol=class extends RpcProtocol{serializer;deserializer;serviceTarget;codec;mixin;awsQueryCompatible;constructor({defaultNamespace,errorTypeRegistries:errorTypeRegistries5,serviceTarget,awsQueryCompatible,jsonCodec}){super({defaultNamespace,errorTypeRegistries:errorTypeRegistries5}),
441
- this.serviceTarget=serviceTarget,this.codec=jsonCodec??new JsonCodec22({timestampFormat:{useTrait:!0,default:7},jsonName:!1}),this.serializer=this.codec.createSerializer(),this.deserializer=this.codec.createDeserializer(),this.awsQueryCompatible=!!awsQueryCompatible,this.mixin=new ProtocolLib(this.awsQueryCompatible)}async serializeRequest(operationSchema,input,context){let request=await super.serializeRequest(operationSchema,input,context);return request.path.endsWith("/")||(request.path+="/"),
442
- request.headers["content-type"]=`application/x-amz-json-${this.getJsonRpcVersion()}`,request.headers["x-amz-target"]=`${this.serviceTarget}.${operationSchema.name}`,this.awsQueryCompatible&&(request.headers["x-amzn-query-mode"]="true"),(deref(operationSchema.input)==="unit"||!request.body)&&(request.body="{}"),request}getPayloadCodec(){return this.codec}async handleError(operationSchema,context,response,dataObject,metadata){let{awsQueryCompatible}=this;awsQueryCompatible&&this.mixin.setQueryCompatError(
443
- dataObject,response);let errorIdentifier=loadJsonRpcErrorCode2(response,dataObject,awsQueryCompatible)??"Unknown";this.mixin.compose(this.compositeErrorRegistry,errorIdentifier,this.options.defaultNamespace);let{errorSchema,errorMetadata}=await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier,this.options.defaultNamespace,response,dataObject,metadata,awsQueryCompatible?this.mixin.findQueryCompatibleError:void 0),ns=NormalizedSchema.of(errorSchema),message=dataObject.message??dataObject.
444
- Message??"UnknownError",ErrorCtor=this.compositeErrorRegistry.getErrorCtor(errorSchema)??Error,exception=new ErrorCtor({}),output={},errorDeserializer=this.codec.createDeserializer();for(let[name,member]of ns.structIterator())dataObject[name]!=null&&(output[name]=errorDeserializer.readObject(member,dataObject[name]));throw awsQueryCompatible&&this.mixin.queryCompatOutput(dataObject,output),this.mixin.decorateServiceException(Object.assign(exception,errorMetadata,{$fault:ns.getMergedTraits().error,
445
- message},output),dataObject)}}}});var AwsJson1_0Protocol,init_AwsJson1_0Protocol=__esm({"node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJson1_0Protocol.js"(){init_AwsJsonRpcProtocol();AwsJson1_0Protocol=class extends AwsJsonRpcProtocol{constructor({defaultNamespace,errorTypeRegistries:errorTypeRegistries5,serviceTarget,awsQueryCompatible,jsonCodec}){super({defaultNamespace,errorTypeRegistries:errorTypeRegistries5,serviceTarget,awsQueryCompatible,jsonCodec})}getShapeId(){return"aws.protocols#awsJson1_0"}getJsonRpcVersion(){
399
+ "UnknownError",ErrorCtor=this.compositeErrorRegistry.getErrorCtor(errorSchema)??Error,exception=new ErrorCtor({}),output={};for(let[name,member]of ns.structIterator())dataObject[name]!=null&&(output[name]=this.deserializer.readValue(member,dataObject[name]));throw this.awsQueryCompatible&&this.mixin.queryCompatOutput(dataObject,output),this.mixin.decorateServiceException(Object.assign(exception,errorMetadata,{$fault:ns.getMergedTraits().error,message},output),dataObject)}}}});var AwsJsonRpcProtocol,init_AwsJsonRpcProtocol=__esm({"node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJsonRpcProtocol.js"(){init_protocols();init_schema();init_ProtocolLib();AwsJsonRpcProtocol=class extends RpcProtocol{serializer;deserializer;serviceTarget;codec;mixin;awsQueryCompatible;constructor({defaultNamespace,errorTypeRegistries:errorTypeRegistries5,serviceTarget,awsQueryCompatible,jsonCodec}){super({defaultNamespace,errorTypeRegistries:errorTypeRegistries5}),this.serviceTarget=
400
+ serviceTarget,this.codec=jsonCodec??new JsonCodec2({timestampFormat:{useTrait:!0,default:7},jsonName:!1}),this.serializer=this.codec.createSerializer(),this.deserializer=this.codec.createDeserializer(),this.awsQueryCompatible=!!awsQueryCompatible,this.mixin=new ProtocolLib(this.awsQueryCompatible)}async serializeRequest(operationSchema,input,context){let request=await super.serializeRequest(operationSchema,input,context);return request.path.endsWith("/")||(request.path+="/"),request.headers["con\
401
+ tent-type"]=`application/x-amz-json-${this.getJsonRpcVersion()}`,request.headers["x-amz-target"]=`${this.serviceTarget}.${operationSchema.name}`,this.awsQueryCompatible&&(request.headers["x-amzn-query-mode"]="true"),(deref(operationSchema.input)==="unit"||!request.body)&&(request.body="{}"),request}getPayloadCodec(){return this.codec}async handleError(operationSchema,context,response,dataObject,metadata){let{awsQueryCompatible}=this;awsQueryCompatible&&this.mixin.setQueryCompatError(dataObject,response);
402
+ let errorIdentifier=loadJsonRpcErrorCode(response,dataObject,awsQueryCompatible)??"Unknown";this.mixin.compose(this.compositeErrorRegistry,errorIdentifier,this.options.defaultNamespace);let{errorSchema,errorMetadata}=await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier,this.options.defaultNamespace,response,dataObject,metadata,awsQueryCompatible?this.mixin.findQueryCompatibleError:void 0),ns=NormalizedSchema.of(errorSchema),message=dataObject.message??dataObject.Message??"UnknownE\
403
+ rror",ErrorCtor=this.compositeErrorRegistry.getErrorCtor(errorSchema)??Error,exception=new ErrorCtor({}),output={},errorDeserializer=this.codec.createDeserializer();for(let[name,member]of ns.structIterator())dataObject[name]!=null&&(output[name]=errorDeserializer.readObject(member,dataObject[name]));throw awsQueryCompatible&&this.mixin.queryCompatOutput(dataObject,output),this.mixin.decorateServiceException(Object.assign(exception,errorMetadata,{$fault:ns.getMergedTraits().error,message},output),
404
+ dataObject)}}}});var AwsJson1_0Protocol,init_AwsJson1_0Protocol=__esm({"node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJson1_0Protocol.js"(){init_AwsJsonRpcProtocol();AwsJson1_0Protocol=class extends AwsJsonRpcProtocol{constructor({defaultNamespace,errorTypeRegistries:errorTypeRegistries5,serviceTarget,awsQueryCompatible,jsonCodec}){super({defaultNamespace,errorTypeRegistries:errorTypeRegistries5,serviceTarget,awsQueryCompatible,jsonCodec})}getShapeId(){return"aws.protocols#awsJson1_0"}getJsonRpcVersion(){
446
405
  return"1.0"}getDefaultContentType(){return"application/x-amz-json-1.0"}}}});var AwsJson1_1Protocol,init_AwsJson1_1Protocol=__esm({"node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJson1_1Protocol.js"(){init_AwsJsonRpcProtocol();AwsJson1_1Protocol=class extends AwsJsonRpcProtocol{constructor({defaultNamespace,errorTypeRegistries:errorTypeRegistries5,serviceTarget,awsQueryCompatible,jsonCodec}){super({defaultNamespace,errorTypeRegistries:errorTypeRegistries5,serviceTarget,awsQueryCompatible,jsonCodec})}getShapeId(){return"aws.protocols#awsJson1_1"}getJsonRpcVersion(){
447
- return"1.1"}getDefaultContentType(){return"application/x-amz-json-1.1"}}}});var AwsRestJsonProtocol,init_AwsRestJsonProtocol=__esm({"node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsRestJsonProtocol.js"(){init_protocols();init_schema();init_ProtocolLib();init_JsonCodec22();init_parseJsonBody2();AwsRestJsonProtocol=class extends HttpBindingProtocol{serializer;deserializer;codec;mixin=new ProtocolLib;constructor({defaultNamespace,errorTypeRegistries:errorTypeRegistries5,jsonCodec}){super({defaultNamespace,errorTypeRegistries:errorTypeRegistries5});let settings={
448
- timestampFormat:{useTrait:!0,default:7},httpBindings:!0,jsonName:!0};this.codec=jsonCodec??new JsonCodec22(settings),this.serializer=new HttpInterceptingShapeSerializer(this.codec.createSerializer(),settings),this.deserializer=new HttpInterceptingShapeDeserializer(this.codec.createDeserializer(),settings)}getShapeId(){return"aws.protocols#restJson1"}getPayloadCodec(){return this.codec}setSerdeContext(serdeContext){this.codec.setSerdeContext(serdeContext),super.setSerdeContext(serdeContext)}async serializeRequest(operationSchema,input,context){
406
+ return"1.1"}getDefaultContentType(){return"application/x-amz-json-1.1"}}}});var AwsRestJsonProtocol,init_AwsRestJsonProtocol=__esm({"node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsRestJsonProtocol.js"(){init_protocols();init_schema();init_ProtocolLib();AwsRestJsonProtocol=class extends HttpBindingProtocol{serializer;deserializer;codec;mixin=new ProtocolLib;constructor({defaultNamespace,errorTypeRegistries:errorTypeRegistries5,jsonCodec}){super({defaultNamespace,errorTypeRegistries:errorTypeRegistries5});let settings={timestampFormat:{useTrait:!0,default:7},
407
+ httpBindings:!0,jsonName:!0};this.codec=jsonCodec??new JsonCodec2(settings),this.serializer=new HttpInterceptingShapeSerializer(this.codec.createSerializer(),settings),this.deserializer=new HttpInterceptingShapeDeserializer(this.codec.createDeserializer(),settings)}getShapeId(){return"aws.protocols#restJson1"}getPayloadCodec(){return this.codec}setSerdeContext(serdeContext){this.codec.setSerdeContext(serdeContext),super.setSerdeContext(serdeContext)}async serializeRequest(operationSchema,input,context){
449
408
  let request=await super.serializeRequest(operationSchema,input,context),inputSchema=NormalizedSchema.of(operationSchema.input);if(!request.headers["content-type"]){let contentType=this.mixin.resolveRestContentType(this.getDefaultContentType(),inputSchema);contentType&&(request.headers["content-type"]=contentType)}return request.body==null&&request.headers["content-type"]===this.getDefaultContentType()&&(request.body="{}"),request}async deserializeResponse(operationSchema,context,response){let output=await super.
450
- deserializeResponse(operationSchema,context,response),outputSchema=NormalizedSchema.of(operationSchema.output);for(let[name,member]of outputSchema.structIterator())member.getMemberTraits().httpPayload&&!(name in output)&&(output[name]=null);return output}async handleError(operationSchema,context,response,dataObject,metadata){let errorIdentifier=loadRestJsonErrorCode2(response,dataObject)??"Unknown";this.mixin.compose(this.compositeErrorRegistry,errorIdentifier,this.options.defaultNamespace);let{
451
- errorSchema,errorMetadata}=await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier,this.options.defaultNamespace,response,dataObject,metadata),ns=NormalizedSchema.of(errorSchema),message=dataObject.message??dataObject.Message??"UnknownError",ErrorCtor=this.compositeErrorRegistry.getErrorCtor(errorSchema)??Error,exception=new ErrorCtor({});await this.deserializeHttpMessage(errorSchema,context,response,dataObject);let output={},errorDeserializer=this.codec.createDeserializer();for(let[
452
- name,member]of ns.structIterator()){let target=member.getMergedTraits().jsonName??name;output[name]=errorDeserializer.readObject(member,dataObject[target])}throw this.mixin.decorateServiceException(Object.assign(exception,errorMetadata,{$fault:ns.getMergedTraits().error,message},output),dataObject)}getDefaultContentType(){return"application/json"}}}});var JsonShapeDeserializer3,init_JsonShapeDeserializer3=__esm({"node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v1/JsonShapeDeserializer.js"(){init_protocols();init_schema();init_serde();init_serde();init_ConfigurableSerdeContext2();init_UnionSerde2();init_jsonReviver2();init_needsReviver2();init_parseJsonBody2();init_writeKey2();JsonShapeDeserializer3=class extends SerdeContextConfig2{settings;constructor(settings){super(),this.settings=settings}async read(schema,data){let reviver=needsReviver2(
453
- schema)?jsonReviver2:void 0;return this._read(schema,typeof data=="string"?JSON.parse(data,reviver):await parseJsonBody2(data,this.serdeContext,schema))}readObject(schema,data){return this._read(schema,data)}_read(schema,value){let isObject=value!==null&&typeof value=="object",ns=NormalizedSchema.of(schema);if(isObject){if(ns.isStructSchema()){let record=value,union=ns.isUnionSchema(),out={},nameMap,{jsonName}=this.settings;jsonName&&(nameMap={});let unionSerde;union&&(unionSerde=new UnionSerde2(
454
- record,out));for(let[memberName,memberSchema]of ns.structIterator()){let fromKey=memberName;jsonName&&(fromKey=memberSchema.getMergedTraits().jsonName??fromKey,nameMap[fromKey]=memberName),union&&unionSerde.mark(fromKey),record[fromKey]!=null&&(out[memberName]=this._read(memberSchema,record[fromKey]))}if(union)unionSerde.writeUnknown();else if(typeof record.__type=="string")for(let k5 in record){let v=record[k5],t=jsonName?nameMap[k5]??k5:k5;t in out||(out[t]=v)}return out}if(Array.isArray(value)&&
455
- ns.isListSchema()){let listMember=ns.getValueSchema(),out=[];for(let item of value)out.push(this._read(listMember,item));return out}if(ns.isMapSchema()){let mapMember=ns.getValueSchema(),out={};for(let _k in value)_k==="__proto__"&&writeKey2(out),out[_k]=this._read(mapMember,value[_k]);return out}}if(ns.isBlobSchema()&&typeof value=="string")return fromBase64(value);let mediaType=ns.getMergedTraits().mediaType;if(ns.isStringSchema()&&typeof value=="string"&&mediaType)return mediaType==="applicat\
456
- ion/json"||mediaType.endsWith("+json")?LazyJsonString.from(value):value;if(ns.isTimestampSchema()&&value!=null)switch(determineTimestampFormat(ns,this.settings)){case 5:return parseRfc3339DateTimeWithOffset(value);case 6:return parseRfc7231DateTime(value);case 7:return parseEpochTimestamp(value);default:return console.warn("Missing timestamp format, parsing value with Date constructor:",value),new Date(value)}if(ns.isBigIntegerSchema()&&(typeof value=="number"||typeof value=="string"))return BigInt(
457
- value);if(ns.isBigDecimalSchema()&&value!=null){if(value instanceof NumericValue)return value;let untyped=value;return untyped.type==="bigDecimal"&&"string"in untyped?new NumericValue(untyped.string,untyped.type):new NumericValue(String(value),"bigDecimal")}if(ns.isNumericSchema()&&typeof value=="string"){switch(value){case"Infinity":return 1/0;case"-Infinity":return-1/0;case"NaN":return NaN}return value}if(ns.isDocumentSchema())if(isObject){let out=Array.isArray(value)?[]:{};for(let k5 in value){
458
- k5==="__proto__"&&writeKey2(out);let v=value[k5];v instanceof NumericValue?out[k5]=v:out[k5]=this._read(ns,v)}return out}else return structuredClone(value);return value}}}});var NUMERIC_CONTROL_CHAR2,JsonReplacer2,init_jsonReplacer2=__esm({"node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/jsonReplacer.js"(){init_serde();NUMERIC_CONTROL_CHAR2="\u039D",JsonReplacer2=class{values=new Map;counter=0;stage=0;createReplacer(){if(this.stage===1)throw new Error("@aws-sdk/core/protocols - JsonReplacer already created.");if(this.stage===2)throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted.");return this.stage=1,(key,value)=>{if(value instanceof NumericValue){
459
- let v=`${NUMERIC_CONTROL_CHAR2+"nv"+this.counter++}_`+value.string;return this.values.set(`"${v}"`,value.string),v}if(typeof value=="bigint"){let s2=value.toString(),v=`${NUMERIC_CONTROL_CHAR2+"b"+this.counter++}_`+s2;return this.values.set(`"${v}"`,s2),v}return value}}replaceInJson(json){if(this.stage===0)throw new Error("@aws-sdk/core/protocols - JsonReplacer not created yet.");if(this.stage===2)throw new Error("@aws-sdk/core/protocols - JsonReplacer exhausted.");if(this.stage=2,this.counter===
460
- 0)return json;for(let[key,value]of this.values)json=json.replace(key,value);return json}}}});var JsonShapeSerializer3,init_JsonShapeSerializer3=__esm({"node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v1/JsonShapeSerializer.js"(){init_protocols();init_schema();init_serde();init_ConfigurableSerdeContext2();init_jsonReplacer2();init_writeKey2();JsonShapeSerializer3=class extends SerdeContextConfig2{settings;buffer;useReplacer=!1;rootSchema;constructor(settings){super(),this.settings=settings}write(schema,value){this.rootSchema=NormalizedSchema.of(schema),this.buffer=this.
461
- _write(this.rootSchema,value)}flush(){let{rootSchema,useReplacer}=this;if(this.rootSchema=void 0,this.useReplacer=!1,rootSchema?.isStructSchema()||rootSchema?.isDocumentSchema()){if(!useReplacer)return JSON.stringify(this.buffer);let replacer=new JsonReplacer2;return replacer.replaceInJson(JSON.stringify(this.buffer,replacer.createReplacer(),0))}return this.buffer}writeDiscriminatedDocument(schema,value){this.write(schema,value),typeof this.buffer=="object"&&(this.buffer.__type=NormalizedSchema.
462
- of(schema).getName(!0))}_write(schema,value,container){let isObject=value!==null&&typeof value=="object",ns=NormalizedSchema.of(schema);if(isObject){if(ns.isStructSchema()){let record=value,out={},{jsonName}=this.settings,nameMap;jsonName&&(nameMap={});let outCount=0;for(let[memberName,memberSchema]of ns.structIterator()){let serializableValue=this._write(memberSchema,record[memberName],ns);if(serializableValue!==void 0){let targetKey=memberName;jsonName&&(targetKey=memberSchema.getMergedTraits().
463
- jsonName??memberName,nameMap[memberName]=targetKey),out[targetKey]=serializableValue,outCount++}}if(ns.isUnionSchema()&&outCount===0){let{$unknown}=record;if(Array.isArray($unknown)){let[k5,v]=$unknown;k5==="__proto__"&&writeKey2(out),out[k5]=this._write(15,v)}}else if(typeof record.__type=="string")for(let k5 in record){let v=record[k5],targetKey=jsonName?nameMap[k5]??k5:k5;targetKey in out||(out[targetKey]=this._write(15,v))}return out}if(Array.isArray(value)&&ns.isListSchema()){let listMember=ns.
464
- getValueSchema(),out=[],sparse=!!ns.getMergedTraits().sparse;for(let item of value)(sparse||item!=null)&&out.push(this._write(listMember,item));return out}if(ns.isMapSchema()){let mapMember=ns.getValueSchema(),out={},sparse=!!ns.getMergedTraits().sparse;for(let _k in value){let _v=value[_k];(sparse||_v!=null)&&(_k==="__proto__"&&writeKey2(out),out[_k]=this._write(mapMember,_v))}return out}if(value instanceof Uint8Array&&ns.isBlobSchema())return ns===this.rootSchema?value:(this.serdeContext?.base64Encoder??
465
- toBase64)(value);if(value instanceof Date&&(ns.isTimestampSchema()||ns.isDocumentSchema()))switch(determineTimestampFormat(ns,this.settings)){case 5:return value.toISOString().replace(".000Z","Z");case 6:return dateToUtcString(value);case 7:return value.getTime()/1e3;default:return console.warn("Missing timestamp format, using epoch seconds",value),value.getTime()/1e3}value instanceof NumericValue&&(this.useReplacer=!0)}if(!(value===null&&container?.isStructSchema())){if(ns.isStringSchema()){if(typeof value>
466
- "u"&&ns.isIdempotencyToken())return generateIdempotencyToken();let mediaType=ns.getMergedTraits().mediaType;return value!=null&&mediaType&&(mediaType==="application/json"||mediaType.endsWith("+json"))?LazyJsonString.from(value):value}if(typeof value=="number")return Math.abs(value)===1/0||isNaN(value)?String(value):value;if(typeof value=="string"&&ns.isBlobSchema())return ns===this.rootSchema?value:(this.serdeContext?.base64Encoder??toBase64)(value);if(typeof value=="bigint"&&(this.useReplacer=!0),
467
- ns.isDocumentSchema())if(isObject){if(value instanceof Uint8Array)return(this.serdeContext?.base64Encoder??toBase64)(value);let out=Array.isArray(value)?[]:{};for(let k5 in value){let v=value[k5];k5==="__proto__"&&writeKey2(out),v instanceof NumericValue?(this.useReplacer=!0,out[k5]=v):out[k5]=this._write(ns,v)}return out}else return structuredClone(value);return value}}}}});var JsonCodec3,init_JsonCodec3=__esm({"node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v1/JsonCodec.js"(){init_ConfigurableSerdeContext2();init_JsonShapeDeserializer3();init_JsonShapeSerializer3();JsonCodec3=class extends SerdeContextConfig2{settings;constructor(settings){super(),this.settings=settings}createSerializer(){let serializer=new JsonShapeSerializer3(this.settings);return serializer.setSerdeContext(this.serdeContext),serializer}createDeserializer(){let deserializer=new JsonShapeDeserializer3(
468
- this.settings);return deserializer.setSerdeContext(this.serdeContext),deserializer}}}});var require_dist_cjs4=__commonJS({"node_modules/@aws-sdk/xml-builder/dist-cjs/index.js"(exports){var ATTR_ESCAPE_RE=/[&<>"]/g,ATTR_ESCAPE_MAP={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function escapeAttribute(value){return value.replace(ATTR_ESCAPE_RE,ch=>ATTR_ESCAPE_MAP[ch])}var ELEMENT_ESCAPE_RE=/[&"'<>\r\n\u0085\u2028]/g,ELEMENT_ESCAPE_MAP={"&":"&amp;",'"':"&quot;","'":"&apos;","<":"&lt;",">":"&gt;","\r":"&#x0D;","\n":"&#x0A;","\x85":"&#x85;","\u2028":"&#x2028;"};function escapeElement(value){
409
+ deserializeResponse(operationSchema,context,response),outputSchema=NormalizedSchema.of(operationSchema.output);for(let[name,member]of outputSchema.structIterator())member.getMemberTraits().httpPayload&&!(name in output)&&(output[name]=null);return output}async handleError(operationSchema,context,response,dataObject,metadata){let errorIdentifier=loadRestJsonErrorCode(response,dataObject)??"Unknown";this.mixin.compose(this.compositeErrorRegistry,errorIdentifier,this.options.defaultNamespace);let{errorSchema,
410
+ errorMetadata}=await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier,this.options.defaultNamespace,response,dataObject,metadata),ns=NormalizedSchema.of(errorSchema),message=dataObject.message??dataObject.Message??"UnknownError",ErrorCtor=this.compositeErrorRegistry.getErrorCtor(errorSchema)??Error,exception=new ErrorCtor({});await this.deserializeHttpMessage(errorSchema,context,response,dataObject);let output={},errorDeserializer=this.codec.createDeserializer();for(let[name,member]of ns.
411
+ structIterator()){let target=member.getMergedTraits().jsonName??name;output[name]=errorDeserializer.readObject(member,dataObject[target])}throw this.mixin.decorateServiceException(Object.assign(exception,errorMetadata,{$fault:ns.getMergedTraits().error,message},output),dataObject)}getDefaultContentType(){return"application/json"}}}});var require_dist_cjs4=__commonJS({"node_modules/@aws-sdk/xml-builder/dist-cjs/index.js"(exports){var ATTR_ESCAPE_RE=/[&<>"]/g,ATTR_ESCAPE_MAP={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"};function escapeAttribute(value){return value.replace(ATTR_ESCAPE_RE,ch=>ATTR_ESCAPE_MAP[ch])}var ELEMENT_ESCAPE_RE=/[&"'<>\r\n\u0085\u2028]/g,ELEMENT_ESCAPE_MAP={"&":"&amp;",'"':"&quot;","'":"&apos;","<":"&lt;",">":"&gt;","\r":"&#x0D;","\n":"&#x0A;","\x85":"&#x85;","\u2028":"&#x2028;"};function escapeElement(value){
469
412
  return value.replace(ELEMENT_ESCAPE_RE,ch=>ELEMENT_ESCAPE_MAP[ch])}var XmlText2=class{value;constructor(value){this.value=value}toString(){return escapeElement(""+this.value)}},XmlNode2=class _XmlNode{name;children;attributes={};static of(name,childText,withName){let node=new _XmlNode(name);return childText!==void 0&&node.addChildNode(new XmlText2(childText)),withName!==void 0&&node.withName(withName),node}constructor(name,children=[]){this.name=name,this.children=children}withName(name){return this.
470
413
  name=name,this}addAttribute(name,value){return this.attributes[name]=value,this}addChildNode(child){return this.children.push(child),this}removeAttribute(name){return delete this.attributes[name],this}n(name){return this.name=name,this}c(child){return this.children.push(child),this}a(name,value){return value!=null&&(this.attributes[name]=value),this}cc(input,field,withName=field){if(input[field]!=null){let node=_XmlNode.of(field,input[field]).withName(withName);this.c(node)}}l(input,listName,memberName,valueProvider){
471
414
  input[listName]!=null&&valueProvider().map(node=>{node.withName(memberName),this.c(node)})}lc(input,listName,memberName,valueProvider){if(input[listName]!=null){let nodes5=valueProvider(),containerNode=new _XmlNode(memberName);nodes5.map(node=>{containerNode.c(node)}),this.c(containerNode)}}toString(){let hasChildren=!!this.children.length,xmlText=`<${this.name}`,attributes=this.attributes;for(let attributeName of Object.keys(attributes)){let attribute=attributes[attributeName];attribute!=null&&
@@ -479,7 +422,7 @@ XML parse error: expected > at the end of opening tag.");++p3.i;let textParts=[]
479
422
  ws-sdk XML parse error: missing closing tag </${tag}>.`);p3.i+=2;let closeTag=p3.readTo(">").trim();if(closeTag!==tag)throw new Error(`@aws-sdk XML parse error: mismatched tags <${tag}> and </${closeTag}>.`);if(!hasAttrs&&textParts.length===0&&!hasElementChild)return{tag,value:""};if(!hasAttrs&&!hasElementChild){let text=textParts.length===1?textParts[0]:textParts.join("");return text.trim()===""&&text.includes(`
480
423
  `)?{tag,value:""}:{tag,value:text}}let obj={};for(let text of textParts)text.trim()===""&&text.includes(`
481
424
  `)||(obj["#text"]="#text"in obj?obj["#text"]+text:text);for(let child of childTags)child.tag==="__proto__"&&writeKey3(obj),child.tag in obj?Array.isArray(obj[child.tag])?obj[child.tag].push(child.value):obj[child.tag]=[obj[child.tag],child.value]:obj[child.tag]=child.value;for(let[k5,v]of Object.entries(attrs))k5==="__proto__"&&writeKey3(obj),obj[k5]=v;return{tag,value:obj}}static ENTITIES={amp:"&",lt:"<",gt:">",quot:'"',apos:"'"};skipDoctype(){let p3=this;p3.i+=9;let depth=0;for(;p3.i<p3.z;){let c5=p3.
482
- x[p3.i];if(c5==="[")++depth;else if(c5==="]")--depth;else if(c5===">"&&depth===0){++p3.i;return}++p3.i}throw new Error("@aws-sdk XML parse error: unclosed DOCTYPE.")}decodeEntities(s2){return s2.replace(/&(?:#x([0-9a-fA-F]{1,6})|#(\d{1,7})|([a-zA-Z][a-zA-Z0-9]{0,30}));/g,(_,hex,dec,named)=>hex?String.fromCharCode(parseInt(hex,16)):dec?String.fromCharCode(parseInt(dec,10)):_AwsXmlParser.ENTITIES[named]??"")}};exports.XmlNode=XmlNode2;exports.XmlText=XmlText2;exports.parseXML=parseXML3}});var import_xml_builder,XmlShapeDeserializer,init_XmlShapeDeserializer=__esm({"node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlShapeDeserializer.js"(){import_xml_builder=__toESM(require_dist_cjs4());init_client();init_protocols();init_schema();init_serde();init_ConfigurableSerdeContext2();init_UnionSerde2();init_writeKey2();XmlShapeDeserializer=class extends SerdeContextConfig2{settings;stringDeserializer;constructor(settings){super(),this.settings=settings,this.stringDeserializer=
425
+ x[p3.i];if(c5==="[")++depth;else if(c5==="]")--depth;else if(c5===">"&&depth===0){++p3.i;return}++p3.i}throw new Error("@aws-sdk XML parse error: unclosed DOCTYPE.")}decodeEntities(s2){return s2.replace(/&(?:#x([0-9a-fA-F]{1,6})|#(\d{1,7})|([a-zA-Z][a-zA-Z0-9]{0,30}));/g,(_,hex,dec,named)=>hex?String.fromCharCode(parseInt(hex,16)):dec?String.fromCharCode(parseInt(dec,10)):_AwsXmlParser.ENTITIES[named]??"")}};exports.XmlNode=XmlNode2;exports.XmlText=XmlText2;exports.parseXML=parseXML3}});var SerdeContextConfig2,init_ConfigurableSerdeContext2=__esm({"node_modules/@aws-sdk/core/dist-es/submodules/protocols/ConfigurableSerdeContext.js"(){SerdeContextConfig2=class{serdeContext;setSerdeContext(serdeContext){this.serdeContext=serdeContext}}}});var UnionSerde2,init_UnionSerde2=__esm({"node_modules/@aws-sdk/core/dist-es/submodules/protocols/UnionSerde.js"(){UnionSerde2=class{from;to;keys;constructor(from,to){this.from=from,this.to=to;let keys=Object.keys(this.from),set=new Set(keys);set.delete("__type"),this.keys=set}mark(key){this.keys.delete(key)}hasUnknown(){return this.keys.size===1&&Object.keys(this.to).length===0}writeUnknown(){if(this.hasUnknown()){let k5=this.keys.values().next().value,v=this.from[k5];this.to.$unknown=[k5,v]}}}}});function writeKey2(obj){Object.defineProperty(obj,"__proto__",{value:void 0,writable:!0,enumerable:!0,configurable:!0})}var init_writeKey2=__esm({"node_modules/@aws-sdk/core/dist-es/submodules/protocols/writeKey.js"(){}});var import_xml_builder,XmlShapeDeserializer,init_XmlShapeDeserializer=__esm({"node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlShapeDeserializer.js"(){import_xml_builder=__toESM(require_dist_cjs4());init_client();init_protocols();init_schema();init_serde();init_ConfigurableSerdeContext2();init_UnionSerde2();init_writeKey2();XmlShapeDeserializer=class extends SerdeContextConfig2{settings;stringDeserializer;constructor(settings){super(),this.settings=settings,this.stringDeserializer=
483
426
  new FromStringShapeDeserializer(settings)}setSerdeContext(serdeContext){this.serdeContext=serdeContext,this.stringDeserializer.setSerdeContext(serdeContext)}read(schema,bytes,key){let ns=NormalizedSchema.of(schema),memberSchemas=ns.getMemberSchemas();if(ns.isStructSchema()&&ns.isMemberSchema()&&!!Object.values(memberSchemas).find(memberNs=>!!memberNs.getMemberTraits().eventPayload)){let output={},memberName=Object.keys(memberSchemas)[0];return memberSchemas[memberName].isBlobSchema()?output[memberName]=
484
427
  bytes:output[memberName]=this.read(memberSchemas[memberName],bytes),output}let xmlString=(this.serdeContext?.utf8Encoder??toUtf8)(bytes),parsedObject=this.parseXml(xmlString);return this.readSchema(schema,key?parsedObject[key]:parsedObject)}readSchema(_schema,value){let ns=NormalizedSchema.of(_schema);if(ns.isUnitSchema())return;let traits=ns.getMergedTraits();if(ns.isListSchema()&&!Array.isArray(value))return this.readSchema(ns,[value]);if(value==null)return value;if(typeof value=="object"){let flat=!!traits.
485
428
  xmlFlattened;if(ns.isListSchema()){let listValue=ns.getValueSchema(),buffer2=[],sourceKey=listValue.getMergedTraits().xmlName??"member",source=flat?value:(value[0]??value)[sourceKey];if(source==null)return buffer2;let sourceArray=Array.isArray(source)?source:[source];for(let v of sourceArray)buffer2.push(this.readSchema(listValue,v));return buffer2}let buffer={};if(ns.isMapSchema()){let keyNs=ns.getKeySchema(),memberNs=ns.getValueSchema(),entries;flat?entries=Array.isArray(value)?value:[value]:entries=
@@ -502,7 +445,7 @@ value}let shortName=operationSchema.name.split("#")[1]??operationSchema.name,aws
502
445
  loadQueryErrorCode(response,dataObject)??"Unknown";this.mixin.compose(this.compositeErrorRegistry,errorIdentifier,this.options.defaultNamespace);let errorData=this.loadQueryError(dataObject)??{},message=this.loadQueryErrorMessage(dataObject);errorData.message=message,errorData.Error={Type:errorData.Type,Code:errorData.Code,Message:message};let{errorSchema,errorMetadata}=await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier,this.options.defaultNamespace,response,errorData,metadata,this.
503
446
  mixin.findQueryCompatibleError),ns=NormalizedSchema.of(errorSchema),ErrorCtor=this.compositeErrorRegistry.getErrorCtor(errorSchema)??Error,exception=new ErrorCtor({}),output={Type:errorData.Error.Type,Code:errorData.Error.Code,Error:errorData.Error};for(let[name,member]of ns.structIterator()){let target=member.getMergedTraits().xmlName??name,value=errorData[target]??dataObject[target];output[name]=this.deserializer.readSchema(member,value)}throw this.mixin.decorateServiceException(Object.assign(
504
447
  exception,errorMetadata,{$fault:ns.getMergedTraits().error,message},output),dataObject)}loadQueryErrorCode(output,data){let code=(data.Errors?.[0]?.Error??data.Errors?.Error??data.Error)?.Code;if(code!==void 0)return code;if(output.statusCode==404)return"NotFound"}loadQueryError(data){return data.Errors?.[0]?.Error??data.Errors?.Error??data.Error}loadQueryErrorMessage(data){let errorData=this.loadQueryError(data);return errorData?.message??errorData?.Message??data.message??data.Message??"Unknown"}getDefaultContentType(){
505
- return"application/x-www-form-urlencoded"}}}});var AwsEc2QueryProtocol,init_AwsEc2QueryProtocol=__esm({"node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/AwsEc2QueryProtocol.js"(){init_AwsQueryProtocol();AwsEc2QueryProtocol=class extends AwsQueryProtocol{options;constructor(options){super(options),this.options=options;let ec2Settings={capitalizeKeys:!0,flattenLists:!0,serializeEmptyLists:!1,ec2:!0};Object.assign(this.serializer.settings,ec2Settings)}getShapeId(){return"aws.protocols#ec2Query"}useNestedResult(){return!1}}}});var import_xml_builder2,parseXmlBody,parseXmlErrorBody,loadRestXmlErrorCode,init_parseXmlBody=__esm({"node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/parseXmlBody.js"(){import_xml_builder2=__toESM(require_dist_cjs4());init_client();init_common2();parseXmlBody=(streamBody,context)=>collectBodyString2(streamBody,context).then(encoded=>{if(encoded.length){let parsedObj;try{parsedObj=(0,import_xml_builder2.parseXML)(encoded)}catch(e5){throw e5&&typeof e5=="object"&&Object.defineProperty(
448
+ return"application/x-www-form-urlencoded"}}}});var AwsEc2QueryProtocol,init_AwsEc2QueryProtocol=__esm({"node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/AwsEc2QueryProtocol.js"(){init_AwsQueryProtocol();AwsEc2QueryProtocol=class extends AwsQueryProtocol{options;constructor(options){super(options),this.options=options;let ec2Settings={capitalizeKeys:!0,flattenLists:!0,serializeEmptyLists:!1,ec2:!0};Object.assign(this.serializer.settings,ec2Settings)}getShapeId(){return"aws.protocols#ec2Query"}useNestedResult(){return!1}}}});var collectBodyString2,init_common2=__esm({"node_modules/@aws-sdk/core/dist-es/submodules/protocols/common.js"(){init_protocols();init_serde();collectBodyString2=(streamBody,context)=>collectBody(streamBody,context).then(body=>(context?.utf8Encoder??toUtf8)(body))}});var import_xml_builder2,parseXmlBody,parseXmlErrorBody,loadRestXmlErrorCode,init_parseXmlBody=__esm({"node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/parseXmlBody.js"(){import_xml_builder2=__toESM(require_dist_cjs4());init_client();init_common2();parseXmlBody=(streamBody,context)=>collectBodyString2(streamBody,context).then(encoded=>{if(encoded.length){let parsedObj;try{parsedObj=(0,import_xml_builder2.parseXML)(encoded)}catch(e5){throw e5&&typeof e5=="object"&&Object.defineProperty(
506
449
  e5,"$responseBodyText",{value:encoded}),e5}let textNodeName="#text",key=Object.keys(parsedObj)[0],parsedObjToReturn=parsedObj[key];return parsedObjToReturn[textNodeName]&&(parsedObjToReturn[key]=parsedObjToReturn[textNodeName],delete parsedObjToReturn[textNodeName]),getValueFromTextNode(parsedObjToReturn)}return{}}),parseXmlErrorBody=async(errorBody,context)=>{let value=await parseXmlBody(errorBody,context);return value.Error&&(value.Error.message=value.Error.message??value.Error.Message),value},
507
450
  loadRestXmlErrorCode=(output,data)=>{if(data?.Error?.Code!==void 0)return data.Error.Code;if(data?.Code!==void 0)return data.Code;if(output.statusCode==404)return"NotFound"}}});var import_xml_builder3,XmlShapeSerializer,init_XmlShapeSerializer=__esm({"node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlShapeSerializer.js"(){import_xml_builder3=__toESM(require_dist_cjs4());init_protocols();init_schema();init_serde();init_serde();init_ConfigurableSerdeContext2();XmlShapeSerializer=class extends SerdeContextConfig2{settings;stringBuffer;byteBuffer;buffer;constructor(settings){super(),this.settings=settings}write(schema,value){let ns=NormalizedSchema.of(schema);
508
451
  if(ns.isStringSchema()&&typeof value=="string")this.stringBuffer=value;else if(ns.isBlobSchema())this.byteBuffer="byteLength"in value?value:(this.serdeContext?.base64Decoder??fromBase64)(value);else{this.buffer=this.writeStruct(ns,value,void 0);let traits=ns.getMergedTraits();traits.httpPayload&&!traits.xmlName&&this.buffer.withName(ns.getName())}}flush(){if(this.byteBuffer!==void 0){let bytes=this.byteBuffer;return delete this.byteBuffer,bytes}if(this.stringBuffer!==void 0){let str=this.stringBuffer;
@@ -529,10 +472,10 @@ dataObject.RequestId&&!metadata.requestId&&(metadata.requestId=dataObject.Reques
529
472
  deserializeHttpMessage(errorSchema,context,response,dataObject);let output={},errorDeserializer=this.codec.createDeserializer();for(let[name,member]of ns.structIterator()){let target=member.getMergedTraits().xmlName??name,value=dataObject.Error?.[target]??dataObject[target];output[name]=errorDeserializer.readSchema(member,value)}throw this.mixin.decorateServiceException(Object.assign(exception,errorMetadata,{$fault:ns.getMergedTraits().error,message},output),dataObject)}getDefaultContentType(){return"\
530
473
  application/xml"}hasUnstructuredPayloadBinding(ns){for(let[,member]of ns.structIterator())if(member.getMergedTraits().httpPayload)return!(member.isStructSchema()||member.isMapSchema()||member.isListSchema());return!1}}}});var awsExpectUnion,init_awsExpectUnion=__esm({"node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/awsExpectUnion.js"(){init_serde();awsExpectUnion=value=>{if(value!=null)return typeof value=="object"&&"__type"in value&&delete value.__type,expectUnion(value)}}});var _toStr,_toBool,_toNum,init_coercing_serializers=__esm({"node_modules/@aws-sdk/core/dist-es/submodules/protocols/coercing-serializers.js"(){_toStr=val=>{if(val==null)return val;if(typeof val=="number"||typeof val=="bigint"){let warning2=new Error(`Received number ${val} where a string was expected.`);return warning2.name="Warning",console.warn(warning2),String(val)}if(typeof val=="boolean"){let warning2=new Error(`Received boolean ${val} where a string was expected.`);return warning2.name="Wa\
531
474
  rning",console.warn(warning2),String(val)}return val},_toBool=val=>{if(val==null)return val;if(typeof val=="string"){let lowercase=val.toLowerCase();if(val!==""&&lowercase!=="false"&&lowercase!=="true"){let warning2=new Error(`Received string "${val}" where a boolean was expected.`);warning2.name="Warning",console.warn(warning2)}return val!==""&&lowercase!=="false"}return val},_toNum=val=>{if(val==null)return val;if(typeof val=="string"){let num=Number(val);if(num.toString()!==val){let warning2=new Error(
532
- `Received string "${val}" where a number was expected.`);return warning2.name="Warning",console.warn(warning2),val}return num}return val}}});var protocols_exports2={};__export(protocols_exports2,{AwsEc2QueryProtocol:()=>AwsEc2QueryProtocol,AwsJson1_0Protocol:()=>AwsJson1_0Protocol,AwsJson1_1Protocol:()=>AwsJson1_1Protocol,AwsJsonRpcProtocol:()=>AwsJsonRpcProtocol,AwsQueryProtocol:()=>AwsQueryProtocol,AwsRestJsonProtocol:()=>AwsRestJsonProtocol,AwsRestXmlProtocol:()=>AwsRestXmlProtocol,AwsSmithyRpcV2CborProtocol:()=>AwsSmithyRpcV2CborProtocol,JsonCodec:()=>JsonCodec3,JsonCodec2:()=>JsonCodec22,JsonShapeDeserializer:()=>JsonShapeDeserializer3,
533
- JsonShapeDeserializer2:()=>JsonShapeDeserializer22,JsonShapeSerializer:()=>JsonShapeSerializer3,JsonShapeSerializer2:()=>JsonShapeSerializer22,QueryShapeSerializer:()=>QueryShapeSerializer,XmlCodec:()=>XmlCodec,XmlShapeDeserializer:()=>XmlShapeDeserializer,XmlShapeSerializer:()=>XmlShapeSerializer,_toBool:()=>_toBool,_toNum:()=>_toNum,_toStr:()=>_toStr,awsExpectUnion:()=>awsExpectUnion,loadJsonRpcErrorCode:()=>loadJsonRpcErrorCode2,loadRestJsonErrorCode:()=>loadRestJsonErrorCode2,loadRestXmlErrorCode:()=>loadRestXmlErrorCode,
534
- parseJsonBody:()=>parseJsonBody2,parseJsonErrorBody:()=>parseJsonErrorBody2,parseXmlBody:()=>parseXmlBody,parseXmlErrorBody:()=>parseXmlErrorBody});var init_protocols2=__esm({"node_modules/@aws-sdk/core/dist-es/submodules/protocols/index.js"(){init_AwsSmithyRpcV2CborProtocol();init_AwsJson1_0Protocol();init_AwsJson1_1Protocol();init_AwsJsonRpcProtocol();init_AwsRestJsonProtocol();init_JsonCodec3();init_JsonShapeDeserializer3();init_JsonShapeSerializer3();init_JsonCodec22();init_JsonShapeDeserializer22();
535
- init_JsonShapeSerializer22();init_parseJsonBody2();init_AwsEc2QueryProtocol();init_AwsQueryProtocol();init_QueryShapeSerializer();init_AwsRestXmlProtocol();init_XmlCodec();init_XmlShapeDeserializer();init_XmlShapeSerializer();init_parseXmlBody();init_awsExpectUnion();init_coercing_serializers()}});var require_dist_cjs5=__commonJS({"node_modules/@aws-sdk/credential-provider-env/dist-cjs/index.js"(exports){var{setCredentialFeature:setCredentialFeature2}=(init_client2(),__toCommonJS(client_exports2)),{CredentialsProviderError}=(init_config(),__toCommonJS(config_exports)),ENV_KEY="AWS_ACCESS_KEY_ID",ENV_SECRET="AWS_SECRET_ACCESS_KEY",ENV_SESSION="AWS_SESSION_TOKEN",ENV_EXPIRATION="AWS_CREDENTIAL_EXPIRATION",ENV_CREDENTIAL_SCOPE="AWS_CREDENTIAL_SCOPE",ENV_ACCOUNT_ID="AWS_ACCOUNT_ID",fromEnv=init=>async()=>{
475
+ `Received string "${val}" where a number was expected.`);return warning2.name="Warning",console.warn(warning2),val}return num}return val}}});var protocols_exports2={};__export(protocols_exports2,{AwsEc2QueryProtocol:()=>AwsEc2QueryProtocol,AwsJson1_0Protocol:()=>AwsJson1_0Protocol,AwsJson1_1Protocol:()=>AwsJson1_1Protocol,AwsJsonRpcProtocol:()=>AwsJsonRpcProtocol,AwsQueryProtocol:()=>AwsQueryProtocol,AwsRestJsonProtocol:()=>AwsRestJsonProtocol,AwsRestXmlProtocol:()=>AwsRestXmlProtocol,AwsSmithyRpcV2CborProtocol:()=>AwsSmithyRpcV2CborProtocol,JsonCodec:()=>JsonCodec,JsonCodec2:()=>JsonCodec2,JsonShapeDeserializer:()=>JsonShapeDeserializer,
476
+ JsonShapeDeserializer2:()=>JsonShapeDeserializer2,JsonShapeSerializer:()=>JsonShapeSerializer,JsonShapeSerializer2:()=>JsonShapeSerializer2,QueryShapeSerializer:()=>QueryShapeSerializer,XmlCodec:()=>XmlCodec,XmlShapeDeserializer:()=>XmlShapeDeserializer,XmlShapeSerializer:()=>XmlShapeSerializer,_toBool:()=>_toBool,_toNum:()=>_toNum,_toStr:()=>_toStr,awsExpectUnion:()=>awsExpectUnion,loadJsonRpcErrorCode:()=>loadJsonRpcErrorCode,loadRestJsonErrorCode:()=>loadRestJsonErrorCode,loadRestXmlErrorCode:()=>loadRestXmlErrorCode,
477
+ parseJsonBody:()=>parseJsonBody,parseJsonErrorBody:()=>parseJsonErrorBody,parseXmlBody:()=>parseXmlBody,parseXmlErrorBody:()=>parseXmlErrorBody});var init_protocols2=__esm({"node_modules/@aws-sdk/core/dist-es/submodules/protocols/index.js"(){init_AwsSmithyRpcV2CborProtocol();init_AwsJson1_0Protocol();init_AwsJson1_1Protocol();init_AwsJsonRpcProtocol();init_AwsRestJsonProtocol();init_protocols();init_AwsEc2QueryProtocol();init_AwsQueryProtocol();init_QueryShapeSerializer();init_AwsRestXmlProtocol();
478
+ init_XmlCodec();init_XmlShapeDeserializer();init_XmlShapeSerializer();init_parseXmlBody();init_awsExpectUnion();init_coercing_serializers()}});var require_dist_cjs5=__commonJS({"node_modules/@aws-sdk/credential-provider-env/dist-cjs/index.js"(exports){var{setCredentialFeature:setCredentialFeature2}=(init_client2(),__toCommonJS(client_exports2)),{CredentialsProviderError}=(init_config(),__toCommonJS(config_exports)),ENV_KEY="AWS_ACCESS_KEY_ID",ENV_SECRET="AWS_SECRET_ACCESS_KEY",ENV_SESSION="AWS_SESSION_TOKEN",ENV_EXPIRATION="AWS_CREDENTIAL_EXPIRATION",ENV_CREDENTIAL_SCOPE="AWS_CREDENTIAL_SCOPE",ENV_ACCOUNT_ID="AWS_ACCOUNT_ID",fromEnv=init=>async()=>{
536
479
  init?.logger?.debug("@aws-sdk/credential-provider-env - fromEnv");let accessKeyId=process.env[ENV_KEY],secretAccessKey=process.env[ENV_SECRET],sessionToken=process.env[ENV_SESSION],expiry=process.env[ENV_EXPIRATION],credentialScope=process.env[ENV_CREDENTIAL_SCOPE],accountId=process.env[ENV_ACCOUNT_ID];if(accessKeyId&&secretAccessKey){let credentials={accessKeyId,secretAccessKey,...sessionToken&&{sessionToken},...expiry&&{expiration:new Date(expiry)},...credentialScope&&{credentialScope},...accountId&&
537
480
  {accountId}};return setCredentialFeature2(credentials,"CREDENTIALS_ENV_VARS","g"),credentials}throw new CredentialsProviderError("Unable to find environment variable credentials.",{logger:init?.logger})};exports.ENV_ACCOUNT_ID=ENV_ACCOUNT_ID;exports.ENV_CREDENTIAL_SCOPE=ENV_CREDENTIAL_SCOPE;exports.ENV_EXPIRATION=ENV_EXPIRATION;exports.ENV_KEY=ENV_KEY;exports.ENV_SECRET=ENV_SECRET;exports.ENV_SESSION=ENV_SESSION;exports.fromEnv=fromEnv}});var require_dist_cjs6=__commonJS({"node_modules/@smithy/credential-provider-imds/dist-cjs/index.js"(exports){var{ProviderError:ProviderError2,CredentialsProviderError,loadConfig:loadConfig2}=(init_config(),__toCommonJS(config_exports)),node_http=__require("node:http"),{parseUrl:parseUrl2}=(init_protocols(),__toCommonJS(protocols_exports)),isImdsCredentials=arg=>!!arg&&typeof arg=="object"&&typeof arg.AccessKeyId=="string"&&typeof arg.SecretAccessKey=="string"&&typeof arg.Token=="string"&&typeof arg.
538
481
  Expiration=="string",fromImdsCredentials=creds=>({accessKeyId:creds.AccessKeyId,secretAccessKey:creds.SecretAccessKey,sessionToken:creds.Token,expiration:new Date(creds.Expiration),...creds.AccountId&&{accountId:creds.AccountId}}),DEFAULT_TIMEOUT=1e3,DEFAULT_MAX_RETRIES=0,providerConfigFromInit=({maxRetries=DEFAULT_MAX_RETRIES,timeout=DEFAULT_TIMEOUT})=>({maxRetries,timeout});function httpRequest(options){return new Promise((resolve,reject)=>{let req=node_http.request({method:"GET",...options,hostname:options.
@@ -573,13 +516,13 @@ try{let result=await requestHandler.handle(request,{requestTimeout});return getC
573
516
  `))throw new CredentialsProviderError("Authorization token contains invalid \\r\\n sequence.");return token};exports.fromHttp=fromHttp}});function createAwsAuthSigv4HttpAuthOption(authParameters){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:authParameters.region},propertiesExtractor:(config,context)=>({signingProperties:{config,context}})}}function createSmithyApiNoAuthHttpAuthOption(authParameters){return{schemeId:"smithy.api#noAuth"}}var defaultSSOOIDCHttpAuthSchemeParametersProvider,defaultSSOOIDCHttpAuthSchemeProvider,resolveHttpAuthSchemeConfig,init_httpAuthSchemeProvider=__esm({"node_modules/@a\
574
517
  ws-sdk/nested-clients/dist-es/submodules/sso-oidc/auth/httpAuthSchemeProvider.js"(){init_httpAuthSchemes2();init_client();defaultSSOOIDCHttpAuthSchemeParametersProvider=async(config,context,input)=>({operation:getSmithyContext(context).operation,region:await normalizeProvider(config.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});defaultSSOOIDCHttpAuthSchemeProvider=authParameters=>{let options=[];return authParameters.operation==="CreateToken"?options.
575
518
  push(createSmithyApiNoAuthHttpAuthOption(authParameters)):options.push(createAwsAuthSigv4HttpAuthOption(authParameters)),options},resolveHttpAuthSchemeConfig=config=>{let config_0=resolveAwsSdkSigV4Config(config);return Object.assign(config_0,{authSchemePreference:normalizeProvider(config.authSchemePreference??[])})}}});var resolveClientEndpointParameters,commonParams,init_EndpointParameters=__esm({"node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/endpoint/EndpointParameters.js"(){resolveClientEndpointParameters=options=>Object.assign(options,{useDualstackEndpoint:options.useDualstackEndpoint??!1,useFipsEndpoint:options.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"}),commonParams={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"\
576
- builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}}});var package_default,init_package=__esm({"node_modules/@aws-sdk/nested-clients/package.json"(){package_default={name:"@aws-sdk/nested-clients",version:"3.997.48",description:"Nested clients for AWS SDK packages.",homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients",license:"Apache-2.0",author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/sdk-for-javascript/"},repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"packages/ne\
519
+ builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}}});var package_default,init_package=__esm({"node_modules/@aws-sdk/nested-clients/package.json"(){package_default={name:"@aws-sdk/nested-clients",version:"3.997.50",description:"Nested clients for AWS SDK packages.",homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients",license:"Apache-2.0",author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/sdk-for-javascript/"},repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"packages/ne\
577
520
  sted-clients"},files:["./cognito-identity.d.ts","./cognito-identity.js","./signin.d.ts","./signin.js","./sso-oidc.d.ts","./sso-oidc.js","./sso.d.ts","./sso.js","./sts.d.ts","./sts.js","dist-*/**"],sideEffects:!1,main:"./dist-cjs/index.js",module:"./dist-es/index.js",browser:{"./dist-es/submodules/cognito-identity/runtimeConfig":"./dist-es/submodules/cognito-identity/runtimeConfig.browser","./dist-es/submodules/signin/runtimeConfig":"./dist-es/submodules/signin/runtimeConfig.browser","./dist-es/s\
578
521
  ubmodules/sso-oidc/runtimeConfig":"./dist-es/submodules/sso-oidc/runtimeConfig.browser","./dist-es/submodules/sso/runtimeConfig":"./dist-es/submodules/sso/runtimeConfig.browser","./dist-es/submodules/sts/runtimeConfig":"./dist-es/submodules/sts/runtimeConfig.browser"},types:"./dist-types/index.d.ts",typesVersions:{"<4.5":{"dist-types/*":["dist-types/ts3.4/*"],"*":["dist-types/ts3.4/submodules/*/index.d.ts"]}},"react-native":{},exports:{"./package.json":"./package.json","./sso-oidc":{types:"./dis\
579
522
  t-types/submodules/sso-oidc/index.d.ts",module:"./dist-es/submodules/sso-oidc/index.js",node:"./dist-cjs/submodules/sso-oidc/index.js",import:"./dist-es/submodules/sso-oidc/index.js",require:"./dist-cjs/submodules/sso-oidc/index.js"},"./sts":{types:"./dist-types/submodules/sts/index.d.ts",module:"./dist-es/submodules/sts/index.js",node:"./dist-cjs/submodules/sts/index.js",import:"./dist-es/submodules/sts/index.js",require:"./dist-cjs/submodules/sts/index.js"},"./signin":{types:"./dist-types/subm\
580
523
  odules/signin/index.d.ts",module:"./dist-es/submodules/signin/index.js",node:"./dist-cjs/submodules/signin/index.js",import:"./dist-es/submodules/signin/index.js",require:"./dist-cjs/submodules/signin/index.js"},"./cognito-identity":{types:"./dist-types/submodules/cognito-identity/index.d.ts",module:"./dist-es/submodules/cognito-identity/index.js",node:"./dist-cjs/submodules/cognito-identity/index.js",import:"./dist-es/submodules/cognito-identity/index.js",require:"./dist-cjs/submodules/cognito-\
581
524
  identity/index.js"},"./sso":{types:"./dist-types/submodules/sso/index.d.ts",module:"./dist-es/submodules/sso/index.js",node:"./dist-cjs/submodules/sso/index.js",import:"./dist-es/submodules/sso/index.js",require:"./dist-cjs/submodules/sso/index.js"}},scripts:{build:"concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs","build:cjs":"node ../../scripts/compilation/inline","build:es":"premove dist-es && tsc -p tsconfig.es.json","build:include:deps":'yarn g:turbo run build -F="$npm_pack\
582
- age_name"',"build:types":"premove dist-types && tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"premove dist-cjs dist-es dist-types",lint:"node ../../scripts/validation/submodules-linter.js",prebuild:"yarn lint",test:"yarn g:vitest run","test:watch":"yarn g:vitest watch"},dependencies:{"@aws-sdk/core":"^3.978.3","@aws-sdk/signature-v4-multi-region":"^3.996.48","@aws-sdk/types":"^3.974.6","@smithy/core":"^3.35.2","@smithy/fetch-http-handler":"\
525
+ age_name"',"build:types":"premove dist-types && tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"premove dist-cjs dist-es dist-types",lint:"node ../../scripts/validation/submodules-linter.js",prebuild:"yarn lint",test:"yarn g:vitest run","test:watch":"yarn g:vitest watch"},dependencies:{"@aws-sdk/core":"^3.978.5","@aws-sdk/signature-v4-multi-region":"^3.996.49","@aws-sdk/types":"^3.975.0","@smithy/core":"^3.36.1","@smithy/fetch-http-handler":"\
583
526
  ^5.8.0","@smithy/node-http-handler":"^4.12.1","@smithy/types":"^4.19.0",tslib:"^2.6.2"},devDependencies:{concurrently:"7.0.0","downlevel-dts":"0.10.1",premove:"4.0.0",typescript:"~7.0.2"},engines:{node:">=20.0.0"}}}});var k,a,b,c,d,e,f,g,h,i,j,_data,root,r,nodes,bdd,init_bdd=__esm({"node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/endpoint/bdd.js"(){init_endpoints();k="ref",a=-1,b=!0,c="isSet",d="PartitionResult",e="booleanEquals",f="getAttr",g={[k]:"Endpoint"},h={[k]:d},i={},j=[{[k]:"Region"}],_data={conditions:[[c,[g]],[c,j],["aws.partition",j,d],[e,[{[k]:"UseFIPS"},b]],[e,[{[k]:"UseDualStack"},b]],[e,[{fn:f,argv:[h,"supportsDualStack"]},b]],[e,[{fn:f,argv:[h,"supportsFIPS"]},b]],["stringEqu\
584
527
  als",[{fn:f,argv:[h,"name"]},"aws-us-gov"]]],results:[[a],[a,"Invalid Configuration: FIPS and custom endpoint are not supported"],[a,"Invalid Configuration: Dualstack and custom endpoint are not supported"],[g,i],["https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",i],[a,"FIPS and DualStack are enabled, but this partition does not support one or both"],["https://oidc.{Region}.amazonaws.com",i],["https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",i],[a,"FIPS is enabled but this\
585
528
  partition does not support FIPS"],["https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",i],[a,"DualStack is enabled but this partition does not support DualStack"],["https://oidc.{Region}.{PartitionResult#dnsSuffix}",i],[a,"Invalid Configuration: Missing Region"]]},root=2,r=1e8,nodes=new Int32Array([-1,1,-1,0,13,3,1,4,r+12,2,5,r+12,3,8,6,4,7,r+11,5,r+9,r+10,4,11,9,6,10,r+8,7,r+6,r+7,5,12,r+5,6,r+4,r+5,3,r+1,14,4,r+2,r+3]),bdd=BinaryDecisionDiagram.from(nodes,root,_data.conditions,_data.
@@ -620,13 +563,14 @@ UnsupportedGrantTypeException:()=>UnsupportedGrantTypeException,UnsupportedGrant
620
563
  return setTokenFeature2(token,"BEARER_SERVICE_ENV_VARS","3"),token},EXPIRE_WINDOW_MS=300*1e3,REFRESH_MESSAGE="To refresh this SSO session run 'aws sso login' with the corresponding profile.",getSsoOidcClient=async(ssoRegion,init={},callerClientConfig)=>{let{SSOOIDCClient:SSOOIDCClient2}=(init_sso_oidc(),__toCommonJS(sso_oidc_exports)),coalesce=prop=>init.clientConfig?.[prop]??init.parentClientConfig?.[prop]??callerClientConfig?.[prop];return new SSOOIDCClient2(Object.assign({},init.clientConfig??
621
564
  {},{region:ssoRegion??init.clientConfig?.region,logger:coalesce("logger"),userAgentAppId:coalesce("userAgentAppId")}))},getNewSsoOidcToken=async(ssoToken,ssoRegion,init={},callerClientConfig)=>{let{CreateTokenCommand:CreateTokenCommand2}=(init_sso_oidc(),__toCommonJS(sso_oidc_exports));return(await getSsoOidcClient(ssoRegion,init,callerClientConfig)).send(new CreateTokenCommand2({clientId:ssoToken.clientId,clientSecret:ssoToken.clientSecret,refreshToken:ssoToken.refreshToken,grantType:"refresh_t\
622
565
  oken"}))},validateTokenExpiry=token=>{if(token.expiration&&token.expiration.getTime()<Date.now())throw new TokenProviderError(`Token is expired. ${REFRESH_MESSAGE}`,!1)},validateTokenKey=(key,value,forRefresh=!1)=>{if(typeof value>"u")throw new TokenProviderError(`Value not present for '${key}' in SSO Token${forRefresh?". Cannot refresh":""}. ${REFRESH_MESSAGE}`,!1)},{writeFile}=promises,writeSSOTokenToFile=(id,ssoToken)=>{let tokenFilepath=getSSOTokenFilepath(id),tokenString=JSON.stringify(ssoToken,
623
- null,2);return writeFile(tokenFilepath,tokenString)},lastRefreshAttemptTimes=new Map,fromSso=(init={})=>async({callerClientConfig}={})=>{init.logger?.debug("@aws-sdk/token-providers - fromSso");let profiles=await parseKnownFiles(init),profileName=getProfileName({profile:init.profile??callerClientConfig?.profile}),profile=profiles[profileName];if(profile){if(!profile.sso_session)throw new TokenProviderError(`Profile '${profileName}' is missing required property 'sso_session'.`)}else throw new TokenProviderError(
624
- `Profile '${profileName}' could not be found in shared credentials file.`,!1);let ssoSessionName=profile.sso_session,ssoSession=(await loadSsoSessionData(init))[ssoSessionName];if(!ssoSession)throw new TokenProviderError(`Sso session '${ssoSessionName}' could not be found in shared credentials file.`,!1);for(let ssoSessionRequiredKey of["sso_start_url","sso_region"])if(!ssoSession[ssoSessionRequiredKey])throw new TokenProviderError(`Sso session '${ssoSessionName}' is missing required property '${ssoSessionRequiredKey}\
625
- '.`,!1);ssoSession.sso_start_url;let ssoRegion=ssoSession.sso_region,ssoToken;try{ssoToken=await getSSOTokenFromFile(ssoSessionName)}catch{throw new TokenProviderError(`The SSO session token associated with profile=${profileName} was not found or is invalid. ${REFRESH_MESSAGE}`,!1)}validateTokenKey("accessToken",ssoToken.accessToken),validateTokenKey("expiresAt",ssoToken.expiresAt);let{accessToken,expiresAt}=ssoToken,existingToken={token:accessToken,expiration:new Date(expiresAt)};if(existingToken.
626
- expiration.getTime()-Date.now()>EXPIRE_WINDOW_MS)return existingToken;let lastRefreshAttemptTime=lastRefreshAttemptTimes.get(ssoSessionName)??0;if(Date.now()-lastRefreshAttemptTime<30*1e3)return validateTokenExpiry(existingToken),existingToken;validateTokenKey("clientId",ssoToken.clientId,!0),validateTokenKey("clientSecret",ssoToken.clientSecret,!0),validateTokenKey("refreshToken",ssoToken.refreshToken,!0);try{lastRefreshAttemptTimes.set(ssoSessionName,Date.now());let newSsoOidcToken=await getNewSsoOidcToken(
627
- ssoToken,ssoRegion,init,callerClientConfig);validateTokenKey("accessToken",newSsoOidcToken.accessToken),validateTokenKey("expiresIn",newSsoOidcToken.expiresIn);let newTokenExpiration=new Date(Date.now()+newSsoOidcToken.expiresIn*1e3);try{await writeSSOTokenToFile(ssoSessionName,{...ssoToken,accessToken:newSsoOidcToken.accessToken,expiresAt:newTokenExpiration.toISOString(),refreshToken:newSsoOidcToken.refreshToken})}catch{}return{token:newSsoOidcToken.accessToken,expiration:newTokenExpiration}}catch{
628
- return validateTokenExpiry(existingToken),existingToken}},fromStatic=({token,logger})=>async()=>{if(logger?.debug("@aws-sdk/token-providers - fromStatic"),!token||!token.token)throw new TokenProviderError("Please pass a valid token to fromStatic",!1);return token},nodeProvider=(init={})=>memoize(chain(fromSso(init),async()=>{throw new TokenProviderError("Could not load token from any providers",!1)}),token=>token.expiration!==void 0&&token.expiration.getTime()-Date.now()<3e5,token=>token.expiration!==
629
- void 0);exports.fromEnvSigningName=fromEnvSigningName;exports.fromSso=fromSso;exports.fromStatic=fromStatic;exports.nodeProvider=nodeProvider}});function createAwsAuthSigv4HttpAuthOption2(authParameters){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"awsssoportal",region:authParameters.region},propertiesExtractor:(config,context)=>({signingProperties:{config,context}})}}function createSmithyApiNoAuthHttpAuthOption2(authParameters){return{schemeId:"smithy.api#noAuth"}}var defaultSSOHttpAuthSchemeParametersProvider,defaultSSOHttpAuthSchemeProvider,resolveHttpAuthSchemeConfig2,init_httpAuthSchemeProvider2=__esm({"node_modules/@aw\
566
+ null,2);return writeFile(tokenFilepath,tokenString)},lastRefreshAttemptTimes=new Map,inFlightRefreshes=new Map,fromSso=(init={})=>async({callerClientConfig}={})=>{init.logger?.debug("@aws-sdk/token-providers - fromSso");let profiles=await parseKnownFiles(init),profileName=getProfileName({profile:init.profile??callerClientConfig?.profile}),profile=profiles[profileName];if(profile){if(!profile.sso_session)throw new TokenProviderError(`Profile '${profileName}' is missing required property 'sso_sess\
567
+ ion'.`)}else throw new TokenProviderError(`Profile '${profileName}' could not be found in shared credentials file.`,!1);let ssoSessionName=profile.sso_session,inFlightRefresh=inFlightRefreshes.get(ssoSessionName);if(inFlightRefresh)return await inFlightRefresh;let ssoSession=(await loadSsoSessionData(init))[ssoSessionName];if(!ssoSession)throw new TokenProviderError(`Sso session '${ssoSessionName}' could not be found in shared credentials file.`,!1);for(let ssoSessionRequiredKey of["sso_start_ur\
568
+ l","sso_region"])if(!ssoSession[ssoSessionRequiredKey])throw new TokenProviderError(`Sso session '${ssoSessionName}' is missing required property '${ssoSessionRequiredKey}'.`,!1);ssoSession.sso_start_url;let ssoRegion=ssoSession.sso_region,ssoToken;try{ssoToken=await getSSOTokenFromFile(ssoSessionName)}catch{throw new TokenProviderError(`The SSO session token associated with profile=${profileName} was not found or is invalid. ${REFRESH_MESSAGE}`,!1)}validateTokenKey("accessToken",ssoToken.accessToken),
569
+ validateTokenKey("expiresAt",ssoToken.expiresAt);let{accessToken,expiresAt}=ssoToken,existingToken={token:accessToken,expiration:new Date(expiresAt)};if(existingToken.expiration.getTime()-Date.now()>EXPIRE_WINDOW_MS)return existingToken;let inFlightRefreshAfterReadingToken=inFlightRefreshes.get(ssoSessionName);if(inFlightRefreshAfterReadingToken)return await inFlightRefreshAfterReadingToken;let lastRefreshAttemptTime=lastRefreshAttemptTimes.get(ssoSessionName)??0;if(Date.now()-lastRefreshAttemptTime<
570
+ 30*1e3)return validateTokenExpiry(existingToken),existingToken;validateTokenKey("clientId",ssoToken.clientId,!0),validateTokenKey("clientSecret",ssoToken.clientSecret,!0),validateTokenKey("refreshToken",ssoToken.refreshToken,!0);let refresh=(async()=>{try{lastRefreshAttemptTimes.set(ssoSessionName,Date.now());let newSsoOidcToken=await getNewSsoOidcToken(ssoToken,ssoRegion,init,callerClientConfig);validateTokenKey("accessToken",newSsoOidcToken.accessToken),validateTokenKey("expiresIn",newSsoOidcToken.
571
+ expiresIn);let newTokenExpiration=new Date(Date.now()+newSsoOidcToken.expiresIn*1e3);try{await writeSSOTokenToFile(ssoSessionName,{...ssoToken,accessToken:newSsoOidcToken.accessToken,expiresAt:newTokenExpiration.toISOString(),refreshToken:newSsoOidcToken.refreshToken})}catch{}return{token:newSsoOidcToken.accessToken,expiration:newTokenExpiration}}catch{return validateTokenExpiry(existingToken),existingToken}})();inFlightRefreshes.set(ssoSessionName,refresh);try{return await refresh}finally{inFlightRefreshes.
572
+ delete(ssoSessionName)}},fromStatic=({token,logger})=>async()=>{if(logger?.debug("@aws-sdk/token-providers - fromStatic"),!token||!token.token)throw new TokenProviderError("Please pass a valid token to fromStatic",!1);return token},nodeProvider=(init={})=>memoize(chain(fromSso(init),async()=>{throw new TokenProviderError("Could not load token from any providers",!1)}),token=>token.expiration!==void 0&&token.expiration.getTime()-Date.now()<3e5,token=>token.expiration!==void 0);exports.fromEnvSigningName=
573
+ fromEnvSigningName;exports.fromSso=fromSso;exports.fromStatic=fromStatic;exports.nodeProvider=nodeProvider}});function createAwsAuthSigv4HttpAuthOption2(authParameters){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"awsssoportal",region:authParameters.region},propertiesExtractor:(config,context)=>({signingProperties:{config,context}})}}function createSmithyApiNoAuthHttpAuthOption2(authParameters){return{schemeId:"smithy.api#noAuth"}}var defaultSSOHttpAuthSchemeParametersProvider,defaultSSOHttpAuthSchemeProvider,resolveHttpAuthSchemeConfig2,init_httpAuthSchemeProvider2=__esm({"node_modules/@aw\
630
574
  s-sdk/nested-clients/dist-es/submodules/sso/auth/httpAuthSchemeProvider.js"(){init_httpAuthSchemes2();init_client();defaultSSOHttpAuthSchemeParametersProvider=async(config,context,input)=>({operation:getSmithyContext(context).operation,region:await normalizeProvider(config.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()});defaultSSOHttpAuthSchemeProvider=authParameters=>{let options=[];return authParameters.operation==="GetRoleCredentials"?options.
631
575
  push(createSmithyApiNoAuthHttpAuthOption2(authParameters)):options.push(createAwsAuthSigv4HttpAuthOption2(authParameters)),options},resolveHttpAuthSchemeConfig2=config=>{let config_0=resolveAwsSdkSigV4Config(config);return Object.assign(config_0,{authSchemePreference:normalizeProvider(config.authSchemePreference??[])})}}});var resolveClientEndpointParameters2,commonParams2,init_EndpointParameters2=__esm({"node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/endpoint/EndpointParameters.js"(){resolveClientEndpointParameters2=options=>Object.assign(options,{useDualstackEndpoint:options.useDualstackEndpoint??!1,useFipsEndpoint:options.useFipsEndpoint??!1,defaultSigningName:"awsssoportal"}),commonParams2={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{
632
576
  type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}}});var k2,a2,b2,c2,d2,e2,f2,g2,h2,i2,j2,_data2,root2,r2,nodes2,bdd2,init_bdd2=__esm({"node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/endpoint/bdd.js"(){init_endpoints();k2="ref",a2=-1,b2=!0,c2="isSet",d2="PartitionResult",e2="booleanEquals",f2="getAttr",g2={[k2]:"Endpoint"},h2={[k2]:d2},i2={},j2=[{[k2]:"Region"}],_data2={conditions:[[c2,[g2]],[c2,j2],["aws.partition",j2,d2],[e2,[{[k2]:"UseFIPS"},b2]],[e2,[{[k2]:"UseDualStack"},b2]],[e2,[{fn:f2,argv:[h2,"supportsDualStack"]},b2]],[e2,[{