gemi 0.4.84 → 0.4.85

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 (27) hide show
  1. package/dist/bin/index.js +1 -0
  2. package/dist/{chunk-f5daf38c43144399.js → chunk-0ddb821fe8124f54.js} +2 -2
  3. package/dist/{chunk-d22136d39cf8465f.js → chunk-2335866508ec8b1b.js} +1 -1
  4. package/dist/{chunk-3c274565feb8b4f8.js → chunk-25ee58bc6072bd58.js} +1 -1
  5. package/dist/chunk-3043d333fa68d342.js +2 -0
  6. package/dist/chunk-309e27a19cd3a645.js +18 -0
  7. package/dist/{chunk-933845e73519b4c5.js → chunk-38315b1e3dd78ca7.js} +2 -2
  8. package/dist/{chunk-2cf271e24c26b0ee.js → chunk-63c98893e07b1644.js} +1 -1
  9. package/dist/{chunk-8088e99dc2bb92e1.js → chunk-63e9bc71922dbe80.js} +1 -1
  10. package/dist/chunk-8b950df276d04054.js +2 -0
  11. package/dist/chunk-9007899b37535873.js +2 -0
  12. package/dist/{chunk-1fab30ab853c48cc.js → chunk-958e406572d457ca.js} +1 -1
  13. package/dist/{chunk-20ce79bc516cd80a.js → chunk-b99af11a56fdd395.js} +1 -1
  14. package/dist/{chunk-12b4f44a2beae19b.js → chunk-c27a654eada9167e.js} +1 -1
  15. package/dist/{chunk-19b24eef6086eb6a.js → chunk-c6ab6f8e07a028ac.js} +1 -1
  16. package/dist/{chunk-73eed146ee78f681.js → chunk-d16ef78d852a6856.js} +1 -1
  17. package/dist/chunk-da07ce723d8218db.js +3 -0
  18. package/dist/{chunk-8aa3e0e20e411d11.js → chunk-f6a80fc55311e0c8.js} +1 -1
  19. package/dist/kernel/index.js +1 -1
  20. package/dist/server/index.js +2 -2
  21. package/dist/services/index.js +4 -4
  22. package/package.json +1 -1
  23. package/dist/chunk-4488171fdbc139d7.js +0 -2
  24. package/dist/chunk-4ead4ddbe2b17543.js +0 -3
  25. package/dist/chunk-6ba4599c68fa415a.js +0 -2
  26. package/dist/chunk-a17cbcbbf2f5bb1a.js +0 -18
  27. package/dist/chunk-f1eb122aa5c746ea.js +0 -2
@@ -1,11 +1,11 @@
1
1
  // @bun
