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
@@ -0,0 +1,15 @@
1
+ // @bun
2
+ import{Ca as t0}from"./chunk-m06xgv2s.js";import{Oa as I,Pa as E}from"./chunk-cbdnkfkw.js";var Z0=I((tY,X1)=>{var{defineProperty:$0,getOwnPropertyDescriptor:d4,getOwnPropertyNames:p4}=Object,u4=Object.prototype.hasOwnProperty,y=($,Z)=>$0($,"name",{value:Z,configurable:!0}),l4=($,Z)=>{for(var Y in Z)$0($,Y,{get:Z[Y],enumerable:!0})},m4=($,Z,Y,X)=>{if(Z&&typeof Z==="object"||typeof Z==="function"){for(let Q of p4(Z))if(!u4.call($,Q)&&Q!==Y)$0($,Q,{get:()=>Z[Q],enumerable:!(X=d4(Z,Q))||X.enumerable})}return $},i4=($)=>m4($0({},"__esModule",{value:!0}),$),e0={};l4(e0,{Field:()=>a4,Fields:()=>r4,HttpRequest:()=>o4,HttpResponse:()=>t4,IHttpRequest:()=>$1.HttpRequest,getHttpHandlerExtensionConfiguration:()=>s4,isValidHostname:()=>Y1,resolveHttpHandlerRuntimeConfig:()=>n4});X1.exports=i4(e0);var s4=y(($)=>{return{setHttpHandler(Z){$.httpHandler=Z},httpHandler(){return $.httpHandler},updateHttpClientConfig(Z,Y){$.httpHandler?.updateHttpClientConfig(Z,Y)},httpHandlerConfigs(){return $.httpHandler.httpHandlerConfigs()}}},"getHttpHandlerExtensionConfiguration"),n4=y(($)=>{return{httpHandler:$.httpHandler()}},"resolveHttpHandlerRuntimeConfig"),$1=t0(),a4=class{static{y(this,"Field")}constructor({name:$,kind:Z=$1.FieldPosition.HEADER,values:Y=[]}){this.name=$,this.kind=Z,this.values=Y}add($){this.values.push($)}set($){this.values=$}remove($){this.values=this.values.filter((Z)=>Z!==$)}toString(){return this.values.map(($)=>$.includes(",")||$.includes(" ")?`"${$}"`:$).join(", ")}get(){return this.values}},r4=class{constructor({fields:$=[],encoding:Z="utf-8"}){this.entries={},$.forEach(this.setField.bind(this)),this.encoding=Z}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((Z)=>Z.kind===$)}},o4=class ${static{y(this,"HttpRequest")}constructor(Z){this.method=Z.method||"GET",this.hostname=Z.hostname||"localhost",this.port=Z.port,this.query=Z.query||{},this.headers=Z.headers||{},this.body=Z.body,this.protocol=Z.protocol?Z.protocol.slice(-1)!==":"?`${Z.protocol}:`:Z.protocol:"https:",this.path=Z.path?Z.path.charAt(0)!=="/"?`/${Z.path}`:Z.path:"/",this.username=Z.username,this.password=Z.password,this.fragment=Z.fragment}static clone(Z){let Y=new $({...Z,headers:{...Z.headers}});if(Y.query)Y.query=Z1(Y.query);return Y}static isInstance(Z){if(!Z)return!1;let Y=Z;return"method"in Y&&"protocol"in Y&&"hostname"in Y&&"path"in Y&&typeof Y.query==="object"&&typeof Y.headers==="object"}clone(){return $.clone(this)}};function Z1($){return Object.keys($).reduce((Z,Y)=>{let X=$[Y];return{...Z,[Y]:Array.isArray(X)?[...X]:X}},{})}y(Z1,"cloneQuery");var t4=class{static{y(this,"HttpResponse")}constructor($){this.statusCode=$.statusCode,this.reason=$.reason,this.headers=$.headers||{},this.body=$.body}static isInstance($){if(!$)return!1;let Z=$;return typeof Z.statusCode==="number"&&typeof Z.headers==="object"}};function Y1($){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test($)}y(Y1,"isValidHostname")});var K1=I((YX,V1)=>{var{defineProperty:Y0,getOwnPropertyDescriptor:e4,getOwnPropertyNames:$$}=Object,Z$=Object.prototype.hasOwnProperty,h=($,Z)=>Y0($,"name",{value:Z,configurable:!0}),Y$=($,Z)=>{for(var Y in Z)Y0($,Y,{get:Z[Y],enumerable:!0})},X$=($,Z,Y,X)=>{if(Z&&typeof Z==="object"||typeof Z==="function"){for(let Q of $$(Z))if(!Z$.call($,Q)&&Q!==Y)Y0($,Q,{get:()=>Z[Q],enumerable:!(X=e4(Z,Q))||X.enumerable})}return $},Q$=($)=>X$(Y0({},"__esModule",{value:!0}),$),U1={};Y$(U1,{constructStack:()=>N0});V1.exports=Q$(U1);var d=h(($,Z)=>{let Y=[];if($)Y.push($);if(Z)for(let X of Z)Y.push(X);return Y},"getAllAliases"),g=h(($,Z)=>{return`${$||"anonymous"}${Z&&Z.length>0?` (a.k.a. ${Z.join(",")})`:""}`},"getMiddlewareNameWithAliases"),N0=h(()=>{let $=[],Z=[],Y=!1,X=new Set,Q=h((z)=>z.sort((B,W)=>Q1[W.step]-Q1[B.step]||G1[W.priority||"normal"]-G1[B.priority||"normal"]),"sort"),U=h((z)=>{let B=!1,W=h((N)=>{let A=d(N.name,N.aliases);if(A.includes(z)){B=!0;for(let D of A)X.delete(D);return!1}return!0},"filterCb");return $=$.filter(W),Z=Z.filter(W),B},"removeByName"),G=h((z)=>{let B=!1,W=h((N)=>{if(N.middleware===z){B=!0;for(let A of d(N.name,N.aliases))X.delete(A);return!1}return!0},"filterCb");return $=$.filter(W),Z=Z.filter(W),B},"removeByReference"),V=h((z)=>{return $.forEach((B)=>{z.add(B.middleware,{...B})}),Z.forEach((B)=>{z.addRelativeTo(B.middleware,{...B})}),z.identifyOnResolve?.(H.identifyOnResolve()),z},"cloneTo"),K=h((z)=>{let B=[];return z.before.forEach((W)=>{if(W.before.length===0&&W.after.length===0)B.push(W);else B.push(...K(W))}),B.push(z),z.after.reverse().forEach((W)=>{if(W.before.length===0&&W.after.length===0)B.push(W);else B.push(...K(W))}),B},"expandRelativeMiddlewareList"),J=h((z=!1)=>{let B=[],W=[],N={};return $.forEach((D)=>{let F={...D,before:[],after:[]};for(let R of d(F.name,F.aliases))N[R]=F;B.push(F)}),Z.forEach((D)=>{let F={...D,before:[],after:[]};for(let R of d(F.name,F.aliases))N[R]=F;W.push(F)}),W.forEach((D)=>{if(D.toMiddleware){let F=N[D.toMiddleware];if(F===void 0){if(z)return;throw Error(`${D.toMiddleware} is not found when adding ${g(D.name,D.aliases)} middleware ${D.relation} ${D.toMiddleware}`)}if(D.relation==="after")F.after.push(D);if(D.relation==="before")F.before.push(D)}}),Q(B).map(K).reduce((D,F)=>{return D.push(...F),D},[])},"getMiddlewareList"),H={add:(z,B={})=>{let{name:W,override:N,aliases:A}=B,D={step:"initialize",priority:"normal",middleware:z,...B},F=d(W,A);if(F.length>0){if(F.some((R)=>X.has(R))){if(!N)throw Error(`Duplicate middleware name '${g(W,A)}'`);for(let R of F){let w=$.findIndex((O)=>O.name===R||O.aliases?.some((_)=>_===R));if(w===-1)continue;let j=$[w];if(j.step!==D.step||D.priority!==j.priority)throw Error(`"${g(j.name,j.aliases)}" middleware with ${j.priority} priority in ${j.step} step cannot be overridden by "${g(W,A)}" middleware with ${D.priority} priority in ${D.step} step.`);$.splice(w,1)}}for(let R of F)X.add(R)}$.push(D)},addRelativeTo:(z,B)=>{let{name:W,override:N,aliases:A}=B,D={middleware:z,...B},F=d(W,A);if(F.length>0){if(F.some((R)=>X.has(R))){if(!N)throw Error(`Duplicate middleware name '${g(W,A)}'`);for(let R of F){let w=Z.findIndex((O)=>O.name===R||O.aliases?.some((_)=>_===R));if(w===-1)continue;let j=Z[w];if(j.toMiddleware!==D.toMiddleware||j.relation!==D.relation)throw Error(`"${g(j.name,j.aliases)}" middleware ${j.relation} "${j.toMiddleware}" middleware cannot be overridden by "${g(W,A)}" middleware ${D.relation} "${D.toMiddleware}" middleware.`);Z.splice(w,1)}}for(let R of F)X.add(R)}Z.push(D)},clone:()=>V(N0()),use:(z)=>{z.applyToStack(H)},remove:(z)=>{if(typeof z==="string")return U(z);else return G(z)},removeByTag:(z)=>{let B=!1,W=h((N)=>{let{tags:A,name:D,aliases:F}=N;if(A&&A.includes(z)){let R=d(D,F);for(let w of R)X.delete(w);return B=!0,!1}return!0},"filterCb");return $=$.filter(W),Z=Z.filter(W),B},concat:(z)=>{let B=V(N0());return B.use(z),B.identifyOnResolve(Y||B.identifyOnResolve()||(z.identifyOnResolve?.()??!1)),B},applyToStack:V,identify:()=>{return J(!0).map((z)=>{let B=z.step??z.relation+" "+z.toMiddleware;return g(z.name,z.aliases)+" - "+B})},identifyOnResolve(z){if(typeof z==="boolean")Y=z;return Y},resolve:(z,B)=>{for(let W of J().map((N)=>N.middleware).reverse())z=W(z,B);if(Y)console.log(H.identify());return z}};return H},"constructStack"),Q1={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},G1={high:3,normal:2,low:1}});var J1=I((XX,z1)=>{var{defineProperty:X0,getOwnPropertyDescriptor:G$,getOwnPropertyNames:U$}=Object,V$=Object.prototype.hasOwnProperty,K$=($,Z)=>X0($,"name",{value:Z,configurable:!0}),L$=($,Z)=>{for(var Y in Z)X0($,Y,{get:Z[Y],enumerable:!0})},z$=($,Z,Y,X)=>{if(Z&&typeof Z==="object"||typeof Z==="function"){for(let Q of U$(Z))if(!V$.call($,Q)&&Q!==Y)X0($,Q,{get:()=>Z[Q],enumerable:!(X=G$(Z,Q))||X.enumerable})}return $},J$=($)=>z$(X0({},"__esModule",{value:!0}),$),L1={};L$(L1,{isArrayBuffer:()=>B$});z1.exports=J$(L1);var B$=K$(($)=>typeof ArrayBuffer==="function"&&$ instanceof ArrayBuffer||Object.prototype.toString.call($)==="[object ArrayBuffer]","isArrayBuffer")});var n=I((QX,F1)=>{var{defineProperty:Q0,getOwnPropertyDescriptor:W$,getOwnPropertyNames:F$}=Object,H$=Object.prototype.hasOwnProperty,B1=($,Z)=>Q0($,"name",{value:Z,configurable:!0}),w$=($,Z)=>{for(var Y in Z)Q0($,Y,{get:Z[Y],enumerable:!0})},D$=($,Z,Y,X)=>{if(Z&&typeof Z==="object"||typeof Z==="function"){for(let Q of F$(Z))if(!H$.call($,Q)&&Q!==Y)Q0($,Q,{get:()=>Z[Q],enumerable:!(X=W$(Z,Q))||X.enumerable})}return $},N$=($)=>D$(Q0({},"__esModule",{value:!0}),$),W1={};w$(W1,{fromArrayBuffer:()=>R$,fromString:()=>I$});F1.exports=N$(W1);var j$=J1(),j0=E("buffer"),R$=B1(($,Z=0,Y=$.byteLength-Z)=>{if(!(0,j$.isArrayBuffer)($))throw TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof $} (${$})`);return j0.Buffer.from($,Z,Y)},"fromArrayBuffer"),I$=B1(($,Z)=>{if(typeof $!=="string")throw TypeError(`The "input" argument must be of type string. Received type ${typeof $} (${$})`);return Z?j0.Buffer.from($,Z):j0.Buffer.from($)},"fromString")});var D1=I((H1)=>{Object.defineProperty(H1,"__esModule",{value:!0});H1.fromBase64=void 0;var A$=n(),M$=/^[A-Za-z0-9+/]*={0,2}$/,T$=($)=>{if($.length*3%4!==0)throw TypeError("Incorrect padding on base64 string.");if(!M$.exec($))throw TypeError("Invalid base64 string.");let Z=(0,A$.fromString)($,"base64");return new Uint8Array(Z.buffer,Z.byteOffset,Z.byteLength)};H1.fromBase64=T$});var U0=I((UX,I1)=>{var{defineProperty:G0,getOwnPropertyDescriptor:C$,getOwnPropertyNames:O$}=Object,P$=Object.prototype.hasOwnProperty,R0=($,Z)=>G0($,"name",{value:Z,configurable:!0}),h$=($,Z)=>{for(var Y in Z)G0($,Y,{get:Z[Y],enumerable:!0})},E$=($,Z,Y,X)=>{if(Z&&typeof Z==="object"||typeof Z==="function"){for(let Q of O$(Z))if(!P$.call($,Q)&&Q!==Y)G0($,Q,{get:()=>Z[Q],enumerable:!(X=C$(Z,Q))||X.enumerable})}return $},S$=($)=>E$(G0({},"__esModule",{value:!0}),$),N1={};h$(N1,{fromUtf8:()=>R1,toUint8Array:()=>k$,toUtf8:()=>x$});I1.exports=S$(N1);var j1=n(),R1=R0(($)=>{let Z=(0,j1.fromString)($,"utf8");return new Uint8Array(Z.buffer,Z.byteOffset,Z.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),k$=R0(($)=>{if(typeof $==="string")return R1($);if(ArrayBuffer.isView($))return new Uint8Array($.buffer,$.byteOffset,$.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array($)},"toUint8Array"),x$=R0(($)=>{if(typeof $==="string")return $;if(typeof $!=="object"||typeof $.byteOffset!=="number"||typeof $.byteLength!=="number")throw Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return(0,j1.fromArrayBuffer)($.buffer,$.byteOffset,$.byteLength).toString("utf8")},"toUtf8")});var T1=I((A1)=>{Object.defineProperty(A1,"__esModule",{value:!0});A1.toBase64=void 0;var b$=n(),q$=U0(),f$=($)=>{let Z;if(typeof $==="string")Z=(0,q$.fromUtf8)($);else Z=$;if(typeof Z!=="object"||typeof Z.byteOffset!=="number"||typeof Z.byteLength!=="number")throw Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return(0,b$.fromArrayBuffer)(Z.buffer,Z.byteOffset,Z.byteLength).toString("base64")};A1.toBase64=f$});var u=I((KX,V0)=>{var{defineProperty:C1,getOwnPropertyDescriptor:y$,getOwnPropertyNames:g$}=Object,v$=Object.prototype.hasOwnProperty,I0=($,Z,Y,X)=>{if(Z&&typeof Z==="object"||typeof Z==="function"){for(let Q of g$(Z))if(!v$.call($,Q)&&Q!==Y)C1($,Q,{get:()=>Z[Q],enumerable:!(X=y$(Z,Q))||X.enumerable})}return $},O1=($,Z,Y)=>(I0($,Z,"default"),Y&&I0(Y,Z,"default")),c$=($)=>I0(C1({},"__esModule",{value:!0}),$),A0={};V0.exports=c$(A0);O1(A0,D1(),V0.exports);O1(A0,T1(),V0.exports)});var M0=I((h1)=>{Object.defineProperty(h1,"__esModule",{value:!0});h1.ChecksumStream=void 0;var _$=u(),d$=E("stream");class P1 extends d$.Duplex{constructor({expectedChecksum:$,checksum:Z,source:Y,checksumSourceLocation:X,base64Encoder:Q}){var U,G;super();if(typeof Y.pipe==="function")this.source=Y;else throw Error(`@smithy/util-stream: unsupported source type ${(G=(U=Y===null||Y===void 0?void 0:Y.constructor)===null||U===void 0?void 0:U.name)!==null&&G!==void 0?G:Y} in ChecksumStream.`);this.base64Encoder=Q!==null&&Q!==void 0?Q:_$.toBase64,this.expectedChecksum=$,this.checksum=Z,this.checksumSourceLocation=X,this.source.pipe(this)}_read($){}_write($,Z,Y){try{this.checksum.update($),this.push($)}catch(X){return Y(X)}return Y()}async _final($){try{let Z=await this.checksum.digest(),Y=this.base64Encoder(Z);if(this.expectedChecksum!==Y)return $(Error(`Checksum mismatch: expected "${this.expectedChecksum}" but received "${Y}" in response header "${this.checksumSourceLocation}".`))}catch(Z){return $(Z)}return this.push(null),$()}}h1.ChecksumStream=P1});var v=I((S1)=>{Object.defineProperty(S1,"__esModule",{value:!0});S1.isBlob=S1.isReadableStream=void 0;var p$=($)=>{var Z;return typeof ReadableStream==="function"&&(((Z=$===null||$===void 0?void 0:$.constructor)===null||Z===void 0?void 0:Z.name)===ReadableStream.name||$ instanceof ReadableStream)};S1.isReadableStream=p$;var u$=($)=>{var Z;return typeof Blob==="function"&&(((Z=$===null||$===void 0?void 0:$.constructor)===null||Z===void 0?void 0:Z.name)===Blob.name||$ instanceof Blob)};S1.isBlob=u$});var f1=I((b1)=>{Object.defineProperty(b1,"__esModule",{value:!0});b1.ChecksumStream=void 0;var m$=typeof ReadableStream==="function"?ReadableStream:function(){};class x1 extends m${}b1.ChecksumStream=x1});var v1=I((y1)=>{Object.defineProperty(y1,"__esModule",{value:!0});y1.createChecksumStream=void 0;var i$=u(),s$=v(),n$=f1(),a$=({expectedChecksum:$,checksum:Z,source:Y,checksumSourceLocation:X,base64Encoder:Q})=>{var U,G;if(!(0,s$.isReadableStream)(Y))throw Error(`@smithy/util-stream: unsupported source type ${(G=(U=Y===null||Y===void 0?void 0:Y.constructor)===null||U===void 0?void 0:U.name)!==null&&G!==void 0?G:Y} in ChecksumStream.`);let V=Q!==null&&Q!==void 0?Q:i$.toBase64;if(typeof TransformStream!=="function")throw Error("@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream.");let K=new TransformStream({start(){},async transform(H,z){Z.update(H),z.enqueue(H)},async flush(H){let z=await Z.digest(),B=V(z);if($!==B){let W=Error(`Checksum mismatch: expected "${$}" but received "${B}" in response header "${X}".`);H.error(W)}else H.terminate()}});Y.pipeThrough(K);let J=K.readable;return Object.setPrototypeOf(J,n$.ChecksumStream.prototype),J};y1.createChecksumStream=a$});var d1=I((c1)=>{Object.defineProperty(c1,"__esModule",{value:!0});c1.createChecksumStream=void 0;var r$=v(),o$=M0(),t$=v1();function e$($){if(typeof ReadableStream==="function"&&(0,r$.isReadableStream)($.source))return(0,t$.createChecksumStream)($);return new o$.ChecksumStream($)}c1.createChecksumStream=e$});var T0=I((u1)=>{Object.defineProperty(u1,"__esModule",{value:!0});u1.ByteArrayCollector=void 0;class p1{constructor($){this.allocByteArray=$,this.byteLength=0,this.byteArrays=[]}push($){this.byteArrays.push($),this.byteLength+=$.byteLength}flush(){if(this.byteArrays.length===1){let Y=this.byteArrays[0];return this.reset(),Y}let $=this.allocByteArray(this.byteLength),Z=0;for(let Y=0;Y<this.byteArrays.length;++Y){let X=this.byteArrays[Y];$.set(X,Z),Z+=X.byteLength}return this.reset(),$}reset(){this.byteArrays=[],this.byteLength=0}}u1.ByteArrayCollector=p1});var r1=I((n1)=>{Object.defineProperty(n1,"__esModule",{value:!0});n1.modeOf=n1.sizeOf=n1.flush=n1.merge=n1.createBufferedReadable=n1.createBufferedReadableStream=void 0;var $8=T0();function m1($,Z,Y){let X=$.getReader(),Q=!1,U=0,G=["",new $8.ByteArrayCollector((J)=>new Uint8Array(J))],V=-1,K=async(J)=>{let{value:H,done:z}=await X.read(),B=H;if(z){if(V!==-1){let W=K0(G,V);if(l(W)>0)J.enqueue(W)}J.close()}else{let W=s1(B,!1);if(V!==W){if(V>=0)J.enqueue(K0(G,V));V=W}if(V===-1){J.enqueue(B);return}let N=l(B);U+=N;let A=l(G[V]);if(N>=Z&&A===0)J.enqueue(B);else{let D=i1(G,V,B);if(!Q&&U>Z*2)Q=!0,Y===null||Y===void 0||Y.warn(`@smithy/util-stream - stream chunk size ${N} is below threshold of ${Z}, automatically buffering.`);if(D>=Z)J.enqueue(K0(G,V));else await K(J)}}};return new ReadableStream({pull:K})}n1.createBufferedReadableStream=m1;n1.createBufferedReadable=m1;function i1($,Z,Y){switch(Z){case 0:return $[0]+=Y,l($[0]);case 1:case 2:return $[Z].push(Y),l($[Z])}}n1.merge=i1;function K0($,Z){switch(Z){case 0:let Y=$[0];return $[0]="",Y;case 1:case 2:return $[Z].flush()}throw Error(`@smithy/util-stream - invalid index ${Z} given to flush()`)}n1.flush=K0;function l($){var Z,Y;return(Y=(Z=$===null||$===void 0?void 0:$.byteLength)!==null&&Z!==void 0?Z:$===null||$===void 0?void 0:$.length)!==null&&Y!==void 0?Y:0}n1.sizeOf=l;function s1($,Z=!0){if(Z&&typeof Buffer<"u"&&$ instanceof Buffer)return 2;if($ instanceof Uint8Array)return 1;if(typeof $==="string")return 0;return-1}n1.modeOf=s1});var $6=I((t1)=>{Object.defineProperty(t1,"__esModule",{value:!0});t1.createBufferedReadable=void 0;var U8=E("stream"),o1=T0(),f=r1(),V8=v();function K8($,Z,Y){if((0,V8.isReadableStream)($))return(0,f.createBufferedReadableStream)($,Z,Y);let X=new U8.Readable({read(){}}),Q=!1,U=0,G=["",new o1.ByteArrayCollector((K)=>new Uint8Array(K)),new o1.ByteArrayCollector((K)=>Buffer.from(new Uint8Array(K)))],V=-1;return $.on("data",(K)=>{let J=(0,f.modeOf)(K,!0);if(V!==J){if(V>=0)X.push((0,f.flush)(G,V));V=J}if(V===-1){X.push(K);return}let H=(0,f.sizeOf)(K);U+=H;let z=(0,f.sizeOf)(G[V]);if(H>=Z&&z===0)X.push(K);else{let B=(0,f.merge)(G,V,K);if(!Q&&U>Z*2)Q=!0,Y===null||Y===void 0||Y.warn(`@smithy/util-stream - stream chunk size ${H} is below threshold of ${Z}, automatically buffering.`);if(B>=Z)X.push((0,f.flush)(G,V))}}),$.on("end",()=>{if(V!==-1){let K=(0,f.flush)(G,V);if((0,f.sizeOf)(K)>0)X.push(K)}X.push(null)}),X}t1.createBufferedReadable=K8});var X6=I((Z6)=>{Object.defineProperty(Z6,"__esModule",{value:!0});Z6.getAwsChunkedEncodingStream=void 0;var L8=E("stream"),z8=($,Z)=>{let{base64Encoder:Y,bodyLengthChecker:X,checksumAlgorithmFn:Q,checksumLocationName:U,streamHasher:G}=Z,V=Y!==void 0&&Q!==void 0&&U!==void 0&&G!==void 0,K=V?G(Q,$):void 0,J=new L8.Readable({read:()=>{}});return $.on("data",(H)=>{let z=X(H)||0;J.push(`${z.toString(16)}\r
3
+ `),J.push(H),J.push(`\r
4
+ `)}),$.on("end",async()=>{if(J.push(`0\r
5
+ `),V){let H=Y(await K);J.push(`${U}:${H}\r
6
+ `),J.push(`\r
7
+ `)}J.push(null)}),J};Z6.getAwsChunkedEncodingStream=z8});var U6=I((Q6)=>{Object.defineProperty(Q6,"__esModule",{value:!0});Q6.headStream=void 0;async function J8($,Z){var Y;let X=0,Q=[],U=$.getReader(),G=!1;while(!G){let{done:J,value:H}=await U.read();if(H)Q.push(H),X+=(Y=H===null||H===void 0?void 0:H.byteLength)!==null&&Y!==void 0?Y:0;if(X>=Z)break;G=J}U.releaseLock();let V=new Uint8Array(Math.min(Z,X)),K=0;for(let J of Q){if(J.byteLength>V.byteLength-K){V.set(J.subarray(0,V.byteLength-K),K);break}else V.set(J,K);K+=J.length}return V}Q6.headStream=J8});var z6=I((K6)=>{Object.defineProperty(K6,"__esModule",{value:!0});K6.headStream=void 0;var B8=E("stream"),W8=U6(),F8=v(),H8=($,Z)=>{if((0,F8.isReadableStream)($))return(0,W8.headStream)($,Z);return new Promise((Y,X)=>{let Q=new V6;Q.limit=Z,$.pipe(Q),$.on("error",(U)=>{Q.end(),X(U)}),Q.on("error",X),Q.on("finish",function(){let U=new Uint8Array(Buffer.concat(this.buffers));Y(U)})})};K6.headStream=H8;class V6 extends B8.Writable{constructor(){super(...arguments);this.buffers=[],this.limit=1/0,this.bytesBuffered=0}_write($,Z,Y){var X;if(this.buffers.push($),this.bytesBuffered+=(X=$.byteLength)!==null&&X!==void 0?X:0,this.bytesBuffered>=this.limit){let Q=this.bytesBuffered-this.limit,U=this.buffers[this.buffers.length-1];this.buffers[this.buffers.length-1]=U.subarray(0,U.byteLength-Q),this.emit("finish")}Y()}}});var F6=I((RX,W6)=>{var{defineProperty:L0,getOwnPropertyDescriptor:w8,getOwnPropertyNames:D8}=Object,N8=Object.prototype.hasOwnProperty,C0=($,Z)=>L0($,"name",{value:Z,configurable:!0}),j8=($,Z)=>{for(var Y in Z)L0($,Y,{get:Z[Y],enumerable:!0})},R8=($,Z,Y,X)=>{if(Z&&typeof Z==="object"||typeof Z==="function"){for(let Q of D8(Z))if(!N8.call($,Q)&&Q!==Y)L0($,Q,{get:()=>Z[Q],enumerable:!(X=w8(Z,Q))||X.enumerable})}return $},I8=($)=>R8(L0({},"__esModule",{value:!0}),$),J6={};j8(J6,{escapeUri:()=>B6,escapeUriPath:()=>M8});W6.exports=I8(J6);var B6=C0(($)=>encodeURIComponent($).replace(/[!'()*]/g,A8),"escapeUri"),A8=C0(($)=>`%${$.charCodeAt(0).toString(16).toUpperCase()}`,"hexEncode"),M8=C0(($)=>$.split("/").map(B6).join("/"),"escapeUriPath")});var P0=I((IX,D6)=>{var{defineProperty:z0,getOwnPropertyDescriptor:T8,getOwnPropertyNames:C8}=Object,O8=Object.prototype.hasOwnProperty,P8=($,Z)=>z0($,"name",{value:Z,configurable:!0}),h8=($,Z)=>{for(var Y in Z)z0($,Y,{get:Z[Y],enumerable:!0})},E8=($,Z,Y,X)=>{if(Z&&typeof Z==="object"||typeof Z==="function"){for(let Q of C8(Z))if(!O8.call($,Q)&&Q!==Y)z0($,Q,{get:()=>Z[Q],enumerable:!(X=T8(Z,Q))||X.enumerable})}return $},S8=($)=>E8(z0({},"__esModule",{value:!0}),$),H6={};h8(H6,{buildQueryString:()=>w6});D6.exports=S8(H6);var O0=F6();function w6($){let Z=[];for(let Y of Object.keys($).sort()){let X=$[Y];if(Y=(0,O0.escapeUri)(Y),Array.isArray(X))for(let Q=0,U=X.length;Q<U;Q++)Z.push(`${Y}=${(0,O0.escapeUri)(X[Q])}`);else{let Q=Y;if(X||typeof X==="string")Q+=`=${(0,O0.escapeUri)(X)}`;Z.push(Q)}}return Z.join("&")}P8(w6,"buildQueryString")});var x6=I((AX,k6)=>{var{create:k8,defineProperty:a,getOwnPropertyDescriptor:x8,getOwnPropertyNames:b8,getPrototypeOf:q8}=Object,f8=Object.prototype.hasOwnProperty,M=($,Z)=>a($,"name",{value:Z,configurable:!0}),y8=($,Z)=>{for(var Y in Z)a($,Y,{get:Z[Y],enumerable:!0})},A6=($,Z,Y,X)=>{if(Z&&typeof Z==="object"||typeof Z==="function"){for(let Q of b8(Z))if(!f8.call($,Q)&&Q!==Y)a($,Q,{get:()=>Z[Q],enumerable:!(X=x8(Z,Q))||X.enumerable})}return $},g8=($,Z,Y)=>(Y=$!=null?k8(q8($)):{},A6(Z||!$||!$.__esModule?a(Y,"default",{value:$,enumerable:!0}):Y,$)),v8=($)=>A6(a({},"__esModule",{value:!0}),$),M6={};y8(M6,{DEFAULT_REQUEST_TIMEOUT:()=>E6,NodeHttp2Handler:()=>n8,NodeHttpHandler:()=>l8,streamCollector:()=>r8});k6.exports=v8(M6);var T6=Z0(),C6=P0(),h0=E("http"),E0=E("https"),c8=["ECONNRESET","EPIPE","ETIMEDOUT"],O6=M(($)=>{let Z={};for(let Y of Object.keys($)){let X=$[Y];Z[Y]=Array.isArray(X)?X.join(","):X}return Z},"getTransformedHeaders"),C={setTimeout:($,Z)=>setTimeout($,Z),clearTimeout:($)=>clearTimeout($)},N6=1000,_8=M(($,Z,Y=0)=>{if(!Y)return-1;let X=M((Q)=>{let U=C.setTimeout(()=>{$.destroy(),Z(Object.assign(Error(`Socket timed out without establishing a connection within ${Y} ms`),{name:"TimeoutError"}))},Y-Q),G=M((V)=>{if(V?.connecting)V.on("connect",()=>{C.clearTimeout(U)});else C.clearTimeout(U)},"doWithSocket");if($.socket)G($.socket);else $.on("socket",G)},"registerTimeout");if(Y<2000)return X(0),0;return C.setTimeout(X.bind(null,N6),N6)},"setConnectionTimeout"),d8=3000,p8=M(($,{keepAlive:Z,keepAliveMsecs:Y},X=d8)=>{if(Z!==!0)return-1;let Q=M(()=>{if($.socket)$.socket.setKeepAlive(Z,Y||0);else $.on("socket",(U)=>{U.setKeepAlive(Z,Y||0)})},"registerListener");if(X===0)return Q(),0;return C.setTimeout(Q,X)},"setSocketKeepAlive"),j6=3000,u8=M(($,Z,Y=E6)=>{let X=M((Q)=>{let U=Y-Q,G=M(()=>{$.destroy(),Z(Object.assign(Error(`Connection timed out after ${Y} ms`),{name:"TimeoutError"}))},"onTimeout");if($.socket)$.socket.setTimeout(U,G),$.on("close",()=>$.socket?.removeListener("timeout",G));else $.setTimeout(U,G)},"registerTimeout");if(0<Y&&Y<6000)return X(0),0;return C.setTimeout(X.bind(null,Y===0?0:j6),j6)},"setSocketTimeout"),P6=E("stream"),R6=6000;async function S0($,Z,Y=R6){let X=Z.headers??{},Q=X.Expect||X.expect,U=-1,G=!0;if(Q==="100-continue")G=await Promise.race([new Promise((V)=>{U=Number(C.setTimeout(()=>V(!0),Math.max(R6,Y)))}),new Promise((V)=>{$.on("continue",()=>{C.clearTimeout(U),V(!0)}),$.on("response",()=>{C.clearTimeout(U),V(!1)}),$.on("error",()=>{C.clearTimeout(U),V(!1)})})]);if(G)h6($,Z.body)}M(S0,"writeRequestBody");function h6($,Z){if(Z instanceof P6.Readable){Z.pipe($);return}if(Z){if(Buffer.isBuffer(Z)||typeof Z==="string"){$.end(Z);return}let Y=Z;if(typeof Y==="object"&&Y.buffer&&typeof Y.byteOffset==="number"&&typeof Y.byteLength==="number"){$.end(Buffer.from(Y.buffer,Y.byteOffset,Y.byteLength));return}$.end(Buffer.from(Z));return}$.end()}M(h6,"writeBody");var E6=0,l8=class ${constructor(Z){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((Y,X)=>{if(typeof Z==="function")Z().then((Q)=>{Y(this.resolveDefaultConfig(Q))}).catch(X);else Y(this.resolveDefaultConfig(Z))})}static{M(this,"NodeHttpHandler")}static create(Z){if(typeof Z?.handle==="function")return Z;return new $(Z)}static checkSocketUsage(Z,Y,X=console){let{sockets:Q,requests:U,maxSockets:G}=Z;if(typeof G!=="number"||G===1/0)return Y;let V=15000;if(Date.now()-V<Y)return Y;if(Q&&U)for(let K in Q){let J=Q[K]?.length??0,H=U[K]?.length??0;if(J>=G&&H>=2*G)return X?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${J} and ${H} additional requests are enqueued.
8
+ See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
9
+ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return Y}resolveDefaultConfig(Z){let{requestTimeout:Y,connectionTimeout:X,socketTimeout:Q,socketAcquisitionWarningTimeout:U,httpAgent:G,httpsAgent:V}=Z||{},K=!0,J=50;return{connectionTimeout:X,requestTimeout:Y??Q,socketAcquisitionWarningTimeout:U,httpAgent:(()=>{if(G instanceof h0.Agent||typeof G?.destroy==="function")return G;return new h0.Agent({keepAlive:!0,maxSockets:50,...G})})(),httpsAgent:(()=>{if(V instanceof E0.Agent||typeof V?.destroy==="function")return V;return new E0.Agent({keepAlive:!0,maxSockets:50,...V})})(),logger:console}}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(Z,{abortSignal:Y}={}){if(!this.config)this.config=await this.configProvider;return new Promise((X,Q)=>{let U=void 0,G=[],V=M(async(w)=>{await U,G.forEach(C.clearTimeout),X(w)},"resolve"),K=M(async(w)=>{await U,G.forEach(C.clearTimeout),Q(w)},"reject");if(!this.config)throw Error("Node HTTP request handler config is not resolved");if(Y?.aborted){let w=Error("Request aborted");w.name="AbortError",K(w);return}let J=Z.protocol==="https:",H=J?this.config.httpsAgent:this.config.httpAgent;G.push(C.setTimeout(()=>{this.socketWarningTimestamp=$.checkSocketUsage(H,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000)));let z=(0,C6.buildQueryString)(Z.query||{}),B=void 0;if(Z.username!=null||Z.password!=null){let w=Z.username??"",j=Z.password??"";B=`${w}:${j}`}let W=Z.path;if(z)W+=`?${z}`;if(Z.fragment)W+=`#${Z.fragment}`;let N=Z.hostname??"";if(N[0]==="["&&N.endsWith("]"))N=Z.hostname.slice(1,-1);else N=Z.hostname;let A={headers:Z.headers,host:N,method:Z.method,path:W,port:Z.port,agent:H,auth:B},F=(J?E0.request:h0.request)(A,(w)=>{let j=new T6.HttpResponse({statusCode:w.statusCode||-1,reason:w.statusMessage,headers:O6(w.headers),body:w});V({response:j})});if(F.on("error",(w)=>{if(c8.includes(w.code))K(Object.assign(w,{name:"TimeoutError"}));else K(w)}),Y){let w=M(()=>{F.destroy();let j=Error("Request aborted");j.name="AbortError",K(j)},"onAbort");if(typeof Y.addEventListener==="function"){let j=Y;j.addEventListener("abort",w,{once:!0}),F.once("close",()=>j.removeEventListener("abort",w))}else Y.onabort=w}G.push(_8(F,K,this.config.connectionTimeout)),G.push(u8(F,K,this.config.requestTimeout));let R=A.agent;if(typeof R==="object"&&"keepAlive"in R)G.push(p8(F,{keepAlive:R.keepAlive,keepAliveMsecs:R.keepAliveMsecs}));U=S0(F,Z,this.config.requestTimeout).catch((w)=>{return G.forEach(C.clearTimeout),Q(w)})})}updateHttpClientConfig(Z,Y){this.config=void 0,this.configProvider=this.configProvider.then((X)=>{return{...X,[Z]:Y}})}httpHandlerConfigs(){return this.config??{}}},I6=E("http2"),m8=g8(E("http2")),i8=class{constructor($){this.sessions=[],this.sessions=$??[]}static{M(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((Z)=>Z!==$)}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}destroy($){for(let Z of this.sessions)if(Z===$){if(!Z.destroyed)Z.destroy()}}},s8=class{constructor($){if(this.sessionCache=new Map,this.config=$,this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw RangeError("maxConcurrency must be greater than zero.")}static{M(this,"NodeHttp2ConnectionManager")}lease($,Z){let Y=this.getUrlString($),X=this.sessionCache.get(Y);if(X){let V=X.poll();if(V&&!this.config.disableConcurrency)return V}let Q=m8.default.connect(Y);if(this.config.maxConcurrency)Q.settings({maxConcurrentStreams:this.config.maxConcurrency},(V)=>{if(V)throw Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+$.destination.toString())});Q.unref();let U=M(()=>{Q.destroy(),this.deleteSession(Y,Q)},"destroySessionCb");if(Q.on("goaway",U),Q.on("error",U),Q.on("frameError",U),Q.on("close",()=>this.deleteSession(Y,Q)),Z.requestTimeout)Q.setTimeout(Z.requestTimeout,U);let G=this.sessionCache.get(Y)||new i8;return G.offerLast(Q),this.sessionCache.set(Y,G),Q}deleteSession($,Z){let Y=this.sessionCache.get($);if(!Y)return;if(!Y.contains(Z))return;Y.remove(Z),this.sessionCache.set($,Y)}release($,Z){let Y=this.getUrlString($);this.sessionCache.get(Y)?.offerLast(Z)}destroy(){for(let[$,Z]of this.sessionCache){for(let Y of Z){if(!Y.destroyed)Y.destroy();Z.remove(Y)}this.sessionCache.delete($)}}setMaxConcurrentStreams($){if($&&$<=0)throw RangeError("maxConcurrentStreams must be greater than zero.");this.config.maxConcurrency=$}setDisableConcurrentStreams($){this.config.disableConcurrency=$}getUrlString($){return $.destination.toString()}},n8=class ${constructor(Z){this.metadata={handlerProtocol:"h2"},this.connectionManager=new s8({}),this.configProvider=new Promise((Y,X)=>{if(typeof Z==="function")Z().then((Q)=>{Y(Q||{})}).catch(X);else Y(Z||{})})}static{M(this,"NodeHttp2Handler")}static create(Z){if(typeof Z?.handle==="function")return Z;return new $(Z)}destroy(){this.connectionManager.destroy()}async handle(Z,{abortSignal:Y}={}){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:X,disableConcurrentStreams:Q}=this.config;return new Promise((U,G)=>{let V=!1,K=void 0,J=M(async(T)=>{await K,U(T)},"resolve"),H=M(async(T)=>{await K,G(T)},"reject");if(Y?.aborted){V=!0;let T=Error("Request aborted");T.name="AbortError",H(T);return}let{hostname:z,method:B,port:W,protocol:N,query:A}=Z,D="";if(Z.username!=null||Z.password!=null){let T=Z.username??"",S=Z.password??"";D=`${T}:${S}@`}let F=`${N}//${D}${z}${W?`:${W}`:""}`,R={destination:new URL(F)},w=this.connectionManager.lease(R,{requestTimeout:this.config?.sessionTimeout,disableConcurrentStreams:Q||!1}),j=M((T)=>{if(Q)this.destroySession(w);V=!0,H(T)},"rejectWithDestroy"),O=(0,C6.buildQueryString)(A||{}),_=Z.path;if(O)_+=`?${O}`;if(Z.fragment)_+=`#${Z.fragment}`;let P=w.request({...Z.headers,[I6.constants.HTTP2_HEADER_PATH]:_,[I6.constants.HTTP2_HEADER_METHOD]:B});if(w.ref(),P.on("response",(T)=>{let S=new T6.HttpResponse({statusCode:T[":status"]||-1,headers:O6(T),body:P});if(V=!0,J({response:S}),Q)w.close(),this.connectionManager.deleteSession(F,w)}),X)P.setTimeout(X,()=>{P.close();let T=Error(`Stream timed out because of no activity for ${X} ms`);T.name="TimeoutError",j(T)});if(Y){let T=M(()=>{P.close();let S=Error("Request aborted");S.name="AbortError",j(S)},"onAbort");if(typeof Y.addEventListener==="function"){let S=Y;S.addEventListener("abort",T,{once:!0}),P.once("close",()=>S.removeEventListener("abort",T))}else Y.onabort=T}P.on("frameError",(T,S,_4)=>{j(Error(`Frame type id ${T} in stream id ${_4} has failed with code ${S}.`))}),P.on("error",j),P.on("aborted",()=>{j(Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${P.rstCode}.`))}),P.on("close",()=>{if(w.unref(),Q)w.destroy();if(!V)j(Error("Unexpected error: http2 request did not get a response"))}),K=S0(P,Z,X)})}updateHttpClientConfig(Z,Y){this.config=void 0,this.configProvider=this.configProvider.then((X)=>{return{...X,[Z]:Y}})}httpHandlerConfigs(){return this.config??{}}destroySession(Z){if(!Z.destroyed)Z.destroy()}},a8=class extends P6.Writable{constructor(){super(...arguments);this.bufferedBytes=[]}static{M(this,"Collector")}_write($,Z,Y){this.bufferedBytes.push($),Y()}},r8=M(($)=>{if(o8($))return S6($);return new Promise((Z,Y)=>{let X=new a8;$.pipe(X),$.on("error",(Q)=>{X.end(),Y(Q)}),X.on("error",Y),X.on("finish",function(){let Q=new Uint8Array(Buffer.concat(this.bufferedBytes));Z(Q)})})},"streamCollector"),o8=M(($)=>typeof ReadableStream==="function"&&$ instanceof ReadableStream,"isReadableStreamInstance");async function S6($){let Z=[],Y=$.getReader(),X=!1,Q=0;while(!X){let{done:V,value:K}=await Y.read();if(K)Z.push(K),Q+=K.length;X=V}let U=new Uint8Array(Q),G=0;for(let V of Z)U.set(V,G),G+=V.length;return U}M(S6,"collectReadableStream")});var _6=I((OX,c6)=>{var{defineProperty:B0,getOwnPropertyDescriptor:t8,getOwnPropertyNames:e8}=Object,$Z=Object.prototype.hasOwnProperty,k=($,Z)=>B0($,"name",{value:Z,configurable:!0}),ZZ=($,Z)=>{for(var Y in Z)B0($,Y,{get:Z[Y],enumerable:!0})},YZ=($,Z,Y,X)=>{if(Z&&typeof Z==="object"||typeof Z==="function"){for(let Q of e8(Z))if(!$Z.call($,Q)&&Q!==Y)B0($,Q,{get:()=>Z[Q],enumerable:!(X=t8(Z,Q))||X.enumerable})}return $},XZ=($)=>YZ(B0({},"__esModule",{value:!0}),$),q6={};ZZ(q6,{FetchHttpHandler:()=>GZ,keepAliveSupport:()=>J0,streamCollector:()=>VZ});c6.exports=XZ(q6);var b6=Z0(),QZ=P0();function k0($,Z){return new Request($,Z)}k(k0,"createRequest");function f6($=0){return new Promise((Z,Y)=>{if($)setTimeout(()=>{let X=Error(`Request did not complete within ${$} ms`);X.name="TimeoutError",Y(X)},$)})}k(f6,"requestTimeout");var J0={supported:void 0},GZ=class ${static{k(this,"FetchHttpHandler")}static create(Z){if(typeof Z?.handle==="function")return Z;return new $(Z)}constructor(Z){if(typeof Z==="function")this.configProvider=Z().then((Y)=>Y||{});else this.config=Z??{},this.configProvider=Promise.resolve(this.config);if(J0.supported===void 0)J0.supported=Boolean(typeof Request<"u"&&"keepalive"in k0("https://[::1]"))}destroy(){}async handle(Z,{abortSignal:Y}={}){if(!this.config)this.config=await this.configProvider;let X=this.config.requestTimeout,Q=this.config.keepAlive===!0,U=this.config.credentials;if(Y?.aborted){let F=Error("Request aborted");return F.name="AbortError",Promise.reject(F)}let G=Z.path,V=(0,QZ.buildQueryString)(Z.query||{});if(V)G+=`?${V}`;if(Z.fragment)G+=`#${Z.fragment}`;let K="";if(Z.username!=null||Z.password!=null){let F=Z.username??"",R=Z.password??"";K=`${F}:${R}@`}let{port:J,method:H}=Z,z=`${Z.protocol}//${K}${Z.hostname}${J?`:${J}`:""}${G}`,B=H==="GET"||H==="HEAD"?void 0:Z.body,W={body:B,headers:new Headers(Z.headers),method:H,credentials:U};if(this.config?.cache)W.cache=this.config.cache;if(B)W.duplex="half";if(typeof AbortController<"u")W.signal=Y;if(J0.supported)W.keepalive=Q;if(typeof this.config.requestInit==="function")Object.assign(W,this.config.requestInit(Z));let N=k(()=>{},"removeSignalEventListener"),A=k0(z,W),D=[fetch(A).then((F)=>{let R=F.headers,w={};for(let O of R.entries())w[O[0]]=O[1];if(F.body==null)return F.blob().then((O)=>({response:new b6.HttpResponse({headers:w,reason:F.statusText,statusCode:F.status,body:O})}));return{response:new b6.HttpResponse({headers:w,reason:F.statusText,statusCode:F.status,body:F.body})}}),f6(X)];if(Y)D.push(new Promise((F,R)=>{let w=k(()=>{let j=Error("Request aborted");j.name="AbortError",R(j)},"onAbort");if(typeof Y.addEventListener==="function"){let j=Y;j.addEventListener("abort",w,{once:!0}),N=k(()=>j.removeEventListener("abort",w),"removeSignalEventListener")}else Y.onabort=w}));return Promise.race(D).finally(N)}updateHttpClientConfig(Z,Y){this.config=void 0,this.configProvider=this.configProvider.then((X)=>{return X[Z]=Y,X})}httpHandlerConfigs(){return this.config??{}}},UZ=u(),VZ=k(async($)=>{if(typeof Blob==="function"&&$ instanceof Blob||$.constructor?.name==="Blob"){if(Blob.prototype.arrayBuffer!==void 0)return new Uint8Array(await $.arrayBuffer());return y6($)}return g6($)},"streamCollector");async function y6($){let Z=await v6($),Y=(0,UZ.fromBase64)(Z);return new Uint8Array(Y)}k(y6,"collectBlob");async function g6($){let Z=[],Y=$.getReader(),X=!1,Q=0;while(!X){let{done:V,value:K}=await Y.read();if(K)Z.push(K),Q+=K.length;X=V}let U=new Uint8Array(Q),G=0;for(let V of Z)U.set(V,G),G+=V.length;return U}k(g6,"collectStream");function v6($){return new Promise((Z,Y)=>{let X=new FileReader;X.onloadend=()=>{if(X.readyState!==2)return Y(Error("Reader aborted too early"));let Q=X.result??"",U=Q.indexOf(","),G=U>-1?U+1:Q.length;Z(Q.substring(G))},X.onabort=()=>Y(Error("Read aborted")),X.onerror=()=>Y(X.error),X.readAsDataURL($)})}k(v6,"readToBase64")});var s6=I((PX,i6)=>{var{defineProperty:W0,getOwnPropertyDescriptor:KZ,getOwnPropertyNames:LZ}=Object,zZ=Object.prototype.hasOwnProperty,d6=($,Z)=>W0($,"name",{value:Z,configurable:!0}),JZ=($,Z)=>{for(var Y in Z)W0($,Y,{get:Z[Y],enumerable:!0})},BZ=($,Z,Y,X)=>{if(Z&&typeof Z==="object"||typeof Z==="function"){for(let Q of LZ(Z))if(!zZ.call($,Q)&&Q!==Y)W0($,Q,{get:()=>Z[Q],enumerable:!(X=KZ(Z,Q))||X.enumerable})}return $},WZ=($)=>BZ(W0({},"__esModule",{value:!0}),$),p6={};JZ(p6,{fromHex:()=>l6,toHex:()=>m6});i6.exports=WZ(p6);var u6={},x0={};for(let $=0;$<256;$++){let Z=$.toString(16).toLowerCase();if(Z.length===1)Z=`0${Z}`;u6[$]=Z,x0[Z]=$}function l6($){if($.length%2!==0)throw Error("Hex encoded strings must have an even number length");let Z=new Uint8Array($.length/2);for(let Y=0;Y<$.length;Y+=2){let X=$.slice(Y,Y+2).toLowerCase();if(X in x0)Z[Y/2]=x0[X];else throw Error(`Cannot decode unrecognized sequence ${X} as hexadecimal`)}return Z}d6(l6,"fromHex");function m6($){let Z="";for(let Y=0;Y<$.byteLength;Y++)Z+=u6[$[Y]];return Z}d6(m6,"toHex")});var e6=I((o6)=>{Object.defineProperty(o6,"__esModule",{value:!0});o6.sdkStreamMixin=void 0;var FZ=_6(),HZ=u(),wZ=s6(),DZ=U0(),n6=v(),a6="The stream has already been transformed.",NZ=($)=>{var Z,Y;if(!r6($)&&!(0,n6.isReadableStream)($)){let G=((Y=(Z=$===null||$===void 0?void 0:$.__proto__)===null||Z===void 0?void 0:Z.constructor)===null||Y===void 0?void 0:Y.name)||$;throw Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${G}`)}let X=!1,Q=async()=>{if(X)throw Error(a6);return X=!0,await(0,FZ.streamCollector)($)},U=(G)=>{if(typeof G.stream!=="function")throw Error(`Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.
10
+ 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 G.stream()};return Object.assign($,{transformToByteArray:Q,transformToString:async(G)=>{let V=await Q();if(G==="base64")return(0,HZ.toBase64)(V);else if(G==="hex")return(0,wZ.toHex)(V);else if(G===void 0||G==="utf8"||G==="utf-8")return(0,DZ.toUtf8)(V);else if(typeof TextDecoder==="function")return new TextDecoder(G).decode(V);else throw Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(X)throw Error(a6);if(X=!0,r6($))return U($);else if((0,n6.isReadableStream)($))return $;else throw Error(`Cannot transform payload to web stream, got ${$}`)}})};o6.sdkStreamMixin=NZ;var r6=($)=>typeof Blob==="function"&&$ instanceof Blob});var X4=I((Z4)=>{Object.defineProperty(Z4,"__esModule",{value:!0});Z4.sdkStreamMixin=void 0;var jZ=x6(),RZ=n(),b0=E("stream"),IZ=e6(),$4="The stream has already been transformed.",AZ=($)=>{var Z,Y;if(!($ instanceof b0.Readable))try{return(0,IZ.sdkStreamMixin)($)}catch(U){let G=((Y=(Z=$===null||$===void 0?void 0:$.__proto__)===null||Z===void 0?void 0:Z.constructor)===null||Y===void 0?void 0:Y.name)||$;throw Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${G}`)}let X=!1,Q=async()=>{if(X)throw Error($4);return X=!0,await(0,jZ.streamCollector)($)};return Object.assign($,{transformToByteArray:Q,transformToString:async(U)=>{let G=await Q();if(U===void 0||Buffer.isEncoding(U))return(0,RZ.fromArrayBuffer)(G.buffer,G.byteOffset,G.byteLength).toString(U);else return new TextDecoder(U).decode(G)},transformToWebStream:()=>{if(X)throw Error($4);if($.readableFlowing!==null)throw Error("The stream has been consumed by other callbacks.");if(typeof b0.Readable.toWeb!=="function")throw Error("Readable.toWeb() is not supported. Please ensure a polyfill is available.");return X=!0,b0.Readable.toWeb($)}})};Z4.sdkStreamMixin=AZ});var U4=I((Q4)=>{Object.defineProperty(Q4,"__esModule",{value:!0});Q4.splitStream=void 0;async function MZ($){if(typeof $.stream==="function")$=$.stream();return $.tee()}Q4.splitStream=MZ});var J4=I((L4)=>{Object.defineProperty(L4,"__esModule",{value:!0});L4.splitStream=void 0;var V4=E("stream"),TZ=U4(),K4=v();async function CZ($){if((0,K4.isReadableStream)($)||(0,K4.isBlob)($))return(0,TZ.splitStream)($);let Z=new V4.PassThrough,Y=new V4.PassThrough;return $.pipe(Z),$.pipe(Y),[Z,Y]}L4.splitStream=CZ});var w4=I((xX,b)=>{var{defineProperty:F0,getOwnPropertyDescriptor:OZ,getOwnPropertyNames:PZ}=Object,hZ=Object.prototype.hasOwnProperty,y0=($,Z)=>F0($,"name",{value:Z,configurable:!0}),EZ=($,Z)=>{for(var Y in Z)F0($,Y,{get:Z[Y],enumerable:!0})},q0=($,Z,Y,X)=>{if(Z&&typeof Z==="object"||typeof Z==="function"){for(let Q of PZ(Z))if(!hZ.call($,Q)&&Q!==Y)F0($,Q,{get:()=>Z[Q],enumerable:!(X=OZ(Z,Q))||X.enumerable})}return $},c=($,Z,Y)=>(q0($,Z,"default"),Y&&q0(Y,Z,"default")),SZ=($)=>q0(F0({},"__esModule",{value:!0}),$),x={};EZ(x,{Uint8ArrayBlobAdapter:()=>f0});b.exports=SZ(x);var B4=u(),W4=U0();function F4($,Z="utf-8"){if(Z==="base64")return(0,B4.toBase64)($);return(0,W4.toUtf8)($)}y0(F4,"transformToString");function H4($,Z){if(Z==="base64")return f0.mutate((0,B4.fromBase64)($));return f0.mutate((0,W4.fromUtf8)($))}y0(H4,"transformFromString");var f0=class $ extends Uint8Array{static{y0(this,"Uint8ArrayBlobAdapter")}static fromString(Z,Y="utf-8"){switch(typeof Z){case"string":return H4(Z,Y);default:throw Error(`Unsupported conversion from ${typeof Z} to Uint8ArrayBlobAdapter.`)}}static mutate(Z){return Object.setPrototypeOf(Z,$.prototype),Z}transformToString(Z="utf-8"){return F4(this,Z)}};c(x,M0(),b.exports);c(x,d1(),b.exports);c(x,$6(),b.exports);c(x,X6(),b.exports);c(x,z6(),b.exports);c(x,X4(),b.exports);c(x,J4(),b.exports);c(x,v(),b.exports)});var I4=I((bX,R4)=>{var{defineProperty:c0,getOwnPropertyDescriptor:kZ,getOwnPropertyNames:xZ}=Object,bZ=Object.prototype.hasOwnProperty,qZ=($,Z)=>{for(var Y in Z)c0($,Y,{get:Z[Y],enumerable:!0})},fZ=($,Z,Y,X)=>{if(Z&&typeof Z==="object"||typeof Z==="function"){for(let Q of xZ(Z))if(!bZ.call($,Q)&&Q!==Y)c0($,Q,{get:()=>Z[Q],enumerable:!(X=kZ(Z,Q))||X.enumerable})}return $},yZ=($)=>fZ(c0({},"__esModule",{value:!0}),$),D4={};qZ(D4,{RequestBuilder:()=>j4,collectBody:()=>gZ,extendedEncodeURIComponent:()=>v0,requestBuilder:()=>cZ,resolvedPath:()=>N4});R4.exports=yZ(D4);var g0=w4(),gZ=async($=new Uint8Array,Z)=>{if($ instanceof Uint8Array)return g0.Uint8ArrayBlobAdapter.mutate($);if(!$)return g0.Uint8ArrayBlobAdapter.mutate(new Uint8Array);let Y=Z.streamCollector($);return g0.Uint8ArrayBlobAdapter.mutate(await Y)};function v0($){return encodeURIComponent($).replace(/[!'()*]/g,function(Z){return"%"+Z.charCodeAt(0).toString(16).toUpperCase()})}var vZ=Z0(),N4=($,Z,Y,X,Q,U)=>{if(Z!=null&&Z[Y]!==void 0){let G=X();if(G.length<=0)throw Error("Empty value provided for input HTTP label: "+Y+".");$=$.replace(Q,U?G.split("/").map((V)=>v0(V)).join("/"):v0(G))}else throw Error("No value provided for input HTTP label: "+Y+".");return $};function cZ($,Z){return new j4($,Z)}var j4=class{constructor($,Z){this.input=$,this.context=Z,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){let{hostname:$,protocol:Z="https",port:Y,path:X}=await this.context.endpoint();this.path=X;for(let Q of this.resolvePathStack)Q(this.path);return new vZ.HttpRequest({protocol:Z,hostname:this.hostname||$,port:Y,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((Z)=>{this.path=`${Z?.endsWith("/")?Z.slice(0,-1):Z||""}`+$}),this}p($,Z,Y,X){return this.resolvePathStack.push((Q)=>{this.path=N4(Q,this.input,$,Z,Y,X)}),this}h($){return this.headers=$,this}q($){return this.query=$,this}b($){return this.body=$,this}m($){return this.method=$,this}}});var oY=I((fX,c4)=>{var{defineProperty:D0,getOwnPropertyDescriptor:_Z,getOwnPropertyNames:dZ}=Object,pZ=Object.prototype.hasOwnProperty,L=($,Z)=>D0($,"name",{value:Z,configurable:!0}),uZ=($,Z)=>{for(var Y in Z)D0($,Y,{get:Z[Y],enumerable:!0})},lZ=($,Z,Y,X)=>{if(Z&&typeof Z==="object"||typeof Z==="function"){for(let Q of dZ(Z))if(!pZ.call($,Q)&&Q!==Y)D0($,Q,{get:()=>Z[Q],enumerable:!(X=_Z(Z,Q))||X.enumerable})}return $},mZ=($)=>lZ(D0({},"__esModule",{value:!0}),$),M4={};uZ(M4,{Client:()=>iZ,Command:()=>C4,LazyJsonString:()=>p,NoOpLogger:()=>pY,SENSITIVE_STRING:()=>nZ,ServiceException:()=>EY,_json:()=>i0,collectBody:()=>_0.collectBody,convertMap:()=>uY,createAggregatedClient:()=>aZ,dateToUtcString:()=>k4,decorateServiceException:()=>x4,emitWarningIfUnsupportedVersion:()=>bY,expectBoolean:()=>oZ,expectByte:()=>m0,expectFloat32:()=>H0,expectInt:()=>eZ,expectInt32:()=>u0,expectLong:()=>t,expectNonNull:()=>ZY,expectNumber:()=>o,expectObject:()=>O4,expectShort:()=>l0,expectString:()=>YY,expectUnion:()=>XY,extendedEncodeURIComponent:()=>_0.extendedEncodeURIComponent,getArrayIfSingleItem:()=>_Y,getDefaultClientConfiguration:()=>vY,getDefaultExtensionConfiguration:()=>q4,getValueFromTextNode:()=>f4,handleFloat:()=>UY,isSerializableHeaderValue:()=>dY,limitedParseDouble:()=>a0,limitedParseFloat:()=>VY,limitedParseFloat32:()=>KY,loadConfigsForDefaultMode:()=>xY,logger:()=>e,map:()=>o0,parseBoolean:()=>rZ,parseEpochTimestamp:()=>RY,parseRfc3339DateTime:()=>WY,parseRfc3339DateTimeWithOffset:()=>HY,parseRfc7231DateTime:()=>jY,quoteHeader:()=>g4,resolveDefaultRuntimeConfig:()=>cY,resolvedPath:()=>_0.resolvedPath,serializeDateTime:()=>aY,serializeFloat:()=>nY,splitEvery:()=>v4,splitHeader:()=>rY,strictParseByte:()=>S4,strictParseDouble:()=>n0,strictParseFloat:()=>QY,strictParseFloat32:()=>P4,strictParseInt:()=>LY,strictParseInt32:()=>zY,strictParseLong:()=>E4,strictParseShort:()=>m,take:()=>lY,throwDefaultError:()=>b4,withBaseException:()=>SY});c4.exports=mZ(M4);var T4=K1(),iZ=class{constructor($){this.config=$,this.middlewareStack=(0,T4.constructStack)()}static{L(this,"Client")}send($,Z,Y){let X=typeof Z!=="function"?Z:void 0,Q=typeof Z==="function"?Z:Y,U=X===void 0&&this.config.cacheMiddleware===!0,G;if(U){if(!this.handlers)this.handlers=new WeakMap;let V=this.handlers;if(V.has($.constructor))G=V.get($.constructor);else G=$.resolveMiddleware(this.middlewareStack,this.config,X),V.set($.constructor,G)}else delete this.handlers,G=$.resolveMiddleware(this.middlewareStack,this.config,X);if(Q)G($).then((V)=>Q(null,V.output),(V)=>Q(V)).catch(()=>{});else return G($).then((V)=>V.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}},_0=I4(),p0=t0(),C4=class{constructor(){this.middlewareStack=(0,T4.constructStack)()}static{L(this,"Command")}static classBuilder(){return new sZ}resolveMiddlewareWithContext($,Z,Y,{middlewareFn:X,clientName:Q,commandName:U,inputFilterSensitiveLog:G,outputFilterSensitiveLog:V,smithyContext:K,additionalContext:J,CommandCtor:H}){for(let A of X.bind(this)(H,$,Z,Y))this.middlewareStack.use(A);let z=$.concat(this.middlewareStack),{logger:B}=Z,W={logger:B,clientName:Q,commandName:U,inputFilterSensitiveLog:G,outputFilterSensitiveLog:V,[p0.SMITHY_CONTEXT_KEY]:{commandInstance:this,...K},...J},{requestHandler:N}=Z;return z.resolve((A)=>N.handle(A.request,Y||{}),W)}},sZ=class{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=($)=>$,this._outputFilterSensitiveLog=($)=>$,this._serializer=null,this._deserializer=null}static{L(this,"ClassBuilder")}init($){this._init=$}ep($){return this._ep=$,this}m($){return this._middlewareFn=$,this}s($,Z,Y={}){return this._smithyContext={service:$,operation:Z,...Y},this}c($={}){return this._additionalContext=$,this}n($,Z){return this._clientName=$,this._commandName=Z,this}f($=(Y)=>Y,Z=(Y)=>Y){return this._inputFilterSensitiveLog=$,this._outputFilterSensitiveLog=Z,this}ser($){return this._serializer=$,this}de($){return this._deserializer=$,this}build(){let $=this,Z;return Z=class extends C4{constructor(...[Y]){super();this.serialize=$._serializer,this.deserialize=$._deserializer,this.input=Y??{},$._init(this)}static{L(this,"CommandRef")}static getEndpointParameterInstructions(){return $._ep}resolveMiddleware(Y,X,Q){return this.resolveMiddlewareWithContext(Y,X,Q,{CommandCtor:Z,middlewareFn:$._middlewareFn,clientName:$._clientName,commandName:$._commandName,inputFilterSensitiveLog:$._inputFilterSensitiveLog,outputFilterSensitiveLog:$._outputFilterSensitiveLog,smithyContext:$._smithyContext,additionalContext:$._additionalContext})}}}},nZ="***SensitiveInformation***",aZ=L(($,Z)=>{for(let Y of Object.keys($)){let X=$[Y],Q=L(async function(G,V,K){let J=new X(G);if(typeof V==="function")this.send(J,V);else if(typeof K==="function"){if(typeof V!=="object")throw Error(`Expected http options but got ${typeof V}`);this.send(J,V||{},K)}else return this.send(J,V)},"methodImpl"),U=(Y[0].toLowerCase()+Y.slice(1)).replace(/Command$/,"");Z.prototype[U]=Q}},"createAggregatedClient"),rZ=L(($)=>{switch($){case"true":return!0;case"false":return!1;default:throw Error(`Unable to parse boolean value "${$}"`)}},"parseBoolean"),oZ=L(($)=>{if($===null||$===void 0)return;if(typeof $==="number"){if($===0||$===1)e.warn(w0(`Expected boolean, got ${typeof $}: ${$}`));if($===0)return!1;if($===1)return!0}if(typeof $==="string"){let Z=$.toLowerCase();if(Z==="false"||Z==="true")e.warn(w0(`Expected boolean, got ${typeof $}: ${$}`));if(Z==="false")return!1;if(Z==="true")return!0}if(typeof $==="boolean")return $;throw TypeError(`Expected boolean, got ${typeof $}: ${$}`)},"expectBoolean"),o=L(($)=>{if($===null||$===void 0)return;if(typeof $==="string"){let Z=parseFloat($);if(!Number.isNaN(Z)){if(String(Z)!==String($))e.warn(w0(`Expected number but observed string: ${$}`));return Z}}if(typeof $==="number")return $;throw TypeError(`Expected number, got ${typeof $}: ${$}`)},"expectNumber"),tZ=Math.ceil(340282346638528860000000000000000000000),H0=L(($)=>{let Z=o($);if(Z!==void 0&&!Number.isNaN(Z)&&Z!==1/0&&Z!==-1/0){if(Math.abs(Z)>tZ)throw TypeError(`Expected 32-bit float, got ${$}`)}return Z},"expectFloat32"),t=L(($)=>{if($===null||$===void 0)return;if(Number.isInteger($)&&!Number.isNaN($))return $;throw TypeError(`Expected integer, got ${typeof $}: ${$}`)},"expectLong"),eZ=t,u0=L(($)=>s0($,32),"expectInt32"),l0=L(($)=>s0($,16),"expectShort"),m0=L(($)=>s0($,8),"expectByte"),s0=L(($,Z)=>{let Y=t($);if(Y!==void 0&&$Y(Y,Z)!==Y)throw TypeError(`Expected ${Z}-bit integer, got ${$}`);return Y},"expectSizedInt"),$Y=L(($,Z)=>{switch(Z){case 32:return Int32Array.of($)[0];case 16:return Int16Array.of($)[0];case 8:return Int8Array.of($)[0]}},"castInt"),ZY=L(($,Z)=>{if($===null||$===void 0){if(Z)throw TypeError(`Expected a non-null value for ${Z}`);throw TypeError("Expected a non-null value")}return $},"expectNonNull"),O4=L(($)=>{if($===null||$===void 0)return;if(typeof $==="object"&&!Array.isArray($))return $;let Z=Array.isArray($)?"array":typeof $;throw TypeError(`Expected object, got ${Z}: ${$}`)},"expectObject"),YY=L(($)=>{if($===null||$===void 0)return;if(typeof $==="string")return $;if(["boolean","number","bigint"].includes(typeof $))return e.warn(w0(`Expected string, got ${typeof $}: ${$}`)),String($);throw TypeError(`Expected string, got ${typeof $}: ${$}`)},"expectString"),XY=L(($)=>{if($===null||$===void 0)return;let Z=O4($),Y=Object.entries(Z).filter(([,X])=>X!=null).map(([X])=>X);if(Y.length===0)throw TypeError("Unions must have exactly one non-null member. None were found.");if(Y.length>1)throw TypeError(`Unions must have exactly one non-null member. Keys ${Y} were not null.`);return Z},"expectUnion"),n0=L(($)=>{if(typeof $=="string")return o(s($));return o($)},"strictParseDouble"),QY=n0,P4=L(($)=>{if(typeof $=="string")return H0(s($));return H0($)},"strictParseFloat32"),GY=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,s=L(($)=>{let Z=$.match(GY);if(Z===null||Z[0].length!==$.length)throw TypeError("Expected real number, got implicit NaN");return parseFloat($)},"parseNumber"),a0=L(($)=>{if(typeof $=="string")return h4($);return o($)},"limitedParseDouble"),UY=a0,VY=a0,KY=L(($)=>{if(typeof $=="string")return h4($);return H0($)},"limitedParseFloat32"),h4=L(($)=>{switch($){case"NaN":return NaN;case"Infinity":return 1/0;case"-Infinity":return-1/0;default:throw Error(`Unable to parse float value: ${$}`)}},"parseFloatString"),E4=L(($)=>{if(typeof $==="string")return t(s($));return t($)},"strictParseLong"),LY=E4,zY=L(($)=>{if(typeof $==="string")return u0(s($));return u0($)},"strictParseInt32"),m=L(($)=>{if(typeof $==="string")return l0(s($));return l0($)},"strictParseShort"),S4=L(($)=>{if(typeof $==="string")return m0(s($));return m0($)},"strictParseByte"),w0=L(($)=>{return String(TypeError($).stack||$).split(`
11
+ `).slice(0,5).filter((Z)=>!Z.includes("stackTraceWarning")).join(`
12
+ `)},"stackTraceWarning"),e={warn:console.warn},JY=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],r0=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function k4($){let Z=$.getUTCFullYear(),Y=$.getUTCMonth(),X=$.getUTCDay(),Q=$.getUTCDate(),U=$.getUTCHours(),G=$.getUTCMinutes(),V=$.getUTCSeconds(),K=Q<10?`0${Q}`:`${Q}`,J=U<10?`0${U}`:`${U}`,H=G<10?`0${G}`:`${G}`,z=V<10?`0${V}`:`${V}`;return`${JY[X]}, ${K} ${r0[Y]} ${Z} ${J}:${H}:${z} GMT`}L(k4,"dateToUtcString");var BY=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),WY=L(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw TypeError("RFC-3339 date-times must be expressed as strings");let Z=BY.exec($);if(!Z)throw TypeError("Invalid RFC-3339 date-time value");let[Y,X,Q,U,G,V,K,J]=Z,H=m(i(X)),z=q(Q,"month",1,12),B=q(U,"day",1,31);return r(H,z,B,{hours:G,minutes:V,seconds:K,fractionalMilliseconds:J})},"parseRfc3339DateTime"),FY=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),HY=L(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw TypeError("RFC-3339 date-times must be expressed as strings");let Z=FY.exec($);if(!Z)throw TypeError("Invalid RFC-3339 date-time value");let[Y,X,Q,U,G,V,K,J,H]=Z,z=m(i(X)),B=q(Q,"month",1,12),W=q(U,"day",1,31),N=r(z,B,W,{hours:G,minutes:V,seconds:K,fractionalMilliseconds:J});if(H.toUpperCase()!="Z")N.setTime(N.getTime()-hY(H));return N},"parseRfc3339DateTimeWithOffset"),wY=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),DY=new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),NY=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/),jY=L(($)=>{if($===null||$===void 0)return;if(typeof $!=="string")throw TypeError("RFC-7231 date-times must be expressed as strings");let Z=wY.exec($);if(Z){let[Y,X,Q,U,G,V,K,J]=Z;return r(m(i(U)),d0(Q),q(X,"day",1,31),{hours:G,minutes:V,seconds:K,fractionalMilliseconds:J})}if(Z=DY.exec($),Z){let[Y,X,Q,U,G,V,K,J]=Z;return MY(r(IY(U),d0(Q),q(X,"day",1,31),{hours:G,minutes:V,seconds:K,fractionalMilliseconds:J}))}if(Z=NY.exec($),Z){let[Y,X,Q,U,G,V,K,J]=Z;return r(m(i(J)),d0(X),q(Q.trimLeft(),"day",1,31),{hours:U,minutes:G,seconds:V,fractionalMilliseconds:K})}throw TypeError("Invalid RFC-7231 date-time value")},"parseRfc7231DateTime"),RY=L(($)=>{if($===null||$===void 0)return;let Z;if(typeof $==="number")Z=$;else if(typeof $==="string")Z=n0($);else if(typeof $==="object"&&$.tag===1)Z=$.value;else throw TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(Z)||Z===1/0||Z===-1/0)throw TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(Z*1000))},"parseEpochTimestamp"),r=L(($,Z,Y,X)=>{let Q=Z-1;return CY($,Q,Y),new Date(Date.UTC($,Q,Y,q(X.hours,"hour",0,23),q(X.minutes,"minute",0,59),q(X.seconds,"seconds",0,60),PY(X.fractionalMilliseconds)))},"buildDate"),IY=L(($)=>{let Z=new Date().getUTCFullYear(),Y=Math.floor(Z/100)*100+m(i($));if(Y<Z)return Y+100;return Y},"parseTwoDigitYear"),AY=1576800000000,MY=L(($)=>{if($.getTime()-new Date().getTime()>AY)return new Date(Date.UTC($.getUTCFullYear()-100,$.getUTCMonth(),$.getUTCDate(),$.getUTCHours(),$.getUTCMinutes(),$.getUTCSeconds(),$.getUTCMilliseconds()));return $},"adjustRfc850Year"),d0=L(($)=>{let Z=r0.indexOf($);if(Z<0)throw TypeError(`Invalid month: ${$}`);return Z+1},"parseMonthByShortName"),TY=[31,28,31,30,31,30,31,31,30,31,30,31],CY=L(($,Z,Y)=>{let X=TY[Z];if(Z===1&&OY($))X=29;if(Y>X)throw TypeError(`Invalid day for ${r0[Z]} in ${$}: ${Y}`)},"validateDayOfMonth"),OY=L(($)=>{return $%4===0&&($%100!==0||$%400===0)},"isLeapYear"),q=L(($,Z,Y,X)=>{let Q=S4(i($));if(Q<Y||Q>X)throw TypeError(`${Z} must be between ${Y} and ${X}, inclusive`);return Q},"parseDateValue"),PY=L(($)=>{if($===null||$===void 0)return 0;return P4("0."+$)*1000},"parseMilliseconds"),hY=L(($)=>{let Z=$[0],Y=1;if(Z=="+")Y=1;else if(Z=="-")Y=-1;else throw TypeError(`Offset direction, ${Z}, must be "+" or "-"`);let X=Number($.substring(1,3)),Q=Number($.substring(4,6));return Y*(X*60+Q)*60*1000},"parseOffsetToMilliseconds"),i=L(($)=>{let Z=0;while(Z<$.length-1&&$.charAt(Z)==="0")Z++;if(Z===0)return $;return $.slice(Z)},"stripLeadingZeroes"),EY=class $ extends Error{static{L(this,"ServiceException")}constructor(Z){super(Z.message);Object.setPrototypeOf(this,Object.getPrototypeOf(this).constructor.prototype),this.name=Z.name,this.$fault=Z.$fault,this.$metadata=Z.$metadata}static isInstance(Z){if(!Z)return!1;let Y=Z;return $.prototype.isPrototypeOf(Y)||Boolean(Y.$fault)&&Boolean(Y.$metadata)&&(Y.$fault==="client"||Y.$fault==="server")}static[Symbol.hasInstance](Z){if(!Z)return!1;let Y=Z;if(this===$)return $.isInstance(Z);if($.isInstance(Z)){if(Y.name&&this.name)return this.prototype.isPrototypeOf(Z)||Y.name===this.name;return this.prototype.isPrototypeOf(Z)}return!1}},x4=L(($,Z={})=>{Object.entries(Z).filter(([,X])=>X!==void 0).forEach(([X,Q])=>{if($[X]==null||$[X]==="")$[X]=Q});let Y=$.message||$.Message||"UnknownError";return $.message=Y,delete $.Message,$},"decorateServiceException"),b4=L(({output:$,parsedBody:Z,exceptionCtor:Y,errorCode:X})=>{let Q=kY($),U=Q.httpStatusCode?Q.httpStatusCode+"":void 0,G=new Y({name:Z?.code||Z?.Code||X||U||"UnknownError",$fault:"client",$metadata:Q});throw x4(G,Z)},"throwDefaultError"),SY=L(($)=>{return({output:Z,parsedBody:Y,errorCode:X})=>{b4({output:Z,parsedBody:Y,exceptionCtor:$,errorCode:X})}},"withBaseException"),kY=L(($)=>({httpStatusCode:$.statusCode,requestId:$.headers["x-amzn-requestid"]??$.headers["x-amzn-request-id"]??$.headers["x-amz-request-id"],extendedRequestId:$.headers["x-amz-id-2"],cfId:$.headers["x-amz-cf-id"]}),"deserializeMetadata"),xY=L(($)=>{switch($){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:30000};default:return{}}},"loadConfigsForDefaultMode"),A4=!1,bY=L(($)=>{if($&&!A4&&parseInt($.substring(1,$.indexOf(".")))<16)A4=!0},"emitWarningIfUnsupportedVersion"),qY=L(($)=>{let Z=[];for(let Y in p0.AlgorithmId){let X=p0.AlgorithmId[Y];if($[X]===void 0)continue;Z.push({algorithmId:()=>X,checksumConstructor:()=>$[X]})}return{addChecksumAlgorithm(Y){Z.push(Y)},checksumAlgorithms(){return Z}}},"getChecksumConfiguration"),fY=L(($)=>{let Z={};return $.checksumAlgorithms().forEach((Y)=>{Z[Y.algorithmId()]=Y.checksumConstructor()}),Z},"resolveChecksumRuntimeConfig"),yY=L(($)=>{return{setRetryStrategy(Z){$.retryStrategy=Z},retryStrategy(){return $.retryStrategy}}},"getRetryConfiguration"),gY=L(($)=>{let Z={};return Z.retryStrategy=$.retryStrategy(),Z},"resolveRetryRuntimeConfig"),q4=L(($)=>{return Object.assign(qY($),yY($))},"getDefaultExtensionConfiguration"),vY=q4,cY=L(($)=>{return Object.assign(fY($),gY($))},"resolveDefaultRuntimeConfig"),_Y=L(($)=>Array.isArray($)?$:[$],"getArrayIfSingleItem"),f4=L(($)=>{for(let Y in $)if($.hasOwnProperty(Y)&&$[Y]["#text"]!==void 0)$[Y]=$[Y]["#text"];else if(typeof $[Y]==="object"&&$[Y]!==null)$[Y]=f4($[Y]);return $},"getValueFromTextNode"),dY=L(($)=>{return $!=null},"isSerializableHeaderValue"),p=L(function(Z){return Object.assign(new String(Z),{deserializeJSON(){return JSON.parse(String(Z))},toString(){return String(Z)},toJSON(){return String(Z)}})},"LazyJsonString");p.from=($)=>{if($&&typeof $==="object"&&($ instanceof p||("deserializeJSON"in $)))return $;else if(typeof $==="string"||Object.getPrototypeOf($)===String.prototype)return p(String($));return p(JSON.stringify($))};p.fromObject=p.from;var pY=class{static{L(this,"NoOpLogger")}trace(){}debug(){}info(){}warn(){}error(){}};function o0($,Z,Y){let X,Q,U;if(typeof Z>"u"&&typeof Y>"u")X={},U=$;else if(X=$,typeof Z==="function")return Q=Z,U=Y,mY(X,Q,U);else U=Z;for(let G of Object.keys(U)){if(!Array.isArray(U[G])){X[G]=U[G];continue}y4(X,null,U,G)}return X}L(o0,"map");var uY=L(($)=>{let Z={};for(let[Y,X]of Object.entries($||{}))Z[Y]=[,X];return Z},"convertMap"),lY=L(($,Z)=>{let Y={};for(let X in Z)y4(Y,$,Z,X);return Y},"take"),mY=L(($,Z,Y)=>{return o0($,Object.entries(Y).reduce((X,[Q,U])=>{if(Array.isArray(U))X[Q]=U;else if(typeof U==="function")X[Q]=[Z,U()];else X[Q]=[Z,U];return X},{}))},"mapWithFilter"),y4=L(($,Z,Y,X)=>{if(Z!==null){let G=Y[X];if(typeof G==="function")G=[,G];let[V=iY,K=sY,J=X]=G;if(typeof V==="function"&&V(Z[J])||typeof V!=="function"&&!!V)$[X]=K(Z[J]);return}let[Q,U]=Y[X];if(typeof U==="function"){let G,V=Q===void 0&&(G=U())!=null,K=typeof Q==="function"&&!!Q(void 0)||typeof Q!=="function"&&!!Q;if(V)$[X]=G;else if(K)$[X]=U()}else{let G=Q===void 0&&U!=null,V=typeof Q==="function"&&!!Q(U)||typeof Q!=="function"&&!!Q;if(G||V)$[X]=U}},"applyInstruction"),iY=L(($)=>$!=null,"nonNullish"),sY=L(($)=>$,"pass");function g4($){if($.includes(",")||$.includes('"'))$=`"${$.replace(/"/g,"\\\"")}"`;return $}L(g4,"quoteHeader");var nY=L(($)=>{if($!==$)return"NaN";switch($){case 1/0:return"Infinity";case-1/0:return"-Infinity";default:return $}},"serializeFloat"),aY=L(($)=>$.toISOString().replace(".000Z","Z"),"serializeDateTime"),i0=L(($)=>{if($==null)return{};if(Array.isArray($))return $.filter((Z)=>Z!=null).map(i0);if(typeof $==="object"){let Z={};for(let Y of Object.keys($)){if($[Y]==null)continue;Z[Y]=i0($[Y])}return Z}return $},"_json");function v4($,Z,Y){if(Y<=0||!Number.isInteger(Y))throw Error("Invalid number of delimiters ("+Y+") for splitEvery.");let X=$.split(Z);if(Y===1)return X;let Q=[],U="";for(let G=0;G<X.length;G++){if(U==="")U=X[G];else U+=Z+X[G];if((G+1)%Y===0)Q.push(U),U=""}if(U!=="")Q.push(U);return Q}L(v4,"splitEvery");var rY=L(($)=>{let Z=$.length,Y=[],X=!1,Q=void 0,U=0;for(let G=0;G<Z;++G){let V=$[G];switch(V){case'"':if(Q!=="\\")X=!X;break;case",":if(!X)Y.push($.slice(U,G)),U=G+1;break;default:}Q=V}return Y.push($.slice(U)),Y.map((G)=>{G=G.trim();let V=G.length;if(V<2)return G;if(G[0]==='"'&&G[V-1]==='"')G=G.slice(1,V-1);return G.replace(/\\"/g,'"')})},"splitHeader")});
13
+ export{Z0 as qa,J1 as ra,n as sa,U0 as ta,u as ua,F6 as va,x6 as wa,s6 as xa,w4 as ya,I4 as za,oY as Aa};
14
+
15
+ //# debugId=01DD51A8A6F8403D64756E2164756E21