gemi 0.24.2 → 0.25.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 (132) hide show
  1. package/dist/app/index.js +25 -25
  2. package/dist/app/index.js.map +2 -2
  3. package/dist/bin/gemi.js +1 -1
  4. package/dist/bin/gemi.js.map +2 -2
  5. package/dist/broadcasting/index.js +1 -1
  6. package/dist/chunk-0nqce2y1.js +4 -0
  7. package/dist/{chunk-gx3h2xts.js.map → chunk-0nqce2y1.js.map} +6 -6
  8. package/dist/chunk-2ad1cqtt.js +5 -0
  9. package/dist/{chunk-ebcx322z.js.map → chunk-2ad1cqtt.js.map} +1 -1
  10. package/dist/chunk-33p2e7s6.js +5 -0
  11. package/dist/{chunk-k6kx9bhz.js.map → chunk-33p2e7s6.js.map} +2 -2
  12. package/dist/chunk-34cyjp05.js +4 -0
  13. package/dist/{chunk-9f0dmc0v.js.map → chunk-34cyjp05.js.map} +2 -2
  14. package/dist/{chunk-v6hawzhm.js → chunk-3td0xhnw.js} +4 -3
  15. package/dist/{chunk-v6hawzhm.js.map → chunk-3td0xhnw.js.map} +2 -2
  16. package/dist/chunk-697va9vj.js +15 -0
  17. package/dist/chunk-697va9vj.js.map +40 -0
  18. package/dist/chunk-882vm90z.js +5 -0
  19. package/dist/{chunk-47xbr7nj.js.map → chunk-882vm90z.js.map} +2 -2
  20. package/dist/chunk-8rtdf2cd.js +5 -0
  21. package/dist/chunk-8rtdf2cd.js.map +10 -0
  22. package/dist/{chunk-ta6hb843.js → chunk-9rxwxky2.js} +3 -2
  23. package/dist/{chunk-ta6hb843.js.map → chunk-9rxwxky2.js.map} +2 -2
  24. package/dist/chunk-bv0fq16n.js +5 -0
  25. package/dist/{chunk-cp81a2ga.js.map → chunk-bv0fq16n.js.map} +6 -6
  26. package/dist/chunk-c94tyv0f.js +4 -0
  27. package/dist/{chunk-nyqj9vzt.js.map → chunk-c94tyv0f.js.map} +2 -2
  28. package/dist/{chunk-ebcx322z.js → chunk-cbdnkfkw.js} +3 -2
  29. package/dist/chunk-cbdnkfkw.js.map +9 -0
  30. package/dist/chunk-egaxg13a.js +5 -0
  31. package/dist/{chunk-3pw4hcep.js.map → chunk-egaxg13a.js.map} +2 -2
  32. package/dist/chunk-f2qwngan.js +5 -0
  33. package/dist/chunk-f2qwngan.js.map +11 -0
  34. package/dist/{chunk-kbm8egme.js → chunk-fnc2mrgk.js} +4 -3
  35. package/dist/{chunk-kbm8egme.js.map → chunk-fnc2mrgk.js.map} +2 -2
  36. package/dist/chunk-g0qf8xfk.js +5 -0
  37. package/dist/chunk-g0qf8xfk.js.map +10 -0
  38. package/dist/chunk-h5nygx4m.js +26 -0
  39. package/dist/chunk-h5nygx4m.js.map +65 -0
  40. package/dist/chunk-jb8gvdve.js +7 -0
  41. package/dist/{chunk-c3s0zqhy.js.map → chunk-jb8gvdve.js.map} +2 -2
  42. package/dist/{chunk-hj1wc760.js → chunk-m06xgv2s.js} +4 -3
  43. package/dist/{chunk-hj1wc760.js.map → chunk-m06xgv2s.js.map} +2 -2
  44. package/dist/chunk-pmff7dr2.js +4 -0
  45. package/dist/{chunk-z1kwrnv5.js.map → chunk-pmff7dr2.js.map} +2 -2
  46. package/dist/chunk-q47rsdp4.js +4 -0
  47. package/dist/{chunk-5d9ccndf.js.map → chunk-q47rsdp4.js.map} +5 -5
  48. package/dist/chunk-sz5stqah.js +11 -0
  49. package/dist/{chunk-8ctxajfc.js.map → chunk-sz5stqah.js.map} +2 -2
  50. package/dist/chunk-tm1sbeqy.js +4 -0
  51. package/dist/{chunk-nnrnn2qp.js.map → chunk-tm1sbeqy.js.map} +8 -8
  52. package/dist/chunk-tqbe1gyc.js +8 -0
  53. package/dist/{chunk-xpp9rt2p.js.map → chunk-tqbe1gyc.js.map} +2 -2
  54. package/dist/chunk-ve22ma60.js +5 -0
  55. package/dist/chunk-ve22ma60.js.map +14 -0
  56. package/dist/chunk-wt5ayarp.js +6 -0
  57. package/dist/chunk-wt5ayarp.js.map +13 -0
  58. package/dist/{chunk-r5tsj9vp.js → chunk-x6ntsv3z.js} +4 -3
  59. package/dist/{chunk-r5tsj9vp.js.map → chunk-x6ntsv3z.js.map} +2 -2
  60. package/dist/chunk-z7q23s4c.js +4 -0
  61. package/dist/{chunk-x71srja2.js.map → chunk-z7q23s4c.js.map} +2 -2
  62. package/dist/chunk-zf3gtmrt.js +5 -0
  63. package/dist/{chunk-aj408pdc.js.map → chunk-zf3gtmrt.js.map} +2 -2
  64. package/dist/client/QueryResource.d.ts.map +1 -1
  65. package/dist/client/index.d.ts +1 -0
  66. package/dist/client/index.d.ts.map +1 -1
  67. package/dist/client/index.js +61 -2
  68. package/dist/client/index.js.map +1 -1
  69. package/dist/client/useMutate.d.ts +15 -0
  70. package/dist/client/useMutate.d.ts.map +1 -0
  71. package/dist/client/useQuery.d.ts +1 -0
  72. package/dist/client/useQuery.d.ts.map +1 -1
  73. package/dist/email/index.js +2 -2
  74. package/dist/email/index.js.map +2 -2
  75. package/dist/facades/index.js +31 -31
  76. package/dist/facades/index.js.map +7 -7
  77. package/dist/http/index.js +2 -2
  78. package/dist/http/index.js.map +3 -3
  79. package/dist/i18n/index.js +2 -2
  80. package/dist/i18n/index.js.map +2 -2
  81. package/dist/kernel/index.js +2 -2
  82. package/dist/kernel/index.js.map +2 -2
  83. package/dist/server/index.js +2 -2
  84. package/dist/server/index.js.map +2 -2
  85. package/dist/services/index.js +63 -74
  86. package/dist/services/index.js.map +15 -25
  87. package/dist/services/logging/LoggingServiceContainer.d.ts +1 -1
  88. package/dist/services/logging/LoggingServiceContainer.d.ts.map +1 -1
  89. package/dist/services/queue/QueueServiceProvider.d.ts +1 -1
  90. package/dist/services/queue/QueueServiceProvider.d.ts.map +1 -1
  91. package/dist/services/router/createFlatViewRoutes.d.ts +1 -1
  92. package/dist/services/router/createFlatViewRoutes.d.ts.map +1 -1
  93. package/package.json +1 -1
  94. package/dist/chunk-05v9wdf8.js +0 -4
  95. package/dist/chunk-05v9wdf8.js.map +0 -16
  96. package/dist/chunk-2g4nt8nz.js +0 -27
  97. package/dist/chunk-2g4nt8nz.js.map +0 -47
  98. package/dist/chunk-3pw4hcep.js +0 -4
  99. package/dist/chunk-3tn8zz3h.js +0 -3
  100. package/dist/chunk-3tn8zz3h.js.map +0 -23
  101. package/dist/chunk-47xbr7nj.js +0 -4
  102. package/dist/chunk-5d9ccndf.js +0 -4
  103. package/dist/chunk-5yz4jjwj.js +0 -4
  104. package/dist/chunk-5yz4jjwj.js.map +0 -10
  105. package/dist/chunk-7prh8fq1.js +0 -4
  106. package/dist/chunk-7prh8fq1.js.map +0 -100
  107. package/dist/chunk-7tcvk149.js +0 -3
  108. package/dist/chunk-7tcvk149.js.map +0 -15
  109. package/dist/chunk-8ctxajfc.js +0 -11
  110. package/dist/chunk-9f0dmc0v.js +0 -4
  111. package/dist/chunk-aj408pdc.js +0 -4
  112. package/dist/chunk-c3s0zqhy.js +0 -6
  113. package/dist/chunk-cp81a2ga.js +0 -5
  114. package/dist/chunk-cqgt4nb9.js +0 -5
  115. package/dist/chunk-cqgt4nb9.js.map +0 -23
  116. package/dist/chunk-egd5q5dg.js +0 -12
  117. package/dist/chunk-egd5q5dg.js.map +0 -38
  118. package/dist/chunk-g1pmzbbw.js +0 -5
  119. package/dist/chunk-g1pmzbbw.js.map +0 -11
  120. package/dist/chunk-gx3h2xts.js +0 -4
  121. package/dist/chunk-k6kx9bhz.js +0 -4
  122. package/dist/chunk-nnrnn2qp.js +0 -4
  123. package/dist/chunk-nyqj9vzt.js +0 -4
  124. package/dist/chunk-q2rgbdh1.js +0 -5
  125. package/dist/chunk-q2rgbdh1.js.map +0 -39
  126. package/dist/chunk-trs56wy5.js +0 -9
  127. package/dist/chunk-trs56wy5.js.map +0 -25
  128. package/dist/chunk-x71srja2.js +0 -4
  129. package/dist/chunk-xpp9rt2p.js +0 -8
  130. package/dist/chunk-z09sd6xp.js +0 -7
  131. package/dist/chunk-z09sd6xp.js.map +0 -56
  132. package/dist/chunk-z1kwrnv5.js +0 -4
