@stacksjs/dns 0.64.6 → 0.65.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,28 +1,28 @@
1
1
  // @bun
2
- var rk=Object.create;var{getPrototypeOf:sk,defineProperty:XF,getOwnPropertyNames:fk}=Object;var wk=Object.prototype.hasOwnProperty;var d=(r,f,s)=>{s=r!=null?rk(sk(r)):{};const w=f||!r||!r.__esModule?XF(s,"default",{value:r,enumerable:!0}):s;for(let h of fk(r))if(!wk.call(w,h))XF(w,h,{get:()=>r[h],enumerable:!0});return w};var v=(r,f)=>()=>(f||r((f={exports:{}}).exports,f),f.exports);var Wf=(r,f)=>{for(var s in f)XF(r,s,{get:f[s],enumerable:!0,configurable:!0,set:(w)=>f[s]=()=>w})};var G=(r,f)=>()=>(r&&(f=r(r=0)),f);var Rf=(r)=>{let f=r.httpHandler;return{setHttpHandler(s){f=s},httpHandler(){return f},updateHttpClientConfig(s,w){f.updateHttpClientConfig(s,w)},httpHandlerConfigs(){return f.httpHandlerConfigs()}}},zf=(r)=>{return{httpHandler:r.httpHandler()}};var tC=()=>{};var Es=v((eu,F8)=>{var{defineProperty:hE,getOwnPropertyDescriptor:hk,getOwnPropertyNames:$k}=Object,Ek=Object.prototype.hasOwnProperty,$E=(r,f)=>hE(r,"name",{value:f,configurable:!0}),Ik=(r,f)=>{for(var s in f)hE(r,s,{get:f[s],enumerable:!0})},Fk=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of $k(f))if(!Ek.call(r,h)&&h!==s)hE(r,h,{get:()=>f[h],enumerable:!(w=hk(f,h))||w.enumerable})}return r},Uk=(r)=>Fk(hE({},"__esModule",{value:!0}),r),r8={};Ik(r8,{AlgorithmId:()=>h8,EndpointURLScheme:()=>w8,FieldPosition:()=>$8,HttpApiKeyAuthLocation:()=>f8,HttpAuthLocation:()=>s8,IniSectionType:()=>E8,RequestHandlerProtocol:()=>I8,SMITHY_CONTEXT_KEY:()=>Ak,getDefaultClientConfiguration:()=>Ck,resolveDefaultRuntimeConfig:()=>Lk});F8.exports=Uk(r8);var s8=((r)=>{return r.HEADER="header",r.QUERY="query",r})(s8||{}),f8=((r)=>{return r.HEADER="header",r.QUERY="query",r})(f8||{}),w8=((r)=>{return r.HTTP="http",r.HTTPS="https",r})(w8||{}),h8=((r)=>{return r.MD5="md5",r.CRC32="crc32",r.CRC32C="crc32c",r.SHA1="sha1",r.SHA256="sha256",r})(h8||{}),Tk=$E((r)=>{const f=[];if(r.sha256!==void 0)f.push({algorithmId:()=>"sha256",checksumConstructor:()=>r.sha256});if(r.md5!=null)f.push({algorithmId:()=>"md5",checksumConstructor:()=>r.md5});return{_checksumAlgorithms:f,addChecksumAlgorithm(s){this._checksumAlgorithms.push(s)},checksumAlgorithms(){return this._checksumAlgorithms}}},"getChecksumConfiguration"),Gk=$E((r)=>{const f={};return r.checksumAlgorithms().forEach((s)=>{f[s.algorithmId()]=s.checksumConstructor()}),f},"resolveChecksumRuntimeConfig"),Ck=$E((r)=>{return{...Tk(r)}},"getDefaultClientConfiguration"),Lk=$E((r)=>{return{...Gk(r)}},"resolveDefaultRuntimeConfig"),$8=((r)=>{return r[r.HEADER=0]="HEADER",r[r.TRAILER=1]="TRAILER",r})($8||{}),Ak="__smithy_context",E8=((r)=>{return r.PROFILE="profile",r.SSO_SESSION="sso-session",r.SERVICES="services",r})(E8||{}),I8=((r)=>{return r.HTTP_0_9="http/0.9",r.HTTP_1_0="http/1.0",r.TDS_8_0="tds/8.0",r})(I8||{})});var Wk;var U8=G(()=>{Wk=d(Es(),1)});var T8=()=>{};function Rk(r){return Object.keys(r).reduce((f,s)=>{const w=r[s];return{...f,[s]:Array.isArray(w)?[...w]:w}},{})}class Qr{constructor(r){this.method=r.method||"GET",this.hostname=r.hostname||"localhost",this.port=r.port,this.query=r.query||{},this.headers=r.headers||{},this.body=r.body,this.protocol=r.protocol?r.protocol.slice(-1)!==":"?`${r.protocol}:`:r.protocol:"https:",this.path=r.path?r.path.charAt(0)!=="/"?`/${r.path}`:r.path:"/",this.username=r.username,this.password=r.password,this.fragment=r.fragment}static clone(r){const f=new Qr({...r,headers:{...r.headers}});if(f.query)f.query=Rk(f.query);return f}static isInstance(r){if(!r)return!1;const f=r;return"method"in f&&"protocol"in f&&"hostname"in f&&"path"in f&&typeof f.query==="object"&&typeof f.headers==="object"}clone(){return Qr.clone(this)}}class V0{constructor(r){this.statusCode=r.statusCode,this.reason=r.reason,this.headers=r.headers||{},this.body=r.body}static isInstance(r){if(!r)return!1;const f=r;return typeof f.statusCode==="number"&&typeof f.headers==="object"}}var G8=()=>{};var kr=G(()=>{tC();U8();T8();G8()});function Sf(r){return r}var zk=(r)=>(f)=>async(s)=>{if(!Qr.isInstance(s.request))return f(s);const{request:w}=s,{handlerProtocol:h=""}=r.requestHandler.metadata||{};if(h.indexOf("h2")>=0&&!w.headers[":authority"])delete w.headers.host,w.headers[":authority"]=w.hostname+(w.port?":"+w.port:"");else if(!w.headers.host){let $=w.hostname;if(w.port!=null)$+=`:${w.port}`;w.headers.host=$}return f(s)},Sk,Pf=(r)=>({applyToStack:(f)=>{f.add(zk(r),Sk)}});var xw=G(()=>{kr();Sk={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0}});var Pk=()=>(r,f)=>async(s)=>{try{const w=await r(s),{clientName:h,commandName:$,logger:E,dynamoDbDocumentClientOptions:I={}}=f,{overrideInputFilterSensitiveLog:F,overrideOutputFilterSensitiveLog:U}=I,C=F??f.inputFilterSensitiveLog,L=U??f.outputFilterSensitiveLog,{$metadata:z,...S}=w.output;return E?.info?.({clientName:h,commandName:$,input:C(s.input),output:L(S),metadata:z}),w}catch(w){const{clientName:h,commandName:$,logger:E,dynamoDbDocumentClientOptions:I={}}=f,{overrideInputFilterSensitiveLog:F}=I,U=F??f.inputFilterSensitiveLog;throw E?.error?.({clientName:h,commandName:$,input:U(s.input),error:w,metadata:w.$metadata}),w}},Xk,Xf=(r)=>({applyToStack:(f)=>{f.add(Pk(),Xk)}});var C8=G(()=>{Xk={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0}});var ew=G(()=>{C8()});var L8="X-Amzn-Trace-Id",Yk="AWS_LAMBDA_FUNCTION_NAME",Kk="_X_AMZN_TRACE_ID",Zk=(r)=>(f)=>async(s)=>{const{request:w}=s;if(!Qr.isInstance(w)||r.runtime!=="node"||w.headers.hasOwnProperty(L8))return f(s);const h=process.env[Yk],$=process.env[Kk],E=(I)=>typeof I==="string"&&I.length>0;if(E(h)&&E($))w.headers[L8]=$;return f({...s,request:w})},Jk,Yf=(r)=>({applyToStack:(f)=>{f.add(Zk(r),Jk)}});var nw=G(()=>{kr();Jk={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"}});function Kf(r){return{...r,customUserAgent:typeof r.customUserAgent==="string"?[[r.customUserAgent]]:r.customUserAgent}}var Qk,E1=(r)=>Qk.test(r)||r.startsWith("[")&&r.endsWith("]");var YF=G(()=>{Qk=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$")});var Mk,I1=(r,f=!1)=>{if(!f)return Mk.test(r);const s=r.split(".");for(let w of s)if(!I1(w))return!1;return!0};var KF=G(()=>{Mk=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$")});var pr;var EE=G(()=>{pr={}});var I0="endpoints";function Ys(r){if(typeof r!=="object"||r==null)return r;if("ref"in r)return`\$${Ys(r.ref)}`;if("fn"in r)return`${r.fn}(${(r.argv||[]).map(Ys).join(", ")})`;return JSON.stringify(r,null,2)}var F1=()=>{};var Wr;var A8=G(()=>{Wr=class Wr extends Error{constructor(r){super(r);this.name="EndpointError"}}});var W8=()=>{};var R8=()=>{};var z8=()=>{};var S8=()=>{};var P8=()=>{};var X8=()=>{};var Ks=G(()=>{A8();W8();R8();z8();S8();P8();X8()});var Y8=(r,f)=>r===f;var K8=(r)=>{const f=r.split("."),s=[];for(let w of f){const h=w.indexOf("[");if(h!==-1){if(w.indexOf("]")!==w.length-1)throw new Wr(`Path: '${r}' does not end with ']'`);const $=w.slice(h+1,-1);if(Number.isNaN(parseInt($)))throw new Wr(`Invalid array index: '${$}' in path: '${r}'`);if(h!==0)s.push(w.slice(0,h));s.push($)}else s.push(w)}return s};var Z8=G(()=>{Ks()});var IE=(r,f)=>K8(f).reduce((s,w)=>{if(typeof s!=="object")throw new Wr(`Index '${w}' in '${f}' not found in '${JSON.stringify(r)}'`);else if(Array.isArray(s))return s[parseInt(w)];return s[w]},r);var J8=G(()=>{Ks();Z8()});var Q8=(r)=>r!=null;var M8=(r)=>!r;var FE,ZF,B8=(r)=>{const f=(()=>{try{if(r instanceof URL)return r;if(typeof r==="object"&&"hostname"in r){const{hostname:z,port:S,protocol:Z="",path:k="",query:l={}}=r,M=new URL(`${Z}//${z}${S?`:${S}`:""}${k}`);return M.search=Object.entries(l).map(([y,x])=>`${y}=${x}`).join("&"),M}return new URL(r)}catch(z){return null}})();if(!f)return console.error(`Unable to parse ${JSON.stringify(r)} as a whatwg URL.`),null;const s=f.href,{host:w,hostname:h,pathname:$,protocol:E,search:I}=f;if(I)return null;const F=E.slice(0,-1);if(!Object.values(FE.EndpointURLScheme).includes(F))return null;const U=E1(h),C=s.includes(`${w}:${ZF[F]}`)||typeof r==="string"&&r.includes(`${w}:${ZF[F]}`),L=`${w}${C?`:${ZF[F]}`:""}`;return{scheme:F,authority:L,path:$,normalizedPath:$.endsWith("/")?$:`${$}/`,isIp:U}};var l8=G(()=>{FE=d(Es(),1);YF();ZF={[FE.EndpointURLScheme.HTTP]:80,[FE.EndpointURLScheme.HTTPS]:443}});var H8=(r,f)=>r===f;var V8=(r,f,s,w)=>{if(f>=s||r.length<s)return null;if(!w)return r.substring(f,s);return r.substring(r.length-s,r.length-f)};var D8=(r)=>encodeURIComponent(r).replace(/[!*'()]/g,(f)=>`%${f.charCodeAt(0).toString(16).toUpperCase()}`);var JF=G(()=>{J8();KF();l8()});var k8;var y8=G(()=>{JF();k8={booleanEquals:Y8,getAttr:IE,isSet:Q8,isValidHostLabel:I1,not:M8,parseURL:B8,stringEquals:H8,substring:V8,uriEncode:D8}});var UE=(r,f)=>{const s=[],w={...f.endpointParams,...f.referenceRecord};let h=0;while(h<r.length){const $=r.indexOf("{",h);if($===-1){s.push(r.slice(h));break}s.push(r.slice(h,$));const E=r.indexOf("}",$);if(E===-1){s.push(r.slice($));break}if(r[$+1]==="{"&&r[E+1]==="}")s.push(r.slice($+1,E)),h=E+2;const I=r.substring($+1,E);if(I.includes("#")){const[F,U]=I.split("#");s.push(IE(w[F],U))}else s.push(w[I]);h=E+1}return s.join("")};var QF=G(()=>{JF()});var N8=({ref:r},f)=>{return{...f.endpointParams,...f.referenceRecord}[r]};var D0=(r,f,s)=>{if(typeof r==="string")return UE(r,s);else if(r.fn)return TE(r,s);else if(r.ref)return N8(r,s);throw new Wr(`'${f}': ${String(r)} is not a string, function or reference.`)};var U1=G(()=>{Ks();MF();QF()});var TE=({fn:r,argv:f},s)=>{const w=f.map(($)=>["boolean","number"].includes(typeof $)?$:D0($,"arg",s)),h=r.split(".");if(h[0]in pr&&h[1]!=null)return pr[h[0]][h[1]](...w);return k8[r](...w)};var MF=G(()=>{EE();y8();U1()});var m8=({assign:r,...f},s)=>{if(r&&r in s.referenceRecord)throw new Wr(`'${r}' is already defined in Reference Record.`);const w=TE(f,s);return s.logger?.debug?.(`${I0} evaluateCondition: ${Ys(f)} = ${Ys(w)}`),{result:w===""?!0:!!w,...r!=null&&{toAssign:{name:r,value:w}}}};var i8=G(()=>{F1();Ks();MF()});var ow=(r=[],f)=>{const s={};for(let w of r){const{result:h,toAssign:$}=m8(w,{...f,referenceRecord:{...f.referenceRecord,...s}});if(!h)return{result:h};if($)s[$.name]=$.value,f.logger?.debug?.(`${I0} assign: ${$.name} := ${Ys($.value)}`)}return{result:!0,referenceRecord:s}};var GE=G(()=>{F1();i8()});var q8=(r,f)=>Object.entries(r).reduce((s,[w,h])=>({...s,[w]:h.map(($)=>{const E=D0($,"Header value entry",f);if(typeof E!=="string")throw new Wr(`Header '${w}' value '${E}' is not a string`);return E})}),{});var v8=G(()=>{Ks();U1()});var BF=(r,f)=>{if(Array.isArray(r))return r.map((s)=>BF(s,f));switch(typeof r){case"string":return UE(r,f);case"object":if(r===null)throw new Wr(`Unexpected endpoint property: ${r}`);return CE(r,f);case"boolean":return r;default:throw new Wr(`Unexpected endpoint property type: ${typeof r}`)}};var j8=G(()=>{Ks();QF();lF()});var CE=(r,f)=>Object.entries(r).reduce((s,[w,h])=>({...s,[w]:BF(h,f)}),{});var lF=G(()=>{j8()});var d8=(r,f)=>{const s=D0(r,"Endpoint URL",f);if(typeof s==="string")try{return new URL(s)}catch(w){throw console.error(`Failed to construct URL with ${s}`,w),w}throw new Wr(`Endpoint URL must be a string, got ${typeof s}`)};var O8=G(()=>{Ks();U1()});var c8=(r,f)=>{const{conditions:s,endpoint:w}=r,{result:h,referenceRecord:$}=ow(s,f);if(!h)return;const E={...f,referenceRecord:{...f.referenceRecord,...$}},{url:I,properties:F,headers:U}=w;return f.logger?.debug?.(`${I0} Resolving endpoint from template: ${Ys(w)}`),{...U!=null&&{headers:q8(U,E)},...F!=null&&{properties:CE(F,E)},url:d8(I,E)}};var b8=G(()=>{F1();GE();v8();lF();O8()});var g8=(r,f)=>{const{conditions:s,error:w}=r,{result:h,referenceRecord:$}=ow(s,f);if(!h)return;throw new Wr(D0(w,"Error",{...f,referenceRecord:{...f.referenceRecord,...$}}))};var _8=G(()=>{Ks();GE();U1()});var x8=(r,f)=>{const{conditions:s,rules:w}=r,{result:h,referenceRecord:$}=ow(s,f);if(!h)return;return LE(w,{...f,referenceRecord:{...f.referenceRecord,...$}})};var e8=G(()=>{GE();HF()});var LE=(r,f)=>{for(let s of r)if(s.type==="endpoint"){const w=c8(s,f);if(w)return w}else if(s.type==="error")g8(s,f);else if(s.type==="tree"){const w=x8(s,f);if(w)return w}else throw new Wr(`Unknown endpoint rule: ${s}`);throw new Wr("Rules evaluation failed")};var HF=G(()=>{Ks();b8();_8();e8()});var n8=G(()=>{EE();HF()});var ns=(r,f)=>{const{endpointParams:s,logger:w}=f,{parameters:h,rules:$}=r;f.logger?.debug?.(`${I0} Initial EndpointParams: ${Ys(s)}`);const E=Object.entries(h).filter(([,U])=>U.default!=null).map(([U,C])=>[U,C.default]);if(E.length>0)for(let[U,C]of E)s[U]=s[U]??C;const I=Object.entries(h).filter(([,U])=>U.required).map(([U])=>U);for(let U of I)if(s[U]==null)throw new Wr(`Missing required parameter: '${U}'`);const F=LE($,{endpointParams:s,logger:w,referenceRecord:{}});if(f.endpointParams?.Endpoint)try{const U=new URL(f.endpointParams.Endpoint),{protocol:C,port:L}=U;F.url.protocol=C,F.url.port=L}catch(U){}return f.logger?.debug?.(`${I0} Resolved endpoint: ${Ys(F)}`),F};var o8=G(()=>{F1();Ks();n8()});var os=G(()=>{YF();KF();EE();o8();Ks()});var VF=G(()=>{os()});var DF=(r,f=!1)=>{if(f){for(let s of r.split("."))if(!DF(s))return!1;return!0}if(!I1(r))return!1;if(r.length<3||r.length>63)return!1;if(r!==r.toLowerCase())return!1;if(E1(r))return!1;return!0};var a8=G(()=>{os();VF()});var p8=(r)=>{const f=r.split(":");if(f.length<6)return null;const[s,w,h,$,E,...I]=f;if(s!=="arn"||w===""||h===""||I.join(":")==="")return null;const F=I.map((U)=>U.split("/")).flat();return{partition:w,service:h,region:$,accountId:E,resourceId:F}};var t8;var u8=G(()=>{t8={partitions:[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"aws-global":{description:"AWS Standard global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"AWS China global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"AWS GovCloud (US) global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"c2s.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"AWS ISO (US) global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"sc2s.sgov.gov",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"AWS ISOB (US) global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"cloud.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"csp.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{}}],version:"1.1"}});var lk,Hk="",rL=(r)=>{const{partitions:f}=lk;for(let w of f){const{regions:h,outputs:$}=w;for(let[E,I]of Object.entries(h))if(E===r)return{...$,...I}}for(let w of f){const{regionRegex:h,outputs:$}=w;if(new RegExp(h).test(r))return{...$}}const s=f.find((w)=>w.id==="aws");if(!s)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...s.outputs}},sL=()=>Hk;var kF=G(()=>{u8();lk=t8});var as;var fL=G(()=>{os();a8();kF();as={isVirtualHostableS3Bucket:DF,parseArn:p8,partition:rL};pr.aws=as});var wL=G(()=>{os()});var hL=G(()=>{os()});var $L=()=>{};var EL=()=>{};var IL=()=>{};var FL=()=>{};var UL=()=>{};var TL=G(()=>{hL();$L();EL();IL();FL();UL()});var Lw=G(()=>{fL();kF();VF();wL();TL()});var yF="user-agent",AE="x-amz-user-agent",NF=" ",WE="/",GL,CL,mF="-";var LL=G(()=>{GL=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,CL=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g});var Vk=(r)=>(f,s)=>async(w)=>{const{request:h}=w;if(!Qr.isInstance(h))return f(w);const{headers:$}=h,E=s?.userAgent?.map(iF)||[],I=(await r.defaultUserAgentProvider()).map(iF),F=r?.customUserAgent?.map(iF)||[],U=sL(),C=(U?[U]:[]).concat([...I,...E,...F]).join(NF),L=[...I.filter((z)=>z.startsWith("aws-sdk-")),...F].join(NF);if(r.runtime!=="browser"){if(L)$[AE]=$[AE]?`${$[yF]} ${L}`:L;$[yF]=C}else $[AE]=C;return f({...w,request:h})},iF=(r)=>{const f=r[0].split(WE).map((E)=>E.replace(GL,mF)).join(WE),s=r[1]?.replace(CL,mF),w=f.indexOf(WE),h=f.substring(0,w);let $=f.substring(w+1);if(h==="api")$=$.toLowerCase();return[h,$,s].filter((E)=>E&&E.length>0).reduce((E,I,F)=>{switch(F){case 0:return I;case 1:return`${E}/${I}`;default:return`${E}#${I}`}},"")},Dk,Zf=(r)=>({applyToStack:(f)=>{f.add(Vk(r),Dk)}});var AL=G(()=>{Lw();kr();LL();Dk={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0}});var aw=G(()=>{AL()});var pw=(r,f,s)=>{if(!(f in r))return;if(r[f]==="true")return!0;if(r[f]==="false")return!1;throw new Error(`Cannot load ${s} "${f}". Expected "true" or "false", got ${r[f]}.`)};var k0;var WL=G(()=>{(function(r){r.ENV="env",r.CONFIG="shared config entry"})(k0||(k0={}))});var qF=G(()=>{WL()});var kk="AWS_USE_DUALSTACK_ENDPOINT",yk="use_dualstack_endpoint",Jf;var RL=G(()=>{qF();Jf={environmentVariableSelector:(r)=>pw(r,kk,k0.ENV),configFileSelector:(r)=>pw(r,yk,k0.CONFIG),default:!1}});var Nk="AWS_USE_FIPS_ENDPOINT",mk="use_fips_endpoint",Qf;var zL=G(()=>{qF();Qf={environmentVariableSelector:(r)=>pw(r,Nk,k0.ENV),configFileSelector:(r)=>pw(r,mk,k0.CONFIG),default:!1}});var vF,Zs=(r)=>r[vF.SMITHY_CONTEXT_KEY]||(r[vF.SMITHY_CONTEXT_KEY]={});var SL=G(()=>{vF=d(Es(),1)});var yr=(r)=>{if(typeof r==="function")return r;const f=Promise.resolve(r);return()=>f};var ps=G(()=>{SL()});var PL=G(()=>{ps()});var XL=G(()=>{ps()});var YL=G(()=>{RL();zL();PL();XL()});var Js,Mf;var KL=G(()=>{Js={environmentVariableSelector:(r)=>r.AWS_REGION,configFileSelector:(r)=>r.region,default:()=>{throw new Error("Region is missing")}},Mf={preferredFile:"credentials"}});var RE=(r)=>typeof r==="string"&&(r.startsWith("fips-")||r.endsWith("-fips"));var jF=(r)=>RE(r)?["fips-aws-global","aws-fips"].includes(r)?"us-east-1":r.replace(/fips-(dkr-|prod-)?|-fips/,""):r;var ZL=()=>{};var Bf=(r)=>{const{region:f,useFipsEndpoint:s}=r;if(!f)throw new Error("Region is missing");return{...r,region:async()=>{if(typeof f==="string")return jF(f);const w=await f();return jF(w)},useFipsEndpoint:async()=>{const w=typeof f==="string"?f:await f();if(RE(w))return!0;return typeof s!=="function"?Promise.resolve(!!s):s()}}};var JL=G(()=>{ZL()});var QL=G(()=>{KL();JL()});var ML=()=>{};var BL=()=>{};var lL=()=>{};var HL=G(()=>{ML();BL();lL()});var Qs=G(()=>{YL();QL();HL()});var T1=v((f0r,yL)=>{var{defineProperty:zE,getOwnPropertyDescriptor:ik,getOwnPropertyNames:qk}=Object,vk=Object.prototype.hasOwnProperty,DL=(r,f)=>zE(r,"name",{value:f,configurable:!0}),jk=(r,f)=>{for(var s in f)zE(r,s,{get:f[s],enumerable:!0})},dk=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of qk(f))if(!vk.call(r,h)&&h!==s)zE(r,h,{get:()=>f[h],enumerable:!(w=ik(f,h))||w.enumerable})}return r},Ok=(r)=>dk(zE({},"__esModule",{value:!0}),r),kL={};jk(kL,{getSmithyContext:()=>ck,normalizeProvider:()=>bk});yL.exports=Ok(kL);var VL=Es(),ck=DL((r)=>r[VL.SMITHY_CONTEXT_KEY]||(r[VL.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),bk=DL((r)=>{if(typeof r==="function")return r;const f=Promise.resolve(r);return()=>f},"normalizeProvider")});var Cr=v((w0r,vL)=>{var{defineProperty:SE,getOwnPropertyDescriptor:gk,getOwnPropertyNames:_k}=Object,xk=Object.prototype.hasOwnProperty,Aw=(r,f)=>SE(r,"name",{value:f,configurable:!0}),ek=(r,f)=>{for(var s in f)SE(r,s,{get:f[s],enumerable:!0})},nk=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of _k(f))if(!xk.call(r,h)&&h!==s)SE(r,h,{get:()=>f[h],enumerable:!(w=gk(f,h))||w.enumerable})}return r},ok=(r)=>nk(SE({},"__esModule",{value:!0}),r),NL={};ek(NL,{CredentialsProviderError:()=>ak,ProviderError:()=>PE,TokenProviderError:()=>pk,chain:()=>uk,fromStatic:()=>tk,memoize:()=>ry});vL.exports=ok(NL);var mL=class r extends Error{constructor(f,s=!0){var w;let h,$=!0;if(typeof s==="boolean")h=void 0,$=s;else if(s!=null&&typeof s==="object")h=s.logger,$=s.tryNextLink??!0;super(f);this.name="ProviderError",this.tryNextLink=$,Object.setPrototypeOf(this,r.prototype),(w=h==null?void 0:h.debug)==null||w.call(h,`@smithy/property-provider ${$?"->":"(!)"} ${f}`)}static from(f,s=!0){return Object.assign(new this(f.message,s),f)}};Aw(mL,"ProviderError");var PE=mL,iL=class r extends PE{constructor(f,s=!0){super(f,s);this.name="CredentialsProviderError",Object.setPrototypeOf(this,r.prototype)}};Aw(iL,"CredentialsProviderError");var ak=iL,qL=class r extends PE{constructor(f,s=!0){super(f,s);this.name="TokenProviderError",Object.setPrototypeOf(this,r.prototype)}};Aw(qL,"TokenProviderError");var pk=qL,uk=Aw((...r)=>async()=>{if(r.length===0)throw new PE("No providers in chain");let f;for(let s of r)try{return await s()}catch(w){if(f=w,w==null?void 0:w.tryNextLink)continue;throw w}throw f},"chain"),tk=Aw((r)=>()=>Promise.resolve(r),"fromStatic"),ry=Aw((r,f,s)=>{let w,h,$,E=!1;const I=Aw(async()=>{if(!h)h=r();try{w=await h,$=!0,E=!1}finally{h=void 0}return w},"coalesceProvider");if(f===void 0)return async(F)=>{if(!$||(F==null?void 0:F.forceRefresh))w=await I();return w};return async(F)=>{if(!$||(F==null?void 0:F.forceRefresh))w=await I();if(E)return w;if(s&&!s(w))return E=!0,w;if(f(w))return await I(),w;return w}},"memoize")});var uw=v((jL)=>{Object.defineProperty(jL,"__esModule",{value:!0});jL.getHomeDir=void 0;var sy=import.meta.require("os"),fy=import.meta.require("path"),dF={},wy=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},hy=()=>{const{HOME:r,USERPROFILE:f,HOMEPATH:s,HOMEDRIVE:w=`C:${fy.sep}`}=process.env;if(r)return r;if(f)return f;if(s)return`${w}${s}`;const h=wy();if(!dF[h])dF[h]=sy.homedir();return dF[h]};jL.getHomeDir=hy});var OF=v((OL)=>{Object.defineProperty(OL,"__esModule",{value:!0});OL.getSSOTokenFilepath=void 0;var $y=import.meta.require("crypto"),Ey=import.meta.require("path"),Iy=uw(),Fy=(r)=>{const s=$y.createHash("sha1").update(r).digest("hex");return Ey.join(Iy.getHomeDir(),".aws","sso","cache",`${s}.json`)};OL.getSSOTokenFilepath=Fy});var _L=v((bL)=>{Object.defineProperty(bL,"__esModule",{value:!0});bL.getSSOTokenFromFile=void 0;var Uy=import.meta.require("fs"),Ty=OF(),{readFile:Gy}=Uy.promises,Cy=async(r)=>{const f=Ty.getSSOTokenFilepath(r),s=await Gy(f,"utf8");return JSON.parse(s)};bL.getSSOTokenFromFile=Cy});var bF=v((xL)=>{Object.defineProperty(xL,"__esModule",{value:!0});xL.slurpFile=void 0;var Ly=import.meta.require("fs"),{readFile:Ay}=Ly.promises,cF={},Wy=(r,f)=>{if(!cF[r]||(f===null||f===void 0?void 0:f.ignoreCache))cF[r]=Ay(r,"utf8");return cF[r]};xL.slurpFile=Wy});var eF=v((F0r,C1)=>{var{defineProperty:KE,getOwnPropertyDescriptor:Ry,getOwnPropertyNames:zy}=Object,Sy=Object.prototype.hasOwnProperty,Ms=(r,f)=>KE(r,"name",{value:f,configurable:!0}),Py=(r,f)=>{for(var s in f)KE(r,s,{get:f[s],enumerable:!0})},gF=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of zy(f))if(!Sy.call(r,h)&&h!==s)KE(r,h,{get:()=>f[h],enumerable:!(w=Ry(f,h))||w.enumerable})}return r},xF=(r,f,s)=>(gF(r,f,"default"),s&&gF(s,f,"default")),Xy=(r)=>gF(KE({},"__esModule",{value:!0}),r),G1={};Py(G1,{CONFIG_PREFIX_SEPARATOR:()=>Ww,DEFAULT_PROFILE:()=>pL,ENV_PROFILE:()=>aL,getProfileName:()=>Yy,loadSharedConfigFiles:()=>tL,loadSsoSessionData:()=>Ny,parseKnownFiles:()=>iy});C1.exports=Xy(G1);xF(G1,uw(),C1.exports);var aL="AWS_PROFILE",pL="default",Yy=Ms((r)=>r.profile||process.env[aL]||pL,"getProfileName");xF(G1,OF(),C1.exports);xF(G1,_L(),C1.exports);var XE=Es(),Ky=Ms((r)=>Object.entries(r).filter(([f])=>{const s=f.indexOf(Ww);if(s===-1)return!1;return Object.values(XE.IniSectionType).includes(f.substring(0,s))}).reduce((f,[s,w])=>{const h=s.indexOf(Ww),$=s.substring(0,h)===XE.IniSectionType.PROFILE?s.substring(h+1):s;return f[$]=w,f},{...r.default&&{default:r.default}}),"getConfigData"),YE=import.meta.require("path"),Zy=uw(),Jy="AWS_CONFIG_FILE",uL=Ms(()=>process.env[Jy]||YE.join(Zy.getHomeDir(),".aws","config"),"getConfigFilepath"),Qy=uw(),My="AWS_SHARED_CREDENTIALS_FILE",By=Ms(()=>process.env[My]||YE.join(Qy.getHomeDir(),".aws","credentials"),"getCredentialsFilepath"),ly=uw(),Hy=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,Vy=["__proto__","profile __proto__"],_F=Ms((r)=>{const f={};let s,w;for(let h of r.split(/\r?\n/)){const $=h.split(/(^|\s)[;#]/)[0].trim();if($[0]==="["&&$[$.length-1]==="]"){s=void 0,w=void 0;const I=$.substring(1,$.length-1),F=Hy.exec(I);if(F){const[,U,,C]=F;if(Object.values(XE.IniSectionType).includes(U))s=[U,C].join(Ww)}else s=I;if(Vy.includes(I))throw new Error(`Found invalid profile name "${I}"`)}else if(s){const I=$.indexOf("=");if(![0,-1].includes(I)){const[F,U]=[$.substring(0,I).trim(),$.substring(I+1).trim()];if(U==="")w=F;else{if(w&&h.trimStart()===h)w=void 0;f[s]=f[s]||{};const C=w?[w,F].join(Ww):F;f[s][C]=U}}}}return f},"parseIni"),nL=bF(),oL=Ms(()=>({}),"swallowError"),Ww=".",tL=Ms(async(r={})=>{const{filepath:f=By(),configFilepath:s=uL()}=r,w=ly.getHomeDir();let $=f;if(f.startsWith("~/"))$=YE.join(w,f.slice(2));let E=s;if(s.startsWith("~/"))E=YE.join(w,s.slice(2));const I=await Promise.all([nL.slurpFile(E,{ignoreCache:r.ignoreCache}).then(_F).then(Ky).catch(oL),nL.slurpFile($,{ignoreCache:r.ignoreCache}).then(_F).catch(oL)]);return{configFile:I[0],credentialsFile:I[1]}},"loadSharedConfigFiles"),Dy=Ms((r)=>Object.entries(r).filter(([f])=>f.startsWith(XE.IniSectionType.SSO_SESSION+Ww)).reduce((f,[s,w])=>({...f,[s.substring(s.indexOf(Ww)+1)]:w}),{}),"getSsoSessionData"),ky=bF(),yy=Ms(()=>({}),"swallowError"),Ny=Ms(async(r={})=>ky.slurpFile(r.configFilepath??uL()).then(_F).then(Dy).catch(yy),"loadSsoSessionData"),my=Ms((...r)=>{const f={};for(let s of r)for(let[w,h]of Object.entries(s))if(f[w]!==void 0)Object.assign(f[w],h);else f[w]=h;return f},"mergeConfigFiles"),iy=Ms(async(r)=>{const f=await tL(r);return my(f.configFile,f.credentialsFile)},"parseKnownFiles")});var wA=v((U0r,fA)=>{function nF(r){try{const f=new Set(Array.from(r.match(/([A-Z_]){3,}/g)??[]));return f.delete("CONFIG"),f.delete("CONFIG_PREFIX_SEPARATOR"),f.delete("ENV"),[...f].join(", ")}catch(f){return r}}var{defineProperty:ZE,getOwnPropertyDescriptor:qy,getOwnPropertyNames:vy}=Object,jy=Object.prototype.hasOwnProperty,tw=(r,f)=>ZE(r,"name",{value:f,configurable:!0}),dy=(r,f)=>{for(var s in f)ZE(r,s,{get:f[s],enumerable:!0})},Oy=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of vy(f))if(!jy.call(r,h)&&h!==s)ZE(r,h,{get:()=>f[h],enumerable:!(w=qy(f,h))||w.enumerable})}return r},cy=(r)=>Oy(ZE({},"__esModule",{value:!0}),r),sA={};dy(sA,{loadConfig:()=>ey});fA.exports=cy(sA);var L1=Cr();tw(nF,"getSelectorName");var by=tw((r,f)=>async()=>{try{const s=r(process.env);if(s===void 0)throw new Error;return s}catch(s){throw new L1.CredentialsProviderError(s.message||`Not found in ENV: ${nF(r.toString())}`,{logger:f})}},"fromEnv"),rA=eF(),gy=tw((r,{preferredFile:f="config",...s}={})=>async()=>{const w=rA.getProfileName(s),{configFile:h,credentialsFile:$}=await rA.loadSharedConfigFiles(s),E=$[w]||{},I=h[w]||{},F=f==="config"?{...E,...I}:{...I,...E};try{const C=r(F,f==="config"?h:$);if(C===void 0)throw new Error;return C}catch(U){throw new L1.CredentialsProviderError(U.message||`Not found in config files w/ profile [${w}]: ${nF(r.toString())}`,{logger:s.logger})}},"fromSharedConfigFiles"),_y=tw((r)=>typeof r==="function","isFunction"),xy=tw((r)=>_y(r)?async()=>await r():L1.fromStatic(r),"fromStatic"),ey=tw(({environmentVariableSelector:r,configFileSelector:f,default:s},w={})=>L1.memoize(L1.chain(by(r),gy(f,w),xy(s))),"loadConfig")});var UA=v((IA)=>{Object.defineProperty(IA,"__esModule",{value:!0});IA.getEndpointUrlConfig=void 0;var hA=eF(),$A="AWS_ENDPOINT_URL",EA="endpoint_url",ny=(r)=>({environmentVariableSelector:(f)=>{const s=r.split(" ").map(($)=>$.toUpperCase()),w=f[[$A,...s].join("_")];if(w)return w;const h=f[$A];if(h)return h;return},configFileSelector:(f,s)=>{if(s&&f.services){const h=s[["services",f.services].join(hA.CONFIG_PREFIX_SEPARATOR)];if(h){const $=r.split(" ").map((I)=>I.toLowerCase()),E=h[[$.join("_"),EA].join(hA.CONFIG_PREFIX_SEPARATOR)];if(E)return E}}const w=f[EA];if(w)return w;return},default:void 0});IA.getEndpointUrlConfig=ny});var CA=v((TA)=>{Object.defineProperty(TA,"__esModule",{value:!0});TA.getEndpointFromConfig=void 0;var oy=wA(),ay=UA(),py=async(r)=>oy.loadConfig(ay.getEndpointUrlConfig(r))();TA.getEndpointFromConfig=py});var RA=v((C0r,WA)=>{function AA(r){const f={};if(r=r.replace(/^\?/,""),r)for(let s of r.split("&")){let[w,h=null]=s.split("=");if(w=decodeURIComponent(w),h)h=decodeURIComponent(h);if(!(w in f))f[w]=h;else if(Array.isArray(f[w]))f[w].push(h);else f[w]=[f[w],h]}return f}var{defineProperty:JE,getOwnPropertyDescriptor:uy,getOwnPropertyNames:ty}=Object,rN=Object.prototype.hasOwnProperty,sN=(r,f)=>JE(r,"name",{value:f,configurable:!0}),fN=(r,f)=>{for(var s in f)JE(r,s,{get:f[s],enumerable:!0})},wN=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of ty(f))if(!rN.call(r,h)&&h!==s)JE(r,h,{get:()=>f[h],enumerable:!(w=uy(f,h))||w.enumerable})}return r},hN=(r)=>wN(JE({},"__esModule",{value:!0}),r),LA={};fN(LA,{parseQueryString:()=>AA});WA.exports=hN(LA);sN(AA,"parseQueryString")});var XA=v((L0r,PA)=>{var{defineProperty:QE,getOwnPropertyDescriptor:$N,getOwnPropertyNames:EN}=Object,IN=Object.prototype.hasOwnProperty,FN=(r,f)=>QE(r,"name",{value:f,configurable:!0}),UN=(r,f)=>{for(var s in f)QE(r,s,{get:f[s],enumerable:!0})},TN=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of EN(f))if(!IN.call(r,h)&&h!==s)QE(r,h,{get:()=>f[h],enumerable:!(w=$N(f,h))||w.enumerable})}return r},GN=(r)=>TN(QE({},"__esModule",{value:!0}),r),zA={};UN(zA,{parseUrl:()=>SA});PA.exports=GN(zA);var CN=RA(),SA=FN((r)=>{if(typeof r==="string")return SA(new URL(r));const{hostname:f,pathname:s,port:w,protocol:h,search:$}=r;let E;if($)E=CN.parseQueryString($);return{hostname:f,port:w?parseInt(w):void 0,protocol:h,path:s,query:E}},"parseUrl")});var aF=v((A0r,BA)=>{function MA(r,f,s){return{applyToStack:(w)=>{w.add(KA(r,s),JA),w.add(ZA(r,f),QA)}}}var{defineProperty:ME,getOwnPropertyDescriptor:LN,getOwnPropertyNames:AN}=Object,WN=Object.prototype.hasOwnProperty,oF=(r,f)=>ME(r,"name",{value:f,configurable:!0}),RN=(r,f)=>{for(var s in f)ME(r,s,{get:f[s],enumerable:!0})},zN=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of AN(f))if(!WN.call(r,h)&&h!==s)ME(r,h,{get:()=>f[h],enumerable:!(w=LN(f,h))||w.enumerable})}return r},SN=(r)=>zN(ME({},"__esModule",{value:!0}),r),YA={};RN(YA,{deserializerMiddleware:()=>KA,deserializerMiddlewareOption:()=>JA,getSerdePlugin:()=>MA,serializerMiddleware:()=>ZA,serializerMiddlewareOption:()=>QA});BA.exports=SN(YA);var KA=oF((r,f)=>(s)=>async(w)=>{const{response:h}=await s(w);try{const $=await f(h,r);return{response:h,output:$}}catch($){if(Object.defineProperty($,"$response",{value:h}),!("$metadata"in $)){if($.message+="\n Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.",typeof $.$responseBodyText!=="undefined"){if($.$response)$.$response.body=$.$responseBodyText}}throw $}},"deserializerMiddleware"),ZA=oF((r,f)=>(s,w)=>async(h)=>{var $;const E=(($=w.endpointV2)==null?void 0:$.url)&&r.urlParser?async()=>r.urlParser(w.endpointV2.url):r.endpoint;if(!E)throw new Error("No valid endpoint provider available.");const I=await f(h.input,{...r,endpoint:E});return s({...h,request:I})},"serializerMiddleware"),JA={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},QA={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};oF(MA,"getSerdePlugin")});var mA=v((W0r,NA)=>{var{defineProperty:lE,getOwnPropertyDescriptor:PN,getOwnPropertyNames:XN}=Object,YN=Object.prototype.hasOwnProperty,us=(r,f)=>lE(r,"name",{value:f,configurable:!0}),KN=(r,f)=>{for(var s in f)lE(r,s,{get:f[s],enumerable:!0})},ZN=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of XN(f))if(!YN.call(r,h)&&h!==s)lE(r,h,{get:()=>f[h],enumerable:!(w=PN(f,h))||w.enumerable})}return r},JN=(r)=>ZN(lE({},"__esModule",{value:!0}),r),HA={};KN(HA,{endpointMiddleware:()=>kA,endpointMiddlewareOptions:()=>yA,getEndpointFromInstructions:()=>VA,getEndpointPlugin:()=>NN,resolveEndpointConfig:()=>mN,resolveParams:()=>DA,toEndpointV1:()=>pF});NA.exports=JN(HA);var QN=us(async(r)=>{const f=(r==null?void 0:r.Bucket)||"";if(typeof r.Bucket==="string")r.Bucket=f.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(VN(f)){if(r.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!HN(f)||f.indexOf(".")!==-1&&!String(r.Endpoint).startsWith("http:")||f.toLowerCase()!==f||f.length<3)r.ForcePathStyle=!0;if(r.DisableMultiRegionAccessPoints)r.disableMultiRegionAccessPoints=!0,r.DisableMRAP=!0;return r},"resolveParamsForS3"),MN=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,BN=/(\d+\.){3}\d+/,lN=/\.\./,HN=us((r)=>MN.test(r)&&!BN.test(r)&&!lN.test(r),"isDnsCompatibleBucketName"),VN=us((r)=>{const[f,s,w,,,h]=r.split(":"),$=f==="arn"&&r.split(":").length>=6,E=Boolean($&&s&&w&&h);if($&&!E)throw new Error(`Invalid ARN: ${r} was an invalid ARN.`);return E},"isArnBucketName"),DN=us((r,f,s)=>{const w=us(async()=>{const h=s[r]??s[f];if(typeof h==="function")return h();return h},"configProvider");if(r==="credentialScope"||f==="CredentialScope")return async()=>{const h=typeof s.credentials==="function"?await s.credentials():s.credentials;return(h==null?void 0:h.credentialScope)??(h==null?void 0:h.CredentialScope)};if(r==="accountId"||f==="AccountId")return async()=>{const h=typeof s.credentials==="function"?await s.credentials():s.credentials;return(h==null?void 0:h.accountId)??(h==null?void 0:h.AccountId)};if(r==="endpoint"||f==="endpoint")return async()=>{const h=await w();if(h&&typeof h==="object"){if("url"in h)return h.url.href;if("hostname"in h){const{protocol:$,hostname:E,port:I,path:F}=h;return`${$}//${E}${I?":"+I:""}${F}`}}return h};return w},"createConfigValueProvider"),kN=CA(),lA=XA(),pF=us((r)=>{if(typeof r==="object"){if("url"in r)return lA.parseUrl(r.url);return r}return lA.parseUrl(r)},"toEndpointV1"),VA=us(async(r,f,s,w)=>{if(!s.endpoint){const E=await kN.getEndpointFromConfig(s.serviceId||"");if(E)s.endpoint=()=>Promise.resolve(pF(E))}const h=await DA(r,f,s);if(typeof s.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return s.endpointProvider(h,w)},"getEndpointFromInstructions"),DA=us(async(r,f,s)=>{var w;const h={},$=((w=f==null?void 0:f.getEndpointParameterInstructions)==null?void 0:w.call(f))||{};for(let[E,I]of Object.entries($))switch(I.type){case"staticContextParams":h[E]=I.value;break;case"contextParams":h[E]=r[I.name];break;case"clientContextParams":case"builtInParams":h[E]=await DN(I.name,E,s)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(I))}if(Object.keys($).length===0)Object.assign(h,s);if(String(s.serviceId).toLowerCase()==="s3")await QN(h);return h},"resolveParams"),BE=T1(),kA=us(({config:r,instructions:f})=>{return(s,w)=>async(h)=>{var $,E,I;const F=await VA(h.input,{getEndpointParameterInstructions(){return f}},{...r},w);w.endpointV2=F,w.authSchemes=($=F.properties)==null?void 0:$.authSchemes;const U=(E=w.authSchemes)==null?void 0:E[0];if(U){w.signing_region=U.signingRegion,w.signing_service=U.signingName;const C=BE.getSmithyContext(w),L=(I=C==null?void 0:C.selectedHttpAuthScheme)==null?void 0:I.httpAuthOption;if(L)L.signingProperties=Object.assign(L.signingProperties||{},{signing_region:U.signingRegion,signingRegion:U.signingRegion,signing_service:U.signingName,signingName:U.signingName,signingRegionSet:U.signingRegionSet},U.properties)}return s({...h})}},"endpointMiddleware"),yN=aF(),yA={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:yN.serializerMiddlewareOption.name},NN=us((r,f)=>({applyToStack:(s)=>{s.addRelativeTo(kA({config:r,instructions:f}),yA)}}),"getEndpointPlugin"),mN=us((r)=>{const f=r.tls??!0,{endpoint:s}=r,w=s!=null?async()=>pF(await BE.normalizeProvider(s)()):void 0;return{...r,endpoint:w,tls:f,isCustomEndpoint:!!s,useDualstackEndpoint:BE.normalizeProvider(r.useDualstackEndpoint??!1),useFipsEndpoint:BE.normalizeProvider(r.useFipsEndpoint??!1)}},"resolveEndpointConfig")});var F0=v((R0r,gA)=>{function OA(r){return Object.keys(r).reduce((f,s)=>{const w=r[s];return{...f,[s]:Array.isArray(w)?[...w]:w}},{})}function bA(r){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(r)}var{defineProperty:HE,getOwnPropertyDescriptor:iN,getOwnPropertyNames:qN}=Object,vN=Object.prototype.hasOwnProperty,y0=(r,f)=>HE(r,"name",{value:f,configurable:!0}),jN=(r,f)=>{for(var s in f)HE(r,s,{get:f[s],enumerable:!0})},dN=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of qN(f))if(!vN.call(r,h)&&h!==s)HE(r,h,{get:()=>f[h],enumerable:!(w=iN(f,h))||w.enumerable})}return r},ON=(r)=>dN(HE({},"__esModule",{value:!0}),r),iA={};jN(iA,{Field:()=>gN,Fields:()=>_N,HttpRequest:()=>xN,HttpResponse:()=>eN,IHttpRequest:()=>qA.HttpRequest,getHttpHandlerExtensionConfiguration:()=>cN,isValidHostname:()=>bA,resolveHttpHandlerRuntimeConfig:()=>bN});gA.exports=ON(iA);var cN=y0((r)=>{let f=r.httpHandler;return{setHttpHandler(s){f=s},httpHandler(){return f},updateHttpClientConfig(s,w){f.updateHttpClientConfig(s,w)},httpHandlerConfigs(){return f.httpHandlerConfigs()}}},"getHttpHandlerExtensionConfiguration"),bN=y0((r)=>{return{httpHandler:r.httpHandler()}},"resolveHttpHandlerRuntimeConfig"),qA=Es(),vA=class r{constructor({name:f,kind:s=qA.FieldPosition.HEADER,values:w=[]}){this.name=f,this.kind=s,this.values=w}add(f){this.values.push(f)}set(f){this.values=f}remove(f){this.values=this.values.filter((s)=>s!==f)}toString(){return this.values.map((f)=>f.includes(",")||f.includes(" ")?`"${f}"`:f).join(", ")}get(){return this.values}};y0(vA,"Field");var gN=vA,jA=class r{constructor({fields:f=[],encoding:s="utf-8"}){this.entries={},f.forEach(this.setField.bind(this)),this.encoding=s}setField(f){this.entries[f.name.toLowerCase()]=f}getField(f){return this.entries[f.toLowerCase()]}removeField(f){delete this.entries[f.toLowerCase()]}getByType(f){return Object.values(this.entries).filter((s)=>s.kind===f)}};y0(jA,"Fields");var _N=jA,dA=class r{constructor(f){this.method=f.method||"GET",this.hostname=f.hostname||"localhost",this.port=f.port,this.query=f.query||{},this.headers=f.headers||{},this.body=f.body,this.protocol=f.protocol?f.protocol.slice(-1)!==":"?`${f.protocol}:`:f.protocol:"https:",this.path=f.path?f.path.charAt(0)!=="/"?`/${f.path}`:f.path:"/",this.username=f.username,this.password=f.password,this.fragment=f.fragment}static clone(f){const s=new r({...f,headers:{...f.headers}});if(s.query)s.query=OA(s.query);return s}static isInstance(f){if(!f)return!1;const s=f;return"method"in s&&"protocol"in s&&"hostname"in s&&"path"in s&&typeof s.query==="object"&&typeof s.headers==="object"}clone(){return r.clone(this)}};y0(dA,"HttpRequest");var xN=dA;y0(OA,"cloneQuery");var cA=class r{constructor(f){this.statusCode=f.statusCode,this.reason=f.reason,this.headers=f.headers||{},this.body=f.body}static isInstance(f){if(!f)return!1;const s=f;return typeof s.statusCode==="number"&&typeof s.headers==="object"}};y0(cA,"HttpResponse");var eN=cA;y0(bA,"isValidHostname")});var uF=v((_A)=>{function oN(r){return r&&r.__esModule?r:{default:r}}function aN(){if(VE>DE.length-16)nN.default.randomFillSync(DE),VE=0;return DE.slice(VE,VE+=16)}Object.defineProperty(_A,"__esModule",{value:!0});_A.default=aN;var nN=oN(import.meta.require("crypto")),DE=new Uint8Array(256),VE=DE.length});var nA=v((xA)=>{Object.defineProperty(xA,"__esModule",{value:!0});xA.default=void 0;var uN=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;xA.default=uN});var A1=v((oA)=>{function rm(r){return r&&r.__esModule?r:{default:r}}function sm(r){return typeof r==="string"&&tN.default.test(r)}Object.defineProperty(oA,"__esModule",{value:!0});oA.default=void 0;var tN=rm(nA()),fm=sm;oA.default=fm});var W1=v((uA)=>{function hm(r){return r&&r.__esModule?r:{default:r}}function pA(r,f=0){return jr[r[f+0]]+jr[r[f+1]]+jr[r[f+2]]+jr[r[f+3]]+"-"+jr[r[f+4]]+jr[r[f+5]]+"-"+jr[r[f+6]]+jr[r[f+7]]+"-"+jr[r[f+8]]+jr[r[f+9]]+"-"+jr[r[f+10]]+jr[r[f+11]]+jr[r[f+12]]+jr[r[f+13]]+jr[r[f+14]]+jr[r[f+15]]}function $m(r,f=0){const s=pA(r,f);if(!wm.default(s))throw TypeError("Stringified UUID is invalid");return s}Object.defineProperty(uA,"__esModule",{value:!0});uA.default=void 0;uA.unsafeStringify=pA;var wm=hm(A1()),jr=[];for(let r=0;r<256;++r)jr.push((r+256).toString(16).slice(1));var Em=$m;uA.default=Em});var wW=v((sW)=>{function Tm(r){return r&&r.__esModule?r:{default:r}}function Gm(r,f,s){let w=f&&s||0;const h=f||new Array(16);r=r||{};let $=r.node||rW,E=r.clockseq!==void 0?r.clockseq:tF;if($==null||E==null){const z=r.random||(r.rng||Fm.default)();if($==null)$=rW=[z[0]|1,z[1],z[2],z[3],z[4],z[5]];if(E==null)E=tF=(z[6]<<8|z[7])&16383}let I=r.msecs!==void 0?r.msecs:Date.now(),F=r.nsecs!==void 0?r.nsecs:sU+1;const U=I-rU+(F-sU)/1e4;if(U<0&&r.clockseq===void 0)E=E+1&16383;if((U<0||I>rU)&&r.nsecs===void 0)F=0;if(F>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");rU=I,sU=F,tF=E,I+=12219292800000;const C=((I&268435455)*1e4+F)%4294967296;h[w++]=C>>>24&255,h[w++]=C>>>16&255,h[w++]=C>>>8&255,h[w++]=C&255;const L=I/4294967296*1e4&268435455;h[w++]=L>>>8&255,h[w++]=L&255,h[w++]=L>>>24&15|16,h[w++]=L>>>16&255,h[w++]=E>>>8|128,h[w++]=E&255;for(let z=0;z<6;++z)h[w+z]=$[z];return f||Um.unsafeStringify(h)}Object.defineProperty(sW,"__esModule",{value:!0});sW.default=void 0;var Fm=Tm(uF()),Um=W1(),rW,tF,rU=0,sU=0,Cm=Gm;sW.default=Cm});var fU=v((hW)=>{function Am(r){return r&&r.__esModule?r:{default:r}}function Wm(r){if(!Lm.default(r))throw TypeError("Invalid UUID");let f;const s=new Uint8Array(16);return s[0]=(f=parseInt(r.slice(0,8),16))>>>24,s[1]=f>>>16&255,s[2]=f>>>8&255,s[3]=f&255,s[4]=(f=parseInt(r.slice(9,13),16))>>>8,s[5]=f&255,s[6]=(f=parseInt(r.slice(14,18),16))>>>8,s[7]=f&255,s[8]=(f=parseInt(r.slice(19,23),16))>>>8,s[9]=f&255,s[10]=(f=parseInt(r.slice(24,36),16))/1099511627776&255,s[11]=f/4294967296&255,s[12]=f>>>24&255,s[13]=f>>>16&255,s[14]=f>>>8&255,s[15]=f&255,s}Object.defineProperty(hW,"__esModule",{value:!0});hW.default=void 0;var Lm=Am(A1()),Rm=Wm;hW.default=Rm});var wU=v((FW)=>{function Pm(r){return r&&r.__esModule?r:{default:r}}function Xm(r){r=unescape(encodeURIComponent(r));const f=[];for(let s=0;s<r.length;++s)f.push(r.charCodeAt(s));return f}function Ym(r,f,s){function w(h,$,E,I){var F;if(typeof h==="string")h=Xm(h);if(typeof $==="string")$=Sm.default($);if(((F=$)===null||F===void 0?void 0:F.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let U=new Uint8Array(16+h.length);if(U.set($),U.set(h,$.length),U=s(U),U[6]=U[6]&15|f,U[8]=U[8]&63|128,E){I=I||0;for(let C=0;C<16;++C)E[I+C]=U[C];return E}return zm.unsafeStringify(U)}try{w.name=r}catch(h){}return w.DNS=EW,w.URL=IW,w}Object.defineProperty(FW,"__esModule",{value:!0});FW.URL=FW.DNS=void 0;FW.default=Ym;var zm=W1(),Sm=Pm(fU()),EW="6ba7b810-9dad-11d1-80b4-00c04fd430c8";FW.DNS=EW;var IW="6ba7b811-9dad-11d1-80b4-00c04fd430c8";FW.URL=IW});var CW=v((TW)=>{function Qm(r){return r&&r.__esModule?r:{default:r}}function Mm(r){if(Array.isArray(r))r=Buffer.from(r);else if(typeof r==="string")r=Buffer.from(r,"utf8");return Jm.default.createHash("md5").update(r).digest()}Object.defineProperty(TW,"__esModule",{value:!0});TW.default=void 0;var Jm=Qm(import.meta.require("crypto")),Bm=Mm;TW.default=Bm});var RW=v((AW)=>{function LW(r){return r&&r.__esModule?r:{default:r}}Object.defineProperty(AW,"__esModule",{value:!0});AW.default=void 0;var lm=LW(wU()),Hm=LW(CW()),Vm=lm.default("v3",48,Hm.default),Dm=Vm;AW.default=Dm});var PW=v((zW)=>{function ym(r){return r&&r.__esModule?r:{default:r}}Object.defineProperty(zW,"__esModule",{value:!0});zW.default=void 0;var km=ym(import.meta.require("crypto")),Nm={randomUUID:km.default.randomUUID};zW.default=Nm});var JW=v((KW)=>{function YW(r){return r&&r.__esModule?r:{default:r}}function qm(r,f,s){if(XW.default.randomUUID&&!f&&!r)return XW.default.randomUUID();r=r||{};const w=r.random||(r.rng||mm.default)();if(w[6]=w[6]&15|64,w[8]=w[8]&63|128,f){s=s||0;for(let h=0;h<16;++h)f[s+h]=w[h];return f}return im.unsafeStringify(w)}Object.defineProperty(KW,"__esModule",{value:!0});KW.default=void 0;var XW=YW(PW()),mm=YW(uF()),im=W1(),vm=qm;KW.default=vm});var BW=v((QW)=>{function dm(r){return r&&r.__esModule?r:{default:r}}function Om(r){if(Array.isArray(r))r=Buffer.from(r);else if(typeof r==="string")r=Buffer.from(r,"utf8");return jm.default.createHash("sha1").update(r).digest()}Object.defineProperty(QW,"__esModule",{value:!0});QW.default=void 0;var jm=dm(import.meta.require("crypto")),cm=Om;QW.default=cm});var DW=v((HW)=>{function lW(r){return r&&r.__esModule?r:{default:r}}Object.defineProperty(HW,"__esModule",{value:!0});HW.default=void 0;var bm=lW(wU()),gm=lW(BW()),_m=bm.default("v5",80,gm.default),xm=_m;HW.default=xm});var NW=v((kW)=>{Object.defineProperty(kW,"__esModule",{value:!0});kW.default=void 0;var em="00000000-0000-0000-0000-000000000000";kW.default=em});var qW=v((mW)=>{function om(r){return r&&r.__esModule?r:{default:r}}function am(r){if(!nm.default(r))throw TypeError("Invalid UUID");return parseInt(r.slice(14,15),16)}Object.defineProperty(mW,"__esModule",{value:!0});mW.default=void 0;var nm=om(A1()),pm=am;mW.default=pm});var hU=v((ts)=>{function U0(r){return r&&r.__esModule?r:{default:r}}Object.defineProperty(ts,"__esModule",{value:!0});Object.defineProperty(ts,"NIL",{enumerable:!0,get:function(){return fi.default}});Object.defineProperty(ts,"parse",{enumerable:!0,get:function(){return Ei.default}});Object.defineProperty(ts,"stringify",{enumerable:!0,get:function(){return $i.default}});Object.defineProperty(ts,"v1",{enumerable:!0,get:function(){return um.default}});Object.defineProperty(ts,"v3",{enumerable:!0,get:function(){return tm.default}});Object.defineProperty(ts,"v4",{enumerable:!0,get:function(){return ri.default}});Object.defineProperty(ts,"v5",{enumerable:!0,get:function(){return si.default}});Object.defineProperty(ts,"validate",{enumerable:!0,get:function(){return hi.default}});Object.defineProperty(ts,"version",{enumerable:!0,get:function(){return wi.default}});var um=U0(wW()),tm=U0(RW()),ri=U0(JW()),si=U0(DW()),fi=U0(NW()),wi=U0(qW()),hi=U0(A1()),$i=U0(W1()),Ei=U0(fU())});var $U=v((y0r,OW)=>{var{defineProperty:kE,getOwnPropertyDescriptor:Ii,getOwnPropertyNames:Fi}=Object,Ui=Object.prototype.hasOwnProperty,rh=(r,f)=>kE(r,"name",{value:f,configurable:!0}),Ti=(r,f)=>{for(var s in f)kE(r,s,{get:f[s],enumerable:!0})},Gi=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of Fi(f))if(!Ui.call(r,h)&&h!==s)kE(r,h,{get:()=>f[h],enumerable:!(w=Ii(f,h))||w.enumerable})}return r},Ci=(r)=>Gi(kE({},"__esModule",{value:!0}),r),vW={};Ti(vW,{isClockSkewCorrectedError:()=>jW,isClockSkewError:()=>Pi,isRetryableByTrait:()=>Si,isServerError:()=>Yi,isThrottlingError:()=>Xi,isTransientError:()=>dW});OW.exports=Ci(vW);var Li=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],Ai=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],Wi=["TimeoutError","RequestTimeout","RequestTimeoutException"],Ri=[500,502,503,504],zi=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],Si=rh((r)=>r.$retryable!==void 0,"isRetryableByTrait"),Pi=rh((r)=>Li.includes(r.name),"isClockSkewError"),jW=rh((r)=>{var f;return(f=r.$metadata)==null?void 0:f.clockSkewCorrected},"isClockSkewCorrectedError"),Xi=rh((r)=>{var f,s;return((f=r.$metadata)==null?void 0:f.httpStatusCode)===429||Ai.includes(r.name)||((s=r.$retryable)==null?void 0:s.throttling)==!0},"isThrottlingError"),dW=rh((r)=>{var f;return jW(r)||Wi.includes(r.name)||zi.includes((r==null?void 0:r.code)||"")||Ri.includes(((f=r.$metadata)==null?void 0:f.httpStatusCode)||0)},"isTransientError"),Yi=rh((r)=>{var f;if(((f=r.$metadata)==null?void 0:f.httpStatusCode)!==void 0){const s=r.$metadata.httpStatusCode;if(500<=s&&s<=599&&!dW(r))return!0;return!1}return!1},"isServerError")});var sR=v((N0r,rR)=>{var{defineProperty:yE,getOwnPropertyDescriptor:Ki,getOwnPropertyNames:Zi}=Object,Ji=Object.prototype.hasOwnProperty,rf=(r,f)=>yE(r,"name",{value:f,configurable:!0}),Qi=(r,f)=>{for(var s in f)yE(r,s,{get:f[s],enumerable:!0})},Mi=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of Zi(f))if(!Ji.call(r,h)&&h!==s)yE(r,h,{get:()=>f[h],enumerable:!(w=Ki(f,h))||w.enumerable})}return r},Bi=(r)=>Mi(yE({},"__esModule",{value:!0}),r),bW={};Qi(bW,{AdaptiveRetryStrategy:()=>yi,ConfiguredRetryStrategy:()=>Ni,DEFAULT_MAX_ATTEMPTS:()=>EU,DEFAULT_RETRY_DELAY_BASE:()=>R1,DEFAULT_RETRY_MODE:()=>li,DefaultRateLimiter:()=>xW,INITIAL_RETRY_TOKENS:()=>IU,INVOCATION_ID_HEADER:()=>Vi,MAXIMUM_RETRY_DELAY:()=>FU,NO_RETRY_INCREMENT:()=>aW,REQUEST_HEADER:()=>Di,RETRY_COST:()=>nW,RETRY_MODES:()=>gW,StandardRetryStrategy:()=>UU,THROTTLING_RETRY_DELAY_BASE:()=>eW,TIMEOUT_RETRY_COST:()=>oW});rR.exports=Bi(bW);var gW=((r)=>{return r.STANDARD="standard",r.ADAPTIVE="adaptive",r})(gW||{}),EU=3,li="standard",Hi=$U(),_W=class r{constructor(f){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=(f==null?void 0:f.beta)??0.7,this.minCapacity=(f==null?void 0:f.minCapacity)??1,this.minFillRate=(f==null?void 0:f.minFillRate)??0.5,this.scaleConstant=(f==null?void 0:f.scaleConstant)??0.4,this.smooth=(f==null?void 0:f.smooth)??0.8;const s=this.getCurrentTimeInSeconds();this.lastThrottleTime=s,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1000}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(f){if(!this.enabled)return;if(this.refillTokenBucket(),f>this.currentCapacity){const s=(f-this.currentCapacity)/this.fillRate*1000;await new Promise((w)=>setTimeout(w,s))}this.currentCapacity=this.currentCapacity-f}refillTokenBucket(){const f=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=f;return}const s=(f-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+s),this.lastTimestamp=f}updateClientSendingRate(f){let s;if(this.updateMeasuredRate(),Hi.isThrottlingError(f)){const h=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=h,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),s=this.cubicThrottle(h),this.enableTokenBucket()}else this.calculateTimeWindow(),s=this.cubicSuccess(this.getCurrentTimeInSeconds());const w=Math.min(s,2*this.measuredTxRate);this.updateTokenBucketRate(w)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle(f){return this.getPrecise(f*this.beta)}cubicSuccess(f){return this.getPrecise(this.scaleConstant*Math.pow(f-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(f){this.refillTokenBucket(),this.fillRate=Math.max(f,this.minFillRate),this.maxCapacity=Math.max(f,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const f=this.getCurrentTimeInSeconds(),s=Math.floor(f*2)/2;if(this.requestCount++,s>this.lastTxRateBucket){const w=this.requestCount/(s-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(w*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=s}}getPrecise(f){return parseFloat(f.toFixed(8))}};rf(_W,"DefaultRateLimiter");var xW=_W,R1=100,FU=20000,eW=500,IU=500,nW=5,oW=10,aW=1,Vi="amz-sdk-invocation-id",Di="amz-sdk-request",ki=rf(()=>{let r=R1;return{computeNextBackoffDelay:rf((w)=>{return Math.floor(Math.min(FU,Math.random()*2**w*r))},"computeNextBackoffDelay"),setDelayBase:rf((w)=>{r=w},"setDelayBase")}},"getDefaultRetryBackoffStrategy"),cW=rf(({retryDelay:r,retryCount:f,retryCost:s})=>{return{getRetryCount:rf(()=>f,"getRetryCount"),getRetryDelay:rf(()=>Math.min(FU,r),"getRetryDelay"),getRetryCost:rf(()=>s,"getRetryCost")}},"createDefaultRetryToken"),pW=class r{constructor(f){this.maxAttempts=f,this.mode="standard",this.capacity=IU,this.retryBackoffStrategy=ki(),this.maxAttemptsProvider=typeof f==="function"?f:async()=>f}async acquireInitialRetryToken(f){return cW({retryDelay:R1,retryCount:0})}async refreshRetryTokenForRetry(f,s){const w=await this.getMaxAttempts();if(this.shouldRetry(f,s,w)){const h=s.errorType;this.retryBackoffStrategy.setDelayBase(h==="THROTTLING"?eW:R1);const $=this.retryBackoffStrategy.computeNextBackoffDelay(f.getRetryCount()),E=s.retryAfterHint?Math.max(s.retryAfterHint.getTime()-Date.now()||0,$):$,I=this.getCapacityCost(h);return this.capacity-=I,cW({retryDelay:E,retryCount:f.getRetryCount()+1,retryCost:I})}throw new Error("No retry token available")}recordSuccess(f){this.capacity=Math.max(IU,this.capacity+(f.getRetryCost()??aW))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(f){return console.warn(`Max attempts provider could not resolve. Using default of ${EU}`),EU}}shouldRetry(f,s,w){return f.getRetryCount()+1<w&&this.capacity>=this.getCapacityCost(s.errorType)&&this.isRetryableError(s.errorType)}getCapacityCost(f){return f==="TRANSIENT"?oW:nW}isRetryableError(f){return f==="THROTTLING"||f==="TRANSIENT"}};rf(pW,"StandardRetryStrategy");var UU=pW,uW=class r{constructor(f,s){this.maxAttemptsProvider=f,this.mode="adaptive";const{rateLimiter:w}=s??{};this.rateLimiter=w??new xW,this.standardRetryStrategy=new UU(f)}async acquireInitialRetryToken(f){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(f)}async refreshRetryTokenForRetry(f,s){return this.rateLimiter.updateClientSendingRate(s),this.standardRetryStrategy.refreshRetryTokenForRetry(f,s)}recordSuccess(f){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(f)}};rf(uW,"AdaptiveRetryStrategy");var yi=uW,tW=class r extends UU{constructor(f,s=R1){super(typeof f==="function"?f:async()=>f);if(typeof s==="number")this.computeNextBackoffDelay=()=>s;else this.computeNextBackoffDelay=s}async refreshRetryTokenForRetry(f,s){const w=await super.refreshRetryTokenForRetry(f,s);return w.getRetryDelay=()=>this.computeNextBackoffDelay(w.getRetryCount()),w}};rf(tW,"ConfiguredRetryStrategy");var Ni=tW});var ER=v((m0r,$R)=>{var{defineProperty:NE,getOwnPropertyDescriptor:mi,getOwnPropertyNames:ii}=Object,qi=Object.prototype.hasOwnProperty,Bs=(r,f)=>NE(r,"name",{value:f,configurable:!0}),vi=(r,f)=>{for(var s in f)NE(r,s,{get:f[s],enumerable:!0})},ji=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of ii(f))if(!qi.call(r,h)&&h!==s)NE(r,h,{get:()=>f[h],enumerable:!(w=mi(f,h))||w.enumerable})}return r},di=(r)=>ji(NE({},"__esModule",{value:!0}),r),hR={};vi(hR,{constructStack:()=>TU});$R.exports=di(hR);var Rw=Bs((r,f)=>{const s=[];if(r)s.push(r);if(f)for(let w of f)s.push(w);return s},"getAllAliases"),N0=Bs((r,f)=>{return`${r||"anonymous"}${f&&f.length>0?` (a.k.a. ${f.join(",")})`:""}`},"getMiddlewareNameWithAliases"),TU=Bs(()=>{let r=[],f=[],s=!1;const w=new Set,h=Bs((L)=>L.sort((z,S)=>fR[S.step]-fR[z.step]||wR[S.priority||"normal"]-wR[z.priority||"normal"]),"sort"),$=Bs((L)=>{let z=!1;const S=Bs((Z)=>{const k=Rw(Z.name,Z.aliases);if(k.includes(L)){z=!0;for(let l of k)w.delete(l);return!1}return!0},"filterCb");return r=r.filter(S),f=f.filter(S),z},"removeByName"),E=Bs((L)=>{let z=!1;const S=Bs((Z)=>{if(Z.middleware===L){z=!0;for(let k of Rw(Z.name,Z.aliases))w.delete(k);return!1}return!0},"filterCb");return r=r.filter(S),f=f.filter(S),z},"removeByReference"),I=Bs((L)=>{var z;return r.forEach((S)=>{L.add(S.middleware,{...S})}),f.forEach((S)=>{L.addRelativeTo(S.middleware,{...S})}),(z=L.identifyOnResolve)==null||z.call(L,C.identifyOnResolve()),L},"cloneTo"),F=Bs((L)=>{const z=[];return L.before.forEach((S)=>{if(S.before.length===0&&S.after.length===0)z.push(S);else z.push(...F(S))}),z.push(L),L.after.reverse().forEach((S)=>{if(S.before.length===0&&S.after.length===0)z.push(S);else z.push(...F(S))}),z},"expandRelativeMiddlewareList"),U=Bs((L=!1)=>{const z=[],S=[],Z={};return r.forEach((l)=>{const M={...l,before:[],after:[]};for(let y of Rw(M.name,M.aliases))Z[y]=M;z.push(M)}),f.forEach((l)=>{const M={...l,before:[],after:[]};for(let y of Rw(M.name,M.aliases))Z[y]=M;S.push(M)}),S.forEach((l)=>{if(l.toMiddleware){const M=Z[l.toMiddleware];if(M===void 0){if(L)return;throw new Error(`${l.toMiddleware} is not found when adding ${N0(l.name,l.aliases)} middleware ${l.relation} ${l.toMiddleware}`)}if(l.relation==="after")M.after.push(l);if(l.relation==="before")M.before.push(l)}}),h(z).map(F).reduce((l,M)=>{return l.push(...M),l},[])},"getMiddlewareList"),C={add:(L,z={})=>{const{name:S,override:Z,aliases:k}=z,l={step:"initialize",priority:"normal",middleware:L,...z},M=Rw(S,k);if(M.length>0){if(M.some((y)=>w.has(y))){if(!Z)throw new Error(`Duplicate middleware name '${N0(S,k)}'`);for(let y of M){const x=r.findIndex((wr)=>{var Vr;return wr.name===y||((Vr=wr.aliases)==null?void 0:Vr.some((Cw)=>Cw===y))});if(x===-1)continue;const e=r[x];if(e.step!==l.step||l.priority!==e.priority)throw new Error(`"${N0(e.name,e.aliases)}" middleware with ${e.priority} priority in ${e.step} step cannot be overridden by "${N0(S,k)}" middleware with ${l.priority} priority in ${l.step} step.`);r.splice(x,1)}}for(let y of M)w.add(y)}r.push(l)},addRelativeTo:(L,z)=>{const{name:S,override:Z,aliases:k}=z,l={middleware:L,...z},M=Rw(S,k);if(M.length>0){if(M.some((y)=>w.has(y))){if(!Z)throw new Error(`Duplicate middleware name '${N0(S,k)}'`);for(let y of M){const x=f.findIndex((wr)=>{var Vr;return wr.name===y||((Vr=wr.aliases)==null?void 0:Vr.some((Cw)=>Cw===y))});if(x===-1)continue;const e=f[x];if(e.toMiddleware!==l.toMiddleware||e.relation!==l.relation)throw new Error(`"${N0(e.name,e.aliases)}" middleware ${e.relation} "${e.toMiddleware}" middleware cannot be overridden by "${N0(S,k)}" middleware ${l.relation} "${l.toMiddleware}" middleware.`);f.splice(x,1)}}for(let y of M)w.add(y)}f.push(l)},clone:()=>I(TU()),use:(L)=>{L.applyToStack(C)},remove:(L)=>{if(typeof L==="string")return $(L);else return E(L)},removeByTag:(L)=>{let z=!1;const S=Bs((Z)=>{const{tags:k,name:l,aliases:M}=Z;if(k&&k.includes(L)){const y=Rw(l,M);for(let x of y)w.delete(x);return z=!0,!1}return!0},"filterCb");return r=r.filter(S),f=f.filter(S),z},concat:(L)=>{var z;const S=I(TU());return S.use(L),S.identifyOnResolve(s||S.identifyOnResolve()||(((z=L.identifyOnResolve)==null?void 0:z.call(L))??!1)),S},applyToStack:I,identify:()=>{return U(!0).map((L)=>{const z=L.step??L.relation+" "+L.toMiddleware;return N0(L.name,L.aliases)+" - "+z})},identifyOnResolve(L){if(typeof L==="boolean")s=L;return s},resolve:(L,z)=>{for(let S of U().map((Z)=>Z.middleware).reverse())L=S(L,z);if(s)console.log(C.identify());return L}};return C},"constructStack"),fR={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},wR={high:3,normal:2,low:1}});var GU=v((i0r,FR)=>{var{defineProperty:mE,getOwnPropertyDescriptor:Oi,getOwnPropertyNames:ci}=Object,bi=Object.prototype.hasOwnProperty,gi=(r,f)=>mE(r,"name",{value:f,configurable:!0}),_i=(r,f)=>{for(var s in f)mE(r,s,{get:f[s],enumerable:!0})},xi=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of ci(f))if(!bi.call(r,h)&&h!==s)mE(r,h,{get:()=>f[h],enumerable:!(w=Oi(f,h))||w.enumerable})}return r},ei=(r)=>xi(mE({},"__esModule",{value:!0}),r),IR={};_i(IR,{isArrayBuffer:()=>ni});FR.exports=ei(IR);var ni=gi((r)=>typeof ArrayBuffer==="function"&&r instanceof ArrayBuffer||Object.prototype.toString.call(r)==="[object ArrayBuffer]","isArrayBuffer")});var z1=v((q0r,GR)=>{var{defineProperty:iE,getOwnPropertyDescriptor:oi,getOwnPropertyNames:ai}=Object,pi=Object.prototype.hasOwnProperty,UR=(r,f)=>iE(r,"name",{value:f,configurable:!0}),ui=(r,f)=>{for(var s in f)iE(r,s,{get:f[s],enumerable:!0})},ti=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of ai(f))if(!pi.call(r,h)&&h!==s)iE(r,h,{get:()=>f[h],enumerable:!(w=oi(f,h))||w.enumerable})}return r},rq=(r)=>ti(iE({},"__esModule",{value:!0}),r),TR={};ui(TR,{fromArrayBuffer:()=>fq,fromString:()=>wq});GR.exports=rq(TR);var sq=GU(),CU=import.meta.require("buffer"),fq=UR((r,f=0,s=r.byteLength-f)=>{if(!sq.isArrayBuffer(r))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof r} (${r})`);return CU.Buffer.from(r,f,s)},"fromArrayBuffer"),wq=UR((r,f)=>{if(typeof r!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof r} (${r})`);return f?CU.Buffer.from(r,f):CU.Buffer.from(r)},"fromString")});var AR=v((CR)=>{Object.defineProperty(CR,"__esModule",{value:!0});CR.fromBase64=void 0;var hq=z1(),$q=/^[A-Za-z0-9+/]*={0,2}$/,Eq=(r)=>{if(r.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!$q.exec(r))throw new TypeError("Invalid base64 string.");const f=hq.fromString(r,"base64");return new Uint8Array(f.buffer,f.byteOffset,f.byteLength)};CR.fromBase64=Eq});var m0=v((j0r,SR)=>{var{defineProperty:qE,getOwnPropertyDescriptor:Iq,getOwnPropertyNames:Fq}=Object,Uq=Object.prototype.hasOwnProperty,LU=(r,f)=>qE(r,"name",{value:f,configurable:!0}),Tq=(r,f)=>{for(var s in f)qE(r,s,{get:f[s],enumerable:!0})},Gq=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of Fq(f))if(!Uq.call(r,h)&&h!==s)qE(r,h,{get:()=>f[h],enumerable:!(w=Iq(f,h))||w.enumerable})}return r},Cq=(r)=>Gq(qE({},"__esModule",{value:!0}),r),WR={};Tq(WR,{fromUtf8:()=>zR,toUint8Array:()=>Lq,toUtf8:()=>Aq});SR.exports=Cq(WR);var RR=z1(),zR=LU((r)=>{const f=RR.fromString(r,"utf8");return new Uint8Array(f.buffer,f.byteOffset,f.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),Lq=LU((r)=>{if(typeof r==="string")return zR(r);if(ArrayBuffer.isView(r))return new Uint8Array(r.buffer,r.byteOffset,r.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(r)},"toUint8Array"),Aq=LU((r)=>{if(typeof r==="string")return r;if(typeof r!=="object"||typeof r.byteOffset!=="number"||typeof r.byteLength!=="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return RR.fromArrayBuffer(r.buffer,r.byteOffset,r.byteLength).toString("utf8")},"toUtf8")});var YR=v((PR)=>{Object.defineProperty(PR,"__esModule",{value:!0});PR.toBase64=void 0;var Wq=z1(),Rq=m0(),zq=(r)=>{let f;if(typeof r==="string")f=Rq.fromUtf8(r);else f=r;if(typeof f!=="object"||typeof f.byteOffset!=="number"||typeof f.byteLength!=="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return Wq.fromArrayBuffer(f.buffer,f.byteOffset,f.byteLength).toString("base64")};PR.toBase64=zq});var jE=v((O0r,vE)=>{var{defineProperty:KR,getOwnPropertyDescriptor:Sq,getOwnPropertyNames:Pq}=Object,Xq=Object.prototype.hasOwnProperty,AU=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of Pq(f))if(!Xq.call(r,h)&&h!==s)KR(r,h,{get:()=>f[h],enumerable:!(w=Sq(f,h))||w.enumerable})}return r},ZR=(r,f,s)=>(AU(r,f,"default"),s&&AU(s,f,"default")),Yq=(r)=>AU(KR({},"__esModule",{value:!0}),r),WU={};vE.exports=Yq(WU);ZR(WU,AR(),vE.exports);ZR(WU,YR(),vE.exports)});var MR=v((JR)=>{Object.defineProperty(JR,"__esModule",{value:!0});JR.getAwsChunkedEncodingStream=void 0;var Kq=import.meta.require("stream"),Zq=(r,f)=>{const{base64Encoder:s,bodyLengthChecker:w,checksumAlgorithmFn:h,checksumLocationName:$,streamHasher:E}=f,I=s!==void 0&&h!==void 0&&$!==void 0&&E!==void 0,F=I?E(h,r):void 0,U=new Kq.Readable({read:()=>{}});return r.on("data",(C)=>{const L=w(C)||0;U.push(`${L.toString(16)}\r\n`),U.push(C),U.push("\r\n")}),r.on("end",async()=>{if(U.push("0\r\n"),I){const C=s(await F);U.push(`${$}:${C}\r\n`),U.push("\r\n")}U.push(null)}),U};JR.getAwsChunkedEncodingStream=Zq});var zU=v((b0r,HR)=>{var{defineProperty:dE,getOwnPropertyDescriptor:Jq,getOwnPropertyNames:Qq}=Object,Mq=Object.prototype.hasOwnProperty,RU=(r,f)=>dE(r,"name",{value:f,configurable:!0}),Bq=(r,f)=>{for(var s in f)dE(r,s,{get:f[s],enumerable:!0})},lq=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of Qq(f))if(!Mq.call(r,h)&&h!==s)dE(r,h,{get:()=>f[h],enumerable:!(w=Jq(f,h))||w.enumerable})}return r},Hq=(r)=>lq(dE({},"__esModule",{value:!0}),r),BR={};Bq(BR,{escapeUri:()=>lR,escapeUriPath:()=>Dq});HR.exports=Hq(BR);var lR=RU((r)=>encodeURIComponent(r).replace(/[!'()*]/g,Vq),"escapeUri"),Vq=RU((r)=>`%${r.charCodeAt(0).toString(16).toUpperCase()}`,"hexEncode"),Dq=RU((r)=>r.split("/").map(lR).join("/"),"escapeUriPath")});var PU=v((g0r,kR)=>{function DR(r){const f=[];for(let s of Object.keys(r).sort()){const w=r[s];if(s=SU.escapeUri(s),Array.isArray(w))for(let h=0,$=w.length;h<$;h++)f.push(`${s}=${SU.escapeUri(w[h])}`);else{let h=s;if(w||typeof w==="string")h+=`=${SU.escapeUri(w)}`;f.push(h)}}return f.join("&")}var{defineProperty:OE,getOwnPropertyDescriptor:kq,getOwnPropertyNames:yq}=Object,Nq=Object.prototype.hasOwnProperty,mq=(r,f)=>OE(r,"name",{value:f,configurable:!0}),iq=(r,f)=>{for(var s in f)OE(r,s,{get:f[s],enumerable:!0})},qq=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of yq(f))if(!Nq.call(r,h)&&h!==s)OE(r,h,{get:()=>f[h],enumerable:!(w=kq(f,h))||w.enumerable})}return r},vq=(r)=>qq(OE({},"__esModule",{value:!0}),r),VR={};iq(VR,{buildQueryString:()=>DR});kR.exports=vq(VR);var SU=zU();mq(DR,"buildQueryString")});var oR=v((_0r,nR)=>{async function KU(r,f,s=yR){const w=f.headers??{},h=w.Expect||w.expect;let $=-1,E=!1;if(h==="100-continue")await Promise.race([new Promise((I)=>{$=Number(setTimeout(I,Math.max(yR,s)))}),new Promise((I)=>{r.on("continue",()=>{clearTimeout($),I()}),r.on("error",()=>{E=!0,clearTimeout($),I()})})]);if(!E)OR(r,f.body)}function OR(r,f){if(f instanceof dR.Readable){f.pipe(r);return}if(f){if(Buffer.isBuffer(f)||typeof f==="string"){r.end(f);return}const s=f;if(typeof s==="object"&&s.buffer&&typeof s.byteOffset==="number"&&typeof s.byteLength==="number"){r.end(Buffer.from(s.buffer,s.byteOffset,s.byteLength));return}r.end(Buffer.from(f));return}r.end()}async function eR(r){const f=[],s=r.getReader();let w=!1,h=0;while(!w){const{done:I,value:F}=await s.read();if(F)f.push(F),h+=F.length;w=I}const $=new Uint8Array(h);let E=0;for(let I of f)$.set(I,E),E+=I.length;return $}var{create:jq,defineProperty:S1,getOwnPropertyDescriptor:dq,getOwnPropertyNames:Oq,getPrototypeOf:cq}=Object,bq=Object.prototype.hasOwnProperty,Jr=(r,f)=>S1(r,"name",{value:f,configurable:!0}),gq=(r,f)=>{for(var s in f)S1(r,s,{get:f[s],enumerable:!0})},mR=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of Oq(f))if(!bq.call(r,h)&&h!==s)S1(r,h,{get:()=>f[h],enumerable:!(w=dq(f,h))||w.enumerable})}return r},_q=(r,f,s)=>(s=r!=null?jq(cq(r)):{},mR(f||!r||!r.__esModule?S1(s,"default",{value:r,enumerable:!0}):s,r)),xq=(r)=>mR(S1({},"__esModule",{value:!0}),r),iR={};gq(iR,{DEFAULT_REQUEST_TIMEOUT:()=>pq,NodeHttp2Handler:()=>fv,NodeHttpHandler:()=>uq,streamCollector:()=>hv});nR.exports=xq(iR);var qR=F0(),vR=PU(),XU=import.meta.require("http"),YU=import.meta.require("https"),eq=["ECONNRESET","EPIPE","ETIMEDOUT"],jR=Jr((r)=>{const f={};for(let s of Object.keys(r)){const w=r[s];f[s]=Array.isArray(w)?w.join(","):w}return f},"getTransformedHeaders"),nq=Jr((r,f,s=0)=>{if(!s)return;const w=setTimeout(()=>{r.destroy(),f(Object.assign(new Error(`Socket timed out without establishing a connection within ${s} ms`),{name:"TimeoutError"}))},s);r.on("socket",(h)=>{if(h.connecting)h.on("connect",()=>{clearTimeout(w)});else clearTimeout(w)})},"setConnectionTimeout"),oq=Jr((r,{keepAlive:f,keepAliveMsecs:s})=>{if(f!==!0)return;r.on("socket",(w)=>{w.setKeepAlive(f,s||0)})},"setSocketKeepAlive"),aq=Jr((r,f,s=0)=>{r.setTimeout(s,()=>{r.destroy(),f(Object.assign(new Error(`Connection timed out after ${s} ms`),{name:"TimeoutError"}))})},"setSocketTimeout"),dR=import.meta.require("stream"),yR=1000;Jr(KU,"writeRequestBody");Jr(OR,"writeBody");var pq=0,cR=class r{constructor(f){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((s,w)=>{if(typeof f==="function")f().then((h)=>{s(this.resolveDefaultConfig(h))}).catch(w);else s(this.resolveDefaultConfig(f))})}static create(f){if(typeof(f==null?void 0:f.handle)==="function")return f;return new r(f)}static checkSocketUsage(f,s,w=console){var h,$,E;const{sockets:I,requests:F,maxSockets:U}=f;if(typeof U!=="number"||U===1/0)return s;const C=15000;if(Date.now()-C<s)return s;if(I&&F)for(let L in I){const z=((h=I[L])==null?void 0:h.length)??0,S=(($=F[L])==null?void 0:$.length)??0;if(z>=U&&S>=2*U)return(E=w==null?void 0:w.warn)==null||E.call(w,`@smithy/node-http-handler:WARN - socket usage at capacity=${z} and ${S} additional requests are enqueued.
2
+ var jk=Object.create;var{getPrototypeOf:vk,defineProperty:V6,getOwnPropertyNames:ik}=Object;var Ok=Object.prototype.hasOwnProperty;var m=(r,s,f)=>{f=r!=null?jk(vk(r)):{};const w=s||!r||!r.__esModule?V6(f,"default",{value:r,enumerable:!0}):f;for(let h of ik(r))if(!Ok.call(w,h))V6(w,h,{get:()=>r[h],enumerable:!0});return w};var O=(r,s)=>()=>(s||r((s={exports:{}}).exports,s),s.exports);var Ys=(r,s)=>{for(var f in s)V6(r,f,{get:s[f],enumerable:!0,configurable:!0,set:(w)=>s[f]=()=>w})};var G=(r,s)=>()=>(r&&(s=r(r=0)),s);var Xs=(r)=>{let s=r.httpHandler;return{setHttpHandler(f){s=f},httpHandler(){return s},updateHttpClientConfig(f,w){s.updateHttpClientConfig(f,w)},httpHandlerConfigs(){return s.httpHandlerConfigs()}}},Ks=(r)=>{return{httpHandler:r.httpHandler()}};var LA=()=>{};var Ff=O((Ot,ZA)=>{var{defineProperty:U$,getOwnPropertyDescriptor:dk,getOwnPropertyNames:ck}=Object,bk=Object.prototype.hasOwnProperty,T$=(r,s)=>U$(r,"name",{value:s,configurable:!0}),_k=(r,s)=>{for(var f in s)U$(r,f,{get:s[f],enumerable:!0})},gk=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of ck(s))if(!bk.call(r,h)&&h!==f)U$(r,h,{get:()=>s[h],enumerable:!(w=dk(s,h))||w.enumerable})}return r},xk=(r)=>gk(U$({},"__esModule",{value:!0}),r),RA={};_k(RA,{AlgorithmId:()=>SA,EndpointURLScheme:()=>zA,FieldPosition:()=>YA,HttpApiKeyAuthLocation:()=>WA,HttpAuthLocation:()=>CA,IniSectionType:()=>XA,RequestHandlerProtocol:()=>KA,SMITHY_CONTEXT_KEY:()=>pk,getDefaultClientConfiguration:()=>ok,resolveDefaultRuntimeConfig:()=>ak});ZA.exports=xk(RA);var CA=((r)=>{return r.HEADER="header",r.QUERY="query",r})(CA||{}),WA=((r)=>{return r.HEADER="header",r.QUERY="query",r})(WA||{}),zA=((r)=>{return r.HTTP="http",r.HTTPS="https",r})(zA||{}),SA=((r)=>{return r.MD5="md5",r.CRC32="crc32",r.CRC32C="crc32c",r.SHA1="sha1",r.SHA256="sha256",r})(SA||{}),ek=T$((r)=>{const s=[];if(r.sha256!==void 0)s.push({algorithmId:()=>"sha256",checksumConstructor:()=>r.sha256});if(r.md5!=null)s.push({algorithmId:()=>"md5",checksumConstructor:()=>r.md5});return{_checksumAlgorithms:s,addChecksumAlgorithm(f){this._checksumAlgorithms.push(f)},checksumAlgorithms(){return this._checksumAlgorithms}}},"getChecksumConfiguration"),nk=T$((r)=>{const s={};return r.checksumAlgorithms().forEach((f)=>{s[f.algorithmId()]=f.checksumConstructor()}),s},"resolveChecksumRuntimeConfig"),ok=T$((r)=>{return{...ek(r)}},"getDefaultClientConfiguration"),ak=T$((r)=>{return{...nk(r)}},"resolveDefaultRuntimeConfig"),YA=((r)=>{return r[r.HEADER=0]="HEADER",r[r.TRAILER=1]="TRAILER",r})(YA||{}),pk="__smithy_context",XA=((r)=>{return r.PROFILE="profile",r.SSO_SESSION="sso-session",r.SERVICES="services",r})(XA||{}),KA=((r)=>{return r.HTTP_0_9="http/0.9",r.HTTP_1_0="http/1.0",r.TDS_8_0="tds/8.0",r})(KA||{})});var uk;var PA=G(()=>{uk=m(Ff(),1)});var JA=()=>{};function tk(r){return Object.keys(r).reduce((s,f)=>{const w=r[f];return{...s,[f]:Array.isArray(w)?[...w]:w}},{})}class Mr{constructor(r){this.method=r.method||"GET",this.hostname=r.hostname||"localhost",this.port=r.port,this.query=r.query||{},this.headers=r.headers||{},this.body=r.body,this.protocol=r.protocol?r.protocol.slice(-1)!==":"?`${r.protocol}:`:r.protocol:"https:",this.path=r.path?r.path.charAt(0)!=="/"?`/${r.path}`:r.path:"/",this.username=r.username,this.password=r.password,this.fragment=r.fragment}static clone(r){const s=new Mr({...r,headers:{...r.headers}});if(s.query)s.query=tk(s.query);return s}static isInstance(r){if(!r)return!1;const s=r;return"method"in s&&"protocol"in s&&"hostname"in s&&"path"in s&&typeof s.query==="object"&&typeof s.headers==="object"}clone(){return Mr.clone(this)}}class j0{constructor(r){this.statusCode=r.statusCode,this.reason=r.reason,this.headers=r.headers||{},this.body=r.body}static isInstance(r){if(!r)return!1;const s=r;return typeof s.statusCode==="number"&&typeof s.headers==="object"}}var QA=()=>{};var kr=G(()=>{LA();PA();JA();QA()});function Zs(r){return r}var ry=(r)=>(s)=>async(f)=>{if(!Mr.isInstance(f.request))return s(f);const{request:w}=f,{handlerProtocol:h=""}=r.requestHandler.metadata||{};if(h.indexOf("h2")>=0&&!w.headers[":authority"])delete w.headers.host,w.headers[":authority"]=w.hostname+(w.port?":"+w.port:"");else if(!w.headers.host){let E=w.hostname;if(w.port!=null)E+=`:${w.port}`;w.headers.host=E}return s(f)},fy,Ps=(r)=>({applyToStack:(s)=>{s.add(ry(r),fy)}});var pw=G(()=>{kr();fy={name:"hostHeaderMiddleware",step:"build",priority:"low",tags:["HOST"],override:!0}});var sy=()=>(r,s)=>async(f)=>{try{const w=await r(f),{clientName:h,commandName:E,logger:$,dynamoDbDocumentClientOptions:I={}}=s,{overrideInputFilterSensitiveLog:F,overrideOutputFilterSensitiveLog:U}=I,A=F??s.inputFilterSensitiveLog,L=U??s.outputFilterSensitiveLog,{$metadata:S,...z}=w.output;return $?.info?.({clientName:h,commandName:E,input:A(f.input),output:L(z),metadata:S}),w}catch(w){const{clientName:h,commandName:E,logger:$,dynamoDbDocumentClientOptions:I={}}=s,{overrideInputFilterSensitiveLog:F}=I,U=F??s.inputFilterSensitiveLog;throw $?.error?.({clientName:h,commandName:E,input:U(f.input),error:w,metadata:w.$metadata}),w}},wy,Js=(r)=>({applyToStack:(s)=>{s.add(sy(),wy)}});var BA=G(()=>{wy={name:"loggerMiddleware",tags:["LOGGER"],step:"initialize",override:!0}});var uw=G(()=>{BA()});var MA="X-Amzn-Trace-Id",hy="AWS_LAMBDA_FUNCTION_NAME",Ey="_X_AMZN_TRACE_ID",$y=(r)=>(s)=>async(f)=>{const{request:w}=f;if(!Mr.isInstance(w)||r.runtime!=="node"||w.headers.hasOwnProperty(MA))return s(f);const h=process.env[hy],E=process.env[Ey],$=(I)=>typeof I==="string"&&I.length>0;if($(h)&&$(E))w.headers[MA]=E;return s({...f,request:w})},Iy,Qs=(r)=>({applyToStack:(s)=>{s.add($y(r),Iy)}});var tw=G(()=>{kr();Iy={step:"build",tags:["RECURSION_DETECTION"],name:"recursionDetectionMiddleware",override:!0,priority:"low"}});var G1=O((Frr,DA)=>{var{defineProperty:G$,getOwnPropertyDescriptor:Fy,getOwnPropertyNames:Uy}=Object,Ty=Object.prototype.hasOwnProperty,HA=(r,s)=>G$(r,"name",{value:s,configurable:!0}),Gy=(r,s)=>{for(var f in s)G$(r,f,{get:s[f],enumerable:!0})},Ay=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of Uy(s))if(!Ty.call(r,h)&&h!==f)G$(r,h,{get:()=>s[h],enumerable:!(w=Fy(s,h))||w.enumerable})}return r},Ly=(r)=>Ay(G$({},"__esModule",{value:!0}),r),lA={};Gy(lA,{getSmithyContext:()=>Ry,normalizeProvider:()=>Cy});DA.exports=Ly(lA);var VA=Ff(),Ry=HA((r)=>r[VA.SMITHY_CONTEXT_KEY]||(r[VA.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),Cy=HA((r)=>{if(typeof r==="function")return r;const s=Promise.resolve(r);return()=>s},"normalizeProvider")});var Ar=O((Urr,mA)=>{var{defineProperty:A$,getOwnPropertyDescriptor:Wy,getOwnPropertyNames:zy}=Object,Sy=Object.prototype.hasOwnProperty,Sw=(r,s)=>A$(r,"name",{value:s,configurable:!0}),Yy=(r,s)=>{for(var f in s)A$(r,f,{get:s[f],enumerable:!0})},Xy=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of zy(s))if(!Sy.call(r,h)&&h!==f)A$(r,h,{get:()=>s[h],enumerable:!(w=Wy(s,h))||w.enumerable})}return r},Ky=(r)=>Xy(A$({},"__esModule",{value:!0}),r),kA={};Yy(kA,{CredentialsProviderError:()=>Zy,ProviderError:()=>L$,TokenProviderError:()=>Py,chain:()=>Jy,fromStatic:()=>Qy,memoize:()=>By});mA.exports=Ky(kA);var yA=class r extends Error{constructor(s,f=!0){var w;let h,E=!0;if(typeof f==="boolean")h=void 0,E=f;else if(f!=null&&typeof f==="object")h=f.logger,E=f.tryNextLink??!0;super(s);this.name="ProviderError",this.tryNextLink=E,Object.setPrototypeOf(this,r.prototype),(w=h==null?void 0:h.debug)==null||w.call(h,`@smithy/property-provider ${E?"->":"(!)"} ${s}`)}static from(s,f=!0){return Object.assign(new this(s.message,f),s)}};Sw(yA,"ProviderError");var L$=yA,NA=class r extends L${constructor(s,f=!0){super(s,f);this.name="CredentialsProviderError",Object.setPrototypeOf(this,r.prototype)}};Sw(NA,"CredentialsProviderError");var Zy=NA,qA=class r extends L${constructor(s,f=!0){super(s,f);this.name="TokenProviderError",Object.setPrototypeOf(this,r.prototype)}};Sw(qA,"TokenProviderError");var Py=qA,Jy=Sw((...r)=>async()=>{if(r.length===0)throw new L$("No providers in chain");let s;for(let f of r)try{return await f()}catch(w){if(s=w,w==null?void 0:w.tryNextLink)continue;throw w}throw s},"chain"),Qy=Sw((r)=>()=>Promise.resolve(r),"fromStatic"),By=Sw((r,s,f)=>{let w,h,E,$=!1;const I=Sw(async()=>{if(!h)h=r();try{w=await h,E=!0,$=!1}finally{h=void 0}return w},"coalesceProvider");if(s===void 0)return async(F)=>{if(!E||(F==null?void 0:F.forceRefresh))w=await I();return w};return async(F)=>{if(!E||(F==null?void 0:F.forceRefresh))w=await I();if($)return w;if(f&&!f(w))return $=!0,w;if(s(w))return await I(),w;return w}},"memoize")});var rh=O((jA)=>{Object.defineProperty(jA,"__esModule",{value:!0});jA.getHomeDir=void 0;var My=import.meta.require("os"),Vy=import.meta.require("path"),H6={},Hy=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},ly=()=>{const{HOME:r,USERPROFILE:s,HOMEPATH:f,HOMEDRIVE:w=`C:${Vy.sep}`}=process.env;if(r)return r;if(s)return s;if(f)return`${w}${f}`;const h=Hy();if(!H6[h])H6[h]=My.homedir();return H6[h]};jA.getHomeDir=ly});var l6=O((iA)=>{Object.defineProperty(iA,"__esModule",{value:!0});iA.getSSOTokenFilepath=void 0;var Dy=import.meta.require("crypto"),ky=import.meta.require("path"),yy=rh(),Ny=(r)=>{const f=Dy.createHash("sha1").update(r).digest("hex");return ky.join(yy.getHomeDir(),".aws","sso","cache",`${f}.json`)};iA.getSSOTokenFilepath=Ny});var bA=O((dA)=>{Object.defineProperty(dA,"__esModule",{value:!0});dA.getSSOTokenFromFile=void 0;var qy=import.meta.require("fs"),my=l6(),{readFile:jy}=qy.promises,vy=async(r)=>{const s=my.getSSOTokenFilepath(r),f=await jy(s,"utf8");return JSON.parse(f)};dA.getSSOTokenFromFile=vy});var k6=O((_A)=>{Object.defineProperty(_A,"__esModule",{value:!0});_A.slurpFile=void 0;var iy=import.meta.require("fs"),{readFile:Oy}=iy.promises,D6={},dy=(r,s)=>{if(!D6[r]||(s===null||s===void 0?void 0:s.ignoreCache))D6[r]=Oy(r,"utf8");return D6[r]};_A.slurpFile=dy});var m6=O((Rrr,L1)=>{var{defineProperty:W$,getOwnPropertyDescriptor:cy,getOwnPropertyNames:by}=Object,_y=Object.prototype.hasOwnProperty,Jf=(r,s)=>W$(r,"name",{value:s,configurable:!0}),gy=(r,s)=>{for(var f in s)W$(r,f,{get:s[f],enumerable:!0})},y6=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of by(s))if(!_y.call(r,h)&&h!==f)W$(r,h,{get:()=>s[h],enumerable:!(w=cy(s,h))||w.enumerable})}return r},q6=(r,s,f)=>(y6(r,s,"default"),f&&y6(f,s,"default")),xy=(r)=>y6(W$({},"__esModule",{value:!0}),r),A1={};gy(A1,{CONFIG_PREFIX_SEPARATOR:()=>Yw,DEFAULT_PROFILE:()=>oA,ENV_PROFILE:()=>nA,getProfileName:()=>ey,loadSharedConfigFiles:()=>pA,loadSsoSessionData:()=>$N,parseKnownFiles:()=>FN});L1.exports=xy(A1);q6(A1,rh(),L1.exports);var nA="AWS_PROFILE",oA="default",ey=Jf((r)=>r.profile||process.env[nA]||oA,"getProfileName");q6(A1,l6(),L1.exports);q6(A1,bA(),L1.exports);var R$=Ff(),ny=Jf((r)=>Object.entries(r).filter(([s])=>{const f=s.indexOf(Yw);if(f===-1)return!1;return Object.values(R$.IniSectionType).includes(s.substring(0,f))}).reduce((s,[f,w])=>{const h=f.indexOf(Yw),E=f.substring(0,h)===R$.IniSectionType.PROFILE?f.substring(h+1):f;return s[E]=w,s},{...r.default&&{default:r.default}}),"getConfigData"),C$=import.meta.require("path"),oy=rh(),ay="AWS_CONFIG_FILE",aA=Jf(()=>process.env[ay]||C$.join(oy.getHomeDir(),".aws","config"),"getConfigFilepath"),py=rh(),uy="AWS_SHARED_CREDENTIALS_FILE",ty=Jf(()=>process.env[uy]||C$.join(py.getHomeDir(),".aws","credentials"),"getCredentialsFilepath"),rN=rh(),fN=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,sN=["__proto__","profile __proto__"],N6=Jf((r)=>{const s={};let f,w;for(let h of r.split(/\r?\n/)){const E=h.split(/(^|\s)[;#]/)[0].trim();if(E[0]==="["&&E[E.length-1]==="]"){f=void 0,w=void 0;const I=E.substring(1,E.length-1),F=fN.exec(I);if(F){const[,U,,A]=F;if(Object.values(R$.IniSectionType).includes(U))f=[U,A].join(Yw)}else f=I;if(sN.includes(I))throw new Error(`Found invalid profile name "${I}"`)}else if(f){const I=E.indexOf("=");if(![0,-1].includes(I)){const[F,U]=[E.substring(0,I).trim(),E.substring(I+1).trim()];if(U==="")w=F;else{if(w&&h.trimStart()===h)w=void 0;s[f]=s[f]||{};const A=w?[w,F].join(Yw):F;s[f][A]=U}}}}return s},"parseIni"),xA=k6(),eA=Jf(()=>({}),"swallowError"),Yw=".",pA=Jf(async(r={})=>{const{filepath:s=ty(),configFilepath:f=aA()}=r,w=rN.getHomeDir();let E=s;if(s.startsWith("~/"))E=C$.join(w,s.slice(2));let $=f;if(f.startsWith("~/"))$=C$.join(w,f.slice(2));const I=await Promise.all([xA.slurpFile($,{ignoreCache:r.ignoreCache}).then(N6).then(ny).catch(eA),xA.slurpFile(E,{ignoreCache:r.ignoreCache}).then(N6).catch(eA)]);return{configFile:I[0],credentialsFile:I[1]}},"loadSharedConfigFiles"),wN=Jf((r)=>Object.entries(r).filter(([s])=>s.startsWith(R$.IniSectionType.SSO_SESSION+Yw)).reduce((s,[f,w])=>({...s,[f.substring(f.indexOf(Yw)+1)]:w}),{}),"getSsoSessionData"),hN=k6(),EN=Jf(()=>({}),"swallowError"),$N=Jf(async(r={})=>hN.slurpFile(r.configFilepath??aA()).then(N6).then(wN).catch(EN),"loadSsoSessionData"),IN=Jf((...r)=>{const s={};for(let f of r)for(let[w,h]of Object.entries(f))if(s[w]!==void 0)Object.assign(s[w],h);else s[w]=h;return s},"mergeConfigFiles"),FN=Jf(async(r)=>{const s=await pA(r);return IN(s.configFile,s.credentialsFile)},"parseKnownFiles")});var fL=O((Crr,rL)=>{function j6(r){try{const s=new Set(Array.from(r.match(/([A-Z_]){3,}/g)??[]));return s.delete("CONFIG"),s.delete("CONFIG_PREFIX_SEPARATOR"),s.delete("ENV"),[...s].join(", ")}catch(s){return r}}var{defineProperty:z$,getOwnPropertyDescriptor:UN,getOwnPropertyNames:TN}=Object,GN=Object.prototype.hasOwnProperty,fh=(r,s)=>z$(r,"name",{value:s,configurable:!0}),AN=(r,s)=>{for(var f in s)z$(r,f,{get:s[f],enumerable:!0})},LN=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of TN(s))if(!GN.call(r,h)&&h!==f)z$(r,h,{get:()=>s[h],enumerable:!(w=UN(s,h))||w.enumerable})}return r},RN=(r)=>LN(z$({},"__esModule",{value:!0}),r),tA={};AN(tA,{loadConfig:()=>YN});rL.exports=RN(tA);var R1=Ar();fh(j6,"getSelectorName");var CN=fh((r,s)=>async()=>{try{const f=r(process.env);if(f===void 0)throw new Error;return f}catch(f){throw new R1.CredentialsProviderError(f.message||`Not found in ENV: ${j6(r.toString())}`,{logger:s})}},"fromEnv"),uA=m6(),WN=fh((r,{preferredFile:s="config",...f}={})=>async()=>{const w=uA.getProfileName(f),{configFile:h,credentialsFile:E}=await uA.loadSharedConfigFiles(f),$=E[w]||{},I=h[w]||{},F=s==="config"?{...$,...I}:{...I,...$};try{const A=r(F,s==="config"?h:E);if(A===void 0)throw new Error;return A}catch(U){throw new R1.CredentialsProviderError(U.message||`Not found in config files w/ profile [${w}]: ${j6(r.toString())}`,{logger:f.logger})}},"fromSharedConfigFiles"),zN=fh((r)=>typeof r==="function","isFunction"),SN=fh((r)=>zN(r)?async()=>await r():R1.fromStatic(r),"fromStatic"),YN=fh(({environmentVariableSelector:r,configFileSelector:s,default:f},w={})=>R1.memoize(R1.chain(CN(r),WN(s,w),SN(f))),"loadConfig")});var IL=O((EL)=>{Object.defineProperty(EL,"__esModule",{value:!0});EL.getEndpointUrlConfig=void 0;var sL=m6(),wL="AWS_ENDPOINT_URL",hL="endpoint_url",XN=(r)=>({environmentVariableSelector:(s)=>{const f=r.split(" ").map((E)=>E.toUpperCase()),w=s[[wL,...f].join("_")];if(w)return w;const h=s[wL];if(h)return h;return},configFileSelector:(s,f)=>{if(f&&s.services){const h=f[["services",s.services].join(sL.CONFIG_PREFIX_SEPARATOR)];if(h){const E=r.split(" ").map((I)=>I.toLowerCase()),$=h[[E.join("_"),hL].join(sL.CONFIG_PREFIX_SEPARATOR)];if($)return $}}const w=s[hL];if(w)return w;return},default:void 0});EL.getEndpointUrlConfig=XN});var v6=O((FL)=>{Object.defineProperty(FL,"__esModule",{value:!0});FL.getEndpointFromConfig=void 0;var KN=fL(),ZN=IL(),PN=async(r)=>KN.loadConfig(ZN.getEndpointUrlConfig(r!==null&&r!==void 0?r:""))();FL.getEndpointFromConfig=PN});var LL=O((Srr,AL)=>{function GL(r){const s={};if(r=r.replace(/^\?/,""),r)for(let f of r.split("&")){let[w,h=null]=f.split("=");if(w=decodeURIComponent(w),h)h=decodeURIComponent(h);if(!(w in s))s[w]=h;else if(Array.isArray(s[w]))s[w].push(h);else s[w]=[s[w],h]}return s}var{defineProperty:S$,getOwnPropertyDescriptor:JN,getOwnPropertyNames:QN}=Object,BN=Object.prototype.hasOwnProperty,MN=(r,s)=>S$(r,"name",{value:s,configurable:!0}),VN=(r,s)=>{for(var f in s)S$(r,f,{get:s[f],enumerable:!0})},HN=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of QN(s))if(!BN.call(r,h)&&h!==f)S$(r,h,{get:()=>s[h],enumerable:!(w=JN(s,h))||w.enumerable})}return r},lN=(r)=>HN(S$({},"__esModule",{value:!0}),r),TL={};VN(TL,{parseQueryString:()=>GL});AL.exports=lN(TL);MN(GL,"parseQueryString")});var zL=O((Yrr,WL)=>{var{defineProperty:Y$,getOwnPropertyDescriptor:DN,getOwnPropertyNames:kN}=Object,yN=Object.prototype.hasOwnProperty,NN=(r,s)=>Y$(r,"name",{value:s,configurable:!0}),qN=(r,s)=>{for(var f in s)Y$(r,f,{get:s[f],enumerable:!0})},mN=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of kN(s))if(!yN.call(r,h)&&h!==f)Y$(r,h,{get:()=>s[h],enumerable:!(w=DN(s,h))||w.enumerable})}return r},jN=(r)=>mN(Y$({},"__esModule",{value:!0}),r),RL={};qN(RL,{parseUrl:()=>CL});WL.exports=jN(RL);var vN=LL(),CL=NN((r)=>{if(typeof r==="string")return CL(new URL(r));const{hostname:s,pathname:f,port:w,protocol:h,search:E}=r;let $;if(E)$=vN.parseQueryString(E);return{hostname:s,port:w?parseInt(w):void 0,protocol:h,path:f,query:$}},"parseUrl")});var O6=O((Xrr,JL)=>{function PL(r,s,f){return{applyToStack:(w)=>{w.add(YL(r,f),KL),w.add(XL(r,s),ZL)}}}var{defineProperty:X$,getOwnPropertyDescriptor:iN,getOwnPropertyNames:ON}=Object,dN=Object.prototype.hasOwnProperty,i6=(r,s)=>X$(r,"name",{value:s,configurable:!0}),cN=(r,s)=>{for(var f in s)X$(r,f,{get:s[f],enumerable:!0})},bN=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of ON(s))if(!dN.call(r,h)&&h!==f)X$(r,h,{get:()=>s[h],enumerable:!(w=iN(s,h))||w.enumerable})}return r},_N=(r)=>bN(X$({},"__esModule",{value:!0}),r),SL={};cN(SL,{deserializerMiddleware:()=>YL,deserializerMiddlewareOption:()=>KL,getSerdePlugin:()=>PL,serializerMiddleware:()=>XL,serializerMiddlewareOption:()=>ZL});JL.exports=_N(SL);var YL=i6((r,s)=>(f)=>async(w)=>{const{response:h}=await f(w);try{const E=await s(h,r);return{response:h,output:E}}catch(E){if(Object.defineProperty(E,"$response",{value:h}),!("$metadata"in E)){if(E.message+="\n Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.",typeof E.$responseBodyText!=="undefined"){if(E.$response)E.$response.body=E.$responseBodyText}}throw E}},"deserializerMiddleware"),XL=i6((r,s)=>(f,w)=>async(h)=>{var E;const $=((E=w.endpointV2)==null?void 0:E.url)&&r.urlParser?async()=>r.urlParser(w.endpointV2.url):r.endpoint;if(!$)throw new Error("No valid endpoint provider available.");const I=await s(h.input,{...r,endpoint:$});return f({...h,request:I})},"serializerMiddleware"),KL={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},ZL={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0};i6(PL,"getSerdePlugin")});var kL=O((Krr,DL)=>{var{defineProperty:Z$,getOwnPropertyDescriptor:gN,getOwnPropertyNames:xN}=Object,eN=Object.prototype.hasOwnProperty,uf=(r,s)=>Z$(r,"name",{value:s,configurable:!0}),nN=(r,s)=>{for(var f in s)Z$(r,f,{get:s[f],enumerable:!0})},oN=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of xN(s))if(!eN.call(r,h)&&h!==f)Z$(r,h,{get:()=>s[h],enumerable:!(w=gN(s,h))||w.enumerable})}return r},aN=(r)=>oN(Z$({},"__esModule",{value:!0}),r),BL={};nN(BL,{endpointMiddleware:()=>HL,endpointMiddlewareOptions:()=>lL,getEndpointFromInstructions:()=>ML,getEndpointPlugin:()=>$q,resolveEndpointConfig:()=>Fq,resolveParams:()=>VL,toEndpointV1:()=>d6});DL.exports=aN(BL);var pN=uf(async(r)=>{const s=(r==null?void 0:r.Bucket)||"";if(typeof r.Bucket==="string")r.Bucket=s.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(sq(s)){if(r.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!fq(s)||s.indexOf(".")!==-1&&!String(r.Endpoint).startsWith("http:")||s.toLowerCase()!==s||s.length<3)r.ForcePathStyle=!0;if(r.DisableMultiRegionAccessPoints)r.disableMultiRegionAccessPoints=!0,r.DisableMRAP=!0;return r},"resolveParamsForS3"),uN=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,tN=/(\d+\.){3}\d+/,rq=/\.\./,fq=uf((r)=>uN.test(r)&&!tN.test(r)&&!rq.test(r),"isDnsCompatibleBucketName"),sq=uf((r)=>{const[s,f,w,,,h]=r.split(":"),E=s==="arn"&&r.split(":").length>=6,$=Boolean(E&&f&&w&&h);if(E&&!$)throw new Error(`Invalid ARN: ${r} was an invalid ARN.`);return $},"isArnBucketName"),wq=uf((r,s,f)=>{const w=uf(async()=>{const h=f[r]??f[s];if(typeof h==="function")return h();return h},"configProvider");if(r==="credentialScope"||s==="CredentialScope")return async()=>{const h=typeof f.credentials==="function"?await f.credentials():f.credentials;return(h==null?void 0:h.credentialScope)??(h==null?void 0:h.CredentialScope)};if(r==="accountId"||s==="AccountId")return async()=>{const h=typeof f.credentials==="function"?await f.credentials():f.credentials;return(h==null?void 0:h.accountId)??(h==null?void 0:h.AccountId)};if(r==="endpoint"||s==="endpoint")return async()=>{const h=await w();if(h&&typeof h==="object"){if("url"in h)return h.url.href;if("hostname"in h){const{protocol:E,hostname:$,port:I,path:F}=h;return`${E}//${$}${I?":"+I:""}${F}`}}return h};return w},"createConfigValueProvider"),hq=v6(),QL=zL(),d6=uf((r)=>{if(typeof r==="object"){if("url"in r)return QL.parseUrl(r.url);return r}return QL.parseUrl(r)},"toEndpointV1"),ML=uf(async(r,s,f,w)=>{if(!f.endpoint){let $;if(f.serviceConfiguredEndpoint)$=await f.serviceConfiguredEndpoint();else $=await hq.getEndpointFromConfig(f.serviceId);if($)f.endpoint=()=>Promise.resolve(d6($))}const h=await VL(r,s,f);if(typeof f.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return f.endpointProvider(h,w)},"getEndpointFromInstructions"),VL=uf(async(r,s,f)=>{var w;const h={},E=((w=s==null?void 0:s.getEndpointParameterInstructions)==null?void 0:w.call(s))||{};for(let[$,I]of Object.entries(E))switch(I.type){case"staticContextParams":h[$]=I.value;break;case"contextParams":h[$]=r[I.name];break;case"clientContextParams":case"builtInParams":h[$]=await wq(I.name,$,f)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(I))}if(Object.keys(E).length===0)Object.assign(h,f);if(String(f.serviceId).toLowerCase()==="s3")await pN(h);return h},"resolveParams"),K$=G1(),HL=uf(({config:r,instructions:s})=>{return(f,w)=>async(h)=>{var E,$,I;const F=await ML(h.input,{getEndpointParameterInstructions(){return s}},{...r},w);w.endpointV2=F,w.authSchemes=(E=F.properties)==null?void 0:E.authSchemes;const U=($=w.authSchemes)==null?void 0:$[0];if(U){w.signing_region=U.signingRegion,w.signing_service=U.signingName;const A=K$.getSmithyContext(w),L=(I=A==null?void 0:A.selectedHttpAuthScheme)==null?void 0:I.httpAuthOption;if(L)L.signingProperties=Object.assign(L.signingProperties||{},{signing_region:U.signingRegion,signingRegion:U.signingRegion,signing_service:U.signingName,signingName:U.signingName,signingRegionSet:U.signingRegionSet},U.properties)}return f({...h})}},"endpointMiddleware"),Eq=O6(),lL={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:Eq.serializerMiddlewareOption.name},$q=uf((r,s)=>({applyToStack:(f)=>{f.addRelativeTo(HL({config:r,instructions:s}),lL)}}),"getEndpointPlugin"),Iq=v6(),Fq=uf((r)=>{const s=r.tls??!0,{endpoint:f}=r,w=f!=null?async()=>d6(await K$.normalizeProvider(f)()):void 0,E={...r,endpoint:w,tls:s,isCustomEndpoint:!!f,useDualstackEndpoint:K$.normalizeProvider(r.useDualstackEndpoint??!1),useFipsEndpoint:K$.normalizeProvider(r.useFipsEndpoint??!1)};let $=void 0;return E.serviceConfiguredEndpoint=async()=>{if(r.serviceId&&!$)$=Iq.getEndpointFromConfig(r.serviceId);return $},E},"resolveEndpointConfig")});var L0=O((Zrr,dL)=>{function vL(r){return Object.keys(r).reduce((s,f)=>{const w=r[f];return{...s,[f]:Array.isArray(w)?[...w]:w}},{})}function OL(r){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(r)}var{defineProperty:P$,getOwnPropertyDescriptor:Uq,getOwnPropertyNames:Tq}=Object,Gq=Object.prototype.hasOwnProperty,v0=(r,s)=>P$(r,"name",{value:s,configurable:!0}),Aq=(r,s)=>{for(var f in s)P$(r,f,{get:s[f],enumerable:!0})},Lq=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of Tq(s))if(!Gq.call(r,h)&&h!==f)P$(r,h,{get:()=>s[h],enumerable:!(w=Uq(s,h))||w.enumerable})}return r},Rq=(r)=>Lq(P$({},"__esModule",{value:!0}),r),yL={};Aq(yL,{Field:()=>zq,Fields:()=>Sq,HttpRequest:()=>Yq,HttpResponse:()=>Xq,IHttpRequest:()=>NL.HttpRequest,getHttpHandlerExtensionConfiguration:()=>Cq,isValidHostname:()=>OL,resolveHttpHandlerRuntimeConfig:()=>Wq});dL.exports=Rq(yL);var Cq=v0((r)=>{let s=r.httpHandler;return{setHttpHandler(f){s=f},httpHandler(){return s},updateHttpClientConfig(f,w){s.updateHttpClientConfig(f,w)},httpHandlerConfigs(){return s.httpHandlerConfigs()}}},"getHttpHandlerExtensionConfiguration"),Wq=v0((r)=>{return{httpHandler:r.httpHandler()}},"resolveHttpHandlerRuntimeConfig"),NL=Ff(),qL=class r{constructor({name:s,kind:f=NL.FieldPosition.HEADER,values:w=[]}){this.name=s,this.kind=f,this.values=w}add(s){this.values.push(s)}set(s){this.values=s}remove(s){this.values=this.values.filter((f)=>f!==s)}toString(){return this.values.map((s)=>s.includes(",")||s.includes(" ")?`"${s}"`:s).join(", ")}get(){return this.values}};v0(qL,"Field");var zq=qL,mL=class r{constructor({fields:s=[],encoding:f="utf-8"}){this.entries={},s.forEach(this.setField.bind(this)),this.encoding=f}setField(s){this.entries[s.name.toLowerCase()]=s}getField(s){return this.entries[s.toLowerCase()]}removeField(s){delete this.entries[s.toLowerCase()]}getByType(s){return Object.values(this.entries).filter((f)=>f.kind===s)}};v0(mL,"Fields");var Sq=mL,jL=class r{constructor(s){this.method=s.method||"GET",this.hostname=s.hostname||"localhost",this.port=s.port,this.query=s.query||{},this.headers=s.headers||{},this.body=s.body,this.protocol=s.protocol?s.protocol.slice(-1)!==":"?`${s.protocol}:`:s.protocol:"https:",this.path=s.path?s.path.charAt(0)!=="/"?`/${s.path}`:s.path:"/",this.username=s.username,this.password=s.password,this.fragment=s.fragment}static clone(s){const f=new r({...s,headers:{...s.headers}});if(f.query)f.query=vL(f.query);return f}static isInstance(s){if(!s)return!1;const f=s;return"method"in f&&"protocol"in f&&"hostname"in f&&"path"in f&&typeof f.query==="object"&&typeof f.headers==="object"}clone(){return r.clone(this)}};v0(jL,"HttpRequest");var Yq=jL;v0(vL,"cloneQuery");var iL=class r{constructor(s){this.statusCode=s.statusCode,this.reason=s.reason,this.headers=s.headers||{},this.body=s.body}static isInstance(s){if(!s)return!1;const f=s;return typeof f.statusCode==="number"&&typeof f.headers==="object"}};v0(iL,"HttpResponse");var Xq=iL;v0(OL,"isValidHostname")});var c6=O((cL)=>{function Zq(r){return r&&r.__esModule?r:{default:r}}function Pq(){if(J$>Q$.length-16)Kq.default.randomFillSync(Q$),J$=0;return Q$.slice(J$,J$+=16)}Object.defineProperty(cL,"__esModule",{value:!0});cL.default=Pq;var Kq=Zq(import.meta.require("crypto")),Q$=new Uint8Array(256),J$=Q$.length});var gL=O((bL)=>{Object.defineProperty(bL,"__esModule",{value:!0});bL.default=void 0;var Qq=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;bL.default=Qq});var C1=O((xL)=>{function Mq(r){return r&&r.__esModule?r:{default:r}}function Vq(r){return typeof r==="string"&&Bq.default.test(r)}Object.defineProperty(xL,"__esModule",{value:!0});xL.default=void 0;var Bq=Mq(gL()),Hq=Vq;xL.default=Hq});var W1=O((oL)=>{function Dq(r){return r&&r.__esModule?r:{default:r}}function nL(r,s=0){return Or[r[s+0]]+Or[r[s+1]]+Or[r[s+2]]+Or[r[s+3]]+"-"+Or[r[s+4]]+Or[r[s+5]]+"-"+Or[r[s+6]]+Or[r[s+7]]+"-"+Or[r[s+8]]+Or[r[s+9]]+"-"+Or[r[s+10]]+Or[r[s+11]]+Or[r[s+12]]+Or[r[s+13]]+Or[r[s+14]]+Or[r[s+15]]}function kq(r,s=0){const f=nL(r,s);if(!lq.default(f))throw TypeError("Stringified UUID is invalid");return f}Object.defineProperty(oL,"__esModule",{value:!0});oL.default=void 0;oL.unsafeStringify=nL;var lq=Dq(C1()),Or=[];for(let r=0;r<256;++r)Or.push((r+256).toString(16).slice(1));var yq=kq;oL.default=yq});var rR=O((uL)=>{function jq(r){return r&&r.__esModule?r:{default:r}}function vq(r,s,f){let w=s&&f||0;const h=s||new Array(16);r=r||{};let E=r.node||pL,$=r.clockseq!==void 0?r.clockseq:b6;if(E==null||$==null){const S=r.random||(r.rng||qq.default)();if(E==null)E=pL=[S[0]|1,S[1],S[2],S[3],S[4],S[5]];if($==null)$=b6=(S[6]<<8|S[7])&16383}let I=r.msecs!==void 0?r.msecs:Date.now(),F=r.nsecs!==void 0?r.nsecs:g6+1;const U=I-_6+(F-g6)/1e4;if(U<0&&r.clockseq===void 0)$=$+1&16383;if((U<0||I>_6)&&r.nsecs===void 0)F=0;if(F>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");_6=I,g6=F,b6=$,I+=12219292800000;const A=((I&268435455)*1e4+F)%4294967296;h[w++]=A>>>24&255,h[w++]=A>>>16&255,h[w++]=A>>>8&255,h[w++]=A&255;const L=I/4294967296*1e4&268435455;h[w++]=L>>>8&255,h[w++]=L&255,h[w++]=L>>>24&15|16,h[w++]=L>>>16&255,h[w++]=$>>>8|128,h[w++]=$&255;for(let S=0;S<6;++S)h[w+S]=E[S];return s||mq.unsafeStringify(h)}Object.defineProperty(uL,"__esModule",{value:!0});uL.default=void 0;var qq=jq(c6()),mq=W1(),pL,b6,_6=0,g6=0,iq=vq;uL.default=iq});var x6=O((fR)=>{function dq(r){return r&&r.__esModule?r:{default:r}}function cq(r){if(!Oq.default(r))throw TypeError("Invalid UUID");let s;const f=new Uint8Array(16);return f[0]=(s=parseInt(r.slice(0,8),16))>>>24,f[1]=s>>>16&255,f[2]=s>>>8&255,f[3]=s&255,f[4]=(s=parseInt(r.slice(9,13),16))>>>8,f[5]=s&255,f[6]=(s=parseInt(r.slice(14,18),16))>>>8,f[7]=s&255,f[8]=(s=parseInt(r.slice(19,23),16))>>>8,f[9]=s&255,f[10]=(s=parseInt(r.slice(24,36),16))/1099511627776&255,f[11]=s/4294967296&255,f[12]=s>>>24&255,f[13]=s>>>16&255,f[14]=s>>>8&255,f[15]=s&255,f}Object.defineProperty(fR,"__esModule",{value:!0});fR.default=void 0;var Oq=dq(C1()),bq=cq;fR.default=bq});var e6=O((ER)=>{function xq(r){return r&&r.__esModule?r:{default:r}}function eq(r){r=unescape(encodeURIComponent(r));const s=[];for(let f=0;f<r.length;++f)s.push(r.charCodeAt(f));return s}function nq(r,s,f){function w(h,E,$,I){var F;if(typeof h==="string")h=eq(h);if(typeof E==="string")E=gq.default(E);if(((F=E)===null||F===void 0?void 0:F.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let U=new Uint8Array(16+h.length);if(U.set(E),U.set(h,E.length),U=f(U),U[6]=U[6]&15|s,U[8]=U[8]&63|128,$){I=I||0;for(let A=0;A<16;++A)$[I+A]=U[A];return $}return _q.unsafeStringify(U)}try{w.name=r}catch(h){}return w.DNS=wR,w.URL=hR,w}Object.defineProperty(ER,"__esModule",{value:!0});ER.URL=ER.DNS=void 0;ER.default=nq;var _q=W1(),gq=xq(x6()),wR="6ba7b810-9dad-11d1-80b4-00c04fd430c8";ER.DNS=wR;var hR="6ba7b811-9dad-11d1-80b4-00c04fd430c8";ER.URL=hR});var UR=O((IR)=>{function uq(r){return r&&r.__esModule?r:{default:r}}function tq(r){if(Array.isArray(r))r=Buffer.from(r);else if(typeof r==="string")r=Buffer.from(r,"utf8");return pq.default.createHash("md5").update(r).digest()}Object.defineProperty(IR,"__esModule",{value:!0});IR.default=void 0;var pq=uq(import.meta.require("crypto")),rm=tq;IR.default=rm});var LR=O((GR)=>{function TR(r){return r&&r.__esModule?r:{default:r}}Object.defineProperty(GR,"__esModule",{value:!0});GR.default=void 0;var fm=TR(e6()),sm=TR(UR()),wm=fm.default("v3",48,sm.default),hm=wm;GR.default=hm});var WR=O((RR)=>{function $m(r){return r&&r.__esModule?r:{default:r}}Object.defineProperty(RR,"__esModule",{value:!0});RR.default=void 0;var Em=$m(import.meta.require("crypto")),Im={randomUUID:Em.default.randomUUID};RR.default=Im});var KR=O((YR)=>{function SR(r){return r&&r.__esModule?r:{default:r}}function Tm(r,s,f){if(zR.default.randomUUID&&!s&&!r)return zR.default.randomUUID();r=r||{};const w=r.random||(r.rng||Fm.default)();if(w[6]=w[6]&15|64,w[8]=w[8]&63|128,s){f=f||0;for(let h=0;h<16;++h)s[f+h]=w[h];return s}return Um.unsafeStringify(w)}Object.defineProperty(YR,"__esModule",{value:!0});YR.default=void 0;var zR=SR(WR()),Fm=SR(c6()),Um=W1(),Gm=Tm;YR.default=Gm});var JR=O((ZR)=>{function Lm(r){return r&&r.__esModule?r:{default:r}}function Rm(r){if(Array.isArray(r))r=Buffer.from(r);else if(typeof r==="string")r=Buffer.from(r,"utf8");return Am.default.createHash("sha1").update(r).digest()}Object.defineProperty(ZR,"__esModule",{value:!0});ZR.default=void 0;var Am=Lm(import.meta.require("crypto")),Cm=Rm;ZR.default=Cm});var VR=O((BR)=>{function QR(r){return r&&r.__esModule?r:{default:r}}Object.defineProperty(BR,"__esModule",{value:!0});BR.default=void 0;var Wm=QR(e6()),zm=QR(JR()),Sm=Wm.default("v5",80,zm.default),Ym=Sm;BR.default=Ym});var DR=O((HR)=>{Object.defineProperty(HR,"__esModule",{value:!0});HR.default=void 0;var Xm="00000000-0000-0000-0000-000000000000";HR.default=Xm});var NR=O((kR)=>{function Zm(r){return r&&r.__esModule?r:{default:r}}function Pm(r){if(!Km.default(r))throw TypeError("Invalid UUID");return parseInt(r.slice(14,15),16)}Object.defineProperty(kR,"__esModule",{value:!0});kR.default=void 0;var Km=Zm(C1()),Jm=Pm;kR.default=Jm});var n6=O((tf)=>{function R0(r){return r&&r.__esModule?r:{default:r}}Object.defineProperty(tf,"__esModule",{value:!0});Object.defineProperty(tf,"NIL",{enumerable:!0,get:function(){return Hm.default}});Object.defineProperty(tf,"parse",{enumerable:!0,get:function(){return ym.default}});Object.defineProperty(tf,"stringify",{enumerable:!0,get:function(){return km.default}});Object.defineProperty(tf,"v1",{enumerable:!0,get:function(){return Qm.default}});Object.defineProperty(tf,"v3",{enumerable:!0,get:function(){return Bm.default}});Object.defineProperty(tf,"v4",{enumerable:!0,get:function(){return Mm.default}});Object.defineProperty(tf,"v5",{enumerable:!0,get:function(){return Vm.default}});Object.defineProperty(tf,"validate",{enumerable:!0,get:function(){return Dm.default}});Object.defineProperty(tf,"version",{enumerable:!0,get:function(){return lm.default}});var Qm=R0(rR()),Bm=R0(LR()),Mm=R0(KR()),Vm=R0(VR()),Hm=R0(DR()),lm=R0(NR()),Dm=R0(C1()),km=R0(W1()),ym=R0(x6())});var o6=O((irr,vR)=>{var{defineProperty:B$,getOwnPropertyDescriptor:Nm,getOwnPropertyNames:qm}=Object,mm=Object.prototype.hasOwnProperty,sh=(r,s)=>B$(r,"name",{value:s,configurable:!0}),jm=(r,s)=>{for(var f in s)B$(r,f,{get:s[f],enumerable:!0})},vm=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of qm(s))if(!mm.call(r,h)&&h!==f)B$(r,h,{get:()=>s[h],enumerable:!(w=Nm(s,h))||w.enumerable})}return r},im=(r)=>vm(B$({},"__esModule",{value:!0}),r),qR={};jm(qR,{isClockSkewCorrectedError:()=>mR,isClockSkewError:()=>xm,isRetryableByTrait:()=>gm,isServerError:()=>nm,isThrottlingError:()=>em,isTransientError:()=>jR});vR.exports=im(qR);var Om=["AuthFailure","InvalidSignatureException","RequestExpired","RequestInTheFuture","RequestTimeTooSkewed","SignatureDoesNotMatch"],dm=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],cm=["TimeoutError","RequestTimeout","RequestTimeoutException"],bm=[500,502,503,504],_m=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"],gm=sh((r)=>r.$retryable!==void 0,"isRetryableByTrait"),xm=sh((r)=>Om.includes(r.name),"isClockSkewError"),mR=sh((r)=>{var s;return(s=r.$metadata)==null?void 0:s.clockSkewCorrected},"isClockSkewCorrectedError"),em=sh((r)=>{var s,f;return((s=r.$metadata)==null?void 0:s.httpStatusCode)===429||dm.includes(r.name)||((f=r.$retryable)==null?void 0:f.throttling)==!0},"isThrottlingError"),jR=sh((r)=>{var s;return mR(r)||cm.includes(r.name)||_m.includes((r==null?void 0:r.code)||"")||bm.includes(((s=r.$metadata)==null?void 0:s.httpStatusCode)||0)},"isTransientError"),nm=sh((r)=>{var s;if(((s=r.$metadata)==null?void 0:s.httpStatusCode)!==void 0){const f=r.$metadata.httpStatusCode;if(500<=f&&f<=599&&!jR(r))return!0;return!1}return!1},"isServerError")});var uR=O((Orr,pR)=>{var{defineProperty:M$,getOwnPropertyDescriptor:om,getOwnPropertyNames:am}=Object,pm=Object.prototype.hasOwnProperty,rs=(r,s)=>M$(r,"name",{value:s,configurable:!0}),um=(r,s)=>{for(var f in s)M$(r,f,{get:s[f],enumerable:!0})},tm=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of am(s))if(!pm.call(r,h)&&h!==f)M$(r,h,{get:()=>s[h],enumerable:!(w=om(s,h))||w.enumerable})}return r},rj=(r)=>tm(M$({},"__esModule",{value:!0}),r),OR={};um(OR,{AdaptiveRetryStrategy:()=>$j,ConfiguredRetryStrategy:()=>Ij,DEFAULT_MAX_ATTEMPTS:()=>a6,DEFAULT_RETRY_DELAY_BASE:()=>z1,DEFAULT_RETRY_MODE:()=>fj,DefaultRateLimiter:()=>bR,INITIAL_RETRY_TOKENS:()=>p6,INVOCATION_ID_HEADER:()=>wj,MAXIMUM_RETRY_DELAY:()=>u6,NO_RETRY_INCREMENT:()=>eR,REQUEST_HEADER:()=>hj,RETRY_COST:()=>gR,RETRY_MODES:()=>dR,StandardRetryStrategy:()=>t6,THROTTLING_RETRY_DELAY_BASE:()=>_R,TIMEOUT_RETRY_COST:()=>xR});pR.exports=rj(OR);var dR=((r)=>{return r.STANDARD="standard",r.ADAPTIVE="adaptive",r})(dR||{}),a6=3,fj="standard",sj=o6(),cR=class r{constructor(s){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=(s==null?void 0:s.beta)??0.7,this.minCapacity=(s==null?void 0:s.minCapacity)??1,this.minFillRate=(s==null?void 0:s.minFillRate)??0.5,this.scaleConstant=(s==null?void 0:s.scaleConstant)??0.4,this.smooth=(s==null?void 0:s.smooth)??0.8;const f=this.getCurrentTimeInSeconds();this.lastThrottleTime=f,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1000}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(s){if(!this.enabled)return;if(this.refillTokenBucket(),s>this.currentCapacity){const f=(s-this.currentCapacity)/this.fillRate*1000;await new Promise((w)=>setTimeout(w,f))}this.currentCapacity=this.currentCapacity-s}refillTokenBucket(){const s=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=s;return}const f=(s-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+f),this.lastTimestamp=s}updateClientSendingRate(s){let f;if(this.updateMeasuredRate(),sj.isThrottlingError(s)){const h=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=h,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),f=this.cubicThrottle(h),this.enableTokenBucket()}else this.calculateTimeWindow(),f=this.cubicSuccess(this.getCurrentTimeInSeconds());const w=Math.min(f,2*this.measuredTxRate);this.updateTokenBucketRate(w)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle(s){return this.getPrecise(s*this.beta)}cubicSuccess(s){return this.getPrecise(this.scaleConstant*Math.pow(s-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(s){this.refillTokenBucket(),this.fillRate=Math.max(s,this.minFillRate),this.maxCapacity=Math.max(s,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const s=this.getCurrentTimeInSeconds(),f=Math.floor(s*2)/2;if(this.requestCount++,f>this.lastTxRateBucket){const w=this.requestCount/(f-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(w*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=f}}getPrecise(s){return parseFloat(s.toFixed(8))}};rs(cR,"DefaultRateLimiter");var bR=cR,z1=100,u6=20000,_R=500,p6=500,gR=5,xR=10,eR=1,wj="amz-sdk-invocation-id",hj="amz-sdk-request",Ej=rs(()=>{let r=z1;return{computeNextBackoffDelay:rs((w)=>{return Math.floor(Math.min(u6,Math.random()*2**w*r))},"computeNextBackoffDelay"),setDelayBase:rs((w)=>{r=w},"setDelayBase")}},"getDefaultRetryBackoffStrategy"),iR=rs(({retryDelay:r,retryCount:s,retryCost:f})=>{return{getRetryCount:rs(()=>s,"getRetryCount"),getRetryDelay:rs(()=>Math.min(u6,r),"getRetryDelay"),getRetryCost:rs(()=>f,"getRetryCost")}},"createDefaultRetryToken"),nR=class r{constructor(s){this.maxAttempts=s,this.mode="standard",this.capacity=p6,this.retryBackoffStrategy=Ej(),this.maxAttemptsProvider=typeof s==="function"?s:async()=>s}async acquireInitialRetryToken(s){return iR({retryDelay:z1,retryCount:0})}async refreshRetryTokenForRetry(s,f){const w=await this.getMaxAttempts();if(this.shouldRetry(s,f,w)){const h=f.errorType;this.retryBackoffStrategy.setDelayBase(h==="THROTTLING"?_R:z1);const E=this.retryBackoffStrategy.computeNextBackoffDelay(s.getRetryCount()),$=f.retryAfterHint?Math.max(f.retryAfterHint.getTime()-Date.now()||0,E):E,I=this.getCapacityCost(h);return this.capacity-=I,iR({retryDelay:$,retryCount:s.getRetryCount()+1,retryCost:I})}throw new Error("No retry token available")}recordSuccess(s){this.capacity=Math.max(p6,this.capacity+(s.getRetryCost()??eR))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(s){return console.warn(`Max attempts provider could not resolve. Using default of ${a6}`),a6}}shouldRetry(s,f,w){return s.getRetryCount()+1<w&&this.capacity>=this.getCapacityCost(f.errorType)&&this.isRetryableError(f.errorType)}getCapacityCost(s){return s==="TRANSIENT"?xR:gR}isRetryableError(s){return s==="THROTTLING"||s==="TRANSIENT"}};rs(nR,"StandardRetryStrategy");var t6=nR,oR=class r{constructor(s,f){this.maxAttemptsProvider=s,this.mode="adaptive";const{rateLimiter:w}=f??{};this.rateLimiter=w??new bR,this.standardRetryStrategy=new t6(s)}async acquireInitialRetryToken(s){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(s)}async refreshRetryTokenForRetry(s,f){return this.rateLimiter.updateClientSendingRate(f),this.standardRetryStrategy.refreshRetryTokenForRetry(s,f)}recordSuccess(s){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(s)}};rs(oR,"AdaptiveRetryStrategy");var $j=oR,aR=class r extends t6{constructor(s,f=z1){super(typeof s==="function"?s:async()=>s);if(typeof f==="number")this.computeNextBackoffDelay=()=>f;else this.computeNextBackoffDelay=f}async refreshRetryTokenForRetry(s,f){const w=await super.refreshRetryTokenForRetry(s,f);return w.getRetryDelay=()=>this.computeNextBackoffDelay(w.getRetryCount()),w}};rs(aR,"ConfiguredRetryStrategy");var Ij=aR});var wC=O((drr,sC)=>{var{defineProperty:V$,getOwnPropertyDescriptor:Fj,getOwnPropertyNames:Uj}=Object,Tj=Object.prototype.hasOwnProperty,Qf=(r,s)=>V$(r,"name",{value:s,configurable:!0}),Gj=(r,s)=>{for(var f in s)V$(r,f,{get:s[f],enumerable:!0})},Aj=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of Uj(s))if(!Tj.call(r,h)&&h!==f)V$(r,h,{get:()=>s[h],enumerable:!(w=Fj(s,h))||w.enumerable})}return r},Lj=(r)=>Aj(V$({},"__esModule",{value:!0}),r),fC={};Gj(fC,{constructStack:()=>rF});sC.exports=Lj(fC);var Xw=Qf((r,s)=>{const f=[];if(r)f.push(r);if(s)for(let w of s)f.push(w);return f},"getAllAliases"),i0=Qf((r,s)=>{return`${r||"anonymous"}${s&&s.length>0?` (a.k.a. ${s.join(",")})`:""}`},"getMiddlewareNameWithAliases"),rF=Qf(()=>{let r=[],s=[],f=!1;const w=new Set,h=Qf((L)=>L.sort((S,z)=>tR[z.step]-tR[S.step]||rC[z.priority||"normal"]-rC[S.priority||"normal"]),"sort"),E=Qf((L)=>{let S=!1;const z=Qf((Z)=>{const N=Xw(Z.name,Z.aliases);if(N.includes(L)){S=!0;for(let M of N)w.delete(M);return!1}return!0},"filterCb");return r=r.filter(z),s=s.filter(z),S},"removeByName"),$=Qf((L)=>{let S=!1;const z=Qf((Z)=>{if(Z.middleware===L){S=!0;for(let N of Xw(Z.name,Z.aliases))w.delete(N);return!1}return!0},"filterCb");return r=r.filter(z),s=s.filter(z),S},"removeByReference"),I=Qf((L)=>{var S;return r.forEach((z)=>{L.add(z.middleware,{...z})}),s.forEach((z)=>{L.addRelativeTo(z.middleware,{...z})}),(S=L.identifyOnResolve)==null||S.call(L,A.identifyOnResolve()),L},"cloneTo"),F=Qf((L)=>{const S=[];return L.before.forEach((z)=>{if(z.before.length===0&&z.after.length===0)S.push(z);else S.push(...F(z))}),S.push(L),L.after.reverse().forEach((z)=>{if(z.before.length===0&&z.after.length===0)S.push(z);else S.push(...F(z))}),S},"expandRelativeMiddlewareList"),U=Qf((L=!1)=>{const S=[],z=[],Z={};return r.forEach((M)=>{const l={...M,before:[],after:[]};for(let k of Xw(l.name,l.aliases))Z[k]=l;S.push(l)}),s.forEach((M)=>{const l={...M,before:[],after:[]};for(let k of Xw(l.name,l.aliases))Z[k]=l;z.push(l)}),z.forEach((M)=>{if(M.toMiddleware){const l=Z[M.toMiddleware];if(l===void 0){if(L)return;throw new Error(`${M.toMiddleware} is not found when adding ${i0(M.name,M.aliases)} middleware ${M.relation} ${M.toMiddleware}`)}if(M.relation==="after")l.after.push(M);if(M.relation==="before")l.before.push(M)}}),h(S).map(F).reduce((M,l)=>{return M.push(...l),M},[])},"getMiddlewareList"),A={add:(L,S={})=>{const{name:z,override:Z,aliases:N}=S,M={step:"initialize",priority:"normal",middleware:L,...S},l=Xw(z,N);if(l.length>0){if(l.some((k)=>w.has(k))){if(!Z)throw new Error(`Duplicate middleware name '${i0(z,N)}'`);for(let k of l){const i=r.findIndex((sr)=>{var Br;return sr.name===k||((Br=sr.aliases)==null?void 0:Br.some((pr)=>pr===k))});if(i===-1)continue;const e=r[i];if(e.step!==M.step||M.priority!==e.priority)throw new Error(`"${i0(e.name,e.aliases)}" middleware with ${e.priority} priority in ${e.step} step cannot be overridden by "${i0(z,N)}" middleware with ${M.priority} priority in ${M.step} step.`);r.splice(i,1)}}for(let k of l)w.add(k)}r.push(M)},addRelativeTo:(L,S)=>{const{name:z,override:Z,aliases:N}=S,M={middleware:L,...S},l=Xw(z,N);if(l.length>0){if(l.some((k)=>w.has(k))){if(!Z)throw new Error(`Duplicate middleware name '${i0(z,N)}'`);for(let k of l){const i=s.findIndex((sr)=>{var Br;return sr.name===k||((Br=sr.aliases)==null?void 0:Br.some((pr)=>pr===k))});if(i===-1)continue;const e=s[i];if(e.toMiddleware!==M.toMiddleware||e.relation!==M.relation)throw new Error(`"${i0(e.name,e.aliases)}" middleware ${e.relation} "${e.toMiddleware}" middleware cannot be overridden by "${i0(z,N)}" middleware ${M.relation} "${M.toMiddleware}" middleware.`);s.splice(i,1)}}for(let k of l)w.add(k)}s.push(M)},clone:()=>I(rF()),use:(L)=>{L.applyToStack(A)},remove:(L)=>{if(typeof L==="string")return E(L);else return $(L)},removeByTag:(L)=>{let S=!1;const z=Qf((Z)=>{const{tags:N,name:M,aliases:l}=Z;if(N&&N.includes(L)){const k=Xw(M,l);for(let i of k)w.delete(i);return S=!0,!1}return!0},"filterCb");return r=r.filter(z),s=s.filter(z),S},concat:(L)=>{var S;const z=I(rF());return z.use(L),z.identifyOnResolve(f||z.identifyOnResolve()||(((S=L.identifyOnResolve)==null?void 0:S.call(L))??!1)),z},applyToStack:I,identify:()=>{return U(!0).map((L)=>{const S=L.step??L.relation+" "+L.toMiddleware;return i0(L.name,L.aliases)+" - "+S})},identifyOnResolve(L){if(typeof L==="boolean")f=L;return f},resolve:(L,S)=>{for(let z of U().map((Z)=>Z.middleware).reverse())L=z(L,S);if(f)console.log(A.identify());return L}};return A},"constructStack"),tR={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},rC={high:3,normal:2,low:1}});var fF=O((crr,EC)=>{var{defineProperty:H$,getOwnPropertyDescriptor:Rj,getOwnPropertyNames:Cj}=Object,Wj=Object.prototype.hasOwnProperty,zj=(r,s)=>H$(r,"name",{value:s,configurable:!0}),Sj=(r,s)=>{for(var f in s)H$(r,f,{get:s[f],enumerable:!0})},Yj=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of Cj(s))if(!Wj.call(r,h)&&h!==f)H$(r,h,{get:()=>s[h],enumerable:!(w=Rj(s,h))||w.enumerable})}return r},Xj=(r)=>Yj(H$({},"__esModule",{value:!0}),r),hC={};Sj(hC,{isArrayBuffer:()=>Kj});EC.exports=Xj(hC);var Kj=zj((r)=>typeof ArrayBuffer==="function"&&r instanceof ArrayBuffer||Object.prototype.toString.call(r)==="[object ArrayBuffer]","isArrayBuffer")});var S1=O((brr,FC)=>{var{defineProperty:l$,getOwnPropertyDescriptor:Zj,getOwnPropertyNames:Pj}=Object,Jj=Object.prototype.hasOwnProperty,$C=(r,s)=>l$(r,"name",{value:s,configurable:!0}),Qj=(r,s)=>{for(var f in s)l$(r,f,{get:s[f],enumerable:!0})},Bj=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of Pj(s))if(!Jj.call(r,h)&&h!==f)l$(r,h,{get:()=>s[h],enumerable:!(w=Zj(s,h))||w.enumerable})}return r},Mj=(r)=>Bj(l$({},"__esModule",{value:!0}),r),IC={};Qj(IC,{fromArrayBuffer:()=>Hj,fromString:()=>lj});FC.exports=Mj(IC);var Vj=fF(),sF=import.meta.require("buffer"),Hj=$C((r,s=0,f=r.byteLength-s)=>{if(!Vj.isArrayBuffer(r))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof r} (${r})`);return sF.Buffer.from(r,s,f)},"fromArrayBuffer"),lj=$C((r,s)=>{if(typeof r!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof r} (${r})`);return s?sF.Buffer.from(r,s):sF.Buffer.from(r)},"fromString")});var GC=O((UC)=>{Object.defineProperty(UC,"__esModule",{value:!0});UC.fromBase64=void 0;var Dj=S1(),kj=/^[A-Za-z0-9+/]*={0,2}$/,yj=(r)=>{if(r.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!kj.exec(r))throw new TypeError("Invalid base64 string.");const s=Dj.fromString(r,"base64");return new Uint8Array(s.buffer,s.byteOffset,s.byteLength)};UC.fromBase64=yj});var O0=O((grr,CC)=>{var{defineProperty:D$,getOwnPropertyDescriptor:Nj,getOwnPropertyNames:qj}=Object,mj=Object.prototype.hasOwnProperty,wF=(r,s)=>D$(r,"name",{value:s,configurable:!0}),jj=(r,s)=>{for(var f in s)D$(r,f,{get:s[f],enumerable:!0})},vj=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of qj(s))if(!mj.call(r,h)&&h!==f)D$(r,h,{get:()=>s[h],enumerable:!(w=Nj(s,h))||w.enumerable})}return r},ij=(r)=>vj(D$({},"__esModule",{value:!0}),r),AC={};jj(AC,{fromUtf8:()=>RC,toUint8Array:()=>Oj,toUtf8:()=>dj});CC.exports=ij(AC);var LC=S1(),RC=wF((r)=>{const s=LC.fromString(r,"utf8");return new Uint8Array(s.buffer,s.byteOffset,s.byteLength/Uint8Array.BYTES_PER_ELEMENT)},"fromUtf8"),Oj=wF((r)=>{if(typeof r==="string")return RC(r);if(ArrayBuffer.isView(r))return new Uint8Array(r.buffer,r.byteOffset,r.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(r)},"toUint8Array"),dj=wF((r)=>{if(typeof r==="string")return r;if(typeof r!=="object"||typeof r.byteOffset!=="number"||typeof r.byteLength!=="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return LC.fromArrayBuffer(r.buffer,r.byteOffset,r.byteLength).toString("utf8")},"toUtf8")});var SC=O((WC)=>{Object.defineProperty(WC,"__esModule",{value:!0});WC.toBase64=void 0;var cj=S1(),bj=O0(),_j=(r)=>{let s;if(typeof r==="string")s=bj.fromUtf8(r);else s=r;if(typeof s!=="object"||typeof s.byteOffset!=="number"||typeof s.byteLength!=="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return cj.fromArrayBuffer(s.buffer,s.byteOffset,s.byteLength).toString("base64")};WC.toBase64=_j});var y$=O((err,k$)=>{var{defineProperty:YC,getOwnPropertyDescriptor:gj,getOwnPropertyNames:xj}=Object,ej=Object.prototype.hasOwnProperty,hF=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of xj(s))if(!ej.call(r,h)&&h!==f)YC(r,h,{get:()=>s[h],enumerable:!(w=gj(s,h))||w.enumerable})}return r},XC=(r,s,f)=>(hF(r,s,"default"),f&&hF(f,s,"default")),nj=(r)=>hF(YC({},"__esModule",{value:!0}),r),EF={};k$.exports=nj(EF);XC(EF,GC(),k$.exports);XC(EF,SC(),k$.exports)});var PC=O((KC)=>{Object.defineProperty(KC,"__esModule",{value:!0});KC.getAwsChunkedEncodingStream=void 0;var oj=import.meta.require("stream"),aj=(r,s)=>{const{base64Encoder:f,bodyLengthChecker:w,checksumAlgorithmFn:h,checksumLocationName:E,streamHasher:$}=s,I=f!==void 0&&h!==void 0&&E!==void 0&&$!==void 0,F=I?$(h,r):void 0,U=new oj.Readable({read:()=>{}});return r.on("data",(A)=>{const L=w(A)||0;U.push(`${L.toString(16)}\r\n`),U.push(A),U.push("\r\n")}),r.on("end",async()=>{if(U.push("0\r\n"),I){const A=f(await F);U.push(`${E}:${A}\r\n`),U.push("\r\n")}U.push(null)}),U};KC.getAwsChunkedEncodingStream=aj});var IF=O((orr,BC)=>{var{defineProperty:N$,getOwnPropertyDescriptor:pj,getOwnPropertyNames:uj}=Object,tj=Object.prototype.hasOwnProperty,$F=(r,s)=>N$(r,"name",{value:s,configurable:!0}),rv=(r,s)=>{for(var f in s)N$(r,f,{get:s[f],enumerable:!0})},fv=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of uj(s))if(!tj.call(r,h)&&h!==f)N$(r,h,{get:()=>s[h],enumerable:!(w=pj(s,h))||w.enumerable})}return r},sv=(r)=>fv(N$({},"__esModule",{value:!0}),r),JC={};rv(JC,{escapeUri:()=>QC,escapeUriPath:()=>hv});BC.exports=sv(JC);var QC=$F((r)=>encodeURIComponent(r).replace(/[!'()*]/g,wv),"escapeUri"),wv=$F((r)=>`%${r.charCodeAt(0).toString(16).toUpperCase()}`,"hexEncode"),hv=$F((r)=>r.split("/").map(QC).join("/"),"escapeUriPath")});var UF=O((arr,HC)=>{function VC(r){const s=[];for(let f of Object.keys(r).sort()){const w=r[f];if(f=FF.escapeUri(f),Array.isArray(w))for(let h=0,E=w.length;h<E;h++)s.push(`${f}=${FF.escapeUri(w[h])}`);else{let h=f;if(w||typeof w==="string")h+=`=${FF.escapeUri(w)}`;s.push(h)}}return s.join("&")}var{defineProperty:q$,getOwnPropertyDescriptor:Ev,getOwnPropertyNames:$v}=Object,Iv=Object.prototype.hasOwnProperty,Fv=(r,s)=>q$(r,"name",{value:s,configurable:!0}),Uv=(r,s)=>{for(var f in s)q$(r,f,{get:s[f],enumerable:!0})},Tv=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of $v(s))if(!Iv.call(r,h)&&h!==f)q$(r,h,{get:()=>s[h],enumerable:!(w=Ev(s,h))||w.enumerable})}return r},Gv=(r)=>Tv(q$({},"__esModule",{value:!0}),r),MC={};Uv(MC,{buildQueryString:()=>VC});HC.exports=Gv(MC);var FF=IF();Fv(VC,"buildQueryString")});var nC=O((prr,eC)=>{async function AF(r,s,f=kC){const w=s.headers??{},h=w.Expect||w.expect;let E=-1,$=!1;if(h==="100-continue")await Promise.race([new Promise((I)=>{E=Number(setTimeout(I,Math.max(kC,f)))}),new Promise((I)=>{r.on("continue",()=>{clearTimeout(E),I()}),r.on("error",()=>{$=!0,clearTimeout(E),I()})})]);if(!$)OC(r,s.body)}function OC(r,s){if(s instanceof iC.Readable){s.pipe(r);return}if(s){if(Buffer.isBuffer(s)||typeof s==="string"){r.end(s);return}const f=s;if(typeof f==="object"&&f.buffer&&typeof f.byteOffset==="number"&&typeof f.byteLength==="number"){r.end(Buffer.from(f.buffer,f.byteOffset,f.byteLength));return}r.end(Buffer.from(s));return}r.end()}async function xC(r){const s=[],f=r.getReader();let w=!1,h=0;while(!w){const{done:I,value:F}=await f.read();if(F)s.push(F),h+=F.length;w=I}const E=new Uint8Array(h);let $=0;for(let I of s)E.set(I,$),$+=I.length;return E}var{create:Av,defineProperty:Y1,getOwnPropertyDescriptor:Lv,getOwnPropertyNames:Rv,getPrototypeOf:Cv}=Object,Wv=Object.prototype.hasOwnProperty,Rr=(r,s)=>Y1(r,"name",{value:s,configurable:!0}),zv=(r,s)=>{for(var f in s)Y1(r,f,{get:s[f],enumerable:!0})},NC=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of Rv(s))if(!Wv.call(r,h)&&h!==f)Y1(r,h,{get:()=>s[h],enumerable:!(w=Lv(s,h))||w.enumerable})}return r},Sv=(r,s,f)=>(f=r!=null?Av(Cv(r)):{},NC(s||!r||!r.__esModule?Y1(f,"default",{value:r,enumerable:!0}):f,r)),Yv=(r)=>NC(Y1({},"__esModule",{value:!0}),r),qC={};zv(qC,{DEFAULT_REQUEST_TIMEOUT:()=>Qv,NodeHttp2Handler:()=>lv,NodeHttpHandler:()=>Bv,streamCollector:()=>kv});eC.exports=Yv(qC);var mC=L0(),jC=UF(),TF=import.meta.require("http"),GF=import.meta.require("https"),Xv=["ECONNRESET","EPIPE","ETIMEDOUT"],vC=Rr((r)=>{const s={};for(let f of Object.keys(r)){const w=r[f];s[f]=Array.isArray(w)?w.join(","):w}return s},"getTransformedHeaders"),lC=1000,Kv=Rr((r,s,f=0)=>{if(!f)return-1;const w=Rr((h)=>{const E=setTimeout(()=>{r.destroy(),s(Object.assign(new Error(`Socket timed out without establishing a connection within ${f} ms`),{name:"TimeoutError"}))},f-h),$=Rr((I)=>{if(I==null?void 0:I.connecting)I.on("connect",()=>{clearTimeout(E)});else clearTimeout(E)},"doWithSocket");if(r.socket)$(r.socket);else r.on("socket",$)},"registerTimeout");if(f<2000)return w(0),0;return setTimeout(w.bind(null,lC),lC)},"setConnectionTimeout"),Zv=3000,Pv=Rr((r,{keepAlive:s,keepAliveMsecs:f},w=Zv)=>{if(s!==!0)return-1;const h=Rr(()=>{if(r.socket)r.socket.setKeepAlive(s,f||0);else r.on("socket",(E)=>{E.setKeepAlive(s,f||0)})},"registerListener");if(w===0)return h(),0;return setTimeout(h,w)},"setSocketKeepAlive"),DC=3000,Jv=Rr((r,s,f=0)=>{const w=Rr((h)=>{r.setTimeout(f-h,()=>{r.destroy(),s(Object.assign(new Error(`Connection timed out after ${f} ms`),{name:"TimeoutError"}))})},"registerTimeout");if(0<f&&f<6000)return w(0),0;return setTimeout(w.bind(null,f===0?0:DC),DC)},"setSocketTimeout"),iC=import.meta.require("stream"),kC=1000;Rr(AF,"writeRequestBody");Rr(OC,"writeBody");var Qv=0,dC=class r{constructor(s){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((f,w)=>{if(typeof s==="function")s().then((h)=>{f(this.resolveDefaultConfig(h))}).catch(w);else f(this.resolveDefaultConfig(s))})}static create(s){if(typeof(s==null?void 0:s.handle)==="function")return s;return new r(s)}static checkSocketUsage(s,f,w=console){var h,E,$;const{sockets:I,requests:F,maxSockets:U}=s;if(typeof U!=="number"||U===1/0)return f;const A=15000;if(Date.now()-A<f)return f;if(I&&F)for(let L in I){const S=((h=I[L])==null?void 0:h.length)??0,z=((E=F[L])==null?void 0:E.length)??0;if(S>=U&&z>=2*U)return($=w==null?void 0:w.warn)==null||$.call(w,`@smithy/node-http-handler:WARN - socket usage at capacity=${S} and ${z} additional requests are enqueued.
3
3
  See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
4
- or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return s}resolveDefaultConfig(f){const{requestTimeout:s,connectionTimeout:w,socketTimeout:h,httpAgent:$,httpsAgent:E}=f||{};return{connectionTimeout:w,requestTimeout:s??h,httpAgent:(()=>{if($ instanceof XU.Agent||typeof($==null?void 0:$.destroy)==="function")return $;return new XU.Agent({keepAlive:!0,maxSockets:50,...$})})(),httpsAgent:(()=>{if(E instanceof YU.Agent||typeof(E==null?void 0:E.destroy)==="function")return E;return new YU.Agent({keepAlive:!0,maxSockets:50,...E})})(),logger:console}}destroy(){var f,s,w,h;(s=(f=this.config)==null?void 0:f.httpAgent)==null||s.destroy(),(h=(w=this.config)==null?void 0:w.httpsAgent)==null||h.destroy()}async handle(f,{abortSignal:s}={}){if(!this.config)this.config=await this.configProvider;let w;return new Promise((h,$)=>{let E=void 0;const I=Jr(async(y)=>{await E,clearTimeout(w),h(y)},"resolve"),F=Jr(async(y)=>{await E,clearTimeout(w),$(y)},"reject");if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(s==null?void 0:s.aborted){const y=new Error("Request aborted");y.name="AbortError",F(y);return}const U=f.protocol==="https:",C=U?this.config.httpsAgent:this.config.httpAgent;w=setTimeout(()=>{this.socketWarningTimestamp=r.checkSocketUsage(C,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000));const L=vR.buildQueryString(f.query||{});let z=void 0;if(f.username!=null||f.password!=null){const y=f.username??"",x=f.password??"";z=`${y}:${x}`}let S=f.path;if(L)S+=`?${L}`;if(f.fragment)S+=`#${f.fragment}`;const Z={headers:f.headers,host:f.hostname,method:f.method,path:S,port:f.port,agent:C,auth:z},l=(U?YU.request:XU.request)(Z,(y)=>{const x=new qR.HttpResponse({statusCode:y.statusCode||-1,reason:y.statusMessage,headers:jR(y.headers),body:y});I({response:x})});if(l.on("error",(y)=>{if(eq.includes(y.code))F(Object.assign(y,{name:"TimeoutError"}));else F(y)}),nq(l,F,this.config.connectionTimeout),aq(l,F,this.config.requestTimeout),s){const y=Jr(()=>{l.destroy();const x=new Error("Request aborted");x.name="AbortError",F(x)},"onAbort");if(typeof s.addEventListener==="function"){const x=s;x.addEventListener("abort",y,{once:!0}),l.once("close",()=>x.removeEventListener("abort",y))}else s.onabort=y}const M=Z.agent;if(typeof M==="object"&&"keepAlive"in M)oq(l,{keepAlive:M.keepAlive,keepAliveMsecs:M.keepAliveMsecs});E=KU(l,f,this.config.requestTimeout).catch((y)=>{return clearTimeout(w),$(y)})})}updateHttpClientConfig(f,s){this.config=void 0,this.configProvider=this.configProvider.then((w)=>{return{...w,[f]:s}})}httpHandlerConfigs(){return this.config??{}}};Jr(cR,"NodeHttpHandler");var uq=cR,NR=import.meta.require("http2"),tq=_q(import.meta.require("http2")),bR=class r{constructor(f){this.sessions=[],this.sessions=f??[]}poll(){if(this.sessions.length>0)return this.sessions.shift()}offerLast(f){this.sessions.push(f)}contains(f){return this.sessions.includes(f)}remove(f){this.sessions=this.sessions.filter((s)=>s!==f)}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}destroy(f){for(let s of this.sessions)if(s===f){if(!s.destroyed)s.destroy()}}};Jr(bR,"NodeHttp2ConnectionPool");var rv=bR,gR=class r{constructor(f){if(this.sessionCache=new Map,this.config=f,this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrency must be greater than zero.")}lease(f,s){const w=this.getUrlString(f),h=this.sessionCache.get(w);if(h){const F=h.poll();if(F&&!this.config.disableConcurrency)return F}const $=tq.default.connect(w);if(this.config.maxConcurrency)$.settings({maxConcurrentStreams:this.config.maxConcurrency},(F)=>{if(F)throw new Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+f.destination.toString())});$.unref();const E=Jr(()=>{$.destroy(),this.deleteSession(w,$)},"destroySessionCb");if($.on("goaway",E),$.on("error",E),$.on("frameError",E),$.on("close",()=>this.deleteSession(w,$)),s.requestTimeout)$.setTimeout(s.requestTimeout,E);const I=this.sessionCache.get(w)||new rv;return I.offerLast($),this.sessionCache.set(w,I),$}deleteSession(f,s){const w=this.sessionCache.get(f);if(!w)return;if(!w.contains(s))return;w.remove(s),this.sessionCache.set(f,w)}release(f,s){var w;const h=this.getUrlString(f);(w=this.sessionCache.get(h))==null||w.offerLast(s)}destroy(){for(let[f,s]of this.sessionCache){for(let w of s){if(!w.destroyed)w.destroy();s.remove(w)}this.sessionCache.delete(f)}}setMaxConcurrentStreams(f){if(this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrentStreams must be greater than zero.");this.config.maxConcurrency=f}setDisableConcurrentStreams(f){this.config.disableConcurrency=f}getUrlString(f){return f.destination.toString()}};Jr(gR,"NodeHttp2ConnectionManager");var sv=gR,_R=class r{constructor(f){this.metadata={handlerProtocol:"h2"},this.connectionManager=new sv({}),this.configProvider=new Promise((s,w)=>{if(typeof f==="function")f().then((h)=>{s(h||{})}).catch(w);else s(f||{})})}static create(f){if(typeof(f==null?void 0:f.handle)==="function")return f;return new r(f)}destroy(){this.connectionManager.destroy()}async handle(f,{abortSignal:s}={}){if(!this.config){if(this.config=await this.configProvider,this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams||!1),this.config.maxConcurrentStreams)this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams)}const{requestTimeout:w,disableConcurrentStreams:h}=this.config;return new Promise(($,E)=>{var I;let F=!1,U=void 0;const C=Jr(async(Zr)=>{await U,$(Zr)},"resolve"),L=Jr(async(Zr)=>{await U,E(Zr)},"reject");if(s==null?void 0:s.aborted){F=!0;const Zr=new Error("Request aborted");Zr.name="AbortError",L(Zr);return}const{hostname:z,method:S,port:Z,protocol:k,query:l}=f;let M="";if(f.username!=null||f.password!=null){const Zr=f.username??"",es=f.password??"";M=`${Zr}:${es}@`}const y=`${k}//${M}${z}${Z?`:${Z}`:""}`,x={destination:new URL(y)},e=this.connectionManager.lease(x,{requestTimeout:(I=this.config)==null?void 0:I.sessionTimeout,disableConcurrentStreams:h||!1}),wr=Jr((Zr)=>{if(h)this.destroySession(e);F=!0,L(Zr)},"rejectWithDestroy"),Vr=vR.buildQueryString(l||{});let Cw=f.path;if(Vr)Cw+=`?${Vr}`;if(f.fragment)Cw+=`#${f.fragment}`;const Xs=e.request({...f.headers,[NR.constants.HTTP2_HEADER_PATH]:Cw,[NR.constants.HTTP2_HEADER_METHOD]:S});if(e.ref(),Xs.on("response",(Zr)=>{const es=new qR.HttpResponse({statusCode:Zr[":status"]||-1,headers:jR(Zr),body:Xs});if(F=!0,C({response:es}),h)e.close(),this.connectionManager.deleteSession(y,e)}),w)Xs.setTimeout(w,()=>{Xs.close();const Zr=new Error(`Stream timed out because of no activity for ${w} ms`);Zr.name="TimeoutError",wr(Zr)});if(s){const Zr=Jr(()=>{Xs.close();const es=new Error("Request aborted");es.name="AbortError",wr(es)},"onAbort");if(typeof s.addEventListener==="function"){const es=s;es.addEventListener("abort",Zr,{once:!0}),Xs.once("close",()=>es.removeEventListener("abort",Zr))}else s.onabort=Zr}Xs.on("frameError",(Zr,es,tD)=>{wr(new Error(`Frame type id ${Zr} in stream id ${tD} has failed with code ${es}.`))}),Xs.on("error",wr),Xs.on("aborted",()=>{wr(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${Xs.rstCode}.`))}),Xs.on("close",()=>{if(e.unref(),h)e.destroy();if(!F)wr(new Error("Unexpected error: http2 request did not get a response"))}),U=KU(Xs,f,w)})}updateHttpClientConfig(f,s){this.config=void 0,this.configProvider=this.configProvider.then((w)=>{return{...w,[f]:s}})}httpHandlerConfigs(){return this.config??{}}destroySession(f){if(!f.destroyed)f.destroy()}};Jr(_R,"NodeHttp2Handler");var fv=_R,xR=class r extends dR.Writable{constructor(){super(...arguments);this.bufferedBytes=[]}_write(f,s,w){this.bufferedBytes.push(f),w()}};Jr(xR,"Collector");var wv=xR,hv=Jr((r)=>{if($v(r))return eR(r);return new Promise((f,s)=>{const w=new wv;r.pipe(w),r.on("error",(h)=>{w.end(),s(h)}),w.on("error",s),w.on("finish",function(){const h=new Uint8Array(Buffer.concat(this.bufferedBytes));f(h)})})},"streamCollector"),$v=Jr((r)=>typeof ReadableStream==="function"&&r instanceof ReadableStream,"isReadableStreamInstance");Jr(eR,"collectReadableStream")});var hz=v((x0r,wz)=>{function uR(r=0){return new Promise((f,s)=>{if(r)setTimeout(()=>{const w=new Error(`Request did not complete within ${r} ms`);w.name="TimeoutError",s(w)},r)})}async function rz(r){const f=await fz(r),s=Av.fromBase64(f);return new Uint8Array(s)}async function sz(r){const f=[],s=r.getReader();let w=!1,h=0;while(!w){const{done:I,value:F}=await s.read();if(F)f.push(F),h+=F.length;w=I}const $=new Uint8Array(h);let E=0;for(let I of f)$.set(I,E),E+=I.length;return $}function fz(r){return new Promise((f,s)=>{const w=new FileReader;w.onloadend=()=>{if(w.readyState!==2)return s(new Error("Reader aborted too early"));const h=w.result??"",$=h.indexOf(","),E=$>-1?$+1:h.length;f(h.substring(E))},w.onabort=()=>s(new Error("Read aborted")),w.onerror=()=>s(w.error),w.readAsDataURL(r)})}var{defineProperty:bE,getOwnPropertyDescriptor:Ev,getOwnPropertyNames:Iv}=Object,Fv=Object.prototype.hasOwnProperty,T0=(r,f)=>bE(r,"name",{value:f,configurable:!0}),Uv=(r,f)=>{for(var s in f)bE(r,s,{get:f[s],enumerable:!0})},Tv=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of Iv(f))if(!Fv.call(r,h)&&h!==s)bE(r,h,{get:()=>f[h],enumerable:!(w=Ev(f,h))||w.enumerable})}return r},Gv=(r)=>Tv(bE({},"__esModule",{value:!0}),r),pR={};Uv(pR,{FetchHttpHandler:()=>Lv,keepAliveSupport:()=>cE,streamCollector:()=>Wv});wz.exports=Gv(pR);var aR=F0(),Cv=PU();T0(uR,"requestTimeout");var cE={supported:void 0},tR=class r{static create(f){if(typeof(f==null?void 0:f.handle)==="function")return f;return new r(f)}constructor(f){if(typeof f==="function")this.configProvider=f().then((s)=>s||{});else this.config=f??{},this.configProvider=Promise.resolve(this.config);if(cE.supported===void 0)cE.supported=Boolean(typeof Request!=="undefined"&&"keepalive"in new Request("https://[::1]"))}destroy(){}async handle(f,{abortSignal:s}={}){if(!this.config)this.config=await this.configProvider;const w=this.config.requestTimeout,h=this.config.keepAlive===!0,$=this.config.credentials;if(s==null?void 0:s.aborted){const M=new Error("Request aborted");return M.name="AbortError",Promise.reject(M)}let E=f.path;const I=Cv.buildQueryString(f.query||{});if(I)E+=`?${I}`;if(f.fragment)E+=`#${f.fragment}`;let F="";if(f.username!=null||f.password!=null){const M=f.username??"",y=f.password??"";F=`${M}:${y}@`}const{port:U,method:C}=f,L=`${f.protocol}//${F}${f.hostname}${U?`:${U}`:""}${E}`,z=C==="GET"||C==="HEAD"?void 0:f.body,S={body:z,headers:new Headers(f.headers),method:C,credentials:$};if(z)S.duplex="half";if(typeof AbortController!=="undefined")S.signal=s;if(cE.supported)S.keepalive=h;let Z=T0(()=>{},"removeSignalEventListener");const k=new Request(L,S),l=[fetch(k).then((M)=>{const y=M.headers,x={};for(let wr of y.entries())x[wr[0]]=wr[1];if(M.body==null)return M.blob().then((wr)=>({response:new aR.HttpResponse({headers:x,reason:M.statusText,statusCode:M.status,body:wr})}));return{response:new aR.HttpResponse({headers:x,reason:M.statusText,statusCode:M.status,body:M.body})}}),uR(w)];if(s)l.push(new Promise((M,y)=>{const x=T0(()=>{const e=new Error("Request aborted");e.name="AbortError",y(e)},"onAbort");if(typeof s.addEventListener==="function"){const e=s;e.addEventListener("abort",x,{once:!0}),Z=T0(()=>e.removeEventListener("abort",x),"removeSignalEventListener")}else s.onabort=x}));return Promise.race(l).finally(Z)}updateHttpClientConfig(f,s){this.config=void 0,this.configProvider=this.configProvider.then((w)=>{return w[f]=s,w})}httpHandlerConfigs(){return this.config??{}}};T0(tR,"FetchHttpHandler");var Lv=tR,Av=jE(),Wv=T0((r)=>{if(typeof Blob==="function"&&r instanceof Blob)return rz(r);return sz(r)},"streamCollector");T0(rz,"collectBlob");T0(sz,"collectStream");T0(fz,"readToBase64")});var _E=v((e0r,Tz)=>{function Fz(r){if(r.length%2!==0)throw new Error("Hex encoded strings must have an even number length");const f=new Uint8Array(r.length/2);for(let s=0;s<r.length;s+=2){const w=r.slice(s,s+2).toLowerCase();if(w in ZU)f[s/2]=ZU[w];else throw new Error(`Cannot decode unrecognized sequence ${w} as hexadecimal`)}return f}function Uz(r){let f="";for(let s=0;s<r.byteLength;s++)f+=Iz[r[s]];return f}var{defineProperty:gE,getOwnPropertyDescriptor:Rv,getOwnPropertyNames:zv}=Object,Sv=Object.prototype.hasOwnProperty,$z=(r,f)=>gE(r,"name",{value:f,configurable:!0}),Pv=(r,f)=>{for(var s in f)gE(r,s,{get:f[s],enumerable:!0})},Xv=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of zv(f))if(!Sv.call(r,h)&&h!==s)gE(r,h,{get:()=>f[h],enumerable:!(w=Rv(f,h))||w.enumerable})}return r},Yv=(r)=>Xv(gE({},"__esModule",{value:!0}),r),Ez={};Pv(Ez,{fromHex:()=>Fz,toHex:()=>Uz});Tz.exports=Yv(Ez);var Iz={},ZU={};for(let r=0;r<256;r++){let f=r.toString(16).toLowerCase();if(f.length===1)f=`0${f}`;Iz[r]=f,ZU[f]=r}$z(Fz,"fromHex");$z(Uz,"toHex")});var P1=v((Gz)=>{Object.defineProperty(Gz,"__esModule",{value:!0});Gz.isReadableStream=void 0;var Kv=(r)=>{var f;return typeof ReadableStream==="function"&&(((f=r===null||r===void 0?void 0:r.constructor)===null||f===void 0?void 0:f.name)===ReadableStream.name||r instanceof ReadableStream)};Gz.isReadableStream=Kv});var Sz=v((Rz)=>{Object.defineProperty(Rz,"__esModule",{value:!0});Rz.sdkStreamMixin=void 0;var Zv=hz(),Jv=jE(),Qv=_E(),Mv=m0(),Lz=P1(),Az="The stream has already been transformed.",Bv=(r)=>{var f,s;if(!Wz(r)&&!Lz.isReadableStream(r)){const E=((s=(f=r===null||r===void 0?void 0:r.__proto__)===null||f===void 0?void 0:f.constructor)===null||s===void 0?void 0:s.name)||r;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${E}`)}let w=!1;const h=async()=>{if(w)throw new Error(Az);return w=!0,await Zv.streamCollector(r)},$=(E)=>{if(typeof E.stream!=="function")throw new Error("Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\nIf you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body");return E.stream()};return Object.assign(r,{transformToByteArray:h,transformToString:async(E)=>{const I=await h();if(E==="base64")return Jv.toBase64(I);else if(E==="hex")return Qv.toHex(I);else if(E===void 0||E==="utf8"||E==="utf-8")return Mv.toUtf8(I);else if(typeof TextDecoder==="function")return new TextDecoder(E).decode(I);else throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(w)throw new Error(Az);if(w=!0,Wz(r))return $(r);else if(Lz.isReadableStream(r))return r;else throw new Error(`Cannot transform payload to web stream, got ${r}`)}})};Rz.sdkStreamMixin=Bv;var Wz=(r)=>typeof Blob==="function"&&r instanceof Blob});var Kz=v((Xz)=>{Object.defineProperty(Xz,"__esModule",{value:!0});Xz.sdkStreamMixin=void 0;var lv=oR(),Hv=z1(),JU=import.meta.require("stream"),Vv=import.meta.require("util"),Dv=Sz(),Pz="The stream has already been transformed.",kv=(r)=>{var f,s;if(!(r instanceof JU.Readable))try{return Dv.sdkStreamMixin(r)}catch($){const E=((s=(f=r===null||r===void 0?void 0:r.__proto__)===null||f===void 0?void 0:f.constructor)===null||s===void 0?void 0:s.name)||r;throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${E}`)}let w=!1;const h=async()=>{if(w)throw new Error(Pz);return w=!0,await lv.streamCollector(r)};return Object.assign(r,{transformToByteArray:h,transformToString:async($)=>{const E=await h();if($===void 0||Buffer.isEncoding($))return Hv.fromArrayBuffer(E.buffer,E.byteOffset,E.byteLength).toString($);else return new Vv.TextDecoder($).decode(E)},transformToWebStream:()=>{if(w)throw new Error(Pz);if(r.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof JU.Readable.toWeb!=="function")throw new Error("Readable.toWeb() is not supported. Please make sure you are using Node.js >= 17.0.0, or polyfill is available.");return w=!0,JU.Readable.toWeb(r)}})};Xz.sdkStreamMixin=kv});var Qz=v((Zz)=>{async function yv(r){if(typeof r.stream==="function")r=r.stream();return r.tee()}Object.defineProperty(Zz,"__esModule",{value:!0});Zz.splitStream=void 0;Zz.splitStream=yv});var Hz=v((Bz)=>{async function iv(r){if(mv.isReadableStream(r))return Nv.splitStream(r);const f=new Mz.PassThrough,s=new Mz.PassThrough;return r.pipe(f),r.pipe(s),[f,s]}Object.defineProperty(Bz,"__esModule",{value:!0});Bz.splitStream=void 0;var Mz=import.meta.require("stream"),Nv=Qz(),mv=P1();Bz.splitStream=iv});var kz=v((Vz)=>{async function qv(r,f){var s;let w=0;const h=[],$=r.getReader();let E=!1;while(!E){const{done:U,value:C}=await $.read();if(C)h.push(C),w+=(s=C===null||C===void 0?void 0:C.byteLength)!==null&&s!==void 0?s:0;if(w>=f)break;E=U}$.releaseLock();const I=new Uint8Array(Math.min(f,w));let F=0;for(let U of h){if(U.byteLength>I.byteLength-F){I.set(U.subarray(0,I.byteLength-F),F);break}else I.set(U,F);F+=U.length}return I}Object.defineProperty(Vz,"__esModule",{value:!0});Vz.headStream=void 0;Vz.headStream=qv});var iz=v((Nz)=>{Object.defineProperty(Nz,"__esModule",{value:!0});Nz.headStream=void 0;var vv=import.meta.require("stream"),jv=kz(),dv=P1(),Ov=(r,f)=>{if(dv.isReadableStream(r))return jv.headStream(r,f);return new Promise((s,w)=>{const h=new yz;h.limit=f,r.pipe(h),r.on("error",($)=>{h.end(),w($)}),h.on("error",w),h.on("finish",function(){const $=new Uint8Array(Buffer.concat(this.buffers));s($)})})};Nz.headStream=Ov;class yz extends vv.Writable{constructor(){super(...arguments);this.buffers=[],this.limit=1/0,this.bytesBuffered=0}_write(r,f,s){var w;if(this.buffers.push(r),this.bytesBuffered+=(w=r.byteLength)!==null&&w!==void 0?w:0,this.bytesBuffered>=this.limit){const h=this.bytesBuffered-this.limit,$=this.buffers[this.buffers.length-1];this.buffers[this.buffers.length-1]=$.subarray(0,$.byteLength-h),this.emit("finish")}s()}}});var cz=v((swr,Sw)=>{function jz(r,f="utf-8"){if(f==="base64")return qz.toBase64(r);return vz.toUtf8(r)}function dz(r,f){if(f==="base64")return MU.mutate(qz.fromBase64(r));return MU.mutate(vz.fromUtf8(r))}var{defineProperty:xE,getOwnPropertyDescriptor:cv,getOwnPropertyNames:bv}=Object,gv=Object.prototype.hasOwnProperty,BU=(r,f)=>xE(r,"name",{value:f,configurable:!0}),_v=(r,f)=>{for(var s in f)xE(r,s,{get:f[s],enumerable:!0})},QU=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of bv(f))if(!gv.call(r,h)&&h!==s)xE(r,h,{get:()=>f[h],enumerable:!(w=cv(f,h))||w.enumerable})}return r},X1=(r,f,s)=>(QU(r,f,"default"),s&&QU(s,f,"default")),xv=(r)=>QU(xE({},"__esModule",{value:!0}),r),zw={};_v(zw,{Uint8ArrayBlobAdapter:()=>MU});Sw.exports=xv(zw);var qz=jE(),vz=m0();BU(jz,"transformToString");BU(dz,"transformFromString");var Oz=class r extends Uint8Array{static fromString(f,s="utf-8"){switch(typeof f){case"string":return dz(f,s);default:throw new Error(`Unsupported conversion from ${typeof f} to Uint8ArrayBlobAdapter.`)}}static mutate(f){return Object.setPrototypeOf(f,r.prototype),f}transformToString(f="utf-8"){return jz(this,f)}};BU(Oz,"Uint8ArrayBlobAdapter");var MU=Oz;X1(zw,MR(),Sw.exports);X1(zw,Kz(),Sw.exports);X1(zw,Hz(),Sw.exports);X1(zw,iz(),Sw.exports);X1(zw,P1(),Sw.exports)});var hh=v((fwr,GS)=>{function fS(r){const f=r.getUTCFullYear(),s=r.getUTCMonth(),w=r.getUTCDay(),h=r.getUTCDate(),$=r.getUTCHours(),E=r.getUTCMinutes(),I=r.getUTCSeconds(),F=h<10?`0${h}`:`${h}`,U=$<10?`0${$}`:`${$}`,C=E<10?`0${E}`:`${E}`,L=I<10?`0${I}`:`${I}`;return`${Xj[w]}, ${F} ${vU[s]} ${f} ${U}:${C}:${L} GMT`}function oE(r){return encodeURIComponent(r).replace(/[!'()*]/g,function(f){return"%"+f.charCodeAt(0).toString(16).toUpperCase()})}function jU(r,f,s){let w,h,$;if(typeof f==="undefined"&&typeof s==="undefined")w={},$=r;else if(w=r,typeof f==="function")return h=f,$=s,tj(w,h,$);else $=f;for(let E of Object.keys($)){if(!Array.isArray($[E])){w[E]=$[E];continue}US(w,null,$,E)}return w}function TS(r,f,s){if(s<=0||!Number.isInteger(s))throw new Error("Invalid number of delimiters ("+s+") for splitEvery.");const w=r.split(f);if(s===1)return w;const h=[];let $="";for(let E=0;E<w.length;E++){if($==="")$=w[E];else $+=f+w[E];if((E+1)%s===0)h.push($),$=""}if($!=="")h.push($);return h}var{defineProperty:aE,getOwnPropertyDescriptor:ev,getOwnPropertyNames:nv}=Object,ov=Object.prototype.hasOwnProperty,q=(r,f)=>aE(r,"name",{value:f,configurable:!0}),av=(r,f)=>{for(var s in f)aE(r,s,{get:f[s],enumerable:!0})},pv=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of nv(f))if(!ov.call(r,h)&&h!==s)aE(r,h,{get:()=>f[h],enumerable:!(w=ev(f,h))||w.enumerable})}return r},uv=(r)=>pv(aE({},"__esModule",{value:!0}),r),gz={};av(gz,{Client:()=>rj,Command:()=>oz,LazyJsonString:()=>aj,NoOpLogger:()=>tv,SENSITIVE_STRING:()=>wj,ServiceException:()=>vj,StringWrapper:()=>Q1,_json:()=>NU,collectBody:()=>sj,convertMap:()=>pj,createAggregatedClient:()=>hj,dateToUtcString:()=>fS,decorateServiceException:()=>hS,emitWarningIfUnsupportedVersion:()=>cj,expectBoolean:()=>Ej,expectByte:()=>yU,expectFloat32:()=>eE,expectInt:()=>Fj,expectInt32:()=>DU,expectLong:()=>Z1,expectNonNull:()=>Tj,expectNumber:()=>K1,expectObject:()=>pz,expectShort:()=>kU,expectString:()=>Gj,expectUnion:()=>Cj,extendedEncodeURIComponent:()=>oE,getArrayIfSingleItem:()=>oj,getDefaultClientConfiguration:()=>ej,getDefaultExtensionConfiguration:()=>ES,getValueFromTextNode:()=>IS,handleFloat:()=>Wj,limitedParseDouble:()=>qU,limitedParseFloat:()=>Rj,limitedParseFloat32:()=>zj,loadConfigsForDefaultMode:()=>Oj,logger:()=>J1,map:()=>jU,parseBoolean:()=>$j,parseEpochTimestamp:()=>Hj,parseRfc3339DateTime:()=>Kj,parseRfc3339DateTimeWithOffset:()=>Jj,parseRfc7231DateTime:()=>lj,resolveDefaultRuntimeConfig:()=>nj,resolvedPath:()=>fd,serializeDateTime:()=>hd,serializeFloat:()=>wd,splitEvery:()=>TS,strictParseByte:()=>sS,strictParseDouble:()=>iU,strictParseFloat:()=>Lj,strictParseFloat32:()=>uz,strictParseInt:()=>Sj,strictParseInt32:()=>Pj,strictParseLong:()=>rS,strictParseShort:()=>sh,take:()=>uj,throwDefaultError:()=>$S,withBaseException:()=>jj});GS.exports=uv(gz);var _z=class r{trace(){}debug(){}info(){}warn(){}error(){}};q(_z,"NoOpLogger");var tv=_z,xz=ER(),ez=class r{constructor(f){this.middlewareStack=xz.constructStack(),this.config=f}send(f,s,w){const h=typeof s!=="function"?s:void 0,$=typeof s==="function"?s:w,E=f.resolveMiddleware(this.middlewareStack,this.config,h);if($)E(f).then((I)=>$(null,I.output),(I)=>$(I)).catch(()=>{});else return E(f).then((I)=>I.output)}destroy(){if(this.config.requestHandler.destroy)this.config.requestHandler.destroy()}};q(ez,"Client");var rj=ez,lU=cz(),sj=q(async(r=new Uint8Array,f)=>{if(r instanceof Uint8Array)return lU.Uint8ArrayBlobAdapter.mutate(r);if(!r)return lU.Uint8ArrayBlobAdapter.mutate(new Uint8Array);const s=f.streamCollector(r);return lU.Uint8ArrayBlobAdapter.mutate(await s)},"collectBody"),VU=Es(),nz=class r{constructor(){this.middlewareStack=xz.constructStack()}static classBuilder(){return new fj}resolveMiddlewareWithContext(f,s,w,{middlewareFn:h,clientName:$,commandName:E,inputFilterSensitiveLog:I,outputFilterSensitiveLog:F,smithyContext:U,additionalContext:C,CommandCtor:L}){for(let l of h.bind(this)(L,f,s,w))this.middlewareStack.use(l);const z=f.concat(this.middlewareStack),{logger:S}=s,Z={logger:S,clientName:$,commandName:E,inputFilterSensitiveLog:I,outputFilterSensitiveLog:F,[VU.SMITHY_CONTEXT_KEY]:{commandInstance:this,...U},...C},{requestHandler:k}=s;return z.resolve((l)=>k.handle(l.request,w||{}),Z)}};q(nz,"Command");var oz=nz,az=class r{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=(f)=>f,this._outputFilterSensitiveLog=(f)=>f,this._serializer=null,this._deserializer=null}init(f){this._init=f}ep(f){return this._ep=f,this}m(f){return this._middlewareFn=f,this}s(f,s,w={}){return this._smithyContext={service:f,operation:s,...w},this}c(f={}){return this._additionalContext=f,this}n(f,s){return this._clientName=f,this._commandName=s,this}f(f=(w)=>w,s=(w)=>w){return this._inputFilterSensitiveLog=f,this._outputFilterSensitiveLog=s,this}ser(f){return this._serializer=f,this}de(f){return this._deserializer=f,this}build(){var f;const s=this;let w;return w=(f=class extends oz{constructor(...[h]){super();this.serialize=s._serializer,this.deserialize=s._deserializer,this.input=h??{},s._init(this)}static getEndpointParameterInstructions(){return s._ep}resolveMiddleware(h,$,E){return this.resolveMiddlewareWithContext(h,$,E,{CommandCtor:w,middlewareFn:s._middlewareFn,clientName:s._clientName,commandName:s._commandName,inputFilterSensitiveLog:s._inputFilterSensitiveLog,outputFilterSensitiveLog:s._outputFilterSensitiveLog,smithyContext:s._smithyContext,additionalContext:s._additionalContext})}},q(f,"CommandRef"),f)}};q(az,"ClassBuilder");var fj=az,wj="***SensitiveInformation***",hj=q((r,f)=>{for(let s of Object.keys(r)){const w=r[s],h=q(async function(E,I,F){const U=new w(E);if(typeof I==="function")this.send(U,I);else if(typeof F==="function"){if(typeof I!=="object")throw new Error(`Expected http options but got ${typeof I}`);this.send(U,I||{},F)}else return this.send(U,I)},"methodImpl"),$=(s[0].toLowerCase()+s.slice(1)).replace(/Command$/,"");f.prototype[$]=h}},"createAggregatedClient"),$j=q((r)=>{switch(r){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${r}"`)}},"parseBoolean"),Ej=q((r)=>{if(r===null||r===void 0)return;if(typeof r==="number"){if(r===0||r===1)J1.warn(nE(`Expected boolean, got ${typeof r}: ${r}`));if(r===0)return!1;if(r===1)return!0}if(typeof r==="string"){const f=r.toLowerCase();if(f==="false"||f==="true")J1.warn(nE(`Expected boolean, got ${typeof r}: ${r}`));if(f==="false")return!1;if(f==="true")return!0}if(typeof r==="boolean")return r;throw new TypeError(`Expected boolean, got ${typeof r}: ${r}`)},"expectBoolean"),K1=q((r)=>{if(r===null||r===void 0)return;if(typeof r==="string"){const f=parseFloat(r);if(!Number.isNaN(f)){if(String(f)!==String(r))J1.warn(nE(`Expected number but observed string: ${r}`));return f}}if(typeof r==="number")return r;throw new TypeError(`Expected number, got ${typeof r}: ${r}`)},"expectNumber"),Ij=Math.ceil(340282346638528860000000000000000000000),eE=q((r)=>{const f=K1(r);if(f!==void 0&&!Number.isNaN(f)&&f!==1/0&&f!==-1/0){if(Math.abs(f)>Ij)throw new TypeError(`Expected 32-bit float, got ${r}`)}return f},"expectFloat32"),Z1=q((r)=>{if(r===null||r===void 0)return;if(Number.isInteger(r)&&!Number.isNaN(r))return r;throw new TypeError(`Expected integer, got ${typeof r}: ${r}`)},"expectLong"),Fj=Z1,DU=q((r)=>mU(r,32),"expectInt32"),kU=q((r)=>mU(r,16),"expectShort"),yU=q((r)=>mU(r,8),"expectByte"),mU=q((r,f)=>{const s=Z1(r);if(s!==void 0&&Uj(s,f)!==s)throw new TypeError(`Expected ${f}-bit integer, got ${r}`);return s},"expectSizedInt"),Uj=q((r,f)=>{switch(f){case 32:return Int32Array.of(r)[0];case 16:return Int16Array.of(r)[0];case 8:return Int8Array.of(r)[0]}},"castInt"),Tj=q((r,f)=>{if(r===null||r===void 0){if(f)throw new TypeError(`Expected a non-null value for ${f}`);throw new TypeError("Expected a non-null value")}return r},"expectNonNull"),pz=q((r)=>{if(r===null||r===void 0)return;if(typeof r==="object"&&!Array.isArray(r))return r;const f=Array.isArray(r)?"array":typeof r;throw new TypeError(`Expected object, got ${f}: ${r}`)},"expectObject"),Gj=q((r)=>{if(r===null||r===void 0)return;if(typeof r==="string")return r;if(["boolean","number","bigint"].includes(typeof r))return J1.warn(nE(`Expected string, got ${typeof r}: ${r}`)),String(r);throw new TypeError(`Expected string, got ${typeof r}: ${r}`)},"expectString"),Cj=q((r)=>{if(r===null||r===void 0)return;const f=pz(r),s=Object.entries(f).filter(([,w])=>w!=null).map(([w])=>w);if(s.length===0)throw new TypeError("Unions must have exactly one non-null member. None were found.");if(s.length>1)throw new TypeError(`Unions must have exactly one non-null member. Keys ${s} were not null.`);return f},"expectUnion"),iU=q((r)=>{if(typeof r=="string")return K1(wh(r));return K1(r)},"strictParseDouble"),Lj=iU,uz=q((r)=>{if(typeof r=="string")return eE(wh(r));return eE(r)},"strictParseFloat32"),Aj=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,wh=q((r)=>{const f=r.match(Aj);if(f===null||f[0].length!==r.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(r)},"parseNumber"),qU=q((r)=>{if(typeof r=="string")return tz(r);return K1(r)},"limitedParseDouble"),Wj=qU,Rj=qU,zj=q((r)=>{if(typeof r=="string")return tz(r);return eE(r)},"limitedParseFloat32"),tz=q((r)=>{switch(r){case"NaN":return NaN;case"Infinity":return 1/0;case"-Infinity":return-1/0;default:throw new Error(`Unable to parse float value: ${r}`)}},"parseFloatString"),rS=q((r)=>{if(typeof r==="string")return Z1(wh(r));return Z1(r)},"strictParseLong"),Sj=rS,Pj=q((r)=>{if(typeof r==="string")return DU(wh(r));return DU(r)},"strictParseInt32"),sh=q((r)=>{if(typeof r==="string")return kU(wh(r));return kU(r)},"strictParseShort"),sS=q((r)=>{if(typeof r==="string")return yU(wh(r));return yU(r)},"strictParseByte"),nE=q((r)=>{return String(new TypeError(r).stack||r).split("\n").slice(0,5).filter((f)=>!f.includes("stackTraceWarning")).join("\n")},"stackTraceWarning"),J1={warn:console.warn},Xj=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],vU=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];q(fS,"dateToUtcString");var Yj=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),Kj=q((r)=>{if(r===null||r===void 0)return;if(typeof r!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const f=Yj.exec(r);if(!f)throw new TypeError("Invalid RFC-3339 date-time value");const[s,w,h,$,E,I,F,U]=f,C=sh(fh(w)),L=lf(h,"month",1,12),z=lf($,"day",1,31);return Y1(C,L,z,{hours:E,minutes:I,seconds:F,fractionalMilliseconds:U})},"parseRfc3339DateTime"),Zj=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),Jj=q((r)=>{if(r===null||r===void 0)return;if(typeof r!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const f=Zj.exec(r);if(!f)throw new TypeError("Invalid RFC-3339 date-time value");const[s,w,h,$,E,I,F,U,C]=f,L=sh(fh(w)),z=lf(h,"month",1,12),S=lf($,"day",1,31),Z=Y1(L,z,S,{hours:E,minutes:I,seconds:F,fractionalMilliseconds:U});if(C.toUpperCase()!="Z")Z.setTime(Z.getTime()-qj(C));return Z},"parseRfc3339DateTimeWithOffset"),Qj=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),Mj=new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),Bj=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/),lj=q((r)=>{if(r===null||r===void 0)return;if(typeof r!=="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let f=Qj.exec(r);if(f){const[s,w,h,$,E,I,F,U]=f;return Y1(sh(fh($)),HU(h),lf(w,"day",1,31),{hours:E,minutes:I,seconds:F,fractionalMilliseconds:U})}if(f=Mj.exec(r),f){const[s,w,h,$,E,I,F,U]=f;return kj(Y1(Vj($),HU(h),lf(w,"day",1,31),{hours:E,minutes:I,seconds:F,fractionalMilliseconds:U}))}if(f=Bj.exec(r),f){const[s,w,h,$,E,I,F,U]=f;return Y1(sh(fh(U)),HU(w),lf(h.trimLeft(),"day",1,31),{hours:$,minutes:E,seconds:I,fractionalMilliseconds:F})}throw new TypeError("Invalid RFC-7231 date-time value")},"parseRfc7231DateTime"),Hj=q((r)=>{if(r===null||r===void 0)return;let f;if(typeof r==="number")f=r;else if(typeof r==="string")f=iU(r);else if(typeof r==="object"&&r.tag===1)f=r.value;else throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(f)||f===1/0||f===-1/0)throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(f*1000))},"parseEpochTimestamp"),Y1=q((r,f,s,w)=>{const h=f-1;return Nj(r,h,s),new Date(Date.UTC(r,h,s,lf(w.hours,"hour",0,23),lf(w.minutes,"minute",0,59),lf(w.seconds,"seconds",0,60),ij(w.fractionalMilliseconds)))},"buildDate"),Vj=q((r)=>{const f=new Date().getUTCFullYear(),s=Math.floor(f/100)*100+sh(fh(r));if(s<f)return s+100;return s},"parseTwoDigitYear"),Dj=1576800000000,kj=q((r)=>{if(r.getTime()-new Date().getTime()>Dj)return new Date(Date.UTC(r.getUTCFullYear()-100,r.getUTCMonth(),r.getUTCDate(),r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds(),r.getUTCMilliseconds()));return r},"adjustRfc850Year"),HU=q((r)=>{const f=vU.indexOf(r);if(f<0)throw new TypeError(`Invalid month: ${r}`);return f+1},"parseMonthByShortName"),yj=[31,28,31,30,31,30,31,31,30,31,30,31],Nj=q((r,f,s)=>{let w=yj[f];if(f===1&&mj(r))w=29;if(s>w)throw new TypeError(`Invalid day for ${vU[f]} in ${r}: ${s}`)},"validateDayOfMonth"),mj=q((r)=>{return r%4===0&&(r%100!==0||r%400===0)},"isLeapYear"),lf=q((r,f,s,w)=>{const h=sS(fh(r));if(h<s||h>w)throw new TypeError(`${f} must be between ${s} and ${w}, inclusive`);return h},"parseDateValue"),ij=q((r)=>{if(r===null||r===void 0)return 0;return uz("0."+r)*1000},"parseMilliseconds"),qj=q((r)=>{const f=r[0];let s=1;if(f=="+")s=1;else if(f=="-")s=-1;else throw new TypeError(`Offset direction, ${f}, must be "+" or "-"`);const w=Number(r.substring(1,3)),h=Number(r.substring(4,6));return s*(w*60+h)*60*1000},"parseOffsetToMilliseconds"),fh=q((r)=>{let f=0;while(f<r.length-1&&r.charAt(f)==="0")f++;if(f===0)return r;return r.slice(f)},"stripLeadingZeroes"),wS=class r extends Error{constructor(f){super(f.message);Object.setPrototypeOf(this,r.prototype),this.name=f.name,this.$fault=f.$fault,this.$metadata=f.$metadata}};q(wS,"ServiceException");var vj=wS,hS=q((r,f={})=>{Object.entries(f).filter(([,w])=>w!==void 0).forEach(([w,h])=>{if(r[w]==null||r[w]==="")r[w]=h});const s=r.message||r.Message||"UnknownError";return r.message=s,delete r.Message,r},"decorateServiceException"),$S=q(({output:r,parsedBody:f,exceptionCtor:s,errorCode:w})=>{const h=dj(r),$=h.httpStatusCode?h.httpStatusCode+"":void 0,E=new s({name:(f==null?void 0:f.code)||(f==null?void 0:f.Code)||w||$||"UnknownError",$fault:"client",$metadata:h});throw hS(E,f)},"throwDefaultError"),jj=q((r)=>{return({output:f,parsedBody:s,errorCode:w})=>{$S({output:f,parsedBody:s,exceptionCtor:r,errorCode:w})}},"withBaseException"),dj=q((r)=>({httpStatusCode:r.statusCode,requestId:r.headers["x-amzn-requestid"]??r.headers["x-amzn-request-id"]??r.headers["x-amz-request-id"],extendedRequestId:r.headers["x-amz-id-2"],cfId:r.headers["x-amz-cf-id"]}),"deserializeMetadata"),Oj=q((r)=>{switch(r){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:30000};default:return{}}},"loadConfigsForDefaultMode"),bz=!1,cj=q((r)=>{if(r&&!bz&&parseInt(r.substring(1,r.indexOf(".")))<16)bz=!0},"emitWarningIfUnsupportedVersion"),bj=q((r)=>{const f=[];for(let s in VU.AlgorithmId){const w=VU.AlgorithmId[s];if(r[w]===void 0)continue;f.push({algorithmId:()=>w,checksumConstructor:()=>r[w]})}return{_checksumAlgorithms:f,addChecksumAlgorithm(s){this._checksumAlgorithms.push(s)},checksumAlgorithms(){return this._checksumAlgorithms}}},"getChecksumConfiguration"),gj=q((r)=>{const f={};return r.checksumAlgorithms().forEach((s)=>{f[s.algorithmId()]=s.checksumConstructor()}),f},"resolveChecksumRuntimeConfig"),_j=q((r)=>{let f=r.retryStrategy;return{setRetryStrategy(s){f=s},retryStrategy(){return f}}},"getRetryConfiguration"),xj=q((r)=>{const f={};return f.retryStrategy=r.retryStrategy(),f},"resolveRetryRuntimeConfig"),ES=q((r)=>{return{...bj(r),..._j(r)}},"getDefaultExtensionConfiguration"),ej=ES,nj=q((r)=>{return{...gj(r),...xj(r)}},"resolveDefaultRuntimeConfig");q(oE,"extendedEncodeURIComponent");var oj=q((r)=>Array.isArray(r)?r:[r],"getArrayIfSingleItem"),IS=q((r)=>{for(let s in r)if(r.hasOwnProperty(s)&&r[s]["#text"]!==void 0)r[s]=r[s]["#text"];else if(typeof r[s]==="object"&&r[s]!==null)r[s]=IS(r[s]);return r},"getValueFromTextNode"),Q1=q(function(){const r=Object.getPrototypeOf(this).constructor,s=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(s,r.prototype),s},"StringWrapper");Q1.prototype=Object.create(String.prototype,{constructor:{value:Q1,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(Q1,String);var FS=class r extends Q1{deserializeJSON(){return JSON.parse(super.toString())}toJSON(){return super.toString()}static fromObject(f){if(f instanceof r)return f;else if(f instanceof String||typeof f==="string")return new r(f);return new r(JSON.stringify(f))}};q(FS,"LazyJsonString");var aj=FS;q(jU,"map");var pj=q((r)=>{const f={};for(let[s,w]of Object.entries(r||{}))f[s]=[,w];return f},"convertMap"),uj=q((r,f)=>{const s={};for(let w in f)US(s,r,f,w);return s},"take"),tj=q((r,f,s)=>{return jU(r,Object.entries(s).reduce((w,[h,$])=>{if(Array.isArray($))w[h]=$;else if(typeof $==="function")w[h]=[f,$()];else w[h]=[f,$];return w},{}))},"mapWithFilter"),US=q((r,f,s,w)=>{if(f!==null){let E=s[w];if(typeof E==="function")E=[,E];const[I=rd,F=sd,U=w]=E;if(typeof I==="function"&&I(f[U])||typeof I!=="function"&&!!I)r[w]=F(f[U]);return}let[h,$]=s[w];if(typeof $==="function"){let E;const I=h===void 0&&(E=$())!=null,F=typeof h==="function"&&!!h(void 0)||typeof h!=="function"&&!!h;if(I)r[w]=E;else if(F)r[w]=$()}else{const E=h===void 0&&$!=null,I=typeof h==="function"&&!!h($)||typeof h!=="function"&&!!h;if(E||I)r[w]=$}},"applyInstruction"),rd=q((r)=>r!=null,"nonNullish"),sd=q((r)=>r,"pass"),fd=q((r,f,s,w,h,$)=>{if(f!=null&&f[s]!==void 0){const E=w();if(E.length<=0)throw new Error("Empty value provided for input HTTP label: "+s+".");r=r.replace(h,$?E.split("/").map((I)=>oE(I)).join("/"):oE(E))}else throw new Error("No value provided for input HTTP label: "+s+".");return r},"resolvedPath"),wd=q((r)=>{if(r!==r)return"NaN";switch(r){case 1/0:return"Infinity";case-1/0:return"-Infinity";default:return r}},"serializeFloat"),hd=q((r)=>r.toISOString().replace(".000Z","Z"),"serializeDateTime"),NU=q((r)=>{if(r==null)return{};if(Array.isArray(r))return r.filter((f)=>f!=null).map(NU);if(typeof r==="object"){const f={};for(let s of Object.keys(r)){if(r[s]==null)continue;f[s]=NU(r[s])}return f}return r},"_json");q(TS,"splitEvery")});var AS=v((CS)=>{Object.defineProperty(CS,"__esModule",{value:!0});CS.isStreamingPayload=void 0;var $d=import.meta.require("stream"),Ed=(r)=>(r===null||r===void 0?void 0:r.body)instanceof $d.Readable||typeof ReadableStream!=="undefined"&&(r===null||r===void 0?void 0:r.body)instanceof ReadableStream;CS.isStreamingPayload=Ed});var kS=v(($wr,DS)=>{var{defineProperty:pE,getOwnPropertyDescriptor:Id,getOwnPropertyNames:Fd}=Object,Ud=Object.prototype.hasOwnProperty,Dr=(r,f)=>pE(r,"name",{value:f,configurable:!0}),Td=(r,f)=>{for(var s in f)pE(r,s,{get:f[s],enumerable:!0})},Gd=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of Fd(f))if(!Ud.call(r,h)&&h!==s)pE(r,h,{get:()=>f[h],enumerable:!(w=Id(f,h))||w.enumerable})}return r},Cd=(r)=>Gd(pE({},"__esModule",{value:!0}),r),RS={};Td(RS,{AdaptiveRetryStrategy:()=>Wd,CONFIG_MAX_ATTEMPTS:()=>OU,CONFIG_RETRY_MODE:()=>QS,ENV_MAX_ATTEMPTS:()=>dU,ENV_RETRY_MODE:()=>JS,NODE_MAX_ATTEMPT_CONFIG_OPTIONS:()=>Rd,NODE_RETRY_MODE_CONFIG_OPTIONS:()=>Sd,StandardRetryStrategy:()=>KS,defaultDelayDecider:()=>SS,defaultRetryDecider:()=>PS,getOmitRetryHeadersPlugin:()=>Pd,getRetryAfterHint:()=>VS,getRetryPlugin:()=>Qd,omitRetryHeadersMiddleware:()=>MS,omitRetryHeadersMiddlewareOptions:()=>BS,resolveRetryConfig:()=>zd,retryMiddleware:()=>lS,retryMiddlewareOptions:()=>HS});DS.exports=Cd(RS);var $h=F0(),zS=hU(),Yr=sR(),Ld=Dr((r,f)=>{const s=r,w=(f==null?void 0:f.noRetryIncrement)??Yr.NO_RETRY_INCREMENT,h=(f==null?void 0:f.retryCost)??Yr.RETRY_COST,$=(f==null?void 0:f.timeoutRetryCost)??Yr.TIMEOUT_RETRY_COST;let E=r;const I=Dr((L)=>L.name==="TimeoutError"?$:h,"getCapacityAmount"),F=Dr((L)=>I(L)<=E,"hasRetryTokens");return Object.freeze({hasRetryTokens:F,retrieveRetryTokens:Dr((L)=>{if(!F(L))throw new Error("No retry token available");const z=I(L);return E-=z,z},"retrieveRetryTokens"),releaseRetryTokens:Dr((L)=>{E+=L??w,E=Math.min(E,s)},"releaseRetryTokens")})},"getDefaultRetryQuota"),SS=Dr((r,f)=>Math.floor(Math.min(Yr.MAXIMUM_RETRY_DELAY,Math.random()*2**f*r)),"defaultDelayDecider"),i0=$U(),PS=Dr((r)=>{if(!r)return!1;return i0.isRetryableByTrait(r)||i0.isClockSkewError(r)||i0.isThrottlingError(r)||i0.isTransientError(r)},"defaultRetryDecider"),XS=Dr((r)=>{if(r instanceof Error)return r;if(r instanceof Object)return Object.assign(new Error,r);if(typeof r==="string")return new Error(r);return new Error(`AWS SDK error wrapper for ${r}`)},"asSdkError"),YS=class r{constructor(f,s){this.maxAttemptsProvider=f,this.mode=Yr.RETRY_MODES.STANDARD,this.retryDecider=(s==null?void 0:s.retryDecider)??PS,this.delayDecider=(s==null?void 0:s.delayDecider)??SS,this.retryQuota=(s==null?void 0:s.retryQuota)??Ld(Yr.INITIAL_RETRY_TOKENS)}shouldRetry(f,s,w){return s<w&&this.retryDecider(f)&&this.retryQuota.hasRetryTokens(f)}async getMaxAttempts(){let f;try{f=await this.maxAttemptsProvider()}catch(s){f=Yr.DEFAULT_MAX_ATTEMPTS}return f}async retry(f,s,w){let h,$=0,E=0;const I=await this.getMaxAttempts(),{request:F}=s;if($h.HttpRequest.isInstance(F))F.headers[Yr.INVOCATION_ID_HEADER]=zS.v4();while(!0)try{if($h.HttpRequest.isInstance(F))F.headers[Yr.REQUEST_HEADER]=`attempt=${$+1}; max=${I}`;if(w==null?void 0:w.beforeRequest)await w.beforeRequest();const{response:U,output:C}=await f(s);if(w==null?void 0:w.afterRequest)w.afterRequest(U);return this.retryQuota.releaseRetryTokens(h),C.$metadata.attempts=$+1,C.$metadata.totalRetryDelay=E,{response:U,output:C}}catch(U){const C=XS(U);if($++,this.shouldRetry(C,$,I)){h=this.retryQuota.retrieveRetryTokens(C);const L=this.delayDecider(i0.isThrottlingError(C)?Yr.THROTTLING_RETRY_DELAY_BASE:Yr.DEFAULT_RETRY_DELAY_BASE,$),z=Ad(C.$response),S=Math.max(z||0,L);E+=S,await new Promise((Z)=>setTimeout(Z,S));continue}if(!C.$metadata)C.$metadata={};throw C.$metadata.attempts=$,C.$metadata.totalRetryDelay=E,C}}};Dr(YS,"StandardRetryStrategy");var KS=YS,Ad=Dr((r)=>{if(!$h.HttpResponse.isInstance(r))return;const f=Object.keys(r.headers).find(($)=>$.toLowerCase()==="retry-after");if(!f)return;const s=r.headers[f],w=Number(s);if(!Number.isNaN(w))return w*1000;return new Date(s).getTime()-Date.now()},"getDelayFromRetryAfterHeader"),ZS=class r extends KS{constructor(f,s){const{rateLimiter:w,...h}=s??{};super(f,h);this.rateLimiter=w??new Yr.DefaultRateLimiter,this.mode=Yr.RETRY_MODES.ADAPTIVE}async retry(f,s){return super.retry(f,s,{beforeRequest:async()=>{return this.rateLimiter.getSendToken()},afterRequest:(w)=>{this.rateLimiter.updateClientSendingRate(w)}})}};Dr(ZS,"AdaptiveRetryStrategy");var Wd=ZS,WS=T1(),dU="AWS_MAX_ATTEMPTS",OU="max_attempts",Rd={environmentVariableSelector:(r)=>{const f=r[dU];if(!f)return;const s=parseInt(f);if(Number.isNaN(s))throw new Error(`Environment variable ${dU} mast be a number, got "${f}"`);return s},configFileSelector:(r)=>{const f=r[OU];if(!f)return;const s=parseInt(f);if(Number.isNaN(s))throw new Error(`Shared config file entry ${OU} mast be a number, got "${f}"`);return s},default:Yr.DEFAULT_MAX_ATTEMPTS},zd=Dr((r)=>{const{retryStrategy:f}=r,s=WS.normalizeProvider(r.maxAttempts??Yr.DEFAULT_MAX_ATTEMPTS);return{...r,maxAttempts:s,retryStrategy:async()=>{if(f)return f;if(await WS.normalizeProvider(r.retryMode)()===Yr.RETRY_MODES.ADAPTIVE)return new Yr.AdaptiveRetryStrategy(s);return new Yr.StandardRetryStrategy(s)}}},"resolveRetryConfig"),JS="AWS_RETRY_MODE",QS="retry_mode",Sd={environmentVariableSelector:(r)=>r[JS],configFileSelector:(r)=>r[QS],default:Yr.DEFAULT_RETRY_MODE},MS=Dr(()=>(r)=>async(f)=>{const{request:s}=f;if($h.HttpRequest.isInstance(s))delete s.headers[Yr.INVOCATION_ID_HEADER],delete s.headers[Yr.REQUEST_HEADER];return r(f)},"omitRetryHeadersMiddleware"),BS={name:"omitRetryHeadersMiddleware",tags:["RETRY","HEADERS","OMIT_RETRY_HEADERS"],relation:"before",toMiddleware:"awsAuthMiddleware",override:!0},Pd=Dr((r)=>({applyToStack:(f)=>{f.addRelativeTo(MS(),BS)}}),"getOmitRetryHeadersPlugin"),Xd=hh(),Yd=AS(),lS=Dr((r)=>(f,s)=>async(w)=>{var h;let $=await r.retryStrategy();const E=await r.maxAttempts();if(Kd($)){$=$;let I=await $.acquireInitialRetryToken(s.partition_id),F=new Error,U=0,C=0;const{request:L}=w,z=$h.HttpRequest.isInstance(L);if(z)L.headers[Yr.INVOCATION_ID_HEADER]=zS.v4();while(!0)try{if(z)L.headers[Yr.REQUEST_HEADER]=`attempt=${U+1}; max=${E}`;const{response:S,output:Z}=await f(w);return $.recordSuccess(I),Z.$metadata.attempts=U+1,Z.$metadata.totalRetryDelay=C,{response:S,output:Z}}catch(S){const Z=Zd(S);if(F=XS(S),z&&Yd.isStreamingPayload(L))throw(h=s.logger instanceof Xd.NoOpLogger?console:s.logger)==null||h.warn("An error was encountered in a non-retryable streaming request."),F;try{I=await $.refreshRetryTokenForRetry(I,Z)}catch(l){if(!F.$metadata)F.$metadata={};throw F.$metadata.attempts=U+1,F.$metadata.totalRetryDelay=C,F}U=I.getRetryCount();const k=I.getRetryDelay();C+=k,await new Promise((l)=>setTimeout(l,k))}}else{if($=$,$==null?void 0:$.mode)s.userAgent=[...s.userAgent||[],["cfg/retry-mode",$.mode]];return $.retry(f,w)}},"retryMiddleware"),Kd=Dr((r)=>typeof r.acquireInitialRetryToken!=="undefined"&&typeof r.refreshRetryTokenForRetry!=="undefined"&&typeof r.recordSuccess!=="undefined","isRetryStrategyV2"),Zd=Dr((r)=>{const f={error:r,errorType:Jd(r)},s=VS(r.$response);if(s)f.retryAfterHint=s;return f},"getRetryErrorInfo"),Jd=Dr((r)=>{if(i0.isThrottlingError(r))return"THROTTLING";if(i0.isTransientError(r))return"TRANSIENT";if(i0.isServerError(r))return"SERVER_ERROR";return"CLIENT_ERROR"},"getRetryErrorType"),HS={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},Qd=Dr((r)=>({applyToStack:(f)=>{f.add(lS(r),HS)}}),"getRetryPlugin"),VS=Dr((r)=>{if(!$h.HttpResponse.isInstance(r))return;const f=Object.keys(r.headers).find(($)=>$.toLowerCase()==="retry-after");if(!f)return;const s=r.headers[f],w=Number(s);if(!Number.isNaN(w))return new Date(w*1000);return new Date(s)},"getRetryAfterHint")});var dr=v((Ewr,pS)=>{function mS(r){const f=new Map;for(let s of r)f.set(s.schemeId,s);return f}function eS(r,f){return new oS(r,f)}function aS(r,f,s,w,h){return Rr(async function*$(E,I,...F){let U=E.startingToken||void 0,C=!0,L;while(C){if(I[s]=U,h)I[h]=I[h]??E.pageSize;if(E.client instanceof r)L=await od(f,E.client,I,...F);else throw new Error(`Invalid client, expected instance of ${r.name}`);yield L;const z=U;U=ad(L,w),C=!!(U&&(!E.stopOnSameToken||U!==z))}return},"paginateOperation")}var{defineProperty:tE,getOwnPropertyDescriptor:Md,getOwnPropertyNames:Bd}=Object,ld=Object.prototype.hasOwnProperty,Rr=(r,f)=>tE(r,"name",{value:f,configurable:!0}),Hd=(r,f)=>{for(var s in f)tE(r,s,{get:f[s],enumerable:!0})},Vd=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of Bd(f))if(!ld.call(r,h)&&h!==s)tE(r,h,{get:()=>f[h],enumerable:!(w=Md(f,h))||w.enumerable})}return r},Dd=(r)=>Vd(tE({},"__esModule",{value:!0}),r),yS={};Hd(yS,{DefaultIdentityProviderConfig:()=>dd,EXPIRATION_MS:()=>_S,HttpApiKeyAuthSigner:()=>Od,HttpBearerAuthSigner:()=>cd,NoAuthSigner:()=>bd,RequestBuilder:()=>oS,createIsIdentityExpiredFunction:()=>gS,createPaginator:()=>aS,doesIdentityRequireRefresh:()=>xS,getHttpAuthSchemeEndpointRuleSetPlugin:()=>yd,getHttpAuthSchemePlugin:()=>md,getHttpSigningPlugin:()=>jd,getSmithyContext:()=>xd,httpAuthSchemeEndpointRuleSetMiddlewareOptions:()=>iS,httpAuthSchemeMiddleware:()=>cU,httpAuthSchemeMiddlewareOptions:()=>qS,httpSigningMiddleware:()=>vS,httpSigningMiddlewareOptions:()=>jS,isIdentityExpired:()=>gd,memoizeIdentityProvider:()=>_d,normalizeProvider:()=>ed,requestBuilder:()=>eS});pS.exports=Dd(yS);var NS=T1();Rr(mS,"convertHttpAuthSchemesToMap");var cU=Rr((r,f)=>(s,w)=>async(h)=>{var $;const E=r.httpAuthSchemeProvider(await f.httpAuthSchemeParametersProvider(r,w,h.input)),I=mS(r.httpAuthSchemes),F=NS.getSmithyContext(w),U=[];for(let C of E){const L=I.get(C.schemeId);if(!L){U.push(`HttpAuthScheme \`${C.schemeId}\` was not enabled for this service.`);continue}const z=L.identityProvider(await f.identityProviderConfigProvider(r));if(!z){U.push(`HttpAuthScheme \`${C.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:S={},signingProperties:Z={}}=(($=C.propertiesExtractor)==null?void 0:$.call(C,r,w))||{};C.identityProperties=Object.assign(C.identityProperties||{},S),C.signingProperties=Object.assign(C.signingProperties||{},Z),F.selectedHttpAuthScheme={httpAuthOption:C,identity:await z(C.identityProperties),signer:L.signer};break}if(!F.selectedHttpAuthScheme)throw new Error(U.join("\n"));return s(h)},"httpAuthSchemeMiddleware"),kd=mA(),iS={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:kd.endpointMiddlewareOptions.name},yd=Rr((r,{httpAuthSchemeParametersProvider:f,identityProviderConfigProvider:s})=>({applyToStack:(w)=>{w.addRelativeTo(cU(r,{httpAuthSchemeParametersProvider:f,identityProviderConfigProvider:s}),iS)}}),"getHttpAuthSchemeEndpointRuleSetPlugin"),Nd=aF(),qS={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:Nd.serializerMiddlewareOption.name},md=Rr((r,{httpAuthSchemeParametersProvider:f,identityProviderConfigProvider:s})=>({applyToStack:(w)=>{w.addRelativeTo(cU(r,{httpAuthSchemeParametersProvider:f,identityProviderConfigProvider:s}),qS)}}),"getHttpAuthSchemePlugin"),r3=F0(),id=Rr((r)=>(f)=>{throw f},"defaultErrorHandler"),qd=Rr((r,f)=>{},"defaultSuccessHandler"),vS=Rr((r)=>(f,s)=>async(w)=>{if(!r3.HttpRequest.isInstance(w.request))return f(w);const $=NS.getSmithyContext(s).selectedHttpAuthScheme;if(!$)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:E={}},identity:I,signer:F}=$,U=await f({...w,request:await F.sign(w.request,I,E)}).catch((F.errorHandler||id)(E));return(F.successHandler||qd)(U.response,E),U},"httpSigningMiddleware"),vd=kS(),jS={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:vd.retryMiddlewareOptions.name},jd=Rr((r)=>({applyToStack:(f)=>{f.addRelativeTo(vS(r),jS)}}),"getHttpSigningPlugin"),dS=class r{constructor(f){this.authSchemes=new Map;for(let[s,w]of Object.entries(f))if(w!==void 0)this.authSchemes.set(s,w)}getIdentityProvider(f){return this.authSchemes.get(f)}};Rr(dS,"DefaultIdentityProviderConfig");var dd=dS,uE=Es(),OS=class r{async sign(f,s,w){if(!w)throw new Error("request could not be signed with `apiKey` since the `name` and `in` signer properties are missing");if(!w.name)throw new Error("request could not be signed with `apiKey` since the `name` signer property is missing");if(!w.in)throw new Error("request could not be signed with `apiKey` since the `in` signer property is missing");if(!s.apiKey)throw new Error("request could not be signed with `apiKey` since the `apiKey` is not defined");const h=r3.HttpRequest.clone(f);if(w.in===uE.HttpApiKeyAuthLocation.QUERY)h.query[w.name]=s.apiKey;else if(w.in===uE.HttpApiKeyAuthLocation.HEADER)h.headers[w.name]=w.scheme?`${w.scheme} ${s.apiKey}`:s.apiKey;else throw new Error("request can only be signed with `apiKey` locations `query` or `header`, but found: `"+w.in+"`");return h}};Rr(OS,"HttpApiKeyAuthSigner");var Od=OS,cS=class r{async sign(f,s,w){const h=r3.HttpRequest.clone(f);if(!s.token)throw new Error("request could not be signed with `token` since the `token` is not defined");return h.headers.Authorization=`Bearer ${s.token}`,h}};Rr(cS,"HttpBearerAuthSigner");var cd=cS,bS=class r{async sign(f,s,w){return f}};Rr(bS,"NoAuthSigner");var bd=bS,gS=Rr((r)=>(f)=>xS(f)&&f.expiration.getTime()-Date.now()<r,"createIsIdentityExpiredFunction"),_S=300000,gd=gS(_S),xS=Rr((r)=>r.expiration!==void 0,"doesIdentityRequireRefresh"),_d=Rr((r,f,s)=>{if(r===void 0)return;const w=typeof r!=="function"?async()=>Promise.resolve(r):r;let h,$,E,I=!1;const F=Rr(async(U)=>{if(!$)$=w(U);try{h=await $,E=!0,I=!1}finally{$=void 0}return h},"coalesceProvider");if(f===void 0)return async(U)=>{if(!E||(U==null?void 0:U.forceRefresh))h=await F(U);return h};return async(U)=>{if(!E||(U==null?void 0:U.forceRefresh))h=await F(U);if(I)return h;if(!s(h))return I=!0,h;if(f(h))return await F(U),h;return h}},"memoizeIdentityProvider"),xd=Rr((r)=>r[uE.SMITHY_CONTEXT_KEY]||(r[uE.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),ed=Rr((r)=>{if(typeof r==="function")return r;const f=Promise.resolve(r);return()=>f},"normalizeProvider"),nd=hh();Rr(eS,"requestBuilder");var nS=class r{constructor(f,s){this.input=f,this.context=s,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){const{hostname:f,protocol:s="https",port:w,path:h}=await this.context.endpoint();this.path=h;for(let $ of this.resolvePathStack)$(this.path);return new r3.HttpRequest({protocol:s,hostname:this.hostname||f,port:w,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(f){return this.hostname=f,this}bp(f){return this.resolvePathStack.push((s)=>{this.path=`${(s==null?void 0:s.endsWith("/"))?s.slice(0,-1):s||""}`+f}),this}p(f,s,w,h){return this.resolvePathStack.push(($)=>{this.path=nd.resolvedPath($,this.input,f,s,w,h)}),this}h(f){return this.headers=f,this}q(f){return this.query=f,this}b(f){return this.body=f,this}m(f){return this.method=f,this}};Rr(nS,"RequestBuilder");var oS=nS,od=Rr(async(r,f,s,...w)=>{return await f.send(new r(s),...w)},"makePagedClientRequest");Rr(aS,"createPaginator");var ad=Rr((r,f)=>{let s=r;const w=f.split(".");for(let h of w){if(!s||typeof s!=="object")return;s=s[h]}return s},"get")});function pd(r){return(f)=>async(s)=>{const w=s.request;if(Qr.isInstance(w)){const{body:h,headers:$}=w;if(h&&Object.keys($).map((E)=>E.toLowerCase()).indexOf(uS)===-1)try{const E=r(h);w.headers={...w.headers,[uS]:String(E)}}catch(E){}}return f({...s,request:w})}}var uS="content-length",ud,Hf=(r)=>({applyToStack:(f)=>{f.add(pd(r.bodyLengthChecker),ud)}});var Eh=G(()=>{kr();ud={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0}});var tS=async(r)=>{const f=r?.Bucket||"";if(typeof r.Bucket==="string")r.Bucket=f.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(wO(f)){if(r.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!fO(f)||f.indexOf(".")!==-1&&!String(r.Endpoint).startsWith("http:")||f.toLowerCase()!==f||f.length<3)r.ForcePathStyle=!0;if(r.DisableMultiRegionAccessPoints)r.disableMultiRegionAccessPoints=!0,r.DisableMRAP=!0;return r},td,rO,sO,fO=(r)=>td.test(r)&&!rO.test(r)&&!sO.test(r),wO=(r)=>{const[f,s,w,,,h]=r.split(":"),$=f==="arn"&&r.split(":").length>=6,E=Boolean($&&s&&w&&h);if($&&!E)throw new Error(`Invalid ARN: ${r} was an invalid ARN.`);return E};var rP=G(()=>{td=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,rO=/(\d+\.){3}\d+/,sO=/\.\./});var sP=G(()=>{rP()});var fP=(r,f,s)=>{const w=async()=>{const h=s[r]??s[f];if(typeof h==="function")return h();return h};if(r==="credentialScope"||f==="CredentialScope")return async()=>{const h=typeof s.credentials==="function"?await s.credentials():s.credentials;return h?.credentialScope??h?.CredentialScope};if(r==="accountId"||f==="AccountId")return async()=>{const h=typeof s.credentials==="function"?await s.credentials():s.credentials;return h?.accountId??h?.AccountId};if(r==="endpoint"||f==="endpoint")return async()=>{const h=await w();if(h&&typeof h==="object"){if("url"in h)return h.url.href;if("hostname"in h){const{protocol:$,hostname:E,port:I,path:F}=h;return`${$}//${E}${I?":"+I:""}${F}`}}return h};return w};function s3(r){try{const f=new Set(Array.from(r.match(/([A-Z_]){3,}/g)??[]));return f.delete("CONFIG"),f.delete("CONFIG_PREFIX_SEPARATOR"),f.delete("ENV"),[...f].join(", ")}catch(f){return r}}var wP,hP=(r,f)=>async()=>{try{const s=r(process.env);if(s===void 0)throw new Error;return s}catch(s){throw new wP.CredentialsProviderError(s.message||`Not found in ENV: ${s3(r.toString())}`,{logger:f})}};var $P=G(()=>{wP=d(Cr(),1)});import{homedir as hO}from"os";import{sep as $O}from"path";var bU,EO=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},q0=()=>{const{HOME:r,USERPROFILE:f,HOMEPATH:s,HOMEDRIVE:w=`C:${$O}`}=process.env;if(r)return r;if(f)return f;if(s)return`${w}${s}`;const h=EO();if(!bU[h])bU[h]=hO();return bU[h]};var Ih=G(()=>{bU={}});var EP="AWS_PROFILE",ls=(r)=>r.profile||process.env.AWS_PROFILE||"default";import{createHash as IO}from"crypto";import{join as FO}from"path";var f3=(r)=>{const s=IO("sha1").update(r).digest("hex");return FO(q0(),".aws","sso","cache",`${s}.json`)};var gU=G(()=>{Ih()});import{promises as UO}from"fs";var TO,w3=async(r)=>{const f=f3(r),s=await TO(f,"utf8");return JSON.parse(s)};var IP=G(()=>{gU();({readFile:TO}=UO)});var _U,FP=(r)=>Object.entries(r).filter(([f])=>{const s=f.indexOf(Hs);if(s===-1)return!1;return Object.values(_U.IniSectionType).includes(f.substring(0,s))}).reduce((f,[s,w])=>{const h=s.indexOf(Hs),$=s.substring(0,h)===_U.IniSectionType.PROFILE?s.substring(h+1):s;return f[$]=w,f},{...r.default&&{default:r.default}});var UP=G(()=>{_U=d(Es(),1);Fh()});import{join as GO}from"path";var CO="AWS_CONFIG_FILE",h3=()=>process.env[CO]||GO(q0(),".aws","config");var xU=G(()=>{Ih()});import{join as LO}from"path";var AO="AWS_SHARED_CREDENTIALS_FILE",TP=()=>process.env[AO]||LO(q0(),".aws","credentials");var GP=G(()=>{Ih()});var CP,WO,RO,M1=(r)=>{const f={};let s,w;for(let h of r.split(/\r?\n/)){const $=h.split(/(^|\s)[;#]/)[0].trim();if($[0]==="["&&$[$.length-1]==="]"){s=void 0,w=void 0;const I=$.substring(1,$.length-1),F=WO.exec(I);if(F){const[,U,,C]=F;if(Object.values(CP.IniSectionType).includes(U))s=[U,C].join(Hs)}else s=I;if(RO.includes(I))throw new Error(`Found invalid profile name "${I}"`)}else if(s){const I=$.indexOf("=");if(![0,-1].includes(I)){const[F,U]=[$.substring(0,I).trim(),$.substring(I+1).trim()];if(U==="")w=F;else{if(w&&h.trimStart()===h)w=void 0;f[s]=f[s]||{};const C=w?[w,F].join(Hs):F;f[s][C]=U}}}}return f};var eU=G(()=>{CP=d(Es(),1);Fh();WO=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,RO=["__proto__","profile __proto__"]});import{promises as zO}from"fs";var SO,nU,B1=(r,f)=>{if(!nU[r]||f?.ignoreCache)nU[r]=SO(r,"utf8");return nU[r]};var oU=G(()=>{({readFile:SO}=zO),nU={}});import{join as LP}from"path";var AP=()=>({}),Hs=".",$3=async(r={})=>{const{filepath:f=TP(),configFilepath:s=h3()}=r,w=q0();let $=f;if(f.startsWith("~/"))$=LP(w,f.slice(2));let E=s;if(s.startsWith("~/"))E=LP(w,s.slice(2));const I=await Promise.all([B1(E,{ignoreCache:r.ignoreCache}).then(M1).then(FP).catch(AP),B1($,{ignoreCache:r.ignoreCache}).then(M1).catch(AP)]);return{configFile:I[0],credentialsFile:I[1]}};var Fh=G(()=>{UP();xU();GP();Ih();eU();oU()});var WP,RP=(r)=>Object.entries(r).filter(([f])=>f.startsWith(WP.IniSectionType.SSO_SESSION+Hs)).reduce((f,[s,w])=>({...f,[s.substring(s.indexOf(Hs)+1)]:w}),{});var zP=G(()=>{WP=d(Es(),1);Fh()});var PO=()=>({}),E3=async(r={})=>B1(r.configFilepath??h3()).then(M1).then(RP).catch(PO);var SP=G(()=>{xU();zP();eU();oU()});var PP=(...r)=>{const f={};for(let s of r)for(let[w,h]of Object.entries(s))if(f[w]!==void 0)Object.assign(f[w],h);else f[w]=h;return f};var v0=async(r)=>{const f=await $3(r);return PP(f.configFile,f.credentialsFile)};var XP=G(()=>{Fh()});var YP=()=>{};var sf=G(()=>{Ih();gU();IP();Fh();SP();XP();YP()});var KP,ZP=(r,{preferredFile:f="config",...s}={})=>async()=>{const w=ls(s),{configFile:h,credentialsFile:$}=await $3(s),E=$[w]||{},I=h[w]||{},F=f==="config"?{...E,...I}:{...I,...E};try{const C=r(F,f==="config"?h:$);if(C===void 0)throw new Error;return C}catch(U){throw new KP.CredentialsProviderError(U.message||`Not found in config files w/ profile [${w}]: ${s3(r.toString())}`,{logger:s.logger})}};var JP=G(()=>{KP=d(Cr(),1);sf()});var QP,XO=(r)=>typeof r==="function",MP=(r)=>XO(r)?async()=>await r():QP.fromStatic(r);var BP=G(()=>{QP=d(Cr(),1)});var I3,u=({environmentVariableSelector:r,configFileSelector:f,default:s},w={})=>I3.memoize(I3.chain(hP(r),ZP(f,w),MP(s)));var lP=G(()=>{I3=d(Cr(),1);$P();JP();BP()});var ff=G(()=>{lP()});var HP="AWS_ENDPOINT_URL",VP="endpoint_url",DP=(r)=>({environmentVariableSelector:(f)=>{const s=r.split(" ").map(($)=>$.toUpperCase()),w=f[[HP,...s].join("_")];if(w)return w;const h=f[HP];if(h)return h;return},configFileSelector:(f,s)=>{if(s&&f.services){const h=s[["services",f.services].join(Hs)];if(h){const $=r.split(" ").map((I)=>I.toLowerCase()),E=h[[$.join("_"),VP].join(Hs)];if(E)return E}}const w=f[VP];if(w)return w;return},default:void 0});var kP=G(()=>{sf()});var yP=async(r)=>u(DP(r))();var NP=G(()=>{ff();kP()});function mP(r){const f={};if(r=r.replace(/^\?/,""),r)for(let s of r.split("&")){let[w,h=null]=s.split("=");if(w=decodeURIComponent(w),h)h=decodeURIComponent(h);if(!(w in f))f[w]=h;else if(Array.isArray(f[w]))f[w].push(h);else f[w]=[f[w],h]}return f}var br=(r)=>{if(typeof r==="string")return br(new URL(r));const{hostname:f,pathname:s,port:w,protocol:h,search:$}=r;let E;if($)E=mP($);return{hostname:f,port:w?parseInt(w):void 0,protocol:h,path:s,query:E}};var j0=()=>{};var F3=(r)=>{if(typeof r==="object"){if("url"in r)return br(r.url);return r}return br(r)};var U3=G(()=>{j0()});var iP=async(r,f,s,w)=>{if(!s.endpoint){const E=await yP(s.serviceId||"");if(E)s.endpoint=()=>Promise.resolve(F3(E))}const h=await YO(r,f,s);if(typeof s.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return s.endpointProvider(h,w)},YO=async(r,f,s)=>{const w={},h=f?.getEndpointParameterInstructions?.()||{};for(let[$,E]of Object.entries(h))switch(E.type){case"staticContextParams":w[$]=E.value;break;case"contextParams":w[$]=r[E.name];break;case"clientContextParams":case"builtInParams":w[$]=await fP(E.name,$,s)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify(E))}if(Object.keys(h).length===0)Object.assign(w,s);if(String(s.serviceId).toLowerCase()==="s3")await tS(w);return w};var aU=G(()=>{sP();NP();U3()});var qP=G(()=>{aU();U3()});var vP=({config:r,instructions:f})=>{return(s,w)=>async(h)=>{const $=await iP(h.input,{getEndpointParameterInstructions(){return f}},{...r},w);w.endpointV2=$,w.authSchemes=$.properties?.authSchemes;const E=w.authSchemes?.[0];if(E){w.signing_region=E.signingRegion,w.signing_service=E.signingName;const F=Zs(w)?.selectedHttpAuthScheme?.httpAuthOption;if(F)F.signingProperties=Object.assign(F.signingProperties||{},{signing_region:E.signingRegion,signingRegion:E.signingRegion,signing_service:E.signingName,signingName:E.signingName,signingRegionSet:E.signingRegionSet},E.properties)}return s({...h})}};var pU=G(()=>{ps();aU()});var jP=(r,f)=>(s)=>async(w)=>{const{response:h}=await s(w);try{const $=await f(h,r);return{response:h,output:$}}catch($){if(Object.defineProperty($,"$response",{value:h}),!("$metadata"in $)){if($.message+="\n Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.",typeof $.$responseBodyText!=="undefined"){if($.$response)$.$response.body=$.$responseBodyText}}throw $}};var dP=(r,f)=>(s,w)=>async(h)=>{const $=w.endpointV2?.url&&r.urlParser?async()=>r.urlParser(w.endpointV2.url):r.endpoint;if(!$)throw new Error("No valid endpoint provider available.");const E=await f(h.input,{...r,endpoint:$});return s({...h,request:E})};function W(r,f,s){return{applyToStack:(w)=>{w.add(jP(r,s),KO),w.add(dP(r,f),uU)}}}var KO,uU;var OP=G(()=>{KO={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},uU={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0}});var H=G(()=>{OP()});var ZO,R=(r,f)=>({applyToStack:(s)=>{s.addRelativeTo(vP({config:r,instructions:f}),ZO)}});var cP=G(()=>{H();pU();ZO={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:uU.name}});var Vf=(r)=>{const f=r.tls??!0,{endpoint:s}=r,w=s!=null?async()=>F3(await yr(s)()):void 0;return{...r,endpoint:w,tls:f,isCustomEndpoint:!!s,useDualstackEndpoint:yr(r.useDualstackEndpoint??!1),useFipsEndpoint:yr(r.useFipsEndpoint??!1)}};var bP=G(()=>{ps();U3()});var gP=()=>{};var B=G(()=>{qP();pU();cP();bP();gP()});var Vs,Pw=3,Ds;var T3=G(()=>{(function(r){r.STANDARD="standard",r.ADAPTIVE="adaptive"})(Vs||(Vs={}));Ds=Vs.STANDARD});var _P,xP,eP,nP;var oP=G(()=>{_P=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],xP=["TimeoutError","RequestTimeout","RequestTimeoutException"],eP=[500,502,503,504],nP=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"]});var JO=(r)=>r.$metadata?.clockSkewCorrected,Uh=(r)=>r.$metadata?.httpStatusCode===429||_P.includes(r.name)||r.$retryable?.throttling==!0,G3=(r)=>JO(r)||xP.includes(r.name)||nP.includes(r?.code||"")||eP.includes(r.$metadata?.httpStatusCode||0),aP=(r)=>{if(r.$metadata?.httpStatusCode!==void 0){const f=r.$metadata.httpStatusCode;if(500<=f&&f<=599&&!G3(r))return!0;return!1}return!1};var l1=G(()=>{oP()});class C3{constructor(r){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=r?.beta??0.7,this.minCapacity=r?.minCapacity??1,this.minFillRate=r?.minFillRate??0.5,this.scaleConstant=r?.scaleConstant??0.4,this.smooth=r?.smooth??0.8;const f=this.getCurrentTimeInSeconds();this.lastThrottleTime=f,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1000}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(r){if(!this.enabled)return;if(this.refillTokenBucket(),r>this.currentCapacity){const f=(r-this.currentCapacity)/this.fillRate*1000;await new Promise((s)=>setTimeout(s,f))}this.currentCapacity=this.currentCapacity-r}refillTokenBucket(){const r=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=r;return}const f=(r-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+f),this.lastTimestamp=r}updateClientSendingRate(r){let f;if(this.updateMeasuredRate(),Uh(r)){const w=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=w,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),f=this.cubicThrottle(w),this.enableTokenBucket()}else this.calculateTimeWindow(),f=this.cubicSuccess(this.getCurrentTimeInSeconds());const s=Math.min(f,2*this.measuredTxRate);this.updateTokenBucketRate(s)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle(r){return this.getPrecise(r*this.beta)}cubicSuccess(r){return this.getPrecise(this.scaleConstant*Math.pow(r-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(r){this.refillTokenBucket(),this.fillRate=Math.max(r,this.minFillRate),this.maxCapacity=Math.max(r,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const r=this.getCurrentTimeInSeconds(),f=Math.floor(r*2)/2;if(this.requestCount++,f>this.lastTxRateBucket){const s=this.requestCount/(f-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(s*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=f}}getPrecise(r){return parseFloat(r.toFixed(8))}}var tU=G(()=>{l1()});var Xw=100,H1=20000,r5=500,L3=500,s5=5,f5=10,w5=1,A3="amz-sdk-invocation-id",W3="amz-sdk-request";var pP=()=>{let r=Xw;return{computeNextBackoffDelay:(w)=>{return Math.floor(Math.min(H1,Math.random()*2**w*r))},setDelayBase:(w)=>{r=w}}};var uP=()=>{};var h5=({retryDelay:r,retryCount:f,retryCost:s})=>{return{getRetryCount:()=>f,getRetryDelay:()=>Math.min(H1,r),getRetryCost:()=>s}};var tP=()=>{};class Th{constructor(r){this.maxAttempts=r,this.mode=Vs.STANDARD,this.capacity=L3,this.retryBackoffStrategy=pP(),this.maxAttemptsProvider=typeof r==="function"?r:async()=>r}async acquireInitialRetryToken(r){return h5({retryDelay:Xw,retryCount:0})}async refreshRetryTokenForRetry(r,f){const s=await this.getMaxAttempts();if(this.shouldRetry(r,f,s)){const w=f.errorType;this.retryBackoffStrategy.setDelayBase(w==="THROTTLING"?r5:Xw);const h=this.retryBackoffStrategy.computeNextBackoffDelay(r.getRetryCount()),$=f.retryAfterHint?Math.max(f.retryAfterHint.getTime()-Date.now()||0,h):h,E=this.getCapacityCost(w);return this.capacity-=E,h5({retryDelay:$,retryCount:r.getRetryCount()+1,retryCost:E})}throw new Error("No retry token available")}recordSuccess(r){this.capacity=Math.max(L3,this.capacity+(r.getRetryCost()??w5))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(r){return console.warn(`Max attempts provider could not resolve. Using default of ${Pw}`),Pw}}shouldRetry(r,f,s){return r.getRetryCount()+1<s&&this.capacity>=this.getCapacityCost(f.errorType)&&this.isRetryableError(f.errorType)}getCapacityCost(r){return r==="TRANSIENT"?f5:s5}isRetryableError(r){return r==="THROTTLING"||r==="TRANSIENT"}}var R3=G(()=>{T3();uP();tP()});class $5{constructor(r,f){this.maxAttemptsProvider=r,this.mode=Vs.ADAPTIVE;const{rateLimiter:s}=f??{};this.rateLimiter=s??new C3,this.standardRetryStrategy=new Th(r)}async acquireInitialRetryToken(r){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(r)}async refreshRetryTokenForRetry(r,f){return this.rateLimiter.updateClientSendingRate(f),this.standardRetryStrategy.refreshRetryTokenForRetry(r,f)}recordSuccess(r){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(r)}}var rX=G(()=>{T3();tU();R3()});var sX=G(()=>{R3()});var fX=()=>{};var Ls=G(()=>{rX();sX();tU();R3();T3();fX()});var Df,b1r,g1r,wX,_1r,x1r,e1r,n1r,o1r,a1r;var hX=G(()=>{Df=d(hU(),1),b1r=Df.default.v1,g1r=Df.default.v3,wX=Df.default.v4,_1r=Df.default.v5,x1r=Df.default.NIL,e1r=Df.default.version,n1r=Df.default.validate,o1r=Df.default.stringify,a1r=Df.default.parse});var $X=G(()=>{Ls()});var E5=G(()=>{Ls()});var I5=G(()=>{l1()});var F5=(r)=>{if(r instanceof Error)return r;if(r instanceof Object)return Object.assign(new Error,r);if(typeof r==="string")return new Error(r);return new Error(`AWS SDK error wrapper for ${r}`)};var U5=G(()=>{kr();l1();Ls();$X();E5();I5()});var EX=G(()=>{Ls();U5()});var IX="AWS_MAX_ATTEMPTS",FX="max_attempts",kf,yf=(r)=>{const{retryStrategy:f}=r,s=yr(r.maxAttempts??Pw);return{...r,maxAttempts:s,retryStrategy:async()=>{if(f)return f;if(await yr(r.retryMode)()===Vs.ADAPTIVE)return new $5(s);return new Th(s)}}},QO="AWS_RETRY_MODE",MO="retry_mode",Nf;var UX=G(()=>{ps();Ls();kf={environmentVariableSelector:(r)=>{const f=r[IX];if(!f)return;const s=parseInt(f);if(Number.isNaN(s))throw new Error(`Environment variable ${IX} mast be a number, got "${f}"`);return s},configFileSelector:(r)=>{const f=r[FX];if(!f)return;const s=parseInt(f);if(Number.isNaN(s))throw new Error(`Shared config file entry ${FX} mast be a number, got "${f}"`);return s},default:Pw},Nf={environmentVariableSelector:(r)=>r[QO],configFileSelector:(r)=>r[MO],default:Ds}});var TX=G(()=>{kr();Ls()});class As{trace(){}debug(){}info(){}warn(){}error(){}}var Yw=(r,f)=>{const s=[];if(r)s.push(r);if(f)for(let w of f)s.push(w);return s},d0=(r,f)=>{return`${r||"anonymous"}${f&&f.length>0?` (a.k.a. ${f.join(",")})`:""}`},Gh=()=>{let r=[],f=[],s=!1;const w=new Set,h=(L)=>L.sort((z,S)=>GX[S.step]-GX[z.step]||CX[S.priority||"normal"]-CX[z.priority||"normal"]),$=(L)=>{let z=!1;const S=(Z)=>{const k=Yw(Z.name,Z.aliases);if(k.includes(L)){z=!0;for(let l of k)w.delete(l);return!1}return!0};return r=r.filter(S),f=f.filter(S),z},E=(L)=>{let z=!1;const S=(Z)=>{if(Z.middleware===L){z=!0;for(let k of Yw(Z.name,Z.aliases))w.delete(k);return!1}return!0};return r=r.filter(S),f=f.filter(S),z},I=(L)=>{return r.forEach((z)=>{L.add(z.middleware,{...z})}),f.forEach((z)=>{L.addRelativeTo(z.middleware,{...z})}),L.identifyOnResolve?.(C.identifyOnResolve()),L},F=(L)=>{const z=[];return L.before.forEach((S)=>{if(S.before.length===0&&S.after.length===0)z.push(S);else z.push(...F(S))}),z.push(L),L.after.reverse().forEach((S)=>{if(S.before.length===0&&S.after.length===0)z.push(S);else z.push(...F(S))}),z},U=(L=!1)=>{const z=[],S=[],Z={};return r.forEach((l)=>{const M={...l,before:[],after:[]};for(let y of Yw(M.name,M.aliases))Z[y]=M;z.push(M)}),f.forEach((l)=>{const M={...l,before:[],after:[]};for(let y of Yw(M.name,M.aliases))Z[y]=M;S.push(M)}),S.forEach((l)=>{if(l.toMiddleware){const M=Z[l.toMiddleware];if(M===void 0){if(L)return;throw new Error(`${l.toMiddleware} is not found when adding ${d0(l.name,l.aliases)} middleware ${l.relation} ${l.toMiddleware}`)}if(l.relation==="after")M.after.push(l);if(l.relation==="before")M.before.push(l)}}),h(z).map(F).reduce((l,M)=>{return l.push(...M),l},[])},C={add:(L,z={})=>{const{name:S,override:Z,aliases:k}=z,l={step:"initialize",priority:"normal",middleware:L,...z},M=Yw(S,k);if(M.length>0){if(M.some((y)=>w.has(y))){if(!Z)throw new Error(`Duplicate middleware name '${d0(S,k)}'`);for(let y of M){const x=r.findIndex((wr)=>wr.name===y||wr.aliases?.some((Vr)=>Vr===y));if(x===-1)continue;const e=r[x];if(e.step!==l.step||l.priority!==e.priority)throw new Error(`"${d0(e.name,e.aliases)}" middleware with ${e.priority} priority in ${e.step} step cannot be overridden by "${d0(S,k)}" middleware with ${l.priority} priority in ${l.step} step.`);r.splice(x,1)}}for(let y of M)w.add(y)}r.push(l)},addRelativeTo:(L,z)=>{const{name:S,override:Z,aliases:k}=z,l={middleware:L,...z},M=Yw(S,k);if(M.length>0){if(M.some((y)=>w.has(y))){if(!Z)throw new Error(`Duplicate middleware name '${d0(S,k)}'`);for(let y of M){const x=f.findIndex((wr)=>wr.name===y||wr.aliases?.some((Vr)=>Vr===y));if(x===-1)continue;const e=f[x];if(e.toMiddleware!==l.toMiddleware||e.relation!==l.relation)throw new Error(`"${d0(e.name,e.aliases)}" middleware ${e.relation} "${e.toMiddleware}" middleware cannot be overridden by "${d0(S,k)}" middleware ${l.relation} "${l.toMiddleware}" middleware.`);f.splice(x,1)}}for(let y of M)w.add(y)}f.push(l)},clone:()=>I(Gh()),use:(L)=>{L.applyToStack(C)},remove:(L)=>{if(typeof L==="string")return $(L);else return E(L)},removeByTag:(L)=>{let z=!1;const S=(Z)=>{const{tags:k,name:l,aliases:M}=Z;if(k&&k.includes(L)){const y=Yw(l,M);for(let x of y)w.delete(x);return z=!0,!1}return!0};return r=r.filter(S),f=f.filter(S),z},concat:(L)=>{const z=I(Gh());return z.use(L),z.identifyOnResolve(s||z.identifyOnResolve()||(L.identifyOnResolve?.()??!1)),z},applyToStack:I,identify:()=>{return U(!0).map((L)=>{const z=L.step??L.relation+" "+L.toMiddleware;return d0(L.name,L.aliases)+" - "+z})},identifyOnResolve(L){if(typeof L==="boolean")s=L;return s},resolve:(L,z)=>{for(let S of U().map((Z)=>Z.middleware).reverse())L=S(L,z);if(s)console.log(C.identify());return L}};return C},GX,CX;var LX=G(()=>{GX={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},CX={high:3,normal:2,low:1}});var T5=G(()=>{LX()});class Ws{constructor(r){this.middlewareStack=Gh(),this.config=r}send(r,f,s){const w=typeof f!=="function"?f:void 0,h=typeof f==="function"?f:s,$=r.resolveMiddleware(this.middlewareStack,this.config,w);if(h)$(r).then((E)=>h(null,E.output),(E)=>h(E)).catch(()=>{});else return $(r).then((E)=>E.output)}destroy(){if(this.config.requestHandler.destroy)this.config.requestHandler.destroy()}}var AX=G(()=>{T5()});var WX=(r)=>typeof ArrayBuffer==="function"&&r instanceof ArrayBuffer||Object.prototype.toString.call(r)==="[object ArrayBuffer]";import{Buffer as G5}from"buffer";var G0=(r,f=0,s=r.byteLength-f)=>{if(!WX(r))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof r} (${r})`);return G5.from(r,f,s)},Ch=(r,f)=>{if(typeof r!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof r} (${r})`);return f?G5.from(r,f):G5.from(r)};var Kw=()=>{};var BO,Is=(r)=>{if(r.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!BO.exec(r))throw new TypeError("Invalid base64 string.");const f=Ch(r,"base64");return new Uint8Array(f.buffer,f.byteOffset,f.byteLength)};var RX=G(()=>{Kw();BO=/^[A-Za-z0-9+/]*={0,2}$/});var gr=(r)=>{const f=Ch(r,"utf8");return new Uint8Array(f.buffer,f.byteOffset,f.byteLength/Uint8Array.BYTES_PER_ELEMENT)};var C5=G(()=>{Kw()});var zX=(r)=>{if(typeof r==="string")return gr(r);if(ArrayBuffer.isView(r))return new Uint8Array(r.buffer,r.byteOffset,r.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(r)};var SX=G(()=>{C5()});var Fs=(r)=>{if(typeof r==="string")return r;if(typeof r!=="object"||typeof r.byteOffset!=="number"||typeof r.byteLength!=="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return G0(r.buffer,r.byteOffset,r.byteLength).toString("utf8")};var PX=G(()=>{Kw()});var mf=G(()=>{C5();SX();PX()});var Us=(r)=>{let f;if(typeof r==="string")f=gr(r);else f=r;if(typeof f!=="object"||typeof f.byteOffset!=="number"||typeof f.byteLength!=="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return G0(f.buffer,f.byteOffset,f.byteLength).toString("base64")};var XX=G(()=>{Kw();mf()});var C0=G(()=>{RX();XX()});function YX(r,f="utf-8"){if(f==="base64")return Us(r);return Fs(r)}function KX(r,f){if(f==="base64")return L0.mutate(Is(r));return L0.mutate(gr(r))}var ZX=G(()=>{C0();mf();L5()});var L0;var L5=G(()=>{ZX();L0=class L0 extends Uint8Array{static fromString(r,f="utf-8"){switch(typeof r){case"string":return KX(r,f);default:throw new Error(`Unsupported conversion from ${typeof r} to Uint8ArrayBlobAdapter.`)}}static mutate(r){return Object.setPrototypeOf(r,L0.prototype),r}transformToString(r="utf-8"){return YX(this,r)}}});var JX=()=>{};var V1=(r)=>encodeURIComponent(r).replace(/[!'()*]/g,lO),lO=(r)=>`%${r.charCodeAt(0).toString(16).toUpperCase()}`;var QX=()=>{};var MX=G(()=>{QX()});function z3(r){const f=[];for(let s of Object.keys(r).sort()){const w=r[s];if(s=V1(s),Array.isArray(w))for(let h=0,$=w.length;h<$;h++)f.push(`${s}=${V1(w[h])}`);else{let h=s;if(w||typeof w==="string")h+=`=${V1(w)}`;f.push(h)}}return f.join("&")}var S3=G(()=>{MX()});var BX;var lX=G(()=>{BX=["ECONNRESET","EPIPE","ETIMEDOUT"]});var A5=(r)=>{const f={};for(let s of Object.keys(r)){const w=r[s];f[s]=Array.isArray(w)?w.join(","):w}return f};var W5=()=>{};var HX=(r,f,s=0)=>{if(!s)return;const w=setTimeout(()=>{r.destroy(),f(Object.assign(new Error(`Socket timed out without establishing a connection within ${s} ms`),{name:"TimeoutError"}))},s);r.on("socket",(h)=>{if(h.connecting)h.on("connect",()=>{clearTimeout(w)});else clearTimeout(w)})};var VX=(r,{keepAlive:f,keepAliveMsecs:s})=>{if(f!==!0)return;r.on("socket",(w)=>{w.setKeepAlive(f,s||0)})};var DX=(r,f,s=0)=>{r.setTimeout(s,()=>{r.destroy(),f(Object.assign(new Error(`Connection timed out after ${s} ms`),{name:"TimeoutError"}))})};import{Readable as HO}from"stream";async function R5(r,f,s=kX){const w=f.headers??{},h=w.Expect||w.expect;let $=-1,E=!1;if(h==="100-continue")await Promise.race([new Promise((I)=>{$=Number(setTimeout(I,Math.max(kX,s)))}),new Promise((I)=>{r.on("continue",()=>{clearTimeout($),I()}),r.on("error",()=>{E=!0,clearTimeout($),I()})})]);if(!E)VO(r,f.body)}function VO(r,f){if(f instanceof HO){f.pipe(r);return}if(f){if(Buffer.isBuffer(f)||typeof f==="string"){r.end(f);return}const s=f;if(typeof s==="object"&&s.buffer&&typeof s.byteOffset==="number"&&typeof s.byteLength==="number"){r.end(Buffer.from(s.buffer,s.byteOffset,s.byteLength));return}r.end(Buffer.from(f));return}r.end()}var kX=1000;var z5=()=>{};import{Agent as yX,request as DO}from"http";import{Agent as NX,request as kO}from"https";class ur{static create(r){if(typeof r?.handle==="function")return r;return new ur(r)}static checkSocketUsage(r,f,s=console){const{sockets:w,requests:h,maxSockets:$}=r;if(typeof $!=="number"||$===1/0)return f;const E=15000;if(Date.now()-E<f)return f;if(w&&h)for(let I in w){const F=w[I]?.length??0,U=h[I]?.length??0;if(F>=$&&U>=2*$)return s?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${F} and ${U} additional requests are enqueued.
5
- See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
6
- or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return f}constructor(r){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((f,s)=>{if(typeof r==="function")r().then((w)=>{f(this.resolveDefaultConfig(w))}).catch(s);else f(this.resolveDefaultConfig(r))})}resolveDefaultConfig(r){const{requestTimeout:f,connectionTimeout:s,socketTimeout:w,httpAgent:h,httpsAgent:$}=r||{};return{connectionTimeout:s,requestTimeout:f??w,httpAgent:(()=>{if(h instanceof yX||typeof h?.destroy==="function")return h;return new yX({keepAlive:!0,maxSockets:50,...h})})(),httpsAgent:(()=>{if($ instanceof NX||typeof $?.destroy==="function")return $;return new NX({keepAlive:!0,maxSockets:50,...$})})(),logger:console}}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(r,{abortSignal:f}={}){if(!this.config)this.config=await this.configProvider;let s;return new Promise((w,h)=>{let $=void 0;const E=async(M)=>{await $,clearTimeout(s),w(M)},I=async(M)=>{await $,clearTimeout(s),h(M)};if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(f?.aborted){const M=new Error("Request aborted");M.name="AbortError",I(M);return}const F=r.protocol==="https:",U=F?this.config.httpsAgent:this.config.httpAgent;s=setTimeout(()=>{this.socketWarningTimestamp=ur.checkSocketUsage(U,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000));const C=z3(r.query||{});let L=void 0;if(r.username!=null||r.password!=null){const M=r.username??"",y=r.password??"";L=`${M}:${y}`}let z=r.path;if(C)z+=`?${C}`;if(r.fragment)z+=`#${r.fragment}`;const S={headers:r.headers,host:r.hostname,method:r.method,path:z,port:r.port,agent:U,auth:L},k=(F?kO:DO)(S,(M)=>{const y=new V0({statusCode:M.statusCode||-1,reason:M.statusMessage,headers:A5(M.headers),body:M});E({response:y})});if(k.on("error",(M)=>{if(BX.includes(M.code))I(Object.assign(M,{name:"TimeoutError"}));else I(M)}),HX(k,I,this.config.connectionTimeout),DX(k,I,this.config.requestTimeout),f){const M=()=>{k.destroy();const y=new Error("Request aborted");y.name="AbortError",I(y)};if(typeof f.addEventListener==="function"){const y=f;y.addEventListener("abort",M,{once:!0}),k.once("close",()=>y.removeEventListener("abort",M))}else f.onabort=M}const l=S.agent;if(typeof l==="object"&&"keepAlive"in l)VX(k,{keepAlive:l.keepAlive,keepAliveMsecs:l.keepAliveMsecs});$=R5(k,r,this.config.requestTimeout).catch((M)=>{return clearTimeout(s),h(M)})})}updateHttpClientConfig(r,f){this.config=void 0,this.configProvider=this.configProvider.then((s)=>{return{...s,[r]:f}})}httpHandlerConfigs(){return this.config??{}}}var mX=G(()=>{kr();S3();lX();W5();z5()});var iX=()=>{};var qX=G(()=>{iX()});var vX=G(()=>{kr();S3();W5();qX();z5()});import{Writable as yO}from"stream";var S5;var jX=G(()=>{S5=class S5 extends yO{constructor(){super(...arguments);this.bufferedBytes=[]}_write(r,f,s){this.bufferedBytes.push(r),s()}}});async function mO(r){const f=[],s=r.getReader();let w=!1,h=0;while(!w){const{done:I,value:F}=await s.read();if(F)f.push(F),h+=F.length;w=I}const $=new Uint8Array(h);let E=0;for(let I of f)$.set(I,E),E+=I.length;return $}var ks=(r)=>{if(NO(r))return mO(r);return new Promise((f,s)=>{const w=new S5;r.pipe(w),r.on("error",(h)=>{w.end(),s(h)}),w.on("error",s),w.on("finish",function(){const h=new Uint8Array(Buffer.concat(this.bufferedBytes));f(h)})})},NO=(r)=>typeof ReadableStream==="function"&&r instanceof ReadableStream;var dX=G(()=>{jX()});var O0=G(()=>{mX();vX();dX()});var OX=G(()=>{kr();S3()});async function iO(r){const f=await vO(r),s=Is(f);return new Uint8Array(s)}async function qO(r){const f=[],s=r.getReader();let w=!1,h=0;while(!w){const{done:I,value:F}=await s.read();if(F)f.push(F),h+=F.length;w=I}const $=new Uint8Array(h);let E=0;for(let I of f)$.set(I,E),E+=I.length;return $}function vO(r){return new Promise((f,s)=>{const w=new FileReader;w.onloadend=()=>{if(w.readyState!==2)return s(new Error("Reader aborted too early"));const h=w.result??"",$=h.indexOf(","),E=$>-1?$+1:h.length;f(h.substring(E))},w.onabort=()=>s(new Error("Read aborted")),w.onerror=()=>s(w.error),w.readAsDataURL(r)})}var cX=(r)=>{if(typeof Blob==="function"&&r instanceof Blob)return iO(r);return qO(r)};var bX=G(()=>{C0()});var gX=G(()=>{OX();bX()});var D1=(r)=>typeof ReadableStream==="function"&&(r?.constructor?.name===ReadableStream.name||r instanceof ReadableStream);var eX,_X="The stream has already been transformed.",nX=(r)=>{if(!xX(r)&&!D1(r)){const h=r?.__proto__?.constructor?.name||r;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${h}`)}let f=!1;const s=async()=>{if(f)throw new Error(_X);return f=!0,await cX(r)},w=(h)=>{if(typeof h.stream!=="function")throw new Error("Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\nIf you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body");return h.stream()};return Object.assign(r,{transformToByteArray:s,transformToString:async(h)=>{const $=await s();if(h==="base64")return Us($);else if(h==="hex")return eX.toHex($);else if(h===void 0||h==="utf8"||h==="utf-8")return Fs($);else if(typeof TextDecoder==="function")return new TextDecoder(h).decode($);else throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(f)throw new Error(_X);if(f=!0,xX(r))return w(r);else if(D1(r))return r;else throw new Error(`Cannot transform payload to web stream, got ${r}`)}})},xX=(r)=>typeof Blob==="function"&&r instanceof Blob;var oX=G(()=>{gX();C0();eX=d(_E(),1);mf()});import{Readable as P5}from"stream";import{TextDecoder as jO}from"util";var aX="The stream has already been transformed.",pX=(r)=>{if(!(r instanceof P5))try{return nX(r)}catch(w){const h=r?.__proto__?.constructor?.name||r;throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${h}`)}let f=!1;const s=async()=>{if(f)throw new Error(aX);return f=!0,await ks(r)};return Object.assign(r,{transformToByteArray:s,transformToString:async(w)=>{const h=await s();if(w===void 0||Buffer.isEncoding(w))return G0(h.buffer,h.byteOffset,h.byteLength).toString(w);else return new jO(w).decode(h)},transformToWebStream:()=>{if(f)throw new Error(aX);if(r.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof P5.toWeb!=="function")throw new Error("Readable.toWeb() is not supported. Please make sure you are using Node.js >= 17.0.0, or polyfill is available.");return f=!0,P5.toWeb(r)}})};var uX=G(()=>{O0();Kw();oX()});var tX=()=>{};var rY=()=>{};var X5=G(()=>{L5();JX();uX();tX();rY()});var _r=async(r=new Uint8Array,f)=>{if(r instanceof Uint8Array)return L0.mutate(r);if(!r)return L0.mutate(new Uint8Array);const s=f.streamCollector(r);return L0.mutate(await s)};var sY=G(()=>{X5()});class A{constructor(){this.middlewareStack=Gh()}static classBuilder(){return new wY}resolveMiddlewareWithContext(r,f,s,{middlewareFn:w,clientName:h,commandName:$,inputFilterSensitiveLog:E,outputFilterSensitiveLog:I,smithyContext:F,additionalContext:U,CommandCtor:C}){for(let k of w.bind(this)(C,r,f,s))this.middlewareStack.use(k);const L=r.concat(this.middlewareStack),{logger:z}=f,S={logger:z,clientName:h,commandName:$,inputFilterSensitiveLog:E,outputFilterSensitiveLog:I,[fY.SMITHY_CONTEXT_KEY]:{commandInstance:this,...F},...U},{requestHandler:Z}=f;return L.resolve((k)=>Z.handle(k.request,s||{}),S)}}class wY{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=(r)=>r,this._outputFilterSensitiveLog=(r)=>r,this._serializer=null,this._deserializer=null}init(r){this._init=r}ep(r){return this._ep=r,this}m(r){return this._middlewareFn=r,this}s(r,f,s={}){return this._smithyContext={service:r,operation:f,...s},this}c(r={}){return this._additionalContext=r,this}n(r,f){return this._clientName=r,this._commandName=f,this}f(r=(s)=>s,f=(s)=>s){return this._inputFilterSensitiveLog=r,this._outputFilterSensitiveLog=f,this}ser(r){return this._serializer=r,this}de(r){return this._deserializer=r,this}build(){const r=this;let f;return f=class extends A{static getEndpointParameterInstructions(){return r._ep}constructor(...[s]){super();this.serialize=r._serializer,this.deserialize=r._deserializer,this.input=s??{},r._init(this)}resolveMiddleware(s,w,h){return this.resolveMiddlewareWithContext(s,w,h,{CommandCtor:f,middlewareFn:r._middlewareFn,clientName:r._clientName,commandName:r._commandName,inputFilterSensitiveLog:r._inputFilterSensitiveLog,outputFilterSensitiveLog:r._outputFilterSensitiveLog,smithyContext:r._smithyContext,additionalContext:r._additionalContext})}}}}var fY;var hY=G(()=>{T5();fY=d(Es(),1)});var o="***SensitiveInformation***";var qf=(r,f)=>{for(let s of Object.keys(r)){const w=r[s],h=async function(E,I,F){const U=new w(E);if(typeof I==="function")this.send(U,I);else if(typeof F==="function"){if(typeof I!=="object")throw new Error(`Expected http options but got ${typeof I}`);this.send(U,I||{},F)}else return this.send(U,I)},$=(s[0].toLowerCase()+s.slice(1)).replace(/Command$/,"");f.prototype[$]=h}};var Nr=(r)=>{switch(r){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${r}"`)}},c0=(r)=>{if(r===null||r===void 0)return;if(typeof r==="number"){if(r===0||r===1)X3.warn(P3(`Expected boolean, got ${typeof r}: ${r}`));if(r===0)return!1;if(r===1)return!0}if(typeof r==="string"){const f=r.toLowerCase();if(f==="false"||f==="true")X3.warn(P3(`Expected boolean, got ${typeof r}: ${r}`));if(f==="false")return!1;if(f==="true")return!0}if(typeof r==="boolean")return r;throw new TypeError(`Expected boolean, got ${typeof r}: ${r}`)},Ts=(r)=>{if(r===null||r===void 0)return;if(typeof r==="string"){const f=parseFloat(r);if(!Number.isNaN(f)){if(String(f)!==String(r))X3.warn(P3(`Expected number but observed string: ${r}`));return f}}if(typeof r==="number")return r;throw new TypeError(`Expected number, got ${typeof r}: ${r}`)},dO,$Y=(r)=>{const f=Ts(r);if(f!==void 0&&!Number.isNaN(f)&&f!==1/0&&f!==-1/0){if(Math.abs(f)>dO)throw new TypeError(`Expected 32-bit float, got ${r}`)}return f},Lh=(r)=>{if(r===null||r===void 0)return;if(Number.isInteger(r)&&!Number.isNaN(r))return r;throw new TypeError(`Expected integer, got ${typeof r}: ${r}`)},Zw=(r)=>Y5(r,32),EY=(r)=>Y5(r,16),IY=(r)=>Y5(r,8),Y5=(r,f)=>{const s=Lh(r);if(s!==void 0&&OO(s,f)!==s)throw new TypeError(`Expected ${f}-bit integer, got ${r}`);return s},OO=(r,f)=>{switch(f){case 32:return Int32Array.of(r)[0];case 16:return Int16Array.of(r)[0];case 8:return Int8Array.of(r)[0]}},N=(r,f)=>{if(r===null||r===void 0){if(f)throw new TypeError(`Expected a non-null value for ${f}`);throw new TypeError("Expected a non-null value")}return r},O=(r)=>{if(r===null||r===void 0)return;if(typeof r==="object"&&!Array.isArray(r))return r;const f=Array.isArray(r)?"array":typeof r;throw new TypeError(`Expected object, got ${f}: ${r}`)},T=(r)=>{if(r===null||r===void 0)return;if(typeof r==="string")return r;if(["boolean","number","bigint"].includes(typeof r))return X3.warn(P3(`Expected string, got ${typeof r}: ${r}`)),String(r);throw new TypeError(`Expected string, got ${typeof r}: ${r}`)},K5=(r)=>{if(typeof r=="string")return Ts(Ah(r));return Ts(r)},FY,UY=(r)=>{if(typeof r=="string")return $Y(Ah(r));return $Y(r)},cO,Ah=(r)=>{const f=r.match(cO);if(f===null||f[0].length!==r.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(r)},Z5=(r)=>{if(typeof r=="string")return bO(r);return Ts(r)},bO=(r)=>{switch(r){case"NaN":return NaN;case"Infinity":return 1/0;case"-Infinity":return-1/0;default:throw new Error(`Unable to parse float value: ${r}`)}},xr=(r)=>{if(typeof r==="string")return Lh(Ah(r));return Lh(r)},hr=(r)=>{if(typeof r==="string")return Zw(Ah(r));return Zw(r)},J5=(r)=>{if(typeof r==="string")return EY(Ah(r));return EY(r)},TY=(r)=>{if(typeof r==="string")return IY(Ah(r));return IY(r)},P3=(r)=>{return String(new TypeError(r).stack||r).split("\n").slice(0,5).filter((f)=>!f.includes("stackTraceWarning")).join("\n")},X3;var Q5=G(()=>{dO=Math.ceil(340282346638528860000000000000000000000),FY=K5,cO=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,X3={warn:console.warn}});var gO,_O,GY=(r)=>{if(r===null||r===void 0)return;if(typeof r!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const f=_O.exec(r);if(!f)throw new TypeError("Invalid RFC-3339 date-time value");const[s,w,h,$,E,I,F,U]=f,C=J5(M5(w)),L=Jw(h,"month",1,12),z=Jw($,"day",1,31);return CY(C,L,z,{hours:E,minutes:I,seconds:F,fractionalMilliseconds:U})},xO,Qw=(r)=>{if(r===null||r===void 0)return;if(typeof r!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const f=xO.exec(r);if(!f)throw new TypeError("Invalid RFC-3339 date-time value");const[s,w,h,$,E,I,F,U,C]=f,L=J5(M5(w)),z=Jw(h,"month",1,12),S=Jw($,"day",1,31),Z=CY(L,z,S,{hours:E,minutes:I,seconds:F,fractionalMilliseconds:U});if(C.toUpperCase()!="Z")Z.setTime(Z.getTime()-pO(C));return Z},o3r,a3r,p3r,vf=(r)=>{if(r===null||r===void 0)return;let f;if(typeof r==="number")f=r;else if(typeof r==="string")f=K5(r);else if(typeof r==="object"&&r.tag===1)f=r.value;else throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(f)||f===1/0||f===-1/0)throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(f*1000))},CY=(r,f,s,w)=>{const h=f-1;return nO(r,h,s),new Date(Date.UTC(r,h,s,Jw(w.hours,"hour",0,23),Jw(w.minutes,"minute",0,59),Jw(w.seconds,"seconds",0,60),aO(w.fractionalMilliseconds)))},eO,nO=(r,f,s)=>{let w=eO[f];if(f===1&&oO(r))w=29;if(s>w)throw new TypeError(`Invalid day for ${gO[f]} in ${r}: ${s}`)},oO=(r)=>{return r%4===0&&(r%100!==0||r%400===0)},Jw=(r,f,s,w)=>{const h=TY(M5(r));if(h<s||h>w)throw new TypeError(`${f} must be between ${s} and ${w}, inclusive`);return h},aO=(r)=>{if(r===null||r===void 0)return 0;return UY("0."+r)*1000},pO=(r)=>{const f=r[0];let s=1;if(f=="+")s=1;else if(f=="-")s=-1;else throw new TypeError(`Offset direction, ${f}, must be "+" or "-"`);const w=Number(r.substring(1,3)),h=Number(r.substring(4,6));return s*(w*60+h)*60*1000},M5=(r)=>{let f=0;while(f<r.length-1&&r.charAt(f)==="0")f++;if(f===0)return r;return r.slice(f)};var LY=G(()=>{Q5();gO=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],_O=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),xO=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),o3r=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),a3r=new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),p3r=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/),eO=[31,28,31,30,31,30,31,31,30,31,30,31]});var ys,D=(r,f={})=>{Object.entries(f).filter(([,w])=>w!==void 0).forEach(([w,h])=>{if(r[w]==null||r[w]==="")r[w]=h});const s=r.message||r.Message||"UnknownError";return r.message=s,delete r.Message,r};var B5=G(()=>{ys=class ys extends Error{constructor(r){super(r.message);Object.setPrototypeOf(this,ys.prototype),this.name=r.name,this.$fault=r.$fault,this.$metadata=r.$metadata}}});var uO=({output:r,parsedBody:f,exceptionCtor:s,errorCode:w})=>{const h=tO(r),$=h.httpStatusCode?h.httpStatusCode+"":void 0,E=new s({name:f?.code||f?.Code||w||$||"UnknownError",$fault:"client",$metadata:h});throw D(E,f)},jf=(r)=>{return({output:f,parsedBody:s,errorCode:w})=>{uO({output:f,parsedBody:s,exceptionCtor:r,errorCode:w})}},tO=(r)=>({httpStatusCode:r.statusCode,requestId:r.headers["x-amzn-requestid"]??r.headers["x-amzn-request-id"]??r.headers["x-amz-request-id"],extendedRequestId:r.headers["x-amz-id-2"],cfId:r.headers["x-amz-cf-id"]});var AY=G(()=>{B5()});var df=(r)=>{switch(r){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:30000};default:return{}}};var WY=!1,Of=(r)=>{if(r&&!WY&&parseInt(r.substring(1,r.indexOf(".")))<16)WY=!0};var l5,RY=(r)=>{const f=[];for(let s in l5.AlgorithmId){const w=l5.AlgorithmId[s];if(r[w]===void 0)continue;f.push({algorithmId:()=>w,checksumConstructor:()=>r[w]})}return{_checksumAlgorithms:f,addChecksumAlgorithm(s){this._checksumAlgorithms.push(s)},checksumAlgorithms(){return this._checksumAlgorithms}}},zY=(r)=>{const f={};return r.checksumAlgorithms().forEach((s)=>{f[s.algorithmId()]=s.checksumConstructor()}),f};var SY=G(()=>{l5=d(Es(),1)});var PY=(r)=>{let f=r.retryStrategy;return{setRetryStrategy(s){f=s},retryStrategy(){return f}}},XY=(r)=>{const f={};return f.retryStrategy=r.retryStrategy(),f};var cf=(r)=>{return{...RY(r),...PY(r)}},bf=(r)=>{return{...zY(r),...XY(r)}};var YY=G(()=>{SY()});var KY=G(()=>{YY()});function Y3(r){return encodeURIComponent(r).replace(/[!'()*]/g,function(f){return"%"+f.charCodeAt(0).toString(16).toUpperCase()})}var Gr=(r)=>Array.isArray(r)?r:[r];var H5=function(){const r=Object.getPrototypeOf(this).constructor,s=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(s,r.prototype),s};var ZY=G(()=>{H5.prototype=Object.create(String.prototype,{constructor:{value:H5,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(H5,String)});function P(r,f,s){let w,h,$;if(typeof f==="undefined"&&typeof s==="undefined")w={},$=r;else if(w=r,typeof f==="function")return h=f,$=s,rc(w,h,$);else $=f;for(let E of Object.keys($)){if(!Array.isArray($[E])){w[E]=$[E];continue}JY(w,null,$,E)}return w}var p=(r,f)=>{const s={};for(let w in f)JY(s,r,f,w);return s},rc=(r,f,s)=>{return P(r,Object.entries(s).reduce((w,[h,$])=>{if(Array.isArray($))w[h]=$;else if(typeof $==="function")w[h]=[f,$()];else w[h]=[f,$];return w},{}))},JY=(r,f,s,w)=>{if(f!==null){let E=s[w];if(typeof E==="function")E=[,E];const[I=sc,F=fc,U=w]=E;if(typeof I==="function"&&I(f[U])||typeof I!=="function"&&!!I)r[w]=F(f[U]);return}let[h,$]=s[w];if(typeof $==="function"){let E;const I=h===void 0&&(E=$())!=null,F=typeof h==="function"&&!!h(void 0)||typeof h!=="function"&&!!h;if(I)r[w]=E;else if(F)r[w]=$()}else{const E=h===void 0&&$!=null,I=typeof h==="function"&&!!h($)||typeof h!=="function"&&!!h;if(E||I)r[w]=$}},sc=(r)=>r!=null,fc=(r)=>r;var QY=()=>{};var MY=(r)=>{if(r!==r)return"NaN";switch(r){case 1/0:return"Infinity";case-1/0:return"-Infinity";default:return r}};var m=(r)=>{if(r==null)return{};if(Array.isArray(r))return r.filter((f)=>f!=null).map(m);if(typeof r==="object"){const f={};for(let s of Object.keys(r)){if(r[s]==null)continue;f[s]=m(r[s])}return f}return r};var Y=G(()=>{AX();sY();hY();LY();AY();KY();B5();ZY();Q5();QY()});import{Readable as wc}from"stream";var BY=(r)=>r?.body instanceof wc||typeof ReadableStream!=="undefined"&&r?.body instanceof ReadableStream;var lY=()=>{};var hc=(r)=>(f,s)=>async(w)=>{let h=await r.retryStrategy();const $=await r.maxAttempts();if($c(h)){h=h;let E=await h.acquireInitialRetryToken(s.partition_id),I=new Error,F=0,U=0;const{request:C}=w,L=Qr.isInstance(C);if(L)C.headers[A3]=wX();while(!0)try{if(L)C.headers[W3]=`attempt=${F+1}; max=${$}`;const{response:z,output:S}=await f(w);return h.recordSuccess(E),S.$metadata.attempts=F+1,S.$metadata.totalRetryDelay=U,{response:z,output:S}}catch(z){const S=Ec(z);if(I=F5(z),L&&BY(C))throw(s.logger instanceof As?console:s.logger)?.warn("An error was encountered in a non-retryable streaming request."),I;try{E=await h.refreshRetryTokenForRetry(E,S)}catch(k){if(!I.$metadata)I.$metadata={};throw I.$metadata.attempts=F+1,I.$metadata.totalRetryDelay=U,I}F=E.getRetryCount();const Z=E.getRetryDelay();U+=Z,await new Promise((k)=>setTimeout(k,Z))}}else{if(h=h,h?.mode)s.userAgent=[...s.userAgent||[],["cfg/retry-mode",h.mode]];return h.retry(f,w)}},$c=(r)=>typeof r.acquireInitialRetryToken!=="undefined"&&typeof r.refreshRetryTokenForRetry!=="undefined"&&typeof r.recordSuccess!=="undefined",Ec=(r)=>{const f={error:r,errorType:Ic(r)},s=Uc(r.$response);if(s)f.retryAfterHint=s;return f},Ic=(r)=>{if(Uh(r))return"THROTTLING";if(G3(r))return"TRANSIENT";if(aP(r))return"SERVER_ERROR";return"CLIENT_ERROR"},Fc,gf=(r)=>({applyToStack:(f)=>{f.add(hc(r),Fc)}}),Uc=(r)=>{if(!V0.isInstance(r))return;const f=Object.keys(r.headers).find(($)=>$.toLowerCase()==="retry-after");if(!f)return;const s=r.headers[f],w=Number(s);if(!Number.isNaN(w))return new Date(w*1000);return new Date(s)};var HY=G(()=>{kr();l1();Y();Ls();hX();lY();Fc={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0}});var wf=G(()=>{EX();U5();UX();E5();TX();I5();HY()});var wK=v((F2r,J3)=>{var VY,DY,kY,yY,NY,mY,iY,qY,vY,jY,dY,OY,cY,K3,V5,bY,gY,_Y,Wh,xY,eY,nY,oY,aY,pY,uY,tY,rK,Z3,sK,fK;(function(r){var f=typeof global==="object"?global:typeof self==="object"?self:typeof this==="object"?this:{};if(typeof define==="function"&&define.amd)define("tslib",["exports"],function(w){r(s(f,s(w)))});else if(typeof J3==="object"&&typeof F2r==="object")r(s(f,s(F2r)));else r(s(f));function s(w,h){if(w!==f)if(typeof Object.create==="function")Object.defineProperty(w,"__esModule",{value:!0});else w.__esModule=!0;return function($,E){return w[$]=h?h($,E):E}}})(function(r){var f=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,$){h.__proto__=$}||function(h,$){for(var E in $)if(Object.prototype.hasOwnProperty.call($,E))h[E]=$[E]};VY=function(h,$){if(typeof $!=="function"&&$!==null)throw new TypeError("Class extends value "+String($)+" is not a constructor or null");f(h,$);function E(){this.constructor=h}h.prototype=$===null?Object.create($):(E.prototype=$.prototype,new E)},DY=Object.assign||function(h){for(var $,E=1,I=arguments.length;E<I;E++){$=arguments[E];for(var F in $)if(Object.prototype.hasOwnProperty.call($,F))h[F]=$[F]}return h},kY=function(h,$){var E={};for(var I in h)if(Object.prototype.hasOwnProperty.call(h,I)&&$.indexOf(I)<0)E[I]=h[I];if(h!=null&&typeof Object.getOwnPropertySymbols==="function"){for(var F=0,I=Object.getOwnPropertySymbols(h);F<I.length;F++)if($.indexOf(I[F])<0&&Object.prototype.propertyIsEnumerable.call(h,I[F]))E[I[F]]=h[I[F]]}return E},yY=function(h,$,E,I){var F=arguments.length,U=F<3?$:I===null?I=Object.getOwnPropertyDescriptor($,E):I,C;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")U=Reflect.decorate(h,$,E,I);else for(var L=h.length-1;L>=0;L--)if(C=h[L])U=(F<3?C(U):F>3?C($,E,U):C($,E))||U;return F>3&&U&&Object.defineProperty($,E,U),U},NY=function(h,$){return function(E,I){$(E,I,h)}},mY=function(h,$,E,I,F,U){function C(wr){if(wr!==void 0&&typeof wr!=="function")throw new TypeError("Function expected");return wr}var L=I.kind,z=L==="getter"?"get":L==="setter"?"set":"value",S=!$&&h?I.static?h:h.prototype:null,Z=$||(S?Object.getOwnPropertyDescriptor(S,I.name):{}),k,l=!1;for(var M=E.length-1;M>=0;M--){var y={};for(var x in I)y[x]=x==="access"?{}:I[x];for(var x in I.access)y.access[x]=I.access[x];y.addInitializer=function(wr){if(l)throw new TypeError("Cannot add initializers after decoration has completed");U.push(C(wr||null))};var e=E[M](L==="accessor"?{get:Z.get,set:Z.set}:Z[z],y);if(L==="accessor"){if(e===void 0)continue;if(e===null||typeof e!=="object")throw new TypeError("Object expected");if(k=C(e.get))Z.get=k;if(k=C(e.set))Z.set=k;if(k=C(e.init))F.unshift(k)}else if(k=C(e))if(L==="field")F.unshift(k);else Z[z]=k}if(S)Object.defineProperty(S,I.name,Z);l=!0},iY=function(h,$,E){var I=arguments.length>2;for(var F=0;F<$.length;F++)E=I?$[F].call(h,E):$[F].call(h);return I?E:void 0},qY=function(h){return typeof h==="symbol"?h:"".concat(h)},vY=function(h,$,E){if(typeof $==="symbol")$=$.description?"[".concat($.description,"]"):"";return Object.defineProperty(h,"name",{configurable:!0,value:E?"".concat(E," ",$):$})},jY=function(h,$){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(h,$)},dY=function(h,$,E,I){function F(U){return U instanceof E?U:new E(function(C){C(U)})}return new(E||(E=Promise))(function(U,C){function L(Z){try{S(I.next(Z))}catch(k){C(k)}}function z(Z){try{S(I.throw(Z))}catch(k){C(k)}}function S(Z){Z.done?U(Z.value):F(Z.value).then(L,z)}S((I=I.apply(h,$||[])).next())})},OY=function(h,$){var E={label:0,sent:function(){if(U[0]&1)throw U[1];return U[1]},trys:[],ops:[]},I,F,U,C;return C={next:L(0),throw:L(1),return:L(2)},typeof Symbol==="function"&&(C[Symbol.iterator]=function(){return this}),C;function L(S){return function(Z){return z([S,Z])}}function z(S){if(I)throw new TypeError("Generator is already executing.");while(C&&(C=0,S[0]&&(E=0)),E)try{if(I=1,F&&(U=S[0]&2?F.return:S[0]?F.throw||((U=F.return)&&U.call(F),0):F.next)&&!(U=U.call(F,S[1])).done)return U;if(F=0,U)S=[S[0]&2,U.value];switch(S[0]){case 0:case 1:U=S;break;case 4:return E.label++,{value:S[1],done:!1};case 5:E.label++,F=S[1],S=[0];continue;case 7:S=E.ops.pop(),E.trys.pop();continue;default:if((U=E.trys,!(U=U.length>0&&U[U.length-1]))&&(S[0]===6||S[0]===2)){E=0;continue}if(S[0]===3&&(!U||S[1]>U[0]&&S[1]<U[3])){E.label=S[1];break}if(S[0]===6&&E.label<U[1]){E.label=U[1],U=S;break}if(U&&E.label<U[2]){E.label=U[2],E.ops.push(S);break}if(U[2])E.ops.pop();E.trys.pop();continue}S=$.call(h,E)}catch(Z){S=[6,Z],F=0}finally{I=U=0}if(S[0]&5)throw S[1];return{value:S[0]?S[1]:void 0,done:!0}}},cY=function(h,$){for(var E in h)if(E!=="default"&&!Object.prototype.hasOwnProperty.call($,E))Z3($,h,E)},Z3=Object.create?function(h,$,E,I){if(I===void 0)I=E;var F=Object.getOwnPropertyDescriptor($,E);if(!F||("get"in F?!$.__esModule:F.writable||F.configurable))F={enumerable:!0,get:function(){return $[E]}};Object.defineProperty(h,I,F)}:function(h,$,E,I){if(I===void 0)I=E;h[I]=$[E]},K3=function(h){var $=typeof Symbol==="function"&&Symbol.iterator,E=$&&h[$],I=0;if(E)return E.call(h);if(h&&typeof h.length==="number")return{next:function(){if(h&&I>=h.length)h=void 0;return{value:h&&h[I++],done:!h}}};throw new TypeError($?"Object is not iterable.":"Symbol.iterator is not defined.")},V5=function(h,$){var E=typeof Symbol==="function"&&h[Symbol.iterator];if(!E)return h;var I=E.call(h),F,U=[],C;try{while(($===void 0||$-- >0)&&!(F=I.next()).done)U.push(F.value)}catch(L){C={error:L}}finally{try{if(F&&!F.done&&(E=I.return))E.call(I)}finally{if(C)throw C.error}}return U},bY=function(){for(var h=[],$=0;$<arguments.length;$++)h=h.concat(V5(arguments[$]));return h},gY=function(){for(var h=0,$=0,E=arguments.length;$<E;$++)h+=arguments[$].length;for(var I=Array(h),F=0,$=0;$<E;$++)for(var U=arguments[$],C=0,L=U.length;C<L;C++,F++)I[F]=U[C];return I},_Y=function(h,$,E){if(E||arguments.length===2){for(var I=0,F=$.length,U;I<F;I++)if(U||!(I in $)){if(!U)U=Array.prototype.slice.call($,0,I);U[I]=$[I]}}return h.concat(U||Array.prototype.slice.call($))},Wh=function(h){return this instanceof Wh?(this.v=h,this):new Wh(h)},xY=function(h,$,E){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var I=E.apply(h,$||[]),F,U=[];return F={},L("next"),L("throw"),L("return",C),F[Symbol.asyncIterator]=function(){return this},F;function C(M){return function(y){return Promise.resolve(y).then(M,k)}}function L(M,y){if(I[M]){if(F[M]=function(x){return new Promise(function(e,wr){U.push([M,x,e,wr])>1||z(M,x)})},y)F[M]=y(F[M])}}function z(M,y){try{S(I[M](y))}catch(x){l(U[0][3],x)}}function S(M){M.value instanceof Wh?Promise.resolve(M.value.v).then(Z,k):l(U[0][2],M)}function Z(M){z("next",M)}function k(M){z("throw",M)}function l(M,y){if(M(y),U.shift(),U.length)z(U[0][0],U[0][1])}},eY=function(h){var $,E;return $={},I("next"),I("throw",function(F){throw F}),I("return"),$[Symbol.iterator]=function(){return this},$;function I(F,U){$[F]=h[F]?function(C){return(E=!E)?{value:Wh(h[F](C)),done:!1}:U?U(C):C}:U}},nY=function(h){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var $=h[Symbol.asyncIterator],E;return $?$.call(h):(h=typeof K3==="function"?K3(h):h[Symbol.iterator](),E={},I("next"),I("throw"),I("return"),E[Symbol.asyncIterator]=function(){return this},E);function I(U){E[U]=h[U]&&function(C){return new Promise(function(L,z){C=h[U](C),F(L,z,C.done,C.value)})}}function F(U,C,L,z){Promise.resolve(z).then(function(S){U({value:S,done:L})},C)}},oY=function(h,$){if(Object.defineProperty)Object.defineProperty(h,"raw",{value:$});else h.raw=$;return h};var s=Object.create?function(h,$){Object.defineProperty(h,"default",{enumerable:!0,value:$})}:function(h,$){h.default=$};aY=function(h){if(h&&h.__esModule)return h;var $={};if(h!=null){for(var E in h)if(E!=="default"&&Object.prototype.hasOwnProperty.call(h,E))Z3($,h,E)}return s($,h),$},pY=function(h){return h&&h.__esModule?h:{default:h}},uY=function(h,$,E,I){if(E==="a"&&!I)throw new TypeError("Private accessor was defined without a getter");if(typeof $==="function"?h!==$||!I:!$.has(h))throw new TypeError("Cannot read private member from an object whose class did not declare it");return E==="m"?I:E==="a"?I.call(h):I?I.value:$.get(h)},tY=function(h,$,E,I,F){if(I==="m")throw new TypeError("Private method is not writable");if(I==="a"&&!F)throw new TypeError("Private accessor was defined without a setter");if(typeof $==="function"?h!==$||!F:!$.has(h))throw new TypeError("Cannot write private member to an object whose class did not declare it");return I==="a"?F.call(h,E):F?F.value=E:$.set(h,E),E},rK=function(h,$){if($===null||typeof $!=="object"&&typeof $!=="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof h==="function"?$===h:h.has($)},sK=function(h,$,E){if($!==null&&$!==void 0){if(typeof $!=="object"&&typeof $!=="function")throw new TypeError("Object expected.");var I,F;if(E){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");I=$[Symbol.asyncDispose]}if(I===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");if(I=$[Symbol.dispose],E)F=I}if(typeof I!=="function")throw new TypeError("Object not disposable.");if(F)I=function(){try{F.call(this)}catch(U){return Promise.reject(U)}};h.stack.push({value:$,dispose:I,async:E})}else if(E)h.stack.push({async:!0});return $};var w=typeof SuppressedError==="function"?SuppressedError:function(h,$,E){var I=new Error(E);return I.name="SuppressedError",I.error=h,I.suppressed=$,I};fK=function(h){function $(I){h.error=h.hasError?new w(I,h.error,"An error was suppressed during disposal."):I,h.hasError=!0}function E(){while(h.stack.length){var I=h.stack.pop();try{var F=I.dispose&&I.dispose.call(I.value);if(I.async)return Promise.resolve(F).then(E,function(U){return $(U),E()})}catch(U){$(U)}}if(h.hasError)throw h.error}return E()},r("__extends",VY),r("__assign",DY),r("__rest",kY),r("__decorate",yY),r("__param",NY),r("__esDecorate",mY),r("__runInitializers",iY),r("__propKey",qY),r("__setFunctionName",vY),r("__metadata",jY),r("__awaiter",dY),r("__generator",OY),r("__exportStar",cY),r("__createBinding",Z3),r("__values",K3),r("__read",V5),r("__spread",bY),r("__spreadArrays",gY),r("__spreadArray",_Y),r("__await",Wh),r("__asyncGenerator",xY),r("__asyncDelegator",eY),r("__asyncValues",nY),r("__makeTemplateObject",oY),r("__importStar",aY),r("__importDefault",pY),r("__classPrivateFieldGet",uY),r("__classPrivateFieldSet",tY),r("__classPrivateFieldIn",rK),r("__addDisposableResource",sK),r("__disposeResources",fK)})});var IK=v((U2r,EK)=>{var{defineProperty:Q3,getOwnPropertyDescriptor:Tc,getOwnPropertyNames:Gc}=Object,Cc=Object.prototype.hasOwnProperty,Lc=(r,f)=>Q3(r,"name",{value:f,configurable:!0}),Ac=(r,f)=>{for(var s in f)Q3(r,s,{get:f[s],enumerable:!0})},Wc=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of Gc(f))if(!Cc.call(r,h)&&h!==s)Q3(r,h,{get:()=>f[h],enumerable:!(w=Tc(f,h))||w.enumerable})}return r},Rc=(r)=>Wc(Q3({},"__esModule",{value:!0}),r),$K={};Ac($K,{emitWarningIfUnsupportedVersion:()=>zc});EK.exports=Rc($K);var hK=!1,zc=Lc((r)=>{if(r&&!hK&&parseInt(r.substring(1,r.indexOf(".")))<18)hK=!0,process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will
4
+ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return f}resolveDefaultConfig(s){const{requestTimeout:f,connectionTimeout:w,socketTimeout:h,httpAgent:E,httpsAgent:$}=s||{};return{connectionTimeout:w,requestTimeout:f??h,httpAgent:(()=>{if(E instanceof TF.Agent||typeof(E==null?void 0:E.destroy)==="function")return E;return new TF.Agent({keepAlive:!0,maxSockets:50,...E})})(),httpsAgent:(()=>{if($ instanceof GF.Agent||typeof($==null?void 0:$.destroy)==="function")return $;return new GF.Agent({keepAlive:!0,maxSockets:50,...$})})(),logger:console}}destroy(){var s,f,w,h;(f=(s=this.config)==null?void 0:s.httpAgent)==null||f.destroy(),(h=(w=this.config)==null?void 0:w.httpsAgent)==null||h.destroy()}async handle(s,{abortSignal:f}={}){if(!this.config)this.config=await this.configProvider;return new Promise((w,h)=>{let E=void 0;const $=[],I=Rr(async(i)=>{await E,$.forEach(clearTimeout),w(i)},"resolve"),F=Rr(async(i)=>{await E,$.forEach(clearTimeout),h(i)},"reject");if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(f==null?void 0:f.aborted){const i=new Error("Request aborted");i.name="AbortError",F(i);return}const U=s.protocol==="https:",A=U?this.config.httpsAgent:this.config.httpAgent;$.push(setTimeout(()=>{this.socketWarningTimestamp=r.checkSocketUsage(A,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000)));const L=jC.buildQueryString(s.query||{});let S=void 0;if(s.username!=null||s.password!=null){const i=s.username??"",e=s.password??"";S=`${i}:${e}`}let z=s.path;if(L)z+=`?${L}`;if(s.fragment)z+=`#${s.fragment}`;let Z=s.hostname??"";if(Z[0]==="["&&Z.endsWith("]"))Z=s.hostname.slice(1,-1);else Z=s.hostname;const N={headers:s.headers,host:Z,method:s.method,path:z,port:s.port,agent:A,auth:S},l=(U?GF.request:TF.request)(N,(i)=>{const e=new mC.HttpResponse({statusCode:i.statusCode||-1,reason:i.statusMessage,headers:vC(i.headers),body:i});I({response:e})});if(l.on("error",(i)=>{if(Xv.includes(i.code))F(Object.assign(i,{name:"TimeoutError"}));else F(i)}),f){const i=Rr(()=>{l.destroy();const e=new Error("Request aborted");e.name="AbortError",F(e)},"onAbort");if(typeof f.addEventListener==="function"){const e=f;e.addEventListener("abort",i,{once:!0}),l.once("close",()=>e.removeEventListener("abort",i))}else f.onabort=i}$.push(Kv(l,F,this.config.connectionTimeout)),$.push(Jv(l,F,this.config.requestTimeout));const k=N.agent;if(typeof k==="object"&&"keepAlive"in k)$.push(Pv(l,{keepAlive:k.keepAlive,keepAliveMsecs:k.keepAliveMsecs}));E=AF(l,s,this.config.requestTimeout).catch((i)=>{return $.forEach(clearTimeout),h(i)})})}updateHttpClientConfig(s,f){this.config=void 0,this.configProvider=this.configProvider.then((w)=>{return{...w,[s]:f}})}httpHandlerConfigs(){return this.config??{}}};Rr(dC,"NodeHttpHandler");var Bv=dC,yC=import.meta.require("http2"),Mv=Sv(import.meta.require("http2")),cC=class r{constructor(s){this.sessions=[],this.sessions=s??[]}poll(){if(this.sessions.length>0)return this.sessions.shift()}offerLast(s){this.sessions.push(s)}contains(s){return this.sessions.includes(s)}remove(s){this.sessions=this.sessions.filter((f)=>f!==s)}[Symbol.iterator](){return this.sessions[Symbol.iterator]()}destroy(s){for(let f of this.sessions)if(f===s){if(!f.destroyed)f.destroy()}}};Rr(cC,"NodeHttp2ConnectionPool");var Vv=cC,bC=class r{constructor(s){if(this.sessionCache=new Map,this.config=s,this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrency must be greater than zero.")}lease(s,f){const w=this.getUrlString(s),h=this.sessionCache.get(w);if(h){const F=h.poll();if(F&&!this.config.disableConcurrency)return F}const E=Mv.default.connect(w);if(this.config.maxConcurrency)E.settings({maxConcurrentStreams:this.config.maxConcurrency},(F)=>{if(F)throw new Error("Fail to set maxConcurrentStreams to "+this.config.maxConcurrency+"when creating new session for "+s.destination.toString())});E.unref();const $=Rr(()=>{E.destroy(),this.deleteSession(w,E)},"destroySessionCb");if(E.on("goaway",$),E.on("error",$),E.on("frameError",$),E.on("close",()=>this.deleteSession(w,E)),f.requestTimeout)E.setTimeout(f.requestTimeout,$);const I=this.sessionCache.get(w)||new Vv;return I.offerLast(E),this.sessionCache.set(w,I),E}deleteSession(s,f){const w=this.sessionCache.get(s);if(!w)return;if(!w.contains(f))return;w.remove(f),this.sessionCache.set(s,w)}release(s,f){var w;const h=this.getUrlString(s);(w=this.sessionCache.get(h))==null||w.offerLast(f)}destroy(){for(let[s,f]of this.sessionCache){for(let w of f){if(!w.destroyed)w.destroy();f.remove(w)}this.sessionCache.delete(s)}}setMaxConcurrentStreams(s){if(this.config.maxConcurrency&&this.config.maxConcurrency<=0)throw new RangeError("maxConcurrentStreams must be greater than zero.");this.config.maxConcurrency=s}setDisableConcurrentStreams(s){this.config.disableConcurrency=s}getUrlString(s){return s.destination.toString()}};Rr(bC,"NodeHttp2ConnectionManager");var Hv=bC,_C=class r{constructor(s){this.metadata={handlerProtocol:"h2"},this.connectionManager=new Hv({}),this.configProvider=new Promise((f,w)=>{if(typeof s==="function")s().then((h)=>{f(h||{})}).catch(w);else f(s||{})})}static create(s){if(typeof(s==null?void 0:s.handle)==="function")return s;return new r(s)}destroy(){this.connectionManager.destroy()}async handle(s,{abortSignal:f}={}){if(!this.config){if(this.config=await this.configProvider,this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams||!1),this.config.maxConcurrentStreams)this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams)}const{requestTimeout:w,disableConcurrentStreams:h}=this.config;return new Promise((E,$)=>{var I;let F=!1,U=void 0;const A=Rr(async(Jr)=>{await U,E(Jr)},"resolve"),L=Rr(async(Jr)=>{await U,$(Jr)},"reject");if(f==null?void 0:f.aborted){F=!0;const Jr=new Error("Request aborted");Jr.name="AbortError",L(Jr);return}const{hostname:S,method:z,port:Z,protocol:N,query:M}=s;let l="";if(s.username!=null||s.password!=null){const Jr=s.username??"",pf=s.password??"";l=`${Jr}:${pf}@`}const k=`${N}//${l}${S}${Z?`:${Z}`:""}`,i={destination:new URL(k)},e=this.connectionManager.lease(i,{requestTimeout:(I=this.config)==null?void 0:I.sessionTimeout,disableConcurrentStreams:h||!1}),sr=Rr((Jr)=>{if(h)this.destroySession(e);F=!0,L(Jr)},"rejectWithDestroy"),Br=jC.buildQueryString(M||{});let pr=s.path;if(Br)pr+=`?${Br}`;if(s.fragment)pr+=`#${s.fragment}`;const Pf=e.request({...s.headers,[yC.constants.HTTP2_HEADER_PATH]:pr,[yC.constants.HTTP2_HEADER_METHOD]:z});if(e.ref(),Pf.on("response",(Jr)=>{const pf=new mC.HttpResponse({statusCode:Jr[":status"]||-1,headers:vC(Jr),body:Pf});if(F=!0,A({response:pf}),h)e.close(),this.connectionManager.deleteSession(k,e)}),w)Pf.setTimeout(w,()=>{Pf.close();const Jr=new Error(`Stream timed out because of no activity for ${w} ms`);Jr.name="TimeoutError",sr(Jr)});if(f){const Jr=Rr(()=>{Pf.close();const pf=new Error("Request aborted");pf.name="AbortError",sr(pf)},"onAbort");if(typeof f.addEventListener==="function"){const pf=f;pf.addEventListener("abort",Jr,{once:!0}),Pf.once("close",()=>pf.removeEventListener("abort",Jr))}else f.onabort=Jr}Pf.on("frameError",(Jr,pf,mk)=>{sr(new Error(`Frame type id ${Jr} in stream id ${mk} has failed with code ${pf}.`))}),Pf.on("error",sr),Pf.on("aborted",()=>{sr(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${Pf.rstCode}.`))}),Pf.on("close",()=>{if(e.unref(),h)e.destroy();if(!F)sr(new Error("Unexpected error: http2 request did not get a response"))}),U=AF(Pf,s,w)})}updateHttpClientConfig(s,f){this.config=void 0,this.configProvider=this.configProvider.then((w)=>{return{...w,[s]:f}})}httpHandlerConfigs(){return this.config??{}}destroySession(s){if(!s.destroyed)s.destroy()}};Rr(_C,"NodeHttp2Handler");var lv=_C,gC=class r extends iC.Writable{constructor(){super(...arguments);this.bufferedBytes=[]}_write(s,f,w){this.bufferedBytes.push(s),w()}};Rr(gC,"Collector");var Dv=gC,kv=Rr((r)=>{if(yv(r))return xC(r);return new Promise((s,f)=>{const w=new Dv;r.pipe(w),r.on("error",(h)=>{w.end(),f(h)}),w.on("error",f),w.on("finish",function(){const h=new Uint8Array(Buffer.concat(this.bufferedBytes));s(h)})})},"streamCollector"),yv=Rr((r)=>typeof ReadableStream==="function"&&r instanceof ReadableStream,"isReadableStreamInstance");Rr(xC,"collectReadableStream")});var wW=O((urr,sW)=>{function pC(r=0){return new Promise((s,f)=>{if(r)setTimeout(()=>{const w=new Error(`Request did not complete within ${r} ms`);w.name="TimeoutError",f(w)},r)})}async function tC(r){const s=await fW(r),f=cv.fromBase64(s);return new Uint8Array(f)}async function rW(r){const s=[],f=r.getReader();let w=!1,h=0;while(!w){const{done:I,value:F}=await f.read();if(F)s.push(F),h+=F.length;w=I}const E=new Uint8Array(h);let $=0;for(let I of s)E.set(I,$),$+=I.length;return E}function fW(r){return new Promise((s,f)=>{const w=new FileReader;w.onloadend=()=>{if(w.readyState!==2)return f(new Error("Reader aborted too early"));const h=w.result??"",E=h.indexOf(","),$=E>-1?E+1:h.length;s(h.substring($))},w.onabort=()=>f(new Error("Read aborted")),w.onerror=()=>f(w.error),w.readAsDataURL(r)})}var{defineProperty:j$,getOwnPropertyDescriptor:Nv,getOwnPropertyNames:qv}=Object,mv=Object.prototype.hasOwnProperty,C0=(r,s)=>j$(r,"name",{value:s,configurable:!0}),jv=(r,s)=>{for(var f in s)j$(r,f,{get:s[f],enumerable:!0})},vv=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of qv(s))if(!mv.call(r,h)&&h!==f)j$(r,h,{get:()=>s[h],enumerable:!(w=Nv(s,h))||w.enumerable})}return r},iv=(r)=>vv(j$({},"__esModule",{value:!0}),r),aC={};jv(aC,{FetchHttpHandler:()=>dv,keepAliveSupport:()=>m$,streamCollector:()=>bv});sW.exports=iv(aC);var oC=L0(),Ov=UF();C0(pC,"requestTimeout");var m$={supported:void 0},uC=class r{static create(s){if(typeof(s==null?void 0:s.handle)==="function")return s;return new r(s)}constructor(s){if(typeof s==="function")this.configProvider=s().then((f)=>f||{});else this.config=s??{},this.configProvider=Promise.resolve(this.config);if(m$.supported===void 0)m$.supported=Boolean(typeof Request!=="undefined"&&"keepalive"in new Request("https://[::1]"))}destroy(){}async handle(s,{abortSignal:f}={}){var w;if(!this.config)this.config=await this.configProvider;const h=this.config.requestTimeout,E=this.config.keepAlive===!0,$=this.config.credentials;if(f==null?void 0:f.aborted){const k=new Error("Request aborted");return k.name="AbortError",Promise.reject(k)}let I=s.path;const F=Ov.buildQueryString(s.query||{});if(F)I+=`?${F}`;if(s.fragment)I+=`#${s.fragment}`;let U="";if(s.username!=null||s.password!=null){const k=s.username??"",i=s.password??"";U=`${k}:${i}@`}const{port:A,method:L}=s,S=`${s.protocol}//${U}${s.hostname}${A?`:${A}`:""}${I}`,z=L==="GET"||L==="HEAD"?void 0:s.body,Z={body:z,headers:new Headers(s.headers),method:L,credentials:$};if((w=this.config)==null?void 0:w.cache)Z.cache=this.config.cache;if(z)Z.duplex="half";if(typeof AbortController!=="undefined")Z.signal=f;if(m$.supported)Z.keepalive=E;if(typeof this.config.requestInit==="function")Object.assign(Z,this.config.requestInit(s));let N=C0(()=>{},"removeSignalEventListener");const M=new Request(S,Z),l=[fetch(M).then((k)=>{const i=k.headers,e={};for(let Br of i.entries())e[Br[0]]=Br[1];if(k.body==null)return k.blob().then((Br)=>({response:new oC.HttpResponse({headers:e,reason:k.statusText,statusCode:k.status,body:Br})}));return{response:new oC.HttpResponse({headers:e,reason:k.statusText,statusCode:k.status,body:k.body})}}),pC(h)];if(f)l.push(new Promise((k,i)=>{const e=C0(()=>{const sr=new Error("Request aborted");sr.name="AbortError",i(sr)},"onAbort");if(typeof f.addEventListener==="function"){const sr=f;sr.addEventListener("abort",e,{once:!0}),N=C0(()=>sr.removeEventListener("abort",e),"removeSignalEventListener")}else f.onabort=e}));return Promise.race(l).finally(N)}updateHttpClientConfig(s,f){this.config=void 0,this.configProvider=this.configProvider.then((w)=>{return w[s]=f,w})}httpHandlerConfigs(){return this.config??{}}};C0(uC,"FetchHttpHandler");var dv=uC,cv=y$(),bv=C0((r)=>{if(typeof Blob==="function"&&r instanceof Blob)return tC(r);return rW(r)},"streamCollector");C0(tC,"collectBlob");C0(rW,"collectStream");C0(fW,"readToBase64")});var i$=O((trr,UW)=>{function IW(r){if(r.length%2!==0)throw new Error("Hex encoded strings must have an even number length");const s=new Uint8Array(r.length/2);for(let f=0;f<r.length;f+=2){const w=r.slice(f,f+2).toLowerCase();if(w in LF)s[f/2]=LF[w];else throw new Error(`Cannot decode unrecognized sequence ${w} as hexadecimal`)}return s}function FW(r){let s="";for(let f=0;f<r.byteLength;f++)s+=$W[r[f]];return s}var{defineProperty:v$,getOwnPropertyDescriptor:_v,getOwnPropertyNames:gv}=Object,xv=Object.prototype.hasOwnProperty,hW=(r,s)=>v$(r,"name",{value:s,configurable:!0}),ev=(r,s)=>{for(var f in s)v$(r,f,{get:s[f],enumerable:!0})},nv=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of gv(s))if(!xv.call(r,h)&&h!==f)v$(r,h,{get:()=>s[h],enumerable:!(w=_v(s,h))||w.enumerable})}return r},ov=(r)=>nv(v$({},"__esModule",{value:!0}),r),EW={};ev(EW,{fromHex:()=>IW,toHex:()=>FW});UW.exports=ov(EW);var $W={},LF={};for(let r=0;r<256;r++){let s=r.toString(16).toLowerCase();if(s.length===1)s=`0${s}`;$W[r]=s,LF[s]=r}hW(IW,"fromHex");hW(FW,"toHex")});var X1=O((TW)=>{Object.defineProperty(TW,"__esModule",{value:!0});TW.isReadableStream=void 0;var av=(r)=>{var s;return typeof ReadableStream==="function"&&(((s=r===null||r===void 0?void 0:r.constructor)===null||s===void 0?void 0:s.name)===ReadableStream.name||r instanceof ReadableStream)};TW.isReadableStream=av});var zW=O((CW)=>{Object.defineProperty(CW,"__esModule",{value:!0});CW.sdkStreamMixin=void 0;var pv=wW(),uv=y$(),tv=i$(),ri=O0(),AW=X1(),LW="The stream has already been transformed.",fi=(r)=>{var s,f;if(!RW(r)&&!AW.isReadableStream(r)){const $=((f=(s=r===null||r===void 0?void 0:r.__proto__)===null||s===void 0?void 0:s.constructor)===null||f===void 0?void 0:f.name)||r;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${$}`)}let w=!1;const h=async()=>{if(w)throw new Error(LW);return w=!0,await pv.streamCollector(r)},E=($)=>{if(typeof $.stream!=="function")throw new Error("Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\nIf you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body");return $.stream()};return Object.assign(r,{transformToByteArray:h,transformToString:async($)=>{const I=await h();if($==="base64")return uv.toBase64(I);else if($==="hex")return tv.toHex(I);else if($===void 0||$==="utf8"||$==="utf-8")return ri.toUtf8(I);else if(typeof TextDecoder==="function")return new TextDecoder($).decode(I);else throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(w)throw new Error(LW);if(w=!0,RW(r))return E(r);else if(AW.isReadableStream(r))return r;else throw new Error(`Cannot transform payload to web stream, got ${r}`)}})};CW.sdkStreamMixin=fi;var RW=(r)=>typeof Blob==="function"&&r instanceof Blob});var KW=O((YW)=>{Object.defineProperty(YW,"__esModule",{value:!0});YW.sdkStreamMixin=void 0;var si=nC(),wi=S1(),RF=import.meta.require("stream"),hi=import.meta.require("util"),Ei=zW(),SW="The stream has already been transformed.",$i=(r)=>{var s,f;if(!(r instanceof RF.Readable))try{return Ei.sdkStreamMixin(r)}catch(E){const $=((f=(s=r===null||r===void 0?void 0:r.__proto__)===null||s===void 0?void 0:s.constructor)===null||f===void 0?void 0:f.name)||r;throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${$}`)}let w=!1;const h=async()=>{if(w)throw new Error(SW);return w=!0,await si.streamCollector(r)};return Object.assign(r,{transformToByteArray:h,transformToString:async(E)=>{const $=await h();if(E===void 0||Buffer.isEncoding(E))return wi.fromArrayBuffer($.buffer,$.byteOffset,$.byteLength).toString(E);else return new hi.TextDecoder(E).decode($)},transformToWebStream:()=>{if(w)throw new Error(SW);if(r.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof RF.Readable.toWeb!=="function")throw new Error("Readable.toWeb() is not supported. Please make sure you are using Node.js >= 17.0.0, or polyfill is available.");return w=!0,RF.Readable.toWeb(r)}})};YW.sdkStreamMixin=$i});var JW=O((ZW)=>{async function Ii(r){if(typeof r.stream==="function")r=r.stream();return r.tee()}Object.defineProperty(ZW,"__esModule",{value:!0});ZW.splitStream=void 0;ZW.splitStream=Ii});var VW=O((BW)=>{async function Ti(r){if(Ui.isReadableStream(r))return Fi.splitStream(r);const s=new QW.PassThrough,f=new QW.PassThrough;return r.pipe(s),r.pipe(f),[s,f]}Object.defineProperty(BW,"__esModule",{value:!0});BW.splitStream=void 0;var QW=import.meta.require("stream"),Fi=JW(),Ui=X1();BW.splitStream=Ti});var DW=O((HW)=>{async function Gi(r,s){var f;let w=0;const h=[],E=r.getReader();let $=!1;while(!$){const{done:U,value:A}=await E.read();if(A)h.push(A),w+=(f=A===null||A===void 0?void 0:A.byteLength)!==null&&f!==void 0?f:0;if(w>=s)break;$=U}E.releaseLock();const I=new Uint8Array(Math.min(s,w));let F=0;for(let U of h){if(U.byteLength>I.byteLength-F){I.set(U.subarray(0,I.byteLength-F),F);break}else I.set(U,F);F+=U.length}return I}Object.defineProperty(HW,"__esModule",{value:!0});HW.headStream=void 0;HW.headStream=Gi});var qW=O((yW)=>{Object.defineProperty(yW,"__esModule",{value:!0});yW.headStream=void 0;var Ai=import.meta.require("stream"),Li=DW(),Ri=X1(),Ci=(r,s)=>{if(Ri.isReadableStream(r))return Li.headStream(r,s);return new Promise((f,w)=>{const h=new kW;h.limit=s,r.pipe(h),r.on("error",(E)=>{h.end(),w(E)}),h.on("error",w),h.on("finish",function(){const E=new Uint8Array(Buffer.concat(this.buffers));f(E)})})};yW.headStream=Ci;class kW extends Ai.Writable{constructor(){super(...arguments);this.buffers=[],this.limit=1/0,this.bytesBuffered=0}_write(r,s,f){var w;if(this.buffers.push(r),this.bytesBuffered+=(w=r.byteLength)!==null&&w!==void 0?w:0,this.bytesBuffered>=this.limit){const h=this.bytesBuffered-this.limit,E=this.buffers[this.buffers.length-1];this.buffers[this.buffers.length-1]=E.subarray(0,E.byteLength-h),this.emit("finish")}f()}}});var dW=O((Ifr,Zw)=>{function vW(r,s="utf-8"){if(s==="base64")return mW.toBase64(r);return jW.toUtf8(r)}function iW(r,s){if(s==="base64")return WF.mutate(mW.fromBase64(r));return WF.mutate(jW.fromUtf8(r))}var{defineProperty:O$,getOwnPropertyDescriptor:Wi,getOwnPropertyNames:zi}=Object,Si=Object.prototype.hasOwnProperty,zF=(r,s)=>O$(r,"name",{value:s,configurable:!0}),Yi=(r,s)=>{for(var f in s)O$(r,f,{get:s[f],enumerable:!0})},CF=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of zi(s))if(!Si.call(r,h)&&h!==f)O$(r,h,{get:()=>s[h],enumerable:!(w=Wi(s,h))||w.enumerable})}return r},K1=(r,s,f)=>(CF(r,s,"default"),f&&CF(f,s,"default")),Xi=(r)=>CF(O$({},"__esModule",{value:!0}),r),Kw={};Yi(Kw,{Uint8ArrayBlobAdapter:()=>WF});Zw.exports=Xi(Kw);var mW=y$(),jW=O0();zF(vW,"transformToString");zF(iW,"transformFromString");var OW=class r extends Uint8Array{static fromString(s,f="utf-8"){switch(typeof s){case"string":return iW(s,f);default:throw new Error(`Unsupported conversion from ${typeof s} to Uint8ArrayBlobAdapter.`)}}static mutate(s){return Object.setPrototypeOf(s,r.prototype),s}transformToString(s="utf-8"){return vW(this,s)}};zF(OW,"Uint8ArrayBlobAdapter");var WF=OW;K1(Kw,PC(),Zw.exports);K1(Kw,KW(),Zw.exports);K1(Kw,VW(),Zw.exports);K1(Kw,qW(),Zw.exports);K1(Kw,X1(),Zw.exports)});var $h=O((Ffr,Gz)=>{function rz(r){const s=r.getUTCFullYear(),f=r.getUTCMonth(),w=r.getUTCDay(),h=r.getUTCDate(),E=r.getUTCHours(),$=r.getUTCMinutes(),I=r.getUTCSeconds(),F=h<10?`0${h}`:`${h}`,U=E<10?`0${E}`:`${E}`,A=$<10?`0${$}`:`${$}`,L=I<10?`0${I}`:`${I}`;return`${ei[w]}, ${F} ${VF[f]} ${s} ${U}:${A}:${L} GMT`}function b$(r){return encodeURIComponent(r).replace(/[!'()*]/g,function(s){return"%"+s.charCodeAt(0).toString(16).toUpperCase()})}function HF(r,s,f){let w,h,E;if(typeof s==="undefined"&&typeof f==="undefined")w={},E=r;else if(w=r,typeof s==="function")return h=s,E=f,VO(w,h,E);else E=s;for(let $ of Object.keys(E)){if(!Array.isArray(E[$])){w[$]=E[$];continue}Fz(w,null,E,$)}return w}function Uz(r){if(r.includes(",")||r.includes('"'))r=`"${r.replace(/"/g,'\\"')}"`;return r}function Tz(r,s,f){if(f<=0||!Number.isInteger(f))throw new Error("Invalid number of delimiters ("+f+") for splitEvery.");const w=r.split(s);if(f===1)return w;const h=[];let E="";for(let $=0;$<w.length;$++){if(E==="")E=w[$];else E+=s+w[$];if(($+1)%f===0)h.push(E),E=""}if(E!=="")h.push(E);return h}var{defineProperty:_$,getOwnPropertyDescriptor:Ki,getOwnPropertyNames:Zi}=Object,Pi=Object.prototype.hasOwnProperty,v=(r,s)=>_$(r,"name",{value:s,configurable:!0}),Ji=(r,s)=>{for(var f in s)_$(r,f,{get:s[f],enumerable:!0})},Qi=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of Zi(s))if(!Pi.call(r,h)&&h!==f)_$(r,h,{get:()=>s[h],enumerable:!(w=Ki(s,h))||w.enumerable})}return r},Bi=(r)=>Qi(_$({},"__esModule",{value:!0}),r),bW={};Ji(bW,{Client:()=>Mi,Command:()=>eW,LazyJsonString:()=>JO,NoOpLogger:()=>QO,SENSITIVE_STRING:()=>li,ServiceException:()=>GO,StringWrapper:()=>B1,_json:()=>JF,collectBody:()=>Vi,convertMap:()=>BO,createAggregatedClient:()=>Di,dateToUtcString:()=>rz,decorateServiceException:()=>sz,emitWarningIfUnsupportedVersion:()=>CO,expectBoolean:()=>yi,expectByte:()=>PF,expectFloat32:()=>d$,expectInt:()=>qi,expectInt32:()=>KF,expectLong:()=>J1,expectNonNull:()=>ji,expectNumber:()=>P1,expectObject:()=>oW,expectShort:()=>ZF,expectString:()=>vi,expectUnion:()=>ii,extendedEncodeURIComponent:()=>b$,getArrayIfSingleItem:()=>ZO,getDefaultClientConfiguration:()=>XO,getDefaultExtensionConfiguration:()=>hz,getValueFromTextNode:()=>Ez,handleFloat:()=>ci,isSerializableHeaderValue:()=>PO,limitedParseDouble:()=>MF,limitedParseFloat:()=>bi,limitedParseFloat32:()=>_i,loadConfigsForDefaultMode:()=>RO,logger:()=>Q1,map:()=>HF,parseBoolean:()=>ki,parseEpochTimestamp:()=>sO,parseRfc3339DateTime:()=>oi,parseRfc3339DateTimeWithOffset:()=>pi,parseRfc7231DateTime:()=>fO,quoteHeader:()=>Uz,resolveDefaultRuntimeConfig:()=>KO,resolvedPath:()=>DO,serializeDateTime:()=>yO,serializeFloat:()=>kO,splitEvery:()=>Tz,splitHeader:()=>NO,strictParseByte:()=>tW,strictParseDouble:()=>BF,strictParseFloat:()=>Oi,strictParseFloat32:()=>aW,strictParseInt:()=>gi,strictParseInt32:()=>xi,strictParseLong:()=>uW,strictParseShort:()=>wh,take:()=>MO,throwDefaultError:()=>wz,withBaseException:()=>AO});Gz.exports=Bi(bW);var _W=wC(),gW=class r{constructor(s){this.config=s,this.middlewareStack=_W.constructStack()}send(s,f,w){const h=typeof f!=="function"?f:void 0,E=typeof f==="function"?f:w,$=h===void 0&&this.config.cacheMiddleware===!0;let I;if($){if(!this.handlers)this.handlers=new WeakMap;const F=this.handlers;if(F.has(s.constructor))I=F.get(s.constructor);else I=s.resolveMiddleware(this.middlewareStack,this.config,h),F.set(s.constructor,I)}else delete this.handlers,I=s.resolveMiddleware(this.middlewareStack,this.config,h);if(E)I(s).then((F)=>E(null,F.output),(F)=>E(F)).catch(()=>{});else return I(s).then((F)=>F.output)}destroy(){var s,f,w;(w=(f=(s=this.config)==null?void 0:s.requestHandler)==null?void 0:f.destroy)==null||w.call(f),delete this.handlers}};v(gW,"Client");var Mi=gW,SF=dW(),Vi=v(async(r=new Uint8Array,s)=>{if(r instanceof Uint8Array)return SF.Uint8ArrayBlobAdapter.mutate(r);if(!r)return SF.Uint8ArrayBlobAdapter.mutate(new Uint8Array);const f=s.streamCollector(r);return SF.Uint8ArrayBlobAdapter.mutate(await f)},"collectBody"),XF=Ff(),xW=class r{constructor(){this.middlewareStack=_W.constructStack()}static classBuilder(){return new Hi}resolveMiddlewareWithContext(s,f,w,{middlewareFn:h,clientName:E,commandName:$,inputFilterSensitiveLog:I,outputFilterSensitiveLog:F,smithyContext:U,additionalContext:A,CommandCtor:L}){for(let M of h.bind(this)(L,s,f,w))this.middlewareStack.use(M);const S=s.concat(this.middlewareStack),{logger:z}=f,Z={logger:z,clientName:E,commandName:$,inputFilterSensitiveLog:I,outputFilterSensitiveLog:F,[XF.SMITHY_CONTEXT_KEY]:{commandInstance:this,...U},...A},{requestHandler:N}=f;return S.resolve((M)=>N.handle(M.request,w||{}),Z)}};v(xW,"Command");var eW=xW,nW=class r{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=(s)=>s,this._outputFilterSensitiveLog=(s)=>s,this._serializer=null,this._deserializer=null}init(s){this._init=s}ep(s){return this._ep=s,this}m(s){return this._middlewareFn=s,this}s(s,f,w={}){return this._smithyContext={service:s,operation:f,...w},this}c(s={}){return this._additionalContext=s,this}n(s,f){return this._clientName=s,this._commandName=f,this}f(s=(w)=>w,f=(w)=>w){return this._inputFilterSensitiveLog=s,this._outputFilterSensitiveLog=f,this}ser(s){return this._serializer=s,this}de(s){return this._deserializer=s,this}build(){var s;const f=this;let w;return w=(s=class extends eW{constructor(...[h]){super();this.serialize=f._serializer,this.deserialize=f._deserializer,this.input=h??{},f._init(this)}static getEndpointParameterInstructions(){return f._ep}resolveMiddleware(h,E,$){return this.resolveMiddlewareWithContext(h,E,$,{CommandCtor:w,middlewareFn:f._middlewareFn,clientName:f._clientName,commandName:f._commandName,inputFilterSensitiveLog:f._inputFilterSensitiveLog,outputFilterSensitiveLog:f._outputFilterSensitiveLog,smithyContext:f._smithyContext,additionalContext:f._additionalContext})}},v(s,"CommandRef"),s)}};v(nW,"ClassBuilder");var Hi=nW,li="***SensitiveInformation***",Di=v((r,s)=>{for(let f of Object.keys(r)){const w=r[f],h=v(async function($,I,F){const U=new w($);if(typeof I==="function")this.send(U,I);else if(typeof F==="function"){if(typeof I!=="object")throw new Error(`Expected http options but got ${typeof I}`);this.send(U,I||{},F)}else return this.send(U,I)},"methodImpl"),E=(f[0].toLowerCase()+f.slice(1)).replace(/Command$/,"");s.prototype[E]=h}},"createAggregatedClient"),ki=v((r)=>{switch(r){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${r}"`)}},"parseBoolean"),yi=v((r)=>{if(r===null||r===void 0)return;if(typeof r==="number"){if(r===0||r===1)Q1.warn(c$(`Expected boolean, got ${typeof r}: ${r}`));if(r===0)return!1;if(r===1)return!0}if(typeof r==="string"){const s=r.toLowerCase();if(s==="false"||s==="true")Q1.warn(c$(`Expected boolean, got ${typeof r}: ${r}`));if(s==="false")return!1;if(s==="true")return!0}if(typeof r==="boolean")return r;throw new TypeError(`Expected boolean, got ${typeof r}: ${r}`)},"expectBoolean"),P1=v((r)=>{if(r===null||r===void 0)return;if(typeof r==="string"){const s=parseFloat(r);if(!Number.isNaN(s)){if(String(s)!==String(r))Q1.warn(c$(`Expected number but observed string: ${r}`));return s}}if(typeof r==="number")return r;throw new TypeError(`Expected number, got ${typeof r}: ${r}`)},"expectNumber"),Ni=Math.ceil(340282346638528860000000000000000000000),d$=v((r)=>{const s=P1(r);if(s!==void 0&&!Number.isNaN(s)&&s!==1/0&&s!==-1/0){if(Math.abs(s)>Ni)throw new TypeError(`Expected 32-bit float, got ${r}`)}return s},"expectFloat32"),J1=v((r)=>{if(r===null||r===void 0)return;if(Number.isInteger(r)&&!Number.isNaN(r))return r;throw new TypeError(`Expected integer, got ${typeof r}: ${r}`)},"expectLong"),qi=J1,KF=v((r)=>QF(r,32),"expectInt32"),ZF=v((r)=>QF(r,16),"expectShort"),PF=v((r)=>QF(r,8),"expectByte"),QF=v((r,s)=>{const f=J1(r);if(f!==void 0&&mi(f,s)!==f)throw new TypeError(`Expected ${s}-bit integer, got ${r}`);return f},"expectSizedInt"),mi=v((r,s)=>{switch(s){case 32:return Int32Array.of(r)[0];case 16:return Int16Array.of(r)[0];case 8:return Int8Array.of(r)[0]}},"castInt"),ji=v((r,s)=>{if(r===null||r===void 0){if(s)throw new TypeError(`Expected a non-null value for ${s}`);throw new TypeError("Expected a non-null value")}return r},"expectNonNull"),oW=v((r)=>{if(r===null||r===void 0)return;if(typeof r==="object"&&!Array.isArray(r))return r;const s=Array.isArray(r)?"array":typeof r;throw new TypeError(`Expected object, got ${s}: ${r}`)},"expectObject"),vi=v((r)=>{if(r===null||r===void 0)return;if(typeof r==="string")return r;if(["boolean","number","bigint"].includes(typeof r))return Q1.warn(c$(`Expected string, got ${typeof r}: ${r}`)),String(r);throw new TypeError(`Expected string, got ${typeof r}: ${r}`)},"expectString"),ii=v((r)=>{if(r===null||r===void 0)return;const s=oW(r),f=Object.entries(s).filter(([,w])=>w!=null).map(([w])=>w);if(f.length===0)throw new TypeError("Unions must have exactly one non-null member. None were found.");if(f.length>1)throw new TypeError(`Unions must have exactly one non-null member. Keys ${f} were not null.`);return s},"expectUnion"),BF=v((r)=>{if(typeof r=="string")return P1(Eh(r));return P1(r)},"strictParseDouble"),Oi=BF,aW=v((r)=>{if(typeof r=="string")return d$(Eh(r));return d$(r)},"strictParseFloat32"),di=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,Eh=v((r)=>{const s=r.match(di);if(s===null||s[0].length!==r.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(r)},"parseNumber"),MF=v((r)=>{if(typeof r=="string")return pW(r);return P1(r)},"limitedParseDouble"),ci=MF,bi=MF,_i=v((r)=>{if(typeof r=="string")return pW(r);return d$(r)},"limitedParseFloat32"),pW=v((r)=>{switch(r){case"NaN":return NaN;case"Infinity":return 1/0;case"-Infinity":return-1/0;default:throw new Error(`Unable to parse float value: ${r}`)}},"parseFloatString"),uW=v((r)=>{if(typeof r==="string")return J1(Eh(r));return J1(r)},"strictParseLong"),gi=uW,xi=v((r)=>{if(typeof r==="string")return KF(Eh(r));return KF(r)},"strictParseInt32"),wh=v((r)=>{if(typeof r==="string")return ZF(Eh(r));return ZF(r)},"strictParseShort"),tW=v((r)=>{if(typeof r==="string")return PF(Eh(r));return PF(r)},"strictParseByte"),c$=v((r)=>{return String(new TypeError(r).stack||r).split("\n").slice(0,5).filter((s)=>!s.includes("stackTraceWarning")).join("\n")},"stackTraceWarning"),Q1={warn:console.warn},ei=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],VF=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];v(rz,"dateToUtcString");var ni=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),oi=v((r)=>{if(r===null||r===void 0)return;if(typeof r!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const s=ni.exec(r);if(!s)throw new TypeError("Invalid RFC-3339 date-time value");const[f,w,h,E,$,I,F,U]=s,A=wh(hh(w)),L=Bs(h,"month",1,12),S=Bs(E,"day",1,31);return Z1(A,L,S,{hours:$,minutes:I,seconds:F,fractionalMilliseconds:U})},"parseRfc3339DateTime"),ai=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),pi=v((r)=>{if(r===null||r===void 0)return;if(typeof r!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const s=ai.exec(r);if(!s)throw new TypeError("Invalid RFC-3339 date-time value");const[f,w,h,E,$,I,F,U,A]=s,L=wh(hh(w)),S=Bs(h,"month",1,12),z=Bs(E,"day",1,31),Z=Z1(L,S,z,{hours:$,minutes:I,seconds:F,fractionalMilliseconds:U});if(A.toUpperCase()!="Z")Z.setTime(Z.getTime()-TO(A));return Z},"parseRfc3339DateTimeWithOffset"),ui=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),ti=new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),rO=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/),fO=v((r)=>{if(r===null||r===void 0)return;if(typeof r!=="string")throw new TypeError("RFC-7231 date-times must be expressed as strings");let s=ui.exec(r);if(s){const[f,w,h,E,$,I,F,U]=s;return Z1(wh(hh(E)),YF(h),Bs(w,"day",1,31),{hours:$,minutes:I,seconds:F,fractionalMilliseconds:U})}if(s=ti.exec(r),s){const[f,w,h,E,$,I,F,U]=s;return EO(Z1(wO(E),YF(h),Bs(w,"day",1,31),{hours:$,minutes:I,seconds:F,fractionalMilliseconds:U}))}if(s=rO.exec(r),s){const[f,w,h,E,$,I,F,U]=s;return Z1(wh(hh(U)),YF(w),Bs(h.trimLeft(),"day",1,31),{hours:E,minutes:$,seconds:I,fractionalMilliseconds:F})}throw new TypeError("Invalid RFC-7231 date-time value")},"parseRfc7231DateTime"),sO=v((r)=>{if(r===null||r===void 0)return;let s;if(typeof r==="number")s=r;else if(typeof r==="string")s=BF(r);else if(typeof r==="object"&&r.tag===1)s=r.value;else throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(s)||s===1/0||s===-1/0)throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(s*1000))},"parseEpochTimestamp"),Z1=v((r,s,f,w)=>{const h=s-1;return IO(r,h,f),new Date(Date.UTC(r,h,f,Bs(w.hours,"hour",0,23),Bs(w.minutes,"minute",0,59),Bs(w.seconds,"seconds",0,60),UO(w.fractionalMilliseconds)))},"buildDate"),wO=v((r)=>{const s=new Date().getUTCFullYear(),f=Math.floor(s/100)*100+wh(hh(r));if(f<s)return f+100;return f},"parseTwoDigitYear"),hO=1576800000000,EO=v((r)=>{if(r.getTime()-new Date().getTime()>hO)return new Date(Date.UTC(r.getUTCFullYear()-100,r.getUTCMonth(),r.getUTCDate(),r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds(),r.getUTCMilliseconds()));return r},"adjustRfc850Year"),YF=v((r)=>{const s=VF.indexOf(r);if(s<0)throw new TypeError(`Invalid month: ${r}`);return s+1},"parseMonthByShortName"),$O=[31,28,31,30,31,30,31,31,30,31,30,31],IO=v((r,s,f)=>{let w=$O[s];if(s===1&&FO(r))w=29;if(f>w)throw new TypeError(`Invalid day for ${VF[s]} in ${r}: ${f}`)},"validateDayOfMonth"),FO=v((r)=>{return r%4===0&&(r%100!==0||r%400===0)},"isLeapYear"),Bs=v((r,s,f,w)=>{const h=tW(hh(r));if(h<f||h>w)throw new TypeError(`${s} must be between ${f} and ${w}, inclusive`);return h},"parseDateValue"),UO=v((r)=>{if(r===null||r===void 0)return 0;return aW("0."+r)*1000},"parseMilliseconds"),TO=v((r)=>{const s=r[0];let f=1;if(s=="+")f=1;else if(s=="-")f=-1;else throw new TypeError(`Offset direction, ${s}, must be "+" or "-"`);const w=Number(r.substring(1,3)),h=Number(r.substring(4,6));return f*(w*60+h)*60*1000},"parseOffsetToMilliseconds"),hh=v((r)=>{let s=0;while(s<r.length-1&&r.charAt(s)==="0")s++;if(s===0)return r;return r.slice(s)},"stripLeadingZeroes"),fz=class r extends Error{constructor(s){super(s.message);Object.setPrototypeOf(this,r.prototype),this.name=s.name,this.$fault=s.$fault,this.$metadata=s.$metadata}};v(fz,"ServiceException");var GO=fz,sz=v((r,s={})=>{Object.entries(s).filter(([,w])=>w!==void 0).forEach(([w,h])=>{if(r[w]==null||r[w]==="")r[w]=h});const f=r.message||r.Message||"UnknownError";return r.message=f,delete r.Message,r},"decorateServiceException"),wz=v(({output:r,parsedBody:s,exceptionCtor:f,errorCode:w})=>{const h=LO(r),E=h.httpStatusCode?h.httpStatusCode+"":void 0,$=new f({name:(s==null?void 0:s.code)||(s==null?void 0:s.Code)||w||E||"UnknownError",$fault:"client",$metadata:h});throw sz($,s)},"throwDefaultError"),AO=v((r)=>{return({output:s,parsedBody:f,errorCode:w})=>{wz({output:s,parsedBody:f,exceptionCtor:r,errorCode:w})}},"withBaseException"),LO=v((r)=>({httpStatusCode:r.statusCode,requestId:r.headers["x-amzn-requestid"]??r.headers["x-amzn-request-id"]??r.headers["x-amz-request-id"],extendedRequestId:r.headers["x-amz-id-2"],cfId:r.headers["x-amz-cf-id"]}),"deserializeMetadata"),RO=v((r)=>{switch(r){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:30000};default:return{}}},"loadConfigsForDefaultMode"),cW=!1,CO=v((r)=>{if(r&&!cW&&parseInt(r.substring(1,r.indexOf(".")))<16)cW=!0},"emitWarningIfUnsupportedVersion");v(b$,"extendedEncodeURIComponent");var WO=v((r)=>{const s=[];for(let f in XF.AlgorithmId){const w=XF.AlgorithmId[f];if(r[w]===void 0)continue;s.push({algorithmId:()=>w,checksumConstructor:()=>r[w]})}return{_checksumAlgorithms:s,addChecksumAlgorithm(f){this._checksumAlgorithms.push(f)},checksumAlgorithms(){return this._checksumAlgorithms}}},"getChecksumConfiguration"),zO=v((r)=>{const s={};return r.checksumAlgorithms().forEach((f)=>{s[f.algorithmId()]=f.checksumConstructor()}),s},"resolveChecksumRuntimeConfig"),SO=v((r)=>{let s=r.retryStrategy;return{setRetryStrategy(f){s=f},retryStrategy(){return s}}},"getRetryConfiguration"),YO=v((r)=>{const s={};return s.retryStrategy=r.retryStrategy(),s},"resolveRetryRuntimeConfig"),hz=v((r)=>{return{...WO(r),...SO(r)}},"getDefaultExtensionConfiguration"),XO=hz,KO=v((r)=>{return{...zO(r),...YO(r)}},"resolveDefaultRuntimeConfig"),ZO=v((r)=>Array.isArray(r)?r:[r],"getArrayIfSingleItem"),Ez=v((r)=>{for(let f in r)if(r.hasOwnProperty(f)&&r[f]["#text"]!==void 0)r[f]=r[f]["#text"];else if(typeof r[f]==="object"&&r[f]!==null)r[f]=Ez(r[f]);return r},"getValueFromTextNode"),PO=v((r)=>{return r!=null},"isSerializableHeaderValue"),B1=v(function(){const r=Object.getPrototypeOf(this).constructor,f=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(f,r.prototype),f},"StringWrapper");B1.prototype=Object.create(String.prototype,{constructor:{value:B1,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(B1,String);var $z=class r extends B1{deserializeJSON(){return JSON.parse(super.toString())}toJSON(){return super.toString()}static fromObject(s){if(s instanceof r)return s;else if(s instanceof String||typeof s==="string")return new r(s);return new r(JSON.stringify(s))}};v($z,"LazyJsonString");var JO=$z,Iz=class r{trace(){}debug(){}info(){}warn(){}error(){}};v(Iz,"NoOpLogger");var QO=Iz;v(HF,"map");var BO=v((r)=>{const s={};for(let[f,w]of Object.entries(r||{}))s[f]=[,w];return s},"convertMap"),MO=v((r,s)=>{const f={};for(let w in s)Fz(f,r,s,w);return f},"take"),VO=v((r,s,f)=>{return HF(r,Object.entries(f).reduce((w,[h,E])=>{if(Array.isArray(E))w[h]=E;else if(typeof E==="function")w[h]=[s,E()];else w[h]=[s,E];return w},{}))},"mapWithFilter"),Fz=v((r,s,f,w)=>{if(s!==null){let $=f[w];if(typeof $==="function")$=[,$];const[I=HO,F=lO,U=w]=$;if(typeof I==="function"&&I(s[U])||typeof I!=="function"&&!!I)r[w]=F(s[U]);return}let[h,E]=f[w];if(typeof E==="function"){let $;const I=h===void 0&&($=E())!=null,F=typeof h==="function"&&!!h(void 0)||typeof h!=="function"&&!!h;if(I)r[w]=$;else if(F)r[w]=E()}else{const $=h===void 0&&E!=null,I=typeof h==="function"&&!!h(E)||typeof h!=="function"&&!!h;if($||I)r[w]=E}},"applyInstruction"),HO=v((r)=>r!=null,"nonNullish"),lO=v((r)=>r,"pass");v(Uz,"quoteHeader");var DO=v((r,s,f,w,h,E)=>{if(s!=null&&s[f]!==void 0){const $=w();if($.length<=0)throw new Error("Empty value provided for input HTTP label: "+f+".");r=r.replace(h,E?$.split("/").map((I)=>b$(I)).join("/"):b$($))}else throw new Error("No value provided for input HTTP label: "+f+".");return r},"resolvedPath"),kO=v((r)=>{if(r!==r)return"NaN";switch(r){case 1/0:return"Infinity";case-1/0:return"-Infinity";default:return r}},"serializeFloat"),yO=v((r)=>r.toISOString().replace(".000Z","Z"),"serializeDateTime"),JF=v((r)=>{if(r==null)return{};if(Array.isArray(r))return r.filter((s)=>s!=null).map(JF);if(typeof r==="object"){const s={};for(let f of Object.keys(r)){if(r[f]==null)continue;s[f]=JF(r[f])}return s}return r},"_json");v(Tz,"splitEvery");var NO=v((r)=>{const s=r.length,f=[];let w=!1,h=void 0,E=0;for(let $=0;$<s;++$){const I=r[$];switch(I){case'"':if(h!=="\\")w=!w;break;case",":if(!w)f.push(r.slice(E,$)),E=$+1;break;default:}h=I}return f.push(r.slice(E)),f.map(($)=>{$=$.trim();const I=$.length;if(I<2)return $;if($[0]==='"'&&$[I-1]==='"')$=$.slice(1,I-1);return $.replace(/\\"/g,'"')})},"splitHeader")});var Rz=O((Az)=>{Object.defineProperty(Az,"__esModule",{value:!0});Az.isStreamingPayload=void 0;var qO=import.meta.require("stream"),mO=(r)=>(r===null||r===void 0?void 0:r.body)instanceof qO.Readable||typeof ReadableStream!=="undefined"&&(r===null||r===void 0?void 0:r.body)instanceof ReadableStream;Az.isStreamingPayload=mO});var kz=O((Gfr,Dz)=>{var{defineProperty:g$,getOwnPropertyDescriptor:jO,getOwnPropertyNames:vO}=Object,iO=Object.prototype.hasOwnProperty,Dr=(r,s)=>g$(r,"name",{value:s,configurable:!0}),OO=(r,s)=>{for(var f in s)g$(r,f,{get:s[f],enumerable:!0})},dO=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of vO(s))if(!iO.call(r,h)&&h!==f)g$(r,h,{get:()=>s[h],enumerable:!(w=jO(s,h))||w.enumerable})}return r},cO=(r)=>dO(g$({},"__esModule",{value:!0}),r),Wz={};OO(Wz,{AdaptiveRetryStrategy:()=>gO,CONFIG_MAX_ATTEMPTS:()=>DF,CONFIG_RETRY_MODE:()=>Qz,ENV_MAX_ATTEMPTS:()=>lF,ENV_RETRY_MODE:()=>Jz,NODE_MAX_ATTEMPT_CONFIG_OPTIONS:()=>xO,NODE_RETRY_MODE_CONFIG_OPTIONS:()=>nO,StandardRetryStrategy:()=>Zz,defaultDelayDecider:()=>Sz,defaultRetryDecider:()=>Yz,getOmitRetryHeadersPlugin:()=>oO,getRetryAfterHint:()=>lz,getRetryPlugin:()=>fd,omitRetryHeadersMiddleware:()=>Bz,omitRetryHeadersMiddlewareOptions:()=>Mz,resolveRetryConfig:()=>eO,retryMiddleware:()=>Vz,retryMiddlewareOptions:()=>Hz});Dz.exports=cO(Wz);var Ih=L0(),zz=n6(),Zr=uR(),bO=Dr((r,s)=>{const f=r,w=(s==null?void 0:s.noRetryIncrement)??Zr.NO_RETRY_INCREMENT,h=(s==null?void 0:s.retryCost)??Zr.RETRY_COST,E=(s==null?void 0:s.timeoutRetryCost)??Zr.TIMEOUT_RETRY_COST;let $=r;const I=Dr((L)=>L.name==="TimeoutError"?E:h,"getCapacityAmount"),F=Dr((L)=>I(L)<=$,"hasRetryTokens");return Object.freeze({hasRetryTokens:F,retrieveRetryTokens:Dr((L)=>{if(!F(L))throw new Error("No retry token available");const S=I(L);return $-=S,S},"retrieveRetryTokens"),releaseRetryTokens:Dr((L)=>{$+=L??w,$=Math.min($,f)},"releaseRetryTokens")})},"getDefaultRetryQuota"),Sz=Dr((r,s)=>Math.floor(Math.min(Zr.MAXIMUM_RETRY_DELAY,Math.random()*2**s*r)),"defaultDelayDecider"),d0=o6(),Yz=Dr((r)=>{if(!r)return!1;return d0.isRetryableByTrait(r)||d0.isClockSkewError(r)||d0.isThrottlingError(r)||d0.isTransientError(r)},"defaultRetryDecider"),Xz=Dr((r)=>{if(r instanceof Error)return r;if(r instanceof Object)return Object.assign(new Error,r);if(typeof r==="string")return new Error(r);return new Error(`AWS SDK error wrapper for ${r}`)},"asSdkError"),Kz=class r{constructor(s,f){this.maxAttemptsProvider=s,this.mode=Zr.RETRY_MODES.STANDARD,this.retryDecider=(f==null?void 0:f.retryDecider)??Yz,this.delayDecider=(f==null?void 0:f.delayDecider)??Sz,this.retryQuota=(f==null?void 0:f.retryQuota)??bO(Zr.INITIAL_RETRY_TOKENS)}shouldRetry(s,f,w){return f<w&&this.retryDecider(s)&&this.retryQuota.hasRetryTokens(s)}async getMaxAttempts(){let s;try{s=await this.maxAttemptsProvider()}catch(f){s=Zr.DEFAULT_MAX_ATTEMPTS}return s}async retry(s,f,w){let h,E=0,$=0;const I=await this.getMaxAttempts(),{request:F}=f;if(Ih.HttpRequest.isInstance(F))F.headers[Zr.INVOCATION_ID_HEADER]=zz.v4();while(!0)try{if(Ih.HttpRequest.isInstance(F))F.headers[Zr.REQUEST_HEADER]=`attempt=${E+1}; max=${I}`;if(w==null?void 0:w.beforeRequest)await w.beforeRequest();const{response:U,output:A}=await s(f);if(w==null?void 0:w.afterRequest)w.afterRequest(U);return this.retryQuota.releaseRetryTokens(h),A.$metadata.attempts=E+1,A.$metadata.totalRetryDelay=$,{response:U,output:A}}catch(U){const A=Xz(U);if(E++,this.shouldRetry(A,E,I)){h=this.retryQuota.retrieveRetryTokens(A);const L=this.delayDecider(d0.isThrottlingError(A)?Zr.THROTTLING_RETRY_DELAY_BASE:Zr.DEFAULT_RETRY_DELAY_BASE,E),S=_O(A.$response),z=Math.max(S||0,L);$+=z,await new Promise((Z)=>setTimeout(Z,z));continue}if(!A.$metadata)A.$metadata={};throw A.$metadata.attempts=E,A.$metadata.totalRetryDelay=$,A}}};Dr(Kz,"StandardRetryStrategy");var Zz=Kz,_O=Dr((r)=>{if(!Ih.HttpResponse.isInstance(r))return;const s=Object.keys(r.headers).find((E)=>E.toLowerCase()==="retry-after");if(!s)return;const f=r.headers[s],w=Number(f);if(!Number.isNaN(w))return w*1000;return new Date(f).getTime()-Date.now()},"getDelayFromRetryAfterHeader"),Pz=class r extends Zz{constructor(s,f){const{rateLimiter:w,...h}=f??{};super(s,h);this.rateLimiter=w??new Zr.DefaultRateLimiter,this.mode=Zr.RETRY_MODES.ADAPTIVE}async retry(s,f){return super.retry(s,f,{beforeRequest:async()=>{return this.rateLimiter.getSendToken()},afterRequest:(w)=>{this.rateLimiter.updateClientSendingRate(w)}})}};Dr(Pz,"AdaptiveRetryStrategy");var gO=Pz,Cz=G1(),lF="AWS_MAX_ATTEMPTS",DF="max_attempts",xO={environmentVariableSelector:(r)=>{const s=r[lF];if(!s)return;const f=parseInt(s);if(Number.isNaN(f))throw new Error(`Environment variable ${lF} mast be a number, got "${s}"`);return f},configFileSelector:(r)=>{const s=r[DF];if(!s)return;const f=parseInt(s);if(Number.isNaN(f))throw new Error(`Shared config file entry ${DF} mast be a number, got "${s}"`);return f},default:Zr.DEFAULT_MAX_ATTEMPTS},eO=Dr((r)=>{const{retryStrategy:s}=r,f=Cz.normalizeProvider(r.maxAttempts??Zr.DEFAULT_MAX_ATTEMPTS);return{...r,maxAttempts:f,retryStrategy:async()=>{if(s)return s;if(await Cz.normalizeProvider(r.retryMode)()===Zr.RETRY_MODES.ADAPTIVE)return new Zr.AdaptiveRetryStrategy(f);return new Zr.StandardRetryStrategy(f)}}},"resolveRetryConfig"),Jz="AWS_RETRY_MODE",Qz="retry_mode",nO={environmentVariableSelector:(r)=>r[Jz],configFileSelector:(r)=>r[Qz],default:Zr.DEFAULT_RETRY_MODE},Bz=Dr(()=>(r)=>async(s)=>{const{request:f}=s;if(Ih.HttpRequest.isInstance(f))delete f.headers[Zr.INVOCATION_ID_HEADER],delete f.headers[Zr.REQUEST_HEADER];return r(s)},"omitRetryHeadersMiddleware"),Mz={name:"omitRetryHeadersMiddleware",tags:["RETRY","HEADERS","OMIT_RETRY_HEADERS"],relation:"before",toMiddleware:"awsAuthMiddleware",override:!0},oO=Dr((r)=>({applyToStack:(s)=>{s.addRelativeTo(Bz(),Mz)}}),"getOmitRetryHeadersPlugin"),aO=$h(),pO=Rz(),Vz=Dr((r)=>(s,f)=>async(w)=>{var h;let E=await r.retryStrategy();const $=await r.maxAttempts();if(uO(E)){E=E;let I=await E.acquireInitialRetryToken(f.partition_id),F=new Error,U=0,A=0;const{request:L}=w,S=Ih.HttpRequest.isInstance(L);if(S)L.headers[Zr.INVOCATION_ID_HEADER]=zz.v4();while(!0)try{if(S)L.headers[Zr.REQUEST_HEADER]=`attempt=${U+1}; max=${$}`;const{response:z,output:Z}=await s(w);return E.recordSuccess(I),Z.$metadata.attempts=U+1,Z.$metadata.totalRetryDelay=A,{response:z,output:Z}}catch(z){const Z=tO(z);if(F=Xz(z),S&&pO.isStreamingPayload(L))throw(h=f.logger instanceof aO.NoOpLogger?console:f.logger)==null||h.warn("An error was encountered in a non-retryable streaming request."),F;try{I=await E.refreshRetryTokenForRetry(I,Z)}catch(M){if(!F.$metadata)F.$metadata={};throw F.$metadata.attempts=U+1,F.$metadata.totalRetryDelay=A,F}U=I.getRetryCount();const N=I.getRetryDelay();A+=N,await new Promise((M)=>setTimeout(M,N))}}else{if(E=E,E==null?void 0:E.mode)f.userAgent=[...f.userAgent||[],["cfg/retry-mode",E.mode]];return E.retry(s,w)}},"retryMiddleware"),uO=Dr((r)=>typeof r.acquireInitialRetryToken!=="undefined"&&typeof r.refreshRetryTokenForRetry!=="undefined"&&typeof r.recordSuccess!=="undefined","isRetryStrategyV2"),tO=Dr((r)=>{const s={error:r,errorType:rd(r)},f=lz(r.$response);if(f)s.retryAfterHint=f;return s},"getRetryErrorInfo"),rd=Dr((r)=>{if(d0.isThrottlingError(r))return"THROTTLING";if(d0.isTransientError(r))return"TRANSIENT";if(d0.isServerError(r))return"SERVER_ERROR";return"CLIENT_ERROR"},"getRetryErrorType"),Hz={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0},fd=Dr((r)=>({applyToStack:(s)=>{s.add(Vz(r),Hz)}}),"getRetryPlugin"),lz=Dr((r)=>{if(!Ih.HttpResponse.isInstance(r))return;const s=Object.keys(r.headers).find((E)=>E.toLowerCase()==="retry-after");if(!s)return;const f=r.headers[s],w=Number(f);if(!Number.isNaN(w))return new Date(w*1000);return new Date(f)},"getRetryAfterHint")});var qr=O((Afr,pz)=>{function qz(r){const s=new Map;for(let f of r)s.set(f.schemeId,f);return s}function ez(r,s){return new oz(r,s)}function az(r,s,f,w,h){return zr(async function*E($,I,...F){let U=$.startingToken||void 0,A=!0,L;while(A){if(I[f]=U,h)I[h]=I[h]??$.pageSize;if($.client instanceof r)L=await Qd(s,$.client,I,...F);else throw new Error(`Invalid client, expected instance of ${r.name}`);yield L;const S=U;U=Bd(L,w),A=!!(U&&(!$.stopOnSameToken||U!==S))}return},"paginateOperation")}var{defineProperty:e$,getOwnPropertyDescriptor:sd,getOwnPropertyNames:wd}=Object,hd=Object.prototype.hasOwnProperty,zr=(r,s)=>e$(r,"name",{value:s,configurable:!0}),Ed=(r,s)=>{for(var f in s)e$(r,f,{get:s[f],enumerable:!0})},$d=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of wd(s))if(!hd.call(r,h)&&h!==f)e$(r,h,{get:()=>s[h],enumerable:!(w=sd(s,h))||w.enumerable})}return r},Id=(r)=>$d(e$({},"__esModule",{value:!0}),r),yz={};Ed(yz,{DefaultIdentityProviderConfig:()=>Wd,EXPIRATION_MS:()=>gz,HttpApiKeyAuthSigner:()=>zd,HttpBearerAuthSigner:()=>Sd,NoAuthSigner:()=>Yd,RequestBuilder:()=>oz,createIsIdentityExpiredFunction:()=>_z,createPaginator:()=>az,doesIdentityRequireRefresh:()=>xz,getHttpAuthSchemeEndpointRuleSetPlugin:()=>Ud,getHttpAuthSchemePlugin:()=>Gd,getHttpSigningPlugin:()=>Cd,getSmithyContext:()=>Zd,httpAuthSchemeEndpointRuleSetMiddlewareOptions:()=>mz,httpAuthSchemeMiddleware:()=>kF,httpAuthSchemeMiddlewareOptions:()=>jz,httpSigningMiddleware:()=>vz,httpSigningMiddlewareOptions:()=>iz,isIdentityExpired:()=>Xd,memoizeIdentityProvider:()=>Kd,normalizeProvider:()=>Pd,requestBuilder:()=>ez});pz.exports=Id(yz);var Nz=G1();zr(qz,"convertHttpAuthSchemesToMap");var kF=zr((r,s)=>(f,w)=>async(h)=>{var E;const $=r.httpAuthSchemeProvider(await s.httpAuthSchemeParametersProvider(r,w,h.input)),I=qz(r.httpAuthSchemes),F=Nz.getSmithyContext(w),U=[];for(let A of $){const L=I.get(A.schemeId);if(!L){U.push(`HttpAuthScheme \`${A.schemeId}\` was not enabled for this service.`);continue}const S=L.identityProvider(await s.identityProviderConfigProvider(r));if(!S){U.push(`HttpAuthScheme \`${A.schemeId}\` did not have an IdentityProvider configured.`);continue}const{identityProperties:z={},signingProperties:Z={}}=((E=A.propertiesExtractor)==null?void 0:E.call(A,r,w))||{};A.identityProperties=Object.assign(A.identityProperties||{},z),A.signingProperties=Object.assign(A.signingProperties||{},Z),F.selectedHttpAuthScheme={httpAuthOption:A,identity:await S(A.identityProperties),signer:L.signer};break}if(!F.selectedHttpAuthScheme)throw new Error(U.join("\n"));return f(h)},"httpAuthSchemeMiddleware"),Fd=kL(),mz={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:Fd.endpointMiddlewareOptions.name},Ud=zr((r,{httpAuthSchemeParametersProvider:s,identityProviderConfigProvider:f})=>({applyToStack:(w)=>{w.addRelativeTo(kF(r,{httpAuthSchemeParametersProvider:s,identityProviderConfigProvider:f}),mz)}}),"getHttpAuthSchemeEndpointRuleSetPlugin"),Td=O6(),jz={step:"serialize",tags:["HTTP_AUTH_SCHEME"],name:"httpAuthSchemeMiddleware",override:!0,relation:"before",toMiddleware:Td.serializerMiddlewareOption.name},Gd=zr((r,{httpAuthSchemeParametersProvider:s,identityProviderConfigProvider:f})=>({applyToStack:(w)=>{w.addRelativeTo(kF(r,{httpAuthSchemeParametersProvider:s,identityProviderConfigProvider:f}),jz)}}),"getHttpAuthSchemePlugin"),n$=L0(),Ad=zr((r)=>(s)=>{throw s},"defaultErrorHandler"),Ld=zr((r,s)=>{},"defaultSuccessHandler"),vz=zr((r)=>(s,f)=>async(w)=>{if(!n$.HttpRequest.isInstance(w.request))return s(w);const E=Nz.getSmithyContext(f).selectedHttpAuthScheme;if(!E)throw new Error("No HttpAuthScheme was selected: unable to sign request");const{httpAuthOption:{signingProperties:$={}},identity:I,signer:F}=E,U=await s({...w,request:await F.sign(w.request,I,$)}).catch((F.errorHandler||Ad)($));return(F.successHandler||Ld)(U.response,$),U},"httpSigningMiddleware"),Rd=kz(),iz={step:"finalizeRequest",tags:["HTTP_SIGNING"],name:"httpSigningMiddleware",aliases:["apiKeyMiddleware","tokenMiddleware","awsAuthMiddleware"],override:!0,relation:"after",toMiddleware:Rd.retryMiddlewareOptions.name},Cd=zr((r)=>({applyToStack:(s)=>{s.addRelativeTo(vz(r),iz)}}),"getHttpSigningPlugin"),Oz=class r{constructor(s){this.authSchemes=new Map;for(let[f,w]of Object.entries(s))if(w!==void 0)this.authSchemes.set(f,w)}getIdentityProvider(s){return this.authSchemes.get(s)}};zr(Oz,"DefaultIdentityProviderConfig");var Wd=Oz,x$=Ff(),dz=class r{async sign(s,f,w){if(!w)throw new Error("request could not be signed with `apiKey` since the `name` and `in` signer properties are missing");if(!w.name)throw new Error("request could not be signed with `apiKey` since the `name` signer property is missing");if(!w.in)throw new Error("request could not be signed with `apiKey` since the `in` signer property is missing");if(!f.apiKey)throw new Error("request could not be signed with `apiKey` since the `apiKey` is not defined");const h=n$.HttpRequest.clone(s);if(w.in===x$.HttpApiKeyAuthLocation.QUERY)h.query[w.name]=f.apiKey;else if(w.in===x$.HttpApiKeyAuthLocation.HEADER)h.headers[w.name]=w.scheme?`${w.scheme} ${f.apiKey}`:f.apiKey;else throw new Error("request can only be signed with `apiKey` locations `query` or `header`, but found: `"+w.in+"`");return h}};zr(dz,"HttpApiKeyAuthSigner");var zd=dz,cz=class r{async sign(s,f,w){const h=n$.HttpRequest.clone(s);if(!f.token)throw new Error("request could not be signed with `token` since the `token` is not defined");return h.headers.Authorization=`Bearer ${f.token}`,h}};zr(cz,"HttpBearerAuthSigner");var Sd=cz,bz=class r{async sign(s,f,w){return s}};zr(bz,"NoAuthSigner");var Yd=bz,_z=zr((r)=>(s)=>xz(s)&&s.expiration.getTime()-Date.now()<r,"createIsIdentityExpiredFunction"),gz=300000,Xd=_z(gz),xz=zr((r)=>r.expiration!==void 0,"doesIdentityRequireRefresh"),Kd=zr((r,s,f)=>{if(r===void 0)return;const w=typeof r!=="function"?async()=>Promise.resolve(r):r;let h,E,$,I=!1;const F=zr(async(U)=>{if(!E)E=w(U);try{h=await E,$=!0,I=!1}finally{E=void 0}return h},"coalesceProvider");if(s===void 0)return async(U)=>{if(!$||(U==null?void 0:U.forceRefresh))h=await F(U);return h};return async(U)=>{if(!$||(U==null?void 0:U.forceRefresh))h=await F(U);if(I)return h;if(!f(h))return I=!0,h;if(s(h))return await F(U),h;return h}},"memoizeIdentityProvider"),Zd=zr((r)=>r[x$.SMITHY_CONTEXT_KEY]||(r[x$.SMITHY_CONTEXT_KEY]={}),"getSmithyContext"),Pd=zr((r)=>{if(typeof r==="function")return r;const s=Promise.resolve(r);return()=>s},"normalizeProvider"),Jd=$h();zr(ez,"requestBuilder");var nz=class r{constructor(s,f){this.input=s,this.context=f,this.query={},this.method="",this.headers={},this.path="",this.body=null,this.hostname="",this.resolvePathStack=[]}async build(){const{hostname:s,protocol:f="https",port:w,path:h}=await this.context.endpoint();this.path=h;for(let E of this.resolvePathStack)E(this.path);return new n$.HttpRequest({protocol:f,hostname:this.hostname||s,port:w,method:this.method,path:this.path,query:this.query,body:this.body,headers:this.headers})}hn(s){return this.hostname=s,this}bp(s){return this.resolvePathStack.push((f)=>{this.path=`${(f==null?void 0:f.endsWith("/"))?f.slice(0,-1):f||""}`+s}),this}p(s,f,w,h){return this.resolvePathStack.push((E)=>{this.path=Jd.resolvedPath(E,this.input,s,f,w,h)}),this}h(s){return this.headers=s,this}q(s){return this.query=s,this}b(s){return this.body=s,this}m(s){return this.method=s,this}};zr(nz,"RequestBuilder");var oz=nz,Qd=zr(async(r,s,f,...w)=>{return await s.send(new r(f),...w)},"makePagedClientRequest");zr(az,"createPaginator");var Bd=zr((r,s)=>{let f=r;const w=s.split(".");for(let h of w){if(!f||typeof f!=="object")return;f=f[h]}return f},"get")});function Md(r){if(r===void 0)return!0;return typeof r==="string"&&r.length<=50}function Ms(r){const s=uz.normalizeProvider(r.userAgentAppId??yF);return{...r,customUserAgent:typeof r.customUserAgent==="string"?[[r.customUserAgent]]:r.customUserAgent,userAgentAppId:async()=>{const f=await s();if(!Md(f)){const w=r.logger?.constructor?.name==="NoOpLogger"||!r.logger?console:r.logger;if(typeof f!=="string")w?.warn("userAgentAppId must be a string or undefined.");else if(f.length>50)w?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.")}return f}}}var uz,yF=void 0;var tz=G(()=>{uz=m(qr(),1)});class fs{constructor({size:r,params:s}){if(this.data=new Map,this.parameters=[],this.capacity=r??50,s)this.parameters=s}get(r,s){const f=this.hash(r);if(f===!1)return s();if(!this.data.has(f)){if(this.data.size>this.capacity+10){const w=this.data.keys();let h=0;while(!0){const{value:E,done:$}=w.next();if(this.data.delete(E),$||++h>10)break}}this.data.set(f,s())}return this.data.get(f)}size(){return this.data.size}hash(r){let s="";const{parameters:f}=this;if(f.length===0)return!1;for(let w of f){const h=String(r[w]??"");if(h.includes("|;"))return!1;s+=h+"|;"}return s}}var Vd,M1=(r)=>Vd.test(r)||r.startsWith("[")&&r.endsWith("]");var NF=G(()=>{Vd=new RegExp("^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$")});var Hd,V1=(r,s=!1)=>{if(!s)return Hd.test(r);const f=r.split(".");for(let w of f)if(!V1(w))return!1;return!0};var qF=G(()=>{Hd=new RegExp("^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$")});var ur;var o$=G(()=>{ur={}});var W0="endpoints";function Bf(r){if(typeof r!=="object"||r==null)return r;if("ref"in r)return`\$${Bf(r.ref)}`;if("fn"in r)return`${r.fn}(${(r.argv||[]).map(Bf).join(", ")})`;return JSON.stringify(r,null,2)}var H1=()=>{};var Wr;var rS=G(()=>{Wr=class Wr extends Error{constructor(r){super(r);this.name="EndpointError"}}});var fS=()=>{};var sS=()=>{};var wS=()=>{};var hS=()=>{};var ES=()=>{};var $S=()=>{};var Mf=G(()=>{rS();fS();sS();wS();hS();ES();$S()});var IS=(r,s)=>r===s;var FS=(r)=>{const s=r.split("."),f=[];for(let w of s){const h=w.indexOf("[");if(h!==-1){if(w.indexOf("]")!==w.length-1)throw new Wr(`Path: '${r}' does not end with ']'`);const E=w.slice(h+1,-1);if(Number.isNaN(parseInt(E)))throw new Wr(`Invalid array index: '${E}' in path: '${r}'`);if(h!==0)f.push(w.slice(0,h));f.push(E)}else f.push(w)}return f};var US=G(()=>{Mf()});var a$=(r,s)=>FS(s).reduce((f,w)=>{if(typeof f!=="object")throw new Wr(`Index '${w}' in '${s}' not found in '${JSON.stringify(r)}'`);else if(Array.isArray(f))return f[parseInt(w)];return f[w]},r);var TS=G(()=>{Mf();US()});var GS=(r)=>r!=null;var AS=(r)=>!r;var p$,mF,LS=(r)=>{const s=(()=>{try{if(r instanceof URL)return r;if(typeof r==="object"&&"hostname"in r){const{hostname:S,port:z,protocol:Z="",path:N="",query:M={}}=r,l=new URL(`${Z}//${S}${z?`:${z}`:""}${N}`);return l.search=Object.entries(M).map(([k,i])=>`${k}=${i}`).join("&"),l}return new URL(r)}catch(S){return null}})();if(!s)return console.error(`Unable to parse ${JSON.stringify(r)} as a whatwg URL.`),null;const f=s.href,{host:w,hostname:h,pathname:E,protocol:$,search:I}=s;if(I)return null;const F=$.slice(0,-1);if(!Object.values(p$.EndpointURLScheme).includes(F))return null;const U=M1(h),A=f.includes(`${w}:${mF[F]}`)||typeof r==="string"&&r.includes(`${w}:${mF[F]}`),L=`${w}${A?`:${mF[F]}`:""}`;return{scheme:F,authority:L,path:E,normalizedPath:E.endsWith("/")?E:`${E}/`,isIp:U}};var RS=G(()=>{p$=m(Ff(),1);NF();mF={[p$.EndpointURLScheme.HTTP]:80,[p$.EndpointURLScheme.HTTPS]:443}});var CS=(r,s)=>r===s;var WS=(r,s,f,w)=>{if(s>=f||r.length<f)return null;if(!w)return r.substring(s,f);return r.substring(r.length-f,r.length-s)};var zS=(r)=>encodeURIComponent(r).replace(/[!*'()]/g,(s)=>`%${s.charCodeAt(0).toString(16).toUpperCase()}`);var jF=G(()=>{TS();qF();RS()});var SS;var YS=G(()=>{jF();SS={booleanEquals:IS,getAttr:a$,isSet:GS,isValidHostLabel:V1,not:AS,parseURL:LS,stringEquals:CS,substring:WS,uriEncode:zS}});var u$=(r,s)=>{const f=[],w={...s.endpointParams,...s.referenceRecord};let h=0;while(h<r.length){const E=r.indexOf("{",h);if(E===-1){f.push(r.slice(h));break}f.push(r.slice(h,E));const $=r.indexOf("}",E);if($===-1){f.push(r.slice(E));break}if(r[E+1]==="{"&&r[$+1]==="}")f.push(r.slice(E+1,$)),h=$+2;const I=r.substring(E+1,$);if(I.includes("#")){const[F,U]=I.split("#");f.push(a$(w[F],U))}else f.push(w[I]);h=$+1}return f.join("")};var vF=G(()=>{jF()});var XS=({ref:r},s)=>{return{...s.endpointParams,...s.referenceRecord}[r]};var c0=(r,s,f)=>{if(typeof r==="string")return u$(r,f);else if(r.fn)return t$(r,f);else if(r.ref)return XS(r,f);throw new Wr(`'${s}': ${String(r)} is not a string, function or reference.`)};var l1=G(()=>{Mf();iF();vF()});var t$=({fn:r,argv:s},f)=>{const w=s.map((E)=>["boolean","number"].includes(typeof E)?E:c0(E,"arg",f)),h=r.split(".");if(h[0]in ur&&h[1]!=null)return ur[h[0]][h[1]](...w);return SS[r](...w)};var iF=G(()=>{o$();YS();l1()});var KS=({assign:r,...s},f)=>{if(r&&r in f.referenceRecord)throw new Wr(`'${r}' is already defined in Reference Record.`);const w=t$(s,f);return f.logger?.debug?.(`${W0} evaluateCondition: ${Bf(s)} = ${Bf(w)}`),{result:w===""?!0:!!w,...r!=null&&{toAssign:{name:r,value:w}}}};var ZS=G(()=>{H1();Mf();iF()});var Fh=(r=[],s)=>{const f={};for(let w of r){const{result:h,toAssign:E}=KS(w,{...s,referenceRecord:{...s.referenceRecord,...f}});if(!h)return{result:h};if(E)f[E.name]=E.value,s.logger?.debug?.(`${W0} assign: ${E.name} := ${Bf(E.value)}`)}return{result:!0,referenceRecord:f}};var r3=G(()=>{H1();ZS()});var PS=(r,s)=>Object.entries(r).reduce((f,[w,h])=>({...f,[w]:h.map((E)=>{const $=c0(E,"Header value entry",s);if(typeof $!=="string")throw new Wr(`Header '${w}' value '${$}' is not a string`);return $})}),{});var JS=G(()=>{Mf();l1()});var OF=(r,s)=>{if(Array.isArray(r))return r.map((f)=>OF(f,s));switch(typeof r){case"string":return u$(r,s);case"object":if(r===null)throw new Wr(`Unexpected endpoint property: ${r}`);return f3(r,s);case"boolean":return r;default:throw new Wr(`Unexpected endpoint property type: ${typeof r}`)}};var QS=G(()=>{Mf();vF();dF()});var f3=(r,s)=>Object.entries(r).reduce((f,[w,h])=>({...f,[w]:OF(h,s)}),{});var dF=G(()=>{QS()});var BS=(r,s)=>{const f=c0(r,"Endpoint URL",s);if(typeof f==="string")try{return new URL(f)}catch(w){throw console.error(`Failed to construct URL with ${f}`,w),w}throw new Wr(`Endpoint URL must be a string, got ${typeof f}`)};var MS=G(()=>{Mf();l1()});var VS=(r,s)=>{const{conditions:f,endpoint:w}=r,{result:h,referenceRecord:E}=Fh(f,s);if(!h)return;const $={...s,referenceRecord:{...s.referenceRecord,...E}},{url:I,properties:F,headers:U}=w;return s.logger?.debug?.(`${W0} Resolving endpoint from template: ${Bf(w)}`),{...U!=null&&{headers:PS(U,$)},...F!=null&&{properties:f3(F,$)},url:BS(I,$)}};var HS=G(()=>{H1();r3();JS();dF();MS()});var lS=(r,s)=>{const{conditions:f,error:w}=r,{result:h,referenceRecord:E}=Fh(f,s);if(!h)return;throw new Wr(c0(w,"Error",{...s,referenceRecord:{...s.referenceRecord,...E}}))};var DS=G(()=>{Mf();r3();l1()});var kS=(r,s)=>{const{conditions:f,rules:w}=r,{result:h,referenceRecord:E}=Fh(f,s);if(!h)return;return s3(w,{...s,referenceRecord:{...s.referenceRecord,...E}})};var yS=G(()=>{r3();cF()});var s3=(r,s)=>{for(let f of r)if(f.type==="endpoint"){const w=VS(f,s);if(w)return w}else if(f.type==="error")lS(f,s);else if(f.type==="tree"){const w=kS(f,s);if(w)return w}else throw new Wr(`Unknown endpoint rule: ${f}`);throw new Wr("Rules evaluation failed")};var cF=G(()=>{Mf();HS();DS();yS()});var NS=G(()=>{o$();cF()});var ss=(r,s)=>{const{endpointParams:f,logger:w}=s,{parameters:h,rules:E}=r;s.logger?.debug?.(`${W0} Initial EndpointParams: ${Bf(f)}`);const $=Object.entries(h).filter(([,U])=>U.default!=null).map(([U,A])=>[U,A.default]);if($.length>0)for(let[U,A]of $)f[U]=f[U]??A;const I=Object.entries(h).filter(([,U])=>U.required).map(([U])=>U);for(let U of I)if(f[U]==null)throw new Wr(`Missing required parameter: '${U}'`);const F=s3(E,{endpointParams:f,logger:w,referenceRecord:{}});return s.logger?.debug?.(`${W0} Resolved endpoint: ${Bf(F)}`),F};var qS=G(()=>{H1();Mf();NS()});var ws=G(()=>{NF();qF();o$();qS();Mf()});var bF=G(()=>{ws()});var _F=(r,s=!1)=>{if(s){for(let f of r.split("."))if(!_F(f))return!1;return!0}if(!V1(r))return!1;if(r.length<3||r.length>63)return!1;if(r!==r.toLowerCase())return!1;if(M1(r))return!1;return!0};var mS=G(()=>{ws();bF()});var jS=(r)=>{const s=r.split(":");if(s.length<6)return null;const[f,w,h,E,$,...I]=s;if(f!=="arn"||w===""||h===""||I.join(":")==="")return null;const F=I.map((U)=>U.split("/")).flat();return{partition:w,service:h,region:E,accountId:$,resourceId:F}};var iS;var vS=G(()=>{iS={partitions:[{id:"aws",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-east-1",name:"aws",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",regions:{"af-south-1":{description:"Africa (Cape Town)"},"ap-east-1":{description:"Asia Pacific (Hong Kong)"},"ap-northeast-1":{description:"Asia Pacific (Tokyo)"},"ap-northeast-2":{description:"Asia Pacific (Seoul)"},"ap-northeast-3":{description:"Asia Pacific (Osaka)"},"ap-south-1":{description:"Asia Pacific (Mumbai)"},"ap-south-2":{description:"Asia Pacific (Hyderabad)"},"ap-southeast-1":{description:"Asia Pacific (Singapore)"},"ap-southeast-2":{description:"Asia Pacific (Sydney)"},"ap-southeast-3":{description:"Asia Pacific (Jakarta)"},"ap-southeast-4":{description:"Asia Pacific (Melbourne)"},"ap-southeast-5":{description:"Asia Pacific (Malaysia)"},"aws-global":{description:"AWS Standard global region"},"ca-central-1":{description:"Canada (Central)"},"ca-west-1":{description:"Canada West (Calgary)"},"eu-central-1":{description:"Europe (Frankfurt)"},"eu-central-2":{description:"Europe (Zurich)"},"eu-north-1":{description:"Europe (Stockholm)"},"eu-south-1":{description:"Europe (Milan)"},"eu-south-2":{description:"Europe (Spain)"},"eu-west-1":{description:"Europe (Ireland)"},"eu-west-2":{description:"Europe (London)"},"eu-west-3":{description:"Europe (Paris)"},"il-central-1":{description:"Israel (Tel Aviv)"},"me-central-1":{description:"Middle East (UAE)"},"me-south-1":{description:"Middle East (Bahrain)"},"sa-east-1":{description:"South America (Sao Paulo)"},"us-east-1":{description:"US East (N. Virginia)"},"us-east-2":{description:"US East (Ohio)"},"us-west-1":{description:"US West (N. California)"},"us-west-2":{description:"US West (Oregon)"}}},{id:"aws-cn",outputs:{dnsSuffix:"amazonaws.com.cn",dualStackDnsSuffix:"api.amazonwebservices.com.cn",implicitGlobalRegion:"cn-northwest-1",name:"aws-cn",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^cn\\-\\w+\\-\\d+$",regions:{"aws-cn-global":{description:"AWS China global region"},"cn-north-1":{description:"China (Beijing)"},"cn-northwest-1":{description:"China (Ningxia)"}}},{id:"aws-us-gov",outputs:{dnsSuffix:"amazonaws.com",dualStackDnsSuffix:"api.aws",implicitGlobalRegion:"us-gov-west-1",name:"aws-us-gov",supportsDualStack:!0,supportsFIPS:!0},regionRegex:"^us\\-gov\\-\\w+\\-\\d+$",regions:{"aws-us-gov-global":{description:"AWS GovCloud (US) global region"},"us-gov-east-1":{description:"AWS GovCloud (US-East)"},"us-gov-west-1":{description:"AWS GovCloud (US-West)"}}},{id:"aws-iso",outputs:{dnsSuffix:"c2s.ic.gov",dualStackDnsSuffix:"c2s.ic.gov",implicitGlobalRegion:"us-iso-east-1",name:"aws-iso",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-iso\\-\\w+\\-\\d+$",regions:{"aws-iso-global":{description:"AWS ISO (US) global region"},"us-iso-east-1":{description:"US ISO East"},"us-iso-west-1":{description:"US ISO WEST"}}},{id:"aws-iso-b",outputs:{dnsSuffix:"sc2s.sgov.gov",dualStackDnsSuffix:"sc2s.sgov.gov",implicitGlobalRegion:"us-isob-east-1",name:"aws-iso-b",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isob\\-\\w+\\-\\d+$",regions:{"aws-iso-b-global":{description:"AWS ISOB (US) global region"},"us-isob-east-1":{description:"US ISOB East (Ohio)"}}},{id:"aws-iso-e",outputs:{dnsSuffix:"cloud.adc-e.uk",dualStackDnsSuffix:"cloud.adc-e.uk",implicitGlobalRegion:"eu-isoe-west-1",name:"aws-iso-e",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^eu\\-isoe\\-\\w+\\-\\d+$",regions:{"eu-isoe-west-1":{description:"EU ISOE West"}}},{id:"aws-iso-f",outputs:{dnsSuffix:"csp.hci.ic.gov",dualStackDnsSuffix:"csp.hci.ic.gov",implicitGlobalRegion:"us-isof-south-1",name:"aws-iso-f",supportsDualStack:!1,supportsFIPS:!0},regionRegex:"^us\\-isof\\-\\w+\\-\\d+$",regions:{}}],version:"1.1"}});var Dd,kd="",OS=(r)=>{const{partitions:s}=Dd;for(let w of s){const{regions:h,outputs:E}=w;for(let[$,I]of Object.entries(h))if($===r)return{...E,...I}}for(let w of s){const{regionRegex:h,outputs:E}=w;if(new RegExp(h).test(r))return{...E}}const f=s.find((w)=>w.id==="aws");if(!f)throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");return{...f.outputs}},dS=()=>kd;var gF=G(()=>{vS();Dd=iS});var hs;var cS=G(()=>{ws();mS();gF();hs={isVirtualHostableS3Bucket:_F,parseArn:jS,partition:OS};ur.aws=hs});var bS=G(()=>{ws()});var _S=G(()=>{ws()});var gS=()=>{};var xS=()=>{};var eS=()=>{};var nS=()=>{};var oS=()=>{};var aS=G(()=>{_S();gS();xS();eS();nS();oS()});var Pw=G(()=>{cS();gF();bF();bS();aS()});var J7=O((b0r,E3)=>{var pS,uS,tS,r7,f7,s7,w7,h7,E7,$7,I7,F7,U7,w3,xF,T7,G7,A7,Uh,L7,R7,C7,W7,z7,S7,Y7,X7,K7,h3,Z7,P7;(function(r){var s=typeof global==="object"?global:typeof self==="object"?self:typeof this==="object"?this:{};if(typeof define==="function"&&define.amd)define("tslib",["exports"],function(w){r(f(s,f(w)))});else if(typeof E3==="object"&&typeof b0r==="object")r(f(s,f(b0r)));else r(f(s));function f(w,h){if(w!==s)if(typeof Object.create==="function")Object.defineProperty(w,"__esModule",{value:!0});else w.__esModule=!0;return function(E,$){return w[E]=h?h(E,$):$}}})(function(r){var s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,E){h.__proto__=E}||function(h,E){for(var $ in E)if(Object.prototype.hasOwnProperty.call(E,$))h[$]=E[$]};pS=function(h,E){if(typeof E!=="function"&&E!==null)throw new TypeError("Class extends value "+String(E)+" is not a constructor or null");s(h,E);function $(){this.constructor=h}h.prototype=E===null?Object.create(E):($.prototype=E.prototype,new $)},uS=Object.assign||function(h){for(var E,$=1,I=arguments.length;$<I;$++){E=arguments[$];for(var F in E)if(Object.prototype.hasOwnProperty.call(E,F))h[F]=E[F]}return h},tS=function(h,E){var $={};for(var I in h)if(Object.prototype.hasOwnProperty.call(h,I)&&E.indexOf(I)<0)$[I]=h[I];if(h!=null&&typeof Object.getOwnPropertySymbols==="function"){for(var F=0,I=Object.getOwnPropertySymbols(h);F<I.length;F++)if(E.indexOf(I[F])<0&&Object.prototype.propertyIsEnumerable.call(h,I[F]))$[I[F]]=h[I[F]]}return $},r7=function(h,E,$,I){var F=arguments.length,U=F<3?E:I===null?I=Object.getOwnPropertyDescriptor(E,$):I,A;if(typeof Reflect==="object"&&typeof Reflect.decorate==="function")U=Reflect.decorate(h,E,$,I);else for(var L=h.length-1;L>=0;L--)if(A=h[L])U=(F<3?A(U):F>3?A(E,$,U):A(E,$))||U;return F>3&&U&&Object.defineProperty(E,$,U),U},f7=function(h,E){return function($,I){E($,I,h)}},s7=function(h,E,$,I,F,U){function A(sr){if(sr!==void 0&&typeof sr!=="function")throw new TypeError("Function expected");return sr}var L=I.kind,S=L==="getter"?"get":L==="setter"?"set":"value",z=!E&&h?I.static?h:h.prototype:null,Z=E||(z?Object.getOwnPropertyDescriptor(z,I.name):{}),N,M=!1;for(var l=$.length-1;l>=0;l--){var k={};for(var i in I)k[i]=i==="access"?{}:I[i];for(var i in I.access)k.access[i]=I.access[i];k.addInitializer=function(sr){if(M)throw new TypeError("Cannot add initializers after decoration has completed");U.push(A(sr||null))};var e=$[l](L==="accessor"?{get:Z.get,set:Z.set}:Z[S],k);if(L==="accessor"){if(e===void 0)continue;if(e===null||typeof e!=="object")throw new TypeError("Object expected");if(N=A(e.get))Z.get=N;if(N=A(e.set))Z.set=N;if(N=A(e.init))F.unshift(N)}else if(N=A(e))if(L==="field")F.unshift(N);else Z[S]=N}if(z)Object.defineProperty(z,I.name,Z);M=!0},w7=function(h,E,$){var I=arguments.length>2;for(var F=0;F<E.length;F++)$=I?E[F].call(h,$):E[F].call(h);return I?$:void 0},h7=function(h){return typeof h==="symbol"?h:"".concat(h)},E7=function(h,E,$){if(typeof E==="symbol")E=E.description?"[".concat(E.description,"]"):"";return Object.defineProperty(h,"name",{configurable:!0,value:$?"".concat($," ",E):E})},$7=function(h,E){if(typeof Reflect==="object"&&typeof Reflect.metadata==="function")return Reflect.metadata(h,E)},I7=function(h,E,$,I){function F(U){return U instanceof $?U:new $(function(A){A(U)})}return new($||($=Promise))(function(U,A){function L(Z){try{z(I.next(Z))}catch(N){A(N)}}function S(Z){try{z(I.throw(Z))}catch(N){A(N)}}function z(Z){Z.done?U(Z.value):F(Z.value).then(L,S)}z((I=I.apply(h,E||[])).next())})},F7=function(h,E){var $={label:0,sent:function(){if(U[0]&1)throw U[1];return U[1]},trys:[],ops:[]},I,F,U,A=Object.create((typeof Iterator==="function"?Iterator:Object).prototype);return A.next=L(0),A.throw=L(1),A.return=L(2),typeof Symbol==="function"&&(A[Symbol.iterator]=function(){return this}),A;function L(z){return function(Z){return S([z,Z])}}function S(z){if(I)throw new TypeError("Generator is already executing.");while(A&&(A=0,z[0]&&($=0)),$)try{if(I=1,F&&(U=z[0]&2?F.return:z[0]?F.throw||((U=F.return)&&U.call(F),0):F.next)&&!(U=U.call(F,z[1])).done)return U;if(F=0,U)z=[z[0]&2,U.value];switch(z[0]){case 0:case 1:U=z;break;case 4:return $.label++,{value:z[1],done:!1};case 5:$.label++,F=z[1],z=[0];continue;case 7:z=$.ops.pop(),$.trys.pop();continue;default:if((U=$.trys,!(U=U.length>0&&U[U.length-1]))&&(z[0]===6||z[0]===2)){$=0;continue}if(z[0]===3&&(!U||z[1]>U[0]&&z[1]<U[3])){$.label=z[1];break}if(z[0]===6&&$.label<U[1]){$.label=U[1],U=z;break}if(U&&$.label<U[2]){$.label=U[2],$.ops.push(z);break}if(U[2])$.ops.pop();$.trys.pop();continue}z=E.call(h,$)}catch(Z){z=[6,Z],F=0}finally{I=U=0}if(z[0]&5)throw z[1];return{value:z[0]?z[1]:void 0,done:!0}}},U7=function(h,E){for(var $ in h)if($!=="default"&&!Object.prototype.hasOwnProperty.call(E,$))h3(E,h,$)},h3=Object.create?function(h,E,$,I){if(I===void 0)I=$;var F=Object.getOwnPropertyDescriptor(E,$);if(!F||("get"in F?!E.__esModule:F.writable||F.configurable))F={enumerable:!0,get:function(){return E[$]}};Object.defineProperty(h,I,F)}:function(h,E,$,I){if(I===void 0)I=$;h[I]=E[$]},w3=function(h){var E=typeof Symbol==="function"&&Symbol.iterator,$=E&&h[E],I=0;if($)return $.call(h);if(h&&typeof h.length==="number")return{next:function(){if(h&&I>=h.length)h=void 0;return{value:h&&h[I++],done:!h}}};throw new TypeError(E?"Object is not iterable.":"Symbol.iterator is not defined.")},xF=function(h,E){var $=typeof Symbol==="function"&&h[Symbol.iterator];if(!$)return h;var I=$.call(h),F,U=[],A;try{while((E===void 0||E-- >0)&&!(F=I.next()).done)U.push(F.value)}catch(L){A={error:L}}finally{try{if(F&&!F.done&&($=I.return))$.call(I)}finally{if(A)throw A.error}}return U},T7=function(){for(var h=[],E=0;E<arguments.length;E++)h=h.concat(xF(arguments[E]));return h},G7=function(){for(var h=0,E=0,$=arguments.length;E<$;E++)h+=arguments[E].length;for(var I=Array(h),F=0,E=0;E<$;E++)for(var U=arguments[E],A=0,L=U.length;A<L;A++,F++)I[F]=U[A];return I},A7=function(h,E,$){if($||arguments.length===2){for(var I=0,F=E.length,U;I<F;I++)if(U||!(I in E)){if(!U)U=Array.prototype.slice.call(E,0,I);U[I]=E[I]}}return h.concat(U||Array.prototype.slice.call(E))},Uh=function(h){return this instanceof Uh?(this.v=h,this):new Uh(h)},L7=function(h,E,$){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var I=$.apply(h,E||[]),F,U=[];return F=Object.create((typeof AsyncIterator==="function"?AsyncIterator:Object).prototype),L("next"),L("throw"),L("return",A),F[Symbol.asyncIterator]=function(){return this},F;function A(l){return function(k){return Promise.resolve(k).then(l,N)}}function L(l,k){if(I[l]){if(F[l]=function(i){return new Promise(function(e,sr){U.push([l,i,e,sr])>1||S(l,i)})},k)F[l]=k(F[l])}}function S(l,k){try{z(I[l](k))}catch(i){M(U[0][3],i)}}function z(l){l.value instanceof Uh?Promise.resolve(l.value.v).then(Z,N):M(U[0][2],l)}function Z(l){S("next",l)}function N(l){S("throw",l)}function M(l,k){if(l(k),U.shift(),U.length)S(U[0][0],U[0][1])}},R7=function(h){var E,$;return E={},I("next"),I("throw",function(F){throw F}),I("return"),E[Symbol.iterator]=function(){return this},E;function I(F,U){E[F]=h[F]?function(A){return($=!$)?{value:Uh(h[F](A)),done:!1}:U?U(A):A}:U}},C7=function(h){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var E=h[Symbol.asyncIterator],$;return E?E.call(h):(h=typeof w3==="function"?w3(h):h[Symbol.iterator](),$={},I("next"),I("throw"),I("return"),$[Symbol.asyncIterator]=function(){return this},$);function I(U){$[U]=h[U]&&function(A){return new Promise(function(L,S){A=h[U](A),F(L,S,A.done,A.value)})}}function F(U,A,L,S){Promise.resolve(S).then(function(z){U({value:z,done:L})},A)}},W7=function(h,E){if(Object.defineProperty)Object.defineProperty(h,"raw",{value:E});else h.raw=E;return h};var f=Object.create?function(h,E){Object.defineProperty(h,"default",{enumerable:!0,value:E})}:function(h,E){h.default=E};z7=function(h){if(h&&h.__esModule)return h;var E={};if(h!=null){for(var $ in h)if($!=="default"&&Object.prototype.hasOwnProperty.call(h,$))h3(E,h,$)}return f(E,h),E},S7=function(h){return h&&h.__esModule?h:{default:h}},Y7=function(h,E,$,I){if($==="a"&&!I)throw new TypeError("Private accessor was defined without a getter");if(typeof E==="function"?h!==E||!I:!E.has(h))throw new TypeError("Cannot read private member from an object whose class did not declare it");return $==="m"?I:$==="a"?I.call(h):I?I.value:E.get(h)},X7=function(h,E,$,I,F){if(I==="m")throw new TypeError("Private method is not writable");if(I==="a"&&!F)throw new TypeError("Private accessor was defined without a setter");if(typeof E==="function"?h!==E||!F:!E.has(h))throw new TypeError("Cannot write private member to an object whose class did not declare it");return I==="a"?F.call(h,$):F?F.value=$:E.set(h,$),$},K7=function(h,E){if(E===null||typeof E!=="object"&&typeof E!=="function")throw new TypeError("Cannot use 'in' operator on non-object");return typeof h==="function"?E===h:h.has(E)},Z7=function(h,E,$){if(E!==null&&E!==void 0){if(typeof E!=="object"&&typeof E!=="function")throw new TypeError("Object expected.");var I,F;if($){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");I=E[Symbol.asyncDispose]}if(I===void 0){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");if(I=E[Symbol.dispose],$)F=I}if(typeof I!=="function")throw new TypeError("Object not disposable.");if(F)I=function(){try{F.call(this)}catch(U){return Promise.reject(U)}};h.stack.push({value:E,dispose:I,async:$})}else if($)h.stack.push({async:!0});return E};var w=typeof SuppressedError==="function"?SuppressedError:function(h,E,$){var I=new Error($);return I.name="SuppressedError",I.error=h,I.suppressed=E,I};P7=function(h){function E(U){h.error=h.hasError?new w(U,h.error,"An error was suppressed during disposal."):U,h.hasError=!0}var $,I=0;function F(){while($=h.stack.pop())try{if(!$.async&&I===1)return I=0,h.stack.push($),Promise.resolve().then(F);if($.dispose){var U=$.dispose.call($.value);if($.async)return I|=2,Promise.resolve(U).then(F,function(A){return E(A),F()})}else I|=1}catch(A){E(A)}if(I===1)return h.hasError?Promise.reject(h.error):Promise.resolve();if(h.hasError)throw h.error}return F()},r("__extends",pS),r("__assign",uS),r("__rest",tS),r("__decorate",r7),r("__param",f7),r("__esDecorate",s7),r("__runInitializers",w7),r("__propKey",h7),r("__setFunctionName",E7),r("__metadata",$7),r("__awaiter",I7),r("__generator",F7),r("__exportStar",U7),r("__createBinding",h3),r("__values",w3),r("__read",xF),r("__spread",T7),r("__spreadArrays",G7),r("__spreadArray",A7),r("__await",Uh),r("__asyncGenerator",L7),r("__asyncDelegator",R7),r("__asyncValues",C7),r("__makeTemplateObject",W7),r("__importStar",z7),r("__importDefault",S7),r("__classPrivateFieldGet",Y7),r("__classPrivateFieldSet",X7),r("__classPrivateFieldIn",K7),r("__addDisposableResource",Z7),r("__disposeResources",P7)})});var tr=O((_0r,H7)=>{function M7(r,s,f){if(!r.$source)r.$source={};return r.$source[s]=f,r}function V7(r,s,f){if(!r.__aws_sdk_context)r.__aws_sdk_context={features:{}};else if(!r.__aws_sdk_context.features)r.__aws_sdk_context.features={};r.__aws_sdk_context.features[s]=f}var{defineProperty:$3,getOwnPropertyDescriptor:yd,getOwnPropertyNames:Nd}=Object,qd=Object.prototype.hasOwnProperty,eF=(r,s)=>$3(r,"name",{value:s,configurable:!0}),md=(r,s)=>{for(var f in s)$3(r,f,{get:s[f],enumerable:!0})},jd=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of Nd(s))if(!qd.call(r,h)&&h!==f)$3(r,h,{get:()=>s[h],enumerable:!(w=yd(s,h))||w.enumerable})}return r},vd=(r)=>jd($3({},"__esModule",{value:!0}),r),B7={};md(B7,{emitWarningIfUnsupportedVersion:()=>id,setCredentialFeature:()=>M7,setFeature:()=>V7});H7.exports=vd(B7);var Q7=!1,id=eF((r)=>{if(r&&!Q7&&parseInt(r.substring(1,r.indexOf(".")))<18)Q7=!0,process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will
7
5
  no longer support Node.js 16.x on January 6, 2025.
8
6
 
9
7
  To continue receiving updates to AWS services, bug fixes, and security
10
8
  updates please upgrade to a supported Node.js LTS version.
11
9
 
12
- More information can be found at: https://a.co/74kJMmI`)},"emitWarningIfUnsupportedVersion")});var BK=v((T2r,MK)=>{function m5(r){for(let f=0;f<8;f++)r[f]^=255;for(let f=7;f>-1;f--)if(r[f]++,r[f]!==0)break}var{defineProperty:V3,getOwnPropertyDescriptor:Sc,getOwnPropertyNames:Pc}=Object,Xc=Object.prototype.hasOwnProperty,mr=(r,f)=>V3(r,"name",{value:f,configurable:!0}),Yc=(r,f)=>{for(var s in f)V3(r,s,{get:f[s],enumerable:!0})},Kc=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of Pc(f))if(!Xc.call(r,h)&&h!==s)V3(r,h,{get:()=>f[h],enumerable:!(w=Sc(f,h))||w.enumerable})}return r},Zc=(r)=>Kc(V3({},"__esModule",{value:!0}),r),CK={};Yc(CK,{SignatureV4:()=>oc,clearCredentialCache:()=>dc,createScope:()=>l3,getCanonicalHeaders:()=>N5,getCanonicalQuery:()=>XK,getPayloadHash:()=>H3,getSigningKey:()=>PK,moveHeadersToQuery:()=>JK,prepareRequest:()=>i5});MK.exports=Zc(CK);var FK=T1(),D5=m0(),Jc="X-Amz-Algorithm",Qc="X-Amz-Credential",LK="X-Amz-Date",Mc="X-Amz-SignedHeaders",Bc="X-Amz-Expires",AK="X-Amz-Signature",WK="X-Amz-Security-Token",RK="authorization",zK=LK.toLowerCase(),lc="date",Hc=[RK,zK,lc],Vc=AK.toLowerCase(),y5="x-amz-content-sha256",Dc=WK.toLowerCase(),kc={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},yc=/^proxy-/,Nc=/^sec-/,k5="AWS4-HMAC-SHA256",mc="AWS4-HMAC-SHA256-PAYLOAD",ic="UNSIGNED-PAYLOAD",qc=50,SK="aws4_request",vc=604800,b0=_E(),jc=m0(),Rh={},B3=[],l3=mr((r,f,s)=>`${r}/${f}/${s}/${SK}`,"createScope"),PK=mr(async(r,f,s,w,h)=>{const $=await UK(r,f.secretAccessKey,f.accessKeyId),E=`${s}:${w}:${h}:${b0.toHex($)}:${f.sessionToken}`;if(E in Rh)return Rh[E];B3.push(E);while(B3.length>qc)delete Rh[B3.shift()];let I=`AWS4${f.secretAccessKey}`;for(let F of[s,w,h,SK])I=await UK(r,I,F);return Rh[E]=I},"getSigningKey"),dc=mr(()=>{B3.length=0,Object.keys(Rh).forEach((r)=>{delete Rh[r]})},"clearCredentialCache"),UK=mr((r,f,s)=>{const w=new r(f);return w.update(jc.toUint8Array(s)),w.digest()},"hmac"),N5=mr(({headers:r},f,s)=>{const w={};for(let h of Object.keys(r).sort()){if(r[h]==null)continue;const $=h.toLowerCase();if($ in kc||(f==null?void 0:f.has($))||yc.test($)||Nc.test($)){if(!s||s&&!s.has($))continue}w[$]=r[h].trim().replace(/\s+/g," ")}return w},"getCanonicalHeaders"),k1=zU(),XK=mr(({query:r={}})=>{const f=[],s={};for(let w of Object.keys(r).sort()){if(w.toLowerCase()===Vc)continue;f.push(w);const h=r[w];if(typeof h==="string")s[w]=`${k1.escapeUri(w)}=${k1.escapeUri(h)}`;else if(Array.isArray(h))s[w]=h.slice(0).reduce(($,E)=>$.concat([`${k1.escapeUri(w)}=${k1.escapeUri(E)}`]),[]).sort().join("&")}return f.map((w)=>s[w]).filter((w)=>w).join("&")},"getCanonicalQuery"),Oc=GU(),cc=m0(),H3=mr(async({headers:r,body:f},s)=>{for(let w of Object.keys(r))if(w.toLowerCase()===y5)return r[w];if(f==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";else if(typeof f==="string"||ArrayBuffer.isView(f)||Oc.isArrayBuffer(f)){const w=new s;return w.update(cc.toUint8Array(f)),b0.toHex(await w.digest())}return ic},"getPayloadHash"),TK=m0(),YK=class r{format(f){const s=[];for(let $ of Object.keys(f)){const E=TK.fromUtf8($);s.push(Uint8Array.from([E.byteLength]),E,this.formatHeaderValue(f[$]))}const w=new Uint8Array(s.reduce(($,E)=>$+E.byteLength,0));let h=0;for(let $ of s)w.set($,h),h+=$.byteLength;return w}formatHeaderValue(f){switch(f.type){case"boolean":return Uint8Array.from([f.value?0:1]);case"byte":return Uint8Array.from([2,f.value]);case"short":const s=new DataView(new ArrayBuffer(3));return s.setUint8(0,3),s.setInt16(1,f.value,!1),new Uint8Array(s.buffer);case"integer":const w=new DataView(new ArrayBuffer(5));return w.setUint8(0,4),w.setInt32(1,f.value,!1),new Uint8Array(w.buffer);case"long":const h=new Uint8Array(9);return h[0]=5,h.set(f.value.bytes,1),h;case"binary":const $=new DataView(new ArrayBuffer(3+f.value.byteLength));$.setUint8(0,6),$.setUint16(1,f.value.byteLength,!1);const E=new Uint8Array($.buffer);return E.set(f.value,3),E;case"string":const I=TK.fromUtf8(f.value),F=new DataView(new ArrayBuffer(3+I.byteLength));F.setUint8(0,7),F.setUint16(1,I.byteLength,!1);const U=new Uint8Array(F.buffer);return U.set(I,3),U;case"timestamp":const C=new Uint8Array(9);return C[0]=8,C.set(_c.fromNumber(f.value.valueOf()).bytes,1),C;case"uuid":if(!gc.test(f.value))throw new Error(`Invalid UUID received: ${f.value}`);const L=new Uint8Array(17);return L[0]=9,L.set(b0.fromHex(f.value.replace(/\-/g,"")),1),L}}};mr(YK,"HeaderFormatter");var bc=YK,gc=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,KK=class r{constructor(f){if(this.bytes=f,f.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(f){if(f>9223372036854776000||f<-9223372036854776000)throw new Error(`${f} is too large (or, if negative, too small) to represent as an Int64`);const s=new Uint8Array(8);for(let w=7,h=Math.abs(Math.round(f));w>-1&&h>0;w--,h/=256)s[w]=h;if(f<0)m5(s);return new r(s)}valueOf(){const f=this.bytes.slice(0),s=f[0]&128;if(s)m5(f);return parseInt(b0.toHex(f),16)*(s?-1:1)}toString(){return String(this.valueOf())}};mr(KK,"Int64");var _c=KK;mr(m5,"negate");var xc=mr((r,f)=>{r=r.toLowerCase();for(let s of Object.keys(f))if(r===s.toLowerCase())return!0;return!1},"hasHeader"),ZK=F0(),JK=mr((r,f={})=>{var s;const{headers:w,query:h={}}=ZK.HttpRequest.clone(r);for(let $ of Object.keys(w)){const E=$.toLowerCase();if(E.slice(0,6)==="x-amz-"&&!((s=f.unhoistableHeaders)==null?void 0:s.has(E)))h[$]=w[$],delete w[$]}return{...r,headers:w,query:h}},"moveHeadersToQuery"),i5=mr((r)=>{r=ZK.HttpRequest.clone(r);for(let f of Object.keys(r.headers))if(Hc.indexOf(f.toLowerCase())>-1)delete r.headers[f];return r},"prepareRequest"),ec=mr((r)=>nc(r).toISOString().replace(/\.\d{3}Z$/,"Z"),"iso8601"),nc=mr((r)=>{if(typeof r==="number")return new Date(r*1000);if(typeof r==="string"){if(Number(r))return new Date(Number(r)*1000);return new Date(r)}return r},"toDate"),QK=class r{constructor({applyChecksum:f,credentials:s,region:w,service:h,sha256:$,uriEscapePath:E=!0}){this.headerFormatter=new bc,this.service=h,this.sha256=$,this.uriEscapePath=E,this.applyChecksum=typeof f==="boolean"?f:!0,this.regionProvider=FK.normalizeProvider(w),this.credentialProvider=FK.normalizeProvider(s)}async presign(f,s={}){const{signingDate:w=new Date,expiresIn:h=3600,unsignableHeaders:$,unhoistableHeaders:E,signableHeaders:I,signingRegion:F,signingService:U}=s,C=await this.credentialProvider();this.validateResolvedCredentials(C);const L=F??await this.regionProvider(),{longDate:z,shortDate:S}=M3(w);if(h>vc)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const Z=l3(S,L,U??this.service),k=JK(i5(f),{unhoistableHeaders:E});if(C.sessionToken)k.query[WK]=C.sessionToken;k.query[Jc]=k5,k.query[Qc]=`${C.accessKeyId}/${Z}`,k.query[LK]=z,k.query[Bc]=h.toString(10);const l=N5(k,$,I);return k.query[Mc]=GK(l),k.query[AK]=await this.getSignature(z,Z,this.getSigningKey(C,L,S,U),this.createCanonicalRequest(k,l,await H3(f,this.sha256))),k}async sign(f,s){if(typeof f==="string")return this.signString(f,s);else if(f.headers&&f.payload)return this.signEvent(f,s);else if(f.message)return this.signMessage(f,s);else return this.signRequest(f,s)}async signEvent({headers:f,payload:s},{signingDate:w=new Date,priorSignature:h,signingRegion:$,signingService:E}){const I=$??await this.regionProvider(),{shortDate:F,longDate:U}=M3(w),C=l3(F,I,E??this.service),L=await H3({headers:{},body:s},this.sha256),z=new this.sha256;z.update(f);const S=b0.toHex(await z.digest()),Z=[mc,U,C,h,S,L].join("\n");return this.signString(Z,{signingDate:w,signingRegion:I,signingService:E})}async signMessage(f,{signingDate:s=new Date,signingRegion:w,signingService:h}){return this.signEvent({headers:this.headerFormatter.format(f.message.headers),payload:f.message.body},{signingDate:s,signingRegion:w,signingService:h,priorSignature:f.priorSignature}).then((E)=>{return{message:f.message,signature:E}})}async signString(f,{signingDate:s=new Date,signingRegion:w,signingService:h}={}){const $=await this.credentialProvider();this.validateResolvedCredentials($);const E=w??await this.regionProvider(),{shortDate:I}=M3(s),F=new this.sha256(await this.getSigningKey($,E,I,h));return F.update(D5.toUint8Array(f)),b0.toHex(await F.digest())}async signRequest(f,{signingDate:s=new Date,signableHeaders:w,unsignableHeaders:h,signingRegion:$,signingService:E}={}){const I=await this.credentialProvider();this.validateResolvedCredentials(I);const F=$??await this.regionProvider(),U=i5(f),{longDate:C,shortDate:L}=M3(s),z=l3(L,F,E??this.service);if(U.headers[zK]=C,I.sessionToken)U.headers[Dc]=I.sessionToken;const S=await H3(U,this.sha256);if(!xc(y5,U.headers)&&this.applyChecksum)U.headers[y5]=S;const Z=N5(U,h,w),k=await this.getSignature(C,z,this.getSigningKey(I,F,L,E),this.createCanonicalRequest(U,Z,S));return U.headers[RK]=`${k5} Credential=${I.accessKeyId}/${z}, SignedHeaders=${GK(Z)}, Signature=${k}`,U}createCanonicalRequest(f,s,w){const h=Object.keys(s).sort();return`${f.method}
13
- ${this.getCanonicalPath(f)}
14
- ${XK(f)}
15
- ${h.map(($)=>`${$}:${s[$]}`).join("\n")}
10
+ More information can be found at: https://a.co/74kJMmI`)},"emitWarningIfUnsupportedVersion");eF(M7,"setCredentialFeature");eF(V7,"setFeature")});var o7=O((g0r,n7)=>{function uF(r){for(let s=0;s<8;s++)r[s]^=255;for(let s=7;s>-1;s--)if(r[s]++,r[s]!==0)break}var{defineProperty:A3,getOwnPropertyDescriptor:Od,getOwnPropertyNames:dd}=Object,cd=Object.prototype.hasOwnProperty,mr=(r,s)=>A3(r,"name",{value:s,configurable:!0}),bd=(r,s)=>{for(var f in s)A3(r,f,{get:s[f],enumerable:!0})},_d=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of dd(s))if(!cd.call(r,h)&&h!==f)A3(r,h,{get:()=>s[h],enumerable:!(w=Od(s,h))||w.enumerable})}return r},gd=(r)=>_d(A3({},"__esModule",{value:!0}),r),N7={};bd(N7,{SignatureV4:()=>zc,clearCredentialCache:()=>Fc,createScope:()=>U3,getCanonicalHeaders:()=>pF,getCanonicalQuery:()=>c7,getPayloadHash:()=>G3,getSigningKey:()=>d7,moveHeadersToQuery:()=>x7,prepareRequest:()=>tF});n7.exports=gd(N7);var l7=G1(),nF=O0(),xd="X-Amz-Algorithm",ed="X-Amz-Credential",q7="X-Amz-Date",nd="X-Amz-SignedHeaders",od="X-Amz-Expires",m7="X-Amz-Signature",j7="X-Amz-Security-Token",v7="authorization",i7=q7.toLowerCase(),ad="date",pd=[v7,i7,ad],ud=m7.toLowerCase(),aF="x-amz-content-sha256",td=j7.toLowerCase(),rc={authorization:!0,"cache-control":!0,connection:!0,expect:!0,from:!0,"keep-alive":!0,"max-forwards":!0,pragma:!0,referer:!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0,"user-agent":!0,"x-amzn-trace-id":!0},fc=/^proxy-/,sc=/^sec-/,oF="AWS4-HMAC-SHA256",wc="AWS4-HMAC-SHA256-PAYLOAD",hc="UNSIGNED-PAYLOAD",Ec=50,O7="aws4_request",$c=604800,b0=i$(),Ic=O0(),Th={},F3=[],U3=mr((r,s,f)=>`${r}/${s}/${f}/${O7}`,"createScope"),d7=mr(async(r,s,f,w,h)=>{const E=await D7(r,s.secretAccessKey,s.accessKeyId),$=`${f}:${w}:${h}:${b0.toHex(E)}:${s.sessionToken}`;if($ in Th)return Th[$];F3.push($);while(F3.length>Ec)delete Th[F3.shift()];let I=`AWS4${s.secretAccessKey}`;for(let F of[f,w,h,O7])I=await D7(r,I,F);return Th[$]=I},"getSigningKey"),Fc=mr(()=>{F3.length=0,Object.keys(Th).forEach((r)=>{delete Th[r]})},"clearCredentialCache"),D7=mr((r,s,f)=>{const w=new r(s);return w.update(Ic.toUint8Array(f)),w.digest()},"hmac"),pF=mr(({headers:r},s,f)=>{const w={};for(let h of Object.keys(r).sort()){if(r[h]==null)continue;const E=h.toLowerCase();if(E in rc||(s==null?void 0:s.has(E))||fc.test(E)||sc.test(E)){if(!f||f&&!f.has(E))continue}w[E]=r[h].trim().replace(/\s+/g," ")}return w},"getCanonicalHeaders"),T3=IF(),c7=mr(({query:r={}})=>{const s=[],f={};for(let w of Object.keys(r)){if(w.toLowerCase()===ud)continue;const h=T3.escapeUri(w);s.push(h);const E=r[w];if(typeof E==="string")f[h]=`${h}=${T3.escapeUri(E)}`;else if(Array.isArray(E))f[h]=E.slice(0).reduce(($,I)=>$.concat([`${h}=${T3.escapeUri(I)}`]),[]).sort().join("&")}return s.sort().map((w)=>f[w]).filter((w)=>w).join("&")},"getCanonicalQuery"),Uc=fF(),Tc=O0(),G3=mr(async({headers:r,body:s},f)=>{for(let w of Object.keys(r))if(w.toLowerCase()===aF)return r[w];if(s==null)return"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";else if(typeof s==="string"||ArrayBuffer.isView(s)||Uc.isArrayBuffer(s)){const w=new f;return w.update(Tc.toUint8Array(s)),b0.toHex(await w.digest())}return hc},"getPayloadHash"),k7=O0(),b7=class r{format(s){const f=[];for(let E of Object.keys(s)){const $=k7.fromUtf8(E);f.push(Uint8Array.from([$.byteLength]),$,this.formatHeaderValue(s[E]))}const w=new Uint8Array(f.reduce((E,$)=>E+$.byteLength,0));let h=0;for(let E of f)w.set(E,h),h+=E.byteLength;return w}formatHeaderValue(s){switch(s.type){case"boolean":return Uint8Array.from([s.value?0:1]);case"byte":return Uint8Array.from([2,s.value]);case"short":const f=new DataView(new ArrayBuffer(3));return f.setUint8(0,3),f.setInt16(1,s.value,!1),new Uint8Array(f.buffer);case"integer":const w=new DataView(new ArrayBuffer(5));return w.setUint8(0,4),w.setInt32(1,s.value,!1),new Uint8Array(w.buffer);case"long":const h=new Uint8Array(9);return h[0]=5,h.set(s.value.bytes,1),h;case"binary":const E=new DataView(new ArrayBuffer(3+s.value.byteLength));E.setUint8(0,6),E.setUint16(1,s.value.byteLength,!1);const $=new Uint8Array(E.buffer);return $.set(s.value,3),$;case"string":const I=k7.fromUtf8(s.value),F=new DataView(new ArrayBuffer(3+I.byteLength));F.setUint8(0,7),F.setUint16(1,I.byteLength,!1);const U=new Uint8Array(F.buffer);return U.set(I,3),U;case"timestamp":const A=new Uint8Array(9);return A[0]=8,A.set(Lc.fromNumber(s.value.valueOf()).bytes,1),A;case"uuid":if(!Ac.test(s.value))throw new Error(`Invalid UUID received: ${s.value}`);const L=new Uint8Array(17);return L[0]=9,L.set(b0.fromHex(s.value.replace(/\-/g,"")),1),L}}};mr(b7,"HeaderFormatter");var Gc=b7,Ac=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/,_7=class r{constructor(s){if(this.bytes=s,s.byteLength!==8)throw new Error("Int64 buffers must be exactly 8 bytes")}static fromNumber(s){if(s>9223372036854776000||s<-9223372036854776000)throw new Error(`${s} is too large (or, if negative, too small) to represent as an Int64`);const f=new Uint8Array(8);for(let w=7,h=Math.abs(Math.round(s));w>-1&&h>0;w--,h/=256)f[w]=h;if(s<0)uF(f);return new r(f)}valueOf(){const s=this.bytes.slice(0),f=s[0]&128;if(f)uF(s);return parseInt(b0.toHex(s),16)*(f?-1:1)}toString(){return String(this.valueOf())}};mr(_7,"Int64");var Lc=_7;mr(uF,"negate");var Rc=mr((r,s)=>{r=r.toLowerCase();for(let f of Object.keys(s))if(r===f.toLowerCase())return!0;return!1},"hasHeader"),g7=L0(),x7=mr((r,s={})=>{var f,w;const{headers:h,query:E={}}=g7.HttpRequest.clone(r);for(let $ of Object.keys(h)){const I=$.toLowerCase();if(I.slice(0,6)==="x-amz-"&&!((f=s.unhoistableHeaders)==null?void 0:f.has(I))||((w=s.hoistableHeaders)==null?void 0:w.has(I)))E[$]=h[$],delete h[$]}return{...r,headers:h,query:E}},"moveHeadersToQuery"),tF=mr((r)=>{r=g7.HttpRequest.clone(r);for(let s of Object.keys(r.headers))if(pd.indexOf(s.toLowerCase())>-1)delete r.headers[s];return r},"prepareRequest"),Cc=mr((r)=>Wc(r).toISOString().replace(/\.\d{3}Z$/,"Z"),"iso8601"),Wc=mr((r)=>{if(typeof r==="number")return new Date(r*1000);if(typeof r==="string"){if(Number(r))return new Date(Number(r)*1000);return new Date(r)}return r},"toDate"),e7=class r{constructor({applyChecksum:s,credentials:f,region:w,service:h,sha256:E,uriEscapePath:$=!0}){this.headerFormatter=new Gc,this.service=h,this.sha256=E,this.uriEscapePath=$,this.applyChecksum=typeof s==="boolean"?s:!0,this.regionProvider=l7.normalizeProvider(w),this.credentialProvider=l7.normalizeProvider(f)}async presign(s,f={}){const{signingDate:w=new Date,expiresIn:h=3600,unsignableHeaders:E,unhoistableHeaders:$,signableHeaders:I,hoistableHeaders:F,signingRegion:U,signingService:A}=f,L=await this.credentialProvider();this.validateResolvedCredentials(L);const S=U??await this.regionProvider(),{longDate:z,shortDate:Z}=I3(w);if(h>$c)return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");const N=U3(Z,S,A??this.service),M=x7(tF(s),{unhoistableHeaders:$,hoistableHeaders:F});if(L.sessionToken)M.query[j7]=L.sessionToken;M.query[xd]=oF,M.query[ed]=`${L.accessKeyId}/${N}`,M.query[q7]=z,M.query[od]=h.toString(10);const l=pF(M,E,I);return M.query[nd]=y7(l),M.query[m7]=await this.getSignature(z,N,this.getSigningKey(L,S,Z,A),this.createCanonicalRequest(M,l,await G3(s,this.sha256))),M}async sign(s,f){if(typeof s==="string")return this.signString(s,f);else if(s.headers&&s.payload)return this.signEvent(s,f);else if(s.message)return this.signMessage(s,f);else return this.signRequest(s,f)}async signEvent({headers:s,payload:f},{signingDate:w=new Date,priorSignature:h,signingRegion:E,signingService:$}){const I=E??await this.regionProvider(),{shortDate:F,longDate:U}=I3(w),A=U3(F,I,$??this.service),L=await G3({headers:{},body:f},this.sha256),S=new this.sha256;S.update(s);const z=b0.toHex(await S.digest()),Z=[wc,U,A,h,z,L].join("\n");return this.signString(Z,{signingDate:w,signingRegion:I,signingService:$})}async signMessage(s,{signingDate:f=new Date,signingRegion:w,signingService:h}){return this.signEvent({headers:this.headerFormatter.format(s.message.headers),payload:s.message.body},{signingDate:f,signingRegion:w,signingService:h,priorSignature:s.priorSignature}).then(($)=>{return{message:s.message,signature:$}})}async signString(s,{signingDate:f=new Date,signingRegion:w,signingService:h}={}){const E=await this.credentialProvider();this.validateResolvedCredentials(E);const $=w??await this.regionProvider(),{shortDate:I}=I3(f),F=new this.sha256(await this.getSigningKey(E,$,I,h));return F.update(nF.toUint8Array(s)),b0.toHex(await F.digest())}async signRequest(s,{signingDate:f=new Date,signableHeaders:w,unsignableHeaders:h,signingRegion:E,signingService:$}={}){const I=await this.credentialProvider();this.validateResolvedCredentials(I);const F=E??await this.regionProvider(),U=tF(s),{longDate:A,shortDate:L}=I3(f),S=U3(L,F,$??this.service);if(U.headers[i7]=A,I.sessionToken)U.headers[td]=I.sessionToken;const z=await G3(U,this.sha256);if(!Rc(aF,U.headers)&&this.applyChecksum)U.headers[aF]=z;const Z=pF(U,h,w),N=await this.getSignature(A,S,this.getSigningKey(I,F,L,$),this.createCanonicalRequest(U,Z,z));return U.headers[v7]=`${oF} Credential=${I.accessKeyId}/${S}, SignedHeaders=${y7(Z)}, Signature=${N}`,U}createCanonicalRequest(s,f,w){const h=Object.keys(f).sort();return`${s.method}
11
+ ${this.getCanonicalPath(s)}
12
+ ${c7(s)}
13
+ ${h.map((E)=>`${E}:${f[E]}`).join("\n")}
16
14
 
17
15
  ${h.join(";")}
18
- ${w}`}async createStringToSign(f,s,w){const h=new this.sha256;h.update(D5.toUint8Array(w));const $=await h.digest();return`${k5}
19
- ${f}
16
+ ${w}`}async createStringToSign(s,f,w){const h=new this.sha256;h.update(nF.toUint8Array(w));const E=await h.digest();return`${oF}
20
17
  ${s}
21
- ${b0.toHex($)}`}getCanonicalPath({path:f}){if(this.uriEscapePath){const s=[];for(let $ of f.split("/")){if(($==null?void 0:$.length)===0)continue;if($===".")continue;if($==="..")s.pop();else s.push($)}const w=`${(f==null?void 0:f.startsWith("/"))?"/":""}${s.join("/")}${s.length>0&&(f==null?void 0:f.endsWith("/"))?"/":""}`;return k1.escapeUri(w).replace(/%2F/g,"/")}return f}async getSignature(f,s,w,h){const $=await this.createStringToSign(f,s,h),E=new this.sha256(await w);return E.update(D5.toUint8Array($)),b0.toHex(await E.digest())}getSigningKey(f,s,w,h){return PK(this.sha256,f,w,s,h||this.service)}validateResolvedCredentials(f){if(typeof f!=="object"||typeof f.accessKeyId!=="string"||typeof f.secretAccessKey!=="string")throw new Error("Resolved credential object is not valid")}};mr(QK,"SignatureV4");var oc=QK,M3=mr((r)=>{const f=ec(r).replace(/[\-:]/g,"");return{longDate:f,shortDate:f.slice(0,8)}},"formatDate"),GK=mr((r)=>Object.keys(r).sort().join(";"),"getCanonicalHeaderList")});var qK=v((G2r,iK)=>{var{defineProperty:D3,getOwnPropertyDescriptor:ac,getOwnPropertyNames:pc}=Object,uc=Object.prototype.hasOwnProperty,Rs=(r,f)=>D3(r,"name",{value:f,configurable:!0}),tc=(r,f)=>{for(var s in f)D3(r,s,{get:f[s],enumerable:!0})},rb=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of pc(f))if(!uc.call(r,h)&&h!==s)D3(r,h,{get:()=>f[h],enumerable:!(w=ac(f,h))||w.enumerable})}return r},sb=(r)=>rb(D3({},"__esModule",{value:!0}),r),kK={};tc(kK,{AWSSDKSigV4Signer:()=>$b,AwsSdkSigV4ASigner:()=>Ib,AwsSdkSigV4Signer:()=>j5,NODE_SIGV4A_CONFIG_OPTIONS:()=>Tb,resolveAWSSDKSigV4Config:()=>Gb,resolveAwsSdkSigV4AConfig:()=>Ub,resolveAwsSdkSigV4Config:()=>mK,validateSigningProperties:()=>v5});iK.exports=sb(kK);var fb=F0(),wb=F0(),lK=Rs((r)=>{var f,s;return wb.HttpResponse.isInstance(r)?((f=r.headers)==null?void 0:f.date)??((s=r.headers)==null?void 0:s.Date):void 0},"getDateHeader"),q5=Rs((r)=>new Date(Date.now()+r),"getSkewCorrectedDate"),hb=Rs((r,f)=>Math.abs(q5(f).getTime()-r)>=300000,"isClockSkewed"),HK=Rs((r,f)=>{const s=Date.parse(r);if(hb(s,f))return s-Date.now();return f},"getUpdatedSystemClockOffset"),y1=Rs((r,f)=>{if(!f)throw new Error(`Property \`${r}\` is not resolved for AWS SDK SigV4Auth`);return f},"throwSigningPropertyError"),v5=Rs(async(r)=>{var f,s,w;const h=y1("context",r.context),$=y1("config",r.config),E=(w=(s=(f=h.endpointV2)==null?void 0:f.properties)==null?void 0:s.authSchemes)==null?void 0:w[0],F=await y1("signer",$.signer)(E),U=r==null?void 0:r.signingRegion,C=r==null?void 0:r.signingRegionSet,L=r==null?void 0:r.signingName;return{config:$,signer:F,signingRegion:U,signingRegionSet:C,signingName:L}},"validateSigningProperties"),yK=class r{async sign(f,s,w){var h;if(!fb.HttpRequest.isInstance(f))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const $=await v5(w),{config:E,signer:I}=$;let{signingRegion:F,signingName:U}=$;const C=w.context;if(((h=C==null?void 0:C.authSchemes)==null?void 0:h.length)??0>1){const[z,S]=C.authSchemes;if((z==null?void 0:z.name)==="sigv4a"&&(S==null?void 0:S.name)==="sigv4")F=(S==null?void 0:S.signingRegion)??F,U=(S==null?void 0:S.signingName)??U}return await I.sign(f,{signingDate:q5(E.systemClockOffset),signingRegion:F,signingService:U})}errorHandler(f){return(s)=>{const w=s.ServerTime??lK(s.$response);if(w){const h=y1("config",f.config),$=h.systemClockOffset;if(h.systemClockOffset=HK(w,h.systemClockOffset),h.systemClockOffset!==$&&s.$metadata)s.$metadata.clockSkewCorrected=!0}throw s}}successHandler(f,s){const w=lK(f);if(w){const h=y1("config",s.config);h.systemClockOffset=HK(w,h.systemClockOffset)}}};Rs(yK,"AwsSdkSigV4Signer");var j5=yK,$b=j5,Eb=F0(),NK=class r extends j5{async sign(f,s,w){var h;if(!Eb.HttpRequest.isInstance(f))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const{config:$,signer:E,signingRegion:I,signingRegionSet:F,signingName:U}=await v5(w),L=(await((h=$.sigv4aSigningRegionSet)==null?void 0:h.call($))??F??[I]).join(",");return await E.sign(f,{signingDate:q5($.systemClockOffset),signingRegion:L,signingService:U})}};Rs(NK,"AwsSdkSigV4ASigner");var Ib=NK,Fb=dr(),VK=Cr(),Ub=Rs((r)=>{return r.sigv4aSigningRegionSet=Fb.normalizeProvider(r.sigv4aSigningRegionSet),r},"resolveAwsSdkSigV4AConfig"),Tb={environmentVariableSelector(r){if(r.AWS_SIGV4A_SIGNING_REGION_SET)return r.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map((f)=>f.trim());throw new VK.ProviderError("AWS_SIGV4A_SIGNING_REGION_SET not set in env.",{tryNextLink:!0})},configFileSelector(r){if(r.sigv4a_signing_region_set)return(r.sigv4a_signing_region_set??"").split(",").map((f)=>f.trim());throw new VK.ProviderError("sigv4a_signing_region_set not set in profile.",{tryNextLink:!0})},default:void 0},Mw=dr(),DK=BK(),mK=Rs((r)=>{let f;if(r.credentials)f=Mw.memoizeIdentityProvider(r.credentials,Mw.isIdentityExpired,Mw.doesIdentityRequireRefresh);if(!f)if(r.credentialDefaultProvider)f=Mw.normalizeProvider(r.credentialDefaultProvider(Object.assign({},r,{parentClientConfig:r})));else f=Rs(async()=>{throw new Error("`credentials` is missing")},"normalizedCreds");const{signingEscapePath:s=!0,systemClockOffset:w=r.systemClockOffset||0,sha256:h}=r;let $;if(r.signer)$=Mw.normalizeProvider(r.signer);else if(r.regionInfoProvider)$=Rs(()=>Mw.normalizeProvider(r.region)().then(async(E)=>[await r.regionInfoProvider(E,{useFipsEndpoint:await r.useFipsEndpoint(),useDualstackEndpoint:await r.useDualstackEndpoint()})||{},E]).then(([E,I])=>{const{signingRegion:F,signingService:U}=E;r.signingRegion=r.signingRegion||F||I,r.signingName=r.signingName||U||r.serviceId;const C={...r,credentials:f,region:r.signingRegion,service:r.signingName,sha256:h,uriEscapePath:s};return new(r.signerConstructor||DK.SignatureV4)(C)}),"signer");else $=Rs(async(E)=>{E=Object.assign({},{name:"sigv4",signingName:r.signingName||r.defaultSigningName,signingRegion:await Mw.normalizeProvider(r.region)(),properties:{}},E);const{signingRegion:I,signingName:F}=E;r.signingRegion=r.signingRegion||I,r.signingName=r.signingName||F||r.serviceId;const U={...r,credentials:f,region:r.signingRegion,service:r.signingName,sha256:h,uriEscapePath:s};return new(r.signerConstructor||DK.SignatureV4)(U)},"signer");return{...r,systemClockOffset:w,signingEscapePath:s,credentials:f,signer:$}},"resolveAwsSdkSigV4Config"),Gb=mK});var k3=v((Rb)=>{var Cb=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",vK="[:A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]["+Cb+"]*",Lb=new RegExp("^"+vK+"$"),Ab=function(r,f){const s=[];let w=f.exec(r);while(w){const h=[];h.startIndex=f.lastIndex-w[0].length;const $=w.length;for(let E=0;E<$;E++)h.push(w[E]);s.push(h),w=f.exec(r)}return s},Wb=function(r){const f=Lb.exec(r);return!(f===null||typeof f==="undefined")};Rb.isExist=function(r){return typeof r!=="undefined"};Rb.isEmptyObject=function(r){return Object.keys(r).length===0};Rb.merge=function(r,f,s){if(f){const w=Object.keys(f),h=w.length;for(let $=0;$<h;$++)if(s==="strict")r[w[$]]=[f[w[$]]];else r[w[$]]=f[w[$]]}};Rb.getValue=function(r){if(Rb.isExist(r))return r;else return""};Rb.isName=Wb;Rb.getAllMatches=Ab;Rb.nameRegexp=vK});var O5=v((kb)=>{function dK(r){return r===" "||r==="\t"||r==="\n"||r==="\r"}function OK(r,f){const s=f;for(;f<r.length;f++)if(r[f]=="?"||r[f]==" "){const w=r.substr(s,f-s);if(f>5&&w==="xml")return Mr("InvalidXml","XML declaration allowed only at the start of the document.",tr(r,f));else if(r[f]=="?"&&r[f+1]==">"){f++;break}else continue}return f}function cK(r,f){if(r.length>f+5&&r[f+1]==="-"&&r[f+2]==="-"){for(f+=3;f<r.length;f++)if(r[f]==="-"&&r[f+1]==="-"&&r[f+2]===">"){f+=2;break}}else if(r.length>f+8&&r[f+1]==="D"&&r[f+2]==="O"&&r[f+3]==="C"&&r[f+4]==="T"&&r[f+5]==="Y"&&r[f+6]==="P"&&r[f+7]==="E"){let s=1;for(f+=8;f<r.length;f++)if(r[f]==="<")s++;else if(r[f]===">"){if(s--,s===0)break}}else if(r.length>f+9&&r[f+1]==="["&&r[f+2]==="C"&&r[f+3]==="D"&&r[f+4]==="A"&&r[f+5]==="T"&&r[f+6]==="A"&&r[f+7]==="["){for(f+=8;f<r.length;f++)if(r[f]==="]"&&r[f+1]==="]"&&r[f+2]===">"){f+=2;break}}return f}function Mb(r,f){let s="",w="",h=!1;for(;f<r.length;f++){if(r[f]===Jb||r[f]===Qb)if(w==="")w=r[f];else if(w!==r[f]);else w="";else if(r[f]===">"){if(w===""){h=!0;break}}s+=r[f]}if(w!=="")return!1;return{value:s,index:f,tagClosed:h}}function bK(r,f){const s=d5.getAllMatches(r,Bb),w={};for(let h=0;h<s.length;h++){if(s[h][1].length===0)return Mr("InvalidAttr","Attribute '"+s[h][2]+"' has no space in starting.",N1(s[h]));else if(s[h][3]!==void 0&&s[h][4]===void 0)return Mr("InvalidAttr","Attribute '"+s[h][2]+"' is without value.",N1(s[h]));else if(s[h][3]===void 0&&!f.allowBooleanAttributes)return Mr("InvalidAttr","boolean attribute '"+s[h][2]+"' is not allowed.",N1(s[h]));const $=s[h][2];if(!Vb($))return Mr("InvalidAttr","Attribute '"+$+"' is an invalid name.",N1(s[h]));if(!w.hasOwnProperty($))w[$]=1;else return Mr("InvalidAttr","Attribute '"+$+"' is repeated.",N1(s[h]))}return!0}function lb(r,f){let s=/\d/;if(r[f]==="x")f++,s=/[\da-fA-F]/;for(;f<r.length;f++){if(r[f]===";")return f;if(!r[f].match(s))break}return-1}function Hb(r,f){if(f++,r[f]===";")return-1;if(r[f]==="#")return f++,lb(r,f);let s=0;for(;f<r.length;f++,s++){if(r[f].match(/\w/)&&s<20)continue;if(r[f]===";")break;return-1}return f}function Mr(r,f,s){return{err:{code:r,msg:f,line:s.line||s,col:s.col}}}function Vb(r){return d5.isName(r)}function Db(r){return d5.isName(r)}function tr(r,f){const s=r.substring(0,f).split(/\r?\n/);return{line:s.length,col:s[s.length-1].length+1}}function N1(r){return r.startIndex+r[1].length}var d5=k3(),Zb={allowBooleanAttributes:!1,unpairedTags:[]};kb.validate=function(r,f){f=Object.assign({},Zb,f);const s=[];let w=!1,h=!1;if(r[0]==="\uFEFF")r=r.substr(1);for(let $=0;$<r.length;$++)if(r[$]==="<"&&r[$+1]==="?"){if($+=2,$=OK(r,$),$.err)return $}else if(r[$]==="<"){let E=$;if($++,r[$]==="!"){$=cK(r,$);continue}else{let I=!1;if(r[$]==="/")I=!0,$++;let F="";for(;$<r.length&&r[$]!==">"&&r[$]!==" "&&r[$]!=="\t"&&r[$]!=="\n"&&r[$]!=="\r";$++)F+=r[$];if(F=F.trim(),F[F.length-1]==="/")F=F.substring(0,F.length-1),$--;if(!Db(F)){let L;if(F.trim().length===0)L="Invalid space after '<'.";else L="Tag '"+F+"' is an invalid name.";return Mr("InvalidTag",L,tr(r,$))}const U=Mb(r,$);if(U===!1)return Mr("InvalidAttr","Attributes for '"+F+"' have open quote.",tr(r,$));let C=U.value;if($=U.index,C[C.length-1]==="/"){const L=$-C.length;C=C.substring(0,C.length-1);const z=bK(C,f);if(z===!0)w=!0;else return Mr(z.err.code,z.err.msg,tr(r,L+z.err.line))}else if(I)if(!U.tagClosed)return Mr("InvalidTag","Closing tag '"+F+"' doesn't have proper closing.",tr(r,$));else if(C.trim().length>0)return Mr("InvalidTag","Closing tag '"+F+"' can't have attributes or invalid starting.",tr(r,E));else if(s.length===0)return Mr("InvalidTag","Closing tag '"+F+"' has not been opened.",tr(r,E));else{const L=s.pop();if(F!==L.tagName){let z=tr(r,L.tagStartPos);return Mr("InvalidTag","Expected closing tag '"+L.tagName+"' (opened in line "+z.line+", col "+z.col+") instead of closing tag '"+F+"'.",tr(r,E))}if(s.length==0)h=!0}else{const L=bK(C,f);if(L!==!0)return Mr(L.err.code,L.err.msg,tr(r,$-C.length+L.err.line));if(h===!0)return Mr("InvalidXml","Multiple possible root nodes found.",tr(r,$));else if(f.unpairedTags.indexOf(F)!==-1);else s.push({tagName:F,tagStartPos:E});w=!0}for($++;$<r.length;$++)if(r[$]==="<")if(r[$+1]==="!"){$++,$=cK(r,$);continue}else if(r[$+1]==="?"){if($=OK(r,++$),$.err)return $}else break;else if(r[$]==="&"){const L=Hb(r,$);if(L==-1)return Mr("InvalidChar","char '&' is not expected.",tr(r,$));$=L}else if(h===!0&&!dK(r[$]))return Mr("InvalidXml","Extra text at the end",tr(r,$));if(r[$]==="<")$--}}else{if(dK(r[$]))continue;return Mr("InvalidChar","char '"+r[$]+"' is not expected.",tr(r,$))}if(!w)return Mr("InvalidXml","Start tag expected.",1);else if(s.length==1)return Mr("InvalidTag","Unclosed tag '"+s[0].tagName+"'.",tr(r,s[0].tagStartPos));else if(s.length>0)return Mr("InvalidXml","Invalid '"+JSON.stringify(s.map(($)=>$.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1});return!0};var Jb='"',Qb="'",Bb=new RegExp('(\\s*)([^\\s=]+)(\\s*=)?(\\s*([\'"])(([\\s\\S])*?)\\5)?',"g")});var _K=v((mb)=>{var gK={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(r,f){return f},attributeValueProcessor:function(r,f){return f},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(r,f,s){return r}},Nb=function(r){return Object.assign({},gK,r)};mb.buildOptions=Nb;mb.defaultOptions=gK});var nK=v((W2r,eK)=>{class xK{constructor(r){this.tagname=r,this.child=[],this[":@"]={}}add(r,f){if(r==="__proto__")r="#__proto__";this.child.push({[r]:f})}addChild(r){if(r.tagname==="__proto__")r.tagname="#__proto__";if(r[":@"]&&Object.keys(r[":@"]).length>0)this.child.push({[r.tagname]:r.child,[":@"]:r[":@"]});else this.child.push({[r.tagname]:r.child})}}eK.exports=xK});var aK=v((R2r,oK)=>{function jb(r,f){const s={};if(r[f+3]==="O"&&r[f+4]==="C"&&r[f+5]==="T"&&r[f+6]==="Y"&&r[f+7]==="P"&&r[f+8]==="E"){f=f+9;let w=1,h=!1,$=!1,E="";for(;f<r.length;f++)if(r[f]==="<"&&!$){if(h&&cb(r,f)){if(f+=7,[entityName,val,f]=db(r,f+1),val.indexOf("&")===-1)s[xb(entityName)]={regx:RegExp(`&${entityName};`,"g"),val}}else if(h&&bb(r,f))f+=8;else if(h&&gb(r,f))f+=8;else if(h&&_b(r,f))f+=9;else if(Ob)$=!0;else throw new Error("Invalid DOCTYPE");w++,E=""}else if(r[f]===">"){if($){if(r[f-1]==="-"&&r[f-2]==="-")$=!1,w--}else w--;if(w===0)break}else if(r[f]==="[")h=!0;else E+=r[f];if(w!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:s,i:f}}function db(r,f){let s="";for(;f<r.length&&(r[f]!=="'"&&r[f]!=='"');f++)s+=r[f];if(s=s.trim(),s.indexOf(" ")!==-1)throw new Error("External entites are not supported");const w=r[f++];let h="";for(;f<r.length&&r[f]!==w;f++)h+=r[f];return[s,h,f]}function Ob(r,f){if(r[f+1]==="!"&&r[f+2]==="-"&&r[f+3]==="-")return!0;return!1}function cb(r,f){if(r[f+1]==="!"&&r[f+2]==="E"&&r[f+3]==="N"&&r[f+4]==="T"&&r[f+5]==="I"&&r[f+6]==="T"&&r[f+7]==="Y")return!0;return!1}function bb(r,f){if(r[f+1]==="!"&&r[f+2]==="E"&&r[f+3]==="L"&&r[f+4]==="E"&&r[f+5]==="M"&&r[f+6]==="E"&&r[f+7]==="N"&&r[f+8]==="T")return!0;return!1}function gb(r,f){if(r[f+1]==="!"&&r[f+2]==="A"&&r[f+3]==="T"&&r[f+4]==="T"&&r[f+5]==="L"&&r[f+6]==="I"&&r[f+7]==="S"&&r[f+8]==="T")return!0;return!1}function _b(r,f){if(r[f+1]==="!"&&r[f+2]==="N"&&r[f+3]==="O"&&r[f+4]==="T"&&r[f+5]==="A"&&r[f+6]==="T"&&r[f+7]==="I"&&r[f+8]==="O"&&r[f+9]==="N")return!0;return!1}function xb(r){if(vb.isName(r))return r;else throw new Error(`Invalid entity name ${r}`)}var vb=k3();oK.exports=jb});var uK=v((z2r,pK)=>{function ab(r,f={}){if(f=Object.assign({},ob,f),!r||typeof r!=="string")return r;let s=r.trim();if(f.skipLike!==void 0&&f.skipLike.test(s))return r;else if(f.hex&&eb.test(s))return Number.parseInt(s,16);else{const w=nb.exec(s);if(w){const h=w[1],$=w[2];let E=pb(w[3]);const I=w[4]||w[6];if(!f.leadingZeros&&$.length>0&&h&&s[2]!==".")return r;else if(!f.leadingZeros&&$.length>0&&!h&&s[1]!==".")return r;else{const F=Number(s),U=""+F;if(U.search(/[eE]/)!==-1)if(f.eNotation)return F;else return r;else if(I)if(f.eNotation)return F;else return r;else if(s.indexOf(".")!==-1)if(U==="0"&&E==="")return F;else if(U===E)return F;else if(h&&U==="-"+E)return F;else return r;if($)if(E===U)return F;else if(h+E===U)return F;else return r;if(s===U)return F;else if(s===h+U)return F;return r}}else return r}}function pb(r){if(r&&r.indexOf(".")!==-1){if(r=r.replace(/0+$/,""),r===".")r="0";else if(r[0]===".")r="0"+r;else if(r[r.length-1]===".")r=r.substr(0,r.length-1);return r}return r}var eb=/^[-+]?0x[a-fA-F0-9]+$/,nb=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;if(!Number.parseInt&&window.parseInt)Number.parseInt=window.parseInt;if(!Number.parseFloat&&window.parseFloat)Number.parseFloat=window.parseFloat;var ob={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};pK.exports=ab});var fZ=v((S2r,sZ)=>{function rg(r){const f=Object.keys(r);for(let s=0;s<f.length;s++){const w=f[s];this.lastEntities[w]={regex:new RegExp("&"+w+";","g"),val:r[w]}}}function sg(r,f,s,w,h,$,E){if(r!==void 0){if(this.options.trimValues&&!w)r=r.trim();if(r.length>0){if(!E)r=this.replaceEntitiesValue(r);const I=this.options.tagValueProcessor(f,r,s,h,$);if(I===null||I===void 0)return r;else if(typeof I!==typeof r||I!==r)return I;else if(this.options.trimValues)return b5(r,this.options.parseTagValue,this.options.numberParseOptions);else if(r.trim()===r)return b5(r,this.options.parseTagValue,this.options.numberParseOptions);else return r}}}function fg(r){if(this.options.removeNSPrefix){const f=r.split(":"),s=r.charAt(0)==="/"?"/":"";if(f[0]==="xmlns")return"";if(f.length===2)r=s+f[1]}return r}function hg(r,f,s){if(!this.options.ignoreAttributes&&typeof r==="string"){const w=tK.getAllMatches(r,wg),h=w.length,$={};for(let E=0;E<h;E++){const I=this.resolveNameSpace(w[E][1]);let F=w[E][4],U=this.options.attributeNamePrefix+I;if(I.length){if(this.options.transformAttributeName)U=this.options.transformAttributeName(U);if(U==="__proto__")U="#__proto__";if(F!==void 0){if(this.options.trimValues)F=F.trim();F=this.replaceEntitiesValue(F);const C=this.options.attributeValueProcessor(I,F,f);if(C===null||C===void 0)$[U]=F;else if(typeof C!==typeof F||C!==F)$[U]=C;else $[U]=b5(F,this.options.parseAttributeValue,this.options.numberParseOptions)}else if(this.options.allowBooleanAttributes)$[U]=!0}}if(!Object.keys($).length)return;if(this.options.attributesGroupName){const E={};return E[this.options.attributesGroupName]=$,E}return $}}function Eg(r,f,s){const w=this.options.updateTag(f.tagname,s,f[":@"]);if(w===!1);else if(typeof w==="string")f.tagname=w,r.addChild(f);else r.addChild(f)}function Fg(r,f,s,w){if(r){if(w===void 0)w=Object.keys(f.child).length===0;if(r=this.parseTextData(r,f.tagname,s,!1,f[":@"]?Object.keys(f[":@"]).length!==0:!1,w),r!==void 0&&r!=="")f.add(this.options.textNodeName,r);r=""}return r}function Ug(r,f,s){const w="*."+s;for(let h in r){const $=r[h];if(w===$||f===$)return!0}return!1}function Tg(r,f,s=">"){let w,h="";for(let $=f;$<r.length;$++){let E=r[$];if(w){if(E===w)w=""}else if(E==='"'||E==="'")w=E;else if(E===s[0])if(s[1]){if(r[$+1]===s[1])return{data:h,index:$}}else return{data:h,index:$};else if(E==="\t")E=" ";h+=E}}function Bw(r,f,s,w){const h=r.indexOf(f,s);if(h===-1)throw new Error(w);else return h+f.length-1}function c5(r,f,s,w=">"){const h=Tg(r,f+1,w);if(!h)return;let $=h.data;const E=h.index,I=$.search(/\s/);let F=$,U=!0;if(I!==-1)F=$.substring(0,I),$=$.substring(I+1).trimStart();const C=F;if(s){const L=F.indexOf(":");if(L!==-1)F=F.substr(L+1),U=F!==h.data.substr(L+1)}return{tagName:F,tagExp:$,closeIndex:E,attrExpPresent:U,rawTagName:C}}function Gg(r,f,s){const w=s;let h=1;for(;s<r.length;s++)if(r[s]==="<")if(r[s+1]==="/"){const $=Bw(r,">",s,`${f} is not closed`);if(r.substring(s+2,$).trim()===f){if(h--,h===0)return{tagContent:r.substring(w,s),i:$}}s=$}else if(r[s+1]==="?")s=Bw(r,"?>",s+1,"StopNode is not closed.");else if(r.substr(s+1,3)==="!--")s=Bw(r,"-->",s+3,"StopNode is not closed.");else if(r.substr(s+1,2)==="![")s=Bw(r,"]]>",s,"StopNode is not closed.")-2;else{const $=c5(r,s,">");if($){if(($&&$.tagName)===f&&$.tagExp[$.tagExp.length-1]!=="/")h++;s=$.closeIndex}}}function b5(r,f,s){if(f&&typeof r==="string"){const w=r.trim();if(w==="true")return!0;else if(w==="false")return!1;else return tb(r,s)}else if(tK.isExist(r))return r;else return""}var tK=k3(),m1=nK(),ub=aK(),tb=uK();class rZ{constructor(r){this.options=r,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:"\""}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"\xA2"},pound:{regex:/&(pound|#163);/g,val:"\xA3"},yen:{regex:/&(yen|#165);/g,val:"\xA5"},euro:{regex:/&(euro|#8364);/g,val:"\u20AC"},copyright:{regex:/&(copy|#169);/g,val:"\xA9"},reg:{regex:/&(reg|#174);/g,val:"\xAE"},inr:{regex:/&(inr|#8377);/g,val:"\u20B9"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(f,s)=>String.fromCharCode(Number.parseInt(s,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(f,s)=>String.fromCharCode(Number.parseInt(s,16))}},this.addExternalEntities=rg,this.parseXml=$g,this.parseTextData=sg,this.resolveNameSpace=fg,this.buildAttributesMap=hg,this.isItStopNode=Ug,this.replaceEntitiesValue=Ig,this.readStopNodeData=Gg,this.saveTextToParentTag=Fg,this.addChild=Eg}}var wg=new RegExp('([^\\s=]+)\\s*(=\\s*([\'"])([\\s\\S]*?)\\3)?',"gm"),$g=function(r){r=r.replace(/\r\n?/g,"\n");const f=new m1("!xml");let s=f,w="",h="";for(let $=0;$<r.length;$++)if(r[$]==="<")if(r[$+1]==="/"){const I=Bw(r,">",$,"Closing Tag is not closed.");let F=r.substring($+2,I).trim();if(this.options.removeNSPrefix){const L=F.indexOf(":");if(L!==-1)F=F.substr(L+1)}if(this.options.transformTagName)F=this.options.transformTagName(F);if(s)w=this.saveTextToParentTag(w,s,h);const U=h.substring(h.lastIndexOf(".")+1);if(F&&this.options.unpairedTags.indexOf(F)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${F}>`);let C=0;if(U&&this.options.unpairedTags.indexOf(U)!==-1)C=h.lastIndexOf(".",h.lastIndexOf(".")-1),this.tagsNodeStack.pop();else C=h.lastIndexOf(".");h=h.substring(0,C),s=this.tagsNodeStack.pop(),w="",$=I}else if(r[$+1]==="?"){let I=c5(r,$,!1,"?>");if(!I)throw new Error("Pi Tag is not closed.");if(w=this.saveTextToParentTag(w,s,h),this.options.ignoreDeclaration&&I.tagName==="?xml"||this.options.ignorePiTags);else{const F=new m1(I.tagName);if(F.add(this.options.textNodeName,""),I.tagName!==I.tagExp&&I.attrExpPresent)F[":@"]=this.buildAttributesMap(I.tagExp,h,I.tagName);this.addChild(s,F,h)}$=I.closeIndex+1}else if(r.substr($+1,3)==="!--"){const I=Bw(r,"-->",$+4,"Comment is not closed.");if(this.options.commentPropName){const F=r.substring($+4,I-2);w=this.saveTextToParentTag(w,s,h),s.add(this.options.commentPropName,[{[this.options.textNodeName]:F}])}$=I}else if(r.substr($+1,2)==="!D"){const I=ub(r,$);this.docTypeEntities=I.entities,$=I.i}else if(r.substr($+1,2)==="!["){const I=Bw(r,"]]>",$,"CDATA is not closed.")-2,F=r.substring($+9,I);w=this.saveTextToParentTag(w,s,h);let U=this.parseTextData(F,s.tagname,h,!0,!1,!0,!0);if(U==null)U="";if(this.options.cdataPropName)s.add(this.options.cdataPropName,[{[this.options.textNodeName]:F}]);else s.add(this.options.textNodeName,U);$=I+2}else{let I=c5(r,$,this.options.removeNSPrefix),F=I.tagName;const U=I.rawTagName;let{tagExp:C,attrExpPresent:L,closeIndex:z}=I;if(this.options.transformTagName)F=this.options.transformTagName(F);if(s&&w){if(s.tagname!=="!xml")w=this.saveTextToParentTag(w,s,h,!1)}const S=s;if(S&&this.options.unpairedTags.indexOf(S.tagname)!==-1)s=this.tagsNodeStack.pop(),h=h.substring(0,h.lastIndexOf("."));if(F!==f.tagname)h+=h?"."+F:F;if(this.isItStopNode(this.options.stopNodes,h,F)){let Z="";if(C.length>0&&C.lastIndexOf("/")===C.length-1){if(F[F.length-1]==="/")F=F.substr(0,F.length-1),h=h.substr(0,h.length-1),C=F;else C=C.substr(0,C.length-1);$=I.closeIndex}else if(this.options.unpairedTags.indexOf(F)!==-1)$=I.closeIndex;else{const l=this.readStopNodeData(r,U,z+1);if(!l)throw new Error(`Unexpected end of ${U}`);$=l.i,Z=l.tagContent}const k=new m1(F);if(F!==C&&L)k[":@"]=this.buildAttributesMap(C,h,F);if(Z)Z=this.parseTextData(Z,F,h,!0,L,!0,!0);h=h.substr(0,h.lastIndexOf(".")),k.add(this.options.textNodeName,Z),this.addChild(s,k,h)}else{if(C.length>0&&C.lastIndexOf("/")===C.length-1){if(F[F.length-1]==="/")F=F.substr(0,F.length-1),h=h.substr(0,h.length-1),C=F;else C=C.substr(0,C.length-1);if(this.options.transformTagName)F=this.options.transformTagName(F);const Z=new m1(F);if(F!==C&&L)Z[":@"]=this.buildAttributesMap(C,h,F);this.addChild(s,Z,h),h=h.substr(0,h.lastIndexOf("."))}else{const Z=new m1(F);if(this.tagsNodeStack.push(s),F!==C&&L)Z[":@"]=this.buildAttributesMap(C,h,F);this.addChild(s,Z,h),s=Z}w="",$=z}}else w+=r[$];return f.child},Ig=function(r){if(this.options.processEntities){for(let f in this.docTypeEntities){const s=this.docTypeEntities[f];r=r.replace(s.regx,s.val)}for(let f in this.lastEntities){const s=this.lastEntities[f];r=r.replace(s.regex,s.val)}if(this.options.htmlEntities)for(let f in this.htmlEntities){const s=this.htmlEntities[f];r=r.replace(s.regex,s.val)}r=r.replace(this.ampEntity.regex,this.ampEntity.val)}return r};sZ.exports=rZ});var hZ=v((Rg)=>{function Cg(r,f){return wZ(r,f)}function wZ(r,f,s){let w;const h={};for(let $=0;$<r.length;$++){const E=r[$],I=Lg(E);let F="";if(s===void 0)F=I;else F=s+"."+I;if(I===f.textNodeName)if(w===void 0)w=E[I];else w+=""+E[I];else if(I===void 0)continue;else if(E[I]){let U=wZ(E[I],f,F);const C=Wg(U,f);if(E[":@"])Ag(U,E[":@"],F,f);else if(Object.keys(U).length===1&&U[f.textNodeName]!==void 0&&!f.alwaysCreateTextNode)U=U[f.textNodeName];else if(Object.keys(U).length===0)if(f.alwaysCreateTextNode)U[f.textNodeName]="";else U="";if(h[I]!==void 0&&h.hasOwnProperty(I)){if(!Array.isArray(h[I]))h[I]=[h[I]];h[I].push(U)}else if(f.isArray(I,F,C))h[I]=[U];else h[I]=U}}if(typeof w==="string"){if(w.length>0)h[f.textNodeName]=w}else if(w!==void 0)h[f.textNodeName]=w;return h}function Lg(r){const f=Object.keys(r);for(let s=0;s<f.length;s++){const w=f[s];if(w!==":@")return w}}function Ag(r,f,s,w){if(f){const h=Object.keys(f),$=h.length;for(let E=0;E<$;E++){const I=h[E];if(w.isArray(I,s+"."+I,!0,!0))r[I]=[f[I]];else r[I]=f[I]}}}function Wg(r,f){const{textNodeName:s}=f,w=Object.keys(r).length;if(w===0)return!0;if(w===1&&(r[s]||typeof r[s]==="boolean"||r[s]===0))return!0;return!1}Rg.prettify=Cg});var IZ=v((X2r,EZ)=>{var{buildOptions:Sg}=_K(),Pg=fZ(),{prettify:Xg}=hZ(),Yg=O5();class $Z{constructor(r){this.externalEntities={},this.options=Sg(r)}parse(r,f){if(typeof r==="string");else if(r.toString)r=r.toString();else throw new Error("XML data is accepted in String or Bytes[] form.");if(f){if(f===!0)f={};const h=Yg.validate(r,f);if(h!==!0)throw Error(`${h.err.msg}:${h.err.line}:${h.err.col}`)}const s=new Pg(this.options);s.addExternalEntities(this.externalEntities);const w=s.parseXml(r);if(this.options.preserveOrder||w===void 0)return w;else return Xg(w,this.options)}addEntity(r,f){if(f.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");else if(r.indexOf("&")!==-1||r.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");else if(f==="&")throw new Error("An entity with value '&' is not permitted");else this.externalEntities[r]=f}}EZ.exports=$Z});var CZ=v((Y2r,GZ)=>{function Kg(r,f){let s="";if(f.format&&f.indentBy.length>0)s="\n";return UZ(r,f,"",s)}function UZ(r,f,s,w){let h="",$=!1;for(let E=0;E<r.length;E++){const I=r[E],F=Zg(I);if(F===void 0)continue;let U="";if(s.length===0)U=F;else U=`${s}.${F}`;if(F===f.textNodeName){let Z=I[F];if(!Jg(U,f))Z=f.tagValueProcessor(F,Z),Z=TZ(Z,f);if($)h+=w;h+=Z,$=!1;continue}else if(F===f.cdataPropName){if($)h+=w;h+=`<![CDATA[${I[F][0][f.textNodeName]}]]>`,$=!1;continue}else if(F===f.commentPropName){h+=w+`<!--${I[F][0][f.textNodeName]}-->`,$=!0;continue}else if(F[0]==="?"){const Z=FZ(I[":@"],f),k=F==="?xml"?"":w;let l=I[F][0][f.textNodeName];l=l.length!==0?" "+l:"",h+=k+`<${F}${l}${Z}?>`,$=!0;continue}let C=w;if(C!=="")C+=f.indentBy;const L=FZ(I[":@"],f),z=w+`<${F}${L}`,S=UZ(I[F],f,U,C);if(f.unpairedTags.indexOf(F)!==-1)if(f.suppressUnpairedNode)h+=z+">";else h+=z+"/>";else if((!S||S.length===0)&&f.suppressEmptyNode)h+=z+"/>";else if(S&&S.endsWith(">"))h+=z+`>${S}${w}</${F}>`;else{if(h+=z+">",S&&w!==""&&(S.includes("/>")||S.includes("</")))h+=w+f.indentBy+S+w;else h+=S;h+=`</${F}>`}$=!0}return h}function Zg(r){const f=Object.keys(r);for(let s=0;s<f.length;s++){const w=f[s];if(!r.hasOwnProperty(w))continue;if(w!==":@")return w}}function FZ(r,f){let s="";if(r&&!f.ignoreAttributes)for(let w in r){if(!r.hasOwnProperty(w))continue;let h=f.attributeValueProcessor(w,r[w]);if(h=TZ(h,f),h===!0&&f.suppressBooleanAttributes)s+=` ${w.substr(f.attributeNamePrefix.length)}`;else s+=` ${w.substr(f.attributeNamePrefix.length)}="${h}"`}return s}function Jg(r,f){r=r.substr(0,r.length-f.textNodeName.length-1);let s=r.substr(r.lastIndexOf(".")+1);for(let w in f.stopNodes)if(f.stopNodes[w]===r||f.stopNodes[w]==="*."+s)return!0;return!1}function TZ(r,f){if(r&&r.length>0&&f.processEntities)for(let s=0;s<f.entities.length;s++){const w=f.entities[s];r=r.replace(w.regex,w.val)}return r}GZ.exports=Kg});var AZ=v((K2r,LZ)=>{function g0(r){if(this.options=Object.assign({},Mg,r),this.options.ignoreAttributes||this.options.attributesGroupName)this.isAttribute=function(){return!1};else this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=Hg;if(this.processTextOrObjNode=Bg,this.options.format)this.indentate=lg,this.tagEndChar=">\n",this.newLine="\n";else this.indentate=function(){return""},this.tagEndChar=">",this.newLine=""}function Bg(r,f,s){const w=this.j2x(r,s+1);if(r[this.options.textNodeName]!==void 0&&Object.keys(r).length===1)return this.buildTextValNode(r[this.options.textNodeName],f,w.attrStr,s);else return this.buildObjectNode(w.val,f,w.attrStr,s)}function lg(r){return this.options.indentBy.repeat(r)}function Hg(r){if(r.startsWith(this.options.attributeNamePrefix)&&r!==this.options.textNodeName)return r.substr(this.attrPrefixLen);else return!1}var Qg=CZ(),Mg={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(r,f){return f},attributeValueProcessor:function(r,f){return f},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("\'","g"),val:"&apos;"},{regex:new RegExp("\"","g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1};g0.prototype.build=function(r){if(this.options.preserveOrder)return Qg(r,this.options);else{if(Array.isArray(r)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1)r={[this.options.arrayNodeName]:r};return this.j2x(r,0).val}};g0.prototype.j2x=function(r,f){let s="",w="";for(let h in r){if(!Object.prototype.hasOwnProperty.call(r,h))continue;if(typeof r[h]==="undefined"){if(this.isAttribute(h))w+=""}else if(r[h]===null)if(this.isAttribute(h))w+="";else if(h[0]==="?")w+=this.indentate(f)+"<"+h+"?"+this.tagEndChar;else w+=this.indentate(f)+"<"+h+"/"+this.tagEndChar;else if(r[h]instanceof Date)w+=this.buildTextValNode(r[h],h,"",f);else if(typeof r[h]!=="object"){const $=this.isAttribute(h);if($)s+=this.buildAttrPairStr($,""+r[h]);else if(h===this.options.textNodeName){let E=this.options.tagValueProcessor(h,""+r[h]);w+=this.replaceEntitiesValue(E)}else w+=this.buildTextValNode(r[h],h,"",f)}else if(Array.isArray(r[h])){const $=r[h].length;let E="",I="";for(let F=0;F<$;F++){const U=r[h][F];if(typeof U==="undefined");else if(U===null)if(h[0]==="?")w+=this.indentate(f)+"<"+h+"?"+this.tagEndChar;else w+=this.indentate(f)+"<"+h+"/"+this.tagEndChar;else if(typeof U==="object")if(this.options.oneListGroup){const C=this.j2x(U,f+1);if(E+=C.val,this.options.attributesGroupName&&U.hasOwnProperty(this.options.attributesGroupName))I+=C.attrStr}else E+=this.processTextOrObjNode(U,h,f);else if(this.options.oneListGroup){let C=this.options.tagValueProcessor(h,U);C=this.replaceEntitiesValue(C),E+=C}else E+=this.buildTextValNode(U,h,"",f)}if(this.options.oneListGroup)E=this.buildObjectNode(E,h,I,f);w+=E}else if(this.options.attributesGroupName&&h===this.options.attributesGroupName){const $=Object.keys(r[h]),E=$.length;for(let I=0;I<E;I++)s+=this.buildAttrPairStr($[I],""+r[h][$[I]])}else w+=this.processTextOrObjNode(r[h],h,f)}return{attrStr:s,val:w}};g0.prototype.buildAttrPairStr=function(r,f){if(f=this.options.attributeValueProcessor(r,""+f),f=this.replaceEntitiesValue(f),this.options.suppressBooleanAttributes&&f==="true")return" "+r;else return" "+r+'="'+f+'"'};g0.prototype.buildObjectNode=function(r,f,s,w){if(r==="")if(f[0]==="?")return this.indentate(w)+"<"+f+s+"?"+this.tagEndChar;else return this.indentate(w)+"<"+f+s+this.closeTag(f)+this.tagEndChar;else{let h="</"+f+this.tagEndChar,$="";if(f[0]==="?")$="?",h="";if((s||s==="")&&r.indexOf("<")===-1)return this.indentate(w)+"<"+f+s+$+">"+r+h;else if(this.options.commentPropName!==!1&&f===this.options.commentPropName&&$.length===0)return this.indentate(w)+`<!--${r}-->`+this.newLine;else return this.indentate(w)+"<"+f+s+$+this.tagEndChar+r+this.indentate(w)+h}};g0.prototype.closeTag=function(r){let f="";if(this.options.unpairedTags.indexOf(r)!==-1){if(!this.options.suppressUnpairedNode)f="/"}else if(this.options.suppressEmptyNode)f="/";else f=`></${r}`;return f};g0.prototype.buildTextValNode=function(r,f,s,w){if(this.options.cdataPropName!==!1&&f===this.options.cdataPropName)return this.indentate(w)+`<![CDATA[${r}]]>`+this.newLine;else if(this.options.commentPropName!==!1&&f===this.options.commentPropName)return this.indentate(w)+`<!--${r}-->`+this.newLine;else if(f[0]==="?")return this.indentate(w)+"<"+f+s+"?"+this.tagEndChar;else{let h=this.options.tagValueProcessor(f,r);if(h=this.replaceEntitiesValue(h),h==="")return this.indentate(w)+"<"+f+s+this.closeTag(f)+this.tagEndChar;else return this.indentate(w)+"<"+f+s+">"+h+"</"+f+this.tagEndChar}};g0.prototype.replaceEntitiesValue=function(r){if(r&&r.length>0&&this.options.processEntities)for(let f=0;f<this.options.entities.length;f++){const s=this.options.entities[f];r=r.replace(s.regex,s.val)}return r};LZ.exports=g0});var RZ=v((Z2r,WZ)=>{var Vg=O5(),Dg=IZ(),kg=AZ();WZ.exports={XMLParser:Dg,XMLValidator:Vg,XMLBuilder:kg}});var KZ=v((J2r,YZ)=>{var{defineProperty:y3,getOwnPropertyDescriptor:yg,getOwnPropertyNames:Ng}=Object,mg=Object.prototype.hasOwnProperty,zs=(r,f)=>y3(r,"name",{value:f,configurable:!0}),ig=(r,f)=>{for(var s in f)y3(r,s,{get:f[s],enumerable:!0})},qg=(r,f,s,w)=>{if(f&&typeof f==="object"||typeof f==="function"){for(let h of Ng(f))if(!mg.call(r,h)&&h!==s)y3(r,h,{get:()=>f[h],enumerable:!(w=yg(f,h))||w.enumerable})}return r},vg=(r)=>qg(y3({},"__esModule",{value:!0}),r),zZ={};ig(zZ,{_toBool:()=>dg,_toNum:()=>Og,_toStr:()=>jg,awsExpectUnion:()=>bg,loadRestJsonErrorCode:()=>xg,loadRestXmlErrorCode:()=>ag,parseJsonBody:()=>PZ,parseJsonErrorBody:()=>_g,parseXmlBody:()=>XZ,parseXmlErrorBody:()=>og});YZ.exports=vg(zZ);var jg=zs((r)=>{if(r==null)return r;if(typeof r==="number"||typeof r==="bigint"){const f=new Error(`Received number ${r} where a string was expected.`);return f.name="Warning",console.warn(f),String(r)}if(typeof r==="boolean"){const f=new Error(`Received boolean ${r} where a string was expected.`);return f.name="Warning",console.warn(f),String(r)}return r},"_toStr"),dg=zs((r)=>{if(r==null)return r;if(typeof r==="string"){const f=r.toLowerCase();if(r!==""&&f!=="false"&&f!=="true"){const s=new Error(`Received string "${r}" where a boolean was expected.`);s.name="Warning",console.warn(s)}return r!==""&&f!=="false"}return r},"_toBool"),Og=zs((r)=>{if(r==null)return r;if(typeof r==="string"){const f=Number(r);if(f.toString()!==r){const s=new Error(`Received string "${r}" where a number was expected.`);return s.name="Warning",console.warn(s),r}return f}return r},"_toNum"),cg=hh(),bg=zs((r)=>{if(r==null)return;if(typeof r==="object"&&"__type"in r)delete r.__type;return cg.expectUnion(r)},"awsExpectUnion"),gg=hh(),SZ=zs((r,f)=>gg.collectBody(r,f).then((s)=>f.utf8Encoder(s)),"collectBodyString"),PZ=zs((r,f)=>SZ(r,f).then((s)=>{if(s.length)try{return JSON.parse(s)}catch(w){if((w==null?void 0:w.name)==="SyntaxError")Object.defineProperty(w,"$responseBodyText",{value:s});throw w}return{}}),"parseJsonBody"),_g=zs(async(r,f)=>{const s=await PZ(r,f);return s.message=s.message??s.Message,s},"parseJsonErrorBody"),xg=zs((r,f)=>{const s=zs(($,E)=>Object.keys($).find((I)=>I.toLowerCase()===E.toLowerCase()),"findKey"),w=zs(($)=>{let E=$;if(typeof E==="number")E=E.toString();if(E.indexOf(",")>=0)E=E.split(",")[0];if(E.indexOf(":")>=0)E=E.split(":")[0];if(E.indexOf("#")>=0)E=E.split("#")[1];return E},"sanitizeErrorCode"),h=s(r.headers,"x-amzn-errortype");if(h!==void 0)return w(r.headers[h]);if(f.code!==void 0)return w(f.code);if(f.__type!==void 0)return w(f.__type)},"loadRestJsonErrorCode"),eg=hh(),ng=RZ(),XZ=zs((r,f)=>SZ(r,f).then((s)=>{if(s.length){const w=new ng.XMLParser({attributeNamePrefix:"",htmlEntities:!0,ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:(F,U)=>U.trim()===""&&U.includes("\n")?"":void 0});w.addEntity("#xD","\r"),w.addEntity("#10","\n");let h;try{h=w.parse(s,!0)}catch(F){if(F&&typeof F==="object")Object.defineProperty(F,"$responseBodyText",{value:s});throw F}const $="#text",E=Object.keys(h)[0],I=h[E];if(I[$])I[E]=I[$],delete I[$];return eg.getValueFromTextNode(I)}return{}}),"parseXmlBody"),og=zs(async(r,f)=>{const s=await XZ(r,f);if(s.Error)s.Error.message=s.Error.message??s.Error.Message;return s},"parseXmlErrorBody"),ag=zs((r,f)=>{var s;if(((s=f==null?void 0:f.Error)==null?void 0:s.Code)!==void 0)return f.Error.Code;if((f==null?void 0:f.Code)!==void 0)return f.Code;if(r.statusCode==404)return"NotFound"},"loadRestXmlErrorCode")});var Br=v((i1)=>{Object.defineProperty(i1,"__esModule",{value:!0});var g5=wK();g5.__exportStar(IK(),i1);g5.__exportStar(qK(),i1);g5.__exportStar(KZ(),i1)});var HZ,N3="AWS_ACCESS_KEY_ID",m3="AWS_SECRET_ACCESS_KEY",VZ="AWS_SESSION_TOKEN",DZ="AWS_CREDENTIAL_EXPIRATION",kZ="AWS_CREDENTIAL_SCOPE",yZ="AWS_ACCOUNT_ID",_5=(r)=>async()=>{r?.logger?.debug("@aws-sdk/credential-provider-env - fromEnv");const f=process.env[N3],s=process.env[m3],w=process.env[VZ],h=process.env[DZ],$=process.env[kZ],E=process.env[yZ];if(f&&s)return{accessKeyId:f,secretAccessKey:s,...w&&{sessionToken:w},...h&&{expiration:new Date(h)},...$&&{credentialScope:$},...E&&{accountId:E}};throw new HZ.CredentialsProviderError("Unable to find environment variable credentials.",{logger:r?.logger})};var NZ=G(()=>{HZ=d(Cr(),1)});var mZ={};Wf(mZ,{fromEnv:()=>_5,ENV_SESSION:()=>VZ,ENV_SECRET:()=>m3,ENV_KEY:()=>N3,ENV_EXPIRATION:()=>DZ,ENV_CREDENTIAL_SCOPE:()=>kZ,ENV_ACCOUNT_ID:()=>yZ});var x5=G(()=>{NZ()});import{Buffer as tg}from"buffer";import{request as r_}from"http";function _0(r){return new Promise((f,s)=>{const w=r_({method:"GET",...r,hostname:r.hostname?.replace(/^\[(.+)\]$/,"$1")});w.on("error",(h)=>{s(Object.assign(new i3.ProviderError("Unable to connect to instance metadata service"),h)),w.destroy()}),w.on("timeout",()=>{s(new i3.ProviderError("TimeoutError from instance metadata service")),w.destroy()}),w.on("response",(h)=>{const{statusCode:$=400}=h;if($<200||300<=$)s(Object.assign(new i3.ProviderError("Error response received from instance metadata service"),{statusCode:$})),w.destroy();const E=[];h.on("data",(I)=>{E.push(I)}),h.on("end",()=>{f(tg.concat(E)),w.destroy()})}),w.end()})}var i3;var q3=G(()=>{i3=d(Cr(),1)});var v3=(r)=>Boolean(r)&&typeof r==="object"&&typeof r.AccessKeyId==="string"&&typeof r.SecretAccessKey==="string"&&typeof r.Token==="string"&&typeof r.Expiration==="string",j3=(r)=>({accessKeyId:r.AccessKeyId,secretAccessKey:r.SecretAccessKey,sessionToken:r.Token,expiration:new Date(r.Expiration),...r.AccountId&&{accountId:r.AccountId}});var s_=1000,f_=0,q1=({maxRetries:r=0,timeout:f=1000})=>({maxRetries:r,timeout:f});var v1=(r,f)=>{let s=r();for(let w=0;w<f;w++)s=s.catch(r);return s};import{parse as w_}from"url";var j1,d3="AWS_CONTAINER_CREDENTIALS_FULL_URI",O3="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",e5="AWS_CONTAINER_AUTHORIZATION_TOKEN",h_=(r={})=>{const{timeout:f,maxRetries:s}=q1(r);return()=>v1(async()=>{const w=await U_({logger:r.logger}),h=JSON.parse(await $_(f,w));if(!v3(h))throw new j1.CredentialsProviderError("Invalid response received from instance metadata service.",{logger:r.logger});return j3(h)},s)},$_=async(r,f)=>{if(process.env[e5])f.headers={...f.headers,Authorization:process.env[e5]};return(await _0({...f,timeout:r})).toString()},E_="169.254.170.2",I_,F_,U_=async({logger:r})=>{if(process.env[O3])return{hostname:E_,path:process.env[O3]};if(process.env[d3]){const f=w_(process.env[d3]);if(!f.hostname||!(f.hostname in I_))throw new j1.CredentialsProviderError(`${f.hostname} is not a valid container metadata service hostname`,{tryNextLink:!1,logger:r});if(!f.protocol||!(f.protocol in F_))throw new j1.CredentialsProviderError(`${f.protocol} is not a valid container metadata service protocol`,{tryNextLink:!1,logger:r});return{...f,port:f.port?parseInt(f.port,10):void 0}}throw new j1.CredentialsProviderError(`The container metadata credential provider cannot be used unless the ${O3} or ${d3} environment variable is set`,{tryNextLink:!1,logger:r})};var iZ=G(()=>{j1=d(Cr(),1);q3();I_={localhost:!0,"127.0.0.1":!0},F_={"http:":!0,"https:":!0}});var qZ,c3;var vZ=G(()=>{qZ=d(Cr(),1);c3=class c3 extends qZ.CredentialsProviderError{constructor(r,f=!0){super(r,f);this.tryNextLink=f,this.name="InstanceMetadataV1FallbackError",Object.setPrototypeOf(this,c3.prototype)}}});var lw;var n5=G(()=>{(function(r){r.IPv4="http://169.254.169.254",r.IPv6="http://[fd00:ec2::254]"})(lw||(lw={}))});var jZ;var dZ=G(()=>{jZ={environmentVariableSelector:(r)=>r.AWS_EC2_METADATA_SERVICE_ENDPOINT,configFileSelector:(r)=>r.ec2_metadata_service_endpoint,default:void 0}});var x0;var o5=G(()=>{(function(r){r.IPv4="IPv4",r.IPv6="IPv6"})(x0||(x0={}))});var T_="AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE",G_="ec2_metadata_service_endpoint_mode",OZ;var cZ=G(()=>{o5();OZ={environmentVariableSelector:(r)=>r[T_],configFileSelector:(r)=>r[G_],default:x0.IPv4}});var b3=async()=>br(await C_()||await L_()),C_=async()=>u(jZ)(),L_=async()=>{const r=await u(OZ)();switch(r){case x0.IPv4:return lw.IPv4;case x0.IPv6:return lw.IPv6;default:throw new Error(`Unsupported endpoint mode: ${r}. Select from ${Object.values(x0)}`)}};var a5=G(()=>{ff();j0();n5();dZ();o5();cZ()});var p5=(r,f)=>{const s=300+Math.floor(Math.random()*300),w=new Date(Date.now()+s*1000);f.warn(`Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(w)}.\nFor more information, please visit: https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html`);const h=r.originalExpiration??r.expiration;return{...r,...h?{originalExpiration:h}:{},expiration:w}};var bZ=(r,f={})=>{const s=f?.logger||console;let w;return async()=>{let h;try{if(h=await r(),h.expiration&&h.expiration.getTime()<Date.now())h=p5(h,s)}catch($){if(w)s.warn("Credential renew failed: ",$),h=p5(w,s);else throw $}return w=h,h}};var gZ=()=>{};var t5,eZ="/latest/meta-data/iam/security-credentials/",A_="/latest/api/token",u5="AWS_EC2_METADATA_V1_DISABLED",_Z="ec2_metadata_v1_disabled",xZ="x-aws-ec2-metadata-token",W_=(r={})=>bZ(R_(r),{logger:r.logger}),R_=(r={})=>{let f=!1;const{logger:s,profile:w}=r,{timeout:h,maxRetries:$}=q1(r),E=async(I,F)=>{if(f||F.headers?.[xZ]==null){let L=!1,z=!1;const S=await u({environmentVariableSelector:(Z)=>{const k=Z[u5];if(z=!!k&&k!=="false",k===void 0)throw new t5.CredentialsProviderError(`${u5} not set in env, checking config file next.`,{logger:r.logger});return z},configFileSelector:(Z)=>{const k=Z[_Z];return L=!!k&&k!=="false",L},default:!1},{profile:w})();if(r.ec2MetadataV1Disabled||S){const Z=[];if(r.ec2MetadataV1Disabled)Z.push("credential provider initialization (runtime option ec2MetadataV1Disabled)");if(L)Z.push(`config file profile (${_Z})`);if(z)Z.push(`process environment variable (${u5})`);throw new c3(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${Z.join(", ")}].`)}}const C=(await v1(async()=>{let L;try{L=await S_(F)}catch(z){if(z.statusCode===401)f=!1;throw z}return L},I)).trim();return v1(async()=>{let L;try{L=await P_(C,F,r)}catch(z){if(z.statusCode===401)f=!1;throw z}return L},I)};return async()=>{const I=await b3();if(f)return s?.debug("AWS SDK Instance Metadata","using v1 fallback (no token fetch)"),E($,{...I,timeout:h});else{let F;try{F=(await z_({...I,timeout:h})).toString()}catch(U){if(U?.statusCode===400)throw Object.assign(U,{message:"EC2 Metadata token request returned error"});else if(U.message==="TimeoutError"||[403,404,405].includes(U.statusCode))f=!0;return s?.debug("AWS SDK Instance Metadata","using v1 fallback (initial)"),E($,{...I,timeout:h})}return E($,{...I,headers:{[xZ]:F},timeout:h})}}},z_=async(r)=>_0({...r,path:A_,method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"21600"}}),S_=async(r)=>(await _0({...r,path:eZ})).toString(),P_=async(r,f,s)=>{const w=JSON.parse((await _0({...f,path:eZ+r})).toString());if(!v3(w))throw new t5.CredentialsProviderError("Invalid response received from instance metadata service.",{logger:s.logger});return j3(w)};var nZ=G(()=>{ff();t5=d(Cr(),1);vZ();q3();a5();gZ()});var oZ=()=>{};var d1={};Wf(d1,{providerConfigFromInit:()=>q1,httpRequest:()=>_0,getInstanceMetadataEndpoint:()=>b3,fromInstanceMetadata:()=>W_,fromContainerMetadata:()=>h_,Endpoint:()=>lw,ENV_CMDS_RELATIVE_URI:()=>O3,ENV_CMDS_FULL_URI:()=>d3,ENV_CMDS_AUTH_TOKEN:()=>e5,DEFAULT_TIMEOUT:()=>s_,DEFAULT_MAX_RETRIES:()=>f_});var O1=G(()=>{iZ();nZ();oZ();q3();a5();n5()});var aZ,X_="169.254.170.2",Y_="169.254.170.23",K_="[fd00:ec2::23]",pZ=(r,f)=>{if(r.protocol==="https:")return;if(r.hostname===X_||r.hostname===Y_||r.hostname===K_)return;if(r.hostname.includes("[")){if(r.hostname==="[::1]"||r.hostname==="[0000:0000:0000:0000:0000:0000:0000:0001]")return}else{if(r.hostname==="localhost")return;const s=r.hostname.split("."),w=(h)=>{const $=parseInt(h,10);return 0<=$&&$<=255};if(s[0]==="127"&&w(s[1])&&w(s[2])&&w(s[3])&&s.length===4)return}throw new aZ.CredentialsProviderError(`URL not accepted. It must either be HTTPS or match one of the following:
18
+ ${f}
19
+ ${b0.toHex(E)}`}getCanonicalPath({path:s}){if(this.uriEscapePath){const f=[];for(let E of s.split("/")){if((E==null?void 0:E.length)===0)continue;if(E===".")continue;if(E==="..")f.pop();else f.push(E)}const w=`${(s==null?void 0:s.startsWith("/"))?"/":""}${f.join("/")}${f.length>0&&(s==null?void 0:s.endsWith("/"))?"/":""}`;return T3.escapeUri(w).replace(/%2F/g,"/")}return s}async getSignature(s,f,w,h){const E=await this.createStringToSign(s,f,h),$=new this.sha256(await w);return $.update(nF.toUint8Array(E)),b0.toHex(await $.digest())}getSigningKey(s,f,w,h){return d7(this.sha256,s,w,f,h||this.service)}validateResolvedCredentials(s){if(typeof s!=="object"||typeof s.accessKeyId!=="string"||typeof s.secretAccessKey!=="string")throw new Error("Resolved credential object is not valid")}};mr(e7,"SignatureV4");var zc=e7,I3=mr((r)=>{const s=Cc(r).replace(/[\-:]/g,"");return{longDate:s,shortDate:s.slice(0,8)}},"formatDate"),y7=mr((r)=>Object.keys(r).sort().join(";"),"getCanonicalHeaderList")});var EY=O((x0r,hY)=>{var{defineProperty:L3,getOwnPropertyDescriptor:Sc,getOwnPropertyNames:Yc}=Object,Xc=Object.prototype.hasOwnProperty,Cf=(r,s)=>L3(r,"name",{value:s,configurable:!0}),Kc=(r,s)=>{for(var f in s)L3(r,f,{get:s[f],enumerable:!0})},Zc=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of Yc(s))if(!Xc.call(r,h)&&h!==f)L3(r,h,{get:()=>s[h],enumerable:!(w=Sc(s,h))||w.enumerable})}return r},Pc=(r)=>Zc(L3({},"__esModule",{value:!0}),r),rY={};Kc(rY,{AWSSDKSigV4Signer:()=>Mc,AwsSdkSigV4ASigner:()=>Hc,AwsSdkSigV4Signer:()=>sU,NODE_SIGV4A_CONFIG_OPTIONS:()=>kc,resolveAWSSDKSigV4Config:()=>Nc,resolveAwsSdkSigV4AConfig:()=>Dc,resolveAwsSdkSigV4Config:()=>wY,validateSigningProperties:()=>fU});hY.exports=Pc(rY);var Jc=L0(),Qc=L0(),a7=Cf((r)=>{var s,f;return Qc.HttpResponse.isInstance(r)?((s=r.headers)==null?void 0:s.date)??((f=r.headers)==null?void 0:f.Date):void 0},"getDateHeader"),rU=Cf((r)=>new Date(Date.now()+r),"getSkewCorrectedDate"),Bc=Cf((r,s)=>Math.abs(rU(s).getTime()-r)>=300000,"isClockSkewed"),p7=Cf((r,s)=>{const f=Date.parse(r);if(Bc(f,s))return f-Date.now();return s},"getUpdatedSystemClockOffset"),D1=Cf((r,s)=>{if(!s)throw new Error(`Property \`${r}\` is not resolved for AWS SDK SigV4Auth`);return s},"throwSigningPropertyError"),fU=Cf(async(r)=>{var s,f,w;const h=D1("context",r.context),E=D1("config",r.config),$=(w=(f=(s=h.endpointV2)==null?void 0:s.properties)==null?void 0:f.authSchemes)==null?void 0:w[0],F=await D1("signer",E.signer)($),U=r==null?void 0:r.signingRegion,A=r==null?void 0:r.signingRegionSet,L=r==null?void 0:r.signingName;return{config:E,signer:F,signingRegion:U,signingRegionSet:A,signingName:L}},"validateSigningProperties"),fY=class r{async sign(s,f,w){var h;if(!Jc.HttpRequest.isInstance(s))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const E=await fU(w),{config:$,signer:I}=E;let{signingRegion:F,signingName:U}=E;const A=w.context;if(((h=A==null?void 0:A.authSchemes)==null?void 0:h.length)??0>1){const[S,z]=A.authSchemes;if((S==null?void 0:S.name)==="sigv4a"&&(z==null?void 0:z.name)==="sigv4")F=(z==null?void 0:z.signingRegion)??F,U=(z==null?void 0:z.signingName)??U}return await I.sign(s,{signingDate:rU($.systemClockOffset),signingRegion:F,signingService:U})}errorHandler(s){return(f)=>{const w=f.ServerTime??a7(f.$response);if(w){const h=D1("config",s.config),E=h.systemClockOffset;if(h.systemClockOffset=p7(w,h.systemClockOffset),h.systemClockOffset!==E&&f.$metadata)f.$metadata.clockSkewCorrected=!0}throw f}}successHandler(s,f){const w=a7(s);if(w){const h=D1("config",f.config);h.systemClockOffset=p7(w,h.systemClockOffset)}}};Cf(fY,"AwsSdkSigV4Signer");var sU=fY,Mc=sU,Vc=L0(),sY=class r extends sU{async sign(s,f,w){var h;if(!Vc.HttpRequest.isInstance(s))throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");const{config:E,signer:$,signingRegion:I,signingRegionSet:F,signingName:U}=await fU(w),L=(await((h=E.sigv4aSigningRegionSet)==null?void 0:h.call(E))??F??[I]).join(",");return await $.sign(s,{signingDate:rU(E.systemClockOffset),signingRegion:L,signingService:U})}};Cf(sY,"AwsSdkSigV4ASigner");var Hc=sY,lc=qr(),u7=Ar(),Dc=Cf((r)=>{return r.sigv4aSigningRegionSet=lc.normalizeProvider(r.sigv4aSigningRegionSet),r},"resolveAwsSdkSigV4AConfig"),kc={environmentVariableSelector(r){if(r.AWS_SIGV4A_SIGNING_REGION_SET)return r.AWS_SIGV4A_SIGNING_REGION_SET.split(",").map((s)=>s.trim());throw new u7.ProviderError("AWS_SIGV4A_SIGNING_REGION_SET not set in env.",{tryNextLink:!0})},configFileSelector(r){if(r.sigv4a_signing_region_set)return(r.sigv4a_signing_region_set??"").split(",").map((s)=>s.trim());throw new u7.ProviderError("sigv4a_signing_region_set not set in profile.",{tryNextLink:!0})},default:void 0},yc=tr(),Jw=qr(),t7=o7(),wY=Cf((r)=>{let s=!1,f;if(r.credentials)s=!0,f=Jw.memoizeIdentityProvider(r.credentials,Jw.isIdentityExpired,Jw.doesIdentityRequireRefresh);if(!f)if(r.credentialDefaultProvider)f=Jw.normalizeProvider(r.credentialDefaultProvider(Object.assign({},r,{parentClientConfig:r})));else f=Cf(async()=>{throw new Error("`credentials` is missing")},"normalizedCreds");const{signingEscapePath:w=!0,systemClockOffset:h=r.systemClockOffset||0,sha256:E}=r;let $;if(r.signer)$=Jw.normalizeProvider(r.signer);else if(r.regionInfoProvider)$=Cf(()=>Jw.normalizeProvider(r.region)().then(async(I)=>[await r.regionInfoProvider(I,{useFipsEndpoint:await r.useFipsEndpoint(),useDualstackEndpoint:await r.useDualstackEndpoint()})||{},I]).then(([I,F])=>{const{signingRegion:U,signingService:A}=I;r.signingRegion=r.signingRegion||U||F,r.signingName=r.signingName||A||r.serviceId;const L={...r,credentials:f,region:r.signingRegion,service:r.signingName,sha256:E,uriEscapePath:w};return new(r.signerConstructor||t7.SignatureV4)(L)}),"signer");else $=Cf(async(I)=>{I=Object.assign({},{name:"sigv4",signingName:r.signingName||r.defaultSigningName,signingRegion:await Jw.normalizeProvider(r.region)(),properties:{}},I);const{signingRegion:F,signingName:U}=I;r.signingRegion=r.signingRegion||F,r.signingName=r.signingName||U||r.serviceId;const A={...r,credentials:f,region:r.signingRegion,service:r.signingName,sha256:E,uriEscapePath:w};return new(r.signerConstructor||t7.SignatureV4)(A)},"signer");return{...r,systemClockOffset:h,signingEscapePath:w,credentials:s?async()=>f().then((I)=>yc.setCredentialFeature(I,"CREDENTIALS_CODE","e")):f,signer:$}},"resolveAwsSdkSigV4Config"),Nc=wY});var R3=O((ic)=>{var qc=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",$Y="[:A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD]["+qc+"]*",mc=new RegExp("^"+$Y+"$"),jc=function(r,s){const f=[];let w=s.exec(r);while(w){const h=[];h.startIndex=s.lastIndex-w[0].length;const E=w.length;for(let $=0;$<E;$++)h.push(w[$]);f.push(h),w=s.exec(r)}return f},vc=function(r){const s=mc.exec(r);return!(s===null||typeof s==="undefined")};ic.isExist=function(r){return typeof r!=="undefined"};ic.isEmptyObject=function(r){return Object.keys(r).length===0};ic.merge=function(r,s,f){if(s){const w=Object.keys(s),h=w.length;for(let E=0;E<h;E++)if(f==="strict")r[w[E]]=[s[w[E]]];else r[w[E]]=s[w[E]]}};ic.getValue=function(r){if(ic.isExist(r))return r;else return""};ic.isName=vc;ic.getAllMatches=jc;ic.nameRegexp=$Y});var hU=O((fb)=>{function FY(r){return r===" "||r==="\t"||r==="\n"||r==="\r"}function UY(r,s){const f=s;for(;s<r.length;s++)if(r[s]=="?"||r[s]==" "){const w=r.substr(f,s-f);if(s>5&&w==="xml")return Vr("InvalidXml","XML declaration allowed only at the start of the document.",rf(r,s));else if(r[s]=="?"&&r[s+1]==">"){s++;break}else continue}return s}function TY(r,s){if(r.length>s+5&&r[s+1]==="-"&&r[s+2]==="-"){for(s+=3;s<r.length;s++)if(r[s]==="-"&&r[s+1]==="-"&&r[s+2]===">"){s+=2;break}}else if(r.length>s+8&&r[s+1]==="D"&&r[s+2]==="O"&&r[s+3]==="C"&&r[s+4]==="T"&&r[s+5]==="Y"&&r[s+6]==="P"&&r[s+7]==="E"){let f=1;for(s+=8;s<r.length;s++)if(r[s]==="<")f++;else if(r[s]===">"){if(f--,f===0)break}}else if(r.length>s+9&&r[s+1]==="["&&r[s+2]==="C"&&r[s+3]==="D"&&r[s+4]==="A"&&r[s+5]==="T"&&r[s+6]==="A"&&r[s+7]==="["){for(s+=8;s<r.length;s++)if(r[s]==="]"&&r[s+1]==="]"&&r[s+2]===">"){s+=2;break}}return s}function oc(r,s){let f="",w="",h=!1;for(;s<r.length;s++){if(r[s]===ec||r[s]===nc)if(w==="")w=r[s];else if(w!==r[s]);else w="";else if(r[s]===">"){if(w===""){h=!0;break}}f+=r[s]}if(w!=="")return!1;return{value:f,index:s,tagClosed:h}}function GY(r,s){const f=wU.getAllMatches(r,ac),w={};for(let h=0;h<f.length;h++){if(f[h][1].length===0)return Vr("InvalidAttr","Attribute '"+f[h][2]+"' has no space in starting.",k1(f[h]));else if(f[h][3]!==void 0&&f[h][4]===void 0)return Vr("InvalidAttr","Attribute '"+f[h][2]+"' is without value.",k1(f[h]));else if(f[h][3]===void 0&&!s.allowBooleanAttributes)return Vr("InvalidAttr","boolean attribute '"+f[h][2]+"' is not allowed.",k1(f[h]));const E=f[h][2];if(!tc(E))return Vr("InvalidAttr","Attribute '"+E+"' is an invalid name.",k1(f[h]));if(!w.hasOwnProperty(E))w[E]=1;else return Vr("InvalidAttr","Attribute '"+E+"' is repeated.",k1(f[h]))}return!0}function pc(r,s){let f=/\d/;if(r[s]==="x")s++,f=/[\da-fA-F]/;for(;s<r.length;s++){if(r[s]===";")return s;if(!r[s].match(f))break}return-1}function uc(r,s){if(s++,r[s]===";")return-1;if(r[s]==="#")return s++,pc(r,s);let f=0;for(;s<r.length;s++,f++){if(r[s].match(/\w/)&&f<20)continue;if(r[s]===";")break;return-1}return s}function Vr(r,s,f){return{err:{code:r,msg:s,line:f.line||f,col:f.col}}}function tc(r){return wU.isName(r)}function rb(r){return wU.isName(r)}function rf(r,s){const f=r.substring(0,s).split(/\r?\n/);return{line:f.length,col:f[f.length-1].length+1}}function k1(r){return r.startIndex+r[1].length}var wU=R3(),xc={allowBooleanAttributes:!1,unpairedTags:[]};fb.validate=function(r,s){s=Object.assign({},xc,s);const f=[];let w=!1,h=!1;if(r[0]==="\uFEFF")r=r.substr(1);for(let E=0;E<r.length;E++)if(r[E]==="<"&&r[E+1]==="?"){if(E+=2,E=UY(r,E),E.err)return E}else if(r[E]==="<"){let $=E;if(E++,r[E]==="!"){E=TY(r,E);continue}else{let I=!1;if(r[E]==="/")I=!0,E++;let F="";for(;E<r.length&&r[E]!==">"&&r[E]!==" "&&r[E]!=="\t"&&r[E]!=="\n"&&r[E]!=="\r";E++)F+=r[E];if(F=F.trim(),F[F.length-1]==="/")F=F.substring(0,F.length-1),E--;if(!rb(F)){let L;if(F.trim().length===0)L="Invalid space after '<'.";else L="Tag '"+F+"' is an invalid name.";return Vr("InvalidTag",L,rf(r,E))}const U=oc(r,E);if(U===!1)return Vr("InvalidAttr","Attributes for '"+F+"' have open quote.",rf(r,E));let A=U.value;if(E=U.index,A[A.length-1]==="/"){const L=E-A.length;A=A.substring(0,A.length-1);const S=GY(A,s);if(S===!0)w=!0;else return Vr(S.err.code,S.err.msg,rf(r,L+S.err.line))}else if(I)if(!U.tagClosed)return Vr("InvalidTag","Closing tag '"+F+"' doesn't have proper closing.",rf(r,E));else if(A.trim().length>0)return Vr("InvalidTag","Closing tag '"+F+"' can't have attributes or invalid starting.",rf(r,$));else if(f.length===0)return Vr("InvalidTag","Closing tag '"+F+"' has not been opened.",rf(r,$));else{const L=f.pop();if(F!==L.tagName){let S=rf(r,L.tagStartPos);return Vr("InvalidTag","Expected closing tag '"+L.tagName+"' (opened in line "+S.line+", col "+S.col+") instead of closing tag '"+F+"'.",rf(r,$))}if(f.length==0)h=!0}else{const L=GY(A,s);if(L!==!0)return Vr(L.err.code,L.err.msg,rf(r,E-A.length+L.err.line));if(h===!0)return Vr("InvalidXml","Multiple possible root nodes found.",rf(r,E));else if(s.unpairedTags.indexOf(F)!==-1);else f.push({tagName:F,tagStartPos:$});w=!0}for(E++;E<r.length;E++)if(r[E]==="<")if(r[E+1]==="!"){E++,E=TY(r,E);continue}else if(r[E+1]==="?"){if(E=UY(r,++E),E.err)return E}else break;else if(r[E]==="&"){const L=uc(r,E);if(L==-1)return Vr("InvalidChar","char '&' is not expected.",rf(r,E));E=L}else if(h===!0&&!FY(r[E]))return Vr("InvalidXml","Extra text at the end",rf(r,E));if(r[E]==="<")E--}}else{if(FY(r[E]))continue;return Vr("InvalidChar","char '"+r[E]+"' is not expected.",rf(r,E))}if(!w)return Vr("InvalidXml","Start tag expected.",1);else if(f.length==1)return Vr("InvalidTag","Unclosed tag '"+f[0].tagName+"'.",rf(r,f[0].tagStartPos));else if(f.length>0)return Vr("InvalidXml","Invalid '"+JSON.stringify(f.map((E)=>E.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1});return!0};var ec='"',nc="'",ac=new RegExp('(\\s*)([^\\s=]+)(\\s*=)?(\\s*([\'"])(([\\s\\S])*?)\\5)?',"g")});var LY=O((hb)=>{var AY={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(r,s){return s},attributeValueProcessor:function(r,s){return s},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(r,s,f){return r}},wb=function(r){return Object.assign({},AY,r)};hb.buildOptions=wb;hb.defaultOptions=AY});var WY=O((a0r,CY)=>{class RY{constructor(r){this.tagname=r,this.child=[],this[":@"]={}}add(r,s){if(r==="__proto__")r="#__proto__";this.child.push({[r]:s})}addChild(r){if(r.tagname==="__proto__")r.tagname="#__proto__";if(r[":@"]&&Object.keys(r[":@"]).length>0)this.child.push({[r.tagname]:r.child,[":@"]:r[":@"]});else this.child.push({[r.tagname]:r.child})}}CY.exports=RY});var SY=O((p0r,zY)=>{function Fb(r,s){const f={};if(r[s+3]==="O"&&r[s+4]==="C"&&r[s+5]==="T"&&r[s+6]==="Y"&&r[s+7]==="P"&&r[s+8]==="E"){s=s+9;let w=1,h=!1,E=!1,$="";for(;s<r.length;s++)if(r[s]==="<"&&!E){if(h&&Gb(r,s)){if(s+=7,[entityName,val,s]=Ub(r,s+1),val.indexOf("&")===-1)f[Cb(entityName)]={regx:RegExp(`&${entityName};`,"g"),val}}else if(h&&Ab(r,s))s+=8;else if(h&&Lb(r,s))s+=8;else if(h&&Rb(r,s))s+=9;else if(Tb)E=!0;else throw new Error("Invalid DOCTYPE");w++,$=""}else if(r[s]===">"){if(E){if(r[s-1]==="-"&&r[s-2]==="-")E=!1,w--}else w--;if(w===0)break}else if(r[s]==="[")h=!0;else $+=r[s];if(w!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:f,i:s}}function Ub(r,s){let f="";for(;s<r.length&&(r[s]!=="'"&&r[s]!=='"');s++)f+=r[s];if(f=f.trim(),f.indexOf(" ")!==-1)throw new Error("External entites are not supported");const w=r[s++];let h="";for(;s<r.length&&r[s]!==w;s++)h+=r[s];return[f,h,s]}function Tb(r,s){if(r[s+1]==="!"&&r[s+2]==="-"&&r[s+3]==="-")return!0;return!1}function Gb(r,s){if(r[s+1]==="!"&&r[s+2]==="E"&&r[s+3]==="N"&&r[s+4]==="T"&&r[s+5]==="I"&&r[s+6]==="T"&&r[s+7]==="Y")return!0;return!1}function Ab(r,s){if(r[s+1]==="!"&&r[s+2]==="E"&&r[s+3]==="L"&&r[s+4]==="E"&&r[s+5]==="M"&&r[s+6]==="E"&&r[s+7]==="N"&&r[s+8]==="T")return!0;return!1}function Lb(r,s){if(r[s+1]==="!"&&r[s+2]==="A"&&r[s+3]==="T"&&r[s+4]==="T"&&r[s+5]==="L"&&r[s+6]==="I"&&r[s+7]==="S"&&r[s+8]==="T")return!0;return!1}function Rb(r,s){if(r[s+1]==="!"&&r[s+2]==="N"&&r[s+3]==="O"&&r[s+4]==="T"&&r[s+5]==="A"&&r[s+6]==="T"&&r[s+7]==="I"&&r[s+8]==="O"&&r[s+9]==="N")return!0;return!1}function Cb(r){if(Ib.isName(r))return r;else throw new Error(`Invalid entity name ${r}`)}var Ib=R3();zY.exports=Fb});var XY=O((u0r,YY)=>{function Yb(r,s={}){if(s=Object.assign({},Sb,s),!r||typeof r!=="string")return r;let f=r.trim();if(s.skipLike!==void 0&&s.skipLike.test(f))return r;else if(s.hex&&Wb.test(f))return Number.parseInt(f,16);else{const w=zb.exec(f);if(w){const h=w[1],E=w[2];let $=Xb(w[3]);const I=w[4]||w[6];if(!s.leadingZeros&&E.length>0&&h&&f[2]!==".")return r;else if(!s.leadingZeros&&E.length>0&&!h&&f[1]!==".")return r;else{const F=Number(f),U=""+F;if(U.search(/[eE]/)!==-1)if(s.eNotation)return F;else return r;else if(I)if(s.eNotation)return F;else return r;else if(f.indexOf(".")!==-1)if(U==="0"&&$==="")return F;else if(U===$)return F;else if(h&&U==="-"+$)return F;else return r;if(E)if($===U)return F;else if(h+$===U)return F;else return r;if(f===U)return F;else if(f===h+U)return F;return r}}else return r}}function Xb(r){if(r&&r.indexOf(".")!==-1){if(r=r.replace(/0+$/,""),r===".")r="0";else if(r[0]===".")r="0"+r;else if(r[r.length-1]===".")r=r.substr(0,r.length-1);return r}return r}var Wb=/^[-+]?0x[a-fA-F0-9]+$/,zb=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;if(!Number.parseInt&&window.parseInt)Number.parseInt=window.parseInt;if(!Number.parseFloat&&window.parseFloat)Number.parseFloat=window.parseFloat;var Sb={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};YY.exports=Yb});var JY=O((t0r,PY)=>{function Pb(r){const s=Object.keys(r);for(let f=0;f<s.length;f++){const w=s[f];this.lastEntities[w]={regex:new RegExp("&"+w+";","g"),val:r[w]}}}function Jb(r,s,f,w,h,E,$){if(r!==void 0){if(this.options.trimValues&&!w)r=r.trim();if(r.length>0){if(!$)r=this.replaceEntitiesValue(r);const I=this.options.tagValueProcessor(s,r,f,h,E);if(I===null||I===void 0)return r;else if(typeof I!==typeof r||I!==r)return I;else if(this.options.trimValues)return $U(r,this.options.parseTagValue,this.options.numberParseOptions);else if(r.trim()===r)return $U(r,this.options.parseTagValue,this.options.numberParseOptions);else return r}}}function Qb(r){if(this.options.removeNSPrefix){const s=r.split(":"),f=r.charAt(0)==="/"?"/":"";if(s[0]==="xmlns")return"";if(s.length===2)r=f+s[1]}return r}function Mb(r,s,f){if(!this.options.ignoreAttributes&&typeof r==="string"){const w=KY.getAllMatches(r,Bb),h=w.length,E={};for(let $=0;$<h;$++){const I=this.resolveNameSpace(w[$][1]);let F=w[$][4],U=this.options.attributeNamePrefix+I;if(I.length){if(this.options.transformAttributeName)U=this.options.transformAttributeName(U);if(U==="__proto__")U="#__proto__";if(F!==void 0){if(this.options.trimValues)F=F.trim();F=this.replaceEntitiesValue(F);const A=this.options.attributeValueProcessor(I,F,s);if(A===null||A===void 0)E[U]=F;else if(typeof A!==typeof F||A!==F)E[U]=A;else E[U]=$U(F,this.options.parseAttributeValue,this.options.numberParseOptions)}else if(this.options.allowBooleanAttributes)E[U]=!0}}if(!Object.keys(E).length)return;if(this.options.attributesGroupName){const $={};return $[this.options.attributesGroupName]=E,$}return E}}function Hb(r,s,f){const w=this.options.updateTag(s.tagname,f,s[":@"]);if(w===!1);else if(typeof w==="string")s.tagname=w,r.addChild(s);else r.addChild(s)}function Db(r,s,f,w){if(r){if(w===void 0)w=Object.keys(s.child).length===0;if(r=this.parseTextData(r,s.tagname,f,!1,s[":@"]?Object.keys(s[":@"]).length!==0:!1,w),r!==void 0&&r!=="")s.add(this.options.textNodeName,r);r=""}return r}function kb(r,s,f){const w="*."+f;for(let h in r){const E=r[h];if(w===E||s===E)return!0}return!1}function yb(r,s,f=">"){let w,h="";for(let E=s;E<r.length;E++){let $=r[E];if(w){if($===w)w=""}else if($==='"'||$==="'")w=$;else if($===f[0])if(f[1]){if(r[E+1]===f[1])return{data:h,index:E}}else return{data:h,index:E};else if($==="\t")$=" ";h+=$}}function Qw(r,s,f,w){const h=r.indexOf(s,f);if(h===-1)throw new Error(w);else return h+s.length-1}function EU(r,s,f,w=">"){const h=yb(r,s+1,w);if(!h)return;let E=h.data;const $=h.index,I=E.search(/\s/);let F=E,U=!0;if(I!==-1)F=E.substring(0,I),E=E.substring(I+1).trimStart();const A=F;if(f){const L=F.indexOf(":");if(L!==-1)F=F.substr(L+1),U=F!==h.data.substr(L+1)}return{tagName:F,tagExp:E,closeIndex:$,attrExpPresent:U,rawTagName:A}}function Nb(r,s,f){const w=f;let h=1;for(;f<r.length;f++)if(r[f]==="<")if(r[f+1]==="/"){const E=Qw(r,">",f,`${s} is not closed`);if(r.substring(f+2,E).trim()===s){if(h--,h===0)return{tagContent:r.substring(w,f),i:E}}f=E}else if(r[f+1]==="?")f=Qw(r,"?>",f+1,"StopNode is not closed.");else if(r.substr(f+1,3)==="!--")f=Qw(r,"-->",f+3,"StopNode is not closed.");else if(r.substr(f+1,2)==="![")f=Qw(r,"]]>",f,"StopNode is not closed.")-2;else{const E=EU(r,f,">");if(E){if((E&&E.tagName)===s&&E.tagExp[E.tagExp.length-1]!=="/")h++;f=E.closeIndex}}}function $U(r,s,f){if(s&&typeof r==="string"){const w=r.trim();if(w==="true")return!0;else if(w==="false")return!1;else return Zb(r,f)}else if(KY.isExist(r))return r;else return""}var KY=R3(),y1=WY(),Kb=SY(),Zb=XY();class ZY{constructor(r){this.options=r,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:"\""}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"\xA2"},pound:{regex:/&(pound|#163);/g,val:"\xA3"},yen:{regex:/&(yen|#165);/g,val:"\xA5"},euro:{regex:/&(euro|#8364);/g,val:"\u20AC"},copyright:{regex:/&(copy|#169);/g,val:"\xA9"},reg:{regex:/&(reg|#174);/g,val:"\xAE"},inr:{regex:/&(inr|#8377);/g,val:"\u20B9"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(s,f)=>String.fromCharCode(Number.parseInt(f,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(s,f)=>String.fromCharCode(Number.parseInt(f,16))}},this.addExternalEntities=Pb,this.parseXml=Vb,this.parseTextData=Jb,this.resolveNameSpace=Qb,this.buildAttributesMap=Mb,this.isItStopNode=kb,this.replaceEntitiesValue=lb,this.readStopNodeData=Nb,this.saveTextToParentTag=Db,this.addChild=Hb}}var Bb=new RegExp('([^\\s=]+)\\s*(=\\s*([\'"])([\\s\\S]*?)\\3)?',"gm"),Vb=function(r){r=r.replace(/\r\n?/g,"\n");const s=new y1("!xml");let f=s,w="",h="";for(let E=0;E<r.length;E++)if(r[E]==="<")if(r[E+1]==="/"){const I=Qw(r,">",E,"Closing Tag is not closed.");let F=r.substring(E+2,I).trim();if(this.options.removeNSPrefix){const L=F.indexOf(":");if(L!==-1)F=F.substr(L+1)}if(this.options.transformTagName)F=this.options.transformTagName(F);if(f)w=this.saveTextToParentTag(w,f,h);const U=h.substring(h.lastIndexOf(".")+1);if(F&&this.options.unpairedTags.indexOf(F)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${F}>`);let A=0;if(U&&this.options.unpairedTags.indexOf(U)!==-1)A=h.lastIndexOf(".",h.lastIndexOf(".")-1),this.tagsNodeStack.pop();else A=h.lastIndexOf(".");h=h.substring(0,A),f=this.tagsNodeStack.pop(),w="",E=I}else if(r[E+1]==="?"){let I=EU(r,E,!1,"?>");if(!I)throw new Error("Pi Tag is not closed.");if(w=this.saveTextToParentTag(w,f,h),this.options.ignoreDeclaration&&I.tagName==="?xml"||this.options.ignorePiTags);else{const F=new y1(I.tagName);if(F.add(this.options.textNodeName,""),I.tagName!==I.tagExp&&I.attrExpPresent)F[":@"]=this.buildAttributesMap(I.tagExp,h,I.tagName);this.addChild(f,F,h)}E=I.closeIndex+1}else if(r.substr(E+1,3)==="!--"){const I=Qw(r,"-->",E+4,"Comment is not closed.");if(this.options.commentPropName){const F=r.substring(E+4,I-2);w=this.saveTextToParentTag(w,f,h),f.add(this.options.commentPropName,[{[this.options.textNodeName]:F}])}E=I}else if(r.substr(E+1,2)==="!D"){const I=Kb(r,E);this.docTypeEntities=I.entities,E=I.i}else if(r.substr(E+1,2)==="!["){const I=Qw(r,"]]>",E,"CDATA is not closed.")-2,F=r.substring(E+9,I);w=this.saveTextToParentTag(w,f,h);let U=this.parseTextData(F,f.tagname,h,!0,!1,!0,!0);if(U==null)U="";if(this.options.cdataPropName)f.add(this.options.cdataPropName,[{[this.options.textNodeName]:F}]);else f.add(this.options.textNodeName,U);E=I+2}else{let I=EU(r,E,this.options.removeNSPrefix),F=I.tagName;const U=I.rawTagName;let{tagExp:A,attrExpPresent:L,closeIndex:S}=I;if(this.options.transformTagName)F=this.options.transformTagName(F);if(f&&w){if(f.tagname!=="!xml")w=this.saveTextToParentTag(w,f,h,!1)}const z=f;if(z&&this.options.unpairedTags.indexOf(z.tagname)!==-1)f=this.tagsNodeStack.pop(),h=h.substring(0,h.lastIndexOf("."));if(F!==s.tagname)h+=h?"."+F:F;if(this.isItStopNode(this.options.stopNodes,h,F)){let Z="";if(A.length>0&&A.lastIndexOf("/")===A.length-1){if(F[F.length-1]==="/")F=F.substr(0,F.length-1),h=h.substr(0,h.length-1),A=F;else A=A.substr(0,A.length-1);E=I.closeIndex}else if(this.options.unpairedTags.indexOf(F)!==-1)E=I.closeIndex;else{const M=this.readStopNodeData(r,U,S+1);if(!M)throw new Error(`Unexpected end of ${U}`);E=M.i,Z=M.tagContent}const N=new y1(F);if(F!==A&&L)N[":@"]=this.buildAttributesMap(A,h,F);if(Z)Z=this.parseTextData(Z,F,h,!0,L,!0,!0);h=h.substr(0,h.lastIndexOf(".")),N.add(this.options.textNodeName,Z),this.addChild(f,N,h)}else{if(A.length>0&&A.lastIndexOf("/")===A.length-1){if(F[F.length-1]==="/")F=F.substr(0,F.length-1),h=h.substr(0,h.length-1),A=F;else A=A.substr(0,A.length-1);if(this.options.transformTagName)F=this.options.transformTagName(F);const Z=new y1(F);if(F!==A&&L)Z[":@"]=this.buildAttributesMap(A,h,F);this.addChild(f,Z,h),h=h.substr(0,h.lastIndexOf("."))}else{const Z=new y1(F);if(this.tagsNodeStack.push(f),F!==A&&L)Z[":@"]=this.buildAttributesMap(A,h,F);this.addChild(f,Z,h),f=Z}w="",E=S}}else w+=r[E];return s.child},lb=function(r){if(this.options.processEntities){for(let s in this.docTypeEntities){const f=this.docTypeEntities[s];r=r.replace(f.regx,f.val)}for(let s in this.lastEntities){const f=this.lastEntities[s];r=r.replace(f.regex,f.val)}if(this.options.htmlEntities)for(let s in this.htmlEntities){const f=this.htmlEntities[s];r=r.replace(f.regex,f.val)}r=r.replace(this.ampEntity.regex,this.ampEntity.val)}return r};PY.exports=ZY});var BY=O((ib)=>{function qb(r,s){return QY(r,s)}function QY(r,s,f){let w;const h={};for(let E=0;E<r.length;E++){const $=r[E],I=mb($);let F="";if(f===void 0)F=I;else F=f+"."+I;if(I===s.textNodeName)if(w===void 0)w=$[I];else w+=""+$[I];else if(I===void 0)continue;else if($[I]){let U=QY($[I],s,F);const A=vb(U,s);if($[":@"])jb(U,$[":@"],F,s);else if(Object.keys(U).length===1&&U[s.textNodeName]!==void 0&&!s.alwaysCreateTextNode)U=U[s.textNodeName];else if(Object.keys(U).length===0)if(s.alwaysCreateTextNode)U[s.textNodeName]="";else U="";if(h[I]!==void 0&&h.hasOwnProperty(I)){if(!Array.isArray(h[I]))h[I]=[h[I]];h[I].push(U)}else if(s.isArray(I,F,A))h[I]=[U];else h[I]=U}}if(typeof w==="string"){if(w.length>0)h[s.textNodeName]=w}else if(w!==void 0)h[s.textNodeName]=w;return h}function mb(r){const s=Object.keys(r);for(let f=0;f<s.length;f++){const w=s[f];if(w!==":@")return w}}function jb(r,s,f,w){if(s){const h=Object.keys(s),E=h.length;for(let $=0;$<E;$++){const I=h[$];if(w.isArray(I,f+"."+I,!0,!0))r[I]=[s[I]];else r[I]=s[I]}}}function vb(r,s){const{textNodeName:f}=s,w=Object.keys(r).length;if(w===0)return!0;if(w===1&&(r[f]||typeof r[f]==="boolean"||r[f]===0))return!0;return!1}ib.prettify=qb});var HY=O((fwr,VY)=>{var{buildOptions:db}=LY(),cb=JY(),{prettify:bb}=BY(),_b=hU();class MY{constructor(r){this.externalEntities={},this.options=db(r)}parse(r,s){if(typeof r==="string");else if(r.toString)r=r.toString();else throw new Error("XML data is accepted in String or Bytes[] form.");if(s){if(s===!0)s={};const h=_b.validate(r,s);if(h!==!0)throw Error(`${h.err.msg}:${h.err.line}:${h.err.col}`)}const f=new cb(this.options);f.addExternalEntities(this.externalEntities);const w=f.parseXml(r);if(this.options.preserveOrder||w===void 0)return w;else return bb(w,this.options)}addEntity(r,s){if(s.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");else if(r.indexOf("&")!==-1||r.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");else if(s==="&")throw new Error("An entity with value '&' is not permitted");else this.externalEntities[r]=s}}VY.exports=MY});var NY=O((swr,yY)=>{function gb(r,s){let f="";if(s.format&&s.indentBy.length>0)f="\n";return DY(r,s,"",f)}function DY(r,s,f,w){let h="",E=!1;for(let $=0;$<r.length;$++){const I=r[$],F=xb(I);if(F===void 0)continue;let U="";if(f.length===0)U=F;else U=`${f}.${F}`;if(F===s.textNodeName){let Z=I[F];if(!eb(U,s))Z=s.tagValueProcessor(F,Z),Z=kY(Z,s);if(E)h+=w;h+=Z,E=!1;continue}else if(F===s.cdataPropName){if(E)h+=w;h+=`<![CDATA[${I[F][0][s.textNodeName]}]]>`,E=!1;continue}else if(F===s.commentPropName){h+=w+`<!--${I[F][0][s.textNodeName]}-->`,E=!0;continue}else if(F[0]==="?"){const Z=lY(I[":@"],s),N=F==="?xml"?"":w;let M=I[F][0][s.textNodeName];M=M.length!==0?" "+M:"",h+=N+`<${F}${M}${Z}?>`,E=!0;continue}let A=w;if(A!=="")A+=s.indentBy;const L=lY(I[":@"],s),S=w+`<${F}${L}`,z=DY(I[F],s,U,A);if(s.unpairedTags.indexOf(F)!==-1)if(s.suppressUnpairedNode)h+=S+">";else h+=S+"/>";else if((!z||z.length===0)&&s.suppressEmptyNode)h+=S+"/>";else if(z&&z.endsWith(">"))h+=S+`>${z}${w}</${F}>`;else{if(h+=S+">",z&&w!==""&&(z.includes("/>")||z.includes("</")))h+=w+s.indentBy+z+w;else h+=z;h+=`</${F}>`}E=!0}return h}function xb(r){const s=Object.keys(r);for(let f=0;f<s.length;f++){const w=s[f];if(!r.hasOwnProperty(w))continue;if(w!==":@")return w}}function lY(r,s){let f="";if(r&&!s.ignoreAttributes)for(let w in r){if(!r.hasOwnProperty(w))continue;let h=s.attributeValueProcessor(w,r[w]);if(h=kY(h,s),h===!0&&s.suppressBooleanAttributes)f+=` ${w.substr(s.attributeNamePrefix.length)}`;else f+=` ${w.substr(s.attributeNamePrefix.length)}="${h}"`}return f}function eb(r,s){r=r.substr(0,r.length-s.textNodeName.length-1);let f=r.substr(r.lastIndexOf(".")+1);for(let w in s.stopNodes)if(s.stopNodes[w]===r||s.stopNodes[w]==="*."+f)return!0;return!1}function kY(r,s){if(r&&r.length>0&&s.processEntities)for(let f=0;f<s.entities.length;f++){const w=s.entities[f];r=r.replace(w.regex,w.val)}return r}yY.exports=gb});var mY=O((wwr,qY)=>{function _0(r){if(this.options=Object.assign({},ob,r),this.options.ignoreAttributes||this.options.attributesGroupName)this.isAttribute=function(){return!1};else this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=ub;if(this.processTextOrObjNode=ab,this.options.format)this.indentate=pb,this.tagEndChar=">\n",this.newLine="\n";else this.indentate=function(){return""},this.tagEndChar=">",this.newLine=""}function ab(r,s,f){const w=this.j2x(r,f+1);if(r[this.options.textNodeName]!==void 0&&Object.keys(r).length===1)return this.buildTextValNode(r[this.options.textNodeName],s,w.attrStr,f);else return this.buildObjectNode(w.val,s,w.attrStr,f)}function pb(r){return this.options.indentBy.repeat(r)}function ub(r){if(r.startsWith(this.options.attributeNamePrefix)&&r!==this.options.textNodeName)return r.substr(this.attrPrefixLen);else return!1}var nb=NY(),ob={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(r,s){return s},attributeValueProcessor:function(r,s){return s},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("\'","g"),val:"&apos;"},{regex:new RegExp("\"","g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1};_0.prototype.build=function(r){if(this.options.preserveOrder)return nb(r,this.options);else{if(Array.isArray(r)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1)r={[this.options.arrayNodeName]:r};return this.j2x(r,0).val}};_0.prototype.j2x=function(r,s){let f="",w="";for(let h in r){if(!Object.prototype.hasOwnProperty.call(r,h))continue;if(typeof r[h]==="undefined"){if(this.isAttribute(h))w+=""}else if(r[h]===null)if(this.isAttribute(h))w+="";else if(h[0]==="?")w+=this.indentate(s)+"<"+h+"?"+this.tagEndChar;else w+=this.indentate(s)+"<"+h+"/"+this.tagEndChar;else if(r[h]instanceof Date)w+=this.buildTextValNode(r[h],h,"",s);else if(typeof r[h]!=="object"){const E=this.isAttribute(h);if(E)f+=this.buildAttrPairStr(E,""+r[h]);else if(h===this.options.textNodeName){let $=this.options.tagValueProcessor(h,""+r[h]);w+=this.replaceEntitiesValue($)}else w+=this.buildTextValNode(r[h],h,"",s)}else if(Array.isArray(r[h])){const E=r[h].length;let $="",I="";for(let F=0;F<E;F++){const U=r[h][F];if(typeof U==="undefined");else if(U===null)if(h[0]==="?")w+=this.indentate(s)+"<"+h+"?"+this.tagEndChar;else w+=this.indentate(s)+"<"+h+"/"+this.tagEndChar;else if(typeof U==="object")if(this.options.oneListGroup){const A=this.j2x(U,s+1);if($+=A.val,this.options.attributesGroupName&&U.hasOwnProperty(this.options.attributesGroupName))I+=A.attrStr}else $+=this.processTextOrObjNode(U,h,s);else if(this.options.oneListGroup){let A=this.options.tagValueProcessor(h,U);A=this.replaceEntitiesValue(A),$+=A}else $+=this.buildTextValNode(U,h,"",s)}if(this.options.oneListGroup)$=this.buildObjectNode($,h,I,s);w+=$}else if(this.options.attributesGroupName&&h===this.options.attributesGroupName){const E=Object.keys(r[h]),$=E.length;for(let I=0;I<$;I++)f+=this.buildAttrPairStr(E[I],""+r[h][E[I]])}else w+=this.processTextOrObjNode(r[h],h,s)}return{attrStr:f,val:w}};_0.prototype.buildAttrPairStr=function(r,s){if(s=this.options.attributeValueProcessor(r,""+s),s=this.replaceEntitiesValue(s),this.options.suppressBooleanAttributes&&s==="true")return" "+r;else return" "+r+'="'+s+'"'};_0.prototype.buildObjectNode=function(r,s,f,w){if(r==="")if(s[0]==="?")return this.indentate(w)+"<"+s+f+"?"+this.tagEndChar;else return this.indentate(w)+"<"+s+f+this.closeTag(s)+this.tagEndChar;else{let h="</"+s+this.tagEndChar,E="";if(s[0]==="?")E="?",h="";if((f||f==="")&&r.indexOf("<")===-1)return this.indentate(w)+"<"+s+f+E+">"+r+h;else if(this.options.commentPropName!==!1&&s===this.options.commentPropName&&E.length===0)return this.indentate(w)+`<!--${r}-->`+this.newLine;else return this.indentate(w)+"<"+s+f+E+this.tagEndChar+r+this.indentate(w)+h}};_0.prototype.closeTag=function(r){let s="";if(this.options.unpairedTags.indexOf(r)!==-1){if(!this.options.suppressUnpairedNode)s="/"}else if(this.options.suppressEmptyNode)s="/";else s=`></${r}`;return s};_0.prototype.buildTextValNode=function(r,s,f,w){if(this.options.cdataPropName!==!1&&s===this.options.cdataPropName)return this.indentate(w)+`<![CDATA[${r}]]>`+this.newLine;else if(this.options.commentPropName!==!1&&s===this.options.commentPropName)return this.indentate(w)+`<!--${r}-->`+this.newLine;else if(s[0]==="?")return this.indentate(w)+"<"+s+f+"?"+this.tagEndChar;else{let h=this.options.tagValueProcessor(s,r);if(h=this.replaceEntitiesValue(h),h==="")return this.indentate(w)+"<"+s+f+this.closeTag(s)+this.tagEndChar;else return this.indentate(w)+"<"+s+f+">"+h+"</"+s+this.tagEndChar}};_0.prototype.replaceEntitiesValue=function(r){if(r&&r.length>0&&this.options.processEntities)for(let s=0;s<this.options.entities.length;s++){const f=this.options.entities[s];r=r.replace(f.regex,f.val)}return r};qY.exports=_0});var vY=O((hwr,jY)=>{var tb=hU(),r_=HY(),f_=mY();jY.exports={XMLParser:r_,XMLValidator:tb,XMLBuilder:f_}});var _Y=O((Ewr,bY)=>{var{defineProperty:C3,getOwnPropertyDescriptor:s_,getOwnPropertyNames:w_}=Object,h_=Object.prototype.hasOwnProperty,Wf=(r,s)=>C3(r,"name",{value:s,configurable:!0}),E_=(r,s)=>{for(var f in s)C3(r,f,{get:s[f],enumerable:!0})},$_=(r,s,f,w)=>{if(s&&typeof s==="object"||typeof s==="function"){for(let h of w_(s))if(!h_.call(r,h)&&h!==f)C3(r,h,{get:()=>s[h],enumerable:!(w=s_(s,h))||w.enumerable})}return r},I_=(r)=>$_(C3({},"__esModule",{value:!0}),r),iY={};E_(iY,{_toBool:()=>U_,_toNum:()=>T_,_toStr:()=>F_,awsExpectUnion:()=>A_,loadRestJsonErrorCode:()=>C_,loadRestXmlErrorCode:()=>Y_,parseJsonBody:()=>dY,parseJsonErrorBody:()=>R_,parseXmlBody:()=>cY,parseXmlErrorBody:()=>S_});bY.exports=I_(iY);var F_=Wf((r)=>{if(r==null)return r;if(typeof r==="number"||typeof r==="bigint"){const s=new Error(`Received number ${r} where a string was expected.`);return s.name="Warning",console.warn(s),String(r)}if(typeof r==="boolean"){const s=new Error(`Received boolean ${r} where a string was expected.`);return s.name="Warning",console.warn(s),String(r)}return r},"_toStr"),U_=Wf((r)=>{if(r==null)return r;if(typeof r==="string"){const s=r.toLowerCase();if(r!==""&&s!=="false"&&s!=="true"){const f=new Error(`Received string "${r}" where a boolean was expected.`);f.name="Warning",console.warn(f)}return r!==""&&s!=="false"}return r},"_toBool"),T_=Wf((r)=>{if(r==null)return r;if(typeof r==="string"){const s=Number(r);if(s.toString()!==r){const f=new Error(`Received string "${r}" where a number was expected.`);return f.name="Warning",console.warn(f),r}return s}return r},"_toNum"),G_=$h(),A_=Wf((r)=>{if(r==null)return;if(typeof r==="object"&&"__type"in r)delete r.__type;return G_.expectUnion(r)},"awsExpectUnion"),L_=$h(),OY=Wf((r,s)=>L_.collectBody(r,s).then((f)=>s.utf8Encoder(f)),"collectBodyString"),dY=Wf((r,s)=>OY(r,s).then((f)=>{if(f.length)try{return JSON.parse(f)}catch(w){if((w==null?void 0:w.name)==="SyntaxError")Object.defineProperty(w,"$responseBodyText",{value:f});throw w}return{}}),"parseJsonBody"),R_=Wf(async(r,s)=>{const f=await dY(r,s);return f.message=f.message??f.Message,f},"parseJsonErrorBody"),C_=Wf((r,s)=>{const f=Wf((E,$)=>Object.keys(E).find((I)=>I.toLowerCase()===$.toLowerCase()),"findKey"),w=Wf((E)=>{let $=E;if(typeof $==="number")$=$.toString();if($.indexOf(",")>=0)$=$.split(",")[0];if($.indexOf(":")>=0)$=$.split(":")[0];if($.indexOf("#")>=0)$=$.split("#")[1];return $},"sanitizeErrorCode"),h=f(r.headers,"x-amzn-errortype");if(h!==void 0)return w(r.headers[h]);if(s.code!==void 0)return w(s.code);if(s.__type!==void 0)return w(s.__type)},"loadRestJsonErrorCode"),W_=$h(),z_=vY(),cY=Wf((r,s)=>OY(r,s).then((f)=>{if(f.length){const w=new z_.XMLParser({attributeNamePrefix:"",htmlEntities:!0,ignoreAttributes:!1,ignoreDeclaration:!0,parseTagValue:!1,trimValues:!1,tagValueProcessor:(F,U)=>U.trim()===""&&U.includes("\n")?"":void 0});w.addEntity("#xD","\r"),w.addEntity("#10","\n");let h;try{h=w.parse(f,!0)}catch(F){if(F&&typeof F==="object")Object.defineProperty(F,"$responseBodyText",{value:f});throw F}const E="#text",$=Object.keys(h)[0],I=h[$];if(I[E])I[$]=I[E],delete I[E];return W_.getValueFromTextNode(I)}return{}}),"parseXmlBody"),S_=Wf(async(r,s)=>{const f=await cY(r,s);if(f.Error)f.Error.message=f.Error.message??f.Error.Message;return f},"parseXmlErrorBody"),Y_=Wf((r,s)=>{var f;if(((f=s==null?void 0:s.Error)==null?void 0:f.Code)!==void 0)return s.Error.Code;if((s==null?void 0:s.Code)!==void 0)return s.Code;if(r.statusCode==404)return"NotFound"},"loadRestXmlErrorCode")});var Qr=O((N1)=>{Object.defineProperty(N1,"__esModule",{value:!0});var IU=J7();IU.__exportStar(tr(),N1);IU.__exportStar(EY(),N1);IU.__exportStar(_Y(),N1)});async function gY(r,s,f){const w=f.request;if(typeof s.accountIdEndpointMode==="function")switch(await s.accountIdEndpointMode?.()){case"disabled":Gh.setFeature(r,"ACCOUNT_ID_MODE_DISABLED","Q");break;case"preferred":Gh.setFeature(r,"ACCOUNT_ID_MODE_PREFERRED","P");break;case"required":Gh.setFeature(r,"ACCOUNT_ID_MODE_REQUIRED","R");break}const h=r.__smithy_context?.selectedHttpAuthScheme?.identity;if(h?.$source){const E=h;if(E.accountId)Gh.setFeature(r,"RESOLVED_ACCOUNT_ID","T");for(let[$,I]of Object.entries(E.$source??{}))Gh.setFeature(r,$,I)}}var Gh;var xY=G(()=>{Gh=m(Qr(),1)});var FU="user-agent",W3="x-amz-user-agent",UU=" ",z3="/",eY,nY,TU="-";var oY=G(()=>{eY=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w]/g,nY=/[^\!\$\%\&\'\*\+\-\.\^\_\`\|\~\d\w\#]/g});function aY(r){let s="";for(let f in r){const w=r[f];if(s.length+w.length+1<=1024){if(s.length)s+=","+w;else s+=w;continue}break}return s}var X_=(r)=>(s,f)=>async(w)=>{const{request:h}=w;if(!Mr.isInstance(h))return s(w);const{headers:E}=h,$=f?.userAgent?.map(S3)||[],I=(await r.defaultUserAgentProvider()).map(S3);await gY(f,r,w);const F=f;I.push(`m/${aY(Object.assign({},f.__smithy_context?.features,F.__aws_sdk_context?.features))}`);const U=r?.customUserAgent?.map(S3)||[],A=await r.userAgentAppId();if(A)I.push(S3([`app/${A}`]));const L=dS(),S=(L?[L]:[]).concat([...I,...$,...U]).join(UU),z=[...I.filter((Z)=>Z.startsWith("aws-sdk-")),...U].join(UU);if(r.runtime!=="browser"){if(z)E[W3]=E[W3]?`${E[FU]} ${z}`:z;E[FU]=S}else E[W3]=S;return s({...w,request:h})},S3=(r)=>{const s=r[0].split(z3).map(($)=>$.replace(eY,TU)).join(z3),f=r[1]?.replace(nY,TU),w=s.indexOf(z3),h=s.substring(0,w);let E=s.substring(w+1);if(h==="api")E=E.toLowerCase();return[h,E,f].filter(($)=>$&&$.length>0).reduce(($,I,F)=>{switch(F){case 0:return I;case 1:return`${$}/${I}`;default:return`${$}#${I}`}},"")},K_,Vs=(r)=>({applyToStack:(s)=>{s.add(X_(r),K_)}});var pY=G(()=>{Pw();kr();xY();oY();K_={name:"getUserAgentMiddleware",step:"build",priority:"low",tags:["SET_USER_AGENT","USER_AGENT"],override:!0}});var Bw=G(()=>{tz();pY()});var Ah=(r,s,f)=>{if(!(s in r))return;if(r[s]==="true")return!0;if(r[s]==="false")return!1;throw new Error(`Cannot load ${f} "${s}". Expected "true" or "false", got ${r[s]}.`)};var g0;var uY=G(()=>{(function(r){r.ENV="env",r.CONFIG="shared config entry"})(g0||(g0={}))});var GU=G(()=>{uY()});var Z_="AWS_USE_DUALSTACK_ENDPOINT",P_="use_dualstack_endpoint",Hs;var tY=G(()=>{GU();Hs={environmentVariableSelector:(r)=>Ah(r,Z_,g0.ENV),configFileSelector:(r)=>Ah(r,P_,g0.CONFIG),default:!1}});var J_="AWS_USE_FIPS_ENDPOINT",Q_="use_fips_endpoint",ls;var rX=G(()=>{GU();ls={environmentVariableSelector:(r)=>Ah(r,J_,g0.ENV),configFileSelector:(r)=>Ah(r,Q_,g0.CONFIG),default:!1}});var AU,Vf=(r)=>r[AU.SMITHY_CONTEXT_KEY]||(r[AU.SMITHY_CONTEXT_KEY]={});var fX=G(()=>{AU=m(Ff(),1)});var yr=(r)=>{if(typeof r==="function")return r;const s=Promise.resolve(r);return()=>s};var Es=G(()=>{fX()});var sX=G(()=>{Es()});var wX=G(()=>{Es()});var hX=G(()=>{tY();rX();sX();wX()});var Hf,Ds;var EX=G(()=>{Hf={environmentVariableSelector:(r)=>r.AWS_REGION,configFileSelector:(r)=>r.region,default:()=>{throw new Error("Region is missing")}},Ds={preferredFile:"credentials"}});var Y3=(r)=>typeof r==="string"&&(r.startsWith("fips-")||r.endsWith("-fips"));var LU=(r)=>Y3(r)?["fips-aws-global","aws-fips"].includes(r)?"us-east-1":r.replace(/fips-(dkr-|prod-)?|-fips/,""):r;var $X=()=>{};var ks=(r)=>{const{region:s,useFipsEndpoint:f}=r;if(!s)throw new Error("Region is missing");return{...r,region:async()=>{if(typeof s==="string")return LU(s);const w=await s();return LU(w)},useFipsEndpoint:async()=>{const w=typeof s==="string"?s:await s();if(Y3(w))return!0;return typeof f!=="function"?Promise.resolve(!!f):f()}}};var IX=G(()=>{$X()});var FX=G(()=>{EX();IX()});var UX=()=>{};var TX=()=>{};var GX=()=>{};var AX=G(()=>{UX();TX();GX()});var lf=G(()=>{hX();FX();AX()});function B_(r){return(s)=>async(f)=>{const w=f.request;if(Mr.isInstance(w)){const{body:h,headers:E}=w;if(h&&Object.keys(E).map(($)=>$.toLowerCase()).indexOf(LX)===-1)try{const $=r(h);w.headers={...w.headers,[LX]:String($)}}catch($){}}return s({...f,request:w})}}var LX="content-length",M_,ys=(r)=>({applyToStack:(s)=>{s.add(B_(r.bodyLengthChecker),M_)}});var Lh=G(()=>{kr();M_={step:"build",tags:["SET_CONTENT_LENGTH","CONTENT_LENGTH"],name:"contentLengthMiddleware",override:!0}});var RX=async(r)=>{const s=r?.Bucket||"";if(typeof r.Bucket==="string")r.Bucket=s.replace(/#/g,encodeURIComponent("#")).replace(/\?/g,encodeURIComponent("?"));if(k_(s)){if(r.ForcePathStyle===!0)throw new Error("Path-style addressing cannot be used with ARN buckets")}else if(!D_(s)||s.indexOf(".")!==-1&&!String(r.Endpoint).startsWith("http:")||s.toLowerCase()!==s||s.length<3)r.ForcePathStyle=!0;if(r.DisableMultiRegionAccessPoints)r.disableMultiRegionAccessPoints=!0,r.DisableMRAP=!0;return r},V_,H_,l_,D_=(r)=>V_.test(r)&&!H_.test(r)&&!l_.test(r),k_=(r)=>{const[s,f,w,,,h]=r.split(":"),E=s==="arn"&&r.split(":").length>=6,$=Boolean(E&&f&&w&&h);if(E&&!$)throw new Error(`Invalid ARN: ${r} was an invalid ARN.`);return $};var CX=G(()=>{V_=/^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/,H_=/(\d+\.){3}\d+/,l_=/\.\./});var WX=G(()=>{CX()});var zX=(r,s,f)=>{const w=async()=>{const h=f[r]??f[s];if(typeof h==="function")return h();return h};if(r==="credentialScope"||s==="CredentialScope")return async()=>{const h=typeof f.credentials==="function"?await f.credentials():f.credentials;return h?.credentialScope??h?.CredentialScope};if(r==="accountId"||s==="AccountId")return async()=>{const h=typeof f.credentials==="function"?await f.credentials():f.credentials;return h?.accountId??h?.AccountId};if(r==="endpoint"||s==="endpoint")return async()=>{const h=await w();if(h&&typeof h==="object"){if("url"in h)return h.url.href;if("hostname"in h){const{protocol:E,hostname:$,port:I,path:F}=h;return`${E}//${$}${I?":"+I:""}${F}`}}return h};return w};function X3(r){try{const s=new Set(Array.from(r.match(/([A-Z_]){3,}/g)??[]));return s.delete("CONFIG"),s.delete("CONFIG_PREFIX_SEPARATOR"),s.delete("ENV"),[...s].join(", ")}catch(s){return r}}var SX,YX=(r,s)=>async()=>{try{const f=r(process.env);if(f===void 0)throw new Error;return f}catch(f){throw new SX.CredentialsProviderError(f.message||`Not found in ENV: ${X3(r.toString())}`,{logger:s})}};var XX=G(()=>{SX=m(Ar(),1)});import{homedir as y_}from"os";import{sep as N_}from"path";var RU,q_=()=>{if(process&&process.geteuid)return`${process.geteuid()}`;return"DEFAULT"},x0=()=>{const{HOME:r,USERPROFILE:s,HOMEPATH:f,HOMEDRIVE:w=`C:${N_}`}=process.env;if(r)return r;if(s)return s;if(f)return`${w}${f}`;const h=q_();if(!RU[h])RU[h]=y_();return RU[h]};var Rh=G(()=>{RU={}});var KX="AWS_PROFILE",Df=(r)=>r.profile||process.env.AWS_PROFILE||"default";import{createHash as m_}from"crypto";import{join as j_}from"path";var K3=(r)=>{const f=m_("sha1").update(r).digest("hex");return j_(x0(),".aws","sso","cache",`${f}.json`)};var CU=G(()=>{Rh()});import{promises as v_}from"fs";var i_,Z3=async(r)=>{const s=K3(r),f=await i_(s,"utf8");return JSON.parse(f)};var ZX=G(()=>{CU();({readFile:i_}=v_)});var WU,PX=(r)=>Object.entries(r).filter(([s])=>{const f=s.indexOf(kf);if(f===-1)return!1;return Object.values(WU.IniSectionType).includes(s.substring(0,f))}).reduce((s,[f,w])=>{const h=f.indexOf(kf),E=f.substring(0,h)===WU.IniSectionType.PROFILE?f.substring(h+1):f;return s[E]=w,s},{...r.default&&{default:r.default}});var JX=G(()=>{WU=m(Ff(),1);Ch()});import{join as O_}from"path";var d_="AWS_CONFIG_FILE",P3=()=>process.env[d_]||O_(x0(),".aws","config");var zU=G(()=>{Rh()});import{join as c_}from"path";var b_="AWS_SHARED_CREDENTIALS_FILE",QX=()=>process.env[b_]||c_(x0(),".aws","credentials");var BX=G(()=>{Rh()});var MX,__,g_,q1=(r)=>{const s={};let f,w;for(let h of r.split(/\r?\n/)){const E=h.split(/(^|\s)[;#]/)[0].trim();if(E[0]==="["&&E[E.length-1]==="]"){f=void 0,w=void 0;const I=E.substring(1,E.length-1),F=__.exec(I);if(F){const[,U,,A]=F;if(Object.values(MX.IniSectionType).includes(U))f=[U,A].join(kf)}else f=I;if(g_.includes(I))throw new Error(`Found invalid profile name "${I}"`)}else if(f){const I=E.indexOf("=");if(![0,-1].includes(I)){const[F,U]=[E.substring(0,I).trim(),E.substring(I+1).trim()];if(U==="")w=F;else{if(w&&h.trimStart()===h)w=void 0;s[f]=s[f]||{};const A=w?[w,F].join(kf):F;s[f][A]=U}}}}return s};var SU=G(()=>{MX=m(Ff(),1);Ch();__=/^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/,g_=["__proto__","profile __proto__"]});import{promises as x_}from"fs";var e_,YU,m1=(r,s)=>{if(!YU[r]||s?.ignoreCache)YU[r]=e_(r,"utf8");return YU[r]};var XU=G(()=>{({readFile:e_}=x_),YU={}});import{join as VX}from"path";var HX=()=>({}),kf=".",J3=async(r={})=>{const{filepath:s=QX(),configFilepath:f=P3()}=r,w=x0();let E=s;if(s.startsWith("~/"))E=VX(w,s.slice(2));let $=f;if(f.startsWith("~/"))$=VX(w,f.slice(2));const I=await Promise.all([m1($,{ignoreCache:r.ignoreCache}).then(q1).then(PX).catch(HX),m1(E,{ignoreCache:r.ignoreCache}).then(q1).catch(HX)]);return{configFile:I[0],credentialsFile:I[1]}};var Ch=G(()=>{JX();zU();BX();Rh();SU();XU()});var lX,DX=(r)=>Object.entries(r).filter(([s])=>s.startsWith(lX.IniSectionType.SSO_SESSION+kf)).reduce((s,[f,w])=>({...s,[f.substring(f.indexOf(kf)+1)]:w}),{});var kX=G(()=>{lX=m(Ff(),1);Ch()});var n_=()=>({}),Q3=async(r={})=>m1(r.configFilepath??P3()).then(q1).then(DX).catch(n_);var yX=G(()=>{zU();kX();SU();XU()});var NX=(...r)=>{const s={};for(let f of r)for(let[w,h]of Object.entries(f))if(s[w]!==void 0)Object.assign(s[w],h);else s[w]=h;return s};var e0=async(r)=>{const s=await J3(r);return NX(s.configFile,s.credentialsFile)};var qX=G(()=>{Ch()});var mX=()=>{};var $s=G(()=>{Rh();CU();ZX();Ch();yX();qX();mX()});var jX,vX=(r,{preferredFile:s="config",...f}={})=>async()=>{const w=Df(f),{configFile:h,credentialsFile:E}=await J3(f),$=E[w]||{},I=h[w]||{},F=s==="config"?{...$,...I}:{...I,...$};try{const A=r(F,s==="config"?h:E);if(A===void 0)throw new Error;return A}catch(U){throw new jX.CredentialsProviderError(U.message||`Not found in config files w/ profile [${w}]: ${X3(r.toString())}`,{logger:f.logger})}};var iX=G(()=>{jX=m(Ar(),1);$s()});var OX,o_=(r)=>typeof r==="function",dX=(r)=>o_(r)?async()=>await r():OX.fromStatic(r);var cX=G(()=>{OX=m(Ar(),1)});var B3,u=({environmentVariableSelector:r,configFileSelector:s,default:f},w={})=>B3.memoize(B3.chain(YX(r),vX(s,w),dX(f)));var bX=G(()=>{B3=m(Ar(),1);XX();iX();cX()});var Ns=G(()=>{bX()});var _X="AWS_ENDPOINT_URL",gX="endpoint_url",xX=(r)=>({environmentVariableSelector:(s)=>{const f=r.split(" ").map((E)=>E.toUpperCase()),w=s[[_X,...f].join("_")];if(w)return w;const h=s[_X];if(h)return h;return},configFileSelector:(s,f)=>{if(f&&s.services){const h=f[["services",s.services].join(kf)];if(h){const E=r.split(" ").map((I)=>I.toLowerCase()),$=h[[E.join("_"),gX].join(kf)];if($)return $}}const w=s[gX];if(w)return w;return},default:void 0});var eX=G(()=>{$s()});var M3=async(r)=>u(xX(r??""))();var KU=G(()=>{Ns();eX()});function nX(r){const s={};if(r=r.replace(/^\?/,""),r)for(let f of r.split("&")){let[w,h=null]=f.split("=");if(w=decodeURIComponent(w),h)h=decodeURIComponent(h);if(!(w in s))s[w]=h;else if(Array.isArray(s[w]))s[w].push(h);else s[w]=[s[w],h]}return s}var br=(r)=>{if(typeof r==="string")return br(new URL(r));const{hostname:s,pathname:f,port:w,protocol:h,search:E}=r;let $;if(E)$=nX(E);return{hostname:s,port:w?parseInt(w):void 0,protocol:h,path:f,query:$}};var n0=()=>{};var V3=(r)=>{if(typeof r==="object"){if("url"in r)return br(r.url);return r}return br(r)};var H3=G(()=>{n0()});var oX=async(r,s,f,w)=>{if(!f.endpoint){let $;if(f.serviceConfiguredEndpoint)$=await f.serviceConfiguredEndpoint();else $=await M3(f.serviceId);if($)f.endpoint=()=>Promise.resolve(V3($))}const h=await a_(r,s,f);if(typeof f.endpointProvider!=="function")throw new Error("config.endpointProvider is not set.");return f.endpointProvider(h,w)},a_=async(r,s,f)=>{const w={},h=s?.getEndpointParameterInstructions?.()||{};for(let[E,$]of Object.entries(h))switch($.type){case"staticContextParams":w[E]=$.value;break;case"contextParams":w[E]=r[$.name];break;case"clientContextParams":case"builtInParams":w[E]=await zX($.name,E,f)();break;default:throw new Error("Unrecognized endpoint parameter instruction: "+JSON.stringify($))}if(Object.keys(h).length===0)Object.assign(w,f);if(String(f.serviceId).toLowerCase()==="s3")await RX(w);return w};var ZU=G(()=>{WX();KU();H3()});var aX=G(()=>{ZU();H3()});var pX=({config:r,instructions:s})=>{return(f,w)=>async(h)=>{const E=await oX(h.input,{getEndpointParameterInstructions(){return s}},{...r},w);w.endpointV2=E,w.authSchemes=E.properties?.authSchemes;const $=w.authSchemes?.[0];if($){w.signing_region=$.signingRegion,w.signing_service=$.signingName;const F=Vf(w)?.selectedHttpAuthScheme?.httpAuthOption;if(F)F.signingProperties=Object.assign(F.signingProperties||{},{signing_region:$.signingRegion,signingRegion:$.signingRegion,signing_service:$.signingName,signingName:$.signingName,signingRegionSet:$.signingRegionSet},$.properties)}return f({...h})}};var PU=G(()=>{Es();ZU()});var uX=(r,s)=>(f)=>async(w)=>{const{response:h}=await f(w);try{const E=await s(h,r);return{response:h,output:E}}catch(E){if(Object.defineProperty(E,"$response",{value:h}),!("$metadata"in E)){if(E.message+="\n Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.",typeof E.$responseBodyText!=="undefined"){if(E.$response)E.$response.body=E.$responseBodyText}}throw E}};var tX=(r,s)=>(f,w)=>async(h)=>{const E=w.endpointV2?.url&&r.urlParser?async()=>r.urlParser(w.endpointV2.url):r.endpoint;if(!E)throw new Error("No valid endpoint provider available.");const $=await s(h.input,{...r,endpoint:E});return f({...h,request:$})};function C(r,s,f){return{applyToStack:(w)=>{w.add(uX(r,f),p_),w.add(tX(r,s),JU)}}}var p_,JU;var rK=G(()=>{p_={name:"deserializerMiddleware",step:"deserialize",tags:["DESERIALIZER"],override:!0},JU={name:"serializerMiddleware",step:"serialize",tags:["SERIALIZER"],override:!0}});var V=G(()=>{rK()});var u_,W=(r,s)=>({applyToStack:(f)=>{f.addRelativeTo(pX({config:r,instructions:s}),u_)}});var fK=G(()=>{V();PU();u_={step:"serialize",tags:["ENDPOINT_PARAMETERS","ENDPOINT_V2","ENDPOINT"],name:"endpointV2Middleware",override:!0,relation:"before",toMiddleware:JU.name}});var qs=(r)=>{const s=r.tls??!0,{endpoint:f}=r,w=f!=null?async()=>V3(await yr(f)()):void 0,E={...r,endpoint:w,tls:s,isCustomEndpoint:!!f,useDualstackEndpoint:yr(r.useDualstackEndpoint??!1),useFipsEndpoint:yr(r.useFipsEndpoint??!1)};let $=void 0;return E.serviceConfiguredEndpoint=async()=>{if(r.serviceId&&!$)$=M3(r.serviceId);return $},E};var sK=G(()=>{Es();KU();H3()});var wK=()=>{};var B=G(()=>{aX();PU();fK();sK();wK()});var yf,Mw=3,Nf;var l3=G(()=>{(function(r){r.STANDARD="standard",r.ADAPTIVE="adaptive"})(yf||(yf={}));Nf=yf.STANDARD});var hK,EK,$K,IK;var FK=G(()=>{hK=["BandwidthLimitExceeded","EC2ThrottledException","LimitExceededException","PriorRequestNotComplete","ProvisionedThroughputExceededException","RequestLimitExceeded","RequestThrottled","RequestThrottledException","SlowDown","ThrottledException","Throttling","ThrottlingException","TooManyRequestsException","TransactionInProgressException"],EK=["TimeoutError","RequestTimeout","RequestTimeoutException"],$K=[500,502,503,504],IK=["ECONNRESET","ECONNREFUSED","EPIPE","ETIMEDOUT"]});var t_=(r)=>r.$metadata?.clockSkewCorrected,Wh=(r)=>r.$metadata?.httpStatusCode===429||hK.includes(r.name)||r.$retryable?.throttling==!0,D3=(r)=>t_(r)||EK.includes(r.name)||IK.includes(r?.code||"")||$K.includes(r.$metadata?.httpStatusCode||0),UK=(r)=>{if(r.$metadata?.httpStatusCode!==void 0){const s=r.$metadata.httpStatusCode;if(500<=s&&s<=599&&!D3(r))return!0;return!1}return!1};var j1=G(()=>{FK()});class k3{constructor(r){this.currentCapacity=0,this.enabled=!1,this.lastMaxRate=0,this.measuredTxRate=0,this.requestCount=0,this.lastTimestamp=0,this.timeWindow=0,this.beta=r?.beta??0.7,this.minCapacity=r?.minCapacity??1,this.minFillRate=r?.minFillRate??0.5,this.scaleConstant=r?.scaleConstant??0.4,this.smooth=r?.smooth??0.8;const s=this.getCurrentTimeInSeconds();this.lastThrottleTime=s,this.lastTxRateBucket=Math.floor(this.getCurrentTimeInSeconds()),this.fillRate=this.minFillRate,this.maxCapacity=this.minCapacity}getCurrentTimeInSeconds(){return Date.now()/1000}async getSendToken(){return this.acquireTokenBucket(1)}async acquireTokenBucket(r){if(!this.enabled)return;if(this.refillTokenBucket(),r>this.currentCapacity){const s=(r-this.currentCapacity)/this.fillRate*1000;await new Promise((f)=>setTimeout(f,s))}this.currentCapacity=this.currentCapacity-r}refillTokenBucket(){const r=this.getCurrentTimeInSeconds();if(!this.lastTimestamp){this.lastTimestamp=r;return}const s=(r-this.lastTimestamp)*this.fillRate;this.currentCapacity=Math.min(this.maxCapacity,this.currentCapacity+s),this.lastTimestamp=r}updateClientSendingRate(r){let s;if(this.updateMeasuredRate(),Wh(r)){const w=!this.enabled?this.measuredTxRate:Math.min(this.measuredTxRate,this.fillRate);this.lastMaxRate=w,this.calculateTimeWindow(),this.lastThrottleTime=this.getCurrentTimeInSeconds(),s=this.cubicThrottle(w),this.enableTokenBucket()}else this.calculateTimeWindow(),s=this.cubicSuccess(this.getCurrentTimeInSeconds());const f=Math.min(s,2*this.measuredTxRate);this.updateTokenBucketRate(f)}calculateTimeWindow(){this.timeWindow=this.getPrecise(Math.pow(this.lastMaxRate*(1-this.beta)/this.scaleConstant,0.3333333333333333))}cubicThrottle(r){return this.getPrecise(r*this.beta)}cubicSuccess(r){return this.getPrecise(this.scaleConstant*Math.pow(r-this.lastThrottleTime-this.timeWindow,3)+this.lastMaxRate)}enableTokenBucket(){this.enabled=!0}updateTokenBucketRate(r){this.refillTokenBucket(),this.fillRate=Math.max(r,this.minFillRate),this.maxCapacity=Math.max(r,this.minCapacity),this.currentCapacity=Math.min(this.currentCapacity,this.maxCapacity)}updateMeasuredRate(){const r=this.getCurrentTimeInSeconds(),s=Math.floor(r*2)/2;if(this.requestCount++,s>this.lastTxRateBucket){const f=this.requestCount/(s-this.lastTxRateBucket);this.measuredTxRate=this.getPrecise(f*this.smooth+this.measuredTxRate*(1-this.smooth)),this.requestCount=0,this.lastTxRateBucket=s}}getPrecise(r){return parseFloat(r.toFixed(8))}}var QU=G(()=>{j1()});var Vw=100,v1=20000,BU=500,y3=500,MU=5,VU=10,HU=1,N3="amz-sdk-invocation-id",q3="amz-sdk-request";var TK=()=>{let r=Vw;return{computeNextBackoffDelay:(w)=>{return Math.floor(Math.min(v1,Math.random()*2**w*r))},setDelayBase:(w)=>{r=w}}};var GK=()=>{};var lU=({retryDelay:r,retryCount:s,retryCost:f})=>{return{getRetryCount:()=>s,getRetryDelay:()=>Math.min(v1,r),getRetryCost:()=>f}};var AK=()=>{};class zh{constructor(r){this.maxAttempts=r,this.mode=yf.STANDARD,this.capacity=y3,this.retryBackoffStrategy=TK(),this.maxAttemptsProvider=typeof r==="function"?r:async()=>r}async acquireInitialRetryToken(r){return lU({retryDelay:Vw,retryCount:0})}async refreshRetryTokenForRetry(r,s){const f=await this.getMaxAttempts();if(this.shouldRetry(r,s,f)){const w=s.errorType;this.retryBackoffStrategy.setDelayBase(w==="THROTTLING"?BU:Vw);const h=this.retryBackoffStrategy.computeNextBackoffDelay(r.getRetryCount()),E=s.retryAfterHint?Math.max(s.retryAfterHint.getTime()-Date.now()||0,h):h,$=this.getCapacityCost(w);return this.capacity-=$,lU({retryDelay:E,retryCount:r.getRetryCount()+1,retryCost:$})}throw new Error("No retry token available")}recordSuccess(r){this.capacity=Math.max(y3,this.capacity+(r.getRetryCost()??HU))}getCapacity(){return this.capacity}async getMaxAttempts(){try{return await this.maxAttemptsProvider()}catch(r){return console.warn(`Max attempts provider could not resolve. Using default of ${Mw}`),Mw}}shouldRetry(r,s,f){return r.getRetryCount()+1<f&&this.capacity>=this.getCapacityCost(s.errorType)&&this.isRetryableError(s.errorType)}getCapacityCost(r){return r==="TRANSIENT"?VU:MU}isRetryableError(r){return r==="THROTTLING"||r==="TRANSIENT"}}var m3=G(()=>{l3();GK();AK()});class DU{constructor(r,s){this.maxAttemptsProvider=r,this.mode=yf.ADAPTIVE;const{rateLimiter:f}=s??{};this.rateLimiter=f??new k3,this.standardRetryStrategy=new zh(r)}async acquireInitialRetryToken(r){return await this.rateLimiter.getSendToken(),this.standardRetryStrategy.acquireInitialRetryToken(r)}async refreshRetryTokenForRetry(r,s){return this.rateLimiter.updateClientSendingRate(s),this.standardRetryStrategy.refreshRetryTokenForRetry(r,s)}recordSuccess(r){this.rateLimiter.updateClientSendingRate({}),this.standardRetryStrategy.recordSuccess(r)}}var LK=G(()=>{l3();QU();m3()});var RK=G(()=>{m3()});var CK=()=>{};var zf=G(()=>{LK();RK();QU();m3();l3();CK()});var ms,I$r,F$r,WK,U$r,T$r,G$r,A$r,L$r,R$r;var zK=G(()=>{ms=m(n6(),1),I$r=ms.default.v1,F$r=ms.default.v3,WK=ms.default.v4,U$r=ms.default.v5,T$r=ms.default.NIL,G$r=ms.default.version,A$r=ms.default.validate,L$r=ms.default.stringify,R$r=ms.default.parse});var SK=G(()=>{zf()});var kU=G(()=>{zf()});var yU=G(()=>{j1()});var NU=(r)=>{if(r instanceof Error)return r;if(r instanceof Object)return Object.assign(new Error,r);if(typeof r==="string")return new Error(r);return new Error(`AWS SDK error wrapper for ${r}`)};var qU=G(()=>{kr();j1();zf();SK();kU();yU()});var YK=G(()=>{zf();qU()});var XK="AWS_MAX_ATTEMPTS",KK="max_attempts",js,vs=(r)=>{const{retryStrategy:s}=r,f=yr(r.maxAttempts??Mw);return{...r,maxAttempts:f,retryStrategy:async()=>{if(s)return s;if(await yr(r.retryMode)()===yf.ADAPTIVE)return new DU(f);return new zh(f)}}},rg="AWS_RETRY_MODE",fg="retry_mode",is;var ZK=G(()=>{Es();zf();js={environmentVariableSelector:(r)=>{const s=r[XK];if(!s)return;const f=parseInt(s);if(Number.isNaN(f))throw new Error(`Environment variable ${XK} mast be a number, got "${s}"`);return f},configFileSelector:(r)=>{const s=r[KK];if(!s)return;const f=parseInt(s);if(Number.isNaN(f))throw new Error(`Shared config file entry ${KK} mast be a number, got "${s}"`);return f},default:Mw},is={environmentVariableSelector:(r)=>r[rg],configFileSelector:(r)=>r[fg],default:Nf}});var PK=G(()=>{kr();zf()});var Hw=(r,s)=>{const f=[];if(r)f.push(r);if(s)for(let w of s)f.push(w);return f},o0=(r,s)=>{return`${r||"anonymous"}${s&&s.length>0?` (a.k.a. ${s.join(",")})`:""}`},Sh=()=>{let r=[],s=[],f=!1;const w=new Set,h=(L)=>L.sort((S,z)=>JK[z.step]-JK[S.step]||QK[z.priority||"normal"]-QK[S.priority||"normal"]),E=(L)=>{let S=!1;const z=(Z)=>{const N=Hw(Z.name,Z.aliases);if(N.includes(L)){S=!0;for(let M of N)w.delete(M);return!1}return!0};return r=r.filter(z),s=s.filter(z),S},$=(L)=>{let S=!1;const z=(Z)=>{if(Z.middleware===L){S=!0;for(let N of Hw(Z.name,Z.aliases))w.delete(N);return!1}return!0};return r=r.filter(z),s=s.filter(z),S},I=(L)=>{return r.forEach((S)=>{L.add(S.middleware,{...S})}),s.forEach((S)=>{L.addRelativeTo(S.middleware,{...S})}),L.identifyOnResolve?.(A.identifyOnResolve()),L},F=(L)=>{const S=[];return L.before.forEach((z)=>{if(z.before.length===0&&z.after.length===0)S.push(z);else S.push(...F(z))}),S.push(L),L.after.reverse().forEach((z)=>{if(z.before.length===0&&z.after.length===0)S.push(z);else S.push(...F(z))}),S},U=(L=!1)=>{const S=[],z=[],Z={};return r.forEach((M)=>{const l={...M,before:[],after:[]};for(let k of Hw(l.name,l.aliases))Z[k]=l;S.push(l)}),s.forEach((M)=>{const l={...M,before:[],after:[]};for(let k of Hw(l.name,l.aliases))Z[k]=l;z.push(l)}),z.forEach((M)=>{if(M.toMiddleware){const l=Z[M.toMiddleware];if(l===void 0){if(L)return;throw new Error(`${M.toMiddleware} is not found when adding ${o0(M.name,M.aliases)} middleware ${M.relation} ${M.toMiddleware}`)}if(M.relation==="after")l.after.push(M);if(M.relation==="before")l.before.push(M)}}),h(S).map(F).reduce((M,l)=>{return M.push(...l),M},[])},A={add:(L,S={})=>{const{name:z,override:Z,aliases:N}=S,M={step:"initialize",priority:"normal",middleware:L,...S},l=Hw(z,N);if(l.length>0){if(l.some((k)=>w.has(k))){if(!Z)throw new Error(`Duplicate middleware name '${o0(z,N)}'`);for(let k of l){const i=r.findIndex((sr)=>sr.name===k||sr.aliases?.some((Br)=>Br===k));if(i===-1)continue;const e=r[i];if(e.step!==M.step||M.priority!==e.priority)throw new Error(`"${o0(e.name,e.aliases)}" middleware with ${e.priority} priority in ${e.step} step cannot be overridden by "${o0(z,N)}" middleware with ${M.priority} priority in ${M.step} step.`);r.splice(i,1)}}for(let k of l)w.add(k)}r.push(M)},addRelativeTo:(L,S)=>{const{name:z,override:Z,aliases:N}=S,M={middleware:L,...S},l=Hw(z,N);if(l.length>0){if(l.some((k)=>w.has(k))){if(!Z)throw new Error(`Duplicate middleware name '${o0(z,N)}'`);for(let k of l){const i=s.findIndex((sr)=>sr.name===k||sr.aliases?.some((Br)=>Br===k));if(i===-1)continue;const e=s[i];if(e.toMiddleware!==M.toMiddleware||e.relation!==M.relation)throw new Error(`"${o0(e.name,e.aliases)}" middleware ${e.relation} "${e.toMiddleware}" middleware cannot be overridden by "${o0(z,N)}" middleware ${M.relation} "${M.toMiddleware}" middleware.`);s.splice(i,1)}}for(let k of l)w.add(k)}s.push(M)},clone:()=>I(Sh()),use:(L)=>{L.applyToStack(A)},remove:(L)=>{if(typeof L==="string")return E(L);else return $(L)},removeByTag:(L)=>{let S=!1;const z=(Z)=>{const{tags:N,name:M,aliases:l}=Z;if(N&&N.includes(L)){const k=Hw(M,l);for(let i of k)w.delete(i);return S=!0,!1}return!0};return r=r.filter(z),s=s.filter(z),S},concat:(L)=>{const S=I(Sh());return S.use(L),S.identifyOnResolve(f||S.identifyOnResolve()||(L.identifyOnResolve?.()??!1)),S},applyToStack:I,identify:()=>{return U(!0).map((L)=>{const S=L.step??L.relation+" "+L.toMiddleware;return o0(L.name,L.aliases)+" - "+S})},identifyOnResolve(L){if(typeof L==="boolean")f=L;return f},resolve:(L,S)=>{for(let z of U().map((Z)=>Z.middleware).reverse())L=z(L,S);if(f)console.log(A.identify());return L}};return A},JK,QK;var BK=G(()=>{JK={initialize:5,serialize:4,build:3,finalizeRequest:2,deserialize:1},QK={high:3,normal:2,low:1}});var mU=G(()=>{BK()});class Sf{constructor(r){this.config=r,this.middlewareStack=Sh()}send(r,s,f){const w=typeof s!=="function"?s:void 0,h=typeof s==="function"?s:f,E=w===void 0&&this.config.cacheMiddleware===!0;let $;if(E){if(!this.handlers)this.handlers=new WeakMap;const I=this.handlers;if(I.has(r.constructor))$=I.get(r.constructor);else $=r.resolveMiddleware(this.middlewareStack,this.config,w),I.set(r.constructor,$)}else delete this.handlers,$=r.resolveMiddleware(this.middlewareStack,this.config,w);if(h)$(r).then((I)=>h(null,I.output),(I)=>h(I)).catch(()=>{});else return $(r).then((I)=>I.output)}destroy(){this.config?.requestHandler?.destroy?.(),delete this.handlers}}var MK=G(()=>{mU()});var VK=(r)=>typeof ArrayBuffer==="function"&&r instanceof ArrayBuffer||Object.prototype.toString.call(r)==="[object ArrayBuffer]";import{Buffer as jU}from"buffer";var z0=(r,s=0,f=r.byteLength-s)=>{if(!VK(r))throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof r} (${r})`);return jU.from(r,s,f)},Yh=(r,s)=>{if(typeof r!=="string")throw new TypeError(`The "input" argument must be of type string. Received type ${typeof r} (${r})`);return s?jU.from(r,s):jU.from(r)};var lw=()=>{};var sg,Uf=(r)=>{if(r.length*3%4!==0)throw new TypeError("Incorrect padding on base64 string.");if(!sg.exec(r))throw new TypeError("Invalid base64 string.");const s=Yh(r,"base64");return new Uint8Array(s.buffer,s.byteOffset,s.byteLength)};var HK=G(()=>{lw();sg=/^[A-Za-z0-9+/]*={0,2}$/});var _r=(r)=>{const s=Yh(r,"utf8");return new Uint8Array(s.buffer,s.byteOffset,s.byteLength/Uint8Array.BYTES_PER_ELEMENT)};var vU=G(()=>{lw()});var lK=(r)=>{if(typeof r==="string")return _r(r);if(ArrayBuffer.isView(r))return new Uint8Array(r.buffer,r.byteOffset,r.byteLength/Uint8Array.BYTES_PER_ELEMENT);return new Uint8Array(r)};var DK=G(()=>{vU()});var Tf=(r)=>{if(typeof r==="string")return r;if(typeof r!=="object"||typeof r.byteOffset!=="number"||typeof r.byteLength!=="number")throw new Error("@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.");return z0(r.buffer,r.byteOffset,r.byteLength).toString("utf8")};var kK=G(()=>{lw()});var Os=G(()=>{vU();DK();kK()});var Gf=(r)=>{let s;if(typeof r==="string")s=_r(r);else s=r;if(typeof s!=="object"||typeof s.byteOffset!=="number"||typeof s.byteLength!=="number")throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.");return z0(s.buffer,s.byteOffset,s.byteLength).toString("base64")};var yK=G(()=>{lw();Os()});var S0=G(()=>{HK();yK()});function NK(r,s="utf-8"){if(s==="base64")return Gf(r);return Tf(r)}function qK(r,s){if(s==="base64")return Y0.mutate(Uf(r));return Y0.mutate(_r(r))}var mK=G(()=>{S0();Os();iU()});var Y0;var iU=G(()=>{mK();Y0=class Y0 extends Uint8Array{static fromString(r,s="utf-8"){switch(typeof r){case"string":return qK(r,s);default:throw new Error(`Unsupported conversion from ${typeof r} to Uint8ArrayBlobAdapter.`)}}static mutate(r){return Object.setPrototypeOf(r,Y0.prototype),r}transformToString(r="utf-8"){return NK(this,r)}}});var jK=()=>{};var i1=(r)=>encodeURIComponent(r).replace(/[!'()*]/g,wg),wg=(r)=>`%${r.charCodeAt(0).toString(16).toUpperCase()}`;var vK=()=>{};var iK=G(()=>{vK()});function j3(r){const s=[];for(let f of Object.keys(r).sort()){const w=r[f];if(f=i1(f),Array.isArray(w))for(let h=0,E=w.length;h<E;h++)s.push(`${f}=${i1(w[h])}`);else{let h=f;if(w||typeof w==="string")h+=`=${i1(w)}`;s.push(h)}}return s.join("&")}var v3=G(()=>{iK()});var OK;var dK=G(()=>{OK=["ECONNRESET","EPIPE","ETIMEDOUT"]});var OU=(r)=>{const s={};for(let f of Object.keys(r)){const w=r[f];s[f]=Array.isArray(w)?w.join(","):w}return s};var dU=()=>{};var cK=(r,s,f=0)=>{if(!f)return-1;const w=(h)=>{const E=setTimeout(()=>{r.destroy(),s(Object.assign(new Error(`Socket timed out without establishing a connection within ${f} ms`),{name:"TimeoutError"}))},f-h),$=(I)=>{if(I?.connecting)I.on("connect",()=>{clearTimeout(E)});else clearTimeout(E)};if(r.socket)$(r.socket);else r.on("socket",$)};if(f<2000)return w(0),0;return setTimeout(w.bind(null,1000),1000)};var bK=(r,{keepAlive:s,keepAliveMsecs:f},w=3000)=>{if(s!==!0)return-1;const h=()=>{if(r.socket)r.socket.setKeepAlive(s,f||0);else r.on("socket",(E)=>{E.setKeepAlive(s,f||0)})};if(w===0)return h(),0;return setTimeout(h,w)};var _K=(r,s,f=0)=>{const w=(h)=>{r.setTimeout(f-h,()=>{r.destroy(),s(Object.assign(new Error(`Connection timed out after ${f} ms`),{name:"TimeoutError"}))})};if(0<f&&f<6000)return w(0),0;return setTimeout(w.bind(null,f===0?0:3000),3000)};import{Readable as hg}from"stream";async function cU(r,s,f=gK){const w=s.headers??{},h=w.Expect||w.expect;let E=-1,$=!1;if(h==="100-continue")await Promise.race([new Promise((I)=>{E=Number(setTimeout(I,Math.max(gK,f)))}),new Promise((I)=>{r.on("continue",()=>{clearTimeout(E),I()}),r.on("error",()=>{$=!0,clearTimeout(E),I()})})]);if(!$)Eg(r,s.body)}function Eg(r,s){if(s instanceof hg){s.pipe(r);return}if(s){if(Buffer.isBuffer(s)||typeof s==="string"){r.end(s);return}const f=s;if(typeof f==="object"&&f.buffer&&typeof f.byteOffset==="number"&&typeof f.byteLength==="number"){r.end(Buffer.from(f.buffer,f.byteOffset,f.byteLength));return}r.end(Buffer.from(s));return}r.end()}var gK=1000;var bU=()=>{};import{Agent as xK,request as $g}from"http";import{Agent as eK,request as Ig}from"https";class ff{static create(r){if(typeof r?.handle==="function")return r;return new ff(r)}static checkSocketUsage(r,s,f=console){const{sockets:w,requests:h,maxSockets:E}=r;if(typeof E!=="number"||E===1/0)return s;const $=15000;if(Date.now()-$<s)return s;if(w&&h)for(let I in w){const F=w[I]?.length??0,U=h[I]?.length??0;if(F>=E&&U>=2*E)return f?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${F} and ${U} additional requests are enqueued.
20
+ See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
21
+ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`),Date.now()}return s}constructor(r){this.socketWarningTimestamp=0,this.metadata={handlerProtocol:"http/1.1"},this.configProvider=new Promise((s,f)=>{if(typeof r==="function")r().then((w)=>{s(this.resolveDefaultConfig(w))}).catch(f);else s(this.resolveDefaultConfig(r))})}resolveDefaultConfig(r){const{requestTimeout:s,connectionTimeout:f,socketTimeout:w,httpAgent:h,httpsAgent:E}=r||{};return{connectionTimeout:f,requestTimeout:s??w,httpAgent:(()=>{if(h instanceof xK||typeof h?.destroy==="function")return h;return new xK({keepAlive:!0,maxSockets:50,...h})})(),httpsAgent:(()=>{if(E instanceof eK||typeof E?.destroy==="function")return E;return new eK({keepAlive:!0,maxSockets:50,...E})})(),logger:console}}destroy(){this.config?.httpAgent?.destroy(),this.config?.httpsAgent?.destroy()}async handle(r,{abortSignal:s}={}){if(!this.config)this.config=await this.configProvider;return new Promise((f,w)=>{let h=void 0;const E=[],$=async(k)=>{await h,E.forEach(clearTimeout),f(k)},I=async(k)=>{await h,E.forEach(clearTimeout),w(k)};if(!this.config)throw new Error("Node HTTP request handler config is not resolved");if(s?.aborted){const k=new Error("Request aborted");k.name="AbortError",I(k);return}const F=r.protocol==="https:",U=F?this.config.httpsAgent:this.config.httpAgent;E.push(setTimeout(()=>{this.socketWarningTimestamp=ff.checkSocketUsage(U,this.socketWarningTimestamp,this.config.logger)},this.config.socketAcquisitionWarningTimeout??(this.config.requestTimeout??2000)+(this.config.connectionTimeout??1000)));const A=j3(r.query||{});let L=void 0;if(r.username!=null||r.password!=null){const k=r.username??"",i=r.password??"";L=`${k}:${i}`}let S=r.path;if(A)S+=`?${A}`;if(r.fragment)S+=`#${r.fragment}`;let z=r.hostname??"";if(z[0]==="["&&z.endsWith("]"))z=r.hostname.slice(1,-1);else z=r.hostname;const Z={headers:r.headers,host:z,method:r.method,path:S,port:r.port,agent:U,auth:L},M=(F?Ig:$g)(Z,(k)=>{const i=new j0({statusCode:k.statusCode||-1,reason:k.statusMessage,headers:OU(k.headers),body:k});$({response:i})});if(M.on("error",(k)=>{if(OK.includes(k.code))I(Object.assign(k,{name:"TimeoutError"}));else I(k)}),s){const k=()=>{M.destroy();const i=new Error("Request aborted");i.name="AbortError",I(i)};if(typeof s.addEventListener==="function"){const i=s;i.addEventListener("abort",k,{once:!0}),M.once("close",()=>i.removeEventListener("abort",k))}else s.onabort=k}E.push(cK(M,I,this.config.connectionTimeout)),E.push(_K(M,I,this.config.requestTimeout));const l=Z.agent;if(typeof l==="object"&&"keepAlive"in l)E.push(bK(M,{keepAlive:l.keepAlive,keepAliveMsecs:l.keepAliveMsecs}));h=cU(M,r,this.config.requestTimeout).catch((k)=>{return E.forEach(clearTimeout),w(k)})})}updateHttpClientConfig(r,s){this.config=void 0,this.configProvider=this.configProvider.then((f)=>{return{...f,[r]:s}})}httpHandlerConfigs(){return this.config??{}}}var nK=G(()=>{kr();v3();dK();dU();bU()});var oK=()=>{};var aK=G(()=>{oK()});var pK=G(()=>{kr();v3();dU();aK();bU()});import{Writable as Fg}from"stream";var _U;var uK=G(()=>{_U=class _U extends Fg{constructor(){super(...arguments);this.bufferedBytes=[]}_write(r,s,f){this.bufferedBytes.push(r),f()}}});async function Tg(r){const s=[],f=r.getReader();let w=!1,h=0;while(!w){const{done:I,value:F}=await f.read();if(F)s.push(F),h+=F.length;w=I}const E=new Uint8Array(h);let $=0;for(let I of s)E.set(I,$),$+=I.length;return E}var qf=(r)=>{if(Ug(r))return Tg(r);return new Promise((s,f)=>{const w=new _U;r.pipe(w),r.on("error",(h)=>{w.end(),f(h)}),w.on("error",f),w.on("finish",function(){const h=new Uint8Array(Buffer.concat(this.bufferedBytes));s(h)})})},Ug=(r)=>typeof ReadableStream==="function"&&r instanceof ReadableStream;var tK=G(()=>{uK()});var a0=G(()=>{nK();pK();tK()});var rZ=G(()=>{kr();v3()});async function Gg(r){const s=await Lg(r),f=Uf(s);return new Uint8Array(f)}async function Ag(r){const s=[],f=r.getReader();let w=!1,h=0;while(!w){const{done:I,value:F}=await f.read();if(F)s.push(F),h+=F.length;w=I}const E=new Uint8Array(h);let $=0;for(let I of s)E.set(I,$),$+=I.length;return E}function Lg(r){return new Promise((s,f)=>{const w=new FileReader;w.onloadend=()=>{if(w.readyState!==2)return f(new Error("Reader aborted too early"));const h=w.result??"",E=h.indexOf(","),$=E>-1?E+1:h.length;s(h.substring($))},w.onabort=()=>f(new Error("Read aborted")),w.onerror=()=>f(w.error),w.readAsDataURL(r)})}var fZ=(r)=>{if(typeof Blob==="function"&&r instanceof Blob)return Gg(r);return Ag(r)};var sZ=G(()=>{S0()});var wZ=G(()=>{rZ();sZ()});var O1=(r)=>typeof ReadableStream==="function"&&(r?.constructor?.name===ReadableStream.name||r instanceof ReadableStream);var $Z,hZ="The stream has already been transformed.",IZ=(r)=>{if(!EZ(r)&&!O1(r)){const h=r?.__proto__?.constructor?.name||r;throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${h}`)}let s=!1;const f=async()=>{if(s)throw new Error(hZ);return s=!0,await fZ(r)},w=(h)=>{if(typeof h.stream!=="function")throw new Error("Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\nIf you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body");return h.stream()};return Object.assign(r,{transformToByteArray:f,transformToString:async(h)=>{const E=await f();if(h==="base64")return Gf(E);else if(h==="hex")return $Z.toHex(E);else if(h===void 0||h==="utf8"||h==="utf-8")return Tf(E);else if(typeof TextDecoder==="function")return new TextDecoder(h).decode(E);else throw new Error("TextDecoder is not available, please make sure polyfill is provided.")},transformToWebStream:()=>{if(s)throw new Error(hZ);if(s=!0,EZ(r))return w(r);else if(O1(r))return r;else throw new Error(`Cannot transform payload to web stream, got ${r}`)}})},EZ=(r)=>typeof Blob==="function"&&r instanceof Blob;var FZ=G(()=>{wZ();S0();$Z=m(i$(),1);Os()});import{Readable as gU}from"stream";import{TextDecoder as Rg}from"util";var UZ="The stream has already been transformed.",TZ=(r)=>{if(!(r instanceof gU))try{return IZ(r)}catch(w){const h=r?.__proto__?.constructor?.name||r;throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${h}`)}let s=!1;const f=async()=>{if(s)throw new Error(UZ);return s=!0,await qf(r)};return Object.assign(r,{transformToByteArray:f,transformToString:async(w)=>{const h=await f();if(w===void 0||Buffer.isEncoding(w))return z0(h.buffer,h.byteOffset,h.byteLength).toString(w);else return new Rg(w).decode(h)},transformToWebStream:()=>{if(s)throw new Error(UZ);if(r.readableFlowing!==null)throw new Error("The stream has been consumed by other callbacks.");if(typeof gU.toWeb!=="function")throw new Error("Readable.toWeb() is not supported. Please make sure you are using Node.js >= 17.0.0, or polyfill is available.");return s=!0,gU.toWeb(r)}})};var GZ=G(()=>{a0();lw();FZ()});var AZ=()=>{};var LZ=()=>{};var xU=G(()=>{iU();jK();GZ();AZ();LZ()});var gr=async(r=new Uint8Array,s)=>{if(r instanceof Uint8Array)return Y0.mutate(r);if(!r)return Y0.mutate(new Uint8Array);const f=s.streamCollector(r);return Y0.mutate(await f)};var RZ=G(()=>{xU()});class R{constructor(){this.middlewareStack=Sh()}static classBuilder(){return new WZ}resolveMiddlewareWithContext(r,s,f,{middlewareFn:w,clientName:h,commandName:E,inputFilterSensitiveLog:$,outputFilterSensitiveLog:I,smithyContext:F,additionalContext:U,CommandCtor:A}){for(let N of w.bind(this)(A,r,s,f))this.middlewareStack.use(N);const L=r.concat(this.middlewareStack),{logger:S}=s,z={logger:S,clientName:h,commandName:E,inputFilterSensitiveLog:$,outputFilterSensitiveLog:I,[CZ.SMITHY_CONTEXT_KEY]:{commandInstance:this,...F},...U},{requestHandler:Z}=s;return L.resolve((N)=>Z.handle(N.request,f||{}),z)}}class WZ{constructor(){this._init=()=>{},this._ep={},this._middlewareFn=()=>[],this._commandName="",this._clientName="",this._additionalContext={},this._smithyContext={},this._inputFilterSensitiveLog=(r)=>r,this._outputFilterSensitiveLog=(r)=>r,this._serializer=null,this._deserializer=null}init(r){this._init=r}ep(r){return this._ep=r,this}m(r){return this._middlewareFn=r,this}s(r,s,f={}){return this._smithyContext={service:r,operation:s,...f},this}c(r={}){return this._additionalContext=r,this}n(r,s){return this._clientName=r,this._commandName=s,this}f(r=(f)=>f,s=(f)=>f){return this._inputFilterSensitiveLog=r,this._outputFilterSensitiveLog=s,this}ser(r){return this._serializer=r,this}de(r){return this._deserializer=r,this}build(){const r=this;let s;return s=class extends R{static getEndpointParameterInstructions(){return r._ep}constructor(...[f]){super();this.serialize=r._serializer,this.deserialize=r._deserializer,this.input=f??{},r._init(this)}resolveMiddleware(f,w,h){return this.resolveMiddlewareWithContext(f,w,h,{CommandCtor:s,middlewareFn:r._middlewareFn,clientName:r._clientName,commandName:r._commandName,inputFilterSensitiveLog:r._inputFilterSensitiveLog,outputFilterSensitiveLog:r._outputFilterSensitiveLog,smithyContext:r._smithyContext,additionalContext:r._additionalContext})}}}}var CZ;var zZ=G(()=>{mU();CZ=m(Ff(),1)});var o="***SensitiveInformation***";var ds=(r,s)=>{for(let f of Object.keys(r)){const w=r[f],h=async function($,I,F){const U=new w($);if(typeof I==="function")this.send(U,I);else if(typeof F==="function"){if(typeof I!=="object")throw new Error(`Expected http options but got ${typeof I}`);this.send(U,I||{},F)}else return this.send(U,I)},E=(f[0].toLowerCase()+f.slice(1)).replace(/Command$/,"");s.prototype[E]=h}};var Nr=(r)=>{switch(r){case"true":return!0;case"false":return!1;default:throw new Error(`Unable to parse boolean value "${r}"`)}},p0=(r)=>{if(r===null||r===void 0)return;if(typeof r==="number"){if(r===0||r===1)O3.warn(i3(`Expected boolean, got ${typeof r}: ${r}`));if(r===0)return!1;if(r===1)return!0}if(typeof r==="string"){const s=r.toLowerCase();if(s==="false"||s==="true")O3.warn(i3(`Expected boolean, got ${typeof r}: ${r}`));if(s==="false")return!1;if(s==="true")return!0}if(typeof r==="boolean")return r;throw new TypeError(`Expected boolean, got ${typeof r}: ${r}`)},Af=(r)=>{if(r===null||r===void 0)return;if(typeof r==="string"){const s=parseFloat(r);if(!Number.isNaN(s)){if(String(s)!==String(r))O3.warn(i3(`Expected number but observed string: ${r}`));return s}}if(typeof r==="number")return r;throw new TypeError(`Expected number, got ${typeof r}: ${r}`)},Cg,SZ=(r)=>{const s=Af(r);if(s!==void 0&&!Number.isNaN(s)&&s!==1/0&&s!==-1/0){if(Math.abs(s)>Cg)throw new TypeError(`Expected 32-bit float, got ${r}`)}return s},Xh=(r)=>{if(r===null||r===void 0)return;if(Number.isInteger(r)&&!Number.isNaN(r))return r;throw new TypeError(`Expected integer, got ${typeof r}: ${r}`)},Dw=(r)=>eU(r,32),YZ=(r)=>eU(r,16),XZ=(r)=>eU(r,8),eU=(r,s)=>{const f=Xh(r);if(f!==void 0&&Wg(f,s)!==f)throw new TypeError(`Expected ${s}-bit integer, got ${r}`);return f},Wg=(r,s)=>{switch(s){case 32:return Int32Array.of(r)[0];case 16:return Int16Array.of(r)[0];case 8:return Int8Array.of(r)[0]}},y=(r,s)=>{if(r===null||r===void 0){if(s)throw new TypeError(`Expected a non-null value for ${s}`);throw new TypeError("Expected a non-null value")}return r},c=(r)=>{if(r===null||r===void 0)return;if(typeof r==="object"&&!Array.isArray(r))return r;const s=Array.isArray(r)?"array":typeof r;throw new TypeError(`Expected object, got ${s}: ${r}`)},T=(r)=>{if(r===null||r===void 0)return;if(typeof r==="string")return r;if(["boolean","number","bigint"].includes(typeof r))return O3.warn(i3(`Expected string, got ${typeof r}: ${r}`)),String(r);throw new TypeError(`Expected string, got ${typeof r}: ${r}`)},nU=(r)=>{if(typeof r=="string")return Af(Kh(r));return Af(r)},KZ,ZZ=(r)=>{if(typeof r=="string")return SZ(Kh(r));return SZ(r)},zg,Kh=(r)=>{const s=r.match(zg);if(s===null||s[0].length!==r.length)throw new TypeError("Expected real number, got implicit NaN");return parseFloat(r)},oU=(r)=>{if(typeof r=="string")return Sg(r);return Af(r)},Sg=(r)=>{switch(r){case"NaN":return NaN;case"Infinity":return 1/0;case"-Infinity":return-1/0;default:throw new Error(`Unable to parse float value: ${r}`)}},xr=(r)=>{if(typeof r==="string")return Xh(Kh(r));return Xh(r)},hr=(r)=>{if(typeof r==="string")return Dw(Kh(r));return Dw(r)},aU=(r)=>{if(typeof r==="string")return YZ(Kh(r));return YZ(r)},PZ=(r)=>{if(typeof r==="string")return XZ(Kh(r));return XZ(r)},i3=(r)=>{return String(new TypeError(r).stack||r).split("\n").slice(0,5).filter((s)=>!s.includes("stackTraceWarning")).join("\n")},O3;var pU=G(()=>{Cg=Math.ceil(340282346638528860000000000000000000000),KZ=nU,zg=/(-?(?:0|[1-9]\d*)(?:\.\d+)?(?:[eE][+-]?\d+)?)|(-?Infinity)|(NaN)/g,O3={warn:console.warn}});var Yg,Xg,JZ=(r)=>{if(r===null||r===void 0)return;if(typeof r!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const s=Xg.exec(r);if(!s)throw new TypeError("Invalid RFC-3339 date-time value");const[f,w,h,E,$,I,F,U]=s,A=aU(uU(w)),L=kw(h,"month",1,12),S=kw(E,"day",1,31);return QZ(A,L,S,{hours:$,minutes:I,seconds:F,fractionalMilliseconds:U})},Kg,yw=(r)=>{if(r===null||r===void 0)return;if(typeof r!=="string")throw new TypeError("RFC-3339 date-times must be expressed as strings");const s=Kg.exec(r);if(!s)throw new TypeError("Invalid RFC-3339 date-time value");const[f,w,h,E,$,I,F,U,A]=s,L=aU(uU(w)),S=kw(h,"month",1,12),z=kw(E,"day",1,31),Z=QZ(L,S,z,{hours:$,minutes:I,seconds:F,fractionalMilliseconds:U});if(A.toUpperCase()!="Z")Z.setTime(Z.getTime()-Bg(A));return Z},A2r,L2r,R2r,cs=(r)=>{if(r===null||r===void 0)return;let s;if(typeof r==="number")s=r;else if(typeof r==="string")s=nU(r);else if(typeof r==="object"&&r.tag===1)s=r.value;else throw new TypeError("Epoch timestamps must be expressed as floating point numbers or their string representation");if(Number.isNaN(s)||s===1/0||s===-1/0)throw new TypeError("Epoch timestamps must be valid, non-Infinite, non-NaN numerics");return new Date(Math.round(s*1000))},QZ=(r,s,f,w)=>{const h=s-1;return Pg(r,h,f),new Date(Date.UTC(r,h,f,kw(w.hours,"hour",0,23),kw(w.minutes,"minute",0,59),kw(w.seconds,"seconds",0,60),Qg(w.fractionalMilliseconds)))},Zg,Pg=(r,s,f)=>{let w=Zg[s];if(s===1&&Jg(r))w=29;if(f>w)throw new TypeError(`Invalid day for ${Yg[s]} in ${r}: ${f}`)},Jg=(r)=>{return r%4===0&&(r%100!==0||r%400===0)},kw=(r,s,f,w)=>{const h=PZ(uU(r));if(h<f||h>w)throw new TypeError(`${s} must be between ${f} and ${w}, inclusive`);return h},Qg=(r)=>{if(r===null||r===void 0)return 0;return ZZ("0."+r)*1000},Bg=(r)=>{const s=r[0];let f=1;if(s=="+")f=1;else if(s=="-")f=-1;else throw new TypeError(`Offset direction, ${s}, must be "+" or "-"`);const w=Number(r.substring(1,3)),h=Number(r.substring(4,6));return f*(w*60+h)*60*1000},uU=(r)=>{let s=0;while(s<r.length-1&&r.charAt(s)==="0")s++;if(s===0)return r;return r.slice(s)};var BZ=G(()=>{pU();Yg=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Xg=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?[zZ]$/),Kg=new RegExp(/^(\d{4})-(\d{2})-(\d{2})[tT](\d{2}):(\d{2}):(\d{2})(?:\.(\d+))?(([-+]\d{2}\:\d{2})|[zZ])$/),A2r=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),L2r=new RegExp(/^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? GMT$/),R2r=new RegExp(/^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\d{2}) (\d{1,2}):(\d{2}):(\d{2})(?:\.(\d+))? (\d{4})$/),Zg=[31,28,31,30,31,30,31,31,30,31,30,31]});var mf,D=(r,s={})=>{Object.entries(s).filter(([,w])=>w!==void 0).forEach(([w,h])=>{if(r[w]==null||r[w]==="")r[w]=h});const f=r.message||r.Message||"UnknownError";return r.message=f,delete r.Message,r};var tU=G(()=>{mf=class mf extends Error{constructor(r){super(r.message);Object.setPrototypeOf(this,mf.prototype),this.name=r.name,this.$fault=r.$fault,this.$metadata=r.$metadata}}});var Mg=({output:r,parsedBody:s,exceptionCtor:f,errorCode:w})=>{const h=Vg(r),E=h.httpStatusCode?h.httpStatusCode+"":void 0,$=new f({name:s?.code||s?.Code||w||E||"UnknownError",$fault:"client",$metadata:h});throw D($,s)},bs=(r)=>{return({output:s,parsedBody:f,errorCode:w})=>{Mg({output:s,parsedBody:f,exceptionCtor:r,errorCode:w})}},Vg=(r)=>({httpStatusCode:r.statusCode,requestId:r.headers["x-amzn-requestid"]??r.headers["x-amzn-request-id"]??r.headers["x-amz-request-id"],extendedRequestId:r.headers["x-amz-id-2"],cfId:r.headers["x-amz-cf-id"]});var MZ=G(()=>{tU()});var _s=(r)=>{switch(r){case"standard":return{retryMode:"standard",connectionTimeout:3100};case"in-region":return{retryMode:"standard",connectionTimeout:1100};case"cross-region":return{retryMode:"standard",connectionTimeout:3100};case"mobile":return{retryMode:"standard",connectionTimeout:30000};default:return{}}};var VZ=!1,gs=(r)=>{if(r&&!VZ&&parseInt(r.substring(1,r.indexOf(".")))<16)VZ=!0};function d3(r){return encodeURIComponent(r).replace(/[!'()*]/g,function(s){return"%"+s.charCodeAt(0).toString(16).toUpperCase()})}var rT,HZ=(r)=>{const s=[];for(let f in rT.AlgorithmId){const w=rT.AlgorithmId[f];if(r[w]===void 0)continue;s.push({algorithmId:()=>w,checksumConstructor:()=>r[w]})}return{_checksumAlgorithms:s,addChecksumAlgorithm(f){this._checksumAlgorithms.push(f)},checksumAlgorithms(){return this._checksumAlgorithms}}},lZ=(r)=>{const s={};return r.checksumAlgorithms().forEach((f)=>{s[f.algorithmId()]=f.checksumConstructor()}),s};var DZ=G(()=>{rT=m(Ff(),1)});var kZ=(r)=>{let s=r.retryStrategy;return{setRetryStrategy(f){s=f},retryStrategy(){return s}}},yZ=(r)=>{const s={};return s.retryStrategy=r.retryStrategy(),s};var xs=(r)=>{return{...HZ(r),...kZ(r)}},es=(r)=>{return{...lZ(r),...yZ(r)}};var NZ=G(()=>{DZ()});var qZ=G(()=>{NZ()});var Gr=(r)=>Array.isArray(r)?r:[r];var d1=(r)=>{return r!=null};var fT=function(){const r=Object.getPrototypeOf(this).constructor,f=new(Function.bind.apply(String,[null,...arguments]));return Object.setPrototypeOf(f,r.prototype),f};var mZ=G(()=>{fT.prototype=Object.create(String.prototype,{constructor:{value:fT,enumerable:!1,writable:!0,configurable:!0}});Object.setPrototypeOf(fT,String)});class Yf{trace(){}debug(){}info(){}warn(){}error(){}}function Y(r,s,f){let w,h,E;if(typeof s==="undefined"&&typeof f==="undefined")w={},E=r;else if(w=r,typeof s==="function")return h=s,E=f,Hg(w,h,E);else E=s;for(let $ of Object.keys(E)){if(!Array.isArray(E[$])){w[$]=E[$];continue}jZ(w,null,E,$)}return w}var p=(r,s)=>{const f={};for(let w in s)jZ(f,r,s,w);return f},Hg=(r,s,f)=>{return Y(r,Object.entries(f).reduce((w,[h,E])=>{if(Array.isArray(E))w[h]=E;else if(typeof E==="function")w[h]=[s,E()];else w[h]=[s,E];return w},{}))},jZ=(r,s,f,w)=>{if(s!==null){let $=f[w];if(typeof $==="function")$=[,$];const[I=lg,F=Dg,U=w]=$;if(typeof I==="function"&&I(s[U])||typeof I!=="function"&&!!I)r[w]=F(s[U]);return}let[h,E]=f[w];if(typeof E==="function"){let $;const I=h===void 0&&($=E())!=null,F=typeof h==="function"&&!!h(void 0)||typeof h!=="function"&&!!h;if(I)r[w]=$;else if(F)r[w]=E()}else{const $=h===void 0&&E!=null,I=typeof h==="function"&&!!h(E)||typeof h!=="function"&&!!h;if($||I)r[w]=E}},lg=(r)=>r!=null,Dg=(r)=>r;var vZ=()=>{};var iZ=(r)=>{if(r!==r)return"NaN";switch(r){case 1/0:return"Infinity";case-1/0:return"-Infinity";default:return r}};var q=(r)=>{if(r==null)return{};if(Array.isArray(r))return r.filter((s)=>s!=null).map(q);if(typeof r==="object"){const s={};for(let f of Object.keys(r)){if(r[f]==null)continue;s[f]=q(r[f])}return s}return r};var K=G(()=>{MK();RZ();zZ();BZ();MZ();tU();qZ();mZ();pU();vZ()});import{Readable as kg}from"stream";var OZ=(r)=>r?.body instanceof kg||typeof ReadableStream!=="undefined"&&r?.body instanceof ReadableStream;var dZ=()=>{};var yg=(r)=>(s,f)=>async(w)=>{let h=await r.retryStrategy();const E=await r.maxAttempts();if(Ng(h)){h=h;let $=await h.acquireInitialRetryToken(f.partition_id),I=new Error,F=0,U=0;const{request:A}=w,L=Mr.isInstance(A);if(L)A.headers[N3]=WK();while(!0)try{if(L)A.headers[q3]=`attempt=${F+1}; max=${E}`;const{response:S,output:z}=await s(w);return h.recordSuccess($),z.$metadata.attempts=F+1,z.$metadata.totalRetryDelay=U,{response:S,output:z}}catch(S){const z=qg(S);if(I=NU(S),L&&OZ(A))throw(f.logger instanceof Yf?console:f.logger)?.warn("An error was encountered in a non-retryable streaming request."),I;try{$=await h.refreshRetryTokenForRetry($,z)}catch(N){if(!I.$metadata)I.$metadata={};throw I.$metadata.attempts=F+1,I.$metadata.totalRetryDelay=U,I}F=$.getRetryCount();const Z=$.getRetryDelay();U+=Z,await new Promise((N)=>setTimeout(N,Z))}}else{if(h=h,h?.mode)f.userAgent=[...f.userAgent||[],["cfg/retry-mode",h.mode]];return h.retry(s,w)}},Ng=(r)=>typeof r.acquireInitialRetryToken!=="undefined"&&typeof r.refreshRetryTokenForRetry!=="undefined"&&typeof r.recordSuccess!=="undefined",qg=(r)=>{const s={error:r,errorType:mg(r)},f=vg(r.$response);if(f)s.retryAfterHint=f;return s},mg=(r)=>{if(Wh(r))return"THROTTLING";if(D3(r))return"TRANSIENT";if(UK(r))return"SERVER_ERROR";return"CLIENT_ERROR"},jg,ns=(r)=>({applyToStack:(s)=>{s.add(yg(r),jg)}}),vg=(r)=>{if(!j0.isInstance(r))return;const s=Object.keys(r.headers).find((E)=>E.toLowerCase()==="retry-after");if(!s)return;const f=r.headers[s],w=Number(f);if(!Number.isNaN(w))return new Date(w*1000);return new Date(f)};var cZ=G(()=>{kr();j1();K();zf();zK();dZ();jg={name:"retryMiddleware",tags:["RETRY"],step:"finalizeRequest",priority:"high",override:!0}});var Is=G(()=>{YK();qU();ZK();kU();PK();yU();cZ()});var oZ,aZ,c3="AWS_ACCESS_KEY_ID",b3="AWS_SECRET_ACCESS_KEY",pZ="AWS_SESSION_TOKEN",uZ="AWS_CREDENTIAL_EXPIRATION",tZ="AWS_CREDENTIAL_SCOPE",rP="AWS_ACCOUNT_ID",sT=(r)=>async()=>{r?.logger?.debug("@aws-sdk/credential-provider-env - fromEnv");const s=process.env[c3],f=process.env[b3],w=process.env[pZ],h=process.env[uZ],E=process.env[tZ],$=process.env[rP];if(s&&f){const I={accessKeyId:s,secretAccessKey:f,...w&&{sessionToken:w},...h&&{expiration:new Date(h)},...E&&{credentialScope:E},...$&&{accountId:$}};return oZ.setCredentialFeature(I,"CREDENTIALS_ENV_VARS","g"),I}throw new aZ.CredentialsProviderError("Unable to find environment variable credentials.",{logger:r?.logger})};var fP=G(()=>{oZ=m(tr(),1),aZ=m(Ar(),1)});var sP={};Ys(sP,{fromEnv:()=>sT,ENV_SESSION:()=>pZ,ENV_SECRET:()=>b3,ENV_KEY:()=>c3,ENV_EXPIRATION:()=>uZ,ENV_CREDENTIAL_SCOPE:()=>tZ,ENV_ACCOUNT_ID:()=>rP});var wT=G(()=>{fP()});import{Buffer as dg}from"buffer";import{request as cg}from"http";function u0(r){return new Promise((s,f)=>{const w=cg({method:"GET",...r,hostname:r.hostname?.replace(/^\[(.+)\]$/,"$1")});w.on("error",(h)=>{f(Object.assign(new _3.ProviderError("Unable to connect to instance metadata service"),h)),w.destroy()}),w.on("timeout",()=>{f(new _3.ProviderError("TimeoutError from instance metadata service")),w.destroy()}),w.on("response",(h)=>{const{statusCode:E=400}=h;if(E<200||300<=E)f(Object.assign(new _3.ProviderError("Error response received from instance metadata service"),{statusCode:E})),w.destroy();const $=[];h.on("data",(I)=>{$.push(I)}),h.on("end",()=>{s(dg.concat($)),w.destroy()})}),w.end()})}var _3;var g3=G(()=>{_3=m(Ar(),1)});var x3=(r)=>Boolean(r)&&typeof r==="object"&&typeof r.AccessKeyId==="string"&&typeof r.SecretAccessKey==="string"&&typeof r.Token==="string"&&typeof r.Expiration==="string",e3=(r)=>({accessKeyId:r.AccessKeyId,secretAccessKey:r.SecretAccessKey,sessionToken:r.Token,expiration:new Date(r.Expiration),...r.AccountId&&{accountId:r.AccountId}});var bg=1000,_g=0,c1=({maxRetries:r=0,timeout:s=1000})=>({maxRetries:r,timeout:s});var b1=(r,s)=>{let f=r();for(let w=0;w<s;w++)f=f.catch(r);return f};import{parse as gg}from"url";var _1,n3="AWS_CONTAINER_CREDENTIALS_FULL_URI",o3="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",hT="AWS_CONTAINER_AUTHORIZATION_TOKEN",xg=(r={})=>{const{timeout:s,maxRetries:f}=c1(r);return()=>b1(async()=>{const w=await pg({logger:r.logger}),h=JSON.parse(await eg(s,w));if(!x3(h))throw new _1.CredentialsProviderError("Invalid response received from instance metadata service.",{logger:r.logger});return e3(h)},f)},eg=async(r,s)=>{if(process.env[hT])s.headers={...s.headers,Authorization:process.env[hT]};return(await u0({...s,timeout:r})).toString()},ng="169.254.170.2",og,ag,pg=async({logger:r})=>{if(process.env[o3])return{hostname:ng,path:process.env[o3]};if(process.env[n3]){const s=gg(process.env[n3]);if(!s.hostname||!(s.hostname in og))throw new _1.CredentialsProviderError(`${s.hostname} is not a valid container metadata service hostname`,{tryNextLink:!1,logger:r});if(!s.protocol||!(s.protocol in ag))throw new _1.CredentialsProviderError(`${s.protocol} is not a valid container metadata service protocol`,{tryNextLink:!1,logger:r});return{...s,port:s.port?parseInt(s.port,10):void 0}}throw new _1.CredentialsProviderError(`The container metadata credential provider cannot be used unless the ${o3} or ${n3} environment variable is set`,{tryNextLink:!1,logger:r})};var wP=G(()=>{_1=m(Ar(),1);g3();og={localhost:!0,"127.0.0.1":!0},ag={"http:":!0,"https:":!0}});var hP,a3;var EP=G(()=>{hP=m(Ar(),1);a3=class a3 extends hP.CredentialsProviderError{constructor(r,s=!0){super(r,s);this.tryNextLink=s,this.name="InstanceMetadataV1FallbackError",Object.setPrototypeOf(this,a3.prototype)}}});var Nw;var ET=G(()=>{(function(r){r.IPv4="http://169.254.169.254",r.IPv6="http://[fd00:ec2::254]"})(Nw||(Nw={}))});var $P;var IP=G(()=>{$P={environmentVariableSelector:(r)=>r.AWS_EC2_METADATA_SERVICE_ENDPOINT,configFileSelector:(r)=>r.ec2_metadata_service_endpoint,default:void 0}});var t0;var $T=G(()=>{(function(r){r.IPv4="IPv4",r.IPv6="IPv6"})(t0||(t0={}))});var ug="AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE",tg="ec2_metadata_service_endpoint_mode",FP;var UP=G(()=>{$T();FP={environmentVariableSelector:(r)=>r[ug],configFileSelector:(r)=>r[tg],default:t0.IPv4}});var p3=async()=>br(await rx()||await fx()),rx=async()=>u($P)(),fx=async()=>{const r=await u(FP)();switch(r){case t0.IPv4:return Nw.IPv4;case t0.IPv6:return Nw.IPv6;default:throw new Error(`Unsupported endpoint mode: ${r}. Select from ${Object.values(t0)}`)}};var IT=G(()=>{Ns();n0();ET();IP();$T();UP()});var FT=(r,s)=>{const f=300+Math.floor(Math.random()*300),w=new Date(Date.now()+f*1000);s.warn(`Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(w)}.\nFor more information, please visit: https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html`);const h=r.originalExpiration??r.expiration;return{...r,...h?{originalExpiration:h}:{},expiration:w}};var TP=(r,s={})=>{const f=s?.logger||console;let w;return async()=>{let h;try{if(h=await r(),h.expiration&&h.expiration.getTime()<Date.now())h=FT(h,f)}catch(E){if(w)f.warn("Credential renew failed: ",E),h=FT(w,f);else throw E}return w=h,h}};var GP=()=>{};var TT,RP="/latest/meta-data/iam/security-credentials/",sx="/latest/api/token",UT="AWS_EC2_METADATA_V1_DISABLED",AP="ec2_metadata_v1_disabled",LP="x-aws-ec2-metadata-token",wx=(r={})=>TP(hx(r),{logger:r.logger}),hx=(r={})=>{let s=!1;const{logger:f,profile:w}=r,{timeout:h,maxRetries:E}=c1(r),$=async(I,F)=>{if(s||F.headers?.[LP]==null){let L=!1,S=!1;const z=await u({environmentVariableSelector:(Z)=>{const N=Z[UT];if(S=!!N&&N!=="false",N===void 0)throw new TT.CredentialsProviderError(`${UT} not set in env, checking config file next.`,{logger:r.logger});return S},configFileSelector:(Z)=>{const N=Z[AP];return L=!!N&&N!=="false",L},default:!1},{profile:w})();if(r.ec2MetadataV1Disabled||z){const Z=[];if(r.ec2MetadataV1Disabled)Z.push("credential provider initialization (runtime option ec2MetadataV1Disabled)");if(L)Z.push(`config file profile (${AP})`);if(S)Z.push(`process environment variable (${UT})`);throw new a3(`AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${Z.join(", ")}].`)}}const A=(await b1(async()=>{let L;try{L=await $x(F)}catch(S){if(S.statusCode===401)s=!1;throw S}return L},I)).trim();return b1(async()=>{let L;try{L=await Ix(A,F,r)}catch(S){if(S.statusCode===401)s=!1;throw S}return L},I)};return async()=>{const I=await p3();if(s)return f?.debug("AWS SDK Instance Metadata","using v1 fallback (no token fetch)"),$(E,{...I,timeout:h});else{let F;try{F=(await Ex({...I,timeout:h})).toString()}catch(U){if(U?.statusCode===400)throw Object.assign(U,{message:"EC2 Metadata token request returned error"});else if(U.message==="TimeoutError"||[403,404,405].includes(U.statusCode))s=!0;return f?.debug("AWS SDK Instance Metadata","using v1 fallback (initial)"),$(E,{...I,timeout:h})}return $(E,{...I,headers:{[LP]:F},timeout:h})}}},Ex=async(r)=>u0({...r,path:sx,method:"PUT",headers:{"x-aws-ec2-metadata-token-ttl-seconds":"21600"}}),$x=async(r)=>(await u0({...r,path:RP})).toString(),Ix=async(r,s,f)=>{const w=JSON.parse((await u0({...s,path:RP+r})).toString());if(!x3(w))throw new TT.CredentialsProviderError("Invalid response received from instance metadata service.",{logger:f.logger});return e3(w)};var CP=G(()=>{Ns();TT=m(Ar(),1);EP();g3();IT();GP()});var WP=()=>{};var g1={};Ys(g1,{providerConfigFromInit:()=>c1,httpRequest:()=>u0,getInstanceMetadataEndpoint:()=>p3,fromInstanceMetadata:()=>wx,fromContainerMetadata:()=>xg,Endpoint:()=>Nw,ENV_CMDS_RELATIVE_URI:()=>o3,ENV_CMDS_FULL_URI:()=>n3,ENV_CMDS_AUTH_TOKEN:()=>hT,DEFAULT_TIMEOUT:()=>bg,DEFAULT_MAX_RETRIES:()=>_g});var x1=G(()=>{wP();CP();WP();g3();IT();ET()});var zP,Fx="169.254.170.2",Ux="169.254.170.23",Tx="[fd00:ec2::23]",SP=(r,s)=>{if(r.protocol==="https:")return;if(r.hostname===Fx||r.hostname===Ux||r.hostname===Tx)return;if(r.hostname.includes("[")){if(r.hostname==="[::1]"||r.hostname==="[0000:0000:0000:0000:0000:0000:0000:0001]")return}else{if(r.hostname==="localhost")return;const f=r.hostname.split("."),w=(h)=>{const E=parseInt(h,10);return 0<=E&&E<=255};if(f[0]==="127"&&w(f[1])&&w(f[2])&&w(f[3])&&f.length===4)return}throw new zP.CredentialsProviderError(`URL not accepted. It must either be HTTPS or match one of the following:
22
22
  - loopback CIDR 127.0.0.0/8 or [::1/128]
23
23
  - ECS container host 169.254.170.2
24
- - EKS container host 169.254.170.23 or [fd00:ec2::23]`,{logger:f})};var uZ=G(()=>{aZ=d(Cr(),1)});function tZ(r){return new Qr({protocol:r.protocol,hostname:r.hostname,port:Number(r.port),path:r.pathname,query:Array.from(r.searchParams.entries()).reduce((f,[s,w])=>{return f[s]=w,f},{}),fragment:r.hash})}async function r7(r,f){const w=await pX(r.body).transformToString();if(r.statusCode===200){const h=JSON.parse(w);if(typeof h.AccessKeyId!=="string"||typeof h.SecretAccessKey!=="string"||typeof h.Token!=="string"||typeof h.Expiration!=="string")throw new g3.CredentialsProviderError("HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }",{logger:f});return{accessKeyId:h.AccessKeyId,secretAccessKey:h.SecretAccessKey,sessionToken:h.Token,expiration:GY(h.Expiration)}}if(r.statusCode>=400&&r.statusCode<500){let h={};try{h=JSON.parse(w)}catch($){}throw Object.assign(new g3.CredentialsProviderError(`Server responded with status: ${r.statusCode}`,{logger:f}),{Code:h.Code,Message:h.Message})}throw new g3.CredentialsProviderError(`Server responded with status: ${r.statusCode}`,{logger:f})}var g3;var s7=G(()=>{g3=d(Cr(),1);kr();Y();X5()});var f7=(r,f,s)=>{return async()=>{for(let w=0;w<f;++w)try{return await r()}catch(h){await new Promise(($)=>setTimeout($,s))}return await r()}};import Z_ from"fs/promises";var rT,J_="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",Q_="http://169.254.170.2",M_="AWS_CONTAINER_CREDENTIALS_FULL_URI",B_="AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE",l_="AWS_CONTAINER_AUTHORIZATION_TOKEN",w7=(r={})=>{r.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");let f;const s=r.awsContainerCredentialsRelativeUri??process.env[J_],w=r.awsContainerCredentialsFullUri??process.env[M_],h=r.awsContainerAuthorizationToken??process.env[l_],$=r.awsContainerAuthorizationTokenFile??process.env[B_],E=r.logger?.constructor?.name==="NoOpLogger"||!r.logger?console.warn:r.logger.warn;if(s&&w)E("@aws-sdk/credential-provider-http: you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri."),E("awsContainerCredentialsFullUri will take precedence.");if(h&&$)E("@aws-sdk/credential-provider-http: you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile."),E("awsContainerAuthorizationToken will take precedence.");if(w)f=w;else if(s)f=`${Q_}${s}`;else throw new rT.CredentialsProviderError(`No HTTP credential provider host provided.
25
- Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`,{logger:r.logger});const I=new URL(f);pZ(I,r.logger);const F=new ur({requestTimeout:r.timeout??1000,connectionTimeout:r.timeout??1000});return f7(async()=>{const U=tZ(I);if(h)U.headers.Authorization=h;else if($)U.headers.Authorization=(await Z_.readFile($)).toString();try{const C=await F.handle(U);return r7(C.response)}catch(C){throw new rT.CredentialsProviderError(String(C),{logger:r.logger})}},r.maxRetries??3,r.timeout??1000)};var h7=G(()=>{O0();rT=d(Cr(),1);uZ();s7()});var sT={};Wf(sT,{fromHttp:()=>w7});var fT=G(()=>{h7()});var _3,H_="AWS_EC2_METADATA_DISABLED",$7=async(r)=>{const{ENV_CMDS_FULL_URI:f,ENV_CMDS_RELATIVE_URI:s,fromContainerMetadata:w,fromInstanceMetadata:h}=await Promise.resolve().then(() => (O1(),d1));if(process.env[s]||process.env[f]){r.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata");const{fromHttp:$}=await Promise.resolve().then(() => (fT(),sT));return _3.chain($(r),w(r))}if(process.env[H_])return async()=>{throw new _3.CredentialsProviderError("EC2 Instance Metadata Service access disabled",{logger:r.logger})};return r.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata"),h(r)};var E7=G(()=>{_3=d(Cr(),1)});var wT=(r)=>r&&(typeof r.sso_start_url==="string"||typeof r.sso_account_id==="string"||typeof r.sso_session==="string"||typeof r.sso_region==="string"||typeof r.sso_role_name==="string");var I7=300000,zh="To refresh this SSO session run 'aws sso login' with the corresponding profile.";function V_(r){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:r.region},propertiesExtractor:(f,s)=>({signingProperties:{config:f,context:s}})}}function hT(r){return{schemeId:"smithy.api#noAuth"}}var F7,U7=async(r,f,s)=>{return{operation:Zs(f).operation,region:await yr(r.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},T7=(r)=>{const f=[];switch(r.operation){case"CreateToken":{f.push(hT(r));break}case"RegisterClient":{f.push(hT(r));break}case"StartDeviceAuthorization":{f.push(hT(r));break}default:f.push(V_(r))}return f},G7=(r)=>{return{...F7.resolveAwsSdkSigV4Config(r)}};var $T=G(()=>{F7=d(Br(),1);ps()});var C7=(r)=>{return{...r,useDualstackEndpoint:r.useDualstackEndpoint??!1,useFipsEndpoint:r.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"}},e0;var Sh=G(()=>{e0={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}});var A7;var L7=G(()=>{A7={name:"@aws-sdk/client-sso-oidc",description:"AWS SDK for JavaScript Sso Oidc Client for Node.js, Browser and React Native",version:"3.637.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-sso-oidc","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sso-oidc"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.635.0","@aws-sdk/credential-provider-node":"3.637.0","@aws-sdk/middleware-host-header":"3.620.0","@aws-sdk/middleware-logger":"3.609.0","@aws-sdk/middleware-recursion-detection":"3.620.0","@aws-sdk/middleware-user-agent":"3.637.0","@aws-sdk/region-config-resolver":"3.614.0","@aws-sdk/types":"3.609.0","@aws-sdk/util-endpoints":"3.637.0","@aws-sdk/util-user-agent-browser":"3.609.0","@aws-sdk/util-user-agent-node":"3.614.0","@smithy/config-resolver":"^3.0.5","@smithy/core":"^2.4.0","@smithy/fetch-http-handler":"^3.2.4","@smithy/hash-node":"^3.0.3","@smithy/invalid-dependency":"^3.0.3","@smithy/middleware-content-length":"^3.0.5","@smithy/middleware-endpoint":"^3.1.0","@smithy/middleware-retry":"^3.0.15","@smithy/middleware-serde":"^3.0.3","@smithy/middleware-stack":"^3.0.3","@smithy/node-config-provider":"^3.1.4","@smithy/node-http-handler":"^3.1.4","@smithy/protocol-http":"^4.1.0","@smithy/smithy-client":"^3.2.0","@smithy/types":"^3.3.0","@smithy/url-parser":"^3.0.3","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.15","@smithy/util-defaults-mode-node":"^3.0.15","@smithy/util-endpoints":"^2.0.5","@smithy/util-middleware":"^3.0.3","@smithy/util-retry":"^3.0.3","@smithy/util-utf8":"^3.0.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node16":"16.1.3","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=16.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",peerDependencies:{"@aws-sdk/client-sts":"^3.637.0"},browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso-oidc",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sso-oidc"}}});var ET;var IT=G(()=>{ET={isCrtAvailable:!1}});var W7=()=>{if(ET.isCrtAvailable)return["md/crt-avail"];return null};var R7=G(()=>{IT()});import{platform as k_,release as y_}from"os";import{env as z7,versions as N_}from"process";var m_="AWS_SDK_UA_APP_ID",i_="sdk-ua-app-id",_f=({serviceId:r,clientVersion:f})=>{const s=[["aws-sdk-js",f],["ua","2.0"],[`os/${k_()}`,y_()],["lang/js"],["md/nodejs",`${N_.node}`]],w=W7();if(w)s.push(w);if(r)s.push([`api/${r}`,f]);if(z7.AWS_EXECUTION_ENV)s.push([`exec-env/${z7.AWS_EXECUTION_ENV}`]);const h=u({environmentVariableSelector:(E)=>E[m_],configFileSelector:(E)=>E[i_],default:void 0})();let $=void 0;return async()=>{if(!$){const E=await h;$=E?[...s,[`app/${E}`]]:[...s]}return $}};var Ph=G(()=>{ff();R7();IT()});import{Buffer as q_}from"buffer";import{createHash as v_,createHmac as j_}from"crypto";function S7(r,f){if(q_.isBuffer(r))return r;if(typeof r==="string")return Ch(r,f);if(ArrayBuffer.isView(r))return G0(r.buffer,r.byteOffset,r.byteLength);return G0(r)}class hf{constructor(r,f){this.algorithmIdentifier=r,this.secret=f,this.reset()}update(r,f){this.hash.update(zX(S7(r,f)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?j_(this.algorithmIdentifier,S7(this.secret)):v_(this.algorithmIdentifier)}}var Xh=G(()=>{Kw();mf()});import{fstatSync as d_,lstatSync as O_}from"fs";var xf=(r)=>{if(!r)return 0;if(typeof r==="string")return Buffer.byteLength(r);else if(typeof r.byteLength==="number")return r.byteLength;else if(typeof r.size==="number")return r.size;else if(typeof r.start==="number"&&typeof r.end==="number")return r.end+1-r.start;else if(typeof r.path==="string"||Buffer.isBuffer(r.path))return O_(r.path).size;else if(typeof r.fd==="number")return d_(r.fd).size;throw new Error(`Body Length computation failed for ${r}`)};var P7=()=>{};var Yh=G(()=>{P7()});var X7,Y7,K7,l7,H7,Ns,Z7,V7,J7,Q7,M7,B7,c_,D7;var k7=G(()=>{X7={["required"]:!1,type:"String"},Y7={["required"]:!0,default:!1,type:"Boolean"},K7={["ref"]:"Endpoint"},l7={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},H7={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},Ns={},Z7={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},V7={["ref"]:"PartitionResult"},J7={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[V7,"supportsDualStack"]}]},Q7=[l7],M7=[H7],B7=[{["ref"]:"Region"}],c_={version:"1.0",parameters:{Region:X7,UseDualStack:Y7,UseFIPS:Y7,Endpoint:X7},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[K7]}],rules:[{conditions:Q7,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:M7,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:K7,properties:Ns,headers:Ns},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:B7}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:B7,assign:"PartitionResult"}],rules:[{conditions:[l7,H7],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,Z7]},J7],rules:[{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Ns,headers:Ns},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:Q7,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[Z7,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[V7,"name"]},"aws-us-gov"]}],endpoint:{url:"https://oidc.{Region}.amazonaws.com",properties:Ns,headers:Ns},type:"endpoint"},{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",properties:Ns,headers:Ns},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:M7,rules:[{conditions:[J7],rules:[{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Ns,headers:Ns},type:"endpoint"}],type:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",type:"error"}],type:"tree"},{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dnsSuffix}",properties:Ns,headers:Ns},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},D7=c_});var y7=(r,f={})=>{return ns(D7,{endpointParams:r,logger:f.logger})};var N7=G(()=>{Lw();os();k7();pr.aws=as});var m7,i7,q7=(r)=>{return{apiVersion:"2019-06-10",base64Decoder:r?.base64Decoder??Is,base64Encoder:r?.base64Encoder??Us,disableHostPrefix:r?.disableHostPrefix??!1,endpointProvider:r?.endpointProvider??y7,extensions:r?.extensions??[],httpAuthSchemeProvider:r?.httpAuthSchemeProvider??T7,httpAuthSchemes:r?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(f)=>f.getIdentityProvider("aws.auth#sigv4"),signer:new m7.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(f)=>f.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new i7.NoAuthSigner}],logger:r?.logger??new As,serviceId:r?.serviceId??"SSO OIDC",urlParser:r?.urlParser??br,utf8Decoder:r?.utf8Decoder??gr,utf8Encoder:r?.utf8Encoder??Fs}};var v7=G(()=>{m7=d(Br(),1),i7=d(dr(),1);Y();j0();C0();mf();$T();N7()});var j7="AWS_EXECUTION_ENV",FT="AWS_REGION",UT="AWS_DEFAULT_REGION",d7="AWS_EC2_METADATA_DISABLED",O7,c7="/latest/meta-data/placement/region";var b7=G(()=>{O7=["in-region","cross-region","mobile","standard","legacy"]});var g7;var _7=G(()=>{g7={environmentVariableSelector:(r)=>{return r.AWS_DEFAULTS_MODE},configFileSelector:(r)=>{return r.defaults_mode},default:"legacy"}});var x7,ef=({region:r=u(Js),defaultsMode:f=u(g7)}={})=>x7.memoize(async()=>{const s=typeof f==="function"?await f():f;switch(s?.toLowerCase()){case"auto":return b_(r);case"in-region":case"cross-region":case"mobile":case"standard":case"legacy":return Promise.resolve(s?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${O7.join(", ")}, got ${s}`)}}),b_=async(r)=>{if(r){const f=typeof r==="function"?await r():r,s=await g_();if(!s)return"standard";if(f===s)return"in-region";else return"cross-region"}return"standard"},g_=async()=>{if(process.env[j7]&&(process.env[FT]||process.env[UT]))return process.env[FT]??process.env[UT];if(!process.env[d7])try{const{getInstanceMetadataEndpoint:r,httpRequest:f}=await Promise.resolve().then(() => (O1(),d1)),s=await r();return(await f({...s,path:c7})).toString()}catch(r){}};var e7=G(()=>{Qs();ff();x7=d(Cr(),1);b7();_7()});var Kh=G(()=>{e7()});var n7,o7=(r)=>{Of(process.version);const f=ef(r),s=()=>f().then(df),w=q7(r);return n7.emitWarningIfUnsupportedVersion(process.version),{...w,...r,runtime:"node",defaultsMode:f,bodyLengthChecker:r?.bodyLengthChecker??xf,credentialDefaultProvider:r?.credentialDefaultProvider??A0,defaultUserAgentProvider:r?.defaultUserAgentProvider??_f({serviceId:w.serviceId,clientVersion:A7.version}),maxAttempts:r?.maxAttempts??u(kf),region:r?.region??u(Js,Mf),requestHandler:ur.create(r?.requestHandler??s),retryMode:r?.retryMode??u({...Nf,default:async()=>(await s()).retryMode||Ds}),sha256:r?.sha256??hf.bind(null,"sha256"),streamCollector:r?.streamCollector??ks,useDualstackEndpoint:r?.useDualstackEndpoint??u(Jf),useFipsEndpoint:r?.useFipsEndpoint??u(Qf)}};var a7=G(()=>{L7();n7=d(Br(),1);c1();Ph();Qs();Xh();wf();ff();O0();Yh();Ls();v7();Y();Kh();Y()});var nf=(r)=>{let f=async()=>{if(r.region===void 0)throw new Error("Region is missing from runtimeConfig");const s=r.region;if(typeof s==="string")return s;return s()};return{setRegion(s){f=s},region(){return f}}},of=(r)=>{return{region:r.region()}};var p7=()=>{};var u7=()=>{};var t7=G(()=>{u7()});var rJ=G(()=>{p7();t7()});var Zh=G(()=>{rJ()});var sJ=(r)=>{const f=r.httpAuthSchemes;let{httpAuthSchemeProvider:s,credentials:w}=r;return{setHttpAuthScheme(h){const $=f.findIndex((E)=>E.schemeId===h.schemeId);if($===-1)f.push(h);else f.splice($,1,h)},httpAuthSchemes(){return f},setHttpAuthSchemeProvider(h){s=h},httpAuthSchemeProvider(){return s},setCredentials(h){w=h},credentials(){return w}}},fJ=(r)=>{return{httpAuthSchemes:r.httpAuthSchemes(),httpAuthSchemeProvider:r.httpAuthSchemeProvider(),credentials:r.credentials()}};var x3=(r)=>r,wJ=(r,f)=>{const s={...x3(nf(r)),...x3(cf(r)),...x3(Rf(r)),...x3(sJ(r))};return f.forEach((w)=>w.configure(s)),{...r,...of(s),...bf(s),...zf(s),...fJ(s)}};var hJ=G(()=>{Zh();kr();Y()});var Jh,e3;var TT=G(()=>{xw();ew();nw();aw();Qs();Jh=d(dr(),1);Eh();B();wf();Y();$T();Sh();a7();hJ();e3=class e3 extends Ws{constructor(...[r]){const f=o7(r||{}),s=C7(f),w=Kf(s),h=yf(w),$=Bf(h),E=Sf($),I=Vf(E),F=G7(I),U=wJ(F,r?.extensions||[]);super(U);this.config=U,this.middlewareStack.use(Zf(this.config)),this.middlewareStack.use(gf(this.config)),this.middlewareStack.use(Hf(this.config)),this.middlewareStack.use(Pf(this.config)),this.middlewareStack.use(Xf(this.config)),this.middlewareStack.use(Yf(this.config)),this.middlewareStack.use(Jh.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:U7,identityProviderConfigProvider:async(C)=>new Jh.DefaultIdentityProviderConfig({"aws.auth#sigv4":C.credentials})})),this.middlewareStack.use(Jh.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}});var lr;var n3=G(()=>{Y();lr=class lr extends ys{constructor(r){super(r);Object.setPrototypeOf(this,lr.prototype)}}});var b1,g1,_1,x1,e1,n1,o1,a1,p1,u1,t1,r$,s$,f$,GT=(r)=>({...r,...r.clientSecret&&{clientSecret:o},...r.refreshToken&&{refreshToken:o},...r.codeVerifier&&{codeVerifier:o}}),CT=(r)=>({...r,...r.accessToken&&{accessToken:o},...r.refreshToken&&{refreshToken:o},...r.idToken&&{idToken:o}}),LT=(r)=>({...r,...r.refreshToken&&{refreshToken:o},...r.assertion&&{assertion:o},...r.subjectToken&&{subjectToken:o},...r.codeVerifier&&{codeVerifier:o}}),AT=(r)=>({...r,...r.accessToken&&{accessToken:o},...r.refreshToken&&{refreshToken:o},...r.idToken&&{idToken:o}}),WT=(r)=>({...r,...r.clientSecret&&{clientSecret:o}}),RT=(r)=>({...r,...r.clientSecret&&{clientSecret:o}});var Hw=G(()=>{Y();n3();b1=class b1 extends lr{constructor(r){super({name:"AccessDeniedException",$fault:"client",...r});this.name="AccessDeniedException",this.$fault="client",Object.setPrototypeOf(this,b1.prototype),this.error=r.error,this.error_description=r.error_description}};g1=class g1 extends lr{constructor(r){super({name:"AuthorizationPendingException",$fault:"client",...r});this.name="AuthorizationPendingException",this.$fault="client",Object.setPrototypeOf(this,g1.prototype),this.error=r.error,this.error_description=r.error_description}};_1=class _1 extends lr{constructor(r){super({name:"ExpiredTokenException",$fault:"client",...r});this.name="ExpiredTokenException",this.$fault="client",Object.setPrototypeOf(this,_1.prototype),this.error=r.error,this.error_description=r.error_description}};x1=class x1 extends lr{constructor(r){super({name:"InternalServerException",$fault:"server",...r});this.name="InternalServerException",this.$fault="server",Object.setPrototypeOf(this,x1.prototype),this.error=r.error,this.error_description=r.error_description}};e1=class e1 extends lr{constructor(r){super({name:"InvalidClientException",$fault:"client",...r});this.name="InvalidClientException",this.$fault="client",Object.setPrototypeOf(this,e1.prototype),this.error=r.error,this.error_description=r.error_description}};n1=class n1 extends lr{constructor(r){super({name:"InvalidGrantException",$fault:"client",...r});this.name="InvalidGrantException",this.$fault="client",Object.setPrototypeOf(this,n1.prototype),this.error=r.error,this.error_description=r.error_description}};o1=class o1 extends lr{constructor(r){super({name:"InvalidRequestException",$fault:"client",...r});this.name="InvalidRequestException",this.$fault="client",Object.setPrototypeOf(this,o1.prototype),this.error=r.error,this.error_description=r.error_description}};a1=class a1 extends lr{constructor(r){super({name:"InvalidScopeException",$fault:"client",...r});this.name="InvalidScopeException",this.$fault="client",Object.setPrototypeOf(this,a1.prototype),this.error=r.error,this.error_description=r.error_description}};p1=class p1 extends lr{constructor(r){super({name:"SlowDownException",$fault:"client",...r});this.name="SlowDownException",this.$fault="client",Object.setPrototypeOf(this,p1.prototype),this.error=r.error,this.error_description=r.error_description}};u1=class u1 extends lr{constructor(r){super({name:"UnauthorizedClientException",$fault:"client",...r});this.name="UnauthorizedClientException",this.$fault="client",Object.setPrototypeOf(this,u1.prototype),this.error=r.error,this.error_description=r.error_description}};t1=class t1 extends lr{constructor(r){super({name:"UnsupportedGrantTypeException",$fault:"client",...r});this.name="UnsupportedGrantTypeException",this.$fault="client",Object.setPrototypeOf(this,t1.prototype),this.error=r.error,this.error_description=r.error_description}};r$=class r$ extends lr{constructor(r){super({name:"InvalidRequestRegionException",$fault:"client",...r});this.name="InvalidRequestRegionException",this.$fault="client",Object.setPrototypeOf(this,r$.prototype),this.error=r.error,this.error_description=r.error_description,this.endpoint=r.endpoint,this.region=r.region}};s$=class s$ extends lr{constructor(r){super({name:"InvalidClientMetadataException",$fault:"client",...r});this.name="InvalidClientMetadataException",this.$fault="client",Object.setPrototypeOf(this,s$.prototype),this.error=r.error,this.error_description=r.error_description}};f$=class f$ extends lr{constructor(r){super({name:"InvalidRedirectUriException",$fault:"client",...r});this.name="InvalidRedirectUriException",this.$fault="client",Object.setPrototypeOf(this,f$.prototype),this.error=r.error,this.error_description=r.error_description}}});var W0,w$,$J=async(r,f)=>{const s=w$.requestBuilder(r,f),w={"content-type":"application/json"};s.bp("/token");let h;return h=JSON.stringify(p(r,{clientId:[],clientSecret:[],code:[],codeVerifier:[],deviceCode:[],grantType:[],redirectUri:[],refreshToken:[],scope:($)=>m($)})),s.m("POST").h(w).b(h),s.build()},EJ=async(r,f)=>{const s=w$.requestBuilder(r,f),w={"content-type":"application/json"};s.bp("/token");const h=P({[Ix]:[,"t"]});let $;return $=JSON.stringify(p(r,{assertion:[],clientId:[],code:[],codeVerifier:[],grantType:[],redirectUri:[],refreshToken:[],requestedTokenType:[],scope:(E)=>m(E),subjectToken:[],subjectTokenType:[]})),s.m("POST").h(w).q(h).b($),s.build()},IJ=async(r,f)=>{const s=w$.requestBuilder(r,f),w={"content-type":"application/json"};s.bp("/client/register");let h;return h=JSON.stringify(p(r,{clientName:[],clientType:[],entitledApplicationArn:[],grantTypes:($)=>m($),issuerUrl:[],redirectUris:($)=>m($),scopes:($)=>m($)})),s.m("POST").h(w).b(h),s.build()},FJ=async(r,f)=>{const s=w$.requestBuilder(r,f),w={"content-type":"application/json"};s.bp("/device_authorization");let h;return h=JSON.stringify(p(r,{clientId:[],clientSecret:[],startUrl:[]})),s.m("POST").h(w).b(h),s.build()},UJ=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return o3(r,f);const s=P({$metadata:ir(r)}),w=N(O(await W0.parseJsonBody(r.body,f)),"body"),h=p(w,{accessToken:T,expiresIn:Zw,idToken:T,refreshToken:T,tokenType:T});return Object.assign(s,h),s},TJ=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return o3(r,f);const s=P({$metadata:ir(r)}),w=N(O(await W0.parseJsonBody(r.body,f)),"body"),h=p(w,{accessToken:T,expiresIn:Zw,idToken:T,issuedTokenType:T,refreshToken:T,scope:m,tokenType:T});return Object.assign(s,h),s},GJ=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return o3(r,f);const s=P({$metadata:ir(r)}),w=N(O(await W0.parseJsonBody(r.body,f)),"body"),h=p(w,{authorizationEndpoint:T,clientId:T,clientIdIssuedAt:Lh,clientSecret:T,clientSecretExpiresAt:Lh,tokenEndpoint:T});return Object.assign(s,h),s},CJ=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return o3(r,f);const s=P({$metadata:ir(r)}),w=N(O(await W0.parseJsonBody(r.body,f)),"body"),h=p(w,{deviceCode:T,expiresIn:Zw,interval:Zw,userCode:T,verificationUri:T,verificationUriComplete:T});return Object.assign(s,h),s},o3=async(r,f)=>{const s={...r,body:await W0.parseJsonErrorBody(r.body,f)},w=W0.loadRestJsonErrorCode(r,s.body);switch(w){case"AccessDeniedException":case"com.amazonaws.ssooidc#AccessDeniedException":throw await e_(s,f);case"AuthorizationPendingException":case"com.amazonaws.ssooidc#AuthorizationPendingException":throw await n_(s,f);case"ExpiredTokenException":case"com.amazonaws.ssooidc#ExpiredTokenException":throw await o_(s,f);case"InternalServerException":case"com.amazonaws.ssooidc#InternalServerException":throw await a_(s,f);case"InvalidClientException":case"com.amazonaws.ssooidc#InvalidClientException":throw await p_(s,f);case"InvalidGrantException":case"com.amazonaws.ssooidc#InvalidGrantException":throw await t_(s,f);case"InvalidRequestException":case"com.amazonaws.ssooidc#InvalidRequestException":throw await sx(s,f);case"InvalidScopeException":case"com.amazonaws.ssooidc#InvalidScopeException":throw await wx(s,f);case"SlowDownException":case"com.amazonaws.ssooidc#SlowDownException":throw await hx(s,f);case"UnauthorizedClientException":case"com.amazonaws.ssooidc#UnauthorizedClientException":throw await $x(s,f);case"UnsupportedGrantTypeException":case"com.amazonaws.ssooidc#UnsupportedGrantTypeException":throw await Ex(s,f);case"InvalidRequestRegionException":case"com.amazonaws.ssooidc#InvalidRequestRegionException":throw await fx(s,f);case"InvalidClientMetadataException":case"com.amazonaws.ssooidc#InvalidClientMetadataException":throw await u_(s,f);case"InvalidRedirectUriException":case"com.amazonaws.ssooidc#InvalidRedirectUriException":throw await rx(s,f);default:const h=s.body;return x_({output:r,parsedBody:h,errorCode:w})}},x_,e_=async(r,f)=>{const s=P({}),w=r.body,h=p(w,{error:T,error_description:T});Object.assign(s,h);const $=new b1({$metadata:ir(r),...s});return D($,r.body)},n_=async(r,f)=>{const s=P({}),w=r.body,h=p(w,{error:T,error_description:T});Object.assign(s,h);const $=new g1({$metadata:ir(r),...s});return D($,r.body)},o_=async(r,f)=>{const s=P({}),w=r.body,h=p(w,{error:T,error_description:T});Object.assign(s,h);const $=new _1({$metadata:ir(r),...s});return D($,r.body)},a_=async(r,f)=>{const s=P({}),w=r.body,h=p(w,{error:T,error_description:T});Object.assign(s,h);const $=new x1({$metadata:ir(r),...s});return D($,r.body)},p_=async(r,f)=>{const s=P({}),w=r.body,h=p(w,{error:T,error_description:T});Object.assign(s,h);const $=new e1({$metadata:ir(r),...s});return D($,r.body)},u_=async(r,f)=>{const s=P({}),w=r.body,h=p(w,{error:T,error_description:T});Object.assign(s,h);const $=new s$({$metadata:ir(r),...s});return D($,r.body)},t_=async(r,f)=>{const s=P({}),w=r.body,h=p(w,{error:T,error_description:T});Object.assign(s,h);const $=new n1({$metadata:ir(r),...s});return D($,r.body)},rx=async(r,f)=>{const s=P({}),w=r.body,h=p(w,{error:T,error_description:T});Object.assign(s,h);const $=new f$({$metadata:ir(r),...s});return D($,r.body)},sx=async(r,f)=>{const s=P({}),w=r.body,h=p(w,{error:T,error_description:T});Object.assign(s,h);const $=new o1({$metadata:ir(r),...s});return D($,r.body)},fx=async(r,f)=>{const s=P({}),w=r.body,h=p(w,{endpoint:T,error:T,error_description:T,region:T});Object.assign(s,h);const $=new r$({$metadata:ir(r),...s});return D($,r.body)},wx=async(r,f)=>{const s=P({}),w=r.body,h=p(w,{error:T,error_description:T});Object.assign(s,h);const $=new a1({$metadata:ir(r),...s});return D($,r.body)},hx=async(r,f)=>{const s=P({}),w=r.body,h=p(w,{error:T,error_description:T});Object.assign(s,h);const $=new p1({$metadata:ir(r),...s});return D($,r.body)},$x=async(r,f)=>{const s=P({}),w=r.body,h=p(w,{error:T,error_description:T});Object.assign(s,h);const $=new u1({$metadata:ir(r),...s});return D($,r.body)},Ex=async(r,f)=>{const s=P({}),w=r.body,h=p(w,{error:T,error_description:T});Object.assign(s,h);const $=new t1({$metadata:ir(r),...s});return D($,r.body)},ir=(r)=>({httpStatusCode:r.statusCode,requestId:r.headers["x-amzn-requestid"]??r.headers["x-amzn-request-id"]??r.headers["x-amz-request-id"],extendedRequestId:r.headers["x-amz-id-2"],cfId:r.headers["x-amz-cf-id"]}),Ix="aws_iam";var h$=G(()=>{W0=d(Br(),1),w$=d(dr(),1);Y();Hw();n3();x_=jf(lr)});var a3;var zT=G(()=>{B();H();Y();Sh();Hw();h$();a3=class a3 extends A.classBuilder().ep({...e0}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateToken",{}).n("SSOOIDCClient","CreateTokenCommand").f(GT,CT).ser($J).de(UJ).build(){}});var p3;var ST=G(()=>{B();H();Y();Sh();Hw();h$();p3=class p3 extends A.classBuilder().ep({...e0}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateTokenWithIAM",{}).n("SSOOIDCClient","CreateTokenWithIAMCommand").f(LT,AT).ser(EJ).de(TJ).build(){}});var u3;var PT=G(()=>{B();H();Y();Sh();Hw();h$();u3=class u3 extends A.classBuilder().ep({...e0}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","RegisterClient",{}).n("SSOOIDCClient","RegisterClientCommand").f(void 0,WT).ser(IJ).de(GJ).build(){}});var t3;var XT=G(()=>{B();H();Y();Sh();Hw();h$();t3=class t3 extends A.classBuilder().ep({...e0}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","StartDeviceAuthorization",{}).n("SSOOIDCClient","StartDeviceAuthorizationCommand").f(RT,void 0).ser(FJ).de(CJ).build(){}});var Fx,YT;var LJ=G(()=>{Y();zT();ST();PT();XT();TT();Fx={CreateTokenCommand:a3,CreateTokenWithIAMCommand:p3,RegisterClientCommand:u3,StartDeviceAuthorizationCommand:t3};YT=class YT extends e3{};qf(Fx,YT)});var AJ=G(()=>{zT();ST();PT();XT()});var WJ=G(()=>{Hw()});var KT={};Wf(KT,{__Client:()=>Ws,UnsupportedGrantTypeException:()=>t1,UnauthorizedClientException:()=>u1,StartDeviceAuthorizationRequestFilterSensitiveLog:()=>RT,StartDeviceAuthorizationCommand:()=>t3,SlowDownException:()=>p1,SSOOIDCServiceException:()=>lr,SSOOIDCClient:()=>e3,SSOOIDC:()=>YT,RegisterClientResponseFilterSensitiveLog:()=>WT,RegisterClientCommand:()=>u3,InvalidScopeException:()=>a1,InvalidRequestRegionException:()=>r$,InvalidRequestException:()=>o1,InvalidRedirectUriException:()=>f$,InvalidGrantException:()=>n1,InvalidClientMetadataException:()=>s$,InvalidClientException:()=>e1,InternalServerException:()=>x1,ExpiredTokenException:()=>_1,CreateTokenWithIAMResponseFilterSensitiveLog:()=>AT,CreateTokenWithIAMRequestFilterSensitiveLog:()=>LT,CreateTokenWithIAMCommand:()=>p3,CreateTokenResponseFilterSensitiveLog:()=>CT,CreateTokenRequestFilterSensitiveLog:()=>GT,CreateTokenCommand:()=>a3,AuthorizationPendingException:()=>g1,AccessDeniedException:()=>b1,$Command:()=>A});var ZT=G(()=>{TT();LJ();AJ();WJ();n3()});var JT,RJ=async(r)=>{const{SSOOIDCClient:f}=await Promise.resolve().then(() => (ZT(),KT));if(JT[r])return JT[r];const s=new f({region:r});return JT[r]=s,s};var zJ=G(()=>{JT={}});var SJ=async(r,f)=>{const{CreateTokenCommand:s}=await Promise.resolve().then(() => (ZT(),KT));return(await RJ(f)).send(new s({clientId:r.clientId,clientSecret:r.clientSecret,refreshToken:r.refreshToken,grantType:"refresh_token"}))};var PJ=G(()=>{zJ()});var XJ,QT=(r)=>{if(r.expiration&&r.expiration.getTime()<Date.now())throw new XJ.TokenProviderError(`Token is expired. ${zh}`,!1)};var YJ=G(()=>{XJ=d(Cr(),1)});var KJ,n0=(r,f,s=!1)=>{if(typeof f==="undefined")throw new KJ.TokenProviderError(`Value not present for '${r}' in SSO Token${s?". Cannot refresh":""}. ${zh}`,!1)};var ZJ=G(()=>{KJ=d(Cr(),1)});import{promises as Ux}from"fs";var Tx,JJ=(r,f)=>{const s=f3(r),w=JSON.stringify(f,null,2);return Tx(s,w)};var QJ=G(()=>{sf();({writeFile:Tx}=Ux)});var Qh,MJ,BJ=(r={})=>async()=>{r.logger?.debug("@aws-sdk/token-providers - fromSso");const f=await v0(r),s=ls(r),w=f[s];if(!w)throw new Qh.TokenProviderError(`Profile '${s}' could not be found in shared credentials file.`,!1);else if(!w.sso_session)throw new Qh.TokenProviderError(`Profile '${s}' is missing required property 'sso_session'.`);const h=w.sso_session,E=(await E3(r))[h];if(!E)throw new Qh.TokenProviderError(`Sso session '${h}' could not be found in shared credentials file.`,!1);for(let S of["sso_start_url","sso_region"])if(!E[S])throw new Qh.TokenProviderError(`Sso session '${h}' is missing required property '${S}'.`,!1);const{sso_start_url:I,sso_region:F}=E;let U;try{U=await w3(h)}catch(S){throw new Qh.TokenProviderError(`The SSO session token associated with profile=${s} was not found or is invalid. ${zh}`,!1)}n0("accessToken",U.accessToken),n0("expiresAt",U.expiresAt);const{accessToken:C,expiresAt:L}=U,z={token:C,expiration:new Date(L)};if(z.expiration.getTime()-Date.now()>I7)return z;if(Date.now()-MJ.getTime()<30000)return QT(z),z;n0("clientId",U.clientId,!0),n0("clientSecret",U.clientSecret,!0),n0("refreshToken",U.refreshToken,!0);try{MJ.setTime(Date.now());const S=await SJ(U,F);n0("accessToken",S.accessToken),n0("expiresIn",S.expiresIn);const Z=new Date(Date.now()+S.expiresIn*1000);try{await JJ(h,{...U,accessToken:S.accessToken,expiresAt:Z.toISOString(),refreshToken:S.refreshToken})}catch(k){}return{token:S.accessToken,expiration:Z}}catch(S){return QT(z),z}};var lJ=G(()=>{Qh=d(Cr(),1);sf();PJ();YJ();ZJ();QJ();MJ=new Date(0)});var Gx;var HJ=G(()=>{Gx=d(Cr(),1)});var MT;var VJ=G(()=>{MT=d(Cr(),1)});var DJ=G(()=>{lJ();HJ();VJ()});function Cx(r){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"awsssoportal",region:r.region},propertiesExtractor:(f,s)=>({signingProperties:{config:f,context:s}})}}function rI(r){return{schemeId:"smithy.api#noAuth"}}var kJ,yJ=async(r,f,s)=>{return{operation:Zs(f).operation,region:await yr(r.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},NJ=(r)=>{const f=[];switch(r.operation){case"GetRoleCredentials":{f.push(rI(r));break}case"ListAccountRoles":{f.push(rI(r));break}case"ListAccounts":{f.push(rI(r));break}case"Logout":{f.push(rI(r));break}default:f.push(Cx(r))}return f},mJ=(r)=>{return{...kJ.resolveAwsSdkSigV4Config(r)}};var BT=G(()=>{kJ=d(Br(),1);ps()});var iJ=(r)=>{return{...r,useDualstackEndpoint:r.useDualstackEndpoint??!1,useFipsEndpoint:r.useFipsEndpoint??!1,defaultSigningName:"awsssoportal"}},o0;var Mh=G(()=>{o0={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}});var vJ;var qJ=G(()=>{vJ={name:"@aws-sdk/client-sso",description:"AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native",version:"3.637.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-sso","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sso"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.635.0","@aws-sdk/middleware-host-header":"3.620.0","@aws-sdk/middleware-logger":"3.609.0","@aws-sdk/middleware-recursion-detection":"3.620.0","@aws-sdk/middleware-user-agent":"3.637.0","@aws-sdk/region-config-resolver":"3.614.0","@aws-sdk/types":"3.609.0","@aws-sdk/util-endpoints":"3.637.0","@aws-sdk/util-user-agent-browser":"3.609.0","@aws-sdk/util-user-agent-node":"3.614.0","@smithy/config-resolver":"^3.0.5","@smithy/core":"^2.4.0","@smithy/fetch-http-handler":"^3.2.4","@smithy/hash-node":"^3.0.3","@smithy/invalid-dependency":"^3.0.3","@smithy/middleware-content-length":"^3.0.5","@smithy/middleware-endpoint":"^3.1.0","@smithy/middleware-retry":"^3.0.15","@smithy/middleware-serde":"^3.0.3","@smithy/middleware-stack":"^3.0.3","@smithy/node-config-provider":"^3.1.4","@smithy/node-http-handler":"^3.1.4","@smithy/protocol-http":"^4.1.0","@smithy/smithy-client":"^3.2.0","@smithy/types":"^3.3.0","@smithy/url-parser":"^3.0.3","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.15","@smithy/util-defaults-mode-node":"^3.0.15","@smithy/util-endpoints":"^2.0.5","@smithy/util-middleware":"^3.0.3","@smithy/util-retry":"^3.0.3","@smithy/util-utf8":"^3.0.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node16":"16.1.3","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=16.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sso"}}});var jJ,dJ,OJ,eJ,nJ,ms,cJ,oJ,bJ,gJ,_J,xJ,Ax,aJ;var pJ=G(()=>{jJ={["required"]:!1,type:"String"},dJ={["required"]:!0,default:!1,type:"Boolean"},OJ={["ref"]:"Endpoint"},eJ={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},nJ={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},ms={},cJ={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},oJ={["ref"]:"PartitionResult"},bJ={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[oJ,"supportsDualStack"]}]},gJ=[eJ],_J=[nJ],xJ=[{["ref"]:"Region"}],Ax={version:"1.0",parameters:{Region:jJ,UseDualStack:dJ,UseFIPS:dJ,Endpoint:jJ},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[OJ]}],rules:[{conditions:gJ,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:_J,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:OJ,properties:ms,headers:ms},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:xJ}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:xJ,assign:"PartitionResult"}],rules:[{conditions:[eJ,nJ],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,cJ]},bJ],rules:[{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:ms,headers:ms},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:gJ,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[cJ,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[oJ,"name"]},"aws-us-gov"]}],endpoint:{url:"https://portal.sso.{Region}.amazonaws.com",properties:ms,headers:ms},type:"endpoint"},{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}",properties:ms,headers:ms},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:_J,rules:[{conditions:[bJ],rules:[{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:ms,headers:ms},type:"endpoint"}],type:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",type:"error"}],type:"tree"},{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dnsSuffix}",properties:ms,headers:ms},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},aJ=Ax});var uJ=(r,f={})=>{return ns(aJ,{endpointParams:r,logger:f.logger})};var tJ=G(()=>{Lw();os();pJ();pr.aws=as});var r9,s9,f9=(r)=>{return{apiVersion:"2019-06-10",base64Decoder:r?.base64Decoder??Is,base64Encoder:r?.base64Encoder??Us,disableHostPrefix:r?.disableHostPrefix??!1,endpointProvider:r?.endpointProvider??uJ,extensions:r?.extensions??[],httpAuthSchemeProvider:r?.httpAuthSchemeProvider??NJ,httpAuthSchemes:r?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(f)=>f.getIdentityProvider("aws.auth#sigv4"),signer:new r9.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(f)=>f.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new s9.NoAuthSigner}],logger:r?.logger??new As,serviceId:r?.serviceId??"SSO",urlParser:r?.urlParser??br,utf8Decoder:r?.utf8Decoder??gr,utf8Encoder:r?.utf8Encoder??Fs}};var w9=G(()=>{r9=d(Br(),1),s9=d(dr(),1);Y();j0();C0();mf();BT();tJ()});var h9,$9=(r)=>{Of(process.version);const f=ef(r),s=()=>f().then(df),w=f9(r);return h9.emitWarningIfUnsupportedVersion(process.version),{...w,...r,runtime:"node",defaultsMode:f,bodyLengthChecker:r?.bodyLengthChecker??xf,defaultUserAgentProvider:r?.defaultUserAgentProvider??_f({serviceId:w.serviceId,clientVersion:vJ.version}),maxAttempts:r?.maxAttempts??u(kf),region:r?.region??u(Js,Mf),requestHandler:ur.create(r?.requestHandler??s),retryMode:r?.retryMode??u({...Nf,default:async()=>(await s()).retryMode||Ds}),sha256:r?.sha256??hf.bind(null,"sha256"),streamCollector:r?.streamCollector??ks,useDualstackEndpoint:r?.useDualstackEndpoint??u(Jf),useFipsEndpoint:r?.useFipsEndpoint??u(Qf)}};var E9=G(()=>{qJ();h9=d(Br(),1);Ph();Qs();Xh();wf();ff();O0();Yh();Ls();w9();Y();Kh();Y()});var I9=(r)=>{const f=r.httpAuthSchemes;let{httpAuthSchemeProvider:s,credentials:w}=r;return{setHttpAuthScheme(h){const $=f.findIndex((E)=>E.schemeId===h.schemeId);if($===-1)f.push(h);else f.splice($,1,h)},httpAuthSchemes(){return f},setHttpAuthSchemeProvider(h){s=h},httpAuthSchemeProvider(){return s},setCredentials(h){w=h},credentials(){return w}}},F9=(r)=>{return{httpAuthSchemes:r.httpAuthSchemes(),httpAuthSchemeProvider:r.httpAuthSchemeProvider(),credentials:r.credentials()}};var sI=(r)=>r,U9=(r,f)=>{const s={...sI(nf(r)),...sI(cf(r)),...sI(Rf(r)),...sI(I9(r))};return f.forEach((w)=>w.configure(s)),{...r,...of(s),...bf(s),...zf(s),...F9(s)}};var T9=G(()=>{Zh();kr();Y()});var Bh,R0;var $$=G(()=>{xw();ew();nw();aw();Qs();Bh=d(dr(),1);Eh();B();wf();Y();BT();Mh();E9();T9();R0=class R0 extends Ws{constructor(...[r]){const f=$9(r||{}),s=iJ(f),w=Kf(s),h=yf(w),$=Bf(h),E=Sf($),I=Vf(E),F=mJ(I),U=U9(F,r?.extensions||[]);super(U);this.config=U,this.middlewareStack.use(Zf(this.config)),this.middlewareStack.use(gf(this.config)),this.middlewareStack.use(Hf(this.config)),this.middlewareStack.use(Pf(this.config)),this.middlewareStack.use(Xf(this.config)),this.middlewareStack.use(Yf(this.config)),this.middlewareStack.use(Bh.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:yJ,identityProviderConfigProvider:async(C)=>new Bh.DefaultIdentityProviderConfig({"aws.auth#sigv4":C.credentials})})),this.middlewareStack.use(Bh.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}});var z0;var lT=G(()=>{Y();z0=class z0 extends ys{constructor(r){super(r);Object.setPrototypeOf(this,z0.prototype)}}});var fI,wI,hI,$I,G9=(r)=>({...r,...r.accessToken&&{accessToken:o}}),Wx=(r)=>({...r,...r.secretAccessKey&&{secretAccessKey:o},...r.sessionToken&&{sessionToken:o}}),C9=(r)=>({...r,...r.roleCredentials&&{roleCredentials:Wx(r.roleCredentials)}}),L9=(r)=>({...r,...r.accessToken&&{accessToken:o}}),A9=(r)=>({...r,...r.accessToken&&{accessToken:o}}),W9=(r)=>({...r,...r.accessToken&&{accessToken:o}});var Vw=G(()=>{Y();lT();fI=class fI extends z0{constructor(r){super({name:"InvalidRequestException",$fault:"client",...r});this.name="InvalidRequestException",this.$fault="client",Object.setPrototypeOf(this,fI.prototype)}};wI=class wI extends z0{constructor(r){super({name:"ResourceNotFoundException",$fault:"client",...r});this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,wI.prototype)}};hI=class hI extends z0{constructor(r){super({name:"TooManyRequestsException",$fault:"client",...r});this.name="TooManyRequestsException",this.$fault="client",Object.setPrototypeOf(this,hI.prototype)}};$I=class $I extends z0{constructor(r){super({name:"UnauthorizedException",$fault:"client",...r});this.name="UnauthorizedException",this.$fault="client",Object.setPrototypeOf(this,$I.prototype)}}});var a0,E$,R9=async(r,f)=>{const s=E$.requestBuilder(r,f),w=P({},II,{[UI]:r[FI]});s.bp("/federation/credentials");const h=P({[Kx]:[,N(r[Yx],"roleName")],[Q9]:[,N(r[J9],"accountId")]});let $;return s.m("GET").h(w).q(h).b($),s.build()},z9=async(r,f)=>{const s=E$.requestBuilder(r,f),w=P({},II,{[UI]:r[FI]});s.bp("/assignment/roles");const h=P({[H9]:[,r[l9]],[B9]:[()=>r.maxResults!==void 0,()=>r[M9].toString()],[Q9]:[,N(r[J9],"accountId")]});let $;return s.m("GET").h(w).q(h).b($),s.build()},S9=async(r,f)=>{const s=E$.requestBuilder(r,f),w=P({},II,{[UI]:r[FI]});s.bp("/assignment/accounts");const h=P({[H9]:[,r[l9]],[B9]:[()=>r.maxResults!==void 0,()=>r[M9].toString()]});let $;return s.m("GET").h(w).q(h).b($),s.build()},P9=async(r,f)=>{const s=E$.requestBuilder(r,f),w=P({},II,{[UI]:r[FI]});s.bp("/logout");let h;return s.m("POST").h(w).b(h),s.build()},X9=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return EI(r,f);const s=P({$metadata:p0(r)}),w=N(O(await a0.parseJsonBody(r.body,f)),"body"),h=p(w,{roleCredentials:m});return Object.assign(s,h),s},Y9=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return EI(r,f);const s=P({$metadata:p0(r)}),w=N(O(await a0.parseJsonBody(r.body,f)),"body"),h=p(w,{nextToken:T,roleList:m});return Object.assign(s,h),s},K9=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return EI(r,f);const s=P({$metadata:p0(r)}),w=N(O(await a0.parseJsonBody(r.body,f)),"body"),h=p(w,{accountList:m,nextToken:T});return Object.assign(s,h),s},Z9=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return EI(r,f);const s=P({$metadata:p0(r)});return await _r(r.body,f),s},EI=async(r,f)=>{const s={...r,body:await a0.parseJsonErrorBody(r.body,f)},w=a0.loadRestJsonErrorCode(r,s.body);switch(w){case"InvalidRequestException":case"com.amazonaws.sso#InvalidRequestException":throw await zx(s,f);case"ResourceNotFoundException":case"com.amazonaws.sso#ResourceNotFoundException":throw await Sx(s,f);case"TooManyRequestsException":case"com.amazonaws.sso#TooManyRequestsException":throw await Px(s,f);case"UnauthorizedException":case"com.amazonaws.sso#UnauthorizedException":throw await Xx(s,f);default:const h=s.body;return Rx({output:r,parsedBody:h,errorCode:w})}},Rx,zx=async(r,f)=>{const s=P({}),w=r.body,h=p(w,{message:T});Object.assign(s,h);const $=new fI({$metadata:p0(r),...s});return D($,r.body)},Sx=async(r,f)=>{const s=P({}),w=r.body,h=p(w,{message:T});Object.assign(s,h);const $=new wI({$metadata:p0(r),...s});return D($,r.body)},Px=async(r,f)=>{const s=P({}),w=r.body,h=p(w,{message:T});Object.assign(s,h);const $=new hI({$metadata:p0(r),...s});return D($,r.body)},Xx=async(r,f)=>{const s=P({}),w=r.body,h=p(w,{message:T});Object.assign(s,h);const $=new $I({$metadata:p0(r),...s});return D($,r.body)},p0=(r)=>({httpStatusCode:r.statusCode,requestId:r.headers["x-amzn-requestid"]??r.headers["x-amzn-request-id"]??r.headers["x-amz-request-id"],extendedRequestId:r.headers["x-amz-id-2"],cfId:r.headers["x-amz-cf-id"]}),II=(r)=>r!==void 0&&r!==null&&r!==""&&(!Object.getOwnPropertyNames(r).includes("length")||r.length!=0)&&(!Object.getOwnPropertyNames(r).includes("size")||r.size!=0),J9="accountId",FI="accessToken",Q9="account_id",M9="maxResults",B9="max_result",l9="nextToken",H9="next_token",Yx="roleName",Kx="role_name",UI="x-amz-sso_bearer_token";var I$=G(()=>{a0=d(Br(),1),E$=d(dr(),1);Y();Vw();lT();Rx=jf(z0)});var F$;var HT=G(()=>{B();H();Y();Mh();Vw();I$();F$=class F$ extends A.classBuilder().ep({...o0}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("SWBPortalService","GetRoleCredentials",{}).n("SSOClient","GetRoleCredentialsCommand").f(G9,C9).ser(R9).de(X9).build(){}});var U$;var TI=G(()=>{B();H();Y();Mh();Vw();I$();U$=class U$ extends A.classBuilder().ep({...o0}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("SWBPortalService","ListAccountRoles",{}).n("SSOClient","ListAccountRolesCommand").f(L9,void 0).ser(z9).de(Y9).build(){}});var T$;var GI=G(()=>{B();H();Y();Mh();Vw();I$();T$=class T$ extends A.classBuilder().ep({...o0}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("SWBPortalService","ListAccounts",{}).n("SSOClient","ListAccountsCommand").f(A9,void 0).ser(S9).de(K9).build(){}});var VT;var DT=G(()=>{B();H();Y();Mh();Vw();I$();VT=class VT extends A.classBuilder().ep({...o0}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("SWBPortalService","Logout",{}).n("SSOClient","LogoutCommand").f(W9,void 0).ser(P9).de(Z9).build(){}});var Zx,V9;var D9=G(()=>{Y();HT();TI();GI();DT();$$();Zx={GetRoleCredentialsCommand:F$,ListAccountRolesCommand:U$,ListAccountsCommand:T$,LogoutCommand:VT};V9=class V9 extends R0{};qf(Zx,V9)});var k9=G(()=>{HT();TI();GI();DT()});var y9=()=>{};var N9,O6r;var m9=G(()=>{N9=d(dr(),1);TI();$$();O6r=N9.createPaginator(R0,U$,"nextToken","nextToken","maxResults")});var i9,_6r;var q9=G(()=>{i9=d(dr(),1);GI();$$();_6r=i9.createPaginator(R0,T$,"nextToken","nextToken","maxResults")});var v9=G(()=>{y9();m9();q9()});var j9=G(()=>{Vw()});var d9=G(()=>{$$();D9();k9();v9();j9()});var O9={};Wf(O9,{SSOClient:()=>R0,GetRoleCredentialsCommand:()=>F$});var c9=G(()=>{d9()});var lh,G$=!1,kT=async({ssoStartUrl:r,ssoSession:f,ssoAccountId:s,ssoRegion:w,ssoRoleName:h,ssoClient:$,clientConfig:E,profile:I,logger:F})=>{let U;const C="To refresh this SSO session run aws sso login with the corresponding profile.";if(f)try{const Vr=await BJ({profile:I})();U={accessToken:Vr.token,expiresAt:new Date(Vr.expiration).toISOString()}}catch(Vr){throw new lh.CredentialsProviderError(Vr.message,{tryNextLink:G$,logger:F})}else try{U=await w3(r)}catch(Vr){throw new lh.CredentialsProviderError("The SSO session associated with this profile is invalid. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:G$,logger:F})}if(new Date(U.expiresAt).getTime()-Date.now()<=0)throw new lh.CredentialsProviderError("The SSO session associated with this profile has expired. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:G$,logger:F});const{accessToken:L}=U,{SSOClient:z,GetRoleCredentialsCommand:S}=await Promise.resolve().then(() => (c9(),O9)),Z=$||new z(Object.assign({},E??{},{region:E?.region??w}));let k;try{k=await Z.send(new S({accountId:s,roleName:h,accessToken:L}))}catch(Vr){throw new lh.CredentialsProviderError(Vr,{tryNextLink:G$,logger:F})}const{roleCredentials:{accessKeyId:l,secretAccessKey:M,sessionToken:y,expiration:x,credentialScope:e,accountId:wr}={}}=k;if(!l||!M||!y||!x)throw new lh.CredentialsProviderError("SSO returns an invalid temporary credential.",{tryNextLink:G$,logger:F});return{accessKeyId:l,secretAccessKey:M,sessionToken:y,expiration:new Date(x),...e&&{credentialScope:e},...wr&&{accountId:wr}}};var b9=G(()=>{DJ();lh=d(Cr(),1);sf()});var g9,yT=(r,f)=>{const{sso_start_url:s,sso_account_id:w,sso_region:h,sso_role_name:$}=r;if(!s||!w||!h||!$)throw new g9.CredentialsProviderError(`Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", "sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(r).join(", ")}\nReference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`,{tryNextLink:!1,logger:f});return r};var NT=G(()=>{g9=d(Cr(),1)});var Hh,Jx=(r={})=>async()=>{r.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO");const{ssoStartUrl:f,ssoAccountId:s,ssoRegion:w,ssoRoleName:h,ssoSession:$}=r,{ssoClient:E}=r,I=ls(r);if(!f&&!s&&!w&&!h&&!$){const U=(await v0(r))[I];if(!U)throw new Hh.CredentialsProviderError(`Profile ${I} was not found.`,{logger:r.logger});if(!wT(U))throw new Hh.CredentialsProviderError(`Profile ${I} is not configured with SSO credentials.`,{logger:r.logger});if(U?.sso_session){const l=(await E3(r))[U.sso_session],M=` configurations in profile ${I} and sso-session ${U.sso_session}`;if(w&&w!==l.sso_region)throw new Hh.CredentialsProviderError("Conflicting SSO region"+M,{tryNextLink:!1,logger:r.logger});if(f&&f!==l.sso_start_url)throw new Hh.CredentialsProviderError("Conflicting SSO start_url"+M,{tryNextLink:!1,logger:r.logger});U.sso_region=l.sso_region,U.sso_start_url=l.sso_start_url}const{sso_start_url:C,sso_account_id:L,sso_region:z,sso_role_name:S,sso_session:Z}=yT(U,r.logger);return kT({ssoStartUrl:C,ssoSession:Z,ssoAccountId:L,ssoRegion:z,ssoRoleName:S,ssoClient:E,clientConfig:r.clientConfig,profile:I})}else if(!f||!s||!w||!h)throw new Hh.CredentialsProviderError('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"',{tryNextLink:!1,logger:r.logger});else return kT({ssoStartUrl:f,ssoSession:$,ssoAccountId:s,ssoRegion:w,ssoRoleName:h,ssoClient:E,clientConfig:r.clientConfig,profile:I})};var _9=G(()=>{Hh=d(Cr(),1);sf();b9();NT()});var x9=()=>{};var mT={};Wf(mT,{validateSsoProfile:()=>yT,isSsoProfile:()=>wT,fromSSO:()=>Jx});var iT=G(()=>{_9();x9();NT()});var CI,e9=(r,f,s)=>{const w={EcsContainer:async(h)=>{const{fromHttp:$}=await Promise.resolve().then(() => (fT(),sT)),{fromContainerMetadata:E}=await Promise.resolve().then(() => (O1(),d1));return s?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"),CI.chain($(h??{}),E(h))},Ec2InstanceMetadata:async(h)=>{s?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");const{fromInstanceMetadata:$}=await Promise.resolve().then(() => (O1(),d1));return $(h)},Environment:async(h)=>{s?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");const{fromEnv:$}=await Promise.resolve().then(() => (x5(),mZ));return $(h)}};if(r in w)return w[r];else throw new CI.CredentialsProviderError(`Unsupported credential source in profile ${f}. Got ${r}, expected EcsContainer or Ec2InstanceMetadata or Environment.`,{logger:s})};var n9=G(()=>{CI=d(Cr(),1)});function Qx(r){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:r.region},propertiesExtractor:(f,s)=>({signingProperties:{config:f,context:s}})}}function o9(r){return{schemeId:"smithy.api#noAuth"}}var a9,p9=async(r,f,s)=>{return{operation:Zs(f).operation,region:await yr(r.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},u9=(r)=>{const f=[];switch(r.operation){case"AssumeRoleWithSAML":{f.push(o9(r));break}case"AssumeRoleWithWebIdentity":{f.push(o9(r));break}default:f.push(Qx(r))}return f},Mx=(r)=>({...r,stsClientCtor:S0}),t9=(r)=>{const f=Mx(r);return{...a9.resolveAwsSdkSigV4Config(f)}};var qT=G(()=>{a9=d(Br(),1);ps();C$()});var rQ=(r)=>{return{...r,useDualstackEndpoint:r.useDualstackEndpoint??!1,useFipsEndpoint:r.useFipsEndpoint??!1,useGlobalEndpoint:r.useGlobalEndpoint??!1,defaultSigningName:"sts"}},er;var af=G(()=>{er={UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}});var fQ;var sQ=G(()=>{fQ={name:"@aws-sdk/client-sts",description:"AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native",version:"3.637.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-sts","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"rimraf ./dist-types tsconfig.types.tsbuildinfo && tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sts",test:"yarn test:unit","test:unit":"jest"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/client-sso-oidc":"3.637.0","@aws-sdk/core":"3.635.0","@aws-sdk/credential-provider-node":"3.637.0","@aws-sdk/middleware-host-header":"3.620.0","@aws-sdk/middleware-logger":"3.609.0","@aws-sdk/middleware-recursion-detection":"3.620.0","@aws-sdk/middleware-user-agent":"3.637.0","@aws-sdk/region-config-resolver":"3.614.0","@aws-sdk/types":"3.609.0","@aws-sdk/util-endpoints":"3.637.0","@aws-sdk/util-user-agent-browser":"3.609.0","@aws-sdk/util-user-agent-node":"3.614.0","@smithy/config-resolver":"^3.0.5","@smithy/core":"^2.4.0","@smithy/fetch-http-handler":"^3.2.4","@smithy/hash-node":"^3.0.3","@smithy/invalid-dependency":"^3.0.3","@smithy/middleware-content-length":"^3.0.5","@smithy/middleware-endpoint":"^3.1.0","@smithy/middleware-retry":"^3.0.15","@smithy/middleware-serde":"^3.0.3","@smithy/middleware-stack":"^3.0.3","@smithy/node-config-provider":"^3.1.4","@smithy/node-http-handler":"^3.1.4","@smithy/protocol-http":"^4.1.0","@smithy/smithy-client":"^3.2.0","@smithy/types":"^3.3.0","@smithy/url-parser":"^3.0.3","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.15","@smithy/util-defaults-mode-node":"^3.0.15","@smithy/util-endpoints":"^2.0.5","@smithy/util-middleware":"^3.0.3","@smithy/util-retry":"^3.0.3","@smithy/util-utf8":"^3.0.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node16":"16.1.3","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=16.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sts",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sts"}}});var wQ,vT,CQ,hQ,Or,$Q,LQ,AQ,nr,Ss,EQ,WQ,RQ,IQ,zQ,FQ,UQ,TQ,GQ,lx,SQ;var PQ=G(()=>{wQ={["required"]:!1,["type"]:"String"},vT={["required"]:!0,default:!1,["type"]:"Boolean"},CQ={["ref"]:"Endpoint"},hQ={["fn"]:"isSet",["argv"]:[{["ref"]:"Region"}]},Or={["ref"]:"Region"},$Q={["fn"]:"aws.partition",["argv"]:[Or],assign:"PartitionResult"},LQ={["ref"]:"UseFIPS"},AQ={["ref"]:"UseDualStack"},nr={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:"sigv4",signingName:"sts",signingRegion:"us-east-1"}]},headers:{}},Ss={},EQ={conditions:[{["fn"]:"stringEquals",["argv"]:[Or,"aws-global"]}],["endpoint"]:nr,["type"]:"endpoint"},WQ={["fn"]:"booleanEquals",["argv"]:[LQ,!0]},RQ={["fn"]:"booleanEquals",["argv"]:[AQ,!0]},IQ={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},zQ={["ref"]:"PartitionResult"},FQ={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[zQ,"supportsDualStack"]}]},UQ=[{["fn"]:"isSet",["argv"]:[CQ]}],TQ=[WQ],GQ=[RQ],lx={version:"1.0",parameters:{Region:wQ,UseDualStack:vT,UseFIPS:vT,Endpoint:wQ,UseGlobalEndpoint:vT},rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseGlobalEndpoint"},!0]},{["fn"]:"not",["argv"]:UQ},hQ,$Q,{["fn"]:"booleanEquals",["argv"]:[LQ,!1]},{["fn"]:"booleanEquals",["argv"]:[AQ,!1]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[Or,"ap-northeast-1"]}],endpoint:nr,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[Or,"ap-south-1"]}],endpoint:nr,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[Or,"ap-southeast-1"]}],endpoint:nr,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[Or,"ap-southeast-2"]}],endpoint:nr,["type"]:"endpoint"},EQ,{conditions:[{["fn"]:"stringEquals",["argv"]:[Or,"ca-central-1"]}],endpoint:nr,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[Or,"eu-central-1"]}],endpoint:nr,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[Or,"eu-north-1"]}],endpoint:nr,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[Or,"eu-west-1"]}],endpoint:nr,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[Or,"eu-west-2"]}],endpoint:nr,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[Or,"eu-west-3"]}],endpoint:nr,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[Or,"sa-east-1"]}],endpoint:nr,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[Or,"us-east-1"]}],endpoint:nr,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[Or,"us-east-2"]}],endpoint:nr,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[Or,"us-west-1"]}],endpoint:nr,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[Or,"us-west-2"]}],endpoint:nr,["type"]:"endpoint"},{endpoint:{url:"https://sts.{Region}.{PartitionResult#dnsSuffix}",properties:{authSchemes:[{name:"sigv4",signingName:"sts",signingRegion:"{Region}"}]},headers:Ss},["type"]:"endpoint"}],["type"]:"tree"},{conditions:UQ,rules:[{conditions:TQ,error:"Invalid Configuration: FIPS and custom endpoint are not supported",["type"]:"error"},{conditions:GQ,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",["type"]:"error"},{endpoint:{url:CQ,properties:Ss,headers:Ss},["type"]:"endpoint"}],["type"]:"tree"},{conditions:[hQ],rules:[{conditions:[$Q],rules:[{conditions:[WQ,RQ],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,IQ]},FQ],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Ss,headers:Ss},["type"]:"endpoint"}],["type"]:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",["type"]:"error"}],["type"]:"tree"},{conditions:TQ,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[IQ,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[zQ,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:Ss,headers:Ss},["type"]:"endpoint"},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:Ss,headers:Ss},["type"]:"endpoint"}],["type"]:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",["type"]:"error"}],["type"]:"tree"},{conditions:GQ,rules:[{conditions:[FQ],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Ss,headers:Ss},["type"]:"endpoint"}],["type"]:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",["type"]:"error"}],["type"]:"tree"},EQ,{endpoint:{url:"https://sts.{Region}.{PartitionResult#dnsSuffix}",properties:Ss,headers:Ss},["type"]:"endpoint"}],["type"]:"tree"}],["type"]:"tree"},{error:"Invalid Configuration: Missing Region",["type"]:"error"}]},SQ=lx});var XQ=(r,f={})=>{return ns(SQ,{endpointParams:r,logger:f.logger})};var YQ=G(()=>{Lw();os();PQ();pr.aws=as});var KQ,ZQ,JQ=(r)=>{return{apiVersion:"2011-06-15",base64Decoder:r?.base64Decoder??Is,base64Encoder:r?.base64Encoder??Us,disableHostPrefix:r?.disableHostPrefix??!1,endpointProvider:r?.endpointProvider??XQ,extensions:r?.extensions??[],httpAuthSchemeProvider:r?.httpAuthSchemeProvider??u9,httpAuthSchemes:r?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(f)=>f.getIdentityProvider("aws.auth#sigv4"),signer:new KQ.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(f)=>f.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new ZQ.NoAuthSigner}],logger:r?.logger??new As,serviceId:r?.serviceId??"STS",urlParser:r?.urlParser??br,utf8Decoder:r?.utf8Decoder??gr,utf8Encoder:r?.utf8Encoder??Fs}};var QQ=G(()=>{KQ=d(Br(),1),ZQ=d(dr(),1);Y();j0();C0();mf();qT();YQ()});var LI,MQ,BQ=(r)=>{Of(process.version);const f=ef(r),s=()=>f().then(df),w=JQ(r);return LI.emitWarningIfUnsupportedVersion(process.version),{...w,...r,runtime:"node",defaultsMode:f,bodyLengthChecker:r?.bodyLengthChecker??xf,credentialDefaultProvider:r?.credentialDefaultProvider??A0,defaultUserAgentProvider:r?.defaultUserAgentProvider??_f({serviceId:w.serviceId,clientVersion:fQ.version}),httpAuthSchemes:r?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(h)=>h.getIdentityProvider("aws.auth#sigv4")||(async($)=>await A0($?.__config||{})()),signer:new LI.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(h)=>h.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new MQ.NoAuthSigner}],maxAttempts:r?.maxAttempts??u(kf),region:r?.region??u(Js,Mf),requestHandler:ur.create(r?.requestHandler??s),retryMode:r?.retryMode??u({...Nf,default:async()=>(await s()).retryMode||Ds}),sha256:r?.sha256??hf.bind(null,"sha256"),streamCollector:r?.streamCollector??ks,useDualstackEndpoint:r?.useDualstackEndpoint??u(Jf),useFipsEndpoint:r?.useFipsEndpoint??u(Qf)}};var lQ=G(()=>{sQ();LI=d(Br(),1);c1();Ph();Qs();MQ=d(dr(),1);Xh();wf();ff();O0();Yh();Ls();QQ();Y();Kh();Y()});var HQ=(r)=>{const f=r.httpAuthSchemes;let{httpAuthSchemeProvider:s,credentials:w}=r;return{setHttpAuthScheme(h){const $=f.findIndex((E)=>E.schemeId===h.schemeId);if($===-1)f.push(h);else f.splice($,1,h)},httpAuthSchemes(){return f},setHttpAuthSchemeProvider(h){s=h},httpAuthSchemeProvider(){return s},setCredentials(h){w=h},credentials(){return w}}},VQ=(r)=>{return{httpAuthSchemes:r.httpAuthSchemes(),httpAuthSchemeProvider:r.httpAuthSchemeProvider(),credentials:r.credentials()}};var AI=(r)=>r,DQ=(r,f)=>{const s={...AI(nf(r)),...AI(cf(r)),...AI(Rf(r)),...AI(HQ(r))};return f.forEach((w)=>w.configure(s)),{...r,...of(s),...bf(s),...zf(s),...VQ(s)}};var kQ=G(()=>{Zh();kr();Y()});var Vh,S0;var C$=G(()=>{xw();ew();nw();aw();Qs();Vh=d(dr(),1);Eh();B();wf();Y();qT();af();lQ();kQ();S0=class S0 extends Ws{constructor(...[r]){const f=BQ(r||{}),s=rQ(f),w=Kf(s),h=yf(w),$=Bf(h),E=Sf($),I=Vf(E),F=t9(I),U=DQ(F,r?.extensions||[]);super(U);this.config=U,this.middlewareStack.use(Zf(this.config)),this.middlewareStack.use(gf(this.config)),this.middlewareStack.use(Hf(this.config)),this.middlewareStack.use(Pf(this.config)),this.middlewareStack.use(Xf(this.config)),this.middlewareStack.use(Yf(this.config)),this.middlewareStack.use(Vh.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:p9,identityProviderConfigProvider:async(C)=>new Vh.DefaultIdentityProviderConfig({"aws.auth#sigv4":C.credentials})})),this.middlewareStack.use(Vh.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}});var rs;var WI=G(()=>{Y();rs=class rs extends ys{constructor(r){super(r);Object.setPrototypeOf(this,rs.prototype)}}});var L$,A$,W$,R$,z$,S$,P$,X$,Dh=(r)=>({...r,...r.SecretAccessKey&&{SecretAccessKey:o}}),jT=(r)=>({...r,...r.Credentials&&{Credentials:Dh(r.Credentials)}}),dT=(r)=>({...r,...r.SAMLAssertion&&{SAMLAssertion:o}}),OT=(r)=>({...r,...r.Credentials&&{Credentials:Dh(r.Credentials)}}),cT=(r)=>({...r,...r.WebIdentityToken&&{WebIdentityToken:o}}),bT=(r)=>({...r,...r.Credentials&&{Credentials:Dh(r.Credentials)}}),gT=(r)=>({...r,...r.Credentials&&{Credentials:Dh(r.Credentials)}}),_T=(r)=>({...r,...r.Credentials&&{Credentials:Dh(r.Credentials)}});var u0=G(()=>{Y();WI();L$=class L$ extends rs{constructor(r){super({name:"ExpiredTokenException",$fault:"client",...r});this.name="ExpiredTokenException",this.$fault="client",Object.setPrototypeOf(this,L$.prototype)}};A$=class A$ extends rs{constructor(r){super({name:"MalformedPolicyDocumentException",$fault:"client",...r});this.name="MalformedPolicyDocumentException",this.$fault="client",Object.setPrototypeOf(this,A$.prototype)}};W$=class W$ extends rs{constructor(r){super({name:"PackedPolicyTooLargeException",$fault:"client",...r});this.name="PackedPolicyTooLargeException",this.$fault="client",Object.setPrototypeOf(this,W$.prototype)}};R$=class R$ extends rs{constructor(r){super({name:"RegionDisabledException",$fault:"client",...r});this.name="RegionDisabledException",this.$fault="client",Object.setPrototypeOf(this,R$.prototype)}};z$=class z$ extends rs{constructor(r){super({name:"IDPRejectedClaimException",$fault:"client",...r});this.name="IDPRejectedClaimException",this.$fault="client",Object.setPrototypeOf(this,z$.prototype)}};S$=class S$ extends rs{constructor(r){super({name:"InvalidIdentityTokenException",$fault:"client",...r});this.name="InvalidIdentityTokenException",this.$fault="client",Object.setPrototypeOf(this,S$.prototype)}};P$=class P$ extends rs{constructor(r){super({name:"IDPCommunicationErrorException",$fault:"client",...r});this.name="IDPCommunicationErrorException",this.$fault="client",Object.setPrototypeOf(this,P$.prototype)}};X$=class X$ extends rs{constructor(r){super({name:"InvalidAuthorizationMessageException",$fault:"client",...r});this.name="InvalidAuthorizationMessageException",this.$fault="client",Object.setPrototypeOf(this,X$.prototype)}}});var $f,yQ=async(r,f)=>{const s=sw;let w;return w=$w({...qx(r,f),[ww]:Ae,[hw]:fw}),rw(f,s,"/",void 0,w)},NQ=async(r,f)=>{const s=sw;let w;return w=$w({...vx(r,f),[ww]:We,[hw]:fw}),rw(f,s,"/",void 0,w)},mQ=async(r,f)=>{const s=sw;let w;return w=$w({...jx(r,f),[ww]:Re,[hw]:fw}),rw(f,s,"/",void 0,w)},iQ=async(r,f)=>{const s=sw;let w;return w=$w({...dx(r,f),[ww]:ze,[hw]:fw}),rw(f,s,"/",void 0,w)},qQ=async(r,f)=>{const s=sw;let w;return w=$w({...Ox(r,f),[ww]:Se,[hw]:fw}),rw(f,s,"/",void 0,w)},vQ=async(r,f)=>{const s=sw;let w;return w=$w({...cx(r,f),[ww]:Pe,[hw]:fw}),rw(f,s,"/",void 0,w)},jQ=async(r,f)=>{const s=sw;let w;return w=$w({...bx(r,f),[ww]:Xe,[hw]:fw}),rw(f,s,"/",void 0,w)},dQ=async(r,f)=>{const s=sw;let w;return w=$w({...gx(r,f),[ww]:Ye,[hw]:fw}),rw(f,s,"/",void 0,w)},OQ=async(r,f)=>{if(r.statusCode>=300)return t0(r,f);const s=await $f.parseXmlBody(r.body,f);let w={};return w=ax(s.AssumeRoleResult,f),{$metadata:or(r),...w}},cQ=async(r,f)=>{if(r.statusCode>=300)return t0(r,f);const s=await $f.parseXmlBody(r.body,f);let w={};return w=px(s.AssumeRoleWithSAMLResult,f),{$metadata:or(r),...w}},bQ=async(r,f)=>{if(r.statusCode>=300)return t0(r,f);const s=await $f.parseXmlBody(r.body,f);let w={};return w=ux(s.AssumeRoleWithWebIdentityResult,f),{$metadata:or(r),...w}},gQ=async(r,f)=>{if(r.statusCode>=300)return t0(r,f);const s=await $f.parseXmlBody(r.body,f);let w={};return w=tx(s.DecodeAuthorizationMessageResult,f),{$metadata:or(r),...w}},_Q=async(r,f)=>{if(r.statusCode>=300)return t0(r,f);const s=await $f.parseXmlBody(r.body,f);let w={};return w=fe(s.GetAccessKeyInfoResult,f),{$metadata:or(r),...w}},xQ=async(r,f)=>{if(r.statusCode>=300)return t0(r,f);const s=await $f.parseXmlBody(r.body,f);let w={};return w=we(s.GetCallerIdentityResult,f),{$metadata:or(r),...w}},eQ=async(r,f)=>{if(r.statusCode>=300)return t0(r,f);const s=await $f.parseXmlBody(r.body,f);let w={};return w=he(s.GetFederationTokenResult,f),{$metadata:or(r),...w}},nQ=async(r,f)=>{if(r.statusCode>=300)return t0(r,f);const s=await $f.parseXmlBody(r.body,f);let w={};return w=$e(s.GetSessionTokenResult,f),{$metadata:or(r),...w}},t0=async(r,f)=>{const s={...r,body:await $f.parseXmlErrorBody(r.body,f)},w=Ke(r,s.body);switch(w){case"ExpiredTokenException":case"com.amazonaws.sts#ExpiredTokenException":throw await Hx(s,f);case"MalformedPolicyDocument":case"com.amazonaws.sts#MalformedPolicyDocumentException":throw await Nx(s,f);case"PackedPolicyTooLarge":case"com.amazonaws.sts#PackedPolicyTooLargeException":throw await mx(s,f);case"RegionDisabledException":case"com.amazonaws.sts#RegionDisabledException":throw await ix(s,f);case"IDPRejectedClaim":case"com.amazonaws.sts#IDPRejectedClaimException":throw await Dx(s,f);case"InvalidIdentityToken":case"com.amazonaws.sts#InvalidIdentityTokenException":throw await yx(s,f);case"IDPCommunicationError":case"com.amazonaws.sts#IDPCommunicationErrorException":throw await Vx(s,f);case"InvalidAuthorizationMessageException":case"com.amazonaws.sts#InvalidAuthorizationMessageException":throw await kx(s,f);default:const h=s.body;return Le({output:r,parsedBody:h.Error,errorCode:w})}},Hx=async(r,f)=>{const s=r.body,w=re(s.Error,f),h=new L$({$metadata:or(r),...w});return D(h,s)},Vx=async(r,f)=>{const s=r.body,w=Ee(s.Error,f),h=new P$({$metadata:or(r),...w});return D(h,s)},Dx=async(r,f)=>{const s=r.body,w=Ie(s.Error,f),h=new z$({$metadata:or(r),...w});return D(h,s)},kx=async(r,f)=>{const s=r.body,w=Fe(s.Error,f),h=new X$({$metadata:or(r),...w});return D(h,s)},yx=async(r,f)=>{const s=r.body,w=Ue(s.Error,f),h=new S$({$metadata:or(r),...w});return D(h,s)},Nx=async(r,f)=>{const s=r.body,w=Te(s.Error,f),h=new A$({$metadata:or(r),...w});return D(h,s)},mx=async(r,f)=>{const s=r.body,w=Ge(s.Error,f),h=new W$({$metadata:or(r),...w});return D(h,s)},ix=async(r,f)=>{const s=r.body,w=Ce(s.Error,f),h=new R$({$metadata:or(r),...w});return D(h,s)},qx=(r,f)=>{const s={};if(r[Y0]!=null)s[Y0]=r[Y0];if(r[mh]!=null)s[mh]=r[mh];if(r[qs]!=null){const w=RI(r[qs],f);if(r[qs]?.length===0)s.PolicyArns=[];Object.entries(w).forEach(([h,$])=>{const E=`PolicyArns.${h}`;s[E]=$})}if(r[is]!=null)s[is]=r[is];if(r[fs]!=null)s[fs]=r[fs];if(r[qh]!=null){const w=oQ(r[qh],f);if(r[qh]?.length===0)s.Tags=[];Object.entries(w).forEach(([h,$])=>{const E=`Tags.${h}`;s[E]=$})}if(r[WG]!=null){const w=ox(r[WG],f);if(r[WG]?.length===0)s.TransitiveTagKeys=[];Object.entries(w).forEach(([h,$])=>{const E=`TransitiveTagKeys.${h}`;s[E]=$})}if(r[aT]!=null)s[aT]=r[aT];if(r[ih]!=null)s[ih]=r[ih];if(r[vh]!=null)s[vh]=r[vh];if(r[js]!=null)s[js]=r[js];if(r[EG]!=null){const w=ex(r[EG],f);if(r[EG]?.length===0)s.ProvidedContexts=[];Object.entries(w).forEach(([h,$])=>{const E=`ProvidedContexts.${h}`;s[E]=$})}return s},vx=(r,f)=>{const s={};if(r[Y0]!=null)s[Y0]=r[Y0];if(r[hG]!=null)s[hG]=r[hG];if(r[GG]!=null)s[GG]=r[GG];if(r[qs]!=null){const w=RI(r[qs],f);if(r[qs]?.length===0)s.PolicyArns=[];Object.entries(w).forEach(([h,$])=>{const E=`PolicyArns.${h}`;s[E]=$})}if(r[is]!=null)s[is]=r[is];if(r[fs]!=null)s[fs]=r[fs];return s},jx=(r,f)=>{const s={};if(r[Y0]!=null)s[Y0]=r[Y0];if(r[mh]!=null)s[mh]=r[mh];if(r[SG]!=null)s[SG]=r[SG];if(r[IG]!=null)s[IG]=r[IG];if(r[qs]!=null){const w=RI(r[qs],f);if(r[qs]?.length===0)s.PolicyArns=[];Object.entries(w).forEach(([h,$])=>{const E=`PolicyArns.${h}`;s[E]=$})}if(r[is]!=null)s[is]=r[is];if(r[fs]!=null)s[fs]=r[fs];return s},dx=(r,f)=>{const s={};if(r[pT]!=null)s[pT]=r[pT];return s},Ox=(r,f)=>{const s={};if(r[kh]!=null)s[kh]=r[kh];return s},cx=(r,f)=>{return{}},bx=(r,f)=>{const s={};if(r[fG]!=null)s[fG]=r[fG];if(r[is]!=null)s[is]=r[is];if(r[qs]!=null){const w=RI(r[qs],f);if(r[qs]?.length===0)s.PolicyArns=[];Object.entries(w).forEach(([h,$])=>{const E=`PolicyArns.${h}`;s[E]=$})}if(r[fs]!=null)s[fs]=r[fs];if(r[qh]!=null){const w=oQ(r[qh],f);if(r[qh]?.length===0)s.Tags=[];Object.entries(w).forEach(([h,$])=>{const E=`Tags.${h}`;s[E]=$})}return s},gx=(r,f)=>{const s={};if(r[fs]!=null)s[fs]=r[fs];if(r[ih]!=null)s[ih]=r[ih];if(r[vh]!=null)s[vh]=r[vh];return s},RI=(r,f)=>{const s={};let w=1;for(let h of r){if(h===null)continue;const $=_x(h,f);Object.entries($).forEach(([E,I])=>{s[`member.${w}.${E}`]=I}),w++}return s},_x=(r,f)=>{const s={};if(r[PG]!=null)s[PG]=r[PG];return s},xx=(r,f)=>{const s={};if(r[$G]!=null)s[$G]=r[$G];if(r[eT]!=null)s[eT]=r[eT];return s},ex=(r,f)=>{const s={};let w=1;for(let h of r){if(h===null)continue;const $=xx(h,f);Object.entries($).forEach(([E,I])=>{s[`member.${w}.${E}`]=I}),w++}return s},nx=(r,f)=>{const s={};if(r[sG]!=null)s[sG]=r[sG];if(r[zG]!=null)s[zG]=r[zG];return s},ox=(r,f)=>{const s={};let w=1;for(let h of r){if(h===null)continue;s[`member.${w}`]=h,w++}return s},oQ=(r,f)=>{const s={};let w=1;for(let h of r){if(h===null)continue;const $=nx(h,f);Object.entries($).forEach(([E,I])=>{s[`member.${w}.${E}`]=I}),w++}return s},XG=(r,f)=>{const s={};if(r[xT]!=null)s[xT]=T(r[xT]);if(r[X0]!=null)s[X0]=T(r[X0]);return s},ax=(r,f)=>{const s={};if(r[ss]!=null)s[ss]=Y$(r[ss],f);if(r[P0]!=null)s[P0]=XG(r[P0],f);if(r[vs]!=null)s[vs]=hr(r[vs]);if(r[js]!=null)s[js]=T(r[js]);return s},px=(r,f)=>{const s={};if(r[ss]!=null)s[ss]=Y$(r[ss],f);if(r[P0]!=null)s[P0]=XG(r[P0],f);if(r[vs]!=null)s[vs]=hr(r[vs]);if(r[UG]!=null)s[UG]=T(r[UG]);if(r[LG]!=null)s[LG]=T(r[LG]);if(r[rG]!=null)s[rG]=T(r[rG]);if(r[Nh]!=null)s[Nh]=T(r[Nh]);if(r[wG]!=null)s[wG]=T(r[wG]);if(r[js]!=null)s[js]=T(r[js]);return s},ux=(r,f)=>{const s={};if(r[ss]!=null)s[ss]=Y$(r[ss],f);if(r[CG]!=null)s[CG]=T(r[CG]);if(r[P0]!=null)s[P0]=XG(r[P0],f);if(r[vs]!=null)s[vs]=hr(r[vs]);if(r[FG]!=null)s[FG]=T(r[FG]);if(r[Nh]!=null)s[Nh]=T(r[Nh]);if(r[js]!=null)s[js]=T(r[js]);return s},Y$=(r,f)=>{const s={};if(r[kh]!=null)s[kh]=T(r[kh]);if(r[TG]!=null)s[TG]=T(r[TG]);if(r[AG]!=null)s[AG]=T(r[AG]);if(r[oT]!=null)s[oT]=N(Qw(r[oT]));return s},tx=(r,f)=>{const s={};if(r[nT]!=null)s[nT]=T(r[nT]);return s},re=(r,f)=>{const s={};if(r[zr]!=null)s[zr]=T(r[zr]);return s},se=(r,f)=>{const s={};if(r[tT]!=null)s[tT]=T(r[tT]);if(r[X0]!=null)s[X0]=T(r[X0]);return s},fe=(r,f)=>{const s={};if(r[yh]!=null)s[yh]=T(r[yh]);return s},we=(r,f)=>{const s={};if(r[RG]!=null)s[RG]=T(r[RG]);if(r[yh]!=null)s[yh]=T(r[yh]);if(r[X0]!=null)s[X0]=T(r[X0]);return s},he=(r,f)=>{const s={};if(r[ss]!=null)s[ss]=Y$(r[ss],f);if(r[uT]!=null)s[uT]=se(r[uT],f);if(r[vs]!=null)s[vs]=hr(r[vs]);return s},$e=(r,f)=>{const s={};if(r[ss]!=null)s[ss]=Y$(r[ss],f);return s},Ee=(r,f)=>{const s={};if(r[zr]!=null)s[zr]=T(r[zr]);return s},Ie=(r,f)=>{const s={};if(r[zr]!=null)s[zr]=T(r[zr]);return s},Fe=(r,f)=>{const s={};if(r[zr]!=null)s[zr]=T(r[zr]);return s},Ue=(r,f)=>{const s={};if(r[zr]!=null)s[zr]=T(r[zr]);return s},Te=(r,f)=>{const s={};if(r[zr]!=null)s[zr]=T(r[zr]);return s},Ge=(r,f)=>{const s={};if(r[zr]!=null)s[zr]=T(r[zr]);return s},Ce=(r,f)=>{const s={};if(r[zr]!=null)s[zr]=T(r[zr]);return s},or=(r)=>({httpStatusCode:r.statusCode,requestId:r.headers["x-amzn-requestid"]??r.headers["x-amzn-request-id"]??r.headers["x-amz-request-id"],extendedRequestId:r.headers["x-amz-id-2"],cfId:r.headers["x-amz-cf-id"]}),Le,rw=async(r,f,s,w,h)=>{const{hostname:$,protocol:E="https",port:I,path:F}=await r.endpoint(),U={protocol:E,hostname:$,port:I,method:"POST",path:F.endsWith("/")?F.slice(0,-1)+s:F+s,headers:f};if(w!==void 0)U.hostname=w;if(h!==void 0)U.body=h;return new Qr(U)},sw,fw="2011-06-15",ww="Action",kh="AccessKeyId",Ae="AssumeRole",xT="AssumedRoleId",P0="AssumedRoleUser",We="AssumeRoleWithSAML",Re="AssumeRoleWithWebIdentity",yh="Account",X0="Arn",Nh="Audience",ss="Credentials",eT="ContextAssertion",ze="DecodeAuthorizationMessage",nT="DecodedMessage",fs="DurationSeconds",oT="Expiration",aT="ExternalId",pT="EncodedMessage",uT="FederatedUser",tT="FederatedUserId",Se="GetAccessKeyInfo",Pe="GetCallerIdentity",Xe="GetFederationToken",Ye="GetSessionToken",rG="Issuer",sG="Key",fG="Name",wG="NameQualifier",is="Policy",qs="PolicyArns",hG="PrincipalArn",$G="ProviderArn",EG="ProvidedContexts",IG="ProviderId",vs="PackedPolicySize",FG="Provider",Y0="RoleArn",mh="RoleSessionName",UG="Subject",TG="SecretAccessKey",GG="SAMLAssertion",CG="SubjectFromWebIdentityToken",js="SourceIdentity",ih="SerialNumber",LG="SubjectType",AG="SessionToken",qh="Tags",vh="TokenCode",WG="TransitiveTagKeys",RG="UserId",hw="Version",zG="Value",SG="WebIdentityToken",PG="arn",zr="message",$w=(r)=>Object.entries(r).map(([f,s])=>Y3(f)+"="+Y3(s)).join("&"),Ke=(r,f)=>{if(f.Error?.Code!==void 0)return f.Error.Code;if(r.statusCode==404)return"NotFound"};var K0=G(()=>{$f=d(Br(),1);kr();Y();u0();WI();Le=jf(rs),sw={"content-type":"application/x-www-form-urlencoded"}});var jh;var zI=G(()=>{B();H();Y();af();u0();K0();jh=class jh extends A.classBuilder().ep({...er}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").f(void 0,jT).ser(yQ).de(OQ).build(){}});var SI;var YG=G(()=>{B();H();Y();af();u0();K0();SI=class SI extends A.classBuilder().ep({...er}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithSAML",{}).n("STSClient","AssumeRoleWithSAMLCommand").f(dT,OT).ser(NQ).de(cQ).build(){}});var dh;var PI=G(()=>{B();H();Y();af();u0();K0();dh=class dh extends A.classBuilder().ep({...er}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithWebIdentity",{}).n("STSClient","AssumeRoleWithWebIdentityCommand").f(cT,bT).ser(mQ).de(bQ).build(){}});var XI;var KG=G(()=>{B();H();Y();af();K0();XI=class XI extends A.classBuilder().ep({...er}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","DecodeAuthorizationMessage",{}).n("STSClient","DecodeAuthorizationMessageCommand").f(void 0,void 0).ser(iQ).de(gQ).build(){}});var YI;var ZG=G(()=>{B();H();Y();af();K0();YI=class YI extends A.classBuilder().ep({...er}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetAccessKeyInfo",{}).n("STSClient","GetAccessKeyInfoCommand").f(void 0,void 0).ser(qQ).de(_Q).build(){}});var KI;var JG=G(()=>{B();H();Y();af();K0();KI=class KI extends A.classBuilder().ep({...er}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetCallerIdentity",{}).n("STSClient","GetCallerIdentityCommand").f(void 0,void 0).ser(vQ).de(xQ).build(){}});var ZI;var QG=G(()=>{B();H();Y();af();u0();K0();ZI=class ZI extends A.classBuilder().ep({...er}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetFederationToken",{}).n("STSClient","GetFederationTokenCommand").f(void 0,gT).ser(jQ).de(eQ).build(){}});var JI;var MG=G(()=>{B();H();Y();af();u0();K0();JI=class JI extends A.classBuilder().ep({...er}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetSessionToken",{}).n("STSClient","GetSessionTokenCommand").f(void 0,_T).ser(dQ).de(nQ).build(){}});var Ze,BG;var aQ=G(()=>{Y();zI();YG();PI();KG();ZG();JG();QG();MG();C$();Ze={AssumeRoleCommand:jh,AssumeRoleWithSAMLCommand:SI,AssumeRoleWithWebIdentityCommand:dh,DecodeAuthorizationMessageCommand:XI,GetAccessKeyInfoCommand:YI,GetCallerIdentityCommand:KI,GetFederationTokenCommand:ZI,GetSessionTokenCommand:JI};BG=class BG extends S0{};qf(Ze,BG)});var pQ=G(()=>{zI();YG();PI();KG();ZG();JG();QG();MG()});var uQ=G(()=>{u0()});var tQ="us-east-1",rM=(r)=>{if(typeof r?.Arn==="string"){const f=r.Arn.split(":");if(f.length>4&&f[4]!=="")return f[4]}return},sM=async(r,f,s)=>{const w=typeof r==="function"?await r():r,h=typeof f==="function"?await f():f;return s?.debug?.("@aws-sdk/client-sts::resolveRegion","accepting first of:",`${w} (provider)`,`${h} (parent client)`,`${tQ} (STS default)`),w??h??tQ},fM=(r,f)=>{let s,w;return async(h,$)=>{if(w=h,!s){const{logger:U=r?.parentClientConfig?.logger,region:C,requestHandler:L=r?.parentClientConfig?.requestHandler,credentialProviderLogger:z}=r,S=await sM(C,r?.parentClientConfig?.region,z),Z=!hM(L);s=new f({credentialDefaultProvider:()=>async()=>w,region:S,requestHandler:Z?L:void 0,logger:U})}const{Credentials:E,AssumedRoleUser:I}=await s.send(new jh($));if(!E||!E.AccessKeyId||!E.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRole call with role ${$.RoleArn}`);const F=rM(I);return{accessKeyId:E.AccessKeyId,secretAccessKey:E.SecretAccessKey,sessionToken:E.SessionToken,expiration:E.Expiration,...E.CredentialScope&&{credentialScope:E.CredentialScope},...F&&{accountId:F}}}},wM=(r,f)=>{let s;return async(w)=>{if(!s){const{logger:I=r?.parentClientConfig?.logger,region:F,requestHandler:U=r?.parentClientConfig?.requestHandler,credentialProviderLogger:C}=r,L=await sM(F,r?.parentClientConfig?.region,C),z=!hM(U);s=new f({region:L,requestHandler:z?U:void 0,logger:I})}const{Credentials:h,AssumedRoleUser:$}=await s.send(new dh(w));if(!h||!h.AccessKeyId||!h.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${w.RoleArn}`);const E=rM($);return{accessKeyId:h.AccessKeyId,secretAccessKey:h.SecretAccessKey,sessionToken:h.SessionToken,expiration:h.Expiration,...h.CredentialScope&&{credentialScope:h.CredentialScope},...E&&{accountId:E}}}},hM=(r)=>{return r?.metadata?.handlerProtocol==="h2"};var $M=G(()=>{zI();PI()});var EM=(r,f)=>{if(!f)return r;else return class s extends r{constructor(w){super(w);for(let h of f)this.middlewareStack.use(h)}}},IM=(r={},f)=>fM(r,EM(S0,f)),FM=(r={},f)=>wM(r,EM(S0,f)),Je=(r)=>(f)=>r({roleAssumer:IM(f),roleAssumerWithWebIdentity:FM(f),...f});var UM=G(()=>{$M();C$()});var lG={};Wf(lG,{getDefaultRoleAssumerWithWebIdentity:()=>FM,getDefaultRoleAssumer:()=>IM,decorateDefaultCredentialProvider:()=>Je,__Client:()=>Ws,STSServiceException:()=>rs,STSClient:()=>S0,STS:()=>BG,RegionDisabledException:()=>R$,PackedPolicyTooLargeException:()=>W$,MalformedPolicyDocumentException:()=>A$,InvalidIdentityTokenException:()=>S$,InvalidAuthorizationMessageException:()=>X$,IDPRejectedClaimException:()=>z$,IDPCommunicationErrorException:()=>P$,GetSessionTokenResponseFilterSensitiveLog:()=>_T,GetSessionTokenCommand:()=>JI,GetFederationTokenResponseFilterSensitiveLog:()=>gT,GetFederationTokenCommand:()=>ZI,GetCallerIdentityCommand:()=>KI,GetAccessKeyInfoCommand:()=>YI,ExpiredTokenException:()=>L$,DecodeAuthorizationMessageCommand:()=>XI,CredentialsFilterSensitiveLog:()=>Dh,AssumeRoleWithWebIdentityResponseFilterSensitiveLog:()=>bT,AssumeRoleWithWebIdentityRequestFilterSensitiveLog:()=>cT,AssumeRoleWithWebIdentityCommand:()=>dh,AssumeRoleWithSAMLResponseFilterSensitiveLog:()=>OT,AssumeRoleWithSAMLRequestFilterSensitiveLog:()=>dT,AssumeRoleWithSAMLCommand:()=>SI,AssumeRoleResponseFilterSensitiveLog:()=>jT,AssumeRoleCommand:()=>jh,$Command:()=>A});var HG=G(()=>{C$();aQ();pQ();uQ();UM();WI()});var VG,TM=(r,{profile:f="default",logger:s}={})=>{return Boolean(r)&&typeof r==="object"&&typeof r.role_arn==="string"&&["undefined","string"].indexOf(typeof r.role_session_name)>-1&&["undefined","string"].indexOf(typeof r.external_id)>-1&&["undefined","string"].indexOf(typeof r.mfa_serial)>-1&&(Qe(r,{profile:f,logger:s})||Me(r,{profile:f,logger:s}))},Qe=(r,{profile:f,logger:s})=>{const w=typeof r.source_profile==="string"&&typeof r.credential_source==="undefined";if(w)s?.debug?.(` ${f} isAssumeRoleWithSourceProfile source_profile=${r.source_profile}`);return w},Me=(r,{profile:f,logger:s})=>{const w=typeof r.credential_source==="string"&&typeof r.source_profile==="undefined";if(w)s?.debug?.(` ${f} isCredentialSourceProfile credential_source=${r.credential_source}`);return w},GM=async(r,f,s,w={})=>{s.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");const h=f[r];if(!s.roleAssumer){const{getDefaultRoleAssumer:C}=await Promise.resolve().then(() => (HG(),lG));s.roleAssumer=C({...s.clientConfig,credentialProviderLogger:s.logger,parentClientConfig:s?.parentClientConfig},s.clientPlugins)}const{source_profile:$}=h;if($&&$ in w)throw new VG.CredentialsProviderError(`Detected a cycle attempting to resolve credentials for profile ${ls(s)}. Profiles visited: `+Object.keys(w).join(", "),{logger:s.logger});s.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${$?`source_profile=[${$}]`:`profile=[${r}]`}`);const E=$?QI($,{...f,[$]:{...f[$],role_arn:h.role_arn??f[$].role_arn}},s,{...w,[$]:!0}):(await e9(h.credential_source,r,s.logger)(s))(),I={RoleArn:h.role_arn,RoleSessionName:h.role_session_name||`aws-sdk-js-${Date.now()}`,ExternalId:h.external_id,DurationSeconds:parseInt(h.duration_seconds||"3600",10)},{mfa_serial:F}=h;if(F){if(!s.mfaCodeProvider)throw new VG.CredentialsProviderError(`Profile ${r} requires multi-factor authentication, but no MFA code callback was provided.`,{logger:s.logger,tryNextLink:!1});I.SerialNumber=F,I.TokenCode=await s.mfaCodeProvider(F)}const U=await E;return s.roleAssumer(U,I)};var CM=G(()=>{VG=d(Cr(),1);sf();n9();DG()});var LM=(r,f,s)=>{if(f.Version!==1)throw Error(`Profile ${r} credential_process did not return Version 1.`);if(f.AccessKeyId===void 0||f.SecretAccessKey===void 0)throw Error(`Profile ${r} credential_process returned invalid credentials.`);if(f.Expiration){const h=new Date;if(new Date(f.Expiration)<h)throw Error(`Profile ${r} credential_process returned expired credentials.`)}let w=f.AccountId;if(!w&&s?.[r]?.aws_account_id)w=s[r].aws_account_id;return{accessKeyId:f.AccessKeyId,secretAccessKey:f.SecretAccessKey,...f.SessionToken&&{sessionToken:f.SessionToken},...f.Expiration&&{expiration:new Date(f.Expiration)},...f.CredentialScope&&{credentialScope:f.CredentialScope},...w&&{accountId:w}}};import{exec as Be}from"child_process";import{promisify as le}from"util";var MI,AM=async(r,f,s)=>{const w=f[r];if(f[r]){const h=w.credential_process;if(h!==void 0){const $=le(Be);try{const{stdout:E}=await $(h);let I;try{I=JSON.parse(E.trim())}catch{throw Error(`Profile ${r} credential_process returned invalid JSON.`)}return LM(r,I,f)}catch(E){throw new MI.CredentialsProviderError(E.message,{logger:s})}}else throw new MI.CredentialsProviderError(`Profile ${r} did not contain credential_process.`,{logger:s})}else throw new MI.CredentialsProviderError(`Profile ${r} could not be found in shared credentials file.`,{logger:s})};var WM=G(()=>{MI=d(Cr(),1)});var He=(r={})=>async()=>{r.logger?.debug("@aws-sdk/credential-provider-process - fromProcess");const f=await v0(r);return AM(ls(r),f,r.logger)};var RM=G(()=>{sf();WM()});var kG={};Wf(kG,{fromProcess:()=>He});var yG=G(()=>{RM()});var zM=(r)=>Boolean(r)&&typeof r==="object"&&typeof r.credential_process==="string",SM=async(r,f)=>Promise.resolve().then(() => (yG(),kG)).then(({fromProcess:s})=>s({...r,profile:f})());var PM=async(r,f={})=>{const{fromSSO:s}=await Promise.resolve().then(() => (iT(),mT));return s({profile:r,logger:f.logger})()},XM=(r)=>r&&(typeof r.sso_start_url==="string"||typeof r.sso_account_id==="string"||typeof r.sso_session==="string"||typeof r.sso_region==="string"||typeof r.sso_role_name==="string");var NG=(r)=>Boolean(r)&&typeof r==="object"&&typeof r.aws_access_key_id==="string"&&typeof r.aws_secret_access_key==="string"&&["undefined","string"].indexOf(typeof r.aws_session_token)>-1&&["undefined","string"].indexOf(typeof r.aws_account_id)>-1,mG=(r,f)=>{return f?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials"),Promise.resolve({accessKeyId:r.aws_access_key_id,secretAccessKey:r.aws_secret_access_key,sessionToken:r.aws_session_token,...r.aws_credential_scope&&{credentialScope:r.aws_credential_scope},...r.aws_account_id&&{accountId:r.aws_account_id}})};var iG=(r)=>async()=>{r.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");const{roleArn:f,roleSessionName:s,webIdentityToken:w,providerId:h,policyArns:$,policy:E,durationSeconds:I}=r;let{roleAssumerWithWebIdentity:F}=r;if(!F){const{getDefaultRoleAssumerWithWebIdentity:U}=await Promise.resolve().then(() => (HG(),lG));F=U({...r.clientConfig,credentialProviderLogger:r.logger,parentClientConfig:r.parentClientConfig},r.clientPlugins)}return F({RoleArn:f,RoleSessionName:s??`aws-sdk-js-session-${Date.now()}`,WebIdentityToken:w,ProviderId:h,PolicyArns:$,Policy:E,DurationSeconds:I})};import{readFileSync as Ve}from"fs";var YM,De="AWS_WEB_IDENTITY_TOKEN_FILE",ke="AWS_ROLE_ARN",ye="AWS_ROLE_SESSION_NAME",Ne=(r={})=>async()=>{r.logger?.debug("@aws-sdk/credential-provider-web-identity - fromTokenFile");const f=r?.webIdentityTokenFile??process.env[De],s=r?.roleArn??process.env[ke],w=r?.roleSessionName??process.env[ye];if(!f||!s)throw new YM.CredentialsProviderError("Web identity configuration not specified",{logger:r.logger});return iG({...r,webIdentityToken:Ve(f,{encoding:"ascii"}),roleArn:s,roleSessionName:w})()};var KM=G(()=>{YM=d(Cr(),1)});var qG={};Wf(qG,{fromWebToken:()=>iG,fromTokenFile:()=>Ne});var vG=G(()=>{KM()});var ZM=(r)=>Boolean(r)&&typeof r==="object"&&typeof r.web_identity_token_file==="string"&&typeof r.role_arn==="string"&&["undefined","string"].indexOf(typeof r.role_session_name)>-1,JM=async(r,f)=>Promise.resolve().then(() => (vG(),qG)).then(({fromTokenFile:s})=>s({webIdentityTokenFile:r.web_identity_token_file,roleArn:r.role_arn,roleSessionName:r.role_session_name,roleAssumerWithWebIdentity:f.roleAssumerWithWebIdentity,logger:f.logger,parentClientConfig:f.parentClientConfig})());var QM,QI=async(r,f,s,w={})=>{const h=f[r];if(Object.keys(w).length>0&&NG(h))return mG(h,s);if(TM(h,{profile:r,logger:s.logger}))return GM(r,f,s,w);if(NG(h))return mG(h,s);if(ZM(h))return JM(h,s);if(zM(h))return SM(s,r);if(XM(h))return await PM(r,s);throw new QM.CredentialsProviderError(`Could not resolve credentials using profile: [${r}] in configuration/credentials file(s).`,{logger:s.logger})};var DG=G(()=>{QM=d(Cr(),1);CM()});var me=(r={})=>async()=>{r.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");const f=await v0(r);return QI(ls(r),f,r)};var MM=G(()=>{sf();DG()});var BM={};Wf(BM,{fromIni:()=>me});var lM=G(()=>{MM()});var Ew,HM=!1,A0=(r={})=>Ew.memoize(Ew.chain(async()=>{if(r.profile??process.env[EP]){if(process.env[N3]&&process.env[m3]){if(!HM)(r.logger?.warn&&r.logger?.constructor?.name!=="NoOpLogger"?r.logger.warn:console.warn)(`@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING:
24
+ - EKS container host 169.254.170.23 or [fd00:ec2::23]`,{logger:s})};var YP=G(()=>{zP=m(Ar(),1)});function XP(r){return new Mr({protocol:r.protocol,hostname:r.hostname,port:Number(r.port),path:r.pathname,query:Array.from(r.searchParams.entries()).reduce((s,[f,w])=>{return s[f]=w,s},{}),fragment:r.hash})}async function KP(r,s){const w=await TZ(r.body).transformToString();if(r.statusCode===200){const h=JSON.parse(w);if(typeof h.AccessKeyId!=="string"||typeof h.SecretAccessKey!=="string"||typeof h.Token!=="string"||typeof h.Expiration!=="string")throw new u3.CredentialsProviderError("HTTP credential provider response not of the required format, an object matching: { AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }",{logger:s});return{accessKeyId:h.AccessKeyId,secretAccessKey:h.SecretAccessKey,sessionToken:h.Token,expiration:JZ(h.Expiration)}}if(r.statusCode>=400&&r.statusCode<500){let h={};try{h=JSON.parse(w)}catch(E){}throw Object.assign(new u3.CredentialsProviderError(`Server responded with status: ${r.statusCode}`,{logger:s}),{Code:h.Code,Message:h.Message})}throw new u3.CredentialsProviderError(`Server responded with status: ${r.statusCode}`,{logger:s})}var u3;var ZP=G(()=>{u3=m(Ar(),1);kr();K();xU()});var PP=(r,s,f)=>{return async()=>{for(let w=0;w<s;++w)try{return await r()}catch(h){await new Promise((E)=>setTimeout(E,f))}return await r()}};import Gx from"fs/promises";var JP,GT,Ax="AWS_CONTAINER_CREDENTIALS_RELATIVE_URI",Lx="http://169.254.170.2",Rx="AWS_CONTAINER_CREDENTIALS_FULL_URI",Cx="AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE",Wx="AWS_CONTAINER_AUTHORIZATION_TOKEN",QP=(r={})=>{r.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");let s;const f=r.awsContainerCredentialsRelativeUri??process.env[Ax],w=r.awsContainerCredentialsFullUri??process.env[Rx],h=r.awsContainerAuthorizationToken??process.env[Wx],E=r.awsContainerAuthorizationTokenFile??process.env[Cx],$=r.logger?.constructor?.name==="NoOpLogger"||!r.logger?console.warn:r.logger.warn;if(f&&w)$("@aws-sdk/credential-provider-http: you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri."),$("awsContainerCredentialsFullUri will take precedence.");if(h&&E)$("@aws-sdk/credential-provider-http: you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile."),$("awsContainerAuthorizationToken will take precedence.");if(w)s=w;else if(f)s=`${Lx}${f}`;else throw new GT.CredentialsProviderError(`No HTTP credential provider host provided.
25
+ Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`,{logger:r.logger});const I=new URL(s);SP(I,r.logger);const F=new ff({requestTimeout:r.timeout??1000,connectionTimeout:r.timeout??1000});return PP(async()=>{const U=XP(I);if(h)U.headers.Authorization=h;else if(E)U.headers.Authorization=(await Gx.readFile(E)).toString();try{const A=await F.handle(U);return KP(A.response).then((L)=>JP.setCredentialFeature(L,"CREDENTIALS_HTTP","z"))}catch(A){throw new GT.CredentialsProviderError(String(A),{logger:r.logger})}},r.maxRetries??3,r.timeout??1000)};var BP=G(()=>{JP=m(tr(),1);a0();GT=m(Ar(),1);YP();ZP()});var AT={};Ys(AT,{fromHttp:()=>QP});var LT=G(()=>{BP()});var t3,zx="AWS_EC2_METADATA_DISABLED",MP=async(r)=>{const{ENV_CMDS_FULL_URI:s,ENV_CMDS_RELATIVE_URI:f,fromContainerMetadata:w,fromInstanceMetadata:h}=await Promise.resolve().then(() => (x1(),g1));if(process.env[f]||process.env[s]){r.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata");const{fromHttp:E}=await Promise.resolve().then(() => (LT(),AT));return t3.chain(E(r),w(r))}if(process.env[zx])return async()=>{throw new t3.CredentialsProviderError("EC2 Instance Metadata Service access disabled",{logger:r.logger})};return r.logger?.debug("@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata"),h(r)};var VP=G(()=>{t3=m(Ar(),1)});var RT=(r)=>r&&(typeof r.sso_start_url==="string"||typeof r.sso_account_id==="string"||typeof r.sso_session==="string"||typeof r.sso_region==="string"||typeof r.sso_role_name==="string");var HP=300000,Zh="To refresh this SSO session run 'aws sso login' with the corresponding profile.";function Sx(r){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sso-oauth",region:r.region},propertiesExtractor:(s,f)=>({signingProperties:{config:s,context:f}})}}function CT(r){return{schemeId:"smithy.api#noAuth"}}var lP,DP=async(r,s,f)=>{return{operation:Vf(s).operation,region:await yr(r.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},kP=(r)=>{const s=[];switch(r.operation){case"CreateToken":{s.push(CT(r));break}case"RegisterClient":{s.push(CT(r));break}case"StartDeviceAuthorization":{s.push(CT(r));break}default:s.push(Sx(r))}return s},yP=(r)=>{return{...lP.resolveAwsSdkSigV4Config(r)}};var WT=G(()=>{lP=m(Qr(),1);Es()});var NP=(r)=>{return{...r,useDualstackEndpoint:r.useDualstackEndpoint??!1,useFipsEndpoint:r.useFipsEndpoint??!1,defaultSigningName:"sso-oauth"}},rw;var Ph=G(()=>{rw={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}});var mP;var qP=G(()=>{mP={name:"@aws-sdk/client-sso-oidc",description:"AWS SDK for JavaScript Sso Oidc Client for Node.js, Browser and React Native",version:"3.668.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-sso-oidc","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sso-oidc"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.667.0","@aws-sdk/credential-provider-node":"3.668.0","@aws-sdk/middleware-host-header":"3.667.0","@aws-sdk/middleware-logger":"3.667.0","@aws-sdk/middleware-recursion-detection":"3.667.0","@aws-sdk/middleware-user-agent":"3.668.0","@aws-sdk/region-config-resolver":"3.667.0","@aws-sdk/types":"3.667.0","@aws-sdk/util-endpoints":"3.667.0","@aws-sdk/util-user-agent-browser":"3.667.0","@aws-sdk/util-user-agent-node":"3.668.0","@smithy/config-resolver":"^3.0.9","@smithy/core":"^2.4.8","@smithy/fetch-http-handler":"^3.2.9","@smithy/hash-node":"^3.0.7","@smithy/invalid-dependency":"^3.0.7","@smithy/middleware-content-length":"^3.0.9","@smithy/middleware-endpoint":"^3.1.4","@smithy/middleware-retry":"^3.0.23","@smithy/middleware-serde":"^3.0.7","@smithy/middleware-stack":"^3.0.7","@smithy/node-config-provider":"^3.1.8","@smithy/node-http-handler":"^3.2.4","@smithy/protocol-http":"^4.1.4","@smithy/smithy-client":"^3.4.0","@smithy/types":"^3.5.0","@smithy/url-parser":"^3.0.7","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.23","@smithy/util-defaults-mode-node":"^3.0.23","@smithy/util-endpoints":"^2.1.3","@smithy/util-middleware":"^3.0.7","@smithy/util-retry":"^3.0.7","@smithy/util-utf8":"^3.0.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node16":"16.1.3","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=16.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",peerDependencies:{"@aws-sdk/client-sts":"^3.668.0"},browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso-oidc",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sso-oidc"}}});var zT;var ST=G(()=>{zT={isCrtAvailable:!1}});var jP=()=>{if(zT.isCrtAvailable)return["md/crt-avail"];return null};var vP=G(()=>{ST()});import{platform as Xx,release as Kx}from"os";import{env as iP,versions as Zx}from"process";var Px=({serviceId:r,clientVersion:s})=>{return async(f)=>{const w=[["aws-sdk-js",s],["ua","2.1"],[`os/${Xx()}`,Kx()],["lang/js"],["md/nodejs",`${Zx.node}`]],h=jP();if(h)w.push(h);if(r)w.push([`api/${r}`,s]);if(iP.AWS_EXECUTION_ENV)w.push([`exec-env/${iP.AWS_EXECUTION_ENV}`]);const E=await f?.userAgentAppId?.();return E?[...w,[`app/${E}`]]:[...w]}},os;var OP=G(()=>{vP();ST();os=Px});var Jx="AWS_SDK_UA_APP_ID",Qx="sdk-ua-app-id",as;var dP=G(()=>{Bw();as={environmentVariableSelector:(r)=>r[Jx],configFileSelector:(r)=>r[Qx],default:yF}});var Jh=G(()=>{OP();dP()});import{Buffer as Bx}from"buffer";import{createHash as Mx,createHmac as Vx}from"crypto";function cP(r,s){if(Bx.isBuffer(r))return r;if(typeof r==="string")return Yh(r,s);if(ArrayBuffer.isView(r))return z0(r.buffer,r.byteOffset,r.byteLength);return z0(r)}class Fs{constructor(r,s){this.algorithmIdentifier=r,this.secret=s,this.reset()}update(r,s){this.hash.update(lK(cP(r,s)))}digest(){return Promise.resolve(this.hash.digest())}reset(){this.hash=this.secret?Vx(this.algorithmIdentifier,cP(this.secret)):Mx(this.algorithmIdentifier)}}var Qh=G(()=>{lw();Os()});import{fstatSync as Hx,lstatSync as lx}from"fs";var ps=(r)=>{if(!r)return 0;if(typeof r==="string")return Buffer.byteLength(r);else if(typeof r.byteLength==="number")return r.byteLength;else if(typeof r.size==="number")return r.size;else if(typeof r.start==="number"&&typeof r.end==="number")return r.end+1-r.start;else if(typeof r.path==="string"||Buffer.isBuffer(r.path))return lx(r.path).size;else if(typeof r.fd==="number")return Hx(r.fd).size;throw new Error(`Body Length computation failed for ${r}`)};var bP=()=>{};var Bh=G(()=>{bP()});var _P,gP,xP,uP,tP,jf,eP,rJ,nP,oP,aP,pP,Dx,fJ;var sJ=G(()=>{_P={["required"]:!1,type:"String"},gP={["required"]:!0,default:!1,type:"Boolean"},xP={["ref"]:"Endpoint"},uP={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},tP={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},jf={},eP={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},rJ={["ref"]:"PartitionResult"},nP={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[rJ,"supportsDualStack"]}]},oP=[uP],aP=[tP],pP=[{["ref"]:"Region"}],Dx={version:"1.0",parameters:{Region:_P,UseDualStack:gP,UseFIPS:gP,Endpoint:_P},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[xP]}],rules:[{conditions:oP,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:aP,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:xP,properties:jf,headers:jf},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:pP}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:pP,assign:"PartitionResult"}],rules:[{conditions:[uP,tP],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,eP]},nP],rules:[{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:jf,headers:jf},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:oP,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[eP,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[rJ,"name"]},"aws-us-gov"]}],endpoint:{url:"https://oidc.{Region}.amazonaws.com",properties:jf,headers:jf},type:"endpoint"},{endpoint:{url:"https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}",properties:jf,headers:jf},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:aP,rules:[{conditions:[nP],rules:[{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:jf,headers:jf},type:"endpoint"}],type:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",type:"error"}],type:"tree"},{endpoint:{url:"https://oidc.{Region}.{PartitionResult#dnsSuffix}",properties:jf,headers:jf},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},fJ=Dx});var kx,wJ=(r,s={})=>{return kx.get(r,()=>ss(fJ,{endpointParams:r,logger:s.logger}))};var hJ=G(()=>{Pw();ws();sJ();kx=new fs({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]});ur.aws=hs});var EJ,$J,IJ=(r)=>{return{apiVersion:"2019-06-10",base64Decoder:r?.base64Decoder??Uf,base64Encoder:r?.base64Encoder??Gf,disableHostPrefix:r?.disableHostPrefix??!1,endpointProvider:r?.endpointProvider??wJ,extensions:r?.extensions??[],httpAuthSchemeProvider:r?.httpAuthSchemeProvider??kP,httpAuthSchemes:r?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(s)=>s.getIdentityProvider("aws.auth#sigv4"),signer:new EJ.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(s)=>s.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new $J.NoAuthSigner}],logger:r?.logger??new Yf,serviceId:r?.serviceId??"SSO OIDC",urlParser:r?.urlParser??br,utf8Decoder:r?.utf8Decoder??_r,utf8Encoder:r?.utf8Encoder??Tf}};var FJ=G(()=>{EJ=m(Qr(),1),$J=m(qr(),1);K();n0();S0();Os();WT();hJ()});var UJ="AWS_EXECUTION_ENV",YT="AWS_REGION",XT="AWS_DEFAULT_REGION",TJ="AWS_EC2_METADATA_DISABLED",GJ,AJ="/latest/meta-data/placement/region";var LJ=G(()=>{GJ=["in-region","cross-region","mobile","standard","legacy"]});var RJ;var CJ=G(()=>{RJ={environmentVariableSelector:(r)=>{return r.AWS_DEFAULTS_MODE},configFileSelector:(r)=>{return r.defaults_mode},default:"legacy"}});var WJ,us=({region:r=u(Hf),defaultsMode:s=u(RJ)}={})=>WJ.memoize(async()=>{const f=typeof s==="function"?await s():s;switch(f?.toLowerCase()){case"auto":return yx(r);case"in-region":case"cross-region":case"mobile":case"standard":case"legacy":return Promise.resolve(f?.toLocaleLowerCase());case void 0:return Promise.resolve("legacy");default:throw new Error(`Invalid parameter for "defaultsMode", expect ${GJ.join(", ")}, got ${f}`)}}),yx=async(r)=>{if(r){const s=typeof r==="function"?await r():r,f=await Nx();if(!f)return"standard";if(s===f)return"in-region";else return"cross-region"}return"standard"},Nx=async()=>{if(process.env[UJ]&&(process.env[YT]||process.env[XT]))return process.env[YT]??process.env[XT];if(!process.env[TJ])try{const{getInstanceMetadataEndpoint:r,httpRequest:s}=await Promise.resolve().then(() => (x1(),g1)),f=await r();return(await s({...f,path:AJ})).toString()}catch(r){}};var zJ=G(()=>{lf();Ns();WJ=m(Ar(),1);LJ();CJ()});var Mh=G(()=>{zJ()});var SJ,YJ=(r)=>{gs(process.version);const s=us(r),f=()=>s().then(_s),w=IJ(r);return SJ.emitWarningIfUnsupportedVersion(process.version),{...w,...r,runtime:"node",defaultsMode:s,bodyLengthChecker:r?.bodyLengthChecker??ps,credentialDefaultProvider:r?.credentialDefaultProvider??X0,defaultUserAgentProvider:r?.defaultUserAgentProvider??os({serviceId:w.serviceId,clientVersion:mP.version}),maxAttempts:r?.maxAttempts??u(js),region:r?.region??u(Hf,Ds),requestHandler:ff.create(r?.requestHandler??f),retryMode:r?.retryMode??u({...is,default:async()=>(await f()).retryMode||Nf}),sha256:r?.sha256??Fs.bind(null,"sha256"),streamCollector:r?.streamCollector??qf,useDualstackEndpoint:r?.useDualstackEndpoint??u(Hs),useFipsEndpoint:r?.useFipsEndpoint??u(ls),userAgentAppId:r?.userAgentAppId??u(as)}};var XJ=G(()=>{qP();SJ=m(Qr(),1);e1();Jh();lf();Qh();Is();Ns();a0();Bh();zf();FJ();K();Mh();K()});var ts=(r)=>{let s=async()=>{if(r.region===void 0)throw new Error("Region is missing from runtimeConfig");const f=r.region;if(typeof f==="string")return f;return f()};return{setRegion(f){s=f},region(){return s}}},r0=(r)=>{return{region:r.region()}};var KJ=()=>{};var ZJ=()=>{};var PJ=G(()=>{ZJ()});var JJ=G(()=>{KJ();PJ()});var Vh=G(()=>{JJ()});var QJ=(r)=>{const s=r.httpAuthSchemes;let{httpAuthSchemeProvider:f,credentials:w}=r;return{setHttpAuthScheme(h){const E=s.findIndex(($)=>$.schemeId===h.schemeId);if(E===-1)s.push(h);else s.splice(E,1,h)},httpAuthSchemes(){return s},setHttpAuthSchemeProvider(h){f=h},httpAuthSchemeProvider(){return f},setCredentials(h){w=h},credentials(){return w}}},BJ=(r)=>{return{httpAuthSchemes:r.httpAuthSchemes(),httpAuthSchemeProvider:r.httpAuthSchemeProvider(),credentials:r.credentials()}};var rI=(r)=>r,MJ=(r,s)=>{const f={...rI(ts(r)),...rI(xs(r)),...rI(Xs(r)),...rI(QJ(r))};return s.forEach((w)=>w.configure(f)),{...r,...r0(f),...es(f),...Ks(f),...BJ(f)}};var VJ=G(()=>{Vh();kr();K()});var Hh,fI;var KT=G(()=>{pw();uw();tw();Bw();lf();Hh=m(qr(),1);Lh();B();Is();K();WT();Ph();XJ();VJ();fI=class fI extends Sf{constructor(...[r]){const s=YJ(r||{}),f=NP(s),w=Ms(f),h=vs(w),E=ks(h),$=Zs(E),I=qs($),F=yP(I),U=MJ(F,r?.extensions||[]);super(U);this.config=U,this.middlewareStack.use(Vs(this.config)),this.middlewareStack.use(ns(this.config)),this.middlewareStack.use(ys(this.config)),this.middlewareStack.use(Ps(this.config)),this.middlewareStack.use(Js(this.config)),this.middlewareStack.use(Qs(this.config)),this.middlewareStack.use(Hh.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:DP,identityProviderConfigProvider:async(A)=>new Hh.DefaultIdentityProviderConfig({"aws.auth#sigv4":A.credentials})})),this.middlewareStack.use(Hh.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}});var Hr;var sI=G(()=>{K();Hr=class Hr extends mf{constructor(r){super(r);Object.setPrototypeOf(this,Hr.prototype)}}});var n1,o1,a1,p1,u1,t1,rE,fE,sE,wE,hE,EE,$E,IE,ZT=(r)=>({...r,...r.clientSecret&&{clientSecret:o},...r.refreshToken&&{refreshToken:o},...r.codeVerifier&&{codeVerifier:o}}),PT=(r)=>({...r,...r.accessToken&&{accessToken:o},...r.refreshToken&&{refreshToken:o},...r.idToken&&{idToken:o}}),JT=(r)=>({...r,...r.refreshToken&&{refreshToken:o},...r.assertion&&{assertion:o},...r.subjectToken&&{subjectToken:o},...r.codeVerifier&&{codeVerifier:o}}),QT=(r)=>({...r,...r.accessToken&&{accessToken:o},...r.refreshToken&&{refreshToken:o},...r.idToken&&{idToken:o}}),BT=(r)=>({...r,...r.clientSecret&&{clientSecret:o}}),MT=(r)=>({...r,...r.clientSecret&&{clientSecret:o}});var qw=G(()=>{K();sI();n1=class n1 extends Hr{constructor(r){super({name:"AccessDeniedException",$fault:"client",...r});this.name="AccessDeniedException",this.$fault="client",Object.setPrototypeOf(this,n1.prototype),this.error=r.error,this.error_description=r.error_description}};o1=class o1 extends Hr{constructor(r){super({name:"AuthorizationPendingException",$fault:"client",...r});this.name="AuthorizationPendingException",this.$fault="client",Object.setPrototypeOf(this,o1.prototype),this.error=r.error,this.error_description=r.error_description}};a1=class a1 extends Hr{constructor(r){super({name:"ExpiredTokenException",$fault:"client",...r});this.name="ExpiredTokenException",this.$fault="client",Object.setPrototypeOf(this,a1.prototype),this.error=r.error,this.error_description=r.error_description}};p1=class p1 extends Hr{constructor(r){super({name:"InternalServerException",$fault:"server",...r});this.name="InternalServerException",this.$fault="server",Object.setPrototypeOf(this,p1.prototype),this.error=r.error,this.error_description=r.error_description}};u1=class u1 extends Hr{constructor(r){super({name:"InvalidClientException",$fault:"client",...r});this.name="InvalidClientException",this.$fault="client",Object.setPrototypeOf(this,u1.prototype),this.error=r.error,this.error_description=r.error_description}};t1=class t1 extends Hr{constructor(r){super({name:"InvalidGrantException",$fault:"client",...r});this.name="InvalidGrantException",this.$fault="client",Object.setPrototypeOf(this,t1.prototype),this.error=r.error,this.error_description=r.error_description}};rE=class rE extends Hr{constructor(r){super({name:"InvalidRequestException",$fault:"client",...r});this.name="InvalidRequestException",this.$fault="client",Object.setPrototypeOf(this,rE.prototype),this.error=r.error,this.error_description=r.error_description}};fE=class fE extends Hr{constructor(r){super({name:"InvalidScopeException",$fault:"client",...r});this.name="InvalidScopeException",this.$fault="client",Object.setPrototypeOf(this,fE.prototype),this.error=r.error,this.error_description=r.error_description}};sE=class sE extends Hr{constructor(r){super({name:"SlowDownException",$fault:"client",...r});this.name="SlowDownException",this.$fault="client",Object.setPrototypeOf(this,sE.prototype),this.error=r.error,this.error_description=r.error_description}};wE=class wE extends Hr{constructor(r){super({name:"UnauthorizedClientException",$fault:"client",...r});this.name="UnauthorizedClientException",this.$fault="client",Object.setPrototypeOf(this,wE.prototype),this.error=r.error,this.error_description=r.error_description}};hE=class hE extends Hr{constructor(r){super({name:"UnsupportedGrantTypeException",$fault:"client",...r});this.name="UnsupportedGrantTypeException",this.$fault="client",Object.setPrototypeOf(this,hE.prototype),this.error=r.error,this.error_description=r.error_description}};EE=class EE extends Hr{constructor(r){super({name:"InvalidRequestRegionException",$fault:"client",...r});this.name="InvalidRequestRegionException",this.$fault="client",Object.setPrototypeOf(this,EE.prototype),this.error=r.error,this.error_description=r.error_description,this.endpoint=r.endpoint,this.region=r.region}};$E=class $E extends Hr{constructor(r){super({name:"InvalidClientMetadataException",$fault:"client",...r});this.name="InvalidClientMetadataException",this.$fault="client",Object.setPrototypeOf(this,$E.prototype),this.error=r.error,this.error_description=r.error_description}};IE=class IE extends Hr{constructor(r){super({name:"InvalidRedirectUriException",$fault:"client",...r});this.name="InvalidRedirectUriException",this.$fault="client",Object.setPrototypeOf(this,IE.prototype),this.error=r.error,this.error_description=r.error_description}}});var K0,FE,HJ=async(r,s)=>{const f=FE.requestBuilder(r,s),w={"content-type":"application/json"};f.bp("/token");let h;return h=JSON.stringify(p(r,{clientId:[],clientSecret:[],code:[],codeVerifier:[],deviceCode:[],grantType:[],redirectUri:[],refreshToken:[],scope:(E)=>q(E)})),f.m("POST").h(w).b(h),f.build()},lJ=async(r,s)=>{const f=FE.requestBuilder(r,s),w={"content-type":"application/json"};f.bp("/token");const h=Y({[px]:[,"t"]});let E;return E=JSON.stringify(p(r,{assertion:[],clientId:[],code:[],codeVerifier:[],grantType:[],redirectUri:[],refreshToken:[],requestedTokenType:[],scope:($)=>q($),subjectToken:[],subjectTokenType:[]})),f.m("POST").h(w).q(h).b(E),f.build()},DJ=async(r,s)=>{const f=FE.requestBuilder(r,s),w={"content-type":"application/json"};f.bp("/client/register");let h;return h=JSON.stringify(p(r,{clientName:[],clientType:[],entitledApplicationArn:[],grantTypes:(E)=>q(E),issuerUrl:[],redirectUris:(E)=>q(E),scopes:(E)=>q(E)})),f.m("POST").h(w).b(h),f.build()},kJ=async(r,s)=>{const f=FE.requestBuilder(r,s),w={"content-type":"application/json"};f.bp("/device_authorization");let h;return h=JSON.stringify(p(r,{clientId:[],clientSecret:[],startUrl:[]})),f.m("POST").h(w).b(h),f.build()},yJ=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return wI(r,s);const f=Y({$metadata:jr(r)}),w=y(c(await K0.parseJsonBody(r.body,s)),"body"),h=p(w,{accessToken:T,expiresIn:Dw,idToken:T,refreshToken:T,tokenType:T});return Object.assign(f,h),f},NJ=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return wI(r,s);const f=Y({$metadata:jr(r)}),w=y(c(await K0.parseJsonBody(r.body,s)),"body"),h=p(w,{accessToken:T,expiresIn:Dw,idToken:T,issuedTokenType:T,refreshToken:T,scope:q,tokenType:T});return Object.assign(f,h),f},qJ=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return wI(r,s);const f=Y({$metadata:jr(r)}),w=y(c(await K0.parseJsonBody(r.body,s)),"body"),h=p(w,{authorizationEndpoint:T,clientId:T,clientIdIssuedAt:Xh,clientSecret:T,clientSecretExpiresAt:Xh,tokenEndpoint:T});return Object.assign(f,h),f},mJ=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return wI(r,s);const f=Y({$metadata:jr(r)}),w=y(c(await K0.parseJsonBody(r.body,s)),"body"),h=p(w,{deviceCode:T,expiresIn:Dw,interval:Dw,userCode:T,verificationUri:T,verificationUriComplete:T});return Object.assign(f,h),f},wI=async(r,s)=>{const f={...r,body:await K0.parseJsonErrorBody(r.body,s)},w=K0.loadRestJsonErrorCode(r,f.body);switch(w){case"AccessDeniedException":case"com.amazonaws.ssooidc#AccessDeniedException":throw await jx(f,s);case"AuthorizationPendingException":case"com.amazonaws.ssooidc#AuthorizationPendingException":throw await vx(f,s);case"ExpiredTokenException":case"com.amazonaws.ssooidc#ExpiredTokenException":throw await ix(f,s);case"InternalServerException":case"com.amazonaws.ssooidc#InternalServerException":throw await Ox(f,s);case"InvalidClientException":case"com.amazonaws.ssooidc#InvalidClientException":throw await dx(f,s);case"InvalidGrantException":case"com.amazonaws.ssooidc#InvalidGrantException":throw await bx(f,s);case"InvalidRequestException":case"com.amazonaws.ssooidc#InvalidRequestException":throw await gx(f,s);case"InvalidScopeException":case"com.amazonaws.ssooidc#InvalidScopeException":throw await ex(f,s);case"SlowDownException":case"com.amazonaws.ssooidc#SlowDownException":throw await nx(f,s);case"UnauthorizedClientException":case"com.amazonaws.ssooidc#UnauthorizedClientException":throw await ox(f,s);case"UnsupportedGrantTypeException":case"com.amazonaws.ssooidc#UnsupportedGrantTypeException":throw await ax(f,s);case"InvalidRequestRegionException":case"com.amazonaws.ssooidc#InvalidRequestRegionException":throw await xx(f,s);case"InvalidClientMetadataException":case"com.amazonaws.ssooidc#InvalidClientMetadataException":throw await cx(f,s);case"InvalidRedirectUriException":case"com.amazonaws.ssooidc#InvalidRedirectUriException":throw await _x(f,s);default:const h=f.body;return mx({output:r,parsedBody:h,errorCode:w})}},mx,jx=async(r,s)=>{const f=Y({}),w=r.body,h=p(w,{error:T,error_description:T});Object.assign(f,h);const E=new n1({$metadata:jr(r),...f});return D(E,r.body)},vx=async(r,s)=>{const f=Y({}),w=r.body,h=p(w,{error:T,error_description:T});Object.assign(f,h);const E=new o1({$metadata:jr(r),...f});return D(E,r.body)},ix=async(r,s)=>{const f=Y({}),w=r.body,h=p(w,{error:T,error_description:T});Object.assign(f,h);const E=new a1({$metadata:jr(r),...f});return D(E,r.body)},Ox=async(r,s)=>{const f=Y({}),w=r.body,h=p(w,{error:T,error_description:T});Object.assign(f,h);const E=new p1({$metadata:jr(r),...f});return D(E,r.body)},dx=async(r,s)=>{const f=Y({}),w=r.body,h=p(w,{error:T,error_description:T});Object.assign(f,h);const E=new u1({$metadata:jr(r),...f});return D(E,r.body)},cx=async(r,s)=>{const f=Y({}),w=r.body,h=p(w,{error:T,error_description:T});Object.assign(f,h);const E=new $E({$metadata:jr(r),...f});return D(E,r.body)},bx=async(r,s)=>{const f=Y({}),w=r.body,h=p(w,{error:T,error_description:T});Object.assign(f,h);const E=new t1({$metadata:jr(r),...f});return D(E,r.body)},_x=async(r,s)=>{const f=Y({}),w=r.body,h=p(w,{error:T,error_description:T});Object.assign(f,h);const E=new IE({$metadata:jr(r),...f});return D(E,r.body)},gx=async(r,s)=>{const f=Y({}),w=r.body,h=p(w,{error:T,error_description:T});Object.assign(f,h);const E=new rE({$metadata:jr(r),...f});return D(E,r.body)},xx=async(r,s)=>{const f=Y({}),w=r.body,h=p(w,{endpoint:T,error:T,error_description:T,region:T});Object.assign(f,h);const E=new EE({$metadata:jr(r),...f});return D(E,r.body)},ex=async(r,s)=>{const f=Y({}),w=r.body,h=p(w,{error:T,error_description:T});Object.assign(f,h);const E=new fE({$metadata:jr(r),...f});return D(E,r.body)},nx=async(r,s)=>{const f=Y({}),w=r.body,h=p(w,{error:T,error_description:T});Object.assign(f,h);const E=new sE({$metadata:jr(r),...f});return D(E,r.body)},ox=async(r,s)=>{const f=Y({}),w=r.body,h=p(w,{error:T,error_description:T});Object.assign(f,h);const E=new wE({$metadata:jr(r),...f});return D(E,r.body)},ax=async(r,s)=>{const f=Y({}),w=r.body,h=p(w,{error:T,error_description:T});Object.assign(f,h);const E=new hE({$metadata:jr(r),...f});return D(E,r.body)},jr=(r)=>({httpStatusCode:r.statusCode,requestId:r.headers["x-amzn-requestid"]??r.headers["x-amzn-request-id"]??r.headers["x-amz-request-id"],extendedRequestId:r.headers["x-amz-id-2"],cfId:r.headers["x-amz-cf-id"]}),px="aws_iam";var UE=G(()=>{K0=m(Qr(),1),FE=m(qr(),1);K();qw();sI();mx=bs(Hr)});var hI;var VT=G(()=>{B();V();K();Ph();qw();UE();hI=class hI extends R.classBuilder().ep(rw).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateToken",{}).n("SSOOIDCClient","CreateTokenCommand").f(ZT,PT).ser(HJ).de(yJ).build(){}});var EI;var HT=G(()=>{B();V();K();Ph();qw();UE();EI=class EI extends R.classBuilder().ep(rw).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","CreateTokenWithIAM",{}).n("SSOOIDCClient","CreateTokenWithIAMCommand").f(JT,QT).ser(lJ).de(NJ).build(){}});var $I;var lT=G(()=>{B();V();K();Ph();qw();UE();$I=class $I extends R.classBuilder().ep(rw).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","RegisterClient",{}).n("SSOOIDCClient","RegisterClientCommand").f(void 0,BT).ser(DJ).de(qJ).build(){}});var II;var DT=G(()=>{B();V();K();Ph();qw();UE();II=class II extends R.classBuilder().ep(rw).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSSSOOIDCService","StartDeviceAuthorization",{}).n("SSOOIDCClient","StartDeviceAuthorizationCommand").f(MT,void 0).ser(kJ).de(mJ).build(){}});var ux,kT;var jJ=G(()=>{K();VT();HT();lT();DT();KT();ux={CreateTokenCommand:hI,CreateTokenWithIAMCommand:EI,RegisterClientCommand:$I,StartDeviceAuthorizationCommand:II};kT=class kT extends fI{};ds(ux,kT)});var vJ=G(()=>{VT();HT();lT();DT()});var iJ=G(()=>{qw()});var yT={};Ys(yT,{__Client:()=>Sf,UnsupportedGrantTypeException:()=>hE,UnauthorizedClientException:()=>wE,StartDeviceAuthorizationRequestFilterSensitiveLog:()=>MT,StartDeviceAuthorizationCommand:()=>II,SlowDownException:()=>sE,SSOOIDCServiceException:()=>Hr,SSOOIDCClient:()=>fI,SSOOIDC:()=>kT,RegisterClientResponseFilterSensitiveLog:()=>BT,RegisterClientCommand:()=>$I,InvalidScopeException:()=>fE,InvalidRequestRegionException:()=>EE,InvalidRequestException:()=>rE,InvalidRedirectUriException:()=>IE,InvalidGrantException:()=>t1,InvalidClientMetadataException:()=>$E,InvalidClientException:()=>u1,InternalServerException:()=>p1,ExpiredTokenException:()=>a1,CreateTokenWithIAMResponseFilterSensitiveLog:()=>QT,CreateTokenWithIAMRequestFilterSensitiveLog:()=>JT,CreateTokenWithIAMCommand:()=>EI,CreateTokenResponseFilterSensitiveLog:()=>PT,CreateTokenRequestFilterSensitiveLog:()=>ZT,CreateTokenCommand:()=>hI,AuthorizationPendingException:()=>o1,AccessDeniedException:()=>n1,$Command:()=>R});var NT=G(()=>{KT();jJ();vJ();iJ();sI()});var qT,OJ=async(r)=>{const{SSOOIDCClient:s}=await Promise.resolve().then(() => (NT(),yT));if(qT[r])return qT[r];const f=new s({region:r});return qT[r]=f,f};var dJ=G(()=>{qT={}});var cJ=async(r,s)=>{const{CreateTokenCommand:f}=await Promise.resolve().then(() => (NT(),yT));return(await OJ(s)).send(new f({clientId:r.clientId,clientSecret:r.clientSecret,refreshToken:r.refreshToken,grantType:"refresh_token"}))};var bJ=G(()=>{dJ()});var _J,mT=(r)=>{if(r.expiration&&r.expiration.getTime()<Date.now())throw new _J.TokenProviderError(`Token is expired. ${Zh}`,!1)};var gJ=G(()=>{_J=m(Ar(),1)});var xJ,fw=(r,s,f=!1)=>{if(typeof s==="undefined")throw new xJ.TokenProviderError(`Value not present for '${r}' in SSO Token${f?". Cannot refresh":""}. ${Zh}`,!1)};var eJ=G(()=>{xJ=m(Ar(),1)});import{promises as tx}from"fs";var re,nJ=(r,s)=>{const f=K3(r),w=JSON.stringify(s,null,2);return re(f,w)};var oJ=G(()=>{$s();({writeFile:re}=tx)});var lh,aJ,pJ=(r={})=>async()=>{r.logger?.debug("@aws-sdk/token-providers - fromSso");const s=await e0(r),f=Df(r),w=s[f];if(!w)throw new lh.TokenProviderError(`Profile '${f}' could not be found in shared credentials file.`,!1);else if(!w.sso_session)throw new lh.TokenProviderError(`Profile '${f}' is missing required property 'sso_session'.`);const h=w.sso_session,$=(await Q3(r))[h];if(!$)throw new lh.TokenProviderError(`Sso session '${h}' could not be found in shared credentials file.`,!1);for(let z of["sso_start_url","sso_region"])if(!$[z])throw new lh.TokenProviderError(`Sso session '${h}' is missing required property '${z}'.`,!1);const{sso_start_url:I,sso_region:F}=$;let U;try{U=await Z3(h)}catch(z){throw new lh.TokenProviderError(`The SSO session token associated with profile=${f} was not found or is invalid. ${Zh}`,!1)}fw("accessToken",U.accessToken),fw("expiresAt",U.expiresAt);const{accessToken:A,expiresAt:L}=U,S={token:A,expiration:new Date(L)};if(S.expiration.getTime()-Date.now()>HP)return S;if(Date.now()-aJ.getTime()<30000)return mT(S),S;fw("clientId",U.clientId,!0),fw("clientSecret",U.clientSecret,!0),fw("refreshToken",U.refreshToken,!0);try{aJ.setTime(Date.now());const z=await cJ(U,F);fw("accessToken",z.accessToken),fw("expiresIn",z.expiresIn);const Z=new Date(Date.now()+z.expiresIn*1000);try{await nJ(h,{...U,accessToken:z.accessToken,expiresAt:Z.toISOString(),refreshToken:z.refreshToken})}catch(N){}return{token:z.accessToken,expiration:Z}}catch(z){return mT(S),S}};var uJ=G(()=>{lh=m(Ar(),1);$s();bJ();gJ();eJ();oJ();aJ=new Date(0)});var fe;var tJ=G(()=>{fe=m(Ar(),1)});var jT;var rQ=G(()=>{jT=m(Ar(),1)});var fQ=G(()=>{uJ();tJ();rQ()});function se(r){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"awsssoportal",region:r.region},propertiesExtractor:(s,f)=>({signingProperties:{config:s,context:f}})}}function FI(r){return{schemeId:"smithy.api#noAuth"}}var sQ,wQ=async(r,s,f)=>{return{operation:Vf(s).operation,region:await yr(r.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},hQ=(r)=>{const s=[];switch(r.operation){case"GetRoleCredentials":{s.push(FI(r));break}case"ListAccountRoles":{s.push(FI(r));break}case"ListAccounts":{s.push(FI(r));break}case"Logout":{s.push(FI(r));break}default:s.push(se(r))}return s},EQ=(r)=>{return{...sQ.resolveAwsSdkSigV4Config(r)}};var vT=G(()=>{sQ=m(Qr(),1);Es()});var $Q=(r)=>{return{...r,useDualstackEndpoint:r.useDualstackEndpoint??!1,useFipsEndpoint:r.useFipsEndpoint??!1,defaultSigningName:"awsssoportal"}},sw;var Dh=G(()=>{sw={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}});var FQ;var IQ=G(()=>{FQ={name:"@aws-sdk/client-sso",description:"AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native",version:"3.668.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-sso","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sso"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.667.0","@aws-sdk/middleware-host-header":"3.667.0","@aws-sdk/middleware-logger":"3.667.0","@aws-sdk/middleware-recursion-detection":"3.667.0","@aws-sdk/middleware-user-agent":"3.668.0","@aws-sdk/region-config-resolver":"3.667.0","@aws-sdk/types":"3.667.0","@aws-sdk/util-endpoints":"3.667.0","@aws-sdk/util-user-agent-browser":"3.667.0","@aws-sdk/util-user-agent-node":"3.668.0","@smithy/config-resolver":"^3.0.9","@smithy/core":"^2.4.8","@smithy/fetch-http-handler":"^3.2.9","@smithy/hash-node":"^3.0.7","@smithy/invalid-dependency":"^3.0.7","@smithy/middleware-content-length":"^3.0.9","@smithy/middleware-endpoint":"^3.1.4","@smithy/middleware-retry":"^3.0.23","@smithy/middleware-serde":"^3.0.7","@smithy/middleware-stack":"^3.0.7","@smithy/node-config-provider":"^3.1.8","@smithy/node-http-handler":"^3.2.4","@smithy/protocol-http":"^4.1.4","@smithy/smithy-client":"^3.4.0","@smithy/types":"^3.5.0","@smithy/url-parser":"^3.0.7","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.23","@smithy/util-defaults-mode-node":"^3.0.23","@smithy/util-endpoints":"^2.1.3","@smithy/util-middleware":"^3.0.7","@smithy/util-retry":"^3.0.7","@smithy/util-utf8":"^3.0.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node16":"16.1.3","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=16.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sso"}}});var UQ,TQ,GQ,zQ,SQ,vf,AQ,YQ,LQ,RQ,CQ,WQ,he,XQ;var KQ=G(()=>{UQ={["required"]:!1,type:"String"},TQ={["required"]:!0,default:!1,type:"Boolean"},GQ={["ref"]:"Endpoint"},zQ={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},SQ={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},vf={},AQ={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},YQ={["ref"]:"PartitionResult"},LQ={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[YQ,"supportsDualStack"]}]},RQ=[zQ],CQ=[SQ],WQ=[{["ref"]:"Region"}],he={version:"1.0",parameters:{Region:UQ,UseDualStack:TQ,UseFIPS:TQ,Endpoint:UQ},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[GQ]}],rules:[{conditions:RQ,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:CQ,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:GQ,properties:vf,headers:vf},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:WQ}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:WQ,assign:"PartitionResult"}],rules:[{conditions:[zQ,SQ],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,AQ]},LQ],rules:[{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:vf,headers:vf},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:RQ,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[AQ,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[YQ,"name"]},"aws-us-gov"]}],endpoint:{url:"https://portal.sso.{Region}.amazonaws.com",properties:vf,headers:vf},type:"endpoint"},{endpoint:{url:"https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}",properties:vf,headers:vf},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:CQ,rules:[{conditions:[LQ],rules:[{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:vf,headers:vf},type:"endpoint"}],type:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",type:"error"}],type:"tree"},{endpoint:{url:"https://portal.sso.{Region}.{PartitionResult#dnsSuffix}",properties:vf,headers:vf},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},XQ=he});var Ee,ZQ=(r,s={})=>{return Ee.get(r,()=>ss(XQ,{endpointParams:r,logger:s.logger}))};var PQ=G(()=>{Pw();ws();KQ();Ee=new fs({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]});ur.aws=hs});var JQ,QQ,BQ=(r)=>{return{apiVersion:"2019-06-10",base64Decoder:r?.base64Decoder??Uf,base64Encoder:r?.base64Encoder??Gf,disableHostPrefix:r?.disableHostPrefix??!1,endpointProvider:r?.endpointProvider??ZQ,extensions:r?.extensions??[],httpAuthSchemeProvider:r?.httpAuthSchemeProvider??hQ,httpAuthSchemes:r?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(s)=>s.getIdentityProvider("aws.auth#sigv4"),signer:new JQ.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(s)=>s.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new QQ.NoAuthSigner}],logger:r?.logger??new Yf,serviceId:r?.serviceId??"SSO",urlParser:r?.urlParser??br,utf8Decoder:r?.utf8Decoder??_r,utf8Encoder:r?.utf8Encoder??Tf}};var MQ=G(()=>{JQ=m(Qr(),1),QQ=m(qr(),1);K();n0();S0();Os();vT();PQ()});var VQ,HQ=(r)=>{gs(process.version);const s=us(r),f=()=>s().then(_s),w=BQ(r);return VQ.emitWarningIfUnsupportedVersion(process.version),{...w,...r,runtime:"node",defaultsMode:s,bodyLengthChecker:r?.bodyLengthChecker??ps,defaultUserAgentProvider:r?.defaultUserAgentProvider??os({serviceId:w.serviceId,clientVersion:FQ.version}),maxAttempts:r?.maxAttempts??u(js),region:r?.region??u(Hf,Ds),requestHandler:ff.create(r?.requestHandler??f),retryMode:r?.retryMode??u({...is,default:async()=>(await f()).retryMode||Nf}),sha256:r?.sha256??Fs.bind(null,"sha256"),streamCollector:r?.streamCollector??qf,useDualstackEndpoint:r?.useDualstackEndpoint??u(Hs),useFipsEndpoint:r?.useFipsEndpoint??u(ls),userAgentAppId:r?.userAgentAppId??u(as)}};var lQ=G(()=>{IQ();VQ=m(Qr(),1);Jh();lf();Qh();Is();Ns();a0();Bh();zf();MQ();K();Mh();K()});var DQ=(r)=>{const s=r.httpAuthSchemes;let{httpAuthSchemeProvider:f,credentials:w}=r;return{setHttpAuthScheme(h){const E=s.findIndex(($)=>$.schemeId===h.schemeId);if(E===-1)s.push(h);else s.splice(E,1,h)},httpAuthSchemes(){return s},setHttpAuthSchemeProvider(h){f=h},httpAuthSchemeProvider(){return f},setCredentials(h){w=h},credentials(){return w}}},kQ=(r)=>{return{httpAuthSchemes:r.httpAuthSchemes(),httpAuthSchemeProvider:r.httpAuthSchemeProvider(),credentials:r.credentials()}};var UI=(r)=>r,yQ=(r,s)=>{const f={...UI(ts(r)),...UI(xs(r)),...UI(Xs(r)),...UI(DQ(r))};return s.forEach((w)=>w.configure(f)),{...r,...r0(f),...es(f),...Ks(f),...kQ(f)}};var NQ=G(()=>{Vh();kr();K()});var kh,Z0;var TE=G(()=>{pw();uw();tw();Bw();lf();kh=m(qr(),1);Lh();B();Is();K();vT();Dh();lQ();NQ();Z0=class Z0 extends Sf{constructor(...[r]){const s=HQ(r||{}),f=$Q(s),w=Ms(f),h=vs(w),E=ks(h),$=Zs(E),I=qs($),F=EQ(I),U=yQ(F,r?.extensions||[]);super(U);this.config=U,this.middlewareStack.use(Vs(this.config)),this.middlewareStack.use(ns(this.config)),this.middlewareStack.use(ys(this.config)),this.middlewareStack.use(Ps(this.config)),this.middlewareStack.use(Js(this.config)),this.middlewareStack.use(Qs(this.config)),this.middlewareStack.use(kh.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:wQ,identityProviderConfigProvider:async(A)=>new kh.DefaultIdentityProviderConfig({"aws.auth#sigv4":A.credentials})})),this.middlewareStack.use(kh.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}});var P0;var iT=G(()=>{K();P0=class P0 extends mf{constructor(r){super(r);Object.setPrototypeOf(this,P0.prototype)}}});var TI,GI,AI,LI,qQ=(r)=>({...r,...r.accessToken&&{accessToken:o}}),$e=(r)=>({...r,...r.secretAccessKey&&{secretAccessKey:o},...r.sessionToken&&{sessionToken:o}}),mQ=(r)=>({...r,...r.roleCredentials&&{roleCredentials:$e(r.roleCredentials)}}),jQ=(r)=>({...r,...r.accessToken&&{accessToken:o}}),vQ=(r)=>({...r,...r.accessToken&&{accessToken:o}}),iQ=(r)=>({...r,...r.accessToken&&{accessToken:o}});var mw=G(()=>{K();iT();TI=class TI extends P0{constructor(r){super({name:"InvalidRequestException",$fault:"client",...r});this.name="InvalidRequestException",this.$fault="client",Object.setPrototypeOf(this,TI.prototype)}};GI=class GI extends P0{constructor(r){super({name:"ResourceNotFoundException",$fault:"client",...r});this.name="ResourceNotFoundException",this.$fault="client",Object.setPrototypeOf(this,GI.prototype)}};AI=class AI extends P0{constructor(r){super({name:"TooManyRequestsException",$fault:"client",...r});this.name="TooManyRequestsException",this.$fault="client",Object.setPrototypeOf(this,AI.prototype)}};LI=class LI extends P0{constructor(r){super({name:"UnauthorizedException",$fault:"client",...r});this.name="UnauthorizedException",this.$fault="client",Object.setPrototypeOf(this,LI.prototype)}}});var ww,GE,OQ=async(r,s)=>{const f=GE.requestBuilder(r,s),w=Y({},d1,{[WI]:r[CI]});f.bp("/federation/credentials");const h=Y({[Le]:[,y(r[Ae],"roleName")],[oQ]:[,y(r[nQ],"accountId")]});let E;return f.m("GET").h(w).q(h).b(E),f.build()},dQ=async(r,s)=>{const f=GE.requestBuilder(r,s),w=Y({},d1,{[WI]:r[CI]});f.bp("/assignment/roles");const h=Y({[tQ]:[,r[uQ]],[pQ]:[()=>r.maxResults!==void 0,()=>r[aQ].toString()],[oQ]:[,y(r[nQ],"accountId")]});let E;return f.m("GET").h(w).q(h).b(E),f.build()},cQ=async(r,s)=>{const f=GE.requestBuilder(r,s),w=Y({},d1,{[WI]:r[CI]});f.bp("/assignment/accounts");const h=Y({[tQ]:[,r[uQ]],[pQ]:[()=>r.maxResults!==void 0,()=>r[aQ].toString()]});let E;return f.m("GET").h(w).q(h).b(E),f.build()},bQ=async(r,s)=>{const f=GE.requestBuilder(r,s),w=Y({},d1,{[WI]:r[CI]});f.bp("/logout");let h;return f.m("POST").h(w).b(h),f.build()},_Q=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return RI(r,s);const f=Y({$metadata:hw(r)}),w=y(c(await ww.parseJsonBody(r.body,s)),"body"),h=p(w,{roleCredentials:q});return Object.assign(f,h),f},gQ=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return RI(r,s);const f=Y({$metadata:hw(r)}),w=y(c(await ww.parseJsonBody(r.body,s)),"body"),h=p(w,{nextToken:T,roleList:q});return Object.assign(f,h),f},xQ=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return RI(r,s);const f=Y({$metadata:hw(r)}),w=y(c(await ww.parseJsonBody(r.body,s)),"body"),h=p(w,{accountList:q,nextToken:T});return Object.assign(f,h),f},eQ=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return RI(r,s);const f=Y({$metadata:hw(r)});return await gr(r.body,s),f},RI=async(r,s)=>{const f={...r,body:await ww.parseJsonErrorBody(r.body,s)},w=ww.loadRestJsonErrorCode(r,f.body);switch(w){case"InvalidRequestException":case"com.amazonaws.sso#InvalidRequestException":throw await Fe(f,s);case"ResourceNotFoundException":case"com.amazonaws.sso#ResourceNotFoundException":throw await Ue(f,s);case"TooManyRequestsException":case"com.amazonaws.sso#TooManyRequestsException":throw await Te(f,s);case"UnauthorizedException":case"com.amazonaws.sso#UnauthorizedException":throw await Ge(f,s);default:const h=f.body;return Ie({output:r,parsedBody:h,errorCode:w})}},Ie,Fe=async(r,s)=>{const f=Y({}),w=r.body,h=p(w,{message:T});Object.assign(f,h);const E=new TI({$metadata:hw(r),...f});return D(E,r.body)},Ue=async(r,s)=>{const f=Y({}),w=r.body,h=p(w,{message:T});Object.assign(f,h);const E=new GI({$metadata:hw(r),...f});return D(E,r.body)},Te=async(r,s)=>{const f=Y({}),w=r.body,h=p(w,{message:T});Object.assign(f,h);const E=new AI({$metadata:hw(r),...f});return D(E,r.body)},Ge=async(r,s)=>{const f=Y({}),w=r.body,h=p(w,{message:T});Object.assign(f,h);const E=new LI({$metadata:hw(r),...f});return D(E,r.body)},hw=(r)=>({httpStatusCode:r.statusCode,requestId:r.headers["x-amzn-requestid"]??r.headers["x-amzn-request-id"]??r.headers["x-amz-request-id"],extendedRequestId:r.headers["x-amz-id-2"],cfId:r.headers["x-amz-cf-id"]}),nQ="accountId",CI="accessToken",oQ="account_id",aQ="maxResults",pQ="max_result",uQ="nextToken",tQ="next_token",Ae="roleName",Le="role_name",WI="x-amz-sso_bearer_token";var AE=G(()=>{ww=m(Qr(),1),GE=m(qr(),1);K();mw();iT();Ie=bs(P0)});var LE;var OT=G(()=>{B();V();K();Dh();mw();AE();LE=class LE extends R.classBuilder().ep(sw).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("SWBPortalService","GetRoleCredentials",{}).n("SSOClient","GetRoleCredentialsCommand").f(qQ,mQ).ser(OQ).de(_Q).build(){}});var RE;var zI=G(()=>{B();V();K();Dh();mw();AE();RE=class RE extends R.classBuilder().ep(sw).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("SWBPortalService","ListAccountRoles",{}).n("SSOClient","ListAccountRolesCommand").f(jQ,void 0).ser(dQ).de(gQ).build(){}});var CE;var SI=G(()=>{B();V();K();Dh();mw();AE();CE=class CE extends R.classBuilder().ep(sw).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("SWBPortalService","ListAccounts",{}).n("SSOClient","ListAccountsCommand").f(vQ,void 0).ser(cQ).de(xQ).build(){}});var dT;var cT=G(()=>{B();V();K();Dh();mw();AE();dT=class dT extends R.classBuilder().ep(sw).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("SWBPortalService","Logout",{}).n("SSOClient","LogoutCommand").f(iQ,void 0).ser(bQ).de(eQ).build(){}});var Re,r9;var f9=G(()=>{K();OT();zI();SI();cT();TE();Re={GetRoleCredentialsCommand:LE,ListAccountRolesCommand:RE,ListAccountsCommand:CE,LogoutCommand:dT};r9=class r9 extends Z0{};ds(Re,r9)});var s9=G(()=>{OT();zI();SI();cT()});var w9=()=>{};var h9,p8r;var E9=G(()=>{h9=m(qr(),1);zI();TE();p8r=h9.createPaginator(Z0,RE,"nextToken","nextToken","maxResults")});var $9,f4r;var I9=G(()=>{$9=m(qr(),1);SI();TE();f4r=$9.createPaginator(Z0,CE,"nextToken","nextToken","maxResults")});var F9=G(()=>{w9();E9();I9()});var U9=G(()=>{mw()});var T9=G(()=>{TE();f9();s9();F9();U9()});var G9={};Ys(G9,{SSOClient:()=>Z0,GetRoleCredentialsCommand:()=>LE});var A9=G(()=>{T9()});var bT,yh,WE=!1,_T=async({ssoStartUrl:r,ssoSession:s,ssoAccountId:f,ssoRegion:w,ssoRoleName:h,ssoClient:E,clientConfig:$,profile:I,logger:F})=>{let U;const A="To refresh this SSO session run aws sso login with the corresponding profile.";if(s)try{const pr=await pJ({profile:I})();U={accessToken:pr.token,expiresAt:new Date(pr.expiration).toISOString()}}catch(pr){throw new yh.CredentialsProviderError(pr.message,{tryNextLink:WE,logger:F})}else try{U=await Z3(r)}catch(pr){throw new yh.CredentialsProviderError("The SSO session associated with this profile is invalid. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:WE,logger:F})}if(new Date(U.expiresAt).getTime()-Date.now()<=0)throw new yh.CredentialsProviderError("The SSO session associated with this profile has expired. To refresh this SSO session run aws sso login with the corresponding profile.",{tryNextLink:WE,logger:F});const{accessToken:L}=U,{SSOClient:S,GetRoleCredentialsCommand:z}=await Promise.resolve().then(() => (A9(),G9)),Z=E||new S(Object.assign({},$??{},{region:$?.region??w}));let N;try{N=await Z.send(new z({accountId:f,roleName:h,accessToken:L}))}catch(pr){throw new yh.CredentialsProviderError(pr,{tryNextLink:WE,logger:F})}const{roleCredentials:{accessKeyId:M,secretAccessKey:l,sessionToken:k,expiration:i,credentialScope:e,accountId:sr}={}}=N;if(!M||!l||!k||!i)throw new yh.CredentialsProviderError("SSO returns an invalid temporary credential.",{tryNextLink:WE,logger:F});const Br={accessKeyId:M,secretAccessKey:l,sessionToken:k,expiration:new Date(i),...e&&{credentialScope:e},...sr&&{accountId:sr}};if(s)bT.setCredentialFeature(Br,"CREDENTIALS_SSO","s");else bT.setCredentialFeature(Br,"CREDENTIALS_SSO_LEGACY","u");return Br};var L9=G(()=>{bT=m(tr(),1);fQ();yh=m(Ar(),1);$s()});var R9,gT=(r,s)=>{const{sso_start_url:f,sso_account_id:w,sso_region:h,sso_role_name:E}=r;if(!f||!w||!h||!E)throw new R9.CredentialsProviderError(`Profile is configured with invalid SSO credentials. Required parameters "sso_account_id", "sso_region", "sso_role_name", "sso_start_url". Got ${Object.keys(r).join(", ")}\nReference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`,{tryNextLink:!1,logger:s});return r};var xT=G(()=>{R9=m(Ar(),1)});var Nh,Ce=(r={})=>async()=>{r.logger?.debug("@aws-sdk/credential-provider-sso - fromSSO");const{ssoStartUrl:s,ssoAccountId:f,ssoRegion:w,ssoRoleName:h,ssoSession:E}=r,{ssoClient:$}=r,I=Df(r);if(!s&&!f&&!w&&!h&&!E){const U=(await e0(r))[I];if(!U)throw new Nh.CredentialsProviderError(`Profile ${I} was not found.`,{logger:r.logger});if(!RT(U))throw new Nh.CredentialsProviderError(`Profile ${I} is not configured with SSO credentials.`,{logger:r.logger});if(U?.sso_session){const M=(await Q3(r))[U.sso_session],l=` configurations in profile ${I} and sso-session ${U.sso_session}`;if(w&&w!==M.sso_region)throw new Nh.CredentialsProviderError("Conflicting SSO region"+l,{tryNextLink:!1,logger:r.logger});if(s&&s!==M.sso_start_url)throw new Nh.CredentialsProviderError("Conflicting SSO start_url"+l,{tryNextLink:!1,logger:r.logger});U.sso_region=M.sso_region,U.sso_start_url=M.sso_start_url}const{sso_start_url:A,sso_account_id:L,sso_region:S,sso_role_name:z,sso_session:Z}=gT(U,r.logger);return _T({ssoStartUrl:A,ssoSession:Z,ssoAccountId:L,ssoRegion:S,ssoRoleName:z,ssoClient:$,clientConfig:r.clientConfig,profile:I})}else if(!s||!f||!w||!h)throw new Nh.CredentialsProviderError('Incomplete configuration. The fromSSO() argument hash must include "ssoStartUrl", "ssoAccountId", "ssoRegion", "ssoRoleName"',{tryNextLink:!1,logger:r.logger});else return _T({ssoStartUrl:s,ssoSession:E,ssoAccountId:f,ssoRegion:w,ssoRoleName:h,ssoClient:$,clientConfig:r.clientConfig,profile:I})};var C9=G(()=>{Nh=m(Ar(),1);$s();L9();xT()});var W9=()=>{};var eT={};Ys(eT,{validateSsoProfile:()=>gT,isSsoProfile:()=>RT,fromSSO:()=>Ce});var nT=G(()=>{C9();W9();xT()});var z9,YI,S9=(r,s,f)=>{const w={EcsContainer:async(h)=>{const{fromHttp:E}=await Promise.resolve().then(() => (LT(),AT)),{fromContainerMetadata:$}=await Promise.resolve().then(() => (x1(),g1));return f?.debug("@aws-sdk/credential-provider-ini - credential_source is EcsContainer"),async()=>YI.chain(E(h??{}),$(h))().then(oT)},Ec2InstanceMetadata:async(h)=>{f?.debug("@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata");const{fromInstanceMetadata:E}=await Promise.resolve().then(() => (x1(),g1));return async()=>E(h)().then(oT)},Environment:async(h)=>{f?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment");const{fromEnv:E}=await Promise.resolve().then(() => (wT(),sP));return async()=>E(h)().then(oT)}};if(r in w)return w[r];else throw new YI.CredentialsProviderError(`Unsupported credential source in profile ${s}. Got ${r}, expected EcsContainer or Ec2InstanceMetadata or Environment.`,{logger:f})},oT=(r)=>z9.setCredentialFeature(r,"CREDENTIALS_PROFILE_NAMED_PROVIDER","p");var Y9=G(()=>{z9=m(tr(),1),YI=m(Ar(),1)});function We(r){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"sts",region:r.region},propertiesExtractor:(s,f)=>({signingProperties:{config:s,context:f}})}}function X9(r){return{schemeId:"smithy.api#noAuth"}}var K9,Z9=async(r,s,f)=>{return{operation:Vf(s).operation,region:await yr(r.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},P9=(r)=>{const s=[];switch(r.operation){case"AssumeRoleWithSAML":{s.push(X9(r));break}case"AssumeRoleWithWebIdentity":{s.push(X9(r));break}default:s.push(We(r))}return s},ze=(r)=>({...r,stsClientCtor:J0}),J9=(r)=>{const s=ze(r);return{...K9.resolveAwsSdkSigV4Config(s)}};var aT=G(()=>{K9=m(Qr(),1);Es();zE()});var Q9=(r)=>{return{...r,useDualstackEndpoint:r.useDualstackEndpoint??!1,useFipsEndpoint:r.useFipsEndpoint??!1,useGlobalEndpoint:r.useGlobalEndpoint??!1,defaultSigningName:"sts"}},er;var f0=G(()=>{er={UseGlobalEndpoint:{type:"builtInParams",name:"useGlobalEndpoint"},UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}}});var M9;var B9=G(()=>{M9={name:"@aws-sdk/client-sts",description:"AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native",version:"3.668.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-sts","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"rimraf ./dist-types tsconfig.types.tsbuildinfo && tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sts",test:"yarn test:unit","test:unit":"jest"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/client-sso-oidc":"3.668.0","@aws-sdk/core":"3.667.0","@aws-sdk/credential-provider-node":"3.668.0","@aws-sdk/middleware-host-header":"3.667.0","@aws-sdk/middleware-logger":"3.667.0","@aws-sdk/middleware-recursion-detection":"3.667.0","@aws-sdk/middleware-user-agent":"3.668.0","@aws-sdk/region-config-resolver":"3.667.0","@aws-sdk/types":"3.667.0","@aws-sdk/util-endpoints":"3.667.0","@aws-sdk/util-user-agent-browser":"3.667.0","@aws-sdk/util-user-agent-node":"3.668.0","@smithy/config-resolver":"^3.0.9","@smithy/core":"^2.4.8","@smithy/fetch-http-handler":"^3.2.9","@smithy/hash-node":"^3.0.7","@smithy/invalid-dependency":"^3.0.7","@smithy/middleware-content-length":"^3.0.9","@smithy/middleware-endpoint":"^3.1.4","@smithy/middleware-retry":"^3.0.23","@smithy/middleware-serde":"^3.0.7","@smithy/middleware-stack":"^3.0.7","@smithy/node-config-provider":"^3.1.8","@smithy/node-http-handler":"^3.2.4","@smithy/protocol-http":"^4.1.4","@smithy/smithy-client":"^3.4.0","@smithy/types":"^3.5.0","@smithy/url-parser":"^3.0.7","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.23","@smithy/util-defaults-mode-node":"^3.0.23","@smithy/util-endpoints":"^2.1.3","@smithy/util-middleware":"^3.0.7","@smithy/util-retry":"^3.0.7","@smithy/util-utf8":"^3.0.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node16":"16.1.3","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=16.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sts",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-sts"}}});var V9,pT,j9,H9,dr,l9,v9,i9,nr,Xf,D9,O9,d9,k9,c9,y9,N9,q9,m9,Ye,b9;var _9=G(()=>{V9={["required"]:!1,["type"]:"String"},pT={["required"]:!0,default:!1,["type"]:"Boolean"},j9={["ref"]:"Endpoint"},H9={["fn"]:"isSet",["argv"]:[{["ref"]:"Region"}]},dr={["ref"]:"Region"},l9={["fn"]:"aws.partition",["argv"]:[dr],assign:"PartitionResult"},v9={["ref"]:"UseFIPS"},i9={["ref"]:"UseDualStack"},nr={url:"https://sts.amazonaws.com",properties:{authSchemes:[{name:"sigv4",signingName:"sts",signingRegion:"us-east-1"}]},headers:{}},Xf={},D9={conditions:[{["fn"]:"stringEquals",["argv"]:[dr,"aws-global"]}],["endpoint"]:nr,["type"]:"endpoint"},O9={["fn"]:"booleanEquals",["argv"]:[v9,!0]},d9={["fn"]:"booleanEquals",["argv"]:[i9,!0]},k9={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},c9={["ref"]:"PartitionResult"},y9={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[c9,"supportsDualStack"]}]},N9=[{["fn"]:"isSet",["argv"]:[j9]}],q9=[O9],m9=[d9],Ye={version:"1.0",parameters:{Region:V9,UseDualStack:pT,UseFIPS:pT,Endpoint:V9,UseGlobalEndpoint:pT},rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseGlobalEndpoint"},!0]},{["fn"]:"not",["argv"]:N9},H9,l9,{["fn"]:"booleanEquals",["argv"]:[v9,!1]},{["fn"]:"booleanEquals",["argv"]:[i9,!1]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[dr,"ap-northeast-1"]}],endpoint:nr,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[dr,"ap-south-1"]}],endpoint:nr,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[dr,"ap-southeast-1"]}],endpoint:nr,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[dr,"ap-southeast-2"]}],endpoint:nr,["type"]:"endpoint"},D9,{conditions:[{["fn"]:"stringEquals",["argv"]:[dr,"ca-central-1"]}],endpoint:nr,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[dr,"eu-central-1"]}],endpoint:nr,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[dr,"eu-north-1"]}],endpoint:nr,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[dr,"eu-west-1"]}],endpoint:nr,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[dr,"eu-west-2"]}],endpoint:nr,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[dr,"eu-west-3"]}],endpoint:nr,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[dr,"sa-east-1"]}],endpoint:nr,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[dr,"us-east-1"]}],endpoint:nr,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[dr,"us-east-2"]}],endpoint:nr,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[dr,"us-west-1"]}],endpoint:nr,["type"]:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[dr,"us-west-2"]}],endpoint:nr,["type"]:"endpoint"},{endpoint:{url:"https://sts.{Region}.{PartitionResult#dnsSuffix}",properties:{authSchemes:[{name:"sigv4",signingName:"sts",signingRegion:"{Region}"}]},headers:Xf},["type"]:"endpoint"}],["type"]:"tree"},{conditions:N9,rules:[{conditions:q9,error:"Invalid Configuration: FIPS and custom endpoint are not supported",["type"]:"error"},{conditions:m9,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",["type"]:"error"},{endpoint:{url:j9,properties:Xf,headers:Xf},["type"]:"endpoint"}],["type"]:"tree"},{conditions:[H9],rules:[{conditions:[l9],rules:[{conditions:[O9,d9],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,k9]},y9],rules:[{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Xf,headers:Xf},["type"]:"endpoint"}],["type"]:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",["type"]:"error"}],["type"]:"tree"},{conditions:q9,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[k9,!0]}],rules:[{conditions:[{["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[c9,"name"]},"aws-us-gov"]}],endpoint:{url:"https://sts.{Region}.amazonaws.com",properties:Xf,headers:Xf},["type"]:"endpoint"},{endpoint:{url:"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",properties:Xf,headers:Xf},["type"]:"endpoint"}],["type"]:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",["type"]:"error"}],["type"]:"tree"},{conditions:m9,rules:[{conditions:[y9],rules:[{endpoint:{url:"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:Xf,headers:Xf},["type"]:"endpoint"}],["type"]:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",["type"]:"error"}],["type"]:"tree"},D9,{endpoint:{url:"https://sts.{Region}.{PartitionResult#dnsSuffix}",properties:Xf,headers:Xf},["type"]:"endpoint"}],["type"]:"tree"}],["type"]:"tree"},{error:"Invalid Configuration: Missing Region",["type"]:"error"}]},b9=Ye});var Xe,g9=(r,s={})=>{return Xe.get(r,()=>ss(b9,{endpointParams:r,logger:s.logger}))};var x9=G(()=>{Pw();ws();_9();Xe=new fs({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS","UseGlobalEndpoint"]});ur.aws=hs});var e9,n9,o9=(r)=>{return{apiVersion:"2011-06-15",base64Decoder:r?.base64Decoder??Uf,base64Encoder:r?.base64Encoder??Gf,disableHostPrefix:r?.disableHostPrefix??!1,endpointProvider:r?.endpointProvider??g9,extensions:r?.extensions??[],httpAuthSchemeProvider:r?.httpAuthSchemeProvider??P9,httpAuthSchemes:r?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(s)=>s.getIdentityProvider("aws.auth#sigv4"),signer:new e9.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(s)=>s.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new n9.NoAuthSigner}],logger:r?.logger??new Yf,serviceId:r?.serviceId??"STS",urlParser:r?.urlParser??br,utf8Decoder:r?.utf8Decoder??_r,utf8Encoder:r?.utf8Encoder??Tf}};var a9=G(()=>{e9=m(Qr(),1),n9=m(qr(),1);K();n0();S0();Os();aT();x9()});var XI,p9,u9=(r)=>{gs(process.version);const s=us(r),f=()=>s().then(_s),w=o9(r);return XI.emitWarningIfUnsupportedVersion(process.version),{...w,...r,runtime:"node",defaultsMode:s,bodyLengthChecker:r?.bodyLengthChecker??ps,credentialDefaultProvider:r?.credentialDefaultProvider??X0,defaultUserAgentProvider:r?.defaultUserAgentProvider??os({serviceId:w.serviceId,clientVersion:M9.version}),httpAuthSchemes:r?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(h)=>h.getIdentityProvider("aws.auth#sigv4")||(async(E)=>await X0(E?.__config||{})()),signer:new XI.AwsSdkSigV4Signer},{schemeId:"smithy.api#noAuth",identityProvider:(h)=>h.getIdentityProvider("smithy.api#noAuth")||(async()=>({})),signer:new p9.NoAuthSigner}],maxAttempts:r?.maxAttempts??u(js),region:r?.region??u(Hf,Ds),requestHandler:ff.create(r?.requestHandler??f),retryMode:r?.retryMode??u({...is,default:async()=>(await f()).retryMode||Nf}),sha256:r?.sha256??Fs.bind(null,"sha256"),streamCollector:r?.streamCollector??qf,useDualstackEndpoint:r?.useDualstackEndpoint??u(Hs),useFipsEndpoint:r?.useFipsEndpoint??u(ls),userAgentAppId:r?.userAgentAppId??u(as)}};var t9=G(()=>{B9();XI=m(Qr(),1);e1();Jh();lf();p9=m(qr(),1);Qh();Is();Ns();a0();Bh();zf();a9();K();Mh();K()});var rB=(r)=>{const s=r.httpAuthSchemes;let{httpAuthSchemeProvider:f,credentials:w}=r;return{setHttpAuthScheme(h){const E=s.findIndex(($)=>$.schemeId===h.schemeId);if(E===-1)s.push(h);else s.splice(E,1,h)},httpAuthSchemes(){return s},setHttpAuthSchemeProvider(h){f=h},httpAuthSchemeProvider(){return f},setCredentials(h){w=h},credentials(){return w}}},fB=(r)=>{return{httpAuthSchemes:r.httpAuthSchemes(),httpAuthSchemeProvider:r.httpAuthSchemeProvider(),credentials:r.credentials()}};var KI=(r)=>r,sB=(r,s)=>{const f={...KI(ts(r)),...KI(xs(r)),...KI(Xs(r)),...KI(rB(r))};return s.forEach((w)=>w.configure(f)),{...r,...r0(f),...es(f),...Ks(f),...fB(f)}};var wB=G(()=>{Vh();kr();K()});var qh,J0;var zE=G(()=>{pw();uw();tw();Bw();lf();qh=m(qr(),1);Lh();B();Is();K();aT();f0();t9();wB();J0=class J0 extends Sf{constructor(...[r]){const s=u9(r||{}),f=Q9(s),w=Ms(f),h=vs(w),E=ks(h),$=Zs(E),I=qs($),F=J9(I),U=sB(F,r?.extensions||[]);super(U);this.config=U,this.middlewareStack.use(Vs(this.config)),this.middlewareStack.use(ns(this.config)),this.middlewareStack.use(ys(this.config)),this.middlewareStack.use(Ps(this.config)),this.middlewareStack.use(Js(this.config)),this.middlewareStack.use(Qs(this.config)),this.middlewareStack.use(qh.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:Z9,identityProviderConfigProvider:async(A)=>new qh.DefaultIdentityProviderConfig({"aws.auth#sigv4":A.credentials})})),this.middlewareStack.use(qh.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}});var sf;var ZI=G(()=>{K();sf=class sf extends mf{constructor(r){super(r);Object.setPrototypeOf(this,sf.prototype)}}});var SE,YE,XE,KE,ZE,PE,JE,QE,mh=(r)=>({...r,...r.SecretAccessKey&&{SecretAccessKey:o}}),uT=(r)=>({...r,...r.Credentials&&{Credentials:mh(r.Credentials)}}),tT=(r)=>({...r,...r.SAMLAssertion&&{SAMLAssertion:o}}),r5=(r)=>({...r,...r.Credentials&&{Credentials:mh(r.Credentials)}}),f5=(r)=>({...r,...r.WebIdentityToken&&{WebIdentityToken:o}}),s5=(r)=>({...r,...r.Credentials&&{Credentials:mh(r.Credentials)}}),w5=(r)=>({...r,...r.Credentials&&{Credentials:mh(r.Credentials)}}),h5=(r)=>({...r,...r.Credentials&&{Credentials:mh(r.Credentials)}});var Ew=G(()=>{K();ZI();SE=class SE extends sf{constructor(r){super({name:"ExpiredTokenException",$fault:"client",...r});this.name="ExpiredTokenException",this.$fault="client",Object.setPrototypeOf(this,SE.prototype)}};YE=class YE extends sf{constructor(r){super({name:"MalformedPolicyDocumentException",$fault:"client",...r});this.name="MalformedPolicyDocumentException",this.$fault="client",Object.setPrototypeOf(this,YE.prototype)}};XE=class XE extends sf{constructor(r){super({name:"PackedPolicyTooLargeException",$fault:"client",...r});this.name="PackedPolicyTooLargeException",this.$fault="client",Object.setPrototypeOf(this,XE.prototype)}};KE=class KE extends sf{constructor(r){super({name:"RegionDisabledException",$fault:"client",...r});this.name="RegionDisabledException",this.$fault="client",Object.setPrototypeOf(this,KE.prototype)}};ZE=class ZE extends sf{constructor(r){super({name:"IDPRejectedClaimException",$fault:"client",...r});this.name="IDPRejectedClaimException",this.$fault="client",Object.setPrototypeOf(this,ZE.prototype)}};PE=class PE extends sf{constructor(r){super({name:"InvalidIdentityTokenException",$fault:"client",...r});this.name="InvalidIdentityTokenException",this.$fault="client",Object.setPrototypeOf(this,PE.prototype)}};JE=class JE extends sf{constructor(r){super({name:"IDPCommunicationErrorException",$fault:"client",...r});this.name="IDPCommunicationErrorException",this.$fault="client",Object.setPrototypeOf(this,JE.prototype)}};QE=class QE extends sf{constructor(r){super({name:"InvalidAuthorizationMessageException",$fault:"client",...r});this.name="InvalidAuthorizationMessageException",this.$fault="client",Object.setPrototypeOf(this,QE.prototype)}}});var Us,hB=async(r,s)=>{const f=Fw;let w;return w=Aw({...He(r,s),[Tw]:$n,[Gw]:Uw}),Iw(s,f,"/",void 0,w)},EB=async(r,s)=>{const f=Fw;let w;return w=Aw({...le(r,s),[Tw]:In,[Gw]:Uw}),Iw(s,f,"/",void 0,w)},$B=async(r,s)=>{const f=Fw;let w;return w=Aw({...De(r,s),[Tw]:Fn,[Gw]:Uw}),Iw(s,f,"/",void 0,w)},IB=async(r,s)=>{const f=Fw;let w;return w=Aw({...ke(r,s),[Tw]:Un,[Gw]:Uw}),Iw(s,f,"/",void 0,w)},FB=async(r,s)=>{const f=Fw;let w;return w=Aw({...ye(r,s),[Tw]:Tn,[Gw]:Uw}),Iw(s,f,"/",void 0,w)},UB=async(r,s)=>{const f=Fw;let w;return w=Aw({...Ne(r,s),[Tw]:Gn,[Gw]:Uw}),Iw(s,f,"/",void 0,w)},TB=async(r,s)=>{const f=Fw;let w;return w=Aw({...qe(r,s),[Tw]:An,[Gw]:Uw}),Iw(s,f,"/",void 0,w)},GB=async(r,s)=>{const f=Fw;let w;return w=Aw({...me(r,s),[Tw]:Ln,[Gw]:Uw}),Iw(s,f,"/",void 0,w)},AB=async(r,s)=>{if(r.statusCode>=300)return $w(r,s);const f=await Us.parseXmlBody(r.body,s);let w={};return w=ce(f.AssumeRoleResult,s),{$metadata:or(r),...w}},LB=async(r,s)=>{if(r.statusCode>=300)return $w(r,s);const f=await Us.parseXmlBody(r.body,s);let w={};return w=be(f.AssumeRoleWithSAMLResult,s),{$metadata:or(r),...w}},RB=async(r,s)=>{if(r.statusCode>=300)return $w(r,s);const f=await Us.parseXmlBody(r.body,s);let w={};return w=_e(f.AssumeRoleWithWebIdentityResult,s),{$metadata:or(r),...w}},CB=async(r,s)=>{if(r.statusCode>=300)return $w(r,s);const f=await Us.parseXmlBody(r.body,s);let w={};return w=ge(f.DecodeAuthorizationMessageResult,s),{$metadata:or(r),...w}},WB=async(r,s)=>{if(r.statusCode>=300)return $w(r,s);const f=await Us.parseXmlBody(r.body,s);let w={};return w=ne(f.GetAccessKeyInfoResult,s),{$metadata:or(r),...w}},zB=async(r,s)=>{if(r.statusCode>=300)return $w(r,s);const f=await Us.parseXmlBody(r.body,s);let w={};return w=oe(f.GetCallerIdentityResult,s),{$metadata:or(r),...w}},SB=async(r,s)=>{if(r.statusCode>=300)return $w(r,s);const f=await Us.parseXmlBody(r.body,s);let w={};return w=ae(f.GetFederationTokenResult,s),{$metadata:or(r),...w}},YB=async(r,s)=>{if(r.statusCode>=300)return $w(r,s);const f=await Us.parseXmlBody(r.body,s);let w={};return w=pe(f.GetSessionTokenResult,s),{$metadata:or(r),...w}},$w=async(r,s)=>{const f={...r,body:await Us.parseXmlErrorBody(r.body,s)},w=Rn(r,f.body);switch(w){case"ExpiredTokenException":case"com.amazonaws.sts#ExpiredTokenException":throw await Ke(f,s);case"MalformedPolicyDocument":case"com.amazonaws.sts#MalformedPolicyDocumentException":throw await Be(f,s);case"PackedPolicyTooLarge":case"com.amazonaws.sts#PackedPolicyTooLargeException":throw await Me(f,s);case"RegionDisabledException":case"com.amazonaws.sts#RegionDisabledException":throw await Ve(f,s);case"IDPRejectedClaim":case"com.amazonaws.sts#IDPRejectedClaimException":throw await Pe(f,s);case"InvalidIdentityToken":case"com.amazonaws.sts#InvalidIdentityTokenException":throw await Qe(f,s);case"IDPCommunicationError":case"com.amazonaws.sts#IDPCommunicationErrorException":throw await Ze(f,s);case"InvalidAuthorizationMessageException":case"com.amazonaws.sts#InvalidAuthorizationMessageException":throw await Je(f,s);default:const h=f.body;return En({output:r,parsedBody:h.Error,errorCode:w})}},Ke=async(r,s)=>{const f=r.body,w=xe(f.Error,s),h=new SE({$metadata:or(r),...w});return D(h,f)},Ze=async(r,s)=>{const f=r.body,w=ue(f.Error,s),h=new JE({$metadata:or(r),...w});return D(h,f)},Pe=async(r,s)=>{const f=r.body,w=te(f.Error,s),h=new ZE({$metadata:or(r),...w});return D(h,f)},Je=async(r,s)=>{const f=r.body,w=rn(f.Error,s),h=new QE({$metadata:or(r),...w});return D(h,f)},Qe=async(r,s)=>{const f=r.body,w=fn(f.Error,s),h=new PE({$metadata:or(r),...w});return D(h,f)},Be=async(r,s)=>{const f=r.body,w=sn(f.Error,s),h=new YE({$metadata:or(r),...w});return D(h,f)},Me=async(r,s)=>{const f=r.body,w=wn(f.Error,s),h=new XE({$metadata:or(r),...w});return D(h,f)},Ve=async(r,s)=>{const f=r.body,w=hn(f.Error,s),h=new KE({$metadata:or(r),...w});return D(h,f)},He=(r,s)=>{const f={};if(r[M0]!=null)f[M0]=r[M0];if(r[Oh]!=null)f[Oh]=r[Oh];if(r[df]!=null){const w=PI(r[df],s);if(r[df]?.length===0)f.PolicyArns=[];Object.entries(w).forEach(([h,E])=>{const $=`PolicyArns.${h}`;f[$]=E})}if(r[Of]!=null)f[Of]=r[Of];if(r[hf]!=null)f[hf]=r[hf];if(r[ch]!=null){const w=XB(r[ch],s);if(r[ch]?.length===0)f.Tags=[];Object.entries(w).forEach(([h,E])=>{const $=`Tags.${h}`;f[$]=E})}if(r[V5]!=null){const w=de(r[V5],s);if(r[V5]?.length===0)f.TransitiveTagKeys=[];Object.entries(w).forEach(([h,E])=>{const $=`TransitiveTagKeys.${h}`;f[$]=E})}if(r[U5]!=null)f[U5]=r[U5];if(r[dh]!=null)f[dh]=r[dh];if(r[bh]!=null)f[bh]=r[bh];if(r[bf]!=null)f[bf]=r[bf];if(r[Y5]!=null){const w=ie(r[Y5],s);if(r[Y5]?.length===0)f.ProvidedContexts=[];Object.entries(w).forEach(([h,E])=>{const $=`ProvidedContexts.${h}`;f[$]=E})}return f},le=(r,s)=>{const f={};if(r[M0]!=null)f[M0]=r[M0];if(r[z5]!=null)f[z5]=r[z5];if(r[J5]!=null)f[J5]=r[J5];if(r[df]!=null){const w=PI(r[df],s);if(r[df]?.length===0)f.PolicyArns=[];Object.entries(w).forEach(([h,E])=>{const $=`PolicyArns.${h}`;f[$]=E})}if(r[Of]!=null)f[Of]=r[Of];if(r[hf]!=null)f[hf]=r[hf];return f},De=(r,s)=>{const f={};if(r[M0]!=null)f[M0]=r[M0];if(r[Oh]!=null)f[Oh]=r[Oh];if(r[D5]!=null)f[D5]=r[D5];if(r[X5]!=null)f[X5]=r[X5];if(r[df]!=null){const w=PI(r[df],s);if(r[df]?.length===0)f.PolicyArns=[];Object.entries(w).forEach(([h,E])=>{const $=`PolicyArns.${h}`;f[$]=E})}if(r[Of]!=null)f[Of]=r[Of];if(r[hf]!=null)f[hf]=r[hf];return f},ke=(r,s)=>{const f={};if(r[T5]!=null)f[T5]=r[T5];return f},ye=(r,s)=>{const f={};if(r[jh]!=null)f[jh]=r[jh];return f},Ne=(r,s)=>{return{}},qe=(r,s)=>{const f={};if(r[C5]!=null)f[C5]=r[C5];if(r[Of]!=null)f[Of]=r[Of];if(r[df]!=null){const w=PI(r[df],s);if(r[df]?.length===0)f.PolicyArns=[];Object.entries(w).forEach(([h,E])=>{const $=`PolicyArns.${h}`;f[$]=E})}if(r[hf]!=null)f[hf]=r[hf];if(r[ch]!=null){const w=XB(r[ch],s);if(r[ch]?.length===0)f.Tags=[];Object.entries(w).forEach(([h,E])=>{const $=`Tags.${h}`;f[$]=E})}return f},me=(r,s)=>{const f={};if(r[hf]!=null)f[hf]=r[hf];if(r[dh]!=null)f[dh]=r[dh];if(r[bh]!=null)f[bh]=r[bh];return f},PI=(r,s)=>{const f={};let w=1;for(let h of r){if(h===null)continue;const E=je(h,s);Object.entries(E).forEach(([$,I])=>{f[`member.${w}.${$}`]=I}),w++}return f},je=(r,s)=>{const f={};if(r[k5]!=null)f[k5]=r[k5];return f},ve=(r,s)=>{const f={};if(r[S5]!=null)f[S5]=r[S5];if(r[$5]!=null)f[$5]=r[$5];return f},ie=(r,s)=>{const f={};let w=1;for(let h of r){if(h===null)continue;const E=ve(h,s);Object.entries(E).forEach(([$,I])=>{f[`member.${w}.${$}`]=I}),w++}return f},Oe=(r,s)=>{const f={};if(r[R5]!=null)f[R5]=r[R5];if(r[l5]!=null)f[l5]=r[l5];return f},de=(r,s)=>{const f={};let w=1;for(let h of r){if(h===null)continue;f[`member.${w}`]=h,w++}return f},XB=(r,s)=>{const f={};let w=1;for(let h of r){if(h===null)continue;const E=Oe(h,s);Object.entries(E).forEach(([$,I])=>{f[`member.${w}.${$}`]=I}),w++}return f},y5=(r,s)=>{const f={};if(r[E5]!=null)f[E5]=T(r[E5]);if(r[B0]!=null)f[B0]=T(r[B0]);return f},ce=(r,s)=>{const f={};if(r[wf]!=null)f[wf]=BE(r[wf],s);if(r[Q0]!=null)f[Q0]=y5(r[Q0],s);if(r[cf]!=null)f[cf]=hr(r[cf]);if(r[bf]!=null)f[bf]=T(r[bf]);return f},be=(r,s)=>{const f={};if(r[wf]!=null)f[wf]=BE(r[wf],s);if(r[Q0]!=null)f[Q0]=y5(r[Q0],s);if(r[cf]!=null)f[cf]=hr(r[cf]);if(r[Z5]!=null)f[Z5]=T(r[Z5]);if(r[B5]!=null)f[B5]=T(r[B5]);if(r[L5]!=null)f[L5]=T(r[L5]);if(r[ih]!=null)f[ih]=T(r[ih]);if(r[W5]!=null)f[W5]=T(r[W5]);if(r[bf]!=null)f[bf]=T(r[bf]);return f},_e=(r,s)=>{const f={};if(r[wf]!=null)f[wf]=BE(r[wf],s);if(r[Q5]!=null)f[Q5]=T(r[Q5]);if(r[Q0]!=null)f[Q0]=y5(r[Q0],s);if(r[cf]!=null)f[cf]=hr(r[cf]);if(r[K5]!=null)f[K5]=T(r[K5]);if(r[ih]!=null)f[ih]=T(r[ih]);if(r[bf]!=null)f[bf]=T(r[bf]);return f},BE=(r,s)=>{const f={};if(r[jh]!=null)f[jh]=T(r[jh]);if(r[P5]!=null)f[P5]=T(r[P5]);if(r[M5]!=null)f[M5]=T(r[M5]);if(r[F5]!=null)f[F5]=y(yw(r[F5]));return f},ge=(r,s)=>{const f={};if(r[I5]!=null)f[I5]=T(r[I5]);return f},xe=(r,s)=>{const f={};if(r[Sr]!=null)f[Sr]=T(r[Sr]);return f},ee=(r,s)=>{const f={};if(r[A5]!=null)f[A5]=T(r[A5]);if(r[B0]!=null)f[B0]=T(r[B0]);return f},ne=(r,s)=>{const f={};if(r[vh]!=null)f[vh]=T(r[vh]);return f},oe=(r,s)=>{const f={};if(r[H5]!=null)f[H5]=T(r[H5]);if(r[vh]!=null)f[vh]=T(r[vh]);if(r[B0]!=null)f[B0]=T(r[B0]);return f},ae=(r,s)=>{const f={};if(r[wf]!=null)f[wf]=BE(r[wf],s);if(r[G5]!=null)f[G5]=ee(r[G5],s);if(r[cf]!=null)f[cf]=hr(r[cf]);return f},pe=(r,s)=>{const f={};if(r[wf]!=null)f[wf]=BE(r[wf],s);return f},ue=(r,s)=>{const f={};if(r[Sr]!=null)f[Sr]=T(r[Sr]);return f},te=(r,s)=>{const f={};if(r[Sr]!=null)f[Sr]=T(r[Sr]);return f},rn=(r,s)=>{const f={};if(r[Sr]!=null)f[Sr]=T(r[Sr]);return f},fn=(r,s)=>{const f={};if(r[Sr]!=null)f[Sr]=T(r[Sr]);return f},sn=(r,s)=>{const f={};if(r[Sr]!=null)f[Sr]=T(r[Sr]);return f},wn=(r,s)=>{const f={};if(r[Sr]!=null)f[Sr]=T(r[Sr]);return f},hn=(r,s)=>{const f={};if(r[Sr]!=null)f[Sr]=T(r[Sr]);return f},or=(r)=>({httpStatusCode:r.statusCode,requestId:r.headers["x-amzn-requestid"]??r.headers["x-amzn-request-id"]??r.headers["x-amz-request-id"],extendedRequestId:r.headers["x-amz-id-2"],cfId:r.headers["x-amz-cf-id"]}),En,Iw=async(r,s,f,w,h)=>{const{hostname:E,protocol:$="https",port:I,path:F}=await r.endpoint(),U={protocol:$,hostname:E,port:I,method:"POST",path:F.endsWith("/")?F.slice(0,-1)+f:F+f,headers:s};if(w!==void 0)U.hostname=w;if(h!==void 0)U.body=h;return new Mr(U)},Fw,Uw="2011-06-15",Tw="Action",jh="AccessKeyId",$n="AssumeRole",E5="AssumedRoleId",Q0="AssumedRoleUser",In="AssumeRoleWithSAML",Fn="AssumeRoleWithWebIdentity",vh="Account",B0="Arn",ih="Audience",wf="Credentials",$5="ContextAssertion",Un="DecodeAuthorizationMessage",I5="DecodedMessage",hf="DurationSeconds",F5="Expiration",U5="ExternalId",T5="EncodedMessage",G5="FederatedUser",A5="FederatedUserId",Tn="GetAccessKeyInfo",Gn="GetCallerIdentity",An="GetFederationToken",Ln="GetSessionToken",L5="Issuer",R5="Key",C5="Name",W5="NameQualifier",Of="Policy",df="PolicyArns",z5="PrincipalArn",S5="ProviderArn",Y5="ProvidedContexts",X5="ProviderId",cf="PackedPolicySize",K5="Provider",M0="RoleArn",Oh="RoleSessionName",Z5="Subject",P5="SecretAccessKey",J5="SAMLAssertion",Q5="SubjectFromWebIdentityToken",bf="SourceIdentity",dh="SerialNumber",B5="SubjectType",M5="SessionToken",ch="Tags",bh="TokenCode",V5="TransitiveTagKeys",H5="UserId",Gw="Version",l5="Value",D5="WebIdentityToken",k5="arn",Sr="message",Aw=(r)=>Object.entries(r).map(([s,f])=>d3(s)+"="+d3(f)).join("&"),Rn=(r,s)=>{if(s.Error?.Code!==void 0)return s.Error.Code;if(r.statusCode==404)return"NotFound"};var V0=G(()=>{Us=m(Qr(),1);kr();K();Ew();ZI();En=bs(sf),Fw={"content-type":"application/x-www-form-urlencoded"}});var _h;var JI=G(()=>{B();V();K();f0();Ew();V0();_h=class _h extends R.classBuilder().ep(er).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRole",{}).n("STSClient","AssumeRoleCommand").f(void 0,uT).ser(hB).de(AB).build(){}});var QI;var N5=G(()=>{B();V();K();f0();Ew();V0();QI=class QI extends R.classBuilder().ep(er).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithSAML",{}).n("STSClient","AssumeRoleWithSAMLCommand").f(tT,r5).ser(EB).de(LB).build(){}});var gh;var BI=G(()=>{B();V();K();f0();Ew();V0();gh=class gh extends R.classBuilder().ep(er).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","AssumeRoleWithWebIdentity",{}).n("STSClient","AssumeRoleWithWebIdentityCommand").f(f5,s5).ser($B).de(RB).build(){}});var MI;var q5=G(()=>{B();V();K();f0();V0();MI=class MI extends R.classBuilder().ep(er).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","DecodeAuthorizationMessage",{}).n("STSClient","DecodeAuthorizationMessageCommand").f(void 0,void 0).ser(IB).de(CB).build(){}});var VI;var m5=G(()=>{B();V();K();f0();V0();VI=class VI extends R.classBuilder().ep(er).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetAccessKeyInfo",{}).n("STSClient","GetAccessKeyInfoCommand").f(void 0,void 0).ser(FB).de(WB).build(){}});var HI;var j5=G(()=>{B();V();K();f0();V0();HI=class HI extends R.classBuilder().ep(er).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetCallerIdentity",{}).n("STSClient","GetCallerIdentityCommand").f(void 0,void 0).ser(UB).de(zB).build(){}});var lI;var v5=G(()=>{B();V();K();f0();Ew();V0();lI=class lI extends R.classBuilder().ep(er).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetFederationToken",{}).n("STSClient","GetFederationTokenCommand").f(void 0,w5).ser(TB).de(SB).build(){}});var DI;var i5=G(()=>{B();V();K();f0();Ew();V0();DI=class DI extends R.classBuilder().ep(er).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSSecurityTokenServiceV20110615","GetSessionToken",{}).n("STSClient","GetSessionTokenCommand").f(void 0,h5).ser(GB).de(YB).build(){}});var Cn,O5;var KB=G(()=>{K();JI();N5();BI();q5();m5();j5();v5();i5();zE();Cn={AssumeRoleCommand:_h,AssumeRoleWithSAMLCommand:QI,AssumeRoleWithWebIdentityCommand:gh,DecodeAuthorizationMessageCommand:MI,GetAccessKeyInfoCommand:VI,GetCallerIdentityCommand:HI,GetFederationTokenCommand:lI,GetSessionTokenCommand:DI};O5=class O5 extends J0{};ds(Cn,O5)});var ZB=G(()=>{JI();N5();BI();q5();m5();j5();v5();i5()});var PB=G(()=>{Ew()});var kI,JB="us-east-1",QB=(r)=>{if(typeof r?.Arn==="string"){const s=r.Arn.split(":");if(s.length>4&&s[4]!=="")return s[4]}return},BB=async(r,s,f)=>{const w=typeof r==="function"?await r():r,h=typeof s==="function"?await s():s;return f?.debug?.("@aws-sdk/client-sts::resolveRegion","accepting first of:",`${w} (provider)`,`${h} (parent client)`,`${JB} (STS default)`),w??h??JB},MB=(r,s)=>{let f,w;return async(h,E)=>{if(w=h,!f){const{logger:A=r?.parentClientConfig?.logger,region:L,requestHandler:S=r?.parentClientConfig?.requestHandler,credentialProviderLogger:z}=r,Z=await BB(L,r?.parentClientConfig?.region,z),N=!HB(S);f=new s({credentialDefaultProvider:()=>async()=>w,region:Z,requestHandler:N?S:void 0,logger:A})}const{Credentials:$,AssumedRoleUser:I}=await f.send(new _h(E));if(!$||!$.AccessKeyId||!$.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRole call with role ${E.RoleArn}`);const F=QB(I),U={accessKeyId:$.AccessKeyId,secretAccessKey:$.SecretAccessKey,sessionToken:$.SessionToken,expiration:$.Expiration,...$.CredentialScope&&{credentialScope:$.CredentialScope},...F&&{accountId:F}};return kI.setCredentialFeature(U,"CREDENTIALS_STS_ASSUME_ROLE","i"),U}},VB=(r,s)=>{let f;return async(w)=>{if(!f){const{logger:F=r?.parentClientConfig?.logger,region:U,requestHandler:A=r?.parentClientConfig?.requestHandler,credentialProviderLogger:L}=r,S=await BB(U,r?.parentClientConfig?.region,L),z=!HB(A);f=new s({region:S,requestHandler:z?A:void 0,logger:F})}const{Credentials:h,AssumedRoleUser:E}=await f.send(new gh(w));if(!h||!h.AccessKeyId||!h.SecretAccessKey)throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${w.RoleArn}`);const $=QB(E),I={accessKeyId:h.AccessKeyId,secretAccessKey:h.SecretAccessKey,sessionToken:h.SessionToken,expiration:h.Expiration,...h.CredentialScope&&{credentialScope:h.CredentialScope},...$&&{accountId:$}};if($)kI.setCredentialFeature(I,"RESOLVED_ACCOUNT_ID","T");return kI.setCredentialFeature(I,"CREDENTIALS_STS_ASSUME_ROLE_WEB_ID","k"),I}},HB=(r)=>{return r?.metadata?.handlerProtocol==="h2"};var lB=G(()=>{kI=m(tr(),1);JI();BI()});var DB=(r,s)=>{if(!s)return r;else return class f extends r{constructor(w){super(w);for(let h of s)this.middlewareStack.use(h)}}},kB=(r={},s)=>MB(r,DB(J0,s)),yB=(r={},s)=>VB(r,DB(J0,s)),Wn=(r)=>(s)=>r({roleAssumer:kB(s),roleAssumerWithWebIdentity:yB(s),...s});var NB=G(()=>{lB();zE()});var d5={};Ys(d5,{getDefaultRoleAssumerWithWebIdentity:()=>yB,getDefaultRoleAssumer:()=>kB,decorateDefaultCredentialProvider:()=>Wn,__Client:()=>Sf,STSServiceException:()=>sf,STSClient:()=>J0,STS:()=>O5,RegionDisabledException:()=>KE,PackedPolicyTooLargeException:()=>XE,MalformedPolicyDocumentException:()=>YE,InvalidIdentityTokenException:()=>PE,InvalidAuthorizationMessageException:()=>QE,IDPRejectedClaimException:()=>ZE,IDPCommunicationErrorException:()=>JE,GetSessionTokenResponseFilterSensitiveLog:()=>h5,GetSessionTokenCommand:()=>DI,GetFederationTokenResponseFilterSensitiveLog:()=>w5,GetFederationTokenCommand:()=>lI,GetCallerIdentityCommand:()=>HI,GetAccessKeyInfoCommand:()=>VI,ExpiredTokenException:()=>SE,DecodeAuthorizationMessageCommand:()=>MI,CredentialsFilterSensitiveLog:()=>mh,AssumeRoleWithWebIdentityResponseFilterSensitiveLog:()=>s5,AssumeRoleWithWebIdentityRequestFilterSensitiveLog:()=>f5,AssumeRoleWithWebIdentityCommand:()=>gh,AssumeRoleWithSAMLResponseFilterSensitiveLog:()=>r5,AssumeRoleWithSAMLRequestFilterSensitiveLog:()=>tT,AssumeRoleWithSAMLCommand:()=>QI,AssumeRoleResponseFilterSensitiveLog:()=>uT,AssumeRoleCommand:()=>_h,$Command:()=>R});var c5=G(()=>{zE();KB();ZB();PB();NB();ZI()});var b5,_5,mB=(r,{profile:s="default",logger:f}={})=>{return Boolean(r)&&typeof r==="object"&&typeof r.role_arn==="string"&&["undefined","string"].indexOf(typeof r.role_session_name)>-1&&["undefined","string"].indexOf(typeof r.external_id)>-1&&["undefined","string"].indexOf(typeof r.mfa_serial)>-1&&(zn(r,{profile:s,logger:f})||Sn(r,{profile:s,logger:f}))},zn=(r,{profile:s,logger:f})=>{const w=typeof r.source_profile==="string"&&typeof r.credential_source==="undefined";if(w)f?.debug?.(` ${s} isAssumeRoleWithSourceProfile source_profile=${r.source_profile}`);return w},Sn=(r,{profile:s,logger:f})=>{const w=typeof r.credential_source==="string"&&typeof r.source_profile==="undefined";if(w)f?.debug?.(` ${s} isCredentialSourceProfile credential_source=${r.credential_source}`);return w},jB=async(r,s,f,w={})=>{f.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)");const h=s[r];if(!f.roleAssumer){const{getDefaultRoleAssumer:I}=await Promise.resolve().then(() => (c5(),d5));f.roleAssumer=I({...f.clientConfig,credentialProviderLogger:f.logger,parentClientConfig:f?.parentClientConfig},f.clientPlugins)}const{source_profile:E}=h;if(E&&E in w)throw new _5.CredentialsProviderError(`Detected a cycle attempting to resolve credentials for profile ${Df(f)}. Profiles visited: `+Object.keys(w).join(", "),{logger:f.logger});f.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${E?`source_profile=[${E}]`:`profile=[${r}]`}`);const $=E?yI(E,s,f,{...w,[E]:!0},qB(s[E]??{})):(await S9(h.credential_source,r,f.logger)(f))();if(qB(h))return $.then((I)=>b5.setCredentialFeature(I,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"));else{const I={RoleArn:h.role_arn,RoleSessionName:h.role_session_name||`aws-sdk-js-${Date.now()}`,ExternalId:h.external_id,DurationSeconds:parseInt(h.duration_seconds||"3600",10)},{mfa_serial:F}=h;if(F){if(!f.mfaCodeProvider)throw new _5.CredentialsProviderError(`Profile ${r} requires multi-factor authentication, but no MFA code callback was provided.`,{logger:f.logger,tryNextLink:!1});I.SerialNumber=F,I.TokenCode=await f.mfaCodeProvider(F)}const U=await $;return f.roleAssumer(U,I).then((A)=>b5.setCredentialFeature(A,"CREDENTIALS_PROFILE_SOURCE_PROFILE","o"))}},qB=(r)=>{return!r.role_arn&&!!r.credential_source};var vB=G(()=>{b5=m(tr(),1),_5=m(Ar(),1);$s();Y9();g5()});var iB,OB=(r,s,f)=>{if(s.Version!==1)throw Error(`Profile ${r} credential_process did not return Version 1.`);if(s.AccessKeyId===void 0||s.SecretAccessKey===void 0)throw Error(`Profile ${r} credential_process returned invalid credentials.`);if(s.Expiration){const E=new Date;if(new Date(s.Expiration)<E)throw Error(`Profile ${r} credential_process returned expired credentials.`)}let w=s.AccountId;if(!w&&f?.[r]?.aws_account_id)w=f[r].aws_account_id;const h={accessKeyId:s.AccessKeyId,secretAccessKey:s.SecretAccessKey,...s.SessionToken&&{sessionToken:s.SessionToken},...s.Expiration&&{expiration:new Date(s.Expiration)},...s.CredentialScope&&{credentialScope:s.CredentialScope},...w&&{accountId:w}};return iB.setCredentialFeature(h,"CREDENTIALS_PROCESS","w"),h};var dB=G(()=>{iB=m(tr(),1)});import{exec as Yn}from"child_process";import{promisify as Xn}from"util";var NI,cB=async(r,s,f)=>{const w=s[r];if(s[r]){const h=w.credential_process;if(h!==void 0){const E=Xn(Yn);try{const{stdout:$}=await E(h);let I;try{I=JSON.parse($.trim())}catch{throw Error(`Profile ${r} credential_process returned invalid JSON.`)}return OB(r,I,s)}catch($){throw new NI.CredentialsProviderError($.message,{logger:f})}}else throw new NI.CredentialsProviderError(`Profile ${r} did not contain credential_process.`,{logger:f})}else throw new NI.CredentialsProviderError(`Profile ${r} could not be found in shared credentials file.`,{logger:f})};var bB=G(()=>{NI=m(Ar(),1);dB()});var Kn=(r={})=>async()=>{r.logger?.debug("@aws-sdk/credential-provider-process - fromProcess");const s=await e0(r);return cB(Df(r),s,r.logger)};var _B=G(()=>{$s();bB()});var x5={};Ys(x5,{fromProcess:()=>Kn});var e5=G(()=>{_B()});var gB,xB=(r)=>Boolean(r)&&typeof r==="object"&&typeof r.credential_process==="string",eB=async(r,s)=>Promise.resolve().then(() => (e5(),x5)).then(({fromProcess:f})=>f({...r,profile:s})().then((w)=>gB.setCredentialFeature(w,"CREDENTIALS_PROFILE_PROCESS","v")));var nB=G(()=>{gB=m(tr(),1)});var n5,oB=async(r,s,f={})=>{const{fromSSO:w}=await Promise.resolve().then(() => (nT(),eT));return w({profile:r,logger:f.logger})().then((h)=>{if(s.sso_session)return n5.setCredentialFeature(h,"CREDENTIALS_PROFILE_SSO","r");else return n5.setCredentialFeature(h,"CREDENTIALS_PROFILE_SSO_LEGACY","t")})},aB=(r)=>r&&(typeof r.sso_start_url==="string"||typeof r.sso_account_id==="string"||typeof r.sso_session==="string"||typeof r.sso_region==="string"||typeof r.sso_role_name==="string");var pB=G(()=>{n5=m(tr(),1)});var uB,o5=(r)=>Boolean(r)&&typeof r==="object"&&typeof r.aws_access_key_id==="string"&&typeof r.aws_secret_access_key==="string"&&["undefined","string"].indexOf(typeof r.aws_session_token)>-1&&["undefined","string"].indexOf(typeof r.aws_account_id)>-1,a5=async(r,s)=>{s?.logger?.debug("@aws-sdk/credential-provider-ini - resolveStaticCredentials");const f={accessKeyId:r.aws_access_key_id,secretAccessKey:r.aws_secret_access_key,sessionToken:r.aws_session_token,...r.aws_credential_scope&&{credentialScope:r.aws_credential_scope},...r.aws_account_id&&{accountId:r.aws_account_id}};return uB.setCredentialFeature(f,"CREDENTIALS_PROFILE","n")};var tB=G(()=>{uB=m(tr(),1)});var p5=(r)=>async()=>{r.logger?.debug("@aws-sdk/credential-provider-web-identity - fromWebToken");const{roleArn:s,roleSessionName:f,webIdentityToken:w,providerId:h,policyArns:E,policy:$,durationSeconds:I}=r;let{roleAssumerWithWebIdentity:F}=r;if(!F){const{getDefaultRoleAssumerWithWebIdentity:U}=await Promise.resolve().then(() => (c5(),d5));F=U({...r.clientConfig,credentialProviderLogger:r.logger,parentClientConfig:r.parentClientConfig},r.clientPlugins)}return F({RoleArn:s,RoleSessionName:f??`aws-sdk-js-session-${Date.now()}`,WebIdentityToken:w,ProviderId:h,PolicyArns:E,Policy:$,DurationSeconds:I})};import{readFileSync as Zn}from"fs";var fM,sM,rM="AWS_WEB_IDENTITY_TOKEN_FILE",Pn="AWS_ROLE_ARN",Jn="AWS_ROLE_SESSION_NAME",Qn=(r={})=>async()=>{r.logger?.debug("@aws-sdk/credential-provider-web-identity - fromTokenFile");const s=r?.webIdentityTokenFile??process.env[rM],f=r?.roleArn??process.env[Pn],w=r?.roleSessionName??process.env[Jn];if(!s||!f)throw new sM.CredentialsProviderError("Web identity configuration not specified",{logger:r.logger});const h=await p5({...r,webIdentityToken:Zn(s,{encoding:"ascii"}),roleArn:f,roleSessionName:w})();if(s===process.env[rM])fM.setCredentialFeature(h,"CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN","h");return h};var wM=G(()=>{fM=m(tr(),1),sM=m(Ar(),1)});var u5={};Ys(u5,{fromWebToken:()=>p5,fromTokenFile:()=>Qn});var t5=G(()=>{wM()});var hM,EM=(r)=>Boolean(r)&&typeof r==="object"&&typeof r.web_identity_token_file==="string"&&typeof r.role_arn==="string"&&["undefined","string"].indexOf(typeof r.role_session_name)>-1,$M=async(r,s)=>Promise.resolve().then(() => (t5(),u5)).then(({fromTokenFile:f})=>f({webIdentityTokenFile:r.web_identity_token_file,roleArn:r.role_arn,roleSessionName:r.role_session_name,roleAssumerWithWebIdentity:s.roleAssumerWithWebIdentity,logger:s.logger,parentClientConfig:s.parentClientConfig})().then((w)=>hM.setCredentialFeature(w,"CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN","q")));var IM=G(()=>{hM=m(tr(),1)});var FM,yI=async(r,s,f,w={},h=!1)=>{const E=s[r];if(Object.keys(w).length>0&&o5(E))return a5(E,f);if(h||mB(E,{profile:r,logger:f.logger}))return jB(r,s,f,w);if(o5(E))return a5(E,f);if(EM(E))return $M(E,f);if(xB(E))return eB(f,r);if(aB(E))return await oB(r,E,f);throw new FM.CredentialsProviderError(`Could not resolve credentials using profile: [${r}] in configuration/credentials file(s).`,{logger:f.logger})};var g5=G(()=>{FM=m(Ar(),1);vB();nB();pB();tB();IM()});var Bn=(r={})=>async()=>{r.logger?.debug("@aws-sdk/credential-provider-ini - fromIni");const s=await e0(r);return yI(Df(r),s,r)};var UM=G(()=>{$s();g5()});var TM={};Ys(TM,{fromIni:()=>Bn});var GM=G(()=>{UM()});var Lw,AM=!1,X0=(r={})=>Lw.memoize(Lw.chain(async()=>{if(r.profile??process.env[KX]){if(process.env[c3]&&process.env[b3]){if(!AM)(r.logger?.warn&&r.logger?.constructor?.name!=="NoOpLogger"?r.logger.warn:console.warn)(`@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING:
26
26
  Multiple credential sources detected:
27
27
  Both AWS_PROFILE and the pair AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY static credentials are set.
28
28
  This SDK will proceed with the AWS_PROFILE value.
@@ -30,7 +30,7 @@ Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI
30
30
  However, a future version may change this behavior to prefer the ENV static credentials.
31
31
  Please ensure that your environment only sets either the AWS_PROFILE or the
32
32
  AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY pair.
33
- `),HM=!0}throw new Ew.CredentialsProviderError("AWS_PROFILE is set, skipping fromEnv provider.",{logger:r.logger,tryNextLink:!0})}return r.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv"),_5(r)()},async()=>{r.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromSSO");const{ssoStartUrl:f,ssoAccountId:s,ssoRegion:w,ssoRoleName:h,ssoSession:$}=r;if(!f&&!s&&!w&&!h&&!$)throw new Ew.CredentialsProviderError("Skipping SSO provider in default chain (inputs do not include SSO fields).",{logger:r.logger});const{fromSSO:E}=await Promise.resolve().then(() => (iT(),mT));return E(r)()},async()=>{r.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni");const{fromIni:f}=await Promise.resolve().then(() => (lM(),BM));return f(r)()},async()=>{r.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess");const{fromProcess:f}=await Promise.resolve().then(() => (yG(),kG));return f(r)()},async()=>{r.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile");const{fromTokenFile:f}=await Promise.resolve().then(() => (vG(),qG));return f(r)()},async()=>{return r.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::remoteProvider"),(await $7(r))()},async()=>{throw new Ew.CredentialsProviderError("Could not load credentials from any providers",{tryNextLink:!1,logger:r.logger})}),qe,ie),ie=(r)=>r?.expiration!==void 0,qe=(r)=>r?.expiration!==void 0&&r.expiration.getTime()-Date.now()<300000;var VM=G(()=>{x5();Ew=d(Cr(),1);sf();E7()});var c1=G(()=>{VM()});xw();ew();nw();aw();Qs();var ch=d(dr(),1);Eh();B();wf();Y();var ZZ=d(Br(),1);ps();function pg(r){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"route53",region:r.region},propertiesExtractor:(f,s)=>({signingProperties:{config:f,context:s}})}}var JZ=async(r,f,s)=>{return{operation:Zs(f).operation,region:await yr(r.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},QZ=(r)=>{const f=[];switch(r.operation){default:f.push(pg(r))}return f},MZ=(r)=>{return{...ZZ.resolveAwsSdkSigV4Config(r)}};var BZ=(r)=>{return{...r,useDualstackEndpoint:r.useDualstackEndpoint??!1,useFipsEndpoint:r.useFipsEndpoint??!1,defaultSigningName:"route53"}},J={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var lZ={name:"@aws-sdk/client-route-53",description:"AWS SDK for JavaScript Route 53 Client for Node.js, Browser and React Native",version:"3.637.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-route-53","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo route-53"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/client-sso-oidc":"3.637.0","@aws-sdk/client-sts":"3.637.0","@aws-sdk/core":"3.635.0","@aws-sdk/credential-provider-node":"3.637.0","@aws-sdk/middleware-host-header":"3.620.0","@aws-sdk/middleware-logger":"3.609.0","@aws-sdk/middleware-recursion-detection":"3.620.0","@aws-sdk/middleware-sdk-route53":"3.609.0","@aws-sdk/middleware-user-agent":"3.637.0","@aws-sdk/region-config-resolver":"3.614.0","@aws-sdk/types":"3.609.0","@aws-sdk/util-endpoints":"3.637.0","@aws-sdk/util-user-agent-browser":"3.609.0","@aws-sdk/util-user-agent-node":"3.614.0","@aws-sdk/xml-builder":"3.609.0","@smithy/config-resolver":"^3.0.5","@smithy/core":"^2.4.0","@smithy/fetch-http-handler":"^3.2.4","@smithy/hash-node":"^3.0.3","@smithy/invalid-dependency":"^3.0.3","@smithy/middleware-content-length":"^3.0.5","@smithy/middleware-endpoint":"^3.1.0","@smithy/middleware-retry":"^3.0.15","@smithy/middleware-serde":"^3.0.3","@smithy/middleware-stack":"^3.0.3","@smithy/node-config-provider":"^3.1.4","@smithy/node-http-handler":"^3.1.4","@smithy/protocol-http":"^4.1.0","@smithy/smithy-client":"^3.2.0","@smithy/types":"^3.3.0","@smithy/url-parser":"^3.0.3","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.15","@smithy/util-defaults-mode-node":"^3.0.15","@smithy/util-endpoints":"^2.0.5","@smithy/util-middleware":"^3.0.3","@smithy/util-retry":"^3.0.3","@smithy/util-utf8":"^3.0.0","@smithy/util-waiter":"^3.1.2",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node16":"16.1.3","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=16.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-route-53",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-route-53"}};var nM=d(Br(),1);c1();Ph();Qs();Xh();wf();ff();O0();Yh();Ls();var xM=d(Br(),1);Y();j0();C0();mf();Lw();os();var DM={["required"]:!1,type:"String"},kM={["required"]:!0,default:!1,type:"Boolean"},yM={["ref"]:"Endpoint"},BI={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},bM={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},cr={},NM={["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"name"]},"aws"]},Oh={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"name"]},Dw={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!1]},Z0={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!1]},mM={["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"us-east-1"}]},iM={["fn"]:"stringEquals",["argv"]:[Oh,"aws-us-gov"]},qM={url:"https://route53.us-gov.amazonaws.com",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"us-gov-west-1"}]},headers:{}},vM={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},jM={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsDualStack"]}]},dM=[BI],OM=[bM],cM=[{["ref"]:"Region"}],ve={version:"1.0",parameters:{Region:DM,UseDualStack:kM,UseFIPS:kM,Endpoint:DM},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[yM]}],rules:[{conditions:dM,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:OM,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:yM,properties:cr,headers:cr},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:cM}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:cM,assign:"PartitionResult"}],rules:[{conditions:[NM,Dw,Z0],endpoint:{url:"https://route53.amazonaws.com",properties:mM,headers:cr},type:"endpoint"},{conditions:[NM,BI,Z0],endpoint:{url:"https://route53-fips.amazonaws.com",properties:mM,headers:cr},type:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[Oh,"aws-cn"]},Dw,Z0],endpoint:{url:"https://route53.amazonaws.com.cn",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"cn-northwest-1"}]},headers:cr},type:"endpoint"},{conditions:[iM,Dw,Z0],endpoint:qM,type:"endpoint"},{conditions:[iM,BI,Z0],endpoint:qM,type:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[Oh,"aws-iso"]},Dw,Z0],endpoint:{url:"https://route53.c2s.ic.gov",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"us-iso-east-1"}]},headers:cr},type:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[Oh,"aws-iso-b"]},Dw,Z0],endpoint:{url:"https://route53.sc2s.sgov.gov",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"us-isob-east-1"}]},headers:cr},type:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[Oh,"aws-iso-e"]},Dw,Z0],endpoint:{url:"https://route53.cloud.adc-e.uk",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"eu-isoe-west-1"}]},headers:cr},type:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[Oh,"aws-iso-f"]},Dw,Z0],endpoint:{url:"https://route53.csp.hci.ic.gov",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"us-isof-south-1"}]},headers:cr},type:"endpoint"},{conditions:[BI,bM],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,vM]},jM],rules:[{endpoint:{url:"https://route53-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:cr,headers:cr},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:dM,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[vM,!0]}],rules:[{endpoint:{url:"https://route53-fips.{Region}.{PartitionResult#dnsSuffix}",properties:cr,headers:cr},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:OM,rules:[{conditions:[jM],rules:[{endpoint:{url:"https://route53.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:cr,headers:cr},type:"endpoint"}],type:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",type:"error"}],type:"tree"},{endpoint:{url:"https://route53.{Region}.{PartitionResult#dnsSuffix}",properties:cr,headers:cr},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},gM=ve;var _M=(r,f={})=>{return ns(gM,{endpointParams:r,logger:f.logger})};pr.aws=as;var eM=(r)=>{return{apiVersion:"2013-04-01",base64Decoder:r?.base64Decoder??Is,base64Encoder:r?.base64Encoder??Us,disableHostPrefix:r?.disableHostPrefix??!1,endpointProvider:r?.endpointProvider??_M,extensions:r?.extensions??[],httpAuthSchemeProvider:r?.httpAuthSchemeProvider??QZ,httpAuthSchemes:r?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(f)=>f.getIdentityProvider("aws.auth#sigv4"),signer:new xM.AwsSdkSigV4Signer}],logger:r?.logger??new As,serviceId:r?.serviceId??"Route 53",urlParser:r?.urlParser??br,utf8Decoder:r?.utf8Decoder??gr,utf8Encoder:r?.utf8Encoder??Fs}};Y();Kh();Y();var oM=(r)=>{Of(process.version);const f=ef(r),s=()=>f().then(df),w=eM(r);return nM.emitWarningIfUnsupportedVersion(process.version),{...w,...r,runtime:"node",defaultsMode:f,bodyLengthChecker:r?.bodyLengthChecker??xf,credentialDefaultProvider:r?.credentialDefaultProvider??A0,defaultUserAgentProvider:r?.defaultUserAgentProvider??_f({serviceId:w.serviceId,clientVersion:lZ.version}),maxAttempts:r?.maxAttempts??u(kf),region:r?.region??u(Js,Mf),requestHandler:ur.create(r?.requestHandler??s),retryMode:r?.retryMode??u({...Nf,default:async()=>(await s()).retryMode||Ds}),sha256:r?.sha256??hf.bind(null,"sha256"),streamCollector:r?.streamCollector??ks,useDualstackEndpoint:r?.useDualstackEndpoint??u(Jf),useFipsEndpoint:r?.useFipsEndpoint??u(Qf)}};Zh();kr();Y();var aM=(r)=>{const f=r.httpAuthSchemes;let{httpAuthSchemeProvider:s,credentials:w}=r;return{setHttpAuthScheme(h){const $=f.findIndex((E)=>E.schemeId===h.schemeId);if($===-1)f.push(h);else f.splice($,1,h)},httpAuthSchemes(){return f},setHttpAuthSchemeProvider(h){s=h},httpAuthSchemeProvider(){return s},setCredentials(h){w=h},credentials(){return w}}},pM=(r)=>{return{httpAuthSchemes:r.httpAuthSchemes(),httpAuthSchemeProvider:r.httpAuthSchemeProvider(),credentials:r.credentials()}};var lI=(r)=>r,uM=(r,f)=>{const s={...lI(nf(r)),...lI(cf(r)),...lI(Rf(r)),...lI(aM(r))};return f.forEach((w)=>w.configure(s)),{...r,...of(s),...bf(s),...zf(s),...pM(s)}};class jG extends Ws{constructor(...[r]){const f=oM(r||{}),s=BZ(f),w=Kf(s),h=yf(w),$=Bf(h),E=Sf($),I=Vf(E),F=MZ(I),U=uM(F,r?.extensions||[]);super(U);this.config=U,this.middlewareStack.use(Zf(this.config)),this.middlewareStack.use(gf(this.config)),this.middlewareStack.use(Hf(this.config)),this.middlewareStack.use(Pf(this.config)),this.middlewareStack.use(Xf(this.config)),this.middlewareStack.use(Yf(this.config)),this.middlewareStack.use(ch.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:JZ,identityProviderConfigProvider:async(C)=>new ch.DefaultIdentityProviderConfig({"aws.auth#sigv4":C.credentials})})),this.middlewareStack.use(ch.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}Y();var HI=/^\/(hostedzone|change|delegationset)\//;function je(){return(r)=>async(f)=>{const{ChangeBatch:s}=f.input,w=[];for(let h of s.Changes){const{AliasTarget:$}=h.ResourceRecordSet;if($)w.push({...h,ResourceRecordSet:{...h.ResourceRecordSet,AliasTarget:{...$,HostedZoneId:$.HostedZoneId.replace(HI,"")}}});else w.push(h)}return r({...f,input:{...f.input,ChangeBatch:{...s,Changes:w}}})}}var de={step:"initialize",tags:["ROUTE53_IDS","CHANGE_RESOURCE_RECORD_SETS"],name:"changeResourceRecordSetsMiddleware",override:!0},tM=(r)=>({applyToStack:(f)=>{f.add(je(),de)}});function ce(){return(r)=>async(f)=>{const s={...f.input};for(let w of Oe){const h=s[w];if(h)s[w]=h.replace(HI,"")}return r({...f,input:s})}}var Oe=["DelegationSetId","HostedZoneId","Id"],be={step:"initialize",tags:["ROUTE53_IDS"],name:"idNormalizerMiddleware",override:!0},i=(r)=>({applyToStack:(f)=>{f.add(ce(),be)}});B();H();Y();var _=d(Br(),1);function rB(r){return r.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function sB(r){return r.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"&#x0D;").replace(/\n/g,"&#x0A;").replace(/\u0085/g,"&#x85;").replace(/\u2028/,"&#x2028;")}class dG{constructor(r){this.value=r}toString(){return sB(""+this.value)}}class V{static of(r,f,s){const w=new V(r);if(f!==void 0)w.addChildNode(new dG(f));if(s!==void 0)w.withName(s);return w}constructor(r,f=[]){this.name=r,this.children=f,this.attributes={}}withName(r){return this.name=r,this}addAttribute(r,f){return this.attributes[r]=f,this}addChildNode(r){return this.children.push(r),this}removeAttribute(r){return delete this.attributes[r],this}n(r){return this.name=r,this}c(r){return this.children.push(r),this}a(r,f){if(f!=null)this.attributes[r]=f;return this}cc(r,f,s=f){if(r[f]!=null){const w=V.of(f,r[f]).withName(s);this.c(w)}}l(r,f,s,w){if(r[f]!=null)w().map(($)=>{$.withName(s),this.c($)})}lc(r,f,s,w){if(r[f]!=null){const h=w(),$=new V(s);h.map((E)=>{$.c(E)}),this.c($)}}toString(){const r=Boolean(this.children.length);let f=`<${this.name}`;const s=this.attributes;for(let w of Object.keys(s)){const h=s[w];if(h!=null)f+=` ${w}="${rB(""+h)}"`}return f+=!r?"/>":`>${this.children.map((w)=>w.toString()).join("")}</${this.name}>`}}var c=d(dr(),1);Y();Y();class j extends ys{constructor(r){super(r);Object.setPrototypeOf(this,j.prototype)}}class VI extends j{constructor(r){super({name:"ConcurrentModification",$fault:"client",...r});this.name="ConcurrentModification",this.$fault="client",Object.setPrototypeOf(this,VI.prototype)}}class DI extends j{constructor(r){super({name:"InvalidInput",$fault:"client",...r});this.name="InvalidInput",this.$fault="client",Object.setPrototypeOf(this,DI.prototype)}}class kI extends j{constructor(r){super({name:"InvalidKeySigningKeyStatus",$fault:"client",...r});this.name="InvalidKeySigningKeyStatus",this.$fault="client",Object.setPrototypeOf(this,kI.prototype)}}class yI extends j{constructor(r){super({name:"InvalidKMSArn",$fault:"client",...r});this.name="InvalidKMSArn",this.$fault="client",Object.setPrototypeOf(this,yI.prototype)}}class NI extends j{constructor(r){super({name:"InvalidSigningStatus",$fault:"client",...r});this.name="InvalidSigningStatus",this.$fault="client",Object.setPrototypeOf(this,NI.prototype)}}class mI extends j{constructor(r){super({name:"NoSuchKeySigningKey",$fault:"client",...r});this.name="NoSuchKeySigningKey",this.$fault="client",Object.setPrototypeOf(this,mI.prototype)}}class iI extends j{constructor(r){super({name:"ConflictingDomainExists",$fault:"client",...r});this.name="ConflictingDomainExists",this.$fault="client",Object.setPrototypeOf(this,iI.prototype)}}class qI extends j{constructor(r){super({name:"InvalidVPCId",$fault:"client",...r});this.name="InvalidVPCId",this.$fault="client",Object.setPrototypeOf(this,qI.prototype)}}class vI extends j{constructor(r){super({name:"LimitsExceeded",$fault:"client",...r});this.name="LimitsExceeded",this.$fault="client",Object.setPrototypeOf(this,vI.prototype)}}class jI extends j{constructor(r){super({name:"NoSuchHostedZone",$fault:"client",...r});this.name="NoSuchHostedZone",this.$fault="client",Object.setPrototypeOf(this,jI.prototype)}}class dI extends j{constructor(r){super({name:"NotAuthorizedException",$fault:"client",...r});this.name="NotAuthorizedException",this.$fault="client",Object.setPrototypeOf(this,dI.prototype)}}class OI extends j{constructor(r){super({name:"PriorRequestNotComplete",$fault:"client",...r});this.name="PriorRequestNotComplete",this.$fault="client",Object.setPrototypeOf(this,OI.prototype)}}class cI extends j{constructor(r){super({name:"PublicZoneVPCAssociation",$fault:"client",...r});this.name="PublicZoneVPCAssociation",this.$fault="client",Object.setPrototypeOf(this,cI.prototype)}}class bI extends j{constructor(r){super({name:"CidrBlockInUseException",$fault:"client",...r});this.name="CidrBlockInUseException",this.$fault="client",Object.setPrototypeOf(this,bI.prototype),this.Message=r.Message}}class gI extends j{constructor(r){super({name:"CidrCollectionVersionMismatchException",$fault:"client",...r});this.name="CidrCollectionVersionMismatchException",this.$fault="client",Object.setPrototypeOf(this,gI.prototype),this.Message=r.Message}}class _I extends j{constructor(r){super({name:"NoSuchCidrCollectionException",$fault:"client",...r});this.name="NoSuchCidrCollectionException",this.$fault="client",Object.setPrototypeOf(this,_I.prototype),this.Message=r.Message}}class xI extends j{constructor(r){super({name:"InvalidChangeBatch",$fault:"client",...r});this.name="InvalidChangeBatch",this.$fault="client",Object.setPrototypeOf(this,xI.prototype),this.messages=r.messages}}class eI extends j{constructor(r){super({name:"NoSuchHealthCheck",$fault:"client",...r});this.name="NoSuchHealthCheck",this.$fault="client",Object.setPrototypeOf(this,eI.prototype)}}class nI extends j{constructor(r){super({name:"ThrottlingException",$fault:"client",...r});this.name="ThrottlingException",this.$fault="client",Object.setPrototypeOf(this,nI.prototype)}}class oI extends j{constructor(r){super({name:"CidrCollectionAlreadyExistsException",$fault:"client",...r});this.name="CidrCollectionAlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,oI.prototype),this.Message=r.Message}}class aI extends j{constructor(r){super({name:"HealthCheckAlreadyExists",$fault:"client",...r});this.name="HealthCheckAlreadyExists",this.$fault="client",Object.setPrototypeOf(this,aI.prototype)}}class pI extends j{constructor(r){super({name:"TooManyHealthChecks",$fault:"client",...r});this.name="TooManyHealthChecks",this.$fault="client",Object.setPrototypeOf(this,pI.prototype)}}class uI extends j{constructor(r){super({name:"DelegationSetNotAvailable",$fault:"client",...r});this.name="DelegationSetNotAvailable",this.$fault="client",Object.setPrototypeOf(this,uI.prototype)}}class tI extends j{constructor(r){super({name:"DelegationSetNotReusable",$fault:"client",...r});this.name="DelegationSetNotReusable",this.$fault="client",Object.setPrototypeOf(this,tI.prototype)}}class r2 extends j{constructor(r){super({name:"HostedZoneAlreadyExists",$fault:"client",...r});this.name="HostedZoneAlreadyExists",this.$fault="client",Object.setPrototypeOf(this,r2.prototype)}}class s2 extends j{constructor(r){super({name:"InvalidDomainName",$fault:"client",...r});this.name="InvalidDomainName",this.$fault="client",Object.setPrototypeOf(this,s2.prototype)}}class f2 extends j{constructor(r){super({name:"NoSuchDelegationSet",$fault:"client",...r});this.name="NoSuchDelegationSet",this.$fault="client",Object.setPrototypeOf(this,f2.prototype)}}class w2 extends j{constructor(r){super({name:"TooManyHostedZones",$fault:"client",...r});this.name="TooManyHostedZones",this.$fault="client",Object.setPrototypeOf(this,w2.prototype)}}class h2 extends j{constructor(r){super({name:"InvalidArgument",$fault:"client",...r});this.name="InvalidArgument",this.$fault="client",Object.setPrototypeOf(this,h2.prototype)}}class $2 extends j{constructor(r){super({name:"InvalidKeySigningKeyName",$fault:"client",...r});this.name="InvalidKeySigningKeyName",this.$fault="client",Object.setPrototypeOf(this,$2.prototype)}}class E2 extends j{constructor(r){super({name:"KeySigningKeyAlreadyExists",$fault:"client",...r});this.name="KeySigningKeyAlreadyExists",this.$fault="client",Object.setPrototypeOf(this,E2.prototype)}}class I2 extends j{constructor(r){super({name:"TooManyKeySigningKeys",$fault:"client",...r});this.name="TooManyKeySigningKeys",this.$fault="client",Object.setPrototypeOf(this,I2.prototype)}}class F2 extends j{constructor(r){super({name:"InsufficientCloudWatchLogsResourcePolicy",$fault:"client",...r});this.name="InsufficientCloudWatchLogsResourcePolicy",this.$fault="client",Object.setPrototypeOf(this,F2.prototype)}}class U2 extends j{constructor(r){super({name:"NoSuchCloudWatchLogsLogGroup",$fault:"client",...r});this.name="NoSuchCloudWatchLogsLogGroup",this.$fault="client",Object.setPrototypeOf(this,U2.prototype)}}class T2 extends j{constructor(r){super({name:"QueryLoggingConfigAlreadyExists",$fault:"client",...r});this.name="QueryLoggingConfigAlreadyExists",this.$fault="client",Object.setPrototypeOf(this,T2.prototype)}}class G2 extends j{constructor(r){super({name:"DelegationSetAlreadyCreated",$fault:"client",...r});this.name="DelegationSetAlreadyCreated",this.$fault="client",Object.setPrototypeOf(this,G2.prototype)}}class C2 extends j{constructor(r){super({name:"DelegationSetAlreadyReusable",$fault:"client",...r});this.name="DelegationSetAlreadyReusable",this.$fault="client",Object.setPrototypeOf(this,C2.prototype)}}class L2 extends j{constructor(r){super({name:"HostedZoneNotFound",$fault:"client",...r});this.name="HostedZoneNotFound",this.$fault="client",Object.setPrototypeOf(this,L2.prototype)}}class A2 extends j{constructor(r){super({name:"InvalidTrafficPolicyDocument",$fault:"client",...r});this.name="InvalidTrafficPolicyDocument",this.$fault="client",Object.setPrototypeOf(this,A2.prototype)}}class W2 extends j{constructor(r){super({name:"TooManyTrafficPolicies",$fault:"client",...r});this.name="TooManyTrafficPolicies",this.$fault="client",Object.setPrototypeOf(this,W2.prototype)}}class R2 extends j{constructor(r){super({name:"TrafficPolicyAlreadyExists",$fault:"client",...r});this.name="TrafficPolicyAlreadyExists",this.$fault="client",Object.setPrototypeOf(this,R2.prototype)}}class z2 extends j{constructor(r){super({name:"NoSuchTrafficPolicy",$fault:"client",...r});this.name="NoSuchTrafficPolicy",this.$fault="client",Object.setPrototypeOf(this,z2.prototype)}}class S2 extends j{constructor(r){super({name:"TooManyTrafficPolicyInstances",$fault:"client",...r});this.name="TooManyTrafficPolicyInstances",this.$fault="client",Object.setPrototypeOf(this,S2.prototype)}}class P2 extends j{constructor(r){super({name:"TrafficPolicyInstanceAlreadyExists",$fault:"client",...r});this.name="TrafficPolicyInstanceAlreadyExists",this.$fault="client",Object.setPrototypeOf(this,P2.prototype)}}class X2 extends j{constructor(r){super({name:"TooManyTrafficPolicyVersionsForCurrentPolicy",$fault:"client",...r});this.name="TooManyTrafficPolicyVersionsForCurrentPolicy",this.$fault="client",Object.setPrototypeOf(this,X2.prototype)}}class Y2 extends j{constructor(r){super({name:"TooManyVPCAssociationAuthorizations",$fault:"client",...r});this.name="TooManyVPCAssociationAuthorizations",this.$fault="client",Object.setPrototypeOf(this,Y2.prototype)}}class K2 extends j{constructor(r){super({name:"KeySigningKeyInParentDSRecord",$fault:"client",...r});this.name="KeySigningKeyInParentDSRecord",this.$fault="client",Object.setPrototypeOf(this,K2.prototype)}}class Z2 extends j{constructor(r){super({name:"KeySigningKeyInUse",$fault:"client",...r});this.name="KeySigningKeyInUse",this.$fault="client",Object.setPrototypeOf(this,Z2.prototype)}}class J2 extends j{constructor(r){super({name:"CidrCollectionInUseException",$fault:"client",...r});this.name="CidrCollectionInUseException",this.$fault="client",Object.setPrototypeOf(this,J2.prototype),this.Message=r.Message}}class Q2 extends j{constructor(r){super({name:"HealthCheckInUse",$fault:"client",...r});this.name="HealthCheckInUse",this.$fault="client",Object.setPrototypeOf(this,Q2.prototype)}}class M2 extends j{constructor(r){super({name:"HostedZoneNotEmpty",$fault:"client",...r});this.name="HostedZoneNotEmpty",this.$fault="client",Object.setPrototypeOf(this,M2.prototype)}}class B2 extends j{constructor(r){super({name:"NoSuchQueryLoggingConfig",$fault:"client",...r});this.name="NoSuchQueryLoggingConfig",this.$fault="client",Object.setPrototypeOf(this,B2.prototype)}}class l2 extends j{constructor(r){super({name:"DelegationSetInUse",$fault:"client",...r});this.name="DelegationSetInUse",this.$fault="client",Object.setPrototypeOf(this,l2.prototype)}}class H2 extends j{constructor(r){super({name:"TrafficPolicyInUse",$fault:"client",...r});this.name="TrafficPolicyInUse",this.$fault="client",Object.setPrototypeOf(this,H2.prototype)}}class V2 extends j{constructor(r){super({name:"NoSuchTrafficPolicyInstance",$fault:"client",...r});this.name="NoSuchTrafficPolicyInstance",this.$fault="client",Object.setPrototypeOf(this,V2.prototype)}}class D2 extends j{constructor(r){super({name:"VPCAssociationAuthorizationNotFound",$fault:"client",...r});this.name="VPCAssociationAuthorizationNotFound",this.$fault="client",Object.setPrototypeOf(this,D2.prototype)}}class k2 extends j{constructor(r){super({name:"DNSSECNotFound",$fault:"client",...r});this.name="DNSSECNotFound",this.$fault="client",Object.setPrototypeOf(this,k2.prototype)}}class y2 extends j{constructor(r){super({name:"LastVPCAssociation",$fault:"client",...r});this.name="LastVPCAssociation",this.$fault="client",Object.setPrototypeOf(this,y2.prototype)}}class N2 extends j{constructor(r){super({name:"VPCAssociationNotFound",$fault:"client",...r});this.name="VPCAssociationNotFound",this.$fault="client",Object.setPrototypeOf(this,N2.prototype)}}class m2 extends j{constructor(r){super({name:"HostedZonePartiallyDelegated",$fault:"client",...r});this.name="HostedZonePartiallyDelegated",this.$fault="client",Object.setPrototypeOf(this,m2.prototype)}}class i2 extends j{constructor(r){super({name:"KeySigningKeyWithActiveStatusNotFound",$fault:"client",...r});this.name="KeySigningKeyWithActiveStatusNotFound",this.$fault="client",Object.setPrototypeOf(this,i2.prototype)}}class q2 extends j{constructor(r){super({name:"NoSuchChange",$fault:"client",...r});this.name="NoSuchChange",this.$fault="client",Object.setPrototypeOf(this,q2.prototype)}}class v2 extends j{constructor(r){super({name:"NoSuchGeoLocation",$fault:"client",...r});this.name="NoSuchGeoLocation",this.$fault="client",Object.setPrototypeOf(this,v2.prototype)}}class j2 extends j{constructor(r){super({name:"IncompatibleVersion",$fault:"client",...r});this.name="IncompatibleVersion",this.$fault="client",Object.setPrototypeOf(this,j2.prototype)}}class d2 extends j{constructor(r){super({name:"HostedZoneNotPrivate",$fault:"client",...r});this.name="HostedZoneNotPrivate",this.$fault="client",Object.setPrototypeOf(this,d2.prototype)}}class O2 extends j{constructor(r){super({name:"NoSuchCidrLocationException",$fault:"client",...r});this.name="NoSuchCidrLocationException",this.$fault="client",Object.setPrototypeOf(this,O2.prototype),this.Message=r.Message}}class c2 extends j{constructor(r){super({name:"InvalidPaginationToken",$fault:"client",...r});this.name="InvalidPaginationToken",this.$fault="client",Object.setPrototypeOf(this,c2.prototype)}}class b2 extends j{constructor(r){super({name:"HealthCheckVersionMismatch",$fault:"client",...r});this.name="HealthCheckVersionMismatch",this.$fault="client",Object.setPrototypeOf(this,b2.prototype)}}class g2 extends j{constructor(r){super({name:"ConflictingTypes",$fault:"client",...r});this.name="ConflictingTypes",this.$fault="client",Object.setPrototypeOf(this,g2.prototype)}}var UB=async(r,f)=>{const s=c.requestBuilder(r,f),w={};s.bp("/2013-04-01/keysigningkey/{HostedZoneId}/{Name}/activate"),s.p("HostedZoneId",()=>r.HostedZoneId,"{HostedZoneId}",!1),s.p("Name",()=>r.Name,"{Name}",!1);let h;return s.m("POST").h(w).b(h),s.build()},TB=async(r,f)=>{const s=c.requestBuilder(r,f),w={"content-type":"application/xml"};s.bp("/2013-04-01/hostedzone/{HostedZoneId}/associatevpc"),s.p("HostedZoneId",()=>r.HostedZoneId,"{HostedZoneId}",!1);let h;h=Hr;const $=new V(Ba);if($.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Fr]!=null)$.c(V.of(Ma,r[Fr]).n(Fr));if(r[Ar]!=null)$.c(a$(r[Ar],f).n(Ar));return h+=$.toString(),s.m("POST").h(w).b(h),s.build()},GB=async(r,f)=>{const s=c.requestBuilder(r,f),w={"content-type":"application/xml"};s.bp("/2013-04-01/cidrcollection/{Id}"),s.p("Id",()=>r.Id,"{Id}",!1);let h;h=Hr;const $=new V(Da);if($.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),$.lc(r,"Changes","Changes",()=>Co(r[pH],f)),r[_2]!=null)$.c(V.of(_2,String(r[_2])).n(_2));return h+=$.toString(),s.m("POST").h(w).b(h),s.build()},CB=async(r,f)=>{const s=c.requestBuilder(r,f),w={"content-type":"application/xml"};s.bp("/2013-04-01/hostedzone/{HostedZoneId}/rrset"),s.p("HostedZoneId",()=>r.HostedZoneId,"{HostedZoneId}",!1);let h;h=Hr;const $=new V(ba);if($.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[e2]!=null)$.c(Uo(r[e2],f).n(e2));return h+=$.toString(),s.m("POST").h(w).b(h),s.build()},LB=async(r,f)=>{const s=c.requestBuilder(r,f),w={"content-type":"application/xml"};s.bp("/2013-04-01/tags/{ResourceType}/{ResourceId}"),s.p("ResourceType",()=>r.ResourceType,"{ResourceType}",!1),s.p("ResourceId",()=>r.ResourceId,"{ResourceId}",!1);let h;h=Hr;const $=new V(ga);return $.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),$.lc(r,"AddTags","AddTags",()=>Mo(r[Qa],f)),$.lc(r,"RemoveTagKeys","RemoveTagKeys",()=>Qo(r[Xp],f)),h+=$.toString(),s.m("POST").h(w).b(h),s.build()},AB=async(r,f)=>{const s=c.requestBuilder(r,f),w={"content-type":"application/xml"};s.bp("/2013-04-01/cidrcollection");let h;h=Hr;const $=new V(ka);if($.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Sr]!=null)$.c(V.of(ja,r[Sr]).n(Sr));if(r[n]!=null)$.c(V.of(da,r[n]).n(n));return h+=$.toString(),s.m("POST").h(w).b(h),s.build()},WB=async(r,f)=>{const s=c.requestBuilder(r,f),w={"content-type":"application/xml"};s.bp("/2013-04-01/healthcheck");let h;h=Hr;const $=new V(ya);if($.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Sr]!=null)$.c(V.of(hp,r[Sr]).n(Sr));if(r[bw]!=null)$.c(So(r[bw],f).n(bw));return h+=$.toString(),s.m("POST").h(w).b(h),s.build()},RB=async(r,f)=>{const s=c.requestBuilder(r,f),w={"content-type":"application/xml"};s.bp("/2013-04-01/hostedzone");let h;h=Hr;const $=new V(Na);if($.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Sr]!=null)$.c(V.of(o6,r[Sr]).n(Sr));if(r[o2]!=null)$.c(V.of(w0,r[o2]).n(o2));if(r[a2]!=null)$.c(Po(r[a2],f).n(a2));if(r[n]!=null)$.c(V.of(Cf,r[n]).n(n));if(r[Ar]!=null)$.c(a$(r[Ar],f).n(Ar));return h+=$.toString(),s.m("POST").h(w).b(h),s.build()},zB=async(r,f)=>{const s=c.requestBuilder(r,f),w={"content-type":"application/xml"};s.bp("/2013-04-01/keysigningkey");let h;h=Hr;const $=new V(ma);if($.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Sr]!=null)$.c(V.of(o6,r[Sr]).n(Sr));if(r[rr]!=null)$.c(V.of(w0,r[rr]).n(rr));if(r[I6]!=null)$.c(V.of(Jp,r[I6]).n(I6));if(r[n]!=null)$.c(V.of(Zp,r[n]).n(n));if(r[hs]!=null)$.c(V.of(Qp,r[hs]).n(hs));return h+=$.toString(),s.m("POST").h(w).b(h),s.build()},SB=async(r,f)=>{const s=c.requestBuilder(r,f),w={"content-type":"application/xml"};s.bp("/2013-04-01/queryloggingconfig");let h;h=Hr;const $=new V(Oa);if($.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),$.cc(r,n2),r[rr]!=null)$.c(V.of(w0,r[rr]).n(rr));return h+=$.toString(),s.m("POST").h(w).b(h),s.build()},PB=async(r,f)=>{const s=c.requestBuilder(r,f),w={"content-type":"application/xml"};s.bp("/2013-04-01/delegationset");let h;h=Hr;const $=new V(ca);if($.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Sr]!=null)$.c(V.of(o6,r[Sr]).n(Sr));if(r[rr]!=null)$.c(V.of(w0,r[rr]).n(rr));return h+=$.toString(),s.m("POST").h(w).b(h),s.build()},XB=async(r,f)=>{const s=c.requestBuilder(r,f),w={"content-type":"application/xml"};s.bp("/2013-04-01/trafficpolicy");let h;h=Hr;const $=new V(xa);if($.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Fr]!=null)$.c(V.of(p6,r[Fr]).n(Fr));if(r[Q0]!=null)$.c(V.of(rV,r[Q0]).n(Q0));if(r[n]!=null)$.c(V.of(Vp,r[n]).n(n));return h+=$.toString(),s.m("POST").h(w).b(h),s.build()},YB=async(r,f)=>{const s=c.requestBuilder(r,f),w={"content-type":"application/xml"};s.bp("/2013-04-01/trafficpolicyinstance");let h;h=Hr;const $=new V(_a);if($.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[rr]!=null)$.c(V.of(w0,r[rr]).n(rr));if(r[n]!=null)$.c(V.of(Cf,r[n]).n(n));if(r[qr]!=null)$.c(V.of(qr,String(r[qr])).n(qr));if($.cc(r,s1),r[ds]!=null)$.c(V.of(ds,String(r[ds])).n(ds));return h+=$.toString(),s.m("POST").h(w).b(h),s.build()},KB=async(r,f)=>{const s=c.requestBuilder(r,f),w={"content-type":"application/xml"};s.bp("/2013-04-01/trafficpolicy/{Id}"),s.p("Id",()=>r.Id,"{Id}",!1);let h;h=Hr;const $=new V(ea);if($.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Fr]!=null)$.c(V.of(p6,r[Fr]).n(Fr));if(r[Q0]!=null)$.c(V.of(rV,r[Q0]).n(Q0));return h+=$.toString(),s.m("POST").h(w).b(h),s.build()},ZB=async(r,f)=>{const s=c.requestBuilder(r,f),w={"content-type":"application/xml"};s.bp("/2013-04-01/hostedzone/{HostedZoneId}/authorizevpcassociation"),s.p("HostedZoneId",()=>r.HostedZoneId,"{HostedZoneId}",!1);let h;h=Hr;const $=new V(na);if($.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Ar]!=null)$.c(a$(r[Ar],f).n(Ar));return h+=$.toString(),s.m("POST").h(w).b(h),s.build()},JB=async(r,f)=>{const s=c.requestBuilder(r,f),w={};s.bp("/2013-04-01/keysigningkey/{HostedZoneId}/{Name}/deactivate"),s.p("HostedZoneId",()=>r.HostedZoneId,"{HostedZoneId}",!1),s.p("Name",()=>r.Name,"{Name}",!1);let h;return s.m("POST").h(w).b(h),s.build()},QB=async(r,f)=>{const s=c.requestBuilder(r,f),w={};s.bp("/2013-04-01/cidrcollection/{Id}"),s.p("Id",()=>r.Id,"{Id}",!1);let h;return s.m("DELETE").h(w).b(h),s.build()},MB=async(r,f)=>{const s=c.requestBuilder(r,f),w={};s.bp("/2013-04-01/healthcheck/{HealthCheckId}"),s.p("HealthCheckId",()=>r.HealthCheckId,"{HealthCheckId}",!1);let h;return s.m("DELETE").h(w).b(h),s.build()},BB=async(r,f)=>{const s=c.requestBuilder(r,f),w={};s.bp("/2013-04-01/hostedzone/{Id}"),s.p("Id",()=>r.Id,"{Id}",!1);let h;return s.m("DELETE").h(w).b(h),s.build()},lB=async(r,f)=>{const s=c.requestBuilder(r,f),w={};s.bp("/2013-04-01/keysigningkey/{HostedZoneId}/{Name}"),s.p("HostedZoneId",()=>r.HostedZoneId,"{HostedZoneId}",!1),s.p("Name",()=>r.Name,"{Name}",!1);let h;return s.m("DELETE").h(w).b(h),s.build()},HB=async(r,f)=>{const s=c.requestBuilder(r,f),w={};s.bp("/2013-04-01/queryloggingconfig/{Id}"),s.p("Id",()=>r.Id,"{Id}",!1);let h;return s.m("DELETE").h(w).b(h),s.build()},VB=async(r,f)=>{const s=c.requestBuilder(r,f),w={};s.bp("/2013-04-01/delegationset/{Id}"),s.p("Id",()=>r.Id,"{Id}",!1);let h;return s.m("DELETE").h(w).b(h),s.build()},DB=async(r,f)=>{const s=c.requestBuilder(r,f),w={};s.bp("/2013-04-01/trafficpolicy/{Id}/{Version}"),s.p("Id",()=>r.Id,"{Id}",!1),s.p("Version",()=>r.Version.toString(),"{Version}",!1);let h;return s.m("DELETE").h(w).b(h),s.build()},kB=async(r,f)=>{const s=c.requestBuilder(r,f),w={};s.bp("/2013-04-01/trafficpolicyinstance/{Id}"),s.p("Id",()=>r.Id,"{Id}",!1);let h;return s.m("DELETE").h(w).b(h),s.build()},yB=async(r,f)=>{const s=c.requestBuilder(r,f),w={"content-type":"application/xml"};s.bp("/2013-04-01/hostedzone/{HostedZoneId}/deauthorizevpcassociation"),s.p("HostedZoneId",()=>r.HostedZoneId,"{HostedZoneId}",!1);let h;h=Hr;const $=new V(aa);if($.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Ar]!=null)$.c(a$(r[Ar],f).n(Ar));return h+=$.toString(),s.m("POST").h(w).b(h),s.build()},NB=async(r,f)=>{const s=c.requestBuilder(r,f),w={};s.bp("/2013-04-01/hostedzone/{HostedZoneId}/disable-dnssec"),s.p("HostedZoneId",()=>r.HostedZoneId,"{HostedZoneId}",!1);let h;return s.m("POST").h(w).b(h),s.build()},mB=async(r,f)=>{const s=c.requestBuilder(r,f),w={"content-type":"application/xml"};s.bp("/2013-04-01/hostedzone/{HostedZoneId}/disassociatevpc"),s.p("HostedZoneId",()=>r.HostedZoneId,"{HostedZoneId}",!1);let h;h=Hr;const $=new V(ua);if($.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Fr]!=null)$.c(V.of(pa,r[Fr]).n(Fr));if(r[Ar]!=null)$.c(a$(r[Ar],f).n(Ar));return h+=$.toString(),s.m("POST").h(w).b(h),s.build()},iB=async(r,f)=>{const s=c.requestBuilder(r,f),w={};s.bp("/2013-04-01/hostedzone/{HostedZoneId}/enable-dnssec"),s.p("HostedZoneId",()=>r.HostedZoneId,"{HostedZoneId}",!1);let h;return s.m("POST").h(w).b(h),s.build()},qB=async(r,f)=>{const s=c.requestBuilder(r,f),w={};s.bp("/2013-04-01/accountlimit/{Type}"),s.p("Type",()=>r.Type,"{Type}",!1);let h;return s.m("GET").h(w).b(h),s.build()},vB=async(r,f)=>{const s=c.requestBuilder(r,f),w={};s.bp("/2013-04-01/change/{Id}"),s.p("Id",()=>r.Id,"{Id}",!1);let h;return s.m("GET").h(w).b(h),s.build()},jB=async(r,f)=>{const s=c.requestBuilder(r,f),w={};s.bp("/2013-04-01/checkeripranges");let h;return s.m("GET").h(w).b(h),s.build()},dB=async(r,f)=>{const s=c.requestBuilder(r,f),w={};s.bp("/2013-04-01/hostedzone/{HostedZoneId}/dnssec"),s.p("HostedZoneId",()=>r.HostedZoneId,"{HostedZoneId}",!1);let h;return s.m("GET").h(w).b(h),s.build()},OB=async(r,f)=>{const s=c.requestBuilder(r,f),w={};s.bp("/2013-04-01/geolocation");const h=P({[vp]:[,r[s0]],[jp]:[,r[f0]],[ap]:[,r[h0]]});let $;return s.m("GET").h(w).q(h).b($),s.build()},cB=async(r,f)=>{const s=c.requestBuilder(r,f),w={};s.bp("/2013-04-01/healthcheck/{HealthCheckId}"),s.p("HealthCheckId",()=>r.HealthCheckId,"{HealthCheckId}",!1);let h;return s.m("GET").h(w).b(h),s.build()},bB=async(r,f)=>{const s=c.requestBuilder(r,f),w={};s.bp("/2013-04-01/healthcheckcount");let h;return s.m("GET").h(w).b(h),s.build()},gB=async(r,f)=>{const s=c.requestBuilder(r,f),w={};s.bp("/2013-04-01/healthcheck/{HealthCheckId}/lastfailurereason"),s.p("HealthCheckId",()=>r.HealthCheckId,"{HealthCheckId}",!1);let h;return s.m("GET").h(w).b(h),s.build()},_B=async(r,f)=>{const s=c.requestBuilder(r,f),w={};s.bp("/2013-04-01/healthcheck/{HealthCheckId}/status"),s.p("HealthCheckId",()=>r.HealthCheckId,"{HealthCheckId}",!1);let h;return s.m("GET").h(w).b(h),s.build()},xB=async(r,f)=>{const s=c.requestBuilder(r,f),w={};s.bp("/2013-04-01/hostedzone/{Id}"),s.p("Id",()=>r.Id,"{Id}",!1);let h;return s.m("GET").h(w).b(h),s.build()},eB=async(r,f)=>{const s=c.requestBuilder(r,f),w={};s.bp("/2013-04-01/hostedzonecount");let h;return s.m("GET").h(w).b(h),s.build()},nB=async(r,f)=>{const s=c.requestBuilder(r,f),w={};s.bp("/2013-04-01/hostedzonelimit/{HostedZoneId}/{Type}"),s.p("Type",()=>r.Type,"{Type}",!1),s.p("HostedZoneId",()=>r.HostedZoneId,"{HostedZoneId}",!1);let h;return s.m("GET").h(w).b(h),s.build()},oB=async(r,f)=>{const s=c.requestBuilder(r,f),w={};s.bp("/2013-04-01/queryloggingconfig/{Id}"),s.p("Id",()=>r.Id,"{Id}",!1);let h;return s.m("GET").h(w).b(h),s.build()},aB=async(r,f)=>{const s=c.requestBuilder(r,f),w={};s.bp("/2013-04-01/delegationset/{Id}"),s.p("Id",()=>r.Id,"{Id}",!1);let h;return s.m("GET").h(w).b(h),s.build()},pB=async(r,f)=>{const s=c.requestBuilder(r,f),w={};s.bp("/2013-04-01/reusabledelegationsetlimit/{DelegationSetId}/{Type}"),s.p("Type",()=>r.Type,"{Type}",!1),s.p("DelegationSetId",()=>r.DelegationSetId,"{DelegationSetId}",!1);let h;return s.m("GET").h(w).b(h),s.build()},uB=async(r,f)=>{const s=c.requestBuilder(r,f),w={};s.bp("/2013-04-01/trafficpolicy/{Id}/{Version}"),s.p("Id",()=>r.Id,"{Id}",!1),s.p("Version",()=>r.Version.toString(),"{Version}",!1);let h;return s.m("GET").h(w).b(h),s.build()},tB=async(r,f)=>{const s=c.requestBuilder(r,f),w={};s.bp("/2013-04-01/trafficpolicyinstance/{Id}"),s.p("Id",()=>r.Id,"{Id}",!1);let h;return s.m("GET").h(w).b(h),s.build()},rl=async(r,f)=>{const s=c.requestBuilder(r,f),w={};s.bp("/2013-04-01/trafficpolicyinstancecount");let h;return s.m("GET").h(w).b(h),s.build()},sl=async(r,f)=>{const s=c.requestBuilder(r,f),w={};s.bp("/2013-04-01/cidrcollection/{CollectionId}/cidrblocks"),s.p("CollectionId",()=>r.CollectionId,"{CollectionId}",!1);const h=P({[$0]:[,r[ar]],[w1]:[,r[Pr]],[sE]:[()=>r.MaxResults!==void 0,()=>r[t$].toString()]});let $;return s.m("GET").h(w).q(h).b($),s.build()},fl=async(r,f)=>{const s=c.requestBuilder(r,f),w={};s.bp("/2013-04-01/cidrcollection");const h=P({[w1]:[,r[Pr]],[sE]:[()=>r.MaxResults!==void 0,()=>r[t$].toString()]});let $;return s.m("GET").h(w).q(h).b($),s.build()},wl=async(r,f)=>{const s=c.requestBuilder(r,f),w={};s.bp("/2013-04-01/cidrcollection/{CollectionId}"),s.p("CollectionId",()=>r.CollectionId,"{CollectionId}",!1);const h=P({[w1]:[,r[Pr]],[sE]:[()=>r.MaxResults!==void 0,()=>r[t$].toString()]});let $;return s.m("GET").h(w).q(h).b($),s.build()},hl=async(r,f)=>{const s=c.requestBuilder(r,f),w={};s.bp("/2013-04-01/geolocations");const h=P({[pp]:[,r[Yp]],[up]:[,r[Kp]],[tp]:[,r[Hp]],[_s]:[()=>r.MaxItems!==void 0,()=>r[a].toString()]});let $;return s.m("GET").h(w).q(h).b($),s.build()},$l=async(r,f)=>{const s=c.requestBuilder(r,f),w={};s.bp("/2013-04-01/healthcheck");const h=P({[u6]:[,r[Os]],[_s]:[()=>r.MaxItems!==void 0,()=>r[a].toString()]});let $;return s.m("GET").h(w).q(h).b($),s.build()},El=async(r,f)=>{const s=c.requestBuilder(r,f),w={};s.bp("/2013-04-01/hostedzone");const h=P({[u6]:[,r[Os]],[_s]:[()=>r.MaxItems!==void 0,()=>r[a].toString()],[dp]:[,r[o2]],[gp]:[,r[Ip]]});let $;return s.m("GET").h(w).q(h).b($),s.build()},Il=async(r,f)=>{const s=c.requestBuilder(r,f),w={};s.bp("/2013-04-01/hostedzonesbyname");const h=P({[Op]:[,r[Cf]],[rE]:[,r[rr]],[_s]:[()=>r.MaxItems!==void 0,()=>r[a].toString()]});let $;return s.m("GET").h(w).q(h).b($),s.build()},Fl=async(r,f)=>{const s=c.requestBuilder(r,f),w={};s.bp("/2013-04-01/hostedzonesbyvpc");const h=P({[wu]:[,N(r[n$],"VPCId")],[$u]:[,N(r[o$],"VPCRegion")],[_s]:[()=>r.MaxItems!==void 0,()=>r[a].toString()],[w1]:[,r[Pr]]});let $;return s.m("GET").h(w).q(h).b($),s.build()},Ul=async(r,f)=>{const s=c.requestBuilder(r,f),w={};s.bp("/2013-04-01/queryloggingconfig");const h=P({[rE]:[,r[rr]],[w1]:[,r[Pr]],[sE]:[()=>r.MaxResults!==void 0,()=>r[t$].toString()]});let $;return s.m("GET").h(w).q(h).b($),s.build()},Tl=async(r,f)=>{const s=c.requestBuilder(r,f),w={};s.bp("/2013-04-01/hostedzone/{HostedZoneId}/rrset"),s.p("HostedZoneId",()=>r.HostedZoneId,"{HostedZoneId}",!1);const h=P({[xp]:[,r[Bp]],[ru]:[,r[lp]],[_p]:[,r[Mp]],[_s]:[()=>r.MaxItems!==void 0,()=>r[a].toString()]});let $;return s.m("GET").h(w).q(h).b($),s.build()},Gl=async(r,f)=>{const s=c.requestBuilder(r,f),w={};s.bp("/2013-04-01/delegationset");const h=P({[u6]:[,r[Os]],[_s]:[()=>r.MaxItems!==void 0,()=>r[a].toString()]});let $;return s.m("GET").h(w).q(h).b($),s.build()},Cl=async(r,f)=>{const s=c.requestBuilder(r,f),w={};s.bp("/2013-04-01/tags/{ResourceType}/{ResourceId}"),s.p("ResourceType",()=>r.ResourceType,"{ResourceType}",!1),s.p("ResourceId",()=>r.ResourceId,"{ResourceId}",!1);let h;return s.m("GET").h(w).b(h),s.build()},Ll=async(r,f)=>{const s=c.requestBuilder(r,f),w={"content-type":"application/xml"};s.bp("/2013-04-01/tags/{ResourceType}"),s.p("ResourceType",()=>r.ResourceType,"{ResourceType}",!1);let h;h=Hr;const $=new V(Up);return $.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),$.lc(r,"ResourceIds","ResourceIds",()=>Bo(r[Lp],f)),h+=$.toString(),s.m("POST").h(w).b(h),s.build()},Al=async(r,f)=>{const s=c.requestBuilder(r,f),w={};s.bp("/2013-04-01/trafficpolicies");const h=P({[su]:[,r[hF]],[_s]:[()=>r.MaxItems!==void 0,()=>r[a].toString()]});let $;return s.m("GET").h(w).q(h).b($),s.build()},Wl=async(r,f)=>{const s=c.requestBuilder(r,f),w={};s.bp("/2013-04-01/trafficpolicyinstances");const h=P({[rE]:[,r[Iw]],[t6]:[,r[cs]],[r4]:[,r[bs]],[_s]:[()=>r.MaxItems!==void 0,()=>r[a].toString()]});let $;return s.m("GET").h(w).q(h).b($),s.build()},Rl=async(r,f)=>{const s=c.requestBuilder(r,f),w={};s.bp("/2013-04-01/trafficpolicyinstances/hostedzone");const h=P({[sV]:[,N(r[rr],"HostedZoneId")],[t6]:[,r[cs]],[r4]:[,r[bs]],[_s]:[()=>r.MaxItems!==void 0,()=>r[a].toString()]});let $;return s.m("GET").h(w).q(h).b($),s.build()},zl=async(r,f)=>{const s=c.requestBuilder(r,f),w={};s.bp("/2013-04-01/trafficpolicyinstances/trafficpolicy");const h=P({[sV]:[,N(r[s1],"TrafficPolicyId")],[hu]:[N(r.TrafficPolicyVersion,"TrafficPolicyVersion")!=null,()=>r[ds].toString()],[rE]:[,r[Iw]],[t6]:[,r[cs]],[r4]:[,r[bs]],[_s]:[()=>r.MaxItems!==void 0,()=>r[a].toString()]});let $;return s.m("GET").h(w).q(h).b($),s.build()},Sl=async(r,f)=>{const s=c.requestBuilder(r,f),w={};s.bp("/2013-04-01/trafficpolicies/{Id}/versions"),s.p("Id",()=>r.Id,"{Id}",!1);const h=P({[fu]:[,r[$F]],[_s]:[()=>r.MaxItems!==void 0,()=>r[a].toString()]});let $;return s.m("GET").h(w).q(h).b($),s.build()},Pl=async(r,f)=>{const s=c.requestBuilder(r,f),w={};s.bp("/2013-04-01/hostedzone/{HostedZoneId}/authorizevpcassociation"),s.p("HostedZoneId",()=>r.HostedZoneId,"{HostedZoneId}",!1);const h=P({[w1]:[,r[Pr]],[sE]:[()=>r.MaxResults!==void 0,()=>r[t$].toString()]});let $;return s.m("GET").h(w).q(h).b($),s.build()},Xl=async(r,f)=>{const s=c.requestBuilder(r,f),w={};s.bp("/2013-04-01/testdnsanswer");const h=P({[rE]:[,N(r[rr],"HostedZoneId")],[ep]:[,N(r[sF],"RecordName")],[np]:[,N(r[fF],"RecordType")],[op]:[,r[Cp]],[cp]:[,r[ta]],[bp]:[,r[rp]]});let $;return s.m("GET").h(w).q(h).b($),s.build()},Yl=async(r,f)=>{const s=c.requestBuilder(r,f),w={"content-type":"application/xml"};s.bp("/2013-04-01/healthcheck/{HealthCheckId}"),s.p("HealthCheckId",()=>r.HealthCheckId,"{HealthCheckId}",!1);let h;h=Hr;const $=new V(yp);if($.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[r0]!=null)$.c(OH(r[r0],f).n(r0));if($.lc(r,"ChildHealthChecks","ChildHealthChecks",()=>cH(r[kw],f)),r[Ef]!=null)$.c(V.of(Ef,String(r[Ef])).n(Ef));if(r[If]!=null)$.c(V.of(If,String(r[If])).n(If));if(r[Ff]!=null)$.c(V.of(Ff,String(r[Ff])).n(Ff));if($.cc(r,O$),r[mw]!=null)$.c(V.of(mw,String(r[mw])).n(mw));if(r[Uf]!=null)$.c(V.of(Uf,String(r[Uf])).n(Uf));if($.cc(r,Fw),$.cc(r,g$),r[Tf]!=null)$.c(V.of(Tf,String(r[Tf])).n(Tf));if(r[Gf]!=null)$.c(V.of(Gf,String(r[Gf])).n(Gf));return $.lc(r,"Regions","Regions",()=>bH(r[yw],f)),$.lc(r,"ResetElements","ResetElements",()=>Xo(r[Gp],f)),$.cc(r,_$),$.cc(r,e$),h+=$.toString(),s.m("POST").h(w).b(h),s.build()},Kl=async(r,f)=>{const s=c.requestBuilder(r,f),w={"content-type":"application/xml"};s.bp("/2013-04-01/hostedzone/{Id}"),s.p("Id",()=>r.Id,"{Id}",!1);let h;h=Hr;const $=new V(Np);if($.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Fr]!=null)$.c(V.of(a6,r[Fr]).n(Fr));return h+=$.toString(),s.m("POST").h(w).b(h),s.build()},Zl=async(r,f)=>{const s=c.requestBuilder(r,f),w={"content-type":"application/xml"};s.bp("/2013-04-01/trafficpolicy/{Id}/{Version}"),s.p("Id",()=>r.Id,"{Id}",!1),s.p("Version",()=>r.Version.toString(),"{Version}",!1);let h;h=Hr;const $=new V(mp);if($.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Fr]!=null)$.c(V.of(p6,r[Fr]).n(Fr));return h+=$.toString(),s.m("POST").h(w).b(h),s.build()},Jl=async(r,f)=>{const s=c.requestBuilder(r,f),w={"content-type":"application/xml"};s.bp("/2013-04-01/trafficpolicyinstance/{Id}"),s.p("Id",()=>r.Id,"{Id}",!1);let h;h=Hr;const $=new V(ip);if($.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[qr]!=null)$.c(V.of(qr,String(r[qr])).n(qr));if($.cc(r,s1),r[ds]!=null)$.c(V.of(ds,String(r[ds])).n(ds));return h+=$.toString(),s.m("POST").h(w).b(h),s.build()},Ql=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r)}),w=N(O(await _.parseXmlBody(r.body,f)),"body");if(w[fr]!=null)s[fr]=gs(w[fr],f);return s},Ml=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r)}),w=N(O(await _.parseXmlBody(r.body,f)),"body");if(w[fr]!=null)s[fr]=gs(w[fr],f);return s},Bl=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r)}),w=N(O(await _.parseXmlBody(r.body,f)),"body");if(w[Tr]!=null)s[Tr]=T(w[Tr]);return s},ll=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r)}),w=N(O(await _.parseXmlBody(r.body,f)),"body");if(w[fr]!=null)s[fr]=gs(w[fr],f);return s},Hl=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r)});return await _r(r.body,f),s},Vl=async(r,f)=>{if(r.statusCode!==201&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r),[H0]:[,r.headers[$0]]}),w=N(O(await _.parseXmlBody(r.body,f)),"body");if(w[nG]!=null)s[nG]=mo(w[nG],f);return s},Dl=async(r,f)=>{if(r.statusCode!==201&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r),[H0]:[,r.headers[$0]]}),w=N(O(await _.parseXmlBody(r.body,f)),"body");if(w[Lf]!=null)s[Lf]=UF(w[Lf],f);return s},kl=async(r,f)=>{if(r.statusCode!==201&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r),[H0]:[,r.headers[$0]]}),w=N(O(await _.parseXmlBody(r.body,f)),"body");if(w[fr]!=null)s[fr]=gs(w[fr],f);if(w[Gs]!=null)s[Gs]=p$(w[Gs],f);if(w[Ps]!=null)s[Ps]=TF(w[Ps],f);if(w[Ar]!=null)s[Ar]=n6(w[Ar],f);return s},yl=async(r,f)=>{if(r.statusCode!==201&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r),[H0]:[,r.headers[$0]]}),w=N(O(await _.parseXmlBody(r.body,f)),"body");if(w[fr]!=null)s[fr]=gs(w[fr],f);if(w[F6]!=null)s[F6]=eH(w[F6],f);return s},Nl=async(r,f)=>{if(r.statusCode!==201&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r),[H0]:[,r.headers[$0]]}),w=N(O(await _.parseXmlBody(r.body,f)),"body");if(w[Uw]!=null)s[Uw]=x6(w[Uw],f);return s},ml=async(r,f)=>{if(r.statusCode!==201&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r),[H0]:[,r.headers[$0]]}),w=N(O(await _.parseXmlBody(r.body,f)),"body");if(w[Gs]!=null)s[Gs]=p$(w[Gs],f);return s},il=async(r,f)=>{if(r.statusCode!==201&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r),[H0]:[,r.headers[$0]]}),w=N(O(await _.parseXmlBody(r.body,f)),"body");if(w[Cs]!=null)s[Cs]=u$(w[Cs],f);return s},ql=async(r,f)=>{if(r.statusCode!==201&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r),[H0]:[,r.headers[$0]]}),w=N(O(await _.parseXmlBody(r.body,f)),"body");if(w[$s]!=null)s[$s]=GF(w[$s],f);return s},vl=async(r,f)=>{if(r.statusCode!==201&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r),[H0]:[,r.headers[$0]]}),w=N(O(await _.parseXmlBody(r.body,f)),"body");if(w[Cs]!=null)s[Cs]=u$(w[Cs],f);return s},jl=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r)}),w=N(O(await _.parseXmlBody(r.body,f)),"body");if(w[rr]!=null)s[rr]=T(w[rr]);if(w[Ar]!=null)s[Ar]=n6(w[Ar],f);return s},dl=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r)}),w=N(O(await _.parseXmlBody(r.body,f)),"body");if(w[fr]!=null)s[fr]=gs(w[fr],f);return s},Ol=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r)});return await _r(r.body,f),s},cl=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r)});return await _r(r.body,f),s},bl=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r)}),w=N(O(await _.parseXmlBody(r.body,f)),"body");if(w[fr]!=null)s[fr]=gs(w[fr],f);return s},gl=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r)}),w=N(O(await _.parseXmlBody(r.body,f)),"body");if(w[fr]!=null)s[fr]=gs(w[fr],f);return s},_l=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r)});return await _r(r.body,f),s},xl=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r)});return await _r(r.body,f),s},el=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r)});return await _r(r.body,f),s},nl=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r)});return await _r(r.body,f),s},ol=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r)});return await _r(r.body,f),s},al=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r)}),w=N(O(await _.parseXmlBody(r.body,f)),"body");if(w[fr]!=null)s[fr]=gs(w[fr],f);return s},pl=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r)}),w=N(O(await _.parseXmlBody(r.body,f)),"body");if(w[fr]!=null)s[fr]=gs(w[fr],f);return s},ul=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r)}),w=N(O(await _.parseXmlBody(r.body,f)),"body");if(w[fr]!=null)s[fr]=gs(w[fr],f);return s},tl=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r)}),w=N(O(await _.parseXmlBody(r.body,f)),"body");if(w[J0]!=null)s[J0]=xr(w[J0]);if(w[M0]!=null)s[M0]=lo(w[M0],f);return s},rH=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r)}),w=N(O(await _.parseXmlBody(r.body,f)),"body");if(w[fr]!=null)s[fr]=gs(w[fr],f);return s},sH=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r)}),w=N(O(await _.parseXmlBody(r.body,f)),"body");if(w.CheckerIpRanges==="")s[J$]=[];else if(w[J$]!=null&&w[J$][Af]!=null)s[J$]=Do(Gr(w[J$][Af]),f);return s},fH=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r)}),w=N(O(await _.parseXmlBody(r.body,f)),"body");if(w.KeySigningKeys==="")s[D$]=[];else if(w[D$]!=null&&w[D$][Af]!=null)s[D$]=Ea(Gr(w[D$][Af]),f);if(w[hs]!=null)s[hs]=xo(w[hs],f);return s},wH=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r)}),w=N(O(await _.parseXmlBody(r.body,f)),"body");if(w[c$]!=null)s[c$]=gH(w[c$],f);return s},hH=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r)}),w=N(O(await _.parseXmlBody(r.body,f)),"body");if(w[Lf]!=null)s[Lf]=UF(w[Lf],f);return s},$H=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r)}),w=N(O(await _.parseXmlBody(r.body,f)),"body");if(w[h6]!=null)s[h6]=xr(w[h6]);return s},EH=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r)}),w=N(O(await _.parseXmlBody(r.body,f)),"body");if(w.HealthCheckObservations==="")s[pf]=[];else if(w[pf]!=null&&w[pf][EF]!=null)s[pf]=_H(Gr(w[pf][EF]),f);return s},IH=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r)}),w=N(O(await _.parseXmlBody(r.body,f)),"body");if(w.HealthCheckObservations==="")s[pf]=[];else if(w[pf]!=null&&w[pf][EF]!=null)s[pf]=_H(Gr(w[pf][EF]),f);return s},FH=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r)}),w=N(O(await _.parseXmlBody(r.body,f)),"body");if(w[Gs]!=null)s[Gs]=p$(w[Gs],f);if(w[Ps]!=null)s[Ps]=TF(w[Ps],f);if(w.VPCs==="")s[tf]=[];else if(w[tf]!=null&&w[tf][Ar]!=null)s[tf]=aH(Gr(w[tf][Ar]),f);return s},UH=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r)}),w=N(O(await _.parseXmlBody(r.body,f)),"body");if(w[$6]!=null)s[$6]=xr(w[$6]);return s},TH=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r)}),w=N(O(await _.parseXmlBody(r.body,f)),"body");if(w[J0]!=null)s[J0]=xr(w[J0]);if(w[M0]!=null)s[M0]=fa(w[M0],f);return s},GH=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r)}),w=N(O(await _.parseXmlBody(r.body,f)),"body");if(w[Uw]!=null)s[Uw]=x6(w[Uw],f);return s},CH=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r)}),w=N(O(await _.parseXmlBody(r.body,f)),"body");if(w[Gs]!=null)s[Gs]=p$(w[Gs],f);return s},LH=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r)}),w=N(O(await _.parseXmlBody(r.body,f)),"body");if(w[J0]!=null)s[J0]=xr(w[J0]);if(w[M0]!=null)s[M0]=Ra(w[M0],f);return s},AH=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r)}),w=N(O(await _.parseXmlBody(r.body,f)),"body");if(w[Cs]!=null)s[Cs]=u$(w[Cs],f);return s},WH=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r)}),w=N(O(await _.parseXmlBody(r.body,f)),"body");if(w[$s]!=null)s[$s]=GF(w[$s],f);return s},RH=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r)}),w=N(O(await _.parseXmlBody(r.body,f)),"body");if(w[c6]!=null)s[c6]=hr(w[c6]);return s},zH=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r)}),w=N(O(await _.parseXmlBody(r.body,f)),"body");if(w.CidrBlocks==="")s[K$]=[];else if(w[K$]!=null&&w[K$][Af]!=null)s[K$]=yo(Gr(w[K$][Af]),f);if(w[Pr]!=null)s[Pr]=T(w[Pr]);return s},SH=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r)}),w=N(O(await _.parseXmlBody(r.body,f)),"body");if(w.CidrCollections==="")s[Z$]=[];else if(w[Z$]!=null&&w[Z$][Af]!=null)s[Z$]=vo(Gr(w[Z$][Af]),f);if(w[Pr]!=null)s[Pr]=T(w[Pr]);return s},PH=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r)}),w=N(O(await _.parseXmlBody(r.body,f)),"body");if(w.CidrLocations==="")s[Q$]=[];else if(w[Q$]!=null&&w[Q$][Af]!=null)s[Q$]=Ia(Gr(w[Q$][Af]),f);if(w[Pr]!=null)s[Pr]=T(w[Pr]);return s},XH=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r)}),w=N(O(await _.parseXmlBody(r.body,f)),"body");if(w.GeoLocationDetailsList==="")s[l$]=[];else if(w[l$]!=null&&w[l$][c$]!=null)s[l$]=oo(Gr(w[l$][c$]),f);if(w[Ur]!=null)s[Ur]=Nr(w[Ur]);if(w[a]!=null)s[a]=hr(w[a]);if(w[L6]!=null)s[L6]=T(w[L6]);if(w[A6]!=null)s[A6]=T(w[A6]);if(w[X6]!=null)s[X6]=T(w[X6]);return s},YH=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r)}),w=N(O(await _.parseXmlBody(r.body,f)),"body");if(w.HealthChecks==="")s[H$]=[];else if(w[H$]!=null&&w[H$][Lf]!=null)s[H$]=ra(Gr(w[H$][Lf]),f);if(w[Ur]!=null)s[Ur]=Nr(w[Ur]);if(w[Os]!=null)s[Os]=T(w[Os]);if(w[a]!=null)s[a]=hr(w[a]);if(w[B0]!=null)s[B0]=T(w[B0]);return s},KH=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r)}),w=N(O(await _.parseXmlBody(r.body,f)),"body");if(w.HostedZones==="")s[uf]=[];else if(w[uf]!=null&&w[uf][Ps]!=null)s[uf]=xH(Gr(w[uf][Ps]),f);if(w[Ur]!=null)s[Ur]=Nr(w[Ur]);if(w[Os]!=null)s[Os]=T(w[Os]);if(w[a]!=null)s[a]=hr(w[a]);if(w[B0]!=null)s[B0]=T(w[B0]);return s},ZH=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r)}),w=N(O(await _.parseXmlBody(r.body,f)),"body");if(w[Cf]!=null)s[Cf]=T(w[Cf]);if(w[rr]!=null)s[rr]=T(w[rr]);if(w.HostedZones==="")s[uf]=[];else if(w[uf]!=null&&w[uf][Ps]!=null)s[uf]=xH(Gr(w[uf][Ps]),f);if(w[Ur]!=null)s[Ur]=Nr(w[Ur]);if(w[a]!=null)s[a]=hr(w[a]);if(w[W6]!=null)s[W6]=T(w[W6]);if(w[R6]!=null)s[R6]=T(w[R6]);return s},JH=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r)}),w=N(O(await _.parseXmlBody(r.body,f)),"body");if(w.HostedZoneSummaries==="")s[V$]=[];else if(w[V$]!=null&&w[V$][hB]!=null)s[V$]=ha(Gr(w[V$][hB]),f);if(w[a]!=null)s[a]=hr(w[a]);if(w[Pr]!=null)s[Pr]=T(w[Pr]);return s},QH=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r)}),w=N(O(await _.parseXmlBody(r.body,f)),"body");if(w[Pr]!=null)s[Pr]=T(w[Pr]);if(w.QueryLoggingConfigs==="")s[y$]=[];else if(w[y$]!=null&&w[y$][Uw]!=null)s[y$]=Ua(Gr(w[y$][Uw]),f);return s},MH=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r)}),w=N(O(await _.parseXmlBody(r.body,f)),"body");if(w[Ur]!=null)s[Ur]=Nr(w[Ur]);if(w[a]!=null)s[a]=hr(w[a]);if(w[z6]!=null)s[z6]=T(w[z6]);if(w[S6]!=null)s[S6]=T(w[S6]);if(w[P6]!=null)s[P6]=T(w[P6]);if(w.ResourceRecordSets==="")s[m$]=[];else if(w[m$]!=null&&w[m$][uh]!=null)s[m$]=Aa(Gr(w[m$][uh]),f);return s},BH=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r)}),w=N(O(await _.parseXmlBody(r.body,f)),"body");if(w.DelegationSets==="")s[M$]=[];else if(w[M$]!=null&&w[M$][Gs]!=null)s[M$]=bo(Gr(w[M$][Gs]),f);if(w[Ur]!=null)s[Ur]=Nr(w[Ur]);if(w[Os]!=null)s[Os]=T(w[Os]);if(w[a]!=null)s[a]=hr(w[a]);if(w[B0]!=null)s[B0]=T(w[B0]);return s},lH=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r)}),w=N(O(await _.parseXmlBody(r.body,f)),"body");if(w[x$]!=null)s[x$]=oH(w[x$],f);return s},HH=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r)}),w=N(O(await _.parseXmlBody(r.body,f)),"body");if(w.ResourceTagSets==="")s[i$]=[];else if(w[i$]!=null&&w[i$][x$]!=null)s[i$]=Wa(Gr(w[i$][x$]),f);return s},VH=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r)}),w=N(O(await _.parseXmlBody(r.body,f)),"body");if(w[Ur]!=null)s[Ur]=Nr(w[Ur]);if(w[a]!=null)s[a]=hr(w[a]);if(w[hF]!=null)s[hF]=T(w[hF]);if(w.TrafficPolicySummaries==="")s[q$]=[];else if(w[q$]!=null&&w[q$][FB]!=null)s[q$]=Ya(Gr(w[q$][FB]),f);return s},DH=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r)}),w=N(O(await _.parseXmlBody(r.body,f)),"body");if(w[Iw]!=null)s[Iw]=T(w[Iw]);if(w[Ur]!=null)s[Ur]=Nr(w[Ur]);if(w[a]!=null)s[a]=hr(w[a]);if(w[cs]!=null)s[cs]=T(w[cs]);if(w[bs]!=null)s[bs]=T(w[bs]);if(w.TrafficPolicyInstances==="")s[ws]=[];else if(w[ws]!=null&&w[ws][$s]!=null)s[ws]=e6(Gr(w[ws][$s]),f);return s},kH=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r)}),w=N(O(await _.parseXmlBody(r.body,f)),"body");if(w[Ur]!=null)s[Ur]=Nr(w[Ur]);if(w[a]!=null)s[a]=hr(w[a]);if(w[cs]!=null)s[cs]=T(w[cs]);if(w[bs]!=null)s[bs]=T(w[bs]);if(w.TrafficPolicyInstances==="")s[ws]=[];else if(w[ws]!=null&&w[ws][$s]!=null)s[ws]=e6(Gr(w[ws][$s]),f);return s},yH=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r)}),w=N(O(await _.parseXmlBody(r.body,f)),"body");if(w[Iw]!=null)s[Iw]=T(w[Iw]);if(w[Ur]!=null)s[Ur]=Nr(w[Ur]);if(w[a]!=null)s[a]=hr(w[a]);if(w[cs]!=null)s[cs]=T(w[cs]);if(w[bs]!=null)s[bs]=T(w[bs]);if(w.TrafficPolicyInstances==="")s[ws]=[];else if(w[ws]!=null&&w[ws][$s]!=null)s[ws]=e6(Gr(w[ws][$s]),f);return s},NH=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r)}),w=N(O(await _.parseXmlBody(r.body,f)),"body");if(w[Ur]!=null)s[Ur]=Nr(w[Ur]);if(w[a]!=null)s[a]=hr(w[a]);if(w.TrafficPolicies==="")s[v$]=[];else if(w[v$]!=null&&w[v$][Cs]!=null)s[v$]=Xa(Gr(w[v$][Cs]),f);if(w[$F]!=null)s[$F]=T(w[$F]);return s},mH=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r)}),w=N(O(await _.parseXmlBody(r.body,f)),"body");if(w[rr]!=null)s[rr]=T(w[rr]);if(w[Pr]!=null)s[Pr]=T(w[Pr]);if(w.VPCs==="")s[tf]=[];else if(w[tf]!=null&&w[tf][Ar]!=null)s[tf]=aH(Gr(w[tf][Ar]),f);return s},iH=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r)}),w=N(O(await _.parseXmlBody(r.body,f)),"body");if(w[Y6]!=null)s[Y6]=T(w[Y6]);if(w[l6]!=null)s[l6]=T(w[l6]);if(w.RecordData==="")s[N$]=[];else if(w[N$]!=null&&w[N$][EB]!=null)s[N$]=Ta(Gr(w[N$][EB]),f);if(w[sF]!=null)s[sF]=T(w[sF]);if(w[fF]!=null)s[fF]=T(w[fF]);if(w[H6]!=null)s[H6]=T(w[H6]);return s},qH=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r)}),w=N(O(await _.parseXmlBody(r.body,f)),"body");if(w[Lf]!=null)s[Lf]=UF(w[Lf],f);return s},vH=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r)}),w=N(O(await _.parseXmlBody(r.body,f)),"body");if(w[Ps]!=null)s[Ps]=TF(w[Ps],f);return s},jH=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r)}),w=N(O(await _.parseXmlBody(r.body,f)),"body");if(w[Cs]!=null)s[Cs]=u$(w[Cs],f);return s},dH=async(r,f)=>{if(r.statusCode!==200&&r.statusCode>=300)return b(r,f);const s=P({$metadata:Q(r)}),w=N(O(await _.parseXmlBody(r.body,f)),"body");if(w[$s]!=null)s[$s]=GF(w[$s],f);return s},b=async(r,f)=>{const s={...r,body:await _.parseXmlErrorBody(r.body,f)},w=_.loadRestXmlErrorCode(r,s.body);switch(w){case"ConcurrentModification":case"com.amazonaws.route53#ConcurrentModification":throw await oe(s,f);case"InvalidInput":case"com.amazonaws.route53#InvalidInput":throw await zn(s,f);case"InvalidKMSArn":case"com.amazonaws.route53#InvalidKMSArn":throw await Xn(s,f);case"InvalidKeySigningKeyStatus":case"com.amazonaws.route53#InvalidKeySigningKeyStatus":throw await Pn(s,f);case"InvalidSigningStatus":case"com.amazonaws.route53#InvalidSigningStatus":throw await Kn(s,f);case"NoSuchKeySigningKey":case"com.amazonaws.route53#NoSuchKeySigningKey":throw await dn(s,f);case"ConflictingDomainExists":case"com.amazonaws.route53#ConflictingDomainExists":throw await ae(s,f);case"InvalidVPCId":case"com.amazonaws.route53#InvalidVPCId":throw await Jn(s,f);case"LimitsExceeded":case"com.amazonaws.route53#LimitsExceeded":throw await Vn(s,f);case"NoSuchHostedZone":case"com.amazonaws.route53#NoSuchHostedZone":throw await jn(s,f);case"NotAuthorizedException":case"com.amazonaws.route53#NotAuthorizedException":throw await gn(s,f);case"PriorRequestNotComplete":case"com.amazonaws.route53#PriorRequestNotComplete":throw await _n(s,f);case"PublicZoneVPCAssociation":case"com.amazonaws.route53#PublicZoneVPCAssociation":throw await xn(s,f);case"CidrBlockInUseException":case"com.amazonaws.route53#CidrBlockInUseException":throw await _e(s,f);case"CidrCollectionVersionMismatchException":case"com.amazonaws.route53#CidrCollectionVersionMismatchException":throw await ne(s,f);case"NoSuchCidrCollectionException":case"com.amazonaws.route53#NoSuchCidrCollectionException":throw await kn(s,f);case"InvalidChangeBatch":case"com.amazonaws.route53#InvalidChangeBatch":throw await Wn(s,f);case"NoSuchHealthCheck":case"com.amazonaws.route53#NoSuchHealthCheck":throw await vn(s,f);case"ThrottlingException":case"com.amazonaws.route53#ThrottlingException":throw await nn(s,f);case"CidrCollectionAlreadyExistsException":case"com.amazonaws.route53#CidrCollectionAlreadyExistsException":throw await xe(s,f);case"HealthCheckAlreadyExists":case"com.amazonaws.route53#HealthCheckAlreadyExists":throw await hn(s,f);case"TooManyHealthChecks":case"com.amazonaws.route53#TooManyHealthChecks":throw await on(s,f);case"DelegationSetNotAvailable":case"com.amazonaws.route53#DelegationSetNotAvailable":throw await sn(s,f);case"DelegationSetNotReusable":case"com.amazonaws.route53#DelegationSetNotReusable":throw await fn(s,f);case"HostedZoneAlreadyExists":case"com.amazonaws.route53#HostedZoneAlreadyExists":throw await In(s,f);case"InvalidDomainName":case"com.amazonaws.route53#InvalidDomainName":throw await Rn(s,f);case"NoSuchDelegationSet":case"com.amazonaws.route53#NoSuchDelegationSet":throw await mn(s,f);case"TooManyHostedZones":case"com.amazonaws.route53#TooManyHostedZones":throw await an(s,f);case"InvalidArgument":case"com.amazonaws.route53#InvalidArgument":throw await An(s,f);case"InvalidKeySigningKeyName":case"com.amazonaws.route53#InvalidKeySigningKeyName":throw await Sn(s,f);case"KeySigningKeyAlreadyExists":case"com.amazonaws.route53#KeySigningKeyAlreadyExists":throw await Qn(s,f);case"TooManyKeySigningKeys":case"com.amazonaws.route53#TooManyKeySigningKeys":throw await pn(s,f);case"InsufficientCloudWatchLogsResourcePolicy":case"com.amazonaws.route53#InsufficientCloudWatchLogsResourcePolicy":throw await Ln(s,f);case"NoSuchCloudWatchLogsLogGroup":case"com.amazonaws.route53#NoSuchCloudWatchLogsLogGroup":throw await Nn(s,f);case"QueryLoggingConfigAlreadyExists":case"com.amazonaws.route53#QueryLoggingConfigAlreadyExists":throw await en(s,f);case"DelegationSetAlreadyCreated":case"com.amazonaws.route53#DelegationSetAlreadyCreated":throw await ue(s,f);case"DelegationSetAlreadyReusable":case"com.amazonaws.route53#DelegationSetAlreadyReusable":throw await te(s,f);case"HostedZoneNotFound":case"com.amazonaws.route53#HostedZoneNotFound":throw await Un(s,f);case"InvalidTrafficPolicyDocument":case"com.amazonaws.route53#InvalidTrafficPolicyDocument":throw await Zn(s,f);case"TooManyTrafficPolicies":case"com.amazonaws.route53#TooManyTrafficPolicies":throw await un(s,f);case"TrafficPolicyAlreadyExists":case"com.amazonaws.route53#TrafficPolicyAlreadyExists":throw await fo(s,f);case"NoSuchTrafficPolicy":case"com.amazonaws.route53#NoSuchTrafficPolicy":throw await cn(s,f);case"TooManyTrafficPolicyInstances":case"com.amazonaws.route53#TooManyTrafficPolicyInstances":throw await tn(s,f);case"TrafficPolicyInstanceAlreadyExists":case"com.amazonaws.route53#TrafficPolicyInstanceAlreadyExists":throw await wo(s,f);case"TooManyTrafficPolicyVersionsForCurrentPolicy":case"com.amazonaws.route53#TooManyTrafficPolicyVersionsForCurrentPolicy":throw await ro(s,f);case"TooManyVPCAssociationAuthorizations":case"com.amazonaws.route53#TooManyVPCAssociationAuthorizations":throw await so(s,f);case"KeySigningKeyInParentDSRecord":case"com.amazonaws.route53#KeySigningKeyInParentDSRecord":throw await Mn(s,f);case"KeySigningKeyInUse":case"com.amazonaws.route53#KeySigningKeyInUse":throw await Bn(s,f);case"CidrCollectionInUseException":case"com.amazonaws.route53#CidrCollectionInUseException":throw await ee(s,f);case"HealthCheckInUse":case"com.amazonaws.route53#HealthCheckInUse":throw await $n(s,f);case"HostedZoneNotEmpty":case"com.amazonaws.route53#HostedZoneNotEmpty":throw await Fn(s,f);case"NoSuchQueryLoggingConfig":case"com.amazonaws.route53#NoSuchQueryLoggingConfig":throw await On(s,f);case"DelegationSetInUse":case"com.amazonaws.route53#DelegationSetInUse":throw await rn(s,f);case"TrafficPolicyInUse":case"com.amazonaws.route53#TrafficPolicyInUse":throw await ho(s,f);case"NoSuchTrafficPolicyInstance":case"com.amazonaws.route53#NoSuchTrafficPolicyInstance":throw await bn(s,f);case"VPCAssociationAuthorizationNotFound":case"com.amazonaws.route53#VPCAssociationAuthorizationNotFound":throw await $o(s,f);case"DNSSECNotFound":case"com.amazonaws.route53#DNSSECNotFound":throw await wn(s,f);case"LastVPCAssociation":case"com.amazonaws.route53#LastVPCAssociation":throw await Hn(s,f);case"VPCAssociationNotFound":case"com.amazonaws.route53#VPCAssociationNotFound":throw await Eo(s,f);case"HostedZonePartiallyDelegated":case"com.amazonaws.route53#HostedZonePartiallyDelegated":throw await Gn(s,f);case"KeySigningKeyWithActiveStatusNotFound":case"com.amazonaws.route53#KeySigningKeyWithActiveStatusNotFound":throw await ln(s,f);case"NoSuchChange":case"com.amazonaws.route53#NoSuchChange":throw await Dn(s,f);case"NoSuchGeoLocation":case"com.amazonaws.route53#NoSuchGeoLocation":throw await qn(s,f);case"IncompatibleVersion":case"com.amazonaws.route53#IncompatibleVersion":throw await Cn(s,f);case"HostedZoneNotPrivate":case"com.amazonaws.route53#HostedZoneNotPrivate":throw await Tn(s,f);case"NoSuchCidrLocationException":case"com.amazonaws.route53#NoSuchCidrLocationException":throw await yn(s,f);case"InvalidPaginationToken":case"com.amazonaws.route53#InvalidPaginationToken":throw await Yn(s,f);case"HealthCheckVersionMismatch":case"com.amazonaws.route53#HealthCheckVersionMismatch":throw await En(s,f);case"ConflictingTypes":case"com.amazonaws.route53#ConflictingTypes":throw await pe(s,f);default:const h=s.body;return ge({output:r,parsedBody:h.Error,errorCode:w})}},ge=jf(j),_e=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[Kr]!=null)s[Kr]=T(w[Kr]);const h=new bI({$metadata:Q(r),...s});return D(h,r.body.Error)},xe=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[Kr]!=null)s[Kr]=T(w[Kr]);const h=new oI({$metadata:Q(r),...s});return D(h,r.body.Error)},ee=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[Kr]!=null)s[Kr]=T(w[Kr]);const h=new J2({$metadata:Q(r),...s});return D(h,r.body.Error)},ne=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[Kr]!=null)s[Kr]=T(w[Kr]);const h=new gI({$metadata:Q(r),...s});return D(h,r.body.Error)},oe=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new VI({$metadata:Q(r),...s});return D(h,r.body.Error)},ae=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new iI({$metadata:Q(r),...s});return D(h,r.body.Error)},pe=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new g2({$metadata:Q(r),...s});return D(h,r.body.Error)},ue=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new G2({$metadata:Q(r),...s});return D(h,r.body.Error)},te=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new C2({$metadata:Q(r),...s});return D(h,r.body.Error)},rn=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new l2({$metadata:Q(r),...s});return D(h,r.body.Error)},sn=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new uI({$metadata:Q(r),...s});return D(h,r.body.Error)},fn=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new tI({$metadata:Q(r),...s});return D(h,r.body.Error)},wn=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new k2({$metadata:Q(r),...s});return D(h,r.body.Error)},hn=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new aI({$metadata:Q(r),...s});return D(h,r.body.Error)},$n=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new Q2({$metadata:Q(r),...s});return D(h,r.body.Error)},En=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new b2({$metadata:Q(r),...s});return D(h,r.body.Error)},In=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new r2({$metadata:Q(r),...s});return D(h,r.body.Error)},Fn=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new M2({$metadata:Q(r),...s});return D(h,r.body.Error)},Un=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new L2({$metadata:Q(r),...s});return D(h,r.body.Error)},Tn=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new d2({$metadata:Q(r),...s});return D(h,r.body.Error)},Gn=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new m2({$metadata:Q(r),...s});return D(h,r.body.Error)},Cn=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new j2({$metadata:Q(r),...s});return D(h,r.body.Error)},Ln=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new F2({$metadata:Q(r),...s});return D(h,r.body.Error)},An=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new h2({$metadata:Q(r),...s});return D(h,r.body.Error)},Wn=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);if(w.messages==="")s[d$]=[];else if(w[d$]!=null&&w[d$][Kr]!=null)s[d$]=eo(Gr(w[d$][Kr]),f);const h=new xI({$metadata:Q(r),...s});return D(h,r.body.Error)},Rn=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new s2({$metadata:Q(r),...s});return D(h,r.body.Error)},zn=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new DI({$metadata:Q(r),...s});return D(h,r.body.Error)},Sn=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new $2({$metadata:Q(r),...s});return D(h,r.body.Error)},Pn=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new kI({$metadata:Q(r),...s});return D(h,r.body.Error)},Xn=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new yI({$metadata:Q(r),...s});return D(h,r.body.Error)},Yn=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new c2({$metadata:Q(r),...s});return D(h,r.body.Error)},Kn=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new NI({$metadata:Q(r),...s});return D(h,r.body.Error)},Zn=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new A2({$metadata:Q(r),...s});return D(h,r.body.Error)},Jn=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new qI({$metadata:Q(r),...s});return D(h,r.body.Error)},Qn=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new E2({$metadata:Q(r),...s});return D(h,r.body.Error)},Mn=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new K2({$metadata:Q(r),...s});return D(h,r.body.Error)},Bn=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new Z2({$metadata:Q(r),...s});return D(h,r.body.Error)},ln=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new i2({$metadata:Q(r),...s});return D(h,r.body.Error)},Hn=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new y2({$metadata:Q(r),...s});return D(h,r.body.Error)},Vn=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new vI({$metadata:Q(r),...s});return D(h,r.body.Error)},Dn=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new q2({$metadata:Q(r),...s});return D(h,r.body.Error)},kn=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[Kr]!=null)s[Kr]=T(w[Kr]);const h=new _I({$metadata:Q(r),...s});return D(h,r.body.Error)},yn=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[Kr]!=null)s[Kr]=T(w[Kr]);const h=new O2({$metadata:Q(r),...s});return D(h,r.body.Error)},Nn=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new U2({$metadata:Q(r),...s});return D(h,r.body.Error)},mn=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new f2({$metadata:Q(r),...s});return D(h,r.body.Error)},qn=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new v2({$metadata:Q(r),...s});return D(h,r.body.Error)},vn=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new eI({$metadata:Q(r),...s});return D(h,r.body.Error)},jn=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new jI({$metadata:Q(r),...s});return D(h,r.body.Error)},dn=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new mI({$metadata:Q(r),...s});return D(h,r.body.Error)},On=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new B2({$metadata:Q(r),...s});return D(h,r.body.Error)},cn=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new z2({$metadata:Q(r),...s});return D(h,r.body.Error)},bn=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new V2({$metadata:Q(r),...s});return D(h,r.body.Error)},gn=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new dI({$metadata:Q(r),...s});return D(h,r.body.Error)},_n=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new OI({$metadata:Q(r),...s});return D(h,r.body.Error)},xn=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new cI({$metadata:Q(r),...s});return D(h,r.body.Error)},en=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new T2({$metadata:Q(r),...s});return D(h,r.body.Error)},nn=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new nI({$metadata:Q(r),...s});return D(h,r.body.Error)},on=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new pI({$metadata:Q(r),...s});return D(h,r.body.Error)},an=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new w2({$metadata:Q(r),...s});return D(h,r.body.Error)},pn=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new I2({$metadata:Q(r),...s});return D(h,r.body.Error)},un=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new W2({$metadata:Q(r),...s});return D(h,r.body.Error)},tn=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new S2({$metadata:Q(r),...s});return D(h,r.body.Error)},ro=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new X2({$metadata:Q(r),...s});return D(h,r.body.Error)},so=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new Y2({$metadata:Q(r),...s});return D(h,r.body.Error)},fo=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new R2({$metadata:Q(r),...s});return D(h,r.body.Error)},wo=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new P2({$metadata:Q(r),...s});return D(h,r.body.Error)},ho=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new H2({$metadata:Q(r),...s});return D(h,r.body.Error)},$o=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new D2({$metadata:Q(r),...s});return D(h,r.body.Error)},Eo=async(r,f)=>{const s=P({}),w=r.body.Error;if(w[X]!=null)s[X]=T(w[X]);const h=new N2({$metadata:Q(r),...s});return D(h,r.body.Error)},OH=(r,f)=>{const s=new V(r0);if(r[vr]!=null)s.c(V.of(oa,r[vr]).n(vr));if(r[n]!=null)s.c(V.of(Ja,r[n]).n(n));return s},Io=(r,f)=>{const s=new V(vw);if(r[rr]!=null)s.c(V.of(w0,r[rr]).n(rr));if(s.cc(r,Cf),r[eh]!=null)s.c(V.of(Za,String(r[eh])).n(eh));return s},Fo=(r,f)=>{const s=new V(uH);if(r[gh]!=null)s.c(V.of(la,r[gh]).n(gh));if(r[uh]!=null)s.c(Zo(r[uh],f).n(uh));return s},Uo=(r,f)=>{const s=new V(e2);if(r[Fr]!=null)s.c(V.of(a6,r[Fr]).n(Fr));return s.lc(r,"Changes","Changes",()=>To(r[pH],f)),s},To=(r,f)=>{return r.filter((s)=>s!=null).map((s)=>{return Fo(s,f).n(uH)})},cH=(r,f)=>{return r.filter((s)=>s!=null).map((s)=>{return V.of(b$,s).n(_6)})},Go=(r,f)=>{const s=new V(Ha);if(r[ar]!=null)s.c(V.of(qa,r[ar]).n(ar));if(r[gh]!=null)s.c(V.of(Va,r[gh]).n(gh));return s.lc(r,"CidrList","CidrList",()=>Lo(r[va],f)),s},Co=(r,f)=>{return r.filter((s)=>s!=null).map((s)=>{return Go(s,f).n(Af)})},Lo=(r,f)=>{return r.filter((s)=>s!=null).map((s)=>{return V.of(fB,s).n(fB)})},Ao=(r,f)=>{const s=new V(jw);if(r[xh]!=null)s.c(V.of(qp,r[xh]).n(xh));if(r[ar]!=null)s.c(V.of(ia,r[ar]).n(ar));return s},Wo=(r,f)=>{const s=new V(dw);return s.cc(r,u2),s.cc(r,t2),s},Ro=(r,f)=>{const s=new V(Ow);if(r[s0]!=null)s.c(V.of(sp,r[s0]).n(s0));if(r[f0]!=null)s.c(V.of(fp,r[f0]).n(f0));if(r[h0]!=null)s.c(V.of(wp,r[h0]).n(h0));return s},zo=(r,f)=>{const s=new V(cw);if(s.cc(r,x2),s.cc(r,p2),r[dw]!=null)s.c(Wo(r[dw],f).n(dw));if(r[Nw]!=null)s.c(V.of(Nw,String(r[Nw])).n(Nw));return s},So=(r,f)=>{const s=new V(bw);if(s.cc(r,Fw),r[Gf]!=null)s.c(V.of(Gf,String(r[Gf])).n(Gf));if(r[Lr]!=null)s.c(V.of(Ep,r[Lr]).n(Lr));if(s.cc(r,_$),s.cc(r,O$),s.cc(r,e$),r[qw]!=null)s.c(V.of(qw,String(r[qw])).n(qw));if(r[Ff]!=null)s.c(V.of(Ff,String(r[Ff])).n(Ff));if(r[iw]!=null)s.c(V.of(iw,String(r[iw])).n(iw));if(r[Tf]!=null)s.c(V.of(Tf,String(r[Tf])).n(Tf));if(r[Ef]!=null)s.c(V.of(Ef,String(r[Ef])).n(Ef));if(r[Uf]!=null)s.c(V.of(Uf,String(r[Uf])).n(Uf));if(s.lc(r,"ChildHealthChecks","ChildHealthChecks",()=>cH(r[kw],f)),r[If]!=null)s.c(V.of(If,String(r[If])).n(If));if(s.lc(r,"Regions","Regions",()=>bH(r[yw],f)),r[r0]!=null)s.c(OH(r[r0],f).n(r0));return s.cc(r,g$),s.cc(r,rF),s},bH=(r,f)=>{return r.filter((s)=>s!=null).map((s)=>{return V.of($p,s).n(vr)})},Po=(r,f)=>{const s=new V(a2);if(r[Fr]!=null)s.c(V.of(a6,r[Fr]).n(Fr));if(r[ph]!=null)s.c(V.of(Fp,String(r[ph])).n(ph));return s},Xo=(r,f)=>{return r.filter((s)=>s!=null).map((s)=>{return V.of(IB,s).n(IB)})},Yo=(r,f)=>{const s=new V(IF);if(r[Xr]!=null)s.c(V.of(Tp,r[Xr]).n(Xr));return s},Ko=(r,f)=>{return r.filter((s)=>s!=null).map((s)=>{return Yo(s,f).n(IF)})},Zo=(r,f)=>{const s=new V(uh);if(r[n]!=null)s.c(V.of(Cf,r[n]).n(n));if(r[Lr]!=null)s.c(V.of(Pp,r[Lr]).n(Lr));if(r[th]!=null)s.c(V.of(Wp,r[th]).n(th));if(r[f1]!=null)s.c(V.of(Sp,String(r[f1])).n(f1));if(r[vr]!=null)s.c(V.of(zp,r[vr]).n(vr));if(r[Ow]!=null)s.c(Ro(r[Ow],f).n(Ow));if(r[nh]!=null)s.c(V.of(Ap,r[nh]).n(nh));if(r[ah]!=null)s.c(V.of(Rp,String(r[ah])).n(ah));if(r[qr]!=null)s.c(V.of(qr,String(r[qr])).n(qr));if(s.lc(r,"ResourceRecords","ResourceRecords",()=>Ko(r[bh],f)),r[vw]!=null)s.c(Io(r[vw],f).n(vw));if(s.cc(r,b$),s.cc(r,wF),r[jw]!=null)s.c(Ao(r[jw],f).n(jw));if(r[cw]!=null)s.c(zo(r[cw],f).n(cw));return s},Jo=(r,f)=>{const s=new V(FF);if(r[gw]!=null)s.c(V.of(tH,r[gw]).n(gw));if(r[Xr]!=null)s.c(V.of(kp,r[Xr]).n(Xr));return s},Qo=(r,f)=>{return r.filter((s)=>s!=null).map((s)=>{return V.of(tH,s).n(gw)})},Mo=(r,f)=>{return r.filter((s)=>s!=null).map((s)=>{return Jo(s,f).n(FF)})},Bo=(r,f)=>{return r.filter((s)=>s!=null).map((s)=>{return V.of(Dp,s).n(w0)})},a$=(r,f)=>{const s=new V(Ar);return s.cc(r,o$),s.cc(r,n$),s},lo=(r,f)=>{const s={};if(r[Lr]!=null)s[Lr]=T(r[Lr]);if(r[Xr]!=null)s[Xr]=xr(r[Xr]);return s},Ho=(r,f)=>{const s={};if(r[vr]!=null)s[vr]=T(r[vr]);if(r[n]!=null)s[n]=T(r[n]);return s},Vo=(r,f)=>{const s={};if(r[rr]!=null)s[rr]=T(r[rr]);if(r[Cf]!=null)s[Cf]=T(r[Cf]);if(r[eh]!=null)s[eh]=Nr(r[eh]);return s},gs=(r,f)=>{const s={};if(r[Tr]!=null)s[Tr]=T(r[Tr]);if(r[hs]!=null)s[hs]=T(r[hs]);if(r[k6]!=null)s[k6]=N(Qw(r[k6]));if(r[Fr]!=null)s[Fr]=T(r[Fr]);return s},Do=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return T(s)})},ko=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return T(s)})},yo=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return No(s,f)})},No=(r,f)=>{const s={};if(r[OG]!=null)s[OG]=T(r[OG]);if(r[ar]!=null)s[ar]=T(r[ar]);return s},mo=(r,f)=>{const s={};if(r[_h]!=null)s[_h]=T(r[_h]);if(r[Tr]!=null)s[Tr]=T(r[Tr]);if(r[n]!=null)s[n]=T(r[n]);if(r[l0]!=null)s[l0]=xr(r[l0]);return s},io=(r,f)=>{const s={};if(r[xh]!=null)s[xh]=T(r[xh]);if(r[ar]!=null)s[ar]=T(r[ar]);return s},qo=(r,f)=>{const s={};if(r[f6]!=null)s[f6]=hr(r[f6]);if(r[g6]!=null)s[g6]=FY(r[g6]);if(r[_G]!=null)s[_G]=T(r[_G]);if(r[B6]!=null)s[B6]=hr(r[B6]);if(r[C6]!=null)s[C6]=T(r[C6]);if(r[K6]!=null)s[K6]=T(r[K6]);if(r[j6]!=null)s[j6]=T(r[j6]);if(r.Dimensions==="")s[B$]=[];else if(r[B$]!=null&&r[B$][wB]!=null)s[B$]=_o(Gr(r[B$][wB]),f);return s},vo=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return jo(s,f)})},jo=(r,f)=>{const s={};if(r[_h]!=null)s[_h]=T(r[_h]);if(r[Tr]!=null)s[Tr]=T(r[Tr]);if(r[n]!=null)s[n]=T(r[n]);if(r[l0]!=null)s[l0]=xr(r[l0]);return s},Oo=(r,f)=>{const s={};if(r[u2]!=null)s[u2]=T(r[u2]);if(r[t2]!=null)s[t2]=T(r[t2]);return s},p$=(r,f)=>{const s={};if(r[Tr]!=null)s[Tr]=T(r[Tr]);if(r[Sr]!=null)s[Sr]=T(r[Sr]);if(r.NameServers==="")s[k$]=[];else if(r[k$]!=null&&r[k$][$B]!=null)s[k$]=co(Gr(r[k$][$B]),f);return s},co=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return T(s)})},bo=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return p$(s,f)})},go=(r,f)=>{const s={};if(r[n]!=null)s[n]=T(r[n]);if(r[Xr]!=null)s[Xr]=T(r[Xr]);return s},_o=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return go(s,f)})},xo=(r,f)=>{const s={};if(r[v6]!=null)s[v6]=T(r[v6]);if(r[r1]!=null)s[r1]=T(r[r1]);return s},eo=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return T(s)})},no=(r,f)=>{const s={};if(r[s0]!=null)s[s0]=T(r[s0]);if(r[f0]!=null)s[f0]=T(r[f0]);if(r[h0]!=null)s[h0]=T(r[h0]);return s},gH=(r,f)=>{const s={};if(r[s0]!=null)s[s0]=T(r[s0]);if(r[bG]!=null)s[bG]=T(r[bG]);if(r[f0]!=null)s[f0]=T(r[f0]);if(r[gG]!=null)s[gG]=T(r[gG]);if(r[h0]!=null)s[h0]=T(r[h0]);if(r[m6]!=null)s[m6]=T(r[m6]);return s},oo=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return gH(s,f)})},ao=(r,f)=>{const s={};if(r[x2]!=null)s[x2]=T(r[x2]);if(r[p2]!=null)s[p2]=T(r[p2]);if(r[dw]!=null)s[dw]=Oo(r[dw],f);if(r[Nw]!=null)s[Nw]=hr(r[Nw]);return s},UF=(r,f)=>{const s={};if(r[Tr]!=null)s[Tr]=T(r[Tr]);if(r[Sr]!=null)s[Sr]=T(r[Sr]);if(r[oh]!=null)s[oh]=nH(r[oh],f);if(r[bw]!=null)s[bw]=po(r[bw],f);if(r[mw]!=null)s[mw]=xr(r[mw]);if(r[eG]!=null)s[eG]=qo(r[eG],f);return s},po=(r,f)=>{const s={};if(r[Fw]!=null)s[Fw]=T(r[Fw]);if(r[Gf]!=null)s[Gf]=hr(r[Gf]);if(r[Lr]!=null)s[Lr]=T(r[Lr]);if(r[_$]!=null)s[_$]=T(r[_$]);if(r[O$]!=null)s[O$]=T(r[O$]);if(r[e$]!=null)s[e$]=T(r[e$]);if(r[qw]!=null)s[qw]=hr(r[qw]);if(r[Ff]!=null)s[Ff]=hr(r[Ff]);if(r[iw]!=null)s[iw]=Nr(r[iw]);if(r[Tf]!=null)s[Tf]=Nr(r[Tf]);if(r[Ef]!=null)s[Ef]=Nr(r[Ef]);if(r[Uf]!=null)s[Uf]=hr(r[Uf]);if(r.ChildHealthChecks==="")s[kw]=[];else if(r[kw]!=null&&r[kw][_6]!=null)s[kw]=ko(Gr(r[kw][_6]),f);if(r[If]!=null)s[If]=Nr(r[If]);if(r.Regions==="")s[yw]=[];else if(r[yw]!=null&&r[yw][vr]!=null)s[yw]=to(Gr(r[yw][vr]),f);if(r[r0]!=null)s[r0]=Ho(r[r0],f);if(r[g$]!=null)s[g$]=T(r[g$]);if(r[rF]!=null)s[rF]=T(r[rF]);return s},uo=(r,f)=>{const s={};if(r[vr]!=null)s[vr]=T(r[vr]);if(r[Fw]!=null)s[Fw]=T(r[Fw]);if(r[q6]!=null)s[q6]=za(r[q6],f);return s},_H=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return uo(s,f)})},to=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return T(s)})},ra=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return UF(s,f)})},TF=(r,f)=>{const s={};if(r[Tr]!=null)s[Tr]=T(r[Tr]);if(r[n]!=null)s[n]=T(r[n]);if(r[Sr]!=null)s[Sr]=T(r[Sr]);if(r[oG]!=null)s[oG]=sa(r[oG],f);if(r[V6]!=null)s[V6]=xr(r[V6]);if(r[oh]!=null)s[oh]=nH(r[oh],f);return s},sa=(r,f)=>{const s={};if(r[Fr]!=null)s[Fr]=T(r[Fr]);if(r[ph]!=null)s[ph]=Nr(r[ph]);return s},fa=(r,f)=>{const s={};if(r[Lr]!=null)s[Lr]=T(r[Lr]);if(r[Xr]!=null)s[Xr]=xr(r[Xr]);return s},wa=(r,f)=>{const s={};if(r[J6]!=null)s[J6]=T(r[J6]);if(r[Q6]!=null)s[Q6]=T(r[Q6]);return s},xH=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return TF(s,f)})},ha=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return $a(s,f)})},$a=(r,f)=>{const s={};if(r[rr]!=null)s[rr]=T(r[rr]);if(r[n]!=null)s[n]=T(r[n]);if(r[Z6]!=null)s[Z6]=wa(r[Z6],f);return s},eH=(r,f)=>{const s={};if(r[n]!=null)s[n]=T(r[n]);if(r[E6]!=null)s[E6]=T(r[E6]);if(r[w6]!=null)s[w6]=hr(r[w6]);if(r[y6]!=null)s[y6]=T(r[y6]);if(r[N6]!=null)s[N6]=hr(r[N6]);if(r[aG]!=null)s[aG]=T(r[aG]);if(r[pG]!=null)s[pG]=hr(r[pG]);if(r[U6]!=null)s[U6]=hr(r[U6]);if(r[r6]!=null)s[r6]=T(r[r6]);if(r[M6]!=null)s[M6]=T(r[M6]);if(r[tG]!=null)s[tG]=T(r[tG]);if(r[uG]!=null)s[uG]=T(r[uG]);if(r[hs]!=null)s[hs]=T(r[hs]);if(r[r1]!=null)s[r1]=T(r[r1]);if(r[cG]!=null)s[cG]=N(Qw(r[cG]));if(r[T6]!=null)s[T6]=N(Qw(r[T6]));return s},Ea=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return eH(s,f)})},nH=(r,f)=>{const s={};if(r[i6]!=null)s[i6]=T(r[i6]);if(r[s6]!=null)s[s6]=T(r[s6]);return s},Ia=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return Fa(s,f)})},Fa=(r,f)=>{const s={};if(r[ar]!=null)s[ar]=T(r[ar]);return s},x6=(r,f)=>{const s={};if(r[Tr]!=null)s[Tr]=T(r[Tr]);if(r[rr]!=null)s[rr]=T(r[rr]);if(r[n2]!=null)s[n2]=T(r[n2]);return s},Ua=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return x6(s,f)})},Ta=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return T(s)})},Ga=(r,f)=>{const s={};if(r[Xr]!=null)s[Xr]=T(r[Xr]);return s},Ca=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return Ga(s,f)})},La=(r,f)=>{const s={};if(r[n]!=null)s[n]=T(r[n]);if(r[Lr]!=null)s[Lr]=T(r[Lr]);if(r[th]!=null)s[th]=T(r[th]);if(r[f1]!=null)s[f1]=xr(r[f1]);if(r[vr]!=null)s[vr]=T(r[vr]);if(r[Ow]!=null)s[Ow]=no(r[Ow],f);if(r[nh]!=null)s[nh]=T(r[nh]);if(r[ah]!=null)s[ah]=Nr(r[ah]);if(r[qr]!=null)s[qr]=xr(r[qr]);if(r.ResourceRecords==="")s[bh]=[];else if(r[bh]!=null&&r[bh][IF]!=null)s[bh]=Ca(Gr(r[bh][IF]),f);if(r[vw]!=null)s[vw]=Vo(r[vw],f);if(r[b$]!=null)s[b$]=T(r[b$]);if(r[wF]!=null)s[wF]=T(r[wF]);if(r[jw]!=null)s[jw]=io(r[jw],f);if(r[cw]!=null)s[cw]=ao(r[cw],f);return s},Aa=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return La(s,f)})},oH=(r,f)=>{const s={};if(r[D6]!=null)s[D6]=T(r[D6]);if(r[w0]!=null)s[w0]=T(r[w0]);if(r.Tags==="")s[j$]=[];else if(r[j$]!=null&&r[j$][FF]!=null)s[j$]=Pa(Gr(r[j$][FF]),f);return s},Wa=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return oH(s,f)})},Ra=(r,f)=>{const s={};if(r[Lr]!=null)s[Lr]=T(r[Lr]);if(r[Xr]!=null)s[Xr]=xr(r[Xr]);return s},za=(r,f)=>{const s={};if(r[hs]!=null)s[hs]=T(r[hs]);if(r[xG]!=null)s[xG]=N(Qw(r[xG]));return s},Sa=(r,f)=>{const s={};if(r[gw]!=null)s[gw]=T(r[gw]);if(r[Xr]!=null)s[Xr]=T(r[Xr]);return s},Pa=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return Sa(s,f)})},Xa=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return u$(s,f)})},u$=(r,f)=>{const s={};if(r[Tr]!=null)s[Tr]=T(r[Tr]);if(r[l0]!=null)s[l0]=hr(r[l0]);if(r[n]!=null)s[n]=T(r[n]);if(r[Lr]!=null)s[Lr]=T(r[Lr]);if(r[Q0]!=null)s[Q0]=T(r[Q0]);if(r[Fr]!=null)s[Fr]=T(r[Fr]);return s},GF=(r,f)=>{const s={};if(r[Tr]!=null)s[Tr]=T(r[Tr]);if(r[rr]!=null)s[rr]=T(r[rr]);if(r[n]!=null)s[n]=T(r[n]);if(r[qr]!=null)s[qr]=xr(r[qr]);if(r[d6]!=null)s[d6]=T(r[d6]);if(r[Kr]!=null)s[Kr]=T(r[Kr]);if(r[s1]!=null)s[s1]=T(r[s1]);if(r[ds]!=null)s[ds]=hr(r[ds]);if(r[b6]!=null)s[b6]=T(r[b6]);return s},e6=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return GF(s,f)})},Ya=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return Ka(s,f)})},Ka=(r,f)=>{const s={};if(r[Tr]!=null)s[Tr]=T(r[Tr]);if(r[n]!=null)s[n]=T(r[n]);if(r[Lr]!=null)s[Lr]=T(r[Lr]);if(r[G6]!=null)s[G6]=hr(r[G6]);if(r[O6]!=null)s[O6]=hr(r[O6]);return s},n6=(r,f)=>{const s={};if(r[o$]!=null)s[o$]=T(r[o$]);if(r[n$]!=null)s[n$]=T(r[n$]);return s},aH=(r,f)=>{return(r||[]).filter((s)=>s!=null).map((s)=>{return n6(s,f)})},Q=(r)=>({httpStatusCode:r.statusCode,requestId:r.headers["x-amzn-requestid"]??r.headers["x-amzn-request-id"]??r.headers["x-amz-request-id"],extendedRequestId:r.headers["x-amz-id-2"],cfId:r.headers["x-amz-cf-id"]});var gh="Action",Za="AliasHealthEnabled",r0="AlarmIdentifier",Ja="AlarmName",Qa="AddTags",vw="AliasTarget",Ma="AssociateVPCComment",Ba="AssociateVPCWithHostedZoneRequest",x2="AWSRegion",_h="Arn",Nw="Bias",Fr="Comment",la="ChangeAction",e2="ChangeBatch",K$="CidrBlocks",OG="CidrBlock",s0="ContinentCode",Ha="CidrCollectionChange",Va="CidrCollectionChangeAction",Da="ChangeCidrCollectionRequest",ka="CreateCidrCollectionRequest",Z$="CidrCollections",f0="CountryCode",cG="CreatedDate",kw="ChildHealthChecks",ya="CreateHealthCheckRequest",_6="ChildHealthCheck",Na="CreateHostedZoneRequest",fr="ChangeInfo",J$="CheckerIpRanges",xh="CollectionId",ma="CreateKeySigningKeyRequest",Q$="CidrLocations",ia="CidrLocationNameDefaultAllowed",qa="CidrLocationNameDefaultNotAllowed",va="CidrList",ja="CidrNonce",da="CollectionName",bG="ContinentName",gG="CountryName",_G="ComparisonOperator",Oa="CreateQueryLoggingConfigRequest",Sr="CallerReference",jw="CidrRoutingConfig",ca="CreateReusableDelegationSetRequest",ba="ChangeResourceRecordSetsRequest",xG="CheckedTime",ga="ChangeTagsForResourceRequest",_a="CreateTrafficPolicyInstanceRequest",xa="CreateTrafficPolicyRequest",ea="CreateTrafficPolicyVersionRequest",_2="CollectionVersion",na="CreateVPCAssociationAuthorizationRequest",eG="CloudWatchAlarmConfiguration",n2="CloudWatchLogsLogGroupArn",oa="CloudWatchRegion",pH="Changes",uH="Change",fB="Cidr",nG="Collection",oG="Config",dw="Coordinates",J0="Count",Q0="Document",aG="DigestAlgorithmMnemonic",pG="DigestAlgorithmType",uG="DNSKEYRecord",Cf="DNSName",Gs="DelegationSet",o2="DelegationSetId",tG="DSRecord",M$="DelegationSets",r6="DigestValue",aa="DeleteVPCAssociationAuthorizationRequest",pa="DisassociateVPCComment",ua="DisassociateVPCFromHostedZoneRequest",s6="Description",Ef="Disabled",B$="Dimensions",wB="Dimension",ta="EDNS0ClientSubnetIP",rp="EDNS0ClientSubnetMask",f6="EvaluationPeriods",If="EnableSNI",eh="EvaluateTargetHealth",nh="Failover",O$="FullyQualifiedDomainName",Ff="FailureThreshold",w6="Flag",Ow="GeoLocation",sp="GeoLocationContinentCode",fp="GeoLocationCountryCode",c$="GeoLocationDetails",l$="GeoLocationDetailsList",wp="GeoLocationSubdivisionCode",cw="GeoProximityLocation",Lf="HealthCheck",bw="HealthCheckConfig",h6="HealthCheckCount",b$="HealthCheckId",hp="HealthCheckNonce",pf="HealthCheckObservations",EF="HealthCheckObservation",$p="HealthCheckRegion",Ep="HealthCheckType",mw="HealthCheckVersion",H$="HealthChecks",Uf="HealthThreshold",Ps="HostedZone",a2="HostedZoneConfig",$6="HostedZoneCount",rr="HostedZoneId",Iw="HostedZoneIdMarker",V$="HostedZoneSummaries",hB="HostedZoneSummary",Ip="HostedZoneType",uf="HostedZones",Tf="Inverted",g$="InsufficientDataHealthStatus",Fw="IPAddress",Fp="IsPrivateZone",Ur="IsTruncated",Tr="Id",gw="Key",E6="KmsArn",I6="KeyManagementServiceArn",F6="KeySigningKey",D$="KeySigningKeys",U6="KeyTag",H0="Location",T6="LastModifiedDate",ar="LocationName",oh="LinkedService",Up="ListTagsForResourcesRequest",G6="LatestVersion",p2="LocalZoneGroup",u2="Latitude",M0="Limit",t2="Longitude",Os="Marker",a="MaxItems",iw="MeasureLatency",C6="MetricName",t$="MaxResults",ah="MultiValueAnswer",Kr="Message",n="Name",L6="NextContinentCode",A6="NextCountryCode",W6="NextDNSName",R6="NextHostedZoneId",B0="NextMarker",z6="NextRecordIdentifier",S6="NextRecordName",P6="NextRecordType",k$="NameServers",X6="NextSubdivisionCode",$B="NameServer",Pr="NextToken",Y6="Nameserver",K6="Namespace",o6="Nonce",Z6="Owner",J6="OwningAccount",Q6="OwningService",Gf="Port",M6="PublicKey",ph="PrivateZone",B6="Period",l6="Protocol",Uw="QueryLoggingConfig",y$="QueryLoggingConfigs",yw="Regions",H6="ResponseCode",rF="RoutingControlArn",a6="ResourceDescription",EB="RecordDataEntry",Tp="RData",N$="RecordData",Gp="ResetElements",IB="ResettableElementName",w0="ResourceId",Cp="ResolverIP",Lp="ResourceIds",qw="RequestInterval",sF="RecordName",_$="ResourcePath",IF="ResourceRecord",m$="ResourceRecordSets",V6="ResourceRecordSetCount",Ap="ResourceRecordSetFailover",Wp="ResourceRecordSetIdentifier",Rp="ResourceRecordSetMultiValueAnswer",zp="ResourceRecordSetRegion",Sp="ResourceRecordSetWeight",uh="ResourceRecordSet",Pp="RRType",bh="ResourceRecords",fF="RecordType",Xp="RemoveTagKeys",x$="ResourceTagSet",i$="ResourceTagSets",D6="ResourceType",vr="Region",hs="Status",k6="SubmittedAt",y6="SigningAlgorithmMnemonic",N6="SigningAlgorithmType",h0="SubdivisionCode",Yp="StartContinentCode",Kp="StartCountryCode",th="SetIdentifier",Zp="SigningKeyName",Jp="SigningKeyString",Qp="SigningKeyStatus",r1="StatusMessage",m6="SubdivisionName",i6="ServicePrincipal",q6="StatusReport",Mp="StartRecordIdentifier",Bp="StartRecordName",lp="StartRecordType",e$="SearchString",Hp="StartSubdivisionCode",v6="ServeSignature",j6="Statistic",d6="State",Lr="Type",tH="TagKey",Cs="TrafficPolicy",p6="TrafficPolicyComment",O6="TrafficPolicyCount",rV="TrafficPolicyDocument",s1="TrafficPolicyId",c6="TrafficPolicyInstanceCount",wF="TrafficPolicyInstanceId",hF="TrafficPolicyIdMarker",cs="TrafficPolicyInstanceNameMarker",bs="TrafficPolicyInstanceTypeMarker",$s="TrafficPolicyInstance",ws="TrafficPolicyInstances",Vp="TrafficPolicyName",q$="TrafficPolicySummaries",FB="TrafficPolicySummary",b6="TrafficPolicyType",ds="TrafficPolicyVersion",$F="TrafficPolicyVersionMarker",v$="TrafficPolicies",Dp="TagResourceId",qr="TTL",kp="TagValue",FF="Tag",j$="Tags",g6="Threshold",yp="UpdateHealthCheckRequest",Np="UpdateHostedZoneCommentRequest",mp="UpdateTrafficPolicyCommentRequest",ip="UpdateTrafficPolicyInstanceRequest",qp="UUID",Xr="Value",Ar="VPC",n$="VPCId",o$="VPCRegion",tf="VPCs",l0="Version",f1="Weight",vp="continentcode",jp="countrycode",dp="delegationsetid",Op="dnsname",cp="edns0clientsubnetip",bp="edns0clientsubnetmask",gp="hostedzonetype",rE="hostedzoneid",_p="identifier",sV="id",$0="location",sE="maxresults",_s="maxitems",u6="marker",Af="member",X="message",d$="messages",w1="nexttoken",xp="name",ep="recordname",np="recordtype",op="resolverip",ap="subdivisioncode",pp="startcontinentcode",up="startcountrycode",tp="startsubdivisioncode",ru="type",su="trafficpolicyid",t6="trafficpolicyinstancename",r4="trafficpolicyinstancetype",fu="trafficpolicyversion",wu="vpcid",Hr='<?xml version="1.0" encoding="UTF-8"?>',hu="version",$u="vpcregion";class s4 extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions()),i(s)]}).s("AWSDnsV20130401","ActivateKeySigningKey",{}).n("Route53Client","ActivateKeySigningKeyCommand").f(void 0,void 0).ser(UB).de(Ql).build(){}B();H();Y();class f4 extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions()),i(s)]}).s("AWSDnsV20130401","AssociateVPCWithHostedZone",{}).n("Route53Client","AssociateVPCWithHostedZoneCommand").f(void 0,void 0).ser(TB).de(Ml).build(){}B();H();Y();class w4 extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions()),i(s)]}).s("AWSDnsV20130401","ChangeCidrCollection",{}).n("Route53Client","ChangeCidrCollectionCommand").f(void 0,void 0).ser(GB).de(Bl).build(){}B();H();Y();class h4 extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions()),tM(s),i(s)]}).s("AWSDnsV20130401","ChangeResourceRecordSets",{}).n("Route53Client","ChangeResourceRecordSetsCommand").f(void 0,void 0).ser(CB).de(ll).build(){}B();H();Y();class $4 extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ChangeTagsForResource",{}).n("Route53Client","ChangeTagsForResourceCommand").f(void 0,void 0).ser(LB).de(Hl).build(){}B();H();Y();class E4 extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","CreateCidrCollection",{}).n("Route53Client","CreateCidrCollectionCommand").f(void 0,void 0).ser(AB).de(Vl).build(){}B();H();Y();class I4 extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","CreateHealthCheck",{}).n("Route53Client","CreateHealthCheckCommand").f(void 0,void 0).ser(WB).de(Dl).build(){}B();H();Y();class F4 extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions()),i(s)]}).s("AWSDnsV20130401","CreateHostedZone",{}).n("Route53Client","CreateHostedZoneCommand").f(void 0,void 0).ser(RB).de(kl).build(){}B();H();Y();class U4 extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions()),i(s)]}).s("AWSDnsV20130401","CreateKeySigningKey",{}).n("Route53Client","CreateKeySigningKeyCommand").f(void 0,void 0).ser(zB).de(yl).build(){}B();H();Y();class T4 extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions()),i(s)]}).s("AWSDnsV20130401","CreateQueryLoggingConfig",{}).n("Route53Client","CreateQueryLoggingConfigCommand").f(void 0,void 0).ser(SB).de(Nl).build(){}B();H();Y();class G4 extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions()),i(s)]}).s("AWSDnsV20130401","CreateReusableDelegationSet",{}).n("Route53Client","CreateReusableDelegationSetCommand").f(void 0,void 0).ser(PB).de(ml).build(){}B();H();Y();class C4 extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","CreateTrafficPolicy",{}).n("Route53Client","CreateTrafficPolicyCommand").f(void 0,void 0).ser(XB).de(il).build(){}B();H();Y();class L4 extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions()),i(s)]}).s("AWSDnsV20130401","CreateTrafficPolicyInstance",{}).n("Route53Client","CreateTrafficPolicyInstanceCommand").f(void 0,void 0).ser(YB).de(ql).build(){}B();H();Y();class A4 extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions()),i(s)]}).s("AWSDnsV20130401","CreateTrafficPolicyVersion",{}).n("Route53Client","CreateTrafficPolicyVersionCommand").f(void 0,void 0).ser(KB).de(vl).build(){}B();H();Y();class W4 extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions()),i(s)]}).s("AWSDnsV20130401","CreateVPCAssociationAuthorization",{}).n("Route53Client","CreateVPCAssociationAuthorizationCommand").f(void 0,void 0).ser(ZB).de(jl).build(){}B();H();Y();class R4 extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions()),i(s)]}).s("AWSDnsV20130401","DeactivateKeySigningKey",{}).n("Route53Client","DeactivateKeySigningKeyCommand").f(void 0,void 0).ser(JB).de(dl).build(){}B();H();Y();class z4 extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions()),i(s)]}).s("AWSDnsV20130401","DeleteCidrCollection",{}).n("Route53Client","DeleteCidrCollectionCommand").f(void 0,void 0).ser(QB).de(Ol).build(){}B();H();Y();class S4 extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","DeleteHealthCheck",{}).n("Route53Client","DeleteHealthCheckCommand").f(void 0,void 0).ser(MB).de(cl).build(){}B();H();Y();class P4 extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions()),i(s)]}).s("AWSDnsV20130401","DeleteHostedZone",{}).n("Route53Client","DeleteHostedZoneCommand").f(void 0,void 0).ser(BB).de(bl).build(){}B();H();Y();class X4 extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions()),i(s)]}).s("AWSDnsV20130401","DeleteKeySigningKey",{}).n("Route53Client","DeleteKeySigningKeyCommand").f(void 0,void 0).ser(lB).de(gl).build(){}B();H();Y();class Y4 extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions()),i(s)]}).s("AWSDnsV20130401","DeleteQueryLoggingConfig",{}).n("Route53Client","DeleteQueryLoggingConfigCommand").f(void 0,void 0).ser(HB).de(_l).build(){}B();H();Y();class K4 extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions()),i(s)]}).s("AWSDnsV20130401","DeleteReusableDelegationSet",{}).n("Route53Client","DeleteReusableDelegationSetCommand").f(void 0,void 0).ser(VB).de(xl).build(){}B();H();Y();class Z4 extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions()),i(s)]}).s("AWSDnsV20130401","DeleteTrafficPolicy",{}).n("Route53Client","DeleteTrafficPolicyCommand").f(void 0,void 0).ser(DB).de(el).build(){}B();H();Y();class J4 extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions()),i(s)]}).s("AWSDnsV20130401","DeleteTrafficPolicyInstance",{}).n("Route53Client","DeleteTrafficPolicyInstanceCommand").f(void 0,void 0).ser(kB).de(nl).build(){}B();H();Y();class Q4 extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions()),i(s)]}).s("AWSDnsV20130401","DeleteVPCAssociationAuthorization",{}).n("Route53Client","DeleteVPCAssociationAuthorizationCommand").f(void 0,void 0).ser(yB).de(ol).build(){}B();H();Y();class M4 extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions()),i(s)]}).s("AWSDnsV20130401","DisableHostedZoneDNSSEC",{}).n("Route53Client","DisableHostedZoneDNSSECCommand").f(void 0,void 0).ser(NB).de(al).build(){}B();H();Y();class B4 extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions()),i(s)]}).s("AWSDnsV20130401","DisassociateVPCFromHostedZone",{}).n("Route53Client","DisassociateVPCFromHostedZoneCommand").f(void 0,void 0).ser(mB).de(pl).build(){}B();H();Y();class l4 extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions()),i(s)]}).s("AWSDnsV20130401","EnableHostedZoneDNSSEC",{}).n("Route53Client","EnableHostedZoneDNSSECCommand").f(void 0,void 0).ser(iB).de(ul).build(){}B();H();Y();class H4 extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetAccountLimit",{}).n("Route53Client","GetAccountLimitCommand").f(void 0,void 0).ser(qB).de(tl).build(){}B();H();Y();class V4 extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions()),i(s)]}).s("AWSDnsV20130401","GetChange",{}).n("Route53Client","GetChangeCommand").f(void 0,void 0).ser(vB).de(rH).build(){}B();H();Y();class D4 extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetCheckerIpRanges",{}).n("Route53Client","GetCheckerIpRangesCommand").f(void 0,void 0).ser(jB).de(sH).build(){}B();H();Y();class k4 extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions()),i(s)]}).s("AWSDnsV20130401","GetDNSSEC",{}).n("Route53Client","GetDNSSECCommand").f(void 0,void 0).ser(dB).de(fH).build(){}B();H();Y();class y4 extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetGeoLocation",{}).n("Route53Client","GetGeoLocationCommand").f(void 0,void 0).ser(OB).de(wH).build(){}B();H();Y();class N4 extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetHealthCheck",{}).n("Route53Client","GetHealthCheckCommand").f(void 0,void 0).ser(cB).de(hH).build(){}B();H();Y();class m4 extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetHealthCheckCount",{}).n("Route53Client","GetHealthCheckCountCommand").f(void 0,void 0).ser(bB).de($H).build(){}B();H();Y();class i4 extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetHealthCheckLastFailureReason",{}).n("Route53Client","GetHealthCheckLastFailureReasonCommand").f(void 0,void 0).ser(gB).de(EH).build(){}B();H();Y();class q4 extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetHealthCheckStatus",{}).n("Route53Client","GetHealthCheckStatusCommand").f(void 0,void 0).ser(_B).de(IH).build(){}B();H();Y();class v4 extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions()),i(s)]}).s("AWSDnsV20130401","GetHostedZone",{}).n("Route53Client","GetHostedZoneCommand").f(void 0,void 0).ser(xB).de(FH).build(){}B();H();Y();class j4 extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetHostedZoneCount",{}).n("Route53Client","GetHostedZoneCountCommand").f(void 0,void 0).ser(eB).de(UH).build(){}B();H();Y();class d4 extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions()),i(s)]}).s("AWSDnsV20130401","GetHostedZoneLimit",{}).n("Route53Client","GetHostedZoneLimitCommand").f(void 0,void 0).ser(nB).de(TH).build(){}B();H();Y();class O4 extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions()),i(s)]}).s("AWSDnsV20130401","GetQueryLoggingConfig",{}).n("Route53Client","GetQueryLoggingConfigCommand").f(void 0,void 0).ser(oB).de(GH).build(){}B();H();Y();class c4 extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions()),i(s)]}).s("AWSDnsV20130401","GetReusableDelegationSet",{}).n("Route53Client","GetReusableDelegationSetCommand").f(void 0,void 0).ser(aB).de(CH).build(){}B();H();Y();class b4 extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions()),i(s)]}).s("AWSDnsV20130401","GetReusableDelegationSetLimit",{}).n("Route53Client","GetReusableDelegationSetLimitCommand").f(void 0,void 0).ser(pB).de(LH).build(){}B();H();Y();class g4 extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions()),i(s)]}).s("AWSDnsV20130401","GetTrafficPolicy",{}).n("Route53Client","GetTrafficPolicyCommand").f(void 0,void 0).ser(uB).de(AH).build(){}B();H();Y();class _4 extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions()),i(s)]}).s("AWSDnsV20130401","GetTrafficPolicyInstance",{}).n("Route53Client","GetTrafficPolicyInstanceCommand").f(void 0,void 0).ser(tB).de(WH).build(){}B();H();Y();class x4 extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetTrafficPolicyInstanceCount",{}).n("Route53Client","GetTrafficPolicyInstanceCountCommand").f(void 0,void 0).ser(rl).de(RH).build(){}B();H();Y();class e4 extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListCidrBlocks",{}).n("Route53Client","ListCidrBlocksCommand").f(void 0,void 0).ser(sl).de(zH).build(){}B();H();Y();class n4 extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListCidrCollections",{}).n("Route53Client","ListCidrCollectionsCommand").f(void 0,void 0).ser(fl).de(SH).build(){}B();H();Y();class o4 extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListCidrLocations",{}).n("Route53Client","ListCidrLocationsCommand").f(void 0,void 0).ser(wl).de(PH).build(){}B();H();Y();class a4 extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListGeoLocations",{}).n("Route53Client","ListGeoLocationsCommand").f(void 0,void 0).ser(hl).de(XH).build(){}B();H();Y();class p4 extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListHealthChecks",{}).n("Route53Client","ListHealthChecksCommand").f(void 0,void 0).ser($l).de(YH).build(){}B();H();Y();class u4 extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions()),i(s)]}).s("AWSDnsV20130401","ListHostedZonesByName",{}).n("Route53Client","ListHostedZonesByNameCommand").f(void 0,void 0).ser(Il).de(ZH).build(){}B();H();Y();class t4 extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListHostedZonesByVPC",{}).n("Route53Client","ListHostedZonesByVPCCommand").f(void 0,void 0).ser(Fl).de(JH).build(){}B();H();Y();class rC extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions()),i(s)]}).s("AWSDnsV20130401","ListHostedZones",{}).n("Route53Client","ListHostedZonesCommand").f(void 0,void 0).ser(El).de(KH).build(){}B();H();Y();class sC extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions()),i(s)]}).s("AWSDnsV20130401","ListQueryLoggingConfigs",{}).n("Route53Client","ListQueryLoggingConfigsCommand").f(void 0,void 0).ser(Ul).de(QH).build(){}B();H();Y();class fC extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions()),i(s)]}).s("AWSDnsV20130401","ListResourceRecordSets",{}).n("Route53Client","ListResourceRecordSetsCommand").f(void 0,void 0).ser(Tl).de(MH).build(){}B();H();Y();class wC extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListReusableDelegationSets",{}).n("Route53Client","ListReusableDelegationSetsCommand").f(void 0,void 0).ser(Gl).de(BH).build(){}B();H();Y();class hC extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListTagsForResource",{}).n("Route53Client","ListTagsForResourceCommand").f(void 0,void 0).ser(Cl).de(lH).build(){}B();H();Y();class $C extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListTagsForResources",{}).n("Route53Client","ListTagsForResourcesCommand").f(void 0,void 0).ser(Ll).de(HH).build(){}B();H();Y();class EC extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListTrafficPolicies",{}).n("Route53Client","ListTrafficPoliciesCommand").f(void 0,void 0).ser(Al).de(VH).build(){}B();H();Y();class IC extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions()),i(s)]}).s("AWSDnsV20130401","ListTrafficPolicyInstancesByHostedZone",{}).n("Route53Client","ListTrafficPolicyInstancesByHostedZoneCommand").f(void 0,void 0).ser(Rl).de(kH).build(){}B();H();Y();class FC extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListTrafficPolicyInstancesByPolicy",{}).n("Route53Client","ListTrafficPolicyInstancesByPolicyCommand").f(void 0,void 0).ser(zl).de(yH).build(){}B();H();Y();class UC extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListTrafficPolicyInstances",{}).n("Route53Client","ListTrafficPolicyInstancesCommand").f(void 0,void 0).ser(Wl).de(DH).build(){}B();H();Y();class TC extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions()),i(s)]}).s("AWSDnsV20130401","ListTrafficPolicyVersions",{}).n("Route53Client","ListTrafficPolicyVersionsCommand").f(void 0,void 0).ser(Sl).de(NH).build(){}B();H();Y();class GC extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions()),i(s)]}).s("AWSDnsV20130401","ListVPCAssociationAuthorizations",{}).n("Route53Client","ListVPCAssociationAuthorizationsCommand").f(void 0,void 0).ser(Pl).de(mH).build(){}B();H();Y();class CC extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions()),i(s)]}).s("AWSDnsV20130401","TestDNSAnswer",{}).n("Route53Client","TestDNSAnswerCommand").f(void 0,void 0).ser(Xl).de(iH).build(){}B();H();Y();class LC extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","UpdateHealthCheck",{}).n("Route53Client","UpdateHealthCheckCommand").f(void 0,void 0).ser(Yl).de(qH).build(){}B();H();Y();class AC extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions()),i(s)]}).s("AWSDnsV20130401","UpdateHostedZoneComment",{}).n("Route53Client","UpdateHostedZoneCommentCommand").f(void 0,void 0).ser(Kl).de(vH).build(){}B();H();Y();class WC extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions()),i(s)]}).s("AWSDnsV20130401","UpdateTrafficPolicyComment",{}).n("Route53Client","UpdateTrafficPolicyCommentCommand").f(void 0,void 0).ser(Zl).de(jH).build(){}B();H();Y();class RC extends A.classBuilder().ep({...J}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions()),i(s)]}).s("AWSDnsV20130401","UpdateTrafficPolicyInstance",{}).n("Route53Client","UpdateTrafficPolicyInstanceCommand").f(void 0,void 0).ser(Jl).de(dH).build(){}var Eu={ActivateKeySigningKeyCommand:s4,AssociateVPCWithHostedZoneCommand:f4,ChangeCidrCollectionCommand:w4,ChangeResourceRecordSetsCommand:h4,ChangeTagsForResourceCommand:$4,CreateCidrCollectionCommand:E4,CreateHealthCheckCommand:I4,CreateHostedZoneCommand:F4,CreateKeySigningKeyCommand:U4,CreateQueryLoggingConfigCommand:T4,CreateReusableDelegationSetCommand:G4,CreateTrafficPolicyCommand:C4,CreateTrafficPolicyInstanceCommand:L4,CreateTrafficPolicyVersionCommand:A4,CreateVPCAssociationAuthorizationCommand:W4,DeactivateKeySigningKeyCommand:R4,DeleteCidrCollectionCommand:z4,DeleteHealthCheckCommand:S4,DeleteHostedZoneCommand:P4,DeleteKeySigningKeyCommand:X4,DeleteQueryLoggingConfigCommand:Y4,DeleteReusableDelegationSetCommand:K4,DeleteTrafficPolicyCommand:Z4,DeleteTrafficPolicyInstanceCommand:J4,DeleteVPCAssociationAuthorizationCommand:Q4,DisableHostedZoneDNSSECCommand:M4,DisassociateVPCFromHostedZoneCommand:B4,EnableHostedZoneDNSSECCommand:l4,GetAccountLimitCommand:H4,GetChangeCommand:V4,GetCheckerIpRangesCommand:D4,GetDNSSECCommand:k4,GetGeoLocationCommand:y4,GetHealthCheckCommand:N4,GetHealthCheckCountCommand:m4,GetHealthCheckLastFailureReasonCommand:i4,GetHealthCheckStatusCommand:q4,GetHostedZoneCommand:v4,GetHostedZoneCountCommand:j4,GetHostedZoneLimitCommand:d4,GetQueryLoggingConfigCommand:O4,GetReusableDelegationSetCommand:c4,GetReusableDelegationSetLimitCommand:b4,GetTrafficPolicyCommand:g4,GetTrafficPolicyInstanceCommand:_4,GetTrafficPolicyInstanceCountCommand:x4,ListCidrBlocksCommand:e4,ListCidrCollectionsCommand:n4,ListCidrLocationsCommand:o4,ListGeoLocationsCommand:a4,ListHealthChecksCommand:p4,ListHostedZonesCommand:rC,ListHostedZonesByNameCommand:u4,ListHostedZonesByVPCCommand:t4,ListQueryLoggingConfigsCommand:sC,ListResourceRecordSetsCommand:fC,ListReusableDelegationSetsCommand:wC,ListTagsForResourceCommand:hC,ListTagsForResourcesCommand:$C,ListTrafficPoliciesCommand:EC,ListTrafficPolicyInstancesCommand:UC,ListTrafficPolicyInstancesByHostedZoneCommand:IC,ListTrafficPolicyInstancesByPolicyCommand:FC,ListTrafficPolicyVersionsCommand:TC,ListVPCAssociationAuthorizationsCommand:GC,TestDNSAnswerCommand:CC,UpdateHealthCheckCommand:LC,UpdateHostedZoneCommentCommand:AC,UpdateTrafficPolicyCommentCommand:WC,UpdateTrafficPolicyInstanceCommand:RC};class Tw extends jG{}qf(Eu,Tw);xw();ew();nw();aw();Qs();var h1=d(dr(),1);Eh();B();wf();Y();var fV=d(Br(),1);ps();function Iu(r){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"route53domains",region:r.region},propertiesExtractor:(f,s)=>({signingProperties:{config:f,context:s}})}}var wV=async(r,f,s)=>{return{operation:Zs(f).operation,region:await yr(r.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},hV=(r)=>{const f=[];switch(r.operation){default:f.push(Iu(r))}return f},$V=(r)=>{return{...fV.resolveAwsSdkSigV4Config(r)}};var EV=(r)=>{return{...r,useDualstackEndpoint:r.useDualstackEndpoint??!1,useFipsEndpoint:r.useFipsEndpoint??!1,defaultSigningName:"route53domains"}},g={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var IV={name:"@aws-sdk/client-route-53-domains",description:"AWS SDK for JavaScript Route 53 Domains Client for Node.js, Browser and React Native",version:"3.637.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-route-53-domains","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo route-53-domains"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/client-sso-oidc":"3.637.0","@aws-sdk/client-sts":"3.637.0","@aws-sdk/core":"3.635.0","@aws-sdk/credential-provider-node":"3.637.0","@aws-sdk/middleware-host-header":"3.620.0","@aws-sdk/middleware-logger":"3.609.0","@aws-sdk/middleware-recursion-detection":"3.620.0","@aws-sdk/middleware-user-agent":"3.637.0","@aws-sdk/region-config-resolver":"3.614.0","@aws-sdk/types":"3.609.0","@aws-sdk/util-endpoints":"3.637.0","@aws-sdk/util-user-agent-browser":"3.609.0","@aws-sdk/util-user-agent-node":"3.614.0","@smithy/config-resolver":"^3.0.5","@smithy/core":"^2.4.0","@smithy/fetch-http-handler":"^3.2.4","@smithy/hash-node":"^3.0.3","@smithy/invalid-dependency":"^3.0.3","@smithy/middleware-content-length":"^3.0.5","@smithy/middleware-endpoint":"^3.1.0","@smithy/middleware-retry":"^3.0.15","@smithy/middleware-serde":"^3.0.3","@smithy/middleware-stack":"^3.0.3","@smithy/node-config-provider":"^3.1.4","@smithy/node-http-handler":"^3.1.4","@smithy/protocol-http":"^4.1.0","@smithy/smithy-client":"^3.2.0","@smithy/types":"^3.3.0","@smithy/url-parser":"^3.0.3","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.15","@smithy/util-defaults-mode-node":"^3.0.15","@smithy/util-endpoints":"^2.0.5","@smithy/util-middleware":"^3.0.3","@smithy/util-retry":"^3.0.3","@smithy/util-utf8":"^3.0.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node16":"16.1.3","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=16.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-route-53-domains",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-route-53-domains"}};var KV=d(Br(),1);c1();Ph();Qs();Xh();wf();ff();O0();Yh();Ls();var XV=d(Br(),1);Y();j0();C0();mf();Lw();os();var FV={["required"]:!1,type:"String"},UV={["required"]:!0,default:!1,type:"Boolean"},TV={["ref"]:"Endpoint"},RV={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},zV={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},E0={},GV={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},CV={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsDualStack"]}]},LV=[RV],AV=[zV],WV=[{["ref"]:"Region"}],Uu={version:"1.0",parameters:{Region:FV,UseDualStack:UV,UseFIPS:UV,Endpoint:FV},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[TV]}],rules:[{conditions:LV,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:AV,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:TV,properties:E0,headers:E0},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:WV}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:WV,assign:"PartitionResult"}],rules:[{conditions:[RV,zV],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,GV]},CV],rules:[{endpoint:{url:"https://route53domains-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:E0,headers:E0},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:LV,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[GV,!0]}],rules:[{endpoint:{url:"https://route53domains-fips.{Region}.{PartitionResult#dnsSuffix}",properties:E0,headers:E0},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:AV,rules:[{conditions:[CV],rules:[{endpoint:{url:"https://route53domains.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:E0,headers:E0},type:"endpoint"}],type:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",type:"error"}],type:"tree"},{endpoint:{url:"https://route53domains.{Region}.{PartitionResult#dnsSuffix}",properties:E0,headers:E0},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},SV=Uu;var PV=(r,f={})=>{return ns(SV,{endpointParams:r,logger:f.logger})};pr.aws=as;var YV=(r)=>{return{apiVersion:"2014-05-15",base64Decoder:r?.base64Decoder??Is,base64Encoder:r?.base64Encoder??Us,disableHostPrefix:r?.disableHostPrefix??!1,endpointProvider:r?.endpointProvider??PV,extensions:r?.extensions??[],httpAuthSchemeProvider:r?.httpAuthSchemeProvider??hV,httpAuthSchemes:r?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(f)=>f.getIdentityProvider("aws.auth#sigv4"),signer:new XV.AwsSdkSigV4Signer}],logger:r?.logger??new As,serviceId:r?.serviceId??"Route 53 Domains",urlParser:r?.urlParser??br,utf8Decoder:r?.utf8Decoder??gr,utf8Encoder:r?.utf8Encoder??Fs}};Y();Kh();Y();var ZV=(r)=>{Of(process.version);const f=ef(r),s=()=>f().then(df),w=YV(r);return KV.emitWarningIfUnsupportedVersion(process.version),{...w,...r,runtime:"node",defaultsMode:f,bodyLengthChecker:r?.bodyLengthChecker??xf,credentialDefaultProvider:r?.credentialDefaultProvider??A0,defaultUserAgentProvider:r?.defaultUserAgentProvider??_f({serviceId:w.serviceId,clientVersion:IV.version}),maxAttempts:r?.maxAttempts??u(kf),region:r?.region??u(Js,Mf),requestHandler:ur.create(r?.requestHandler??s),retryMode:r?.retryMode??u({...Nf,default:async()=>(await s()).retryMode||Ds}),sha256:r?.sha256??hf.bind(null,"sha256"),streamCollector:r?.streamCollector??ks,useDualstackEndpoint:r?.useDualstackEndpoint??u(Jf),useFipsEndpoint:r?.useFipsEndpoint??u(Qf)}};Zh();kr();Y();var JV=(r)=>{const f=r.httpAuthSchemes;let{httpAuthSchemeProvider:s,credentials:w}=r;return{setHttpAuthScheme(h){const $=f.findIndex((E)=>E.schemeId===h.schemeId);if($===-1)f.push(h);else f.splice($,1,h)},httpAuthSchemes(){return f},setHttpAuthSchemeProvider(h){s=h},httpAuthSchemeProvider(){return s},setCredentials(h){w=h},credentials(){return w}}},QV=(r)=>{return{httpAuthSchemes:r.httpAuthSchemes(),httpAuthSchemeProvider:r.httpAuthSchemeProvider(),credentials:r.credentials()}};var CF=(r)=>r,MV=(r,f)=>{const s={...CF(nf(r)),...CF(cf(r)),...CF(Rf(r)),...CF(JV(r))};return f.forEach((w)=>w.configure(s)),{...r,...of(s),...bf(s),...zf(s),...QV(s)}};class zC extends Ws{constructor(...[r]){const f=ZV(r||{}),s=EV(f),w=Kf(s),h=yf(w),$=Bf(h),E=Sf($),I=Vf(E),F=$V(I),U=MV(F,r?.extensions||[]);super(U);this.config=U,this.middlewareStack.use(Zf(this.config)),this.middlewareStack.use(gf(this.config)),this.middlewareStack.use(Hf(this.config)),this.middlewareStack.use(Pf(this.config)),this.middlewareStack.use(Xf(this.config)),this.middlewareStack.use(Yf(this.config)),this.middlewareStack.use(h1.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:wV,identityProviderConfigProvider:async(C)=>new h1.DefaultIdentityProviderConfig({"aws.auth#sigv4":C.credentials})})),this.middlewareStack.use(h1.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}Y();B();H();Y();Y();Y();class xs extends ys{constructor(r){super(r);Object.setPrototypeOf(this,xs.prototype)}}class LF extends xs{constructor(r){super({name:"DomainLimitExceeded",$fault:"client",...r});this.name="DomainLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,LF.prototype)}}class AF extends xs{constructor(r){super({name:"InvalidInput",$fault:"client",...r});this.name="InvalidInput",this.$fault="client",Object.setPrototypeOf(this,AF.prototype)}}class WF extends xs{constructor(r){super({name:"OperationLimitExceeded",$fault:"client",...r});this.name="OperationLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,WF.prototype)}}class RF extends xs{constructor(r){super({name:"UnsupportedTLD",$fault:"client",...r});this.name="UnsupportedTLD",this.$fault="client",Object.setPrototypeOf(this,RF.prototype)}}class zF extends xs{constructor(r){super({name:"DnssecLimitExceeded",$fault:"client",...r});this.name="DnssecLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,zF.prototype)}}class SF extends xs{constructor(r){super({name:"DuplicateRequest",$fault:"client",...r});this.name="DuplicateRequest",this.$fault="client",Object.setPrototypeOf(this,SF.prototype),this.requestId=r.requestId}}class PF extends xs{constructor(r){super({name:"TLDRulesViolation",$fault:"client",...r});this.name="TLDRulesViolation",this.$fault="client",Object.setPrototypeOf(this,PF.prototype)}}var BV=(r)=>({...r,...r.Password&&{Password:o}}),lV=(r)=>({...r,...r.AuthCode&&{AuthCode:o}});var HV=(r)=>({...r,...r.AdminContact&&{AdminContact:o},...r.RegistrantContact&&{RegistrantContact:o},...r.TechContact&&{TechContact:o},...r.AbuseContactEmail&&{AbuseContactEmail:o},...r.AbuseContactPhone&&{AbuseContactPhone:o},...r.BillingContact&&{BillingContact:o}}),VV=(r)=>({...r,...r.AdminContact&&{AdminContact:o},...r.RegistrantContact&&{RegistrantContact:o},...r.TechContact&&{TechContact:o},...r.BillingContact&&{BillingContact:o}}),DV=(r)=>({...r,...r.emailAddress&&{emailAddress:o}}),kV=(r)=>({...r,...r.AuthCode&&{AuthCode:o}}),yV=(r)=>({...r,...r.AuthCode&&{AuthCode:o},...r.AdminContact&&{AdminContact:o},...r.RegistrantContact&&{RegistrantContact:o},...r.TechContact&&{TechContact:o},...r.BillingContact&&{BillingContact:o}}),NV=(r)=>({...r,...r.Password&&{Password:o}}),mV=(r)=>({...r,...r.AdminContact&&{AdminContact:o},...r.RegistrantContact&&{RegistrantContact:o},...r.TechContact&&{TechContact:o},...r.BillingContact&&{BillingContact:o}}),iV=(r)=>({...r,...r.FIAuthKey&&{FIAuthKey:o}});var sr=d(Br(),1);kr();Y();function Ir(r){return{"content-type":"application/x-amz-json-1.1","x-amz-target":`Route53Domains_v20140515.${r}`}}var qV=async(r,f)=>{const s=Ir("AcceptDomainTransferFromAnotherAwsAccount");let w;return w=JSON.stringify(m(r)),Er(f,s,"/",void 0,w)},vV=async(r,f)=>{const s=Ir("AssociateDelegationSignerToDomain");let w;return w=JSON.stringify(m(r)),Er(f,s,"/",void 0,w)},jV=async(r,f)=>{const s=Ir("CancelDomainTransferToAnotherAwsAccount");let w;return w=JSON.stringify(m(r)),Er(f,s,"/",void 0,w)},dV=async(r,f)=>{const s=Ir("CheckDomainAvailability");let w;return w=JSON.stringify(m(r)),Er(f,s,"/",void 0,w)},OV=async(r,f)=>{const s=Ir("CheckDomainTransferability");let w;return w=JSON.stringify(m(r)),Er(f,s,"/",void 0,w)},cV=async(r,f)=>{const s=Ir("DeleteDomain");let w;return w=JSON.stringify(m(r)),Er(f,s,"/",void 0,w)},bV=async(r,f)=>{const s=Ir("DeleteTagsForDomain");let w;return w=JSON.stringify(m(r)),Er(f,s,"/",void 0,w)},gV=async(r,f)=>{const s=Ir("DisableDomainAutoRenew");let w;return w=JSON.stringify(m(r)),Er(f,s,"/",void 0,w)},_V=async(r,f)=>{const s=Ir("DisableDomainTransferLock");let w;return w=JSON.stringify(m(r)),Er(f,s,"/",void 0,w)},xV=async(r,f)=>{const s=Ir("DisassociateDelegationSignerFromDomain");let w;return w=JSON.stringify(m(r)),Er(f,s,"/",void 0,w)},eV=async(r,f)=>{const s=Ir("EnableDomainAutoRenew");let w;return w=JSON.stringify(m(r)),Er(f,s,"/",void 0,w)},nV=async(r,f)=>{const s=Ir("EnableDomainTransferLock");let w;return w=JSON.stringify(m(r)),Er(f,s,"/",void 0,w)},oV=async(r,f)=>{const s=Ir("GetContactReachabilityStatus");let w;return w=JSON.stringify(m(r)),Er(f,s,"/",void 0,w)},aV=async(r,f)=>{const s=Ir("GetDomainDetail");let w;return w=JSON.stringify(m(r)),Er(f,s,"/",void 0,w)},pV=async(r,f)=>{const s=Ir("GetDomainSuggestions");let w;return w=JSON.stringify(m(r)),Er(f,s,"/",void 0,w)},uV=async(r,f)=>{const s=Ir("GetOperationDetail");let w;return w=JSON.stringify(m(r)),Er(f,s,"/",void 0,w)},tV=async(r,f)=>{const s=Ir("ListDomains");let w;return w=JSON.stringify(m(r)),Er(f,s,"/",void 0,w)},rD=async(r,f)=>{const s=Ir("ListOperations");let w;return w=JSON.stringify(Su(r,f)),Er(f,s,"/",void 0,w)},sD=async(r,f)=>{const s=Ir("ListPrices");let w;return w=JSON.stringify(m(r)),Er(f,s,"/",void 0,w)},fD=async(r,f)=>{const s=Ir("ListTagsForDomain");let w;return w=JSON.stringify(m(r)),Er(f,s,"/",void 0,w)},wD=async(r,f)=>{const s=Ir("PushDomain");let w;return w=JSON.stringify(m(r)),Er(f,s,"/",void 0,w)},hD=async(r,f)=>{const s=Ir("RegisterDomain");let w;return w=JSON.stringify(m(r)),Er(f,s,"/",void 0,w)},$D=async(r,f)=>{const s=Ir("RejectDomainTransferFromAnotherAwsAccount");let w;return w=JSON.stringify(m(r)),Er(f,s,"/",void 0,w)},ED=async(r,f)=>{const s=Ir("RenewDomain");let w;return w=JSON.stringify(m(r)),Er(f,s,"/",void 0,w)},ID=async(r,f)=>{const s=Ir("ResendContactReachabilityEmail");let w;return w=JSON.stringify(m(r)),Er(f,s,"/",void 0,w)},FD=async(r,f)=>{const s=Ir("ResendOperationAuthorization");let w;return w=JSON.stringify(m(r)),Er(f,s,"/",void 0,w)},UD=async(r,f)=>{const s=Ir("RetrieveDomainAuthCode");let w;return w=JSON.stringify(m(r)),Er(f,s,"/",void 0,w)},TD=async(r,f)=>{const s=Ir("TransferDomain");let w;return w=JSON.stringify(m(r)),Er(f,s,"/",void 0,w)},GD=async(r,f)=>{const s=Ir("TransferDomainToAnotherAwsAccount");let w;return w=JSON.stringify(m(r)),Er(f,s,"/",void 0,w)},CD=async(r,f)=>{const s=Ir("UpdateDomainContact");let w;return w=JSON.stringify(Pu(r,f)),Er(f,s,"/",void 0,w)},LD=async(r,f)=>{const s=Ir("UpdateDomainContactPrivacy");let w;return w=JSON.stringify(m(r)),Er(f,s,"/",void 0,w)},AD=async(r,f)=>{const s=Ir("UpdateDomainNameservers");let w;return w=JSON.stringify(m(r)),Er(f,s,"/",void 0,w)},WD=async(r,f)=>{const s=Ir("UpdateTagsForDomain");let w;return w=JSON.stringify(m(r)),Er(f,s,"/",void 0,w)},RD=async(r,f)=>{const s=Ir("ViewBilling");let w;return w=JSON.stringify(Xu(r,f)),Er(f,s,"/",void 0,w)},zD=async(r,f)=>{if(r.statusCode>=300)return $r(r,f);const s=await sr.parseJsonBody(r.body,f);let w={};return w=m(s),{$metadata:t(r),...w}},SD=async(r,f)=>{if(r.statusCode>=300)return $r(r,f);const s=await sr.parseJsonBody(r.body,f);let w={};return w=m(s),{$metadata:t(r),...w}},PD=async(r,f)=>{if(r.statusCode>=300)return $r(r,f);const s=await sr.parseJsonBody(r.body,f);let w={};return w=m(s),{$metadata:t(r),...w}},XD=async(r,f)=>{if(r.statusCode>=300)return $r(r,f);const s=await sr.parseJsonBody(r.body,f);let w={};return w=m(s),{$metadata:t(r),...w}},YD=async(r,f)=>{if(r.statusCode>=300)return $r(r,f);const s=await sr.parseJsonBody(r.body,f);let w={};return w=m(s),{$metadata:t(r),...w}},KD=async(r,f)=>{if(r.statusCode>=300)return $r(r,f);const s=await sr.parseJsonBody(r.body,f);let w={};return w=m(s),{$metadata:t(r),...w}},ZD=async(r,f)=>{if(r.statusCode>=300)return $r(r,f);const s=await sr.parseJsonBody(r.body,f);let w={};return w=m(s),{$metadata:t(r),...w}},JD=async(r,f)=>{if(r.statusCode>=300)return $r(r,f);const s=await sr.parseJsonBody(r.body,f);let w={};return w=m(s),{$metadata:t(r),...w}},QD=async(r,f)=>{if(r.statusCode>=300)return $r(r,f);const s=await sr.parseJsonBody(r.body,f);let w={};return w=m(s),{$metadata:t(r),...w}},MD=async(r,f)=>{if(r.statusCode>=300)return $r(r,f);const s=await sr.parseJsonBody(r.body,f);let w={};return w=m(s),{$metadata:t(r),...w}},BD=async(r,f)=>{if(r.statusCode>=300)return $r(r,f);const s=await sr.parseJsonBody(r.body,f);let w={};return w=m(s),{$metadata:t(r),...w}},lD=async(r,f)=>{if(r.statusCode>=300)return $r(r,f);const s=await sr.parseJsonBody(r.body,f);let w={};return w=m(s),{$metadata:t(r),...w}},HD=async(r,f)=>{if(r.statusCode>=300)return $r(r,f);const s=await sr.parseJsonBody(r.body,f);let w={};return w=m(s),{$metadata:t(r),...w}},VD=async(r,f)=>{if(r.statusCode>=300)return $r(r,f);const s=await sr.parseJsonBody(r.body,f);let w={};return w=Bu(s,f),{$metadata:t(r),...w}},DD=async(r,f)=>{if(r.statusCode>=300)return $r(r,f);const s=await sr.parseJsonBody(r.body,f);let w={};return w=m(s),{$metadata:t(r),...w}},kD=async(r,f)=>{if(r.statusCode>=300)return $r(r,f);const s=await sr.parseJsonBody(r.body,f);let w={};return w=lu(s,f),{$metadata:t(r),...w}},yD=async(r,f)=>{if(r.statusCode>=300)return $r(r,f);const s=await sr.parseJsonBody(r.body,f);let w={};return w=Hu(s,f),{$metadata:t(r),...w}},ND=async(r,f)=>{if(r.statusCode>=300)return $r(r,f);const s=await sr.parseJsonBody(r.body,f);let w={};return w=Vu(s,f),{$metadata:t(r),...w}},mD=async(r,f)=>{if(r.statusCode>=300)return $r(r,f);const s=await sr.parseJsonBody(r.body,f);let w={};return w=Du(s,f),{$metadata:t(r),...w}},iD=async(r,f)=>{if(r.statusCode>=300)return $r(r,f);const s=await sr.parseJsonBody(r.body,f);let w={};return w=m(s),{$metadata:t(r),...w}},qD=async(r,f)=>{if(r.statusCode>=300)return $r(r,f);return await _r(r.body,f),{$metadata:t(r)}},vD=async(r,f)=>{if(r.statusCode>=300)return $r(r,f);const s=await sr.parseJsonBody(r.body,f);let w={};return w=m(s),{$metadata:t(r),...w}},jD=async(r,f)=>{if(r.statusCode>=300)return $r(r,f);const s=await sr.parseJsonBody(r.body,f);let w={};return w=m(s),{$metadata:t(r),...w}},dD=async(r,f)=>{if(r.statusCode>=300)return $r(r,f);const s=await sr.parseJsonBody(r.body,f);let w={};return w=m(s),{$metadata:t(r),...w}},OD=async(r,f)=>{if(r.statusCode>=300)return $r(r,f);const s=await sr.parseJsonBody(r.body,f);let w={};return w=m(s),{$metadata:t(r),...w}},cD=async(r,f)=>{if(r.statusCode>=300)return $r(r,f);return await _r(r.body,f),{$metadata:t(r)}},bD=async(r,f)=>{if(r.statusCode>=300)return $r(r,f);const s=await sr.parseJsonBody(r.body,f);let w={};return w=m(s),{$metadata:t(r),...w}},gD=async(r,f)=>{if(r.statusCode>=300)return $r(r,f);const s=await sr.parseJsonBody(r.body,f);let w={};return w=m(s),{$metadata:t(r),...w}},_D=async(r,f)=>{if(r.statusCode>=300)return $r(r,f);const s=await sr.parseJsonBody(r.body,f);let w={};return w=m(s),{$metadata:t(r),...w}},xD=async(r,f)=>{if(r.statusCode>=300)return $r(r,f);const s=await sr.parseJsonBody(r.body,f);let w={};return w=m(s),{$metadata:t(r),...w}},eD=async(r,f)=>{if(r.statusCode>=300)return $r(r,f);const s=await sr.parseJsonBody(r.body,f);let w={};return w=m(s),{$metadata:t(r),...w}},nD=async(r,f)=>{if(r.statusCode>=300)return $r(r,f);const s=await sr.parseJsonBody(r.body,f);let w={};return w=m(s),{$metadata:t(r),...w}},oD=async(r,f)=>{if(r.statusCode>=300)return $r(r,f);const s=await sr.parseJsonBody(r.body,f);let w={};return w=m(s),{$metadata:t(r),...w}},aD=async(r,f)=>{if(r.statusCode>=300)return $r(r,f);const s=await sr.parseJsonBody(r.body,f);let w={};return w=Nu(s,f),{$metadata:t(r),...w}},$r=async(r,f)=>{const s={...r,body:await sr.parseJsonErrorBody(r.body,f)},w=sr.loadRestJsonErrorCode(r,s.body);switch(w){case"DomainLimitExceeded":case"com.amazonaws.route53domains#DomainLimitExceeded":throw await Gu(s,f);case"InvalidInput":case"com.amazonaws.route53domains#InvalidInput":throw await Lu(s,f);case"OperationLimitExceeded":case"com.amazonaws.route53domains#OperationLimitExceeded":throw await Au(s,f);case"UnsupportedTLD":case"com.amazonaws.route53domains#UnsupportedTLD":throw await Ru(s,f);case"DnssecLimitExceeded":case"com.amazonaws.route53domains#DnssecLimitExceeded":throw await Tu(s,f);case"DuplicateRequest":case"com.amazonaws.route53domains#DuplicateRequest":throw await Cu(s,f);case"TLDRulesViolation":case"com.amazonaws.route53domains#TLDRulesViolation":throw await Wu(s,f);default:const h=s.body;return mu({output:r,parsedBody:h,errorCode:w})}},Tu=async(r,f)=>{const s=r.body,w=m(s),h=new zF({$metadata:t(r),...w});return D(h,s)},Gu=async(r,f)=>{const s=r.body,w=m(s),h=new LF({$metadata:t(r),...w});return D(h,s)},Cu=async(r,f)=>{const s=r.body,w=m(s),h=new SF({$metadata:t(r),...w});return D(h,s)},Lu=async(r,f)=>{const s=r.body,w=m(s),h=new AF({$metadata:t(r),...w});return D(h,s)},Au=async(r,f)=>{const s=r.body,w=m(s),h=new WF({$metadata:t(r),...w});return D(h,s)},Wu=async(r,f)=>{const s=r.body,w=m(s),h=new PF({$metadata:t(r),...w});return D(h,s)},Ru=async(r,f)=>{const s=r.body,w=m(s),h=new RF({$metadata:t(r),...w});return D(h,s)},zu=(r,f)=>{return p(r,{Currency:[],MaxPrice:MY})},Su=(r,f)=>{return p(r,{Marker:[],MaxItems:[],SortBy:[],SortOrder:[],Status:m,SubmittedSince:(s)=>s.getTime()/1000,Type:m})},Pu=(r,f)=>{return p(r,{AdminContact:m,BillingContact:m,Consent:(s)=>zu(s,f),DomainName:[],RegistrantContact:m,TechContact:m})},Xu=(r,f)=>{return p(r,{End:(s)=>s.getTime()/1000,Marker:[],MaxItems:[],Start:(s)=>s.getTime()/1000})},Yu=(r,f)=>{return p(r,{BillDate:(s)=>N(vf(Ts(s))),DomainName:T,InvoiceId:T,Operation:T,Price:Z5})},Ku=(r,f)=>{return(r||[]).filter((w)=>w!=null).map((w)=>{return Yu(w,f)})},Zu=(r,f)=>{return p(r,{ChangeOwnershipPrice:(s)=>fE(s,f),Name:T,RegistrationPrice:(s)=>fE(s,f),RenewalPrice:(s)=>fE(s,f),RestorationPrice:(s)=>fE(s,f),TransferPrice:(s)=>fE(s,f)})},Ju=(r,f)=>{return(r||[]).filter((w)=>w!=null).map((w)=>{return Zu(w,f)})},Qu=(r,f)=>{return p(r,{AutoRenew:c0,DomainName:T,Expiry:(s)=>N(vf(Ts(s))),TransferLock:c0})},Mu=(r,f)=>{return(r||[]).filter((w)=>w!=null).map((w)=>{return Qu(w,f)})},Bu=(r,f)=>{return p(r,{AbuseContactEmail:T,AbuseContactPhone:T,AdminContact:m,AdminPrivacy:c0,AutoRenew:c0,BillingContact:m,BillingPrivacy:c0,CreationDate:(s)=>N(vf(Ts(s))),DnsSec:T,DnssecKeys:m,DomainName:T,ExpirationDate:(s)=>N(vf(Ts(s))),Nameservers:m,RegistrantContact:m,RegistrantPrivacy:c0,RegistrarName:T,RegistrarUrl:T,RegistryDomainId:T,Reseller:T,StatusList:m,TechContact:m,TechPrivacy:c0,UpdatedDate:(s)=>N(vf(Ts(s))),WhoIsServer:T})},lu=(r,f)=>{return p(r,{DomainName:T,LastUpdatedDate:(s)=>N(vf(Ts(s))),Message:T,OperationId:T,Status:T,StatusFlag:T,SubmittedDate:(s)=>N(vf(Ts(s))),Type:T})},Hu=(r,f)=>{return p(r,{Domains:(s)=>Mu(s,f),NextPageMarker:T})},Vu=(r,f)=>{return p(r,{NextPageMarker:T,Operations:(s)=>yu(s,f)})},Du=(r,f)=>{return p(r,{NextPageMarker:T,Prices:(s)=>Ju(s,f)})},ku=(r,f)=>{return p(r,{DomainName:T,LastUpdatedDate:(s)=>N(vf(Ts(s))),Message:T,OperationId:T,Status:T,StatusFlag:T,SubmittedDate:(s)=>N(vf(Ts(s))),Type:T})},yu=(r,f)=>{return(r||[]).filter((w)=>w!=null).map((w)=>{return ku(w,f)})},fE=(r,f)=>{return p(r,{Currency:T,Price:Z5})},Nu=(r,f)=>{return p(r,{BillingRecords:(s)=>Ku(s,f),NextPageMarker:T})},t=(r)=>({httpStatusCode:r.statusCode,requestId:r.headers["x-amzn-requestid"]??r.headers["x-amzn-request-id"]??r.headers["x-amz-request-id"],extendedRequestId:r.headers["x-amz-id-2"],cfId:r.headers["x-amz-cf-id"]});var mu=jf(xs),Er=async(r,f,s,w,h)=>{const{hostname:$,protocol:E="https",port:I,path:F}=await r.endpoint(),U={protocol:E,hostname:$,port:I,method:"POST",path:F.endsWith("/")?F.slice(0,-1)+s:F+s,headers:f};if(w!==void 0)U.hostname=w;if(h!==void 0)U.body=h;return new Qr(U)};class SC extends A.classBuilder().ep({...g}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","AcceptDomainTransferFromAnotherAwsAccount",{}).n("Route53DomainsClient","AcceptDomainTransferFromAnotherAwsAccountCommand").f(BV,void 0).ser(qV).de(zD).build(){}B();H();Y();class PC extends A.classBuilder().ep({...g}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","AssociateDelegationSignerToDomain",{}).n("Route53DomainsClient","AssociateDelegationSignerToDomainCommand").f(void 0,void 0).ser(vV).de(SD).build(){}B();H();Y();class XC extends A.classBuilder().ep({...g}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","CancelDomainTransferToAnotherAwsAccount",{}).n("Route53DomainsClient","CancelDomainTransferToAnotherAwsAccountCommand").f(void 0,void 0).ser(jV).de(PD).build(){}B();H();Y();class YC extends A.classBuilder().ep({...g}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","CheckDomainAvailability",{}).n("Route53DomainsClient","CheckDomainAvailabilityCommand").f(void 0,void 0).ser(dV).de(XD).build(){}B();H();Y();class KC extends A.classBuilder().ep({...g}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","CheckDomainTransferability",{}).n("Route53DomainsClient","CheckDomainTransferabilityCommand").f(lV,void 0).ser(OV).de(YD).build(){}B();H();Y();class ZC extends A.classBuilder().ep({...g}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","DeleteDomain",{}).n("Route53DomainsClient","DeleteDomainCommand").f(void 0,void 0).ser(cV).de(KD).build(){}B();H();Y();class JC extends A.classBuilder().ep({...g}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","DeleteTagsForDomain",{}).n("Route53DomainsClient","DeleteTagsForDomainCommand").f(void 0,void 0).ser(bV).de(ZD).build(){}B();H();Y();class QC extends A.classBuilder().ep({...g}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","DisableDomainAutoRenew",{}).n("Route53DomainsClient","DisableDomainAutoRenewCommand").f(void 0,void 0).ser(gV).de(JD).build(){}B();H();Y();class MC extends A.classBuilder().ep({...g}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","DisableDomainTransferLock",{}).n("Route53DomainsClient","DisableDomainTransferLockCommand").f(void 0,void 0).ser(_V).de(QD).build(){}B();H();Y();class BC extends A.classBuilder().ep({...g}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","DisassociateDelegationSignerFromDomain",{}).n("Route53DomainsClient","DisassociateDelegationSignerFromDomainCommand").f(void 0,void 0).ser(xV).de(MD).build(){}B();H();Y();class lC extends A.classBuilder().ep({...g}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","EnableDomainAutoRenew",{}).n("Route53DomainsClient","EnableDomainAutoRenewCommand").f(void 0,void 0).ser(eV).de(BD).build(){}B();H();Y();class HC extends A.classBuilder().ep({...g}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","EnableDomainTransferLock",{}).n("Route53DomainsClient","EnableDomainTransferLockCommand").f(void 0,void 0).ser(nV).de(lD).build(){}B();H();Y();class VC extends A.classBuilder().ep({...g}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","GetContactReachabilityStatus",{}).n("Route53DomainsClient","GetContactReachabilityStatusCommand").f(void 0,void 0).ser(oV).de(HD).build(){}B();H();Y();class DC extends A.classBuilder().ep({...g}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","GetDomainDetail",{}).n("Route53DomainsClient","GetDomainDetailCommand").f(void 0,HV).ser(aV).de(VD).build(){}B();H();Y();class kC extends A.classBuilder().ep({...g}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","GetDomainSuggestions",{}).n("Route53DomainsClient","GetDomainSuggestionsCommand").f(void 0,void 0).ser(pV).de(DD).build(){}B();H();Y();class yC extends A.classBuilder().ep({...g}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","GetOperationDetail",{}).n("Route53DomainsClient","GetOperationDetailCommand").f(void 0,void 0).ser(uV).de(kD).build(){}B();H();Y();class NC extends A.classBuilder().ep({...g}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ListDomains",{}).n("Route53DomainsClient","ListDomainsCommand").f(void 0,void 0).ser(tV).de(yD).build(){}B();H();Y();class mC extends A.classBuilder().ep({...g}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ListOperations",{}).n("Route53DomainsClient","ListOperationsCommand").f(void 0,void 0).ser(rD).de(ND).build(){}B();H();Y();class iC extends A.classBuilder().ep({...g}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ListPrices",{}).n("Route53DomainsClient","ListPricesCommand").f(void 0,void 0).ser(sD).de(mD).build(){}B();H();Y();class qC extends A.classBuilder().ep({...g}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ListTagsForDomain",{}).n("Route53DomainsClient","ListTagsForDomainCommand").f(void 0,void 0).ser(fD).de(iD).build(){}B();H();Y();class vC extends A.classBuilder().ep({...g}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","PushDomain",{}).n("Route53DomainsClient","PushDomainCommand").f(void 0,void 0).ser(wD).de(qD).build(){}B();H();Y();class jC extends A.classBuilder().ep({...g}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","RegisterDomain",{}).n("Route53DomainsClient","RegisterDomainCommand").f(VV,void 0).ser(hD).de(vD).build(){}B();H();Y();class dC extends A.classBuilder().ep({...g}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","RejectDomainTransferFromAnotherAwsAccount",{}).n("Route53DomainsClient","RejectDomainTransferFromAnotherAwsAccountCommand").f(void 0,void 0).ser($D).de(jD).build(){}B();H();Y();class OC extends A.classBuilder().ep({...g}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","RenewDomain",{}).n("Route53DomainsClient","RenewDomainCommand").f(void 0,void 0).ser(ED).de(dD).build(){}B();H();Y();class cC extends A.classBuilder().ep({...g}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ResendContactReachabilityEmail",{}).n("Route53DomainsClient","ResendContactReachabilityEmailCommand").f(void 0,DV).ser(ID).de(OD).build(){}B();H();Y();class bC extends A.classBuilder().ep({...g}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ResendOperationAuthorization",{}).n("Route53DomainsClient","ResendOperationAuthorizationCommand").f(void 0,void 0).ser(FD).de(cD).build(){}B();H();Y();class gC extends A.classBuilder().ep({...g}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","RetrieveDomainAuthCode",{}).n("Route53DomainsClient","RetrieveDomainAuthCodeCommand").f(void 0,kV).ser(UD).de(bD).build(){}B();H();Y();class _C extends A.classBuilder().ep({...g}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","TransferDomain",{}).n("Route53DomainsClient","TransferDomainCommand").f(yV,void 0).ser(TD).de(gD).build(){}B();H();Y();class xC extends A.classBuilder().ep({...g}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","TransferDomainToAnotherAwsAccount",{}).n("Route53DomainsClient","TransferDomainToAnotherAwsAccountCommand").f(void 0,NV).ser(GD).de(_D).build(){}B();H();Y();class eC extends A.classBuilder().ep({...g}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","UpdateDomainContact",{}).n("Route53DomainsClient","UpdateDomainContactCommand").f(mV,void 0).ser(CD).de(xD).build(){}B();H();Y();class nC extends A.classBuilder().ep({...g}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","UpdateDomainContactPrivacy",{}).n("Route53DomainsClient","UpdateDomainContactPrivacyCommand").f(void 0,void 0).ser(LD).de(eD).build(){}B();H();Y();class oC extends A.classBuilder().ep({...g}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","UpdateDomainNameservers",{}).n("Route53DomainsClient","UpdateDomainNameserversCommand").f(iV,void 0).ser(AD).de(nD).build(){}B();H();Y();class aC extends A.classBuilder().ep({...g}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","UpdateTagsForDomain",{}).n("Route53DomainsClient","UpdateTagsForDomainCommand").f(void 0,void 0).ser(WD).de(oD).build(){}B();H();Y();class pC extends A.classBuilder().ep({...g}).m(function(r,f,s,w){return[W(s,this.serialize,this.deserialize),R(s,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ViewBilling",{}).n("Route53DomainsClient","ViewBillingCommand").f(void 0,void 0).ser(RD).de(aD).build(){}var iu={AcceptDomainTransferFromAnotherAwsAccountCommand:SC,AssociateDelegationSignerToDomainCommand:PC,CancelDomainTransferToAnotherAwsAccountCommand:XC,CheckDomainAvailabilityCommand:YC,CheckDomainTransferabilityCommand:KC,DeleteDomainCommand:ZC,DeleteTagsForDomainCommand:JC,DisableDomainAutoRenewCommand:QC,DisableDomainTransferLockCommand:MC,DisassociateDelegationSignerFromDomainCommand:BC,EnableDomainAutoRenewCommand:lC,EnableDomainTransferLockCommand:HC,GetContactReachabilityStatusCommand:VC,GetDomainDetailCommand:DC,GetDomainSuggestionsCommand:kC,GetOperationDetailCommand:yC,ListDomainsCommand:NC,ListOperationsCommand:mC,ListPricesCommand:iC,ListTagsForDomainCommand:qC,PushDomainCommand:vC,RegisterDomainCommand:jC,RejectDomainTransferFromAnotherAwsAccountCommand:dC,RenewDomainCommand:OC,ResendContactReachabilityEmailCommand:cC,ResendOperationAuthorizationCommand:bC,RetrieveDomainAuthCodeCommand:gC,TransferDomainCommand:_C,TransferDomainToAnotherAwsAccountCommand:xC,UpdateDomainContactCommand:eC,UpdateDomainContactPrivacyCommand:nC,UpdateDomainNameserversCommand:oC,UpdateTagsForDomainCommand:aC,ViewBillingCommand:pC};class wE extends zC{}qf(iu,wE);import{runAction as qu}from"@stacksjs/actions";import{config as uD}from"@stacksjs/config";import{Action as vu}from"@stacksjs/enums";import{err as _w,handleError as uC,ok as $1}from"@stacksjs/error-handling";import{log as Gw}from"@stacksjs/logging";import{path as ju}from"@stacksjs/path";import{fs as pD}from"@stacksjs/storage";async function $Hr(r){const f=new Tw,s=await f.listHostedZonesByName({DNSName:r});if(!s||!s.HostedZones)return _w(`No hosted zones found for domain: ${r}`);const w=s.HostedZones.find(($)=>$.Name===`${r}.`);if(!w)return _w(`Hosted Zone not found for domain: ${r}`);const h=await f.listResourceRecordSets({HostedZoneId:w.Id});if(!h||!h.ResourceRecordSets)return _w(`No DNS records found for domain: ${r}`);for(let $ of h.ResourceRecordSets)if($.Type!=="NS"&&$.Type!=="SOA")await f.changeResourceRecordSets({HostedZoneId:w.Id,ChangeBatch:{Changes:[{Action:"DELETE",ResourceRecordSet:$}]}});return await f.deleteHostedZone({Id:w.Id}),Gw.info(`Deleted Hosted Zone for domain: ${r}`),$1("success")}async function EHr(r){const f=new Tw,s=await f.listHostedZonesByName({DNSName:r});if(!s||!s.HostedZones)return _w(`No hosted zones found for domain: ${r}`);const w=s.HostedZones.find(($)=>$.Name===`${r}.`);if(!w)return _w(`Hosted Zone not found for domain: ${r}`);const h=await f.listResourceRecordSets({HostedZoneId:w.Id});if(!h||!h.ResourceRecordSets)return _w(`No DNS records found for domain: ${r}`);for(let $ of h.ResourceRecordSets)if($.Type!=="NS"&&$.Type!=="SOA")await f.changeResourceRecordSets({HostedZoneId:w.Id,ChangeBatch:{Changes:[{Action:"DELETE",ResourceRecordSet:$}]}});return Gw.info(`Deleted DNS records for domain: ${r}`),$1("success")}async function IHr(r){const f=new Tw,w=(await f.listHostedZonesByName({DNSName:r})).HostedZones?.find(($)=>$.Name===`${r}.`);if(w)return $1(w);const h=await f.createHostedZone({Name:r,CallerReference:`${Date.now()}`});if(!h.HostedZone)return _w("Failed to create hosted zone");return $1(h)}function du(r){try{const f=ju.projectConfigPath("dns.ts"),w=pD.readFileSync(f,"utf-8").replace(/nameservers: \[.*?\]/s,`nameservers: [${r.map((h)=>`'${h}'`).join(", ")}]`);pD.writeFileSync(f,w,"utf-8"),Gw.info("Nameservers have been set.")}catch(f){console.error("Error updating nameservers:",f)}}async function FHr(r){try{const f=new Tw,{HostedZones:s}=await f.listHostedZonesByName({DNSName:r});if(!s)return uC(`No hosted zones found for domain ${r}`);const w=s[0];if(w&&w.Name===`${r}.`)return $1(w.Id);return $1(null)}catch(f){return console.error(f),uC(`Failed to find hosted zone for domain ${r}`)}}async function Ou(r){if(!r)return[];try{return(await new wE().getDomainDetail({DomainName:r}))?.Nameservers?.map((w)=>w.Name)||[]}catch(f){console.error(f),uC("Error getting domain detail")}}async function cu(r,f){if(!f)f=uD.app.url;const s=await Ou(f);if(s&&r&&JSON.stringify(s.sort())!==JSON.stringify(r.sort()))return Gw.info("Updating your domain nameservers to match the ones in your hosted zone..."),Gw.debug("Hosted zone nameservers:",r),Gw.debug("Domain nameservers:",s),await new wE().updateDomainNameservers({DomainName:f,Nameservers:r.map((h)=>({Name:h}))}),du(r),Gw.info("Nameservers updated."),!0;Gw.success("Your nameservers are up to date.")}async function UHr(r){if(!r)r=uD.app.url;const f=new Tw,s=await f.listHostedZonesByName({DNSName:r});if(!s||!s.HostedZones)return!1;const w=s.HostedZones.find((h)=>h.Name===`${r}.`);if(w){const $=(await f.getHostedZone({Id:w.Id})).DelegationSet?.NameServers||[];return await cu($,r),!0}return!1}async function THr(r){return await qu(vu.DomainsAdd,r)}export{du as writeNameserversToConfig,cu as updateNameservers,UHr as hasUserDomainBeenAddedToCloud,Ou as getNameservers,FHr as findHostedZone,EHr as deleteHostedZoneRecords,$Hr as deleteHostedZone,IHr as createHostedZone,THr as addDomain};
33
+ `),AM=!0}throw new Lw.CredentialsProviderError("AWS_PROFILE is set, skipping fromEnv provider.",{logger:r.logger,tryNextLink:!0})}return r.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromEnv"),sT(r)()},async()=>{r.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromSSO");const{ssoStartUrl:s,ssoAccountId:f,ssoRegion:w,ssoRoleName:h,ssoSession:E}=r;if(!s&&!f&&!w&&!h&&!E)throw new Lw.CredentialsProviderError("Skipping SSO provider in default chain (inputs do not include SSO fields).",{logger:r.logger});const{fromSSO:$}=await Promise.resolve().then(() => (nT(),eT));return $(r)()},async()=>{r.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromIni");const{fromIni:s}=await Promise.resolve().then(() => (GM(),TM));return s(r)()},async()=>{r.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromProcess");const{fromProcess:s}=await Promise.resolve().then(() => (e5(),x5));return s(r)()},async()=>{r.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile");const{fromTokenFile:s}=await Promise.resolve().then(() => (t5(),u5));return s(r)()},async()=>{return r.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::remoteProvider"),(await MP(r))()},async()=>{throw new Lw.CredentialsProviderError("Could not load credentials from any providers",{tryNextLink:!1,logger:r.logger})}),Vn,Mn),Mn=(r)=>r?.expiration!==void 0,Vn=(r)=>r?.expiration!==void 0&&r.expiration.getTime()-Date.now()<300000;var LM=G(()=>{wT();Lw=m(Ar(),1);$s();VP()});var e1=G(()=>{LM()});pw();uw();tw();Bw();lf();var eh=m(qr(),1);Lh();B();Is();K();var bZ=m(Qr(),1);Es();function ig(r){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"route53",region:r.region},propertiesExtractor:(s,f)=>({signingProperties:{config:s,context:f}})}}var _Z=async(r,s,f)=>{return{operation:Vf(s).operation,region:await yr(r.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},gZ=(r)=>{const s=[];switch(r.operation){default:s.push(ig(r))}return s},xZ=(r)=>{return{...bZ.resolveAwsSdkSigV4Config(r)}};var eZ=(r)=>{return{...r,useDualstackEndpoint:r.useDualstackEndpoint??!1,useFipsEndpoint:r.useFipsEndpoint??!1,defaultSigningName:"route53"}},J={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var nZ={name:"@aws-sdk/client-route-53",description:"AWS SDK for JavaScript Route 53 Client for Node.js, Browser and React Native",version:"3.668.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-route-53","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo route-53"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/client-sso-oidc":"3.668.0","@aws-sdk/client-sts":"3.668.0","@aws-sdk/core":"3.667.0","@aws-sdk/credential-provider-node":"3.668.0","@aws-sdk/middleware-host-header":"3.667.0","@aws-sdk/middleware-logger":"3.667.0","@aws-sdk/middleware-recursion-detection":"3.667.0","@aws-sdk/middleware-sdk-route53":"3.667.0","@aws-sdk/middleware-user-agent":"3.668.0","@aws-sdk/region-config-resolver":"3.667.0","@aws-sdk/types":"3.667.0","@aws-sdk/util-endpoints":"3.667.0","@aws-sdk/util-user-agent-browser":"3.667.0","@aws-sdk/util-user-agent-node":"3.668.0","@aws-sdk/xml-builder":"3.662.0","@smithy/config-resolver":"^3.0.9","@smithy/core":"^2.4.8","@smithy/fetch-http-handler":"^3.2.9","@smithy/hash-node":"^3.0.7","@smithy/invalid-dependency":"^3.0.7","@smithy/middleware-content-length":"^3.0.9","@smithy/middleware-endpoint":"^3.1.4","@smithy/middleware-retry":"^3.0.23","@smithy/middleware-serde":"^3.0.7","@smithy/middleware-stack":"^3.0.7","@smithy/node-config-provider":"^3.1.8","@smithy/node-http-handler":"^3.2.4","@smithy/protocol-http":"^4.1.4","@smithy/smithy-client":"^3.4.0","@smithy/types":"^3.5.0","@smithy/url-parser":"^3.0.7","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.23","@smithy/util-defaults-mode-node":"^3.0.23","@smithy/util-endpoints":"^2.1.3","@smithy/util-middleware":"^3.0.7","@smithy/util-retry":"^3.0.7","@smithy/util-utf8":"^3.0.0","@smithy/util-waiter":"^3.1.6",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node16":"16.1.3","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=16.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-route-53",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-route-53"}};var DM=m(Qr(),1);e1();Jh();lf();Qh();Is();Ns();a0();Bh();zf();var HM=m(Qr(),1);K();n0();S0();Os();Pw();ws();var RM={["required"]:!1,type:"String"},CM={["required"]:!0,default:!1,type:"Boolean"},WM={["ref"]:"Endpoint"},qI={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},BM={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},cr={},zM={["fn"]:"stringEquals",["argv"]:[{["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"name"]},"aws"]},xh={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"name"]},jw={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!1]},H0={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!1]},SM={["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"us-east-1"}]},YM={["fn"]:"stringEquals",["argv"]:[xh,"aws-us-gov"]},XM={url:"https://route53.us-gov.amazonaws.com",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"us-gov-west-1"}]},headers:{}},KM={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},ZM={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsDualStack"]}]},PM=[qI],JM=[BM],QM=[{["ref"]:"Region"}],Hn={version:"1.0",parameters:{Region:RM,UseDualStack:CM,UseFIPS:CM,Endpoint:RM},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[WM]}],rules:[{conditions:PM,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:JM,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:WM,properties:cr,headers:cr},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:QM}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:QM,assign:"PartitionResult"}],rules:[{conditions:[zM,jw,H0],endpoint:{url:"https://route53.amazonaws.com",properties:SM,headers:cr},type:"endpoint"},{conditions:[zM,qI,H0],endpoint:{url:"https://route53-fips.amazonaws.com",properties:SM,headers:cr},type:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[xh,"aws-cn"]},jw,H0],endpoint:{url:"https://route53.amazonaws.com.cn",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"cn-northwest-1"}]},headers:cr},type:"endpoint"},{conditions:[YM,jw,H0],endpoint:XM,type:"endpoint"},{conditions:[YM,qI,H0],endpoint:XM,type:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[xh,"aws-iso"]},jw,H0],endpoint:{url:"https://route53.c2s.ic.gov",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"us-iso-east-1"}]},headers:cr},type:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[xh,"aws-iso-b"]},jw,H0],endpoint:{url:"https://route53.sc2s.sgov.gov",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"us-isob-east-1"}]},headers:cr},type:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[xh,"aws-iso-e"]},jw,H0],endpoint:{url:"https://route53.cloud.adc-e.uk",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"eu-isoe-west-1"}]},headers:cr},type:"endpoint"},{conditions:[{["fn"]:"stringEquals",["argv"]:[xh,"aws-iso-f"]},jw,H0],endpoint:{url:"https://route53.csp.hci.ic.gov",properties:{["authSchemes"]:[{name:"sigv4",["signingName"]:"route53",["signingRegion"]:"us-isof-south-1"}]},headers:cr},type:"endpoint"},{conditions:[qI,BM],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,KM]},ZM],rules:[{endpoint:{url:"https://route53-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:cr,headers:cr},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:PM,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[KM,!0]}],rules:[{endpoint:{url:"https://route53-fips.{Region}.{PartitionResult#dnsSuffix}",properties:cr,headers:cr},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:JM,rules:[{conditions:[ZM],rules:[{endpoint:{url:"https://route53.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:cr,headers:cr},type:"endpoint"}],type:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",type:"error"}],type:"tree"},{endpoint:{url:"https://route53.{Region}.{PartitionResult#dnsSuffix}",properties:cr,headers:cr},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},MM=Hn;var ln=new fs({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),VM=(r,s={})=>{return ln.get(r,()=>ss(MM,{endpointParams:r,logger:s.logger}))};ur.aws=hs;var lM=(r)=>{return{apiVersion:"2013-04-01",base64Decoder:r?.base64Decoder??Uf,base64Encoder:r?.base64Encoder??Gf,disableHostPrefix:r?.disableHostPrefix??!1,endpointProvider:r?.endpointProvider??VM,extensions:r?.extensions??[],httpAuthSchemeProvider:r?.httpAuthSchemeProvider??gZ,httpAuthSchemes:r?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(s)=>s.getIdentityProvider("aws.auth#sigv4"),signer:new HM.AwsSdkSigV4Signer}],logger:r?.logger??new Yf,serviceId:r?.serviceId??"Route 53",urlParser:r?.urlParser??br,utf8Decoder:r?.utf8Decoder??_r,utf8Encoder:r?.utf8Encoder??Tf}};K();Mh();K();var kM=(r)=>{gs(process.version);const s=us(r),f=()=>s().then(_s),w=lM(r);return DM.emitWarningIfUnsupportedVersion(process.version),{...w,...r,runtime:"node",defaultsMode:s,bodyLengthChecker:r?.bodyLengthChecker??ps,credentialDefaultProvider:r?.credentialDefaultProvider??X0,defaultUserAgentProvider:r?.defaultUserAgentProvider??os({serviceId:w.serviceId,clientVersion:nZ.version}),maxAttempts:r?.maxAttempts??u(js),region:r?.region??u(Hf,Ds),requestHandler:ff.create(r?.requestHandler??f),retryMode:r?.retryMode??u({...is,default:async()=>(await f()).retryMode||Nf}),sha256:r?.sha256??Fs.bind(null,"sha256"),streamCollector:r?.streamCollector??qf,useDualstackEndpoint:r?.useDualstackEndpoint??u(Hs),useFipsEndpoint:r?.useFipsEndpoint??u(ls),userAgentAppId:r?.userAgentAppId??u(as)}};Vh();kr();K();var yM=(r)=>{const s=r.httpAuthSchemes;let{httpAuthSchemeProvider:f,credentials:w}=r;return{setHttpAuthScheme(h){const E=s.findIndex(($)=>$.schemeId===h.schemeId);if(E===-1)s.push(h);else s.splice(E,1,h)},httpAuthSchemes(){return s},setHttpAuthSchemeProvider(h){f=h},httpAuthSchemeProvider(){return f},setCredentials(h){w=h},credentials(){return w}}},NM=(r)=>{return{httpAuthSchemes:r.httpAuthSchemes(),httpAuthSchemeProvider:r.httpAuthSchemeProvider(),credentials:r.credentials()}};var mI=(r)=>r,qM=(r,s)=>{const f={...mI(ts(r)),...mI(xs(r)),...mI(Xs(r)),...mI(yM(r))};return s.forEach((w)=>w.configure(f)),{...r,...r0(f),...es(f),...Ks(f),...NM(f)}};class rG extends Sf{constructor(...[r]){const s=kM(r||{}),f=eZ(s),w=Ms(f),h=vs(w),E=ks(h),$=Zs(E),I=qs($),F=xZ(I),U=qM(F,r?.extensions||[]);super(U);this.config=U,this.middlewareStack.use(Vs(this.config)),this.middlewareStack.use(ns(this.config)),this.middlewareStack.use(ys(this.config)),this.middlewareStack.use(Ps(this.config)),this.middlewareStack.use(Js(this.config)),this.middlewareStack.use(Qs(this.config)),this.middlewareStack.use(eh.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:_Z,identityProviderConfigProvider:async(A)=>new eh.DefaultIdentityProviderConfig({"aws.auth#sigv4":A.credentials})})),this.middlewareStack.use(eh.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}K();var jI=/^\/(hostedzone|change|delegationset)\//;function Dn(){return(r)=>async(s)=>{const{ChangeBatch:f}=s.input,w=[];for(let h of f.Changes){const{AliasTarget:E}=h.ResourceRecordSet;if(E)w.push({...h,ResourceRecordSet:{...h.ResourceRecordSet,AliasTarget:{...E,HostedZoneId:E.HostedZoneId.replace(jI,"")}}});else w.push(h)}return r({...s,input:{...s.input,ChangeBatch:{...f,Changes:w}}})}}var kn={step:"initialize",tags:["ROUTE53_IDS","CHANGE_RESOURCE_RECORD_SETS"],name:"changeResourceRecordSetsMiddleware",override:!0},mM=(r)=>({applyToStack:(s)=>{s.add(Dn(),kn)}});function Nn(){return(r)=>async(s)=>{const f={...s.input};for(let w of yn){const h=f[w];if(h)f[w]=h.replace(jI,"")}return r({...s,input:f})}}var yn=["DelegationSetId","HostedZoneId","Id"],qn={step:"initialize",tags:["ROUTE53_IDS"],name:"idNormalizerMiddleware",override:!0},j=(r)=>({applyToStack:(s)=>{s.add(Nn(),qn)}});B();V();K();var x=m(Qr(),1);function jM(r){return r.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function vM(r){return r.replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\r/g,"&#x0D;").replace(/\n/g,"&#x0A;").replace(/\u0085/g,"&#x85;").replace(/\u2028/,"&#x2028;")}class fG{constructor(r){this.value=r}toString(){return vM(""+this.value)}}class H{static of(r,s,f){const w=new H(r);if(s!==void 0)w.addChildNode(new fG(s));if(f!==void 0)w.withName(f);return w}constructor(r,s=[]){this.name=r,this.children=s,this.attributes={}}withName(r){return this.name=r,this}addAttribute(r,s){return this.attributes[r]=s,this}addChildNode(r){return this.children.push(r),this}removeAttribute(r){return delete this.attributes[r],this}n(r){return this.name=r,this}c(r){return this.children.push(r),this}a(r,s){if(s!=null)this.attributes[r]=s;return this}cc(r,s,f=s){if(r[s]!=null){const w=H.of(s,r[s]).withName(f);this.c(w)}}l(r,s,f,w){if(r[s]!=null)w().map((E)=>{E.withName(f),this.c(E)})}lc(r,s,f,w){if(r[s]!=null){const h=w(),E=new H(f);h.map(($)=>{E.c($)}),this.c(E)}}toString(){const r=Boolean(this.children.length);let s=`<${this.name}`;const f=this.attributes;for(let w of Object.keys(f)){const h=f[w];if(h!=null)s+=` ${w}="${jM(""+h)}"`}return s+=!r?"/>":`>${this.children.map((w)=>w.toString()).join("")}</${this.name}>`}}var b=m(qr(),1);K();K();class d extends mf{constructor(r){super(r);Object.setPrototypeOf(this,d.prototype)}}class vI extends d{constructor(r){super({name:"ConcurrentModification",$fault:"client",...r});this.name="ConcurrentModification",this.$fault="client",Object.setPrototypeOf(this,vI.prototype)}}class iI extends d{constructor(r){super({name:"InvalidInput",$fault:"client",...r});this.name="InvalidInput",this.$fault="client",Object.setPrototypeOf(this,iI.prototype)}}class OI extends d{constructor(r){super({name:"InvalidKeySigningKeyStatus",$fault:"client",...r});this.name="InvalidKeySigningKeyStatus",this.$fault="client",Object.setPrototypeOf(this,OI.prototype)}}class dI extends d{constructor(r){super({name:"InvalidKMSArn",$fault:"client",...r});this.name="InvalidKMSArn",this.$fault="client",Object.setPrototypeOf(this,dI.prototype)}}class cI extends d{constructor(r){super({name:"InvalidSigningStatus",$fault:"client",...r});this.name="InvalidSigningStatus",this.$fault="client",Object.setPrototypeOf(this,cI.prototype)}}class bI extends d{constructor(r){super({name:"NoSuchKeySigningKey",$fault:"client",...r});this.name="NoSuchKeySigningKey",this.$fault="client",Object.setPrototypeOf(this,bI.prototype)}}class _I extends d{constructor(r){super({name:"ConflictingDomainExists",$fault:"client",...r});this.name="ConflictingDomainExists",this.$fault="client",Object.setPrototypeOf(this,_I.prototype)}}class gI extends d{constructor(r){super({name:"InvalidVPCId",$fault:"client",...r});this.name="InvalidVPCId",this.$fault="client",Object.setPrototypeOf(this,gI.prototype)}}class xI extends d{constructor(r){super({name:"LimitsExceeded",$fault:"client",...r});this.name="LimitsExceeded",this.$fault="client",Object.setPrototypeOf(this,xI.prototype)}}class eI extends d{constructor(r){super({name:"NoSuchHostedZone",$fault:"client",...r});this.name="NoSuchHostedZone",this.$fault="client",Object.setPrototypeOf(this,eI.prototype)}}class nI extends d{constructor(r){super({name:"NotAuthorizedException",$fault:"client",...r});this.name="NotAuthorizedException",this.$fault="client",Object.setPrototypeOf(this,nI.prototype)}}class oI extends d{constructor(r){super({name:"PriorRequestNotComplete",$fault:"client",...r});this.name="PriorRequestNotComplete",this.$fault="client",Object.setPrototypeOf(this,oI.prototype)}}class aI extends d{constructor(r){super({name:"PublicZoneVPCAssociation",$fault:"client",...r});this.name="PublicZoneVPCAssociation",this.$fault="client",Object.setPrototypeOf(this,aI.prototype)}}class pI extends d{constructor(r){super({name:"CidrBlockInUseException",$fault:"client",...r});this.name="CidrBlockInUseException",this.$fault="client",Object.setPrototypeOf(this,pI.prototype),this.Message=r.Message}}class uI extends d{constructor(r){super({name:"CidrCollectionVersionMismatchException",$fault:"client",...r});this.name="CidrCollectionVersionMismatchException",this.$fault="client",Object.setPrototypeOf(this,uI.prototype),this.Message=r.Message}}class tI extends d{constructor(r){super({name:"NoSuchCidrCollectionException",$fault:"client",...r});this.name="NoSuchCidrCollectionException",this.$fault="client",Object.setPrototypeOf(this,tI.prototype),this.Message=r.Message}}class r2 extends d{constructor(r){super({name:"InvalidChangeBatch",$fault:"client",...r});this.name="InvalidChangeBatch",this.$fault="client",Object.setPrototypeOf(this,r2.prototype),this.messages=r.messages}}class f2 extends d{constructor(r){super({name:"NoSuchHealthCheck",$fault:"client",...r});this.name="NoSuchHealthCheck",this.$fault="client",Object.setPrototypeOf(this,f2.prototype)}}class s2 extends d{constructor(r){super({name:"ThrottlingException",$fault:"client",...r});this.name="ThrottlingException",this.$fault="client",Object.setPrototypeOf(this,s2.prototype)}}class w2 extends d{constructor(r){super({name:"CidrCollectionAlreadyExistsException",$fault:"client",...r});this.name="CidrCollectionAlreadyExistsException",this.$fault="client",Object.setPrototypeOf(this,w2.prototype),this.Message=r.Message}}class h2 extends d{constructor(r){super({name:"HealthCheckAlreadyExists",$fault:"client",...r});this.name="HealthCheckAlreadyExists",this.$fault="client",Object.setPrototypeOf(this,h2.prototype)}}class E2 extends d{constructor(r){super({name:"TooManyHealthChecks",$fault:"client",...r});this.name="TooManyHealthChecks",this.$fault="client",Object.setPrototypeOf(this,E2.prototype)}}class $2 extends d{constructor(r){super({name:"DelegationSetNotAvailable",$fault:"client",...r});this.name="DelegationSetNotAvailable",this.$fault="client",Object.setPrototypeOf(this,$2.prototype)}}class I2 extends d{constructor(r){super({name:"DelegationSetNotReusable",$fault:"client",...r});this.name="DelegationSetNotReusable",this.$fault="client",Object.setPrototypeOf(this,I2.prototype)}}class F2 extends d{constructor(r){super({name:"HostedZoneAlreadyExists",$fault:"client",...r});this.name="HostedZoneAlreadyExists",this.$fault="client",Object.setPrototypeOf(this,F2.prototype)}}class U2 extends d{constructor(r){super({name:"InvalidDomainName",$fault:"client",...r});this.name="InvalidDomainName",this.$fault="client",Object.setPrototypeOf(this,U2.prototype)}}class T2 extends d{constructor(r){super({name:"NoSuchDelegationSet",$fault:"client",...r});this.name="NoSuchDelegationSet",this.$fault="client",Object.setPrototypeOf(this,T2.prototype)}}class G2 extends d{constructor(r){super({name:"TooManyHostedZones",$fault:"client",...r});this.name="TooManyHostedZones",this.$fault="client",Object.setPrototypeOf(this,G2.prototype)}}class A2 extends d{constructor(r){super({name:"InvalidArgument",$fault:"client",...r});this.name="InvalidArgument",this.$fault="client",Object.setPrototypeOf(this,A2.prototype)}}class L2 extends d{constructor(r){super({name:"InvalidKeySigningKeyName",$fault:"client",...r});this.name="InvalidKeySigningKeyName",this.$fault="client",Object.setPrototypeOf(this,L2.prototype)}}class R2 extends d{constructor(r){super({name:"KeySigningKeyAlreadyExists",$fault:"client",...r});this.name="KeySigningKeyAlreadyExists",this.$fault="client",Object.setPrototypeOf(this,R2.prototype)}}class C2 extends d{constructor(r){super({name:"TooManyKeySigningKeys",$fault:"client",...r});this.name="TooManyKeySigningKeys",this.$fault="client",Object.setPrototypeOf(this,C2.prototype)}}class W2 extends d{constructor(r){super({name:"InsufficientCloudWatchLogsResourcePolicy",$fault:"client",...r});this.name="InsufficientCloudWatchLogsResourcePolicy",this.$fault="client",Object.setPrototypeOf(this,W2.prototype)}}class z2 extends d{constructor(r){super({name:"NoSuchCloudWatchLogsLogGroup",$fault:"client",...r});this.name="NoSuchCloudWatchLogsLogGroup",this.$fault="client",Object.setPrototypeOf(this,z2.prototype)}}class S2 extends d{constructor(r){super({name:"QueryLoggingConfigAlreadyExists",$fault:"client",...r});this.name="QueryLoggingConfigAlreadyExists",this.$fault="client",Object.setPrototypeOf(this,S2.prototype)}}class Y2 extends d{constructor(r){super({name:"DelegationSetAlreadyCreated",$fault:"client",...r});this.name="DelegationSetAlreadyCreated",this.$fault="client",Object.setPrototypeOf(this,Y2.prototype)}}class X2 extends d{constructor(r){super({name:"DelegationSetAlreadyReusable",$fault:"client",...r});this.name="DelegationSetAlreadyReusable",this.$fault="client",Object.setPrototypeOf(this,X2.prototype)}}class K2 extends d{constructor(r){super({name:"HostedZoneNotFound",$fault:"client",...r});this.name="HostedZoneNotFound",this.$fault="client",Object.setPrototypeOf(this,K2.prototype)}}class Z2 extends d{constructor(r){super({name:"InvalidTrafficPolicyDocument",$fault:"client",...r});this.name="InvalidTrafficPolicyDocument",this.$fault="client",Object.setPrototypeOf(this,Z2.prototype)}}class P2 extends d{constructor(r){super({name:"TooManyTrafficPolicies",$fault:"client",...r});this.name="TooManyTrafficPolicies",this.$fault="client",Object.setPrototypeOf(this,P2.prototype)}}class J2 extends d{constructor(r){super({name:"TrafficPolicyAlreadyExists",$fault:"client",...r});this.name="TrafficPolicyAlreadyExists",this.$fault="client",Object.setPrototypeOf(this,J2.prototype)}}class Q2 extends d{constructor(r){super({name:"NoSuchTrafficPolicy",$fault:"client",...r});this.name="NoSuchTrafficPolicy",this.$fault="client",Object.setPrototypeOf(this,Q2.prototype)}}class B2 extends d{constructor(r){super({name:"TooManyTrafficPolicyInstances",$fault:"client",...r});this.name="TooManyTrafficPolicyInstances",this.$fault="client",Object.setPrototypeOf(this,B2.prototype)}}class M2 extends d{constructor(r){super({name:"TrafficPolicyInstanceAlreadyExists",$fault:"client",...r});this.name="TrafficPolicyInstanceAlreadyExists",this.$fault="client",Object.setPrototypeOf(this,M2.prototype)}}class V2 extends d{constructor(r){super({name:"TooManyTrafficPolicyVersionsForCurrentPolicy",$fault:"client",...r});this.name="TooManyTrafficPolicyVersionsForCurrentPolicy",this.$fault="client",Object.setPrototypeOf(this,V2.prototype)}}class H2 extends d{constructor(r){super({name:"TooManyVPCAssociationAuthorizations",$fault:"client",...r});this.name="TooManyVPCAssociationAuthorizations",this.$fault="client",Object.setPrototypeOf(this,H2.prototype)}}class l2 extends d{constructor(r){super({name:"KeySigningKeyInParentDSRecord",$fault:"client",...r});this.name="KeySigningKeyInParentDSRecord",this.$fault="client",Object.setPrototypeOf(this,l2.prototype)}}class D2 extends d{constructor(r){super({name:"KeySigningKeyInUse",$fault:"client",...r});this.name="KeySigningKeyInUse",this.$fault="client",Object.setPrototypeOf(this,D2.prototype)}}class k2 extends d{constructor(r){super({name:"CidrCollectionInUseException",$fault:"client",...r});this.name="CidrCollectionInUseException",this.$fault="client",Object.setPrototypeOf(this,k2.prototype),this.Message=r.Message}}class y2 extends d{constructor(r){super({name:"HealthCheckInUse",$fault:"client",...r});this.name="HealthCheckInUse",this.$fault="client",Object.setPrototypeOf(this,y2.prototype)}}class N2 extends d{constructor(r){super({name:"HostedZoneNotEmpty",$fault:"client",...r});this.name="HostedZoneNotEmpty",this.$fault="client",Object.setPrototypeOf(this,N2.prototype)}}class q2 extends d{constructor(r){super({name:"NoSuchQueryLoggingConfig",$fault:"client",...r});this.name="NoSuchQueryLoggingConfig",this.$fault="client",Object.setPrototypeOf(this,q2.prototype)}}class m2 extends d{constructor(r){super({name:"DelegationSetInUse",$fault:"client",...r});this.name="DelegationSetInUse",this.$fault="client",Object.setPrototypeOf(this,m2.prototype)}}class j2 extends d{constructor(r){super({name:"TrafficPolicyInUse",$fault:"client",...r});this.name="TrafficPolicyInUse",this.$fault="client",Object.setPrototypeOf(this,j2.prototype)}}class v2 extends d{constructor(r){super({name:"NoSuchTrafficPolicyInstance",$fault:"client",...r});this.name="NoSuchTrafficPolicyInstance",this.$fault="client",Object.setPrototypeOf(this,v2.prototype)}}class i2 extends d{constructor(r){super({name:"VPCAssociationAuthorizationNotFound",$fault:"client",...r});this.name="VPCAssociationAuthorizationNotFound",this.$fault="client",Object.setPrototypeOf(this,i2.prototype)}}class O2 extends d{constructor(r){super({name:"DNSSECNotFound",$fault:"client",...r});this.name="DNSSECNotFound",this.$fault="client",Object.setPrototypeOf(this,O2.prototype)}}class d2 extends d{constructor(r){super({name:"LastVPCAssociation",$fault:"client",...r});this.name="LastVPCAssociation",this.$fault="client",Object.setPrototypeOf(this,d2.prototype)}}class c2 extends d{constructor(r){super({name:"VPCAssociationNotFound",$fault:"client",...r});this.name="VPCAssociationNotFound",this.$fault="client",Object.setPrototypeOf(this,c2.prototype)}}class b2 extends d{constructor(r){super({name:"HostedZonePartiallyDelegated",$fault:"client",...r});this.name="HostedZonePartiallyDelegated",this.$fault="client",Object.setPrototypeOf(this,b2.prototype)}}class _2 extends d{constructor(r){super({name:"KeySigningKeyWithActiveStatusNotFound",$fault:"client",...r});this.name="KeySigningKeyWithActiveStatusNotFound",this.$fault="client",Object.setPrototypeOf(this,_2.prototype)}}class g2 extends d{constructor(r){super({name:"NoSuchChange",$fault:"client",...r});this.name="NoSuchChange",this.$fault="client",Object.setPrototypeOf(this,g2.prototype)}}class x2 extends d{constructor(r){super({name:"NoSuchGeoLocation",$fault:"client",...r});this.name="NoSuchGeoLocation",this.$fault="client",Object.setPrototypeOf(this,x2.prototype)}}class e2 extends d{constructor(r){super({name:"IncompatibleVersion",$fault:"client",...r});this.name="IncompatibleVersion",this.$fault="client",Object.setPrototypeOf(this,e2.prototype)}}class n2 extends d{constructor(r){super({name:"HostedZoneNotPrivate",$fault:"client",...r});this.name="HostedZoneNotPrivate",this.$fault="client",Object.setPrototypeOf(this,n2.prototype)}}class o2 extends d{constructor(r){super({name:"NoSuchCidrLocationException",$fault:"client",...r});this.name="NoSuchCidrLocationException",this.$fault="client",Object.setPrototypeOf(this,o2.prototype),this.Message=r.Message}}class a2 extends d{constructor(r){super({name:"InvalidPaginationToken",$fault:"client",...r});this.name="InvalidPaginationToken",this.$fault="client",Object.setPrototypeOf(this,a2.prototype)}}class p2 extends d{constructor(r){super({name:"HealthCheckVersionMismatch",$fault:"client",...r});this.name="HealthCheckVersionMismatch",this.$fault="client",Object.setPrototypeOf(this,p2.prototype)}}class u2 extends d{constructor(r){super({name:"ConflictingTypes",$fault:"client",...r});this.name="ConflictingTypes",this.$fault="client",Object.setPrototypeOf(this,u2.prototype)}}var xM=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/keysigningkey/{HostedZoneId}/{Name}/activate"),f.p("HostedZoneId",()=>r.HostedZoneId,"{HostedZoneId}",!1),f.p("Name",()=>r.Name,"{Name}",!1);let h;return f.m("POST").h(w).b(h),f.build()},eM=async(r,s)=>{const f=b.requestBuilder(r,s),w={"content-type":"application/xml"};f.bp("/2013-04-01/hostedzone/{HostedZoneId}/associatevpc"),f.p("HostedZoneId",()=>r.HostedZoneId,"{HostedZoneId}",!1);let h;h=lr;const E=new H(Yp);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Fr]!=null)E.c(H.of(Sp,r[Fr]).n(Fr));if(r[Cr]!=null)E.c(f$(r[Cr],s).n(Cr));return h+=E.toString(),f.m("POST").h(w).b(h),f.build()},nM=async(r,s)=>{const f=b.requestBuilder(r,s),w={"content-type":"application/xml"};f.bp("/2013-04-01/cidrcollection/{Id}"),f.p("Id",()=>r.Id,"{Id}",!1);let h;h=lr;const E=new H(Pp);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),E.lc(r,"Changes","Changes",()=>Ea(r[Nl],s)),r[t2]!=null)E.c(H.of(t2,String(r[t2])).n(t2));return h+=E.toString(),f.m("POST").h(w).b(h),f.build()},oM=async(r,s)=>{const f=b.requestBuilder(r,s),w={"content-type":"application/xml"};f.bp("/2013-04-01/hostedzone/{HostedZoneId}/rrset"),f.p("HostedZoneId",()=>r.HostedZoneId,"{HostedZoneId}",!1);let h;h=lr;const E=new H(qp);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[f6]!=null)E.c(sa(r[f6],s).n(f6));return h+=E.toString(),f.m("POST").h(w).b(h),f.build()},aM=async(r,s)=>{const f=b.requestBuilder(r,s),w={"content-type":"application/xml"};f.bp("/2013-04-01/tags/{ResourceType}/{ResourceId}"),f.p("ResourceType",()=>r.ResourceType,"{ResourceType}",!1),f.p("ResourceId",()=>r.ResourceId,"{ResourceId}",!1);let h;h=lr;const E=new H(mp);return E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),E.lc(r,"AddTags","AddTags",()=>Ya(r[zp],s)),E.lc(r,"RemoveTagKeys","RemoveTagKeys",()=>Sa(r[Au],s)),h+=E.toString(),f.m("POST").h(w).b(h),f.build()},pM=async(r,s)=>{const f=b.requestBuilder(r,s),w={"content-type":"application/xml"};f.bp("/2013-04-01/cidrcollection");let h;h=lr;const E=new H(Jp);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Yr]!=null)E.c(H.of(Dp,r[Yr]).n(Yr));if(r[n]!=null)E.c(H.of(kp,r[n]).n(n));return h+=E.toString(),f.m("POST").h(w).b(h),f.build()},uM=async(r,s)=>{const f=b.requestBuilder(r,s),w={"content-type":"application/xml"};f.bp("/2013-04-01/healthcheck");let h;h=lr;const E=new H(Qp);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Yr]!=null)E.c(H.of(ap,r[Yr]).n(Yr));if(r[ow]!=null)E.c(Ga(r[ow],s).n(ow));return h+=E.toString(),f.m("POST").h(w).b(h),f.build()},tM=async(r,s)=>{const f=b.requestBuilder(r,s),w={"content-type":"application/xml"};f.bp("/2013-04-01/hostedzone");let h;h=lr;const E=new H(Bp);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Yr]!=null)E.c(H.of(T8,r[Yr]).n(Yr));if(r[w6]!=null)E.c(H.of(F0,r[w6]).n(w6));if(r[h6]!=null)E.c(Aa(r[h6],s).n(h6));if(r[n]!=null)E.c(H.of(Ws,r[n]).n(n));if(r[Cr]!=null)E.c(f$(r[Cr],s).n(Cr));return h+=E.toString(),f.m("POST").h(w).b(h),f.build()},rV=async(r,s)=>{const f=b.requestBuilder(r,s),w={"content-type":"application/xml"};f.bp("/2013-04-01/keysigningkey");let h;h=lr;const E=new H(Mp);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Yr]!=null)E.c(H.of(T8,r[Yr]).n(Yr));if(r[rr]!=null)E.c(H.of(F0,r[rr]).n(rr));if(r[ZG]!=null)E.c(H.of(Wu,r[ZG]).n(ZG));if(r[n]!=null)E.c(H.of(Cu,r[n]).n(n));if(r[$f]!=null)E.c(H.of(zu,r[$f]).n($f));return h+=E.toString(),f.m("POST").h(w).b(h),f.build()},fV=async(r,s)=>{const f=b.requestBuilder(r,s),w={"content-type":"application/xml"};f.bp("/2013-04-01/queryloggingconfig");let h;h=lr;const E=new H(yp);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),E.cc(r,s6),r[rr]!=null)E.c(H.of(F0,r[rr]).n(rr));return h+=E.toString(),f.m("POST").h(w).b(h),f.build()},sV=async(r,s)=>{const f=b.requestBuilder(r,s),w={"content-type":"application/xml"};f.bp("/2013-04-01/delegationset");let h;h=lr;const E=new H(Np);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Yr]!=null)E.c(H.of(T8,r[Yr]).n(Yr));if(r[rr]!=null)E.c(H.of(F0,r[rr]).n(rr));return h+=E.toString(),f.m("POST").h(w).b(h),f.build()},wV=async(r,s)=>{const f=b.requestBuilder(r,s),w={"content-type":"application/xml"};f.bp("/2013-04-01/trafficpolicy");let h;h=lr;const E=new H(vp);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Fr]!=null)E.c(H.of(A8,r[Fr]).n(Fr));if(r[D0]!=null)E.c(H.of(jl,r[D0]).n(D0));if(r[n]!=null)E.c(H.of(Zu,r[n]).n(n));return h+=E.toString(),f.m("POST").h(w).b(h),f.build()},hV=async(r,s)=>{const f=b.requestBuilder(r,s),w={"content-type":"application/xml"};f.bp("/2013-04-01/trafficpolicyinstance");let h;h=lr;const E=new H(jp);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[rr]!=null)E.c(H.of(F0,r[rr]).n(rr));if(r[n]!=null)E.c(H.of(Ws,r[n]).n(n));if(r[vr]!=null)E.c(H.of(vr,String(r[vr])).n(vr));if(E.cc(r,$1),r[_f]!=null)E.c(H.of(_f,String(r[_f])).n(_f));return h+=E.toString(),f.m("POST").h(w).b(h),f.build()},EV=async(r,s)=>{const f=b.requestBuilder(r,s),w={"content-type":"application/xml"};f.bp("/2013-04-01/trafficpolicy/{Id}"),f.p("Id",()=>r.Id,"{Id}",!1);let h;h=lr;const E=new H(ip);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Fr]!=null)E.c(H.of(A8,r[Fr]).n(Fr));if(r[D0]!=null)E.c(H.of(jl,r[D0]).n(D0));return h+=E.toString(),f.m("POST").h(w).b(h),f.build()},$V=async(r,s)=>{const f=b.requestBuilder(r,s),w={"content-type":"application/xml"};f.bp("/2013-04-01/hostedzone/{HostedZoneId}/authorizevpcassociation"),f.p("HostedZoneId",()=>r.HostedZoneId,"{HostedZoneId}",!1);let h;h=lr;const E=new H(Op);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Cr]!=null)E.c(f$(r[Cr],s).n(Cr));return h+=E.toString(),f.m("POST").h(w).b(h),f.build()},IV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/keysigningkey/{HostedZoneId}/{Name}/deactivate"),f.p("HostedZoneId",()=>r.HostedZoneId,"{HostedZoneId}",!1),f.p("Name",()=>r.Name,"{Name}",!1);let h;return f.m("POST").h(w).b(h),f.build()},FV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/cidrcollection/{Id}"),f.p("Id",()=>r.Id,"{Id}",!1);let h;return f.m("DELETE").h(w).b(h),f.build()},UV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/healthcheck/{HealthCheckId}"),f.p("HealthCheckId",()=>r.HealthCheckId,"{HealthCheckId}",!1);let h;return f.m("DELETE").h(w).b(h),f.build()},TV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/hostedzone/{Id}"),f.p("Id",()=>r.Id,"{Id}",!1);let h;return f.m("DELETE").h(w).b(h),f.build()},GV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/keysigningkey/{HostedZoneId}/{Name}"),f.p("HostedZoneId",()=>r.HostedZoneId,"{HostedZoneId}",!1),f.p("Name",()=>r.Name,"{Name}",!1);let h;return f.m("DELETE").h(w).b(h),f.build()},AV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/queryloggingconfig/{Id}"),f.p("Id",()=>r.Id,"{Id}",!1);let h;return f.m("DELETE").h(w).b(h),f.build()},LV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/delegationset/{Id}"),f.p("Id",()=>r.Id,"{Id}",!1);let h;return f.m("DELETE").h(w).b(h),f.build()},RV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/trafficpolicy/{Id}/{Version}"),f.p("Id",()=>r.Id,"{Id}",!1),f.p("Version",()=>r.Version.toString(),"{Version}",!1);let h;return f.m("DELETE").h(w).b(h),f.build()},CV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/trafficpolicyinstance/{Id}"),f.p("Id",()=>r.Id,"{Id}",!1);let h;return f.m("DELETE").h(w).b(h),f.build()},WV=async(r,s)=>{const f=b.requestBuilder(r,s),w={"content-type":"application/xml"};f.bp("/2013-04-01/hostedzone/{HostedZoneId}/deauthorizevpcassociation"),f.p("HostedZoneId",()=>r.HostedZoneId,"{HostedZoneId}",!1);let h;h=lr;const E=new H(cp);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Cr]!=null)E.c(f$(r[Cr],s).n(Cr));return h+=E.toString(),f.m("POST").h(w).b(h),f.build()},zV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/hostedzone/{HostedZoneId}/disable-dnssec"),f.p("HostedZoneId",()=>r.HostedZoneId,"{HostedZoneId}",!1);let h;return f.m("POST").h(w).b(h),f.build()},SV=async(r,s)=>{const f=b.requestBuilder(r,s),w={"content-type":"application/xml"};f.bp("/2013-04-01/hostedzone/{HostedZoneId}/disassociatevpc"),f.p("HostedZoneId",()=>r.HostedZoneId,"{HostedZoneId}",!1);let h;h=lr;const E=new H(_p);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Fr]!=null)E.c(H.of(bp,r[Fr]).n(Fr));if(r[Cr]!=null)E.c(f$(r[Cr],s).n(Cr));return h+=E.toString(),f.m("POST").h(w).b(h),f.build()},YV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/hostedzone/{HostedZoneId}/enable-dnssec"),f.p("HostedZoneId",()=>r.HostedZoneId,"{HostedZoneId}",!1);let h;return f.m("POST").h(w).b(h),f.build()},XV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/accountlimit/{Type}"),f.p("Type",()=>r.Type,"{Type}",!1);let h;return f.m("GET").h(w).b(h),f.build()},KV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/change/{Id}"),f.p("Id",()=>r.Id,"{Id}",!1);let h;return f.m("GET").h(w).b(h),f.build()},ZV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/checkeripranges");let h;return f.m("GET").h(w).b(h),f.build()},PV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/hostedzone/{HostedZoneId}/dnssec"),f.p("HostedZoneId",()=>r.HostedZoneId,"{HostedZoneId}",!1);let h;return f.m("GET").h(w).b(h),f.build()},JV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/geolocation");const h=Y({[lu]:[,r[$0]],[Du]:[,r[I0]],[cu]:[,r[U0]]});let E;return f.m("GET").h(w).q(h).b(E),f.build()},QV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/healthcheck/{HealthCheckId}"),f.p("HealthCheckId",()=>r.HealthCheckId,"{HealthCheckId}",!1);let h;return f.m("GET").h(w).b(h),f.build()},BV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/healthcheckcount");let h;return f.m("GET").h(w).b(h),f.build()},MV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/healthcheck/{HealthCheckId}/lastfailurereason"),f.p("HealthCheckId",()=>r.HealthCheckId,"{HealthCheckId}",!1);let h;return f.m("GET").h(w).b(h),f.build()},VV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/healthcheck/{HealthCheckId}/status"),f.p("HealthCheckId",()=>r.HealthCheckId,"{HealthCheckId}",!1);let h;return f.m("GET").h(w).b(h),f.build()},HV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/hostedzone/{Id}"),f.p("Id",()=>r.Id,"{Id}",!1);let h;return f.m("GET").h(w).b(h),f.build()},lV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/hostedzonecount");let h;return f.m("GET").h(w).b(h),f.build()},DV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/hostedzonelimit/{HostedZoneId}/{Type}"),f.p("Type",()=>r.Type,"{Type}",!1),f.p("HostedZoneId",()=>r.HostedZoneId,"{HostedZoneId}",!1);let h;return f.m("GET").h(w).b(h),f.build()},kV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/queryloggingconfig/{Id}"),f.p("Id",()=>r.Id,"{Id}",!1);let h;return f.m("GET").h(w).b(h),f.build()},yV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/delegationset/{Id}"),f.p("Id",()=>r.Id,"{Id}",!1);let h;return f.m("GET").h(w).b(h),f.build()},NV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/reusabledelegationsetlimit/{DelegationSetId}/{Type}"),f.p("Type",()=>r.Type,"{Type}",!1),f.p("DelegationSetId",()=>r.DelegationSetId,"{DelegationSetId}",!1);let h;return f.m("GET").h(w).b(h),f.build()},qV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/trafficpolicy/{Id}/{Version}"),f.p("Id",()=>r.Id,"{Id}",!1),f.p("Version",()=>r.Version.toString(),"{Version}",!1);let h;return f.m("GET").h(w).b(h),f.build()},mV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/trafficpolicyinstance/{Id}"),f.p("Id",()=>r.Id,"{Id}",!1);let h;return f.m("GET").h(w).b(h),f.build()},jV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/trafficpolicyinstancecount");let h;return f.m("GET").h(w).b(h),f.build()},vV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/cidrcollection/{CollectionId}/cidrblocks"),f.p("CollectionId",()=>r.CollectionId,"{CollectionId}",!1);const h=Y({[T0]:[,r[ar]],[F1]:[,r[Xr]],[$$]:[()=>r.MaxResults!==void 0,()=>r[h$].toString()]});let E;return f.m("GET").h(w).q(h).b(E),f.build()},iV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/cidrcollection");const h=Y({[F1]:[,r[Xr]],[$$]:[()=>r.MaxResults!==void 0,()=>r[h$].toString()]});let E;return f.m("GET").h(w).q(h).b(E),f.build()},OV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/cidrcollection/{CollectionId}"),f.p("CollectionId",()=>r.CollectionId,"{CollectionId}",!1);const h=Y({[F1]:[,r[Xr]],[$$]:[()=>r.MaxResults!==void 0,()=>r[h$].toString()]});let E;return f.m("GET").h(w).q(h).b(E),f.build()},dV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/geolocations");const h=Y({[bu]:[,r[Lu]],[_u]:[,r[Ru]],[gu]:[,r[Ku]],[of]:[()=>r.MaxItems!==void 0,()=>r[a].toString()]});let E;return f.m("GET").h(w).q(h).b(E),f.build()},cV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/healthcheck");const h=Y({[L8]:[,r[gf]],[of]:[()=>r.MaxItems!==void 0,()=>r[a].toString()]});let E;return f.m("GET").h(w).q(h).b(E),f.build()},bV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/hostedzone");const h=Y({[L8]:[,r[gf]],[of]:[()=>r.MaxItems!==void 0,()=>r[a].toString()],[ku]:[,r[w6]],[mu]:[,r[tp]]});let E;return f.m("GET").h(w).q(h).b(E),f.build()},_V=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/hostedzonesbyname");const h=Y({[yu]:[,r[Ws]],[E$]:[,r[rr]],[of]:[()=>r.MaxItems!==void 0,()=>r[a].toString()]});let E;return f.m("GET").h(w).q(h).b(E),f.build()},gV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/hostedzonesbyvpc");const h=Y({[ou]:[,y(r[tE],"VPCId")],[pu]:[,y(r[r$],"VPCRegion")],[of]:[()=>r.MaxItems!==void 0,()=>r[a].toString()],[F1]:[,r[Xr]]});let E;return f.m("GET").h(w).q(h).b(E),f.build()},xV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/queryloggingconfig");const h=Y({[E$]:[,r[rr]],[F1]:[,r[Xr]],[$$]:[()=>r.MaxResults!==void 0,()=>r[h$].toString()]});let E;return f.m("GET").h(w).q(h).b(E),f.build()},eV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/hostedzone/{HostedZoneId}/rrset"),f.p("HostedZoneId",()=>r.HostedZoneId,"{HostedZoneId}",!1);const h=Y({[vu]:[,r[Yu]],[xu]:[,r[Xu]],[ju]:[,r[Su]],[of]:[()=>r.MaxItems!==void 0,()=>r[a].toString()]});let E;return f.m("GET").h(w).q(h).b(E),f.build()},nV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/delegationset");const h=Y({[L8]:[,r[gf]],[of]:[()=>r.MaxItems!==void 0,()=>r[a].toString()]});let E;return f.m("GET").h(w).q(h).b(E),f.build()},oV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/tags/{ResourceType}/{ResourceId}"),f.p("ResourceType",()=>r.ResourceType,"{ResourceType}",!1),f.p("ResourceId",()=>r.ResourceId,"{ResourceId}",!1);let h;return f.m("GET").h(w).b(h),f.build()},aV=async(r,s)=>{const f=b.requestBuilder(r,s),w={"content-type":"application/xml"};f.bp("/2013-04-01/tags/{ResourceType}"),f.p("ResourceType",()=>r.ResourceType,"{ResourceType}",!1);let h;h=lr;const E=new H(fu);return E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),E.lc(r,"ResourceIds","ResourceIds",()=>Xa(r[Eu],s)),h+=E.toString(),f.m("POST").h(w).b(h),f.build()},pV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/trafficpolicies");const h=Y({[eu]:[,r[A6]],[of]:[()=>r.MaxItems!==void 0,()=>r[a].toString()]});let E;return f.m("GET").h(w).q(h).b(E),f.build()},uV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/trafficpolicyinstances");const h=Y({[E$]:[,r[Rw]],[R8]:[,r[xf]],[C8]:[,r[ef]],[of]:[()=>r.MaxItems!==void 0,()=>r[a].toString()]});let E;return f.m("GET").h(w).q(h).b(E),f.build()},tV=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/trafficpolicyinstances/hostedzone");const h=Y({[vl]:[,y(r[rr],"HostedZoneId")],[R8]:[,r[xf]],[C8]:[,r[ef]],[of]:[()=>r.MaxItems!==void 0,()=>r[a].toString()]});let E;return f.m("GET").h(w).q(h).b(E),f.build()},rH=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/trafficpolicyinstances/trafficpolicy");const h=Y({[vl]:[,y(r[$1],"TrafficPolicyId")],[au]:[y(r.TrafficPolicyVersion,"TrafficPolicyVersion")!=null,()=>r[_f].toString()],[E$]:[,r[Rw]],[R8]:[,r[xf]],[C8]:[,r[ef]],[of]:[()=>r.MaxItems!==void 0,()=>r[a].toString()]});let E;return f.m("GET").h(w).q(h).b(E),f.build()},fH=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/trafficpolicies/{Id}/versions"),f.p("Id",()=>r.Id,"{Id}",!1);const h=Y({[nu]:[,r[L6]],[of]:[()=>r.MaxItems!==void 0,()=>r[a].toString()]});let E;return f.m("GET").h(w).q(h).b(E),f.build()},sH=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/hostedzone/{HostedZoneId}/authorizevpcassociation"),f.p("HostedZoneId",()=>r.HostedZoneId,"{HostedZoneId}",!1);const h=Y({[F1]:[,r[Xr]],[$$]:[()=>r.MaxResults!==void 0,()=>r[h$].toString()]});let E;return f.m("GET").h(w).q(h).b(E),f.build()},wH=async(r,s)=>{const f=b.requestBuilder(r,s),w={};f.bp("/2013-04-01/testdnsanswer");const h=Y({[E$]:[,y(r[rr],"HostedZoneId")],[iu]:[,y(r[U6],"RecordName")],[Ou]:[,y(r[T6],"RecordType")],[du]:[,r[hu]],[Nu]:[,r[gp]],[qu]:[,r[xp]]});let E;return f.m("GET").h(w).q(h).b(E),f.build()},hH=async(r,s)=>{const f=b.requestBuilder(r,s),w={"content-type":"application/xml"};f.bp("/2013-04-01/healthcheck/{HealthCheckId}"),f.p("HealthCheckId",()=>r.HealthCheckId,"{HealthCheckId}",!1);let h;h=lr;const E=new H(Qu);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[E0]!=null)E.c(Jl(r[E0],s).n(E0));if(E.lc(r,"ChildHealthChecks","ChildHealthChecks",()=>Ql(r[vw],s)),r[Ts]!=null)E.c(H.of(Ts,String(r[Ts])).n(Ts));if(r[Gs]!=null)E.c(H.of(Gs,String(r[Gs])).n(Gs));if(r[As]!=null)E.c(H.of(As,String(r[As])).n(As));if(E.cc(r,xE),r[dw]!=null)E.c(H.of(dw,String(r[dw])).n(dw));if(r[Ls]!=null)E.c(H.of(Ls,String(r[Ls])).n(Ls));if(E.cc(r,Cw),E.cc(r,oE),r[Rs]!=null)E.c(H.of(Rs,String(r[Rs])).n(Rs));if(r[Cs]!=null)E.c(H.of(Cs,String(r[Cs])).n(Cs));return E.lc(r,"Regions","Regions",()=>Bl(r[iw],s)),E.lc(r,"ResetElements","ResetElements",()=>La(r[wu],s)),E.cc(r,aE),E.cc(r,uE),h+=E.toString(),f.m("POST").h(w).b(h),f.build()},EH=async(r,s)=>{const f=b.requestBuilder(r,s),w={"content-type":"application/xml"};f.bp("/2013-04-01/hostedzone/{Id}"),f.p("Id",()=>r.Id,"{Id}",!1);let h;h=lr;const E=new H(Bu);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Fr]!=null)E.c(H.of(G8,r[Fr]).n(Fr));return h+=E.toString(),f.m("POST").h(w).b(h),f.build()},$H=async(r,s)=>{const f=b.requestBuilder(r,s),w={"content-type":"application/xml"};f.bp("/2013-04-01/trafficpolicy/{Id}/{Version}"),f.p("Id",()=>r.Id,"{Id}",!1),f.p("Version",()=>r.Version.toString(),"{Version}",!1);let h;h=lr;const E=new H(Mu);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[Fr]!=null)E.c(H.of(A8,r[Fr]).n(Fr));return h+=E.toString(),f.m("POST").h(w).b(h),f.build()},IH=async(r,s)=>{const f=b.requestBuilder(r,s),w={"content-type":"application/xml"};f.bp("/2013-04-01/trafficpolicyinstance/{Id}"),f.p("Id",()=>r.Id,"{Id}",!1);let h;h=lr;const E=new H(Vu);if(E.a("xmlns","https://route53.amazonaws.com/doc/2013-04-01/"),r[vr]!=null)E.c(H.of(vr,String(r[vr])).n(vr));if(E.cc(r,$1),r[_f]!=null)E.c(H.of(_f,String(r[_f])).n(_f));return h+=E.toString(),f.m("POST").h(w).b(h),f.build()},FH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[wr]!=null)f[wr]=nf(w[wr],s);return f},UH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[wr]!=null)f[wr]=nf(w[wr],s);return f},TH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[Tr]!=null)f[Tr]=T(w[Tr]);return f},GH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[wr]!=null)f[wr]=nf(w[wr],s);return f},AH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)});return await gr(r.body,s),f},LH=async(r,s)=>{if(r.statusCode!==201&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r),[q0]:[,r.headers[T0]]}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[UG]!=null)f[UG]=Va(w[UG],s);return f},RH=async(r,s)=>{if(r.statusCode!==201&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r),[q0]:[,r.headers[T0]]}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[zs]!=null)f[zs]=z6(w[zs],s);return f},CH=async(r,s)=>{if(r.statusCode!==201&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r),[q0]:[,r.headers[T0]]}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[wr]!=null)f[wr]=nf(w[wr],s);if(w[Lf]!=null)f[Lf]=s$(w[Lf],s);if(w[Kf]!=null)f[Kf]=S6(w[Kf],s);if(w[Cr]!=null)f[Cr]=U8(w[Cr],s);return f},WH=async(r,s)=>{if(r.statusCode!==201&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r),[q0]:[,r.headers[T0]]}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[wr]!=null)f[wr]=nf(w[wr],s);if(w[PG]!=null)f[PG]=ll(w[PG],s);return f},zH=async(r,s)=>{if(r.statusCode!==201&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r),[q0]:[,r.headers[T0]]}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[Ww]!=null)f[Ww]=I8(w[Ww],s);return f},SH=async(r,s)=>{if(r.statusCode!==201&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r),[q0]:[,r.headers[T0]]}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[Lf]!=null)f[Lf]=s$(w[Lf],s);return f},YH=async(r,s)=>{if(r.statusCode!==201&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r),[q0]:[,r.headers[T0]]}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[Rf]!=null)f[Rf]=w$(w[Rf],s);return f},XH=async(r,s)=>{if(r.statusCode!==201&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r),[q0]:[,r.headers[T0]]}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[If]!=null)f[If]=Y6(w[If],s);return f},KH=async(r,s)=>{if(r.statusCode!==201&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r),[q0]:[,r.headers[T0]]}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[Rf]!=null)f[Rf]=w$(w[Rf],s);return f},ZH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[rr]!=null)f[rr]=T(w[rr]);if(w[Cr]!=null)f[Cr]=U8(w[Cr],s);return f},PH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[wr]!=null)f[wr]=nf(w[wr],s);return f},JH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)});return await gr(r.body,s),f},QH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)});return await gr(r.body,s),f},BH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[wr]!=null)f[wr]=nf(w[wr],s);return f},MH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[wr]!=null)f[wr]=nf(w[wr],s);return f},VH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)});return await gr(r.body,s),f},HH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)});return await gr(r.body,s),f},lH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)});return await gr(r.body,s),f},DH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)});return await gr(r.body,s),f},kH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)});return await gr(r.body,s),f},yH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[wr]!=null)f[wr]=nf(w[wr],s);return f},NH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[wr]!=null)f[wr]=nf(w[wr],s);return f},qH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[wr]!=null)f[wr]=nf(w[wr],s);return f},mH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[l0]!=null)f[l0]=xr(w[l0]);if(w[k0]!=null)f[k0]=Ka(w[k0],s);return f},jH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[wr]!=null)f[wr]=nf(w[wr],s);return f},vH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w.CheckerIpRanges==="")f[HE]=[];else if(w[HE]!=null&&w[HE][Ss]!=null)f[HE]=Ja(Gr(w[HE][Ss]),s);return f},iH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w.KeySigningKeys==="")f[mE]=[];else if(w[mE]!=null&&w[mE][Ss]!=null)f[mE]=ua(Gr(w[mE][Ss]),s);if(w[$f]!=null)f[$f]=va(w[$f],s);return f},OH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[eE]!=null)f[eE]=Ml(w[eE],s);return f},dH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[zs]!=null)f[zs]=z6(w[zs],s);return f},cH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[YG]!=null)f[YG]=xr(w[YG]);return f},bH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w.HealthCheckObservations==="")f[s0]=[];else if(w[s0]!=null&&w[s0][R6]!=null)f[s0]=Vl(Gr(w[s0][R6]),s);return f},_H=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w.HealthCheckObservations==="")f[s0]=[];else if(w[s0]!=null&&w[s0][R6]!=null)f[s0]=Vl(Gr(w[s0][R6]),s);return f},gH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[Lf]!=null)f[Lf]=s$(w[Lf],s);if(w[Kf]!=null)f[Kf]=S6(w[Kf],s);if(w.VPCs==="")f[h0]=[];else if(w[h0]!=null&&w[h0][Cr]!=null)f[h0]=yl(Gr(w[h0][Cr]),s);return f},xH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[XG]!=null)f[XG]=xr(w[XG]);return f},eH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[l0]!=null)f[l0]=xr(w[l0]);if(w[k0]!=null)f[k0]=na(w[k0],s);return f},nH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[Ww]!=null)f[Ww]=I8(w[Ww],s);return f},oH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[Lf]!=null)f[Lf]=s$(w[Lf],s);return f},aH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[l0]!=null)f[l0]=xr(w[l0]);if(w[k0]!=null)f[k0]=Fp(w[k0],s);return f},pH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[Rf]!=null)f[Rf]=w$(w[Rf],s);return f},uH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[If]!=null)f[If]=Y6(w[If],s);return f},tH=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[w8]!=null)f[w8]=hr(w[w8]);return f},rl=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w.CidrBlocks==="")f[ME]=[];else if(w[ME]!=null&&w[ME][Ss]!=null)f[ME]=Ba(Gr(w[ME][Ss]),s);if(w[Xr]!=null)f[Xr]=T(w[Xr]);return f},fl=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w.CidrCollections==="")f[VE]=[];else if(w[VE]!=null&&w[VE][Ss]!=null)f[VE]=Da(Gr(w[VE][Ss]),s);if(w[Xr]!=null)f[Xr]=T(w[Xr]);return f},sl=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w.CidrLocations==="")f[lE]=[];else if(w[lE]!=null&&w[lE][Ss]!=null)f[lE]=ta(Gr(w[lE][Ss]),s);if(w[Xr]!=null)f[Xr]=T(w[Xr]);return f},wl=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w.GeoLocationDetailsList==="")f[yE]=[];else if(w[yE]!=null&&w[yE][eE]!=null)f[yE]=da(Gr(w[yE][eE]),s);if(w[Ur]!=null)f[Ur]=Nr(w[Ur]);if(w[a]!=null)f[a]=hr(w[a]);if(w[VG]!=null)f[VG]=T(w[VG]);if(w[HG]!=null)f[HG]=T(w[HG]);if(w[qG]!=null)f[qG]=T(w[qG]);return f},hl=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w.HealthChecks==="")f[NE]=[];else if(w[NE]!=null&&w[NE][zs]!=null)f[NE]=xa(Gr(w[NE][zs]),s);if(w[Ur]!=null)f[Ur]=Nr(w[Ur]);if(w[gf]!=null)f[gf]=T(w[gf]);if(w[a]!=null)f[a]=hr(w[a]);if(w[y0]!=null)f[y0]=T(w[y0]);return f},El=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w.HostedZones==="")f[w0]=[];else if(w[w0]!=null&&w[w0][Kf]!=null)f[w0]=Hl(Gr(w[w0][Kf]),s);if(w[Ur]!=null)f[Ur]=Nr(w[Ur]);if(w[gf]!=null)f[gf]=T(w[gf]);if(w[a]!=null)f[a]=hr(w[a]);if(w[y0]!=null)f[y0]=T(w[y0]);return f},$l=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[Ws]!=null)f[Ws]=T(w[Ws]);if(w[rr]!=null)f[rr]=T(w[rr]);if(w.HostedZones==="")f[w0]=[];else if(w[w0]!=null&&w[w0][Kf]!=null)f[w0]=Hl(Gr(w[w0][Kf]),s);if(w[Ur]!=null)f[Ur]=Nr(w[Ur]);if(w[a]!=null)f[a]=hr(w[a]);if(w[lG]!=null)f[lG]=T(w[lG]);if(w[DG]!=null)f[DG]=T(w[DG]);return f},Il=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w.HostedZoneSummaries==="")f[qE]=[];else if(w[qE]!=null&&w[qE][dM]!=null)f[qE]=aa(Gr(w[qE][dM]),s);if(w[a]!=null)f[a]=hr(w[a]);if(w[Xr]!=null)f[Xr]=T(w[Xr]);return f},Fl=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[Xr]!=null)f[Xr]=T(w[Xr]);if(w.QueryLoggingConfigs==="")f[vE]=[];else if(w[vE]!=null&&w[vE][Ww]!=null)f[vE]=fp(Gr(w[vE][Ww]),s);return f},Ul=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[Ur]!=null)f[Ur]=Nr(w[Ur]);if(w[a]!=null)f[a]=hr(w[a]);if(w[kG]!=null)f[kG]=T(w[kG]);if(w[yG]!=null)f[yG]=T(w[yG]);if(w[NG]!=null)f[NG]=T(w[NG]);if(w.ResourceRecordSets==="")f[OE]=[];else if(w[OE]!=null&&w[OE][w1]!=null)f[OE]=$p(Gr(w[OE][w1]),s);return f},Tl=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w.DelegationSets==="")f[DE]=[];else if(w[DE]!=null&&w[DE][Lf]!=null)f[DE]=qa(Gr(w[DE][Lf]),s);if(w[Ur]!=null)f[Ur]=Nr(w[Ur]);if(w[gf]!=null)f[gf]=T(w[gf]);if(w[a]!=null)f[a]=hr(w[a]);if(w[y0]!=null)f[y0]=T(w[y0]);return f},Gl=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[pE]!=null)f[pE]=kl(w[pE],s);return f},Al=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w.ResourceTagSets==="")f[dE]=[];else if(w[dE]!=null&&w[dE][pE]!=null)f[dE]=Ip(Gr(w[dE][pE]),s);return f},Ll=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[Ur]!=null)f[Ur]=Nr(w[Ur]);if(w[a]!=null)f[a]=hr(w[a]);if(w[A6]!=null)f[A6]=T(w[A6]);if(w.TrafficPolicySummaries==="")f[cE]=[];else if(w[cE]!=null&&w[cE][gM]!=null)f[cE]=Lp(Gr(w[cE][gM]),s);return f},Rl=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[Rw]!=null)f[Rw]=T(w[Rw]);if(w[Ur]!=null)f[Ur]=Nr(w[Ur]);if(w[a]!=null)f[a]=hr(w[a]);if(w[xf]!=null)f[xf]=T(w[xf]);if(w[ef]!=null)f[ef]=T(w[ef]);if(w.TrafficPolicyInstances==="")f[Ef]=[];else if(w[Ef]!=null&&w[Ef][If]!=null)f[Ef]=F8(Gr(w[Ef][If]),s);return f},Cl=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[Ur]!=null)f[Ur]=Nr(w[Ur]);if(w[a]!=null)f[a]=hr(w[a]);if(w[xf]!=null)f[xf]=T(w[xf]);if(w[ef]!=null)f[ef]=T(w[ef]);if(w.TrafficPolicyInstances==="")f[Ef]=[];else if(w[Ef]!=null&&w[Ef][If]!=null)f[Ef]=F8(Gr(w[Ef][If]),s);return f},Wl=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[Rw]!=null)f[Rw]=T(w[Rw]);if(w[Ur]!=null)f[Ur]=Nr(w[Ur]);if(w[a]!=null)f[a]=hr(w[a]);if(w[xf]!=null)f[xf]=T(w[xf]);if(w[ef]!=null)f[ef]=T(w[ef]);if(w.TrafficPolicyInstances==="")f[Ef]=[];else if(w[Ef]!=null&&w[Ef][If]!=null)f[Ef]=F8(Gr(w[Ef][If]),s);return f},zl=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[Ur]!=null)f[Ur]=Nr(w[Ur]);if(w[a]!=null)f[a]=hr(w[a]);if(w.TrafficPolicies==="")f[bE]=[];else if(w[bE]!=null&&w[bE][Rf]!=null)f[bE]=Ap(Gr(w[bE][Rf]),s);if(w[L6]!=null)f[L6]=T(w[L6]);return f},Sl=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[rr]!=null)f[rr]=T(w[rr]);if(w[Xr]!=null)f[Xr]=T(w[Xr]);if(w.VPCs==="")f[h0]=[];else if(w[h0]!=null&&w[h0][Cr]!=null)f[h0]=yl(Gr(w[h0][Cr]),s);return f},Yl=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[mG]!=null)f[mG]=T(w[mG]);if(w[bG]!=null)f[bG]=T(w[bG]);if(w.RecordData==="")f[iE]=[];else if(w[iE]!=null&&w[iE][bM]!=null)f[iE]=sp(Gr(w[iE][bM]),s);if(w[U6]!=null)f[U6]=T(w[U6]);if(w[T6]!=null)f[T6]=T(w[T6]);if(w[_G]!=null)f[_G]=T(w[_G]);return f},Xl=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[zs]!=null)f[zs]=z6(w[zs],s);return f},Kl=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[Kf]!=null)f[Kf]=S6(w[Kf],s);return f},Zl=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[Rf]!=null)f[Rf]=w$(w[Rf],s);return f},Pl=async(r,s)=>{if(r.statusCode!==200&&r.statusCode>=300)return _(r,s);const f=Y({$metadata:Q(r)}),w=y(c(await x.parseXmlBody(r.body,s)),"body");if(w[If]!=null)f[If]=Y6(w[If],s);return f},_=async(r,s)=>{const f={...r,body:await x.parseXmlErrorBody(r.body,s)},w=x.loadRestXmlErrorCode(r,f.body);switch(w){case"ConcurrentModification":case"com.amazonaws.route53#ConcurrentModification":throw await cn(f,s);case"InvalidInput":case"com.amazonaws.route53#InvalidInput":throw await To(f,s);case"InvalidKMSArn":case"com.amazonaws.route53#InvalidKMSArn":throw await Lo(f,s);case"InvalidKeySigningKeyStatus":case"com.amazonaws.route53#InvalidKeySigningKeyStatus":throw await Ao(f,s);case"InvalidSigningStatus":case"com.amazonaws.route53#InvalidSigningStatus":throw await Co(f,s);case"NoSuchKeySigningKey":case"com.amazonaws.route53#NoSuchKeySigningKey":throw await ko(f,s);case"ConflictingDomainExists":case"com.amazonaws.route53#ConflictingDomainExists":throw await bn(f,s);case"InvalidVPCId":case"com.amazonaws.route53#InvalidVPCId":throw await zo(f,s);case"LimitsExceeded":case"com.amazonaws.route53#LimitsExceeded":throw await Po(f,s);case"NoSuchHostedZone":case"com.amazonaws.route53#NoSuchHostedZone":throw await Do(f,s);case"NotAuthorizedException":case"com.amazonaws.route53#NotAuthorizedException":throw await mo(f,s);case"PriorRequestNotComplete":case"com.amazonaws.route53#PriorRequestNotComplete":throw await jo(f,s);case"PublicZoneVPCAssociation":case"com.amazonaws.route53#PublicZoneVPCAssociation":throw await vo(f,s);case"CidrBlockInUseException":case"com.amazonaws.route53#CidrBlockInUseException":throw await jn(f,s);case"CidrCollectionVersionMismatchException":case"com.amazonaws.route53#CidrCollectionVersionMismatchException":throw await dn(f,s);case"NoSuchCidrCollectionException":case"com.amazonaws.route53#NoSuchCidrCollectionException":throw await Qo(f,s);case"InvalidChangeBatch":case"com.amazonaws.route53#InvalidChangeBatch":throw await Fo(f,s);case"NoSuchHealthCheck":case"com.amazonaws.route53#NoSuchHealthCheck":throw await lo(f,s);case"ThrottlingException":case"com.amazonaws.route53#ThrottlingException":throw await Oo(f,s);case"CidrCollectionAlreadyExistsException":case"com.amazonaws.route53#CidrCollectionAlreadyExistsException":throw await vn(f,s);case"HealthCheckAlreadyExists":case"com.amazonaws.route53#HealthCheckAlreadyExists":throw await pn(f,s);case"TooManyHealthChecks":case"com.amazonaws.route53#TooManyHealthChecks":throw await co(f,s);case"DelegationSetNotAvailable":case"com.amazonaws.route53#DelegationSetNotAvailable":throw await nn(f,s);case"DelegationSetNotReusable":case"com.amazonaws.route53#DelegationSetNotReusable":throw await on(f,s);case"HostedZoneAlreadyExists":case"com.amazonaws.route53#HostedZoneAlreadyExists":throw await ro(f,s);case"InvalidDomainName":case"com.amazonaws.route53#InvalidDomainName":throw await Uo(f,s);case"NoSuchDelegationSet":case"com.amazonaws.route53#NoSuchDelegationSet":throw await Vo(f,s);case"TooManyHostedZones":case"com.amazonaws.route53#TooManyHostedZones":throw await bo(f,s);case"InvalidArgument":case"com.amazonaws.route53#InvalidArgument":throw await Io(f,s);case"InvalidKeySigningKeyName":case"com.amazonaws.route53#InvalidKeySigningKeyName":throw await Go(f,s);case"KeySigningKeyAlreadyExists":case"com.amazonaws.route53#KeySigningKeyAlreadyExists":throw await So(f,s);case"TooManyKeySigningKeys":case"com.amazonaws.route53#TooManyKeySigningKeys":throw await _o(f,s);case"InsufficientCloudWatchLogsResourcePolicy":case"com.amazonaws.route53#InsufficientCloudWatchLogsResourcePolicy":throw await $o(f,s);case"NoSuchCloudWatchLogsLogGroup":case"com.amazonaws.route53#NoSuchCloudWatchLogsLogGroup":throw await Mo(f,s);case"QueryLoggingConfigAlreadyExists":case"com.amazonaws.route53#QueryLoggingConfigAlreadyExists":throw await io(f,s);case"DelegationSetAlreadyCreated":case"com.amazonaws.route53#DelegationSetAlreadyCreated":throw await gn(f,s);case"DelegationSetAlreadyReusable":case"com.amazonaws.route53#DelegationSetAlreadyReusable":throw await xn(f,s);case"HostedZoneNotFound":case"com.amazonaws.route53#HostedZoneNotFound":throw await so(f,s);case"InvalidTrafficPolicyDocument":case"com.amazonaws.route53#InvalidTrafficPolicyDocument":throw await Wo(f,s);case"TooManyTrafficPolicies":case"com.amazonaws.route53#TooManyTrafficPolicies":throw await go(f,s);case"TrafficPolicyAlreadyExists":case"com.amazonaws.route53#TrafficPolicyAlreadyExists":throw await oo(f,s);case"NoSuchTrafficPolicy":case"com.amazonaws.route53#NoSuchTrafficPolicy":throw await No(f,s);case"TooManyTrafficPolicyInstances":case"com.amazonaws.route53#TooManyTrafficPolicyInstances":throw await xo(f,s);case"TrafficPolicyInstanceAlreadyExists":case"com.amazonaws.route53#TrafficPolicyInstanceAlreadyExists":throw await ao(f,s);case"TooManyTrafficPolicyVersionsForCurrentPolicy":case"com.amazonaws.route53#TooManyTrafficPolicyVersionsForCurrentPolicy":throw await eo(f,s);case"TooManyVPCAssociationAuthorizations":case"com.amazonaws.route53#TooManyVPCAssociationAuthorizations":throw await no(f,s);case"KeySigningKeyInParentDSRecord":case"com.amazonaws.route53#KeySigningKeyInParentDSRecord":throw await Yo(f,s);case"KeySigningKeyInUse":case"com.amazonaws.route53#KeySigningKeyInUse":throw await Xo(f,s);case"CidrCollectionInUseException":case"com.amazonaws.route53#CidrCollectionInUseException":throw await On(f,s);case"HealthCheckInUse":case"com.amazonaws.route53#HealthCheckInUse":throw await un(f,s);case"HostedZoneNotEmpty":case"com.amazonaws.route53#HostedZoneNotEmpty":throw await fo(f,s);case"NoSuchQueryLoggingConfig":case"com.amazonaws.route53#NoSuchQueryLoggingConfig":throw await yo(f,s);case"DelegationSetInUse":case"com.amazonaws.route53#DelegationSetInUse":throw await en(f,s);case"TrafficPolicyInUse":case"com.amazonaws.route53#TrafficPolicyInUse":throw await po(f,s);case"NoSuchTrafficPolicyInstance":case"com.amazonaws.route53#NoSuchTrafficPolicyInstance":throw await qo(f,s);case"VPCAssociationAuthorizationNotFound":case"com.amazonaws.route53#VPCAssociationAuthorizationNotFound":throw await uo(f,s);case"DNSSECNotFound":case"com.amazonaws.route53#DNSSECNotFound":throw await an(f,s);case"LastVPCAssociation":case"com.amazonaws.route53#LastVPCAssociation":throw await Zo(f,s);case"VPCAssociationNotFound":case"com.amazonaws.route53#VPCAssociationNotFound":throw await to(f,s);case"HostedZonePartiallyDelegated":case"com.amazonaws.route53#HostedZonePartiallyDelegated":throw await ho(f,s);case"KeySigningKeyWithActiveStatusNotFound":case"com.amazonaws.route53#KeySigningKeyWithActiveStatusNotFound":throw await Ko(f,s);case"NoSuchChange":case"com.amazonaws.route53#NoSuchChange":throw await Jo(f,s);case"NoSuchGeoLocation":case"com.amazonaws.route53#NoSuchGeoLocation":throw await Ho(f,s);case"IncompatibleVersion":case"com.amazonaws.route53#IncompatibleVersion":throw await Eo(f,s);case"HostedZoneNotPrivate":case"com.amazonaws.route53#HostedZoneNotPrivate":throw await wo(f,s);case"NoSuchCidrLocationException":case"com.amazonaws.route53#NoSuchCidrLocationException":throw await Bo(f,s);case"InvalidPaginationToken":case"com.amazonaws.route53#InvalidPaginationToken":throw await Ro(f,s);case"HealthCheckVersionMismatch":case"com.amazonaws.route53#HealthCheckVersionMismatch":throw await tn(f,s);case"ConflictingTypes":case"com.amazonaws.route53#ConflictingTypes":throw await _n(f,s);default:const h=f.body;return mn({output:r,parsedBody:h.Error,errorCode:w})}},mn=bs(d),jn=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[Pr]!=null)f[Pr]=T(w[Pr]);const h=new pI({$metadata:Q(r),...f});return D(h,r.body.Error)},vn=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[Pr]!=null)f[Pr]=T(w[Pr]);const h=new w2({$metadata:Q(r),...f});return D(h,r.body.Error)},On=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[Pr]!=null)f[Pr]=T(w[Pr]);const h=new k2({$metadata:Q(r),...f});return D(h,r.body.Error)},dn=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[Pr]!=null)f[Pr]=T(w[Pr]);const h=new uI({$metadata:Q(r),...f});return D(h,r.body.Error)},cn=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new vI({$metadata:Q(r),...f});return D(h,r.body.Error)},bn=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new _I({$metadata:Q(r),...f});return D(h,r.body.Error)},_n=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new u2({$metadata:Q(r),...f});return D(h,r.body.Error)},gn=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new Y2({$metadata:Q(r),...f});return D(h,r.body.Error)},xn=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new X2({$metadata:Q(r),...f});return D(h,r.body.Error)},en=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new m2({$metadata:Q(r),...f});return D(h,r.body.Error)},nn=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new $2({$metadata:Q(r),...f});return D(h,r.body.Error)},on=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new I2({$metadata:Q(r),...f});return D(h,r.body.Error)},an=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new O2({$metadata:Q(r),...f});return D(h,r.body.Error)},pn=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new h2({$metadata:Q(r),...f});return D(h,r.body.Error)},un=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new y2({$metadata:Q(r),...f});return D(h,r.body.Error)},tn=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new p2({$metadata:Q(r),...f});return D(h,r.body.Error)},ro=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new F2({$metadata:Q(r),...f});return D(h,r.body.Error)},fo=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new N2({$metadata:Q(r),...f});return D(h,r.body.Error)},so=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new K2({$metadata:Q(r),...f});return D(h,r.body.Error)},wo=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new n2({$metadata:Q(r),...f});return D(h,r.body.Error)},ho=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new b2({$metadata:Q(r),...f});return D(h,r.body.Error)},Eo=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new e2({$metadata:Q(r),...f});return D(h,r.body.Error)},$o=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new W2({$metadata:Q(r),...f});return D(h,r.body.Error)},Io=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new A2({$metadata:Q(r),...f});return D(h,r.body.Error)},Fo=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);if(w.messages==="")f[gE]=[];else if(w[gE]!=null&&w[gE][Pr]!=null)f[gE]=ia(Gr(w[gE][Pr]),s);const h=new r2({$metadata:Q(r),...f});return D(h,r.body.Error)},Uo=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new U2({$metadata:Q(r),...f});return D(h,r.body.Error)},To=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new iI({$metadata:Q(r),...f});return D(h,r.body.Error)},Go=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new L2({$metadata:Q(r),...f});return D(h,r.body.Error)},Ao=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new OI({$metadata:Q(r),...f});return D(h,r.body.Error)},Lo=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new dI({$metadata:Q(r),...f});return D(h,r.body.Error)},Ro=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new a2({$metadata:Q(r),...f});return D(h,r.body.Error)},Co=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new cI({$metadata:Q(r),...f});return D(h,r.body.Error)},Wo=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new Z2({$metadata:Q(r),...f});return D(h,r.body.Error)},zo=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new gI({$metadata:Q(r),...f});return D(h,r.body.Error)},So=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new R2({$metadata:Q(r),...f});return D(h,r.body.Error)},Yo=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new l2({$metadata:Q(r),...f});return D(h,r.body.Error)},Xo=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new D2({$metadata:Q(r),...f});return D(h,r.body.Error)},Ko=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new _2({$metadata:Q(r),...f});return D(h,r.body.Error)},Zo=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new d2({$metadata:Q(r),...f});return D(h,r.body.Error)},Po=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new xI({$metadata:Q(r),...f});return D(h,r.body.Error)},Jo=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new g2({$metadata:Q(r),...f});return D(h,r.body.Error)},Qo=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[Pr]!=null)f[Pr]=T(w[Pr]);const h=new tI({$metadata:Q(r),...f});return D(h,r.body.Error)},Bo=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[Pr]!=null)f[Pr]=T(w[Pr]);const h=new o2({$metadata:Q(r),...f});return D(h,r.body.Error)},Mo=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new z2({$metadata:Q(r),...f});return D(h,r.body.Error)},Vo=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new T2({$metadata:Q(r),...f});return D(h,r.body.Error)},Ho=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new x2({$metadata:Q(r),...f});return D(h,r.body.Error)},lo=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new f2({$metadata:Q(r),...f});return D(h,r.body.Error)},Do=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new eI({$metadata:Q(r),...f});return D(h,r.body.Error)},ko=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new bI({$metadata:Q(r),...f});return D(h,r.body.Error)},yo=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new q2({$metadata:Q(r),...f});return D(h,r.body.Error)},No=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new Q2({$metadata:Q(r),...f});return D(h,r.body.Error)},qo=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new v2({$metadata:Q(r),...f});return D(h,r.body.Error)},mo=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new nI({$metadata:Q(r),...f});return D(h,r.body.Error)},jo=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new oI({$metadata:Q(r),...f});return D(h,r.body.Error)},vo=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new aI({$metadata:Q(r),...f});return D(h,r.body.Error)},io=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new S2({$metadata:Q(r),...f});return D(h,r.body.Error)},Oo=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new s2({$metadata:Q(r),...f});return D(h,r.body.Error)},co=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new E2({$metadata:Q(r),...f});return D(h,r.body.Error)},bo=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new G2({$metadata:Q(r),...f});return D(h,r.body.Error)},_o=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new C2({$metadata:Q(r),...f});return D(h,r.body.Error)},go=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new P2({$metadata:Q(r),...f});return D(h,r.body.Error)},xo=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new B2({$metadata:Q(r),...f});return D(h,r.body.Error)},eo=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new V2({$metadata:Q(r),...f});return D(h,r.body.Error)},no=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new H2({$metadata:Q(r),...f});return D(h,r.body.Error)},oo=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new J2({$metadata:Q(r),...f});return D(h,r.body.Error)},ao=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new M2({$metadata:Q(r),...f});return D(h,r.body.Error)},po=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new j2({$metadata:Q(r),...f});return D(h,r.body.Error)},uo=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new i2({$metadata:Q(r),...f});return D(h,r.body.Error)},to=async(r,s)=>{const f=Y({}),w=r.body.Error;if(w[X]!=null)f[X]=T(w[X]);const h=new c2({$metadata:Q(r),...f});return D(h,r.body.Error)},Jl=(r,s)=>{const f=new H(E0);if(r[ir]!=null)f.c(H.of(dp,r[ir]).n(ir));if(r[n]!=null)f.c(H.of(Wp,r[n]).n(n));return f},ra=(r,s)=>{const f=new H(_w);if(r[rr]!=null)f.c(H.of(F0,r[rr]).n(rr));if(f.cc(r,Ws),r[uh]!=null)f.c(H.of(Cp,String(r[uh])).n(uh));return f},fa=(r,s)=>{const f=new H(ql);if(r[oh]!=null)f.c(H.of(Xp,r[oh]).n(oh));if(r[w1]!=null)f.c(Wa(r[w1],s).n(w1));return f},sa=(r,s)=>{const f=new H(f6);if(r[Fr]!=null)f.c(H.of(G8,r[Fr]).n(Fr));return f.lc(r,"Changes","Changes",()=>wa(r[Nl],s)),f},wa=(r,s)=>{return r.filter((f)=>f!=null).map((f)=>{return fa(f,s).n(ql)})},Ql=(r,s)=>{return r.filter((f)=>f!=null).map((f)=>{return H.of(nE,f).n($8)})},ha=(r,s)=>{const f=new H(Kp);if(r[ar]!=null)f.c(H.of(Hp,r[ar]).n(ar));if(r[oh]!=null)f.c(H.of(Zp,r[oh]).n(oh));return f.lc(r,"CidrList","CidrList",()=>$a(r[lp],s)),f},Ea=(r,s)=>{return r.filter((f)=>f!=null).map((f)=>{return ha(f,s).n(Ss)})},$a=(r,s)=>{return r.filter((f)=>f!=null).map((f)=>{return H.of(iM,f).n(iM)})},Ia=(r,s)=>{const f=new H(gw);if(r[ph]!=null)f.c(H.of(Hu,r[ph]).n(ph));if(r[ar]!=null)f.c(H.of(Vp,r[ar]).n(ar));return f},Fa=(r,s)=>{const f=new H(xw);return f.cc(r,$6),f.cc(r,I6),f},Ua=(r,s)=>{const f=new H(ew);if(r[$0]!=null)f.c(H.of(ep,r[$0]).n($0));if(r[I0]!=null)f.c(H.of(np,r[I0]).n(I0));if(r[U0]!=null)f.c(H.of(op,r[U0]).n(U0));return f},Ta=(r,s)=>{const f=new H(nw);if(f.cc(r,r6),f.cc(r,E6),r[xw]!=null)f.c(Fa(r[xw],s).n(xw));if(r[Ow]!=null)f.c(H.of(Ow,String(r[Ow])).n(Ow));return f},Ga=(r,s)=>{const f=new H(ow);if(f.cc(r,Cw),r[Cs]!=null)f.c(H.of(Cs,String(r[Cs])).n(Cs));if(r[Lr]!=null)f.c(H.of(up,r[Lr]).n(Lr));if(f.cc(r,aE),f.cc(r,xE),f.cc(r,uE),r[bw]!=null)f.c(H.of(bw,String(r[bw])).n(bw));if(r[As]!=null)f.c(H.of(As,String(r[As])).n(As));if(r[cw]!=null)f.c(H.of(cw,String(r[cw])).n(cw));if(r[Rs]!=null)f.c(H.of(Rs,String(r[Rs])).n(Rs));if(r[Ts]!=null)f.c(H.of(Ts,String(r[Ts])).n(Ts));if(r[Ls]!=null)f.c(H.of(Ls,String(r[Ls])).n(Ls));if(f.lc(r,"ChildHealthChecks","ChildHealthChecks",()=>Ql(r[vw],s)),r[Gs]!=null)f.c(H.of(Gs,String(r[Gs])).n(Gs));if(f.lc(r,"Regions","Regions",()=>Bl(r[iw],s)),r[E0]!=null)f.c(Jl(r[E0],s).n(E0));return f.cc(r,oE),f.cc(r,F6),f},Bl=(r,s)=>{return r.filter((f)=>f!=null).map((f)=>{return H.of(pp,f).n(ir)})},Aa=(r,s)=>{const f=new H(h6);if(r[Fr]!=null)f.c(H.of(G8,r[Fr]).n(Fr));if(r[s1]!=null)f.c(H.of(ru,String(r[s1])).n(s1));return f},La=(r,s)=>{return r.filter((f)=>f!=null).map((f)=>{return H.of(_M,f).n(_M)})},Ra=(r,s)=>{const f=new H(C6);if(r[Kr]!=null)f.c(H.of(su,r[Kr]).n(Kr));return f},Ca=(r,s)=>{return r.filter((f)=>f!=null).map((f)=>{return Ra(f,s).n(C6)})},Wa=(r,s)=>{const f=new H(w1);if(r[n]!=null)f.c(H.of(Ws,r[n]).n(n));if(r[Lr]!=null)f.c(H.of(Gu,r[Lr]).n(Lr));if(r[h1]!=null)f.c(H.of(Iu,r[h1]).n(h1));if(r[I1]!=null)f.c(H.of(Tu,String(r[I1])).n(I1));if(r[ir]!=null)f.c(H.of(Uu,r[ir]).n(ir));if(r[ew]!=null)f.c(Ua(r[ew],s).n(ew));if(r[th]!=null)f.c(H.of($u,r[th]).n(th));if(r[f1]!=null)f.c(H.of(Fu,String(r[f1])).n(f1));if(r[vr]!=null)f.c(H.of(vr,String(r[vr])).n(vr));if(f.lc(r,"ResourceRecords","ResourceRecords",()=>Ca(r[nh],s)),r[_w]!=null)f.c(ra(r[_w],s).n(_w));if(f.cc(r,nE),f.cc(r,G6),r[gw]!=null)f.c(Ia(r[gw],s).n(gw));if(r[nw]!=null)f.c(Ta(r[nw],s).n(nw));return f},za=(r,s)=>{const f=new H(W6);if(r[aw]!=null)f.c(H.of(ml,r[aw]).n(aw));if(r[Kr]!=null)f.c(H.of(Ju,r[Kr]).n(Kr));return f},Sa=(r,s)=>{return r.filter((f)=>f!=null).map((f)=>{return H.of(ml,f).n(aw)})},Ya=(r,s)=>{return r.filter((f)=>f!=null).map((f)=>{return za(f,s).n(W6)})},Xa=(r,s)=>{return r.filter((f)=>f!=null).map((f)=>{return H.of(Pu,f).n(F0)})},f$=(r,s)=>{const f=new H(Cr);return f.cc(r,r$),f.cc(r,tE),f},Ka=(r,s)=>{const f={};if(r[Lr]!=null)f[Lr]=T(r[Lr]);if(r[Kr]!=null)f[Kr]=xr(r[Kr]);return f},Za=(r,s)=>{const f={};if(r[ir]!=null)f[ir]=T(r[ir]);if(r[n]!=null)f[n]=T(r[n]);return f},Pa=(r,s)=>{const f={};if(r[rr]!=null)f[rr]=T(r[rr]);if(r[Ws]!=null)f[Ws]=T(r[Ws]);if(r[uh]!=null)f[uh]=Nr(r[uh]);return f},nf=(r,s)=>{const f={};if(r[Tr]!=null)f[Tr]=T(r[Tr]);if(r[$f]!=null)f[$f]=T(r[$f]);if(r[eG]!=null)f[eG]=y(yw(r[eG]));if(r[Fr]!=null)f[Fr]=T(r[Fr]);return f},Ja=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return T(f)})},Qa=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return T(f)})},Ba=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return Ma(f,s)})},Ma=(r,s)=>{const f={};if(r[sG]!=null)f[sG]=T(r[sG]);if(r[ar]!=null)f[ar]=T(r[ar]);return f},Va=(r,s)=>{const f={};if(r[ah]!=null)f[ah]=T(r[ah]);if(r[Tr]!=null)f[Tr]=T(r[Tr]);if(r[n]!=null)f[n]=T(r[n]);if(r[N0]!=null)f[N0]=xr(r[N0]);return f},Ha=(r,s)=>{const f={};if(r[ph]!=null)f[ph]=T(r[ph]);if(r[ar]!=null)f[ar]=T(r[ar]);return f},la=(r,s)=>{const f={};if(r[zG]!=null)f[zG]=hr(r[zG]);if(r[E8]!=null)f[E8]=KZ(r[E8]);if(r[$G]!=null)f[$G]=T(r[$G]);if(r[cG]!=null)f[cG]=hr(r[cG]);if(r[MG]!=null)f[MG]=T(r[MG]);if(r[jG]!=null)f[jG]=T(r[jG]);if(r[r8]!=null)f[r8]=T(r[r8]);if(r.Dimensions==="")f[kE]=[];else if(r[kE]!=null&&r[kE][OM]!=null)f[kE]=ja(Gr(r[kE][OM]),s);return f},Da=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return ka(f,s)})},ka=(r,s)=>{const f={};if(r[ah]!=null)f[ah]=T(r[ah]);if(r[Tr]!=null)f[Tr]=T(r[Tr]);if(r[n]!=null)f[n]=T(r[n]);if(r[N0]!=null)f[N0]=xr(r[N0]);return f},ya=(r,s)=>{const f={};if(r[$6]!=null)f[$6]=T(r[$6]);if(r[I6]!=null)f[I6]=T(r[I6]);return f},s$=(r,s)=>{const f={};if(r[Tr]!=null)f[Tr]=T(r[Tr]);if(r[Yr]!=null)f[Yr]=T(r[Yr]);if(r.NameServers==="")f[jE]=[];else if(r[jE]!=null&&r[jE][cM]!=null)f[jE]=Na(Gr(r[jE][cM]),s);return f},Na=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return T(f)})},qa=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return s$(f,s)})},ma=(r,s)=>{const f={};if(r[n]!=null)f[n]=T(r[n]);if(r[Kr]!=null)f[Kr]=T(r[Kr]);return f},ja=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return ma(f,s)})},va=(r,s)=>{const f={};if(r[tG]!=null)f[tG]=T(r[tG]);if(r[E1]!=null)f[E1]=T(r[E1]);return f},ia=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return T(f)})},Oa=(r,s)=>{const f={};if(r[$0]!=null)f[$0]=T(r[$0]);if(r[I0]!=null)f[I0]=T(r[I0]);if(r[U0]!=null)f[U0]=T(r[U0]);return f},Ml=(r,s)=>{const f={};if(r[$0]!=null)f[$0]=T(r[$0]);if(r[hG]!=null)f[hG]=T(r[hG]);if(r[I0]!=null)f[I0]=T(r[I0]);if(r[EG]!=null)f[EG]=T(r[EG]);if(r[U0]!=null)f[U0]=T(r[U0]);if(r[aG]!=null)f[aG]=T(r[aG]);return f},da=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return Ml(f,s)})},ca=(r,s)=>{const f={};if(r[r6]!=null)f[r6]=T(r[r6]);if(r[E6]!=null)f[E6]=T(r[E6]);if(r[xw]!=null)f[xw]=ya(r[xw],s);if(r[Ow]!=null)f[Ow]=hr(r[Ow]);return f},z6=(r,s)=>{const f={};if(r[Tr]!=null)f[Tr]=T(r[Tr]);if(r[Yr]!=null)f[Yr]=T(r[Yr]);if(r[r1]!=null)f[r1]=Dl(r[r1],s);if(r[ow]!=null)f[ow]=ba(r[ow],s);if(r[dw]!=null)f[dw]=xr(r[dw]);if(r[FG]!=null)f[FG]=la(r[FG],s);return f},ba=(r,s)=>{const f={};if(r[Cw]!=null)f[Cw]=T(r[Cw]);if(r[Cs]!=null)f[Cs]=hr(r[Cs]);if(r[Lr]!=null)f[Lr]=T(r[Lr]);if(r[aE]!=null)f[aE]=T(r[aE]);if(r[xE]!=null)f[xE]=T(r[xE]);if(r[uE]!=null)f[uE]=T(r[uE]);if(r[bw]!=null)f[bw]=hr(r[bw]);if(r[As]!=null)f[As]=hr(r[As]);if(r[cw]!=null)f[cw]=Nr(r[cw]);if(r[Rs]!=null)f[Rs]=Nr(r[Rs]);if(r[Ts]!=null)f[Ts]=Nr(r[Ts]);if(r[Ls]!=null)f[Ls]=hr(r[Ls]);if(r.ChildHealthChecks==="")f[vw]=[];else if(r[vw]!=null&&r[vw][$8]!=null)f[vw]=Qa(Gr(r[vw][$8]),s);if(r[Gs]!=null)f[Gs]=Nr(r[Gs]);if(r.Regions==="")f[iw]=[];else if(r[iw]!=null&&r[iw][ir]!=null)f[iw]=ga(Gr(r[iw][ir]),s);if(r[E0]!=null)f[E0]=Za(r[E0],s);if(r[oE]!=null)f[oE]=T(r[oE]);if(r[F6]!=null)f[F6]=T(r[F6]);return f},_a=(r,s)=>{const f={};if(r[ir]!=null)f[ir]=T(r[ir]);if(r[Cw]!=null)f[Cw]=T(r[Cw]);if(r[uG]!=null)f[uG]=Up(r[uG],s);return f},Vl=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return _a(f,s)})},ga=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return T(f)})},xa=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return z6(f,s)})},S6=(r,s)=>{const f={};if(r[Tr]!=null)f[Tr]=T(r[Tr]);if(r[n]!=null)f[n]=T(r[n]);if(r[Yr]!=null)f[Yr]=T(r[Yr]);if(r[TG]!=null)f[TG]=ea(r[TG],s);if(r[gG]!=null)f[gG]=xr(r[gG]);if(r[r1]!=null)f[r1]=Dl(r[r1],s);return f},ea=(r,s)=>{const f={};if(r[Fr]!=null)f[Fr]=T(r[Fr]);if(r[s1]!=null)f[s1]=Nr(r[s1]);return f},na=(r,s)=>{const f={};if(r[Lr]!=null)f[Lr]=T(r[Lr]);if(r[Kr]!=null)f[Kr]=xr(r[Kr]);return f},oa=(r,s)=>{const f={};if(r[iG]!=null)f[iG]=T(r[iG]);if(r[OG]!=null)f[OG]=T(r[OG]);return f},Hl=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return S6(f,s)})},aa=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return pa(f,s)})},pa=(r,s)=>{const f={};if(r[rr]!=null)f[rr]=T(r[rr]);if(r[n]!=null)f[n]=T(r[n]);if(r[vG]!=null)f[vG]=oa(r[vG],s);return f},ll=(r,s)=>{const f={};if(r[n]!=null)f[n]=T(r[n]);if(r[KG]!=null)f[KG]=T(r[KG]);if(r[SG]!=null)f[SG]=hr(r[SG]);if(r[nG]!=null)f[nG]=T(r[nG]);if(r[oG]!=null)f[oG]=hr(r[oG]);if(r[GG]!=null)f[GG]=T(r[GG]);if(r[AG]!=null)f[AG]=hr(r[AG]);if(r[JG]!=null)f[JG]=hr(r[JG]);if(r[CG]!=null)f[CG]=T(r[CG]);if(r[dG]!=null)f[dG]=T(r[dG]);if(r[RG]!=null)f[RG]=T(r[RG]);if(r[LG]!=null)f[LG]=T(r[LG]);if(r[$f]!=null)f[$f]=T(r[$f]);if(r[E1]!=null)f[E1]=T(r[E1]);if(r[wG]!=null)f[wG]=y(yw(r[wG]));if(r[QG]!=null)f[QG]=y(yw(r[QG]));return f},ua=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return ll(f,s)})},Dl=(r,s)=>{const f={};if(r[pG]!=null)f[pG]=T(r[pG]);if(r[WG]!=null)f[WG]=T(r[WG]);return f},ta=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return rp(f,s)})},rp=(r,s)=>{const f={};if(r[ar]!=null)f[ar]=T(r[ar]);return f},I8=(r,s)=>{const f={};if(r[Tr]!=null)f[Tr]=T(r[Tr]);if(r[rr]!=null)f[rr]=T(r[rr]);if(r[s6]!=null)f[s6]=T(r[s6]);return f},fp=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return I8(f,s)})},sp=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return T(f)})},wp=(r,s)=>{const f={};if(r[Kr]!=null)f[Kr]=T(r[Kr]);return f},hp=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return wp(f,s)})},Ep=(r,s)=>{const f={};if(r[n]!=null)f[n]=T(r[n]);if(r[Lr]!=null)f[Lr]=T(r[Lr]);if(r[h1]!=null)f[h1]=T(r[h1]);if(r[I1]!=null)f[I1]=xr(r[I1]);if(r[ir]!=null)f[ir]=T(r[ir]);if(r[ew]!=null)f[ew]=Oa(r[ew],s);if(r[th]!=null)f[th]=T(r[th]);if(r[f1]!=null)f[f1]=Nr(r[f1]);if(r[vr]!=null)f[vr]=xr(r[vr]);if(r.ResourceRecords==="")f[nh]=[];else if(r[nh]!=null&&r[nh][C6]!=null)f[nh]=hp(Gr(r[nh][C6]),s);if(r[_w]!=null)f[_w]=Pa(r[_w],s);if(r[nE]!=null)f[nE]=T(r[nE]);if(r[G6]!=null)f[G6]=T(r[G6]);if(r[gw]!=null)f[gw]=Ha(r[gw],s);if(r[nw]!=null)f[nw]=ca(r[nw],s);return f},$p=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return Ep(f,s)})},kl=(r,s)=>{const f={};if(r[xG]!=null)f[xG]=T(r[xG]);if(r[F0]!=null)f[F0]=T(r[F0]);if(r.Tags==="")f[_E]=[];else if(r[_E]!=null&&r[_E][W6]!=null)f[_E]=Gp(Gr(r[_E][W6]),s);return f},Ip=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return kl(f,s)})},Fp=(r,s)=>{const f={};if(r[Lr]!=null)f[Lr]=T(r[Lr]);if(r[Kr]!=null)f[Kr]=xr(r[Kr]);return f},Up=(r,s)=>{const f={};if(r[$f]!=null)f[$f]=T(r[$f]);if(r[IG]!=null)f[IG]=y(yw(r[IG]));return f},Tp=(r,s)=>{const f={};if(r[aw]!=null)f[aw]=T(r[aw]);if(r[Kr]!=null)f[Kr]=T(r[Kr]);return f},Gp=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return Tp(f,s)})},Ap=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return w$(f,s)})},w$=(r,s)=>{const f={};if(r[Tr]!=null)f[Tr]=T(r[Tr]);if(r[N0]!=null)f[N0]=hr(r[N0]);if(r[n]!=null)f[n]=T(r[n]);if(r[Lr]!=null)f[Lr]=T(r[Lr]);if(r[D0]!=null)f[D0]=T(r[D0]);if(r[Fr]!=null)f[Fr]=T(r[Fr]);return f},Y6=(r,s)=>{const f={};if(r[Tr]!=null)f[Tr]=T(r[Tr]);if(r[rr]!=null)f[rr]=T(r[rr]);if(r[n]!=null)f[n]=T(r[n]);if(r[vr]!=null)f[vr]=xr(r[vr]);if(r[f8]!=null)f[f8]=T(r[f8]);if(r[Pr]!=null)f[Pr]=T(r[Pr]);if(r[$1]!=null)f[$1]=T(r[$1]);if(r[_f]!=null)f[_f]=hr(r[_f]);if(r[h8]!=null)f[h8]=T(r[h8]);return f},F8=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return Y6(f,s)})},Lp=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return Rp(f,s)})},Rp=(r,s)=>{const f={};if(r[Tr]!=null)f[Tr]=T(r[Tr]);if(r[n]!=null)f[n]=T(r[n]);if(r[Lr]!=null)f[Lr]=T(r[Lr]);if(r[BG]!=null)f[BG]=hr(r[BG]);if(r[s8]!=null)f[s8]=hr(r[s8]);return f},U8=(r,s)=>{const f={};if(r[r$]!=null)f[r$]=T(r[r$]);if(r[tE]!=null)f[tE]=T(r[tE]);return f},yl=(r,s)=>{return(r||[]).filter((f)=>f!=null).map((f)=>{return U8(f,s)})},Q=(r)=>({httpStatusCode:r.statusCode,requestId:r.headers["x-amzn-requestid"]??r.headers["x-amzn-request-id"]??r.headers["x-amz-request-id"],extendedRequestId:r.headers["x-amz-id-2"],cfId:r.headers["x-amz-cf-id"]});var oh="Action",Cp="AliasHealthEnabled",E0="AlarmIdentifier",Wp="AlarmName",zp="AddTags",_w="AliasTarget",Sp="AssociateVPCComment",Yp="AssociateVPCWithHostedZoneRequest",r6="AWSRegion",ah="Arn",Ow="Bias",Fr="Comment",Xp="ChangeAction",f6="ChangeBatch",ME="CidrBlocks",sG="CidrBlock",$0="ContinentCode",Kp="CidrCollectionChange",Zp="CidrCollectionChangeAction",Pp="ChangeCidrCollectionRequest",Jp="CreateCidrCollectionRequest",VE="CidrCollections",I0="CountryCode",wG="CreatedDate",vw="ChildHealthChecks",Qp="CreateHealthCheckRequest",$8="ChildHealthCheck",Bp="CreateHostedZoneRequest",wr="ChangeInfo",HE="CheckerIpRanges",ph="CollectionId",Mp="CreateKeySigningKeyRequest",lE="CidrLocations",Vp="CidrLocationNameDefaultAllowed",Hp="CidrLocationNameDefaultNotAllowed",lp="CidrList",Dp="CidrNonce",kp="CollectionName",hG="ContinentName",EG="CountryName",$G="ComparisonOperator",yp="CreateQueryLoggingConfigRequest",Yr="CallerReference",gw="CidrRoutingConfig",Np="CreateReusableDelegationSetRequest",qp="ChangeResourceRecordSetsRequest",IG="CheckedTime",mp="ChangeTagsForResourceRequest",jp="CreateTrafficPolicyInstanceRequest",vp="CreateTrafficPolicyRequest",ip="CreateTrafficPolicyVersionRequest",t2="CollectionVersion",Op="CreateVPCAssociationAuthorizationRequest",FG="CloudWatchAlarmConfiguration",s6="CloudWatchLogsLogGroupArn",dp="CloudWatchRegion",Nl="Changes",ql="Change",iM="Cidr",UG="Collection",TG="Config",xw="Coordinates",l0="Count",D0="Document",GG="DigestAlgorithmMnemonic",AG="DigestAlgorithmType",LG="DNSKEYRecord",Ws="DNSName",Lf="DelegationSet",w6="DelegationSetId",RG="DSRecord",DE="DelegationSets",CG="DigestValue",cp="DeleteVPCAssociationAuthorizationRequest",bp="DisassociateVPCComment",_p="DisassociateVPCFromHostedZoneRequest",WG="Description",Ts="Disabled",kE="Dimensions",OM="Dimension",gp="EDNS0ClientSubnetIP",xp="EDNS0ClientSubnetMask",zG="EvaluationPeriods",Gs="EnableSNI",uh="EvaluateTargetHealth",th="Failover",xE="FullyQualifiedDomainName",As="FailureThreshold",SG="Flag",ew="GeoLocation",ep="GeoLocationContinentCode",np="GeoLocationCountryCode",eE="GeoLocationDetails",yE="GeoLocationDetailsList",op="GeoLocationSubdivisionCode",nw="GeoProximityLocation",zs="HealthCheck",ow="HealthCheckConfig",YG="HealthCheckCount",nE="HealthCheckId",ap="HealthCheckNonce",s0="HealthCheckObservations",R6="HealthCheckObservation",pp="HealthCheckRegion",up="HealthCheckType",dw="HealthCheckVersion",NE="HealthChecks",Ls="HealthThreshold",Kf="HostedZone",h6="HostedZoneConfig",XG="HostedZoneCount",rr="HostedZoneId",Rw="HostedZoneIdMarker",qE="HostedZoneSummaries",dM="HostedZoneSummary",tp="HostedZoneType",w0="HostedZones",Rs="Inverted",oE="InsufficientDataHealthStatus",Cw="IPAddress",ru="IsPrivateZone",Ur="IsTruncated",Tr="Id",aw="Key",KG="KmsArn",ZG="KeyManagementServiceArn",PG="KeySigningKey",mE="KeySigningKeys",JG="KeyTag",q0="Location",QG="LastModifiedDate",ar="LocationName",r1="LinkedService",fu="ListTagsForResourcesRequest",BG="LatestVersion",E6="LocalZoneGroup",$6="Latitude",k0="Limit",I6="Longitude",gf="Marker",a="MaxItems",cw="MeasureLatency",MG="MetricName",h$="MaxResults",f1="MultiValueAnswer",Pr="Message",n="Name",VG="NextContinentCode",HG="NextCountryCode",lG="NextDNSName",DG="NextHostedZoneId",y0="NextMarker",kG="NextRecordIdentifier",yG="NextRecordName",NG="NextRecordType",jE="NameServers",qG="NextSubdivisionCode",cM="NameServer",Xr="NextToken",mG="Nameserver",jG="Namespace",T8="Nonce",vG="Owner",iG="OwningAccount",OG="OwningService",Cs="Port",dG="PublicKey",s1="PrivateZone",cG="Period",bG="Protocol",Ww="QueryLoggingConfig",vE="QueryLoggingConfigs",iw="Regions",_G="ResponseCode",F6="RoutingControlArn",G8="ResourceDescription",bM="RecordDataEntry",su="RData",iE="RecordData",wu="ResetElements",_M="ResettableElementName",F0="ResourceId",hu="ResolverIP",Eu="ResourceIds",bw="RequestInterval",U6="RecordName",aE="ResourcePath",C6="ResourceRecord",OE="ResourceRecordSets",gG="ResourceRecordSetCount",$u="ResourceRecordSetFailover",Iu="ResourceRecordSetIdentifier",Fu="ResourceRecordSetMultiValueAnswer",Uu="ResourceRecordSetRegion",Tu="ResourceRecordSetWeight",w1="ResourceRecordSet",Gu="RRType",nh="ResourceRecords",T6="RecordType",Au="RemoveTagKeys",pE="ResourceTagSet",dE="ResourceTagSets",xG="ResourceType",ir="Region",$f="Status",eG="SubmittedAt",nG="SigningAlgorithmMnemonic",oG="SigningAlgorithmType",U0="SubdivisionCode",Lu="StartContinentCode",Ru="StartCountryCode",h1="SetIdentifier",Cu="SigningKeyName",Wu="SigningKeyString",zu="SigningKeyStatus",E1="StatusMessage",aG="SubdivisionName",pG="ServicePrincipal",uG="StatusReport",Su="StartRecordIdentifier",Yu="StartRecordName",Xu="StartRecordType",uE="SearchString",Ku="StartSubdivisionCode",tG="ServeSignature",r8="Statistic",f8="State",Lr="Type",ml="TagKey",Rf="TrafficPolicy",A8="TrafficPolicyComment",s8="TrafficPolicyCount",jl="TrafficPolicyDocument",$1="TrafficPolicyId",w8="TrafficPolicyInstanceCount",G6="TrafficPolicyInstanceId",A6="TrafficPolicyIdMarker",xf="TrafficPolicyInstanceNameMarker",ef="TrafficPolicyInstanceTypeMarker",If="TrafficPolicyInstance",Ef="TrafficPolicyInstances",Zu="TrafficPolicyName",cE="TrafficPolicySummaries",gM="TrafficPolicySummary",h8="TrafficPolicyType",_f="TrafficPolicyVersion",L6="TrafficPolicyVersionMarker",bE="TrafficPolicies",Pu="TagResourceId",vr="TTL",Ju="TagValue",W6="Tag",_E="Tags",E8="Threshold",Qu="UpdateHealthCheckRequest",Bu="UpdateHostedZoneCommentRequest",Mu="UpdateTrafficPolicyCommentRequest",Vu="UpdateTrafficPolicyInstanceRequest",Hu="UUID",Kr="Value",Cr="VPC",tE="VPCId",r$="VPCRegion",h0="VPCs",N0="Version",I1="Weight",lu="continentcode",Du="countrycode",ku="delegationsetid",yu="dnsname",Nu="edns0clientsubnetip",qu="edns0clientsubnetmask",mu="hostedzonetype",E$="hostedzoneid",ju="identifier",vl="id",T0="location",$$="maxresults",of="maxitems",L8="marker",Ss="member",X="message",gE="messages",F1="nexttoken",vu="name",iu="recordname",Ou="recordtype",du="resolverip",cu="subdivisioncode",bu="startcontinentcode",_u="startcountrycode",gu="startsubdivisioncode",xu="type",eu="trafficpolicyid",R8="trafficpolicyinstancename",C8="trafficpolicyinstancetype",nu="trafficpolicyversion",ou="vpcid",lr='<?xml version="1.0" encoding="UTF-8"?>',au="version",pu="vpcregion";class W8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","ActivateKeySigningKey",{}).n("Route53Client","ActivateKeySigningKeyCommand").f(void 0,void 0).ser(xM).de(FH).build(){}B();V();K();class z8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","AssociateVPCWithHostedZone",{}).n("Route53Client","AssociateVPCWithHostedZoneCommand").f(void 0,void 0).ser(eM).de(UH).build(){}B();V();K();class S8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","ChangeCidrCollection",{}).n("Route53Client","ChangeCidrCollectionCommand").f(void 0,void 0).ser(nM).de(TH).build(){}B();V();K();class Y8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),mM(f),j(f)]}).s("AWSDnsV20130401","ChangeResourceRecordSets",{}).n("Route53Client","ChangeResourceRecordSetsCommand").f(void 0,void 0).ser(oM).de(GH).build(){}B();V();K();class X8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ChangeTagsForResource",{}).n("Route53Client","ChangeTagsForResourceCommand").f(void 0,void 0).ser(aM).de(AH).build(){}B();V();K();class K8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","CreateCidrCollection",{}).n("Route53Client","CreateCidrCollectionCommand").f(void 0,void 0).ser(pM).de(LH).build(){}B();V();K();class Z8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","CreateHealthCheck",{}).n("Route53Client","CreateHealthCheckCommand").f(void 0,void 0).ser(uM).de(RH).build(){}B();V();K();class P8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","CreateHostedZone",{}).n("Route53Client","CreateHostedZoneCommand").f(void 0,void 0).ser(tM).de(CH).build(){}B();V();K();class J8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","CreateKeySigningKey",{}).n("Route53Client","CreateKeySigningKeyCommand").f(void 0,void 0).ser(rV).de(WH).build(){}B();V();K();class Q8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","CreateQueryLoggingConfig",{}).n("Route53Client","CreateQueryLoggingConfigCommand").f(void 0,void 0).ser(fV).de(zH).build(){}B();V();K();class B8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","CreateReusableDelegationSet",{}).n("Route53Client","CreateReusableDelegationSetCommand").f(void 0,void 0).ser(sV).de(SH).build(){}B();V();K();class M8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","CreateTrafficPolicy",{}).n("Route53Client","CreateTrafficPolicyCommand").f(void 0,void 0).ser(wV).de(YH).build(){}B();V();K();class V8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","CreateTrafficPolicyInstance",{}).n("Route53Client","CreateTrafficPolicyInstanceCommand").f(void 0,void 0).ser(hV).de(XH).build(){}B();V();K();class H8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","CreateTrafficPolicyVersion",{}).n("Route53Client","CreateTrafficPolicyVersionCommand").f(void 0,void 0).ser(EV).de(KH).build(){}B();V();K();class l8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","CreateVPCAssociationAuthorization",{}).n("Route53Client","CreateVPCAssociationAuthorizationCommand").f(void 0,void 0).ser($V).de(ZH).build(){}B();V();K();class D8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","DeactivateKeySigningKey",{}).n("Route53Client","DeactivateKeySigningKeyCommand").f(void 0,void 0).ser(IV).de(PH).build(){}B();V();K();class k8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","DeleteCidrCollection",{}).n("Route53Client","DeleteCidrCollectionCommand").f(void 0,void 0).ser(FV).de(JH).build(){}B();V();K();class y8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","DeleteHealthCheck",{}).n("Route53Client","DeleteHealthCheckCommand").f(void 0,void 0).ser(UV).de(QH).build(){}B();V();K();class N8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","DeleteHostedZone",{}).n("Route53Client","DeleteHostedZoneCommand").f(void 0,void 0).ser(TV).de(BH).build(){}B();V();K();class q8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","DeleteKeySigningKey",{}).n("Route53Client","DeleteKeySigningKeyCommand").f(void 0,void 0).ser(GV).de(MH).build(){}B();V();K();class m8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","DeleteQueryLoggingConfig",{}).n("Route53Client","DeleteQueryLoggingConfigCommand").f(void 0,void 0).ser(AV).de(VH).build(){}B();V();K();class j8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","DeleteReusableDelegationSet",{}).n("Route53Client","DeleteReusableDelegationSetCommand").f(void 0,void 0).ser(LV).de(HH).build(){}B();V();K();class v8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","DeleteTrafficPolicy",{}).n("Route53Client","DeleteTrafficPolicyCommand").f(void 0,void 0).ser(RV).de(lH).build(){}B();V();K();class i8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","DeleteTrafficPolicyInstance",{}).n("Route53Client","DeleteTrafficPolicyInstanceCommand").f(void 0,void 0).ser(CV).de(DH).build(){}B();V();K();class O8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","DeleteVPCAssociationAuthorization",{}).n("Route53Client","DeleteVPCAssociationAuthorizationCommand").f(void 0,void 0).ser(WV).de(kH).build(){}B();V();K();class d8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","DisableHostedZoneDNSSEC",{}).n("Route53Client","DisableHostedZoneDNSSECCommand").f(void 0,void 0).ser(zV).de(yH).build(){}B();V();K();class c8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","DisassociateVPCFromHostedZone",{}).n("Route53Client","DisassociateVPCFromHostedZoneCommand").f(void 0,void 0).ser(SV).de(NH).build(){}B();V();K();class b8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","EnableHostedZoneDNSSEC",{}).n("Route53Client","EnableHostedZoneDNSSECCommand").f(void 0,void 0).ser(YV).de(qH).build(){}B();V();K();class _8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetAccountLimit",{}).n("Route53Client","GetAccountLimitCommand").f(void 0,void 0).ser(XV).de(mH).build(){}B();V();K();class g8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","GetChange",{}).n("Route53Client","GetChangeCommand").f(void 0,void 0).ser(KV).de(jH).build(){}B();V();K();class x8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetCheckerIpRanges",{}).n("Route53Client","GetCheckerIpRangesCommand").f(void 0,void 0).ser(ZV).de(vH).build(){}B();V();K();class e8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","GetDNSSEC",{}).n("Route53Client","GetDNSSECCommand").f(void 0,void 0).ser(PV).de(iH).build(){}B();V();K();class n8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetGeoLocation",{}).n("Route53Client","GetGeoLocationCommand").f(void 0,void 0).ser(JV).de(OH).build(){}B();V();K();class o8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetHealthCheck",{}).n("Route53Client","GetHealthCheckCommand").f(void 0,void 0).ser(QV).de(dH).build(){}B();V();K();class a8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetHealthCheckCount",{}).n("Route53Client","GetHealthCheckCountCommand").f(void 0,void 0).ser(BV).de(cH).build(){}B();V();K();class p8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetHealthCheckLastFailureReason",{}).n("Route53Client","GetHealthCheckLastFailureReasonCommand").f(void 0,void 0).ser(MV).de(bH).build(){}B();V();K();class u8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetHealthCheckStatus",{}).n("Route53Client","GetHealthCheckStatusCommand").f(void 0,void 0).ser(VV).de(_H).build(){}B();V();K();class t8 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","GetHostedZone",{}).n("Route53Client","GetHostedZoneCommand").f(void 0,void 0).ser(HV).de(gH).build(){}B();V();K();class r4 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetHostedZoneCount",{}).n("Route53Client","GetHostedZoneCountCommand").f(void 0,void 0).ser(lV).de(xH).build(){}B();V();K();class f4 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","GetHostedZoneLimit",{}).n("Route53Client","GetHostedZoneLimitCommand").f(void 0,void 0).ser(DV).de(eH).build(){}B();V();K();class s4 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","GetQueryLoggingConfig",{}).n("Route53Client","GetQueryLoggingConfigCommand").f(void 0,void 0).ser(kV).de(nH).build(){}B();V();K();class w4 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","GetReusableDelegationSet",{}).n("Route53Client","GetReusableDelegationSetCommand").f(void 0,void 0).ser(yV).de(oH).build(){}B();V();K();class h4 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","GetReusableDelegationSetLimit",{}).n("Route53Client","GetReusableDelegationSetLimitCommand").f(void 0,void 0).ser(NV).de(aH).build(){}B();V();K();class E4 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","GetTrafficPolicy",{}).n("Route53Client","GetTrafficPolicyCommand").f(void 0,void 0).ser(qV).de(pH).build(){}B();V();K();class $4 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","GetTrafficPolicyInstance",{}).n("Route53Client","GetTrafficPolicyInstanceCommand").f(void 0,void 0).ser(mV).de(uH).build(){}B();V();K();class I4 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","GetTrafficPolicyInstanceCount",{}).n("Route53Client","GetTrafficPolicyInstanceCountCommand").f(void 0,void 0).ser(jV).de(tH).build(){}B();V();K();class F4 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListCidrBlocks",{}).n("Route53Client","ListCidrBlocksCommand").f(void 0,void 0).ser(vV).de(rl).build(){}B();V();K();class U4 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListCidrCollections",{}).n("Route53Client","ListCidrCollectionsCommand").f(void 0,void 0).ser(iV).de(fl).build(){}B();V();K();class T4 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListCidrLocations",{}).n("Route53Client","ListCidrLocationsCommand").f(void 0,void 0).ser(OV).de(sl).build(){}B();V();K();class G4 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListGeoLocations",{}).n("Route53Client","ListGeoLocationsCommand").f(void 0,void 0).ser(dV).de(wl).build(){}B();V();K();class A4 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListHealthChecks",{}).n("Route53Client","ListHealthChecksCommand").f(void 0,void 0).ser(cV).de(hl).build(){}B();V();K();class L4 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","ListHostedZonesByName",{}).n("Route53Client","ListHostedZonesByNameCommand").f(void 0,void 0).ser(_V).de($l).build(){}B();V();K();class R4 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListHostedZonesByVPC",{}).n("Route53Client","ListHostedZonesByVPCCommand").f(void 0,void 0).ser(gV).de(Il).build(){}B();V();K();class C4 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","ListHostedZones",{}).n("Route53Client","ListHostedZonesCommand").f(void 0,void 0).ser(bV).de(El).build(){}B();V();K();class W4 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","ListQueryLoggingConfigs",{}).n("Route53Client","ListQueryLoggingConfigsCommand").f(void 0,void 0).ser(xV).de(Fl).build(){}B();V();K();class z4 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","ListResourceRecordSets",{}).n("Route53Client","ListResourceRecordSetsCommand").f(void 0,void 0).ser(eV).de(Ul).build(){}B();V();K();class S4 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListReusableDelegationSets",{}).n("Route53Client","ListReusableDelegationSetsCommand").f(void 0,void 0).ser(nV).de(Tl).build(){}B();V();K();class Y4 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListTagsForResource",{}).n("Route53Client","ListTagsForResourceCommand").f(void 0,void 0).ser(oV).de(Gl).build(){}B();V();K();class X4 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListTagsForResources",{}).n("Route53Client","ListTagsForResourcesCommand").f(void 0,void 0).ser(aV).de(Al).build(){}B();V();K();class K4 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListTrafficPolicies",{}).n("Route53Client","ListTrafficPoliciesCommand").f(void 0,void 0).ser(pV).de(Ll).build(){}B();V();K();class Z4 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","ListTrafficPolicyInstancesByHostedZone",{}).n("Route53Client","ListTrafficPolicyInstancesByHostedZoneCommand").f(void 0,void 0).ser(tV).de(Cl).build(){}B();V();K();class P4 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListTrafficPolicyInstancesByPolicy",{}).n("Route53Client","ListTrafficPolicyInstancesByPolicyCommand").f(void 0,void 0).ser(rH).de(Wl).build(){}B();V();K();class J4 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","ListTrafficPolicyInstances",{}).n("Route53Client","ListTrafficPolicyInstancesCommand").f(void 0,void 0).ser(uV).de(Rl).build(){}B();V();K();class Q4 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","ListTrafficPolicyVersions",{}).n("Route53Client","ListTrafficPolicyVersionsCommand").f(void 0,void 0).ser(fH).de(zl).build(){}B();V();K();class B4 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","ListVPCAssociationAuthorizations",{}).n("Route53Client","ListVPCAssociationAuthorizationsCommand").f(void 0,void 0).ser(sH).de(Sl).build(){}B();V();K();class M4 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","TestDNSAnswer",{}).n("Route53Client","TestDNSAnswerCommand").f(void 0,void 0).ser(wH).de(Yl).build(){}B();V();K();class V4 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("AWSDnsV20130401","UpdateHealthCheck",{}).n("Route53Client","UpdateHealthCheckCommand").f(void 0,void 0).ser(hH).de(Xl).build(){}B();V();K();class H4 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","UpdateHostedZoneComment",{}).n("Route53Client","UpdateHostedZoneCommentCommand").f(void 0,void 0).ser(EH).de(Kl).build(){}B();V();K();class l4 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","UpdateTrafficPolicyComment",{}).n("Route53Client","UpdateTrafficPolicyCommentCommand").f(void 0,void 0).ser($H).de(Zl).build(){}B();V();K();class D4 extends R.classBuilder().ep(J).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions()),j(f)]}).s("AWSDnsV20130401","UpdateTrafficPolicyInstance",{}).n("Route53Client","UpdateTrafficPolicyInstanceCommand").f(void 0,void 0).ser(IH).de(Pl).build(){}var uu={ActivateKeySigningKeyCommand:W8,AssociateVPCWithHostedZoneCommand:z8,ChangeCidrCollectionCommand:S8,ChangeResourceRecordSetsCommand:Y8,ChangeTagsForResourceCommand:X8,CreateCidrCollectionCommand:K8,CreateHealthCheckCommand:Z8,CreateHostedZoneCommand:P8,CreateKeySigningKeyCommand:J8,CreateQueryLoggingConfigCommand:Q8,CreateReusableDelegationSetCommand:B8,CreateTrafficPolicyCommand:M8,CreateTrafficPolicyInstanceCommand:V8,CreateTrafficPolicyVersionCommand:H8,CreateVPCAssociationAuthorizationCommand:l8,DeactivateKeySigningKeyCommand:D8,DeleteCidrCollectionCommand:k8,DeleteHealthCheckCommand:y8,DeleteHostedZoneCommand:N8,DeleteKeySigningKeyCommand:q8,DeleteQueryLoggingConfigCommand:m8,DeleteReusableDelegationSetCommand:j8,DeleteTrafficPolicyCommand:v8,DeleteTrafficPolicyInstanceCommand:i8,DeleteVPCAssociationAuthorizationCommand:O8,DisableHostedZoneDNSSECCommand:d8,DisassociateVPCFromHostedZoneCommand:c8,EnableHostedZoneDNSSECCommand:b8,GetAccountLimitCommand:_8,GetChangeCommand:g8,GetCheckerIpRangesCommand:x8,GetDNSSECCommand:e8,GetGeoLocationCommand:n8,GetHealthCheckCommand:o8,GetHealthCheckCountCommand:a8,GetHealthCheckLastFailureReasonCommand:p8,GetHealthCheckStatusCommand:u8,GetHostedZoneCommand:t8,GetHostedZoneCountCommand:r4,GetHostedZoneLimitCommand:f4,GetQueryLoggingConfigCommand:s4,GetReusableDelegationSetCommand:w4,GetReusableDelegationSetLimitCommand:h4,GetTrafficPolicyCommand:E4,GetTrafficPolicyInstanceCommand:$4,GetTrafficPolicyInstanceCountCommand:I4,ListCidrBlocksCommand:F4,ListCidrCollectionsCommand:U4,ListCidrLocationsCommand:T4,ListGeoLocationsCommand:G4,ListHealthChecksCommand:A4,ListHostedZonesCommand:C4,ListHostedZonesByNameCommand:L4,ListHostedZonesByVPCCommand:R4,ListQueryLoggingConfigsCommand:W4,ListResourceRecordSetsCommand:z4,ListReusableDelegationSetsCommand:S4,ListTagsForResourceCommand:Y4,ListTagsForResourcesCommand:X4,ListTrafficPoliciesCommand:K4,ListTrafficPolicyInstancesCommand:J4,ListTrafficPolicyInstancesByHostedZoneCommand:Z4,ListTrafficPolicyInstancesByPolicyCommand:P4,ListTrafficPolicyVersionsCommand:Q4,ListVPCAssociationAuthorizationsCommand:B4,TestDNSAnswerCommand:M4,UpdateHealthCheckCommand:V4,UpdateHostedZoneCommentCommand:H4,UpdateTrafficPolicyCommentCommand:l4,UpdateTrafficPolicyInstanceCommand:D4};class zw extends rG{}ds(uu,zw);pw();uw();tw();Bw();lf();var U1=m(qr(),1);Lh();B();Is();K();var il=m(Qr(),1);Es();function tu(r){return{schemeId:"aws.auth#sigv4",signingProperties:{name:"route53domains",region:r.region},propertiesExtractor:(s,f)=>({signingProperties:{config:s,context:f}})}}var Ol=async(r,s,f)=>{return{operation:Vf(s).operation,region:await yr(r.region)()||(()=>{throw new Error("expected `region` to be configured for `aws.auth#sigv4`")})()}},dl=(r)=>{const s=[];switch(r.operation){default:s.push(tu(r))}return s},cl=(r)=>{return{...il.resolveAwsSdkSigV4Config(r)}};var bl=(r)=>{return{...r,useDualstackEndpoint:r.useDualstackEndpoint??!1,useFipsEndpoint:r.useFipsEndpoint??!1,defaultSigningName:"route53domains"}},g={UseFIPS:{type:"builtInParams",name:"useFipsEndpoint"},Endpoint:{type:"builtInParams",name:"endpoint"},Region:{type:"builtInParams",name:"region"},UseDualStack:{type:"builtInParams",name:"useDualstackEndpoint"}};var _l={name:"@aws-sdk/client-route-53-domains",description:"AWS SDK for JavaScript Route 53 Domains Client for Node.js, Browser and React Native",version:"3.668.0",scripts:{build:"concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'","build:cjs":"node ../../scripts/compilation/inline client-route-53-domains","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4",clean:"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo route-53-domains"},main:"./dist-cjs/index.js",types:"./dist-types/index.d.ts",module:"./dist-es/index.js",sideEffects:!1,dependencies:{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/client-sso-oidc":"3.668.0","@aws-sdk/client-sts":"3.668.0","@aws-sdk/core":"3.667.0","@aws-sdk/credential-provider-node":"3.668.0","@aws-sdk/middleware-host-header":"3.667.0","@aws-sdk/middleware-logger":"3.667.0","@aws-sdk/middleware-recursion-detection":"3.667.0","@aws-sdk/middleware-user-agent":"3.668.0","@aws-sdk/region-config-resolver":"3.667.0","@aws-sdk/types":"3.667.0","@aws-sdk/util-endpoints":"3.667.0","@aws-sdk/util-user-agent-browser":"3.667.0","@aws-sdk/util-user-agent-node":"3.668.0","@smithy/config-resolver":"^3.0.9","@smithy/core":"^2.4.8","@smithy/fetch-http-handler":"^3.2.9","@smithy/hash-node":"^3.0.7","@smithy/invalid-dependency":"^3.0.7","@smithy/middleware-content-length":"^3.0.9","@smithy/middleware-endpoint":"^3.1.4","@smithy/middleware-retry":"^3.0.23","@smithy/middleware-serde":"^3.0.7","@smithy/middleware-stack":"^3.0.7","@smithy/node-config-provider":"^3.1.8","@smithy/node-http-handler":"^3.2.4","@smithy/protocol-http":"^4.1.4","@smithy/smithy-client":"^3.4.0","@smithy/types":"^3.5.0","@smithy/url-parser":"^3.0.7","@smithy/util-base64":"^3.0.0","@smithy/util-body-length-browser":"^3.0.0","@smithy/util-body-length-node":"^3.0.0","@smithy/util-defaults-mode-browser":"^3.0.23","@smithy/util-defaults-mode-node":"^3.0.23","@smithy/util-endpoints":"^2.1.3","@smithy/util-middleware":"^3.0.7","@smithy/util-retry":"^3.0.7","@smithy/util-utf8":"^3.0.0",tslib:"^2.6.2"},devDependencies:{"@tsconfig/node16":"16.1.3","@types/node":"^16.18.96",concurrently:"7.0.0","downlevel-dts":"0.10.1",rimraf:"3.0.2",typescript:"~4.9.5"},engines:{node:">=16.0.0"},typesVersions:{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},files:["dist-*/**"],author:{name:"AWS SDK for JavaScript Team",url:"https://aws.amazon.com/javascript/"},license:"Apache-2.0",browser:{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},homepage:"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-route-53-domains",repository:{type:"git",url:"https://github.com/aws/aws-sdk-js-v3.git",directory:"clients/client-route-53-domains"}};var ED=m(Qr(),1);e1();Jh();lf();Qh();Is();Ns();a0();Bh();zf();var wD=m(Qr(),1);K();n0();S0();Os();Pw();ws();var gl={["required"]:!1,type:"String"},xl={["required"]:!0,default:!1,type:"Boolean"},el={["ref"]:"Endpoint"},tl={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseFIPS"},!0]},rD={["fn"]:"booleanEquals",["argv"]:[{["ref"]:"UseDualStack"},!0]},G0={},nl={["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsFIPS"]},ol={["fn"]:"booleanEquals",["argv"]:[!0,{["fn"]:"getAttr",["argv"]:[{["ref"]:"PartitionResult"},"supportsDualStack"]}]},al=[tl],pl=[rD],ul=[{["ref"]:"Region"}],ft={version:"1.0",parameters:{Region:gl,UseDualStack:xl,UseFIPS:xl,Endpoint:gl},rules:[{conditions:[{["fn"]:"isSet",["argv"]:[el]}],rules:[{conditions:al,error:"Invalid Configuration: FIPS and custom endpoint are not supported",type:"error"},{conditions:pl,error:"Invalid Configuration: Dualstack and custom endpoint are not supported",type:"error"},{endpoint:{url:el,properties:G0,headers:G0},type:"endpoint"}],type:"tree"},{conditions:[{["fn"]:"isSet",["argv"]:ul}],rules:[{conditions:[{["fn"]:"aws.partition",["argv"]:ul,assign:"PartitionResult"}],rules:[{conditions:[tl,rD],rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[!0,nl]},ol],rules:[{endpoint:{url:"https://route53domains-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:G0,headers:G0},type:"endpoint"}],type:"tree"},{error:"FIPS and DualStack are enabled, but this partition does not support one or both",type:"error"}],type:"tree"},{conditions:al,rules:[{conditions:[{["fn"]:"booleanEquals",["argv"]:[nl,!0]}],rules:[{endpoint:{url:"https://route53domains-fips.{Region}.{PartitionResult#dnsSuffix}",properties:G0,headers:G0},type:"endpoint"}],type:"tree"},{error:"FIPS is enabled but this partition does not support FIPS",type:"error"}],type:"tree"},{conditions:pl,rules:[{conditions:[ol],rules:[{endpoint:{url:"https://route53domains.{Region}.{PartitionResult#dualStackDnsSuffix}",properties:G0,headers:G0},type:"endpoint"}],type:"tree"},{error:"DualStack is enabled but this partition does not support DualStack",type:"error"}],type:"tree"},{endpoint:{url:"https://route53domains.{Region}.{PartitionResult#dnsSuffix}",properties:G0,headers:G0},type:"endpoint"}],type:"tree"}],type:"tree"},{error:"Invalid Configuration: Missing Region",type:"error"}]},fD=ft;var st=new fs({size:50,params:["Endpoint","Region","UseDualStack","UseFIPS"]}),sD=(r,s={})=>{return st.get(r,()=>ss(fD,{endpointParams:r,logger:s.logger}))};ur.aws=hs;var hD=(r)=>{return{apiVersion:"2014-05-15",base64Decoder:r?.base64Decoder??Uf,base64Encoder:r?.base64Encoder??Gf,disableHostPrefix:r?.disableHostPrefix??!1,endpointProvider:r?.endpointProvider??sD,extensions:r?.extensions??[],httpAuthSchemeProvider:r?.httpAuthSchemeProvider??dl,httpAuthSchemes:r?.httpAuthSchemes??[{schemeId:"aws.auth#sigv4",identityProvider:(s)=>s.getIdentityProvider("aws.auth#sigv4"),signer:new wD.AwsSdkSigV4Signer}],logger:r?.logger??new Yf,serviceId:r?.serviceId??"Route 53 Domains",urlParser:r?.urlParser??br,utf8Decoder:r?.utf8Decoder??_r,utf8Encoder:r?.utf8Encoder??Tf}};K();Mh();K();var $D=(r)=>{gs(process.version);const s=us(r),f=()=>s().then(_s),w=hD(r);return ED.emitWarningIfUnsupportedVersion(process.version),{...w,...r,runtime:"node",defaultsMode:s,bodyLengthChecker:r?.bodyLengthChecker??ps,credentialDefaultProvider:r?.credentialDefaultProvider??X0,defaultUserAgentProvider:r?.defaultUserAgentProvider??os({serviceId:w.serviceId,clientVersion:_l.version}),maxAttempts:r?.maxAttempts??u(js),region:r?.region??u(Hf,Ds),requestHandler:ff.create(r?.requestHandler??f),retryMode:r?.retryMode??u({...is,default:async()=>(await f()).retryMode||Nf}),sha256:r?.sha256??Fs.bind(null,"sha256"),streamCollector:r?.streamCollector??qf,useDualstackEndpoint:r?.useDualstackEndpoint??u(Hs),useFipsEndpoint:r?.useFipsEndpoint??u(ls),userAgentAppId:r?.userAgentAppId??u(as)}};Vh();kr();K();var ID=(r)=>{const s=r.httpAuthSchemes;let{httpAuthSchemeProvider:f,credentials:w}=r;return{setHttpAuthScheme(h){const E=s.findIndex(($)=>$.schemeId===h.schemeId);if(E===-1)s.push(h);else s.splice(E,1,h)},httpAuthSchemes(){return s},setHttpAuthSchemeProvider(h){f=h},httpAuthSchemeProvider(){return f},setCredentials(h){w=h},credentials(){return w}}},FD=(r)=>{return{httpAuthSchemes:r.httpAuthSchemes(),httpAuthSchemeProvider:r.httpAuthSchemeProvider(),credentials:r.credentials()}};var X6=(r)=>r,UD=(r,s)=>{const f={...X6(ts(r)),...X6(xs(r)),...X6(Xs(r)),...X6(ID(r))};return s.forEach((w)=>w.configure(f)),{...r,...r0(f),...es(f),...Ks(f),...FD(f)}};class k4 extends Sf{constructor(...[r]){const s=$D(r||{}),f=bl(s),w=Ms(f),h=vs(w),E=ks(h),$=Zs(E),I=qs($),F=cl(I),U=UD(F,r?.extensions||[]);super(U);this.config=U,this.middlewareStack.use(Vs(this.config)),this.middlewareStack.use(ns(this.config)),this.middlewareStack.use(ys(this.config)),this.middlewareStack.use(Ps(this.config)),this.middlewareStack.use(Js(this.config)),this.middlewareStack.use(Qs(this.config)),this.middlewareStack.use(U1.getHttpAuthSchemeEndpointRuleSetPlugin(this.config,{httpAuthSchemeParametersProvider:Ol,identityProviderConfigProvider:async(A)=>new U1.DefaultIdentityProviderConfig({"aws.auth#sigv4":A.credentials})})),this.middlewareStack.use(U1.getHttpSigningPlugin(this.config))}destroy(){super.destroy()}}K();B();V();K();K();K();class af extends mf{constructor(r){super(r);Object.setPrototypeOf(this,af.prototype)}}class K6 extends af{constructor(r){super({name:"DomainLimitExceeded",$fault:"client",...r});this.name="DomainLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,K6.prototype)}}class Z6 extends af{constructor(r){super({name:"InvalidInput",$fault:"client",...r});this.name="InvalidInput",this.$fault="client",Object.setPrototypeOf(this,Z6.prototype)}}class P6 extends af{constructor(r){super({name:"OperationLimitExceeded",$fault:"client",...r});this.name="OperationLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,P6.prototype)}}class J6 extends af{constructor(r){super({name:"UnsupportedTLD",$fault:"client",...r});this.name="UnsupportedTLD",this.$fault="client",Object.setPrototypeOf(this,J6.prototype)}}class Q6 extends af{constructor(r){super({name:"DnssecLimitExceeded",$fault:"client",...r});this.name="DnssecLimitExceeded",this.$fault="client",Object.setPrototypeOf(this,Q6.prototype)}}class B6 extends af{constructor(r){super({name:"DuplicateRequest",$fault:"client",...r});this.name="DuplicateRequest",this.$fault="client",Object.setPrototypeOf(this,B6.prototype),this.requestId=r.requestId}}class M6 extends af{constructor(r){super({name:"TLDRulesViolation",$fault:"client",...r});this.name="TLDRulesViolation",this.$fault="client",Object.setPrototypeOf(this,M6.prototype)}}var TD=(r)=>({...r,...r.Password&&{Password:o}}),GD=(r)=>({...r,...r.AuthCode&&{AuthCode:o}});var AD=(r)=>({...r,...r.AdminContact&&{AdminContact:o},...r.RegistrantContact&&{RegistrantContact:o},...r.TechContact&&{TechContact:o},...r.AbuseContactEmail&&{AbuseContactEmail:o},...r.AbuseContactPhone&&{AbuseContactPhone:o},...r.BillingContact&&{BillingContact:o}}),LD=(r)=>({...r,...r.AdminContact&&{AdminContact:o},...r.RegistrantContact&&{RegistrantContact:o},...r.TechContact&&{TechContact:o},...r.BillingContact&&{BillingContact:o}}),RD=(r)=>({...r,...r.emailAddress&&{emailAddress:o}}),CD=(r)=>({...r,...r.AuthCode&&{AuthCode:o}}),WD=(r)=>({...r,...r.AuthCode&&{AuthCode:o},...r.AdminContact&&{AdminContact:o},...r.RegistrantContact&&{RegistrantContact:o},...r.TechContact&&{TechContact:o},...r.BillingContact&&{BillingContact:o}}),zD=(r)=>({...r,...r.Password&&{Password:o}}),SD=(r)=>({...r,...r.AdminContact&&{AdminContact:o},...r.RegistrantContact&&{RegistrantContact:o},...r.TechContact&&{TechContact:o},...r.BillingContact&&{BillingContact:o}}),YD=(r)=>({...r,...r.FIAuthKey&&{FIAuthKey:o}});var fr=m(Qr(),1);kr();K();function Ir(r){return{"content-type":"application/x-amz-json-1.1","x-amz-target":`Route53Domains_v20140515.${r}`}}var XD=async(r,s)=>{const f=Ir("AcceptDomainTransferFromAnotherAwsAccount");let w;return w=JSON.stringify(q(r)),$r(s,f,"/",void 0,w)},KD=async(r,s)=>{const f=Ir("AssociateDelegationSignerToDomain");let w;return w=JSON.stringify(q(r)),$r(s,f,"/",void 0,w)},ZD=async(r,s)=>{const f=Ir("CancelDomainTransferToAnotherAwsAccount");let w;return w=JSON.stringify(q(r)),$r(s,f,"/",void 0,w)},PD=async(r,s)=>{const f=Ir("CheckDomainAvailability");let w;return w=JSON.stringify(q(r)),$r(s,f,"/",void 0,w)},JD=async(r,s)=>{const f=Ir("CheckDomainTransferability");let w;return w=JSON.stringify(q(r)),$r(s,f,"/",void 0,w)},QD=async(r,s)=>{const f=Ir("DeleteDomain");let w;return w=JSON.stringify(q(r)),$r(s,f,"/",void 0,w)},BD=async(r,s)=>{const f=Ir("DeleteTagsForDomain");let w;return w=JSON.stringify(q(r)),$r(s,f,"/",void 0,w)},MD=async(r,s)=>{const f=Ir("DisableDomainAutoRenew");let w;return w=JSON.stringify(q(r)),$r(s,f,"/",void 0,w)},VD=async(r,s)=>{const f=Ir("DisableDomainTransferLock");let w;return w=JSON.stringify(q(r)),$r(s,f,"/",void 0,w)},HD=async(r,s)=>{const f=Ir("DisassociateDelegationSignerFromDomain");let w;return w=JSON.stringify(q(r)),$r(s,f,"/",void 0,w)},lD=async(r,s)=>{const f=Ir("EnableDomainAutoRenew");let w;return w=JSON.stringify(q(r)),$r(s,f,"/",void 0,w)},DD=async(r,s)=>{const f=Ir("EnableDomainTransferLock");let w;return w=JSON.stringify(q(r)),$r(s,f,"/",void 0,w)},kD=async(r,s)=>{const f=Ir("GetContactReachabilityStatus");let w;return w=JSON.stringify(q(r)),$r(s,f,"/",void 0,w)},yD=async(r,s)=>{const f=Ir("GetDomainDetail");let w;return w=JSON.stringify(q(r)),$r(s,f,"/",void 0,w)},ND=async(r,s)=>{const f=Ir("GetDomainSuggestions");let w;return w=JSON.stringify(q(r)),$r(s,f,"/",void 0,w)},qD=async(r,s)=>{const f=Ir("GetOperationDetail");let w;return w=JSON.stringify(q(r)),$r(s,f,"/",void 0,w)},mD=async(r,s)=>{const f=Ir("ListDomains");let w;return w=JSON.stringify(q(r)),$r(s,f,"/",void 0,w)},jD=async(r,s)=>{const f=Ir("ListOperations");let w;return w=JSON.stringify(Gt(r,s)),$r(s,f,"/",void 0,w)},vD=async(r,s)=>{const f=Ir("ListPrices");let w;return w=JSON.stringify(q(r)),$r(s,f,"/",void 0,w)},iD=async(r,s)=>{const f=Ir("ListTagsForDomain");let w;return w=JSON.stringify(q(r)),$r(s,f,"/",void 0,w)},OD=async(r,s)=>{const f=Ir("PushDomain");let w;return w=JSON.stringify(q(r)),$r(s,f,"/",void 0,w)},dD=async(r,s)=>{const f=Ir("RegisterDomain");let w;return w=JSON.stringify(q(r)),$r(s,f,"/",void 0,w)},cD=async(r,s)=>{const f=Ir("RejectDomainTransferFromAnotherAwsAccount");let w;return w=JSON.stringify(q(r)),$r(s,f,"/",void 0,w)},bD=async(r,s)=>{const f=Ir("RenewDomain");let w;return w=JSON.stringify(q(r)),$r(s,f,"/",void 0,w)},_D=async(r,s)=>{const f=Ir("ResendContactReachabilityEmail");let w;return w=JSON.stringify(q(r)),$r(s,f,"/",void 0,w)},gD=async(r,s)=>{const f=Ir("ResendOperationAuthorization");let w;return w=JSON.stringify(q(r)),$r(s,f,"/",void 0,w)},xD=async(r,s)=>{const f=Ir("RetrieveDomainAuthCode");let w;return w=JSON.stringify(q(r)),$r(s,f,"/",void 0,w)},eD=async(r,s)=>{const f=Ir("TransferDomain");let w;return w=JSON.stringify(q(r)),$r(s,f,"/",void 0,w)},nD=async(r,s)=>{const f=Ir("TransferDomainToAnotherAwsAccount");let w;return w=JSON.stringify(q(r)),$r(s,f,"/",void 0,w)},oD=async(r,s)=>{const f=Ir("UpdateDomainContact");let w;return w=JSON.stringify(At(r,s)),$r(s,f,"/",void 0,w)},aD=async(r,s)=>{const f=Ir("UpdateDomainContactPrivacy");let w;return w=JSON.stringify(q(r)),$r(s,f,"/",void 0,w)},pD=async(r,s)=>{const f=Ir("UpdateDomainNameservers");let w;return w=JSON.stringify(q(r)),$r(s,f,"/",void 0,w)},uD=async(r,s)=>{const f=Ir("UpdateTagsForDomain");let w;return w=JSON.stringify(q(r)),$r(s,f,"/",void 0,w)},tD=async(r,s)=>{const f=Ir("ViewBilling");let w;return w=JSON.stringify(Lt(r,s)),$r(s,f,"/",void 0,w)},rk=async(r,s)=>{if(r.statusCode>=300)return Er(r,s);const f=await fr.parseJsonBody(r.body,s);let w={};return w=q(f),{$metadata:t(r),...w}},fk=async(r,s)=>{if(r.statusCode>=300)return Er(r,s);const f=await fr.parseJsonBody(r.body,s);let w={};return w=q(f),{$metadata:t(r),...w}},sk=async(r,s)=>{if(r.statusCode>=300)return Er(r,s);const f=await fr.parseJsonBody(r.body,s);let w={};return w=q(f),{$metadata:t(r),...w}},wk=async(r,s)=>{if(r.statusCode>=300)return Er(r,s);const f=await fr.parseJsonBody(r.body,s);let w={};return w=q(f),{$metadata:t(r),...w}},hk=async(r,s)=>{if(r.statusCode>=300)return Er(r,s);const f=await fr.parseJsonBody(r.body,s);let w={};return w=q(f),{$metadata:t(r),...w}},Ek=async(r,s)=>{if(r.statusCode>=300)return Er(r,s);const f=await fr.parseJsonBody(r.body,s);let w={};return w=q(f),{$metadata:t(r),...w}},$k=async(r,s)=>{if(r.statusCode>=300)return Er(r,s);const f=await fr.parseJsonBody(r.body,s);let w={};return w=q(f),{$metadata:t(r),...w}},Ik=async(r,s)=>{if(r.statusCode>=300)return Er(r,s);const f=await fr.parseJsonBody(r.body,s);let w={};return w=q(f),{$metadata:t(r),...w}},Fk=async(r,s)=>{if(r.statusCode>=300)return Er(r,s);const f=await fr.parseJsonBody(r.body,s);let w={};return w=q(f),{$metadata:t(r),...w}},Uk=async(r,s)=>{if(r.statusCode>=300)return Er(r,s);const f=await fr.parseJsonBody(r.body,s);let w={};return w=q(f),{$metadata:t(r),...w}},Tk=async(r,s)=>{if(r.statusCode>=300)return Er(r,s);const f=await fr.parseJsonBody(r.body,s);let w={};return w=q(f),{$metadata:t(r),...w}},Gk=async(r,s)=>{if(r.statusCode>=300)return Er(r,s);const f=await fr.parseJsonBody(r.body,s);let w={};return w=q(f),{$metadata:t(r),...w}},Ak=async(r,s)=>{if(r.statusCode>=300)return Er(r,s);const f=await fr.parseJsonBody(r.body,s);let w={};return w=q(f),{$metadata:t(r),...w}},Lk=async(r,s)=>{if(r.statusCode>=300)return Er(r,s);const f=await fr.parseJsonBody(r.body,s);let w={};return w=Xt(f,s),{$metadata:t(r),...w}},Rk=async(r,s)=>{if(r.statusCode>=300)return Er(r,s);const f=await fr.parseJsonBody(r.body,s);let w={};return w=q(f),{$metadata:t(r),...w}},Ck=async(r,s)=>{if(r.statusCode>=300)return Er(r,s);const f=await fr.parseJsonBody(r.body,s);let w={};return w=Kt(f,s),{$metadata:t(r),...w}},Wk=async(r,s)=>{if(r.statusCode>=300)return Er(r,s);const f=await fr.parseJsonBody(r.body,s);let w={};return w=Zt(f,s),{$metadata:t(r),...w}},zk=async(r,s)=>{if(r.statusCode>=300)return Er(r,s);const f=await fr.parseJsonBody(r.body,s);let w={};return w=Pt(f,s),{$metadata:t(r),...w}},Sk=async(r,s)=>{if(r.statusCode>=300)return Er(r,s);const f=await fr.parseJsonBody(r.body,s);let w={};return w=Jt(f,s),{$metadata:t(r),...w}},Yk=async(r,s)=>{if(r.statusCode>=300)return Er(r,s);const f=await fr.parseJsonBody(r.body,s);let w={};return w=q(f),{$metadata:t(r),...w}},Xk=async(r,s)=>{if(r.statusCode>=300)return Er(r,s);return await gr(r.body,s),{$metadata:t(r)}},Kk=async(r,s)=>{if(r.statusCode>=300)return Er(r,s);const f=await fr.parseJsonBody(r.body,s);let w={};return w=q(f),{$metadata:t(r),...w}},Zk=async(r,s)=>{if(r.statusCode>=300)return Er(r,s);const f=await fr.parseJsonBody(r.body,s);let w={};return w=q(f),{$metadata:t(r),...w}},Pk=async(r,s)=>{if(r.statusCode>=300)return Er(r,s);const f=await fr.parseJsonBody(r.body,s);let w={};return w=q(f),{$metadata:t(r),...w}},Jk=async(r,s)=>{if(r.statusCode>=300)return Er(r,s);const f=await fr.parseJsonBody(r.body,s);let w={};return w=q(f),{$metadata:t(r),...w}},Qk=async(r,s)=>{if(r.statusCode>=300)return Er(r,s);return await gr(r.body,s),{$metadata:t(r)}},Bk=async(r,s)=>{if(r.statusCode>=300)return Er(r,s);const f=await fr.parseJsonBody(r.body,s);let w={};return w=q(f),{$metadata:t(r),...w}},Mk=async(r,s)=>{if(r.statusCode>=300)return Er(r,s);const f=await fr.parseJsonBody(r.body,s);let w={};return w=q(f),{$metadata:t(r),...w}},Vk=async(r,s)=>{if(r.statusCode>=300)return Er(r,s);const f=await fr.parseJsonBody(r.body,s);let w={};return w=q(f),{$metadata:t(r),...w}},Hk=async(r,s)=>{if(r.statusCode>=300)return Er(r,s);const f=await fr.parseJsonBody(r.body,s);let w={};return w=q(f),{$metadata:t(r),...w}},lk=async(r,s)=>{if(r.statusCode>=300)return Er(r,s);const f=await fr.parseJsonBody(r.body,s);let w={};return w=q(f),{$metadata:t(r),...w}},Dk=async(r,s)=>{if(r.statusCode>=300)return Er(r,s);const f=await fr.parseJsonBody(r.body,s);let w={};return w=q(f),{$metadata:t(r),...w}},kk=async(r,s)=>{if(r.statusCode>=300)return Er(r,s);const f=await fr.parseJsonBody(r.body,s);let w={};return w=q(f),{$metadata:t(r),...w}},yk=async(r,s)=>{if(r.statusCode>=300)return Er(r,s);const f=await fr.parseJsonBody(r.body,s);let w={};return w=Mt(f,s),{$metadata:t(r),...w}},Er=async(r,s)=>{const f={...r,body:await fr.parseJsonErrorBody(r.body,s)},w=fr.loadRestJsonErrorCode(r,f.body);switch(w){case"DomainLimitExceeded":case"com.amazonaws.route53domains#DomainLimitExceeded":throw await ht(f,s);case"InvalidInput":case"com.amazonaws.route53domains#InvalidInput":throw await $t(f,s);case"OperationLimitExceeded":case"com.amazonaws.route53domains#OperationLimitExceeded":throw await It(f,s);case"UnsupportedTLD":case"com.amazonaws.route53domains#UnsupportedTLD":throw await Ut(f,s);case"DnssecLimitExceeded":case"com.amazonaws.route53domains#DnssecLimitExceeded":throw await wt(f,s);case"DuplicateRequest":case"com.amazonaws.route53domains#DuplicateRequest":throw await Et(f,s);case"TLDRulesViolation":case"com.amazonaws.route53domains#TLDRulesViolation":throw await Ft(f,s);default:const h=f.body;return Vt({output:r,parsedBody:h,errorCode:w})}},wt=async(r,s)=>{const f=r.body,w=q(f),h=new Q6({$metadata:t(r),...w});return D(h,f)},ht=async(r,s)=>{const f=r.body,w=q(f),h=new K6({$metadata:t(r),...w});return D(h,f)},Et=async(r,s)=>{const f=r.body,w=q(f),h=new B6({$metadata:t(r),...w});return D(h,f)},$t=async(r,s)=>{const f=r.body,w=q(f),h=new Z6({$metadata:t(r),...w});return D(h,f)},It=async(r,s)=>{const f=r.body,w=q(f),h=new P6({$metadata:t(r),...w});return D(h,f)},Ft=async(r,s)=>{const f=r.body,w=q(f),h=new M6({$metadata:t(r),...w});return D(h,f)},Ut=async(r,s)=>{const f=r.body,w=q(f),h=new J6({$metadata:t(r),...w});return D(h,f)},Tt=(r,s)=>{return p(r,{Currency:[],MaxPrice:iZ})},Gt=(r,s)=>{return p(r,{Marker:[],MaxItems:[],SortBy:[],SortOrder:[],Status:q,SubmittedSince:(f)=>f.getTime()/1000,Type:q})},At=(r,s)=>{return p(r,{AdminContact:q,BillingContact:q,Consent:(f)=>Tt(f,s),DomainName:[],RegistrantContact:q,TechContact:q})},Lt=(r,s)=>{return p(r,{End:(f)=>f.getTime()/1000,Marker:[],MaxItems:[],Start:(f)=>f.getTime()/1000})},Rt=(r,s)=>{return p(r,{BillDate:(f)=>y(cs(Af(f))),DomainName:T,InvoiceId:T,Operation:T,Price:oU})},Ct=(r,s)=>{return(r||[]).filter((w)=>w!=null).map((w)=>{return Rt(w,s)})},Wt=(r,s)=>{return p(r,{ChangeOwnershipPrice:(f)=>I$(f,s),Name:T,RegistrationPrice:(f)=>I$(f,s),RenewalPrice:(f)=>I$(f,s),RestorationPrice:(f)=>I$(f,s),TransferPrice:(f)=>I$(f,s)})},zt=(r,s)=>{return(r||[]).filter((w)=>w!=null).map((w)=>{return Wt(w,s)})},St=(r,s)=>{return p(r,{AutoRenew:p0,DomainName:T,Expiry:(f)=>y(cs(Af(f))),TransferLock:p0})},Yt=(r,s)=>{return(r||[]).filter((w)=>w!=null).map((w)=>{return St(w,s)})},Xt=(r,s)=>{return p(r,{AbuseContactEmail:T,AbuseContactPhone:T,AdminContact:q,AdminPrivacy:p0,AutoRenew:p0,BillingContact:q,BillingPrivacy:p0,CreationDate:(f)=>y(cs(Af(f))),DnsSec:T,DnssecKeys:q,DomainName:T,ExpirationDate:(f)=>y(cs(Af(f))),Nameservers:q,RegistrantContact:q,RegistrantPrivacy:p0,RegistrarName:T,RegistrarUrl:T,RegistryDomainId:T,Reseller:T,StatusList:q,TechContact:q,TechPrivacy:p0,UpdatedDate:(f)=>y(cs(Af(f))),WhoIsServer:T})},Kt=(r,s)=>{return p(r,{DomainName:T,LastUpdatedDate:(f)=>y(cs(Af(f))),Message:T,OperationId:T,Status:T,StatusFlag:T,SubmittedDate:(f)=>y(cs(Af(f))),Type:T})},Zt=(r,s)=>{return p(r,{Domains:(f)=>Yt(f,s),NextPageMarker:T})},Pt=(r,s)=>{return p(r,{NextPageMarker:T,Operations:(f)=>Bt(f,s)})},Jt=(r,s)=>{return p(r,{NextPageMarker:T,Prices:(f)=>zt(f,s)})},Qt=(r,s)=>{return p(r,{DomainName:T,LastUpdatedDate:(f)=>y(cs(Af(f))),Message:T,OperationId:T,Status:T,StatusFlag:T,SubmittedDate:(f)=>y(cs(Af(f))),Type:T})},Bt=(r,s)=>{return(r||[]).filter((w)=>w!=null).map((w)=>{return Qt(w,s)})},I$=(r,s)=>{return p(r,{Currency:T,Price:oU})},Mt=(r,s)=>{return p(r,{BillingRecords:(f)=>Ct(f,s),NextPageMarker:T})},t=(r)=>({httpStatusCode:r.statusCode,requestId:r.headers["x-amzn-requestid"]??r.headers["x-amzn-request-id"]??r.headers["x-amz-request-id"],extendedRequestId:r.headers["x-amz-id-2"],cfId:r.headers["x-amz-cf-id"]});var Vt=bs(af),$r=async(r,s,f,w,h)=>{const{hostname:E,protocol:$="https",port:I,path:F}=await r.endpoint(),U={protocol:$,hostname:E,port:I,method:"POST",path:F.endsWith("/")?F.slice(0,-1)+f:F+f,headers:s};if(w!==void 0)U.hostname=w;if(h!==void 0)U.body=h;return new Mr(U)};class y4 extends R.classBuilder().ep(g).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","AcceptDomainTransferFromAnotherAwsAccount",{}).n("Route53DomainsClient","AcceptDomainTransferFromAnotherAwsAccountCommand").f(TD,void 0).ser(XD).de(rk).build(){}B();V();K();class N4 extends R.classBuilder().ep(g).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","AssociateDelegationSignerToDomain",{}).n("Route53DomainsClient","AssociateDelegationSignerToDomainCommand").f(void 0,void 0).ser(KD).de(fk).build(){}B();V();K();class q4 extends R.classBuilder().ep(g).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","CancelDomainTransferToAnotherAwsAccount",{}).n("Route53DomainsClient","CancelDomainTransferToAnotherAwsAccountCommand").f(void 0,void 0).ser(ZD).de(sk).build(){}B();V();K();class m4 extends R.classBuilder().ep(g).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","CheckDomainAvailability",{}).n("Route53DomainsClient","CheckDomainAvailabilityCommand").f(void 0,void 0).ser(PD).de(wk).build(){}B();V();K();class j4 extends R.classBuilder().ep(g).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","CheckDomainTransferability",{}).n("Route53DomainsClient","CheckDomainTransferabilityCommand").f(GD,void 0).ser(JD).de(hk).build(){}B();V();K();class v4 extends R.classBuilder().ep(g).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","DeleteDomain",{}).n("Route53DomainsClient","DeleteDomainCommand").f(void 0,void 0).ser(QD).de(Ek).build(){}B();V();K();class i4 extends R.classBuilder().ep(g).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","DeleteTagsForDomain",{}).n("Route53DomainsClient","DeleteTagsForDomainCommand").f(void 0,void 0).ser(BD).de($k).build(){}B();V();K();class O4 extends R.classBuilder().ep(g).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","DisableDomainAutoRenew",{}).n("Route53DomainsClient","DisableDomainAutoRenewCommand").f(void 0,void 0).ser(MD).de(Ik).build(){}B();V();K();class d4 extends R.classBuilder().ep(g).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","DisableDomainTransferLock",{}).n("Route53DomainsClient","DisableDomainTransferLockCommand").f(void 0,void 0).ser(VD).de(Fk).build(){}B();V();K();class c4 extends R.classBuilder().ep(g).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","DisassociateDelegationSignerFromDomain",{}).n("Route53DomainsClient","DisassociateDelegationSignerFromDomainCommand").f(void 0,void 0).ser(HD).de(Uk).build(){}B();V();K();class b4 extends R.classBuilder().ep(g).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","EnableDomainAutoRenew",{}).n("Route53DomainsClient","EnableDomainAutoRenewCommand").f(void 0,void 0).ser(lD).de(Tk).build(){}B();V();K();class _4 extends R.classBuilder().ep(g).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","EnableDomainTransferLock",{}).n("Route53DomainsClient","EnableDomainTransferLockCommand").f(void 0,void 0).ser(DD).de(Gk).build(){}B();V();K();class g4 extends R.classBuilder().ep(g).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","GetContactReachabilityStatus",{}).n("Route53DomainsClient","GetContactReachabilityStatusCommand").f(void 0,void 0).ser(kD).de(Ak).build(){}B();V();K();class x4 extends R.classBuilder().ep(g).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","GetDomainDetail",{}).n("Route53DomainsClient","GetDomainDetailCommand").f(void 0,AD).ser(yD).de(Lk).build(){}B();V();K();class e4 extends R.classBuilder().ep(g).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","GetDomainSuggestions",{}).n("Route53DomainsClient","GetDomainSuggestionsCommand").f(void 0,void 0).ser(ND).de(Rk).build(){}B();V();K();class n4 extends R.classBuilder().ep(g).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","GetOperationDetail",{}).n("Route53DomainsClient","GetOperationDetailCommand").f(void 0,void 0).ser(qD).de(Ck).build(){}B();V();K();class o4 extends R.classBuilder().ep(g).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ListDomains",{}).n("Route53DomainsClient","ListDomainsCommand").f(void 0,void 0).ser(mD).de(Wk).build(){}B();V();K();class a4 extends R.classBuilder().ep(g).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ListOperations",{}).n("Route53DomainsClient","ListOperationsCommand").f(void 0,void 0).ser(jD).de(zk).build(){}B();V();K();class p4 extends R.classBuilder().ep(g).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ListPrices",{}).n("Route53DomainsClient","ListPricesCommand").f(void 0,void 0).ser(vD).de(Sk).build(){}B();V();K();class u4 extends R.classBuilder().ep(g).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ListTagsForDomain",{}).n("Route53DomainsClient","ListTagsForDomainCommand").f(void 0,void 0).ser(iD).de(Yk).build(){}B();V();K();class t4 extends R.classBuilder().ep(g).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","PushDomain",{}).n("Route53DomainsClient","PushDomainCommand").f(void 0,void 0).ser(OD).de(Xk).build(){}B();V();K();class rA extends R.classBuilder().ep(g).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","RegisterDomain",{}).n("Route53DomainsClient","RegisterDomainCommand").f(LD,void 0).ser(dD).de(Kk).build(){}B();V();K();class fA extends R.classBuilder().ep(g).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","RejectDomainTransferFromAnotherAwsAccount",{}).n("Route53DomainsClient","RejectDomainTransferFromAnotherAwsAccountCommand").f(void 0,void 0).ser(cD).de(Zk).build(){}B();V();K();class sA extends R.classBuilder().ep(g).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","RenewDomain",{}).n("Route53DomainsClient","RenewDomainCommand").f(void 0,void 0).ser(bD).de(Pk).build(){}B();V();K();class wA extends R.classBuilder().ep(g).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ResendContactReachabilityEmail",{}).n("Route53DomainsClient","ResendContactReachabilityEmailCommand").f(void 0,RD).ser(_D).de(Jk).build(){}B();V();K();class hA extends R.classBuilder().ep(g).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ResendOperationAuthorization",{}).n("Route53DomainsClient","ResendOperationAuthorizationCommand").f(void 0,void 0).ser(gD).de(Qk).build(){}B();V();K();class EA extends R.classBuilder().ep(g).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","RetrieveDomainAuthCode",{}).n("Route53DomainsClient","RetrieveDomainAuthCodeCommand").f(void 0,CD).ser(xD).de(Bk).build(){}B();V();K();class $A extends R.classBuilder().ep(g).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","TransferDomain",{}).n("Route53DomainsClient","TransferDomainCommand").f(WD,void 0).ser(eD).de(Mk).build(){}B();V();K();class IA extends R.classBuilder().ep(g).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","TransferDomainToAnotherAwsAccount",{}).n("Route53DomainsClient","TransferDomainToAnotherAwsAccountCommand").f(void 0,zD).ser(nD).de(Vk).build(){}B();V();K();class FA extends R.classBuilder().ep(g).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","UpdateDomainContact",{}).n("Route53DomainsClient","UpdateDomainContactCommand").f(SD,void 0).ser(oD).de(Hk).build(){}B();V();K();class UA extends R.classBuilder().ep(g).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","UpdateDomainContactPrivacy",{}).n("Route53DomainsClient","UpdateDomainContactPrivacyCommand").f(void 0,void 0).ser(aD).de(lk).build(){}B();V();K();class TA extends R.classBuilder().ep(g).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","UpdateDomainNameservers",{}).n("Route53DomainsClient","UpdateDomainNameserversCommand").f(YD,void 0).ser(pD).de(Dk).build(){}B();V();K();class GA extends R.classBuilder().ep(g).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","UpdateTagsForDomain",{}).n("Route53DomainsClient","UpdateTagsForDomainCommand").f(void 0,void 0).ser(uD).de(kk).build(){}B();V();K();class AA extends R.classBuilder().ep(g).m(function(r,s,f,w){return[C(f,this.serialize,this.deserialize),W(f,r.getEndpointParameterInstructions())]}).s("Route53Domains_v20140515","ViewBilling",{}).n("Route53DomainsClient","ViewBillingCommand").f(void 0,void 0).ser(tD).de(yk).build(){}var Ht={AcceptDomainTransferFromAnotherAwsAccountCommand:y4,AssociateDelegationSignerToDomainCommand:N4,CancelDomainTransferToAnotherAwsAccountCommand:q4,CheckDomainAvailabilityCommand:m4,CheckDomainTransferabilityCommand:j4,DeleteDomainCommand:v4,DeleteTagsForDomainCommand:i4,DisableDomainAutoRenewCommand:O4,DisableDomainTransferLockCommand:d4,DisassociateDelegationSignerFromDomainCommand:c4,EnableDomainAutoRenewCommand:b4,EnableDomainTransferLockCommand:_4,GetContactReachabilityStatusCommand:g4,GetDomainDetailCommand:x4,GetDomainSuggestionsCommand:e4,GetOperationDetailCommand:n4,ListDomainsCommand:o4,ListOperationsCommand:a4,ListPricesCommand:p4,ListTagsForDomainCommand:u4,PushDomainCommand:t4,RegisterDomainCommand:rA,RejectDomainTransferFromAnotherAwsAccountCommand:fA,RenewDomainCommand:sA,ResendContactReachabilityEmailCommand:wA,ResendOperationAuthorizationCommand:hA,RetrieveDomainAuthCodeCommand:EA,TransferDomainCommand:$A,TransferDomainToAnotherAwsAccountCommand:IA,UpdateDomainContactCommand:FA,UpdateDomainContactPrivacyCommand:UA,UpdateDomainNameserversCommand:TA,UpdateTagsForDomainCommand:GA,ViewBillingCommand:AA};class F$ extends k4{}ds(Ht,F$);import{runAction as lt}from"@stacksjs/actions";import{config as qk}from"@stacksjs/config";import{Action as Dt}from"@stacksjs/enums";import{err as m0,handleError as A0,ok as T1}from"@stacksjs/error-handling";import{log as Zf}from"@stacksjs/logging";import{path as kt}from"@stacksjs/path";import{fs as Nk}from"@stacksjs/storage";async function Clr(r){const s=new zw,f=await s.listHostedZonesByName({DNSName:r});if(!f||!f.HostedZones)return m0(A0(`No hosted zones found for domain: ${r}`));const w=f.HostedZones.find((E)=>E.Name===`${r}.`);if(!w)return m0(A0(`Hosted Zone not found for domain: ${r}`));const h=await s.listResourceRecordSets({HostedZoneId:w.Id});if(!h||!h.ResourceRecordSets)return m0(A0(`No DNS records found for domain: ${r}`));for(let E of h.ResourceRecordSets)if(E.Type!=="NS"&&E.Type!=="SOA")await s.changeResourceRecordSets({HostedZoneId:w.Id,ChangeBatch:{Changes:[{Action:"DELETE",ResourceRecordSet:E}]}});return await s.deleteHostedZone({Id:w.Id}),Zf.info(`Deleted Hosted Zone for domain: ${r}`),T1("success")}async function Wlr(r){const s=new zw,f=await s.listHostedZonesByName({DNSName:r});if(!f||!f.HostedZones)return m0(A0(`No hosted zones found for domain: ${r}`));const w=f.HostedZones.find((E)=>E.Name===`${r}.`);if(!w)return m0(A0(`Hosted Zone not found for domain: ${r}`));const h=await s.listResourceRecordSets({HostedZoneId:w.Id});if(!h||!h.ResourceRecordSets)return m0(A0(`No DNS records found for domain: ${r}`));for(let E of h.ResourceRecordSets)if(E.Type!=="NS"&&E.Type!=="SOA")await s.changeResourceRecordSets({HostedZoneId:w.Id,ChangeBatch:{Changes:[{Action:"DELETE",ResourceRecordSet:E}]}});return Zf.info(`Deleted DNS records for domain: ${r}`),T1("success")}async function zlr(r){const s=new zw,w=(await s.listHostedZonesByName({DNSName:r})).HostedZones?.find((E)=>E.Name===`${r}.`);if(w)return T1(w);const h=await s.createHostedZone({Name:r,CallerReference:`${Date.now()}`});if(!h.HostedZone)return m0(A0("Failed to create hosted zone"));return T1(h)}function yt(r){try{const s=kt.projectConfigPath("dns.ts"),w=Nk.readFileSync(s,"utf-8").replace(/nameservers: \[.*?\]/s,`nameservers: [${r.map((h)=>`'${h}'`).join(", ")}]`);Nk.writeFileSync(s,w,"utf-8"),Zf.info("Nameservers have been set.")}catch(s){console.error("Error updating nameservers:",s)}}async function Slr(r){try{const s=new zw,{HostedZones:f}=await s.listHostedZonesByName({DNSName:r});if(!f)return m0(A0(`No hosted zones found for domain ${r}`));const w=f[0];if(w&&w.Name===`${r}.`)return T1(w.Id);return T1(null)}catch(s){return m0(A0(`Failed to find hosted zone for domain ${r}`,s))}}async function Nt(r){if(Zf.debug("Getting nameservers for domain:",r),!r)return[];try{return(await new F$().getDomainDetail({DomainName:r}))?.Nameservers?.map((w)=>w.Name)||[]}catch(s){A0("Error getting domain detail",s)}}async function qt(r,s){if(!s)s=qk.app.url;const f=await Nt(s);if(f&&r&&JSON.stringify(f.sort())!==JSON.stringify(r.sort()))return Zf.info("Updating your domain nameservers to match the ones in your hosted zone..."),Zf.debug("Hosted zone nameservers:",r),Zf.debug("Domain nameservers:",f),await new F$().updateDomainNameservers({DomainName:s,Nameservers:r.map((h)=>({Name:h}))}),yt(r),Zf.info("Nameservers updated."),!0;Zf.success("Your nameservers are up to date.")}async function Ylr(r){if(Zf.debug("Checking if domain has been added to cloud..."),!r)r=qk.app.url;Zf.debug("domainName:",r);const s=new zw,f=await s.listHostedZonesByName({DNSName:r});if(Zf.debug("Existing hosted zones:",f),!f||!f.HostedZones)return!1;const w=f.HostedZones.find((h)=>h.Name===`${r}.`);if(w){Zf.debug("Hosted zone found:",w);const E=(await s.getHostedZone({Id:w.Id})).DelegationSet?.NameServers||[];return await qt(E,r),!0}return!1}async function Xlr(r){return await lt(Dt.DomainsAdd,r)}export{yt as writeNameserversToConfig,qt as updateNameservers,Ylr as hasUserDomainBeenAddedToCloud,Nt as getNameservers,Slr as findHostedZone,Wlr as deleteHostedZoneRecords,Clr as deleteHostedZone,zlr as createHostedZone,Xlr as addDomain};
34
34
 
35
- //# debugId=B0D3A6043729B1C464756E2164756E21
35
+ //# debugId=494FFC744DBF30B964756E2164756E21
36
36
  //# sourceMappingURL=index.js.map