coze-coding-dev-sdk 0.7.19-beta.7 → 0.7.19-beta.9

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.
@@ -72,7 +72,7 @@ try:
72
72
  print(f"{env_var.key}={env_var.value}")
73
73
  except Exception as e:
74
74
  print(f"# Error: {e}", file=sys.stderr)
75
- `;for(let r of(0,i.execSync)(`python3 -c '${n.replace(/'/g,"'\"'\"'")}'`,{encoding:"utf-8",timeout:1e4,stdio:["pipe","pipe","pipe"]}).trim().split("\n")){if(r.startsWith("#"))continue;let n=r.indexOf("=");if(n>0){let i=r.substring(0,n),a=r.substring(n+1);(a.startsWith("'")&&a.endsWith("'")||a.startsWith('"')&&a.endsWith('"'))&&(a=a.slice(1,-1)),"COZE_INTEGRATION_BASE_URL"===i?e=a:"COZE_WORKLOAD_IDENTITY_API_KEY"===i&&(t=a)}}}catch{}return r=!0,a={baseUrl:e,apiKey:t}}class o{baseUrl;apiKey;configured;constructor(){try{const e=loadReportEnv();if(this.baseUrl=e.baseUrl,this.apiKey=e.apiKey,this.configured=!!(this.baseUrl&&this.apiKey),!this.configured){const e=[];this.baseUrl||e.push("COZE_INTEGRATION_BASE_URL"),this.apiKey||e.push("COZE_WORKLOAD_IDENTITY_API_KEY"),console.error(`[report] ReportClient not configured: ${e.join(", ")} is missing`)}}catch(e){this.baseUrl="",this.apiKey="",this.configured=!1,console.error("[report] ReportClient config failed:",e)}}async batchReport(e){if(e.length){if(!this.configured)return void console.error(`[report] batchReport skipped: ReportClient is not configured. Set COZE_INTEGRATION_BASE_URL and COZE_WORKLOAD_IDENTITY_API_KEY environment variables. Dropping ${e.length} entries.`);try{let t=`${this.baseUrl}/v1/memory_report/batch_report`;console.log(`[report] batchReport sending ${e.length} entries to ${t}`);let n=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json","x-coze-token":this.apiKey},body:JSON.stringify({entries:e}),signal:AbortSignal.timeout(1e4)});if(!n.ok)throw Error(`batchReport failed: ${n.status} ${n.statusText}`)}catch(e){console.error("[report] batchReport failed:",e)}}}}class s{buffer=[];timer=null;projectId;env;client;destroyed=!1;flushing=!1;pendingFlush=!1;onExitHandler;constructor(e){this.client=e,this.projectId=process.env.COZELOOP_WORKSPACE_ID||null,this.env=process.env.COZE_PROJECT_ENV||null,this.timer=setInterval(()=>this.flush(),6e4),this.timer.unref&&this.timer.unref(),this.onExitHandler=()=>{this.destroyAndExit()},process.on("beforeExit",()=>this.destroy()),process.on("SIGTERM",this.onExitHandler),process.on("SIGINT",this.onExitHandler)}add(e){if(!this.destroyed)try{this.buffer.length>=6e4&&this.buffer.shift(),e.project_id=this.projectId,e.env=this.env,this.buffer.push(e),this.buffer.length>=100&&this.flush().catch(()=>{})}catch(e){console.error("[report] buffer.add failed:",e)}}async flush(){if(this.flushing){this.pendingFlush=!0;return}if(!this.buffer.length)return;this.flushing=!0;let e=this.buffer.splice(0,100);try{await this.client.batchReport(e)}catch(t){console.error("[report] flush failed, re-queuing entries:",t),this.buffer=e.concat(this.buffer)}finally{this.flushing=!1,(this.pendingFlush||this.buffer.length>=100)&&(this.pendingFlush=!1,this.flush().catch(()=>{}))}}destroy(){this.destroyed||(this.destroyed=!0,this.timer&&(clearInterval(this.timer),this.timer=null),process.removeListener("SIGTERM",this.onExitHandler),process.removeListener("SIGINT",this.onExitHandler),this.flush().catch(()=>{}))}destroyAndExit(){if(this.destroyed)return;this.destroyed=!0,this.timer&&(clearInterval(this.timer),this.timer=null),process.removeListener("SIGTERM",this.onExitHandler),process.removeListener("SIGINT",this.onExitHandler);let e=setTimeout(()=>process.exit(0),5e3);e.unref&&e.unref(),this.flush().catch(()=>{}).finally(()=>{clearTimeout(e),process.exit(0)})}}let l=null;function getReportBuffer(){if(l)return l;try{let e=new o;return l=new s(e),console.log("[report] singleton buffer created successfully"),l}catch(e){return console.error("[report] failed to create singleton buffer:",e),null}}let u=/((?:apikey|api_key|access_key|secret_key|access_token|token|secret|password|authorization|credential|X-Amz-Signature|X-Amz-Credential|X-Amz-Security-Token)=)[^&]*/gi;function truncate(e,t=1024){return null==e?null:e.length<=t?e:e.substring(0,t)+"...[truncated]"}function redactUrl(e){return e.replace(u,"$1***")}function createWrappedFetch(e,t="supabase"){return console.log(`[report] createWrappedFetch called, source=${t}`),async(n,i)=>{let r=Date.now();try{let a=await fetch(n,i);return safeRecordLog(e,t,n,i,a,null,r),a}catch(a){throw safeRecordLog(e,t,n,i,null,a,r),a}}}function safeRecordLog(e,t,n,i,r,a,o){try{let s=Date.now()-o,l="string"==typeof n?n:n instanceof URL?n.toString():n.url||"",u=i?.method||(n instanceof Request?n.method:"GET"),d=r?.status??null,h=null;if(i?.body)try{h=truncate("string"==typeof i.body?i.body:JSON.stringify(i.body))}catch{h=null}let c={source:t,project_id:null,env:null,method:u.toUpperCase(),url:redactUrl(l),request_body:h,response_body:null,status_code:d,error:a?.message??null,duration_ms:s,timestamp:new Date(o).toISOString(),success:null!==d&&d>=200&&d<300};if(r){let t=r.clone().body?.getReader();t?t.read().then(({value:n})=>{if(n){let e=new TextDecoder().decode(n.slice(0,2048));c.response_body=truncate(e)}t.cancel().catch(()=>{}),e.add(c)}).catch(()=>{e.add(c)}):e.add(c)}else e.add(c)}catch(e){console.error("[report] safeRecordLog error:",e)}}function createS3ReportMiddleware(e){return e?{middleware:(t,n)=>async n=>{let i=Date.now(),{request:r}=n;try{let a=await t(n);return safeRecordS3Log(e,r,a,null,i),a}catch(t){throw safeRecordS3Log(e,r,null,t,i),t}},options:{step:"deserialize",name:"reportLogger",override:!0}}:null}function safeRecordS3Log(e,t,n,i,r){try{let a=Date.now()-r,o=t?.method||"UNKNOWN",s=t?.hostname?`${t.protocol||"https:"}//${t.hostname}${t.path||""}`:"",l=n?.response?.statusCode??null,u=null;if(t?.body)try{let e=t.body;"string"==typeof e?u=truncate(e):Buffer.isBuffer(e)&&(u=truncate(`[Binary ${e.length} bytes]`))}catch{u=null}let d={source:"s3",project_id:null,env:null,method:o.toUpperCase(),url:redactUrl(s),request_body:u,response_body:null,status_code:l,error:i?.message??null,duration_ms:a,timestamp:new Date(r).toISOString(),success:null!==l&&l>=200&&l<300};if(n?.output)try{let{Body:e,...t}=n.output;Object.keys(t).length>0&&(d.response_body=truncate(JSON.stringify(t)))}catch{}e.add(d)}catch{}}},"./src/s3/index.ts"(e,t,n){"use strict";let i;n.d(t,{S3Storage:()=>rV});var r,a,o,s,l,u,d=n("./node_modules/@smithy/protocol-http/dist-es/httpRequest.js");function addExpectContinueMiddleware(e){return t=>async n=>{let{request:i}=n;if(!1!==e.expectContinueHeader&&d.K.isInstance(i)&&i.body&&"node"===e.runtime&&e.requestHandler?.constructor?.name!=="FetchHttpHandler"){let t=!0;if("number"==typeof e.expectContinueHeader)try{t=(Number(i.headers?.["content-length"])??e.bodyLengthChecker?.(i.body)??1/0)>=e.expectContinueHeader}catch(e){}else t=!!e.expectContinueHeader;t&&(i.headers.Expect="100-continue")}return t({...n,request:i})}}let h={step:"build",tags:["SET_EXPECT_HEADER","EXPECT_HEADER"],name:"addExpectContinueMiddleware",override:!0};var c=n("./node_modules/@smithy/util-middleware/dist-es/normalizeProvider.js"),f=n("./node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/constants.js"),p=n("./node_modules/@aws-sdk/middleware-host-header/dist-es/index.js"),g=n("./node_modules/@aws-sdk/middleware-logger/dist-es/loggerMiddleware.js"),b=n("./node_modules/@aws-sdk/middleware-recursion-detection/dist-es/getRecursionDetectionPlugin.js");class y{data;lastPurgeTime=Date.now();static EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS=3e4;constructor(e={}){this.data=e}get(e){let t=this.data[e];if(t)return t}set(e,t){return this.data[e]=t,t}delete(e){delete this.data[e]}async purgeExpired(){let e=Date.now();if(!(this.lastPurgeTime+y.EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS>e))for(let t in this.data){let n=this.data[t];if(!n.isRefreshing){let i=await n.identity;i.expiration&&i.expiration.getTime()<e&&delete this.data[t]}}}}class S{_identity;isRefreshing;accessed;constructor(e,t=!1,n=Date.now()){this._identity=e,this.isRefreshing=t,this.accessed=n}get identity(){return this.accessed=Date.now(),this._identity}}class w{createSessionFn;cache;static REFRESH_WINDOW_MS=6e4;constructor(e,t=new y){this.createSessionFn=e,this.cache=t}async getS3ExpressIdentity(e,t){let n=t.Bucket,{cache:i}=this,r=i.get(n);return r?r.identity.then(e=>(e.expiration?.getTime()??0)<Date.now()?i.set(n,new S(this.getIdentity(n))).identity:((e.expiration?.getTime()??0)<Date.now()+w.REFRESH_WINDOW_MS&&!r.isRefreshing&&(r.isRefreshing=!0,this.getIdentity(n).then(e=>{i.set(n,new S(Promise.resolve(e)))})),e)):i.set(n,new S(this.getIdentity(n))).identity}async getIdentity(e){await this.cache.purgeExpired().catch(e=>{console.warn("Error while clearing expired entries in S3ExpressIdentityCache: \n"+e)});let t=await this.createSessionFn(e);if(!t.Credentials?.AccessKeyId||!t.Credentials?.SecretAccessKey)throw Error("s3#createSession response credential missing AccessKeyId or SecretAccessKey.");return{accessKeyId:t.Credentials.AccessKeyId,secretAccessKey:t.Credentials.SecretAccessKey,sessionToken:t.Credentials.SessionToken,expiration:t.Credentials.Expiration?new Date(t.Credentials.Expiration):void 0}}}function bucketEndpointMiddleware(e){return(t,n)=>async i=>{if(e.bucketEndpoint){let e=n.endpointV2;if(e){let t=i.input.Bucket;if("string"==typeof t)try{let i=new URL(t);n.endpointV2={...e,url:i}}catch(i){let e=`@aws-sdk/middleware-sdk-s3: bucketEndpoint=true was set but Bucket=${t} could not be parsed as URL.`;throw n.logger?.constructor?.name==="NoOpLogger"?console.warn(e):n.logger?.warn?.(e),i}}}return t(i)}}let v={name:"bucketEndpointMiddleware",override:!0,relation:"after",toMiddleware:"endpointV2Middleware"};function validateBucketNameMiddleware({bucketEndpoint:e}){return t=>async n=>{let{input:{Bucket:i}}=n;if(!e&&"string"==typeof i&&!("string"==typeof i&&0===i.indexOf("arn:")&&i.split(":").length>=6)&&i.indexOf("/")>=0){let e=Error(`Bucket name shouldn't contain '/', received '${i}'`);throw e.name="InvalidBucketName",e}return t({...n})}}let x={step:"initialize",tags:["VALIDATE_BUCKET_NAME"],name:"validateBucketNameMiddleware",override:!0},T={tags:["REGION_REDIRECT","S3"],name:"regionRedirectEndpointMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"};function regionRedirectMiddleware(e){return(t,n)=>async i=>{try{return await t(i)}catch(r){if(e.followRegionRedirects){let a=r?.$metadata?.httpStatusCode,o="HeadBucketCommand"===n.commandName,s=r?.$response?.headers?.["x-amz-bucket-region"];if(s&&(301===a||400===a&&(r?.name==="IllegalLocationConstraintException"||o))){try{n.logger?.debug(`Redirecting from ${await e.region()} to ${s}`),n.__s3RegionRedirect=s}catch(e){throw Error("Region redirect failed: "+e)}return t(i)}}throw r}}}let C={step:"initialize",tags:["REGION_REDIRECT","S3"],name:"regionRedirectMiddleware",override:!0};var k=n("./node_modules/@aws-sdk/core/dist-es/submodules/client/setFeature.js"),A=n("./node_modules/@smithy/util-config-provider/dist-es/booleanSelector.js"),L=n("./node_modules/@smithy/util-config-provider/dist-es/types.js");let R="X-Amz-S3session-Token",j=R.toLowerCase(),D={environmentVariableSelector:e=>(0,A.Q)(e,"AWS_S3_DISABLE_EXPRESS_SESSION_AUTH",L.c.ENV),configFileSelector:e=>(0,A.Q)(e,"s3_disable_express_session_auth",L.c.CONFIG),default:!1},M={name:"s3ExpressMiddleware",step:"build",tags:["S3","S3_EXPRESS"],override:!0};var P=n("./node_modules/@smithy/core/dist-es/middleware-http-signing/getHttpSigningMiddleware.js"),N=n("./node_modules/@smithy/util-middleware/dist-es/getSmithyContext.js");let signS3Express=async(e,t,n,i)=>{let r=await i.signWithCredentials(n,e,{});if(r.headers["X-Amz-Security-Token"]||r.headers["x-amz-security-token"])throw Error("X-Amz-Security-Token must not be set for s3-express requests.");return r};var O=n("./node_modules/@aws-sdk/middleware-user-agent/dist-es/configurations.js"),B=n("./node_modules/@aws-sdk/middleware-user-agent/dist-es/user-agent-middleware.js"),I=n("./node_modules/@smithy/config-resolver/dist-es/regionConfig/resolveRegionConfig.js"),F=n("./node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.js"),Y=n("./node_modules/@smithy/core/dist-es/util-identity-and-auth/DefaultIdentityProviderConfig.js"),H=n("./node_modules/@smithy/core/dist-es/submodules/schema/middleware/getSchemaSerdePlugin.js"),W=n("./node_modules/@smithy/middleware-content-length/dist-es/index.js"),Z=n("./node_modules/@smithy/middleware-endpoint/dist-es/resolveEndpointConfig.js"),J=n("./node_modules/@smithy/middleware-retry/dist-es/configurations.js"),X=n("./node_modules/@smithy/middleware-retry/dist-es/retryMiddleware.js"),G=n("./node_modules/@smithy/smithy-client/dist-es/client.js"),$=n("./node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.js"),U=n("./node_modules/@smithy/core/dist-es/normalizeProvider.js"),z=n("./node_modules/@smithy/property-provider/dist-es/ProviderError.js");let Q={environmentVariableSelector(e){if(e.AWS_SIGV4A_SIGNING_REGION_SET)return e.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map(e=>e.trim());throw new z.m("AWS_SIGV4A_SIGNING_REGION_SET not set in env.",{tryNextLink:!0})},configFileSelector(e){if(e.sigv4a_signing_region_set)return(e.sigv4a_signing_region_set??"").split(",").map(e=>e.trim());throw new z.m("sigv4a_signing_region_set not set in profile.",{tryNextLink:!0})},default:void 0};var K=n("./node_modules/@smithy/signature-v4/dist-es/SignatureV4.js");class q extends K.B{async signWithCredentials(e,t,n){let i=getCredentialsWithoutSessionToken(t);return e.headers[j]=t.sessionToken,setSingleOverride(this,i),this.signRequest(e,n??{})}async presignWithCredentials(e,t,n){let i=getCredentialsWithoutSessionToken(t);return delete e.headers[j],e.headers[R]=t.sessionToken,e.query=e.query??{},e.query[R]=t.sessionToken,setSingleOverride(this,i),this.presign(e,n)}}function getCredentialsWithoutSessionToken(e){return{accessKeyId:e.accessKeyId,secretAccessKey:e.secretAccessKey,expiration:e.expiration}}function setSingleOverride(e,t){let n=setTimeout(()=>{throw Error("SignatureV4S3Express credential override was created but not called.")},10),i=e.credentialProvider;e.credentialProvider=()=>(clearTimeout(n),e.credentialProvider=i,Promise.resolve(t))}class V{sigv4aSigner;sigv4Signer;signerOptions;static sigv4aDependency(){return"none"}constructor(e){this.sigv4Signer=new q(e),this.signerOptions=e}async sign(e,t={}){return"*"===t.signingRegion?this.getSigv4aSigner().sign(e,t):this.sigv4Signer.sign(e,t)}async signWithCredentials(e,t,n={}){if("*"===n.signingRegion){let e=this.getSigv4aSigner();!1;throw Error('signWithCredentials with signingRegion \'*\' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You 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";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt')}return this.sigv4Signer.signWithCredentials(e,t,n)}async presign(e,t={}){if("*"===t.signingRegion){let e=this.getSigv4aSigner();!1;throw Error('presign with signingRegion \'*\' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You 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";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt')}return this.sigv4Signer.presign(e,t)}async presignWithCredentials(e,t,n={}){if("*"===n.signingRegion)throw Error("Method presignWithCredentials is not supported for [signingRegion=*].");return this.sigv4Signer.presignWithCredentials(e,t,n)}getSigv4aSigner(){if(!this.sigv4aSigner)if("node"===this.signerOptions.runtime){!0;throw Error("Neither CRT nor JS SigV4a implementation is available. Please load either @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt")}else{!0;throw Error("JS SigV4a implementation is not available or not a valid constructor. Please check whether you have installed the @aws-sdk/signature-v4a package explicitly. The CRT implementation is not available for browsers. You must also register the package by calling [require('@aws-sdk/signature-v4a');] or an ESM equivalent such as [import '@aws-sdk/signature-v4a';]. For more information please go to https://github.com/aws/aws-sdk-js-v3#using-javascript-non-crt-implementation-of-sigv4a")}return this.sigv4aSigner}}var ee=n("./node_modules/@smithy/middleware-endpoint/dist-es/adaptors/getEndpointFromInstructions.js"),et=n("./node_modules/@aws-sdk/util-endpoints/dist-es/index.js"),en=n("./node_modules/@smithy/util-endpoints/dist-es/cache/EndpointCache.js"),ei=n("./node_modules/@smithy/util-endpoints/dist-es/resolveEndpoint.js"),er=n("./node_modules/@smithy/util-endpoints/dist-es/utils/customEndpointFunctions.js");let ea="required",eo="type",es="rules",el="conditions",eu="argv",ed="assign",eh="properties",ec="backend",ef="authSchemes",ep="disableDoubleEncoding",em="signingName",eg="signingRegion",eb="headers",ey="signingRegionSet",e_="isSet",eS="booleanEquals",ew="error",ev="aws.partition",ex="stringEquals",eE="getAttr",eT="name",eC="substring",ek="bucketSuffix",eA="parseURL",eL="endpoint",eR="tree",ej="aws.isVirtualHostableS3Bucket",eD="{url#scheme}://{Bucket}.{url#authority}{url#path}",eM="accessPointSuffix",eP="{url#scheme}://{url#authority}{url#path}",eN="hardwareType",eO="regionPrefix",eB="bucketAliasSuffix",eI="outpostId",eF="isValidHostLabel",eY="sigv4a",eH="s3-outposts",eW="{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}",eZ="https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}",eJ="https://{Bucket}.s3.{partitionResult#dnsSuffix}",eX="aws.parseArn",eG="bucketArn",e$="arnType",eU="s3-object-lambda",ez="accesspoint",eQ="accessPointName",eK="{url#scheme}://{accessPointName}-{bucketArn#accountId}.{url#authority}{url#path}",eq="mrapPartition",eV="outpostType",e0="arnPrefix",e1="{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}",e2="https://s3.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",e3="https://s3.{partitionResult#dnsSuffix}",e8={[ea]:!1,[eo]:"string"},e4={[ea]:!0,default:!1,[eo]:"boolean"},e6={[ea]:!1,[eo]:"boolean"},e5={fn:eS,[eu]:[{ref:"Accelerate"},!0]},e9={fn:eS,[eu]:[{ref:"UseFIPS"},!0]},e7={fn:eS,[eu]:[{ref:"UseDualStack"},!0]},te={fn:e_,[eu]:[{ref:"Endpoint"}]},tt={fn:ev,[eu]:[{ref:"Region"}],[ed]:"partitionResult"},tn={fn:ex,[eu]:[{fn:eE,[eu]:[{ref:"partitionResult"},eT]},"aws-cn"]},ti={fn:e_,[eu]:[{ref:"Bucket"}]},tr={ref:"Bucket"},ta={[el]:[e5],[ew]:"S3Express does not support S3 Accelerate.",[eo]:ew},to={[el]:[te,{fn:eA,[eu]:[{ref:"Endpoint"}],[ed]:"url"}],[es]:[{[el]:[{fn:e_,[eu]:[{ref:"DisableS3ExpressSessionAuth"}]},{fn:eS,[eu]:[{ref:"DisableS3ExpressSessionAuth"},!0]}],[es]:[{[el]:[{fn:eS,[eu]:[{fn:eE,[eu]:[{ref:"url"},"isIp"]},!0]}],[es]:[{[el]:[{fn:"uriEncode",[eu]:[tr],[ed]:"uri_encoded_bucket"}],[es]:[{[eL]:{url:"{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}",[eh]:{[ec]:"S3Express",[ef]:[{[ep]:!0,[eT]:"sigv4",[em]:"s3express",[eg]:"{Region}"}]},[eb]:{}},[eo]:eL}],[eo]:eR}],[eo]:eR},{[el]:[{fn:ej,[eu]:[tr,!1]}],[es]:[{[eL]:{url:eD,[eh]:{[ec]:"S3Express",[ef]:[{[ep]:!0,[eT]:"sigv4",[em]:"s3express",[eg]:"{Region}"}]},[eb]:{}},[eo]:eL}],[eo]:eR},{[ew]:"S3Express bucket name is not a valid virtual hostable name.",[eo]:ew}],[eo]:eR},{[el]:[{fn:eS,[eu]:[{fn:eE,[eu]:[{ref:"url"},"isIp"]},!0]}],[es]:[{[el]:[{fn:"uriEncode",[eu]:[tr],[ed]:"uri_encoded_bucket"}],[es]:[{[eL]:{url:"{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}",[eh]:{[ec]:"S3Express",[ef]:[{[ep]:!0,[eT]:"sigv4-s3express",[em]:"s3express",[eg]:"{Region}"}]},[eb]:{}},[eo]:eL}],[eo]:eR}],[eo]:eR},{[el]:[{fn:ej,[eu]:[tr,!1]}],[es]:[{[eL]:{url:eD,[eh]:{[ec]:"S3Express",[ef]:[{[ep]:!0,[eT]:"sigv4-s3express",[em]:"s3express",[eg]:"{Region}"}]},[eb]:{}},[eo]:eL}],[eo]:eR},{[ew]:"S3Express bucket name is not a valid virtual hostable name.",[eo]:ew}],[eo]:eR},ts={fn:eA,[eu]:[{ref:"Endpoint"}],[ed]:"url"},tl={fn:eS,[eu]:[{fn:eE,[eu]:[{ref:"url"},"isIp"]},!0]},tu={ref:"url"},td={fn:"uriEncode",[eu]:[tr],[ed]:"uri_encoded_bucket"},th={[ec]:"S3Express",[ef]:[{[ep]:!0,[eT]:"sigv4",[em]:"s3express",[eg]:"{Region}"}]},tc={},tf={fn:ej,[eu]:[tr,!1]},tp={[ew]:"S3Express bucket name is not a valid virtual hostable name.",[eo]:ew},tm={fn:e_,[eu]:[{ref:"UseS3ExpressControlEndpoint"}]},tg={fn:eS,[eu]:[{ref:"UseS3ExpressControlEndpoint"},!0]},tb={fn:"not",[eu]:[te]},ty={fn:eS,[eu]:[{ref:"UseDualStack"},!1]},t_={fn:eS,[eu]:[{ref:"UseFIPS"},!1]},tS={[ew]:"Unrecognized S3Express bucket name format.",[eo]:ew},tw={fn:"not",[eu]:[ti]},tv={ref:eN},tx={[el]:[tb],[ew]:"Expected a endpoint to be specified but no endpoint was found",[eo]:ew},tE={[ef]:[{[ep]:!0,[eT]:eY,[em]:eH,[ey]:["*"]},{[ep]:!0,[eT]:"sigv4",[em]:eH,[eg]:"{Region}"}]},tT={fn:eS,[eu]:[{ref:"ForcePathStyle"},!1]},tC={fn:eS,[eu]:[{ref:"Accelerate"},!1]},tk={fn:ex,[eu]:[{ref:"Region"},"aws-global"]},tA={[ef]:[{[ep]:!0,[eT]:"sigv4",[em]:"s3",[eg]:"us-east-1"}]},tL={fn:"not",[eu]:[tk]},tR={fn:eS,[eu]:[{ref:"UseGlobalEndpoint"},!0]},tj={url:"https://{Bucket}.s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",[eh]:{[ef]:[{[ep]:!0,[eT]:"sigv4",[em]:"s3",[eg]:"{Region}"}]},[eb]:{}},tD={[ef]:[{[ep]:!0,[eT]:"sigv4",[em]:"s3",[eg]:"{Region}"}]},tM={fn:eS,[eu]:[{ref:"UseGlobalEndpoint"},!1]},tP={url:"https://{Bucket}.s3-fips.{Region}.{partitionResult#dnsSuffix}",[eh]:tD,[eb]:{}},tN={url:"https://{Bucket}.s3-accelerate.dualstack.{partitionResult#dnsSuffix}",[eh]:tD,[eb]:{}},tO={url:"https://{Bucket}.s3.dualstack.{Region}.{partitionResult#dnsSuffix}",[eh]:tD,[eb]:{}},tB={fn:eS,[eu]:[{fn:eE,[eu]:[tu,"isIp"]},!1]},tI={url:eW,[eh]:tD,[eb]:{}},tF={url:eD,[eh]:tD,[eb]:{}},tY={[eL]:tF,[eo]:eL},tH={url:eZ,[eh]:tD,[eb]:{}},tW={url:"https://{Bucket}.s3.{Region}.{partitionResult#dnsSuffix}",[eh]:tD,[eb]:{}},tZ={[ew]:"Invalid region: region was not a valid DNS name.",[eo]:ew},tJ={ref:eG},tX={ref:e$},tG={fn:eE,[eu]:[tJ,"service"]},t$={ref:eQ},tU={[el]:[e7],[ew]:"S3 Object Lambda does not support Dual-stack",[eo]:ew},tz={[el]:[e5],[ew]:"S3 Object Lambda does not support S3 Accelerate",[eo]:ew},tQ={[el]:[{fn:e_,[eu]:[{ref:"DisableAccessPoints"}]},{fn:eS,[eu]:[{ref:"DisableAccessPoints"},!0]}],[ew]:"Access points are not supported for this operation",[eo]:ew},tK={[el]:[{fn:e_,[eu]:[{ref:"UseArnRegion"}]},{fn:eS,[eu]:[{ref:"UseArnRegion"},!1]},{fn:"not",[eu]:[{fn:ex,[eu]:[{fn:eE,[eu]:[tJ,"region"]},"{Region}"]}]}],[ew]:"Invalid configuration: region from ARN `{bucketArn#region}` does not match client region `{Region}` and UseArnRegion is `false`",[eo]:ew},tq={fn:eE,[eu]:[{ref:"bucketPartition"},eT]},tV={fn:eE,[eu]:[tJ,"accountId"]},t0={[ef]:[{[ep]:!0,[eT]:"sigv4",[em]:eU,[eg]:"{bucketArn#region}"}]},t1={[ew]:"Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `{accessPointName}`",[eo]:ew},t2={[ew]:"Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `{bucketArn#accountId}`",[eo]:ew},t3={[ew]:"Invalid region in ARN: `{bucketArn#region}` (invalid DNS name)",[eo]:ew},t8={[ew]:"Client was configured for partition `{partitionResult#name}` but ARN (`{Bucket}`) has `{bucketPartition#name}`",[eo]:ew},t4={[ew]:"Invalid ARN: The ARN may only contain a single resource component after `accesspoint`.",[eo]:ew},t6={[ew]:"Invalid ARN: Expected a resource of the format `accesspoint:<accesspoint name>` but no name was provided",[eo]:ew},t5={[ef]:[{[ep]:!0,[eT]:"sigv4",[em]:"s3",[eg]:"{bucketArn#region}"}]},t9={[ef]:[{[ep]:!0,[eT]:eY,[em]:eH,[ey]:["*"]},{[ep]:!0,[eT]:"sigv4",[em]:eH,[eg]:"{bucketArn#region}"}]},t7={fn:eX,[eu]:[tr]},ne={url:"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[eh]:tD,[eb]:{}},nt={url:"https://s3-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[eh]:tD,[eb]:{}},nn={url:"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[eh]:tD,[eb]:{}},ni={url:e1,[eh]:tD,[eb]:{}},nr={url:"https://s3.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[eh]:tD,[eb]:{}},na={ref:"UseObjectLambdaEndpoint"},no={[ef]:[{[ep]:!0,[eT]:"sigv4",[em]:eU,[eg]:"{Region}"}]},ns={url:"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",[eh]:tD,[eb]:{}},nl={url:"https://s3-fips.{Region}.{partitionResult#dnsSuffix}",[eh]:tD,[eb]:{}},nu={url:"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}",[eh]:tD,[eb]:{}},nd={url:eP,[eh]:tD,[eb]:{}},nh={url:"https://s3.{Region}.{partitionResult#dnsSuffix}",[eh]:tD,[eb]:{}},nc=[{ref:"Region"}],nf=[e5],np=[te,ts],nm=[{fn:e_,[eu]:[{ref:"DisableS3ExpressSessionAuth"}]},{fn:eS,[eu]:[{ref:"DisableS3ExpressSessionAuth"},!0]}],ng=[tf],nb=[tt],ny=[e9,e7],n_=[e9,ty],nS=[t_,e7],nw=[t_,ty],nv=[{fn:eC,[eu]:[tr,6,14,!0],[ed]:"s3expressAvailabilityZoneId"},{fn:eC,[eu]:[tr,14,16,!0],[ed]:"s3expressAvailabilityZoneDelim"},{fn:ex,[eu]:[{ref:"s3expressAvailabilityZoneDelim"},"--"]}],nx=[{[el]:[e9,e7],[eL]:{url:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}",[eh]:th,[eb]:{}},[eo]:eL},{[el]:n_,[eL]:{url:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",[eh]:th,[eb]:{}},[eo]:eL},{[el]:nS,[eL]:{url:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}",[eh]:th,[eb]:{}},[eo]:eL},{[el]:nw,[eL]:{url:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",[eh]:th,[eb]:{}},[eo]:eL}],nE=[{fn:eC,[eu]:[tr,6,15,!0],[ed]:"s3expressAvailabilityZoneId"},{fn:eC,[eu]:[tr,15,17,!0],[ed]:"s3expressAvailabilityZoneDelim"},{fn:ex,[eu]:[{ref:"s3expressAvailabilityZoneDelim"},"--"]}],nT=[{fn:eC,[eu]:[tr,6,19,!0],[ed]:"s3expressAvailabilityZoneId"},{fn:eC,[eu]:[tr,19,21,!0],[ed]:"s3expressAvailabilityZoneDelim"},{fn:ex,[eu]:[{ref:"s3expressAvailabilityZoneDelim"},"--"]}],nC=[{fn:eC,[eu]:[tr,6,20,!0],[ed]:"s3expressAvailabilityZoneId"},{fn:eC,[eu]:[tr,20,22,!0],[ed]:"s3expressAvailabilityZoneDelim"},{fn:ex,[eu]:[{ref:"s3expressAvailabilityZoneDelim"},"--"]}],nk=[{fn:eC,[eu]:[tr,6,26,!0],[ed]:"s3expressAvailabilityZoneId"},{fn:eC,[eu]:[tr,26,28,!0],[ed]:"s3expressAvailabilityZoneDelim"},{fn:ex,[eu]:[{ref:"s3expressAvailabilityZoneDelim"},"--"]}],nA=[{[el]:[e9,e7],[eL]:{url:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}",[eh]:{[ec]:"S3Express",[ef]:[{[ep]:!0,[eT]:"sigv4-s3express",[em]:"s3express",[eg]:"{Region}"}]},[eb]:{}},[eo]:eL},{[el]:n_,[eL]:{url:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",[eh]:{[ec]:"S3Express",[ef]:[{[ep]:!0,[eT]:"sigv4-s3express",[em]:"s3express",[eg]:"{Region}"}]},[eb]:{}},[eo]:eL},{[el]:nS,[eL]:{url:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}",[eh]:{[ec]:"S3Express",[ef]:[{[ep]:!0,[eT]:"sigv4-s3express",[em]:"s3express",[eg]:"{Region}"}]},[eb]:{}},[eo]:eL},{[el]:nw,[eL]:{url:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",[eh]:{[ec]:"S3Express",[ef]:[{[ep]:!0,[eT]:"sigv4-s3express",[em]:"s3express",[eg]:"{Region}"}]},[eb]:{}},[eo]:eL}],nL=[tr,0,7,!0],nR=[{fn:eC,[eu]:[tr,7,15,!0],[ed]:"s3expressAvailabilityZoneId"},{fn:eC,[eu]:[tr,15,17,!0],[ed]:"s3expressAvailabilityZoneDelim"},{fn:ex,[eu]:[{ref:"s3expressAvailabilityZoneDelim"},"--"]}],nj=[{fn:eC,[eu]:[tr,7,16,!0],[ed]:"s3expressAvailabilityZoneId"},{fn:eC,[eu]:[tr,16,18,!0],[ed]:"s3expressAvailabilityZoneDelim"},{fn:ex,[eu]:[{ref:"s3expressAvailabilityZoneDelim"},"--"]}],nD=[{fn:eC,[eu]:[tr,7,20,!0],[ed]:"s3expressAvailabilityZoneId"},{fn:eC,[eu]:[tr,20,22,!0],[ed]:"s3expressAvailabilityZoneDelim"},{fn:ex,[eu]:[{ref:"s3expressAvailabilityZoneDelim"},"--"]}],nM=[{fn:eC,[eu]:[tr,7,21,!0],[ed]:"s3expressAvailabilityZoneId"},{fn:eC,[eu]:[tr,21,23,!0],[ed]:"s3expressAvailabilityZoneDelim"},{fn:ex,[eu]:[{ref:"s3expressAvailabilityZoneDelim"},"--"]}],nP=[{fn:eC,[eu]:[tr,7,27,!0],[ed]:"s3expressAvailabilityZoneId"},{fn:eC,[eu]:[tr,27,29,!0],[ed]:"s3expressAvailabilityZoneDelim"},{fn:ex,[eu]:[{ref:"s3expressAvailabilityZoneDelim"},"--"]}],nN=[{fn:eF,[eu]:[{ref:eI},!1]}],nO=[{fn:ex,[eu]:[{ref:eO},"beta"]}],nB=[{fn:eF,[eu]:[{ref:"Region"},!1]}],nI=[{fn:ex,[eu]:[{ref:"Region"},"us-east-1"]}],nF=[{fn:ex,[eu]:[tX,ez]}],nY=[{fn:eE,[eu]:[tJ,"resourceId[1]"],[ed]:eQ},{fn:"not",[eu]:[{fn:ex,[eu]:[t$,""]}]}],nH=[e7],nW=[{fn:"not",[eu]:[{fn:ex,[eu]:[{fn:eE,[eu]:[tJ,"region"]},""]}]}],nZ=[{fn:"not",[eu]:[{fn:e_,[eu]:[{fn:eE,[eu]:[tJ,"resourceId[2]"]}]}]}],nJ=[{fn:ev,[eu]:[{fn:eE,[eu]:[tJ,"region"]}],[ed]:"bucketPartition"}],nX=[{fn:ex,[eu]:[tq,{fn:eE,[eu]:[{ref:"partitionResult"},eT]}]}],nG=[{fn:eF,[eu]:[{fn:eE,[eu]:[tJ,"region"]},!0]}],n$=[{fn:eF,[eu]:[tV,!1]}],nU=[{fn:eF,[eu]:[t$,!1]}],nz=[e9],nQ=[{fn:eF,[eu]:[{ref:"Region"},!0]}],nK={version:"1.0",parameters:{Bucket:e8,Region:e8,UseFIPS:e4,UseDualStack:e4,Endpoint:e8,ForcePathStyle:e4,Accelerate:e4,UseGlobalEndpoint:e4,UseObjectLambdaEndpoint:e6,Key:e8,Prefix:e8,CopySource:e8,DisableAccessPoints:e6,DisableMultiRegionAccessPoints:e4,UseArnRegion:e6,UseS3ExpressControlEndpoint:e6,DisableS3ExpressSessionAuth:e6},[es]:[{[el]:[{fn:e_,[eu]:nc}],[es]:[{[el]:[e5,e9],error:"Accelerate cannot be used with FIPS",[eo]:ew},{[el]:[e7,te],error:"Cannot set dual-stack in combination with a custom endpoint.",[eo]:ew},{[el]:[te,e9],error:"A custom endpoint cannot be combined with FIPS",[eo]:ew},{[el]:[te,e5],error:"A custom endpoint cannot be combined with S3 Accelerate",[eo]:ew},{[el]:[e9,tt,tn],error:"Partition does not support FIPS",[eo]:ew},{[el]:[ti,{fn:eC,[eu]:[tr,0,6,!0],[ed]:ek},{fn:ex,[eu]:[{ref:ek},"--x-s3"]}],[es]:[ta,to,{[el]:[tm,tg],[es]:[{[el]:nb,[es]:[{[el]:[td,tb],[es]:[{[el]:ny,endpoint:{url:"https://s3express-control-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[eh]:th,[eb]:tc},[eo]:eL},{[el]:n_,endpoint:{url:"https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[eh]:th,[eb]:tc},[eo]:eL},{[el]:nS,endpoint:{url:"https://s3express-control.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[eh]:th,[eb]:tc},[eo]:eL},{[el]:nw,endpoint:{url:"https://s3express-control.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[eh]:th,[eb]:tc},[eo]:eL}],[eo]:eR}],[eo]:eR}],[eo]:eR},{[el]:ng,[es]:[{[el]:nb,[es]:[{[el]:nm,[es]:[{[el]:nv,[es]:nx,[eo]:eR},{[el]:nE,[es]:nx,[eo]:eR},{[el]:nT,[es]:nx,[eo]:eR},{[el]:nC,[es]:nx,[eo]:eR},{[el]:nk,[es]:nx,[eo]:eR},tS],[eo]:eR},{[el]:nv,[es]:nA,[eo]:eR},{[el]:nE,[es]:nA,[eo]:eR},{[el]:nT,[es]:nA,[eo]:eR},{[el]:nC,[es]:nA,[eo]:eR},{[el]:nk,[es]:nA,[eo]:eR},tS],[eo]:eR}],[eo]:eR},tp],[eo]:eR},{[el]:[ti,{fn:eC,[eu]:nL,[ed]:eM},{fn:ex,[eu]:[{ref:eM},"--xa-s3"]}],[es]:[ta,to,{[el]:ng,[es]:[{[el]:nb,[es]:[{[el]:nm,[es]:[{[el]:nR,[es]:nx,[eo]:eR},{[el]:nj,[es]:nx,[eo]:eR},{[el]:nD,[es]:nx,[eo]:eR},{[el]:nM,[es]:nx,[eo]:eR},{[el]:nP,[es]:nx,[eo]:eR},tS],[eo]:eR},{[el]:nR,[es]:nA,[eo]:eR},{[el]:nj,[es]:nA,[eo]:eR},{[el]:nD,[es]:nA,[eo]:eR},{[el]:nM,[es]:nA,[eo]:eR},{[el]:nP,[es]:nA,[eo]:eR},tS],[eo]:eR}],[eo]:eR},tp],[eo]:eR},{[el]:[tw,tm,tg],[es]:[{[el]:nb,[es]:[{[el]:np,endpoint:{url:eP,[eh]:th,[eb]:tc},[eo]:eL},{[el]:ny,endpoint:{url:"https://s3express-control-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",[eh]:th,[eb]:tc},[eo]:eL},{[el]:n_,endpoint:{url:"https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}",[eh]:th,[eb]:tc},[eo]:eL},{[el]:nS,endpoint:{url:"https://s3express-control.dualstack.{Region}.{partitionResult#dnsSuffix}",[eh]:th,[eb]:tc},[eo]:eL},{[el]:nw,endpoint:{url:"https://s3express-control.{Region}.{partitionResult#dnsSuffix}",[eh]:th,[eb]:tc},[eo]:eL}],[eo]:eR}],[eo]:eR},{[el]:[ti,{fn:eC,[eu]:[tr,49,50,!0],[ed]:eN},{fn:eC,[eu]:[tr,8,12,!0],[ed]:eO},{fn:eC,[eu]:nL,[ed]:eB},{fn:eC,[eu]:[tr,32,49,!0],[ed]:eI},{fn:ev,[eu]:nc,[ed]:"regionPartition"},{fn:ex,[eu]:[{ref:eB},"--op-s3"]}],[es]:[{[el]:nN,[es]:[{[el]:ng,[es]:[{[el]:[{fn:ex,[eu]:[tv,"e"]}],[es]:[{[el]:nO,[es]:[tx,{[el]:np,endpoint:{url:"https://{Bucket}.ec2.{url#authority}",[eh]:tE,[eb]:tc},[eo]:eL}],[eo]:eR},{endpoint:{url:"https://{Bucket}.ec2.s3-outposts.{Region}.{regionPartition#dnsSuffix}",[eh]:tE,[eb]:tc},[eo]:eL}],[eo]:eR},{[el]:[{fn:ex,[eu]:[tv,"o"]}],[es]:[{[el]:nO,[es]:[tx,{[el]:np,endpoint:{url:"https://{Bucket}.op-{outpostId}.{url#authority}",[eh]:tE,[eb]:tc},[eo]:eL}],[eo]:eR},{endpoint:{url:"https://{Bucket}.op-{outpostId}.s3-outposts.{Region}.{regionPartition#dnsSuffix}",[eh]:tE,[eb]:tc},[eo]:eL}],[eo]:eR},{error:'Unrecognized hardware type: "Expected hardware type o or e but got {hardwareType}"',[eo]:ew}],[eo]:eR},{error:"Invalid Outposts Bucket alias - it must be a valid bucket name.",[eo]:ew}],[eo]:eR},{error:"Invalid ARN: The outpost Id must only contain a-z, A-Z, 0-9 and `-`.",[eo]:ew}],[eo]:eR},{[el]:[ti],[es]:[{[el]:[te,{fn:"not",[eu]:[{fn:e_,[eu]:[{fn:eA,[eu]:[{ref:"Endpoint"}]}]}]}],error:"Custom endpoint `{Endpoint}` was not a valid URI",[eo]:ew},{[el]:[tT,tf],[es]:[{[el]:nb,[es]:[{[el]:nB,[es]:[{[el]:[e5,tn],error:"S3 Accelerate cannot be used in this region",[eo]:ew},{[el]:[e7,e9,tC,tb,tk],endpoint:{url:"https://{Bucket}.s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}",[eh]:tA,[eb]:tc},[eo]:eL},{[el]:[e7,e9,tC,tb,tL,tR],[es]:[{endpoint:tj,[eo]:eL}],[eo]:eR},{[el]:[e7,e9,tC,tb,tL,tM],endpoint:tj,[eo]:eL},{[el]:[ty,e9,tC,tb,tk],endpoint:{url:"https://{Bucket}.s3-fips.us-east-1.{partitionResult#dnsSuffix}",[eh]:tA,[eb]:tc},[eo]:eL},{[el]:[ty,e9,tC,tb,tL,tR],[es]:[{endpoint:tP,[eo]:eL}],[eo]:eR},{[el]:[ty,e9,tC,tb,tL,tM],endpoint:tP,[eo]:eL},{[el]:[e7,t_,e5,tb,tk],endpoint:{url:"https://{Bucket}.s3-accelerate.dualstack.us-east-1.{partitionResult#dnsSuffix}",[eh]:tA,[eb]:tc},[eo]:eL},{[el]:[e7,t_,e5,tb,tL,tR],[es]:[{endpoint:tN,[eo]:eL}],[eo]:eR},{[el]:[e7,t_,e5,tb,tL,tM],endpoint:tN,[eo]:eL},{[el]:[e7,t_,tC,tb,tk],endpoint:{url:"https://{Bucket}.s3.dualstack.us-east-1.{partitionResult#dnsSuffix}",[eh]:tA,[eb]:tc},[eo]:eL},{[el]:[e7,t_,tC,tb,tL,tR],[es]:[{endpoint:tO,[eo]:eL}],[eo]:eR},{[el]:[e7,t_,tC,tb,tL,tM],endpoint:tO,[eo]:eL},{[el]:[ty,t_,tC,te,ts,tl,tk],endpoint:{url:eW,[eh]:tA,[eb]:tc},[eo]:eL},{[el]:[ty,t_,tC,te,ts,tB,tk],endpoint:{url:eD,[eh]:tA,[eb]:tc},[eo]:eL},{[el]:[ty,t_,tC,te,ts,tl,tL,tR],[es]:[{[el]:nI,endpoint:tI,[eo]:eL},{endpoint:tI,[eo]:eL}],[eo]:eR},{[el]:[ty,t_,tC,te,ts,tB,tL,tR],[es]:[{[el]:nI,endpoint:tF,[eo]:eL},tY],[eo]:eR},{[el]:[ty,t_,tC,te,ts,tl,tL,tM],endpoint:tI,[eo]:eL},{[el]:[ty,t_,tC,te,ts,tB,tL,tM],endpoint:tF,[eo]:eL},{[el]:[ty,t_,e5,tb,tk],endpoint:{url:eZ,[eh]:tA,[eb]:tc},[eo]:eL},{[el]:[ty,t_,e5,tb,tL,tR],[es]:[{[el]:nI,endpoint:tH,[eo]:eL},{endpoint:tH,[eo]:eL}],[eo]:eR},{[el]:[ty,t_,e5,tb,tL,tM],endpoint:tH,[eo]:eL},{[el]:[ty,t_,tC,tb,tk],endpoint:{url:eJ,[eh]:tA,[eb]:tc},[eo]:eL},{[el]:[ty,t_,tC,tb,tL,tR],[es]:[{[el]:nI,endpoint:{url:eJ,[eh]:tD,[eb]:tc},[eo]:eL},{endpoint:tW,[eo]:eL}],[eo]:eR},{[el]:[ty,t_,tC,tb,tL,tM],endpoint:tW,[eo]:eL}],[eo]:eR},tZ],[eo]:eR}],[eo]:eR},{[el]:[te,ts,{fn:ex,[eu]:[{fn:eE,[eu]:[tu,"scheme"]},"http"]},{fn:ej,[eu]:[tr,!0]},tT,t_,ty,tC],[es]:[{[el]:nb,[es]:[{[el]:nB,[es]:[tY],[eo]:eR},tZ],[eo]:eR}],[eo]:eR},{[el]:[tT,{fn:eX,[eu]:[tr],[ed]:eG}],[es]:[{[el]:[{fn:eE,[eu]:[tJ,"resourceId[0]"],[ed]:e$},{fn:"not",[eu]:[{fn:ex,[eu]:[tX,""]}]}],[es]:[{[el]:[{fn:ex,[eu]:[tG,eU]}],[es]:[{[el]:nF,[es]:[{[el]:nY,[es]:[tU,tz,{[el]:nW,[es]:[tQ,{[el]:nZ,[es]:[tK,{[el]:nJ,[es]:[{[el]:nb,[es]:[{[el]:nX,[es]:[{[el]:nG,[es]:[{[el]:[{fn:ex,[eu]:[tV,""]}],error:"Invalid ARN: Missing account id",[eo]:ew},{[el]:n$,[es]:[{[el]:nU,[es]:[{[el]:np,endpoint:{url:eK,[eh]:t0,[eb]:tc},[eo]:eL},{[el]:nz,endpoint:{url:"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}",[eh]:t0,[eb]:tc},[eo]:eL},{endpoint:{url:"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda.{bucketArn#region}.{bucketPartition#dnsSuffix}",[eh]:t0,[eb]:tc},[eo]:eL}],[eo]:eR},t1],[eo]:eR},t2],[eo]:eR},t3],[eo]:eR},t8],[eo]:eR}],[eo]:eR}],[eo]:eR},t4],[eo]:eR},{error:"Invalid ARN: bucket ARN is missing a region",[eo]:ew}],[eo]:eR},t6],[eo]:eR},{error:"Invalid ARN: Object Lambda ARNs only support `accesspoint` arn types, but found: `{arnType}`",[eo]:ew}],[eo]:eR},{[el]:nF,[es]:[{[el]:nY,[es]:[{[el]:nW,[es]:[{[el]:nF,[es]:[{[el]:nW,[es]:[tQ,{[el]:nZ,[es]:[tK,{[el]:nJ,[es]:[{[el]:nb,[es]:[{[el]:[{fn:ex,[eu]:[tq,"{partitionResult#name}"]}],[es]:[{[el]:nG,[es]:[{[el]:[{fn:ex,[eu]:[tG,"s3"]}],[es]:[{[el]:n$,[es]:[{[el]:nU,[es]:[{[el]:nf,error:"Access Points do not support S3 Accelerate",[eo]:ew},{[el]:ny,endpoint:{url:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}",[eh]:t5,[eb]:tc},[eo]:eL},{[el]:n_,endpoint:{url:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}",[eh]:t5,[eb]:tc},[eo]:eL},{[el]:nS,endpoint:{url:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}",[eh]:t5,[eb]:tc},[eo]:eL},{[el]:[t_,ty,te,ts],endpoint:{url:eK,[eh]:t5,[eb]:tc},[eo]:eL},{[el]:nw,endpoint:{url:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.{bucketArn#region}.{bucketPartition#dnsSuffix}",[eh]:t5,[eb]:tc},[eo]:eL}],[eo]:eR},t1],[eo]:eR},t2],[eo]:eR},{error:"Invalid ARN: The ARN was not for the S3 service, found: {bucketArn#service}",[eo]:ew}],[eo]:eR},t3],[eo]:eR},t8],[eo]:eR}],[eo]:eR}],[eo]:eR},t4],[eo]:eR}],[eo]:eR}],[eo]:eR},{[el]:[{fn:eF,[eu]:[t$,!0]}],[es]:[{[el]:nH,error:"S3 MRAP does not support dual-stack",[eo]:ew},{[el]:nz,error:"S3 MRAP does not support FIPS",[eo]:ew},{[el]:nf,error:"S3 MRAP does not support S3 Accelerate",[eo]:ew},{[el]:[{fn:eS,[eu]:[{ref:"DisableMultiRegionAccessPoints"},!0]}],error:"Invalid configuration: Multi-Region Access Point ARNs are disabled.",[eo]:ew},{[el]:[{fn:ev,[eu]:nc,[ed]:eq}],[es]:[{[el]:[{fn:ex,[eu]:[{fn:eE,[eu]:[{ref:eq},eT]},{fn:eE,[eu]:[tJ,"partition"]}]}],[es]:[{endpoint:{url:"https://{accessPointName}.accesspoint.s3-global.{mrapPartition#dnsSuffix}",[eh]:{[ef]:[{[ep]:!0,name:eY,[em]:"s3",[ey]:["*"]}]},[eb]:tc},[eo]:eL}],[eo]:eR},{error:"Client was configured for partition `{mrapPartition#name}` but bucket referred to partition `{bucketArn#partition}`",[eo]:ew}],[eo]:eR}],[eo]:eR},{error:"Invalid Access Point Name",[eo]:ew}],[eo]:eR},t6],[eo]:eR},{[el]:[{fn:ex,[eu]:[tG,eH]}],[es]:[{[el]:nH,error:"S3 Outposts does not support Dual-stack",[eo]:ew},{[el]:nz,error:"S3 Outposts does not support FIPS",[eo]:ew},{[el]:nf,error:"S3 Outposts does not support S3 Accelerate",[eo]:ew},{[el]:[{fn:e_,[eu]:[{fn:eE,[eu]:[tJ,"resourceId[4]"]}]}],error:"Invalid Arn: Outpost Access Point ARN contains sub resources",[eo]:ew},{[el]:[{fn:eE,[eu]:[tJ,"resourceId[1]"],[ed]:eI}],[es]:[{[el]:nN,[es]:[tK,{[el]:nJ,[es]:[{[el]:nb,[es]:[{[el]:nX,[es]:[{[el]:nG,[es]:[{[el]:n$,[es]:[{[el]:[{fn:eE,[eu]:[tJ,"resourceId[2]"],[ed]:eV}],[es]:[{[el]:[{fn:eE,[eu]:[tJ,"resourceId[3]"],[ed]:eQ}],[es]:[{[el]:[{fn:ex,[eu]:[{ref:eV},ez]}],[es]:[{[el]:np,endpoint:{url:"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.{url#authority}",[eh]:t9,[eb]:tc},[eo]:eL},{endpoint:{url:"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.s3-outposts.{bucketArn#region}.{bucketPartition#dnsSuffix}",[eh]:t9,[eb]:tc},[eo]:eL}],[eo]:eR},{error:"Expected an outpost type `accesspoint`, found {outpostType}",[eo]:ew}],[eo]:eR},{error:"Invalid ARN: expected an access point name",[eo]:ew}],[eo]:eR},{error:"Invalid ARN: Expected a 4-component resource",[eo]:ew}],[eo]:eR},t2],[eo]:eR},t3],[eo]:eR},t8],[eo]:eR}],[eo]:eR}],[eo]:eR},{error:"Invalid ARN: The outpost Id may only contain a-z, A-Z, 0-9 and `-`. Found: `{outpostId}`",[eo]:ew}],[eo]:eR},{error:"Invalid ARN: The Outpost Id was not set",[eo]:ew}],[eo]:eR},{error:"Invalid ARN: Unrecognized format: {Bucket} (type: {arnType})",[eo]:ew}],[eo]:eR},{error:"Invalid ARN: No ARN type specified",[eo]:ew}],[eo]:eR},{[el]:[{fn:eC,[eu]:[tr,0,4,!1],[ed]:e0},{fn:ex,[eu]:[{ref:e0},"arn:"]},{fn:"not",[eu]:[{fn:e_,[eu]:[t7]}]}],error:"Invalid ARN: `{Bucket}` was not a valid ARN",[eo]:ew},{[el]:[{fn:eS,[eu]:[{ref:"ForcePathStyle"},!0]},t7],error:"Path-style addressing cannot be used with ARN buckets",[eo]:ew},{[el]:[td],[es]:[{[el]:nb,[es]:[{[el]:[tC],[es]:[{[el]:[e7,tb,e9,tk],endpoint:{url:"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[eh]:tA,[eb]:tc},[eo]:eL},{[el]:[e7,tb,e9,tL,tR],[es]:[{endpoint:ne,[eo]:eL}],[eo]:eR},{[el]:[e7,tb,e9,tL,tM],endpoint:ne,[eo]:eL},{[el]:[ty,tb,e9,tk],endpoint:{url:"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[eh]:tA,[eb]:tc},[eo]:eL},{[el]:[ty,tb,e9,tL,tR],[es]:[{endpoint:nt,[eo]:eL}],[eo]:eR},{[el]:[ty,tb,e9,tL,tM],endpoint:nt,[eo]:eL},{[el]:[e7,tb,t_,tk],endpoint:{url:"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[eh]:tA,[eb]:tc},[eo]:eL},{[el]:[e7,tb,t_,tL,tR],[es]:[{endpoint:nn,[eo]:eL}],[eo]:eR},{[el]:[e7,tb,t_,tL,tM],endpoint:nn,[eo]:eL},{[el]:[ty,te,ts,t_,tk],endpoint:{url:e1,[eh]:tA,[eb]:tc},[eo]:eL},{[el]:[ty,te,ts,t_,tL,tR],[es]:[{[el]:nI,endpoint:ni,[eo]:eL},{endpoint:ni,[eo]:eL}],[eo]:eR},{[el]:[ty,te,ts,t_,tL,tM],endpoint:ni,[eo]:eL},{[el]:[ty,tb,t_,tk],endpoint:{url:e2,[eh]:tA,[eb]:tc},[eo]:eL},{[el]:[ty,tb,t_,tL,tR],[es]:[{[el]:nI,endpoint:{url:e2,[eh]:tD,[eb]:tc},[eo]:eL},{endpoint:nr,[eo]:eL}],[eo]:eR},{[el]:[ty,tb,t_,tL,tM],endpoint:nr,[eo]:eL}],[eo]:eR},{error:"Path-style addressing cannot be used with S3 Accelerate",[eo]:ew}],[eo]:eR}],[eo]:eR}],[eo]:eR},{[el]:[{fn:e_,[eu]:[na]},{fn:eS,[eu]:[na,!0]}],[es]:[{[el]:nb,[es]:[{[el]:nQ,[es]:[tU,tz,{[el]:np,endpoint:{url:eP,[eh]:no,[eb]:tc},[eo]:eL},{[el]:nz,endpoint:{url:"https://s3-object-lambda-fips.{Region}.{partitionResult#dnsSuffix}",[eh]:no,[eb]:tc},[eo]:eL},{endpoint:{url:"https://s3-object-lambda.{Region}.{partitionResult#dnsSuffix}",[eh]:no,[eb]:tc},[eo]:eL}],[eo]:eR},tZ],[eo]:eR}],[eo]:eR},{[el]:[tw],[es]:[{[el]:nb,[es]:[{[el]:nQ,[es]:[{[el]:[e9,e7,tb,tk],endpoint:{url:"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}",[eh]:tA,[eb]:tc},[eo]:eL},{[el]:[e9,e7,tb,tL,tR],[es]:[{endpoint:ns,[eo]:eL}],[eo]:eR},{[el]:[e9,e7,tb,tL,tM],endpoint:ns,[eo]:eL},{[el]:[e9,ty,tb,tk],endpoint:{url:"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}",[eh]:tA,[eb]:tc},[eo]:eL},{[el]:[e9,ty,tb,tL,tR],[es]:[{endpoint:nl,[eo]:eL}],[eo]:eR},{[el]:[e9,ty,tb,tL,tM],endpoint:nl,[eo]:eL},{[el]:[t_,e7,tb,tk],endpoint:{url:"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}",[eh]:tA,[eb]:tc},[eo]:eL},{[el]:[t_,e7,tb,tL,tR],[es]:[{endpoint:nu,[eo]:eL}],[eo]:eR},{[el]:[t_,e7,tb,tL,tM],endpoint:nu,[eo]:eL},{[el]:[t_,ty,te,ts,tk],endpoint:{url:eP,[eh]:tA,[eb]:tc},[eo]:eL},{[el]:[t_,ty,te,ts,tL,tR],[es]:[{[el]:nI,endpoint:nd,[eo]:eL},{endpoint:nd,[eo]:eL}],[eo]:eR},{[el]:[t_,ty,te,ts,tL,tM],endpoint:nd,[eo]:eL},{[el]:[t_,ty,tb,tk],endpoint:{url:e3,[eh]:tA,[eb]:tc},[eo]:eL},{[el]:[t_,ty,tb,tL,tR],[es]:[{[el]:nI,endpoint:{url:e3,[eh]:tD,[eb]:tc},[eo]:eL},{endpoint:nh,[eo]:eL}],[eo]:eR},{[el]:[t_,ty,tb,tL,tM],endpoint:nh,[eo]:eL}],[eo]:eR},tZ],[eo]:eR}],[eo]:eR}],[eo]:eR},{error:"A region must be set when sending requests to S3.",[eo]:ew}]},nq=new en.k({size:50,params:["Accelerate","Bucket","DisableAccessPoints","DisableMultiRegionAccessPoints","DisableS3ExpressSessionAuth","Endpoint","ForcePathStyle","Region","UseArnRegion","UseDualStack","UseFIPS","UseGlobalEndpoint","UseObjectLambdaEndpoint","UseS3ExpressControlEndpoint"]}),endpointResolver_defaultEndpointResolver=(e,t={})=>nq.get(e,()=>(0,ei.s)(nK,{endpointParams:e,logger:t.logger}));er.m.aws=et.UF;let nV=(i=async(e,t,n)=>({operation:(0,N.u)(t).operation,region:await (0,c.t)(e.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),async(e,t,n)=>{if(!n)throw Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`");let r=await i(e,t,n),a=(0,N.u)(t)?.commandInstance?.constructor?.getEndpointParameterInstructions;if(!a)throw Error(`getEndpointParameterInstructions() is not defined on '${t.commandName}'`);return Object.assign(r,await (0,ee.x)(n,{getEndpointParameterInstructions:a},e))});function createAwsAuthSigv4HttpAuthOption(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"s3",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}function createAwsAuthSigv4aHttpAuthOption(e){return{schemeId:"aws.auth#sigv4a",signingProperties:{name:"s3",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}let n0=(r=e=>{let t=[];return e.operation,t.push(createAwsAuthSigv4HttpAuthOption(e)),t.push(createAwsAuthSigv4aHttpAuthOption(e)),t},a={"aws.auth#sigv4":createAwsAuthSigv4HttpAuthOption,"aws.auth#sigv4a":createAwsAuthSigv4aHttpAuthOption},e=>{let t=endpointResolver_defaultEndpointResolver(e),n=t.properties?.authSchemes;if(!n)return r(e);let i=[];for(let t of n){let r,{name:o,properties:s={},...l}=t,u=o.toLowerCase();if(o!==u&&console.warn(`HttpAuthScheme has been normalized with lowercasing: '${o}' to '${u}'`),"sigv4a"===u){r="aws.auth#sigv4a";let e=n.find(e=>{let t=e.name.toLowerCase();return"sigv4a"!==t&&t.startsWith("sigv4")});if("none"===V.sigv4aDependency()&&e)continue}else if(u.startsWith("sigv4"))r="aws.auth#sigv4";else throw Error(`Unknown HttpAuthScheme found in '@smithy.rules#endpointRuleSet': '${u}'`);let d=a[r];if(!d)throw Error(`Could not find HttpAuthOption create function for '${r}'`);let h=d(e);h.schemeId=r,h.signingProperties={...h.signingProperties||{},...l,...s},i.push(h)}return i});var n1=n("./node_modules/@aws-sdk/middleware-sdk-s3/dist-es/throw-200-exceptions.js"),n2=n("./node_modules/@smithy/middleware-endpoint/dist-es/getEndpointPlugin.js"),n3=n("./node_modules/@smithy/smithy-client/dist-es/command.js"),n8=n("./node_modules/@aws-sdk/client-s3/dist-es/endpoint/EndpointParameters.js"),n4=n("./node_modules/@aws-sdk/client-s3/dist-es/schemas/schemas_0.js");class n6 extends n3.u.classBuilder().ep({...n8.S,DisableS3ExpressSessionAuth:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(e,t,n,i){return[(0,n2.r)(n,e.getEndpointParameterInstructions()),(0,n1.Cg)(n)]}).s("AmazonS3","CreateSession",{}).n("S3Client","CreateSessionCommand").sc(n4.Nsl).build(){}var n5=n("./node_modules/@aws-sdk/core/dist-es/submodules/client/emitWarningIfUnsupportedVersion.js"),n9=n("./node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/NODE_AUTH_SCHEME_PREFERENCE_OPTIONS.js"),n7=n("./node_modules/@aws-sdk/credential-provider-env/dist-es/fromEnv.js"),ie=n("./node_modules/@smithy/property-provider/dist-es/CredentialsProviderError.js"),it=n("./node_modules/@smithy/shared-ini-file-loader/dist-es/getProfileName.js"),ir=n("./node_modules/@smithy/property-provider/dist-es/chain.js");let ia="AWS_EC2_METADATA_DISABLED",remoteProvider=async e=>{let{ENV_CMDS_FULL_URI:t,ENV_CMDS_RELATIVE_URI:i,fromContainerMetadata:r,fromInstanceMetadata:a}=await n.e("560").then(n.bind(n,"./node_modules/@smithy/credential-provider-imds/dist-es/index.js"));if(process.env[i]||process.env[t]){e.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata");let{fromHttp:t}=await n.e("634").then(n.bind(n,"./node_modules/@aws-sdk/credential-provider-http/dist-es/index.js"));return(0,ir.c)(t(e),r(e))}return process.env[ia]&&"false"!==process.env[ia]?async()=>{throw new ie.C("EC2 Instance Metadata Service access disabled",{logger:e.logger})}:(e.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata"),a(e))};function memoizeChain(e,t){let n,i,r,a=internalCreateChain(e),provider=async e=>{if(e?.forceRefresh)return await a(e);if(r?.expiration&&r?.expiration?.getTime()<Date.now()&&(r=void 0),n)await n;else if(!r||t?.(r))if(!r)return n=a(e).then(e=>{r=e,n=void 0}),provider(e);else i||(i=a(e).then(e=>{r=e,i=void 0}));return r};return provider}let internalCreateChain=e=>async t=>{let n;for(let i of e)try{return await i(t)}catch(e){if(n=e,e?.tryNextLink)continue;throw e}throw n},io=!1,defaultProvider=(e={})=>memoizeChain([async()=>{if(e.profile??process.env[it.Ch])throw process.env[n7.yG]&&process.env[n7.pi]&&!io&&((e.logger?.warn&&e.logger?.constructor?.name!=="NoOpLogger"?e.logger.warn.bind(e.logger):console.warn)(`@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING:
75
+ `;for(let r of(0,i.execSync)(`python3 -c '${n.replace(/'/g,"'\"'\"'")}'`,{encoding:"utf-8",timeout:1e4,stdio:["pipe","pipe","pipe"]}).trim().split("\n")){if(r.startsWith("#"))continue;let n=r.indexOf("=");if(n>0){let i=r.substring(0,n),a=r.substring(n+1);(a.startsWith("'")&&a.endsWith("'")||a.startsWith('"')&&a.endsWith('"'))&&(a=a.slice(1,-1)),"COZE_INTEGRATION_BASE_URL"===i?e=a:"COZE_WORKLOAD_IDENTITY_API_KEY"===i&&(t=a)}}}catch{}return r=!0,a={baseUrl:e,apiKey:t}}class o{baseUrl;apiKey;configured;constructor(){try{const e=loadReportEnv();if(this.baseUrl=e.baseUrl,this.apiKey=e.apiKey,this.configured=!!(this.baseUrl&&this.apiKey),!this.configured){const e=[];this.baseUrl||e.push("COZE_INTEGRATION_BASE_URL"),this.apiKey||e.push("COZE_WORKLOAD_IDENTITY_API_KEY"),console.error(`[report] ReportClient not configured: ${e.join(", ")} is missing`)}}catch(e){this.baseUrl="",this.apiKey="",this.configured=!1,console.error("[report] ReportClient config failed:",e)}}async batchReport(e){if(e.length){if(!this.configured)return void console.error(`[report] batchReport skipped: ReportClient is not configured. Set COZE_INTEGRATION_BASE_URL and COZE_WORKLOAD_IDENTITY_API_KEY environment variables. Dropping ${e.length} entries.`);try{let t=`${this.baseUrl}/v1/memory_report/batch_report`,n=await fetch(t,{method:"POST",headers:{"Content-Type":"application/json","x-coze-token":this.apiKey},body:JSON.stringify({entries:e}),signal:AbortSignal.timeout(1e4)});if(!n.ok)throw Error(`batchReport failed: ${n.status} ${n.statusText}`)}catch(e){console.error("[report] batchReport failed:",e)}}}}class s{buffer=[];timer=null;projectId;env;client;destroyed=!1;flushing=!1;pendingFlush=!1;onExitHandler;constructor(e){this.client=e,this.projectId=process.env.COZELOOP_WORKSPACE_ID||null,this.env=process.env.COZE_PROJECT_ENV||null,this.timer=setInterval(()=>this.flush(),6e4),this.timer.unref&&this.timer.unref(),this.onExitHandler=()=>{this.destroyAndExit()},process.on("beforeExit",()=>this.destroy()),process.on("SIGTERM",this.onExitHandler),process.on("SIGINT",this.onExitHandler)}add(e){if(!this.destroyed)try{this.buffer.length>=6e4&&this.buffer.shift(),e.project_id=this.projectId,e.env=this.env,this.buffer.push(e),this.buffer.length>=100&&this.flush().catch(()=>{})}catch(e){console.error("[report] buffer.add failed:",e)}}async flush(){if(this.flushing){this.pendingFlush=!0;return}if(!this.buffer.length)return;this.flushing=!0;let e=this.buffer.splice(0,100);try{await this.client.batchReport(e)}catch(t){console.error("[report] flush failed, re-queuing entries:",t),this.buffer=e.concat(this.buffer)}finally{this.flushing=!1,(this.pendingFlush||this.buffer.length>=100)&&(this.pendingFlush=!1,this.flush().catch(()=>{}))}}destroy(){this.destroyed||(this.destroyed=!0,this.timer&&(clearInterval(this.timer),this.timer=null),process.removeListener("SIGTERM",this.onExitHandler),process.removeListener("SIGINT",this.onExitHandler),this.flush().catch(()=>{}))}destroyAndExit(){if(this.destroyed)return;this.destroyed=!0,this.timer&&(clearInterval(this.timer),this.timer=null),process.removeListener("SIGTERM",this.onExitHandler),process.removeListener("SIGINT",this.onExitHandler);let e=setTimeout(()=>process.exit(0),5e3);e.unref&&e.unref(),this.flush().catch(()=>{}).finally(()=>{clearTimeout(e),process.exit(0)})}}let l=null;function getReportBuffer(){if(l)return l;try{let e=new o;return l=new s(e)}catch(e){return console.error("[report] failed to create singleton buffer:",e),null}}let u=/((?:apikey|api_key|access_key|secret_key|access_token|token|secret|password|authorization|credential|X-Amz-Signature|X-Amz-Credential|X-Amz-Security-Token)=)[^&]*/gi;function truncate(e,t=1024){return null==e?null:e.length<=t?e:e.substring(0,t)+"...[truncated]"}function redactUrl(e){return e.replace(u,"$1***")}function createWrappedFetch(e,t="supabase"){return async(n,i)=>{let r=Date.now();try{let a=await fetch(n,i);return safeRecordLog(e,t,n,i,a,null,r),a}catch(a){throw safeRecordLog(e,t,n,i,null,a,r),a}}}function safeRecordLog(e,t,n,i,r,a,o){try{let s=Date.now()-o,l="string"==typeof n?n:n instanceof URL?n.toString():n.url||"",u=i?.method||(n instanceof Request?n.method:"GET"),d=r?.status??null,h=null;if(i?.body)try{h=truncate("string"==typeof i.body?i.body:JSON.stringify(i.body))}catch{h=null}let c={source:t,project_id:null,env:null,method:u.toUpperCase(),url:redactUrl(l),request_body:h,response_body:null,status_code:d,error:a?.message??null,duration_ms:s,timestamp:o,success:null!==d&&d>=200&&d<300};if(r){let t=r.clone().body?.getReader();t?t.read().then(({value:n})=>{if(n){let e=new TextDecoder().decode(n.slice(0,2048));c.response_body=truncate(e)}t.cancel().catch(()=>{}),e.add(c)}).catch(()=>{e.add(c)}):e.add(c)}else e.add(c)}catch(e){console.error("[report] safeRecordLog error:",e)}}function createS3ReportMiddleware(e){return e?{middleware:(t,n)=>async n=>{let i=Date.now(),{request:r}=n;try{let a=await t(n);return safeRecordS3Log(e,r,a,null,i),a}catch(t){throw safeRecordS3Log(e,r,null,t,i),t}},options:{step:"deserialize",name:"reportLogger",override:!0}}:null}function safeRecordS3Log(e,t,n,i,r){try{let a=Date.now()-r,o=t?.method||"UNKNOWN",s=t?.hostname?`${t.protocol||"https:"}//${t.hostname}${t.path||""}`:"",l=n?.response?.statusCode??null,u=null;if(t?.body)try{let e=t.body;"string"==typeof e?u=truncate(e):Buffer.isBuffer(e)&&(u=truncate(`[Binary ${e.length} bytes]`))}catch{u=null}let d={source:"s3",project_id:null,env:null,method:o.toUpperCase(),url:redactUrl(s),request_body:u,response_body:null,status_code:l,error:i?.message??null,duration_ms:a,timestamp:r,success:null!==l&&l>=200&&l<300};if(n?.output)try{let{Body:e,...t}=n.output;Object.keys(t).length>0&&(d.response_body=truncate(JSON.stringify(t)))}catch{}e.add(d)}catch{}}},"./src/s3/index.ts"(e,t,n){"use strict";let i;n.d(t,{S3Storage:()=>rV});var r,a,o,s,l,u,d=n("./node_modules/@smithy/protocol-http/dist-es/httpRequest.js");function addExpectContinueMiddleware(e){return t=>async n=>{let{request:i}=n;if(!1!==e.expectContinueHeader&&d.K.isInstance(i)&&i.body&&"node"===e.runtime&&e.requestHandler?.constructor?.name!=="FetchHttpHandler"){let t=!0;if("number"==typeof e.expectContinueHeader)try{t=(Number(i.headers?.["content-length"])??e.bodyLengthChecker?.(i.body)??1/0)>=e.expectContinueHeader}catch(e){}else t=!!e.expectContinueHeader;t&&(i.headers.Expect="100-continue")}return t({...n,request:i})}}let h={step:"build",tags:["SET_EXPECT_HEADER","EXPECT_HEADER"],name:"addExpectContinueMiddleware",override:!0};var c=n("./node_modules/@smithy/util-middleware/dist-es/normalizeProvider.js"),f=n("./node_modules/@aws-sdk/middleware-flexible-checksums/dist-es/constants.js"),p=n("./node_modules/@aws-sdk/middleware-host-header/dist-es/index.js"),g=n("./node_modules/@aws-sdk/middleware-logger/dist-es/loggerMiddleware.js"),b=n("./node_modules/@aws-sdk/middleware-recursion-detection/dist-es/getRecursionDetectionPlugin.js");class y{data;lastPurgeTime=Date.now();static EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS=3e4;constructor(e={}){this.data=e}get(e){let t=this.data[e];if(t)return t}set(e,t){return this.data[e]=t,t}delete(e){delete this.data[e]}async purgeExpired(){let e=Date.now();if(!(this.lastPurgeTime+y.EXPIRED_CREDENTIAL_PURGE_INTERVAL_MS>e))for(let t in this.data){let n=this.data[t];if(!n.isRefreshing){let i=await n.identity;i.expiration&&i.expiration.getTime()<e&&delete this.data[t]}}}}class S{_identity;isRefreshing;accessed;constructor(e,t=!1,n=Date.now()){this._identity=e,this.isRefreshing=t,this.accessed=n}get identity(){return this.accessed=Date.now(),this._identity}}class w{createSessionFn;cache;static REFRESH_WINDOW_MS=6e4;constructor(e,t=new y){this.createSessionFn=e,this.cache=t}async getS3ExpressIdentity(e,t){let n=t.Bucket,{cache:i}=this,r=i.get(n);return r?r.identity.then(e=>(e.expiration?.getTime()??0)<Date.now()?i.set(n,new S(this.getIdentity(n))).identity:((e.expiration?.getTime()??0)<Date.now()+w.REFRESH_WINDOW_MS&&!r.isRefreshing&&(r.isRefreshing=!0,this.getIdentity(n).then(e=>{i.set(n,new S(Promise.resolve(e)))})),e)):i.set(n,new S(this.getIdentity(n))).identity}async getIdentity(e){await this.cache.purgeExpired().catch(e=>{console.warn("Error while clearing expired entries in S3ExpressIdentityCache: \n"+e)});let t=await this.createSessionFn(e);if(!t.Credentials?.AccessKeyId||!t.Credentials?.SecretAccessKey)throw Error("s3#createSession response credential missing AccessKeyId or SecretAccessKey.");return{accessKeyId:t.Credentials.AccessKeyId,secretAccessKey:t.Credentials.SecretAccessKey,sessionToken:t.Credentials.SessionToken,expiration:t.Credentials.Expiration?new Date(t.Credentials.Expiration):void 0}}}function bucketEndpointMiddleware(e){return(t,n)=>async i=>{if(e.bucketEndpoint){let e=n.endpointV2;if(e){let t=i.input.Bucket;if("string"==typeof t)try{let i=new URL(t);n.endpointV2={...e,url:i}}catch(i){let e=`@aws-sdk/middleware-sdk-s3: bucketEndpoint=true was set but Bucket=${t} could not be parsed as URL.`;throw n.logger?.constructor?.name==="NoOpLogger"?console.warn(e):n.logger?.warn?.(e),i}}}return t(i)}}let v={name:"bucketEndpointMiddleware",override:!0,relation:"after",toMiddleware:"endpointV2Middleware"};function validateBucketNameMiddleware({bucketEndpoint:e}){return t=>async n=>{let{input:{Bucket:i}}=n;if(!e&&"string"==typeof i&&!("string"==typeof i&&0===i.indexOf("arn:")&&i.split(":").length>=6)&&i.indexOf("/")>=0){let e=Error(`Bucket name shouldn't contain '/', received '${i}'`);throw e.name="InvalidBucketName",e}return t({...n})}}let x={step:"initialize",tags:["VALIDATE_BUCKET_NAME"],name:"validateBucketNameMiddleware",override:!0},T={tags:["REGION_REDIRECT","S3"],name:"regionRedirectEndpointMiddleware",override:!0,relation:"before",toMiddleware:"endpointV2Middleware"};function regionRedirectMiddleware(e){return(t,n)=>async i=>{try{return await t(i)}catch(r){if(e.followRegionRedirects){let a=r?.$metadata?.httpStatusCode,o="HeadBucketCommand"===n.commandName,s=r?.$response?.headers?.["x-amz-bucket-region"];if(s&&(301===a||400===a&&(r?.name==="IllegalLocationConstraintException"||o))){try{n.logger?.debug(`Redirecting from ${await e.region()} to ${s}`),n.__s3RegionRedirect=s}catch(e){throw Error("Region redirect failed: "+e)}return t(i)}}throw r}}}let C={step:"initialize",tags:["REGION_REDIRECT","S3"],name:"regionRedirectMiddleware",override:!0};var k=n("./node_modules/@aws-sdk/core/dist-es/submodules/client/setFeature.js"),A=n("./node_modules/@smithy/util-config-provider/dist-es/booleanSelector.js"),L=n("./node_modules/@smithy/util-config-provider/dist-es/types.js");let R="X-Amz-S3session-Token",j=R.toLowerCase(),D={environmentVariableSelector:e=>(0,A.Q)(e,"AWS_S3_DISABLE_EXPRESS_SESSION_AUTH",L.c.ENV),configFileSelector:e=>(0,A.Q)(e,"s3_disable_express_session_auth",L.c.CONFIG),default:!1},M={name:"s3ExpressMiddleware",step:"build",tags:["S3","S3_EXPRESS"],override:!0};var P=n("./node_modules/@smithy/core/dist-es/middleware-http-signing/getHttpSigningMiddleware.js"),N=n("./node_modules/@smithy/util-middleware/dist-es/getSmithyContext.js");let signS3Express=async(e,t,n,i)=>{let r=await i.signWithCredentials(n,e,{});if(r.headers["X-Amz-Security-Token"]||r.headers["x-amz-security-token"])throw Error("X-Amz-Security-Token must not be set for s3-express requests.");return r};var O=n("./node_modules/@aws-sdk/middleware-user-agent/dist-es/configurations.js"),B=n("./node_modules/@aws-sdk/middleware-user-agent/dist-es/user-agent-middleware.js"),I=n("./node_modules/@smithy/config-resolver/dist-es/regionConfig/resolveRegionConfig.js"),F=n("./node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.js"),Y=n("./node_modules/@smithy/core/dist-es/util-identity-and-auth/DefaultIdentityProviderConfig.js"),H=n("./node_modules/@smithy/core/dist-es/submodules/schema/middleware/getSchemaSerdePlugin.js"),W=n("./node_modules/@smithy/middleware-content-length/dist-es/index.js"),Z=n("./node_modules/@smithy/middleware-endpoint/dist-es/resolveEndpointConfig.js"),J=n("./node_modules/@smithy/middleware-retry/dist-es/configurations.js"),X=n("./node_modules/@smithy/middleware-retry/dist-es/retryMiddleware.js"),G=n("./node_modules/@smithy/smithy-client/dist-es/client.js"),$=n("./node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.js"),U=n("./node_modules/@smithy/core/dist-es/normalizeProvider.js"),z=n("./node_modules/@smithy/property-provider/dist-es/ProviderError.js");let Q={environmentVariableSelector(e){if(e.AWS_SIGV4A_SIGNING_REGION_SET)return e.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map(e=>e.trim());throw new z.m("AWS_SIGV4A_SIGNING_REGION_SET not set in env.",{tryNextLink:!0})},configFileSelector(e){if(e.sigv4a_signing_region_set)return(e.sigv4a_signing_region_set??"").split(",").map(e=>e.trim());throw new z.m("sigv4a_signing_region_set not set in profile.",{tryNextLink:!0})},default:void 0};var K=n("./node_modules/@smithy/signature-v4/dist-es/SignatureV4.js");class q extends K.B{async signWithCredentials(e,t,n){let i=getCredentialsWithoutSessionToken(t);return e.headers[j]=t.sessionToken,setSingleOverride(this,i),this.signRequest(e,n??{})}async presignWithCredentials(e,t,n){let i=getCredentialsWithoutSessionToken(t);return delete e.headers[j],e.headers[R]=t.sessionToken,e.query=e.query??{},e.query[R]=t.sessionToken,setSingleOverride(this,i),this.presign(e,n)}}function getCredentialsWithoutSessionToken(e){return{accessKeyId:e.accessKeyId,secretAccessKey:e.secretAccessKey,expiration:e.expiration}}function setSingleOverride(e,t){let n=setTimeout(()=>{throw Error("SignatureV4S3Express credential override was created but not called.")},10),i=e.credentialProvider;e.credentialProvider=()=>(clearTimeout(n),e.credentialProvider=i,Promise.resolve(t))}class V{sigv4aSigner;sigv4Signer;signerOptions;static sigv4aDependency(){return"none"}constructor(e){this.sigv4Signer=new q(e),this.signerOptions=e}async sign(e,t={}){return"*"===t.signingRegion?this.getSigv4aSigner().sign(e,t):this.sigv4Signer.sign(e,t)}async signWithCredentials(e,t,n={}){if("*"===n.signingRegion){let e=this.getSigv4aSigner();!1;throw Error('signWithCredentials with signingRegion \'*\' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You 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";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt')}return this.sigv4Signer.signWithCredentials(e,t,n)}async presign(e,t={}){if("*"===t.signingRegion){let e=this.getSigv4aSigner();!1;throw Error('presign with signingRegion \'*\' is only supported when using the CRT dependency @aws-sdk/signature-v4-crt. Please check whether you have installed the "@aws-sdk/signature-v4-crt" package explicitly. You 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";]. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt')}return this.sigv4Signer.presign(e,t)}async presignWithCredentials(e,t,n={}){if("*"===n.signingRegion)throw Error("Method presignWithCredentials is not supported for [signingRegion=*].");return this.sigv4Signer.presignWithCredentials(e,t,n)}getSigv4aSigner(){if(!this.sigv4aSigner)if("node"===this.signerOptions.runtime){!0;throw Error("Neither CRT nor JS SigV4a implementation is available. Please load either @aws-sdk/signature-v4-crt or @aws-sdk/signature-v4a. For more information please go to https://github.com/aws/aws-sdk-js-v3#functionality-requiring-aws-common-runtime-crt")}else{!0;throw Error("JS SigV4a implementation is not available or not a valid constructor. Please check whether you have installed the @aws-sdk/signature-v4a package explicitly. The CRT implementation is not available for browsers. You must also register the package by calling [require('@aws-sdk/signature-v4a');] or an ESM equivalent such as [import '@aws-sdk/signature-v4a';]. For more information please go to https://github.com/aws/aws-sdk-js-v3#using-javascript-non-crt-implementation-of-sigv4a")}return this.sigv4aSigner}}var ee=n("./node_modules/@smithy/middleware-endpoint/dist-es/adaptors/getEndpointFromInstructions.js"),et=n("./node_modules/@aws-sdk/util-endpoints/dist-es/index.js"),en=n("./node_modules/@smithy/util-endpoints/dist-es/cache/EndpointCache.js"),ei=n("./node_modules/@smithy/util-endpoints/dist-es/resolveEndpoint.js"),er=n("./node_modules/@smithy/util-endpoints/dist-es/utils/customEndpointFunctions.js");let ea="required",eo="type",es="rules",el="conditions",eu="argv",ed="assign",eh="properties",ec="backend",ef="authSchemes",ep="disableDoubleEncoding",em="signingName",eg="signingRegion",eb="headers",ey="signingRegionSet",e_="isSet",eS="booleanEquals",ew="error",ev="aws.partition",ex="stringEquals",eE="getAttr",eT="name",eC="substring",ek="bucketSuffix",eA="parseURL",eL="endpoint",eR="tree",ej="aws.isVirtualHostableS3Bucket",eD="{url#scheme}://{Bucket}.{url#authority}{url#path}",eM="accessPointSuffix",eP="{url#scheme}://{url#authority}{url#path}",eN="hardwareType",eO="regionPrefix",eB="bucketAliasSuffix",eI="outpostId",eF="isValidHostLabel",eY="sigv4a",eH="s3-outposts",eW="{url#scheme}://{url#authority}{url#normalizedPath}{Bucket}",eZ="https://{Bucket}.s3-accelerate.{partitionResult#dnsSuffix}",eJ="https://{Bucket}.s3.{partitionResult#dnsSuffix}",eX="aws.parseArn",eG="bucketArn",e$="arnType",eU="s3-object-lambda",ez="accesspoint",eQ="accessPointName",eK="{url#scheme}://{accessPointName}-{bucketArn#accountId}.{url#authority}{url#path}",eq="mrapPartition",eV="outpostType",e0="arnPrefix",e1="{url#scheme}://{url#authority}{url#normalizedPath}{uri_encoded_bucket}",e2="https://s3.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",e3="https://s3.{partitionResult#dnsSuffix}",e8={[ea]:!1,[eo]:"string"},e4={[ea]:!0,default:!1,[eo]:"boolean"},e6={[ea]:!1,[eo]:"boolean"},e5={fn:eS,[eu]:[{ref:"Accelerate"},!0]},e9={fn:eS,[eu]:[{ref:"UseFIPS"},!0]},e7={fn:eS,[eu]:[{ref:"UseDualStack"},!0]},te={fn:e_,[eu]:[{ref:"Endpoint"}]},tt={fn:ev,[eu]:[{ref:"Region"}],[ed]:"partitionResult"},tn={fn:ex,[eu]:[{fn:eE,[eu]:[{ref:"partitionResult"},eT]},"aws-cn"]},ti={fn:e_,[eu]:[{ref:"Bucket"}]},tr={ref:"Bucket"},ta={[el]:[e5],[ew]:"S3Express does not support S3 Accelerate.",[eo]:ew},to={[el]:[te,{fn:eA,[eu]:[{ref:"Endpoint"}],[ed]:"url"}],[es]:[{[el]:[{fn:e_,[eu]:[{ref:"DisableS3ExpressSessionAuth"}]},{fn:eS,[eu]:[{ref:"DisableS3ExpressSessionAuth"},!0]}],[es]:[{[el]:[{fn:eS,[eu]:[{fn:eE,[eu]:[{ref:"url"},"isIp"]},!0]}],[es]:[{[el]:[{fn:"uriEncode",[eu]:[tr],[ed]:"uri_encoded_bucket"}],[es]:[{[eL]:{url:"{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}",[eh]:{[ec]:"S3Express",[ef]:[{[ep]:!0,[eT]:"sigv4",[em]:"s3express",[eg]:"{Region}"}]},[eb]:{}},[eo]:eL}],[eo]:eR}],[eo]:eR},{[el]:[{fn:ej,[eu]:[tr,!1]}],[es]:[{[eL]:{url:eD,[eh]:{[ec]:"S3Express",[ef]:[{[ep]:!0,[eT]:"sigv4",[em]:"s3express",[eg]:"{Region}"}]},[eb]:{}},[eo]:eL}],[eo]:eR},{[ew]:"S3Express bucket name is not a valid virtual hostable name.",[eo]:ew}],[eo]:eR},{[el]:[{fn:eS,[eu]:[{fn:eE,[eu]:[{ref:"url"},"isIp"]},!0]}],[es]:[{[el]:[{fn:"uriEncode",[eu]:[tr],[ed]:"uri_encoded_bucket"}],[es]:[{[eL]:{url:"{url#scheme}://{url#authority}/{uri_encoded_bucket}{url#path}",[eh]:{[ec]:"S3Express",[ef]:[{[ep]:!0,[eT]:"sigv4-s3express",[em]:"s3express",[eg]:"{Region}"}]},[eb]:{}},[eo]:eL}],[eo]:eR}],[eo]:eR},{[el]:[{fn:ej,[eu]:[tr,!1]}],[es]:[{[eL]:{url:eD,[eh]:{[ec]:"S3Express",[ef]:[{[ep]:!0,[eT]:"sigv4-s3express",[em]:"s3express",[eg]:"{Region}"}]},[eb]:{}},[eo]:eL}],[eo]:eR},{[ew]:"S3Express bucket name is not a valid virtual hostable name.",[eo]:ew}],[eo]:eR},ts={fn:eA,[eu]:[{ref:"Endpoint"}],[ed]:"url"},tl={fn:eS,[eu]:[{fn:eE,[eu]:[{ref:"url"},"isIp"]},!0]},tu={ref:"url"},td={fn:"uriEncode",[eu]:[tr],[ed]:"uri_encoded_bucket"},th={[ec]:"S3Express",[ef]:[{[ep]:!0,[eT]:"sigv4",[em]:"s3express",[eg]:"{Region}"}]},tc={},tf={fn:ej,[eu]:[tr,!1]},tp={[ew]:"S3Express bucket name is not a valid virtual hostable name.",[eo]:ew},tm={fn:e_,[eu]:[{ref:"UseS3ExpressControlEndpoint"}]},tg={fn:eS,[eu]:[{ref:"UseS3ExpressControlEndpoint"},!0]},tb={fn:"not",[eu]:[te]},ty={fn:eS,[eu]:[{ref:"UseDualStack"},!1]},t_={fn:eS,[eu]:[{ref:"UseFIPS"},!1]},tS={[ew]:"Unrecognized S3Express bucket name format.",[eo]:ew},tw={fn:"not",[eu]:[ti]},tv={ref:eN},tx={[el]:[tb],[ew]:"Expected a endpoint to be specified but no endpoint was found",[eo]:ew},tE={[ef]:[{[ep]:!0,[eT]:eY,[em]:eH,[ey]:["*"]},{[ep]:!0,[eT]:"sigv4",[em]:eH,[eg]:"{Region}"}]},tT={fn:eS,[eu]:[{ref:"ForcePathStyle"},!1]},tC={fn:eS,[eu]:[{ref:"Accelerate"},!1]},tk={fn:ex,[eu]:[{ref:"Region"},"aws-global"]},tA={[ef]:[{[ep]:!0,[eT]:"sigv4",[em]:"s3",[eg]:"us-east-1"}]},tL={fn:"not",[eu]:[tk]},tR={fn:eS,[eu]:[{ref:"UseGlobalEndpoint"},!0]},tj={url:"https://{Bucket}.s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",[eh]:{[ef]:[{[ep]:!0,[eT]:"sigv4",[em]:"s3",[eg]:"{Region}"}]},[eb]:{}},tD={[ef]:[{[ep]:!0,[eT]:"sigv4",[em]:"s3",[eg]:"{Region}"}]},tM={fn:eS,[eu]:[{ref:"UseGlobalEndpoint"},!1]},tP={url:"https://{Bucket}.s3-fips.{Region}.{partitionResult#dnsSuffix}",[eh]:tD,[eb]:{}},tN={url:"https://{Bucket}.s3-accelerate.dualstack.{partitionResult#dnsSuffix}",[eh]:tD,[eb]:{}},tO={url:"https://{Bucket}.s3.dualstack.{Region}.{partitionResult#dnsSuffix}",[eh]:tD,[eb]:{}},tB={fn:eS,[eu]:[{fn:eE,[eu]:[tu,"isIp"]},!1]},tI={url:eW,[eh]:tD,[eb]:{}},tF={url:eD,[eh]:tD,[eb]:{}},tY={[eL]:tF,[eo]:eL},tH={url:eZ,[eh]:tD,[eb]:{}},tW={url:"https://{Bucket}.s3.{Region}.{partitionResult#dnsSuffix}",[eh]:tD,[eb]:{}},tZ={[ew]:"Invalid region: region was not a valid DNS name.",[eo]:ew},tJ={ref:eG},tX={ref:e$},tG={fn:eE,[eu]:[tJ,"service"]},t$={ref:eQ},tU={[el]:[e7],[ew]:"S3 Object Lambda does not support Dual-stack",[eo]:ew},tz={[el]:[e5],[ew]:"S3 Object Lambda does not support S3 Accelerate",[eo]:ew},tQ={[el]:[{fn:e_,[eu]:[{ref:"DisableAccessPoints"}]},{fn:eS,[eu]:[{ref:"DisableAccessPoints"},!0]}],[ew]:"Access points are not supported for this operation",[eo]:ew},tK={[el]:[{fn:e_,[eu]:[{ref:"UseArnRegion"}]},{fn:eS,[eu]:[{ref:"UseArnRegion"},!1]},{fn:"not",[eu]:[{fn:ex,[eu]:[{fn:eE,[eu]:[tJ,"region"]},"{Region}"]}]}],[ew]:"Invalid configuration: region from ARN `{bucketArn#region}` does not match client region `{Region}` and UseArnRegion is `false`",[eo]:ew},tq={fn:eE,[eu]:[{ref:"bucketPartition"},eT]},tV={fn:eE,[eu]:[tJ,"accountId"]},t0={[ef]:[{[ep]:!0,[eT]:"sigv4",[em]:eU,[eg]:"{bucketArn#region}"}]},t1={[ew]:"Invalid ARN: The access point name may only contain a-z, A-Z, 0-9 and `-`. Found: `{accessPointName}`",[eo]:ew},t2={[ew]:"Invalid ARN: The account id may only contain a-z, A-Z, 0-9 and `-`. Found: `{bucketArn#accountId}`",[eo]:ew},t3={[ew]:"Invalid region in ARN: `{bucketArn#region}` (invalid DNS name)",[eo]:ew},t8={[ew]:"Client was configured for partition `{partitionResult#name}` but ARN (`{Bucket}`) has `{bucketPartition#name}`",[eo]:ew},t4={[ew]:"Invalid ARN: The ARN may only contain a single resource component after `accesspoint`.",[eo]:ew},t6={[ew]:"Invalid ARN: Expected a resource of the format `accesspoint:<accesspoint name>` but no name was provided",[eo]:ew},t5={[ef]:[{[ep]:!0,[eT]:"sigv4",[em]:"s3",[eg]:"{bucketArn#region}"}]},t9={[ef]:[{[ep]:!0,[eT]:eY,[em]:eH,[ey]:["*"]},{[ep]:!0,[eT]:"sigv4",[em]:eH,[eg]:"{bucketArn#region}"}]},t7={fn:eX,[eu]:[tr]},ne={url:"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[eh]:tD,[eb]:{}},nt={url:"https://s3-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[eh]:tD,[eb]:{}},nn={url:"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[eh]:tD,[eb]:{}},ni={url:e1,[eh]:tD,[eb]:{}},nr={url:"https://s3.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[eh]:tD,[eb]:{}},na={ref:"UseObjectLambdaEndpoint"},no={[ef]:[{[ep]:!0,[eT]:"sigv4",[em]:eU,[eg]:"{Region}"}]},ns={url:"https://s3-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",[eh]:tD,[eb]:{}},nl={url:"https://s3-fips.{Region}.{partitionResult#dnsSuffix}",[eh]:tD,[eb]:{}},nu={url:"https://s3.dualstack.{Region}.{partitionResult#dnsSuffix}",[eh]:tD,[eb]:{}},nd={url:eP,[eh]:tD,[eb]:{}},nh={url:"https://s3.{Region}.{partitionResult#dnsSuffix}",[eh]:tD,[eb]:{}},nc=[{ref:"Region"}],nf=[e5],np=[te,ts],nm=[{fn:e_,[eu]:[{ref:"DisableS3ExpressSessionAuth"}]},{fn:eS,[eu]:[{ref:"DisableS3ExpressSessionAuth"},!0]}],ng=[tf],nb=[tt],ny=[e9,e7],n_=[e9,ty],nS=[t_,e7],nw=[t_,ty],nv=[{fn:eC,[eu]:[tr,6,14,!0],[ed]:"s3expressAvailabilityZoneId"},{fn:eC,[eu]:[tr,14,16,!0],[ed]:"s3expressAvailabilityZoneDelim"},{fn:ex,[eu]:[{ref:"s3expressAvailabilityZoneDelim"},"--"]}],nx=[{[el]:[e9,e7],[eL]:{url:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}",[eh]:th,[eb]:{}},[eo]:eL},{[el]:n_,[eL]:{url:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",[eh]:th,[eb]:{}},[eo]:eL},{[el]:nS,[eL]:{url:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}",[eh]:th,[eb]:{}},[eo]:eL},{[el]:nw,[eL]:{url:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",[eh]:th,[eb]:{}},[eo]:eL}],nE=[{fn:eC,[eu]:[tr,6,15,!0],[ed]:"s3expressAvailabilityZoneId"},{fn:eC,[eu]:[tr,15,17,!0],[ed]:"s3expressAvailabilityZoneDelim"},{fn:ex,[eu]:[{ref:"s3expressAvailabilityZoneDelim"},"--"]}],nT=[{fn:eC,[eu]:[tr,6,19,!0],[ed]:"s3expressAvailabilityZoneId"},{fn:eC,[eu]:[tr,19,21,!0],[ed]:"s3expressAvailabilityZoneDelim"},{fn:ex,[eu]:[{ref:"s3expressAvailabilityZoneDelim"},"--"]}],nC=[{fn:eC,[eu]:[tr,6,20,!0],[ed]:"s3expressAvailabilityZoneId"},{fn:eC,[eu]:[tr,20,22,!0],[ed]:"s3expressAvailabilityZoneDelim"},{fn:ex,[eu]:[{ref:"s3expressAvailabilityZoneDelim"},"--"]}],nk=[{fn:eC,[eu]:[tr,6,26,!0],[ed]:"s3expressAvailabilityZoneId"},{fn:eC,[eu]:[tr,26,28,!0],[ed]:"s3expressAvailabilityZoneDelim"},{fn:ex,[eu]:[{ref:"s3expressAvailabilityZoneDelim"},"--"]}],nA=[{[el]:[e9,e7],[eL]:{url:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}",[eh]:{[ec]:"S3Express",[ef]:[{[ep]:!0,[eT]:"sigv4-s3express",[em]:"s3express",[eg]:"{Region}"}]},[eb]:{}},[eo]:eL},{[el]:n_,[eL]:{url:"https://{Bucket}.s3express-fips-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",[eh]:{[ec]:"S3Express",[ef]:[{[ep]:!0,[eT]:"sigv4-s3express",[em]:"s3express",[eg]:"{Region}"}]},[eb]:{}},[eo]:eL},{[el]:nS,[eL]:{url:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.dualstack.{Region}.{partitionResult#dnsSuffix}",[eh]:{[ec]:"S3Express",[ef]:[{[ep]:!0,[eT]:"sigv4-s3express",[em]:"s3express",[eg]:"{Region}"}]},[eb]:{}},[eo]:eL},{[el]:nw,[eL]:{url:"https://{Bucket}.s3express-{s3expressAvailabilityZoneId}.{Region}.{partitionResult#dnsSuffix}",[eh]:{[ec]:"S3Express",[ef]:[{[ep]:!0,[eT]:"sigv4-s3express",[em]:"s3express",[eg]:"{Region}"}]},[eb]:{}},[eo]:eL}],nL=[tr,0,7,!0],nR=[{fn:eC,[eu]:[tr,7,15,!0],[ed]:"s3expressAvailabilityZoneId"},{fn:eC,[eu]:[tr,15,17,!0],[ed]:"s3expressAvailabilityZoneDelim"},{fn:ex,[eu]:[{ref:"s3expressAvailabilityZoneDelim"},"--"]}],nj=[{fn:eC,[eu]:[tr,7,16,!0],[ed]:"s3expressAvailabilityZoneId"},{fn:eC,[eu]:[tr,16,18,!0],[ed]:"s3expressAvailabilityZoneDelim"},{fn:ex,[eu]:[{ref:"s3expressAvailabilityZoneDelim"},"--"]}],nD=[{fn:eC,[eu]:[tr,7,20,!0],[ed]:"s3expressAvailabilityZoneId"},{fn:eC,[eu]:[tr,20,22,!0],[ed]:"s3expressAvailabilityZoneDelim"},{fn:ex,[eu]:[{ref:"s3expressAvailabilityZoneDelim"},"--"]}],nM=[{fn:eC,[eu]:[tr,7,21,!0],[ed]:"s3expressAvailabilityZoneId"},{fn:eC,[eu]:[tr,21,23,!0],[ed]:"s3expressAvailabilityZoneDelim"},{fn:ex,[eu]:[{ref:"s3expressAvailabilityZoneDelim"},"--"]}],nP=[{fn:eC,[eu]:[tr,7,27,!0],[ed]:"s3expressAvailabilityZoneId"},{fn:eC,[eu]:[tr,27,29,!0],[ed]:"s3expressAvailabilityZoneDelim"},{fn:ex,[eu]:[{ref:"s3expressAvailabilityZoneDelim"},"--"]}],nN=[{fn:eF,[eu]:[{ref:eI},!1]}],nO=[{fn:ex,[eu]:[{ref:eO},"beta"]}],nB=[{fn:eF,[eu]:[{ref:"Region"},!1]}],nI=[{fn:ex,[eu]:[{ref:"Region"},"us-east-1"]}],nF=[{fn:ex,[eu]:[tX,ez]}],nY=[{fn:eE,[eu]:[tJ,"resourceId[1]"],[ed]:eQ},{fn:"not",[eu]:[{fn:ex,[eu]:[t$,""]}]}],nH=[e7],nW=[{fn:"not",[eu]:[{fn:ex,[eu]:[{fn:eE,[eu]:[tJ,"region"]},""]}]}],nZ=[{fn:"not",[eu]:[{fn:e_,[eu]:[{fn:eE,[eu]:[tJ,"resourceId[2]"]}]}]}],nJ=[{fn:ev,[eu]:[{fn:eE,[eu]:[tJ,"region"]}],[ed]:"bucketPartition"}],nX=[{fn:ex,[eu]:[tq,{fn:eE,[eu]:[{ref:"partitionResult"},eT]}]}],nG=[{fn:eF,[eu]:[{fn:eE,[eu]:[tJ,"region"]},!0]}],n$=[{fn:eF,[eu]:[tV,!1]}],nU=[{fn:eF,[eu]:[t$,!1]}],nz=[e9],nQ=[{fn:eF,[eu]:[{ref:"Region"},!0]}],nK={version:"1.0",parameters:{Bucket:e8,Region:e8,UseFIPS:e4,UseDualStack:e4,Endpoint:e8,ForcePathStyle:e4,Accelerate:e4,UseGlobalEndpoint:e4,UseObjectLambdaEndpoint:e6,Key:e8,Prefix:e8,CopySource:e8,DisableAccessPoints:e6,DisableMultiRegionAccessPoints:e4,UseArnRegion:e6,UseS3ExpressControlEndpoint:e6,DisableS3ExpressSessionAuth:e6},[es]:[{[el]:[{fn:e_,[eu]:nc}],[es]:[{[el]:[e5,e9],error:"Accelerate cannot be used with FIPS",[eo]:ew},{[el]:[e7,te],error:"Cannot set dual-stack in combination with a custom endpoint.",[eo]:ew},{[el]:[te,e9],error:"A custom endpoint cannot be combined with FIPS",[eo]:ew},{[el]:[te,e5],error:"A custom endpoint cannot be combined with S3 Accelerate",[eo]:ew},{[el]:[e9,tt,tn],error:"Partition does not support FIPS",[eo]:ew},{[el]:[ti,{fn:eC,[eu]:[tr,0,6,!0],[ed]:ek},{fn:ex,[eu]:[{ref:ek},"--x-s3"]}],[es]:[ta,to,{[el]:[tm,tg],[es]:[{[el]:nb,[es]:[{[el]:[td,tb],[es]:[{[el]:ny,endpoint:{url:"https://s3express-control-fips.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[eh]:th,[eb]:tc},[eo]:eL},{[el]:n_,endpoint:{url:"https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[eh]:th,[eb]:tc},[eo]:eL},{[el]:nS,endpoint:{url:"https://s3express-control.dualstack.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[eh]:th,[eb]:tc},[eo]:eL},{[el]:nw,endpoint:{url:"https://s3express-control.{Region}.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[eh]:th,[eb]:tc},[eo]:eL}],[eo]:eR}],[eo]:eR}],[eo]:eR},{[el]:ng,[es]:[{[el]:nb,[es]:[{[el]:nm,[es]:[{[el]:nv,[es]:nx,[eo]:eR},{[el]:nE,[es]:nx,[eo]:eR},{[el]:nT,[es]:nx,[eo]:eR},{[el]:nC,[es]:nx,[eo]:eR},{[el]:nk,[es]:nx,[eo]:eR},tS],[eo]:eR},{[el]:nv,[es]:nA,[eo]:eR},{[el]:nE,[es]:nA,[eo]:eR},{[el]:nT,[es]:nA,[eo]:eR},{[el]:nC,[es]:nA,[eo]:eR},{[el]:nk,[es]:nA,[eo]:eR},tS],[eo]:eR}],[eo]:eR},tp],[eo]:eR},{[el]:[ti,{fn:eC,[eu]:nL,[ed]:eM},{fn:ex,[eu]:[{ref:eM},"--xa-s3"]}],[es]:[ta,to,{[el]:ng,[es]:[{[el]:nb,[es]:[{[el]:nm,[es]:[{[el]:nR,[es]:nx,[eo]:eR},{[el]:nj,[es]:nx,[eo]:eR},{[el]:nD,[es]:nx,[eo]:eR},{[el]:nM,[es]:nx,[eo]:eR},{[el]:nP,[es]:nx,[eo]:eR},tS],[eo]:eR},{[el]:nR,[es]:nA,[eo]:eR},{[el]:nj,[es]:nA,[eo]:eR},{[el]:nD,[es]:nA,[eo]:eR},{[el]:nM,[es]:nA,[eo]:eR},{[el]:nP,[es]:nA,[eo]:eR},tS],[eo]:eR}],[eo]:eR},tp],[eo]:eR},{[el]:[tw,tm,tg],[es]:[{[el]:nb,[es]:[{[el]:np,endpoint:{url:eP,[eh]:th,[eb]:tc},[eo]:eL},{[el]:ny,endpoint:{url:"https://s3express-control-fips.dualstack.{Region}.{partitionResult#dnsSuffix}",[eh]:th,[eb]:tc},[eo]:eL},{[el]:n_,endpoint:{url:"https://s3express-control-fips.{Region}.{partitionResult#dnsSuffix}",[eh]:th,[eb]:tc},[eo]:eL},{[el]:nS,endpoint:{url:"https://s3express-control.dualstack.{Region}.{partitionResult#dnsSuffix}",[eh]:th,[eb]:tc},[eo]:eL},{[el]:nw,endpoint:{url:"https://s3express-control.{Region}.{partitionResult#dnsSuffix}",[eh]:th,[eb]:tc},[eo]:eL}],[eo]:eR}],[eo]:eR},{[el]:[ti,{fn:eC,[eu]:[tr,49,50,!0],[ed]:eN},{fn:eC,[eu]:[tr,8,12,!0],[ed]:eO},{fn:eC,[eu]:nL,[ed]:eB},{fn:eC,[eu]:[tr,32,49,!0],[ed]:eI},{fn:ev,[eu]:nc,[ed]:"regionPartition"},{fn:ex,[eu]:[{ref:eB},"--op-s3"]}],[es]:[{[el]:nN,[es]:[{[el]:ng,[es]:[{[el]:[{fn:ex,[eu]:[tv,"e"]}],[es]:[{[el]:nO,[es]:[tx,{[el]:np,endpoint:{url:"https://{Bucket}.ec2.{url#authority}",[eh]:tE,[eb]:tc},[eo]:eL}],[eo]:eR},{endpoint:{url:"https://{Bucket}.ec2.s3-outposts.{Region}.{regionPartition#dnsSuffix}",[eh]:tE,[eb]:tc},[eo]:eL}],[eo]:eR},{[el]:[{fn:ex,[eu]:[tv,"o"]}],[es]:[{[el]:nO,[es]:[tx,{[el]:np,endpoint:{url:"https://{Bucket}.op-{outpostId}.{url#authority}",[eh]:tE,[eb]:tc},[eo]:eL}],[eo]:eR},{endpoint:{url:"https://{Bucket}.op-{outpostId}.s3-outposts.{Region}.{regionPartition#dnsSuffix}",[eh]:tE,[eb]:tc},[eo]:eL}],[eo]:eR},{error:'Unrecognized hardware type: "Expected hardware type o or e but got {hardwareType}"',[eo]:ew}],[eo]:eR},{error:"Invalid Outposts Bucket alias - it must be a valid bucket name.",[eo]:ew}],[eo]:eR},{error:"Invalid ARN: The outpost Id must only contain a-z, A-Z, 0-9 and `-`.",[eo]:ew}],[eo]:eR},{[el]:[ti],[es]:[{[el]:[te,{fn:"not",[eu]:[{fn:e_,[eu]:[{fn:eA,[eu]:[{ref:"Endpoint"}]}]}]}],error:"Custom endpoint `{Endpoint}` was not a valid URI",[eo]:ew},{[el]:[tT,tf],[es]:[{[el]:nb,[es]:[{[el]:nB,[es]:[{[el]:[e5,tn],error:"S3 Accelerate cannot be used in this region",[eo]:ew},{[el]:[e7,e9,tC,tb,tk],endpoint:{url:"https://{Bucket}.s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}",[eh]:tA,[eb]:tc},[eo]:eL},{[el]:[e7,e9,tC,tb,tL,tR],[es]:[{endpoint:tj,[eo]:eL}],[eo]:eR},{[el]:[e7,e9,tC,tb,tL,tM],endpoint:tj,[eo]:eL},{[el]:[ty,e9,tC,tb,tk],endpoint:{url:"https://{Bucket}.s3-fips.us-east-1.{partitionResult#dnsSuffix}",[eh]:tA,[eb]:tc},[eo]:eL},{[el]:[ty,e9,tC,tb,tL,tR],[es]:[{endpoint:tP,[eo]:eL}],[eo]:eR},{[el]:[ty,e9,tC,tb,tL,tM],endpoint:tP,[eo]:eL},{[el]:[e7,t_,e5,tb,tk],endpoint:{url:"https://{Bucket}.s3-accelerate.dualstack.us-east-1.{partitionResult#dnsSuffix}",[eh]:tA,[eb]:tc},[eo]:eL},{[el]:[e7,t_,e5,tb,tL,tR],[es]:[{endpoint:tN,[eo]:eL}],[eo]:eR},{[el]:[e7,t_,e5,tb,tL,tM],endpoint:tN,[eo]:eL},{[el]:[e7,t_,tC,tb,tk],endpoint:{url:"https://{Bucket}.s3.dualstack.us-east-1.{partitionResult#dnsSuffix}",[eh]:tA,[eb]:tc},[eo]:eL},{[el]:[e7,t_,tC,tb,tL,tR],[es]:[{endpoint:tO,[eo]:eL}],[eo]:eR},{[el]:[e7,t_,tC,tb,tL,tM],endpoint:tO,[eo]:eL},{[el]:[ty,t_,tC,te,ts,tl,tk],endpoint:{url:eW,[eh]:tA,[eb]:tc},[eo]:eL},{[el]:[ty,t_,tC,te,ts,tB,tk],endpoint:{url:eD,[eh]:tA,[eb]:tc},[eo]:eL},{[el]:[ty,t_,tC,te,ts,tl,tL,tR],[es]:[{[el]:nI,endpoint:tI,[eo]:eL},{endpoint:tI,[eo]:eL}],[eo]:eR},{[el]:[ty,t_,tC,te,ts,tB,tL,tR],[es]:[{[el]:nI,endpoint:tF,[eo]:eL},tY],[eo]:eR},{[el]:[ty,t_,tC,te,ts,tl,tL,tM],endpoint:tI,[eo]:eL},{[el]:[ty,t_,tC,te,ts,tB,tL,tM],endpoint:tF,[eo]:eL},{[el]:[ty,t_,e5,tb,tk],endpoint:{url:eZ,[eh]:tA,[eb]:tc},[eo]:eL},{[el]:[ty,t_,e5,tb,tL,tR],[es]:[{[el]:nI,endpoint:tH,[eo]:eL},{endpoint:tH,[eo]:eL}],[eo]:eR},{[el]:[ty,t_,e5,tb,tL,tM],endpoint:tH,[eo]:eL},{[el]:[ty,t_,tC,tb,tk],endpoint:{url:eJ,[eh]:tA,[eb]:tc},[eo]:eL},{[el]:[ty,t_,tC,tb,tL,tR],[es]:[{[el]:nI,endpoint:{url:eJ,[eh]:tD,[eb]:tc},[eo]:eL},{endpoint:tW,[eo]:eL}],[eo]:eR},{[el]:[ty,t_,tC,tb,tL,tM],endpoint:tW,[eo]:eL}],[eo]:eR},tZ],[eo]:eR}],[eo]:eR},{[el]:[te,ts,{fn:ex,[eu]:[{fn:eE,[eu]:[tu,"scheme"]},"http"]},{fn:ej,[eu]:[tr,!0]},tT,t_,ty,tC],[es]:[{[el]:nb,[es]:[{[el]:nB,[es]:[tY],[eo]:eR},tZ],[eo]:eR}],[eo]:eR},{[el]:[tT,{fn:eX,[eu]:[tr],[ed]:eG}],[es]:[{[el]:[{fn:eE,[eu]:[tJ,"resourceId[0]"],[ed]:e$},{fn:"not",[eu]:[{fn:ex,[eu]:[tX,""]}]}],[es]:[{[el]:[{fn:ex,[eu]:[tG,eU]}],[es]:[{[el]:nF,[es]:[{[el]:nY,[es]:[tU,tz,{[el]:nW,[es]:[tQ,{[el]:nZ,[es]:[tK,{[el]:nJ,[es]:[{[el]:nb,[es]:[{[el]:nX,[es]:[{[el]:nG,[es]:[{[el]:[{fn:ex,[eu]:[tV,""]}],error:"Invalid ARN: Missing account id",[eo]:ew},{[el]:n$,[es]:[{[el]:nU,[es]:[{[el]:np,endpoint:{url:eK,[eh]:t0,[eb]:tc},[eo]:eL},{[el]:nz,endpoint:{url:"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}",[eh]:t0,[eb]:tc},[eo]:eL},{endpoint:{url:"https://{accessPointName}-{bucketArn#accountId}.s3-object-lambda.{bucketArn#region}.{bucketPartition#dnsSuffix}",[eh]:t0,[eb]:tc},[eo]:eL}],[eo]:eR},t1],[eo]:eR},t2],[eo]:eR},t3],[eo]:eR},t8],[eo]:eR}],[eo]:eR}],[eo]:eR},t4],[eo]:eR},{error:"Invalid ARN: bucket ARN is missing a region",[eo]:ew}],[eo]:eR},t6],[eo]:eR},{error:"Invalid ARN: Object Lambda ARNs only support `accesspoint` arn types, but found: `{arnType}`",[eo]:ew}],[eo]:eR},{[el]:nF,[es]:[{[el]:nY,[es]:[{[el]:nW,[es]:[{[el]:nF,[es]:[{[el]:nW,[es]:[tQ,{[el]:nZ,[es]:[tK,{[el]:nJ,[es]:[{[el]:nb,[es]:[{[el]:[{fn:ex,[eu]:[tq,"{partitionResult#name}"]}],[es]:[{[el]:nG,[es]:[{[el]:[{fn:ex,[eu]:[tG,"s3"]}],[es]:[{[el]:n$,[es]:[{[el]:nU,[es]:[{[el]:nf,error:"Access Points do not support S3 Accelerate",[eo]:ew},{[el]:ny,endpoint:{url:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}",[eh]:t5,[eb]:tc},[eo]:eL},{[el]:n_,endpoint:{url:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint-fips.{bucketArn#region}.{bucketPartition#dnsSuffix}",[eh]:t5,[eb]:tc},[eo]:eL},{[el]:nS,endpoint:{url:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.dualstack.{bucketArn#region}.{bucketPartition#dnsSuffix}",[eh]:t5,[eb]:tc},[eo]:eL},{[el]:[t_,ty,te,ts],endpoint:{url:eK,[eh]:t5,[eb]:tc},[eo]:eL},{[el]:nw,endpoint:{url:"https://{accessPointName}-{bucketArn#accountId}.s3-accesspoint.{bucketArn#region}.{bucketPartition#dnsSuffix}",[eh]:t5,[eb]:tc},[eo]:eL}],[eo]:eR},t1],[eo]:eR},t2],[eo]:eR},{error:"Invalid ARN: The ARN was not for the S3 service, found: {bucketArn#service}",[eo]:ew}],[eo]:eR},t3],[eo]:eR},t8],[eo]:eR}],[eo]:eR}],[eo]:eR},t4],[eo]:eR}],[eo]:eR}],[eo]:eR},{[el]:[{fn:eF,[eu]:[t$,!0]}],[es]:[{[el]:nH,error:"S3 MRAP does not support dual-stack",[eo]:ew},{[el]:nz,error:"S3 MRAP does not support FIPS",[eo]:ew},{[el]:nf,error:"S3 MRAP does not support S3 Accelerate",[eo]:ew},{[el]:[{fn:eS,[eu]:[{ref:"DisableMultiRegionAccessPoints"},!0]}],error:"Invalid configuration: Multi-Region Access Point ARNs are disabled.",[eo]:ew},{[el]:[{fn:ev,[eu]:nc,[ed]:eq}],[es]:[{[el]:[{fn:ex,[eu]:[{fn:eE,[eu]:[{ref:eq},eT]},{fn:eE,[eu]:[tJ,"partition"]}]}],[es]:[{endpoint:{url:"https://{accessPointName}.accesspoint.s3-global.{mrapPartition#dnsSuffix}",[eh]:{[ef]:[{[ep]:!0,name:eY,[em]:"s3",[ey]:["*"]}]},[eb]:tc},[eo]:eL}],[eo]:eR},{error:"Client was configured for partition `{mrapPartition#name}` but bucket referred to partition `{bucketArn#partition}`",[eo]:ew}],[eo]:eR}],[eo]:eR},{error:"Invalid Access Point Name",[eo]:ew}],[eo]:eR},t6],[eo]:eR},{[el]:[{fn:ex,[eu]:[tG,eH]}],[es]:[{[el]:nH,error:"S3 Outposts does not support Dual-stack",[eo]:ew},{[el]:nz,error:"S3 Outposts does not support FIPS",[eo]:ew},{[el]:nf,error:"S3 Outposts does not support S3 Accelerate",[eo]:ew},{[el]:[{fn:e_,[eu]:[{fn:eE,[eu]:[tJ,"resourceId[4]"]}]}],error:"Invalid Arn: Outpost Access Point ARN contains sub resources",[eo]:ew},{[el]:[{fn:eE,[eu]:[tJ,"resourceId[1]"],[ed]:eI}],[es]:[{[el]:nN,[es]:[tK,{[el]:nJ,[es]:[{[el]:nb,[es]:[{[el]:nX,[es]:[{[el]:nG,[es]:[{[el]:n$,[es]:[{[el]:[{fn:eE,[eu]:[tJ,"resourceId[2]"],[ed]:eV}],[es]:[{[el]:[{fn:eE,[eu]:[tJ,"resourceId[3]"],[ed]:eQ}],[es]:[{[el]:[{fn:ex,[eu]:[{ref:eV},ez]}],[es]:[{[el]:np,endpoint:{url:"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.{url#authority}",[eh]:t9,[eb]:tc},[eo]:eL},{endpoint:{url:"https://{accessPointName}-{bucketArn#accountId}.{outpostId}.s3-outposts.{bucketArn#region}.{bucketPartition#dnsSuffix}",[eh]:t9,[eb]:tc},[eo]:eL}],[eo]:eR},{error:"Expected an outpost type `accesspoint`, found {outpostType}",[eo]:ew}],[eo]:eR},{error:"Invalid ARN: expected an access point name",[eo]:ew}],[eo]:eR},{error:"Invalid ARN: Expected a 4-component resource",[eo]:ew}],[eo]:eR},t2],[eo]:eR},t3],[eo]:eR},t8],[eo]:eR}],[eo]:eR}],[eo]:eR},{error:"Invalid ARN: The outpost Id may only contain a-z, A-Z, 0-9 and `-`. Found: `{outpostId}`",[eo]:ew}],[eo]:eR},{error:"Invalid ARN: The Outpost Id was not set",[eo]:ew}],[eo]:eR},{error:"Invalid ARN: Unrecognized format: {Bucket} (type: {arnType})",[eo]:ew}],[eo]:eR},{error:"Invalid ARN: No ARN type specified",[eo]:ew}],[eo]:eR},{[el]:[{fn:eC,[eu]:[tr,0,4,!1],[ed]:e0},{fn:ex,[eu]:[{ref:e0},"arn:"]},{fn:"not",[eu]:[{fn:e_,[eu]:[t7]}]}],error:"Invalid ARN: `{Bucket}` was not a valid ARN",[eo]:ew},{[el]:[{fn:eS,[eu]:[{ref:"ForcePathStyle"},!0]},t7],error:"Path-style addressing cannot be used with ARN buckets",[eo]:ew},{[el]:[td],[es]:[{[el]:nb,[es]:[{[el]:[tC],[es]:[{[el]:[e7,tb,e9,tk],endpoint:{url:"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[eh]:tA,[eb]:tc},[eo]:eL},{[el]:[e7,tb,e9,tL,tR],[es]:[{endpoint:ne,[eo]:eL}],[eo]:eR},{[el]:[e7,tb,e9,tL,tM],endpoint:ne,[eo]:eL},{[el]:[ty,tb,e9,tk],endpoint:{url:"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[eh]:tA,[eb]:tc},[eo]:eL},{[el]:[ty,tb,e9,tL,tR],[es]:[{endpoint:nt,[eo]:eL}],[eo]:eR},{[el]:[ty,tb,e9,tL,tM],endpoint:nt,[eo]:eL},{[el]:[e7,tb,t_,tk],endpoint:{url:"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}/{uri_encoded_bucket}",[eh]:tA,[eb]:tc},[eo]:eL},{[el]:[e7,tb,t_,tL,tR],[es]:[{endpoint:nn,[eo]:eL}],[eo]:eR},{[el]:[e7,tb,t_,tL,tM],endpoint:nn,[eo]:eL},{[el]:[ty,te,ts,t_,tk],endpoint:{url:e1,[eh]:tA,[eb]:tc},[eo]:eL},{[el]:[ty,te,ts,t_,tL,tR],[es]:[{[el]:nI,endpoint:ni,[eo]:eL},{endpoint:ni,[eo]:eL}],[eo]:eR},{[el]:[ty,te,ts,t_,tL,tM],endpoint:ni,[eo]:eL},{[el]:[ty,tb,t_,tk],endpoint:{url:e2,[eh]:tA,[eb]:tc},[eo]:eL},{[el]:[ty,tb,t_,tL,tR],[es]:[{[el]:nI,endpoint:{url:e2,[eh]:tD,[eb]:tc},[eo]:eL},{endpoint:nr,[eo]:eL}],[eo]:eR},{[el]:[ty,tb,t_,tL,tM],endpoint:nr,[eo]:eL}],[eo]:eR},{error:"Path-style addressing cannot be used with S3 Accelerate",[eo]:ew}],[eo]:eR}],[eo]:eR}],[eo]:eR},{[el]:[{fn:e_,[eu]:[na]},{fn:eS,[eu]:[na,!0]}],[es]:[{[el]:nb,[es]:[{[el]:nQ,[es]:[tU,tz,{[el]:np,endpoint:{url:eP,[eh]:no,[eb]:tc},[eo]:eL},{[el]:nz,endpoint:{url:"https://s3-object-lambda-fips.{Region}.{partitionResult#dnsSuffix}",[eh]:no,[eb]:tc},[eo]:eL},{endpoint:{url:"https://s3-object-lambda.{Region}.{partitionResult#dnsSuffix}",[eh]:no,[eb]:tc},[eo]:eL}],[eo]:eR},tZ],[eo]:eR}],[eo]:eR},{[el]:[tw],[es]:[{[el]:nb,[es]:[{[el]:nQ,[es]:[{[el]:[e9,e7,tb,tk],endpoint:{url:"https://s3-fips.dualstack.us-east-1.{partitionResult#dnsSuffix}",[eh]:tA,[eb]:tc},[eo]:eL},{[el]:[e9,e7,tb,tL,tR],[es]:[{endpoint:ns,[eo]:eL}],[eo]:eR},{[el]:[e9,e7,tb,tL,tM],endpoint:ns,[eo]:eL},{[el]:[e9,ty,tb,tk],endpoint:{url:"https://s3-fips.us-east-1.{partitionResult#dnsSuffix}",[eh]:tA,[eb]:tc},[eo]:eL},{[el]:[e9,ty,tb,tL,tR],[es]:[{endpoint:nl,[eo]:eL}],[eo]:eR},{[el]:[e9,ty,tb,tL,tM],endpoint:nl,[eo]:eL},{[el]:[t_,e7,tb,tk],endpoint:{url:"https://s3.dualstack.us-east-1.{partitionResult#dnsSuffix}",[eh]:tA,[eb]:tc},[eo]:eL},{[el]:[t_,e7,tb,tL,tR],[es]:[{endpoint:nu,[eo]:eL}],[eo]:eR},{[el]:[t_,e7,tb,tL,tM],endpoint:nu,[eo]:eL},{[el]:[t_,ty,te,ts,tk],endpoint:{url:eP,[eh]:tA,[eb]:tc},[eo]:eL},{[el]:[t_,ty,te,ts,tL,tR],[es]:[{[el]:nI,endpoint:nd,[eo]:eL},{endpoint:nd,[eo]:eL}],[eo]:eR},{[el]:[t_,ty,te,ts,tL,tM],endpoint:nd,[eo]:eL},{[el]:[t_,ty,tb,tk],endpoint:{url:e3,[eh]:tA,[eb]:tc},[eo]:eL},{[el]:[t_,ty,tb,tL,tR],[es]:[{[el]:nI,endpoint:{url:e3,[eh]:tD,[eb]:tc},[eo]:eL},{endpoint:nh,[eo]:eL}],[eo]:eR},{[el]:[t_,ty,tb,tL,tM],endpoint:nh,[eo]:eL}],[eo]:eR},tZ],[eo]:eR}],[eo]:eR}],[eo]:eR},{error:"A region must be set when sending requests to S3.",[eo]:ew}]},nq=new en.k({size:50,params:["Accelerate","Bucket","DisableAccessPoints","DisableMultiRegionAccessPoints","DisableS3ExpressSessionAuth","Endpoint","ForcePathStyle","Region","UseArnRegion","UseDualStack","UseFIPS","UseGlobalEndpoint","UseObjectLambdaEndpoint","UseS3ExpressControlEndpoint"]}),endpointResolver_defaultEndpointResolver=(e,t={})=>nq.get(e,()=>(0,ei.s)(nK,{endpointParams:e,logger:t.logger}));er.m.aws=et.UF;let nV=(i=async(e,t,n)=>({operation:(0,N.u)(t).operation,region:await (0,c.t)(e.region)()||(()=>{throw Error("expected `region` to be configured for `aws.auth#sigv4`")})()}),async(e,t,n)=>{if(!n)throw Error("Could not find `input` for `defaultEndpointRuleSetHttpAuthSchemeParametersProvider`");let r=await i(e,t,n),a=(0,N.u)(t)?.commandInstance?.constructor?.getEndpointParameterInstructions;if(!a)throw Error(`getEndpointParameterInstructions() is not defined on '${t.commandName}'`);return Object.assign(r,await (0,ee.x)(n,{getEndpointParameterInstructions:a},e))});function createAwsAuthSigv4HttpAuthOption(e){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"s3",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}function createAwsAuthSigv4aHttpAuthOption(e){return{schemeId:"aws.auth#sigv4a",signingProperties:{name:"s3",region:e.region},propertiesExtractor:(e,t)=>({signingProperties:{config:e,context:t}})}}let n0=(r=e=>{let t=[];return e.operation,t.push(createAwsAuthSigv4HttpAuthOption(e)),t.push(createAwsAuthSigv4aHttpAuthOption(e)),t},a={"aws.auth#sigv4":createAwsAuthSigv4HttpAuthOption,"aws.auth#sigv4a":createAwsAuthSigv4aHttpAuthOption},e=>{let t=endpointResolver_defaultEndpointResolver(e),n=t.properties?.authSchemes;if(!n)return r(e);let i=[];for(let t of n){let r,{name:o,properties:s={},...l}=t,u=o.toLowerCase();if(o!==u&&console.warn(`HttpAuthScheme has been normalized with lowercasing: '${o}' to '${u}'`),"sigv4a"===u){r="aws.auth#sigv4a";let e=n.find(e=>{let t=e.name.toLowerCase();return"sigv4a"!==t&&t.startsWith("sigv4")});if("none"===V.sigv4aDependency()&&e)continue}else if(u.startsWith("sigv4"))r="aws.auth#sigv4";else throw Error(`Unknown HttpAuthScheme found in '@smithy.rules#endpointRuleSet': '${u}'`);let d=a[r];if(!d)throw Error(`Could not find HttpAuthOption create function for '${r}'`);let h=d(e);h.schemeId=r,h.signingProperties={...h.signingProperties||{},...l,...s},i.push(h)}return i});var n1=n("./node_modules/@aws-sdk/middleware-sdk-s3/dist-es/throw-200-exceptions.js"),n2=n("./node_modules/@smithy/middleware-endpoint/dist-es/getEndpointPlugin.js"),n3=n("./node_modules/@smithy/smithy-client/dist-es/command.js"),n8=n("./node_modules/@aws-sdk/client-s3/dist-es/endpoint/EndpointParameters.js"),n4=n("./node_modules/@aws-sdk/client-s3/dist-es/schemas/schemas_0.js");class n6 extends n3.u.classBuilder().ep({...n8.S,DisableS3ExpressSessionAuth:{type:"staticContextParams",value:!0},Bucket:{type:"contextParams",name:"Bucket"}}).m(function(e,t,n,i){return[(0,n2.r)(n,e.getEndpointParameterInstructions()),(0,n1.Cg)(n)]}).s("AmazonS3","CreateSession",{}).n("S3Client","CreateSessionCommand").sc(n4.Nsl).build(){}var n5=n("./node_modules/@aws-sdk/core/dist-es/submodules/client/emitWarningIfUnsupportedVersion.js"),n9=n("./node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/NODE_AUTH_SCHEME_PREFERENCE_OPTIONS.js"),n7=n("./node_modules/@aws-sdk/credential-provider-env/dist-es/fromEnv.js"),ie=n("./node_modules/@smithy/property-provider/dist-es/CredentialsProviderError.js"),it=n("./node_modules/@smithy/shared-ini-file-loader/dist-es/getProfileName.js"),ir=n("./node_modules/@smithy/property-provider/dist-es/chain.js");let ia="AWS_EC2_METADATA_DISABLED",remoteProvider=async e=>{let{ENV_CMDS_FULL_URI:t,ENV_CMDS_RELATIVE_URI:i,fromContainerMetadata:r,fromInstanceMetadata:a}=await n.e("560").then(n.bind(n,"./node_modules/@smithy/credential-provider-imds/dist-es/index.js"));if(process.env[i]||process.env[t]){e.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata");let{fromHttp:t}=await n.e("634").then(n.bind(n,"./node_modules/@aws-sdk/credential-provider-http/dist-es/index.js"));return(0,ir.c)(t(e),r(e))}return process.env[ia]&&"false"!==process.env[ia]?async()=>{throw new ie.C("EC2 Instance Metadata Service access disabled",{logger:e.logger})}:(e.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata"),a(e))};function memoizeChain(e,t){let n,i,r,a=internalCreateChain(e),provider=async e=>{if(e?.forceRefresh)return await a(e);if(r?.expiration&&r?.expiration?.getTime()<Date.now()&&(r=void 0),n)await n;else if(!r||t?.(r))if(!r)return n=a(e).then(e=>{r=e,n=void 0}),provider(e);else i||(i=a(e).then(e=>{r=e,i=void 0}));return r};return provider}let internalCreateChain=e=>async t=>{let n;for(let i of e)try{return await i(t)}catch(e){if(n=e,e?.tryNextLink)continue;throw e}throw n},io=!1,defaultProvider=(e={})=>memoizeChain([async()=>{if(e.profile??process.env[it.Ch])throw process.env[n7.yG]&&process.env[n7.pi]&&!io&&((e.logger?.warn&&e.logger?.constructor?.name!=="NoOpLogger"?e.logger.warn.bind(e.logger):console.warn)(`@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING:
76
76
  Multiple credential sources detected:
77
77
  Both AWS_PROFILE and the pair AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY static credentials are set.
78
78
  This SDK will proceed with the AWS_PROFILE value.