@@ -1,12 +0,0 @@
1
- import{rc as u6}from"./chunk-hj1wc760.js";import{Cc as U,Dc as N}from"./chunk-ebcx322z.js";var l=U((Ew,M0)=>{var{defineProperty:u,getOwnPropertyDescriptor:l6,getOwnPropertyNames:d6}=Object,i6=Object.prototype.hasOwnProperty,y=($,w)=>u($,"name",{value:w,configurable:!0}),p6=($,w)=>{for(var z in w)u($,z,{get:w[z],enumerable:!0})},_6=($,w,z,L)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of d6(w))if(!i6.call($,Z)&&Z!==z)u($,Z,{get:()=>w[Z],enumerable:!(L=l6(w,Z))||L.enumerable})}return $},a6=($)=>_6(u({},"__esModule",{value:!0}),$),A0={};p6(A0,{Field:()=>s6,Fields:()=>r6,HttpRequest:()=>t6,HttpResponse:()=>o6,IHttpRequest:()=>R0.HttpRequest,getHttpHandlerExtensionConfiguration:()=>n6,isValidHostname:()=>I0,resolveHttpHandlerRuntimeConfig:()=>m6});M0.exports=a6(A0);var n6=y(($)=>{return{setHttpHandler(w){$.httpHandler=w},httpHandler(){return $.httpHandler},updateHttpClientConfig(w,z){$.httpHandler?.updateHttpClientConfig(w,z)},httpHandlerConfigs(){return $.httpHandler.httpHandlerConfigs()}}},"getHttpHandlerExtensionConfiguration"),m6=y(($)=>{return{httpHandler:$.httpHandler()}},"resolveHttpHandlerRuntimeConfig"),R0=u6(),s6=class{static{y(this,"Field")}constructor({name:$,kind:w=R0.FieldPosition.HEADER,values:z=[]}){this.name=$,this.kind=w,this.values=z}add($){this.values.push($)}set($){this.values=$}remove($){this.values=this.values.filter((w)=>w!==$)}toString(){return this.values.map(($)=>$.includes(",")||$.includes(" ")?`"${$}"`:$).join(", ")}get(){return this.values}},r6=class{constructor({fields:$=[],encoding:w="utf-8"}){this.entries={},$.forEach(this.setField.bind(this)),this.encoding=w}static{y(this,"Fields")}setField($){this.entries[$.name.toLowerCase()]=$}getField($){return this.entries[$.toLowerCase()]}removeField($){delete this.entries[$.toLowerCase()]}getByType($){return Object.values(this.entries).filter((w)=>w.kind===$)}},t6=class ${static{y(this,"HttpRequest")}constructor(w){this.method=w.method||"GET",this.hostname=w.hostname||"localhost",this.port=w.port,this.query=w.query||{},this.headers=w.headers||{},this.body=w.body,this.protocol=w.protocol?w.protocol.slice(-1)!==":"?`${w.protocol}:`:w.protocol:"https:",this.path=w.path?w.path.charAt(0)!=="/"?`/${w.path}`:w.path:"/",this.username=w.username,this.password=w.password,this.fragment=w.fragment}static clone(w){let z=new $({...w,headers:{...w.headers}});if(z.query)z.query=N0(z.query);return z}static isInstance(w){if(!w)return!1;let z=w;return"method"in z&&"protocol"in z&&"hostname"in z&&"path"in z&&typeof z.query==="object"&&typeof z.headers==="object"}clone(){return $.clone(this)}};function N0($){return Object.keys($).reduce((w,z)=>{let L=$[z];return{...w,[z]:Array.isArray(L)?[...L]:L}},{})}y(N0,"cloneQuery");var o6=class{static{y(this,"HttpResponse")}constructor($){this.statusCode=$.statusCode,this.reason=$.reason,this.headers=$.headers||{},this.body=$.body}static isInstance($){if(!$)return!1;let w=$;return typeof w.statusCode==="number"&&typeof w.headers==="object"}};function I0($){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test($)}y(I0,"isValidHostname")});var x0=U((gw,S0)=>{var{defineProperty:d,getOwnPropertyDescriptor:e6,getOwnPropertyNames:$4}=Object,w4=Object.prototype.hasOwnProperty,w0=($,w)=>d($,"name",{value:w,configurable:!0}),z4=($,w)=>{for(var z in w)d($,z,{get:w[z],enumerable:!0})},Z4=($,w,z,L)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of $4(w))if(!w4.call($,Z)&&Z!==z)d($,Z,{get:()=>w[Z],enumerable:!(L=e6(w,Z))||L.enumerable})}return $},L4=($)=>Z4(d({},"__esModule",{value:!0}),$),O0={};z4(O0,{escapeUri:()=>b0,escapeUriPath:()=>K4});S0.exports=L4(O0);var b0=w0(($)=>encodeURIComponent($).replace(/[!'()*]/g,Y4),"escapeUri"),Y4=w0(($)=>`%${$.charCodeAt(0).toString(16).toUpperCase()}`,"hexEncode"),K4=w0(($)=>$.split("/").map(b0).join("/"),"escapeUriPath")});var Z0=U((uw,k0)=>{var{defineProperty:i,getOwnPropertyDescriptor:Q4,getOwnPropertyNames:X4}=Object,G4=Object.prototype.hasOwnProperty,B4=($,w)=>i($,"name",{value:w,configurable:!0}),F4=($,w)=>{for(var z in w)i($,z,{get:w[z],enumerable:!0})},U4=($,w,z,L)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of X4(w))if(!G4.call($,Z)&&Z!==z)i($,Z,{get:()=>w[Z],enumerable:!(L=Q4(w,Z))||L.enumerable})}return $},V4=($)=>U4(i({},"__esModule",{value:!0}),$),T0={};F4(T0,{buildQueryString:()=>y0});k0.exports=V4(T0);var z0=x0();function y0($){let w=[];for(let z of Object.keys($).sort()){let L=$[z];if(z=z0.escapeUri(z),Array.isArray(L))for(let Z=0,Q=L.length;Z<Q;Z++)w.push(`${z}=${z0.escapeUri(L[Z])}`);else{let Z=z;if(L||typeof L==="string")Z+=`=${z0.escapeUri(L)}`;w.push(Z)}}return w.join("&")}B4(y0,"buildQueryString")});var m0=U((lw,n0)=>{var{create:h4,defineProperty:q,getOwnPropertyDescriptor:W4,getOwnPropertyNames:J4,getPrototypeOf:j4}=Object,D4=Object.prototype.hasOwnProperty,V=($,w)=>q($,"name",{value:w,configurable:!0}),v4=($,w)=>{for(var z in w)q($,z,{get:w[z],enumerable:!0})},q0=($,w,z,L)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of J4(w))if(!D4.call($,Z)&&Z!==z)q($,Z,{get:()=>w[Z],enumerable:!(L=W4(w,Z))||L.enumerable})}return $},C4=($,w,z)=>(z=$!=null?h4(j4($)):{},q0(w||!$||!$.__esModule?q(z,"default",{value:$,enumerable:!0}):z,$)),H4=($)=>q0(q({},"__esModule",{value:!0}),$),g0={};v4(g0,{DEFAULT_REQUEST_TIMEOUT:()=>_0,NodeHttp2Handler:()=>T4,NodeHttpHandler:()=>O4,streamCollector:()=>k4});n0.exports=H4(g0);var u0=l(),l0=Z0(),L0=N("http"),Y0=N("https"),A4=["ECONNRESET","EPIPE","ETIMEDOUT"],d0=V(($)=>{let w={};for(let z of Object.keys($)){let L=$[z];w[z]=Array.isArray(L)?L.join(","):L}return w},"getTransformedHeaders"),H={setTimeout:($,w)=>setTimeout($,w),clearTimeout:($)=>clearTimeout($)},f0=1000,R4=V(($,w,z=0)=>{if(!z)return-1;let L=V((Z)=>{let Q=H.setTimeout(()=>{$.destroy(),w(Object.assign(new Error(`Socket timed out without establishing a connection within ${z} ms`),{name:"TimeoutError"}))},z-Z),Y=V((K)=>{if(K?.connecting)K.on("connect",()=>{H.clearTimeout(Q)});else H.clearTimeout(Q)},"doWithSocket");if($.socket)Y($.socket);else $.on("socket",Y)},"registerTimeout");if(z<2000)return L(0),0;return H.setTimeout(L.bind(null,f0),f0)},"setConnectionTimeout"),N4=3000,I4=V(($,{keepAlive:w,keepAliveMsecs:z},L=N4)=>{if(w!==!0)return-1;let Z=V(()=>{if($.socket)$.socket.setKeepAlive(w,z||0);else $.on("socket",(Q)=>{Q.setKeepAlive(w,z||0)})},"registerListener");if(L===0)return Z(),0;return H.setTimeout(Z,L)},"setSocketKeepAlive"),E0=3000,M4=V(($,w,z=_0)=>{let L=V((Z)=>{let Q=z-Z,Y=V(()=>{$.destroy(),w(Object.assign(new Error(`Connection timed out after ${z} ms`),{name:"TimeoutError"}))},"onTimeout");if($.socket)$.socket.setTimeout(Q,Y),$.on("close",()=>$.socket?.removeListener("timeout",Y));else $.setTimeout(Q,Y)},"registerTimeout");if(0<z&&z<6000)return L(0),0;return H.setTimeout(L.bind(null,z===0?0:E0),E0)},"setSocketTimeout"),i0=N("stream"),P0=6000;async function K0($,w,z=P0){let L=w.headers??{},Z=L.Expect||L.expect,Q=-1,Y=!0;if(Z==="100-continue")Y=await Promise.race([new Promise((K)=>{Q=Number(H.setTimeout(()=>K(!0),Math.max(P0,z)))}),new Promise((K)=>{$.on("continue",()=>{H.clearTimeout(Q),K(!0)}),$.on("response",()=>{H.clearTimeout(Q),K(!1)}),$.on("error",()=>{H.clearTimeout(Q),K(!1)})})]);if(Y)p0($,w.body)}V(K0,"writeRequestBody");function p0($,w){if(w instanceof i0.Readable){w.pipe($);return}if(w){if(Buffer.isBuffer(w)||typeof w==="string"){$.end(w);return}let z=w;if(typeof z==="object"&&z.buffer&&typeof z.byteOffset==="number"&&typeof z.byteLength==="number"){$.end(Buffer.from(z.buffer,z.byteOffset,z.byteLength));return}$.end(Buffer.from(w));return}$.end()}V(p0,"writeBody");var _0=0,O4=class ${constructor(w){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((z,L)=>{if(typeof w==="function")w().then((Z)=>{z(this.resolveDefaultConfig(Z))}).catch(L);else z(this.resolveDefaultConfig(w))})}static{V(this,"NodeHttpHandler")}static create(w){if(typeof w?.handle==="function")return w;return new $(w)}static checkSocketUsage(w,z,L=console){let{sockets:Z,requests:Q,maxSockets:Y}=w;if(typeof Y!=="number"||Y===1/0)return z;let K=15000;if(Date.now()-K<z)return z;if(Z&&Q)for(let X in Z){let G=Z[X]?.length??0,F=Q[X]?.length??0;if(G>=Y&&F>=2*Y)return L?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${G} and ${F} additional requests are enqueued.
2
- See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
3
- or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return z}resolveDefaultConfig(w){let{requestTimeout:z,connectionTimeout:L,socketTimeout:Z,socketAcquisitionWarningTimeout:Q,httpAgent:Y,httpsAgent:K}=w||{},X=!0,G=50;return{connectionTimeout:L,requestTimeout:z??Z,socketAcquisitionWarningTimeout:Q,httpAgent:(()=>{if(Y instanceof L0.Agent||typeof Y?.destroy==="function")return Y;return new L0.Agent({keepAlive:!0,maxSockets:50,...Y})})(),httpsAgent:(()=>{if(K instanceof Y0.Agent||typeof K?.destroy==="function")return K;return new Y0.Agent({keepAlive:!0,maxSockets:50,...K})})(),logger:console}}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(w,{abortSignal:z}={}){if(!this.config)this.config=await this.configProvider;return new Promise((L,Z)=>{let Q=void 0,Y=[],K=V(async(B)=>{await Q,Y.forEach(H.clearTimeout),L(B)},"resolve"),X=V(async(B)=>{await Q,Y.forEach(H.clearTimeout),Z(B)},"reject");if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(z?.aborted){let B=new Error("Request aborted");B.name="AbortError",X(B);return}let G=w.protocol==="https:",F=G?this.config.httpsAgent:this.config.httpAgent;Y.push(H.setTimeout(()=>{this.socketWarningTimestamp=$.checkSocketUsage(F,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000)));let v=l0.buildQueryString(w.query||{}),D=void 0;if(w.username!=null||w.password!=null){let B=w.username??"",W=w.password??"";D=`${B}:${W}`}let j=w.path;if(v)j+=`?${v}`;if(w.fragment)j+=`#${w.fragment}`;let C=w.hostname??"";if(C[0]==="["&&C.endsWith("]"))C=w.hostname.slice(1,-1);else C=w.hostname;let x={headers:w.headers,host:C,method:w.method,path:j,port:w.port,agent:F,auth:D},h=(G?Y0.request:L0.request)(x,(B)=>{let W=new u0.HttpResponse({statusCode:B.statusCode||-1,reason:B.statusMessage,headers:d0(B.headers),body:B});K({response:W})});if(h.on("error",(B)=>{if(A4.includes(B.code))X(Object.assign(B,{name:"TimeoutError"}));else X(B)}),z){let B=V(()=>{h.destroy();let W=new Error("Request aborted");W.name="AbortError",X(W)},"onAbort");if(typeof z.addEventListener==="function"){let W=z;W.addEventListener("abort",B,{once:!0}),h.once("close",()=>W.removeEventListener("abort",B))}else z.onabort=B}Y.push(R4(h,X,this.config.connectionTimeout)),Y.push(M4(h,X,this.config.requestTimeout));let A=x.agent;if(typeof A==="object"&&"keepAlive"in A)Y.push(I4(h,{keepAlive:A.keepAlive,keepAliveMsecs:A.keepAliveMsecs}));Q=K0(h,w,this.config.requestTimeout).catch((B)=>{return Y.forEach(H.clearTimeout),Z(B)})})}updateHttpClientConfig(w,z){this.config=void 0,this.configProvider=this.configProvider.then((L)=>{return{...L,[w]:z}})}httpHandlerConfigs(){return this.config??{}}},c0=N("http2"),b4=C4(N("http2")),S4=class{constructor($){this.sessions=[],this.sessions=$??[]}static{V(this,"NodeHttp2ConnectionPool")}poll(){if(this.sessions.length>0)return this.sessions.shift()}offerLast($){this.sessions.push($)}contains($){return this.sessions.includes($)}remove($){this.sessions=this.sessions.filter((w)=>w!==$)}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}destroy($){for(let w of this.sessions)if(w===$){if(!w.destroyed)w.destroy()}}},x4=class{constructor($){if(this.sessionCache=new Map,this.config=$,this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrency must be greater than zero.")}static{V(this,"NodeHttp2ConnectionManager")}lease($,w){let z=this.getUrlString($),L=this.sessionCache.get(z);if(L){let K=L.poll();if(K&&!this.config.disableConcurrency)return K}let Z=b4.default.connect(z);if(this.config.maxConcurrency)Z.settings({maxConcurrentStreams:this.config.maxConcurrency},(K)=>{if(K)throw new Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+$.destination.toString())});Z.unref();let Q=V(()=>{Z.destroy(),this.deleteSession(z,Z)},"destroySessionCb");if(Z.on("goaway",Q),Z.on("error",Q),Z.on("frameError",Q),Z.on("close",()=>this.deleteSession(z,Z)),w.requestTimeout)Z.setTimeout(w.requestTimeout,Q);let Y=this.sessionCache.get(z)||new S4;return Y.offerLast(Z),this.sessionCache.set(z,Y),Z}deleteSession($,w){let z=this.sessionCache.get($);if(!z)return;if(!z.contains(w))return;z.remove(w),this.sessionCache.set($,z)}release($,w){let z=this.getUrlString($);this.sessionCache.get(z)?.offerLast(w)}destroy(){for(let[$,w]of this.sessionCache){for(let z of w){if(!z.destroyed)z.destroy();w.remove(z)}this.sessionCache.delete($)}}setMaxConcurrentStreams($){if($&&$<=0)throw new RangeError("maxConcurrentStreams must be greater than zero.");this.config.maxConcurrency=$}setDisableConcurrentStreams($){this.config.disableConcurrency=$}getUrlString($){return $.destination.toString()}},T4=class ${constructor(w){this.metadata={handlerProtocol:"h2"},this.connectionManager=new x4({}),this.configProvider=new Promise((z,L)=>{if(typeof w==="function")w().then((Z)=>{z(Z||{})}).catch(L);else z(w||{})})}static{V(this,"NodeHttp2Handler")}static create(w){if(typeof w?.handle==="function")return w;return new $(w)}destroy(){this.connectionManager.destroy()}async handle(w,{abortSignal:z}={}){if(!this.config){if(this.config=await this.configProvider,this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams||!1),this.config.maxConcurrentStreams)this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams)}let{requestTimeout:L,disableConcurrentStreams:Z}=this.config;return new Promise((Q,Y)=>{let K=!1,X=void 0,G=V(async(J)=>{await X,Q(J)},"resolve"),F=V(async(J)=>{await X,Y(J)},"reject");if(z?.aborted){K=!0;let J=new Error("Request aborted");J.name="AbortError",F(J);return}let{hostname:v,method:D,port:j,protocol:C,query:x}=w,T="";if(w.username!=null||w.password!=null){let J=w.username??"",I=w.password??"";T=`${J}:${I}@`}let h=`${C}//${T}${v}${j?`:${j}`:""}`,A={destination:new URL(h)},B=this.connectionManager.lease(A,{requestTimeout:this.config?.sessionTimeout,disableConcurrentStreams:Z||!1}),W=V((J)=>{if(Z)this.destroySession(B);K=!0,F(J)},"rejectWithDestroy"),E=l0.buildQueryString(x||{}),$0=w.path;if(E)$0+=`?${E}`;if(w.fragment)$0+=`#${w.fragment}`;let R=B.request({...w.headers,[c0.constants.HTTP2_HEADER_PATH]:$0,[c0.constants.HTTP2_HEADER_METHOD]:D});if(B.ref(),R.on("response",(J)=>{let I=new u0.HttpResponse({statusCode:J[":status"]||-1,headers:d0(J),body:R});if(K=!0,G({response:I}),Z)B.close(),this.connectionManager.deleteSession(h,B)}),L)R.setTimeout(L,()=>{R.close();let J=new Error(`Stream timed out because of no activity for ${L} ms`);J.name="TimeoutError",W(J)});if(z){let J=V(()=>{R.close();let I=new Error("Request aborted");I.name="AbortError",W(I)},"onAbort");if(typeof z.addEventListener==="function"){let I=z;I.addEventListener("abort",J,{once:!0}),R.once("close",()=>I.removeEventListener("abort",J))}else z.onabort=J}R.on("frameError",(J,I,g6)=>{W(new Error(`Frame type id ${J} in stream id ${g6} has failed with code ${I}.`))}),R.on("error",W),R.on("aborted",()=>{W(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${R.rstCode}.`))}),R.on("close",()=>{if(B.unref(),Z)B.destroy();if(!K)W(new Error("Unexpected error: http2 request did not get a response"))}),X=K0(R,w,L)})}updateHttpClientConfig(w,z){this.config=void 0,this.configProvider=this.configProvider.then((L)=>{return{...L,[w]:z}})}httpHandlerConfigs(){return this.config??{}}destroySession(w){if(!w.destroyed)w.destroy()}},y4=class extends i0.Writable{constructor(){super(...arguments);this.bufferedBytes=[]}static{V(this,"Collector")}_write($,w,z){this.bufferedBytes.push($),z()}},k4=V(($)=>{if(f4($))return a0($);return new Promise((w,z)=>{let L=new y4;$.pipe(L),$.on("error",(Z)=>{L.end(),z(Z)}),L.on("error",z),L.on("finish",function(){let Z=new Uint8Array(Buffer.concat(this.bufferedBytes));w(Z)})})},"streamCollector"),f4=V(($)=>typeof ReadableStream==="function"&&$ instanceof ReadableStream,"isReadableStreamInstance");async function a0($){let w=[],z=$.getReader(),L=!1,Z=0;while(!L){let{done:K,value:X}=await z.read();if(X)w.push(X),Z+=X.length;L=K}let Q=new Uint8Array(Z),Y=0;for(let K of w)Q.set(K,Y),Y+=K.length;return Q}V(a0,"collectReadableStream")});var t0=U((_w,r0)=>{var{defineProperty:p,getOwnPropertyDescriptor:E4,getOwnPropertyNames:P4}=Object,c4=Object.prototype.hasOwnProperty,q4=($,w)=>p($,"name",{value:w,configurable:!0}),g4=($,w)=>{for(var z in w)p($,z,{get:w[z],enumerable:!0})},u4=($,w,z,L)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of P4(w))if(!c4.call($,Z)&&Z!==z)p($,Z,{get:()=>w[Z],enumerable:!(L=E4(w,Z))||L.enumerable})}return $},l4=($)=>u4(p({},"__esModule",{value:!0}),$),s0={};g4(s0,{isArrayBuffer:()=>d4});r0.exports=l4(s0);var d4=q4(($)=>typeof ArrayBuffer==="function"&&$ instanceof ArrayBuffer||Object.prototype.toString.call($)==="[object ArrayBuffer]","isArrayBuffer")});var g=U((aw,$1)=>{var{defineProperty:_,getOwnPropertyDescriptor:i4,getOwnPropertyNames:p4}=Object,_4=Object.prototype.hasOwnProperty,o0=($,w)=>_($,"name",{value:w,configurable:!0}),a4=($,w)=>{for(var z in w)_($,z,{get:w[z],enumerable:!0})},n4=($,w,z,L)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of p4(w))if(!_4.call($,Z)&&Z!==z)_($,Z,{get:()=>w[Z],enumerable:!(L=i4(w,Z))||L.enumerable})}return $},m4=($)=>n4(_({},"__esModule",{value:!0}),$),e0={};a4(e0,{fromArrayBuffer:()=>r4,fromString:()=>t4});$1.exports=m4(e0);var s4=t0(),Q0=N("buffer"),r4=o0(($,w=0,z=$.byteLength-w)=>{if(!s4.isArrayBuffer($))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof $} (${$})`);return Q0.Buffer.from($,w,z)},"fromArrayBuffer"),t4=o0(($,w)=>{if(typeof $!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof $} (${$})`);return w?Q0.Buffer.from($,w):Q0.Buffer.from($)},"fromString")});var Z1=U((w1)=>{Object.defineProperty(w1,"__esModule",{value:!0});w1.fromBase64=void 0;var o4=g(),e4=/^[A-Za-z0-9+/]*={0,2}$/,$$=($)=>{if($.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!e4.exec($))throw new TypeError("Invalid base64 string.");let w=o4.fromString($,"base64");return new Uint8Array(w.buffer,w.byteOffset,w.byteLength)};w1.fromBase64=$$});var n=U((mw,Q1)=>{var{defineProperty:a,getOwnPropertyDescriptor:w$,getOwnPropertyNames:z$}=Object,Z$=Object.prototype.hasOwnProperty,X0=($,w)=>a($,"name",{value:w,configurable:!0}),L$=($,w)=>{for(var z in w)a($,z,{get:w[z],enumerable:!0})},Y$=($,w,z,L)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of z$(w))if(!Z$.call($,Z)&&Z!==z)a($,Z,{get:()=>w[Z],enumerable:!(L=w$(w,Z))||L.enumerable})}return $},K$=($)=>Y$(a({},"__esModule",{value:!0}),$),L1={};L$(L1,{fromUtf8:()=>K1,toUint8Array:()=>Q$,toUtf8:()=>X$});Q1.exports=K$(L1);var Y1=g(),K1=X0(($)=>{let w=Y1.fromString($,"utf8");return new Uint8Array(w.buffer,w.byteOffset,w.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),Q$=X0(($)=>{if(typeof $==="string")return K1($);if(ArrayBuffer.isView($))return new Uint8Array($.buffer,$.byteOffset,$.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array($)},"toUint8Array"),X$=X0(($)=>{if(typeof $==="string")return $;if(typeof $!=="object"||typeof $.byteOffset!=="number"||typeof $.byteLength!=="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return Y1.fromArrayBuffer($.buffer,$.byteOffset,$.byteLength).toString("utf8")},"toUtf8")});var B1=U((X1)=>{Object.defineProperty(X1,"__esModule",{value:!0});X1.toBase64=void 0;var G$=g(),B$=n(),F$=($)=>{let w;if(typeof $==="string")w=B$.fromUtf8($);else w=$;if(typeof w!=="object"||typeof w.byteOffset!=="number"||typeof w.byteLength!=="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return G$.fromArrayBuffer(w.buffer,w.byteOffset,w.byteLength).toString("base64")};X1.toBase64=F$});var P=U((rw,m)=>{var{defineProperty:F1,getOwnPropertyDescriptor:U$,getOwnPropertyNames:V$}=Object,h$=Object.prototype.hasOwnProperty,G0=($,w,z,L)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of V$(w))if(!h$.call($,Z)&&Z!==z)F1($,Z,{get:()=>w[Z],enumerable:!(L=U$(w,Z))||L.enumerable})}return $},U1=($,w,z)=>(G0($,w,"default"),z&&G0(z,w,"default")),W$=($)=>G0(F1({},"__esModule",{value:!0}),$),B0={};m.exports=W$(B0);U1(B0,Z1(),m.exports);U1(B0,B1(),m.exports)});var F0=U((h1)=>{Object.defineProperty(h1,"__esModule",{value:!0});h1.ChecksumStream=void 0;var J$=P(),j$=N("stream");class V1 extends j$.Duplex{constructor({expectedChecksum:$,checksum:w,source:z,checksumSourceLocation:L,base64Encoder:Z}){var Q,Y;super();if(typeof z.pipe==="function")this.source=z;else throw new Error(`@smithy/util-stream: unsupported source type ${(Y=(Q=z===null||z===void 0?void 0:z.constructor)===null||Q===void 0?void 0:Q.name)!==null&&Y!==void 0?Y:z} in ChecksumStream.`);this.base64Encoder=Z!==null&&Z!==void 0?Z:J$.toBase64,this.expectedChecksum=$,this.checksum=w,this.checksumSourceLocation=L,this.source.pipe(this)}_read($){}_write($,w,z){try{this.checksum.update($),this.push($)}catch(L){return z(L)}return z()}async _final($){try{let w=await this.checksum.digest(),z=this.base64Encoder(w);if(this.expectedChecksum!==z)return $(new Error(`Checksum mismatch: expected "${this.expectedChecksum}" but received "${z}" in response header "${this.checksumSourceLocation}".`))}catch(w){return $(w)}return this.push(null),$()}}h1.ChecksumStream=V1});var k=U((J1)=>{Object.defineProperty(J1,"__esModule",{value:!0});J1.isBlob=J1.isReadableStream=void 0;var D$=($)=>{var w;return typeof ReadableStream==="function"&&(((w=$===null||$===void 0?void 0:$.constructor)===null||w===void 0?void 0:w.name)===ReadableStream.name||$ instanceof ReadableStream)};J1.isReadableStream=D$;var v$=($)=>{var w;return typeof Blob==="function"&&(((w=$===null||$===void 0?void 0:$.constructor)===null||w===void 0?void 0:w.name)===Blob.name||$ instanceof Blob)};J1.isBlob=v$});var H1=U((v1)=>{Object.defineProperty(v1,"__esModule",{value:!0});v1.ChecksumStream=void 0;var H$=typeof ReadableStream==="function"?ReadableStream:function(){};class D1 extends H${}v1.ChecksumStream=D1});var N1=U((A1)=>{Object.defineProperty(A1,"__esModule",{value:!0});A1.createChecksumStream=void 0;var A$=P(),R$=k(),N$=H1(),I$=({expectedChecksum:$,checksum:w,source:z,checksumSourceLocation:L,base64Encoder:Z})=>{var Q,Y;if(!R$.isReadableStream(z))throw new Error(`@smithy/util-stream: unsupported source type ${(Y=(Q=z===null||z===void 0?void 0:z.constructor)===null||Q===void 0?void 0:Q.name)!==null&&Y!==void 0?Y:z} in ChecksumStream.`);let K=Z!==null&&Z!==void 0?Z:A$.toBase64;if(typeof TransformStream!=="function")throw new Error("@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream.");let X=new TransformStream({start(){},async transform(F,v){w.update(F),v.enqueue(F)},async flush(F){let v=await w.digest(),D=K(v);if($!==D){let j=new Error(`Checksum mismatch: expected "${$}" but received "${D}" in response header "${L}".`);F.error(j)}else F.terminate()}});z.pipeThrough(X);let G=X.readable;return Object.setPrototypeOf(G,N$.ChecksumStream.prototype),G};A1.createChecksumStream=I$});var O1=U((I1)=>{Object.defineProperty(I1,"__esModule",{value:!0});I1.createChecksumStream=void 0;var M$=k(),O$=F0(),b$=N1();function S$($){if(typeof ReadableStream==="function"&&M$.isReadableStream($.source))return b$.createChecksumStream($);return new O$.ChecksumStream($)}I1.createChecksumStream=S$});var U0=U((S1)=>{Object.defineProperty(S1,"__esModule",{value:!0});S1.ByteArrayCollector=void 0;class b1{constructor($){this.allocByteArray=$,this.byteLength=0,this.byteArrays=[]}push($){this.byteArrays.push($),this.byteLength+=$.byteLength}flush(){if(this.byteArrays.length===1){let z=this.byteArrays[0];return this.reset(),z}let $=this.allocByteArray(this.byteLength),w=0;for(let z=0;z<this.byteArrays.length;++z){let L=this.byteArrays[z];$.set(L,w),w+=L.byteLength}return this.reset(),$}reset(){this.byteArrays=[],this.byteLength=0}}S1.ByteArrayCollector=b1});var P1=U((f1)=>{Object.defineProperty(f1,"__esModule",{value:!0});f1.modeOf=f1.sizeOf=f1.flush=f1.merge=f1.createBufferedReadable=f1.createBufferedReadableStream=void 0;var x$=U0();function T1($,w,z){let L=$.getReader(),Z=!1,Q=0,Y=["",new x$.ByteArrayCollector((G)=>new Uint8Array(G))],K=-1,X=async(G)=>{let{value:F,done:v}=await L.read(),D=F;if(v){if(K!==-1){let j=s(Y,K);if(c(j)>0)G.enqueue(j)}G.close()}else{let j=k1(D,!1);if(K!==j){if(K>=0)G.enqueue(s(Y,K));K=j}if(K===-1){G.enqueue(D);return}let C=c(D);Q+=C;let x=c(Y[K]);if(C>=w&&x===0)G.enqueue(D);else{let T=y1(Y,K,D);if(!Z&&Q>w*2)Z=!0,z===null||z===void 0||z.warn(`@smithy/util-stream - stream chunk size ${C} is below threshold of ${w}, automatically buffering.`);if(T>=w)G.enqueue(s(Y,K));else await X(G)}}};return new ReadableStream({pull:X})}f1.createBufferedReadableStream=T1;f1.createBufferedReadable=T1;function y1($,w,z){switch(w){case 0:return $[0]+=z,c($[0]);case 1:case 2:return $[w].push(z),c($[w])}}f1.merge=y1;function s($,w){switch(w){case 0:let z=$[0];return $[0]="",z;case 1:case 2:return $[w].flush()}throw new Error(`@smithy/util-stream - invalid index ${w} given to flush()`)}f1.flush=s;function c($){var w,z;return(z=(w=$===null||$===void 0?void 0:$.byteLength)!==null&&w!==void 0?w:$===null||$===void 0?void 0:$.length)!==null&&z!==void 0?z:0}f1.sizeOf=c;function k1($,w=!0){if(w&&typeof Buffer!=="undefined"&&$ instanceof Buffer)return 2;if($ instanceof Uint8Array)return 1;if(typeof $==="string")return 0;return-1}f1.modeOf=k1});var u1=U((q1)=>{Object.defineProperty(q1,"__esModule",{value:!0});q1.createBufferedReadable=void 0;var P$=N("stream"),c1=U0(),S=P1(),c$=k();function q$($,w,z){if(c$.isReadableStream($))return S.createBufferedReadableStream($,w,z);let L=new P$.Readable({read(){}}),Z=!1,Q=0,Y=["",new c1.ByteArrayCollector((X)=>new Uint8Array(X)),new c1.ByteArrayCollector((X)=>Buffer.from(new Uint8Array(X)))],K=-1;return $.on("data",(X)=>{let G=S.modeOf(X,!0);if(K!==G){if(K>=0)L.push(S.flush(Y,K));K=G}if(K===-1){L.push(X);return}let F=S.sizeOf(X);Q+=F;let v=S.sizeOf(Y[K]);if(F>=w&&v===0)L.push(X);else{let D=S.merge(Y,K,X);if(!Z&&Q>w*2)Z=!0,z===null||z===void 0||z.warn(`@smithy/util-stream - stream chunk size ${F} is below threshold of ${w}, automatically buffering.`);if(D>=w)L.push(S.flush(Y,K))}}),$.on("end",()=>{if(K!==-1){let X=S.flush(Y,K);if(S.sizeOf(X)>0)L.push(X)}L.push(null)}),L}q1.createBufferedReadable=q$});var i1=U((l1)=>{Object.defineProperty(l1,"__esModule",{value:!0});l1.getAwsChunkedEncodingStream=void 0;var g$=N("stream"),u$=($,w)=>{let{base64Encoder:z,bodyLengthChecker:L,checksumAlgorithmFn:Z,checksumLocationName:Q,streamHasher:Y}=w,K=z!==void 0&&Z!==void 0&&Q!==void 0&&Y!==void 0,X=K?Y(Z,$):void 0,G=new g$.Readable({read:()=>{}});return $.on("data",(F)=>{let v=L(F)||0;G.push(`${v.toString(16)}\r
4
- `),G.push(F),G.push(`\r
5
- `)}),$.on("end",async()=>{if(G.push(`0\r
6
- `),K){let F=z(await X);G.push(`${Q}:${F}\r
7
- `),G.push(`\r
8
- `)}G.push(null)}),G};l1.getAwsChunkedEncodingStream=u$});var a1=U((p1)=>{Object.defineProperty(p1,"__esModule",{value:!0});p1.headStream=void 0;async function l$($,w){var z;let L=0,Z=[],Q=$.getReader(),Y=!1;while(!Y){let{done:G,value:F}=await Q.read();if(F)Z.push(F),L+=(z=F===null||F===void 0?void 0:F.byteLength)!==null&&z!==void 0?z:0;if(L>=w)break;Y=G}Q.releaseLock();let K=new Uint8Array(Math.min(w,L)),X=0;for(let G of Z){if(G.byteLength>K.byteLength-X){K.set(G.subarray(0,K.byteLength-X),X);break}else K.set(G,X);X+=G.length}return K}p1.headStream=l$});var r1=U((m1)=>{Object.defineProperty(m1,"__esModule",{value:!0});m1.headStream=void 0;var d$=N("stream"),i$=a1(),p$=k(),_$=($,w)=>{if(p$.isReadableStream($))return i$.headStream($,w);return new Promise((z,L)=>{let Z=new n1;Z.limit=w,$.pipe(Z),$.on("error",(Q)=>{Z.end(),L(Q)}),Z.on("error",L),Z.on("finish",function(){let Q=new Uint8Array(Buffer.concat(this.buffers));z(Q)})})};m1.headStream=_$;class n1 extends d$.Writable{constructor(){super(...arguments);this.buffers=[],this.limit=1/0,this.bytesBuffered=0}_write($,w,z){var L;if(this.buffers.push($),this.bytesBuffered+=(L=$.byteLength)!==null&&L!==void 0?L:0,this.bytesBuffered>=this.limit){let Z=this.bytesBuffered-this.limit,Q=this.buffers[this.buffers.length-1];this.buffers[this.buffers.length-1]=Q.subarray(0,Q.byteLength-Z),this.emit("finish")}z()}}});var L6=U((X8,Z6)=>{var{defineProperty:t,getOwnPropertyDescriptor:a$,getOwnPropertyNames:n$}=Object,m$=Object.prototype.hasOwnProperty,M=($,w)=>t($,"name",{value:w,configurable:!0}),s$=($,w)=>{for(var z in w)t($,z,{get:w[z],enumerable:!0})},r$=($,w,z,L)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of n$(w))if(!m$.call($,Z)&&Z!==z)t($,Z,{get:()=>w[Z],enumerable:!(L=a$(w,Z))||L.enumerable})}return $},t$=($)=>r$(t({},"__esModule",{value:!0}),$),o1={};s$(o1,{FetchHttpHandler:()=>e$,keepAliveSupport:()=>r,streamCollector:()=>ww});Z6.exports=t$(o1);var t1=l(),o$=Z0();function V0($,w){return new Request($,w)}M(V0,"createRequest");function e1($=0){return new Promise((w,z)=>{if($)setTimeout(()=>{let L=new Error(`Request did not complete within ${$} ms`);L.name="TimeoutError",z(L)},$)})}M(e1,"requestTimeout");var r={supported:void 0},e$=class ${static{M(this,"FetchHttpHandler")}static create(w){if(typeof w?.handle==="function")return w;return new $(w)}constructor(w){if(typeof w==="function")this.configProvider=w().then((z)=>z||{});else this.config=w??{},this.configProvider=Promise.resolve(this.config);if(r.supported===void 0)r.supported=Boolean(typeof Request!=="undefined"&&"keepalive"in V0("https://[::1]"))}destroy(){}async handle(w,{abortSignal:z}={}){if(!this.config)this.config=await this.configProvider;let L=this.config.requestTimeout,Z=this.config.keepAlive===!0,Q=this.config.credentials;if(z?.aborted){let h=new Error("Request aborted");return h.name="AbortError",Promise.reject(h)}let Y=w.path,K=o$.buildQueryString(w.query||{});if(K)Y+=`?${K}`;if(w.fragment)Y+=`#${w.fragment}`;let X="";if(w.username!=null||w.password!=null){let h=w.username??"",A=w.password??"";X=`${h}:${A}@`}let{port:G,method:F}=w,v=`${w.protocol}//${X}${w.hostname}${G?`:${G}`:""}${Y}`,D=F==="GET"||F==="HEAD"?void 0:w.body,j={body:D,headers:new Headers(w.headers),method:F,credentials:Q};if(this.config?.cache)j.cache=this.config.cache;if(D)j.duplex="half";if(typeof AbortController!=="undefined")j.signal=z;if(r.supported)j.keepalive=Z;if(typeof this.config.requestInit==="function")Object.assign(j,this.config.requestInit(w));let C=M(()=>{},"removeSignalEventListener"),x=V0(v,j),T=[fetch(x).then((h)=>{let A=h.headers,B={};for(let E of A.entries())B[E[0]]=E[1];if(h.body==null)return h.blob().then((E)=>({response:new t1.HttpResponse({headers:B,reason:h.statusText,statusCode:h.status,body:E})}));return{response:new t1.HttpResponse({headers:B,reason:h.statusText,statusCode:h.status,body:h.body})}}),e1(L)];if(z)T.push(new Promise((h,A)=>{let B=M(()=>{let W=new Error("Request aborted");W.name="AbortError",A(W)},"onAbort");if(typeof z.addEventListener==="function"){let W=z;W.addEventListener("abort",B,{once:!0}),C=M(()=>W.removeEventListener("abort",B),"removeSignalEventListener")}else z.onabort=B}));return Promise.race(T).finally(C)}updateHttpClientConfig(w,z){this.config=void 0,this.configProvider=this.configProvider.then((L)=>{return L[w]=z,L})}httpHandlerConfigs(){return this.config??{}}},$w=P(),ww=M(async($)=>{if(typeof Blob==="function"&&$ instanceof Blob||$.constructor?.name==="Blob"){if(Blob.prototype.arrayBuffer!==void 0)return new Uint8Array(await $.arrayBuffer());return $6($)}return w6($)},"streamCollector");async function $6($){let w=await z6($),z=$w.fromBase64(w);return new Uint8Array(z)}M($6,"collectBlob");async function w6($){let w=[],z=$.getReader(),L=!1,Z=0;while(!L){let{done:K,value:X}=await z.read();if(X)w.push(X),Z+=X.length;L=K}let Q=new Uint8Array(Z),Y=0;for(let K of w)Q.set(K,Y),Y+=K.length;return Q}M(w6,"collectStream");function z6($){return new Promise((w,z)=>{let L=new FileReader;L.onloadend=()=>{if(L.readyState!==2)return z(new Error("Reader aborted too early"));let Z=L.result??"",Q=Z.indexOf(","),Y=Q>-1?Q+1:Z.length;w(Z.substring(Y))},L.onabort=()=>z(new Error("Read aborted")),L.onerror=()=>z(L.error),L.readAsDataURL($)})}M(z6,"readToBase64")});var F6=U((G8,B6)=>{var{defineProperty:o,getOwnPropertyDescriptor:zw,getOwnPropertyNames:Zw}=Object,Lw=Object.prototype.hasOwnProperty,Y6=($,w)=>o($,"name",{value:w,configurable:!0}),Yw=($,w)=>{for(var z in w)o($,z,{get:w[z],enumerable:!0})},Kw=($,w,z,L)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of Zw(w))if(!Lw.call($,Z)&&Z!==z)o($,Z,{get:()=>w[Z],enumerable:!(L=zw(w,Z))||L.enumerable})}return $},Qw=($)=>Kw(o({},"__esModule",{value:!0}),$),K6={};Yw(K6,{fromHex:()=>X6,toHex:()=>G6});B6.exports=Qw(K6);var Q6={},h0={};for(let $=0;$<256;$++){let w=$.toString(16).toLowerCase();if(w.length===1)w=`0${w}`;Q6[$]=w,h0[w]=$}function X6($){if($.length%2!==0)throw new Error("Hex encoded strings must have an even number length");let w=new Uint8Array($.length/2);for(let z=0;z<$.length;z+=2){let L=$.slice(z,z+2).toLowerCase();if(L in h0)w[z/2]=h0[L];else throw new Error(`Cannot decode unrecognized sequence ${L} as hexadecimal`)}return w}Y6(X6,"fromHex");function G6($){let w="";for(let z=0;z<$.byteLength;z++)w+=Q6[$[z]];return w}Y6(G6,"toHex")});var j6=U((W6)=>{Object.defineProperty(W6,"__esModule",{value:!0});W6.sdkStreamMixin=void 0;var Xw=L6(),Gw=P(),Bw=F6(),Fw=n(),U6=k(),V6="The stream has already been transformed.",Uw=($)=>{var w,z;if(!h6($)&&!U6.isReadableStream($)){let Y=((z=(w=$===null||$===void 0?void 0:$.__proto__)===null||w===void 0?void 0:w.constructor)===null||z===void 0?void 0:z.name)||$;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${Y}`)}let L=!1,Z=async()=>{if(L)throw new Error(V6);return L=!0,await Xw.streamCollector($)},Q=(Y)=>{if(typeof Y.stream!=="function")throw new Error(`Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.
9
- If you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body`);return Y.stream()};return Object.assign($,{transformToByteArray:Z,transformToString:async(Y)=>{let K=await Z();if(Y==="base64")return Gw.toBase64(K);else if(Y==="hex")return Bw.toHex(K);else if(Y===void 0||Y==="utf8"||Y==="utf-8")return Fw.toUtf8(K);else if(typeof TextDecoder==="function")return new TextDecoder(Y).decode(K);else throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(L)throw new Error(V6);if(L=!0,h6($))return Q($);else if(U6.isReadableStream($))return $;else throw new Error(`Cannot transform payload to web stream, got ${$}`)}})};W6.sdkStreamMixin=Uw;var h6=($)=>typeof Blob==="function"&&$ instanceof Blob});var H6=U((v6)=>{Object.defineProperty(v6,"__esModule",{value:!0});v6.sdkStreamMixin=void 0;var Vw=m0(),hw=g(),W0=N("stream"),Ww=j6(),D6="The stream has already been transformed.",Jw=($)=>{var w,z;if(!($ instanceof W0.Readable))try{return Ww.sdkStreamMixin($)}catch(Q){let Y=((z=(w=$===null||$===void 0?void 0:$.__proto__)===null||w===void 0?void 0:w.constructor)===null||z===void 0?void 0:z.name)||$;throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${Y}`)}let L=!1,Z=async()=>{if(L)throw new Error(D6);return L=!0,await Vw.streamCollector($)};return Object.assign($,{transformToByteArray:Z,transformToString:async(Q)=>{let Y=await Z();if(Q===void 0||Buffer.isEncoding(Q))return hw.fromArrayBuffer(Y.buffer,Y.byteOffset,Y.byteLength).toString(Q);else return new TextDecoder(Q).decode(Y)},transformToWebStream:()=>{if(L)throw new Error(D6);if($.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof W0.Readable.toWeb!=="function")throw new Error("Readable.toWeb() is not supported. Please ensure a polyfill is available.");return L=!0,W0.Readable.toWeb($)}})};v6.sdkStreamMixin=Jw});var N6=U((A6)=>{Object.defineProperty(A6,"__esModule",{value:!0});A6.splitStream=void 0;async function jw($){if(typeof $.stream==="function")$=$.stream();return $.tee()}A6.splitStream=jw});var S6=U((O6)=>{Object.defineProperty(O6,"__esModule",{value:!0});O6.splitStream=void 0;var I6=N("stream"),Dw=N6(),M6=k();async function vw($){if(M6.isReadableStream($)||M6.isBlob($))return Dw.splitStream($);let w=new I6.PassThrough,z=new I6.PassThrough;return $.pipe(w),$.pipe(z),[w,z]}O6.splitStream=vw});var f6=U((h8,b)=>{var{defineProperty:e,getOwnPropertyDescriptor:Cw,getOwnPropertyNames:Hw}=Object,Aw=Object.prototype.hasOwnProperty,D0=($,w)=>e($,"name",{value:w,configurable:!0}),Rw=($,w)=>{for(var z in w)e($,z,{get:w[z],enumerable:!0})},J0=($,w,z,L)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of Hw(w))if(!Aw.call($,Z)&&Z!==z)e($,Z,{get:()=>w[Z],enumerable:!(L=Cw(w,Z))||L.enumerable})}return $},f=($,w,z)=>(J0($,w,"default"),z&&J0(z,w,"default")),Nw=($)=>J0(e({},"__esModule",{value:!0}),$),O={};Rw(O,{Uint8ArrayBlobAdapter:()=>j0});b.exports=Nw(O);var x6=P(),T6=n();function y6($,w="utf-8"){if(w==="base64")return x6.toBase64($);return T6.toUtf8($)}D0(y6,"transformToString");function k6($,w){if(w==="base64")return j0.mutate(x6.fromBase64($));return j0.mutate(T6.fromUtf8($))}D0(k6,"transformFromString");var j0=class $ extends Uint8Array{static{D0(this,"Uint8ArrayBlobAdapter")}static fromString(w,z="utf-8"){switch(typeof w){case"string":return k6(w,z);default:throw new Error(`Unsupported conversion from ${typeof w} to Uint8ArrayBlobAdapter.`)}}static mutate(w){return Object.setPrototypeOf(w,$.prototype),w}transformToString(w="utf-8"){return y6(this,w)}};f(O,F0(),b.exports);f(O,O1(),b.exports);f(O,u1(),b.exports);f(O,i1(),b.exports);f(O,r1(),b.exports);f(O,H6(),b.exports);f(O,S6(),b.exports);f(O,k(),b.exports)});var fw=U((W8,q6)=>{var{defineProperty:H0,getOwnPropertyDescriptor:Iw,getOwnPropertyNames:Mw}=Object,Ow=Object.prototype.hasOwnProperty,bw=($,w)=>{for(var z in w)H0($,z,{get:w[z],enumerable:!0})},Sw=($,w,z,L)=>{if(w&&typeof w==="object"||typeof w==="function"){for(let Z of Mw(w))if(!Ow.call($,Z)&&Z!==z)H0($,Z,{get:()=>w[Z],enumerable:!(L=Iw(w,Z))||L.enumerable})}return $},xw=($)=>Sw(H0({},"__esModule",{value:!0}),$),E6={};bw(E6,{RequestBuilder:()=>c6,collectBody:()=>Tw,extendedEncodeURIComponent:()=>C0,requestBuilder:()=>kw,resolvedPath:()=>P6});q6.exports=xw(E6);var v0=f6(),Tw=async($=new Uint8Array,w)=>{if($ instanceof Uint8Array)return v0.Uint8ArrayBlobAdapter.mutate($);if(!$)return v0.Uint8ArrayBlobAdapter.mutate(new Uint8Array);let z=w.streamCollector($);return v0.Uint8ArrayBlobAdapter.mutate(await z)};function C0($){return encodeURIComponent($).replace(/[!'()*]/g,function(w){return"%"+w.charCodeAt(0).toString(16).toUpperCase()})}var yw=l(),P6=($,w,z,L,Z,Q)=>{if(w!=null&&w[z]!==void 0){let Y=L();if(Y.length<=0)throw new Error("Empty value provided for input HTTP label: "+z+".");$=$.replace(Z,Q?Y.split("/").map((K)=>C0(K)).join("/"):C0(Y))}else throw new Error("No value provided for input HTTP label: "+z+".");return $};function kw($,w){return new c6($,w)}var c6=class{constructor($,w){this.input=$,this.context=w,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){let{hostname:$,protocol:w="https",port:z,path:L}=await this.context.endpoint();this.path=L;for(let Z of this.resolvePathStack)Z(this.path);return new yw.HttpRequest({protocol:w,hostname:this.hostname||$,port:z,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn($){return this.hostname=$,this}bp($){return this.resolvePathStack.push((w)=>{this.path=`${w?.endsWith("/")?w.slice(0,-1):w||""}`+$}),this}p($,w,z,L){return this.resolvePathStack.push((Z)=>{this.path=P6(Z,this.input,$,w,z,L)}),this}h($){return this.headers=$,this}q($){return this.query=$,this}b($){return this.body=$,this}m($){return this.method=$,this}}});
10
- export{l as hc,t0 as ic,g as jc,n as kc,P as lc,x0 as mc,m0 as nc,F6 as oc,fw as pc};
11
-
12
- //# debugId=AB3BFCFC91807C9D64756E2164756E21
@@ -1,38 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../node_modules/@smithy/protocol-http/dist-cjs/index.js", "../../../node_modules/@smithy/util-uri-escape/dist-cjs/index.js", "../../../node_modules/@smithy/querystring-builder/dist-cjs/index.js", "../../../node_modules/@smithy/node-http-handler/dist-cjs/index.js", "../../../node_modules/@smithy/is-array-buffer/dist-cjs/index.js", "../../../node_modules/@smithy/util-buffer-from/dist-cjs/index.js", "../../../node_modules/@smithy/util-base64/dist-cjs/fromBase64.js", "../../../node_modules/@smithy/util-utf8/dist-cjs/index.js", "../../../node_modules/@smithy/util-base64/dist-cjs/toBase64.js", "../../../node_modules/@smithy/util-base64/dist-cjs/index.js", "../../../node_modules/@smithy/util-stream/dist-cjs/checksum/ChecksumStream.js", "../../../node_modules/@smithy/util-stream/dist-cjs/stream-type-check.js", "../../../node_modules/@smithy/util-stream/dist-cjs/checksum/ChecksumStream.browser.js", "../../../node_modules/@smithy/util-stream/dist-cjs/checksum/createChecksumStream.browser.js", "../../../node_modules/@smithy/util-stream/dist-cjs/checksum/createChecksumStream.js", "../../../node_modules/@smithy/util-stream/dist-cjs/ByteArrayCollector.js", "../../../node_modules/@smithy/util-stream/dist-cjs/createBufferedReadableStream.js", "../../../node_modules/@smithy/util-stream/dist-cjs/createBufferedReadable.js", "../../../node_modules/@smithy/util-stream/dist-cjs/getAwsChunkedEncodingStream.js", "../../../node_modules/@smithy/util-stream/dist-cjs/headStream.browser.js", "../../../node_modules/@smithy/util-stream/dist-cjs/headStream.js", "../../../node_modules/@smithy/fetch-http-handler/dist-cjs/index.js", "../../../node_modules/@smithy/util-hex-encoding/dist-cjs/index.js", "../../../node_modules/@smithy/util-stream/dist-cjs/sdk-stream-mixin.browser.js", "../../../node_modules/@smithy/util-stream/dist-cjs/sdk-stream-mixin.js", "../../../node_modules/@smithy/util-stream/dist-cjs/splitStream.browser.js", "../../../node_modules/@smithy/util-stream/dist-cjs/splitStream.js", "../../../node_modules/@smithy/util-stream/dist-cjs/index.js", "../../../node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js"],
4
- "sourcesContent": [
5
- "var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n Field: () => Field,\n Fields: () => Fields,\n HttpRequest: () => HttpRequest,\n HttpResponse: () => HttpResponse,\n IHttpRequest: () => import_types.HttpRequest,\n getHttpHandlerExtensionConfiguration: () => getHttpHandlerExtensionConfiguration,\n isValidHostname: () => isValidHostname,\n resolveHttpHandlerRuntimeConfig: () => resolveHttpHandlerRuntimeConfig\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/extensions/httpExtensionConfiguration.ts\nvar getHttpHandlerExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {\n return {\n setHttpHandler(handler) {\n runtimeConfig.httpHandler = handler;\n },\n httpHandler() {\n return runtimeConfig.httpHandler;\n },\n updateHttpClientConfig(key, value) {\n runtimeConfig.httpHandler?.updateHttpClientConfig(key, value);\n },\n httpHandlerConfigs() {\n return runtimeConfig.httpHandler.httpHandlerConfigs();\n }\n };\n}, \"getHttpHandlerExtensionConfiguration\");\nvar resolveHttpHandlerRuntimeConfig = /* @__PURE__ */ __name((httpHandlerExtensionConfiguration) => {\n return {\n httpHandler: httpHandlerExtensionConfiguration.httpHandler()\n };\n}, \"resolveHttpHandlerRuntimeConfig\");\n\n// src/Field.ts\nvar import_types = require(\"@smithy/types\");\nvar Field = class {\n static {\n __name(this, \"Field\");\n }\n constructor({ name, kind = import_types.FieldPosition.HEADER, values = [] }) {\n this.name = name;\n this.kind = kind;\n this.values = values;\n }\n /**\n * Appends a value to the field.\n *\n * @param value The value to append.\n */\n add(value) {\n this.values.push(value);\n }\n /**\n * Overwrite existing field values.\n *\n * @param values The new field values.\n */\n set(values) {\n this.values = values;\n }\n /**\n * Remove all matching entries from list.\n *\n * @param value Value to remove.\n */\n remove(value) {\n this.values = this.values.filter((v) => v !== value);\n }\n /**\n * Get comma-delimited string.\n *\n * @returns String representation of {@link Field}.\n */\n toString() {\n return this.values.map((v) => v.includes(\",\") || v.includes(\" \") ? `\"${v}\"` : v).join(\", \");\n }\n /**\n * Get string values as a list\n *\n * @returns Values in {@link Field} as a list.\n */\n get() {\n return this.values;\n }\n};\n\n// src/Fields.ts\nvar Fields = class {\n constructor({ fields = [], encoding = \"utf-8\" }) {\n this.entries = {};\n fields.forEach(this.setField.bind(this));\n this.encoding = encoding;\n }\n static {\n __name(this, \"Fields\");\n }\n /**\n * Set entry for a {@link Field} name. The `name`\n * attribute will be used to key the collection.\n *\n * @param field The {@link Field} to set.\n */\n setField(field) {\n this.entries[field.name.toLowerCase()] = field;\n }\n /**\n * Retrieve {@link Field} entry by name.\n *\n * @param name The name of the {@link Field} entry\n * to retrieve\n * @returns The {@link Field} if it exists.\n */\n getField(name) {\n return this.entries[name.toLowerCase()];\n }\n /**\n * Delete entry from collection.\n *\n * @param name Name of the entry to delete.\n */\n removeField(name) {\n delete this.entries[name.toLowerCase()];\n }\n /**\n * Helper function for retrieving specific types of fields.\n * Used to grab all headers or all trailers.\n *\n * @param kind {@link FieldPosition} of entries to retrieve.\n * @returns The {@link Field} entries with the specified\n * {@link FieldPosition}.\n */\n getByType(kind) {\n return Object.values(this.entries).filter((field) => field.kind === kind);\n }\n};\n\n// src/httpRequest.ts\n\nvar HttpRequest = class _HttpRequest {\n static {\n __name(this, \"HttpRequest\");\n }\n constructor(options) {\n this.method = options.method || \"GET\";\n this.hostname = options.hostname || \"localhost\";\n this.port = options.port;\n this.query = options.query || {};\n this.headers = options.headers || {};\n this.body = options.body;\n this.protocol = options.protocol ? options.protocol.slice(-1) !== \":\" ? `${options.protocol}:` : options.protocol : \"https:\";\n this.path = options.path ? options.path.charAt(0) !== \"/\" ? `/${options.path}` : options.path : \"/\";\n this.username = options.username;\n this.password = options.password;\n this.fragment = options.fragment;\n }\n /**\n * Note: this does not deep-clone the body.\n */\n static clone(request) {\n const cloned = new _HttpRequest({\n ...request,\n headers: { ...request.headers }\n });\n if (cloned.query) {\n cloned.query = cloneQuery(cloned.query);\n }\n return cloned;\n }\n /**\n * This method only actually asserts that request is the interface {@link IHttpRequest},\n * and not necessarily this concrete class. Left in place for API stability.\n *\n * Do not call instance methods on the input of this function, and\n * do not assume it has the HttpRequest prototype.\n */\n static isInstance(request) {\n if (!request) {\n return false;\n }\n const req = request;\n return \"method\" in req && \"protocol\" in req && \"hostname\" in req && \"path\" in req && typeof req[\"query\"] === \"object\" && typeof req[\"headers\"] === \"object\";\n }\n /**\n * @deprecated use static HttpRequest.clone(request) instead. It's not safe to call\n * this method because {@link HttpRequest.isInstance} incorrectly\n * asserts that IHttpRequest (interface) objects are of type HttpRequest (class).\n */\n clone() {\n return _HttpRequest.clone(this);\n }\n};\nfunction cloneQuery(query) {\n return Object.keys(query).reduce((carry, paramName) => {\n const param = query[paramName];\n return {\n ...carry,\n [paramName]: Array.isArray(param) ? [...param] : param\n };\n }, {});\n}\n__name(cloneQuery, \"cloneQuery\");\n\n// src/httpResponse.ts\nvar HttpResponse = class {\n static {\n __name(this, \"HttpResponse\");\n }\n constructor(options) {\n this.statusCode = options.statusCode;\n this.reason = options.reason;\n this.headers = options.headers || {};\n this.body = options.body;\n }\n static isInstance(response) {\n if (!response)\n return false;\n const resp = response;\n return typeof resp.statusCode === \"number\" && typeof resp.headers === \"object\";\n }\n};\n\n// src/isValidHostname.ts\nfunction isValidHostname(hostname) {\n const hostPattern = /^[a-z0-9][a-z0-9\\.\\-]*[a-z0-9]$/;\n return hostPattern.test(hostname);\n}\n__name(isValidHostname, \"isValidHostname\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n getHttpHandlerExtensionConfiguration,\n resolveHttpHandlerRuntimeConfig,\n Field,\n Fields,\n HttpRequest,\n HttpResponse,\n isValidHostname\n});\n\n",
6
- "var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n escapeUri: () => escapeUri,\n escapeUriPath: () => escapeUriPath\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/escape-uri.ts\nvar escapeUri = /* @__PURE__ */ __name((uri) => (\n // AWS percent-encodes some extra non-standard characters in a URI\n encodeURIComponent(uri).replace(/[!'()*]/g, hexEncode)\n), \"escapeUri\");\nvar hexEncode = /* @__PURE__ */ __name((c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`, \"hexEncode\");\n\n// src/escape-uri-path.ts\nvar escapeUriPath = /* @__PURE__ */ __name((uri) => uri.split(\"/\").map(escapeUri).join(\"/\"), \"escapeUriPath\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n escapeUri,\n escapeUriPath\n});\n\n",
7
- "var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n buildQueryString: () => buildQueryString\n});\nmodule.exports = __toCommonJS(src_exports);\nvar import_util_uri_escape = require(\"@smithy/util-uri-escape\");\nfunction buildQueryString(query) {\n const parts = [];\n for (let key of Object.keys(query).sort()) {\n const value = query[key];\n key = (0, import_util_uri_escape.escapeUri)(key);\n if (Array.isArray(value)) {\n for (let i = 0, iLen = value.length; i < iLen; i++) {\n parts.push(`${key}=${(0, import_util_uri_escape.escapeUri)(value[i])}`);\n }\n } else {\n let qsEntry = key;\n if (value || typeof value === \"string\") {\n qsEntry += `=${(0, import_util_uri_escape.escapeUri)(value)}`;\n }\n parts.push(qsEntry);\n }\n }\n return parts.join(\"&\");\n}\n__name(buildQueryString, \"buildQueryString\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n buildQueryString\n});\n\n",
8
- "var __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n DEFAULT_REQUEST_TIMEOUT: () => DEFAULT_REQUEST_TIMEOUT,\n NodeHttp2Handler: () => NodeHttp2Handler,\n NodeHttpHandler: () => NodeHttpHandler,\n streamCollector: () => streamCollector\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/node-http-handler.ts\nvar import_protocol_http = require(\"@smithy/protocol-http\");\nvar import_querystring_builder = require(\"@smithy/querystring-builder\");\nvar import_http = require(\"http\");\nvar import_https = require(\"https\");\n\n// src/constants.ts\nvar NODEJS_TIMEOUT_ERROR_CODES = [\"ECONNRESET\", \"EPIPE\", \"ETIMEDOUT\"];\n\n// src/get-transformed-headers.ts\nvar getTransformedHeaders = /* @__PURE__ */ __name((headers) => {\n const transformedHeaders = {};\n for (const name of Object.keys(headers)) {\n const headerValues = headers[name];\n transformedHeaders[name] = Array.isArray(headerValues) ? headerValues.join(\",\") : headerValues;\n }\n return transformedHeaders;\n}, \"getTransformedHeaders\");\n\n// src/timing.ts\nvar timing = {\n setTimeout: (cb, ms) => setTimeout(cb, ms),\n clearTimeout: (timeoutId) => clearTimeout(timeoutId)\n};\n\n// src/set-connection-timeout.ts\nvar DEFER_EVENT_LISTENER_TIME = 1e3;\nvar setConnectionTimeout = /* @__PURE__ */ __name((request, reject, timeoutInMs = 0) => {\n if (!timeoutInMs) {\n return -1;\n }\n const registerTimeout = /* @__PURE__ */ __name((offset) => {\n const timeoutId = timing.setTimeout(() => {\n request.destroy();\n reject(\n Object.assign(new Error(`Socket timed out without establishing a connection within ${timeoutInMs} ms`), {\n name: \"TimeoutError\"\n })\n );\n }, timeoutInMs - offset);\n const doWithSocket = /* @__PURE__ */ __name((socket) => {\n if (socket?.connecting) {\n socket.on(\"connect\", () => {\n timing.clearTimeout(timeoutId);\n });\n } else {\n timing.clearTimeout(timeoutId);\n }\n }, \"doWithSocket\");\n if (request.socket) {\n doWithSocket(request.socket);\n } else {\n request.on(\"socket\", doWithSocket);\n }\n }, \"registerTimeout\");\n if (timeoutInMs < 2e3) {\n registerTimeout(0);\n return 0;\n }\n return timing.setTimeout(registerTimeout.bind(null, DEFER_EVENT_LISTENER_TIME), DEFER_EVENT_LISTENER_TIME);\n}, \"setConnectionTimeout\");\n\n// src/set-socket-keep-alive.ts\nvar DEFER_EVENT_LISTENER_TIME2 = 3e3;\nvar setSocketKeepAlive = /* @__PURE__ */ __name((request, { keepAlive, keepAliveMsecs }, deferTimeMs = DEFER_EVENT_LISTENER_TIME2) => {\n if (keepAlive !== true) {\n return -1;\n }\n const registerListener = /* @__PURE__ */ __name(() => {\n if (request.socket) {\n request.socket.setKeepAlive(keepAlive, keepAliveMsecs || 0);\n } else {\n request.on(\"socket\", (socket) => {\n socket.setKeepAlive(keepAlive, keepAliveMsecs || 0);\n });\n }\n }, \"registerListener\");\n if (deferTimeMs === 0) {\n registerListener();\n return 0;\n }\n return timing.setTimeout(registerListener, deferTimeMs);\n}, \"setSocketKeepAlive\");\n\n// src/set-socket-timeout.ts\nvar DEFER_EVENT_LISTENER_TIME3 = 3e3;\nvar setSocketTimeout = /* @__PURE__ */ __name((request, reject, timeoutInMs = DEFAULT_REQUEST_TIMEOUT) => {\n const registerTimeout = /* @__PURE__ */ __name((offset) => {\n const timeout = timeoutInMs - offset;\n const onTimeout = /* @__PURE__ */ __name(() => {\n request.destroy();\n reject(Object.assign(new Error(`Connection timed out after ${timeoutInMs} ms`), { name: \"TimeoutError\" }));\n }, \"onTimeout\");\n if (request.socket) {\n request.socket.setTimeout(timeout, onTimeout);\n request.on(\"close\", () => request.socket?.removeListener(\"timeout\", onTimeout));\n } else {\n request.setTimeout(timeout, onTimeout);\n }\n }, \"registerTimeout\");\n if (0 < timeoutInMs && timeoutInMs < 6e3) {\n registerTimeout(0);\n return 0;\n }\n return timing.setTimeout(\n registerTimeout.bind(null, timeoutInMs === 0 ? 0 : DEFER_EVENT_LISTENER_TIME3),\n DEFER_EVENT_LISTENER_TIME3\n );\n}, \"setSocketTimeout\");\n\n// src/write-request-body.ts\nvar import_stream = require(\"stream\");\nvar MIN_WAIT_TIME = 6e3;\nasync function writeRequestBody(httpRequest, request, maxContinueTimeoutMs = MIN_WAIT_TIME) {\n const headers = request.headers ?? {};\n const expect = headers[\"Expect\"] || headers[\"expect\"];\n let timeoutId = -1;\n let sendBody = true;\n if (expect === \"100-continue\") {\n sendBody = await Promise.race([\n new Promise((resolve) => {\n timeoutId = Number(timing.setTimeout(() => resolve(true), Math.max(MIN_WAIT_TIME, maxContinueTimeoutMs)));\n }),\n new Promise((resolve) => {\n httpRequest.on(\"continue\", () => {\n timing.clearTimeout(timeoutId);\n resolve(true);\n });\n httpRequest.on(\"response\", () => {\n timing.clearTimeout(timeoutId);\n resolve(false);\n });\n httpRequest.on(\"error\", () => {\n timing.clearTimeout(timeoutId);\n resolve(false);\n });\n })\n ]);\n }\n if (sendBody) {\n writeBody(httpRequest, request.body);\n }\n}\n__name(writeRequestBody, \"writeRequestBody\");\nfunction writeBody(httpRequest, body) {\n if (body instanceof import_stream.Readable) {\n body.pipe(httpRequest);\n return;\n }\n if (body) {\n if (Buffer.isBuffer(body) || typeof body === \"string\") {\n httpRequest.end(body);\n return;\n }\n const uint8 = body;\n if (typeof uint8 === \"object\" && uint8.buffer && typeof uint8.byteOffset === \"number\" && typeof uint8.byteLength === \"number\") {\n httpRequest.end(Buffer.from(uint8.buffer, uint8.byteOffset, uint8.byteLength));\n return;\n }\n httpRequest.end(Buffer.from(body));\n return;\n }\n httpRequest.end();\n}\n__name(writeBody, \"writeBody\");\n\n// src/node-http-handler.ts\nvar DEFAULT_REQUEST_TIMEOUT = 0;\nvar NodeHttpHandler = class _NodeHttpHandler {\n constructor(options) {\n this.socketWarningTimestamp = 0;\n // Node http handler is hard-coded to http/1.1: https://github.com/nodejs/node/blob/ff5664b83b89c55e4ab5d5f60068fb457f1f5872/lib/_http_server.js#L286\n this.metadata = { handlerProtocol: \"http/1.1\" };\n this.configProvider = new Promise((resolve, reject) => {\n if (typeof options === \"function\") {\n options().then((_options) => {\n resolve(this.resolveDefaultConfig(_options));\n }).catch(reject);\n } else {\n resolve(this.resolveDefaultConfig(options));\n }\n });\n }\n static {\n __name(this, \"NodeHttpHandler\");\n }\n /**\n * @returns the input if it is an HttpHandler of any class,\n * or instantiates a new instance of this handler.\n */\n static create(instanceOrOptions) {\n if (typeof instanceOrOptions?.handle === \"function\") {\n return instanceOrOptions;\n }\n return new _NodeHttpHandler(instanceOrOptions);\n }\n /**\n * @internal\n *\n * @param agent - http(s) agent in use by the NodeHttpHandler instance.\n * @param socketWarningTimestamp - last socket usage check timestamp.\n * @param logger - channel for the warning.\n * @returns timestamp of last emitted warning.\n */\n static checkSocketUsage(agent, socketWarningTimestamp, logger = console) {\n const { sockets, requests, maxSockets } = agent;\n if (typeof maxSockets !== \"number\" || maxSockets === Infinity) {\n return socketWarningTimestamp;\n }\n const interval = 15e3;\n if (Date.now() - interval < socketWarningTimestamp) {\n return socketWarningTimestamp;\n }\n if (sockets && requests) {\n for (const origin in sockets) {\n const socketsInUse = sockets[origin]?.length ?? 0;\n const requestsEnqueued = requests[origin]?.length ?? 0;\n if (socketsInUse >= maxSockets && requestsEnqueued >= 2 * maxSockets) {\n logger?.warn?.(\n `@smithy/node-http-handler:WARN - socket usage at capacity=${socketsInUse} and ${requestsEnqueued} additional requests are enqueued.\nSee https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html\nor increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`\n );\n return Date.now();\n }\n }\n }\n return socketWarningTimestamp;\n }\n resolveDefaultConfig(options) {\n const { requestTimeout, connectionTimeout, socketTimeout, socketAcquisitionWarningTimeout, httpAgent, httpsAgent } = options || {};\n const keepAlive = true;\n const maxSockets = 50;\n return {\n connectionTimeout,\n requestTimeout: requestTimeout ?? socketTimeout,\n socketAcquisitionWarningTimeout,\n httpAgent: (() => {\n if (httpAgent instanceof import_http.Agent || typeof httpAgent?.destroy === \"function\") {\n return httpAgent;\n }\n return new import_http.Agent({ keepAlive, maxSockets, ...httpAgent });\n })(),\n httpsAgent: (() => {\n if (httpsAgent instanceof import_https.Agent || typeof httpsAgent?.destroy === \"function\") {\n return httpsAgent;\n }\n return new import_https.Agent({ keepAlive, maxSockets, ...httpsAgent });\n })(),\n logger: console\n };\n }\n destroy() {\n this.config?.httpAgent?.destroy();\n this.config?.httpsAgent?.destroy();\n }\n async handle(request, { abortSignal } = {}) {\n if (!this.config) {\n this.config = await this.configProvider;\n }\n return new Promise((_resolve, _reject) => {\n let writeRequestBodyPromise = void 0;\n const timeouts = [];\n const resolve = /* @__PURE__ */ __name(async (arg) => {\n await writeRequestBodyPromise;\n timeouts.forEach(timing.clearTimeout);\n _resolve(arg);\n }, \"resolve\");\n const reject = /* @__PURE__ */ __name(async (arg) => {\n await writeRequestBodyPromise;\n timeouts.forEach(timing.clearTimeout);\n _reject(arg);\n }, \"reject\");\n if (!this.config) {\n throw new Error(\"Node HTTP request handler config is not resolved\");\n }\n if (abortSignal?.aborted) {\n const abortError = new Error(\"Request aborted\");\n abortError.name = \"AbortError\";\n reject(abortError);\n return;\n }\n const isSSL = request.protocol === \"https:\";\n const agent = isSSL ? this.config.httpsAgent : this.config.httpAgent;\n timeouts.push(\n timing.setTimeout(\n () => {\n this.socketWarningTimestamp = _NodeHttpHandler.checkSocketUsage(\n agent,\n this.socketWarningTimestamp,\n this.config.logger\n );\n },\n this.config.socketAcquisitionWarningTimeout ?? (this.config.requestTimeout ?? 2e3) + (this.config.connectionTimeout ?? 1e3)\n )\n );\n const queryString = (0, import_querystring_builder.buildQueryString)(request.query || {});\n let auth = void 0;\n if (request.username != null || request.password != null) {\n const username = request.username ?? \"\";\n const password = request.password ?? \"\";\n auth = `${username}:${password}`;\n }\n let path = request.path;\n if (queryString) {\n path += `?${queryString}`;\n }\n if (request.fragment) {\n path += `#${request.fragment}`;\n }\n let hostname = request.hostname ?? \"\";\n if (hostname[0] === \"[\" && hostname.endsWith(\"]\")) {\n hostname = request.hostname.slice(1, -1);\n } else {\n hostname = request.hostname;\n }\n const nodeHttpsOptions = {\n headers: request.headers,\n host: hostname,\n method: request.method,\n path,\n port: request.port,\n agent,\n auth\n };\n const requestFunc = isSSL ? import_https.request : import_http.request;\n const req = requestFunc(nodeHttpsOptions, (res) => {\n const httpResponse = new import_protocol_http.HttpResponse({\n statusCode: res.statusCode || -1,\n reason: res.statusMessage,\n headers: getTransformedHeaders(res.headers),\n body: res\n });\n resolve({ response: httpResponse });\n });\n req.on(\"error\", (err) => {\n if (NODEJS_TIMEOUT_ERROR_CODES.includes(err.code)) {\n reject(Object.assign(err, { name: \"TimeoutError\" }));\n } else {\n reject(err);\n }\n });\n if (abortSignal) {\n const onAbort = /* @__PURE__ */ __name(() => {\n req.destroy();\n const abortError = new Error(\"Request aborted\");\n abortError.name = \"AbortError\";\n reject(abortError);\n }, \"onAbort\");\n if (typeof abortSignal.addEventListener === \"function\") {\n const signal = abortSignal;\n signal.addEventListener(\"abort\", onAbort, { once: true });\n req.once(\"close\", () => signal.removeEventListener(\"abort\", onAbort));\n } else {\n abortSignal.onabort = onAbort;\n }\n }\n timeouts.push(setConnectionTimeout(req, reject, this.config.connectionTimeout));\n timeouts.push(setSocketTimeout(req, reject, this.config.requestTimeout));\n const httpAgent = nodeHttpsOptions.agent;\n if (typeof httpAgent === \"object\" && \"keepAlive\" in httpAgent) {\n timeouts.push(\n setSocketKeepAlive(req, {\n // @ts-expect-error keepAlive is not public on httpAgent.\n keepAlive: httpAgent.keepAlive,\n // @ts-expect-error keepAliveMsecs is not public on httpAgent.\n keepAliveMsecs: httpAgent.keepAliveMsecs\n })\n );\n }\n writeRequestBodyPromise = writeRequestBody(req, request, this.config.requestTimeout).catch((e) => {\n timeouts.forEach(timing.clearTimeout);\n return _reject(e);\n });\n });\n }\n updateHttpClientConfig(key, value) {\n this.config = void 0;\n this.configProvider = this.configProvider.then((config) => {\n return {\n ...config,\n [key]: value\n };\n });\n }\n httpHandlerConfigs() {\n return this.config ?? {};\n }\n};\n\n// src/node-http2-handler.ts\n\n\nvar import_http22 = require(\"http2\");\n\n// src/node-http2-connection-manager.ts\nvar import_http2 = __toESM(require(\"http2\"));\n\n// src/node-http2-connection-pool.ts\nvar NodeHttp2ConnectionPool = class {\n constructor(sessions) {\n this.sessions = [];\n this.sessions = sessions ?? [];\n }\n static {\n __name(this, \"NodeHttp2ConnectionPool\");\n }\n poll() {\n if (this.sessions.length > 0) {\n return this.sessions.shift();\n }\n }\n offerLast(session) {\n this.sessions.push(session);\n }\n contains(session) {\n return this.sessions.includes(session);\n }\n remove(session) {\n this.sessions = this.sessions.filter((s) => s !== session);\n }\n [Symbol.iterator]() {\n return this.sessions[Symbol.iterator]();\n }\n destroy(connection) {\n for (const session of this.sessions) {\n if (session === connection) {\n if (!session.destroyed) {\n session.destroy();\n }\n }\n }\n }\n};\n\n// src/node-http2-connection-manager.ts\nvar NodeHttp2ConnectionManager = class {\n constructor(config) {\n this.sessionCache = /* @__PURE__ */ new Map();\n this.config = config;\n if (this.config.maxConcurrency && this.config.maxConcurrency <= 0) {\n throw new RangeError(\"maxConcurrency must be greater than zero.\");\n }\n }\n static {\n __name(this, \"NodeHttp2ConnectionManager\");\n }\n lease(requestContext, connectionConfiguration) {\n const url = this.getUrlString(requestContext);\n const existingPool = this.sessionCache.get(url);\n if (existingPool) {\n const existingSession = existingPool.poll();\n if (existingSession && !this.config.disableConcurrency) {\n return existingSession;\n }\n }\n const session = import_http2.default.connect(url);\n if (this.config.maxConcurrency) {\n session.settings({ maxConcurrentStreams: this.config.maxConcurrency }, (err) => {\n if (err) {\n throw new Error(\n \"Fail to set maxConcurrentStreams to \" + this.config.maxConcurrency + \"when creating new session for \" + requestContext.destination.toString()\n );\n }\n });\n }\n session.unref();\n const destroySessionCb = /* @__PURE__ */ __name(() => {\n session.destroy();\n this.deleteSession(url, session);\n }, \"destroySessionCb\");\n session.on(\"goaway\", destroySessionCb);\n session.on(\"error\", destroySessionCb);\n session.on(\"frameError\", destroySessionCb);\n session.on(\"close\", () => this.deleteSession(url, session));\n if (connectionConfiguration.requestTimeout) {\n session.setTimeout(connectionConfiguration.requestTimeout, destroySessionCb);\n }\n const connectionPool = this.sessionCache.get(url) || new NodeHttp2ConnectionPool();\n connectionPool.offerLast(session);\n this.sessionCache.set(url, connectionPool);\n return session;\n }\n /**\n * Delete a session from the connection pool.\n * @param authority The authority of the session to delete.\n * @param session The session to delete.\n */\n deleteSession(authority, session) {\n const existingConnectionPool = this.sessionCache.get(authority);\n if (!existingConnectionPool) {\n return;\n }\n if (!existingConnectionPool.contains(session)) {\n return;\n }\n existingConnectionPool.remove(session);\n this.sessionCache.set(authority, existingConnectionPool);\n }\n release(requestContext, session) {\n const cacheKey = this.getUrlString(requestContext);\n this.sessionCache.get(cacheKey)?.offerLast(session);\n }\n destroy() {\n for (const [key, connectionPool] of this.sessionCache) {\n for (const session of connectionPool) {\n if (!session.destroyed) {\n session.destroy();\n }\n connectionPool.remove(session);\n }\n this.sessionCache.delete(key);\n }\n }\n setMaxConcurrentStreams(maxConcurrentStreams) {\n if (maxConcurrentStreams && maxConcurrentStreams <= 0) {\n throw new RangeError(\"maxConcurrentStreams must be greater than zero.\");\n }\n this.config.maxConcurrency = maxConcurrentStreams;\n }\n setDisableConcurrentStreams(disableConcurrentStreams) {\n this.config.disableConcurrency = disableConcurrentStreams;\n }\n getUrlString(request) {\n return request.destination.toString();\n }\n};\n\n// src/node-http2-handler.ts\nvar NodeHttp2Handler = class _NodeHttp2Handler {\n constructor(options) {\n this.metadata = { handlerProtocol: \"h2\" };\n this.connectionManager = new NodeHttp2ConnectionManager({});\n this.configProvider = new Promise((resolve, reject) => {\n if (typeof options === \"function\") {\n options().then((opts) => {\n resolve(opts || {});\n }).catch(reject);\n } else {\n resolve(options || {});\n }\n });\n }\n static {\n __name(this, \"NodeHttp2Handler\");\n }\n /**\n * @returns the input if it is an HttpHandler of any class,\n * or instantiates a new instance of this handler.\n */\n static create(instanceOrOptions) {\n if (typeof instanceOrOptions?.handle === \"function\") {\n return instanceOrOptions;\n }\n return new _NodeHttp2Handler(instanceOrOptions);\n }\n destroy() {\n this.connectionManager.destroy();\n }\n async handle(request, { abortSignal } = {}) {\n if (!this.config) {\n this.config = await this.configProvider;\n this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams || false);\n if (this.config.maxConcurrentStreams) {\n this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams);\n }\n }\n const { requestTimeout, disableConcurrentStreams } = this.config;\n return new Promise((_resolve, _reject) => {\n let fulfilled = false;\n let writeRequestBodyPromise = void 0;\n const resolve = /* @__PURE__ */ __name(async (arg) => {\n await writeRequestBodyPromise;\n _resolve(arg);\n }, \"resolve\");\n const reject = /* @__PURE__ */ __name(async (arg) => {\n await writeRequestBodyPromise;\n _reject(arg);\n }, \"reject\");\n if (abortSignal?.aborted) {\n fulfilled = true;\n const abortError = new Error(\"Request aborted\");\n abortError.name = \"AbortError\";\n reject(abortError);\n return;\n }\n const { hostname, method, port, protocol, query } = request;\n let auth = \"\";\n if (request.username != null || request.password != null) {\n const username = request.username ?? \"\";\n const password = request.password ?? \"\";\n auth = `${username}:${password}@`;\n }\n const authority = `${protocol}//${auth}${hostname}${port ? `:${port}` : \"\"}`;\n const requestContext = { destination: new URL(authority) };\n const session = this.connectionManager.lease(requestContext, {\n requestTimeout: this.config?.sessionTimeout,\n disableConcurrentStreams: disableConcurrentStreams || false\n });\n const rejectWithDestroy = /* @__PURE__ */ __name((err) => {\n if (disableConcurrentStreams) {\n this.destroySession(session);\n }\n fulfilled = true;\n reject(err);\n }, \"rejectWithDestroy\");\n const queryString = (0, import_querystring_builder.buildQueryString)(query || {});\n let path = request.path;\n if (queryString) {\n path += `?${queryString}`;\n }\n if (request.fragment) {\n path += `#${request.fragment}`;\n }\n const req = session.request({\n ...request.headers,\n [import_http22.constants.HTTP2_HEADER_PATH]: path,\n [import_http22.constants.HTTP2_HEADER_METHOD]: method\n });\n session.ref();\n req.on(\"response\", (headers) => {\n const httpResponse = new import_protocol_http.HttpResponse({\n statusCode: headers[\":status\"] || -1,\n headers: getTransformedHeaders(headers),\n body: req\n });\n fulfilled = true;\n resolve({ response: httpResponse });\n if (disableConcurrentStreams) {\n session.close();\n this.connectionManager.deleteSession(authority, session);\n }\n });\n if (requestTimeout) {\n req.setTimeout(requestTimeout, () => {\n req.close();\n const timeoutError = new Error(`Stream timed out because of no activity for ${requestTimeout} ms`);\n timeoutError.name = \"TimeoutError\";\n rejectWithDestroy(timeoutError);\n });\n }\n if (abortSignal) {\n const onAbort = /* @__PURE__ */ __name(() => {\n req.close();\n const abortError = new Error(\"Request aborted\");\n abortError.name = \"AbortError\";\n rejectWithDestroy(abortError);\n }, \"onAbort\");\n if (typeof abortSignal.addEventListener === \"function\") {\n const signal = abortSignal;\n signal.addEventListener(\"abort\", onAbort, { once: true });\n req.once(\"close\", () => signal.removeEventListener(\"abort\", onAbort));\n } else {\n abortSignal.onabort = onAbort;\n }\n }\n req.on(\"frameError\", (type, code, id) => {\n rejectWithDestroy(new Error(`Frame type id ${type} in stream id ${id} has failed with code ${code}.`));\n });\n req.on(\"error\", rejectWithDestroy);\n req.on(\"aborted\", () => {\n rejectWithDestroy(\n new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${req.rstCode}.`)\n );\n });\n req.on(\"close\", () => {\n session.unref();\n if (disableConcurrentStreams) {\n session.destroy();\n }\n if (!fulfilled) {\n rejectWithDestroy(new Error(\"Unexpected error: http2 request did not get a response\"));\n }\n });\n writeRequestBodyPromise = writeRequestBody(req, request, requestTimeout);\n });\n }\n updateHttpClientConfig(key, value) {\n this.config = void 0;\n this.configProvider = this.configProvider.then((config) => {\n return {\n ...config,\n [key]: value\n };\n });\n }\n httpHandlerConfigs() {\n return this.config ?? {};\n }\n /**\n * Destroys a session.\n * @param session - the session to destroy.\n */\n destroySession(session) {\n if (!session.destroyed) {\n session.destroy();\n }\n }\n};\n\n// src/stream-collector/collector.ts\n\nvar Collector = class extends import_stream.Writable {\n constructor() {\n super(...arguments);\n this.bufferedBytes = [];\n }\n static {\n __name(this, \"Collector\");\n }\n _write(chunk, encoding, callback) {\n this.bufferedBytes.push(chunk);\n callback();\n }\n};\n\n// src/stream-collector/index.ts\nvar streamCollector = /* @__PURE__ */ __name((stream) => {\n if (isReadableStreamInstance(stream)) {\n return collectReadableStream(stream);\n }\n return new Promise((resolve, reject) => {\n const collector = new Collector();\n stream.pipe(collector);\n stream.on(\"error\", (err) => {\n collector.end();\n reject(err);\n });\n collector.on(\"error\", reject);\n collector.on(\"finish\", function() {\n const bytes = new Uint8Array(Buffer.concat(this.bufferedBytes));\n resolve(bytes);\n });\n });\n}, \"streamCollector\");\nvar isReadableStreamInstance = /* @__PURE__ */ __name((stream) => typeof ReadableStream === \"function\" && stream instanceof ReadableStream, \"isReadableStreamInstance\");\nasync function collectReadableStream(stream) {\n const chunks = [];\n const reader = stream.getReader();\n let isDone = false;\n let length = 0;\n while (!isDone) {\n const { done, value } = await reader.read();\n if (value) {\n chunks.push(value);\n length += value.length;\n }\n isDone = done;\n }\n const collected = new Uint8Array(length);\n let offset = 0;\n for (const chunk of chunks) {\n collected.set(chunk, offset);\n offset += chunk.length;\n }\n return collected;\n}\n__name(collectReadableStream, \"collectReadableStream\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n DEFAULT_REQUEST_TIMEOUT,\n NodeHttpHandler,\n NodeHttp2Handler,\n streamCollector\n});\n\n",
9
- "var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n isArrayBuffer: () => isArrayBuffer\n});\nmodule.exports = __toCommonJS(src_exports);\nvar isArrayBuffer = /* @__PURE__ */ __name((arg) => typeof ArrayBuffer === \"function\" && arg instanceof ArrayBuffer || Object.prototype.toString.call(arg) === \"[object ArrayBuffer]\", \"isArrayBuffer\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n isArrayBuffer\n});\n\n",
10
- "var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n fromArrayBuffer: () => fromArrayBuffer,\n fromString: () => fromString\n});\nmodule.exports = __toCommonJS(src_exports);\nvar import_is_array_buffer = require(\"@smithy/is-array-buffer\");\nvar import_buffer = require(\"buffer\");\nvar fromArrayBuffer = /* @__PURE__ */ __name((input, offset = 0, length = input.byteLength - offset) => {\n if (!(0, import_is_array_buffer.isArrayBuffer)(input)) {\n throw new TypeError(`The \"input\" argument must be ArrayBuffer. Received type ${typeof input} (${input})`);\n }\n return import_buffer.Buffer.from(input, offset, length);\n}, \"fromArrayBuffer\");\nvar fromString = /* @__PURE__ */ __name((input, encoding) => {\n if (typeof input !== \"string\") {\n throw new TypeError(`The \"input\" argument must be of type string. Received type ${typeof input} (${input})`);\n }\n return encoding ? import_buffer.Buffer.from(input, encoding) : import_buffer.Buffer.from(input);\n}, \"fromString\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n fromArrayBuffer,\n fromString\n});\n\n",
11
- "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromBase64 = void 0;\nconst util_buffer_from_1 = require(\"@smithy/util-buffer-from\");\nconst BASE64_REGEX = /^[A-Za-z0-9+/]*={0,2}$/;\nconst fromBase64 = (input) => {\n if ((input.length * 3) % 4 !== 0) {\n throw new TypeError(`Incorrect padding on base64 string.`);\n }\n if (!BASE64_REGEX.exec(input)) {\n throw new TypeError(`Invalid base64 string.`);\n }\n const buffer = (0, util_buffer_from_1.fromString)(input, \"base64\");\n return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength);\n};\nexports.fromBase64 = fromBase64;\n",
12
- "var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n fromUtf8: () => fromUtf8,\n toUint8Array: () => toUint8Array,\n toUtf8: () => toUtf8\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/fromUtf8.ts\nvar import_util_buffer_from = require(\"@smithy/util-buffer-from\");\nvar fromUtf8 = /* @__PURE__ */ __name((input) => {\n const buf = (0, import_util_buffer_from.fromString)(input, \"utf8\");\n return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength / Uint8Array.BYTES_PER_ELEMENT);\n}, \"fromUtf8\");\n\n// src/toUint8Array.ts\nvar toUint8Array = /* @__PURE__ */ __name((data) => {\n if (typeof data === \"string\") {\n return fromUtf8(data);\n }\n if (ArrayBuffer.isView(data)) {\n return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);\n }\n return new Uint8Array(data);\n}, \"toUint8Array\");\n\n// src/toUtf8.ts\n\nvar toUtf8 = /* @__PURE__ */ __name((input) => {\n if (typeof input === \"string\") {\n return input;\n }\n if (typeof input !== \"object\" || typeof input.byteOffset !== \"number\" || typeof input.byteLength !== \"number\") {\n throw new Error(\"@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.\");\n }\n return (0, import_util_buffer_from.fromArrayBuffer)(input.buffer, input.byteOffset, input.byteLength).toString(\"utf8\");\n}, \"toUtf8\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n fromUtf8,\n toUint8Array,\n toUtf8\n});\n\n",
13
- "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toBase64 = void 0;\nconst util_buffer_from_1 = require(\"@smithy/util-buffer-from\");\nconst util_utf8_1 = require(\"@smithy/util-utf8\");\nconst toBase64 = (_input) => {\n let input;\n if (typeof _input === \"string\") {\n input = (0, util_utf8_1.fromUtf8)(_input);\n }\n else {\n input = _input;\n }\n if (typeof input !== \"object\" || typeof input.byteOffset !== \"number\" || typeof input.byteLength !== \"number\") {\n throw new Error(\"@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.\");\n }\n return (0, util_buffer_from_1.fromArrayBuffer)(input.buffer, input.byteOffset, input.byteLength).toString(\"base64\");\n};\nexports.toBase64 = toBase64;\n",
14
- "var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\nmodule.exports = __toCommonJS(src_exports);\n__reExport(src_exports, require(\"././fromBase64\"), module.exports);\n__reExport(src_exports, require(\"././toBase64\"), module.exports);\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n fromBase64,\n toBase64\n});\n\n",
15
- "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ChecksumStream = void 0;\nconst util_base64_1 = require(\"@smithy/util-base64\");\nconst stream_1 = require(\"stream\");\nclass ChecksumStream extends stream_1.Duplex {\n constructor({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder, }) {\n var _a, _b;\n super();\n if (typeof source.pipe === \"function\") {\n this.source = source;\n }\n else {\n throw new Error(`@smithy/util-stream: unsupported source type ${(_b = (_a = source === null || source === void 0 ? void 0 : source.constructor) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : source} in ChecksumStream.`);\n }\n this.base64Encoder = base64Encoder !== null && base64Encoder !== void 0 ? base64Encoder : util_base64_1.toBase64;\n this.expectedChecksum = expectedChecksum;\n this.checksum = checksum;\n this.checksumSourceLocation = checksumSourceLocation;\n this.source.pipe(this);\n }\n _read(size) { }\n _write(chunk, encoding, callback) {\n try {\n this.checksum.update(chunk);\n this.push(chunk);\n }\n catch (e) {\n return callback(e);\n }\n return callback();\n }\n async _final(callback) {\n try {\n const digest = await this.checksum.digest();\n const received = this.base64Encoder(digest);\n if (this.expectedChecksum !== received) {\n return callback(new Error(`Checksum mismatch: expected \"${this.expectedChecksum}\" but received \"${received}\"` +\n ` in response header \"${this.checksumSourceLocation}\".`));\n }\n }\n catch (e) {\n return callback(e);\n }\n this.push(null);\n return callback();\n }\n}\nexports.ChecksumStream = ChecksumStream;\n",
16
- "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isBlob = exports.isReadableStream = void 0;\nconst isReadableStream = (stream) => {\n var _a;\n return typeof ReadableStream === \"function\" &&\n (((_a = stream === null || stream === void 0 ? void 0 : stream.constructor) === null || _a === void 0 ? void 0 : _a.name) === ReadableStream.name || stream instanceof ReadableStream);\n};\nexports.isReadableStream = isReadableStream;\nconst isBlob = (blob) => {\n var _a;\n return typeof Blob === \"function\" && (((_a = blob === null || blob === void 0 ? void 0 : blob.constructor) === null || _a === void 0 ? void 0 : _a.name) === Blob.name || blob instanceof Blob);\n};\nexports.isBlob = isBlob;\n",
17
- "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ChecksumStream = void 0;\nconst ReadableStreamRef = typeof ReadableStream === \"function\" ? ReadableStream : function () { };\nclass ChecksumStream extends ReadableStreamRef {\n}\nexports.ChecksumStream = ChecksumStream;\n",
18
- "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createChecksumStream = void 0;\nconst util_base64_1 = require(\"@smithy/util-base64\");\nconst stream_type_check_1 = require(\"../stream-type-check\");\nconst ChecksumStream_browser_1 = require(\"./ChecksumStream.browser\");\nconst createChecksumStream = ({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder, }) => {\n var _a, _b;\n if (!(0, stream_type_check_1.isReadableStream)(source)) {\n throw new Error(`@smithy/util-stream: unsupported source type ${(_b = (_a = source === null || source === void 0 ? void 0 : source.constructor) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : source} in ChecksumStream.`);\n }\n const encoder = base64Encoder !== null && base64Encoder !== void 0 ? base64Encoder : util_base64_1.toBase64;\n if (typeof TransformStream !== \"function\") {\n throw new Error(\"@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream.\");\n }\n const transform = new TransformStream({\n start() { },\n async transform(chunk, controller) {\n checksum.update(chunk);\n controller.enqueue(chunk);\n },\n async flush(controller) {\n const digest = await checksum.digest();\n const received = encoder(digest);\n if (expectedChecksum !== received) {\n const error = new Error(`Checksum mismatch: expected \"${expectedChecksum}\" but received \"${received}\"` +\n ` in response header \"${checksumSourceLocation}\".`);\n controller.error(error);\n }\n else {\n controller.terminate();\n }\n },\n });\n source.pipeThrough(transform);\n const readable = transform.readable;\n Object.setPrototypeOf(readable, ChecksumStream_browser_1.ChecksumStream.prototype);\n return readable;\n};\nexports.createChecksumStream = createChecksumStream;\n",
19
- "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createChecksumStream = void 0;\nconst stream_type_check_1 = require(\"../stream-type-check\");\nconst ChecksumStream_1 = require(\"./ChecksumStream\");\nconst createChecksumStream_browser_1 = require(\"./createChecksumStream.browser\");\nfunction createChecksumStream(init) {\n if (typeof ReadableStream === \"function\" && (0, stream_type_check_1.isReadableStream)(init.source)) {\n return (0, createChecksumStream_browser_1.createChecksumStream)(init);\n }\n return new ChecksumStream_1.ChecksumStream(init);\n}\nexports.createChecksumStream = createChecksumStream;\n",
20
- "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ByteArrayCollector = void 0;\nclass ByteArrayCollector {\n constructor(allocByteArray) {\n this.allocByteArray = allocByteArray;\n this.byteLength = 0;\n this.byteArrays = [];\n }\n push(byteArray) {\n this.byteArrays.push(byteArray);\n this.byteLength += byteArray.byteLength;\n }\n flush() {\n if (this.byteArrays.length === 1) {\n const bytes = this.byteArrays[0];\n this.reset();\n return bytes;\n }\n const aggregation = this.allocByteArray(this.byteLength);\n let cursor = 0;\n for (let i = 0; i < this.byteArrays.length; ++i) {\n const bytes = this.byteArrays[i];\n aggregation.set(bytes, cursor);\n cursor += bytes.byteLength;\n }\n this.reset();\n return aggregation;\n }\n reset() {\n this.byteArrays = [];\n this.byteLength = 0;\n }\n}\nexports.ByteArrayCollector = ByteArrayCollector;\n",
21
- "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.modeOf = exports.sizeOf = exports.flush = exports.merge = exports.createBufferedReadable = exports.createBufferedReadableStream = void 0;\nconst ByteArrayCollector_1 = require(\"./ByteArrayCollector\");\nfunction createBufferedReadableStream(upstream, size, logger) {\n const reader = upstream.getReader();\n let streamBufferingLoggedWarning = false;\n let bytesSeen = 0;\n const buffers = [\"\", new ByteArrayCollector_1.ByteArrayCollector((size) => new Uint8Array(size))];\n let mode = -1;\n const pull = async (controller) => {\n const { value, done } = await reader.read();\n const chunk = value;\n if (done) {\n if (mode !== -1) {\n const remainder = flush(buffers, mode);\n if (sizeOf(remainder) > 0) {\n controller.enqueue(remainder);\n }\n }\n controller.close();\n }\n else {\n const chunkMode = modeOf(chunk, false);\n if (mode !== chunkMode) {\n if (mode >= 0) {\n controller.enqueue(flush(buffers, mode));\n }\n mode = chunkMode;\n }\n if (mode === -1) {\n controller.enqueue(chunk);\n return;\n }\n const chunkSize = sizeOf(chunk);\n bytesSeen += chunkSize;\n const bufferSize = sizeOf(buffers[mode]);\n if (chunkSize >= size && bufferSize === 0) {\n controller.enqueue(chunk);\n }\n else {\n const newSize = merge(buffers, mode, chunk);\n if (!streamBufferingLoggedWarning && bytesSeen > size * 2) {\n streamBufferingLoggedWarning = true;\n logger === null || logger === void 0 ? void 0 : logger.warn(`@smithy/util-stream - stream chunk size ${chunkSize} is below threshold of ${size}, automatically buffering.`);\n }\n if (newSize >= size) {\n controller.enqueue(flush(buffers, mode));\n }\n else {\n await pull(controller);\n }\n }\n }\n };\n return new ReadableStream({\n pull,\n });\n}\nexports.createBufferedReadableStream = createBufferedReadableStream;\nexports.createBufferedReadable = createBufferedReadableStream;\nfunction merge(buffers, mode, chunk) {\n switch (mode) {\n case 0:\n buffers[0] += chunk;\n return sizeOf(buffers[0]);\n case 1:\n case 2:\n buffers[mode].push(chunk);\n return sizeOf(buffers[mode]);\n }\n}\nexports.merge = merge;\nfunction flush(buffers, mode) {\n switch (mode) {\n case 0:\n const s = buffers[0];\n buffers[0] = \"\";\n return s;\n case 1:\n case 2:\n return buffers[mode].flush();\n }\n throw new Error(`@smithy/util-stream - invalid index ${mode} given to flush()`);\n}\nexports.flush = flush;\nfunction sizeOf(chunk) {\n var _a, _b;\n return (_b = (_a = chunk === null || chunk === void 0 ? void 0 : chunk.byteLength) !== null && _a !== void 0 ? _a : chunk === null || chunk === void 0 ? void 0 : chunk.length) !== null && _b !== void 0 ? _b : 0;\n}\nexports.sizeOf = sizeOf;\nfunction modeOf(chunk, allowBuffer = true) {\n if (allowBuffer && typeof Buffer !== \"undefined\" && chunk instanceof Buffer) {\n return 2;\n }\n if (chunk instanceof Uint8Array) {\n return 1;\n }\n if (typeof chunk === \"string\") {\n return 0;\n }\n return -1;\n}\nexports.modeOf = modeOf;\n",
22
- "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createBufferedReadable = void 0;\nconst node_stream_1 = require(\"node:stream\");\nconst ByteArrayCollector_1 = require(\"./ByteArrayCollector\");\nconst createBufferedReadableStream_1 = require(\"./createBufferedReadableStream\");\nconst stream_type_check_1 = require(\"./stream-type-check\");\nfunction createBufferedReadable(upstream, size, logger) {\n if ((0, stream_type_check_1.isReadableStream)(upstream)) {\n return (0, createBufferedReadableStream_1.createBufferedReadableStream)(upstream, size, logger);\n }\n const downstream = new node_stream_1.Readable({ read() { } });\n let streamBufferingLoggedWarning = false;\n let bytesSeen = 0;\n const buffers = [\n \"\",\n new ByteArrayCollector_1.ByteArrayCollector((size) => new Uint8Array(size)),\n new ByteArrayCollector_1.ByteArrayCollector((size) => Buffer.from(new Uint8Array(size))),\n ];\n let mode = -1;\n upstream.on(\"data\", (chunk) => {\n const chunkMode = (0, createBufferedReadableStream_1.modeOf)(chunk, true);\n if (mode !== chunkMode) {\n if (mode >= 0) {\n downstream.push((0, createBufferedReadableStream_1.flush)(buffers, mode));\n }\n mode = chunkMode;\n }\n if (mode === -1) {\n downstream.push(chunk);\n return;\n }\n const chunkSize = (0, createBufferedReadableStream_1.sizeOf)(chunk);\n bytesSeen += chunkSize;\n const bufferSize = (0, createBufferedReadableStream_1.sizeOf)(buffers[mode]);\n if (chunkSize >= size && bufferSize === 0) {\n downstream.push(chunk);\n }\n else {\n const newSize = (0, createBufferedReadableStream_1.merge)(buffers, mode, chunk);\n if (!streamBufferingLoggedWarning && bytesSeen > size * 2) {\n streamBufferingLoggedWarning = true;\n logger === null || logger === void 0 ? void 0 : logger.warn(`@smithy/util-stream - stream chunk size ${chunkSize} is below threshold of ${size}, automatically buffering.`);\n }\n if (newSize >= size) {\n downstream.push((0, createBufferedReadableStream_1.flush)(buffers, mode));\n }\n }\n });\n upstream.on(\"end\", () => {\n if (mode !== -1) {\n const remainder = (0, createBufferedReadableStream_1.flush)(buffers, mode);\n if ((0, createBufferedReadableStream_1.sizeOf)(remainder) > 0) {\n downstream.push(remainder);\n }\n }\n downstream.push(null);\n });\n return downstream;\n}\nexports.createBufferedReadable = createBufferedReadable;\n",
23
- "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getAwsChunkedEncodingStream = void 0;\nconst stream_1 = require(\"stream\");\nconst getAwsChunkedEncodingStream = (readableStream, options) => {\n const { base64Encoder, bodyLengthChecker, checksumAlgorithmFn, checksumLocationName, streamHasher } = options;\n const checksumRequired = base64Encoder !== undefined &&\n checksumAlgorithmFn !== undefined &&\n checksumLocationName !== undefined &&\n streamHasher !== undefined;\n const digest = checksumRequired ? streamHasher(checksumAlgorithmFn, readableStream) : undefined;\n const awsChunkedEncodingStream = new stream_1.Readable({ read: () => { } });\n readableStream.on(\"data\", (data) => {\n const length = bodyLengthChecker(data) || 0;\n awsChunkedEncodingStream.push(`${length.toString(16)}\\r\\n`);\n awsChunkedEncodingStream.push(data);\n awsChunkedEncodingStream.push(\"\\r\\n\");\n });\n readableStream.on(\"end\", async () => {\n awsChunkedEncodingStream.push(`0\\r\\n`);\n if (checksumRequired) {\n const checksum = base64Encoder(await digest);\n awsChunkedEncodingStream.push(`${checksumLocationName}:${checksum}\\r\\n`);\n awsChunkedEncodingStream.push(`\\r\\n`);\n }\n awsChunkedEncodingStream.push(null);\n });\n return awsChunkedEncodingStream;\n};\nexports.getAwsChunkedEncodingStream = getAwsChunkedEncodingStream;\n",
24
- "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.headStream = void 0;\nasync function headStream(stream, bytes) {\n var _a;\n let byteLengthCounter = 0;\n const chunks = [];\n const reader = stream.getReader();\n let isDone = false;\n while (!isDone) {\n const { done, value } = await reader.read();\n if (value) {\n chunks.push(value);\n byteLengthCounter += (_a = value === null || value === void 0 ? void 0 : value.byteLength) !== null && _a !== void 0 ? _a : 0;\n }\n if (byteLengthCounter >= bytes) {\n break;\n }\n isDone = done;\n }\n reader.releaseLock();\n const collected = new Uint8Array(Math.min(bytes, byteLengthCounter));\n let offset = 0;\n for (const chunk of chunks) {\n if (chunk.byteLength > collected.byteLength - offset) {\n collected.set(chunk.subarray(0, collected.byteLength - offset), offset);\n break;\n }\n else {\n collected.set(chunk, offset);\n }\n offset += chunk.length;\n }\n return collected;\n}\nexports.headStream = headStream;\n",
25
- "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.headStream = void 0;\nconst stream_1 = require(\"stream\");\nconst headStream_browser_1 = require(\"./headStream.browser\");\nconst stream_type_check_1 = require(\"./stream-type-check\");\nconst headStream = (stream, bytes) => {\n if ((0, stream_type_check_1.isReadableStream)(stream)) {\n return (0, headStream_browser_1.headStream)(stream, bytes);\n }\n return new Promise((resolve, reject) => {\n const collector = new Collector();\n collector.limit = bytes;\n stream.pipe(collector);\n stream.on(\"error\", (err) => {\n collector.end();\n reject(err);\n });\n collector.on(\"error\", reject);\n collector.on(\"finish\", function () {\n const bytes = new Uint8Array(Buffer.concat(this.buffers));\n resolve(bytes);\n });\n });\n};\nexports.headStream = headStream;\nclass Collector extends stream_1.Writable {\n constructor() {\n super(...arguments);\n this.buffers = [];\n this.limit = Infinity;\n this.bytesBuffered = 0;\n }\n _write(chunk, encoding, callback) {\n var _a;\n this.buffers.push(chunk);\n this.bytesBuffered += (_a = chunk.byteLength) !== null && _a !== void 0 ? _a : 0;\n if (this.bytesBuffered >= this.limit) {\n const excess = this.bytesBuffered - this.limit;\n const tailBuffer = this.buffers[this.buffers.length - 1];\n this.buffers[this.buffers.length - 1] = tailBuffer.subarray(0, tailBuffer.byteLength - excess);\n this.emit(\"finish\");\n }\n callback();\n }\n}\n",
26
- "var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n FetchHttpHandler: () => FetchHttpHandler,\n keepAliveSupport: () => keepAliveSupport,\n streamCollector: () => streamCollector\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/fetch-http-handler.ts\nvar import_protocol_http = require(\"@smithy/protocol-http\");\nvar import_querystring_builder = require(\"@smithy/querystring-builder\");\n\n// src/create-request.ts\nfunction createRequest(url, requestOptions) {\n return new Request(url, requestOptions);\n}\n__name(createRequest, \"createRequest\");\n\n// src/request-timeout.ts\nfunction requestTimeout(timeoutInMs = 0) {\n return new Promise((resolve, reject) => {\n if (timeoutInMs) {\n setTimeout(() => {\n const timeoutError = new Error(`Request did not complete within ${timeoutInMs} ms`);\n timeoutError.name = \"TimeoutError\";\n reject(timeoutError);\n }, timeoutInMs);\n }\n });\n}\n__name(requestTimeout, \"requestTimeout\");\n\n// src/fetch-http-handler.ts\nvar keepAliveSupport = {\n supported: void 0\n};\nvar FetchHttpHandler = class _FetchHttpHandler {\n static {\n __name(this, \"FetchHttpHandler\");\n }\n /**\n * @returns the input if it is an HttpHandler of any class,\n * or instantiates a new instance of this handler.\n */\n static create(instanceOrOptions) {\n if (typeof instanceOrOptions?.handle === \"function\") {\n return instanceOrOptions;\n }\n return new _FetchHttpHandler(instanceOrOptions);\n }\n constructor(options) {\n if (typeof options === \"function\") {\n this.configProvider = options().then((opts) => opts || {});\n } else {\n this.config = options ?? {};\n this.configProvider = Promise.resolve(this.config);\n }\n if (keepAliveSupport.supported === void 0) {\n keepAliveSupport.supported = Boolean(\n typeof Request !== \"undefined\" && \"keepalive\" in createRequest(\"https://[::1]\")\n );\n }\n }\n destroy() {\n }\n async handle(request, { abortSignal } = {}) {\n if (!this.config) {\n this.config = await this.configProvider;\n }\n const requestTimeoutInMs = this.config.requestTimeout;\n const keepAlive = this.config.keepAlive === true;\n const credentials = this.config.credentials;\n if (abortSignal?.aborted) {\n const abortError = new Error(\"Request aborted\");\n abortError.name = \"AbortError\";\n return Promise.reject(abortError);\n }\n let path = request.path;\n const queryString = (0, import_querystring_builder.buildQueryString)(request.query || {});\n if (queryString) {\n path += `?${queryString}`;\n }\n if (request.fragment) {\n path += `#${request.fragment}`;\n }\n let auth = \"\";\n if (request.username != null || request.password != null) {\n const username = request.username ?? \"\";\n const password = request.password ?? \"\";\n auth = `${username}:${password}@`;\n }\n const { port, method } = request;\n const url = `${request.protocol}//${auth}${request.hostname}${port ? `:${port}` : \"\"}${path}`;\n const body = method === \"GET\" || method === \"HEAD\" ? void 0 : request.body;\n const requestOptions = {\n body,\n headers: new Headers(request.headers),\n method,\n credentials\n };\n if (this.config?.cache) {\n requestOptions.cache = this.config.cache;\n }\n if (body) {\n requestOptions.duplex = \"half\";\n }\n if (typeof AbortController !== \"undefined\") {\n requestOptions.signal = abortSignal;\n }\n if (keepAliveSupport.supported) {\n requestOptions.keepalive = keepAlive;\n }\n if (typeof this.config.requestInit === \"function\") {\n Object.assign(requestOptions, this.config.requestInit(request));\n }\n let removeSignalEventListener = /* @__PURE__ */ __name(() => {\n }, \"removeSignalEventListener\");\n const fetchRequest = createRequest(url, requestOptions);\n const raceOfPromises = [\n fetch(fetchRequest).then((response) => {\n const fetchHeaders = response.headers;\n const transformedHeaders = {};\n for (const pair of fetchHeaders.entries()) {\n transformedHeaders[pair[0]] = pair[1];\n }\n const hasReadableStream = response.body != void 0;\n if (!hasReadableStream) {\n return response.blob().then((body2) => ({\n response: new import_protocol_http.HttpResponse({\n headers: transformedHeaders,\n reason: response.statusText,\n statusCode: response.status,\n body: body2\n })\n }));\n }\n return {\n response: new import_protocol_http.HttpResponse({\n headers: transformedHeaders,\n reason: response.statusText,\n statusCode: response.status,\n body: response.body\n })\n };\n }),\n requestTimeout(requestTimeoutInMs)\n ];\n if (abortSignal) {\n raceOfPromises.push(\n new Promise((resolve, reject) => {\n const onAbort = /* @__PURE__ */ __name(() => {\n const abortError = new Error(\"Request aborted\");\n abortError.name = \"AbortError\";\n reject(abortError);\n }, \"onAbort\");\n if (typeof abortSignal.addEventListener === \"function\") {\n const signal = abortSignal;\n signal.addEventListener(\"abort\", onAbort, { once: true });\n removeSignalEventListener = /* @__PURE__ */ __name(() => signal.removeEventListener(\"abort\", onAbort), \"removeSignalEventListener\");\n } else {\n abortSignal.onabort = onAbort;\n }\n })\n );\n }\n return Promise.race(raceOfPromises).finally(removeSignalEventListener);\n }\n updateHttpClientConfig(key, value) {\n this.config = void 0;\n this.configProvider = this.configProvider.then((config) => {\n config[key] = value;\n return config;\n });\n }\n httpHandlerConfigs() {\n return this.config ?? {};\n }\n};\n\n// src/stream-collector.ts\nvar import_util_base64 = require(\"@smithy/util-base64\");\nvar streamCollector = /* @__PURE__ */ __name(async (stream) => {\n if (typeof Blob === \"function\" && stream instanceof Blob || stream.constructor?.name === \"Blob\") {\n if (Blob.prototype.arrayBuffer !== void 0) {\n return new Uint8Array(await stream.arrayBuffer());\n }\n return collectBlob(stream);\n }\n return collectStream(stream);\n}, \"streamCollector\");\nasync function collectBlob(blob) {\n const base64 = await readToBase64(blob);\n const arrayBuffer = (0, import_util_base64.fromBase64)(base64);\n return new Uint8Array(arrayBuffer);\n}\n__name(collectBlob, \"collectBlob\");\nasync function collectStream(stream) {\n const chunks = [];\n const reader = stream.getReader();\n let isDone = false;\n let length = 0;\n while (!isDone) {\n const { done, value } = await reader.read();\n if (value) {\n chunks.push(value);\n length += value.length;\n }\n isDone = done;\n }\n const collected = new Uint8Array(length);\n let offset = 0;\n for (const chunk of chunks) {\n collected.set(chunk, offset);\n offset += chunk.length;\n }\n return collected;\n}\n__name(collectStream, \"collectStream\");\nfunction readToBase64(blob) {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.onloadend = () => {\n if (reader.readyState !== 2) {\n return reject(new Error(\"Reader aborted too early\"));\n }\n const result = reader.result ?? \"\";\n const commaIndex = result.indexOf(\",\");\n const dataOffset = commaIndex > -1 ? commaIndex + 1 : result.length;\n resolve(result.substring(dataOffset));\n };\n reader.onabort = () => reject(new Error(\"Read aborted\"));\n reader.onerror = () => reject(reader.error);\n reader.readAsDataURL(blob);\n });\n}\n__name(readToBase64, \"readToBase64\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n keepAliveSupport,\n FetchHttpHandler,\n streamCollector\n});\n\n",
27
- "var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n fromHex: () => fromHex,\n toHex: () => toHex\n});\nmodule.exports = __toCommonJS(src_exports);\nvar SHORT_TO_HEX = {};\nvar HEX_TO_SHORT = {};\nfor (let i = 0; i < 256; i++) {\n let encodedByte = i.toString(16).toLowerCase();\n if (encodedByte.length === 1) {\n encodedByte = `0${encodedByte}`;\n }\n SHORT_TO_HEX[i] = encodedByte;\n HEX_TO_SHORT[encodedByte] = i;\n}\nfunction fromHex(encoded) {\n if (encoded.length % 2 !== 0) {\n throw new Error(\"Hex encoded strings must have an even number length\");\n }\n const out = new Uint8Array(encoded.length / 2);\n for (let i = 0; i < encoded.length; i += 2) {\n const encodedByte = encoded.slice(i, i + 2).toLowerCase();\n if (encodedByte in HEX_TO_SHORT) {\n out[i / 2] = HEX_TO_SHORT[encodedByte];\n } else {\n throw new Error(`Cannot decode unrecognized sequence ${encodedByte} as hexadecimal`);\n }\n }\n return out;\n}\n__name(fromHex, \"fromHex\");\nfunction toHex(bytes) {\n let out = \"\";\n for (let i = 0; i < bytes.byteLength; i++) {\n out += SHORT_TO_HEX[bytes[i]];\n }\n return out;\n}\n__name(toHex, \"toHex\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n fromHex,\n toHex\n});\n\n",
28
- "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.sdkStreamMixin = void 0;\nconst fetch_http_handler_1 = require(\"@smithy/fetch-http-handler\");\nconst util_base64_1 = require(\"@smithy/util-base64\");\nconst util_hex_encoding_1 = require(\"@smithy/util-hex-encoding\");\nconst util_utf8_1 = require(\"@smithy/util-utf8\");\nconst stream_type_check_1 = require(\"./stream-type-check\");\nconst ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = \"The stream has already been transformed.\";\nconst sdkStreamMixin = (stream) => {\n var _a, _b;\n if (!isBlobInstance(stream) && !(0, stream_type_check_1.isReadableStream)(stream)) {\n const name = ((_b = (_a = stream === null || stream === void 0 ? void 0 : stream.__proto__) === null || _a === void 0 ? void 0 : _a.constructor) === null || _b === void 0 ? void 0 : _b.name) || stream;\n throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${name}`);\n }\n let transformed = false;\n const transformToByteArray = async () => {\n if (transformed) {\n throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);\n }\n transformed = true;\n return await (0, fetch_http_handler_1.streamCollector)(stream);\n };\n const blobToWebStream = (blob) => {\n if (typeof blob.stream !== \"function\") {\n throw new Error(\"Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\\n\" +\n \"If you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body\");\n }\n return blob.stream();\n };\n return Object.assign(stream, {\n transformToByteArray: transformToByteArray,\n transformToString: async (encoding) => {\n const buf = await transformToByteArray();\n if (encoding === \"base64\") {\n return (0, util_base64_1.toBase64)(buf);\n }\n else if (encoding === \"hex\") {\n return (0, util_hex_encoding_1.toHex)(buf);\n }\n else if (encoding === undefined || encoding === \"utf8\" || encoding === \"utf-8\") {\n return (0, util_utf8_1.toUtf8)(buf);\n }\n else if (typeof TextDecoder === \"function\") {\n return new TextDecoder(encoding).decode(buf);\n }\n else {\n throw new Error(\"TextDecoder is not available, please make sure polyfill is provided.\");\n }\n },\n transformToWebStream: () => {\n if (transformed) {\n throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);\n }\n transformed = true;\n if (isBlobInstance(stream)) {\n return blobToWebStream(stream);\n }\n else if ((0, stream_type_check_1.isReadableStream)(stream)) {\n return stream;\n }\n else {\n throw new Error(`Cannot transform payload to web stream, got ${stream}`);\n }\n },\n });\n};\nexports.sdkStreamMixin = sdkStreamMixin;\nconst isBlobInstance = (stream) => typeof Blob === \"function\" && stream instanceof Blob;\n",
29
- "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.sdkStreamMixin = void 0;\nconst node_http_handler_1 = require(\"@smithy/node-http-handler\");\nconst util_buffer_from_1 = require(\"@smithy/util-buffer-from\");\nconst stream_1 = require(\"stream\");\nconst sdk_stream_mixin_browser_1 = require(\"./sdk-stream-mixin.browser\");\nconst ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = \"The stream has already been transformed.\";\nconst sdkStreamMixin = (stream) => {\n var _a, _b;\n if (!(stream instanceof stream_1.Readable)) {\n try {\n return (0, sdk_stream_mixin_browser_1.sdkStreamMixin)(stream);\n }\n catch (e) {\n const name = ((_b = (_a = stream === null || stream === void 0 ? void 0 : stream.__proto__) === null || _a === void 0 ? void 0 : _a.constructor) === null || _b === void 0 ? void 0 : _b.name) || stream;\n throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${name}`);\n }\n }\n let transformed = false;\n const transformToByteArray = async () => {\n if (transformed) {\n throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);\n }\n transformed = true;\n return await (0, node_http_handler_1.streamCollector)(stream);\n };\n return Object.assign(stream, {\n transformToByteArray,\n transformToString: async (encoding) => {\n const buf = await transformToByteArray();\n if (encoding === undefined || Buffer.isEncoding(encoding)) {\n return (0, util_buffer_from_1.fromArrayBuffer)(buf.buffer, buf.byteOffset, buf.byteLength).toString(encoding);\n }\n else {\n const decoder = new TextDecoder(encoding);\n return decoder.decode(buf);\n }\n },\n transformToWebStream: () => {\n if (transformed) {\n throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);\n }\n if (stream.readableFlowing !== null) {\n throw new Error(\"The stream has been consumed by other callbacks.\");\n }\n if (typeof stream_1.Readable.toWeb !== \"function\") {\n throw new Error(\"Readable.toWeb() is not supported. Please ensure a polyfill is available.\");\n }\n transformed = true;\n return stream_1.Readable.toWeb(stream);\n },\n });\n};\nexports.sdkStreamMixin = sdkStreamMixin;\n",
30
- "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.splitStream = void 0;\nasync function splitStream(stream) {\n if (typeof stream.stream === \"function\") {\n stream = stream.stream();\n }\n const readableStream = stream;\n return readableStream.tee();\n}\nexports.splitStream = splitStream;\n",
31
- "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.splitStream = void 0;\nconst stream_1 = require(\"stream\");\nconst splitStream_browser_1 = require(\"./splitStream.browser\");\nconst stream_type_check_1 = require(\"./stream-type-check\");\nasync function splitStream(stream) {\n if ((0, stream_type_check_1.isReadableStream)(stream) || (0, stream_type_check_1.isBlob)(stream)) {\n return (0, splitStream_browser_1.splitStream)(stream);\n }\n const stream1 = new stream_1.PassThrough();\n const stream2 = new stream_1.PassThrough();\n stream.pipe(stream1);\n stream.pipe(stream2);\n return [stream1, stream2];\n}\nexports.splitStream = splitStream;\n",
32
- "var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n Uint8ArrayBlobAdapter: () => Uint8ArrayBlobAdapter\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/blob/transforms.ts\nvar import_util_base64 = require(\"@smithy/util-base64\");\nvar import_util_utf8 = require(\"@smithy/util-utf8\");\nfunction transformToString(payload, encoding = \"utf-8\") {\n if (encoding === \"base64\") {\n return (0, import_util_base64.toBase64)(payload);\n }\n return (0, import_util_utf8.toUtf8)(payload);\n}\n__name(transformToString, \"transformToString\");\nfunction transformFromString(str, encoding) {\n if (encoding === \"base64\") {\n return Uint8ArrayBlobAdapter.mutate((0, import_util_base64.fromBase64)(str));\n }\n return Uint8ArrayBlobAdapter.mutate((0, import_util_utf8.fromUtf8)(str));\n}\n__name(transformFromString, \"transformFromString\");\n\n// src/blob/Uint8ArrayBlobAdapter.ts\nvar Uint8ArrayBlobAdapter = class _Uint8ArrayBlobAdapter extends Uint8Array {\n static {\n __name(this, \"Uint8ArrayBlobAdapter\");\n }\n /**\n * @param source - such as a string or Stream.\n * @returns a new Uint8ArrayBlobAdapter extending Uint8Array.\n */\n static fromString(source, encoding = \"utf-8\") {\n switch (typeof source) {\n case \"string\":\n return transformFromString(source, encoding);\n default:\n throw new Error(`Unsupported conversion from ${typeof source} to Uint8ArrayBlobAdapter.`);\n }\n }\n /**\n * @param source - Uint8Array to be mutated.\n * @returns the same Uint8Array but with prototype switched to Uint8ArrayBlobAdapter.\n */\n static mutate(source) {\n Object.setPrototypeOf(source, _Uint8ArrayBlobAdapter.prototype);\n return source;\n }\n /**\n * @param encoding - default 'utf-8'.\n * @returns the blob as string.\n */\n transformToString(encoding = \"utf-8\") {\n return transformToString(this, encoding);\n }\n};\n\n// src/index.ts\n__reExport(src_exports, require(\"./checksum/ChecksumStream\"), module.exports);\n__reExport(src_exports, require(\"./checksum/createChecksumStream\"), module.exports);\n__reExport(src_exports, require(\"././createBufferedReadable\"), module.exports);\n__reExport(src_exports, require(\"././getAwsChunkedEncodingStream\"), module.exports);\n__reExport(src_exports, require(\"././headStream\"), module.exports);\n__reExport(src_exports, require(\"././sdk-stream-mixin\"), module.exports);\n__reExport(src_exports, require(\"././splitStream\"), module.exports);\n__reExport(src_exports, require(\"././stream-type-check\"), module.exports);\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n Uint8ArrayBlobAdapter,\n ChecksumStream,\n createChecksumStream,\n createBufferedReadable,\n getAwsChunkedEncodingStream,\n headStream,\n sdkStreamMixin,\n splitStream,\n isReadableStream,\n isBlob\n});\n\n",
33
- "var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/submodules/protocols/index.ts\nvar protocols_exports = {};\n__export(protocols_exports, {\n RequestBuilder: () => RequestBuilder,\n collectBody: () => collectBody,\n extendedEncodeURIComponent: () => extendedEncodeURIComponent,\n requestBuilder: () => requestBuilder,\n resolvedPath: () => resolvedPath\n});\nmodule.exports = __toCommonJS(protocols_exports);\n\n// src/submodules/protocols/collect-stream-body.ts\nvar import_util_stream = require(\"@smithy/util-stream\");\nvar collectBody = async (streamBody = new Uint8Array(), context) => {\n if (streamBody instanceof Uint8Array) {\n return import_util_stream.Uint8ArrayBlobAdapter.mutate(streamBody);\n }\n if (!streamBody) {\n return import_util_stream.Uint8ArrayBlobAdapter.mutate(new Uint8Array());\n }\n const fromContext = context.streamCollector(streamBody);\n return import_util_stream.Uint8ArrayBlobAdapter.mutate(await fromContext);\n};\n\n// src/submodules/protocols/extended-encode-uri-component.ts\nfunction extendedEncodeURIComponent(str) {\n return encodeURIComponent(str).replace(/[!'()*]/g, function(c) {\n return \"%\" + c.charCodeAt(0).toString(16).toUpperCase();\n });\n}\n\n// src/submodules/protocols/requestBuilder.ts\nvar import_protocol_http = require(\"@smithy/protocol-http\");\n\n// src/submodules/protocols/resolve-path.ts\nvar resolvedPath = (resolvedPath2, input, memberName, labelValueProvider, uriLabel, isGreedyLabel) => {\n if (input != null && input[memberName] !== void 0) {\n const labelValue = labelValueProvider();\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: \" + memberName + \".\");\n }\n resolvedPath2 = resolvedPath2.replace(\n uriLabel,\n isGreedyLabel ? labelValue.split(\"/\").map((segment) => extendedEncodeURIComponent(segment)).join(\"/\") : extendedEncodeURIComponent(labelValue)\n );\n } else {\n throw new Error(\"No value provided for input HTTP label: \" + memberName + \".\");\n }\n return resolvedPath2;\n};\n\n// src/submodules/protocols/requestBuilder.ts\nfunction requestBuilder(input, context) {\n return new RequestBuilder(input, context);\n}\nvar RequestBuilder = class {\n constructor(input, context) {\n this.input = input;\n this.context = context;\n this.query = {};\n this.method = \"\";\n this.headers = {};\n this.path = \"\";\n this.body = null;\n this.hostname = \"\";\n this.resolvePathStack = [];\n }\n async build() {\n const { hostname, protocol = \"https\", port, path: basePath } = await this.context.endpoint();\n this.path = basePath;\n for (const resolvePath of this.resolvePathStack) {\n resolvePath(this.path);\n }\n return new import_protocol_http.HttpRequest({\n protocol,\n hostname: this.hostname || hostname,\n port,\n method: this.method,\n path: this.path,\n query: this.query,\n body: this.body,\n headers: this.headers\n });\n }\n /**\n * Brevity setter for \"hostname\".\n */\n hn(hostname) {\n this.hostname = hostname;\n return this;\n }\n /**\n * Brevity initial builder for \"basepath\".\n */\n bp(uriLabel) {\n this.resolvePathStack.push((basePath) => {\n this.path = `${basePath?.endsWith(\"/\") ? basePath.slice(0, -1) : basePath || \"\"}` + uriLabel;\n });\n return this;\n }\n /**\n * Brevity incremental builder for \"path\".\n */\n p(memberName, labelValueProvider, uriLabel, isGreedyLabel) {\n this.resolvePathStack.push((path) => {\n this.path = resolvedPath(path, this.input, memberName, labelValueProvider, uriLabel, isGreedyLabel);\n });\n return this;\n }\n /**\n * Brevity setter for \"headers\".\n */\n h(headers) {\n this.headers = headers;\n return this;\n }\n /**\n * Brevity setter for \"query\".\n */\n q(query) {\n this.query = query;\n return this;\n }\n /**\n * Brevity setter for \"body\".\n */\n b(body) {\n this.body = body;\n return this;\n }\n /**\n * Brevity setter for \"method\".\n */\n m(method) {\n this.method = method;\n return this;\n }\n};\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n RequestBuilder,\n collectBody,\n extendedEncodeURIComponent,\n requestBuilder,\n resolvedPath\n});\n"
34
- ],
35
- "mappings": "mHAAA,FAAuB,eAAnB,EAC0B,yBAA1B,GAC2B,oBAA3B,IADmB,OAEnB,GAAe,OAAO,UAAU,eAChC,EAAS,CAAC,EAAQ,IAAU,EAAU,EAAQ,OAAQ,CAAE,QAAO,aAAc,EAAK,CAAC,EACnF,GAAW,CAAC,EAAQ,IAAQ,CAC9B,QAAS,KAAQ,EACf,EAAU,EAAQ,EAAM,CAAE,IAAK,EAAI,GAAO,WAAY,EAAK,CAAC,GAE5D,GAAc,CAAC,EAAI,EAAM,EAAQ,IAAS,CAC5C,GAAI,GAAQ,OAAO,IAAS,UAAY,OAAO,IAAS,YACtD,QAAS,KAAO,GAAkB,CAAI,EACpC,IAAK,GAAa,KAAK,EAAI,CAAG,GAAK,IAAQ,EACzC,EAAU,EAAI,EAAK,CAAE,IAAK,IAAM,EAAK,GAAM,aAAc,EAAO,GAAiB,EAAM,CAAG,IAAM,EAAK,UAAW,CAAC,EAEvH,OAAO,GAEL,GAAe,CAAC,IAAQ,GAAY,EAAU,CAAC,EAAG,aAAc,CAAE,MAAO,EAAK,CAAC,EAAG,CAAG,EAGrF,GAAc,CAAC,EACnB,GAAS,GAAa,CACpB,MAAO,IAAM,GACb,OAAQ,IAAM,GACd,YAAa,IAAM,GACnB,aAAc,IAAM,GACpB,aAAc,IAAM,GAAa,YACjC,qCAAsC,IAAM,GAC5C,gBAAiB,IAAM,GACvB,gCAAiC,IAAM,EACzC,CAAC,EACD,GAAO,QAAU,GAAa,EAAW,EAGzC,IAAI,GAAuD,EAAO,CAAC,IAAkB,CACnF,MAAO,CACL,cAAc,CAAC,EAAS,CACtB,EAAc,YAAc,GAE9B,WAAW,EAAG,CACZ,OAAO,EAAc,aAEvB,sBAAsB,CAAC,EAAK,EAAO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