gemi 0.4.82 → 0.4.83
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.
- package/dist/chunk-23b2ef0e21169179.js +2 -0
- package/dist/chunk-2b44381dc9ebfb4e.js +1 -0
- package/dist/chunk-38a8eb514cb2baeb.js +2 -0
- package/dist/chunk-3a70511d8a8b19ca.js +6 -0
- package/dist/chunk-4c457f127eae7f58.js +2 -0
- package/dist/chunk-51a2c84a6839c299.js +18 -0
- package/dist/chunk-5213568d9f79a50e.js +9 -0
- package/dist/chunk-71588549fa026275.js +2 -0
- package/dist/chunk-780fac65d888ab11.js +3 -0
- package/dist/chunk-7ce3aea943bba87b.js +2 -0
- package/dist/chunk-8479523d216bb31d.js +2 -0
- package/dist/chunk-a061c92ad62b639d.js +2 -0
- package/dist/chunk-b7d8fc4acf4c1370.js +2 -0
- package/dist/chunk-d25dc0bc52ff2bb2.js +2 -0
- package/dist/chunk-e04ad34b29adebc3.js +2 -0
- package/dist/chunk-f2754ca1bd957aaa.js +2 -0
- package/dist/chunk-ff4fdfe4cc72a7f7.js +2 -0
- package/dist/client/index.js +0 -1
- package/dist/client/useQuery.d.ts.map +1 -1
- package/dist/kernel/index.js +1 -1
- package/dist/services/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-111f0589f69a05b1.js +0 -1
- package/dist/chunk-40944e185c025271.js +0 -2
- package/dist/chunk-5b8fb522ae72415c.js +0 -2
- package/dist/chunk-8f3b5c5ff77a538d.js +0 -5
- package/dist/chunk-90bbf6a9e83613c5.js +0 -2
- package/dist/chunk-91b6ef5e24ab5b68.js +0 -1
- package/dist/chunk-97dc0038c2c61747.js +0 -2
- package/dist/chunk-aead527dfd7392c4.js +0 -16
- package/dist/chunk-b42d49e516e08f8f.js +0 -6
- package/dist/chunk-b88d77955168b486.js +0 -9
- package/dist/chunk-b8d464c89c783b71.js +0 -2
- package/dist/chunk-cfc36fa4387e9969.js +0 -2
- package/dist/chunk-e5d43a7ba83f74df.js +0 -2
- package/dist/chunk-e78e6f198869b6d2.js +0 -2
- package/dist/chunk-ecc1d0c7ff25f19f.js +0 -1
- package/dist/chunk-f44ef133dae89ec6.js +0 -2
- package/dist/chunk-f6546172b47b47d2.js +0 -1
package/dist/services/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import"../chunk-90bbf6a9e83613c5.js";import{B as G} from"../chunk-24a86f8f5ddc0cbd.js";import{G as Rl,H as dd} from"../chunk-0ba2cc302113ab40.js";import{M as Yw} from"../chunk-ff8cd8fd047cfee5.js";import{$ as Jf,Aa as Wh,Ba as Yh,Ca as Oh,N as Hr,O as qh,P as jh,Q as ih,R as bh,S as _m,T as p,U as u,V as _s,W as yr,X as Hf,Y as oh,Z as Zf,_ as Xf,aa as nh,ba as Th,ca as ch,da as yh,ea as Mh,fa as ph,ga as uh,ha as Qf,ia as kr,ja as Pr,ka as th,la as Uh,ma as vh,na as rm,oa as Ch,pa as sm,qa as rs,ra as Gh,sa as gm,ta as Ah,ua as ys,va as kh,wa as Cs,xa as Kh,ya as Ph,za as Ih} from"../chunk-aead527dfd7392c4.js";import{$a as wa,Da as Jh,Ea as Hh,Fa as Z,Ga as Yr,Ha as Br,Ja as xh,Pa as eh,Qa as Wl,Ra as ma,Sa as Ar,Ta as Y,Va as Rs,Ya as dr,Za as ga,_a as Sr,ab as Ss,bb as vr,db as Ve,eb as Tr,fb as bf,gb as O,hb as da,ib as $h,jb as Dh,kb as Qh,lb as Bh,nb as v,pb as Sa,rb as zh,sb as Fh} from"../chunk-8f3b5c5ff77a538d.js";import{tb as ld,ub as i} from"../chunk-ecc1d0c7ff25f19f.js";import"../chunk-f6546172b47b47d2.js";import{zb as Vh} from"../chunk-b88d77955168b486.js";import"../chunk-111f0589f69a05b1.js";import"../chunk-91b6ef5e24ab5b68.js";class er{}class Qr extends er{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=`${Hr()}.${r.type.split("/")[1].split(";")[0]}`;else s=r.body,e=r.name;const l=s instanceof Buffer?s:Buffer.from(await s.arrayBuffer()),f=`${this.folderPath}/${e}`;return await Bun.write(f,l),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 l=`${this.folderPath}/${e}`,f=Bun.file(l),a=Bun.file(l).stream(),h=new Date(f.lastModified).toUTCString();return new Response(a,{headers:{"Content-Type":f.type,"Content-Length":String(f.size),"Cache-Control":"private, max-age=12000, must-revalidate","Last-Modified":h}})}}class Al{driver=new Qr}function Wm(r){return(s)=>async(e)=>{const{request:l}=e;if(Z.isInstance(l)&&l.body&&r.runtime==="node"){if(r.requestHandler?.constructor?.name!=="FetchHttpHandler")l.headers={...l.headers,Expect:"100-continue"}}return s({...e,request:l})}}var Vm={step:"build",tags:["SET_EXPECT_HEADER","EXPECT_HEADER"],name:"addExpectContinueMiddleware",override:!0},kl=(r)=>({applyToStack:(s)=>{s.add(Wm(r),Vm)}});function Zm(){return(r,s)=>async(e)=>{const{request:l}=e;if(Z.isInstance(l)){if(!(Lm in l.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 Lm="content-length",Xm={step:"finalizeRequest",tags:["CHECK_CONTENT_LENGTH_HEADER"],name:"getCheckContentLengthHeaderPlugin",override:!0},Pl=(r)=>({applyToStack:(s)=>{s.add(Zm(),Xm)}});var Il=(r)=>{return(s,e)=>async(l)=>{const f=await r.region(),a=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:a});try{const m=await s(l);if(e.__s3RegionRedirect){h();const g=await r.region();if(f!==g)throw new Error("Region was not restored following S3 region redirect.")}return m}catch(m){throw h(),m}}},El={tags:["REGION_REDIRECT","S3"],name:"regionRedirectEndpointMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"};function Jm(r){return(s,e)=>async(l)=>{try{return await s(l)}catch(f){if(r.followRegionRedirects&&f?.$metadata?.httpStatusCode===301){try{const a=f.$response.headers["x-amz-bucket-region"];e.logger?.debug(`Redirecting from ${await r.region()} to ${a}`),e.__s3RegionRedirect=a}catch(a){throw new Error("Region redirect failed: "+a)}return s(l)}else throw f}}}var Hm={step:"initialize",tags:["REGION_REDIRECT","S3"],name:"regionRedirectMiddleware",override:!0},Nl=(r)=>({applyToStack:(s)=>{s.add(Jm(r),Hm),s.addRelativeTo(Il(r),El)}});var Qm=(r)=>{return(s,e)=>async(l)=>{const f=await s(l),{response:a}=f;if(Yr.isInstance(a)){if(a.headers.expires){a.headers.expiresstring=a.headers.expires;try{Tr(a.headers.expires)}catch(h){e.logger?.warn(`AWS SDK Warning for ${e.clientName}::${e.commandName} response parsing (${a.headers.expires}): ${h}`),delete a.headers.expires}}}return f}},Bm={tags:["S3"],name:"s3ExpiresMiddleware",override:!0,relation:"after",toMiddleware:"deserializerMiddleware"},$l=(r)=>({applyToStack:(s)=>{s.addRelativeTo(Qm(r),Bm)}});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 l=await e.identity;if(l.expiration){if(l.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 ar{constructor(r,s=new lr){this.createSessionFn=r,this.cache=s}async getS3ExpressIdentity(r,s){const e=s.Bucket,{cache:l}=this,f=l.get(e);if(f)return f.identity.then((a)=>{if((a.expiration?.getTime()??0)<Date.now())return l.set(e,new fr(this.getIdentity(e))).identity;if((a.expiration?.getTime()??0)<Date.now()+ar.REFRESH_WINDOW_MS&&!f.isRefreshing)f.isRefreshing=!0,this.getIdentity(e).then((g)=>{l.set(e,new fr(Promise.resolve(g)))});return a});return l.set(e,new fr(this.getIdentity(e))).identity}async getIdentity(r){await this.cache.purgeExpired().catch((l)=>{console.warn("Error while clearing expired entries in S3ExpressIdentityCache: \n"+l)});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}}}ar.REFRESH_WINDOW_MS=60000;var Ul=G(_m(),1);var Dl="Directory",Tl="S3Express",cl="sigv4-s3express",Or="X-Amz-S3session-Token",cr=Or.toLowerCase(),Ym="AWS_S3_DISABLE_EXPRESS_SESSION_AUTH",Om="s3_disable_express_session_auth",Ys={environmentVariableSelector:(r)=>p(r,Ym,u.ENV),configFileSelector:(r)=>p(r,Om,u.CONFIG),default:!1};var yl=function(r){return{accessKeyId:r.accessKeyId,secretAccessKey:r.secretAccessKey,expiration:r.expiration}},Ml=function(r,s){const e=setTimeout(()=>{throw new Error("SignatureV4S3Express credential override was created but not called.")},10),l=r.credentialProvider,f=()=>{return clearTimeout(e),r.credentialProvider=l,Promise.resolve(s)};r.credentialProvider=f};class _r extends Ul.SignatureV4{async signWithCredentials(r,s,e){const l=yl(s);r.headers[cr]=s.sessionToken;const f=this;return Ml(f,l),f.signRequest(r,e??{})}async presignWithCredentials(r,s,e){const l=yl(s);return delete r.headers[cr],r.headers[Or]=s.sessionToken,r.query=r.query??{},r.query[Or]=s.sessionToken,Ml(this,l),this.presign(r,e)}}var vl=(r)=>{return(s,e)=>async(l)=>{if(e.endpointV2){const f=e.endpointV2,a=f.properties?.authSchemes?.[0]?.name===cl;if(f.properties?.backend===Tl||f.properties?.bucketType===Dl)e.isS3ExpressBucket=!0;if(a){const m=l.input.Bucket;if(m){const g=await r.s3ExpressIdentityProvider.getS3ExpressIdentity(await r.credentials(),{Bucket:m});if(e.s3ExpressIdentity=g,Z.isInstance(l.request)&&g.sessionToken)l.request.headers[cr]=g.sessionToken}}}return s(l)}},Cl={name:"s3ExpressMiddleware",step:"build",tags:["S3","S3_EXPRESS"],override:!0},Os=(r)=>({applyToStack:(s)=>{s.add(vl(r),Cl)}});var Fl=G(_s(),1);var zl=async(r,s,e,l)=>{const f=await l.signWithCredentials(e,r,{});if(f.headers["X-Amz-Security-Token"]||f.headers["x-amz-security-token"])throw new Error("X-Amz-Security-Token must not be set for s3-express requests.");return f};var qm=(r)=>(s)=>{throw s},jm=(r,s)=>{};var Gl=(r)=>(s,e)=>async(l)=>{if(!Z.isInstance(l.request))return s(l);const a=yr(e).selectedHttpAuthScheme;if(!a)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:h={}},identity:m,signer:g}=a;let k;if(e.s3ExpressIdentity)k=await zl(e.s3ExpressIdentity,h,l.request,await r.signer());else k=await g.sign(l.request,m,h);const N=await s({...l,request:k}).catch((g.errorHandler||qm)(h));return(g.successHandler||jm)(N.response,h),N},qs=(r)=>({applyToStack:(s)=>{s.addRelativeTo(Gl(r),Fl.httpSigningMiddlewareOptions)}});var Kl=(r,{session:s})=>{const[e,l]=s;return{...r,forcePathStyle:r.forcePathStyle??!1,useAccelerateEndpoint:r.useAccelerateEndpoint??!1,disableMultiregionAccessPoints:r.disableMultiregionAccessPoints??!1,followRegionRedirects:r.followRegionRedirects??!1,s3ExpressIdentityProvider:r.s3ExpressIdentityProvider??new ar(async(f)=>e().send(new l({Bucket:f,SessionMode:"ReadWrite"}))),bucketEndpoint:r.bucketEndpoint??!1}};var qr=G(Wl(),1),im={CopyObjectCommand:!0,UploadPartCopyCommand:!0,CompleteMultipartUploadCommand:!0},bm=3000,xm=(r)=>(s,e)=>async(l)=>{const f=await s(l),{response:a}=f;if(!Yr.isInstance(a))return f;const{statusCode:h,body:m}=a;if(h<200||h>=300)return f;let g=m,k=m;if(m&&typeof m==="object"&&!(m instanceof Uint8Array))[g,k]=await qr.splitStream(m);a.body=k;const N=await om(g,{streamCollector:async($)=>{return qr.headStream($,bm)}});if(typeof g?.destroy==="function")g.destroy();const D=r.utf8Encoder(N.subarray(N.length-16));if(N.length===0&&im[e.commandName]){const $=new Error("S3 aborted request");throw $.name="InternalError",$}if(D&&D.endsWith("</Error>"))a.statusCode=400;return f},om=(r=new Uint8Array,s)=>{if(r instanceof Uint8Array)return Promise.resolve(r);return s.streamCollector(r)||Promise.resolve(new Uint8Array)},nm={relation:"after",toMiddleware:"deserializerMiddleware",tags:["THROW_200_EXCEPTIONS","S3"],name:"throw200ExceptionsMiddleware",override:!0},jr=(r)=>({applyToStack:(s)=>{s.addRelativeTo(xm(r),nm)}});var js=(r)=>typeof r==="string"&&r.indexOf("arn:")===0&&r.split(":").length>=6;function Vl(r){return(s,e)=>async(l)=>{if(r.bucketEndpoint){const f=e.endpointV2;if(f){const a=l.input.Bucket;if(typeof a==="string")try{const h=new URL(a);f.url=h}catch(h){const m=`@aws-sdk/middleware-sdk-s3: bucketEndpoint=true was set but Bucket=${a} could not be parsed as URL.`;if(e.logger?.constructor?.name==="NoOpLogger")console.warn(m);else e.logger?.warn?.(m);throw h}}}return s(l)}}var Ll={name:"bucketEndpointMiddleware",override:!0,relation:"after",toMiddleware:"endpointV2Middleware"};function pm({bucketEndpoint:r}){return(s)=>async(e)=>{const{input:{Bucket:l}}=e;if(!r&&typeof l==="string"&&!js(l)&&l.indexOf("/")>=0){const f=new Error(`Bucket name shouldn't contain '/', received '${l}'`);throw f.name="InvalidBucketName",f}return s({...e})}}var um={step:"initialize",tags:["VALIDATE_BUCKET_NAME"],name:"validateBucketNameMiddleware",override:!0},Zl=(r)=>({applyToStack:(s)=>{s.add(pm(r),um),s.addRelativeTo(Vl(r),Ll)}});var Er=G(_s(),1);var Xl=(r)=>({...r,eventStreamMarshaller:r.eventStreamSerdeProvider(r)});var ss=G(rs(),1);var ir={CrtSignerV4:null};class is{constructor(r){this.sigv4Signer=new _r(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=ir.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 hr={["required"]:!1,["type"]:"String"},mr={["required"]:!0,default:!1,["type"]:"Boolean"},Mr={["required"]:!1,["type"]:"Boolean"},B={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"Accelerate"},!0]},E={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},I={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},y={["fn"]:"isSet",["argv"]:[{["ref"]:"Endpoint"}]},Cf={["fn"]:"aws.partition",["argv"]:[{["ref"]:"Region"}],["assign"]:"partitionResult"},Jl={["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[{["ref"]:"partitionResult"},"name"]},"aws-cn"]},pr={["fn"]:"isSet",["argv"]:[{["ref"]:"Bucket"}]},W={["ref"]:"Bucket"},K={["fn"]:"parseURL",["argv"]:[{["ref"]:"Endpoint"}],["assign"]:"url"},nr={["fn"]:"booleanEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[{["ref"]:"url"},"isIp"]},!0]},zf={["ref"]:"url"},Ff={["fn"]:"uriEncode",["argv"]:[W],["assign"]:"uri_encoded_bucket"},q={["backend"]:"S3Express",["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3express",["signingRegion"]:"{Region}"}]},w={},Gf={["fn"]:"aws.isVirtualHostableS3Bucket",["argv"]:[W,!1]},bs={["error"]:"S3Express bucket name is not a valid virtual hostable name.",["type"]:"error"},ur={["backend"]:"S3Express",["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4-s3express",["signingName"]:"s3express",["signingRegion"]:"{Region}"}]},Hl={["fn"]:"isSet",["argv"]:[{["ref"]:"UseS3ExpressControlEndpoint"}]},Ql={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseS3ExpressControlEndpoint"},!0]},d={["fn"]:"not",["argv"]:[y]},Bl={["error"]:"Unrecognized S3Express bucket name format.",["type"]:"error"},Yl={["fn"]:"not",["argv"]:[pr]},Ol={["ref"]:"hardwareType"},_l={["conditions"]:[d],["error"]:"Expected a endpoint to be specified but no endpoint was found",["type"]:"error"},br={["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4a",["signingName"]:"s3-outposts",["signingRegionSet"]:["*"]},{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3-outposts",["signingRegion"]:"{Region}"}]},xs={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"ForcePathStyle"},!1]},tm={["ref"]:"ForcePathStyle"},c={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"Accelerate"},!1]},U={["fn"]:"stringEquals",["argv"]:[{["ref"]:"Region"},"aws-global"]},C={["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3",["signingRegion"]:"us-east-1"}]},A={["fn"]:"not",["argv"]:[U]},z={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseGlobalEndpoint"},!0]},ql={["url"]:"https://{Bucket}.s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",["properties"]:{["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3",["signingRegion"]:"{Region}"}]},["headers"]:{}},M={["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3",["signingRegion"]:"{Region}"}]},F={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseGlobalEndpoint"},!1]},R={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!1]},jl={["url"]:"https://{Bucket}.s3-fips.{Region}.{partitionResult#dnsSuffix}",["properties"]:M,["headers"]:{}},S={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!1]},il={["url"]:"https://{Bucket}.s3-accelerate.dualstack.{partitionResult#dnsSuffix}",["properties"]:M,["headers"]:{}},bl={["url"]:"https://{Bucket}.s3.dualstack.{Region}.{partitionResult#dnsSuffix}",["properties"]:M,["headers"]:{}},os={["fn"]:"booleanEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[zf,"isIp"]},!1]},ns={["url"]:"{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}",["properties"]:M,["headers"]:{}},Ie={["url"]:"{url#scheme}://{Bucket}.{url#authority}{url#path}",["properties"]:M,["headers"]:{}},xl={["endpoint"]:Ie,["type"]:"endpoint"},ps={["url"]:"https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}",["properties"]:M,["headers"]:{}},ol={["url"]:"https://{Bucket}.s3.{Region}.{partitionResult#dnsSuffix}",["properties"]:M,["headers"]:{}},xr={["error"]:"Invalid region: region was not a valid DNS name.",["type"]:"error"},L={["ref"]:"bucketArn"},Kf={["ref"]:"arnType"},us={["fn"]:"getAttr",["argv"]:[L,"service"]},Ee={["ref"]:"accessPointName"},nl={["conditions"]:[I],["error"]:"S3 Object Lambda does not support Dual-stack",["type"]:"error"},pl={["conditions"]:[B],["error"]:"S3 Object Lambda does not support S3 Accelerate",["type"]:"error"},ul={["conditions"]:[{["fn"]:"isSet",["argv"]:[{["ref"]:"DisableAccessPoints"}]},{["fn"]:"booleanEquals",["argv"]:[{["ref"]:"DisableAccessPoints"},!0]}],["error"]:"Access points are not supported for this operation",["type"]:"error"},ts={["conditions"]:[{["fn"]:"isSet",["argv"]:[{["ref"]:"UseArnRegion"}]},{["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseArnRegion"},!1]},{["fn"]:"not",["argv"]:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[L,"region"]},"{Region}"]}]}],["error"]:"Invalid configuration: region from ARN `{bucketArn#region}` does not match client region `{Region}` and UseArnRegion is `false`",["type"]:"error"},Wf={["fn"]:"getAttr",["argv"]:[{["ref"]:"bucketPartition"},"name"]},Vf={["fn"]:"getAttr",["argv"]:[L,"accountId"]},re={["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3-object-lambda",["signingRegion"]:"{bucketArn#region}"}]},tl={["error"]:"Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `{accessPointName}`",["type"]:"error"},se={["error"]:"Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `{bucketArn#accountId}`",["type"]:"error"},ee={["error"]:"Invalid region in ARN: `{bucketArn#region}` (invalid DNS name)",["type"]:"error"},le={["error"]:"Client was configured for partition `{partitionResult#name}` but ARN (`{Bucket}`) has `{bucketPartition#name}`",["type"]:"error"},rf={["error"]:"Invalid ARN: The ARN may only contain a single resource component after `accesspoint`.",["type"]:"error"},sf={["error"]:"Invalid ARN: Expected a resource of the format `accesspoint:<accesspoint name>` but no name was provided",["type"]:"error"},Ur={["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3",["signingRegion"]:"{bucketArn#region}"}]},ef={["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4a",["signingName"]:"s3-outposts",["signingRegionSet"]:["*"]},{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3-outposts",["signingRegion"]:"{bucketArn#region}"}]},lf={["fn"]:"aws.parseArn",["argv"]:[W]},ff={["url"]:"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:M,["headers"]:{}},af={["url"]:"https://s3-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:M,["headers"]:{}},hf={["url"]:"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:M,["headers"]:{}},fe={["url"]:"{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}",["properties"]:M,["headers"]:{}},mf={["url"]:"https://s3.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:M,["headers"]:{}},gf={["ref"]:"UseObjectLambdaEndpoint"},ae={["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3-object-lambda",["signingRegion"]:"{Region}"}]},wf={["url"]:"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",["properties"]:M,["headers"]:{}},df={["url"]:"https://s3-fips.{Region}.{partitionResult#dnsSuffix}",["properties"]:M,["headers"]:{}},Sf={["url"]:"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}",["properties"]:M,["headers"]:{}},he={["url"]:"{url#scheme}://{url#authority}{url#path}",["properties"]:M,["headers"]:{}},Rf={["url"]:"https://s3.{Region}.{partitionResult#dnsSuffix}",["properties"]:M,["headers"]:{}},me=[{["ref"]:"Region"}],rg=[{["ref"]:"Endpoint"}],sg=[W],ge=[I],or=[B],t=[y,K],Af=[{["fn"]:"isSet",["argv"]:[{["ref"]:"DisableS3ExpressSessionAuth"}]},{["fn"]:"booleanEquals",["argv"]:[{["ref"]:"DisableS3ExpressSessionAuth"},!0]}],kf=[nr],we=[Ff],de=[Gf],gr=[E],Pf=[{["fn"]:"substring",["argv"]:[W,6,14,!0],["assign"]:"s3expressAvailabilityZoneId"},{["fn"]:"substring",["argv"]:[W,14,16,!0],["assign"]:"s3expressAvailabilityZoneDelim"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"s3expressAvailabilityZoneDelim"},"--"]}],If=[{["conditions"]:[E],["endpoint"]:{["url"]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.amazonaws.com",["properties"]:q,["headers"]:{}},["type"]:"endpoint"},{["endpoint"]:{["url"]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.amazonaws.com",["properties"]:q,["headers"]:{}},["type"]:"endpoint"}],Ef=[{["fn"]:"substring",["argv"]:[W,6,15,!0],["assign"]:"s3expressAvailabilityZoneId"},{["fn"]:"substring",["argv"]:[W,15,17,!0],["assign"]:"s3expressAvailabilityZoneDelim"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"s3expressAvailabilityZoneDelim"},"--"]}],Nf=[{["conditions"]:[E],["endpoint"]:{["url"]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.amazonaws.com",["properties"]:ur,["headers"]:{}},["type"]:"endpoint"},{["endpoint"]:{["url"]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.amazonaws.com",["properties"]:ur,["headers"]:{}},["type"]:"endpoint"}],eg=[pr],$f=[{["fn"]:"isValidHostLabel",["argv"]:[{["ref"]:"outpostId"},!1]}],Df=[{["fn"]:"stringEquals",["argv"]:[{["ref"]:"regionPrefix"},"beta"]}],lg=["*"],b=[Cf],Tf=[{["fn"]:"isValidHostLabel",["argv"]:[{["ref"]:"Region"},!1]}],x=[{["fn"]:"stringEquals",["argv"]:[{["ref"]:"Region"},"us-east-1"]}],Se=[{["fn"]:"stringEquals",["argv"]:[Kf,"accesspoint"]}],cf=[{["fn"]:"getAttr",["argv"]:[L,"resourceId[1]"],["assign"]:"accessPointName"},{["fn"]:"not",["argv"]:[{["fn"]:"stringEquals",["argv"]:[Ee,""]}]}],fg=[L,"resourceId[1]"],Re=[{["fn"]:"not",["argv"]:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[L,"region"]},""]}]}],yf=[{["fn"]:"not",["argv"]:[{["fn"]:"isSet",["argv"]:[{["fn"]:"getAttr",["argv"]:[L,"resourceId[2]"]}]}]}],ag=[L,"resourceId[2]"],Ae=[{["fn"]:"aws.partition",["argv"]:[{["fn"]:"getAttr",["argv"]:[L,"region"]}],["assign"]:"bucketPartition"}],Mf=[{["fn"]:"stringEquals",["argv"]:[Wf,{["fn"]:"getAttr",["argv"]:[{["ref"]:"partitionResult"},"name"]}]}],ke=[{["fn"]:"isValidHostLabel",["argv"]:[{["fn"]:"getAttr",["argv"]:[L,"region"]},!0]}],Pe=[{["fn"]:"isValidHostLabel",["argv"]:[Vf,!1]}],Uf=[{["fn"]:"isValidHostLabel",["argv"]:[Ee,!1]}],vf=[{["fn"]:"isValidHostLabel",["argv"]:[{["ref"]:"Region"},!0]}],hg={version:"1.0",parameters:{Bucket:hr,Region:hr,UseFIPS:mr,UseDualStack:mr,Endpoint:hr,ForcePathStyle:mr,Accelerate:mr,UseGlobalEndpoint:mr,UseObjectLambdaEndpoint:Mr,Key:hr,Prefix:hr,CopySource:hr,DisableAccessPoints:Mr,DisableMultiRegionAccessPoints:mr,UseArnRegion:Mr,UseS3ExpressControlEndpoint:Mr,DisableS3ExpressSessionAuth:Mr},rules:[{["conditions"]:[{["fn"]:"isSet",["argv"]:me}],rules:[{["conditions"]:[B,E],error:"Accelerate cannot be used with FIPS",["type"]:"error"},{["conditions"]:[I,y],error:"Cannot set dual-stack in combination with a custom endpoint.",["type"]:"error"},{["conditions"]:[y,E],error:"A custom endpoint cannot be combined with FIPS",["type"]:"error"},{["conditions"]:[y,B],error:"A custom endpoint cannot be combined with S3 Accelerate",["type"]:"error"},{["conditions"]:[E,Cf,Jl],error:"Partition does not support FIPS",["type"]:"error"},{["conditions"]:[pr,{["fn"]:"substring",["argv"]:[W,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"]:or,error:"S3Express does not support S3 Accelerate.",["type"]:"error"},{["conditions"]:t,rules:[{["conditions"]:Af,rules:[{["conditions"]:kf,rules:[{["conditions"]:we,rules:[{endpoint:{["url"]:"{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}",["properties"]:q,["headers"]:w},["type"]:"endpoint"}],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:de,rules:[{endpoint:{["url"]:"{url#scheme}://{Bucket}.{url#authority}{url#path}",["properties"]:q,["headers"]:w},["type"]:"endpoint"}],["type"]:"tree"},bs],["type"]:"tree"},{["conditions"]:kf,rules:[{["conditions"]:we,rules:[{endpoint:{["url"]:"{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}",["properties"]:ur,["headers"]:w},["type"]:"endpoint"}],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:de,rules:[{endpoint:{["url"]:"{url#scheme}://{Bucket}.{url#authority}{url#path}",["properties"]:ur,["headers"]:w},["type"]:"endpoint"}],["type"]:"tree"},bs],["type"]:"tree"},{["conditions"]:[Hl,Ql],rules:[{["conditions"]:[Ff,d],rules:[{["conditions"]:gr,endpoint:{["url"]:"https://s3express-control-fips.{Region}.amazonaws.com/{uri_encoded_bucket}",["properties"]:q,["headers"]:w},["type"]:"endpoint"},{endpoint:{["url"]:"https://s3express-control.{Region}.amazonaws.com/{uri_encoded_bucket}",["properties"]:q,["headers"]:w},["type"]:"endpoint"}],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:de,rules:[{["conditions"]:Af,rules:[{["conditions"]:Pf,rules:If,["type"]:"tree"},{["conditions"]:Ef,rules:If,["type"]:"tree"},Bl],["type"]:"tree"},{["conditions"]:Pf,rules:Nf,["type"]:"tree"},{["conditions"]:Ef,rules:Nf,["type"]:"tree"},Bl],["type"]:"tree"},bs],["type"]:"tree"},{["conditions"]:[Yl,Hl,Ql],rules:[{["conditions"]:t,endpoint:{["url"]:"{url#scheme}://{url#authority}{url#path}",["properties"]:q,["headers"]:w},["type"]:"endpoint"},{["conditions"]:gr,endpoint:{["url"]:"https://s3express-control-fips.{Region}.amazonaws.com",["properties"]:q,["headers"]:w},["type"]:"endpoint"},{endpoint:{["url"]:"https://s3express-control.{Region}.amazonaws.com",["properties"]:q,["headers"]:w},["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[pr,{["fn"]:"substring",["argv"]:[W,49,50,!0],["assign"]:"hardwareType"},{["fn"]:"substring",["argv"]:[W,8,12,!0],["assign"]:"regionPrefix"},{["fn"]:"substring",["argv"]:[W,0,7,!0],["assign"]:"bucketAliasSuffix"},{["fn"]:"substring",["argv"]:[W,32,49,!0],["assign"]:"outpostId"},{["fn"]:"aws.partition",["argv"]:me,["assign"]:"regionPartition"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"bucketAliasSuffix"},"--op-s3"]}],rules:[{["conditions"]:$f,rules:[{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[Ol,"e"]}],rules:[{["conditions"]:Df,rules:[_l,{["conditions"]:t,endpoint:{["url"]:"https://{Bucket}.ec2.{url#authority}",["properties"]:br,["headers"]:w},["type"]:"endpoint"}],["type"]:"tree"},{endpoint:{["url"]:"https://{Bucket}.ec2.s3-outposts.{Region}.{regionPartition#dnsSuffix}",["properties"]:br,["headers"]:w},["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[Ol,"o"]}],rules:[{["conditions"]:Df,rules:[_l,{["conditions"]:t,endpoint:{["url"]:"https://{Bucket}.op-{outpostId}.{url#authority}",["properties"]:br,["headers"]:w},["type"]:"endpoint"}],["type"]:"tree"},{endpoint:{["url"]:"https://{Bucket}.op-{outpostId}.s3-outposts.{Region}.{regionPartition#dnsSuffix}",["properties"]:br,["headers"]:w},["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"]:eg,rules:[{["conditions"]:[y,{["fn"]:"not",["argv"]:[{["fn"]:"isSet",["argv"]:[{["fn"]:"parseURL",["argv"]:rg}]}]}],error:"Custom endpoint `{Endpoint}` was not a valid URI",["type"]:"error"},{["conditions"]:[xs,Gf],rules:[{["conditions"]:b,rules:[{["conditions"]:Tf,rules:[{["conditions"]:[B,Jl],error:"S3 Accelerate cannot be used in this region",["type"]:"error"},{["conditions"]:[I,E,c,d,U],endpoint:{["url"]:"https://{Bucket}.s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}",["properties"]:C,["headers"]:w},["type"]:"endpoint"},{["conditions"]:[I,E,c,d,A,z],rules:[{endpoint:ql,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[I,E,c,d,A,F],endpoint:ql,["type"]:"endpoint"},{["conditions"]:[R,E,c,d,U],endpoint:{["url"]:"https://{Bucket}.s3-fips.us-east-1.{partitionResult#dnsSuffix}",["properties"]:C,["headers"]:w},["type"]:"endpoint"},{["conditions"]:[R,E,c,d,A,z],rules:[{endpoint:jl,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[R,E,c,d,A,F],endpoint:jl,["type"]:"endpoint"},{["conditions"]:[I,S,B,d,U],endpoint:{["url"]:"https://{Bucket}.s3-accelerate.dualstack.us-east-1.{partitionResult#dnsSuffix}",["properties"]:C,["headers"]:w},["type"]:"endpoint"},{["conditions"]:[I,S,B,d,A,z],rules:[{endpoint:il,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[I,S,B,d,A,F],endpoint:il,["type"]:"endpoint"},{["conditions"]:[I,S,c,d,U],endpoint:{["url"]:"https://{Bucket}.s3.dualstack.us-east-1.{partitionResult#dnsSuffix}",["properties"]:C,["headers"]:w},["type"]:"endpoint"},{["conditions"]:[I,S,c,d,A,z],rules:[{endpoint:bl,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[I,S,c,d,A,F],endpoint:bl,["type"]:"endpoint"},{["conditions"]:[R,S,c,y,K,nr,U],endpoint:{["url"]:"{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}",["properties"]:C,["headers"]:w},["type"]:"endpoint"},{["conditions"]:[R,S,c,y,K,os,U],endpoint:{["url"]:"{url#scheme}://{Bucket}.{url#authority}{url#path}",["properties"]:C,["headers"]:w},["type"]:"endpoint"},{["conditions"]:[R,S,c,y,K,nr,A,z],rules:[{["conditions"]:x,endpoint:ns,["type"]:"endpoint"},{endpoint:ns,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[R,S,c,y,K,os,A,z],rules:[{["conditions"]:x,endpoint:Ie,["type"]:"endpoint"},xl],["type"]:"tree"},{["conditions"]:[R,S,c,y,K,nr,A,F],endpoint:ns,["type"]:"endpoint"},{["conditions"]:[R,S,c,y,K,os,A,F],endpoint:Ie,["type"]:"endpoint"},{["conditions"]:[R,S,B,d,U],endpoint:{["url"]:"https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}",["properties"]:C,["headers"]:w},["type"]:"endpoint"},{["conditions"]:[R,S,B,d,A,z],rules:[{["conditions"]:x,endpoint:ps,["type"]:"endpoint"},{endpoint:ps,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[R,S,B,d,A,F],endpoint:ps,["type"]:"endpoint"},{["conditions"]:[R,S,c,d,U],endpoint:{["url"]:"https://{Bucket}.s3.{partitionResult#dnsSuffix}",["properties"]:C,["headers"]:w},["type"]:"endpoint"},{["conditions"]:[R,S,c,d,A,z],rules:[{["conditions"]:x,endpoint:{["url"]:"https://{Bucket}.s3.{partitionResult#dnsSuffix}",["properties"]:M,["headers"]:w},["type"]:"endpoint"},{endpoint:ol,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[R,S,c,d,A,F],endpoint:ol,["type"]:"endpoint"}],["type"]:"tree"},xr],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:[y,K,{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[zf,"scheme"]},"http"]},{["fn"]:"aws.isVirtualHostableS3Bucket",["argv"]:[W,!0]},xs,S,R,c],rules:[{["conditions"]:b,rules:[{["conditions"]:Tf,rules:[xl],["type"]:"tree"},xr],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:[xs,{["fn"]:"aws.parseArn",["argv"]:sg,["assign"]:"bucketArn"}],rules:[{["conditions"]:[{["fn"]:"getAttr",["argv"]:[L,"resourceId[0]"],["assign"]:"arnType"},{["fn"]:"not",["argv"]:[{["fn"]:"stringEquals",["argv"]:[Kf,""]}]}],rules:[{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[us,"s3-object-lambda"]}],rules:[{["conditions"]:Se,rules:[{["conditions"]:cf,rules:[nl,pl,{["conditions"]:Re,rules:[ul,{["conditions"]:yf,rules:[ts,{["conditions"]:Ae,rules:[{["conditions"]:b,rules:[{["conditions"]:Mf,rules:[{["conditions"]:ke,rules:[{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[Vf,""]}],error:"Invalid ARN: Missing account id",["type"]:"error"},{["conditions"]:Pe,rules:[{["conditions"]:Uf,rules:[{["conditions"]:t,endpoint:{["url"]:"{url#scheme}://{accessPointName}-{bucketArn#accountId}.{url#authority}{url#path}",["properties"]:re,["headers"]:w},["type"]:"endpoint"},{["conditions"]:gr,endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}",["properties"]:re,["headers"]:w},["type"]:"endpoint"},{endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda.{bucketArn#region}.{bucketPartition#dnsSuffix}",["properties"]:re,["headers"]:w},["type"]:"endpoint"}],["type"]:"tree"},tl],["type"]:"tree"},se],["type"]:"tree"},ee],["type"]:"tree"},le],["type"]:"tree"}],["type"]:"tree"}],["type"]:"tree"},rf],["type"]:"tree"},{error:"Invalid ARN: bucket ARN is missing a region",["type"]:"error"}],["type"]:"tree"},sf],["type"]:"tree"},{error:"Invalid ARN: Object Lambda ARNs only support `accesspoint` arn types, but found: `{arnType}`",["type"]:"error"}],["type"]:"tree"},{["conditions"]:Se,rules:[{["conditions"]:cf,rules:[{["conditions"]:Re,rules:[{["conditions"]:Se,rules:[{["conditions"]:Re,rules:[ul,{["conditions"]:yf,rules:[ts,{["conditions"]:Ae,rules:[{["conditions"]:b,rules:[{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[Wf,"{partitionResult#name}"]}],rules:[{["conditions"]:ke,rules:[{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[us,"s3"]}],rules:[{["conditions"]:Pe,rules:[{["conditions"]:Uf,rules:[{["conditions"]:or,error:"Access Points do not support S3 Accelerate",["type"]:"error"},{["conditions"]:[E,I],endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}",["properties"]:Ur,["headers"]:w},["type"]:"endpoint"},{["conditions"]:[E,R],endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}",["properties"]:Ur,["headers"]:w},["type"]:"endpoint"},{["conditions"]:[S,I],endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}",["properties"]:Ur,["headers"]:w},["type"]:"endpoint"},{["conditions"]:[S,R,y,K],endpoint:{["url"]:"{url#scheme}://{accessPointName}-{bucketArn#accountId}.{url#authority}{url#path}",["properties"]:Ur,["headers"]:w},["type"]:"endpoint"},{["conditions"]:[S,R],endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.{bucketArn#region}.{bucketPartition#dnsSuffix}",["properties"]:Ur,["headers"]:w},["type"]:"endpoint"}],["type"]:"tree"},tl],["type"]:"tree"},se],["type"]:"tree"},{error:"Invalid ARN: The ARN was not for the S3 service, found: {bucketArn#service}",["type"]:"error"}],["type"]:"tree"},ee],["type"]:"tree"},le],["type"]:"tree"}],["type"]:"tree"}],["type"]:"tree"},rf],["type"]:"tree"}],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:[{["fn"]:"isValidHostLabel",["argv"]:[Ee,!0]}],rules:[{["conditions"]:ge,error:"S3 MRAP does not support dual-stack",["type"]:"error"},{["conditions"]:gr,error:"S3 MRAP does not support FIPS",["type"]:"error"},{["conditions"]:or,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"]:me,["assign"]:"mrapPartition"}],rules:[{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[{["ref"]:"mrapPartition"},"name"]},{["fn"]:"getAttr",["argv"]:[L,"partition"]}]}],rules:[{endpoint:{["url"]:"https://{accessPointName}.accesspoint.s3-global.{mrapPartition#dnsSuffix}",["properties"]:{["authSchemes"]:[{["disableDoubleEncoding"]:!0,name:"sigv4a",["signingName"]:"s3",["signingRegionSet"]:lg}]},["headers"]:w},["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"},sf],["type"]:"tree"},{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[us,"s3-outposts"]}],rules:[{["conditions"]:ge,error:"S3 Outposts does not support Dual-stack",["type"]:"error"},{["conditions"]:gr,error:"S3 Outposts does not support FIPS",["type"]:"error"},{["conditions"]:or,error:"S3 Outposts does not support S3 Accelerate",["type"]:"error"},{["conditions"]:[{["fn"]:"isSet",["argv"]:[{["fn"]:"getAttr",["argv"]:[L,"resourceId[4]"]}]}],error:"Invalid Arn: Outpost Access Point ARN contains sub resources",["type"]:"error"},{["conditions"]:[{["fn"]:"getAttr",["argv"]:fg,["assign"]:"outpostId"}],rules:[{["conditions"]:$f,rules:[ts,{["conditions"]:Ae,rules:[{["conditions"]:b,rules:[{["conditions"]:Mf,rules:[{["conditions"]:ke,rules:[{["conditions"]:Pe,rules:[{["conditions"]:[{["fn"]:"getAttr",["argv"]:ag,["assign"]:"outpostType"}],rules:[{["conditions"]:[{["fn"]:"getAttr",["argv"]:[L,"resourceId[3]"],["assign"]:"accessPointName"}],rules:[{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[{["ref"]:"outpostType"},"accesspoint"]}],rules:[{["conditions"]:t,endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.{url#authority}",["properties"]:ef,["headers"]:w},["type"]:"endpoint"},{endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.s3-outposts.{bucketArn#region}.{bucketPartition#dnsSuffix}",["properties"]:ef,["headers"]:w},["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"},se],["type"]:"tree"},ee],["type"]:"tree"},le],["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"]:[W,0,4,!1],["assign"]:"arnPrefix"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"arnPrefix"},"arn:"]},{["fn"]:"not",["argv"]:[{["fn"]:"isSet",["argv"]:[lf]}]}],error:"Invalid ARN: `{Bucket}` was not a valid ARN",["type"]:"error"},{["conditions"]:[{["fn"]:"booleanEquals",["argv"]:[tm,!0]},lf],error:"Path-style addressing cannot be used with ARN buckets",["type"]:"error"},{["conditions"]:we,rules:[{["conditions"]:b,rules:[{["conditions"]:[c],rules:[{["conditions"]:[I,d,E,U],endpoint:{["url"]:"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:C,["headers"]:w},["type"]:"endpoint"},{["conditions"]:[I,d,E,A,z],rules:[{endpoint:ff,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[I,d,E,A,F],endpoint:ff,["type"]:"endpoint"},{["conditions"]:[R,d,E,U],endpoint:{["url"]:"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:C,["headers"]:w},["type"]:"endpoint"},{["conditions"]:[R,d,E,A,z],rules:[{endpoint:af,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[R,d,E,A,F],endpoint:af,["type"]:"endpoint"},{["conditions"]:[I,d,S,U],endpoint:{["url"]:"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:C,["headers"]:w},["type"]:"endpoint"},{["conditions"]:[I,d,S,A,z],rules:[{endpoint:hf,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[I,d,S,A,F],endpoint:hf,["type"]:"endpoint"},{["conditions"]:[R,y,K,S,U],endpoint:{["url"]:"{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}",["properties"]:C,["headers"]:w},["type"]:"endpoint"},{["conditions"]:[R,y,K,S,A,z],rules:[{["conditions"]:x,endpoint:fe,["type"]:"endpoint"},{endpoint:fe,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[R,y,K,S,A,F],endpoint:fe,["type"]:"endpoint"},{["conditions"]:[R,d,S,U],endpoint:{["url"]:"https://s3.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:C,["headers"]:w},["type"]:"endpoint"},{["conditions"]:[R,d,S,A,z],rules:[{["conditions"]:x,endpoint:{["url"]:"https://s3.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:M,["headers"]:w},["type"]:"endpoint"},{endpoint:mf,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[R,d,S,A,F],endpoint:mf,["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"]:[gf]},{["fn"]:"booleanEquals",["argv"]:[gf,!0]}],rules:[{["conditions"]:b,rules:[{["conditions"]:vf,rules:[nl,pl,{["conditions"]:t,endpoint:{["url"]:"{url#scheme}://{url#authority}{url#path}",["properties"]:ae,["headers"]:w},["type"]:"endpoint"},{["conditions"]:gr,endpoint:{["url"]:"https://s3-object-lambda-fips.{Region}.{partitionResult#dnsSuffix}",["properties"]:ae,["headers"]:w},["type"]:"endpoint"},{endpoint:{["url"]:"https://s3-object-lambda.{Region}.{partitionResult#dnsSuffix}",["properties"]:ae,["headers"]:w},["type"]:"endpoint"}],["type"]:"tree"},xr],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:[Yl],rules:[{["conditions"]:b,rules:[{["conditions"]:vf,rules:[{["conditions"]:[E,I,d,U],endpoint:{["url"]:"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}",["properties"]:C,["headers"]:w},["type"]:"endpoint"},{["conditions"]:[E,I,d,A,z],rules:[{endpoint:wf,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[E,I,d,A,F],endpoint:wf,["type"]:"endpoint"},{["conditions"]:[E,R,d,U],endpoint:{["url"]:"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}",["properties"]:C,["headers"]:w},["type"]:"endpoint"},{["conditions"]:[E,R,d,A,z],rules:[{endpoint:df,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[E,R,d,A,F],endpoint:df,["type"]:"endpoint"},{["conditions"]:[S,I,d,U],endpoint:{["url"]:"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}",["properties"]:C,["headers"]:w},["type"]:"endpoint"},{["conditions"]:[S,I,d,A,z],rules:[{endpoint:Sf,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[S,I,d,A,F],endpoint:Sf,["type"]:"endpoint"},{["conditions"]:[S,R,y,K,U],endpoint:{["url"]:"{url#scheme}://{url#authority}{url#path}",["properties"]:C,["headers"]:w},["type"]:"endpoint"},{["conditions"]:[S,R,y,K,A,z],rules:[{["conditions"]:x,endpoint:he,["type"]:"endpoint"},{endpoint:he,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[S,R,y,K,A,F],endpoint:he,["type"]:"endpoint"},{["conditions"]:[S,R,d,U],endpoint:{["url"]:"https://s3.{partitionResult#dnsSuffix}",["properties"]:C,["headers"]:w},["type"]:"endpoint"},{["conditions"]:[S,R,d,A,z],rules:[{["conditions"]:x,endpoint:{["url"]:"https://s3.{partitionResult#dnsSuffix}",["properties"]:M,["headers"]:w},["type"]:"endpoint"},{endpoint:Rf,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[S,R,d,A,F],endpoint:Rf,["type"]:"endpoint"}],["type"]:"tree"},xr],["type"]:"tree"}],["type"]:"tree"}],["type"]:"tree"},{error:"A region must be set when sending requests to S3.",["type"]:"error"}]},Lf=hg;var tr=(r,s={})=>{return Xf(Lf,{endpointParams:r,logger:s.logger})};Zf.aws=Jf;var Yf=function(r){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"s3",region:r.region},propertiesExtractor:(s,e)=>({signingProperties:{config:s,context:e}})}},Of=function(r){return{schemeId:"aws.auth#sigv4a",signingProperties:{name:"s3",region:r.region},propertiesExtractor:(s,e)=>({signingProperties:{config:s,context:e}})}},mg=(r)=>async(s,e,l)=>{if(!l)throw new Error("Could not find \`input\` for \`defaultEndpointRuleSetHttpAuthSchemeParametersProvider\`");const f=await r(s,e,l),a=yr(e)?.commandInstance?.constructor?.getEndpointParameterInstructions;if(!a)throw new Error(`getEndpointParameterInstructions() is not defined on \`${e.commandName}\``);const h=await Qf(l,{getEndpointParameterInstructions:a},s);return Object.assign(f,h)},gg=async(r,s,e)=>{return{operation:yr(s).operation,region:await Hf(r.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},Bf=mg(gg),wg=(r,s,e)=>{return(f)=>{const h=r(f).properties?.authSchemes;if(!h)return s(f);const m=[];for(let g of h){const{name:k,properties:N={},...D}=g,$=k.toLowerCase();if(k!==$)console.warn(`HttpAuthScheme has been normalized with lowercasing: \`${k}\` to \`${$}\``);let X;if($==="sigv4a"){X="aws.auth#sigv4a";const Jr=h.find((_)=>{const Dr=_.name.toLowerCase();return Dr!=="sigv4a"&&Dr.startsWith("sigv4")});if(!ir.CrtSignerV4&&Jr)continue}else if($.startsWith("sigv4"))X="aws.auth#sigv4";else throw new Error(`Unknown HttpAuthScheme found in \`@smithy.rules#endpointRuleSet\`: \`${$}\``);const J=e[X];if(!J)throw new Error(`Could not find HttpAuthOption create function for \`${X}\``);const Q=J(f);Q.schemeId=X,Q.signingProperties={...Q.signingProperties||{},...D,...N},m.push(Q)}return m}},dg=(r)=>{const s=[];switch(r.operation){default:s.push(Yf(r)),s.push(Of(r))}return s},_f=wg(tr,dg,{"aws.auth#sigv4":Yf,"aws.auth#sigv4a":Of}),qf=(r)=>{const s=ss.resolveAwsSdkSigV4Config(r);return{...ss.resolveAwsSdkSigV4AConfig(s)}};var jf=(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"}},wr={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 V extends bf{constructor(r){super(r);Object.setPrototypeOf(this,V.prototype)}}class es extends V{constructor(r){super({name:"NoSuchUpload",$fault:"client",...r});this.name="NoSuchUpload",this.$fault="client",Object.setPrototypeOf(this,es.prototype)}}class ls extends V{constructor(r){super({name:"ObjectNotInActiveTierError",$fault:"client",...r});this.name="ObjectNotInActiveTierError",this.$fault="client",Object.setPrototypeOf(this,ls.prototype)}}class fs extends V{constructor(r){super({name:"BucketAlreadyExists",$fault:"client",...r});this.name="BucketAlreadyExists",this.$fault="client",Object.setPrototypeOf(this,fs.prototype)}}class as extends V{constructor(r){super({name:"BucketAlreadyOwnedByYou",$fault:"client",...r});this.name="BucketAlreadyOwnedByYou",this.$fault="client",Object.setPrototypeOf(this,as.prototype)}}class hs extends V{constructor(r){super({name:"NoSuchBucket",$fault:"client",...r});this.name="NoSuchBucket",this.$fault="client",Object.setPrototypeOf(this,hs.prototype)}}var Ne;(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])}})(Ne||(Ne={}));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.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])}})($e||($e={}));var De;(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])}})(De||(De={}));var Te;(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])}})(Te||(Te={}));class ms extends V{constructor(r){super({name:"InvalidObjectState",$fault:"client",...r});this.name="InvalidObjectState",this.$fault="client",Object.setPrototypeOf(this,ms.prototype),this.StorageClass=r.StorageClass,this.AccessTier=r.AccessTier}}class gs extends V{constructor(r){super({name:"NoSuchKey",$fault:"client",...r});this.name="NoSuchKey",this.$fault="client",Object.setPrototypeOf(this,gs.prototype)}}class ws extends V{constructor(r){super({name:"NotFound",$fault:"client",...r});this.name="NotFound",this.$fault="client",Object.setPrototypeOf(this,ws.prototype)}}var Sg=(r)=>({...r,...r.SecretAccessKey&&{SecretAccessKey:Y},...r.SessionToken&&{SessionToken:Y}}),xf=(r)=>({...r,...r.Credentials&&{Credentials:Sg(r.Credentials)}});var of=(r)=>({...r,...r.SSEKMSKeyId&&{SSEKMSKeyId:Y}}),nf=(r)=>({...r,...r.SSECustomerKey&&{SSECustomerKey:Y}});var Rr=G(rs(),1);var ks=G(_s(),1);class ds extends V{constructor(r){super({name:"ObjectAlreadyInActiveTierError",$fault:"client",...r});this.name="ObjectAlreadyInActiveTierError",this.$fault="client",Object.setPrototypeOf(this,ds.prototype)}}var pf;(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])}})(pf||(pf={}));var uf=(r)=>({...r,...r.SSEKMSKeyId&&{SSEKMSKeyId:Y},...r.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:Y}}),tf=(r)=>({...r,...r.SSECustomerKey&&{SSECustomerKey:Y},...r.SSEKMSKeyId&&{SSEKMSKeyId:Y},...r.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:Y}});var Ra=async(r,s)=>{const e=ks.requestBuilder(r,s),l=v({},j,{[Dw]:r[pg]});e.bp("/"),e.p("Bucket",()=>r.Bucket,"{Bucket}",!1);const f=v({[Iw]:[,""]});let a;return e.m("GET").h(l).q(f).b(a),e.build()};var Aa=async(r,s)=>{const e=ks.requestBuilder(r,s),l=v({},j,{[fw]:r[Xg],[aw]:[()=>j(r[ra]),()=>vr(r[ra]).toString()],[hw]:r[Jg],[mw]:[()=>j(r[sa]),()=>vr(r[sa]).toString()],[ww]:r[Og],[Es]:r[Ps],[ia]:r[Fa],[Ns]:r[Is],[_a]:r[za],[Qa]:r[ya],[$w]:r[Cg]});e.bp("/{Key+}"),e.p("Bucket",()=>r.Bucket,"{Bucket}",!1),e.p("Key",()=>r.Key,"{Key+}",!0);const f=v({[oa]:[,"GetObject"],[dw]:[,r[_g]],[Sw]:[,r[qg]],[Rw]:[,r[jg]],[Aw]:[,r[ig]],[kw]:[,r[bg]],[Pw]:[()=>r.ResponseExpires!==void 0,()=>vr(r[xg]).toString()],[Ew]:[,r[Ye]],[gw]:[()=>r.PartNumber!==void 0,()=>r[Yg].toString()]});let a;return e.m("GET").h(l).q(f).b(a),e.build()};var ka=async(r,s)=>{const e=ks.requestBuilder(r,s),l=v({},j,{[Xa]:r[ca]||"application/octet-stream",[Nw]:r[Mg],[Wa]:r[Na],[Va]:r[$a],[La]:r[Da],[Za]:r[Ta],[Ge]:[()=>j(r[Ce]),()=>r[Ce].toString()],[sw]:r[zg],[Cw]:r[vg],[Oe]:r[Ze],[_e]:r[Xe],[qe]:r[Je],[je]:r[He],[Ke]:[()=>j(r[ze]),()=>vr(r[ze]).toString()],[Tw]:r[Wg],[cw]:r[Vg],[yw]:r[Lg],[Mw]:r[Zg],[ie]:r[Qe],[qa]:r[zr],[xa]:r[Ka],[Es]:r[Ps],[ia]:r[Fa],[Ns]:r[Is],[be]:r[Be],[ja]:r[Ga],[Fr]:[()=>j(r[As]),()=>r[As].toString()],[_a]:r[za],[zw]:r[ug],[Ya]:r[va],[We]:[()=>j(r[Fe]),()=>Sa(r[Fe]).toString()],[Ba]:r[Ua],[Qa]:r[ya],...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 f=v({[oa]:[,"PutObject"]});let a,h;if(r.Body!==void 0)h=r.Body,a=h;return e.m("PUT").h(l).q(f).b(a),e.build()};var Pa=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return Le(r,s);const e=v({$metadata:H(r)}),l=dr(ga(await Rr.parseXmlBody(r.body,s)),"body");if(l[Me]!=null)e[Me]=yg(l[Me],s);return e};var Ia=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return Le(r,s);const e=v({$metadata:H(r),[Gg]:[()=>r.headers[la]!==void 0,()=>Rs(r.headers[la])],[Ug]:[,r.headers[rw]],[Cr]:[,r.headers[Ha]],[ng]:[,r.headers[Uw]],[Hg]:[()=>r.headers[ea]!==void 0,()=>dr(Tr(r.headers[ea]))],[Ce]:[()=>r.headers[Ge]!==void 0,()=>wa(r.headers[Ge])],[Ma]:[,r.headers[Ja]],[Ze]:[,r.headers[Oe]],[Xe]:[,r.headers[_e]],[Je]:[,r.headers[qe]],[He]:[,r.headers[je]],[Qg]:[()=>r.headers[fa]!==void 0,()=>Ss(r.headers[fa])],[Ye]:[,r.headers[ba]],[Na]:[,r.headers[Wa]],[$a]:[,r.headers[Va]],[Da]:[,r.headers[La]],[Ta]:[,r.headers[Za]],[Fg]:[,r.headers[ew]],[ca]:[,r.headers[Xa]],[ze]:[()=>r.headers[Ke]!==void 0,()=>dr(Tr(r.headers[Ke]))],[Kg]:[,r.headers[lw]],[Ka]:[,r.headers[xa]],[Qe]:[,r.headers[ie]],[Ps]:[,r.headers[Es]],[Is]:[,r.headers[Ns]],[Be]:[,r.headers[be]],[As]:[()=>r.headers[Fr]!==void 0,()=>Rs(r.headers[Fr])],[zr]:[,r.headers[qa]],[Ca]:[,r.headers[Oa]],[og]:[,r.headers[vw]],[Bg]:[()=>r.headers[aa]!==void 0,()=>Ss(r.headers[aa])],[tg]:[()=>r.headers[ha]!==void 0,()=>Ss(r.headers[ha])],[va]:[,r.headers[Ya]],[Fe]:[()=>r.headers[We]!==void 0,()=>dr(Ve(r.headers[We]))],[Ua]:[,r.headers[Ba]],Metadata:[,Object.keys(r.headers).filter((f)=>f.startsWith("x-amz-meta-")).reduce((f,a)=>{return f[a.substring(11)]=r.headers[a],f},{})]}),l=r.body;return s.sdkStreamMixin(l),e.Body=l,e};var Ea=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return Le(r,s);const e=v({$metadata:H(r),[Cr]:[,r.headers[Ha]],[Ma]:[,r.headers[Ja]],[Ze]:[,r.headers[Oe]],[Xe]:[,r.headers[_e]],[Je]:[,r.headers[qe]],[He]:[,r.headers[je]],[Qe]:[,r.headers[ie]],[Ye]:[,r.headers[ba]],[Ps]:[,r.headers[Es]],[Is]:[,r.headers[Ns]],[Be]:[,r.headers[be]],[Ga]:[,r.headers[ja]],[As]:[()=>r.headers[Fr]!==void 0,()=>Rs(r.headers[Fr])],[Ca]:[,r.headers[Oa]]});return await ma(r.body,s),e};var Le=async(r,s)=>{const e={...r,body:await Rr.parseXmlErrorBody(r.body,s)},l=Rr.loadRestXmlErrorCode(r,e.body);switch(l){case"NoSuchUpload":case"com.amazonaws.s3#NoSuchUpload":throw await $g(e,s);case"ObjectNotInActiveTierError":case"com.amazonaws.s3#ObjectNotInActiveTierError":throw await cg(e,s);case"BucketAlreadyExists":case"com.amazonaws.s3#BucketAlreadyExists":throw await kg(e,s);case"BucketAlreadyOwnedByYou":case"com.amazonaws.s3#BucketAlreadyOwnedByYou":throw await Pg(e,s);case"NoSuchBucket":case"com.amazonaws.s3#NoSuchBucket":throw await Eg(e,s);case"InvalidObjectState":case"com.amazonaws.s3#InvalidObjectState":throw await Ig(e,s);case"NoSuchKey":case"com.amazonaws.s3#NoSuchKey":throw await Ng(e,s);case"NotFound":case"com.amazonaws.s3#NotFound":throw await Dg(e,s);case"ObjectAlreadyInActiveTierError":case"com.amazonaws.s3#ObjectAlreadyInActiveTierError":throw await Tg(e,s);default:const f=e.body;return Ag({output:r,parsedBody:f,errorCode:l})}},Ag=da(V),kg=async(r,s)=>{const e=v({}),l=r.body,f=new fs({$metadata:H(r),...e});return O(f,r.body)},Pg=async(r,s)=>{const e=v({}),l=r.body,f=new as({$metadata:H(r),...e});return O(f,r.body)},Ig=async(r,s)=>{const e=v({}),l=r.body;if(l[ye]!=null)e[ye]=Sr(l[ye]);if(l[zr]!=null)e[zr]=Sr(l[zr]);const f=new ms({$metadata:H(r),...e});return O(f,r.body)},Eg=async(r,s)=>{const e=v({}),l=r.body,f=new hs({$metadata:H(r),...e});return O(f,r.body)},Ng=async(r,s)=>{const e=v({}),l=r.body,f=new gs({$metadata:H(r),...e});return O(f,r.body)},$g=async(r,s)=>{const e=v({}),l=r.body,f=new es({$metadata:H(r),...e});return O(f,r.body)},Dg=async(r,s)=>{const e=v({}),l=r.body,f=new ws({$metadata:H(r),...e});return O(f,r.body)},Tg=async(r,s)=>{const e=v({}),l=r.body,f=new ds({$metadata:H(r),...e});return O(f,r.body)},cg=async(r,s)=>{const e=v({}),l=r.body,f=new ls({$metadata:H(r),...e});return O(f,r.body)};var yg=(r,s)=>{const e={};if(r[ce]!=null)e[ce]=Sr(r[ce]);if(r[Ue]!=null)e[Ue]=Sr(r[Ue]);if(r[ve]!=null)e[ve]=Sr(r[ve]);if(r[Cr]!=null)e[Cr]=dr(Ve(r[Cr]));return e};var H=(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 j=(r)=>r!==void 0&&r!==null&&r!==""&&(!Object.getOwnPropertyNames(r).includes("length")||r.length!=0)&&(!Object.getOwnPropertyNames(r).includes("size")||r.size!=0);var Mg="ACL";var ce="AccessKeyId";var Ug="AcceptRanges";var ye="AccessTier";var As="BucketKeyEnabled";var Me="Credentials",vg="ChecksumAlgorithm";var Na="CacheControl",Ze="ChecksumCRC32",Xe="ChecksumCRC32C",$a="ContentDisposition";var Da="ContentEncoding";var Ta="ContentLanguage",Ce="ContentLength",Cg="ChecksumMode",zg="ContentMD5";var Fg="ContentRange";var Je="ChecksumSHA1",He="ChecksumSHA256";var ca="ContentType";var Gg="DeleteMarker";var ze="Expires";var ya="ExpectedBucketOwner";var Kg="ExpiresString";var Ma="ETag";var Cr="Expiration";var Wg="GrantFullControl";var Vg="GrantRead",Lg="GrantReadACP";var Zg="GrantWriteACP";var Xg="IfMatch",ra="IfModifiedSince",Jg="IfNoneMatch";var sa="IfUnmodifiedSince";var Hg="LastModified";var Qg="MissingMeta";var Ua="ObjectLockLegalHoldStatus",va="ObjectLockMode";var Fe="ObjectLockRetainUntilDate";var Bg="PartsCount";var Yg="PartNumber";var Og="Range";var Ca="RequestCharged",_g="ResponseCacheControl",qg="ResponseContentDisposition",jg="ResponseContentEncoding",ig="ResponseContentLanguage",bg="ResponseContentType";var xg="ResponseExpires";var za="RequestPayer";var og="ReplicationStatus";var ng="Restore";var Ue="SecretAccessKey";var zr="StorageClass";var pg="SessionMode";var Qe="ServerSideEncryption";var Ps="SSECustomerAlgorithm",Fa="SSECustomerKey",Is="SSECustomerKeyMD5";var Ga="SSEKMSEncryptionContext",Be="SSEKMSKeyId";var ve="SessionToken";var ug="Tagging";var tg="TagCount";var Ye="VersionId";var Ka="WebsiteRedirectLocation";var rw="accept-ranges";var Wa="cache-control",Va="content-disposition",La="content-encoding",Za="content-language",Ge="content-length",sw="content-md5",ew="content-range",Xa="content-type";var Ke="expires";var Ja="etag",lw="expiresstring";var fw="if-match",aw="if-modified-since";var hw="if-none-match";var mw="if-unmodified-since";var ea="last-modified";var gw="partNumber";var ww="range",dw="response-cache-control",Sw="response-content-disposition",Rw="response-content-encoding",Aw="response-content-language",kw="response-content-type",Pw="response-expires";var Iw="session";var Ew="versionId";var Nw="x-amz-acl";var Oe="x-amz-checksum-crc32",_e="x-amz-checksum-crc32c",$w="x-amz-checksum-mode";var qe="x-amz-checksum-sha1",je="x-amz-checksum-sha256";var Dw="x-amz-create-session-mode";var la="x-amz-delete-marker",Ha="x-amz-expiration",Qa="x-amz-expected-bucket-owner";var Tw="x-amz-grant-full-control",cw="x-amz-grant-read",yw="x-amz-grant-read-acp";var Mw="x-amz-grant-write-acp";var fa="x-amz-missing-meta";var aa="x-amz-mp-parts-count";var Ba="x-amz-object-lock-legal-hold",Ya="x-amz-object-lock-mode",We="x-amz-object-lock-retain-until-date";var Uw="x-amz-restore",Oa="x-amz-request-charged";var _a="x-amz-request-payer";var vw="x-amz-replication-status";var qa="x-amz-storage-class",Cw="x-amz-sdk-checksum-algorithm";var ie="x-amz-server-side-encryption",be="x-amz-server-side-encryption-aws-kms-key-id",Fr="x-amz-server-side-encryption-bucket-key-enabled",ja="x-amz-server-side-encryption-context",Es="x-amz-server-side-encryption-customer-algorithm",ia="x-amz-server-side-encryption-customer-key",Ns="x-amz-server-side-encryption-customer-key-md5",zw="x-amz-tagging",ha="x-amz-tagging-count";var ba="x-amz-version-id",xa="x-amz-website-redirect-location",oa="x-id";class xe extends Ar.classBuilder().ep({...wr,DisableS3ExpressSessionAuth:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(r,s,e,l){return[kr(e,this.serialize,this.deserialize),Pr(e,r.getEndpointParameterInstructions()),jr(e)]}).s("AmazonS3","CreateSession",{}).n("S3Client","CreateSessionCommand").f(void 0,xf).ser(Ra).de(Pa).build(){}var na={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 zs=G(rs(),1);var Gw="AWS_S3_USE_ARN_REGION",Kw="s3_use_arn_region",pa={environmentVariableSelector:(r)=>p(r,Gw,u.ENV),configFileSelector:(r)=>p(r,Kw,u.CONFIG),default:!1};var ua=G(Yw(),1),{__extends:CR,__assign:zR,__rest:FR,__decorate:GR,__param:KR,__esDecorate:WR,__runInitializers:VR,__propKey:LR,__setFunctionName:ZR,__metadata:XR,__awaiter:$s,__generator:Ds,__exportStar:JR,__createBinding:HR,__values:Ts,__read:QR,__spread:BR,__spreadArrays:YR,__spreadArray:OR,__await:_R,__asyncGenerator:qR,__asyncDelegator:jR,__asyncValues:iR,__makeTemplateObject:bR,__importStar:xR,__importDefault:oR,__classPrivateFieldGet:nR,__classPrivateFieldSet:pR,__classPrivateFieldIn:uR,__addDisposableResource:tR,__disposeResources:rA}=ua.default;import{Buffer as ta} from"buffer";var rh=(r,s)=>{if(typeof r!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof r} (${r})`);return s?ta.from(r,s):ta.from(r)};var oe=(r)=>{const s=rh(r,"utf8");return new Uint8Array(s.buffer,s.byteOffset,s.byteLength/Uint8Array.BYTES_PER_ELEMENT)};function Gr(r){if(r instanceof Uint8Array)return r;if(typeof r==="string")return Ow(r);if(ArrayBuffer.isView(r))return new Uint8Array(r.buffer,r.byteOffset,r.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(r)}var Ow=typeof Buffer!=="undefined"&&Buffer.from?function(r){return Buffer.from(r,"utf8")}:oe;function Kr(r){if(typeof r==="string")return r.length===0;return r.byteLength===0}function Wr(r){return new Uint8Array([(r&4278190080)>>24,(r&16711680)>>16,(r&65280)>>8,r&255])}function Vr(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 ne=function(){function r(){this.crc32=new rr}return r.prototype.update=function(s){if(Kr(s))return;this.crc32.update(Gr(s))},r.prototype.digest=function(){return $s(this,void 0,void 0,function(){return Ds(this,function(s){return[2,Wr(this.crc32.digest())]})})},r.prototype.reset=function(){this.crc32=new rr},r}();var rr=function(){function r(){this.checksum=4294967295}return r.prototype.update=function(s){var e,l;try{for(var f=Ts(s),a=f.next();!a.done;a=f.next()){var h=a.value;this.checksum=this.checksum>>>8^qw[(this.checksum^h)&255]}}catch(m){e={error:m}}finally{try{if(a&&!a.done&&(l=f.return))l.call(f)}finally{if(e)throw e.error}}return this},r.prototype.digest=function(){return(this.checksum^4294967295)>>>0},r}();var _w=[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],qw=Vr(_w);var o=G(eh(),1);var lh=G(eh(),1),sh=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 Ir{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,l=Math.abs(Math.round(r));e>-1&&l>0;e--,l/=256)s[e]=l;if(r<0)sh(s);return new Ir(s)}valueOf(){const r=this.bytes.slice(0),s=r[0]&128;if(s)sh(r);return parseInt(lh.toHex(r),16)*(s?-1:1)}toString(){return String(this.valueOf())}}class pe{constructor(r,s){this.toUtf8=r,this.fromUtf8=s}format(r){const s=[];for(let f of Object.keys(r)){const a=this.fromUtf8(f);s.push(Uint8Array.from([a.byteLength]),a,this.formatHeaderValue(r[f]))}const e=new Uint8Array(s.reduce((f,a)=>f+a.byteLength,0));let l=0;for(let f of s)e.set(f,l),l+=f.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 l=new Uint8Array(9);return l[0]=5,l.set(r.value.bytes,1),l;case"binary":const f=new DataView(new ArrayBuffer(3+r.value.byteLength));f.setUint8(0,6),f.setUint16(1,r.value.byteLength,!1);const a=new Uint8Array(f.buffer);return a.set(r.value,3),a;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 k=new Uint8Array(9);return k[0]=8,k.set(Ir.fromNumber(r.value.valueOf()).bytes,1),k;case"uuid":if(!tw.test(r.value))throw new Error(`Invalid UUID received: ${r.value}`);const N=new Uint8Array(17);return N[0]=9,N.set(o.fromHex(r.value.replace(/\-/g,"")),1),N}}parse(r){const s={};let e=0;while(e<r.byteLength){const l=r.getUint8(e++),f=this.toUtf8(new Uint8Array(r.buffer,r.byteOffset+e,l));switch(e+=l,r.getUint8(e++)){case 0:s[f]={type:ah,value:!0};break;case 1:s[f]={type:ah,value:!1};break;case 2:s[f]={type:jw,value:r.getInt8(e++)};break;case 3:s[f]={type:iw,value:r.getInt16(e,!1)},e+=2;break;case 4:s[f]={type:bw,value:r.getInt32(e,!1)},e+=4;break;case 5:s[f]={type:xw,value:new Ir(new Uint8Array(r.buffer,r.byteOffset+e,8))},e+=8;break;case 6:const a=r.getUint16(e,!1);e+=2,s[f]={type:ow,value:new Uint8Array(r.buffer,r.byteOffset+e,a)},e+=a;break;case 7:const h=r.getUint16(e,!1);e+=2,s[f]={type:nw,value:this.toUtf8(new Uint8Array(r.buffer,r.byteOffset+e,h))},e+=h;break;case 8:s[f]={type:pw,value:new Date(new Ir(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[f]={type:uw,value:`${o.toHex(m.subarray(0,4))}-${o.toHex(m.subarray(4,6))}-${o.toHex(m.subarray(6,8))}-${o.toHex(m.subarray(8,10))}-${o.toHex(m.subarray(10))}`};break;default:throw new Error("Unrecognized header type tag")}}return s}}var fh;(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"})(fh||(fh={}));var ah="boolean",jw="byte",iw="short",bw="integer",xw="long",ow="binary",nw="string",pw="timestamp",uw="uuid",tw=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;function mh({byteLength:r,byteOffset:s,buffer:e}){if(r<rd)throw new Error("Provided message too short to accommodate event stream message overhead");const l=new DataView(e,s,r),f=l.getUint32(0,!1);if(r!==f)throw new Error("Reported message length does not match received message length");const a=l.getUint32(hh,!1),h=l.getUint32(n,!1),m=l.getUint32(r-sr,!1),g=new rr().update(new Uint8Array(e,s,n));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+n,r-(n+sr))),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+n+sr,a),body:new Uint8Array(e,s+n+sr+a,f-a-(n+sr+sr))}}var hh=4,n=hh*2,sr=4,rd=n+sr*2;class ue{constructor(r,s){this.headerMarshaller=new pe(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),l=e.byteLength+s.byteLength+16,f=new Uint8Array(l),a=new DataView(f.buffer,f.byteOffset,f.byteLength),h=new rr;return a.setUint32(0,l,!1),a.setUint32(4,e.byteLength,!1),a.setUint32(8,h.update(f.subarray(0,8)).digest(),!1),f.set(e,12),f.set(s,e.byteLength+12),a.setUint32(l-4,h.update(f.subarray(8,l-4)).digest(),!1),f}decode(r){const{headers:s,body:e}=mh(r);return{headers:this.headerMarshaller.parse(s),body:e}}formatHeaders(r){return this.headerMarshaller.format(r)}}class te{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 rl{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 sl{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 el{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 gh(r){let s=0,e=0,l=null,f=null;const a=(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,l=new Uint8Array(m),new DataView(l.buffer).setUint32(0,m,!1)},h=async function*(){const m=r[Symbol.asyncIterator]();while(!0){const{value:g,done:k}=await m.next();if(k){if(!s)return;else if(s===e)yield l;else throw new Error("Truncated event message received.");return}const N=g.length;let D=0;while(D<N){if(!l){const X=N-D;if(!f)f=new Uint8Array(4);const J=Math.min(4-e,X);if(f.set(g.slice(D,D+J),e),e+=J,D+=J,e<4)break;a(new DataView(f.buffer).getUint32(0,!1)),f=null}const $=Math.min(s-e,N-D);if(l.set(g.slice(D,D+$),e),e+=$,D+=$,s&&s===e)yield l,l=null,s=0,e=0}}};return{[Symbol.asyncIterator]:h}}function wh(r,s){return async function(e){const{value:l}=e.headers[":message-type"];if(l==="error"){const f=new Error(e.headers[":error-message"].value||"UnknownError");throw f.name=e.headers[":error-code"].value,f}else if(l==="exception"){const f=e.headers[":exception-type"].value,a={[f]:e},h=await r(a);if(h.$unknown){const m=new Error(s(e.body));throw m.name=f,m}throw h[f]}else if(l==="event"){const f={[e.headers[":event-type"].value]:e},a=await r(f);if(a.$unknown)return;return a}else throw Error(`Unrecognizable event type: ${e.headers[":event-type"].value}`)}}class cs{constructor({utf8Encoder:r,utf8Decoder:s}){this.eventStreamCodec=new ue(r,s),this.utfEncoder=r}deserialize(r,s){const e=gh(r);return new sl({messageStream:new te({inputStream:e,decoder:this.eventStreamCodec}),deserializer:wh(s,this.utfEncoder)})}serialize(r,s){return new rl({messageStream:new el({inputStream:r,serializer:s}),encoder:this.eventStreamCodec,includeEndFrame:!0})}}import{Readable as sd} from"stream";async function*dh(r){let s=!1,e=!1;const l=new Array;r.on("error",(f)=>{if(!s)s=!0;if(f)throw f}),r.on("data",(f)=>{l.push(f)}),r.on("end",()=>{s=!0});while(!e){const f=await new Promise((a)=>setTimeout(()=>a(l.shift()),0));if(f)yield f;e=s&&l.length===0}}class ll{constructor({utf8Encoder:r,utf8Decoder:s}){this.universalMarshaller=new cs({utf8Decoder:s,utf8Encoder:r})}deserialize(r,s){const e=typeof r[Symbol.asyncIterator]==="function"?r:dh(r);return this.universalMarshaller.deserialize(e,s)}serialize(r,s){return sd.from(this.universalMarshaller.serialize(r,s))}}var Sh=(r)=>new ll(r);import{Writable as ed} from"stream";class Ms extends ed{constructor(r,s){super(s);this.hash=r}_write(r,s,e){try{this.hash.update(ys(r))}catch(l){return e(l)}e()}}var Rh=(r,s)=>{if(s.readableFlowing!==null)throw new Error("Unable to calculate hash for flowing readable stream");const e=new r,l=new Ms(e);return s.pipe(l),new Promise((f,a)=>{s.on("error",(h)=>{l.end(),a(h)}),l.on("error",a),l.on("finish",()=>{e.digest().then(f).catch(a)})})};var Us=G(rs(),1);var Eh=G(ld(),1);var vs=G(Wl(),1);var Nh=(r)=>{return{apiVersion:"2006-03-01",base64Decoder:r?.base64Decoder??Ph,base64Encoder:r?.base64Encoder??Ih,disableHostPrefix:r?.disableHostPrefix??!1,endpointProvider:r?.endpointProvider??tr,extensions:r?.extensions??[],getAwsChunkedEncodingStream:r?.getAwsChunkedEncodingStream??vs.getAwsChunkedEncodingStream,httpAuthSchemeProvider:r?.httpAuthSchemeProvider??_f,httpAuthSchemes:r?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(s)=>s.getIdentityProvider("aws.auth#sigv4"),signer:new Us.AwsSdkSigV4Signer},{schemeId:"aws.auth#sigv4a",identityProvider:(s)=>s.getIdentityProvider("aws.auth#sigv4a"),signer:new Us.AwsSdkSigV4ASigner}],logger:r?.logger??new Br,sdkStreamMixin:r?.sdkStreamMixin??vs.sdkStreamMixin,serviceId:r?.serviceId??"S3",signerConstructor:r?.signerConstructor??is,signingEscapePath:r?.signingEscapePath??!1,urlParser:r?.urlParser??Eh.parseUrl,useArnRegion:r?.useArnRegion??!1,utf8Decoder:r?.utf8Decoder??Ah,utf8Encoder:r?.utf8Encoder??kh}};var Lh=(r)=>{Dh(process.version);const s=Wh(r),e=()=>s().then($h),l=Nh(r);return zs.emitWarningIfUnsupportedVersion(process.version),{...l,...r,runtime:"node",defaultsMode:s,bodyLengthChecker:r?.bodyLengthChecker??Kh,credentialDefaultProvider:r?.credentialDefaultProvider??Vh,defaultUserAgentProvider:r?.defaultUserAgentProvider??Gh({serviceId:l.serviceId,clientVersion:na.version}),disableS3ExpressSessionAuth:r?.disableS3ExpressSessionAuth??i(Ys),eventStreamSerdeProvider:r?.eventStreamSerdeProvider??Sh,maxAttempts:r?.maxAttempts??i(vh),md5:r?.md5??Cs.bind(null,"md5"),region:r?.region??i(yh,Mh),requestHandler:zh.create(r?.requestHandler??e),retryMode:r?.retryMode??i({...Ch,default:async()=>(await e()).retryMode||Uh}),sha1:r?.sha1??Cs.bind(null,"sha1"),sha256:r?.sha256??Cs.bind(null,"sha256"),sigv4aSigningRegionSet:r?.sigv4aSigningRegionSet??i(zs.NODE_SIGV4A_CONFIG_OPTIONS),streamCollector:r?.streamCollector??Fh,streamHasher:r?.streamHasher??Rh,useArnRegion:r?.useArnRegion??i(pa),useDualstackEndpoint:r?.useDualstackEndpoint??i(Th),useFipsEndpoint:r?.useFipsEndpoint??i(ch)}};var Zh=(r)=>{const s=r.httpAuthSchemes;let{httpAuthSchemeProvider:e,credentials:l}=r;return{setHttpAuthScheme(f){const a=s.findIndex((h)=>h.schemeId===f.schemeId);if(a===-1)s.push(f);else s.splice(a,1,f)},httpAuthSchemes(){return s},setHttpAuthSchemeProvider(f){e=f},httpAuthSchemeProvider(){return e},setCredentials(f){l=f},credentials(){return l}}},Xh=(r)=>{return{httpAuthSchemes:r.httpAuthSchemes(),httpAuthSchemeProvider:r.httpAuthSchemeProvider(),credentials:r.credentials()}};var Fs=(r)=>r,_h=(r,s)=>{const e={...Fs(Yh(r)),...Fs(Qh(r)),...Fs(Jh(r)),...Fs(Zh(r))};return s.forEach((l)=>l.configure(e)),{...r,...Oh(e),...Bh(e),...Hh(e),...Xh(e)}};class fl extends xh{constructor(...[r]){const s=Lh(r||{}),e=jf(s),l=oh(e),f=rm(l),a=ph(f),h=qh(a),m=th(h),g=Xl(m),k=qf(g),N=Kl(k,{session:[()=>this,xe]}),D=_h(N,r?.extensions||[]);super(D);this.config=D,this.middlewareStack.use(nh(this.config)),this.middlewareStack.use(sm(this.config)),this.middlewareStack.use(uh(this.config)),this.middlewareStack.use(jh(this.config)),this.middlewareStack.use(ih(this.config)),this.middlewareStack.use(bh(this.config)),this.middlewareStack.use(Er.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:Bf,identityProviderConfigProvider:async($)=>new Er.DefaultIdentityProviderConfig({"aws.auth#sigv4":$.credentials,"aws.auth#sigv4a":$.credentials})})),this.middlewareStack.use(Er.getHttpSigningPlugin(this.config)),this.middlewareStack.use(Zl(this.config)),this.middlewareStack.use(kl(this.config)),this.middlewareStack.use(Nl(this.config)),this.middlewareStack.use(Os(this.config)),this.middlewareStack.use(qs(this.config))}destroy(){super.destroy()}}function fd(r){return(s)=>async(e)=>{const l={...e.input},f=[{target:"SSECustomerKey",hash:"SSECustomerKeyMD5"},{target:"CopySourceSSECustomerKey",hash:"CopySourceSSECustomerKeyMD5"}];for(let a of f){const h=l[a.target];if(h){let m;if(typeof h==="string")if(hd(h,r))m=r.base64Decoder(h);else m=r.utf8Decoder(h),l[a.target]=r.base64Encoder(m);else m=ArrayBuffer.isView(h)?new Uint8Array(h.buffer,h.byteOffset,h.byteLength):new Uint8Array(h),l[a.target]=r.base64Encoder(m);const g=new r.md5;g.update(m),l[a.hash]=r.base64Encoder(await g.digest())}}return s({...e,input:l})}}function hd(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 ad={name:"ssecMiddleware",step:"initialize",tags:["SSE"],override:!0},Gs=(r)=>({applyToStack:(s)=>{s.add(fd(r),ad)}});var T;(function(r){r.MD5="MD5",r.CRC32="CRC32",r.CRC32C="CRC32C",r.SHA1="SHA1",r.SHA256="SHA256"})(T||(T={}));var em;(function(r){r.HEADER="header",r.TRAILER="trailer"})(em||(em={}));var{MD5:lm,CRC32:fm}=T;var Lr=[T.CRC32,T.CRC32C,T.SHA1,T.SHA256],am=[T.CRC32,T.CRC32C,T.SHA1,T.SHA256];var hm=(r,{requestChecksumRequired:s,requestAlgorithmMember:e},l)=>{const f=l?fm:lm;if(!e||!r[e])return s?f:void 0;const a=r[e];if(!Lr.includes(a))throw new Error(`The checksum algorithm "${a}" is not supported by the client.`+` Select one of ${Lr}.`);return a};var Nr=(r)=>r===T.MD5?"content-md5":`x-amz-checksum-${r.toLowerCase()}`;var mm=(r,s)=>{const e=r.toLowerCase();for(let l of Object.keys(s))if(e===l.toLowerCase())return!0;return!1};var $r=(r)=>r!==void 0&&typeof r!=="string"&&!ArrayBuffer.isView(r)&&!gm(r);var hl=function(){function r(){this.crc32c=new al}return r.prototype.update=function(s){if(Kr(s))return;this.crc32c.update(Gr(s))},r.prototype.digest=function(){return $s(this,void 0,void 0,function(){return Ds(this,function(s){return[2,Wr(this.crc32c.digest())]})})},r.prototype.reset=function(){this.crc32c=new al},r}();var al=function(){function r(){this.checksum=4294967295}return r.prototype.update=function(s){var e,l;try{for(var f=Ts(s),a=f.next();!a.done;a=f.next()){var h=a.value;this.checksum=this.checksum>>>8^gd[(this.checksum^h)&255]}}catch(m){e={error:m}}finally{try{if(a&&!a.done&&(l=f.return))l.call(f)}finally{if(e)throw e.error}}return this},r.prototype.digest=function(){return(this.checksum^4294967295)>>>0},r}();var md=[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],gd=Vr(md);var Ks=(r,s)=>({[T.MD5]:s.md5,[T.CRC32]:ne,[T.CRC32C]:hl,[T.SHA1]:s.sha1,[T.SHA256]:s.sha256})[r];var Ws=(r,s)=>{const e=new r;return e.update(ys(s||"")),e.digest()};var wm={name:"flexibleChecksumsMiddleware",step:"build",tags:["BODY_CHECKSUM"],override:!0},dm=(r,s)=>(e,l)=>async(f)=>{if(!Z.isInstance(f.request))return e(f);const{request:a}=f,{body:h,headers:m}=a,{base64Encoder:g,streamHasher:k}=r,{input:N,requestChecksumRequired:D,requestAlgorithmMember:$}=s,X=hm(N,{requestChecksumRequired:D,requestAlgorithmMember:$},!!l.isS3ExpressBucket);let J=h,Q=m;if(X){const _=Nr(X),Dr=Ks(X,r);if($r(h)){const{getAwsChunkedEncodingStream:Bs,bodyLengthChecker:Km}=r;J=Bs(h,{base64Encoder:g,bodyLengthChecker:Km,checksumLocationName:_,checksumAlgorithmFn:Dr,streamHasher:k}),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":_},delete Q["content-length"]}else if(!mm(_,m)){const Bs=await Ws(Dr,h);Q={...m,[_]:g(Bs)}}}return await e({...f,request:{...a,headers:Q,body:J}})};var Vs=(r=[])=>{const s=[];for(let e of am){if(!r.includes(e)||!Lr.includes(e))continue;s.push(e)}return s};var Sm=(r)=>{const s=r.lastIndexOf("-");if(s!==-1){const e=r.slice(s+1);if(!e.startsWith("0")){const l=parseInt(e,10);if(!isNaN(l)&&l>=1&&l<=1e4)return!0}}return!1};import{Transform as wd} from"stream";function ml(r){const s=new wd;return s.push(r),s.push(null),s}var Rm=async(r,{streamHasher:s,checksumAlgorithmFn:e,base64Encoder:l})=>{const f=$r(r)?s(e,r):Ws(e,r);return l(await f)};var Am=async(r,{config:s,responseAlgorithms:e})=>{const l=Vs(e),{body:f,headers:a}=r;for(let h of l){const m=Nr(h),g=a[m];if(g){const k=Ks(h,s),{streamHasher:N,base64Encoder:D}=s,$=await Rm(f,{streamHasher:N,checksumAlgorithmFn:k,base64Encoder:D});if($===g)break;throw new Error(`Checksum mismatch: expected "${$}" but received "${g}"`+` in response header "${m}".`)}}};var km={name:"flexibleChecksumsResponseMiddleware",toMiddleware:"deserializerMiddleware",relation:"after",tags:["BODY_CHECKSUM"],override:!0},Pm=(r,s)=>(e,l)=>async(f)=>{if(!Z.isInstance(f.request))return e(f);const a=f.input,h=await e(f),m=h.response;let g=void 0;const{requestValidationModeMember:k,responseAlgorithms:N}=s;if(k&&a[k]==="ENABLED"){const{clientName:D,commandName:$}=l;if(D==="S3Client"&&$==="GetObjectCommand"&&Vs(N).every((Q)=>{const Jr=Nr(Q),_=m.headers[Jr];return!_||Sm(_)}))return h;const J=$r(m.body);if(J)g=await r.streamCollector(m.body),m.body=ml(g);if(await Am(h.response,{config:r,responseAlgorithms:N}),J&&g)m.body=ml(g)}return h};var Ls=(r,s)=>({applyToStack:(e)=>{e.add(dm(r,s),wm),e.addRelativeTo(Pm(r,s),km)}});class gl extends Ar.classBuilder().ep({...wr,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(r,s,e,l){return[kr(e,this.serialize,this.deserialize),Pr(e,r.getEndpointParameterInstructions()),Ls(e,{input:this.input,requestChecksumRequired:!1,requestValidationModeMember:"ChecksumMode",responseAlgorithms:["CRC32","CRC32C","SHA256","SHA1"]}),Gs(e),$l(e)]}).s("AmazonS3","GetObject",{}).n("S3Client","GetObjectCommand").f(nf,of).ser(Aa).de(Ia).build(){}class wl extends Ar.classBuilder().ep({...wr,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(r,s,e,l){return[kr(e,this.serialize,this.deserialize),Pr(e,r.getEndpointParameterInstructions()),Ls(e,{input:this.input,requestAlgorithmMember:"ChecksumAlgorithm",requestChecksumRequired:!1}),Pl(e),jr(e),Gs(e)]}).s("AmazonS3","PutObject",{}).n("S3Client","PutObjectCommand").f(tf,uf).ser(ka).de(Ea).build(){}import{Buffer as Im} from"buffer";class Em extends er{client;constructor(...r){super();this.client=new fl(...r)}async put(r){let s,e,l,f=process.env.BUCKET_NAME;if(r instanceof Blob)s=r,l=`${Hr()}.${r.type.split("/")[1].split(";")[0]}`,e=r.type;else s=r.body,l=r.name,e=r.contentType;e=s instanceof Blob||s instanceof File?s.type:void 0;const a=s instanceof Im?s:Im.from(await s.arrayBuffer());return await this.client.send(new wl({Bucket:f,Key:l,Body:a,ContentType:e})),l}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 l=await this.client.send(new gl({Bucket:s,Key:e}));return new Response(l.Body.transformToWebStream(),{headers:{"Content-Type":l.ContentType,"Content-Length":l.ContentLength.toString(),"Cache-Control":"private, max-age=12000, must-revalidate","Last-Modified":l.LastModified?.toUTCString()||"",ETag:l.ETag||""}})}}class Zs{}class Xs extends Zs{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),l=Date.now();if(l-e.date>=60000)this.requests.set(r,{date:l,count:1});else this.requests.set(r,{date:e.date,count:e.count+1})}return this.requests.get(r).count}}class Nm{driver=new Xs}class Zr{}import*as Pd from"react-dom/server";var ym=G(dd(),1);var{defineProperty:Sd,getOwnPropertySymbols:$m}=Object,Rd=Object.prototype.hasOwnProperty,Ad=Object.prototype.propertyIsEnumerable,Dm=(r,s,e)=>(s in r)?Sd(r,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[s]=e,dl=(r,s)=>{for(var e in s||(s={}))if(Rd.call(s,e))Dm(r,e,s[e]);if($m){for(var e of $m(s))if(Ad.call(s,e))Dm(r,e,s[e])}return r},kd=((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')}),Sl=(r,s,e)=>{return new Promise((l,f)=>{var a=(g)=>{try{m(e.next(g))}catch(k){f(k)}},h=(g)=>{try{m(e.throw(g))}catch(k){f(k)}},m=(g)=>g.done?l(g.value):Promise.resolve(g.value).then(a,h);m((e=e.apply(r,s)).next())})},Id={unformatted:["code","pre","em","strong","span"],indent_inner_html:!0,indent_char:" ",indent_size:2,sep:"\n"},Ed=(r,s={})=>{return ym.default.html(r,dl(dl({},Id),s))},Nd=[{selector:"img",format:"skip"},{selector:"#__react-email-preview",format:"skip"},{selector:"a",options:{linkBrackets:!1}}];var Tm=new TextDecoder("utf-8"),cm=(r)=>Sl(void 0,null,function*(){let s="";if("pipeTo"in r){const e=new WritableStream({write(l){s+=Tm.decode(l)}});yield r.pipeTo(e)}else{const{Writable:e}=kd("stream"),l=new e({write(f,a,h){s+=Tm.decode(f),h()}});return r.pipe(l),new Promise((f,a)=>{l.on("error",a),l.on("close",()=>{f(s)})})}return s}),Js=(r,s)=>Sl(void 0,null,function*(){const e=yield import("react-dom/server");let l;if(Object.hasOwn(e,"renderToReadableStream"))l=yield cm(yield e.renderToReadableStream(r));else yield new Promise((h,m)=>{const g=e.renderToPipeableStream(r,{onAllReady(){return Sl(this,null,function*(){l=yield cm(g),h()})},onError(k){m(k)}})});if(s==null?void 0:s.plainText)return Rl(l,dl({selectors:Nd},s.htmlToTextOptions));const a=`${'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'}${l.replace(/<!DOCTYPE.*?>/,"")}`;if(s==null?void 0:s.pretty)return Ed(a);return a});var{defineProperty:$d,defineProperties:Dd,getOwnPropertyDescriptors:Td,getOwnPropertySymbols:Mm}=Object,cd=Object.prototype.hasOwnProperty,yd=Object.prototype.propertyIsEnumerable,Um=(r,s,e)=>(s in r)?$d(r,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[s]=e,Xr=(r,s)=>{for(var e in s||(s={}))if(cd.call(s,e))Um(r,e,s[e]);if(Mm){for(var e of Mm(s))if(yd.call(s,e))Um(r,e,s[e])}return r},Md=(r,s)=>Dd(r,Td(s)),P=(r,s,e)=>{return new Promise((l,f)=>{var a=(g)=>{try{m(e.next(g))}catch(k){f(k)}},h=(g)=>{try{m(e.throw(g))}catch(k){f(k)}},m=(g)=>g.done?l(g.value):Promise.resolve(g.value).then(a,h);m((e=e.apply(r,s)).next())})},Ud="3.4.0",vd=class{constructor(r){this.resend=r}create(r){return P(this,arguments,function*(s,e={}){return yield this.resend.post("/api-keys",s,e)})}list(){return P(this,null,function*(){return yield this.resend.get("/api-keys")})}remove(r){return P(this,null,function*(){return yield this.resend.delete(`/api-keys/${r}`)})}},Cd=class{constructor(r){this.resend=r}create(r){return P(this,arguments,function*(s,e={}){return yield this.resend.post("/audiences",s,e)})}list(){return P(this,null,function*(){return yield this.resend.get("/audiences")})}get(r){return P(this,null,function*(){return yield this.resend.get(`/audiences/${r}`)})}remove(r){return P(this,null,function*(){return yield this.resend.delete(`/audiences/${r}`)})}},zd=class{constructor(r){this.resend=r}send(r){return P(this,arguments,function*(s,e={}){return this.create(s,e)})}create(r){return P(this,arguments,function*(s,e={}){for(let f of s)if(f.react)f.html=yield Js(f.react),delete f.react;return yield this.resend.post("/emails/batch",s,e)})}},Fd=class{constructor(r){this.resend=r}create(r){return P(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 P(this,null,function*(){return yield this.resend.get(`/audiences/${r.audienceId}/contacts`)})}get(r){return P(this,null,function*(){return yield this.resend.get(`/audiences/${r.audienceId}/contacts/${r.id}`)})}update(r){return P(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 P(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}`)})}},Gd=class{constructor(r){this.resend=r}create(r){return P(this,arguments,function*(s,e={}){return yield this.resend.post("/domains",s,e)})}list(){return P(this,null,function*(){return yield this.resend.get("/domains")})}get(r){return P(this,null,function*(){return yield this.resend.get(`/domains/${r}`)})}update(r){return P(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 P(this,null,function*(){return yield this.resend.delete(`/domains/${r}`)})}verify(r){return P(this,null,function*(){return yield this.resend.post(`/domains/${r}/verify`)})}},Kd=class{constructor(r){this.resend=r}send(r){return P(this,arguments,function*(s,e={}){return this.create(s,e)})}create(r){return P(this,arguments,function*(s,e={}){if(s.react)s.html=yield Js(s.react),delete s.react;return yield this.resend.post("/emails",s,e)})}get(r){return P(this,null,function*(){return yield this.resend.get(`/emails/${r}`)})}},vm="https://api.resend.com",Cm=`resend-node:${Ud}`,Wd=typeof process!=="undefined"&&process.env?process.env.RESEND_BASE_URL||vm:vm,Vd=typeof process!=="undefined"&&process.env?process.env.RESEND_USER_AGENT||Cm:Cm,zm=class{constructor(r){if(this.key=r,this.apiKeys=new vd(this),this.audiences=new Cd(this),this.batch=new zd(this),this.contacts=new Fd(this),this.domains=new Gd(this),this.emails=new Kd(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":Vd,"Content-Type":"application/json"})}fetchRequest(r){return P(this,arguments,function*(s,e={}){try{const l=yield fetch(`${Wd}${s}`,e);if(!l.ok)try{const a=yield l.text();return{data:null,error:JSON.parse(a)}}catch(a){if(a 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:l.statusText,name:"application_error"};if(a instanceof Error)return{data:null,error:Md(Xr({},h),{message:a.message})};return{data:null,error:h}}return{data:yield l.json(),error:null}}catch(l){return{data:null,error:{name:"application_error",message:"Unable to fetch data. The request could not be resolved."}}}})}post(r,s){return P(this,arguments,function*(e,l,f={}){const a=Xr({method:"POST",headers:this.headers,body:JSON.stringify(l)},f);return this.fetchRequest(e,a)})}get(r){return P(this,arguments,function*(s,e={}){const l=Xr({method:"GET",headers:this.headers},e);return this.fetchRequest(s,l)})}put(r,s){return P(this,arguments,function*(e,l,f={}){const a=Xr({method:"PUT",headers:this.headers,body:JSON.stringify(l)},f);return this.fetchRequest(e,a)})}patch(r,s){return P(this,arguments,function*(e,l,f={}){const a=Xr({method:"PATCH",headers:this.headers,body:JSON.stringify(l)},f);return this.fetchRequest(e,a)})}delete(r,s){return P(this,null,function*(){const e={method:"DELETE",headers:this.headers,body:JSON.stringify(s)};return this.fetchRequest(r,e)})}};class Hs{}class Qs extends Hs{r;constructor(r=process.env.RESEND_API_KEY){super();this.apiKey=r}async send(r){const s=new zm(this.apiKey),{data:e,error:l}=await s.emails.send({...r});if(l)throw l;if(e)return!0}}class Fm extends Zr{constructor(){super(...arguments)}debug=!0;defaultFrom="";driver=new Qs;boot(){}}class Gm extends Zr{constructor(){super(...arguments)}channels={};boot(){}}export{Em as S3Driver,Qs as ResendDriver,Nm as RateLimiterServiceProvider,Zs as RateLimiterDriver,Xs as InMemoryRateLimiter,Qr as FileSystemDriver,Al as FileStorageServiceProvider,er as FileStorageDriver,Fm as EmailServiceProvider,Hs as EmailDriver,Gm as BroadcastingServiceProvider};export{Al as p,Zr as q,Nm as r,Fm as s,Gm as t};
|
|
2
|
+
import"../chunk-4c457f127eae7f58.js";import{B as Z} from"../chunk-24a86f8f5ddc0cbd.js";import{G as dl,H as Rd} from"../chunk-0ba2cc302113ab40.js";import{M as qw} from"../chunk-ff8cd8fd047cfee5.js";import{$ as Xf,N as Hr,O as jh,P as ih,Q as bh,R as xh,S as qm,T as p,U as u,V as Ys,W as yr,X as Jf,Y as nh,Z as Lf,_ as Zf,aa as ph,ba as Mh,ca as Uh,da as vh,ea as Ch,fa as uh,ga as th,ha as Hf,ia as kr,ja as Pr,ka as rm,la as zh,ma as Fh,na as sm,oa as Gh,pa as em,qa as tr,ra as Kh,sa as Us,ta as Wh,ua as Vh,va as Oh,wa as _h} from"../chunk-51a2c84a6839c299.js";import{$a as Ar,Aa as Yr,Ba as Br,Ca as oh,Da as wm,Ga as Rh,Ha as Ah,Ia as cs,Ja as kh,Ka as Ph,La as Ih,Na as Dh,Oa as Th,Wa as sh,Xa as Eh,Ya as Gl,Za as Kl,_a as ha,ab as Y,cb as Ss,fb as dr,gb as ma,hb as Sr,ib as ga,jb as ds,kb as vr,mb as Ke,nb as Tr,ob as jf,pb as O,qb as wa,rb as ch,sb as yh,tb as Bh,ub as Yh,wb as v,xa as Hh,ya as Qh,yb as da,za as L} from"../chunk-780fac65d888ab11.js";import{Ab as jm} from"../chunk-38a8eb514cb2baeb.js";import{Cb as i,Db as Nh} from"../chunk-8479523d216bb31d.js";import"../chunk-b7d8fc4acf4c1370.js";import{Fb as Lh} from"../chunk-5213568d9f79a50e.js";import"../chunk-2b44381dc9ebfb4e.js";class er{}class Qr extends er{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=`${Hr()}.${r.type.split("/")[1].split(";")[0]}`;else s=r.body,e=r.name;const l=s instanceof Buffer?s:Buffer.from(await s.arrayBuffer()),f=`${this.folderPath}/${e}`;return await Bun.write(f,l),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 l=`${this.folderPath}/${e}`,f=Bun.file(l),a=Bun.file(l).stream(),h=new Date(f.lastModified).toUTCString();return new Response(a,{headers:{"Content-Type":f.type,"Content-Length":String(f.size),"Cache-Control":"private, max-age=12000, must-revalidate","Last-Modified":h}})}}class Sl{driver=new Qr}function Vm(r){return(s)=>async(e)=>{const{request:l}=e;if(L.isInstance(l)&&l.body&&r.runtime==="node"){if(r.requestHandler?.constructor?.name!=="FetchHttpHandler")l.headers={...l.headers,Expect:"100-continue"}}return s({...e,request:l})}}var Lm={step:"build",tags:["SET_EXPECT_HEADER","EXPECT_HEADER"],name:"addExpectContinueMiddleware",override:!0},Rl=(r)=>({applyToStack:(s)=>{s.add(Vm(r),Lm)}});function Xm(){return(r,s)=>async(e)=>{const{request:l}=e;if(L.isInstance(l)){if(!(Zm in l.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 Zm="content-length",Jm={step:"finalizeRequest",tags:["CHECK_CONTENT_LENGTH_HEADER"],name:"getCheckContentLengthHeaderPlugin",override:!0},Al=(r)=>({applyToStack:(s)=>{s.add(Xm(),Jm)}});var kl=(r)=>{return(s,e)=>async(l)=>{const f=await r.region(),a=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:a});try{const m=await s(l);if(e.__s3RegionRedirect){h();const g=await r.region();if(f!==g)throw new Error("Region was not restored following S3 region redirect.")}return m}catch(m){throw h(),m}}},Pl={tags:["REGION_REDIRECT","S3"],name:"regionRedirectEndpointMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"};function Hm(r){return(s,e)=>async(l)=>{try{return await s(l)}catch(f){if(r.followRegionRedirects&&f?.$metadata?.httpStatusCode===301){try{const a=f.$response.headers["x-amz-bucket-region"];e.logger?.debug(`Redirecting from ${await r.region()} to ${a}`),e.__s3RegionRedirect=a}catch(a){throw new Error("Region redirect failed: "+a)}return s(l)}else throw f}}}var Qm={step:"initialize",tags:["REGION_REDIRECT","S3"],name:"regionRedirectMiddleware",override:!0},Il=(r)=>({applyToStack:(s)=>{s.add(Hm(r),Qm),s.addRelativeTo(kl(r),Pl)}});var Bm=(r)=>{return(s,e)=>async(l)=>{const f=await s(l),{response:a}=f;if(Yr.isInstance(a)){if(a.headers.expires){a.headers.expiresstring=a.headers.expires;try{Tr(a.headers.expires)}catch(h){e.logger?.warn(`AWS SDK Warning for ${e.clientName}::${e.commandName} response parsing (${a.headers.expires}): ${h}`),delete a.headers.expires}}}return f}},Ym={tags:["S3"],name:"s3ExpiresMiddleware",override:!0,relation:"after",toMiddleware:"deserializerMiddleware"},El=(r)=>({applyToStack:(s)=>{s.addRelativeTo(Bm(r),Ym)}});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 l=await e.identity;if(l.expiration){if(l.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 ar{constructor(r,s=new lr){this.createSessionFn=r,this.cache=s}async getS3ExpressIdentity(r,s){const e=s.Bucket,{cache:l}=this,f=l.get(e);if(f)return f.identity.then((a)=>{if((a.expiration?.getTime()??0)<Date.now())return l.set(e,new fr(this.getIdentity(e))).identity;if((a.expiration?.getTime()??0)<Date.now()+ar.REFRESH_WINDOW_MS&&!f.isRefreshing)f.isRefreshing=!0,this.getIdentity(e).then((g)=>{l.set(e,new fr(Promise.resolve(g)))});return a});return l.set(e,new fr(this.getIdentity(e))).identity}async getIdentity(r){await this.cache.purgeExpired().catch((l)=>{console.warn("Error while clearing expired entries in S3ExpressIdentityCache: \n"+l)});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}}}ar.REFRESH_WINDOW_MS=60000;var yl=Z(qm(),1);var Nl="Directory",$l="S3Express",Dl="sigv4-s3express",Or="X-Amz-S3session-Token",cr=Or.toLowerCase(),Om="AWS_S3_DISABLE_EXPRESS_SESSION_AUTH",_m="s3_disable_express_session_auth",Qs={environmentVariableSelector:(r)=>p(r,Om,u.ENV),configFileSelector:(r)=>p(r,_m,u.CONFIG),default:!1};var Tl=function(r){return{accessKeyId:r.accessKeyId,secretAccessKey:r.secretAccessKey,expiration:r.expiration}},cl=function(r,s){const e=setTimeout(()=>{throw new Error("SignatureV4S3Express credential override was created but not called.")},10),l=r.credentialProvider,f=()=>{return clearTimeout(e),r.credentialProvider=l,Promise.resolve(s)};r.credentialProvider=f};class _r extends yl.SignatureV4{async signWithCredentials(r,s,e){const l=Tl(s);r.headers[cr]=s.sessionToken;const f=this;return cl(f,l),f.signRequest(r,e??{})}async presignWithCredentials(r,s,e){const l=Tl(s);return delete r.headers[cr],r.headers[Or]=s.sessionToken,r.query=r.query??{},r.query[Or]=s.sessionToken,cl(this,l),this.presign(r,e)}}var Ml=(r)=>{return(s,e)=>async(l)=>{if(e.endpointV2){const f=e.endpointV2,a=f.properties?.authSchemes?.[0]?.name===Dl;if(f.properties?.backend===$l||f.properties?.bucketType===Nl)e.isS3ExpressBucket=!0;if(a){const m=l.input.Bucket;if(m){const g=await r.s3ExpressIdentityProvider.getS3ExpressIdentity(await r.credentials(),{Bucket:m});if(e.s3ExpressIdentity=g,L.isInstance(l.request)&&g.sessionToken)l.request.headers[cr]=g.sessionToken}}}return s(l)}},Ul={name:"s3ExpressMiddleware",step:"build",tags:["S3","S3_EXPRESS"],override:!0},Bs=(r)=>({applyToStack:(s)=>{s.add(Ml(r),Ul)}});var Cl=Z(Ys(),1);var im=Z(jm(),1);var vl=async(r,s,e,l)=>{const f=await l.signWithCredentials(e,r,{});if(f.headers["X-Amz-Security-Token"]||f.headers["x-amz-security-token"])throw new Error("X-Amz-Security-Token must not be set for s3-express requests.");return f};var bm=(r)=>(s)=>{throw s},xm=(r,s)=>{};var zl=(r)=>(s,e)=>async(l)=>{if(!L.isInstance(l.request))return s(l);const a=yr(e).selectedHttpAuthScheme;if(!a)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:h={}},identity:m,signer:g}=a;let k;if(e.s3ExpressIdentity)k=await vl(e.s3ExpressIdentity,h,l.request,await r.signer());else k=await g.sign(l.request,m,h);const N=await s({...l,request:k}).catch((g.errorHandler||bm)(h));return(g.successHandler||xm)(N.response,h),N},Os=(r)=>({applyToStack:(s)=>{s.addRelativeTo(zl(r),Cl.httpSigningMiddlewareOptions)}});var Fl=(r,{session:s})=>{const[e,l]=s;return{...r,forcePathStyle:r.forcePathStyle??!1,useAccelerateEndpoint:r.useAccelerateEndpoint??!1,disableMultiregionAccessPoints:r.disableMultiregionAccessPoints??!1,followRegionRedirects:r.followRegionRedirects??!1,s3ExpressIdentityProvider:r.s3ExpressIdentityProvider??new ar(async(f)=>e().send(new l({Bucket:f,SessionMode:"ReadWrite"}))),bucketEndpoint:r.bucketEndpoint??!1}};var om={CopyObjectCommand:!0,UploadPartCopyCommand:!0,CompleteMultipartUploadCommand:!0},nm=3000,pm=(r)=>(s,e)=>async(l)=>{const f=await s(l),{response:a}=f;if(!Yr.isInstance(a))return f;const{statusCode:h,body:m}=a;if(h<200||h>=300)return f;let g=m,k=m;if(m&&typeof m==="object"&&!(m instanceof Uint8Array))[g,k]=await Gl(m);a.body=k;const N=await um(g,{streamCollector:async($)=>{return Kl($,nm)}});if(typeof g?.destroy==="function")g.destroy();const D=r.utf8Encoder(N.subarray(N.length-16));if(N.length===0&&om[e.commandName]){const $=new Error("S3 aborted request");throw $.name="InternalError",$}if(D&&D.endsWith("</Error>"))a.statusCode=400;return f},um=(r=new Uint8Array,s)=>{if(r instanceof Uint8Array)return Promise.resolve(r);return s.streamCollector(r)||Promise.resolve(new Uint8Array)},tm={relation:"after",toMiddleware:"deserializerMiddleware",tags:["THROW_200_EXCEPTIONS","S3"],name:"throw200ExceptionsMiddleware",override:!0},qr=(r)=>({applyToStack:(s)=>{s.addRelativeTo(pm(r),tm)}});var _s=(r)=>typeof r==="string"&&r.indexOf("arn:")===0&&r.split(":").length>=6;function Wl(r){return(s,e)=>async(l)=>{if(r.bucketEndpoint){const f=e.endpointV2;if(f){const a=l.input.Bucket;if(typeof a==="string")try{const h=new URL(a);f.url=h}catch(h){const m=`@aws-sdk/middleware-sdk-s3: bucketEndpoint=true was set but Bucket=${a} could not be parsed as URL.`;if(e.logger?.constructor?.name==="NoOpLogger")console.warn(m);else e.logger?.warn?.(m);throw h}}}return s(l)}}var Vl={name:"bucketEndpointMiddleware",override:!0,relation:"after",toMiddleware:"endpointV2Middleware"};function rg({bucketEndpoint:r}){return(s)=>async(e)=>{const{input:{Bucket:l}}=e;if(!r&&typeof l==="string"&&!_s(l)&&l.indexOf("/")>=0){const f=new Error(`Bucket name shouldn't contain '/', received '${l}'`);throw f.name="InvalidBucketName",f}return s({...e})}}var sg={step:"initialize",tags:["VALIDATE_BUCKET_NAME"],name:"validateBucketNameMiddleware",override:!0},Ll=(r)=>({applyToStack:(s)=>{s.add(rg(r),sg),s.addRelativeTo(Wl(r),Vl)}});var Er=Z(Ys(),1);var Zl=(r)=>({...r,eventStreamMarshaller:r.eventStreamSerdeProvider(r)});var rs=Z(tr(),1);var jr={CrtSignerV4:null};class qs{constructor(r){this.sigv4Signer=new _r(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=jr.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 hr={["required"]:!1,["type"]:"String"},mr={["required"]:!0,default:!1,["type"]:"Boolean"},Mr={["required"]:!1,["type"]:"Boolean"},B={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"Accelerate"},!0]},E={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},I={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},y={["fn"]:"isSet",["argv"]:[{["ref"]:"Endpoint"}]},vf={["fn"]:"aws.partition",["argv"]:[{["ref"]:"Region"}],["assign"]:"partitionResult"},Xl={["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[{["ref"]:"partitionResult"},"name"]},"aws-cn"]},nr={["fn"]:"isSet",["argv"]:[{["ref"]:"Bucket"}]},K={["ref"]:"Bucket"},G={["fn"]:"parseURL",["argv"]:[{["ref"]:"Endpoint"}],["assign"]:"url"},or={["fn"]:"booleanEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[{["ref"]:"url"},"isIp"]},!0]},Cf={["ref"]:"url"},zf={["fn"]:"uriEncode",["argv"]:[K],["assign"]:"uri_encoded_bucket"},q={["backend"]:"S3Express",["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3express",["signingRegion"]:"{Region}"}]},w={},Ff={["fn"]:"aws.isVirtualHostableS3Bucket",["argv"]:[K,!1]},js={["error"]:"S3Express bucket name is not a valid virtual hostable name.",["type"]:"error"},pr={["backend"]:"S3Express",["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4-s3express",["signingName"]:"s3express",["signingRegion"]:"{Region}"}]},Jl={["fn"]:"isSet",["argv"]:[{["ref"]:"UseS3ExpressControlEndpoint"}]},Hl={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseS3ExpressControlEndpoint"},!0]},d={["fn"]:"not",["argv"]:[y]},Ql={["error"]:"Unrecognized S3Express bucket name format.",["type"]:"error"},Bl={["fn"]:"not",["argv"]:[nr]},Yl={["ref"]:"hardwareType"},Ol={["conditions"]:[d],["error"]:"Expected a endpoint to be specified but no endpoint was found",["type"]:"error"},ir={["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4a",["signingName"]:"s3-outposts",["signingRegionSet"]:["*"]},{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3-outposts",["signingRegion"]:"{Region}"}]},is={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"ForcePathStyle"},!1]},eg={["ref"]:"ForcePathStyle"},c={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"Accelerate"},!1]},U={["fn"]:"stringEquals",["argv"]:[{["ref"]:"Region"},"aws-global"]},C={["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3",["signingRegion"]:"us-east-1"}]},A={["fn"]:"not",["argv"]:[U]},z={["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"]:{}},M={["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3",["signingRegion"]:"{Region}"}]},F={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseGlobalEndpoint"},!1]},R={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!1]},ql={["url"]:"https://{Bucket}.s3-fips.{Region}.{partitionResult#dnsSuffix}",["properties"]:M,["headers"]:{}},S={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!1]},jl={["url"]:"https://{Bucket}.s3-accelerate.dualstack.{partitionResult#dnsSuffix}",["properties"]:M,["headers"]:{}},il={["url"]:"https://{Bucket}.s3.dualstack.{Region}.{partitionResult#dnsSuffix}",["properties"]:M,["headers"]:{}},bs={["fn"]:"booleanEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[Cf,"isIp"]},!1]},xs={["url"]:"{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}",["properties"]:M,["headers"]:{}},ke={["url"]:"{url#scheme}://{Bucket}.{url#authority}{url#path}",["properties"]:M,["headers"]:{}},bl={["endpoint"]:ke,["type"]:"endpoint"},os={["url"]:"https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}",["properties"]:M,["headers"]:{}},xl={["url"]:"https://{Bucket}.s3.{Region}.{partitionResult#dnsSuffix}",["properties"]:M,["headers"]:{}},br={["error"]:"Invalid region: region was not a valid DNS name.",["type"]:"error"},V={["ref"]:"bucketArn"},Gf={["ref"]:"arnType"},ns={["fn"]:"getAttr",["argv"]:[V,"service"]},Pe={["ref"]:"accessPointName"},ol={["conditions"]:[I],["error"]:"S3 Object Lambda does not support Dual-stack",["type"]:"error"},nl={["conditions"]:[B],["error"]:"S3 Object Lambda does not support S3 Accelerate",["type"]:"error"},pl={["conditions"]:[{["fn"]:"isSet",["argv"]:[{["ref"]:"DisableAccessPoints"}]},{["fn"]:"booleanEquals",["argv"]:[{["ref"]:"DisableAccessPoints"},!0]}],["error"]:"Access points are not supported for this operation",["type"]:"error"},ps={["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"},Kf={["fn"]:"getAttr",["argv"]:[{["ref"]:"bucketPartition"},"name"]},Wf={["fn"]:"getAttr",["argv"]:[V,"accountId"]},us={["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3-object-lambda",["signingRegion"]:"{bucketArn#region}"}]},ul={["error"]:"Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `{accessPointName}`",["type"]:"error"},ts={["error"]:"Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `{bucketArn#accountId}`",["type"]:"error"},re={["error"]:"Invalid region in ARN: `{bucketArn#region}` (invalid DNS name)",["type"]:"error"},se={["error"]:"Client was configured for partition `{partitionResult#name}` but ARN (`{Bucket}`) has `{bucketPartition#name}`",["type"]:"error"},tl={["error"]:"Invalid ARN: The ARN may only contain a single resource component after `accesspoint`.",["type"]:"error"},rf={["error"]:"Invalid ARN: Expected a resource of the format `accesspoint:<accesspoint name>` but no name was provided",["type"]:"error"},Ur={["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3",["signingRegion"]:"{bucketArn#region}"}]},sf={["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4a",["signingName"]:"s3-outposts",["signingRegionSet"]:["*"]},{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3-outposts",["signingRegion"]:"{bucketArn#region}"}]},ef={["fn"]:"aws.parseArn",["argv"]:[K]},lf={["url"]:"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:M,["headers"]:{}},ff={["url"]:"https://s3-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:M,["headers"]:{}},af={["url"]:"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:M,["headers"]:{}},ee={["url"]:"{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}",["properties"]:M,["headers"]:{}},hf={["url"]:"https://s3.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:M,["headers"]:{}},mf={["ref"]:"UseObjectLambdaEndpoint"},le={["authSchemes"]:[{["disableDoubleEncoding"]:!0,["name"]:"sigv4",["signingName"]:"s3-object-lambda",["signingRegion"]:"{Region}"}]},gf={["url"]:"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",["properties"]:M,["headers"]:{}},wf={["url"]:"https://s3-fips.{Region}.{partitionResult#dnsSuffix}",["properties"]:M,["headers"]:{}},df={["url"]:"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}",["properties"]:M,["headers"]:{}},fe={["url"]:"{url#scheme}://{url#authority}{url#path}",["properties"]:M,["headers"]:{}},Sf={["url"]:"https://s3.{Region}.{partitionResult#dnsSuffix}",["properties"]:M,["headers"]:{}},ae=[{["ref"]:"Region"}],lg=[{["ref"]:"Endpoint"}],fg=[K],he=[I],xr=[B],t=[y,G],Rf=[{["fn"]:"isSet",["argv"]:[{["ref"]:"DisableS3ExpressSessionAuth"}]},{["fn"]:"booleanEquals",["argv"]:[{["ref"]:"DisableS3ExpressSessionAuth"},!0]}],Af=[or],me=[zf],ge=[Ff],gr=[E],kf=[{["fn"]:"substring",["argv"]:[K,6,14,!0],["assign"]:"s3expressAvailabilityZoneId"},{["fn"]:"substring",["argv"]:[K,14,16,!0],["assign"]:"s3expressAvailabilityZoneDelim"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"s3expressAvailabilityZoneDelim"},"--"]}],Pf=[{["conditions"]:[E],["endpoint"]:{["url"]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.amazonaws.com",["properties"]:q,["headers"]:{}},["type"]:"endpoint"},{["endpoint"]:{["url"]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.amazonaws.com",["properties"]:q,["headers"]:{}},["type"]:"endpoint"}],If=[{["fn"]:"substring",["argv"]:[K,6,15,!0],["assign"]:"s3expressAvailabilityZoneId"},{["fn"]:"substring",["argv"]:[K,15,17,!0],["assign"]:"s3expressAvailabilityZoneDelim"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"s3expressAvailabilityZoneDelim"},"--"]}],Ef=[{["conditions"]:[E],["endpoint"]:{["url"]:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.amazonaws.com",["properties"]:pr,["headers"]:{}},["type"]:"endpoint"},{["endpoint"]:{["url"]:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.amazonaws.com",["properties"]:pr,["headers"]:{}},["type"]:"endpoint"}],ag=[nr],Nf=[{["fn"]:"isValidHostLabel",["argv"]:[{["ref"]:"outpostId"},!1]}],$f=[{["fn"]:"stringEquals",["argv"]:[{["ref"]:"regionPrefix"},"beta"]}],hg=["*"],b=[vf],Df=[{["fn"]:"isValidHostLabel",["argv"]:[{["ref"]:"Region"},!1]}],x=[{["fn"]:"stringEquals",["argv"]:[{["ref"]:"Region"},"us-east-1"]}],we=[{["fn"]:"stringEquals",["argv"]:[Gf,"accesspoint"]}],Tf=[{["fn"]:"getAttr",["argv"]:[V,"resourceId[1]"],["assign"]:"accessPointName"},{["fn"]:"not",["argv"]:[{["fn"]:"stringEquals",["argv"]:[Pe,""]}]}],mg=[V,"resourceId[1]"],de=[{["fn"]:"not",["argv"]:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[V,"region"]},""]}]}],cf=[{["fn"]:"not",["argv"]:[{["fn"]:"isSet",["argv"]:[{["fn"]:"getAttr",["argv"]:[V,"resourceId[2]"]}]}]}],gg=[V,"resourceId[2]"],Se=[{["fn"]:"aws.partition",["argv"]:[{["fn"]:"getAttr",["argv"]:[V,"region"]}],["assign"]:"bucketPartition"}],yf=[{["fn"]:"stringEquals",["argv"]:[Kf,{["fn"]:"getAttr",["argv"]:[{["ref"]:"partitionResult"},"name"]}]}],Re=[{["fn"]:"isValidHostLabel",["argv"]:[{["fn"]:"getAttr",["argv"]:[V,"region"]},!0]}],Ae=[{["fn"]:"isValidHostLabel",["argv"]:[Wf,!1]}],Mf=[{["fn"]:"isValidHostLabel",["argv"]:[Pe,!1]}],Uf=[{["fn"]:"isValidHostLabel",["argv"]:[{["ref"]:"Region"},!0]}],wg={version:"1.0",parameters:{Bucket:hr,Region:hr,UseFIPS:mr,UseDualStack:mr,Endpoint:hr,ForcePathStyle:mr,Accelerate:mr,UseGlobalEndpoint:mr,UseObjectLambdaEndpoint:Mr,Key:hr,Prefix:hr,CopySource:hr,DisableAccessPoints:Mr,DisableMultiRegionAccessPoints:mr,UseArnRegion:Mr,UseS3ExpressControlEndpoint:Mr,DisableS3ExpressSessionAuth:Mr},rules:[{["conditions"]:[{["fn"]:"isSet",["argv"]:ae}],rules:[{["conditions"]:[B,E],error:"Accelerate cannot be used with FIPS",["type"]:"error"},{["conditions"]:[I,y],error:"Cannot set dual-stack in combination with a custom endpoint.",["type"]:"error"},{["conditions"]:[y,E],error:"A custom endpoint cannot be combined with FIPS",["type"]:"error"},{["conditions"]:[y,B],error:"A custom endpoint cannot be combined with S3 Accelerate",["type"]:"error"},{["conditions"]:[E,vf,Xl],error:"Partition does not support FIPS",["type"]:"error"},{["conditions"]:[nr,{["fn"]:"substring",["argv"]:[K,0,6,!0],["assign"]:"bucketSuffix"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"bucketSuffix"},"--x-s3"]}],rules:[{["conditions"]:he,error:"S3Express does not support Dual-stack.",["type"]:"error"},{["conditions"]:xr,error:"S3Express does not support S3 Accelerate.",["type"]:"error"},{["conditions"]:t,rules:[{["conditions"]:Rf,rules:[{["conditions"]:Af,rules:[{["conditions"]:me,rules:[{endpoint:{["url"]:"{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}",["properties"]:q,["headers"]:w},["type"]:"endpoint"}],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:ge,rules:[{endpoint:{["url"]:"{url#scheme}://{Bucket}.{url#authority}{url#path}",["properties"]:q,["headers"]:w},["type"]:"endpoint"}],["type"]:"tree"},js],["type"]:"tree"},{["conditions"]:Af,rules:[{["conditions"]:me,rules:[{endpoint:{["url"]:"{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}",["properties"]:pr,["headers"]:w},["type"]:"endpoint"}],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:ge,rules:[{endpoint:{["url"]:"{url#scheme}://{Bucket}.{url#authority}{url#path}",["properties"]:pr,["headers"]:w},["type"]:"endpoint"}],["type"]:"tree"},js],["type"]:"tree"},{["conditions"]:[Jl,Hl],rules:[{["conditions"]:[zf,d],rules:[{["conditions"]:gr,endpoint:{["url"]:"https://s3express-control-fips.{Region}.amazonaws.com/{uri_encoded_bucket}",["properties"]:q,["headers"]:w},["type"]:"endpoint"},{endpoint:{["url"]:"https://s3express-control.{Region}.amazonaws.com/{uri_encoded_bucket}",["properties"]:q,["headers"]:w},["type"]:"endpoint"}],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:ge,rules:[{["conditions"]:Rf,rules:[{["conditions"]:kf,rules:Pf,["type"]:"tree"},{["conditions"]:If,rules:Pf,["type"]:"tree"},Ql],["type"]:"tree"},{["conditions"]:kf,rules:Ef,["type"]:"tree"},{["conditions"]:If,rules:Ef,["type"]:"tree"},Ql],["type"]:"tree"},js],["type"]:"tree"},{["conditions"]:[Bl,Jl,Hl],rules:[{["conditions"]:t,endpoint:{["url"]:"{url#scheme}://{url#authority}{url#path}",["properties"]:q,["headers"]:w},["type"]:"endpoint"},{["conditions"]:gr,endpoint:{["url"]:"https://s3express-control-fips.{Region}.amazonaws.com",["properties"]:q,["headers"]:w},["type"]:"endpoint"},{endpoint:{["url"]:"https://s3express-control.{Region}.amazonaws.com",["properties"]:q,["headers"]:w},["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[nr,{["fn"]:"substring",["argv"]:[K,49,50,!0],["assign"]:"hardwareType"},{["fn"]:"substring",["argv"]:[K,8,12,!0],["assign"]:"regionPrefix"},{["fn"]:"substring",["argv"]:[K,0,7,!0],["assign"]:"bucketAliasSuffix"},{["fn"]:"substring",["argv"]:[K,32,49,!0],["assign"]:"outpostId"},{["fn"]:"aws.partition",["argv"]:ae,["assign"]:"regionPartition"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"bucketAliasSuffix"},"--op-s3"]}],rules:[{["conditions"]:Nf,rules:[{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[Yl,"e"]}],rules:[{["conditions"]:$f,rules:[Ol,{["conditions"]:t,endpoint:{["url"]:"https://{Bucket}.ec2.{url#authority}",["properties"]:ir,["headers"]:w},["type"]:"endpoint"}],["type"]:"tree"},{endpoint:{["url"]:"https://{Bucket}.ec2.s3-outposts.{Region}.{regionPartition#dnsSuffix}",["properties"]:ir,["headers"]:w},["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[Yl,"o"]}],rules:[{["conditions"]:$f,rules:[Ol,{["conditions"]:t,endpoint:{["url"]:"https://{Bucket}.op-{outpostId}.{url#authority}",["properties"]:ir,["headers"]:w},["type"]:"endpoint"}],["type"]:"tree"},{endpoint:{["url"]:"https://{Bucket}.op-{outpostId}.s3-outposts.{Region}.{regionPartition#dnsSuffix}",["properties"]:ir,["headers"]:w},["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"]:ag,rules:[{["conditions"]:[y,{["fn"]:"not",["argv"]:[{["fn"]:"isSet",["argv"]:[{["fn"]:"parseURL",["argv"]:lg}]}]}],error:"Custom endpoint `{Endpoint}` was not a valid URI",["type"]:"error"},{["conditions"]:[is,Ff],rules:[{["conditions"]:b,rules:[{["conditions"]:Df,rules:[{["conditions"]:[B,Xl],error:"S3 Accelerate cannot be used in this region",["type"]:"error"},{["conditions"]:[I,E,c,d,U],endpoint:{["url"]:"https://{Bucket}.s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}",["properties"]:C,["headers"]:w},["type"]:"endpoint"},{["conditions"]:[I,E,c,d,A,z],rules:[{endpoint:_l,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[I,E,c,d,A,F],endpoint:_l,["type"]:"endpoint"},{["conditions"]:[R,E,c,d,U],endpoint:{["url"]:"https://{Bucket}.s3-fips.us-east-1.{partitionResult#dnsSuffix}",["properties"]:C,["headers"]:w},["type"]:"endpoint"},{["conditions"]:[R,E,c,d,A,z],rules:[{endpoint:ql,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[R,E,c,d,A,F],endpoint:ql,["type"]:"endpoint"},{["conditions"]:[I,S,B,d,U],endpoint:{["url"]:"https://{Bucket}.s3-accelerate.dualstack.us-east-1.{partitionResult#dnsSuffix}",["properties"]:C,["headers"]:w},["type"]:"endpoint"},{["conditions"]:[I,S,B,d,A,z],rules:[{endpoint:jl,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[I,S,B,d,A,F],endpoint:jl,["type"]:"endpoint"},{["conditions"]:[I,S,c,d,U],endpoint:{["url"]:"https://{Bucket}.s3.dualstack.us-east-1.{partitionResult#dnsSuffix}",["properties"]:C,["headers"]:w},["type"]:"endpoint"},{["conditions"]:[I,S,c,d,A,z],rules:[{endpoint:il,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[I,S,c,d,A,F],endpoint:il,["type"]:"endpoint"},{["conditions"]:[R,S,c,y,G,or,U],endpoint:{["url"]:"{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}",["properties"]:C,["headers"]:w},["type"]:"endpoint"},{["conditions"]:[R,S,c,y,G,bs,U],endpoint:{["url"]:"{url#scheme}://{Bucket}.{url#authority}{url#path}",["properties"]:C,["headers"]:w},["type"]:"endpoint"},{["conditions"]:[R,S,c,y,G,or,A,z],rules:[{["conditions"]:x,endpoint:xs,["type"]:"endpoint"},{endpoint:xs,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[R,S,c,y,G,bs,A,z],rules:[{["conditions"]:x,endpoint:ke,["type"]:"endpoint"},bl],["type"]:"tree"},{["conditions"]:[R,S,c,y,G,or,A,F],endpoint:xs,["type"]:"endpoint"},{["conditions"]:[R,S,c,y,G,bs,A,F],endpoint:ke,["type"]:"endpoint"},{["conditions"]:[R,S,B,d,U],endpoint:{["url"]:"https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}",["properties"]:C,["headers"]:w},["type"]:"endpoint"},{["conditions"]:[R,S,B,d,A,z],rules:[{["conditions"]:x,endpoint:os,["type"]:"endpoint"},{endpoint:os,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[R,S,B,d,A,F],endpoint:os,["type"]:"endpoint"},{["conditions"]:[R,S,c,d,U],endpoint:{["url"]:"https://{Bucket}.s3.{partitionResult#dnsSuffix}",["properties"]:C,["headers"]:w},["type"]:"endpoint"},{["conditions"]:[R,S,c,d,A,z],rules:[{["conditions"]:x,endpoint:{["url"]:"https://{Bucket}.s3.{partitionResult#dnsSuffix}",["properties"]:M,["headers"]:w},["type"]:"endpoint"},{endpoint:xl,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[R,S,c,d,A,F],endpoint:xl,["type"]:"endpoint"}],["type"]:"tree"},br],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:[y,G,{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[Cf,"scheme"]},"http"]},{["fn"]:"aws.isVirtualHostableS3Bucket",["argv"]:[K,!0]},is,S,R,c],rules:[{["conditions"]:b,rules:[{["conditions"]:Df,rules:[bl],["type"]:"tree"},br],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:[is,{["fn"]:"aws.parseArn",["argv"]:fg,["assign"]:"bucketArn"}],rules:[{["conditions"]:[{["fn"]:"getAttr",["argv"]:[V,"resourceId[0]"],["assign"]:"arnType"},{["fn"]:"not",["argv"]:[{["fn"]:"stringEquals",["argv"]:[Gf,""]}]}],rules:[{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[ns,"s3-object-lambda"]}],rules:[{["conditions"]:we,rules:[{["conditions"]:Tf,rules:[ol,nl,{["conditions"]:de,rules:[pl,{["conditions"]:cf,rules:[ps,{["conditions"]:Se,rules:[{["conditions"]:b,rules:[{["conditions"]:yf,rules:[{["conditions"]:Re,rules:[{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[Wf,""]}],error:"Invalid ARN: Missing account id",["type"]:"error"},{["conditions"]:Ae,rules:[{["conditions"]:Mf,rules:[{["conditions"]:t,endpoint:{["url"]:"{url#scheme}://{accessPointName}-{bucketArn#accountId}.{url#authority}{url#path}",["properties"]:us,["headers"]:w},["type"]:"endpoint"},{["conditions"]:gr,endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}",["properties"]:us,["headers"]:w},["type"]:"endpoint"},{endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda.{bucketArn#region}.{bucketPartition#dnsSuffix}",["properties"]:us,["headers"]:w},["type"]:"endpoint"}],["type"]:"tree"},ul],["type"]:"tree"},ts],["type"]:"tree"},re],["type"]:"tree"},se],["type"]:"tree"}],["type"]:"tree"}],["type"]:"tree"},tl],["type"]:"tree"},{error:"Invalid ARN: bucket ARN is missing a region",["type"]:"error"}],["type"]:"tree"},rf],["type"]:"tree"},{error:"Invalid ARN: Object Lambda ARNs only support `accesspoint` arn types, but found: `{arnType}`",["type"]:"error"}],["type"]:"tree"},{["conditions"]:we,rules:[{["conditions"]:Tf,rules:[{["conditions"]:de,rules:[{["conditions"]:we,rules:[{["conditions"]:de,rules:[pl,{["conditions"]:cf,rules:[ps,{["conditions"]:Se,rules:[{["conditions"]:b,rules:[{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[Kf,"{partitionResult#name}"]}],rules:[{["conditions"]:Re,rules:[{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[ns,"s3"]}],rules:[{["conditions"]:Ae,rules:[{["conditions"]:Mf,rules:[{["conditions"]:xr,error:"Access Points do not support S3 Accelerate",["type"]:"error"},{["conditions"]:[E,I],endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}",["properties"]:Ur,["headers"]:w},["type"]:"endpoint"},{["conditions"]:[E,R],endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}",["properties"]:Ur,["headers"]:w},["type"]:"endpoint"},{["conditions"]:[S,I],endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}",["properties"]:Ur,["headers"]:w},["type"]:"endpoint"},{["conditions"]:[S,R,y,G],endpoint:{["url"]:"{url#scheme}://{accessPointName}-{bucketArn#accountId}.{url#authority}{url#path}",["properties"]:Ur,["headers"]:w},["type"]:"endpoint"},{["conditions"]:[S,R],endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.{bucketArn#region}.{bucketPartition#dnsSuffix}",["properties"]:Ur,["headers"]:w},["type"]:"endpoint"}],["type"]:"tree"},ul],["type"]:"tree"},ts],["type"]:"tree"},{error:"Invalid ARN: The ARN was not for the S3 service, found: {bucketArn#service}",["type"]:"error"}],["type"]:"tree"},re],["type"]:"tree"},se],["type"]:"tree"}],["type"]:"tree"}],["type"]:"tree"},tl],["type"]:"tree"}],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:[{["fn"]:"isValidHostLabel",["argv"]:[Pe,!0]}],rules:[{["conditions"]:he,error:"S3 MRAP does not support dual-stack",["type"]:"error"},{["conditions"]:gr,error:"S3 MRAP does not support FIPS",["type"]:"error"},{["conditions"]:xr,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"]:ae,["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"]:hg}]},["headers"]:w},["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"},rf],["type"]:"tree"},{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[ns,"s3-outposts"]}],rules:[{["conditions"]:he,error:"S3 Outposts does not support Dual-stack",["type"]:"error"},{["conditions"]:gr,error:"S3 Outposts does not support FIPS",["type"]:"error"},{["conditions"]:xr,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"]:mg,["assign"]:"outpostId"}],rules:[{["conditions"]:Nf,rules:[ps,{["conditions"]:Se,rules:[{["conditions"]:b,rules:[{["conditions"]:yf,rules:[{["conditions"]:Re,rules:[{["conditions"]:Ae,rules:[{["conditions"]:[{["fn"]:"getAttr",["argv"]:gg,["assign"]:"outpostType"}],rules:[{["conditions"]:[{["fn"]:"getAttr",["argv"]:[V,"resourceId[3]"],["assign"]:"accessPointName"}],rules:[{["conditions"]:[{["fn"]:"stringEquals",["argv"]:[{["ref"]:"outpostType"},"accesspoint"]}],rules:[{["conditions"]:t,endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.{url#authority}",["properties"]:sf,["headers"]:w},["type"]:"endpoint"},{endpoint:{["url"]:"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.s3-outposts.{bucketArn#region}.{bucketPartition#dnsSuffix}",["properties"]:sf,["headers"]:w},["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"},ts],["type"]:"tree"},re],["type"]:"tree"},se],["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"]:[K,0,4,!1],["assign"]:"arnPrefix"},{["fn"]:"stringEquals",["argv"]:[{["ref"]:"arnPrefix"},"arn:"]},{["fn"]:"not",["argv"]:[{["fn"]:"isSet",["argv"]:[ef]}]}],error:"Invalid ARN: `{Bucket}` was not a valid ARN",["type"]:"error"},{["conditions"]:[{["fn"]:"booleanEquals",["argv"]:[eg,!0]},ef],error:"Path-style addressing cannot be used with ARN buckets",["type"]:"error"},{["conditions"]:me,rules:[{["conditions"]:b,rules:[{["conditions"]:[c],rules:[{["conditions"]:[I,d,E,U],endpoint:{["url"]:"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:C,["headers"]:w},["type"]:"endpoint"},{["conditions"]:[I,d,E,A,z],rules:[{endpoint:lf,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[I,d,E,A,F],endpoint:lf,["type"]:"endpoint"},{["conditions"]:[R,d,E,U],endpoint:{["url"]:"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:C,["headers"]:w},["type"]:"endpoint"},{["conditions"]:[R,d,E,A,z],rules:[{endpoint:ff,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[R,d,E,A,F],endpoint:ff,["type"]:"endpoint"},{["conditions"]:[I,d,S,U],endpoint:{["url"]:"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:C,["headers"]:w},["type"]:"endpoint"},{["conditions"]:[I,d,S,A,z],rules:[{endpoint:af,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[I,d,S,A,F],endpoint:af,["type"]:"endpoint"},{["conditions"]:[R,y,G,S,U],endpoint:{["url"]:"{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}",["properties"]:C,["headers"]:w},["type"]:"endpoint"},{["conditions"]:[R,y,G,S,A,z],rules:[{["conditions"]:x,endpoint:ee,["type"]:"endpoint"},{endpoint:ee,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[R,y,G,S,A,F],endpoint:ee,["type"]:"endpoint"},{["conditions"]:[R,d,S,U],endpoint:{["url"]:"https://s3.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:C,["headers"]:w},["type"]:"endpoint"},{["conditions"]:[R,d,S,A,z],rules:[{["conditions"]:x,endpoint:{["url"]:"https://s3.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",["properties"]:M,["headers"]:w},["type"]:"endpoint"},{endpoint:hf,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[R,d,S,A,F],endpoint:hf,["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"]:[mf]},{["fn"]:"booleanEquals",["argv"]:[mf,!0]}],rules:[{["conditions"]:b,rules:[{["conditions"]:Uf,rules:[ol,nl,{["conditions"]:t,endpoint:{["url"]:"{url#scheme}://{url#authority}{url#path}",["properties"]:le,["headers"]:w},["type"]:"endpoint"},{["conditions"]:gr,endpoint:{["url"]:"https://s3-object-lambda-fips.{Region}.{partitionResult#dnsSuffix}",["properties"]:le,["headers"]:w},["type"]:"endpoint"},{endpoint:{["url"]:"https://s3-object-lambda.{Region}.{partitionResult#dnsSuffix}",["properties"]:le,["headers"]:w},["type"]:"endpoint"}],["type"]:"tree"},br],["type"]:"tree"}],["type"]:"tree"},{["conditions"]:[Bl],rules:[{["conditions"]:b,rules:[{["conditions"]:Uf,rules:[{["conditions"]:[E,I,d,U],endpoint:{["url"]:"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}",["properties"]:C,["headers"]:w},["type"]:"endpoint"},{["conditions"]:[E,I,d,A,z],rules:[{endpoint:gf,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[E,I,d,A,F],endpoint:gf,["type"]:"endpoint"},{["conditions"]:[E,R,d,U],endpoint:{["url"]:"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}",["properties"]:C,["headers"]:w},["type"]:"endpoint"},{["conditions"]:[E,R,d,A,z],rules:[{endpoint:wf,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[E,R,d,A,F],endpoint:wf,["type"]:"endpoint"},{["conditions"]:[S,I,d,U],endpoint:{["url"]:"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}",["properties"]:C,["headers"]:w},["type"]:"endpoint"},{["conditions"]:[S,I,d,A,z],rules:[{endpoint:df,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[S,I,d,A,F],endpoint:df,["type"]:"endpoint"},{["conditions"]:[S,R,y,G,U],endpoint:{["url"]:"{url#scheme}://{url#authority}{url#path}",["properties"]:C,["headers"]:w},["type"]:"endpoint"},{["conditions"]:[S,R,y,G,A,z],rules:[{["conditions"]:x,endpoint:fe,["type"]:"endpoint"},{endpoint:fe,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[S,R,y,G,A,F],endpoint:fe,["type"]:"endpoint"},{["conditions"]:[S,R,d,U],endpoint:{["url"]:"https://s3.{partitionResult#dnsSuffix}",["properties"]:C,["headers"]:w},["type"]:"endpoint"},{["conditions"]:[S,R,d,A,z],rules:[{["conditions"]:x,endpoint:{["url"]:"https://s3.{partitionResult#dnsSuffix}",["properties"]:M,["headers"]:w},["type"]:"endpoint"},{endpoint:Sf,["type"]:"endpoint"}],["type"]:"tree"},{["conditions"]:[S,R,d,A,F],endpoint:Sf,["type"]:"endpoint"}],["type"]:"tree"},br],["type"]:"tree"}],["type"]:"tree"}],["type"]:"tree"},{error:"A region must be set when sending requests to S3.",["type"]:"error"}]},Vf=wg;var ur=(r,s={})=>{return Zf(Vf,{endpointParams:r,logger:s.logger})};Lf.aws=Xf;var Bf=function(r){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"s3",region:r.region},propertiesExtractor:(s,e)=>({signingProperties:{config:s,context:e}})}},Yf=function(r){return{schemeId:"aws.auth#sigv4a",signingProperties:{name:"s3",region:r.region},propertiesExtractor:(s,e)=>({signingProperties:{config:s,context:e}})}},dg=(r)=>async(s,e,l)=>{if(!l)throw new Error("Could not find \`input\` for \`defaultEndpointRuleSetHttpAuthSchemeParametersProvider\`");const f=await r(s,e,l),a=yr(e)?.commandInstance?.constructor?.getEndpointParameterInstructions;if(!a)throw new Error(`getEndpointParameterInstructions() is not defined on \`${e.commandName}\``);const h=await Hf(l,{getEndpointParameterInstructions:a},s);return Object.assign(f,h)},Sg=async(r,s,e)=>{return{operation:yr(s).operation,region:await Jf(r.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},Qf=dg(Sg),Rg=(r,s,e)=>{return(f)=>{const h=r(f).properties?.authSchemes;if(!h)return s(f);const m=[];for(let g of h){const{name:k,properties:N={},...D}=g,$=k.toLowerCase();if(k!==$)console.warn(`HttpAuthScheme has been normalized with lowercasing: \`${k}\` to \`${$}\``);let X;if($==="sigv4a"){X="aws.auth#sigv4a";const Jr=h.find((_)=>{const Dr=_.name.toLowerCase();return Dr!=="sigv4a"&&Dr.startsWith("sigv4")});if(!jr.CrtSignerV4&&Jr)continue}else if($.startsWith("sigv4"))X="aws.auth#sigv4";else throw new Error(`Unknown HttpAuthScheme found in \`@smithy.rules#endpointRuleSet\`: \`${$}\``);const J=e[X];if(!J)throw new Error(`Could not find HttpAuthOption create function for \`${X}\``);const Q=J(f);Q.schemeId=X,Q.signingProperties={...Q.signingProperties||{},...D,...N},m.push(Q)}return m}},Ag=(r)=>{const s=[];switch(r.operation){default:s.push(Bf(r)),s.push(Yf(r))}return s},Of=Rg(ur,Ag,{"aws.auth#sigv4":Bf,"aws.auth#sigv4a":Yf}),_f=(r)=>{const s=rs.resolveAwsSdkSigV4Config(r);return{...rs.resolveAwsSdkSigV4AConfig(s)}};var qf=(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"}},wr={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 W extends jf{constructor(r){super(r);Object.setPrototypeOf(this,W.prototype)}}class ss extends W{constructor(r){super({name:"NoSuchUpload",$fault:"client",...r});this.name="NoSuchUpload",this.$fault="client",Object.setPrototypeOf(this,ss.prototype)}}class es extends W{constructor(r){super({name:"ObjectNotInActiveTierError",$fault:"client",...r});this.name="ObjectNotInActiveTierError",this.$fault="client",Object.setPrototypeOf(this,es.prototype)}}class ls extends W{constructor(r){super({name:"BucketAlreadyExists",$fault:"client",...r});this.name="BucketAlreadyExists",this.$fault="client",Object.setPrototypeOf(this,ls.prototype)}}class fs extends W{constructor(r){super({name:"BucketAlreadyOwnedByYou",$fault:"client",...r});this.name="BucketAlreadyOwnedByYou",this.$fault="client",Object.setPrototypeOf(this,fs.prototype)}}class as extends W{constructor(r){super({name:"NoSuchBucket",$fault:"client",...r});this.name="NoSuchBucket",this.$fault="client",Object.setPrototypeOf(this,as.prototype)}}var Ie;(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])}})(Ie||(Ie={}));var Ee;(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])}})(Ee||(Ee={}));var Ne;(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])}})(Ne||(Ne={}));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 hs extends W{constructor(r){super({name:"InvalidObjectState",$fault:"client",...r});this.name="InvalidObjectState",this.$fault="client",Object.setPrototypeOf(this,hs.prototype),this.StorageClass=r.StorageClass,this.AccessTier=r.AccessTier}}class ms extends W{constructor(r){super({name:"NoSuchKey",$fault:"client",...r});this.name="NoSuchKey",this.$fault="client",Object.setPrototypeOf(this,ms.prototype)}}class gs extends W{constructor(r){super({name:"NotFound",$fault:"client",...r});this.name="NotFound",this.$fault="client",Object.setPrototypeOf(this,gs.prototype)}}var kg=(r)=>({...r,...r.SecretAccessKey&&{SecretAccessKey:Y},...r.SessionToken&&{SessionToken:Y}}),bf=(r)=>({...r,...r.Credentials&&{Credentials:kg(r.Credentials)}});var xf=(r)=>({...r,...r.SSEKMSKeyId&&{SSEKMSKeyId:Y}}),of=(r)=>({...r,...r.SSECustomerKey&&{SSECustomerKey:Y}});var Rr=Z(tr(),1);var As=Z(Ys(),1);class ws extends W{constructor(r){super({name:"ObjectAlreadyInActiveTierError",$fault:"client",...r});this.name="ObjectAlreadyInActiveTierError",this.$fault="client",Object.setPrototypeOf(this,ws.prototype)}}var nf;(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])}})(nf||(nf={}));var pf=(r)=>({...r,...r.SSEKMSKeyId&&{SSEKMSKeyId:Y},...r.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:Y}}),uf=(r)=>({...r,...r.SSECustomerKey&&{SSECustomerKey:Y},...r.SSEKMSKeyId&&{SSEKMSKeyId:Y},...r.SSEKMSEncryptionContext&&{SSEKMSEncryptionContext:Y}});var Sa=async(r,s)=>{const e=As.requestBuilder(r,s),l=v({},j,{[yw]:r[rw]});e.bp("/"),e.p("Bucket",()=>r.Bucket,"{Bucket}",!1);const f=v({[$w]:[,""]});let a;return e.m("GET").h(l).q(f).b(a),e.build()};var Ra=async(r,s)=>{const e=As.requestBuilder(r,s),l=v({},j,{[mw]:r[Qg],[gw]:[()=>j(r[tf]),()=>vr(r[tf]).toString()],[ww]:r[Bg],[dw]:[()=>j(r[ra]),()=>vr(r[ra]).toString()],[Rw]:r[jg],[Is]:r[ks],[ja]:r[za],[Es]:r[Ps],[Oa]:r[Ca],[Ha]:r[ca],[cw]:r[Gg]});e.bp("/{Key+}"),e.p("Bucket",()=>r.Bucket,"{Bucket}",!1),e.p("Key",()=>r.Key,"{Key+}",!0);const f=v({[xa]:[,"GetObject"],[Aw]:[,r[ig]],[kw]:[,r[bg]],[Pw]:[,r[xg]],[Iw]:[,r[og]],[Ew]:[,r[ng]],[Nw]:[()=>r.ResponseExpires!==void 0,()=>vr(r[pg]).toString()],[Dw]:[,r[Qe]],[Sw]:[()=>r.PartNumber!==void 0,()=>r[qg].toString()]});let a;return e.m("GET").h(l).q(f).b(a),e.build()};var Aa=async(r,s)=>{const e=As.requestBuilder(r,s),l=v({},j,{[Za]:r[Ta]||"application/octet-stream",[Tw]:r[Cg],[Ka]:r[Ea],[Wa]:r[Na],[Va]:r[$a],[La]:r[Da],[ze]:[()=>j(r[Ue]),()=>r[Ue].toString()],[fw]:r[Kg],[Gw]:r[Fg],[Be]:r[Ve],[Ye]:r[Le],[Oe]:r[Ze],[_e]:r[Xe],[Fe]:[()=>j(r[ve]),()=>vr(r[ve]).toString()],[Mw]:r[Zg],[Uw]:r[Xg],[vw]:r[Jg],[Cw]:r[Hg],[qe]:r[Je],[_a]:r[zr],[ba]:r[Ga],[Is]:r[ks],[ja]:r[za],[Es]:r[Ps],[je]:r[He],[qa]:r[Fa],[Fr]:[()=>j(r[Rs]),()=>r[Rs].toString()],[Oa]:r[Ca],[Kw]:r[sw],[Ba]:r[Ua],[Ge]:[()=>j(r[Ce]),()=>da(r[Ce]).toString()],[Qa]:r[Ma],[Ha]:r[ca],...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 f=v({[xa]:[,"PutObject"]});let a,h;if(r.Body!==void 0)h=r.Body,a=h;return e.m("PUT").h(l).q(f).b(a),e.build()};var ka=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return We(r,s);const e=v({$metadata:H(r)}),l=dr(ma(await Rr.parseXmlBody(r.body,s)),"body");if(l[ce]!=null)e[ce]=vg(l[ce],s);return e};var Pa=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return We(r,s);const e=v({$metadata:H(r),[Vg]:[()=>r.headers[ea]!==void 0,()=>Ss(r.headers[ea])],[zg]:[,r.headers[lw]],[Cr]:[,r.headers[Ja]],[tg]:[,r.headers[zw]],[Yg]:[()=>r.headers[sa]!==void 0,()=>dr(Tr(r.headers[sa]))],[Ue]:[()=>r.headers[ze]!==void 0,()=>ga(r.headers[ze])],[ya]:[,r.headers[Xa]],[Ve]:[,r.headers[Be]],[Le]:[,r.headers[Ye]],[Ze]:[,r.headers[Oe]],[Xe]:[,r.headers[_e]],[Og]:[()=>r.headers[la]!==void 0,()=>ds(r.headers[la])],[Qe]:[,r.headers[ia]],[Ea]:[,r.headers[Ka]],[Na]:[,r.headers[Wa]],[$a]:[,r.headers[Va]],[Da]:[,r.headers[La]],[Wg]:[,r.headers[aw]],[Ta]:[,r.headers[Za]],[ve]:[()=>r.headers[Fe]!==void 0,()=>dr(Tr(r.headers[Fe]))],[Lg]:[,r.headers[hw]],[Ga]:[,r.headers[ba]],[Je]:[,r.headers[qe]],[ks]:[,r.headers[Is]],[Ps]:[,r.headers[Es]],[He]:[,r.headers[je]],[Rs]:[()=>r.headers[Fr]!==void 0,()=>Ss(r.headers[Fr])],[zr]:[,r.headers[_a]],[va]:[,r.headers[Ya]],[ug]:[,r.headers[Fw]],[_g]:[()=>r.headers[fa]!==void 0,()=>ds(r.headers[fa])],[ew]:[()=>r.headers[aa]!==void 0,()=>ds(r.headers[aa])],[Ua]:[,r.headers[Ba]],[Ce]:[()=>r.headers[Ge]!==void 0,()=>dr(Ke(r.headers[Ge]))],[Ma]:[,r.headers[Qa]],Metadata:[,Object.keys(r.headers).filter((f)=>f.startsWith("x-amz-meta-")).reduce((f,a)=>{return f[a.substring(11)]=r.headers[a],f},{})]}),l=r.body;return s.sdkStreamMixin(l),e.Body=l,e};var Ia=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return We(r,s);const e=v({$metadata:H(r),[Cr]:[,r.headers[Ja]],[ya]:[,r.headers[Xa]],[Ve]:[,r.headers[Be]],[Le]:[,r.headers[Ye]],[Ze]:[,r.headers[Oe]],[Xe]:[,r.headers[_e]],[Je]:[,r.headers[qe]],[Qe]:[,r.headers[ia]],[ks]:[,r.headers[Is]],[Ps]:[,r.headers[Es]],[He]:[,r.headers[je]],[Fa]:[,r.headers[qa]],[Rs]:[()=>r.headers[Fr]!==void 0,()=>Ss(r.headers[Fr])],[va]:[,r.headers[Ya]]});return await ha(r.body,s),e};var We=async(r,s)=>{const e={...r,body:await Rr.parseXmlErrorBody(r.body,s)},l=Rr.loadRestXmlErrorCode(r,e.body);switch(l){case"NoSuchUpload":case"com.amazonaws.s3#NoSuchUpload":throw await cg(e,s);case"ObjectNotInActiveTierError":case"com.amazonaws.s3#ObjectNotInActiveTierError":throw await Ug(e,s);case"BucketAlreadyExists":case"com.amazonaws.s3#BucketAlreadyExists":throw await Eg(e,s);case"BucketAlreadyOwnedByYou":case"com.amazonaws.s3#BucketAlreadyOwnedByYou":throw await Ng(e,s);case"NoSuchBucket":case"com.amazonaws.s3#NoSuchBucket":throw await Dg(e,s);case"InvalidObjectState":case"com.amazonaws.s3#InvalidObjectState":throw await $g(e,s);case"NoSuchKey":case"com.amazonaws.s3#NoSuchKey":throw await Tg(e,s);case"NotFound":case"com.amazonaws.s3#NotFound":throw await yg(e,s);case"ObjectAlreadyInActiveTierError":case"com.amazonaws.s3#ObjectAlreadyInActiveTierError":throw await Mg(e,s);default:const f=e.body;return Ig({output:r,parsedBody:f,errorCode:l})}},Ig=wa(W),Eg=async(r,s)=>{const e=v({}),l=r.body,f=new ls({$metadata:H(r),...e});return O(f,r.body)},Ng=async(r,s)=>{const e=v({}),l=r.body,f=new fs({$metadata:H(r),...e});return O(f,r.body)},$g=async(r,s)=>{const e=v({}),l=r.body;if(l[Te]!=null)e[Te]=Sr(l[Te]);if(l[zr]!=null)e[zr]=Sr(l[zr]);const f=new hs({$metadata:H(r),...e});return O(f,r.body)},Dg=async(r,s)=>{const e=v({}),l=r.body,f=new as({$metadata:H(r),...e});return O(f,r.body)},Tg=async(r,s)=>{const e=v({}),l=r.body,f=new ms({$metadata:H(r),...e});return O(f,r.body)},cg=async(r,s)=>{const e=v({}),l=r.body,f=new ss({$metadata:H(r),...e});return O(f,r.body)},yg=async(r,s)=>{const e=v({}),l=r.body,f=new gs({$metadata:H(r),...e});return O(f,r.body)},Mg=async(r,s)=>{const e=v({}),l=r.body,f=new ws({$metadata:H(r),...e});return O(f,r.body)},Ug=async(r,s)=>{const e=v({}),l=r.body,f=new es({$metadata:H(r),...e});return O(f,r.body)};var vg=(r,s)=>{const e={};if(r[De]!=null)e[De]=Sr(r[De]);if(r[ye]!=null)e[ye]=Sr(r[ye]);if(r[Me]!=null)e[Me]=Sr(r[Me]);if(r[Cr]!=null)e[Cr]=dr(Ke(r[Cr]));return e};var H=(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 j=(r)=>r!==void 0&&r!==null&&r!==""&&(!Object.getOwnPropertyNames(r).includes("length")||r.length!=0)&&(!Object.getOwnPropertyNames(r).includes("size")||r.size!=0);var Cg="ACL";var De="AccessKeyId";var zg="AcceptRanges";var Te="AccessTier";var Rs="BucketKeyEnabled";var ce="Credentials",Fg="ChecksumAlgorithm";var Ea="CacheControl",Ve="ChecksumCRC32",Le="ChecksumCRC32C",Na="ContentDisposition";var $a="ContentEncoding";var Da="ContentLanguage",Ue="ContentLength",Gg="ChecksumMode",Kg="ContentMD5";var Wg="ContentRange";var Ze="ChecksumSHA1",Xe="ChecksumSHA256";var Ta="ContentType";var Vg="DeleteMarker";var ve="Expires";var ca="ExpectedBucketOwner";var Lg="ExpiresString";var ya="ETag";var Cr="Expiration";var Zg="GrantFullControl";var Xg="GrantRead",Jg="GrantReadACP";var Hg="GrantWriteACP";var Qg="IfMatch",tf="IfModifiedSince",Bg="IfNoneMatch";var ra="IfUnmodifiedSince";var Yg="LastModified";var Og="MissingMeta";var Ma="ObjectLockLegalHoldStatus",Ua="ObjectLockMode";var Ce="ObjectLockRetainUntilDate";var _g="PartsCount";var qg="PartNumber";var jg="Range";var va="RequestCharged",ig="ResponseCacheControl",bg="ResponseContentDisposition",xg="ResponseContentEncoding",og="ResponseContentLanguage",ng="ResponseContentType";var pg="ResponseExpires";var Ca="RequestPayer";var ug="ReplicationStatus";var tg="Restore";var ye="SecretAccessKey";var zr="StorageClass";var rw="SessionMode";var Je="ServerSideEncryption";var ks="SSECustomerAlgorithm",za="SSECustomerKey",Ps="SSECustomerKeyMD5";var Fa="SSEKMSEncryptionContext",He="SSEKMSKeyId";var Me="SessionToken";var sw="Tagging";var ew="TagCount";var Qe="VersionId";var Ga="WebsiteRedirectLocation";var lw="accept-ranges";var Ka="cache-control",Wa="content-disposition",Va="content-encoding",La="content-language",ze="content-length",fw="content-md5",aw="content-range",Za="content-type";var Fe="expires";var Xa="etag",hw="expiresstring";var mw="if-match",gw="if-modified-since";var ww="if-none-match";var dw="if-unmodified-since";var sa="last-modified";var Sw="partNumber";var Rw="range",Aw="response-cache-control",kw="response-content-disposition",Pw="response-content-encoding",Iw="response-content-language",Ew="response-content-type",Nw="response-expires";var $w="session";var Dw="versionId";var Tw="x-amz-acl";var Be="x-amz-checksum-crc32",Ye="x-amz-checksum-crc32c",cw="x-amz-checksum-mode";var Oe="x-amz-checksum-sha1",_e="x-amz-checksum-sha256";var yw="x-amz-create-session-mode";var ea="x-amz-delete-marker",Ja="x-amz-expiration",Ha="x-amz-expected-bucket-owner";var Mw="x-amz-grant-full-control",Uw="x-amz-grant-read",vw="x-amz-grant-read-acp";var Cw="x-amz-grant-write-acp";var la="x-amz-missing-meta";var fa="x-amz-mp-parts-count";var Qa="x-amz-object-lock-legal-hold",Ba="x-amz-object-lock-mode",Ge="x-amz-object-lock-retain-until-date";var zw="x-amz-restore",Ya="x-amz-request-charged";var Oa="x-amz-request-payer";var Fw="x-amz-replication-status";var _a="x-amz-storage-class",Gw="x-amz-sdk-checksum-algorithm";var qe="x-amz-server-side-encryption",je="x-amz-server-side-encryption-aws-kms-key-id",Fr="x-amz-server-side-encryption-bucket-key-enabled",qa="x-amz-server-side-encryption-context",Is="x-amz-server-side-encryption-customer-algorithm",ja="x-amz-server-side-encryption-customer-key",Es="x-amz-server-side-encryption-customer-key-md5",Kw="x-amz-tagging",aa="x-amz-tagging-count";var ia="x-amz-version-id",ba="x-amz-website-redirect-location",xa="x-id";class ie extends Ar.classBuilder().ep({...wr,DisableS3ExpressSessionAuth:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(r,s,e,l){return[kr(e,this.serialize,this.deserialize),Pr(e,r.getEndpointParameterInstructions()),qr(e)]}).s("AmazonS3","CreateSession",{}).n("S3Client","CreateSessionCommand").f(void 0,bf).ser(Sa).de(ka).build(){}var oa={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 vs=Z(tr(),1);var Vw="AWS_S3_USE_ARN_REGION",Lw="s3_use_arn_region",na={environmentVariableSelector:(r)=>p(r,Vw,u.ENV),configFileSelector:(r)=>p(r,Lw,u.CONFIG),default:!1};var pa=Z(qw(),1),{__extends:zR,__assign:FR,__rest:GR,__decorate:KR,__param:WR,__esDecorate:VR,__runInitializers:LR,__propKey:ZR,__setFunctionName:XR,__metadata:JR,__awaiter:Ns,__generator:$s,__exportStar:HR,__createBinding:QR,__values:Ds,__read:BR,__spread:YR,__spreadArrays:OR,__spreadArray:_R,__await:qR,__asyncGenerator:jR,__asyncDelegator:iR,__asyncValues:bR,__makeTemplateObject:xR,__importStar:oR,__importDefault:nR,__classPrivateFieldGet:pR,__classPrivateFieldSet:uR,__classPrivateFieldIn:tR,__addDisposableResource:rA,__disposeResources:sA}=pa.default;import{Buffer as ua} from"buffer";var ta=(r,s)=>{if(typeof r!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof r} (${r})`);return s?ua.from(r,s):ua.from(r)};var be=(r)=>{const s=ta(r,"utf8");return new Uint8Array(s.buffer,s.byteOffset,s.byteLength/Uint8Array.BYTES_PER_ELEMENT)};function Gr(r){if(r instanceof Uint8Array)return r;if(typeof r==="string")return jw(r);if(ArrayBuffer.isView(r))return new Uint8Array(r.buffer,r.byteOffset,r.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(r)}var jw=typeof Buffer!=="undefined"&&Buffer.from?function(r){return Buffer.from(r,"utf8")}:be;function Kr(r){if(typeof r==="string")return r.length===0;return r.byteLength===0}function Wr(r){return new Uint8Array([(r&4278190080)>>24,(r&16711680)>>16,(r&65280)>>8,r&255])}function Vr(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 xe=function(){function r(){this.crc32=new rr}return r.prototype.update=function(s){if(Kr(s))return;this.crc32.update(Gr(s))},r.prototype.digest=function(){return Ns(this,void 0,void 0,function(){return $s(this,function(s){return[2,Wr(this.crc32.digest())]})})},r.prototype.reset=function(){this.crc32=new rr},r}();var rr=function(){function r(){this.checksum=4294967295}return r.prototype.update=function(s){var e,l;try{for(var f=Ds(s),a=f.next();!a.done;a=f.next()){var h=a.value;this.checksum=this.checksum>>>8^bw[(this.checksum^h)&255]}}catch(m){e={error:m}}finally{try{if(a&&!a.done&&(l=f.return))l.call(f)}finally{if(e)throw e.error}}return this},r.prototype.digest=function(){return(this.checksum^4294967295)>>>0},r}();var iw=[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],bw=Vr(iw);var o=Z(sh(),1);var eh=Z(sh(),1),rh=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 Ir{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,l=Math.abs(Math.round(r));e>-1&&l>0;e--,l/=256)s[e]=l;if(r<0)rh(s);return new Ir(s)}valueOf(){const r=this.bytes.slice(0),s=r[0]&128;if(s)rh(r);return parseInt(eh.toHex(r),16)*(s?-1:1)}toString(){return String(this.valueOf())}}class oe{constructor(r,s){this.toUtf8=r,this.fromUtf8=s}format(r){const s=[];for(let f of Object.keys(r)){const a=this.fromUtf8(f);s.push(Uint8Array.from([a.byteLength]),a,this.formatHeaderValue(r[f]))}const e=new Uint8Array(s.reduce((f,a)=>f+a.byteLength,0));let l=0;for(let f of s)e.set(f,l),l+=f.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 l=new Uint8Array(9);return l[0]=5,l.set(r.value.bytes,1),l;case"binary":const f=new DataView(new ArrayBuffer(3+r.value.byteLength));f.setUint8(0,6),f.setUint16(1,r.value.byteLength,!1);const a=new Uint8Array(f.buffer);return a.set(r.value,3),a;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 k=new Uint8Array(9);return k[0]=8,k.set(Ir.fromNumber(r.value.valueOf()).bytes,1),k;case"uuid":if(!ed.test(r.value))throw new Error(`Invalid UUID received: ${r.value}`);const N=new Uint8Array(17);return N[0]=9,N.set(o.fromHex(r.value.replace(/\-/g,"")),1),N}}parse(r){const s={};let e=0;while(e<r.byteLength){const l=r.getUint8(e++),f=this.toUtf8(new Uint8Array(r.buffer,r.byteOffset+e,l));switch(e+=l,r.getUint8(e++)){case 0:s[f]={type:fh,value:!0};break;case 1:s[f]={type:fh,value:!1};break;case 2:s[f]={type:xw,value:r.getInt8(e++)};break;case 3:s[f]={type:ow,value:r.getInt16(e,!1)},e+=2;break;case 4:s[f]={type:nw,value:r.getInt32(e,!1)},e+=4;break;case 5:s[f]={type:pw,value:new Ir(new Uint8Array(r.buffer,r.byteOffset+e,8))},e+=8;break;case 6:const a=r.getUint16(e,!1);e+=2,s[f]={type:uw,value:new Uint8Array(r.buffer,r.byteOffset+e,a)},e+=a;break;case 7:const h=r.getUint16(e,!1);e+=2,s[f]={type:tw,value:this.toUtf8(new Uint8Array(r.buffer,r.byteOffset+e,h))},e+=h;break;case 8:s[f]={type:rd,value:new Date(new Ir(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[f]={type:sd,value:`${o.toHex(m.subarray(0,4))}-${o.toHex(m.subarray(4,6))}-${o.toHex(m.subarray(6,8))}-${o.toHex(m.subarray(8,10))}-${o.toHex(m.subarray(10))}`};break;default:throw new Error("Unrecognized header type tag")}}return s}}var lh;(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"})(lh||(lh={}));var fh="boolean",xw="byte",ow="short",nw="integer",pw="long",uw="binary",tw="string",rd="timestamp",sd="uuid",ed=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;function hh({byteLength:r,byteOffset:s,buffer:e}){if(r<ld)throw new Error("Provided message too short to accommodate event stream message overhead");const l=new DataView(e,s,r),f=l.getUint32(0,!1);if(r!==f)throw new Error("Reported message length does not match received message length");const a=l.getUint32(ah,!1),h=l.getUint32(n,!1),m=l.getUint32(r-sr,!1),g=new rr().update(new Uint8Array(e,s,n));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+n,r-(n+sr))),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+n+sr,a),body:new Uint8Array(e,s+n+sr+a,f-a-(n+sr+sr))}}var ah=4,n=ah*2,sr=4,ld=n+sr*2;class ne{constructor(r,s){this.headerMarshaller=new oe(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),l=e.byteLength+s.byteLength+16,f=new Uint8Array(l),a=new DataView(f.buffer,f.byteOffset,f.byteLength),h=new rr;return a.setUint32(0,l,!1),a.setUint32(4,e.byteLength,!1),a.setUint32(8,h.update(f.subarray(0,8)).digest(),!1),f.set(e,12),f.set(s,e.byteLength+12),a.setUint32(l-4,h.update(f.subarray(8,l-4)).digest(),!1),f}decode(r){const{headers:s,body:e}=hh(r);return{headers:this.headerMarshaller.parse(s),body:e}}formatHeaders(r){return this.headerMarshaller.format(r)}}class pe{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 ue{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 te{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 rl{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 mh(r){let s=0,e=0,l=null,f=null;const a=(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,l=new Uint8Array(m),new DataView(l.buffer).setUint32(0,m,!1)},h=async function*(){const m=r[Symbol.asyncIterator]();while(!0){const{value:g,done:k}=await m.next();if(k){if(!s)return;else if(s===e)yield l;else throw new Error("Truncated event message received.");return}const N=g.length;let D=0;while(D<N){if(!l){const X=N-D;if(!f)f=new Uint8Array(4);const J=Math.min(4-e,X);if(f.set(g.slice(D,D+J),e),e+=J,D+=J,e<4)break;a(new DataView(f.buffer).getUint32(0,!1)),f=null}const $=Math.min(s-e,N-D);if(l.set(g.slice(D,D+$),e),e+=$,D+=$,s&&s===e)yield l,l=null,s=0,e=0}}};return{[Symbol.asyncIterator]:h}}function gh(r,s){return async function(e){const{value:l}=e.headers[":message-type"];if(l==="error"){const f=new Error(e.headers[":error-message"].value||"UnknownError");throw f.name=e.headers[":error-code"].value,f}else if(l==="exception"){const f=e.headers[":exception-type"].value,a={[f]:e},h=await r(a);if(h.$unknown){const m=new Error(s(e.body));throw m.name=f,m}throw h[f]}else if(l==="event"){const f={[e.headers[":event-type"].value]:e},a=await r(f);if(a.$unknown)return;return a}else throw Error(`Unrecognizable event type: ${e.headers[":event-type"].value}`)}}class Ts{constructor({utf8Encoder:r,utf8Decoder:s}){this.eventStreamCodec=new ne(r,s),this.utfEncoder=r}deserialize(r,s){const e=mh(r);return new te({messageStream:new pe({inputStream:e,decoder:this.eventStreamCodec}),deserializer:gh(s,this.utfEncoder)})}serialize(r,s){return new ue({messageStream:new rl({inputStream:r,serializer:s}),encoder:this.eventStreamCodec,includeEndFrame:!0})}}import{Readable as fd} from"stream";async function*wh(r){let s=!1,e=!1;const l=new Array;r.on("error",(f)=>{if(!s)s=!0;if(f)throw f}),r.on("data",(f)=>{l.push(f)}),r.on("end",()=>{s=!0});while(!e){const f=await new Promise((a)=>setTimeout(()=>a(l.shift()),0));if(f)yield f;e=s&&l.length===0}}class sl{constructor({utf8Encoder:r,utf8Decoder:s}){this.universalMarshaller=new Ts({utf8Decoder:s,utf8Encoder:r})}deserialize(r,s){const e=typeof r[Symbol.asyncIterator]==="function"?r:wh(r);return this.universalMarshaller.deserialize(e,s)}serialize(r,s){return fd.from(this.universalMarshaller.serialize(r,s))}}var dh=(r)=>new sl(r);import{Writable as ad} from"stream";class ys extends ad{constructor(r,s){super(s);this.hash=r}_write(r,s,e){try{this.hash.update(cs(r))}catch(l){return e(l)}e()}}var Sh=(r,s)=>{if(s.readableFlowing!==null)throw new Error("Unable to calculate hash for flowing readable stream");const e=new r,l=new ys(e);return s.pipe(l),new Promise((f,a)=>{s.on("error",(h)=>{l.end(),a(h)}),l.on("error",a),l.on("finish",()=>{e.digest().then(f).catch(a)})})};var Ms=Z(tr(),1);var $h=(r)=>{return{apiVersion:"2006-03-01",base64Decoder:r?.base64Decoder??Rh,base64Encoder:r?.base64Encoder??Ph,disableHostPrefix:r?.disableHostPrefix??!1,endpointProvider:r?.endpointProvider??ur,extensions:r?.extensions??[],getAwsChunkedEncodingStream:r?.getAwsChunkedEncodingStream??Ih,httpAuthSchemeProvider:r?.httpAuthSchemeProvider??Of,httpAuthSchemes:r?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(s)=>s.getIdentityProvider("aws.auth#sigv4"),signer:new Ms.AwsSdkSigV4Signer},{schemeId:"aws.auth#sigv4a",identityProvider:(s)=>s.getIdentityProvider("aws.auth#sigv4a"),signer:new Ms.AwsSdkSigV4ASigner}],logger:r?.logger??new Br,sdkStreamMixin:r?.sdkStreamMixin??Eh,serviceId:r?.serviceId??"S3",signerConstructor:r?.signerConstructor??qs,signingEscapePath:r?.signingEscapePath??!1,urlParser:r?.urlParser??Nh,useArnRegion:r?.useArnRegion??!1,utf8Decoder:r?.utf8Decoder??Ah,utf8Encoder:r?.utf8Encoder??kh}};var Zh=(r)=>{yh(process.version);const s=Vh(r),e=()=>s().then(ch),l=$h(r);return vs.emitWarningIfUnsupportedVersion(process.version),{...l,...r,runtime:"node",defaultsMode:s,bodyLengthChecker:r?.bodyLengthChecker??Wh,credentialDefaultProvider:r?.credentialDefaultProvider??Lh,defaultUserAgentProvider:r?.defaultUserAgentProvider??Kh({serviceId:l.serviceId,clientVersion:oa.version}),disableS3ExpressSessionAuth:r?.disableS3ExpressSessionAuth??i(Qs),eventStreamSerdeProvider:r?.eventStreamSerdeProvider??dh,maxAttempts:r?.maxAttempts??i(Fh),md5:r?.md5??Us.bind(null,"md5"),region:r?.region??i(vh,Ch),requestHandler:Dh.create(r?.requestHandler??e),retryMode:r?.retryMode??i({...Gh,default:async()=>(await e()).retryMode||zh}),sha1:r?.sha1??Us.bind(null,"sha1"),sha256:r?.sha256??Us.bind(null,"sha256"),sigv4aSigningRegionSet:r?.sigv4aSigningRegionSet??i(vs.NODE_SIGV4A_CONFIG_OPTIONS),streamCollector:r?.streamCollector??Th,streamHasher:r?.streamHasher??Sh,useArnRegion:r?.useArnRegion??i(na),useDualstackEndpoint:r?.useDualstackEndpoint??i(Mh),useFipsEndpoint:r?.useFipsEndpoint??i(Uh)}};var Xh=(r)=>{const s=r.httpAuthSchemes;let{httpAuthSchemeProvider:e,credentials:l}=r;return{setHttpAuthScheme(f){const a=s.findIndex((h)=>h.schemeId===f.schemeId);if(a===-1)s.push(f);else s.splice(a,1,f)},httpAuthSchemes(){return s},setHttpAuthSchemeProvider(f){e=f},httpAuthSchemeProvider(){return e},setCredentials(f){l=f},credentials(){return l}}},Jh=(r)=>{return{httpAuthSchemes:r.httpAuthSchemes(),httpAuthSchemeProvider:r.httpAuthSchemeProvider(),credentials:r.credentials()}};var Cs=(r)=>r,qh=(r,s)=>{const e={...Cs(Oh(r)),...Cs(Bh(r)),...Cs(Hh(r)),...Cs(Xh(r))};return s.forEach((l)=>l.configure(e)),{...r,..._h(e),...Yh(e),...Qh(e),...Jh(e)}};class el extends oh{constructor(...[r]){const s=Zh(r||{}),e=qf(s),l=nh(e),f=sm(l),a=uh(f),h=jh(a),m=rm(h),g=Zl(m),k=_f(g),N=Fl(k,{session:[()=>this,ie]}),D=qh(N,r?.extensions||[]);super(D);this.config=D,this.middlewareStack.use(ph(this.config)),this.middlewareStack.use(em(this.config)),this.middlewareStack.use(th(this.config)),this.middlewareStack.use(ih(this.config)),this.middlewareStack.use(bh(this.config)),this.middlewareStack.use(xh(this.config)),this.middlewareStack.use(Er.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:Qf,identityProviderConfigProvider:async($)=>new Er.DefaultIdentityProviderConfig({"aws.auth#sigv4":$.credentials,"aws.auth#sigv4a":$.credentials})})),this.middlewareStack.use(Er.getHttpSigningPlugin(this.config)),this.middlewareStack.use(Ll(this.config)),this.middlewareStack.use(Rl(this.config)),this.middlewareStack.use(Il(this.config)),this.middlewareStack.use(Bs(this.config)),this.middlewareStack.use(Os(this.config))}destroy(){super.destroy()}}function hd(r){return(s)=>async(e)=>{const l={...e.input},f=[{target:"SSECustomerKey",hash:"SSECustomerKeyMD5"},{target:"CopySourceSSECustomerKey",hash:"CopySourceSSECustomerKeyMD5"}];for(let a of f){const h=l[a.target];if(h){let m;if(typeof h==="string")if(gd(h,r))m=r.base64Decoder(h);else m=r.utf8Decoder(h),l[a.target]=r.base64Encoder(m);else m=ArrayBuffer.isView(h)?new Uint8Array(h.buffer,h.byteOffset,h.byteLength):new Uint8Array(h),l[a.target]=r.base64Encoder(m);const g=new r.md5;g.update(m),l[a.hash]=r.base64Encoder(await g.digest())}}return s({...e,input:l})}}function gd(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 md={name:"ssecMiddleware",step:"initialize",tags:["SSE"],override:!0},zs=(r)=>({applyToStack:(s)=>{s.add(hd(r),md)}});var T;(function(r){r.MD5="MD5",r.CRC32="CRC32",r.CRC32C="CRC32C",r.SHA1="SHA1",r.SHA256="SHA256"})(T||(T={}));var lm;(function(r){r.HEADER="header",r.TRAILER="trailer"})(lm||(lm={}));var{MD5:fm,CRC32:am}=T;var Lr=[T.CRC32,T.CRC32C,T.SHA1,T.SHA256],hm=[T.CRC32,T.CRC32C,T.SHA1,T.SHA256];var mm=(r,{requestChecksumRequired:s,requestAlgorithmMember:e},l)=>{const f=l?am:fm;if(!e||!r[e])return s?f:void 0;const a=r[e];if(!Lr.includes(a))throw new Error(`The checksum algorithm "${a}" is not supported by the client.`+` Select one of ${Lr}.`);return a};var Nr=(r)=>r===T.MD5?"content-md5":`x-amz-checksum-${r.toLowerCase()}`;var gm=(r,s)=>{const e=r.toLowerCase();for(let l of Object.keys(s))if(e===l.toLowerCase())return!0;return!1};var $r=(r)=>r!==void 0&&typeof r!=="string"&&!ArrayBuffer.isView(r)&&!wm(r);var fl=function(){function r(){this.crc32c=new ll}return r.prototype.update=function(s){if(Kr(s))return;this.crc32c.update(Gr(s))},r.prototype.digest=function(){return Ns(this,void 0,void 0,function(){return $s(this,function(s){return[2,Wr(this.crc32c.digest())]})})},r.prototype.reset=function(){this.crc32c=new ll},r}();var ll=function(){function r(){this.checksum=4294967295}return r.prototype.update=function(s){var e,l;try{for(var f=Ds(s),a=f.next();!a.done;a=f.next()){var h=a.value;this.checksum=this.checksum>>>8^dd[(this.checksum^h)&255]}}catch(m){e={error:m}}finally{try{if(a&&!a.done&&(l=f.return))l.call(f)}finally{if(e)throw e.error}}return this},r.prototype.digest=function(){return(this.checksum^4294967295)>>>0},r}();var wd=[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],dd=Vr(wd);var Fs=(r,s)=>({[T.MD5]:s.md5,[T.CRC32]:xe,[T.CRC32C]:fl,[T.SHA1]:s.sha1,[T.SHA256]:s.sha256})[r];var Gs=(r,s)=>{const e=new r;return e.update(cs(s||"")),e.digest()};var dm={name:"flexibleChecksumsMiddleware",step:"build",tags:["BODY_CHECKSUM"],override:!0},Sm=(r,s)=>(e,l)=>async(f)=>{if(!L.isInstance(f.request))return e(f);const{request:a}=f,{body:h,headers:m}=a,{base64Encoder:g,streamHasher:k}=r,{input:N,requestChecksumRequired:D,requestAlgorithmMember:$}=s,X=mm(N,{requestChecksumRequired:D,requestAlgorithmMember:$},!!l.isS3ExpressBucket);let J=h,Q=m;if(X){const _=Nr(X),Dr=Fs(X,r);if($r(h)){const{getAwsChunkedEncodingStream:Hs,bodyLengthChecker:Wm}=r;J=Hs(h,{base64Encoder:g,bodyLengthChecker:Wm,checksumLocationName:_,checksumAlgorithmFn:Dr,streamHasher:k}),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":_},delete Q["content-length"]}else if(!gm(_,m)){const Hs=await Gs(Dr,h);Q={...m,[_]:g(Hs)}}}return await e({...f,request:{...a,headers:Q,body:J}})};var Ks=(r=[])=>{const s=[];for(let e of hm){if(!r.includes(e)||!Lr.includes(e))continue;s.push(e)}return s};var Rm=(r)=>{const s=r.lastIndexOf("-");if(s!==-1){const e=r.slice(s+1);if(!e.startsWith("0")){const l=parseInt(e,10);if(!isNaN(l)&&l>=1&&l<=1e4)return!0}}return!1};import{Transform as Sd} from"stream";function al(r){const s=new Sd;return s.push(r),s.push(null),s}var Am=async(r,{streamHasher:s,checksumAlgorithmFn:e,base64Encoder:l})=>{const f=$r(r)?s(e,r):Gs(e,r);return l(await f)};var km=async(r,{config:s,responseAlgorithms:e})=>{const l=Ks(e),{body:f,headers:a}=r;for(let h of l){const m=Nr(h),g=a[m];if(g){const k=Fs(h,s),{streamHasher:N,base64Encoder:D}=s,$=await Am(f,{streamHasher:N,checksumAlgorithmFn:k,base64Encoder:D});if($===g)break;throw new Error(`Checksum mismatch: expected "${$}" but received "${g}"`+` in response header "${m}".`)}}};var Pm={name:"flexibleChecksumsResponseMiddleware",toMiddleware:"deserializerMiddleware",relation:"after",tags:["BODY_CHECKSUM"],override:!0},Im=(r,s)=>(e,l)=>async(f)=>{if(!L.isInstance(f.request))return e(f);const a=f.input,h=await e(f),m=h.response;let g=void 0;const{requestValidationModeMember:k,responseAlgorithms:N}=s;if(k&&a[k]==="ENABLED"){const{clientName:D,commandName:$}=l;if(D==="S3Client"&&$==="GetObjectCommand"&&Ks(N).every((Q)=>{const Jr=Nr(Q),_=m.headers[Jr];return!_||Rm(_)}))return h;const J=$r(m.body);if(J)g=await r.streamCollector(m.body),m.body=al(g);if(await km(h.response,{config:r,responseAlgorithms:N}),J&&g)m.body=al(g)}return h};var Ws=(r,s)=>({applyToStack:(e)=>{e.add(Sm(r,s),dm),e.addRelativeTo(Im(r,s),Pm)}});class hl extends Ar.classBuilder().ep({...wr,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(r,s,e,l){return[kr(e,this.serialize,this.deserialize),Pr(e,r.getEndpointParameterInstructions()),Ws(e,{input:this.input,requestChecksumRequired:!1,requestValidationModeMember:"ChecksumMode",responseAlgorithms:["CRC32","CRC32C","SHA256","SHA1"]}),zs(e),El(e)]}).s("AmazonS3","GetObject",{}).n("S3Client","GetObjectCommand").f(of,xf).ser(Ra).de(Pa).build(){}class ml extends Ar.classBuilder().ep({...wr,Bucket:{type:"contextParams",name:"Bucket"},Key:{type:"contextParams",name:"Key"}}).m(function(r,s,e,l){return[kr(e,this.serialize,this.deserialize),Pr(e,r.getEndpointParameterInstructions()),Ws(e,{input:this.input,requestAlgorithmMember:"ChecksumAlgorithm",requestChecksumRequired:!1}),Al(e),qr(e),zs(e)]}).s("AmazonS3","PutObject",{}).n("S3Client","PutObjectCommand").f(uf,pf).ser(Aa).de(Ia).build(){}import{Buffer as Em} from"buffer";class Nm extends er{client;constructor(...r){super();this.client=new el(...r)}async put(r){let s,e,l,f=process.env.BUCKET_NAME;if(r instanceof Blob)s=r,l=`${Hr()}.${r.type.split("/")[1].split(";")[0]}`,e=r.type;else s=r.body,l=r.name,e=r.contentType;e=s instanceof Blob||s instanceof File?s.type:void 0;const a=s instanceof Em?s:Em.from(await s.arrayBuffer());return await this.client.send(new ml({Bucket:f,Key:l,Body:a,ContentType:e})),l}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 l=await this.client.send(new hl({Bucket:s,Key:e}));return new Response(l.Body.transformToWebStream(),{headers:{"Content-Type":l.ContentType,"Content-Length":l.ContentLength.toString(),"Cache-Control":"private, max-age=12000, must-revalidate","Last-Modified":l.LastModified?.toUTCString()||"",ETag:l.ETag||""}})}}class Vs{}class Ls extends Vs{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),l=Date.now();if(l-e.date>=60000)this.requests.set(r,{date:l,count:1});else this.requests.set(r,{date:e.date,count:e.count+1})}return this.requests.get(r).count}}class $m{driver=new Ls}class Zr{}import*as Ed from"react-dom/server";var Mm=Z(Rd(),1);var{defineProperty:Ad,getOwnPropertySymbols:Dm}=Object,kd=Object.prototype.hasOwnProperty,Pd=Object.prototype.propertyIsEnumerable,Tm=(r,s,e)=>(s in r)?Ad(r,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[s]=e,gl=(r,s)=>{for(var e in s||(s={}))if(kd.call(s,e))Tm(r,e,s[e]);if(Dm){for(var e of Dm(s))if(Pd.call(s,e))Tm(r,e,s[e])}return r},Id=((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')}),wl=(r,s,e)=>{return new Promise((l,f)=>{var a=(g)=>{try{m(e.next(g))}catch(k){f(k)}},h=(g)=>{try{m(e.throw(g))}catch(k){f(k)}},m=(g)=>g.done?l(g.value):Promise.resolve(g.value).then(a,h);m((e=e.apply(r,s)).next())})},Nd={unformatted:["code","pre","em","strong","span"],indent_inner_html:!0,indent_char:" ",indent_size:2,sep:"\n"},$d=(r,s={})=>{return Mm.default.html(r,gl(gl({},Nd),s))},Dd=[{selector:"img",format:"skip"},{selector:"#__react-email-preview",format:"skip"},{selector:"a",options:{linkBrackets:!1}}];var cm=new TextDecoder("utf-8"),ym=(r)=>wl(void 0,null,function*(){let s="";if("pipeTo"in r){const e=new WritableStream({write(l){s+=cm.decode(l)}});yield r.pipeTo(e)}else{const{Writable:e}=Id("stream"),l=new e({write(f,a,h){s+=cm.decode(f),h()}});return r.pipe(l),new Promise((f,a)=>{l.on("error",a),l.on("close",()=>{f(s)})})}return s}),Zs=(r,s)=>wl(void 0,null,function*(){const e=yield import("react-dom/server");let l;if(Object.hasOwn(e,"renderToReadableStream"))l=yield ym(yield e.renderToReadableStream(r));else yield new Promise((h,m)=>{const g=e.renderToPipeableStream(r,{onAllReady(){return wl(this,null,function*(){l=yield ym(g),h()})},onError(k){m(k)}})});if(s==null?void 0:s.plainText)return dl(l,gl({selectors:Dd},s.htmlToTextOptions));const a=`${'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'}${l.replace(/<!DOCTYPE.*?>/,"")}`;if(s==null?void 0:s.pretty)return $d(a);return a});var{defineProperty:Td,defineProperties:cd,getOwnPropertyDescriptors:yd,getOwnPropertySymbols:Um}=Object,Md=Object.prototype.hasOwnProperty,Ud=Object.prototype.propertyIsEnumerable,vm=(r,s,e)=>(s in r)?Td(r,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[s]=e,Xr=(r,s)=>{for(var e in s||(s={}))if(Md.call(s,e))vm(r,e,s[e]);if(Um){for(var e of Um(s))if(Ud.call(s,e))vm(r,e,s[e])}return r},vd=(r,s)=>cd(r,yd(s)),P=(r,s,e)=>{return new Promise((l,f)=>{var a=(g)=>{try{m(e.next(g))}catch(k){f(k)}},h=(g)=>{try{m(e.throw(g))}catch(k){f(k)}},m=(g)=>g.done?l(g.value):Promise.resolve(g.value).then(a,h);m((e=e.apply(r,s)).next())})},Cd="3.4.0",zd=class{constructor(r){this.resend=r}create(r){return P(this,arguments,function*(s,e={}){return yield this.resend.post("/api-keys",s,e)})}list(){return P(this,null,function*(){return yield this.resend.get("/api-keys")})}remove(r){return P(this,null,function*(){return yield this.resend.delete(`/api-keys/${r}`)})}},Fd=class{constructor(r){this.resend=r}create(r){return P(this,arguments,function*(s,e={}){return yield this.resend.post("/audiences",s,e)})}list(){return P(this,null,function*(){return yield this.resend.get("/audiences")})}get(r){return P(this,null,function*(){return yield this.resend.get(`/audiences/${r}`)})}remove(r){return P(this,null,function*(){return yield this.resend.delete(`/audiences/${r}`)})}},Gd=class{constructor(r){this.resend=r}send(r){return P(this,arguments,function*(s,e={}){return this.create(s,e)})}create(r){return P(this,arguments,function*(s,e={}){for(let f of s)if(f.react)f.html=yield Zs(f.react),delete f.react;return yield this.resend.post("/emails/batch",s,e)})}},Kd=class{constructor(r){this.resend=r}create(r){return P(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 P(this,null,function*(){return yield this.resend.get(`/audiences/${r.audienceId}/contacts`)})}get(r){return P(this,null,function*(){return yield this.resend.get(`/audiences/${r.audienceId}/contacts/${r.id}`)})}update(r){return P(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 P(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}`)})}},Wd=class{constructor(r){this.resend=r}create(r){return P(this,arguments,function*(s,e={}){return yield this.resend.post("/domains",s,e)})}list(){return P(this,null,function*(){return yield this.resend.get("/domains")})}get(r){return P(this,null,function*(){return yield this.resend.get(`/domains/${r}`)})}update(r){return P(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 P(this,null,function*(){return yield this.resend.delete(`/domains/${r}`)})}verify(r){return P(this,null,function*(){return yield this.resend.post(`/domains/${r}/verify`)})}},Vd=class{constructor(r){this.resend=r}send(r){return P(this,arguments,function*(s,e={}){return this.create(s,e)})}create(r){return P(this,arguments,function*(s,e={}){if(s.react)s.html=yield Zs(s.react),delete s.react;return yield this.resend.post("/emails",s,e)})}get(r){return P(this,null,function*(){return yield this.resend.get(`/emails/${r}`)})}},Cm="https://api.resend.com",zm=`resend-node:${Cd}`,Ld=typeof process!=="undefined"&&process.env?process.env.RESEND_BASE_URL||Cm:Cm,Zd=typeof process!=="undefined"&&process.env?process.env.RESEND_USER_AGENT||zm:zm,Fm=class{constructor(r){if(this.key=r,this.apiKeys=new zd(this),this.audiences=new Fd(this),this.batch=new Gd(this),this.contacts=new Kd(this),this.domains=new Wd(this),this.emails=new Vd(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":Zd,"Content-Type":"application/json"})}fetchRequest(r){return P(this,arguments,function*(s,e={}){try{const l=yield fetch(`${Ld}${s}`,e);if(!l.ok)try{const a=yield l.text();return{data:null,error:JSON.parse(a)}}catch(a){if(a 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:l.statusText,name:"application_error"};if(a instanceof Error)return{data:null,error:vd(Xr({},h),{message:a.message})};return{data:null,error:h}}return{data:yield l.json(),error:null}}catch(l){return{data:null,error:{name:"application_error",message:"Unable to fetch data. The request could not be resolved."}}}})}post(r,s){return P(this,arguments,function*(e,l,f={}){const a=Xr({method:"POST",headers:this.headers,body:JSON.stringify(l)},f);return this.fetchRequest(e,a)})}get(r){return P(this,arguments,function*(s,e={}){const l=Xr({method:"GET",headers:this.headers},e);return this.fetchRequest(s,l)})}put(r,s){return P(this,arguments,function*(e,l,f={}){const a=Xr({method:"PUT",headers:this.headers,body:JSON.stringify(l)},f);return this.fetchRequest(e,a)})}patch(r,s){return P(this,arguments,function*(e,l,f={}){const a=Xr({method:"PATCH",headers:this.headers,body:JSON.stringify(l)},f);return this.fetchRequest(e,a)})}delete(r,s){return P(this,null,function*(){const e={method:"DELETE",headers:this.headers,body:JSON.stringify(s)};return this.fetchRequest(r,e)})}};class Xs{}class Js extends Xs{r;constructor(r=process.env.RESEND_API_KEY){super();this.apiKey=r}async send(r){const s=new Fm(this.apiKey),{data:e,error:l}=await s.emails.send({...r});if(l)throw l;if(e)return!0}}class Gm extends Zr{constructor(){super(...arguments)}debug=!0;defaultFrom="";driver=new Js;boot(){}}class Km extends Zr{constructor(){super(...arguments)}channels={};boot(){}}export{Nm as S3Driver,Js as ResendDriver,$m as RateLimiterServiceProvider,Vs as RateLimiterDriver,Ls as InMemoryRateLimiter,Qr as FileSystemDriver,Sl as FileStorageServiceProvider,er as FileStorageDriver,Gm as EmailServiceProvider,Xs as EmailDriver,Km as BroadcastingServiceProvider};export{Sl as p,Zr as q,$m as r,Gm as s,Km as t};
|