2
- import"../chunk-3c274565feb8b4f8.js";import{B as T} from"../chunk-24a86f8f5ddc0cbd.js";import{G as Wa,H as gS} from"../chunk-0ba2cc302113ab40.js";import{M as Jd} from"../chunk-ff8cd8fd047cfee5.js";import{$ as Nm,N as jr,O as Ym,P as _m,Q as Om,R as qm,S as me,T as u,U as t,V as Se,W as im,X as Lf,Y as Wf,Z as Xf,_ as bm,aa as Dm,ba as Tm,ca as $m,da as xm,ea as om,fa as Zf,ga as Ir,ha as Pr,ia as nm,ja as Um,ka as Mm,la as pm,ma as vm,na as um,oa as Rs,pa as Cm,qa as Bs,ra as Hm,sa as zm,ta as Vm,ua as Bm} from"../chunk-a17cbcbbf2f5bb1a.js";import{$a as hh,Aa as jm,Ba as tr,Ea as wm,Fa as Cr,Ga as B,Ha as dm,Ia as Sm,Ja as cm,Ka as wl,La as Im,Ma as Pm,Na as mr,Oa as Am,Pa as zl,Qa as Gl,Ra as lh,Sa as Er,Ta as _,Va as vs,Ya as cr,Za as fh,_a as Ar,ab as Ms,bb as Lr,db as sa,eb as $r,fb as Of,gb as O,hb as mh,ib as km,jb as ym,kb as Zm,lb as Qm,nb as z,pb as gh,va as Wm,wa as Xm,xa as L,ya as xr,za as br} from"../chunk-4ead4ddbe2b17543.js";import{rb as Yg} from"../chunk-20ce79bc516cd80a.js";import{sb as b,tb as Rm} from"../chunk-933845e73519b4c5.js";import"../chunk-73eed146ee78f681.js";import{Ab as Gm} from"../chunk-f5daf38c43144399.js";import"../chunk-8088e99dc2bb92e1.js";class ar{}class ir extends ar{r;constructor(r=`${process.env.ROOT_DIR}/storage`){super();this.folderPath=r}async put(r){let s,e;if(r instanceof Blob)s=r,e=`${jr()}.${r.type.split("/")[1].split(";")[0]}`;else s=r.body,e=r.name;const a=s instanceof Buffer?s:Buffer.from(await s.arrayBuffer()),l=`${this.folderPath}/${e}`;return await Bun.write(l,a),e}async fetch(r){let s=process.env.BUCKET_NAME,e;if(typeof r==="string")e=r;else s=r.bucket??s,e=r.name;if(!e)throw new Error("Object name has to be specified");const a=`${this.folderPath}/${e}`,l=Bun.file(a),f=Bun.file(a).stream(),h=new Date(l.lastModified).toUTCString();return new Response(f,{headers:{"Content-Type":l.type,"Content-Length":String(l.size),"Cache-Control":"private, max-age=12000, must-revalidate","Last-Modified":h}})}}class Xa{driver=new ir}function Hg(r){return(s)=>async(e)=>{const{request:a}=e;if(L.isInstance(a)&&a.body&&r.runtime==="node"){if(r.requestHandler?.constructor?.name!=="FetchHttpHandler")a.headers={...a.headers,Expect:"100-continue"}}return s({...e,request:a})}}var zg={step:"build",tags:["SET_EXPECT_HEADER","EXPECT_HEADER"],name:"addExpectContinueMiddleware",override:!0},Za=(r)=>({applyToStack:(s)=>{s.add(Hg(r),zg)}});function Fg(){return(r,s)=>async(e)=>{const{request:a}=e;if(L.isInstance(a)){if(!(Gg in a.headers))if(typeof s?.logger?.warn==="function"&&!(s.logger instanceof br))s.logger.warn("Are you using a Stream of unknown length as the Body of a PutObject request? Consider using Upload instead from @aws-sdk/lib-storage.");else console.warn("Are you using a Stream of unknown length as the Body of a PutObject request? Consider using Upload instead from @aws-sdk/lib-storage.")}return r({...e})}}var Gg="content-length",Kg={step:"finalizeRequest",tags:["CHECK_CONTENT_LENGTH_HEADER"],name:"getCheckContentLengthHeaderPlugin",override:!0},Qa=(r)=>({applyToStack:(s)=>{s.add(Fg(),Kg)}});var Va=(r)=>{return(s,e)=>async(a)=>{const l=await r.region(),f=r.region;let h=()=>{};if(e.__s3RegionRedirect)Object.defineProperty(r,"region",{writable:!1,value:async()=>{return e.__s3RegionRedirect}}),h=()=>Object.defineProperty(r,"region",{writable:!0,value:f});try{const m=await s(a);if(e.__s3RegionRedirect){h();const g=await r.region();if(l!==g)throw new Error("Region was not restored following S3 region redirect.")}return m}catch(m){throw h(),m}}},Ba={tags:["REGION_REDIRECT","S3"],name:"regionRedirectEndpointMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"};function Lg(r){return(s,e)=>async(a)=>{try{return await s(a)}catch(l){if(r.followRegionRedirects&&l?.$metadata?.httpStatusCode===301){try{const f=l.$response.headers["x-amz-bucket-region"];e.logger?.debug(`Redirecting from ${await r.region()} to ${f}`),e.__s3RegionRedirect=f}catch(f){throw new Error("Region redirect failed: "+f)}return s(a)}else throw l}}}var Wg={step:"initialize",tags:["REGION_REDIRECT","S3"],name:"regionRedirectMiddleware",override:!0},Ja=(r)=>({applyToStack:(s)=>{s.add(Lg(r),Wg),s.addRelativeTo(Va(r),Ba)}});var Xg=(r)=>{return(s,e)=>async(a)=>{const l=await s(a),{response:f}=l;if(xr.isInstance(f)){if(f.headers.expires){f.headers.expiresstring=f.headers.expires;try{$r(f.headers.expires)}catch(h){e.logger?.warn(`AWS SDK Warning for ${e.clientName}::${e.commandName} response parsing (${f.headers.expires}): ${h}`),delete f.headers.expires}}}return l}},Zg={tags:["S3"],name:"s3ExpiresMiddleware",override:!0,relation:"after",toMiddleware:"deserializerMiddleware"},Ya=(r)=>({applyToStack:(s)=>{s.addRelativeTo(Xg(r),Zg)}});class lr{constructor(r={}){this.data=r,this.lastPurgeTime=Date.now()}get(r){const s=this.data[r];if(!s)return;return s}set(r,s){return this.data[r]=s,s}delete(r){delete this.data[r]}async purgeExpired(){const r=Date.now();if(this.lastPurgeTime+lr.EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS>r)return;for(let s in this.data){const e=this.data[s];if(!e.isRefreshing){const a=await e.identity;if(a.expiration){if(a.expiration.getTime()<r)delete this.data[s]}}}}}lr.EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS=30000;class fr{constructor(r,s=!1,e=Date.now()){this._identity=r,this.isRefreshing=s,this.accessed=e}get identity(){return this.accessed=Date.now(),this._identity}}class hr{constructor(r,s=new lr){this.createSessionFn=r,this.cache=s}async getS3ExpressIdentity(r,s){const e=s.Bucket,{cache:a}=this,l=a.get(e);if(l)return l.identity.then((f)=>{if((f.expiration?.getTime()??0)<Date.now())return a.set(e,new fr(this.getIdentity(e))).identity;if((f.expiration?.getTime()??0)<Date.now()+hr.REFRESH_WINDOW_MS&&!l.isRefreshing)l.isRefreshing=!0,this.getIdentity(e).then((g)=>{a.set(e,new fr(Promise.resolve(g)))});return f});return a.set(e,new fr(this.getIdentity(e))).identity}async getIdentity(r){await this.cache.purgeExpired().catch((a)=>{console.warn("Error while clearing expired entries in S3ExpressIdentityCache: \n"+a)});const s=await this.createSessionFn(r);if(!s.Credentials?.AccessKeyId||!s.Credentials?.SecretAccessKey)throw new Error("s3#createSession response credential missing AccessKeyId or SecretAccessKey.");return{accessKeyId:s.Credentials.AccessKeyId,secretAccessKey:s.Credentials.SecretAccessKey,sessionToken:s.Credentials.SessionToken,expiration:s.Credentials.Expiration?new Date(s.Credentials.Expiration):void 0}}}hr.REFRESH_WINDOW_MS=60000;var Hr=T(mr(),1),he=T(me(),1),Il=T(wl(),1);var _a="X-Amz-Algorithm",Oa="X-Amz-Credential",qa="X-Amz-Date",ja="X-Amz-SignedHeaders",ia="X-Amz-Expires",ba="X-Amz-Signature",xa="X-Amz-Security-Token";var oa="authorization",ts="X-Amz-Date".toLowerCase();var na=["authorization",ts,"date"],pa="X-Amz-Signature".toLowerCase(),Ur="x-amz-content-sha256",ua="X-Amz-Security-Token".toLowerCase();var ta={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},rl=/^proxy-/,sl=/^sec-/;var or="AWS4-HMAC-SHA256";var el="AWS4-HMAC-SHA256-PAYLOAD",al="UNSIGNED-PAYLOAD",ll=50,re="aws4_request",fl=604800;var ml=T(mr(),1);var nr={},se=[],pr=(r,s,e)=>`${r}/${s}/${e}/${re}`,gl=async(r,s,e,a,l)=>{const f=await hl(r,s.secretAccessKey,s.accessKeyId),h=`${e}:${a}:${l}:${ml.toHex(f)}:${s.sessionToken}`;if(h in nr)return nr[h];se.push(h);while(se.length>ll)delete nr[se.shift()];let m=`AWS4${s.secretAccessKey}`;for(let g of[e,a,l,re])m=await hl(r,m,g);return nr[h]=m};var hl=(r,s,e)=>{const a=new r(s);return a.update(B(e)),a.digest()};var ur=({headers:r},s,e)=>{const a={};for(let l of Object.keys(r).sort()){if(r[l]==null)continue;const f=l.toLowerCase();if(f in ta||s?.has(f)||rl.test(f)||sl.test(f)){if(!e||e&&!e.has(f))continue}a[f]=r[l].trim().replace(/\s+/g," ")}return a};var Mr=T(wl(),1);var ee=({query:r={}})=>{const s=[],e={};for(let a of Object.keys(r).sort()){if(a.toLowerCase()===pa)continue;s.push(a);const l=r[a];if(typeof l==="string")e[a]=`${Mr.escapeUri(a)}=${Mr.escapeUri(l)}`;else if(Array.isArray(l))e[a]=l.slice(0).reduce((f,h)=>f.concat([`${Mr.escapeUri(a)}=${Mr.escapeUri(h)}`]),[]).sort().join("&")}return s.map((a)=>e[a]).filter((a)=>a).join("&")};var dl=T(mr(),1);var vr=async({headers:r,body:s},e)=>{for(let a of Object.keys(r))if(a.toLowerCase()===Ur)return r[a];if(s==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";else if(typeof s==="string"||ArrayBuffer.isView(s)||tr(s)){const a=new e;return a.update(B(s)),dl.toHex(await a.digest())}return al};var rs=T(mr(),1);var cl=function(r){for(let s=0;s<8;s++)r[s]^=255;for(let s=7;s>-1;s--)if(r[s]++,r[s]!==0)break};class ae{format(r){const s=[];for(let l of Object.keys(r)){const f=Cr(l);s.push(Uint8Array.from([f.byteLength]),f,this.formatHeaderValue(r[l]))}const e=new Uint8Array(s.reduce((l,f)=>l+f.byteLength,0));let a=0;for(let l of s)e.set(l,a),a+=l.byteLength;return e}formatHeaderValue(r){switch(r.type){case"boolean":return Uint8Array.from([r.value?0:1]);case"byte":return Uint8Array.from([2,r.value]);case"short":const s=new DataView(new ArrayBuffer(3));return s.setUint8(0,3),s.setInt16(1,r.value,!1),new Uint8Array(s.buffer);case"integer":const e=new DataView(new ArrayBuffer(5));return e.setUint8(0,4),e.setInt32(1,r.value,!1),new Uint8Array(e.buffer);case"long":const a=new Uint8Array(9);return a[0]=5,a.set(r.value.bytes,1),a;case"binary":const l=new DataView(new ArrayBuffer(3+r.value.byteLength));l.setUint8(0,6),l.setUint16(1,r.value.byteLength,!1);const f=new Uint8Array(l.buffer);return f.set(r.value,3),f;case"string":const h=Cr(r.value),m=new DataView(new ArrayBuffer(3+h.byteLength));m.setUint8(0,7),m.setUint16(1,h.byteLength,!1);const g=new Uint8Array(m.buffer);return g.set(h,3),g;case"timestamp":const w=new Uint8Array(9);return w[0]=8,w.set(le.fromNumber(r.value.valueOf()).bytes,1),w;case"uuid":if(!Qg.test(r.value))throw new Error(`Invalid UUID received: ${r.value}`);const A=new Uint8Array(17);return A[0]=9,A.set(rs.fromHex(r.value.replace(/\-/g,"")),1),A}}}var Sl;(function(r){r[r.boolTrue=0]="boolTrue",r[r.boolFalse=1]="boolFalse",r[r.byte=2]="byte",r[r.short=3]="short",r[r.integer=4]="integer",r[r.long=5]="long",r[r.byteArray=6]="byteArray",r[r.string=7]="string",r[r.timestamp=8]="timestamp",r[r.uuid=9]="uuid"})(Sl||(Sl={}));var Qg=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class le{constructor(r){if(this.bytes=r,r.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(r){if(r>9223372036854776000||r<-9223372036854776000)throw new Error(`${r} is too large (or, if negative, too small) to represent as an Int64`);const s=new Uint8Array(8);for(let e=7,a=Math.abs(Math.round(r));e>-1&&a>0;e--,a/=256)s[e]=a;if(r<0)cl(s);return new le(s)}valueOf(){const r=this.bytes.slice(0),s=r[0]&128;if(s)cl(r);return parseInt(rs.toHex(r),16)*(s?-1:1)}toString(){return String(this.valueOf())}}var Al=(r,s)=>{r=r.toLowerCase();for(let e of Object.keys(s))if(r===e.toLowerCase())return!0;return!1};var fe=(r,s={})=>{const{headers:e,query:a={}}=L.clone(r);for(let l of Object.keys(e)){const f=l.toLowerCase();if(f.slice(0,6)==="x-amz-"&&!s.unhoistableHeaders?.has(f))a[l]=e[l],delete e[l]}return{...r,headers:e,query:a}};var ss=(r)=>{r=L.clone(r);for(let s of Object.keys(r.headers))if(na.indexOf(s.toLowerCase())>-1)delete r.headers[s];return r};var Rl=(r)=>Vg(r).toISOString().replace(/\.\d{3}Z$/,"Z"),Vg=(r)=>{if(typeof r==="number")return new Date(r*1000);if(typeof r==="string"){if(Number(r))return new Date(Number(r)*1000);return new Date(r)}return r};class ge{constructor({applyChecksum:r,credentials:s,region:e,service:a,sha256:l,uriEscapePath:f=!0}){this.headerFormatter=new ae,this.service=a,this.sha256=l,this.uriEscapePath=f,this.applyChecksum=typeof r==="boolean"?r:!0,this.regionProvider=he.normalizeProvider(e),this.credentialProvider=he.normalizeProvider(s)}async presign(r,s={}){const{signingDate:e=new Date,expiresIn:a=3600,unsignableHeaders:l,unhoistableHeaders:f,signableHeaders:h,signingRegion:m,signingService:g}=s,w=await this.credentialProvider();this.validateResolvedCredentials(w);const A=m??await this.regionProvider(),{longDate:I,shortDate:P}=es(e);if(a>fl)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const U=pr(P,A,g??this.service),D=fe(ss(r),{unhoistableHeaders:f});if(w.sessionToken)D.query[xa]=w.sessionToken;D.query[_a]=or,D.query[Oa]=`${w.accessKeyId}/${U}`,D.query[qa]=I,D.query[ia]=a.toString(10);const Q=ur(D,l,h);return D.query[ja]=El(Q),D.query[ba]=await this.getSignature(I,U,this.getSigningKey(w,A,P,g),this.createCanonicalRequest(D,Q,await vr(r,this.sha256))),D}async sign(r,s){if(typeof r==="string")return this.signString(r,s);else if(r.headers&&r.payload)return this.signEvent(r,s);else if(r.message)return this.signMessage(r,s);else return this.signRequest(r,s)}async signEvent({headers:r,payload:s},{signingDate:e=new Date,priorSignature:a,signingRegion:l,signingService:f}){const h=l??await this.regionProvider(),{shortDate:m,longDate:g}=es(e),w=pr(m,h,f??this.service),A=await vr({headers:{},body:s},this.sha256),I=new this.sha256;I.update(r);const P=Hr.toHex(await I.digest()),U=[el,g,w,a,P,A].join("\n");return this.signString(U,{signingDate:e,signingRegion:h,signingService:f})}async signMessage(r,{signingDate:s=new Date,signingRegion:e,signingService:a}){return this.signEvent({headers:this.headerFormatter.format(r.message.headers),payload:r.message.body},{signingDate:s,signingRegion:e,signingService:a,priorSignature:r.priorSignature}).then((f)=>{return{message:r.message,signature:f}})}async signString(r,{signingDate:s=new Date,signingRegion:e,signingService:a}={}){const l=await this.credentialProvider();this.validateResolvedCredentials(l);const f=e??await this.regionProvider(),{shortDate:h}=es(s),m=new this.sha256(await this.getSigningKey(l,f,h,a));return m.update(B(r)),Hr.toHex(await m.digest())}async signRequest(r,{signingDate:s=new Date,signableHeaders:e,unsignableHeaders:a,signingRegion:l,signingService:f}={}){const h=await this.credentialProvider();this.validateResolvedCredentials(h);const m=l??await this.regionProvider(),g=ss(r),{longDate:w,shortDate:A}=es(s),I=pr(A,m,f??this.service);if(g.headers[ts]=w,h.sessionToken)g.headers[ua]=h.sessionToken;const P=await vr(g,this.sha256);if(!Al(Ur,g.headers)&&this.applyChecksum)g.headers[Ur]=P;const U=ur(g,a,e),D=await this.getSignature(w,I,this.getSigningKey(h,m,A,f),this.createCanonicalRequest(g,U,P));return g.headers[oa]=`${or} `+`Credential=${h.accessKeyId}/${I}, `+`SignedHeaders=${El(U)}, `+`Signature=${D}`,g}createCanonicalRequest(r,s,e){const a=Object.keys(s).sort();return`${r.method}
2
+ import"../chunk-25ee58bc6072bd58.js";import{B as L} from"../chunk-24a86f8f5ddc0cbd.js";import{G as La,H as lS} from"../chunk-0ba2cc302113ab40.js";import{M as Zd} from"../chunk-ff8cd8fd047cfee5.js";import{$ as Om,N as ir,O as Qm,P as Vm,Q as Bm,R as Jm,S as Fr,T as zr,U as t,V as rr,W as de,X as _m,Y as zf,Z as Gf,_ as Ff,aa as Im,ba as Pm,ca as km,da as ym,ea as qm,fa as jm,ga as Kf,ha as Pr,ia as kr,ja as im,ka as Nm,la as Dm,ma as bm,na as Tm,oa as xm,pa as Es,qa as $m,ra as Js,sa as Um,ta as Mm,ua as Wm,va as Xm} from"../chunk-309e27a19cd3a645.js";import{$a as Rr,Aa as xr,Ba as Ym,Ca as rs,Fa as fm,Ga as Cr,Ha as B,Ia as hm,Ja as mm,Ka as gm,La as u,Ma as cm,Na as Am,Oa as gr,Pa as wm,Qa as Ml,Ra as vl,Sa as rh,Ta as Ir,Ua as _,Wa as Cs,Za as Ar,_a as sh,ab as eh,bb as vs,cb as Wr,eb as ra,fb as Ur,gb as Bf,hb as O,ib as ah,jb as Rm,kb as Em,lb as Km,mb as Lm,ob as H,qb as lh,wa as Gm,xa as Fm,ya as K,za as or} from"../chunk-da07ce723d8218db.js";import{sb as Qg} from"../chunk-b99af11a56fdd395.js";import{tb as b,ub as dm} from"../chunk-38315b1e3dd78ca7.js";import"../chunk-d16ef78d852a6856.js";import{Bb as vm} from"../chunk-0ddb821fe8124f54.js";import"../chunk-63e9bc71922dbe80.js";class lr{}class br extends lr{r;constructor(r=`${process.env.ROOT_DIR}/storage`){super();this.folderPath=r}async put(r){let s,e;if(r instanceof Blob)s=r,e=`${ir()}.${r.type.split("/")[1].split(";")[0]}`;else s=r.body,e=r.name;const a=s instanceof Buffer?s:Buffer.from(await s.arrayBuffer()),l=`${this.folderPath}/${e}`;return await Bun.write(l,a),e}async fetch(r){let s=process.env.BUCKET_NAME,e;if(typeof r==="string")e=r;else s=r.bucket??s,e=r.name;if(!e)throw new Error("Object name has to be specified");const a=`${this.folderPath}/${e}`,l=Bun.file(a),f=Bun.file(a).stream(),h=new Date(l.lastModified).toUTCString();return new Response(f,{headers:{"Content-Type":l.type,"Content-Length":String(l.size),"Cache-Control":"private, max-age=12000, must-revalidate","Last-Modified":h}})}}class Wa{driver=new br}function Ug(r){return(s)=>async(e)=>{const{request:a}=e;if(K.isInstance(a)&&a.body&&r.runtime==="node"){if(r.requestHandler?.constructor?.name!=="FetchHttpHandler")a.headers={...a.headers,Expect:"100-continue"}}return s({...e,request:a})}}var Mg={step:"build",tags:["SET_EXPECT_HEADER","EXPECT_HEADER"],name:"addExpectContinueMiddleware",override:!0},Xa=(r)=>({applyToStack:(s)=>{s.add(Ug(r),Mg)}});function Cg(){return(r,s)=>async(e)=>{const{request:a}=e;if(K.isInstance(a)){if(!(vg in a.headers))if(typeof s?.logger?.warn==="function"&&!(s.logger instanceof xr))s.logger.warn("Are you using a Stream of unknown length as the Body of a PutObject request? Consider using Upload instead from @aws-sdk/lib-storage.");else console.warn("Are you using a Stream of unknown length as the Body of a PutObject request? Consider using Upload instead from @aws-sdk/lib-storage.")}return r({...e})}}var vg="content-length",Hg={step:"finalizeRequest",tags:["CHECK_CONTENT_LENGTH_HEADER"],name:"getCheckContentLengthHeaderPlugin",override:!0},Za=(r)=>({applyToStack:(s)=>{s.add(Cg(),Hg)}});var Qa=(r)=>{return(s,e)=>async(a)=>{const l=await r.region(),f=r.region;let h=()=>{};if(e.__s3RegionRedirect)Object.defineProperty(r,"region",{writable:!1,value:async()=>{return e.__s3RegionRedirect}}),h=()=>Object.defineProperty(r,"region",{writable:!0,value:f});try{const m=await s(a);if(e.__s3RegionRedirect){h();const g=await r.region();if(l!==g)throw new Error("Region was not restored following S3 region redirect.")}return m}catch(m){throw h(),m}}},Va={tags:["REGION_REDIRECT","S3"],name:"regionRedirectEndpointMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"};function zg(r){return(s,e)=>async(a)=>{try{return await s(a)}catch(l){if(r.followRegionRedirects&&l?.$metadata?.httpStatusCode===301){try{const f=l.$response.headers["x-amz-bucket-region"];e.logger?.debug(`Redirecting from ${await r.region()} to ${f}`),e.__s3RegionRedirect=f}catch(f){throw new Error("Region redirect failed: "+f)}return s(a)}else throw l}}}var Gg={step:"initialize",tags:["REGION_REDIRECT","S3"],name:"regionRedirectMiddleware",override:!0},Ba=(r)=>({applyToStack:(s)=>{s.add(zg(r),Gg),s.addRelativeTo(Qa(r),Va)}});var Fg=(r)=>{return(s,e)=>async(a)=>{const l=await s(a),{response:f}=l;if(or.isInstance(f)){if(f.headers.expires){f.headers.expiresstring=f.headers.expires;try{Ur(f.headers.expires)}catch(h){e.logger?.warn(`AWS SDK Warning for ${e.clientName}::${e.commandName} response parsing (${f.headers.expires}): ${h}`),delete f.headers.expires}}}return l}},Kg={tags:["S3"],name:"s3ExpiresMiddleware",override:!0,relation:"after",toMiddleware:"deserializerMiddleware"},Ja=(r)=>({applyToStack:(s)=>{s.addRelativeTo(Fg(r),Kg)}});class fr{constructor(r={}){this.data=r,this.lastPurgeTime=Date.now()}get(r){const s=this.data[r];if(!s)return;return s}set(r,s){return this.data[r]=s,s}delete(r){delete this.data[r]}async purgeExpired(){const r=Date.now();if(this.lastPurgeTime+fr.EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS>r)return;for(let s in this.data){const e=this.data[s];if(!e.isRefreshing){const a=await e.identity;if(a.expiration){if(a.expiration.getTime()<r)delete this.data[s]}}}}}fr.EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS=30000;class hr{constructor(r,s=!1,e=Date.now()){this._identity=r,this.isRefreshing=s,this.accessed=e}get identity(){return this.accessed=Date.now(),this._identity}}class mr{constructor(r,s=new fr){this.createSessionFn=r,this.cache=s}async getS3ExpressIdentity(r,s){const e=s.Bucket,{cache:a}=this,l=a.get(e);if(l)return l.identity.then((f)=>{if((f.expiration?.getTime()??0)<Date.now())return a.set(e,new hr(this.getIdentity(e))).identity;if((f.expiration?.getTime()??0)<Date.now()+mr.REFRESH_WINDOW_MS&&!l.isRefreshing)l.isRefreshing=!0,this.getIdentity(e).then((g)=>{a.set(e,new hr(Promise.resolve(g)))});return f});return a.set(e,new hr(this.getIdentity(e))).identity}async getIdentity(r){await this.cache.purgeExpired().catch((a)=>{console.warn("Error while clearing expired entries in S3ExpressIdentityCache: \n"+a)});const s=await this.createSessionFn(r);if(!s.Credentials?.AccessKeyId||!s.Credentials?.SecretAccessKey)throw new Error("s3#createSession response credential missing AccessKeyId or SecretAccessKey.");return{accessKeyId:s.Credentials.AccessKeyId,secretAccessKey:s.Credentials.SecretAccessKey,sessionToken:s.Credentials.SessionToken,expiration:s.Credentials.Expiration?new Date(s.Credentials.Expiration):void 0}}}mr.REFRESH_WINDOW_MS=60000;var Hr=L(gr(),1);var Ya="X-Amz-Algorithm",_a="X-Amz-Credential",Oa="X-Amz-Date",qa="X-Amz-SignedHeaders",ja="X-Amz-Expires",ia="X-Amz-Signature",ba="X-Amz-Security-Token";var xa="authorization",re="X-Amz-Date".toLowerCase();var oa=["authorization",re,"date"],na="X-Amz-Signature".toLowerCase(),Mr="x-amz-content-sha256",pa="X-Amz-Security-Token".toLowerCase();var ua={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},ta=/^proxy-/,rl=/^sec-/;var nr="AWS4-HMAC-SHA256";var sl="AWS4-HMAC-SHA256-PAYLOAD",el="UNSIGNED-PAYLOAD",al=50,se="aws4_request",ll=604800;var hl=L(gr(),1);var pr={},ee=[],ur=(r,s,e)=>`${r}/${s}/${e}/${se}`,ml=async(r,s,e,a,l)=>{const f=await fl(r,s.secretAccessKey,s.accessKeyId),h=`${e}:${a}:${l}:${hl.toHex(f)}:${s.sessionToken}`;if(h in pr)return pr[h];ee.push(h);while(ee.length>al)delete pr[ee.shift()];let m=`AWS4${s.secretAccessKey}`;for(let g of[e,a,l,se])m=await fl(r,m,g);return pr[h]=m};var fl=(r,s,e)=>{const a=new r(s);return a.update(B(e)),a.digest()};var tr=({headers:r},s,e)=>{const a={};for(let l of Object.keys(r).sort()){if(r[l]==null)continue;const f=l.toLowerCase();if(f in ua||s?.has(f)||ta.test(f)||rl.test(f)){if(!e||e&&!e.has(f))continue}a[f]=r[l].trim().replace(/\s+/g," ")}return a};var ae=({query:r={}})=>{const s=[],e={};for(let a of Object.keys(r).sort()){if(a.toLowerCase()===na)continue;s.push(a);const l=r[a];if(typeof l==="string")e[a]=`${u(a)}=${u(l)}`;else if(Array.isArray(l))e[a]=l.slice(0).reduce((f,h)=>f.concat([`${u(a)}=${u(h)}`]),[]).sort().join("&")}return s.map((a)=>e[a]).filter((a)=>a).join("&")};var gl=L(gr(),1);var vr=async({headers:r,body:s},e)=>{for(let a of Object.keys(r))if(a.toLowerCase()===Mr)return r[a];if(s==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";else if(typeof s==="string"||ArrayBuffer.isView(s)||rs(s)){const a=new e;return a.update(B(s)),gl.toHex(await a.digest())}return el};var ss=L(gr(),1);var dl=function(r){for(let s=0;s<8;s++)r[s]^=255;for(let s=7;s>-1;s--)if(r[s]++,r[s]!==0)break};class le{format(r){const s=[];for(let l of Object.keys(r)){const f=Cr(l);s.push(Uint8Array.from([f.byteLength]),f,this.formatHeaderValue(r[l]))}const e=new Uint8Array(s.reduce((l,f)=>l+f.byteLength,0));let a=0;for(let l of s)e.set(l,a),a+=l.byteLength;return e}formatHeaderValue(r){switch(r.type){case"boolean":return Uint8Array.from([r.value?0:1]);case"byte":return Uint8Array.from([2,r.value]);case"short":const s=new DataView(new ArrayBuffer(3));return s.setUint8(0,3),s.setInt16(1,r.value,!1),new Uint8Array(s.buffer);case"integer":const e=new DataView(new ArrayBuffer(5));return e.setUint8(0,4),e.setInt32(1,r.value,!1),new Uint8Array(e.buffer);case"long":const a=new Uint8Array(9);return a[0]=5,a.set(r.value.bytes,1),a;case"binary":const l=new DataView(new ArrayBuffer(3+r.value.byteLength));l.setUint8(0,6),l.setUint16(1,r.value.byteLength,!1);const f=new Uint8Array(l.buffer);return f.set(r.value,3),f;case"string":const h=Cr(r.value),m=new DataView(new ArrayBuffer(3+h.byteLength));m.setUint8(0,7),m.setUint16(1,h.byteLength,!1);const g=new Uint8Array(m.buffer);return g.set(h,3),g;case"timestamp":const w=new Uint8Array(9);return w[0]=8,w.set(fe.fromNumber(r.value.valueOf()).bytes,1),w;case"uuid":if(!Lg.test(r.value))throw new Error(`Invalid UUID received: ${r.value}`);const A=new Uint8Array(17);return A[0]=9,A.set(ss.fromHex(r.value.replace(/\-/g,"")),1),A}}}var wl;(function(r){r[r.boolTrue=0]="boolTrue",r[r.boolFalse=1]="boolFalse",r[r.byte=2]="byte",r[r.short=3]="short",r[r.integer=4]="integer",r[r.long=5]="long",r[r.byteArray=6]="byteArray",r[r.string=7]="string",r[r.timestamp=8]="timestamp",r[r.uuid=9]="uuid"})(wl||(wl={}));var Lg=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;class fe{constructor(r){if(this.bytes=r,r.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(r){if(r>9223372036854776000||r<-9223372036854776000)throw new Error(`${r} is too large (or, if negative, too small) to represent as an Int64`);const s=new Uint8Array(8);for(let e=7,a=Math.abs(Math.round(r));e>-1&&a>0;e--,a/=256)s[e]=a;if(r<0)dl(s);return new fe(s)}valueOf(){const r=this.bytes.slice(0),s=r[0]&128;if(s)dl(r);return parseInt(ss.toHex(r),16)*(s?-1:1)}toString(){return String(this.valueOf())}}var Sl=(r,s)=>{r=r.toLowerCase();for(let e of Object.keys(s))if(r===e.toLowerCase())return!0;return!1};var he=(r,s={})=>{const{headers:e,query:a={}}=K.clone(r);for(let l of Object.keys(e)){const f=l.toLowerCase();if(f.slice(0,6)==="x-amz-"&&!s.unhoistableHeaders?.has(f))a[l]=e[l],delete e[l]}return{...r,headers:e,query:a}};var es=(r)=>{r=K.clone(r);for(let s of Object.keys(r.headers))if(oa.indexOf(s.toLowerCase())>-1)delete r.headers[s];return r};var cl=(r)=>Wg(r).toISOString().replace(/\.\d{3}Z$/,"Z"),Wg=(r)=>{if(typeof r==="number")return new Date(r*1000);if(typeof r==="string"){if(Number(r))return new Date(Number(r)*1000);return new Date(r)}return r};class me{constructor({applyChecksum:r,credentials:s,region:e,service:a,sha256:l,uriEscapePath:f=!0}){this.headerFormatter=new le,this.service=a,this.sha256=l,this.uriEscapePath=f,this.applyChecksum=typeof r==="boolean"?r:!0,this.regionProvider=zr(e),this.credentialProvider=zr(s)}async presign(r,s={}){const{signingDate:e=new Date,expiresIn:a=3600,unsignableHeaders:l,unhoistableHeaders:f,signableHeaders:h,signingRegion:m,signingService:g}=s,w=await this.credentialProvider();this.validateResolvedCredentials(w);const A=m??await this.regionProvider(),{longDate:I,shortDate:P}=as(e);if(a>ll)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const $=ur(P,A,g??this.service),D=he(es(r),{unhoistableHeaders:f});if(w.sessionToken)D.query[ba]=w.sessionToken;D.query[Ya]=nr,D.query[_a]=`${w.accessKeyId}/${$}`,D.query[Oa]=I,D.query[ja]=a.toString(10);const Q=tr(D,l,h);return D.query[qa]=Al(Q),D.query[ia]=await this.getSignature(I,$,this.getSigningKey(w,A,P,g),this.createCanonicalRequest(D,Q,await vr(r,this.sha256))),D}async sign(r,s){if(typeof r==="string")return this.signString(r,s);else if(r.headers&&r.payload)return this.signEvent(r,s);else if(r.message)return this.signMessage(r,s);else return this.signRequest(r,s)}async signEvent({headers:r,payload:s},{signingDate:e=new Date,priorSignature:a,signingRegion:l,signingService:f}){const h=l??await this.regionProvider(),{shortDate:m,longDate:g}=as(e),w=ur(m,h,f??this.service),A=await vr({headers:{},body:s},this.sha256),I=new this.sha256;I.update(r);const P=Hr.toHex(await I.digest()),$=[sl,g,w,a,P,A].join("\n");return this.signString($,{signingDate:e,signingRegion:h,signingService:f})}async signMessage(r,{signingDate:s=new Date,signingRegion:e,signingService:a}){return this.signEvent({headers:this.headerFormatter.format(r.message.headers),payload:r.message.body},{signingDate:s,signingRegion:e,signingService:a,priorSignature:r.priorSignature}).then((f)=>{return{message:r.message,signature:f}})}async signString(r,{signingDate:s=new Date,signingRegion:e,signingService:a}={}){const l=await this.credentialProvider();this.validateResolvedCredentials(l);const f=e??await this.regionProvider(),{shortDate:h}=as(s),m=new this.sha256(await this.getSigningKey(l,f,h,a));return m.update(B(r)),Hr.toHex(await m.digest())}async signRequest(r,{signingDate:s=new Date,signableHeaders:e,unsignableHeaders:a,signingRegion:l,signingService:f}={}){const h=await this.credentialProvider();this.validateResolvedCredentials(h);const m=l??await this.regionProvider(),g=es(r),{longDate:w,shortDate:A}=as(s),I=ur(A,m,f??this.service);if(g.headers[re]=w,h.sessionToken)g.headers[pa]=h.sessionToken;const P=await vr(g,this.sha256);if(!Sl(Mr,g.headers)&&this.applyChecksum)g.headers[Mr]=P;const $=tr(g,a,e),D=await this.getSignature(w,I,this.getSigningKey(h,m,A,f),this.createCanonicalRequest(g,$,P));return g.headers[xa]=`${nr} `+`Credential=${h.accessKeyId}/${I}, `+`SignedHeaders=${Al($)}, `+`Signature=${D}`,g}createCanonicalRequest(r,s,e){const a=Object.keys(s).sort();return`${r.method}
3
3
  ${this.getCanonicalPath(r)}
4
- ${ee(r)}
4
+ ${ae(r)}
5
5
  ${a.map((l)=>`${l}:${s[l]}`).join("\n")}
6
6
 
7
7
  ${a.join(";")}
8
- ${e}`}async createStringToSign(r,s,e){const a=new this.sha256;a.update(B(e));const l=await a.digest();return`${or}
8
+ ${e}`}async createStringToSign(r,s,e){const a=new this.sha256;a.update(B(e));const l=await a.digest();return`${nr}
9
9
  ${r}
10
10
  ${s}
11
- ${Hr.toHex(l)}`}getCanonicalPath({path:r}){if(this.uriEscapePath){const s=[];for(let l of r.split("/")){if(l?.length===0)continue;if(l===".")continue;if(l==="..")s.pop();else s.push(l)}const e=`${r?.startsWith("/")?"/":""}${s.join("/")}${s.length>0&&r?.endsWith("/")?"/":""}`;return Il.escapeUri(e).replace(/%2F/g,"/")}return r}async getSignature(r,s,e,a){const l=await this.createStringToSign(r,s,a),f=new this.sha256(await e);return f.update(B(l)),Hr.toHex(await f.digest())}getSigningKey(r,s,e,a){return gl(this.sha256,r,e,s,a||this.service)}validateResolvedCredentials(r){if(typeof r!=="object"||typeof r.accessKeyId!=="string"||typeof r.secretAccessKey!=="string")throw new Error("Resolved credential object is not valid")}}var es=(r)=>{const s=Rl(r).replace(/[\-:]/g,"");return{longDate:s,shortDate:s.slice(0,8)}},El=(r)=>Object.keys(r).sort().join(";");var Pl="Directory",kl="S3Express",yl="sigv4-s3express",as="X-Amz-S3session-Token",zr=as.toLowerCase(),Bg="AWS_S3_DISABLE_EXPRESS_SESSION_AUTH",Jg="s3_disable_express_session_auth",we={environmentVariableSelector:(r)=>u(r,Bg,t.ENV),configFileSelector:(r)=>u(r,Jg,t.CONFIG),default:!1};var Nl=function(r){return{accessKeyId:r.accessKeyId,secretAccessKey:r.secretAccessKey,expiration:r.expiration}},Dl=function(r,s){const e=setTimeout(()=>{throw new Error("SignatureV4S3Express credential override was created but not called.")},10),a=r.credentialProvider,l=()=>{return clearTimeout(e),r.credentialProvider=a,Promise.resolve(s)};r.credentialProvider=l};class ls extends ge{async signWithCredentials(r,s,e){const a=Nl(s);r.headers[zr]=s.sessionToken;const l=this;return Dl(l,a),l.signRequest(r,e??{})}async presignWithCredentials(r,s,e){const a=Nl(s);return delete r.headers[zr],r.headers[as]=s.sessionToken,r.query=r.query??{},r.query[as]=s.sessionToken,Dl(this,a),this.presign(r,e)}}var Tl=(r)=>{return(s,e)=>async(a)=>{if(e.endpointV2){const l=e.endpointV2,f=l.properties?.authSchemes?.[0]?.name===yl;if(l.properties?.backend===kl||l.properties?.bucketType===Pl)e.isS3ExpressBucket=!0;if(f){const m=a.input.Bucket;if(m){const g=await r.s3ExpressIdentityProvider.getS3ExpressIdentity(await r.credentials(),{Bucket:m});if(e.s3ExpressIdentity=g,L.isInstance(a.request)&&g.sessionToken)a.request.headers[zr]=g.sessionToken}}}return s(a)}},$l={name:"s3ExpressMiddleware",step:"build",tags:["S3","S3_EXPRESS"],override:!0},de=(r)=>({applyToStack:(s)=>{s.add(Tl(r),$l)}});var Ml=T(Se(),1);var _g=T(Yg(),1),vl=T(me(),1);var Ul=async(r,s,e,a)=>{const l=await a.signWithCredentials(e,r,{});if(l.headers["X-Amz-Security-Token"]||l.headers["x-amz-security-token"])throw new Error("X-Amz-Security-Token must not be set for s3-express requests.");return l};var Og=(r)=>(s)=>{throw s},qg=(r,s)=>{};var Cl=(r)=>(s,e)=>async(a)=>{if(!L.isInstance(a.request))return s(a);const f=vl.getSmithyContext(e).selectedHttpAuthScheme;if(!f)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:h={}},identity:m,signer:g}=f;let w;if(e.s3ExpressIdentity)w=await Ul(e.s3ExpressIdentity,h,a.request,await r.signer());else w=await g.sign(a.request,m,h);const A=await s({...a,request:w}).catch((g.errorHandler||Og)(h));return(g.successHandler||qg)(A.response,h),A},ce=(r)=>({applyToStack:(s)=>{s.addRelativeTo(Cl(r),Ml.httpSigningMiddlewareOptions)}});var Hl=(r,{session:s})=>{const[e,a]=s;return{...r,forcePathStyle:r.forcePathStyle??!1,useAccelerateEndpoint:r.useAccelerateEndpoint??!1,disableMultiregionAccessPoints:r.disableMultiregionAccessPoints??!1,followRegionRedirects:r.followRegionRedirects??!1,s3ExpressIdentityProvider:r.s3ExpressIdentityProvider??new hr(async(l)=>e().send(new a({Bucket:l,SessionMode:"ReadWrite"}))),bucketEndpoint:r.bucketEndpoint??!1}};var jg={CopyObjectCommand:!0,UploadPartCopyCommand:!0,CompleteMultipartUploadCommand:!0},ig=3000,bg=(r)=>(s,e)=>async(a)=>{const l=await s(a),{response:f}=l;if(!xr.isInstance(f))return l;const{statusCode:h,body:m}=f;if(h<200||h>=300)return l;let g=m,w=m;if(m&&typeof m==="object"&&!(m instanceof Uint8Array))[g,w]=await zl(m);f.body=w;const A=await xg(g,{streamCollector:async(P)=>{return Gl(P,ig)}});if(typeof g?.destroy==="function")g.destroy();const I=r.utf8Encoder(A.subarray(A.length-16));if(A.length===0&&jg[e.commandName]){const P=new Error("S3 aborted request");throw P.name="InternalError",P}if(I&&I.endsWith("</Error>"))f.statusCode=400;return l},xg=(r=new Uint8Array,s)=>{if(r instanceof Uint8Array)return Promise.resolve(r);return s.streamCollector(r)||Promise.resolve(new Uint8Array)},og={relation:"after",toMiddleware:"deserializerMiddleware",tags:["THROW_200_EXCEPTIONS","S3"],name:"throw200ExceptionsMiddleware",override:!0},fs=(r)=>({applyToStack:(s)=>{s.addRelativeTo(bg(r),og)}});var Ae=(r)=>typeof r==="string"&&r.indexOf("arn:")===0&&r.split(":").length>=6;function Fl(r){return(s,e)=>async(a)=>{if(r.bucketEndpoint){const l=e.endpointV2;if(l){const f=a.input.Bucket;if(typeof f==="string")try{const h=new URL(f);l.url=h}catch(h){const m=`@aws-sdk/middleware-sdk-s3: bucketEndpoint=true was set but Bucket=${f} could not be parsed as URL.`;if(e.logger?.constructor?.name==="NoOpLogger")console.warn(m);else e.logger?.warn?.(m);throw h}}}return s(a)}}var Kl={name:"bucketEndpointMiddleware",override:!0,relation:"after",toMiddleware:"endpointV2Middleware"};function ng({bucketEndpoint:r}){return(s)=>async(e)=>{const{input:{Bucket:a}}=e;if(!r&&typeof a==="string"&&!Ae(a)&&a.indexOf("/")>=0){const l=new Error(`Bucket name shouldn't contain '/', received '${a}'`);throw l.name="InvalidBucketName",l}return s({...e})}}var pg={step:"initialize",tags:["VALIDATE_BUCKET_NAME"],name:"validateBucketNameMiddleware",override:!0},Ll=(r)=>({applyToStack:(s)=>{s.add(ng(r),pg),s.addRelativeTo(Fl(r),Kl)}});var yr=T(Se(),1);var Wl=(r)=>({...r,eventStreamMarshaller:r.eventStreamSerdeProvider(r)});var Es=T(Rs(),1);var hs={CrtSignerV4:null};class Re{constructor(r){this.sigv4Signer=new ls(r),this.signerOptions=r}async sign(r,s={}){if(s.signingRegion==="*"){if(this.signerOptions.runtime!=="node")throw new Error("This request requires signing with SigV4Asymmetric algorithm. It's only available in Node.js");return this.getSigv4aSigner().sign(r,s)}return this.sigv4Signer.sign(r,s)}async signWithCredentials(r,s,e={}){if(e.signingRegion==="*"){if(this.signerOptions.runtime!=="node")throw new Error("This request requires signing with SigV4Asymmetric algorithm. It's only available in Node.js");return this.getSigv4aSigner().signWithCredentials(r,s,e)}return this.sigv4Signer.signWithCredentials(r,s,e)}async presign(r,s={}){if(s.signingRegion==="*"){if(this.signerOptions.runtime!=="node")throw new Error("This request requires signing with SigV4Asymmetric algorithm. It's only available in Node.js");return this.getSigv4aSigner().presign(r,s)}return this.sigv4Signer.presign(r,s)}async presignWithCredentials(r,s,e={}){if(e.signingRegion==="*")throw new Error("Method presignWithCredentials is not supported for [signingRegion=*].");return this.sigv4Signer.presignWithCredentials(r,s,e)}getSigv4aSigner(){if(!this.sigv4aSigner){let r=null;try{if(r=hs.CrtSignerV4,typeof r!=="function")throw new Error}catch(s){throw s.message=`${s.message}\n`+'Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. \nYou must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. \nFor more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt',s}this.sigv4aSigner=new r({...this.signerOptions,signingAlgorithm:1})}return this.sigv4aSigner}}var Kr=T(me(),1);var gr={["required"]:!1,["type"]:"String"},wr={["required"]:!0,default:!1,["type"]:"Boolean"},Gr={["required"]:!1,["type"]:"Boolean"},Y={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"Accelerate"},!0]},N={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},y={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},v={["fn"]:"isSet",["argv"]:[{["ref"]:"Endpoint"}]},Mf={["fn"]:"aws.partition",["argv"]:[{["ref"]:"Region"}],["assign"]:"partitionResult"},Xl={["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[{["ref"]:"partitionResult"},"name"]},"aws-cn"]},Ss={["fn"]:"isSet",["argv"]:[{["ref"]:"Bucket"}]},X={["ref"]:"Bucket"},W={["fn"]:"parseURL",["argv"]:[{["ref"]:"Endpoint"}],["assign"]:"url"},ds={["fn"]:"booleanEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[{["ref"]:"url"},"isIp"]},!0]},vf={["ref"]:"url"},Cf={["fn"]:"uriEncode",["argv"]:[X],["assign"]:"uri_encoded_bucket"},j={["backend"]:"S3Express",["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3express",["signingRegion"]:"{Region}"}]},d={},Hf={["fn"]:"aws.isVirtualHostableS3Bucket",["argv"]:[X,!1]},Ee={["error"]:"S3Express bucket name is not a valid virtual hostable name.",["type"]:"error"},cs={["backend"]:"S3Express",["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4-s3express",["signingName"]:"s3express",["signingRegion"]:"{Region}"}]},Zl={["fn"]:"isSet",["argv"]:[{["ref"]:"UseS3ExpressControlEndpoint"}]},Ql={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseS3ExpressControlEndpoint"},!0]},S={["fn"]:"not",["argv"]:[v]},Vl={["error"]:"Unrecognized S3Express bucket name format.",["type"]:"error"},Bl={["fn"]:"not",["argv"]:[Ss]},Jl={["ref"]:"hardwareType"},Yl={["conditions"]:[S],["error"]:"Expected a endpoint to be specified but no endpoint was found",["type"]:"error"},ms={["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4a",["signingName"]:"s3-outposts",["signingRegionSet"]:["*"]},{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3-outposts",["signingRegion"]:"{Region}"}]},Ie={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"ForcePathStyle"},!1]},ug={["ref"]:"ForcePathStyle"},M={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"Accelerate"},!1]},H={["fn"]:"stringEquals",["argv"]:[{["ref"]:"Region"},"aws-global"]},G={["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3",["signingRegion"]:"us-east-1"}]},E={["fn"]:"not",["argv"]:[H]},F={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseGlobalEndpoint"},!0]},_l={["url"]:"https://{Bucket}.s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",["properties"]:{["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3",["signingRegion"]:"{Region}"}]},["headers"]:{}},C={["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3",["signingRegion"]:"{Region}"}]},K={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseGlobalEndpoint"},!1]},R={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!1]},Ol={["url"]:"https://{Bucket}.s3-fips.{Region}.{partitionResult#dnsSuffix}",["properties"]:C,["headers"]:{}},c={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!1]},ql={["url"]:"https://{Bucket}.s3-accelerate.dualstack.{partitionResult#dnsSuffix}",["properties"]:C,["headers"]:{}},jl={["url"]:"https://{Bucket}.s3.dualstack.{Region}.{partitionResult#dnsSuffix}",["properties"]:C,["headers"]:{}},Pe={["fn"]:"booleanEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[vf,"isIp"]},!1]},ke={["url"]:"{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}",["properties"]:C,["headers"]:{}},Ve={["url"]:"{url#scheme}://{Bucket}.{url#authority}{url#path}",["properties"]:C,["headers"]:{}},il={["endpoint"]:Ve,["type"]:"endpoint"},ye={["url"]:"https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}",["properties"]:C,["headers"]:{}},bl={["url"]:"https://{Bucket}.s3.{Region}.{partitionResult#dnsSuffix}",["properties"]:C,["headers"]:{}},gs={["error"]:"Invalid region: region was not a valid DNS name.",["type"]:"error"},V={["ref"]:"bucketArn"},zf={["ref"]:"arnType"},Ne={["fn"]:"getAttr",["argv"]:[V,"service"]},Be={["ref"]:"accessPointName"},xl={["conditions"]:[y],["error"]:"S3 Object Lambda does not support Dual-stack",["type"]:"error"},ol={["conditions"]:[Y],["error"]:"S3 Object Lambda does not support S3 Accelerate",["type"]:"error"},nl={["conditions"]:[{["fn"]:"isSet",["argv"]:[{["ref"]:"DisableAccessPoints"}]},{["fn"]:"booleanEquals",["argv"]:[{["ref"]:"DisableAccessPoints"},!0]}],["error"]:"Access points are not supported for this operation",["type"]:"error"},De={["conditions"]:[{["fn"]:"isSet",["argv"]:[{["ref"]:"UseArnRegion"}]},{["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseArnRegion"},!1]},{["fn"]:"not",["argv"]:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[V,"region"]},"{Region}"]}]}],["error"]:"Invalid configuration: region from ARN `{bucketArn#region}` does not match client region `{Region}` and UseArnRegion is `false`",["type"]:"error"},Gf={["fn"]:"getAttr",["argv"]:[{["ref"]:"bucketPartition"},"name"]},Ff={["fn"]:"getAttr",["argv"]:[V,"accountId"]},Te={["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3-object-lambda",["signingRegion"]:"{bucketArn#region}"}]},pl={["error"]:"Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `{accessPointName}`",["type"]:"error"},$e={["error"]:"Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `{bucketArn#accountId}`",["type"]:"error"},Ue={["error"]:"Invalid region in ARN: `{bucketArn#region}` (invalid DNS name)",["type"]:"error"},Me={["error"]:"Client was configured for partition `{partitionResult#name}` but ARN (`{Bucket}`) has `{bucketPartition#name}`",["type"]:"error"},ul={["error"]:"Invalid ARN: The ARN may only contain a single resource component after `accesspoint`.",["type"]:"error"},tl={["error"]:"Invalid ARN: Expected a resource of the format `accesspoint:<accesspoint name>` but no name was provided",["type"]:"error"},Fr={["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3",["signingRegion"]:"{bucketArn#region}"}]},rf={["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4a",["signingName"]:"s3-outposts",["signingRegionSet"]:["*"]},{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3-outposts",["signingRegion"]:"{bucketArn#region}"}]},sf={["fn"]:"aws.parseArn",["argv"]:[X]},ef={["url"]:"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:C,["headers"]:{}},af={["url"]:"https://s3-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:C,["headers"]:{}},lf={["url"]:"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:C,["headers"]:{}},ve={["url"]:"{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}",["properties"]:C,["headers"]:{}},ff={["url"]:"https://s3.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:C,["headers"]:{}},hf={["ref"]:"UseObjectLambdaEndpoint"},Ce={["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3-object-lambda",["signingRegion"]:"{Region}"}]},mf={["url"]:"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",["properties"]:C,["headers"]:{}},gf={["url"]:"https://s3-fips.{Region}.{partitionResult#dnsSuffix}",["properties"]:C,["headers"]:{}},wf={["url"]:"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}",["properties"]:C,["headers"]:{}},He={["url"]:"{url#scheme}://{url#authority}{url#path}",["properties"]:C,["headers"]:{}},df={["url"]:"https://s3.{Region}.{partitionResult#dnsSuffix}",["properties"]:C,["headers"]:{}},ze=[{["ref"]:"Region"}],tg=[{["ref"]:"Endpoint"}],rw=[X],Ge=[y],ws=[Y],rr=[v,W],Sf=[{["fn"]:"isSet",["argv"]:[{["ref"]:"DisableS3ExpressSessionAuth"}]},{["fn"]:"booleanEquals",["argv"]:[{["ref"]:"DisableS3ExpressSessionAuth"},!0]}],cf=[ds],Fe=[Cf],Ke=[Hf],dr=[N],Af=[{["fn"]:"substring",["argv"]:[X,6,14,!0],["assign"]:"s3expressAvailabilityZoneId"},{["fn"]:"substring",["argv"]:[X,14,16,!0],["assign"]:"s3expressAvailabilityZoneDelim"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"s3expressAvailabilityZoneDelim"},"--"]}],Rf=[{["conditions"]:[N],["endpoint"]:{["url"]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.amazonaws.com",["properties"]:j,["headers"]:{}},["type"]:"endpoint"},{["endpoint"]:{["url"]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.amazonaws.com",["properties"]:j,["headers"]:{}},["type"]:"endpoint"}],Ef=[{["fn"]:"substring",["argv"]:[X,6,15,!0],["assign"]:"s3expressAvailabilityZoneId"},{["fn"]:"substring",["argv"]:[X,15,17,!0],["assign"]:"s3expressAvailabilityZoneDelim"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"s3expressAvailabilityZoneDelim"},"--"]}],If=[{["conditions"]:[N],["endpoint"]:{["url"]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.amazonaws.com",["properties"]:cs,["headers"]:{}},["type"]:"endpoint"},{["endpoint"]:{["url"]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.amazonaws.com",["properties"]:cs,["headers"]:{}},["type"]:"endpoint"}],sw=[Ss],Pf=[{["fn"]:"isValidHostLabel",["argv"]:[{["ref"]:"outpostId"},!1]}],kf=[{["fn"]:"stringEquals",["argv"]:[{["ref"]:"regionPrefix"},"beta"]}],ew=["*"],x=[Mf],yf=[{["fn"]:"isValidHostLabel",["argv"]:[{["ref"]:"Region"},!1]}],o=[{["fn"]:"stringEquals",["argv"]:[{["ref"]:"Region"},"us-east-1"]}],Le=[{["fn"]:"stringEquals",["argv"]:[zf,"accesspoint"]}],Nf=[{["fn"]:"getAttr",["argv"]:[V,"resourceId[1]"],["assign"]:"accessPointName"},{["fn"]:"not",["argv"]:[{["fn"]:"stringEquals",["argv"]:[Be,""]}]}],aw=[V,"resourceId[1]"],We=[{["fn"]:"not",["argv"]:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[V,"region"]},""]}]}],Df=[{["fn"]:"not",["argv"]:[{["fn"]:"isSet",["argv"]:[{["fn"]:"getAttr",["argv"]:[V,"resourceId[2]"]}]}]}],lw=[V,"resourceId[2]"],Xe=[{["fn"]:"aws.partition",["argv"]:[{["fn"]:"getAttr",["argv"]:[V,"region"]}],["assign"]:"bucketPartition"}],Tf=[{["fn"]:"stringEquals",["argv"]:[Gf,{["fn"]:"getAttr",["argv"]:[{["ref"]:"partitionResult"},"name"]}]}],Ze=[{["fn"]:"isValidHostLabel",["argv"]:[{["fn"]:"getAttr",["argv"]:[V,"region"]},!0]}],Qe=[{["fn"]:"isValidHostLabel",["argv"]:[Ff,!1]}],$f=[{["fn"]:"isValidHostLabel",["argv"]:[Be,!1]}],Uf=[{["fn"]:"isValidHostLabel",["argv"]:[{["ref"]:"Region"},!0]}],fw={version:"1.0",parameters:{Bucket:gr,Region:gr,UseFIPS:wr,UseDualStack:wr,Endpoint:gr,ForcePathStyle:wr,Accelerate:wr,UseGlobalEndpoint:wr,UseObjectLambdaEndpoint:Gr,Key:gr,Prefix:gr,CopySource:gr,DisableAccessPoints:Gr,DisableMultiRegionAccessPoints:wr,UseArnRegion:Gr,UseS3ExpressControlEndpoint:Gr,DisableS3ExpressSessionAuth:Gr},rules:[{["conditions"]:[{["fn"]:"isSet",["argv"]:ze}],rules:[{["conditions"]:[Y,N],error:"Accelerate cannot be used with FIPS",["type"]:"error"},{["conditions"]:[y,v],error:"Cannot set dual-stack in combination with a custom endpoint.",["type"]:"error"},{["conditions"]:[v,N],error:"A custom endpoint cannot be combined with FIPS",["type"]:"error"},{["conditions"]:[v,Y],error:"A custom endpoint cannot be combined with S3 Accelerate",["type"]:"error"},{["conditions"]:[N,Mf,Xl],error:"Partition does not support FIPS",["type"]:"error"},{["conditions"]:[Ss,{["fn"]:"substring",["argv"]:[X,0,6,!0],["assign"]:"bucketSuffix"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"bucketSuffix"},"--x-s3"]}],rules:[{["conditions"]:Ge,error:"S3Express does not support Dual-stack.",["type"]:"error"},{["conditions"]:ws,error:"S3Express does not support S3 Accelerate.",["type"]:"error"},{["conditions"]:rr,rules:[{["conditions"]:Sf,rules:[{["conditions"]:cf,rules:[{["conditions"]:Fe,rules:[{endpoint:{["url"]:"{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}",["properties"]:j,["headers"]:d},["type"]:"endpoint"}],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:Ke,rules:[{endpoint:{["url"]:"{url#scheme}://{Bucket}.{url#authority}{url#path}",["properties"]:j,["headers"]:d},["type"]:"endpoint"}],["type"]:"tree"},Ee],["type"]:"tree"},{["conditions"]:cf,rules:[{["conditions"]:Fe,rules:[{endpoint:{["url"]:"{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}",["properties"]:cs,["headers"]:d},["type"]:"endpoint"}],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:Ke,rules:[{endpoint:{["url"]:"{url#scheme}://{Bucket}.{url#authority}{url#path}",["properties"]:cs,["headers"]:d},["type"]:"endpoint"}],["type"]:"tree"},Ee],["type"]:"tree"},{["conditions"]:[Zl,Ql],rules:[{["conditions"]:[Cf,S],rules:[{["conditions"]:dr,endpoint:{["url"]:"https://s3express-control-fips.{Region}.amazonaws.com/{uri_encoded_bucket}",["properties"]:j,["headers"]:d},["type"]:"endpoint"},{endpoint:{["url"]:"https://s3express-control.{Region}.amazonaws.com/{uri_encoded_bucket}",["properties"]:j,["headers"]:d},["type"]:"endpoint"}],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:Ke,rules:[{["conditions"]:Sf,rules:[{["conditions"]:Af,rules:Rf,["type"]:"tree"},{["conditions"]:Ef,rules:Rf,["type"]:"tree"},Vl],["type"]:"tree"},{["conditions"]:Af,rules:If,["type"]:"tree"},{["conditions"]:Ef,rules:If,["type"]:"tree"},Vl],["type"]:"tree"},Ee],["type"]:"tree"},{["conditions"]:[Bl,Zl,Ql],rules:[{["conditions"]:rr,endpoint:{["url"]:"{url#scheme}://{url#authority}{url#path}",["properties"]:j,["headers"]:d},["type"]:"endpoint"},{["conditions"]:dr,endpoint:{["url"]:"https://s3express-control-fips.{Region}.amazonaws.com",["properties"]:j,["headers"]:d},["type"]:"endpoint"},{endpoint:{["url"]:"https://s3express-control.{Region}.amazonaws.com",["properties"]:j,["headers"]:d},["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[Ss,{["fn"]:"substring",["argv"]:[X,49,50,!0],["assign"]:"hardwareType"},{["fn"]:"substring",["argv"]:[X,8,12,!0],["assign"]:"regionPrefix"},{["fn"]:"substring",["argv"]:[X,0,7,!0],["assign"]:"bucketAliasSuffix"},{["fn"]:"substring",["argv"]:[X,32,49,!0],["assign"]:"outpostId"},{["fn"]:"aws.partition",["argv"]:ze,["assign"]:"regionPartition"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"bucketAliasSuffix"},"--op-s3"]}],rules:[{["conditions"]:Pf,rules:[{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[Jl,"e"]}],rules:[{["conditions"]:kf,rules:[Yl,{["conditions"]:rr,endpoint:{["url"]:"https://{Bucket}.ec2.{url#authority}",["properties"]:ms,["headers"]:d},["type"]:"endpoint"}],["type"]:"tree"},{endpoint:{["url"]:"https://{Bucket}.ec2.s3-outposts.{Region}.{regionPartition#dnsSuffix}",["properties"]:ms,["headers"]:d},["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[Jl,"o"]}],rules:[{["conditions"]:kf,rules:[Yl,{["conditions"]:rr,endpoint:{["url"]:"https://{Bucket}.op-{outpostId}.{url#authority}",["properties"]:ms,["headers"]:d},["type"]:"endpoint"}],["type"]:"tree"},{endpoint:{["url"]:"https://{Bucket}.op-{outpostId}.s3-outposts.{Region}.{regionPartition#dnsSuffix}",["properties"]:ms,["headers"]:d},["type"]:"endpoint"}],["type"]:"tree"},{error:"Unrecognized hardware type: \"Expected hardware type o or e but got {hardwareType}\"",["type"]:"error"}],["type"]:"tree"},{error:"Invalid ARN: The outpost Id must only contain a-z, A-Z, 0-9 and `-`.",["type"]:"error"}],["type"]:"tree"},{["conditions"]:sw,rules:[{["conditions"]:[v,{["fn"]:"not",["argv"]:[{["fn"]:"isSet",["argv"]:[{["fn"]:"parseURL",["argv"]:tg}]}]}],error:"Custom endpoint `{Endpoint}` was not a valid URI",["type"]:"error"},{["conditions"]:[Ie,Hf],rules:[{["conditions"]:x,rules:[{["conditions"]:yf,rules:[{["conditions"]:[Y,Xl],error:"S3 Accelerate cannot be used in this region",["type"]:"error"},{["conditions"]:[y,N,M,S,H],endpoint:{["url"]:"https://{Bucket}.s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}",["properties"]:G,["headers"]:d},["type"]:"endpoint"},{["conditions"]:[y,N,M,S,E,F],rules:[{endpoint:_l,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[y,N,M,S,E,K],endpoint:_l,["type"]:"endpoint"},{["conditions"]:[R,N,M,S,H],endpoint:{["url"]:"https://{Bucket}.s3-fips.us-east-1.{partitionResult#dnsSuffix}",["properties"]:G,["headers"]:d},["type"]:"endpoint"},{["conditions"]:[R,N,M,S,E,F],rules:[{endpoint:Ol,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[R,N,M,S,E,K],endpoint:Ol,["type"]:"endpoint"},{["conditions"]:[y,c,Y,S,H],endpoint:{["url"]:"https://{Bucket}.s3-accelerate.dualstack.us-east-1.{partitionResult#dnsSuffix}",["properties"]:G,["headers"]:d},["type"]:"endpoint"},{["conditions"]:[y,c,Y,S,E,F],rules:[{endpoint:ql,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[y,c,Y,S,E,K],endpoint:ql,["type"]:"endpoint"},{["conditions"]:[y,c,M,S,H],endpoint:{["url"]:"https://{Bucket}.s3.dualstack.us-east-1.{partitionResult#dnsSuffix}",["properties"]:G,["headers"]:d},["type"]:"endpoint"},{["conditions"]:[y,c,M,S,E,F],rules:[{endpoint:jl,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[y,c,M,S,E,K],endpoint:jl,["type"]:"endpoint"},{["conditions"]:[R,c,M,v,W,ds,H],endpoint:{["url"]:"{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}",["properties"]:G,["headers"]:d},["type"]:"endpoint"},{["conditions"]:[R,c,M,v,W,Pe,H],endpoint:{["url"]:"{url#scheme}://{Bucket}.{url#authority}{url#path}",["properties"]:G,["headers"]:d},["type"]:"endpoint"},{["conditions"]:[R,c,M,v,W,ds,E,F],rules:[{["conditions"]:o,endpoint:ke,["type"]:"endpoint"},{endpoint:ke,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[R,c,M,v,W,Pe,E,F],rules:[{["conditions"]:o,endpoint:Ve,["type"]:"endpoint"},il],["type"]:"tree"},{["conditions"]:[R,c,M,v,W,ds,E,K],endpoint:ke,["type"]:"endpoint"},{["conditions"]:[R,c,M,v,W,Pe,E,K],endpoint:Ve,["type"]:"endpoint"},{["conditions"]:[R,c,Y,S,H],endpoint:{["url"]:"https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}",["properties"]:G,["headers"]:d},["type"]:"endpoint"},{["conditions"]:[R,c,Y,S,E,F],rules:[{["conditions"]:o,endpoint:ye,["type"]:"endpoint"},{endpoint:ye,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[R,c,Y,S,E,K],endpoint:ye,["type"]:"endpoint"},{["conditions"]:[R,c,M,S,H],endpoint:{["url"]:"https://{Bucket}.s3.{partitionResult#dnsSuffix}",["properties"]:G,["headers"]:d},["type"]:"endpoint"},{["conditions"]:[R,c,M,S,E,F],rules:[{["conditions"]:o,endpoint:{["url"]:"https://{Bucket}.s3.{partitionResult#dnsSuffix}",["properties"]:C,["headers"]:d},["type"]:"endpoint"},{endpoint:bl,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[R,c,M,S,E,K],endpoint:bl,["type"]:"endpoint"}],["type"]:"tree"},gs],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:[v,W,{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[vf,"scheme"]},"http"]},{["fn"]:"aws.isVirtualHostableS3Bucket",["argv"]:[X,!0]},Ie,c,R,M],rules:[{["conditions"]:x,rules:[{["conditions"]:yf,rules:[il],["type"]:"tree"},gs],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:[Ie,{["fn"]:"aws.parseArn",["argv"]:rw,["assign"]:"bucketArn"}],rules:[{["conditions"]:[{["fn"]:"getAttr",["argv"]:[V,"resourceId[0]"],["assign"]:"arnType"},{["fn"]:"not",["argv"]:[{["fn"]:"stringEquals",["argv"]:[zf,""]}]}],rules:[{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[Ne,"s3-object-lambda"]}],rules:[{["conditions"]:Le,rules:[{["conditions"]:Nf,rules:[xl,ol,{["conditions"]:We,rules:[nl,{["conditions"]:Df,rules:[De,{["conditions"]:Xe,rules:[{["conditions"]:x,rules:[{["conditions"]:Tf,rules:[{["conditions"]:Ze,rules:[{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[Ff,""]}],error:"Invalid ARN: Missing account id",["type"]:"error"},{["conditions"]:Qe,rules:[{["conditions"]:$f,rules:[{["conditions"]:rr,endpoint:{["url"]:"{url#scheme}://{accessPointName}-{bucketArn#accountId}.{url#authority}{url#path}",["properties"]:Te,["headers"]:d},["type"]:"endpoint"},{["conditions"]:dr,endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}",["properties"]:Te,["headers"]:d},["type"]:"endpoint"},{endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda.{bucketArn#region}.{bucketPartition#dnsSuffix}",["properties"]:Te,["headers"]:d},["type"]:"endpoint"}],["type"]:"tree"},pl],["type"]:"tree"},$e],["type"]:"tree"},Ue],["type"]:"tree"},Me],["type"]:"tree"}],["type"]:"tree"}],["type"]:"tree"},ul],["type"]:"tree"},{error:"Invalid ARN: bucket ARN is missing a region",["type"]:"error"}],["type"]:"tree"},tl],["type"]:"tree"},{error:"Invalid ARN: Object Lambda ARNs only support `accesspoint` arn types, but found: `{arnType}`",["type"]:"error"}],["type"]:"tree"},{["conditions"]:Le,rules:[{["conditions"]:Nf,rules:[{["conditions"]:We,rules:[{["conditions"]:Le,rules:[{["conditions"]:We,rules:[nl,{["conditions"]:Df,rules:[De,{["conditions"]:Xe,rules:[{["conditions"]:x,rules:[{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[Gf,"{partitionResult#name}"]}],rules:[{["conditions"]:Ze,rules:[{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[Ne,"s3"]}],rules:[{["conditions"]:Qe,rules:[{["conditions"]:$f,rules:[{["conditions"]:ws,error:"Access Points do not support S3 Accelerate",["type"]:"error"},{["conditions"]:[N,y],endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}",["properties"]:Fr,["headers"]:d},["type"]:"endpoint"},{["conditions"]:[N,R],endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}",["properties"]:Fr,["headers"]:d},["type"]:"endpoint"},{["conditions"]:[c,y],endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}",["properties"]:Fr,["headers"]:d},["type"]:"endpoint"},{["conditions"]:[c,R,v,W],endpoint:{["url"]:"{url#scheme}://{accessPointName}-{bucketArn#accountId}.{url#authority}{url#path}",["properties"]:Fr,["headers"]:d},["type"]:"endpoint"},{["conditions"]:[c,R],endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.{bucketArn#region}.{bucketPartition#dnsSuffix}",["properties"]:Fr,["headers"]:d},["type"]:"endpoint"}],["type"]:"tree"},pl],["type"]:"tree"},$e],["type"]:"tree"},{error:"Invalid ARN: The ARN was not for the S3 service, found: {bucketArn#service}",["type"]:"error"}],["type"]:"tree"},Ue],["type"]:"tree"},Me],["type"]:"tree"}],["type"]:"tree"}],["type"]:"tree"},ul],["type"]:"tree"}],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:[{["fn"]:"isValidHostLabel",["argv"]:[Be,!0]}],rules:[{["conditions"]:Ge,error:"S3 MRAP does not support dual-stack",["type"]:"error"},{["conditions"]:dr,error:"S3 MRAP does not support FIPS",["type"]:"error"},{["conditions"]:ws,error:"S3 MRAP does not support S3 Accelerate",["type"]:"error"},{["conditions"]:[{["fn"]:"booleanEquals",["argv"]:[{["ref"]:"DisableMultiRegionAccessPoints"},!0]}],error:"Invalid configuration: Multi-Region Access Point ARNs are disabled.",["type"]:"error"},{["conditions"]:[{["fn"]:"aws.partition",["argv"]:ze,["assign"]:"mrapPartition"}],rules:[{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[{["ref"]:"mrapPartition"},"name"]},{["fn"]:"getAttr",["argv"]:[V,"partition"]}]}],rules:[{endpoint:{["url"]:"https://{accessPointName}.accesspoint.s3-global.{mrapPartition#dnsSuffix}",["properties"]:{["authSchemes"]:[{["disableDoubleEncoding"]:!0,name:"sigv4a",["signingName"]:"s3",["signingRegionSet"]:ew}]},["headers"]:d},["type"]:"endpoint"}],["type"]:"tree"},{error:"Client was configured for partition `{mrapPartition#name}` but bucket referred to partition `{bucketArn#partition}`",["type"]:"error"}],["type"]:"tree"}],["type"]:"tree"},{error:"Invalid Access Point Name",["type"]:"error"}],["type"]:"tree"},tl],["type"]:"tree"},{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[Ne,"s3-outposts"]}],rules:[{["conditions"]:Ge,error:"S3 Outposts does not support Dual-stack",["type"]:"error"},{["conditions"]:dr,error:"S3 Outposts does not support FIPS",["type"]:"error"},{["conditions"]:ws,error:"S3 Outposts does not support S3 Accelerate",["type"]:"error"},{["conditions"]:[{["fn"]:"isSet",["argv"]:[{["fn"]:"getAttr",["argv"]:[V,"resourceId[4]"]}]}],error:"Invalid Arn: Outpost Access Point ARN contains sub resources",["type"]:"error"},{["conditions"]:[{["fn"]:"getAttr",["argv"]:aw,["assign"]:"outpostId"}],rules:[{["conditions"]:Pf,rules:[De,{["conditions"]:Xe,rules:[{["conditions"]:x,rules:[{["conditions"]:Tf,rules:[{["conditions"]:Ze,rules:[{["conditions"]:Qe,rules:[{["conditions"]:[{["fn"]:"getAttr",["argv"]:lw,["assign"]:"outpostType"}],rules:[{["conditions"]:[{["fn"]:"getAttr",["argv"]:[V,"resourceId[3]"],["assign"]:"accessPointName"}],rules:[{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[{["ref"]:"outpostType"},"accesspoint"]}],rules:[{["conditions"]:rr,endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.{url#authority}",["properties"]:rf,["headers"]:d},["type"]:"endpoint"},{endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.s3-outposts.{bucketArn#region}.{bucketPartition#dnsSuffix}",["properties"]:rf,["headers"]:d},["type"]:"endpoint"}],["type"]:"tree"},{error:"Expected an outpost type `accesspoint`, found {outpostType}",["type"]:"error"}],["type"]:"tree"},{error:"Invalid ARN: expected an access point name",["type"]:"error"}],["type"]:"tree"},{error:"Invalid ARN: Expected a 4-component resource",["type"]:"error"}],["type"]:"tree"},$e],["type"]:"tree"},Ue],["type"]:"tree"},Me],["type"]:"tree"}],["type"]:"tree"}],["type"]:"tree"},{error:"Invalid ARN: The outpost Id may only contain a-z, A-Z, 0-9 and `-`. Found: `{outpostId}`",["type"]:"error"}],["type"]:"tree"},{error:"Invalid ARN: The Outpost Id was not set",["type"]:"error"}],["type"]:"tree"},{error:"Invalid ARN: Unrecognized format: {Bucket} (type: {arnType})",["type"]:"error"}],["type"]:"tree"},{error:"Invalid ARN: No ARN type specified",["type"]:"error"}],["type"]:"tree"},{["conditions"]:[{["fn"]:"substring",["argv"]:[X,0,4,!1],["assign"]:"arnPrefix"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"arnPrefix"},"arn:"]},{["fn"]:"not",["argv"]:[{["fn"]:"isSet",["argv"]:[sf]}]}],error:"Invalid ARN: `{Bucket}` was not a valid ARN",["type"]:"error"},{["conditions"]:[{["fn"]:"booleanEquals",["argv"]:[ug,!0]},sf],error:"Path-style addressing cannot be used with ARN buckets",["type"]:"error"},{["conditions"]:Fe,rules:[{["conditions"]:x,rules:[{["conditions"]:[M],rules:[{["conditions"]:[y,S,N,H],endpoint:{["url"]:"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:G,["headers"]:d},["type"]:"endpoint"},{["conditions"]:[y,S,N,E,F],rules:[{endpoint:ef,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[y,S,N,E,K],endpoint:ef,["type"]:"endpoint"},{["conditions"]:[R,S,N,H],endpoint:{["url"]:"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:G,["headers"]:d},["type"]:"endpoint"},{["conditions"]:[R,S,N,E,F],rules:[{endpoint:af,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[R,S,N,E,K],endpoint:af,["type"]:"endpoint"},{["conditions"]:[y,S,c,H],endpoint:{["url"]:"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:G,["headers"]:d},["type"]:"endpoint"},{["conditions"]:[y,S,c,E,F],rules:[{endpoint:lf,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[y,S,c,E,K],endpoint:lf,["type"]:"endpoint"},{["conditions"]:[R,v,W,c,H],endpoint:{["url"]:"{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}",["properties"]:G,["headers"]:d},["type"]:"endpoint"},{["conditions"]:[R,v,W,c,E,F],rules:[{["conditions"]:o,endpoint:ve,["type"]:"endpoint"},{endpoint:ve,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[R,v,W,c,E,K],endpoint:ve,["type"]:"endpoint"},{["conditions"]:[R,S,c,H],endpoint:{["url"]:"https://s3.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:G,["headers"]:d},["type"]:"endpoint"},{["conditions"]:[R,S,c,E,F],rules:[{["conditions"]:o,endpoint:{["url"]:"https://s3.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:C,["headers"]:d},["type"]:"endpoint"},{endpoint:ff,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[R,S,c,E,K],endpoint:ff,["type"]:"endpoint"}],["type"]:"tree"},{error:"Path-style addressing cannot be used with S3 Accelerate",["type"]:"error"}],["type"]:"tree"}],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:[{["fn"]:"isSet",["argv"]:[hf]},{["fn"]:"booleanEquals",["argv"]:[hf,!0]}],rules:[{["conditions"]:x,rules:[{["conditions"]:Uf,rules:[xl,ol,{["conditions"]:rr,endpoint:{["url"]:"{url#scheme}://{url#authority}{url#path}",["properties"]:Ce,["headers"]:d},["type"]:"endpoint"},{["conditions"]:dr,endpoint:{["url"]:"https://s3-object-lambda-fips.{Region}.{partitionResult#dnsSuffix}",["properties"]:Ce,["headers"]:d},["type"]:"endpoint"},{endpoint:{["url"]:"https://s3-object-lambda.{Region}.{partitionResult#dnsSuffix}",["properties"]:Ce,["headers"]:d},["type"]:"endpoint"}],["type"]:"tree"},gs],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:[Bl],rules:[{["conditions"]:x,rules:[{["conditions"]:Uf,rules:[{["conditions"]:[N,y,S,H],endpoint:{["url"]:"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}",["properties"]:G,["headers"]:d},["type"]:"endpoint"},{["conditions"]:[N,y,S,E,F],rules:[{endpoint:mf,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[N,y,S,E,K],endpoint:mf,["type"]:"endpoint"},{["conditions"]:[N,R,S,H],endpoint:{["url"]:"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}",["properties"]:G,["headers"]:d},["type"]:"endpoint"},{["conditions"]:[N,R,S,E,F],rules:[{endpoint:gf,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[N,R,S,E,K],endpoint:gf,["type"]:"endpoint"},{["conditions"]:[c,y,S,H],endpoint:{["url"]:"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}",["properties"]:G,["headers"]:d},["type"]:"endpoint"},{["conditions"]:[c,y,S,E,F],rules:[{endpoint:wf,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[c,y,S,E,K],endpoint:wf,["type"]:"endpoint"},{["conditions"]:[c,R,v,W,H],endpoint:{["url"]:"{url#scheme}://{url#authority}{url#path}",["properties"]:G,["headers"]:d},["type"]:"endpoint"},{["conditions"]:[c,R,v,W,E,F],rules:[{["conditions"]:o,endpoint:He,["type"]:"endpoint"},{endpoint:He,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[c,R,v,W,E,K],endpoint:He,["type"]:"endpoint"},{["conditions"]:[c,R,S,H],endpoint:{["url"]:"https://s3.{partitionResult#dnsSuffix}",["properties"]:G,["headers"]:d},["type"]:"endpoint"},{["conditions"]:[c,R,S,E,F],rules:[{["conditions"]:o,endpoint:{["url"]:"https://s3.{partitionResult#dnsSuffix}",["properties"]:C,["headers"]:d},["type"]:"endpoint"},{endpoint:df,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[c,R,S,E,K],endpoint:df,["type"]:"endpoint"}],["type"]:"tree"},gs],["type"]:"tree"}],["type"]:"tree"}],["type"]:"tree"},{error:"A region must be set when sending requests to S3.",["type"]:"error"}]},Kf=fw;var As=(r,s={})=>{return Wf(Kf,{endpointParams:r,logger:s.logger})};Lf.aws=Xf;var Vf=function(r){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"s3",region:r.region},propertiesExtractor:(s,e)=>({signingProperties:{config:s,context:e}})}},Bf=function(r){return{schemeId:"aws.auth#sigv4a",signingProperties:{name:"s3",region:r.region},propertiesExtractor:(s,e)=>({signingProperties:{config:s,context:e}})}},hw=(r)=>async(s,e,a)=>{if(!a)throw new Error("Could not find \`input\` for \`defaultEndpointRuleSetHttpAuthSchemeParametersProvider\`");const l=await r(s,e,a),f=Kr.getSmithyContext(e)?.commandInstance?.constructor?.getEndpointParameterInstructions;if(!f)throw new Error(`getEndpointParameterInstructions() is not defined on \`${e.commandName}\``);const h=await Zf(a,{getEndpointParameterInstructions:f},s);return Object.assign(l,h)},mw=async(r,s,e)=>{return{operation:Kr.getSmithyContext(s).operation,region:await Kr.normalizeProvider(r.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},Qf=hw(mw),gw=(r,s,e)=>{return(l)=>{const h=r(l).properties?.authSchemes;if(!h)return s(l);const m=[];for(let g of h){const{name:w,properties:A={},...I}=g,P=w.toLowerCase();if(w!==P)console.warn(`HttpAuthScheme has been normalized with lowercasing: \`${w}\` to \`${P}\``);let U;if(P==="sigv4a"){U="aws.auth#sigv4a";const qr=h.find((q)=>{const Tr=q.name.toLowerCase();return Tr!=="sigv4a"&&Tr.startsWith("sigv4")});if(!hs.CrtSignerV4&&qr)continue}else if(P.startsWith("sigv4"))U="aws.auth#sigv4";else throw new Error(`Unknown HttpAuthScheme found in \`@smithy.rules#endpointRuleSet\`: \`${P}\``);const D=e[U];if(!D)throw new Error(`Could not find HttpAuthOption create function for \`${U}\``);const Q=D(l);Q.schemeId=U,Q.signingProperties={...Q.signingProperties||{},...I,...A},m.push(Q)}return m}},ww=(r)=>{const s=[];switch(r.operation){default:s.push(Vf(r)),s.push(Bf(r))}return s},Jf=gw(As,ww,{"aws.auth#sigv4":Vf,"aws.auth#sigv4a":Bf}),Yf=(r)=>{const s=Es.resolveAwsSdkSigV4Config(r);return{...Es.resolveAwsSdkSigV4AConfig(s)}};var _f=(r)=>{return{...r,useFipsEndpoint:r.useFipsEndpoint??!1,useDualstackEndpoint:r.useDualstackEndpoint??!1,forcePathStyle:r.forcePathStyle??!1,useAccelerateEndpoint:r.useAccelerateEndpoint??!1,useGlobalEndpoint:r.useGlobalEndpoint??!1,disableMultiregionAccessPoints:r.disableMultiregionAccessPoints??!1,defaultSigningName:"s3"}},Sr={ForcePathStyle:{type:"clientContextParams",name:"forcePathStyle"},UseArnRegion:{type:"clientContextParams",name:"useArnRegion"},DisableMultiRegionAccessPoints:{type:"clientContextParams",name:"disableMultiregionAccessPoints"},Accelerate:{type:"clientContextParams",name:"useAccelerateEndpoint"},DisableS3ExpressSessionAuth:{type:"clientContextParams",name:"disableS3ExpressSessionAuth"},UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};class Z extends Of{constructor(r){super(r);Object.setPrototypeOf(this,Z.prototype)}}class Is extends Z{constructor(r){super({name:"NoSuchUpload",$fault:"client",...r});this.name="NoSuchUpload",this.$fault="client",Object.setPrototypeOf(this,Is.prototype)}}class Ps extends Z{constructor(r){super({name:"ObjectNotInActiveTierError",$fault:"client",...r});this.name="ObjectNotInActiveTierError",this.$fault="client",Object.setPrototypeOf(this,Ps.prototype)}}class ks extends Z{constructor(r){super({name:"BucketAlreadyExists",$fault:"client",...r});this.name="BucketAlreadyExists",this.$fault="client",Object.setPrototypeOf(this,ks.prototype)}}class ys extends Z{constructor(r){super({name:"BucketAlreadyOwnedByYou",$fault:"client",...r});this.name="BucketAlreadyOwnedByYou",this.$fault="client",Object.setPrototypeOf(this,ys.prototype)}}class Ns extends Z{constructor(r){super({name:"NoSuchBucket",$fault:"client",...r});this.name="NoSuchBucket",this.$fault="client",Object.setPrototypeOf(this,Ns.prototype)}}var Je;(function(r){r.visit=(s,e)=>{if(s.Prefix!==void 0)return e.Prefix(s.Prefix);if(s.Tag!==void 0)return e.Tag(s.Tag);if(s.And!==void 0)return e.And(s.And);return e._(s.$unknown[0],s.$unknown[1])}})(Je||(Je={}));var Ye;(function(r){r.visit=(s,e)=>{if(s.Prefix!==void 0)return e.Prefix(s.Prefix);if(s.Tag!==void 0)return e.Tag(s.Tag);if(s.ObjectSizeGreaterThan!==void 0)return e.ObjectSizeGreaterThan(s.ObjectSizeGreaterThan);if(s.ObjectSizeLessThan!==void 0)return e.ObjectSizeLessThan(s.ObjectSizeLessThan);if(s.And!==void 0)return e.And(s.And);return e._(s.$unknown[0],s.$unknown[1])}})(Ye||(Ye={}));var _e;(function(r){r.visit=(s,e)=>{if(s.Prefix!==void 0)return e.Prefix(s.Prefix);if(s.Tag!==void 0)return e.Tag(s.Tag);if(s.AccessPointArn!==void 0)return e.AccessPointArn(s.AccessPointArn);if(s.And!==void 0)return e.And(s.And);return e._(s.$unknown[0],s.$unknown[1])}})(_e||(_e={}));var Oe;(function(r){r.visit=(s,e)=>{if(s.Prefix!==void 0)return e.Prefix(s.Prefix);if(s.Tag!==void 0)return e.Tag(s.Tag);if(s.And!==void 0)return e.And(s.And);return e._(s.$unknown[0],s.$unknown[1])}})(Oe||(Oe={}));class Ds extends Z{constructor(r){super({name:"InvalidObjectState",$fault:"client",...r});this.name="InvalidObjectState",this.$fault="client",Object.setPrototypeOf(this,Ds.prototype),this.StorageClass=r.StorageClass,this.AccessTier=r.AccessTier}}class Ts extends Z{constructor(r){super({name:"NoSuchKey",$fault:"client",...r});this.name="NoSuchKey",this.$fault="client",Object.setPrototypeOf(this,Ts.prototype)}}class $s extends Z{constructor(r){super({name:"NotFound",$fault:"client",...r});this.name="NotFound",this.$fault="client",Object.setPrototypeOf(this,$s.prototype)}}var dw=(r)=>({...r,...r.SecretAccessKey&&{SecretAccessKey:_},...r.SessionToken&&{SessionToken:_}}),qf=(r)=>({...r,...r.Credentials&&{Credentials:dw(r.Credentials)}});var jf=(r)=>({...r,...r.SSEKMSKeyId&&{SSEKMSKeyId:_}}),bf=(r)=>({...r,...r.SSECustomerKey&&{SSECustomerKey:_}});var Rr=T(Rs(),1);var Hs=T(Se(),1);class Us extends Z{constructor(r){super({name:"ObjectAlreadyInActiveTierError",$fault:"client",...r});this.name="ObjectAlreadyInActiveTierError",this.$fault="client",Object.setPrototypeOf(this,Us.prototype)}}var xf;(function(r){r.visit=(s,e)=>{if(s.Records!==void 0)return e.Records(s.Records);if(s.Stats!==void 0)return e.Stats(s.Stats);if(s.Progress!==void 0)return e.Progress(s.Progress);if(s.Cont!==void 0)return e.Cont(s.Cont);if(s.End!==void 0)return e.End(s.End);return e._(s.$unknown[0],s.$unknown[1])}})(xf||(xf={}));var of=(r)=>({...r,...r.SSEKMSKeyId&&{SSEKMSKeyId:_},...r.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:_}}),nf=(r)=>({...r,...r.SSECustomerKey&&{SSECustomerKey:_},...r.SSEKMSKeyId&&{SSEKMSKeyId:_},...r.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:_}});var wh=async(r,s)=>{const e=Hs.requestBuilder(r,s),a=z({},i,{[yd]:r[nw]});e.bp("/"),e.p("Bucket",()=>r.Bucket,"{Bucket}",!1);const l=z({[Ed]:[,""]});let f;return e.m("GET").h(a).q(l).b(f),e.build()};var dh=async(r,s)=>{const e=Hs.requestBuilder(r,s),a=z({},i,{[ad]:r[Xw],[ld]:[()=>i(r[pf]),()=>Lr(r[pf]).toString()],[fd]:r[Zw],[hd]:[()=>i(r[uf]),()=>Lr(r[uf]).toString()],[gd]:r[Yw],[Fs]:r[zs],[Oh]:r[vh],[Ks]:r[Gs],[Jh]:r[Mh],[Zh]:r[Nh],[kd]:r[vw]});e.bp("/{Key+}"),e.p("Bucket",()=>r.Bucket,"{Bucket}",!1),e.p("Key",()=>r.Key,"{Key+}",!0);const l=z({[ih]:[,"GetObject"],[wd]:[,r[_w]],[dd]:[,r[Ow]],[Sd]:[,r[qw]],[cd]:[,r[jw]],[Ad]:[,r[iw]],[Rd]:[()=>r.ResponseExpires!==void 0,()=>Lr(r[bw]).toString()],[Id]:[,r[wa]],[md]:[()=>r.PartNumber!==void 0,()=>r[Jw].toString()]});let f;return e.m("GET").h(a).q(l).b(f),e.build()};var Sh=async(r,s)=>{const e=Hs.requestBuilder(r,s),a=z({},i,{[Lh]:r[yh]||"application/octet-stream",[Pd]:r[$w],[zh]:r[Eh],[Gh]:r[Ih],[Fh]:r[Ph],[Kh]:r[kh],[ue]:[()=>i(r[oe]),()=>r[oe].toString()],[rd]:r[Cw],[vd]:r[Mw],[da]:r[aa],[Sa]:r[la],[ca]:r[fa],[Aa]:r[ha],[te]:[()=>i(r[ne]),()=>Lr(r[ne]).toString()],[Nd]:r[Fw],[Dd]:r[Kw],[Td]:r[Lw],[$d]:r[Ww],[Ra]:r[ma],[Yh]:r[Xr],[jh]:r[Hh],[Fs]:r[zs],[Oh]:r[vh],[Ks]:r[Gs],[Ea]:r[ga],[_h]:r[Ch],[Zr]:[()=>i(r[Cs]),()=>r[Cs].toString()],[Jh]:r[Mh],[Cd]:r[pw],[Vh]:r[$h],[ra]:[()=>i(r[pe]),()=>gh(r[pe]).toString()],[Qh]:r[Th],[Zh]:r[Nh],...r.Metadata!==void 0&&Object.keys(r.Metadata).reduce((m,g)=>{return m[`x-amz-meta-${g.toLowerCase()}`]=r.Metadata[g],m},{})});e.bp("/{Key+}"),e.p("Bucket",()=>r.Bucket,"{Bucket}",!1),e.p("Key",()=>r.Key,"{Key+}",!0);const l=z({[ih]:[,"PutObject"]});let f,h;if(r.Body!==void 0)h=r.Body,f=h;return e.m("PUT").h(a).q(l).b(f),e.build()};var ch=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return ea(r,s);const e=z({$metadata:J(r)}),a=cr(fh(await Rr.parseXmlBody(r.body,s)),"body");if(a[ie]!=null)e[ie]=Tw(a[ie],s);return e};var Ah=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return ea(r,s);const e=z({$metadata:J(r),[zw]:[()=>r.headers[rh]!==void 0,()=>vs(r.headers[rh])],[Uw]:[,r.headers[tw]],[Wr]:[,r.headers[Xh]],[ow]:[,r.headers[Ud]],[Qw]:[()=>r.headers[tf]!==void 0,()=>cr($r(r.headers[tf]))],[oe]:[()=>r.headers[ue]!==void 0,()=>hh(r.headers[ue])],[Dh]:[,r.headers[Wh]],[aa]:[,r.headers[da]],[la]:[,r.headers[Sa]],[fa]:[,r.headers[ca]],[ha]:[,r.headers[Aa]],[Vw]:[()=>r.headers[sh]!==void 0,()=>Ms(r.headers[sh])],[wa]:[,r.headers[qh]],[Eh]:[,r.headers[zh]],[Ih]:[,r.headers[Gh]],[Ph]:[,r.headers[Fh]],[kh]:[,r.headers[Kh]],[Hw]:[,r.headers[sd]],[yh]:[,r.headers[Lh]],[ne]:[()=>r.headers[te]!==void 0,()=>cr($r(r.headers[te]))],[Gw]:[,r.headers[ed]],[Hh]:[,r.headers[jh]],[ma]:[,r.headers[Ra]],[zs]:[,r.headers[Fs]],[Gs]:[,r.headers[Ks]],[ga]:[,r.headers[Ea]],[Cs]:[()=>r.headers[Zr]!==void 0,()=>vs(r.headers[Zr])],[Xr]:[,r.headers[Yh]],[Uh]:[,r.headers[Bh]],[xw]:[,r.headers[Md]],[Bw]:[()=>r.headers[eh]!==void 0,()=>Ms(r.headers[eh])],[uw]:[()=>r.headers[ah]!==void 0,()=>Ms(r.headers[ah])],[$h]:[,r.headers[Vh]],[pe]:[()=>r.headers[ra]!==void 0,()=>cr(sa(r.headers[ra]))],[Th]:[,r.headers[Qh]],Metadata:[,Object.keys(r.headers).filter((l)=>l.startsWith("x-amz-meta-")).reduce((l,f)=>{return l[f.substring(11)]=r.headers[f],l},{})]}),a=r.body;return s.sdkStreamMixin(a),e.Body=a,e};var Rh=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return ea(r,s);const e=z({$metadata:J(r),[Wr]:[,r.headers[Xh]],[Dh]:[,r.headers[Wh]],[aa]:[,r.headers[da]],[la]:[,r.headers[Sa]],[fa]:[,r.headers[ca]],[ha]:[,r.headers[Aa]],[ma]:[,r.headers[Ra]],[wa]:[,r.headers[qh]],[zs]:[,r.headers[Fs]],[Gs]:[,r.headers[Ks]],[ga]:[,r.headers[Ea]],[Ch]:[,r.headers[_h]],[Cs]:[()=>r.headers[Zr]!==void 0,()=>vs(r.headers[Zr])],[Uh]:[,r.headers[Bh]]});return await lh(r.body,s),e};var ea=async(r,s)=>{const e={...r,body:await Rr.parseXmlErrorBody(r.body,s)},a=Rr.loadRestXmlErrorCode(r,e.body);switch(a){case"NoSuchUpload":case"com.amazonaws.s3#NoSuchUpload":throw await kw(e,s);case"ObjectNotInActiveTierError":case"com.amazonaws.s3#ObjectNotInActiveTierError":throw await Dw(e,s);case"BucketAlreadyExists":case"com.amazonaws.s3#BucketAlreadyExists":throw await Aw(e,s);case"BucketAlreadyOwnedByYou":case"com.amazonaws.s3#BucketAlreadyOwnedByYou":throw await Rw(e,s);case"NoSuchBucket":case"com.amazonaws.s3#NoSuchBucket":throw await Iw(e,s);case"InvalidObjectState":case"com.amazonaws.s3#InvalidObjectState":throw await Ew(e,s);case"NoSuchKey":case"com.amazonaws.s3#NoSuchKey":throw await Pw(e,s);case"NotFound":case"com.amazonaws.s3#NotFound":throw await yw(e,s);case"ObjectAlreadyInActiveTierError":case"com.amazonaws.s3#ObjectAlreadyInActiveTierError":throw await Nw(e,s);default:const l=e.body;return cw({output:r,parsedBody:l,errorCode:a})}},cw=mh(Z),Aw=async(r,s)=>{const e=z({}),a=r.body,l=new ks({$metadata:J(r),...e});return O(l,r.body)},Rw=async(r,s)=>{const e=z({}),a=r.body,l=new ys({$metadata:J(r),...e});return O(l,r.body)},Ew=async(r,s)=>{const e=z({}),a=r.body;if(a[je]!=null)e[je]=Ar(a[je]);if(a[Xr]!=null)e[Xr]=Ar(a[Xr]);const l=new Ds({$metadata:J(r),...e});return O(l,r.body)},Iw=async(r,s)=>{const e=z({}),a=r.body,l=new Ns({$metadata:J(r),...e});return O(l,r.body)},Pw=async(r,s)=>{const e=z({}),a=r.body,l=new Ts({$metadata:J(r),...e});return O(l,r.body)},kw=async(r,s)=>{const e=z({}),a=r.body,l=new Is({$metadata:J(r),...e});return O(l,r.body)},yw=async(r,s)=>{const e=z({}),a=r.body,l=new $s({$metadata:J(r),...e});return O(l,r.body)},Nw=async(r,s)=>{const e=z({}),a=r.body,l=new Us({$metadata:J(r),...e});return O(l,r.body)},Dw=async(r,s)=>{const e=z({}),a=r.body,l=new Ps({$metadata:J(r),...e});return O(l,r.body)};var Tw=(r,s)=>{const e={};if(r[qe]!=null)e[qe]=Ar(r[qe]);if(r[be]!=null)e[be]=Ar(r[be]);if(r[xe]!=null)e[xe]=Ar(r[xe]);if(r[Wr]!=null)e[Wr]=cr(sa(r[Wr]));return e};var J=(r)=>({httpStatusCode:r.statusCode,requestId:r.headers["x-amzn-requestid"]??r.headers["x-amzn-request-id"]??r.headers["x-amz-request-id"],extendedRequestId:r.headers["x-amz-id-2"],cfId:r.headers["x-amz-cf-id"]});var i=(r)=>r!==void 0&&r!==null&&r!==""&&(!Object.getOwnPropertyNames(r).includes("length")||r.length!=0)&&(!Object.getOwnPropertyNames(r).includes("size")||r.size!=0);var $w="ACL";var qe="AccessKeyId";var Uw="AcceptRanges";var je="AccessTier";var Cs="BucketKeyEnabled";var ie="Credentials",Mw="ChecksumAlgorithm";var Eh="CacheControl",aa="ChecksumCRC32",la="ChecksumCRC32C",Ih="ContentDisposition";var Ph="ContentEncoding";var kh="ContentLanguage",oe="ContentLength",vw="ChecksumMode",Cw="ContentMD5";var Hw="ContentRange";var fa="ChecksumSHA1",ha="ChecksumSHA256";var yh="ContentType";var zw="DeleteMarker";var ne="Expires";var Nh="ExpectedBucketOwner";var Gw="ExpiresString";var Dh="ETag";var Wr="Expiration";var Fw="GrantFullControl";var Kw="GrantRead",Lw="GrantReadACP";var Ww="GrantWriteACP";var Xw="IfMatch",pf="IfModifiedSince",Zw="IfNoneMatch";var uf="IfUnmodifiedSince";var Qw="LastModified";var Vw="MissingMeta";var Th="ObjectLockLegalHoldStatus",$h="ObjectLockMode";var pe="ObjectLockRetainUntilDate";var Bw="PartsCount";var Jw="PartNumber";var Yw="Range";var Uh="RequestCharged",_w="ResponseCacheControl",Ow="ResponseContentDisposition",qw="ResponseContentEncoding",jw="ResponseContentLanguage",iw="ResponseContentType";var bw="ResponseExpires";var Mh="RequestPayer";var xw="ReplicationStatus";var ow="Restore";var be="SecretAccessKey";var Xr="StorageClass";var nw="SessionMode";var ma="ServerSideEncryption";var zs="SSECustomerAlgorithm",vh="SSECustomerKey",Gs="SSECustomerKeyMD5";var Ch="SSEKMSEncryptionContext",ga="SSEKMSKeyId";var xe="SessionToken";var pw="Tagging";var uw="TagCount";var wa="VersionId";var Hh="WebsiteRedirectLocation";var tw="accept-ranges";var zh="cache-control",Gh="content-disposition",Fh="content-encoding",Kh="content-language",ue="content-length",rd="content-md5",sd="content-range",Lh="content-type";var te="expires";var Wh="etag",ed="expiresstring";var ad="if-match",ld="if-modified-since";var fd="if-none-match";var hd="if-unmodified-since";var tf="last-modified";var md="partNumber";var gd="range",wd="response-cache-control",dd="response-content-disposition",Sd="response-content-encoding",cd="response-content-language",Ad="response-content-type",Rd="response-expires";var Ed="session";var Id="versionId";var Pd="x-amz-acl";var da="x-amz-checksum-crc32",Sa="x-amz-checksum-crc32c",kd="x-amz-checksum-mode";var ca="x-amz-checksum-sha1",Aa="x-amz-checksum-sha256";var yd="x-amz-create-session-mode";var rh="x-amz-delete-marker",Xh="x-amz-expiration",Zh="x-amz-expected-bucket-owner";var Nd="x-amz-grant-full-control",Dd="x-amz-grant-read",Td="x-amz-grant-read-acp";var $d="x-amz-grant-write-acp";var sh="x-amz-missing-meta";var eh="x-amz-mp-parts-count";var Qh="x-amz-object-lock-legal-hold",Vh="x-amz-object-lock-mode",ra="x-amz-object-lock-retain-until-date";var Ud="x-amz-restore",Bh="x-amz-request-charged";var Jh="x-amz-request-payer";var Md="x-amz-replication-status";var Yh="x-amz-storage-class",vd="x-amz-sdk-checksum-algorithm";var Ra="x-amz-server-side-encryption",Ea="x-amz-server-side-encryption-aws-kms-key-id",Zr="x-amz-server-side-encryption-bucket-key-enabled",_h="x-amz-server-side-encryption-context",Fs="x-amz-server-side-encryption-customer-algorithm",Oh="x-amz-server-side-encryption-customer-key",Ks="x-amz-server-side-encryption-customer-key-md5",Cd="x-amz-tagging",ah="x-amz-tagging-count";var qh="x-amz-version-id",jh="x-amz-website-redirect-location",ih="x-id";class Ia extends Er.classBuilder().ep({...Sr,DisableS3ExpressSessionAuth:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(r,s,e,a){return[Ir(e,this.serialize,this.deserialize),Pr(e,r.getEndpointParameterInstructions()),fs(e)]}).s("AmazonS3","CreateSession",{}).n("S3Client","CreateSessionCommand").f(void 0,qf).ser(wh).de(ch).build(){}var bh={name:"@aws-sdk/client-s3",description:"AWS SDK for JavaScript S3 Client for Node.js, Browser and React Native",version:"3.629.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-s3","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo s3",test:"yarn test:unit","test:e2e":"yarn test:e2e:node && yarn test:e2e:browser","test:e2e:browser":"ts-mocha test/**/*.browser.ispec.ts && karma start karma.conf.js","test:e2e:node":"jest --c jest.config.e2e.js","test:unit":"ts-mocha test/unit/**/*.spec.ts"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha1-browser":"5.2.0","@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/client-sso-oidc":"3.629.0","@aws-sdk/client-sts":"3.629.0","@aws-sdk/core":"3.629.0","@aws-sdk/credential-provider-node":"3.629.0","@aws-sdk/middleware-bucket-endpoint":"3.620.0","@aws-sdk/middleware-expect-continue":"3.620.0","@aws-sdk/middleware-flexible-checksums":"3.620.0","@aws-sdk/middleware-host-header":"3.620.0","@aws-sdk/middleware-location-constraint":"3.609.0","@aws-sdk/middleware-logger":"3.609.0","@aws-sdk/middleware-recursion-detection":"3.620.0","@aws-sdk/middleware-sdk-s3":"3.629.0","@aws-sdk/middleware-ssec":"3.609.0","@aws-sdk/middleware-user-agent":"3.620.0","@aws-sdk/region-config-resolver":"3.614.0","@aws-sdk/signature-v4-multi-region":"3.629.0","@aws-sdk/types":"3.609.0","@aws-sdk/util-endpoints":"3.614.0","@aws-sdk/util-user-agent-browser":"3.609.0","@aws-sdk/util-user-agent-node":"3.614.0","@aws-sdk/xml-builder":"3.609.0","@smithy/config-resolver":"^3.0.5","@smithy/core":"^2.3.2","@smithy/eventstream-serde-browser":"^3.0.6","@smithy/eventstream-serde-config-resolver":"^3.0.3","@smithy/eventstream-serde-node":"^3.0.5","@smithy/fetch-http-handler":"^3.2.4","@smithy/hash-blob-browser":"^3.1.2","@smithy/hash-node":"^3.0.3","@smithy/hash-stream-node":"^3.1.2","@smithy/invalid-dependency":"^3.0.3","@smithy/md5-js":"^3.0.3","@smithy/middleware-content-length":"^3.0.5","@smithy/middleware-endpoint":"^3.1.0","@smithy/middleware-retry":"^3.0.14","@smithy/middleware-serde":"^3.0.3","@smithy/middleware-stack":"^3.0.3","@smithy/node-config-provider":"^3.1.4","@smithy/node-http-handler":"^3.1.4","@smithy/protocol-http":"^4.1.0","@smithy/smithy-client":"^3.1.12","@smithy/types":"^3.3.0","@smithy/url-parser":"^3.0.3","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.14","@smithy/util-defaults-mode-node":"^3.0.14","@smithy/util-endpoints":"^2.0.5","@smithy/util-middleware":"^3.0.3","@smithy/util-retry":"^3.0.3","@smithy/util-stream":"^3.1.3","@smithy/util-utf8":"^3.0.0","@smithy/util-waiter":"^3.1.2",tslib:"^2.6.2"},devDependencies:{"@aws-sdk/signature-v4-crt":"3.629.0","@tsconfig/node16":"16.1.3","@types/chai":"^4.2.11","@types/mocha":"^8.0.4","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=16.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-s3",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-s3"}};var Js=T(Rs(),1);var zd="AWS_S3_USE_ARN_REGION",Gd="s3_use_arn_region",xh={environmentVariableSelector:(r)=>u(r,zd,t.ENV),configFileSelector:(r)=>u(r,Gd,t.CONFIG),default:!1};var oh=T(Jd(),1),{__extends:d3,__assign:S3,__rest:c3,__decorate:A3,__param:R3,__esDecorate:E3,__runInitializers:I3,__propKey:P3,__setFunctionName:k3,__metadata:y3,__awaiter:Ls,__generator:Ws,__exportStar:N3,__createBinding:D3,__values:Xs,__read:T3,__spread:$3,__spreadArrays:U3,__spreadArray:M3,__await:v3,__asyncGenerator:C3,__asyncDelegator:H3,__asyncValues:z3,__makeTemplateObject:G3,__importStar:F3,__importDefault:K3,__classPrivateFieldGet:L3,__classPrivateFieldSet:W3,__classPrivateFieldIn:X3,__addDisposableResource:Z3,__disposeResources:Q3}=oh.default;import{Buffer as nh} from"buffer";var ph=(r,s)=>{if(typeof r!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof r} (${r})`);return s?nh.from(r,s):nh.from(r)};var Pa=(r)=>{const s=ph(r,"utf8");return new Uint8Array(s.buffer,s.byteOffset,s.byteLength/Uint8Array.BYTES_PER_ELEMENT)};function Qr(r){if(r instanceof Uint8Array)return r;if(typeof r==="string")return Yd(r);if(ArrayBuffer.isView(r))return new Uint8Array(r.buffer,r.byteOffset,r.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(r)}var Yd=typeof Buffer!=="undefined"&&Buffer.from?function(r){return Buffer.from(r,"utf8")}:Pa;function Vr(r){if(typeof r==="string")return r.length===0;return r.byteLength===0}function Br(r){return new Uint8Array([(r&4278190080)>>24,(r&16711680)>>16,(r&65280)>>8,r&255])}function Jr(r){if(!Uint32Array.from){var s=new Uint32Array(r.length),e=0;while(e<r.length)s[e]=r[e],e+=1;return s}return Uint32Array.from(r)}var ka=function(){function r(){this.crc32=new sr}return r.prototype.update=function(s){if(Vr(s))return;this.crc32.update(Qr(s))},r.prototype.digest=function(){return Ls(this,void 0,void 0,function(){return Ws(this,function(s){return[2,Br(this.crc32.digest())]})})},r.prototype.reset=function(){this.crc32=new sr},r}();var sr=function(){function r(){this.checksum=4294967295}return r.prototype.update=function(s){var e,a;try{for(var l=Xs(s),f=l.next();!f.done;f=l.next()){var h=f.value;this.checksum=this.checksum>>>8^Od[(this.checksum^h)&255]}}catch(m){e={error:m}}finally{try{if(f&&!f.done&&(a=l.return))a.call(l)}finally{if(e)throw e.error}}return this},r.prototype.digest=function(){return(this.checksum^4294967295)>>>0},r}();var _d=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918000,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117],Od=Jr(_d);var n=T(mr(),1);var th=T(mr(),1),uh=function(r){for(let s=0;s<8;s++)r[s]^=255;for(let s=7;s>-1;s--)if(r[s]++,r[s]!==0)break};class kr{constructor(r){if(this.bytes=r,r.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(r){if(r>9223372036854776000||r<-9223372036854776000)throw new Error(`${r} is too large (or, if negative, too small) to represent as an Int64`);const s=new Uint8Array(8);for(let e=7,a=Math.abs(Math.round(r));e>-1&&a>0;e--,a/=256)s[e]=a;if(r<0)uh(s);return new kr(s)}valueOf(){const r=this.bytes.slice(0),s=r[0]&128;if(s)uh(r);return parseInt(th.toHex(r),16)*(s?-1:1)}toString(){return String(this.valueOf())}}class ya{constructor(r,s){this.toUtf8=r,this.fromUtf8=s}format(r){const s=[];for(let l of Object.keys(r)){const f=this.fromUtf8(l);s.push(Uint8Array.from([f.byteLength]),f,this.formatHeaderValue(r[l]))}const e=new Uint8Array(s.reduce((l,f)=>l+f.byteLength,0));let a=0;for(let l of s)e.set(l,a),a+=l.byteLength;return e}formatHeaderValue(r){switch(r.type){case"boolean":return Uint8Array.from([r.value?0:1]);case"byte":return Uint8Array.from([2,r.value]);case"short":const s=new DataView(new ArrayBuffer(3));return s.setUint8(0,3),s.setInt16(1,r.value,!1),new Uint8Array(s.buffer);case"integer":const e=new DataView(new ArrayBuffer(5));return e.setUint8(0,4),e.setInt32(1,r.value,!1),new Uint8Array(e.buffer);case"long":const a=new Uint8Array(9);return a[0]=5,a.set(r.value.bytes,1),a;case"binary":const l=new DataView(new ArrayBuffer(3+r.value.byteLength));l.setUint8(0,6),l.setUint16(1,r.value.byteLength,!1);const f=new Uint8Array(l.buffer);return f.set(r.value,3),f;case"string":const h=this.fromUtf8(r.value),m=new DataView(new ArrayBuffer(3+h.byteLength));m.setUint8(0,7),m.setUint16(1,h.byteLength,!1);const g=new Uint8Array(m.buffer);return g.set(h,3),g;case"timestamp":const w=new Uint8Array(9);return w[0]=8,w.set(kr.fromNumber(r.value.valueOf()).bytes,1),w;case"uuid":if(!ud.test(r.value))throw new Error(`Invalid UUID received: ${r.value}`);const A=new Uint8Array(17);return A[0]=9,A.set(n.fromHex(r.value.replace(/\-/g,"")),1),A}}parse(r){const s={};let e=0;while(e<r.byteLength){const a=r.getUint8(e++),l=this.toUtf8(new Uint8Array(r.buffer,r.byteOffset+e,a));switch(e+=a,r.getUint8(e++)){case 0:s[l]={type:sm,value:!0};break;case 1:s[l]={type:sm,value:!1};break;case 2:s[l]={type:qd,value:r.getInt8(e++)};break;case 3:s[l]={type:jd,value:r.getInt16(e,!1)},e+=2;break;case 4:s[l]={type:id,value:r.getInt32(e,!1)},e+=4;break;case 5:s[l]={type:bd,value:new kr(new Uint8Array(r.buffer,r.byteOffset+e,8))},e+=8;break;case 6:const f=r.getUint16(e,!1);e+=2,s[l]={type:xd,value:new Uint8Array(r.buffer,r.byteOffset+e,f)},e+=f;break;case 7:const h=r.getUint16(e,!1);e+=2,s[l]={type:od,value:this.toUtf8(new Uint8Array(r.buffer,r.byteOffset+e,h))},e+=h;break;case 8:s[l]={type:nd,value:new Date(new kr(new Uint8Array(r.buffer,r.byteOffset+e,8)).valueOf())},e+=8;break;case 9:const m=new Uint8Array(r.buffer,r.byteOffset+e,16);e+=16,s[l]={type:pd,value:`${n.toHex(m.subarray(0,4))}-${n.toHex(m.subarray(4,6))}-${n.toHex(m.subarray(6,8))}-${n.toHex(m.subarray(8,10))}-${n.toHex(m.subarray(10))}`};break;default:throw new Error("Unrecognized header type tag")}}return s}}var rm;(function(r){r[r.boolTrue=0]="boolTrue",r[r.boolFalse=1]="boolFalse",r[r.byte=2]="byte",r[r.short=3]="short",r[r.integer=4]="integer",r[r.long=5]="long",r[r.byteArray=6]="byteArray",r[r.string=7]="string",r[r.timestamp=8]="timestamp",r[r.uuid=9]="uuid"})(rm||(rm={}));var sm="boolean",qd="byte",jd="short",id="integer",bd="long",xd="binary",od="string",nd="timestamp",pd="uuid",ud=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;function am({byteLength:r,byteOffset:s,buffer:e}){if(r<td)throw new Error("Provided message too short to accommodate event stream message overhead");const a=new DataView(e,s,r),l=a.getUint32(0,!1);if(r!==l)throw new Error("Reported message length does not match received message length");const f=a.getUint32(em,!1),h=a.getUint32(p,!1),m=a.getUint32(r-er,!1),g=new sr().update(new Uint8Array(e,s,p));if(h!==g.digest())throw new Error(`The prelude checksum specified in the message (${h}) does not match the calculated CRC32 checksum (${g.digest()})`);if(g.update(new Uint8Array(e,s+p,r-(p+er))),m!==g.digest())throw new Error(`The message checksum (${g.digest()}) did not match the expected value of ${m}`);return{headers:new DataView(e,s+p+er,f),body:new Uint8Array(e,s+p+er+f,l-f-(p+er+er))}}var em=4,p=em*2,er=4,td=p+er*2;class Na{constructor(r,s){this.headerMarshaller=new ya(r,s),this.messageBuffer=[],this.isEndOfStream=!1}feed(r){this.messageBuffer.push(this.decode(r))}endOfStream(){this.isEndOfStream=!0}getMessage(){const r=this.messageBuffer.pop(),s=this.isEndOfStream;return{getMessage(){return r},isEndOfStream(){return s}}}getAvailableMessages(){const r=this.messageBuffer;this.messageBuffer=[];const s=this.isEndOfStream;return{getMessages(){return r},isEndOfStream(){return s}}}encode({headers:r,body:s}){const e=this.headerMarshaller.format(r),a=e.byteLength+s.byteLength+16,l=new Uint8Array(a),f=new DataView(l.buffer,l.byteOffset,l.byteLength),h=new sr;return f.setUint32(0,a,!1),f.setUint32(4,e.byteLength,!1),f.setUint32(8,h.update(l.subarray(0,8)).digest(),!1),l.set(e,12),l.set(s,e.byteLength+12),f.setUint32(a-4,h.update(l.subarray(8,a-4)).digest(),!1),l}decode(r){const{headers:s,body:e}=am(r);return{headers:this.headerMarshaller.parse(s),body:e}}formatHeaders(r){return this.headerMarshaller.format(r)}}class Da{constructor(r){this.options=r}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let r of this.options.inputStream)yield this.options.decoder.decode(r)}}class Ta{constructor(r){this.options=r}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let r of this.options.messageStream)yield this.options.encoder.encode(r);if(this.options.includeEndFrame)yield new Uint8Array(0)}}class $a{constructor(r){this.options=r}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let r of this.options.messageStream){const s=await this.options.deserializer(r);if(s===void 0)continue;yield s}}}class Ua{constructor(r){this.options=r}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let r of this.options.inputStream)yield this.options.serializer(r)}}function lm(r){let s=0,e=0,a=null,l=null;const f=(m)=>{if(typeof m!=="number")throw new Error("Attempted to allocate an event message where size was not a number: "+m);s=m,e=4,a=new Uint8Array(m),new DataView(a.buffer).setUint32(0,m,!1)},h=async function*(){const m=r[Symbol.asyncIterator]();while(!0){const{value:g,done:w}=await m.next();if(w){if(!s)return;else if(s===e)yield a;else throw new Error("Truncated event message received.");return}const A=g.length;let I=0;while(I<A){if(!a){const U=A-I;if(!l)l=new Uint8Array(4);const D=Math.min(4-e,U);if(l.set(g.slice(I,I+D),e),e+=D,I+=D,e<4)break;f(new DataView(l.buffer).getUint32(0,!1)),l=null}const P=Math.min(s-e,A-I);if(a.set(g.slice(I,I+P),e),e+=P,I+=P,s&&s===e)yield a,a=null,s=0,e=0}}};return{[Symbol.asyncIterator]:h}}function fm(r,s){return async function(e){const{value:a}=e.headers[":message-type"];if(a==="error"){const l=new Error(e.headers[":error-message"].value||"UnknownError");throw l.name=e.headers[":error-code"].value,l}else if(a==="exception"){const l=e.headers[":exception-type"].value,f={[l]:e},h=await r(f);if(h.$unknown){const m=new Error(s(e.body));throw m.name=l,m}throw h[l]}else if(a==="event"){const l={[e.headers[":event-type"].value]:e},f=await r(l);if(f.$unknown)return;return f}else throw Error(`Unrecognizable event type: ${e.headers[":event-type"].value}`)}}class Zs{constructor({utf8Encoder:r,utf8Decoder:s}){this.eventStreamCodec=new Na(r,s),this.utfEncoder=r}deserialize(r,s){const e=lm(r);return new $a({messageStream:new Da({inputStream:e,decoder:this.eventStreamCodec}),deserializer:fm(s,this.utfEncoder)})}serialize(r,s){return new Ta({messageStream:new Ua({inputStream:r,serializer:s}),encoder:this.eventStreamCodec,includeEndFrame:!0})}}import{Readable as rS} from"stream";async function*hm(r){let s=!1,e=!1;const a=new Array;r.on("error",(l)=>{if(!s)s=!0;if(l)throw l}),r.on("data",(l)=>{a.push(l)}),r.on("end",()=>{s=!0});while(!e){const l=await new Promise((f)=>setTimeout(()=>f(a.shift()),0));if(l)yield l;e=s&&a.length===0}}class Ma{constructor({utf8Encoder:r,utf8Decoder:s}){this.universalMarshaller=new Zs({utf8Decoder:s,utf8Encoder:r})}deserialize(r,s){const e=typeof r[Symbol.asyncIterator]==="function"?r:hm(r);return this.universalMarshaller.deserialize(e,s)}serialize(r,s){return rS.from(this.universalMarshaller.serialize(r,s))}}var mm=(r)=>new Ma(r);import{Writable as sS} from"stream";class Qs extends sS{constructor(r,s){super(s);this.hash=r}_write(r,s,e){try{this.hash.update(B(r))}catch(a){return e(a)}e()}}var gm=(r,s)=>{if(s.readableFlowing!==null)throw new Error("Unable to calculate hash for flowing readable stream");const e=new r,a=new Qs(e);return s.pipe(a),new Promise((l,f)=>{s.on("error",(h)=>{a.end(),f(h)}),a.on("error",f),a.on("finish",()=>{e.digest().then(l).catch(f)})})};var Vs=T(Rs(),1);var Em=(r)=>{return{apiVersion:"2006-03-01",base64Decoder:r?.base64Decoder??wm,base64Encoder:r?.base64Encoder??Sm,disableHostPrefix:r?.disableHostPrefix??!1,endpointProvider:r?.endpointProvider??As,extensions:r?.extensions??[],getAwsChunkedEncodingStream:r?.getAwsChunkedEncodingStream??cm,httpAuthSchemeProvider:r?.httpAuthSchemeProvider??Jf,httpAuthSchemes:r?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(s)=>s.getIdentityProvider("aws.auth#sigv4"),signer:new Vs.AwsSdkSigV4Signer},{schemeId:"aws.auth#sigv4a",identityProvider:(s)=>s.getIdentityProvider("aws.auth#sigv4a"),signer:new Vs.AwsSdkSigV4ASigner}],logger:r?.logger??new br,sdkStreamMixin:r?.sdkStreamMixin??Am,serviceId:r?.serviceId??"S3",signerConstructor:r?.signerConstructor??Re,signingEscapePath:r?.signingEscapePath??!1,urlParser:r?.urlParser??Rm,useArnRegion:r?.useArnRegion??!1,utf8Decoder:r?.utf8Decoder??Cr,utf8Encoder:r?.utf8Encoder??dm}};var Fm=(r)=>{ym(process.version);const s=zm(r),e=()=>s().then(km),a=Em(r);return Js.emitWarningIfUnsupportedVersion(process.version),{...a,...r,runtime:"node",defaultsMode:s,bodyLengthChecker:r?.bodyLengthChecker??Hm,credentialDefaultProvider:r?.credentialDefaultProvider??Gm,defaultUserAgentProvider:r?.defaultUserAgentProvider??Cm({serviceId:a.serviceId,clientVersion:bh.version}),disableS3ExpressSessionAuth:r?.disableS3ExpressSessionAuth??b(we),eventStreamSerdeProvider:r?.eventStreamSerdeProvider??mm,maxAttempts:r?.maxAttempts??b(Mm),md5:r?.md5??Bs.bind(null,"md5"),region:r?.region??b(Tm,$m),requestHandler:Im.create(r?.requestHandler??e),retryMode:r?.retryMode??b({...vm,default:async()=>(await e()).retryMode||Um}),sha1:r?.sha1??Bs.bind(null,"sha1"),sha256:r?.sha256??Bs.bind(null,"sha256"),sigv4aSigningRegionSet:r?.sigv4aSigningRegionSet??b(Js.NODE_SIGV4A_CONFIG_OPTIONS),streamCollector:r?.streamCollector??Pm,streamHasher:r?.streamHasher??gm,useArnRegion:r?.useArnRegion??b(xh),useDualstackEndpoint:r?.useDualstackEndpoint??b(Nm),useFipsEndpoint:r?.useFipsEndpoint??b(Dm)}};var Km=(r)=>{const s=r.httpAuthSchemes;let{httpAuthSchemeProvider:e,credentials:a}=r;return{setHttpAuthScheme(l){const f=s.findIndex((h)=>h.schemeId===l.schemeId);if(f===-1)s.push(l);else s.splice(f,1,l)},httpAuthSchemes(){return s},setHttpAuthSchemeProvider(l){e=l},httpAuthSchemeProvider(){return e},setCredentials(l){a=l},credentials(){return a}}},Lm=(r)=>{return{httpAuthSchemes:r.httpAuthSchemes(),httpAuthSchemeProvider:r.httpAuthSchemeProvider(),credentials:r.credentials()}};var Ys=(r)=>r,Jm=(r,s)=>{const e={...Ys(Vm(r)),...Ys(Zm(r)),...Ys(Wm(r)),...Ys(Km(r))};return s.forEach((a)=>a.configure(e)),{...r,...Bm(e),...Qm(e),...Xm(e),...Lm(e)}};class va extends jm{constructor(...[r]){const s=Fm(r||{}),e=_f(s),a=im(e),l=pm(a),f=xm(l),h=Ym(f),m=nm(h),g=Wl(m),w=Yf(g),A=Hl(w,{session:[()=>this,Ia]}),I=Jm(A,r?.extensions||[]);super(I);this.config=I,this.middlewareStack.use(bm(this.config)),this.middlewareStack.use(um(this.config)),this.middlewareStack.use(om(this.config)),this.middlewareStack.use(_m(this.config)),this.middlewareStack.use(Om(this.config)),this.middlewareStack.use(qm(this.config)),this.middlewareStack.use(yr.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:Qf,identityProviderConfigProvider:async(P)=>new yr.DefaultIdentityProviderConfig({"aws.auth#sigv4":P.credentials,"aws.auth#sigv4a":P.credentials})})),this.middlewareStack.use(yr.getHttpSigningPlugin(this.config)),this.middlewareStack.use(Ll(this.config)),this.middlewareStack.use(Za(this.config)),this.middlewareStack.use(Ja(this.config)),this.middlewareStack.use(de(this.config)),this.middlewareStack.use(ce(this.config))}destroy(){super.destroy()}}function eS(r){return(s)=>async(e)=>{const a={...e.input},l=[{target:"SSECustomerKey",hash:"SSECustomerKeyMD5"},{target:"CopySourceSSECustomerKey",hash:"CopySourceSSECustomerKeyMD5"}];for(let f of l){const h=a[f.target];if(h){let m;if(typeof h==="string")if(lS(h,r))m=r.base64Decoder(h);else m=r.utf8Decoder(h),a[f.target]=r.base64Encoder(m);else m=ArrayBuffer.isView(h)?new Uint8Array(h.buffer,h.byteOffset,h.byteLength):new Uint8Array(h),a[f.target]=r.base64Encoder(m);const g=new r.md5;g.update(m),a[f.hash]=r.base64Encoder(await g.digest())}}return s({...e,input:a})}}function lS(r,s){if(!/^(?:[A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(r))return!1;try{return s.base64Decoder(r).length===32}catch{return!1}}var aS={name:"ssecMiddleware",step:"initialize",tags:["SSE"],override:!0},_s=(r)=>({applyToStack:(s)=>{s.add(eS(r),aS)}});var $;(function(r){r.MD5="MD5",r.CRC32="CRC32",r.CRC32C="CRC32C",r.SHA1="SHA1",r.SHA256="SHA256"})($||($={}));var tm;(function(r){r.HEADER="header",r.TRAILER="trailer"})(tm||(tm={}));var{MD5:rg,CRC32:sg}=$;var Yr=[$.CRC32,$.CRC32C,$.SHA1,$.SHA256],eg=[$.CRC32,$.CRC32C,$.SHA1,$.SHA256];var ag=(r,{requestChecksumRequired:s,requestAlgorithmMember:e},a)=>{const l=a?sg:rg;if(!e||!r[e])return s?l:void 0;const f=r[e];if(!Yr.includes(f))throw new Error(`The checksum algorithm "${f}" is not supported by the client.`+` Select one of ${Yr}.`);return f};var Nr=(r)=>r===$.MD5?"content-md5":`x-amz-checksum-${r.toLowerCase()}`;var lg=(r,s)=>{const e=r.toLowerCase();for(let a of Object.keys(s))if(e===a.toLowerCase())return!0;return!1};var Dr=(r)=>r!==void 0&&typeof r!=="string"&&!ArrayBuffer.isView(r)&&!tr(r);var Ha=function(){function r(){this.crc32c=new Ca}return r.prototype.update=function(s){if(Vr(s))return;this.crc32c.update(Qr(s))},r.prototype.digest=function(){return Ls(this,void 0,void 0,function(){return Ws(this,function(s){return[2,Br(this.crc32c.digest())]})})},r.prototype.reset=function(){this.crc32c=new Ca},r}();var Ca=function(){function r(){this.checksum=4294967295}return r.prototype.update=function(s){var e,a;try{for(var l=Xs(s),f=l.next();!f.done;f=l.next()){var h=f.value;this.checksum=this.checksum>>>8^hS[(this.checksum^h)&255]}}catch(m){e={error:m}}finally{try{if(f&&!f.done&&(a=l.return))a.call(l)}finally{if(e)throw e.error}}return this},r.prototype.digest=function(){return(this.checksum^4294967295)>>>0},r}();var fS=[0,4067132163,3778769143,324072436,3348797215,904991772,648144872,3570033899,2329499855,2024987596,1809983544,2575936315,1296289744,3207089363,2893594407,1578318884,274646895,3795141740,4049975192,51262619,3619967088,632279923,922689671,3298075524,2592579488,1760304291,2075979607,2312596564,1562183871,2943781820,3156637768,1313733451,549293790,3537243613,3246849577,871202090,3878099393,357341890,102525238,4101499445,2858735121,1477399826,1264559846,3107202533,1845379342,2677391885,2361733625,2125378298,820201905,3263744690,3520608582,598981189,4151959214,85089709,373468761,3827903834,3124367742,1213305469,1526817161,2842354314,2107672161,2412447074,2627466902,1861252501,1098587580,3004210879,2688576843,1378610760,2262928035,1955203488,1742404180,2511436119,3416409459,969524848,714683780,3639785095,205050476,4266873199,3976438427,526918040,1361435347,2739821008,2954799652,1114974503,2529119692,1691668175,2005155131,2247081528,3690758684,697762079,986182379,3366744552,476452099,3993867776,4250756596,255256311,1640403810,2477592673,2164122517,1922457750,2791048317,1412925310,1197962378,3037525897,3944729517,427051182,170179418,4165941337,746937522,3740196785,3451792453,1070968646,1905808397,2213795598,2426610938,1657317369,3053634322,1147748369,1463399397,2773627110,4215344322,153784257,444234805,3893493558,1021025245,3467647198,3722505002,797665321,2197175160,1889384571,1674398607,2443626636,1164749927,3070701412,2757221520,1446797203,137323447,4198817972,3910406976,461344835,3484808360,1037989803,781091935,3705997148,2460548119,1623424788,1939049696,2180517859,1429367560,2807687179,3020495871,1180866812,410100952,3927582683,4182430767,186734380,3756733383,763408580,1053836080,3434856499,2722870694,1344288421,1131464017,2971354706,1708204729,2545590714,2229949006,1988219213,680717673,3673779818,3383336350,1002577565,4010310262,493091189,238226049,4233660802,2987750089,1082061258,1395524158,2705686845,1972364758,2279892693,2494862625,1725896226,952904198,3399985413,3656866545,731699698,4283874585,222117402,510512622,3959836397,3280807620,837199303,582374963,3504198960,68661723,4135334616,3844915500,390545967,1230274059,3141532936,2825850620,1510247935,2395924756,2091215383,1878366691,2644384480,3553878443,565732008,854102364,3229815391,340358836,3861050807,4117890627,119113024,1493875044,2875275879,3090270611,1247431312,2660249211,1828433272,2141937292,2378227087,3811616794,291187481,34330861,4032846830,615137029,3603020806,3314634738,939183345,1776939221,2609017814,2295496738,2058945313,2926798794,1545135305,1330124605,3173225534,4084100981,17165430,307568514,3762199681,888469610,3332340585,3587147933,665062302,2042050490,2346497209,2559330125,1793573966,3190661285,1279665062,1595330642,2910671697],hS=Jr(fS);var Os=(r,s)=>({[$.MD5]:s.md5,[$.CRC32]:ka,[$.CRC32C]:Ha,[$.SHA1]:s.sha1,[$.SHA256]:s.sha256})[r];var qs=(r,s)=>{const e=new r;return e.update(B(s||"")),e.digest()};var fg={name:"flexibleChecksumsMiddleware",step:"build",tags:["BODY_CHECKSUM"],override:!0},hg=(r,s)=>(e,a)=>async(l)=>{if(!L.isInstance(l.request))return e(l);const{request:f}=l,{body:h,headers:m}=f,{base64Encoder:g,streamHasher:w}=r,{input:A,requestChecksumRequired:I,requestAlgorithmMember:P}=s,U=ag(A,{requestChecksumRequired:I,requestAlgorithmMember:P},!!a.isS3ExpressBucket);let D=h,Q=m;if(U){const q=Nr(U),Tr=Os(U,r);if(Dr(h)){const{getAwsChunkedEncodingStream:us,bodyLengthChecker:Cg}=r;D=us(h,{base64Encoder:g,bodyLengthChecker:Cg,checksumLocationName:q,checksumAlgorithmFn:Tr,streamHasher:w}),Q={...m,"content-encoding":m["content-encoding"]?`${m["content-encoding"]},aws-chunked`:"aws-chunked","transfer-encoding":"chunked","x-amz-decoded-content-length":m["content-length"],"x-amz-content-sha256":"STREAMING-UNSIGNED-PAYLOAD-TRAILER","x-amz-trailer":q},delete Q["content-length"]}else if(!lg(q,m)){const us=await qs(Tr,h);Q={...m,[q]:g(us)}}}return await e({...l,request:{...f,headers:Q,body:D}})};var js=(r=[])=>{const s=[];for(let e of eg){if(!r.includes(e)||!Yr.includes(e))continue;s.push(e)}return s};var mg=(r)=>{const s=r.lastIndexOf("-");if(s!==-1){const e=r.slice(s+1);if(!e.startsWith("0")){const a=parseInt(e,10);if(!isNaN(a)&&a>=1&&a<=1e4)return!0}}return!1};import{Transform as mS} from"stream";function za(r){const s=new mS;return s.push(r),s.push(null),s}var gg=async(r,{streamHasher:s,checksumAlgorithmFn:e,base64Encoder:a})=>{const l=Dr(r)?s(e,r):qs(e,r);return a(await l)};var wg=async(r,{config:s,responseAlgorithms:e})=>{const a=js(e),{body:l,headers:f}=r;for(let h of a){const m=Nr(h),g=f[m];if(g){const w=Os(h,s),{streamHasher:A,base64Encoder:I}=s,P=await gg(l,{streamHasher:A,checksumAlgorithmFn:w,base64Encoder:I});if(P===g)break;throw new Error(`Checksum mismatch: expected "${P}" but received "${g}"`+` in response header "${m}".`)}}};var dg={name:"flexibleChecksumsResponseMiddleware",toMiddleware:"deserializerMiddleware",relation:"after",tags:["BODY_CHECKSUM"],override:!0},Sg=(r,s)=>(e,a)=>async(l)=>{if(!L.isInstance(l.request))return e(l);const f=l.input,h=await e(l),m=h.response;let g=void 0;const{requestValidationModeMember:w,responseAlgorithms:A}=s;if(w&&f[w]==="ENABLED"){const{clientName:I,commandName:P}=a;if(I==="S3Client"&&P==="GetObjectCommand"&&js(A).every((Q)=>{const qr=Nr(Q),q=m.headers[qr];return!q||mg(q)}))return h;const D=Dr(m.body);if(D)g=await r.streamCollector(m.body),m.body=za(g);if(await wg(h.response,{config:r,responseAlgorithms:A}),D&&g)m.body=za(g)}return h};var is=(r,s)=>({applyToStack:(e)=>{e.add(hg(r,s),fg),e.addRelativeTo(Sg(r,s),dg)}});class Ga extends Er.classBuilder().ep({...Sr,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(r,s,e,a){return[Ir(e,this.serialize,this.deserialize),Pr(e,r.getEndpointParameterInstructions()),is(e,{input:this.input,requestChecksumRequired:!1,requestValidationModeMember:"ChecksumMode",responseAlgorithms:["CRC32","CRC32C","SHA256","SHA1"]}),_s(e),Ya(e)]}).s("AmazonS3","GetObject",{}).n("S3Client","GetObjectCommand").f(bf,jf).ser(dh).de(Ah).build(){}class Fa extends Er.classBuilder().ep({...Sr,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(r,s,e,a){return[Ir(e,this.serialize,this.deserialize),Pr(e,r.getEndpointParameterInstructions()),is(e,{input:this.input,requestAlgorithmMember:"ChecksumAlgorithm",requestChecksumRequired:!1}),Qa(e),fs(e),_s(e)]}).s("AmazonS3","PutObject",{}).n("S3Client","PutObjectCommand").f(nf,of).ser(Sh).de(Rh).build(){}import{Buffer as cg} from"buffer";class Ag extends ar{client;constructor(...r){super();this.client=new va(...r)}async put(r){let s,e,a,l=process.env.BUCKET_NAME;if(r instanceof Blob)s=r,a=`${jr()}.${r.type.split("/")[1].split(";")[0]}`,e=r.type;else s=r.body,a=r.name,e=r.contentType;e=s instanceof Blob||s instanceof File?s.type:void 0;const f=s instanceof cg?s:cg.from(await s.arrayBuffer());return await this.client.send(new Fa({Bucket:l,Key:a,Body:f,ContentType:e})),a}async fetch(r){let s=process.env.BUCKET_NAME,e;if(typeof r==="string")e=r;else s=r.bucket??s,e=r.name;if(!e)throw new Error("Object name has to be specified");const a=await this.client.send(new Ga({Bucket:s,Key:e}));return new Response(a.Body.transformToWebStream(),{headers:{"Content-Type":a.ContentType,"Content-Length":a.ContentLength.toString(),"Cache-Control":"private, max-age=12000, must-revalidate","Last-Modified":a.LastModified?.toUTCString()||"",ETag:a.ETag||""}})}}class bs{}class xs extends bs{constructor(){super(...arguments)}requests=new Map;consume(r,s){if(!this.requests.has(r))this.requests.set(r,{date:Date.now(),count:1});else{const e=this.requests.get(r),a=Date.now();if(a-e.date>=60000)this.requests.set(r,{date:a,count:1});else this.requests.set(r,{date:e.date,count:e.count+1})}return this.requests.get(r).count}}class Rg{driver=new xs}class _r{}import*as AS from"react-dom/server";var yg=T(gS(),1);var{defineProperty:wS,getOwnPropertySymbols:Eg}=Object,dS=Object.prototype.hasOwnProperty,SS=Object.prototype.propertyIsEnumerable,Ig=(r,s,e)=>(s in r)?wS(r,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[s]=e,Ka=(r,s)=>{for(var e in s||(s={}))if(dS.call(s,e))Ig(r,e,s[e]);if(Eg){for(var e of Eg(s))if(SS.call(s,e))Ig(r,e,s[e])}return r},cS=((r)=>typeof import.meta.require!=="undefined"?import.meta.require:typeof Proxy!=="undefined"?new Proxy(r,{get:(s,e)=>(typeof import.meta.require!=="undefined"?import.meta.require:s)[e]}):r)(function(r){if(typeof import.meta.require!=="undefined")return import.meta.require.apply(this,arguments);throw Error('Dynamic require of "'+r+'" is not supported')}),La=(r,s,e)=>{return new Promise((a,l)=>{var f=(g)=>{try{m(e.next(g))}catch(w){l(w)}},h=(g)=>{try{m(e.throw(g))}catch(w){l(w)}},m=(g)=>g.done?a(g.value):Promise.resolve(g.value).then(f,h);m((e=e.apply(r,s)).next())})},RS={unformatted:["code","pre","em","strong","span"],indent_inner_html:!0,indent_char:" ",indent_size:2,sep:"\n"},ES=(r,s={})=>{return yg.default.html(r,Ka(Ka({},RS),s))},IS=[{selector:"img",format:"skip"},{selector:"#__react-email-preview",format:"skip"},{selector:"a",options:{linkBrackets:!1}}];var Pg=new TextDecoder("utf-8"),kg=(r)=>La(void 0,null,function*(){let s="";if("pipeTo"in r){const e=new WritableStream({write(a){s+=Pg.decode(a)}});yield r.pipeTo(e)}else{const{Writable:e}=cS("stream"),a=new e({write(l,f,h){s+=Pg.decode(l),h()}});return r.pipe(a),new Promise((l,f)=>{a.on("error",f),a.on("close",()=>{l(s)})})}return s}),os=(r,s)=>La(void 0,null,function*(){const e=yield import("react-dom/server");let a;if(Object.hasOwn(e,"renderToReadableStream"))a=yield kg(yield e.renderToReadableStream(r));else yield new Promise((h,m)=>{const g=e.renderToPipeableStream(r,{onAllReady(){return La(this,null,function*(){a=yield kg(g),h()})},onError(w){m(w)}})});if(s==null?void 0:s.plainText)return Wa(a,Ka({selectors:IS},s.htmlToTextOptions));const f=`${'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'}${a.replace(/<!DOCTYPE.*?>/,"")}`;if(s==null?void 0:s.pretty)return ES(f);return f});var{defineProperty:PS,defineProperties:kS,getOwnPropertyDescriptors:yS,getOwnPropertySymbols:Ng}=Object,NS=Object.prototype.hasOwnProperty,DS=Object.prototype.propertyIsEnumerable,Dg=(r,s,e)=>(s in r)?PS(r,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[s]=e,Or=(r,s)=>{for(var e in s||(s={}))if(NS.call(s,e))Dg(r,e,s[e]);if(Ng){for(var e of Ng(s))if(DS.call(s,e))Dg(r,e,s[e])}return r},TS=(r,s)=>kS(r,yS(s)),k=(r,s,e)=>{return new Promise((a,l)=>{var f=(g)=>{try{m(e.next(g))}catch(w){l(w)}},h=(g)=>{try{m(e.throw(g))}catch(w){l(w)}},m=(g)=>g.done?a(g.value):Promise.resolve(g.value).then(f,h);m((e=e.apply(r,s)).next())})},$S="3.4.0",US=class{constructor(r){this.resend=r}create(r){return k(this,arguments,function*(s,e={}){return yield this.resend.post("/api-keys",s,e)})}list(){return k(this,null,function*(){return yield this.resend.get("/api-keys")})}remove(r){return k(this,null,function*(){return yield this.resend.delete(`/api-keys/${r}`)})}},MS=class{constructor(r){this.resend=r}create(r){return k(this,arguments,function*(s,e={}){return yield this.resend.post("/audiences",s,e)})}list(){return k(this,null,function*(){return yield this.resend.get("/audiences")})}get(r){return k(this,null,function*(){return yield this.resend.get(`/audiences/${r}`)})}remove(r){return k(this,null,function*(){return yield this.resend.delete(`/audiences/${r}`)})}},vS=class{constructor(r){this.resend=r}send(r){return k(this,arguments,function*(s,e={}){return this.create(s,e)})}create(r){return k(this,arguments,function*(s,e={}){for(let l of s)if(l.react)l.html=yield os(l.react),delete l.react;return yield this.resend.post("/emails/batch",s,e)})}},CS=class{constructor(r){this.resend=r}create(r){return k(this,arguments,function*(s,e={}){return yield this.resend.post(`/audiences/${s.audienceId}/contacts`,{unsubscribed:s.unsubscribed,email:s.email,first_name:s.firstName,last_name:s.lastName},e)})}list(r){return k(this,null,function*(){return yield this.resend.get(`/audiences/${r.audienceId}/contacts`)})}get(r){return k(this,null,function*(){return yield this.resend.get(`/audiences/${r.audienceId}/contacts/${r.id}`)})}update(r){return k(this,null,function*(){return yield this.resend.patch(`/audiences/${r.audienceId}/contacts/${r.id}`,{unsubscribed:r.unsubscribed,first_name:r.firstName,last_name:r.lastName})})}remove(r){return k(this,null,function*(){return yield this.resend.delete(`/audiences/${r.audienceId}/contacts/${(r==null?void 0:r.email)?r==null?void 0:r.email:r==null?void 0:r.id}`)})}},HS=class{constructor(r){this.resend=r}create(r){return k(this,arguments,function*(s,e={}){return yield this.resend.post("/domains",s,e)})}list(){return k(this,null,function*(){return yield this.resend.get("/domains")})}get(r){return k(this,null,function*(){return yield this.resend.get(`/domains/${r}`)})}update(r){return k(this,null,function*(){return yield this.resend.patch(`/domains/${r.id}`,{click_tracking:r.clickTracking,open_tracking:r.openTracking,tls:r.tls})})}remove(r){return k(this,null,function*(){return yield this.resend.delete(`/domains/${r}`)})}verify(r){return k(this,null,function*(){return yield this.resend.post(`/domains/${r}/verify`)})}},zS=class{constructor(r){this.resend=r}send(r){return k(this,arguments,function*(s,e={}){return this.create(s,e)})}create(r){return k(this,arguments,function*(s,e={}){if(s.react)s.html=yield os(s.react),delete s.react;return yield this.resend.post("/emails",s,e)})}get(r){return k(this,null,function*(){return yield this.resend.get(`/emails/${r}`)})}},Tg="https://api.resend.com",$g=`resend-node:${$S}`,GS=typeof process!=="undefined"&&process.env?process.env.RESEND_BASE_URL||Tg:Tg,FS=typeof process!=="undefined"&&process.env?process.env.RESEND_USER_AGENT||$g:$g,Ug=class{constructor(r){if(this.key=r,this.apiKeys=new US(this),this.audiences=new MS(this),this.batch=new vS(this),this.contacts=new CS(this),this.domains=new HS(this),this.emails=new zS(this),!r){if(typeof process!=="undefined"&&process.env)this.key=process.env.RESEND_API_KEY;if(!this.key)throw new Error('Missing API key. Pass it to the constructor `new Resend("re_123")`')}this.headers=new Headers({Authorization:`Bearer ${this.key}`,"User-Agent":FS,"Content-Type":"application/json"})}fetchRequest(r){return k(this,arguments,function*(s,e={}){try{const a=yield fetch(`${GS}${s}`,e);if(!a.ok)try{const f=yield a.text();return{data:null,error:JSON.parse(f)}}catch(f){if(f instanceof SyntaxError)return{data:null,error:{name:"application_error",message:"Internal server error. We are unable to process your request right now, please try again later."}};const h={message:a.statusText,name:"application_error"};if(f instanceof Error)return{data:null,error:TS(Or({},h),{message:f.message})};return{data:null,error:h}}return{data:yield a.json(),error:null}}catch(a){return{data:null,error:{name:"application_error",message:"Unable to fetch data. The request could not be resolved."}}}})}post(r,s){return k(this,arguments,function*(e,a,l={}){const f=Or({method:"POST",headers:this.headers,body:JSON.stringify(a)},l);return this.fetchRequest(e,f)})}get(r){return k(this,arguments,function*(s,e={}){const a=Or({method:"GET",headers:this.headers},e);return this.fetchRequest(s,a)})}put(r,s){return k(this,arguments,function*(e,a,l={}){const f=Or({method:"PUT",headers:this.headers,body:JSON.stringify(a)},l);return this.fetchRequest(e,f)})}patch(r,s){return k(this,arguments,function*(e,a,l={}){const f=Or({method:"PATCH",headers:this.headers,body:JSON.stringify(a)},l);return this.fetchRequest(e,f)})}delete(r,s){return k(this,null,function*(){const e={method:"DELETE",headers:this.headers,body:JSON.stringify(s)};return this.fetchRequest(r,e)})}};class ns{}class ps extends ns{r;constructor(r=process.env.RESEND_API_KEY){super();this.apiKey=r}async send(r){const s=new Ug(this.apiKey),{data:e,error:a}=await s.emails.send({...r});if(a)throw a;if(e)return!0}}class Mg extends _r{constructor(){super(...arguments)}debug=!0;defaultFrom="";driver=new ps;boot(){}}class vg extends _r{constructor(){super(...arguments)}channels={};boot(){}}export{Ag as S3Driver,ps as ResendDriver,Rg as RateLimiterServiceProvider,bs as RateLimiterDriver,xs as InMemoryRateLimiter,ir as FileSystemDriver,Xa as FileStorageServiceProvider,ar as FileStorageDriver,Mg as EmailServiceProvider,ns as EmailDriver,vg as BroadcastingServiceProvider};export{Xa as p,_r as q,Rg as r,Mg as s,vg as t};
11
+ ${Hr.toHex(l)}`}getCanonicalPath({path:r}){if(this.uriEscapePath){const s=[];for(let l of r.split("/")){if(l?.length===0)continue;if(l===".")continue;if(l==="..")s.pop();else s.push(l)}const e=`${r?.startsWith("/")?"/":""}${s.join("/")}${s.length>0&&r?.endsWith("/")?"/":""}`;return u(e).replace(/%2F/g,"/")}return r}async getSignature(r,s,e,a){const l=await this.createStringToSign(r,s,a),f=new this.sha256(await e);return f.update(B(l)),Hr.toHex(await f.digest())}getSigningKey(r,s,e,a){return ml(this.sha256,r,e,s,a||this.service)}validateResolvedCredentials(r){if(typeof r!=="object"||typeof r.accessKeyId!=="string"||typeof r.secretAccessKey!=="string")throw new Error("Resolved credential object is not valid")}}var as=(r)=>{const s=cl(r).replace(/[\-:]/g,"");return{longDate:s,shortDate:s.slice(0,8)}},Al=(r)=>Object.keys(r).sort().join(";");var Rl="Directory",El="S3Express",Il="sigv4-s3express",ls="X-Amz-S3session-Token",Gr=ls.toLowerCase(),Xg="AWS_S3_DISABLE_EXPRESS_SESSION_AUTH",Zg="s3_disable_express_session_auth",ge={environmentVariableSelector:(r)=>t(r,Xg,rr.ENV),configFileSelector:(r)=>t(r,Zg,rr.CONFIG),default:!1};var Pl=function(r){return{accessKeyId:r.accessKeyId,secretAccessKey:r.secretAccessKey,expiration:r.expiration}},kl=function(r,s){const e=setTimeout(()=>{throw new Error("SignatureV4S3Express credential override was created but not called.")},10),a=r.credentialProvider,l=()=>{return clearTimeout(e),r.credentialProvider=a,Promise.resolve(s)};r.credentialProvider=l};class fs extends me{async signWithCredentials(r,s,e){const a=Pl(s);r.headers[Gr]=s.sessionToken;const l=this;return kl(l,a),l.signRequest(r,e??{})}async presignWithCredentials(r,s,e){const a=Pl(s);return delete r.headers[Gr],r.headers[ls]=s.sessionToken,r.query=r.query??{},r.query[ls]=s.sessionToken,kl(this,a),this.presign(r,e)}}var yl=(r)=>{return(s,e)=>async(a)=>{if(e.endpointV2){const l=e.endpointV2,f=l.properties?.authSchemes?.[0]?.name===Il;if(l.properties?.backend===El||l.properties?.bucketType===Rl)e.isS3ExpressBucket=!0;if(f){const m=a.input.Bucket;if(m){const g=await r.s3ExpressIdentityProvider.getS3ExpressIdentity(await r.credentials(),{Bucket:m});if(e.s3ExpressIdentity=g,K.isInstance(a.request)&&g.sessionToken)a.request.headers[Gr]=g.sessionToken}}}return s(a)}},Nl={name:"s3ExpressMiddleware",step:"build",tags:["S3","S3_EXPRESS"],override:!0},we=(r)=>({applyToStack:(s)=>{s.add(yl(r),Nl)}});var Tl=L(de(),1);var Vg=L(Qg(),1);var Dl=async(r,s,e,a)=>{const l=await a.signWithCredentials(e,r,{});if(l.headers["X-Amz-Security-Token"]||l.headers["x-amz-security-token"])throw new Error("X-Amz-Security-Token must not be set for s3-express requests.");return l};var Bg=(r)=>(s)=>{throw s},Jg=(r,s)=>{};var $l=(r)=>(s,e)=>async(a)=>{if(!K.isInstance(a.request))return s(a);const f=Fr(e).selectedHttpAuthScheme;if(!f)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:h={}},identity:m,signer:g}=f;let w;if(e.s3ExpressIdentity)w=await Dl(e.s3ExpressIdentity,h,a.request,await r.signer());else w=await g.sign(a.request,m,h);const A=await s({...a,request:w}).catch((g.errorHandler||Bg)(h));return(g.successHandler||Jg)(A.response,h),A},Se=(r)=>({applyToStack:(s)=>{s.addRelativeTo($l(r),Tl.httpSigningMiddlewareOptions)}});var Ul=(r,{session:s})=>{const[e,a]=s;return{...r,forcePathStyle:r.forcePathStyle??!1,useAccelerateEndpoint:r.useAccelerateEndpoint??!1,disableMultiregionAccessPoints:r.disableMultiregionAccessPoints??!1,followRegionRedirects:r.followRegionRedirects??!1,s3ExpressIdentityProvider:r.s3ExpressIdentityProvider??new mr(async(l)=>e().send(new a({Bucket:l,SessionMode:"ReadWrite"}))),bucketEndpoint:r.bucketEndpoint??!1}};var Yg={CopyObjectCommand:!0,UploadPartCopyCommand:!0,CompleteMultipartUploadCommand:!0},_g=3000,Og=(r)=>(s,e)=>async(a)=>{const l=await s(a),{response:f}=l;if(!or.isInstance(f))return l;const{statusCode:h,body:m}=f;if(h<200||h>=300)return l;let g=m,w=m;if(m&&typeof m==="object"&&!(m instanceof Uint8Array))[g,w]=await Ml(m);f.body=w;const A=await qg(g,{streamCollector:async(P)=>{return vl(P,_g)}});if(typeof g?.destroy==="function")g.destroy();const I=r.utf8Encoder(A.subarray(A.length-16));if(A.length===0&&Yg[e.commandName]){const P=new Error("S3 aborted request");throw P.name="InternalError",P}if(I&&I.endsWith("</Error>"))f.statusCode=400;return l},qg=(r=new Uint8Array,s)=>{if(r instanceof Uint8Array)return Promise.resolve(r);return s.streamCollector(r)||Promise.resolve(new Uint8Array)},jg={relation:"after",toMiddleware:"deserializerMiddleware",tags:["THROW_200_EXCEPTIONS","S3"],name:"throw200ExceptionsMiddleware",override:!0},hs=(r)=>({applyToStack:(s)=>{s.addRelativeTo(Og(r),jg)}});var ce=(r)=>typeof r==="string"&&r.indexOf("arn:")===0&&r.split(":").length>=6;function Cl(r){return(s,e)=>async(a)=>{if(r.bucketEndpoint){const l=e.endpointV2;if(l){const f=a.input.Bucket;if(typeof f==="string")try{const h=new URL(f);l.url=h}catch(h){const m=`@aws-sdk/middleware-sdk-s3: bucketEndpoint=true was set but Bucket=${f} could not be parsed as URL.`;if(e.logger?.constructor?.name==="NoOpLogger")console.warn(m);else e.logger?.warn?.(m);throw h}}}return s(a)}}var Hl={name:"bucketEndpointMiddleware",override:!0,relation:"after",toMiddleware:"endpointV2Middleware"};function ig({bucketEndpoint:r}){return(s)=>async(e)=>{const{input:{Bucket:a}}=e;if(!r&&typeof a==="string"&&!ce(a)&&a.indexOf("/")>=0){const l=new Error(`Bucket name shouldn't contain '/', received '${a}'`);throw l.name="InvalidBucketName",l}return s({...e})}}var bg={step:"initialize",tags:["VALIDATE_BUCKET_NAME"],name:"validateBucketNameMiddleware",override:!0},zl=(r)=>({applyToStack:(s)=>{s.add(ig(r),bg),s.addRelativeTo(Cl(r),Hl)}});var Nr=L(de(),1);var Gl=(r)=>({...r,eventStreamMarshaller:r.eventStreamSerdeProvider(r)});var Is=L(Es(),1);var ms={CrtSignerV4:null};class Ae{constructor(r){this.sigv4Signer=new fs(r),this.signerOptions=r}async sign(r,s={}){if(s.signingRegion==="*"){if(this.signerOptions.runtime!=="node")throw new Error("This request requires signing with SigV4Asymmetric algorithm. It's only available in Node.js");return this.getSigv4aSigner().sign(r,s)}return this.sigv4Signer.sign(r,s)}async signWithCredentials(r,s,e={}){if(e.signingRegion==="*"){if(this.signerOptions.runtime!=="node")throw new Error("This request requires signing with SigV4Asymmetric algorithm. It's only available in Node.js");return this.getSigv4aSigner().signWithCredentials(r,s,e)}return this.sigv4Signer.signWithCredentials(r,s,e)}async presign(r,s={}){if(s.signingRegion==="*"){if(this.signerOptions.runtime!=="node")throw new Error("This request requires signing with SigV4Asymmetric algorithm. It's only available in Node.js");return this.getSigv4aSigner().presign(r,s)}return this.sigv4Signer.presign(r,s)}async presignWithCredentials(r,s,e={}){if(e.signingRegion==="*")throw new Error("Method presignWithCredentials is not supported for [signingRegion=*].");return this.sigv4Signer.presignWithCredentials(r,s,e)}getSigv4aSigner(){if(!this.sigv4aSigner){let r=null;try{if(r=ms.CrtSignerV4,typeof r!=="function")throw new Error}catch(s){throw s.message=`${s.message}\n`+'Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. \nYou must also register the package by calling [require("@aws-sdk/signature-v4-crt");] or an ESM equivalent such as [import "@aws-sdk/signature-v4-crt";]. \nFor more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt',s}this.sigv4aSigner=new r({...this.signerOptions,signingAlgorithm:1})}return this.sigv4aSigner}}var wr={["required"]:!1,["type"]:"String"},dr={["required"]:!0,default:!1,["type"]:"Boolean"},Kr={["required"]:!1,["type"]:"Boolean"},Y={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"Accelerate"},!0]},N={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},y={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},M={["fn"]:"isSet",["argv"]:[{["ref"]:"Endpoint"}]},Df={["fn"]:"aws.partition",["argv"]:[{["ref"]:"Region"}],["assign"]:"partitionResult"},Fl={["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[{["ref"]:"partitionResult"},"name"]},"aws-cn"]},cs={["fn"]:"isSet",["argv"]:[{["ref"]:"Bucket"}]},X={["ref"]:"Bucket"},W={["fn"]:"parseURL",["argv"]:[{["ref"]:"Endpoint"}],["assign"]:"url"},Ss={["fn"]:"booleanEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[{["ref"]:"url"},"isIp"]},!0]},Tf={["ref"]:"url"},$f={["fn"]:"uriEncode",["argv"]:[X],["assign"]:"uri_encoded_bucket"},j={["backend"]:"S3Express",["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3express",["signingRegion"]:"{Region}"}]},d={},Uf={["fn"]:"aws.isVirtualHostableS3Bucket",["argv"]:[X,!1]},Re={["error"]:"S3Express bucket name is not a valid virtual hostable name.",["type"]:"error"},As={["backend"]:"S3Express",["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4-s3express",["signingName"]:"s3express",["signingRegion"]:"{Region}"}]},Kl={["fn"]:"isSet",["argv"]:[{["ref"]:"UseS3ExpressControlEndpoint"}]},Ll={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseS3ExpressControlEndpoint"},!0]},S={["fn"]:"not",["argv"]:[M]},Wl={["error"]:"Unrecognized S3Express bucket name format.",["type"]:"error"},Xl={["fn"]:"not",["argv"]:[cs]},Zl={["ref"]:"hardwareType"},Ql={["conditions"]:[S],["error"]:"Expected a endpoint to be specified but no endpoint was found",["type"]:"error"},gs={["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4a",["signingName"]:"s3-outposts",["signingRegionSet"]:["*"]},{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3-outposts",["signingRegion"]:"{Region}"}]},Ee={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"ForcePathStyle"},!1]},xg={["ref"]:"ForcePathStyle"},U={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"Accelerate"},!1]},C={["fn"]:"stringEquals",["argv"]:[{["ref"]:"Region"},"aws-global"]},z={["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3",["signingRegion"]:"us-east-1"}]},E={["fn"]:"not",["argv"]:[C]},G={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseGlobalEndpoint"},!0]},Vl={["url"]:"https://{Bucket}.s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",["properties"]:{["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3",["signingRegion"]:"{Region}"}]},["headers"]:{}},v={["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3",["signingRegion"]:"{Region}"}]},F={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseGlobalEndpoint"},!1]},R={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!1]},Bl={["url"]:"https://{Bucket}.s3-fips.{Region}.{partitionResult#dnsSuffix}",["properties"]:v,["headers"]:{}},c={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!1]},Jl={["url"]:"https://{Bucket}.s3-accelerate.dualstack.{partitionResult#dnsSuffix}",["properties"]:v,["headers"]:{}},Yl={["url"]:"https://{Bucket}.s3.dualstack.{Region}.{partitionResult#dnsSuffix}",["properties"]:v,["headers"]:{}},Ie={["fn"]:"booleanEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[Tf,"isIp"]},!1]},Pe={["url"]:"{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}",["properties"]:v,["headers"]:{}},Qe={["url"]:"{url#scheme}://{Bucket}.{url#authority}{url#path}",["properties"]:v,["headers"]:{}},_l={["endpoint"]:Qe,["type"]:"endpoint"},ke={["url"]:"https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}",["properties"]:v,["headers"]:{}},Ol={["url"]:"https://{Bucket}.s3.{Region}.{partitionResult#dnsSuffix}",["properties"]:v,["headers"]:{}},ws={["error"]:"Invalid region: region was not a valid DNS name.",["type"]:"error"},V={["ref"]:"bucketArn"},Mf={["ref"]:"arnType"},ye={["fn"]:"getAttr",["argv"]:[V,"service"]},Ve={["ref"]:"accessPointName"},ql={["conditions"]:[y],["error"]:"S3 Object Lambda does not support Dual-stack",["type"]:"error"},jl={["conditions"]:[Y],["error"]:"S3 Object Lambda does not support S3 Accelerate",["type"]:"error"},il={["conditions"]:[{["fn"]:"isSet",["argv"]:[{["ref"]:"DisableAccessPoints"}]},{["fn"]:"booleanEquals",["argv"]:[{["ref"]:"DisableAccessPoints"},!0]}],["error"]:"Access points are not supported for this operation",["type"]:"error"},Ne={["conditions"]:[{["fn"]:"isSet",["argv"]:[{["ref"]:"UseArnRegion"}]},{["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseArnRegion"},!1]},{["fn"]:"not",["argv"]:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[V,"region"]},"{Region}"]}]}],["error"]:"Invalid configuration: region from ARN `{bucketArn#region}` does not match client region `{Region}` and UseArnRegion is `false`",["type"]:"error"},vf={["fn"]:"getAttr",["argv"]:[{["ref"]:"bucketPartition"},"name"]},Cf={["fn"]:"getAttr",["argv"]:[V,"accountId"]},De={["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3-object-lambda",["signingRegion"]:"{bucketArn#region}"}]},bl={["error"]:"Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `{accessPointName}`",["type"]:"error"},Te={["error"]:"Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `{bucketArn#accountId}`",["type"]:"error"},$e={["error"]:"Invalid region in ARN: `{bucketArn#region}` (invalid DNS name)",["type"]:"error"},Ue={["error"]:"Client was configured for partition `{partitionResult#name}` but ARN (`{Bucket}`) has `{bucketPartition#name}`",["type"]:"error"},xl={["error"]:"Invalid ARN: The ARN may only contain a single resource component after `accesspoint`.",["type"]:"error"},ol={["error"]:"Invalid ARN: Expected a resource of the format `accesspoint:<accesspoint name>` but no name was provided",["type"]:"error"},Lr={["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3",["signingRegion"]:"{bucketArn#region}"}]},nl={["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4a",["signingName"]:"s3-outposts",["signingRegionSet"]:["*"]},{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3-outposts",["signingRegion"]:"{bucketArn#region}"}]},pl={["fn"]:"aws.parseArn",["argv"]:[X]},ul={["url"]:"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:v,["headers"]:{}},tl={["url"]:"https://s3-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:v,["headers"]:{}},rf={["url"]:"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:v,["headers"]:{}},Me={["url"]:"{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}",["properties"]:v,["headers"]:{}},sf={["url"]:"https://s3.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:v,["headers"]:{}},ef={["ref"]:"UseObjectLambdaEndpoint"},ve={["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3-object-lambda",["signingRegion"]:"{Region}"}]},af={["url"]:"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",["properties"]:v,["headers"]:{}},lf={["url"]:"https://s3-fips.{Region}.{partitionResult#dnsSuffix}",["properties"]:v,["headers"]:{}},ff={["url"]:"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}",["properties"]:v,["headers"]:{}},Ce={["url"]:"{url#scheme}://{url#authority}{url#path}",["properties"]:v,["headers"]:{}},hf={["url"]:"https://s3.{Region}.{partitionResult#dnsSuffix}",["properties"]:v,["headers"]:{}},He=[{["ref"]:"Region"}],og=[{["ref"]:"Endpoint"}],ng=[X],ze=[y],ds=[Y],sr=[M,W],mf=[{["fn"]:"isSet",["argv"]:[{["ref"]:"DisableS3ExpressSessionAuth"}]},{["fn"]:"booleanEquals",["argv"]:[{["ref"]:"DisableS3ExpressSessionAuth"},!0]}],gf=[Ss],Ge=[$f],Fe=[Uf],Sr=[N],wf=[{["fn"]:"substring",["argv"]:[X,6,14,!0],["assign"]:"s3expressAvailabilityZoneId"},{["fn"]:"substring",["argv"]:[X,14,16,!0],["assign"]:"s3expressAvailabilityZoneDelim"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"s3expressAvailabilityZoneDelim"},"--"]}],df=[{["conditions"]:[N],["endpoint"]:{["url"]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.amazonaws.com",["properties"]:j,["headers"]:{}},["type"]:"endpoint"},{["endpoint"]:{["url"]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.amazonaws.com",["properties"]:j,["headers"]:{}},["type"]:"endpoint"}],Sf=[{["fn"]:"substring",["argv"]:[X,6,15,!0],["assign"]:"s3expressAvailabilityZoneId"},{["fn"]:"substring",["argv"]:[X,15,17,!0],["assign"]:"s3expressAvailabilityZoneDelim"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"s3expressAvailabilityZoneDelim"},"--"]}],cf=[{["conditions"]:[N],["endpoint"]:{["url"]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.amazonaws.com",["properties"]:As,["headers"]:{}},["type"]:"endpoint"},{["endpoint"]:{["url"]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.amazonaws.com",["properties"]:As,["headers"]:{}},["type"]:"endpoint"}],pg=[cs],Af=[{["fn"]:"isValidHostLabel",["argv"]:[{["ref"]:"outpostId"},!1]}],Rf=[{["fn"]:"stringEquals",["argv"]:[{["ref"]:"regionPrefix"},"beta"]}],ug=["*"],x=[Df],Ef=[{["fn"]:"isValidHostLabel",["argv"]:[{["ref"]:"Region"},!1]}],o=[{["fn"]:"stringEquals",["argv"]:[{["ref"]:"Region"},"us-east-1"]}],Ke=[{["fn"]:"stringEquals",["argv"]:[Mf,"accesspoint"]}],If=[{["fn"]:"getAttr",["argv"]:[V,"resourceId[1]"],["assign"]:"accessPointName"},{["fn"]:"not",["argv"]:[{["fn"]:"stringEquals",["argv"]:[Ve,""]}]}],tg=[V,"resourceId[1]"],Le=[{["fn"]:"not",["argv"]:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[V,"region"]},""]}]}],Pf=[{["fn"]:"not",["argv"]:[{["fn"]:"isSet",["argv"]:[{["fn"]:"getAttr",["argv"]:[V,"resourceId[2]"]}]}]}],rw=[V,"resourceId[2]"],We=[{["fn"]:"aws.partition",["argv"]:[{["fn"]:"getAttr",["argv"]:[V,"region"]}],["assign"]:"bucketPartition"}],kf=[{["fn"]:"stringEquals",["argv"]:[vf,{["fn"]:"getAttr",["argv"]:[{["ref"]:"partitionResult"},"name"]}]}],Xe=[{["fn"]:"isValidHostLabel",["argv"]:[{["fn"]:"getAttr",["argv"]:[V,"region"]},!0]}],Ze=[{["fn"]:"isValidHostLabel",["argv"]:[Cf,!1]}],yf=[{["fn"]:"isValidHostLabel",["argv"]:[Ve,!1]}],Nf=[{["fn"]:"isValidHostLabel",["argv"]:[{["ref"]:"Region"},!0]}],sw={version:"1.0",parameters:{Bucket:wr,Region:wr,UseFIPS:dr,UseDualStack:dr,Endpoint:wr,ForcePathStyle:dr,Accelerate:dr,UseGlobalEndpoint:dr,UseObjectLambdaEndpoint:Kr,Key:wr,Prefix:wr,CopySource:wr,DisableAccessPoints:Kr,DisableMultiRegionAccessPoints:dr,UseArnRegion:Kr,UseS3ExpressControlEndpoint:Kr,DisableS3ExpressSessionAuth:Kr},rules:[{["conditions"]:[{["fn"]:"isSet",["argv"]:He}],rules:[{["conditions"]:[Y,N],error:"Accelerate cannot be used with FIPS",["type"]:"error"},{["conditions"]:[y,M],error:"Cannot set dual-stack in combination with a custom endpoint.",["type"]:"error"},{["conditions"]:[M,N],error:"A custom endpoint cannot be combined with FIPS",["type"]:"error"},{["conditions"]:[M,Y],error:"A custom endpoint cannot be combined with S3 Accelerate",["type"]:"error"},{["conditions"]:[N,Df,Fl],error:"Partition does not support FIPS",["type"]:"error"},{["conditions"]:[cs,{["fn"]:"substring",["argv"]:[X,0,6,!0],["assign"]:"bucketSuffix"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"bucketSuffix"},"--x-s3"]}],rules:[{["conditions"]:ze,error:"S3Express does not support Dual-stack.",["type"]:"error"},{["conditions"]:ds,error:"S3Express does not support S3 Accelerate.",["type"]:"error"},{["conditions"]:sr,rules:[{["conditions"]:mf,rules:[{["conditions"]:gf,rules:[{["conditions"]:Ge,rules:[{endpoint:{["url"]:"{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}",["properties"]:j,["headers"]:d},["type"]:"endpoint"}],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:Fe,rules:[{endpoint:{["url"]:"{url#scheme}://{Bucket}.{url#authority}{url#path}",["properties"]:j,["headers"]:d},["type"]:"endpoint"}],["type"]:"tree"},Re],["type"]:"tree"},{["conditions"]:gf,rules:[{["conditions"]:Ge,rules:[{endpoint:{["url"]:"{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}",["properties"]:As,["headers"]:d},["type"]:"endpoint"}],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:Fe,rules:[{endpoint:{["url"]:"{url#scheme}://{Bucket}.{url#authority}{url#path}",["properties"]:As,["headers"]:d},["type"]:"endpoint"}],["type"]:"tree"},Re],["type"]:"tree"},{["conditions"]:[Kl,Ll],rules:[{["conditions"]:[$f,S],rules:[{["conditions"]:Sr,endpoint:{["url"]:"https://s3express-control-fips.{Region}.amazonaws.com/{uri_encoded_bucket}",["properties"]:j,["headers"]:d},["type"]:"endpoint"},{endpoint:{["url"]:"https://s3express-control.{Region}.amazonaws.com/{uri_encoded_bucket}",["properties"]:j,["headers"]:d},["type"]:"endpoint"}],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:Fe,rules:[{["conditions"]:mf,rules:[{["conditions"]:wf,rules:df,["type"]:"tree"},{["conditions"]:Sf,rules:df,["type"]:"tree"},Wl],["type"]:"tree"},{["conditions"]:wf,rules:cf,["type"]:"tree"},{["conditions"]:Sf,rules:cf,["type"]:"tree"},Wl],["type"]:"tree"},Re],["type"]:"tree"},{["conditions"]:[Xl,Kl,Ll],rules:[{["conditions"]:sr,endpoint:{["url"]:"{url#scheme}://{url#authority}{url#path}",["properties"]:j,["headers"]:d},["type"]:"endpoint"},{["conditions"]:Sr,endpoint:{["url"]:"https://s3express-control-fips.{Region}.amazonaws.com",["properties"]:j,["headers"]:d},["type"]:"endpoint"},{endpoint:{["url"]:"https://s3express-control.{Region}.amazonaws.com",["properties"]:j,["headers"]:d},["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[cs,{["fn"]:"substring",["argv"]:[X,49,50,!0],["assign"]:"hardwareType"},{["fn"]:"substring",["argv"]:[X,8,12,!0],["assign"]:"regionPrefix"},{["fn"]:"substring",["argv"]:[X,0,7,!0],["assign"]:"bucketAliasSuffix"},{["fn"]:"substring",["argv"]:[X,32,49,!0],["assign"]:"outpostId"},{["fn"]:"aws.partition",["argv"]:He,["assign"]:"regionPartition"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"bucketAliasSuffix"},"--op-s3"]}],rules:[{["conditions"]:Af,rules:[{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[Zl,"e"]}],rules:[{["conditions"]:Rf,rules:[Ql,{["conditions"]:sr,endpoint:{["url"]:"https://{Bucket}.ec2.{url#authority}",["properties"]:gs,["headers"]:d},["type"]:"endpoint"}],["type"]:"tree"},{endpoint:{["url"]:"https://{Bucket}.ec2.s3-outposts.{Region}.{regionPartition#dnsSuffix}",["properties"]:gs,["headers"]:d},["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[Zl,"o"]}],rules:[{["conditions"]:Rf,rules:[Ql,{["conditions"]:sr,endpoint:{["url"]:"https://{Bucket}.op-{outpostId}.{url#authority}",["properties"]:gs,["headers"]:d},["type"]:"endpoint"}],["type"]:"tree"},{endpoint:{["url"]:"https://{Bucket}.op-{outpostId}.s3-outposts.{Region}.{regionPartition#dnsSuffix}",["properties"]:gs,["headers"]:d},["type"]:"endpoint"}],["type"]:"tree"},{error:"Unrecognized hardware type: \"Expected hardware type o or e but got {hardwareType}\"",["type"]:"error"}],["type"]:"tree"},{error:"Invalid ARN: The outpost Id must only contain a-z, A-Z, 0-9 and `-`.",["type"]:"error"}],["type"]:"tree"},{["conditions"]:pg,rules:[{["conditions"]:[M,{["fn"]:"not",["argv"]:[{["fn"]:"isSet",["argv"]:[{["fn"]:"parseURL",["argv"]:og}]}]}],error:"Custom endpoint `{Endpoint}` was not a valid URI",["type"]:"error"},{["conditions"]:[Ee,Uf],rules:[{["conditions"]:x,rules:[{["conditions"]:Ef,rules:[{["conditions"]:[Y,Fl],error:"S3 Accelerate cannot be used in this region",["type"]:"error"},{["conditions"]:[y,N,U,S,C],endpoint:{["url"]:"https://{Bucket}.s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}",["properties"]:z,["headers"]:d},["type"]:"endpoint"},{["conditions"]:[y,N,U,S,E,G],rules:[{endpoint:Vl,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[y,N,U,S,E,F],endpoint:Vl,["type"]:"endpoint"},{["conditions"]:[R,N,U,S,C],endpoint:{["url"]:"https://{Bucket}.s3-fips.us-east-1.{partitionResult#dnsSuffix}",["properties"]:z,["headers"]:d},["type"]:"endpoint"},{["conditions"]:[R,N,U,S,E,G],rules:[{endpoint:Bl,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[R,N,U,S,E,F],endpoint:Bl,["type"]:"endpoint"},{["conditions"]:[y,c,Y,S,C],endpoint:{["url"]:"https://{Bucket}.s3-accelerate.dualstack.us-east-1.{partitionResult#dnsSuffix}",["properties"]:z,["headers"]:d},["type"]:"endpoint"},{["conditions"]:[y,c,Y,S,E,G],rules:[{endpoint:Jl,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[y,c,Y,S,E,F],endpoint:Jl,["type"]:"endpoint"},{["conditions"]:[y,c,U,S,C],endpoint:{["url"]:"https://{Bucket}.s3.dualstack.us-east-1.{partitionResult#dnsSuffix}",["properties"]:z,["headers"]:d},["type"]:"endpoint"},{["conditions"]:[y,c,U,S,E,G],rules:[{endpoint:Yl,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[y,c,U,S,E,F],endpoint:Yl,["type"]:"endpoint"},{["conditions"]:[R,c,U,M,W,Ss,C],endpoint:{["url"]:"{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}",["properties"]:z,["headers"]:d},["type"]:"endpoint"},{["conditions"]:[R,c,U,M,W,Ie,C],endpoint:{["url"]:"{url#scheme}://{Bucket}.{url#authority}{url#path}",["properties"]:z,["headers"]:d},["type"]:"endpoint"},{["conditions"]:[R,c,U,M,W,Ss,E,G],rules:[{["conditions"]:o,endpoint:Pe,["type"]:"endpoint"},{endpoint:Pe,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[R,c,U,M,W,Ie,E,G],rules:[{["conditions"]:o,endpoint:Qe,["type"]:"endpoint"},_l],["type"]:"tree"},{["conditions"]:[R,c,U,M,W,Ss,E,F],endpoint:Pe,["type"]:"endpoint"},{["conditions"]:[R,c,U,M,W,Ie,E,F],endpoint:Qe,["type"]:"endpoint"},{["conditions"]:[R,c,Y,S,C],endpoint:{["url"]:"https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}",["properties"]:z,["headers"]:d},["type"]:"endpoint"},{["conditions"]:[R,c,Y,S,E,G],rules:[{["conditions"]:o,endpoint:ke,["type"]:"endpoint"},{endpoint:ke,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[R,c,Y,S,E,F],endpoint:ke,["type"]:"endpoint"},{["conditions"]:[R,c,U,S,C],endpoint:{["url"]:"https://{Bucket}.s3.{partitionResult#dnsSuffix}",["properties"]:z,["headers"]:d},["type"]:"endpoint"},{["conditions"]:[R,c,U,S,E,G],rules:[{["conditions"]:o,endpoint:{["url"]:"https://{Bucket}.s3.{partitionResult#dnsSuffix}",["properties"]:v,["headers"]:d},["type"]:"endpoint"},{endpoint:Ol,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[R,c,U,S,E,F],endpoint:Ol,["type"]:"endpoint"}],["type"]:"tree"},ws],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:[M,W,{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[Tf,"scheme"]},"http"]},{["fn"]:"aws.isVirtualHostableS3Bucket",["argv"]:[X,!0]},Ee,c,R,U],rules:[{["conditions"]:x,rules:[{["conditions"]:Ef,rules:[_l],["type"]:"tree"},ws],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:[Ee,{["fn"]:"aws.parseArn",["argv"]:ng,["assign"]:"bucketArn"}],rules:[{["conditions"]:[{["fn"]:"getAttr",["argv"]:[V,"resourceId[0]"],["assign"]:"arnType"},{["fn"]:"not",["argv"]:[{["fn"]:"stringEquals",["argv"]:[Mf,""]}]}],rules:[{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[ye,"s3-object-lambda"]}],rules:[{["conditions"]:Ke,rules:[{["conditions"]:If,rules:[ql,jl,{["conditions"]:Le,rules:[il,{["conditions"]:Pf,rules:[Ne,{["conditions"]:We,rules:[{["conditions"]:x,rules:[{["conditions"]:kf,rules:[{["conditions"]:Xe,rules:[{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[Cf,""]}],error:"Invalid ARN: Missing account id",["type"]:"error"},{["conditions"]:Ze,rules:[{["conditions"]:yf,rules:[{["conditions"]:sr,endpoint:{["url"]:"{url#scheme}://{accessPointName}-{bucketArn#accountId}.{url#authority}{url#path}",["properties"]:De,["headers"]:d},["type"]:"endpoint"},{["conditions"]:Sr,endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}",["properties"]:De,["headers"]:d},["type"]:"endpoint"},{endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda.{bucketArn#region}.{bucketPartition#dnsSuffix}",["properties"]:De,["headers"]:d},["type"]:"endpoint"}],["type"]:"tree"},bl],["type"]:"tree"},Te],["type"]:"tree"},$e],["type"]:"tree"},Ue],["type"]:"tree"}],["type"]:"tree"}],["type"]:"tree"},xl],["type"]:"tree"},{error:"Invalid ARN: bucket ARN is missing a region",["type"]:"error"}],["type"]:"tree"},ol],["type"]:"tree"},{error:"Invalid ARN: Object Lambda ARNs only support `accesspoint` arn types, but found: `{arnType}`",["type"]:"error"}],["type"]:"tree"},{["conditions"]:Ke,rules:[{["conditions"]:If,rules:[{["conditions"]:Le,rules:[{["conditions"]:Ke,rules:[{["conditions"]:Le,rules:[il,{["conditions"]:Pf,rules:[Ne,{["conditions"]:We,rules:[{["conditions"]:x,rules:[{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[vf,"{partitionResult#name}"]}],rules:[{["conditions"]:Xe,rules:[{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[ye,"s3"]}],rules:[{["conditions"]:Ze,rules:[{["conditions"]:yf,rules:[{["conditions"]:ds,error:"Access Points do not support S3 Accelerate",["type"]:"error"},{["conditions"]:[N,y],endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}",["properties"]:Lr,["headers"]:d},["type"]:"endpoint"},{["conditions"]:[N,R],endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}",["properties"]:Lr,["headers"]:d},["type"]:"endpoint"},{["conditions"]:[c,y],endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}",["properties"]:Lr,["headers"]:d},["type"]:"endpoint"},{["conditions"]:[c,R,M,W],endpoint:{["url"]:"{url#scheme}://{accessPointName}-{bucketArn#accountId}.{url#authority}{url#path}",["properties"]:Lr,["headers"]:d},["type"]:"endpoint"},{["conditions"]:[c,R],endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.{bucketArn#region}.{bucketPartition#dnsSuffix}",["properties"]:Lr,["headers"]:d},["type"]:"endpoint"}],["type"]:"tree"},bl],["type"]:"tree"},Te],["type"]:"tree"},{error:"Invalid ARN: The ARN was not for the S3 service, found: {bucketArn#service}",["type"]:"error"}],["type"]:"tree"},$e],["type"]:"tree"},Ue],["type"]:"tree"}],["type"]:"tree"}],["type"]:"tree"},xl],["type"]:"tree"}],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:[{["fn"]:"isValidHostLabel",["argv"]:[Ve,!0]}],rules:[{["conditions"]:ze,error:"S3 MRAP does not support dual-stack",["type"]:"error"},{["conditions"]:Sr,error:"S3 MRAP does not support FIPS",["type"]:"error"},{["conditions"]:ds,error:"S3 MRAP does not support S3 Accelerate",["type"]:"error"},{["conditions"]:[{["fn"]:"booleanEquals",["argv"]:[{["ref"]:"DisableMultiRegionAccessPoints"},!0]}],error:"Invalid configuration: Multi-Region Access Point ARNs are disabled.",["type"]:"error"},{["conditions"]:[{["fn"]:"aws.partition",["argv"]:He,["assign"]:"mrapPartition"}],rules:[{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[{["ref"]:"mrapPartition"},"name"]},{["fn"]:"getAttr",["argv"]:[V,"partition"]}]}],rules:[{endpoint:{["url"]:"https://{accessPointName}.accesspoint.s3-global.{mrapPartition#dnsSuffix}",["properties"]:{["authSchemes"]:[{["disableDoubleEncoding"]:!0,name:"sigv4a",["signingName"]:"s3",["signingRegionSet"]:ug}]},["headers"]:d},["type"]:"endpoint"}],["type"]:"tree"},{error:"Client was configured for partition `{mrapPartition#name}` but bucket referred to partition `{bucketArn#partition}`",["type"]:"error"}],["type"]:"tree"}],["type"]:"tree"},{error:"Invalid Access Point Name",["type"]:"error"}],["type"]:"tree"},ol],["type"]:"tree"},{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[ye,"s3-outposts"]}],rules:[{["conditions"]:ze,error:"S3 Outposts does not support Dual-stack",["type"]:"error"},{["conditions"]:Sr,error:"S3 Outposts does not support FIPS",["type"]:"error"},{["conditions"]:ds,error:"S3 Outposts does not support S3 Accelerate",["type"]:"error"},{["conditions"]:[{["fn"]:"isSet",["argv"]:[{["fn"]:"getAttr",["argv"]:[V,"resourceId[4]"]}]}],error:"Invalid Arn: Outpost Access Point ARN contains sub resources",["type"]:"error"},{["conditions"]:[{["fn"]:"getAttr",["argv"]:tg,["assign"]:"outpostId"}],rules:[{["conditions"]:Af,rules:[Ne,{["conditions"]:We,rules:[{["conditions"]:x,rules:[{["conditions"]:kf,rules:[{["conditions"]:Xe,rules:[{["conditions"]:Ze,rules:[{["conditions"]:[{["fn"]:"getAttr",["argv"]:rw,["assign"]:"outpostType"}],rules:[{["conditions"]:[{["fn"]:"getAttr",["argv"]:[V,"resourceId[3]"],["assign"]:"accessPointName"}],rules:[{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[{["ref"]:"outpostType"},"accesspoint"]}],rules:[{["conditions"]:sr,endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.{url#authority}",["properties"]:nl,["headers"]:d},["type"]:"endpoint"},{endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.s3-outposts.{bucketArn#region}.{bucketPartition#dnsSuffix}",["properties"]:nl,["headers"]:d},["type"]:"endpoint"}],["type"]:"tree"},{error:"Expected an outpost type `accesspoint`, found {outpostType}",["type"]:"error"}],["type"]:"tree"},{error:"Invalid ARN: expected an access point name",["type"]:"error"}],["type"]:"tree"},{error:"Invalid ARN: Expected a 4-component resource",["type"]:"error"}],["type"]:"tree"},Te],["type"]:"tree"},$e],["type"]:"tree"},Ue],["type"]:"tree"}],["type"]:"tree"}],["type"]:"tree"},{error:"Invalid ARN: The outpost Id may only contain a-z, A-Z, 0-9 and `-`. Found: `{outpostId}`",["type"]:"error"}],["type"]:"tree"},{error:"Invalid ARN: The Outpost Id was not set",["type"]:"error"}],["type"]:"tree"},{error:"Invalid ARN: Unrecognized format: {Bucket} (type: {arnType})",["type"]:"error"}],["type"]:"tree"},{error:"Invalid ARN: No ARN type specified",["type"]:"error"}],["type"]:"tree"},{["conditions"]:[{["fn"]:"substring",["argv"]:[X,0,4,!1],["assign"]:"arnPrefix"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"arnPrefix"},"arn:"]},{["fn"]:"not",["argv"]:[{["fn"]:"isSet",["argv"]:[pl]}]}],error:"Invalid ARN: `{Bucket}` was not a valid ARN",["type"]:"error"},{["conditions"]:[{["fn"]:"booleanEquals",["argv"]:[xg,!0]},pl],error:"Path-style addressing cannot be used with ARN buckets",["type"]:"error"},{["conditions"]:Ge,rules:[{["conditions"]:x,rules:[{["conditions"]:[U],rules:[{["conditions"]:[y,S,N,C],endpoint:{["url"]:"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:z,["headers"]:d},["type"]:"endpoint"},{["conditions"]:[y,S,N,E,G],rules:[{endpoint:ul,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[y,S,N,E,F],endpoint:ul,["type"]:"endpoint"},{["conditions"]:[R,S,N,C],endpoint:{["url"]:"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:z,["headers"]:d},["type"]:"endpoint"},{["conditions"]:[R,S,N,E,G],rules:[{endpoint:tl,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[R,S,N,E,F],endpoint:tl,["type"]:"endpoint"},{["conditions"]:[y,S,c,C],endpoint:{["url"]:"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:z,["headers"]:d},["type"]:"endpoint"},{["conditions"]:[y,S,c,E,G],rules:[{endpoint:rf,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[y,S,c,E,F],endpoint:rf,["type"]:"endpoint"},{["conditions"]:[R,M,W,c,C],endpoint:{["url"]:"{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}",["properties"]:z,["headers"]:d},["type"]:"endpoint"},{["conditions"]:[R,M,W,c,E,G],rules:[{["conditions"]:o,endpoint:Me,["type"]:"endpoint"},{endpoint:Me,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[R,M,W,c,E,F],endpoint:Me,["type"]:"endpoint"},{["conditions"]:[R,S,c,C],endpoint:{["url"]:"https://s3.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:z,["headers"]:d},["type"]:"endpoint"},{["conditions"]:[R,S,c,E,G],rules:[{["conditions"]:o,endpoint:{["url"]:"https://s3.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:v,["headers"]:d},["type"]:"endpoint"},{endpoint:sf,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[R,S,c,E,F],endpoint:sf,["type"]:"endpoint"}],["type"]:"tree"},{error:"Path-style addressing cannot be used with S3 Accelerate",["type"]:"error"}],["type"]:"tree"}],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:[{["fn"]:"isSet",["argv"]:[ef]},{["fn"]:"booleanEquals",["argv"]:[ef,!0]}],rules:[{["conditions"]:x,rules:[{["conditions"]:Nf,rules:[ql,jl,{["conditions"]:sr,endpoint:{["url"]:"{url#scheme}://{url#authority}{url#path}",["properties"]:ve,["headers"]:d},["type"]:"endpoint"},{["conditions"]:Sr,endpoint:{["url"]:"https://s3-object-lambda-fips.{Region}.{partitionResult#dnsSuffix}",["properties"]:ve,["headers"]:d},["type"]:"endpoint"},{endpoint:{["url"]:"https://s3-object-lambda.{Region}.{partitionResult#dnsSuffix}",["properties"]:ve,["headers"]:d},["type"]:"endpoint"}],["type"]:"tree"},ws],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:[Xl],rules:[{["conditions"]:x,rules:[{["conditions"]:Nf,rules:[{["conditions"]:[N,y,S,C],endpoint:{["url"]:"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}",["properties"]:z,["headers"]:d},["type"]:"endpoint"},{["conditions"]:[N,y,S,E,G],rules:[{endpoint:af,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[N,y,S,E,F],endpoint:af,["type"]:"endpoint"},{["conditions"]:[N,R,S,C],endpoint:{["url"]:"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}",["properties"]:z,["headers"]:d},["type"]:"endpoint"},{["conditions"]:[N,R,S,E,G],rules:[{endpoint:lf,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[N,R,S,E,F],endpoint:lf,["type"]:"endpoint"},{["conditions"]:[c,y,S,C],endpoint:{["url"]:"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}",["properties"]:z,["headers"]:d},["type"]:"endpoint"},{["conditions"]:[c,y,S,E,G],rules:[{endpoint:ff,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[c,y,S,E,F],endpoint:ff,["type"]:"endpoint"},{["conditions"]:[c,R,M,W,C],endpoint:{["url"]:"{url#scheme}://{url#authority}{url#path}",["properties"]:z,["headers"]:d},["type"]:"endpoint"},{["conditions"]:[c,R,M,W,E,G],rules:[{["conditions"]:o,endpoint:Ce,["type"]:"endpoint"},{endpoint:Ce,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[c,R,M,W,E,F],endpoint:Ce,["type"]:"endpoint"},{["conditions"]:[c,R,S,C],endpoint:{["url"]:"https://s3.{partitionResult#dnsSuffix}",["properties"]:z,["headers"]:d},["type"]:"endpoint"},{["conditions"]:[c,R,S,E,G],rules:[{["conditions"]:o,endpoint:{["url"]:"https://s3.{partitionResult#dnsSuffix}",["properties"]:v,["headers"]:d},["type"]:"endpoint"},{endpoint:hf,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[c,R,S,E,F],endpoint:hf,["type"]:"endpoint"}],["type"]:"tree"},ws],["type"]:"tree"}],["type"]:"tree"}],["type"]:"tree"},{error:"A region must be set when sending requests to S3.",["type"]:"error"}]},Hf=sw;var Rs=(r,s={})=>{return Gf(Hf,{endpointParams:r,logger:s.logger})};zf.aws=Ff;var Wf=function(r){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"s3",region:r.region},propertiesExtractor:(s,e)=>({signingProperties:{config:s,context:e}})}},Xf=function(r){return{schemeId:"aws.auth#sigv4a",signingProperties:{name:"s3",region:r.region},propertiesExtractor:(s,e)=>({signingProperties:{config:s,context:e}})}},ew=(r)=>async(s,e,a)=>{if(!a)throw new Error("Could not find \`input\` for \`defaultEndpointRuleSetHttpAuthSchemeParametersProvider\`");const l=await r(s,e,a),f=Fr(e)?.commandInstance?.constructor?.getEndpointParameterInstructions;if(!f)throw new Error(`getEndpointParameterInstructions() is not defined on \`${e.commandName}\``);const h=await Kf(a,{getEndpointParameterInstructions:f},s);return Object.assign(l,h)},aw=async(r,s,e)=>{return{operation:Fr(s).operation,region:await zr(r.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},Lf=ew(aw),lw=(r,s,e)=>{return(l)=>{const h=r(l).properties?.authSchemes;if(!h)return s(l);const m=[];for(let g of h){const{name:w,properties:A={},...I}=g,P=w.toLowerCase();if(w!==P)console.warn(`HttpAuthScheme has been normalized with lowercasing: \`${w}\` to \`${P}\``);let $;if(P==="sigv4a"){$="aws.auth#sigv4a";const jr=h.find((q)=>{const $r=q.name.toLowerCase();return $r!=="sigv4a"&&$r.startsWith("sigv4")});if(!ms.CrtSignerV4&&jr)continue}else if(P.startsWith("sigv4"))$="aws.auth#sigv4";else throw new Error(`Unknown HttpAuthScheme found in \`@smithy.rules#endpointRuleSet\`: \`${P}\``);const D=e[$];if(!D)throw new Error(`Could not find HttpAuthOption create function for \`${$}\``);const Q=D(l);Q.schemeId=$,Q.signingProperties={...Q.signingProperties||{},...I,...A},m.push(Q)}return m}},fw=(r)=>{const s=[];switch(r.operation){default:s.push(Wf(r)),s.push(Xf(r))}return s},Zf=lw(Rs,fw,{"aws.auth#sigv4":Wf,"aws.auth#sigv4a":Xf}),Qf=(r)=>{const s=Is.resolveAwsSdkSigV4Config(r);return{...Is.resolveAwsSdkSigV4AConfig(s)}};var Vf=(r)=>{return{...r,useFipsEndpoint:r.useFipsEndpoint??!1,useDualstackEndpoint:r.useDualstackEndpoint??!1,forcePathStyle:r.forcePathStyle??!1,useAccelerateEndpoint:r.useAccelerateEndpoint??!1,useGlobalEndpoint:r.useGlobalEndpoint??!1,disableMultiregionAccessPoints:r.disableMultiregionAccessPoints??!1,defaultSigningName:"s3"}},cr={ForcePathStyle:{type:"clientContextParams",name:"forcePathStyle"},UseArnRegion:{type:"clientContextParams",name:"useArnRegion"},DisableMultiRegionAccessPoints:{type:"clientContextParams",name:"disableMultiregionAccessPoints"},Accelerate:{type:"clientContextParams",name:"useAccelerateEndpoint"},DisableS3ExpressSessionAuth:{type:"clientContextParams",name:"disableS3ExpressSessionAuth"},UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};class Z extends Bf{constructor(r){super(r);Object.setPrototypeOf(this,Z.prototype)}}class Ps extends Z{constructor(r){super({name:"NoSuchUpload",$fault:"client",...r});this.name="NoSuchUpload",this.$fault="client",Object.setPrototypeOf(this,Ps.prototype)}}class ks extends Z{constructor(r){super({name:"ObjectNotInActiveTierError",$fault:"client",...r});this.name="ObjectNotInActiveTierError",this.$fault="client",Object.setPrototypeOf(this,ks.prototype)}}class ys extends Z{constructor(r){super({name:"BucketAlreadyExists",$fault:"client",...r});this.name="BucketAlreadyExists",this.$fault="client",Object.setPrototypeOf(this,ys.prototype)}}class Ns extends Z{constructor(r){super({name:"BucketAlreadyOwnedByYou",$fault:"client",...r});this.name="BucketAlreadyOwnedByYou",this.$fault="client",Object.setPrototypeOf(this,Ns.prototype)}}class Ds extends Z{constructor(r){super({name:"NoSuchBucket",$fault:"client",...r});this.name="NoSuchBucket",this.$fault="client",Object.setPrototypeOf(this,Ds.prototype)}}var Be;(function(r){r.visit=(s,e)=>{if(s.Prefix!==void 0)return e.Prefix(s.Prefix);if(s.Tag!==void 0)return e.Tag(s.Tag);if(s.And!==void 0)return e.And(s.And);return e._(s.$unknown[0],s.$unknown[1])}})(Be||(Be={}));var Je;(function(r){r.visit=(s,e)=>{if(s.Prefix!==void 0)return e.Prefix(s.Prefix);if(s.Tag!==void 0)return e.Tag(s.Tag);if(s.ObjectSizeGreaterThan!==void 0)return e.ObjectSizeGreaterThan(s.ObjectSizeGreaterThan);if(s.ObjectSizeLessThan!==void 0)return e.ObjectSizeLessThan(s.ObjectSizeLessThan);if(s.And!==void 0)return e.And(s.And);return e._(s.$unknown[0],s.$unknown[1])}})(Je||(Je={}));var Ye;(function(r){r.visit=(s,e)=>{if(s.Prefix!==void 0)return e.Prefix(s.Prefix);if(s.Tag!==void 0)return e.Tag(s.Tag);if(s.AccessPointArn!==void 0)return e.AccessPointArn(s.AccessPointArn);if(s.And!==void 0)return e.And(s.And);return e._(s.$unknown[0],s.$unknown[1])}})(Ye||(Ye={}));var _e;(function(r){r.visit=(s,e)=>{if(s.Prefix!==void 0)return e.Prefix(s.Prefix);if(s.Tag!==void 0)return e.Tag(s.Tag);if(s.And!==void 0)return e.And(s.And);return e._(s.$unknown[0],s.$unknown[1])}})(_e||(_e={}));class Ts extends Z{constructor(r){super({name:"InvalidObjectState",$fault:"client",...r});this.name="InvalidObjectState",this.$fault="client",Object.setPrototypeOf(this,Ts.prototype),this.StorageClass=r.StorageClass,this.AccessTier=r.AccessTier}}class $s extends Z{constructor(r){super({name:"NoSuchKey",$fault:"client",...r});this.name="NoSuchKey",this.$fault="client",Object.setPrototypeOf(this,$s.prototype)}}class Us extends Z{constructor(r){super({name:"NotFound",$fault:"client",...r});this.name="NotFound",this.$fault="client",Object.setPrototypeOf(this,Us.prototype)}}var hw=(r)=>({...r,...r.SecretAccessKey&&{SecretAccessKey:_},...r.SessionToken&&{SessionToken:_}}),Jf=(r)=>({...r,...r.Credentials&&{Credentials:hw(r.Credentials)}});var Yf=(r)=>({...r,...r.SSEKMSKeyId&&{SSEKMSKeyId:_}}),_f=(r)=>({...r,...r.SSECustomerKey&&{SSECustomerKey:_}});var Er=L(Es(),1);var zs=L(de(),1);class Ms extends Z{constructor(r){super({name:"ObjectAlreadyInActiveTierError",$fault:"client",...r});this.name="ObjectAlreadyInActiveTierError",this.$fault="client",Object.setPrototypeOf(this,Ms.prototype)}}var Of;(function(r){r.visit=(s,e)=>{if(s.Records!==void 0)return e.Records(s.Records);if(s.Stats!==void 0)return e.Stats(s.Stats);if(s.Progress!==void 0)return e.Progress(s.Progress);if(s.Cont!==void 0)return e.Cont(s.Cont);if(s.End!==void 0)return e.End(s.End);return e._(s.$unknown[0],s.$unknown[1])}})(Of||(Of={}));var qf=(r)=>({...r,...r.SSEKMSKeyId&&{SSEKMSKeyId:_},...r.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:_}}),jf=(r)=>({...r,...r.SSECustomerKey&&{SSECustomerKey:_},...r.SSEKMSKeyId&&{SSEKMSKeyId:_},...r.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:_}});var fh=async(r,s)=>{const e=zs.requestBuilder(r,s),a=H({},i,{[Ed]:r[iw]});e.bp("/"),e.p("Bucket",()=>r.Bucket,"{Bucket}",!1);const l=H({[Sd]:[,""]});let f;return e.m("GET").h(a).q(l).b(f),e.build()};var hh=async(r,s)=>{const e=zs.requestBuilder(r,s),a=H({},i,{[tw]:r[Fw],[rd]:[()=>i(r[bf]),()=>Wr(r[bf]).toString()],[sd]:r[Kw],[ed]:[()=>i(r[xf]),()=>Wr(r[xf]).toString()],[ld]:r[Qw],[Ks]:r[Gs],[Bh]:r[Th],[Ls]:r[Fs],[Zh]:r[Dh],[Kh]:r[Ih],[Rd]:r[Tw]});e.bp("/{Key+}"),e.p("Bucket",()=>r.Bucket,"{Bucket}",!1),e.p("Key",()=>r.Key,"{Key+}",!0);const l=H({[_h]:[,"GetObject"],[fd]:[,r[Vw]],[hd]:[,r[Bw]],[md]:[,r[Jw]],[gd]:[,r[Yw]],[wd]:[,r[_w]],[dd]:[()=>r.ResponseExpires!==void 0,()=>Wr(r[Ow]).toString()],[cd]:[,r[ga]],[ad]:[()=>r.PartNumber!==void 0,()=>r[Zw].toString()]});let f;return e.m("GET").h(a).q(l).b(f),e.build()};var mh=async(r,s)=>{const e=zs.requestBuilder(r,s),a=H({},i,{[zh]:r[Eh]||"application/octet-stream",[Ad]:r[yw],[Mh]:r[Sh],[vh]:r[ch],[Ch]:r[Ah],[Hh]:r[Rh],[pe]:[()=>i(r[xe]),()=>r[xe].toString()],[nw]:r[$w],[Td]:r[Dw],[wa]:r[ea],[da]:r[aa],[Sa]:r[la],[ca]:r[fa],[ue]:[()=>i(r[oe]),()=>Wr(r[oe]).toString()],[Id]:r[Cw],[Pd]:r[Hw],[kd]:r[zw],[yd]:r[Gw],[Aa]:r[ha],[Qh]:r[Zr],[Yh]:r[Uh],[Ks]:r[Gs],[Bh]:r[Th],[Ls]:r[Fs],[Ra]:r[ma],[Vh]:r[$h],[Qr]:[()=>i(r[Hs]),()=>r[Hs].toString()],[Zh]:r[Dh],[$d]:r[bw],[Wh]:r[yh],[te]:[()=>i(r[ne]),()=>lh(r[ne]).toString()],[Lh]:r[kh],[Kh]:r[Ih],...r.Metadata!==void 0&&Object.keys(r.Metadata).reduce((m,g)=>{return m[`x-amz-meta-${g.toLowerCase()}`]=r.Metadata[g],m},{})});e.bp("/{Key+}"),e.p("Bucket",()=>r.Bucket,"{Bucket}",!1),e.p("Key",()=>r.Key,"{Key+}",!0);const l=H({[_h]:[,"PutObject"]});let f,h;if(r.Body!==void 0)h=r.Body,f=h;return e.m("PUT").h(a).q(l).b(f),e.build()};var gh=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return sa(r,s);const e=H({$metadata:J(r)}),a=Ar(sh(await Er.parseXmlBody(r.body,s)),"body");if(a[je]!=null)e[je]=kw(a[je],s);return e};var wh=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return sa(r,s);const e=H({$metadata:J(r),[Mw]:[()=>r.headers[nf]!==void 0,()=>Cs(r.headers[nf])],[Nw]:[,r.headers[ow]],[Xr]:[,r.headers[Fh]],[jw]:[,r.headers[Nd]],[Lw]:[()=>r.headers[of]!==void 0,()=>Ar(Ur(r.headers[of]))],[xe]:[()=>r.headers[pe]!==void 0,()=>eh(r.headers[pe])],[Ph]:[,r.headers[Gh]],[ea]:[,r.headers[wa]],[aa]:[,r.headers[da]],[la]:[,r.headers[Sa]],[fa]:[,r.headers[ca]],[Ww]:[()=>r.headers[pf]!==void 0,()=>vs(r.headers[pf])],[ga]:[,r.headers[Jh]],[Sh]:[,r.headers[Mh]],[ch]:[,r.headers[vh]],[Ah]:[,r.headers[Ch]],[Rh]:[,r.headers[Hh]],[Uw]:[,r.headers[pw]],[Eh]:[,r.headers[zh]],[oe]:[()=>r.headers[ue]!==void 0,()=>Ar(Ur(r.headers[ue]))],[vw]:[,r.headers[uw]],[Uh]:[,r.headers[Yh]],[ha]:[,r.headers[Aa]],[Gs]:[,r.headers[Ks]],[Fs]:[,r.headers[Ls]],[ma]:[,r.headers[Ra]],[Hs]:[()=>r.headers[Qr]!==void 0,()=>Cs(r.headers[Qr])],[Zr]:[,r.headers[Qh]],[Nh]:[,r.headers[Xh]],[qw]:[,r.headers[Dd]],[Xw]:[()=>r.headers[uf]!==void 0,()=>vs(r.headers[uf])],[xw]:[()=>r.headers[tf]!==void 0,()=>vs(r.headers[tf])],[yh]:[,r.headers[Wh]],[ne]:[()=>r.headers[te]!==void 0,()=>Ar(ra(r.headers[te]))],[kh]:[,r.headers[Lh]],Metadata:[,Object.keys(r.headers).filter((l)=>l.startsWith("x-amz-meta-")).reduce((l,f)=>{return l[f.substring(11)]=r.headers[f],l},{})]}),a=r.body;return s.sdkStreamMixin(a),e.Body=a,e};var dh=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return sa(r,s);const e=H({$metadata:J(r),[Xr]:[,r.headers[Fh]],[Ph]:[,r.headers[Gh]],[ea]:[,r.headers[wa]],[aa]:[,r.headers[da]],[la]:[,r.headers[Sa]],[fa]:[,r.headers[ca]],[ha]:[,r.headers[Aa]],[ga]:[,r.headers[Jh]],[Gs]:[,r.headers[Ks]],[Fs]:[,r.headers[Ls]],[ma]:[,r.headers[Ra]],[$h]:[,r.headers[Vh]],[Hs]:[()=>r.headers[Qr]!==void 0,()=>Cs(r.headers[Qr])],[Nh]:[,r.headers[Xh]]});return await rh(r.body,s),e};var sa=async(r,s)=>{const e={...r,body:await Er.parseXmlErrorBody(r.body,s)},a=Er.loadRestXmlErrorCode(r,e.body);switch(a){case"NoSuchUpload":case"com.amazonaws.s3#NoSuchUpload":throw await Rw(e,s);case"ObjectNotInActiveTierError":case"com.amazonaws.s3#ObjectNotInActiveTierError":throw await Pw(e,s);case"BucketAlreadyExists":case"com.amazonaws.s3#BucketAlreadyExists":throw await ww(e,s);case"BucketAlreadyOwnedByYou":case"com.amazonaws.s3#BucketAlreadyOwnedByYou":throw await dw(e,s);case"NoSuchBucket":case"com.amazonaws.s3#NoSuchBucket":throw await cw(e,s);case"InvalidObjectState":case"com.amazonaws.s3#InvalidObjectState":throw await Sw(e,s);case"NoSuchKey":case"com.amazonaws.s3#NoSuchKey":throw await Aw(e,s);case"NotFound":case"com.amazonaws.s3#NotFound":throw await Ew(e,s);case"ObjectAlreadyInActiveTierError":case"com.amazonaws.s3#ObjectAlreadyInActiveTierError":throw await Iw(e,s);default:const l=e.body;return gw({output:r,parsedBody:l,errorCode:a})}},gw=ah(Z),ww=async(r,s)=>{const e=H({}),a=r.body,l=new ys({$metadata:J(r),...e});return O(l,r.body)},dw=async(r,s)=>{const e=H({}),a=r.body,l=new Ns({$metadata:J(r),...e});return O(l,r.body)},Sw=async(r,s)=>{const e=H({}),a=r.body;if(a[qe]!=null)e[qe]=Rr(a[qe]);if(a[Zr]!=null)e[Zr]=Rr(a[Zr]);const l=new Ts({$metadata:J(r),...e});return O(l,r.body)},cw=async(r,s)=>{const e=H({}),a=r.body,l=new Ds({$metadata:J(r),...e});return O(l,r.body)},Aw=async(r,s)=>{const e=H({}),a=r.body,l=new $s({$metadata:J(r),...e});return O(l,r.body)},Rw=async(r,s)=>{const e=H({}),a=r.body,l=new Ps({$metadata:J(r),...e});return O(l,r.body)},Ew=async(r,s)=>{const e=H({}),a=r.body,l=new Us({$metadata:J(r),...e});return O(l,r.body)},Iw=async(r,s)=>{const e=H({}),a=r.body,l=new Ms({$metadata:J(r),...e});return O(l,r.body)},Pw=async(r,s)=>{const e=H({}),a=r.body,l=new ks({$metadata:J(r),...e});return O(l,r.body)};var kw=(r,s)=>{const e={};if(r[Oe]!=null)e[Oe]=Rr(r[Oe]);if(r[ie]!=null)e[ie]=Rr(r[ie]);if(r[be]!=null)e[be]=Rr(r[be]);if(r[Xr]!=null)e[Xr]=Ar(ra(r[Xr]));return e};var J=(r)=>({httpStatusCode:r.statusCode,requestId:r.headers["x-amzn-requestid"]??r.headers["x-amzn-request-id"]??r.headers["x-amz-request-id"],extendedRequestId:r.headers["x-amz-id-2"],cfId:r.headers["x-amz-cf-id"]});var i=(r)=>r!==void 0&&r!==null&&r!==""&&(!Object.getOwnPropertyNames(r).includes("length")||r.length!=0)&&(!Object.getOwnPropertyNames(r).includes("size")||r.size!=0);var yw="ACL";var Oe="AccessKeyId";var Nw="AcceptRanges";var qe="AccessTier";var Hs="BucketKeyEnabled";var je="Credentials",Dw="ChecksumAlgorithm";var Sh="CacheControl",ea="ChecksumCRC32",aa="ChecksumCRC32C",ch="ContentDisposition";var Ah="ContentEncoding";var Rh="ContentLanguage",xe="ContentLength",Tw="ChecksumMode",$w="ContentMD5";var Uw="ContentRange";var la="ChecksumSHA1",fa="ChecksumSHA256";var Eh="ContentType";var Mw="DeleteMarker";var oe="Expires";var Ih="ExpectedBucketOwner";var vw="ExpiresString";var Ph="ETag";var Xr="Expiration";var Cw="GrantFullControl";var Hw="GrantRead",zw="GrantReadACP";var Gw="GrantWriteACP";var Fw="IfMatch",bf="IfModifiedSince",Kw="IfNoneMatch";var xf="IfUnmodifiedSince";var Lw="LastModified";var Ww="MissingMeta";var kh="ObjectLockLegalHoldStatus",yh="ObjectLockMode";var ne="ObjectLockRetainUntilDate";var Xw="PartsCount";var Zw="PartNumber";var Qw="Range";var Nh="RequestCharged",Vw="ResponseCacheControl",Bw="ResponseContentDisposition",Jw="ResponseContentEncoding",Yw="ResponseContentLanguage",_w="ResponseContentType";var Ow="ResponseExpires";var Dh="RequestPayer";var qw="ReplicationStatus";var jw="Restore";var ie="SecretAccessKey";var Zr="StorageClass";var iw="SessionMode";var ha="ServerSideEncryption";var Gs="SSECustomerAlgorithm",Th="SSECustomerKey",Fs="SSECustomerKeyMD5";var $h="SSEKMSEncryptionContext",ma="SSEKMSKeyId";var be="SessionToken";var bw="Tagging";var xw="TagCount";var ga="VersionId";var Uh="WebsiteRedirectLocation";var ow="accept-ranges";var Mh="cache-control",vh="content-disposition",Ch="content-encoding",Hh="content-language",pe="content-length",nw="content-md5",pw="content-range",zh="content-type";var ue="expires";var Gh="etag",uw="expiresstring";var tw="if-match",rd="if-modified-since";var sd="if-none-match";var ed="if-unmodified-since";var of="last-modified";var ad="partNumber";var ld="range",fd="response-cache-control",hd="response-content-disposition",md="response-content-encoding",gd="response-content-language",wd="response-content-type",dd="response-expires";var Sd="session";var cd="versionId";var Ad="x-amz-acl";var wa="x-amz-checksum-crc32",da="x-amz-checksum-crc32c",Rd="x-amz-checksum-mode";var Sa="x-amz-checksum-sha1",ca="x-amz-checksum-sha256";var Ed="x-amz-create-session-mode";var nf="x-amz-delete-marker",Fh="x-amz-expiration",Kh="x-amz-expected-bucket-owner";var Id="x-amz-grant-full-control",Pd="x-amz-grant-read",kd="x-amz-grant-read-acp";var yd="x-amz-grant-write-acp";var pf="x-amz-missing-meta";var uf="x-amz-mp-parts-count";var Lh="x-amz-object-lock-legal-hold",Wh="x-amz-object-lock-mode",te="x-amz-object-lock-retain-until-date";var Nd="x-amz-restore",Xh="x-amz-request-charged";var Zh="x-amz-request-payer";var Dd="x-amz-replication-status";var Qh="x-amz-storage-class",Td="x-amz-sdk-checksum-algorithm";var Aa="x-amz-server-side-encryption",Ra="x-amz-server-side-encryption-aws-kms-key-id",Qr="x-amz-server-side-encryption-bucket-key-enabled",Vh="x-amz-server-side-encryption-context",Ks="x-amz-server-side-encryption-customer-algorithm",Bh="x-amz-server-side-encryption-customer-key",Ls="x-amz-server-side-encryption-customer-key-md5",$d="x-amz-tagging",tf="x-amz-tagging-count";var Jh="x-amz-version-id",Yh="x-amz-website-redirect-location",_h="x-id";class Ea extends Ir.classBuilder().ep({...cr,DisableS3ExpressSessionAuth:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(r,s,e,a){return[Pr(e,this.serialize,this.deserialize),kr(e,r.getEndpointParameterInstructions()),hs(e)]}).s("AmazonS3","CreateSession",{}).n("S3Client","CreateSessionCommand").f(void 0,Jf).ser(fh).de(gh).build(){}var Oh={name:"@aws-sdk/client-s3",description:"AWS SDK for JavaScript S3 Client for Node.js, Browser and React Native",version:"3.629.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-s3","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo s3",test:"yarn test:unit","test:e2e":"yarn test:e2e:node && yarn test:e2e:browser","test:e2e:browser":"ts-mocha test/**/*.browser.ispec.ts && karma start karma.conf.js","test:e2e:node":"jest --c jest.config.e2e.js","test:unit":"ts-mocha test/unit/**/*.spec.ts"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha1-browser":"5.2.0","@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/client-sso-oidc":"3.629.0","@aws-sdk/client-sts":"3.629.0","@aws-sdk/core":"3.629.0","@aws-sdk/credential-provider-node":"3.629.0","@aws-sdk/middleware-bucket-endpoint":"3.620.0","@aws-sdk/middleware-expect-continue":"3.620.0","@aws-sdk/middleware-flexible-checksums":"3.620.0","@aws-sdk/middleware-host-header":"3.620.0","@aws-sdk/middleware-location-constraint":"3.609.0","@aws-sdk/middleware-logger":"3.609.0","@aws-sdk/middleware-recursion-detection":"3.620.0","@aws-sdk/middleware-sdk-s3":"3.629.0","@aws-sdk/middleware-ssec":"3.609.0","@aws-sdk/middleware-user-agent":"3.620.0","@aws-sdk/region-config-resolver":"3.614.0","@aws-sdk/signature-v4-multi-region":"3.629.0","@aws-sdk/types":"3.609.0","@aws-sdk/util-endpoints":"3.614.0","@aws-sdk/util-user-agent-browser":"3.609.0","@aws-sdk/util-user-agent-node":"3.614.0","@aws-sdk/xml-builder":"3.609.0","@smithy/config-resolver":"^3.0.5","@smithy/core":"^2.3.2","@smithy/eventstream-serde-browser":"^3.0.6","@smithy/eventstream-serde-config-resolver":"^3.0.3","@smithy/eventstream-serde-node":"^3.0.5","@smithy/fetch-http-handler":"^3.2.4","@smithy/hash-blob-browser":"^3.1.2","@smithy/hash-node":"^3.0.3","@smithy/hash-stream-node":"^3.1.2","@smithy/invalid-dependency":"^3.0.3","@smithy/md5-js":"^3.0.3","@smithy/middleware-content-length":"^3.0.5","@smithy/middleware-endpoint":"^3.1.0","@smithy/middleware-retry":"^3.0.14","@smithy/middleware-serde":"^3.0.3","@smithy/middleware-stack":"^3.0.3","@smithy/node-config-provider":"^3.1.4","@smithy/node-http-handler":"^3.1.4","@smithy/protocol-http":"^4.1.0","@smithy/smithy-client":"^3.1.12","@smithy/types":"^3.3.0","@smithy/url-parser":"^3.0.3","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.14","@smithy/util-defaults-mode-node":"^3.0.14","@smithy/util-endpoints":"^2.0.5","@smithy/util-middleware":"^3.0.3","@smithy/util-retry":"^3.0.3","@smithy/util-stream":"^3.1.3","@smithy/util-utf8":"^3.0.0","@smithy/util-waiter":"^3.1.2",tslib:"^2.6.2"},devDependencies:{"@aws-sdk/signature-v4-crt":"3.629.0","@tsconfig/node16":"16.1.3","@types/chai":"^4.2.11","@types/mocha":"^8.0.4","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=16.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-s3",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-s3"}};var Ys=L(Es(),1);var Md="AWS_S3_USE_ARN_REGION",vd="s3_use_arn_region",qh={environmentVariableSelector:(r)=>t(r,Md,rr.ENV),configFileSelector:(r)=>t(r,vd,rr.CONFIG),default:!1};var jh=L(Zd(),1),{__extends:S3,__assign:c3,__rest:A3,__decorate:R3,__param:E3,__esDecorate:I3,__runInitializers:P3,__propKey:k3,__setFunctionName:y3,__metadata:N3,__awaiter:Ws,__generator:Xs,__exportStar:D3,__createBinding:T3,__values:Zs,__read:$3,__spread:U3,__spreadArrays:M3,__spreadArray:v3,__await:C3,__asyncGenerator:H3,__asyncDelegator:z3,__asyncValues:G3,__makeTemplateObject:F3,__importStar:K3,__importDefault:L3,__classPrivateFieldGet:W3,__classPrivateFieldSet:X3,__classPrivateFieldIn:Z3,__addDisposableResource:Q3,__disposeResources:V3}=jh.default;import{Buffer as ih} from"buffer";var bh=(r,s)=>{if(typeof r!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof r} (${r})`);return s?ih.from(r,s):ih.from(r)};var Ia=(r)=>{const s=bh(r,"utf8");return new Uint8Array(s.buffer,s.byteOffset,s.byteLength/Uint8Array.BYTES_PER_ELEMENT)};function Vr(r){if(r instanceof Uint8Array)return r;if(typeof r==="string")return Qd(r);if(ArrayBuffer.isView(r))return new Uint8Array(r.buffer,r.byteOffset,r.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(r)}var Qd=typeof Buffer!=="undefined"&&Buffer.from?function(r){return Buffer.from(r,"utf8")}:Ia;function Br(r){if(typeof r==="string")return r.length===0;return r.byteLength===0}function Jr(r){return new Uint8Array([(r&4278190080)>>24,(r&16711680)>>16,(r&65280)>>8,r&255])}function Yr(r){if(!Uint32Array.from){var s=new Uint32Array(r.length),e=0;while(e<r.length)s[e]=r[e],e+=1;return s}return Uint32Array.from(r)}var Pa=function(){function r(){this.crc32=new er}return r.prototype.update=function(s){if(Br(s))return;this.crc32.update(Vr(s))},r.prototype.digest=function(){return Ws(this,void 0,void 0,function(){return Xs(this,function(s){return[2,Jr(this.crc32.digest())]})})},r.prototype.reset=function(){this.crc32=new er},r}();var er=function(){function r(){this.checksum=4294967295}return r.prototype.update=function(s){var e,a;try{for(var l=Zs(s),f=l.next();!f.done;f=l.next()){var h=f.value;this.checksum=this.checksum>>>8^Bd[(this.checksum^h)&255]}}catch(m){e={error:m}}finally{try{if(f&&!f.done&&(a=l.return))a.call(l)}finally{if(e)throw e.error}}return this},r.prototype.digest=function(){return(this.checksum^4294967295)>>>0},r}();var Vd=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918000,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117],Bd=Yr(Vd);var n=L(gr(),1);var oh=L(gr(),1),xh=function(r){for(let s=0;s<8;s++)r[s]^=255;for(let s=7;s>-1;s--)if(r[s]++,r[s]!==0)break};class yr{constructor(r){if(this.bytes=r,r.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(r){if(r>9223372036854776000||r<-9223372036854776000)throw new Error(`${r} is too large (or, if negative, too small) to represent as an Int64`);const s=new Uint8Array(8);for(let e=7,a=Math.abs(Math.round(r));e>-1&&a>0;e--,a/=256)s[e]=a;if(r<0)xh(s);return new yr(s)}valueOf(){const r=this.bytes.slice(0),s=r[0]&128;if(s)xh(r);return parseInt(oh.toHex(r),16)*(s?-1:1)}toString(){return String(this.valueOf())}}class ka{constructor(r,s){this.toUtf8=r,this.fromUtf8=s}format(r){const s=[];for(let l of Object.keys(r)){const f=this.fromUtf8(l);s.push(Uint8Array.from([f.byteLength]),f,this.formatHeaderValue(r[l]))}const e=new Uint8Array(s.reduce((l,f)=>l+f.byteLength,0));let a=0;for(let l of s)e.set(l,a),a+=l.byteLength;return e}formatHeaderValue(r){switch(r.type){case"boolean":return Uint8Array.from([r.value?0:1]);case"byte":return Uint8Array.from([2,r.value]);case"short":const s=new DataView(new ArrayBuffer(3));return s.setUint8(0,3),s.setInt16(1,r.value,!1),new Uint8Array(s.buffer);case"integer":const e=new DataView(new ArrayBuffer(5));return e.setUint8(0,4),e.setInt32(1,r.value,!1),new Uint8Array(e.buffer);case"long":const a=new Uint8Array(9);return a[0]=5,a.set(r.value.bytes,1),a;case"binary":const l=new DataView(new ArrayBuffer(3+r.value.byteLength));l.setUint8(0,6),l.setUint16(1,r.value.byteLength,!1);const f=new Uint8Array(l.buffer);return f.set(r.value,3),f;case"string":const h=this.fromUtf8(r.value),m=new DataView(new ArrayBuffer(3+h.byteLength));m.setUint8(0,7),m.setUint16(1,h.byteLength,!1);const g=new Uint8Array(m.buffer);return g.set(h,3),g;case"timestamp":const w=new Uint8Array(9);return w[0]=8,w.set(yr.fromNumber(r.value.valueOf()).bytes,1),w;case"uuid":if(!xd.test(r.value))throw new Error(`Invalid UUID received: ${r.value}`);const A=new Uint8Array(17);return A[0]=9,A.set(n.fromHex(r.value.replace(/\-/g,"")),1),A}}parse(r){const s={};let e=0;while(e<r.byteLength){const a=r.getUint8(e++),l=this.toUtf8(new Uint8Array(r.buffer,r.byteOffset+e,a));switch(e+=a,r.getUint8(e++)){case 0:s[l]={type:ph,value:!0};break;case 1:s[l]={type:ph,value:!1};break;case 2:s[l]={type:Jd,value:r.getInt8(e++)};break;case 3:s[l]={type:Yd,value:r.getInt16(e,!1)},e+=2;break;case 4:s[l]={type:_d,value:r.getInt32(e,!1)},e+=4;break;case 5:s[l]={type:Od,value:new yr(new Uint8Array(r.buffer,r.byteOffset+e,8))},e+=8;break;case 6:const f=r.getUint16(e,!1);e+=2,s[l]={type:qd,value:new Uint8Array(r.buffer,r.byteOffset+e,f)},e+=f;break;case 7:const h=r.getUint16(e,!1);e+=2,s[l]={type:jd,value:this.toUtf8(new Uint8Array(r.buffer,r.byteOffset+e,h))},e+=h;break;case 8:s[l]={type:id,value:new Date(new yr(new Uint8Array(r.buffer,r.byteOffset+e,8)).valueOf())},e+=8;break;case 9:const m=new Uint8Array(r.buffer,r.byteOffset+e,16);e+=16,s[l]={type:bd,value:`${n.toHex(m.subarray(0,4))}-${n.toHex(m.subarray(4,6))}-${n.toHex(m.subarray(6,8))}-${n.toHex(m.subarray(8,10))}-${n.toHex(m.subarray(10))}`};break;default:throw new Error("Unrecognized header type tag")}}return s}}var nh;(function(r){r[r.boolTrue=0]="boolTrue",r[r.boolFalse=1]="boolFalse",r[r.byte=2]="byte",r[r.short=3]="short",r[r.integer=4]="integer",r[r.long=5]="long",r[r.byteArray=6]="byteArray",r[r.string=7]="string",r[r.timestamp=8]="timestamp",r[r.uuid=9]="uuid"})(nh||(nh={}));var ph="boolean",Jd="byte",Yd="short",_d="integer",Od="long",qd="binary",jd="string",id="timestamp",bd="uuid",xd=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;function th({byteLength:r,byteOffset:s,buffer:e}){if(r<od)throw new Error("Provided message too short to accommodate event stream message overhead");const a=new DataView(e,s,r),l=a.getUint32(0,!1);if(r!==l)throw new Error("Reported message length does not match received message length");const f=a.getUint32(uh,!1),h=a.getUint32(p,!1),m=a.getUint32(r-ar,!1),g=new er().update(new Uint8Array(e,s,p));if(h!==g.digest())throw new Error(`The prelude checksum specified in the message (${h}) does not match the calculated CRC32 checksum (${g.digest()})`);if(g.update(new Uint8Array(e,s+p,r-(p+ar))),m!==g.digest())throw new Error(`The message checksum (${g.digest()}) did not match the expected value of ${m}`);return{headers:new DataView(e,s+p+ar,f),body:new Uint8Array(e,s+p+ar+f,l-f-(p+ar+ar))}}var uh=4,p=uh*2,ar=4,od=p+ar*2;class ya{constructor(r,s){this.headerMarshaller=new ka(r,s),this.messageBuffer=[],this.isEndOfStream=!1}feed(r){this.messageBuffer.push(this.decode(r))}endOfStream(){this.isEndOfStream=!0}getMessage(){const r=this.messageBuffer.pop(),s=this.isEndOfStream;return{getMessage(){return r},isEndOfStream(){return s}}}getAvailableMessages(){const r=this.messageBuffer;this.messageBuffer=[];const s=this.isEndOfStream;return{getMessages(){return r},isEndOfStream(){return s}}}encode({headers:r,body:s}){const e=this.headerMarshaller.format(r),a=e.byteLength+s.byteLength+16,l=new Uint8Array(a),f=new DataView(l.buffer,l.byteOffset,l.byteLength),h=new er;return f.setUint32(0,a,!1),f.setUint32(4,e.byteLength,!1),f.setUint32(8,h.update(l.subarray(0,8)).digest(),!1),l.set(e,12),l.set(s,e.byteLength+12),f.setUint32(a-4,h.update(l.subarray(8,a-4)).digest(),!1),l}decode(r){const{headers:s,body:e}=th(r);return{headers:this.headerMarshaller.parse(s),body:e}}formatHeaders(r){return this.headerMarshaller.format(r)}}class Na{constructor(r){this.options=r}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let r of this.options.inputStream)yield this.options.decoder.decode(r)}}class Da{constructor(r){this.options=r}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let r of this.options.messageStream)yield this.options.encoder.encode(r);if(this.options.includeEndFrame)yield new Uint8Array(0)}}class Ta{constructor(r){this.options=r}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let r of this.options.messageStream){const s=await this.options.deserializer(r);if(s===void 0)continue;yield s}}}class $a{constructor(r){this.options=r}[Symbol.asyncIterator](){return this.asyncIterator()}async*asyncIterator(){for await(let r of this.options.inputStream)yield this.options.serializer(r)}}function rm(r){let s=0,e=0,a=null,l=null;const f=(m)=>{if(typeof m!=="number")throw new Error("Attempted to allocate an event message where size was not a number: "+m);s=m,e=4,a=new Uint8Array(m),new DataView(a.buffer).setUint32(0,m,!1)},h=async function*(){const m=r[Symbol.asyncIterator]();while(!0){const{value:g,done:w}=await m.next();if(w){if(!s)return;else if(s===e)yield a;else throw new Error("Truncated event message received.");return}const A=g.length;let I=0;while(I<A){if(!a){const $=A-I;if(!l)l=new Uint8Array(4);const D=Math.min(4-e,$);if(l.set(g.slice(I,I+D),e),e+=D,I+=D,e<4)break;f(new DataView(l.buffer).getUint32(0,!1)),l=null}const P=Math.min(s-e,A-I);if(a.set(g.slice(I,I+P),e),e+=P,I+=P,s&&s===e)yield a,a=null,s=0,e=0}}};return{[Symbol.asyncIterator]:h}}function sm(r,s){return async function(e){const{value:a}=e.headers[":message-type"];if(a==="error"){const l=new Error(e.headers[":error-message"].value||"UnknownError");throw l.name=e.headers[":error-code"].value,l}else if(a==="exception"){const l=e.headers[":exception-type"].value,f={[l]:e},h=await r(f);if(h.$unknown){const m=new Error(s(e.body));throw m.name=l,m}throw h[l]}else if(a==="event"){const l={[e.headers[":event-type"].value]:e},f=await r(l);if(f.$unknown)return;return f}else throw Error(`Unrecognizable event type: ${e.headers[":event-type"].value}`)}}class Qs{constructor({utf8Encoder:r,utf8Decoder:s}){this.eventStreamCodec=new ya(r,s),this.utfEncoder=r}deserialize(r,s){const e=rm(r);return new Ta({messageStream:new Na({inputStream:e,decoder:this.eventStreamCodec}),deserializer:sm(s,this.utfEncoder)})}serialize(r,s){return new Da({messageStream:new $a({inputStream:r,serializer:s}),encoder:this.eventStreamCodec,includeEndFrame:!0})}}import{Readable as nd} from"stream";async function*em(r){let s=!1,e=!1;const a=new Array;r.on("error",(l)=>{if(!s)s=!0;if(l)throw l}),r.on("data",(l)=>{a.push(l)}),r.on("end",()=>{s=!0});while(!e){const l=await new Promise((f)=>setTimeout(()=>f(a.shift()),0));if(l)yield l;e=s&&a.length===0}}class Ua{constructor({utf8Encoder:r,utf8Decoder:s}){this.universalMarshaller=new Qs({utf8Decoder:s,utf8Encoder:r})}deserialize(r,s){const e=typeof r[Symbol.asyncIterator]==="function"?r:em(r);return this.universalMarshaller.deserialize(e,s)}serialize(r,s){return nd.from(this.universalMarshaller.serialize(r,s))}}var am=(r)=>new Ua(r);import{Writable as pd} from"stream";class Vs extends pd{constructor(r,s){super(s);this.hash=r}_write(r,s,e){try{this.hash.update(B(r))}catch(a){return e(a)}e()}}var lm=(r,s)=>{if(s.readableFlowing!==null)throw new Error("Unable to calculate hash for flowing readable stream");const e=new r,a=new Vs(e);return s.pipe(a),new Promise((l,f)=>{s.on("error",(h)=>{a.end(),f(h)}),a.on("error",f),a.on("finish",()=>{e.digest().then(l).catch(f)})})};var Bs=L(Es(),1);var Sm=(r)=>{return{apiVersion:"2006-03-01",base64Decoder:r?.base64Decoder??fm,base64Encoder:r?.base64Encoder??mm,disableHostPrefix:r?.disableHostPrefix??!1,endpointProvider:r?.endpointProvider??Rs,extensions:r?.extensions??[],getAwsChunkedEncodingStream:r?.getAwsChunkedEncodingStream??gm,httpAuthSchemeProvider:r?.httpAuthSchemeProvider??Zf,httpAuthSchemes:r?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(s)=>s.getIdentityProvider("aws.auth#sigv4"),signer:new Bs.AwsSdkSigV4Signer},{schemeId:"aws.auth#sigv4a",identityProvider:(s)=>s.getIdentityProvider("aws.auth#sigv4a"),signer:new Bs.AwsSdkSigV4ASigner}],logger:r?.logger??new xr,sdkStreamMixin:r?.sdkStreamMixin??wm,serviceId:r?.serviceId??"S3",signerConstructor:r?.signerConstructor??Ae,signingEscapePath:r?.signingEscapePath??!1,urlParser:r?.urlParser??dm,useArnRegion:r?.useArnRegion??!1,utf8Decoder:r?.utf8Decoder??Cr,utf8Encoder:r?.utf8Encoder??hm}};var Cm=(r)=>{Em(process.version);const s=Mm(r),e=()=>s().then(Rm),a=Sm(r);return Ys.emitWarningIfUnsupportedVersion(process.version),{...a,...r,runtime:"node",defaultsMode:s,bodyLengthChecker:r?.bodyLengthChecker??Um,credentialDefaultProvider:r?.credentialDefaultProvider??vm,defaultUserAgentProvider:r?.defaultUserAgentProvider??$m({serviceId:a.serviceId,clientVersion:Oh.version}),disableS3ExpressSessionAuth:r?.disableS3ExpressSessionAuth??b(ge),eventStreamSerdeProvider:r?.eventStreamSerdeProvider??am,maxAttempts:r?.maxAttempts??b(Dm),md5:r?.md5??Js.bind(null,"md5"),region:r?.region??b(km,ym),requestHandler:cm.create(r?.requestHandler??e),retryMode:r?.retryMode??b({...Tm,default:async()=>(await e()).retryMode||Nm}),sha1:r?.sha1??Js.bind(null,"sha1"),sha256:r?.sha256??Js.bind(null,"sha256"),sigv4aSigningRegionSet:r?.sigv4aSigningRegionSet??b(Ys.NODE_SIGV4A_CONFIG_OPTIONS),streamCollector:r?.streamCollector??Am,streamHasher:r?.streamHasher??lm,useArnRegion:r?.useArnRegion??b(qh),useDualstackEndpoint:r?.useDualstackEndpoint??b(Im),useFipsEndpoint:r?.useFipsEndpoint??b(Pm)}};var Hm=(r)=>{const s=r.httpAuthSchemes;let{httpAuthSchemeProvider:e,credentials:a}=r;return{setHttpAuthScheme(l){const f=s.findIndex((h)=>h.schemeId===l.schemeId);if(f===-1)s.push(l);else s.splice(f,1,l)},httpAuthSchemes(){return s},setHttpAuthSchemeProvider(l){e=l},httpAuthSchemeProvider(){return e},setCredentials(l){a=l},credentials(){return a}}},zm=(r)=>{return{httpAuthSchemes:r.httpAuthSchemes(),httpAuthSchemeProvider:r.httpAuthSchemeProvider(),credentials:r.credentials()}};var _s=(r)=>r,Zm=(r,s)=>{const e={..._s(Wm(r)),..._s(Km(r)),..._s(Gm(r)),..._s(Hm(r))};return s.forEach((a)=>a.configure(e)),{...r,...Xm(e),...Lm(e),...Fm(e),...zm(e)}};class Ma extends Ym{constructor(...[r]){const s=Cm(r||{}),e=Vf(s),a=_m(e),l=bm(a),f=qm(l),h=Qm(f),m=im(h),g=Gl(m),w=Qf(g),A=Ul(w,{session:[()=>this,Ea]}),I=Zm(A,r?.extensions||[]);super(I);this.config=I,this.middlewareStack.use(Om(this.config)),this.middlewareStack.use(xm(this.config)),this.middlewareStack.use(jm(this.config)),this.middlewareStack.use(Vm(this.config)),this.middlewareStack.use(Bm(this.config)),this.middlewareStack.use(Jm(this.config)),this.middlewareStack.use(Nr.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:Lf,identityProviderConfigProvider:async(P)=>new Nr.DefaultIdentityProviderConfig({"aws.auth#sigv4":P.credentials,"aws.auth#sigv4a":P.credentials})})),this.middlewareStack.use(Nr.getHttpSigningPlugin(this.config)),this.middlewareStack.use(zl(this.config)),this.middlewareStack.use(Xa(this.config)),this.middlewareStack.use(Ba(this.config)),this.middlewareStack.use(we(this.config)),this.middlewareStack.use(Se(this.config))}destroy(){super.destroy()}}function ud(r){return(s)=>async(e)=>{const a={...e.input},l=[{target:"SSECustomerKey",hash:"SSECustomerKeyMD5"},{target:"CopySourceSSECustomerKey",hash:"CopySourceSSECustomerKeyMD5"}];for(let f of l){const h=a[f.target];if(h){let m;if(typeof h==="string")if(rS(h,r))m=r.base64Decoder(h);else m=r.utf8Decoder(h),a[f.target]=r.base64Encoder(m);else m=ArrayBuffer.isView(h)?new Uint8Array(h.buffer,h.byteOffset,h.byteLength):new Uint8Array(h),a[f.target]=r.base64Encoder(m);const g=new r.md5;g.update(m),a[f.hash]=r.base64Encoder(await g.digest())}}return s({...e,input:a})}}function rS(r,s){if(!/^(?:[A-Za-z0-9+/]{4})*([A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(r))return!1;try{return s.base64Decoder(r).length===32}catch{return!1}}var td={name:"ssecMiddleware",step:"initialize",tags:["SSE"],override:!0},Os=(r)=>({applyToStack:(s)=>{s.add(ud(r),td)}});var T;(function(r){r.MD5="MD5",r.CRC32="CRC32",r.CRC32C="CRC32C",r.SHA1="SHA1",r.SHA256="SHA256"})(T||(T={}));var om;(function(r){r.HEADER="header",r.TRAILER="trailer"})(om||(om={}));var{MD5:nm,CRC32:pm}=T;var _r=[T.CRC32,T.CRC32C,T.SHA1,T.SHA256],um=[T.CRC32,T.CRC32C,T.SHA1,T.SHA256];var tm=(r,{requestChecksumRequired:s,requestAlgorithmMember:e},a)=>{const l=a?pm:nm;if(!e||!r[e])return s?l:void 0;const f=r[e];if(!_r.includes(f))throw new Error(`The checksum algorithm "${f}" is not supported by the client.`+` Select one of ${_r}.`);return f};var Dr=(r)=>r===T.MD5?"content-md5":`x-amz-checksum-${r.toLowerCase()}`;var rg=(r,s)=>{const e=r.toLowerCase();for(let a of Object.keys(s))if(e===a.toLowerCase())return!0;return!1};var Tr=(r)=>r!==void 0&&typeof r!=="string"&&!ArrayBuffer.isView(r)&&!rs(r);var Ca=function(){function r(){this.crc32c=new va}return r.prototype.update=function(s){if(Br(s))return;this.crc32c.update(Vr(s))},r.prototype.digest=function(){return Ws(this,void 0,void 0,function(){return Xs(this,function(s){return[2,Jr(this.crc32c.digest())]})})},r.prototype.reset=function(){this.crc32c=new va},r}();var va=function(){function r(){this.checksum=4294967295}return r.prototype.update=function(s){var e,a;try{for(var l=Zs(s),f=l.next();!f.done;f=l.next()){var h=f.value;this.checksum=this.checksum>>>8^eS[(this.checksum^h)&255]}}catch(m){e={error:m}}finally{try{if(f&&!f.done&&(a=l.return))a.call(l)}finally{if(e)throw e.error}}return this},r.prototype.digest=function(){return(this.checksum^4294967295)>>>0},r}();var sS=[0,4067132163,3778769143,324072436,3348797215,904991772,648144872,3570033899,2329499855,2024987596,1809983544,2575936315,1296289744,3207089363,2893594407,1578318884,274646895,3795141740,4049975192,51262619,3619967088,632279923,922689671,3298075524,2592579488,1760304291,2075979607,2312596564,1562183871,2943781820,3156637768,1313733451,549293790,3537243613,3246849577,871202090,3878099393,357341890,102525238,4101499445,2858735121,1477399826,1264559846,3107202533,1845379342,2677391885,2361733625,2125378298,820201905,3263744690,3520608582,598981189,4151959214,85089709,373468761,3827903834,3124367742,1213305469,1526817161,2842354314,2107672161,2412447074,2627466902,1861252501,1098587580,3004210879,2688576843,1378610760,2262928035,1955203488,1742404180,2511436119,3416409459,969524848,714683780,3639785095,205050476,4266873199,3976438427,526918040,1361435347,2739821008,2954799652,1114974503,2529119692,1691668175,2005155131,2247081528,3690758684,697762079,986182379,3366744552,476452099,3993867776,4250756596,255256311,1640403810,2477592673,2164122517,1922457750,2791048317,1412925310,1197962378,3037525897,3944729517,427051182,170179418,4165941337,746937522,3740196785,3451792453,1070968646,1905808397,2213795598,2426610938,1657317369,3053634322,1147748369,1463399397,2773627110,4215344322,153784257,444234805,3893493558,1021025245,3467647198,3722505002,797665321,2197175160,1889384571,1674398607,2443626636,1164749927,3070701412,2757221520,1446797203,137323447,4198817972,3910406976,461344835,3484808360,1037989803,781091935,3705997148,2460548119,1623424788,1939049696,2180517859,1429367560,2807687179,3020495871,1180866812,410100952,3927582683,4182430767,186734380,3756733383,763408580,1053836080,3434856499,2722870694,1344288421,1131464017,2971354706,1708204729,2545590714,2229949006,1988219213,680717673,3673779818,3383336350,1002577565,4010310262,493091189,238226049,4233660802,2987750089,1082061258,1395524158,2705686845,1972364758,2279892693,2494862625,1725896226,952904198,3399985413,3656866545,731699698,4283874585,222117402,510512622,3959836397,3280807620,837199303,582374963,3504198960,68661723,4135334616,3844915500,390545967,1230274059,3141532936,2825850620,1510247935,2395924756,2091215383,1878366691,2644384480,3553878443,565732008,854102364,3229815391,340358836,3861050807,4117890627,119113024,1493875044,2875275879,3090270611,1247431312,2660249211,1828433272,2141937292,2378227087,3811616794,291187481,34330861,4032846830,615137029,3603020806,3314634738,939183345,1776939221,2609017814,2295496738,2058945313,2926798794,1545135305,1330124605,3173225534,4084100981,17165430,307568514,3762199681,888469610,3332340585,3587147933,665062302,2042050490,2346497209,2559330125,1793573966,3190661285,1279665062,1595330642,2910671697],eS=Yr(sS);var qs=(r,s)=>({[T.MD5]:s.md5,[T.CRC32]:Pa,[T.CRC32C]:Ca,[T.SHA1]:s.sha1,[T.SHA256]:s.sha256})[r];var js=(r,s)=>{const e=new r;return e.update(B(s||"")),e.digest()};var sg={name:"flexibleChecksumsMiddleware",step:"build",tags:["BODY_CHECKSUM"],override:!0},eg=(r,s)=>(e,a)=>async(l)=>{if(!K.isInstance(l.request))return e(l);const{request:f}=l,{body:h,headers:m}=f,{base64Encoder:g,streamHasher:w}=r,{input:A,requestChecksumRequired:I,requestAlgorithmMember:P}=s,$=tm(A,{requestChecksumRequired:I,requestAlgorithmMember:P},!!a.isS3ExpressBucket);let D=h,Q=m;if($){const q=Dr($),$r=qs($,r);if(Tr(h)){const{getAwsChunkedEncodingStream:ts,bodyLengthChecker:$g}=r;D=ts(h,{base64Encoder:g,bodyLengthChecker:$g,checksumLocationName:q,checksumAlgorithmFn:$r,streamHasher:w}),Q={...m,"content-encoding":m["content-encoding"]?`${m["content-encoding"]},aws-chunked`:"aws-chunked","transfer-encoding":"chunked","x-amz-decoded-content-length":m["content-length"],"x-amz-content-sha256":"STREAMING-UNSIGNED-PAYLOAD-TRAILER","x-amz-trailer":q},delete Q["content-length"]}else if(!rg(q,m)){const ts=await js($r,h);Q={...m,[q]:g(ts)}}}return await e({...l,request:{...f,headers:Q,body:D}})};var is=(r=[])=>{const s=[];for(let e of um){if(!r.includes(e)||!_r.includes(e))continue;s.push(e)}return s};var ag=(r)=>{const s=r.lastIndexOf("-");if(s!==-1){const e=r.slice(s+1);if(!e.startsWith("0")){const a=parseInt(e,10);if(!isNaN(a)&&a>=1&&a<=1e4)return!0}}return!1};import{Transform as aS} from"stream";function Ha(r){const s=new aS;return s.push(r),s.push(null),s}var lg=async(r,{streamHasher:s,checksumAlgorithmFn:e,base64Encoder:a})=>{const l=Tr(r)?s(e,r):js(e,r);return a(await l)};var fg=async(r,{config:s,responseAlgorithms:e})=>{const a=is(e),{body:l,headers:f}=r;for(let h of a){const m=Dr(h),g=f[m];if(g){const w=qs(h,s),{streamHasher:A,base64Encoder:I}=s,P=await lg(l,{streamHasher:A,checksumAlgorithmFn:w,base64Encoder:I});if(P===g)break;throw new Error(`Checksum mismatch: expected "${P}" but received "${g}"`+` in response header "${m}".`)}}};var hg={name:"flexibleChecksumsResponseMiddleware",toMiddleware:"deserializerMiddleware",relation:"after",tags:["BODY_CHECKSUM"],override:!0},mg=(r,s)=>(e,a)=>async(l)=>{if(!K.isInstance(l.request))return e(l);const f=l.input,h=await e(l),m=h.response;let g=void 0;const{requestValidationModeMember:w,responseAlgorithms:A}=s;if(w&&f[w]==="ENABLED"){const{clientName:I,commandName:P}=a;if(I==="S3Client"&&P==="GetObjectCommand"&&is(A).every((Q)=>{const jr=Dr(Q),q=m.headers[jr];return!q||ag(q)}))return h;const D=Tr(m.body);if(D)g=await r.streamCollector(m.body),m.body=Ha(g);if(await fg(h.response,{config:r,responseAlgorithms:A}),D&&g)m.body=Ha(g)}return h};var bs=(r,s)=>({applyToStack:(e)=>{e.add(eg(r,s),sg),e.addRelativeTo(mg(r,s),hg)}});class za extends Ir.classBuilder().ep({...cr,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(r,s,e,a){return[Pr(e,this.serialize,this.deserialize),kr(e,r.getEndpointParameterInstructions()),bs(e,{input:this.input,requestChecksumRequired:!1,requestValidationModeMember:"ChecksumMode",responseAlgorithms:["CRC32","CRC32C","SHA256","SHA1"]}),Os(e),Ja(e)]}).s("AmazonS3","GetObject",{}).n("S3Client","GetObjectCommand").f(_f,Yf).ser(hh).de(wh).build(){}class Ga extends Ir.classBuilder().ep({...cr,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(r,s,e,a){return[Pr(e,this.serialize,this.deserialize),kr(e,r.getEndpointParameterInstructions()),bs(e,{input:this.input,requestAlgorithmMember:"ChecksumAlgorithm",requestChecksumRequired:!1}),Za(e),hs(e),Os(e)]}).s("AmazonS3","PutObject",{}).n("S3Client","PutObjectCommand").f(jf,qf).ser(mh).de(dh).build(){}import{Buffer as gg} from"buffer";class wg extends lr{client;constructor(...r){super();this.client=new Ma(...r)}async put(r){let s,e,a,l=process.env.BUCKET_NAME;if(r instanceof Blob)s=r,a=`${ir()}.${r.type.split("/")[1].split(";")[0]}`,e=r.type;else s=r.body,a=r.name,e=r.contentType;e=s instanceof Blob||s instanceof File?s.type:void 0;const f=s instanceof gg?s:gg.from(await s.arrayBuffer());return await this.client.send(new Ga({Bucket:l,Key:a,Body:f,ContentType:e})),a}async fetch(r){let s=process.env.BUCKET_NAME,e;if(typeof r==="string")e=r;else s=r.bucket??s,e=r.name;if(!e)throw new Error("Object name has to be specified");const a=await this.client.send(new za({Bucket:s,Key:e}));return new Response(a.Body.transformToWebStream(),{headers:{"Content-Type":a.ContentType,"Content-Length":a.ContentLength.toString(),"Cache-Control":"private, max-age=12000, must-revalidate","Last-Modified":a.LastModified?.toUTCString()||"",ETag:a.ETag||""}})}}class xs{}class os extends xs{constructor(){super(...arguments)}requests=new Map;consume(r,s){if(!this.requests.has(r))this.requests.set(r,{date:Date.now(),count:1});else{const e=this.requests.get(r),a=Date.now();if(a-e.date>=60000)this.requests.set(r,{date:a,count:1});else this.requests.set(r,{date:e.date,count:e.count+1})}return this.requests.get(r).count}}class dg{driver=new os}class Or{}import*as wS from"react-dom/server";var Eg=L(lS(),1);var{defineProperty:fS,getOwnPropertySymbols:Sg}=Object,hS=Object.prototype.hasOwnProperty,mS=Object.prototype.propertyIsEnumerable,cg=(r,s,e)=>(s in r)?fS(r,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[s]=e,Fa=(r,s)=>{for(var e in s||(s={}))if(hS.call(s,e))cg(r,e,s[e]);if(Sg){for(var e of Sg(s))if(mS.call(s,e))cg(r,e,s[e])}return r},gS=((r)=>typeof import.meta.require!=="undefined"?import.meta.require:typeof Proxy!=="undefined"?new Proxy(r,{get:(s,e)=>(typeof import.meta.require!=="undefined"?import.meta.require:s)[e]}):r)(function(r){if(typeof import.meta.require!=="undefined")return import.meta.require.apply(this,arguments);throw Error('Dynamic require of "'+r+'" is not supported')}),Ka=(r,s,e)=>{return new Promise((a,l)=>{var f=(g)=>{try{m(e.next(g))}catch(w){l(w)}},h=(g)=>{try{m(e.throw(g))}catch(w){l(w)}},m=(g)=>g.done?a(g.value):Promise.resolve(g.value).then(f,h);m((e=e.apply(r,s)).next())})},dS={unformatted:["code","pre","em","strong","span"],indent_inner_html:!0,indent_char:" ",indent_size:2,sep:"\n"},SS=(r,s={})=>{return Eg.default.html(r,Fa(Fa({},dS),s))},cS=[{selector:"img",format:"skip"},{selector:"#__react-email-preview",format:"skip"},{selector:"a",options:{linkBrackets:!1}}];var Ag=new TextDecoder("utf-8"),Rg=(r)=>Ka(void 0,null,function*(){let s="";if("pipeTo"in r){const e=new WritableStream({write(a){s+=Ag.decode(a)}});yield r.pipeTo(e)}else{const{Writable:e}=gS("stream"),a=new e({write(l,f,h){s+=Ag.decode(l),h()}});return r.pipe(a),new Promise((l,f)=>{a.on("error",f),a.on("close",()=>{l(s)})})}return s}),ns=(r,s)=>Ka(void 0,null,function*(){const e=yield import("react-dom/server");let a;if(Object.hasOwn(e,"renderToReadableStream"))a=yield Rg(yield e.renderToReadableStream(r));else yield new Promise((h,m)=>{const g=e.renderToPipeableStream(r,{onAllReady(){return Ka(this,null,function*(){a=yield Rg(g),h()})},onError(w){m(w)}})});if(s==null?void 0:s.plainText)return La(a,Fa({selectors:cS},s.htmlToTextOptions));const f=`${'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'}${a.replace(/<!DOCTYPE.*?>/,"")}`;if(s==null?void 0:s.pretty)return SS(f);return f});var{defineProperty:AS,defineProperties:RS,getOwnPropertyDescriptors:ES,getOwnPropertySymbols:Ig}=Object,IS=Object.prototype.hasOwnProperty,PS=Object.prototype.propertyIsEnumerable,Pg=(r,s,e)=>(s in r)?AS(r,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[s]=e,qr=(r,s)=>{for(var e in s||(s={}))if(IS.call(s,e))Pg(r,e,s[e]);if(Ig){for(var e of Ig(s))if(PS.call(s,e))Pg(r,e,s[e])}return r},kS=(r,s)=>RS(r,ES(s)),k=(r,s,e)=>{return new Promise((a,l)=>{var f=(g)=>{try{m(e.next(g))}catch(w){l(w)}},h=(g)=>{try{m(e.throw(g))}catch(w){l(w)}},m=(g)=>g.done?a(g.value):Promise.resolve(g.value).then(f,h);m((e=e.apply(r,s)).next())})},yS="3.4.0",NS=class{constructor(r){this.resend=r}create(r){return k(this,arguments,function*(s,e={}){return yield this.resend.post("/api-keys",s,e)})}list(){return k(this,null,function*(){return yield this.resend.get("/api-keys")})}remove(r){return k(this,null,function*(){return yield this.resend.delete(`/api-keys/${r}`)})}},DS=class{constructor(r){this.resend=r}create(r){return k(this,arguments,function*(s,e={}){return yield this.resend.post("/audiences",s,e)})}list(){return k(this,null,function*(){return yield this.resend.get("/audiences")})}get(r){return k(this,null,function*(){return yield this.resend.get(`/audiences/${r}`)})}remove(r){return k(this,null,function*(){return yield this.resend.delete(`/audiences/${r}`)})}},TS=class{constructor(r){this.resend=r}send(r){return k(this,arguments,function*(s,e={}){return this.create(s,e)})}create(r){return k(this,arguments,function*(s,e={}){for(let l of s)if(l.react)l.html=yield ns(l.react),delete l.react;return yield this.resend.post("/emails/batch",s,e)})}},$S=class{constructor(r){this.resend=r}create(r){return k(this,arguments,function*(s,e={}){return yield this.resend.post(`/audiences/${s.audienceId}/contacts`,{unsubscribed:s.unsubscribed,email:s.email,first_name:s.firstName,last_name:s.lastName},e)})}list(r){return k(this,null,function*(){return yield this.resend.get(`/audiences/${r.audienceId}/contacts`)})}get(r){return k(this,null,function*(){return yield this.resend.get(`/audiences/${r.audienceId}/contacts/${r.id}`)})}update(r){return k(this,null,function*(){return yield this.resend.patch(`/audiences/${r.audienceId}/contacts/${r.id}`,{unsubscribed:r.unsubscribed,first_name:r.firstName,last_name:r.lastName})})}remove(r){return k(this,null,function*(){return yield this.resend.delete(`/audiences/${r.audienceId}/contacts/${(r==null?void 0:r.email)?r==null?void 0:r.email:r==null?void 0:r.id}`)})}},US=class{constructor(r){this.resend=r}create(r){return k(this,arguments,function*(s,e={}){return yield this.resend.post("/domains",s,e)})}list(){return k(this,null,function*(){return yield this.resend.get("/domains")})}get(r){return k(this,null,function*(){return yield this.resend.get(`/domains/${r}`)})}update(r){return k(this,null,function*(){return yield this.resend.patch(`/domains/${r.id}`,{click_tracking:r.clickTracking,open_tracking:r.openTracking,tls:r.tls})})}remove(r){return k(this,null,function*(){return yield this.resend.delete(`/domains/${r}`)})}verify(r){return k(this,null,function*(){return yield this.resend.post(`/domains/${r}/verify`)})}},MS=class{constructor(r){this.resend=r}send(r){return k(this,arguments,function*(s,e={}){return this.create(s,e)})}create(r){return k(this,arguments,function*(s,e={}){if(s.react)s.html=yield ns(s.react),delete s.react;return yield this.resend.post("/emails",s,e)})}get(r){return k(this,null,function*(){return yield this.resend.get(`/emails/${r}`)})}},kg="https://api.resend.com",yg=`resend-node:${yS}`,vS=typeof process!=="undefined"&&process.env?process.env.RESEND_BASE_URL||kg:kg,CS=typeof process!=="undefined"&&process.env?process.env.RESEND_USER_AGENT||yg:yg,Ng=class{constructor(r){if(this.key=r,this.apiKeys=new NS(this),this.audiences=new DS(this),this.batch=new TS(this),this.contacts=new $S(this),this.domains=new US(this),this.emails=new MS(this),!r){if(typeof process!=="undefined"&&process.env)this.key=process.env.RESEND_API_KEY;if(!this.key)throw new Error('Missing API key. Pass it to the constructor `new Resend("re_123")`')}this.headers=new Headers({Authorization:`Bearer ${this.key}`,"User-Agent":CS,"Content-Type":"application/json"})}fetchRequest(r){return k(this,arguments,function*(s,e={}){try{const a=yield fetch(`${vS}${s}`,e);if(!a.ok)try{const f=yield a.text();return{data:null,error:JSON.parse(f)}}catch(f){if(f instanceof SyntaxError)return{data:null,error:{name:"application_error",message:"Internal server error. We are unable to process your request right now, please try again later."}};const h={message:a.statusText,name:"application_error"};if(f instanceof Error)return{data:null,error:kS(qr({},h),{message:f.message})};return{data:null,error:h}}return{data:yield a.json(),error:null}}catch(a){return{data:null,error:{name:"application_error",message:"Unable to fetch data. The request could not be resolved."}}}})}post(r,s){return k(this,arguments,function*(e,a,l={}){const f=qr({method:"POST",headers:this.headers,body:JSON.stringify(a)},l);return this.fetchRequest(e,f)})}get(r){return k(this,arguments,function*(s,e={}){const a=qr({method:"GET",headers:this.headers},e);return this.fetchRequest(s,a)})}put(r,s){return k(this,arguments,function*(e,a,l={}){const f=qr({method:"PUT",headers:this.headers,body:JSON.stringify(a)},l);return this.fetchRequest(e,f)})}patch(r,s){return k(this,arguments,function*(e,a,l={}){const f=qr({method:"PATCH",headers:this.headers,body:JSON.stringify(a)},l);return this.fetchRequest(e,f)})}delete(r,s){return k(this,null,function*(){const e={method:"DELETE",headers:this.headers,body:JSON.stringify(s)};return this.fetchRequest(r,e)})}};class ps{}class us extends ps{r;constructor(r=process.env.RESEND_API_KEY){super();this.apiKey=r}async send(r){const s=new Ng(this.apiKey),{data:e,error:a}=await s.emails.send({...r});if(a)throw a;if(e)return!0}}class Dg extends Or{constructor(){super(...arguments)}debug=!0;defaultFrom="";driver=new us;boot(){}}class Tg extends Or{constructor(){super(...arguments)}channels={};boot(){}}export{wg as S3Driver,us as ResendDriver,dg as RateLimiterServiceProvider,xs as RateLimiterDriver,os as InMemoryRateLimiter,br as FileSystemDriver,Wa as FileStorageServiceProvider,lr as FileStorageDriver,Dg as EmailServiceProvider,ps as EmailDriver,Tg as BroadcastingServiceProvider};export{Wa as p,Or as q,dg as r,Dg as s,Tg as t};